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{ax as a,ay as s,l as o,m as l,e as r,f as n,w as i,j as u,A as c,a9 as d,t as h,u as f,g as p,i as m,Z as g,E as b,y,k as v,F as w,r as _,C as x,v as k,s as S,B as P,G as C,az as I,aA as $,K as A,c as T,d as B,X as L,Y as M,a7 as D,ao as V,a8 as U,o as E,a6 as F,L as O,x as z,aB as N,aC as R,aD as j,aE as H,D as W,aF as q,W as G,aG as Q,R as X,T as K,N as Z,aH as Y,aI as J,q as ee,al as te,ad as ae,aJ as se,aK as oe,aL as le,aM as re,aN as ne,H as ie,I as ue,aO as ce,aP as de,aQ as he,aR as fe,aS as pe,aT as me,am as ge,an as be,a0 as ye,aU as ve,aV as we,a1 as _e,n as xe}from"./index-b48a414d.js";import{_ as ke}from"./_plugin-vue_export-helper.1b428a4d.js";import{e as Se,_ as Pe,u as Ce,g as Ie,a as $e,b as Ae,d as Te,c as Be,m as Le,p as Me}from"./phone-international-input.feef99c7.js";const De={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:Ve}=a(De);const Ue=ke({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||Ve("uni-search-bar.cancel")},placeholderText(){return this.placeholder||Ve("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=o(l("uni-icons"),Se),_=m,x=g,k=b;return r(),n(_,{class:"uni-searchbar"},{default:i((()=>[u(_,{style:c({borderRadius:a.radius+"px",backgroundColor:a.bgColor}),class:"uni-searchbar__box",onClick:v.searchClick},{default:i((()=>[u(_,{class:"uni-searchbar__box-icon-search"},{default:i((()=>[d(e.$slots,"searchIcon",{},(()=>[u(w,{color:"#c0c4cc",size:"18",type:"search"})]),!0)])),_:3}),y.show||y.searchVal?(r(),n(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"])):(r(),n(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?(r(),n(_,{key:2,class:"uni-searchbar__box-icon-clear",onClick:v.clear},{default:i((()=>[d(e.$slots,"clearIcon",{},(()=>[u(w,{color:"#c0c4cc",size:"20",type:"clear"})]),!0)])),_:3},8,["onClick"])):p("",!0)])),_:3},8,["style","onClick"]),"always"===a.cancelButton||y.show&&"auto"===a.cancelButton?(r(),n(k,{key:0,onClick:v.cancel,class:"uni-searchbar__cancel"},{default:i((()=>[h(f(v.cancelTextI18n),1)])),_:1},8,["onClick"])):p("",!0)])),_:3})}],["__scopeId","data-v-d1d127ff"]]),Ee=ke({__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=m,I=o(l("uni-search-bar"),Ue),$=C;return r(),n(y,{class:P(["search-content ss-flex ss-col-center ss-row-between",[{"border-content":e.navbar}]]),onClick:g,style:c([{borderRadius:e.radius+"px",background:e.elBackground,height:e.height+"px",width:e.width}])},{default:i((()=>[e.navbar?(r(),n(y,{key:0,class:"ss-flex ss-col-center"},{default:i((()=>[u(y,{class:"search-icon _icon-search ss-m-l-10",style:c([{color:d.iconColor}])},null,8,["style"]),u(y,{class:"search-input ss-flex-1 ss-line-1",style:c([{color:e.fontColor,width:e.width}])},{default:i((()=>[h(f(e.placeholder),1)])),_:1},8,["style"])])),_:1})):p("",!0),e.navbar?p("",!0):(r(),n(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"])),u(y,{class:"keyword-link ss-flex"},{default:i((()=>[(r(!0),v(w,null,_(e.data.hotKeywords,((t,a)=>(r(),n(y,{key:a},{default:i((()=>[u(y,{class:"ss-m-r-16",style:c([{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?(r(),n(y,{key:2,class:"ss-flex"},{default:i((()=>[(r(!0),v(w,null,_(e.data.hotKeywords,((t,a)=>(r(),n($,{class:"ss-reset-button keyword-btn",key:a,style:c([{color:e.data.textColor,marginRight:"10rpx"}])},{default:i((()=>[h(f(t),1)])),_:2},1032,["style"])))),128))])),_:1})):p("",!0)])),_:1},8,["style","class"])}}},[["__scopeId","data-v-69949848"]]),Fe=e=>{let t="0.00";if(void 0===e)return t;const a=(e=>{if(void 0===e)return 0;const t="string"==typeof e?parseFloat(e):e;return parseFloat((t/100).toFixed(2))})(e),s=a.toString().split(".")[1];switch(s?s.length:0){case 0:t=a.toString()+".00";break;case 1:t=a.toString()+".0";break;case 2:t=a.toString()}return t};function Oe(e,t){return e?(void 0===t&&(t="YYYY-MM-DD HH:mm:ss"),I(e).format(t)):""}function ze(e,t="id",a="parentId",s="children",o=0){const l=JSON.parse(JSON.stringify(e)),r=l.filter((e=>{let s=l.filter((s=>e[t]===s[a]));return s.length>0&&(e.children=s),e[a]===o}));return""!==r?r:e}function Ne(e){e.list=[],e.total=0,e.pageNo=1}function Re(e,t){return He("exact"!==e&&t<10?"销量":"已售",e,t)}function je(e,t){return He("库存",e,t)}function He(e,t,a){if(a=a||0,"exact"===t)return e+a;if(a<10)return`${e}≤10`;let s=Math.pow(10,`${a}`.length-1);return`${e}${a/s*s}+`}const We=[".avi",".mp4"];function qe(e){return(null==e?void 0:e.filter((e=>e)).map(((e,t)=>({type:We.some((t=>e.includes(t)))?"video":"image",src:$.cdn(e)}))))||[]}function Ge(e){return 0===e.status?"info-color":10===e.status||20===e.status||30===e.status&&!e.commentStatus?"warning-color":30===e.status&&e.commentStatus?"success-color":"danger-color"}function Qe(e){return 0===e.status?"待付款":10===e.status&&1===e.deliveryType||10===e.status&&3===e.deliveryType?"待发货":10===e.status&&2===e.deliveryType?"待核销":20===e.status?"待收货":30!==e.status||e.commentStatus?30===e.status&&e.commentStatus?"已完成":"已关闭":"待评价"}function Xe(e){return 0===e.status?`请在 ${Oe(orderInfo.payExpireTime)} 前完成支付`:10===e.status?"商家未发货,请耐心等待":20===e.status?"商家已发货,请耐心等待":30!==e.status||e.commentStatus?30===e.status&&e.commentStatus?"交易完成,感谢您的支持":"交易关闭":"已收货,快去评价一下吧"}function Ke(e){e.buttons=[],3===e.type&&e.buttons.push("combination"),20===e.status&&(e.buttons.push("express"),e.buttons.push("confirm")),e.logisticsId>0&&e.buttons.push("express"),0===e.status&&(e.buttons.push("cancel"),e.buttons.push("pay")),30!==e.status||e.commentStatus||e.buttons.push("comment"),40===e.status&&e.buttons.push("delete")}function Ze(e){return 10===e.status?"申请售后":20===e.status?"商品待退货":30===e.status?"商家待收货":40===e.status?"等待退款":50===e.status?"退款成功":61===e.status?"买家取消":62===e.status?"商家拒绝":63===e.status?"商家拒收货":"未知状态"}function Ye(e){return 10===e.status?"退款申请待商家处理":20===e.status?"请退货并填写物流信息":30===e.status?"退货退款申请待商家处理":40===e.status?"等待退款":50===e.status?"退款成功":61===e.status?"退款关闭":62===e.status?`商家不同意退款申请,拒绝原因:${e.auditReason}`:63===e.status?`商家拒绝收货,不同意退款,拒绝原因:${e.auditReason}`:"未知状态"}function Je(e){e.buttons=[],[10,20,30].includes(e.status)&&e.buttons.push("cancel"),20===e.status&&e.buttons.push("delivery")}function et(e,t=""){e=function(e){if((e=e.toString()).indexOf("-")>0)return I(e);if(e.length>10)return I(parseInt(e));if(10===e.length)return I.unix(parseInt(e))}(e),""===t&&(t=I());let a=A(e-t);a.value>0&&setTimeout((()=>{a.value>0&&(a.value-=1e3)}),1e3);let s=I.duration(a.value);return{h:(30*s.months()*24+24*s.days()+s.hours()).toString().padStart(2,"0"),m:s.minutes().toString().padStart(2,"0"),s:s.seconds().toString().padStart(2,"0"),ms:s.$ms}}function at(e){return(e/100).toFixed(2)}function st(e){return(e/100).toFixed(6)}function ot(e){return(e/1e6).toFixed(3).slice(0,-1)}function lt(e){let t=[];for(const a of e)if(a.properties)for(const e of a.properties){let a=t.find((t=>t.id===e.propertyId));a||(a={id:e.propertyId,name:e.propertyName,values:[]},t.push(a)),a.values.find((t=>t.id===e.valueId))||a.values.push({id:e.valueId,name:e.valueName})}return t}function rt(e,t){return 10===e.conditionType?`满 ${at(t.limit)} 元减 ${at(t.discountPrice)} 元`:20===e.conditionType?`满 ${t.limit} 件减 ${at(t.discountPrice)} 元`:""}const nt=ke({__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(),o=S.$platform.navbar,l=y({content:{},fixed:!0,scrollTop:0,opacityVal:0}),h=T((()=>l.fixed&&f.bottom?f.isInset?f.val+"px":f.val+t.bottom+"px":"auto")),f=e;l.fixed=!k(f.sticky),B((e=>{let t=e.scrollTop;l.scrollTop=t,l.opacityVal=t>S.$platform.navbar?1:.01*t})),L((()=>{M((()=>{g()}))}));const g=()=>{D().in(a).select(`#fixed-${s}`).boundingClientRect((e=>{null!=e&&(l.content=e,k(f.sticky)&&b(l.scrollTop))})).exec()},b=e=>{k(f.bottom)?l.fixed=e>=l.content.bottom-S.$platform.device.windowHeight+l.content.height+k(f.val):l.fixed=e>=l.content.top-(k(f.noNav)?k(f.val):k(f.val)+S.$platform.navbar)},v=()=>{f.hasToTop&&U({scrollTop:l.content.top,duration:100})};return(a,f)=>{const g=m;return r(),n(g,{class:"ui-fixed"},{default:i((()=>[u(g,{class:P(["ui-fixed-box",[{fixed:l.fixed}]]),id:`fixed-${k(s)}`,style:c([{left:e.sticky?"auto":"0px",top:l.fixed&&!e.bottom?(e.noNav?e.val:e.val+k(o))+"px":"auto",bottom:h.value,zIndex:e.index+k(S).$zIndex.navbar},e.alway?"":{opacity:l.opacityVal}])},{default:i((()=>[u(g,{class:"ui-fixed-content",onClick:v,style:c([{zIndex:e.index+k(S).$zIndex.navbar}])},{default:i((()=>[d(a.$slots,"default",{},void 0,!0),k(t).bottom&&e.bottom&&e.isInset?(r(),n(g,{key:0,class:"inset-bottom",style:c([{height:k(t).bottom+"px"}])},null,8,["style"])):p("",!0)])),_:3},8,["style"]),e.bottom?(r(),n(g,{key:0,class:P(["ui-fixed-bottom",[e.bg]])},null,8,["class"])):p("",!0),u(g,{class:P(["ui-fixed-bg",[e.ui,e.bg]]),style:c([{zIndex:e.index+k(S).$zIndex.navbar-1},e.bgStyles,e.opacity?{opacity:l.opacityVal}:""])},null,8,["class","style"])])),_:3},8,["id","class","style"]),(e.sticky||e.placeholder)&&l.fixed?(r(),n(g,{key:0,class:"skeleton",style:c([{height:l.content.height+"px",width:e.width+"px"}])},null,8,["style"])):p("",!0)])),_:3})}}},[["__scopeId","data-v-bb090a1f"]]),it=ke({__name:"su-status-bar",setup(e){const t=S.$platform.device.statusBarHeight+"px";return(e,a)=>{const s=m;return r(),n(s,{style:c({height:t}),class:"uni-status-bar"},{default:i((()=>[d(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"])}}},[["__scopeId","data-v-c47205c9"]]),ut=ke({__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;T((()=>({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=T((()=>g.defaultSearch));T((()=>g.dark?g.backgroundColor?g.backgroundColor:g.dark?"#333":"#FFF":g.backgroundColor||"#FFF"));const v=T((()=>g.dark?g.color?g.color:g.dark?"#fff":"#333":g.color||"#333")),w=T((()=>a(g.height))),_=T((()=>a(g.leftWidth)));function x(e){s("search",e.value)}T((()=>a(g.rightWidth))),E((()=>{uni.report&&""!==g.title&&uni.report("title",g.title)}));const C=S.$router.hasHistory();function I(){C?S.$router.back():S.$router.go("/pages/index/index"),s("clickLeft")}function $(){s("clickTitle")}return(t,a)=>{const s=m,g=o(l("su-status-bar"),it),A=b,T=o(l("uni-search-bar"),Ue);return r(),n(s,{class:P(["uni-navbar",{"uni-dark":e.dark}])},{default:i((()=>[u(s,{class:P([{"uni-navbar--fixed":e.fixed,"uni-navbar--shadow":e.shadow,"uni-navbar--border":e.border},"uni-navbar__content"])},{default:i((()=>[u(s,{class:P(["fixed-bg",[e.opacity?"":e.opacityBgUi]])},null,8,["class"]),e.statusBar?(r(),n(g,{key:0})):p("",!0),u(s,{style:c({color:v.value,height:w.value,background:e.backgroundColor}),class:"uni-navbar__header"},{default:i((()=>[u(s,{class:"uni-navbar__header-btns uni-navbar__header-btns-left",style:c({width:_.value})},{default:i((()=>[d(t.$slots,"left",{},(()=>[e.leftIcon.length>0?(r(),n(s,{key:0,class:"uni-navbar__content_view"},{default:i((()=>[u(s,{class:"icon-box ss-flex"},{default:i((()=>[u(s,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:I},{default:i((()=>[k(C)?(r(),n(A,{key:0,class:"sicon-back"})):(r(),n(A,{key:1,class:"sicon-home"}))])),_:1}),u(s,{class:"line"}),u(s,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:k(F)},{default:i((()=>[u(A,{class:"sicon-more"})])),_:1},8,["onClick"])])),_:1})])),_:1})):p("",!0),"left"===e.titleAlign&&e.title.length&&"WechatOfficialAccount"!==k(S).$platform.name?(r(),n(s,{key:1,class:P([{"uni-navbar-btn-icon-left":!e.leftIcon.length>0},"uni-navbar-btn-text"])},{default:i((()=>[u(A,{style:c({color:v.value,fontSize:"18px"})},{default:i((()=>[h(f(e.title),1)])),_:1},8,["style"])])),_:1},8,["class"])):p("",!0)]),!0)])),_:3},8,["style"]),"search"===e.tools?(r(),n(s,{key:0,class:"ss-flex-1"},{default:i((()=>[d(t.$slots,"center",{},(()=>[u(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})):(r(),n(s,{key:1,class:"uni-navbar__header-container",onClick:$},{default:i((()=>[d(t.$slots,"center",{},(()=>["title"===e.tools&&"center"===e.titleAlign&&e.title.length?(r(),n(s,{key:0,class:"uni-navbar__header-container-inner"},{default:i((()=>[u(A,{style:c({color:v.value,fontSize:"36rpx"}),class:"ss-line-1"},{default:i((()=>[h(f(e.title),1)])),_:1},8,["style"])])),_:1})):p("",!0)]),!0)])),_:3}))])),_:3},8,["style"])])),_:3},8,["class"]),e.placeholder?(r(),n(s,{key:0,class:"uni-navbar__placeholder"},{default:i((()=>[e.statusBar?(r(),n(g,{key:0})):p("",!0),u(s,{class:"uni-navbar__placeholder-view",style:c({height:w.value})},null,8,["style"])])),_:1})):p("",!0)])),_:3},8,["class"])}}},[["__scopeId","data-v-c05a9774"]]),ct=ke({__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;O((()=>{p()}));const p=()=>{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=o(l("su-status-bar"),it),p=m,g=o(l("su-fixed"),nt);return r(),n(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((()=>[u(a),u(p,{class:"ui-navbar-box"},{default:i((()=>[u(p,{class:P(["ui-bar",""==f.status?"text-a":"light"==f.status?"text-white":"text-black"]),style:c([{height:k(h)-k(s)+"px"}])},{default:i((()=>[d(e.$slots,"item",{},void 0,!0),u(p,{class:"right"})])),_:3},8,["class","style"])])),_:3})])),_:3},8,["noFixed","alway","bgStyles","index","bg","ui","opacity","placeholder","sticky"])}}},[["__scopeId","data-v-1b1aaaf2"]]),dt=ke({__name:"navbar-item",props:{data:{type:Object,default:()=>({})},width:{type:String,default:"1px"}},setup(e){const t=T((()=>S.$platform.capsule.height));return(a,s)=>{const d=m,g=z,b=o(l("s-search-block"),Ee);return r(),n(d,{class:"ss-flex ss-col-center"},{default:i((()=>["text"===e.data.type?(r(),n(d,{key:0,class:"nav-title inline",style:c([{color:e.data.textColor,width:e.width}])},{default:i((()=>[h(f(e.data.text),1)])),_:1},8,["style"])):p("",!0),"image"===e.data.type?(r(),n(d,{key:1,style:c([{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((()=>[u(g,{class:"nav-image",src:k(S).$url.cdn(e.data.src),mode:"aspectFit"},null,8,["src"])])),_:1},8,["style"])):p("",!0),"search"==e.data.type?(r(),n(d,{key:2,class:"ss-flex-1",style:c([{width:e.width}])},{default:i((()=>[u(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"])):p("",!0)])),_:1})}}},[["__scopeId","data-v-89a97bd5"]]),ht=ke({__name:"s-custom-navbar",props:{data:{type:Object,default:()=>({})},showLeftButton:{type:Boolean,default:!1}},setup(e){const t=e,a=S.$router.hasHistory(),s=T((()=>("inner"!=t.data.mode||!t.data.alway)&&("normal"!=t.data.mode&&void 0))),o=T((()=>t.data.list?t.data.list.app:[])),l=S.$platform.device.windowWidth,d=T((()=>{if(k(o).length){return(l-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=T((()=>"inner"!==t.data.mode||Boolean(t.data.alwaysShow))),g=T((()=>"normal"!==t.data.mode&&(!t.showLeftButton&&"inner"===t.data.mode))),y=T((()=>"normal"===t.data.mode)),x=T((()=>{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 C(){a?S.$router.back():S.$router.go("/pages/index/index")}function I(){F()}return(t,l)=>{const d=b,S=m;return r(),n(ct,{alway:f.value,back:!1,bg:"",placeholder:y.value,bgStyles:x.value,opacity:g.value,sticky:s.value},{item:i((()=>[u(S,{class:"nav-box"},{default:i((()=>[e.showLeftButton?(r(),n(S,{key:0,class:"nav-icon"},{default:i((()=>[u(S,{class:P(["icon-box ss-flex",{"inner-icon-box":"inner"==e.data.mode}])},{default:i((()=>[u(S,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:C},{default:i((()=>[k(a)?(r(),n(d,{key:0,class:"sicon-back"})):(r(),n(d,{key:1,class:"sicon-home"}))])),_:1}),u(S,{class:"line"}),u(S,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:I},{default:i((()=>[u(d,{class:"sicon-more"})])),_:1})])),_:1},8,["class"])])),_:1})):p("",!0),(r(!0),v(w,null,_(o.value,((e,t)=>(r(),n(S,{class:P(["nav-item",[{"ss-flex ss-col-center ss-row-center":"search"!==e.type}]]),key:t,style:c([h(e)])},{default:i((()=>[u(dt,{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"]]),ft=ke({__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,p=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(){F()}O((()=>{C()})),B((e=>{let t=e.scrollTop;a.isDark=t<S.$platform.navbar}));const C=()=>{a.capsuleStyle={width:S.$platform.capsule.width+"px",height:S.$platform.capsule.height+"px"},a.capsuleBack=a.capsuleStyle};return(t,y)=>{const v=o(l("su-status-bar"),it),S=b,C=m,I=o(l("su-fixed"),nt);return r(),n(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((()=>[u(v),u(C,{class:"ui-navbar-box"},{default:i((()=>[u(C,{class:P(["ui-bar ss-p-x-20",a.isDark?"text-white":"text-black"]),style:c([{height:k(p)-k(s)+"px"}])},{default:i((()=>[u(C,{class:"icon-box ss-flex"},{default:i((()=>[u(C,{class:"icon-button icon-button-left ss-flex ss-row-center",onClick:_},{default:i((()=>[k(w)?(r(),n(S,{key:0,class:"sicon-back"})):(r(),n(S,{key:1,class:"sicon-home"}))])),_:1}),u(C,{class:"line"}),u(C,{class:"icon-button icon-button-right ss-flex ss-row-center",onClick:x},{default:i((()=>[u(S,{class:"sicon-more"})])),_:1})])),_:1}),d(t.$slots,"center",{},(()=>[u(C,{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 pt=ke({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:N,parentData:{value:null,activeColor:"",color:""},parent:{}}),created(){this.init()},methods:{getParentData(e=""){this.parent||(this.parent={}),this.parent=R.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,o,l){const p=z,g=m,y=b;return r(),n(g,{class:"u-tabbar-item",style:c([o.addStyle(a.customStyle)])},{default:i((()=>[a.isCenter?(r(),n(g,{key:0,class:"tabbar-center-item"},{default:i((()=>[u(p,{class:"center-image",src:a.centerImage,mode:"aspectFill"},null,8,["src"])])),_:1})):(r(),v(w,{key:1},[u(g,{class:"u-tabbar-item__icon"},{default:i((()=>[a.icon?(r(),n(p,{key:0,name:a.icon,color:o.isActive?o.parentData.activeColor:o.parentData.color,size:20},null,8,["name","color"])):(r(),v(w,{key:1},[o.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",{},(()=>[u(y,{class:"u-tabbar-item__text",style:c({color:o.isActive?o.parentData.activeColor:o.parentData.color})},{default:i((()=>[h(f(a.text),1)])),_:1},8,["style"])]),!0)],64))])),_:3},8,["style"])}],["__scopeId","data-v-191720f8"]]);const mt=ke({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 j(e,N(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=>{D().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 H(20),this.getRect(".u-tabbar__content").then((({height:e=50})=>{this.placeholderHeight=e})))}}},[["render",function(e,t,a,s,o,l){const h=m;return r(),n(h,{class:"u-tabbar"},{default:i((()=>[u(h,{class:P(["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:c([l.tabbarStyle])},{default:i((()=>[u(h,{class:"u-tabbar__content__item-wrapper"},{default:i((()=>[d(e.$slots,"default",{},void 0,!0)])),_:3}),a.safeAreaInsetBottom?(r(),n(h,{key:0,style:c([{height:o.safeBottomHeight+"px"}])},null,8,["style"])):p("",!0)])),_:3},8,["class","style"]),a.placeholder?(r(),n(h,{key:0,class:"u-tabbar__placeholder",style:c({height:o.placeholderHeight+"px"})},null,8,["style"])):p("",!0)])),_:3})}],["__scopeId","data-v-cc8282eb"]]),gt=ke({__name:"s-tabbar",props:{path:String,default:""},setup(e){const t=T((()=>{var e;return null==(e=S.$store("app").template.basic)?void 0:e.tabbar})),a=T((()=>{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(c,d)=>{var h,f;const g=z,b=o(l("su-tabbar-item"),pt),y=o(l("su-tabbar"),mt),x=m;return(null==(f=null==(h=t.value)?void 0:h.items)?void 0:f.length)>0?(r(),n(x,{key:0,class:"u-page__item"},{default:i((()=>[u(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((()=>[(r(!0),v(w,null,_(t.value.items,((e,t)=>(r(),n(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((()=>[u(g,{class:"u-page__item__slot-icon",src:k(S).$url.cdn(e.activeIconUrl)},null,8,["src"])])),"inactive-icon":i((()=>[u(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})):p("",!0)}}},[["__scopeId","data-v-2389827b"]]),bt=ke({__name:"s-wallet-modal",setup(e){W((e=>({"290b75ee":k(t)})));const t=S.$url.css("/static/images/sign.png"),a=T((()=>S.$store("modal").getWallet)),s=T((()=>S.$store("modal").getWalletInfo));return(e,t)=>{const c=b,d=m,g=C,y=o(l("su-popup"),Pe);return r(),n(y,{show:a.value,onClose:k(q),type:"center",round:"10"},{default:i((()=>[u(d,{class:"model-box ss-flex-col"},{default:i((()=>[u(d,{class:"ss-m-t-56 ss-flex-col ss-col-center"},{default:i((()=>[u(c,{class:"cicon-check-round"}),u(d,{class:"score-title"},{default:i((()=>[h("恭喜")])),_:1}),s.value.points&&k(ot)(s.value.points)>0||s.value.socialStatus?(r(),v(w,{key:0},[s.value.points&&k(ot)(s.value.points)>0?(r(),n(d,{key:0,class:"model-title ss-flex ss-col-center ss-m-t-15 ss-font-35"},{default:i((()=>[h(" 获得积分:"+f(k(ot)(s.value.points)),1)])),_:1})):p("",!0),s.value.socialStatus?(r(),n(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})):p("",!0),u(d,{class:"model-title ss-flex ss-col-center ss-m-y-15"},{default:i((()=>[h(" 【待确权】 ")])),_:1})],64)):(r(),n(d,{key:1,class:"model-title ss-flex ss-col-center ss-m-y-15"},{default:i((()=>[h(" 下单成功 ")])),_:1}))])),_:1}),u(d,{class:"model-bg ss-flex-col ss-col-center ss-row-right"},{default:i((()=>[u(d,{class:"ss-m-b-40"},{default:i((()=>[u(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-d1358e49"]]),yt=ke({__name:"s-signup-modal",setup(e){W((e=>({"42c80bd2":k(t)})));const t=S.$url.css("/static/images/sign.png"),a=T((()=>S.$store("modal").signUp)),s=T((()=>S.$store("modal").signUpInfo));return G((()=>a.value),(e=>{e&&setTimeout(Q,3e3)})),(e,t)=>{const c=b,d=m,g=C,y=o(l("su-popup"),Pe);return r(),n(y,{show:a.value,onClose:k(Q),type:"center",round:"10"},{default:i((()=>[u(d,{class:"model-box ss-flex-col"},{default:i((()=>[u(d,{class:"ss-m-t-56 ss-flex-col ss-col-center"},{default:i((()=>{var e;return[u(c,{class:"cicon-check-round"}),u(d,{class:"score-title"},{default:i((()=>[h("恭喜!自动签到成功!")])),_:1}),u(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)?(r(),n(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})):p("",!0)]})),_:1}),u(d,{class:"model-bg ss-flex-col ss-col-center ss-row-right"},{default:i((()=>[u(d,{class:"ss-m-b-40"},{default:i((()=>[u(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"]]),vt=ke({__name:"account-login",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(e,{emit:t}){const a=A(null),s=t,c=e,d=y({model:{username:"",password:""},rules:{username:Ce,password:Ie}});async function f(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;if(!c.agreeStatus)return s("onConfirm",!0),void S.$helper.toast("请勾选同意");const{code:e,data:t}=await X.login(d.model);0===e&&K()}return(e,t)=>{const s=o(l("uni-easyinput"),$e),c=o(l("uni-forms-item"),Ae),p=o(l("uni-forms"),Te),g=C,b=m;return r(),n(b,null,{default:i((()=>[u(p,{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((()=>[u(c,{name:"username",label:"用户名",class:"loginUniFormItem"},{default:i((()=>[u(s,{placeholder:"请输入用户名",modelValue:d.model.username,"onUpdate:modelValue":t[0]||(t[0]=e=>d.model.username=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),u(c,{name:"password",label:"密码",class:"loginUniFormItem"},{default:i((()=>[u(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"]),u(b,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[u(g,{class:"ss-reset-button login-btn-start",onClick:f},{default:i((()=>[h("登录")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-90a14fae"]]),wt=ke({__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=A(null),c=t,d=e,f=y({verifyUsername:!0,usernameErrorMsg:"",isMobileEnd:!1,codeText:"获取验证码",mobileErrorMsg:"",model:{username:"",mobile:"",code:""},rules:{username:Ce,code:Be,mobile:Le}});let p=A("");async function g(e){const t=e.detail.value;if(""==t||t==p.value)return!1;p.value=t;const{data:a}=await X.verifyUsername(t);a?(f.usernameErrorMsg="请输入正确的用户名!",f.verifyUsername=a):(f.usernameErrorMsg="",f.verifyUsername=a)}async function b(){const e=Z("linkId");e&&(f.model.linkId=e);if(!(await k(s).validate().catch((e=>{console.log("error: ",e)}))))return;if(!d.agreeStatus)return c("onConfirm",!0),void S.$helper.toast("请勾选同意");const{code:t}=await X.smsLogin(f.model);0===t&&K()}return(e,t)=>{const c=z,d=m,p=o(l("uni-easyinput"),$e),y=o(l("uni-forms-item"),Ae),v=o(l("uni-forms"),Te),w=C;return r(),n(d,null,{default:i((()=>[u(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((()=>[u(y,{name:"username",label:"用户名",class:"loginUniFormItem","error-message":f.usernameErrorMsg},{default:i((()=>[u(p,{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?(r(),n(d,{key:0,class:"icon"},{default:i((()=>[u(c,{style:"",src:k(S).$url.static("/static/images/shibai.png")},null,8,["src"])])),_:1})):(r(),n(d,{key:1,class:"icon"},{default:i((()=>[u(c,{src:k(S).$url.static("/static/images/chenggong.png")},null,8,["src"])])),_:1}))])),_:1},8,["modelValue"])])),_:1},8,["error-message"]),u(y,{name:"mobile",label:"手机号",class:"mobile loginUniFormItem ss-p-t-10","error-message":f.mobileErrorMsg},{default:i((()=>[u(Me,{"verify-username":!f.verifyUsername,onInput:a},null,8,["verify-username"])])),_:1},8,["error-message"]),u(y,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[u(p,{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"]),u(d,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[u(w,{class:"ss-reset-button login-btn-start",onClick:b},{default:i((()=>[h(" 登录 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-2ebe60f2"]]),_t=ke({__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:Ce,password:Ie,code:Be}}),c=A(null),d=t,f=e;let p=A("");async function g(e){const t=e.detail.value;if(""==t||t==p.value)return!1;p.value=t;const{data:a}=await X.verifyUsername(t);a?(s.usernameErrorMsg="",s.verifyUsername=a):(s.usernameErrorMsg="已存在用户名!",s.verifyUsername=a)}async function b(){console.log(s.model);if(!(await k(c).validate().catch((e=>{console.log("error: ",e)}))))return;if(!f.agreeStatus)return d("onConfirm",!0),void S.$helper.toast("请勾选同意");const e=Z("linkId");if(!e)return S.$helper.toast("您只能通过分享注册"),!1;s.model.linkId=e;const{code:t}=await X.register(s.model);0===t&&K()}return(e,t)=>{const d=z,f=m,p=o(l("uni-easyinput"),$e),y=o(l("uni-forms-item"),Ae),v=o(l("uni-forms"),Te),w=C;return r(),n(f,null,{default:i((()=>[u(v,{ref_key:"smsLoginRef",ref:c,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((()=>[u(y,{name:"username",label:"用户名",class:"loginUniFormItem","error-message":s.usernameErrorMsg},{default:i((()=>[u(p,{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?(r(),n(f,{key:1,class:"icon"},{default:i((()=>[u(d,{src:k(S).$url.static("/static/images/chenggong.png")},null,8,["src"])])),_:1})):(r(),n(f,{key:0,class:"icon"},{default:i((()=>[u(d,{style:"",src:k(S).$url.static("/static/images/shibai.png")},null,8,["src"])])),_:1}))])),_:1},8,["modelValue"])])),_:1},8,["error-message"]),u(y,{name:"password",label:"密码",class:"loginUniFormItem"},{default:i((()=>[u(p,{type:"password",placeholder:"请输入密码",modelValue:s.model.password,"onUpdate:modelValue":t[1]||(t[1]=e=>s.model.password=e),inputBorder:!1},null,8,["modelValue"])])),_:1}),u(y,{name:"mobile",label:"手机号",class:"mobile loginUniFormItem ss-p-t-10","error-message":s.mobileErrorMsg},{default:i((()=>[u(Me,{"verify-username":s.verifyUsername,onInput:a},null,8,["verify-username"])])),_:1},8,["error-message"]),u(y,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[u(p,{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"]),u(f,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[u(w,{class:"ss-reset-button login-btn-start",onClick:b},{default:i((()=>[h(" 注册 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-b5ad59e6"]]),xt=ke({__name:"reset-password",setup(e){const t=A(null),a=T((()=>S.$store("user").isLogin)),s=y({isMobileEnd:!1,model:{mobile:"",code:"",password:""},rules:{code:Be,mobile:Le,password:Ie}}),c=async()=>{if(!(await k(t).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await te.resetUserPassword(s.model);0===e&&ee("accountLogin")};return(e,d)=>{const g=m,b=C,y=o(l("uni-easyinput"),$e),v=o(l("uni-forms-item"),Ae),w=o(l("uni-forms"),Te);return r(),n(g,null,{default:i((()=>[u(g,{class:"head-box ss-m-b-60"},{default:i((()=>[u(g,{class:"head-title ss-m-b-20"},{default:i((()=>[h("重置密码")])),_:1}),u(g,{class:"head-subtitle"},{default:i((()=>[h("为了您的账号安全,设置密码前请先进行安全验证")])),_:1})])),_:1}),u(w,{ref_key:"resetPasswordRef",ref:t,modelValue:s.model,"onUpdate:modelValue":d[4]||(d[4]=e=>s.model=e),rules:s.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[u(v,{name:"mobile",label:"手机号"},{default:i((()=>[u(y,{placeholder:"请输入手机号",modelValue:s.model.mobile,"onUpdate:modelValue":d[1]||(d[1]=e=>s.model.mobile=e),type:"number",inputBorder:!1},{right:i((()=>[u(b,{class:P(["ss-reset-button code-btn code-btn-start",{"code-btn-end":s.isMobileEnd}]),disabled:s.isMobileEnd,onClick:d[0]||(d[0]=e=>k(Y)("resetPassword",s.model.mobile))},{default:i((()=>[h(f(k(J)("resetPassword")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),u(v,{name:"code",label:"验证码"},{default:i((()=>[u(y,{placeholder:"请输入验证码",modelValue:s.model.code,"onUpdate:modelValue":d[2]||(d[2]=e=>s.model.code=e),type:"number",maxlength:"4",inputBorder:!1},null,8,["modelValue"])])),_:1}),u(v,{name:"password",label:"密码"},{default:i((()=>[u(y,{type:"password",placeholder:"请输入密码",modelValue:s.model.password,"onUpdate:modelValue":d[3]||(d[3]=e=>s.model.password=e),inputBorder:!1},{right:i((()=>[u(b,{class:"ss-reset-button login-btn-start",onClick:c},{default:i((()=>[h(" 确认 ")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),a.value?p("",!0):(r(),n(b,{key:0,class:"ss-reset-button type-btn",onClick:d[5]||(d[5]=e=>k(ee)("accountLogin"))},{default:i((()=>[h(" 返回登录 ")])),_:1}))])),_:1})}}},[["__scopeId","data-v-35234133"]]),kt=ke({__name:"change-mobile",setup(e){const t=A(null),a=T((()=>S.$store("user").userInfo)),s=y({isMobileEnd:!1,model:{mobile:"",code:""},rules:{code:Be,mobile:Le}});async function c(){if(!(await k(t).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await te.updateUserMobile(s.model);0===e&&(S.$store("user").getInfo(),K())}async function d(e){if("getPhoneNumber:ok"!==e.detail.errMsg)return;await S.$platform.useProvider().bindUserPhoneNumber(e.detail)&&(S.$store("user").getInfo(),K())}return(e,g)=>{const b=m,y=C,v=o(l("uni-easyinput"),$e),w=o(l("uni-forms-item"),Ae),_=o(l("uni-forms"),Te);return r(),n(b,null,{default:i((()=>[u(b,{class:"head-box ss-m-b-60"},{default:i((()=>[u(b,{class:"head-title ss-m-b-20"},{default:i((()=>[h(f(a.value.mobile?"更换手机号":"绑定手机号"),1)])),_:1}),u(b,{class:"head-subtitle"},{default:i((()=>[h("为了您的账号安全,请使用本人手机号码")])),_:1})])),_:1}),u(_,{ref_key:"changeMobileRef",ref:t,modelValue:s.model,"onUpdate:modelValue":g[3]||(g[3]=e=>s.model=e),rules:s.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[u(w,{name:"mobile",label:"手机号"},{default:i((()=>[u(v,{placeholder:"请输入手机号",modelValue:s.model.mobile,"onUpdate:modelValue":g[1]||(g[1]=e=>s.model.mobile=e),inputBorder:!1,type:"number"},{right:i((()=>[u(y,{class:P(["ss-reset-button code-btn-start",{"code-btn-end":s.isMobileEnd}]),disabled:s.isMobileEnd,onClick:g[0]||(g[0]=e=>k(Y)("changeMobile",s.model.mobile))},{default:i((()=>[h(f(k(J)("changeMobile")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),u(w,{name:"code",label:"验证码"},{default:i((()=>[u(v,{placeholder:"请输入验证码",modelValue:s.model.code,"onUpdate:modelValue":g[2]||(g[2]=e=>s.model.code=e),inputBorder:!1,type:"number",maxlength:"4"},{right:i((()=>[u(y,{class:"ss-reset-button login-btn-start",onClick:c},{default:i((()=>[h(" 确认 ")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),"WechatMiniProgram"===k(S).$platform.name?(r(),n(y,{key:0,class:"ss-reset-button type-btn","open-type":"getPhoneNumber",onGetphonenumber:d},{default:i((()=>[h(" 使用微信手机号 ")])),_:1})):p("",!0)])),_:1})}}},[["__scopeId","data-v-0241a05b"]]),St=ke({__name:"change-password",setup(e){const t=A(null),a=y({model:{mobile:"",code:"",password:""},rules:{code:Be,password:Ie}});async function s(){/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(a.model.password)||(console.log(123),ae({icon:"error",title:"需包含字母和数字,长度在6-12之间"}));if(!(await k(t).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await te.updateUserPassword(a.model);0===e&&K()}return(e,c)=>{const d=m,p=C,g=o(l("uni-easyinput"),$e),b=o(l("uni-forms-item"),Ae),y=o(l("uni-forms"),Te);return r(),n(d,null,{default:i((()=>[u(d,{class:"head-box ss-m-b-60"},{default:i((()=>[u(d,{class:"head-title ss-m-b-20"},{default:i((()=>[h("修改密码")])),_:1}),u(d,{class:"head-subtitle"},{default:i((()=>[h("如密码丢失或未设置,请点击忘记密码重新设置")])),_:1})])),_:1}),u(y,{ref_key:"changePasswordRef",ref:t,modelValue:a.model,"onUpdate:modelValue":c[3]||(c[3]=e=>a.model=e),rules:a.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center"},{default:i((()=>[u(b,{name:"code",label:"验证码"},{default:i((()=>[u(g,{placeholder:"请输入验证码",modelValue:a.model.code,"onUpdate:modelValue":c[1]||(c[1]=e=>a.model.code=e),type:"number",maxlength:"4",inputBorder:!1},{right:i((()=>[u(p,{class:P(["ss-reset-button code-btn code-btn-start",{"code-btn-end":a.isMobileEnd}]),disabled:a.isMobileEnd,onClick:c[0]||(c[0]=e=>k(Y)("changePassword"))},{default:i((()=>[h(f(k(J)("resetPassword")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),u(b,{name:"reNewPassword",label:"密码"},{default:i((()=>[u(g,{type:"password",placeholder:"请输入密码",modelValue:a.model.password,"onUpdate:modelValue":c[2]||(c[2]=e=>a.model.password=e),inputBorder:!1},{right:i((()=>[u(p,{class:"ss-reset-button login-btn-start",onClick:s},{default:i((()=>[h(" 确认 ")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["modelValue","rules"]),u(p,{class:"ss-reset-button type-btn",onClick:k(K)},{default:i((()=>[h(" 取消修改 ")])),_:1},8,["onClick"])])),_:1})}}},[["__scopeId","data-v-5e4672df"]]),Pt={uploadFile:e=>(Z("token"),se({title:"上传中"}),new Promise(((t,a)=>{oe({url:le+re+"/infra/file/upload",filePath:e,name:"file",header:{Accept:"*/*","tenant-id":"1"},success:e=>{let a=JSON.parse(e.data);if(1!==a.error)return t(a);ae({icon:"none",title:a.msg})},fail:e=>(console.log("上传失败:",e),t(!1)),complete:()=>{ne()}})}))),getFileIO:async e=>{const t=await fetch("https://letcgo.com/app-api/infra/file/downloadByUrl?fileUrl="+e,{method:"GET"});if(!t.ok)throw new Error("网络响应不是OK状态");return await t.blob()}},Ct=ke({__name:"mp-authorization",props:{agreeStatus:{type:Boolean,default:!1}},setup(e){const t=T((()=>S.$store("user").userInfo)),a=A(null),s=y({model:{nickname:t.value.nickname,avatar:t.value.avatar},rules:{},disabledStyle:{color:"#999",disableColor:"#fff"}});function c(e){!async function(e){if(!e)return;let{data:t}=await Pt.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:o}=await te.updateUser({avatar:s.model.avatar,nickname:s.model.nickname});0===o&&(S.$helper.toast("授权成功"),await S.$store("user").getInfo(),K())}return(e,t)=>{const f=m,p=z,g=b,y=C,v=o(l("uni-forms-item"),Ae),w=o(l("uni-easyinput"),$e),_=o(l("uni-forms"),Te);return r(),n(f,null,{default:i((()=>[u(f,{class:"head-box ss-m-b-60 ss-flex-col"},{default:i((()=>[u(f,{class:"ss-flex ss-m-b-20"},{default:i((()=>[u(f,{class:"head-title ss-m-r-40 head-title-animation"},{default:i((()=>[h("授权信息")])),_:1})])),_:1}),u(f,{class:"head-subtitle"},{default:i((()=>[h("完善您的头像、昵称、手机号")])),_:1})])),_:1}),u(_,{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((()=>[u(v,{name:"avatar",label:"头像"},{default:i((()=>[u(y,{class:"ss-reset-button avatar-btn","open-type":"chooseAvatar",onChooseavatar:c},{default:i((()=>[u(p,{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"]),u(g,{class:"cicon-forward"})])),_:1})])),_:1}),u(v,{name:"nickname",label:"昵称"},{default:i((()=>[u(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}),u(f,{class:"foot-box"},{default:i((()=>[u(y,{class:"ss-reset-button authorization-btn",onClick:d},{default:i((()=>[h(" 确认授权 ")])),_:1})])),_:1})])),_:1},8,["modelValue","rules"])])),_:1})}}},[["__scopeId","data-v-b00d5530"]]),It=ke({__name:"officialAccountFirstLogin",emits:["onConfirm"],setup(e,{emit:t}){const a=A(null),s=y({isMobileEnd:!1,codeText:"获取验证码",model:{mobile:"",code:""},rules:{code:Be,mobile:Le}});async function c(){if(!(await k(a).validate().catch((e=>{console.log("error: ",e)}))))return;const{code:e}=await X.smsLogin(s.model);0===e&&K()}return(e,t)=>{const d=m,p=C,g=o(l("uni-easyinput"),$e),b=o(l("uni-forms-item"),Ae),y=o(l("uni-forms"),Te);return r(),n(d,null,{default:i((()=>[u(d,{class:"head-box"},{default:i((()=>[u(d,{class:"ss-flex ss-m-b-20"},{default:i((()=>[u(d,{class:"isActive head-title"},{default:i((()=>[h(" 您首次登录,请输入手机号验证 ")])),_:1})])),_:1})])),_:1}),u(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((()=>[u(b,{name:"mobile",label:"手机号",class:"loginUniFormItem"},{default:i((()=>[u(g,{placeholder:"请输入手机号",modelValue:s.model.mobile,"onUpdate:modelValue":t[1]||(t[1]=e=>s.model.mobile=e),inputBorder:!1,type:"number"},{right:i((()=>[u(p,{class:P(["ss-reset-button code-btn code-btn-start",{"code-btn-end":s.isMobileEnd}]),disabled:s.isMobileEnd,onClick:t[0]||(t[0]=e=>k(Y)("smsLogin",s.model.mobile))},{default:i((()=>[h(f(k(J)("smsLogin")),1)])),_:1},8,["disabled","class"])])),_:1},8,["modelValue"])])),_:1}),u(b,{name:"code",label:"验证码",class:"loginUniFormItem"},{default:i((()=>[u(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"]),u(d,{style:{display:"flex","justify-content":"space-between","margin-top":"20rpx"}},{default:i((()=>[u(p,{class:"ss-reset-button login-btn-start",onClick:c},{default:i((()=>[h(" 继续登录 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-ed448707"]]),$t=ke({__name:"s-auth-modal",setup(e){T((()=>S.$store("app").info));const t=Z("linkId"),a=S.$store("modal"),s=T((()=>a.auth)),c=T((()=>a.isActive)),d=y({protocol:!1}),f=A(!1);function g(){d.protocol=!d.protocol}function v(e){K(),S.$router.go("/pages/public/richtext",{title:e})}function w(e){f.value=e,setTimeout((()=>{f.value=!1}),1e3)}const _=async e=>{if(!d.protocol)return f.value=!0,setTimeout((()=>{f.value=!1}),1e3),void S.$helper.toast("请勾选同意");await S.$platform.useProvider(e).login()&&K()},I=async e=>{if("getPhoneNumber:ok"!==e.detail.errMsg)return void S.$helper.toast("快捷登录失败");await S.$platform.useProvider().mobileLogin(e.detail)&&K()};return(e,a)=>{const y=m,$=ie,A=ue,T=z,B=b,L=C,M=o(l("su-popup"),Pe);return r(),n(M,{show:""!==s.value,round:"10",showClose:!0,onClose:k(K)},{default:i((()=>[u(y,{class:"login-wrap"},{default:i((()=>[["smsLogin","accountLogin","register"].includes(s.value)?(r(),n(y,{key:0,class:"head-box"},{default:i((()=>[u(y,{class:"ss-flex ss-m-b-20"},{default:i((()=>[u(y,{class:P(["accountLogin"==c.value?"head-title ss-m-r-40 head-title-animation":"head-title-active ss-m-r-40"]),onClick:a[0]||(a[0]=e=>{c.value="accountLogin",k(ee)("accountLogin","accountLogin")})},{default:i((()=>[h(" 账号登录 ")])),_:1},8,["class"]),u(y,{class:P(["smsLogin"==c.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=>{c.value="smsLogin",k(ee)("smsLogin","smsLogin")})},{default:i((()=>[h(" 短信登录 ")])),_:1},8,["class"]),k(t)?(r(),n(y,{key:0,class:P(["register"==c.value?"head-title head-title-line head-title-animation":"head-title-active head-title-line"]),onClick:a[2]||(a[2]=e=>{c.value="register",k(ee)("register","register")})},{default:i((()=>[h(" 注册 ")])),_:1},8,["class"])):p("",!0)])),_:1})])),_:1})):p("",!0),["smsLogin","accountLogin","register"].includes(s.value)?(r(),n(y,{key:1,class:P(["agreement-box ss-flex ss-row-center",{shake:f.value}])},{default:i((()=>[u(A,{class:"radio ss-flex ss-col-center",onClick:g},{default:i((()=>[u($,{checked:d.protocol,color:"var(--ui-BG-Main)",style:{transform:"scale(0.8)"},onClick:x(g,["stop"])},null,8,["checked"]),u(y,{class:"agreement-text ss-flex ss-col-center ss-m-l-8"},{default:i((()=>[h(" 我已阅读并遵守 "),u(y,{class:"tcp-text",onClick:a[3]||(a[3]=x((e=>v("用户协议")),["stop"]))},{default:i((()=>[h(" 《用户协议》 ")])),_:1}),u(y,{class:"agreement-text"},{default:i((()=>[h("与")])),_:1}),u(y,{class:"tcp-text",onClick:a[4]||(a[4]=x((e=>v("隐私协议")),["stop"]))},{default:i((()=>[h(" 《隐私协议》 ")])),_:1})])),_:1})])),_:1})])),_:1},8,["class"])):p("",!0),["accountLogin","smsLogin"].includes(s.value)?(r(),n(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?(r(),n(y,{key:0,class:"wx-login-btn",onClick:a[5]||(a[5]=e=>_("wechat"))},{default:i((()=>[u(T,{class:"auto-login-img",src:k(S).$url.static("/static/images/wechat.png")},null,8,["src"]),u(B,null,{default:i((()=>[h("微信授权登录")])),_:1})])),_:1})):p("",!0)])),_:1})):p("",!0),["register"].includes(s.value)?(r(),n(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?(r(),n(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(!Z("linkId"))return S.$helper.toast("您只能通过分享注册"),!1;await S.$platform.useProvider(e).register()&&K()})("wechat"))},{default:i((()=>[u(T,{class:"auto-login-img",src:k(S).$url.static("/static/images/wechat.png")},null,8,["src"]),u(B,null,{default:i((()=>[h("微信授权注册")])),_:1})])),_:1})):p("",!0)])),_:1})):p("",!0),"officialAccountFirstLogin"===s.value?(r(),n(k(It),{key:4,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):p("",!0),"accountLogin"===s.value?(r(),n(vt,{key:5,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):p("",!0),"smsLogin"===s.value?(r(),n(wt,{key:6,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):p("",!0),"register"===s.value?(r(),n(_t,{key:7,agreeStatus:d.protocol,onOnConfirm:w},null,8,["agreeStatus"])):p("",!0),"resetPassword"===s.value?(r(),n(xt,{key:8})):p("",!0),"changeMobile"===s.value?(r(),n(kt,{key:9})):p("",!0),"changePassword"===s.value?(r(),n(St,{key:10})):p("",!0),"mpAuthorization"===s.value?(r(),n(Ct,{key:11})):p("",!0),["accountLogin","smsLogin"].includes(s.value)?(r(),n(y,{key:12,class:"auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"},{default:i((()=>["WechatMiniProgram"===k(S).$platform.name?(r(),n(y,{key:0,class:"ss-flex register-box"},{default:i((()=>[u(y,{class:"register-title"},{default:i((()=>[h("还没有账号?")])),_:1}),u(L,{class:"ss-reset-button login-btn","open-type":"getPhoneNumber",onGetphonenumber:I},{default:i((()=>[h(" 快捷登录 ")])),_:1}),u(y,{class:"circle"})])),_:1})):p("",!0),"ios"===k(S).$platform.os&&"App"===k(S).$platform.name?(r(),n(L,{key:1,onClick:a[7]||(a[7]=e=>_("apple")),class:"ss-reset-button auto-login-btn"},{default:i((()=>[u(T,{class:"auto-login-img",src:k(S).$url.static("/static/images/apple.png")},null,8,["src"])])),_:1})):p("",!0)])),_:1})):p("",!0),u(y,{class:"safe-box"})])),_:1})])),_:1},8,["show","onClose"])}}},[["__scopeId","data-v-6e06a495"]]);var At,Tt={exports:{}};At=Tt,function(){var a;const s=b(typeof uni)?"uni":b(typeof window)&&b(typeof document)?"web":"node",o="uni"==s,l="node"==s,r="web"==s,n={},i={},u=Object.freeze(["init","initAsyncDrawMode","initArgs","initCanvas","handleCtx","initData","draw","toImage","updateCanvasWH","clear","restoreAsyncDrawMode"]),c=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"]),p=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 m,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,o)=>{e(t,a,"write to private field"),o?o.call(t,s):a.set(t,s)})(this,a,new v({asyncDrawMode:!1})),this.initAsyncDrawMode())}initAsyncDrawMode(){if(o)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(!o)if(u.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 o;return c.includes(e)&&(o=t(s,a)[e](...arguments)),o&&o!==s&&o!==t(s,a)?o:((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(o)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(o&&!t.canvasId)throw new Error("canvasId 不能为空");let a,l={};switch(s){case"uni":a=fe(t.canvasId,e),l.canvas=a,l.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,l.canvas=a,l.ctx=a.getContext("2d");break;case"node":a=m.createCanvas((null==t?void 0:t.width)||10,(null==t?void 0:t.height)||10),l.canvas=a,l.ctx=a.getContext("2d")}return l}(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<p.length;a++){const s=p[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:!(!l&&!r)&&!1!==this._args.asyncDrawMode,ctxMethods:[]},this}setPaintbrush(e={}){!function(e){switch(null==e?void 0:e.textBaseline){case"normal":o&&(e.textBaseline="alphabetic");break;case"hanging":o&&(e.textBaseline="top");break;case"ideographic":o&&(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};o&&(s.fontSize=Math.round(s.fontSize)),this._data.font=s;const l=this._data.font;this._data.oldPaintbrushProps[e]=l;const r=()=>{a.font=`${l.fontStyle||"normal"} ${l.fontVariant||"normal"} ${l.fontWeight||"normal"} ${l.fontSize??10}px ${l.fontFamily||"sans-serif"}`};r()}}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:l,height:r,delay:n}=e,i=null==(t=this._args)?void 0:t.setCanvasWH;return l=l||(null==(a=this._data)?void 0:a.width)||10,r=r||(null==(s=this._data)?void 0:s.height)||10,new Promise(((e,t)=>{if(o){if(!i||"function"!=typeof i)return void t("setCanvasWH异常, uni-app 请在初始化时传入setCanvasWH函数");i({height:r,width:l}),setTimeout((()=>{e()}),n??50)}else this.canvas.height=r,this.canvas.width=l,e()})).then((e=>{this._data.width==l&&this._data.height==r||(this._data.whChange=!0),this._data.width=l,this._data.height=r,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(o){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 o=0;o<s.length;o++){const e=s[o];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(o){const s=this._args.canvasId;if(!s)return void a("canvasId不存在");ce({...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 l=o(t).width;if(a){if(l<e.maxWidth||t.length<2)return{index:t.length,ellipsis:!1,width:l};s=o("...").width}const r=l+s;if(r<e.maxWidth||t.length<2)return{index:t.length,ellipsis:!1,width:r};let n,i=!0,u=Math.floor((t.length+1)/2),c=1,d="";for(;i;){if(u<=1){i=!1;break}if(u>t.length){u=t.length,i=!1;break}const a=t.substr(0,u);n=o(a).width+s,n>e.maxWidth?(t=a,"xy"==d&&Math.abs(c-u)<1?i=!1:(d="dy",c=u,u=Math.floor((a.length+1)/2))):n==e.maxWidth||u<=1||Math.abs(c-u)<1?i=!1:(d="xy",c=u,u+=Math.floor((t.length-u)/2))}return{index:u,ellipsis:a,width:n}};this.saveAndSetPaintbrush({...e.paintbrushProps||{}});const o=this.measureText;let l=[],r=e.val,n=0;const i={...this._data.font};if(e.maxWidth){let a=0;for(;r.length;){const o=t>0&&l.length+1>=t,{index:n,ellipsis:u,width:c}=s(r,o),d=r.substr(0,n);l.push({...e,val:d,y:a?e.y+(i.fontSize+(e.lineHeight||0))*a:e.y,width:c}),o?(u&&(l[l.length-1].val+="..."),r=""):r=r.slice(n),a++}n=1==l.length?l[0].width:l.length>1?e.maxWidth:0}else l=[e],n=o(e.val).width;this.restorePaintbrush(),a({...e,calcTexts:l,_calc:!0,left:e.x,top:e.y,right:e.x+n,bottom:l[l.length-1].y+i.fontSize,width:n,height:l[l.length-1].y+i.fontSize-e.y,fontSize:i.fontSize})}catch(o){s(o)}}))}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)},o=e._calc?e:await this.calcText(e);for(let e=0;e<o.calcTexts.length;e++)s(o.calcTexts[e]);this.restorePaintbrush(),t(o)}catch(s){a(s)}}))}drawStraightLine(e={}){const{x1:t,y1:a,x2:s,y2:o,paintbrushProps:l}=e,r=this.ctx;r.beginPath(),r.moveTo(t,a),r.lineTo(s,o),this.saveAndSetPaintbrush(l||{}),r.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:o,gap:l,width:r,paintbrushProps:n}=e;a-=r,l=l||1;const i=Math.sqrt(Math.pow(t-a,2)+Math.pow(s-o,2)),u=function(e,t,a,s,o,l){let r,n,i,u,c,d=[];if(e===a)r=e+(s-t)*l,n=t+(s-t)/2,i=(e-r)**2+(t-n)**2;else if(t===s)r=e+(a-e)/2,n=t-(a-e)*l,i=(e-r)**2+(t-n)**2;else{let o=(e+a)/2,d=(t+s)/2;u=(a-e)/(t-s);let h=d-u*o,f=1+u**2,p=2*u*(h-d)-2*o,m=o**2+(h-d)**2-((a-e)**2+(s-t)**2)*l**2;c=-1/u,r=(-p+Math.sqrt(p**2-4*f*m)*(c>0&&a>e||c<0&&a<e?1:-1))/(2*f),n=u*r+h,i=(e-r)**2+(t-n)**2}if(e===a||Math.abs(c)>1){let e=(s-t)/(o+1);for(let a=0;a<o;a++){let o=t+e*(a+1),l=Math.sqrt(i-(o-n)**2)*(s>t?-1:1)+r;d.push([l,o])}}else{let t=(a-e)/(o+1);for(let s=0;s<o;s++){let o=e+t*(s+1),l=Math.sqrt(i-(o-r)**2)*(a>e?1:-1)+n;d.push([o,l])}}return d}(t,s,a,o,Math.floor((i-l)/(r+l)),9999999999);this.saveAndSetPaintbrush(n),this.drawDotted({x:t,y:s,d:r});for(let c=0;c<u.length;c++)this.drawDotted({x:u[c][0],y:u[c][1],d:r});this.drawDotted({x:a,y:o,d:r}),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,o=s.line||"line-through",l=s.color||e.color||t.fillStyle||"#000000",r=s.thickness||s.width||!!e.fontSize&&.1*e.fontSize||1,n=s.style||"solide",i=s.offset||0,u=s.gap??1,c=e.fontSize||this._data.font.fontSize;this.setPaintbrush({lineWidth:r,strokeStyle:l});let d=0;switch(o){case"line-through":d=e.y+c/2-r/2;break;case"underline":d=e.y+c;break;case"overline":d=e.y}switch(t.textBaseline){case"top":d+=r/2;break;case"bottom":d-=c;break;case"center":d-=c/2}switch(d+=i,o){case"line-through":case"underline":case"overline":this.drawLine({x1:e.x,y1:d,x2:e.x+a,y2:d,style:n,gap:u,width:r,color:l})}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 l,r=e.x||0,n=e.y||0,i=e.width||0,u=e.height||0,c=a.width,d=a.height,h=0,f=0;const p=()=>[h,f,c,d,r,n,i,u];switch(s){case"aspectFit":u=a.height/a.width*i,u<e.height?n=Number(e.y)+e.height/2-u/2:(u=e.height,i=a.width/a.height*u,r=Number(e.x)+e.width/2-i/2),l=p();break;case"aspectFill":u=a.height/a.width*i,u<e.height?(u=e.height,h=a.width/a.height*e.height,h=(h-e.width)/h*a.width/2,c=a.width-2*h):(f=(u-e.height)/u*a.height/2,d=a.height-2*f),i=e.width,u=e.height,l=p();break;case"widthFix":u=e.height=a.height/a.width*e.width,l=[r,n,i,u];break;case"heightFix":i=e.width=a.width/a.height*e.height,l=[r,n,i,u];break;default:l=[r,n,i,u]}l.unshift(o?a.toString():a),t({...e,drawImageArgs:[...l],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=[],o={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},l=null,r=0;for(var n=0,i=s.length;n<i;n++)if(r=n,s[n].text==o.text&&s[n].text.correctLevel==o.correctLevel){l=s[n].obj;break}r==i&&(l=new _(o.text,o.correctLevel),s.push({text:o.text,correctLevel:o.correctLevel,obj:l}));let u=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},c=l.getModuleCount(),d=o.size,h=d/c,f=d/c;for(let e=0;e<c;e++)for(let t=0;t<c;t++){let a=(t+1)*h-t*h,s=(e+1)*h-e*h,r=u({row:e,col:t,count:c,options:o});this.setPaintbrush({fillStyle:l.modules[e][t]?r:o.background}),this.ctx.fillRect(o.dx+t*h,o.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:o,mode:l}=e;l=l||"leftTop";const r=o/2;switch(e.clip&&t.save(),t.beginPath(),l){case"leftTop":t.arc(a+r,s+r,r,0,2*Math.PI);break;case"center":t.arc(a,s,r,0,2*Math.PI)}return t.closePath(),e.clip&&t.clip(),this}setRect(e={}){const t=this.ctx,{x:a,y:s,r:o,height:l,width:r}=e;return e.clip&&t.save(),t.beginPath(),o&&o>0?(t.arc(a+o,s+o,o,1*Math.PI,1.5*Math.PI),t.lineTo(a+r-o,s),t.arc(a+r-o,s+o,o,1.5*Math.PI,0),t.lineTo(a+r,s+l-o),t.arc(a+r-o,s+l-o,o,0,.5*Math.PI),t.lineTo(a+o,s+l),t.arc(a+o,s+l-o,o,.5*Math.PI,1*Math.PI),t.lineTo(a,s+o)):(t.moveTo(a,s),t.lineTo(a+r,s),t.lineTo(a+r,s+l),t.lineTo(a,s+l),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(n[e])return void t(n[e]);let o;try{switch(s){case"uni":o=await new Promise(((t,a)=>{if(e._loaded)t(e);else if(~e.indexOf("data:image")){let s=e,o={};k.base64ToPath(e).then((e=>{s=e,de({src:s,success:e=>{o=e;const a=new String(s);for(const t in o)a[t]=o[t];a._loaded=!0,t(a)},fail:e=>a(e)})})).catch((e=>{a(e)}))}else"http"==e.substr(0,4)?he({url:e,success:({tempFilePath:e})=>{de({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)}):de({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":o=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":o=await new Promise(((t,a)=>{"string"==typeof e?m.loadImage(e).then((e=>{t(e)})).catch((e=>{a(e)})):t(e)}))}}catch(l){a(l)}n[e]=o,t(o)}))}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 o;switch(typeof a){case"function":o=a(),"function"==typeof(null==o?void 0:o.then)&&(o=await o);break;case"object":o=Array.isArray(a)?await this.drawArray(a):await this.drawItem(a)}s.push({item:a,result:o})}t(s)}catch(s){a(s)}}))}drawItem(e={}){return new Promise((async(t,a)=>{var s,o;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==(o=e.val)?void 0:o.call(e),"function"==typeof(null==a?void 0:a.then)&&(a=await a)}t(a)}catch(l){a(l)}}))}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,o)=>{var l;for(let n=0;n<t.length;n++){const a=t[n];if("text"==a.type||a.name,s.push(a),null==(l=a.children)?void 0:l.length){a.__handle=function(e){};try{await e(a.children,a)}catch(r){return void o(r)}}}a(s)}))}(e)})}catch(o){a(o)}}))}};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 o=e(t.charCodeAt(s)),l=0;l<o.length;l++)a.push(o[l]);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 o=d.getLostPoint(this);(0==s||e>o)&&(e=o,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],o=e[a];if(null==this.modules[s][o])for(var l=-2;l<=2;l++)for(var r=-2;r<=2;r++)this.modules[s+l][o+r]=-2==l||2==l||-2==r||2==r||0==l&&0==r}},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,o=d.getBCHTypeInfo(s),l=0;l<15;l++){var r=!e&&1==(o>>l&1);l<6?this.modules[l][8]=r:l<8?this.modules[l+1][8]=r:this.modules[this.moduleCount-15+l][8]=r,r=!e&&1==(o>>l&1),l<8?this.modules[8][this.moduleCount-l-1]=r:l<9?this.modules[8][15-l-1+1]=r:this.modules[8][15-l-1]=r}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,o=this.utf8bytes.length;s<o;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,o=this.rsBlock.length/3,l=new Array,r=0;r<o;r++)for(var n=this.rsBlock[3*r+0],i=this.rsBlock[3*r+1],u=this.rsBlock[3*r+2],c=0;c<n;c++)l.push([u,i]);for(var h=new Array(l.length),f=new Array(l.length),m=0;m<l.length;m++){var g=l[m][0],b=l[m][1]-g;for(a=Math.max(a,g),s=Math.max(s,b),h[m]=new Array(g),r=0;r<h[m].length;r++)h[m][r]=255&e.buffer[r+t];t+=g;var y=d.getErrorCorrectPolynomial(b),v=new p(h[m],y.getLength()-1).mod(y);for(f[m]=new Array(y.getLength()-1),r=0;r<f[m].length;r++){var w=r+v.getLength()-f[m].length;f[m][r]=w>=0?v.get(w):0}}var _=new Array(this.totalDataCount),x=0;for(r=0;r<a;r++)for(m=0;m<l.length;m++)r<h[m].length&&(_[x++]=h[m][r]);for(r=0;r<s;r++)for(m=0;m<l.length;m++)r<f[m].length&&(_[x++]=f[m][r]);return _},mapData:function(e,t){for(var a=-1,s=this.moduleCount-1,o=7,l=0,r=this.moduleCount-1;r>0;r-=2)for(6==r&&r--;;){for(var n=0;n<2;n++)if(null==this.modules[s][r-n]){var i=!1;l<e.length&&(i=1==(e[l]>>>o&1)),d.getMask(t,s,r-n)&&(i=!i),this.modules[s][r-n]=i,-1==--o&&(l++,o=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,o=1,l=2,r=3,n=4,i=5,u=6,c=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 o:return t%2==0;case l:return a%3==0;case r:return(t+a)%3==0;case n:return(Math.floor(t/2)+Math.floor(a/3))%2==0;case i:return t*a%2+t*a%3==0;case u:return(t*a%2+t*a%3)%2==0;case c:return(t*a%3+(t+a)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new p([1],0),a=0;a<e;a++)t=t.multiply(new p([1,h.gexp(a)],0));return t},getLostPoint:function(e){for(var t=e.getModuleCount(),a=0,s=0,o=0;o<t;o++)for(var l=0,r=e.modules[o][0],n=0;n<t;n++){var i=e.modules[o][n];if(n<t-6&&i&&!e.modules[o][n+1]&&e.modules[o][n+2]&&e.modules[o][n+3]&&e.modules[o][n+4]&&!e.modules[o][n+5]&&e.modules[o][n+6]&&(n<t-10?e.modules[o][n+7]&&e.modules[o][n+8]&&e.modules[o][n+9]&&e.modules[o][n+10]&&(a+=40):n>3&&e.modules[o][n-1]&&e.modules[o][n-2]&&e.modules[o][n-3]&&e.modules[o][n-4]&&(a+=40)),o<t-1&&n<t-1){var u=0;i&&u++,e.modules[o+1][n]&&u++,e.modules[o][n+1]&&u++,e.modules[o+1][n+1]&&u++,0!=u&&4!=u||(a+=3)}r^i?l++:(r=i,l>=5&&(a+=3+l-5),l=1),i&&s++}for(n=0;n<t;n++)for(l=0,r=e.modules[0][n],o=0;o<t;o++)i=e.modules[o][n],o<t-6&&i&&!e.modules[o+1][n]&&e.modules[o+2][n]&&e.modules[o+3][n]&&e.modules[o+4][n]&&!e.modules[o+5][n]&&e.modules[o+6][n]&&(o<t-10?e.modules[o+7][n]&&e.modules[o+8][n]&&e.modules[o+9][n]&&e.modules[o+10][n]&&(a+=40):o>3&&e.modules[o-1][n]&&e.modules[o-2][n]&&e.modules[o-3][n]&&e.modules[o-4][n]&&(a+=40)),r^i?l++:(r=i,l>=5&&(a+=3+l-5),l=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 p(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]}p.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 p(t,0)},mod:function(e){var t=this.getLength(),a=e.getLength();if(t-a<0)return this;for(var s=new Array(t),o=0;o<t;o++)s[o]=this.get(o);for(;s.length>=a;){var l=h.glog(s[0])-h.glog(e.get(0));for(o=0;o<e.getLength();o++)s[o]^=h.gexp(h.glog(e.get(o))+l);for(;0==s[0];)s.shift()}return new p(s,0)}};var m=[[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=m[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,o=0;o<a;o++){var l=t[3*o+0];s+=t[3*o+2]*l}var r=e>9?2:1;if(this.utf8bytes.length+r<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=u("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),o=u("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"),l=u("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"),r=u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),n=u("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),i=u("script,style");function u(e){for(var t={},a=e.split(","),s=0;s<a.length;s++)t[a[s]]=!0;return t}return function(u){u=function(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}(u);var c=[],d={node:"root",children:[]};return function(u,c){var d,h,f,p=[],m=u;for(p.last=function(){return this[this.length-1]};u;){if(h=!0,p.last()&&i[p.last()])u=u.replace(new RegExp("([\\s\\S]*?)</"+p.last()+"[^>]*>"),(function(e,t){return t=t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),c.chars&&c.chars(t),""})),y("",p.last());else if(0==u.indexOf("\x3c!--")?(d=u.indexOf("--\x3e"))>=0&&(c.comment&&c.comment(u.substring(4,d)),u=u.substring(d+3),h=!1):0==u.indexOf("</")?(f=u.match(t))&&(u=u.substring(f[0].length),f[0].replace(t,y),h=!1):0==u.indexOf("<")&&(f=u.match(e))&&(u=u.substring(f[0].length),f[0].replace(e,b),h=!1),h){var g=(d=u.indexOf("<"))<0?u:u.substring(0,d);u=d<0?"":u.substring(d),c.chars&&c.chars(g)}if(u==m)throw"Parse Error: "+u;m=u}function b(e,t,i,u){if(t=t.toLowerCase(),o[t])for(;p.last()&&l[p.last()];)y("",p.last());if(r[t]&&p.last()==t&&y("",t),(u=s[t]||!!u)||p.push(t),c.start){var d=[];i.replace(a,(function(e,t){var a=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:n[t]?t:"";d.push({name:t,value:a,escaped:a.replace(/(^|[^\\])"/g,'$1\\"')})})),c.start&&c.start(t,d,u)}}function y(e,t){if(t)for(a=p.length-1;a>=0&&p[a]!=t;a--);else var a=0;if(a>=0){for(var s=p.length-1;s>=a;s--)c.end&&c.end(p[s]);p.length=a}}y()}(u,{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 o=c[0]||d;o.children||(o.children=[]),o.children.push(s)}else c.unshift(s)},end:function(e){var t=c.shift();if(t.name!==e&&console.error("invalid state: mismatch end tag"),0===c.length)d.children.push(t);else{var a=c[0];a.children||(a.children=[]),a.children.push(t)}},chars:function(e){var t={type:"text",text:e};if(0===c.length)d.children.push(t);else{var a=c[0];a.children||(a.children=[]),a.children.push(t)}},comment:function(e){var t={node:"comment",text:e},a=c[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 o=document.createElement("canvas"),l=o.getContext("2d"),r=new Image;return r.onload=function(){o.width=r.width,o.height=r.height,l.drawImage(r,0,0),t(o.toDataURL()),o.height=o.width=0},r.onerror=a,void(r.src=e)}"object"!=typeof plus?"object"==typeof wx&&pe("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,o){if("object"==typeof window&&"document"in window){for(var l=(a=a.split(","))[0].match(/:(.*?);/)[1],r=atob(a[1]),n=r.length,i=new Uint8Array(n);n--;)i[n]=r.charCodeAt(n);return s((window.URL||window.webkitURL).createObjectURL(new Blob([i],{type:l})))}var u=a.split(",")[0].match(/data\:\S+\/(\S+);/);u?u=u[1]:o(new Error("base64 error"));var c=Date.now()+String(t++)+"."+u;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==(p=null==qq?void 0:qq.env)?void 0:p.USER_DATA_PATH)?qq.env.USER_DATA_PATH:"object"==typeof qh&&(null==(m=null==qh?void 0:qh.env)?void 0:m.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")+"/"+c,uni.getFileSystemManager().writeFile({filePath:v,data:e(a),encoding:"base64",success:function(){s(v)},fail:function(e){o(e)}})}catch(_){o(new Error("not support"))}var d,h,f,p,m,g}else{var b="_doc",y="uniapp_temp",v="_doc/uniapp_temp/"+c;if(!function(e,t){for(var a=e.split("."),s=t.split("."),o=!1,l=0;l<s.length;l++){var r=a[l]-s[l];if(0!==r){o=r>0;break}}return o}("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(c,{create:!0,exclusive:!1},(function(t){t.createWriter((function(t){t.onwrite=function(){s(v)},t.onerror=o,t.seek(0),t.writeAsBinary(e(a))}),o)}),o)}),o)}),o);var w=new plus.nativeObj.Bitmap(c);w.loadBase64Data(a,(function(){w.save(v,{},(function(){w.clear(),s(v)}),(function(e){w.clear(),o(e)}))}),(function(e){w.clear(),o(e)}))}}))}}}();b("object")&&(At.exports=w)}();const Bt=me(Tt.exports);let Lt=A("");async function Mt(e){await Pt.getFileIO(e).then((e=>{Lt.value=window.URL.createObjectURL(e)}))}async function Dt(e){const t=S.$store("user").userInfo;console.log(JSON.parse(Z("user-store")).userInfo);let a=t.avatar;switch(e.shareInfo.poster.type){case"user":return await Mt(a),e.avatar=Lt.value,(e=>{const t=e.width,a=S.$store("user").userInfo;return console.log(),{background:window.location.origin+"/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 Mt(a),e.avatar=Lt.value,await Mt(e.shareInfo.poster.image),e.shareInfo.poster.image=Lt.value,(e=>{const t=e.width,a=S.$store("user").userInfo;return{background:window.location.origin+"/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:Vt(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:Vt(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:Vt(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 Vt(e){return"https:"===window.location.protocol&&0===e.indexOf("http:")&&(e=e.replace("http:","https:")),e}async function Ut(e,t){const a=e.width,s=new Bt({canvasId:e.canvasId,width:e.width,height:e.height,setCanvasWH:t=>{e.height=t.height}},t);let o=await Dt(e);const l=await s.drawImg({type:"image",val:o.background,x:0,y:0,width:a,mode:"widthFix",zIndex:0});await s.updateCanvasWH({width:l.width,height:l.bottom});let r=o.list;for(let i=0;i<r.length;i++){let e=r[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(n){console.log(n)}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(n){console.log(n)}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 Et=ke({__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("请长按图片保存"):ge({filePath:d.src,success:e=>{b(),S.$helper.toast("保存成功")},fail:e=>{S.$helper.toast("保存失败"),console.log("图片保存失败:",e)}})};return A(""),t({getPoster:async function(e){return d.src="",d.shareInfo=s.shareInfo,await Ut(d,g)}}),(t,a)=>{const s=m,f=z,g=be,y=C,w=o(l("su-popup"),Pe);return r(),n(w,{show:e.show,round:"10",onClose:b,type:"center",class:"popup-box"},{default:i((()=>[u(s,{class:"ss-flex-col ss-col-center ss-row-center"},{default:i((()=>[""===d.src?(r(),n(s,{key:0,class:"poster-title ss-flex ss-row-center",style:c({height:d.height+"px",width:d.width+"px"})},{default:i((()=>[h(" 海报加载中... ")])),_:1},8,["style"])):(r(),n(f,{key:1,class:"poster-img",src:d.src,style:c({height:d.height+"px",width:d.width+"px"}),"show-menu-by-longpress":!0},null,8,["src","style"])),u(g,{class:"hideCanvas","canvas-id":d.canvasId,id:d.canvasId,style:c({height:d.height+"px",width:d.width+"px"})},null,8,["canvas-id","id","style"]),""!==d.src?(r(),n(s,{key:2,class:"poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"},{default:i((()=>[u(y,{class:"cancel-btn ss-reset-button",onClick:b},{default:i((()=>[h("取消")])),_:1}),u(y,{class:"save-btn ss-reset-button ui-BG-Main",onClick:v},{default:i((()=>[h(" 长按图片保存 ")])),_:1})])),_:1})):p("",!0)])),_:1})])),_:1},8,["show"])}}},[["__scopeId","data-v-db2761e2"]]),Ft={getLinkId:(e,t)=>ye({url:"/distri/share-link/getShareLink",method:"GET",params:{category:e,objectId:t},custom:{showLoading:!1,showError:!1}}),getObjectIdByLinkId:e=>ye({url:"/distri/share-link/getObjectIdByLinkId",method:"GET",params:{linkId:e},custom:{showLoading:!1,showError:!1}})},Ot=ke({__name:"s-share-modal",props:{shareInfo:{type:Object,default(){}}},setup(e){const t=T((()=>S.$store("modal").share)),a=T((()=>S.$store("app").platform.share)),s=A(""),c=e,d=y({showShareGuide:!1,showPosterModal:!1});let f=T((()=>({...c.shareInfo})));const g=()=>{const e=T((()=>S.$store("modal").shareInfo.spuId));ve(),S.$store("user").isLogin?(e.value&&Ft.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):ee()},v=()=>{ve(),["WechatOfficialAccount","H5"].includes(S.$platform.name)&&(d.showShareGuide=!0)};function w(){d.showShareGuide=!1}return(e,c)=>{const y=o(l("su-popup"),Pe),_=z,x=m,P=b,I=C;return r(),n(x,null,{default:i((()=>[u(y,{show:d.showShareGuide,showClose:!1,onClose:w},null,8,["show"]),d.showShareGuide?(r(),n(x,{key:0,class:"guide-wrap"},{default:i((()=>[u(_,{class:"guide-image",src:k(S).$url.static("/static/images/share_guide.png")},null,8,["src"])])),_:1})):p("",!0),u(y,{show:t.value,round:"10",showClose:!1,onClose:k(ve)},{default:i((()=>[u(x,{class:"share-box"},{default:i((()=>[u(x,{class:"share-list-box ss-flex"},{default:i((()=>[a.value.methods.includes("forward")?(r(),n(I,{key:0,class:"share-item share-btn ss-flex-col ss-col-center","open-type":"share",onClick:v},{default:i((()=>[u(_,{class:"share-img",src:k(S).$url.static("/static/images/share_wx.png"),mode:""},null,8,["src"]),u(P,{class:"share-title"},{default:i((()=>[h("微信好友")])),_:1})])),_:1})):p("",!0),a.value.methods.includes("poster")?(r(),n(I,{key:1,class:"share-item share-btn ss-flex-col ss-col-center",onClick:g},{default:i((()=>[u(_,{class:"share-img",src:k(S).$url.static("/static/images/share_poster.png"),mode:""},null,8,["src"]),u(P,{class:"share-title"},{default:i((()=>[h("生成海报")])),_:1})])),_:1})):p("",!0)])),_:1}),u(x,{class:"share-foot ss-flex ss-row-center ss-col-center",onClick:k(ve)},{default:i((()=>[h(" 取消 ")])),_:1},8,["onClick"])])),_:1})])),_:1},8,["show","onClose"]),u(Et,{ref_key:"SharePosterRef",ref:s,show:d.showPosterModal,shareInfo:k(f),onClose:c[0]||(c[0]=e=>d.showPosterModal=!1)},null,8,["show","shareInfo"])])),_:1})}}},[["__scopeId","data-v-c7b464de"]]),zt=ke({__name:"s-menu-tools",setup(e){const t=T((()=>S.$store("modal").menu));const a=[{url:"/pages/index/index",icon:"/static/images/home.png",title:"首页"},{url:"/pages/index/search",icon:"/static/images/search.png",title:"搜索"},{url:"/pages/index/user",icon:"/static/images/user.png",title:"个人中心"},{url:"/pages/index/cart",icon:"/static/images/cart.png",title:"购物车"},{url:"/pages/user/goods-log",icon:"/static/images/browse.png",title:"浏览记录"},{url:"/pages/user/goods-collect",icon:"/static/images/collect.png",title:"我的收藏"},{url:"/pages/chat/index",icon:"/static/images/service.png",title:"客服"}];return(e,s)=>{const c=o(l("su-status-bar"),it),d=m,g=z,b=C,y=o(l("su-popup"),Pe);return r(),n(y,{show:t.value,type:"top",round:"20",backgroundColor:"#F0F0F0",onClose:k(we)},{default:i((()=>[u(c),u(d,{class:"tools-wrap ss-m-x-30 ss-m-b-16"},{default:i((()=>[u(d,{class:"title ss-m-b-34 ss-p-t-20"},{default:i((()=>[h("快捷菜单")])),_:1}),u(d,{class:"container-list ss-flex ss-flex-wrap"},{default:i((()=>[(r(),v(w,null,_(a,(e=>u(d,{class:"list-item ss-m-b-24",key:e.title},{default:i((()=>[u(d,{class:"ss-flex-col ss-col-center"},{default:i((()=>[u(b,{class:"ss-reset-button list-image ss-flex ss-row-center ss-col-center",onClick:t=>function(e){we(),e.url&&S.$router.go(e.url)}(e)},{default:i((()=>[t.value?(r(),n(g,{key:0,src:k(S).$url.static(e.icon),class:"list-icon"},null,8,["src"])):p("",!0)])),_:2},1032,["onClick"]),u(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-38098966"]]),Nt=ke({__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=T((()=>h)),g=T((()=>"normal"===a.navbar||"normal"===a.navbarStyle.mode?"normal":"inner")),b=T((()=>"inner"===g.value?{background:`${a.bgStyle.backgroundColor} url(${S.$url.cdn(a.bgStyle.backgroundImage)}) no-repeat top center / 100% auto`}:{})),y=T((()=>"normal"===g.value?{background:`${a.bgStyle.backgroundColor} url(${S.$url.cdn(a.bgStyle.backgroundImage)}) no-repeat top center / 100% auto`}:{})),v=T((()=>!0===a.onShareAppMessage?S.$platform.share.getShareInfo():_e.isEmpty(a.onShareAppMessage)?{}:(S.$platform.share.updateShareInfo(a.onShareAppMessage),a.onShareAppMessage)));return xe((()=>{_e.isEmpty(v.value)||S.$platform.share.updateShareInfo(v.value)})),(t,a)=>{const h=o(l("su-navbar"),ut),w=o(l("s-custom-navbar"),ht),_=o(l("su-inner-navbar"),ft),x=m,C=o(l("s-tabbar"),gt),I=o(l("s-wallet-modal"),bt),$=o(l("s-signup-modal"),yt),A=o(l("s-auth-modal"),$t),T=o(l("s-share-modal"),Ot),B=o(l("s-menu-tools"),zt);return r(),n(x,{class:P(["page-app",["theme-"+f.value.mode,"main-"+f.value.theme,"font-"+f.value.fontSize]])},{default:i((()=>[u(x,{class:"page-main",style:c([b.value])},{default:i((()=>["normal"===e.navbar?(r(),n(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?(r(),n(w,{key:1,data:e.navbarStyle,showLeftButton:e.showLeftButton},null,8,["data","showLeftButton"])):p("",!0),u(x,{class:"page-body",style:c([y.value])},{default:i((()=>["inner"===e.navbar?(r(),n(_,{key:0,title:e.title},null,8,["title"])):p("",!0),"inner"===e.navbar?(r(),n(x,{key:1,style:c([{paddingTop:k(S).$platform.navbar+"px"}])},null,8,["style"])):p("",!0),d(t.$slots,"default",{},void 0,!0),""!==e.tabbar?(r(),n(C,{key:2,path:e.tabbar},null,8,["path"])):p("",!0)])),_:3},8,["style"])])),_:3},8,["style"]),u(x,{class:"page-modal"},{default:i((()=>[u(I),u($),u(A),u(T,{shareInfo:v.value},null,8,["shareInfo"]),u(B)])),_:1})])),_:3},8,["class"])}}},[["__scopeId","data-v-ce36da0c"]]);export{Pt as F,Ft as S,Nt as _,nt as a,Ue as b,lt as c,st as d,je as e,at as f,qe as g,ze as h,it as i,Ke as j,Qe as k,Xe as l,Ge as m,Je as n,Ze as o,ot as p,Ye as q,Ne as r,Ut as s,Fe as t,et as u,Oe as v,Ee as w,Re as x,rt as y};
|