s-layout.4ae51839.js 104 KB

1
  1. var e=(e,t,a)=>{if(!t.has(e))throw TypeError("Cannot "+a)},t=(t,a,s)=>(e(t,a,"read from private field"),s?s.call(t):a.get(t));import{aS as a,aT as s,m as l,n as o,f as n,g as r,w as i,k as c,B as u,ah as d,u as h,v as f,i as m,j as p,a3 as g,I as b,z as y,l as v,F as w,r as _,G as x,x as k,s as S,E as C,J as P,c as I,e as A,a0 as B,a2 as T,af as $,aF as V,ag as M,o as L,ae as U,O as D,y as N,aU as F,aw as E,aV as z,aW as O,aX as R,H as j,aY as H,Z as W,aZ as q,a_ as G,a$ as Q,b0 as X,b1 as Z,b2 as K,b3 as Y,N as J,al as ee,b4 as te,aE as ae,V as se,W as le,Q as oe,b5 as ne,b6 as re,az as ie,ao as ce,ay as ue,aK as de,t as he,K as fe,L as me,aD as pe,b7 as ge,a4 as be,b8 as ye,a6 as ve,p as we}from"./index-a116b7fa.js";import{_ as _e}from"./_plugin-vue_export-helper.1b428a4d.js";import{e as xe,_ as ke,u as Se,g as Ce,a as Pe,b as Ie,d as Ae,c as Be,m as Te,p as $e,h as Ve,i as Me}from"./phone-international-input.b9f6c8e6.js";import{p as Le}from"./useGoods.6b315a78.js";const Ue={en:{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"Search enter content"},"zh-Hans":{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"请输入搜索内容"},"zh-Hant":{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"請輸入搜索內容"}},{t:De}=a(Ue);const Ne=_e({name:"UniSearchBar",emits:["input","update:modelValue","clear","cancel","confirm","blur","focus"],props:{placeholder:{type:String,default:""},radius:{type:[Number,String],default:5},clearButton:{type:String,default:"auto"},cancelButton:{type:String,default:"auto"},cancelText:{type:String,default:"取消"},bgColor:{type:String,default:"#F8F8F8"},maxlength:{type:[Number,String],default:100},value:{type:[Number,String],default:""},modelValue:{type:[Number,String],default:""},focus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},data:()=>({show:!1,showSync:!1,searchVal:""}),computed:{cancelTextI18n(){return this.cancelText||De("uni-search-bar.cancel")},placeholderText(){return this.placeholder||De("uni-search-bar.placeholder")}},watch:{modelValue:{immediate:!0,handler(e){this.searchVal=e,e&&(this.show=!0)}},focus:{immediate:!0,handler(e){if(e){if(this.readonly)return;this.show=!0,this.$nextTick((()=>{this.showSync=!0}))}}},searchVal(e,t){this.$emit("input",e),this.$emit("update:modelValue",e)}},methods:{searchClick(){this.readonly||this.show||(this.show=!0,this.$nextTick((()=>{this.showSync=!0})))},clear(){this.$emit("clear",{value:this.searchVal}),this.searchVal=""},cancel(){this.readonly||(this.$emit("cancel",{value:this.searchVal}),this.searchVal="",this.show=!1,this.showSync=!1,s())},confirm(){s(),this.$emit("confirm",{value:this.searchVal})},blur(){s(),this.$emit("blur",{value:this.searchVal})},emitFocus(e){this.$emit("focus",e.detail)}}},[["render",function(e,t,a,s,y,v){const w=l(o("uni-icons"),xe),_=p,x=g,k=b;return n(),r(_,{class:"uni-searchbar"},{default:i((()=>[c(_,{style:u({borderRadius:a.radius+"px",backgroundColor:a.bgColor}),class:"uni-searchbar__box",onClick:v.searchClick},{default:i((()=>[c(_,{class:"uni-searchbar__box-icon-search"},{default:i((()=>[d(e.$slots,"searchIcon",{},(()=>[c(w,{color:"#c0c4cc",size:"18",type:"search"})]),!0)])),_:3}),y.show||y.searchVal?(n(),r(x,{key:0,focus:y.showSync,disabled:a.readonly,placeholder:v.placeholderText,maxlength:a.maxlength,class:"uni-searchbar__box-search-input","confirm-type":"search",type:"text",modelValue:y.searchVal,"onUpdate:modelValue":t[0]||(t[0]=e=>y.searchVal=e),onConfirm:v.confirm,onBlur:v.blur,onFocus:v.emitFocus},null,8,["focus","disabled","placeholder","maxlength","modelValue","onConfirm","onBlur","onFocus"])):(n(),r(k,{key:1,class:"uni-searchbar__text-placeholder"},{default:i((()=>[h(f(a.placeholder),1)])),_:1})),y.show&&("always"===a.clearButton||"auto"===a.clearButton&&""!==y.searchVal)&&!a.readonly?(n(),r(_,{key:2,class:"uni-searchbar__box-icon-clear",onClick:v.clear},{default:i((()=>[d(e.$slots,"clearIcon",{},(()=>[c(w,{color:"#c0c4cc",size:"20",type:"clear"})]),!0)])),_:3},8,["onClick"])):m("",!0)])),_:3},8,["style","onClick"]),"always"===a.cancelButton||y.show&&"auto"===a.cancelButton?(n(),r(k,{key:0,onClick:v.cancel,class:"uni-searchbar__cancel"},{default:i((()=>[h(f(v.cancelTextI18n),1)])),_:1},8,["onClick"])):m("",!0)])),_:3})}],["__scopeId","data-v-d1d127ff"]]),Fe=_e({__name:"s-search-block",props:{data:{type:Object,default:()=>({})},elBackground:{type:String,default:""},height:{type:Number,default:36},iconColor:{type:String,default:"#b0b3bf"},fontColor:{type:String,default:"#b0b3bf"},placeholder:{type:String,default:"这是一个搜索框"},radius:{type:Number,default:10},width:{type:String,default:"100%"},navbar:{type:Boolean,default:!0}},emits:["click"],setup(e,{emit:t}){const a=y({searchVal:""}),s=t,d=e,g=()=>{s("click")};function b(e){e.value&&(S.$router.go("/pages/goods/list",{keyword:e.value}),setTimeout((()=>{a.searchVal=""}),100))}return(t,s)=>{const y=p,I=l(o("uni-search-bar"),Ne),A=P;return n(),r(y,{class:C(["search-content ss-flex ss-col-center ss-row-between",[{"border-content":e.navbar}]]),onClick:g,style:u([{borderRadius:e.radius+"px",background:e.elBackground,height:e.height+"px",width:e.width}])},{default:i((()=>[e.navbar?(n(),r(y,{key:0,class:"ss-flex ss-col-center"},{default:i((()=>[c(y,{class:"search-icon _icon-search ss-m-l-10",style:u([{color:d.iconColor}])},null,8,["style"]),c(y,{class:"search-input ss-flex-1 ss-line-1",style:u([{color:e.fontColor,width:e.width}])},{default:i((()=>[h(f(e.placeholder),1)])),_:1},8,["style"])])),_:1})):m("",!0),e.navbar?m("",!0):(n(),r(I,{key:1,class:"ss-flex-1",radius:e.data.borderRadius,placeholder:e.data.placeholder,cancelButton:"none",clearButton:"none",onConfirm:b,modelValue:a.searchVal,"onUpdate:modelValue":s[0]||(s[0]=e=>a.searchVal=e)},null,8,["radius","placeholder","modelValue"])),c(y,{class:"keyword-link ss-flex"},{default:i((()=>[(n(!0),v(w,null,_(e.data.hotKeywords,((t,a)=>(n(),r(y,{key:a},{default:i((()=>[c(y,{class:"ss-m-r-16",style:u([{color:e.data.textColor}]),onClick:x((e=>k(S).$router.go("/pages/goods/list",{keyword:t})),["stop"])},{default:i((()=>[h(f(t),1)])),_:2},1032,["style","onClick"])])),_:2},1024)))),128))])),_:1}),e.data.hotKeywords&&e.data.hotKeywords.length&&e.navbar?(n(),r(y,{key:2,class:"ss-flex"},{default:i((()=>[(n(!0),v(w,null,_(e.data.hotKeywords,((t,a)=>(n(),r(A,{class:"ss-reset-button keyword-btn",key:a,style:u([{color:e.data.textColor,marginRight:"10rpx"}])},{default:i((()=>[h(f(t),1)])),_:2},1032,["style"])))),128))])),_:1})):m("",!0)])),_:1},8,["style","class"])}}},[["__scopeId","data-v-69949848"]]),Ee=_e({__name:"su-fixed",props:{noNav:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},bg:{type:String,default:""},bgStyles:{type:Object,default(){}},val:{type:Number,default:0},width:{type:[String,Number],default:0},alway:{type:Boolean,default:!0},opacity:{type:Boolean,default:!1},index:{type:[Number,String],default:0},placeholder:{type:[Boolean],default:!1},sticky:{type:[Boolean],default:!1},noFixed:{type:Boolean,default:!1},ui:{type:String,default:""},clickTo:{type:Boolean,default:!1},isInset:{type:Boolean,default:!0}},setup(e){const{safeAreaInsets:t}=S.$platform.device,a=V(),s=S.$helper.guid(),l=S.$platform.navbar,o=y({content:{},fixed:!0,scrollTop:0,opacityVal:0}),h=I((()=>o.fixed&&f.bottom?f.isInset?f.val+"px":f.val+t.bottom+"px":"auto")),f=e;o.fixed=!k(f.sticky),A((e=>{let t=e.scrollTop;o.scrollTop=t,o.opacityVal=t>S.$platform.navbar?1:.01*t})),B((()=>{T((()=>{g()}))}));const g=()=>{$().in(a).select(`#fixed-${s}`).boundingClientRect((e=>{null!=e&&(o.content=e,k(f.sticky)&&b(o.scrollTop))})).exec()},b=e=>{k(f.bottom)?o.fixed=e>=o.content.bottom-S.$platform.device.windowHeight+o.content.height+k(f.val):o.fixed=e>=o.content.top-(k(f.noNav)?k(f.val):k(f.val)+S.$platform.navbar)},v=()=>{f.hasToTop&&M({scrollTop:o.content.top,duration:100})};return(a,f)=>{const g=p;return n(),r(g,{class:"ui-fixed"},{default:i((()=>[c(g,{class:C(["ui-fixed-box",[{fixed:o.fixed}]]),id:`fixed-${k(s)}`,style:u([{left:e.sticky?"auto":"0px",top:o.fixed&&!e.bottom?(e.noNav?e.val:e.val+k(l))+"px":"auto",bottom:h.value,zIndex:e.index+k(S).$zIndex.navbar},e.alway?"":{opacity:o.opacityVal}])},{default:i((()=>[c(g,{class:"ui-fixed-content",onClick:v,style:u([{zIndex:e.index+k(S).$zIndex.navbar}])},{default:i((()=>[d(a.$slots,"default",{},void 0,!0),k(t).bottom&&e.bottom&&e.isInset?(n(),r(g,{key:0,class:"inset-bottom",style:u([{height:k(t).bottom+"px"}])},null,8,["style"])):m("",!0)])),_:3},8,["style"]),e.bottom?(n(),r(g,{key:0,class:C(["ui-fixed-bottom",[e.bg]])},null,8,["class"])):m("",!0),c(g,{class:C(["ui-fixed-bg",[e.ui,e.bg]]),style:u([{zIndex:e.index+k(S).$zIndex.navbar-1},e.bgStyles,e.opacity?{opacity:o.opacityVal}:""])},null,8,["class","style"])])),_:3},8,["id","class","style"]),(e.sticky||e.placeholder)&&o.fixed?(n(),r(g,{key:0,class:"skeleton",style:u([{height:o.content.height+"px",width:e.width+"px"}])},null,8,["style"])):m("",!0)])),_:3})}}},[["__scopeId","data-v-bb090a1f"]]),ze=_e({__name:"su-status-bar",setup(e){const t=S.$platform.device.statusBarHeight+"px";return(e,a)=>{const s=p;return n(),r(s,{style:u({height:t}),class:"uni-status-bar"},{default:i((()=>[d(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"])}}},[["__scopeId","data-v-c47205c9"]]),Oe=_e({__name:"su-navbar",props:{dark:{type:Boolean,default:!1},modelValue:{type:String,default:""},title:{type:String,default:""},titleAlign:{type:String,default:"center"},rightText:{type:String,default:""},leftIcon:{type:String,default:"left"},rightIcon:{type:String,default:""},fixed:{type:[Boolean,String],default:!0},placeholder:{type:[Boolean,String],default:!0},color:{type:String,default:""},backgroundColor:{type:String,default:""},opacity:{type:[Boolean,String],default:!1},opacityBgUi:{type:String,default:"bg-white"},statusBar:{type:[Boolean,String],default:!1},shadow:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!1},height:{type:[Number,String],default:44},leftWidth:{type:[Number,String],default:80},rightWidth:{type:[Number,String],default:0},tools:{type:String,default:"title"},defaultSearch:{type:String,default:""}},emits:["clickLeft","clickRight","clickTitle","search"],setup(e,{emit:t}){const a=e=>"number"==typeof e?e+"px":e,s=t,g=e;I((()=>({width:S.$platform.capsule.width+"px",height:S.$platform.capsule.height+"px",margin:"0 "+(S.$platform.device.windowWidth-S.$platform.capsule.right)+"px"})));const y=I((()=>g.defaultSearch));I((()=>g.dark?g.backgroundColor?g.backgroundColor:g.dark?"#333":"#FFF":g.backgroundColor||"#FFF"));const v=I((()=>g.dark?g.color?g.color:g.dark?"#fff":"#333":g.color||"#333")),w=I((()=>a(g.height))),_=I((()=>a(g.leftWidth)));function x(e){s("search",e.value)}I((()=>a(g.rightWidth))),L((()=>{uni.report&&""!==g.title&&uni.report("title",g.title)}));const P=S.$router.hasHistory();function A(){P?S.$router.back():S.$router.go("/pages/index/index"),s("clickLeft")}function B(){s("clickTitle")}return(t,a)=>{const s=p,g=l(o("su-status-bar"),ze),I=b,T=l(o("uni-search-bar"),Ne);return n(),r(s,{class:C(["uni-navbar",{"uni-dark":e.dark}])},{default:i((()=>[c(s,{class:C([{"uni-navbar--fixed":e.fixed,"uni-navbar--shadow":e.shadow,"uni-navbar--border":e.border},"uni-navbar__content"])},{default:i((()=>[c(s,{class:C(["fixed-bg",[e.opacity?"":e.opacityBgUi]])},null,8,["class"]),e.statusBar?(n(),r(g,{key:0})):m("",!0),c(s,{style:u({color:v.value,height:w.value,background:e.backgroundColor}),class:"uni-navbar__header"},{default:i((()=>[c(s,{class:"uni-navbar__header-btns uni-navbar__header-btns-left",style:u({width:_.value})},{default:i((()=>[d(t.$slots,"left",{},(()=>[e.leftIcon.length>0?(n(),r(s,{key:0,class:"uni-navbar__content_view"},{default:i((()=>[c(s,{class:"icon-box ss-flex"},{default:i((()=>[c(s,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:A},{default:i((()=>[k(P)?(n(),r(I,{key:0,class:"sicon-back"})):(n(),r(I,{key:1,class:"sicon-home"}))])),_:1}),c(s,{class:"line"}),c(s,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:k(U)},{default:i((()=>[c(I,{class:"sicon-more"})])),_:1},8,["onClick"])])),_:1})])),_:1})):m("",!0),"left"===e.titleAlign&&e.title.length&&"WechatOfficialAccount"!==k(S).$platform.name?(n(),r(s,{key:1,class:C([{"uni-navbar-btn-icon-left":!e.leftIcon.length>0},"uni-navbar-btn-text"])},{default:i((()=>[c(I,{style:u({color:v.value,fontSize:"18px"})},{default:i((()=>[h(f(e.title),1)])),_:1},8,["style"])])),_:1},8,["class"])):m("",!0)]),!0)])),_:3},8,["style"]),"search"===e.tools?(n(),r(s,{key:0,class:"ss-flex-1"},{default:i((()=>[d(t.$slots,"center",{},(()=>[c(T,{class:"ss-flex-1 search-box",radius:20,placeholder:"请输入关键词",cancelButton:"none",modelValue:y.value,"onUpdate:modelValue":a[0]||(a[0]=e=>y.value=e),onConfirm:x},null,8,["modelValue"])]),!0)])),_:3})):(n(),r(s,{key:1,class:"uni-navbar__header-container",onClick:B},{default:i((()=>[d(t.$slots,"center",{},(()=>["title"===e.tools&&"center"===e.titleAlign&&e.title.length?(n(),r(s,{key:0,class:"uni-navbar__header-container-inner"},{default:i((()=>[c(I,{style:u({color:v.value,fontSize:"36rpx"}),class:"ss-line-1"},{default:i((()=>[h(f(e.title),1)])),_:1},8,["style"])])),_:1})):m("",!0)]),!0)])),_:3}))])),_:3},8,["style"])])),_:3},8,["class"]),e.placeholder?(n(),r(s,{key:0,class:"uni-navbar__placeholder"},{default:i((()=>[e.statusBar?(n(),r(g,{key:0})):m("",!0),c(s,{class:"uni-navbar__placeholder-view",style:u({height:w.value})},null,8,["style"])])),_:1})):m("",!0)])),_:3},8,["class"])}}},[["__scopeId","data-v-c05a9774"]]),Re=_e({__name:"navbar",props:{sticky:Boolean,zIndex:{type:Number,default:100},back:{type:Boolean,default:!0},backtext:{type:String,default:""},bg:{type:String,default:"bg-white"},status:{type:String,default:""},alway:{type:Boolean,default:!0},opacity:{type:Boolean,default:!1},opacityBg:{type:Boolean,default:!1},noFixed:{type:Boolean,default:!1},ui:{type:String,default:""},capsule:{type:Boolean,default:!1},stopBack:{type:Boolean,default:!1},placeholder:{type:[Boolean],default:!0},bgStyles:{type:Object,default(){}}},emits:["navback"],setup(e,{emit:t}){const a=y({statusCur:"",capsuleStyle:{},capsuleBack:{}}),s=S.$platform.device.statusBarHeight,h=S.$platform.navbar,f=e;D((()=>{m()}));const m=()=>{a.capsuleStyle={width:S.$platform.capsule.width+"px",height:S.$platform.capsule.height+"px",margin:"0 "+(S.$platform.device.windowWidth-S.$platform.capsule.right)+"px"},a.capsuleBack=a.capsuleStyle};return(e,t)=>{const a=l(o("su-status-bar"),ze),m=p,g=l(o("su-fixed"),Ee);return n(),r(g,{noFixed:f.noFixed,alway:f.alway,bgStyles:f.bgStyles,val:0,index:f.zIndex,noNav:"",bg:f.bg,ui:f.ui,opacity:f.opacity,placeholder:f.placeholder,sticky:f.sticky},{default:i((()=>[c(a),c(m,{class:"ui-navbar-box"},{default:i((()=>[c(m,{class:C(["ui-bar",""==f.status?"text-a":"light"==f.status?"text-white":"text-black"]),style:u([{height:k(h)-k(s)+"px"}])},{default:i((()=>[d(e.$slots,"item",{},void 0,!0),c(m,{class:"right"})])),_:3},8,["class","style"])])),_:3})])),_:3},8,["noFixed","alway","bgStyles","index","bg","ui","opacity","placeholder","sticky"])}}},[["__scopeId","data-v-1b1aaaf2"]]),je=_e({__name:"navbar-item",props:{data:{type:Object,default:()=>({})},width:{type:String,default:"1px"}},setup(e){const t=I((()=>S.$platform.capsule.height));return(a,s)=>{const d=p,g=N,b=l(o("s-search-block"),Fe);return n(),r(d,{class:"ss-flex ss-col-center"},{default:i((()=>["text"===e.data.type?(n(),r(d,{key:0,class:"nav-title inline",style:u([{color:e.data.textColor,width:e.width}])},{default:i((()=>[h(f(e.data.text),1)])),_:1},8,["style"])):m("",!0),"image"===e.data.type?(n(),r(d,{key:1,style:u([{width:e.width}]),class:"menu-icon-wrap ss-flex ss-row-center ss-col-center",onClick:s[0]||(s[0]=t=>k(S).$router.go(e.data.url))},{default:i((()=>[c(g,{class:"nav-image",src:k(S).$url.cdn(e.data.src),mode:"aspectFit"},null,8,["src"])])),_:1},8,["style"])):m("",!0),"search"==e.data.type?(n(),r(d,{key:2,class:"ss-flex-1",style:u([{width:e.width}])},{default:i((()=>[c(b,{placeholder:e.data.placeholder||"搜索关键字",radius:e.data.borderRadius,elBackground:"#fff",height:t.value,width:e.width,onClick:s[1]||(s[1]=e=>k(S).$router.go("/pages/index/search"))},null,8,["placeholder","radius","height","width"])])),_:1},8,["style"])):m("",!0)])),_:1})}}},[["__scopeId","data-v-89a97bd5"]]),He=_e({__name:"s-custom-navbar",props:{data:{type:Object,default:()=>({})},showLeftButton:{type:Boolean,default:!1}},setup(e){const t=e,a=S.$router.hasHistory(),s=I((()=>("inner"!=t.data.mode||!t.data.alway)&&("normal"!=t.data.mode&&void 0))),l=I((()=>t.data.list?t.data.list.app:[])),o=S.$platform.device.windowWidth,d=I((()=>{if(k(l).length){return(o-90)/8}})),h=e=>({width:e.width*d.value+10*(e.width-1)+"px",left:e.left*d.value+10*(e.left+1)+"px","border-radius":e.borderRadius+"px"}),f=I((()=>"inner"!==t.data.mode||Boolean(t.data.alwaysShow))),g=I((()=>"normal"!==t.data.mode&&(!t.showLeftButton&&"inner"===t.data.mode))),y=I((()=>"normal"===t.data.mode)),x=I((()=>{if(t.data.type)return{background:"color"==t.data.type?t.data.color:`url(${S.$url.cdn(t.data.src)}) no-repeat top center / 100% 100%`}}));function P(){a?S.$router.back():S.$router.go("/pages/index/index")}function A(){U()}return(t,o)=>{const d=b,S=p;return n(),r(Re,{alway:f.value,back:!1,bg:"",placeholder:y.value,bgStyles:x.value,opacity:g.value,sticky:s.value},{item:i((()=>[c(S,{class:"nav-box"},{default:i((()=>[e.showLeftButton?(n(),r(S,{key:0,class:"nav-icon"},{default:i((()=>[c(S,{class:C(["icon-box ss-flex",{"inner-icon-box":"inner"==e.data.mode}])},{default:i((()=>[c(S,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:P},{default:i((()=>[k(a)?(n(),r(d,{key:0,class:"sicon-back"})):(n(),r(d,{key:1,class:"sicon-home"}))])),_:1}),c(S,{class:"line"}),c(S,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:A},{default:i((()=>[c(d,{class:"sicon-more"})])),_:1})])),_:1},8,["class"])])),_:1})):m("",!0),(n(!0),v(w,null,_(l.value,((e,t)=>(n(),r(S,{class:C(["nav-item",[{"ss-flex ss-col-center ss-row-center":"search"!==e.type}]]),key:t,style:u([h(e)])},{default:i((()=>[c(je,{data:e,width:h(e).width},null,8,["data","width"])])),_:2},1032,["style","class"])))),128))])),_:1})])),_:1},8,["alway","placeholder","bgStyles","opacity","sticky"])}}},[["__scopeId","data-v-6478786c"]]),We=_e({__name:"su-inner-navbar",props:{zIndex:{type:Number,default:100},title:{type:String,default:""},bg:{type:String,default:"bg-white"},alway:{type:Boolean,default:!0},opacity:{type:Boolean,default:!0},noFixed:{type:Boolean,default:!0},ui:{type:String,default:""},capsule:{type:Boolean,default:!1},stopBack:{type:Boolean,default:!1},placeholder:{type:[Boolean],default:!1},bgStyles:{type:Object,default(){}}},emits:["navback","clickLeft"],setup(e,{emit:t}){const a=y({statusCur:"",capsuleStyle:{},capsuleBack:{},isDark:!0}),s=S.$platform.device.statusBarHeight,m=S.$platform.navbar,g=e,v=t,w=S.$router.hasHistory();function _(){w?S.$router.back():S.$router.go("/pages/index/index"),v("clickLeft")}function x(){U()}D((()=>{P()})),A((e=>{let t=e.scrollTop;a.isDark=t<S.$platform.navbar}));const P=()=>{a.capsuleStyle={width:S.$platform.capsule.width+"px",height:S.$platform.capsule.height+"px"},a.capsuleBack=a.capsuleStyle};return(t,y)=>{const v=l(o("su-status-bar"),ze),S=b,P=p,I=l(o("su-fixed"),Ee);return n(),r(I,{noFixed:g.noFixed,alway:g.alway,bgStyles:g.bgStyles,val:0,index:g.zIndex,noNav:"",bg:g.bg,ui:g.ui,opacity:g.opacity,placeholder:g.placeholder},{default:i((()=>[c(v),c(P,{class:"ui-navbar-box"},{default:i((()=>[c(P,{class:C(["ui-bar ss-p-x-20",a.isDark?"text-white":"text-black"]),style:u([{height:k(m)-k(s)+"px"}])},{default:i((()=>[c(P,{class:"icon-box ss-flex"},{default:i((()=>[c(P,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:_},{default:i((()=>[k(w)?(n(),r(S,{key:0,class:"sicon-back"})):(n(),r(S,{key:1,class:"sicon-home"}))])),_:1}),c(P,{class:"line"}),c(P,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:x},{default:i((()=>[c(S,{class:"sicon-more"})])),_:1})])),_:1}),d(t.$slots,"center",{},(()=>[c(P,{class:"center navbar-title"},{default:i((()=>[h(f(e.title),1)])),_:1})]),!0)])),_:3},8,["class","style"])])),_:3})])),_:3},8,["noFixed","alway","bgStyles","index","bg","ui","opacity","placeholder"])}}},[["__scopeId","data-v-d940a794"]]);const qe=_e({name:"su-tabbar-item",props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"},name:{type:[String,Number,null],default:""},icon:{icon:String,default:""},badge:{type:[String,Number,null],default:""},dot:{type:Boolean,default:!1},text:{type:String,default:""},badgeStyle:{type:[Object,String],default:""},isCenter:{type:Boolean,default:!1},centerImage:{type:String,default:""}},data:()=>({isActive:!1,addStyle:F,parentData:{value:null,activeColor:"",color:""},parent:{}}),setup(){const{t:e}=E();return{t:e}},created(){this.init()},methods:{getParentData(e=""){this.parent||(this.parent={}),this.parent=z.call(this,e),this.parent.children&&-1===this.parent.children.indexOf(this)&&this.parent.children.push(this),this.parent&&this.parentData&&Object.keys(this.parentData).map((e=>{this.parentData[e]=this.parent[e]}))},init(){this.updateParentData(),this.parent||console.log("u-tabbar-item必须搭配u-tabbar组件使用");const e=this.parent.children.indexOf(this);this.isActive=(this.name.split("?")[0]||e)===this.parentData.value},updateParentData(){this.getParentData("su-tabbar")},updateFromParent(){this.init()},clickHandler(){this.$nextTick((()=>{const e=this.parent.children.indexOf(this),t=this.name||e;t!==this.parent.value&&this.parent.$emit("change",t),this.$emit("click",t)}))}}},[["render",function(e,t,a,s,l,o){const m=N,g=p,y=b;return n(),r(g,{class:"u-tabbar-item",style:u([l.addStyle(a.customStyle)])},{default:i((()=>[a.isCenter?(n(),r(g,{key:0,class:"tabbar-center-item"},{default:i((()=>[c(m,{class:"center-image",src:a.centerImage,mode:"aspectFill"},null,8,["src"])])),_:1})):(n(),v(w,{key:1},[c(g,{class:"u-tabbar-item__icon"},{default:i((()=>[a.icon?(n(),r(m,{key:0,name:a.icon,color:l.isActive?l.parentData.activeColor:l.parentData.color,size:20},null,8,["name","color"])):(n(),v(w,{key:1},[l.isActive?d(e.$slots,"active-icon",{key:0},void 0,!0):d(e.$slots,"inactive-icon",{key:1},void 0,!0)],64))])),_:3}),d(e.$slots,"text",{},(()=>[c(y,{class:"u-tabbar-item__text",style:u({color:l.isActive?l.parentData.activeColor:l.parentData.color})},{default:i((()=>[h(f(s.t(`common.${a.text}`)),1)])),_:1},8,["style"])]),!0)],64))])),_:3},8,["style"])}],["__scopeId","data-v-85e6e9a8"]]);const Ge=_e({name:"su-tabbar",props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"},value:{type:[String,Number,null],default:""},safeAreaInsetBottom:{type:Boolean,default:!0},border:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:10},activeColor:{type:String,default:"#1989fa"},inactiveColor:{type:String,default:"#7d7e80"},fixed:{type:Boolean,default:!0},placeholder:{type:Boolean,default:!0},midTabBar:{type:Boolean,default:!1}},data:()=>({placeholderHeight:0,safeBottomHeight:S.$platform.device.safeAreaInsets.bottom}),computed:{tabbarStyle(){const e={zIndex:this.zIndex};return O(e,F(this.customStyle))},updateChild(){return[this.value,this.activeColor,this.inactiveColor]},updatePlaceholder(){return[this.fixed,this.placeholder]}},watch:{updateChild(){this.updateChildren()},updatePlaceholder(){this.setPlaceholderHeight()}},created(){this.children=[]},mounted(){this.setPlaceholderHeight()},methods:{updateChildren(){this.children.length&&this.children.map((e=>e.updateFromParent()))},getRect(e,t){return new Promise((a=>{$().in(this)[t?"selectAll":"select"](e).boundingClientRect((e=>{t&&Array.isArray(e)&&e.length&&a(e),!t&&e&&a(e)})).exec()}))},async setPlaceholderHeight(){this.fixed&&this.placeholder&&(await R(20),this.getRect(".u-tabbar__content").then((({height:e=50})=>{this.placeholderHeight=e})))}}},[["render",function(e,t,a,s,l,o){const h=p;return n(),r(h,{class:"u-tabbar"},{default:i((()=>[c(h,{class:C(["u-tabbar__content",[a.border&&"u-border-top",a.fixed&&"u-tabbar--fixed",{"mid-tabbar":a.midTabBar}]]),ref:"u-tabbar__content",onTouchmove:t[0]||(t[0]=x((()=>{}),["stop","prevent"])),style:u([o.tabbarStyle])},{default:i((()=>[c(h,{class:"u-tabbar__content__item-wrapper"},{default:i((()=>[d(e.$slots,"default",{},void 0,!0)])),_:3}),a.safeAreaInsetBottom?(n(),r(h,{key:0,style:u([{height:l.safeBottomHeight+"px"}])},null,8,["style"])):m("",!0)])),_:3},8,["class","style"]),a.placeholder?(n(),r(h,{key:0,class:"u-tabbar__placeholder",style:u({height:l.placeholderHeight+"px"})},null,8,["style"])):m("",!0)])),_:3})}],["__scopeId","data-v-cc8282eb"]]),Qe=_e({__name:"s-tabbar",props:{path:String,default:""},setup(e){const t=I((()=>{var e;return null==(e=S.$store("app").template.basic)?void 0:e.tabbar})),a=I((()=>{const e=t.value.style;return"color"===e.bgType?{background:e.bgColor}:"img"===e.bgType?{background:`url(${S.$url.cdn(e.bgImg)}) no-repeat top center / 100% auto`}:void 0})),s=e=>2===k(t).mode&&(k(t).items%2>0&&Math.ceil(k(t).items.length/2)===e+1);return(u,d)=>{var h,f;const g=N,b=l(o("su-tabbar-item"),qe),y=l(o("su-tabbar"),Ge),x=p;return(null==(f=null==(h=t.value)?void 0:h.items)?void 0:f.length)>0?(n(),r(x,{key:0,class:"u-page__item"},{default:i((()=>[c(y,{value:e.path,fixed:!0,placeholder:!0,safeAreaInsetBottom:!0,inactiveColor:t.value.style.color,activeColor:t.value.style.activeColor,midTabBar:2===t.value.mode,customStyle:a.value},{default:i((()=>[(n(!0),v(w,null,_(t.value.items,((e,t)=>(n(),r(b,{key:e.text,text:e.text,name:e.url,isCenter:s(t),centerImage:k(S).$url.cdn(e.iconUrl),onClick:t=>k(S).$router.go(e.url)},{"active-icon":i((()=>[c(g,{class:"u-page__item__slot-icon",src:k(S).$url.cdn(e.activeIconUrl)},null,8,["src"])])),"inactive-icon":i((()=>[c(g,{class:"u-page__item__slot-icon",src:k(S).$url.cdn(e.iconUrl)},null,8,["src"])])),_:2},1032,["text","name","isCenter","centerImage","onClick"])))),128))])),_:1},8,["value","inactiveColor","activeColor","midTabBar","customStyle"])])),_:1})):m("",!0)}}},[["__scopeId","data-v-2389827b"]]),Xe=_e({__name:"s-wallet-modal",setup(e){j((e=>({"8fd6975e":k(t)})));const t=S.$url.css("/static/images/sign.png"),a=I((()=>S.$store("modal").getWallet)),s=I((()=>S.$store("modal").getWalletInfo));return(e,t)=>{const u=b,d=p,g=P,y=l(o("su-popup"),ke);return n(),r(y,{show:a.value,onClose:k(H),type:"center",round:"10"},{default:i((()=>[c(d,{class:"model-box ss-flex-col"},{default:i((()=>[c(d,{class:"ss-m-t-56 ss-flex-col ss-col-center"},{default:i((()=>[c(u,{class:"cicon-check-round"}),s.value.msg?(n(),r(d,{key:1,class:"model-title ss-flex ss-col-center ss-m-y-15"},{default:i((()=>[h(f(s.value.msg),1)])),_:1})):(n(),v(w,{key:0},[c(d,{class:"score-title"},{default:i((()=>[h("恭喜")])),_:1}),s.value.points&&"null"!==s.value.points&&k(Le)(s.value.points)>0||s.value.socialStatus&&"null"!==s.value.socialStatus?(n(),v(w,{key:0},[s.value.points&&k(Le)(s.value.points)>0?(n(),r(d,{key:0,class:"model-title ss-flex ss-col-center ss-m-t-15 ss-font-35"},{default:i((()=>[h(" 获得佣金:"+f(k(Le)(s.value.points)),1)])),_:1})):m("",!0),s.value.socialStatus?(n(),r(d,{key:1,class:"model-title ss-flex ss-col-center ss-m-t-15 ss-font-35"},{default:i((()=>[h(" 获得身价:"+f(s.value.socialStatus),1)])),_:1})):m("",!0)],64)):(n(),r(d,{key:1,class:"model-title ss-flex ss-col-center ss-m-y-15"},{default:i((()=>[h(" 下单成功 ")])),_:1}))],64))])),_:1}),c(d,{class:"model-bg ss-flex-col ss-col-center ss-row-right"},{default:i((()=>[c(d,{class:"ss-m-b-40"},{default:i((()=>[c(g,{class:"ss-reset-button confirm-btn",onClick:t[0]||(t[0]=e=>{k(H)()})},{default:i((()=>[h("确认")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-e42e718e"]]),Ze=_e({__name:"s-signup-modal",setup(e){j((e=>({"42c80bd2":k(t)})));const t=S.$url.css("/static/images/sign.png"),a=I((()=>S.$store("modal").signUp)),s=I((()=>S.$store("modal").signUpInfo));return W((()=>a.value),(e=>{e&&setTimeout(q,3e3)})),(e,t)=>{const u=b,d=p,g=P,y=l(o("su-popup"),ke);return n(),r(y,{show:a.value,onClose:k(q),type:"center",round:"10"},{default:i((()=>[c(d,{class:"model-box ss-flex-col"},{default:i((()=>[c(d,{class:"ss-m-t-56 ss-flex-col ss-col-center"},{default:i((()=>{var e;return[c(u,{class:"cicon-check-round"}),c(d,{class:"score-title"},{default:i((()=>[h("恭喜!自动签到成功!")])),_:1}),c(d,{class:"model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30"},{default:i((()=>{var e;return[h(" 获得每日签到"+f(null==(e=s.value)?void 0:e.social)+"点身价 ",1)]})),_:1}),(null==(e=s.value)?void 0:e.upgradeOrNot)?(n(),r(d,{key:0,class:"model-title ss-flex ss-col-center ss-m-b-30"},{default:i((()=>{var e;return[h(" 您已升级等级为"+f(null==(e=s.value)?void 0:e.socialStatusName),1)]})),_:1})):m("",!0)]})),_:1}),c(d,{class:"model-bg ss-flex-col ss-col-center ss-row-right"},{default:i((()=>[c(d,{class:"ss-m-b-40"},{default:i((()=>[c(g,{class:"ss-reset-button confirm-btn",onClick:t[0]||(t[0]=e=>{k(q)()})},{default:i((()=>[h("确认")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-e22bfeb0"]]);var Ke,Ye={exports:{}};Ke=Ye,function(){var a;const s=b(typeof uni)?"uni":b(typeof window)&&b(typeof document)?"web":"node",l="uni"==s,o="node"==s,n="web"==s,r={},i={},c=Object.freeze(["init","initAsyncDrawMode","initArgs","initCanvas","handleCtx","initData","draw","toImage","updateCanvasWH","clear","restoreAsyncDrawMode"]),u=Object.freeze(["setPaintbrush","setPaintbrushProp","resetPaintbrush","savePaintbrush","restorePaintbrush","calcText","calcImg","measureText","loadImage"]),d=Object.freeze(["setPaintbrush","setPaintbrushProp","resetPaintbrush","savePaintbrush","restorePaintbrush","drawText","drawStraightLine","drawDoubleStraightLine","drawDotted","drawDottedStraightLine","drawLine","drawTextDecoration","drawImg","drawQrCode","setCircle","setRect"]),h=Object.freeze(["setPaintbrush","setPaintbrushProp","resetPaintbrush","savePaintbrush","restorePaintbrush","drawText","drawStraightLine","drawDoubleStraightLine","drawDotted","drawDottedStraightLine","drawLine","drawTextDecoration","drawImg","drawQrCode","setCircle","setRect","calcText","calcImg","measureText","loadImage","drawArray","drawItem"]),f=Object.freeze(["drawText","drawImg"]),m=Object.freeze(["drawImage","putImageData","getImageData","createImageData","addPage","save","restore","rotate","translate","transform","getTransform","resetTransform","setTransform","isPointInPath","scale","clip","fill","stroke","fillText","strokeText","fillRect","strokeRect","clearRect","rect","measureText","moveTo","lineTo","bezierCurveTo","quadraticCurveTo","beginPath","closePath","arc","arcTo","ellipse","setLineDash","getLineDash","createPattern","createLinearGradient","createRadialGradient"]);let p,g=1;function b(e){return"undefined"!=String(e)}function y(e){return!((e||0==e)&&!["undefined","null"].includes(String(e)))}const v=class{constructor(e,t){((e,t,a)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,a)})(this,a,void 0),this._id=g++,i[this._id]=t,e&&this.init(e)}init(t={}){this.initArgs(t).initData().initCanvas().handleCtx().resetPaintbrush(),!0===this._data.asyncDrawMode&&(((t,a,s,l)=>{e(t,a,"write to private field"),l?l.call(t,s):a.set(t,s)})(this,a,new v({asyncDrawMode:!1})),this.initAsyncDrawMode())}initAsyncDrawMode(){if(l)return;const e=this._data.ctxMethods,t=[...new Set([...h,...e])];for(let a=0;a<t.length;a++){const e=t[a];this.handleAsyncDrawModeItem(e)}}handleAsyncDrawModeItem(e){if(!l)if(c.includes(e))console.log("白名单跳过");else if("function"==typeof this[e]){this._data.nMethods[e]||(this._data.nMethods[e]=this[e]);let s=this;this[e]=function(){let l;return u.includes(e)&&(l=t(s,a)[e](...arguments)),l&&l!==s&&l!==t(s,a)?l:((d.includes(e)||s._data.ctxMethods.includes(e))&&s._data.asyncDrawQueue.push({method:e,args:arguments}),f.includes(e)?t(s,a)[e](...arguments):void 0)}}}restoreAsyncDrawMode(){if(l)return;const e=this._data.nMethods;for(const t in e)this[t]=e[t]}initArgs(e={}){return this._args=e,this}initCanvas(){const e=function(e,t){if(l&&!t.canvasId)throw new Error("canvasId 不能为空");let a,o={};switch(s){case"uni":a=Z(t.canvasId,e),o.canvas=a,o.ctx=a;break;case"web":a=(null==t?void 0:t.canvasId)?document.getElementById(null==t?void 0:t.canvasId):document.createElement("canvas"),a.width=(null==t?void 0:t.width)||10,a.height=(null==t?void 0:t.height)||10,o.canvas=a,o.ctx=a.getContext("2d");break;case"node":a=p.createCanvas((null==t?void 0:t.width)||10,(null==t?void 0:t.height)||10),o.canvas=a,o.ctx=a.getContext("2d")}return o}(i[this._id],this._args);return this.canvas=e.canvas,this.ctx=e.ctx,this}handleCtx(){const e=this.ctx,t=t=>{this._data.ctxMethods.push(t),this[t]=e[t].bind(e)};for(const a in e)"function"==typeof e[a]&&(this[a]||t(a));for(let a=0;a<m.length;a++){const s=m[a];"function"==typeof e[s]&&(this[s]||t(s))}return this}initData(){return this._data={oldPaintbrushProps:{},savedPaintbrushProps:[],font:{fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:10,fontFamily:"sans-serif"},height:this._args.height||10,width:this._args.width||10,whChange:!1,asyncDrawQueue:[],nMethods:{},asyncDrawMode:!(!o&&!n)&&!1!==this._args.asyncDrawMode,ctxMethods:[]},this}setPaintbrush(e={}){!function(e){switch(null==e?void 0:e.textBaseline){case"normal":l&&(e.textBaseline="alphabetic");break;case"hanging":l&&(e.textBaseline="top");break;case"ideographic":l&&(e.textBaseline="bottom")}switch(null==e?void 0:e.textAlign){case"start":e.textAlign="left";break;case"end":e.textAlign="right"}}(e);for(const t in e)this.setPaintbrushProp(t,e[t]);return this}setPaintbrushProp(e,t){if(y(e)||y(t))return;e=function(e){if(!e)return"";const t=e.split("-");for(var a=1;a<t.length;a++)t[a]=t[a].charAt(0).toUpperCase()+t[a].substring(1);return t.join("")}(e);const a=this.ctx;if("font"==e){if(t){if("object"!=typeof t)return void console.warn("font属性需Object格式");for(const e in t)y(t[e])&&delete t[e];const s={...this._data.font,...t};l&&(s.fontSize=Math.round(s.fontSize)),this._data.font=s;const o=this._data.font;this._data.oldPaintbrushProps[e]=o;const n=()=>{a.font=`${o.fontStyle||"normal"} ${o.fontVariant||"normal"} ${o.fontWeight||"normal"} ${o.fontSize??10}px ${o.fontFamily||"sans-serif"}`};n()}}else{this._data.oldPaintbrushProps[e]=t;const s="set"+e[0].toUpperCase()+e.slice(1);"function"==typeof(null==a?void 0:a[s])?a[s](t):a[e]=t}return this}resetPaintbrush(e={}){return this.setPaintbrush({fillStyle:"#000000",strokeStyle:"#000000",shadowColor:"#000000",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineCap:"butt",lineJoin:"miter",lineWidth:1,miterLimit:10,font:this._data.font,textAlign:"start",textBaseline:"top",globalAlpha:1,globalCompositeOperation:"source-over",...e}),this}saveAndSetPaintbrush(e={}){return this.savePaintbrush(),this.setPaintbrush(e),this}savePaintbrush(){return this._data.savedPaintbrushProps.unshift({...this._data.oldPaintbrushProps}),this}restorePaintbrush(){const e=this._data.savedPaintbrushProps.shift();return e&&(this._data.oldPaintbrushProps={...this._data.oldPaintbrushProps,...e}),this.resetPaintbrush({...this._data.oldPaintbrushProps}),this}updateCanvasWH(e={}){var t,a,s;let{width:o,height:n,delay:r}=e,i=null==(t=this._args)?void 0:t.setCanvasWH;return o=o||(null==(a=this._data)?void 0:a.width)||10,n=n||(null==(s=this._data)?void 0:s.height)||10,new Promise(((e,t)=>{if(l){if(!i||"function"!=typeof i)return void t("setCanvasWH异常, uni-app 请在初始化时传入setCanvasWH函数");i({height:n,width:o}),setTimeout((()=>{e()}),r??50)}else this.canvas.height=n,this.canvas.width=o,e()})).then((e=>{this._data.width==o&&this._data.height==n||(this._data.whChange=!0),this._data.width=o,this._data.height=n,this._data.asyncDrawMode||this.resetPaintbrush(this._data.oldPaintbrushProps)}))}clear(){return this.ctx.clearRect(0,0,this._data.width||999999,this._data.height||999999),this}draw(e={}){const{reserve:t}=e;return new Promise(((e,a)=>{if(l){let a=!1;const s=setTimeout((()=>{a?clearTimeout(s):e()}),3e3);this.ctx.draw(t??!1,(()=>{a=!0,clearTimeout(s),e()}))}else if(this._data.asyncDrawMode){!0!==t&&this.clear(),this.restoreAsyncDrawMode(),this.resetPaintbrush();const s=this._data.asyncDrawQueue;new Promise((async(e,t)=>{for(let l=0;l<s.length;l++){const e=s[l];try{const t=this[e.method].call(this,...e.args);"function"==typeof(null==t?void 0:t.then)&&await t}catch(a){return void t(a)}}e()})).then((()=>{this._data.asyncDrawQueue=[],this.initAsyncDrawMode(),e()})).catch((e=>{this.initAsyncDrawMode(),a(e)}))}else e()}))}toImage(e={}){return new Promise(((t,a)=>{if(l){const s=this._args.canvasId;if(!s)return void a("canvasId不存在");G({...e,canvasId:s,success:a=>{var s;null==(s=e.success)||s.call(e,a),t(a.tempFilePath)},fail:t=>{var s;null==(s=e.fail)||s.call(e,t),a(t)}},i[this._id])}else t(this.canvas.toDataURL("image/"+(["jpg","jpeg"].includes(e.fileType)?"jpeg":"png"),e.quality??1))}))}calcText(e={}){const t=e.line||-1;return new Promise(((a,s)=>{try{let s=function(t,a){let s=0;const o=l(t).width;if(a){if(o<e.maxWidth||t.length<2)return{index:t.length,ellipsis:!1,width:o};s=l("...").width}const n=o+s;if(n<e.maxWidth||t.length<2)return{index:t.length,ellipsis:!1,width:n};let r,i=!0,c=Math.floor((t.length+1)/2),u=1,d="";for(;i;){if(c<=1){i=!1;break}if(c>t.length){c=t.length,i=!1;break}const a=t.substr(0,c);r=l(a).width+s,r>e.maxWidth?(t=a,"xy"==d&&Math.abs(u-c)<1?i=!1:(d="dy",u=c,c=Math.floor((a.length+1)/2))):r==e.maxWidth||c<=1||Math.abs(u-c)<1?i=!1:(d="xy",u=c,c+=Math.floor((t.length-c)/2))}return{index:c,ellipsis:a,width:r}};this.saveAndSetPaintbrush({...e.paintbrushProps||{}});const l=this.measureText;let o=[],n=e.val,r=0;const i={...this._data.font};if(e.maxWidth){let a=0;for(;n.length;){const l=t>0&&o.length+1>=t,{index:r,ellipsis:c,width:u}=s(n,l),d=n.substr(0,r);o.push({...e,val:d,y:a?e.y+(i.fontSize+(e.lineHeight||0))*a:e.y,width:u}),l?(c&&(o[o.length-1].val+="..."),n=""):n=n.slice(r),a++}r=1==o.length?o[0].width:o.length>1?e.maxWidth:0}else o=[e],r=l(e.val).width;this.restorePaintbrush(),a({...e,calcTexts:o,_calc:!0,left:e.x,top:e.y,right:e.x+r,bottom:o[o.length-1].y+i.fontSize,width:r,height:o[o.length-1].y+i.fontSize-e.y,fontSize:i.fontSize})}catch(l){s(l)}}))}drawText(e={}){return new Promise((async(t,a)=>{try{if(!e.val)return console.warn("需绘制的文本为空"),void t();this.saveAndSetPaintbrush({...e.paintbrushProps||{}});const a=e=>{this.fillText(e.val,e.x,e.y)},s=e=>{a(e),e.textDecoration&&this.drawTextDecoration(e)},l=e._calc?e:await this.calcText(e);for(let e=0;e<l.calcTexts.length;e++)s(l.calcTexts[e]);this.restorePaintbrush(),t(l)}catch(s){a(s)}}))}drawStraightLine(e={}){const{x1:t,y1:a,x2:s,y2:l,paintbrushProps:o}=e,n=this.ctx;n.beginPath(),n.moveTo(t,a),n.lineTo(s,l),this.saveAndSetPaintbrush(o||{}),n.stroke(),this.restorePaintbrush()}drawDoubleStraightLine(e={}){let{gap:t}=e;t=t??1,this.drawStraightLine(e),this.drawStraightLine({...e,y1:e.y1+t,y2:e.y2+t})}drawDotted(e={}){this.setCircle(e),e.clip&&(e.clip=!1),this.saveAndSetPaintbrush(e.paintbrushProps||{}),this.ctx.fill(),this.restorePaintbrush()}drawDottedStraightLine(e={}){let{x1:t,x2:a,y1:s,y2:l,gap:o,width:n,paintbrushProps:r}=e;a-=n,o=o||1;const i=Math.sqrt(Math.pow(t-a,2)+Math.pow(s-l,2)),c=function(e,t,a,s,l,o){let n,r,i,c,u,d=[];if(e===a)n=e+(s-t)*o,r=t+(s-t)/2,i=(e-n)**2+(t-r)**2;else if(t===s)n=e+(a-e)/2,r=t-(a-e)*o,i=(e-n)**2+(t-r)**2;else{let l=(e+a)/2,d=(t+s)/2;c=(a-e)/(t-s);let h=d-c*l,f=1+c**2,m=2*c*(h-d)-2*l,p=l**2+(h-d)**2-((a-e)**2+(s-t)**2)*o**2;u=-1/c,n=(-m+Math.sqrt(m**2-4*f*p)*(u>0&&a>e||u<0&&a<e?1:-1))/(2*f),r=c*n+h,i=(e-n)**2+(t-r)**2}if(e===a||Math.abs(u)>1){let e=(s-t)/(l+1);for(let a=0;a<l;a++){let l=t+e*(a+1),o=Math.sqrt(i-(l-r)**2)*(s>t?-1:1)+n;d.push([o,l])}}else{let t=(a-e)/(l+1);for(let s=0;s<l;s++){let l=e+t*(s+1),o=Math.sqrt(i-(l-n)**2)*(a>e?1:-1)+r;d.push([l,o])}}return d}(t,s,a,l,Math.floor((i-o)/(n+o)),9999999999);this.saveAndSetPaintbrush(r),this.drawDotted({x:t,y:s,d:n});for(let u=0;u<c.length;u++)this.drawDotted({x:c[u][0],y:c[u][1],d:n});this.drawDotted({x:a,y:l,d:n}),this.restorePaintbrush()}drawLine(e={}){const{style:t}=e;switch(t){case"double":e.gap=1.5*(e.width||1),this.drawDoubleStraightLine(e);break;case"solide":this.drawStraightLine(e);break;case"dotted":e.gap=1.5*(e.gap||1),e.paintbrushProps={fillStyle:e.color},this.drawDottedStraightLine(e)}}drawTextDecoration(e={}){this.savePaintbrush();const t=this._data.oldPaintbrushProps,a=this.measureText(e.val).width,s=e.textDecoration,l=s.line||"line-through",o=s.color||e.color||t.fillStyle||"#000000",n=s.thickness||s.width||!!e.fontSize&&.1*e.fontSize||1,r=s.style||"solide",i=s.offset||0,c=s.gap??1,u=e.fontSize||this._data.font.fontSize;this.setPaintbrush({lineWidth:n,strokeStyle:o});let d=0;switch(l){case"line-through":d=e.y+u/2-n/2;break;case"underline":d=e.y+u;break;case"overline":d=e.y}switch(t.textBaseline){case"top":d+=n/2;break;case"bottom":d-=u;break;case"center":d-=u/2}switch(d+=i,l){case"line-through":case"underline":case"overline":this.drawLine({x1:e.x,y1:d,x2:e.x+a,y2:d,style:r,gap:c,width:n,color:o})}this.restorePaintbrush()}drawImg(e={}){return new Promise((async(t,a)=>{try{if(!e.val)return console.warn("需绘制的图片为空"),void t();const a=e._calc?e:await this.calcImg(e);(null==a?void 0:a.drawImageArgs)&&Array.isArray(a.drawImageArgs)&&this.ctx.drawImage(...(null==a?void 0:a.drawImageArgs)||[]),t(a)}catch(s){a(s)}}))}calcImg(e={}){return new Promise((async(t,a)=>{try{if(!e.val)return console.warn("需绘制的图片为空"),void t();const a=await this.loadImage(e.val),s=e.mode||"scaleToFill";let o,n=e.x||0,r=e.y||0,i=e.width||0,c=e.height||0,u=a.width,d=a.height,h=0,f=0;const m=()=>[h,f,u,d,n,r,i,c];switch(s){case"aspectFit":c=a.height/a.width*i,c<e.height?r=Number(e.y)+e.height/2-c/2:(c=e.height,i=a.width/a.height*c,n=Number(e.x)+e.width/2-i/2),o=m();break;case"aspectFill":c=a.height/a.width*i,c<e.height?(c=e.height,h=a.width/a.height*e.height,h=(h-e.width)/h*a.width/2,u=a.width-2*h):(f=(c-e.height)/c*a.height/2,d=a.height-2*f),i=e.width,c=e.height,o=m();break;case"widthFix":c=e.height=a.height/a.width*e.width,o=[n,r,i,c];break;case"heightFix":i=e.width=a.width/a.height*e.height,o=[n,r,i,c];break;default:o=[n,r,i,c]}o.unshift(l?a.toString():a),t({...e,drawImageArgs:[...o],img:a,left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height,_calc:!0})}catch(s){a(s)}}))}drawQrCode(e={}){return new Promise(((t,a)=>{if(!(null==e?void 0:e.val))return console.warn("绘制二维码val为空"),void t();this.savePaintbrush();let s=[],l={text:String(e.val||"")||"",size:Number(e.size||0)||200,background:String(e.background||"")||"#ffffff",foreground:String(e.foreground||"")||"#000000",pdground:String(e.pdground||"")||"#000000",correctLevel:Number(e.correctLevel||0)||3,dx:Number(e.x||0)||0,dy:Number(e.y||0)||0},o=null,n=0;for(var r=0,i=s.length;r<i;r++)if(n=r,s[r].text==l.text&&s[r].text.correctLevel==l.correctLevel){o=s[r].obj;break}n==i&&(o=new _(l.text,l.correctLevel),s.push({text:l.text,correctLevel:l.correctLevel,obj:o}));let c=function(e){let t=e.options;return t.pdground&&(e.row>1&&e.row<5&&e.col>1&&e.col<5||e.row>e.count-6&&e.row<e.count-2&&e.col>1&&e.col<5||e.row>1&&e.row<5&&e.col>e.count-6&&e.col<e.count-2)?t.pdground:t.foreground},u=o.getModuleCount(),d=l.size,h=d/u,f=d/u;for(let e=0;e<u;e++)for(let t=0;t<u;t++){let a=(t+1)*h-t*h,s=(e+1)*h-e*h,n=c({row:e,col:t,count:u,options:l});this.setPaintbrush({fillStyle:o.modules[e][t]?n:l.background}),this.ctx.fillRect(l.dx+t*h,l.dy+e*f,a,s)}this.restorePaintbrush(),t({...e,height:e.size,width:e.size,left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.size})}))}setCircle(e={}){const t=this.ctx;let{x:a,y:s,d:l,mode:o}=e;o=o||"leftTop";const n=l/2;switch(e.clip&&t.save(),t.beginPath(),o){case"leftTop":t.arc(a+n,s+n,n,0,2*Math.PI);break;case"center":t.arc(a,s,n,0,2*Math.PI)}return t.closePath(),e.clip&&t.clip(),this}setRect(e={}){const t=this.ctx,{x:a,y:s,r:l,height:o,width:n}=e;return e.clip&&t.save(),t.beginPath(),l&&l>0?(t.arc(a+l,s+l,l,1*Math.PI,1.5*Math.PI),t.lineTo(a+n-l,s),t.arc(a+n-l,s+l,l,1.5*Math.PI,0),t.lineTo(a+n,s+o-l),t.arc(a+n-l,s+o-l,l,0,.5*Math.PI),t.lineTo(a+l,s+o),t.arc(a+l,s+o-l,l,.5*Math.PI,1*Math.PI),t.lineTo(a,s+l)):(t.moveTo(a,s),t.lineTo(a+n,s),t.lineTo(a+n,s+o),t.lineTo(a,s+o),t.lineTo(a,s)),t.closePath(),e.clip&&t.clip(),this}loadImage(e){return new Promise((async(t,a)=>{if(!e)return console.warn("加载图片url为空"),void t();if(r[e])return void t(r[e]);let l;try{switch(s){case"uni":l=await new Promise(((t,a)=>{if(e._loaded)t(e);else if(~e.indexOf("data:image")){let s=e,l={};k.base64ToPath(e).then((e=>{s=e,Q({src:s,success:e=>{l=e;const a=new String(s);for(const t in l)a[t]=l[t];a._loaded=!0,t(a)},fail:e=>a(e)})})).catch((e=>{a(e)}))}else"http"==e.substr(0,4)?X({url:e,success:({tempFilePath:e})=>{Q({src:e,success:a=>{const s=new String(e);for(const e in a)s[e]=a[e];s._loaded=!0,t(s)},fail:e=>a(e)})},fail:e=>a(e)}):Q({src:e,success:a=>{const s=new String(e);for(const e in a)s[e]=a[e];s._loaded=!0,t(s)},fail:e=>a(e)})}));break;case"web":l=await new Promise(((t,a)=>{if("string"!=typeof e)return void t(e);const s=new Image;s.onload=()=>{t(s)},s.onerror=e=>{a(e)},s.src=e}));break;case"node":l=await new Promise(((t,a)=>{"string"==typeof e?p.loadImage(e).then((e=>{t(e)})).catch((e=>{a(e)})):t(e)}))}}catch(o){a(o)}r[e]=l,t(l)}))}drawArray(e){return new Promise((async(t,a)=>{try{if(!e)return void a("drawArray需绘制参数不存在");if(!Array.isArray(e))return void a("drawArray参数需要是Array");e=[...e].sort(((e,t)=>((null==e?void 0:e.zIndex)??0)-((null==t?void 0:t.zIndex)??0)));const s=[];for(let t=0;t<e.length;t++){const a=e[t];let l;switch(typeof a){case"function":l=a(),"function"==typeof(null==l?void 0:l.then)&&(l=await l);break;case"object":l=Array.isArray(a)?await this.drawArray(a):await this.drawItem(a)}s.push({item:a,result:l})}t(s)}catch(s){a(s)}}))}drawItem(e={}){return new Promise((async(t,a)=>{var s,l;try{let a;switch(e.type){case"text":a=await this.drawText(e);break;case"image":a=await this.drawImg(e);break;case"qrcode":a=await this.drawQrCode(e);break;case"method":a=null==(s=this[e.name])?void 0:s.call(this,...e.data?Array.isArray(e.data)?e.data:[e.data]:[]),"function"==typeof(null==a?void 0:a.then)&&(a=await a);break;case"function":a=null==(l=e.val)?void 0:l.call(e),"function"==typeof(null==a?void 0:a.then)&&(a=await a)}t(a)}catch(o){a(o)}}))}drawRichText(e){return new Promise((async(t,a)=>{if(!e)return void a("drawRichText需绘制参数不存在");"string"==typeof e&&(e=x(e));const s=[];try{t({html:e,htmlParses:await function e(t,a){return new Promise((async(a,l)=>{var o;for(let r=0;r<t.length;r++){const a=t[r];if("text"==a.type||a.name,s.push(a),null==(o=a.children)?void 0:o.length){a.__handle=function(e){};try{await e(a.children,a)}catch(n){return void l(n)}}}a(s)}))}(e)})}catch(l){a(l)}}))}};let w=v;a=new WeakMap;var _=function(){function e(e){return e<128?[e]:e<2048?[192+(e>>6),128+(63&e)]:[224+(e>>12),128+(e>>6&63),128+(63&e)]}function t(t,a){this.typeNumber=-1,this.errorCorrectLevel=a,this.modules=null,this.moduleCount=0,this.dataCache=null,this.rsBlocks=null,this.totalDataCount=-1,this.data=t,this.utf8bytes=function(t){for(var a=[],s=0;s<t.length;s++)for(var l=e(t.charCodeAt(s)),o=0;o<l.length;o++)a.push(l[o]);return a}(t),this.make()}t.prototype={constructor:t,getModuleCount:function(){return this.moduleCount},make:function(){this.getRightType(),this.dataCache=this.createData(),this.createQrcode()},makeImpl:function(e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++)this.modules[t]=new Array(this.moduleCount);this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(!0,e),this.typeNumber>=7&&this.setupTypeNumber(!0),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(e,t){for(var a=-1;a<=7;a++)if(!(e+a<=-1||this.moduleCount<=e+a))for(var s=-1;s<=7;s++)t+s<=-1||this.moduleCount<=t+s||(this.modules[e+a][t+s]=0<=a&&a<=6&&(0==s||6==s)||0<=s&&s<=6&&(0==a||6==a)||2<=a&&a<=4&&2<=s&&s<=4)},createQrcode:function(){for(var e=0,t=0,a=null,s=0;s<8;s++){this.makeImpl(s);var l=d.getLostPoint(this);(0==s||e>l)&&(e=l,t=s,a=this.modules)}this.modules=a,this.setupTypeInfo(!1,t),this.typeNumber>=7&&this.setupTypeNumber(!1)},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0,null==this.modules[6][e]&&(this.modules[6][e]=e%2==0))},setupPositionAdjustPattern:function(){for(var e=d.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var a=0;a<e.length;a++){var s=e[t],l=e[a];if(null==this.modules[s][l])for(var o=-2;o<=2;o++)for(var n=-2;n<=2;n++)this.modules[s+o][l+n]=-2==o||2==o||-2==n||2==n||0==o&&0==n}},setupTypeNumber:function(e){for(var t=d.getBCHTypeNumber(this.typeNumber),a=0;a<18;a++){var s=!e&&1==(t>>a&1);this.modules[Math.floor(a/3)][a%3+this.moduleCount-8-3]=s,this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=s}},setupTypeInfo:function(e,t){for(var s=a[this.errorCorrectLevel]<<3|t,l=d.getBCHTypeInfo(s),o=0;o<15;o++){var n=!e&&1==(l>>o&1);o<6?this.modules[o][8]=n:o<8?this.modules[o+1][8]=n:this.modules[this.moduleCount-15+o][8]=n,n=!e&&1==(l>>o&1),o<8?this.modules[8][this.moduleCount-o-1]=n:o<9?this.modules[8][15-o-1+1]=n:this.modules[8][15-o-1]=n}this.modules[this.moduleCount-8][8]=!e},createData:function(){var e=new g,a=this.typeNumber>9?16:8;e.put(4,4),e.put(this.utf8bytes.length,a);for(var s=0,l=this.utf8bytes.length;s<l;s++)e.put(this.utf8bytes[s],8);for(e.length+4<=8*this.totalDataCount&&e.put(0,4);e.length%8!=0;)e.putBit(!1);for(;!(e.length>=8*this.totalDataCount||(e.put(t.PAD0,8),e.length>=8*this.totalDataCount));)e.put(t.PAD1,8);return this.createBytes(e)},createBytes:function(e){for(var t=0,a=0,s=0,l=this.rsBlock.length/3,o=new Array,n=0;n<l;n++)for(var r=this.rsBlock[3*n+0],i=this.rsBlock[3*n+1],c=this.rsBlock[3*n+2],u=0;u<r;u++)o.push([c,i]);for(var h=new Array(o.length),f=new Array(o.length),p=0;p<o.length;p++){var g=o[p][0],b=o[p][1]-g;for(a=Math.max(a,g),s=Math.max(s,b),h[p]=new Array(g),n=0;n<h[p].length;n++)h[p][n]=255&e.buffer[n+t];t+=g;var y=d.getErrorCorrectPolynomial(b),v=new m(h[p],y.getLength()-1).mod(y);for(f[p]=new Array(y.getLength()-1),n=0;n<f[p].length;n++){var w=n+v.getLength()-f[p].length;f[p][n]=w>=0?v.get(w):0}}var _=new Array(this.totalDataCount),x=0;for(n=0;n<a;n++)for(p=0;p<o.length;p++)n<h[p].length&&(_[x++]=h[p][n]);for(n=0;n<s;n++)for(p=0;p<o.length;p++)n<f[p].length&&(_[x++]=f[p][n]);return _},mapData:function(e,t){for(var a=-1,s=this.moduleCount-1,l=7,o=0,n=this.moduleCount-1;n>0;n-=2)for(6==n&&n--;;){for(var r=0;r<2;r++)if(null==this.modules[s][n-r]){var i=!1;o<e.length&&(i=1==(e[o]>>>l&1)),d.getMask(t,s,n-r)&&(i=!i),this.modules[s][n-r]=i,-1==--l&&(o++,l=7)}if((s+=a)<0||this.moduleCount<=s){s-=a,a=-a;break}}}},t.PAD0=236,t.PAD1=17;for(var a=[1,0,3,2],s=0,l=1,o=2,n=3,r=4,i=5,c=6,u=7,d={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;d.getBCHDigit(t)-d.getBCHDigit(d.G15)>=0;)t^=d.G15<<d.getBCHDigit(t)-d.getBCHDigit(d.G15);return(e<<10|t)^d.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;d.getBCHDigit(t)-d.getBCHDigit(d.G18)>=0;)t^=d.G18<<d.getBCHDigit(t)-d.getBCHDigit(d.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return d.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,a){switch(e){case s:return(t+a)%2==0;case l:return t%2==0;case o:return a%3==0;case n:return(t+a)%3==0;case r:return(Math.floor(t/2)+Math.floor(a/3))%2==0;case i:return t*a%2+t*a%3==0;case c:return(t*a%2+t*a%3)%2==0;case u:return(t*a%3+(t+a)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new m([1],0),a=0;a<e;a++)t=t.multiply(new m([1,h.gexp(a)],0));return t},getLostPoint:function(e){for(var t=e.getModuleCount(),a=0,s=0,l=0;l<t;l++)for(var o=0,n=e.modules[l][0],r=0;r<t;r++){var i=e.modules[l][r];if(r<t-6&&i&&!e.modules[l][r+1]&&e.modules[l][r+2]&&e.modules[l][r+3]&&e.modules[l][r+4]&&!e.modules[l][r+5]&&e.modules[l][r+6]&&(r<t-10?e.modules[l][r+7]&&e.modules[l][r+8]&&e.modules[l][r+9]&&e.modules[l][r+10]&&(a+=40):r>3&&e.modules[l][r-1]&&e.modules[l][r-2]&&e.modules[l][r-3]&&e.modules[l][r-4]&&(a+=40)),l<t-1&&r<t-1){var c=0;i&&c++,e.modules[l+1][r]&&c++,e.modules[l][r+1]&&c++,e.modules[l+1][r+1]&&c++,0!=c&&4!=c||(a+=3)}n^i?o++:(n=i,o>=5&&(a+=3+o-5),o=1),i&&s++}for(r=0;r<t;r++)for(o=0,n=e.modules[0][r],l=0;l<t;l++)i=e.modules[l][r],l<t-6&&i&&!e.modules[l+1][r]&&e.modules[l+2][r]&&e.modules[l+3][r]&&e.modules[l+4][r]&&!e.modules[l+5][r]&&e.modules[l+6][r]&&(l<t-10?e.modules[l+7][r]&&e.modules[l+8][r]&&e.modules[l+9][r]&&e.modules[l+10][r]&&(a+=40):l>3&&e.modules[l-1][r]&&e.modules[l-2][r]&&e.modules[l-3][r]&&e.modules[l-4][r]&&(a+=40)),n^i?o++:(n=i,o>=5&&(a+=3+o-5),o=1);return a+=Math.abs(100*s/t/t-50)/5*10}},h={glog:function(e){if(e<1)throw new Error("glog("+e+")");return h.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return h.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;f<8;f++)h.EXP_TABLE[f]=1<<f;for(f=8;f<256;f++)h.EXP_TABLE[f]=h.EXP_TABLE[f-4]^h.EXP_TABLE[f-5]^h.EXP_TABLE[f-6]^h.EXP_TABLE[f-8];for(f=0;f<255;f++)h.LOG_TABLE[h.EXP_TABLE[f]]=f;function m(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var a=0;a<e.length&&0==e[a];)a++;this.num=new Array(e.length-a+t);for(var s=0;s<e.length-a;s++)this.num[s]=e[s+a]}m.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),a=0;a<this.getLength();a++)for(var s=0;s<e.getLength();s++)t[a+s]^=h.gexp(h.glog(this.get(a))+h.glog(e.get(s)));return new m(t,0)},mod:function(e){var t=this.getLength(),a=e.getLength();if(t-a<0)return this;for(var s=new Array(t),l=0;l<t;l++)s[l]=this.get(l);for(;s.length>=a;){var o=h.glog(s[0])-h.glog(e.get(0));for(l=0;l<e.getLength();l++)s[l]^=h.gexp(h.glog(e.get(l))+o);for(;0==s[0];)s.shift()}return new m(s,0)}};var p=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];function g(){this.buffer=new Array,this.length=0}return t.prototype.getRightType=function(){for(var e=1;e<41;e++){var t=p[4*(e-1)+this.errorCorrectLevel];if(null==t)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+this.errorCorrectLevel);for(var a=t.length/3,s=0,l=0;l<a;l++){var o=t[3*l+0];s+=t[3*l+2]*o}var n=e>9?2:1;if(this.utf8bytes.length+n<s||40==e){this.typeNumber=e,this.rsBlock=t,this.totalDataCount=s;break}}},g.prototype={get:function(e){var t=Math.floor(e/8);return this.buffer[t]>>>7-e%8&1},put:function(e,t){for(var a=0;a<t;a++)this.putBit(e>>>t-a-1&1)},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t}(),x=function(){var e=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,t=/^<\/([-A-Za-z0-9_]+)[^>]*>/,a=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,s=c("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),l=c("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),o=c("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),n=c("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),r=c("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),i=c("script,style");function c(e){for(var t={},a=e.split(","),s=0;s<a.length;s++)t[a[s]]=!0;return t}return function(c){c=function(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}(c);var u=[],d={node:"root",children:[]};return function(c,u){var d,h,f,m=[],p=c;for(m.last=function(){return this[this.length-1]};c;){if(h=!0,m.last()&&i[m.last()])c=c.replace(new RegExp("([\\s\\S]*?)</"+m.last()+"[^>]*>"),(function(e,t){return t=t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),u.chars&&u.chars(t),""})),y("",m.last());else if(0==c.indexOf("\x3c!--")?(d=c.indexOf("--\x3e"))>=0&&(u.comment&&u.comment(c.substring(4,d)),c=c.substring(d+3),h=!1):0==c.indexOf("</")?(f=c.match(t))&&(c=c.substring(f[0].length),f[0].replace(t,y),h=!1):0==c.indexOf("<")&&(f=c.match(e))&&(c=c.substring(f[0].length),f[0].replace(e,b),h=!1),h){var g=(d=c.indexOf("<"))<0?c:c.substring(0,d);c=d<0?"":c.substring(d),u.chars&&u.chars(g)}if(c==p)throw"Parse Error: "+c;p=c}function b(e,t,i,c){if(t=t.toLowerCase(),l[t])for(;m.last()&&o[m.last()];)y("",m.last());if(n[t]&&m.last()==t&&y("",t),(c=s[t]||!!c)||m.push(t),u.start){var d=[];i.replace(a,(function(e,t){var a=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:r[t]?t:"";d.push({name:t,value:a,escaped:a.replace(/(^|[^\\])"/g,'$1\\"')})})),u.start&&u.start(t,d,c)}}function y(e,t){if(t)for(a=m.length-1;a>=0&&m[a]!=t;a--);else var a=0;if(a>=0){for(var s=m.length-1;s>=a;s--)u.end&&u.end(m[s]);m.length=a}}y()}(c,{start:function(e,t,a){var s={name:e};if(0!==t.length&&(s.attrs=function(e){return e.reduce((function(e,t){var a=t.value,s=t.name;return e[s]?e[s]=e[s]+" "+a:e[s]=a,e}),{})}(t)),a){var l=u[0]||d;l.children||(l.children=[]),l.children.push(s)}else u.unshift(s)},end:function(e){var t=u.shift();if(t.name!==e&&console.error("invalid state: mismatch end tag"),0===u.length)d.children.push(t);else{var a=u[0];a.children||(a.children=[]),a.children.push(t)}},chars:function(e){var t={type:"text",text:e};if(0===u.length)d.children.push(t);else{var a=u[0];a.children||(a.children=[]),a.children.push(t)}},comment:function(e){var t={node:"comment",text:e},a=u[0];a.children||(a.children=[]),a.children.push(t)}}),d.children}}(),k=function(){function e(e){var t=e.split(",");return t[t.length-1]}var t=0;return{pathToBase64:function(e){return new Promise((function(t,a){if("object"==typeof window&&"document"in window){if("function"==typeof FileReader){var s=new XMLHttpRequest;return s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(200===this.status){let e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=a,e.readAsDataURL(this.response)}},s.onerror=a,void s.send()}var l=document.createElement("canvas"),o=l.getContext("2d"),n=new Image;return n.onload=function(){l.width=n.width,l.height=n.height,o.drawImage(n,0,0),t(l.toDataURL()),l.height=l.width=0},n.onerror=a,void(n.src=e)}"object"!=typeof plus?"object"==typeof wx&&K("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:e,encoding:"base64",success:function(e){t("data:image/png;base64,"+e.data)},fail:function(e){a(e)}}):a(new Error("not support")):plus.io.resolveLocalFileSystemURL(function(e){if(0===e.indexOf("_www")||0===e.indexOf("_doc")||0===e.indexOf("_documents")||0===e.indexOf("_downloads"))return e;if(0===e.indexOf("file://"))return e;if(0===e.indexOf("/storage/emulated/0/"))return e;if(0===e.indexOf("/")){var t=plus.io.convertAbsoluteFileSystem(e);if(t!==e)return t;e=e.substr(1)}return"_www/"+e}(e),(function(e){e.file((function(e){var s=new plus.io.FileReader;s.onload=function(e){t(e.target.result)},s.onerror=function(e){a(e)},s.readAsDataURL(e)}),(function(e){a(e)}))}),(function(e){a(e)}))}))},base64ToPath:function(a){return new Promise((function(s,l){if("object"==typeof window&&"document"in window){for(var o=(a=a.split(","))[0].match(/:(.*?);/)[1],n=atob(a[1]),r=n.length,i=new Uint8Array(r);r--;)i[r]=n.charCodeAt(r);return s((window.URL||window.webkitURL).createObjectURL(new Blob([i],{type:o})))}var c=a.split(",")[0].match(/data\:\S+\/(\S+);/);c?c=c[1]:l(new Error("base64 error"));var u=Date.now()+String(t++)+"."+c;if("object"!=typeof plus){try{v=("object"==typeof my&&(null==(d=null==my?void 0:my.env)?void 0:d.USER_DATA_PATH)?my.env.USER_DATA_PATH:"object"==typeof swan&&(null==(h=null==swan?void 0:swan.env)?void 0:h.USER_DATA_PATH)?swan.env.USER_DATA_PATH:"object"==typeof tt&&(null==(f=null==tt?void 0:tt.env)?void 0:f.USER_DATA_PATH)?tt.env.USER_DATA_PATH:"object"==typeof qq&&(null==(m=null==qq?void 0:qq.env)?void 0:m.USER_DATA_PATH)?qq.env.USER_DATA_PATH:"object"==typeof qh&&(null==(p=null==qh?void 0:qh.env)?void 0:p.USER_DATA_PATH)?qh.env.USER_DATA_PATH:"object"==typeof wx&&(null==(g=null==wx?void 0:wx.env)?void 0:g.USER_DATA_PATH)?wx.env.USER_DATA_PATH:"https://user")+"/"+u,uni.getFileSystemManager().writeFile({filePath:v,data:e(a),encoding:"base64",success:function(){s(v)},fail:function(e){l(e)}})}catch(_){l(new Error("not support"))}var d,h,f,m,p,g}else{var b="_doc",y="uniapp_temp",v="_doc/uniapp_temp/"+u;if(!function(e,t){for(var a=e.split("."),s=t.split("."),l=!1,o=0;o<s.length;o++){var n=a[o]-s[o];if(0!==n){l=n>0;break}}return l}("Android"===plus.os.name?"1.9.9.80627":"1.9.9.80472",plus.runtime.innerVersion))return void plus.io.resolveLocalFileSystemURL(b,(function(t){t.getDirectory(y,{create:!0,exclusive:!1},(function(t){t.getFile(u,{create:!0,exclusive:!1},(function(t){t.createWriter((function(t){t.onwrite=function(){s(v)},t.onerror=l,t.seek(0),t.writeAsBinary(e(a))}),l)}),l)}),l)}),l);var w=new plus.nativeObj.Bitmap(u);w.loadBase64Data(a,(function(){w.save(v,{},(function(){w.clear(),s(v)}),(function(e){w.clear(),l(e)}))}),(function(e){w.clear(),l(e)}))}}))}}}();b("object")&&(Ke.exports=w)}();const Je=Y(Ye.exports),et=_e({__name:"s-follow-modal",setup(e){const t=I((()=>S.$store("modal").subscribe)),a=J("");async function s(e){console.log(e);const t=new Je({canvasId:"myCanvas",width:300,height:300,setCanvasWH:e=>{e.width=300,e.height=300}});await t.drawQrCode({val:e,x:25,y:15,size:250,background:"#ffffff",foreground:"#000000",pdground:"#000000",correctLevel:3});await t.drawText({val:"长按二维码关注公众号",x:150,y:280,maxWidth:250,paintbrushProps:{fillStyle:"#333",textAlign:"center",textBaseline:"middle",font:{fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:14,fontFamily:"sans-serif"}}}),await t.draw();const s=await t.toImage();s&&(a.value=s)}return ee((()=>{t.value&&T().then((()=>{!function(){let e="https://zxgz.newfeifan.cn";console.log("当前接口Url",e),e.includes("letcgo.com")?s("https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzkwNDY4NjUxMg==&scene=110"):s("https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzkzNDEwNDU4OQ==&scene=124")}()}))})),(e,s)=>{const u=p,d=ae,f=N,m=l(o("su-popup"),ke);return n(),r(m,{show:t.value,round:"10",onClose:k(te)},{default:i((()=>[c(u,{class:"login-wrap"},{default:i((()=>[c(u,{class:"head-box"},{default:i((()=>[c(u,{class:"ss-m-b-20"},{default:i((()=>[c(u,{class:"head-title ss-m-r-40 head-title-animation"},{default:i((()=>[h(" 关注公众号 ")])),_:1}),c(u,{class:"ss-flex ss-row-center"},{default:i((()=>[c(d,{class:"hideCanvas","canvas-id":"myCanvas",style:{width:"300px",height:"300px"}}),c(f,{src:a.value,mode:"widthFix"},null,8,["src"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-806b6d5c"]]),at=_e({__name:"account-login",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=J(null),s=t,u=e,d=y({model:{username:"",password:""},rules:{username:Se,password:Ce}});async function f(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;if(!u.agreeStatus)return s("onConfirm",!0),void S.$helper.toast("请勾选同意");const{code:e,data:t}=await se.login(d.model);0===e&&le()}return(e,t)=>{const s=l(o("uni-easyinput"),Pe),u=l(o("uni-forms-item"),Ie),m=l(o("uni-forms"),Ae),g=P,b=p;return n(),r(b,null,{default:i((()=>[c(m,{ref_key:"accountLoginRef",ref:a,modelValue:d.model,"onUpdate:modelValue":t[2]||(t[2]=e=>d.model=e),rules:d.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",class:"loginUniForm"},{default:i((()=>[c(u,{name:"username",label:"用户名",class:"loginUniFormItem"},{default:i((()=>[c(s,{placeholder:"请输入用户名",modelValue:d.model.username,"onUpdate:modelValue":t[0]||(t[0]=e=>d.model.username=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(u,{name:"password",label:"密码",class:"loginUniFormItem"},{default:i((()=>[c(s,{type:"password",placeholder:"请输入密码",modelValue:d.model.password,"onUpdate:modelValue":t[1]||(t[1]=e=>d.model.password=e),inputBorder:!1},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(b,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(g,{class:"ss-reset-button login-btn-start",onClick:f},{default:i((()=>[h("登录")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-90a14fae"]]),st=_e({__name:"sms-login",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=(e,t)=>{f.model.mobile=e,f.mobileErrorMsg=t},s=J(null),u=t,d=e,f=y({verifyUsername:!0,usernameErrorMsg:"",isMobileEnd:!1,codeText:"获取验证码",mobileErrorMsg:"",model:{username:"",mobile:"",code:""},rules:{username:Se,code:Be,mobile:Te}});let m=J("");async function g(e){const t=e.detail.value;if(""==t||t==m.value)return!1;m.value=t;const{data:a}=await se.verifyUsername(t);a?(f.usernameErrorMsg="请输入正确的用户名!",f.verifyUsername=a):(f.usernameErrorMsg="",f.verifyUsername=a)}async function b(){const e=oe("linkId");e&&(f.model.linkId=e);if(!(await k(s).validate().catch((e=>{console.log("error: ",e)}))))return;if(!d.agreeStatus)return u("onConfirm",!0),void S.$helper.toast("请勾选同意");const{code:t}=await se.smsLogin(f.model);0===t&&le()}return(e,t)=>{const u=N,d=p,m=l(o("uni-easyinput"),Pe),y=l(o("uni-forms-item"),Ie),v=l(o("uni-forms"),Ae),w=P;return n(),r(d,null,{default:i((()=>[c(v,{ref_key:"smsLoginRef",ref:s,modelValue:f.model,"onUpdate:modelValue":t[2]||(t[2]=e=>f.model=e),rules:f.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",class:"loginUniForm"},{default:i((()=>[c(y,{name:"username",label:"用户名",class:"loginUniFormItem","error-message":f.usernameErrorMsg},{default:i((()=>[c(m,{placeholder:"请输入用户名",modelValue:f.model.username,"onUpdate:modelValue":t[0]||(t[0]=e=>f.model.username=e),inputBorder:!1,clearable:!1,onBlur:g},{right:i((()=>[f.verifyUsername?(n(),r(d,{key:0,class:"icon"},{default:i((()=>[c(u,{style:"",src:k(S).$url.static("/static/images/shibai.png")},null,8,["src"])])),_:1})):(n(),r(d,{key:1,class:"icon"},{default:i((()=>[c(u,{src:k(S).$url.static("/static/images/chenggong.png")},null,8,["src"])])),_:1}))])),_:1},8,["modelValue"])])),_:1},8,["error-message"]),c(y,{name:"mobile",label:"手机号",class:"mobile loginUniFormItem ss-p-t-10","error-message":f.mobileErrorMsg},{default:i((()=>[c($e,{"verify-username":!f.verifyUsername,onInput:a},null,8,["verify-username"])])),_:1},8,["error-message"]),c(y,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[c(m,{placeholder:"请输入验证码",modelValue:f.model.code,"onUpdate:modelValue":t[1]||(t[1]=e=>f.model.code=e),inputBorder:!1,type:"number",maxlength:"4"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(d,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(w,{class:"ss-reset-button login-btn-start",onClick:b},{default:i((()=>[h(" 登录 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-6c7984c6"]]),lt=_e({__name:"register",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=(e,t)=>{s.model.mobile=e,s.mobileErrorMsg=t},s=y({verifyUsername:!1,codeText:"获取验证码",mobileErrorMsg:"",usernameErrorMsg:"",model:{username:"",password:"",mobile:"",code:""},rules:{username:Se,password:Ce,code:Be}}),u=J(null),d=t,f=e;let m=J("");async function g(e){const t=e.detail.value;if(""==t||t==m.value)return!1;m.value=t;const{data:a}=await se.verifyUsername(t);a?(s.usernameErrorMsg="",s.verifyUsername=a):(s.usernameErrorMsg="已存在用户名!",s.verifyUsername=a)}async function b(){console.log(s.model);if(!(await k(u).validate().catch((e=>{console.log("error: ",e)}))))return;if(!f.agreeStatus)return d("onConfirm",!0),void S.$helper.toast("请勾选同意");const e=oe("linkId");if(!e)return S.$helper.toast("您只能通过分享注册"),!1;s.model.linkId=e;const{code:t}=await se.register(s.model);0===t&&le()}return(e,t)=>{const d=N,f=p,m=l(o("uni-easyinput"),Pe),y=l(o("uni-forms-item"),Ie),v=l(o("uni-forms"),Ae),w=P;return n(),r(f,null,{default:i((()=>[c(v,{ref_key:"smsLoginRef",ref:u,modelValue:s.model,"onUpdate:modelValue":t[3]||(t[3]=e=>s.model=e),rules:s.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",class:"loginUniForm"},{default:i((()=>[c(y,{name:"username",label:"用户名",class:"loginUniFormItem","error-message":s.usernameErrorMsg},{default:i((()=>[c(m,{placeholder:"请输入用户名",modelValue:s.model.username,"onUpdate:modelValue":t[0]||(t[0]=e=>s.model.username=e),inputBorder:!1,clearable:!1,onBlur:g},{right:i((()=>[s.verifyUsername?(n(),r(f,{key:1,class:"icon"},{default:i((()=>[c(d,{src:k(S).$url.static("/static/images/chenggong.png")},null,8,["src"])])),_:1})):(n(),r(f,{key:0,class:"icon"},{default:i((()=>[c(d,{style:"",src:k(S).$url.static("/static/images/shibai.png")},null,8,["src"])])),_:1}))])),_:1},8,["modelValue"])])),_:1},8,["error-message"]),c(y,{name:"password",label:"密码",class:"loginUniFormItem"},{default:i((()=>[c(m,{type:"password",placeholder:"请输入密码",modelValue:s.model.password,"onUpdate:modelValue":t[1]||(t[1]=e=>s.model.password=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(y,{name:"mobile",label:"手机号",class:"mobile loginUniFormItem ss-p-t-10","error-message":s.mobileErrorMsg},{default:i((()=>[c($e,{"verify-username":s.verifyUsername,onInput:a},null,8,["verify-username"])])),_:1},8,["error-message"]),c(y,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[c(m,{placeholder:"请输入验证码",modelValue:s.model.code,"onUpdate:modelValue":t[2]||(t[2]=e=>s.model.code=e),inputBorder:!1,type:"number",maxlength:"4"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(f,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(w,{class:"ss-reset-button login-btn-start",onClick:b},{default:i((()=>[h(" 注册 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-b5ad59e6"]]),ot=_e({__name:"change-mobile",setup(e){const t=J(0),a=J(null),s=I((()=>S.$store("user").userInfo)),u=y({isMobileEnd:!1,model:{oldMobile:"",oldCode:"",mobile:"",code:""},rules:{code:Be,mobile:Te}});async function d(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e,data:s}=await se.validatePhone(u.model.oldMobile,u.model.oldCode,2);console.log("下一步的请求校验",s),s&&(t.value=1)}async function m(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await ie.updateUserMobile({mobile:u.model.mobile,code:u.model.code});0===e&&(ce({icon:"success",title:"修改成功,请重新登录"}),setTimeout((function(){S.$store("user").logout(),le(),S.$router.go("/pages/index/user")}),1e3))}return(e,g)=>{const b=p,y=P,v=l(o("uni-easyinput"),Pe),w=l(o("uni-forms-item"),Ie),_=l(o("uni-forms"),Ae);return n(),r(b,null,{default:i((()=>[c(b,{class:"head-box ss-m-b-60"},{default:i((()=>[c(b,{class:"head-title ss-m-b-20"},{default:i((()=>[h(f(s.value.mobile?"更换手机号":"绑定手机号"),1)])),_:1}),c(b,{class:"head-subtitle"},{default:i((()=>[h("为了您的账号安全,请使用本人手机号码")])),_:1})])),_:1}),t.value?(n(),r(_,{key:1,ref_key:"changeMobileRef",ref:a,modelValue:u.model,"onUpdate:modelValue":g[7]||(g[7]=e=>u.model=e),rules:u.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[c(w,{name:"mobile",label:"新手机号"},{default:i((()=>[c(v,{placeholder:"请输入新手机号",modelValue:u.model.mobile,"onUpdate:modelValue":g[5]||(g[5]=e=>u.model.mobile=e),inputBorder:!1,type:"number"},{right:i((()=>[c(y,{class:C(["ss-reset-button code-btn-start",{"code-btn-end":u.isMobileEnd}]),disabled:u.isMobileEnd,onClick:g[4]||(g[4]=e=>k(ne)("changeMobileNew",u.model.mobile))},{default:i((()=>[h(f(k(re)("changeMobileNew")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),c(w,{name:"code",label:"验证码"},{default:i((()=>[c(v,{placeholder:"请输入验证码",modelValue:u.model.code,"onUpdate:modelValue":g[6]||(g[6]=e=>u.model.code=e),inputBorder:!1,type:"number",maxlength:"4"},null,8,["modelValue"])])),_:1}),c(y,{class:"ss-reset-button login-btn-start",onClick:m},{default:i((()=>[h(" 确定 ")])),_:1})])),_:1},8,["modelValue","rules"])):(n(),r(_,{key:0,ref_key:"changeMobileRef",ref:a,modelValue:u.model,"onUpdate:modelValue":g[3]||(g[3]=e=>u.model=e),rules:u.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[c(w,{name:"mobile",label:"原手机号"},{default:i((()=>[c(v,{placeholder:"请输入原手机号",modelValue:u.model.oldMobile,"onUpdate:modelValue":g[1]||(g[1]=e=>u.model.oldMobile=e),inputBorder:!1,type:"number"},{right:i((()=>[c(y,{class:C(["ss-reset-button code-btn-start",{"code-btn-end":u.isMobileEnd}]),disabled:u.isMobileEnd,onClick:g[0]||(g[0]=e=>k(ne)("changeMobileOld",u.model.oldMobile))},{default:i((()=>[h(f(k(re)("changeMobileOld")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),c(w,{name:"code",label:"验证码"},{default:i((()=>[c(v,{placeholder:"请输入验证码",modelValue:u.model.oldCode,"onUpdate:modelValue":g[2]||(g[2]=e=>u.model.oldCode=e),inputBorder:!1,type:"number",maxlength:"4"},null,8,["modelValue"])])),_:1}),c(y,{class:"ss-reset-button login-btn-start",onClick:d},{default:i((()=>[h(" 下一步 ")])),_:1})])),_:1},8,["modelValue","rules"]))])),_:1})}}},[["__scopeId","data-v-d18a72fa"]]),nt=_e({__name:"change-password",setup(e){const t=J(null),a=y({isMobileEnd:!1,model:{mobile:"",code:"",password:""},rules:{code:Be,password:Ce}});async function s(){/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(a.model.password)||(console.log(123),ce({icon:"error",title:"需包含字母和数字,长度在6-12之间"}));if(!(await k(t).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await ie.updateUserPassword(a.model);0===e&&(ce({icon:"success",title:"修改成功"}),setTimeout((function(){le()}),1e3))}return(e,u)=>{const d=p,m=P,g=l(o("uni-easyinput"),Pe),b=l(o("uni-forms-item"),Ie),y=l(o("uni-forms"),Ae);return n(),r(d,null,{default:i((()=>[c(d,{class:"head-box ss-m-b-60"},{default:i((()=>[c(d,{class:"head-title ss-m-b-20"},{default:i((()=>[h("修改密码")])),_:1}),c(d,{class:"head-subtitle"},{default:i((()=>[h("如密码丢失或未设置,请点击忘记密码重新设置")])),_:1})])),_:1}),c(y,{ref_key:"changePasswordRef",ref:t,modelValue:a.model,"onUpdate:modelValue":u[3]||(u[3]=e=>a.model=e),rules:a.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[c(b,{name:"code",label:"验证码"},{default:i((()=>[c(g,{placeholder:"请输入验证码",modelValue:a.model.code,"onUpdate:modelValue":u[1]||(u[1]=e=>a.model.code=e),type:"number",maxlength:"4",inputBorder:!1},{right:i((()=>[c(m,{class:C(["ss-reset-button code-btn code-btn-start",{"code-btn-end":a.isMobileEnd}]),disabled:a.isMobileEnd,onClick:u[0]||(u[0]=e=>k(ne)("changePassword"))},{default:i((()=>[h(f(k(re)("changePassword")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),c(b,{name:"reNewPassword",label:"密码"},{default:i((()=>[c(g,{type:"password",placeholder:"请输入密码",modelValue:a.model.password,"onUpdate:modelValue":u[2]||(u[2]=e=>a.model.password=e),inputBorder:!1},{right:i((()=>[c(m,{class:"ss-reset-button login-btn-start",onClick:s},{default:i((()=>[h(" 确认 ")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(m,{class:"ss-reset-button type-btn",onClick:k(le)},{default:i((()=>[h(" 取消修改 ")])),_:1},8,["onClick"])])),_:1})}}},[["__scopeId","data-v-2e919f2e"]]),rt=_e({__name:"mp-authorization",props:{agreeStatus:{type:Boolean,default:!1}},setup(e){const t=I((()=>S.$store("user").userInfo)),a=J(null),s=y({model:{nickname:t.value.nickname,avatar:t.value.avatar},rules:{},disabledStyle:{color:"#999",disableColor:"#fff"}});function u(e){!async function(e){if(!e)return;let{data:t}=await ue.uploadFile(e);s.model.avatar=t}(e.detail.avatarUrl||"")}async function d(){const{model:e}=s,{nickname:t,avatar:a}=e;if(!t)return void S.$helper.toast("请输入昵称");if(!a)return void S.$helper.toast("请选择头像");const{code:l}=await ie.updateUser({avatar:s.model.avatar,nickname:s.model.nickname});0===l&&(S.$helper.toast("授权成功"),await S.$store("user").getInfo(),le())}return(e,t)=>{const f=p,m=N,g=b,y=P,v=l(o("uni-forms-item"),Ie),w=l(o("uni-easyinput"),Pe),_=l(o("uni-forms"),Ae);return n(),r(f,null,{default:i((()=>[c(f,{class:"head-box ss-m-b-60 ss-flex-col"},{default:i((()=>[c(f,{class:"ss-flex ss-m-b-20"},{default:i((()=>[c(f,{class:"head-title ss-m-r-40 head-title-animation"},{default:i((()=>[h("授权信息")])),_:1})])),_:1}),c(f,{class:"head-subtitle"},{default:i((()=>[h("完善您的头像、昵称、手机号")])),_:1})])),_:1}),c(_,{ref_key:"accountLoginRef",ref:a,modelValue:s.model,"onUpdate:modelValue":t[2]||(t[2]=e=>s.model=e),rules:s.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[c(v,{name:"avatar",label:"头像"},{default:i((()=>[c(y,{class:"ss-reset-button avatar-btn","open-type":"chooseAvatar",onChooseavatar:u},{default:i((()=>[c(m,{class:"avatar-img",src:k(S).$url.cdn(s.model.avatar),mode:"aspectFill",onClick:t[0]||(t[0]=e=>k(S).$router.go("/pages/user/info"))},null,8,["src"]),c(g,{class:"cicon-forward"})])),_:1})])),_:1}),c(v,{name:"nickname",label:"昵称"},{default:i((()=>[c(w,{type:"nickname",placeholder:"请输入昵称",modelValue:s.model.nickname,"onUpdate:modelValue":t[1]||(t[1]=e=>s.model.nickname=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(f,{class:"foot-box"},{default:i((()=>[c(y,{class:"ss-reset-button authorization-btn",onClick:d},{default:i((()=>[h(" 确认授权 ")])),_:1})])),_:1})])),_:1},8,["modelValue","rules"])])),_:1})}}},[["__scopeId","data-v-b00d5530"]]),it=_e({__name:"officialAccountFirstLogin",emits:["onConfirm"],setup(e,{emit:t}){const a=J(null),s=y({isMobileEnd:!1,codeText:"获取验证码",model:{mobile:"",code:""},rules:{code:Be,mobile:Te}});async function u(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await se.smsLogin(s.model);0===e&&le()}return(e,t)=>{const d=p,m=P,g=l(o("uni-easyinput"),Pe),b=l(o("uni-forms-item"),Ie),y=l(o("uni-forms"),Ae);return n(),r(d,null,{default:i((()=>[c(d,{class:"head-box"},{default:i((()=>[c(d,{class:"ss-flex ss-m-b-20"},{default:i((()=>[c(d,{class:"isActive head-title"},{default:i((()=>[h(" 您首次登录,请输入手机号验证 ")])),_:1})])),_:1})])),_:1}),c(y,{ref_key:"smsLoginRef",ref:a,modelValue:s.model,"onUpdate:modelValue":t[3]||(t[3]=e=>s.model=e),rules:s.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",class:"loginUniForm"},{default:i((()=>[c(b,{name:"mobile",label:"手机号",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"请输入手机号",modelValue:s.model.mobile,"onUpdate:modelValue":t[1]||(t[1]=e=>s.model.mobile=e),inputBorder:!1,type:"number"},{right:i((()=>[c(m,{class:C(["ss-reset-button code-btn code-btn-start",{"code-btn-end":s.isMobileEnd}]),disabled:s.isMobileEnd,onClick:t[0]||(t[0]=e=>k(ne)("smsLogin",s.model.mobile))},{default:i((()=>[h(f(k(re)("smsLogin")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),c(b,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"请输入验证码",modelValue:s.model.code,"onUpdate:modelValue":t[2]||(t[2]=e=>s.model.code=e),inputBorder:!1,type:"number",maxlength:"4"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(d,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(m,{class:"ss-reset-button login-btn-start",onClick:u},{default:i((()=>[h(" 继续登录 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-ed448707"]]),ct=_e({__name:"alipay-account",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=I((()=>S.$store("user").userInfo)),s=J(null),u=y({model:{alipayName:"",alipayAccount:""},rules:{alipayAccount:Ve}});async function d(){if(!u.model.alipayName||!u.model.alipayAccount)return!1;if(!(await k(s).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await ie.updateUserAlipayAccount({alipayName:u.model.alipayName,alipayAccount:u.model.alipayAccount});0===e&&(ce({icon:"success",title:"修改成功"}),le(),de("alipayAccountChangeComplete"))}return L((async e=>{u.model.alipayName=a.value.alipayName,u.model.alipayAccount=a.value.alipayAccount})),(e,t)=>{const m=p,g=l(o("uni-easyinput"),Pe),b=l(o("uni-forms-item"),Ie),y=l(o("uni-forms"),Ae),v=P;return n(),r(m,null,{default:i((()=>[c(m,{class:"head-box ss-m-b-60"},{default:i((()=>[c(m,{class:"head-title ss-m-b-20"},{default:i((()=>[h(f(a.value.alipayName&&a.value.alipayAccount?"更换支付宝账号":"绑定支付宝账号"),1)])),_:1}),c(m,{class:"head-subtitle"},{default:i((()=>[h("请绑定已实名认证的支付宝账号")])),_:1})])),_:1}),c(y,{ref_key:"alipayAccountRef",ref:s,modelValue:u.model,"onUpdate:modelValue":t[2]||(t[2]=e=>u.model=e),rules:u.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",class:"loginUniForm"},{default:i((()=>[c(b,{label:"名称",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"请输入名称",modelValue:u.model.alipayName,"onUpdate:modelValue":t[0]||(t[0]=e=>u.model.alipayName=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(b,{name:"alipayAccount",label:"账号",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"请输入账号",modelValue:u.model.alipayAccount,"onUpdate:modelValue":t[1]||(t[1]=e=>u.model.alipayAccount=e),inputBorder:!1},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(m,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(v,{class:"ss-reset-button login-btn-start",onClick:d},{default:i((()=>[h("确定")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-c0df0381"]]),ut=_e({__name:"bank-account",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=I((()=>S.$store("user").userInfo)),s=J(null),u=y({model:{accountName:"",bankName:"",bankAccount:""},rules:{bankCode:Me}});async function d(){if(!u.model.accountName||!u.model.bankName||!u.model.bankAccount)return!1;if(!(await k(s).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await ie.updateUserBankAccount({accountName:u.model.accountName,bankName:u.model.bankName,bankAccount:u.model.bankAccount});0===e&&(ce({icon:"success",title:"修改成功"}),le(),de("bankAccountChangeComplete"))}return L((async e=>{u.model.accountName=a.value.accountName,u.model.bankName=a.value.bankName,u.model.bankAccount=a.value.bankAccount})),(e,t)=>{const m=p,g=l(o("uni-easyinput"),Pe),b=l(o("uni-forms-item"),Ie),y=l(o("uni-forms"),Ae),v=P;return n(),r(m,null,{default:i((()=>[c(m,{class:"head-box ss-m-b-60"},{default:i((()=>[c(m,{class:"head-title ss-m-b-20"},{default:i((()=>[h(f(a.value.bankName&&a.value.accountName&&a.value.bankAccount?"更换银行卡":"绑定银行卡"),1)])),_:1})])),_:1}),c(y,{ref_key:"alipayAccountRef",ref:s,modelValue:u.model,"onUpdate:modelValue":t[3]||(t[3]=e=>u.model=e),rules:u.rules,validateTrigger:"bind",labelWidth:"160",labelAlign:"left",class:"loginUniForm"},{default:i((()=>[c(b,{label:"开户行",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"例:xx银行股份有限公司xx分行xx支行",modelValue:u.model.bankName,"onUpdate:modelValue":t[0]||(t[0]=e=>u.model.bankName=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(b,{label:"开户名",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"个人姓名",modelValue:u.model.accountName,"onUpdate:modelValue":t[1]||(t[1]=e=>u.model.accountName=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),c(b,{label:"银行卡账号",name:"bankCode",class:"loginUniFormItem"},{default:i((()=>[c(g,{placeholder:"银行卡账号",modelValue:u.model.bankAccount,"onUpdate:modelValue":t[2]||(t[2]=e=>u.model.bankAccount=e),inputBorder:!1},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),c(m,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[c(v,{class:"ss-reset-button login-btn-start",onClick:d},{default:i((()=>[h("确定")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-d9d1f7a2"]]),dt=_e({__name:"s-auth-modal",setup(e){I((()=>S.$store("app").info));const t=oe("linkId"),a=S.$store("modal"),s=I((()=>a.auth)),u=I((()=>a.isActive)),d=y({protocol:!1}),f=J(!1);function g(){d.protocol=!d.protocol}function v(e){le(),S.$router.go("/pages/public/richtext",{title:e})}function w(e){f.value=e,setTimeout((()=>{f.value=!1}),1e3)}return(e,a)=>{const y=p,_=fe,P=me,I=N,A=b,B=l(o("su-popup"),ke);return n(),r(B,{show:""!==s.value,round:"10",showClose:!0,onClose:k(le)},{default:i((()=>[c(y,{class:"login-wrap"},{default:i((()=>[["smsLogin","accountLogin","register"].includes(s.value)?(n(),r(y,{key:0,class:"head-box"},{default:i((()=>[c(y,{class:"ss-flex ss-m-b-20"},{default:i((()=>[c(y,{class:C(["accountLogin"==u.value?"head-title ss-m-r-40 head-title-animation":"head-title-active ss-m-r-40"]),onClick:a[0]||(a[0]=e=>{u.value="accountLogin",k(he)("accountLogin","accountLogin")})},{default:i((()=>[h(" 账号登录 ")])),_:1},8,["class"]),c(y,{class:C(["smsLogin"==u.value?"head-title head-title-line head-title-animation ss-m-r-40":" ss-m-r-40 head-title-active head-title-line"]),onClick:a[1]||(a[1]=e=>{u.value="smsLogin",k(he)("smsLogin","smsLogin")})},{default:i((()=>[h(" 短信登录 ")])),_:1},8,["class"]),k(t)?(n(),r(y,{key:0,class:C(["register"==u.value?"head-title head-title-line head-title-animation":"head-title-active head-title-line"]),onClick:a[2]||(a[2]=e=>{u.value="register",k(he)("register","register")})},{default:i((()=>[h(" 注册 ")])),_:1},8,["class"])):m("",!0)])),_:1})])),_:1})):m("",!0),["smsLogin","accountLogin","register"].includes(s.value)?(n(),r(y,{key:1,class:C(["agreement-box ss-flex ss-row-center",{shake:f.value}])},{default:i((()=>[c(P,{class:"radio ss-flex ss-col-center",onClick:g},{default:i((()=>[c(_,{checked:d.protocol,color:"var(--ui-BG-Main)",style:{transform:"scale(0.8)"},onClick:x(g,["stop"])},null,8,["checked"]),c(y,{class:"agreement-text ss-flex ss-col-center ss-m-l-8"},{default:i((()=>[h(" 我已阅读并遵守 "),c(y,{class:"tcp-text",onClick:a[3]||(a[3]=x((e=>v("用户协议")),["stop"]))},{default:i((()=>[h(" 《用户协议》 ")])),_:1}),c(y,{class:"agreement-text"},{default:i((()=>[h("与")])),_:1}),c(y,{class:"tcp-text",onClick:a[4]||(a[4]=x((e=>v("隐私协议")),["stop"]))},{default:i((()=>[h(" 《隐私协议》 ")])),_:1})])),_:1})])),_:1})])),_:1},8,["class"])):m("",!0),["accountLogin","smsLogin"].includes(s.value)?(n(),r(y,{key:2,class:"auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"},{default:i((()=>[["WechatOfficialAccount","WechatMiniProgram","App"].includes(k(S).$platform.name)&&k(S).$platform.isWechatInstalled?(n(),r(y,{key:0,class:"wx-login-btn",onClick:a[5]||(a[5]=e=>(async e=>{if(!d.protocol)return f.value=!0,setTimeout((()=>{f.value=!1}),1e3),void S.$helper.toast("请勾选同意");await S.$platform.useProvider(e).login()&&le()})("wechat"))},{default:i((()=>[c(I,{class:"auto-login-img",src:k(S).$url.static("/static/images/wechat.png")},null,8,["src"]),c(A,null,{default:i((()=>[h("微信授权登录")])),_:1})])),_:1})):m("",!0)])),_:1})):m("",!0),["register"].includes(s.value)?(n(),r(y,{key:3,class:"auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"},{default:i((()=>[["WechatOfficialAccount","WechatMiniProgram","App"].includes(k(S).$platform.name)&&k(S).$platform.isWechatInstalled?(n(),r(y,{key:0,class:"wx-login-btn",onClick:a[6]||(a[6]=e=>(async e=>{if(!d.protocol)return f.value=!0,setTimeout((()=>{f.value=!1}),1e3),void S.$helper.toast("请勾选同意");if(!oe("linkId"))return S.$helper.toast("您只能通过分享注册"),!1;await S.$platform.useProvider(e).register()&&le()})("wechat"))},{default:i((()=>[c(I,{class:"auto-login-img",src:k(S).$url.static("/static/images/wechat.png")},null,8,["src"]),c(A,null,{default:i((()=>[h("微信授权注册")])),_:1})])),_:1})):m("",!0)])),_:1})):m("",!0),"officialAccountFirstLogin"===s.value?(n(),r(k(it),{key:4,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):m("",!0),"accountLogin"===s.value?(n(),r(at,{key:5,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):m("",!0),"smsLogin"===s.value?(n(),r(st,{key:6,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):m("",!0),"register"===s.value?(n(),r(lt,{key:7,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):m("",!0),"changeMobile"===s.value?(n(),r(ot,{key:8})):m("",!0),"changePassword"===s.value?(n(),r(nt,{key:9})):m("",!0),"mpAuthorization"===s.value?(n(),r(rt,{key:10})):m("",!0),"alipayAccount"===s.value?(n(),r(ct,{key:11})):m("",!0),"bankAccount"===s.value?(n(),r(ut,{key:12})):m("",!0),c(y,{class:"safe-box"})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-189809f3"]]);async function ht(e){return new Promise(((t,a)=>{t(window.location.origin+e)}))}async function ft(e){return new Promise(((t,a)=>{t(window.location.origin+e)}))}let mt=J("");async function pt(e){await ue.getFileIO(e).then((e=>{mt.value=window.URL.createObjectURL(e)}))}async function gt(e){const t=S.$store("user").userInfo;console.log(JSON.parse(oe("user-store")).userInfo);let a=t.avatar;switch(e.shareInfo.poster.type){case"user":return await pt(a),e.avatar=mt.value,(async e=>{const t=e.width,a=S.$store("user").userInfo;return{background:await ht("/static/user-poster-bg.jpg"),list:[{name:"nickname",type:"text",val:a.nickname,x:t/2,y:.4*t,paintbrushProps:{textAlign:"center",fillStyle:"#333",font:{fontSize:14,fontFamily:"sans-serif"}}},{name:"avatar",type:"image",val:e.avatar,x:.4*t,y:.16*t,width:.2*t,height:.2*t,d:.2*t},{name:"qrcode",type:"qrcode",val:e.shareInfo.link,x:.35*t,y:.74*t,size:.3*t}]}})(e);case"goods":return await pt(a),e.avatar=mt.value,await pt(e.shareInfo.poster.image),e.shareInfo.poster.image=mt.value,(async e=>{const t=e.width,a=S.$store("user").userInfo;return{background:await ft("/static/goods-poster-bg.jpg"),list:[{name:"nickname",type:"text",val:a.nickname,x:.21*t,y:.06*t,paintbrushProps:{fillStyle:"#333",font:{fontSize:16,fontFamily:"sans-serif"}}},{name:"avatar",type:"image",val:e.avatar,x:.04*t,y:.04*t,width:.14*t,height:.14*t,d:.14*t},{name:"goodsBg",type:"rect",x:.03*t,y:.3*t,width:.94*t,height:.75*t,r:5},{name:"goodsImage",type:"image",val:e.shareInfo.poster.image,x:.03*t,y:.3*t,width:.94*t,height:.5*t,r:5},{name:"goodsTitle",type:"text",val:e.shareInfo.poster.title,x:.05*t,y:.83*t,maxWidth:.91*t,line:5,lineHeight:10,paintbrushProps:{fillStyle:"#333",font:{fontSize:16}}},{name:"goodsIntroduction",type:"text",val:e.shareInfo.poster.introduction,x:.05*t,y:.89*t,maxWidth:.9*t,height:.1*t,line:3,lineHeight:4,paintbrushProps:{fillStyle:"#333",font:{fontSize:12,fontFamily:"OPPOSANS"}}},{name:"goodsOriginalPrice",type:"text",val:e.shareInfo.poster.original_price>0?"¥"+e.shareInfo.poster.original_price:"",x:.3*t,y:1.32*t,paintbrushProps:{fillStyle:"#999",font:{fontSize:10,fontFamily:"OPPOSANS"}},textDecoration:{line:"line-through",style:"solide"}},{name:"qrcode",type:"qrcode",val:e.shareInfo.link,x:.75*t,y:1.07*t,size:.2*t}]}})(e);case"groupon":return(e=>{const t=e.width,a=S.$store("user").userInfo;return{background:bt(S.$url.cdn(S.$store("app").platform.share.posterInfo.groupon_bg)),list:[{name:"nickname",type:"text",val:a.nickname,x:.22*t,y:.06*t,paintbrushProps:{fillStyle:"#333",font:{fontSize:16,fontFamily:"sans-serif"}}},{name:"avatar",type:"image",val:bt(S.$url.cdn(a.avatar)),x:.04*t,y:.04*t,width:.14*t,height:.14*t,d:.14*t},{name:"goodsImage",type:"image",val:bt(e.shareInfo.poster.image),x:.03*t,y:.21*t,width:.94*t,height:.94*t,r:10},{name:"goodsTitle",type:"text",val:e.shareInfo.poster.title,x:.04*t,y:1.18*t,maxWidth:.91*t,line:2,lineHeight:5,paintbrushProps:{fillStyle:"#333",font:{fontSize:14}}},{name:"goodsPrice",type:"text",val:"¥"+e.shareInfo.poster.price,x:.04*t,y:1.3*t,paintbrushProps:{fillStyle:"#ff0000",font:{fontSize:20,fontFamily:"OPPOSANS"}}},{name:"grouponNum",type:"text",val:"2人团",x:.3*t,y:1.32*t,paintbrushProps:{fillStyle:"#ff0000",font:{fontSize:10,fontFamily:"OPPOSANS"}}},{name:"qrcode",type:"qrcode",val:e.shareInfo.link,x:.75*t,y:1.3*t,size:.2*t}]}})(e)}}function bt(e){return"https:"===window.location.protocol&&0===e.indexOf("http:")&&(e=e.replace("http:","https:")),e}async function yt(e,t){const a=e.width,s=new Je({canvasId:e.canvasId,width:e.width,height:e.height,setCanvasWH:t=>{e.height=t.height}},t);let l=await gt(e);const o=await s.drawImg({type:"image",val:l.background,x:0,y:0,width:a,mode:"widthFix",zIndex:0});await s.updateCanvasWH({width:o.width,height:o.bottom});let n=l.list;for(let i=0;i<n.length;i++){let e=n[i];if("text"===e.type&&await s.drawText(e),"image"===e.type){e.d&&s.setCircle({x:e.x,y:e.y,d:e.d,clip:!0}),e.r&&s.setRect({x:e.x,y:e.y,height:e.height,width:e.width,r:e.r,clip:!0});try{await s.drawImg(e)}catch(r){console.log(r)}s.restore()}if("rect"===e.type){e.r&&s.setRect({x:e.x,y:e.y,height:e.height,width:e.width,r:e.r,clip:!0});try{await s.draw(e)}catch(r){console.log(r)}s.restore()}"qrcode"===e.type&&(console.log(e),await s.drawQrCode(e))}return await s.draw(),setTimeout((async()=>{e.src=await s.toImage()}),100),e}const vt=_e({__name:"index",props:{show:{type:Boolean,default:!1},shareInfo:{type:Object,default(){}}},emits:["success","close"],setup(e,{expose:t,emit:a}){const s=e,d=y({canvasId:"canvasId",width:.9*S.$platform.device.windowWidth,height:600,src:"",imgData:""}),f=a,g=V(),b=()=>{f("close")},v=()=>{["WechatOfficialAccount","H5"].includes(S.$platform.name)?S.$helper.toast("请长按图片保存"):pe({filePath:d.src,success:e=>{b(),S.$helper.toast("保存成功")},fail:e=>{S.$helper.toast("保存失败"),console.log("图片保存失败:",e)}})};return J(""),t({getPoster:async function(e){return d.src="",d.shareInfo=s.shareInfo,await yt(d,g)}}),(t,a)=>{const s=p,f=N,g=ae,y=P,w=l(o("su-popup"),ke);return n(),r(w,{show:e.show,round:"10",onClose:b,type:"center",class:"popup-box"},{default:i((()=>[c(s,{class:"ss-flex-col ss-col-center ss-row-center"},{default:i((()=>[""===d.src?(n(),r(s,{key:0,class:"poster-title ss-flex ss-row-center",style:u({height:d.height+"px",width:d.width+"px"})},{default:i((()=>[h(" 海报加载中... ")])),_:1},8,["style"])):(n(),r(f,{key:1,class:"poster-img",src:d.src,style:u({height:d.height+"px",width:d.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),c(g,{class:"hideCanvas","canvas-id":d.canvasId,id:d.canvasId,style:u({height:d.height+"px",width:d.width+"px"})},null,8,["canvas-id","id","style"]),""!==d.src?(n(),r(s,{key:2,class:"poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"},{default:i((()=>[c(y,{class:"cancel-btn ss-reset-button",onClick:b},{default:i((()=>[h("取消")])),_:1}),c(y,{class:"save-btn ss-reset-button ui-BG-Main",onClick:v},{default:i((()=>[h(" 长按图片保存 ")])),_:1})])),_:1})):m("",!0)])),_:1})])),_:1},8,["show"])}}},[["__scopeId","data-v-db2761e2"]]),wt=_e({__name:"s-share-modal",props:{shareInfo:{type:Object,default(){}}},setup(e){const t=I((()=>S.$store("modal").share)),a=I((()=>S.$store("app").platform.share)),s=J(""),u=e,d=y({showShareGuide:!1,showPosterModal:!1});let f=I((()=>({...u.shareInfo})));const g=()=>{const e=I((()=>S.$store("modal").shareInfo.spuId));ge(),S.$store("user").isLogin?(e.value&&be.getLinkId(3,e.value).then((e=>{0===e.code&&(f.value.link=f.value.link.replace("0",e.data.linkId),f.value.query=f.value.query.replace("0",e.data.linkId))})),k(s).getPoster(),d.showPosterModal=!0):he()},v=()=>{ge(),["WechatOfficialAccount","H5"].includes(S.$platform.name)&&(d.showShareGuide=!0)};function w(){d.showShareGuide=!1}return(e,u)=>{const y=l(o("su-popup"),ke),_=N,x=p,C=b,I=P;return n(),r(x,null,{default:i((()=>[c(y,{show:d.showShareGuide,showClose:!1,onClose:w},null,8,["show"]),d.showShareGuide?(n(),r(x,{key:0,class:"guide-wrap"},{default:i((()=>[c(_,{class:"guide-image",src:k(S).$url.static("/static/images/share_guide.png")},null,8,["src"])])),_:1})):m("",!0),c(y,{show:t.value,round:"10",showClose:!1,onClose:k(ge)},{default:i((()=>[c(x,{class:"share-box"},{default:i((()=>[c(x,{class:"share-list-box ss-flex"},{default:i((()=>[a.value.methods.includes("forward")?(n(),r(I,{key:0,class:"share-item share-btn ss-flex-col ss-col-center","open-type":"share",onClick:v},{default:i((()=>[c(_,{class:"share-img",src:k(S).$url.static("/static/images/share_wx.png"),mode:""},null,8,["src"]),c(C,{class:"share-title"},{default:i((()=>[h("微信好友")])),_:1})])),_:1})):m("",!0),a.value.methods.includes("poster")?(n(),r(I,{key:1,class:"share-item share-btn ss-flex-col ss-col-center",onClick:g},{default:i((()=>[c(_,{class:"share-img",src:k(S).$url.static("/static/images/share_poster.png"),mode:""},null,8,["src"]),c(C,{class:"share-title"},{default:i((()=>[h("生成海报")])),_:1})])),_:1})):m("",!0)])),_:1}),c(x,{class:"share-foot ss-flex ss-row-center ss-col-center",onClick:k(ge)},{default:i((()=>[h(" 取消 ")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["show","onClose"]),c(vt,{ref_key:"SharePosterRef",ref:s,show:d.showPosterModal,shareInfo:k(f),onClose:u[0]||(u[0]=e=>d.showPosterModal=!1)},null,8,["show","shareInfo"])])),_:1})}}},[["__scopeId","data-v-c7b464de"]]),_t=_e({__name:"s-menu-tools",setup(e){const t=I((()=>S.$store("modal").menu)),{t:a}=E();const s=[{url:"/pages/index/index",icon:"/static/images/home.png",title:a("common.home")},{url:"/pages/index/search",icon:"/static/images/search.png",title:a("common.search")},{url:"/pages/index/user",icon:"/static/images/user.png",title:a("menu.personal_center")},{url:"/pages/index/cart",icon:"/static/images/cart.png",title:a("menu.shopping_cart")},{url:"/pages/user/goods-log",icon:"/static/images/browse.png",title:a("menu.browsing_history")},{url:"/pages/user/goods-collect",icon:"/static/images/collect.png",title:a("menu.my_favorites")}];return(e,a)=>{const u=l(o("su-status-bar"),ze),d=p,g=N,b=P,y=l(o("su-popup"),ke);return n(),r(y,{show:t.value,type:"top",round:"20",backgroundColor:"#F0F0F0",onClose:k(ye)},{default:i((()=>[c(u),c(d,{class:"tools-wrap ss-m-x-30 ss-m-b-16"},{default:i((()=>[c(d,{class:"title ss-m-b-34 ss-p-t-20"},{default:i((()=>[h(f(e.$t("menu.quick_menu")),1)])),_:1}),c(d,{class:"container-list ss-flex ss-flex-wrap"},{default:i((()=>[(n(),v(w,null,_(s,(e=>c(d,{class:"list-item ss-m-b-24",key:e.title},{default:i((()=>[c(d,{class:"ss-flex-col ss-col-center"},{default:i((()=>[c(b,{class:"ss-reset-button list-image ss-flex ss-row-center ss-col-center",onClick:t=>function(e){ye(),e.url&&S.$router.go(e.url)}(e)},{default:i((()=>[t.value?(n(),r(g,{key:0,src:k(S).$url.static(e.icon),class:"list-icon"},null,8,["src"])):m("",!0)])),_:2},1032,["onClick"]),c(d,{class:"list-title ss-m-t-20"},{default:i((()=>[h(f(e.title),1)])),_:2},1024)])),_:2},1024)])),_:2},1024))),64))])),_:1})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-259fb900"]]),xt=_e({__name:"s-layout",props:{title:{type:String,default:""},navbar:{type:String,default:"normal"},opacityBgUi:{type:String,default:"bg-white"},color:{type:String,default:""},tools:{type:String,default:"title"},keyword:{type:String,default:""},navbarStyle:{type:Object,default:()=>({mode:"",type:"",color:"",src:"",list:[],alwaysShow:0})},bgStyle:{type:Object,default:()=>({src:"",color:"var(--ui-BG-1)"})},tabbar:{type:[String,Boolean],default:""},onShareAppMessage:{type:[Boolean,Object],default:!0},leftWidth:{type:[Number,String],default:100},rightWidth:{type:[Number,String],default:100},defaultSearch:{type:String,default:""},showLeftButton:{type:Boolean,default:!1}},emits:["search"],setup(e,{emit:t}){const a=e,s=t,h=S.$store("sys");S.$store("user"),S.$store("app"),S.$store("modal");const f=I((()=>h)),g=I((()=>"normal"===a.navbar||"normal"===a.navbarStyle.mode?"normal":"inner")),b=I((()=>"inner"===g.value?{background:`${a.bgStyle.backgroundColor} url(${S.$url.cdn(a.bgStyle.backgroundImage)}) no-repeat top center / 100% auto`}:{})),y=I((()=>"normal"===g.value?{background:`${a.bgStyle.backgroundColor} url(${S.$url.cdn(a.bgStyle.backgroundImage)}) no-repeat top center / 100% auto`}:{})),v=I((()=>!0===a.onShareAppMessage?S.$platform.share.getShareInfo():ve.isEmpty(a.onShareAppMessage)?{}:(S.$platform.share.updateShareInfo(a.onShareAppMessage),a.onShareAppMessage)));return we((()=>{ve.isEmpty(v.value)||S.$platform.share.updateShareInfo(v.value)})),(t,a)=>{const h=l(o("su-navbar"),Oe),w=l(o("s-custom-navbar"),He),_=l(o("su-inner-navbar"),We),x=p,P=l(o("s-tabbar"),Qe),I=l(o("s-wallet-modal"),Xe),A=l(o("s-signup-modal"),Ze),B=l(o("s-follow-modal"),et),T=l(o("s-auth-modal"),dt),$=l(o("s-share-modal"),wt),V=l(o("s-menu-tools"),_t);return n(),r(x,{class:C(["page-app",["theme-"+f.value.mode,"main-"+f.value.theme,"font-"+f.value.fontSize]])},{default:i((()=>[c(x,{class:"page-main",style:u([b.value])},{default:i((()=>["normal"===e.navbar?(n(),r(h,{key:0,title:e.title,statusBar:"",color:e.color,tools:e.tools,opacityBgUi:e.opacityBgUi,onSearch:a[0]||(a[0]=e=>s("search",e)),defaultSearch:e.defaultSearch},null,8,["title","color","tools","opacityBgUi","defaultSearch"])):"custom"===e.navbar&&"normal"===g.value?(n(),r(w,{key:1,data:e.navbarStyle,showLeftButton:e.showLeftButton},null,8,["data","showLeftButton"])):m("",!0),c(x,{class:"page-body",style:u([y.value])},{default:i((()=>["inner"===e.navbar?(n(),r(_,{key:0,title:e.title},null,8,["title"])):m("",!0),"inner"===e.navbar?(n(),r(x,{key:1,style:u([{paddingTop:k(S).$platform.navbar+"px"}])},null,8,["style"])):m("",!0),d(t.$slots,"default",{},void 0,!0),""!==e.tabbar?(n(),r(P,{key:2,path:e.tabbar},null,8,["path"])):m("",!0)])),_:3},8,["style"])])),_:3},8,["style"]),c(x,{class:"page-modal"},{default:i((()=>[c(I),c(A),c(B),c(T),c($,{shareInfo:v.value},null,8,["shareInfo"]),c(V)])),_:1})])),_:3},8,["class"])}}},[["__scopeId","data-v-0789db2f"]]);export{xt as _,Ee as a,Ne as b,ze as c,Fe as d,yt as u};