@invoice-sdk/widget 1.50.4 → 1.50.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2406,7 +2406,7 @@ let ce = null, le = null;
|
|
|
2406
2406
|
function il(o) {
|
|
2407
2407
|
return se(this, null, function* () {
|
|
2408
2408
|
if (o.mode && Ze(o.mode), o.language && et(o.language), !le) {
|
|
2409
|
-
const { InvoiceRegisterWidget: n } = yield import("./widget-
|
|
2409
|
+
const { InvoiceRegisterWidget: n } = yield import("./widget-CqgFpPhs.js");
|
|
2410
2410
|
le = n;
|
|
2411
2411
|
}
|
|
2412
2412
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
@@ -2428,7 +2428,7 @@ function il(o) {
|
|
|
2428
2428
|
function ol(o) {
|
|
2429
2429
|
return se(this, null, function* () {
|
|
2430
2430
|
if (o.mode && Ze(o.mode), o.language && et(o.language), !ce) {
|
|
2431
|
-
const { EContractWidget: n } = yield import("./widget-
|
|
2431
|
+
const { EContractWidget: n } = yield import("./widget-CqgFpPhs.js");
|
|
2432
2432
|
ce = n;
|
|
2433
2433
|
}
|
|
2434
2434
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
package/dist/index.esm.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<span class="wgt:text-sm wgt:text-text-sub-600">${w("loading")}...</span>
|
|
42
42
|
</div>
|
|
43
43
|
</td>
|
|
44
|
-
`,b.appendChild(F);const W=document.createElement("div");W.className="wgt:flex wgt:items-center wgt:gap-4"
|
|
44
|
+
`,b.appendChild(F);const W=document.createElement("div");W.className="wgt:flex wgt:items-center wgt:gap-4";const EA=document.createElement("span");EA.className="wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black",EA.innerText=w("paymentMethod"),W.appendChild(EA);const hA=document.createElement("div");hA.className="wgt:flex wgt:items-center wgt:gap-2 wgt:rounded-[10px] wgt:border wgt:border-soft-200 wgt:bg-transparent wgt:p-2",W.appendChild(hA);const CA=document.createElement("div");CA.innerHTML=`
|
|
45
45
|
<svg
|
|
46
46
|
width="24"
|
|
47
47
|
height="24"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600">
|
|
71
71
|
${w("noDataAvailable")||"No data available"}
|
|
72
72
|
</td>
|
|
73
|
-
`,b.appendChild(S),e(0);return}if(Qg&&OA.length>0){const S=document.createElement("tr"),IA=document.createElement("td");IA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium",IA.innerText=`${(_=OA[0])==null?void 0:_.name}`,S.appendChild(IA);const DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=w("copy"),S.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center";const nA=document.createElement("div");nA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const eA=document.createElement("button");eA.type="button",eA.ariaLabel=w("decrease"),eA.disabled=!0,eA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50",eA.innerText="–",eA.addEventListener("click",()=>{UA>1&&(UA-=1,zA())}),nA.appendChild(eA);const oA=document.createElement("input");oA.type="text",oA.readOnly=!0,oA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",oA.value=UA,nA.appendChild(oA);const aA=document.createElement("button");aA.type="button",aA.ariaLabel=w("increase"),aA.disabled=!0,aA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50",aA.innerText="+",aA.addEventListener("click",()=>{UA+=1,zA()}),nA.appendChild(aA),iA.appendChild(nA),S.appendChild(iA);const rA=document.createElement("td");rA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",rA.innerText=eg((QA=OA[0])==null?void 0:QA.price),S.appendChild(rA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg(((JA=OA[0])==null?void 0:JA.price)*UA),S.appendChild(KA),b.appendChild(S)}{const S=Fg(cA);if(S){const IA=document.createElement("tr"),DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=S.name,IA.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",iA.innerText=w("package"),IA.appendChild(iA);const nA=document.createElement("td");nA.className="wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center";const eA=document.createElement("div");eA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const oA=document.createElement("button");oA.type="button",oA.ariaLabel=w("decrease"),oA.disabled=LA<=1||(S==null?void 0:S.price)===0,oA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50",oA.innerText="–",oA.addEventListener("click",()=>{LA>1&&(LA-=1,zA())}),eA.appendChild(oA);const aA=document.createElement("input");aA.type="text",aA.readOnly=!0,aA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",aA.value=LA,eA.appendChild(aA);const rA=document.createElement("button");rA.type="button",rA.ariaLabel=w("increase"),rA.disabled=(S==null?void 0:S.price)===0,rA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50",rA.innerText="+",rA.addEventListener("click",()=>{LA+=1,zA()}),eA.appendChild(rA),nA.appendChild(eA),IA.appendChild(nA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg((S==null?void 0:S.price)*(S==null?void 0:S.limit)),IA.appendChild(KA);const Eg=document.createElement("td");Eg.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",Eg.innerText=eg((S==null?void 0:S.price)*(S==null?void 0:S.limit)*LA),IA.appendChild(Eg),b.appendChild(IA)}}{const S=lg(MA);if(S){const IA=document.createElement("tr"),DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=S.name,IA.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",iA.innerText=w("package"),IA.appendChild(iA);const nA=document.createElement("td");nA.className="wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center";const eA=document.createElement("div");eA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const oA=document.createElement("button");oA.type="button",oA.ariaLabel=w("decrease"),oA.disabled=jA<=1,oA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950"+(jA<=1?" wgt:cursor-not-allowed wgt:opacity-50":""),oA.innerText="–",oA.addEventListener("click",()=>{jA>1&&(jA-=1,zA())}),eA.appendChild(oA);const aA=document.createElement("input");aA.type="text",aA.readOnly=!0,aA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",aA.value=jA,eA.appendChild(aA);const rA=document.createElement("button");rA.type="button",rA.ariaLabel=w("increase"),rA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950",rA.innerText="+",rA.addEventListener("click",()=>{jA+=1,zA()}),eA.appendChild(rA),nA.appendChild(eA),IA.appendChild(nA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg(S.limit*S.price),IA.appendChild(KA);const Eg=document.createElement("td");Eg.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",Eg.innerText=eg(S.limit*S.price*jA),IA.appendChild(Eg),b.appendChild(IA)}}{const S=Qg&&OA.length>0?((NA=OA[0])==null?void 0:NA.price)*UA:0,IA=Fg(cA),DA=IA?IA.price*IA.limit*LA:0,iA=lg(MA),nA=iA?iA.price*iA.limit*jA:0,eA=S+DA+nA;e(eA);const oA=document.createElement("tr"),aA=document.createElement("td");aA.colSpan=4,aA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950",aA.innerText=w("total"),oA.appendChild(aA);const rA=document.createElement("td");rA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950",rA.innerText=eg(eA),oA.appendChild(rA),b.appendChild(oA)}u.appendChild(k)}return ZA(),{container:i}})}function Xc({qrSrc:g="",logos:A=[],accountName:C="",accountNumber:B="",bankName:Q="",instructions:I=[],illustrationSrc:E=""}={}){const n=document.createElement("div");n.className="wgt:flex wgt:flex-col wgt:md:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";const t=document.createElement("div"),e=document.createElement("h3");e.className="wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4 wgt:text-center",e.innerText=w("qrPaymentTitle"),t.appendChild(e);const h=document.createElement("div");h.className="wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-4 wgt:border wgt:border-[#E4E7EC]";const c=document.createElement("div");c.className="wgt:flex wgt:justify-center";const o=document.createElement("img");o.src=g,o.alt="QR code",o.className="wgt:w-full wgt:max-w-[200px] wgt:aspect-square wgt:object-contain",c.appendChild(o),h.appendChild(c);const a=document.createElement("div");a.className="wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap",A.forEach(m=>{const v=document.createElement("img");v.src=m,v.alt="Logo",v.className="wgt:w-8 wgt:object-contain",a.appendChild(v)}),h.appendChild(a);const i=document.createElement("div");i.className="wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";const s=document.createElement("h3");s.className="wgt:text-lg wgt:font-bold wgt:text-text-black",s.innerText=C,i.appendChild(s);const r=document.createElement("p");r.className="wgt:text-sm wgt:text-grey-8",r.innerHTML=`${w("accountNumber")}: <span class="wgt:font-medium">${B}</span>`,i.appendChild(r);const P=document.createElement("p");P.className="wgt:text-sm wgt:text-grey-8",P.innerHTML=`${w("beneficiaryBank")}: <span class="wgt:font-medium">${Q}</span>`,i.appendChild(P),h.appendChild(i),t.appendChild(h),n.appendChild(t);const u=document.createElement("div");u.className="wgt:flex wgt:flex-col wgt:justify-between wgt:md:w-1/2";const D=document.createElement("div"),q=document.createElement("h3");q.className="wgt:text-lg wgt:font-semibold wgt:text-gray-800 mb-4",q.innerText=w("paymentInstructionsTitle"),D.appendChild(q);const d=document.createElement("ol");d.className="wgt:space-y-4",I.forEach((m,v)=>{const Y=document.createElement("li");Y.className="wgt:flex wgt:items-start";const G=document.createElement("div");G.className="wgt:flex-shrink-0 wgt:mt-0.5";const x=document.createElement("div");x.className="wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";const R=document.createElement("span");R.className="wgt:text-white wgt:text-sm wgt:font-semibold",R.innerText=String(v+1),x.appendChild(R),G.appendChild(x);const O=document.createElement("p");O.className="wgt:ml-3 wgt:text-text-sub-600",O.innerText=m,Y.appendChild(G),Y.appendChild(O),d.appendChild(Y)}),D.appendChild(d),u.appendChild(D);const J=document.createElement("div");J.className="wgt:h-[300px] wgt:flex wgt:justify-center";const M=document.createElement("img");return M.src=E,M.alt="QR payment illustration",M.className="wgt:h-full wgt:object-contain",J.appendChild(M),u.appendChild(J),n.appendChild(u),{container:n,update(m={}){m.qrSrc!=null&&(o.src=m.qrSrc),m.logos&&(a.innerHTML="",m.logos.forEach(v=>{const Y=document.createElement("img");Y.src=v,Y.alt="Logo",Y.className="wgt:w-8 wgt:object-contain",a.appendChild(Y)})),m.accountName!=null&&(s.innerText=m.accountName),m.accountNumber!=null&&(r.innerHTML=`${w("accountNumber")}: <span class="wgt:font-medium">${m.accountNumber}</span>`),m.bankName!=null&&(P.innerHTML=`${w("beneficiaryBank")}: <span class="wgt:font-medium">${m.bankName}</span>`),m.instructions&&(d.innerHTML="",m.instructions.forEach((v,Y)=>{const G=document.createElement("li");G.className="wgt:flex wgt:items-start";const x=document.createElement("div");x.className="wgt:flex-shrink-0 wgt:mt-0.5";const R=document.createElement("div");R.className="wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";const O=document.createElement("span");O.className="wgt:text-white wgt:text-sm wgt:font-semibold",O.innerText=String(Y+1),R.appendChild(O),x.appendChild(R);const f=document.createElement("p");f.className="wgt:ml-3 wgt:text-text-sub-600",f.innerText=v,G.appendChild(x),G.appendChild(f),d.appendChild(G)})),m.illustrationSrc!=null&&(M.src=m.illustrationSrc)}}}function Fc({qrSrc:g,logos:A=[],accountName:C="",accountNumber:B="",bankName:Q="",instructions:I=[],illustrationSrc:E}={}){const{container:n,update:t}=Xc({qrSrc:g,logos:A,accountName:C,accountNumber:B,bankName:Q,instructions:I,illustrationSrc:E});return{container:n,update:t}}const jB=fA.create({headers:{Accept:"application/json"}});jB.interceptors.request.use(function(g){return g},function(g){return Promise.reject(g)}),cB(jB,{showToast:!0,showPopup:!0});function zE(g){return K(this,null,function*(){return(yield jB.post(m0,{bill_number:g.orderId,amount:g.amount,service_type:"e-invoice"},{baseURL:g.baseURL,headers:{"Content-Type":"application/json",Authorization:`Bearer ${g.token}`}})).data})}var Xg={},KB,GE;function Lc(){return GE||(GE=1,KB=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),KB}var pB={},ag={},OE;function Mg(){if(OE)return ag;OE=1;let g;const A=[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];return ag.getSymbolSize=function(B){if(!B)throw new Error('"version" cannot be null or undefined');if(B<1||B>40)throw new Error('"version" should be in range from 1 to 40');return B*4+17},ag.getSymbolTotalCodewords=function(B){return A[B]},ag.getBCHDigit=function(C){let B=0;for(;C!==0;)B++,C>>>=1;return B},ag.setToSJISFunction=function(B){if(typeof B!="function")throw new Error('"toSJISFunc" is not a valid function.');g=B},ag.isKanjiModeEnabled=function(){return typeof g!="undefined"},ag.toSJIS=function(B){return g(B)},ag}var SB={},XE;function UB(){return XE||(XE=1,function(g){g.L={bit:1},g.M={bit:0},g.Q={bit:3},g.H={bit:2};function A(C){if(typeof C!="string")throw new Error("Param is not a string");switch(C.toLowerCase()){case"l":case"low":return g.L;case"m":case"medium":return g.M;case"q":case"quartile":return g.Q;case"h":case"high":return g.H;default:throw new Error("Unknown EC Level: "+C)}}g.isValid=function(B){return B&&typeof B.bit!="undefined"&&B.bit>=0&&B.bit<4},g.from=function(B,Q){if(g.isValid(B))return B;try{return A(B)}catch(I){return Q}}}(SB)),SB}var ZB,FE;function Nc(){if(FE)return ZB;FE=1;function g(){this.buffer=[],this.length=0}return g.prototype={get:function(A){const C=Math.floor(A/8);return(this.buffer[C]>>>7-A%8&1)===1},put:function(A,C){for(let B=0;B<C;B++)this.putBit((A>>>C-B-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(A){const C=Math.floor(this.length/8);this.buffer.length<=C&&this.buffer.push(0),A&&(this.buffer[C]|=128>>>this.length%8),this.length++}},ZB=g,ZB}var VB,LE;function yc(){if(LE)return VB;LE=1;function g(A){if(!A||A<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=A,this.data=new Uint8Array(A*A),this.reservedBit=new Uint8Array(A*A)}return g.prototype.set=function(A,C,B,Q){const I=A*this.size+C;this.data[I]=B,Q&&(this.reservedBit[I]=!0)},g.prototype.get=function(A,C){return this.data[A*this.size+C]},g.prototype.xor=function(A,C,B){this.data[A*this.size+C]^=B},g.prototype.isReserved=function(A,C){return this.reservedBit[A*this.size+C]},VB=g,VB}var WB={},NE;function bc(){return NE||(NE=1,function(g){const A=Mg().getSymbolSize;g.getRowColCoords=function(B){if(B===1)return[];const Q=Math.floor(B/7)+2,I=A(B),E=I===145?26:Math.ceil((I-13)/(2*Q-2))*2,n=[I-7];for(let t=1;t<Q-1;t++)n[t]=n[t-1]-E;return n.push(6),n.reverse()},g.getPositions=function(B){const Q=[],I=g.getRowColCoords(B),E=I.length;for(let n=0;n<E;n++)for(let t=0;t<E;t++)n===0&&t===0||n===0&&t===E-1||n===E-1&&t===0||Q.push([I[n],I[t]]);return Q}}(WB)),WB}var $B={},yE;function jc(){if(yE)return $B;yE=1;const g=Mg().getSymbolSize,A=7;return $B.getPositions=function(B){const Q=g(B);return[[0,0],[Q-A,0],[0,Q-A]]},$B}var _B={},bE;function Kc(){return bE||(bE=1,function(g){g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const A={N1:3,N2:3,N3:40,N4:10};g.isValid=function(Q){return Q!=null&&Q!==""&&!isNaN(Q)&&Q>=0&&Q<=7},g.from=function(Q){return g.isValid(Q)?parseInt(Q,10):void 0},g.getPenaltyN1=function(Q){const I=Q.size;let E=0,n=0,t=0,e=null,h=null;for(let c=0;c<I;c++){n=t=0,e=h=null;for(let o=0;o<I;o++){let a=Q.get(c,o);a===e?n++:(n>=5&&(E+=A.N1+(n-5)),e=a,n=1),a=Q.get(o,c),a===h?t++:(t>=5&&(E+=A.N1+(t-5)),h=a,t=1)}n>=5&&(E+=A.N1+(n-5)),t>=5&&(E+=A.N1+(t-5))}return E},g.getPenaltyN2=function(Q){const I=Q.size;let E=0;for(let n=0;n<I-1;n++)for(let t=0;t<I-1;t++){const e=Q.get(n,t)+Q.get(n,t+1)+Q.get(n+1,t)+Q.get(n+1,t+1);(e===4||e===0)&&E++}return E*A.N2},g.getPenaltyN3=function(Q){const I=Q.size;let E=0,n=0,t=0;for(let e=0;e<I;e++){n=t=0;for(let h=0;h<I;h++)n=n<<1&2047|Q.get(e,h),h>=10&&(n===1488||n===93)&&E++,t=t<<1&2047|Q.get(h,e),h>=10&&(t===1488||t===93)&&E++}return E*A.N3},g.getPenaltyN4=function(Q){let I=0;const E=Q.data.length;for(let t=0;t<E;t++)I+=Q.data[t];return Math.abs(Math.ceil(I*100/E/5)-10)*A.N4};function C(B,Q,I){switch(B){case g.Patterns.PATTERN000:return(Q+I)%2===0;case g.Patterns.PATTERN001:return Q%2===0;case g.Patterns.PATTERN010:return I%3===0;case g.Patterns.PATTERN011:return(Q+I)%3===0;case g.Patterns.PATTERN100:return(Math.floor(Q/2)+Math.floor(I/3))%2===0;case g.Patterns.PATTERN101:return Q*I%2+Q*I%3===0;case g.Patterns.PATTERN110:return(Q*I%2+Q*I%3)%2===0;case g.Patterns.PATTERN111:return(Q*I%3+(Q+I)%2)%2===0;default:throw new Error("bad maskPattern:"+B)}}g.applyMask=function(Q,I){const E=I.size;for(let n=0;n<E;n++)for(let t=0;t<E;t++)I.isReserved(t,n)||I.xor(t,n,C(Q,t,n))},g.getBestMask=function(Q,I){const E=Object.keys(g.Patterns).length;let n=0,t=1/0;for(let e=0;e<E;e++){I(e),g.applyMask(e,Q);const h=g.getPenaltyN1(Q)+g.getPenaltyN2(Q)+g.getPenaltyN3(Q)+g.getPenaltyN4(Q);g.applyMask(e,Q),h<t&&(t=h,n=e)}return n}}(_B)),_B}var xC={},jE;function KE(){if(jE)return xC;jE=1;const g=UB(),A=[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],C=[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];return xC.getBlocksCount=function(Q,I){switch(I){case g.L:return A[(Q-1)*4+0];case g.M:return A[(Q-1)*4+1];case g.Q:return A[(Q-1)*4+2];case g.H:return A[(Q-1)*4+3];default:return}},xC.getTotalCodewordsCount=function(Q,I){switch(I){case g.L:return C[(Q-1)*4+0];case g.M:return C[(Q-1)*4+1];case g.Q:return C[(Q-1)*4+2];case g.H:return C[(Q-1)*4+3];default:return}},xC}var AQ={},AC={},pE;function pc(){if(pE)return AC;pE=1;const g=new Uint8Array(512),A=new Uint8Array(256);return function(){let B=1;for(let Q=0;Q<255;Q++)g[Q]=B,A[B]=Q,B<<=1,B&256&&(B^=285);for(let Q=255;Q<512;Q++)g[Q]=g[Q-255]}(),AC.log=function(B){if(B<1)throw new Error("log("+B+")");return A[B]},AC.exp=function(B){return g[B]},AC.mul=function(B,Q){return B===0||Q===0?0:g[A[B]+A[Q]]},AC}var SE;function Sc(){return SE||(SE=1,function(g){const A=pc();g.mul=function(B,Q){const I=new Uint8Array(B.length+Q.length-1);for(let E=0;E<B.length;E++)for(let n=0;n<Q.length;n++)I[E+n]^=A.mul(B[E],Q[n]);return I},g.mod=function(B,Q){let I=new Uint8Array(B);for(;I.length-Q.length>=0;){const E=I[0];for(let t=0;t<Q.length;t++)I[t]^=A.mul(Q[t],E);let n=0;for(;n<I.length&&I[n]===0;)n++;I=I.slice(n)}return I},g.generateECPolynomial=function(B){let Q=new Uint8Array([1]);for(let I=0;I<B;I++)Q=g.mul(Q,new Uint8Array([1,A.exp(I)]));return Q}}(AQ)),AQ}var gQ,UE;function Uc(){if(UE)return gQ;UE=1;const g=Sc();function A(C){this.genPoly=void 0,this.degree=C,this.degree&&this.initialize(this.degree)}return A.prototype.initialize=function(B){this.degree=B,this.genPoly=g.generateECPolynomial(this.degree)},A.prototype.encode=function(B){if(!this.genPoly)throw new Error("Encoder not initialized");const Q=new Uint8Array(B.length+this.degree);Q.set(B);const I=g.mod(Q,this.genPoly),E=this.degree-I.length;if(E>0){const n=new Uint8Array(this.degree);return n.set(I,E),n}return I},gQ=A,gQ}var CQ={},BQ={},QQ={},ZE;function VE(){return ZE||(ZE=1,QQ.isValid=function(A){return!isNaN(A)&&A>=1&&A<=40}),QQ}var Bg={},WE;function $E(){if(WE)return Bg;WE=1;const g="[0-9]+",A="[A-Z $%*+\\-./:]+";let C="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";C=C.replace(/u/g,"\\u");const B="(?:(?![A-Z0-9 $%*+\\-./:]|"+C+`)(?:.|[\r
|
|
73
|
+
`,b.appendChild(S),e(0);return}if(Qg&&OA.length>0){const S=document.createElement("tr"),IA=document.createElement("td");IA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium",IA.innerText=`${(_=OA[0])==null?void 0:_.name}`,S.appendChild(IA);const DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=w("copy"),S.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center";const nA=document.createElement("div");nA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const eA=document.createElement("button");eA.type="button",eA.ariaLabel=w("decrease"),eA.disabled=!0,eA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50",eA.innerText="–",eA.addEventListener("click",()=>{UA>1&&(UA-=1,zA())}),nA.appendChild(eA);const oA=document.createElement("input");oA.type="text",oA.readOnly=!0,oA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",oA.value=UA,nA.appendChild(oA);const aA=document.createElement("button");aA.type="button",aA.ariaLabel=w("increase"),aA.disabled=!0,aA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50",aA.innerText="+",aA.addEventListener("click",()=>{UA+=1,zA()}),nA.appendChild(aA),iA.appendChild(nA),S.appendChild(iA);const rA=document.createElement("td");rA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",rA.innerText=eg((QA=OA[0])==null?void 0:QA.price),S.appendChild(rA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg(((JA=OA[0])==null?void 0:JA.price)*UA),S.appendChild(KA),b.appendChild(S)}{const S=Fg(cA);if(S){const IA=document.createElement("tr"),DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=S.name,IA.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",iA.innerText=w("package"),IA.appendChild(iA);const nA=document.createElement("td");nA.className="wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center";const eA=document.createElement("div");eA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const oA=document.createElement("button");oA.type="button",oA.ariaLabel=w("decrease"),oA.disabled=LA<=1||(S==null?void 0:S.price)===0,oA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50",oA.innerText="–",oA.addEventListener("click",()=>{LA>1&&(LA-=1,zA())}),eA.appendChild(oA);const aA=document.createElement("input");aA.type="text",aA.readOnly=!0,aA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",aA.value=LA,eA.appendChild(aA);const rA=document.createElement("button");rA.type="button",rA.ariaLabel=w("increase"),rA.disabled=(S==null?void 0:S.price)===0,rA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50",rA.innerText="+",rA.addEventListener("click",()=>{LA+=1,zA()}),eA.appendChild(rA),nA.appendChild(eA),IA.appendChild(nA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg((S==null?void 0:S.price)*(S==null?void 0:S.limit)),IA.appendChild(KA);const Eg=document.createElement("td");Eg.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",Eg.innerText=eg((S==null?void 0:S.price)*(S==null?void 0:S.limit)*LA),IA.appendChild(Eg),b.appendChild(IA)}}{const S=lg(MA);if(S){const IA=document.createElement("tr"),DA=document.createElement("td");DA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",DA.innerText=S.name,IA.appendChild(DA);const iA=document.createElement("td");iA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",iA.innerText=w("package"),IA.appendChild(iA);const nA=document.createElement("td");nA.className="wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center";const eA=document.createElement("div");eA.className="wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:p-1.5 wgt:rounded-lg";const oA=document.createElement("button");oA.type="button",oA.ariaLabel=w("decrease"),oA.disabled=jA<=1,oA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950"+(jA<=1?" wgt:cursor-not-allowed wgt:opacity-50":""),oA.innerText="–",oA.addEventListener("click",()=>{jA>1&&(jA-=1,zA())}),eA.appendChild(oA);const aA=document.createElement("input");aA.type="text",aA.readOnly=!0,aA.className="wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none",aA.value=jA,eA.appendChild(aA);const rA=document.createElement("button");rA.type="button",rA.ariaLabel=w("increase"),rA.className="wgt:flex wgt:h-6 wgt:w-6 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950",rA.innerText="+",rA.addEventListener("click",()=>{jA+=1,zA()}),eA.appendChild(rA),nA.appendChild(eA),IA.appendChild(nA);const KA=document.createElement("td");KA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",KA.innerText=eg(S.limit*S.price),IA.appendChild(KA);const Eg=document.createElement("td");Eg.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium",Eg.innerText=eg(S.limit*S.price*jA),IA.appendChild(Eg),b.appendChild(IA)}}{const S=Qg&&OA.length>0?((NA=OA[0])==null?void 0:NA.price)*UA:0,IA=Fg(cA),DA=IA?IA.price*IA.limit*LA:0,iA=lg(MA),nA=iA?iA.price*iA.limit*jA:0,eA=S+DA+nA;e(eA);const oA=document.createElement("tr"),aA=document.createElement("td");aA.colSpan=4,aA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950",aA.innerText=w("total"),oA.appendChild(aA);const rA=document.createElement("td");rA.className="wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950",rA.innerText=eg(eA),oA.appendChild(rA),b.appendChild(oA)}u.appendChild(k),u.appendChild(W)}return ZA(),{container:i}})}function Xc({qrSrc:g="",logos:A=[],accountName:C="",accountNumber:B="",bankName:Q="",instructions:I=[],illustrationSrc:E=""}={}){const n=document.createElement("div");n.className="wgt:flex wgt:flex-col wgt:md:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";const t=document.createElement("div"),e=document.createElement("h3");e.className="wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4 wgt:text-center",e.innerText=w("qrPaymentTitle"),t.appendChild(e);const h=document.createElement("div");h.className="wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-4 wgt:border wgt:border-[#E4E7EC]";const c=document.createElement("div");c.className="wgt:flex wgt:justify-center";const o=document.createElement("img");o.src=g,o.alt="QR code",o.className="wgt:w-full wgt:max-w-[200px] wgt:aspect-square wgt:object-contain",c.appendChild(o),h.appendChild(c);const a=document.createElement("div");a.className="wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap",A.forEach(m=>{const v=document.createElement("img");v.src=m,v.alt="Logo",v.className="wgt:w-8 wgt:object-contain",a.appendChild(v)}),h.appendChild(a);const i=document.createElement("div");i.className="wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";const s=document.createElement("h3");s.className="wgt:text-lg wgt:font-bold wgt:text-text-black",s.innerText=C,i.appendChild(s);const r=document.createElement("p");r.className="wgt:text-sm wgt:text-grey-8",r.innerHTML=`${w("accountNumber")}: <span class="wgt:font-medium">${B}</span>`,i.appendChild(r);const P=document.createElement("p");P.className="wgt:text-sm wgt:text-grey-8",P.innerHTML=`${w("beneficiaryBank")}: <span class="wgt:font-medium">${Q}</span>`,i.appendChild(P),h.appendChild(i),t.appendChild(h),n.appendChild(t);const u=document.createElement("div");u.className="wgt:flex wgt:flex-col wgt:justify-between wgt:md:w-1/2";const D=document.createElement("div"),q=document.createElement("h3");q.className="wgt:text-lg wgt:font-semibold wgt:text-gray-800 mb-4",q.innerText=w("paymentInstructionsTitle"),D.appendChild(q);const d=document.createElement("ol");d.className="wgt:space-y-4",I.forEach((m,v)=>{const Y=document.createElement("li");Y.className="wgt:flex wgt:items-start";const G=document.createElement("div");G.className="wgt:flex-shrink-0 wgt:mt-0.5";const x=document.createElement("div");x.className="wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";const R=document.createElement("span");R.className="wgt:text-white wgt:text-sm wgt:font-semibold",R.innerText=String(v+1),x.appendChild(R),G.appendChild(x);const O=document.createElement("p");O.className="wgt:ml-3 wgt:text-text-sub-600",O.innerText=m,Y.appendChild(G),Y.appendChild(O),d.appendChild(Y)}),D.appendChild(d),u.appendChild(D);const J=document.createElement("div");J.className="wgt:h-[300px] wgt:flex wgt:justify-center";const M=document.createElement("img");return M.src=E,M.alt="QR payment illustration",M.className="wgt:h-full wgt:object-contain",J.appendChild(M),u.appendChild(J),n.appendChild(u),{container:n,update(m={}){m.qrSrc!=null&&(o.src=m.qrSrc),m.logos&&(a.innerHTML="",m.logos.forEach(v=>{const Y=document.createElement("img");Y.src=v,Y.alt="Logo",Y.className="wgt:w-8 wgt:object-contain",a.appendChild(Y)})),m.accountName!=null&&(s.innerText=m.accountName),m.accountNumber!=null&&(r.innerHTML=`${w("accountNumber")}: <span class="wgt:font-medium">${m.accountNumber}</span>`),m.bankName!=null&&(P.innerHTML=`${w("beneficiaryBank")}: <span class="wgt:font-medium">${m.bankName}</span>`),m.instructions&&(d.innerHTML="",m.instructions.forEach((v,Y)=>{const G=document.createElement("li");G.className="wgt:flex wgt:items-start";const x=document.createElement("div");x.className="wgt:flex-shrink-0 wgt:mt-0.5";const R=document.createElement("div");R.className="wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";const O=document.createElement("span");O.className="wgt:text-white wgt:text-sm wgt:font-semibold",O.innerText=String(Y+1),R.appendChild(O),x.appendChild(R);const f=document.createElement("p");f.className="wgt:ml-3 wgt:text-text-sub-600",f.innerText=v,G.appendChild(x),G.appendChild(f),d.appendChild(G)})),m.illustrationSrc!=null&&(M.src=m.illustrationSrc)}}}function Fc({qrSrc:g,logos:A=[],accountName:C="",accountNumber:B="",bankName:Q="",instructions:I=[],illustrationSrc:E}={}){const{container:n,update:t}=Xc({qrSrc:g,logos:A,accountName:C,accountNumber:B,bankName:Q,instructions:I,illustrationSrc:E});return{container:n,update:t}}const jB=fA.create({headers:{Accept:"application/json"}});jB.interceptors.request.use(function(g){return g},function(g){return Promise.reject(g)}),cB(jB,{showToast:!0,showPopup:!0});function zE(g){return K(this,null,function*(){return(yield jB.post(m0,{bill_number:g.orderId,amount:g.amount,service_type:"e-invoice"},{baseURL:g.baseURL,headers:{"Content-Type":"application/json",Authorization:`Bearer ${g.token}`}})).data})}var Xg={},KB,GE;function Lc(){return GE||(GE=1,KB=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),KB}var pB={},ag={},OE;function Mg(){if(OE)return ag;OE=1;let g;const A=[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];return ag.getSymbolSize=function(B){if(!B)throw new Error('"version" cannot be null or undefined');if(B<1||B>40)throw new Error('"version" should be in range from 1 to 40');return B*4+17},ag.getSymbolTotalCodewords=function(B){return A[B]},ag.getBCHDigit=function(C){let B=0;for(;C!==0;)B++,C>>>=1;return B},ag.setToSJISFunction=function(B){if(typeof B!="function")throw new Error('"toSJISFunc" is not a valid function.');g=B},ag.isKanjiModeEnabled=function(){return typeof g!="undefined"},ag.toSJIS=function(B){return g(B)},ag}var SB={},XE;function UB(){return XE||(XE=1,function(g){g.L={bit:1},g.M={bit:0},g.Q={bit:3},g.H={bit:2};function A(C){if(typeof C!="string")throw new Error("Param is not a string");switch(C.toLowerCase()){case"l":case"low":return g.L;case"m":case"medium":return g.M;case"q":case"quartile":return g.Q;case"h":case"high":return g.H;default:throw new Error("Unknown EC Level: "+C)}}g.isValid=function(B){return B&&typeof B.bit!="undefined"&&B.bit>=0&&B.bit<4},g.from=function(B,Q){if(g.isValid(B))return B;try{return A(B)}catch(I){return Q}}}(SB)),SB}var ZB,FE;function Nc(){if(FE)return ZB;FE=1;function g(){this.buffer=[],this.length=0}return g.prototype={get:function(A){const C=Math.floor(A/8);return(this.buffer[C]>>>7-A%8&1)===1},put:function(A,C){for(let B=0;B<C;B++)this.putBit((A>>>C-B-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(A){const C=Math.floor(this.length/8);this.buffer.length<=C&&this.buffer.push(0),A&&(this.buffer[C]|=128>>>this.length%8),this.length++}},ZB=g,ZB}var VB,LE;function yc(){if(LE)return VB;LE=1;function g(A){if(!A||A<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=A,this.data=new Uint8Array(A*A),this.reservedBit=new Uint8Array(A*A)}return g.prototype.set=function(A,C,B,Q){const I=A*this.size+C;this.data[I]=B,Q&&(this.reservedBit[I]=!0)},g.prototype.get=function(A,C){return this.data[A*this.size+C]},g.prototype.xor=function(A,C,B){this.data[A*this.size+C]^=B},g.prototype.isReserved=function(A,C){return this.reservedBit[A*this.size+C]},VB=g,VB}var WB={},NE;function bc(){return NE||(NE=1,function(g){const A=Mg().getSymbolSize;g.getRowColCoords=function(B){if(B===1)return[];const Q=Math.floor(B/7)+2,I=A(B),E=I===145?26:Math.ceil((I-13)/(2*Q-2))*2,n=[I-7];for(let t=1;t<Q-1;t++)n[t]=n[t-1]-E;return n.push(6),n.reverse()},g.getPositions=function(B){const Q=[],I=g.getRowColCoords(B),E=I.length;for(let n=0;n<E;n++)for(let t=0;t<E;t++)n===0&&t===0||n===0&&t===E-1||n===E-1&&t===0||Q.push([I[n],I[t]]);return Q}}(WB)),WB}var $B={},yE;function jc(){if(yE)return $B;yE=1;const g=Mg().getSymbolSize,A=7;return $B.getPositions=function(B){const Q=g(B);return[[0,0],[Q-A,0],[0,Q-A]]},$B}var _B={},bE;function Kc(){return bE||(bE=1,function(g){g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const A={N1:3,N2:3,N3:40,N4:10};g.isValid=function(Q){return Q!=null&&Q!==""&&!isNaN(Q)&&Q>=0&&Q<=7},g.from=function(Q){return g.isValid(Q)?parseInt(Q,10):void 0},g.getPenaltyN1=function(Q){const I=Q.size;let E=0,n=0,t=0,e=null,h=null;for(let c=0;c<I;c++){n=t=0,e=h=null;for(let o=0;o<I;o++){let a=Q.get(c,o);a===e?n++:(n>=5&&(E+=A.N1+(n-5)),e=a,n=1),a=Q.get(o,c),a===h?t++:(t>=5&&(E+=A.N1+(t-5)),h=a,t=1)}n>=5&&(E+=A.N1+(n-5)),t>=5&&(E+=A.N1+(t-5))}return E},g.getPenaltyN2=function(Q){const I=Q.size;let E=0;for(let n=0;n<I-1;n++)for(let t=0;t<I-1;t++){const e=Q.get(n,t)+Q.get(n,t+1)+Q.get(n+1,t)+Q.get(n+1,t+1);(e===4||e===0)&&E++}return E*A.N2},g.getPenaltyN3=function(Q){const I=Q.size;let E=0,n=0,t=0;for(let e=0;e<I;e++){n=t=0;for(let h=0;h<I;h++)n=n<<1&2047|Q.get(e,h),h>=10&&(n===1488||n===93)&&E++,t=t<<1&2047|Q.get(h,e),h>=10&&(t===1488||t===93)&&E++}return E*A.N3},g.getPenaltyN4=function(Q){let I=0;const E=Q.data.length;for(let t=0;t<E;t++)I+=Q.data[t];return Math.abs(Math.ceil(I*100/E/5)-10)*A.N4};function C(B,Q,I){switch(B){case g.Patterns.PATTERN000:return(Q+I)%2===0;case g.Patterns.PATTERN001:return Q%2===0;case g.Patterns.PATTERN010:return I%3===0;case g.Patterns.PATTERN011:return(Q+I)%3===0;case g.Patterns.PATTERN100:return(Math.floor(Q/2)+Math.floor(I/3))%2===0;case g.Patterns.PATTERN101:return Q*I%2+Q*I%3===0;case g.Patterns.PATTERN110:return(Q*I%2+Q*I%3)%2===0;case g.Patterns.PATTERN111:return(Q*I%3+(Q+I)%2)%2===0;default:throw new Error("bad maskPattern:"+B)}}g.applyMask=function(Q,I){const E=I.size;for(let n=0;n<E;n++)for(let t=0;t<E;t++)I.isReserved(t,n)||I.xor(t,n,C(Q,t,n))},g.getBestMask=function(Q,I){const E=Object.keys(g.Patterns).length;let n=0,t=1/0;for(let e=0;e<E;e++){I(e),g.applyMask(e,Q);const h=g.getPenaltyN1(Q)+g.getPenaltyN2(Q)+g.getPenaltyN3(Q)+g.getPenaltyN4(Q);g.applyMask(e,Q),h<t&&(t=h,n=e)}return n}}(_B)),_B}var xC={},jE;function KE(){if(jE)return xC;jE=1;const g=UB(),A=[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],C=[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];return xC.getBlocksCount=function(Q,I){switch(I){case g.L:return A[(Q-1)*4+0];case g.M:return A[(Q-1)*4+1];case g.Q:return A[(Q-1)*4+2];case g.H:return A[(Q-1)*4+3];default:return}},xC.getTotalCodewordsCount=function(Q,I){switch(I){case g.L:return C[(Q-1)*4+0];case g.M:return C[(Q-1)*4+1];case g.Q:return C[(Q-1)*4+2];case g.H:return C[(Q-1)*4+3];default:return}},xC}var AQ={},AC={},pE;function pc(){if(pE)return AC;pE=1;const g=new Uint8Array(512),A=new Uint8Array(256);return function(){let B=1;for(let Q=0;Q<255;Q++)g[Q]=B,A[B]=Q,B<<=1,B&256&&(B^=285);for(let Q=255;Q<512;Q++)g[Q]=g[Q-255]}(),AC.log=function(B){if(B<1)throw new Error("log("+B+")");return A[B]},AC.exp=function(B){return g[B]},AC.mul=function(B,Q){return B===0||Q===0?0:g[A[B]+A[Q]]},AC}var SE;function Sc(){return SE||(SE=1,function(g){const A=pc();g.mul=function(B,Q){const I=new Uint8Array(B.length+Q.length-1);for(let E=0;E<B.length;E++)for(let n=0;n<Q.length;n++)I[E+n]^=A.mul(B[E],Q[n]);return I},g.mod=function(B,Q){let I=new Uint8Array(B);for(;I.length-Q.length>=0;){const E=I[0];for(let t=0;t<Q.length;t++)I[t]^=A.mul(Q[t],E);let n=0;for(;n<I.length&&I[n]===0;)n++;I=I.slice(n)}return I},g.generateECPolynomial=function(B){let Q=new Uint8Array([1]);for(let I=0;I<B;I++)Q=g.mul(Q,new Uint8Array([1,A.exp(I)]));return Q}}(AQ)),AQ}var gQ,UE;function Uc(){if(UE)return gQ;UE=1;const g=Sc();function A(C){this.genPoly=void 0,this.degree=C,this.degree&&this.initialize(this.degree)}return A.prototype.initialize=function(B){this.degree=B,this.genPoly=g.generateECPolynomial(this.degree)},A.prototype.encode=function(B){if(!this.genPoly)throw new Error("Encoder not initialized");const Q=new Uint8Array(B.length+this.degree);Q.set(B);const I=g.mod(Q,this.genPoly),E=this.degree-I.length;if(E>0){const n=new Uint8Array(this.degree);return n.set(I,E),n}return I},gQ=A,gQ}var CQ={},BQ={},QQ={},ZE;function VE(){return ZE||(ZE=1,QQ.isValid=function(A){return!isNaN(A)&&A>=1&&A<=40}),QQ}var Bg={},WE;function $E(){if(WE)return Bg;WE=1;const g="[0-9]+",A="[A-Z $%*+\\-./:]+";let C="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";C=C.replace(/u/g,"\\u");const B="(?:(?![A-Z0-9 $%*+\\-./:]|"+C+`)(?:.|[\r
|
|
74
74
|
]))+`;Bg.KANJI=new RegExp(C,"g"),Bg.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Bg.BYTE=new RegExp(B,"g"),Bg.NUMERIC=new RegExp(g,"g"),Bg.ALPHANUMERIC=new RegExp(A,"g");const Q=new RegExp("^"+C+"$"),I=new RegExp("^"+g+"$"),E=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Bg.testKanji=function(t){return Q.test(t)},Bg.testNumeric=function(t){return I.test(t)},Bg.testAlphanumeric=function(t){return E.test(t)},Bg}var _E;function dg(){return _E||(_E=1,function(g){const A=VE(),C=$E();g.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},g.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},g.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},g.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},g.MIXED={bit:-1},g.getCharCountIndicator=function(I,E){if(!I.ccBits)throw new Error("Invalid mode: "+I);if(!A.isValid(E))throw new Error("Invalid version: "+E);return E>=1&&E<10?I.ccBits[0]:E<27?I.ccBits[1]:I.ccBits[2]},g.getBestModeForData=function(I){return C.testNumeric(I)?g.NUMERIC:C.testAlphanumeric(I)?g.ALPHANUMERIC:C.testKanji(I)?g.KANJI:g.BYTE},g.toString=function(I){if(I&&I.id)return I.id;throw new Error("Invalid mode")},g.isValid=function(I){return I&&I.bit&&I.ccBits};function B(Q){if(typeof Q!="string")throw new Error("Param is not a string");switch(Q.toLowerCase()){case"numeric":return g.NUMERIC;case"alphanumeric":return g.ALPHANUMERIC;case"kanji":return g.KANJI;case"byte":return g.BYTE;default:throw new Error("Unknown mode: "+Q)}}g.from=function(I,E){if(g.isValid(I))return I;try{return B(I)}catch(n){return E}}}(BQ)),BQ}var An;function Zc(){return An||(An=1,function(g){const A=Mg(),C=KE(),B=UB(),Q=dg(),I=VE(),E=7973,n=A.getBCHDigit(E);function t(o,a,i){for(let s=1;s<=40;s++)if(a<=g.getCapacity(s,i,o))return s}function e(o,a){return Q.getCharCountIndicator(o,a)+4}function h(o,a){let i=0;return o.forEach(function(s){const r=e(s.mode,a);i+=r+s.getBitsLength()}),i}function c(o,a){for(let i=1;i<=40;i++)if(h(o,i)<=g.getCapacity(i,a,Q.MIXED))return i}g.from=function(a,i){return I.isValid(a)?parseInt(a,10):i},g.getCapacity=function(a,i,s){if(!I.isValid(a))throw new Error("Invalid QR Code version");typeof s=="undefined"&&(s=Q.BYTE);const r=A.getSymbolTotalCodewords(a),P=C.getTotalCodewordsCount(a,i),u=(r-P)*8;if(s===Q.MIXED)return u;const D=u-e(s,a);switch(s){case Q.NUMERIC:return Math.floor(D/10*3);case Q.ALPHANUMERIC:return Math.floor(D/11*2);case Q.KANJI:return Math.floor(D/13);case Q.BYTE:default:return Math.floor(D/8)}},g.getBestVersionForData=function(a,i){let s;const r=B.from(i,B.M);if(Array.isArray(a)){if(a.length>1)return c(a,r);if(a.length===0)return 1;s=a[0]}else s=a;return t(s.mode,s.getLength(),r)},g.getEncodedBits=function(a){if(!I.isValid(a)||a<7)throw new Error("Invalid QR Code version");let i=a<<12;for(;A.getBCHDigit(i)-n>=0;)i^=E<<A.getBCHDigit(i)-n;return a<<12|i}}(CQ)),CQ}var IQ={},gn;function Vc(){if(gn)return IQ;gn=1;const g=Mg(),A=1335,C=21522,B=g.getBCHDigit(A);return IQ.getEncodedBits=function(I,E){const n=I.bit<<3|E;let t=n<<10;for(;g.getBCHDigit(t)-B>=0;)t^=A<<g.getBCHDigit(t)-B;return(n<<10|t)^C},IQ}var EQ={},nQ,Cn;function Wc(){if(Cn)return nQ;Cn=1;const g=dg();function A(C){this.mode=g.NUMERIC,this.data=C.toString()}return A.getBitsLength=function(B){return 10*Math.floor(B/3)+(B%3?B%3*3+1:0)},A.prototype.getLength=function(){return this.data.length},A.prototype.getBitsLength=function(){return A.getBitsLength(this.data.length)},A.prototype.write=function(B){let Q,I,E;for(Q=0;Q+3<=this.data.length;Q+=3)I=this.data.substr(Q,3),E=parseInt(I,10),B.put(E,10);const n=this.data.length-Q;n>0&&(I=this.data.substr(Q),E=parseInt(I,10),B.put(E,n*3+1))},nQ=A,nQ}var tQ,Bn;function $c(){if(Bn)return tQ;Bn=1;const g=dg(),A=["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 C(B){this.mode=g.ALPHANUMERIC,this.data=B}return C.getBitsLength=function(Q){return 11*Math.floor(Q/2)+6*(Q%2)},C.prototype.getLength=function(){return this.data.length},C.prototype.getBitsLength=function(){return C.getBitsLength(this.data.length)},C.prototype.write=function(Q){let I;for(I=0;I+2<=this.data.length;I+=2){let E=A.indexOf(this.data[I])*45;E+=A.indexOf(this.data[I+1]),Q.put(E,11)}this.data.length%2&&Q.put(A.indexOf(this.data[I]),6)},tQ=C,tQ}var eQ,Qn;function _c(){if(Qn)return eQ;Qn=1;const g=dg();function A(C){this.mode=g.BYTE,typeof C=="string"?this.data=new TextEncoder().encode(C):this.data=new Uint8Array(C)}return A.getBitsLength=function(B){return B*8},A.prototype.getLength=function(){return this.data.length},A.prototype.getBitsLength=function(){return A.getBitsLength(this.data.length)},A.prototype.write=function(C){for(let B=0,Q=this.data.length;B<Q;B++)C.put(this.data[B],8)},eQ=A,eQ}var hQ,In;function Ao(){if(In)return hQ;In=1;const g=dg(),A=Mg();function C(B){this.mode=g.KANJI,this.data=B}return C.getBitsLength=function(Q){return Q*13},C.prototype.getLength=function(){return this.data.length},C.prototype.getBitsLength=function(){return C.getBitsLength(this.data.length)},C.prototype.write=function(B){let Q;for(Q=0;Q<this.data.length;Q++){let I=A.toSJIS(this.data[Q]);if(I>=33088&&I<=40956)I-=33088;else if(I>=57408&&I<=60351)I-=49472;else throw new Error("Invalid SJIS character: "+this.data[Q]+`
|
|
75
75
|
Make sure your charset is UTF-8`);I=(I>>>8&255)*192+(I&255),B.put(I,13)}},hQ=C,hQ}var cQ={exports:{}},En;function go(){return En||(En=1,function(g){var A={single_source_shortest_paths:function(C,B,Q){var I={},E={};E[B]=0;var n=A.PriorityQueue.make();n.push(B,0);for(var t,e,h,c,o,a,i,s,r;!n.empty();){t=n.pop(),e=t.value,c=t.cost,o=C[e]||{};for(h in o)o.hasOwnProperty(h)&&(a=o[h],i=c+a,s=E[h],r=typeof E[h]=="undefined",(r||s>i)&&(E[h]=i,n.push(h,i),I[h]=e))}if(typeof Q!="undefined"&&typeof E[Q]=="undefined"){var P=["Could not find a path from ",B," to ",Q,"."].join("");throw new Error(P)}return I},extract_shortest_path_from_predecessor_list:function(C,B){for(var Q=[],I=B;I;)Q.push(I),C[I],I=C[I];return Q.reverse(),Q},find_path:function(C,B,Q){var I=A.single_source_shortest_paths(C,B,Q);return A.extract_shortest_path_from_predecessor_list(I,Q)},PriorityQueue:{make:function(C){var B=A.PriorityQueue,Q={},I;C=C||{};for(I in B)B.hasOwnProperty(I)&&(Q[I]=B[I]);return Q.queue=[],Q.sorter=C.sorter||B.default_sorter,Q},default_sorter:function(C,B){return C.cost-B.cost},push:function(C,B){var Q={value:C,cost:B};this.queue.push(Q),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};g.exports=A}(cQ)),cQ.exports}var nn;function Co(){return nn||(nn=1,function(g){const A=dg(),C=Wc(),B=$c(),Q=_c(),I=Ao(),E=$E(),n=Mg(),t=go();function e(P){return unescape(encodeURIComponent(P)).length}function h(P,u,D){const q=[];let d;for(;(d=P.exec(D))!==null;)q.push({data:d[0],index:d.index,mode:u,length:d[0].length});return q}function c(P){const u=h(E.NUMERIC,A.NUMERIC,P),D=h(E.ALPHANUMERIC,A.ALPHANUMERIC,P);let q,d;return n.isKanjiModeEnabled()?(q=h(E.BYTE,A.BYTE,P),d=h(E.KANJI,A.KANJI,P)):(q=h(E.BYTE_KANJI,A.BYTE,P),d=[]),u.concat(D,q,d).sort(function(M,m){return M.index-m.index}).map(function(M){return{data:M.data,mode:M.mode,length:M.length}})}function o(P,u){switch(u){case A.NUMERIC:return C.getBitsLength(P);case A.ALPHANUMERIC:return B.getBitsLength(P);case A.KANJI:return I.getBitsLength(P);case A.BYTE:return Q.getBitsLength(P)}}function a(P){return P.reduce(function(u,D){const q=u.length-1>=0?u[u.length-1]:null;return q&&q.mode===D.mode?(u[u.length-1].data+=D.data,u):(u.push(D),u)},[])}function i(P){const u=[];for(let D=0;D<P.length;D++){const q=P[D];switch(q.mode){case A.NUMERIC:u.push([q,{data:q.data,mode:A.ALPHANUMERIC,length:q.length},{data:q.data,mode:A.BYTE,length:q.length}]);break;case A.ALPHANUMERIC:u.push([q,{data:q.data,mode:A.BYTE,length:q.length}]);break;case A.KANJI:u.push([q,{data:q.data,mode:A.BYTE,length:e(q.data)}]);break;case A.BYTE:u.push([{data:q.data,mode:A.BYTE,length:e(q.data)}])}}return u}function s(P,u){const D={},q={start:{}};let d=["start"];for(let J=0;J<P.length;J++){const M=P[J],m=[];for(let v=0;v<M.length;v++){const Y=M[v],G=""+J+v;m.push(G),D[G]={node:Y,lastCount:0},q[G]={};for(let x=0;x<d.length;x++){const R=d[x];D[R]&&D[R].node.mode===Y.mode?(q[R][G]=o(D[R].lastCount+Y.length,Y.mode)-o(D[R].lastCount,Y.mode),D[R].lastCount+=Y.length):(D[R]&&(D[R].lastCount=Y.length),q[R][G]=o(Y.length,Y.mode)+4+A.getCharCountIndicator(Y.mode,u))}}d=m}for(let J=0;J<d.length;J++)q[d[J]].end=0;return{map:q,table:D}}function r(P,u){let D;const q=A.getBestModeForData(P);if(D=A.from(u,q),D!==A.BYTE&&D.bit<q.bit)throw new Error('"'+P+'" cannot be encoded with mode '+A.toString(D)+`.
|
|
76
76
|
Suggested mode is: `+A.toString(q));switch(D===A.KANJI&&!n.isKanjiModeEnabled()&&(D=A.BYTE),D){case A.NUMERIC:return new C(P);case A.ALPHANUMERIC:return new B(P);case A.KANJI:return new I(P);case A.BYTE:return new Q(P)}}g.fromArray=function(u){return u.reduce(function(D,q){return typeof q=="string"?D.push(r(q,null)):q.data&&D.push(r(q.data,q.mode)),D},[])},g.fromString=function(u,D){const q=c(u,n.isKanjiModeEnabled()),d=i(q),J=s(d,D),M=t.find_path(J.map,"start","end"),m=[];for(let v=1;v<M.length-1;v++)m.push(J.table[M[v]].node);return g.fromArray(a(m))},g.rawSplit=function(u){return g.fromArray(c(u,n.isKanjiModeEnabled()))}}(EQ)),EQ}var tn;function Bo(){if(tn)return pB;tn=1;const g=Mg(),A=UB(),C=Nc(),B=yc(),Q=bc(),I=jc(),E=Kc(),n=KE(),t=Uc(),e=Zc(),h=Vc(),c=dg(),o=Co();function a(J,M){const m=J.size,v=I.getPositions(M);for(let Y=0;Y<v.length;Y++){const G=v[Y][0],x=v[Y][1];for(let R=-1;R<=7;R++)if(!(G+R<=-1||m<=G+R))for(let O=-1;O<=7;O++)x+O<=-1||m<=x+O||(R>=0&&R<=6&&(O===0||O===6)||O>=0&&O<=6&&(R===0||R===6)||R>=2&&R<=4&&O>=2&&O<=4?J.set(G+R,x+O,!0,!0):J.set(G+R,x+O,!1,!0))}}function i(J){const M=J.size;for(let m=8;m<M-8;m++){const v=m%2===0;J.set(m,6,v,!0),J.set(6,m,v,!0)}}function s(J,M){const m=Q.getPositions(M);for(let v=0;v<m.length;v++){const Y=m[v][0],G=m[v][1];for(let x=-2;x<=2;x++)for(let R=-2;R<=2;R++)x===-2||x===2||R===-2||R===2||x===0&&R===0?J.set(Y+x,G+R,!0,!0):J.set(Y+x,G+R,!1,!0)}}function r(J,M){const m=J.size,v=e.getEncodedBits(M);let Y,G,x;for(let R=0;R<18;R++)Y=Math.floor(R/3),G=R%3+m-8-3,x=(v>>R&1)===1,J.set(Y,G,x,!0),J.set(G,Y,x,!0)}function P(J,M,m){const v=J.size,Y=h.getEncodedBits(M,m);let G,x;for(G=0;G<15;G++)x=(Y>>G&1)===1,G<6?J.set(G,8,x,!0):G<8?J.set(G+1,8,x,!0):J.set(v-15+G,8,x,!0),G<8?J.set(8,v-G-1,x,!0):G<9?J.set(8,15-G-1+1,x,!0):J.set(8,15-G-1,x,!0);J.set(v-8,8,1,!0)}function u(J,M){const m=J.size;let v=-1,Y=m-1,G=7,x=0;for(let R=m-1;R>0;R-=2)for(R===6&&R--;;){for(let O=0;O<2;O++)if(!J.isReserved(Y,R-O)){let f=!1;x<M.length&&(f=(M[x]>>>G&1)===1),J.set(Y,R-O,f),G--,G===-1&&(x++,G=7)}if(Y+=v,Y<0||m<=Y){Y-=v,v=-v;break}}}function D(J,M,m){const v=new C;m.forEach(function(O){v.put(O.mode.bit,4),v.put(O.getLength(),c.getCharCountIndicator(O.mode,J)),O.write(v)});const Y=g.getSymbolTotalCodewords(J),G=n.getTotalCodewordsCount(J,M),x=(Y-G)*8;for(v.getLengthInBits()+4<=x&&v.put(0,4);v.getLengthInBits()%8!==0;)v.putBit(0);const R=(x-v.getLengthInBits())/8;for(let O=0;O<R;O++)v.put(O%2?17:236,8);return q(v,J,M)}function q(J,M,m){const v=g.getSymbolTotalCodewords(M),Y=n.getTotalCodewordsCount(M,m),G=v-Y,x=n.getBlocksCount(M,m),R=v%x,O=x-R,f=Math.floor(v/x),k=Math.floor(G/x),j=k+1,p=f-k,H=new t(p);let l=0;const z=new Array(x),b=new Array(x);let F=0;const W=new Uint8Array(J.buffer);for(let sA=0;sA<x;sA++){const xA=sA<O?k:j;z[sA]=W.slice(l,l+xA),b[sA]=H.encode(z[sA]),l+=xA,F=Math.max(F,xA)}const EA=new Uint8Array(v);let hA=0,CA,BA;for(CA=0;CA<F;CA++)for(BA=0;BA<x;BA++)CA<z[BA].length&&(EA[hA++]=z[BA][CA]);for(CA=0;CA<p;CA++)for(BA=0;BA<x;BA++)EA[hA++]=b[BA][CA];return EA}function d(J,M,m,v){let Y;if(Array.isArray(J))Y=o.fromArray(J);else if(typeof J=="string"){let f=M;if(!f){const k=o.rawSplit(J);f=e.getBestVersionForData(k,m)}Y=o.fromString(J,f||40)}else throw new Error("Invalid data");const G=e.getBestVersionForData(Y,m);if(!G)throw new Error("The amount of data is too big to be stored in a QR Code");if(!M)M=G;else if(M<G)throw new Error(`
|
|
@@ -67,7 +67,7 @@ var L = (g, A, B) => new Promise((C, Q) => {
|
|
|
67
67
|
throw I;
|
|
68
68
|
}, "return" in A && C("return"), Q;
|
|
69
69
|
}, qQ = (g, A, B) => (A = g[Dg("asyncIterator")]) ? A.call(g) : (g = g[Dg("iterator")](), A = {}, B = (C, Q) => (Q = g[C]) && (A[C] = (I) => new Promise((E, n, t) => (I = Q.call(g, I), t = I.done, Promise.resolve(I.value).then((c) => E({ value: c, done: t }), n)))), B("next"), B("return"), A);
|
|
70
|
-
import { t as a, g as _g, r as yI, u as jI } from "./index-
|
|
70
|
+
import { t as a, g as _g, r as yI, u as jI } from "./index-Bzjv3Fwi.js";
|
|
71
71
|
import { g as KI } from "./_commonjsHelpers-bAxELxBV.js";
|
|
72
72
|
function fQ({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
73
73
|
const B = document.createElement("div");
|
|
@@ -6023,7 +6023,7 @@ function lh(o) {
|
|
|
6023
6023
|
</td>
|
|
6024
6024
|
`, F.appendChild(O);
|
|
6025
6025
|
const U = document.createElement("div");
|
|
6026
|
-
U.className = "wgt:flex wgt:items-center wgt:gap-4"
|
|
6026
|
+
U.className = "wgt:flex wgt:items-center wgt:gap-4";
|
|
6027
6027
|
const gA = document.createElement("span");
|
|
6028
6028
|
gA.className = "wgt:text-sm wgt:font-semibold wgt:leading-[18px] wgt:text-text-black", gA.innerText = a("paymentMethod"), U.appendChild(gA);
|
|
6029
6029
|
const QA = document.createElement("div");
|
|
@@ -6367,7 +6367,7 @@ function lh(o) {
|
|
|
6367
6367
|
const eA = document.createElement("td");
|
|
6368
6368
|
eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", eA.innerText = ZA(CA), EA.appendChild(eA), F.appendChild(EA);
|
|
6369
6369
|
}
|
|
6370
|
-
s.appendChild($);
|
|
6370
|
+
s.appendChild($), s.appendChild(U);
|
|
6371
6371
|
}
|
|
6372
6372
|
return XA(), { container: i };
|
|
6373
6373
|
});
|