@ninebone/grid 0.0.57 → 0.0.58
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.
- package/dist/nine-grid.js +154 -154
- package/dist/nine-grid.js.map +1 -1
- package/dist/nine-grid.umd.js +21 -21
- package/dist/nine-grid.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-grid.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var Df=Object.defineProperty;var Tu=de=>{throw TypeError(de)};var Bf=(de,Se,Ue)=>Se in de?Df(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Bf(de,typeof Se!="symbol"?Se+"":Se,Ue),bu=(de,Se,Ue)=>Se.has(de)||Tu("Cannot "+Ue);var f=(de,Se,Ue)=>(bu(de,Se,"read from private field"),Ue?Ue.call(de):Se.get(de)),Y=(de,Se,Ue)=>Se.has(de)?Tu("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(de):Se.set(de,Ue),tt=(de,Se,Ue,Cs)=>(bu(de,Se,"write to private field"),Cs?Cs.call(de,Ue):Se.set(de,Ue),Ue),er=(de,Se,Ue)=>(bu(de,Se,"access private method"),Ue);var Ru=(de,Se,Ue,Cs)=>({set _(Ri){tt(de,Se,Ri,Ue)},get _(){return f(de,Se,Cs)}});var Jn,Qn,to,hs,Fl,Es,Ye,ql,Hl,zl,Ul,Wt,Vl,Mi,As,Ts,Ii,Rs,Ni,eo,Oi,ji,lr,Mu,Iu,Ff,Nu,Ou,ju,qf,$u,ri,$i,ro,so,io,no,kt,
|
|
1
|
+
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var Df=Object.defineProperty;var Tu=de=>{throw TypeError(de)};var Bf=(de,Se,Ue)=>Se in de?Df(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Bf(de,typeof Se!="symbol"?Se+"":Se,Ue),bu=(de,Se,Ue)=>Se.has(de)||Tu("Cannot "+Ue);var f=(de,Se,Ue)=>(bu(de,Se,"read from private field"),Ue?Ue.call(de):Se.get(de)),Y=(de,Se,Ue)=>Se.has(de)?Tu("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(de):Se.set(de,Ue),tt=(de,Se,Ue,Cs)=>(bu(de,Se,"write to private field"),Cs?Cs.call(de,Ue):Se.set(de,Ue),Ue),er=(de,Se,Ue)=>(bu(de,Se,"access private method"),Ue);var Ru=(de,Se,Ue,Cs)=>({set _(Ri){tt(de,Se,Ri,Ue)},get _(){return f(de,Se,Cs)}});var Jn,Qn,to,hs,Fl,Es,Ye,ql,Hl,zl,Ul,Wt,Vl,Mi,As,Ts,Ii,Rs,Ni,eo,Oi,ji,lr,Mu,Iu,Ff,Nu,Ou,ju,qf,$u,ri,$i,ro,so,io,no,kt,kr,Li,Wl,oo,Ot,cs,ao,lo,ho,$r,co,uo,dr,fo,Xl,Yl,Gl,Kl,Zl,Jl,po,mo,go,bo,Ql,th,Pi,yo,Di,Bi,Fi,vo,qi,Hi,si,Fr,wo,zi,xo,eh,ve,Lr,qr,_o,Cr,Ui,Hr,So,ou,ko,au,Co,Eo,Vi,Wi,Ao,Ne,Er,Ar,Ms,Is,zr,Tr,Ns,Os,To,Ro,Mo,lu,Io,rh,No,Xi,Yi,Gi,ii,Ki,sh,ce,ni,Pr,Zi,Oo,ih,nh,Ji,De,nr,jo,js,oi,Qi,oh,ah,lh,hh,hu,$o,Be,$s,ai,tn,ch,Lo,uh,Po,en,cu,dh,fh,rn,Do,sn,li,nn,Kr,ph,Bo,mh,Fo,gh,Ur,qo,bh,yh,vh,Zr,Ho,us,Ve,Dt,Pe,Rr,hi,Ls,on,zo,an,Uo,Vo,wh,Wo,Xo,ln,hn,Yo,Go,Ko,Oe,Zo,cn,ds,ci,un,Jo,uu,du,xh,Qo,hr,ta,_h,Sh,dn,fs,Vr,ps,kh,ea,fn,Ch,Ps,pn,Eh,Ah,Th,Rh,Mh,Ih,ra,mn,Nh,sa,Jr,Oh,Qr,ui,jh,Ke,ms,Wr,Ds,gn,ts,$h,ke,di,bn,yn,vn,Bs,fi,es,rs,Lt,ia,Lh,Fe,na,oa,Mr,aa,We,rr,Fs,Ph,wn,Dh,pi,la,qs,Dr,Hs,mi,Bh,Fh,xn,qh,sr,cr,gi,Hh,He,ha,ca,ua,gs,da,fa,pa,ma,or,gr,bi,zh,Uh,ga,ba,Vh,fr,ss,ya,br,zs,yi,fu,is,Wh,Xh,Yh,va,wa,xa,Gh,Kh,Le,pr,qt,ns,ge,yr,vr,Sn,Zh,Jh,_a,Qh,Sa,ka,kn,Cn,Ze,bs,ae,Xr,Yr,Us,tc,Ca,ec,Ea,rc,Aa,Ta,En,Xe,os,Ra,Ma,Ia,sc,ic,Gt,nc,Na,Oa,ys,ja,$a,La,Pa,Da,Ba,Fa,vi,Ll,oc,ac,lc,hc,pu,qa,Ha,cc,uc,dc,yt,Ge,wr,wi,xi,za,Ua,Va,Wa,Xa,fc,pc,mc,An,Vs,Ws,Je,Xs,gc,Ya,Tn,Ga,Ir,Ka,Za,bc,yc,vc,wc,Ja,_i,Qa,Rn,as,tl,el,xc,vs,_c,rl,Sc,ls,kc,sl,Cc,il,Ys,Gs,ws,Ec,nl,Mn,ol,al,In,ll,hl,Ks,cl,Nn,xs,Si,On,Ac,jn,$n,Tc,ul,dl,Ln,Pn,fl,pl,ml,Rc,ki,Mc,Ic,Lu,Dn,Nc,Oc,Pu,jc,$c,gl,Bn,bl,Lc,yl,Fn,vl,qn,_s,Ci,Pc,ur,wl,Dc,Hn,Du,Bu,Bc,Br,Fc,qc,Hc,xl,mu,zc,Nr,_l,Sl,kl,Cl,Uc,El,Ei,Al,Or,Pl,yu,vu,Tl,Vc,Rl,Wc,zn,Ml,wu,Un,Zs,xu,_u,Xc,Yc,Gc,Ss,Kc,Il,Vn,Nl,Ol,Wn,jl;class Cs extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
2
2
|
<nx-dialog css-file="nxConfirm.css">
|
|
3
3
|
<div class="msg"></div>
|
|
4
4
|
<buttons class="buttons-confirm">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<button class="button" ${t.join(" ")}>${this.getAttribute("text")}</button>
|
|
43
43
|
`,super.connectedCallback(),tt(this,Es,this.shadowRoot.querySelector("button")),$(this.cell).on("keydown",c=>{c.code=="Enter"&&$(f(this,Es)).trigger("click")})}}Es=new WeakMap,customElements.get("ng-button")||customElements.define("ng-button",Hu);class zu{constructor(C){Y(this,Ye);Y(this,ql,C=>{!C.ctrlKey&&!C.metaKey||(["C","c"].includes(C.key)?f(this,zl).call(this):["V","v"].includes(C.key)&&f(this,Hl).call(this))});Y(this,Hl,()=>{const C=f(this,Ye).cell.currentCell;C&&f(this,Ye).selection.rows[0]&&C.dataset.row==f(this,Ye).selection.rows[0]&&(parseInt(C.dataset.row),parseInt(C.dataset.row),navigator.clipboard.readText().then(t=>{t.split(`
|
|
44
44
|
`).forEach(l=>{l.split(" ").forEach(c=>{})})}).catch(t=>{console.error("Failed to read clipboard contents: ",t)}))});Y(this,zl,()=>{const C=[];for(var t=f(this,Ye).selection.selected.startRow;t<=f(this,Ye).selection.selected.endRow;t++){for(var l=[],c=f(this,Ye).selection.selected.startCol;c<=f(this,Ye).selection.selected.endCol;c++)l.push(f(this,Ul).call(this,t,c));C.push(l.join(" "))}C.length<=0||navigator.clipboard.writeText(C.join(`
|
|
45
|
-
`)).then(()=>{setTimeout(()=>{H.j.querySelectorAll(".selected",f(this,Ye).body).addClass("copied")}),setTimeout(()=>{H.j.querySelectorAll(".copied",f(this,Ye).body).removeClass("copied")},1e3)}).catch(o=>{console.error("Failed to copy text: ",o)})});Y(this,Ul,(C,t)=>{const l=parseInt(C/f(this,Ye).template.length),o=f(this,Ye).template[C%f(this,Ye).template.length].querySelector(`[data-col="${t}"]`);if(!o||!o.dataset)return"";if(o.dataset.expr)return f(this,Ye).exprFunction(o.dataset.expr).call(this,f(this,Ye).data.get(l),l);if(o.dataset.bind)return f(this,Ye).data.get(l,o.dataset.bind)});tt(this,Ye,C),$(f(this,Ye).body).on("keydown",f(this,ql))}}Ye=new WeakMap,ql=new WeakMap,Hl=new WeakMap,zl=new WeakMap,Ul=new WeakMap;class Uu{constructor(C){Y(this,lr);Y(this,Wt);Y(this,Vl);Y(this,Mi);Y(this,As);Y(this,Ts);Y(this,Ii);Y(this,Rs);Y(this,Ni);Y(this,eo);Y(this,Oi);Y(this,ji);it(this,"moveCell",C=>{var t=C.target.closest("th,td")||C.target.getRootNode().host.closest("th,td")||document.activeElement.closest("th,td"),l=t.closest("tr");l.sectionRowIndex;var c=parseInt(t.dataset.col);parseInt(l.dataset.row);var o=parseInt(l.dataset.matrixRow),r,n;switch(C.code){case"Tab":case"ArrowRight":case"ArrowLeft":r=o;break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":n=c;break}switch(C.code){case"Tab":C.preventDefault(),n=C.shiftKey?f(this,ri).call(this,o,c):f(this,$i).call(this,o,c);break;case"ArrowRight":n=f(this,$i).call(this,o,c);break;case"ArrowLeft":n=f(this,ri).call(this,o,c);break;case"ArrowDown":if(t.closest("tbody.fixed"))r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1);else{const e=parseInt(t.dataset.row),i=f(this,Wt).view.getVisibleLastRow();f(this,Wt).isLastPage&&e==i-1&&$(".ng-container-body .nodata",f(this,Wt).shadowRoot).height()<=0||!f(this,Wt).isLastPage&&f(this,Wt).lastRowHidden&&e>=i-1||!f(this,Wt).isLastPage&&!f(this,Wt).lastRowHidden&&e>=i?(f(this,Wt).scrollBy(1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1)}break;case"ArrowUp":t.closest("tbody.fixed")?r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1):t.closest("tr").sectionRowIndex==0?f(this,Wt).isFirstPage||(f(this,Wt).scrollBy(-1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1);break;case"PageDown":f(this,Wt).pageDown();break;case"PageUp":f(this,Wt).pageUp();break}if(r!=null&&n!=null&&isFinite(r)){var s=f(this,ro).call(this,r,n);s&&!s.querySelector("ng-row-indicator")&&(this.currentCell=s)}["Tab","ArrowLeft","ArrowRight"].includes(C.code)&&f(this,Wt).body.querySelector("ng-hscrollbar").refresh()});Y(this,ri,(C,t)=>{var l=parseInt(C/f(this,Wt).template.length),c;return $(`tbody tr[data-matrix-row=${C}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ri).call(this,C,r.dataset.col):r.dataset.col,!1}),c==null&&$(`tbody tr[data-row=${l}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ri).call(this,C,r.dataset.col):r.dataset.col,!1}),c});Y(this,$i,(C,t)=>{var l=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${C}"][data-col="${t}"]`),c=t+(l.colSpan||1),o=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${C}"][data-col="${c}"]`);return H.j.querySelectorAll(o).hasClass("dummy")&&(c=f(this,$i).call(this,C,c)),c});Y(this,ro,(C,t)=>{var l=parseInt(C/f(this,Wt).template.length),c=$(`[data-matrix-row=${C}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible");return c.length==0&&(c=$(`[data-row=${l}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible")),c[0]});it(this,"refresh",()=>{f(this,Wt).selection.refresh()});Y(this,so,C=>{C.altKey||C.shiftKey||C.ctrlKey||(C.preventDefault(),C.originalEvent.deltaY>0?f(this,Wt).scrollBy(1):f(this,Wt).scrollBy(-1))});Y(this,io,C=>{if(!(C.ctrlKey||C.altKey)&&!(C.target.tagName=="NG-ROW-INDICATOR"&&[H.SELECTTYPE.CELL,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)))if(C.shiftKey){if([H.SELECTTYPE.COLS,H.SELECTTYPE.ROWS,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)){var t=f(this,Wt).selection.getActiveCell();if(t){var l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,Wt).template.length+l.sectionRowIndex%f(this,Wt).template.length,o=parseInt(t.dataset.col),r=C.target.closest("th,td"),n=r.closest("tr"),s=parseInt(r.dataset.row)*f(this,Wt).template.length+n.sectionRowIndex%f(this,Wt).template.length,e=parseInt(r.dataset.col);f(this,Wt).selection.selectArea(c,o,s,e)}}}else{const i=C.target.closest("th,td"),u=f(this,Wt).view.getVisibleLastRow(),a=parseInt(i.closest("tr").dataset.row),h=!!i.closest("tbody.fixed"),p=f(this,Wt).shadowRoot.querySelector(".ng-container-body tr.nodata");if(!h&&$(p).height()<=0&&f(this,Wt).lastRowHidden&&u==a){const m=parseInt(i.closest("tr").dataset.matrixRow),d=parseInt(i.dataset.col);f(this,Wt).scrollBy(1);const b=f(this,ro).call(this,m,d);this.currentCell=b,setTimeout(()=>{b.focus()})}else this.currentCell=i}});Y(this,no,C=>{if(!(C.ctrlKey||C.altKey))if(["TH","TD"].includes(C.target.tagName)){if(["Tab","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(C.code))C.preventDefault(),this.moveCell(C);else if(["Enter"].includes(C.code)){C.preventDefault();const t=C.target.querySelector("ng-input");if(t){const l=t.shadowRoot.querySelector("input[type=text]");l.focus(),l.select()}}}else["NG-INPUT"].includes(C.target.tagName)&&["Enter"].includes(C.code)});it(this,"resetEvent",()=>{document.addEventListener("contextmenu",C=>C.preventDefault()),$(".ng-table tbody.bindable",f(this,Wt).body).off("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).off("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).off("mousedown","th,td",f(this,io)),$(".ng-table tbody.bindable",f(this,Wt).body).on("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).on("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).on("mousedown","th,td",f(this,io)),f(this,Wt).selection&&f(this,Wt).selection.resetEvent()});tt(this,Wt,C),tt(this,As,-1),tt(this,Ts,-1),tt(this,Ii,-1),tt(this,Rs,-1),this.resetEvent()}get matrixRow(){return f(this,Ts)}get col(){return f(this,Rs)}get currentCell(){return f(this,Mi)}set currentCell(C){if(!C)return;tt(this,Vl,f(this,Mi)),tt(this,Mi,C),C.focus();var t=C.closest("tr");tt(this,lr,parseInt(t.dataset.row)*f(this,Wt).template.length+t.sectionRowIndex%f(this,Wt).template.length,Iu),tt(this,lr,parseInt(C.dataset.col),ju),tt(this,lr,C.cellIndex,Nu),tt(this,lr,C.dataset.bind,$u),t.closest("tbody.fixed")||(f(this,Wt).row.at=C.dataset.row),f(this,Wt).selection.selectCell(f(this,lr,Mu),f(this,lr,Ou));const l=C,c=parseInt(l.dataset.row),o=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),r=parseInt(l.dataset.col),n=l.cellIndex,s=parseInt(f(this,As)/f(this,Wt).template.length),e=parseInt(f(this,As))%parseInt(f(this,As)/f(this,Wt).template.length),i=f(this,Ii),u=f(this,eo);if(c!=s||o!=e||r!=i){const a=new CustomEvent(H.EVENT.CELL_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,col:i,row:s,subrow:e,bind:f(this,Oi)},f(this,Wt).dispatchEvent(a)}if(c!=s){const a=new CustomEvent(H.EVENT.ROW_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,row:s,subrow:e,bind:f(this,Oi)},f(this,Wt).dispatchEvent(a)}}}Wt=new WeakMap,Vl=new WeakMap,Mi=new WeakMap,As=new WeakMap,Ts=new WeakMap,Ii=new WeakMap,Rs=new WeakMap,Ni=new WeakMap,eo=new WeakMap,Oi=new WeakMap,ji=new WeakMap,lr=new WeakSet,Mu=function(){return f(this,Ts)},Iu=function(C){tt(this,As,f(this,Ts)),tt(this,Ts,parseInt(C))},Ff=function(){return f(this,Ni)},Nu=function(C){tt(this,eo,f(this,Ni)),tt(this,Ni,parseInt(C))},Ou=function(){return f(this,Rs)},ju=function(C){tt(this,Ii,f(this,Rs)),tt(this,Rs,parseInt(C))},qf=function(){return f(this,ji)},$u=function(C){tt(this,Oi,f(this,ji)),tt(this,ji,C)},ri=new WeakMap,$i=new WeakMap,ro=new WeakMap,so=new WeakMap,io=new WeakMap,no=new WeakMap;class Vu{constructor(C){Y(this,kt);Y(this,Sr);Y(this,Li);it(this,"getActiveCell",()=>{var C=this.selected.currentRow,t=this.selected.currentCol,l=parseInt(this.selected.currentMatrixRow%f(this,kt).template.length),c=$(`tbody.bindable [data-row=${C}]`,f(this,kt).body).find(`[data-col=${t}]`).not(".dummy").eq(l);return c.length>0?c[0]:null});it(this,"refresh",()=>{switch(this.type){case H.SELECTTYPE.ROW:this.selected.startRow=parseInt(f(this,kt).row.at*f(this,kt).template.length),this.selected.endRow=this.selected.startRow+f(this,kt).template.length-1;var t=[];$(`tbody tr[data-row=${parseInt(this.selected.startRow/f(this,kt).template.length)}] td`,f(this,kt).body).not(".dummy").not(".first").each((o,r)=>{parseInt(H.j.querySelectorAll(r).attr("tabindex"))>=0&&t.push(Number(r.dataset.col))}),this.selected.startCol=t.length>0?Math.min.apply(null,t):-1,this.selected.endCol=t.length>0?Math.max.apply(null,t):-1;break;case H.SELECTTYPE.ROWS:this.selected.startRow=parseInt(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length,this.selected.endRow=parseInt(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length-1+f(this,kt).template.length,this.selected.startCol=f(this,kt).firstCol,this.selected.endCol=f(this,kt).lastCol;break;case H.SELECTTYPE.COL:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1),this.selected.endCol=this.selected.startCol;var C=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);this.selected.startCol>=s&&this.selected.endCol<=s+e-1&&C.push(n)})});var t=[];C.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.COLS:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1);var C=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);(this.selected.startCol>=s&&this.selected.startCol<=s+e-1||this.selected.endCol>=s&&this.selected.endCol<=s+e-1)&&C.push(n)})});var t=[];C.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.CELL:this.selected.endRow=this.selected.startRow,this.selected.endCol=this.selected.startCol;break;case H.SELECTTYPE.AREA:break;case H.SELECTTYPE.NONE:this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1;break}H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),H.j.querySelectorAll(".selected-current",f(this,kt).body).removeClass("selected-current"),H.j.querySelectorAll(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).addClass("selected-current"),H.j.querySelectorAll(`.col-indicator[data-col="${this.selected.currentCol}"]`,f(this,kt).body).addClass("selected-current"),$(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).closest("th,td").addClass("selected-current");var l=this.getActiveCell();l&&H.j.querySelectorAll(l).addClass("active"),$("tbody th,tbody td",f(this,kt).body).each((o,r)=>{var n=parseInt(r.dataset.col),s=parseInt(r.dataset.row)*f(this,kt).template.length+r.closest("tr").sectionRowIndex%f(this,kt).template.length;s==this.selected.currentMatrixRow&&n==this.selected.currentCol,s+r.rowSpan-1>=this.selected.startRow&&s<=this.selected.endRow&&n+r.colSpan-1>=this.selected.startCol&&n<=this.selected.endCol&&(H.j.querySelectorAll(r).addClass("selected"),this.selected.startRow==this.selected.endRow&&this.selected.startCol==this.selected.endCol?H.j.querySelectorAll(r).addClass("selected-top").addClass("selected-bottom").addClass("selected-left").addClass("selected-right"):(s==this.selected.startRow&&H.j.querySelectorAll(r).addClass("selected-top"),s+r.rowSpan-1==this.selected.endRow&&H.j.querySelectorAll(r).addClass("selected-bottom"),n==this.selected.startCol&&H.j.querySelectorAll(r).addClass("selected-left"),n+r.colSpan-1==this.selected.endCol&&H.j.querySelectorAll(r).addClass("selected-right"),H.j.querySelectorAll(r).addClass("multi-selected")))}),$("tbody.bindable tr",f(this,kt).body).each((o,r)=>{var n=r.querySelector("ng-row-indicator");if(n){n=n.closest("th,td");for(var s=parseInt(n.dataset.row),e=0;e<n.rowSpan;e++){var s=parseInt(n.dataset.row)*f(this,kt).template.length+r.sectionRowIndex%f(this,kt).template.length+e;s>=this.selected.startRow&&s<=this.selected.endRow&&H.j.querySelectorAll(n).addClass("selected-area")}}});for(var c=this.selected.startCol;c<=this.selected.endCol;c++)H.j.querySelectorAll(`.col-indicator[data-col="${c}"]`,f(this,kt).body).addClass("selected-area");(this.selected.oldStartRow!=this.selected.startRow||this.selected.oldEndRow!=this.selected.endRow||this.selected.oldStartCol!=this.selected.startCol||this.selected.oldEndCol!=this.selected.endCol)&&(f(this,Sr).oldStartRow=this.selected.oldStartRow,f(this,Sr).oldEndRow=this.selected.oldEndRow,f(this,Sr).oldStartCol=this.selected.oldStartCol,f(this,Sr).oldEndCol=this.selected.oldEndCol,f(this,Sr).startRow=this.selected.startRow,f(this,Sr).endRow=this.selected.endRow,f(this,Sr).startCol=this.selected.startCol,f(this,Sr).endCol=this.selected.endCol,f(this,kt).dispatchEvent(f(this,Sr))),this.selected.oldStartRow=this.selected.startRow,this.selected.oldEndRow=this.selected.endRow,this.selected.oldStartCol=this.selected.startCol,this.selected.oldEndCol=this.selected.endCol});it(this,"resetEvent",()=>{$(".ng-table tbody.bindable",f(this,kt).body).off("mousedown","th,td",f(this,oo)).on("mousedown","th,td",f(this,oo))});Y(this,Wl,()=>{this.resetEvent()});Y(this,oo,C=>{if(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftKey)return;const t=C.target.closest("th,td"),l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,kt).template.length+l.sectionRowIndex%f(this,kt).template.length,o=parseInt(t.dataset.col);this.selected.currentCol=t.dataset.col,this.selected.currentRow=t.dataset.row,this.selected.currentMatrixRow=parseInt(t.dataset.row*f(this,kt).template.length)+parseInt(t.closest("tr").sectionRowIndex%f(this,kt).template.length);var r={row:-1,col:-1};const n=a=>{const h=a.target.closest("th,td"),p=h.closest("tr");if(p.sectionRowIndex==r.row&&h.dataset.col==r.col||$(h).find("NG-ROW-INDICATOR").length>0)return;const m=parseInt(h.dataset.row)*f(this,kt).template.length+p.sectionRowIndex%f(this,kt).template.length,d=parseInt(h.dataset.col);this.selectArea(c,o,m,d),r={row:p.sectionRowIndex,col:h.dataset.col}},s=a=>{f(this,kt).body.querySelector("ng-vscrollbar").stopScroll(),clearInterval(f(this,Li)),$(".ng-table tbody.bindable",f(this,kt).body).off("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseleave",i),$(document).off("mousemove",u),$(document).off("mouseup",s)},e=a=>{clearInterval(f(this,Li)),$(document).off("mousemove",u)},i=a=>{const h=$(".ng-container-body",f(this,kt).body),p=h.find("thead"),m=h.find("tfoot");var d;parseInt(a.pageY)>=parseInt(h.offset().top+h.height()-m.height())?d=1:parseInt(a.pageY)<=parseInt(h.offset().top+p.height())&&(d=-1),this.selected.col=this.selected.startCol,d&&($(document).on("mousemove",u),tt(this,Li,setInterval(()=>{if(d>0){this.selected.endRow=h.find("tbody.bindable tr:last-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.endRow=Math.floor(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length+f(this,kt).template.length-1),this.selected.endRow>parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1&&(this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1)}else{this.selected.startRow=h.find("tbody.bindable tr:first-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length-f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.startRow=Math.floor(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length),this.selected.startRow<0&&(this.selected.startRow=0)}f(this,kt).scrollBy(d)},500)))},u=a=>{var h;if($(".col-indicator",f(this,kt).body).each((p,m)=>{var d=$(m).offset().left,b=$(m).width();if(a.pageX>d&&a.pageX<d+b)return h=m,!1}),h){let p=parseInt(h.dataset.col);if(f(this,kt).body.querySelector(`tbody.bindable [data-col="${p}"] ng-row-indicator`))return;$("th,td",f(this,kt).template).each((m,d)=>{p>=parseInt(d.dataset.col)&&p<=parseInt(d.dataset.col)+d.colSpan-1&&(p=p>=o?Math.max(p,parseInt(d.dataset.col)+d.colSpan-1):Math.min(p,parseInt(d.dataset.col)))}),p>=this.selected.startCol&&p<=this.selected.endCol?p>this.selected.col?this.selected.endCol=p:p<this.selected.col?this.selected.startCol=p:this.selected.startCol=this.selected.endCol=p:p>this.selected.endCol?this.selected.endCol=p:p<this.selected.startCol&&(this.selected.startCol=p)}};[H.SELECTTYPE.AREA,H.SELECTTYPE.ROWS,H.SELECTTYPE.COLS].includes(this.type)&&($(".ng-table tbody.bindable",f(this,kt).body).on("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseleave",i)),$(document).on("mouseup",s),this.rawIndex=f(this,kt).dataManager.viewRecords.rawIndex});it(this,"selectArea",(C,t,l,c)=>{var o=Math.min(C,l),r=Math.max(C,l),n=Math.min(t,c),s=Math.max(t,c);$("tbody.bindable th,tbody.bindable td",f(this,kt).body).each((e,i)=>{var u=i.closest("tr"),a=parseInt(i.dataset.row)*f(this,kt).template.length+u.sectionRowIndex%f(this,kt).template.length,h=parseInt(i.dataset.col);a+i.rowSpan-1>=o&&a<=r&&h+i.colSpan-1>=n&&h<=s&&(o=Math.min(a,o),n=Math.min(h,n),r=Math.max(a+i.rowSpan-1,r),s=Math.max(h+i.colSpan-1,s))}),this.selected.startRow=o,this.selected.endRow=r,this.selected.startCol=n,this.selected.endCol=s,this.refresh()});it(this,"selectCell",(C,t)=>{this.selected.currentCol=t,this.selected.currentMatrixRow=C,this.selected.currentRow=parseInt(C/f(this,kt).template.length),this.selectArea(C,t,C,t)});it(this,"clear",()=>{this.selected.clear()});tt(this,kt,C),tt(this,Sr,new CustomEvent("selectchanged",{bubbles:!0,detail:{}})),this.selected={currentRow:-1,currentMatrixRow:-1,currentCol:-1,startRow:-1,startCol:-1,endRow:-1,endCol:-1,oldStartRow:-1,oldStartCol:-1,oldEndRow:-1,oldEndCol:-1,clear:()=>{this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1,H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("selected").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right")}},f(this,Wl).call(this)}get type(){return f(this,kt).getAttribute("select-type")}set type(C){if(!Object.values(H.SELECTTYPE).includes(C))throw`invalid select type : ${C}`;Object.values(H.SELECTTYPE).forEach(t=>{H.j.querySelectorAll(".ng-table",f(this,kt).body).removeClass(`select-type-${t}`)}),H.j.querySelectorAll(".ng-table",f(this,kt).body).addClass(`select-type-${C}`),f(this,kt).cell.refresh()}get rows(){const C=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&C.push(parseInt(t/f(this,kt).template.length));return[...new Set(C)]}get subrows(){const C=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&C.push(parseInt(t%f(this,kt).template.length));return[...new Set(C)]}get cols(){const C=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t)$(`[data-col="${l}"]`,f(this,kt).template[c]).length>0&&C.push(l);return[...new Set(C)]}get binds(){const C=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t){const o=$(`[data-col="${l}"]`,f(this,kt).template[c]);o.length>0&&o[0].dataset.bind&&C.push(o[0].dataset.bind)}return[...new Set(C)]}get firstRow(){return parseInt(this.selected.startRow/f(this,kt).template.length)}get lastRow(){return parseInt(this.selected.endRow/f(this,kt).template.length)}get firstCol(){return this.selected.startCol}get lastCol(){return this.selected.endCol}}kt=new WeakMap,Sr=new WeakMap,Li=new WeakMap,Wl=new WeakMap,oo=new WeakMap;class Wu{constructor(C){Y(this,Ot);Y(this,cs);Y(this,ao);Y(this,lo);Y(this,ho);Y(this,jr);Y(this,co);Y(this,uo);Y(this,dr,0);Y(this,fo,C=>{var t;return $(".ng-container-body tbody.bindable tr",f(this,Ot).body).each((l,c)=>{var o=$(c).offset();if(C>=o.top&&C<=o.top+$(c).height())return t=c,!1}),t});Y(this,Xl,C=>{var t=f(this,Gl).call(this,C);if(t>0){t>f(this,Ot).dataManager.viewRecords.rawIndex&&(t=f(this,Ot).dataManager.viewRecords.rawIndex);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleFirstRow();for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i-t+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i-t+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i-t+l,e.before(a.outerHTML)})}return t});Y(this,Yl,C=>{var t=f(this,Kl).call(this,C);if(t>0){f(this,Ot).view.getVisibleLastRow()+t>=f(this,Ot).data.count()&&(t=f(this,Ot).data.count()-f(this,Ot).view.getVisibleLastRow()-1);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleLastRow()+1;for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i+l,e.before(a.outerHTML)})}return t});Y(this,Gl,C=>{const t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,dr)+C;if(t<=0)return 0;for(var c=0,o=0;o<l;)o+=f(this,Ot).view.getRowHeight(t-++c);return c});Y(this,Kl,C=>{const t=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY()+C,l=f(this,Ot).view.getVisibleFirstRow(),c=f(this,Ot).view.getVisibleLastRow();for(var o=0,r=0;o<t;)o+=f(this,Ot).view.getRowHeight(l+r++);return r+1-(c-l+1)});Y(this,Zl,()=>{const C=f(this,Ot).view.getVisibleFirstRow(),t=f(this,Ot).view.getVisibleLastRow();for(var l=C,c=0,o=C;o<t;o++)if(c+=f(this,Ot).view.getRowHeight(o),c>f(this,dr)*-1){c-=f(this,Ot).view.getRowHeight(o),l=o;break}if(l>C){for(var o=C;o<l;o++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${o}"]`).forEach(n=>{$(n).remove()});tt(this,dr,(c*-1-f(this,dr))*-1),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(r=>{r.style.transform=`translateY(${f(this,dr)}px)`})}return l-C});Y(this,Jl,()=>{const C=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY(),t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,Ot).view.getVisibleLastRow();for(var c=f(this,Ot).data.count(),o=0,r=t;r<=l;r++)if(o+=f(this,Ot).view.getRowHeight(r),o>C){c=r+1;break}for(r=c;r<=l;r++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${r}"]`).forEach(n=>{$(n).remove()});return l-c});it(this,"scrollTop",()=>{tt(this,dr,0),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(C=>{C.style.transform=`translateY(${f(this,dr)}px)`})});Y(this,po,C=>{clearInterval(f(this,cs)),tt(this,ao,C.touches[0].pageX),tt(this,lo,C.touches[0].pageX-$(".ng-container-body table",f(this,Ot).body).position().left),tt(this,ho,C.touches[0].pageY),tt(this,jr,C.touches[0].pageY),tt(this,uo,new Date);const t=f(this,fo).call(this,C.touches[0].pageY);t&&tt(this,co,parseInt(t.dataset.row))});Y(this,mo,C=>{if(!(C.touches.length>1||C.changedTouches.length>1)){if(C.preventDefault(),Math.abs(C.changedTouches[0].pageY-f(this,jr))>0){if(C.changedTouches[0].pageY>f(this,jr)){if(f(this,dr)+C.changedTouches[0].pageY-f(this,jr)>0&&f(this,Ot).view.getVisibleFirstRow()!=0){const o=f(this,Xl).call(this,C.changedTouches[0].pageY-f(this,jr));if(o>0){for(var t=f(this,Ot).view.getVisibleFirstRow(),l=t;l<t+o;l++)tt(this,dr,f(this,dr)-f(this,Ot).view.getRowHeight(l));f(this,Ot).dataManager.viewRecords.rawIndex-=o,f(this,Ot).view.redrawV3()}}}else C.changedTouches[0].pageY<f(this,jr)&&f(this,Yl).call(this,f(this,jr)-C.changedTouches[0].pageY)>0&&f(this,Ot).view.redrawV3();tt(this,dr,f(this,dr)+(C.changedTouches[0].pageY-f(this,jr))),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(o=>{o.style.transform=`translateY(${f(this,dr)}px)`}),tt(this,jr,C.changedTouches[0].pageY)}else if(Math.abs(C.changedTouches[0].pageX-f(this,ao))>20){var c=C.changedTouches[0].pageX-f(this,lo);c>0&&(c=0),$(".ng-container-body table",f(this,Ot).body).css({left:c}),f(this,Ot).body.querySelector("ng-hscrollbar").adjustThumb2()}}});Y(this,go,C=>{f(this,Ot).view.getVisibleFirstRow()==0&&f(this,dr)>0&&this.scrollTop();var t=f(this,Zl).call(this);f(this,Ot).dataManager.viewRecords.rawIndex+=t,f(this,Jl).call(this);const l=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY();for(var c=0,o=f(this,Ot).view.getVisibleFirstRow();o<=f(this,Ot).view.getVisibleLastRow();o++)c+=f(this,Ot).view.getRowHeight(o);$(".ng-container tbody.bindable tr.nodata",f(this,Ot).body).height(l-c),f(this,Ot).view.fitPage();const r=f(this,fo).call(this,C.changedTouches[0].pageY);if(!r||f(this,co)==parseInt(r.dataset.row))return;const n=500,s=parseInt(new Date-f(this,uo));if(s>n)return;const e=parseInt((n-s)/1*((f(this,Ot).data.count()-f(this,Ot).dataManager.viewRecords.rawIndex)/1)/(n*1)),i=f(this,Ot).dataManager.viewRecords.rawIndex+e*(C.changedTouches[0].pageY>f(this,ho)?-1:1);clearInterval(f(this,cs)),i>f(this,Ot).dataManager.viewRecords.rawIndex?tt(this,cs,setInterval(()=>{f(this,Ot).scrollBy(1),f(this,Ot).view.getVisibleLastRow()>=i&&clearInterval(f(this,cs))},10)):tt(this,cs,setInterval(()=>{f(this,Ot).scrollBy(-1),f(this,Ot).dataManager.viewRecords.rawIndex<=i&&clearInterval(f(this,cs))},10))});Y(this,bo,C=>{});it(this,"resetEvent",()=>{$("tbody.bindable",f(this,Ot).body).off("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).off("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).off("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).off("touchcancel",f(this,bo)),$("tbody.bindable",f(this,Ot).body).on("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).on("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).on("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).on("touchcancel",f(this,bo))});tt(this,Ot,C),this.resetEvent()}}Ot=new WeakMap,cs=new WeakMap,ao=new WeakMap,lo=new WeakMap,ho=new WeakMap,jr=new WeakMap,co=new WeakMap,uo=new WeakMap,dr=new WeakMap,fo=new WeakMap,Xl=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,po=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class Xu extends _r{constructor(){super();Y(this,Ql);Y(this,th);Y(this,Pi);Y(this,yo);Y(this,Di);it(this,"dataRefresh",t=>{var l=this.cell.closest("tr").data;for(var c of f(this,Di).data.datasets){var t=l[c["data-bind"]];switch(typeof t){case"string":c.data=t.split(",");break;case"object":Array.isArray(t)&&(c.data=t);break}}$(f(this,Pi)).height(28),setTimeout(()=>{f(this,yo).update()}),t||this.reset()})}connectedCallback(){tt(this,Ql,this.getRootNode().host),tt(this,th,this.closest("th,td")),this.shadowRoot.innerHTML=`
|
|
45
|
+
`)).then(()=>{setTimeout(()=>{H.j.querySelectorAll(".selected",f(this,Ye).body).addClass("copied")}),setTimeout(()=>{H.j.querySelectorAll(".copied",f(this,Ye).body).removeClass("copied")},1e3)}).catch(o=>{console.error("Failed to copy text: ",o)})});Y(this,Ul,(C,t)=>{const l=parseInt(C/f(this,Ye).template.length),o=f(this,Ye).template[C%f(this,Ye).template.length].querySelector(`[data-col="${t}"]`);if(!o||!o.dataset)return"";if(o.dataset.expr)return f(this,Ye).exprFunction(o.dataset.expr).call(this,f(this,Ye).data.get(l),l);if(o.dataset.bind)return f(this,Ye).data.get(l,o.dataset.bind)});tt(this,Ye,C),$(f(this,Ye).body).on("keydown",f(this,ql))}}Ye=new WeakMap,ql=new WeakMap,Hl=new WeakMap,zl=new WeakMap,Ul=new WeakMap;class Uu{constructor(C){Y(this,lr);Y(this,Wt);Y(this,Vl);Y(this,Mi);Y(this,As);Y(this,Ts);Y(this,Ii);Y(this,Rs);Y(this,Ni);Y(this,eo);Y(this,Oi);Y(this,ji);it(this,"moveCell",C=>{var t=C.target.closest("th,td")||C.target.getRootNode().host.closest("th,td")||document.activeElement.closest("th,td"),l=t.closest("tr");l.sectionRowIndex;var c=parseInt(t.dataset.col);parseInt(l.dataset.row);var o=parseInt(l.dataset.matrixRow),r,n;switch(C.code){case"Tab":case"ArrowRight":case"ArrowLeft":r=o;break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":n=c;break}switch(C.code){case"Tab":C.preventDefault(),n=C.shiftKey?f(this,ri).call(this,o,c):f(this,$i).call(this,o,c);break;case"ArrowRight":n=f(this,$i).call(this,o,c);break;case"ArrowLeft":n=f(this,ri).call(this,o,c);break;case"ArrowDown":if(t.closest("tbody.fixed"))r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1);else{const e=parseInt(t.dataset.row),i=f(this,Wt).view.getVisibleLastRow();f(this,Wt).isLastPage&&e==i-1&&$(".ng-container-body .nodata",f(this,Wt).shadowRoot).height()<=0||!f(this,Wt).isLastPage&&f(this,Wt).lastRowHidden&&e>=i-1||!f(this,Wt).isLastPage&&!f(this,Wt).lastRowHidden&&e>=i?(f(this,Wt).scrollBy(1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1)}break;case"ArrowUp":t.closest("tbody.fixed")?r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1):t.closest("tr").sectionRowIndex==0?f(this,Wt).isFirstPage||(f(this,Wt).scrollBy(-1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1);break;case"PageDown":f(this,Wt).pageDown();break;case"PageUp":f(this,Wt).pageUp();break}if(r!=null&&n!=null&&isFinite(r)){var s=f(this,ro).call(this,r,n);s&&!s.querySelector("ng-row-indicator")&&(this.currentCell=s)}["Tab","ArrowLeft","ArrowRight"].includes(C.code)&&f(this,Wt).body.querySelector("ng-hscrollbar").refresh()});Y(this,ri,(C,t)=>{var l=parseInt(C/f(this,Wt).template.length),c;return $(`tbody tr[data-matrix-row=${C}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ri).call(this,C,r.dataset.col):r.dataset.col,!1}),c==null&&$(`tbody tr[data-row=${l}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ri).call(this,C,r.dataset.col):r.dataset.col,!1}),c});Y(this,$i,(C,t)=>{var l=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${C}"][data-col="${t}"]`),c=t+(l.colSpan||1),o=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${C}"][data-col="${c}"]`);return H.j.querySelectorAll(o).hasClass("dummy")&&(c=f(this,$i).call(this,C,c)),c});Y(this,ro,(C,t)=>{var l=parseInt(C/f(this,Wt).template.length),c=$(`[data-matrix-row=${C}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible");return c.length==0&&(c=$(`[data-row=${l}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible")),c[0]});it(this,"refresh",()=>{f(this,Wt).selection.refresh()});Y(this,so,C=>{C.altKey||C.shiftKey||C.ctrlKey||(C.preventDefault(),C.originalEvent.deltaY>0?f(this,Wt).scrollBy(1):f(this,Wt).scrollBy(-1))});Y(this,io,C=>{if(!(C.ctrlKey||C.altKey)&&!(C.target.tagName=="NG-ROW-INDICATOR"&&[H.SELECTTYPE.CELL,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)))if(C.shiftKey){if([H.SELECTTYPE.COLS,H.SELECTTYPE.ROWS,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)){var t=f(this,Wt).selection.getActiveCell();if(t){var l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,Wt).template.length+l.sectionRowIndex%f(this,Wt).template.length,o=parseInt(t.dataset.col),r=C.target.closest("th,td"),n=r.closest("tr"),s=parseInt(r.dataset.row)*f(this,Wt).template.length+n.sectionRowIndex%f(this,Wt).template.length,e=parseInt(r.dataset.col);f(this,Wt).selection.selectArea(c,o,s,e)}}}else{const i=C.target.closest("th,td"),u=f(this,Wt).view.getVisibleLastRow(),a=parseInt(i.closest("tr").dataset.row),h=!!i.closest("tbody.fixed"),p=f(this,Wt).shadowRoot.querySelector(".ng-container-body tr.nodata");if(!h&&$(p).height()<=0&&f(this,Wt).lastRowHidden&&u==a){const m=parseInt(i.closest("tr").dataset.matrixRow),d=parseInt(i.dataset.col);f(this,Wt).scrollBy(1);const b=f(this,ro).call(this,m,d);this.currentCell=b,setTimeout(()=>{b.focus()})}else this.currentCell=i}});Y(this,no,C=>{if(!(C.ctrlKey||C.altKey))if(["TH","TD"].includes(C.target.tagName)){if(["Tab","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(C.code))C.preventDefault(),this.moveCell(C);else if(["Enter"].includes(C.code)){C.preventDefault();const t=C.target.querySelector("ng-input");if(t){const l=t.shadowRoot.querySelector("input[type=text]");l.focus(),l.select()}}}else["NG-INPUT"].includes(C.target.tagName)&&["Enter"].includes(C.code)});it(this,"resetEvent",()=>{document.addEventListener("contextmenu",C=>C.preventDefault()),$(".ng-table tbody.bindable",f(this,Wt).body).off("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).off("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).off("mousedown","th,td",f(this,io)),$(".ng-table tbody.bindable",f(this,Wt).body).on("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).on("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).on("mousedown","th,td",f(this,io)),f(this,Wt).selection&&f(this,Wt).selection.resetEvent()});tt(this,Wt,C),tt(this,As,-1),tt(this,Ts,-1),tt(this,Ii,-1),tt(this,Rs,-1),this.resetEvent()}get matrixRow(){return f(this,Ts)}get col(){return f(this,Rs)}get currentCell(){return f(this,Mi)}set currentCell(C){if(!C)return;tt(this,Vl,f(this,Mi)),tt(this,Mi,C),C.focus();var t=C.closest("tr");tt(this,lr,parseInt(t.dataset.row)*f(this,Wt).template.length+t.sectionRowIndex%f(this,Wt).template.length,Iu),tt(this,lr,parseInt(C.dataset.col),ju),tt(this,lr,C.cellIndex,Nu),tt(this,lr,C.dataset.bind,$u),t.closest("tbody.fixed")||(f(this,Wt).row.at=C.dataset.row),f(this,Wt).selection.selectCell(f(this,lr,Mu),f(this,lr,Ou));const l=C,c=parseInt(l.dataset.row),o=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),r=parseInt(l.dataset.col),n=l.cellIndex,s=parseInt(f(this,As)/f(this,Wt).template.length),e=parseInt(f(this,As))%parseInt(f(this,As)/f(this,Wt).template.length),i=f(this,Ii),u=f(this,eo);if(c!=s||o!=e||r!=i){const a=new CustomEvent(H.EVENT.CELL_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,col:i,row:s,subrow:e,bind:f(this,Oi)},f(this,Wt).dispatchEvent(a)}if(c!=s){const a=new CustomEvent(H.EVENT.ROW_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,row:s,subrow:e,bind:f(this,Oi)},f(this,Wt).dispatchEvent(a)}}}Wt=new WeakMap,Vl=new WeakMap,Mi=new WeakMap,As=new WeakMap,Ts=new WeakMap,Ii=new WeakMap,Rs=new WeakMap,Ni=new WeakMap,eo=new WeakMap,Oi=new WeakMap,ji=new WeakMap,lr=new WeakSet,Mu=function(){return f(this,Ts)},Iu=function(C){tt(this,As,f(this,Ts)),tt(this,Ts,parseInt(C))},Ff=function(){return f(this,Ni)},Nu=function(C){tt(this,eo,f(this,Ni)),tt(this,Ni,parseInt(C))},Ou=function(){return f(this,Rs)},ju=function(C){tt(this,Ii,f(this,Rs)),tt(this,Rs,parseInt(C))},qf=function(){return f(this,ji)},$u=function(C){tt(this,Oi,f(this,ji)),tt(this,ji,C)},ri=new WeakMap,$i=new WeakMap,ro=new WeakMap,so=new WeakMap,io=new WeakMap,no=new WeakMap;class Vu{constructor(C){Y(this,kt);Y(this,kr);Y(this,Li);it(this,"getActiveCell",()=>{var C=this.selected.currentRow,t=this.selected.currentCol,l=parseInt(this.selected.currentMatrixRow%f(this,kt).template.length),c=$(`tbody.bindable [data-row=${C}]`,f(this,kt).body).find(`[data-col=${t}]`).not(".dummy").eq(l);return c.length>0?c[0]:null});it(this,"refresh",()=>{switch(this.type){case H.SELECTTYPE.ROW:this.selected.startRow=parseInt(f(this,kt).row.at*f(this,kt).template.length),this.selected.endRow=this.selected.startRow+f(this,kt).template.length-1;var t=[];$(`tbody tr[data-row=${parseInt(this.selected.startRow/f(this,kt).template.length)}] td`,f(this,kt).body).not(".dummy").not(".first").each((o,r)=>{parseInt(H.j.querySelectorAll(r).attr("tabindex"))>=0&&t.push(Number(r.dataset.col))}),this.selected.startCol=t.length>0?Math.min.apply(null,t):-1,this.selected.endCol=t.length>0?Math.max.apply(null,t):-1;break;case H.SELECTTYPE.ROWS:this.selected.startRow=parseInt(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length,this.selected.endRow=parseInt(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length-1+f(this,kt).template.length,this.selected.startCol=f(this,kt).firstCol,this.selected.endCol=f(this,kt).lastCol;break;case H.SELECTTYPE.COL:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1),this.selected.endCol=this.selected.startCol;var C=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);this.selected.startCol>=s&&this.selected.endCol<=s+e-1&&C.push(n)})});var t=[];C.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.COLS:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1);var C=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);(this.selected.startCol>=s&&this.selected.startCol<=s+e-1||this.selected.endCol>=s&&this.selected.endCol<=s+e-1)&&C.push(n)})});var t=[];C.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.CELL:this.selected.endRow=this.selected.startRow,this.selected.endCol=this.selected.startCol;break;case H.SELECTTYPE.AREA:break;case H.SELECTTYPE.NONE:this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1;break}H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),H.j.querySelectorAll(".selected-current",f(this,kt).body).removeClass("selected-current"),H.j.querySelectorAll(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).addClass("selected-current"),H.j.querySelectorAll(`.col-indicator[data-col="${this.selected.currentCol}"]`,f(this,kt).body).addClass("selected-current"),$(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).closest("th,td").addClass("selected-current");var l=this.getActiveCell();l&&H.j.querySelectorAll(l).addClass("active"),$("tbody th,tbody td",f(this,kt).body).each((o,r)=>{var n=parseInt(r.dataset.col),s=parseInt(r.dataset.row)*f(this,kt).template.length+r.closest("tr").sectionRowIndex%f(this,kt).template.length;s==this.selected.currentMatrixRow&&n==this.selected.currentCol,s+r.rowSpan-1>=this.selected.startRow&&s<=this.selected.endRow&&n+r.colSpan-1>=this.selected.startCol&&n<=this.selected.endCol&&(H.j.querySelectorAll(r).addClass("selected"),this.selected.startRow==this.selected.endRow&&this.selected.startCol==this.selected.endCol?H.j.querySelectorAll(r).addClass("selected-top").addClass("selected-bottom").addClass("selected-left").addClass("selected-right"):(s==this.selected.startRow&&H.j.querySelectorAll(r).addClass("selected-top"),s+r.rowSpan-1==this.selected.endRow&&H.j.querySelectorAll(r).addClass("selected-bottom"),n==this.selected.startCol&&H.j.querySelectorAll(r).addClass("selected-left"),n+r.colSpan-1==this.selected.endCol&&H.j.querySelectorAll(r).addClass("selected-right"),H.j.querySelectorAll(r).addClass("multi-selected")))}),$("tbody.bindable tr",f(this,kt).body).each((o,r)=>{var n=r.querySelector("ng-row-indicator");if(n){n=n.closest("th,td");for(var s=parseInt(n.dataset.row),e=0;e<n.rowSpan;e++){var s=parseInt(n.dataset.row)*f(this,kt).template.length+r.sectionRowIndex%f(this,kt).template.length+e;s>=this.selected.startRow&&s<=this.selected.endRow&&H.j.querySelectorAll(n).addClass("selected-area")}}});for(var c=this.selected.startCol;c<=this.selected.endCol;c++)H.j.querySelectorAll(`.col-indicator[data-col="${c}"]`,f(this,kt).body).addClass("selected-area");(this.selected.oldStartRow!=this.selected.startRow||this.selected.oldEndRow!=this.selected.endRow||this.selected.oldStartCol!=this.selected.startCol||this.selected.oldEndCol!=this.selected.endCol)&&(f(this,kr).oldStartRow=this.selected.oldStartRow,f(this,kr).oldEndRow=this.selected.oldEndRow,f(this,kr).oldStartCol=this.selected.oldStartCol,f(this,kr).oldEndCol=this.selected.oldEndCol,f(this,kr).startRow=this.selected.startRow,f(this,kr).endRow=this.selected.endRow,f(this,kr).startCol=this.selected.startCol,f(this,kr).endCol=this.selected.endCol,f(this,kt).dispatchEvent(f(this,kr))),this.selected.oldStartRow=this.selected.startRow,this.selected.oldEndRow=this.selected.endRow,this.selected.oldStartCol=this.selected.startCol,this.selected.oldEndCol=this.selected.endCol});it(this,"resetEvent",()=>{$(".ng-table tbody.bindable",f(this,kt).body).off("mousedown","th,td",f(this,oo)).on("mousedown","th,td",f(this,oo))});Y(this,Wl,()=>{this.resetEvent()});Y(this,oo,C=>{if(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftKey)return;const t=C.target.closest("th,td"),l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,kt).template.length+l.sectionRowIndex%f(this,kt).template.length,o=parseInt(t.dataset.col);this.selected.currentCol=t.dataset.col,this.selected.currentRow=t.dataset.row,this.selected.currentMatrixRow=parseInt(t.dataset.row*f(this,kt).template.length)+parseInt(t.closest("tr").sectionRowIndex%f(this,kt).template.length);var r={row:-1,col:-1};const n=a=>{const h=a.target.closest("th,td"),p=h.closest("tr");if(p.sectionRowIndex==r.row&&h.dataset.col==r.col||$(h).find("NG-ROW-INDICATOR").length>0)return;const m=parseInt(h.dataset.row)*f(this,kt).template.length+p.sectionRowIndex%f(this,kt).template.length,d=parseInt(h.dataset.col);this.selectArea(c,o,m,d),r={row:p.sectionRowIndex,col:h.dataset.col}},s=a=>{f(this,kt).body.querySelector("ng-vscrollbar").stopScroll(),clearInterval(f(this,Li)),$(".ng-table tbody.bindable",f(this,kt).body).off("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseleave",i),$(document).off("mousemove",u),$(document).off("mouseup",s)},e=a=>{clearInterval(f(this,Li)),$(document).off("mousemove",u)},i=a=>{const h=$(".ng-container-body",f(this,kt).body),p=h.find("thead"),m=h.find("tfoot");var d;parseInt(a.pageY)>=parseInt(h.offset().top+h.height()-m.height())?d=1:parseInt(a.pageY)<=parseInt(h.offset().top+p.height())&&(d=-1),this.selected.col=this.selected.startCol,d&&($(document).on("mousemove",u),tt(this,Li,setInterval(()=>{if(d>0){this.selected.endRow=h.find("tbody.bindable tr:last-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.endRow=Math.floor(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length+f(this,kt).template.length-1),this.selected.endRow>parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1&&(this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1)}else{this.selected.startRow=h.find("tbody.bindable tr:first-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length-f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.startRow=Math.floor(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length),this.selected.startRow<0&&(this.selected.startRow=0)}f(this,kt).scrollBy(d)},500)))},u=a=>{var h;if($(".col-indicator",f(this,kt).body).each((p,m)=>{var d=$(m).offset().left,b=$(m).width();if(a.pageX>d&&a.pageX<d+b)return h=m,!1}),h){let p=parseInt(h.dataset.col);if(f(this,kt).body.querySelector(`tbody.bindable [data-col="${p}"] ng-row-indicator`))return;$("th,td",f(this,kt).template).each((m,d)=>{p>=parseInt(d.dataset.col)&&p<=parseInt(d.dataset.col)+d.colSpan-1&&(p=p>=o?Math.max(p,parseInt(d.dataset.col)+d.colSpan-1):Math.min(p,parseInt(d.dataset.col)))}),p>=this.selected.startCol&&p<=this.selected.endCol?p>this.selected.col?this.selected.endCol=p:p<this.selected.col?this.selected.startCol=p:this.selected.startCol=this.selected.endCol=p:p>this.selected.endCol?this.selected.endCol=p:p<this.selected.startCol&&(this.selected.startCol=p)}};[H.SELECTTYPE.AREA,H.SELECTTYPE.ROWS,H.SELECTTYPE.COLS].includes(this.type)&&($(".ng-table tbody.bindable",f(this,kt).body).on("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseleave",i)),$(document).on("mouseup",s),this.rawIndex=f(this,kt).dataManager.viewRecords.rawIndex});it(this,"selectArea",(C,t,l,c)=>{var o=Math.min(C,l),r=Math.max(C,l),n=Math.min(t,c),s=Math.max(t,c);$("tbody.bindable th,tbody.bindable td",f(this,kt).body).each((e,i)=>{var u=i.closest("tr"),a=parseInt(i.dataset.row)*f(this,kt).template.length+u.sectionRowIndex%f(this,kt).template.length,h=parseInt(i.dataset.col);a+i.rowSpan-1>=o&&a<=r&&h+i.colSpan-1>=n&&h<=s&&(o=Math.min(a,o),n=Math.min(h,n),r=Math.max(a+i.rowSpan-1,r),s=Math.max(h+i.colSpan-1,s))}),this.selected.startRow=o,this.selected.endRow=r,this.selected.startCol=n,this.selected.endCol=s,this.refresh()});it(this,"selectCell",(C,t)=>{this.selected.currentCol=t,this.selected.currentMatrixRow=C,this.selected.currentRow=parseInt(C/f(this,kt).template.length),this.selectArea(C,t,C,t)});it(this,"clear",()=>{this.selected.clear()});tt(this,kt,C),tt(this,kr,new CustomEvent("selectchanged",{bubbles:!0,detail:{}})),this.selected={currentRow:-1,currentMatrixRow:-1,currentCol:-1,startRow:-1,startCol:-1,endRow:-1,endCol:-1,oldStartRow:-1,oldStartCol:-1,oldEndRow:-1,oldEndCol:-1,clear:()=>{this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1,H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("selected").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right")}},f(this,Wl).call(this)}get type(){return f(this,kt).getAttribute("select-type")}set type(C){if(!Object.values(H.SELECTTYPE).includes(C))throw`invalid select type : ${C}`;Object.values(H.SELECTTYPE).forEach(t=>{H.j.querySelectorAll(".ng-table",f(this,kt).body).removeClass(`select-type-${t}`)}),H.j.querySelectorAll(".ng-table",f(this,kt).body).addClass(`select-type-${C}`),f(this,kt).cell.refresh()}get rows(){const C=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&C.push(parseInt(t/f(this,kt).template.length));return[...new Set(C)]}get subrows(){const C=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&C.push(parseInt(t%f(this,kt).template.length));return[...new Set(C)]}get cols(){const C=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t)$(`[data-col="${l}"]`,f(this,kt).template[c]).length>0&&C.push(l);return[...new Set(C)]}get binds(){const C=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t){const o=$(`[data-col="${l}"]`,f(this,kt).template[c]);o.length>0&&o[0].dataset.bind&&C.push(o[0].dataset.bind)}return[...new Set(C)]}get firstRow(){return parseInt(this.selected.startRow/f(this,kt).template.length)}get lastRow(){return parseInt(this.selected.endRow/f(this,kt).template.length)}get firstCol(){return this.selected.startCol}get lastCol(){return this.selected.endCol}}kt=new WeakMap,kr=new WeakMap,Li=new WeakMap,Wl=new WeakMap,oo=new WeakMap;class Wu{constructor(C){Y(this,Ot);Y(this,cs);Y(this,ao);Y(this,lo);Y(this,ho);Y(this,$r);Y(this,co);Y(this,uo);Y(this,dr,0);Y(this,fo,C=>{var t;return $(".ng-container-body tbody.bindable tr",f(this,Ot).body).each((l,c)=>{var o=$(c).offset();if(C>=o.top&&C<=o.top+$(c).height())return t=c,!1}),t});Y(this,Xl,C=>{var t=f(this,Gl).call(this,C);if(t>0){t>f(this,Ot).dataManager.viewRecords.rawIndex&&(t=f(this,Ot).dataManager.viewRecords.rawIndex);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleFirstRow();for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i-t+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i-t+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i-t+l,e.before(a.outerHTML)})}return t});Y(this,Yl,C=>{var t=f(this,Kl).call(this,C);if(t>0){f(this,Ot).view.getVisibleLastRow()+t>=f(this,Ot).data.count()&&(t=f(this,Ot).data.count()-f(this,Ot).view.getVisibleLastRow()-1);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleLastRow()+1;for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i+l,e.before(a.outerHTML)})}return t});Y(this,Gl,C=>{const t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,dr)+C;if(t<=0)return 0;for(var c=0,o=0;o<l;)o+=f(this,Ot).view.getRowHeight(t-++c);return c});Y(this,Kl,C=>{const t=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY()+C,l=f(this,Ot).view.getVisibleFirstRow(),c=f(this,Ot).view.getVisibleLastRow();for(var o=0,r=0;o<t;)o+=f(this,Ot).view.getRowHeight(l+r++);return r+1-(c-l+1)});Y(this,Zl,()=>{const C=f(this,Ot).view.getVisibleFirstRow(),t=f(this,Ot).view.getVisibleLastRow();for(var l=C,c=0,o=C;o<t;o++)if(c+=f(this,Ot).view.getRowHeight(o),c>f(this,dr)*-1){c-=f(this,Ot).view.getRowHeight(o),l=o;break}if(l>C){for(var o=C;o<l;o++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${o}"]`).forEach(n=>{$(n).remove()});tt(this,dr,(c*-1-f(this,dr))*-1),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(r=>{r.style.transform=`translateY(${f(this,dr)}px)`})}return l-C});Y(this,Jl,()=>{const C=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY(),t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,Ot).view.getVisibleLastRow();for(var c=f(this,Ot).data.count(),o=0,r=t;r<=l;r++)if(o+=f(this,Ot).view.getRowHeight(r),o>C){c=r+1;break}for(r=c;r<=l;r++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${r}"]`).forEach(n=>{$(n).remove()});return l-c});it(this,"scrollTop",()=>{tt(this,dr,0),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(C=>{C.style.transform=`translateY(${f(this,dr)}px)`})});Y(this,po,C=>{clearInterval(f(this,cs)),tt(this,ao,C.touches[0].pageX),tt(this,lo,C.touches[0].pageX-$(".ng-container-body table",f(this,Ot).body).position().left),tt(this,ho,C.touches[0].pageY),tt(this,$r,C.touches[0].pageY),tt(this,uo,new Date);const t=f(this,fo).call(this,C.touches[0].pageY);t&&tt(this,co,parseInt(t.dataset.row))});Y(this,mo,C=>{if(!(C.touches.length>1||C.changedTouches.length>1)){if(C.preventDefault(),Math.abs(C.changedTouches[0].pageY-f(this,$r))>0){if(C.changedTouches[0].pageY>f(this,$r)){if(f(this,dr)+C.changedTouches[0].pageY-f(this,$r)>0&&f(this,Ot).view.getVisibleFirstRow()!=0){const o=f(this,Xl).call(this,C.changedTouches[0].pageY-f(this,$r));if(o>0){for(var t=f(this,Ot).view.getVisibleFirstRow(),l=t;l<t+o;l++)tt(this,dr,f(this,dr)-f(this,Ot).view.getRowHeight(l));f(this,Ot).dataManager.viewRecords.rawIndex-=o,f(this,Ot).view.redrawV3()}}}else C.changedTouches[0].pageY<f(this,$r)&&f(this,Yl).call(this,f(this,$r)-C.changedTouches[0].pageY)>0&&f(this,Ot).view.redrawV3();tt(this,dr,f(this,dr)+(C.changedTouches[0].pageY-f(this,$r))),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(o=>{o.style.transform=`translateY(${f(this,dr)}px)`}),tt(this,$r,C.changedTouches[0].pageY)}else if(Math.abs(C.changedTouches[0].pageX-f(this,ao))>20){var c=C.changedTouches[0].pageX-f(this,lo);c>0&&(c=0),$(".ng-container-body table",f(this,Ot).body).css({left:c}),f(this,Ot).body.querySelector("ng-hscrollbar").adjustThumb2()}}});Y(this,go,C=>{f(this,Ot).view.getVisibleFirstRow()==0&&f(this,dr)>0&&this.scrollTop();var t=f(this,Zl).call(this);f(this,Ot).dataManager.viewRecords.rawIndex+=t,f(this,Jl).call(this);const l=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY();for(var c=0,o=f(this,Ot).view.getVisibleFirstRow();o<=f(this,Ot).view.getVisibleLastRow();o++)c+=f(this,Ot).view.getRowHeight(o);$(".ng-container tbody.bindable tr.nodata",f(this,Ot).body).height(l-c),f(this,Ot).view.fitPage();const r=f(this,fo).call(this,C.changedTouches[0].pageY);if(!r||f(this,co)==parseInt(r.dataset.row))return;const n=500,s=parseInt(new Date-f(this,uo));if(s>n)return;const e=parseInt((n-s)/1*((f(this,Ot).data.count()-f(this,Ot).dataManager.viewRecords.rawIndex)/1)/(n*1)),i=f(this,Ot).dataManager.viewRecords.rawIndex+e*(C.changedTouches[0].pageY>f(this,ho)?-1:1);clearInterval(f(this,cs)),i>f(this,Ot).dataManager.viewRecords.rawIndex?tt(this,cs,setInterval(()=>{f(this,Ot).scrollBy(1),f(this,Ot).view.getVisibleLastRow()>=i&&clearInterval(f(this,cs))},10)):tt(this,cs,setInterval(()=>{f(this,Ot).scrollBy(-1),f(this,Ot).dataManager.viewRecords.rawIndex<=i&&clearInterval(f(this,cs))},10))});Y(this,bo,C=>{});it(this,"resetEvent",()=>{$("tbody.bindable",f(this,Ot).body).off("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).off("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).off("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).off("touchcancel",f(this,bo)),$("tbody.bindable",f(this,Ot).body).on("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).on("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).on("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).on("touchcancel",f(this,bo))});tt(this,Ot,C),this.resetEvent()}}Ot=new WeakMap,cs=new WeakMap,ao=new WeakMap,lo=new WeakMap,ho=new WeakMap,$r=new WeakMap,co=new WeakMap,uo=new WeakMap,dr=new WeakMap,fo=new WeakMap,Xl=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,po=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class Xu extends _r{constructor(){super();Y(this,Ql);Y(this,th);Y(this,Pi);Y(this,yo);Y(this,Di);it(this,"dataRefresh",t=>{var l=this.cell.closest("tr").data;for(var c of f(this,Di).data.datasets){var t=l[c["data-bind"]];switch(typeof t){case"string":c.data=t.split(",");break;case"object":Array.isArray(t)&&(c.data=t);break}}$(f(this,Pi)).height(28),setTimeout(()=>{f(this,yo).update()}),t||this.reset()})}connectedCallback(){tt(this,Ql,this.getRootNode().host),tt(this,th,this.closest("th,td")),this.shadowRoot.innerHTML=`
|
|
46
46
|
<style>
|
|
47
47
|
:host {
|
|
48
48
|
height: 100%;
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</style>
|
|
158
158
|
|
|
159
159
|
<div></div>
|
|
160
|
-
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Ku),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",Zu);class Ju{constructor(C){Y(this,ve);Y(this,$r);Y(this,qr);Y(this,_o);Y(this,kr);Y(this,Ui);Y(this,Hr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,Vi)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(C=>{C.removeEventListener("click",f(this,So))}),$(document).on("mouseup",f(this,Vi)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(C=>{C.addEventListener("click",f(this,So))})});Y(this,So,C=>{if(C.target.closest("ng-filter-button"))return;const t=C.currentTarget||C.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(C.layerX>=a&&C.layerX<=a+6&&C.layerY>=i&&C.layerY<=i+u){var o=C.target.closest(".ng-container-left")||C.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=C.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});C.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(C.layerX>=a&&C.layerX<=a+6&&C.layerY>=i&&C.layerY<=i+u){var o=C.target.closest(".ng-container-body")||C.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=C.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});C.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,ou,C=>{if(!["INPUT"].includes(C.target.tagName)){var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.pageY=C.changedTouches[0].pageY,C.buttons=1,f(this,Eo).call(this,C),$(document).on("touchmove",l=>f(this,ko).call(this,l))}});Y(this,ko,C=>{var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.pageY=C.changedTouches[0].pageY,C.clientX=C.changedTouches[0].clientX,f(this,Wi).call(this,C)});Y(this,au,C=>{C.clientX=C.changedTouches[0].clientX,f(this,Vi).call(this,C)});Y(this,Co,C=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&C.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,Ui,!0),setTimeout(()=>{f(this,Ui)&&f(this,Eo).call(this,C)},500))});Y(this,Eo,C=>{if(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftkey||["INPUT"].includes(C.target.tagName))return;var t=C.pageX-$(C.target).offset().left;if(t<=3||$(C.target).width()-t<=3)return;C.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=C.target.closest("th,td");tt(this,kr,{col:parseInt(l.dataset.col),row:C.target.closest("tr").sectionRowIndex,target:l}),tt(this,_o,t+f(this,$r)[0].getBoundingClientRect().x);const c=f(this,$r)[0].shadowRoot.querySelector("span");c.innerHTML=$(C.target).html(),$(c).css({font:$(l).css("font")}),f(this,$r).show(),f(this,$r).width($(l).width()),f(this,$r).height($(l).height()),f(this,$r).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Wi)),f(this,Ao).call(this,C.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,C.clientX);f(this,qr).height($(o).height())});Y(this,Vi,C=>{if(tt(this,Ui,!1),$(document).off("mousemove",f(this,Wi)),$(document).off("touchmove",f(this,ko)),f(this,Hr)&&$(f(this,Hr).target).css({cursor:f(this,Hr).cursor}),f(this,kr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,C.clientX);f(this,ve).columns.moveColumn(f(this,kr).target,t)}tt(this,Hr,null),tt(this,kr,null),f(this,$r).hide(),f(this,qr).hide()});Y(this,Wi,C=>{if(f(this,kr)!=null){f(this,Hr)&&$(f(this,Hr).target).css({cursor:f(this,Hr).cursor}),tt(this,Hr,{target:C.target,cursor:$(C.target).css("cursor")}),$(C.target).css({cursor:C.target.closest("thead")||C.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,C.clientX);if(t)if(f(this,kr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,qr).show(),f(this,qr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,kr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,qr).show(),f(this,qr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,qr).hide();f(this,Ao).call(this,C.pageX)}});Y(this,Ao,C=>{f(this,$r).offset({left:C-f(this,_o)})});tt(this,ve,C),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,$r,$("ng-col-mover-grip",f(this,ve).body)),tt(this,qr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,$r=new WeakMap,qr=new WeakMap,_o=new WeakMap,kr=new WeakMap,Ui=new WeakMap,Hr=new WeakMap,So=new WeakMap,ou=new WeakMap,ko=new WeakMap,au=new WeakMap,Co=new WeakMap,Eo=new WeakMap,Vi=new WeakMap,Wi=new WeakMap,Ao=new WeakMap;class Qu{constructor(C){Y(this,Ne);Y(this,Cr);Y(this,Er);Y(this,Ms);Y(this,Is);Y(this,zr);Y(this,Ar);Y(this,Ns);Y(this,Os,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ne).body).off("mousemove",f(this,Mo)).off("mousedown",f(this,Io)).off("dblclick",f(this,To)),$(document).off("mouseup",f(this,Ro)),$(".ng-table > thead",f(this,Ne).body).on("mousemove",f(this,Mo)).on("mousedown",f(this,Io)).on("dblclick",f(this,To)),$(document).on("mouseup",f(this,Ro))});it(this,"autoFit",C=>{if(f(this,Ne).body)if(C){f(this,Ne).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Os,[]);var t=0;$(".ng-container-body col",f(this,Ne).body).each((c,o)=>{f(this,Os).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Os).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ne).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ne).body).width();l!=0&&f(this,Os).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ne).body).css({width:"0","min-width":"0"}),f(this,Os).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,To,C=>{C.target.style.cursor=="col-resize"&&f(this,sh).call(this,C)});Y(this,Ro,C=>{tt(this,Is,!1)});Y(this,Mo,C=>{if(!C.target.closest("ng-info")&&(C.target=C.target.closest("th,td"),!!C.target&&f(this,Ne).getAttribute("col-resizable")=="true"&&!(C.altKey||C.ctrlKey||C.shiftkey)))if(C.preventDefault(),C.offsetX<=2||C.offsetX>=C.target.offsetWidth-2){if(C.offsetX<=2&&f(this,Ne).tableUtils.isFirst(C.target)||C.offsetX>=C.target.offsetWidth-2&&f(this,Ne).tableUtils.isLast(C.target))return;C.target.style.cursor="col-resize"}else C.target.style.cursor="auto"});Y(this,lu,C=>{tt(this,Is,!0),setTimeout(()=>{f(this,Is)&&f(this,rh).call(this,C)},500)});Y(this,Io,C=>{const t=C.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Is,!0),setTimeout(()=>{f(this,Is)&&f(this,No).call(this,C)},500))});Y(this,rh,C=>{C.target=C.target.closest("th,td");var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.buttons=1,f(this,No).call(this,C),f(this,Cr).is(":visible")?($(C.target).on("touchmove",l=>f(this,Xi).call(this,l)),$(C.target).on("touchend",l=>f(this,Gi).call(this,l))):($(C.target).off("touchmove",l=>f(this,Xi).call(this,l)),$(C.target).off("touchend",l=>f(this,Gi).call(this,l)))});Y(this,No,C=>{if(C.target=C.target.closest("th,td"),!(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftkey)){if(tt(this,Ns,!!C.target.closest(".ng-container-right")),C.pageX-$(C.target).offset().left<=3){var t=$(`.col-indicator[data-col=${C.target.dataset.col}]`,f(this,Ne).body).not(".dummy")[0];tt(this,zr,f(this,Ne).tableUtils.prev(t)),tt(this,Ar,$(t))}else{if($(C.target).width()-C.offsetX>2)return;var l=parseInt(C.target.dataset.col)+C.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ne).body).not(".dummy")[0];tt(this,zr,$(t)),tt(this,Ar,f(this,Ne).tableUtils.next(t))}f(this,Cr).show(),f(this,Er).offset({top:$(".ng-container-body",f(this,Ne).body).offset().top,left:f(this,Ar).offset().left-1}),f(this,Er).height(f(this,Ne).body.querySelector(".ng-container-body").offsetHeight),f(this,Ms).offset({top:$(".ng-container-body",f(this,Ne).body).offset().top}),f(this,Ki).call(this,C.pageX),$(f(this,Cr)).off("mousemove",f(this,Yi)).off("mouseup",f(this,ii)).on("mousemove",f(this,Yi)).on("mouseup",f(this,ii))}});Y(this,Xi,C=>{f(this,Ki).call(this,C.changedTouches[0].pageX)});Y(this,Yi,C=>{f(this,Ki).call(this,C.pageX)});Y(this,Gi,C=>{$(C.target).off("touchmove",t=>f(this,Xi).call(this,t)),$(C.target).off("touchend",t=>f(this,Gi).call(this,t)),f(this,ii).call(this,C)});Y(this,ii,C=>{if(!f(this,Er).is(":visible"))return;var t;f(this,Ns)?t=f(this,Ar).offset().left-f(this,Er).offset().left+f(this,Ar).width():t=f(this,Er).offset().left-f(this,zr).offset().left+1,t<=1&&(t=0);const l=f(this,Ns)?f(this,Ar)[0].dataset.col:f(this,zr)[0].dataset.col;f(this,Ne).columns.width(l,t),$(f(this,Cr)).off("mousemove",f(this,Yi)),$(f(this,Cr)).off("mouseup",f(this,ii)),f(this,Cr).hide()});Y(this,Ki,C=>{!f(this,Ns)&&C<f(this,zr).offset().left&&(C=f(this,zr).offset().left),f(this,Er).offset({left:C});var t=parseInt(f(this,Er).offset().left),l,c,o;f(this,Ns)?(c=f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left)):(c=parseInt(t-f(this,zr).offset().left),o=c,l=parseInt(t-f(this,zr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Ms).offset({left:t}),f(this,Ms).width(o),f(this,Ms).find("span").text(l)});Y(this,sh,C=>{var t=C.target.closest("th,td"),l=f(this,Ne).tableUtils.prev(t),c=f(this,Ne).tableUtils.next(t),o=f(this,Ne).getBand(t.dataset.col)==H.BAND.RIGHT?C.offsetX<=2?$(t):c:C.offsetX<=2?l:$(t);f(this,Ne).setColumnWidthFit(o[0].dataset.col)});tt(this,Ne,C),tt(this,Cr,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ne).body).append(f(this,Cr)),tt(this,Er,f(this,Cr).find(".grip")),tt(this,Ms,f(this,Cr).find(".tooltip")),this.resetEvent()}}Ne=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Ms=new WeakMap,Is=new WeakMap,zr=new WeakMap,Ar=new WeakMap,Ns=new WeakMap,Os=new WeakMap,To=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,lu=new WeakMap,Io=new WeakMap,rh=new WeakMap,No=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,Gi=new WeakMap,ii=new WeakMap,Ki=new WeakMap,sh=new WeakMap;class td{constructor(C){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",C=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return C?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${C}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,ni,(C,t)=>{var l=Array.from(C.querySelectorAll("col"));return l[t]});Y(this,Lr,(C,t,l)=>{var c=[];if(!C)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(C.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Zi,(C,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(C,l):o(C,l)});Y(this,Oo,C=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=C.colSpan||1,c=C.closest("table"),o=parseInt(C.dataset.col),r=C.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Lr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Lr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Lr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Lr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Lr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Lr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Lr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,ni).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,ni).call(this,n.currentTable,s));return t});Y(this,ih,(C,t,l,c)=>{if(C.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(C.dataset.col),r=C.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(C,t)=>{if(!C||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Oo).call(this,C),o=f(this,Oo).call(this,t),r=t.closest("table"),n=!!(C.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(C.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,ih).call(this,C,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Zi).call(this,g,C,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),E=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[E];var u=f(this,Zi).call(this,I,C,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Zi).call(this,g,C,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(C.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(C.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,ni).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,ni).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-C.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-C.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(C,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${C}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${C}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(C==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${C}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,C)}}ce=new WeakMap,ni=new WeakMap,Lr=new WeakMap,Zi=new WeakMap,Oo=new WeakMap,ih=new WeakMap;class ed extends ei{constructor(){super();Y(this,nh,10);Y(this,Ji);Y(this,De);Y(this,nr);Y(this,jo);Y(this,js);Y(this,oi);Y(this,Qi);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,oh).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Ji).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,oh,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,js)]);if(c<0)return!1}return!0});Y(this,ah,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,lh,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,nh)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,js),f(this,Qi));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,jo))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,hh,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,hu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,jo,this.getAttribute("rows")||5),tt(this,js,this.getAttribute("code")||"code"),tt(this,oi,this.getAttribute("codename")||"codename"),tt(this,Qi,(this.getAttribute("items")||f(this,oi)||"").split(",")),f(this,Qi).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,js)),e=n.getAttribute(f(this,oi));s&&e&&f(this,nr).push({[f(this,js)]:s,[f(this,oi)]:e})})),this.shadowRoot.innerHTML=`
|
|
160
|
+
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Ku),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",Zu);class Ju{constructor(C){Y(this,ve);Y(this,Lr);Y(this,qr);Y(this,_o);Y(this,Cr);Y(this,Ui);Y(this,Hr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,Vi)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(C=>{C.removeEventListener("click",f(this,So))}),$(document).on("mouseup",f(this,Vi)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(C=>{C.addEventListener("click",f(this,So))})});Y(this,So,C=>{if(C.target.closest("ng-filter-button"))return;const t=C.currentTarget||C.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(C.layerX>=a&&C.layerX<=a+6&&C.layerY>=i&&C.layerY<=i+u){var o=C.target.closest(".ng-container-left")||C.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=C.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});C.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(C.layerX>=a&&C.layerX<=a+6&&C.layerY>=i&&C.layerY<=i+u){var o=C.target.closest(".ng-container-body")||C.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=C.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});C.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,ou,C=>{if(!["INPUT"].includes(C.target.tagName)){var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.pageY=C.changedTouches[0].pageY,C.buttons=1,f(this,Eo).call(this,C),$(document).on("touchmove",l=>f(this,ko).call(this,l))}});Y(this,ko,C=>{var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.pageY=C.changedTouches[0].pageY,C.clientX=C.changedTouches[0].clientX,f(this,Wi).call(this,C)});Y(this,au,C=>{C.clientX=C.changedTouches[0].clientX,f(this,Vi).call(this,C)});Y(this,Co,C=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&C.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,Ui,!0),setTimeout(()=>{f(this,Ui)&&f(this,Eo).call(this,C)},500))});Y(this,Eo,C=>{if(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftkey||["INPUT"].includes(C.target.tagName))return;var t=C.pageX-$(C.target).offset().left;if(t<=3||$(C.target).width()-t<=3)return;C.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=C.target.closest("th,td");tt(this,Cr,{col:parseInt(l.dataset.col),row:C.target.closest("tr").sectionRowIndex,target:l}),tt(this,_o,t+f(this,Lr)[0].getBoundingClientRect().x);const c=f(this,Lr)[0].shadowRoot.querySelector("span");c.innerHTML=$(C.target).html(),$(c).css({font:$(l).css("font")}),f(this,Lr).show(),f(this,Lr).width($(l).width()),f(this,Lr).height($(l).height()),f(this,Lr).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Wi)),f(this,Ao).call(this,C.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,Cr).row,C.clientX);f(this,qr).height($(o).height())});Y(this,Vi,C=>{if(tt(this,Ui,!1),$(document).off("mousemove",f(this,Wi)),$(document).off("touchmove",f(this,ko)),f(this,Hr)&&$(f(this,Hr).target).css({cursor:f(this,Hr).cursor}),f(this,Cr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,Cr).row,C.clientX);f(this,ve).columns.moveColumn(f(this,Cr).target,t)}tt(this,Hr,null),tt(this,Cr,null),f(this,Lr).hide(),f(this,qr).hide()});Y(this,Wi,C=>{if(f(this,Cr)!=null){f(this,Hr)&&$(f(this,Hr).target).css({cursor:f(this,Hr).cursor}),tt(this,Hr,{target:C.target,cursor:$(C.target).css("cursor")}),$(C.target).css({cursor:C.target.closest("thead")||C.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,Cr).row,C.clientX);if(t)if(f(this,Cr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,qr).show(),f(this,qr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,Cr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,qr).show(),f(this,qr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,qr).hide();f(this,Ao).call(this,C.pageX)}});Y(this,Ao,C=>{f(this,Lr).offset({left:C-f(this,_o)})});tt(this,ve,C),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,Lr,$("ng-col-mover-grip",f(this,ve).body)),tt(this,qr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,Lr=new WeakMap,qr=new WeakMap,_o=new WeakMap,Cr=new WeakMap,Ui=new WeakMap,Hr=new WeakMap,So=new WeakMap,ou=new WeakMap,ko=new WeakMap,au=new WeakMap,Co=new WeakMap,Eo=new WeakMap,Vi=new WeakMap,Wi=new WeakMap,Ao=new WeakMap;class Qu{constructor(C){Y(this,Ne);Y(this,Er);Y(this,Ar);Y(this,Ms);Y(this,Is);Y(this,zr);Y(this,Tr);Y(this,Ns);Y(this,Os,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ne).body).off("mousemove",f(this,Mo)).off("mousedown",f(this,Io)).off("dblclick",f(this,To)),$(document).off("mouseup",f(this,Ro)),$(".ng-table > thead",f(this,Ne).body).on("mousemove",f(this,Mo)).on("mousedown",f(this,Io)).on("dblclick",f(this,To)),$(document).on("mouseup",f(this,Ro))});it(this,"autoFit",C=>{if(f(this,Ne).body)if(C){f(this,Ne).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Os,[]);var t=0;$(".ng-container-body col",f(this,Ne).body).each((c,o)=>{f(this,Os).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Os).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ne).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ne).body).width();l!=0&&f(this,Os).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ne).body).css({width:"0","min-width":"0"}),f(this,Os).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,To,C=>{C.target.style.cursor=="col-resize"&&f(this,sh).call(this,C)});Y(this,Ro,C=>{tt(this,Is,!1)});Y(this,Mo,C=>{if(!C.target.closest("ng-info")&&(C.target=C.target.closest("th,td"),!!C.target&&f(this,Ne).getAttribute("col-resizable")=="true"&&!(C.altKey||C.ctrlKey||C.shiftkey)))if(C.preventDefault(),C.offsetX<=2||C.offsetX>=C.target.offsetWidth-2){if(C.offsetX<=2&&f(this,Ne).tableUtils.isFirst(C.target)||C.offsetX>=C.target.offsetWidth-2&&f(this,Ne).tableUtils.isLast(C.target))return;C.target.style.cursor="col-resize"}else C.target.style.cursor="auto"});Y(this,lu,C=>{tt(this,Is,!0),setTimeout(()=>{f(this,Is)&&f(this,rh).call(this,C)},500)});Y(this,Io,C=>{const t=C.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Is,!0),setTimeout(()=>{f(this,Is)&&f(this,No).call(this,C)},500))});Y(this,rh,C=>{C.target=C.target.closest("th,td");var t=C.target.getBoundingClientRect();C.offsetX=C.targetTouches[0].pageX-t.left,C.pageX=C.changedTouches[0].pageX,C.buttons=1,f(this,No).call(this,C),f(this,Er).is(":visible")?($(C.target).on("touchmove",l=>f(this,Xi).call(this,l)),$(C.target).on("touchend",l=>f(this,Gi).call(this,l))):($(C.target).off("touchmove",l=>f(this,Xi).call(this,l)),$(C.target).off("touchend",l=>f(this,Gi).call(this,l)))});Y(this,No,C=>{if(C.target=C.target.closest("th,td"),!(C.buttons!=1||C.altKey||C.ctrlKey||C.shiftkey)){if(tt(this,Ns,!!C.target.closest(".ng-container-right")),C.pageX-$(C.target).offset().left<=3){var t=$(`.col-indicator[data-col=${C.target.dataset.col}]`,f(this,Ne).body).not(".dummy")[0];tt(this,zr,f(this,Ne).tableUtils.prev(t)),tt(this,Tr,$(t))}else{if($(C.target).width()-C.offsetX>2)return;var l=parseInt(C.target.dataset.col)+C.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ne).body).not(".dummy")[0];tt(this,zr,$(t)),tt(this,Tr,f(this,Ne).tableUtils.next(t))}f(this,Er).show(),f(this,Ar).offset({top:$(".ng-container-body",f(this,Ne).body).offset().top,left:f(this,Tr).offset().left-1}),f(this,Ar).height(f(this,Ne).body.querySelector(".ng-container-body").offsetHeight),f(this,Ms).offset({top:$(".ng-container-body",f(this,Ne).body).offset().top}),f(this,Ki).call(this,C.pageX),$(f(this,Er)).off("mousemove",f(this,Yi)).off("mouseup",f(this,ii)).on("mousemove",f(this,Yi)).on("mouseup",f(this,ii))}});Y(this,Xi,C=>{f(this,Ki).call(this,C.changedTouches[0].pageX)});Y(this,Yi,C=>{f(this,Ki).call(this,C.pageX)});Y(this,Gi,C=>{$(C.target).off("touchmove",t=>f(this,Xi).call(this,t)),$(C.target).off("touchend",t=>f(this,Gi).call(this,t)),f(this,ii).call(this,C)});Y(this,ii,C=>{if(!f(this,Ar).is(":visible"))return;var t;f(this,Ns)?t=f(this,Tr).offset().left-f(this,Ar).offset().left+f(this,Tr).width():t=f(this,Ar).offset().left-f(this,zr).offset().left+1,t<=1&&(t=0);const l=f(this,Ns)?f(this,Tr)[0].dataset.col:f(this,zr)[0].dataset.col;f(this,Ne).columns.width(l,t),$(f(this,Er)).off("mousemove",f(this,Yi)),$(f(this,Er)).off("mouseup",f(this,ii)),f(this,Er).hide()});Y(this,Ki,C=>{!f(this,Ns)&&C<f(this,zr).offset().left&&(C=f(this,zr).offset().left),f(this,Ar).offset({left:C});var t=parseInt(f(this,Ar).offset().left),l,c,o;f(this,Ns)?(c=f(this,Tr).width()+f(this,Tr).offset().left-f(this,Ar).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Tr).width()+f(this,Tr).offset().left-f(this,Ar).offset().left)):(c=parseInt(t-f(this,zr).offset().left),o=c,l=parseInt(t-f(this,zr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Ms).offset({left:t}),f(this,Ms).width(o),f(this,Ms).find("span").text(l)});Y(this,sh,C=>{var t=C.target.closest("th,td"),l=f(this,Ne).tableUtils.prev(t),c=f(this,Ne).tableUtils.next(t),o=f(this,Ne).getBand(t.dataset.col)==H.BAND.RIGHT?C.offsetX<=2?$(t):c:C.offsetX<=2?l:$(t);f(this,Ne).setColumnWidthFit(o[0].dataset.col)});tt(this,Ne,C),tt(this,Er,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ne).body).append(f(this,Er)),tt(this,Ar,f(this,Er).find(".grip")),tt(this,Ms,f(this,Er).find(".tooltip")),this.resetEvent()}}Ne=new WeakMap,Er=new WeakMap,Ar=new WeakMap,Ms=new WeakMap,Is=new WeakMap,zr=new WeakMap,Tr=new WeakMap,Ns=new WeakMap,Os=new WeakMap,To=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,lu=new WeakMap,Io=new WeakMap,rh=new WeakMap,No=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,Gi=new WeakMap,ii=new WeakMap,Ki=new WeakMap,sh=new WeakMap;class td{constructor(C){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",C=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return C?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${C}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,ni,(C,t)=>{var l=Array.from(C.querySelectorAll("col"));return l[t]});Y(this,Pr,(C,t,l)=>{var c=[];if(!C)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(C.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Zi,(C,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(C,l):o(C,l)});Y(this,Oo,C=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=C.colSpan||1,c=C.closest("table"),o=parseInt(C.dataset.col),r=C.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Pr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Pr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Pr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Pr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Pr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Pr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Pr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Pr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Pr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,ni).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,ni).call(this,n.currentTable,s));return t});Y(this,ih,(C,t,l,c)=>{if(C.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(C.dataset.col),r=C.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(C,t)=>{if(!C||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Oo).call(this,C),o=f(this,Oo).call(this,t),r=t.closest("table"),n=!!(C.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(C.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,ih).call(this,C,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Zi).call(this,g,C,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),E=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[E];var u=f(this,Zi).call(this,I,C,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Zi).call(this,g,C,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(C.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(C.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,ni).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,ni).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-C.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-C.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(C,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${C}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${C}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(C==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${C}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,C)}}ce=new WeakMap,ni=new WeakMap,Pr=new WeakMap,Zi=new WeakMap,Oo=new WeakMap,ih=new WeakMap;class ed extends ei{constructor(){super();Y(this,nh,10);Y(this,Ji);Y(this,De);Y(this,nr);Y(this,jo);Y(this,js);Y(this,oi);Y(this,Qi);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,oh).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Ji).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,oh,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,js)]);if(c<0)return!1}return!0});Y(this,ah,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,lh,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,nh)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,js),f(this,Qi));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,jo))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,hh,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,hu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,jo,this.getAttribute("rows")||5),tt(this,js,this.getAttribute("code")||"code"),tt(this,oi,this.getAttribute("codename")||"codename"),tt(this,Qi,(this.getAttribute("items")||f(this,oi)||"").split(",")),f(this,Qi).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,js)),e=n.getAttribute(f(this,oi));s&&e&&f(this,nr).push({[f(this,js)]:s,[f(this,oi)]:e})})),this.shadowRoot.innerHTML=`
|
|
161
161
|
<style>
|
|
162
162
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngCombo.css";
|
|
163
163
|
${H.getCustomPath(this,"ngCombo.css")}
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
<input id="chkAll" type="checkbox" checked><label for="chkAll">Select All</label>
|
|
213
213
|
<button id="btnOk">OK</button>
|
|
214
214
|
</div>
|
|
215
|
-
`,f(this,ch).call(this)}}$o=new WeakMap,Be=new WeakMap,$s=new WeakMap,ai=new WeakMap,tn=new WeakMap,ch=new WeakMap,Lo=new WeakMap,uh=new WeakMap,Po=new WeakMap,en=new WeakMap,cu=new WeakMap,dh=new WeakMap,fh=new WeakMap,customElements.get("ng-combo")||customElements.define("ng-combo",ed),customElements.get("ng-combo-panel")||customElements.define("ng-combo-panel",rd);class sd{constructor(C){Y(this,rn);Y(this,Do);Y(this,sn);Y(this,li);Y(this,nn);Y(this,Kr);it(this,"openMenu",(C,t)=>{var l=$(f(this,Kr)).css("font"),c=150;for(const o of f(this,sn))c=Math.max(c,H.measureTextSize(o.name,l).width+60);$(f(this,Kr)).css({width:c,top:t,left:C}),f(this,Kr).open(),f(this,li)&&f(this,li).show&&f(this,li).show.call(this,{source:f(this,Do)})});Y(this,ph,C=>{tt(this,sn,f(this,Bo).call(this,C.items,0)),tt(this,li,C.events),tt(this,Kr,$(`<ng-context-menu-panel id="${C.id}"></ng-context-menu-panel>`)[0]),$(f(this,rn).shadowRoot).append($(f(this,Kr)).hide()),f(this,Kr).init(f(this,sn)),$("li",f(this,Kr)).on("mousedown",t=>{C.callback&&(t.menuId=t.currentTarget.getAttribute("menu-id"),t.source=f(this,Do),C.callback(t)),$("ng-context-menu-panel",f(this,rn).shadowRoot).hide()})});Y(this,Bo,(C,t)=>{tt(this,nn,Math.max(t,f(this,nn))+1),C=f(this,mh).call(this,C);for(const l of C)l.level=t,l.hasOwnProperty("items")&&(l.items=f(this,Bo).call(this,l.items,t+1));return C});Y(this,mh,C=>{if(Array.isArray(C))return C;var t=[];for(const c in C){var l=C[c];l.menuId=c,t.push(l)}return t});tt(this,nn,0),tt(this,rn,C.owner),f(this,ph).call(this,C)}}rn=new WeakMap,Do=new WeakMap,sn=new WeakMap,li=new WeakMap,nn=new WeakMap,Kr=new WeakMap,ph=new WeakMap,Bo=new WeakMap,mh=new WeakMap;class id extends HTMLElement{constructor(){super();it(this,"init",t=>{var l=$("ul",this);$("li",l).remove(),f(this,Fo).call(this,l,t),$("li",this).on("mouseover",f(this,gh)),$("li",this).on("mouseout",c=>{H.j.querySelectorAll(c.currentTarget).removeClass("visible")})});it(this,"open",()=>{$(this).show()});Y(this,Fo,(t,l)=>{for(const n of l){var c=(n.hasOwnProperty("className")?n.className:"")+(n.hasOwnProperty("items")?" submenu":""),o=$(`<li menu-id='${n.menuId}' id="${n.name}" class="${c.trim()}"><span>${n.name}</span></li>`);if(t.append(o),n.hasOwnProperty("items")){var r=$("<ul></ul>");o.append(r),f(this,Fo).call(this,r,n.items)}}});Y(this,gh,t=>{H.j.querySelectorAll(t.currentTarget).addClass("visible");var l=$(this).css("font"),c=150;$("ul > li:visible > span",t.currentTarget).each((o,r)=>{c=Math.max(c,H.measureTextSize($(r).text(),l).width+60)}),$("ul",t.currentTarget).eq(0).css({width:c,top:-9,left:$(t.currentTarget.closest("ul")).width()-8,"z-index":Number($(this).css("z-index"))+1})})}connectedCallback(){this.innerHTML="<ul></ul>"}}Fo=new WeakMap,gh=new WeakMap,customElements.get("ng-context-menu-panel")||customElements.define("ng-context-menu-panel",id);class nd{constructor(C){Y(this,Ur);Y(this,qo,()=>{$(".ng-table tbody",f(this,Ur).shadowRoot).on("click","th,td",f(this,bh)),$(".ng-table thead",f(this,Ur).shadowRoot).on("click","th,td",f(this,yh)),$(".ng-table tfoot",f(this,Ur).shadowRoot).on("click","th,td",f(this,vh))});Y(this,bh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.CELL_CLICK:H.EVENT.CELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,o.row=l.dataset.row,o.subrow=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),o.bind=l.dataset.bind,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});Y(this,yh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.HEADCELL_CLICK:H.EVENT.HEADCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});Y(this,vh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.FOOTCELL_CLICK:H.EVENT.FOOTCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});tt(this,Ur,C),f(this,qo).call(this),f(this,Ur).addEventListener(H.EVENT.LAYOUT_CHANGED,t=>{f(this,qo).call(this)})}}Ur=new WeakMap,qo=new WeakMap,bh=new WeakMap,yh=new WeakMap,vh=new WeakMap;class od extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const
|
|
216
|
-
});it(this,"resetIndex",()=>{f(this,Dt).rawRecords.forEach((C,t)=>{C.__ng.ii=t,C.__ng.rowidx=t,C.__ng.rowidx1=t}),this.getValidData().forEach((C,t)=>{C.__ng.i=t,C.__ng.rowidx=t}),f(this,an).call(this)});it(this,"resetRecords",()=>{tt(this,Tr,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted)),tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng._[H.ROW.PIN]&&!C.__ng._[H.ROW.COLLAPSE]&&!C.__ng.filtered&&C.__ng.visible&&C.__ng.paging)),this.resetIndex()});Y(this,Uo,C=>{Array.isArray(C)||(C=[C]);var t=[];return C.forEach(l=>{var c={v:[]};for(const o of f(this,Ve).fields.get())c.v.push(H.nvl(l[o],""));t.push(c)}),t});it(this,"exprFunction",C=>{let t="...args",l="let [data, currow] = args; currow = Number(currow); return "+C+";";return new Function(t,l)});it(this,"__ng",C=>{var t=this.getValidData();if(t.length==0)return null;try{return t[C].__ng}catch(l){console.error(l,t,C)}});it(this,"getValidData",()=>(f(this,Pe).length==0&&tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng._[H.ROW.PIN]&&!C.__ng._[H.ROW.COLLAPSE]&&C.__ng._[H.ROW.VISIBLE]&&!C.__ng.filtered&&C.__ng.visible&&C.__ng.paging)),f(this,Pe)));it(this,"getValidDataNF",()=>(f(this,Tr).length==0&&tt(this,Tr,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted)),f(this,Tr)));it(this,"conv",C=>{if(H.isNull(C))return C;if(Array.isArray(C)){var t=[];for(const r of C){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=C,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"conv2",C=>{if(H.isNull(C))return C;if(Array.isArray(C)){var t=[];for(const r of C){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=C,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"changeRowState",(C,t,l)=>{const c=o=>{[H.ROW_STATE.EMPTY,H.ROW_STATE.NORMAL].includes(C)&&(o.__ng.o={}),o.__ng.rowState=C};C||(C=H.ROW_STATE.EMPTY),!t&&!l&&(t=0,l=this.count()-1),t||(t=0),l||(l=t),l>=this.count()&&(l=this.count()-1),f(this,Pe).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),f(this,Tr).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.getValidDataNF().forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.onRowStateChanged(),f(this,Dt).viewRecords.reset()});it(this,"getCheckedData",C=>this.get().filter(t=>t.__ng.c[C]==!0));it(this,"search",(C,t)=>this.get().filter(l=>l[C]==t));Y(this,Vo,(C,t,l,c)=>{if(l==c)return;const o=new CustomEvent(H.EVENT.DATA_CHANGED,{bubbles:!0,detail:{}});o.row=C,o.bind=t,o.oldvalue=l,o.value=c,o.data=this.get(C),f(this,Dt).owner.dispatchEvent(o)});it(this,"add",(C,t)=>{C==null&&(C={}),t==null&&(t=!0);const l=f(this,Uo).call(this,C);f(this,Dt).rawRecords=f(this,Dt).rawRecords.concat(f(this,zo).call(this,l));const c=f(this,Dt).rawRecords.map(r=>r.__ng._[H.ROW.ORIGIN_ORDER]);if(c.length>0){const r=c.reduce(function(n,s){return n>s?n:s});f(this,Dt).rawRecords.forEach((n,s)=>{n.__ng._[H.ROW.ORIGIN_ORDER]<0&&(n.__ng._[H.ROW.ORIGIN_ORDER]=r+1+s)})}this.resetRecords();const o=this.count()-1;return t||this.changeRowState(H.ROW_STATE.EMPTY,o-l.length+1,o),f(this,Dt).viewRecords.reset(),o});it(this,"insert",(C,t,l)=>{C==null&&(C={}),t==null&&(t=0),l==null&&(l=!0);var c=f(this,Uo).call(this,C);const o=f(this,Dt).rawRecords[t].__ng._[H.ROW.ORIGIN_ORDER];return f(this,Dt).rawRecords.filter(r=>r.__ng._[H.ROW.ORIGIN_ORDER]>=o).forEach(r=>{r.__ng._[H.ROW.ORIGIN_ORDER]+=c.length}),c=f(this,zo).call(this,c),c.forEach((r,n)=>{r.__ng._[H.ROW.ORIGIN_ORDER]=o+n}),f(this,Dt).rawRecords.splice(t,0,...c),this.resetRecords(),l||this.changeRowState(H.ROW_STATE.EMPTY,t,t+c.length-1),f(this,Dt).viewRecords.reset(),t});Y(this,wh,C=>{var t=!1;C.sort((l,c)=>c-l).forEach(l=>{f(this,Pe)[l].__ng.rowState==H.ROW_STATE.INSERT?H.removeIf(f(this,Dt).rawRecords,c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid):(f(this,Dt).rawRecords.filter(c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid).map(c=>{c.__ng.deleted=!0,c.__ng.rowState=H.ROW_STATE.DELETE}),t=!0)}),t&&this.onRowStateChanged(),tt(this,Pe,f(this,Dt).rawRecords.filter(l=>!l.__ng.deleted&&!l.__ng.filtered)),tt(this,Tr,f(this,Dt).rawRecords.filter(l=>!l.__ng.deleted)),this.getValidDataNF().forEach((l,c)=>{l.__ng.rowidx=c}),this.getValidData().forEach((l,c)=>{l.__ng.rowidx=c}),f(this,Dt).viewRecords.reset()});it(this,"delete",C=>{var t=[];if(Array.isArray(C))t=C;else if(typeof C>"u"){if(f(this,Dt).owner.row.at<0)throw`invalid ${f(this,Dt).owner.row.at}`;t=[f(this,Dt).owner.row.at]}else if(typeof C=="number"||typeof C=="string")t=[C];else if(typeof C=="object"){const l=f(this,Pe).findIndex(c=>c.__ng._[H.ROW.ID]==C.__ng._[H.ROW.ID]);if(l<0)throw new Error(`${C.__ng._[H.ROW.ID]} not found.`);t=[l]}else throw`invalid ${C}`;f(this,wh).call(this,t)});it(this,"deleteFromId",C=>{var t=this.records();const l=t.findIndex(c=>c.__ng._[H.ROW.ID]==C);if(l<0)throw new Error(`${C} not found.`);this.delete(l)});Y(this,Wo,(C,t,l)=>{if(typeof l>"u")l=C.findIndex(e=>e.__ng._[H.ROW.ID]==t.__ng._[H.ROW.ID]);else if(typeof l=="number"||typeof l=="string")l=parseInt(l);else throw`invalid ${l}`;var c=C[l],o=!1;for(const e in t)if(!["__ng","rowState"].includes(e)){var r=f(this,Ve).fields.indexOf(e);if(!(r<0)){var n=c.v[r],s=t[e];c.v[r]=s,n!=s&&(c.__ng.rowState=H.ROW_STATE.UPDATE,o=!0,f(this,Vo).call(this,l,e,n,s))}}o&&this.onRowStateChanged(),f(this,Dt).owner.refreshData()});it(this,"update",(C,t)=>{f(this,Wo).call(this,f(this,Pe),C,t)});it(this,"setValue",(C,t,l,c)=>{f(this,Xo).call(this,C,t,l,c,!1)});it(this,"setValueNF",(C,t,l,c)=>{f(this,Xo).call(this,C,t,l,c,!0)});Y(this,Xo,(C,t,l,c,o)=>{C=parseInt(C),c==null&&(c=!0);const r=f(this,Ve).fields.indexOf(t);if(!(r<0)){var n=o?this.getValidDataNF()[C]:this.getValidData()[C],s=n.v[r];n.v[r]!=l&&n.__ng.rowState!=H.ROW_STATE.INSERT&&(n.__ng.o.hasOwnProperty(t)||(n.__ng.o[t]=s),c&&(n.__ng.rowState=H.ROW_STATE.UPDATE,this.onRowStateChanged())),n.v[r]=l,f(this,Dt).owner.refreshData(C),f(this,Vo).call(this,C,t,s,l)}});it(this,"setRecord",(C,t,l,c)=>{f(this,ln).call(this,this.getValidData(),C,t,l,c,!1)});it(this,"setRecordNF",(C,t,l,c)=>{f(this,ln).call(this,this.getValidDataNF(),C,t,l,c,!0)});Y(this,ln,(C,t,l,c,o)=>{t=parseInt(t),l=parseInt(l),o==null&&(o=!0);var r=C[t];r.v[l],r.v[l]!=c&&r.__ng.rowState!=H.ROW_STATE.INSERT&&o&&(r.__ng.rowState=H.ROW_STATE.UPDATE),r.v[l]=c});it(this,"getChangedData",C=>C?this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==C)):{insert:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT)),update:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.UPDATE)),delete:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.DELETE))});it(this,"isChanged",()=>f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT||t.__ng.rowState==H.ROW_STATE.UPDATE||t.__ng.rowState==H.ROW_STATE.DELETE).length>0);Y(this,hn,(C,t,l)=>{if(!(!C||C.length<=0)){if(H.isNull(t))return this.conv2(C);if(t<0||t>=C.length)throw`invalid row : ${t}`;if(l!=null){var c=f(this,Ve).fields.indexOf(l);return c>=0?C[t].v[c]:null}var o=t==null?C:C[t];return this.conv(o)}});it(this,"get",(C,t)=>f(this,hn).call(this,this.getValidData(),C,t));it(this,"getNF",(C,t)=>f(this,hn).call(this,this.getValidDataNF(),C,t));it(this,"records",C=>H.isNull(C)?this.getValidData():this.getValidData(C));it(this,"recordsNF",C=>H.isNull(C)?this.getValidDataNF():this.getValidDataNF(C));it(this,"getRow",C=>this.getValidData()[C]);it(this,"getRowNF",C=>this.getValidDataNF()[C]);Y(this,Yo,(C,t)=>{var l=f(this,Ve).fields.indexOf(t);return l<0?[]:C.map(c=>c.v[l])});it(this,"getMap",C=>f(this,Yo).call(this,this.getValidData(),C));it(this,"getMapNF",C=>f(this,Yo).call(this,this.getValidDataNF(),C));it(this,"findIndex",C=>f(this,Go).call(this,this.getValidData(),C));it(this,"findIndexNF",C=>f(this,Go).call(this,this.getValidDataNF(),C));Y(this,Go,function(C,t){return this.conv2(C).findIndex(t)});it(this,"findIndex_1",C=>f(this,Ko).call(this,this.getValidData(),C));it(this,"findIndexNF_1",C=>f(this,Ko).call(this,this.getValidDataNF(),C));Y(this,Ko,function(C,t){let l=0,c=C.length-1,o;for(;l<=c;){if(o=parseInt((l+c)/2),t===C[o].__ng._[H.ROW.INDEX])return o;t<C[o].__ng._[H.ROW.INDEX]?c=o-1:l=o+1}return-1});tt(this,Ve,C),tt(this,Dt,t),tt(this,Pe,[]),tt(this,Tr,[]),tt(this,hi,0),this.all={get:(l,c)=>f(this,hn).call(this,this.recordsNF(),l,c),records:l=>this.recordsNF(l),count:()=>this.recordsNF().length,setRecord:(l,c,o,r)=>f(this,ln).call(this,this.all.records(),l,c,o,r),indexOf:l=>f(this,on).call(this,this.records(),l,this.recordsNF()),update:(l,c)=>f(this,Wo).call(this,this.records(),l,c)},this.total={indexOf:l=>f(this,on).call(this,this.records(),l,f(this,Dt).rawRecords)},this.initialize()}get source(){return this.conv2(f(this,Dt).rawRecords)}set source(C){this.clear(),this.add(C,!1),Br.log("ngData.source",C);const t=()=>{var l,c,o,r;(c=(l=f(this,Dt))==null?void 0:l.owner)!=null&&c.matrix?(r=(o=f(this,Dt))==null?void 0:o.owner)==null||r.matrix.updateCumulativeHeights():setTimeout(t,50)};t()}get nextId(){return++Ru(this,hi)._}get default(){return{rowState:H.ROW_STATE.EMPTY,deleted:!1,filtered:!1,pin:!1,expand:!0,visible:!0,paging:!0,height:f(this,Ls).slice(),o:{},c:{},_:[0,0,0,0,H.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,f(this,Ls).slice(),-1,{},{}]}}clear(){delete f(this,Dt).rawRecords,tt(this,Pe,[]),tt(this,Tr,[]),f(this,Dt).rawRecords=[],f(this,Dt).viewRecords.reset()}}Ve=new WeakMap,Dt=new WeakMap,Pe=new WeakMap,Tr=new WeakMap,hi=new WeakMap,Ls=new WeakMap,on=new WeakMap,zo=new WeakMap,an=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,wh=new WeakMap,Wo=new WeakMap,Xo=new WeakMap,ln=new WeakMap,hn=new WeakMap,Yo=new WeakMap,Go=new WeakMap,Ko=new WeakMap;class hd{constructor(C){this.owner=C,this.row=new ad(this),this.data=new ld(C,this),this.setDataSource=l=>{Br.log(l),this.data&&this.data.reset(),this.pageCnt=25,this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.viewRecords.touch=()=>{this.viewRecords.updateCnt=(this.viewRecords.updateCnt||0)+1},this.viewRecords.rawIndex=0,this.viewRecords.setPageCnt=c=>{this.pageCnt=c},this.viewRecords.reset=()=>{this.owner.view&&this.owner.view.redraw()},this.viewRecords.resetV2=()=>{this.owner.view.redrawV2()},this.data.set(l)},this.getRowState=c=>{var c=parseInt(c);if(!(c>=this.data.count()))return this.data.__ng(c).rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=l=>{this.row.at=l},this.pageUp=()=>{if(!this.owner.isFirstPage){var l=$(".ng-container-body",this.owner.body).height()-($(".ng-container-body thead",this.owner.body).height()||0)-($(".ng-container-body tfoot",this.owner.body).height()||0);l-=$(".ng-container-body tbody.fixed",this.owner.body).height();for(var c=0,o=this.viewRecords.rawIndex;c<l;){o--;for(var r=0;r<this.owner.template.length;r++){var n=parseInt(o*this.owner.template.length+r);c+=this.owner.matrix.getHeight(n)}}return this.scrollTo_V1(o+1)}},this.pageDown=()=>{if(this.owner.isLastPage||!$("ng-vscrollbar",this.owner.body).is(":visible"))return;const l=parseInt(Array.from(this.owner.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)")).pop().dataset.row);return this.scrollTo_V1(l)},this.scrollTo_V1=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.reset(),!(l<=0||l>=this.rawRecords.length-1)),this.scrollToV2=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.resetV2(),!(l<=0||l>=this.rawRecords.length-1)),this.exprFunction=l=>{l=l.replaceAll("ninegrid.ROW.ORDER",H.ROW.ORDER);let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.exprFunction2=l=>{this.owner.fields.get().forEach(r=>{const n=this.owner.fields.indexOf(r);l=l.replaceAll(`data.${r}`,`data.v[${n}]`)});let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.getColumn=(l,c)=>this.data.get(l,c),this.setColumn=(l,c,o)=>{l=parseInt(l),this.data.get(l)[c]!=o&&this.data.get(l).__ng.rowState!=H.ROW_STATE.INSERT&&(this.data.get(l).__ng.rowState=H.ROW_STATE.UPDATE,this.data.onRowStateChanged()),this.setColumnSilent(l,c,o)},this.setColumnSilent=(l,c,o)=>{this.data.set(l,c,o)},this.setDataSource([]);for(var t in this.row)["first","last","count","add","insert","move","delete"].includes(t)||(this.data[t]=this.row[t])}}class cd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const C=this.getAttribute("type")||"sphere",t=this.getAttribute("size")||this.getAttribute("width")||this.getAttribute("height")||"8",l=this.getAttribute("width")||this.getAttribute("size")||"8",c=this.getAttribute("height")||this.getAttribute("size")||"8",o=this.getAttribute("color")||"gray";var r="";switch(C){case"sphere":r=`<div class="ng-expand-icon-sphere" style="width: ${t}px; height: ${t}px; background: radial-gradient(circle farthest-corner at 33% 33%, white 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%);" />`;break;case"circle":var n=Number(t)/2,s=this.getAttribute("stroke")||"#666",e=Number(this.getAttribute("stroke-width")||0),i=n+e,u=n+e;r=`
|
|
215
|
+
`,f(this,ch).call(this)}}$o=new WeakMap,Be=new WeakMap,$s=new WeakMap,ai=new WeakMap,tn=new WeakMap,ch=new WeakMap,Lo=new WeakMap,uh=new WeakMap,Po=new WeakMap,en=new WeakMap,cu=new WeakMap,dh=new WeakMap,fh=new WeakMap,customElements.get("ng-combo")||customElements.define("ng-combo",ed),customElements.get("ng-combo-panel")||customElements.define("ng-combo-panel",rd);class sd{constructor(C){Y(this,rn);Y(this,Do);Y(this,sn);Y(this,li);Y(this,nn);Y(this,Kr);it(this,"openMenu",(C,t)=>{var l=$(f(this,Kr)).css("font"),c=150;for(const o of f(this,sn))c=Math.max(c,H.measureTextSize(o.name,l).width+60);$(f(this,Kr)).css({width:c,top:t,left:C}),f(this,Kr).open(),f(this,li)&&f(this,li).show&&f(this,li).show.call(this,{source:f(this,Do)})});Y(this,ph,C=>{tt(this,sn,f(this,Bo).call(this,C.items,0)),tt(this,li,C.events),tt(this,Kr,$(`<ng-context-menu-panel id="${C.id}"></ng-context-menu-panel>`)[0]),$(f(this,rn).shadowRoot).append($(f(this,Kr)).hide()),f(this,Kr).init(f(this,sn)),$("li",f(this,Kr)).on("mousedown",t=>{C.callback&&(t.menuId=t.currentTarget.getAttribute("menu-id"),t.source=f(this,Do),C.callback(t)),$("ng-context-menu-panel",f(this,rn).shadowRoot).hide()})});Y(this,Bo,(C,t)=>{tt(this,nn,Math.max(t,f(this,nn))+1),C=f(this,mh).call(this,C);for(const l of C)l.level=t,l.hasOwnProperty("items")&&(l.items=f(this,Bo).call(this,l.items,t+1));return C});Y(this,mh,C=>{if(Array.isArray(C))return C;var t=[];for(const c in C){var l=C[c];l.menuId=c,t.push(l)}return t});tt(this,nn,0),tt(this,rn,C.owner),f(this,ph).call(this,C)}}rn=new WeakMap,Do=new WeakMap,sn=new WeakMap,li=new WeakMap,nn=new WeakMap,Kr=new WeakMap,ph=new WeakMap,Bo=new WeakMap,mh=new WeakMap;class id extends HTMLElement{constructor(){super();it(this,"init",t=>{var l=$("ul",this);$("li",l).remove(),f(this,Fo).call(this,l,t),$("li",this).on("mouseover",f(this,gh)),$("li",this).on("mouseout",c=>{H.j.querySelectorAll(c.currentTarget).removeClass("visible")})});it(this,"open",()=>{$(this).show()});Y(this,Fo,(t,l)=>{for(const n of l){var c=(n.hasOwnProperty("className")?n.className:"")+(n.hasOwnProperty("items")?" submenu":""),o=$(`<li menu-id='${n.menuId}' id="${n.name}" class="${c.trim()}"><span>${n.name}</span></li>`);if(t.append(o),n.hasOwnProperty("items")){var r=$("<ul></ul>");o.append(r),f(this,Fo).call(this,r,n.items)}}});Y(this,gh,t=>{H.j.querySelectorAll(t.currentTarget).addClass("visible");var l=$(this).css("font"),c=150;$("ul > li:visible > span",t.currentTarget).each((o,r)=>{c=Math.max(c,H.measureTextSize($(r).text(),l).width+60)}),$("ul",t.currentTarget).eq(0).css({width:c,top:-9,left:$(t.currentTarget.closest("ul")).width()-8,"z-index":Number($(this).css("z-index"))+1})})}connectedCallback(){this.innerHTML="<ul></ul>"}}Fo=new WeakMap,gh=new WeakMap,customElements.get("ng-context-menu-panel")||customElements.define("ng-context-menu-panel",id);class nd{constructor(C){Y(this,Ur);Y(this,qo,()=>{$(".ng-table tbody",f(this,Ur).shadowRoot).on("click","th,td",f(this,bh)),$(".ng-table thead",f(this,Ur).shadowRoot).on("click","th,td",f(this,yh)),$(".ng-table tfoot",f(this,Ur).shadowRoot).on("click","th,td",f(this,vh))});Y(this,bh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.CELL_CLICK:H.EVENT.CELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,o.row=l.dataset.row,o.subrow=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),o.bind=l.dataset.bind,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});Y(this,yh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.HEADCELL_CLICK:H.EVENT.HEADCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});Y(this,vh,C=>{if(![1,2].includes(C.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=C.target.closest("th,td"),c=C.detail==1?H.EVENT.FOOTCELL_CLICK:H.EVENT.FOOTCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,C,t),f(this,Ur).dispatchEvent(o)});tt(this,Ur,C),f(this,qo).call(this),f(this,Ur).addEventListener(H.EVENT.LAYOUT_CHANGED,t=>{f(this,qo).call(this)})}}Ur=new WeakMap,qo=new WeakMap,bh=new WeakMap,yh=new WeakMap,vh=new WeakMap;class od extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const Sr=new od;class ad{constructor(C){Y(this,Zr);Y(this,Ho);Y(this,us);it(this,"count",()=>f(this,Zr).rawRecords.length);it(this,"has",C=>f(this,Zr).data.filter(C).length>0);it(this,"first",C=>(f(this,Zr).data.first(C).__ng||{rowidx:-1}).rowidx);it(this,"last",C=>(f(this,Zr).data.last(C).__ng||{rowidx:-1}).rowidx);tt(this,Zr,C),tt(this,Ho,-1),tt(this,us,-1)}get at(){return f(this,us)}set at(C){tt(this,Ho,f(this,us)),tt(this,us,parseInt(C)),f(this,Zr).owner.body.querySelector(`tbody.bindable tr[data-row="${f(this,us)}"]`)||setTimeout(()=>{f(this,Zr).owner.scrollTo_V1(f(this,us))})}}Zr=new WeakMap,Ho=new WeakMap,us=new WeakMap;class ld{constructor(C,t){Y(this,Ve);Y(this,Dt);Y(this,Pe);Y(this,Rr);Y(this,hi);Y(this,Ls);it(this,"initialize",()=>{tt(this,Ls,[]),$(f(this,Ve).template).each((C,t)=>{f(this,Ls).push($(t).height())}),(f(this,Dt).rawRecords||[]).forEach(C=>{C.__ng.height=f(this,Ls).slice()})});it(this,"set",C=>{Sr.log("ngData.set"),this.clear(),this.add(C,!1);const t=()=>{var l,c,o,r;(c=(l=f(this,Dt))==null?void 0:l.owner)!=null&&c.matrix?(r=(o=f(this,Dt))==null?void 0:o.owner)==null||r.matrix.updateCumulativeHeights():setTimeout(t,50)};t()});it(this,"assign",C=>{this.source=C;for(var t=0;t<C.length;t++)f(this,Pe)[t].__ng._[H.ROW.ID]=C[t].__ng._[H.ROW.ID],tt(this,hi,Math.max(f(this,hi),C[t].__ng.rowid))});it(this,"getId",C=>C.__ng._[H.ROW.ID]);it(this,"reset",()=>{tt(this,Pe,[]),tt(this,Rr,[])});it(this,"refresh",()=>{f(this,Dt).viewRecords.reset()});it(this,"clearFilter",()=>(f(this,Dt).rawRecords.map(C=>{C.__ng.filtered=!1}),tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng.filtered)),f(this,Pe)));it(this,"refreshFilter",()=>(tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng.filtered)),f(this,an).call(this),f(this,Pe)));it(this,"setFilter",C=>{f(this,Ve).filtering.on();let t={};if(Array.isArray(C))for(let c in C[0])console.log(`::::::${c}::::::`),t[c]=Array.from(new Set(C.map(o=>o[c])));else t=C;this.clearFilter();for(let c in t){const o=t[c],r=f(this,Dt).owner.fields.indexOf(c);let n=!1;for(let s of this.getValidData())if(s.v[r]!=null){n=typeof s.v[r]=="number";break}if(n)for(var l=0;l<o.length;l++)o[l]=Number(o[l]);this.getValidData().filter(s=>o.nineBinarySearch(s.v[r]||"")<0).map(s=>{s.__ng.filtered=!0})}this.refreshFilter(),f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(c=>{c.filterOptions.forEach(o=>{o.data=[]})}),Object.entries(t).forEach(([c,o])=>{f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(r=>{let n=r.filterOptions;n.forEach(s=>{s.colnm===c&&(s.data=o)}),r.filterOptions=n})}),f(this,Dt).owner.scrollTo_V1(0),f(this,Dt).owner.paging.reset()});it(this,"indexOf",C=>f(this,on).call(this,this.recordsNF(),C,this.records()));Y(this,on,(C,t,l)=>{const c=C[t];return l.findIndex(o=>o.__ng._[H.ROW.ID]==c.__ng._[H.ROW.ID])});it(this,"moveRow",(C,t)=>{C!=t&&(H.move(f(this,Dt).rawRecords,this.total.indexOf(C),this.total.indexOf(t)),this.resetRecords(),f(this,Dt).owner.dataManager.viewRecords.reset())});it(this,"filter",C=>f(this,Pe).filter(C));it(this,"max",(C,t)=>{var l=(t?this.filter(t):f(this,Dt).rawRecords).map(c=>c[C]);return l&&l.length>0?l.reduce((c,o)=>c>o?c:o):null});it(this,"min",(C,t)=>{var l=(t?this.filter(t):f(this,Dt).rawRecords).map(c=>c[C]);return l&&l.length>0?l.reduce((c,o)=>c>o?o:c):null});it(this,"first",C=>this.filter(C).first());it(this,"last",C=>this.filter(C).last());it(this,"count",()=>this.getValidData().length);it(this,"countNF",()=>this.getValidDataNF().length);it(this,"onRowStateChanged",()=>{const C=this.getChangedData(),t=$("tbody td[data-bind=rowState]",f(this,Dt).owner.body);if(t.length<=0)return;const l=t.eq(0)[0].dataset.col,c=H.j.querySelectorAll(`thead th[data-col="${l}"]:not(.col-indicator)`,f(this,Dt).owner.body);c.removeClass("deleted").removeClass("added").removeClass("updated"),C.delete.length>0?c.addClass("deleted"):C.insert.length>0?c.addClass("added"):C.update.length>0&&c.addClass("updated"),f(this,Dt).owner.paging.refreshTotal()});Y(this,zo,C=>(Array.isArray(C)||(C=[C]),C.forEach((t,l)=>{t.__ng=this.default,t.__ng.rowid=this.nextId,t.__ng.rowState=H.ROW_STATE.INSERT,t.__ng._[H.ROW.ID]=t.__ng.rowid}),this.onRowStateChanged(),C));it(this,"sort",C=>{f(this,Dt).rawRecords.sort(C),f(this,Rr).sort(C),f(this,Pe).sort(C),f(this,an).call(this),f(this,Dt).owner.refresh()});Y(this,an,()=>{f(this,Dt).rawRecords.forEach((t,l)=>{t.__ng._[H.ROW.INDEX]=l}),f(this,Dt).rawRecords.filter(t=>!t.__ng.deleted&&!t.__ng.filtered&&t.__ng.visible).forEach((t,l)=>{t.__ng._[H.ROW.ORDER]=l+1});const C=f(this,Dt).rawRecords.filter(t=>!t.__ng.deleted&&t.__ng._[H.ROW.PIN]);C.forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=(C.length-l)*-1}),f(this,Pe).forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=l});//!m.__ng.deleted && !m.__ng.pin && !m.__ng._[ninegrid.ROW.PIN] && !m.__ng.filtered && m.__ng.visible && m.__ng.paging;
|
|
216
|
+
});it(this,"resetIndex",()=>{f(this,Dt).rawRecords.forEach((C,t)=>{C.__ng.ii=t,C.__ng.rowidx=t,C.__ng.rowidx1=t}),this.getValidData().forEach((C,t)=>{C.__ng.i=t,C.__ng.rowidx=t}),f(this,an).call(this)});it(this,"resetRecords",()=>{tt(this,Rr,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted)),tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng._[H.ROW.PIN]&&!C.__ng._[H.ROW.COLLAPSE]&&!C.__ng.filtered&&C.__ng.visible&&C.__ng.paging)),this.resetIndex()});Y(this,Uo,C=>{Array.isArray(C)||(C=[C]);var t=[];return C.forEach(l=>{var c={v:[]};for(const o of f(this,Ve).fields.get())c.v.push(H.nvl(l[o],""));t.push(c)}),t});it(this,"exprFunction",C=>{let t="...args",l="let [data, currow] = args; currow = Number(currow); return "+C+";";return new Function(t,l)});it(this,"__ng",C=>{var t=this.getValidData();if(t.length==0)return null;try{return t[C].__ng}catch(l){console.error(l,t,C)}});it(this,"getValidData",()=>(f(this,Pe).length==0&&tt(this,Pe,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted&&!C.__ng._[H.ROW.PIN]&&!C.__ng._[H.ROW.COLLAPSE]&&C.__ng._[H.ROW.VISIBLE]&&!C.__ng.filtered&&C.__ng.visible&&C.__ng.paging)),f(this,Pe)));it(this,"getValidDataNF",()=>(f(this,Rr).length==0&&tt(this,Rr,f(this,Dt).rawRecords.filter(C=>!C.__ng.deleted)),f(this,Rr)));it(this,"conv",C=>{if(H.isNull(C))return C;if(Array.isArray(C)){var t=[];for(const r of C){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=C,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"conv2",C=>{if(H.isNull(C))return C;if(Array.isArray(C)){var t=[];for(const r of C){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=C,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"changeRowState",(C,t,l)=>{const c=o=>{[H.ROW_STATE.EMPTY,H.ROW_STATE.NORMAL].includes(C)&&(o.__ng.o={}),o.__ng.rowState=C};C||(C=H.ROW_STATE.EMPTY),!t&&!l&&(t=0,l=this.count()-1),t||(t=0),l||(l=t),l>=this.count()&&(l=this.count()-1),f(this,Pe).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),f(this,Rr).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.getValidDataNF().forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.onRowStateChanged(),f(this,Dt).viewRecords.reset()});it(this,"getCheckedData",C=>this.get().filter(t=>t.__ng.c[C]==!0));it(this,"search",(C,t)=>this.get().filter(l=>l[C]==t));Y(this,Vo,(C,t,l,c)=>{if(l==c)return;const o=new CustomEvent(H.EVENT.DATA_CHANGED,{bubbles:!0,detail:{}});o.row=C,o.bind=t,o.oldvalue=l,o.value=c,o.data=this.get(C),f(this,Dt).owner.dispatchEvent(o)});it(this,"add",(C,t)=>{C==null&&(C={}),t==null&&(t=!0);const l=f(this,Uo).call(this,C);f(this,Dt).rawRecords=f(this,Dt).rawRecords.concat(f(this,zo).call(this,l));const c=f(this,Dt).rawRecords.map(r=>r.__ng._[H.ROW.ORIGIN_ORDER]);if(c.length>0){const r=c.reduce(function(n,s){return n>s?n:s});f(this,Dt).rawRecords.forEach((n,s)=>{n.__ng._[H.ROW.ORIGIN_ORDER]<0&&(n.__ng._[H.ROW.ORIGIN_ORDER]=r+1+s)})}this.resetRecords();const o=this.count()-1;return t||this.changeRowState(H.ROW_STATE.EMPTY,o-l.length+1,o),f(this,Dt).viewRecords.reset(),o});it(this,"insert",(C,t,l)=>{C==null&&(C={}),t==null&&(t=0),l==null&&(l=!0);var c=f(this,Uo).call(this,C);const o=f(this,Dt).rawRecords[t].__ng._[H.ROW.ORIGIN_ORDER];return f(this,Dt).rawRecords.filter(r=>r.__ng._[H.ROW.ORIGIN_ORDER]>=o).forEach(r=>{r.__ng._[H.ROW.ORIGIN_ORDER]+=c.length}),c=f(this,zo).call(this,c),c.forEach((r,n)=>{r.__ng._[H.ROW.ORIGIN_ORDER]=o+n}),f(this,Dt).rawRecords.splice(t,0,...c),this.resetRecords(),l||this.changeRowState(H.ROW_STATE.EMPTY,t,t+c.length-1),f(this,Dt).viewRecords.reset(),t});Y(this,wh,C=>{var t=!1;C.sort((l,c)=>c-l).forEach(l=>{f(this,Pe)[l].__ng.rowState==H.ROW_STATE.INSERT?H.removeIf(f(this,Dt).rawRecords,c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid):(f(this,Dt).rawRecords.filter(c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid).map(c=>{c.__ng.deleted=!0,c.__ng.rowState=H.ROW_STATE.DELETE}),t=!0)}),t&&this.onRowStateChanged(),tt(this,Pe,f(this,Dt).rawRecords.filter(l=>!l.__ng.deleted&&!l.__ng.filtered)),tt(this,Rr,f(this,Dt).rawRecords.filter(l=>!l.__ng.deleted)),this.getValidDataNF().forEach((l,c)=>{l.__ng.rowidx=c}),this.getValidData().forEach((l,c)=>{l.__ng.rowidx=c}),f(this,Dt).viewRecords.reset()});it(this,"delete",C=>{var t=[];if(Array.isArray(C))t=C;else if(typeof C>"u"){if(f(this,Dt).owner.row.at<0)throw`invalid ${f(this,Dt).owner.row.at}`;t=[f(this,Dt).owner.row.at]}else if(typeof C=="number"||typeof C=="string")t=[C];else if(typeof C=="object"){const l=f(this,Pe).findIndex(c=>c.__ng._[H.ROW.ID]==C.__ng._[H.ROW.ID]);if(l<0)throw new Error(`${C.__ng._[H.ROW.ID]} not found.`);t=[l]}else throw`invalid ${C}`;f(this,wh).call(this,t)});it(this,"deleteFromId",C=>{var t=this.records();const l=t.findIndex(c=>c.__ng._[H.ROW.ID]==C);if(l<0)throw new Error(`${C} not found.`);this.delete(l)});Y(this,Wo,(C,t,l)=>{if(typeof l>"u")l=C.findIndex(e=>e.__ng._[H.ROW.ID]==t.__ng._[H.ROW.ID]);else if(typeof l=="number"||typeof l=="string")l=parseInt(l);else throw`invalid ${l}`;var c=C[l],o=!1;for(const e in t)if(!["__ng","rowState"].includes(e)){var r=f(this,Ve).fields.indexOf(e);if(!(r<0)){var n=c.v[r],s=t[e];c.v[r]=s,n!=s&&(c.__ng.rowState=H.ROW_STATE.UPDATE,o=!0,f(this,Vo).call(this,l,e,n,s))}}o&&this.onRowStateChanged(),f(this,Dt).owner.refreshData()});it(this,"update",(C,t)=>{f(this,Wo).call(this,f(this,Pe),C,t)});it(this,"setValue",(C,t,l,c)=>{f(this,Xo).call(this,C,t,l,c,!1)});it(this,"setValueNF",(C,t,l,c)=>{f(this,Xo).call(this,C,t,l,c,!0)});Y(this,Xo,(C,t,l,c,o)=>{C=parseInt(C),c==null&&(c=!0);const r=f(this,Ve).fields.indexOf(t);if(!(r<0)){var n=o?this.getValidDataNF()[C]:this.getValidData()[C],s=n.v[r];n.v[r]!=l&&n.__ng.rowState!=H.ROW_STATE.INSERT&&(n.__ng.o.hasOwnProperty(t)||(n.__ng.o[t]=s),c&&(n.__ng.rowState=H.ROW_STATE.UPDATE,this.onRowStateChanged())),n.v[r]=l,f(this,Dt).owner.refreshData(C),f(this,Vo).call(this,C,t,s,l)}});it(this,"setRecord",(C,t,l,c)=>{f(this,ln).call(this,this.getValidData(),C,t,l,c,!1)});it(this,"setRecordNF",(C,t,l,c)=>{f(this,ln).call(this,this.getValidDataNF(),C,t,l,c,!0)});Y(this,ln,(C,t,l,c,o)=>{t=parseInt(t),l=parseInt(l),o==null&&(o=!0);var r=C[t];r.v[l],r.v[l]!=c&&r.__ng.rowState!=H.ROW_STATE.INSERT&&o&&(r.__ng.rowState=H.ROW_STATE.UPDATE),r.v[l]=c});it(this,"getChangedData",C=>C?this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==C)):{insert:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT)),update:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.UPDATE)),delete:this.conv2(f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.DELETE))});it(this,"isChanged",()=>f(this,Dt).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT||t.__ng.rowState==H.ROW_STATE.UPDATE||t.__ng.rowState==H.ROW_STATE.DELETE).length>0);Y(this,hn,(C,t,l)=>{if(!(!C||C.length<=0)){if(H.isNull(t))return this.conv2(C);if(t<0||t>=C.length)throw`invalid row : ${t}`;if(l!=null){var c=f(this,Ve).fields.indexOf(l);return c>=0?C[t].v[c]:null}var o=t==null?C:C[t];return this.conv(o)}});it(this,"get",(C,t)=>f(this,hn).call(this,this.getValidData(),C,t));it(this,"getNF",(C,t)=>f(this,hn).call(this,this.getValidDataNF(),C,t));it(this,"records",C=>H.isNull(C)?this.getValidData():this.getValidData(C));it(this,"recordsNF",C=>H.isNull(C)?this.getValidDataNF():this.getValidDataNF(C));it(this,"getRow",C=>this.getValidData()[C]);it(this,"getRowNF",C=>this.getValidDataNF()[C]);Y(this,Yo,(C,t)=>{var l=f(this,Ve).fields.indexOf(t);return l<0?[]:C.map(c=>c.v[l])});it(this,"getMap",C=>f(this,Yo).call(this,this.getValidData(),C));it(this,"getMapNF",C=>f(this,Yo).call(this,this.getValidDataNF(),C));it(this,"findIndex",C=>f(this,Go).call(this,this.getValidData(),C));it(this,"findIndexNF",C=>f(this,Go).call(this,this.getValidDataNF(),C));Y(this,Go,function(C,t){return this.conv2(C).findIndex(t)});it(this,"findIndex_1",C=>f(this,Ko).call(this,this.getValidData(),C));it(this,"findIndexNF_1",C=>f(this,Ko).call(this,this.getValidDataNF(),C));Y(this,Ko,function(C,t){let l=0,c=C.length-1,o;for(;l<=c;){if(o=parseInt((l+c)/2),t===C[o].__ng._[H.ROW.INDEX])return o;t<C[o].__ng._[H.ROW.INDEX]?c=o-1:l=o+1}return-1});tt(this,Ve,C),tt(this,Dt,t),tt(this,Pe,[]),tt(this,Rr,[]),tt(this,hi,0),this.all={get:(l,c)=>f(this,hn).call(this,this.recordsNF(),l,c),records:l=>this.recordsNF(l),count:()=>this.recordsNF().length,setRecord:(l,c,o,r)=>f(this,ln).call(this,this.all.records(),l,c,o,r),indexOf:l=>f(this,on).call(this,this.records(),l,this.recordsNF()),update:(l,c)=>f(this,Wo).call(this,this.records(),l,c)},this.total={indexOf:l=>f(this,on).call(this,this.records(),l,f(this,Dt).rawRecords)},this.initialize()}get source(){return this.conv2(f(this,Dt).rawRecords)}set source(C){this.clear(),this.add(C,!1),Sr.log("ngData.source",C);const t=()=>{var l,c,o,r;(c=(l=f(this,Dt))==null?void 0:l.owner)!=null&&c.matrix?(r=(o=f(this,Dt))==null?void 0:o.owner)==null||r.matrix.updateCumulativeHeights():setTimeout(t,50)};t()}get nextId(){return++Ru(this,hi)._}get default(){return{rowState:H.ROW_STATE.EMPTY,deleted:!1,filtered:!1,pin:!1,expand:!0,visible:!0,paging:!0,height:f(this,Ls).slice(),o:{},c:{},_:[0,0,0,0,H.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,f(this,Ls).slice(),-1,{},{}]}}clear(){delete f(this,Dt).rawRecords,tt(this,Pe,[]),tt(this,Rr,[]),f(this,Dt).rawRecords=[],f(this,Dt).viewRecords.reset()}}Ve=new WeakMap,Dt=new WeakMap,Pe=new WeakMap,Rr=new WeakMap,hi=new WeakMap,Ls=new WeakMap,on=new WeakMap,zo=new WeakMap,an=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,wh=new WeakMap,Wo=new WeakMap,Xo=new WeakMap,ln=new WeakMap,hn=new WeakMap,Yo=new WeakMap,Go=new WeakMap,Ko=new WeakMap;class hd{constructor(C){this.owner=C,this.row=new ad(this),this.data=new ld(C,this),this.setDataSource=l=>{Sr.log(l),this.data&&this.data.reset(),this.pageCnt=25,this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.viewRecords.touch=()=>{this.viewRecords.updateCnt=(this.viewRecords.updateCnt||0)+1},this.viewRecords.rawIndex=0,this.viewRecords.setPageCnt=c=>{this.pageCnt=c},this.viewRecords.reset=()=>{this.owner.view&&this.owner.view.redraw()},this.viewRecords.resetV2=()=>{this.owner.view.redrawV2()},this.data.set(l)},this.getRowState=c=>{var c=parseInt(c);if(!(c>=this.data.count()))return this.data.__ng(c).rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=l=>{this.row.at=l},this.pageUp=()=>{if(!this.owner.isFirstPage){var l=$(".ng-container-body",this.owner.body).height()-($(".ng-container-body thead",this.owner.body).height()||0)-($(".ng-container-body tfoot",this.owner.body).height()||0);l-=$(".ng-container-body tbody.fixed",this.owner.body).height();for(var c=0,o=this.viewRecords.rawIndex;c<l;){o--;for(var r=0;r<this.owner.template.length;r++){var n=parseInt(o*this.owner.template.length+r);c+=this.owner.matrix.getHeight(n)}}return this.scrollTo_V1(o+1)}},this.pageDown=()=>{if(this.owner.isLastPage||!$("ng-vscrollbar",this.owner.body).is(":visible"))return;const l=parseInt(Array.from(this.owner.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)")).pop().dataset.row);return this.scrollTo_V1(l)},this.scrollTo_V1=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.reset(),!(l<=0||l>=this.rawRecords.length-1)),this.scrollToV2=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.resetV2(),!(l<=0||l>=this.rawRecords.length-1)),this.exprFunction=l=>{l=l.replaceAll("ninegrid.ROW.ORDER",H.ROW.ORDER);let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.exprFunction2=l=>{this.owner.fields.get().forEach(r=>{const n=this.owner.fields.indexOf(r);l=l.replaceAll(`data.${r}`,`data.v[${n}]`)});let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.getColumn=(l,c)=>this.data.get(l,c),this.setColumn=(l,c,o)=>{l=parseInt(l),this.data.get(l)[c]!=o&&this.data.get(l).__ng.rowState!=H.ROW_STATE.INSERT&&(this.data.get(l).__ng.rowState=H.ROW_STATE.UPDATE,this.data.onRowStateChanged()),this.setColumnSilent(l,c,o)},this.setColumnSilent=(l,c,o)=>{this.data.set(l,c,o)},this.setDataSource([]);for(var t in this.row)["first","last","count","add","insert","move","delete"].includes(t)||(this.data[t]=this.row[t])}}class cd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const C=this.getAttribute("type")||"sphere",t=this.getAttribute("size")||this.getAttribute("width")||this.getAttribute("height")||"8",l=this.getAttribute("width")||this.getAttribute("size")||"8",c=this.getAttribute("height")||this.getAttribute("size")||"8",o=this.getAttribute("color")||"gray";var r="";switch(C){case"sphere":r=`<div class="ng-expand-icon-sphere" style="width: ${t}px; height: ${t}px; background: radial-gradient(circle farthest-corner at 33% 33%, white 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%);" />`;break;case"circle":var n=Number(t)/2,s=this.getAttribute("stroke")||"#666",e=Number(this.getAttribute("stroke-width")||0),i=n+e,u=n+e;r=`
|
|
217
217
|
<svg class="ng-expand-icon-circle" viewBox="0 0 ${t} ${t}" width="${t}" height="${t}" xmlns="http://www.w3.org/2000/svg">
|
|
218
218
|
<circle fill="${o}" stroke="${s}" stroke-width="${e}" cx="${i}" cy="${u}" r="${n}"/>
|
|
219
219
|
</svg>
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
JSZip uses the library pako released under the MIT license :
|
|
273
273
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
274
274
|
*/(function(h){typeof c=="object"&&l!==void 0?l.exports=h():(typeof window<"u"?window:r!==void 0?r:typeof self<"u"?self:this).JSZip=h()})((function(){return(function h(p,m,d){function b(E,I){if(!m[E]){if(!p[E]){var D=typeof t=="function"&&t;if(!I&&D)return D(E,!0);if(g)return g(E,!0);var z=new Error("Cannot find module '"+E+"'");throw z.code="MODULE_NOT_FOUND",z}var P=m[E]={exports:{}};p[E][0].call(P.exports,(function(B){return b(p[E][1][B]||B)}),P,P.exports,h,p,m,d)}return m[E].exports}for(var g=typeof t=="function"&&t,S=0;S<d.length;S++)b(d[S]);return b})({1:[function(h,p,m){var d=h("./utils"),b=h("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";m.encode=function(S){for(var E,I,D,z,P,B,F,W=[],q=0,A=S.length,M=A,k=d.getTypeOf(S)!=="string";q<S.length;)M=A-q,D=k?(E=S[q++],I=q<A?S[q++]:0,q<A?S[q++]:0):(E=S.charCodeAt(q++),I=q<A?S.charCodeAt(q++):0,q<A?S.charCodeAt(q++):0),z=E>>2,P=(3&E)<<4|I>>4,B=1<M?(15&I)<<2|D>>6:64,F=2<M?63&D:64,W.push(g.charAt(z)+g.charAt(P)+g.charAt(B)+g.charAt(F));return W.join("")},m.decode=function(S){var E,I,D,z,P,B,F=0,W=0,q="data:";if(S.substr(0,q.length)===q)throw new Error("Invalid base64 input, it looks like a data url.");var A,M=3*(S=S.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(S.charAt(S.length-1)===g.charAt(64)&&M--,S.charAt(S.length-2)===g.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=b.uint8array?new Uint8Array(0|M):new Array(0|M);F<S.length;)E=g.indexOf(S.charAt(F++))<<2|(z=g.indexOf(S.charAt(F++)))>>4,I=(15&z)<<4|(P=g.indexOf(S.charAt(F++)))>>2,D=(3&P)<<6|(B=g.indexOf(S.charAt(F++))),A[W++]=E,P!==64&&(A[W++]=I),B!==64&&(A[W++]=D);return A}},{"./support":30,"./utils":32}],2:[function(h,p,m){var d=h("./external"),b=h("./stream/DataWorker"),g=h("./stream/Crc32Probe"),S=h("./stream/DataLengthProbe");function E(I,D,z,P,B){this.compressedSize=I,this.uncompressedSize=D,this.crc32=z,this.compression=P,this.compressedContent=B}E.prototype={getContentWorker:function(){var I=new b(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new S("data_length")),D=this;return I.on("end",(function(){if(this.streamInfo.data_length!==D.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),I},getCompressedWorker:function(){return new b(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},E.createWorkerFrom=function(I,D,z){return I.pipe(new g).pipe(new S("uncompressedSize")).pipe(D.compressWorker(z)).pipe(new S("compressedSize")).withStreamInfo("compression",D)},p.exports=E},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(h,p,m){var d=h("./stream/GenericWorker");m.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},m.DEFLATE=h("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(h,p,m){var d=h("./utils"),b=(function(){for(var g,S=[],E=0;E<256;E++){g=E;for(var I=0;I<8;I++)g=1&g?3988292384^g>>>1:g>>>1;S[E]=g}return S})();p.exports=function(g,S){return g!==void 0&&g.length?d.getTypeOf(g)!=="string"?(function(E,I,D,z){var P=b,B=0+D;E^=-1;for(var F=0;F<B;F++)E=E>>>8^P[255&(E^I[F])];return-1^E})(0|S,g,g.length):(function(E,I,D,z){var P=b,B=0+D;E^=-1;for(var F=0;F<B;F++)E=E>>>8^P[255&(E^I.charCodeAt(F))];return-1^E})(0|S,g,g.length):0}},{"./utils":32}],5:[function(h,p,m){m.base64=!1,m.binary=!1,m.dir=!1,m.createFolders=!0,m.date=null,m.compression=null,m.compressionOptions=null,m.comment=null,m.unixPermissions=null,m.dosPermissions=null},{}],6:[function(h,p,m){var d;d=typeof Promise<"u"?Promise:h("lie"),p.exports={Promise:d}},{lie:37}],7:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",b=h("pako"),g=h("./utils"),S=h("./stream/GenericWorker"),E=d?"uint8array":"array";function I(D,z){S.call(this,"FlateWorker/"+D),this._pako=null,this._pakoAction=D,this._pakoOptions=z,this.meta={}}m.magic="\b\0",g.inherits(I,S),I.prototype.processChunk=function(D){this.meta=D.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(E,D.data),!1)},I.prototype.flush=function(){S.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},I.prototype.cleanUp=function(){S.prototype.cleanUp.call(this),this._pako=null},I.prototype._createPako=function(){this._pako=new b[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var D=this;this._pako.onData=function(z){D.push({data:z,meta:D.meta})}},m.compressWorker=function(D){return new I("Deflate",D)},m.uncompressWorker=function(){return new I("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(h,p,m){function d(P,B){var F,W="";for(F=0;F<B;F++)W+=String.fromCharCode(255&P),P>>>=8;return W}function b(P,B,F,W,q,A){var M,k,y=P.file,w=P.compression,x=A!==E.utf8encode,_=g.transformTo("string",A(y.name)),T=g.transformTo("string",E.utf8encode(y.name)),O=y.comment,j=g.transformTo("string",A(O)),V=g.transformTo("string",E.utf8encode(O)),X=T.length!==y.name.length,J=V.length!==O.length,L="",G="",N="",R=y.dir,U=y.date,K={crc32:0,compressedSize:0,uncompressedSize:0};B&&!F||(K.crc32=P.crc32,K.compressedSize=P.compressedSize,K.uncompressedSize=P.uncompressedSize);var rt=0;B&&(rt|=8),x||!X&&!J||(rt|=2048);var Z=0,et=0;R&&(Z|=16),q==="UNIX"?(et=798,Z|=(function(lt,Q){var ot=lt;return lt||(ot=Q?16893:33204),(65535&ot)<<16})(y.unixPermissions,R)):(et=20,Z|=(function(lt){return 63&(lt||0)})(y.dosPermissions)),M=U.getUTCHours(),M<<=6,M|=U.getUTCMinutes(),M<<=5,M|=U.getUTCSeconds()/2,k=U.getUTCFullYear()-1980,k<<=4,k|=U.getUTCMonth()+1,k<<=5,k|=U.getUTCDate(),X&&(G=d(1,1)+d(I(_),4)+T,L+="up"+d(G.length,2)+G),J&&(N=d(1,1)+d(I(j),4)+V,L+="uc"+d(N.length,2)+N);var ht="";return ht+=`
|
|
275
|
-
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),E=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,E){var I=new b(S.streamFiles,E,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),E=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new E);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,E){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(E)}d.inherits(g,b),g.prototype._bindStream=function(S){var E=this;(this._stream=S).pause(),S.on("data",(function(I){E.push({data:I,meta:{percent:0}})})).on("error",(function(I){E.isPaused?this.generatedError=I:E.error(I)})).on("end",(function(){E.isPaused?E._upstreamEnded=!0:E.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,E){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),E&&E(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),E=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new E(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),E=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===E&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),E=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&E===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,E=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)E=(E<<8)+this.byteAt(S);return this.index+=g,E},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),E=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new E(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var E=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=E+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var E=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){E.dataIsReady=!0,E.data=I,E.max=I&&I.length||0,E.type=d.getTypeOf(I),E.isPaused||E._tickAndRepeat()}),(function(I){E.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,E=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,E);break;case"uint8array":S=this.data.subarray(this.index,E);break;case"array":case"nodebuffer":S=this.data.slice(this.index,E)}return this.index=E,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),E=h("../support"),I=h("../external"),D=null;if(E.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),E=new Array(256),I=0;I<256;I++)E[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}E[254]=E[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=E[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+E[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function E(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:E,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:E,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:E,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:E,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:E},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),E=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=E.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),E=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=E.utf8decode(this.fileName),this.fileCommentStr=E.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:E.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:E.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),E=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof E&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),E.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof E?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var E=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=E=++E%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],E=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===E||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===E?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=E,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),E=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new E,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),E=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(E[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||E[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var E=Array.prototype.slice.call(arguments,1);E.length;){var I=E.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,E){return S.length===E?S:S.subarray?S.subarray(0,E):(S.length=E,S)};var b={arraySet:function(S,E,I,D,z){if(E.subarray&&S.subarray)S.set(E.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=E[I+P]},flattenChunks:function(S){var E,I,D,z,P,B;for(E=D=0,I=S.length;E<I;E++)D+=S[E].length;for(B=new Uint8Array(D),E=z=0,I=S.length;E<I;E++)P=S[E],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,E,I,D,z){for(var P=0;P<D;P++)S[z+P]=E[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),E=0;E<256;E++)S[E]=252<=E?6:248<=E?5:240<=E?4:224<=E?3:192<=E?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var E=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(E=E+b[S++]|0)|0,--D;);E%=65521,I%=65521}return E|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var E=0;E<8;E++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,E){var I=d,D=E+S;b^=-1;for(var z=E;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),E=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=E(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=E(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,E,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,E=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<E&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<E?E-S+5:5-(S-E),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),E=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(E(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;E(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=E(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=E(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=E(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],E=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=E,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,E=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(E);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<E;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,Ft=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,Ce=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,Ft<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=Ce[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)Ft<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<E;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<E;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,E,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,E,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(E=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,E.removeChild(y),y=null},E.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,E=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=E["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=E.Symbol,N=E.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(E,"DataView"),Z=Qt(E,"Map"),et=Qt(E,"Promise"),ht=Qt(E,"Set"),lt=Qt(E,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,me){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=me(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Re(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&Ft(st,pt,tr)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),Ft=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),me=Rt.length;me--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function Ce(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,me,oe,he,Jt){var Ee=Zt(Et),Ae=Zt(Rt),Ie="[object Array]",qe="[object Array]";Ee||(Ie=(Ie=be(Et))==r?s:Ie),Ae||(qe=(qe=be(Rt))==r?s:qe);var ir=Ie==s&&!q(Et),mr=qe==s&&!q(Rt),Gr=Ie==qe;if(Gr&&!ir)return Jt||(Jt=new Ht),Ee||Qe(Et)?je(Et,Rt,me,oe,he,Jt):(function(Te,ye,Js,Ti,Zc,Or,ks){switch(Js){case"[object DataView]":if(Te.byteLength!=ye.byteLength||Te.byteOffset!=ye.byteOffset)return!1;Te=Te.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Te.byteLength!=ye.byteLength||!Ti(new N(Te),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Te,+ye);case"[object Error]":return Te.name==ye.name&&Te.message==ye.message;case"[object RegExp]":case"[object String]":return Te==ye+"";case n:var Qs=A;case e:var $l=2⩔if(Qs||(Qs=M),Te.size!=ye.size&&!$l)return!1;var Jc=ks.get(Te);if(Jc)return Jc==ye;Or|=1,ks.set(Te,ye);var Kn=je(Qs(Te),Qs(ye),Ti,Zc,Or,ks);return ks.delete(Te),Kn;case"[object Symbol]":if(gt)return gt.call(Te)==gt.call(ye)}return!1})(Et,Rt,Ie,me,oe,he,Jt);if(!(2&he)){var Ai=ir&&X.call(Et,"__wrapped__"),Xn=mr&&X.call(Rt,"__wrapped__");if(Ai||Xn){var Yn=Ai?Et.value():Et,Gn=Xn?Rt.value():Rt;return Jt||(Jt=new Ht),me(Yn,Gn,oe,he,Jt)}}return Gr?(Jt||(Jt=new Ht),(function(Te,ye,Js,Ti,Zc,Or){var ks=2&Zc,Qs=tr(Te),$l=Qs.length,Jc=tr(ye).length;if($l!=Jc&&!ks)return!1;for(var Kn=$l;Kn--;){var ti=Qs[Kn];if(!(ks?ti in ye:X.call(ye,ti)))return!1}var Eu=Or.get(Te);if(Eu&&Or.get(ye))return Eu==ye;var Qc=!0;Or.set(Te,ye),Or.set(ye,Te);for(var gu=ks;++Kn<$l;){ti=Qs[Kn];var tu=Te[ti],eu=ye[ti];if(Ti)var Au=ks?Ti(eu,tu,ti,ye,Te,Or):Ti(tu,eu,ti,Te,ye,Or);if(!(Au===void 0?tu===eu||Js(tu,eu,Ti,Zc,Or):Au)){Qc=!1;break}gu||(gu=ti=="constructor")}if(Qc&&!gu){var ru=Te.constructor,su=ye.constructor;ru==su||!("constructor"in Te)||!("constructor"in ye)||typeof ru=="function"&&ru instanceof ru&&typeof su=="function"&&su instanceof su||(Qc=!1)}return Or.delete(Te),Or.delete(ye),Qc})(Et,Rt,me,oe,he,Jt)):!1})(st,pt,Ce,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Me(at(_t),Bt):function(Et){var Rt=(function(me,oe,he){var Jt=me==null?void 0:Pt(me,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(me,oe){return me!=null&&(function(he,Jt,Ee){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ae,Ie=-1,qe=Jt.length;++Ie<qe;){var ir=at(Jt[Ie]);if(!(Ae=he!=null&&Ee(he,ir)))break;he=he[ir]}return Ae||!!(qe=he?he.length:0)&&re(qe)&&Re(ir,qe)&&(Zt(he)||ee(he))})(me,oe,fe)})(Et,_t):Ce(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=tr(Et),me=Rt.length;me--;){var oe=Rt[me],he=Et[oe];Rt[me]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Me(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,me,oe,he){var Jt=oe.length,Ee=Jt;if(Rt==null)return!Ee;for(Rt=Object(Rt);Jt--;){var Ae=oe[Jt];if(Ae[2]?Ae[1]!==Rt[Ae[0]]:!(Ae[0]in Rt))return!1}for(;++Jt<Ee;){var Ie=(Ae=oe[Jt])[0],qe=Rt[Ie],ir=Ae[1];if(Ae[2]){if(qe===void 0&&!(Ie in Rt))return!1}else{var mr=new Ht,Gr;if(!(Gr===void 0?Ce(ir,qe,he,3,mr):Gr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,me=st.length,oe=pt.length;if(me!=oe&&!(Rt&&oe>me))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ee=!0,Ae=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<me;){var Ie=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Ie,Jt,pt,st,Et):_t(Ie,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ee=!1;break}if(Ae){if(!W(pt,(function(mr,Gr){if(!Ae.has(Gr)&&(Ie===mr||wt(Ie,mr,_t,Bt,Et)))return Ae.add(Gr)}))){Ee=!1;break}}else if(Ie!==qe&&!wt(Ie,qe,_t,Bt,Et)){Ee=!1;break}}return Et.delete(st),Et.delete(pt),Ee}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Re(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Me(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var Qe=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function tr(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,E=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=E&&E.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Me(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),Qe=ze?"[object Array]":Yt(ee),tr=($e=$e==r?s:$e)==s,xr=(Qe=Qe==r?s:Qe)==s,st=$e==Qe;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,tr=!1}if(st&&!tr)return re||(re=new It),le||Me(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,me,oe,he,Jt,Ee){switch(me){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ae=z;case e:var Ie=1&oe;if(Ae||(Ae=P),Et.size!=Rt.size&&!Ie)return!1;var qe=Ee.get(Et);if(qe)return qe==Rt;oe|=2,Ee.set(Et,Rt);var ir=$t(Ae(Et),Ae(Rt),oe,he,Jt,Ee);return Ee.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=tr&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,me,oe,he,Jt){var Ee=1&me,Ae=Ft(Et),Ie=Ae.length,qe=Ft(Rt).length;if(Ie!=qe&&!Ee)return!1;for(var ir=Ie;ir--;){var mr=Ae[ir];if(!(Ee?mr in Rt:w.call(Rt,mr)))return!1}var Gr=Jt.get(Et);if(Gr&&Jt.get(Rt))return Gr==Rt;var Ai=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Xn=Ee;++ir<Ie;){mr=Ae[ir];var Yn=Et[mr],Gn=Rt[mr];if(oe)var Te=Ee?oe(Gn,Yn,mr,Rt,Et,Jt):oe(Yn,Gn,mr,Et,Rt,Jt);if(!(Te===void 0?Yn===Gn||he(Yn,Gn,me,oe,Jt):Te)){Ai=!1;break}Xn||(Xn=mr=="constructor")}if(Ai&&!Xn){var ye=Et.constructor,Js=Rt.constructor;ye==Js||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Js=="function"&&Js instanceof Js||(Ai=!1)}return Jt.delete(Et),Jt.delete(Rt),Ai})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],Qe=dt[re];if(Tt)var tr=ee?Tt(Qe,$e,re,dt,at,Mt):Tt($e,Qe,re,at,dt,Mt);if(tr!==void 0){if(tr)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==Qe&&!Kt($e,Qe,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function Ft(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,Ce)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var Ce=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Re(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Me=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Re(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Re(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var E=u.call(d);return S&&(b?d[h]=g:delete d[h]),E})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",E=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+E.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return E.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,E,I){return i(m+(d&b|~d&g)+S+E|0,I)+d|0}function a(m,d,b,g,S,E,I){return i(m+(d&g|b&~g)+S+E|0,I)+d|0}function h(m,d,b,g,S,E,I){return i(m+(d^b^g)+S+E|0,I)+d|0}function p(m,d,b,g,S,E,I){return i(m+(b^(d|~g))+S+E|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,E=this._d;b=u(b,g,S,E,m[0],3614090360,7),E=u(E,b,g,S,m[1],3905402710,12),S=u(S,E,b,g,m[2],606105819,17),g=u(g,S,E,b,m[3],3250441966,22),b=u(b,g,S,E,m[4],4118548399,7),E=u(E,b,g,S,m[5],1200080426,12),S=u(S,E,b,g,m[6],2821735955,17),g=u(g,S,E,b,m[7],4249261313,22),b=u(b,g,S,E,m[8],1770035416,7),E=u(E,b,g,S,m[9],2336552879,12),S=u(S,E,b,g,m[10],4294925233,17),g=u(g,S,E,b,m[11],2304563134,22),b=u(b,g,S,E,m[12],1804603682,7),E=u(E,b,g,S,m[13],4254626195,12),S=u(S,E,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,E,b,m[15],1236535329,22),S,E,m[1],4129170786,5),E=a(E,b,g,S,m[6],3225465664,9),S=a(S,E,b,g,m[11],643717713,14),g=a(g,S,E,b,m[0],3921069994,20),b=a(b,g,S,E,m[5],3593408605,5),E=a(E,b,g,S,m[10],38016083,9),S=a(S,E,b,g,m[15],3634488961,14),g=a(g,S,E,b,m[4],3889429448,20),b=a(b,g,S,E,m[9],568446438,5),E=a(E,b,g,S,m[14],3275163606,9),S=a(S,E,b,g,m[3],4107603335,14),g=a(g,S,E,b,m[8],1163531501,20),b=a(b,g,S,E,m[13],2850285829,5),E=a(E,b,g,S,m[2],4243563512,9),S=a(S,E,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,E,b,m[12],2368359562,20),S,E,m[5],4294588738,4),E=h(E,b,g,S,m[8],2272392833,11),S=h(S,E,b,g,m[11],1839030562,16),g=h(g,S,E,b,m[14],4259657740,23),b=h(b,g,S,E,m[1],2763975236,4),E=h(E,b,g,S,m[4],1272893353,11),S=h(S,E,b,g,m[7],4139469664,16),g=h(g,S,E,b,m[10],3200236656,23),b=h(b,g,S,E,m[13],681279174,4),E=h(E,b,g,S,m[0],3936430074,11),S=h(S,E,b,g,m[3],3572445317,16),g=h(g,S,E,b,m[6],76029189,23),b=h(b,g,S,E,m[9],3654602809,4),E=h(E,b,g,S,m[12],3873151461,11),S=h(S,E,b,g,m[15],530742520,16),b=p(b,g=h(g,S,E,b,m[2],3299628645,23),S,E,m[0],4096336452,6),E=p(E,b,g,S,m[7],1126891415,10),S=p(S,E,b,g,m[14],2878612391,15),g=p(g,S,E,b,m[5],4237533241,21),b=p(b,g,S,E,m[12],1700485571,6),E=p(E,b,g,S,m[3],2399980690,10),S=p(S,E,b,g,m[10],4293915773,15),g=p(g,S,E,b,m[1],2240044497,21),b=p(b,g,S,E,m[8],1873313359,6),E=p(E,b,g,S,m[15],4264355552,10),S=p(S,E,b,g,m[6],2734768916,15),g=p(g,S,E,b,m[13],1309151649,21),b=p(b,g,S,E,m[4],4149444226,6),E=p(E,b,g,S,m[11],3174756917,10),S=p(S,E,b,g,m[2],718787259,15),g=p(g,S,E,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+E|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var E=1;E<m;E++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(E===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var E=1;E<p;E++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(E===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,E=[],I=e.createDecipheriv(d,S,b);E.push(I.update(g)),E.push(I.final()),h=i.concat(E)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,E){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(E,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,E,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:E,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,E,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(E,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,E,I,P):u(g,S,E,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,E,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var E=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)E[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);E.copy(z,0,0,S),this.ipad1=z,this.ipad2=E,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var E=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=E.run(D,E.ipad1),q=W,A=1;A<b;A++){q=E.run(q,E.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var E=a.length;E;){for(u=a,a=[];++p<E;)u&&u[p].run();p=-1,E=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,E){this.fun=S,this.array=E}function g(){}n.nextTick=function(S){var E=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)E[I-1]=arguments[I];a.push(new b(S,E)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var E=a.alloc(S-b.length);if(b=a.concat([E,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(E,I){var D=E.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(E,I,D){var z,P=I.length,B=E.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
275
|
+
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),E=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,E){var I=new b(S.streamFiles,E,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),E=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new E);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,E){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(E)}d.inherits(g,b),g.prototype._bindStream=function(S){var E=this;(this._stream=S).pause(),S.on("data",(function(I){E.push({data:I,meta:{percent:0}})})).on("error",(function(I){E.isPaused?this.generatedError=I:E.error(I)})).on("end",(function(){E.isPaused?E._upstreamEnded=!0:E.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,E){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),E&&E(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),E=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new E(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),E=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===E&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),E=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&E===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,E=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)E=(E<<8)+this.byteAt(S);return this.index+=g,E},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),E=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new E(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var E=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=E+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var E=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){E.dataIsReady=!0,E.data=I,E.max=I&&I.length||0,E.type=d.getTypeOf(I),E.isPaused||E._tickAndRepeat()}),(function(I){E.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,E=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,E);break;case"uint8array":S=this.data.subarray(this.index,E);break;case"array":case"nodebuffer":S=this.data.slice(this.index,E)}return this.index=E,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),E=h("../support"),I=h("../external"),D=null;if(E.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),E=new Array(256),I=0;I<256;I++)E[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}E[254]=E[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=E[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+E[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function E(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:E,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:E,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:E,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:E,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:E},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),E=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=E.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),E=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=E.utf8decode(this.fileName),this.fileCommentStr=E.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:E.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:E.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),E=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof E&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),E.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof E?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var E=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=E=++E%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],E=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===E||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===E?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=E,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),E=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new E,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),E=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(E[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||E[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var E=Array.prototype.slice.call(arguments,1);E.length;){var I=E.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,E){return S.length===E?S:S.subarray?S.subarray(0,E):(S.length=E,S)};var b={arraySet:function(S,E,I,D,z){if(E.subarray&&S.subarray)S.set(E.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=E[I+P]},flattenChunks:function(S){var E,I,D,z,P,B;for(E=D=0,I=S.length;E<I;E++)D+=S[E].length;for(B=new Uint8Array(D),E=z=0,I=S.length;E<I;E++)P=S[E],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,E,I,D,z){for(var P=0;P<D;P++)S[z+P]=E[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),E=0;E<256;E++)S[E]=252<=E?6:248<=E?5:240<=E?4:224<=E?3:192<=E?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var E=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(E=E+b[S++]|0)|0,--D;);E%=65521,I%=65521}return E|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var E=0;E<8;E++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,E){var I=d,D=E+S;b^=-1;for(var z=E;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),E=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=E(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=E(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=E(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,E,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,E=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<E&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<E?E-S+5:5-(S-E),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),E=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(E(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;E(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=E(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=E(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=E(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],E=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=E,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,E=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(E);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<E;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,Ft=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,Ce=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,Ft<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=Ce[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)Ft<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<E;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<E;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,E,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,E,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(E=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,E.removeChild(y),y=null},E.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,E=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=E["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=E.Symbol,N=E.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(E,"DataView"),Z=Qt(E,"Map"),et=Qt(E,"Promise"),ht=Qt(E,"Set"),lt=Qt(E,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,me){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=me(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Re(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&Ft(st,pt,tr)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),Ft=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),me=Rt.length;me--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function Ce(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,me,oe,he,Jt){var Ee=Zt(Et),Ae=Zt(Rt),Ie="[object Array]",qe="[object Array]";Ee||(Ie=(Ie=be(Et))==r?s:Ie),Ae||(qe=(qe=be(Rt))==r?s:qe);var ir=Ie==s&&!q(Et),mr=qe==s&&!q(Rt),Gr=Ie==qe;if(Gr&&!ir)return Jt||(Jt=new Ht),Ee||Qe(Et)?je(Et,Rt,me,oe,he,Jt):(function(Te,ye,Js,Ti,Zc,jr,ks){switch(Js){case"[object DataView]":if(Te.byteLength!=ye.byteLength||Te.byteOffset!=ye.byteOffset)return!1;Te=Te.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Te.byteLength!=ye.byteLength||!Ti(new N(Te),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Te,+ye);case"[object Error]":return Te.name==ye.name&&Te.message==ye.message;case"[object RegExp]":case"[object String]":return Te==ye+"";case n:var Qs=A;case e:var $l=2&jr;if(Qs||(Qs=M),Te.size!=ye.size&&!$l)return!1;var Jc=ks.get(Te);if(Jc)return Jc==ye;jr|=1,ks.set(Te,ye);var Kn=je(Qs(Te),Qs(ye),Ti,Zc,jr,ks);return ks.delete(Te),Kn;case"[object Symbol]":if(gt)return gt.call(Te)==gt.call(ye)}return!1})(Et,Rt,Ie,me,oe,he,Jt);if(!(2&he)){var Ai=ir&&X.call(Et,"__wrapped__"),Xn=mr&&X.call(Rt,"__wrapped__");if(Ai||Xn){var Yn=Ai?Et.value():Et,Gn=Xn?Rt.value():Rt;return Jt||(Jt=new Ht),me(Yn,Gn,oe,he,Jt)}}return Gr?(Jt||(Jt=new Ht),(function(Te,ye,Js,Ti,Zc,jr){var ks=2&Zc,Qs=tr(Te),$l=Qs.length,Jc=tr(ye).length;if($l!=Jc&&!ks)return!1;for(var Kn=$l;Kn--;){var ti=Qs[Kn];if(!(ks?ti in ye:X.call(ye,ti)))return!1}var Eu=jr.get(Te);if(Eu&&jr.get(ye))return Eu==ye;var Qc=!0;jr.set(Te,ye),jr.set(ye,Te);for(var gu=ks;++Kn<$l;){ti=Qs[Kn];var tu=Te[ti],eu=ye[ti];if(Ti)var Au=ks?Ti(eu,tu,ti,ye,Te,jr):Ti(tu,eu,ti,Te,ye,jr);if(!(Au===void 0?tu===eu||Js(tu,eu,Ti,Zc,jr):Au)){Qc=!1;break}gu||(gu=ti=="constructor")}if(Qc&&!gu){var ru=Te.constructor,su=ye.constructor;ru==su||!("constructor"in Te)||!("constructor"in ye)||typeof ru=="function"&&ru instanceof ru&&typeof su=="function"&&su instanceof su||(Qc=!1)}return jr.delete(Te),jr.delete(ye),Qc})(Et,Rt,me,oe,he,Jt)):!1})(st,pt,Ce,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Me(at(_t),Bt):function(Et){var Rt=(function(me,oe,he){var Jt=me==null?void 0:Pt(me,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(me,oe){return me!=null&&(function(he,Jt,Ee){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ae,Ie=-1,qe=Jt.length;++Ie<qe;){var ir=at(Jt[Ie]);if(!(Ae=he!=null&&Ee(he,ir)))break;he=he[ir]}return Ae||!!(qe=he?he.length:0)&&re(qe)&&Re(ir,qe)&&(Zt(he)||ee(he))})(me,oe,fe)})(Et,_t):Ce(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=tr(Et),me=Rt.length;me--;){var oe=Rt[me],he=Et[oe];Rt[me]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Me(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,me,oe,he){var Jt=oe.length,Ee=Jt;if(Rt==null)return!Ee;for(Rt=Object(Rt);Jt--;){var Ae=oe[Jt];if(Ae[2]?Ae[1]!==Rt[Ae[0]]:!(Ae[0]in Rt))return!1}for(;++Jt<Ee;){var Ie=(Ae=oe[Jt])[0],qe=Rt[Ie],ir=Ae[1];if(Ae[2]){if(qe===void 0&&!(Ie in Rt))return!1}else{var mr=new Ht,Gr;if(!(Gr===void 0?Ce(ir,qe,he,3,mr):Gr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,me=st.length,oe=pt.length;if(me!=oe&&!(Rt&&oe>me))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ee=!0,Ae=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<me;){var Ie=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Ie,Jt,pt,st,Et):_t(Ie,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ee=!1;break}if(Ae){if(!W(pt,(function(mr,Gr){if(!Ae.has(Gr)&&(Ie===mr||wt(Ie,mr,_t,Bt,Et)))return Ae.add(Gr)}))){Ee=!1;break}}else if(Ie!==qe&&!wt(Ie,qe,_t,Bt,Et)){Ee=!1;break}}return Et.delete(st),Et.delete(pt),Ee}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Re(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Me(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var Qe=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function tr(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,E=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=E&&E.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Me(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),Qe=ze?"[object Array]":Yt(ee),tr=($e=$e==r?s:$e)==s,xr=(Qe=Qe==r?s:Qe)==s,st=$e==Qe;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,tr=!1}if(st&&!tr)return re||(re=new It),le||Me(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,me,oe,he,Jt,Ee){switch(me){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ae=z;case e:var Ie=1&oe;if(Ae||(Ae=P),Et.size!=Rt.size&&!Ie)return!1;var qe=Ee.get(Et);if(qe)return qe==Rt;oe|=2,Ee.set(Et,Rt);var ir=$t(Ae(Et),Ae(Rt),oe,he,Jt,Ee);return Ee.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=tr&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,me,oe,he,Jt){var Ee=1&me,Ae=Ft(Et),Ie=Ae.length,qe=Ft(Rt).length;if(Ie!=qe&&!Ee)return!1;for(var ir=Ie;ir--;){var mr=Ae[ir];if(!(Ee?mr in Rt:w.call(Rt,mr)))return!1}var Gr=Jt.get(Et);if(Gr&&Jt.get(Rt))return Gr==Rt;var Ai=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Xn=Ee;++ir<Ie;){mr=Ae[ir];var Yn=Et[mr],Gn=Rt[mr];if(oe)var Te=Ee?oe(Gn,Yn,mr,Rt,Et,Jt):oe(Yn,Gn,mr,Et,Rt,Jt);if(!(Te===void 0?Yn===Gn||he(Yn,Gn,me,oe,Jt):Te)){Ai=!1;break}Xn||(Xn=mr=="constructor")}if(Ai&&!Xn){var ye=Et.constructor,Js=Rt.constructor;ye==Js||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Js=="function"&&Js instanceof Js||(Ai=!1)}return Jt.delete(Et),Jt.delete(Rt),Ai})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],Qe=dt[re];if(Tt)var tr=ee?Tt(Qe,$e,re,dt,at,Mt):Tt($e,Qe,re,at,dt,Mt);if(tr!==void 0){if(tr)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==Qe&&!Kt($e,Qe,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function Ft(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,Ce)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var Ce=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Re(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Me=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Re(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Re(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var E=u.call(d);return S&&(b?d[h]=g:delete d[h]),E})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",E=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+E.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return E.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,E,I){return i(m+(d&b|~d&g)+S+E|0,I)+d|0}function a(m,d,b,g,S,E,I){return i(m+(d&g|b&~g)+S+E|0,I)+d|0}function h(m,d,b,g,S,E,I){return i(m+(d^b^g)+S+E|0,I)+d|0}function p(m,d,b,g,S,E,I){return i(m+(b^(d|~g))+S+E|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,E=this._d;b=u(b,g,S,E,m[0],3614090360,7),E=u(E,b,g,S,m[1],3905402710,12),S=u(S,E,b,g,m[2],606105819,17),g=u(g,S,E,b,m[3],3250441966,22),b=u(b,g,S,E,m[4],4118548399,7),E=u(E,b,g,S,m[5],1200080426,12),S=u(S,E,b,g,m[6],2821735955,17),g=u(g,S,E,b,m[7],4249261313,22),b=u(b,g,S,E,m[8],1770035416,7),E=u(E,b,g,S,m[9],2336552879,12),S=u(S,E,b,g,m[10],4294925233,17),g=u(g,S,E,b,m[11],2304563134,22),b=u(b,g,S,E,m[12],1804603682,7),E=u(E,b,g,S,m[13],4254626195,12),S=u(S,E,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,E,b,m[15],1236535329,22),S,E,m[1],4129170786,5),E=a(E,b,g,S,m[6],3225465664,9),S=a(S,E,b,g,m[11],643717713,14),g=a(g,S,E,b,m[0],3921069994,20),b=a(b,g,S,E,m[5],3593408605,5),E=a(E,b,g,S,m[10],38016083,9),S=a(S,E,b,g,m[15],3634488961,14),g=a(g,S,E,b,m[4],3889429448,20),b=a(b,g,S,E,m[9],568446438,5),E=a(E,b,g,S,m[14],3275163606,9),S=a(S,E,b,g,m[3],4107603335,14),g=a(g,S,E,b,m[8],1163531501,20),b=a(b,g,S,E,m[13],2850285829,5),E=a(E,b,g,S,m[2],4243563512,9),S=a(S,E,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,E,b,m[12],2368359562,20),S,E,m[5],4294588738,4),E=h(E,b,g,S,m[8],2272392833,11),S=h(S,E,b,g,m[11],1839030562,16),g=h(g,S,E,b,m[14],4259657740,23),b=h(b,g,S,E,m[1],2763975236,4),E=h(E,b,g,S,m[4],1272893353,11),S=h(S,E,b,g,m[7],4139469664,16),g=h(g,S,E,b,m[10],3200236656,23),b=h(b,g,S,E,m[13],681279174,4),E=h(E,b,g,S,m[0],3936430074,11),S=h(S,E,b,g,m[3],3572445317,16),g=h(g,S,E,b,m[6],76029189,23),b=h(b,g,S,E,m[9],3654602809,4),E=h(E,b,g,S,m[12],3873151461,11),S=h(S,E,b,g,m[15],530742520,16),b=p(b,g=h(g,S,E,b,m[2],3299628645,23),S,E,m[0],4096336452,6),E=p(E,b,g,S,m[7],1126891415,10),S=p(S,E,b,g,m[14],2878612391,15),g=p(g,S,E,b,m[5],4237533241,21),b=p(b,g,S,E,m[12],1700485571,6),E=p(E,b,g,S,m[3],2399980690,10),S=p(S,E,b,g,m[10],4293915773,15),g=p(g,S,E,b,m[1],2240044497,21),b=p(b,g,S,E,m[8],1873313359,6),E=p(E,b,g,S,m[15],4264355552,10),S=p(S,E,b,g,m[6],2734768916,15),g=p(g,S,E,b,m[13],1309151649,21),b=p(b,g,S,E,m[4],4149444226,6),E=p(E,b,g,S,m[11],3174756917,10),S=p(S,E,b,g,m[2],718787259,15),g=p(g,S,E,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+E|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var E=1;E<m;E++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(E===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var E=1;E<p;E++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(E===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,E=[],I=e.createDecipheriv(d,S,b);E.push(I.update(g)),E.push(I.final()),h=i.concat(E)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,E){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(E,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,E,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:E,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,E,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(E,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,E,I,P):u(g,S,E,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,E,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var E=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)E[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);E.copy(z,0,0,S),this.ipad1=z,this.ipad2=E,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var E=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=E.run(D,E.ipad1),q=W,A=1;A<b;A++){q=E.run(q,E.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var E=a.length;E;){for(u=a,a=[];++p<E;)u&&u[p].run();p=-1,E=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,E){this.fun=S,this.array=E}function g(){}n.nextTick=function(S){var E=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)E[I-1]=arguments[I];a.push(new b(S,E)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var E=a.alloc(S-b.length);if(b=a.concat([E,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(E,I){var D=E.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(E,I,D){var z,P=I.length,B=E.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
276
276
|
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(t,l,c){(function(o,r){(function(){function n(){throw new Error(`secure random number generation not supported by this browser
|
|
277
277
|
use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("randombytes"),i=s.Buffer,u=s.kMaxLength,a=r.crypto||r.msCrypto,h=Math.pow(2,32)-1;function p(b,g){if(typeof b!="number"||b!=b)throw new TypeError("offset must be a number");if(b>h||b<0)throw new TypeError("offset must be a uint32");if(b>u||b>g)throw new RangeError("offset out of range")}function m(b,g,S){if(typeof b!="number"||b!=b)throw new TypeError("size must be a number");if(b>h||b<0)throw new TypeError("size must be a uint32");if(b+g>S||b>u)throw new RangeError("buffer too small")}function d(b,g,S,E){if(o.browser){var I=b.buffer,D=new Uint8Array(I,g,S);return a.getRandomValues(D),E?void o.nextTick((function(){E(null,b)})):b}if(!E)return e(S).copy(b,g),b;e(S,(function(z,P){if(z)return E(z);P.copy(b,g),E(null,b)}))}a&&a.getRandomValues||!o.browser?(c.randomFill=function(b,g,S,E){if(!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof g=="function")E=g,g=0,S=b.length;else if(typeof S=="function")E=S,S=b.length-g;else if(typeof E!="function")throw new TypeError('"cb" argument must be a function');return p(g,b.length),m(S,g,b.length),d(b,g,S,E)},c.randomFillSync=function(b,g,S){if(g===void 0&&(g=0),!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return p(g,b.length),S===void 0&&(S=b.length-g),m(S,g,b.length),d(b,g,S)}):(c.randomFill=n,c.randomFillSync=n)}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(t,l,c){var o={};function r(s,e,i){i||(i=Error);var u=(function(a){var h,p;function m(d,b,g){return a.call(this,(function(S,E,I){return typeof e=="string"?e:e(S,E,I)})(d,b,g))||this}return p=a,(h=m).prototype=Object.create(p.prototype),h.prototype.constructor=h,h.__proto__=p,m})(i);u.prototype.name=i.name,u.prototype.code=s,o[s]=u}function n(s,e){if(Array.isArray(s)){var i=s.length;return s=s.map((function(u){return String(u)})),i>2?"one of ".concat(e," ").concat(s.slice(0,i-1).join(", "),", or ")+s[i-1]:i===2?"one of ".concat(e," ").concat(s[0]," or ").concat(s[1]):"of ".concat(e," ").concat(s[0])}return"of ".concat(e," ").concat(String(s))}r("ERR_INVALID_OPT_VALUE",(function(s,e){return'The value "'+e+'" is invalid for option "'+s+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(s,e,i){var u,a,h;if(typeof e=="string"&&(a="not ",e.substr(0,a.length)===a)?(u="must not be",e=e.replace(/^not /,"")):u="must be",(function(m,d,b){return(b===void 0||b>m.length)&&(b=m.length),m.substring(b-d.length,b)===d})(s," argument"))h="The ".concat(s," ").concat(u," ").concat(n(e,"type"));else{var p=(function(m,d,b){return typeof b!="number"&&(b=0),!(b+d.length>m.length)&&m.indexOf(d,b)!==-1})(s,".")?"property":"argument";h='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(s){return"The "+s+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(s){return"Cannot call "+s+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(s){return"Unknown encoding: "+s}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),l.exports.codes=o},{}],478:[function(t,l,c){(function(o){(function(){var r=Object.keys||function(m){var d=[];for(var b in m)d.push(b);return d};l.exports=a;var n=t("./_stream_readable"),s=t("./_stream_writable");t("inherits")(a,n);for(var e=r(s.prototype),i=0;i<e.length;i++){var u=e[i];a.prototype[u]||(a.prototype[u]=s.prototype[u])}function a(m){if(!(this instanceof a))return new a(m);n.call(this,m),s.call(this,m),this.allowHalfOpen=!0,m&&(m.readable===!1&&(this.readable=!1),m.writable===!1&&(this.writable=!1),m.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||o.nextTick(p,this)}function p(m){m.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(m){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=m,this._writableState.destroyed=m)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(t,l,c){l.exports=r;var o=t("./_stream_transform");function r(n){if(!(this instanceof r))return new r(n);o.call(this,n)}t("inherits")(r,o),r.prototype._transform=function(n,s,e){e(null,n)}},{"./_stream_transform":481,inherits:440}],480:[function(t,l,c){(function(o,r){(function(){var n;l.exports=q,q.ReadableState=W,t("events").EventEmitter;var s=function(N,R){return N.listeners(R).length},e=t("./internal/streams/stream"),i=t("buffer").Buffer,u=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},a,h=t("util");a=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m,d,b=t("./internal/streams/buffer_list"),g=t("./internal/streams/destroy"),S=t("./internal/streams/state").getHighWaterMark,E=t("../errors").codes,I=E.ERR_INVALID_ARG_TYPE,D=E.ERR_STREAM_PUSH_AFTER_EOF,z=E.ERR_METHOD_NOT_IMPLEMENTED,P=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(q,e);var B=g.errorOrDestroy,F=["error","close","destroy","pause","resume"];function W(N,R,U){n=n||t("./_stream_duplex"),N=N||{},typeof U!="boolean"&&(U=R instanceof n),this.objectMode=!!N.objectMode,U&&(this.objectMode=this.objectMode||!!N.readableObjectMode),this.highWaterMark=S(this,N,"readableHighWaterMark",U),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.destroyed=!1,this.defaultEncoding=N.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,N.encoding&&(p||(p=t("string_decoder/").StringDecoder),this.decoder=new p(N.encoding),this.encoding=N.encoding)}function q(N){if(n=n||t("./_stream_duplex"),!(this instanceof q))return new q(N);var R=this instanceof n;this._readableState=new W(N,this,R),this.readable=!0,N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy)),e.call(this)}function A(N,R,U,K,rt){a("readableAddChunk",R);var Z,et=N._readableState;if(R===null)et.reading=!1,(function(ht,lt){if(a("onEofChunk"),!lt.ended){if(lt.decoder){var Q=lt.decoder.end();Q&&Q.length&&(lt.buffer.push(Q),lt.length+=lt.objectMode?1:Q.length)}lt.ended=!0,lt.sync?y(ht):(lt.needReadable=!1,lt.emittedReadable||(lt.emittedReadable=!0,w(ht)))}})(N,et);else if(rt||(Z=(function(ht,lt){var Q;ot=lt,i.isBuffer(ot)||ot instanceof u||typeof lt=="string"||lt===void 0||ht.objectMode||(Q=new I("chunk",["string","Buffer","Uint8Array"],lt));var ot;return Q})(et,R)),Z)B(N,Z);else if(et.objectMode||R&&R.length>0)if(typeof R=="string"||et.objectMode||Object.getPrototypeOf(R)===i.prototype||(R=(function(ht){return i.from(ht)})(R)),K)et.endEmitted?B(N,new P):M(N,et,R,!0);else if(et.ended)B(N,new D);else{if(et.destroyed)return!1;et.reading=!1,et.decoder&&!U?(R=et.decoder.write(R),et.objectMode||R.length!==0?M(N,et,R,!1):x(N,et)):M(N,et,R,!1)}else K||(et.reading=!1,x(N,et));return!et.ended&&(et.length<et.highWaterMark||et.length===0)}function M(N,R,U,K){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,N.emit("data",U)):(R.length+=R.objectMode?1:U.length,K?R.buffer.unshift(U):R.buffer.push(U),R.needReadable&&y(N)),x(N,R)}Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(N){this._readableState&&(this._readableState.destroyed=N)}}),q.prototype.destroy=g.destroy,q.prototype._undestroy=g.undestroy,q.prototype._destroy=function(N,R){R(N)},q.prototype.push=function(N,R){var U,K=this._readableState;return K.objectMode?U=!0:typeof N=="string"&&((R=R||K.defaultEncoding)!==K.encoding&&(N=i.from(N,R),R=""),U=!0),A(this,N,R,!1,U)},q.prototype.unshift=function(N){return A(this,N,null,!0,!1)},q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(N){p||(p=t("string_decoder/").StringDecoder);var R=new p(N);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,K="";U!==null;)K+=R.write(U.data),U=U.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};function k(N,R){return N<=0||R.length===0&&R.ended?0:R.objectMode?1:N!=N?R.flowing&&R.length?R.buffer.head.data.length:R.length:(N>R.highWaterMark&&(R.highWaterMark=(function(U){return U>=1073741824?U=1073741824:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U})(N)),N<=R.length?N:R.ended?R.length:(R.needReadable=!0,0))}function y(N){var R=N._readableState;a("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(a("emitReadable",R.flowing),R.emittedReadable=!0,o.nextTick(w,N))}function w(N){var R=N._readableState;a("emitReadable_",R.destroyed,R.length,R.ended),R.destroyed||!R.length&&!R.ended||(N.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,V(N)}function x(N,R){R.readingMore||(R.readingMore=!0,o.nextTick(_,N,R))}function _(N,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var U=R.length;if(a("maybeReadMore read 0"),N.read(0),U===R.length)break}R.readingMore=!1}function T(N){var R=N._readableState;R.readableListening=N.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:N.listenerCount("data")>0&&N.resume()}function O(N){a("readable nexttick read 0"),N.read(0)}function j(N,R){a("resume",R.reading),R.reading||N.read(0),R.resumeScheduled=!1,N.emit("resume"),V(N),R.flowing&&!R.reading&&N.read(0)}function V(N){var R=N._readableState;for(a("flow",R.flowing);R.flowing&&N.read()!==null;);}function X(N,R){return R.length===0?null:(R.objectMode?U=R.buffer.shift():!N||N>=R.length?(U=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):U=R.buffer.consume(N,R.decoder),U);var U}function J(N){var R=N._readableState;a("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,o.nextTick(L,R,N))}function L(N,R){if(a("endReadableNT",N.endEmitted,N.length),!N.endEmitted&&N.length===0&&(N.endEmitted=!0,R.readable=!1,R.emit("end"),N.autoDestroy)){var U=R._writableState;(!U||U.autoDestroy&&U.finished)&&R.destroy()}}function G(N,R){for(var U=0,K=N.length;U<K;U++)if(N[U]===R)return U;return-1}q.prototype.read=function(N){a("read",N),N=parseInt(N,10);var R=this._readableState,U=N;if(N!==0&&(R.emittedReadable=!1),N===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return a("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?J(this):y(this),null;if((N=k(N,R))===0&&R.ended)return R.length===0&&J(this),null;var K,rt=R.needReadable;return a("need readable",rt),(R.length===0||R.length-N<R.highWaterMark)&&a("length less than watermark",rt=!0),R.ended||R.reading?a("reading or ended",rt=!1):rt&&(a("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(N=k(U,R))),(K=N>0?X(N,R):null)===null?(R.needReadable=R.length<=R.highWaterMark,N=0):(R.length-=N,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),U!==N&&R.ended&&J(this)),K!==null&&this.emit("data",K),K},q.prototype._read=function(N){B(this,new z("_read()"))},q.prototype.pipe=function(N,R){var U=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=N;break;case 1:K.pipes=[K.pipes,N];break;default:K.pipes.push(N)}K.pipesCount+=1,a("pipe count=%d opts=%j",K.pipesCount,R);var rt=(!R||R.end!==!1)&&N!==o.stdout&&N!==o.stderr?et:ct;function Z(ft,mt){a("onunpipe"),ft===U&&mt&&mt.hasUnpiped===!1&&(mt.hasUnpiped=!0,a("cleanup"),N.removeListener("close",nt),N.removeListener("finish",ut),N.removeListener("drain",ht),N.removeListener("error",ot),N.removeListener("unpipe",Z),U.removeListener("end",et),U.removeListener("end",ct),U.removeListener("data",Q),lt=!0,!K.awaitDrain||N._writableState&&!N._writableState.needDrain||ht())}function et(){a("onend"),N.end()}K.endEmitted?o.nextTick(rt):U.once("end",rt),N.on("unpipe",Z);var ht=(function(ft){return function(){var mt=ft._readableState;a("pipeOnDrain",mt.awaitDrain),mt.awaitDrain&&mt.awaitDrain--,mt.awaitDrain===0&&s(ft,"data")&&(mt.flowing=!0,V(ft))}})(U);N.on("drain",ht);var lt=!1;function Q(ft){a("ondata");var mt=N.write(ft);a("dest.write",mt),mt===!1&&((K.pipesCount===1&&K.pipes===N||K.pipesCount>1&&G(K.pipes,N)!==-1)&&!lt&&(a("false write response, pause",K.awaitDrain),K.awaitDrain++),U.pause())}function ot(ft){a("onerror",ft),ct(),N.removeListener("error",ot),s(N,"error")===0&&B(N,ft)}function nt(){N.removeListener("finish",ut),ct()}function ut(){a("onfinish"),N.removeListener("close",nt),ct()}function ct(){a("unpipe"),U.unpipe(N)}return U.on("data",Q),(function(ft,mt,gt){if(typeof ft.prependListener=="function")return ft.prependListener(mt,gt);ft._events&&ft._events[mt]?Array.isArray(ft._events[mt])?ft._events[mt].unshift(gt):ft._events[mt]=[gt,ft._events[mt]]:ft.on(mt,gt)})(N,"error",ot),N.once("close",nt),N.once("finish",ut),N.emit("pipe",U),K.flowing||(a("pipe resume"),U.resume()),N},q.prototype.unpipe=function(N){var R=this._readableState,U={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return N&&N!==R.pipes||(N||(N=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,N&&N.emit("unpipe",this,U)),this;if(!N){var K=R.pipes,rt=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var Z=0;Z<rt;Z++)K[Z].emit("unpipe",this,{hasUnpiped:!1});return this}var et=G(R.pipes,N);return et===-1||(R.pipes.splice(et,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),N.emit("unpipe",this,U)),this},q.prototype.on=function(N,R){var U=e.prototype.on.call(this,N,R),K=this._readableState;return N==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):N==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,a("on readable",K.length,K.reading),K.length?y(this):K.reading||o.nextTick(O,this))),U},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(N,R){var U=e.prototype.removeListener.call(this,N,R);return N==="readable"&&o.nextTick(T,this),U},q.prototype.removeAllListeners=function(N){var R=e.prototype.removeAllListeners.apply(this,arguments);return N!=="readable"&&N!==void 0||o.nextTick(T,this),R},q.prototype.resume=function(){var N=this._readableState;return N.flowing||(a("resume"),N.flowing=!N.readableListening,(function(R,U){U.resumeScheduled||(U.resumeScheduled=!0,o.nextTick(j,R,U))})(this,N)),N.paused=!1,this},q.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},q.prototype.wrap=function(N){var R=this,U=this._readableState,K=!1;for(var rt in N.on("end",(function(){if(a("wrapped end"),U.decoder&&!U.ended){var et=U.decoder.end();et&&et.length&&R.push(et)}R.push(null)})),N.on("data",(function(et){a("wrapped data"),U.decoder&&(et=U.decoder.write(et)),U.objectMode&&et==null||(U.objectMode||et&&et.length)&&(R.push(et)||(K=!0,N.pause()))})),N)this[rt]===void 0&&typeof N[rt]=="function"&&(this[rt]=(function(et){return function(){return N[et].apply(N,arguments)}})(rt));for(var Z=0;Z<F.length;Z++)N.on(F[Z],this.emit.bind(this,F[Z]));return this._read=function(et){a("wrapped _read",et),K&&(K=!1,N.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=t("./internal/streams/async_iterator")),m(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}}),q._fromList=X,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(q.from=function(N,R){return d===void 0&&(d=t("./internal/streams/from")),d(q,N,R)})}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(t,l,c){l.exports=a;var o=t("../errors").codes,r=o.ERR_METHOD_NOT_IMPLEMENTED,n=o.ERR_MULTIPLE_CALLBACK,s=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=o.ERR_TRANSFORM_WITH_LENGTH_0,i=t("./_stream_duplex");function u(m,d){var b=this._transformState;b.transforming=!1;var g=b.writecb;if(g===null)return this.emit("error",new n);b.writechunk=null,b.writecb=null,d!=null&&this.push(d),g(m);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function a(m){if(!(this instanceof a))return new a(m);i.call(this,m),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,m&&(typeof m.transform=="function"&&(this._transform=m.transform),typeof m.flush=="function"&&(this._flush=m.flush)),this.on("prefinish",h)}function h(){var m=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush((function(d,b){p(m,d,b)}))}function p(m,d,b){if(d)return m.emit("error",d);if(b!=null&&m.push(b),m._writableState.length)throw new e;if(m._transformState.transforming)throw new s;return m.push(null)}t("inherits")(a,i),a.prototype.push=function(m,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,m,d)},a.prototype._transform=function(m,d,b){b(new r("_transform()"))},a.prototype._write=function(m,d,b){var g=this._transformState;if(g.writecb=b,g.writechunk=m,g.writeencoding=d,!g.transforming){var S=this._readableState;(g.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},a.prototype._read=function(m){var d=this._transformState;d.writechunk===null||d.transforming?d.needTransform=!0:(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform))},a.prototype._destroy=function(m,d){i.prototype._destroy.call(this,m,(function(b){d(b)}))}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(t,l,c){(function(o,r){(function(){function n(_){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(O,j,V){var X=O.entry;for(O.entry=null;X;){var J=X.callback;j.pendingcb--,J(V),X=X.next}j.corkedRequestsFree.next=O})(T,_)}}var s;l.exports=q,q.WritableState=W;var e={deprecate:t("util-deprecate")},i=t("./internal/streams/stream"),u=t("buffer").Buffer,a=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h,p=t("./internal/streams/destroy"),m=t("./internal/streams/state").getHighWaterMark,d=t("../errors").codes,b=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,S=d.ERR_MULTIPLE_CALLBACK,E=d.ERR_STREAM_CANNOT_PIPE,I=d.ERR_STREAM_DESTROYED,D=d.ERR_STREAM_NULL_VALUES,z=d.ERR_STREAM_WRITE_AFTER_END,P=d.ERR_UNKNOWN_ENCODING,B=p.errorOrDestroy;function F(){}function W(_,T,O){s=s||t("./_stream_duplex"),_=_||{},typeof O!="boolean"&&(O=T instanceof s),this.objectMode=!!_.objectMode,O&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=m(this,_,"writableHighWaterMark",O),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=_.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){(function(X,J){var L=X._writableState,G=L.sync,N=L.writecb;if(typeof N!="function")throw new S;if((function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0})(L),J)(function(U,K,rt,Z,et){--K.pendingcb,rt?(o.nextTick(et,Z),o.nextTick(x,U,K),U._writableState.errorEmitted=!0,B(U,Z)):(et(Z),U._writableState.errorEmitted=!0,B(U,Z),x(U,K))})(X,L,G,J,N);else{var R=y(L)||X.destroyed;R||L.corked||L.bufferProcessing||!L.bufferedRequest||k(X,L),G?o.nextTick(M,X,L,R,N):M(X,L,R,N)}})(T,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function q(_){var T=this instanceof(s=s||t("./_stream_duplex"));if(!T&&!h.call(q,this))return new q(_);this._writableState=new W(_,this,T),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),i.call(this)}function A(_,T,O,j,V,X,J){T.writelen=j,T.writecb=J,T.writing=!0,T.sync=!0,T.destroyed?T.onwrite(new I("write")):O?_._writev(V,T.onwrite):_._write(V,X,T.onwrite),T.sync=!1}function M(_,T,O,j){O||(function(V,X){X.length===0&&X.needDrain&&(X.needDrain=!1,V.emit("drain"))})(_,T),T.pendingcb--,j(),x(_,T)}function k(_,T){T.bufferProcessing=!0;var O=T.bufferedRequest;if(_._writev&&O&&O.next){var j=T.bufferedRequestCount,V=new Array(j),X=T.corkedRequestsFree;X.entry=O;for(var J=0,L=!0;O;)V[J]=O,O.isBuf||(L=!1),O=O.next,J+=1;V.allBuffers=L,A(_,T,!0,T.length,V,"",X.finish),T.pendingcb++,T.lastBufferedRequest=null,X.next?(T.corkedRequestsFree=X.next,X.next=null):T.corkedRequestsFree=new n(T),T.bufferedRequestCount=0}else{for(;O;){var G=O.chunk,N=O.encoding,R=O.callback;if(A(_,T,!1,T.objectMode?1:G.length,G,N,R),O=O.next,T.bufferedRequestCount--,T.writing)break}O===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=O,T.bufferProcessing=!1}function y(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function w(_,T){_._final((function(O){T.pendingcb--,O&&B(_,O),T.prefinished=!0,_.emit("prefinish"),x(_,T)}))}function x(_,T){var O=y(T);if(O&&((function(V,X){X.prefinished||X.finalCalled||(typeof V._final!="function"||X.destroyed?(X.prefinished=!0,V.emit("prefinish")):(X.pendingcb++,X.finalCalled=!0,o.nextTick(w,V,X)))})(_,T),T.pendingcb===0&&(T.finished=!0,_.emit("finish"),T.autoDestroy))){var j=_._readableState;(!j||j.autoDestroy&&j.endEmitted)&&_.destroy()}return O}t("inherits")(q,i),W.prototype.getBuffer=function(){for(var _=this.bufferedRequest,T=[];_;)T.push(_),_=_.next;return T},(function(){try{Object.defineProperty(W.prototype,"buffer",{get:e.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(_){return!!h.call(this,_)||this===q&&_&&_._writableState instanceof W}})):h=function(_){return _ instanceof this},q.prototype.pipe=function(){B(this,new E)},q.prototype.write=function(_,T,O){var j,V=this._writableState,X=!1,J=!V.objectMode&&(j=_,u.isBuffer(j)||j instanceof a);return J&&!u.isBuffer(_)&&(_=(function(L){return u.from(L)})(_)),typeof T=="function"&&(O=T,T=null),J?T="buffer":T||(T=V.defaultEncoding),typeof O!="function"&&(O=F),V.ending?(function(L,G){var N=new z;B(L,N),o.nextTick(G,N)})(this,O):(J||(function(L,G,N,R){var U;return N===null?U=new D:typeof N=="string"||G.objectMode||(U=new b("chunk",["string","Buffer"],N)),!U||(B(L,U),o.nextTick(R,U),!1)})(this,V,_,O))&&(V.pendingcb++,X=(function(L,G,N,R,U,K){if(!N){var rt=(function(lt,Q,ot){return lt.objectMode||lt.decodeStrings===!1||typeof Q!="string"||(Q=u.from(Q,ot)),Q})(G,R,U);R!==rt&&(N=!0,U="buffer",R=rt)}var Z=G.objectMode?1:R.length;G.length+=Z;var et=G.length<G.highWaterMark;if(et||(G.needDrain=!0),G.writing||G.corked){var ht=G.lastBufferedRequest;G.lastBufferedRequest={chunk:R,encoding:U,isBuf:N,callback:K,next:null},ht?ht.next=G.lastBufferedRequest:G.bufferedRequest=G.lastBufferedRequest,G.bufferedRequestCount+=1}else A(L,G,!1,Z,R,U,K);return et})(this,V,J,_,T,O)),X},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||k(this,_))},q.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new P(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),q.prototype._write=function(_,T,O){O(new g("_write()"))},q.prototype._writev=null,q.prototype.end=function(_,T,O){var j=this._writableState;return typeof _=="function"?(O=_,_=null,T=null):typeof T=="function"&&(O=T,T=null),_!=null&&this.write(_,T),j.corked&&(j.corked=1,this.uncork()),j.ending||(function(V,X,J){X.ending=!0,x(V,X),J&&(X.finished?o.nextTick(J):V.once("finish",J)),X.ended=!0,V.writable=!1})(this,j,O),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),q.prototype.destroy=p.destroy,q.prototype._undestroy=p.undestroy,q.prototype._destroy=function(_,T){T(_)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(t,l,c){(function(o){(function(){var r;function n(I,D,z){return(D=(function(P){var B=(function(F,W){if(typeof F!="object"||F===null)return F;var q=F[Symbol.toPrimitive];if(q!==void 0){var A=q.call(F,W);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)})(P,"string");return typeof B=="symbol"?B:String(B)})(D))in I?Object.defineProperty(I,D,{value:z,enumerable:!0,configurable:!0,writable:!0}):I[D]=z,I}var s=t("./end-of-stream"),e=Symbol("lastResolve"),i=Symbol("lastReject"),u=Symbol("error"),a=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function d(I,D){return{value:I,done:D}}function b(I){var D=I[e];if(D!==null){var z=I[m].read();z!==null&&(I[h]=null,I[e]=null,I[i]=null,D(d(z,!1)))}}function g(I){o.nextTick(b,I)}var S=Object.getPrototypeOf((function(){})),E=Object.setPrototypeOf((n(r={get stream(){return this[m]},next:function(){var I=this,D=this[u];if(D!==null)return Promise.reject(D);if(this[a])return Promise.resolve(d(void 0,!0));if(this[m].destroyed)return new Promise((function(F,W){o.nextTick((function(){I[u]?W(I[u]):F(d(void 0,!0))}))}));var z,P=this[h];if(P)z=new Promise((function(F,W){return function(q,A){F.then((function(){W[a]?q(d(void 0,!0)):W[p](q,A)}),A)}})(P,this));else{var B=this[m].read();if(B!==null)return Promise.resolve(d(B,!1));z=new Promise(this[p])}return this[h]=z,z}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var I=this;return new Promise((function(D,z){I[m].destroy(null,(function(P){P?z(P):D(d(void 0,!0))}))}))})),r),S);l.exports=function(I){var D,z=Object.create(E,(n(D={},m,{value:I,writable:!0}),n(D,e,{value:null,writable:!0}),n(D,i,{value:null,writable:!0}),n(D,u,{value:null,writable:!0}),n(D,a,{value:I._readableState.endEmitted,writable:!0}),n(D,p,{value:function(P,B){var F=z[m].read();F?(z[h]=null,z[e]=null,z[i]=null,P(d(F,!1))):(z[e]=P,z[i]=B)},writable:!0}),D));return z[h]=null,s(I,(function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=z[i];return B!==null&&(z[h]=null,z[e]=null,z[i]=null,B(P)),void(z[u]=P)}var F=z[e];F!==null&&(z[h]=null,z[e]=null,z[i]=null,F(d(void 0,!0))),z[a]=!0})),I.on("readable",g.bind(null,z)),z}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":486,_process:467}],484:[function(t,l,c){function o(h,p){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);p&&(d=d.filter((function(b){return Object.getOwnPropertyDescriptor(h,b).enumerable}))),m.push.apply(m,d)}return m}function r(h){for(var p=1;p<arguments.length;p++){var m=arguments[p]!=null?arguments[p]:{};p%2?o(Object(m),!0).forEach((function(d){n(h,d,m[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):o(Object(m)).forEach((function(d){Object.defineProperty(h,d,Object.getOwnPropertyDescriptor(m,d))}))}return h}function n(h,p,m){return(p=e(p))in h?Object.defineProperty(h,p,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[p]=m,h}function s(h,p){for(var m=0;m<p.length;m++){var d=p[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,e(d.key),d)}}function e(h){var p=(function(m,d){if(typeof m!="object"||m===null)return m;var b=m[Symbol.toPrimitive];if(b!==void 0){var g=b.call(m,d);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(m)})(h,"string");return typeof p=="symbol"?p:String(p)}var i=t("buffer").Buffer,u=t("util").inspect,a=u&&u.custom||"inspect";l.exports=(function(){function h(){(function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var p,m;return p=h,(m=[{key:"push",value:function(d){var b={data:d,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(d){var b={data:d,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var b=this.head,g=""+b.data;b=b.next;)g+=d+b.data;return g}},{key:"concat",value:function(d){if(this.length===0)return i.alloc(0);for(var b,g,S,E=i.allocUnsafe(d>>>0),I=this.head,D=0;I;)b=I.data,g=E,S=D,i.prototype.copy.call(b,g,S),D+=I.data.length,I=I.next;return E}},{key:"consume",value:function(d,b){var g;return d<this.head.data.length?(g=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):g=d===this.head.data.length?this.shift():b?this._getString(d):this._getBuffer(d),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var b=this.head,g=1,S=b.data;for(d-=S.length;b=b.next;){var E=b.data,I=d>E.length?E.length:d;if(I===E.length?S+=E:S+=E.slice(0,d),(d-=I)==0){I===E.length?(++g,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=E.slice(I));break}++g}return this.length-=g,S}},{key:"_getBuffer",value:function(d){var b=i.allocUnsafe(d),g=this.head,S=1;for(g.data.copy(b),d-=g.data.length;g=g.next;){var E=g.data,I=d>E.length?E.length:d;if(E.copy(b,b.length-d,0,I),(d-=I)==0){I===E.length?(++S,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=E.slice(I));break}++S}return this.length-=S,b}},{key:a,value:function(d,b){return u(this,r(r({},b),{},{depth:0,customInspect:!1}))}}])&&s(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),h})()},{buffer:220,util:188}],485:[function(t,l,c){(function(o){(function(){function r(e,i){s(e,i),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,i){e.emit("error",i)}l.exports={destroy:function(e,i){var u=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(s,this,e)):o.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(p){!i&&p?u._writableState?u._writableState.errorEmitted?o.nextTick(n,u):(u._writableState.errorEmitted=!0,o.nextTick(r,u,p)):o.nextTick(r,u,p):i?(o.nextTick(n,u),i(p)):o.nextTick(n,u)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,i){var u=e._readableState,a=e._writableState;u&&u.autoDestroy||a&&a.autoDestroy?e.destroy(i):e.emit("error",i)}}}).call(this)}).call(this,t("_process"))},{_process:467}],486:[function(t,l,c){var o=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}l.exports=function n(s,e,i){if(typeof e=="function")return n(s,null,e);e||(e={}),i=(function(I){var D=!1;return function(){if(!D){D=!0;for(var z=arguments.length,P=new Array(z),B=0;B<z;B++)P[B]=arguments[B];I.apply(this,P)}}})(i||r);var u=e.readable||e.readable!==!1&&s.readable,a=e.writable||e.writable!==!1&&s.writable,h=function(){s.writable||m()},p=s._writableState&&s._writableState.finished,m=function(){a=!1,p=!0,u||i.call(s)},d=s._readableState&&s._readableState.endEmitted,b=function(){u=!1,d=!0,a||i.call(s)},g=function(I){i.call(s,I)},S=function(){var I;return u&&!d?(s._readableState&&s._readableState.ended||(I=new o),i.call(s,I)):a&&!p?(s._writableState&&s._writableState.ended||(I=new o),i.call(s,I)):void 0},E=function(){s.req.on("finish",m)};return(function(I){return I.setHeader&&typeof I.abort=="function"})(s)?(s.on("complete",m),s.on("abort",S),s.req?E():s.on("request",E)):a&&!s._writableState&&(s.on("end",h),s.on("close",h)),s.on("end",b),s.on("finish",m),e.error!==!1&&s.on("error",g),s.on("close",S),function(){s.removeListener("complete",m),s.removeListener("abort",S),s.removeListener("request",E),s.req&&s.req.removeListener("finish",m),s.removeListener("end",h),s.removeListener("close",h),s.removeListener("finish",m),s.removeListener("end",b),s.removeListener("error",g),s.removeListener("close",S)}}},{"../../../errors":477}],487:[function(t,l,c){l.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(t,l,c){var o,r=t("../../../errors").codes,n=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function e(p){if(p)throw p}function i(p,m,d,b){b=(function(E){var I=!1;return function(){I||(I=!0,E.apply(void 0,arguments))}})(b);var g=!1;p.on("close",(function(){g=!0})),o===void 0&&(o=t("./end-of-stream")),o(p,{readable:m,writable:d},(function(E){if(E)return b(E);g=!0,b()}));var S=!1;return function(E){if(!g&&!S)return S=!0,(function(I){return I.setHeader&&typeof I.abort=="function"})(p)?p.abort():typeof p.destroy=="function"?p.destroy():void b(E||new s("pipe"))}}function u(p){p()}function a(p,m){return p.pipe(m)}function h(p){return p.length?typeof p[p.length-1]!="function"?e:p.pop():e}l.exports=function(){for(var p=arguments.length,m=new Array(p),d=0;d<p;d++)m[d]=arguments[d];var b,g=h(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new n("streams");var S=m.map((function(E,I){var D=I<m.length-1;return i(E,D,I>0,(function(z){b||(b=z),z&&S.forEach(u),D||(S.forEach(u),g(b))}))}));return m.reduce(a)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(t,l,c){var o=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;l.exports={getHighWaterMark:function(r,n,s,e){var i=(function(u,a,h){return u.highWaterMark!=null?u.highWaterMark:a?u[h]:null})(n,e,s);if(i!=null){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new o(e?s:"highWaterMark",i);return Math.floor(i)}return r.objectMode?16:16384}}},{"../../../errors":477}],490:[function(t,l,c){l.exports=t("events").EventEmitter},{events:422}],491:[function(t,l,c){(c=l.exports=t("./lib/_stream_readable.js")).Stream=c,c.Readable=c,c.Writable=t("./lib/_stream_writable.js"),c.Duplex=t("./lib/_stream_duplex.js"),c.Transform=t("./lib/_stream_transform.js"),c.PassThrough=t("./lib/_stream_passthrough.js"),c.finished=t("./lib/internal/streams/end-of-stream.js"),c.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(t,l,c){var o=(function(r){var n=Object.prototype,s=n.hasOwnProperty,e=Object.defineProperty||function(x,_,T){x[_]=T.value},i=typeof Symbol=="function"?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",h=i.toStringTag||"@@toStringTag";function p(x,_,T){return Object.defineProperty(x,_,{value:T,enumerable:!0,configurable:!0,writable:!0}),x[_]}try{p({},"")}catch{p=function(_,T,O){return _[T]=O}}function m(x,_,T,O){var j=_&&_.prototype instanceof g?_:g,V=Object.create(j.prototype),X=new k(O||[]);return e(V,"_invoke",{value:W(x,T,X)}),V}function d(x,_,T){try{return{type:"normal",arg:x.call(_,T)}}catch(O){return{type:"throw",arg:O}}}r.wrap=m;var b={};function g(){}function S(){}function E(){}var I={};p(I,u,(function(){return this}));var D=Object.getPrototypeOf,z=D&&D(D(y([])));z&&z!==n&&s.call(z,u)&&(I=z);var P=E.prototype=g.prototype=Object.create(I);function B(x){["next","throw","return"].forEach((function(_){p(x,_,(function(T){return this._invoke(_,T)}))}))}function F(x,_){var T;e(this,"_invoke",{value:function(O,j){function V(){return new _((function(X,J){(function L(G,N,R,U){var K=d(x[G],x,N);if(K.type!=="throw"){var rt=K.arg,Z=rt.value;return Z&&typeof Z=="object"&&s.call(Z,"__await")?_.resolve(Z.__await).then((function(et){L("next",et,R,U)}),(function(et){L("throw",et,R,U)})):_.resolve(Z).then((function(et){rt.value=et,R(rt)}),(function(et){return L("throw",et,R,U)}))}U(K.arg)})(O,j,X,J)}))}return T=T?T.then(V,V):V()}})}function W(x,_,T){var O="suspendedStart";return function(j,V){if(O==="executing")throw new Error("Generator is already running");if(O==="completed"){if(j==="throw")throw V;return w()}for(T.method=j,T.arg=V;;){var X=T.delegate;if(X){var J=q(X,T);if(J){if(J===b)continue;return J}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(O==="suspendedStart")throw O="completed",T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);O="executing";var L=d(x,_,T);if(L.type==="normal"){if(O=T.done?"completed":"suspendedYield",L.arg===b)continue;return{value:L.arg,done:T.done}}L.type==="throw"&&(O="completed",T.method="throw",T.arg=L.arg)}}}function q(x,_){var T=_.method,O=x.iterator[T];if(O===void 0)return _.delegate=null,T==="throw"&&x.iterator.return&&(_.method="return",_.arg=void 0,q(x,_),_.method==="throw")||T!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+T+"' method")),b;var j=d(O,x.iterator,_.arg);if(j.type==="throw")return _.method="throw",_.arg=j.arg,_.delegate=null,b;var V=j.arg;return V?V.done?(_[x.resultName]=V.value,_.next=x.nextLoc,_.method!=="return"&&(_.method="next",_.arg=void 0),_.delegate=null,b):V:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,b)}function A(x){var _={tryLoc:x[0]};1 in x&&(_.catchLoc=x[1]),2 in x&&(_.finallyLoc=x[2],_.afterLoc=x[3]),this.tryEntries.push(_)}function M(x){var _=x.completion||{};_.type="normal",delete _.arg,x.completion=_}function k(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(A,this),this.reset(!0)}function y(x){if(x){var _=x[u];if(_)return _.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var T=-1,O=function j(){for(;++T<x.length;)if(s.call(x,T))return j.value=x[T],j.done=!1,j;return j.value=void 0,j.done=!0,j};return O.next=O}}return{next:w}}function w(){return{value:void 0,done:!0}}return S.prototype=E,e(P,"constructor",{value:E,configurable:!0}),e(E,"constructor",{value:S,configurable:!0}),S.displayName=p(E,h,"GeneratorFunction"),r.isGeneratorFunction=function(x){var _=typeof x=="function"&&x.constructor;return!!_&&(_===S||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,E):(x.__proto__=E,p(x,h,"GeneratorFunction")),x.prototype=Object.create(P),x},r.awrap=function(x){return{__await:x}},B(F.prototype),p(F.prototype,a,(function(){return this})),r.AsyncIterator=F,r.async=function(x,_,T,O,j){j===void 0&&(j=Promise);var V=new F(m(x,_,T,O),j);return r.isGeneratorFunction(_)?V:V.next().then((function(X){return X.done?X.value:V.next()}))},B(P),p(P,h,"Generator"),p(P,u,(function(){return this})),p(P,"toString",(function(){return"[object Generator]"})),r.keys=function(x){var _=Object(x),T=[];for(var O in _)T.push(O);return T.reverse(),function j(){for(;T.length;){var V=T.pop();if(V in _)return j.value=V,j.done=!1,j}return j.done=!0,j}},r.values=y,k.prototype={constructor:k,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!x)for(var _ in this)_.charAt(0)==="t"&&s.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=void 0)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function T(L,G){return V.type="throw",V.arg=x,_.next=L,G&&(_.method="next",_.arg=void 0),!!G}for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O],V=j.completion;if(j.tryLoc==="root")return T("end");if(j.tryLoc<=this.prev){var X=s.call(j,"catchLoc"),J=s.call(j,"finallyLoc");if(X&&J){if(this.prev<j.catchLoc)return T(j.catchLoc,!0);if(this.prev<j.finallyLoc)return T(j.finallyLoc)}else if(X){if(this.prev<j.catchLoc)return T(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return T(j.finallyLoc)}}}},abrupt:function(x,_){for(var T=this.tryEntries.length-1;T>=0;--T){var O=this.tryEntries[T];if(O.tryLoc<=this.prev&&s.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var j=O;break}}j&&(x==="break"||x==="continue")&&j.tryLoc<=_&&_<=j.finallyLoc&&(j=null);var V=j?j.completion:{};return V.type=x,V.arg=_,j?(this.method="next",this.next=j.finallyLoc,b):this.complete(V)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),b},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.finallyLoc===x)return this.complete(T.completion,T.afterLoc),M(T),b}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.tryLoc===x){var O=T.completion;if(O.type==="throw"){var j=O.arg;M(T)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(x,_,T){return this.delegate={iterator:y(x),resultName:_,nextLoc:T},this.method==="next"&&(this.arg=void 0),b}},r})(typeof l=="object"?l.exports:{});try{regeneratorRuntime=o}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},{}],493:[function(t,l,c){var o=t("buffer").Buffer,r=t("inherits"),n=t("hash-base"),s=new Array(16),e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],i=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function m(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(D,z){return D<<z|D>>>32-z}function b(D,z,P,B,F,W,q,A){return d(D+(z^P^B)+W+q|0,A)+F|0}function g(D,z,P,B,F,W,q,A){return d(D+(z&P|~z&B)+W+q|0,A)+F|0}function S(D,z,P,B,F,W,q,A){return d(D+((z|~P)^B)+W+q|0,A)+F|0}function E(D,z,P,B,F,W,q,A){return d(D+(z&B|P&~B)+W+q|0,A)+F|0}function I(D,z,P,B,F,W,q,A){return d(D+(z^(P|~B))+W+q|0,A)+F|0}r(m,n),m.prototype._update=function(){for(var D=s,z=0;z<16;++z)D[z]=this._block.readInt32LE(4*z);for(var P=0|this._a,B=0|this._b,F=0|this._c,W=0|this._d,q=0|this._e,A=0|this._a,M=0|this._b,k=0|this._c,y=0|this._d,w=0|this._e,x=0;x<80;x+=1){var _,T;x<16?(_=b(P,B,F,W,q,D[e[x]],h[0],u[x]),T=I(A,M,k,y,w,D[i[x]],p[0],a[x])):x<32?(_=g(P,B,F,W,q,D[e[x]],h[1],u[x]),T=E(A,M,k,y,w,D[i[x]],p[1],a[x])):x<48?(_=S(P,B,F,W,q,D[e[x]],h[2],u[x]),T=S(A,M,k,y,w,D[i[x]],p[2],a[x])):x<64?(_=E(P,B,F,W,q,D[e[x]],h[3],u[x]),T=g(A,M,k,y,w,D[i[x]],p[3],a[x])):(_=I(P,B,F,W,q,D[e[x]],h[4],u[x]),T=b(A,M,k,y,w,D[i[x]],p[4],a[x])),P=q,q=W,W=d(F,10),F=B,B=_,A=w,w=y,y=d(k,10),k=M,M=T}var O=this._b+F+y|0;this._b=this._c+W+w|0,this._c=this._d+q+A|0,this._d=this._e+P+M|0,this._e=this._a+B+k|0,this._a=O},m.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var D=o.alloc?o.alloc(20):new o(20);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D.writeInt32LE(this._e,16),D},l.exports=m},{buffer:220,"hash-base":425,inherits:440}],494:[function(t,l,c){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var o=t("buffer"),r=o.Buffer;function n(e,i){for(var u in e)i[u]=e[u]}function s(e,i,u){return r(e,i,u)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?l.exports=o:(n(o,c),c.Buffer=s),s.prototype=Object.create(r.prototype),n(r,s),s.from=function(e,i,u){if(typeof e=="number")throw new TypeError("Argument must not be a number");return r(e,i,u)},s.alloc=function(e,i,u){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=r(e);return i!==void 0?typeof u=="string"?a.fill(i,u):a.fill(i):a.fill(0),a},s.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:220}],495:[function(t,l,c){(function(o){(function(){var r,n=t("buffer"),s=n.Buffer,e={};for(r in n)n.hasOwnProperty(r)&&r!=="SlowBuffer"&&r!=="Buffer"&&(e[r]=n[r]);var i=e.Buffer={};for(r in s)s.hasOwnProperty(r)&&r!=="allocUnsafe"&&r!=="allocUnsafeSlow"&&(i[r]=s[r]);if(e.Buffer.prototype=s.prototype,i.from&&i.from!==Uint8Array.from||(i.from=function(u,a,h){if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof u);if(u&&u.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);return s(u,a,h)}),i.alloc||(i.alloc=function(u,a,h){if(typeof u!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof u);if(u<0||u>=2*(1<<30))throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=s(u);return a&&a.length!==0?typeof h=="string"?p.fill(a,h):p.fill(a):p.fill(0),p}),!e.kStringMaxLength)try{e.kStringMaxLength=o.binding("buffer").kStringMaxLength}catch{}e.constants||(e.constants={MAX_LENGTH:e.kMaxLength},e.kStringMaxLength&&(e.constants.MAX_STRING_LENGTH=e.kStringMaxLength)),l.exports=e}).call(this)}).call(this,t("_process"))},{_process:467,buffer:220}],496:[function(t,l,c){Object.defineProperty(c,"__esModule",{value:!0});const o=t("xmlchars/xml/1.0/ed5"),r=t("xmlchars/xml/1.1/ed2"),n=t("xmlchars/xmlns/1.0/ed3");var s=o.isS,e=o.isChar,i=o.isNameStartChar,u=o.isNameChar,a=o.S_LIST,h=o.NAME_RE,p=r.isChar,m=n.isNCNameStartChar,d=n.isNCNameChar,b=n.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",E={__proto__:null,xml:g,xmlns:S},I={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},D=y=>y===34||y===39,z=[34,39],P=[...z,91,62],B=[...z,60,93],F=[61,63,...a],W=[...a,62,38,60];function q(y,w,x){switch(w){case"xml":x!==g&&y.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":x!==S&&y.fail(`xmlns prefix must be bound to ${S}.`)}switch(x){case S:y.fail(w===""?`the default namespace may not be set to ${x}.`:`may not assign a prefix (even "xmlns") to the URI ${S}.`);break;case g:switch(w){case"xml":break;case"":y.fail(`the default namespace may not be set to ${x}.`);break;default:y.fail("may not assign the xml namespace to another prefix.")}}}const A=y=>b.test(y),M=y=>h.test(y);c.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const k={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};c.SaxesParser=class{constructor(y){this.opt=y??{},this.fragmentOpt=!!this.opt.fragment;const w=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,w){this.nameStartCheck=m,this.nameCheck=d,this.isName=A,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},E);const x=this.opt.additionalNamespaces;x!=null&&((function(_,T){for(const O of Object.keys(T))q(_,O,T[O])})(this,x),Object.assign(this.ns,x))}else this.nameStartCheck=i,this.nameCheck=u,this.isName=M,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var y;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:w}=this;this.state=w?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=w,this.xmlDeclPossible=!w,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:x}=this.opt;if(x===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");x="1.0"}this.setXMLVersion(x),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(I),(y=this.readyHandler)===null||y===void 0||y.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(y,w){this[k[y]]=w}off(y){this[k[y]]=void 0}makeError(y){var w;let x=(w=this.fileName)!==null&&w!==void 0?w:"";return this.trackPosition&&(x.length>0&&(x+=":"),x+=`${this.line}:${this.column}`),x.length>0&&(x+=": "),new Error(x+y)}fail(y){const w=this.makeError(y),x=this.errorHandler;if(x===void 0)throw w;return x(w),this}write(y){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let w=!1;y===null?(w=!0,y=""):typeof y=="object"&&(y=y.toString()),this.carriedFromPrevious!==void 0&&(y=`${this.carriedFromPrevious}${y}`,this.carriedFromPrevious=void 0);let x=y.length;const _=y.charCodeAt(x-1);!w&&(_===13||_>=55296&&_<=56319)&&(this.carriedFromPrevious=y[x-1],x--,y=y.slice(0,x));const{stateTable:T}=this;for(this.chunk=y,this.i=0;this.i<x;)T[this.state].call(this);return this.chunkPosition+=x,w?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>=32||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return y.charCodeAt(w+1)===10&&(this.i=w+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCode11(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>31&&x<127||x>159&&x!==8232||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const T=y.charCodeAt(w+1);T!==10&&T!==133||(this.i=w+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCodeNorm(){const y=this.getCode();return y===-2?10:y}unget(){this.i=this.prevI,this.column--}captureTo(y){let{i:w}=this;const{chunk:x}=this;for(;;){const _=this.getCode(),T=_===-2,O=T?10:_;if(O===-1||y.includes(O))return this.text+=x.slice(w,this.prevI),O;T&&(this.text+=x.slice(w,this.prevI)+`
|
|
278
278
|
`,w=this.i)}}captureToChar(y){let{i:w}=this;const{chunk:x}=this;for(;;){let _=this.getCode();switch(_){case-2:this.text+=x.slice(w,this.prevI)+`
|
|
@@ -499,7 +499,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
499
499
|
${t.join(" ")}
|
|
500
500
|
ondragstart="return false;"
|
|
501
501
|
>
|
|
502
|
-
`,super.connectedCallback(),tt(this,Ke,this.shadowRoot.querySelector("input")),f(this,Ke).addEventListener("keydown",f(this,$h)),f(this,Ke).addEventListener("compositionstart",c=>{c.target.selectionStart==c.target.selectionEnd&&f(this,Wr)&&H.getByteLength(c.target.value)>=Number(f(this,Wr))&&(c.target.value=H.cut(c.target.value,Number(f(this,Wr))),this.value=c.target.value)}),f(this,Ke).addEventListener("compositionupdate",c=>{f(this,ms)=="number"&&(c.target.value=c.target.value.replace(c.data,""))}),f(this,Ke).addEventListener("compositionend",c=>{}),f(this,Ke).addEventListener("keydown",c=>{c.isComposing||c.keyCode===229||(["Enter","Escape"].includes(c.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown","ArrowUp","ArrowDown"].includes(c.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(c)))})}}Ke=new WeakMap,ms=new WeakMap,Wr=new WeakMap,Ds=new WeakMap,gn=new WeakMap,ts=new WeakMap,$h=new WeakMap,customElements.get("ng-input")||customElements.define("ng-input",jd);class $d{constructor(C){Y(this,ke);Y(this,di);Y(this,bn);Y(this,yn);Y(this,vn);Y(this,Bs,[]);it(this,"getHeight",C=>{const t=parseInt(C/f(this,ke).template.length);if(t<0||t>=f(this,ke).data.count())return 32;const l=f(this,ke).data.__ng(t);return l?l.height[parseInt(C%f(this,ke).template.length)]:32});it(this,"setHeight",(C,t)=>{f(this,ke).data.get(parseInt(C/f(this,ke).template.length)).__ng.height[parseInt(C%f(this,ke).template.length)]=t});Y(this,fi,C=>typeof C=="object"&&C.tagName=="TR"?parseInt(C.getAttribute("data-row"))*f(this,ke).template.length+C.sectionRowIndex%f(this,ke).template.length:C);it(this,"attr",(C,t,l,c)=>{t=f(this,fi).call(this,t);var o=parseInt(t/f(this,ke).template.length),r=f(this,ke).data.get(o,"rowid"),n=t%f(this,ke).template.length,s=H.decode(C,"head",f(this,bn),"foot",f(this,vn),f(this,yn)),e=s.findIndex(u=>u.rowid==r&&u.subrow==n);if(c)if(e<0){var i={rowid:r,subrow:n,cells:[]};i[l]=c,s.push(i)}else s[e][l]=c;else return e<0?null:s[e][l]});it(this,"height",(C,t,l)=>{var c=this.attr(C,t,"height",l);return c||(c=$(f(this,ke).template[f(this,fi).call(this,t)%f(this,ke).template.length]).height()),c});it(this,"attr2",(C,t,l,c,o)=>{l=f(this,fi).call(this,l);var r=parseInt(l/f(this,ke).template.length),n=C&&C.hasOwnProperty("rowid")?C[r].rowid:null,s=l%f(this,ke).template.length,e=H.decode(t,"head",f(this,bn),"foot",f(this,vn),f(this,yn)),i=e.findIndex(a=>a.rowid==n&&a.subrow==s);if(o)if(i<0){var u={rowid:n,subrow:s,cells:[]};u[c]=o,e.push(u)}else e[i][c]=o;else return i<0?null:e[i][c]});it(this,"height2",(C,t,l,c)=>{var o=this.attr2(C,t,l,"height",c);return o||(o=$(f(this,ke).template[f(this,fi).call(this,l)%f(this,ke).template.length]).height()),o});tt(this,ke,C),tt(this,di,-1),tt(this,bn,[]),tt(this,yn,[]),tt(this,vn,[]),this.head={attr:(t,l,c)=>this.attr("head",t,l,c),height:(t,l)=>this.height("head",t,l)},this.body={attr:(t,l,c)=>this.attr("body",t,l,c),height:(t,l)=>this.height("body",t,l),height2:(t,l,c)=>this.height2(t,"body",l,c)},this.foot={attr:(t,l,c)=>this.attr("foot",t,l,c),height:(t,l)=>this.height("foot",t,l)},tt(this,Bs,[0])}get row(){return f(this,di)}set row(C){tt(this,di,parseInt(C)),f(this,ke).selection.selectedStartRow==f(this,ke).selection.selectedEndRow&&(f(this,ke).selection.selectedStartRow=f(this,ke).selection.selectedEndRow=f(this,ke).selection.startRow=f(this,di))}updateCumulativeHeights(){
|
|
502
|
+
`,super.connectedCallback(),tt(this,Ke,this.shadowRoot.querySelector("input")),f(this,Ke).addEventListener("keydown",f(this,$h)),f(this,Ke).addEventListener("compositionstart",c=>{c.target.selectionStart==c.target.selectionEnd&&f(this,Wr)&&H.getByteLength(c.target.value)>=Number(f(this,Wr))&&(c.target.value=H.cut(c.target.value,Number(f(this,Wr))),this.value=c.target.value)}),f(this,Ke).addEventListener("compositionupdate",c=>{f(this,ms)=="number"&&(c.target.value=c.target.value.replace(c.data,""))}),f(this,Ke).addEventListener("compositionend",c=>{}),f(this,Ke).addEventListener("keydown",c=>{c.isComposing||c.keyCode===229||(["Enter","Escape"].includes(c.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown","ArrowUp","ArrowDown"].includes(c.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(c)))})}}Ke=new WeakMap,ms=new WeakMap,Wr=new WeakMap,Ds=new WeakMap,gn=new WeakMap,ts=new WeakMap,$h=new WeakMap,customElements.get("ng-input")||customElements.define("ng-input",jd);class $d{constructor(C){Y(this,ke);Y(this,di);Y(this,bn);Y(this,yn);Y(this,vn);Y(this,Bs,[]);it(this,"getHeight",C=>{const t=parseInt(C/f(this,ke).template.length);if(t<0||t>=f(this,ke).data.count())return 32;const l=f(this,ke).data.__ng(t);return l?l.height[parseInt(C%f(this,ke).template.length)]:32});it(this,"setHeight",(C,t)=>{f(this,ke).data.get(parseInt(C/f(this,ke).template.length)).__ng.height[parseInt(C%f(this,ke).template.length)]=t});Y(this,fi,C=>typeof C=="object"&&C.tagName=="TR"?parseInt(C.getAttribute("data-row"))*f(this,ke).template.length+C.sectionRowIndex%f(this,ke).template.length:C);it(this,"attr",(C,t,l,c)=>{t=f(this,fi).call(this,t);var o=parseInt(t/f(this,ke).template.length),r=f(this,ke).data.get(o,"rowid"),n=t%f(this,ke).template.length,s=H.decode(C,"head",f(this,bn),"foot",f(this,vn),f(this,yn)),e=s.findIndex(u=>u.rowid==r&&u.subrow==n);if(c)if(e<0){var i={rowid:r,subrow:n,cells:[]};i[l]=c,s.push(i)}else s[e][l]=c;else return e<0?null:s[e][l]});it(this,"height",(C,t,l)=>{var c=this.attr(C,t,"height",l);return c||(c=$(f(this,ke).template[f(this,fi).call(this,t)%f(this,ke).template.length]).height()),c});it(this,"attr2",(C,t,l,c,o)=>{l=f(this,fi).call(this,l);var r=parseInt(l/f(this,ke).template.length),n=C&&C.hasOwnProperty("rowid")?C[r].rowid:null,s=l%f(this,ke).template.length,e=H.decode(t,"head",f(this,bn),"foot",f(this,vn),f(this,yn)),i=e.findIndex(a=>a.rowid==n&&a.subrow==s);if(o)if(i<0){var u={rowid:n,subrow:s,cells:[]};u[c]=o,e.push(u)}else e[i][c]=o;else return i<0?null:e[i][c]});it(this,"height2",(C,t,l,c)=>{var o=this.attr2(C,t,l,"height",c);return o||(o=$(f(this,ke).template[f(this,fi).call(this,l)%f(this,ke).template.length]).height()),o});tt(this,ke,C),tt(this,di,-1),tt(this,bn,[]),tt(this,yn,[]),tt(this,vn,[]),this.head={attr:(t,l,c)=>this.attr("head",t,l,c),height:(t,l)=>this.height("head",t,l)},this.body={attr:(t,l,c)=>this.attr("body",t,l,c),height:(t,l)=>this.height("body",t,l),height2:(t,l,c)=>this.height2(t,"body",l,c)},this.foot={attr:(t,l,c)=>this.attr("foot",t,l,c),height:(t,l)=>this.height("foot",t,l)},tt(this,Bs,[0])}get row(){return f(this,di)}set row(C){tt(this,di,parseInt(C)),f(this,ke).selection.selectedStartRow==f(this,ke).selection.selectedEndRow&&(f(this,ke).selection.selectedStartRow=f(this,ke).selection.selectedEndRow=f(this,ke).selection.startRow=f(this,di))}updateCumulativeHeights(){Sr.log("***********************====================="),Sr.log(f(this,ke).data),tt(this,Bs,[0]);let C=0;const t=f(this,ke).data.count();for(let l=0;l<t;l++){let c=0;for(let o=0;o<f(this,ke).template.length;o++)c+=this.getHeight(l*f(this,ke).template.length+o);C+=c,f(this,Bs).push(C)}Sr.log(f(this,Bs))}getRowInfoAt(C){const t=f(this,Bs);if(!t||t.length<2)return{index:0,offset:Math.max(0,C)};let l=0,c=t.length-2,o=0;const r=Math.max(0,Math.min(C,t[t.length-1]));for(Sr.log(r,l,c,t);l<=c;){let n=Math.floor((l+c)/2);t[n]<=r?(o=n,l=n+1):c=n-1}return Sr.log(r,l,c,t),o=Math.max(0,Math.min(o,t.length-2)),{index:o,offset:r-(t[o]||0)}}}ke=new WeakMap,di=new WeakMap,bn=new WeakMap,yn=new WeakMap,vn=new WeakMap,Bs=new WeakMap,fi=new WeakMap;class Ld extends HTMLElement{constructor(){super();Y(this,es);Y(this,rs);it(this,"popup",()=>{setTimeout(()=>{f(this,rs).data.assign(f(this,es).data.get()),this.shadowRoot.querySelector("dialog").showModal()},100)});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,es,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
503
503
|
<style>
|
|
504
504
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ninegrid.css";
|
|
505
505
|
:host {
|
|
@@ -514,14 +514,14 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
514
514
|
${f(this,es).originFormat}
|
|
515
515
|
</nx-dialog>
|
|
516
516
|
`,tt(this,rs,this.shadowRoot.querySelector("nine-grid")),f(this,rs).removeAttribute("display-row-count"),$(".reset",this.shadowRoot).on("click",t=>{f(this,rs).data.assign(f(this,es).data.get())}),$(".apply",this.shadowRoot).on("click",t=>{var l=f(this,rs).data.getChangedData();f(this,es).data.add(l.insert);for(var c of l.update)f(this,es).data.update(c);for(var c of l.delete)f(this,es).data.delete(c);f(this,rs).data.changeRowState()}),this.shadowRoot.addEventListener("click",t=>{f(this,rs).data.isChanged()&&(t.stopImmediatePropagation(),H.confirm(`There is changed data.
|
|
517
|
-
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(l=>{l&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}es=new WeakMap,rs=new WeakMap,customElements.get("ng-max-popup")||customElements.define("ng-max-popup",Ld);class Pd extends HTMLElement{constructor(){super();Y(this,Lt);Y(this,ia);Y(this,Lh);tt(this,ia,new Md(f(this,Lt))),tt(this,Lh,new ku(f(this,Lt)))}connectedCallback(){tt(this,Lt,this.getRootNode().host.getRootNode().host),this.innerHTML="";var t=new sd({owner:f(this,Lt),items:{filtering:{name:"Filtering",className:"ng-menu-filtering"},maximize:{name:"Maximize",className:"maximize"},export:{name:"export",items:{"export-excel":{name:"Excel",className:"export-excel"},"export-pdf":{name:"Pdf",className:"export-pdf",disabled:function(l,c){return!0}}}},import:{name:"import",className:"import",disabled:function(l,c){return!0}},properties:{name:"options",items:{"show-title-bar":{name:"title bar show/hide",className:"show-title-bar"},"show-menu-icon":{name:"menu icon show/hide",className:"show-menu-icon"},"show-status-bar":{name:"status bar show/hide",className:"show-status-bar"},"show-tfoot":{name:"table footer show/hide",className:"show-tfoot",disabled:function(l,c){return!($(".ng-table tfoot",this.getRootNode().host).length>0)}},"select-type":{name:"select type",items:{[`select-type-${H.SELECTTYPE.ROW}`]:{name:"row",className:`select-type select-type-${H.SELECTTYPE.ROW}`},[`select-type-${H.SELECTTYPE.ROWS}`]:{name:"multi row",className:`select-type select-type-${H.SELECTTYPE.ROWS}`},[`select-type-${H.SELECTTYPE.COL}`]:{name:"column",className:`select-type select-type-${H.SELECTTYPE.COL}`},[`select-type-${H.SELECTTYPE.COLS}`]:{name:"multi column",className:`select-type select-type-${H.SELECTTYPE.COLS}`},[`select-type-${H.SELECTTYPE.CELL}`]:{name:"cell",className:`select-type select-type-${H.SELECTTYPE.CELL}`},[`select-type-${H.SELECTTYPE.AREA}`]:{name:"area",className:`select-type select-type-${H.SELECTTYPE.AREA}`},[`select-type-${H.SELECTTYPE.NONE}`]:{name:"none",className:`select-type select-type-${H.SELECTTYPE.NONE}`}}},"paging-type":{name:"paging type",items:{[`paging-type-${H.PAGINGTYPE.NONE}`]:{name:"none",className:`paging-type paging-type-${H.PAGINGTYPE.NONE}`},[`paging-type-${H.PAGINGTYPE.CLIENT}`]:{name:"client",className:`paging-type paging-type-${H.PAGINGTYPE.CLIENT}`},[`paging-type-${H.PAGINGTYPE.SERVER}`]:{name:"server",className:`paging-type paging-type-${H.PAGINGTYPE.SERVER}`},"paging-count":{name:"entries per page",items:{[`paging-count-${H.PAGINGCOUNT.AUTO}`]:{name:"auto",className:`paging-count paging-count-${H.PAGINGCOUNT.AUTO}`},[`paging-count-${H.PAGINGCOUNT.NUM_1}`]:{name:"1",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1}`},[`paging-count-${H.PAGINGCOUNT.NUM_5}`]:{name:"5",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_5}`},[`paging-count-${H.PAGINGCOUNT.NUM_10}`]:{name:"10",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10}`},[`paging-count-${H.PAGINGCOUNT.NUM_20}`]:{name:"20",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_20}`},[`paging-count-${H.PAGINGCOUNT.NUM_30}`]:{name:"30",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_30}`},[`paging-count-${H.PAGINGCOUNT.NUM_50}`]:{name:"50",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_50}`},[`paging-count-${H.PAGINGCOUNT.NUM_100}`]:{name:"100",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_100}`},[`paging-count-${H.PAGINGCOUNT.NUM_1000}`]:{name:"1000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1000}`},[`paging-count-${H.PAGINGCOUNT.NUM_10000}`]:{name:"10000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10000}`}}}}},"auto-fit-col":{name:"auto fit columns",className:"auto-fit-col"}}}},callback:l=>{switch(l.menuId){case"maximize":$("ng-max-popup",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-max-popup></ng-max-popup>")),f(this,Lt).shadowRoot.querySelector("ng-max-popup").popup();break;case"import":f(this,ia).importExcel();break;case"export-excel":f(this,Lt).export();break;case"export-pdf":$("ng-export",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-export></ng-export>")),f(this,Lt).shadowRoot.querySelector("ng-export").exportPdf();break;case"detail":break;case"filtering":f(this,Lt).filtering.isFiltering()?f(this,Lt).filtering.off():f(this,Lt).filtering.on();break;case`select-type-${H.SELECTTYPE.ROW}`:case`select-type-${H.SELECTTYPE.ROWS}`:case`select-type-${H.SELECTTYPE.COL}`:case`select-type-${H.SELECTTYPE.COLS}`:case`select-type-${H.SELECTTYPE.CELL}`:case`select-type-${H.SELECTTYPE.AREA}`:case`select-type-${H.SELECTTYPE.NONE}`:f(this,Lt).setAttribute("select-type",l.menuId.replace("select-type-",""));break;case"show-title-bar":f(this,Lt).setAttribute("show-title-bar",f(this,Lt).getAttribute("show-title-bar")=="true"?"false":"true");break;case"show-menu-icon":f(this,Lt).setAttribute("show-menu-icon",f(this,Lt).getAttribute("show-menu-icon")=="true"?"false":"true");break;case"show-status-bar":f(this,Lt).setAttribute("show-status-bar",f(this,Lt).getAttribute("show-status-bar")=="true"?"false":"true");break;case`paging-type-${H.PAGINGTYPE.NONE}`:case`paging-type-${H.PAGINGTYPE.CLIENT}`:case`paging-type-${H.PAGINGTYPE.SERVER}`:f(this,Lt).setAttribute("paging-type",l.menuId.replace("paging-type-",""));break;case`paging-count-${H.PAGINGCOUNT.AUTO}`:case`paging-count-${H.PAGINGCOUNT.NUM_1}`:case`paging-count-${H.PAGINGCOUNT.NUM_5}`:case`paging-count-${H.PAGINGCOUNT.NUM_10}`:case`paging-count-${H.PAGINGCOUNT.NUM_20}`:case`paging-count-${H.PAGINGCOUNT.NUM_30}`:case`paging-count-${H.PAGINGCOUNT.NUM_50}`:case`paging-count-${H.PAGINGCOUNT.NUM_100}`:case`paging-count-${H.PAGINGCOUNT.NUM_1000}`:case`paging-count-${H.PAGINGCOUNT.NUM_10000}`:f(this,Lt).setAttribute("paging-count",l.menuId.replace("paging-count-",""));break;case"col-indicator-type":f(this,Lt).setAttribute("col-indicator-type",f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.COLINDICATORTYPE.COLLAPSE:H.COLINDICATORTYPE.EXPAND);break;case"auto-fit-col":f(this,Lt).setAttribute("auto-fit-col",f(this,Lt).getAttribute("auto-fit-col")=="true"?"false":"true");break;case"show-tfoot":f(this,Lt).setAttribute("show-tfoot",f(this,Lt).getAttribute("show-tfoot")=="true"?"false":"true");break;default:console.log(l.menuId)}},events:{show:l=>{H.j.querySelectorAll(f(this,Lt)).hasClass("ng-maximize")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-title-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-menu-icon")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-status-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll("ng-context-menu-panel .select-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .select-type-${f(this,Lt).getAttribute("select-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-type-${f(this,Lt).getAttribute("paging-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-count",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-count-${f(this,Lt).getAttribute("paging-count")}`,f(this,Lt).shadowRoot).addClass("on"),f(this,Lt).filtering.isFiltering()?H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("auto-fit-col")=="true"?H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).removeClass("on");const c=f(this,Lt).body.querySelector(".ng-table tfoot"),o=H.j.querySelectorAll("ng-context-menu-panel .show-tfoot",f(this,Lt).shadowRoot);c?(o.removeClass("disabled"),c.style.visibility=="collapse"?o.removeClass("on"):o.addClass("on")):o.addClass("disabled"),typeof ExcelJS>"u"&&H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-excel",f(this,Lt).shadowRoot).addClass("disabled"),H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-pdf",f(this,Lt).shadowRoot).addClass("disabled"),f(this,Lt).closest("dialog")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("disabled"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("disabled")},hide:()=>{}}});$(f(this,Lt).shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-menu")).on("click",l=>{t.openMenu(l.offsetX,l.offsetY)})}}Lt=new WeakMap,ia=new WeakMap,Lh=new WeakMap,customElements.get("ng-menu")||customElements.define("ng-menu",Pd);class Dd extends HTMLElement{constructor(){super();Y(this,Fe);Y(this,na);Y(this,oa);Y(this,Rr);Y(this,aa);Y(this,We);Y(this,rr);Y(this,Fs);it(this,"refreshTotal",()=>{});Y(this,Ph,()=>{f(this,Fe).data.getValidDataNF().map(t=>{t.__ng.paging=!0}),f(this,Fe).data.resetRecords()});Y(this,wn,()=>{this.type==H.PAGINGTYPE.CLIENT?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fe).data.countNF().toLocaleString()}`):this.type==H.PAGINGTYPE.SERVER?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fs).toLocaleString()}`):this.type==H.PAGINGTYPE.NONE&&$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fs).toLocaleString()}`),f(this,rr)==0?$("span",this).eq(0).html(""):$("span",this).eq(0).html(`${f(this,We).toLocaleString()} <i>of</i> ${f(this,rr).toLocaleString()}`),H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1)});Y(this,Dh,()=>{this.type==H.PAGINGTYPE.CLIENT?this.movePage(Math.ceil(f(this,Fe).data.countNF()/f(this,Rr))):this.type==H.PAGINGTYPE.SERVER&&this.movePage(Math.ceil(f(this,Fs)/f(this,Rr)))});it(this,"movePage",t=>{if(!(!f(this,Fe)||!f(this,Fe).data||isNaN(t))){if(this.type==H.PAGINGTYPE.SERVER&&(H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",!0)),tt(this,aa,f(this,We)),tt(this,We,t),this.type==H.PAGINGTYPE.CLIENT){var l=f(this,Fe).data.getValidDataNF();if(tt(this,rr,Math.ceil(l.length/f(this,Rr))),l.length==0)tt(this,rr,0);else if(t<1||t>f(this,rr))throw`1invalid page ${t} of ${f(this,rr)}`;f(this,wn).call(this),l.map(o=>{o.__ng.paging=!1});for(var c=(f(this,We)-1)*f(this,Rr);c<Math.min(f(this,We)*f(this,Rr),f(this,Fe).data.countNF());c++)l[c].__ng.paging=!0;f(this,Fe).data.resetRecords(),f(this,Fe).scrollTo_V1(0)}this.type==H.PAGINGTYPE.SERVER&&f(this,aa)!=f(this,We)&&(this.onpagechanged.pageIndex=f(this,We),this.onpagechanged.pageCnt=f(this,Rr),f(this,Fe).dispatchEvent(this.onpagechanged))}});it(this,"reset",()=>{this.refresh()});it(this,"refresh",()=>{switch(this.type){case H.PAGINGTYPE.NONE:f(this,Ph).call(this),$(".ng-container tbody tr.bindable:not(.nodata)",f(this,Fe).body).remove(),f(this,Fe).scrollTo_V1(0);break;case H.PAGINGTYPE.CLIENT:this.movePage(1),f(this,Fe).refresh();break;case H.PAGINGTYPE.SERVER:break}f(this,wn).call(this)});tt(this,Fe,this.getRootNode().host.getRootNode().host),tt(this,We,0),tt(this,rr,0),tt(this,Fs,0),this.onpagechanged=new CustomEvent("pagechanged",{bubbles:!0,detail:{}})}connectedCallback(){this.innerHTML=`
|
|
517
|
+
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(l=>{l&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}es=new WeakMap,rs=new WeakMap,customElements.get("ng-max-popup")||customElements.define("ng-max-popup",Ld);class Pd extends HTMLElement{constructor(){super();Y(this,Lt);Y(this,ia);Y(this,Lh);tt(this,ia,new Md(f(this,Lt))),tt(this,Lh,new ku(f(this,Lt)))}connectedCallback(){tt(this,Lt,this.getRootNode().host.getRootNode().host),this.innerHTML="";var t=new sd({owner:f(this,Lt),items:{filtering:{name:"Filtering",className:"ng-menu-filtering"},maximize:{name:"Maximize",className:"maximize"},export:{name:"export",items:{"export-excel":{name:"Excel",className:"export-excel"},"export-pdf":{name:"Pdf",className:"export-pdf",disabled:function(l,c){return!0}}}},import:{name:"import",className:"import",disabled:function(l,c){return!0}},properties:{name:"options",items:{"show-title-bar":{name:"title bar show/hide",className:"show-title-bar"},"show-menu-icon":{name:"menu icon show/hide",className:"show-menu-icon"},"show-status-bar":{name:"status bar show/hide",className:"show-status-bar"},"show-tfoot":{name:"table footer show/hide",className:"show-tfoot",disabled:function(l,c){return!($(".ng-table tfoot",this.getRootNode().host).length>0)}},"select-type":{name:"select type",items:{[`select-type-${H.SELECTTYPE.ROW}`]:{name:"row",className:`select-type select-type-${H.SELECTTYPE.ROW}`},[`select-type-${H.SELECTTYPE.ROWS}`]:{name:"multi row",className:`select-type select-type-${H.SELECTTYPE.ROWS}`},[`select-type-${H.SELECTTYPE.COL}`]:{name:"column",className:`select-type select-type-${H.SELECTTYPE.COL}`},[`select-type-${H.SELECTTYPE.COLS}`]:{name:"multi column",className:`select-type select-type-${H.SELECTTYPE.COLS}`},[`select-type-${H.SELECTTYPE.CELL}`]:{name:"cell",className:`select-type select-type-${H.SELECTTYPE.CELL}`},[`select-type-${H.SELECTTYPE.AREA}`]:{name:"area",className:`select-type select-type-${H.SELECTTYPE.AREA}`},[`select-type-${H.SELECTTYPE.NONE}`]:{name:"none",className:`select-type select-type-${H.SELECTTYPE.NONE}`}}},"paging-type":{name:"paging type",items:{[`paging-type-${H.PAGINGTYPE.NONE}`]:{name:"none",className:`paging-type paging-type-${H.PAGINGTYPE.NONE}`},[`paging-type-${H.PAGINGTYPE.CLIENT}`]:{name:"client",className:`paging-type paging-type-${H.PAGINGTYPE.CLIENT}`},[`paging-type-${H.PAGINGTYPE.SERVER}`]:{name:"server",className:`paging-type paging-type-${H.PAGINGTYPE.SERVER}`},"paging-count":{name:"entries per page",items:{[`paging-count-${H.PAGINGCOUNT.AUTO}`]:{name:"auto",className:`paging-count paging-count-${H.PAGINGCOUNT.AUTO}`},[`paging-count-${H.PAGINGCOUNT.NUM_1}`]:{name:"1",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1}`},[`paging-count-${H.PAGINGCOUNT.NUM_5}`]:{name:"5",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_5}`},[`paging-count-${H.PAGINGCOUNT.NUM_10}`]:{name:"10",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10}`},[`paging-count-${H.PAGINGCOUNT.NUM_20}`]:{name:"20",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_20}`},[`paging-count-${H.PAGINGCOUNT.NUM_30}`]:{name:"30",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_30}`},[`paging-count-${H.PAGINGCOUNT.NUM_50}`]:{name:"50",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_50}`},[`paging-count-${H.PAGINGCOUNT.NUM_100}`]:{name:"100",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_100}`},[`paging-count-${H.PAGINGCOUNT.NUM_1000}`]:{name:"1000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1000}`},[`paging-count-${H.PAGINGCOUNT.NUM_10000}`]:{name:"10000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10000}`}}}}},"auto-fit-col":{name:"auto fit columns",className:"auto-fit-col"}}}},callback:l=>{switch(l.menuId){case"maximize":$("ng-max-popup",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-max-popup></ng-max-popup>")),f(this,Lt).shadowRoot.querySelector("ng-max-popup").popup();break;case"import":f(this,ia).importExcel();break;case"export-excel":f(this,Lt).export();break;case"export-pdf":$("ng-export",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-export></ng-export>")),f(this,Lt).shadowRoot.querySelector("ng-export").exportPdf();break;case"detail":break;case"filtering":f(this,Lt).filtering.isFiltering()?f(this,Lt).filtering.off():f(this,Lt).filtering.on();break;case`select-type-${H.SELECTTYPE.ROW}`:case`select-type-${H.SELECTTYPE.ROWS}`:case`select-type-${H.SELECTTYPE.COL}`:case`select-type-${H.SELECTTYPE.COLS}`:case`select-type-${H.SELECTTYPE.CELL}`:case`select-type-${H.SELECTTYPE.AREA}`:case`select-type-${H.SELECTTYPE.NONE}`:f(this,Lt).setAttribute("select-type",l.menuId.replace("select-type-",""));break;case"show-title-bar":f(this,Lt).setAttribute("show-title-bar",f(this,Lt).getAttribute("show-title-bar")=="true"?"false":"true");break;case"show-menu-icon":f(this,Lt).setAttribute("show-menu-icon",f(this,Lt).getAttribute("show-menu-icon")=="true"?"false":"true");break;case"show-status-bar":f(this,Lt).setAttribute("show-status-bar",f(this,Lt).getAttribute("show-status-bar")=="true"?"false":"true");break;case`paging-type-${H.PAGINGTYPE.NONE}`:case`paging-type-${H.PAGINGTYPE.CLIENT}`:case`paging-type-${H.PAGINGTYPE.SERVER}`:f(this,Lt).setAttribute("paging-type",l.menuId.replace("paging-type-",""));break;case`paging-count-${H.PAGINGCOUNT.AUTO}`:case`paging-count-${H.PAGINGCOUNT.NUM_1}`:case`paging-count-${H.PAGINGCOUNT.NUM_5}`:case`paging-count-${H.PAGINGCOUNT.NUM_10}`:case`paging-count-${H.PAGINGCOUNT.NUM_20}`:case`paging-count-${H.PAGINGCOUNT.NUM_30}`:case`paging-count-${H.PAGINGCOUNT.NUM_50}`:case`paging-count-${H.PAGINGCOUNT.NUM_100}`:case`paging-count-${H.PAGINGCOUNT.NUM_1000}`:case`paging-count-${H.PAGINGCOUNT.NUM_10000}`:f(this,Lt).setAttribute("paging-count",l.menuId.replace("paging-count-",""));break;case"col-indicator-type":f(this,Lt).setAttribute("col-indicator-type",f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.COLINDICATORTYPE.COLLAPSE:H.COLINDICATORTYPE.EXPAND);break;case"auto-fit-col":f(this,Lt).setAttribute("auto-fit-col",f(this,Lt).getAttribute("auto-fit-col")=="true"?"false":"true");break;case"show-tfoot":f(this,Lt).setAttribute("show-tfoot",f(this,Lt).getAttribute("show-tfoot")=="true"?"false":"true");break;default:console.log(l.menuId)}},events:{show:l=>{H.j.querySelectorAll(f(this,Lt)).hasClass("ng-maximize")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-title-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-menu-icon")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-status-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll("ng-context-menu-panel .select-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .select-type-${f(this,Lt).getAttribute("select-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-type-${f(this,Lt).getAttribute("paging-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-count",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-count-${f(this,Lt).getAttribute("paging-count")}`,f(this,Lt).shadowRoot).addClass("on"),f(this,Lt).filtering.isFiltering()?H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("auto-fit-col")=="true"?H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).removeClass("on");const c=f(this,Lt).body.querySelector(".ng-table tfoot"),o=H.j.querySelectorAll("ng-context-menu-panel .show-tfoot",f(this,Lt).shadowRoot);c?(o.removeClass("disabled"),c.style.visibility=="collapse"?o.removeClass("on"):o.addClass("on")):o.addClass("disabled"),typeof ExcelJS>"u"&&H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-excel",f(this,Lt).shadowRoot).addClass("disabled"),H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-pdf",f(this,Lt).shadowRoot).addClass("disabled"),f(this,Lt).closest("dialog")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("disabled"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("disabled")},hide:()=>{}}});$(f(this,Lt).shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-menu")).on("click",l=>{t.openMenu(l.offsetX,l.offsetY)})}}Lt=new WeakMap,ia=new WeakMap,Lh=new WeakMap,customElements.get("ng-menu")||customElements.define("ng-menu",Pd);class Dd extends HTMLElement{constructor(){super();Y(this,Fe);Y(this,na);Y(this,oa);Y(this,Mr);Y(this,aa);Y(this,We);Y(this,rr);Y(this,Fs);it(this,"refreshTotal",()=>{});Y(this,Ph,()=>{f(this,Fe).data.getValidDataNF().map(t=>{t.__ng.paging=!0}),f(this,Fe).data.resetRecords()});Y(this,wn,()=>{this.type==H.PAGINGTYPE.CLIENT?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fe).data.countNF().toLocaleString()}`):this.type==H.PAGINGTYPE.SERVER?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fs).toLocaleString()}`):this.type==H.PAGINGTYPE.NONE&&$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fs).toLocaleString()}`),f(this,rr)==0?$("span",this).eq(0).html(""):$("span",this).eq(0).html(`${f(this,We).toLocaleString()} <i>of</i> ${f(this,rr).toLocaleString()}`),H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1)});Y(this,Dh,()=>{this.type==H.PAGINGTYPE.CLIENT?this.movePage(Math.ceil(f(this,Fe).data.countNF()/f(this,Mr))):this.type==H.PAGINGTYPE.SERVER&&this.movePage(Math.ceil(f(this,Fs)/f(this,Mr)))});it(this,"movePage",t=>{if(!(!f(this,Fe)||!f(this,Fe).data||isNaN(t))){if(this.type==H.PAGINGTYPE.SERVER&&(H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",!0)),tt(this,aa,f(this,We)),tt(this,We,t),this.type==H.PAGINGTYPE.CLIENT){var l=f(this,Fe).data.getValidDataNF();if(tt(this,rr,Math.ceil(l.length/f(this,Mr))),l.length==0)tt(this,rr,0);else if(t<1||t>f(this,rr))throw`1invalid page ${t} of ${f(this,rr)}`;f(this,wn).call(this),l.map(o=>{o.__ng.paging=!1});for(var c=(f(this,We)-1)*f(this,Mr);c<Math.min(f(this,We)*f(this,Mr),f(this,Fe).data.countNF());c++)l[c].__ng.paging=!0;f(this,Fe).data.resetRecords(),f(this,Fe).scrollTo_V1(0)}this.type==H.PAGINGTYPE.SERVER&&f(this,aa)!=f(this,We)&&(this.onpagechanged.pageIndex=f(this,We),this.onpagechanged.pageCnt=f(this,Mr),f(this,Fe).dispatchEvent(this.onpagechanged))}});it(this,"reset",()=>{this.refresh()});it(this,"refresh",()=>{switch(this.type){case H.PAGINGTYPE.NONE:f(this,Ph).call(this),$(".ng-container tbody tr.bindable:not(.nodata)",f(this,Fe).body).remove(),f(this,Fe).scrollTo_V1(0);break;case H.PAGINGTYPE.CLIENT:this.movePage(1),f(this,Fe).refresh();break;case H.PAGINGTYPE.SERVER:break}f(this,wn).call(this)});tt(this,Fe,this.getRootNode().host.getRootNode().host),tt(this,We,0),tt(this,rr,0),tt(this,Fs,0),this.onpagechanged=new CustomEvent("pagechanged",{bubbles:!0,detail:{}})}connectedCallback(){this.innerHTML=`
|
|
518
518
|
<button class="ng-paging-last" disabled></button>
|
|
519
519
|
<button class="ng-paging-next" disabled></button>
|
|
520
520
|
<span></span>
|
|
521
521
|
<button class="ng-paging-prev" disabled></button>
|
|
522
522
|
<button class="ng-paging-first" disabled></button>
|
|
523
523
|
<span></span>
|
|
524
|
-
`,$(".ng-paging-first",this).on("click",t=>this.movePage(1)),$(".ng-paging-prev",this).on("click",t=>this.movePage(f(this,We)-1)),$(".ng-paging-next",this).on("click",t=>this.movePage(f(this,We)+1)),$(".ng-paging-last",this).on("click",t=>f(this,Dh).call(this))}get type(){return f(this,Fe).getAttribute("paging-type")}set type(t){if(!Object.values(H.PAGINGTYPE).includes(t))throw`invalid page type : ${t}`;switch(t){case H.PAGINGTYPE.NONE:$(this).children().show(),$(this).children().not("span:last-child").hide();break;case H.PAGINGTYPE.CLIENT:$(this).children().show();break;case H.PAGINGTYPE.SERVER:$(this).children().show();break}this.refresh()}get currentPage(){return f(this,We)}set currentPage(t){if(this.type!=H.PAGINGTYPE.SERVER)throw'"currentPage" is only allowed when the paging type is server.';tt(this,We,t)}get totalCount(){return f(this,rr)}set totalCount(t){tt(this,Fs,t),f(this,We)<=0&&tt(this,We,1),tt(this,rr,Math.ceil(t/f(this,
|
|
524
|
+
`,$(".ng-paging-first",this).on("click",t=>this.movePage(1)),$(".ng-paging-prev",this).on("click",t=>this.movePage(f(this,We)-1)),$(".ng-paging-next",this).on("click",t=>this.movePage(f(this,We)+1)),$(".ng-paging-last",this).on("click",t=>f(this,Dh).call(this))}get type(){return f(this,Fe).getAttribute("paging-type")}set type(t){if(!Object.values(H.PAGINGTYPE).includes(t))throw`invalid page type : ${t}`;switch(t){case H.PAGINGTYPE.NONE:$(this).children().show(),$(this).children().not("span:last-child").hide();break;case H.PAGINGTYPE.CLIENT:$(this).children().show();break;case H.PAGINGTYPE.SERVER:$(this).children().show();break}this.refresh()}get currentPage(){return f(this,We)}set currentPage(t){if(this.type!=H.PAGINGTYPE.SERVER)throw'"currentPage" is only allowed when the paging type is server.';tt(this,We,t)}get totalCount(){return f(this,rr)}set totalCount(t){tt(this,Fs,t),f(this,We)<=0&&tt(this,We,1),tt(this,rr,Math.ceil(t/f(this,Mr))),f(this,wn).call(this)}get linesPerPage(){return f(this,Mr)}get count(){return f(this,na)}set count(t){setTimeout(()=>{if(tt(this,na,t),t==H.PAGINGCOUNT.AUTO){var l=$(".ng-container-body",f(this,Fe).body).height()-($(".ng-container-body thead",f(this,Fe).body).height()||0)-($(".ng-container-body tfoot",f(this,Fe).body).height()||0),c=0;$(f(this,Fe).template).each((o,r)=>c+=$(r).height()),tt(this,Mr,Math.floor(l/c))}else tt(this,Mr,Number(t));switch(this.type){case H.PAGINGTYPE.NONE:this.refresh();break;case H.PAGINGTYPE.CLIENT:this.refresh();break;case H.PAGINGTYPE.SERVER:this.movePage(1);break}})}get url(){return f(this,oa)}set url(t){tt(this,oa,t)}}Fe=new WeakMap,na=new WeakMap,oa=new WeakMap,Mr=new WeakMap,aa=new WeakMap,We=new WeakMap,rr=new WeakMap,Fs=new WeakMap,Ph=new WeakMap,wn=new WeakMap,Dh=new WeakMap,customElements.get("ng-paging")||customElements.define("ng-paging",Dd);class Bd extends _r{constructor(){super();Y(this,pi);Y(this,la);it(this,"dataRefresh",t=>{f(this,pi).value=this.value,f(this,la).innerHTML=this.getDisplayText(),t||this.reset()})}connectedCallback(){const t=this.getAttribute("back-color")||"transparent",l=this.getAttribute("bar-color")||"green",c=this.getAttribute("show-text")||"true",o=this.getAttribute("text-color")||"unset",r=this.getAttribute("text-shadow")||"unset";for(var n=[],s=0;s<this.attributes.length;s++)["min","max","value"].includes(this.attributes[s].name)&&n.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);this.shadowRoot.innerHTML=`
|
|
525
525
|
<style>
|
|
526
526
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngProgress.css";
|
|
527
527
|
${H.getCustomPath(this,"ngProgress.css")}
|
|
@@ -543,7 +543,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
543
543
|
<progress ${n.join(" ")}></progress>
|
|
544
544
|
<span></span>
|
|
545
545
|
</div>
|
|
546
|
-
`,super.connectedCallback(),tt(this,pi,this.shadowRoot.querySelector("progress")),tt(this,la,this.shadowRoot.querySelector("span")),f(this,pi).getAttribute("max")||f(this,pi).setAttribute("max",100)}}pi=new WeakMap,la=new WeakMap,customElements.get("ng-progress")||customElements.define("ng-progress",Bd);class Fd extends ei{constructor(){super();Y(this,qs);Y(this,
|
|
546
|
+
`,super.connectedCallback(),tt(this,pi,this.shadowRoot.querySelector("progress")),tt(this,la,this.shadowRoot.querySelector("span")),f(this,pi).getAttribute("max")||f(this,pi).setAttribute("max",100)}}pi=new WeakMap,la=new WeakMap,customElements.get("ng-progress")||customElements.define("ng-progress",Bd);class Fd extends ei{constructor(){super();Y(this,qs);Y(this,Dr);Y(this,Hs);Y(this,mi);it(this,"dataRefresh",t=>{f(this,Dr)&&(f(this,Bh).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),$(f(this,qs)).each((l,c)=>{$(c).prop("checked",this.value==c.getAttribute("value"))}),t||this.reset()});Y(this,Bh,()=>{if(H.isNull(this.value))return!0;var t=f(this,Dr).findIndex(l=>this.value==l[f(this,Hs)]);return!(t<0)});Y(this,Fh,()=>{})}async connectedCallback(){tt(this,Hs,this.getAttribute("code")||"code"),tt(this,mi,this.getAttribute("codename")||"codename");var t=this.querySelector("datalist");t&&(tt(this,Dr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,Hs)),e=n.getAttribute(f(this,mi));s&&e&&f(this,Dr).push({[f(this,Hs)]:s,[f(this,mi)]:e})})),this.owner=this.getRootNode().host,this.cell=this.closest("th,td");const l=this.closest("th,td").getAttribute("text-align")||"center",c=l=="left"?"flex-start":l=="right"?"flex-end":"center";var o=this.getAttribute("data-source");o&&this.owner&&this.owner.exprFunction&&(this.owner[o]?tt(this,Dr,this.owner[o]):tt(this,Dr,this.owner.exprFunction(o).call(this,this.owner.data.get(this.cell.dataset.row),this.cell.dataset.row)));var r="";f(this,Dr)&&f(this,Dr).forEach(n=>{r+=`<label><input type="radio" value="${n[f(this,Hs)]}"><span>${n[f(this,mi)]}</span></label>`}),this.shadowRoot.innerHTML=`
|
|
547
547
|
<style>
|
|
548
548
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRadio.css";
|
|
549
549
|
${H.getCustomPath(this,"ngRadio.css")}
|
|
@@ -556,7 +556,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
556
556
|
<div class="ng-wrap">
|
|
557
557
|
${r}
|
|
558
558
|
</div>
|
|
559
|
-
`,super.connectedCallback(),f(this,Fh).call(this),tt(this,qs,this.shadowRoot.querySelectorAll("input")),$(this.cell).on("keydown",n=>{switch(n.preventDefault(),n.code){case"Space":var s=-1;$(f(this,qs)).each((e,i)=>{if(this.value==i.getAttribute("value"))return s=e,!1}),s=s==f(this,qs).length-1?0:s>=0?s+1:0,this.value=f(this,qs)[s].getAttribute("value");break}})}get dataSource(){return f(this,
|
|
559
|
+
`,super.connectedCallback(),f(this,Fh).call(this),tt(this,qs,this.shadowRoot.querySelectorAll("input")),$(this.cell).on("keydown",n=>{switch(n.preventDefault(),n.code){case"Space":var s=-1;$(f(this,qs)).each((e,i)=>{if(this.value==i.getAttribute("value"))return s=e,!1}),s=s==f(this,qs).length-1?0:s>=0?s+1:0,this.value=f(this,qs)[s].getAttribute("value");break}})}get dataSource(){return f(this,Dr)}}qs=new WeakMap,Dr=new WeakMap,Hs=new WeakMap,mi=new WeakMap,Bh=new WeakMap,Fh=new WeakMap,customElements.get("ng-radio")||customElements.define("ng-radio",Fd);class qd extends _r{constructor(){super();Y(this,xn);it(this,"dataRefresh",t=>{f(this,xn)&&(f(this,xn).innerHTML=this.getDisplayText(),t||this.reset())})}connectedCallback(){this.getAttribute("link")=="true";const t=this.closest("th,td").getAttribute("text-align")||"left",l=t=="left"?"flex-start":t=="right"?"flex-end":"center";if(this.cell=this.closest("th,td"),!this.cell)return;const c=this.getAttribute("color")||this.cell.getAttribute("color")||"";this.shadowRoot.innerHTML=`
|
|
560
560
|
<style>
|
|
561
561
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRenderer.css";
|
|
562
562
|
${H.getCustomPath(this,"ngRenderer.css")}
|
|
@@ -652,7 +652,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
652
652
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowState.css";
|
|
653
653
|
${H.getCustomPath(this,"ngRowState.css")}
|
|
654
654
|
</style>
|
|
655
|
-
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Kd);class Zd extends HTMLElement{constructor(){super();Y(this,qt);Y(this,ns);Y(this,ge);Y(this,yr);Y(this,vr);Y(this,Sn);it(this,"refresh",()=>{if(!f(this,qt))return;var t=$(".ng-container-body",f(this,qt).body),l=$(".ng-scroll-thumb",this.shadowRoot),c=$("table > thead",t),o=f(this,qt).dataManager.viewRecords.rawIndex,r=$(f(this,ge).track).height(),n=$(f(this,ge).thumb).height();Number(f(this,qt).getAttribute("display-row-count")||0)>=f(this,qt).dataManager.rawRecords.length||parseInt($(".ng-container .ng-table tr.nodata",f(this,qt).body).height())>0&&(f(this,qt).dataManager.rawRecords.length==0||f(this,qt).dataManager.viewRecords.rawIndex==0)?$(this).hide():$(this).show();var e=Math.min(r*(t.height()-c.height())/(f(this,qt).template.height()*f(this,qt).template.length*f(this,qt).data.count()),r);l[0].dataset.height=e,e<16&&(e=16);var i=r-f(this,Cn).call(this);if(i!=0){e>=r?l.css({top:0,height:e-20}):l.css({height:e});var u;if(f(this,qt).isFirstPage)u=0;else if(f(this,qt).isLastPage)u=r-n-2;else{var a=parseInt($(".ng-container-body tbody.bindable tr",f(this,qt).body).not(".nodata").length/f(this,qt).template.length);u=parseInt(o*i/(f(this,qt).data.count()-a+1)),u>r-n-3&&(u=r-n-3)}f(this,ge).thumb.style.top=u+"px",f(this,ge).top.disabled=!!f(this,qt).isFirstPage,f(this,ge).bottom.disabled=!!f(this,qt).isLastPage,$(this).is(":visible")&&$("ng-hscrollbar",f(this,qt).body).is(":visible")?$(".ng-scroll-edge",f(this,qt).body).show():$(".ng-scroll-edge",f(this,qt).body).hide()}});it(this,"refreshV2",()=>{if(f(this,qt)){var t=$(".ng-scroll-thumb",this.shadowRoot),l=f(this,qt).dataManager.viewRecords.rawIndex,c=this.trackHeight,o=this.thumbHeight,r=Math.min(c*(this.bodyHeight-this.theadHeight)/(this.templateHeight*f(this,qt).template.length*f(this,qt).data.count()),c);t[0].dataset.height=r,r<16&&(r=16);var n=c-f(this,Cn).call(this),s;if(f(this,qt).isFirstPage)s=0;else if(f(this,qt).isLastPage)s=c-o-2;else{var e=parseInt($(".ng-container-body tbody.bindable tr",f(this,qt).body).not(".nodata").length/f(this,qt).template.length);s=parseInt(l*n/(f(this,qt).data.count()-e+1)),s>c-o-3&&(s=c-o-3)}f(this,ge).thumb.style.top=s+"px",f(this,ge).top.disabled=!!f(this,qt).isFirstPage,f(this,ge).bottom.disabled=!!f(this,qt).isLastPage}});it(this,"delayScroll",(t,l,c,o)=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,qt).scrollBy(t),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,qt).scrollBy(t)?o&&o.call():clearInterval(f(this,vr))},c))},l))});it(this,"stopScroll",()=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))});Y(this,Zh,()=>{var t=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,qt).scrollBy(l),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,qt).scrollBy(l)},10))},500))};$(f(this,ge).top).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-1)}),$(f(this,ge).bottom).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(1)}),$(f(this,ge).top).on("touchstart",l=>{t(-1)}),$(f(this,ge).bottom).on("touchstart",l=>{t(1)}),f(this,ge).top.ontouchend=f(this,ge).bottom.ontouchend=f(this,ge).track.ontouchend=f(this,ge).top.onmouseup=f(this,ge).top.onmouseleave=f(this,ge).bottom.onmouseup=f(this,ge).bottom.onmouseleave=f(this,ge).track.onmouseup=f(this,ge).track.onmouseleave=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))},$(f(this,ge).track).on("mousedown",f(this,_a)),$(f(this,ge).track).on("touchstart",f(this,Jh)),$(f(this,ge).thumb).on("mousedown",f(this,ka)),$(f(this,ge).thumb).on("touchstart",f(this,Qh)),document.addEventListener("mouseup",l=>{f(this,ns)&&tt(this,ns,!1),document.removeEventListener("mousemove",f(this,kn)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("touchend",l=>{tt(this,ns,!1),document.removeEventListener("touchmove",f(this,Sa)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Jh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,_a).call(this,t)});Y(this,_a,t=>{if(!f(this,ns)&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault();var l=f(this,ge).thumb.getBoundingClientRect();clearInterval(f(this,yr)),clearInterval(f(this,vr)),t.clientY>l.y?f(this,qt).pageDown():f(this,qt).pageUp(),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{var c=f(this,ge).thumb.getBoundingClientRect();if(t.clientY>c.y&&t.clientY<c.y+c.height)clearInterval(f(this,vr));else{var o=t.clientY>c.y?f(this,qt).pageDown():f(this,qt).pageUp();o||clearInterval(f(this,vr))}},10))},500))}});Y(this,Qh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,ka).call(this,t),document.addEventListener("touchmove",f(this,Sa))});Y(this,Sa,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,kn).call(this,t)});Y(this,ka,t=>{tt(this,ns,!0),this.shiftY=t.offsetY+f(this,ge).track.getBoundingClientRect().y,this.trackHeight=$(f(this,ge).track).height(),this.thumbHeight=$(f(this,ge).thumb).height(),this.nodataHeight=$(".ng-container .ng-table tr.nodata",f(this,qt).body).height(),this.bodyHeight=$(".ng-container-body",f(this,qt).body).height(),this.templateHeight=f(this,qt).template.height(),this.theadHeight=$(".ng-container-body table > thead",f(this,qt).body).height()||0,this.tfootHeight=$(".ng-container-body table > tfoot",f(this,qt).body).height()||0,this.fixedHeight=$(".ng-container-body tbody.fixed",f(this,qt).body).height(),this.tableHeight=$(".ng-container-body .ng-table",f(this,qt).body).height(),tt(this,Sn,!0),document.addEventListener("mousemove",f(this,kn)),typeof this.onDragStart=="function"&&this.onDragStart()});Y(this,kn,t=>{if(f(this,ns)){t.preventDefault(),f(this,Sn)&&(H.j.querySelectorAll("th,td",f(this,qt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),tt(this,Sn,!1));var l=this.trackHeight,c=f(this,Cn).call(this),o=l-c,r=t.clientY-this.shiftY;r=Math.max(0,Math.min(r,o>0?o:0));var n=f(this,qt).matrix.totalHeight||0,s=o>0?r/o:0,e=s*Math.max(0,n-this.bodyHeight),{index:i,offset:u}=f(this,qt).matrix.getRowInfoAt(e);if(i=isNaN(i)?0:i,u=isNaN(u)?0:u,f(this,qt).dataManager.viewRecords.rawIndex!==i){f(this,qt).scrollToV2(i);const a=f(this,qt).body.querySelector(".ng-container-body tbody.bindable");a&&(a.style.transform="translateY(0px)")}else{const a=f(this,qt).body.querySelector(".ng-container-body tbody.bindable");a&&(a.style.transform=`translateY(-${u}px)`)}
|
|
655
|
+
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Kd);class Zd extends HTMLElement{constructor(){super();Y(this,qt);Y(this,ns);Y(this,ge);Y(this,yr);Y(this,vr);Y(this,Sn);it(this,"refresh",()=>{if(!f(this,qt))return;var t=$(".ng-container-body",f(this,qt).body),l=$(".ng-scroll-thumb",this.shadowRoot),c=$("table > thead",t),o=f(this,qt).dataManager.viewRecords.rawIndex,r=$(f(this,ge).track).height(),n=$(f(this,ge).thumb).height();Number(f(this,qt).getAttribute("display-row-count")||0)>=f(this,qt).dataManager.rawRecords.length||parseInt($(".ng-container .ng-table tr.nodata",f(this,qt).body).height())>0&&(f(this,qt).dataManager.rawRecords.length==0||f(this,qt).dataManager.viewRecords.rawIndex==0)?$(this).hide():$(this).show();var e=Math.min(r*(t.height()-c.height())/(f(this,qt).template.height()*f(this,qt).template.length*f(this,qt).data.count()),r);l[0].dataset.height=e,e<16&&(e=16);var i=r-f(this,Cn).call(this);if(i!=0){e>=r?l.css({top:0,height:e-20}):l.css({height:e});var u;if(f(this,qt).isFirstPage)u=0;else if(f(this,qt).isLastPage)u=r-n-2;else{var a=parseInt($(".ng-container-body tbody.bindable tr",f(this,qt).body).not(".nodata").length/f(this,qt).template.length);u=parseInt(o*i/(f(this,qt).data.count()-a+1)),u>r-n-3&&(u=r-n-3)}f(this,ge).thumb.style.top=u+"px",f(this,ge).top.disabled=!!f(this,qt).isFirstPage,f(this,ge).bottom.disabled=!!f(this,qt).isLastPage,$(this).is(":visible")&&$("ng-hscrollbar",f(this,qt).body).is(":visible")?$(".ng-scroll-edge",f(this,qt).body).show():$(".ng-scroll-edge",f(this,qt).body).hide()}});it(this,"refreshV2",()=>{if(f(this,qt)){var t=$(".ng-scroll-thumb",this.shadowRoot),l=f(this,qt).dataManager.viewRecords.rawIndex,c=this.trackHeight,o=this.thumbHeight,r=Math.min(c*(this.bodyHeight-this.theadHeight)/(this.templateHeight*f(this,qt).template.length*f(this,qt).data.count()),c);t[0].dataset.height=r,r<16&&(r=16);var n=c-f(this,Cn).call(this),s;if(f(this,qt).isFirstPage)s=0;else if(f(this,qt).isLastPage)s=c-o-2;else{var e=parseInt($(".ng-container-body tbody.bindable tr",f(this,qt).body).not(".nodata").length/f(this,qt).template.length);s=parseInt(l*n/(f(this,qt).data.count()-e+1)),s>c-o-3&&(s=c-o-3)}f(this,ge).thumb.style.top=s+"px",f(this,ge).top.disabled=!!f(this,qt).isFirstPage,f(this,ge).bottom.disabled=!!f(this,qt).isLastPage}});it(this,"delayScroll",(t,l,c,o)=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,qt).scrollBy(t),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,qt).scrollBy(t)?o&&o.call():clearInterval(f(this,vr))},c))},l))});it(this,"stopScroll",()=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))});Y(this,Zh,()=>{var t=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,qt).scrollBy(l),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,qt).scrollBy(l)},10))},500))};$(f(this,ge).top).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-1)}),$(f(this,ge).bottom).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(1)}),$(f(this,ge).top).on("touchstart",l=>{t(-1)}),$(f(this,ge).bottom).on("touchstart",l=>{t(1)}),f(this,ge).top.ontouchend=f(this,ge).bottom.ontouchend=f(this,ge).track.ontouchend=f(this,ge).top.onmouseup=f(this,ge).top.onmouseleave=f(this,ge).bottom.onmouseup=f(this,ge).bottom.onmouseleave=f(this,ge).track.onmouseup=f(this,ge).track.onmouseleave=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))},$(f(this,ge).track).on("mousedown",f(this,_a)),$(f(this,ge).track).on("touchstart",f(this,Jh)),$(f(this,ge).thumb).on("mousedown",f(this,ka)),$(f(this,ge).thumb).on("touchstart",f(this,Qh)),document.addEventListener("mouseup",l=>{f(this,ns)&&tt(this,ns,!1),document.removeEventListener("mousemove",f(this,kn)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("touchend",l=>{tt(this,ns,!1),document.removeEventListener("touchmove",f(this,Sa)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Jh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,_a).call(this,t)});Y(this,_a,t=>{if(!f(this,ns)&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault();var l=f(this,ge).thumb.getBoundingClientRect();clearInterval(f(this,yr)),clearInterval(f(this,vr)),t.clientY>l.y?f(this,qt).pageDown():f(this,qt).pageUp(),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{var c=f(this,ge).thumb.getBoundingClientRect();if(t.clientY>c.y&&t.clientY<c.y+c.height)clearInterval(f(this,vr));else{var o=t.clientY>c.y?f(this,qt).pageDown():f(this,qt).pageUp();o||clearInterval(f(this,vr))}},10))},500))}});Y(this,Qh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,ka).call(this,t),document.addEventListener("touchmove",f(this,Sa))});Y(this,Sa,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,kn).call(this,t)});Y(this,ka,t=>{tt(this,ns,!0),this.shiftY=t.offsetY+f(this,ge).track.getBoundingClientRect().y,this.trackHeight=$(f(this,ge).track).height(),this.thumbHeight=$(f(this,ge).thumb).height(),this.nodataHeight=$(".ng-container .ng-table tr.nodata",f(this,qt).body).height(),this.bodyHeight=$(".ng-container-body",f(this,qt).body).height(),this.templateHeight=f(this,qt).template.height(),this.theadHeight=$(".ng-container-body table > thead",f(this,qt).body).height()||0,this.tfootHeight=$(".ng-container-body table > tfoot",f(this,qt).body).height()||0,this.fixedHeight=$(".ng-container-body tbody.fixed",f(this,qt).body).height(),this.tableHeight=$(".ng-container-body .ng-table",f(this,qt).body).height(),tt(this,Sn,!0),document.addEventListener("mousemove",f(this,kn)),typeof this.onDragStart=="function"&&this.onDragStart()});Y(this,kn,t=>{if(f(this,ns)){t.preventDefault(),f(this,Sn)&&(H.j.querySelectorAll("th,td",f(this,qt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),tt(this,Sn,!1));var l=this.trackHeight,c=f(this,Cn).call(this),o=l-c,r=t.clientY-this.shiftY;r=Math.max(0,Math.min(r,o>0?o:0));var n=f(this,qt).matrix.totalHeight||0,s=o>0?r/o:0,e=s*Math.max(0,n-this.bodyHeight),{index:i,offset:u}=f(this,qt).matrix.getRowInfoAt(e);if(i=isNaN(i)?0:i,u=isNaN(u)?0:u,f(this,qt).dataManager.viewRecords.rawIndex!==i){f(this,qt).scrollToV2(i);const a=f(this,qt).body.querySelector(".ng-container-body tbody.bindable");a&&(a.style.transform="translateY(0px)")}else{const a=f(this,qt).body.querySelector(".ng-container-body tbody.bindable");a&&(a.style.transform=`translateY(-${u}px)`)}Sr.log("#thumb_onMouseMove",i,u,e)}});Y(this,Cn,()=>parseInt(f(this,ge).thumb.dataset.height));this.attachShadow({mode:"open"})}connectedCallback(){tt(this,qt,this.getRootNode().host),f(this,qt)&&(this.shadowRoot.innerHTML=`
|
|
656
656
|
<style>
|
|
657
657
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngVScrollBar.css";
|
|
658
658
|
${H.getCustomPath(this,"ngVScrollBar.css")}
|
|
@@ -717,7 +717,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
717
717
|
<div></div>
|
|
718
718
|
<span class="text">${this.displayValue}</span>
|
|
719
719
|
</div>
|
|
720
|
-
`,super.connectedCallback(),tt(this,Da,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Ba,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Da=new WeakMap,Ba=new WeakMap,Fa=new WeakMap,vi=new WeakSet,Ll=function(){return this.data.__ng._[H.ROW.EXPAND]},oc=new WeakMap,ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,pu=new WeakMap,qa=new WeakMap,Ha=new WeakMap,cc=new WeakMap,uc=new WeakMap,dc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",nf);class of{constructor(C){Y(this,yt);Y(this,Ge);Y(this,wr);Y(this,wi);Y(this,xi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,wi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,wi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,fc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,An).call(this)});Y(this,za,()=>{var C=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(C+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),C});Y(this,Ua,()=>{var C=f(this,za).call(this);const t=parseInt(f(this,Ge)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{C+=f(this,yt).matrix.getHeight(t+l)}),C});Y(this,Va,()=>{const C=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(C))return f(this,Ge)+C>f(this,yt).data.count()&&(tt(this,Ge,C>=f(this,yt).data.count()?0:f(this,yt).data.count()-C),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)),C;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ge)+l++);if(f(this,Ge)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ge,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)}return l});Y(this,Wa,()=>{var C=f(this,Va).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<C;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Xa,()=>{var C=Math.min(f(this,Va).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=C&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,fc,()=>{f(this,Wa).call(this),f(this,Xa).call(this);var C=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(C=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(C),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var C=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{C+=$(c).height()}),$(f(this,yt).closest("dialog")).height(C)}});Y(this,pc,()=>{f(this,Wa).call(this),f(this,Xa).call(this),f(this,yt).isLastPage});Y(this,mc,()=>{for(const C of f(this,xi))clearTimeout(C);tt(this,xi,[]),f(this,xi).push(setTimeout(()=>{tt(this,wi,!1);var C=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(C.length>0){var c=parseInt(C[0].dataset.row*f(this,yt).template.length);C.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,xi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,An,()=>{var C=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{C.push(f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),C=[...new Set(C)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=C[l],t.dataset.matrixRow=parseInt(C[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),C.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ge,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge),f(this,mc).call(this),f(this,yt).isFirstPage=f(this,Ge)==0,f(this,yt).isLastPage=C[C.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var C=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(C.dataset.row)});it(this,"getVisibleLastRow",()=>{var C=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return C.length>0?parseInt(C[C.length-1].dataset.row):-1});it(this,"getRowHeight",C=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(C*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const C=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!C||!C.style||!C.style.transform?0:parseFloat(C.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const C=this.getVisibleLastRow(),t=this.getTotalSpace();if(C==f(this,yt).data.count()-1){for(var l=0,c=C;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(C,t,l,c)=>{const o=f(this,Vs).call(this,C),r=f(this,Vs).call(this,l),n=f(this,Ws).call(this,t),s=f(this,Ws).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(C,t)=>{const l=f(this,Vs).call(this,C),c=H.isNull(t)?l:f(this,Vs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(C,t)=>{const l=f(this,Ws).call(this,C),c=H.isNull(t)?l:f(this,Ws).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(C,t,l)=>{const c=f(this,Vs).call(this,C),o=f(this,Ws).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,Vs,C=>{if(typeof C=="number")return C;if(typeof C=="function")return f(this,yt).data.findIndex(C);throw`invalid ${C}`});Y(this,Ws,C=>{if(typeof C=="number")return C;if(typeof C=="string"&&f(this,yt).fields.includes(C))return parseInt($(`[data-bind="${C}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${C}`});it(this,"moveTo",C=>{f(this,yt).scrollTo(C)});tt(this,yt,C),tt(this,wi,!1),this.init()}}yt=new WeakMap,Ge=new WeakMap,wr=new WeakMap,wi=new WeakMap,xi=new WeakMap,za=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,fc=new WeakMap,pc=new WeakMap,mc=new WeakMap,An=new WeakMap,Vs=new WeakMap,Ws=new WeakMap;class af{constructor(C){Y(this,Je);Y(this,Xs);it(this,"initialize",()=>{tt(this,Xs,!1),f(this,Je).data.clearFilter()});it(this,"isFiltering",()=>f(this,Xs));it(this,"on",C=>{tt(this,Xs,!0);const t=f(this,gc).call(this);f(this,Je).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Je).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Xs,!1),f(this,Je).body.querySelectorAll(".ng-table ng-filter-button").forEach(C=>{C.remove()})});it(this,"set",C=>{this.on();let t=Array.isArray(C)?Object.fromEntries(Object.keys(C[0]).map(l=>[l,[...new Set(C.map(c=>c[l]))]])):C;f(this,Je).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Je).fields.indexOf(l);f(this,Je).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Je).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Je).data.refreshFilter(),f(this,Je).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Je).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Je).scrollTo_V1(0),f(this,Je).paging.reset()});Y(this,gc,(C="thead")=>[...f(this,Je).body.querySelectorAll(`.ng-table ${C}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Je,C),tt(this,Xs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Je).shadowRoot.appendChild(t)}}Je=new WeakMap,Xs=new WeakMap,gc=new WeakMap;class lf extends HTMLElement{constructor(){super();Y(this,Ya);Y(this,Tn);Y(this,Ga,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Ya).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Ya,this.getRootNode().host),this.removeEventListener("click",f(this,Ga)),this.addEventListener("click",f(this,Ga))}get filterOptions(){return f(this,Tn)}set filterOptions(t){tt(this,Tn,t),this.classList.toggle("filtered",f(this,Tn).some(l=>l.data.length>0))}}Ya=new WeakMap,Tn=new WeakMap,Ga=new WeakMap;class hf extends HTMLElement{constructor(){super();Y(this,Mr);Y(this,Ka);Y(this,Za);Y(this,bc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Ka).filterOptions=e;const i=Object.fromEntries([...f(this,Mr).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Mr).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,yc,t=>{this.style.display="none"});Y(this,vc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Za)),tt(this,Za,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Mr).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Mr).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Ka,t);const m=t.filterOptions.map((g,S)=>{const E=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Mr).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Mr).exprFunction(D):null,P=h.map(B=>{const F=f(this,Mr).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Mr).data.conv(B),B.__ng.rowidx,f(this,Mr).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:E},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Mr,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
720
|
+
`,super.connectedCallback(),tt(this,Da,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Ba,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Da=new WeakMap,Ba=new WeakMap,Fa=new WeakMap,vi=new WeakSet,Ll=function(){return this.data.__ng._[H.ROW.EXPAND]},oc=new WeakMap,ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,pu=new WeakMap,qa=new WeakMap,Ha=new WeakMap,cc=new WeakMap,uc=new WeakMap,dc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",nf);class of{constructor(C){Y(this,yt);Y(this,Ge);Y(this,wr);Y(this,wi);Y(this,xi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,wi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,wi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,fc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,An).call(this)});Y(this,za,()=>{var C=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(C+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),C});Y(this,Ua,()=>{var C=f(this,za).call(this);const t=parseInt(f(this,Ge)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{C+=f(this,yt).matrix.getHeight(t+l)}),C});Y(this,Va,()=>{const C=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(C))return f(this,Ge)+C>f(this,yt).data.count()&&(tt(this,Ge,C>=f(this,yt).data.count()?0:f(this,yt).data.count()-C),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)),C;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ge)+l++);if(f(this,Ge)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ge,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)}return l});Y(this,Wa,()=>{var C=f(this,Va).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<C;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Xa,()=>{var C=Math.min(f(this,Va).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=C&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,fc,()=>{f(this,Wa).call(this),f(this,Xa).call(this);var C=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(C=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(C),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var C=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{C+=$(c).height()}),$(f(this,yt).closest("dialog")).height(C)}});Y(this,pc,()=>{f(this,Wa).call(this),f(this,Xa).call(this),f(this,yt).isLastPage});Y(this,mc,()=>{for(const C of f(this,xi))clearTimeout(C);tt(this,xi,[]),f(this,xi).push(setTimeout(()=>{tt(this,wi,!1);var C=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(C.length>0){var c=parseInt(C[0].dataset.row*f(this,yt).template.length);C.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,xi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,An,()=>{var C=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{C.push(f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),C=[...new Set(C)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=C[l],t.dataset.matrixRow=parseInt(C[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),C.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ge,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge),f(this,mc).call(this),f(this,yt).isFirstPage=f(this,Ge)==0,f(this,yt).isLastPage=C[C.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var C=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(C.dataset.row)});it(this,"getVisibleLastRow",()=>{var C=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return C.length>0?parseInt(C[C.length-1].dataset.row):-1});it(this,"getRowHeight",C=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(C*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const C=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!C||!C.style||!C.style.transform?0:parseFloat(C.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const C=this.getVisibleLastRow(),t=this.getTotalSpace();if(C==f(this,yt).data.count()-1){for(var l=0,c=C;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(C,t,l,c)=>{const o=f(this,Vs).call(this,C),r=f(this,Vs).call(this,l),n=f(this,Ws).call(this,t),s=f(this,Ws).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(C,t)=>{const l=f(this,Vs).call(this,C),c=H.isNull(t)?l:f(this,Vs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(C,t)=>{const l=f(this,Ws).call(this,C),c=H.isNull(t)?l:f(this,Ws).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(C,t,l)=>{const c=f(this,Vs).call(this,C),o=f(this,Ws).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,Vs,C=>{if(typeof C=="number")return C;if(typeof C=="function")return f(this,yt).data.findIndex(C);throw`invalid ${C}`});Y(this,Ws,C=>{if(typeof C=="number")return C;if(typeof C=="string"&&f(this,yt).fields.includes(C))return parseInt($(`[data-bind="${C}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${C}`});it(this,"moveTo",C=>{f(this,yt).scrollTo(C)});tt(this,yt,C),tt(this,wi,!1),this.init()}}yt=new WeakMap,Ge=new WeakMap,wr=new WeakMap,wi=new WeakMap,xi=new WeakMap,za=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,fc=new WeakMap,pc=new WeakMap,mc=new WeakMap,An=new WeakMap,Vs=new WeakMap,Ws=new WeakMap;class af{constructor(C){Y(this,Je);Y(this,Xs);it(this,"initialize",()=>{tt(this,Xs,!1),f(this,Je).data.clearFilter()});it(this,"isFiltering",()=>f(this,Xs));it(this,"on",C=>{tt(this,Xs,!0);const t=f(this,gc).call(this);f(this,Je).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Je).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Xs,!1),f(this,Je).body.querySelectorAll(".ng-table ng-filter-button").forEach(C=>{C.remove()})});it(this,"set",C=>{this.on();let t=Array.isArray(C)?Object.fromEntries(Object.keys(C[0]).map(l=>[l,[...new Set(C.map(c=>c[l]))]])):C;f(this,Je).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Je).fields.indexOf(l);f(this,Je).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Je).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Je).data.refreshFilter(),f(this,Je).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Je).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Je).scrollTo_V1(0),f(this,Je).paging.reset()});Y(this,gc,(C="thead")=>[...f(this,Je).body.querySelectorAll(`.ng-table ${C}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Je,C),tt(this,Xs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Je).shadowRoot.appendChild(t)}}Je=new WeakMap,Xs=new WeakMap,gc=new WeakMap;class lf extends HTMLElement{constructor(){super();Y(this,Ya);Y(this,Tn);Y(this,Ga,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Ya).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Ya,this.getRootNode().host),this.removeEventListener("click",f(this,Ga)),this.addEventListener("click",f(this,Ga))}get filterOptions(){return f(this,Tn)}set filterOptions(t){tt(this,Tn,t),this.classList.toggle("filtered",f(this,Tn).some(l=>l.data.length>0))}}Ya=new WeakMap,Tn=new WeakMap,Ga=new WeakMap;class hf extends HTMLElement{constructor(){super();Y(this,Ir);Y(this,Ka);Y(this,Za);Y(this,bc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Ka).filterOptions=e;const i=Object.fromEntries([...f(this,Ir).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Ir).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,yc,t=>{this.style.display="none"});Y(this,vc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Za)),tt(this,Za,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Ir).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Ir).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Ka,t);const m=t.filterOptions.map((g,S)=>{const E=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Ir).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Ir).exprFunction(D):null,P=h.map(B=>{const F=f(this,Ir).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Ir).data.conv(B),B.__ng.rowidx,f(this,Ir).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:E},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Ir,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
721
721
|
<style>
|
|
722
722
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngFilterPanel.css";
|
|
723
723
|
${H.getCustomPath(this,"ngFilterPanel.css")}
|
|
@@ -750,7 +750,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
750
750
|
<button id="btnOk">OK</button>
|
|
751
751
|
<button id="btnCancel">Cancel</button>
|
|
752
752
|
</div>
|
|
753
|
-
`,this.shadowRoot.querySelector("input[type=text]").addEventListener("input",f(this,wc)),this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("change",f(this,vc)),this.shadowRoot.querySelector("#btnOk").addEventListener("click",f(this,bc)),this.shadowRoot.querySelector("#btnCancel").addEventListener("click",f(this,yc))}}
|
|
753
|
+
`,this.shadowRoot.querySelector("input[type=text]").addEventListener("input",f(this,wc)),this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("change",f(this,vc)),this.shadowRoot.querySelector("#btnOk").addEventListener("click",f(this,bc)),this.shadowRoot.querySelector("#btnCancel").addEventListener("click",f(this,yc))}}Ir=new WeakMap,Ka=new WeakMap,Za=new WeakMap,bc=new WeakMap,yc=new WeakMap,vc=new WeakMap,wc=new WeakMap,customElements.get("ng-filter-button")||customElements.define("ng-filter-button",lf),customElements.get("ng-filter-panel")||customElements.define("ng-filter-panel",hf);class Zn extends HTMLElement{constructor(){super();Y(this,Ja,!1);Y(this,_i);Y(this,Qa);Y(this,Rn);Y(this,as);it(this,"export",()=>{const t=this.shadowRoot.querySelector("ng-export");t&&t.remove();const l=document.createElement("ng-export");this.shadowRoot.appendChild(l),setTimeout(()=>{l.exportExcel()})});it(this,"maximize",()=>{const t=this.shadowRoot.querySelector("ng-max-popup");t&&t.remove();const l=document.createElement("ng-max-popup");this.shadowRoot.appendChild(l),setTimeout(()=>{l.popup()})});it(this,"refreshData",t=>{if(t==null){var l=[];$(".ng-container-body tbody.bindable tr",this.body).not(".nodata").each((r,n)=>{l.push(this.dataManager.viewRecords.rawIndex+parseInt(n.sectionRowIndex/this.template.length))}),l=[...new Set(l)],l.forEach(r=>{const n=this.data.get(r);this.body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${r}"]`).forEach(s=>{s.data=n})});var c=[];$(".ng-container-body tbody.fixed tr",this.body).not(".nodata").each((r,n)=>{c.push({INDEX:n.data.__ng._[H.ROW.INDEX],ROW:n.dataset.row})}),c.forEach(r=>{const n=this.data.getNF(r.INDEX);this.body.querySelectorAll(`.ng-container tbody.fixed tr[data-row="${r.ROW}"]`).forEach(s=>{s.data=n})})}else{t=parseInt(t);const r=t<0?this.data.getNF(this.body.querySelector(`tbody.fixed tr[data-row="${t}"]`).dataset.index):this.data.get(t);this.body.querySelectorAll(`.ng-container tbody tr[data-row="${t}"]`).forEach(n=>{n.data=r})}(t==null?$(".ng-container tbody tr th,.ng-container tbody tr td",this.body):$(`.ng-container tbody tr[data-row=${t}] th,.ng-container tbody tr[data-row=${t}] td`,this.body)).each((r,n)=>{n.children[0]&&n.children[0].dataRefresh&&n.dataset.row&&n.children[0].dataRefresh()}),$(".ng-container thead tr th,.ng-container thead tr td,.ng-container tfoot tr th,.ng-container tfoot tr td",this.body).each((r,n)=>{n.children[0]&&n.children[0].dataRefresh&&n.children[0].dataRefresh()})});it(this,"refreshDataV2",()=>{$(".ng-container tbody tr th,.ng-container tbody tr td",this.body).each((l,c)=>{c.children[0]&&c.children[0].dataRefresh&&c.dataset.row&&c.children[0].dataRefresh(!0)}),$(".ng-container thead tr th,.ng-container thead tr td,.ng-container tfoot tr th,.ng-container tfoot tr td",this.body).each((l,c)=>{c.children[0]&&c.children[0].dataRefresh&&c.children[0].dataRefresh(!0)})});Y(this,tl,t=>{this.dataManager&&(this.data.clear(),this.dataManager.setDataSource(t),this.refresh(),this.paging&&this.paging.refresh(),this.scrollTo_V1(0))});it(this,"changeRayout",t=>{$(".ng-container-left",this.body).children().remove(),$(".ng-container-right",this.body).children().remove(),$(".ng-container-body",this.body).children().remove(),$(".ng-container-body",this.shadowRoot).append(f(this,as)[t]),f(this,sl).call(this),this.createTemplate(),f(this,el).call(this),this.resetTemplate(),f(this,rl).call(this),this.cell.resetEvent(),this.touchEvent.resetEvent(),f(this,_i).resetEvent(),f(this,Qa).resetEvent(),f(this,Rn)&&f(this,Rn).resetEvent(),this.sorting&&this.sorting.initialize(),this.filtering&&this.filtering.initialize(),this.pin&&this.pin.initialize(),this.data.initialize(),setTimeout(()=>{this.paging&&this.paging.refresh(),this.scrollTo_V1(0)})});Y(this,el,()=>{this.elements={table:$(this.body.querySelector(".ng-container-body > table")),hscrollbar:$(this.body.querySelector("ng-hscrollbar")),vscrollbar:$(this.body.querySelector("ng-vscrollbar")),bodyLeft:$(this.body.querySelector(".ng-container-left")),bodyBody:$(this.body.querySelector(".ng-container-body")),bodyRight:$(this.body.querySelector(".ng-container-right"))},this.elements.table.show();var t=this.elements.table.clone();this.elements.bodyLeft.html(t.clone()),$("col,th,td",this.elements.bodyLeft).not("[fixed=left]").remove();var l=0;if($("col",this.elements.bodyLeft).each((o,r)=>{l+=parseInt(H.j.querySelectorAll(r).attr("width"))}),this.elements.bodyLeft.css({width:l,"min-width":l}),this.elements.bodyRight.html(t.clone()),$("col,th,td",this.elements.bodyRight).not("[fixed=right]").remove(),l=0,$("col",this.elements.bodyRight).each((o,r)=>{l+=parseInt(H.j.querySelectorAll(r).attr("width"))}),this.elements.bodyRight.css({width:l,"min-width":l}),this.elements.bodyBody.html(t.clone()),this.elements.bodyBody.find("[fixed=left]").remove(),this.elements.bodyBody.find("[fixed=right]").remove(),this.elements.bodyLeft.find("tbody tr").remove(),this.elements.bodyRight.find("tbody tr").remove(),this.elements.bodyBody.find("tbody tr").remove(),this.elements.bodyBody.find("table").width(0),$(".ng-container .ng-table tr.nodata",this.body).length<=0){var c='<tr class="nodata"></tr>';this.elements.bodyLeft.find("tbody.bindable").append(c),this.elements.bodyRight.find("tbody.bindable").append(c),this.elements.bodyBody.find("tbody.bindable").append(c)}});Y(this,xc,()=>{if(!this.template)return 0;var t=0;return this.template.each((l,c)=>{t+=$(c).height()}),t});Y(this,vs,()=>{const t=parseInt(this.getAttribute("display-row-count"));if(isNaN(t))return;const l=this.shadowRoot.querySelector("ng-head");l&&setTimeout(()=>{const c=parseInt(window.getComputedStyle(l).getPropertyValue("padding-bottom"),10);var o=($(l).height()||0)+($("ng-foot",this.shadowRoot).height()||0)+($(".ng-container-body thead",this.shadowRoot).height()||0)+($(".ng-container-body tfoot:visible",this.shadowRoot).height()||0)+($(".ng-container-bottom:visible",this.shadowRoot).height()||0)+c+(f(this,xc).call(this)||0)*t+3;$(this).height(o)})});Y(this,_c,()=>{if(Sr.log("1111111"),f(this,Ja))return;Sr.log("222222"),this.originFormat=this.outerHTML,this.uuid=H.randomUUID(),this.id||(this.id=this.uuid),$("table",this).each((r,n)=>{if($("colgroup",n).length==0){var s=0;$("tbody tr",n).eq(0).find("th,td").each((i,u)=>{s+=u.colSpan||1}),$(n).prepend("<colgroup></colgroup>");for(var e=Math.max(parseInt(($(n).width()-16)/s)-1,100),r=0;r<s;r++)$("colgroup",n).append(`<col width="${e}" />`)}n.querySelector("thead")||$("colgroup",n).after("<thead></thead>"),$("tbody th,tbody td",n).each((i,u)=>{u.innerHTML.trim()==""&&(u.innerHTML="<ng-renderer>")}),$("thead th,thead td,tfoot th,tfoot td",n).each((i,u)=>{u.dataset&&u.dataset.expr&&(u.innerHTML="<ng-renderer>"),u.getAttribute("title")||u.setAttribute("title",u.innerHTML)}),$("datalist_BAK",n).each((i,u)=>{if(u.parentNode.getAttribute("data-source"))return!0;const a=[];u.querySelectorAll("option").forEach(m=>{for(var d={},b=0;b<m.attributes.length;b++)d[m.attributes[b].name]=m.attributes[b].value;a.push(d)}),window[this.id]||(window[this.id]=this),window[this.id]["code"+i]=a;const h=u.closest("th,td");if(h){const m=h.getAttribute("key")||"key",d=h.getAttribute("value")||"value",b=h.getAttribute("multi-separator")||",";var p=`window["${this.id}"]["code${i}"]`;u.parentNode.setAttribute("data-source",p),h.dataset.expr=`ninegrid.binarySearchValue(${p}, "${m}", data["${h.dataset.bind}"].split("${b}"), "${d}")`}}),$(n).hide(),f(this,as).push(n),H.j.querySelectorAll(this).hasClass("simple")||f(this,Cc).call(this,n)});const t=`
|
|
754
754
|
<style>
|
|
755
755
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ninegrid.css";
|
|
756
756
|
${H.getCustomPath(this,"ninegrid.css")}
|
|
@@ -775,7 +775,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
775
775
|
<div class='ng-etc2'></div>
|
|
776
776
|
</div>
|
|
777
777
|
<ng-foot></ng-foot>
|
|
778
|
-
`;this.comboExpr=(r,n,s)=>{const e=s.querySelector("ng-combo");if(!e)return"";const i=e.getAttribute("code")||"code",u=e.getAttribute("codename")||"codename",a=e.getAttribute("multi-separator")||",";return H.binarySearchValue(e.dataSource,i,r[s.dataset.bind],u,a)};for(const r of f(this,as))$(H.j.querySelectorAll("tbody",r).addClass("bindable").elem()).before('<tbody class="fixed"></tbody>');$(this.shadowRoot).append(t),$(".ng-container-body",this.shadowRoot).append(f(this,as)[0]),this.body=this.shadowRoot.querySelector(".ng-body"),this.querySelectorAll("nx-buttons *").forEach(r=>{r.grid=this}),$(this.shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-custom")).append(this.querySelectorAll("nx-buttons")),f(this,sl).call(this),this.createTemplate(),f(this,el).call(this),this.resetTemplate(),f(this,Sc).call(this);const l=this.shadowRoot.querySelector("ng-foot");this.paging=l.shadowRoot.querySelector("ng-paging"),this.layout=l.shadowRoot.querySelector("ng-layout"),this.layout&&this.layout.add(f(this,as)),new zu(this),this.pin=new Gd(this),this.fields=new yd(this),this.cell=new Uu(this),this.touchEvent=new Wu(this),this.selection=new Vu(this),this.tables=new tf(this),this.dataManager=new hd(this),this.view=new of(this),this.tableUtils=new ef(this),this.columns=new td(this);for(var c in this.dataManager)this.dataManager[c]instanceof Function&&!["xxx"].includes(c)?this[c]=this.dataManager[c].bind(this):["data","row","tree"].includes(c)&&(this[c]=this.dataManager[c]);for(var c in this.tableUtils)["columns"].includes(c)&&(this[c]=this.tableUtils[c]);for(var c in this.cell)this.cell[c]instanceof Function&&!["refresh"].includes(c)||["xx"].includes(c)&&(this[c]=this.cell[c]);H.j.querySelectorAll(this).hasClass("simple")||(this.filtering=new af(this)),!H.j.querySelectorAll(this).hasClass("combo")&&!H.j.querySelectorAll(this).hasClass("filter")&&$(this.shadowRoot).append($("<ng-combo-panel></ng-combo-panel").hide()),this.sorting=new Qd(this),this.matrix=new $d(this),Br.log("==============================="),Br.log(this,this.matrix),tt(this,_i,new Qu(this)),tt(this,Qa,new Ju(this)),H.j.querySelectorAll(this).hasClass("simple")||tt(this,Rn,new Ud(this)),f(this,rl).call(this),this.refresh(),this.body.querySelector(".ng-container-body .nodata")&&new ResizeObserver((r,n)=>{this.body.querySelector("ng-vscrollbar").refresh()}).observe(this.body.querySelector(".ng-container-body .nodata")),!H.j.querySelectorAll(this).hasClass("filter")&&!H.j.querySelectorAll(this).hasClass("combo")&&($(this.body).on("mousedown",r=>{this.shadowRoot.querySelectorAll("ng-combo-panel,ng-filter-panel,ng-context-menu-panel").forEach(n=>{$(n).is(":visible")&&$(n).hide()})}),$(this).on("click",r=>{r.target.shadowRoot.querySelectorAll("ng-info").forEach(n=>{n.close()})})),new nd(this),this.classList.contains("simple")||setTimeout(()=>{this.dispatchEvent(new CustomEvent(H.EVENT.LOAD,{bubbles:!0,detail:{}}))},100);const o=this.shadowRoot.querySelector("ng-head");o&&o.shadowRoot.querySelectorAll("nx-buttons button").forEach(r=>{r.addEventListener("click",n=>{const s=new CustomEvent(H.EVENT.BUTTON_CLICK,{bubbles:!0,detail:{target:r}});this.dispatchEvent(s)})}),tt(this,Ja,!0)});Y(this,rl,()=>{this.lastRowHidden=isNaN(parseInt(H.j.querySelectorAll(this).attr("display-row-count"))),this.paging||(this.paging={}),H.j.querySelectorAll(this).attr("col-indicator-type",H.j.querySelectorAll(this).attr("col-indicator-type")||H.COLINDICATORTYPE.COLLAPSE),H.j.querySelectorAll(this).attr("auto-fit-col",H.j.querySelectorAll(this).attr("auto-fit-col")||"false"),H.j.querySelectorAll(this).attr("col-resizable",H.j.querySelectorAll(this).attr("col-resizable")||"true"),H.j.querySelectorAll(this).attr("row-resizable",H.j.querySelectorAll(this).attr("row-resizable")||"false"),H.j.querySelectorAll(this).attr("col-movable",H.j.querySelectorAll(this).attr("col-movable")||"false"),H.j.querySelectorAll(this).attr("enable-fixed-col",H.j.querySelectorAll(this).attr("enable-fixed-col")||"false"),H.j.querySelectorAll(this).attr("show-title-bar",H.j.querySelectorAll(this).attr("show-title-bar")||"false"),H.j.querySelectorAll(this).attr("show-menu-icon",H.j.querySelectorAll(this).attr("show-menu-icon")||"false"),H.j.querySelectorAll(this).attr("show-status-bar",H.j.querySelectorAll(this).attr("show-status-bar")||"false"),H.j.querySelectorAll(this).attr("show-thead",H.j.querySelectorAll(this).attr("show-thead")||"true"),H.j.querySelectorAll(this).attr("show-tfoot",H.j.querySelectorAll(this).attr("show-tfoot")||"true"),H.j.querySelectorAll(this).attr("select-type",H.j.querySelectorAll(this).attr("select-type")||H.SELECTTYPE.CELL),H.j.querySelectorAll(this).attr("paging-type",H.j.querySelectorAll(this).attr("paging-type")||H.PAGINGTYPE.NONE),H.j.querySelectorAll(this).attr("paging-count",H.j.querySelectorAll(this).attr("paging-count")||H.PAGINGCOUNT.AUTO)});Y(this,Sc,()=>{new ResizeObserver(l=>{this.view&&this.view.redraw(),this.refreshScroll(),this.refreshBindRows(),$("tbody.bindable tr:not([data-matrix-row])",this.body).not(".nodata").length>0&&this.dataManager.viewRecords.reset()}).observe(this);const t=new MutationObserver((l,c)=>{this.body.querySelector("ng-hscrollbar").refresh()});$("colgroup",this.body).each((l,c)=>{t.observe(c,{childList:!0,subtree:!0,attributeOldValue:!0})}),this.body.querySelector("ng-hscrollbar").refresh(),new ResizeObserver((l,c)=>{if(this.getAttribute("auto-fit-col")=="true"){let n=[];var o=0;$(".ng-container-body col",this.body).each((e,i)=>{n.push({col:i,width:Number(H.j.querySelectorAll(i).attr("width"))})}),n.forEach(e=>{o+=e.width});const s=$(".ng-container-body",this.body).width();s!=0&&n.forEach(e=>{var i=e.width*s/o;H.j.querySelectorAll(e.col).attr("width",i)})}this.body.querySelector("ng-hscrollbar").refresh();const r=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");r&&r.resize(),f(this,vs).call(this)}).observe(this.body.querySelector(".ng-container-body"))});it(this,"createTemplate",()=>{this.template=$(".ng-container-body tbody.bindable tr:not(.nodata)",this.body).clone(),this.tmpl=this.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)"),this.activeTmpl=this.body.querySelector(".ng-container-body tbody.bindable tr:not(.nodata)")});it(this,"resetTemplate",()=>{var t=0;["left","body","right"].forEach(o=>{$(`.ng-container-${o} colgroup col`,this.body).each((r,n)=>{n.dataset.col=t++})});var l=[];$(".col-indicator",this.body).each((o,r)=>{l.push({from:parseInt(r.dataset.col),to:o}),r.innerHTML=`<div>${H.num2ExcelCol(o)}</div>`}),this.template.find("th,td").each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".ng-table th,.ng-table td",this.body).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)});const c=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");c&&($("th,td",c.currentTable).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".last",c.currentTable).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})),this.template.find(".last").each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")}),$(".last",this.body).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})});Y(this,ls,(t,l)=>{var c=$(l+" tr",t),o=$(l+" th,"+l+" td",t),r=c.length,n=0;o.each((e,i)=>{n+=i.colSpan});var s=Array.from(Array(r),()=>Array(n).fill(null));c.each((e,i)=>{var u=i.sectionRowIndex,a=0;$(i).find("th,td").each((h,p)=>{for(var m=0;m<s[u].length;m++)if(s[u][m]==null){a=m;break}for(var m=0;m<p.rowSpan;m++)for(var d=0;d<p.colSpan;d++)try{s[u+m][a+d]=m==0&&d==0?"1":"0"}catch(g){console.error(g)}})}),c.each((e,i)=>{var u=i.sectionRowIndex;$(i).find("th,td").not(".dummy").each((a,h)=>{for(var p=0;p<s[u].length;p++)if(s[u][p]=="1"){h.dataset.col=p,s[u][p]="0";break}})})});Y(this,kc,()=>{const t='<th data-col="@col" class="col-indicator" scope="col"><div>@text</div></th>';var l=this.body.querySelector(".ng-container-body > table > thead");if(!l||l.querySelector(".col-indicator-rowgroup"))return;const c=H.j.querySelectorAll(l.insertRow(0)).attr("role","row").addClass("col-indicator-rowgroup").elem();var o=0;$(".ng-container-body > table > tbody.bindable > tr",this.body).eq(0).find("th,td").each((n,s)=>{if(!H.j.querySelectorAll(s).hasClass("dummy"))for(var e=0;e<s.colSpan;e++)$(c).append(t.replace("@col",o).replace("@text",H.num2ExcelCol(o++)))});var r=[];$("colgroup col",this.body).each((n,s)=>{r.push({width:parseInt(H.j.querySelectorAll(s).attr("width")),background:H.j.querySelectorAll(s).attr("background-color")})}),$("thead .col-indicator",this.body).each((n,s)=>{if(!r[n])return!1;$(s).css({width:r[n].width,"min-width":r[n].width,"background-color":r[n].background,"border-top-color":r[n].background}),H.j.querySelectorAll(s).attr("background-color",r[n].background)})});Y(this,sl,()=>{var t=this.body.querySelector(".ng-container-body > table");if(t){t.querySelectorAll("tbody tr").forEach(c=>{c.style.height||(c.style.height="32px")});var l=t.querySelector("thead");l.length<=0&&$("<thead></thead>").appendTo(t),H.j.querySelectorAll(t).attr("role","table").addClass("ng-table"),H.j.querySelectorAll("tbody th,tbody td",t).attr("tabindex",0),H.j.querySelectorAll("thead,tbody,tfoot",t).attr("role","rowgroup"),H.j.querySelectorAll("tr",t).attr("role","row"),H.j.querySelectorAll("tbody > tr",t).attr("role","gridcell"),H.j.querySelectorAll("th,td",t).attr("scope","col"),f(this,ls).call(this,$(t),"thead"),f(this,ls).call(this,$(t),"tbody.bindable"),f(this,ls).call(this,$(t),"tbody.fixed"),f(this,ls).call(this,$(t),"tfoot"),f(this,kc).call(this),t.querySelectorAll("col").forEach((c,o)=>{H.j.querySelectorAll(`[data-col="${o}"]`,t).attr("fixed",H.j.querySelectorAll(c).attr("fixed"))})}});Y(this,Cc,t=>{f(this,ls).call(this,t,"thead"),f(this,ls).call(this,t,"tbody"),f(this,ls).call(this,t,"tfoot"),$("colgroup col[fixed=left]",t).index($(".dummy[fixed=left]",t)),$("tr",t).each((l,c)=>{}),$("colgroup",t).prepend('<col width="0" fixed="left" class="first" />'),$("tr",t).each((l,c)=>{$(c).prepend('<td class="first"></td>')}),$("colgroup",t).append('<col width="0" fixed="right" class="last" />'),$("tr",t).each((l,c)=>{$(c).append('<td class="last"></td>')})});Y(this,il,()=>{var t=[];return $("th,td",this.template).not(".dummy").not(".first").each((l,c)=>{c.querySelector("ng-row-indicator")||t.push(Number(c.dataset.col))}),t});it(this,"selectArea",(t,l,c,o)=>{const r=f(this,Ys).call(this,t),n=f(this,Ys).call(this,c),s=f(this,Gs).call(this,l),e=f(this,Gs).call(this,o),i=parseInt(r*this.template.length),u=parseInt(n*this.template.length)+this.template.length-1;this.row.at=r,r>=0&&n>=0?this.selection.selectArea(i,s,u,e):this.clearSelection()});it(this,"selectRow",(t,l)=>{const c=f(this,Ys).call(this,t),o=H.isNull(oRow2)?c:f(this,Ys).call(this,l),r=parseInt(c*this.template.length),n=parseInt(o*this.template.length)+this.template.length-1;this.row.at=c,c>=0&&o>=0?this.selection.selectArea(r,this.firstCol,n,this.lastCol):this.clearSelection()});it(this,"selectCol",(t,l)=>{const c=f(this,Gs).call(this,t),o=H.isNull(l)?c:f(this,Gs).call(this,l),r=0,n=parseInt(this.data.count()*this.template.length-1);c>=0&&o>=0?this.selection.selectArea(r,c,n,o):this.clearSelection()});it(this,"selectCell",(t,l,c)=>{const o=f(this,Ys).call(this,t),r=f(this,Gs).call(this,l),n=parseInt(o*this.template.length)+H.nvl(c,0);this.row.at=o,o>=0?this.selection.selectArea(n,r,n,r):this.clearSelection()});Y(this,Ys,t=>{if(typeof t=="number")return t;if(typeof t=="function")return this.data.findIndex(t);throw`invalid ${t}`});Y(this,Gs,t=>{if(typeof t=="number")return t;if(typeof t=="string"&&this.fields.includes(t))return parseInt($(`[data-bind="${t}"]`,this.template)[0].dataset.col);throw`invalid ${t}`});it(this,"scrollTo",t=>{this.row.at=t});it(this,"scrollBy",t=>this.dataManager.scrollTo_V1(this.dataManager.viewRecords.rawIndex+t));it(this,"scrollFirst",()=>{this.scrollTo(0)});it(this,"scrollLast",()=>{this.scrollTo(this.data.count()-1)});this.attachShadow({mode:"open"}),H.extendElementPrototype(),tt(this,as,[]),this.refreshBindRows=()=>{this.bindRows=[],this.bindMatrixRows=[],H.j.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)",this.body).elements.forEach(o=>{this.bindRows.push(parseInt(o.dataset.row)),this.bindMatrixRows.push(parseInt(o.dataset.matrixRow))}),this.bindRows=[...new Set(this.bindRows)],this.bindMatrixRows=[...new Set(this.bindMatrixRows)];var t=$(`.ng-container-body tr[data-row="${this.bindRows[this.bindRows.length-1]}"]`,this.body);if(t.length>0){var l=$(".ng-container-body",this.body);$("tfoot",l),t.eq(0).position().top;var c=0;t.each((o,r)=>{c+=$(r).height()})}},this.refresh=()=>{this.refreshScroll()},this.refreshScroll=()=>{},this.setCurrCell=t=>{this.currCell=t}}connectedCallback(){$(()=>{f(this,_c).call(this)}),document.addEventListener("DOMContentLoaded",t=>{}),$(document.body).on("mousedown",t=>{t.target.closest("ng-combo-panel")||$("ng-combo-panel").hide()})}disconnectedCallback(){}adoptedCallback(){}get currentRow(){return this.row.at}get dataSource(){return this.dataManager.rawRecords}set dataSource(t){this.dataManager?f(this,tl).call(this,t):setTimeout(()=>{f(this,tl).call(this,t)},300)}get layouts(){return f(this,as)}attributeChangedCallback(t,l,c){switch(t){case"lang":break;case"caption":const o=this.shadowRoot.querySelector("ng-head");o&&$("span:first-child",o.shadowRoot.querySelector("ng-title")).html(v);break;case"display-row-count":this.lastRowHidden=!!isNaN(parseInt(c));break;case"row-resizable":c=="true"?$(".row-resizer",this.shadowRoot).show():$(".row-resizer",this.shadowRoot).hide();break;case"col-indicator-type":H.j.querySelectorAll(".ng-table thead .col-indicator-rowgroup",this.body).removeClass(H.COLINDICATORTYPE.EXPAND).removeClass(H.COLINDICATORTYPE.COLLAPSE).addClass(c),f(this,vs).call(this);break;case"auto-fit-col":f(this,_i)&&f(this,_i).autoFit(c=="true"),f(this,vs).call(this);break;case"enable-fixed-col":c=="true"?H.j.querySelectorAll(this).addClass(t):H.j.querySelectorAll(this).removeClass(t);break;case"select-type":this.selection&&(this.selection.type=c);break;case"paging-type":this.paging&&(this.paging.type=c);break;case"paging-count":this.paging&&(this.paging.count=c);break;case"show-menu-icon":case"show-title-bar":const r=H.j.querySelectorAll(this).attr("show-title-bar")=="true",n=H.j.querySelectorAll(this).attr("show-menu-icon")=="true",s=this.shadowRoot.querySelector("ng-head");if(!s)break;const e=s.shadowRoot.querySelector("ng-menu");r?(H.j.querySelectorAll(s).addClass("expand"),$(s.shadowRoot).children().not("style").show(),n||H.j.querySelectorAll(e).hide()):n?H.j.querySelectorAll(s).removeClass("expand").show():H.j.querySelectorAll(s).hide(),f(this,vs).call(this);break;case"show-tfoot":$("tfoot",this.body).css({visibility:c=="true"?"unset":"collapse"}),f(this,vs).call(this);break;case"show-status-bar":c=="true"?H.j.querySelectorAll("ng-foot",this.shadowRoot).addClass("expand"):H.j.querySelectorAll("ng-foot",this.shadowRoot).removeClass("expand"),f(this,vs).call(this);break}}get firstCol(){return Math.min.apply(null,f(this,il).call(this))}get lastCol(){return Math.max.apply(null,f(this,il).call(this))}}Ja=new WeakMap,_i=new WeakMap,Qa=new WeakMap,Rn=new WeakMap,as=new WeakMap,tl=new WeakMap,el=new WeakMap,xc=new WeakMap,vs=new WeakMap,_c=new WeakMap,rl=new WeakMap,Sc=new WeakMap,ls=new WeakMap,kc=new WeakMap,sl=new WeakMap,Cc=new WeakMap,il=new WeakMap,Ys=new WeakMap,Gs=new WeakMap,it(Zn,"observedAttributes",["lang","caption","display-row-count","row-resizable","col-indicator-type","auto-fit-col","enable-fixed-col","select-type","paging-type","paging-count","show-menu-icon","show-title-bar","show-tfoot","show-status-bar"]),customElements.get("nine-grid")||customElements.define("nine-grid",Zn);class cf extends Zn{constructor(){super()}connectedCallback(){super.connectedCallback()}}customElements.get("ng-source")||customElements.define("ng-source",cf);class uf extends HTMLElement{constructor(){super();Y(this,ws);it(this,"showModal",()=>{this.querySelector("dialog").showModal()});it(this,"close",()=>{$(".head",this).off("mousedown",f(this,nl)),$(".head",this).off("touchstart",f(this,al)),$(document).off("mouseup",f(this,ol)),$(document).off("touchend",f(this,ll)),$(document).off("mousemove",f(this,Mn)),$(document).off("touchmove",f(this,In)),this.querySelector("dialog").close()});Y(this,Ec,()=>{$(".close",this).on("click",t=>{H.j.querySelectorAll("dialog",this).addClass("out"),setTimeout(()=>{this.close()},300)}),$(".close2",this).on("click",t=>{this.close()}),$(".head",this).on("mousedown",f(this,nl)),$(".head",this).on("touchstart",f(this,al)),$(document).on("mouseup",f(this,ol)),$(document).on("touchend",f(this,ll))});Y(this,nl,t=>{if(!t.target.closest("buttons")&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftkey)){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,ws,{x:t.clientX-l.x,y:t.clientY-l.y}),$(document).on("mousemove",f(this,Mn))}});Y(this,Mn,t=>{$(this.querySelector("dialog")).offset({left:t.pageX-f(this,ws).x,top:t.pageY-f(this,ws).y})});Y(this,ol,t=>{$(document).off("mousemove",f(this,Mn))});Y(this,al,t=>{if(!t.target.closest("buttons")){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,ws,{x:t.changedTouches[0].pageX-l.x,y:t.changedTouches[0].pageY-l.y}),$(document).on("touchmove",f(this,In))}});Y(this,In,t=>{$(this.querySelector("dialog")).offset({left:t.changedTouches[0].pageX-f(this,ws).x,top:t.changedTouches[0].pageY-f(this,ws).y})});Y(this,ll,t=>{$(document).off("touchmove",f(this,In))})}connectedCallback(){const t=this.innerHTML,l=this.getAttribute("css-file"),c=l?`@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/${l}";`:"",o=l?H.getCustomPath(this,l):"";this.innerHTML=`
|
|
778
|
+
`;this.comboExpr=(r,n,s)=>{const e=s.querySelector("ng-combo");if(!e)return"";const i=e.getAttribute("code")||"code",u=e.getAttribute("codename")||"codename",a=e.getAttribute("multi-separator")||",";return H.binarySearchValue(e.dataSource,i,r[s.dataset.bind],u,a)};for(const r of f(this,as))$(H.j.querySelectorAll("tbody",r).addClass("bindable").elem()).before('<tbody class="fixed"></tbody>');$(this.shadowRoot).append(t),$(".ng-container-body",this.shadowRoot).append(f(this,as)[0]),this.body=this.shadowRoot.querySelector(".ng-body"),this.querySelectorAll("nx-buttons *").forEach(r=>{r.grid=this}),$(this.shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-custom")).append(this.querySelectorAll("nx-buttons")),f(this,sl).call(this),this.createTemplate(),f(this,el).call(this),this.resetTemplate(),f(this,Sc).call(this);const l=this.shadowRoot.querySelector("ng-foot");this.paging=l.shadowRoot.querySelector("ng-paging"),this.layout=l.shadowRoot.querySelector("ng-layout"),this.layout&&this.layout.add(f(this,as)),new zu(this),this.pin=new Gd(this),this.fields=new yd(this),this.cell=new Uu(this),this.touchEvent=new Wu(this),this.selection=new Vu(this),this.tables=new tf(this),this.dataManager=new hd(this),this.view=new of(this),this.tableUtils=new ef(this),this.columns=new td(this);for(var c in this.dataManager)this.dataManager[c]instanceof Function&&!["xxx"].includes(c)?this[c]=this.dataManager[c].bind(this):["data","row","tree"].includes(c)&&(this[c]=this.dataManager[c]);for(var c in this.tableUtils)["columns"].includes(c)&&(this[c]=this.tableUtils[c]);for(var c in this.cell)this.cell[c]instanceof Function&&!["refresh"].includes(c)||["xx"].includes(c)&&(this[c]=this.cell[c]);H.j.querySelectorAll(this).hasClass("simple")||(this.filtering=new af(this)),!H.j.querySelectorAll(this).hasClass("combo")&&!H.j.querySelectorAll(this).hasClass("filter")&&$(this.shadowRoot).append($("<ng-combo-panel></ng-combo-panel").hide()),this.sorting=new Qd(this),this.matrix=new $d(this),Sr.log("==============================="),Sr.log(this,this.matrix),tt(this,_i,new Qu(this)),tt(this,Qa,new Ju(this)),H.j.querySelectorAll(this).hasClass("simple")||tt(this,Rn,new Ud(this)),f(this,rl).call(this),this.refresh(),this.body.querySelector(".ng-container-body .nodata")&&new ResizeObserver((r,n)=>{this.body.querySelector("ng-vscrollbar").refresh()}).observe(this.body.querySelector(".ng-container-body .nodata")),!H.j.querySelectorAll(this).hasClass("filter")&&!H.j.querySelectorAll(this).hasClass("combo")&&($(this.body).on("mousedown",r=>{this.shadowRoot.querySelectorAll("ng-combo-panel,ng-filter-panel,ng-context-menu-panel").forEach(n=>{$(n).is(":visible")&&$(n).hide()})}),$(this).on("click",r=>{r.target.shadowRoot.querySelectorAll("ng-info").forEach(n=>{n.close()})})),new nd(this),this.classList.contains("simple")||setTimeout(()=>{this.dispatchEvent(new CustomEvent(H.EVENT.LOAD,{bubbles:!0,detail:{}}))},100);const o=this.shadowRoot.querySelector("ng-head");o&&o.shadowRoot.querySelectorAll("nx-buttons button").forEach(r=>{r.addEventListener("click",n=>{const s=new CustomEvent(H.EVENT.BUTTON_CLICK,{bubbles:!0,detail:{target:r}});this.dispatchEvent(s)})}),tt(this,Ja,!0)});Y(this,rl,()=>{this.lastRowHidden=isNaN(parseInt(H.j.querySelectorAll(this).attr("display-row-count"))),this.paging||(this.paging={}),H.j.querySelectorAll(this).attr("col-indicator-type",H.j.querySelectorAll(this).attr("col-indicator-type")||H.COLINDICATORTYPE.COLLAPSE),H.j.querySelectorAll(this).attr("auto-fit-col",H.j.querySelectorAll(this).attr("auto-fit-col")||"false"),H.j.querySelectorAll(this).attr("col-resizable",H.j.querySelectorAll(this).attr("col-resizable")||"true"),H.j.querySelectorAll(this).attr("row-resizable",H.j.querySelectorAll(this).attr("row-resizable")||"false"),H.j.querySelectorAll(this).attr("col-movable",H.j.querySelectorAll(this).attr("col-movable")||"false"),H.j.querySelectorAll(this).attr("enable-fixed-col",H.j.querySelectorAll(this).attr("enable-fixed-col")||"false"),H.j.querySelectorAll(this).attr("show-title-bar",H.j.querySelectorAll(this).attr("show-title-bar")||"false"),H.j.querySelectorAll(this).attr("show-menu-icon",H.j.querySelectorAll(this).attr("show-menu-icon")||"false"),H.j.querySelectorAll(this).attr("show-status-bar",H.j.querySelectorAll(this).attr("show-status-bar")||"false"),H.j.querySelectorAll(this).attr("show-thead",H.j.querySelectorAll(this).attr("show-thead")||"true"),H.j.querySelectorAll(this).attr("show-tfoot",H.j.querySelectorAll(this).attr("show-tfoot")||"true"),H.j.querySelectorAll(this).attr("select-type",H.j.querySelectorAll(this).attr("select-type")||H.SELECTTYPE.CELL),H.j.querySelectorAll(this).attr("paging-type",H.j.querySelectorAll(this).attr("paging-type")||H.PAGINGTYPE.NONE),H.j.querySelectorAll(this).attr("paging-count",H.j.querySelectorAll(this).attr("paging-count")||H.PAGINGCOUNT.AUTO)});Y(this,Sc,()=>{new ResizeObserver(l=>{this.view&&this.view.redraw(),this.refreshScroll(),this.refreshBindRows(),$("tbody.bindable tr:not([data-matrix-row])",this.body).not(".nodata").length>0&&this.dataManager.viewRecords.reset()}).observe(this);const t=new MutationObserver((l,c)=>{this.body.querySelector("ng-hscrollbar").refresh()});$("colgroup",this.body).each((l,c)=>{t.observe(c,{childList:!0,subtree:!0,attributeOldValue:!0})}),this.body.querySelector("ng-hscrollbar").refresh(),new ResizeObserver((l,c)=>{if(this.getAttribute("auto-fit-col")=="true"){let n=[];var o=0;$(".ng-container-body col",this.body).each((e,i)=>{n.push({col:i,width:Number(H.j.querySelectorAll(i).attr("width"))})}),n.forEach(e=>{o+=e.width});const s=$(".ng-container-body",this.body).width();s!=0&&n.forEach(e=>{var i=e.width*s/o;H.j.querySelectorAll(e.col).attr("width",i)})}this.body.querySelector("ng-hscrollbar").refresh();const r=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");r&&r.resize(),f(this,vs).call(this)}).observe(this.body.querySelector(".ng-container-body"))});it(this,"createTemplate",()=>{this.template=$(".ng-container-body tbody.bindable tr:not(.nodata)",this.body).clone(),this.tmpl=this.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)"),this.activeTmpl=this.body.querySelector(".ng-container-body tbody.bindable tr:not(.nodata)")});it(this,"resetTemplate",()=>{var t=0;["left","body","right"].forEach(o=>{$(`.ng-container-${o} colgroup col`,this.body).each((r,n)=>{n.dataset.col=t++})});var l=[];$(".col-indicator",this.body).each((o,r)=>{l.push({from:parseInt(r.dataset.col),to:o}),r.innerHTML=`<div>${H.num2ExcelCol(o)}</div>`}),this.template.find("th,td").each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".ng-table th,.ng-table td",this.body).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)});const c=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");c&&($("th,td",c.currentTable).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".last",c.currentTable).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})),this.template.find(".last").each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")}),$(".last",this.body).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})});Y(this,ls,(t,l)=>{var c=$(l+" tr",t),o=$(l+" th,"+l+" td",t),r=c.length,n=0;o.each((e,i)=>{n+=i.colSpan});var s=Array.from(Array(r),()=>Array(n).fill(null));c.each((e,i)=>{var u=i.sectionRowIndex,a=0;$(i).find("th,td").each((h,p)=>{for(var m=0;m<s[u].length;m++)if(s[u][m]==null){a=m;break}for(var m=0;m<p.rowSpan;m++)for(var d=0;d<p.colSpan;d++)try{s[u+m][a+d]=m==0&&d==0?"1":"0"}catch(g){console.error(g)}})}),c.each((e,i)=>{var u=i.sectionRowIndex;$(i).find("th,td").not(".dummy").each((a,h)=>{for(var p=0;p<s[u].length;p++)if(s[u][p]=="1"){h.dataset.col=p,s[u][p]="0";break}})})});Y(this,kc,()=>{const t='<th data-col="@col" class="col-indicator" scope="col"><div>@text</div></th>';var l=this.body.querySelector(".ng-container-body > table > thead");if(!l||l.querySelector(".col-indicator-rowgroup"))return;const c=H.j.querySelectorAll(l.insertRow(0)).attr("role","row").addClass("col-indicator-rowgroup").elem();var o=0;$(".ng-container-body > table > tbody.bindable > tr",this.body).eq(0).find("th,td").each((n,s)=>{if(!H.j.querySelectorAll(s).hasClass("dummy"))for(var e=0;e<s.colSpan;e++)$(c).append(t.replace("@col",o).replace("@text",H.num2ExcelCol(o++)))});var r=[];$("colgroup col",this.body).each((n,s)=>{r.push({width:parseInt(H.j.querySelectorAll(s).attr("width")),background:H.j.querySelectorAll(s).attr("background-color")})}),$("thead .col-indicator",this.body).each((n,s)=>{if(!r[n])return!1;$(s).css({width:r[n].width,"min-width":r[n].width,"background-color":r[n].background,"border-top-color":r[n].background}),H.j.querySelectorAll(s).attr("background-color",r[n].background)})});Y(this,sl,()=>{var t=this.body.querySelector(".ng-container-body > table");if(t){t.querySelectorAll("tbody tr").forEach(c=>{c.style.height||(c.style.height="32px")});var l=t.querySelector("thead");l.length<=0&&$("<thead></thead>").appendTo(t),H.j.querySelectorAll(t).attr("role","table").addClass("ng-table"),H.j.querySelectorAll("tbody th,tbody td",t).attr("tabindex",0),H.j.querySelectorAll("thead,tbody,tfoot",t).attr("role","rowgroup"),H.j.querySelectorAll("tr",t).attr("role","row"),H.j.querySelectorAll("tbody > tr",t).attr("role","gridcell"),H.j.querySelectorAll("th,td",t).attr("scope","col"),f(this,ls).call(this,$(t),"thead"),f(this,ls).call(this,$(t),"tbody.bindable"),f(this,ls).call(this,$(t),"tbody.fixed"),f(this,ls).call(this,$(t),"tfoot"),f(this,kc).call(this),t.querySelectorAll("col").forEach((c,o)=>{H.j.querySelectorAll(`[data-col="${o}"]`,t).attr("fixed",H.j.querySelectorAll(c).attr("fixed"))})}});Y(this,Cc,t=>{f(this,ls).call(this,t,"thead"),f(this,ls).call(this,t,"tbody"),f(this,ls).call(this,t,"tfoot"),$("colgroup col[fixed=left]",t).index($(".dummy[fixed=left]",t)),$("tr",t).each((l,c)=>{}),$("colgroup",t).prepend('<col width="0" fixed="left" class="first" />'),$("tr",t).each((l,c)=>{$(c).prepend('<td class="first"></td>')}),$("colgroup",t).append('<col width="0" fixed="right" class="last" />'),$("tr",t).each((l,c)=>{$(c).append('<td class="last"></td>')})});Y(this,il,()=>{var t=[];return $("th,td",this.template).not(".dummy").not(".first").each((l,c)=>{c.querySelector("ng-row-indicator")||t.push(Number(c.dataset.col))}),t});it(this,"selectArea",(t,l,c,o)=>{const r=f(this,Ys).call(this,t),n=f(this,Ys).call(this,c),s=f(this,Gs).call(this,l),e=f(this,Gs).call(this,o),i=parseInt(r*this.template.length),u=parseInt(n*this.template.length)+this.template.length-1;this.row.at=r,r>=0&&n>=0?this.selection.selectArea(i,s,u,e):this.clearSelection()});it(this,"selectRow",(t,l)=>{const c=f(this,Ys).call(this,t),o=H.isNull(oRow2)?c:f(this,Ys).call(this,l),r=parseInt(c*this.template.length),n=parseInt(o*this.template.length)+this.template.length-1;this.row.at=c,c>=0&&o>=0?this.selection.selectArea(r,this.firstCol,n,this.lastCol):this.clearSelection()});it(this,"selectCol",(t,l)=>{const c=f(this,Gs).call(this,t),o=H.isNull(l)?c:f(this,Gs).call(this,l),r=0,n=parseInt(this.data.count()*this.template.length-1);c>=0&&o>=0?this.selection.selectArea(r,c,n,o):this.clearSelection()});it(this,"selectCell",(t,l,c)=>{const o=f(this,Ys).call(this,t),r=f(this,Gs).call(this,l),n=parseInt(o*this.template.length)+H.nvl(c,0);this.row.at=o,o>=0?this.selection.selectArea(n,r,n,r):this.clearSelection()});Y(this,Ys,t=>{if(typeof t=="number")return t;if(typeof t=="function")return this.data.findIndex(t);throw`invalid ${t}`});Y(this,Gs,t=>{if(typeof t=="number")return t;if(typeof t=="string"&&this.fields.includes(t))return parseInt($(`[data-bind="${t}"]`,this.template)[0].dataset.col);throw`invalid ${t}`});it(this,"scrollTo",t=>{this.row.at=t});it(this,"scrollBy",t=>this.dataManager.scrollTo_V1(this.dataManager.viewRecords.rawIndex+t));it(this,"scrollFirst",()=>{this.scrollTo(0)});it(this,"scrollLast",()=>{this.scrollTo(this.data.count()-1)});this.attachShadow({mode:"open"}),H.extendElementPrototype(),tt(this,as,[]),this.refreshBindRows=()=>{this.bindRows=[],this.bindMatrixRows=[],H.j.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)",this.body).elements.forEach(o=>{this.bindRows.push(parseInt(o.dataset.row)),this.bindMatrixRows.push(parseInt(o.dataset.matrixRow))}),this.bindRows=[...new Set(this.bindRows)],this.bindMatrixRows=[...new Set(this.bindMatrixRows)];var t=$(`.ng-container-body tr[data-row="${this.bindRows[this.bindRows.length-1]}"]`,this.body);if(t.length>0){var l=$(".ng-container-body",this.body);$("tfoot",l),t.eq(0).position().top;var c=0;t.each((o,r)=>{c+=$(r).height()})}},this.refresh=()=>{this.refreshScroll()},this.refreshScroll=()=>{},this.setCurrCell=t=>{this.currCell=t}}connectedCallback(){$(()=>{f(this,_c).call(this)}),document.addEventListener("DOMContentLoaded",t=>{}),$(document.body).on("mousedown",t=>{t.target.closest("ng-combo-panel")||$("ng-combo-panel").hide()})}disconnectedCallback(){}adoptedCallback(){}get currentRow(){return this.row.at}get dataSource(){return this.dataManager.rawRecords}set dataSource(t){this.dataManager?f(this,tl).call(this,t):setTimeout(()=>{f(this,tl).call(this,t)},300)}get layouts(){return f(this,as)}attributeChangedCallback(t,l,c){switch(t){case"lang":break;case"caption":const o=this.shadowRoot.querySelector("ng-head");o&&$("span:first-child",o.shadowRoot.querySelector("ng-title")).html(v);break;case"display-row-count":this.lastRowHidden=!!isNaN(parseInt(c));break;case"row-resizable":c=="true"?$(".row-resizer",this.shadowRoot).show():$(".row-resizer",this.shadowRoot).hide();break;case"col-indicator-type":H.j.querySelectorAll(".ng-table thead .col-indicator-rowgroup",this.body).removeClass(H.COLINDICATORTYPE.EXPAND).removeClass(H.COLINDICATORTYPE.COLLAPSE).addClass(c),f(this,vs).call(this);break;case"auto-fit-col":f(this,_i)&&f(this,_i).autoFit(c=="true"),f(this,vs).call(this);break;case"enable-fixed-col":c=="true"?H.j.querySelectorAll(this).addClass(t):H.j.querySelectorAll(this).removeClass(t);break;case"select-type":this.selection&&(this.selection.type=c);break;case"paging-type":this.paging&&(this.paging.type=c);break;case"paging-count":this.paging&&(this.paging.count=c);break;case"show-menu-icon":case"show-title-bar":const r=H.j.querySelectorAll(this).attr("show-title-bar")=="true",n=H.j.querySelectorAll(this).attr("show-menu-icon")=="true",s=this.shadowRoot.querySelector("ng-head");if(!s)break;const e=s.shadowRoot.querySelector("ng-menu");r?(H.j.querySelectorAll(s).addClass("expand"),$(s.shadowRoot).children().not("style").show(),n||H.j.querySelectorAll(e).hide()):n?H.j.querySelectorAll(s).removeClass("expand").show():H.j.querySelectorAll(s).hide(),f(this,vs).call(this);break;case"show-tfoot":$("tfoot",this.body).css({visibility:c=="true"?"unset":"collapse"}),f(this,vs).call(this);break;case"show-status-bar":c=="true"?H.j.querySelectorAll("ng-foot",this.shadowRoot).addClass("expand"):H.j.querySelectorAll("ng-foot",this.shadowRoot).removeClass("expand"),f(this,vs).call(this);break}}get firstCol(){return Math.min.apply(null,f(this,il).call(this))}get lastCol(){return Math.max.apply(null,f(this,il).call(this))}}Ja=new WeakMap,_i=new WeakMap,Qa=new WeakMap,Rn=new WeakMap,as=new WeakMap,tl=new WeakMap,el=new WeakMap,xc=new WeakMap,vs=new WeakMap,_c=new WeakMap,rl=new WeakMap,Sc=new WeakMap,ls=new WeakMap,kc=new WeakMap,sl=new WeakMap,Cc=new WeakMap,il=new WeakMap,Ys=new WeakMap,Gs=new WeakMap,it(Zn,"observedAttributes",["lang","caption","display-row-count","row-resizable","col-indicator-type","auto-fit-col","enable-fixed-col","select-type","paging-type","paging-count","show-menu-icon","show-title-bar","show-tfoot","show-status-bar"]),customElements.get("nine-grid")||customElements.define("nine-grid",Zn);class cf extends Zn{constructor(){super()}connectedCallback(){super.connectedCallback()}}customElements.get("ng-source")||customElements.define("ng-source",cf);class uf extends HTMLElement{constructor(){super();Y(this,ws);it(this,"showModal",()=>{this.querySelector("dialog").showModal()});it(this,"close",()=>{$(".head",this).off("mousedown",f(this,nl)),$(".head",this).off("touchstart",f(this,al)),$(document).off("mouseup",f(this,ol)),$(document).off("touchend",f(this,ll)),$(document).off("mousemove",f(this,Mn)),$(document).off("touchmove",f(this,In)),this.querySelector("dialog").close()});Y(this,Ec,()=>{$(".close",this).on("click",t=>{H.j.querySelectorAll("dialog",this).addClass("out"),setTimeout(()=>{this.close()},300)}),$(".close2",this).on("click",t=>{this.close()}),$(".head",this).on("mousedown",f(this,nl)),$(".head",this).on("touchstart",f(this,al)),$(document).on("mouseup",f(this,ol)),$(document).on("touchend",f(this,ll))});Y(this,nl,t=>{if(!t.target.closest("buttons")&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftkey)){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,ws,{x:t.clientX-l.x,y:t.clientY-l.y}),$(document).on("mousemove",f(this,Mn))}});Y(this,Mn,t=>{$(this.querySelector("dialog")).offset({left:t.pageX-f(this,ws).x,top:t.pageY-f(this,ws).y})});Y(this,ol,t=>{$(document).off("mousemove",f(this,Mn))});Y(this,al,t=>{if(!t.target.closest("buttons")){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,ws,{x:t.changedTouches[0].pageX-l.x,y:t.changedTouches[0].pageY-l.y}),$(document).on("touchmove",f(this,In))}});Y(this,In,t=>{$(this.querySelector("dialog")).offset({left:t.changedTouches[0].pageX-f(this,ws).x,top:t.changedTouches[0].pageY-f(this,ws).y})});Y(this,ll,t=>{$(document).off("touchmove",f(this,In))})}connectedCallback(){const t=this.innerHTML,l=this.getAttribute("css-file"),c=l?`@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/${l}";`:"",o=l?H.getCustomPath(this,l):"";this.innerHTML=`
|
|
779
779
|
<style>
|
|
780
780
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxDialog.css";
|
|
781
781
|
${H.getCustomPath(this,"nxDialog.css")||""}
|
|
@@ -1278,20 +1278,20 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1278
1278
|
|
|
1279
1279
|
<div class="tabs"></div>
|
|
1280
1280
|
<div class="tab-pages"></div>
|
|
1281
|
-
`,this.switchTabHandler=er(this,Hn,Bu).bind(this),this.tabpage={show:t=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((l,c)=>{l.innerText.trim()===t&&(l.style.display="unset")})},showAll:()=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((t,l)=>{t.style.display="unset"})},hide:t=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((l,c)=>{l.innerText.trim()===t&&(l.style.display="none")})}}}connectedCallback(){f(this,Bc).call(this),this.dispatchEvent(new CustomEvent(H.EVENT.TAB_LOAD,{bubbles:!0,detail:{}}))}}Hn=new WeakSet,Du=function(){const t=this.shadowRoot.querySelector(".tabs"),l=this.shadowRoot.querySelector(".tab-pages"),c=this.querySelectorAll("nx-tab-page");c.forEach((o,r)=>{const n=document.createElement("div");n.classList.add("tab-button"),n.textContent=o.getAttribute("caption"),n.setAttribute("data-target",`content${r}`),t.appendChild(n);const s=document.createElement("div");s.id=`content${r}`,s.classList.add("tab-page"),s.innerHTML=o.innerHTML,l.appendChild(s)}),c.forEach(o=>{o.remove()})},Bu=function(t){const l=t.target;if(console.log(t),!l.classList.contains("tab-button"))return;const c=l.getAttribute("data-target"),o=this.shadowRoot.querySelector(".tab-button.active"),r=this.shadowRoot.querySelector(".tab-page.active"),n=this.shadowRoot.getElementById(c);console.log(c,o,r,n),o!==l&&(console.log("*******"),o&&r?(o.classList.remove("active"),r.classList.remove("active","exit-left","exit-right"),r.style.left="",o.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?r.classList.add("exit-left"):r.classList.add("exit-right"),n.classList.add("active"),n.style.left="",n.classList.remove("exit-left","exit-right")):r&&n&&(r.classList.remove("active","exit-left","exit-right"),r.style.left="",r.classList.add("exit-left"),n.classList.add("active"),n.style.left="",n.classList.remove("exit-left","exit-right")),l.classList.add("active"),this.shadowRoot.querySelector(".tab-pages").style.height=`${n.scrollHeight}px`)},Bc=new WeakMap;class Af extends HTMLElement{constructor(){super()}connectedCallback(){this.caption=this.getAttribute("caption")}}customElements.get("nx-tab")||customElements.define("nx-tab",Ef),customElements.get("nx-tab-page")||customElements.define("nx-tab-page",Af);class Tf extends HTMLElement{constructor(){super();Y(this,
|
|
1281
|
+
`,this.switchTabHandler=er(this,Hn,Bu).bind(this),this.tabpage={show:t=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((l,c)=>{l.innerText.trim()===t&&(l.style.display="unset")})},showAll:()=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((t,l)=>{t.style.display="unset"})},hide:t=>{this.shadowRoot.querySelectorAll(".tab-button").forEach((l,c)=>{l.innerText.trim()===t&&(l.style.display="none")})}}}connectedCallback(){f(this,Bc).call(this),this.dispatchEvent(new CustomEvent(H.EVENT.TAB_LOAD,{bubbles:!0,detail:{}}))}}Hn=new WeakSet,Du=function(){const t=this.shadowRoot.querySelector(".tabs"),l=this.shadowRoot.querySelector(".tab-pages"),c=this.querySelectorAll("nx-tab-page");c.forEach((o,r)=>{const n=document.createElement("div");n.classList.add("tab-button"),n.textContent=o.getAttribute("caption"),n.setAttribute("data-target",`content${r}`),t.appendChild(n);const s=document.createElement("div");s.id=`content${r}`,s.classList.add("tab-page"),s.innerHTML=o.innerHTML,l.appendChild(s)}),c.forEach(o=>{o.remove()})},Bu=function(t){const l=t.target;if(console.log(t),!l.classList.contains("tab-button"))return;const c=l.getAttribute("data-target"),o=this.shadowRoot.querySelector(".tab-button.active"),r=this.shadowRoot.querySelector(".tab-page.active"),n=this.shadowRoot.getElementById(c);console.log(c,o,r,n),o!==l&&(console.log("*******"),o&&r?(o.classList.remove("active"),r.classList.remove("active","exit-left","exit-right"),r.style.left="",o.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?r.classList.add("exit-left"):r.classList.add("exit-right"),n.classList.add("active"),n.style.left="",n.classList.remove("exit-left","exit-right")):r&&n&&(r.classList.remove("active","exit-left","exit-right"),r.style.left="",r.classList.add("exit-left"),n.classList.add("active"),n.style.left="",n.classList.remove("exit-left","exit-right")),l.classList.add("active"),this.shadowRoot.querySelector(".tab-pages").style.height=`${n.scrollHeight}px`)},Bc=new WeakMap;class Af extends HTMLElement{constructor(){super()}connectedCallback(){this.caption=this.getAttribute("caption")}}customElements.get("nx-tab")||customElements.define("nx-tab",Ef),customElements.get("nx-tab-page")||customElements.define("nx-tab-page",Af);class Tf extends HTMLElement{constructor(){super();Y(this,Br);Y(this,Fc,t=>{const l=t.previousElementSibling,c=t.nextElementSibling;if(!l||!c){tt(this,Br,this.classList.contains("h")?"h":"v");return}const o=l.getBoundingClientRect(),r=c.getBoundingClientRect();this.classList.contains("h")?tt(this,Br,"h"):this.classList.contains("v")?tt(this,Br,"v"):tt(this,Br,Math.abs(o.top-r.top)<5?"h":"v")});Y(this,qc,t=>{t.preventDefault(),t.stopPropagation();const l=this.getBoundingClientRect(),c=f(this,Br)==="h",o=c?t.clientX-l.left:t.clientY-l.top,r=document.createElement("div");r.className=`nx-splitter-drag-bar-${f(this,Br)}`,Object.assign(r.style,{position:"absolute",zIndex:"999",background:"#666",opacity:"0.6",pointerEvents:"none"});const n=this.getRootNode({composed:!0}),s=n instanceof ShadowRoot?n.host:this.parentElement,e=this.previousElementSibling,i=this.nextElementSibling;if(!s||!e||!i){console.warn("Spliter's parent or siblings not found.");return}(s.shadowRoot||s).appendChild(r);const u=r.offsetParent.getBoundingClientRect(),a=e.getBoundingClientRect(),h=i.getBoundingClientRect(),p=(c?l.left-u.left:l.top-u.top)+o;c?(r.style.top="0",r.style.left=`${p}px`,r.style.width="1px",r.style.height="100%"):(r.style.left="0",r.style.top=`${p}px`,r.style.height="1px",r.style.width="100%"),r.style.zIndex="99999";const m=c?a.left-u.left:a.top-u.top,d=c?h.right-u.left-l.width:h.bottom-u.top-l.height,b=S=>{const E=c?S.clientX:S.clientY,I=c?E-u.left:E-u.top,D=Math.max(m,Math.min(I,d));c?r.style.left=`${D}px`:r.style.top=`${D}px`},g=()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",g),r.remove();const S=Array.from(s.children),E=S.filter(O=>O.tagName.toLowerCase()!=="nx-splitter"),I=window.getComputedStyle(s),D=c?I.getPropertyValue("column-gap"):I.getPropertyValue("row-gap"),z=parseFloat(D)||0,B=(S.length>1?S.length-1:0)*z,W=parseFloat(c?r.style.left:r.style.top)-p,q=c?e.getBoundingClientRect().width:e.getBoundingClientRect().height,A=c?i.getBoundingClientRect().width:i.getBoundingClientRect().height;let M=q+W,k=A-W;M<0&&(k+=M,M=0),k<0&&(M+=k,k=0);const y=E.map(O=>c?O.getBoundingClientRect().width:O.getBoundingClientRect().height),w=S.reduce((O,j)=>j.tagName.toLowerCase()==="nx-splitter"?O+(c?j.getBoundingClientRect().width:j.getBoundingClientRect().height):O,0),_=(c?s.getBoundingClientRect().width:s.getBoundingClientRect().height)-w-B;let T=0;E.forEach((O,j)=>{let V;O===e?V=M:O===i?V=k:V=y[j];const X=V/_;console.log(O),O.classList.contains("sidebar")?O.style.flex=`0 0 ${V}px`:O.style.flex=`${X} ${X} 0`,T+=X}),console.log(`dragOffset: ${W}`),console.log(`Calculated FlexSum: ${T}`)};window.addEventListener("mousemove",b),window.addEventListener("mouseup",g)});Y(this,Hc,()=>{f(this,Fc).call(this,this),this.classList.add(f(this,Br));const t=this.innerHTML.trim(),l=`grip-${f(this,Br)}`,c=t===""?`<div class="${l}"></div>`:`<div class="${l}"></div><div class="inner-container">${t}</div><div class="${l}"></div>`;this.innerHTML="";const o=document.createElement("template");o.innerHTML=`
|
|
1282
1282
|
<style>
|
|
1283
1283
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxSplitter.css";
|
|
1284
1284
|
${H.getCustomPath(this,"nxSplitter.css")}
|
|
1285
1285
|
</style>
|
|
1286
1286
|
${c}
|
|
1287
|
-
`,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip-h,.grip-v").forEach(r=>{r.addEventListener("mousedown",n=>f(this,qc).call(this,n))}),f(this,xl).call(this),window.addEventListener("resize",()=>f(this,xl).call(this))});Y(this,xl,()=>{const t=f(this,
|
|
1287
|
+
`,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip-h,.grip-v").forEach(r=>{r.addEventListener("mousedown",n=>f(this,qc).call(this,n))}),f(this,xl).call(this),window.addEventListener("resize",()=>f(this,xl).call(this))});Y(this,xl,()=>{const t=f(this,Br)==="h",l=this.parentElement,c=Array.from(l.children).filter(s=>s.tagName.toLowerCase()!=="nx-splitter");if(c.length<2)return;const o=l.getBoundingClientRect(),r=c.reduce((s,e)=>{const i=t?e.getBoundingClientRect().width:e.getBoundingClientRect().height;return s+i},0),n=t?o.width:o.height;c.forEach(s=>{const e=t?s.getBoundingClientRect().width:s.getBoundingClientRect().height,u=n*(e/r)/n;s.style.flex=`${u} ${u} 0`})});this.attachShadow({mode:"open"})}connectedCallback(){f(this,Hc).call(this)}}Br=new WeakMap,Fc=new WeakMap,qc=new WeakMap,Hc=new WeakMap,xl=new WeakMap,customElements.get("nx-splitter")||customElements.define("nx-splitter",Tf);class Rf extends HTMLElement{constructor(){super();Y(this,mu);it(this,"getData_BAK",()=>{const t={};return this.shadowRoot.querySelectorAll("[id]").forEach(l=>{l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"?t[l.id]=l.value:t[l.id]=l.textContent.trim()}),t});it(this,"getData",()=>{const t={};return this.shadowRoot.querySelectorAll("input, textarea, select, [id], [name]").forEach(l=>{const c=l.id||l.name;if(!c)return;const o=l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"?l.value:l.textContent.trim();t[c]?(Array.isArray(t[c])||(t[c]=[t[c]]),t[c].push(o)):t[c]=o}),t});Y(this,zc,()=>{const t=this.innerHTML.trim();this.innerHTML="";const l=document.createElement("template");l.innerHTML=`
|
|
1288
1288
|
<style>
|
|
1289
1289
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxForm.css";
|
|
1290
1290
|
${H.getCustomPath(this,"nxForm.css")}
|
|
1291
1291
|
</style>
|
|
1292
1292
|
|
|
1293
1293
|
${t}
|
|
1294
|
-
`,this.shadowRoot.appendChild(l.content.cloneNode(!0))});this.attachShadow({mode:"open"})}connectedCallback(){f(this,zc).call(this)}}mu=new WeakMap,zc=new WeakMap,customElements.get("nx-form")||customElements.define("nx-form",Rf);class Mf extends HTMLElement{constructor(){super();Y(this,
|
|
1294
|
+
`,this.shadowRoot.appendChild(l.content.cloneNode(!0))});this.attachShadow({mode:"open"})}connectedCallback(){f(this,zc).call(this)}}mu=new WeakMap,zc=new WeakMap,customElements.get("nx-form")||customElements.define("nx-form",Rf);class Mf extends HTMLElement{constructor(){super();Y(this,Nr,[]);Y(this,_l,[]);Y(this,Sl,()=>{H.delayQuerySelector("nx-side-menu-item.active").then(t=>{f(this,kl).call(this,t),f(this,Cl).call(this)})});Y(this,kl,t=>{if(tt(this,Nr,[]),t){const l=t.caption;l&&f(this,Nr).unshift({path:t.getAttribute("href"),caption:l});let c=t,o=!1;for(;c;)if(c=c.previousElementSibling,c&&c.tagName==="NX-SIDE-MENU-ITEM"){const r=c.caption;if(c.getAttribute("type")==="group"){r&&!o&&(f(this,Nr).unshift({path:c.getAttribute("href"),caption:r}),o=!0);break}}}this.closest(".list-wrapper")||f(this,Nr).push({path:"",caption:this.getAttribute("caption")||"Current Page"}),f(this,Nr).unshift({path:"/",caption:"Home"}),tt(this,Nr,f(this,Nr).concat(f(this,_l)))});Y(this,Cl,()=>{const t=H.querySelector("nx-side-menu-item.active"),l=t?t.caption:"No Caption";this.innerHTML.trim(),this.innerHTML="",this.shadowRoot.innerHTML="";const c=document.createElement("template");c.innerHTML=`
|
|
1295
1295
|
<style>
|
|
1296
1296
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxTitle.css";
|
|
1297
1297
|
${H.getCustomPath(this,"nxTitle.css")}
|
|
@@ -1309,13 +1309,13 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1309
1309
|
<div class="bar9"></div>
|
|
1310
1310
|
</div>
|
|
1311
1311
|
<div class="breadcrumb-container">
|
|
1312
|
-
${f(this,
|
|
1312
|
+
${f(this,Nr).map((o,r)=>{const n=r===f(this,Nr).length-1,s=o.path&&!n?`<a href="javascript:void(0);"
|
|
1313
1313
|
class="breadcrumb-item breadcrumb-link"
|
|
1314
1314
|
data-path="${o.path}"
|
|
1315
|
-
>${o.caption}</a>`:`<span class="breadcrumb-item ${n?"breadcrumb-current":""}">${o.caption}</span>`,e=r<f(this,
|
|
1315
|
+
>${o.caption}</a>`:`<span class="breadcrumb-item ${n?"breadcrumb-current":""}">${o.caption}</span>`,e=r<f(this,Nr).length-1?'<span class="breadcrumb-separator"> > </span>':"";return`${s}${e}`}).join("")}
|
|
1316
1316
|
</div>
|
|
1317
1317
|
</div>
|
|
1318
|
-
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Uc))})});Y(this,Uc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,Sl).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,Sl))}setDynamicPath(t){tt(this,_l,t),f(this,kl).call(this),f(this,Cl).call(this)}}
|
|
1318
|
+
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Uc))})});Y(this,Uc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,Sl).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,Sl))}setDynamicPath(t){tt(this,_l,t),f(this,kl).call(this),f(this,Cl).call(this)}}Nr=new WeakMap,_l=new WeakMap,Sl=new WeakMap,kl=new WeakMap,Cl=new WeakMap,Uc=new WeakMap,customElements.get("nx-title")||customElements.define("nx-title",Mf);class nu extends HTMLElement{constructor(){super();Y(this,Or);it(this,"originContents");Y(this,El,!1);Y(this,Ei);Y(this,Al,!1);it(this,"getData",()=>{const t={};return er(this,Or,Pl).call(this).forEach(l=>{const c=l.name;if(!c)return;let o;if(l.tagName==="INPUT"&&l.type==="checkbox"){let r=l.getAttribute("true-value")||"Y",n=l.getAttribute("false-value")||"N";o=l.checked?r:n}else l.tagName==="INPUT"&&l.type,o=l.value;t[c]?(Array.isArray(t[c])||(t[c]=[t[c]]),t[c].push(o)):t[c]=o}),t});it(this,"clearData",(t={})=>{er(this,Or,vu).call(this),er(this,Or,Pl).call(this).forEach(l=>{const c=l.name;if(!c)return;const o=t&&t[c]!==void 0?t[c]:"";er(this,Or,yu).call(this,l,o)}),this.changed=!1});it(this,"setData",t=>{if(!t||typeof t!="object")return;er(this,Or,vu).call(this);let l=!1;er(this,Or,Pl).call(this).forEach(c=>{const o=c.name;!o||!t.hasOwnProperty(o)||er(this,Or,yu).call(this,c,t[o])&&(l=!0)}),l&&(this.changed=!0)});it(this,"initData",t=>{this.clearData(t),this.changed=!1});Y(this,Tl,t=>{this.changed=!0});Y(this,Vc,()=>{for(const t of this.attributes)t.name.startsWith("css-")&&this.style.setProperty(t.name.substring(4),t.value);this.originContents=this.innerHTML.trim(),this.innerHTML="",this.shadowRoot&&this.tagName.toLowerCase()==="nx-div"&&(this.shadowRoot.innerHTML=this.originContents)})}connectedCallback(){return f(this,El)?!1:(this.getAttribute("use-shadow")!=="false"&&!this.shadowRoot?(this.attachShadow({mode:"open"}),tt(this,Ei,this.shadowRoot)):tt(this,Ei,this),f(this,Vc).call(this),tt(this,El,!0),!0)}get changed(){return f(this,Al)}set changed(t){const l=!!t;tt(this,Al,l);const c=this.closest(".detail-wrapper");if(c){const o=c.querySelector("nx-title2");o&&(o.changed=l)}}get root(){return f(this,Ei)||this}}El=new WeakMap,Ei=new WeakMap,Al=new WeakMap,Or=new WeakSet,Pl=function(){return H.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]",f(this,Ei))},yu=function(t,l){const c=t.tagName.toUpperCase(),o=t.type;let r=!1;if(["INPUT","TEXTAREA","SELECT","NX-EDITOR"].includes(c))if(o==="checkbox"){const n=t.getAttribute("true-value")||"Y",s=String(n)===String(l);t.checked!==s&&(r=!0),t.checked=s}else if(o==="radio"){const n=String(t.value)===String(l);t.checked!==n&&(r=!0),t.checked=n}else t.value!==l&&(r=!0),t.value=l;else t.textContent!==l&&(r=!0),t.textContent=l;return r},vu=function(){er(this,Or,Pl).call(this).forEach(t=>{t.removeEventListener("input",f(this,Tl)),t.addEventListener("input",f(this,Tl))})},Tl=new WeakMap,Vc=new WeakMap;class If extends nu{constructor(){super();Y(this,Rl,!1);Y(this,Wc,()=>{const t=this.getAttribute("caption")||"",l=document.createElement("template");l.innerHTML=`
|
|
1319
1319
|
<style>
|
|
1320
1320
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxTitle2.css";
|
|
1321
1321
|
${H.getCustomPath(this,"nxTitle2.css")}
|