;(wx.webpackJsonp = wx.webpackJsonp || []).push([
  [4268],
  {
    6970: function (e, n, t) {
      var r = t(4160),
        c = t(5652),
        a = t(2555),
        o = t(8460),
        u = t(4576),
        i = t(2573),
        s = t.n(i),
        l = t(758),
        f = t(4911),
        h = t(7422),
        p = t(3816),
        d = t(9365),
        g = d.A
      function v(e) {
        return new Promise(function (n, t) {
          g.$fetch({ url: 'mtop.damai.wireless.search.account.relationship.list', data: e })
            .then(function (e) {
              var r = (0, u.A)(e, 2),
                c = r[0],
                a = r[1]
              c && t(c), n(a)
            })
            .catch(function (e) {})
        })
      }
      var x = d.A
      function A(e) {
        return new Promise(function (n, t) {
          x.$fetch({ url: 'mtop.damai.wireless.follow.relation.update', v: '1.2', data: e })
            .then(function (e) {
              var r = (0, u.A)(e, 2),
                c = r[0],
                a = r[1]
              c && t(c), n(a)
            })
            .catch(function (e) {
              t(e)
            })
        })
      }
      var m = t(4107)
      function w(e) {
        return e.map(function (e) {
          return (0, m.A)((0, m.A)({}, e.project), {}, { type: e.type, projectImage: e.project.verticalPic })
        })
      }
      var S = t(2614),
        N = t(7698),
        j = t(4269),
        b = t(1091),
        k = t(6070),
        y = function (e) {
          var n = e.children,
            t = e.onClick,
            r = (0, l.useState)(0),
            c = (0, u.A)(r, 2),
            a = c[0],
            o = c[1],
            i = (0, l.useRef)(),
            s = (0, l.useRef)()
          return (0, k.jsxs)(j.Ss, {
            style: { position: 'relative', overflow: 'hidden', display: 'flex', flexDirection: 'row' },
            children: [
              (0, k.jsx)(j.Ss, {
                style: {
                  transform: 'translateX('.concat(a, 'px)'),
                  position: 'relative',
                  zIndex: 1,
                  backgroundColor: '#FFFFFF',
                  height: '100%',
                  width: '100%',
                },
                onTouchStart: (0, l.useCallback)(function (e) {
                  ;(i.current = [e.touches[0].pageX, e.touches[0].pageY]),
                    o(function (e) {
                      return (s.current = e), e
                    })
                }, []),
                onTouchMove: (0, l.useCallback)(function (e) {
                  if (
                    i.current &&
                    Math.abs(e.touches[0].pageX - i.current[0]) > Math.abs(e.touches[0].pageY - i.current[1])
                  ) {
                    var n = e.touches[0].pageX - i.current[0] + s.current
                    ;(n = Math.min(Math.max(n, -66), 0)), o(n)
                  } else
                    (i.current = void 0),
                      o(function (e) {
                        return e <= -33 ? -66 : 0
                      })
                }, []),
                onTouchEnd: (0, l.useCallback)(function () {
                  ;(i.current = void 0),
                    o(function (e) {
                      return e <= -33 ? -66 : 0
                    })
                }, []),
                children: n,
              }),
              (0, k.jsx)(j.Ss, { style: { width: '66px' }, className: 'delete-btn', onClick: t, children: '删除' }),
            ],
          })
        },
        C = function (e) {
          var n = e.onClick,
            t = e.buttonText
          return (0, k.jsxs)(j.Ss, {
            className: 'empty-view-container',
            children: [
              (0, k.jsx)(j.Ss, { className: 'logo' }),
              (0, k.jsx)(j.Ss, { className: 'slogan', children: '买票上大麦' }),
              (0, k.jsx)(j.Ss, { className: 'subtitle', children: '官方渠道票源 现场演出等你哦' }),
              (0, k.jsx)(j.Ss, { className: 'find-more', onClick: n, children: t }),
            ],
          })
        },
        T = function () {
          var e = (0, l.useState)([]),
            n = (0, u.A)(e, 2),
            t = n[0],
            r = n[1],
            d = (0, l.useState)(!0),
            g = (0, u.A)(d, 2),
            x = g[0],
            m = g[1],
            T = (0, l.useRef)({ pageNo: 1, pageSize: 15, hasNext: !1 });
            var P = (0, l.useState)(!0);
            var R = (0, u.A)(P, 2);
            D = R[0];
            var F = R[1],
            E = (0, l.useRef)(!1),
            I = function () {
              var e = { pageSize: T.current.pageSize, pageNo: T.current.pageNo, type: 4 }
              m(!0),
                v(e)
                  .then(function (e) {
                    var n = e.data,
                      t = e.hasNext
                    m(!1),
                      s().stopPullDownRefresh(),
                      r(function (e) {
                        return [].concat((0, o.A)(1 === T.current.pageNo ? [] : e), (0, o.A)(w(n)))
                      }),
                      t && (T.current.pageNo += 1),
                      (T.current.hasNext = t)
                  })
                  .catch(function (e) {
                    'FAIL_SYS_SESSION_EXPIRED' === e.code && (m(!1), F(!1))
                  })
            },
            M = (function () {
              var e = (0, a.A)(
                (0, c.A)().m(function e() {
                  var n
                  return (0, c.A)().w(function (e) {
                    for (;;)
                      switch (e.n) {
                        case 0:
                          return (e.n = 1), p.A.isLogin()
                        case 1:
                          ;(n = e.v), F(!!n), n && I()
                        case 2:
                          return e.a(2)
                      }
                  }, e)
                }),
              )
              return function () {
                return e.apply(this, arguments)
              }
            })()
          return (
            (0, i.useDidShow)(function () {
              E.current && ((E.current = !1), 1 !== T.current.pageNo || (t || []).length || M())
            }),
            (0, i.useDidHide)(function () {
              E.current = !0
            }),
            (0, l.useEffect)(function () {
              var e = f.A.getTabParams('/pages/want2see/index'),
                n = ''.concat(h.A.spmA, '.').concat('favorite', '.0.0')
              h.A.sendPageEvent(n, '想看', e), r([]), (T.current.pageNo = 1), M()
            }, []),
            (0, i.usePullDownRefresh)(function () {
              ;(0, a.A)(
                (0, c.A)().m(function e() {
                  var n
                  return (0, c.A)().w(function (e) {
                    for (;;)
                      switch (e.n) {
                        case 0:
                          return (e.n = 1), p.A.isLogin()
                        case 1:
                          ;(n = e.v), r([]), (T.current.pageNo = 1), n ? (F(!0), I()) : F(!1)
                        case 2:
                          return e.a(2)
                      }
                  }, e)
                }),
              )()
            }),
            (0, i.useReachBottom)(function () {
              T.current.hasNext && I()
            }),
            (0, k.jsx)(j.Ss, {
              children: (console.log(D), D)
                ? t.length > 0
                  ? t.map(function (e, n) {
                      return (0, k.jsx)(
                        y,
                        {
                          onClick: function () {
                            A({ operateType: 0, targetId: e.id, targetType: e.type })
                              .then(function (e) {
                                0 == +e.status &&
                                  r(function (e) {
                                    return e.splice(n, 1), (0, o.A)(e)
                                  })
                              })
                              .catch(function (e) {})
                          },
                          children: (0, k.jsx)(j.Ss, {
                            onClick: function () {
                              ;(0, b.A)(e.id, e.type, { item: e })
                            },
                            children: (0, k.jsx)(S.A, { data: (0, N.G)(e) }),
                          }),
                        },
                        e.id,
                      )
                    })
                  : !x &&
                    (0, k.jsx)(C, {
                      buttonText: '去找更多演出',
                      onClick: function () {
                        f.A.navTo('/pages/home/index')
                      },
                    })
                : (0, k.jsx)(C, {
                    buttonText: '登录',
                    onClick: function () {
                      p.A.login().then(function (e) {
                        e.success && (F(!0), I())
                      })
                    },
                  }),
            })
          )
        }
      Page(
        (0, r.eU)(
          T,
          'pages/want2see/index',
          { root: { cn: [] } },
          { navigationBarTitleText: '想看', enablePullDownRefresh: !0, spmB: 'favorite' } || {},
        ),
      )
    },
  },
  function (e) {
    e.O(0, [6907, 8096, 2076], function () {
      return (n = 6970), e((e.s = n))
      var n
    }),
      e.O()
  },
])
