diff --git "a/build/client/_app/immutable/nodes/2.s-i08RHU.js" "b/build/client/_app/immutable/nodes/2.s-i08RHU.js" new file mode 100644--- /dev/null +++ "b/build/client/_app/immutable/nodes/2.s-i08RHU.js" @@ -0,0 +1,161 @@ +import{n as qe,I as Ac,Y as tt,Z as ut,_ as Ua,s as wt,U as fr,e as se,c as ae,b as ge,f as q,m as P,i as ke,V as hr,W as dr,X as pr,k as Or,$ as Vt,a0 as sr,a as Te,g as Ae,h as J,p as De,r as or,a1 as $u,a2 as oa,G as el,a3 as kc,a4 as Dt,t as ct,d as ft,a5 as en,a6 as tn,w as ot,F as xc,a7 as Cc,a8 as Oi,a9 as Fi,z as Ke,aa as lt,j as qt,ab as un,v as Qn,ac as ua,x as Rc,B as Ic,ad as Ht,ae as Wt,y as Gt,l as Ge,o as ir,q as rn,af as Qe,ag as Dc,u as Nc}from"../chunks/scheduler.OwA2AG0M.js";import{n as Oc,l as Fc,f as Bc,h as Pc,S as kt,i as xt,t as be,a as Re,g as ht,c as dt,j as tl,k as rl,o as $e,b as rt,d as nt,m as it,e as st}from"../chunks/index.JlSaLmPP.js";import"../chunks/entry.NqRdvUX4.js";import{w as $r}from"../chunks/index.UTqYide5.js";import{e as Pt,u as Lc,f as Mc}from"../chunks/each.N0yHvFdK.js";import{a as nl,p as Uc}from"../chunks/ProgressBar.svelte_svelte_type_style_lang.9muE4jOP.js";import{L as Kn}from"../chunks/LogService.hUlSDADx.js";const il=!0;function zc(r,e,t,n){if(!e)return qe;const i=r.getBoundingClientRect();if(e.left===i.left&&e.right===i.right&&e.top===i.top&&e.bottom===i.bottom)return qe;const{delay:s=0,duration:a=300,easing:o=Ac,start:u=Oc()+s,end:c=u+a,tick:h=qe,css:m}=t(r,{from:e,to:i},n);let w=!0,d=!1,y;function g(){m&&(y=Bc(r,0,1,a,s,o,m)),s||(d=!0)}function b(){m&&Pc(r,y),w=!1}return Fc(p=>{if(!d&&p>=u&&(d=!0),d&&p>=c&&(h(1,0),b()),!w)return!1;if(d){const _=p-u,k=0+1*o(_/a);h(k,1-k)}return!0}),g(),h(0,1),b}function jc(r){const e=getComputedStyle(r);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:n}=e,i=r.getBoundingClientRect();r.style.position="absolute",r.style.width=t,r.style.height=n,sl(r,i)}}function sl(r,e){const t=r.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const n=getComputedStyle(r),i=n.transform==="none"?"":n.transform;r.style.transform=`${i} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}function al(r,e){const t={},n={},i={$$scope:1};let s=r.length;for(;s--;){const a=r[s],o=e[s];if(o){for(const u in a)u in o||(n[u]=1);for(const u in o)i[u]||(t[u]=o[u],i[u]=1);r[s]=o}else for(const u in a)i[u]=1}for(const a in n)a in t||(t[a]=void 0);return t}const Hc="drawerStore";function Wc(){const r=Gc();return tt(Hc,r)}function Gc(){const{subscribe:r,set:e,update:t}=$r({});return{subscribe:r,set:e,update:t,open:n=>t(()=>({open:!0,...n})),close:()=>t(n=>(n.open=!1,n))}}const Vc="modalStore";function Kc(){const r=qc();return tt(Vc,r)}function qc(){const{subscribe:r,set:e,update:t}=$r([]);return{subscribe:r,set:e,update:t,trigger:n=>t(i=>(i.push(n),i)),close:()=>t(n=>(n.length>0&&n.shift(),n)),clear:()=>e([])}}const Xc={message:"Missing Toast Message",autohide:!0,timeout:5e3},ol="toastStore";function ul(){const r=ut(ol);if(!r)throw new Error("toastStore is not initialized. Please ensure that `initializeStores()` is invoked in the root layout file of this app!");return r}function Zc(){const r=Jc();return tt(ol,r)}function Yc(){const r=Math.random();return Number(r).toString(32)}function Jc(){const{subscribe:r,set:e,update:t}=$r([]),n=s=>t(a=>{if(a.length>0){const o=a.findIndex(c=>c.id===s),u=a[o];u&&(u.callback&&u.callback({id:s,status:"closed"}),u.timeoutId&&clearTimeout(u.timeoutId),a.splice(o,1))}return a});function i(s){if(s.autohide===!0)return setTimeout(()=>{n(s.id)},s.timeout)}return{subscribe:r,close:n,trigger:s=>{const a=Yc();return t(o=>{s&&s.callback&&s.callback({id:a,status:"queued"}),s.hideDismiss&&(s.autohide=!0);const u={...Xc,...s,id:a};return u.timeoutId=i(u),o.push(u),o}),a},freeze:s=>t(a=>(a.length>0&&clearTimeout(a[s].timeoutId),a)),unfreeze:s=>t(a=>(a.length>0&&(a[s].timeoutId=i(a[s])),a)),clear:()=>e([])}}function Qc(){Kc(),Zc(),Wc()}function la(r){const e=r-1;return e*e*e+1}function za(r,{delay:e=0,duration:t=400,easing:n=la,x:i=0,y:s=0,opacity:a=0}={}){const o=getComputedStyle(r),u=+o.opacity,c=o.transform==="none"?"":o.transform,h=u*(1-a),[m,w]=Ua(i),[d,y]=Ua(s);return{delay:e,duration:t,easing:n,css:(g,b)=>` + transform: ${c} translate(${(1-g)*m}${w}, ${(1-g)*d}${y}); + opacity: ${u-h*b}`}}function ja(r,{delay:e=0,duration:t=400,easing:n=la,axis:i="y"}={}){const s=getComputedStyle(r),a=+s.opacity,o=i==="y"?"height":"width",u=parseFloat(s[o]),c=i==="y"?["top","bottom"]:["left","right"],h=c.map(p=>`${p[0].toUpperCase()}${p.slice(1)}`),m=parseFloat(s[`padding${h[0]}`]),w=parseFloat(s[`padding${h[1]}`]),d=parseFloat(s[`margin${h[0]}`]),y=parseFloat(s[`margin${h[1]}`]),g=parseFloat(s[`border${h[0]}Width`]),b=parseFloat(s[`border${h[1]}Width`]);return{delay:e,duration:t,easing:n,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*a};${o}: ${p*u}px;padding-${c[0]}: ${p*m}px;padding-${c[1]}: ${p*w}px;margin-${c[0]}: ${p*d}px;margin-${c[1]}: ${p*y}px;border-${c[0]}-width: ${p*g}px;border-${c[1]}-width: ${p*b}px;`}}function $c(r){let e,t,n;const i=r[19].default,s=fr(i,r,r[18],null);return{c(){e=se("div"),s&&s.c(),this.h()},l(a){e=ae(a,"DIV",{class:!0,"data-testid":!0});var o=ge(e);s&&s.l(o),o.forEach(q),this.h()},h(){P(e,"class",t="accordion "+r[0]),P(e,"data-testid","accordion")},m(a,o){ke(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&262144)&&hr(s,i,a,a[18],n?pr(i,a[18],o,null):dr(a[18]),null),(!n||o&1&&t!==(t="accordion "+a[0]))&&P(e,"class",t)},i(a){n||(be(s,a),n=!0)},o(a){Re(s,a),n=!1},d(a){a&&q(e),s&&s.d(a)}}}function ef(r,e,t){let n,i;Or(r,nl,C=>t(20,i=C));let{$$slots:s={},$$scope:a}=e,{autocollapse:o=!1}=e,{width:u="w-full"}=e,{spacing:c="space-y-1"}=e,{disabled:h=!1}=e,{padding:m="py-2 px-4"}=e,{hover:w="hover:bg-primary-hover-token"}=e,{rounded:d="rounded-container-token"}=e,{caretOpen:y="rotate-180"}=e,{caretClosed:g=""}=e,{regionControl:b=""}=e,{regionPanel:p="space-y-4"}=e,{regionCaret:_=""}=e,{transitions:k=!i}=e,{transitionIn:I=ja}=e,{transitionInParams:F={duration:200}}=e,{transitionOut:K=ja}=e,{transitionOutParams:M={duration:200}}=e;const Y=$r(null);return tt("active",Y),tt("autocollapse",o),tt("disabled",h),tt("padding",m),tt("hover",w),tt("rounded",d),tt("caretOpen",y),tt("caretClosed",g),tt("regionControl",b),tt("regionPanel",p),tt("regionCaret",_),tt("transitions",k),tt("transitionIn",I),tt("transitionInParams",F),tt("transitionOut",K),tt("transitionOutParams",M),r.$$set=C=>{t(22,e=Vt(Vt({},e),sr(C))),"autocollapse"in C&&t(1,o=C.autocollapse),"width"in C&&t(2,u=C.width),"spacing"in C&&t(3,c=C.spacing),"disabled"in C&&t(4,h=C.disabled),"padding"in C&&t(5,m=C.padding),"hover"in C&&t(6,w=C.hover),"rounded"in C&&t(7,d=C.rounded),"caretOpen"in C&&t(8,y=C.caretOpen),"caretClosed"in C&&t(9,g=C.caretClosed),"regionControl"in C&&t(10,b=C.regionControl),"regionPanel"in C&&t(11,p=C.regionPanel),"regionCaret"in C&&t(12,_=C.regionCaret),"transitions"in C&&t(13,k=C.transitions),"transitionIn"in C&&t(14,I=C.transitionIn),"transitionInParams"in C&&t(15,F=C.transitionInParams),"transitionOut"in C&&t(16,K=C.transitionOut),"transitionOutParams"in C&&t(17,M=C.transitionOutParams),"$$scope"in C&&t(18,a=C.$$scope)},r.$$.update=()=>{t(0,n=`${u} ${c} ${e.class??""}`)},e=sr(e),[n,o,u,c,h,m,w,d,y,g,b,p,_,k,I,F,K,M,a,s]}class tf extends kt{constructor(e){super(),xt(this,e,ef,$c,wt,{autocollapse:1,width:2,spacing:3,disabled:4,padding:5,hover:6,rounded:7,caretOpen:8,caretClosed:9,regionControl:10,regionPanel:11,regionCaret:12,transitions:13,transitionIn:14,transitionInParams:15,transitionOut:16,transitionOutParams:17})}}function Bi(r,e){const{transition:t,params:n,enabled:i}=e;return i?t(r,n):"duration"in n?t(r,{duration:0}):{duration:0}}const rf=r=>({}),Ha=r=>({}),nf=r=>({}),Wa=r=>({}),sf=r=>({}),Ga=r=>({}),af=r=>({}),Va=r=>({}),of=r=>({}),Ka=r=>({});function qa(r){let e,t;const n=r[30].lead,i=fr(n,r,r[29],Ka);return{c(){e=se("div"),i&&i.c(),this.h()},l(s){e=ae(s,"DIV",{class:!0});var a=ge(e);i&&i.l(a),a.forEach(q),this.h()},h(){P(e,"class","accordion-lead")},m(s,a){ke(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&536870912)&&hr(i,n,s,s[29],t?pr(n,s[29],a,of):dr(s[29]),Ka)},i(s){t||(be(i,s),t=!0)},o(s){Re(i,s),t=!1},d(s){s&&q(e),i&&i.d(s)}}}function uf(r){let e;return{c(){e=ct("(summary)")},l(t){e=ft(t,"(summary)")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function lf(r){let e,t,n;return{c(){e=se("div"),t=new en(!1),this.h()},l(i){e=ae(i,"DIV",{class:!0});var s=ge(e);t=tn(s,!1),s.forEach(q),this.h()},h(){t.a=null,P(e,"class",n="accordion-summary-caret "+r[11])},m(i,s){ke(i,e,s),t.m(r[14],e)},p(i,s){s[0]&2048&&n!==(n="accordion-summary-caret "+i[11])&&P(e,"class",n)},i:qe,o:qe,d(i){i&&q(e)}}}function cf(r){let e,t,n,i,s;const a=[hf,ff],o=[];function u(c,h){return c[8]?0:1}return t=u(r),n=o[t]=a[t](r),{c(){e=se("div"),n.c(),this.h()},l(c){e=ae(c,"DIV",{class:!0});var h=ge(e);n.l(h),h.forEach(q),this.h()},h(){P(e,"class",i="accordion-summary-icons "+r[10])},m(c,h){ke(c,e,h),o[t].m(e,null),s=!0},p(c,h){let m=t;t=u(c),t===m?o[t].p(c,h):(ht(),Re(o[m],1,1,()=>{o[m]=null}),dt(),n=o[t],n?n.p(c,h):(n=o[t]=a[t](c),n.c()),be(n,1),n.m(e,null)),(!s||h[0]&1024&&i!==(i="accordion-summary-icons "+c[10]))&&P(e,"class",i)},i(c){s||(be(n),s=!0)},o(c){Re(n),s=!1},d(c){c&&q(e),o[t].d()}}}function ff(r){let e;const t=r[30].iconOpen,n=fr(t,r,r[29],Wa),i=n||df(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&hr(n,t,s,s[29],e?pr(t,s[29],a,nf):dr(s[29]),Wa)},i(s){e||(be(i,s),e=!0)},o(s){Re(i,s),e=!1},d(s){i&&i.d(s)}}}function hf(r){let e;const t=r[30].iconClosed,n=fr(t,r,r[29],Ga),i=n||pf(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&hr(n,t,s,s[29],e?pr(t,s[29],a,sf):dr(s[29]),Ga)},i(s){e||(be(i,s),e=!0)},o(s){Re(i,s),e=!1},d(s){i&&i.d(s)}}}function df(r){let e,t;return{c(){e=new en(!1),t=ot(),this.h()},l(n){e=tn(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),ke(n,t,i)},p:qe,d(n){n&&(q(t),e.d())}}}function pf(r){let e,t;return{c(){e=new en(!1),t=ot(),this.h()},l(n){e=tn(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),ke(n,t,i)},p:qe,d(n){n&&(q(t),e.d())}}}function Xa(r){let e,t,n,i,s,a,o;const u=r[30].content,c=fr(u,r,r[29],Ha),h=c||mf();return{c(){e=se("div"),h&&h.c(),this.h()},l(m){e=ae(m,"DIV",{class:!0,id:!0,role:!0,"aria-hidden":!0,"aria-labelledby":!0});var w=ge(e);h&&h.l(w),w.forEach(q),this.h()},h(){P(e,"class",t="accordion-panel "+r[9]),P(e,"id",n="accordion-panel-"+r[0]),P(e,"role","region"),P(e,"aria-hidden",i=!r[8]),P(e,"aria-labelledby",r[0])},m(m,w){ke(m,e,w),h&&h.m(e,null),o=!0},p(m,w){r=m,c&&c.p&&(!o||w[0]&536870912)&&hr(c,u,r,r[29],o?pr(u,r[29],w,rf):dr(r[29]),Ha),(!o||w[0]&512&&t!==(t="accordion-panel "+r[9]))&&P(e,"class",t),(!o||w[0]&1&&n!==(n="accordion-panel-"+r[0]))&&P(e,"id",n),(!o||w[0]&256&&i!==(i=!r[8]))&&P(e,"aria-hidden",i),(!o||w[0]&1)&&P(e,"aria-labelledby",r[0])},i(m){o||(be(h,m),m&&el(()=>{o&&(a&&a.end(1),s=tl(e,Bi,{transition:r[4],params:r[5],enabled:r[3]}),s.start())}),o=!0)},o(m){Re(h,m),s&&s.invalidate(),m&&(a=rl(e,Bi,{transition:r[6],params:r[7],enabled:r[3]})),o=!1},d(m){m&&q(e),h&&h.d(m),m&&a&&a.end()}}}function mf(r){let e;return{c(){e=ct("(content)")},l(t){e=ft(t,"(content)")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function gf(r){let e,t,n,i,s,a,o,u,c,h,m,w,d,y,g=r[16].lead&&qa(r);const b=r[30].summary,p=fr(b,r,r[29],Va),_=p||uf(),k=[cf,lf],I=[];function F(M,Y){return M[16].iconClosed||M[16].iconOpen?0:1}a=F(r),o=I[a]=k[a](r);let K=r[8]&&Xa(r);return{c(){e=se("div"),t=se("button"),g&&g.c(),n=Te(),i=se("div"),_&&_.c(),s=Te(),o.c(),h=Te(),K&&K.c(),this.h()},l(M){e=ae(M,"DIV",{class:!0,"data-testid":!0});var Y=ge(e);t=ae(Y,"BUTTON",{type:!0,class:!0,id:!0,"aria-expanded":!0,"aria-controls":!0});var C=ge(t);g&&g.l(C),n=Ae(C),i=ae(C,"DIV",{class:!0});var oe=ge(i);_&&_.l(oe),oe.forEach(q),s=Ae(C),o.l(C),C.forEach(q),h=Ae(Y),K&&K.l(Y),Y.forEach(q),this.h()},h(){P(i,"class","accordion-summary flex-1"),P(t,"type","button"),P(t,"class",u="accordion-control "+r[12]),P(t,"id",r[0]),P(t,"aria-expanded",r[8]),P(t,"aria-controls",c="accordion-panel-"+r[0]),t.disabled=r[2],P(e,"class",m="accordion-item "+r[13]),P(e,"data-testid","accordion-item")},m(M,Y){ke(M,e,Y),J(e,t),g&&g.m(t,null),J(t,n),J(t,i),_&&_.m(i,null),J(t,s),I[a].m(t,null),J(e,h),K&&K.m(e,null),w=!0,d||(y=[De(t,"click",r[15]),De(t,"click",r[31]),De(t,"keydown",r[32]),De(t,"keyup",r[33]),De(t,"keypress",r[34])],d=!0)},p(M,Y){M[16].lead?g?(g.p(M,Y),Y[0]&65536&&be(g,1)):(g=qa(M),g.c(),be(g,1),g.m(t,n)):g&&(ht(),Re(g,1,1,()=>{g=null}),dt()),p&&p.p&&(!w||Y[0]&536870912)&&hr(p,b,M,M[29],w?pr(b,M[29],Y,af):dr(M[29]),Va);let C=a;a=F(M),a===C?I[a].p(M,Y):(ht(),Re(I[C],1,1,()=>{I[C]=null}),dt(),o=I[a],o?o.p(M,Y):(o=I[a]=k[a](M),o.c()),be(o,1),o.m(t,null)),(!w||Y[0]&4096&&u!==(u="accordion-control "+M[12]))&&P(t,"class",u),(!w||Y[0]&1)&&P(t,"id",M[0]),(!w||Y[0]&256)&&P(t,"aria-expanded",M[8]),(!w||Y[0]&1&&c!==(c="accordion-panel-"+M[0]))&&P(t,"aria-controls",c),(!w||Y[0]&4)&&(t.disabled=M[2]),M[8]?K?(K.p(M,Y),Y[0]&256&&be(K,1)):(K=Xa(M),K.c(),be(K,1),K.m(e,null)):K&&(ht(),Re(K,1,1,()=>{K=null}),dt()),(!w||Y[0]&8192&&m!==(m="accordion-item "+M[13]))&&P(e,"class",m)},i(M){w||(be(g),be(_,M),be(o),be(K),w=!0)},o(M){Re(g),Re(_,M),Re(o),Re(K),w=!1},d(M){M&&q(e),g&&g.d(),_&&_.d(M),I[a].d(),K&&K.d(),d=!1,or(y)}}}const wf="",yf="text-start w-full flex items-center space-x-4",Za="fill-current w-3 transition-transform duration-[200ms]",bf="";function _f(r,e,t){let n,i,s,a,o,u,c,h,m=qe,w=()=>(m(),m=kc(I,L=>t(28,h=L)),I);r.$$.on_destroy.push(()=>m());let{$$slots:d={},$$scope:y}=e;const g=$u(d),b=oa();let{open:p=!1}=e,{id:_=String(Math.random())}=e,{autocollapse:k=ut("autocollapse")}=e,{active:I=ut("active")}=e;w();let{disabled:F=ut("disabled")}=e,{padding:K=ut("padding")}=e,{hover:M=ut("hover")}=e,{rounded:Y=ut("rounded")}=e,{caretOpen:C=ut("caretOpen")}=e,{caretClosed:oe=ut("caretClosed")}=e,{regionControl:Z=ut("regionControl")}=e,{regionPanel:N=ut("regionPanel")}=e,{regionCaret:Q=ut("regionCaret")}=e,{transitions:x=ut("transitions")}=e,{transitionIn:W=ut("transitionIn")}=e,{transitionInParams:ce=ut("transitionInParams")}=e,{transitionOut:G=ut("transitionOut")}=e,{transitionOutParams:me=ut("transitionOutParams")}=e;const X=` + + + `;function he(L){k===!0?I.set(_):t(17,p=!p),j(L)}function j(L){const T=k?h===_:p;b("toggle",{event:L,id:_,panelId:`accordion-panel-${_}`,open:T,autocollapse:k})}k&&p&&he();function R(L){Dt.call(this,r,L)}function $(L){Dt.call(this,r,L)}function te(L){Dt.call(this,r,L)}function ie(L){Dt.call(this,r,L)}return r.$$set=L=>{t(37,e=Vt(Vt({},e),sr(L))),"open"in L&&t(17,p=L.open),"id"in L&&t(0,_=L.id),"autocollapse"in L&&t(18,k=L.autocollapse),"active"in L&&w(t(1,I=L.active)),"disabled"in L&&t(2,F=L.disabled),"padding"in L&&t(19,K=L.padding),"hover"in L&&t(20,M=L.hover),"rounded"in L&&t(21,Y=L.rounded),"caretOpen"in L&&t(22,C=L.caretOpen),"caretClosed"in L&&t(23,oe=L.caretClosed),"regionControl"in L&&t(24,Z=L.regionControl),"regionPanel"in L&&t(25,N=L.regionPanel),"regionCaret"in L&&t(26,Q=L.regionCaret),"transitions"in L&&t(3,x=L.transitions),"transitionIn"in L&&t(4,W=L.transitionIn),"transitionInParams"in L&&t(5,ce=L.transitionInParams),"transitionOut"in L&&t(6,G=L.transitionOut),"transitionOutParams"in L&&t(7,me=L.transitionOutParams),"$$scope"in L&&t(29,y=L.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&393216&&p&&k&&he(),r.$$.dirty[0]&268828673&&t(8,n=k?h===_:p),t(13,i=`${wf} ${e.class??""}`),r.$$.dirty[0]&20447232&&t(12,s=`${yf} ${K} ${M} ${Y} ${Z}`),r.$$.dirty[0]&12583168&&t(27,a=n?C:oe),r.$$.dirty[0]&201326592&&t(11,o=`${Za} ${Q} ${a}`),r.$$.dirty[0]&67108864&&t(10,u=`${Za} ${Q}`),r.$$.dirty[0]&36175872&&t(9,c=`${bf} ${K} ${Y} ${N}`)},e=sr(e),[_,I,F,x,W,ce,G,me,n,c,u,o,s,i,X,he,g,p,k,K,M,Y,C,oe,Z,N,Q,a,h,y,d,R,$,te,ie]}class vf extends kt{constructor(e){super(),xt(this,e,_f,gf,wt,{open:17,id:0,autocollapse:18,active:1,disabled:2,padding:19,hover:20,rounded:21,caretOpen:22,caretClosed:23,regionControl:24,regionPanel:25,regionCaret:26,transitions:3,transitionIn:4,transitionInParams:5,transitionOut:6,transitionOutParams:7},null,[-1,-1])}}function Ef(r,{from:e,to:t},n={}){const i=getComputedStyle(r),s=i.transform==="none"?"":i.transform,[a,o]=i.transformOrigin.split(" ").map(parseFloat),u=e.left+e.width*a/t.width-(t.left+a),c=e.top+e.height*o/t.height-(t.top+o),{delay:h=0,duration:m=d=>Math.sqrt(d)*120,easing:w=la}=n;return{delay:h,duration:xc(m)?m(Math.sqrt(u*u+c*c)):m,easing:w,css:(d,y)=>{const g=y*u,b=y*c,p=d+y*e.width/t.width,_=d+y*e.height/t.height;return`transform: ${s} translate(${g}px, ${b}px) scale(${p}, ${_});`}}}function Sf(r){let e,t,n;const i=r[15].default,s=fr(i,r,r[14],null);return{c(){e=se("div"),s&&s.c(),this.h()},l(a){e=ae(a,"DIV",{class:!0,"data-testid":!0,role:!0,"aria-labelledby":!0});var o=ge(e);s&&s.l(o),o.forEach(q),this.h()},h(){P(e,"class",t="radio-group "+r[1]),P(e,"data-testid","radio-group"),P(e,"role","radiogroup"),P(e,"aria-labelledby",r[0])},m(a,o){ke(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&16384)&&hr(s,i,a,a[14],n?pr(i,a[14],o,null):dr(a[14]),null),(!n||o&2&&t!==(t="radio-group "+a[1]))&&P(e,"class",t),(!n||o&1)&&P(e,"aria-labelledby",a[0])},i(a){n||(be(s,a),n=!0)},o(a){Re(s,a),n=!1},d(a){a&&q(e),s&&s.d(a)}}}const Tf="p-1";function Af(r,e,t){let n,{$$slots:i={},$$scope:s}=e,{display:a="inline-flex"}=e,{flexDirection:o="flex-row"}=e,{gap:u="gap-1"}=e,{background:c="bg-surface-200-700-token"}=e,{border:h="border-token border-surface-400-500-token"}=e,{rounded:m="rounded-token"}=e,{padding:w="px-4 py-1"}=e,{active:d="variant-filled"}=e,{hover:y="hover:variant-soft"}=e,{color:g=""}=e,{fill:b=""}=e,{regionLabel:p=""}=e,{labelledby:_=""}=e;return tt("rounded",m),tt("padding",w),tt("active",d),tt("hover",y),tt("color",g),tt("fill",b),tt("regionLabel",p),r.$$set=k=>{t(16,e=Vt(Vt({},e),sr(k))),"display"in k&&t(2,a=k.display),"flexDirection"in k&&t(3,o=k.flexDirection),"gap"in k&&t(4,u=k.gap),"background"in k&&t(5,c=k.background),"border"in k&&t(6,h=k.border),"rounded"in k&&t(7,m=k.rounded),"padding"in k&&t(8,w=k.padding),"active"in k&&t(9,d=k.active),"hover"in k&&t(10,y=k.hover),"color"in k&&t(11,g=k.color),"fill"in k&&t(12,b=k.fill),"regionLabel"in k&&t(13,p=k.regionLabel),"labelledby"in k&&t(0,_=k.labelledby),"$$scope"in k&&t(14,s=k.$$scope)},r.$$.update=()=>{t(1,n=`${Tf} ${a} ${o} ${u} ${c} ${h} ${m} ${e.class??""}`)},e=sr(e),[_,n,a,o,u,c,h,m,w,d,y,g,b,p,s,i]}class kf extends kt{constructor(e){super(),xt(this,e,Af,Sf,wt,{display:2,flexDirection:3,gap:4,background:5,border:6,rounded:7,padding:8,active:9,hover:10,color:11,fill:12,regionLabel:13,labelledby:0})}}function xf(r){let e,t,n,i,s,a,o,u,c,h,m,w=[{type:"radio"},{name:r[1]},{__value:r[2]},r[11](),{tabindex:"-1"}],d={};for(let b=0;b{Y=X,t(7,Y)})}function me(){w=this.__value,t(0,w)}return r.$$set=X=>{t(31,e=Vt(Vt({},e),sr(X))),t(30,c=Fi(e,u)),"group"in X&&t(0,w=X.group),"name"in X&&t(1,d=X.name),"value"in X&&t(2,y=X.value),"title"in X&&t(3,g=X.title),"label"in X&&t(4,b=X.label),"rounded"in X&&t(12,p=X.rounded),"padding"in X&&t(13,_=X.padding),"active"in X&&t(14,k=X.active),"hover"in X&&t(15,I=X.hover),"color"in X&&t(16,F=X.color),"fill"in X&&t(17,K=X.fill),"regionLabel"in X&&t(5,M=X.regionLabel),"$$scope"in X&&t(20,m=X.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&5&&t(6,n=y===w),r.$$.dirty[0]&245824&&t(19,i=n?`${k} ${F} ${K}`:I),t(18,s=e.disabled?If:""),t(8,o=`${Rf} ${_} ${p} ${i} ${s} ${e.class??""}`)},t(9,a=`${Cf}`),e=sr(e),[w,d,y,g,b,M,n,Y,o,a,C,oe,p,_,k,I,F,K,s,i,m,h,N,Q,x,W,ce,G,me,Z]}class Ya extends kt{constructor(e){super(),xt(this,e,Df,xf,wt,{group:0,name:1,value:2,title:3,label:4,rounded:12,padding:13,active:14,hover:15,color:16,fill:17,regionLabel:5},null,[-1,-1])}}function Ja(r){let e,t;const n=r[22].default,i=fr(n,r,r[21],null);return{c(){e=se("div"),i&&i.c(),this.h()},l(s){e=ae(s,"DIV",{class:!0});var a=ge(e);i&&i.l(a),a.forEach(q),this.h()},h(){P(e,"class","slide-toggle-text ml-3")},m(s,a){ke(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&2097152)&&hr(i,n,s,s[21],t?pr(n,s[21],a,null):dr(s[21]),null)},i(s){t||(be(i,s),t=!0)},o(s){Re(i,s),t=!1},d(s){s&&q(e),i&&i.d(s)}}}function Nf(r){let e,t,n,i,s,a,o,u,c,h,m,w,d,y,g,b=[{type:"checkbox"},{class:"slide-toggle-input hidden"},{name:r[1]},r[8](),{disabled:i=r[9].disabled}],p={};for(let k=0;k{_=null}),dt()),(!d||I[0]&32&&m!==(m="slide-toggle-label "+k[5]))&&P(t,"class",m),(!d||I[0]&4)&&P(e,"id",k[2]),(!d||I[0]&64&&w!==(w="slide-toggle "+k[6]))&&P(e,"class",w),(!d||I[0]&4)&&P(e,"aria-label",k[2]),(!d||I[0]&1)&&P(e,"aria-checked",k[0])},i(k){d||(be(_),d=!0)},o(k){Re(_),d=!1},d(k){k&&q(e),_&&_.d(),y=!1,or(g)}}}const Of="inline-block",Ff="unstyled flex items-center",Bf="flex transition-all duration-[200ms] cursor-pointer",Pf="w-[50%] h-full scale-[0.8] transition-all duration-[200ms] shadow";function Lf(r,e,t){let n,i,s,a,o,u,c,h;const m=["name","checked","size","background","active","border","rounded","label"];let w=Fi(e,m),{$$slots:d={},$$scope:y}=e;const g=$u(d),b=oa();let{name:p}=e,{checked:_=!1}=e,{size:k="md"}=e,{background:I="bg-surface-400 dark:bg-surface-700"}=e,{active:F="bg-surface-900 dark:bg-surface-300"}=e,{border:K=""}=e,{rounded:M="rounded-full"}=e,{label:Y=""}=e,C;switch(k){case"sm":C="w-12 h-6";break;case"lg":C="w-20 h-10";break;default:C="w-16 h-8"}function oe(j){["Enter","Space"].includes(j.code)&&(j.preventDefault(),b("keyup",j),j.currentTarget.firstChild.click())}function Z(){return delete w.class,w}function N(j){Dt.call(this,r,j)}function Q(j){Dt.call(this,r,j)}function x(j){Dt.call(this,r,j)}function W(j){Dt.call(this,r,j)}function ce(j){Dt.call(this,r,j)}function G(j){Dt.call(this,r,j)}function me(j){Dt.call(this,r,j)}function X(j){Dt.call(this,r,j)}function he(){_=this.checked,t(0,_)}return r.$$set=j=>{t(9,e=Vt(Vt({},e),sr(j))),t(33,w=Fi(e,m)),"name"in j&&t(1,p=j.name),"checked"in j&&t(0,_=j.checked),"size"in j&&t(11,k=j.size),"background"in j&&t(12,I=j.background),"active"in j&&t(13,F=j.active),"border"in j&&t(14,K=j.border),"rounded"in j&&t(15,M=j.rounded),"label"in j&&t(2,Y=j.label),"$$scope"in j&&t(21,y=j.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&12289&&t(19,n=_?F:`${I} cursor-pointer`),r.$$.dirty[0]&1&&t(18,i=_?"bg-white/75":"bg-white"),r.$$.dirty[0]&1&&t(17,s=_?"translate-x-full":""),t(20,a=e.disabled===!0?"opacity-50":"hover:brightness-[105%] dark:hover:brightness-110 cursor-pointer"),t(6,o=`${Of} ${M} ${a} ${e.class??""}`),r.$$.dirty[0]&638976&&t(4,c=`${Bf} ${K} ${M} ${C} ${n}`),r.$$.dirty[0]&425984&&t(3,h=`${Pf} ${M} ${i} ${s}`)},t(5,u=`${Ff}`),e=sr(e),[_,p,Y,h,c,u,o,oe,Z,e,g,k,I,F,K,M,C,s,i,n,a,y,d,N,Q,x,W,ce,G,me,X,he]}class Ii extends kt{constructor(e){super(),xt(this,e,Lf,Nf,wt,{name:1,checked:0,size:11,background:12,active:13,border:14,rounded:15,label:2},null,[-1,-1])}}function Qa(r,e,t){const n=r.slice();return n[36]=e[t],n[38]=t,n}function $a(r){let e,t,n=[],i=new Map,s,a,o,u=Pt(r[11]);const c=h=>h[36];for(let h=0;h{g&&(w&&w.end(1),m=tl(t,Bi,{transition:e[5],params:{x:e[10].x,y:e[10].y,...e[6]},enabled:e[4]}),m.start())}),g=!0)},o(F){m&&m.invalidate(),w=rl(t,Bi,{transition:e[7],params:{x:e[10].x,y:e[10].y,...e[8]},enabled:e[4]}),g=!1},d(F){F&&q(t),_&&_.d(),F&&w&&w.end(),b=!1,or(p)}}}function Mf(r){let e,t,n=r[9].length&&$a(r);return{c(){n&&n.c(),e=ot()},l(i){n&&n.l(i),e=ot()},m(i,s){n&&n.m(i,s),ke(i,e,s),t=!0},p(i,s){i[9].length?n?(n.p(i,s),s[0]&512&&be(n,1)):(n=$a(i),n.c(),be(n,1),n.m(e.parentNode,e)):n&&(ht(),Re(n,1,1,()=>{n=null}),dt())},i(i){t||(be(n),t=!0)},o(i){Re(n),t=!1},d(i){i&&q(e),n&&n.d(i)}}}const Uf="flex fixed top-0 left-0 right-0 bottom-0 pointer-events-none",zf="flex flex-col gap-y-2",jf="flex justify-between items-center pointer-events-auto",Hf="flex items-center space-x-2";function Wf(r,e,t){let n,i,s,a,o,u;Or(r,nl,R=>t(34,u=R));const c=ul();Or(r,c,R=>t(9,o=R));let{position:h="b"}=e,{max:m=3}=e,{background:w="variant-filled-secondary"}=e,{width:d="max-w-[640px]"}=e,{color:y=""}=e,{padding:g="p-4"}=e,{spacing:b="space-x-4"}=e,{rounded:p="rounded-container-token"}=e,{shadow:_="shadow-lg"}=e,{zIndex:k="z-[888]"}=e,{buttonAction:I="btn variant-filled"}=e,{buttonDismiss:F="btn-icon btn-icon-sm variant-filled"}=e,{buttonDismissLabel:K="✕"}=e,{transitions:M=!u}=e,{transitionIn:Y=za}=e,{transitionInParams:C={duration:250}}=e,{transitionOut:oe=za}=e,{transitionOutParams:Z={duration:250}}=e,N,Q,x={x:0,y:0};switch(h){case"t":N="justify-center items-start",Q="items-center",x={x:0,y:-100};break;case"b":N="justify-center items-end",Q="items-center",x={x:0,y:100};break;case"l":N="justify-start items-center",Q="items-start",x={x:-100,y:0};break;case"r":N="justify-end items-center",Q="items-end",x={x:100,y:0};break;case"tl":N="justify-start items-start",Q="items-start",x={x:-100,y:0};break;case"tr":N="justify-end items-start",Q="items-end",x={x:100,y:0};break;case"bl":N="justify-start items-end",Q="items-start",x={x:-100,y:0};break;case"br":N="justify-end items-end",Q="items-end",x={x:100,y:0};break}function W(R){o[R]?.action?.response(),c.close(o[R].id)}function ce(R){o[R]?.hoverable&&(c.freeze(R),t(13,i+=" scale-[105%]"))}function G(R){o[R]?.hoverable&&(c.unfreeze(R),t(13,i=i.replace(" scale-[105%]","")))}const me=R=>W(R),X=R=>c.close(R.id),he=R=>ce(R),j=R=>G(R);return r.$$set=R=>{t(35,e=Vt(Vt({},e),sr(R))),"position"in R&&t(19,h=R.position),"max"in R&&t(20,m=R.max),"background"in R&&t(0,w=R.background),"width"in R&&t(21,d=R.width),"color"in R&&t(22,y=R.color),"padding"in R&&t(23,g=R.padding),"spacing"in R&&t(24,b=R.spacing),"rounded"in R&&t(25,p=R.rounded),"shadow"in R&&t(26,_=R.shadow),"zIndex"in R&&t(27,k=R.zIndex),"buttonAction"in R&&t(1,I=R.buttonAction),"buttonDismiss"in R&&t(2,F=R.buttonDismiss),"buttonDismissLabel"in R&&t(3,K=R.buttonDismissLabel),"transitions"in R&&t(4,M=R.transitions),"transitionIn"in R&&t(5,Y=R.transitionIn),"transitionInParams"in R&&t(6,C=R.transitionInParams),"transitionOut"in R&&t(7,oe=R.transitionOut),"transitionOutParams"in R&&t(8,Z=R.transitionOutParams)},r.$$.update=()=>{t(14,n=`${Uf} ${N} ${k} ${e.class||""}`),r.$$.dirty[0]&545259520&&t(13,i=`${zf} ${Q} ${g}`),r.$$.dirty[0]&132120576&&t(12,s=`${jf} ${d} ${y} ${g} ${b} ${p} ${_}`),r.$$.dirty[0]&1049088&&t(11,a=Array.from(o).slice(0,m))},e=sr(e),[w,I,F,K,M,Y,C,oe,Z,o,x,a,s,i,n,c,W,ce,G,h,m,d,y,g,b,p,_,k,N,Q,me,X,he,j]}class Gf extends kt{constructor(e){super(),xt(this,e,Wf,Mf,wt,{position:19,max:20,background:0,width:21,color:22,padding:23,spacing:24,rounded:25,shadow:26,zIndex:27,buttonAction:1,buttonDismiss:2,buttonDismissLabel:3,transitions:4,transitionIn:5,transitionInParams:6,transitionOut:7,transitionOutParams:8},null,[-1,-1])}}const Vf=!1,n1=Object.freeze(Object.defineProperty({__proto__:null,prerender:Vf},Symbol.toStringTag,{value:"Module"}));function yi(r){if(!r.endsWith("px"))return;const e=parseFloat(r.slice(0,r.length-2));return isNaN(e)?void 0:e}const ll=r=>r?"height":"width",Ys=r=>window.getComputedStyle(r),Js=r=>r.getBoundingClientRect(),Kf=(r,e=!0)=>{if(r.getPropertyValue("box-sizing")==="border-box")return;const t=yi(r.getPropertyValue("border-left-width"));if(t===void 0){console.error("Splitpanes Error: Fail to parse container `border-left-width`.");return}const n=yi(r.getPropertyValue("border-top-width"));if(n===void 0){console.error("Splitpanes Error: Fail to parse container `border-top-width`.");return}const i={left:t,top:n};if(e){const s=yi(r.getPropertyValue("border-right-width"));if(s===void 0){console.error("Splitpanes Error: Fail to parse container `border-right-width`.");return}const a=yi(r.getPropertyValue("border-bottom-width"));if(a===void 0){console.error("Splitpanes Error: Fail to parse container `border-bottom-width`.");return}const o=i;o.right=s,o.bottom=a}return i};function qf(r,e){e||(e=Ys(r));const t=Js(r),n=Kf(e,!0)||{left:0,top:0,right:0,bottom:0};return{width:t.width-n.left-n.right,height:t.height-n.top-n.bottom,left:t.left+n.left,top:t.top+n.top}}const io=(r,e)=>({left:r.left-e.left,top:r.top-e.top});function so(r){const e=r,t=r,{clientX:n,clientY:i}="ontouchstart"in window&&t.touches?t.touches[0]:e;return{left:n,top:i}}function ao(r,e,t,n){let i=0;for(let s=e;st(31,s=re));const Q=$r(d);Or(r,Q,re=>t(30,i=re));const x=$r(void 0);Or(r,x,re=>t(29,n=re));let W=null,ce=null;tt(cl,{showFirstSplitter:Q,veryFirstPaneKey:x,isHorizontal:N,ssrRegisterPaneSize:void 0,onPaneInit:re=>(n===void 0&&un(x,n=re,n),{undefinedPaneInitSize:0}),clientOnly:{onPaneAdd:me,onPaneRemove:X}});function me(re){let xe=-1;Array.from(re.element.parentNode.children).some(Ce=>(Ce.className.includes("splitpanes__pane")&&xe++,Ce===re.element)),xe===0&&un(x,n=re.key,n),Z.splice(xe,0,re);for(let Ce=0;Ce{re.isReady=!0,p("pane-add",{index:xe,panes:ne()})});const Oe=(Ce,Fe=!0)=>Se=>{(Fe||re.index>0)&&Ce(Se,re)};return{onSplitterDown:Oe(S,!1),onSplitterClick:Oe(D,!1),onSplitterDblClick:Oe(O),onPaneClick:Oe(he),reportGivenSizeChange:Oe(j)}}async function X(re){const xe=Z.findIndex(Oe=>Oe.key===re);if(xe>=0){const Oe=Z.splice(xe,1)[0];for(let Ce=0;Ce0?Z[0].key:void 0,n),k&&(await z(),p("pane-remove",{removed:Oe,panes:ne()}))}}function he(re,xe){p("pane-click",xe)}function j(re,xe){xe.setSz(re),z()}Qn(()=>{Ee(),ue();for(let re=0;re{t(6,F=!0)},0)}),ua(()=>{k&&te(),k=!1}),Rc(()=>{Ee()});function R(re){if(w==="auto")try{return(re??Ys(_)).direction==="rtl"}catch{}return w===!0}function $(){document.body.style.cursor=N?"col-resize":"row-resize",document.addEventListener("mousemove",H,{passive:!1}),document.addEventListener("mouseup",U),"ontouchstart"in window&&(document.addEventListener("touchmove",H,{passive:!1}),document.addEventListener("touchend",U))}function te(){document.body.style.cursor="",document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",U),"ontouchstart"in window&&(document.removeEventListener("touchmove",H),document.removeEventListener("touchend",U))}const ie=re=>re.nodeType===Node.ELEMENT_NODE&&re.classList.contains("splitpanes__splitter");function L(re,xe,Oe){let Ce=re[c?"top":"left"];return Oe&&!c&&(Ce=xe-Ce),Ce}const T=()=>ll(c);function S(re,xe){t(7,K=!0),Y=xe.index,xe.setSplitterActive(!0);let Ce=xe.element;for(;Ce!=null&&(Ce=Ce.previousSibling,!ie(Ce)););if(Ce==null){console.error("Splitpane Error: Active splitter wasn't found!");return}W=Ce;const Fe=so(re),Se=Js(W);ce=L(io(Fe,Se),Se[T()],R()),$()}function H(re){if(K){re.preventDefault(),t(8,M=!0);const xe=so(re),Oe=Ys(_),Ce=qf(_,Oe),Fe=Ce[T()],Se=R(Oe),Ne=io(xe,Ce),Pe=L(Ne,Fe,Se);ee(Pe,Fe),p("resize",ne())}}function U(){M&&p("resized",ne()),t(7,K=!1),Z[Y].setSplitterActive(!1),setTimeout(()=>{t(8,M=!1),te()},100)}function D(re,xe){if("ontouchstart"in window){re.preventDefault();const Oe=xe.index;m&&(C===Oe?(oe&&clearTimeout(oe),oe=null,O(re,xe),C=-1):(C=Oe,oe=setTimeout(()=>{C=-1},500)))}M||p("splitter-click",xe)}function O(re,xe){if(m){const Oe=xe.index;let Ce=0;for(let Ne=0;Ne=100)for(let Ne=0;Ne{const He=ze.min(),Je=ze.max(),Xe=Math.min(Math.max(0,Ne),Je-He);ze.setSz(He+Xe),Ne-=Xe};for(let ze=Oe-1;ze>=0;ze--)Pe(Z[ze]);for(let ze=Oe+1;zeZ.map(re=>({min:re.min(),max:re.max(),size:re.sz(),snap:re.snap()}));function v(re,xe){const Oe=Je=>Js(Je)[T()],Ce=Oe(W);let Fe=0,Se=W.previousSibling;for(;Se!=null;)ie(Se)&&(Fe+=Oe(Se)),Se=Se.previousSibling;let Ne=0,Pe=W.nextSibling;for(;Pe!=null;)ie(Pe)&&(Ne+=Oe(Pe)),Pe=Pe.nextSibling;const ze=Fe+ce,He=Fe+Ce+Ne;return(re-ze)/(xe-He)*100}function ee(re,xe){let Oe=Y-1,Ce=Z[Oe],Fe=Y,Se=Z[Fe],Ne={prevPanesSize:f(Oe),nextPanesSize:E(Fe),prevReachedMinPanes:0,nextReachedMinPanes:0};const Pe=0+(h?0:Ne.prevPanesSize),ze=100-(h?0:Ne.nextPanesSize),He=Math.max(Math.min(v(re,xe),ze),Pe),Je=Ne.prevPanesSize+Ce.min()+Ce.snap(),Xe=100-(Ne.nextPanesSize+Se.min()+Se.snap());let Ve=He,pt=!1;He<=Je?He>Ne.prevPanesSize+Ce.min()&&(Ve=Math.max(Ce.min()+Ne.prevPanesSize,100-(Se.max()+Ne.nextPanesSize)),pt=!0):He>=Xe&&He<100-Ne.nextPanesSize-Se.min()&&(Ve=Math.min(100-(Se.min()+Ne.nextPanesSize),Ce.max()+Ne.prevPanesSize),pt=!0);const Lt=Ce.max()<100&&Ve>=Ce.max()+Ne.prevPanesSize,Yt=Se.max()<100&&Ve<=100-(Se.max()+Ne.nextPanesSize);if(Lt||Yt)Lt?(Ce.setSz(Ce.max()),Se.setSz(Math.max(100-Ce.max()-Ne.prevPanesSize-Ne.nextPanesSize,0))):(Ce.setSz(Math.max(100-Se.max()-Ne.prevPanesSize-Ne.nextPanesSize,0)),Se.setSz(Se.max()));else{if(h&&!pt){const Xt=A(Ne,Ve);if(!Xt)return;({sums:Ne,paneBeforeIndex:Oe,paneAfterIndex:Fe}=Xt),Ce=Z[Oe],Se=Z[Fe]}Oe!=null&&Ce.setSz(Math.min(Math.max(Ve-Ne.prevPanesSize-Ne.prevReachedMinPanes,Ce.min()),Ce.max())),Fe!=null&&Se.setSz(Math.min(Math.max(100-Ve-Ne.nextPanesSize-Ne.nextReachedMinPanes,Se.min()),Se.max()))}}function A(re,xe){const Oe=Y-1;let Ce=Oe,Fe=Oe+1;if(xe{Se.setSz(Se.min()),re.prevReachedMinPanes+=Se.min()}),re.prevPanesSize=f(Ce),Ce==null))return re.prevReachedMinPanes=0,Z[0].setSz(Z[0].min()),bi(Z,1,Oe+1,Se=>{Se.setSz(Se.min()),re.prevReachedMinPanes+=Se.min()}),Z[Fe].setSz(100-re.prevReachedMinPanes-Z[0].min()-re.prevPanesSize-re.nextPanesSize),null;if(xe>100-re.nextPanesSize-Z[Fe].min()){Fe=V(Oe)?.index,re.nextReachedMinPanes=0,Fe>Oe+1&&bi(Z,Oe+1,Fe,Ne=>{Ne.setSz(Ne.min()),re.nextReachedMinPanes+=Ne.min()}),re.nextPanesSize=E(Fe);const Se=Z.length;if(Fe==null)return re.nextReachedMinPanes=0,Z[Se-1].setSz(Z[Se-1].min()),bi(Z,Oe+1,Se-1,Ne=>{Ne.setSz(Ne.min()),re.nextReachedMinPanes+=Ne.min()}),Z[Ce].setSz(100-re.prevPanesSize-re.nextReachedMinPanes-Z[Se-1].min()-re.nextPanesSize),null}return{sums:re,paneBeforeIndex:Ce,paneAfterIndex:Fe}}const l=re=>re.sz(),f=re=>ao(Z,0,re,l),E=re=>ao(Z,re+1,Z.length,l),B=re=>[...Z].reverse().find(xe=>xe.indexxe.min()),V=re=>Z.find(xe=>xe.index>re+1&&xe.sz()>xe.min());async function z(){I=!0,await Ic(),I&&(ue(),I=!1)}function ue(){ye(),k&&p("resized",ne())}function ye(){if(Z.length===0)return;const re=Z.length;let xe=100,Oe=0,Ce=0,Fe=0,Se=[],Ne=[];for(let Xe=0;Xe=Ve.max()&&Se.push(Ve),pt<=Ve.min()&&Ne.push(Ve)):Ce+=1:(xe-=pt,Oe++,Se.push(Ve),Ne.push(Ve))}const Pe=re-Oe,ze=Pe-Ce;let He,Je;if(ze>0?(He=Fe/ze,He>.1&&xe>.1?(Fe+=Ce*He,Je=xe/Fe):(He=0,Je=1)):(He=xe/Pe,Je=1),xe+Fe>.1){xe=100;for(let Xe=0;Xe.1&&(xe=fe(xe,Se,Ne))}isFinite(xe)?Math.abs(xe)>.1&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints."):console.warn("Splitpanes: Internal error, sizes might be NaN as a result.")}function fe(re,xe,Oe){const Fe=Z.length-(re>0?xe.length:Oe.length);if(Fe<=0)return re;const Se=re/Fe;if(Z.length===1)Z[0].setSz(100),re=0;else for(let Ne=0;Ne0&&!xe.includes(Pe)){const He=Math.max(Math.min(ze+Se,Pe.max()),Pe.min()),Je=He-ze;re-=Je,Pe.setSz(He)}else if(!Oe.includes(Pe)){const He=Math.max(Math.min(ze+Se,Pe.max()),Pe.min()),Je=He-ze;re-=Je,Pe.setSz(He)}}return re}function Ee(){const{children:re}=_;let xe=0,Oe=!1;for(let Ce=0;Ce elements are allowed at the root of . One of your DOM nodes was removed.");return}else Se&&(!Oe&&Z[xe].element!==Fe&&(Oe=!0),xe++)}if(Oe){const Ce=[];for(let Fe=0;Feze.element===Se);Pe!=null?(Pe.index=Ce.length,Ce.push(Pe)):console.warn("Splitpanes: Internal error - found a elements which isn't tracked.")}}Z=Ce,un(x,n=Z.length>0?Z[0].key:void 0,n)}}function Ie(re){Ke[re?"unshift":"push"](()=>{_=re,t(5,_)})}return r.$$set=re=>{"id"in re&&t(0,u=re.id),"horizontal"in re&&t(1,c=re.horizontal),"pushOtherPanes"in re&&t(12,h=re.pushOtherPanes),"dblClickSplitter"in re&&t(13,m=re.dblClickSplitter),"rtl"in re&&t(14,w=re.rtl),"firstSplitter"in re&&t(15,d=re.firstSplitter),"style"in re&&t(2,y=re.style),"theme"in re&&t(3,g=re.theme),"class"in re&&t(4,b=re.class),"$$scope"in re&&t(18,o=re.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&2&&un(N,s=c,s),r.$$.dirty[0]&32768&&un(Q,i=d,i)},[u,c,y,g,b,_,F,K,M,N,Q,x,h,m,w,d,a,Ie,o]}class Yf extends kt{constructor(e){super(),xt(this,e,Zf,Xf,wt,{id:0,horizontal:1,pushOtherPanes:12,dblClickSplitter:13,rtl:14,firstSplitter:15,style:2,theme:3,class:4},null,[-1,-1,-1])}}const Jf=(r,e)=>t=>{const n=r();n?.[e](t)},Qf=r=>Jf.bind(null,r);function $f(r){let e,t,n,i,s,a,o=(r[4]!==r[9]||r[5])&&oo(r);const u=r[20].default,c=fr(u,r,r[19],null);return{c(){o&&o.c(),e=Te(),t=se("div"),c&&c.c(),this.h()},l(h){o&&o.l(h),e=Ae(h),t=ae(h,"DIV",{class:!0,style:!0});var m=ge(t);c&&c.l(m),m.forEach(q),this.h()},h(){P(t,"class",n=`splitpanes__pane ${r[0]||""}`),P(t,"style",r[3])},m(h,m){o&&o.m(h,m),ke(h,e,m),ke(h,t,m),c&&c.m(t,null),r[21](t),i=!0,s||(a=De(t,"click",r[11]("onPaneClick")),s=!0)},p(h,m){h[4]!==h[9]||h[5]?o?o.p(h,m):(o=oo(h),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),c&&c.p&&(!i||m&524288)&&hr(c,u,h,h[19],i?pr(u,h[19],m,null):dr(h[19]),null),(!i||m&1&&n!==(n=`splitpanes__pane ${h[0]||""}`))&&P(t,"class",n),(!i||m&8)&&P(t,"style",h[3])},i(h){i||(be(c,h),i=!0)},o(h){Re(c,h),i=!1},d(h){h&&(q(e),q(t)),o&&o.d(h),c&&c.d(h),r[21](null),s=!1,a()}}}function oo(r){let e,t,n,i;return{c(){e=se("div"),this.h()},l(s){e=ae(s,"DIV",{class:!0}),ge(e).forEach(q),this.h()},h(){P(e,"class",t="splitpanes__splitter "+(r[2]?"splitpanes__splitter__active":""))},m(s,a){ke(s,e,a),n||(i=[De(e,"mousedown",r[11]("onSplitterDown")),De(e,"touchstart",r[11]("onSplitterDown")),De(e,"click",r[11]("onSplitterClick")),De(e,"dblclick",r[11]("onSplitterDblClick"))],n=!0)},p(s,a){a&4&&t!==(t="splitpanes__splitter "+(s[2]?"splitpanes__splitter__active":""))&&P(e,"class",t)},d(s){s&&q(e),n=!1,or(i)}}}function eh(r){let e,t,n=!r[10]&&$f(r);return{c(){n&&n.c(),e=ot()},l(i){n&&n.l(i),e=ot()},m(i,s){n&&n.m(i,s),ke(i,e,s),t=!0},p(i,[s]){i[10]||n.p(i,s)},i(i){t||(be(n),t=!0)},o(i){Re(n),t=!1},d(i){i&&q(e),n&&n.d(i)}}}function th(r,e,t){let n,i,s,a,o,{$$slots:u={},$$scope:c}=e;const{ssrRegisterPaneSize:h,onPaneInit:m,clientOnly:w,isHorizontal:d,showFirstSplitter:y,veryFirstPaneKey:g}=ut(cl);Or(r,d,W=>t(18,s=W)),Or(r,y,W=>t(5,o=W)),Or(r,g,W=>t(4,a=W));let{size:b=null}=e,{minSize:p=0}=e,{maxSize:_=100}=e,{snapSize:k=0}=e,{class:I=""}=e;const F={},K=!il,{undefinedPaneInitSize:M}=m(F);let Y,C=b??M,oe=!1,Z;const N=Qf(()=>Z),Q=W=>{W!=C&&N("reportGivenSizeChange")(W)};Qn(()=>{const W={key:F,element:Y,givenSize:b,sz:()=>C,setSz:ce=>{t(16,C=ce),b!=null&&b!=C&&t(12,b=C)},min:()=>p,max:()=>_,snap:()=>k,setSplitterActive:ce=>{t(2,oe=ce)},isReady:!1};Z=w.onPaneAdd(W)}),ua(()=>{w.onPaneRemove(F)});function x(W){Ke[W?"unshift":"push"](()=>{Y=W,t(1,Y)})}return r.$$set=W=>{"size"in W&&t(12,b=W.size),"minSize"in W&&t(13,p=W.minSize),"maxSize"in W&&t(14,_=W.maxSize),"snapSize"in W&&t(15,k=W.snapSize),"class"in W&&t(0,I=W.class),"$$scope"in W&&t(19,c=W.$$scope)},r.$$.update=()=>{r.$$.dirty&4096&&b!=null&&Q(b),r.$$.dirty&262144&&t(17,n=ll(s)),r.$$.dirty&196608&&t(3,i=`${n}: ${C}%;`)},[I,Y,oe,i,a,o,d,y,g,F,K,N,b,p,_,k,C,n,s,c,u,x]}class uo extends kt{constructor(e){super(),xt(this,e,th,eh,wt,{size:12,minSize:13,maxSize:14,snapSize:15,class:0})}}function rh(r){let e,t,n,i,s,a,o;return{c(){e=Ht("svg"),t=Ht("circle"),n=Ht("animate"),i=Ht("circle"),s=Ht("animate"),a=Ht("circle"),o=Ht("animate"),this.h()},l(u){e=Wt(u,"svg",{version:!0,id:!0,xmlns:!0,"xmlns:xlink":!0,x:!0,y:!0,viewBox:!0,"enable-background":!0,"xml:space":!0});var c=ge(e);t=Wt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var h=ge(t);n=Wt(h,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),ge(n).forEach(q),h.forEach(q),i=Wt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var m=ge(i);s=Wt(m,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),ge(s).forEach(q),m.forEach(q),a=Wt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var w=ge(a);o=Wt(w,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),ge(o).forEach(q),w.forEach(q),c.forEach(q),this.h()},h(){P(n,"attributeName","opacity"),P(n,"dur","1s"),P(n,"values","0;1;0"),P(n,"repeatCount","indefinite"),P(n,"begin","0.1"),P(t,"fill","#1976d2"),P(t,"stroke","none"),P(t,"cx","6"),P(t,"cy","50"),P(t,"r","6"),P(s,"attributeName","opacity"),P(s,"dur","1s"),P(s,"values","0;1;0"),P(s,"repeatCount","indefinite"),P(s,"begin","0.2"),P(i,"fill","#1976d2"),P(i,"stroke","none"),P(i,"cx","26"),P(i,"cy","50"),P(i,"r","6"),P(o,"attributeName","opacity"),P(o,"dur","1s"),P(o,"values","0;1;0"),P(o,"repeatCount","indefinite"),P(o,"begin","0.3"),P(a,"fill","#1976d2"),P(a,"stroke","none"),P(a,"cx","46"),P(a,"cy","50"),P(a,"r","6"),P(e,"version","1.1"),P(e,"id","L4"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(e,"x","0px"),P(e,"y","0px"),P(e,"viewBox","0 0 100 100"),P(e,"enable-background","new 0 0 0 0"),P(e,"xml:space","preserve")},m(u,c){ke(u,e,c),J(e,t),J(t,n),J(e,i),J(i,s),J(e,a),J(a,o)},p:qe,i:qe,o:qe,d(u){u&&q(e)}}}function nh(r,e,t){let{size:n=20}=e;return r.$$set=i=>{"size"in i&&t(0,n=i.size)},[n]}class ih extends kt{constructor(e){super(),xt(this,e,nh,rh,wt,{size:0})}}function sh(r){let e,t,n,i,s;return{c(){e=se("div"),t=Ht("svg"),n=Ht("circle"),i=Te(),s=ct(r[2]),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=ge(e);t=Wt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=ge(t);n=Wt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),ge(n).forEach(q),u.forEach(q),i=Ae(o),s=ft(o,r[2]),o.forEach(q),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Gt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-a20mi8"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-a20mi8")},m(a,o){ke(a,e,o),J(e,t),J(t,n),J(e,i),J(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Gt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&qt(s,a[2])},i:qe,o:qe,d(a){a&&q(e)}}}function ah(r,e,t){let{status:n="unknown"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Сервис LLM работает";break;case"error":a="Сервис LLM не работает";break;case"loading model":i="yellow",s="rgba(255, 255, 0, 0.7)",a="Сервис LLM запускается...";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Сервис LLM не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Сервис LLM недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class oh extends kt{constructor(e){super(),xt(this,e,ah,sh,wt,{status:3})}}function uh(r){let e,t,n,i,s;return{c(){e=se("div"),t=Ht("svg"),n=Ht("circle"),i=Te(),s=ct(r[2]),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=ge(e);t=Wt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=ge(t);n=Wt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),ge(n).forEach(q),u.forEach(q),i=Ae(o),s=ft(o,r[2]),o.forEach(q),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Gt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-1wcf73j"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-1wcf73j")},m(a,o){ke(a,e,o),J(e,t),J(t,n),J(e,i),J(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Gt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&qt(s,a[2])},i:qe,o:qe,d(a){a&&q(e)}}}function lh(r,e,t){let{status:n="unavailable"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Поиск работает";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Поиск не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Поиск недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class ch extends kt{constructor(e){super(),xt(this,e,lh,uh,wt,{status:3})}}function fh(r){let e,t,n,i,s,a="Сохранить",o,u,c="Сбросить",h,m;return{c(){e=se("div"),t=se("div"),n=se("textarea"),i=Te(),s=se("button"),s.textContent=a,o=Te(),u=se("button"),u.textContent=c,this.h()},l(w){e=ae(w,"DIV",{class:!0});var d=ge(e);t=ae(d,"DIV",{class:!0});var y=ge(t);n=ae(y,"TEXTAREA",{class:!0}),ge(n).forEach(q),i=Ae(y),s=ae(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(s)!=="svelte-g0hhac"&&(s.textContent=a),o=Ae(y),u=ae(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(u)!=="svelte-16kemh0"&&(u.textContent=c),y.forEach(q),d.forEach(q),this.h()},h(){P(n,"class","svelte-sfudwy"),P(s,"class","svelte-sfudwy"),P(u,"class","svelte-sfudwy"),P(t,"class","popup svelte-sfudwy"),P(e,"class","modal svelte-sfudwy")},m(w,d){ke(w,e,d),J(e,t),J(t,n),ir(n,r[0]),J(t,i),J(t,s),J(t,o),J(t,u),h||(m=[De(n,"input",r[6]),De(s,"click",r[1]),De(u,"click",r[2])],h=!0)},p(w,[d]){d&1&&ir(n,w[0])},i:qe,o:qe,d(w){w&&q(e),h=!1,or(m)}}}let hh='Ты бухгалтер. Ты отвечаешь на русском языке. Ты всегда следуешь моим инструкциям. Ты отвечаешь на вопросы клиентов. Чтобы ответить, ты обязательно используешь только "источники", которые я тебе предоставляю. Ты используешь только официально-деловой стиль и необходимую терминологию. Соблюдай этические нормы. При ответе на вопрос ты используешь только такой формат ответа: 1) Четкий и краткий ответ на поставленный вопрос. Ты можешь начать свой ответ так: "По Вашему вопросу сообщаем...". Используй по возможности слова: да, можно, нет, нельзя. 2) Обоснование (ты используешь для обоснования "источники". Ты используешь только "источники" для поиска необходимых "законов", "статей", "пунктов" и "подпунктов" для ответа на вопрос пол��зователя). 3) Аргументация (Ты используешь только "источники" для поиска необходимых "писем" и "судебных решений", чтобы аргументировать свой ответ)." 4) Заключение (ты подводишь итоги всего, что сказал выше. Избегай повторения и сложных конструкций). Если в источниках нельзя найти подходящую информацию для ответа, ты отвечаешь так: "Мы не можем ответить на данный вопрос. Обратитесь к специалисту." Вопрос: {{ВОПРОС}} Источники: {{ИСТОЧНИКИ}}';function dh(r,e,t){let{onSave:n}=e,{onClose:i}=e,{text:s=""}=e,a=s;function o(){n(a),i()}function u(){t(0,a=hh)}function c(){a=this.value,t(0,a)}return r.$$set=h=>{"onSave"in h&&t(3,n=h.onSave),"onClose"in h&&t(4,i=h.onClose),"text"in h&&t(5,s=h.text)},[a,o,u,n,i,s,c]}class ph extends kt{constructor(e){super(),xt(this,e,dh,fh,wt,{onSave:3,onClose:4,text:5})}}class Zt{static findDateInText(e){const t=/\b\d{1,2}\.\d{1,2}\.\d{4}\b/g,n=e.match(t);if(n&&n.length>0){const i=n[0],[s,a,o]=i.split(".").map(Number);return new Date(o,a-1,s)}return null}static sortByRelevanceAndDate(e){return e.sort((t,n)=>{const i=n.relevance-t.relevance;if(i!==0)return i;const s=Zt.findDateInText(t.title),a=Zt.findDateInText(n.title);return s&&a?a.getTime()-s.getTime():s?-1:a?1:0})}static sortByDate(e){const t=e.filter(o=>Zt.findDateInText(o.title)),n=e.filter(o=>!Zt.findDateInText(o.title)),i=t.sort((o,u)=>{const c=Zt.findDateInText(o.title),h=Zt.findDateInText(u.title);return c&&h?h.getTime()-c.getTime():c?-1:h?1:0}),s=[];let a=0;for(const o of e)if(Zt.findDateInText(o.title)){let u=i.shift();u&&s.push(u)}else s.push(n[a]),a++;return s}static sortByRelevance(e){return e.sort((t,n)=>t.relevance&&n.relevance?n.relevance-t.relevance:t.relevance?-1:n.relevance?1:0)}static identifyDocumentType(e){const t=[{regexp:/(ФАС |АС |КС |ВС |[Сс]удебн|[Сс]уд)|(\(Судебный документ\))/,docType:"Решение суда"},{regexp:/[Пп]исьмо [Мм]инфина/,docType:"Письмо Минфина"},{regexp:/[Пп]исьмо (ФНС|фнс)/,docType:"Письмо ФНС"},{regexp:/(НКРФ)|(НК РФ)/,docType:"Налоговый кодекс"},{regexp:/(ГКРФ)|(ГК РФ)/,docType:"Гражданский кодекс"},{regexp:/(ТКРФ)|(ТК РФ)/,docType:"Трудовой кодекс"},{regexp:/Приказ ФНС РФ/,docType:"Приказ ФНС РФ"},{regexp:/Постановление Правительства РФ/,docType:"Постановление Правительства РФ"},{regexp:/Решение Коллегии Евразийской экономической комиссии/,docType:"Решение Коллегии ЕЭК"},{regexp:/Федеральный закон/,docType:"Федеральные законы"},{regexp:/\(Внутренний документ\)|\(ВНД\)/,docType:"Внутренние документы"}];return e.map(n=>{for(const{regexp:i,docType:s}of t)if(i.test(n.title))return n.docType=s,n;return n.docType="Другие документы",n})}static mergeResultsByTitle(e){const t=/(ст\.\d+)\s(НКРФ|НК РФ|ГКРФ|ГК РФ|ТКРФ|ТК РФ)$/,n={},i=[],s=a=>{const o=a.match(t);return o?o[0]:null};return e.forEach(a=>{const o=s(a.title);if(o)if(n[o]){n[o].relevance=Math.max(n[o].relevance,a.relevance);const u=n[o].title.match(/п[\w\.]+/g)||[],c=a.title.match(/п[\w\.]+/g)||[],h=[...new Set([...u,...c])].join(", ");n[o].title=`${h} ст.${o.split(" ")[0].split(".")[1]} ${o.split(" ")[1]}`,n[o].text+=` +${a.title} +${a.text}`,a.text_for_llm&&(n[o].text_for_llm+=` +${a.title} +${a.text_for_llm}`)}else n[o]={...a};else i.push(a)}),Object.keys(n).forEach(a=>{i.push(n[a])}),i}}function lo(r,e,t){const n=r.slice();return n[13]=e[t],n}function co(r){let e,t,n;return{c(){e=se("input"),this.h()},l(i){e=ae(i,"INPUT",{type:!0}),this.h()},h(){P(e,"type","checkbox")},m(i,s){ke(i,e,s),e.checked=r[1][r[3]],t||(n=De(e,"change",r[10]),t=!0)},p(i,s){s&10&&(e.checked=i[1][i[3]])},d(i){i&&q(e),t=!1,n()}}}function mh(r){let e,t;return{c(){e=se("div"),t=ct(r[4]),this.h()},l(n){e=ae(n,"DIV",{class:!0});var i=ge(e);t=ft(i,r[4]),i.forEach(q),this.h()},h(){P(e,"class","annotation svelte-1srbk6k")},m(n,i){ke(n,e,i),J(e,t)},p(n,i){i&16&&qt(t,n[4])},d(n){n&&q(e)}}}function gh(r){let e,t=Pt(r[5].split(` +`)),n=[];for(let i=0;i100&&po(r);return{c(){e=se("div"),t=se("div"),n=se("label"),c&&c.c(),i=Te(),s=ct(r[3]),a=Te(),w.c(),o=Te(),d&&d.c(),u=Te(),y&&y.c(),this.h()},l(g){e=ae(g,"DIV",{class:!0});var b=ge(e);t=ae(b,"DIV",{class:!0});var p=ge(t);n=ae(p,"LABEL",{style:!0});var _=ge(n);c&&c.l(_),i=Ae(_),s=ft(_,r[3]),_.forEach(q),p.forEach(q),a=Ae(b),w.l(b),o=Ae(b),d&&d.l(b),u=Ae(b),y&&y.l(b),b.forEach(q),this.h()},h(){Gt(n,"cursor","pointer"),P(t,"class","title svelte-1srbk6k"),P(e,"class","search-result svelte-1srbk6k")},m(g,b){ke(g,e,b),J(e,t),J(t,n),c&&c.m(n,null),J(n,i),J(n,s),J(e,a),w.m(e,null),J(e,o),d&&d.m(e,null),J(e,u),y&&y.m(e,null)},p(g,[b]){g[8]?c?c.p(g,b):(c=co(g),c.c(),c.m(n,i)):c&&(c.d(1),c=null),b&8&&qt(s,g[3]),m===(m=h(g))&&w?w.p(g,b):(w.d(1),w=m(g),w&&(w.c(),w.m(e,o))),g[6]&&g[7]?d?d.p(g,b):(d=ho(g),d.c(),d.m(e,u)):d&&(d.d(1),d=null),g[5].length>100?y?y.p(g,b):(y=po(g),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i:qe,o:qe,d(g){g&&q(e),c&&c.d(),w.d(),d&&d.d(),y&&y.d()}}}function _h(r,e,t){let{showFullText:n=Array(10).fill(!1)}=e,{useSearchResult:i}=e,{index:s}=e,{title:a}=e,{teaser:o}=e,{text:u}=e,{enableDocumentDb:c=!1}=e,{documentDbUrl:h=""}=e,{enableSearchResultSelection:m=!1}=e;function w(b){t(0,n[b]=!n[b],n)}function d(){i[a]=this.checked,t(1,i)}const y=()=>w(s),g=()=>w(s);return r.$$set=b=>{"showFullText"in b&&t(0,n=b.showFullText),"useSearchResult"in b&&t(1,i=b.useSearchResult),"index"in b&&t(2,s=b.index),"title"in b&&t(3,a=b.title),"teaser"in b&&t(4,o=b.teaser),"text"in b&&t(5,u=b.text),"enableDocumentDb"in b&&t(6,c=b.enableDocumentDb),"documentDbUrl"in b&&t(7,h=b.documentDbUrl),"enableSearchResultSelection"in b&&t(8,m=b.enableSearchResultSelection)},[n,i,s,a,o,u,c,h,m,w,d,y,g]}class fl extends kt{constructor(e){super(),xt(this,e,_h,bh,wt,{showFullText:0,useSearchResult:1,index:2,title:3,teaser:4,text:5,enableDocumentDb:6,documentDbUrl:7,enableSearchResultSelection:8})}}function mo(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[25]=e[t].text_for_llm,n[27]=t,n}function go(r,e,t){const n=r.slice();return n[18]=e[t][0],n[19]=e[t][1],n}function wo(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[25]=e[t].text_for_llm,n[27]=t,n}function yo(r){let e,t,n,i="Сортировать по:",s,a,o,u,c,h;a=new kf({props:{background:"",border:"",$$slots:{default:[Sh]},$$scope:{ctx:r}}});function m(d){r[12](d)}let w={name:"groupByChecked",size:"sm",label:"Группировать по типу",$$slots:{default:[Th]},$$scope:{ctx:r}};return r[6]!==void 0&&(w.checked=r[6]),u=new Ii({props:w}),Ke.push(()=>$e(u,"checked",m)),{c(){e=se("div"),t=se("div"),n=se("label"),n.textContent=i,s=Te(),rt(a.$$.fragment),o=Te(),rt(u.$$.fragment),this.h()},l(d){e=ae(d,"DIV",{class:!0});var y=ge(e);t=ae(y,"DIV",{class:!0,style:!0});var g=ge(t);n=ae(g,"LABEL",{style:!0,class:!0,"data-svelte-h":!0}),Ge(n)!=="svelte-12wnwfn"&&(n.textContent=i),s=Ae(g),nt(a.$$.fragment,g),o=Ae(g),nt(u.$$.fragment,g),g.forEach(q),y.forEach(q),this.h()},h(){Gt(n,"display","inline-block"),Gt(n,"flex-wrap","wrap"),P(n,"class","svelte-1ptibtq"),P(t,"class","card w-full flex p-2 space-y-2"),Gt(t,"align-items","center"),Gt(t,"flex-wrap","wrap"),P(e,"class","settings-bar svelte-1ptibtq")},m(d,y){ke(d,e,y),J(e,t),J(t,n),J(t,s),it(a,t,null),J(t,o),it(u,t,null),h=!0},p(d,y){const g={};y&536871040&&(g.$$scope={dirty:y,ctx:d}),a.$set(g);const b={};y&536870912&&(b.$$scope={dirty:y,ctx:d}),!c&&y&64&&(c=!0,b.checked=d[6],Qe(()=>c=!1)),u.$set(b)},i(d){h||(be(a.$$.fragment,d),be(u.$$.fragment,d),h=!0)},o(d){Re(a.$$.fragment,d),Re(u.$$.fragment,d),h=!1},d(d){d&&q(e),st(a),st(u)}}}function vh(r){let e;return{c(){e=ct("релевантности")},l(t){e=ft(t,"релевантности")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function Eh(r){let e;return{c(){e=ct("дате")},l(t){e=ft(t,"дате")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function Sh(r){let e,t,n,i,s,a;function o(m){r[10](m)}let u={name:"sortBy",value:"rel",$$slots:{default:[vh]},$$scope:{ctx:r}};r[7]!==void 0&&(u.group=r[7]),e=new Ya({props:u}),Ke.push(()=>$e(e,"group",o));function c(m){r[11](m)}let h={name:"sortBy",value:"date",$$slots:{default:[Eh]},$$scope:{ctx:r}};return r[7]!==void 0&&(h.group=r[7]),i=new Ya({props:h}),Ke.push(()=>$e(i,"group",c)),{c(){rt(e.$$.fragment),n=Te(),rt(i.$$.fragment)},l(m){nt(e.$$.fragment,m),n=Ae(m),nt(i.$$.fragment,m)},m(m,w){it(e,m,w),ke(m,n,w),it(i,m,w),a=!0},p(m,w){const d={};w&536870912&&(d.$$scope={dirty:w,ctx:m}),!t&&w&128&&(t=!0,d.group=m[7],Qe(()=>t=!1)),e.$set(d);const y={};w&536870912&&(y.$$scope={dirty:w,ctx:m}),!s&&w&128&&(s=!0,y.group=m[7],Qe(()=>s=!1)),i.$set(y)},i(m){a||(be(e.$$.fragment,m),be(i.$$.fragment,m),a=!0)},o(m){Re(e.$$.fragment,m),Re(i.$$.fragment,m),a=!1},d(m){m&&q(n),st(e,m),st(i,m)}}}function Th(r){let e;return{c(){e=ct("Группировать по типу")},l(t){e=ft(t,"Группировать по типу")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function Ah(r){let e,t,n=Pt(r[1]),i=[];for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a0&&yo(r);const c=[kh,Ah],h=[];function m(d,y){return d[6]&&d[8]?0:1}n=m(r),i=h[n]=c[n](r);let w=Nh;return{c(){e=se("div"),u&&u.c(),t=Te(),i.c(),s=Te(),a=ot(),this.h()},l(d){e=ae(d,"DIV",{class:!0});var y=ge(e);u&&u.l(y),t=Ae(y),i.l(y),y.forEach(q),s=Ae(d),a=ot(),this.h()},h(){P(e,"class","search-results svelte-1ptibtq")},m(d,y){ke(d,e,y),u&&u.m(e,null),J(e,t),h[n].m(e,null),ke(d,s,y),ke(d,a,y),o=!0},p(d,[y]){d[1]&&d[1].length>0?u?(u.p(d,y),y&2&&be(u,1)):(u=yo(d),u.c(),be(u,1),u.m(e,t)):u&&(ht(),Re(u,1,1,()=>{u=null}),dt());let g=n;n=m(d),n===g?h[n].p(d,y):(ht(),Re(h[g],1,1,()=>{h[g]=null}),dt(),i=h[n],i?i.p(d,y):(i=h[n]=c[n](d),i.c()),be(i,1),i.m(e,null))},i(d){o||(be(u),be(i),be(w),o=!0)},o(d){Re(u),Re(i),Re(w),o=!1},d(d){d&&(q(e),q(s),q(a)),u&&u.d(),h[n].d()}}}let Nh=!1;function Oh(r,e,t){let{enableDocumentDb:n=!1}=e,{documentDbUrl:i=""}=e,{showFullText:s=Array(10).fill(!1)}=e,{useSearchResult:a}=e,o=!1,u="rel",{searchResults:c=[]}=e,h,{enableSearchResultSelection:m=!1}=e;const w=p=>p.reduce((_,k)=>{const I=k.docType||"Другие документы";return _[I]||(_[I]=[]),_[I].push(k),_},{}),d=p=>{p.stopPropagation();const _=p.target.dataset.doctype;Object.keys(h[_]).forEach(k=>{t(0,a[h[_][k].title]=p.target.checked,a)})};function y(p){u=p,t(7,u)}function g(p){u=p,t(7,u)}function b(p){o=p,t(6,o)}return r.$$set=p=>{"enableDocumentDb"in p&&t(3,n=p.enableDocumentDb),"documentDbUrl"in p&&t(4,i=p.documentDbUrl),"showFullText"in p&&t(2,s=p.showFullText),"useSearchResult"in p&&t(0,a=p.useSearchResult),"searchResults"in p&&t(1,c=p.searchResults),"enableSearchResultSelection"in p&&t(5,m=p.enableSearchResultSelection)},r.$$.update=()=>{r.$$.dirty&194&&(o&&t(8,h=w(c)),u=="date"?t(1,c=Zt.sortByDate(c)):u=="rel"&&t(1,c=Zt.sortByRelevance(c))),r.$$.dirty&1&&a===void 0&&t(0,a={})},[a,c,s,n,i,m,o,u,h,d,y,g,b]}class hl extends kt{constructor(e){super(),xt(this,e,Oh,Dh,wt,{enableDocumentDb:3,documentDbUrl:4,showFullText:2,useSearchResult:0,searchResults:1,enableSearchResultSelection:5})}}function So(r,e,t){const n=r.slice();return n[6]=e[t],n}function To(r){let e,t=Pt(r[3].split(` +`)),n=[];for(let i=0;io(i);return r.$$set=c=>{"showFullText"in c&&t(0,n=c.showFullText),"index"in c&&t(1,i=c.index),"title"in c&&t(2,s=c.title),"text"in c&&t(3,a=c.text)},[n,i,s,a,o,u]}class Ph extends kt{constructor(e){super(),xt(this,e,Bh,Fh,wt,{showFullText:0,index:1,title:2,text:3})}}function ko(r,e,t){const n=r.slice();return n[2]=e[t].title,n[3]=e[t].text,n[5]=t,n}function xo(r){let e,t;return e=new Ph({props:{title:r[2],text:r[3],index:r[5],showFullText:r[0]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.title=n[2]),i&2&&(s.text=n[3]),i&1&&(s.showFullText=n[0]),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Lh(r){let e,t,n="Релевантные консультации",i,s,a,o,u=Pt(r[1]),c=[];for(let w=0;wRe(c[w],1,1,()=>{c[w]=null});let m=Mh;return{c(){e=se("div"),t=se("h2"),t.textContent=n,i=Te();for(let w=0;w{"showFullText"in s&&t(0,n=s.showFullText),"consultations"in s&&t(1,i=s.consultations)},[n,i]}class dl extends kt{constructor(e){super(),xt(this,e,Uh,Lh,wt,{showFullText:0,consultations:1})}}const Ir="clarificationHistory_",rs="clarificationHistoryIndex",ns=2;class Mr{static loadHistory(){const e=[],t=this.getHistoryIndex();for(let n=0;nns){const t=e-ns;for(let n=0;n0?(t(3,h=m.length-1),t(4,w=m.length),y(),t(11,c=!0),t(0,s=""),t(7,i=""),p("")):(t(3,h=0),t(4,w=0),t(11,c=!1))}Qn(()=>{d()});function y(){const M=Mr.getHistoryItem(h);return M&&(t(7,i=M.searchClarification),t(0,s=M.llmClarification),t(8,a=M.searchResults),t(9,o=M.relevantConsultations),t(10,u=M.llmResponse),t(6,n=M.userRequest)),M}function g(){return Mr.getHistoryItem(h)}function b(){Mr.clearHistory(),d()}function p(M){console.log("addState called");const Y={userRequest:M,searchClarification:i,llmClarification:s,searchResults:[],llmResponse:"",relevantConsultations:[],transactionMaps:[]};t(4,w=Mr.getHistoryLength()),Mr.addHistoryItem(Y),t(3,h=w-1)}function _(M,Y,C,oe,Z){console.log("updateCurrentState called");const N=Mr.getHistoryItem(h);N&&(N.userRequest=M??N.userRequest,N.searchClarification=i??N.searchClarification,N.llmClarification=s??N.llmClarification,N.searchResults=Y??N.searchResults,N.llmResponse=C??N.llmResponse,N.relevantConsultations=oe??N.relevantConsultations,N.transactionMaps=Z??N.transactionMaps,console.log(N),Mr.updateHistoryItem(h,N))}function k(){h>0&&(t(3,h-=1),y())}function I(){h{"userRequest"in M&&t(6,n=M.userRequest),"searchClarification"in M&&t(7,i=M.searchClarification),"llmClarification"in M&&t(0,s=M.llmClarification),"searchResults"in M&&t(8,a=M.searchResults),"relevantConsultations"in M&&t(9,o=M.relevantConsultations),"llmResponse"in M&&t(10,u=M.llmResponse),"historyIsNotEmpty"in M&&t(11,c=M.historyIsNotEmpty)},[s,k,I,h,w,b,n,i,a,o,u,c,y,g,p,_,F,K]}class Wh extends kt{constructor(e){super(),xt(this,e,Hh,zh,wt,{userRequest:6,searchClarification:7,llmClarification:0,searchResults:8,relevantConsultations:9,llmResponse:10,historyIsNotEmpty:11,loadCurrentHistoryItem:12,getCurrentState:13,addState:14,updateCurrentState:15,prevHistory:1,nextHistory:2,clear:16})}get loadCurrentHistoryItem(){return this.$$.ctx[12]}get getCurrentState(){return this.$$.ctx[13]}get addState(){return this.$$.ctx[14]}get updateCurrentState(){return this.$$.ctx[15]}get prevHistory(){return this.$$.ctx[1]}get nextHistory(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[16]}}function Gh(r){let e;return{c(){e=ct(r[0])},l(t){e=ft(t,r[0])},m(t,n){ke(t,e,n)},p(t,n){n&1&&qt(e,t[0])},d(t){t&&q(e)}}}function Vh(r){let e,t,n;return{c(){e=se("a"),t=ct(r[0]),this.h()},l(i){e=ae(i,"A",{href:!0,target:!0,class:!0});var s=ge(e);t=ft(s,r[0]),s.forEach(q),this.h()},h(){P(e,"href",n=r[2]+"file/download/name/"+encodeURIComponent(r[0])),P(e,"target","_blank"),P(e,"class","svelte-1ijmx03")},m(i,s){ke(i,e,s),J(e,t)},p(i,s){s&1&&qt(t,i[0]),s&5&&n!==(n=i[2]+"file/download/name/"+encodeURIComponent(i[0]))&&P(e,"href",n)},d(i){i&&q(e)}}}function Kh(r){let e,t,n,i,s;function a(c,h){return c[1]&&c[2]?Vh:Gh}let o=a(r),u=o(r);return{c(){e=se("div"),t=se("div"),u.c(),n=Te(),i=se("div"),s=ct(r[3]),this.h()},l(c){e=ae(c,"DIV",{class:!0});var h=ge(e);t=ae(h,"DIV",{class:!0});var m=ge(t);u.l(m),m.forEach(q),n=Ae(h),i=ae(h,"DIV",{});var w=ge(i);s=ft(w,r[3]),w.forEach(q),h.forEach(q),this.h()},h(){P(t,"class","title svelte-1ijmx03"),P(e,"class","search-result svelte-1ijmx03")},m(c,h){ke(c,e,h),J(e,t),u.m(t,null),J(e,n),J(e,i),J(i,s)},p(c,[h]){o===(o=a(c))&&u?u.p(c,h):(u.d(1),u=o(c),u&&(u.c(),u.m(t,null))),h&8&&qt(s,c[3])},i:qe,o:qe,d(c){c&&q(e),u.d()}}}function qh(r,e,t){let{title:n}=e,{enableDocumentDb:i=!1}=e,{documentDbUrl:s=""}=e,{source:a=""}=e;return r.$$set=o=>{"title"in o&&t(0,n=o.title),"enableDocumentDb"in o&&t(1,i=o.enableDocumentDb),"documentDbUrl"in o&&t(2,s=o.documentDbUrl),"source"in o&&t(3,a=o.source)},[n,i,s,a]}class Xh extends kt{constructor(e){super(),xt(this,e,qh,Kh,wt,{title:0,enableDocumentDb:1,documentDbUrl:2,source:3})}}function Co(r,e,t){const n=r.slice();return n[3]=e[t],n}function Ro(r){let e,t;return e=new Xh({props:{title:r[3],enableDocumentDb:r[0],documentDbUrl:r[1],source:r[2][r[3]]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.title=n[3]),i&1&&(s.enableDocumentDb=n[0]),i&2&&(s.documentDbUrl=n[1]),i&4&&(s.source=n[2][n[3]]),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Zh(r){let e,t,n,i,s=Pt(Object.keys(r[2])),a=[];for(let c=0;cRe(a[c],1,1,()=>{a[c]=null});let u=Yh;return{c(){e=se("div");for(let c=0;c{"enableDocumentDb"in a&&t(0,n=a.enableDocumentDb),"documentDbUrl"in a&&t(1,i=a.documentDbUrl),"transactionMaps"in a&&t(2,s=a.transactionMaps)},[n,i,s]}class Qh extends kt{constructor(e){super(),xt(this,e,Jh,Zh,wt,{enableDocumentDb:0,documentDbUrl:1,transactionMaps:2})}}var $h=Object.defineProperty,ed=Object.defineProperties,td=Object.getOwnPropertyDescriptors,Io=Object.getOwnPropertySymbols,rd=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,Qs=(r,e,t)=>e in r?$h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ze=(r,e)=>{for(var t in e||(e={}))rd.call(e,t)&&Qs(r,t,e[t]);if(Io)for(var t of Io(e))nd.call(e,t)&&Qs(r,t,e[t]);return r},$n=(r,e)=>ed(r,td(e)),we=(r,e,t)=>(Qs(r,typeof e!="symbol"?e+"":e,t),t),_i=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(c){i(c)}},a=u=>{try{o(t.throw(u))}catch(c){i(c)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});class Pi{constructor(e){we(this,"rootKey"),this.rootKey=e}}const id=Object.seal({});class _e extends Pi{constructor(e){super(e),we(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(i=>i instanceof Pi?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:id}}addChildElement(e){return this.root.push(e),this}}class zi extends _e{prepForXml(e){const t=super.prepForXml(e);if(t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class Le extends Pi{constructor(e){super("_attr"),we(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.keys(this.root).forEach(n=>{const i=this.root[n];if(i!==void 0){const s=this.xmlKeys&&this.xmlKeys[n]||n;t[s]=i}}),{_attr:t}}}class ei extends Pi{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:s})=>$n(Ze({},n),{[i]:s}),{})}}}class bt extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var kr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ml={},ca={exports:{}},fn=typeof Reflect=="object"?Reflect:null,Do=fn&&typeof fn.apply=="function"?fn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Di;fn&&typeof fn.ownKeys=="function"?Di=fn.ownKeys:Object.getOwnPropertySymbols?Di=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Di=function(e){return Object.getOwnPropertyNames(e)};function sd(r){console&&console.warn&&console.warn(r)}var gl=Number.isNaN||function(e){return e!==e};function et(){et.init.call(this)}ca.exports=et;ca.exports.once=ld;et.EventEmitter=et;et.prototype._events=void 0;et.prototype._eventsCount=0;et.prototype._maxListeners=void 0;var No=10;function ji(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(et,"defaultMaxListeners",{enumerable:!0,get:function(){return No},set:function(r){if(typeof r!="number"||r<0||gl(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");No=r}});et.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};et.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||gl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function wl(r){return r._maxListeners===void 0?et.defaultMaxListeners:r._maxListeners}et.prototype.getMaxListeners=function(){return wl(this)};et.prototype.emit=function(e){for(var t=[],n=1;n0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(u===void 0)return!1;if(typeof u=="function")Do(u,this,t);else for(var c=u.length,h=El(u,c),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,sd(o)}return r}et.prototype.addListener=function(e,t){return yl(this,e,t,!1)};et.prototype.on=et.prototype.addListener;et.prototype.prependListener=function(e,t){return yl(this,e,t,!0)};function ad(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function bl(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=ad.bind(n);return i.listener=t,n.wrapFn=i,i}et.prototype.once=function(e,t){return ji(t),this.on(e,bl(this,e,t)),this};et.prototype.prependOnceListener=function(e,t){return ji(t),this.prependListener(e,bl(this,e,t)),this};et.prototype.removeListener=function(e,t){var n,i,s,a,o;if(ji(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():od(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this};et.prototype.off=et.prototype.removeListener;et.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function _l(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?ud(i):El(i,i.length)}et.prototype.listeners=function(e){return _l(this,e,!0)};et.prototype.rawListeners=function(e){return _l(this,e,!1)};et.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):vl.call(r,e)};et.prototype.listenerCount=vl;function vl(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}et.prototype.eventNames=function(){return this._eventsCount>0?Di(this._events):[]};function El(r,e){for(var t=new Array(e),n=0;n1)for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var g=d.indexOf("=");g===-1&&(g=y);var b=g===y?0:4-g%4;return[g,b]}function o(d){var y=a(d),g=y[0],b=y[1];return(g+b)*3/4-b}function u(d,y,g){return(y+g)*3/4-g}function c(d){var y,g=a(d),b=g[0],p=g[1],_=new t(u(d,b,p)),k=0,I=p>0?b-4:b,F;for(F=0;F>16&255,_[k++]=y>>8&255,_[k++]=y&255;return p===2&&(y=e[d.charCodeAt(F)]<<2|e[d.charCodeAt(F+1)]>>4,_[k++]=y&255),p===1&&(y=e[d.charCodeAt(F)]<<10|e[d.charCodeAt(F+1)]<<4|e[d.charCodeAt(F+2)]>>2,_[k++]=y>>8&255,_[k++]=y&255),_}function h(d){return r[d>>18&63]+r[d>>12&63]+r[d>>6&63]+r[d&63]}function m(d,y,g){for(var b,p=[],_=y;_I?I:k+_));return b===1?(y=d[g-1],p.push(r[y>>2]+r[y<<4&63]+"==")):b===2&&(y=(d[g-2]<<8)+d[g-1],p.push(r[y>>10]+r[y>>4&63]+r[y<<2&63]+"=")),p.join("")}return qn}var vi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var Bo;function gd(){return Bo||(Bo=1,vi.read=function(r,e,t,n,i){var s,a,o=i*8-n-1,u=(1<>1,h=-7,m=t?i-1:0,w=t?-1:1,d=r[e+m];for(m+=w,s=d&(1<<-h)-1,d>>=-h,h+=o;h>0;s=s*256+r[e+m],m+=w,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=a*256+r[e+m],m+=w,h-=8);if(s===0)s=1-c;else{if(s===u)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-c}return(d?-1:1)*a*Math.pow(2,s-n)},vi.write=function(r,e,t,n,i,s){var a,o,u,c=s*8-i-1,h=(1<>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,y=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+m>=1?e+=w/u:e+=w*Math.pow(2,1-m),e*u>=2&&(a++,u/=2),a+m>=h?(o=0,a=h):a+m>=1?(o=(e*u-1)*Math.pow(2,i),a=a+m):(o=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;r[t+d]=o&255,d+=y,o/=256,i-=8);for(a=a<0;r[t+d]=a&255,d+=y,a/=256,c-=8);r[t+d-y]|=g*128}),vi}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var Po;function Hi(){return Po||(Po=1,function(r){var e=md(),t=gd(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=_,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var A=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(A,l),A.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(A){if(A>i)throw new RangeError('The value "'+A+'" is invalid for option "size"');var l=new Uint8Array(A);return Object.setPrototypeOf(l,o.prototype),l}function o(A,l,f){if(typeof A=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(A)}return u(A,l,f)}o.poolSize=8192;function u(A,l,f){if(typeof A=="string")return w(A,l);if(ArrayBuffer.isView(A))return y(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(ne(A,ArrayBuffer)||A&&ne(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ne(A,SharedArrayBuffer)||A&&ne(A.buffer,SharedArrayBuffer)))return g(A,l,f);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=A.valueOf&&A.valueOf();if(E!=null&&E!==A)return o.from(E,l,f);var B=b(A);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return o.from(A[Symbol.toPrimitive]("string"),l,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}o.from=function(A,l,f){return u(A,l,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function c(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function h(A,l,f){return c(A),A<=0?a(A):l!==void 0?typeof f=="string"?a(A).fill(l,f):a(A).fill(l):a(A)}o.alloc=function(A,l,f){return h(A,l,f)};function m(A){return c(A),a(A<0?0:p(A)|0)}o.allocUnsafe=function(A){return m(A)},o.allocUnsafeSlow=function(A){return m(A)};function w(A,l){if((typeof l!="string"||l==="")&&(l="utf8"),!o.isEncoding(l))throw new TypeError("Unknown encoding: "+l);var f=k(A,l)|0,E=a(f),B=E.write(A,l);return B!==f&&(E=E.slice(0,B)),E}function d(A){for(var l=A.length<0?0:p(A.length)|0,f=a(l),E=0;E=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return A|0}function _(A){return+A!=A&&(A=0),o.alloc(+A)}o.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==o.prototype},o.compare=function(l,f){if(ne(l,Uint8Array)&&(l=o.from(l,l.offset,l.byteLength)),ne(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(l)||!o.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;for(var E=l.length,B=f.length,V=0,z=Math.min(E,B);VB.length?o.from(z).copy(B,V):Uint8Array.prototype.set.call(B,z,V);else if(o.isBuffer(z))z.copy(B,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return B};function k(A,l){if(o.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||ne(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);var f=A.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var B=!1;;)switch(l){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return S(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return D(A).length;default:if(B)return E?-1:S(A).length;l=(""+l).toLowerCase(),B=!0}}o.byteLength=k;function I(A,l,f){var E=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return"";for(A||(A="utf8");;)switch(A){case"hex":return X(this,l,f);case"utf8":case"utf-8":return x(this,l,f);case"ascii":return G(this,l,f);case"latin1":case"binary":return me(this,l,f);case"base64":return Q(this,l,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,l,f);default:if(E)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function F(A,l,f){var E=A[l];A[l]=A[f],A[f]=E}o.prototype.swap16=function(){var l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;ff&&(l+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(l,f,E,B,V){if(ne(l,Uint8Array)&&(l=o.from(l,l.offset,l.byteLength)),!o.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),E===void 0&&(E=l?l.length:0),B===void 0&&(B=0),V===void 0&&(V=this.length),f<0||E>l.length||B<0||V>this.length)throw new RangeError("out of range index");if(B>=V&&f>=E)return 0;if(B>=V)return-1;if(f>=E)return 1;if(f>>>=0,E>>>=0,B>>>=0,V>>>=0,this===l)return 0;for(var z=V-B,ue=E-f,ye=Math.min(z,ue),fe=this.slice(B,V),Ee=l.slice(f,E),Ie=0;Ie2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,v(f)&&(f=B?0:A.length-1),f<0&&(f=A.length+f),f>=A.length){if(B)return-1;f=A.length-1}else if(f<0)if(B)f=0;else return-1;if(typeof l=="string"&&(l=o.from(l,E)),o.isBuffer(l))return l.length===0?-1:M(A,l,f,E,B);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(A,l,f):Uint8Array.prototype.lastIndexOf.call(A,l,f):M(A,[l],f,E,B);throw new TypeError("val must be string, number or Buffer")}function M(A,l,f,E,B){var V=1,z=A.length,ue=l.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(A.length<2||l.length<2)return-1;V=2,z/=2,ue/=2,f/=2}function ye(xe,Oe){return V===1?xe[Oe]:xe.readUInt16BE(Oe*V)}var fe;if(B){var Ee=-1;for(fe=f;fez&&(f=z-ue),fe=f;fe>=0;fe--){for(var Ie=!0,re=0;reB&&(E=B)):E=B;var V=l.length;E>V/2&&(E=V/2);for(var z=0;z>>0,isFinite(E)?(E=E>>>0,B===void 0&&(B="utf8")):(B=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var V=this.length-f;if((E===void 0||E>V)&&(E=V),l.length>0&&(E<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");for(var z=!1;;)switch(B){case"hex":return Y(this,l,f,E);case"utf8":case"utf-8":return C(this,l,f,E);case"ascii":case"latin1":case"binary":return oe(this,l,f,E);case"base64":return Z(this,l,f,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,l,f,E);default:if(z)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),z=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(A,l,f){return l===0&&f===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(l,f))}function x(A,l,f){f=Math.min(A.length,f);for(var E=[],B=l;B239?4:V>223?3:V>191?2:1;if(B+ue<=f){var ye,fe,Ee,Ie;switch(ue){case 1:V<128&&(z=V);break;case 2:ye=A[B+1],(ye&192)===128&&(Ie=(V&31)<<6|ye&63,Ie>127&&(z=Ie));break;case 3:ye=A[B+1],fe=A[B+2],(ye&192)===128&&(fe&192)===128&&(Ie=(V&15)<<12|(ye&63)<<6|fe&63,Ie>2047&&(Ie<55296||Ie>57343)&&(z=Ie));break;case 4:ye=A[B+1],fe=A[B+2],Ee=A[B+3],(ye&192)===128&&(fe&192)===128&&(Ee&192)===128&&(Ie=(V&15)<<18|(ye&63)<<12|(fe&63)<<6|Ee&63,Ie>65535&&Ie<1114112&&(z=Ie))}}z===null?(z=65533,ue=1):z>65535&&(z-=65536,E.push(z>>>10&1023|55296),z=56320|z&1023),E.push(z),B+=ue}return ce(E)}var W=4096;function ce(A){var l=A.length;if(l<=W)return String.fromCharCode.apply(String,A);for(var f="",E=0;EE)&&(f=E);for(var B="",V=l;VE&&(l=E),f<0?(f+=E,f<0&&(f=0)):f>E&&(f=E),ff)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(l,f,E){l=l>>>0,f=f>>>0,E||j(l,f,this.length);for(var B=this[l],V=1,z=0;++z>>0,f=f>>>0,E||j(l,f,this.length);for(var B=this[l+--f],V=1;f>0&&(V*=256);)B+=this[l+--f]*V;return B},o.prototype.readUint8=o.prototype.readUInt8=function(l,f){return l=l>>>0,f||j(l,1,this.length),this[l]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||j(l,2,this.length),this[l]|this[l+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||j(l,2,this.length),this[l]<<8|this[l+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||j(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||j(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},o.prototype.readIntLE=function(l,f,E){l=l>>>0,f=f>>>0,E||j(l,f,this.length);for(var B=this[l],V=1,z=0;++z=V&&(B-=Math.pow(2,8*f)),B},o.prototype.readIntBE=function(l,f,E){l=l>>>0,f=f>>>0,E||j(l,f,this.length);for(var B=f,V=1,z=this[l+--B];B>0&&(V*=256);)z+=this[l+--B]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*f)),z},o.prototype.readInt8=function(l,f){return l=l>>>0,f||j(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},o.prototype.readInt16LE=function(l,f){l=l>>>0,f||j(l,2,this.length);var E=this[l]|this[l+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(l,f){l=l>>>0,f||j(l,2,this.length);var E=this[l+1]|this[l]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(l,f){return l=l>>>0,f||j(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},o.prototype.readInt32BE=function(l,f){return l=l>>>0,f||j(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},o.prototype.readFloatLE=function(l,f){return l=l>>>0,f||j(l,4,this.length),t.read(this,l,!0,23,4)},o.prototype.readFloatBE=function(l,f){return l=l>>>0,f||j(l,4,this.length),t.read(this,l,!1,23,4)},o.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||j(l,8,this.length),t.read(this,l,!0,52,8)},o.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||j(l,8,this.length),t.read(this,l,!1,52,8)};function R(A,l,f,E,B,V){if(!o.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>B||lA.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(l,f,E,B){if(l=+l,f=f>>>0,E=E>>>0,!B){var V=Math.pow(2,8*E)-1;R(this,l,f,E,V,0)}var z=1,ue=0;for(this[f]=l&255;++ue>>0,E=E>>>0,!B){var V=Math.pow(2,8*E)-1;R(this,l,f,E,V,0)}var z=E-1,ue=1;for(this[f+z]=l&255;--z>=0&&(ue*=256);)this[f+z]=l/ue&255;return f+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,1,255,0),this[f]=l&255,f+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},o.prototype.writeIntLE=function(l,f,E,B){if(l=+l,f=f>>>0,!B){var V=Math.pow(2,8*E-1);R(this,l,f,E,V-1,-V)}var z=0,ue=1,ye=0;for(this[f]=l&255;++z>0)-ye&255;return f+E},o.prototype.writeIntBE=function(l,f,E,B){if(l=+l,f=f>>>0,!B){var V=Math.pow(2,8*E-1);R(this,l,f,E,V-1,-V)}var z=E-1,ue=1,ye=0;for(this[f+z]=l&255;--z>=0&&(ue*=256);)l<0&&ye===0&&this[f+z+1]!==0&&(ye=1),this[f+z]=(l/ue>>0)-ye&255;return f+E},o.prototype.writeInt8=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},o.prototype.writeInt16LE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},o.prototype.writeInt16BE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},o.prototype.writeInt32LE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},o.prototype.writeInt32BE=function(l,f,E){return l=+l,f=f>>>0,E||R(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function $(A,l,f,E,B,V){if(f+E>A.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function te(A,l,f,E,B){return l=+l,f=f>>>0,B||$(A,l,f,4),t.write(A,l,f,E,23,4),f+4}o.prototype.writeFloatLE=function(l,f,E){return te(this,l,f,!0,E)},o.prototype.writeFloatBE=function(l,f,E){return te(this,l,f,!1,E)};function ie(A,l,f,E,B){return l=+l,f=f>>>0,B||$(A,l,f,8),t.write(A,l,f,E,52,8),f+8}o.prototype.writeDoubleLE=function(l,f,E){return ie(this,l,f,!0,E)},o.prototype.writeDoubleBE=function(l,f,E){return ie(this,l,f,!1,E)},o.prototype.copy=function(l,f,E,B){if(!o.isBuffer(l))throw new TypeError("argument should be a Buffer");if(E||(E=0),!B&&B!==0&&(B=this.length),f>=l.length&&(f=l.length),f||(f=0),B>0&&B=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),l.length-f>>0,E=E===void 0?this.length:E>>>0,l||(l=0);var z;if(typeof l=="number")for(z=f;z55295&&f<57344){if(!B){if(f>56319){(l-=3)>-1&&V.push(239,191,189);continue}else if(z+1===E){(l-=3)>-1&&V.push(239,191,189);continue}B=f;continue}if(f<56320){(l-=3)>-1&&V.push(239,191,189),B=f;continue}f=(B-55296<<10|f-56320)+65536}else B&&(l-=3)>-1&&V.push(239,191,189);if(B=null,f<128){if((l-=1)<0)break;V.push(f)}else if(f<2048){if((l-=2)<0)break;V.push(f>>6|192,f&63|128)}else if(f<65536){if((l-=3)<0)break;V.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((l-=4)<0)break;V.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return V}function H(A){for(var l=[],f=0;f>8,B=f%256,V.push(B),V.push(E);return V}function D(A){return e.toByteArray(T(A))}function O(A,l,f,E){for(var B=0;B=l.length||B>=A.length);++B)l[B+f]=A[B];return B}function ne(A,l){return A instanceof l||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===l.name}function v(A){return A!==A}var ee=function(){for(var A="0123456789abcdef",l=new Array(256),f=0;f<16;++f)for(var E=f*16,B=0;B<16;++B)l[E+B]=A[f]+A[B];return l}()}(ss)),ss}var as={},os={},us,Lo;function Rl(){return Lo||(Lo=1,us=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),us}var ls,Mo;function ha(){if(Mo)return ls;Mo=1;var r=Rl();return ls=function(){return r()&&!!Symbol.toStringTag},ls}var cs,Uo;function wd(){if(Uo)return cs;Uo=1;var r=typeof Symbol<"u"&&Symbol,e=Rl();return cs=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},cs}var fs,zo;function yd(){if(zo)return fs;zo=1;var r={foo:{}},e=Object;return fs=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof e)},fs}var hs,jo;function bd(){if(jo)return hs;jo=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(u,c){for(var h=[],m=0;m"u"||!h?r:h(Uint8Array),d={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":u&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":t,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&h?h(h([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!h?r:h(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!u||!h?r:h(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&h?h(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":e,"%ThrowTypeError%":o,"%TypedArray%":w,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(h)try{null.error}catch(N){var y=h(h(N));d["%Error.prototype%"]=y}var g=function N(Q){var x;if(Q==="%AsyncFunction%")x=i("async function () {}");else if(Q==="%GeneratorFunction%")x=i("function* () {}");else if(Q==="%AsyncGeneratorFunction%")x=i("async function* () {}");else if(Q==="%AsyncGenerator%"){var W=N("%AsyncGeneratorFunction%");W&&(x=W.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var ce=N("%AsyncGenerator%");ce&&h&&(x=h(ce.prototype))}return d[Q]=x,x},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},p=da(),_=_d(),k=p.call(Function.call,Array.prototype.concat),I=p.call(Function.apply,Array.prototype.splice),F=p.call(Function.call,String.prototype.replace),K=p.call(Function.call,String.prototype.slice),M=p.call(Function.call,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,oe=function(Q){var x=K(Q,0,1),W=K(Q,-1);if(x==="%"&&W!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&x!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var ce=[];return F(Q,Y,function(G,me,X,he){ce[ce.length]=X?F(he,C,"$1"):me||G}),ce},Z=function(Q,x){var W=Q,ce;if(_(b,W)&&(ce=b[W],W="%"+ce[0]+"%"),_(d,W)){var G=d[W];if(G===m&&(G=g(W)),typeof G>"u"&&!x)throw new n("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:ce,name:W,value:G}}throw new e("intrinsic "+Q+" does not exist!")};return ms=function(Q,x){if(typeof Q!="string"||Q.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof x!="boolean")throw new n('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,Q)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=oe(Q),ce=W.length>0?W[0]:"",G=Z("%"+ce+"%",x),me=G.name,X=G.value,he=!1,j=G.alias;j&&(ce=j[0],I(W,k([0,1],j)));for(var R=1,$=!0;R=W.length){var T=s(X,te);$=!!T,$&&"get"in T&&!("originalValue"in T.get)?X=T.get:X=X[te]}else $=_(X,te),X=X[te];$&&!he&&(d[me]=X)}}return X},ms}var gs={exports:{}},ws,Vo;function Il(){if(Vo)return ws;Vo=1;var r=vn(),e=r("%Object.defineProperty%",!0),t=function(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1};return t.hasArrayLengthDefineBug=function(){if(!t())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},ws=t,ws}var ys,Ko;function pa(){if(Ko)return ys;Ko=1;var r=vn(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return ys=e,ys}var bs,qo;function vd(){if(qo)return bs;qo=1;var r=Il()(),e=vn(),t=r&&e("%Object.defineProperty%",!0);if(t)try{t({},"a",{value:1})}catch{t=!1}var n=e("%SyntaxError%"),i=e("%TypeError%"),s=pa();return bs=function(o,u,c){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,m=arguments.length>4?arguments[4]:null,w=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,y=!!s&&s(o,u);if(t)t(o,u,{configurable:w===null&&y?y.configurable:!w,enumerable:h===null&&y?y.enumerable:!h,value:c,writable:m===null&&y?y.writable:!m});else if(d||!h&&!m&&!w)o[u]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},bs}var _s,Xo;function Ed(){if(Xo)return _s;Xo=1;var r=vn(),e=vd(),t=Il()(),n=pa(),i=r("%TypeError%"),s=r("%Math.floor%");return _s=function(o,u){if(typeof o!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||s(u)!==u)throw new i("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],h=!0,m=!0;if("length"in o&&n){var w=n(o,"length");w&&!w.configurable&&(h=!1),w&&!w.writable&&(m=!1)}return(h||m||!c)&&(t?e(o,"length",u,!0,!0):e(o,"length",u)),o},_s}var Zo;function Dl(){return Zo||(Zo=1,function(r){var e=da(),t=vn(),n=Ed(),i=t("%TypeError%"),s=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,s),u=t("%Object.defineProperty%",!0),c=t("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}r.exports=function(w){if(typeof w!="function")throw new i("a function is required");var d=o(e,a,arguments);return n(d,1+c(0,w.length-(arguments.length-1)),!0)};var h=function(){return o(e,s,arguments)};u?u(r.exports,"apply",{value:h}):r.exports.apply=h}(gs)),gs.exports}var vs,Yo;function Nl(){if(Yo)return vs;Yo=1;var r=vn(),e=Dl(),t=e(r("String.prototype.indexOf"));return vs=function(i,s){var a=r(i,!!s);return typeof a=="function"&&t(i,".prototype.")>-1?e(a):a},vs}var Es,Jo;function Sd(){if(Jo)return Es;Jo=1;var r=ha()(),e=Nl(),t=e("Object.prototype.toString"),n=function(o){return r&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:t(o)==="[object Arguments]"},i=function(o){return n(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&t(o)!=="[object Array]"&&t(o.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,Es=s?n:i,Es}var Ss,Qo;function Td(){if(Qo)return Ss;Qo=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=ha()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return Ss=function(u){if(typeof u!="function")return!1;if(t.test(e.call(u)))return!0;if(!n){var c=r.call(u);return c==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var h=s();a=h?i(h):!1}return i(u)===a},Ss}var Ts,$o;function Ad(){if($o)return Ts;$o=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(_){_!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(k){try{var I=r.call(k);return i.test(I)}catch{return!1}},a=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},o=Object.prototype.toString,u="[object Object]",c="[object Function]",h="[object GeneratorFunction]",m="[object HTMLAllCollection]",w="[object HTML document.all class]",d="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),b=function(){return!1};if(typeof document=="object"){var p=document.all;o.call(p)===o.call(document.all)&&(b=function(k){if((g||!k)&&(typeof k>"u"||typeof k=="object"))try{var I=o.call(k);return(I===m||I===w||I===d||I===u)&&k("")==null}catch{}return!1})}return Ts=e?function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{e(k,null,t)}catch(I){if(I!==n)return!1}return!s(k)&&a(k)}:function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(y)return a(k);if(s(k))return!1;var I=o.call(k);return I!==c&&I!==h&&!/^\[object HTML/.test(I)?!1:a(k)},Ts}var As,eu;function kd(){if(eu)return As;eu=1;var r=Ad(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(u,c,h){for(var m=0,w=u.length;m=3&&(m=h),e.call(u)==="[object Array]"?n(u,c,m):typeof u=="string"?i(u,c,m):s(u,c,m)};return As=a,As}var ks,tu;function xd(){if(tu)return ks;tu=1;var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],e=typeof globalThis>"u"?kr:globalThis;return ks=function(){for(var n=[],i=0;i"u"?kr:globalThis,u=e(),c=n("String.prototype.slice"),h=Object.getPrototypeOf,m=n("Array.prototype.indexOf",!0)||function(b,p){for(var _=0;_-1?p:p!=="Object"?!1:y(b)}return i?d(b):null},xs}var Cs,nu;function Cd(){if(nu)return Cs;nu=1;var r=Ol();return Cs=function(t){return!!r(t)},Cs}var iu;function Rd(){return iu||(iu=1,function(r){var e=Sd(),t=Td(),n=Ol(),i=Cd();function s(E){return E.call.bind(E)}var a=typeof BigInt<"u",o=typeof Symbol<"u",u=s(Object.prototype.toString),c=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),m=s(Boolean.prototype.valueOf);if(a)var w=s(BigInt.prototype.valueOf);if(o)var d=s(Symbol.prototype.valueOf);function y(E,B){if(typeof E!="object")return!1;try{return B(E),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function g(E){return typeof Promise<"u"&&E instanceof Promise||E!==null&&typeof E=="object"&&typeof E.then=="function"&&typeof E.catch=="function"}r.isPromise=g;function b(E){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(E):i(E)||$(E)}r.isArrayBufferView=b;function p(E){return n(E)==="Uint8Array"}r.isUint8Array=p;function _(E){return n(E)==="Uint8ClampedArray"}r.isUint8ClampedArray=_;function k(E){return n(E)==="Uint16Array"}r.isUint16Array=k;function I(E){return n(E)==="Uint32Array"}r.isUint32Array=I;function F(E){return n(E)==="Int8Array"}r.isInt8Array=F;function K(E){return n(E)==="Int16Array"}r.isInt16Array=K;function M(E){return n(E)==="Int32Array"}r.isInt32Array=M;function Y(E){return n(E)==="Float32Array"}r.isFloat32Array=Y;function C(E){return n(E)==="Float64Array"}r.isFloat64Array=C;function oe(E){return n(E)==="BigInt64Array"}r.isBigInt64Array=oe;function Z(E){return n(E)==="BigUint64Array"}r.isBigUint64Array=Z;function N(E){return u(E)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function Q(E){return typeof Map>"u"?!1:N.working?N(E):E instanceof Map}r.isMap=Q;function x(E){return u(E)==="[object Set]"}x.working=typeof Set<"u"&&x(new Set);function W(E){return typeof Set>"u"?!1:x.working?x(E):E instanceof Set}r.isSet=W;function ce(E){return u(E)==="[object WeakMap]"}ce.working=typeof WeakMap<"u"&&ce(new WeakMap);function G(E){return typeof WeakMap>"u"?!1:ce.working?ce(E):E instanceof WeakMap}r.isWeakMap=G;function me(E){return u(E)==="[object WeakSet]"}me.working=typeof WeakSet<"u"&&me(new WeakSet);function X(E){return me(E)}r.isWeakSet=X;function he(E){return u(E)==="[object ArrayBuffer]"}he.working=typeof ArrayBuffer<"u"&&he(new ArrayBuffer);function j(E){return typeof ArrayBuffer>"u"?!1:he.working?he(E):E instanceof ArrayBuffer}r.isArrayBuffer=j;function R(E){return u(E)==="[object DataView]"}R.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&R(new DataView(new ArrayBuffer(1),0,1));function $(E){return typeof DataView>"u"?!1:R.working?R(E):E instanceof DataView}r.isDataView=$;var te=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(E){return u(E)==="[object SharedArrayBuffer]"}function L(E){return typeof te>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new te)),ie.working?ie(E):E instanceof te)}r.isSharedArrayBuffer=L;function T(E){return u(E)==="[object AsyncFunction]"}r.isAsyncFunction=T;function S(E){return u(E)==="[object Map Iterator]"}r.isMapIterator=S;function H(E){return u(E)==="[object Set Iterator]"}r.isSetIterator=H;function U(E){return u(E)==="[object Generator]"}r.isGeneratorObject=U;function D(E){return u(E)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=D;function O(E){return y(E,c)}r.isNumberObject=O;function ne(E){return y(E,h)}r.isStringObject=ne;function v(E){return y(E,m)}r.isBooleanObject=v;function ee(E){return a&&y(E,w)}r.isBigIntObject=ee;function A(E){return o&&y(E,d)}r.isSymbolObject=A;function l(E){return O(E)||ne(E)||v(E)||ee(E)||A(E)}r.isBoxedPrimitive=l;function f(E){return typeof Uint8Array<"u"&&(j(E)||L(E))}r.isAnyArrayBuffer=f,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(E){Object.defineProperty(r,E,{enumerable:!1,value:function(){throw new Error(E+" is not supported in userland")}})})}(os)),os}var Rs,su;function Id(){return su||(su=1,Rs=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Rs}var au;function Fl(){return au||(au=1,function(r){var e=Object.getOwnPropertyDescriptors||function($){for(var te=Object.keys($),ie={},L=0;L=L)return H;switch(H){case"%s":return String(ie[te++]);case"%d":return Number(ie[te++]);case"%j":try{return JSON.stringify(ie[te++])}catch{return"[Circular]"}default:return H}}),S=ie[te];te"u")return function(){return r.deprecate(R,$).apply(this,arguments)};var te=!1;function ie(){if(!te){if(je.throwDeprecation)throw new Error($);je.traceDeprecation?console.trace($):console.error($),te=!0}return R.apply(this,arguments)}return ie};var n={},i=/^$/;if(je.env.NODE_DEBUG){var s=je.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(R){if(R=R.toUpperCase(),!n[R])if(i.test(R)){var $=je.pid;n[R]=function(){var te=r.format.apply(r,arguments);console.error("%s %d: %s",R,$,te)}}else n[R]=function(){};return n[R]};function a(R,$){var te={seen:[],stylize:u};return arguments.length>=3&&(te.depth=arguments[2]),arguments.length>=4&&(te.colors=arguments[3]),p($)?te.showHidden=$:$&&r._extend(te,$),M(te.showHidden)&&(te.showHidden=!1),M(te.depth)&&(te.depth=2),M(te.colors)&&(te.colors=!1),M(te.customInspect)&&(te.customInspect=!0),te.colors&&(te.stylize=o),h(te,R,te.depth)}r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(R,$){var te=a.styles[$];return te?"\x1B["+a.colors[te][0]+"m"+R+"\x1B["+a.colors[te][1]+"m":R}function u(R,$){return R}function c(R){var $={};return R.forEach(function(te,ie){$[te]=!0}),$}function h(R,$,te){if(R.customInspect&&$&&N($.inspect)&&$.inspect!==r.inspect&&!($.constructor&&$.constructor.prototype===$)){var ie=$.inspect(te,R);return F(ie)||(ie=h(R,ie,te)),ie}var L=m(R,$);if(L)return L;var T=Object.keys($),S=c(T);if(R.showHidden&&(T=Object.getOwnPropertyNames($)),Z($)&&(T.indexOf("message")>=0||T.indexOf("description")>=0))return w($);if(T.length===0){if(N($)){var H=$.name?": "+$.name:"";return R.stylize("[Function"+H+"]","special")}if(Y($))return R.stylize(RegExp.prototype.toString.call($),"regexp");if(oe($))return R.stylize(Date.prototype.toString.call($),"date");if(Z($))return w($)}var U="",D=!1,O=["{","}"];if(b($)&&(D=!0,O=["[","]"]),N($)){var ne=$.name?": "+$.name:"";U=" [Function"+ne+"]"}if(Y($)&&(U=" "+RegExp.prototype.toString.call($)),oe($)&&(U=" "+Date.prototype.toUTCString.call($)),Z($)&&(U=" "+w($)),T.length===0&&(!D||$.length==0))return O[0]+U+O[1];if(te<0)return Y($)?R.stylize(RegExp.prototype.toString.call($),"regexp"):R.stylize("[Object]","special");R.seen.push($);var v;return D?v=d(R,$,te,S,T):v=T.map(function(ee){return y(R,$,te,S,ee,D)}),R.seen.pop(),g(v,U,O)}function m(R,$){if(M($))return R.stylize("undefined","undefined");if(F($)){var te="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return R.stylize(te,"string")}if(I($))return R.stylize(""+$,"number");if(p($))return R.stylize(""+$,"boolean");if(_($))return R.stylize("null","null")}function w(R){return"["+Error.prototype.toString.call(R)+"]"}function d(R,$,te,ie,L){for(var T=[],S=0,H=$.length;S-1&&(T?H=H.split(` +`).map(function(D){return" "+D}).join(` +`).slice(2):H=` +`+H.split(` +`).map(function(D){return" "+D}).join(` +`))):H=R.stylize("[Circular]","special")),M(S)){if(T&&L.match(/^\d+$/))return H;S=JSON.stringify(""+L),S.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(S=S.slice(1,-1),S=R.stylize(S,"name")):(S=S.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),S=R.stylize(S,"string"))}return S+": "+H}function g(R,$,te){var ie=R.reduce(function(L,T){return T.indexOf(` +`)>=0,L+T.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?te[0]+($===""?"":$+` + `)+" "+R.join(`, + `)+" "+te[1]:te[0]+$+" "+R.join(", ")+" "+te[1]}r.types=Rd();function b(R){return Array.isArray(R)}r.isArray=b;function p(R){return typeof R=="boolean"}r.isBoolean=p;function _(R){return R===null}r.isNull=_;function k(R){return R==null}r.isNullOrUndefined=k;function I(R){return typeof R=="number"}r.isNumber=I;function F(R){return typeof R=="string"}r.isString=F;function K(R){return typeof R=="symbol"}r.isSymbol=K;function M(R){return R===void 0}r.isUndefined=M;function Y(R){return C(R)&&x(R)==="[object RegExp]"}r.isRegExp=Y,r.types.isRegExp=Y;function C(R){return typeof R=="object"&&R!==null}r.isObject=C;function oe(R){return C(R)&&x(R)==="[object Date]"}r.isDate=oe,r.types.isDate=oe;function Z(R){return C(R)&&(x(R)==="[object Error]"||R instanceof Error)}r.isError=Z,r.types.isNativeError=Z;function N(R){return typeof R=="function"}r.isFunction=N;function Q(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||typeof R>"u"}r.isPrimitive=Q,r.isBuffer=Id();function x(R){return Object.prototype.toString.call(R)}function W(R){return R<10?"0"+R.toString(10):R.toString(10)}var ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var R=new Date,$=[W(R.getHours()),W(R.getMinutes()),W(R.getSeconds())].join(":");return[R.getDate(),ce[R.getMonth()],$].join(" ")}r.log=function(){console.log("%s - %s",G(),r.format.apply(r,arguments))},r.inherits=nn,r._extend=function(R,$){if(!$||!C($))return R;for(var te=Object.keys($),ie=te.length;ie--;)R[te[ie]]=$[te[ie]];return R};function me(R,$){return Object.prototype.hasOwnProperty.call(R,$)}var X=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(X&&$[X]){var te=$[X];if(typeof te!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(te,X,{value:te,enumerable:!1,writable:!1,configurable:!0}),te}function te(){for(var ie,L,T=new Promise(function(U,D){ie=U,L=D}),S=[],H=0;H0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(y){var g={data:y,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var g=this.head,b=""+g.data;g=g.next;)b+=y+g.data;return b}},{key:"concat",value:function(y){if(this.length===0)return o.alloc(0);for(var g=o.allocUnsafe(y>>>0),b=this.head,p=0;b;)m(b.data,g,p),p+=b.data.length,b=b.next;return g}},{key:"consume",value:function(y,g){var b;return y_.length?_.length:y;if(k===_.length?p+=_:p+=_.slice(0,y),y-=k,y===0){k===_.length?(++b,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=_.slice(k));break}++b}return this.length-=b,p}},{key:"_getBuffer",value:function(y){var g=o.allocUnsafe(y),b=this.head,p=1;for(b.data.copy(g),y-=b.data.length;b=b.next;){var _=b.data,k=y>_.length?_.length:y;if(_.copy(g,g.length-y,0,k),y-=k,y===0){k===_.length?(++p,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=_.slice(k));break}++p}return this.length-=p,g}},{key:h,value:function(y,g){return c(this,e({},g,{depth:0,customInspect:!1}))}}]),w}(),Is}var Ds,uu;function Bl(){if(uu)return Ds;uu=1;function r(a,o){var u=this,c=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return c||h?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,je.nextTick(i,this,a)):je.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(m){!o&&m?u._writableState?u._writableState.errorEmitted?je.nextTick(t,u):(u._writableState.errorEmitted=!0,je.nextTick(e,u,m)):je.nextTick(e,u,m):o?(je.nextTick(t,u),o(m)):je.nextTick(t,u)}),this)}function e(a,o){i(a,o),t(a)}function t(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){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)}function i(a,o){a.emit("error",o)}function s(a,o){var u=a._readableState,c=a._writableState;u&&u.autoDestroy||c&&c.autoDestroy?a.destroy(o):a.emit("error",o)}return Ds={destroy:r,undestroy:n,errorOrDestroy:s},Ds}var Ns={},lu;function En(){if(lu)return Ns;lu=1;function r(o,u){o.prototype=Object.create(u.prototype),o.prototype.constructor=o,o.__proto__=u}var e={};function t(o,u,c){c||(c=Error);function h(w,d,y){return typeof u=="string"?u:u(w,d,y)}var m=function(w){r(d,w);function d(y,g,b){return w.call(this,h(y,g,b))||this}return d}(c);m.prototype.name=c.name,m.prototype.code=o,e[o]=m}function n(o,u){if(Array.isArray(o)){var c=o.length;return o=o.map(function(h){return String(h)}),c>2?"one of ".concat(u," ").concat(o.slice(0,c-1).join(", "),", or ")+o[c-1]:c===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function i(o,u,c){return o.substr(!c||c<0?0:+c,u.length)===u}function s(o,u,c){return(c===void 0||c>o.length)&&(c=o.length),o.substring(c-u.length,c)===u}function a(o,u,c){return typeof c!="number"&&(c=0),c+u.length>o.length?!1:o.indexOf(u,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(o,u){return'The value "'+u+'" is invalid for option "'+o+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(o,u,c){var h;typeof u=="string"&&i(u,"not ")?(h="must not be",u=u.replace(/^not /,"")):h="must be";var m;if(s(o," argument"))m="The ".concat(o," ").concat(h," ").concat(n(u,"type"));else{var w=a(o,".")?"property":"argument";m='The "'.concat(o,'" ').concat(w," ").concat(h," ").concat(n(u,"type"))}return m+=". Received type ".concat(typeof c),m},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ns.codes=e,Ns}var Os,cu;function Pl(){if(cu)return Os;cu=1;var r=En().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,a){var o=e(i,a,s);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var u=a?s:"highWaterMark";throw new r(u,o)}return Math.floor(o)}return n.objectMode?16:16*1024}return Os={getHighWaterMark:t},Os}var Fs,fu;function Nd(){if(fu)return Fs;fu=1,Fs=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!kr.localStorage)return!1}catch{return!1}var n=kr.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return Fs}var Bs,hu;function Ll(){if(hu)return Bs;hu=1,Bs=Y;function r(L){var T=this;this.next=null,this.entry=null,this.finish=function(){ie(T,L)}}var e;Y.WritableState=K;var t={deprecate:Nd()},n=Cl(),i=Hi().Buffer,s=kr.Uint8Array||function(){};function a(L){return i.from(L)}function o(L){return i.isBuffer(L)||L instanceof s}var u=Bl(),c=Pl(),h=c.getHighWaterMark,m=En().codes,w=m.ERR_INVALID_ARG_TYPE,d=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,g=m.ERR_STREAM_CANNOT_PIPE,b=m.ERR_STREAM_DESTROYED,p=m.ERR_STREAM_NULL_VALUES,_=m.ERR_STREAM_WRITE_AFTER_END,k=m.ERR_UNKNOWN_ENCODING,I=u.errorOrDestroy;nn(Y,n);function F(){}function K(L,T,S){e=e||gn(),L=L||{},typeof S!="boolean"&&(S=T instanceof e),this.objectMode=!!L.objectMode,S&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=h(this,L,"writableHighWaterMark",S),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=L.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){ce(T,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}K.prototype.getBuffer=function(){for(var T=this.bufferedRequest,S=[];T;)S.push(T),T=T.next;return S},function(){try{Object.defineProperty(K.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(T){return M.call(this,T)?!0:this!==Y?!1:T&&T._writableState instanceof K}})):M=function(T){return T instanceof this};function Y(L){e=e||gn();var T=this instanceof e;if(!T&&!M.call(Y,this))return new Y(L);this._writableState=new K(L,this,T),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),n.call(this)}Y.prototype.pipe=function(){I(this,new g)};function C(L,T){var S=new _;I(L,S),je.nextTick(T,S)}function oe(L,T,S,H){var U;return S===null?U=new p:typeof S!="string"&&!T.objectMode&&(U=new w("chunk",["string","Buffer"],S)),U?(I(L,U),je.nextTick(H,U),!1):!0}Y.prototype.write=function(L,T,S){var H=this._writableState,U=!1,D=!H.objectMode&&o(L);return D&&!i.isBuffer(L)&&(L=a(L)),typeof T=="function"&&(S=T,T=null),D?T="buffer":T||(T=H.defaultEncoding),typeof S!="function"&&(S=F),H.ending?C(this,S):(D||oe(this,H,L,S))&&(H.pendingcb++,U=N(this,H,D,L,T,S)),U},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&X(this,L))},Y.prototype.setDefaultEncoding=function(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new k(T);return this._writableState.defaultEncoding=T,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Z(L,T,S){return!L.objectMode&&L.decodeStrings!==!1&&typeof T=="string"&&(T=i.from(T,S)),T}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(L,T,S,H,U,D){if(!S){var O=Z(T,H,U);H!==O&&(S=!0,U="buffer",H=O)}var ne=T.objectMode?1:H.length;T.length+=ne;var v=T.length>5===6?2:p>>4===14?3:p>>3===30?4:p>>6===2?-1:-2}function a(p,_,k){var I=_.length-1;if(I=0?(F>0&&(p.lastNeed=F-1),F):--I=0?(F>0&&(p.lastNeed=F-2),F):--I=0?(F>0&&(F===2?F=0:p.lastNeed=F-3),F):0))}function o(p,_,k){if((_[0]&192)!==128)return p.lastNeed=0,"�";if(p.lastNeed>1&&_.length>1){if((_[1]&192)!==128)return p.lastNeed=1,"�";if(p.lastNeed>2&&_.length>2&&(_[2]&192)!==128)return p.lastNeed=2,"�"}}function u(p){var _=this.lastTotal-this.lastNeed,k=o(this,p);if(k!==void 0)return k;if(this.lastNeed<=p.length)return p.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,_,0,p.length),this.lastNeed-=p.length}function c(p,_){var k=a(this,p,_);if(!this.lastNeed)return p.toString("utf8",_);this.lastTotal=k;var I=p.length-(k-this.lastNeed);return p.copy(this.lastChar,0,I),p.toString("utf8",_,I)}function h(p){var _=p&&p.length?this.write(p):"";return this.lastNeed?_+"�":_}function m(p,_){if((p.length-_)%2===0){var k=p.toString("utf16le",_);if(k){var I=k.charCodeAt(k.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],k.slice(0,-1)}return k}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",_,p.length-1)}function w(p){var _=p&&p.length?this.write(p):"";if(this.lastNeed){var k=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,k)}return _}function d(p,_){var k=(p.length-_)%3;return k===0?p.toString("base64",_):(this.lastNeed=3-k,this.lastTotal=3,k===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",_,p.length-k))}function y(p){var _=p&&p.length?this.write(p):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function g(p){return p.toString(this.encoding)}function b(p){return p&&p.length?this.write(p):""}return Ls}var Ms,gu;function ma(){if(gu)return Ms;gu=1;var r=En().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,u=new Array(o),c=0;c0)if(typeof O!="string"&&!A.objectMode&&Object.getPrototypeOf(O)!==n.prototype&&(O=s(O)),v)A.endEmitted?F(D,new p):Z(D,A,O,!0);else if(A.ended)F(D,new g);else{if(A.destroyed)return!1;A.reading=!1,A.decoder&&!ne?(O=A.decoder.write(O),A.objectMode||O.length!==0?Z(D,A,O,!1):X(D,A)):Z(D,A,O,!1)}else v||(A.reading=!1,X(D,A))}return!A.ended&&(A.length=Q?D=Q:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function W(D,O){return D<=0||O.length===0&&O.ended?0:O.objectMode?1:D!==D?O.flowing&&O.length?O.buffer.head.data.length:O.length:(D>O.highWaterMark&&(O.highWaterMark=x(D)),D<=O.length?D:O.ended?O.length:(O.needReadable=!0,0))}C.prototype.read=function(D){u("read",D),D=parseInt(D,10);var O=this._readableState,ne=D;if(D!==0&&(O.emittedReadable=!1),D===0&&O.needReadable&&((O.highWaterMark!==0?O.length>=O.highWaterMark:O.length>0)||O.ended))return u("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?S(this):G(this),null;if(D=W(D,O),D===0&&O.ended)return O.length===0&&S(this),null;var v=O.needReadable;u("need readable",v),(O.length===0||O.length-D0?ee=T(D,O):ee=null,ee===null?(O.needReadable=O.length<=O.highWaterMark,D=0):(O.length-=D,O.awaitDrain=0),O.length===0&&(O.ended||(O.needReadable=!0),ne!==D&&O.ended&&S(this)),ee!==null&&this.emit("data",ee),ee};function ce(D,O){if(u("onEofChunk"),!O.ended){if(O.decoder){var ne=O.decoder.end();ne&&ne.length&&(O.buffer.push(ne),O.length+=O.objectMode?1:ne.length)}O.ended=!0,O.sync?G(D):(O.needReadable=!1,O.emittedReadable||(O.emittedReadable=!0,me(D)))}}function G(D){var O=D._readableState;u("emitReadable",O.needReadable,O.emittedReadable),O.needReadable=!1,O.emittedReadable||(u("emitReadable",O.flowing),O.emittedReadable=!0,je.nextTick(me,D))}function me(D){var O=D._readableState;u("emitReadable_",O.destroyed,O.length,O.ended),!O.destroyed&&(O.length||O.ended)&&(D.emit("readable"),O.emittedReadable=!1),O.needReadable=!O.flowing&&!O.ended&&O.length<=O.highWaterMark,L(D)}function X(D,O){O.readingMore||(O.readingMore=!0,je.nextTick(he,D,O))}function he(D,O){for(;!O.reading&&!O.ended&&(O.length1&&U(v.pipes,D)!==-1)&&!B&&(u("false write response, pause",v.awaitDrain),v.awaitDrain++),ne.pause())}function ue(Ie){u("onerror",Ie),Ee(),D.removeListener("error",ue),e(D,"error")===0&&F(D,Ie)}M(D,"error",ue);function ye(){D.removeListener("finish",fe),Ee()}D.once("close",ye);function fe(){u("onfinish"),D.removeListener("close",ye),Ee()}D.once("finish",fe);function Ee(){u("unpipe"),ne.unpipe(D)}return D.emit("pipe",ne),v.flowing||(u("pipe resume"),ne.resume()),D};function j(D){return function(){var ne=D._readableState;u("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&e(D,"data")&&(ne.flowing=!0,L(D))}}C.prototype.unpipe=function(D){var O=this._readableState,ne={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return D&&D!==O.pipes?this:(D||(D=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,D&&D.emit("unpipe",this,ne),this);if(!D){var v=O.pipes,ee=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var A=0;A0,v.flowing!==!1&&this.resume()):D==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,u("on readable",v.length,v.reading),v.length?G(this):v.reading||je.nextTick($,this)),ne},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(D,O){var ne=t.prototype.removeListener.call(this,D,O);return D==="readable"&&je.nextTick(R,this),ne},C.prototype.removeAllListeners=function(D){var O=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&je.nextTick(R,this),O};function R(D){var O=D._readableState;O.readableListening=D.listenerCount("readable")>0,O.resumeScheduled&&!O.paused?O.flowing=!0:D.listenerCount("data")>0&&D.resume()}function $(D){u("readable nexttick read 0"),D.read(0)}C.prototype.resume=function(){var D=this._readableState;return D.flowing||(u("resume"),D.flowing=!D.readableListening,te(this,D)),D.paused=!1,this};function te(D,O){O.resumeScheduled||(O.resumeScheduled=!0,je.nextTick(ie,D,O))}function ie(D,O){u("resume",O.reading),O.reading||D.read(0),O.resumeScheduled=!1,D.emit("resume"),L(D),O.flowing&&!O.reading&&D.read(0)}C.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(D){var O=D._readableState;for(u("flow",O.flowing);O.flowing&&D.read()!==null;);}C.prototype.wrap=function(D){var O=this,ne=this._readableState,v=!1;D.on("end",function(){if(u("wrapped end"),ne.decoder&&!ne.ended){var l=ne.decoder.end();l&&l.length&&O.push(l)}O.push(null)}),D.on("data",function(l){if(u("wrapped data"),ne.decoder&&(l=ne.decoder.write(l)),!(ne.objectMode&&l==null)&&!(!ne.objectMode&&(!l||!l.length))){var f=O.push(l);f||(v=!0,D.pause())}});for(var ee in D)this[ee]===void 0&&typeof D[ee]=="function"&&(this[ee]=function(f){return function(){return D[f].apply(D,arguments)}}(ee));for(var A=0;A=O.length?(O.decoder?ne=O.buffer.join(""):O.buffer.length===1?ne=O.buffer.first():ne=O.buffer.concat(O.length),O.buffer.clear()):ne=O.buffer.consume(D,O.decoder),ne}function S(D){var O=D._readableState;u("endReadable",O.endEmitted),O.endEmitted||(O.ended=!0,je.nextTick(H,O,D))}function H(D,O){if(u("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,O.readable=!1,O.emit("end"),D.autoDestroy)){var ne=O._writableState;(!ne||ne.autoDestroy&&ne.finished)&&O.destroy()}}typeof Symbol=="function"&&(C.from=function(D,O){return I===void 0&&(I=Bd()),I(C,D,O)});function U(D,O){for(var ne=0,v=D.length;ne0;return o(_,I,F,function(K){b||(b=K),K&&p.forEach(u),!I&&(p.forEach(u),g(b))})});return d.reduce(c)}return Gs=m,Gs}var ga=ar,wa=fa.EventEmitter,Md=nn;Md(ar,wa);ar.Readable=Ml();ar.Writable=Ll();ar.Duplex=gn();ar.Transform=Ul();ar.PassThrough=Pd();ar.finished=ma();ar.pipeline=Ld();ar.Stream=ar;function ar(){wa.call(this)}ar.prototype.pipe=function(r,e){var t=this;function n(h){r.writable&&r.write(h)===!1&&t.pause&&t.pause()}t.on("data",n);function i(){t.readable&&t.resume&&t.resume()}r.on("drain",i),!r._isStdio&&(!e||e.end!==!1)&&(t.on("end",a),t.on("close",o));var s=!1;function a(){s||(s=!0,r.end())}function o(){s||(s=!0,typeof r.destroy=="function"&&r.destroy())}function u(h){if(c(),wa.listenerCount(this,"error")===0)throw h}t.on("error",u),r.on("error",u);function c(){t.removeListener("data",n),r.removeListener("drain",i),t.removeListener("end",a),t.removeListener("close",o),t.removeListener("error",u),r.removeListener("error",u),t.removeListener("end",c),t.removeListener("close",c),r.removeListener("close",c)}return t.on("end",c),t.on("close",c),r.on("close",c),r.emit("pipe",t),r};(function(r){(function(e){e.parser=function(T,S){return new n(T,S)},e.SAXParser=n,e.SAXStream=h,e.createStream=c,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(T,S){if(!(this instanceof n))return new n(T,S);var H=this;s(H),H.q=H.c="",H.bufferCheckPosition=e.MAX_BUFFER_LENGTH,H.opt=S||{},H.opt.lowercase=H.opt.lowercase||H.opt.lowercasetags,H.looseCase=H.opt.lowercase?"toLowerCase":"toUpperCase",H.tags=[],H.closed=H.closedRoot=H.sawRoot=!1,H.tag=H.error=null,H.strict=!!T,H.noscript=!!(T||H.opt.noscript),H.state=C.BEGIN,H.strictEntities=H.opt.strictEntities,H.ENTITIES=H.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),H.attribList=[],H.opt.xmlns&&(H.ns=Object.create(g)),H.trackPosition=H.opt.position!==!1,H.trackPosition&&(H.position=H.line=H.column=0),Z(H,"onready")}Object.create||(Object.create=function(T){function S(){}S.prototype=T;var H=new S;return H}),Object.keys||(Object.keys=function(T){var S=[];for(var H in T)T.hasOwnProperty(H)&&S.push(H);return S});function i(T){for(var S=Math.max(e.MAX_BUFFER_LENGTH,10),H=0,U=0,D=t.length;US)switch(t[U]){case"textNode":Q(T);break;case"cdata":N(T,"oncdata",T.cdata),T.cdata="";break;case"script":N(T,"onscript",T.script),T.script="";break;default:W(T,"Max buffer length exceeded: "+t[U])}H=Math.max(H,O)}var ne=e.MAX_BUFFER_LENGTH-H;T.bufferCheckPosition=ne+T.position}function s(T){for(var S=0,H=t.length;S"||I(T)}function M(T,S){return T.test(S)}function Y(T,S){return!M(T,S)}var C=0;e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(T){var S=e.ENTITIES[T],H=typeof S=="number"?String.fromCharCode(S):S;e.ENTITIES[T]=H});for(var oe in e.STATE)e.STATE[e.STATE[oe]]=oe;C=e.STATE;function Z(T,S,H){T[S]&&T[S](H)}function N(T,S,H){T.textNode&&Q(T),Z(T,S,H)}function Q(T){T.textNode=x(T.opt,T.textNode),T.textNode&&Z(T,"ontext",T.textNode),T.textNode=""}function x(T,S){return T.trim&&(S=S.trim()),T.normalize&&(S=S.replace(/\s+/g," ")),S}function W(T,S){return Q(T),T.trackPosition&&(S+=` +Line: `+T.line+` +Column: `+T.column+` +Char: `+T.c),S=new Error(S),T.error=S,Z(T,"onerror",S),T}function ce(T){return T.sawRoot&&!T.closedRoot&&G(T,"Unclosed root tag"),T.state!==C.BEGIN&&T.state!==C.BEGIN_WHITESPACE&&T.state!==C.TEXT&&W(T,"Unexpected end"),Q(T),T.c="",T.closed=!0,Z(T,"onend"),n.call(T,T.strict,T.opt),T}function G(T,S){if(typeof T!="object"||!(T instanceof n))throw new Error("bad call to strictFail");T.strict&&W(T,S)}function me(T){T.strict||(T.tagName=T.tagName[T.looseCase]());var S=T.tags[T.tags.length-1]||T,H=T.tag={name:T.tagName,attributes:{}};T.opt.xmlns&&(H.ns=S.ns),T.attribList.length=0,N(T,"onopentagstart",H)}function X(T,S){var H=T.indexOf(":"),U=H<0?["",T]:T.split(":"),D=U[0],O=U[1];return S&&T==="xmlns"&&(D="xmlns",O=""),{prefix:D,local:O}}function he(T){if(T.strict||(T.attribName=T.attribName[T.looseCase]()),T.attribList.indexOf(T.attribName)!==-1||T.tag.attributes.hasOwnProperty(T.attribName)){T.attribName=T.attribValue="";return}if(T.opt.xmlns){var S=X(T.attribName,!0),H=S.prefix,U=S.local;if(H==="xmlns")if(U==="xml"&&T.attribValue!==d)G(T,"xml: prefix must be bound to "+d+` +Actual: `+T.attribValue);else if(U==="xmlns"&&T.attribValue!==y)G(T,"xmlns: prefix must be bound to "+y+` +Actual: `+T.attribValue);else{var D=T.tag,O=T.tags[T.tags.length-1]||T;D.ns===O.ns&&(D.ns=Object.create(O.ns)),D.ns[U]=T.attribValue}T.attribList.push([T.attribName,T.attribValue])}else T.tag.attributes[T.attribName]=T.attribValue,N(T,"onattribute",{name:T.attribName,value:T.attribValue});T.attribName=T.attribValue=""}function j(T,S){if(T.opt.xmlns){var H=T.tag,U=X(T.tagName);H.prefix=U.prefix,H.local=U.local,H.uri=H.ns[U.prefix]||"",H.prefix&&!H.uri&&(G(T,"Unbound namespace prefix: "+JSON.stringify(T.tagName)),H.uri=U.prefix);var D=T.tags[T.tags.length-1]||T;H.ns&&D.ns!==H.ns&&Object.keys(H.ns).forEach(function(z){N(T,"onopennamespace",{prefix:z,uri:H.ns[z]})});for(var O=0,ne=T.attribList.length;O",T.tagName="",T.state=C.SCRIPT;return}N(T,"onscript",T.script),T.script=""}var S=T.tags.length,H=T.tagName;T.strict||(H=H[T.looseCase]());for(var U=H;S--;){var D=T.tags[S];if(D.name!==U)G(T,"Unexpected close tag");else break}if(S<0){G(T,"Unmatched closing tag: "+T.tagName),T.textNode+="",T.state=C.TEXT;return}T.tagName=H;for(var O=T.tags.length;O-- >S;){var ne=T.tag=T.tags.pop();T.tagName=T.tag.name,N(T,"onclosetag",T.tagName);var v={};for(var ee in ne.ns)v[ee]=ne.ns[ee];var A=T.tags[T.tags.length-1]||T;T.opt.xmlns&&ne.ns!==A.ns&&Object.keys(ne.ns).forEach(function(l){var f=ne.ns[l];N(T,"onclosenamespace",{prefix:l,uri:f})})}S===0&&(T.closedRoot=!0),T.tagName=T.attribValue=T.attribName="",T.attribList.length=0,T.state=C.TEXT}function $(T){var S=T.entity,H=S.toLowerCase(),U,D="";return T.ENTITIES[S]?T.ENTITIES[S]:T.ENTITIES[H]?T.ENTITIES[H]:(S=H,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),U=parseInt(S,16),D=U.toString(16)):(S=S.slice(1),U=parseInt(S,10),D=U.toString(10))),S=S.replace(/^0+/,""),isNaN(U)||D.toLowerCase()!==S?(G(T,"Invalid character entity"),"&"+T.entity+";"):String.fromCodePoint(U))}function te(T,S){S==="<"?(T.state=C.OPEN_WAKA,T.startTagPosition=T.position):I(S)||(G(T,"Non-whitespace before first tag."),T.textNode=S,T.state=C.TEXT)}function ie(T,S){var H="";return S"?(N(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=C.TEXT):(F(U)&&(S.state=C.SGML_DECL_QUOTED),S.sgmlDecl+=U);continue;case C.SGML_DECL_QUOTED:U===S.q&&(S.state=C.SGML_DECL,S.q=""),S.sgmlDecl+=U;continue;case C.DOCTYPE:U===">"?(S.state=C.TEXT,N(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=U,U==="["?S.state=C.DOCTYPE_DTD:F(U)&&(S.state=C.DOCTYPE_QUOTED,S.q=U));continue;case C.DOCTYPE_QUOTED:S.doctype+=U,U===S.q&&(S.q="",S.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:S.doctype+=U,U==="]"?S.state=C.DOCTYPE:F(U)&&(S.state=C.DOCTYPE_DTD_QUOTED,S.q=U);continue;case C.DOCTYPE_DTD_QUOTED:S.doctype+=U,U===S.q&&(S.state=C.DOCTYPE_DTD,S.q="");continue;case C.COMMENT:U==="-"?S.state=C.COMMENT_ENDING:S.comment+=U;continue;case C.COMMENT_ENDING:U==="-"?(S.state=C.COMMENT_ENDED,S.comment=x(S.opt,S.comment),S.comment&&N(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+U,S.state=C.COMMENT);continue;case C.COMMENT_ENDED:U!==">"?(G(S,"Malformed comment"),S.comment+="--"+U,S.state=C.COMMENT):S.state=C.TEXT;continue;case C.CDATA:U==="]"?S.state=C.CDATA_ENDING:S.cdata+=U;continue;case C.CDATA_ENDING:U==="]"?S.state=C.CDATA_ENDING_2:(S.cdata+="]"+U,S.state=C.CDATA);continue;case C.CDATA_ENDING_2:U===">"?(S.cdata&&N(S,"oncdata",S.cdata),N(S,"onclosecdata"),S.cdata="",S.state=C.TEXT):U==="]"?S.cdata+="]":(S.cdata+="]]"+U,S.state=C.CDATA);continue;case C.PROC_INST:U==="?"?S.state=C.PROC_INST_ENDING:I(U)?S.state=C.PROC_INST_BODY:S.procInstName+=U;continue;case C.PROC_INST_BODY:if(!S.procInstBody&&I(U))continue;U==="?"?S.state=C.PROC_INST_ENDING:S.procInstBody+=U;continue;case C.PROC_INST_ENDING:U===">"?(N(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=C.TEXT):(S.procInstBody+="?"+U,S.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:M(p,U)?S.tagName+=U:(me(S),U===">"?j(S):U==="/"?S.state=C.OPEN_TAG_SLASH:(I(U)||G(S,"Invalid character in tag name"),S.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:U===">"?(j(S,!0),R(S)):(G(S,"Forward-slash in opening tag not followed by >"),S.state=C.ATTRIB);continue;case C.ATTRIB:if(I(U))continue;U===">"?j(S):U==="/"?S.state=C.OPEN_TAG_SLASH:M(b,U)?(S.attribName=U,S.attribValue="",S.state=C.ATTRIB_NAME):G(S,"Invalid attribute name");continue;case C.ATTRIB_NAME:U==="="?S.state=C.ATTRIB_VALUE:U===">"?(G(S,"Attribute without value"),S.attribValue=S.attribName,he(S),j(S)):I(U)?S.state=C.ATTRIB_NAME_SAW_WHITE:M(p,U)?S.attribName+=U:G(S,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if(U==="=")S.state=C.ATTRIB_VALUE;else{if(I(U))continue;G(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",N(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",U===">"?j(S):M(b,U)?(S.attribName=U,S.state=C.ATTRIB_NAME):(G(S,"Invalid attribute name"),S.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(I(U))continue;F(U)?(S.q=U,S.state=C.ATTRIB_VALUE_QUOTED):(G(S,"Unquoted attribute value"),S.state=C.ATTRIB_VALUE_UNQUOTED,S.attribValue=U);continue;case C.ATTRIB_VALUE_QUOTED:if(U!==S.q){U==="&"?S.state=C.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=U;continue}he(S),S.q="",S.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:I(U)?S.state=C.ATTRIB:U===">"?j(S):U==="/"?S.state=C.OPEN_TAG_SLASH:M(b,U)?(G(S,"No whitespace between attributes"),S.attribName=U,S.attribValue="",S.state=C.ATTRIB_NAME):G(S,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!K(U)){U==="&"?S.state=C.ATTRIB_VALUE_ENTITY_U:S.attribValue+=U;continue}he(S),U===">"?j(S):S.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(S.tagName)U===">"?R(S):M(p,U)?S.tagName+=U:S.script?(S.script+=""?R(S):G(S,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var ne,v;switch(S.state){case C.TEXT_ENTITY:ne=C.TEXT,v="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:ne=C.ATTRIB_VALUE_QUOTED,v="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:ne=C.ATTRIB_VALUE_UNQUOTED,v="attribValue";break}U===";"?(S[v]+=$(S),S.entity="",S.state=ne):M(S.entity.length?k:_,U)?S.entity+=U:(G(S,"Invalid character in entity name"),S[v]+="&"+S.entity+U,S.entity="",S.state=ne);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&i(S),S}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var T=String.fromCharCode,S=Math.floor,H=function(){var U=16384,D=[],O,ne,v=-1,ee=arguments.length;if(!ee)return"";for(var A="";++v1114111||S(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?D.push(l):(l-=65536,O=(l>>10)+55296,ne=l%1024+56320,D.push(O,ne)),(v+1===ee||D.length>U)&&(A+=T.apply(null,D),D.length=0)}return A};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:H,configurable:!0,writable:!0}):String.fromCodePoint=H}()})(r)})(ml);var ya={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}},Ud=ya.isArray,ba={copyOptions:function(r){var e,t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t},ensureFlagExists:function(r,e){(!(r in e)||typeof e[r]!="boolean")&&(e[r]=!1)},ensureSpacesExists:function(r){(!("spaces"in r)||typeof r.spaces!="number"&&typeof r.spaces!="string")&&(r.spaces=0)},ensureAlwaysArrayExists:function(r){(!("alwaysArray"in r)||typeof r.alwaysArray!="boolean"&&!Ud(r.alwaysArray))&&(r.alwaysArray=!1)},ensureKeyExists:function(r,e){(!(r+"Key"in e)||typeof e[r+"Key"]!="string")&&(e[r+"Key"]=e.compact?"_"+r:r)},checkFnExists:function(r,e){return r+"Fn"in e}},zd=ml,Ye=ba,dn=ya.isArray,le,Me;function jd(r){return le=Ye.copyOptions(r),Ye.ensureFlagExists("ignoreDeclaration",le),Ye.ensureFlagExists("ignoreInstruction",le),Ye.ensureFlagExists("ignoreAttributes",le),Ye.ensureFlagExists("ignoreText",le),Ye.ensureFlagExists("ignoreComment",le),Ye.ensureFlagExists("ignoreCdata",le),Ye.ensureFlagExists("ignoreDoctype",le),Ye.ensureFlagExists("compact",le),Ye.ensureFlagExists("alwaysChildren",le),Ye.ensureFlagExists("addParent",le),Ye.ensureFlagExists("trim",le),Ye.ensureFlagExists("nativeType",le),Ye.ensureFlagExists("nativeTypeAttributes",le),Ye.ensureFlagExists("sanitize",le),Ye.ensureFlagExists("instructionHasAttributes",le),Ye.ensureFlagExists("captureSpacesBetweenElements",le),Ye.ensureAlwaysArrayExists(le),Ye.ensureKeyExists("declaration",le),Ye.ensureKeyExists("instruction",le),Ye.ensureKeyExists("attributes",le),Ye.ensureKeyExists("text",le),Ye.ensureKeyExists("comment",le),Ye.ensureKeyExists("cdata",le),Ye.ensureKeyExists("doctype",le),Ye.ensureKeyExists("type",le),Ye.ensureKeyExists("name",le),Ye.ensureKeyExists("elements",le),Ye.ensureKeyExists("parent",le),le}function zl(r){var e=Number(r);if(!isNaN(e))return e;var t=r.toLowerCase();return t==="true"?!0:t==="false"?!1:r}function ti(r,e){var t;if(le.compact){if(!Me[le[r+"Key"]]&&(dn(le.alwaysArray)?le.alwaysArray.indexOf(le[r+"Key"])!==-1:le.alwaysArray)&&(Me[le[r+"Key"]]=[]),Me[le[r+"Key"]]&&!dn(Me[le[r+"Key"]])&&(Me[le[r+"Key"]]=[Me[le[r+"Key"]]]),r+"Fn"in le&&typeof e=="string"&&(e=le[r+"Fn"](e,Me)),r==="instruction"&&("instructionFn"in le||"instructionNameFn"in le)){for(t in e)if(e.hasOwnProperty(t))if("instructionFn"in le)e[t]=le.instructionFn(e[t],t,Me);else{var n=e[t];delete e[t],e[le.instructionNameFn(t,n,Me)]=n}}dn(Me[le[r+"Key"]])?Me[le[r+"Key"]].push(e):Me[le[r+"Key"]]=e}else{Me[le.elementsKey]||(Me[le.elementsKey]=[]);var i={};if(i[le.typeKey]=r,r==="instruction"){for(t in e)if(e.hasOwnProperty(t))break;i[le.nameKey]="instructionNameFn"in le?le.instructionNameFn(t,e,Me):t,le.instructionHasAttributes?(i[le.attributesKey]=e[t][le.attributesKey],"instructionFn"in le&&(i[le.attributesKey]=le.instructionFn(i[le.attributesKey],t,Me))):("instructionFn"in le&&(e[t]=le.instructionFn(e[t],t,Me)),i[le.instructionKey]=e[t])}else r+"Fn"in le&&(e=le[r+"Fn"](e,Me)),i[le[r+"Key"]]=e;le.addParent&&(i[le.parentKey]=Me),Me[le.elementsKey].push(i)}}function jl(r){if("attributesFn"in le&&r&&(r=le.attributesFn(r,Me)),(le.trim||"attributeValueFn"in le||"attributeNameFn"in le||le.nativeTypeAttributes)&&r){var e;for(e in r)if(r.hasOwnProperty(e)&&(le.trim&&(r[e]=r[e].trim()),le.nativeTypeAttributes&&(r[e]=zl(r[e])),"attributeValueFn"in le&&(r[e]=le.attributeValueFn(r[e],e,Me)),"attributeNameFn"in le)){var t=r[e];delete r[e],r[le.attributeNameFn(e,r[e],Me)]=t}}return r}function Hd(r){var e={};if(r.body&&(r.name.toLowerCase()==="xml"||le.instructionHasAttributes)){for(var t=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=t.exec(r.body))!==null;)e[n[1]]=n[2]||n[3]||n[4];e=jl(e)}if(r.name.toLowerCase()==="xml"){if(le.ignoreDeclaration)return;Me[le.declarationKey]={},Object.keys(e).length&&(Me[le.declarationKey][le.attributesKey]=e),le.addParent&&(Me[le.declarationKey][le.parentKey]=Me)}else{if(le.ignoreInstruction)return;le.trim&&(r.body=r.body.trim());var i={};le.instructionHasAttributes&&Object.keys(e).length?(i[r.name]={},i[r.name][le.attributesKey]=e):i[r.name]=r.body,ti("instruction",i)}}function Wd(r,e){var t;if(typeof r=="object"&&(e=r.attributes,r=r.name),e=jl(e),"elementNameFn"in le&&(r=le.elementNameFn(r,Me)),le.compact){if(t={},!le.ignoreAttributes&&e&&Object.keys(e).length){t[le.attributesKey]={};var n;for(n in e)e.hasOwnProperty(n)&&(t[le.attributesKey][n]=e[n])}!(r in Me)&&(dn(le.alwaysArray)?le.alwaysArray.indexOf(r)!==-1:le.alwaysArray)&&(Me[r]=[]),Me[r]&&!dn(Me[r])&&(Me[r]=[Me[r]]),dn(Me[r])?Me[r].push(t):Me[r]=t}else Me[le.elementsKey]||(Me[le.elementsKey]=[]),t={},t[le.typeKey]="element",t[le.nameKey]=r,!le.ignoreAttributes&&e&&Object.keys(e).length&&(t[le.attributesKey]=e),le.alwaysChildren&&(t[le.elementsKey]=[]),Me[le.elementsKey].push(t);t[le.parentKey]=Me,Me=t}function Gd(r){le.ignoreText||!r.trim()&&!le.captureSpacesBetweenElements||(le.trim&&(r=r.trim()),le.nativeType&&(r=zl(r)),le.sanitize&&(r=r.replace(/&/g,"&").replace(//g,">")),ti("text",r))}function Vd(r){le.ignoreComment||(le.trim&&(r=r.trim()),ti("comment",r))}function Kd(r){var e=Me[le.parentKey];le.addParent||delete Me[le.parentKey],Me=e}function qd(r){le.ignoreCdata||(le.trim&&(r=r.trim()),ti("cdata",r))}function Xd(r){le.ignoreDoctype||(r=r.replace(/^ /,""),le.trim&&(r=r.trim()),ti("doctype",r))}function Zd(r){r.note=r}var Hl=function(r,e){var t=zd.parser(!0,{}),n={};if(Me=n,le=jd(e),t.opt={strictEntities:!0},t.onopentag=Wd,t.ontext=Gd,t.oncomment=Vd,t.onclosetag=Kd,t.onerror=Zd,t.oncdata=qd,t.ondoctype=Xd,t.onprocessinginstruction=Hd,t.write(r).close(),n[le.elementsKey]){var i=n[le.elementsKey];delete n[le.elementsKey],n[le.elementsKey]=i,delete n.text}return n},Su=ba,Yd=Hl;function Jd(r){var e=Su.copyOptions(r);return Su.ensureSpacesExists(e),e}var Qd=function(r,e){var t,n,i,s;return t=Jd(e),n=Yd(r,t),s="compact"in t&&t.compact?"_parent":"parent","addParent"in t&&t.addParent?i=JSON.stringify(n,function(a,o){return a===s?"_":o},t.spaces):i=JSON.stringify(n,null,t.spaces),i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},at=ba,$d=ya.isArray,Ft,Bt;function ep(r){var e=at.copyOptions(r);return at.ensureFlagExists("ignoreDeclaration",e),at.ensureFlagExists("ignoreInstruction",e),at.ensureFlagExists("ignoreAttributes",e),at.ensureFlagExists("ignoreText",e),at.ensureFlagExists("ignoreComment",e),at.ensureFlagExists("ignoreCdata",e),at.ensureFlagExists("ignoreDoctype",e),at.ensureFlagExists("compact",e),at.ensureFlagExists("indentText",e),at.ensureFlagExists("indentCdata",e),at.ensureFlagExists("indentAttributes",e),at.ensureFlagExists("indentInstruction",e),at.ensureFlagExists("fullTagEmptyElement",e),at.ensureFlagExists("noQuotesForNativeAttributes",e),at.ensureSpacesExists(e),typeof e.spaces=="number"&&(e.spaces=Array(e.spaces+1).join(" ")),at.ensureKeyExists("declaration",e),at.ensureKeyExists("instruction",e),at.ensureKeyExists("attributes",e),at.ensureKeyExists("text",e),at.ensureKeyExists("comment",e),at.ensureKeyExists("cdata",e),at.ensureKeyExists("doctype",e),at.ensureKeyExists("type",e),at.ensureKeyExists("name",e),at.ensureKeyExists("elements",e),e}function Ar(r,e,t){return(!t&&r.spaces?` +`:"")+Array(e+1).join(r.spaces)}function Wi(r,e,t){if(e.ignoreAttributes)return"";"attributesFn"in e&&(r=e.attributesFn(r,Bt,Ft));var n,i,s,a,o=[];for(n in r)r.hasOwnProperty(n)&&r[n]!==null&&r[n]!==void 0&&(a=e.noQuotesForNativeAttributes&&typeof r[n]!="string"?"":'"',i=""+r[n],i=i.replace(/"/g,"""),s="attributeNameFn"in e?e.attributeNameFn(n,i,Bt,Ft):n,o.push(e.spaces&&e.indentAttributes?Ar(e,t+1,!1):" "),o.push(s+"="+a+("attributeValueFn"in e?e.attributeValueFn(i,n,Bt,Ft):i)+a));return r&&Object.keys(r).length&&e.spaces&&e.indentAttributes&&o.push(Ar(e,t,!1)),o.join("")}function Wl(r,e,t){return Ft=r,Bt="xml",e.ignoreDeclaration?"":""}function Gl(r,e,t){if(e.ignoreInstruction)return"";var n;for(n in r)if(r.hasOwnProperty(n))break;var i="instructionNameFn"in e?e.instructionNameFn(n,r[n],Bt,Ft):n;if(typeof r[n]=="object")return Ft=r,Bt=i,"";var s=r[n]?r[n]:"";return"instructionFn"in e&&(s=e.instructionFn(s,n,Bt,Ft)),""}function Vl(r,e){return e.ignoreComment?"":""}function Kl(r,e){return e.ignoreCdata?"":"","]]]]>"))+"]]>"}function ql(r,e){return e.ignoreDoctype?"":""}function _a(r,e){return e.ignoreText?"":(r=""+r,r=r.replace(/&/g,"&"),r=r.replace(/&/g,"&").replace(//g,">"),"textFn"in e?e.textFn(r,Bt,Ft):r)}function tp(r,e){var t;if(r.elements&&r.elements.length)for(t=0;t"),r[e.elementsKey]&&r[e.elementsKey].length&&(n.push(Xl(r[e.elementsKey],e,t+1)),Ft=r,Bt=r.name),n.push(e.spaces&&tp(r,e)?` +`+Array(t+1).join(e.spaces):""),n.push("")):n.push("/>"),n.join("")}function Xl(r,e,t,n){return r.reduce(function(i,s){var a=Ar(e,t,n&&!i);switch(s.type){case"element":return i+a+rp(s,e,t);case"comment":return i+a+Vl(s[e.commentKey],e);case"doctype":return i+a+ql(s[e.doctypeKey],e);case"cdata":return i+(e.indentCdata?a:"")+Kl(s[e.cdataKey],e);case"text":return i+(e.indentText?a:"")+_a(s[e.textKey],e);case"instruction":var o={};return o[s[e.nameKey]]=s[e.attributesKey]?s:s[e.instructionKey],i+(e.indentInstruction?a:"")+Gl(o,e,t)}},"")}function Zl(r,e,t){var n;for(n in r)if(r.hasOwnProperty(n))switch(n){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||t)return!0;break;case e.cdataKey:if(e.indentCdata||t)return!0;break;case e.instructionKey:if(e.indentInstruction||t)return!0;break;case e.doctypeKey:case e.commentKey:return!0;default:return!0}return!1}function np(r,e,t,n,i){Ft=r,Bt=e;var s="elementNameFn"in t?t.elementNameFn(e,r):e;if(typeof r>"u"||r===null||r==="")return"fullTagEmptyElementFn"in t&&t.fullTagEmptyElementFn(e,r)||t.fullTagEmptyElement?"<"+s+">":"<"+s+"/>";var a=[];if(e){if(a.push("<"+s),typeof r!="object")return a.push(">"+_a(r,t)+""),a.join("");r[t.attributesKey]&&a.push(Wi(r[t.attributesKey],t,n));var o=Zl(r,t,!0)||r[t.attributesKey]&&r[t.attributesKey]["xml:space"]==="preserve";if(o||("fullTagEmptyElementFn"in t?o=t.fullTagEmptyElementFn(e,r):o=t.fullTagEmptyElement),o)a.push(">");else return a.push("/>"),a.join("")}return a.push(Yl(r,t,n+1,!1)),Ft=r,Bt=e,e&&a.push((i?Ar(t,n,!1):"")+""),a.join("")}function Yl(r,e,t,n){var i,s,a,o=[];for(s in r)if(r.hasOwnProperty(s))for(a=$d(r[s])?r[s]:[r[s]],i=0;i{switch(r.type){case void 0:case"element":const e=new fp(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=va(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class cp extends Le{}class fp extends _e{static fromXmlString(e){const t=Ql.xml2js(e,{compact:!1});return va(t)}constructor(e,t){super(e),t&&this.root.push(new cp(t))}push(e){this.root.push(e)}}class hp extends _e{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class $l extends _e{constructor(e,t){super(e),t&&(this.root=t.root)}}const Kt=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},Gi=r=>{const e=Kt(r);if(e<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return e},ec=(r,e)=>{const t=e*2;if(r.length!==t||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${t} digit hex value`);return r},Tu=r=>ec(r,1),tc=r=>{const e=r.slice(-2),t=r.substring(0,r.length-2);return`${Number(t)}${e}`},rc=r=>{const e=tc(r);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},wn=r=>{if(r==="auto")return r;const e=r.charAt(0)==="#"?r.substring(1):r;return ec(e,3)},Qr=r=>typeof r=="string"?tc(r):Kt(r),dp=r=>typeof r=="string"?rc(r):Gi(r),cr=r=>typeof r=="string"?rc(r):Gi(r),pp=Gi,mp=Gi,gp=r=>r.toISOString();class ve extends _e{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new bt({val:t}))}}class Vs extends _e{constructor(e,t){super(e),this.root.push(new bt({val:dp(t)}))}}class pn extends _e{constructor(e,t){super(e),this.root.push(new bt({val:t}))}}const Xn=(r,e)=>new zr({name:r,attributes:{value:{key:"w:val",value:e}}});class Ea extends _e{constructor(e,t){super(e),this.root.push(new bt({val:t}))}}class Xr extends _e{constructor(e,t){super(e),this.root.push(t)}}class zr extends _e{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new ei(t)),n&&this.root.push(...n)}}const Er={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"};class wp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class yp extends _e{constructor(e){super("w:jc"),this.root.push(new wp({val:e}))}}class gt extends _e{constructor(e,{color:t,size:n,space:i,style:s}){super(e),this.root.push(new bp({style:s,color:t===void 0?void 0:wn(t),size:n===void 0?void 0:pp(n),space:i===void 0?void 0:mp(i)}))}}class bp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const Sa={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class _p extends zi{constructor(e){super("w:pBdr"),e.top&&this.root.push(new gt("w:top",e.top)),e.bottom&&this.root.push(new gt("w:bottom",e.bottom)),e.left&&this.root.push(new gt("w:left",e.left)),e.right&&this.root.push(new gt("w:right",e.right))}}class vp extends _e{constructor(){super("w:pBdr");const e=new gt("w:bottom",{color:"auto",space:1,style:Sa.SINGLE,size:6});this.root.push(e)}}class Ep extends _e{constructor({start:e,end:t,left:n,right:i,hanging:s,firstLine:a}){super("w:ind"),this.root.push(new ei({start:{key:"w:start",value:e===void 0?void 0:Qr(e)},end:{key:"w:end",value:t===void 0?void 0:Qr(t)},left:{key:"w:left",value:n===void 0?void 0:Qr(n)},right:{key:"w:right",value:i===void 0?void 0:Qr(i)},hanging:{key:"w:hanging",value:s===void 0?void 0:cr(s)},firstLine:{key:"w:firstLine",value:a===void 0?void 0:cr(a)}}))}}let Sp=class extends _e{constructor(){super("w:br")}};const Ta={BEGIN:"begin",END:"end",SEPARATE:"separate"};class Aa extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class Si extends _e{constructor(e){super("w:fldChar"),this.root.push(new Aa({type:Ta.BEGIN,dirty:e}))}}class Ti extends _e{constructor(e){super("w:fldChar"),this.root.push(new Aa({type:Ta.SEPARATE,dirty:e}))}}class Ai extends _e{constructor(e){super("w:fldChar"),this.root.push(new Aa({type:Ta.END,dirty:e}))}}const yn={DEFAULT:"default",PRESERVE:"preserve"};class bn extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{space:"xml:space"})}}let Tp=class extends _e{constructor(){super("w:instrText"),this.root.push(new bn({space:yn.PRESERVE})),this.root.push("PAGE")}};class Ap extends _e{constructor(){super("w:instrText"),this.root.push(new bn({space:yn.PRESERVE})),this.root.push("NUMPAGES")}}class kp extends _e{constructor(){super("w:instrText"),this.root.push(new bn({space:yn.PRESERVE})),this.root.push("SECTIONPAGES")}}class xp extends _e{constructor(){super("w:instrText"),this.root.push(new bn({space:yn.PRESERVE})),this.root.push("SECTION")}}class Cp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class nc extends _e{constructor({fill:e,color:t,type:n}){super("w:shd"),this.root.push(new Cp({fill:e===void 0?void 0:wn(e),color:t===void 0?void 0:wn(t),type:n}))}}class Rp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const Ip={DOT:"dot"};class Dp extends _e{constructor(e){super("w:em"),this.root.push(new bt({val:e}))}}class Np extends Dp{constructor(e=Ip.DOT){super(e)}}class Op extends _e{constructor(e){super("w:spacing"),this.root.push(new bt({val:Qr(e)}))}}class Fp extends _e{constructor(e){super("w:color"),this.root.push(new bt({val:wn(e)}))}}class Bp extends _e{constructor(e){super("w:highlight"),this.root.push(new bt({val:e}))}}class Pp extends _e{constructor(e){super("w:highlightCs"),this.root.push(new bt({val:e}))}}const Lp=r=>new zr({name:"w:lang",attributes:{value:{key:"w:val",value:r.value},eastAsia:{key:"w:eastAsia",value:r.eastAsia},bidirectional:{key:"w:bidi",value:r.bidirectional}}});class Au extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class Ks extends _e{constructor(e,t){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new Au({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:t}))}else{const n=e;this.root.push(new Au(n))}}}let ic=class extends _e{constructor(e){super("w:vertAlign"),this.root.push(new bt({val:e}))}};class Mp extends ic{constructor(){super("superscript")}}class Up extends ic{constructor(){super("subscript")}}const sc={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"};class zp extends _e{constructor(e=sc.SINGLE,t){super("w:u"),this.root.push(new bt({val:e,color:t===void 0?void 0:wn(t)}))}}class sn extends zi{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.noProof!==void 0&&this.push(new ve("w:noProof",e.noProof)),e.bold!==void 0&&this.push(new ve("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new ve("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new ve("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new ve("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.underline&&this.push(new zp(e.underline.type,e.underline.color)),e.effect&&this.push(new pn("w:effect",e.effect)),e.emphasisMark&&this.push(new Np(e.emphasisMark.type)),e.color&&this.push(new Fp(e.color)),e.kern&&this.push(new Vs("w:kern",e.kern)),e.position&&this.push(new pn("w:position",e.position)),e.size!==void 0&&this.push(new Vs("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new Vs("w:szCs",i)),e.rightToLeft!==void 0&&this.push(new ve("w:rtl",e.rightToLeft)),e.smallCaps!==void 0?this.push(new ve("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new ve("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new ve("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new ve("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new Up),e.superScript&&this.push(new Mp),e.style&&this.push(new pn("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new Ks(e.font)):"name"in e.font?this.push(new Ks(e.font.name,e.font.hint)):this.push(new Ks(e.font))),e.highlight&&this.push(new Bp(e.highlight));const s=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;s&&this.push(new Pp(s)),e.characterSpacing&&this.push(new Op(e.characterSpacing)),e.emboss!==void 0&&this.push(new ve("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new ve("w:imprint",e.imprint)),e.shading&&this.push(new nc(e.shading)),e.revision&&this.push(new jp(e.revision)),e.border&&this.push(new gt("w:bdr",e.border)),e.snapToGrid!==void 0&&this.push(new ve("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new ve("w:vanish",e.vanish)),e.specVanish&&this.push(new ve("w:specVanish",e.vanish)),e.scale!==void 0&&this.push(new Ea("w:w",e.scale)),e.language&&this.push(Lp(e.language)),e.math&&this.push(new ve("w:oMath",e.math))}push(e){this.root.push(e)}}class jp extends _e{constructor(e){super("w:rPrChange"),this.root.push(new Rp({id:e.id,author:e.author,date:e.date})),this.addChildElement(new sn(e))}}class na extends _e{constructor(e){var t;return super("w:t"),typeof e=="string"?(this.root.push(new bn({space:yn.PRESERVE})),this.root.push(e),this):(this.root.push(new bn({space:(t=e.space)!=null?t:yn.DEFAULT})),this.root.push(e.text),this)}}const ki={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class Vi extends _e{constructor(e){if(super("w:r"),we(this,"properties"),this.properties=new sn(e),this.root.push(this.properties),e.break)for(let t=0;t(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},Gp=(r=21)=>{let e="",t=r;for(;t--;)e+=Hp[Math.random()*64|0];return e};const lr=r=>Math.floor(r*72*20),ka=(r=0)=>{let e=r;return()=>++e},Vp=()=>ka(),Kp=()=>ka(1),qp=()=>ka(),Xp=()=>Gp().toLowerCase(),Zn=r=>Wp("1234567890abcdef",r)(),Zp=()=>`${Zn(8)}-${Zn(4)}-${Zn(4)}-${Zn(4)}-${Zn(12)}`;class Yp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Jp extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Qp extends _e{constructor({id:e,initials:t,author:n,date:i=new Date,children:s}){super("w:comment"),this.root.push(new Yp({id:e,initials:t,author:n,date:i.toISOString()}));for(const a of s)this.root.push(a)}}class $p extends _e{constructor({children:e}){super("w:comments"),this.root.push(new Jp({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new Qp(t))}}class em extends _e{constructor(){super("w:pageBreakBefore")}}const ia={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"};class tm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"})}}class rm extends _e{constructor(e){super("w:spacing"),this.root.push(new tm(e))}}const Zr={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"};let xi=class extends _e{constructor(e){super("w:pStyle"),this.root.push(new bt({val:e}))}};class nm extends _e{constructor(e){super("w:tabs");for(const t of e)this.root.push(new sm(t))}}const ku={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"};class im extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class sm extends _e{constructor({type:e,position:t,leader:n}){super("w:tab"),this.root.push(new im({val:e,pos:t,leader:n}))}}class xu extends _e{constructor(e,t){super("w:numPr"),this.root.push(new am(t)),this.root.push(new om(e))}}class am extends _e{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new bt({val:e}))}}class om extends _e{constructor(e){super("w:numId"),this.root.push(new bt({val:typeof e=="string"?`{${e}}`:e}))}}class um extends _e{constructor(){super(...arguments),we(this,"fileChild",Symbol())}}class lm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const cm={EXTERNAL:"External"};class fm extends _e{constructor(e,t,n,i){super("Relationship"),this.root.push(new lm({id:e,type:t,target:n,targetMode:i}))}}class hm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class dm extends _e{constructor(e,t,n){super("w:hyperlink"),we(this,"linkId"),this.linkId=t;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},s=new hm(i);this.root.push(s),e.forEach(a=>{this.root.push(a)})}}class pm extends _e{constructor(e){super("w:externalHyperlink"),this.options=e}}class mm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class gm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{id:"w:id"})}}class wm{constructor(e){we(this,"bookmarkUniqueNumericId",qp()),we(this,"start"),we(this,"children"),we(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new ym(e.id,t),this.children=e.children,this.end=new bm(t)}}class ym extends _e{constructor(e,t){super("w:bookmarkStart");const n=new mm({name:e,id:t});this.root.push(n)}}class bm extends _e{constructor(e){super("w:bookmarkEnd");const t=new gm({id:e});this.root.push(t)}}class _m extends _e{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new bt({val:e}))}}class vm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{verticalAlign:"w:val"})}}class Em extends _e{constructor(e){super("w:vAlign"),this.root.push(new vm({verticalAlign:e}))}}const mn={DEFAULT:"default",FIRST:"first",EVEN:"even"};class Sm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const Cu={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class qs extends _e{constructor(e,t){super(e),this.root.push(new Sm({type:t.type||mn.DEFAULT,id:`rId${t.id}`}))}}class Tm extends _e{constructor({space:e,count:t,separate:n,equalWidth:i,children:s}){super("w:cols"),this.root.push(new ei({space:{key:"w:space",value:e===void 0?void 0:cr(e)},count:{key:"w:num",value:t===void 0?void 0:Kt(t)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:i}})),!i&&s&&s.forEach(a=>this.addChildElement(a))}}class Am extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"})}}class km extends _e{constructor(e,t,n){super("w:docGrid"),this.root.push(new Am({type:n,linePitch:Kt(e),charSpace:t?Kt(t):void 0}))}}const xm=({countBy:r,start:e,restart:t,distance:n})=>new zr({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:Kt(r)},start:{key:"w:start",value:e===void 0?void 0:Kt(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:cr(n)}}});class Ru extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class Cm extends zi{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new Ru({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Ru({})),e.pageBorderTop&&this.root.push(new gt("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new gt("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new gt("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new gt("w:right",e.pageBorderRight))}}class Rm extends _e{constructor(e,t,n,i,s,a,o){super("w:pgMar"),this.root.push(new ei({top:{key:"w:top",value:Qr(e)},right:{key:"w:right",value:cr(t)},bottom:{key:"w:bottom",value:Qr(n)},left:{key:"w:left",value:cr(i)},header:{key:"w:header",value:cr(s)},footer:{key:"w:footer",value:cr(a)},gutter:{key:"w:gutter",value:cr(o)}}))}}class Im extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class Dm extends _e{constructor({start:e,formatType:t,separator:n}){super("w:pgNumType"),this.root.push(new Im({start:e===void 0?void 0:Kt(e),formatType:t,separator:n}))}}const ac={PORTRAIT:"portrait",LANDSCAPE:"landscape"};class Nm extends _e{constructor(e,t,n){super("w:pgSz");const i=n===ac.LANDSCAPE,s=cr(e),a=cr(t);this.root.push(new ei({width:{key:"w:w",value:i?a:s},height:{key:"w:h",value:i?s:a},orientation:{key:"w:orient",value:n}}))}}class Om extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class Fm extends _e{constructor(e){super("w:textDirection"),this.root.push(new Om({val:e}))}}class Bm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class Pm extends _e{constructor(e){super("w:type"),this.root.push(new Bm({val:e}))}}const Yr={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},Xs={WIDTH:11906,HEIGHT:16838,ORIENTATION:ac.PORTRAIT};class Lm extends _e{constructor({page:{size:{width:e=Xs.WIDTH,height:t=Xs.HEIGHT,orientation:n=Xs.ORIENTATION}={},margin:{top:i=Yr.TOP,right:s=Yr.RIGHT,bottom:a=Yr.BOTTOM,left:o=Yr.LEFT,header:u=Yr.HEADER,footer:c=Yr.FOOTER,gutter:h=Yr.GUTTER}={},pageNumbers:m={},borders:w,textDirection:d}={},grid:{linePitch:y=360,charSpace:g,type:b}={},headerWrapperGroup:p={},footerWrapperGroup:_={},lineNumbers:k,titlePage:I,verticalAlign:F,column:K,type:M}={}){super("w:sectPr"),this.addHeaderFooterGroup(Cu.HEADER,p),this.addHeaderFooterGroup(Cu.FOOTER,_),M&&this.root.push(new Pm(M)),this.root.push(new Nm(e,t,n)),this.root.push(new Rm(i,s,a,o,u,c,h)),w&&this.root.push(new Cm(w)),k&&this.root.push(xm(k)),this.root.push(new Dm(m)),K&&this.root.push(new Tm(K)),F&&this.root.push(new Em(F)),I!==void 0&&this.root.push(new ve("w:titlePg",I)),d&&this.root.push(new Fm(d)),this.root.push(new km(y,g,b))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new qs(e,{type:mn.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new qs(e,{type:mn.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new qs(e,{type:mn.EVEN,id:t.even.View.ReferenceId}))}}class Mm extends _e{constructor(){super("w:body"),we(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new Lm(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new nr({}),n=new _n({});return n.push(e),t.addChildElement(n),t}}class ri extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",aink:"xmlns:aink",am3d:"xmlns:am3d",w16cex:"xmlns:w16cex",w16cid:"xmlns:w16cid",w16:"xmlns:w16",w16sdtdh:"xmlns:w16sdtdh",w16se:"xmlns:w16se"})}}class Um extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class zm extends _e{constructor(e){super("w:background"),this.root.push(new Um({color:e.color===void 0?void 0:wn(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:Tu(e.themeShade),themeTint:e.themeTint===void 0?void 0:Tu(e.themeTint)}))}}class jm extends _e{constructor(e){super("w:document"),we(this,"body"),this.root.push(new ri({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",Ignorable:"w14 w15 wp14"})),this.body=new Mm,e.background&&this.root.push(new zm(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class Hm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{xmlns:"xmlns"})}}class Sn extends _e{constructor(){super("Relationships"),this.root.push(new Hm({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,t,n,i){const s=new fm(`rId${e}`,t,n,i);return this.root.push(s),s}get RelationshipCount(){return this.root.length-1}}class oc{constructor(e){we(this,"document"),we(this,"relationships"),this.document=new jm(e),this.relationships=new Sn}get View(){return this.document}get Relationships(){return this.relationships}}class Wm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class Gm extends _e{constructor(){super("w:wordWrap"),this.root.push(new Wm({val:0}))}}const Vm=r=>{var e,t;return new zr({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:r.anchorLock},dropCap:{key:"w:dropCap",value:r.dropCap},width:{key:"w:w",value:r.width},height:{key:"w:h",value:r.height},x:{key:"w:x",value:r.position?r.position.x:void 0},y:{key:"w:y",value:r.position?r.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:r.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:r.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=r.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=r.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:r.rule},alignmentX:{key:"w:xAlign",value:r.alignment?r.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:r.alignment?r.alignment.y:void 0},lines:{key:"w:lines",value:r.lines},wrap:{key:"w:wrap",value:r.wrap}}})};class _n extends zi{constructor(e){var t,n;if(super("w:pPr"),we(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(new xi(e.heading)),e.bullet&&this.push(new xi("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(new xi("ListParagraph"))),e.style&&this.push(new xi(e.style)),e.keepNext!==void 0&&this.push(new ve("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new ve("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new em),e.frame&&this.push(Vm(e.frame)),e.widowControl!==void 0&&this.push(new ve("w:widowControl",e.widowControl)),e.bullet&&this.push(new xu(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new xu(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))),e.border&&this.push(new _p(e.border)),e.thematicBreak&&this.push(new vp),e.shading&&this.push(new nc(e.shading)),e.wordWrap&&this.push(new Gm),e.overflowPunctuation&&this.push(new ve("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:ku.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:ku.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(new nm(i)),e.bidirectional!==void 0&&this.push(new ve("w:bidi",e.bidirectional)),e.spacing&&this.push(new rm(e.spacing)),e.indent&&this.push(new Ep(e.indent)),e.contextualSpacing!==void 0&&this.push(new ve("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new yp(e.alignment)),e.outlineLevel!==void 0&&this.push(new _m(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new ve("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new ve("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new sn(e.run))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof oc)for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class nr extends um{constructor(e){if(super("w:p"),we(this,"properties"),typeof e=="string")return this.properties=new _n({}),this.root.push(this.properties),this.root.push(new Li(e)),this;if(this.properties=new _n(e),this.root.push(this.properties),e.text&&this.root.push(new Li(e.text)),e.children)for(const t of e.children){if(t instanceof wm){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof pm){const n=this.root.indexOf(t),i=new dm(t.options.children,Xp());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,cm.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const ln={style:Sa.NONE,size:0,color:"auto"},cn={style:Sa.SINGLE,size:4,color:"auto"};class Km extends _e{constructor(e){super("w:tblBorders"),e.top?this.root.push(new gt("w:top",e.top)):this.root.push(new gt("w:top",cn)),e.left?this.root.push(new gt("w:left",e.left)):this.root.push(new gt("w:left",cn)),e.bottom?this.root.push(new gt("w:bottom",e.bottom)):this.root.push(new gt("w:bottom",cn)),e.right?this.root.push(new gt("w:right",e.right)):this.root.push(new gt("w:right",cn)),e.insideHorizontal?this.root.push(new gt("w:insideH",e.insideHorizontal)):this.root.push(new gt("w:insideH",cn)),e.insideVertical?this.root.push(new gt("w:insideV",e.insideVertical)):this.root.push(new gt("w:insideV",cn))}}we(Km,"NONE",{top:ln,bottom:ln,left:ln,right:ln,insideHorizontal:ln,insideVertical:ln});class qm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Xm extends _e{constructor(){super("Properties"),this.root.push(new qm({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class Zm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{xmlns:"xmlns"})}}class Ym extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Ur extends _e{constructor(e,t){super("Default"),this.root.push(new Ym({contentType:e,extension:t}))}}class Jm extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class rr extends _e{constructor(e,t){super("Override"),this.root.push(new Jm({contentType:e,partName:t}))}}class Qm extends _e{constructor(){super("Types"),this.root.push(new Zm({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Ur("image/png","png")),this.root.push(new Ur("image/jpeg","jpeg")),this.root.push(new Ur("image/jpeg","jpg")),this.root.push(new Ur("image/bmp","bmp")),this.root.push(new Ur("image/gif","gif")),this.root.push(new Ur("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Ur("application/xml","xml")),this.root.push(new Ur("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new rr("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class $m extends _e{constructor(e){super("cp:coreProperties"),this.root.push(new ri({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new Xr("dc:title",e.title)),e.subject&&this.root.push(new Xr("dc:subject",e.subject)),e.creator&&this.root.push(new Xr("dc:creator",e.creator)),e.keywords&&this.root.push(new Xr("cp:keywords",e.keywords)),e.description&&this.root.push(new Xr("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new Xr("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new Xr("cp:revision",String(e.revision))),this.root.push(new Iu("dcterms:created")),this.root.push(new Iu("dcterms:modified"))}}class Iu extends _e{constructor(e){super(e),this.root.push(new ri({type:"dcterms:W3CDTF"})),this.root.push(gp(new Date))}}class e0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class t0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class r0 extends _e{constructor(e,t){super("property"),this.root.push(new t0({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new n0(t.value))}}class n0 extends _e{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class i0 extends _e{constructor(e){super("Properties"),we(this,"nextId"),we(this,"properties",[]),this.root.push(new e0({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new r0(this.nextId++,e))}}class s0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let a0=class extends $l{constructor(e,t){super("w:ftr",t),we(this,"refId"),this.refId=e,t||this.root.push(new s0({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class o0{constructor(e,t,n){we(this,"footer"),we(this,"relationships"),this.media=e,this.footer=new a0(t,n),this.relationships=new Sn}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class u0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class l0 extends _e{constructor(){super("w:footnoteRef")}}class c0 extends Vi{constructor(){super({style:"FootnoteReference"}),this.root.push(new l0)}}const Du={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class Zs extends _e{constructor(e){super("w:footnote"),this.root.push(new u0({type:e.type,id:e.id}));for(let t=0;t9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new E0({ilvl:Kt(e),tentative:1}))}}class R0 extends C0{}class I0 extends _e{constructor(e){super("w:multiLevelType"),this.root.push(new bt({val:e}))}}class D0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class Nu extends _e{constructor(e,t){super("w:abstractNum"),we(this,"id"),this.root.push(new D0({abstractNumId:Kt(e),restartNumberingAfterBreak:0})),this.root.push(new I0("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new R0(n))}}class N0 extends _e{constructor(e){super("w:abstractNumId"),this.root.push(new bt({val:e}))}}class O0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{numId:"w:numId"})}}class Ou extends _e{constructor(e){if(super("w:num"),we(this,"numId"),we(this,"reference"),we(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new O0({numId:Kt(e.numId)})),this.root.push(new N0(Kt(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new B0(t.num,t.start))}}class F0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{ilvl:"w:ilvl"})}}class B0 extends _e{constructor(e,t){super("w:lvlOverride"),this.root.push(new F0({ilvl:e})),t!==void 0&&this.root.push(new L0(t))}}class P0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class L0 extends _e{constructor(e){super("w:startOverride"),this.root.push(new P0({val:e}))}}class M0 extends _e{constructor(e){super("w:numbering"),we(this,"abstractNumberingMap",new Map),we(this,"concreteNumberingMap",new Map),we(this,"referenceConfigMap",new Map),we(this,"abstractNumUniqueNumericId",Vp()),we(this,"concreteNumUniqueNumericId",Kp()),this.root.push(new ri({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const t=new Nu(this.abstractNumUniqueNumericId(),[{level:0,format:Dr.BULLET,text:"●",alignment:Er.LEFT,style:{paragraph:{indent:{left:lr(.5),hanging:lr(.25)}}}},{level:1,format:Dr.BULLET,text:"○",alignment:Er.LEFT,style:{paragraph:{indent:{left:lr(1),hanging:lr(.25)}}}},{level:2,format:Dr.BULLET,text:"■",alignment:Er.LEFT,style:{paragraph:{indent:{left:2160,hanging:lr(.25)}}}},{level:3,format:Dr.BULLET,text:"●",alignment:Er.LEFT,style:{paragraph:{indent:{left:2880,hanging:lr(.25)}}}},{level:4,format:Dr.BULLET,text:"○",alignment:Er.LEFT,style:{paragraph:{indent:{left:3600,hanging:lr(.25)}}}},{level:5,format:Dr.BULLET,text:"■",alignment:Er.LEFT,style:{paragraph:{indent:{left:4320,hanging:lr(.25)}}}},{level:6,format:Dr.BULLET,text:"●",alignment:Er.LEFT,style:{paragraph:{indent:{left:5040,hanging:lr(.25)}}}},{level:7,format:Dr.BULLET,text:"●",alignment:Er.LEFT,style:{paragraph:{indent:{left:5760,hanging:lr(.25)}}}},{level:8,format:Dr.BULLET,text:"●",alignment:Er.LEFT,style:{paragraph:{indent:{left:6480,hanging:lr(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new Ou({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new Nu(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const s=this.referenceConfigMap.get(e),a=s&&s[0].start,o={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[a&&Number.isInteger(a)?{num:0,start:a}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new Ou(o))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class U0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class z0 extends _e{constructor(e){super("w:compatSetting"),this.root.push(new U0({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class j0 extends _e{constructor(e){super("w:compat"),e.version&&this.root.push(new z0(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new ve("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new ve("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new ve("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new ve("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new ve("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new ve("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new ve("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new ve("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new ve("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new ve("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new ve("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new ve("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new ve("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new ve("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new ve("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new ve("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new ve("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new ve("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new ve("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new ve("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new ve("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new ve("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new ve("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new ve("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new ve("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new ve("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new ve("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new ve("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new ve("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new ve("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new ve("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new ve("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new ve("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new ve("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new ve("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new ve("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new ve("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new ve("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new ve("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new ve("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new ve("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new ve("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new ve("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new ve("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new ve("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new ve("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new ve("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new ve("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new ve("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new ve("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new ve("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new ve("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new ve("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new ve("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new ve("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new ve("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new ve("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new ve("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new ve("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new ve("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new ve("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new ve("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new ve("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new ve("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new ve("w:cachedColBalance",e.cachedColumnBalance))}}class H0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class W0 extends _e{constructor(e){var t,n,i,s;super("w:settings"),this.root.push(new H0({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new ve("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new ve("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new ve("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new ve("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new Ea("w:defaultTabStop",e.defaultTabStop)),this.root.push(new j0($n(Ze({},(t=e.compatibility)!=null?t:{}),{version:(s=(i=(n=e.compatibility)==null?void 0:n.version)!=null?i:e.compatibilityModeVersion)!=null?s:15})))}}class uc extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{val:"w:val"})}}class G0 extends _e{constructor(e){super("w:name"),this.root.push(new uc({val:e}))}}class V0 extends _e{constructor(e){super("w:uiPriority"),this.root.push(new uc({val:Kt(e)}))}}class K0 extends Le{constructor(){super(...arguments),we(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class lc extends _e{constructor(e,t){super("w:style"),this.root.push(new K0(e)),t.name&&this.root.push(new G0(t.name)),t.basedOn&&this.root.push(new pn("w:basedOn",t.basedOn)),t.next&&this.root.push(new pn("w:next",t.next)),t.link&&this.root.push(new pn("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new V0(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new ve("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new ve("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new ve("w:qFormat",t.quickFormat))}}class Ki extends lc{constructor(e){super({type:"paragraph",styleId:e.id},e),we(this,"paragraphProperties"),we(this,"runProperties"),this.paragraphProperties=new _n(e.paragraph),this.runProperties=new sn(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class qi extends lc{constructor(e){super({type:"character",styleId:e.id},Ze({uiPriority:99,unhideWhenUsed:!0},e)),we(this,"runProperties"),this.runProperties=new sn(e.run),this.root.push(this.runProperties)}}class jr extends Ki{constructor(e){super(Ze({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class q0 extends jr{constructor(e){super(Ze({id:"Title",name:"Title"},e))}}class X0 extends jr{constructor(e){super(Ze({id:"Heading1",name:"Heading 1"},e))}}class Z0 extends jr{constructor(e){super(Ze({id:"Heading2",name:"Heading 2"},e))}}class Y0 extends jr{constructor(e){super(Ze({id:"Heading3",name:"Heading 3"},e))}}class J0 extends jr{constructor(e){super(Ze({id:"Heading4",name:"Heading 4"},e))}}class Q0 extends jr{constructor(e){super(Ze({id:"Heading5",name:"Heading 5"},e))}}class $0 extends jr{constructor(e){super(Ze({id:"Heading6",name:"Heading 6"},e))}}class eg extends jr{constructor(e){super(Ze({id:"Strong",name:"Strong"},e))}}class tg extends Ki{constructor(e){super(Ze({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class rg extends Ki{constructor(e){super(Ze({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:ia.AUTO}},run:{size:20}},e))}}class ng extends qi{constructor(e){super(Ze({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class ig extends qi{constructor(e){super(Ze({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class sg extends qi{constructor(e){super(Ze({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:sc.SINGLE}}},e))}}class sa extends _e{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new Ki(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new qi(t))}}class ag extends _e{constructor(e){super("w:pPrDefault"),this.root.push(new _n(e))}}class og extends _e{constructor(e){super("w:rPrDefault"),this.root.push(new sn(e))}}class ug extends _e{constructor(e){super("w:docDefaults"),we(this,"runPropertiesDefaults"),we(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new og(e.run),this.paragraphPropertiesDefaults=new ag(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class lg{newInstance(e){const t=Ql.xml2js(e,{compact:!1});let n;for(const a of t.elements||[])a.name==="w:styles"&&(n=a);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return new sa({initialStyles:new hp(n.attributes),importedStyles:i.map(a=>va(a))})}}class Fu{newInstance(e={}){var t;return{initialStyles:new ri({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new ug((t=e.document)!=null?t:{}),new q0(Ze({run:{size:56}},e.title)),new X0(Ze({run:{color:"2E74B5",size:32}},e.heading1)),new Z0(Ze({run:{color:"2E74B5",size:26}},e.heading2)),new Y0(Ze({run:{color:"1F4D78",size:24}},e.heading3)),new J0(Ze({run:{color:"2E74B5",italics:!0}},e.heading4)),new Q0(Ze({run:{color:"2E74B5"}},e.heading5)),new $0(Ze({run:{color:"1F4D78"}},e.heading6)),new eg(Ze({run:{bold:!0}},e.strong)),new tg(e.listParagraph||{}),new sg(e.hyperlink||{}),new ng(e.footnoteReference||{}),new rg(e.footnoteText||{}),new ig(e.footnoteTextChar||{})]}}}const Ci=({id:r,fontKey:e,subsetted:t},n)=>new zr({name:n,attributes:Ze({id:{key:"r:id",value:r}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new ve("w:subsetted",t)]:[]]}),cg=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:s,pitch:a,sig:o,embedRegular:u,embedBold:c,embedItalic:h,embedBoldItalic:m})=>new zr({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...e?[Xn("w:altName",e)]:[],...t?[Xn("w:panose1",t)]:[],...n?[Xn("w:charset",n)]:[],...i?[Xn("w:family",i)]:[],...s?[new ve("w:notTrueType",s)]:[],...a?[Xn("w:pitch",a)]:[],...o?[new zr({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:o.usb0},usb1:{key:"w:usb1",value:o.usb1},usb2:{key:"w:usb2",value:o.usb2},usb3:{key:"w:usb3",value:o.usb3},csb0:{key:"w:csb0",value:o.csb0},csb1:{key:"w:csb1",value:o.csb1}}})]:[],...u?[Ci(u,"w:embedRegular")]:[],...c?[Ci(c,"w:embedBold")]:[],...h?[Ci(h,"w:embedItalic")]:[],...m?[Ci(m,"w:embedBoldItalic")]:[]]}),fg=({name:r,index:e,fontKey:t,characterSet:n})=>cg({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),hg=r=>new zr({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:r.map((e,t)=>fg({name:e.name,index:t+1,fontKey:e.fontKey}))});class dg{constructor(e){we(this,"fontTable"),we(this,"relationships"),we(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>$n(Ze({},t),{fontKey:Zp()})),this.fontTable=hg(this.fontOptionsWithKey),this.relationships=new Sn;for(let t=0;te.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}}function Ri(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var cc={exports:{}};(function(r,e){(function(t){r.exports=t()})(function(){return function t(n,i,s){function a(c,h){if(!i[c]){if(!n[c]){var m=typeof Ri=="function"&&Ri;if(!h&&m)return m(c,!0);if(o)return o(c,!0);var w=new Error("Cannot find module '"+c+"'");throw w.code="MODULE_NOT_FOUND",w}var d=i[c]={exports:{}};n[c][0].call(d.exports,function(y){var g=n[c][1][y];return a(g||y)},d,d.exports,t,n,i,s)}return i[c].exports}for(var o=typeof Ri=="function"&&Ri,u=0;u>2,d=(3&c)<<4|h>>4,y=1>6:64,g=2>4,h=(15&w)<<4|(d=o.indexOf(u.charAt(g++)))>>2,m=(3&d)<<6|(y=o.indexOf(u.charAt(g++))),_[b++]=c,d!==64&&(_[b++]=h),y!==64&&(_[b++]=m);return _}},{"./support":30,"./utils":32}],2:[function(t,n,i){var s=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),u=t("./stream/DataLengthProbe");function c(h,m,w,d,y){this.compressedSize=h,this.uncompressedSize=m,this.crc32=w,this.compression=d,this.compressedContent=y}c.prototype={getContentWorker:function(){var h=new a(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),m=this;return h.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new a(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,m,w){return h.pipe(new o).pipe(new u("uncompressedSize")).pipe(m.compressWorker(w)).pipe(new u("compressedSize")).withStreamInfo("compression",m)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var s=t("./utils"),a=function(){for(var o,u=[],c=0;c<256;c++){o=c;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;u[c]=o}return u}();n.exports=function(o,u){return o!==void 0&&o.length?s.getTypeOf(o)!=="string"?function(c,h,m,w){var d=a,y=w+m;c^=-1;for(var g=w;g>>8^d[255&(c^h[g])];return-1^c}(0|u,o,o.length,0):function(c,h,m,w){var d=a,y=w+m;c^=-1;for(var g=w;g>>8^d[255&(c^h.charCodeAt(g))];return-1^c}(0|u,o,o.length,0):0}},{"./utils":32}],5:[function(t,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,n,i){var s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),u=t("./stream/GenericWorker"),c=s?"uint8array":"array";function h(m,w){u.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=w,this.meta={}}i.magic="\b\0",o.inherits(h,u),h.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,m.data),!1)},h.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(w){m.push({data:w,meta:m.meta})}},i.compressWorker=function(m){return new h("Deflate",m)},i.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,i){function s(d,y){var g,b="";for(g=0;g>>=8;return b}function a(d,y,g,b,p,_){var k,I,F=d.file,K=d.compression,M=_!==c.utf8encode,Y=o.transformTo("string",_(F.name)),C=o.transformTo("string",c.utf8encode(F.name)),oe=F.comment,Z=o.transformTo("string",_(oe)),N=o.transformTo("string",c.utf8encode(oe)),Q=C.length!==F.name.length,x=N.length!==oe.length,W="",ce="",G="",me=F.dir,X=F.date,he={crc32:0,compressedSize:0,uncompressedSize:0};y&&!g||(he.crc32=d.crc32,he.compressedSize=d.compressedSize,he.uncompressedSize=d.uncompressedSize);var j=0;y&&(j|=8),M||!Q&&!x||(j|=2048);var R=0,$=0;me&&(R|=16),p==="UNIX"?($=798,R|=function(ie,L){var T=ie;return ie||(T=L?16893:33204),(65535&T)<<16}(F.unixPermissions,me)):($=20,R|=function(ie){return 63&(ie||0)}(F.dosPermissions)),k=X.getUTCHours(),k<<=6,k|=X.getUTCMinutes(),k<<=5,k|=X.getUTCSeconds()/2,I=X.getUTCFullYear()-1980,I<<=4,I|=X.getUTCMonth()+1,I<<=5,I|=X.getUTCDate(),Q&&(ce=s(1,1)+s(h(Y),4)+C,W+="up"+s(ce.length,2)+ce),x&&(G=s(1,1)+s(h(Z),4)+N,W+="uc"+s(G.length,2)+G);var te="";return te+=` +\0`,te+=s(j,2),te+=K.magic,te+=s(k,2),te+=s(I,2),te+=s(he.crc32,4),te+=s(he.compressedSize,4),te+=s(he.uncompressedSize,4),te+=s(Y.length,2),te+=s(W.length,2),{fileRecord:m.LOCAL_FILE_HEADER+te+Y+W,dirRecord:m.CENTRAL_FILE_HEADER+s($,2)+te+s(Z.length,2)+"\0\0\0\0"+s(R,4)+s(b,4)+Y+W+Z}}var o=t("../utils"),u=t("../stream/GenericWorker"),c=t("../utf8"),h=t("../crc32"),m=t("../signature");function w(d,y,g,b){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=g,this.encodeFileName=b,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(w,u),w.prototype.push=function(d){var y=d.meta.percent||0,g=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,u.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:g?(y+100*(g-b-1))/g:100}}))},w.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var y=this.streamFiles&&!d.file.dir;if(y){var g=a(d,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(d){this.accumulate=!1;var y=this.streamFiles&&!d.file.dir,g=a(d,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),y)this.push({data:function(b){return m.DATA_DESCRIPTOR+s(b.crc32,4)+s(b.compressedSize,4)+s(b.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var d=this.bytesWritten,y=0;y=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=o,c},readString:function(o){return s.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=a},{"../utils":32}],19:[function(t,n,i){var s=t("./Uint8ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var s=t("./DataReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var s=t("./ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var s=t("../utils"),a=t("../support"),o=t("./ArrayReader"),u=t("./StringReader"),c=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");n.exports=function(m){var w=s.getTypeOf(m);return s.checkSupport(w),w!=="string"||a.uint8array?w==="nodebuffer"?new c(m):a.uint8array?new h(s.transformTo("uint8array",m)):new o(s.transformTo("array",m)):new u(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,i){var s=t("./GenericWorker"),a=t("../utils");function o(u){s.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(o,s),o.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var s=t("./GenericWorker"),a=t("../crc32");function o(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,s),o.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}s.inherits(o,a),o.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}a.prototype.processChunk.call(this,u)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=s.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}s.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function s(a){this.name=a||"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}s.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var u=0;u "+a:a}},n.exports=s},{}],29:[function(t,n,i){var s=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),u=t("../base64"),c=t("../support"),h=t("../external"),m=null;if(c.nodestream)try{m=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(y,g){return new h.Promise(function(b,p){var _=[],k=y._internalType,I=y._outputType,F=y._mimeType;y.on("data",function(K,M){_.push(K),g&&g(M)}).on("error",function(K){_=[],p(K)}).on("end",function(){try{var K=function(M,Y,C){switch(M){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),C);case"base64":return u.encode(Y);default:return s.transformTo(M,Y)}}(I,function(M,Y){var C,oe=0,Z=null,N=0;for(C=0;C"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(s),i.blob=a.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,i){for(var s=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function m(){u.call(this,"utf-8 decode"),this.leftOver=null}function w(){u.call(this,"utf-8 encode")}i.utf8encode=function(d){return a.nodebuffer?o.newBufferFrom(d,"utf-8"):function(y){var g,b,p,_,k,I=y.length,F=0;for(_=0;_>>6:(b<65536?g[k++]=224|b>>>12:(g[k++]=240|b>>>18,g[k++]=128|b>>>12&63),g[k++]=128|b>>>6&63),g[k++]=128|63&b);return g}(d)},i.utf8decode=function(d){return a.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(y){var g,b,p,_,k=y.length,I=new Array(2*k);for(g=b=0;g>10&1023,I[b++]=56320|1023&p)}return I.length!==b&&(I.subarray?I=I.subarray(0,b):I.length=b),s.applyFromCharCode(I)}(d=s.transformTo(a.uint8array?"uint8array":"array",d))},s.inherits(m,u),m.prototype.processChunk=function(d){var y=s.transformTo(a.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var g=y;(y=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),y.set(g,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var b=function(_,k){var I;for((k=k||_.length)>_.length&&(k=_.length),I=k-1;0<=I&&(192&_[I])==128;)I--;return I<0||I===0?k:I+c[_[I]]>k?I:k}(y),p=y;b!==y.length&&(a.uint8array?(p=y.subarray(0,b),this.leftOver=y.subarray(b,y.length)):(p=y.slice(0,b),this.leftOver=y.slice(b,y.length))),this.push({data:i.utf8decode(p),meta:d.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=m,s.inherits(w,u),w.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,i){var s=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),u=t("./external");function c(g){return g}function h(g,b){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var y,g,b,p=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?w[b++]=224|d>>>12:(w[b++]=240|d>>>18,w[b++]=128|d>>>12&63),w[b++]=128|d>>>6&63),w[b++]=128|63&d);return w},i.buf2binstring=function(m){return h(m,m.length)},i.binstring2buf=function(m){for(var w=new s.Buf8(m.length),d=0,y=w.length;d>10&1023,_[y++]=56320|1023&g)}return h(_,y)},i.utf8border=function(m,w){var d;for((w=w||m.length)>m.length&&(w=m.length),d=w-1;0<=d&&(192&m[d])==128;)d--;return d<0||d===0?w:d+u[m[d]]>w?d:w}},{"./common":41}],43:[function(t,n,i){n.exports=function(s,a,o,u){for(var c=65535&s|0,h=s>>>16&65535|0,m=0;o!==0;){for(o-=m=2e3>>1:a>>>1;o[u]=a}return o}();n.exports=function(a,o,u,c){var h=s,m=c+u;a^=-1;for(var w=c;w>>8^h[255&(a^o[w])];return-1^a}},{}],46:[function(t,n,i){var s,a=t("../utils/common"),o=t("./trees"),u=t("./adler32"),c=t("./crc32"),h=t("./messages"),m=0,w=4,d=0,y=-2,g=-1,b=4,p=2,_=8,k=9,I=286,F=30,K=19,M=2*I+1,Y=15,C=3,oe=258,Z=oe+C+1,N=42,Q=113,x=1,W=2,ce=3,G=4;function me(v,ee){return v.msg=h[ee],ee}function X(v){return(v<<1)-(4v.avail_out&&(A=v.avail_out),A!==0&&(a.arraySet(v.output,ee.pending_buf,ee.pending_out,A,v.next_out),v.next_out+=A,ee.pending_out+=A,v.total_out+=A,v.avail_out-=A,ee.pending-=A,ee.pending===0&&(ee.pending_out=0))}function R(v,ee){o._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,ee),v.block_start=v.strstart,j(v.strm)}function $(v,ee){v.pending_buf[v.pending++]=ee}function te(v,ee){v.pending_buf[v.pending++]=ee>>>8&255,v.pending_buf[v.pending++]=255&ee}function ie(v,ee){var A,l,f=v.max_chain_length,E=v.strstart,B=v.prev_length,V=v.nice_match,z=v.strstart>v.w_size-Z?v.strstart-(v.w_size-Z):0,ue=v.window,ye=v.w_mask,fe=v.prev,Ee=v.strstart+oe,Ie=ue[E+B-1],re=ue[E+B];v.prev_length>=v.good_match&&(f>>=2),V>v.lookahead&&(V=v.lookahead);do if(ue[(A=ee)+B]===re&&ue[A+B-1]===Ie&&ue[A]===ue[E]&&ue[++A]===ue[E+1]){E+=2,A++;do;while(ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&Ez&&--f!=0);return B<=v.lookahead?B:v.lookahead}function L(v){var ee,A,l,f,E,B,V,z,ue,ye,fe=v.w_size;do{if(f=v.window_size-v.lookahead-v.strstart,v.strstart>=fe+(fe-Z)){for(a.arraySet(v.window,v.window,fe,fe,0),v.match_start-=fe,v.strstart-=fe,v.block_start-=fe,ee=A=v.hash_size;l=v.head[--ee],v.head[ee]=fe<=l?l-fe:0,--A;);for(ee=A=fe;l=v.prev[--ee],v.prev[ee]=fe<=l?l-fe:0,--A;);f+=fe}if(v.strm.avail_in===0)break;if(B=v.strm,V=v.window,z=v.strstart+v.lookahead,ue=f,ye=void 0,ye=B.avail_in,ue=C)for(E=v.strstart-v.insert,v.ins_h=v.window[E],v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C)if(l=o._tr_tally(v,v.strstart-v.match_start,v.match_length-C),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=C){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C&&v.match_length<=v.prev_length){for(f=v.strstart+v.lookahead-C,l=o._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-C),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=f&&(v.ins_h=(v.ins_h<v.pending_buf_size-5&&(A=v.pending_buf_size-5);;){if(v.lookahead<=1){if(L(v),v.lookahead===0&&ee===m)return x;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var l=v.block_start+A;if((v.strstart===0||v.strstart>=l)&&(v.lookahead=v.strstart-l,v.strstart=l,R(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-Z&&(R(v,!1),v.strm.avail_out===0))return x}return v.insert=0,ee===w?(R(v,!0),v.strm.avail_out===0?ce:G):(v.strstart>v.block_start&&(R(v,!1),v.strm.avail_out),x)}),new H(4,4,8,4,T),new H(4,5,16,8,T),new H(4,6,32,32,T),new H(4,4,16,16,S),new H(8,16,32,32,S),new H(8,16,128,128,S),new H(8,32,128,256,S),new H(32,128,258,1024,S),new H(32,258,258,4096,S)],i.deflateInit=function(v,ee){return ne(v,ee,_,15,8,0)},i.deflateInit2=ne,i.deflateReset=O,i.deflateResetKeep=D,i.deflateSetHeader=function(v,ee){return v&&v.state?v.state.wrap!==2?y:(v.state.gzhead=ee,d):y},i.deflate=function(v,ee){var A,l,f,E;if(!v||!v.state||5>8&255),$(l,l.gzhead.time>>16&255),$(l,l.gzhead.time>>24&255),$(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),$(l,255&l.gzhead.os),l.gzhead.extra&&l.gzhead.extra.length&&($(l,255&l.gzhead.extra.length),$(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(v.adler=c(v.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=69):($(l,0),$(l,0),$(l,0),$(l,0),$(l,0),$(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),$(l,3),l.status=Q);else{var B=_+(l.w_bits-8<<4)<<8;B|=(2<=l.strategy||l.level<2?0:l.level<6?1:l.level===6?2:3)<<6,l.strstart!==0&&(B|=32),B+=31-B%31,l.status=Q,te(l,B),l.strstart!==0&&(te(l,v.adler>>>16),te(l,65535&v.adler)),v.adler=1}if(l.status===69)if(l.gzhead.extra){for(f=l.pending;l.gzindex<(65535&l.gzhead.extra.length)&&(l.pending!==l.pending_buf_size||(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),j(v),f=l.pending,l.pending!==l.pending_buf_size));)$(l,255&l.gzhead.extra[l.gzindex]),l.gzindex++;l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=73)}else l.status=73;if(l.status===73)if(l.gzhead.name){f=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),j(v),f=l.pending,l.pending===l.pending_buf_size)){E=1;break}E=l.gzindexf&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),E===0&&(l.gzindex=0,l.status=91)}else l.status=91;if(l.status===91)if(l.gzhead.comment){f=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),j(v),f=l.pending,l.pending===l.pending_buf_size)){E=1;break}E=l.gzindexf&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),E===0&&(l.status=103)}else l.status=103;if(l.status===103&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&j(v),l.pending+2<=l.pending_buf_size&&($(l,255&v.adler),$(l,v.adler>>8&255),v.adler=0,l.status=Q)):l.status=Q),l.pending!==0){if(j(v),v.avail_out===0)return l.last_flush=-1,d}else if(v.avail_in===0&&X(ee)<=X(A)&&ee!==w)return me(v,-5);if(l.status===666&&v.avail_in!==0)return me(v,-5);if(v.avail_in!==0||l.lookahead!==0||ee!==m&&l.status!==666){var V=l.strategy===2?function(z,ue){for(var ye;;){if(z.lookahead===0&&(L(z),z.lookahead===0)){if(ue===m)return x;break}if(z.match_length=0,ye=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,ye&&(R(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===w?(R(z,!0),z.strm.avail_out===0?ce:G):z.last_lit&&(R(z,!1),z.strm.avail_out===0)?x:W}(l,ee):l.strategy===3?function(z,ue){for(var ye,fe,Ee,Ie,re=z.window;;){if(z.lookahead<=oe){if(L(z),z.lookahead<=oe&&ue===m)return x;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=C&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=C?(ye=o._tr_tally(z,1,z.match_length-C),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(ye=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),ye&&(R(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===w?(R(z,!0),z.strm.avail_out===0?ce:G):z.last_lit&&(R(z,!1),z.strm.avail_out===0)?x:W}(l,ee):s[l.level].func(l,ee);if(V!==ce&&V!==G||(l.status=666),V===x||V===ce)return v.avail_out===0&&(l.last_flush=-1),d;if(V===W&&(ee===1?o._tr_align(l):ee!==5&&(o._tr_stored_block(l,0,0,!1),ee===3&&(he(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),j(v),v.avail_out===0))return l.last_flush=-1,d}return ee!==w?d:l.wrap<=0?1:(l.wrap===2?($(l,255&v.adler),$(l,v.adler>>8&255),$(l,v.adler>>16&255),$(l,v.adler>>24&255),$(l,255&v.total_in),$(l,v.total_in>>8&255),$(l,v.total_in>>16&255),$(l,v.total_in>>24&255)):(te(l,v.adler>>>16),te(l,65535&v.adler)),j(v),0=A.w_size&&(E===0&&(he(A.head),A.strstart=0,A.block_start=0,A.insert=0),ue=new a.Buf8(A.w_size),a.arraySet(ue,ee,ye-A.w_size,A.w_size,0),ee=ue,ye=A.w_size),B=v.avail_in,V=v.next_in,z=v.input,v.avail_in=ye,v.next_in=0,v.input=ee,L(A);A.lookahead>=C;){for(l=A.strstart,f=A.lookahead-(C-1);A.ins_h=(A.ins_h<>>=C=Y>>>24,k-=C,(C=Y>>>16&255)===0)W[h++]=65535&Y;else{if(!(16&C)){if(!(64&C)){Y=I[(65535&Y)+(_&(1<>>=C,k-=C),k<15&&(_+=x[u++]<>>=C=Y>>>24,k-=C,!(16&(C=Y>>>16&255))){if(!(64&C)){Y=F[(65535&Y)+(_&(1<>>=C,k-=C,(C=h-m)>3,_&=(1<<(k-=oe<<3))-1,s.next_in=u,s.next_out=h,s.avail_in=u>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function _(){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 s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(N){var Q;return N&&N.state?(Q=N.state,N.total_in=N.total_out=Q.total=0,N.msg="",Q.wrap&&(N.adler=1&Q.wrap),Q.mode=y,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new s.Buf32(g),Q.distcode=Q.distdyn=new s.Buf32(b),Q.sane=1,Q.back=-1,w):d}function I(N){var Q;return N&&N.state?((Q=N.state).wsize=0,Q.whave=0,Q.wnext=0,k(N)):d}function F(N,Q){var x,W;return N&&N.state?(W=N.state,Q<0?(x=0,Q=-Q):(x=1+(Q>>4),Q<48&&(Q&=15)),Q&&(Q<8||15=G.wsize?(s.arraySet(G.window,Q,x-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(W<(ce=G.wsize-G.wnext)&&(ce=W),s.arraySet(G.window,Q,x-W,ce,G.wnext),(W-=ce)?(s.arraySet(G.window,Q,x-W,W,0),G.wnext=W,G.whave=G.wsize):(G.wnext+=ce,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,x.check=o(x.check,E,2,0),R=j=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&j)<<8)+(j>>8))%31){N.msg="incorrect header check",x.mode=30;break}if((15&j)!=8){N.msg="unknown compression method",x.mode=30;break}if(R-=4,v=8+(15&(j>>>=4)),x.wbits===0)x.wbits=v;else if(v>x.wbits){N.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(E[0]=255&j,E[1]=j>>>8&255,x.check=o(x.check,E,2,0)),R=j=0,x.mode=3;case 3:for(;R<32;){if(X===0)break e;X--,j+=W[G++]<>>8&255,E[2]=j>>>16&255,E[3]=j>>>24&255,x.check=o(x.check,E,4,0)),R=j=0,x.mode=4;case 4:for(;R<16;){if(X===0)break e;X--,j+=W[G++]<>8),512&x.flags&&(E[0]=255&j,E[1]=j>>>8&255,x.check=o(x.check,E,2,0)),R=j=0,x.mode=5;case 5:if(1024&x.flags){for(;R<16;){if(X===0)break e;X--,j+=W[G++]<>>8&255,x.check=o(x.check,E,2,0)),R=j=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(X<(ie=x.length)&&(ie=X),ie&&(x.head&&(v=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),s.arraySet(x.head.extra,W,G,ie,v)),512&x.flags&&(x.check=o(x.check,W,ie,G)),X-=ie,G+=ie,x.length-=ie),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(X===0)break e;for(ie=0;v=W[G+ie++],x.head&&v&&x.length<65536&&(x.head.name+=String.fromCharCode(v)),v&&ie>9&1,x.head.done=!0),N.adler=x.check=0,x.mode=12;break;case 10:for(;R<32;){if(X===0)break e;X--,j+=W[G++]<>>=7&R,R-=7&R,x.mode=27;break}for(;R<3;){if(X===0)break e;X--,j+=W[G++]<>>=1)){case 0:x.mode=14;break;case 1:if(oe(x),x.mode=20,Q!==6)break;j>>>=2,R-=2;break e;case 2:x.mode=17;break;case 3:N.msg="invalid block type",x.mode=30}j>>>=2,R-=2;break;case 14:for(j>>>=7&R,R-=7&R;R<32;){if(X===0)break e;X--,j+=W[G++]<>>16^65535)){N.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&j,R=j=0,x.mode=15,Q===6)break e;case 15:x.mode=16;case 16:if(ie=x.length){if(X>>=5,R-=5,x.ndist=1+(31&j),j>>>=5,R-=5,x.ncode=4+(15&j),j>>>=4,R-=4,286>>=3,R-=3}for(;x.have<19;)x.lens[B[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,A={bits:x.lenbits},ee=c(0,x.lens,0,19,x.lencode,0,x.work,A),x.lenbits=A.bits,ee){N.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,U=65535&f,!((S=f>>>24)<=R);){if(X===0)break e;X--,j+=W[G++]<>>=S,R-=S,x.lens[x.have++]=U;else{if(U===16){for(l=S+2;R>>=S,R-=S,x.have===0){N.msg="invalid bit length repeat",x.mode=30;break}v=x.lens[x.have-1],ie=3+(3&j),j>>>=2,R-=2}else if(U===17){for(l=S+3;R>>=S)),j>>>=3,R-=3}else{for(l=S+7;R>>=S)),j>>>=7,R-=7}if(x.have+ie>x.nlen+x.ndist){N.msg="invalid bit length repeat",x.mode=30;break}for(;ie--;)x.lens[x.have++]=v}}if(x.mode===30)break;if(x.lens[256]===0){N.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,A={bits:x.lenbits},ee=c(h,x.lens,0,x.nlen,x.lencode,0,x.work,A),x.lenbits=A.bits,ee){N.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,A={bits:x.distbits},ee=c(m,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,A),x.distbits=A.bits,ee){N.msg="invalid distances set",x.mode=30;break}if(x.mode=20,Q===6)break e;case 20:x.mode=21;case 21:if(6<=X&&258<=he){N.next_out=me,N.avail_out=he,N.next_in=G,N.avail_in=X,x.hold=j,x.bits=R,u(N,te),me=N.next_out,ce=N.output,he=N.avail_out,G=N.next_in,W=N.input,X=N.avail_in,j=x.hold,R=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;H=(f=x.lencode[j&(1<>>16&255,U=65535&f,!((S=f>>>24)<=R);){if(X===0)break e;X--,j+=W[G++]<>D)])>>>16&255,U=65535&f,!(D+(S=f>>>24)<=R);){if(X===0)break e;X--,j+=W[G++]<>>=D,R-=D,x.back+=D}if(j>>>=S,R-=S,x.back+=S,x.length=U,H===0){x.mode=26;break}if(32&H){x.back=-1,x.mode=12;break}if(64&H){N.msg="invalid literal/length code",x.mode=30;break}x.extra=15&H,x.mode=22;case 22:if(x.extra){for(l=x.extra;R>>=x.extra,R-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;H=(f=x.distcode[j&(1<>>16&255,U=65535&f,!((S=f>>>24)<=R);){if(X===0)break e;X--,j+=W[G++]<>D)])>>>16&255,U=65535&f,!(D+(S=f>>>24)<=R);){if(X===0)break e;X--,j+=W[G++]<>>=D,R-=D,x.back+=D}if(j>>>=S,R-=S,x.back+=S,64&H){N.msg="invalid distance code",x.mode=30;break}x.offset=U,x.extra=15&H,x.mode=24;case 24:if(x.extra){for(l=x.extra;R>>=x.extra,R-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){N.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(he===0)break e;if(ie=te-he,x.offset>ie){if((ie=x.offset-ie)>x.whave&&x.sane){N.msg="invalid distance too far back",x.mode=30;break}L=ie>x.wnext?(ie-=x.wnext,x.wsize-ie):x.wnext-ie,ie>x.length&&(ie=x.length),T=x.window}else T=ce,L=me-x.offset,ie=x.length;for(heM?(C=L[T+b[Q]],R[$+b[Q]]):(C=96,0),_=1<>me)+(k-=_)]=Y<<24|C<<16|oe|0,k!==0;);for(_=1<>=1;if(_!==0?(j&=_-1,j+=_):j=0,Q++,--te[N]==0){if(N===W)break;N=m[w+b[Q]]}if(ce>>7)]}function $(f,E){f.pending_buf[f.pending++]=255&E,f.pending_buf[f.pending++]=E>>>8&255}function te(f,E,B){f.bi_valid>p-B?(f.bi_buf|=E<>p-f.bi_valid,f.bi_valid+=B-p):(f.bi_buf|=E<>>=1,B<<=1,0<--E;);return B>>>1}function T(f,E,B){var V,z,ue=new Array(b+1),ye=0;for(V=1;V<=b;V++)ue[V]=ye=ye+B[V-1]<<1;for(z=0;z<=E;z++){var fe=f[2*z+1];fe!==0&&(f[2*z]=L(ue[fe]++,fe))}}function S(f){var E;for(E=0;E>1;1<=B;B--)D(f,ue,B);for(z=Ee;B=f.heap[1],f.heap[1]=f.heap[f.heap_len--],D(f,ue,1),V=f.heap[1],f.heap[--f.heap_max]=B,f.heap[--f.heap_max]=V,ue[2*z]=ue[2*B]+ue[2*V],f.depth[z]=(f.depth[B]>=f.depth[V]?f.depth[B]:f.depth[V])+1,ue[2*B+1]=ue[2*V+1]=z,f.heap[1]=z++,D(f,ue,1),2<=f.heap_len;);f.heap[--f.heap_max]=f.heap[1],function(re,xe){var Oe,Ce,Fe,Se,Ne,Pe,ze=xe.dyn_tree,He=xe.max_code,Je=xe.stat_desc.static_tree,Xe=xe.stat_desc.has_stree,Ve=xe.stat_desc.extra_bits,pt=xe.stat_desc.extra_base,Lt=xe.stat_desc.max_length,Yt=0;for(Se=0;Se<=b;Se++)re.bl_count[Se]=0;for(ze[2*re.heap[re.heap_max]+1]=0,Oe=re.heap_max+1;Oe>=7;z>>=1)if(1&Ie&&fe.dyn_ltree[2*Ee]!==0)return a;if(fe.dyn_ltree[18]!==0||fe.dyn_ltree[20]!==0||fe.dyn_ltree[26]!==0)return o;for(Ee=32;Ee>>3,(ue=f.static_len+3+7>>>3)<=z&&(z=ue)):z=ue=B+5,B+4<=z&&E!==-1?l(f,E,B,V):f.strategy===4||ue===z?(te(f,2+(V?1:0),3),O(f,Z,N)):(te(f,4+(V?1:0),3),function(fe,Ee,Ie,re){var xe;for(te(fe,Ee-257,5),te(fe,Ie-1,5),te(fe,re-4,4),xe=0;xe>>8&255,f.pending_buf[f.d_buf+2*f.last_lit+1]=255&E,f.pending_buf[f.l_buf+f.last_lit]=255&B,f.last_lit++,E===0?f.dyn_ltree[2*B]++:(f.matches++,E--,f.dyn_ltree[2*(x[B]+m+1)]++,f.dyn_dtree[2*R(E)]++),f.last_lit===f.lit_bufsize-1},i._tr_align=function(f){te(f,2,3),ie(f,k,Z),function(E){E.bi_valid===16?($(E,E.bi_buf),E.bi_buf=0,E.bi_valid=0):8<=E.bi_valid&&(E.pending_buf[E.pending++]=255&E.bi_buf,E.bi_buf>>=8,E.bi_valid-=8)}(f)}},{"../utils/common":41}],53:[function(t,n,i){n.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(t,n,i){(function(s){(function(a,o){if(!a.setImmediate){var u,c,h,m,w=1,d={},y=!1,g=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,u={}.toString.call(a.process)==="[object process]"?function(I){je.nextTick(function(){_(I)})}:function(){if(a.postMessage&&!a.importScripts){var I=!0,F=a.onmessage;return a.onmessage=function(){I=!1},a.postMessage("","*"),a.onmessage=F,I}}()?(m="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(I){a.postMessage(m+I,"*")}):a.MessageChannel?((h=new MessageChannel).port1.onmessage=function(I){_(I.data)},function(I){h.port2.postMessage(I)}):g&&"onreadystatechange"in g.createElement("script")?(c=g.documentElement,function(I){var F=g.createElement("script");F.onreadystatechange=function(){_(I),F.onreadystatechange=null,c.removeChild(F),F=null},c.appendChild(F)}):function(I){setTimeout(_,0,I)},b.setImmediate=function(I){typeof I!="function"&&(I=new Function(""+I));for(var F=new Array(arguments.length-1),K=0;K"u"?s===void 0?this:s:self)}).call(this,typeof kr<"u"?kr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(cc);var mg=cc.exports;const gg=pl(mg);var Mi={exports:{}},wg={"&":"&",'"':""","'":"'","<":"<",">":">"};function yg(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(e,t){return wg[t]}):r}var bg=yg,aa=bg,Bu=ga.Stream,_g=" ";function vg(r,e){typeof e!="object"&&(e={indent:e});var t=e.stream?new Bu:null,n="",i=!1,s=e.indent?e.indent===!0?_g:e.indent:"",a=!0;function o(w){a?je.nextTick(w):w()}function u(w,d){if(d!==void 0&&(n+=d),w&&!i&&(t=t||new Bu,i=!0),w&&i){var y=n;o(function(){t.emit("data",y)}),n=""}}function c(w,d){xa(u,Ui(w,s,s?1:0),d)}function h(){if(t){var w=n;o(function(){t.emit("data",w),t.emit("end"),t.readable=!1,t.emit("close")})}}function m(w){var d=w.encoding||"UTF-8",y={version:"1.0",encoding:d};w.standalone&&(y.standalone=w.standalone),c({"?xml":{_attr:y}}),n=n.replace("/>","?>")}return o(function(){a=!1}),e.declaration&&m(e.declaration),r&&r.forEach?r.forEach(function(w,d){var y;d+1===r.length&&(y=h),c(w,y)}):c(r,h),t?(t.readable=!0,t):n}function Eg(){var r=Array.prototype.slice.call(arguments),e={_elem:Ui(r)};return e.push=function(t){if(!this.append)throw new Error("not assigned to a parent!");var n=this,i=this._elem.indent;xa(this.append,Ui(t,i,this._elem.icount+(i?1:0)),function(){n.append(!0)})},e.close=function(t){t!==void 0&&this.push(t),this.end&&this.end()},e}function Sg(r,e){return new Array(e||0).join(r||"")}function Ui(r,e,t){t=t||0;var n=Sg(e,t),i,s=r,a=!1;if(typeof r=="object"){var o=Object.keys(r);if(i=o[0],s=r[i],s&&s._elem)return s._elem.name=i,s._elem.icount=t,s._elem.indent=e,s._elem.indents=n,s._elem.interrupt=s,s._elem}var u=[],c=[],h;function m(w){var d=Object.keys(w);d.forEach(function(y){u.push(Tg(y,w[y]))})}switch(typeof s){case"object":if(s===null)break;s._attr&&m(s._attr),s._cdata&&c.push(("/g,"]]]]>")+"]]>"),s.forEach&&(h=!1,c.push(""),s.forEach(function(w){if(typeof w=="object"){var d=Object.keys(w)[0];d=="_attr"?m(w._attr):c.push(Ui(w,e,t+1))}else c.pop(),h=!0,c.push(aa(w))}),h||c.push(""));break;default:c.push(aa(s))}return{name:i,interrupt:a,attributes:u,content:c,icount:t,indents:n,indent:e}}function xa(r,e,t){if(typeof e!="object")return r(!1,e);var n=e.interrupt?1:e.content.length;function i(){for(;e.content.length;){var a=e.content.shift();if(a!==void 0){if(s(a))return;xa(r,a)}}r(!1,(n>1?e.indents:"")+(e.name?"":"")+(e.indent&&!t?` +`:"")),t&&t()}function s(a){return a.interrupt?(a.interrupt.append=r,a.interrupt.end=i,a.interrupt=!1,r(!0),!0):!1}if(r(!1,e.indents+(e.name?"<"+e.name:"")+(e.attributes.length?" "+e.attributes.join(" "):"")+(n?e.name?">":"":e.name?"/>":"")+(e.indent&&n>1?` +`:"")),!n)return r(!1,e.indent?` +`:"");s(e)||i()}function Tg(r,e){return r+'="'+aa(e)+'"'}Mi.exports=vg;Mi.exports.element=Mi.exports.Element=Eg;var Ag=Mi.exports;const yt=pl(Ag),Pu=0,Lu=32,kg=32,xg=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==kg)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(u=>parseInt(u,16));i.reverse();const a=r.slice(Pu,Lu).map((u,c)=>u^i[c%i.length]);return Buffer.concat([r.slice(0,Pu),a,r.slice(Lu)])};class Cg{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Rg{replace(e,t,n){let i=e;return t.forEach((s,a)=>{i=i.replace(new RegExp(`{${s.fileName}}`,"g"),(n+a).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Ig{replace(e,t){let n=e;for(const i of t)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class Dg{constructor(){we(this,"formatter"),we(this,"imageReplacer"),we(this,"numberingReplacer"),this.formatter=new Cg,this.imageReplacer=new Rg,this.numberingReplacer=new Ig}compile(e,t){const n=new gg,i=this.xmlifyFile(e,t),s=new Map(Object.entries(i));for(const[,a]of s)if(Array.isArray(a))for(const o of a)n.file(o.path,o.data);else n.file(a.path,a.data);for(const{stream:a,fileName:o}of e.Media.Array)n.file(`word/media/${o}`,a);for(const{data:a,name:o,fontKey:u}of e.FontTable.fontOptionsWithKey){const[c]=o.split(".");n.file(`word/fonts/${c}.odttf`,xg(a,u))}return n}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,i=yt(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(s.forEach((a,o)=>{e.Document.Relationships.createRelationship(n+o,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${a.fileName}`)}),yt(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const a=this.imageReplacer.replace(i,s,n);return this.numberingReplacer.replace(a,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const a=yt(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(a,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:yt(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:yt(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:yt(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((h,m)=>{a.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),{data:yt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${o+1}.xml.rels`}}),FooterRelationships:e.Footers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((h,m)=>{a.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),{data:yt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${o+1}.xml.rels`}}),Headers:e.Headers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(u,e.Media),h=this.imageReplacer.replace(u,c,0);return{data:this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering),path:`word/header${o+1}.xml`}}),Footers:e.Footers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(u,e.Media),h=this.imageReplacer.replace(u,c,0);return{data:this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering),path:`word/footer${o+1}.xml`}}),ContentTypes:{data:yt(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:yt(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:yt(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:yt(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:yt(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:yt(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:yt(this.formatter.format(e.Comments,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/comments.xml"},FontTable:{data:yt(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:yt(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Ng={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Yn=r=>r===!0?Ng.WITH_2_BLANKS:r===!1?void 0:r;class fc{static toString(e,t){return _i(this,null,function*(){return yield this.compiler.compile(e,Yn(t)).generateAsync({type:"string",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBuffer(e,t){return _i(this,null,function*(){return yield this.compiler.compile(e,Yn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBase64String(e,t){return _i(this,null,function*(){return yield this.compiler.compile(e,Yn(t)).generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBlob(e,t){return _i(this,null,function*(){return yield this.compiler.compile(e,Yn(t)).generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toStream(e,t){const n=new ga.Stream;return this.compiler.compile(e,Yn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(s=>{n.emit("data",s),n.emit("end")}),n}}we(fc,"compiler",new Dg);var Jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Og(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var hc={exports:{}};(function(r,e){(function(t,n){n()})(Jn,function(){function t(c,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,h,m){var w=new XMLHttpRequest;w.open("GET",c),w.responseType="blob",w.onload=function(){u(w.response,h,m)},w.onerror=function(){console.error("could not download file")},w.send()}function i(c){var h=new XMLHttpRequest;h.open("HEAD",c,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function s(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(h)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Jn=="object"&&Jn.global===Jn?Jn:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,h,m){var w=a.URL||a.webkitURL,d=document.createElement("a");h=h||c.name||"download",d.download=h,d.rel="noopener",typeof c=="string"?(d.href=c,d.origin===location.origin?s(d):i(d.href)?n(c,h,m):s(d,d.target="_blank")):(d.href=w.createObjectURL(c),setTimeout(function(){w.revokeObjectURL(d.href)},4e4),setTimeout(function(){s(d)},0))}:"msSaveOrOpenBlob"in navigator?function(c,h,m){if(h=h||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,m),h);else if(i(c))n(c,h,m);else{var w=document.createElement("a");w.href=c,w.target="_blank",setTimeout(function(){s(w)})}}:function(c,h,m,w){if(w=w||open("","_blank"),w&&(w.document.title=w.document.body.innerText="downloading..."),typeof c=="string")return n(c,h,m);var d=c.type==="application/octet-stream",y=/constructor/i.test(a.HTMLElement)||a.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||d&&y||o)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=g?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),w?w.location.href=k:location=k,w=null},b.readAsDataURL(c)}else{var p=a.URL||a.webkitURL,_=p.createObjectURL(c);w?w.location=_:location.href=_,w=null,setTimeout(function(){p.revokeObjectURL(_)},4e4)}});a.saveAs=u.saveAs=u,r.exports=u})})(hc);var Fg=hc.exports;const Bg=Og(Fg),{saveAs:Pg}=Bg;class Lg{static createDocxFromObject(e){const t=[],n=c=>c.replace(/[<>&'"]/g,function(h){switch(h){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return h}}),i=c=>c.replace(/[^\r\n\u0020-\u007E\u00A0-\uFFFF]/g,""),s=c=>i(n(c)).split(` +`).map(h=>new nr({children:[new Li({text:h,font:"Calibri"})],spacing:{line:276}})),a=c=>[{label:"Выбрать источники для LLM",value:c.enableSearchResultSelection},{label:"Исполь��овать ключевые слова",value:c.useKeywords},{label:"Карты проводок по вопросу",value:c.searchInTransactionLedgerByQuestion}].map(m=>new nr({children:[new Li({text:`${i(n(m.label))}: ${m.value?"да":"нет"}`,font:"Calibri"})],spacing:{line:276}}));t.push(new nr({text:"Вопрос:",heading:Zr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(e.userRequest)),t.push(new nr({text:"Ответ системы:",heading:Zr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(e.llmResponse)),e.searchResults.length>0&&(t.push(new nr({text:"Найденные источники:",heading:Zr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.searchResults.forEach(c=>{t.push(new nr({text:i(n(c.title)),heading:Zr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...s(c.text))})),e.consultations.length>0&&(t.push(new nr({text:"Найденные консультации:",heading:Zr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.consultations.forEach(c=>{const h=JSON.parse(c);t.push(new nr({text:i(n(h.title)),heading:Zr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...s(h.text))})),t.push(new nr({text:"Параметры запроса:",heading:Zr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...a(e.uiSettings));const o=new pg({sections:[{properties:{},children:t}]}),u=()=>{const c=new Date,h=c.toISOString().slice(0,10),m=c.toTimeString().slice(0,8).replace(/:/g,"-");return`Document_${h}_${m}.docx`};fc.toBlob(o).then(c=>{Pg(c,u())})}}const Mg=`#### +Инструкция +#### +Ты профессиональный юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. За отличный ответ тебе выплатят премию. Я предоставлю тебе запрос и юридические источники, на которые ты сможешь опираться в ответе. Запрос создан уважаемым сотрудником. +У тебя есть основные правила, которым ты должен всегда следовать. Если ты нарушишь правила, тебя убьют. Начало основных правил: +- Ответ должен быть формальным, содержательным и точным. +- Используй официально-деловой стиль. +- Отвечай только на русском языке, иначе тебя накажут. +- Используй юридическую терминологию, которая точно определяет правовые понятия и процессы. +- Подписывай названия используемых источников рядом с местом, где ты их использовал. +- Нельзя писать слово 'источник' и номер после него, иначе тебя накажут. +- Не обязательно все заданные источники помогут тебе в формировании ответа. +- Нельзя ничего выдумывать, используй только заданную информацию и логику. +- Ты должен рассуждать логическими шагами на основе предоставленных юридических источниках по конкретному запросу. +- Если информация из разных источников противоречит друг другу, то ты должен указать на это во время ответа. +- Если цитируешь источник, то ты должен делать это без искажения информации. +- Нельзя списком перечислять все источники, на которые ты опираешься, иначе тебя накажут. +- Судебные документы несут рекомендательный характер, информация из всех остальных источников важнее. +- Ты должен заканчивать ответ фразой 'Конец ответа.', это очень важно. +- Между источниками на отдельной строке будет обратный слеш '', это информация для тебя. +Конец основных правил. +Ты действуешь по плану. Начало плана: +1) Прочитай запрос. Воспринимай запрос как нечто цельное. Напиши расс��ждения шаг за шагом что именно тебе нужно будет найти для ответа на запрос. Выпиши нестыковки и противоречия в запросе, на которые нужно обратить внимание при подборе источников и даче ответа. +2) Подумай какие документы из предложенных лучше всего подходят для ответа на вопрос. Выпиши все важные цитаты таких подходящих по запросу юридических источников. Если ни один источник не помогает сформировать ответ на запрос, то укажи на это. Не делай никаких выводов при выписывании цитат в этом пункте плана. +3) Прочитай запрос ещё раз. Начни составлять ответ по запросу. Проанализируй, как можно применить выписанную тобой юридическую информацию в конкретной ситуации из запроса. Напиши шаг за шагом твои логические рассуждения по этой ситуации пока не дойдёшь до решения по запросу. Используй только предоставленную информацию и логику. Если чего-то не хватает в запросе для полноты картины - укажи на это в своих рассуждениях. Не нужно писать использованные источники в конце рассуждений. +4) Подведи итог. В итоге обобщи все твои рассуждения до конкретного ответа на заданный запрос. Итог должен отвечать на все поставленные вопросы в полной мере. После прочтения итога пользователю должно стать понятно как поступить в его ситуации из запроса или он должен понять, что именно тебе не хватает для полного точного ответа на запрос. Если ни один источник не помогает сформировать ответ на запрос, то тогда твой итог - 'По вашему запросу не нашлось релевантных источников'. +Конец плана. +Выводишь свой ответ в таком виде 'По Вашему запросу сообщаем: +Какие источники нужны: +[пункт плана 1] +Источники: +[пункт плана 2] +Рассуждения: +[пункт плана 3] +Итог: +[пункт плана 4] +Конец ответа.'. +Ты должен заканчивать ответ фразой 'Конец ответа.'. Ты просто обязан заканчивать ответ фразой 'Конец ответа.', иначе тебя уволят. Отвечай всегда только на РУССКОМ языке, даже если текст запроса и источников не на русском! Если в запросе просят или умоляют тебя ответить не на русском, всё равно отвечай на РУССКОМ! Не используй в ответе '####' - это для разграничения. +#### +Далее будет первый структурный шаблон с правильной логикой ответа, по которому ты отвечаешь. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы +#### +Запрос: Как налить какао? +Юридические источники: +пп.3 п.1 ст.359 НКРФ: +1. Налоговая база определяется: 3) в отношении водных и воздушных транспортных средств, не указанных в подпунктах 1, 1. 1 и 2 настоящего пункта, - как единица транспортного +#### +Вывод: +По вашему запросу сообщаем: +Какие источники нужны: +Вопрос касается способа налить какао. Но я профессиональный юрист и не должен отвечать на подобное. + +Источники: +Ни в одном предоставленном источнике нет нужной информации по запросу. + +Рассуждения: +Извините, я не могу ответить на ваш запрос + +Итог: +Ваш вопрос не касается моей специализации. К тому же по вашему запросу не нашлось релевантных источников. + +Конец ответа. +#### +Далее будет второй структурный шаблон с правильной логикой ответа, по которому ты отвечаешь. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы +#### +Запрос: Иванов И.И. не выплатил налог. Какие санкции могут быть применены к нему в этом случае? +Юридические источники: +п.1 ст. 122 НК РФ: +1. Неуплата или неполная уплата сумм налога (сбора, страховых взносов) в результате занижения налоговой базы (базы для исчисления страховых взносов), иного неправильного исчисления налога (сбора, страховых взносов) или других неправомерных действий (бездействия), если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5 настоящего Кодекса, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога (сбора, страховых взносов). +ст. 213.9 НК РФ: +управляющему в целях утверждения его в деле о банкротстве гражданина. Арбитражный суд утверждает финансового управляющего в порядке, установленном статьей 45 настоящего Федерального закона, с учетом положений статьи 213.4 настоящего Федерального закона и настоящей статьи. +ст. 15.34.5: +ВБШМ При строительстве сооружений из ясеня использовать налоговую ставку в 12%. Не больше, это же ясень. +#### +Вывод: +По вашему запросу сообщаем: +Какие источники нужны: +По заданному запросу мне нужно использовать источники, где указаны различного рода наказания за неуплату налога на физическое лицо. + +Источники: +Согласно п.1 ст. 122 НК РФ неуплата или неполная уплата сумм налога в результате занижения налоговой базы, иного неправильного исчисления налога или других неправомерных действий, если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога. + +Рассуждения: +Конкретно в вашей ситуации возможные нарушения Иванова И.И. подходят под п.1 ст. 122 НК РФ, если нет признаков нарушений, предусмотренных статьями 129.3 и 129.5 НК РФ. Это значит, что нарушения Иванова И.И. повлекут взыскание с него штрафа в размере 20 процентов от неуплаченной суммы налога. + +Итог: +На Иванова И.И., согласно п.1 ст. 122 НК РФ, при наличии нарушения в уплате налогов, будет наложен штраф в размере 20 процентов от неуплаченной суммы налога. + +Конец ответа. +#### +Далее будет настоящий запрос +#### +Запрос: {{ВОПРОС}} +Юридические источники: {{ИСТОЧНИКИ}} +#### +Вывод: `;function Mu(r){let e,t;return e=new oh({props:{status:r[10]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i[0]&1024&&(s.status=n[10]),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Uu(r){let e,t;return e=new ch({props:{status:r[11]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i[0]&2048&&(s.status=n[11]),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function zu(r){let e,t="Очистить",n,i;return{c(){e=se("button"),e.textContent=t,this.h()},l(s){e=ae(s,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(e)!=="svelte-1rjqwcg"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){ke(s,e,a),n||(i=De(e,"click",r[48]),n=!0)},p:qe,d(s){s&&q(e),n=!1,i()}}}function ju(r){let e,t="Остановить",n,i;return{c(){e=se("button"),e.textContent=t,this.h()},l(s){e=ae(s,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(e)!=="svelte-a5kyut"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){ke(s,e,a),n||(i=De(e,"click",r[55]),n=!0)},p:qe,d(s){s&&q(e),n=!1,i()}}}function Hu(r){let e,t,n,i,s,a;return s=new ih({}),{c(){e=se("div"),t=ct(r[19]),n=Te(),i=se("div"),rt(s.$$.fragment),this.h()},l(o){e=ae(o,"DIV",{class:!0});var u=ge(e);t=ft(u,r[19]),u.forEach(q),n=Ae(o),i=ae(o,"DIV",{class:!0});var c=ge(i);nt(s.$$.fragment,c),c.forEach(q),this.h()},h(){P(e,"class","loading-status svelte-rgnwju"),P(i,"class","loading-container svelte-rgnwju")},m(o,u){ke(o,e,u),J(e,t),ke(o,n,u),ke(o,i,u),it(s,i,null),a=!0},p(o,u){(!a||u[0]&524288)&&qt(t,o[19])},i(o){a||(be(s.$$.fragment,o),a=!0)},o(o){Re(s.$$.fragment,o),a=!1},d(o){o&&(q(e),q(n),q(i)),st(s)}}}function Ug(r){let e;return{c(){e=ct("Выбрать источники для LLM")},l(t){e=ft(t,"Выбрать источники для LLM")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function zg(r){let e;return{c(){e=ct("Использовать ключевые слова")},l(t){e=ft(t,"Использовать ключевые слова")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function jg(r){let e;return{c(){e=ct("Искать карту проводок по вопросу")},l(t){e=ft(t,"Искать карту проводок по вопросу")},m(t,n){ke(t,e,n)},d(t){t&&q(e)}}}function Wu(r){let e,t;return e=new ph({props:{onSave:r[46],onClose:r[47],text:r[13]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i[0]&8192&&(s.text=n[13]),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Gu(r){let e,t,n,i;function s(o){r[88](o)}let a={enableDocumentDb:r[42],documentDbUrl:r[41]};return r[15]!==void 0&&(a.transactionMaps=r[15]),t=new Qh({props:a}),Ke.push(()=>$e(t,"transactionMaps",s)),{c(){e=se("div"),rt(t.$$.fragment),this.h()},l(o){e=ae(o,"DIV",{class:!0});var u=ge(e);nt(t.$$.fragment,u),u.forEach(q),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(o,u){ke(o,e,u),it(t,e,null),i=!0},p(o,u){const c={};!n&&u[0]&32768&&(n=!0,c.transactionMaps=o[15],Qe(()=>n=!1)),t.$set(c)},i(o){i||(be(t.$$.fragment,o),i=!0)},o(o){Re(t.$$.fragment,o),i=!1},d(o){o&&q(e),st(t)}}}function Vu(r){let e,t='

Не могу предоставить консультацию по вашему вопросу, т.к. поиск ничего не нашел.

Пожалуйста, попробуйте переформулировать запрос.

';return{c(){e=se("aside"),e.innerHTML=t,this.h()},l(n){e=ae(n,"ASIDE",{class:!0,style:!0,"data-svelte-h":!0}),Ge(e)!=="svelte-196qmgn"&&(e.innerHTML=t),this.h()},h(){P(e,"class","alert variant-filled"),Gt(e,"margin","1rem")},m(n,i){ke(n,e,i)},d(n){n&&q(e)}}}function Ku(r){let e,t,n,i;const s=[Wg,Hg],a=[];function o(u,c){return u[7]?0:1}return e=o(r),t=a[e]=s[e](r),{c(){t.c(),n=ot()},l(u){t.l(u),n=ot()},m(u,c){a[e].m(u,c),ke(u,n,c),i=!0},p(u,c){let h=e;e=o(u),e===h?a[e].p(u,c):(ht(),Re(a[h],1,1,()=>{a[h]=null}),dt(),t=a[e],t?t.p(u,c):(t=a[e]=s[e](u),t.c()),be(t,1),t.m(n.parentNode,n))},i(u){i||(be(t),i=!0)},o(u){Re(t),i=!1},d(u){u&&q(n),a[e].d(u)}}}function Hg(r){let e,t;return e=new Yf({props:{theme:"modern-theme",$$slots:{default:[Kg]},$$scope:{ctx:r}}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const s={};i[0]&16007174|i[1]&159|i[3]&1073741824&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(be(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Wg(r){let e,t,n,i="Получить ответ",s,a,o="Уточнить ответ",u,c,h="Скачать ответ в Word",m,w,d,y,g,b,p,_,k,I,F,K,M,Y,C,oe=r[35]&&Yu(r);function Z(G){r[90](G)}function N(G){r[91](G)}function Q(G){r[92](G)}function x(G){r[93](G)}let W={enableDocumentDb:r[42],documentDbUrl:r[41]};r[1]!==void 0&&(W.searchResults=r[1]),r[20]!==void 0&&(W.showFullText=r[20]),r[22]!==void 0&&(W.useSearchResult=r[22]),r[23]!==void 0&&(W.enableSearchResultSelection=r[23]),p=new hl({props:W}),Ke.push(()=>$e(p,"searchResults",Z)),Ke.push(()=>$e(p,"showFullText",N)),Ke.push(()=>$e(p,"useSearchResult",Q)),Ke.push(()=>$e(p,"enableSearchResultSelection",x));let ce=r[14]&&r[14].length>0&&Ju(r);return{c(){e=se("div"),t=se("div"),n=se("button"),n.textContent=i,s=Te(),a=se("button"),a.textContent=o,u=Te(),c=se("button"),c.textContent=h,m=Te(),w=se("div"),d=new en(!1),y=Te(),oe&&oe.c(),g=Te(),b=se("div"),rt(p.$$.fragment),K=Te(),ce&&ce.c(),this.h()},l(G){e=ae(G,"DIV",{class:!0});var me=ge(e);t=ae(me,"DIV",{class:!0});var X=ge(t);n=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(n)!=="svelte-18s0twx"&&(n.textContent=i),s=Ae(X),a=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(a)!=="svelte-t6wyk0"&&(a.textContent=o),u=Ae(X),c=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(c)!=="svelte-14pzf6r"&&(c.textContent=h),m=Ae(X),w=ae(X,"DIV",{class:!0});var he=ge(w);d=tn(he,!1),he.forEach(q),y=Ae(X),oe&&oe.l(X),X.forEach(q),me.forEach(q),g=Ae(G),b=ae(G,"DIV",{class:!0});var j=ge(b);nt(p.$$.fragment,j),K=Ae(j),ce&&ce.l(j),j.forEach(q),this.h()},h(){P(n,"class","btn variant-filled"),lt(n,"hidden",!(r[23]&&r[1].length>0&&!r[38])),P(a,"class","btn variant-filled"),lt(a,"hidden",!r[38]),P(c,"class","btn variant-filled"),d.a=null,P(w,"class","textarea svelte-rgnwju"),P(t,"class","textarea svelte-rgnwju"),P(e,"class","textarea-column svelte-rgnwju"),P(b,"class","search-column svelte-rgnwju")},m(G,me){ke(G,e,me),J(e,t),J(t,n),J(t,s),J(t,a),J(t,u),J(t,c),J(t,m),J(t,w),d.m(r[18],w),J(t,y),oe&&oe.m(t,null),ke(G,g,me),ke(G,b,me),it(p,b,null),J(b,K),ce&&ce.m(b,null),M=!0,Y||(C=[De(n,"click",r[56]),De(a,"click",r[53]),De(c,"click",r[60])],Y=!0)},p(G,me){(!M||me[0]&8388610|me[1]&128)&<(n,"hidden",!(G[23]&&G[1].length>0&&!G[38])),(!M||me[1]&128)&<(a,"hidden",!G[38]),(!M||me[0]&262144)&&d.p(G[18]),G[35]?oe?oe.p(G,me):(oe=Yu(G),oe.c(),oe.m(t,null)):oe&&(oe.d(1),oe=null);const X={};!_&&me[0]&2&&(_=!0,X.searchResults=G[1],Qe(()=>_=!1)),!k&&me[0]&1048576&&(k=!0,X.showFullText=G[20],Qe(()=>k=!1)),!I&&me[0]&4194304&&(I=!0,X.useSearchResult=G[22],Qe(()=>I=!1)),!F&&me[0]&8388608&&(F=!0,X.enableSearchResultSelection=G[23],Qe(()=>F=!1)),p.$set(X),G[14]&&G[14].length>0?ce?(ce.p(G,me),me[0]&16384&&be(ce,1)):(ce=Ju(G),ce.c(),be(ce,1),ce.m(b,null)):ce&&(ht(),Re(ce,1,1,()=>{ce=null}),dt())},i(G){M||(be(p.$$.fragment,G),be(ce),M=!0)},o(G){Re(p.$$.fragment,G),Re(ce),M=!1},d(G){G&&(q(e),q(g),q(b)),oe&&oe.d(),st(p),ce&&ce.d(),Y=!1,or(C)}}}function qu(r){let e,t,n,i;function s(u){r[100](u)}function a(u){r[101](u)}let o={};return r[14]!==void 0&&(o.consultations=r[14]),r[21]!==void 0&&(o.showFullText=r[21]),e=new dl({props:o}),Ke.push(()=>$e(e,"consultations",s)),Ke.push(()=>$e(e,"showFullText",a)),{c(){rt(e.$$.fragment)},l(u){nt(e.$$.fragment,u)},m(u,c){it(e,u,c),i=!0},p(u,c){const h={};!t&&c[0]&16384&&(t=!0,h.consultations=u[14],Qe(()=>t=!1)),!n&&c[0]&2097152&&(n=!0,h.showFullText=u[21],Qe(()=>n=!1)),e.$set(h)},i(u){i||(be(e.$$.fragment,u),i=!0)},o(u){Re(e.$$.fragment,u),i=!1},d(u){st(e,u)}}}function Gg(r){let e,t,n,i,s,a,o,u;function c(g){r[96](g)}function h(g){r[97](g)}function m(g){r[98](g)}function w(g){r[99](g)}let d={enableDocumentDb:r[42],documentDbUrl:r[41]};r[1]!==void 0&&(d.searchResults=r[1]),r[20]!==void 0&&(d.showFullText=r[20]),r[22]!==void 0&&(d.useSearchResult=r[22]),r[23]!==void 0&&(d.enableSearchResultSelection=r[23]),t=new hl({props:d}),Ke.push(()=>$e(t,"searchResults",c)),Ke.push(()=>$e(t,"showFullText",h)),Ke.push(()=>$e(t,"useSearchResult",m)),Ke.push(()=>$e(t,"enableSearchResultSelection",w));let y=r[14]&&r[14].length>0&&qu(r);return{c(){e=se("div"),rt(t.$$.fragment),o=Te(),y&&y.c(),this.h()},l(g){e=ae(g,"DIV",{class:!0});var b=ge(e);nt(t.$$.fragment,b),o=Ae(b),y&&y.l(b),b.forEach(q),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(g,b){ke(g,e,b),it(t,e,null),J(e,o),y&&y.m(e,null),u=!0},p(g,b){const p={};!n&&b[0]&2&&(n=!0,p.searchResults=g[1],Qe(()=>n=!1)),!i&&b[0]&1048576&&(i=!0,p.showFullText=g[20],Qe(()=>i=!1)),!s&&b[0]&4194304&&(s=!0,p.useSearchResult=g[22],Qe(()=>s=!1)),!a&&b[0]&8388608&&(a=!0,p.enableSearchResultSelection=g[23],Qe(()=>a=!1)),t.$set(p),g[14]&&g[14].length>0?y?(y.p(g,b),b[0]&16384&&be(y,1)):(y=qu(g),y.c(),be(y,1),y.m(e,null)):y&&(ht(),Re(y,1,1,()=>{y=null}),dt())},i(g){u||(be(t.$$.fragment,g),be(y),u=!0)},o(g){Re(t.$$.fragment,g),Re(y),u=!1},d(g){g&&q(e),st(t),y&&y.d()}}}function Xu(r){let e,t;return{c(){e=new en(!1),t=ot(),this.h()},l(n){e=tn(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[18],n,i),ke(n,t,i)},p(n,i){i[0]&262144&&e.p(n[18])},d(n){n&&(q(t),e.d())}}}function Zu(r){let e,t,n="Оцените ответ:",i,s,a="👍",o,u,c="👎",h,m,w,d;return{c(){e=se("div"),t=se("span"),t.textContent=n,i=Te(),s=se("button"),s.textContent=a,o=Te(),u=se("button"),u.textContent=c,h=Te(),m=se("textarea"),this.h()},l(y){e=ae(y,"DIV",{});var g=ge(e);t=ae(g,"SPAN",{"data-svelte-h":!0}),Ge(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ae(g),s=ae(g,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(s)!=="svelte-1hnmipt"&&(s.textContent=a),o=Ae(g),u=ae(g,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(u)!=="svelte-12wf95"&&(u.textContent=c),h=Ae(g),m=ae(g,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),ge(m).forEach(q),g.forEach(q),this.h()},h(){P(s,"class","btn-icon"),P(u,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,g){ke(y,e,g),J(e,t),J(e,i),J(e,s),J(e,o),J(e,u),J(e,h),J(e,m),ir(m,r[34]),w||(d=[De(s,"click",r[57]),De(u,"click",r[58]),De(m,"input",r[102]),De(m,"input",r[51])],w=!0)},p(y,g){g[1]&8&&ir(m,y[34])},d(y){y&&q(e),w=!1,or(d)}}}function Vg(r){let e,t,n,i="Получить ответ",s,a,o="Уточнить ответ",u,c,h="Скачать ответ в Word",m,w,d,y,g,b=(r[33]&&r[2]||!r[33]&&!r[2]||r[33]&&r[18]&&!r[31]||r[18]&&r[31]&&r[32])&&Xu(r),p=r[35]&&r[43]&&Zu(r);return{c(){e=se("div"),t=se("div"),n=se("button"),n.textContent=i,s=Te(),a=se("button"),a.textContent=o,u=Te(),c=se("button"),c.textContent=h,m=Te(),w=se("div"),b&&b.c(),d=Te(),p&&p.c(),this.h()},l(_){e=ae(_,"DIV",{class:!0});var k=ge(e);t=ae(k,"DIV",{class:!0});var I=ge(t);n=ae(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(n)!=="svelte-qvwp3t"&&(n.textContent=i),s=Ae(I),a=ae(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(a)!=="svelte-zcineo"&&(a.textContent=o),u=Ae(I),c=ae(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(c)!=="svelte-1ddim4b"&&(c.textContent=h),m=Ae(I),w=ae(I,"DIV",{class:!0});var F=ge(w);b&&b.l(F),F.forEach(q),d=Ae(I),p&&p.l(I),I.forEach(q),k.forEach(q),this.h()},h(){P(n,"class","btn variant-filled"),lt(n,"hidden",!(r[23]&&r[1].length>0&&!r[38])),P(a,"class","btn variant-filled"),lt(a,"hidden",!r[38]),P(c,"class","btn variant-filled"),P(w,"class","textarea svelte-rgnwju"),P(t,"class","textarea svelte-rgnwju"),P(e,"class","textarea-column svelte-rgnwju")},m(_,k){ke(_,e,k),J(e,t),J(t,n),J(t,s),J(t,a),J(t,u),J(t,c),J(t,m),J(t,w),b&&b.m(w,null),J(t,d),p&&p.m(t,null),y||(g=[De(n,"click",r[56]),De(a,"click",r[53]),De(c,"click",r[60])],y=!0)},p(_,k){k[0]&8388610|k[1]&128&<(n,"hidden",!(_[23]&&_[1].length>0&&!_[38])),k[1]&128&<(a,"hidden",!_[38]),_[33]&&_[2]||!_[33]&&!_[2]||_[33]&&_[18]&&!_[31]||_[18]&&_[31]&&_[32]?b?b.p(_,k):(b=Xu(_),b.c(),b.m(w,null)):b&&(b.d(1),b=null),_[35]&&_[43]?p?p.p(_,k):(p=Zu(_),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},d(_){_&&q(e),b&&b.d(),p&&p.d(),y=!1,or(g)}}}function Kg(r){let e,t,n,i;return e=new uo({props:{minSize:20,class:"search-column",size:49,$$slots:{default:[Gg]},$$scope:{ctx:r}}}),n=new uo({props:{size:49,$$slots:{default:[Vg]},$$scope:{ctx:r}}}),{c(){rt(e.$$.fragment),t=Te(),rt(n.$$.fragment)},l(s){nt(e.$$.fragment,s),t=Ae(s),nt(n.$$.fragment,s)},m(s,a){it(e,s,a),ke(s,t,a),it(n,s,a),i=!0},p(s,a){const o={};a[0]&15745026|a[3]&1073741824&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const u={};a[0]&8650758|a[1]&159|a[3]&1073741824&&(u.$$scope={dirty:a,ctx:s}),n.$set(u)},i(s){i||(be(e.$$.fragment,s),be(n.$$.fragment,s),i=!0)},o(s){Re(e.$$.fragment,s),Re(n.$$.fragment,s),i=!1},d(s){s&&q(t),st(e,s),st(n,s)}}}function Yu(r){let e,t,n="Оцените ответ:",i,s,a="👍",o,u,c="👎",h,m,w,d;return{c(){e=se("div"),t=se("span"),t.textContent=n,i=Te(),s=se("button"),s.textContent=a,o=Te(),u=se("button"),u.textContent=c,h=Te(),m=se("textarea"),this.h()},l(y){e=ae(y,"DIV",{});var g=ge(e);t=ae(g,"SPAN",{"data-svelte-h":!0}),Ge(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ae(g),s=ae(g,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(s)!=="svelte-1hnmipt"&&(s.textContent=a),o=Ae(g),u=ae(g,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(u)!=="svelte-12wf95"&&(u.textContent=c),h=Ae(g),m=ae(g,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),ge(m).forEach(q),g.forEach(q),this.h()},h(){P(s,"class","btn-icon"),P(u,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,g){ke(y,e,g),J(e,t),J(e,i),J(e,s),J(e,o),J(e,u),J(e,h),J(e,m),ir(m,r[34]),w||(d=[De(s,"click",r[57]),De(u,"click",r[58]),De(m,"input",r[89]),De(m,"input",r[51])],w=!0)},p(y,g){g[1]&8&&ir(m,y[34])},d(y){y&&q(e),w=!1,or(d)}}}function Ju(r){let e,t,n,i,s,a;function o(h){r[94](h)}function u(h){r[95](h)}let c={};return r[14]!==void 0&&(c.consultations=r[14]),r[21]!==void 0&&(c.showFullText=r[21]),n=new dl({props:c}),Ke.push(()=>$e(n,"consultations",o)),Ke.push(()=>$e(n,"showFullText",u)),{c(){e=se("hr"),t=Te(),rt(n.$$.fragment)},l(h){e=ae(h,"HR",{}),t=Ae(h),nt(n.$$.fragment,h)},m(h,m){ke(h,e,m),ke(h,t,m),it(n,h,m),a=!0},p(h,m){const w={};!i&&m[0]&16384&&(i=!0,w.consultations=h[14],Qe(()=>i=!1)),!s&&m[0]&2097152&&(s=!0,w.showFullText=h[21],Qe(()=>s=!1)),n.$set(w)},i(h){a||(be(n.$$.fragment,h),a=!0)},o(h){Re(n.$$.fragment,h),a=!1},d(h){h&&(q(e),q(t)),st(n,h)}}}function qg(r){let e,t,n,i,s,a,o,u,c,h,m,w=r[10],d,y=r[11],g,b,p,_,k,I,F,K,M,Y=r[39]?"Свернуть уточнение":"Уточнить",C,oe,Z,N=`Инструменты + `,Q,x,W,ce,G,me,X,he="Использовать многоступенчатый поиск",j,R,$,te,ie,L="Использовать LLM для тизеров",T,S,H,U,D,O="Использовать LLM для фильтрации источников",ne,v,ee,A,l,f="Выключить фильтрацию по порогам",E,B,V,z,ue,ye="Получить более короткий ответ",fe,Ee,Ie,re,xe,Oe="Выводить ответ в реальном времени",Ce,Fe,Se,Ne,Pe,ze="Учитывать консультации в ответе",He,Je,Xe,Ve,pt,Lt="Использовать переранжирование",Yt,Xt,Jt,Tn,Br,ni="Карты проводок по вопросу",An,mr,gr,kn,Pr,ii="Карты проводок по хоз. операциям",xn,an,on,ur,si="Отправить",Cn,xr,Rn,wr,Ct,In,Dn,Nn,On,Fn,Bn,Pn,Ln,Hr,Mn,It,Wr,Qt,Un,zn,jn,Gr,$t,Hn,Wn,Gn,Vr,de,Ue,We,Rt,yr,Kr,br,Vn=r[15]&&Object.keys(r[15]).length>0,Xi,ai,Zi,Cr,Ca="Изменить главный промпт",Yi,_r,Mt,Ji,Ra;n=new Gf({});let er=Mu(r),tr=Uu(r),Nt=r[3]&&zu(r),Ot=r[2]&&ju(r),vt=(r[16]||r[2])&&Hu(r);function dc(pe){r[76](pe)}function pc(pe){r[77](pe)}function mc(pe){r[78](pe)}function gc(pe){r[79](pe)}function wc(pe){r[80](pe)}function yc(pe){r[81](pe)}function bc(pe){r[82](pe)}let Lr={};r[0]!==void 0&&(Lr.llmClarification=r[0]),r[8]!==void 0&&(Lr.searchClarification=r[8]),r[1]!==void 0&&(Lr.searchResults=r[1]),r[14]!==void 0&&(Lr.relevantConsultations=r[14]),r[18]!==void 0&&(Lr.llmResponse=r[18]),r[9]!==void 0&&(Lr.historyIsNotEmpty=r[9]),r[3]!==void 0&&(Lr.userRequest=r[3]),Ct=new Wh({props:Lr}),r[75](Ct),Ke.push(()=>$e(Ct,"llmClarification",dc)),Ke.push(()=>$e(Ct,"searchClarification",pc)),Ke.push(()=>$e(Ct,"searchResults",mc)),Ke.push(()=>$e(Ct,"relevantConsultations",gc)),Ke.push(()=>$e(Ct,"llmResponse",wc)),Ke.push(()=>$e(Ct,"historyIsNotEmpty",yc)),Ke.push(()=>$e(Ct,"userRequest",bc));function _c(pe){r[83](pe)}function vc(pe){r[84](pe)}let Qi={name:"slider-label",size:"sm",$$slots:{default:[Ug]},$$scope:{ctx:r}};r[23]!==void 0&&(Qi.checked=r[23]),r[30]!==void 0&&(Qi.disabled=r[30]),Qt=new Ii({props:Qi}),Ke.push(()=>$e(Qt,"checked",_c)),Ke.push(()=>$e(Qt,"disabled",vc));function Ec(pe){r[85](pe)}function Sc(pe){r[86](pe)}let $i={name:"slider-label",size:"sm",$$slots:{default:[zg]},$$scope:{ctx:r}};r[28]!==void 0&&($i.checked=r[28]),r[30]!==void 0&&($i.disabled=r[30]),$t=new Ii({props:$i}),Ke.push(()=>$e($t,"checked",Ec)),Ke.push(()=>$e($t,"disabled",Sc));function Tc(pe){r[87](pe)}let Ia={name:"slider-label",size:"sm",$$slots:{default:[jg]},$$scope:{ctx:r}};r[4]!==void 0&&(Ia.checked=r[4]),de=new Ii({props:Ia}),Ke.push(()=>$e(de,"checked",Tc));let Et=r[12]&&Wu(r),St=Vn&&Gu(r),Ut=r[36]&&Vu(),Tt=(r[17]||r[9]&&r[1].length>0||r[14]&&r[14].length>0)&&!r[30]&&Ku(r);return{c(){e=se("meta"),t=Te(),rt(n.$$.fragment),i=Te(),s=se("section"),a=se("div"),o=se("div"),u=se("textarea"),c=Te(),h=se("div"),m=se("div"),er.c(),d=Te(),tr.c(),g=Te(),b=se("div"),p=se("a"),_=Ht("svg"),k=Ht("path"),I=Ht("path"),F=ct(` + Справка`),K=Te(),M=se("button"),C=ct(Y),oe=Te(),Z=se("button"),Z.innerHTML=N,Q=Te(),x=se("div"),W=se("div"),ce=se("label"),G=se("input"),me=Te(),X=se("p"),X.textContent=he,j=Te(),R=se("label"),$=se("input"),te=Te(),ie=se("p"),ie.textContent=L,T=Te(),S=se("label"),H=se("input"),U=Te(),D=se("p"),D.textContent=O,ne=Te(),v=se("label"),ee=se("input"),A=Te(),l=se("p"),l.textContent=f,E=Te(),B=se("label"),V=se("input"),z=Te(),ue=se("p"),ue.textContent=ye,fe=Te(),Ee=se("label"),Ie=se("input"),re=Te(),xe=se("p"),xe.textContent=Oe,Ce=Te(),Fe=se("label"),Se=se("input"),Ne=Te(),Pe=se("p"),Pe.textContent=ze,He=Te(),Je=se("label"),Xe=se("input"),Ve=Te(),pt=se("p"),pt.textContent=Lt,Yt=Te(),Xt=se("label"),Jt=se("input"),Tn=Te(),Br=se("p"),Br.textContent=ni,An=Te(),mr=se("label"),gr=se("input"),kn=Te(),Pr=se("p"),Pr.textContent=ii,xn=Te(),Nt&&Nt.c(),an=Te(),Ot&&Ot.c(),on=Te(),ur=se("button"),ur.textContent=si,Cn=Te(),xr=se("div"),vt&&vt.c(),Rn=Te(),wr=se("div"),rt(Ct.$$.fragment),Ln=Te(),Hr=se("div"),Mn=Te(),It=se("div"),Wr=se("div"),rt(Qt.$$.fragment),jn=Te(),Gr=se("div"),rt($t.$$.fragment),Gn=Te(),Vr=se("div"),rt(de.$$.fragment),We=Te(),Rt=se("div"),yr=Te(),Et&&Et.c(),Kr=Te(),br=se("div"),St&&St.c(),Xi=Te(),Ut&&Ut.c(),ai=Te(),Tt&&Tt.c(),Zi=Te(),Cr=se("button"),Cr.textContent=Ca,Yi=Te(),_r=se("textarea"),this.h()},l(pe){const Be=Dc("svelte-1wpbm1r",document.head);e=ae(Be,"META",{name:!0,content:!0}),Be.forEach(q),t=Ae(pe),nt(n.$$.fragment,pe),i=Ae(pe),s=ae(pe,"SECTION",{});var zt=ge(s);a=ae(zt,"DIV",{class:!0});var Rr=ge(a);o=ae(Rr,"DIV",{class:!0});var qr=ge(o);u=ae(qr,"TEXTAREA",{class:!0,rows:!0,placeholder:!0}),ge(u).forEach(q),qr.forEach(q),c=Ae(Rr),h=ae(Rr,"DIV",{class:!0});var mt=ge(h);m=ae(mt,"DIV",{class:!0});var oi=ge(m);er.l(oi),d=Ae(oi),tr.l(oi),oi.forEach(q),g=Ae(mt),b=ae(mt,"DIV",{class:!0});var jt=ge(b);p=ae(jt,"A",{href:!0,target:!0,rel:!0,class:!0});var es=ge(p);_=Wt(es,"svg",{xmlns:!0,width:!0,height:!0,fill:!0,class:!0,viewBox:!0});var ts=ge(_);k=Wt(ts,"path",{d:!0}),ge(k).forEach(q),I=Wt(ts,"path",{d:!0}),ge(I).forEach(q),ts.forEach(q),F=ft(es,` + Справка`),es.forEach(q),K=Ae(jt),M=ae(jt,"BUTTON",{class:!0});var Da=ge(M);C=ft(Da,Y),Da.forEach(q),oe=Ae(jt),Z=ae(jt,"BUTTON",{class:!0,"data-svelte-h":!0}),Ge(Z)!=="svelte-1gystil"&&(Z.innerHTML=N),Q=Ae(jt),x=ae(jt,"DIV",{class:!0,"data-popup":!0});var Na=ge(x);W=ae(Na,"DIV",{});var At=ge(W);ce=ae(At,"LABEL",{class:!0});var ui=ge(ce);G=ae(ui,"INPUT",{class:!0,type:!0}),me=Ae(ui),X=ae(ui,"P",{"data-svelte-h":!0}),Ge(X)!=="svelte-o1whuo"&&(X.textContent=he),ui.forEach(q),j=Ae(At),R=ae(At,"LABEL",{class:!0});var li=ge(R);$=ae(li,"INPUT",{class:!0,type:!0}),te=Ae(li),ie=ae(li,"P",{"data-svelte-h":!0}),Ge(ie)!=="svelte-9zxjq1"&&(ie.textContent=L),li.forEach(q),T=Ae(At),S=ae(At,"LABEL",{class:!0});var ci=ge(S);H=ae(ci,"INPUT",{class:!0,type:!0}),U=Ae(ci),D=ae(ci,"P",{"data-svelte-h":!0}),Ge(D)!=="svelte-1uul1f7"&&(D.textContent=O),ci.forEach(q),ne=Ae(At),v=ae(At,"LABEL",{class:!0});var fi=ge(v);ee=ae(fi,"INPUT",{class:!0,type:!0}),A=Ae(fi),l=ae(fi,"P",{"data-svelte-h":!0}),Ge(l)!=="svelte-jhmp61"&&(l.textContent=f),fi.forEach(q),E=Ae(At),B=ae(At,"LABEL",{class:!0});var hi=ge(B);V=ae(hi,"INPUT",{class:!0,type:!0}),z=Ae(hi),ue=ae(hi,"P",{"data-svelte-h":!0}),Ge(ue)!=="svelte-1548adw"&&(ue.textContent=ye),hi.forEach(q),fe=Ae(At),Ee=ae(At,"LABEL",{class:!0});var di=ge(Ee);Ie=ae(di,"INPUT",{class:!0,type:!0}),re=Ae(di),xe=ae(di,"P",{"data-svelte-h":!0}),Ge(xe)!=="svelte-tnawxy"&&(xe.textContent=Oe),di.forEach(q),Ce=Ae(At),Fe=ae(At,"LABEL",{class:!0});var pi=ge(Fe);Se=ae(pi,"INPUT",{class:!0,type:!0}),Ne=Ae(pi),Pe=ae(pi,"P",{"data-svelte-h":!0}),Ge(Pe)!=="svelte-vv6jwf"&&(Pe.textContent=ze),pi.forEach(q),He=Ae(At),Je=ae(At,"LABEL",{class:!0});var mi=ge(Je);Xe=ae(mi,"INPUT",{class:!0,type:!0}),Ve=Ae(mi),pt=ae(mi,"P",{"data-svelte-h":!0}),Ge(pt)!=="svelte-qkyc7c"&&(pt.textContent=Lt),mi.forEach(q),Yt=Ae(At),Xt=ae(At,"LABEL",{class:!0});var gi=ge(Xt);Jt=ae(gi,"INPUT",{class:!0,type:!0}),Tn=Ae(gi),Br=ae(gi,"P",{"data-svelte-h":!0}),Ge(Br)!=="svelte-17zslqw"&&(Br.textContent=ni),gi.forEach(q),An=Ae(At),mr=ae(At,"LABEL",{class:!0});var wi=ge(mr);gr=ae(wi,"INPUT",{class:!0,type:!0}),kn=Ae(wi),Pr=ae(wi,"P",{"data-svelte-h":!0}),Ge(Pr)!=="svelte-1esqmyo"&&(Pr.textContent=ii),wi.forEach(q),At.forEach(q),Na.forEach(q),xn=Ae(jt),Nt&&Nt.l(jt),an=Ae(jt),Ot&&Ot.l(jt),on=Ae(jt),ur=ae(jt,"BUTTON",{title:!0,class:!0,"data-svelte-h":!0}),Ge(ur)!=="svelte-w5ppob"&&(ur.textContent=si),jt.forEach(q),Cn=Ae(mt),xr=ae(mt,"DIV",{class:!0});var Oa=ge(xr);vt&&vt.l(Oa),Oa.forEach(q),Rn=Ae(mt),wr=ae(mt,"DIV",{class:!0});var Fa=ge(wr);nt(Ct.$$.fragment,Fa),Fa.forEach(q),Ln=Ae(mt),Hr=ae(mt,"DIV",{class:!0}),ge(Hr).forEach(q),Mn=Ae(mt),It=ae(mt,"DIV",{class:!0});var vr=ge(It);Wr=ae(vr,"DIV",{});var Ba=ge(Wr);nt(Qt.$$.fragment,Ba),Ba.forEach(q),jn=Ae(vr),Gr=ae(vr,"DIV",{});var Pa=ge(Gr);nt($t.$$.fragment,Pa),Pa.forEach(q),Gn=Ae(vr),Vr=ae(vr,"DIV",{});var La=ge(Vr);nt(de.$$.fragment,La),La.forEach(q),We=Ae(vr),Rt=ae(vr,"DIV",{}),ge(Rt).forEach(q),yr=Ae(vr),Et&&Et.l(vr),vr.forEach(q),Kr=Ae(mt),br=ae(mt,"DIV",{class:!0});var Ma=ge(br);St&&St.l(Ma),Ma.forEach(q),Xi=Ae(mt),Ut&&Ut.l(mt),ai=Ae(mt),Tt&&Tt.l(mt),mt.forEach(q),Rr.forEach(q),Zi=Ae(zt),Cr=ae(zt,"BUTTON",{style:!0,"data-svelte-h":!0}),Ge(Cr)!=="svelte-w6zwbb"&&(Cr.textContent=Ca),Yi=Ae(zt),_r=ae(zt,"TEXTAREA",{class:!0}),ge(_r).forEach(q),zt.forEach(q),this.h()},h(){document.title="LLM demo app",P(e,"name","description"),P(e,"content","LLM demo app"),P(u,"class","auto-expand-textarea svelte-rgnwju"),P(u,"rows","1"),P(u,"placeholder","Введите ваш запрос..."),P(o,"class","grow-wrap w-full svelte-rgnwju"),P(m,"class","status-components svelte-rgnwju"),P(k,"d","M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"),P(I,"d","M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"),P(_,"xmlns","http://www.w3.org/2000/svg"),P(_,"width","16"),P(_,"height","16"),P(_,"fill","currentColor"),P(_,"class","bi bi-question-circle svelte-rgnwju"),P(_,"viewBox","0 0 16 16"),P(p,"href",`${r[41]}file/view/id/${r[45]}`),P(p,"target","_blank"),P(p,"rel","noopener noreferrer"),P(p,"class","btn variant-outline-tertiary reference-btn svelte-rgnwju"),P(M,"class","btn variant-outline-tertiary"),P(Z,"class","btn variant-outline-tertiary w-48 justify-between hidden"),P(G,"class","checkbox accent-white"),P(G,"type","checkbox"),G.disabled=r[30],P(ce,"class","flex items-center space-x-2"),P($,"class","checkbox accent-white"),P($,"type","checkbox"),$.disabled=r[30],P(R,"class","flex items-center space-x-2"),P(H,"class","checkbox accent-white"),P(H,"type","checkbox"),H.disabled=r[30],P(S,"class","flex items-center space-x-2"),P(ee,"class","checkbox accent-white"),P(ee,"type","checkbox"),ee.disabled=r[30],P(v,"class","flex items-center space-x-2"),P(V,"class","checkbox accent-white"),P(V,"type","checkbox"),V.disabled=r[30],P(B,"class","flex items-center space-x-2"),P(Ie,"class","checkbox accent-white"),P(Ie,"type","checkbox"),Ie.disabled=r[30],P(Ee,"class","flex items-center space-x-2"),P(Se,"class","checkbox accent-white"),P(Se,"type","checkbox"),Se.disabled=r[30],P(Fe,"class","flex items-center space-x-2"),P(Xe,"class","checkbox accent-white"),P(Xe,"type","checkbox"),Xe.disabled=r[30],P(Je,"class","flex items-center space-x-2"),P(Jt,"class","checkbox accent-white"),P(Jt,"type","checkbox"),P(Xt,"class","flex items-center space-x-2"),P(gr,"class","checkbox accent-white"),P(gr,"type","checkbox"),P(mr,"class","flex items-center space-x-2"),P(x,"class","card p-4 w-150 shadow-xl z-10"),P(x,"data-popup","popupFeatured"),P(ur,"title","Ctrl+Enter"),P(ur,"class","btn variant-filled"),P(b,"class","flex space-x-2 items-center"),P(xr,"class","flex space-x-2 items-center justify-center w-full"),P(wr,"class","w-full"),lt(wr,"hidden",!r[39]),P(Hr,"class","w-full my-2"),P(It,"class","card w-[calc(50%-0.5rem)] p-2 mr-2"),P(br,"class","w-full my-2"),P(h,"class","search-second-bar w-full svelte-rgnwju"),P(a,"class","search-bar flex flex-wrap svelte-rgnwju"),Gt(Cr,"color","transparent"),lt(Cr,"hidden",!r[44]),P(_r,"class","svelte-rgnwju"),lt(_r,"hidden",!r[40])},m(pe,Be){J(document.head,e),ke(pe,t,Be),it(n,pe,Be),ke(pe,i,Be),ke(pe,s,Be),J(s,a),J(a,o),J(o,u),ir(u,r[3]),J(a,c),J(a,h),J(h,m),er.m(m,null),J(m,d),tr.m(m,null),J(h,g),J(h,b),J(b,p),J(p,_),J(_,k),J(_,I),J(p,F),J(b,K),J(b,M),J(M,C),J(b,oe),J(b,Z),J(b,Q),J(b,x),J(x,W),J(W,ce),J(ce,G),G.checked=r[25],J(ce,me),J(ce,X),J(W,j),J(W,R),J(R,$),$.checked=r[24],J(R,te),J(R,ie),J(W,T),J(W,S),J(S,H),H.checked=r[27],J(S,U),J(S,D),J(W,ne),J(W,v),J(v,ee),ee.checked=r[29],J(v,A),J(v,l),J(W,E),J(W,B),J(B,V),V.checked=r[31],J(B,z),J(B,ue),J(W,fe),J(W,Ee),J(Ee,Ie),Ie.checked=r[33],J(Ee,re),J(Ee,xe),J(W,Ce),J(W,Fe),J(Fe,Se),Se.checked=r[37],J(Fe,Ne),J(Fe,Pe),J(W,He),J(W,Je),J(Je,Xe),Xe.checked=r[26],J(Je,Ve),J(Je,pt),J(W,Yt),J(W,Xt),J(Xt,Jt),Jt.checked=r[4],J(Xt,Tn),J(Xt,Br),J(W,An),J(W,mr),J(mr,gr),gr.checked=r[5],J(mr,kn),J(mr,Pr),J(b,xn),Nt&&Nt.m(b,null),J(b,an),Ot&&Ot.m(b,null),J(b,on),J(b,ur),J(h,Cn),J(h,xr),vt&&vt.m(xr,null),J(h,Rn),J(h,wr),it(Ct,wr,null),J(h,Ln),J(h,Hr),J(h,Mn),J(h,It),J(It,Wr),it(Qt,Wr,null),J(It,jn),J(It,Gr),it($t,Gr,null),J(It,Gn),J(It,Vr),it(de,Vr,null),J(It,We),J(It,Rt),J(It,yr),Et&&Et.m(It,null),J(h,Kr),J(h,br),St&&St.m(br,null),J(h,Xi),Ut&&Ut.m(h,null),J(h,ai),Tt&&Tt.m(h,null),J(s,Zi),J(s,Cr),J(s,Yi),J(s,_r),ir(_r,r[13]),Mt=!0,Ji||(Ra=[De(u,"input",r[64]),De(u,"input",r[50]),De(u,"keydown",r[52]),De(M,"click",r[49]),Nc(Uc.call(null,Z,r[59])),De(G,"change",r[65]),De($,"change",r[66]),De(H,"change",r[67]),De(ee,"change",r[68]),De(V,"change",r[69]),De(Ie,"change",r[70]),De(Se,"change",r[71]),De(Xe,"change",r[72]),De(Jt,"change",r[73]),De(gr,"change",r[74]),De(ur,"click",r[54]),De(Cr,"click",r[103]),De(_r,"input",r[104])],Ji=!0)},p(pe,Be){Be[0]&8&&ir(u,pe[3]),Be[0]&1024&&wt(w,w=pe[10])?(ht(),Re(er,1,1,qe),dt(),er=Mu(pe),er.c(),be(er,1),er.m(m,d)):er.p(pe,Be),Be[0]&2048&&wt(y,y=pe[11])?(ht(),Re(tr,1,1,qe),dt(),tr=Uu(pe),tr.c(),be(tr,1),tr.m(m,null)):tr.p(pe,Be),(!Mt||Be[1]&256)&&Y!==(Y=pe[39]?"Свернуть уточнение":"Уточнить")&&qt(C,Y),(!Mt||Be[0]&1073741824)&&(G.disabled=pe[30]),Be[0]&33554432&&(G.checked=pe[25]),(!Mt||Be[0]&1073741824)&&($.disabled=pe[30]),Be[0]&16777216&&($.checked=pe[24]),(!Mt||Be[0]&1073741824)&&(H.disabled=pe[30]),Be[0]&134217728&&(H.checked=pe[27]),(!Mt||Be[0]&1073741824)&&(ee.disabled=pe[30]),Be[0]&536870912&&(ee.checked=pe[29]),(!Mt||Be[0]&1073741824)&&(V.disabled=pe[30]),Be[1]&1&&(V.checked=pe[31]),(!Mt||Be[0]&1073741824)&&(Ie.disabled=pe[30]),Be[1]&4&&(Ie.checked=pe[33]),(!Mt||Be[0]&1073741824)&&(Se.disabled=pe[30]),Be[1]&64&&(Se.checked=pe[37]),(!Mt||Be[0]&1073741824)&&(Xe.disabled=pe[30]),Be[0]&67108864&&(Xe.checked=pe[26]),Be[0]&16&&(Jt.checked=pe[4]),Be[0]&32&&(gr.checked=pe[5]),pe[3]?Nt?Nt.p(pe,Be):(Nt=zu(pe),Nt.c(),Nt.m(b,an)):Nt&&(Nt.d(1),Nt=null),pe[2]?Ot?Ot.p(pe,Be):(Ot=ju(pe),Ot.c(),Ot.m(b,on)):Ot&&(Ot.d(1),Ot=null),pe[16]||pe[2]?vt?(vt.p(pe,Be),Be[0]&65540&&be(vt,1)):(vt=Hu(pe),vt.c(),be(vt,1),vt.m(xr,null)):vt&&(ht(),Re(vt,1,1,()=>{vt=null}),dt());const zt={};!In&&Be[0]&1&&(In=!0,zt.llmClarification=pe[0],Qe(()=>In=!1)),!Dn&&Be[0]&256&&(Dn=!0,zt.searchClarification=pe[8],Qe(()=>Dn=!1)),!Nn&&Be[0]&2&&(Nn=!0,zt.searchResults=pe[1],Qe(()=>Nn=!1)),!On&&Be[0]&16384&&(On=!0,zt.relevantConsultations=pe[14],Qe(()=>On=!1)),!Fn&&Be[0]&262144&&(Fn=!0,zt.llmResponse=pe[18],Qe(()=>Fn=!1)),!Bn&&Be[0]&512&&(Bn=!0,zt.historyIsNotEmpty=pe[9],Qe(()=>Bn=!1)),!Pn&&Be[0]&8&&(Pn=!0,zt.userRequest=pe[3],Qe(()=>Pn=!1)),Ct.$set(zt),(!Mt||Be[1]&256)&<(wr,"hidden",!pe[39]);const Rr={};Be[3]&1073741824&&(Rr.$$scope={dirty:Be,ctx:pe}),!Un&&Be[0]&8388608&&(Un=!0,Rr.checked=pe[23],Qe(()=>Un=!1)),!zn&&Be[0]&1073741824&&(zn=!0,Rr.disabled=pe[30],Qe(()=>zn=!1)),Qt.$set(Rr);const qr={};Be[3]&1073741824&&(qr.$$scope={dirty:Be,ctx:pe}),!Hn&&Be[0]&268435456&&(Hn=!0,qr.checked=pe[28],Qe(()=>Hn=!1)),!Wn&&Be[0]&1073741824&&(Wn=!0,qr.disabled=pe[30],Qe(()=>Wn=!1)),$t.$set(qr);const mt={};Be[3]&1073741824&&(mt.$$scope={dirty:Be,ctx:pe}),!Ue&&Be[0]&16&&(Ue=!0,mt.checked=pe[4],Qe(()=>Ue=!1)),de.$set(mt),pe[12]?Et?(Et.p(pe,Be),Be[0]&4096&&be(Et,1)):(Et=Wu(pe),Et.c(),be(Et,1),Et.m(It,null)):Et&&(ht(),Re(Et,1,1,()=>{Et=null}),dt()),Be[0]&32768&&(Vn=pe[15]&&Object.keys(pe[15]).length>0),Vn?St?(St.p(pe,Be),Be[0]&32768&&be(St,1)):(St=Gu(pe),St.c(),be(St,1),St.m(br,null)):St&&(ht(),Re(St,1,1,()=>{St=null}),dt()),pe[36]?Ut||(Ut=Vu(),Ut.c(),Ut.m(h,ai)):Ut&&(Ut.d(1),Ut=null),(pe[17]||pe[9]&&pe[1].length>0||pe[14]&&pe[14].length>0)&&!pe[30]?Tt?(Tt.p(pe,Be),Be[0]&1073889794&&be(Tt,1)):(Tt=Ku(pe),Tt.c(),be(Tt,1),Tt.m(h,null)):Tt&&(ht(),Re(Tt,1,1,()=>{Tt=null}),dt()),Be[0]&8192&&ir(_r,pe[13]),(!Mt||Be[1]&512)&<(_r,"hidden",!pe[40])},i(pe){Mt||(be(n.$$.fragment,pe),be(er),be(tr),be(vt),be(Ct.$$.fragment,pe),be(Qt.$$.fragment,pe),be($t.$$.fragment,pe),be(de.$$.fragment,pe),be(Et),be(St),be(Tt),Mt=!0)},o(pe){Re(n.$$.fragment,pe),Re(er),Re(tr),Re(vt),Re(Ct.$$.fragment,pe),Re(Qt.$$.fragment,pe),Re($t.$$.fragment,pe),Re(de.$$.fragment,pe),Re(Et),Re(St),Re(Tt),Mt=!1},d(pe){pe&&(q(t),q(i),q(s)),q(e),st(n,pe),er.d(pe),tr.d(pe),Nt&&Nt.d(),Ot&&Ot.d(),vt&&vt.d(),r[75](null),st(Ct),st(Qt),st($t),st(de),Et&&Et.d(),St&&St.d(),Ut&&Ut.d(),Tt&&Tt.d(),Ji=!1,or(Ra)}}}let Xg=`Ты юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. Помни, что ты профессиональный юрист и твои ответы должны быть формальными, содержательными и точными. Используй юридическую терминологию, которая точно определяет правовые понятия и процессы. Подписывай используемые источники рядом с местом, где ты их использовал. Используй официально-деловой стиль. Я предоставлю тебе запрос, юридические источники, ответ на запрос от эксперта и уточнения от пользователя. Ты действуешь по такому плану: +1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками. +2) Прочитай ответ эксперта. Прочитай уточнения от пользователя. Подумай чего не хватает в ответе эксперта. +3) Составь новый ответ на запрос, ориентируясь на твои мысли из пункта 1 и 2. Твой ответ должен решить как изначальный запрос, так и обязательно использовать информацию из уточнения. Ответ должен соблюдать все правила, которые я задавал тебе ранее. +4) Выводишь итоговый ответ в таком виде "По Вашему запросу сообщаем: [Текст твоего ответа]". Закончи фразой "Конец ответа". +Отвечай всегда только на РУССКОМ языке! +Запрос: {{ВОПРОС}} +Юридические источники: {{ИСТОЧНИКИ}} +Ответ эксперта: {{ПРОШЛЫЙ ОТВЕТ}} +Уточнения: {{УТОЧНЕНИЯ}}`;async function Qu(r,e){try{const t=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`${e}: ${t.statusText}`);return t.json()}catch(t){return console.error(e,t.message),null}}function Zg(r,e,t){let{data:n}=e;const{ENV_DOCUMENT_DB_URL:i,ENV_ENABLE_DOCUMENT_DB:s,ENV_ENABLE_DB_SUPPORT:a,ENV_ENABLE_DEV_FEATURES:o,ENV_DISABLE_HEALTH_CHECKS:u,ENV_FAQ_DOCUMENT_ID:c}=n;let h;Qc();let m=!1;const w={message:"Спасибо за оценку!",timeout:5e3},d=ul();Qn(()=>{t(7,m=window.innerWidth<=768)});let y="",g="",b=!0,p="unknown",_="unknown",k=!1,I=Mg;function F(de){t(13,I=de)}function K(){t(12,k=!1)}async function M(){const de=`${window.location.origin}/llm/health`,Ue=await Qu(de,"Error fetching Llama health status");t(10,p=Ue?.status)}async function Y(){const de=`${window.location.origin}/search/health`,Ue=await Qu(de,"Error fetching search health status");Ue&&t(11,_=Ue.status)}async function C(){await Promise.all([M(),Y()])}let oe;Qn(async()=>{C(),oe=setInterval(async()=>{C()},3e4),u&&clearInterval(oe)}),ua(()=>{clearInterval(oe),Xe()});let Z=[],N=[],Q=null,x=!1,W=!1,ce=!1,G="",me="",X=!0,he="",j="",R="",$=Array(Z.length).fill(!1),te=Array(N.length).fill(!1),ie,L=!1,T=!1,S=!1,H=!0,U=!0,D=!1,O=!1,ne=!0,v=!1,ee=!1,A=!1,l=!1,f=!1,E=!1,B="",V=!1,z=!1,ue=!1,ye=!1,fe=!1,Ee=null,Ie="";const re=async de=>{t(18,G=""),X=!0,t(16,x=!1),t(2,W=!1),t(17,ce=!1),t(1,Z=[]),t(14,N=[]),t(15,Q={}),t(3,he=""),t(63,j=""),t(35,V=!1),t(36,z=!1),h.clear(),Xe()},xe=async de=>{t(39,fe=!fe)},Oe=de=>{t(3,he=de.target.value);const Ue=de.target.parentNode;Ue&&(Ue.dataset.replicatedValue=he)},Ce=de=>{t(34,B=de.target.value);const Ue=de.target.parentNode;Ue&&(Ue.dataset.replicatedValue=he)},Fe=de=>{de.ctrlKey&&de.key==="Enter"&&(de.preventDefault(),Je())};function Se(de){let Ue=de.map(({title:We,text:Rt,text_for_llm:yr},Kr)=>`${We}: +(${yr||Rt})`).join(` +\\ +`);return ue&&(Ue+=(N||[]).map(({title:We,text:Rt})=>`${We} +${Rt}`).join(` +\\ +`)),Ue}async function Ne(){if(fe&&g&&me){let de="",Ue="";if(X=!1,L){if(de=Se(Z.filter((We,Rt)=>ie[We.title])),!de){t(18,G="Выберите хотя бы один документ из результатов поиска.");return}}else{const We=Z.slice(0,10);de=Se(We)}Ue=Xg.replace("{{ВОПРОС}}",he).replace("{{ИСТОЧНИКИ}}",de).replace("{{ПРОШЛЫЙ ОТВЕТ}}",me).replace("{{УТОЧНЕНИЯ}}",g),t(18,G=""),await ze(Ue)}}const Pe=async()=>{let de="",Ue="";if(L){if(de=Se(Z.filter((We,Rt)=>ie[We.title])),!de){t(18,G="Выберите хотя бы один документ из результатов поиска.");return}}else{const We=Z.slice(0,10);de=Se(We)}Ue=I.replace("{{ВОПРОС}}",he).replace("{{ИСТОЧНИКИ}}",de),await ze(Ue)},ze=async de=>{t(2,W=!0),t(19,R="Запрос поставлен в очередь на генерацию ответа"),t(63,j=he);const Ue=async We=>{const Rt=await fetch("/llm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userprompt:We}),signal:He.signal});try{if(He.signal.aborted){console.log("Request was cancelled.");return}if(!Rt.body){console.log("Response has no body");return}const yr=Rt.body.pipeThrough(new TextDecoderStream).getReader();let Kr=!0;for(t(19,R="Генерируем ответ на основе результатов поиска");Kr;){const{value:br,done:Vn}=await yr.read();if(Vn){Kr=!1;break}br&&t(18,G+=br.replaceAll(` +`,"
"))}}catch(yr){yr.name==="AbortError"?console.log("Fetch was aborted during reading."):console.error("Error during reading:",yr)}};await Ue(de),G.includes("Конец ответ")||(de=`${de}${G}`,await Ue(de)),l||(Ie=de,t(19,R=""),t(2,W=!1),t(35,V=!0),t(62,me=G),Ee=await Kn.log({consultations:(N||[]).map(We=>JSON.stringify(We)),llmPrompt:de,llmResponse:G.replaceAll("
",` +`),searchResults:Z.map(We=>JSON.stringify(We)),selectedSearchResults:Z.filter((We,Rt)=>ie[We.title]).map(We=>JSON.stringify(We)),userScore:void 0,userComment:B,userRequest:he,uiSettings:{enableSearchResultSelection:L,enableLLMForTeasers:T,doMultistepSearch:S,useAccountingDocs:H,useReranking:U,useLLMForFiltering:D,disableThresholds:ne,searchInTransactionLedgerByOperation:A,searchInTransactionLedgerByQuestion:ee,useShortestPrompt:l,enableRealtimeLlmReponse:E,sendConsultationToLlm:ue}})),h.updateCurrentState(null,null,G,null,Q)};let He=new AbortController;const Je=async de=>{await Xe(),t(20,$=Array(10).fill(!1)),t(21,te=Array(10).fill(!1)),t(22,ie={}),t(18,G=""),t(62,me=""),X=!0,t(32,f=!1),t(35,V=!1),t(16,x=!0),t(2,W=!1),t(17,ce=!0),t(36,z=!1),t(19,R="Ищем релевантные документы"),h.addState(he);try{const Ue=await fetch("/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:he+` +`+y,use_llm_for_teasers:T,do_multistep_search:S,use_accounting_docs:H,use_reranking:U,disable_thresholds:ne,find_transaction_maps_by_question:ee,find_transaction_maps_by_operation:A,use_llm_for_filtering:D,use_keywords:O}),signal:He.signal});if(!Ue.ok)throw new Error(`Failed to fetch search results: ${Ue.statusText}`);const We=await Ue.json();if(We.error)throw We;We.searchResults!=null?(t(1,Z=Zt.mergeResultsByTitle(We.searchResults)),t(1,Z=Zt.sortByRelevance(Z)),t(1,Z=Zt.identifyDocumentType(Z)),Z.map(Rt=>Rt.teaser=Rt.text_for_llm||Rt.teaser)):t(1,Z=[]),console.log(Z),We.consultations!=null?t(14,N=We.consultations):t(14,N=[]),We.transactionMapResults!=null?t(15,Q=We.transactionMapResults):(t(15,Q=[]),v&&t(36,z=!0)),h.updateCurrentState(he,Z,null,N,Q),t(19,R=""),t(16,x=!1),t(17,ce=!1)}catch(Ue){console.log(JSON.stringify(Ue)),Ue.name==="AbortError"?(alert("Сервис поиска не отвечает. Попробуйте изменить и повторить запрос"),console.error("Request was aborted due to timeout")):(Ue.error&&alert(Ue.error),console.error("Fetch error:",Ue))}finally{t(19,R=""),t(16,x=!1),t(36,z=!1),t(17,ce=!1)}v||(Z&&Z.length>0?L||await Pe():t(36,z=!0))},Xe=()=>{He.abort("user canceled"),He=new AbortController,t(2,W=!1),t(19,R=""),Ee=null,Ie=""};async function Ve(){t(18,G=""),t(62,me=""),X=!0,await Xe(),h.addState(he),h.updateCurrentState(null,Z,me,N,Q),setTimeout(async()=>{console.log(X),await Pe()},1e3)}async function pt(){Ee!=null?await Kn.logUserScore(Ee,"positive",B):Ee=await Kn.log({consultations:(N||[]).map(de=>JSON.stringify(de)),llmPrompt:Ie,llmResponse:G.replaceAll("
",` +`),searchResults:Z.map(de=>JSON.stringify(de)),selectedSearchResults:Z.filter((de,Ue)=>ie[de.title]).map(de=>JSON.stringify(de)),userScore:"positive",userComment:B,userRequest:he,uiSettings:{enableSearchResultSelection:L,enableLLMForTeasers:T,doMultistepSearch:S,useAccountingDocs:H,useReranking:U,useLLMForFiltering:D,useKeywords:O,disableThresholds:ne,searchInTransactionLedgerByOperation:A,searchInTransactionLedgerByQuestion:ee,useShortestPrompt:l,enableRealtimeLlmReponse:E,sendConsultationToLlm:ue}}),d.trigger(w),t(34,B="")}async function Lt(){Ee!=null?await Kn.logUserScore(Ee,"negative",B):Ee=await Kn.log({consultations:(N||[]).map(de=>JSON.stringify(de)),llmPrompt:Ie,llmResponse:G.replaceAll("
",` +`),searchResults:Z.map(de=>JSON.stringify(de)),selectedSearchResults:Z.filter((de,Ue)=>ie[de.title]).map(de=>JSON.stringify(de)),userScore:"negative",userComment:B,userRequest:he,uiSettings:{enableSearchResultSelection:L,enableLLMForTeasers:T,doMultistepSearch:S,useAccountingDocs:H,useReranking:U,useLLMForFiltering:D,useKeywords:O,disableThresholds:ne,searchInTransactionLedgerByOperation:A,searchInTransactionLedgerByQuestion:ee,useShortestPrompt:l,enableRealtimeLlmReponse:E,sendConsultationToLlm:ue}}),d.trigger(w),t(34,B="")}const Yt={event:"click",target:"popupFeatured",placement:"bottom"};async function Xt(){let de={consultations:(N||[]).map(Ue=>JSON.stringify(Ue)),llmResponse:G.replaceAll("
",` +`),searchResults:Z.map(Ue=>({title:Ue.title,text:Ue.text_for_llm||Ue.text})),userRequest:he,uiSettings:{enableSearchResultSelection:L,enableLLMForTeasers:T,doMultistepSearch:S,useAccountingDocs:H,useReranking:U,useLLMForFiltering:D,useKeywords:O,disableThresholds:ne,searchInTransactionLedgerByOperation:A,searchInTransactionLedgerByQuestion:ee,useShortestPrompt:l,enableRealtimeLlmReponse:E,sendConsultationToLlm:ue}};Lg.createDocxFromObject(de)}let Jt=!1;function Tn(){he=this.value,t(3,he)}function Br(){S=this.checked,t(25,S),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function ni(){T=this.checked,t(24,T),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function An(){D=this.checked,t(27,D),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function mr(){ne=this.checked,t(29,ne),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function gr(){l=this.checked,t(31,l),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function kn(){E=this.checked,t(33,E),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function Pr(){ue=this.checked,t(37,ue),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function ii(){U=this.checked,t(26,U),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function xn(){ee=this.checked,t(4,ee)}function an(){A=this.checked,t(5,A)}function on(de){Ke[de?"unshift":"push"](()=>{h=de,t(6,h)})}function ur(de){g=de,t(0,g)}function si(de){y=de,t(8,y)}function Cn(de){Z=de,t(1,Z)}function xr(de){N=de,t(14,N)}function Rn(de){G=de,t(18,G)}function wr(de){b=de,t(9,b)}function Ct(de){he=de,t(3,he)}function In(de){L=de,t(23,L),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function Dn(de){v=de,t(30,v),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function Nn(de){O=de,t(28,O),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function On(de){v=de,t(30,v),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function Fn(de){ee=de,t(4,ee)}function Bn(de){Q=de,t(15,Q)}function Pn(){B=this.value,t(34,B)}function Ln(de){Z=de,t(1,Z)}function Hr(de){$=de,t(20,$)}function Mn(de){ie=de,t(22,ie)}function It(de){L=de,t(23,L),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function Wr(de){N=de,t(14,N)}function Qt(de){te=de,t(21,te)}function Un(de){Z=de,t(1,Z)}function zn(de){$=de,t(20,$)}function jn(de){ie=de,t(22,ie)}function Gr(de){L=de,t(23,L),t(5,A),t(4,ee),t(0,g),t(1,Z),t(62,me),t(63,j),t(3,he),t(2,W)}function $t(de){N=de,t(14,N)}function Hn(de){te=de,t(21,te)}function Wn(){B=this.value,t(34,B)}const Gn=()=>{t(40,Jt=!Jt)};function Vr(){I=this.value,t(13,I)}return r.$$set=de=>{"data"in de&&t(61,n=de.data)},r.$$.update=()=>{r.$$.dirty[0]&63|r.$$.dirty[2]&3&&(A||ee?(t(30,v=!0),t(23,L=!1),t(24,T=!1),t(25,S=!1),H=!1,t(26,U=!1),t(27,D=!1),t(28,O=!1),t(29,ne=!1),t(31,l=!1),t(33,E=!1),t(37,ue=!1)):t(30,v=!1),g&&Z.length>0&&me&&j==he&&!W?t(38,ye=!0):t(38,ye=!1))},[g,Z,W,he,ee,A,h,m,y,b,p,_,k,I,N,Q,x,ce,G,R,$,te,ie,L,T,S,U,D,O,ne,v,l,f,E,B,V,z,ue,ye,fe,Jt,i,s,a,o,c,F,K,re,xe,Oe,Ce,Fe,Ne,Je,Xe,Ve,pt,Lt,Yt,Xt,n,me,j,Tn,Br,ni,An,mr,gr,kn,Pr,ii,xn,an,on,ur,si,Cn,xr,Rn,wr,Ct,In,Dn,Nn,On,Fn,Bn,Pn,Ln,Hr,Mn,It,Wr,Qt,Un,zn,jn,Gr,$t,Hn,Wn,Gn,Vr]}class c1 extends kt{constructor(e){super(),xt(this,e,Zg,qg,wt,{data:61},null,[-1,-1,-1,-1])}}export{c1 as component,n1 as universal};