| 12345678 |
- import{d as k,a2 as Ee,D as Oe,g as u,h as T,I as ee,F as ge,$ as Ae,ap as me,B as Be,aq as lt,p as R,a3 as Ve,s as te,a as V,b5 as Te,q as xe,x as ut,E as ze,L as ct,u as dt,f as qe}from"./index-bc617d61.js";import{C as x}from"./index-917ed250.js";import{T as He}from"./index-154c7237.js";import{O as Ge}from"./index-f0184086.js";import{R as ft,a as De}from"./index-92939616.js";import{C as Ie}from"./index-344192ea.js";import{F as ht,O as gt,a as mt}from"./index-0d55956e.js";import{q as pe}from"./base-aba1ba3e.js";import{F as ve}from"./index-2226937d.js";import{I as Qe}from"./index-e80a7d08.js";import"./Checker-9a3c6d3f.js";const pt="_cartConfirm_qc4lq_1",yt="_cartConfirmBox_qc4lq_9",wt="_cartItem_qc4lq_15",Ct="_mlr13_qc4lq_24",_t="_protocol_qc4lq_28",Et="_paymentContainer_qc4lq_36",At="_needPrice_qc4lq_48",Bt="_allPrice_qc4lq_58",Tt="_cellItem_qc4lq_66",It="_img_qc4lq_71",St="_cellPrice_qc4lq_79",Nt="_numFont_qc4lq_85",bt="_numPrefix_qc4lq_88",Pt="_goodsContent_qc4lq_92",Ft="_goodsNum_qc4lq_92",qt="_goodsPrice_qc4lq_98",Dt="_free_qc4lq_104",vt="_goodsNums_qc4lq_107",Mt="_brandName_qc4lq_121",Lt="_model_qc4lq_127",Rt="_popupCode_qc4lq_133",Ut="_codeContainer_qc4lq_137",kt="_codeClose_qc4lq_140",Ot="_codeImg_qc4lq_150",Vt="_codeTitle_qc4lq_157",xt="_codeName_qc4lq_165",zt="_codeQr_qc4lq_172",Ht="_codeBtnText_qc4lq_185",Gt="_codeTips_qc4lq_196",Qt="_tipsTitle_qc4lq_210",Yt="_close_qc4lq_216",Jt="_codeBottom_qc4lq_221",jt="_title_qc4lq_228",Kt="_shareImg_qc4lq_243",Zt="_shareText_qc4lq_247",Xt="_freight_qc4lq_253",I={cartConfirm:pt,cartConfirmBox:yt,cartItem:wt,mlr13:Ct,protocol:_t,paymentContainer:Et,needPrice:At,allPrice:Bt,cellItem:Tt,img:It,cellPrice:St,numFont:Nt,numPrefix:bt,goodsContent:Pt,goodsNum:Ft,goodsPrice:qt,free:Dt,goodsNums:vt,brandName:Mt,model:Lt,popupCode:Rt,codeContainer:Ut,codeClose:kt,codeImg:Ot,codeTitle:Vt,codeName:xt,codeQr:zt,codeBtnText:Ht,codeTips:Gt,tipsTitle:Qt,close:Yt,codeBottom:Jt,title:jt,shareImg:Kt,shareText:Zt,freight:Xt},Wt="_cellEntry_1kuxn_1",$t="_cell_1kuxn_1",en="_userName_1kuxn_36",tn="_phone_1kuxn_41",nn="_addressInfo_1kuxn_46",on="_emtry_1kuxn_51",O={cellEntry:Wt,cell:$t,userName:en,phone:tn,addressInfo:nn,emtry:on},rn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAACZNJREFUaEPNm3twVPUVxz9nFwivwGiE8hDU0QZBO62M0MrDtraKSnciIFZGxFdrKio0gcoQQVEwjh1FUSEGilaESoGCTChqHV+AMGonrbVCsbWC8hAIMCHBEGD3dH5793n33t17N4H6+y97zz3nfM/rd87v/iK08tIVK4IU7hkIDEMj/UH6IdIH1UJECi1x2gDSgPIlsB1hG7CJhl61csMN4dZUSVqDmf61ui37jl6LMh7hSqBrfny1HpU3EJbyrU7r5dLSE/nxSb7VIoC6urKIdgWTgbuAs1yV0dgTf9LqgCqON8+T0RUH8wXqT2RMitZUd0QaK1Amg3bOV7hHgzQiOg/tUimh0q/9yvINUGvmhiD8DMo5foW1iF5kJwTulVB5jR8+ngHq+qcLONk8NxqOqunv5ReCfvS0aEWMpCraFJTLtZOavTDwBFDXPtYLpAZVUx3//0ukFjQkJdP25FImJ0Bd/UQxcuJ14NxczE7rc2EHkbYjZPSUT7PJzQpQV1cWQ2AjaPfTqrxnYbIfIsNldIUrSFeA0bAMh99Dv2Ges4M3ngwGh7qFqyPAaEFpatiM4pJzp6uquLnSJt/kZIfOQ5wKjzPAlXPmg06EnCnqOZj8EeZhwAALZMyMuzMdbPtFV80JoazN2Ar8aWjZpts50OMCKOoNnc+Etu0tLieOQeNhOLgL9v4H6r4AjYPyKyhGb7YQoUSun5G2T6a5SGtmdaQpsNX/Jm6zeN+L4eIfWqC8rMZD8M934MtPIC+csZdMM9AhMkBCsxIdTzrA5Q/NAe73opMjTWERXDYazuiZH4vDe2HLamjIu/U0ch+RGx+cEVcgAVBfnG4a5x1Afr1lzwvgsjHQLhaG+UGE48dgy5+s0M1nCY00N58rtzwatVIS4LJZDyM6M8oz/qvXcOn5bbh8HAQC+aiU+U4kAhv/AHvyBSmzZdysBxJQtLq6LYW796BZRh431bt2g6t+kSwgrQPRKkR/WQz1+/1zFOpo6N1LSktPRH2lyx4oQSOveN8W4kkdgGvugjN6eFPixHFLRJt23ugPfwWvVjlUWA/biMh1ctPDay2AS2esRLk+KdUDA0N8/iVWUcm26utg60bYvR2OHbUo23eC3v1gwHDo6j4nR2m3rIHPar0ZJJVKWCXj54wVXTE2SHPxQdTnMYMEYNQU6JTldGLbe1D7OpiccloBgYFXQ/+h7gCO1sOaJ0CdeLg5Qk2k1FPw7yLRpTMHEQ5/YElwqyoOHU3vYvjJLe6KbdsMH66LPc/REQ0aCf2HuPN680XYnW1ocAEajAwWXVJRRkTNIOuwsljo+yG40EWphkOw9kkI5zogi/EPtoGSMih0aQz+tQXeT21QPKZQQMpFX5i+EPSXvj04ciJ06+NsF6OM8WDGskdIimeNB43RnNaBL+HPC7LkoRtfXST6wrR3Ub3cejsm0Ms+OG6mVSyc1urHwRQXz0uhSzcYM9X5DVOcXp7tI8ISmbFB9Pn7Pk9M664bu0NI3FoJgaCzQkvuh5MnM5+5Gc78bsJ0wiPO/CJh+P301L7Em+mEHaKLf3MA1fRaLTFNEh2+vUgo3DzbvS1b+iA0N6UokWiGY5ngYMmCjjD+IWfFTfv2UrQxia0stSE9EutEfzf1GEpBOmcPCv28wr0orFsAX5nAsK2EBx1ypsd58LOJzgBN8/3HR715LR1gs+iiKSkAbYKzeXLE7dB3gLPQTzbB5jUOAOOR4eCJIdfBRcOc+e3carVtGQO43ZMZ+jeLLiw/kOxBPXbXBvh3r4DBI50VCp+EVb9NFpq4oezUcXFdimDsfVYeOq3318FHbyWfZBg+XlRsBhTqRKvL/guc58g4Ww6aFsuEqZvyh/ZCzfxke2YEOClmKnHobjjTZYY0Oix/FI6kVmVbCtkDIv638Lnoc79+F7C2Cb/HBiZnzi52zw2j1Nsvw97PnGl6ng8/HgddsvSju7bDuiof+ZdiSNggWjV5IRrb6O3esAO2P+/eF0aVuXsxrpYBuPMTqD9opZEJyXMuAgMw2zLy1zwF+8wcnqa49Xdcv0SRt1V/kUUGYBnq0qrlAmie/+hGGJClj/Rn+3TqrZvhneWZuZcISZeaEQcsgXLR+ZMHofFm256sbrEe/91s0O1gTBmcdXZLoGS+a9qz1U/BSTND2vbhDM/FXs/YHoODrXFpf3dzfpGcexKE9g0/bgCbPh27Qsk97oXCL3RToNY+C18fSQ/FZPFI55ixrUb1rqf7viJr4H12ojXwOhM6xLqDxToUwlW3QZ9+fuGk0+/6FF5bDE2NmVXXoaGyctOmj/XnKpm0YKwFcN7dJUjkFT/jYJpWccOYQ6fvXQGDrgbTevlZprX7YD38/a3Map5jnEzonUoXCFwn98yPHVlU39mWY0HzrS1Wr3Ns+PYQTgCJPTB72xU3wQWX5IZo8ulvb8KHr0Fz/Ly2hfKROtqHe0npQuvQKerFJ3/1MMSODd1iPbe6SQozaYy4DYovdX/LgNu4ygIYVcJGmstzbpxVZkvZc8ljwyjvyglFdOiww7pU4GUg9IDWnNsYkBcOziQ24N5dYYVkxmqJfGmkqelcqViSfvBrefHOOajmf3TvhDkK8lbo/4PkUwPu7eXw0dux31oCyO51eUTKFmYe3UcBVt/ZkUbdCvEbFC654PFIJCHagLzqFrhoiFVA3lwG/zAdotvKAdhd/k46BwZI6ULnjy9RkHPvCBExn8+QVv08aDbrn06w5sSPN2SPb78GNNwkqnGJlC92/3wWl6qP3zEfTf0A6nGM8pCW/kh8hK7IApm6OPcH0KgXn763gGNHN4PHayP5WNwf0hzUUkv7TkNk0jMZd2dcC7E+dnsviLz3jbs+kllxd4AMlWnPO96ZybrT6BMTijkpG1G+mddIhP200eEyZYn/aySJfDQgT8jrqJ7Gi0Aeck9kB211RDZwVu3xsKLhquEaIpFTdJXLA6BUPQOBWiQYcgvLVFJPAK3Cc00BDUVzEXMZz5thPNjOH4nZCpQqCg+Wy6RXW+8yXqoWOufmEESeSTYD/nTMm9rcoFC5V2a8dGquU6aBnBXqSLBLBai57ZvfpQXvSM1gOI/wkUqZVXPqL8SmAa0cVUS4w2RUs19p9g4mhVLqEKoINs2TijV53yvxnIPZdFQzT37VeC2i40Gv9P21OM7cfJVF3iAgS+nWeb2Z5/KyTaqZWsrA/r6OHRvkO4GBiAwjgvVvBWhfK5TV+rcClQbQRuALRLYD2xDdxMeRWlm5MtdXU18q/w++EDK1lDBSBwAAAABJRU5ErkJggg==",sn=k({name:"cart-address",props:{item:{type:Object,default:()=>({})},isLink:{type:Boolean,default:!0},setAddress:{type:Function,default:e=>{}}},setup(e){const n=Ee(),t=Oe(()=>[e.item.provinceName,e.item.cityName,e.item.regionName,e.item.detailAddress].join("")),s=()=>{e.isLink&&n.push("/shopAddress")};return()=>u(ge,null,[e.item&&e.item.phoneNumber?u(x,{class:O.cell,"is-link":e.isLink,onClick:()=>s(),titleStyle:{marginLeft:"0"}},{title:()=>u("div",null,[u("span",{class:O.userName},[e.item.name]),u("span",{class:O.phone},[e.item&&e.item.phoneNumber&&e.item.phoneNumber.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")]),e.item.defaultStatus&&u(He,{type:"primary",round:!0,style:{"vertical-align":"text-top",marginLeft:"10px",padding:"1px 8px"}},{default:()=>[T("默认")]})]),label:()=>u("span",{class:O.addressInfo},[t.value])}):u(x,{class:O.cell,"is-link":e.isLink,onClick:()=>s()},{icon:()=>u(ee,{name:rn,size:28},null),title:()=>u("div",{class:O.emtry},[T("去填写收货地址")])})])}}),an="_payment_1ot0l_1",ln="_title_1ot0l_13",un="_payAmount_1ot0l_21",cn="_amount_1ot0l_31",dn="_blank_1ot0l_38",fn="_payTypeRe_1ot0l_41",hn="_recommend_1ot0l_45",gn="_payBtn_1ot0l_54",M={payment:an,title:ln,payAmount:un,amount:cn,blank:dn,payTypeRe:fn,recommend:hn,payBtn:gn},mn=k({name:"payment",props:{paymentConfig:{type:Object,default:{}}},emits:["backOut","close","confirm"],setup(e,{slots:n,attrs:t,emit:s}){const o=Ae({payType:"wx",pay_channel:""}),r=()=>{lt({message:"是否放弃本次付款",confirmButtonText:"继续付款",cancelButtonText:"放弃",showCancelButton:!0}).catch(async()=>{await a(),s("backOut"),s("close")})},a=async d=>{},l=async()=>{const d=o.payType;R().weixin?d=="zfb"?(o.pay_channel="alipay_qr",i("qrCode")):d=="wx"&&(o.pay_channel="wx_pub",i("pay")):R().alipay?d=="zfb"?(o.pay_channel="alipay_wap",i("pay")):d=="wx"&&(o.pay_channel="wx_pub",i("qrCode")):(d=="zfb"?o.pay_channel="alipay_qr":d=="wx"&&(o.pay_channel="wx_pub"),i("qrCode"))},i=d=>{const f=d=="qrCode"?"payCenter":"payResult";s("confirm",{payCode:f,pay_channel:o.pay_channel})};return()=>u("div",{class:M.payment},[u(ee,{onClick:r,name:"cross",size:20},null),u("div",{class:[M.title]},[T("选择支付方式")]),u("div",{class:M.payAmount},[u("p",null,[T("应付金额")]),u("div",{class:M.amount},[u("span",null,[T("¥ ")]),me(e.paymentConfig.currentPrice)])]),u(ft,{modelValue:o.payType,"onUpdate:modelValue":d=>o.payType=d},{default:()=>[u(Ie,{border:!1},{default:()=>[u(x,{border:!0,center:!0,onClick:()=>{o.payType="wx"}},{icon:()=>u(ee,{name:"wechat-pay",color:"#15c434",size:22},null),"right-icon":()=>u(De,{name:"wx"},null),title:()=>u("div",{class:M.payTypeRe},[T("微信支付 "),u("span",{class:M.recommend},[T("推荐")])])}),u(x,{title:"支付宝支付",border:!0,center:!0,onClick:()=>{o.payType="zfb"}},{icon:()=>u(ee,{name:"alipay",color:"#009fe9",size:22},null),"right-icon":()=>u(De,{name:"zfb"},null)})]})]}),u("div",{class:M.blank},null),u(Be,{type:"primary",class:M.payBtn,block:!0,round:!0,onClick:l},{default:()=>[T("确认支付")]})])}}),Me=k({name:"col-popup",props:{height:{type:String,default:"100%"},width:{type:String,default:"100%"},teleport:{type:String,default:""},destroy:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},position:{type:String,default:"bottom"},zIndex:{type:Number,default:2018}},emits:["close","update:modelValue"],data(){return{popupShow:!1,isDestroy:!1}},watch:{modelValue(){this.hashState()}},mounted(){this.destroy&&(this.isDestroy=!1),window.addEventListener("hashchange",this.onHash,!1)},unmounted(){window.removeEventListener("hashchange",this.onHash,!1)},methods:{onHash(){this.$emit("update:modelValue",!1),this.isDestroy=!1,this.$emit("close")},onPopupClose(e){this.$emit("update:modelValue",e),this.hashState()},hashState(){if(this.modelValue){this.isDestroy=!1;const e=window.location.hash.slice(1).split("?"),n=pe.parse(e[1]);let t=0;for(const r in n)t++;const s=window.location.href,o=t>0?"&sPop="+ +new Date:"?sPop="+ +new Date;history.pushState("","",`${s}${o}`)}else{const e=window.location.hash.slice(1).split("?");pe.parse(e[1]).sPop&&window.history.go(-1)}this.$refs.protocolPopup&&(this.$refs.protocolPopup.scrollTop=0)}},render(){return u(Ve,{ref:"protocolPopup",show:this.modelValue,transitionAppear:!0,position:this.position,teleport:this.teleport,style:{height:this.height,width:this.width},zIndex:this.zIndex,onClosed:()=>{this.destroy&&(this.isDestroy=!0)}},{default:()=>[this.$slots.default&&!this.isDestroy&&this.$slots.default()]})}}),pn="_userAuth_1sper_1",yn="_cellGroup_1sper_6",wn="_btnGroup_1sper_38",Le={userAuth:pn,cellGroup:yn,btnGroup:wn},Cn=k({name:"UserAuth",props:{onSuccess:{type:Function,default:()=>{}},hideHeader:{type:Boolean,default:!1}},data(){return{form:{realName:"",idCardNo:""}}},mounted(){const e=te.user.data;this.form.realName=e==null?void 0:e.account.realName},methods:{async onSubmit(){try{const e="/edu-app/sysAccount/realNameAuth";await V.post(e,{data:{...this.form,contract:!0,save:!0}}),te.user.data.account.realName=this.form.realName,te.user.data.account.idCardNo=this.form.idCardNo,this.onSuccess()}catch(e){}}},render(){return u(ht,{class:Le.userAuth,onSubmit:this.onSubmit},{default:()=>[!this.hideHeader&&u(Te,{title:"实名认证"},null),u(Ie,{inset:!0,class:Le.cellGroup},{default:()=>[u(ve,{required:!0,label:"真实姓名",modelValue:this.form.realName,"onUpdate:modelValue":e=>this.form.realName=e,rules:[{required:!0,message:"请填写真实姓名"}],name:"realName",placeholder:"请填写真实姓名",maxlength:"50"},null),u(ve,{required:!0,label:"身份证号",modelValue:this.form.idCardNo,"onUpdate:modelValue":e=>this.form.idCardNo=e,maxlength:18,rules:[{required:!0,message:"请输入身份证号"},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"请输入正确的身份证号"}],placeholder:"请输入身份证号"},null)]}),u("div",{class:["btnGroup"]},[u(Be,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:()=>[T("确定")]})])]})}}),_n={WAIT_PAY:"待支付",PAYING:"支付中",PAID:"已付款",TIMEOUT:"已关闭",FAIL:"支付失败",CLOSED:"已关闭",REFUNDING:"退款中",REFUNDED:"已退款"},En="_saveShareImage_y5txd_1",An="_btnHeader_y5txd_16",Bn="_iconBack_y5txd_21",Tn="_previewSection_y5txd_28",In="_topImage_y5txd_35",Sn="_shareContaienr_y5txd_42",Nn="_orchestraContainer_y5txd_51",bn="_schoolName_y5txd_55",Pn="_tips_y5txd_61",Fn="_tipsTitle_y5txd_67",qn="_tipsContent_y5txd_73",Dn="_schoolLogo_y5txd_79",vn="_shareType_y5txd_99",Mn="_qrcodeSection_y5txd_108",Ln="_memo_y5txd_116",Rn="_endTime_y5txd_128",b={saveShareImage:En,btnHeader:An,iconBack:Bn,previewSection:Tn,topImage:In,shareContaienr:Sn,orchestraContainer:Nn,schoolName:bn,tips:Pn,tipsTitle:Fn,tipsContent:qn,schoolLogo:Dn,shareType:vn,qrcodeSection:Mn,memo:Ln,endTime:Rn},Un=""+new URL("orchestra-top_bg-5f030910.png",import.meta.url).href,kn=""+new URL("smallLogo-517ff5bd.png",import.meta.url).href;var K={},On=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Ye={},N={};let Se;const Vn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];N.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17};N.getSymbolTotalCodewords=function(n){return Vn[n]};N.getBCHDigit=function(e){let n=0;for(;e!==0;)n++,e>>>=1;return n};N.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');Se=n};N.isKanjiModeEnabled=function(){return typeof Se<"u"};N.toSJIS=function(n){return Se(n)};var re={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}e.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},e.from=function(s,o){if(e.isValid(s))return s;try{return n(s)}catch(r){return o}}})(re);function Je(){this.buffer=[],this.length=0}Je.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let t=0;t<n;t++)this.putBit((e>>>n-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}};var xn=Je;function Z(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Z.prototype.set=function(e,n,t,s){const o=e*this.size+n;this.data[o]=t,s&&(this.reservedBit[o]=!0)};Z.prototype.get=function(e,n){return this.data[e*this.size+n]};Z.prototype.xor=function(e,n,t){this.data[e*this.size+n]^=t};Z.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]};var zn=Z,je={};(function(e){const n=N.getSymbolSize;e.getRowColCoords=function(s){if(s===1)return[];const o=Math.floor(s/7)+2,r=n(s),a=r===145?26:Math.ceil((r-13)/(2*o-2))*2,l=[r-7];for(let i=1;i<o-1;i++)l[i]=l[i-1]-a;return l.push(6),l.reverse()},e.getPositions=function(s){const o=[],r=e.getRowColCoords(s),a=r.length;for(let l=0;l<a;l++)for(let i=0;i<a;i++)l===0&&i===0||l===0&&i===a-1||l===a-1&&i===0||o.push([r[l],r[i]]);return o}})(je);var Ke={};const Hn=N.getSymbolSize,Re=7;Ke.getPositions=function(n){const t=Hn(n);return[[0,0],[t-Re,0],[0,t-Re]]};var Ze={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const r=o.size;let a=0,l=0,i=0,d=null,f=null;for(let A=0;A<r;A++){l=i=0,d=f=null;for(let y=0;y<r;y++){let g=o.get(A,y);g===d?l++:(l>=5&&(a+=n.N1+(l-5)),d=g,l=1),g=o.get(y,A),g===f?i++:(i>=5&&(a+=n.N1+(i-5)),f=g,i=1)}l>=5&&(a+=n.N1+(l-5)),i>=5&&(a+=n.N1+(i-5))}return a},e.getPenaltyN2=function(o){const r=o.size;let a=0;for(let l=0;l<r-1;l++)for(let i=0;i<r-1;i++){const d=o.get(l,i)+o.get(l,i+1)+o.get(l+1,i)+o.get(l+1,i+1);(d===4||d===0)&&a++}return a*n.N2},e.getPenaltyN3=function(o){const r=o.size;let a=0,l=0,i=0;for(let d=0;d<r;d++){l=i=0;for(let f=0;f<r;f++)l=l<<1&2047|o.get(d,f),f>=10&&(l===1488||l===93)&&a++,i=i<<1&2047|o.get(f,d),f>=10&&(i===1488||i===93)&&a++}return a*n.N3},e.getPenaltyN4=function(o){let r=0;const a=o.data.length;for(let i=0;i<a;i++)r+=o.data[i];return Math.abs(Math.ceil(r*100/a/5)-10)*n.N4};function t(s,o,r){switch(s){case e.Patterns.PATTERN000:return(o+r)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(o+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return o*r%2+o*r%3===0;case e.Patterns.PATTERN110:return(o*r%2+o*r%3)%2===0;case e.Patterns.PATTERN111:return(o*r%3+(o+r)%2)%2===0;default:throw new Error("bad maskPattern:"+s)}}e.applyMask=function(o,r){const a=r.size;for(let l=0;l<a;l++)for(let i=0;i<a;i++)r.isReserved(i,l)||r.xor(i,l,t(o,i,l))},e.getBestMask=function(o,r){const a=Object.keys(e.Patterns).length;let l=0,i=1/0;for(let d=0;d<a;d++){r(d),e.applyMask(d,o);const f=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),f<i&&(i=f,l=d)}return l}})(Ze);var se={};const L=re,X=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],W=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];se.getBlocksCount=function(n,t){switch(t){case L.L:return X[(n-1)*4+0];case L.M:return X[(n-1)*4+1];case L.Q:return X[(n-1)*4+2];case L.H:return X[(n-1)*4+3];default:return}};se.getTotalCodewordsCount=function(n,t){switch(t){case L.L:return W[(n-1)*4+0];case L.M:return W[(n-1)*4+1];case L.Q:return W[(n-1)*4+2];case L.H:return W[(n-1)*4+3];default:return}};var Xe={},ae={};const J=new Uint8Array(512),ne=new Uint8Array(256);(function(){let n=1;for(let t=0;t<255;t++)J[t]=n,ne[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)J[t]=J[t-255]})();ae.log=function(n){if(n<1)throw new Error("log("+n+")");return ne[n]};ae.exp=function(n){return J[n]};ae.mul=function(n,t){return n===0||t===0?0:J[ne[n]+ne[t]]};(function(e){const n=ae;e.mul=function(s,o){const r=new Uint8Array(s.length+o.length-1);for(let a=0;a<s.length;a++)for(let l=0;l<o.length;l++)r[a+l]^=n.mul(s[a],o[l]);return r},e.mod=function(s,o){let r=new Uint8Array(s);for(;r.length-o.length>=0;){const a=r[0];for(let i=0;i<o.length;i++)r[i]^=n.mul(o[i],a);let l=0;for(;l<r.length&&r[l]===0;)l++;r=r.slice(l)}return r},e.generateECPolynomial=function(s){let o=new Uint8Array([1]);for(let r=0;r<s;r++)o=e.mul(o,new Uint8Array([1,n.exp(r)]));return o}})(Xe);const We=Xe;function Ne(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Ne.prototype.initialize=function(n){this.degree=n,this.genPoly=We.generateECPolynomial(this.degree)};Ne.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const s=We.mod(t,this.genPoly),o=this.degree-s.length;if(o>0){const r=new Uint8Array(this.degree);return r.set(s,o),r}return s};var Gn=Ne,$e={},U={},be={};be.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40};var q={};const et="[0-9]+",Qn="[A-Z $%*+\\-./:]+";let j="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";j=j.replace(/u/g,"\\u");const Yn="(?:(?![A-Z0-9 $%*+\\-./:]|"+j+`)(?:.|[\r
- ]))+`;q.KANJI=new RegExp(j,"g");q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");q.BYTE=new RegExp(Yn,"g");q.NUMERIC=new RegExp(et,"g");q.ALPHANUMERIC=new RegExp(Qn,"g");const Jn=new RegExp("^"+j+"$"),jn=new RegExp("^"+et+"$"),Kn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");q.testKanji=function(n){return Jn.test(n)};q.testNumeric=function(n){return jn.test(n)};q.testAlphanumeric=function(n){return Kn.test(n)};(function(e){const n=be,t=q;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,a){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?r.ccBits[0]:a<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return t.testNumeric(r)?e.NUMERIC:t.testAlphanumeric(r)?e.ALPHANUMERIC:t.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function s(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(r,a){if(e.isValid(r))return r;try{return s(r)}catch(l){return a}}})(U);(function(e){const n=N,t=se,s=re,o=U,r=be,a=7973,l=n.getBCHDigit(a);function i(y,g,C){for(let c=1;c<=40;c++)if(g<=e.getCapacity(c,C,y))return c}function d(y,g){return o.getCharCountIndicator(y,g)+4}function f(y,g){let C=0;return y.forEach(function(c){const w=d(c.mode,g);C+=w+c.getBitsLength()}),C}function A(y,g){for(let C=1;C<=40;C++)if(f(y,C)<=e.getCapacity(C,g,o.MIXED))return C}e.from=function(g,C){return r.isValid(g)?parseInt(g,10):C},e.getCapacity=function(g,C,c){if(!r.isValid(g))throw new Error("Invalid QR Code version");typeof c>"u"&&(c=o.BYTE);const w=n.getSymbolTotalCodewords(g),m=t.getTotalCodewordsCount(g,C),_=(w-m)*8;if(c===o.MIXED)return _;const h=_-d(c,g);switch(c){case o.NUMERIC:return Math.floor(h/10*3);case o.ALPHANUMERIC:return Math.floor(h/11*2);case o.KANJI:return Math.floor(h/13);case o.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(g,C){let c;const w=s.from(C,s.M);if(Array.isArray(g)){if(g.length>1)return A(g,w);if(g.length===0)return 1;c=g[0]}else c=g;return i(c.mode,c.getLength(),w)},e.getEncodedBits=function(g){if(!r.isValid(g)||g<7)throw new Error("Invalid QR Code version");let C=g<<12;for(;n.getBCHDigit(C)-l>=0;)C^=a<<n.getBCHDigit(C)-l;return g<<12|C}})($e);var tt={};const ye=N,nt=1335,Zn=21522,Ue=ye.getBCHDigit(nt);tt.getEncodedBits=function(n,t){const s=n.bit<<3|t;let o=s<<10;for(;ye.getBCHDigit(o)-Ue>=0;)o^=nt<<ye.getBCHDigit(o)-Ue;return(s<<10|o)^Zn};var ot={};const Xn=U;function z(e){this.mode=Xn.NUMERIC,this.data=e.toString()}z.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)};z.prototype.getLength=function(){return this.data.length};z.prototype.getBitsLength=function(){return z.getBitsLength(this.data.length)};z.prototype.write=function(n){let t,s,o;for(t=0;t+3<=this.data.length;t+=3)s=this.data.substr(t,3),o=parseInt(s,10),n.put(o,10);const r=this.data.length-t;r>0&&(s=this.data.substr(t),o=parseInt(s,10),n.put(o,r*3+1))};var Wn=z;const $n=U,ue=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function H(e){this.mode=$n.ALPHANUMERIC,this.data=e}H.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)};H.prototype.getLength=function(){return this.data.length};H.prototype.getBitsLength=function(){return H.getBitsLength(this.data.length)};H.prototype.write=function(n){let t;for(t=0;t+2<=this.data.length;t+=2){let s=ue.indexOf(this.data[t])*45;s+=ue.indexOf(this.data[t+1]),n.put(s,11)}this.data.length%2&&n.put(ue.indexOf(this.data[t]),6)};var eo=H,to=function(n){for(var t=[],s=n.length,o=0;o<s;o++){var r=n.charCodeAt(o);if(r>=55296&&r<=56319&&s>o+1){var a=n.charCodeAt(o+1);a>=56320&&a<=57343&&(r=(r-55296)*1024+a-56320+65536,o+=1)}if(r<128){t.push(r);continue}if(r<2048){t.push(r>>6|192),t.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128);continue}if(r>=65536&&r<=1114111){t.push(r>>18|240),t.push(r>>12&63|128),t.push(r>>6&63|128),t.push(r&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const no=to,oo=U;function G(e){this.mode=oo.BYTE,typeof e=="string"&&(e=no(e)),this.data=new Uint8Array(e)}G.getBitsLength=function(n){return n*8};G.prototype.getLength=function(){return this.data.length};G.prototype.getBitsLength=function(){return G.getBitsLength(this.data.length)};G.prototype.write=function(e){for(let n=0,t=this.data.length;n<t;n++)e.put(this.data[n],8)};var ro=G;const so=U,ao=N;function Q(e){this.mode=so.KANJI,this.data=e}Q.getBitsLength=function(n){return n*13};Q.prototype.getLength=function(){return this.data.length};Q.prototype.getBitsLength=function(){return Q.getBitsLength(this.data.length)};Q.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let t=ao.toSJIS(this.data[n]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
- Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};var io=Q,rt={exports:{}};(function(e){var n={single_source_shortest_paths:function(t,s,o){var r={},a={};a[s]=0;var l=n.PriorityQueue.make();l.push(s,0);for(var i,d,f,A,y,g,C,c,w;!l.empty();){i=l.pop(),d=i.value,A=i.cost,y=t[d]||{};for(f in y)y.hasOwnProperty(f)&&(g=y[f],C=A+g,c=a[f],w=typeof a[f]>"u",(w||c>C)&&(a[f]=C,l.push(f,C),r[f]=d))}if(typeof o<"u"&&typeof a[o]>"u"){var m=["Could not find a path from ",s," to ",o,"."].join("");throw new Error(m)}return r},extract_shortest_path_from_predecessor_list:function(t,s){for(var o=[],r=s;r;)o.push(r),t[r],r=t[r];return o.reverse(),o},find_path:function(t,s,o){var r=n.single_source_shortest_paths(t,s,o);return n.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(t){var s=n.PriorityQueue,o={},r;t=t||{};for(r in s)s.hasOwnProperty(r)&&(o[r]=s[r]);return o.queue=[],o.sorter=t.sorter||s.default_sorter,o},default_sorter:function(t,s){return t.cost-s.cost},push:function(t,s){var o={value:t,cost:s};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=n})(rt);var lo=rt.exports;(function(e){const n=U,t=Wn,s=eo,o=ro,r=io,a=q,l=N,i=lo;function d(m){return unescape(encodeURIComponent(m)).length}function f(m,_,h){const p=[];let E;for(;(E=m.exec(h))!==null;)p.push({data:E[0],index:E.index,mode:_,length:E[0].length});return p}function A(m){const _=f(a.NUMERIC,n.NUMERIC,m),h=f(a.ALPHANUMERIC,n.ALPHANUMERIC,m);let p,E;return l.isKanjiModeEnabled()?(p=f(a.BYTE,n.BYTE,m),E=f(a.KANJI,n.KANJI,m)):(p=f(a.BYTE_KANJI,n.BYTE,m),E=[]),_.concat(h,p,E).sort(function(S,P){return S.index-P.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function y(m,_){switch(_){case n.NUMERIC:return t.getBitsLength(m);case n.ALPHANUMERIC:return s.getBitsLength(m);case n.KANJI:return r.getBitsLength(m);case n.BYTE:return o.getBitsLength(m)}}function g(m){return m.reduce(function(_,h){const p=_.length-1>=0?_[_.length-1]:null;return p&&p.mode===h.mode?(_[_.length-1].data+=h.data,_):(_.push(h),_)},[])}function C(m){const _=[];for(let h=0;h<m.length;h++){const p=m[h];switch(p.mode){case n.NUMERIC:_.push([p,{data:p.data,mode:n.ALPHANUMERIC,length:p.length},{data:p.data,mode:n.BYTE,length:p.length}]);break;case n.ALPHANUMERIC:_.push([p,{data:p.data,mode:n.BYTE,length:p.length}]);break;case n.KANJI:_.push([p,{data:p.data,mode:n.BYTE,length:d(p.data)}]);break;case n.BYTE:_.push([{data:p.data,mode:n.BYTE,length:d(p.data)}])}}return _}function c(m,_){const h={},p={start:{}};let E=["start"];for(let B=0;B<m.length;B++){const S=m[B],P=[];for(let v=0;v<S.length;v++){const F=S[v],Y=""+B+v;P.push(Y),h[Y]={node:F,lastCount:0},p[Y]={};for(let le=0;le<E.length;le++){const D=E[le];h[D]&&h[D].node.mode===F.mode?(p[D][Y]=y(h[D].lastCount+F.length,F.mode)-y(h[D].lastCount,F.mode),h[D].lastCount+=F.length):(h[D]&&(h[D].lastCount=F.length),p[D][Y]=y(F.length,F.mode)+4+n.getCharCountIndicator(F.mode,_))}}E=P}for(let B=0;B<E.length;B++)p[E[B]].end=0;return{map:p,table:h}}function w(m,_){let h;const p=n.getBestModeForData(m);if(h=n.from(_,p),h!==n.BYTE&&h.bit<p.bit)throw new Error('"'+m+'" cannot be encoded with mode '+n.toString(h)+`.
- Suggested mode is: `+n.toString(p));switch(h===n.KANJI&&!l.isKanjiModeEnabled()&&(h=n.BYTE),h){case n.NUMERIC:return new t(m);case n.ALPHANUMERIC:return new s(m);case n.KANJI:return new r(m);case n.BYTE:return new o(m)}}e.fromArray=function(_){return _.reduce(function(h,p){return typeof p=="string"?h.push(w(p,null)):p.data&&h.push(w(p.data,p.mode)),h},[])},e.fromString=function(_,h){const p=A(_,l.isKanjiModeEnabled()),E=C(p),B=c(E,h),S=i.find_path(B.map,"start","end"),P=[];for(let v=1;v<S.length-1;v++)P.push(B.table[S[v]].node);return e.fromArray(g(P))},e.rawSplit=function(_){return e.fromArray(A(_,l.isKanjiModeEnabled()))}})(ot);const ie=N,ce=re,uo=xn,co=zn,fo=je,ho=Ke,we=Ze,Ce=se,go=Gn,oe=$e,mo=tt,po=U,de=ot;function yo(e,n){const t=e.size,s=ho.getPositions(n);for(let o=0;o<s.length;o++){const r=s[o][0],a=s[o][1];for(let l=-1;l<=7;l++)if(!(r+l<=-1||t<=r+l))for(let i=-1;i<=7;i++)a+i<=-1||t<=a+i||(l>=0&&l<=6&&(i===0||i===6)||i>=0&&i<=6&&(l===0||l===6)||l>=2&&l<=4&&i>=2&&i<=4?e.set(r+l,a+i,!0,!0):e.set(r+l,a+i,!1,!0))}}function wo(e){const n=e.size;for(let t=8;t<n-8;t++){const s=t%2===0;e.set(t,6,s,!0),e.set(6,t,s,!0)}}function Co(e,n){const t=fo.getPositions(n);for(let s=0;s<t.length;s++){const o=t[s][0],r=t[s][1];for(let a=-2;a<=2;a++)for(let l=-2;l<=2;l++)a===-2||a===2||l===-2||l===2||a===0&&l===0?e.set(o+a,r+l,!0,!0):e.set(o+a,r+l,!1,!0)}}function _o(e,n){const t=e.size,s=oe.getEncodedBits(n);let o,r,a;for(let l=0;l<18;l++)o=Math.floor(l/3),r=l%3+t-8-3,a=(s>>l&1)===1,e.set(o,r,a,!0),e.set(r,o,a,!0)}function fe(e,n,t){const s=e.size,o=mo.getEncodedBits(n,t);let r,a;for(r=0;r<15;r++)a=(o>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(s-15+r,8,a,!0),r<8?e.set(8,s-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(s-8,8,1,!0)}function Eo(e,n){const t=e.size;let s=-1,o=t-1,r=7,a=0;for(let l=t-1;l>0;l-=2)for(l===6&&l--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,l-i)){let d=!1;a<n.length&&(d=(n[a]>>>r&1)===1),e.set(o,l-i,d),r--,r===-1&&(a++,r=7)}if(o+=s,o<0||t<=o){o-=s,s=-s;break}}}function Ao(e,n,t){const s=new uo;t.forEach(function(i){s.put(i.mode.bit,4),s.put(i.getLength(),po.getCharCountIndicator(i.mode,e)),i.write(s)});const o=ie.getSymbolTotalCodewords(e),r=Ce.getTotalCodewordsCount(e,n),a=(o-r)*8;for(s.getLengthInBits()+4<=a&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const l=(a-s.getLengthInBits())/8;for(let i=0;i<l;i++)s.put(i%2?17:236,8);return Bo(s,e,n)}function Bo(e,n,t){const s=ie.getSymbolTotalCodewords(n),o=Ce.getTotalCodewordsCount(n,t),r=s-o,a=Ce.getBlocksCount(n,t),l=s%a,i=a-l,d=Math.floor(s/a),f=Math.floor(r/a),A=f+1,y=d-f,g=new go(y);let C=0;const c=new Array(a),w=new Array(a);let m=0;const _=new Uint8Array(e.buffer);for(let S=0;S<a;S++){const P=S<i?f:A;c[S]=_.slice(C,C+P),w[S]=g.encode(c[S]),C+=P,m=Math.max(m,P)}const h=new Uint8Array(s);let p=0,E,B;for(E=0;E<m;E++)for(B=0;B<a;B++)E<c[B].length&&(h[p++]=c[B][E]);for(E=0;E<y;E++)for(B=0;B<a;B++)h[p++]=w[B][E];return h}function To(e,n,t,s){let o;if(Array.isArray(e))o=de.fromArray(e);else if(typeof e=="string"){let d=n;if(!d){const f=de.rawSplit(e);d=oe.getBestVersionForData(f,t)}o=de.fromString(e,d||40)}else throw new Error("Invalid data");const r=oe.getBestVersionForData(o,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!n)n=r;else if(n<r)throw new Error(`
- The chosen QR Code version cannot contain this amount of data.
- Minimum version required to store current data is: `+r+`.
- `);const a=Ao(n,t,o),l=ie.getSymbolSize(n),i=new co(l);return yo(i,n),wo(i),Co(i,n),fe(i,t,0),n>=7&&_o(i,n),Eo(i,a),isNaN(s)&&(s=we.getBestMask(i,fe.bind(null,i,t))),we.applyMask(s,i),fe(i,t,s),{modules:i,version:n,errorCorrectionLevel:t,maskPattern:s,segments:o}}Ye.create=function(n,t){if(typeof n>"u"||n==="")throw new Error("No input text");let s=ce.M,o,r;return typeof t<"u"&&(s=ce.from(t.errorCorrectionLevel,ce.M),o=oe.from(t.version),r=we.from(t.maskPattern),t.toSJISFunc&&ie.setToSJISFunction(t.toSJISFunc)),To(n,o,s,r)};var st={},Pe={};(function(e){function n(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let s=t.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+t);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(r){return[r,r]}))),s.length===6&&s.push("F","F");const o=parseInt(s.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+s.slice(0,6).join("")}}e.getOptions=function(s){s||(s={}),s.color||(s.color={});const o=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,r=s.width&&s.width>=21?s.width:void 0,a=s.scale||4;return{width:r,scale:r?4:a,margin:o,color:{dark:n(s.color.dark||"#000000ff"),light:n(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},e.getScale=function(s,o){return o.width&&o.width>=s+o.margin*2?o.width/(s+o.margin*2):o.scale},e.getImageWidth=function(s,o){const r=e.getScale(s,o);return Math.floor((s+o.margin*2)*r)},e.qrToImageData=function(s,o,r){const a=o.modules.size,l=o.modules.data,i=e.getScale(a,r),d=Math.floor((a+r.margin*2)*i),f=r.margin*i,A=[r.color.light,r.color.dark];for(let y=0;y<d;y++)for(let g=0;g<d;g++){let C=(y*d+g)*4,c=r.color.light;if(y>=f&&g>=f&&y<d-f&&g<d-f){const w=Math.floor((y-f)/i),m=Math.floor((g-f)/i);c=A[l[w*a+m]?1:0]}s[C++]=c.r,s[C++]=c.g,s[C++]=c.b,s[C]=c.a}}})(Pe);(function(e){const n=Pe;function t(o,r,a){o.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=a,r.width=a,r.style.height=a+"px",r.style.width=a+"px"}function s(){try{return document.createElement("canvas")}catch(o){throw new Error("You need to specify a canvas element")}}e.render=function(r,a,l){let i=l,d=a;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),a||(d=s()),i=n.getOptions(i);const f=n.getImageWidth(r.modules.size,i),A=d.getContext("2d"),y=A.createImageData(f,f);return n.qrToImageData(y.data,r,i),t(A,d,f),A.putImageData(y,0,0),d},e.renderToDataURL=function(r,a,l){let i=l;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),i||(i={});const d=e.render(r,a,i),f=i.type||"image/png",A=i.rendererOpts||{};return d.toDataURL(f,A.quality)}})(st);var at={};const Io=Pe;function ke(e,n){const t=e.a/255,s=n+'="'+e.hex+'"';return t<1?s+" "+n+'-opacity="'+t.toFixed(2).slice(1)+'"':s}function he(e,n,t){let s=e+n;return typeof t<"u"&&(s+=" "+t),s}function So(e,n,t){let s="",o=0,r=!1,a=0;for(let l=0;l<e.length;l++){const i=Math.floor(l%n),d=Math.floor(l/n);!i&&!r&&(r=!0),e[l]?(a++,l>0&&i>0&&e[l-1]||(s+=r?he("M",i+t,.5+d+t):he("m",o,0),o=0,r=!1),i+1<n&&e[l+1]||(s+=he("h",a),a=0)):o++}return s}at.render=function(n,t,s){const o=Io.getOptions(t),r=n.modules.size,a=n.modules.data,l=r+o.margin*2,i=o.color.light.a?"<path "+ke(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+ke(o.color.dark,"stroke")+' d="'+So(a,r,o.margin)+'"/>',f='viewBox="0 0 '+l+" "+l+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+f+' shape-rendering="crispEdges">'+i+d+`</svg>
- `;return typeof s=="function"&&s(null,y),y};const No=On,_e=Ye,it=st,bo=at;function Fe(e,n,t,s,o){const r=[].slice.call(arguments,1),a=r.length,l=typeof r[a-1]=="function";if(!l&&!No())throw new Error("Callback required as last argument");if(l){if(a<2)throw new Error("Too few arguments provided");a===2?(o=t,t=n,n=s=void 0):a===3&&(n.getContext&&typeof o>"u"?(o=s,s=void 0):(o=s,s=t,t=n,n=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=n,n=s=void 0):a===2&&!n.getContext&&(s=t,t=n,n=void 0),new Promise(function(i,d){try{const f=_e.create(t,s);i(e(f,n,s))}catch(f){d(f)}})}try{const i=_e.create(t,s);o(null,e(i,n,s))}catch(i){o(i)}}K.create=_e.create;K.toCanvas=Fe.bind(null,it.render);K.toDataURL=Fe.bind(null,it.renderToDataURL);K.toString=Fe.bind(null,function(e,n,t){return bo.render(e,t)});const Po="_qrcode_izshm_1",Fo="_qrcodeCanvas_izshm_4",qo="_qrcodeLogo_izshm_8",Do="_small_izshm_18",$={qrcode:Po,qrcodeCanvas:Fo,qrcodeLogo:qo,small:Do},vo=k({props:{text:{type:String,default:""},size:{type:String,default:"200px"},logoSize:{type:String,default:"default"}},setup(e){const n=xe(),t=()=>{K.toCanvas(n.value,e.text,{margin:1},s=>{s&&console.log(s),console.log("success")})};return ut(()=>e.text,()=>{t()}),ze(()=>{ct(()=>{t()})}),()=>u("div",{class:$.qrcode,style:{width:e.size,height:e.size}},[u("canvas",{ref:n,class:$.qrcodeCanvas},null),u("img",{src:kn,class:[$.qrcodeLogo,e.logoSize==="small"&&$.small]},null)])}}),Mo=k({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup(e){return Ee(),Ae({height:0}),()=>u("div",{class:[b.saveShareImage]},[R().isApp&&u(Ge,{position:"top"},{default:()=>[u(Te,{title:e.orderType==="VIP"?"会员购买":"报名缴费"},null)]}),u(Qe,{src:Un,class:b.topImage},null),u("div",{class:[b.shareContaienr,b.orchestraContainer]},[u("div",{class:b.schoolName},[e.orderType==="VIP"?"会员购买":"报名缴费"]),u("div",{class:b.shareType},[T("请截图下方二维码"),u("span",null,[T("登录"),e.pay_channel==="wx_pub"?"微信":"支付宝",T("扫码支付")])]),u("div",{class:b.qrcodeSection},[u(vo,{text:e.url,logoSize:"small",size:"100%"},null)]),u("div",{class:b.memo},[T("请在30分钟内扫码支付")])]),u("div",{class:[b.shareContaienr,b.tips]},[u("div",{class:b.tipsTitle},[T("使用说明:")]),u("div",{class:b.tipsContent},[T("1.打开"),e.pay_channel==="wx_pub"?"微信":"支付宝",T("扫一扫"),u("br",null,null),T("2.选择相册中的二维码"),u("br",null,null),T("3.请在30分钟内扫码支付")])])])}}),Lo=e=>{let n="qrCode";return R().weixin?e=="alipay_qr"||e=="alipay_wap"?n="qrCode":e=="wx_pub"&&(n="pay"):R().alipay&&e=="alipay_wap"?n="pay":n="qrCode",n=="qrCode"?"payDefine":"payResult"},Jo=k({name:"order-detail",setup(){const e=dt(),n=Ee(),t=Ae({paymentType:"adapay",orderTimer:null,paymentStatus:!1,showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderNo:e.query.orderNo,orderInfo:{},goodsInfos:[],config:e.query.config?JSON.parse(e.query.config):{},hasFreight:!e.query.hf,freight:"",agreeStatus:!0,showHeader:!1,authShow:!1,selectGoodsId:null,currentPrice:0,dialogStatus:!1,dialogMessage:"",submitStatus:!1}),s=Oe(()=>t.orderInfo.orderType),o=xe({}),r=async()=>{try{const{data:c}=await V.get("/edu-app/userPaymentOrder/detail/"+t.orderNo),w=c.goodsInfos||[];t.orderInfo=c;let m=!1,_=!1;w.forEach(h=>{const p=h.goodsUrl?h.goodsUrl.split(",")[0]:"";h.goodsUrl=p,h.goodsType==="INSTRUMENTS"?m=!0:h.goodsType==="TEXTBOOK"&&(_=!0)}),t.goodsInfos=w,o.value.id||(o.value=c.addresses||{}),console.log(m,_),!m&&_?t.freight="到付":t.freight="免运费",c.status!=="WAIT_PAY"&&c.status!=="PAYING"&&(t.dialogStatus=!0,t.dialogMessage="订单"+_n[c.status])}catch(c){}},a=c=>{const w=t.config;t.pay_channel=c.pay_channel;const m=pe.stringify({pay_channel:c.pay_channel,wxAppId:w.wxAppId,body:w.body,price:w.price,orderNo:w.merOrderNo,userId:w.userId});c.payCode==="payResult"?window.location.href=window.location.origin+"/classroom-app/#/payResult?"+m:(t.qrCodeUrl=window.location.origin+"/classroom-app/#/payDefine?"+m,t.showQrcode=!0,t.paymentStatus=!1,setTimeout(()=>{l()},300))},l=async()=>{const c=setInterval(async()=>{if(e.name!="orderDetail"){clearInterval(c);return}t.orderTimer=c;try{const{data:w}=await V.post("/api-student/open/userOrder/paymentStatus/"+t.orderNo,{hideLoading:!0});w.status!=="WAIT_PAY"&&w.status!=="PAYING"&&(t.showQrcode=!1,clearInterval(t.orderTimer),setTimeout(()=>{y()},100))}catch(w){clearInterval(t.orderTimer)}},5e3)},i=async()=>{clearInterval(t.orderTimer),s.value==="VIP"?f(d):A(d)},d=()=>{const c=t.pay_channel;if(c){const w=Lo(t.pay_channel);a({payCode:w,pay_channel:c})}else s.value==="VIP"?t.paymentStatus=!0:a({payCode:"payResult",pay_channel:"wx_pub"})},f=async c=>{try{t.submitStatus=!0;const{data:w}=await V.get("/api-student/userPaymentOrder/detail/"+t.orderNo,{hideLoading:!1});t.pay_channel=w.paymentChannel,t.submitStatus=!1,w.status!=="WAIT_PAY"&&w.status!=="PAYING"?n.replace({path:"/payment-result",query:{orderNo:t.orderNo}}):c&&c()}catch(w){t.submitStatus=!1}},A=async c=>{if(!o.value.id){qe("请选择收货地址");return}if(!t.agreeStatus){qe("请先阅读并同意《管乐团平台服务协议》");return}te.user.data,t.submitStatus=!0;try{const{data:w}=await V.post("/edu-app/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:t.orderNo,orderType:"SCHOOL_REGISTER",receiveAddress:o.value.id}});t.pay_channel=w.paymentChannel,w.status!=="WAIT_PAY"&&w.status!=="PAYING"?y():c&&c()}catch(w){}finally{t.submitStatus=!1}},y=()=>{n.replace({path:"/payment-result",query:{orderNo:t.orderNo}})},g=async()=>{try{await V.post("/edu-app/userPaymentOrder/cancelPayment/"+t.orderNo),n.back()}catch(c){}},C=()=>{t.authShow=!1,i()};return ze(()=>{R().isApp?t.showHeader=!0:t.showHeader=!1;let c=sessionStorage.getItem("addressDetails");c=c?JSON.parse(c):{},o.value=c,sessionStorage.removeItem("addressDetails"),r()}),()=>u(ge,null,[R().isApp&&u(Te,{border:!1},null),u("div",{class:I.cartConfirm},[s.value==="SCHOOL_REGISTER"&&u("div",{class:I.cartConfirmBox},[u(sn,{item:o.value},null)]),u(Ie,{style:{margin:0}},{default:()=>[t.goodsInfos&&t.goodsInfos.map(c=>u(x,{class:I.cellItem},{icon:()=>u(Qe,{class:I.img,src:c.goodsUrl},null),title:()=>u("div",{class:I.goodsContent},[u("h2",null,[u("span",null,[c.goodsName]),u("span",{class:I.goodsNum},[c.goodsType==="VIP"||c.goodsType==="DEPOSIT"?"6个月":"x 1"])]),u("div",{class:I.goodsPrice},[u(He,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:I.brandName},{default:()=>[c.brandName]}),u("span",{class:[I.goodsNums,c.paymentCashAmount>0?I.numFont:I.free]},[c.paymentCashAmount>0?u(ge,null,[u("span",{class:I.numPrefix},[T("¥ ")]),me(c.paymentCashAmount)]):"免费"])]),u("p",{class:I.model},[c.description])])}))]}),s.value==="SCHOOL_REGISTER"&&u(x,{class:I.freight,title:"运费",value:t.freight},null)]),u(Ge,{position:"bottom"},{default:()=>[u("div",{class:I.protocol},[u(gt,{modelValue:t.agreeStatus,"onUpdate:modelValue":c=>t.agreeStatus=c,showHeader:t.showHeader,style:{paddingTop:0,paddingBottom:0}},null)]),u("div",{class:I.paymentContainer},[u("div",{class:I.payemntPrice},[u("p",{class:I.needPrice},[T("支付金额:"),u("span",null,[T("¥ "),me(t.orderInfo.currentPrice)])])]),u("div",{class:I.paymentBtn},[u(Be,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",round:!0,onClick:i,loading:t.submitStatus,disabled:t.submitStatus},{default:()=>[T("立即购买")]})])])]}),u(Ve,{show:t.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[u(mn,{paymentConfig:t.orderInfo,onClose:()=>t.paymentStatus=!1,onBackOut:g,onConfirm:c=>a(c)},null)]}),u(Me,{modelValue:t.showQrcode,"onUpdate:modelValue":c=>t.showQrcode=c,onClose:()=>{clearInterval(t.orderTimer)}},{default:()=>[u(Mo,{url:t.qrCodeUrl,pay_channel:t.pay_channel,orderType:s.value},null)]}),u(Me,{modelValue:t.authShow,"onUpdate:modelValue":c=>t.authShow=c},{default:()=>[u(Cn,{onSuccess:C,hideHeader:!R().isApp},null)]}),u(mt,{title:"提示",show:t.dialogStatus,"onUpdate:show":c=>t.dialogStatus=c,message:t.dialogMessage,confirmButtonText:"确定",onConfirm:()=>{y()}},null)])}});export{Jo as default};
|