Files
calypso/dist/airgap/calypso-appliance-1.0.0-airgap/frontend/assets/index-ChZMKDzx.js
2026-01-21 12:31:24 +00:00

208 lines
1.7 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-BqkUSV0N.js","assets/react-vendor-Dvs2KPqW.js","assets/utils-vendor-CJpcXyE0.js"])))=>i.map(i=>d[i]);
import{u as ft,j as e,a as dt,b as Nr,Q as A6,c as c6}from"./query-vendor-BeRQtQod.js";import{a as d6,b as u6,g as h6,u as Ph,r as Ce,L as ba,R as $B,d as jy,e as Cy,O as f6,B as m6,f as p6,h as Fs,N as x6}from"./react-vendor-Dvs2KPqW.js";import{c as g6,a as b6,_ as y6,b as Yr}from"./utils-vendor-CJpcXyE0.js";import{R as Cn,C as e4,T as t4,M as r4,a as su,b as Ec,A as Wm,d as Eh,t as w6,c as v6,B as Lb,e as s4,I as a4,f as n4,g as wc,h as es,P as Ks,i as i4,j as Ka,S as vc,N as ya,k as N6,l as B6,m as io,n as Sy,o as so,H as Ul,p as j6,q as wh,r as Uh,s as up,X as Zs,U as Vd,u as C6,G as S6,v as Tb,F as au,w as hp,x as Ib,y as _6,L as Xm,z as zf,D as k6,E as Bn,J as fp,K as mp,O as pp,Q as Wd,V as o4,W as xv,Y as Db,Z as F6,_ as E6,$ as gv,a0 as U6,a1 as l4,a2 as _l,a3 as Wx,a4 as Q6,a5 as bv,a6 as A4,a7 as _y,a8 as c4,a9 as d4,aa as u4,ab as h4,ac as L6,ad as Tm,ae as T6,af as Xx,ag as Im,ah as I6,ai as D6,aj as R6,ak as yv,al as wv,am as O6,an as vv,ao as H6,ap as M6,aq as P6}from"./ui-vendor-C4xvlrdo.js";import{R as Cl,L as ky,C as Nc,X as Bc,Y as jc,T as Sl,a as Qh,b as Lh,A as f4,c as vh,P as Nv,d as Bv,e as Yx,B as jv,f as Jx}from"./chart-vendor-CnBPFalK.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();var Zx={exports:{}},Zu={},$x={exports:{}},eg={};var Cv;function K6(){return Cv||(Cv=1,(function(r){function t(ae,se){var fe=ae.length;ae.push(se);e:for(;0<fe;){var ye=fe-1>>>1,_e=ae[ye];if(0<o(_e,se))ae[ye]=se,ae[fe]=_e,fe=ye;else break e}}function s(ae){return ae.length===0?null:ae[0]}function n(ae){if(ae.length===0)return null;var se=ae[0],fe=ae.pop();if(fe!==se){ae[0]=fe;e:for(var ye=0,_e=ae.length,xe=_e>>>1;ye<xe;){var D=2*(ye+1)-1,$=ae[D],X=D+1,te=ae[X];if(0>o($,fe))X<_e&&0>o(te,$)?(ae[ye]=te,ae[X]=fe,ye=X):(ae[ye]=$,ae[D]=fe,ye=D);else if(X<_e&&0>o(te,fe))ae[ye]=te,ae[X]=fe,ye=X;else break e}}return se}function o(ae,se){var fe=ae.sortIndex-se.sortIndex;return fe!==0?fe:ae.id-se.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;r.unstable_now=function(){return l.now()}}else{var d=Date,c=d.now();r.unstable_now=function(){return d.now()-c}}var u=[],h=[],m=1,x=null,y=3,p=!1,v=!1,N=!1,B=!1,g=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function w(ae){for(var se=s(h);se!==null;){if(se.callback===null)n(h);else if(se.startTime<=ae)n(h),se.sortIndex=se.expirationTime,t(u,se);else break;se=s(h)}}function L(ae){if(N=!1,w(ae),!v)if(s(u)!==null)v=!0,K||(K=!0,U());else{var se=s(h);se!==null&&le(L,se.startTime-ae)}}var K=!1,M=-1,V=5,T=-1;function ne(){return B?!0:!(r.unstable_now()-T<V)}function Z(){if(B=!1,K){var ae=r.unstable_now();T=ae;var se=!0;try{e:{v=!1,N&&(N=!1,j(M),M=-1),p=!0;var fe=y;try{t:{for(w(ae),x=s(u);x!==null&&!(x.expirationTime>ae&&ne());){var ye=x.callback;if(typeof ye=="function"){x.callback=null,y=x.priorityLevel;var _e=ye(x.expirationTime<=ae);if(ae=r.unstable_now(),typeof _e=="function"){x.callback=_e,w(ae),se=!0;break t}x===s(u)&&n(u),w(ae)}else n(u);x=s(u)}if(x!==null)se=!0;else{var xe=s(h);xe!==null&&le(L,xe.startTime-ae),se=!1}}break e}finally{x=null,y=fe,p=!1}se=void 0}}finally{se?U():K=!1}}}var U;if(typeof _=="function")U=function(){_(Z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,F=q.port2;q.port1.onmessage=Z,U=function(){F.postMessage(null)}}else U=function(){g(Z,0)};function le(ae,se){M=g(function(){ae(r.unstable_now())},se)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(ae){ae.callback=null},r.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<ae?Math.floor(1e3/ae):5},r.unstable_getCurrentPriorityLevel=function(){return y},r.unstable_next=function(ae){switch(y){case 1:case 2:case 3:var se=3;break;default:se=y}var fe=y;y=se;try{return ae()}finally{y=fe}},r.unstable_requestPaint=function(){B=!0},r.unstable_runWithPriority=function(ae,se){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var fe=y;y=ae;try{return se()}finally{y=fe}},r.unstable_scheduleCallback=function(ae,se,fe){var ye=r.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?ye+fe:ye):fe=ye,ae){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=fe+_e,ae={id:m++,callback:se,priorityLevel:ae,startTime:fe,expirationTime:_e,sortIndex:-1},fe>ye?(ae.sortIndex=fe,t(h,ae),s(u)===null&&ae===s(h)&&(N?(j(M),M=-1):N=!0,le(L,fe-ye))):(ae.sortIndex=_e,t(u,ae),v||p||(v=!0,K||(K=!0,U()))),ae},r.unstable_shouldYield=ne,r.unstable_wrapCallback=function(ae){var se=y;return function(){var fe=y;y=se;try{return ae.apply(this,arguments)}finally{y=fe}}}})(eg)),eg}var Sv;function z6(){return Sv||(Sv=1,$x.exports=K6()),$x.exports}var _v;function q6(){if(_v)return Zu;_v=1;var r=z6(),t=d6(),s=u6();function n(a){var i="https://react.dev/errors/"+a;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)i+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var i=a,A=a;if(a.alternate)for(;i.return;)i=i.return;else{a=i;do i=a,(i.flags&4098)!==0&&(A=i.return),a=i.return;while(a)}return i.tag===3?A:null}function d(a){if(a.tag===13){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function c(a){if(a.tag===31){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function u(a){if(l(a)!==a)throw Error(n(188))}function h(a){var i=a.alternate;if(!i){if(i=l(a),i===null)throw Error(n(188));return i!==a?null:a}for(var A=a,f=i;;){var C=A.return;if(C===null)break;var E=C.alternate;if(E===null){if(f=C.return,f!==null){A=f;continue}break}if(C.child===E.child){for(E=C.child;E;){if(E===A)return u(C),a;if(E===f)return u(C),i;E=E.sibling}throw Error(n(188))}if(A.return!==f.return)A=C,f=E;else{for(var ee=!1,ge=C.child;ge;){if(ge===A){ee=!0,A=C,f=E;break}if(ge===f){ee=!0,f=C,A=E;break}ge=ge.sibling}if(!ee){for(ge=E.child;ge;){if(ge===A){ee=!0,A=E,f=C;break}if(ge===f){ee=!0,f=E,A=C;break}ge=ge.sibling}if(!ee)throw Error(n(189))}}if(A.alternate!==f)throw Error(n(190))}if(A.tag!==3)throw Error(n(188));return A.stateNode.current===A?a:i}function m(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(i=m(a),i!==null)return i;a=a.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),_=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function U(a){return a===null||typeof a!="object"?null:(a=Z&&a[Z]||a["@@iterator"],typeof a=="function"?a:null)}var q=Symbol.for("react.client.reference");function F(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===q?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case N:return"Fragment";case g:return"Profiler";case B:return"StrictMode";case L:return"Suspense";case K:return"SuspenseList";case T:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case v:return"Portal";case _:return a.displayName||"Context";case j:return(a._context.displayName||"Context")+".Consumer";case w:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case M:return i=a.displayName||null,i!==null?i:F(a.type)||"Memo";case V:i=a._payload,a=a._init;try{return F(a(i))}catch{}}return null}var le=Array.isArray,ae=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},ye=[],_e=-1;function xe(a){return{current:a}}function D(a){0>_e||(a.current=ye[_e],ye[_e]=null,_e--)}function $(a,i){_e++,ye[_e]=a.current,a.current=i}var X=xe(null),te=xe(null),J=xe(null),O=xe(null);function H(a,i){switch($(J,i),$(te,a),$(X,null),i.nodeType){case 9:case 11:a=(a=i.documentElement)&&(a=a.namespaceURI)?Hw(a):0;break;default:if(a=i.tagName,i=i.namespaceURI)i=Hw(i),a=Mw(i,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}D(X),$(X,a)}function re(){D(X),D(te),D(J)}function Ae(a){a.memoizedState!==null&&$(O,a);var i=X.current,A=Mw(i,a.type);i!==A&&($(te,a),$(X,A))}function oe(a){te.current===a&&(D(X),D(te)),O.current===a&&(D(O),Wu._currentValue=fe)}var ce,Se;function z(a){if(ce===void 0)try{throw Error()}catch(A){var i=A.stack.trim().match(/\n( *(at )?)/);ce=i&&i[1]||"",Se=-1<A.stack.indexOf(`
at`)?" (<anonymous>)":-1<A.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ce+a+Se}var ie=!1;function W(a,i){if(!a||ie)return"";ie=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(i){var tt=function(){throw Error()};if(Object.defineProperty(tt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(tt,[])}catch(Ge){var qe=Ge}Reflect.construct(a,[],tt)}else{try{tt.call()}catch(Ge){qe=Ge}a.call(tt.prototype)}}else{try{throw Error()}catch(Ge){qe=Ge}(tt=a())&&typeof tt.catch=="function"&&tt.catch(function(){})}}catch(Ge){if(Ge&&qe&&typeof Ge.stack=="string")return[Ge.stack,qe.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=f.DetermineComponentFrameRoot(),ee=E[0],ge=E[1];if(ee&&ge){var ke=ee.split(`
`),Ke=ge.split(`
`);for(C=f=0;f<ke.length&&!ke[f].includes("DetermineComponentFrameRoot");)f++;for(;C<Ke.length&&!Ke[C].includes("DetermineComponentFrameRoot");)C++;if(f===ke.length||C===Ke.length)for(f=ke.length-1,C=Ke.length-1;1<=f&&0<=C&&ke[f]!==Ke[C];)C--;for(;1<=f&&0<=C;f--,C--)if(ke[f]!==Ke[C]){if(f!==1||C!==1)do if(f--,C--,0>C||ke[f]!==Ke[C]){var Ye=`
`+ke[f].replace(" at new "," at ");return a.displayName&&Ye.includes("<anonymous>")&&(Ye=Ye.replace("<anonymous>",a.displayName)),Ye}while(1<=f&&0<=C);break}}}finally{ie=!1,Error.prepareStackTrace=A}return(A=a?a.displayName||a.name:"")?z(A):""}function Q(a,i){switch(a.tag){case 26:case 27:case 5:return z(a.type);case 16:return z("Lazy");case 13:return a.child!==i&&i!==null?z("Suspense Fallback"):z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return W(a.type,!1);case 11:return W(a.type.render,!1);case 1:return W(a.type,!0);case 31:return z("Activity");default:return""}}function I(a){try{var i="",A=null;do i+=Q(a,A),A=a,a=a.return;while(a);return i}catch(f){return`
Error generating stack: `+f.message+`
`+f.stack}}var k=Object.prototype.hasOwnProperty,G=r.unstable_scheduleCallback,me=r.unstable_cancelCallback,be=r.unstable_shouldYield,Ue=r.unstable_requestPaint,Re=r.unstable_now,He=r.unstable_getCurrentPriorityLevel,Ve=r.unstable_ImmediatePriority,it=r.unstable_UserBlockingPriority,lt=r.unstable_NormalPriority,ut=r.unstable_LowPriority,Tt=r.unstable_IdlePriority,mt=r.log,Ur=r.unstable_setDisableYieldValue,jt=null,_t=null;function Dt(a){if(typeof mt=="function"&&Ur(a),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(jt,a)}catch{}}var Gt=Math.clz32?Math.clz32:It,kt=Math.log,Fr=Math.LN2;function It(a){return a>>>=0,a===0?32:31-(kt(a)/Fr|0)|0}var Pt=256,Br=262144,zt=4194304;function Bt(a){var i=a&42;if(i!==0)return i;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function cr(a,i,A){var f=a.pendingLanes;if(f===0)return 0;var C=0,E=a.suspendedLanes,ee=a.pingedLanes;a=a.warmLanes;var ge=f&134217727;return ge!==0?(f=ge&~E,f!==0?C=Bt(f):(ee&=ge,ee!==0?C=Bt(ee):A||(A=ge&~a,A!==0&&(C=Bt(A))))):(ge=f&~E,ge!==0?C=Bt(ge):ee!==0?C=Bt(ee):A||(A=f&~a,A!==0&&(C=Bt(A)))),C===0?0:i!==0&&i!==C&&(i&E)===0&&(E=C&-C,A=i&-i,E>=A||E===32&&(A&4194048)!==0)?i:C}function _n(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function Aa(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xn(){var a=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),a}function an(a){for(var i=[],A=0;31>A;A++)i.push(a);return i}function Et(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ci(a,i,A,f,C,E){var ee=a.pendingLanes;a.pendingLanes=A,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=A,a.entangledLanes&=A,a.errorRecoveryDisabledLanes&=A,a.shellSuspendCounter=0;var ge=a.entanglements,ke=a.expirationTimes,Ke=a.hiddenUpdates;for(A=ee&~A;0<A;){var Ye=31-Gt(A),tt=1<<Ye;ge[Ye]=0,ke[Ye]=-1;var qe=Ke[Ye];if(qe!==null)for(Ke[Ye]=null,Ye=0;Ye<qe.length;Ye++){var Ge=qe[Ye];Ge!==null&&(Ge.lane&=-536870913)}A&=~tt}f!==0&&Yn(a,f,0),E!==0&&C===0&&a.tag!==0&&(a.suspendedLanes|=E&~(ee&~i))}function Yn(a,i,A){a.pendingLanes|=i,a.suspendedLanes&=~i;var f=31-Gt(i);a.entangledLanes|=i,a.entanglements[f]=a.entanglements[f]|1073741824|A&261930}function qa(a,i){var A=a.entangledLanes|=i;for(a=a.entanglements;A;){var f=31-Gt(A),C=1<<f;C&i|a[f]&i&&(a[f]|=i),A&=~C}}function Ga(a,i){var A=i&-i;return A=(A&42)!==0?1:Jr(A),(A&(a.suspendedLanes|i))!==0?0:A}function Jr(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function ws(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function qs(){var a=se.p;return a!==0?a:(a=window.event,a===void 0?32:cv(a.type))}function co(a,i){var A=se.p;try{return se.p=a,i()}finally{se.p=A}}var wa=Math.random().toString(36).slice(2),Qr="__reactFiber$"+wa,ts="__reactProps$"+wa,ca="__reactContainer$"+wa,Va="__reactEvents$"+wa,nn="__reactListeners$"+wa,qo="__reactHandles$"+wa,kn="__reactResources$"+wa,Fn="__reactMarker$"+wa;function uo(a){delete a[Qr],delete a[ts],delete a[Va],delete a[nn],delete a[qo]}function En(a){var i=a[Qr];if(i)return i;for(var A=a.parentNode;A;){if(i=A[ca]||A[Qr]){if(A=i.alternate,i.child!==null||A!==null&&A.child!==null)for(a=Ww(a);a!==null;){if(A=a[Qr])return A;a=Ww(a)}return i}a=A,A=a.parentNode}return null}function Un(a){if(a=a[Qr]||a[ca]){var i=a.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return a}return null}function Go(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a.stateNode;throw Error(n(33))}function Jn(a){var i=a[kn];return i||(i=a[kn]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function fs(a){a[Fn]=!0}var UA=new Set,Wa={};function Qn(a,i){Si(a,i),Si(a+"Capture",i)}function Si(a,i){for(Wa[a]=i,a=0;a<i.length;a++)UA.add(i[a])}var QA=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),LA={},TA={};function Oc(a){return k.call(TA,a)?!0:k.call(LA,a)?!1:QA.test(a)?TA[a]=!0:(LA[a]=!0,!1)}function Xa(a,i,A){if(Oc(i))if(A===null)a.removeAttribute(i);else{switch(typeof A){case"undefined":case"function":case"symbol":a.removeAttribute(i);return;case"boolean":var f=i.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(i);return}}a.setAttribute(i,""+A)}}function _i(a,i,A){if(A===null)a.removeAttribute(i);else{switch(typeof A){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(i);return}a.setAttribute(i,""+A)}}function Ln(a,i,A,f){if(f===null)a.removeAttribute(A);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(A);return}a.setAttributeNS(i,A,""+f)}}function yr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function IA(a){var i=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Zn(a,i,A){var f=Object.getOwnPropertyDescriptor(a.constructor.prototype,i);if(!a.hasOwnProperty(i)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var C=f.get,E=f.set;return Object.defineProperty(a,i,{configurable:!0,get:function(){return C.call(this)},set:function(ee){A=""+ee,E.call(this,ee)}}),Object.defineProperty(a,i,{enumerable:f.enumerable}),{getValue:function(){return A},setValue:function(ee){A=""+ee},stopTracking:function(){a._valueTracker=null,delete a[i]}}}}function ho(a){if(!a._valueTracker){var i=IA(a)?"checked":"value";a._valueTracker=Zn(a,i,""+a[i])}}function DA(a){if(!a)return!1;var i=a._valueTracker;if(!i)return!0;var A=i.getValue(),f="";return a&&(f=IA(a)?a.checked?"true":"false":a.value),a=f,a!==A?(i.setValue(a),!0):!1}function va(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Ls=/[\n"\\]/g;function vs(a){return a.replace(Ls,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Il(a,i,A,f,C,E,ee,ge){a.name="",ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?a.type=ee:a.removeAttribute("type"),i!=null?ee==="number"?(i===0&&a.value===""||a.value!=i)&&(a.value=""+yr(i)):a.value!==""+yr(i)&&(a.value=""+yr(i)):ee!=="submit"&&ee!=="reset"||a.removeAttribute("value"),i!=null?RA(a,ee,yr(i)):A!=null?RA(a,ee,yr(A)):f!=null&&a.removeAttribute("value"),C==null&&E!=null&&(a.defaultChecked=!!E),C!=null&&(a.checked=C&&typeof C!="function"&&typeof C!="symbol"),ge!=null&&typeof ge!="function"&&typeof ge!="symbol"&&typeof ge!="boolean"?a.name=""+yr(ge):a.removeAttribute("name")}function Hc(a,i,A,f,C,E,ee,ge){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(a.type=E),i!=null||A!=null){if(!(E!=="submit"&&E!=="reset"||i!=null)){ho(a);return}A=A!=null?""+yr(A):"",i=i!=null?""+yr(i):A,ge||i===a.value||(a.value=i),a.defaultValue=i}f=f??C,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=ge?a.checked:!!f,a.defaultChecked=!!f,ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"&&(a.name=ee),ho(a)}function RA(a,i,A){i==="number"&&va(a.ownerDocument)===a||a.defaultValue===""+A||(a.defaultValue=""+A)}function Na(a,i,A,f){if(a=a.options,i){i={};for(var C=0;C<A.length;C++)i["$"+A[C]]=!0;for(A=0;A<a.length;A++)C=i.hasOwnProperty("$"+a[A].value),a[A].selected!==C&&(a[A].selected=C),C&&f&&(a[A].defaultSelected=!0)}else{for(A=""+yr(A),i=null,C=0;C<a.length;C++){if(a[C].value===A){a[C].selected=!0,f&&(a[C].defaultSelected=!0);return}i!==null||a[C].disabled||(i=a[C])}i!==null&&(i.selected=!0)}}function OA(a,i,A){if(i!=null&&(i=""+yr(i),i!==a.value&&(a.value=i),A==null)){a.defaultValue!==i&&(a.defaultValue=i);return}a.defaultValue=A!=null?""+yr(A):""}function HA(a,i,A,f){if(i==null){if(f!=null){if(A!=null)throw Error(n(92));if(le(f)){if(1<f.length)throw Error(n(93));f=f[0]}A=f}A==null&&(A=""),i=A}A=yr(i),a.defaultValue=A,f=a.textContent,f===A&&f!==""&&f!==null&&(a.value=f),ho(a)}function Tn(a,i){if(i){var A=a.firstChild;if(A&&A===a.lastChild&&A.nodeType===3){A.nodeValue=i;return}}a.textContent=i}var Vo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Mc(a,i,A){var f=i.indexOf("--")===0;A==null||typeof A=="boolean"||A===""?f?a.setProperty(i,""):i==="float"?a.cssFloat="":a[i]="":f?a.setProperty(i,A):typeof A!="number"||A===0||Vo.has(i)?i==="float"?a.cssFloat=A:a[i]=(""+A).trim():a[i]=A+"px"}function Pc(a,i,A){if(i!=null&&typeof i!="object")throw Error(n(62));if(a=a.style,A!=null){for(var f in A)!A.hasOwnProperty(f)||i!=null&&i.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var C in i)f=i[C],i.hasOwnProperty(C)&&A[C]!==f&&Mc(a,C,f)}else for(var E in i)i.hasOwnProperty(E)&&Mc(a,E,i[E])}function MA(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var PA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Kc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function La(a){return Kc.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function In(){}var ki=null;function Wo(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var fo=null,Rt=null;function zc(a){var i=Un(a);if(i&&(a=i.stateNode)){var A=a[ts]||null;e:switch(a=i.stateNode,i.type){case"input":if(Il(a,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name),i=A.name,A.type==="radio"&&i!=null){for(A=a;A.parentNode;)A=A.parentNode;for(A=A.querySelectorAll('input[name="'+vs(""+i)+'"][type="radio"]'),i=0;i<A.length;i++){var f=A[i];if(f!==a&&f.form===a.form){var C=f[ts]||null;if(!C)throw Error(n(90));Il(f,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(i=0;i<A.length;i++)f=A[i],f.form===a.form&&DA(f)}break e;case"textarea":OA(a,A.value,A.defaultValue);break e;case"select":i=A.value,i!=null&&Na(a,!!A.multiple,i,!1)}}}var KA=!1;function qc(a,i,A){if(KA)return a(i,A);KA=!0;try{var f=a(i);return f}finally{if(KA=!1,(fo!==null||Rt!==null)&&(vf(),fo&&(i=fo,a=Rt,Rt=fo=null,zc(i),a)))for(i=0;i<a.length;i++)zc(a[i])}}function Ya(a,i){var A=a.stateNode;if(A===null)return null;var f=A[ts]||null;if(f===null)return null;A=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(A&&typeof A!="function")throw Error(n(231,i,typeof A));return A}var $s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zA=!1;if($s)try{var Xo={};Object.defineProperty(Xo,"passive",{get:function(){zA=!0}}),window.addEventListener("test",Xo,Xo),window.removeEventListener("test",Xo,Xo)}catch{zA=!1}var Ja=null,Yo=null,$n=null;function Gc(){if($n)return $n;var a,i=Yo,A=i.length,f,C="value"in Ja?Ja.value:Ja.textContent,E=C.length;for(a=0;a<A&&i[a]===C[a];a++);var ee=A-a;for(f=1;f<=ee&&i[A-f]===C[E-f];f++);return $n=C.slice(a,1<f?1-f:void 0)}function on(a){var i=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&i===13&&(a=13)):a=i,a===10&&(a=13),32<=a||a===13?a:0}function Dl(){return!0}function Rl(){return!1}function Gs(a){function i(A,f,C,E,ee){this._reactName=A,this._targetInst=C,this.type=f,this.nativeEvent=E,this.target=ee,this.currentTarget=null;for(var ge in a)a.hasOwnProperty(ge)&&(A=a[ge],this[ge]=A?A(E):E[ge]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Dl:Rl,this.isPropagationStopped=Rl,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var A=this.nativeEvent;A&&(A.preventDefault?A.preventDefault():typeof A.returnValue!="unknown"&&(A.returnValue=!1),this.isDefaultPrevented=Dl)},stopPropagation:function(){var A=this.nativeEvent;A&&(A.stopPropagation?A.stopPropagation():typeof A.cancelBubble!="unknown"&&(A.cancelBubble=!0),this.isPropagationStopped=Dl)},persist:function(){},isPersistent:Dl}),i}var ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=Gs(ei),Fi=x({},ei,{view:0,detail:0}),Ol=Gs(Fi),Jo,Ei,Ui,Zo=x({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kt,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ui&&(Ui&&a.type==="mousemove"?(Jo=a.screenX-Ui.screenX,Ei=a.screenY-Ui.screenY):Ei=Jo=0,Ui=a),Jo)},movementY:function(a){return"movementY"in a?a.movementY:Ei}}),qA=Gs(Zo),Qi=x({},Zo,{dataTransfer:0}),Li=Gs(Qi),Vc=x({},Fi,{relatedTarget:0}),Ti=Gs(Vc),Wc=x({},ei,{animationName:0,elapsedTime:0,pseudoElement:0}),R=Gs(Wc),de=x({},ei,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),je=Gs(de),Fe=x({},ei,{data:0}),Te=Gs(Fe),Je={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},at={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ct(a){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(a):(a=yt[a])?!!i[a]:!1}function Kt(){return Ct}var Yt=x({},Fi,{key:function(a){if(a.key){var i=Je[a.key]||a.key;if(i!=="Unidentified")return i}return a.type==="keypress"?(a=on(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?at[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kt,charCode:function(a){return a.type==="keypress"?on(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?on(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),dr=Gs(Yt),rs=x({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ms=Gs(rs),Dr=x({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kt}),Ts=Gs(Dr),Ns=x({},ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),ea=Gs(Ns),Ii=x({},Zo,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=Gs(Ii),Di=x({},ei,{newState:0,oldState:0}),GA=Gs(Di),Hl=[9,13,27,32],ti=$s&&"CompositionEvent"in window,Rn=null;$s&&"documentMode"in document&&(Rn=document.documentMode);var $o=$s&&"TextEvent"in window&&!Rn,Ri=$s&&(!ti||Rn&&8<Rn&&11>=Rn),Vs=" ",mo=!1;function po(a,i){switch(a){case"keyup":return Hl.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ml(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ri=!1;function Ba(a,i){switch(a){case"compositionend":return Ml(i);case"keypress":return i.which!==32?null:(mo=!0,Vs);case"textInput":return a=i.data,a===Vs&&mo?null:a;default:return null}}function Oi(a,i){if(ri)return a==="compositionend"||!ti&&po(a,i)?(a=Gc(),$n=Yo=Ja=null,ri=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ri&&i.locale!=="ko"?null:i.data;default:return null}}var Pl={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function VA(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i==="input"?!!Pl[a.type]:i==="textarea"}function Za(a,i,A,f){fo?Rt?Rt.push(f):Rt=[f]:fo=f,i=kf(i,"onChange"),0<i.length&&(A=new ln("onChange","change",null,A,f),a.push({event:A,listeners:i}))}var On=null,Hi=null;function WA(a){Lw(a,0)}function Hn(a){var i=Go(a);if(DA(i))return a}function xo(a,i){if(a==="change")return i}var Ta=!1;if($s){var ja;if($s){var si="oninput"in document;if(!si){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),si=typeof ai.oninput=="function"}ja=si}else ja=!1;Ta=ja&&(!document.documentMode||9<document.documentMode)}function Mi(){On&&(On.detachEvent("onpropertychange",Kl),Hi=On=null)}function Kl(a){if(a.propertyName==="value"&&Hn(Hi)){var i=[];Za(i,Hi,a,Wo(a)),qc(WA,i)}}function zl(a,i,A){a==="focusin"?(Mi(),On=i,Hi=A,On.attachEvent("onpropertychange",Kl)):a==="focusout"&&Mi()}function ps(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Hn(Hi)}function Xc(a,i){if(a==="click")return Hn(i)}function ni(a,i){if(a==="input"||a==="change")return Hn(i)}function ii(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}var ta=typeof Object.is=="function"?Object.is:ii;function Pi(a,i){if(ta(a,i))return!0;if(typeof a!="object"||a===null||typeof i!="object"||i===null)return!1;var A=Object.keys(a),f=Object.keys(i);if(A.length!==f.length)return!1;for(f=0;f<A.length;f++){var C=A[f];if(!k.call(i,C)||!ta(a[C],i[C]))return!1}return!0}function ql(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Gl(a,i){var A=ql(a);a=0;for(var f;A;){if(A.nodeType===3){if(f=a+A.textContent.length,a<=i&&f>=i)return{node:A,offset:i-a};a=f}e:{for(;A;){if(A.nextSibling){A=A.nextSibling;break e}A=A.parentNode}A=void 0}A=ql(A)}}function Ki(a,i){return a&&i?a===i?!0:a&&a.nodeType===3?!1:i&&i.nodeType===3?Ki(a,i.parentNode):"contains"in a?a.contains(i):a.compareDocumentPosition?!!(a.compareDocumentPosition(i)&16):!1:!1}function zi(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var i=va(a.document);i instanceof a.HTMLIFrameElement;){try{var A=typeof i.contentWindow.location.href=="string"}catch{A=!1}if(A)a=i.contentWindow;else break;i=va(a.document)}return i}function oi(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i&&(i==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||i==="textarea"||a.contentEditable==="true")}var el=$s&&"documentMode"in document&&11>=document.documentMode,$a=null,qi=null,da=null,An=!1;function wr(a,i,A){var f=A.window===A?A.document:A.nodeType===9?A:A.ownerDocument;An||$a==null||$a!==va(f)||(f=$a,"selectionStart"in f&&oi(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),da&&Pi(da,f)||(da=f,f=kf(qi,"onSelect"),0<f.length&&(i=new ln("onSelect","select",null,i,A),a.push({event:i,listeners:f}),i.target=$a)))}function ur(a,i){var A={};return A[a.toLowerCase()]=i.toLowerCase(),A["Webkit"+a]="webkit"+i,A["Moz"+a]="moz"+i,A}var Rr={animationend:ur("Animation","AnimationEnd"),animationiteration:ur("Animation","AnimationIteration"),animationstart:ur("Animation","AnimationStart"),transitionrun:ur("Transition","TransitionRun"),transitionstart:ur("Transition","TransitionStart"),transitioncancel:ur("Transition","TransitionCancel"),transitionend:ur("Transition","TransitionEnd")},xs={},li={};$s&&(li=document.createElement("div").style,"AnimationEvent"in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),"TransitionEvent"in window||delete Rr.transitionend.transition);function Mn(a){if(xs[a])return xs[a];if(!Rr[a])return a;var i=Rr[a],A;for(A in i)if(i.hasOwnProperty(A)&&A in li)return xs[a]=i[A];return a}var tl=Mn("animationend"),XA=Mn("animationiteration"),xu=Mn("animationstart"),Jh=Mn("transitionrun"),Zh=Mn("transitionstart"),$h=Mn("transitioncancel"),gu=Mn("transitionend"),bu=new Map,rl="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rl.push("scrollEnd");function cn(a,i){bu.set(a,i),Qn(i,[a])}var YA=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},en=[],sl=0,Yc=0;function JA(){for(var a=sl,i=Yc=sl=0;i<a;){var A=en[i];en[i++]=null;var f=en[i];en[i++]=null;var C=en[i];en[i++]=null;var E=en[i];if(en[i++]=null,f!==null&&C!==null){var ee=f.pending;ee===null?C.next=C:(C.next=ee.next,ee.next=C),f.pending=C}E!==0&&$A(A,C,E)}}function ZA(a,i,A,f){en[sl++]=a,en[sl++]=i,en[sl++]=A,en[sl++]=f,Yc|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function Jc(a,i,A,f){return ZA(a,i,A,f),ua(a)}function Gi(a,i){return ZA(a,null,null,i),ua(a)}function $A(a,i,A){a.lanes|=A;var f=a.alternate;f!==null&&(f.lanes|=A);for(var C=!1,E=a.return;E!==null;)E.childLanes|=A,f=E.alternate,f!==null&&(f.childLanes|=A),E.tag===22&&(a=E.stateNode,a===null||a._visibility&1||(C=!0)),a=E,E=E.return;return a.tag===3?(E=a.stateNode,C&&i!==null&&(C=31-Gt(A),a=E.hiddenUpdates,f=a[C],f===null?a[C]=[i]:f.push(i),i.lane=A|536870912),E):null}function ua(a){if(50<Mu)throw Mu=0,gx=null,Error(n(185));for(var i=a.return;i!==null;)a=i,i=a.return;return a.tag===3?a.stateNode:null}var ra={};function Zc(a,i,A,f){this.tag=a,this.key=A,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ha(a,i,A,f){return new Zc(a,i,A,f)}function $c(a){return a=a.prototype,!(!a||!a.isReactComponent)}function dn(a,i){var A=a.alternate;return A===null?(A=ha(a.tag,i,a.key,a.mode),A.elementType=a.elementType,A.type=a.type,A.stateNode=a.stateNode,A.alternate=a,a.alternate=A):(A.pendingProps=i,A.type=a.type,A.flags=0,A.subtreeFlags=0,A.deletions=null),A.flags=a.flags&65011712,A.childLanes=a.childLanes,A.lanes=a.lanes,A.child=a.child,A.memoizedProps=a.memoizedProps,A.memoizedState=a.memoizedState,A.updateQueue=a.updateQueue,i=a.dependencies,A.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},A.sibling=a.sibling,A.index=a.index,A.ref=a.ref,A.refCleanup=a.refCleanup,A}function ec(a,i){a.flags&=65011714;var A=a.alternate;return A===null?(a.childLanes=0,a.lanes=i,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=A.childLanes,a.lanes=A.lanes,a.child=A.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=A.memoizedProps,a.memoizedState=A.memoizedState,a.updateQueue=A.updateQueue,a.type=A.type,i=A.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a}function Vl(a,i,A,f,C,E){var ee=0;if(f=a,typeof a=="function")$c(a)&&(ee=1);else if(typeof a=="string")ee=JC(a,A,X.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case T:return a=ha(31,A,i,C),a.elementType=T,a.lanes=E,a;case N:return go(A.children,C,E,i);case B:ee=8,C|=24;break;case g:return a=ha(12,A,i,C|2),a.elementType=g,a.lanes=E,a;case L:return a=ha(13,A,i,C),a.elementType=L,a.lanes=E,a;case K:return a=ha(19,A,i,C),a.elementType=K,a.lanes=E,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:ee=10;break e;case j:ee=9;break e;case w:ee=11;break e;case M:ee=14;break e;case V:ee=16,f=null;break e}ee=29,A=Error(n(130,a===null?"null":typeof a,"")),f=null}return i=ha(ee,A,i,C),i.elementType=a,i.type=f,i.lanes=E,i}function go(a,i,A,f){return a=ha(7,a,f,i),a.lanes=A,a}function tc(a,i,A){return a=ha(6,a,null,i),a.lanes=A,a}function ed(a){var i=ha(18,null,null,0);return i.stateNode=a,i}function Wl(a,i,A){return i=ha(4,a.children!==null?a.children:[],a.key,i),i.lanes=A,i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},i}var td=new WeakMap;function un(a,i){if(typeof a=="object"&&a!==null){var A=td.get(a);return A!==void 0?A:(i={value:a,source:i,stack:I(i)},td.set(a,i),i)}return{value:a,source:i,stack:I(i)}}var Xl=[],al=0,rd=null,rc=0,hn=[],fn=0,bo=null,mn=1,pn="";function tn(a,i){Xl[al++]=rc,Xl[al++]=rd,rd=a,rc=i}function ef(a,i,A){hn[fn++]=mn,hn[fn++]=pn,hn[fn++]=bo,bo=a;var f=mn;a=pn;var C=32-Gt(f)-1;f&=~(1<<C),A+=1;var E=32-Gt(i)+C;if(30<E){var ee=C-C%5;E=(f&(1<<ee)-1).toString(32),f>>=ee,C-=ee,mn=1<<32-Gt(i)+C|A<<C|f,pn=E+a}else mn=1<<E|A<<C|f,pn=a}function yu(a){a.return!==null&&(tn(a,1),ef(a,1,0))}function sd(a){for(;a===rd;)rd=Xl[--al],Xl[al]=null,rc=Xl[--al],Xl[al]=null;for(;a===bo;)bo=hn[--fn],hn[fn]=null,pn=hn[--fn],hn[fn]=null,mn=hn[--fn],hn[fn]=null}function tf(a,i){hn[fn++]=mn,hn[fn++]=pn,hn[fn++]=bo,mn=i.id,pn=i.overflow,bo=a}var sa=null,Gr=null,ar=!1,Ca=null,ls=!1,Pn=Error(n(519));function yo(a){var i=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yl(un(i,a)),Pn}function wu(a){var i=a.stateNode,A=a.type,f=a.memoizedProps;switch(i[Qr]=a,i[ts]=f,A){case"dialog":ir("cancel",i),ir("close",i);break;case"iframe":case"object":case"embed":ir("load",i);break;case"video":case"audio":for(A=0;A<Ku.length;A++)ir(Ku[A],i);break;case"source":ir("error",i);break;case"img":case"image":case"link":ir("error",i),ir("load",i);break;case"details":ir("toggle",i);break;case"input":ir("invalid",i),Hc(i,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":ir("invalid",i);break;case"textarea":ir("invalid",i),HA(i,f.value,f.defaultValue,f.children)}A=f.children,typeof A!="string"&&typeof A!="number"&&typeof A!="bigint"||i.textContent===""+A||f.suppressHydrationWarning===!0||Rw(i.textContent,A)?(f.popover!=null&&(ir("beforetoggle",i),ir("toggle",i)),f.onScroll!=null&&ir("scroll",i),f.onScrollEnd!=null&&ir("scrollend",i),f.onClick!=null&&(i.onclick=In),i=!0):i=!1,i||yo(a,!0)}function Vi(a){for(sa=a.return;sa;)switch(sa.tag){case 5:case 31:case 13:ls=!1;return;case 27:case 3:ls=!0;return;default:sa=sa.return}}function aa(a){if(a!==sa)return!1;if(!ar)return Vi(a),ar=!0,!1;var i=a.tag,A;if((A=i!==3&&i!==27)&&((A=i===5)&&(A=a.type,A=!(A!=="form"&&A!=="button")||Qx(a.type,a.memoizedProps)),A=!A),A&&Gr&&yo(a),Vi(a),i===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));Gr=Vw(a)}else if(i===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));Gr=Vw(a)}else i===27?(i=Gr,cA(a.type)?(a=Rx,Rx=null,Gr=a):Gr=i):Gr=sa?ui(a.stateNode.nextSibling):null;return!0}function nl(){Gr=sa=null,ar=!1}function vu(){var a=Ca;return a!==null&&(vn===null?vn=a:vn.push.apply(vn,a),Ca=null),a}function Yl(a){Ca===null?Ca=[a]:Ca.push(a)}var ad=xe(null),wo=null,Ai=null;function vo(a,i,A){$(ad,i._currentValue),i._currentValue=A}function xn(a){a._currentValue=ad.current,D(ad)}function Jl(a,i,A){for(;a!==null;){var f=a.alternate;if((a.childLanes&i)!==i?(a.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),a===A)break;a=a.return}}function il(a,i,A,f){var C=a.child;for(C!==null&&(C.return=a);C!==null;){var E=C.dependencies;if(E!==null){var ee=C.child;E=E.firstContext;e:for(;E!==null;){var ge=E;E=C;for(var ke=0;ke<i.length;ke++)if(ge.context===i[ke]){E.lanes|=A,ge=E.alternate,ge!==null&&(ge.lanes|=A),Jl(E.return,A,a),f||(ee=null);break e}E=ge.next}}else if(C.tag===18){if(ee=C.return,ee===null)throw Error(n(341));ee.lanes|=A,E=ee.alternate,E!==null&&(E.lanes|=A),Jl(ee,A,a),ee=null}else ee=C.child;if(ee!==null)ee.return=C;else for(ee=C;ee!==null;){if(ee===a){ee=null;break}if(C=ee.sibling,C!==null){C.return=ee.return,ee=C;break}ee=ee.return}C=ee}}function No(a,i,A,f){a=null;for(var C=i,E=!1;C!==null;){if(!E){if((C.flags&524288)!==0)E=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var ee=C.alternate;if(ee===null)throw Error(n(387));if(ee=ee.memoizedProps,ee!==null){var ge=C.type;ta(C.pendingProps.value,ee.value)||(a!==null?a.push(ge):a=[ge])}}else if(C===O.current){if(ee=C.alternate,ee===null)throw Error(n(387));ee.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(a!==null?a.push(Wu):a=[Wu])}C=C.return}a!==null&&il(i,a,A,f),i.flags|=262144}function nd(a){for(a=a.firstContext;a!==null;){if(!ta(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Bo(a){wo=a,Ai=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function na(a){return rf(wo,a)}function id(a,i){return wo===null&&Bo(a),rf(a,i)}function rf(a,i){var A=i._currentValue;if(i={context:i,memoizedValue:A,next:null},Ai===null){if(a===null)throw Error(n(308));Ai=i,a.dependencies={lanes:0,firstContext:i},a.flags|=524288}else Ai=Ai.next=i;return A}var Dp=typeof AbortController<"u"?AbortController:function(){var a=[],i=this.signal={aborted:!1,addEventListener:function(A,f){a.push(f)}};this.abort=function(){i.aborted=!0,a.forEach(function(A){return A()})}},Rp=r.unstable_scheduleCallback,Op=r.unstable_NormalPriority,gs={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zl(){return{controller:new Dp,data:new Map,refCount:0}}function sc(a){a.refCount--,a.refCount===0&&Rp(Op,function(){a.controller.abort()})}var ac=null,od=0,b=0,S=null;function P(a,i){if(ac===null){var A=ac=[];od=0,b=Bx(),S={status:"pending",value:void 0,then:function(f){A.push(f)}}}return od++,i.then(Y,Y),i}function Y(){if(--od===0&&ac!==null){S!==null&&(S.status="fulfilled");var a=ac;ac=null,b=0,S=null;for(var i=0;i<a.length;i++)(0,a[i])()}}function ue(a,i){var A=[],f={status:"pending",value:null,reason:null,then:function(C){A.push(C)}};return a.then(function(){f.status="fulfilled",f.value=i;for(var C=0;C<A.length;C++)(0,A[C])(i)},function(C){for(f.status="rejected",f.reason=C,C=0;C<A.length;C++)(0,A[C])(void 0)}),f}var he=ae.S;ae.S=function(a,i){lw=Re(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&P(a,i),he!==null&&he(a,i)};var pe=xe(null);function we(){var a=pe.current;return a!==null?a:Wr.pooledCache}function ve(a,i){i===null?$(pe,pe.current):$(pe,i.pool)}function Be(){var a=we();return a===null?null:{parent:gs._currentValue,pool:a}}var Ee=Error(n(460)),Me=Error(n(474)),Ne=Error(n(542)),Le={then:function(){}};function De(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Xe(a,i,A){switch(A=a[A],A===void 0?a.push(i):A!==i&&(i.then(In,In),i=A),i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,ot(a),a;default:if(typeof i.status=="string")i.then(In,In);else{if(a=Wr,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=i,a.status="pending",a.then(function(f){if(i.status==="pending"){var C=i;C.status="fulfilled",C.value=f}},function(f){if(i.status==="pending"){var C=i;C.status="rejected",C.reason=f}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,ot(a),a}throw We=i,Ee}}function Oe(a){try{var i=a._init;return i(a._payload)}catch(A){throw A!==null&&typeof A=="object"&&typeof A.then=="function"?(We=A,Ee):A}}var We=null;function Ze(){if(We===null)throw Error(n(459));var a=We;return We=null,a}function ot(a){if(a===Ee||a===Ne)throw Error(n(483))}var st=null,vt=0;function pt(a){var i=vt;return vt+=1,st===null&&(st=[]),Xe(st,a,i)}function Vt(a,i){i=i.props.ref,a.ref=i!==void 0?i:null}function bt(a,i){throw i.$$typeof===y?Error(n(525)):(a=Object.prototype.toString.call(i),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":a)))}function sr(a){function i(Ie,Qe){if(a){var Pe=Ie.deletions;Pe===null?(Ie.deletions=[Qe],Ie.flags|=16):Pe.push(Qe)}}function A(Ie,Qe){if(!a)return null;for(;Qe!==null;)i(Ie,Qe),Qe=Qe.sibling;return null}function f(Ie){for(var Qe=new Map;Ie!==null;)Ie.key!==null?Qe.set(Ie.key,Ie):Qe.set(Ie.index,Ie),Ie=Ie.sibling;return Qe}function C(Ie,Qe){return Ie=dn(Ie,Qe),Ie.index=0,Ie.sibling=null,Ie}function E(Ie,Qe,Pe){return Ie.index=Pe,a?(Pe=Ie.alternate,Pe!==null?(Pe=Pe.index,Pe<Qe?(Ie.flags|=67108866,Qe):Pe):(Ie.flags|=67108866,Qe)):(Ie.flags|=1048576,Qe)}function ee(Ie){return a&&Ie.alternate===null&&(Ie.flags|=67108866),Ie}function ge(Ie,Qe,Pe,$e){return Qe===null||Qe.tag!==6?(Qe=tc(Pe,Ie.mode,$e),Qe.return=Ie,Qe):(Qe=C(Qe,Pe),Qe.return=Ie,Qe)}function ke(Ie,Qe,Pe,$e){var Lt=Pe.type;return Lt===N?Ye(Ie,Qe,Pe.props.children,$e,Pe.key):Qe!==null&&(Qe.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===V&&Oe(Lt)===Qe.type)?(Qe=C(Qe,Pe.props),Vt(Qe,Pe),Qe.return=Ie,Qe):(Qe=Vl(Pe.type,Pe.key,Pe.props,null,Ie.mode,$e),Vt(Qe,Pe),Qe.return=Ie,Qe)}function Ke(Ie,Qe,Pe,$e){return Qe===null||Qe.tag!==4||Qe.stateNode.containerInfo!==Pe.containerInfo||Qe.stateNode.implementation!==Pe.implementation?(Qe=Wl(Pe,Ie.mode,$e),Qe.return=Ie,Qe):(Qe=C(Qe,Pe.children||[]),Qe.return=Ie,Qe)}function Ye(Ie,Qe,Pe,$e,Lt){return Qe===null||Qe.tag!==7?(Qe=go(Pe,Ie.mode,$e,Lt),Qe.return=Ie,Qe):(Qe=C(Qe,Pe),Qe.return=Ie,Qe)}function tt(Ie,Qe,Pe){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return Qe=tc(""+Qe,Ie.mode,Pe),Qe.return=Ie,Qe;if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case p:return Pe=Vl(Qe.type,Qe.key,Qe.props,null,Ie.mode,Pe),Vt(Pe,Qe),Pe.return=Ie,Pe;case v:return Qe=Wl(Qe,Ie.mode,Pe),Qe.return=Ie,Qe;case V:return Qe=Oe(Qe),tt(Ie,Qe,Pe)}if(le(Qe)||U(Qe))return Qe=go(Qe,Ie.mode,Pe,null),Qe.return=Ie,Qe;if(typeof Qe.then=="function")return tt(Ie,pt(Qe),Pe);if(Qe.$$typeof===_)return tt(Ie,id(Ie,Qe),Pe);bt(Ie,Qe)}return null}function qe(Ie,Qe,Pe,$e){var Lt=Qe!==null?Qe.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return Lt!==null?null:ge(Ie,Qe,""+Pe,$e);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case p:return Pe.key===Lt?ke(Ie,Qe,Pe,$e):null;case v:return Pe.key===Lt?Ke(Ie,Qe,Pe,$e):null;case V:return Pe=Oe(Pe),qe(Ie,Qe,Pe,$e)}if(le(Pe)||U(Pe))return Lt!==null?null:Ye(Ie,Qe,Pe,$e,null);if(typeof Pe.then=="function")return qe(Ie,Qe,pt(Pe),$e);if(Pe.$$typeof===_)return qe(Ie,Qe,id(Ie,Pe),$e);bt(Ie,Pe)}return null}function Ge(Ie,Qe,Pe,$e,Lt){if(typeof $e=="string"&&$e!==""||typeof $e=="number"||typeof $e=="bigint")return Ie=Ie.get(Pe)||null,ge(Qe,Ie,""+$e,Lt);if(typeof $e=="object"&&$e!==null){switch($e.$$typeof){case p:return Ie=Ie.get($e.key===null?Pe:$e.key)||null,ke(Qe,Ie,$e,Lt);case v:return Ie=Ie.get($e.key===null?Pe:$e.key)||null,Ke(Qe,Ie,$e,Lt);case V:return $e=Oe($e),Ge(Ie,Qe,Pe,$e,Lt)}if(le($e)||U($e))return Ie=Ie.get(Pe)||null,Ye(Qe,Ie,$e,Lt,null);if(typeof $e.then=="function")return Ge(Ie,Qe,Pe,pt($e),Lt);if($e.$$typeof===_)return Ge(Ie,Qe,Pe,id(Qe,$e),Lt);bt(Qe,$e)}return null}function wt(Ie,Qe,Pe,$e){for(var Lt=null,jr=null,St=Qe,er=Qe=0,lr=null;St!==null&&er<Pe.length;er++){St.index>er?(lr=St,St=null):lr=St.sibling;var Cr=qe(Ie,St,Pe[er],$e);if(Cr===null){St===null&&(St=lr);break}a&&St&&Cr.alternate===null&&i(Ie,St),Qe=E(Cr,Qe,er),jr===null?Lt=Cr:jr.sibling=Cr,jr=Cr,St=lr}if(er===Pe.length)return A(Ie,St),ar&&tn(Ie,er),Lt;if(St===null){for(;er<Pe.length;er++)St=tt(Ie,Pe[er],$e),St!==null&&(Qe=E(St,Qe,er),jr===null?Lt=St:jr.sibling=St,jr=St);return ar&&tn(Ie,er),Lt}for(St=f(St);er<Pe.length;er++)lr=Ge(St,Ie,er,Pe[er],$e),lr!==null&&(a&&lr.alternate!==null&&St.delete(lr.key===null?er:lr.key),Qe=E(lr,Qe,er),jr===null?Lt=lr:jr.sibling=lr,jr=lr);return a&&St.forEach(function(mA){return i(Ie,mA)}),ar&&tn(Ie,er),Lt}function Mt(Ie,Qe,Pe,$e){if(Pe==null)throw Error(n(151));for(var Lt=null,jr=null,St=Qe,er=Qe=0,lr=null,Cr=Pe.next();St!==null&&!Cr.done;er++,Cr=Pe.next()){St.index>er?(lr=St,St=null):lr=St.sibling;var mA=qe(Ie,St,Cr.value,$e);if(mA===null){St===null&&(St=lr);break}a&&St&&mA.alternate===null&&i(Ie,St),Qe=E(mA,Qe,er),jr===null?Lt=mA:jr.sibling=mA,jr=mA,St=lr}if(Cr.done)return A(Ie,St),ar&&tn(Ie,er),Lt;if(St===null){for(;!Cr.done;er++,Cr=Pe.next())Cr=tt(Ie,Cr.value,$e),Cr!==null&&(Qe=E(Cr,Qe,er),jr===null?Lt=Cr:jr.sibling=Cr,jr=Cr);return ar&&tn(Ie,er),Lt}for(St=f(St);!Cr.done;er++,Cr=Pe.next())Cr=Ge(St,Ie,er,Cr.value,$e),Cr!==null&&(a&&Cr.alternate!==null&&St.delete(Cr.key===null?er:Cr.key),Qe=E(Cr,Qe,er),jr===null?Lt=Cr:jr.sibling=Cr,jr=Cr);return a&&St.forEach(function(l6){return i(Ie,l6)}),ar&&tn(Ie,er),Lt}function Pr(Ie,Qe,Pe,$e){if(typeof Pe=="object"&&Pe!==null&&Pe.type===N&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case p:e:{for(var Lt=Pe.key;Qe!==null;){if(Qe.key===Lt){if(Lt=Pe.type,Lt===N){if(Qe.tag===7){A(Ie,Qe.sibling),$e=C(Qe,Pe.props.children),$e.return=Ie,Ie=$e;break e}}else if(Qe.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===V&&Oe(Lt)===Qe.type){A(Ie,Qe.sibling),$e=C(Qe,Pe.props),Vt($e,Pe),$e.return=Ie,Ie=$e;break e}A(Ie,Qe);break}else i(Ie,Qe);Qe=Qe.sibling}Pe.type===N?($e=go(Pe.props.children,Ie.mode,$e,Pe.key),$e.return=Ie,Ie=$e):($e=Vl(Pe.type,Pe.key,Pe.props,null,Ie.mode,$e),Vt($e,Pe),$e.return=Ie,Ie=$e)}return ee(Ie);case v:e:{for(Lt=Pe.key;Qe!==null;){if(Qe.key===Lt)if(Qe.tag===4&&Qe.stateNode.containerInfo===Pe.containerInfo&&Qe.stateNode.implementation===Pe.implementation){A(Ie,Qe.sibling),$e=C(Qe,Pe.children||[]),$e.return=Ie,Ie=$e;break e}else{A(Ie,Qe);break}else i(Ie,Qe);Qe=Qe.sibling}$e=Wl(Pe,Ie.mode,$e),$e.return=Ie,Ie=$e}return ee(Ie);case V:return Pe=Oe(Pe),Pr(Ie,Qe,Pe,$e)}if(le(Pe))return wt(Ie,Qe,Pe,$e);if(U(Pe)){if(Lt=U(Pe),typeof Lt!="function")throw Error(n(150));return Pe=Lt.call(Pe),Mt(Ie,Qe,Pe,$e)}if(typeof Pe.then=="function")return Pr(Ie,Qe,pt(Pe),$e);if(Pe.$$typeof===_)return Pr(Ie,Qe,id(Ie,Pe),$e);bt(Ie,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint"?(Pe=""+Pe,Qe!==null&&Qe.tag===6?(A(Ie,Qe.sibling),$e=C(Qe,Pe),$e.return=Ie,Ie=$e):(A(Ie,Qe),$e=tc(Pe,Ie.mode,$e),$e.return=Ie,Ie=$e),ee(Ie)):A(Ie,Qe)}return function(Ie,Qe,Pe,$e){try{vt=0;var Lt=Pr(Ie,Qe,Pe,$e);return st=null,Lt}catch(St){if(St===Ee||St===Ne)throw St;var jr=ha(29,St,null,Ie.mode);return jr.lanes=$e,jr.return=Ie,jr}}}var Vr=sr(!0),Jt=sr(!1),xt=!1;function At(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ss(a,i){a=a.updateQueue,i.updateQueue===a&&(i.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ot(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function $t(a,i,A){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(kr&2)!==0){var C=f.pending;return C===null?i.next=i:(i.next=C.next,C.next=i),f.pending=i,i=ua(a),$A(a,null,A),i}return ZA(a,f,i,A),ua(a)}function Sr(a,i,A){if(i=i.updateQueue,i!==null&&(i=i.shared,(A&4194048)!==0)){var f=i.lanes;f&=a.pendingLanes,A|=f,i.lanes=A,qa(a,A)}}function Is(a,i){var A=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,A===f)){var C=null,E=null;if(A=A.firstBaseUpdate,A!==null){do{var ee={lane:A.lane,tag:A.tag,payload:A.payload,callback:null,next:null};E===null?C=E=ee:E=E.next=ee,A=A.next}while(A!==null);E===null?C=E=i:E=E.next=i}else C=E=i;A={baseState:f.baseState,firstBaseUpdate:C,lastBaseUpdate:E,shared:f.shared,callbacks:f.callbacks},a.updateQueue=A;return}a=A.lastBaseUpdate,a===null?A.firstBaseUpdate=i:a.next=i,A.lastBaseUpdate=i}var ia=!1;function Or(){if(ia){var a=S;if(a!==null)throw a}}function Bs(a,i,A,f){ia=!1;var C=a.updateQueue;xt=!1;var E=C.firstBaseUpdate,ee=C.lastBaseUpdate,ge=C.shared.pending;if(ge!==null){C.shared.pending=null;var ke=ge,Ke=ke.next;ke.next=null,ee===null?E=Ke:ee.next=Ke,ee=ke;var Ye=a.alternate;Ye!==null&&(Ye=Ye.updateQueue,ge=Ye.lastBaseUpdate,ge!==ee&&(ge===null?Ye.firstBaseUpdate=Ke:ge.next=Ke,Ye.lastBaseUpdate=ke))}if(E!==null){var tt=C.baseState;ee=0,Ye=Ke=ke=null,ge=E;do{var qe=ge.lane&-536870913,Ge=qe!==ge.lane;if(Ge?(or&qe)===qe:(f&qe)===qe){qe!==0&&qe===b&&(ia=!0),Ye!==null&&(Ye=Ye.next={lane:0,tag:ge.tag,payload:ge.payload,callback:null,next:null});e:{var wt=a,Mt=ge;qe=i;var Pr=A;switch(Mt.tag){case 1:if(wt=Mt.payload,typeof wt=="function"){tt=wt.call(Pr,tt,qe);break e}tt=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=Mt.payload,qe=typeof wt=="function"?wt.call(Pr,tt,qe):wt,qe==null)break e;tt=x({},tt,qe);break e;case 2:xt=!0}}qe=ge.callback,qe!==null&&(a.flags|=64,Ge&&(a.flags|=8192),Ge=C.callbacks,Ge===null?C.callbacks=[qe]:Ge.push(qe))}else Ge={lane:qe,tag:ge.tag,payload:ge.payload,callback:ge.callback,next:null},Ye===null?(Ke=Ye=Ge,ke=tt):Ye=Ye.next=Ge,ee|=qe;if(ge=ge.next,ge===null){if(ge=C.shared.pending,ge===null)break;Ge=ge,ge=Ge.next,Ge.next=null,C.lastBaseUpdate=Ge,C.shared.pending=null}}while(!0);Ye===null&&(ke=tt),C.baseState=ke,C.firstBaseUpdate=Ke,C.lastBaseUpdate=Ye,E===null&&(C.shared.lanes=0),nA|=ee,a.lanes=ee,a.memoizedState=tt}}function fa(a,i){if(typeof a!="function")throw Error(n(191,a));a.call(i)}function js(a,i){var A=a.callbacks;if(A!==null)for(a.callbacks=null,a=0;a<A.length;a++)fa(A[a],i)}var tr=xe(null),mr=xe(0);function as(a,i){a=pl,$(mr,a),$(tr,i),pl=a|i.baseLanes}function vr(){$(mr,pl),$(tr,tr.current)}function Ds(){pl=mr.current,D(tr),D(mr)}var ns=xe(null),pr=null;function bs(a){var i=a.alternate;$(hr,hr.current&1),$(ns,a),pr===null&&(i===null||tr.current!==null||i.memoizedState!==null)&&(pr=a)}function _r(a){$(hr,hr.current),$(ns,a),pr===null&&(pr=a)}function Cs(a){a.tag===22?($(hr,hr.current),$(ns,a),pr===null&&(pr=a)):Ss()}function Ss(){$(hr,hr.current),$(ns,ns.current)}function Lr(a){D(ns),pr===a&&(pr=null),D(hr)}var hr=xe(0);function ma(a){for(var i=a;i!==null;){if(i.tag===13){var A=i.memoizedState;if(A!==null&&(A=A.dehydrated,A===null||Ix(A)||Dx(A)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var As=0,Ut=null,Qt=null,xr=null,Ia=!1,gn=!1,Sa=!1,_s=0,jo=0,Co=null,ld=0;function Hr(){throw Error(n(321))}function Nu(a,i){if(i===null)return!1;for(var A=0;A<i.length&&A<a.length;A++)if(!ta(a[A],i[A]))return!1;return!0}function Bu(a,i,A,f,C,E){return As=E,Ut=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ae.H=a===null||a.memoizedState===null?b1:Vp,Sa=!1,E=A(f,C),Sa=!1,gn&&(E=Wi(i,A,f,C)),Ad(a),E}function Ad(a){ae.H=Uu;var i=Qt!==null&&Qt.next!==null;if(As=0,xr=Qt=Ut=null,Ia=!1,jo=0,Co=null,i)throw Error(n(300));a===null||Xs||(a=a.dependencies,a!==null&&nd(a)&&(Xs=!0))}function Wi(a,i,A,f){Ut=a;var C=0;do{if(gn&&(Co=null),jo=0,gn=!1,25<=C)throw Error(n(301));if(C+=1,xr=Qt=null,a.updateQueue!=null){var E=a.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}ae.H=y1,E=i(A,f)}while(gn);return E}function Hp(){var a=ae.H,i=a.useState()[0];return i=typeof i.then=="function"?So(i):i,a=a.useState()[0],(Qt!==null?Qt.memoizedState:null)!==a&&(Ut.flags|=1024),i}function ju(){var a=_s!==0;return _s=0,a}function Cu(a,i,A){i.updateQueue=a.updateQueue,i.flags&=-2053,a.lanes&=~A}function cd(a){if(Ia){for(a=a.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}Ia=!1}As=0,xr=Qt=Ut=null,gn=!1,jo=_s=0,Co=null}function Ws(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xr===null?Ut.memoizedState=xr=a:xr=xr.next=a,xr}function cs(){if(Qt===null){var a=Ut.alternate;a=a!==null?a.memoizedState:null}else a=Qt.next;var i=xr===null?Ut.memoizedState:xr.next;if(i!==null)xr=i,Qt=a;else{if(a===null)throw Ut.alternate===null?Error(n(467)):Error(n(310));Qt=a,a={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},xr===null?Ut.memoizedState=xr=a:xr=xr.next=a}return xr}function nc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function So(a){var i=jo;return jo+=1,Co===null&&(Co=[]),a=Xe(Co,a,i),i=Ut,(xr===null?i.memoizedState:xr.next)===null&&(i=i.alternate,ae.H=i===null||i.memoizedState===null?b1:Vp),a}function $l(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return So(a);if(a.$$typeof===_)return na(a)}throw Error(n(438,String(a)))}function ol(a){var i=null,A=Ut.updateQueue;if(A!==null&&(i=A.memoCache),i==null){var f=Ut.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(i={data:f.data.map(function(C){return C.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),A===null&&(A=nc(),Ut.updateQueue=A),A.memoCache=i,A=i.data[i.index],A===void 0)for(A=i.data[i.index]=Array(a),f=0;f<a;f++)A[f]=ne;return i.index++,A}function ci(a,i){return typeof i=="function"?i(a):i}function dd(a){var i=cs();return eA(i,Qt,a)}function eA(a,i,A){var f=a.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=A;var C=a.baseQueue,E=f.pending;if(E!==null){if(C!==null){var ee=C.next;C.next=E.next,E.next=ee}i.baseQueue=C=E,f.pending=null}if(E=a.baseState,C===null)a.memoizedState=E;else{i=C.next;var ge=ee=null,ke=null,Ke=i,Ye=!1;do{var tt=Ke.lane&-536870913;if(tt!==Ke.lane?(or&tt)===tt:(As&tt)===tt){var qe=Ke.revertLane;if(qe===0)ke!==null&&(ke=ke.next={lane:0,revertLane:0,gesture:null,action:Ke.action,hasEagerState:Ke.hasEagerState,eagerState:Ke.eagerState,next:null}),tt===b&&(Ye=!0);else if((As&qe)===qe){Ke=Ke.next,qe===b&&(Ye=!0);continue}else tt={lane:0,revertLane:Ke.revertLane,gesture:null,action:Ke.action,hasEagerState:Ke.hasEagerState,eagerState:Ke.eagerState,next:null},ke===null?(ge=ke=tt,ee=E):ke=ke.next=tt,Ut.lanes|=qe,nA|=qe;tt=Ke.action,Sa&&A(E,tt),E=Ke.hasEagerState?Ke.eagerState:A(E,tt)}else qe={lane:tt,revertLane:Ke.revertLane,gesture:Ke.gesture,action:Ke.action,hasEagerState:Ke.hasEagerState,eagerState:Ke.eagerState,next:null},ke===null?(ge=ke=qe,ee=E):ke=ke.next=qe,Ut.lanes|=tt,nA|=tt;Ke=Ke.next}while(Ke!==null&&Ke!==i);if(ke===null?ee=E:ke.next=ge,!ta(E,a.memoizedState)&&(Xs=!0,Ye&&(A=S,A!==null)))throw A;a.memoizedState=E,a.baseState=ee,a.baseQueue=ke,f.lastRenderedState=E}return C===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function ud(a){var i=cs(),A=i.queue;if(A===null)throw Error(n(311));A.lastRenderedReducer=a;var f=A.dispatch,C=A.pending,E=i.memoizedState;if(C!==null){A.pending=null;var ee=C=C.next;do E=a(E,ee.action),ee=ee.next;while(ee!==C);ta(E,i.memoizedState)||(Xs=!0),i.memoizedState=E,i.baseQueue===null&&(i.baseState=E),A.lastRenderedState=E}return[E,f]}function hd(a,i,A){var f=Ut,C=cs(),E=ar;if(E){if(A===void 0)throw Error(n(407));A=A()}else A=i();var ee=!ta((Qt||C).memoizedState,A);if(ee&&(C.memoizedState=A,Xs=!0),C=C.queue,Mp(_u.bind(null,f,C,a),[a]),C.getSnapshot!==i||ee||xr!==null&&xr.memoizedState.tag&1){if(f.flags|=2048,Al(9,{destroy:void 0},Su.bind(null,f,C,A,i),null),Wr===null)throw Error(n(349));E||(As&127)!==0||Xi(f,i,A)}return A}function Xi(a,i,A){a.flags|=16384,a={getSnapshot:i,value:A},i=Ut.updateQueue,i===null?(i=nc(),Ut.updateQueue=i,i.stores=[a]):(A=i.stores,A===null?i.stores=[a]:A.push(a))}function Su(a,i,A,f){i.value=A,i.getSnapshot=f,sf(i)&&ku(a)}function _u(a,i,A){return A(function(){sf(i)&&ku(a)})}function sf(a){var i=a.getSnapshot;a=a.value;try{var A=i();return!ta(a,A)}catch{return!0}}function ku(a){var i=Gi(a,2);i!==null&&Nn(i,a,2)}function _o(a){var i=Ws();if(typeof a=="function"){var A=a;if(a=A(),Sa){Dt(!0);try{A()}finally{Dt(!1)}}}return i.memoizedState=i.baseState=a,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ci,lastRenderedState:a},i}function af(a,i,A,f){return a.baseState=A,eA(a,Qt,typeof f=="function"?f:ci)}function nf(a,i,A,f,C){if(cf(a))throw Error(n(485));if(a=i.action,a!==null){var E={payload:C,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ee){E.listeners.push(ee)}};ae.T!==null?A(!0):E.isTransition=!1,f(E),A=i.pending,A===null?(E.next=i.pending=E,of(i,E)):(E.next=A.next,i.pending=A.next=E)}}function of(a,i){var A=i.action,f=i.payload,C=a.state;if(i.isTransition){var E=ae.T,ee={};ae.T=ee;try{var ge=A(C,f),ke=ae.S;ke!==null&&ke(ee,ge),Fu(a,i,ge)}catch(Ke){ll(a,i,Ke)}finally{E!==null&&ee.types!==null&&(E.types=ee.types),ae.T=E}}else try{E=A(C,f),Fu(a,i,E)}catch(Ke){ll(a,i,Ke)}}function Fu(a,i,A){A!==null&&typeof A=="object"&&typeof A.then=="function"?A.then(function(f){lf(a,i,f)},function(f){return ll(a,i,f)}):lf(a,i,A)}function lf(a,i,A){i.status="fulfilled",i.value=A,fd(i),a.state=A,i=a.pending,i!==null&&(A=i.next,A===i?a.pending=null:(A=A.next,i.next=A,of(a,A)))}function ll(a,i,A){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do i.status="rejected",i.reason=A,fd(i),i=i.next;while(i!==f)}a.action=null}function fd(a){a=a.listeners;for(var i=0;i<a.length;i++)(0,a[i])()}function ic(a,i){return i}function di(a,i){if(ar){var A=Wr.formState;if(A!==null){e:{var f=Ut;if(ar){if(Gr){t:{for(var C=Gr,E=ls;C.nodeType!==8;){if(!E){C=null;break t}if(C=ui(C.nextSibling),C===null){C=null;break t}}E=C.data,C=E==="F!"||E==="F"?C:null}if(C){Gr=ui(C.nextSibling),f=C.data==="F!";break e}}yo(f)}f=!1}f&&(i=A[0])}}return A=Ws(),A.memoizedState=A.baseState=i,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ic,lastRenderedState:i},A.queue=f,A=p1.bind(null,Ut,f),f.dispatch=A,f=_o(!1),E=Gp.bind(null,Ut,!1,f.queue),f=Ws(),C={state:i,dispatch:null,action:a,pending:null},f.queue=C,A=nf.bind(null,Ut,C,E,A),C.dispatch=A,f.memoizedState=a,[i,A,!1]}function Yi(a){var i=cs();return Ji(i,Qt,a)}function Ji(a,i,A){if(i=eA(a,i,ic)[0],a=dd(ci)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var f=So(i)}catch(ee){throw ee===Ee?Ne:ee}else f=i;i=cs();var C=i.queue,E=C.dispatch;return A!==i.memoizedState&&(Ut.flags|=2048,Al(9,{destroy:void 0},md.bind(null,C,A),null)),[f,E,a]}function md(a,i){a.action=i}function pd(a){var i=cs(),A=Qt;if(A!==null)return Ji(i,A,a);cs(),i=i.memoizedState,A=cs();var f=A.queue.dispatch;return A.memoizedState=a,[i,f,!1]}function Al(a,i,A,f){return a={tag:a,create:A,deps:f,inst:i,next:null},i=Ut.updateQueue,i===null&&(i=nc(),Ut.updateQueue=i),A=i.lastEffect,A===null?i.lastEffect=a.next=a:(f=A.next,A.next=a,a.next=f,i.lastEffect=a),a}function Af(){return cs().memoizedState}function tA(a,i,A,f){var C=Ws();Ut.flags|=a,C.memoizedState=Al(1|i,{destroy:void 0},A,f===void 0?null:f)}function rA(a,i,A,f){var C=cs();f=f===void 0?null:f;var E=C.memoizedState.inst;Qt!==null&&f!==null&&Nu(f,Qt.memoizedState.deps)?C.memoizedState=Al(i,E,A,f):(Ut.flags|=a,C.memoizedState=Al(1|i,E,A,f))}function r1(a,i){tA(8390656,8,a,i)}function Mp(a,i){rA(2048,8,a,i)}function rC(a){Ut.flags|=4;var i=Ut.updateQueue;if(i===null)i=nc(),Ut.updateQueue=i,i.events=[a];else{var A=i.events;A===null?i.events=[a]:A.push(a)}}function s1(a){var i=cs().memoizedState;return rC({ref:i,nextImpl:a}),function(){if((kr&2)!==0)throw Error(n(440));return i.impl.apply(void 0,arguments)}}function a1(a,i){return rA(4,2,a,i)}function n1(a,i){return rA(4,4,a,i)}function i1(a,i){if(typeof i=="function"){a=a();var A=i(a);return function(){typeof A=="function"?A():i(null)}}if(i!=null)return a=a(),i.current=a,function(){i.current=null}}function o1(a,i,A){A=A!=null?A.concat([a]):null,rA(4,4,i1.bind(null,i,a),A)}function Pp(){}function l1(a,i){var A=cs();i=i===void 0?null:i;var f=A.memoizedState;return i!==null&&Nu(i,f[1])?f[0]:(A.memoizedState=[a,i],a)}function A1(a,i){var A=cs();i=i===void 0?null:i;var f=A.memoizedState;if(i!==null&&Nu(i,f[1]))return f[0];if(f=a(),Sa){Dt(!0);try{a()}finally{Dt(!1)}}return A.memoizedState=[f,i],f}function Kp(a,i,A){return A===void 0||(As&1073741824)!==0&&(or&261930)===0?a.memoizedState=i:(a.memoizedState=A,a=cw(),Ut.lanes|=a,nA|=a,A)}function c1(a,i,A,f){return ta(A,i)?A:tr.current!==null?(a=Kp(a,A,f),ta(a,i)||(Xs=!0),a):(As&42)===0||(As&1073741824)!==0&&(or&261930)===0?(Xs=!0,a.memoizedState=A):(a=cw(),Ut.lanes|=a,nA|=a,i)}function d1(a,i,A,f,C){var E=se.p;se.p=E!==0&&8>E?E:8;var ee=ae.T,ge={};ae.T=ge,Gp(a,!1,i,A);try{var ke=C(),Ke=ae.S;if(Ke!==null&&Ke(ge,ke),ke!==null&&typeof ke=="object"&&typeof ke.then=="function"){var Ye=ue(ke,f);Eu(a,i,Ye,qn(a))}else Eu(a,i,f,qn(a))}catch(tt){Eu(a,i,{then:function(){},status:"rejected",reason:tt},qn())}finally{se.p=E,ee!==null&&ge.types!==null&&(ee.types=ge.types),ae.T=ee}}function sC(){}function zp(a,i,A,f){if(a.tag!==5)throw Error(n(476));var C=u1(a).queue;d1(a,C,i,fe,A===null?sC:function(){return h1(a),A(f)})}function u1(a){var i=a.memoizedState;if(i!==null)return i;i={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ci,lastRenderedState:fe},next:null};var A={};return i.next={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ci,lastRenderedState:A},next:null},a.memoizedState=i,a=a.alternate,a!==null&&(a.memoizedState=i),i}function h1(a){var i=u1(a);i.next===null&&(i=a.alternate.memoizedState),Eu(a,i.next.queue,{},qn())}function qp(){return na(Wu)}function f1(){return cs().memoizedState}function m1(){return cs().memoizedState}function aC(a){for(var i=a.return;i!==null;){switch(i.tag){case 24:case 3:var A=qn();a=Ot(A);var f=$t(i,a,A);f!==null&&(Nn(f,i,A),Sr(f,i,A)),i={cache:Zl()},a.payload=i;return}i=i.return}}function nC(a,i,A){var f=qn();A={lane:f,revertLane:0,gesture:null,action:A,hasEagerState:!1,eagerState:null,next:null},cf(a)?x1(i,A):(A=Jc(a,i,A,f),A!==null&&(Nn(A,a,f),g1(A,i,f)))}function p1(a,i,A){var f=qn();Eu(a,i,A,f)}function Eu(a,i,A,f){var C={lane:f,revertLane:0,gesture:null,action:A,hasEagerState:!1,eagerState:null,next:null};if(cf(a))x1(i,C);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=i.lastRenderedReducer,E!==null))try{var ee=i.lastRenderedState,ge=E(ee,A);if(C.hasEagerState=!0,C.eagerState=ge,ta(ge,ee))return ZA(a,i,C,0),Wr===null&&JA(),!1}catch{}if(A=Jc(a,i,C,f),A!==null)return Nn(A,a,f),g1(A,i,f),!0}return!1}function Gp(a,i,A,f){if(f={lane:2,revertLane:Bx(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},cf(a)){if(i)throw Error(n(479))}else i=Jc(a,A,f,2),i!==null&&Nn(i,a,2)}function cf(a){var i=a.alternate;return a===Ut||i!==null&&i===Ut}function x1(a,i){gn=Ia=!0;var A=a.pending;A===null?i.next=i:(i.next=A.next,A.next=i),a.pending=i}function g1(a,i,A){if((A&4194048)!==0){var f=i.lanes;f&=a.pendingLanes,A|=f,i.lanes=A,qa(a,A)}}var Uu={readContext:na,use:$l,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useLayoutEffect:Hr,useInsertionEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useSyncExternalStore:Hr,useId:Hr,useHostTransitionStatus:Hr,useFormState:Hr,useActionState:Hr,useOptimistic:Hr,useMemoCache:Hr,useCacheRefresh:Hr};Uu.useEffectEvent=Hr;var b1={readContext:na,use:$l,useCallback:function(a,i){return Ws().memoizedState=[a,i===void 0?null:i],a},useContext:na,useEffect:r1,useImperativeHandle:function(a,i,A){A=A!=null?A.concat([a]):null,tA(4194308,4,i1.bind(null,i,a),A)},useLayoutEffect:function(a,i){return tA(4194308,4,a,i)},useInsertionEffect:function(a,i){tA(4,2,a,i)},useMemo:function(a,i){var A=Ws();i=i===void 0?null:i;var f=a();if(Sa){Dt(!0);try{a()}finally{Dt(!1)}}return A.memoizedState=[f,i],f},useReducer:function(a,i,A){var f=Ws();if(A!==void 0){var C=A(i);if(Sa){Dt(!0);try{A(i)}finally{Dt(!1)}}}else C=i;return f.memoizedState=f.baseState=C,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:C},f.queue=a,a=a.dispatch=nC.bind(null,Ut,a),[f.memoizedState,a]},useRef:function(a){var i=Ws();return a={current:a},i.memoizedState=a},useState:function(a){a=_o(a);var i=a.queue,A=p1.bind(null,Ut,i);return i.dispatch=A,[a.memoizedState,A]},useDebugValue:Pp,useDeferredValue:function(a,i){var A=Ws();return Kp(A,a,i)},useTransition:function(){var a=_o(!1);return a=d1.bind(null,Ut,a.queue,!0,!1),Ws().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,i,A){var f=Ut,C=Ws();if(ar){if(A===void 0)throw Error(n(407));A=A()}else{if(A=i(),Wr===null)throw Error(n(349));(or&127)!==0||Xi(f,i,A)}C.memoizedState=A;var E={value:A,getSnapshot:i};return C.queue=E,r1(_u.bind(null,f,E,a),[a]),f.flags|=2048,Al(9,{destroy:void 0},Su.bind(null,f,E,A,i),null),A},useId:function(){var a=Ws(),i=Wr.identifierPrefix;if(ar){var A=pn,f=mn;A=(f&~(1<<32-Gt(f)-1)).toString(32)+A,i="_"+i+"R_"+A,A=_s++,0<A&&(i+="H"+A.toString(32)),i+="_"}else A=ld++,i="_"+i+"r_"+A.toString(32)+"_";return a.memoizedState=i},useHostTransitionStatus:qp,useFormState:di,useActionState:di,useOptimistic:function(a){var i=Ws();i.memoizedState=i.baseState=a;var A={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=A,i=Gp.bind(null,Ut,!0,A),A.dispatch=i,[a,i]},useMemoCache:ol,useCacheRefresh:function(){return Ws().memoizedState=aC.bind(null,Ut)},useEffectEvent:function(a){var i=Ws(),A={impl:a};return i.memoizedState=A,function(){if((kr&2)!==0)throw Error(n(440));return A.impl.apply(void 0,arguments)}}},Vp={readContext:na,use:$l,useCallback:l1,useContext:na,useEffect:Mp,useImperativeHandle:o1,useInsertionEffect:a1,useLayoutEffect:n1,useMemo:A1,useReducer:dd,useRef:Af,useState:function(){return dd(ci)},useDebugValue:Pp,useDeferredValue:function(a,i){var A=cs();return c1(A,Qt.memoizedState,a,i)},useTransition:function(){var a=dd(ci)[0],i=cs().memoizedState;return[typeof a=="boolean"?a:So(a),i]},useSyncExternalStore:hd,useId:f1,useHostTransitionStatus:qp,useFormState:Yi,useActionState:Yi,useOptimistic:function(a,i){var A=cs();return af(A,Qt,a,i)},useMemoCache:ol,useCacheRefresh:m1};Vp.useEffectEvent=s1;var y1={readContext:na,use:$l,useCallback:l1,useContext:na,useEffect:Mp,useImperativeHandle:o1,useInsertionEffect:a1,useLayoutEffect:n1,useMemo:A1,useReducer:ud,useRef:Af,useState:function(){return ud(ci)},useDebugValue:Pp,useDeferredValue:function(a,i){var A=cs();return Qt===null?Kp(A,a,i):c1(A,Qt.memoizedState,a,i)},useTransition:function(){var a=ud(ci)[0],i=cs().memoizedState;return[typeof a=="boolean"?a:So(a),i]},useSyncExternalStore:hd,useId:f1,useHostTransitionStatus:qp,useFormState:pd,useActionState:pd,useOptimistic:function(a,i){var A=cs();return Qt!==null?af(A,Qt,a,i):(A.baseState=a,[a,A.queue.dispatch])},useMemoCache:ol,useCacheRefresh:m1};y1.useEffectEvent=s1;function Wp(a,i,A,f){i=a.memoizedState,A=A(f,i),A=A==null?i:x({},i,A),a.memoizedState=A,a.lanes===0&&(a.updateQueue.baseState=A)}var Xp={enqueueSetState:function(a,i,A){a=a._reactInternals;var f=qn(),C=Ot(f);C.payload=i,A!=null&&(C.callback=A),i=$t(a,C,f),i!==null&&(Nn(i,a,f),Sr(i,a,f))},enqueueReplaceState:function(a,i,A){a=a._reactInternals;var f=qn(),C=Ot(f);C.tag=1,C.payload=i,A!=null&&(C.callback=A),i=$t(a,C,f),i!==null&&(Nn(i,a,f),Sr(i,a,f))},enqueueForceUpdate:function(a,i){a=a._reactInternals;var A=qn(),f=Ot(A);f.tag=2,i!=null&&(f.callback=i),i=$t(a,f,A),i!==null&&(Nn(i,a,A),Sr(i,a,A))}};function w1(a,i,A,f,C,E,ee){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,E,ee):i.prototype&&i.prototype.isPureReactComponent?!Pi(A,f)||!Pi(C,E):!0}function v1(a,i,A,f){a=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(A,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(A,f),i.state!==a&&Xp.enqueueReplaceState(i,i.state,null)}function oc(a,i){var A=i;if("ref"in i){A={};for(var f in i)f!=="ref"&&(A[f]=i[f])}if(a=a.defaultProps){A===i&&(A=x({},A));for(var C in a)A[C]===void 0&&(A[C]=a[C])}return A}function N1(a){YA(a)}function B1(a){console.error(a)}function j1(a){YA(a)}function df(a,i){try{var A=a.onUncaughtError;A(i.value,{componentStack:i.stack})}catch(f){setTimeout(function(){throw f})}}function C1(a,i,A){try{var f=a.onCaughtError;f(A.value,{componentStack:A.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Yp(a,i,A){return A=Ot(A),A.tag=3,A.payload={element:null},A.callback=function(){df(a,i)},A}function S1(a){return a=Ot(a),a.tag=3,a}function _1(a,i,A,f){var C=A.type.getDerivedStateFromError;if(typeof C=="function"){var E=f.value;a.payload=function(){return C(E)},a.callback=function(){C1(i,A,f)}}var ee=A.stateNode;ee!==null&&typeof ee.componentDidCatch=="function"&&(a.callback=function(){C1(i,A,f),typeof C!="function"&&(iA===null?iA=new Set([this]):iA.add(this));var ge=f.stack;this.componentDidCatch(f.value,{componentStack:ge!==null?ge:""})})}function iC(a,i,A,f,C){if(A.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(i=A.alternate,i!==null&&No(i,A,C,!0),A=ns.current,A!==null){switch(A.tag){case 31:case 13:return pr===null?Nf():A.alternate===null&&ks===0&&(ks=3),A.flags&=-257,A.flags|=65536,A.lanes=C,f===Le?A.flags|=16384:(i=A.updateQueue,i===null?A.updateQueue=new Set([f]):i.add(f),wx(a,f,C)),!1;case 22:return A.flags|=65536,f===Le?A.flags|=16384:(i=A.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([f])},A.updateQueue=i):(A=i.retryQueue,A===null?i.retryQueue=new Set([f]):A.add(f)),wx(a,f,C)),!1}throw Error(n(435,A.tag))}return wx(a,f,C),Nf(),!1}if(ar)return i=ns.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=C,f!==Pn&&(a=Error(n(422),{cause:f}),Yl(un(a,A)))):(f!==Pn&&(i=Error(n(423),{cause:f}),Yl(un(i,A))),a=a.current.alternate,a.flags|=65536,C&=-C,a.lanes|=C,f=un(f,A),C=Yp(a.stateNode,f,C),Is(a,C),ks!==4&&(ks=2)),!1;var E=Error(n(520),{cause:f});if(E=un(E,A),Hu===null?Hu=[E]:Hu.push(E),ks!==4&&(ks=2),i===null)return!0;f=un(f,A),A=i;do{switch(A.tag){case 3:return A.flags|=65536,a=C&-C,A.lanes|=a,a=Yp(A.stateNode,f,a),Is(A,a),!1;case 1:if(i=A.type,E=A.stateNode,(A.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(iA===null||!iA.has(E))))return A.flags|=65536,C&=-C,A.lanes|=C,C=S1(C),_1(C,a,A,f),Is(A,C),!1}A=A.return}while(A!==null);return!1}var Jp=Error(n(461)),Xs=!1;function _a(a,i,A,f){i.child=a===null?Jt(i,null,A,f):Vr(i,a.child,A,f)}function k1(a,i,A,f,C){A=A.render;var E=i.ref;if("ref"in f){var ee={};for(var ge in f)ge!=="ref"&&(ee[ge]=f[ge])}else ee=f;return Bo(i),f=Bu(a,i,A,ee,E,C),ge=ju(),a!==null&&!Xs?(Cu(a,i,C),cl(a,i,C)):(ar&&ge&&yu(i),i.flags|=1,_a(a,i,f,C),i.child)}function F1(a,i,A,f,C){if(a===null){var E=A.type;return typeof E=="function"&&!$c(E)&&E.defaultProps===void 0&&A.compare===null?(i.tag=15,i.type=E,E1(a,i,E,f,C)):(a=Vl(A.type,null,f,i,i.mode,C),a.ref=i.ref,a.return=i,i.child=a)}if(E=a.child,!nx(a,C)){var ee=E.memoizedProps;if(A=A.compare,A=A!==null?A:Pi,A(ee,f)&&a.ref===i.ref)return cl(a,i,C)}return i.flags|=1,a=dn(E,f),a.ref=i.ref,a.return=i,i.child=a}function E1(a,i,A,f,C){if(a!==null){var E=a.memoizedProps;if(Pi(E,f)&&a.ref===i.ref)if(Xs=!1,i.pendingProps=f=E,nx(a,C))(a.flags&131072)!==0&&(Xs=!0);else return i.lanes=a.lanes,cl(a,i,C)}return Zp(a,i,A,f,C)}function U1(a,i,A,f){var C=f.children,E=a!==null?a.memoizedState:null;if(a===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((i.flags&128)!==0){if(E=E!==null?E.baseLanes|A:A,a!==null){for(f=i.child=a.child,C=0;f!==null;)C=C|f.lanes|f.childLanes,f=f.sibling;f=C&~E}else f=0,i.child=null;return Q1(a,i,E,A,f)}if((A&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},a!==null&&ve(i,E!==null?E.cachePool:null),E!==null?as(i,E):vr(),Cs(i);else return f=i.lanes=536870912,Q1(a,i,E!==null?E.baseLanes|A:A,A,f)}else E!==null?(ve(i,E.cachePool),as(i,E),Ss(),i.memoizedState=null):(a!==null&&ve(i,null),vr(),Ss());return _a(a,i,C,A),i.child}function Qu(a,i){return a!==null&&a.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Q1(a,i,A,f,C){var E=we();return E=E===null?null:{parent:gs._currentValue,pool:E},i.memoizedState={baseLanes:A,cachePool:E},a!==null&&ve(i,null),vr(),Cs(i),a!==null&&No(a,i,f,!0),i.childLanes=C,null}function uf(a,i){return i=ff({mode:i.mode,children:i.children},a.mode),i.ref=a.ref,a.child=i,i.return=a,i}function L1(a,i,A){return Vr(i,a.child,null,A),a=uf(i,i.pendingProps),a.flags|=2,Lr(i),i.memoizedState=null,a}function oC(a,i,A){var f=i.pendingProps,C=(i.flags&128)!==0;if(i.flags&=-129,a===null){if(ar){if(f.mode==="hidden")return a=uf(i,f),i.lanes=536870912,Qu(null,a);if(_r(i),(a=Gr)?(a=Gw(a,ls),a=a!==null&&a.data==="&"?a:null,a!==null&&(i.memoizedState={dehydrated:a,treeContext:bo!==null?{id:mn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},A=ed(a),A.return=i,i.child=A,sa=i,Gr=null)):a=null,a===null)throw yo(i);return i.lanes=536870912,null}return uf(i,f)}var E=a.memoizedState;if(E!==null){var ee=E.dehydrated;if(_r(i),C)if(i.flags&256)i.flags&=-257,i=L1(a,i,A);else if(i.memoizedState!==null)i.child=a.child,i.flags|=128,i=null;else throw Error(n(558));else if(Xs||No(a,i,A,!1),C=(A&a.childLanes)!==0,Xs||C){if(f=Wr,f!==null&&(ee=Ga(f,A),ee!==0&&ee!==E.retryLane))throw E.retryLane=ee,Gi(a,ee),Nn(f,a,ee),Jp;Nf(),i=L1(a,i,A)}else a=E.treeContext,Gr=ui(ee.nextSibling),sa=i,ar=!0,Ca=null,ls=!1,a!==null&&tf(i,a),i=uf(i,f),i.flags|=4096;return i}return a=dn(a.child,{mode:f.mode,children:f.children}),a.ref=i.ref,i.child=a,a.return=i,a}function hf(a,i){var A=i.ref;if(A===null)a!==null&&a.ref!==null&&(i.flags|=4194816);else{if(typeof A!="function"&&typeof A!="object")throw Error(n(284));(a===null||a.ref!==A)&&(i.flags|=4194816)}}function Zp(a,i,A,f,C){return Bo(i),A=Bu(a,i,A,f,void 0,C),f=ju(),a!==null&&!Xs?(Cu(a,i,C),cl(a,i,C)):(ar&&f&&yu(i),i.flags|=1,_a(a,i,A,C),i.child)}function T1(a,i,A,f,C,E){return Bo(i),i.updateQueue=null,A=Wi(i,f,A,C),Ad(a),f=ju(),a!==null&&!Xs?(Cu(a,i,E),cl(a,i,E)):(ar&&f&&yu(i),i.flags|=1,_a(a,i,A,E),i.child)}function I1(a,i,A,f,C){if(Bo(i),i.stateNode===null){var E=ra,ee=A.contextType;typeof ee=="object"&&ee!==null&&(E=na(ee)),E=new A(f,E),i.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=Xp,i.stateNode=E,E._reactInternals=i,E=i.stateNode,E.props=f,E.state=i.memoizedState,E.refs={},At(i),ee=A.contextType,E.context=typeof ee=="object"&&ee!==null?na(ee):ra,E.state=i.memoizedState,ee=A.getDerivedStateFromProps,typeof ee=="function"&&(Wp(i,A,ee,f),E.state=i.memoizedState),typeof A.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(ee=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),ee!==E.state&&Xp.enqueueReplaceState(E,E.state,null),Bs(i,f,E,C),Or(),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308),f=!0}else if(a===null){E=i.stateNode;var ge=i.memoizedProps,ke=oc(A,ge);E.props=ke;var Ke=E.context,Ye=A.contextType;ee=ra,typeof Ye=="object"&&Ye!==null&&(ee=na(Ye));var tt=A.getDerivedStateFromProps;Ye=typeof tt=="function"||typeof E.getSnapshotBeforeUpdate=="function",ge=i.pendingProps!==ge,Ye||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(ge||Ke!==ee)&&v1(i,E,f,ee),xt=!1;var qe=i.memoizedState;E.state=qe,Bs(i,f,E,C),Or(),Ke=i.memoizedState,ge||qe!==Ke||xt?(typeof tt=="function"&&(Wp(i,A,tt,f),Ke=i.memoizedState),(ke=xt||w1(i,A,ke,f,qe,Ke,ee))?(Ye||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(i.flags|=4194308)):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=Ke),E.props=f,E.state=Ke,E.context=ee,f=ke):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{E=i.stateNode,ss(a,i),ee=i.memoizedProps,Ye=oc(A,ee),E.props=Ye,tt=i.pendingProps,qe=E.context,Ke=A.contextType,ke=ra,typeof Ke=="object"&&Ke!==null&&(ke=na(Ke)),ge=A.getDerivedStateFromProps,(Ke=typeof ge=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(ee!==tt||qe!==ke)&&v1(i,E,f,ke),xt=!1,qe=i.memoizedState,E.state=qe,Bs(i,f,E,C),Or();var Ge=i.memoizedState;ee!==tt||qe!==Ge||xt||a!==null&&a.dependencies!==null&&nd(a.dependencies)?(typeof ge=="function"&&(Wp(i,A,ge,f),Ge=i.memoizedState),(Ye=xt||w1(i,A,Ye,f,qe,Ge,ke)||a!==null&&a.dependencies!==null&&nd(a.dependencies))?(Ke||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(f,Ge,ke),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(f,Ge,ke)),typeof E.componentDidUpdate=="function"&&(i.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof E.componentDidUpdate!="function"||ee===a.memoizedProps&&qe===a.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||ee===a.memoizedProps&&qe===a.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=Ge),E.props=f,E.state=Ge,E.context=ke,f=Ye):(typeof E.componentDidUpdate!="function"||ee===a.memoizedProps&&qe===a.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||ee===a.memoizedProps&&qe===a.memoizedState||(i.flags|=1024),f=!1)}return E=f,hf(a,i),f=(i.flags&128)!==0,E||f?(E=i.stateNode,A=f&&typeof A.getDerivedStateFromError!="function"?null:E.render(),i.flags|=1,a!==null&&f?(i.child=Vr(i,a.child,null,C),i.child=Vr(i,null,A,C)):_a(a,i,A,C),i.memoizedState=E.state,a=i.child):a=cl(a,i,C),a}function D1(a,i,A,f){return nl(),i.flags|=256,_a(a,i,A,f),i.child}var $p={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ex(a){return{baseLanes:a,cachePool:Be()}}function tx(a,i,A){return a=a!==null?a.childLanes&~A:0,i&&(a|=zn),a}function R1(a,i,A){var f=i.pendingProps,C=!1,E=(i.flags&128)!==0,ee;if((ee=E)||(ee=a!==null&&a.memoizedState===null?!1:(hr.current&2)!==0),ee&&(C=!0,i.flags&=-129),ee=(i.flags&32)!==0,i.flags&=-33,a===null){if(ar){if(C?bs(i):Ss(),(a=Gr)?(a=Gw(a,ls),a=a!==null&&a.data!=="&"?a:null,a!==null&&(i.memoizedState={dehydrated:a,treeContext:bo!==null?{id:mn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},A=ed(a),A.return=i,i.child=A,sa=i,Gr=null)):a=null,a===null)throw yo(i);return Dx(a)?i.lanes=32:i.lanes=536870912,null}var ge=f.children;return f=f.fallback,C?(Ss(),C=i.mode,ge=ff({mode:"hidden",children:ge},C),f=go(f,C,A,null),ge.return=i,f.return=i,ge.sibling=f,i.child=ge,f=i.child,f.memoizedState=ex(A),f.childLanes=tx(a,ee,A),i.memoizedState=$p,Qu(null,f)):(bs(i),rx(i,ge))}var ke=a.memoizedState;if(ke!==null&&(ge=ke.dehydrated,ge!==null)){if(E)i.flags&256?(bs(i),i.flags&=-257,i=sx(a,i,A)):i.memoizedState!==null?(Ss(),i.child=a.child,i.flags|=128,i=null):(Ss(),ge=f.fallback,C=i.mode,f=ff({mode:"visible",children:f.children},C),ge=go(ge,C,A,null),ge.flags|=2,f.return=i,ge.return=i,f.sibling=ge,i.child=f,Vr(i,a.child,null,A),f=i.child,f.memoizedState=ex(A),f.childLanes=tx(a,ee,A),i.memoizedState=$p,i=Qu(null,f));else if(bs(i),Dx(ge)){if(ee=ge.nextSibling&&ge.nextSibling.dataset,ee)var Ke=ee.dgst;ee=Ke,f=Error(n(419)),f.stack="",f.digest=ee,Yl({value:f,source:null,stack:null}),i=sx(a,i,A)}else if(Xs||No(a,i,A,!1),ee=(A&a.childLanes)!==0,Xs||ee){if(ee=Wr,ee!==null&&(f=Ga(ee,A),f!==0&&f!==ke.retryLane))throw ke.retryLane=f,Gi(a,f),Nn(ee,a,f),Jp;Ix(ge)||Nf(),i=sx(a,i,A)}else Ix(ge)?(i.flags|=192,i.child=a.child,i=null):(a=ke.treeContext,Gr=ui(ge.nextSibling),sa=i,ar=!0,Ca=null,ls=!1,a!==null&&tf(i,a),i=rx(i,f.children),i.flags|=4096);return i}return C?(Ss(),ge=f.fallback,C=i.mode,ke=a.child,Ke=ke.sibling,f=dn(ke,{mode:"hidden",children:f.children}),f.subtreeFlags=ke.subtreeFlags&65011712,Ke!==null?ge=dn(Ke,ge):(ge=go(ge,C,A,null),ge.flags|=2),ge.return=i,f.return=i,f.sibling=ge,i.child=f,Qu(null,f),f=i.child,ge=a.child.memoizedState,ge===null?ge=ex(A):(C=ge.cachePool,C!==null?(ke=gs._currentValue,C=C.parent!==ke?{parent:ke,pool:ke}:C):C=Be(),ge={baseLanes:ge.baseLanes|A,cachePool:C}),f.memoizedState=ge,f.childLanes=tx(a,ee,A),i.memoizedState=$p,Qu(a.child,f)):(bs(i),A=a.child,a=A.sibling,A=dn(A,{mode:"visible",children:f.children}),A.return=i,A.sibling=null,a!==null&&(ee=i.deletions,ee===null?(i.deletions=[a],i.flags|=16):ee.push(a)),i.child=A,i.memoizedState=null,A)}function rx(a,i){return i=ff({mode:"visible",children:i},a.mode),i.return=a,a.child=i}function ff(a,i){return a=ha(22,a,null,i),a.lanes=0,a}function sx(a,i,A){return Vr(i,a.child,null,A),a=rx(i,i.pendingProps.children),a.flags|=2,i.memoizedState=null,a}function O1(a,i,A){a.lanes|=i;var f=a.alternate;f!==null&&(f.lanes|=i),Jl(a.return,i,A)}function ax(a,i,A,f,C,E){var ee=a.memoizedState;ee===null?a.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:A,tailMode:C,treeForkCount:E}:(ee.isBackwards=i,ee.rendering=null,ee.renderingStartTime=0,ee.last=f,ee.tail=A,ee.tailMode=C,ee.treeForkCount=E)}function H1(a,i,A){var f=i.pendingProps,C=f.revealOrder,E=f.tail;f=f.children;var ee=hr.current,ge=(ee&2)!==0;if(ge?(ee=ee&1|2,i.flags|=128):ee&=1,$(hr,ee),_a(a,i,f,A),f=ar?rc:0,!ge&&a!==null&&(a.flags&128)!==0)e:for(a=i.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&O1(a,A,i);else if(a.tag===19)O1(a,A,i);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(C){case"forwards":for(A=i.child,C=null;A!==null;)a=A.alternate,a!==null&&ma(a)===null&&(C=A),A=A.sibling;A=C,A===null?(C=i.child,i.child=null):(C=A.sibling,A.sibling=null),ax(i,!1,C,A,E,f);break;case"backwards":case"unstable_legacy-backwards":for(A=null,C=i.child,i.child=null;C!==null;){if(a=C.alternate,a!==null&&ma(a)===null){i.child=C;break}a=C.sibling,C.sibling=A,A=C,C=a}ax(i,!0,A,null,E,f);break;case"together":ax(i,!1,null,null,void 0,f);break;default:i.memoizedState=null}return i.child}function cl(a,i,A){if(a!==null&&(i.dependencies=a.dependencies),nA|=i.lanes,(A&i.childLanes)===0)if(a!==null){if(No(a,i,A,!1),(A&i.childLanes)===0)return null}else return null;if(a!==null&&i.child!==a.child)throw Error(n(153));if(i.child!==null){for(a=i.child,A=dn(a,a.pendingProps),i.child=A,A.return=i;a.sibling!==null;)a=a.sibling,A=A.sibling=dn(a,a.pendingProps),A.return=i;A.sibling=null}return i.child}function nx(a,i){return(a.lanes&i)!==0?!0:(a=a.dependencies,!!(a!==null&&nd(a)))}function lC(a,i,A){switch(i.tag){case 3:H(i,i.stateNode.containerInfo),vo(i,gs,a.memoizedState.cache),nl();break;case 27:case 5:Ae(i);break;case 4:H(i,i.stateNode.containerInfo);break;case 10:vo(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,_r(i),null;break;case 13:var f=i.memoizedState;if(f!==null)return f.dehydrated!==null?(bs(i),i.flags|=128,null):(A&i.child.childLanes)!==0?R1(a,i,A):(bs(i),a=cl(a,i,A),a!==null?a.sibling:null);bs(i);break;case 19:var C=(a.flags&128)!==0;if(f=(A&i.childLanes)!==0,f||(No(a,i,A,!1),f=(A&i.childLanes)!==0),C){if(f)return H1(a,i,A);i.flags|=128}if(C=i.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),$(hr,hr.current),f)break;return null;case 22:return i.lanes=0,U1(a,i,A,i.pendingProps);case 24:vo(i,gs,a.memoizedState.cache)}return cl(a,i,A)}function M1(a,i,A){if(a!==null)if(a.memoizedProps!==i.pendingProps)Xs=!0;else{if(!nx(a,A)&&(i.flags&128)===0)return Xs=!1,lC(a,i,A);Xs=(a.flags&131072)!==0}else Xs=!1,ar&&(i.flags&1048576)!==0&&ef(i,rc,i.index);switch(i.lanes=0,i.tag){case 16:e:{var f=i.pendingProps;if(a=Oe(i.elementType),i.type=a,typeof a=="function")$c(a)?(f=oc(a,f),i.tag=1,i=I1(null,i,a,f,A)):(i.tag=0,i=Zp(null,i,a,f,A));else{if(a!=null){var C=a.$$typeof;if(C===w){i.tag=11,i=k1(null,i,a,f,A);break e}else if(C===M){i.tag=14,i=F1(null,i,a,f,A);break e}}throw i=F(a)||a,Error(n(306,i,""))}}return i;case 0:return Zp(a,i,i.type,i.pendingProps,A);case 1:return f=i.type,C=oc(f,i.pendingProps),I1(a,i,f,C,A);case 3:e:{if(H(i,i.stateNode.containerInfo),a===null)throw Error(n(387));f=i.pendingProps;var E=i.memoizedState;C=E.element,ss(a,i),Bs(i,f,null,A);var ee=i.memoizedState;if(f=ee.cache,vo(i,gs,f),f!==E.cache&&il(i,[gs],A,!0),Or(),f=ee.element,E.isDehydrated)if(E={element:f,isDehydrated:!1,cache:ee.cache},i.updateQueue.baseState=E,i.memoizedState=E,i.flags&256){i=D1(a,i,f,A);break e}else if(f!==C){C=un(Error(n(424)),i),Yl(C),i=D1(a,i,f,A);break e}else for(a=i.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,Gr=ui(a.firstChild),sa=i,ar=!0,Ca=null,ls=!0,A=Jt(i,null,f,A),i.child=A;A;)A.flags=A.flags&-3|4096,A=A.sibling;else{if(nl(),f===C){i=cl(a,i,A);break e}_a(a,i,f,A)}i=i.child}return i;case 26:return hf(a,i),a===null?(A=Zw(i.type,null,i.pendingProps,null))?i.memoizedState=A:ar||(A=i.type,a=i.pendingProps,f=Ff(J.current).createElement(A),f[Qr]=i,f[ts]=a,ka(f,A,a),fs(f),i.stateNode=f):i.memoizedState=Zw(i.type,a.memoizedProps,i.pendingProps,a.memoizedState),null;case 27:return Ae(i),a===null&&ar&&(f=i.stateNode=Xw(i.type,i.pendingProps,J.current),sa=i,ls=!0,C=Gr,cA(i.type)?(Rx=C,Gr=ui(f.firstChild)):Gr=C),_a(a,i,i.pendingProps.children,A),hf(a,i),a===null&&(i.flags|=4194304),i.child;case 5:return a===null&&ar&&((C=f=Gr)&&(f=RC(f,i.type,i.pendingProps,ls),f!==null?(i.stateNode=f,sa=i,Gr=ui(f.firstChild),ls=!1,C=!0):C=!1),C||yo(i)),Ae(i),C=i.type,E=i.pendingProps,ee=a!==null?a.memoizedProps:null,f=E.children,Qx(C,E)?f=null:ee!==null&&Qx(C,ee)&&(i.flags|=32),i.memoizedState!==null&&(C=Bu(a,i,Hp,null,null,A),Wu._currentValue=C),hf(a,i),_a(a,i,f,A),i.child;case 6:return a===null&&ar&&((a=A=Gr)&&(A=OC(A,i.pendingProps,ls),A!==null?(i.stateNode=A,sa=i,Gr=null,a=!0):a=!1),a||yo(i)),null;case 13:return R1(a,i,A);case 4:return H(i,i.stateNode.containerInfo),f=i.pendingProps,a===null?i.child=Vr(i,null,f,A):_a(a,i,f,A),i.child;case 11:return k1(a,i,i.type,i.pendingProps,A);case 7:return _a(a,i,i.pendingProps,A),i.child;case 8:return _a(a,i,i.pendingProps.children,A),i.child;case 12:return _a(a,i,i.pendingProps.children,A),i.child;case 10:return f=i.pendingProps,vo(i,i.type,f.value),_a(a,i,f.children,A),i.child;case 9:return C=i.type._context,f=i.pendingProps.children,Bo(i),C=na(C),f=f(C),i.flags|=1,_a(a,i,f,A),i.child;case 14:return F1(a,i,i.type,i.pendingProps,A);case 15:return E1(a,i,i.type,i.pendingProps,A);case 19:return H1(a,i,A);case 31:return oC(a,i,A);case 22:return U1(a,i,A,i.pendingProps);case 24:return Bo(i),f=na(gs),a===null?(C=we(),C===null&&(C=Wr,E=Zl(),C.pooledCache=E,E.refCount++,E!==null&&(C.pooledCacheLanes|=A),C=E),i.memoizedState={parent:f,cache:C},At(i),vo(i,gs,C)):((a.lanes&A)!==0&&(ss(a,i),Bs(i,null,null,A),Or()),C=a.memoizedState,E=i.memoizedState,C.parent!==f?(C={parent:f,cache:f},i.memoizedState=C,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=C),vo(i,gs,f)):(f=E.cache,vo(i,gs,f),f!==C.cache&&il(i,[gs],A,!0))),_a(a,i,i.pendingProps.children,A),i.child;case 29:throw i.pendingProps}throw Error(n(156,i.tag))}function dl(a){a.flags|=4}function ix(a,i,A,f,C){if((i=(a.mode&32)!==0)&&(i=!1),i){if(a.flags|=16777216,(C&335544128)===C)if(a.stateNode.complete)a.flags|=8192;else if(fw())a.flags|=8192;else throw We=Le,Me}else a.flags&=-16777217}function P1(a,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!sv(i))if(fw())a.flags|=8192;else throw We=Le,Me}function mf(a,i){i!==null&&(a.flags|=4),a.flags&16384&&(i=a.tag!==22?Xn():536870912,a.lanes|=i,yd|=i)}function Lu(a,i){if(!ar)switch(a.tailMode){case"hidden":i=a.tail;for(var A=null;i!==null;)i.alternate!==null&&(A=i),i=i.sibling;A===null?a.tail=null:A.sibling=null;break;case"collapsed":A=a.tail;for(var f=null;A!==null;)A.alternate!==null&&(f=A),A=A.sibling;f===null?i||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function is(a){var i=a.alternate!==null&&a.alternate.child===a.child,A=0,f=0;if(i)for(var C=a.child;C!==null;)A|=C.lanes|C.childLanes,f|=C.subtreeFlags&65011712,f|=C.flags&65011712,C.return=a,C=C.sibling;else for(C=a.child;C!==null;)A|=C.lanes|C.childLanes,f|=C.subtreeFlags,f|=C.flags,C.return=a,C=C.sibling;return a.subtreeFlags|=f,a.childLanes=A,i}function AC(a,i,A){var f=i.pendingProps;switch(sd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return is(i),null;case 1:return is(i),null;case 3:return A=i.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),i.memoizedState.cache!==f&&(i.flags|=2048),xn(gs),re(),A.pendingContext&&(A.context=A.pendingContext,A.pendingContext=null),(a===null||a.child===null)&&(aa(i)?dl(i):a===null||a.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,vu())),is(i),null;case 26:var C=i.type,E=i.memoizedState;return a===null?(dl(i),E!==null?(is(i),P1(i,E)):(is(i),ix(i,C,null,f,A))):E?E!==a.memoizedState?(dl(i),is(i),P1(i,E)):(is(i),i.flags&=-16777217):(a=a.memoizedProps,a!==f&&dl(i),is(i),ix(i,C,a,f,A)),null;case 27:if(oe(i),A=J.current,C=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==f&&dl(i);else{if(!f){if(i.stateNode===null)throw Error(n(166));return is(i),null}a=X.current,aa(i)?wu(i):(a=Xw(C,f,A),i.stateNode=a,dl(i))}return is(i),null;case 5:if(oe(i),C=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==f&&dl(i);else{if(!f){if(i.stateNode===null)throw Error(n(166));return is(i),null}if(E=X.current,aa(i))wu(i);else{var ee=Ff(J.current);switch(E){case 1:E=ee.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:E=ee.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":E=ee.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":E=ee.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":E=ee.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof f.is=="string"?ee.createElement("select",{is:f.is}):ee.createElement("select"),f.multiple?E.multiple=!0:f.size&&(E.size=f.size);break;default:E=typeof f.is=="string"?ee.createElement(C,{is:f.is}):ee.createElement(C)}}E[Qr]=i,E[ts]=f;e:for(ee=i.child;ee!==null;){if(ee.tag===5||ee.tag===6)E.appendChild(ee.stateNode);else if(ee.tag!==4&&ee.tag!==27&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===i)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===i)break e;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}i.stateNode=E;e:switch(ka(E,C,f),C){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&dl(i)}}return is(i),ix(i,i.type,a===null?null:a.memoizedProps,i.pendingProps,A),null;case 6:if(a&&i.stateNode!=null)a.memoizedProps!==f&&dl(i);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(a=J.current,aa(i)){if(a=i.stateNode,A=i.memoizedProps,f=null,C=sa,C!==null)switch(C.tag){case 27:case 5:f=C.memoizedProps}a[Qr]=i,a=!!(a.nodeValue===A||f!==null&&f.suppressHydrationWarning===!0||Rw(a.nodeValue,A)),a||yo(i,!0)}else a=Ff(a).createTextNode(f),a[Qr]=i,i.stateNode=a}return is(i),null;case 31:if(A=i.memoizedState,a===null||a.memoizedState!==null){if(f=aa(i),A!==null){if(a===null){if(!f)throw Error(n(318));if(a=i.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Qr]=i}else nl(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;is(i),a=!1}else A=vu(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=A),a=!0;if(!a)return i.flags&256?(Lr(i),i):(Lr(i),null);if((i.flags&128)!==0)throw Error(n(558))}return is(i),null;case 13:if(f=i.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(C=aa(i),f!==null&&f.dehydrated!==null){if(a===null){if(!C)throw Error(n(318));if(C=i.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[Qr]=i}else nl(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;is(i),C=!1}else C=vu(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=C),C=!0;if(!C)return i.flags&256?(Lr(i),i):(Lr(i),null)}return Lr(i),(i.flags&128)!==0?(i.lanes=A,i):(A=f!==null,a=a!==null&&a.memoizedState!==null,A&&(f=i.child,C=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(C=f.alternate.memoizedState.cachePool.pool),E=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(E=f.memoizedState.cachePool.pool),E!==C&&(f.flags|=2048)),A!==a&&A&&(i.child.flags|=8192),mf(i,i.updateQueue),is(i),null);case 4:return re(),a===null&&_x(i.stateNode.containerInfo),is(i),null;case 10:return xn(i.type),is(i),null;case 19:if(D(hr),f=i.memoizedState,f===null)return is(i),null;if(C=(i.flags&128)!==0,E=f.rendering,E===null)if(C)Lu(f,!1);else{if(ks!==0||a!==null&&(a.flags&128)!==0)for(a=i.child;a!==null;){if(E=ma(a),E!==null){for(i.flags|=128,Lu(f,!1),a=E.updateQueue,i.updateQueue=a,mf(i,a),i.subtreeFlags=0,a=A,A=i.child;A!==null;)ec(A,a),A=A.sibling;return $(hr,hr.current&1|2),ar&&tn(i,f.treeForkCount),i.child}a=a.sibling}f.tail!==null&&Re()>yf&&(i.flags|=128,C=!0,Lu(f,!1),i.lanes=4194304)}else{if(!C)if(a=ma(E),a!==null){if(i.flags|=128,C=!0,a=a.updateQueue,i.updateQueue=a,mf(i,a),Lu(f,!0),f.tail===null&&f.tailMode==="hidden"&&!E.alternate&&!ar)return is(i),null}else 2*Re()-f.renderingStartTime>yf&&A!==536870912&&(i.flags|=128,C=!0,Lu(f,!1),i.lanes=4194304);f.isBackwards?(E.sibling=i.child,i.child=E):(a=f.last,a!==null?a.sibling=E:i.child=E,f.last=E)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=Re(),a.sibling=null,A=hr.current,$(hr,C?A&1|2:A&1),ar&&tn(i,f.treeForkCount),a):(is(i),null);case 22:case 23:return Lr(i),Ds(),f=i.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(i.flags|=8192):f&&(i.flags|=8192),f?(A&536870912)!==0&&(i.flags&128)===0&&(is(i),i.subtreeFlags&6&&(i.flags|=8192)):is(i),A=i.updateQueue,A!==null&&mf(i,A.retryQueue),A=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(A=a.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==A&&(i.flags|=2048),a!==null&&D(pe),null;case 24:return A=null,a!==null&&(A=a.memoizedState.cache),i.memoizedState.cache!==A&&(i.flags|=2048),xn(gs),is(i),null;case 25:return null;case 30:return null}throw Error(n(156,i.tag))}function cC(a,i){switch(sd(i),i.tag){case 1:return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 3:return xn(gs),re(),a=i.flags,(a&65536)!==0&&(a&128)===0?(i.flags=a&-65537|128,i):null;case 26:case 27:case 5:return oe(i),null;case 31:if(i.memoizedState!==null){if(Lr(i),i.alternate===null)throw Error(n(340));nl()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 13:if(Lr(i),a=i.memoizedState,a!==null&&a.dehydrated!==null){if(i.alternate===null)throw Error(n(340));nl()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 19:return D(hr),null;case 4:return re(),null;case 10:return xn(i.type),null;case 22:case 23:return Lr(i),Ds(),a!==null&&D(pe),a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 24:return xn(gs),null;case 25:return null;default:return null}}function K1(a,i){switch(sd(i),i.tag){case 3:xn(gs),re();break;case 26:case 27:case 5:oe(i);break;case 4:re();break;case 31:i.memoizedState!==null&&Lr(i);break;case 13:Lr(i);break;case 19:D(hr);break;case 10:xn(i.type);break;case 22:case 23:Lr(i),Ds(),a!==null&&D(pe);break;case 24:xn(gs)}}function Tu(a,i){try{var A=i.updateQueue,f=A!==null?A.lastEffect:null;if(f!==null){var C=f.next;A=C;do{if((A.tag&a)===a){f=void 0;var E=A.create,ee=A.inst;f=E(),ee.destroy=f}A=A.next}while(A!==C)}}catch(ge){Ir(i,i.return,ge)}}function sA(a,i,A){try{var f=i.updateQueue,C=f!==null?f.lastEffect:null;if(C!==null){var E=C.next;f=E;do{if((f.tag&a)===a){var ee=f.inst,ge=ee.destroy;if(ge!==void 0){ee.destroy=void 0,C=i;var ke=A,Ke=ge;try{Ke()}catch(Ye){Ir(C,ke,Ye)}}}f=f.next}while(f!==E)}}catch(Ye){Ir(i,i.return,Ye)}}function z1(a){var i=a.updateQueue;if(i!==null){var A=a.stateNode;try{js(i,A)}catch(f){Ir(a,a.return,f)}}}function q1(a,i,A){A.props=oc(a.type,a.memoizedProps),A.state=a.memoizedState;try{A.componentWillUnmount()}catch(f){Ir(a,i,f)}}function Iu(a,i){try{var A=a.ref;if(A!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof A=="function"?a.refCleanup=A(f):A.current=f}}catch(C){Ir(a,i,C)}}function ko(a,i){var A=a.ref,f=a.refCleanup;if(A!==null)if(typeof f=="function")try{f()}catch(C){Ir(a,i,C)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof A=="function")try{A(null)}catch(C){Ir(a,i,C)}else A.current=null}function G1(a){var i=a.type,A=a.memoizedProps,f=a.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":A.autoFocus&&f.focus();break e;case"img":A.src?f.src=A.src:A.srcSet&&(f.srcset=A.srcSet)}}catch(C){Ir(a,a.return,C)}}function ox(a,i,A){try{var f=a.stateNode;UC(f,a.type,A,i),f[ts]=i}catch(C){Ir(a,a.return,C)}}function V1(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&cA(a.type)||a.tag===4}function lx(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||V1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&cA(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ax(a,i,A){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?(A.nodeType===9?A.body:A.nodeName==="HTML"?A.ownerDocument.body:A).insertBefore(a,i):(i=A.nodeType===9?A.body:A.nodeName==="HTML"?A.ownerDocument.body:A,i.appendChild(a),A=A._reactRootContainer,A!=null||i.onclick!==null||(i.onclick=In));else if(f!==4&&(f===27&&cA(a.type)&&(A=a.stateNode,i=null),a=a.child,a!==null))for(Ax(a,i,A),a=a.sibling;a!==null;)Ax(a,i,A),a=a.sibling}function pf(a,i,A){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?A.insertBefore(a,i):A.appendChild(a);else if(f!==4&&(f===27&&cA(a.type)&&(A=a.stateNode),a=a.child,a!==null))for(pf(a,i,A),a=a.sibling;a!==null;)pf(a,i,A),a=a.sibling}function W1(a){var i=a.stateNode,A=a.memoizedProps;try{for(var f=a.type,C=i.attributes;C.length;)i.removeAttributeNode(C[0]);ka(i,f,A),i[Qr]=a,i[ts]=A}catch(E){Ir(a,a.return,E)}}var ul=!1,Ys=!1,cx=!1,X1=typeof WeakSet=="function"?WeakSet:Set,pa=null;function dC(a,i){if(a=a.containerInfo,Ex=Df,a=zi(a),oi(a)){if("selectionStart"in a)var A={start:a.selectionStart,end:a.selectionEnd};else e:{A=(A=a.ownerDocument)&&A.defaultView||window;var f=A.getSelection&&A.getSelection();if(f&&f.rangeCount!==0){A=f.anchorNode;var C=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{A.nodeType,E.nodeType}catch{A=null;break e}var ee=0,ge=-1,ke=-1,Ke=0,Ye=0,tt=a,qe=null;t:for(;;){for(var Ge;tt!==A||C!==0&&tt.nodeType!==3||(ge=ee+C),tt!==E||f!==0&&tt.nodeType!==3||(ke=ee+f),tt.nodeType===3&&(ee+=tt.nodeValue.length),(Ge=tt.firstChild)!==null;)qe=tt,tt=Ge;for(;;){if(tt===a)break t;if(qe===A&&++Ke===C&&(ge=ee),qe===E&&++Ye===f&&(ke=ee),(Ge=tt.nextSibling)!==null)break;tt=qe,qe=tt.parentNode}tt=Ge}A=ge===-1||ke===-1?null:{start:ge,end:ke}}else A=null}A=A||{start:0,end:0}}else A=null;for(Ux={focusedElem:a,selectionRange:A},Df=!1,pa=i;pa!==null;)if(i=pa,a=i.child,(i.subtreeFlags&1028)!==0&&a!==null)a.return=i,pa=a;else for(;pa!==null;){switch(i=pa,E=i.alternate,a=i.flags,i.tag){case 0:if((a&4)!==0&&(a=i.updateQueue,a=a!==null?a.events:null,a!==null))for(A=0;A<a.length;A++)C=a[A],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&E!==null){a=void 0,A=i,C=E.memoizedProps,E=E.memoizedState,f=A.stateNode;try{var wt=oc(A.type,C);a=f.getSnapshotBeforeUpdate(wt,E),f.__reactInternalSnapshotBeforeUpdate=a}catch(Mt){Ir(A,A.return,Mt)}}break;case 3:if((a&1024)!==0){if(a=i.stateNode.containerInfo,A=a.nodeType,A===9)Tx(a);else if(A===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Tx(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=i.sibling,a!==null){a.return=i.return,pa=a;break}pa=i.return}}function Y1(a,i,A){var f=A.flags;switch(A.tag){case 0:case 11:case 15:fl(a,A),f&4&&Tu(5,A);break;case 1:if(fl(a,A),f&4)if(a=A.stateNode,i===null)try{a.componentDidMount()}catch(ee){Ir(A,A.return,ee)}else{var C=oc(A.type,i.memoizedProps);i=i.memoizedState;try{a.componentDidUpdate(C,i,a.__reactInternalSnapshotBeforeUpdate)}catch(ee){Ir(A,A.return,ee)}}f&64&&z1(A),f&512&&Iu(A,A.return);break;case 3:if(fl(a,A),f&64&&(a=A.updateQueue,a!==null)){if(i=null,A.child!==null)switch(A.child.tag){case 27:case 5:i=A.child.stateNode;break;case 1:i=A.child.stateNode}try{js(a,i)}catch(ee){Ir(A,A.return,ee)}}break;case 27:i===null&&f&4&&W1(A);case 26:case 5:fl(a,A),i===null&&f&4&&G1(A),f&512&&Iu(A,A.return);break;case 12:fl(a,A);break;case 31:fl(a,A),f&4&&$1(a,A);break;case 13:fl(a,A),f&4&&ew(a,A),f&64&&(a=A.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(A=yC.bind(null,A),HC(a,A))));break;case 22:if(f=A.memoizedState!==null||ul,!f){i=i!==null&&i.memoizedState!==null||Ys,C=ul;var E=Ys;ul=f,(Ys=i)&&!E?ml(a,A,(A.subtreeFlags&8772)!==0):fl(a,A),ul=C,Ys=E}break;case 30:break;default:fl(a,A)}}function J1(a){var i=a.alternate;i!==null&&(a.alternate=null,J1(i)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(i=a.stateNode,i!==null&&uo(i)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ds=null,bn=!1;function hl(a,i,A){for(A=A.child;A!==null;)Z1(a,i,A),A=A.sibling}function Z1(a,i,A){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(jt,A)}catch{}switch(A.tag){case 26:Ys||ko(A,i),hl(a,i,A),A.memoizedState?A.memoizedState.count--:A.stateNode&&(A=A.stateNode,A.parentNode.removeChild(A));break;case 27:Ys||ko(A,i);var f=ds,C=bn;cA(A.type)&&(ds=A.stateNode,bn=!1),hl(a,i,A),qu(A.stateNode),ds=f,bn=C;break;case 5:Ys||ko(A,i);case 6:if(f=ds,C=bn,ds=null,hl(a,i,A),ds=f,bn=C,ds!==null)if(bn)try{(ds.nodeType===9?ds.body:ds.nodeName==="HTML"?ds.ownerDocument.body:ds).removeChild(A.stateNode)}catch(E){Ir(A,i,E)}else try{ds.removeChild(A.stateNode)}catch(E){Ir(A,i,E)}break;case 18:ds!==null&&(bn?(a=ds,zw(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,A.stateNode),_d(a)):zw(ds,A.stateNode));break;case 4:f=ds,C=bn,ds=A.stateNode.containerInfo,bn=!0,hl(a,i,A),ds=f,bn=C;break;case 0:case 11:case 14:case 15:sA(2,A,i),Ys||sA(4,A,i),hl(a,i,A);break;case 1:Ys||(ko(A,i),f=A.stateNode,typeof f.componentWillUnmount=="function"&&q1(A,i,f)),hl(a,i,A);break;case 21:hl(a,i,A);break;case 22:Ys=(f=Ys)||A.memoizedState!==null,hl(a,i,A),Ys=f;break;default:hl(a,i,A)}}function $1(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{_d(a)}catch(A){Ir(i,i.return,A)}}}function ew(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{_d(a)}catch(A){Ir(i,i.return,A)}}function uC(a){switch(a.tag){case 31:case 13:case 19:var i=a.stateNode;return i===null&&(i=a.stateNode=new X1),i;case 22:return a=a.stateNode,i=a._retryCache,i===null&&(i=a._retryCache=new X1),i;default:throw Error(n(435,a.tag))}}function xf(a,i){var A=uC(a);i.forEach(function(f){if(!A.has(f)){A.add(f);var C=wC.bind(null,a,f);f.then(C,C)}})}function yn(a,i){var A=i.deletions;if(A!==null)for(var f=0;f<A.length;f++){var C=A[f],E=a,ee=i,ge=ee;e:for(;ge!==null;){switch(ge.tag){case 27:if(cA(ge.type)){ds=ge.stateNode,bn=!1;break e}break;case 5:ds=ge.stateNode,bn=!1;break e;case 3:case 4:ds=ge.stateNode.containerInfo,bn=!0;break e}ge=ge.return}if(ds===null)throw Error(n(160));Z1(E,ee,C),ds=null,bn=!1,E=C.alternate,E!==null&&(E.return=null),C.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)tw(i,a),i=i.sibling}var Zi=null;function tw(a,i){var A=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:yn(i,a),wn(a),f&4&&(sA(3,a,a.return),Tu(3,a),sA(5,a,a.return));break;case 1:yn(i,a),wn(a),f&512&&(Ys||A===null||ko(A,A.return)),f&64&&ul&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(A=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=A===null?f:A.concat(f))));break;case 26:var C=Zi;if(yn(i,a),wn(a),f&512&&(Ys||A===null||ko(A,A.return)),f&4){var E=A!==null?A.memoizedState:null;if(f=a.memoizedState,A===null)if(f===null)if(a.stateNode===null){e:{f=a.type,A=a.memoizedProps,C=C.ownerDocument||C;t:switch(f){case"title":E=C.getElementsByTagName("title")[0],(!E||E[Fn]||E[Qr]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=C.createElement(f),C.head.insertBefore(E,C.querySelector("head > title"))),ka(E,f,A),E[Qr]=a,fs(E),f=E;break e;case"link":var ee=tv("link","href",C).get(f+(A.href||""));if(ee){for(var ge=0;ge<ee.length;ge++)if(E=ee[ge],E.getAttribute("href")===(A.href==null||A.href===""?null:A.href)&&E.getAttribute("rel")===(A.rel==null?null:A.rel)&&E.getAttribute("title")===(A.title==null?null:A.title)&&E.getAttribute("crossorigin")===(A.crossOrigin==null?null:A.crossOrigin)){ee.splice(ge,1);break t}}E=C.createElement(f),ka(E,f,A),C.head.appendChild(E);break;case"meta":if(ee=tv("meta","content",C).get(f+(A.content||""))){for(ge=0;ge<ee.length;ge++)if(E=ee[ge],E.getAttribute("content")===(A.content==null?null:""+A.content)&&E.getAttribute("name")===(A.name==null?null:A.name)&&E.getAttribute("property")===(A.property==null?null:A.property)&&E.getAttribute("http-equiv")===(A.httpEquiv==null?null:A.httpEquiv)&&E.getAttribute("charset")===(A.charSet==null?null:A.charSet)){ee.splice(ge,1);break t}}E=C.createElement(f),ka(E,f,A),C.head.appendChild(E);break;default:throw Error(n(468,f))}E[Qr]=a,fs(E),f=E}a.stateNode=f}else rv(C,a.type,a.stateNode);else a.stateNode=ev(C,f,a.memoizedProps);else E!==f?(E===null?A.stateNode!==null&&(A=A.stateNode,A.parentNode.removeChild(A)):E.count--,f===null?rv(C,a.type,a.stateNode):ev(C,f,a.memoizedProps)):f===null&&a.stateNode!==null&&ox(a,a.memoizedProps,A.memoizedProps)}break;case 27:yn(i,a),wn(a),f&512&&(Ys||A===null||ko(A,A.return)),A!==null&&f&4&&ox(a,a.memoizedProps,A.memoizedProps);break;case 5:if(yn(i,a),wn(a),f&512&&(Ys||A===null||ko(A,A.return)),a.flags&32){C=a.stateNode;try{Tn(C,"")}catch(wt){Ir(a,a.return,wt)}}f&4&&a.stateNode!=null&&(C=a.memoizedProps,ox(a,C,A!==null?A.memoizedProps:C)),f&1024&&(cx=!0);break;case 6:if(yn(i,a),wn(a),f&4){if(a.stateNode===null)throw Error(n(162));f=a.memoizedProps,A=a.stateNode;try{A.nodeValue=f}catch(wt){Ir(a,a.return,wt)}}break;case 3:if(Qf=null,C=Zi,Zi=Ef(i.containerInfo),yn(i,a),Zi=C,wn(a),f&4&&A!==null&&A.memoizedState.isDehydrated)try{_d(i.containerInfo)}catch(wt){Ir(a,a.return,wt)}cx&&(cx=!1,rw(a));break;case 4:f=Zi,Zi=Ef(a.stateNode.containerInfo),yn(i,a),wn(a),Zi=f;break;case 12:yn(i,a),wn(a);break;case 31:yn(i,a),wn(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,xf(a,f)));break;case 13:yn(i,a),wn(a),a.child.flags&8192&&a.memoizedState!==null!=(A!==null&&A.memoizedState!==null)&&(bf=Re()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,xf(a,f)));break;case 22:C=a.memoizedState!==null;var ke=A!==null&&A.memoizedState!==null,Ke=ul,Ye=Ys;if(ul=Ke||C,Ys=Ye||ke,yn(i,a),Ys=Ye,ul=Ke,wn(a),f&8192)e:for(i=a.stateNode,i._visibility=C?i._visibility&-2:i._visibility|1,C&&(A===null||ke||ul||Ys||lc(a)),A=null,i=a;;){if(i.tag===5||i.tag===26){if(A===null){ke=A=i;try{if(E=ke.stateNode,C)ee=E.style,typeof ee.setProperty=="function"?ee.setProperty("display","none","important"):ee.display="none";else{ge=ke.stateNode;var tt=ke.memoizedProps.style,qe=tt!=null&&tt.hasOwnProperty("display")?tt.display:null;ge.style.display=qe==null||typeof qe=="boolean"?"":(""+qe).trim()}}catch(wt){Ir(ke,ke.return,wt)}}}else if(i.tag===6){if(A===null){ke=i;try{ke.stateNode.nodeValue=C?"":ke.memoizedProps}catch(wt){Ir(ke,ke.return,wt)}}}else if(i.tag===18){if(A===null){ke=i;try{var Ge=ke.stateNode;C?qw(Ge,!0):qw(ke.stateNode,!1)}catch(wt){Ir(ke,ke.return,wt)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===a)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;A===i&&(A=null),i=i.return}A===i&&(A=null),i.sibling.return=i.return,i=i.sibling}f&4&&(f=a.updateQueue,f!==null&&(A=f.retryQueue,A!==null&&(f.retryQueue=null,xf(a,A))));break;case 19:yn(i,a),wn(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,xf(a,f)));break;case 30:break;case 21:break;default:yn(i,a),wn(a)}}function wn(a){var i=a.flags;if(i&2){try{for(var A,f=a.return;f!==null;){if(V1(f)){A=f;break}f=f.return}if(A==null)throw Error(n(160));switch(A.tag){case 27:var C=A.stateNode,E=lx(a);pf(a,E,C);break;case 5:var ee=A.stateNode;A.flags&32&&(Tn(ee,""),A.flags&=-33);var ge=lx(a);pf(a,ge,ee);break;case 3:case 4:var ke=A.stateNode.containerInfo,Ke=lx(a);Ax(a,Ke,ke);break;default:throw Error(n(161))}}catch(Ye){Ir(a,a.return,Ye)}a.flags&=-3}i&4096&&(a.flags&=-4097)}function rw(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var i=a;rw(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),a=a.sibling}}function fl(a,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Y1(a,i.alternate,i),i=i.sibling}function lc(a){for(a=a.child;a!==null;){var i=a;switch(i.tag){case 0:case 11:case 14:case 15:sA(4,i,i.return),lc(i);break;case 1:ko(i,i.return);var A=i.stateNode;typeof A.componentWillUnmount=="function"&&q1(i,i.return,A),lc(i);break;case 27:qu(i.stateNode);case 26:case 5:ko(i,i.return),lc(i);break;case 22:i.memoizedState===null&&lc(i);break;case 30:lc(i);break;default:lc(i)}a=a.sibling}}function ml(a,i,A){for(A=A&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var f=i.alternate,C=a,E=i,ee=E.flags;switch(E.tag){case 0:case 11:case 15:ml(C,E,A),Tu(4,E);break;case 1:if(ml(C,E,A),f=E,C=f.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(Ke){Ir(f,f.return,Ke)}if(f=E,C=f.updateQueue,C!==null){var ge=f.stateNode;try{var ke=C.shared.hiddenCallbacks;if(ke!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ke.length;C++)fa(ke[C],ge)}catch(Ke){Ir(f,f.return,Ke)}}A&&ee&64&&z1(E),Iu(E,E.return);break;case 27:W1(E);case 26:case 5:ml(C,E,A),A&&f===null&&ee&4&&G1(E),Iu(E,E.return);break;case 12:ml(C,E,A);break;case 31:ml(C,E,A),A&&ee&4&&$1(C,E);break;case 13:ml(C,E,A),A&&ee&4&&ew(C,E);break;case 22:E.memoizedState===null&&ml(C,E,A),Iu(E,E.return);break;case 30:break;default:ml(C,E,A)}i=i.sibling}}function dx(a,i){var A=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(A=a.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==A&&(a!=null&&a.refCount++,A!=null&&sc(A))}function ux(a,i){a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&sc(a))}function $i(a,i,A,f){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)sw(a,i,A,f),i=i.sibling}function sw(a,i,A,f){var C=i.flags;switch(i.tag){case 0:case 11:case 15:$i(a,i,A,f),C&2048&&Tu(9,i);break;case 1:$i(a,i,A,f);break;case 3:$i(a,i,A,f),C&2048&&(a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&sc(a)));break;case 12:if(C&2048){$i(a,i,A,f),a=i.stateNode;try{var E=i.memoizedProps,ee=E.id,ge=E.onPostCommit;typeof ge=="function"&&ge(ee,i.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(ke){Ir(i,i.return,ke)}}else $i(a,i,A,f);break;case 31:$i(a,i,A,f);break;case 13:$i(a,i,A,f);break;case 23:break;case 22:E=i.stateNode,ee=i.alternate,i.memoizedState!==null?E._visibility&2?$i(a,i,A,f):Du(a,i):E._visibility&2?$i(a,i,A,f):(E._visibility|=2,xd(a,i,A,f,(i.subtreeFlags&10256)!==0||!1)),C&2048&&dx(ee,i);break;case 24:$i(a,i,A,f),C&2048&&ux(i.alternate,i);break;default:$i(a,i,A,f)}}function xd(a,i,A,f,C){for(C=C&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var E=a,ee=i,ge=A,ke=f,Ke=ee.flags;switch(ee.tag){case 0:case 11:case 15:xd(E,ee,ge,ke,C),Tu(8,ee);break;case 23:break;case 22:var Ye=ee.stateNode;ee.memoizedState!==null?Ye._visibility&2?xd(E,ee,ge,ke,C):Du(E,ee):(Ye._visibility|=2,xd(E,ee,ge,ke,C)),C&&Ke&2048&&dx(ee.alternate,ee);break;case 24:xd(E,ee,ge,ke,C),C&&Ke&2048&&ux(ee.alternate,ee);break;default:xd(E,ee,ge,ke,C)}i=i.sibling}}function Du(a,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var A=a,f=i,C=f.flags;switch(f.tag){case 22:Du(A,f),C&2048&&dx(f.alternate,f);break;case 24:Du(A,f),C&2048&&ux(f.alternate,f);break;default:Du(A,f)}i=i.sibling}}var Ru=8192;function gd(a,i,A){if(a.subtreeFlags&Ru)for(a=a.child;a!==null;)aw(a,i,A),a=a.sibling}function aw(a,i,A){switch(a.tag){case 26:gd(a,i,A),a.flags&Ru&&a.memoizedState!==null&&ZC(A,Zi,a.memoizedState,a.memoizedProps);break;case 5:gd(a,i,A);break;case 3:case 4:var f=Zi;Zi=Ef(a.stateNode.containerInfo),gd(a,i,A),Zi=f;break;case 22:a.memoizedState===null&&(f=a.alternate,f!==null&&f.memoizedState!==null?(f=Ru,Ru=16777216,gd(a,i,A),Ru=f):gd(a,i,A));break;default:gd(a,i,A)}}function nw(a){var i=a.alternate;if(i!==null&&(a=i.child,a!==null)){i.child=null;do i=a.sibling,a.sibling=null,a=i;while(a!==null)}}function Ou(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var A=0;A<i.length;A++){var f=i[A];pa=f,ow(f,a)}nw(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)iw(a),a=a.sibling}function iw(a){switch(a.tag){case 0:case 11:case 15:Ou(a),a.flags&2048&&sA(9,a,a.return);break;case 3:Ou(a);break;case 12:Ou(a);break;case 22:var i=a.stateNode;a.memoizedState!==null&&i._visibility&2&&(a.return===null||a.return.tag!==13)?(i._visibility&=-3,gf(a)):Ou(a);break;default:Ou(a)}}function gf(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var A=0;A<i.length;A++){var f=i[A];pa=f,ow(f,a)}nw(a)}for(a=a.child;a!==null;){switch(i=a,i.tag){case 0:case 11:case 15:sA(8,i,i.return),gf(i);break;case 22:A=i.stateNode,A._visibility&2&&(A._visibility&=-3,gf(i));break;default:gf(i)}a=a.sibling}}function ow(a,i){for(;pa!==null;){var A=pa;switch(A.tag){case 0:case 11:case 15:sA(8,A,i);break;case 23:case 22:if(A.memoizedState!==null&&A.memoizedState.cachePool!==null){var f=A.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:sc(A.memoizedState.cache)}if(f=A.child,f!==null)f.return=A,pa=f;else e:for(A=a;pa!==null;){f=pa;var C=f.sibling,E=f.return;if(J1(f),f===A){pa=null;break e}if(C!==null){C.return=E,pa=C;break e}pa=E}}}var hC={getCacheForType:function(a){var i=na(gs),A=i.data.get(a);return A===void 0&&(A=a(),i.data.set(a,A)),A},cacheSignal:function(){return na(gs).controller.signal}},fC=typeof WeakMap=="function"?WeakMap:Map,kr=0,Wr=null,nr=null,or=0,Tr=0,Kn=null,aA=!1,bd=!1,hx=!1,pl=0,ks=0,nA=0,Ac=0,fx=0,zn=0,yd=0,Hu=null,vn=null,mx=!1,bf=0,lw=0,yf=1/0,wf=null,iA=null,oa=0,oA=null,wd=null,xl=0,px=0,xx=null,Aw=null,Mu=0,gx=null;function qn(){return(kr&2)!==0&&or!==0?or&-or:ae.T!==null?Bx():qs()}function cw(){if(zn===0)if((or&536870912)===0||ar){var a=Br;Br<<=1,(Br&3932160)===0&&(Br=262144),zn=a}else zn=536870912;return a=ns.current,a!==null&&(a.flags|=32),zn}function Nn(a,i,A){(a===Wr&&(Tr===2||Tr===9)||a.cancelPendingCommit!==null)&&(vd(a,0),lA(a,or,zn,!1)),Et(a,A),((kr&2)===0||a!==Wr)&&(a===Wr&&((kr&2)===0&&(Ac|=A),ks===4&&lA(a,or,zn,!1)),Fo(a))}function dw(a,i,A){if((kr&6)!==0)throw Error(n(327));var f=!A&&(i&127)===0&&(i&a.expiredLanes)===0||_n(a,i),C=f?xC(a,i):yx(a,i,!0),E=f;do{if(C===0){bd&&!f&&lA(a,i,0,!1);break}else{if(A=a.current.alternate,E&&!mC(A)){C=yx(a,i,!1),E=!1;continue}if(C===2){if(E=i,a.errorRecoveryDisabledLanes&E)var ee=0;else ee=a.pendingLanes&-536870913,ee=ee!==0?ee:ee&536870912?536870912:0;if(ee!==0){i=ee;e:{var ge=a;C=Hu;var ke=ge.current.memoizedState.isDehydrated;if(ke&&(vd(ge,ee).flags|=256),ee=yx(ge,ee,!1),ee!==2){if(hx&&!ke){ge.errorRecoveryDisabledLanes|=E,Ac|=E,C=4;break e}E=vn,vn=C,E!==null&&(vn===null?vn=E:vn.push.apply(vn,E))}C=ee}if(E=!1,C!==2)continue}}if(C===1){vd(a,0),lA(a,i,0,!0);break}e:{switch(f=a,E=C,E){case 0:case 1:throw Error(n(345));case 4:if((i&4194048)!==i)break;case 6:lA(f,i,zn,!aA);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((i&62914560)===i&&(C=bf+300-Re(),10<C)){if(lA(f,i,zn,!aA),cr(f,0,!0)!==0)break e;xl=i,f.timeoutHandle=Pw(uw.bind(null,f,A,vn,wf,mx,i,zn,Ac,yd,aA,E,"Throttled",-0,0),C);break e}uw(f,A,vn,wf,mx,i,zn,Ac,yd,aA,E,null,-0,0)}}break}while(!0);Fo(a)}function uw(a,i,A,f,C,E,ee,ge,ke,Ke,Ye,tt,qe,Ge){if(a.timeoutHandle=-1,tt=i.subtreeFlags,tt&8192||(tt&16785408)===16785408){tt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},aw(i,E,tt);var wt=(E&62914560)===E?bf-Re():(E&4194048)===E?lw-Re():0;if(wt=$C(tt,wt),wt!==null){xl=E,a.cancelPendingCommit=wt(yw.bind(null,a,i,E,A,f,C,ee,ge,ke,Ye,tt,null,qe,Ge)),lA(a,E,ee,!Ke);return}}yw(a,i,E,A,f,C,ee,ge,ke)}function mC(a){for(var i=a;;){var A=i.tag;if((A===0||A===11||A===15)&&i.flags&16384&&(A=i.updateQueue,A!==null&&(A=A.stores,A!==null)))for(var f=0;f<A.length;f++){var C=A[f],E=C.getSnapshot;C=C.value;try{if(!ta(E(),C))return!1}catch{return!1}}if(A=i.child,i.subtreeFlags&16384&&A!==null)A.return=i,i=A;else{if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function lA(a,i,A,f){i&=~fx,i&=~Ac,a.suspendedLanes|=i,a.pingedLanes&=~i,f&&(a.warmLanes|=i),f=a.expirationTimes;for(var C=i;0<C;){var E=31-Gt(C),ee=1<<E;f[E]=-1,C&=~ee}A!==0&&Yn(a,A,i)}function vf(){return(kr&6)===0?(Pu(0),!1):!0}function bx(){if(nr!==null){if(Tr===0)var a=nr.return;else a=nr,Ai=wo=null,cd(a),st=null,vt=0,a=nr;for(;a!==null;)K1(a.alternate,a),a=a.return;nr=null}}function vd(a,i){var A=a.timeoutHandle;A!==-1&&(a.timeoutHandle=-1,TC(A)),A=a.cancelPendingCommit,A!==null&&(a.cancelPendingCommit=null,A()),xl=0,bx(),Wr=a,nr=A=dn(a.current,null),or=i,Tr=0,Kn=null,aA=!1,bd=_n(a,i),hx=!1,yd=zn=fx=Ac=nA=ks=0,vn=Hu=null,mx=!1,(i&8)!==0&&(i|=i&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=i;0<f;){var C=31-Gt(f),E=1<<C;i|=a[C],f&=~E}return pl=i,JA(),A}function hw(a,i){Ut=null,ae.H=Uu,i===Ee||i===Ne?(i=Ze(),Tr=3):i===Me?(i=Ze(),Tr=4):Tr=i===Jp?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Kn=i,nr===null&&(ks=1,df(a,un(i,a.current)))}function fw(){var a=ns.current;return a===null?!0:(or&4194048)===or?pr===null:(or&62914560)===or||(or&536870912)!==0?a===pr:!1}function mw(){var a=ae.H;return ae.H=Uu,a===null?Uu:a}function pw(){var a=ae.A;return ae.A=hC,a}function Nf(){ks=4,aA||(or&4194048)!==or&&ns.current!==null||(bd=!0),(nA&134217727)===0&&(Ac&134217727)===0||Wr===null||lA(Wr,or,zn,!1)}function yx(a,i,A){var f=kr;kr|=2;var C=mw(),E=pw();(Wr!==a||or!==i)&&(wf=null,vd(a,i)),i=!1;var ee=ks;e:do try{if(Tr!==0&&nr!==null){var ge=nr,ke=Kn;switch(Tr){case 8:bx(),ee=6;break e;case 3:case 2:case 9:case 6:ns.current===null&&(i=!0);var Ke=Tr;if(Tr=0,Kn=null,Nd(a,ge,ke,Ke),A&&bd){ee=0;break e}break;default:Ke=Tr,Tr=0,Kn=null,Nd(a,ge,ke,Ke)}}pC(),ee=ks;break}catch(Ye){hw(a,Ye)}while(!0);return i&&a.shellSuspendCounter++,Ai=wo=null,kr=f,ae.H=C,ae.A=E,nr===null&&(Wr=null,or=0,JA()),ee}function pC(){for(;nr!==null;)xw(nr)}function xC(a,i){var A=kr;kr|=2;var f=mw(),C=pw();Wr!==a||or!==i?(wf=null,yf=Re()+500,vd(a,i)):bd=_n(a,i);e:do try{if(Tr!==0&&nr!==null){i=nr;var E=Kn;t:switch(Tr){case 1:Tr=0,Kn=null,Nd(a,i,E,1);break;case 2:case 9:if(De(E)){Tr=0,Kn=null,gw(i);break}i=function(){Tr!==2&&Tr!==9||Wr!==a||(Tr=7),Fo(a)},E.then(i,i);break e;case 3:Tr=7;break e;case 4:Tr=5;break e;case 7:De(E)?(Tr=0,Kn=null,gw(i)):(Tr=0,Kn=null,Nd(a,i,E,7));break;case 5:var ee=null;switch(nr.tag){case 26:ee=nr.memoizedState;case 5:case 27:var ge=nr;if(ee?sv(ee):ge.stateNode.complete){Tr=0,Kn=null;var ke=ge.sibling;if(ke!==null)nr=ke;else{var Ke=ge.return;Ke!==null?(nr=Ke,Bf(Ke)):nr=null}break t}}Tr=0,Kn=null,Nd(a,i,E,5);break;case 6:Tr=0,Kn=null,Nd(a,i,E,6);break;case 8:bx(),ks=6;break e;default:throw Error(n(462))}}gC();break}catch(Ye){hw(a,Ye)}while(!0);return Ai=wo=null,ae.H=f,ae.A=C,kr=A,nr!==null?0:(Wr=null,or=0,JA(),ks)}function gC(){for(;nr!==null&&!be();)xw(nr)}function xw(a){var i=M1(a.alternate,a,pl);a.memoizedProps=a.pendingProps,i===null?Bf(a):nr=i}function gw(a){var i=a,A=i.alternate;switch(i.tag){case 15:case 0:i=T1(A,i,i.pendingProps,i.type,void 0,or);break;case 11:i=T1(A,i,i.pendingProps,i.type.render,i.ref,or);break;case 5:cd(i);default:K1(A,i),i=nr=ec(i,pl),i=M1(A,i,pl)}a.memoizedProps=a.pendingProps,i===null?Bf(a):nr=i}function Nd(a,i,A,f){Ai=wo=null,cd(i),st=null,vt=0;var C=i.return;try{if(iC(a,C,i,A,or)){ks=1,df(a,un(A,a.current)),nr=null;return}}catch(E){if(C!==null)throw nr=C,E;ks=1,df(a,un(A,a.current)),nr=null;return}i.flags&32768?(ar||f===1?a=!0:bd||(or&536870912)!==0?a=!1:(aA=a=!0,(f===2||f===9||f===3||f===6)&&(f=ns.current,f!==null&&f.tag===13&&(f.flags|=16384))),bw(i,a)):Bf(i)}function Bf(a){var i=a;do{if((i.flags&32768)!==0){bw(i,aA);return}a=i.return;var A=AC(i.alternate,i,pl);if(A!==null){nr=A;return}if(i=i.sibling,i!==null){nr=i;return}nr=i=a}while(i!==null);ks===0&&(ks=5)}function bw(a,i){do{var A=cC(a.alternate,a);if(A!==null){A.flags&=32767,nr=A;return}if(A=a.return,A!==null&&(A.flags|=32768,A.subtreeFlags=0,A.deletions=null),!i&&(a=a.sibling,a!==null)){nr=a;return}nr=a=A}while(a!==null);ks=6,nr=null}function yw(a,i,A,f,C,E,ee,ge,ke){a.cancelPendingCommit=null;do jf();while(oa!==0);if((kr&6)!==0)throw Error(n(327));if(i!==null){if(i===a.current)throw Error(n(177));if(E=i.lanes|i.childLanes,E|=Yc,Ci(a,A,E,ee,ge,ke),a===Wr&&(nr=Wr=null,or=0),wd=i,oA=a,xl=A,px=E,xx=C,Aw=f,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,vC(lt,function(){return jw(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||f){f=ae.T,ae.T=null,C=se.p,se.p=2,ee=kr,kr|=4;try{dC(a,i,A)}finally{kr=ee,se.p=C,ae.T=f}}oa=1,ww(),vw(),Nw()}}function ww(){if(oa===1){oa=0;var a=oA,i=wd,A=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||A){A=ae.T,ae.T=null;var f=se.p;se.p=2;var C=kr;kr|=4;try{tw(i,a);var E=Ux,ee=zi(a.containerInfo),ge=E.focusedElem,ke=E.selectionRange;if(ee!==ge&&ge&&ge.ownerDocument&&Ki(ge.ownerDocument.documentElement,ge)){if(ke!==null&&oi(ge)){var Ke=ke.start,Ye=ke.end;if(Ye===void 0&&(Ye=Ke),"selectionStart"in ge)ge.selectionStart=Ke,ge.selectionEnd=Math.min(Ye,ge.value.length);else{var tt=ge.ownerDocument||document,qe=tt&&tt.defaultView||window;if(qe.getSelection){var Ge=qe.getSelection(),wt=ge.textContent.length,Mt=Math.min(ke.start,wt),Pr=ke.end===void 0?Mt:Math.min(ke.end,wt);!Ge.extend&&Mt>Pr&&(ee=Pr,Pr=Mt,Mt=ee);var Ie=Gl(ge,Mt),Qe=Gl(ge,Pr);if(Ie&&Qe&&(Ge.rangeCount!==1||Ge.anchorNode!==Ie.node||Ge.anchorOffset!==Ie.offset||Ge.focusNode!==Qe.node||Ge.focusOffset!==Qe.offset)){var Pe=tt.createRange();Pe.setStart(Ie.node,Ie.offset),Ge.removeAllRanges(),Mt>Pr?(Ge.addRange(Pe),Ge.extend(Qe.node,Qe.offset)):(Pe.setEnd(Qe.node,Qe.offset),Ge.addRange(Pe))}}}}for(tt=[],Ge=ge;Ge=Ge.parentNode;)Ge.nodeType===1&&tt.push({element:Ge,left:Ge.scrollLeft,top:Ge.scrollTop});for(typeof ge.focus=="function"&&ge.focus(),ge=0;ge<tt.length;ge++){var $e=tt[ge];$e.element.scrollLeft=$e.left,$e.element.scrollTop=$e.top}}Df=!!Ex,Ux=Ex=null}finally{kr=C,se.p=f,ae.T=A}}a.current=i,oa=2}}function vw(){if(oa===2){oa=0;var a=oA,i=wd,A=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||A){A=ae.T,ae.T=null;var f=se.p;se.p=2;var C=kr;kr|=4;try{Y1(a,i.alternate,i)}finally{kr=C,se.p=f,ae.T=A}}oa=3}}function Nw(){if(oa===4||oa===3){oa=0,Ue();var a=oA,i=wd,A=xl,f=Aw;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?oa=5:(oa=0,wd=oA=null,Bw(a,a.pendingLanes));var C=a.pendingLanes;if(C===0&&(iA=null),ws(A),i=i.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(jt,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=ae.T,C=se.p,se.p=2,ae.T=null;try{for(var E=a.onRecoverableError,ee=0;ee<f.length;ee++){var ge=f[ee];E(ge.value,{componentStack:ge.stack})}}finally{ae.T=i,se.p=C}}(xl&3)!==0&&jf(),Fo(a),C=a.pendingLanes,(A&261930)!==0&&(C&42)!==0?a===gx?Mu++:(Mu=0,gx=a):Mu=0,Pu(0)}}function Bw(a,i){(a.pooledCacheLanes&=i)===0&&(i=a.pooledCache,i!=null&&(a.pooledCache=null,sc(i)))}function jf(){return ww(),vw(),Nw(),jw()}function jw(){if(oa!==5)return!1;var a=oA,i=px;px=0;var A=ws(xl),f=ae.T,C=se.p;try{se.p=32>A?32:A,ae.T=null,A=xx,xx=null;var E=oA,ee=xl;if(oa=0,wd=oA=null,xl=0,(kr&6)!==0)throw Error(n(331));var ge=kr;if(kr|=4,iw(E.current),sw(E,E.current,ee,A),kr=ge,Pu(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(jt,E)}catch{}return!0}finally{se.p=C,ae.T=f,Bw(a,i)}}function Cw(a,i,A){i=un(A,i),i=Yp(a.stateNode,i,2),a=$t(a,i,2),a!==null&&(Et(a,2),Fo(a))}function Ir(a,i,A){if(a.tag===3)Cw(a,a,A);else for(;i!==null;){if(i.tag===3){Cw(i,a,A);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(iA===null||!iA.has(f))){a=un(A,a),A=S1(2),f=$t(i,A,2),f!==null&&(_1(A,f,i,a),Et(f,2),Fo(f));break}}i=i.return}}function wx(a,i,A){var f=a.pingCache;if(f===null){f=a.pingCache=new fC;var C=new Set;f.set(i,C)}else C=f.get(i),C===void 0&&(C=new Set,f.set(i,C));C.has(A)||(hx=!0,C.add(A),a=bC.bind(null,a,i,A),i.then(a,a))}function bC(a,i,A){var f=a.pingCache;f!==null&&f.delete(i),a.pingedLanes|=a.suspendedLanes&A,a.warmLanes&=~A,Wr===a&&(or&A)===A&&(ks===4||ks===3&&(or&62914560)===or&&300>Re()-bf?(kr&2)===0&&vd(a,0):fx|=A,yd===or&&(yd=0)),Fo(a)}function Sw(a,i){i===0&&(i=Xn()),a=Gi(a,i),a!==null&&(Et(a,i),Fo(a))}function yC(a){var i=a.memoizedState,A=0;i!==null&&(A=i.retryLane),Sw(a,A)}function wC(a,i){var A=0;switch(a.tag){case 31:case 13:var f=a.stateNode,C=a.memoizedState;C!==null&&(A=C.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(n(314))}f!==null&&f.delete(i),Sw(a,A)}function vC(a,i){return G(a,i)}var Cf=null,Bd=null,vx=!1,Sf=!1,Nx=!1,AA=0;function Fo(a){a!==Bd&&a.next===null&&(Bd===null?Cf=Bd=a:Bd=Bd.next=a),Sf=!0,vx||(vx=!0,BC())}function Pu(a,i){if(!Nx&&Sf){Nx=!0;do for(var A=!1,f=Cf;f!==null;){if(a!==0){var C=f.pendingLanes;if(C===0)var E=0;else{var ee=f.suspendedLanes,ge=f.pingedLanes;E=(1<<31-Gt(42|a)+1)-1,E&=C&~(ee&~ge),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(A=!0,Ew(f,E))}else E=or,E=cr(f,f===Wr?E:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(E&3)===0||_n(f,E)||(A=!0,Ew(f,E));f=f.next}while(A);Nx=!1}}function NC(){_w()}function _w(){Sf=vx=!1;var a=0;AA!==0&&LC()&&(a=AA);for(var i=Re(),A=null,f=Cf;f!==null;){var C=f.next,E=kw(f,i);E===0?(f.next=null,A===null?Cf=C:A.next=C,C===null&&(Bd=A)):(A=f,(a!==0||(E&3)!==0)&&(Sf=!0)),f=C}oa!==0&&oa!==5||Pu(a),AA!==0&&(AA=0)}function kw(a,i){for(var A=a.suspendedLanes,f=a.pingedLanes,C=a.expirationTimes,E=a.pendingLanes&-62914561;0<E;){var ee=31-Gt(E),ge=1<<ee,ke=C[ee];ke===-1?((ge&A)===0||(ge&f)!==0)&&(C[ee]=Aa(ge,i)):ke<=i&&(a.expiredLanes|=ge),E&=~ge}if(i=Wr,A=or,A=cr(a,a===i?A:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,A===0||a===i&&(Tr===2||Tr===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&me(f),a.callbackNode=null,a.callbackPriority=0;if((A&3)===0||_n(a,A)){if(i=A&-A,i===a.callbackPriority)return i;switch(f!==null&&me(f),ws(A)){case 2:case 8:A=it;break;case 32:A=lt;break;case 268435456:A=Tt;break;default:A=lt}return f=Fw.bind(null,a),A=G(A,f),a.callbackPriority=i,a.callbackNode=A,i}return f!==null&&f!==null&&me(f),a.callbackPriority=2,a.callbackNode=null,2}function Fw(a,i){if(oa!==0&&oa!==5)return a.callbackNode=null,a.callbackPriority=0,null;var A=a.callbackNode;if(jf()&&a.callbackNode!==A)return null;var f=or;return f=cr(a,a===Wr?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(dw(a,f,i),kw(a,Re()),a.callbackNode!=null&&a.callbackNode===A?Fw.bind(null,a):null)}function Ew(a,i){if(jf())return null;dw(a,i,!0)}function BC(){IC(function(){(kr&6)!==0?G(Ve,NC):_w()})}function Bx(){if(AA===0){var a=b;a===0&&(a=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),AA=a}return AA}function Uw(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:La(""+a)}function Qw(a,i){var A=i.ownerDocument.createElement("input");return A.name=i.name,A.value=i.value,a.id&&A.setAttribute("form",a.id),i.parentNode.insertBefore(A,i),a=new FormData(a),A.parentNode.removeChild(A),a}function jC(a,i,A,f,C){if(i==="submit"&&A&&A.stateNode===C){var E=Uw((C[ts]||null).action),ee=f.submitter;ee&&(i=(i=ee[ts]||null)?Uw(i.formAction):ee.getAttribute("formAction"),i!==null&&(E=i,ee=null));var ge=new ln("action","action",null,f,C);a.push({event:ge,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(AA!==0){var ke=ee?Qw(C,ee):new FormData(C);zp(A,{pending:!0,data:ke,method:C.method,action:E},null,ke)}}else typeof E=="function"&&(ge.preventDefault(),ke=ee?Qw(C,ee):new FormData(C),zp(A,{pending:!0,data:ke,method:C.method,action:E},E,ke))},currentTarget:C}]})}}for(var jx=0;jx<rl.length;jx++){var Cx=rl[jx],CC=Cx.toLowerCase(),SC=Cx[0].toUpperCase()+Cx.slice(1);cn(CC,"on"+SC)}cn(tl,"onAnimationEnd"),cn(XA,"onAnimationIteration"),cn(xu,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(Jh,"onTransitionRun"),cn(Zh,"onTransitionStart"),cn($h,"onTransitionCancel"),cn(gu,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_C=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ku));function Lw(a,i){i=(i&4)!==0;for(var A=0;A<a.length;A++){var f=a[A],C=f.event;f=f.listeners;e:{var E=void 0;if(i)for(var ee=f.length-1;0<=ee;ee--){var ge=f[ee],ke=ge.instance,Ke=ge.currentTarget;if(ge=ge.listener,ke!==E&&C.isPropagationStopped())break e;E=ge,C.currentTarget=Ke;try{E(C)}catch(Ye){YA(Ye)}C.currentTarget=null,E=ke}else for(ee=0;ee<f.length;ee++){if(ge=f[ee],ke=ge.instance,Ke=ge.currentTarget,ge=ge.listener,ke!==E&&C.isPropagationStopped())break e;E=ge,C.currentTarget=Ke;try{E(C)}catch(Ye){YA(Ye)}C.currentTarget=null,E=ke}}}}function ir(a,i){var A=i[Va];A===void 0&&(A=i[Va]=new Set);var f=a+"__bubble";A.has(f)||(Tw(i,a,2,!1),A.add(f))}function Sx(a,i,A){var f=0;i&&(f|=4),Tw(A,a,f,i)}var _f="_reactListening"+Math.random().toString(36).slice(2);function _x(a){if(!a[_f]){a[_f]=!0,UA.forEach(function(A){A!=="selectionchange"&&(_C.has(A)||Sx(A,!1,a),Sx(A,!0,a))});var i=a.nodeType===9?a:a.ownerDocument;i===null||i[_f]||(i[_f]=!0,Sx("selectionchange",!1,i))}}function Tw(a,i,A,f){switch(cv(i)){case 2:var C=r6;break;case 8:C=s6;break;default:C=Kx}A=C.bind(null,i,A,a),C=void 0,!zA||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(C=!0),f?C!==void 0?a.addEventListener(i,A,{capture:!0,passive:C}):a.addEventListener(i,A,!0):C!==void 0?a.addEventListener(i,A,{passive:C}):a.addEventListener(i,A,!1)}function kx(a,i,A,f,C){var E=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var ee=f.tag;if(ee===3||ee===4){var ge=f.stateNode.containerInfo;if(ge===C)break;if(ee===4)for(ee=f.return;ee!==null;){var ke=ee.tag;if((ke===3||ke===4)&&ee.stateNode.containerInfo===C)return;ee=ee.return}for(;ge!==null;){if(ee=En(ge),ee===null)return;if(ke=ee.tag,ke===5||ke===6||ke===26||ke===27){f=E=ee;continue e}ge=ge.parentNode}}f=f.return}qc(function(){var Ke=E,Ye=Wo(A),tt=[];e:{var qe=bu.get(a);if(qe!==void 0){var Ge=ln,wt=a;switch(a){case"keypress":if(on(A)===0)break e;case"keydown":case"keyup":Ge=dr;break;case"focusin":wt="focus",Ge=Ti;break;case"focusout":wt="blur",Ge=Ti;break;case"beforeblur":case"afterblur":Ge=Ti;break;case"click":if(A.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ge=qA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ge=Li;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ge=Ts;break;case tl:case XA:case xu:Ge=R;break;case gu:Ge=ea;break;case"scroll":case"scrollend":Ge=Ol;break;case"wheel":Ge=Dn;break;case"copy":case"cut":case"paste":Ge=je;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ge=ms;break;case"toggle":case"beforetoggle":Ge=GA}var Mt=(i&4)!==0,Pr=!Mt&&(a==="scroll"||a==="scrollend"),Ie=Mt?qe!==null?qe+"Capture":null:qe;Mt=[];for(var Qe=Ke,Pe;Qe!==null;){var $e=Qe;if(Pe=$e.stateNode,$e=$e.tag,$e!==5&&$e!==26&&$e!==27||Pe===null||Ie===null||($e=Ya(Qe,Ie),$e!=null&&Mt.push(zu(Qe,$e,Pe))),Pr)break;Qe=Qe.return}0<Mt.length&&(qe=new Ge(qe,wt,null,A,Ye),tt.push({event:qe,listeners:Mt}))}}if((i&7)===0){e:{if(qe=a==="mouseover"||a==="pointerover",Ge=a==="mouseout"||a==="pointerout",qe&&A!==ki&&(wt=A.relatedTarget||A.fromElement)&&(En(wt)||wt[ca]))break e;if((Ge||qe)&&(qe=Ye.window===Ye?Ye:(qe=Ye.ownerDocument)?qe.defaultView||qe.parentWindow:window,Ge?(wt=A.relatedTarget||A.toElement,Ge=Ke,wt=wt?En(wt):null,wt!==null&&(Pr=l(wt),Mt=wt.tag,wt!==Pr||Mt!==5&&Mt!==27&&Mt!==6)&&(wt=null)):(Ge=null,wt=Ke),Ge!==wt)){if(Mt=qA,$e="onMouseLeave",Ie="onMouseEnter",Qe="mouse",(a==="pointerout"||a==="pointerover")&&(Mt=ms,$e="onPointerLeave",Ie="onPointerEnter",Qe="pointer"),Pr=Ge==null?qe:Go(Ge),Pe=wt==null?qe:Go(wt),qe=new Mt($e,Qe+"leave",Ge,A,Ye),qe.target=Pr,qe.relatedTarget=Pe,$e=null,En(Ye)===Ke&&(Mt=new Mt(Ie,Qe+"enter",wt,A,Ye),Mt.target=Pe,Mt.relatedTarget=Pr,$e=Mt),Pr=$e,Ge&&wt)t:{for(Mt=kC,Ie=Ge,Qe=wt,Pe=0,$e=Ie;$e;$e=Mt($e))Pe++;$e=0;for(var Lt=Qe;Lt;Lt=Mt(Lt))$e++;for(;0<Pe-$e;)Ie=Mt(Ie),Pe--;for(;0<$e-Pe;)Qe=Mt(Qe),$e--;for(;Pe--;){if(Ie===Qe||Qe!==null&&Ie===Qe.alternate){Mt=Ie;break t}Ie=Mt(Ie),Qe=Mt(Qe)}Mt=null}else Mt=null;Ge!==null&&Iw(tt,qe,Ge,Mt,!1),wt!==null&&Pr!==null&&Iw(tt,Pr,wt,Mt,!0)}}e:{if(qe=Ke?Go(Ke):window,Ge=qe.nodeName&&qe.nodeName.toLowerCase(),Ge==="select"||Ge==="input"&&qe.type==="file")var jr=xo;else if(VA(qe))if(Ta)jr=ni;else{jr=ps;var St=zl}else Ge=qe.nodeName,!Ge||Ge.toLowerCase()!=="input"||qe.type!=="checkbox"&&qe.type!=="radio"?Ke&&MA(Ke.elementType)&&(jr=xo):jr=Xc;if(jr&&(jr=jr(a,Ke))){Za(tt,jr,A,Ye);break e}St&&St(a,qe,Ke),a==="focusout"&&Ke&&qe.type==="number"&&Ke.memoizedProps.value!=null&&RA(qe,"number",qe.value)}switch(St=Ke?Go(Ke):window,a){case"focusin":(VA(St)||St.contentEditable==="true")&&($a=St,qi=Ke,da=null);break;case"focusout":da=qi=$a=null;break;case"mousedown":An=!0;break;case"contextmenu":case"mouseup":case"dragend":An=!1,wr(tt,A,Ye);break;case"selectionchange":if(el)break;case"keydown":case"keyup":wr(tt,A,Ye)}var er;if(ti)e:{switch(a){case"compositionstart":var lr="onCompositionStart";break e;case"compositionend":lr="onCompositionEnd";break e;case"compositionupdate":lr="onCompositionUpdate";break e}lr=void 0}else ri?po(a,A)&&(lr="onCompositionEnd"):a==="keydown"&&A.keyCode===229&&(lr="onCompositionStart");lr&&(Ri&&A.locale!=="ko"&&(ri||lr!=="onCompositionStart"?lr==="onCompositionEnd"&&ri&&(er=Gc()):(Ja=Ye,Yo="value"in Ja?Ja.value:Ja.textContent,ri=!0)),St=kf(Ke,lr),0<St.length&&(lr=new Te(lr,a,null,A,Ye),tt.push({event:lr,listeners:St}),er?lr.data=er:(er=Ml(A),er!==null&&(lr.data=er)))),(er=$o?Ba(a,A):Oi(a,A))&&(lr=kf(Ke,"onBeforeInput"),0<lr.length&&(St=new Te("onBeforeInput","beforeinput",null,A,Ye),tt.push({event:St,listeners:lr}),St.data=er)),jC(tt,a,Ke,A,Ye)}Lw(tt,i)})}function zu(a,i,A){return{instance:a,listener:i,currentTarget:A}}function kf(a,i){for(var A=i+"Capture",f=[];a!==null;){var C=a,E=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||E===null||(C=Ya(a,A),C!=null&&f.unshift(zu(a,C,E)),C=Ya(a,i),C!=null&&f.push(zu(a,C,E))),a.tag===3)return f;a=a.return}return[]}function kC(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Iw(a,i,A,f,C){for(var E=i._reactName,ee=[];A!==null&&A!==f;){var ge=A,ke=ge.alternate,Ke=ge.stateNode;if(ge=ge.tag,ke!==null&&ke===f)break;ge!==5&&ge!==26&&ge!==27||Ke===null||(ke=Ke,C?(Ke=Ya(A,E),Ke!=null&&ee.unshift(zu(A,Ke,ke))):C||(Ke=Ya(A,E),Ke!=null&&ee.push(zu(A,Ke,ke)))),A=A.return}ee.length!==0&&a.push({event:i,listeners:ee})}var FC=/\r\n?/g,EC=/\u0000|\uFFFD/g;function Dw(a){return(typeof a=="string"?a:""+a).replace(FC,`
`).replace(EC,"")}function Rw(a,i){return i=Dw(i),Dw(a)===i}function Mr(a,i,A,f,C,E){switch(A){case"children":typeof f=="string"?i==="body"||i==="textarea"&&f===""||Tn(a,f):(typeof f=="number"||typeof f=="bigint")&&i!=="body"&&Tn(a,""+f);break;case"className":_i(a,"class",f);break;case"tabIndex":_i(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":_i(a,A,f);break;case"style":Pc(a,f,E);break;case"data":if(i!=="object"){_i(a,"data",f);break}case"src":case"href":if(f===""&&(i!=="a"||A!=="href")){a.removeAttribute(A);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(A);break}f=La(""+f),a.setAttribute(A,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(A,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(A==="formAction"?(i!=="input"&&Mr(a,i,"name",C.name,C,null),Mr(a,i,"formEncType",C.formEncType,C,null),Mr(a,i,"formMethod",C.formMethod,C,null),Mr(a,i,"formTarget",C.formTarget,C,null)):(Mr(a,i,"encType",C.encType,C,null),Mr(a,i,"method",C.method,C,null),Mr(a,i,"target",C.target,C,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(A);break}f=La(""+f),a.setAttribute(A,f);break;case"onClick":f!=null&&(a.onclick=In);break;case"onScroll":f!=null&&ir("scroll",a);break;case"onScrollEnd":f!=null&&ir("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(A=f.__html,A!=null){if(C.children!=null)throw Error(n(60));a.innerHTML=A}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}A=La(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",A);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(A,""+f):a.removeAttribute(A);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(A,""):a.removeAttribute(A);break;case"capture":case"download":f===!0?a.setAttribute(A,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(A,f):a.removeAttribute(A);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(A,f):a.removeAttribute(A);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(A):a.setAttribute(A,f);break;case"popover":ir("beforetoggle",a),ir("toggle",a),Xa(a,"popover",f);break;case"xlinkActuate":Ln(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Ln(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Ln(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Ln(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Ln(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Ln(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Ln(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Ln(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Ln(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Xa(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N")&&(A=PA.get(A)||A,Xa(a,A,f))}}function Fx(a,i,A,f,C,E){switch(A){case"style":Pc(a,f,E);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(A=f.__html,A!=null){if(C.children!=null)throw Error(n(60));a.innerHTML=A}}break;case"children":typeof f=="string"?Tn(a,f):(typeof f=="number"||typeof f=="bigint")&&Tn(a,""+f);break;case"onScroll":f!=null&&ir("scroll",a);break;case"onScrollEnd":f!=null&&ir("scrollend",a);break;case"onClick":f!=null&&(a.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wa.hasOwnProperty(A))e:{if(A[0]==="o"&&A[1]==="n"&&(C=A.endsWith("Capture"),i=A.slice(2,C?A.length-7:void 0),E=a[ts]||null,E=E!=null?E[A]:null,typeof E=="function"&&a.removeEventListener(i,E,C),typeof f=="function")){typeof E!="function"&&E!==null&&(A in a?a[A]=null:a.hasAttribute(A)&&a.removeAttribute(A)),a.addEventListener(i,f,C);break e}A in a?a[A]=f:f===!0?a.setAttribute(A,""):Xa(a,A,f)}}}function ka(a,i,A){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ir("error",a),ir("load",a);var f=!1,C=!1,E;for(E in A)if(A.hasOwnProperty(E)){var ee=A[E];if(ee!=null)switch(E){case"src":f=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,i));default:Mr(a,i,E,ee,A,null)}}C&&Mr(a,i,"srcSet",A.srcSet,A,null),f&&Mr(a,i,"src",A.src,A,null);return;case"input":ir("invalid",a);var ge=E=ee=C=null,ke=null,Ke=null;for(f in A)if(A.hasOwnProperty(f)){var Ye=A[f];if(Ye!=null)switch(f){case"name":C=Ye;break;case"type":ee=Ye;break;case"checked":ke=Ye;break;case"defaultChecked":Ke=Ye;break;case"value":E=Ye;break;case"defaultValue":ge=Ye;break;case"children":case"dangerouslySetInnerHTML":if(Ye!=null)throw Error(n(137,i));break;default:Mr(a,i,f,Ye,A,null)}}Hc(a,E,ge,ke,Ke,ee,C,!1);return;case"select":ir("invalid",a),f=ee=E=null;for(C in A)if(A.hasOwnProperty(C)&&(ge=A[C],ge!=null))switch(C){case"value":E=ge;break;case"defaultValue":ee=ge;break;case"multiple":f=ge;default:Mr(a,i,C,ge,A,null)}i=E,A=ee,a.multiple=!!f,i!=null?Na(a,!!f,i,!1):A!=null&&Na(a,!!f,A,!0);return;case"textarea":ir("invalid",a),E=C=f=null;for(ee in A)if(A.hasOwnProperty(ee)&&(ge=A[ee],ge!=null))switch(ee){case"value":f=ge;break;case"defaultValue":C=ge;break;case"children":E=ge;break;case"dangerouslySetInnerHTML":if(ge!=null)throw Error(n(91));break;default:Mr(a,i,ee,ge,A,null)}HA(a,f,C,E);return;case"option":for(ke in A)A.hasOwnProperty(ke)&&(f=A[ke],f!=null)&&(ke==="selected"?a.selected=f&&typeof f!="function"&&typeof f!="symbol":Mr(a,i,ke,f,A,null));return;case"dialog":ir("beforetoggle",a),ir("toggle",a),ir("cancel",a),ir("close",a);break;case"iframe":case"object":ir("load",a);break;case"video":case"audio":for(f=0;f<Ku.length;f++)ir(Ku[f],a);break;case"image":ir("error",a),ir("load",a);break;case"details":ir("toggle",a);break;case"embed":case"source":case"link":ir("error",a),ir("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ke in A)if(A.hasOwnProperty(Ke)&&(f=A[Ke],f!=null))switch(Ke){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,i));default:Mr(a,i,Ke,f,A,null)}return;default:if(MA(i)){for(Ye in A)A.hasOwnProperty(Ye)&&(f=A[Ye],f!==void 0&&Fx(a,i,Ye,f,A,void 0));return}}for(ge in A)A.hasOwnProperty(ge)&&(f=A[ge],f!=null&&Mr(a,i,ge,f,A,null))}function UC(a,i,A,f){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,E=null,ee=null,ge=null,ke=null,Ke=null,Ye=null;for(Ge in A){var tt=A[Ge];if(A.hasOwnProperty(Ge)&&tt!=null)switch(Ge){case"checked":break;case"value":break;case"defaultValue":ke=tt;default:f.hasOwnProperty(Ge)||Mr(a,i,Ge,null,f,tt)}}for(var qe in f){var Ge=f[qe];if(tt=A[qe],f.hasOwnProperty(qe)&&(Ge!=null||tt!=null))switch(qe){case"type":E=Ge;break;case"name":C=Ge;break;case"checked":Ke=Ge;break;case"defaultChecked":Ye=Ge;break;case"value":ee=Ge;break;case"defaultValue":ge=Ge;break;case"children":case"dangerouslySetInnerHTML":if(Ge!=null)throw Error(n(137,i));break;default:Ge!==tt&&Mr(a,i,qe,Ge,f,tt)}}Il(a,ee,ge,ke,Ke,Ye,E,C);return;case"select":Ge=ee=ge=qe=null;for(E in A)if(ke=A[E],A.hasOwnProperty(E)&&ke!=null)switch(E){case"value":break;case"multiple":Ge=ke;default:f.hasOwnProperty(E)||Mr(a,i,E,null,f,ke)}for(C in f)if(E=f[C],ke=A[C],f.hasOwnProperty(C)&&(E!=null||ke!=null))switch(C){case"value":qe=E;break;case"defaultValue":ge=E;break;case"multiple":ee=E;default:E!==ke&&Mr(a,i,C,E,f,ke)}i=ge,A=ee,f=Ge,qe!=null?Na(a,!!A,qe,!1):!!f!=!!A&&(i!=null?Na(a,!!A,i,!0):Na(a,!!A,A?[]:"",!1));return;case"textarea":Ge=qe=null;for(ge in A)if(C=A[ge],A.hasOwnProperty(ge)&&C!=null&&!f.hasOwnProperty(ge))switch(ge){case"value":break;case"children":break;default:Mr(a,i,ge,null,f,C)}for(ee in f)if(C=f[ee],E=A[ee],f.hasOwnProperty(ee)&&(C!=null||E!=null))switch(ee){case"value":qe=C;break;case"defaultValue":Ge=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(n(91));break;default:C!==E&&Mr(a,i,ee,C,f,E)}OA(a,qe,Ge);return;case"option":for(var wt in A)qe=A[wt],A.hasOwnProperty(wt)&&qe!=null&&!f.hasOwnProperty(wt)&&(wt==="selected"?a.selected=!1:Mr(a,i,wt,null,f,qe));for(ke in f)qe=f[ke],Ge=A[ke],f.hasOwnProperty(ke)&&qe!==Ge&&(qe!=null||Ge!=null)&&(ke==="selected"?a.selected=qe&&typeof qe!="function"&&typeof qe!="symbol":Mr(a,i,ke,qe,f,Ge));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Mt in A)qe=A[Mt],A.hasOwnProperty(Mt)&&qe!=null&&!f.hasOwnProperty(Mt)&&Mr(a,i,Mt,null,f,qe);for(Ke in f)if(qe=f[Ke],Ge=A[Ke],f.hasOwnProperty(Ke)&&qe!==Ge&&(qe!=null||Ge!=null))switch(Ke){case"children":case"dangerouslySetInnerHTML":if(qe!=null)throw Error(n(137,i));break;default:Mr(a,i,Ke,qe,f,Ge)}return;default:if(MA(i)){for(var Pr in A)qe=A[Pr],A.hasOwnProperty(Pr)&&qe!==void 0&&!f.hasOwnProperty(Pr)&&Fx(a,i,Pr,void 0,f,qe);for(Ye in f)qe=f[Ye],Ge=A[Ye],!f.hasOwnProperty(Ye)||qe===Ge||qe===void 0&&Ge===void 0||Fx(a,i,Ye,qe,f,Ge);return}}for(var Ie in A)qe=A[Ie],A.hasOwnProperty(Ie)&&qe!=null&&!f.hasOwnProperty(Ie)&&Mr(a,i,Ie,null,f,qe);for(tt in f)qe=f[tt],Ge=A[tt],!f.hasOwnProperty(tt)||qe===Ge||qe==null&&Ge==null||Mr(a,i,tt,qe,f,Ge)}function Ow(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QC(){if(typeof performance.getEntriesByType=="function"){for(var a=0,i=0,A=performance.getEntriesByType("resource"),f=0;f<A.length;f++){var C=A[f],E=C.transferSize,ee=C.initiatorType,ge=C.duration;if(E&&ge&&Ow(ee)){for(ee=0,ge=C.responseEnd,f+=1;f<A.length;f++){var ke=A[f],Ke=ke.startTime;if(Ke>ge)break;var Ye=ke.transferSize,tt=ke.initiatorType;Ye&&Ow(tt)&&(ke=ke.responseEnd,ee+=Ye*(ke<ge?1:(ge-Ke)/(ke-Ke)))}if(--f,i+=8*(E+ee)/(C.duration/1e3),a++,10<a)break}}if(0<a)return i/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Ex=null,Ux=null;function Ff(a){return a.nodeType===9?a:a.ownerDocument}function Hw(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Mw(a,i){if(a===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&i==="foreignObject"?0:a}function Qx(a,i){return a==="textarea"||a==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Lx=null;function LC(){var a=window.event;return a&&a.type==="popstate"?a===Lx?!1:(Lx=a,!0):(Lx=null,!1)}var Pw=typeof setTimeout=="function"?setTimeout:void 0,TC=typeof clearTimeout=="function"?clearTimeout:void 0,Kw=typeof Promise=="function"?Promise:void 0,IC=typeof queueMicrotask=="function"?queueMicrotask:typeof Kw<"u"?function(a){return Kw.resolve(null).then(a).catch(DC)}:Pw;function DC(a){setTimeout(function(){throw a})}function cA(a){return a==="head"}function zw(a,i){var A=i,f=0;do{var C=A.nextSibling;if(a.removeChild(A),C&&C.nodeType===8)if(A=C.data,A==="/$"||A==="/&"){if(f===0){a.removeChild(C),_d(i);return}f--}else if(A==="$"||A==="$?"||A==="$~"||A==="$!"||A==="&")f++;else if(A==="html")qu(a.ownerDocument.documentElement);else if(A==="head"){A=a.ownerDocument.head,qu(A);for(var E=A.firstChild;E;){var ee=E.nextSibling,ge=E.nodeName;E[Fn]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&E.rel.toLowerCase()==="stylesheet"||A.removeChild(E),E=ee}}else A==="body"&&qu(a.ownerDocument.body);A=C}while(A);_d(i)}function qw(a,i){var A=a;a=0;do{var f=A.nextSibling;if(A.nodeType===1?i?(A._stashedDisplay=A.style.display,A.style.display="none"):(A.style.display=A._stashedDisplay||"",A.getAttribute("style")===""&&A.removeAttribute("style")):A.nodeType===3&&(i?(A._stashedText=A.nodeValue,A.nodeValue=""):A.nodeValue=A._stashedText||""),f&&f.nodeType===8)if(A=f.data,A==="/$"){if(a===0)break;a--}else A!=="$"&&A!=="$?"&&A!=="$~"&&A!=="$!"||a++;A=f}while(A)}function Tx(a){var i=a.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var A=i;switch(i=i.nextSibling,A.nodeName){case"HTML":case"HEAD":case"BODY":Tx(A),uo(A);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(A.rel.toLowerCase()==="stylesheet")continue}a.removeChild(A)}}function RC(a,i,A,f){for(;a.nodeType===1;){var C=A;if(a.nodeName.toLowerCase()!==i.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[Fn])switch(i){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(E=a.getAttribute("rel"),E==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(E!==C.rel||a.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||a.getAttribute("title")!==(C.title==null?null:C.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(E=a.getAttribute("src"),(E!==(C.src==null?null:C.src)||a.getAttribute("type")!==(C.type==null?null:C.type)||a.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&E&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(i==="input"&&a.type==="hidden"){var E=C.name==null?null:""+C.name;if(C.type==="hidden"&&a.getAttribute("name")===E)return a}else return a;if(a=ui(a.nextSibling),a===null)break}return null}function OC(a,i,A){if(i==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!A||(a=ui(a.nextSibling),a===null))return null;return a}function Gw(a,i){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!i||(a=ui(a.nextSibling),a===null))return null;return a}function Ix(a){return a.data==="$?"||a.data==="$~"}function Dx(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function HC(a,i){var A=a.ownerDocument;if(a.data==="$~")a._reactRetry=i;else if(a.data!=="$?"||A.readyState!=="loading")i();else{var f=function(){i(),A.removeEventListener("DOMContentLoaded",f)};A.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function ui(a){for(;a!=null;a=a.nextSibling){var i=a.nodeType;if(i===1||i===3)break;if(i===8){if(i=a.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return a}var Rx=null;function Vw(a){a=a.nextSibling;for(var i=0;a;){if(a.nodeType===8){var A=a.data;if(A==="/$"||A==="/&"){if(i===0)return ui(a.nextSibling);i--}else A!=="$"&&A!=="$!"&&A!=="$?"&&A!=="$~"&&A!=="&"||i++}a=a.nextSibling}return null}function Ww(a){a=a.previousSibling;for(var i=0;a;){if(a.nodeType===8){var A=a.data;if(A==="$"||A==="$!"||A==="$?"||A==="$~"||A==="&"){if(i===0)return a;i--}else A!=="/$"&&A!=="/&"||i++}a=a.previousSibling}return null}function Xw(a,i,A){switch(i=Ff(A),a){case"html":if(a=i.documentElement,!a)throw Error(n(452));return a;case"head":if(a=i.head,!a)throw Error(n(453));return a;case"body":if(a=i.body,!a)throw Error(n(454));return a;default:throw Error(n(451))}}function qu(a){for(var i=a.attributes;i.length;)a.removeAttributeNode(i[0]);uo(a)}var hi=new Map,Yw=new Set;function Ef(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var gl=se.d;se.d={f:MC,r:PC,D:KC,C:zC,L:qC,m:GC,X:WC,S:VC,M:XC};function MC(){var a=gl.f(),i=vf();return a||i}function PC(a){var i=Un(a);i!==null&&i.tag===5&&i.type==="form"?h1(i):gl.r(a)}var jd=typeof document>"u"?null:document;function Jw(a,i,A){var f=jd;if(f&&typeof i=="string"&&i){var C=vs(i);C='link[rel="'+a+'"][href="'+C+'"]',typeof A=="string"&&(C+='[crossorigin="'+A+'"]'),Yw.has(C)||(Yw.add(C),a={rel:a,crossOrigin:A,href:i},f.querySelector(C)===null&&(i=f.createElement("link"),ka(i,"link",a),fs(i),f.head.appendChild(i)))}}function KC(a){gl.D(a),Jw("dns-prefetch",a,null)}function zC(a,i){gl.C(a,i),Jw("preconnect",a,i)}function qC(a,i,A){gl.L(a,i,A);var f=jd;if(f&&a&&i){var C='link[rel="preload"][as="'+vs(i)+'"]';i==="image"&&A&&A.imageSrcSet?(C+='[imagesrcset="'+vs(A.imageSrcSet)+'"]',typeof A.imageSizes=="string"&&(C+='[imagesizes="'+vs(A.imageSizes)+'"]')):C+='[href="'+vs(a)+'"]';var E=C;switch(i){case"style":E=Cd(a);break;case"script":E=Sd(a)}hi.has(E)||(a=x({rel:"preload",href:i==="image"&&A&&A.imageSrcSet?void 0:a,as:i},A),hi.set(E,a),f.querySelector(C)!==null||i==="style"&&f.querySelector(Gu(E))||i==="script"&&f.querySelector(Vu(E))||(i=f.createElement("link"),ka(i,"link",a),fs(i),f.head.appendChild(i)))}}function GC(a,i){gl.m(a,i);var A=jd;if(A&&a){var f=i&&typeof i.as=="string"?i.as:"script",C='link[rel="modulepreload"][as="'+vs(f)+'"][href="'+vs(a)+'"]',E=C;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Sd(a)}if(!hi.has(E)&&(a=x({rel:"modulepreload",href:a},i),hi.set(E,a),A.querySelector(C)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(A.querySelector(Vu(E)))return}f=A.createElement("link"),ka(f,"link",a),fs(f),A.head.appendChild(f)}}}function VC(a,i,A){gl.S(a,i,A);var f=jd;if(f&&a){var C=Jn(f).hoistableStyles,E=Cd(a);i=i||"default";var ee=C.get(E);if(!ee){var ge={loading:0,preload:null};if(ee=f.querySelector(Gu(E)))ge.loading=5;else{a=x({rel:"stylesheet",href:a,"data-precedence":i},A),(A=hi.get(E))&&Ox(a,A);var ke=ee=f.createElement("link");fs(ke),ka(ke,"link",a),ke._p=new Promise(function(Ke,Ye){ke.onload=Ke,ke.onerror=Ye}),ke.addEventListener("load",function(){ge.loading|=1}),ke.addEventListener("error",function(){ge.loading|=2}),ge.loading|=4,Uf(ee,i,f)}ee={type:"stylesheet",instance:ee,count:1,state:ge},C.set(E,ee)}}}function WC(a,i){gl.X(a,i);var A=jd;if(A&&a){var f=Jn(A).hoistableScripts,C=Sd(a),E=f.get(C);E||(E=A.querySelector(Vu(C)),E||(a=x({src:a,async:!0},i),(i=hi.get(C))&&Hx(a,i),E=A.createElement("script"),fs(E),ka(E,"link",a),A.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},f.set(C,E))}}function XC(a,i){gl.M(a,i);var A=jd;if(A&&a){var f=Jn(A).hoistableScripts,C=Sd(a),E=f.get(C);E||(E=A.querySelector(Vu(C)),E||(a=x({src:a,async:!0,type:"module"},i),(i=hi.get(C))&&Hx(a,i),E=A.createElement("script"),fs(E),ka(E,"link",a),A.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},f.set(C,E))}}function Zw(a,i,A,f){var C=(C=J.current)?Ef(C):null;if(!C)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof A.precedence=="string"&&typeof A.href=="string"?(i=Cd(A.href),A=Jn(C).hoistableStyles,f=A.get(i),f||(f={type:"style",instance:null,count:0,state:null},A.set(i,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(A.rel==="stylesheet"&&typeof A.href=="string"&&typeof A.precedence=="string"){a=Cd(A.href);var E=Jn(C).hoistableStyles,ee=E.get(a);if(ee||(C=C.ownerDocument||C,ee={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(a,ee),(E=C.querySelector(Gu(a)))&&!E._p&&(ee.instance=E,ee.state.loading=5),hi.has(a)||(A={rel:"preload",as:"style",href:A.href,crossOrigin:A.crossOrigin,integrity:A.integrity,media:A.media,hrefLang:A.hrefLang,referrerPolicy:A.referrerPolicy},hi.set(a,A),E||YC(C,a,A,ee.state))),i&&f===null)throw Error(n(528,""));return ee}if(i&&f!==null)throw Error(n(529,""));return null;case"script":return i=A.async,A=A.src,typeof A=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Sd(A),A=Jn(C).hoistableScripts,f=A.get(i),f||(f={type:"script",instance:null,count:0,state:null},A.set(i,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function Cd(a){return'href="'+vs(a)+'"'}function Gu(a){return'link[rel="stylesheet"]['+a+"]"}function $w(a){return x({},a,{"data-precedence":a.precedence,precedence:null})}function YC(a,i,A,f){a.querySelector('link[rel="preload"][as="style"]['+i+"]")?f.loading=1:(i=a.createElement("link"),f.preload=i,i.addEventListener("load",function(){return f.loading|=1}),i.addEventListener("error",function(){return f.loading|=2}),ka(i,"link",A),fs(i),a.head.appendChild(i))}function Sd(a){return'[src="'+vs(a)+'"]'}function Vu(a){return"script[async]"+a}function ev(a,i,A){if(i.count++,i.instance===null)switch(i.type){case"style":var f=a.querySelector('style[data-href~="'+vs(A.href)+'"]');if(f)return i.instance=f,fs(f),f;var C=x({},A,{"data-href":A.href,"data-precedence":A.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),fs(f),ka(f,"style",C),Uf(f,A.precedence,a),i.instance=f;case"stylesheet":C=Cd(A.href);var E=a.querySelector(Gu(C));if(E)return i.state.loading|=4,i.instance=E,fs(E),E;f=$w(A),(C=hi.get(C))&&Ox(f,C),E=(a.ownerDocument||a).createElement("link"),fs(E);var ee=E;return ee._p=new Promise(function(ge,ke){ee.onload=ge,ee.onerror=ke}),ka(E,"link",f),i.state.loading|=4,Uf(E,A.precedence,a),i.instance=E;case"script":return E=Sd(A.src),(C=a.querySelector(Vu(E)))?(i.instance=C,fs(C),C):(f=A,(C=hi.get(E))&&(f=x({},A),Hx(f,C)),a=a.ownerDocument||a,C=a.createElement("script"),fs(C),ka(C,"link",f),a.head.appendChild(C),i.instance=C);case"void":return null;default:throw Error(n(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(f=i.instance,i.state.loading|=4,Uf(f,A.precedence,a));return i.instance}function Uf(a,i,A){for(var f=A.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=f.length?f[f.length-1]:null,E=C,ee=0;ee<f.length;ee++){var ge=f[ee];if(ge.dataset.precedence===i)E=ge;else if(E!==C)break}E?E.parentNode.insertBefore(a,E.nextSibling):(i=A.nodeType===9?A.head:A,i.insertBefore(a,i.firstChild))}function Ox(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.title==null&&(a.title=i.title)}function Hx(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.integrity==null&&(a.integrity=i.integrity)}var Qf=null;function tv(a,i,A){if(Qf===null){var f=new Map,C=Qf=new Map;C.set(A,f)}else C=Qf,f=C.get(A),f||(f=new Map,C.set(A,f));if(f.has(a))return f;for(f.set(a,null),A=A.getElementsByTagName(a),C=0;C<A.length;C++){var E=A[C];if(!(E[Fn]||E[Qr]||a==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var ee=E.getAttribute(i)||"";ee=a+ee;var ge=f.get(ee);ge?ge.push(E):f.set(ee,[E])}}return f}function rv(a,i,A){a=a.ownerDocument||a,a.head.insertBefore(A,i==="title"?a.querySelector("head > title"):null)}function JC(a,i,A){if(A===1||i.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(a=i.disabled,typeof i.precedence=="string"&&a==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function sv(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function ZC(a,i,A,f){if(A.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(A.state.loading&4)===0){if(A.instance===null){var C=Cd(f.href),E=i.querySelector(Gu(C));if(E){i=E._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(a.count++,a=Lf.bind(a),i.then(a,a)),A.state.loading|=4,A.instance=E,fs(E);return}E=i.ownerDocument||i,f=$w(f),(C=hi.get(C))&&Ox(f,C),E=E.createElement("link"),fs(E);var ee=E;ee._p=new Promise(function(ge,ke){ee.onload=ge,ee.onerror=ke}),ka(E,"link",f),A.instance=E}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(A,i),(i=A.state.preload)&&(A.state.loading&3)===0&&(a.count++,A=Lf.bind(a),i.addEventListener("load",A),i.addEventListener("error",A))}}var Mx=0;function $C(a,i){return a.stylesheets&&a.count===0&&If(a,a.stylesheets),0<a.count||0<a.imgCount?function(A){var f=setTimeout(function(){if(a.stylesheets&&If(a,a.stylesheets),a.unsuspend){var E=a.unsuspend;a.unsuspend=null,E()}},6e4+i);0<a.imgBytes&&Mx===0&&(Mx=62500*QC());var C=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&If(a,a.stylesheets),a.unsuspend)){var E=a.unsuspend;a.unsuspend=null,E()}},(a.imgBytes>Mx?50:800)+i);return a.unsuspend=A,function(){a.unsuspend=null,clearTimeout(f),clearTimeout(C)}}:null}function Lf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)If(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Tf=null;function If(a,i){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Tf=new Map,i.forEach(e6,a),Tf=null,Lf.call(a))}function e6(a,i){if(!(i.state.loading&4)){var A=Tf.get(a);if(A)var f=A.get(null);else{A=new Map,Tf.set(a,A);for(var C=a.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<C.length;E++){var ee=C[E];(ee.nodeName==="LINK"||ee.getAttribute("media")!=="not all")&&(A.set(ee.dataset.precedence,ee),f=ee)}f&&A.set(null,f)}C=i.instance,ee=C.getAttribute("data-precedence"),E=A.get(ee)||f,E===f&&A.set(null,C),A.set(ee,C),this.count++,f=Lf.bind(this),C.addEventListener("load",f),C.addEventListener("error",f),E?E.parentNode.insertBefore(C,E.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(C,a.firstChild)),i.state.loading|=4}}var Wu={$$typeof:_,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function t6(a,i,A,f,C,E,ee,ge,ke){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=an(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.hiddenUpdates=an(null),this.identifierPrefix=f,this.onUncaughtError=C,this.onCaughtError=E,this.onRecoverableError=ee,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ke,this.incompleteTransitions=new Map}function av(a,i,A,f,C,E,ee,ge,ke,Ke,Ye,tt){return a=new t6(a,i,A,ee,ke,Ke,Ye,tt,ge),i=1,E===!0&&(i|=24),E=ha(3,null,null,i),a.current=E,E.stateNode=a,i=Zl(),i.refCount++,a.pooledCache=i,i.refCount++,E.memoizedState={element:f,isDehydrated:A,cache:i},At(E),a}function nv(a){return a?(a=ra,a):ra}function iv(a,i,A,f,C,E){C=nv(C),f.context===null?f.context=C:f.pendingContext=C,f=Ot(i),f.payload={element:A},E=E===void 0?null:E,E!==null&&(f.callback=E),A=$t(a,f,i),A!==null&&(Nn(A,a,i),Sr(A,a,i))}function ov(a,i){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var A=a.retryLane;a.retryLane=A!==0&&A<i?A:i}}function Px(a,i){ov(a,i),(a=a.alternate)&&ov(a,i)}function lv(a){if(a.tag===13||a.tag===31){var i=Gi(a,67108864);i!==null&&Nn(i,a,67108864),Px(a,67108864)}}function Av(a){if(a.tag===13||a.tag===31){var i=qn();i=Jr(i);var A=Gi(a,i);A!==null&&Nn(A,a,i),Px(a,i)}}var Df=!0;function r6(a,i,A,f){var C=ae.T;ae.T=null;var E=se.p;try{se.p=2,Kx(a,i,A,f)}finally{se.p=E,ae.T=C}}function s6(a,i,A,f){var C=ae.T;ae.T=null;var E=se.p;try{se.p=8,Kx(a,i,A,f)}finally{se.p=E,ae.T=C}}function Kx(a,i,A,f){if(Df){var C=zx(f);if(C===null)kx(a,i,f,Rf,A),dv(a,f);else if(n6(C,a,i,A,f))f.stopPropagation();else if(dv(a,f),i&4&&-1<a6.indexOf(a)){for(;C!==null;){var E=Un(C);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var ee=Bt(E.pendingLanes);if(ee!==0){var ge=E;for(ge.pendingLanes|=2,ge.entangledLanes|=2;ee;){var ke=1<<31-Gt(ee);ge.entanglements[1]|=ke,ee&=~ke}Fo(E),(kr&6)===0&&(yf=Re()+500,Pu(0))}}break;case 31:case 13:ge=Gi(E,2),ge!==null&&Nn(ge,E,2),vf(),Px(E,2)}if(E=zx(f),E===null&&kx(a,i,f,Rf,A),E===C)break;C=E}C!==null&&f.stopPropagation()}else kx(a,i,f,null,A)}}function zx(a){return a=Wo(a),qx(a)}var Rf=null;function qx(a){if(Rf=null,a=En(a),a!==null){var i=l(a);if(i===null)a=null;else{var A=i.tag;if(A===13){if(a=d(i),a!==null)return a;a=null}else if(A===31){if(a=c(i),a!==null)return a;a=null}else if(A===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;a=null}else i!==a&&(a=null)}}return Rf=a,null}function cv(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(He()){case Ve:return 2;case it:return 8;case lt:case ut:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var Gx=!1,dA=null,uA=null,hA=null,Xu=new Map,Yu=new Map,fA=[],a6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dv(a,i){switch(a){case"focusin":case"focusout":dA=null;break;case"dragenter":case"dragleave":uA=null;break;case"mouseover":case"mouseout":hA=null;break;case"pointerover":case"pointerout":Xu.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yu.delete(i.pointerId)}}function Ju(a,i,A,f,C,E){return a===null||a.nativeEvent!==E?(a={blockedOn:i,domEventName:A,eventSystemFlags:f,nativeEvent:E,targetContainers:[C]},i!==null&&(i=Un(i),i!==null&&lv(i)),a):(a.eventSystemFlags|=f,i=a.targetContainers,C!==null&&i.indexOf(C)===-1&&i.push(C),a)}function n6(a,i,A,f,C){switch(i){case"focusin":return dA=Ju(dA,a,i,A,f,C),!0;case"dragenter":return uA=Ju(uA,a,i,A,f,C),!0;case"mouseover":return hA=Ju(hA,a,i,A,f,C),!0;case"pointerover":var E=C.pointerId;return Xu.set(E,Ju(Xu.get(E)||null,a,i,A,f,C)),!0;case"gotpointercapture":return E=C.pointerId,Yu.set(E,Ju(Yu.get(E)||null,a,i,A,f,C)),!0}return!1}function uv(a){var i=En(a.target);if(i!==null){var A=l(i);if(A!==null){if(i=A.tag,i===13){if(i=d(A),i!==null){a.blockedOn=i,co(a.priority,function(){Av(A)});return}}else if(i===31){if(i=c(A),i!==null){a.blockedOn=i,co(a.priority,function(){Av(A)});return}}else if(i===3&&A.stateNode.current.memoizedState.isDehydrated){a.blockedOn=A.tag===3?A.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Of(a){if(a.blockedOn!==null)return!1;for(var i=a.targetContainers;0<i.length;){var A=zx(a.nativeEvent);if(A===null){A=a.nativeEvent;var f=new A.constructor(A.type,A);ki=f,A.target.dispatchEvent(f),ki=null}else return i=Un(A),i!==null&&lv(i),a.blockedOn=A,!1;i.shift()}return!0}function hv(a,i,A){Of(a)&&A.delete(i)}function i6(){Gx=!1,dA!==null&&Of(dA)&&(dA=null),uA!==null&&Of(uA)&&(uA=null),hA!==null&&Of(hA)&&(hA=null),Xu.forEach(hv),Yu.forEach(hv)}function Hf(a,i){a.blockedOn===i&&(a.blockedOn=null,Gx||(Gx=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,i6)))}var Mf=null;function fv(a){Mf!==a&&(Mf=a,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Mf===a&&(Mf=null);for(var i=0;i<a.length;i+=3){var A=a[i],f=a[i+1],C=a[i+2];if(typeof f!="function"){if(qx(f||A)===null)continue;break}var E=Un(A);E!==null&&(a.splice(i,3),i-=3,zp(E,{pending:!0,data:C,method:A.method,action:f},f,C))}}))}function _d(a){function i(ke){return Hf(ke,a)}dA!==null&&Hf(dA,a),uA!==null&&Hf(uA,a),hA!==null&&Hf(hA,a),Xu.forEach(i),Yu.forEach(i);for(var A=0;A<fA.length;A++){var f=fA[A];f.blockedOn===a&&(f.blockedOn=null)}for(;0<fA.length&&(A=fA[0],A.blockedOn===null);)uv(A),A.blockedOn===null&&fA.shift();if(A=(a.ownerDocument||a).$$reactFormReplay,A!=null)for(f=0;f<A.length;f+=3){var C=A[f],E=A[f+1],ee=C[ts]||null;if(typeof E=="function")ee||fv(A);else if(ee){var ge=null;if(E&&E.hasAttribute("formAction")){if(C=E,ee=E[ts]||null)ge=ee.formAction;else if(qx(C)!==null)continue}else ge=ee.action;typeof ge=="function"?A[f+1]=ge:(A.splice(f,3),f-=3),fv(A)}}}function mv(){function a(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(ee){return C=ee})},focusReset:"manual",scroll:"manual"})}function i(){C!==null&&(C(),C=null),f||setTimeout(A,20)}function A(){if(!f&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,C=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(A,100),function(){f=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),C!==null&&(C(),C=null)}}}function Vx(a){this._internalRoot=a}Pf.prototype.render=Vx.prototype.render=function(a){var i=this._internalRoot;if(i===null)throw Error(n(409));var A=i.current,f=qn();iv(A,f,a,i,null,null)},Pf.prototype.unmount=Vx.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var i=a.containerInfo;iv(a.current,2,null,a,null,null),vf(),i[ca]=null}};function Pf(a){this._internalRoot=a}Pf.prototype.unstable_scheduleHydration=function(a){if(a){var i=qs();a={blockedOn:null,target:a,priority:i};for(var A=0;A<fA.length&&i!==0&&i<fA[A].priority;A++);fA.splice(A,0,a),A===0&&uv(a)}};var pv=t.version;if(pv!=="19.2.3")throw Error(n(527,pv,"19.2.3"));se.findDOMNode=function(a){var i=a._reactInternals;if(i===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=h(i),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var o6={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{jt=Kf.inject(o6),_t=Kf}catch{}}return Zu.createRoot=function(a,i){if(!o(a))throw Error(n(299));var A=!1,f="",C=N1,E=B1,ee=j1;return i!=null&&(i.unstable_strictMode===!0&&(A=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(ee=i.onRecoverableError)),i=av(a,1,!1,null,null,A,f,null,C,E,ee,mv),a[ca]=i.current,_x(a),new Vx(i)},Zu.hydrateRoot=function(a,i,A){if(!o(a))throw Error(n(299));var f=!1,C="",E=N1,ee=B1,ge=j1,ke=null;return A!=null&&(A.unstable_strictMode===!0&&(f=!0),A.identifierPrefix!==void 0&&(C=A.identifierPrefix),A.onUncaughtError!==void 0&&(E=A.onUncaughtError),A.onCaughtError!==void 0&&(ee=A.onCaughtError),A.onRecoverableError!==void 0&&(ge=A.onRecoverableError),A.formState!==void 0&&(ke=A.formState)),i=av(a,1,!0,i,A??null,f,C,ke,E,ee,ge,mv),i.context=nv(null),A=i.current,f=qn(),f=Jr(f),C=Ot(f),C.callback=null,$t(A,C,f),A=f,i.current.lanes=A,Et(i,A),Fo(i),a[ca]=i.current,_x(a),new Pf(i)},Zu.version="19.2.3",Zu}var kv;function G6(){if(kv)return Zx.exports;kv=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),Zx.exports=q6(),Zx.exports}var V6=G6();const W6=h6(V6);function X6(){return null}const Y6={};function m4(r,t){let s;try{s=r()}catch{return}return{getItem:o=>{var l;const d=u=>u===null?null:JSON.parse(u,void 0),c=(l=s.getItem(o))!=null?l:null;return c instanceof Promise?c.then(d):d(c)},setItem:(o,l)=>s.setItem(o,JSON.stringify(l,void 0)),removeItem:o=>s.removeItem(o)}}const Th=r=>t=>{try{const s=r(t);return s instanceof Promise?s:{then(n){return Th(n)(s)},catch(n){return this}}}catch(s){return{then(n){return this},catch(n){return Th(n)(s)}}}},J6=(r,t)=>(s,n,o)=>{let l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:B=>B,version:0,merge:(B,g)=>({...g,...B}),...t},d=!1;const c=new Set,u=new Set;let h;try{h=l.getStorage()}catch{}if(!h)return r((...B)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),s(...B)},n,o);const m=Th(l.serialize),x=()=>{const B=l.partialize({...n()});let g;const j=m({state:B,version:l.version}).then(_=>h.setItem(l.name,_)).catch(_=>{g=_});if(g)throw g;return j},y=o.setState;o.setState=(B,g)=>{y(B,g),x()};const p=r((...B)=>{s(...B),x()},n,o);let v;const N=()=>{var B;if(!h)return;d=!1,c.forEach(j=>j(n()));const g=((B=l.onRehydrateStorage)==null?void 0:B.call(l,n()))||void 0;return Th(h.getItem.bind(h))(l.name).then(j=>{if(j)return l.deserialize(j)}).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==l.version){if(l.migrate)return l.migrate(j.state,j.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return j.state}).then(j=>{var _;return v=l.merge(j,(_=n())!=null?_:p),s(v,!0),x()}).then(()=>{g?.(v,void 0),d=!0,u.forEach(j=>j(v))}).catch(j=>{g?.(void 0,j)})};return o.persist={setOptions:B=>{l={...l,...B},B.getStorage&&(h=B.getStorage())},clearStorage:()=>{h?.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>N(),hasHydrated:()=>d,onHydrate:B=>(c.add(B),()=>{c.delete(B)}),onFinishHydration:B=>(u.add(B),()=>{u.delete(B)})},N(),v||p},Z6=(r,t)=>(s,n,o)=>{let l={storage:m4(()=>localStorage),partialize:N=>N,version:0,merge:(N,B)=>({...B,...N}),...t},d=!1;const c=new Set,u=new Set;let h=l.storage;if(!h)return r((...N)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),s(...N)},n,o);const m=()=>{const N=l.partialize({...n()});return h.setItem(l.name,{state:N,version:l.version})},x=o.setState;o.setState=(N,B)=>{x(N,B),m()};const y=r((...N)=>{s(...N),m()},n,o);o.getInitialState=()=>y;let p;const v=()=>{var N,B;if(!h)return;d=!1,c.forEach(j=>{var _;return j((_=n())!=null?_:y)});const g=((B=l.onRehydrateStorage)==null?void 0:B.call(l,(N=n())!=null?N:y))||void 0;return Th(h.getItem.bind(h))(l.name).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==l.version){if(l.migrate)return[!0,l.migrate(j.state,j.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,j.state];return[!1,void 0]}).then(j=>{var _;const[w,L]=j;if(p=l.merge(L,(_=n())!=null?_:y),s(p,!0),w)return m()}).then(()=>{g?.(p,void 0),p=n(),d=!0,u.forEach(j=>j(p))}).catch(j=>{g?.(void 0,j)})};return o.persist={setOptions:N=>{l={...l,...N},N.storage&&(h=N.storage)},clearStorage:()=>{h?.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>v(),hasHydrated:()=>d,onHydrate:N=>(c.add(N),()=>{c.delete(N)}),onFinishHydration:N=>(u.add(N),()=>{u.delete(N)})},l.skipHydration||v(),p||y},$6=(r,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Y6?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),J6(r,t)):Z6(r,t),eS=$6,hu=g6()(eS(r=>({token:null,user:null,isAuthenticated:!1,setAuth:(t,s)=>r({token:t,user:s,isAuthenticated:!0}),clearAuth:()=>r({token:null,user:null,isAuthenticated:!1}),updateUser:t=>r({user:t})}),{name:"calypso-auth",storage:m4(()=>localStorage)})),ze=b6.create({baseURL:"/api/v1",headers:{"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}});ze.interceptors.request.use(r=>{const t=hu.getState().token;return t&&(r.headers.Authorization=`Bearer ${t}`),r},r=>Promise.reject(r));ze.interceptors.response.use(r=>r,r=>(r.response?.status===401&&(hu.getState().clearAuth(),window.location.href="/login"),Promise.reject(r)));const tS={login:async r=>(await ze.post("/auth/login",r)).data};function rS(){const r=Ph(),t=hu(m=>m.setAuth),[s,n]=Ce.useState(""),[o,l]=Ce.useState(""),[d,c]=Ce.useState(""),u=ft({mutationFn:tS.login,onSuccess:m=>{t(m.token,m.user),r("/")},onError:m=>{c(m.response?.data?.error||"Login failed")}}),h=m=>{m.preventDefault(),c(""),u.mutate({username:s,password:o})};return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px #111a22 inset !important;
-webkit-text-fill-color: #ffffff !important;
box-shadow: 0 0 0 30px #111a22 inset !important;
caret-color: #ffffff !important;
}
input:-webkit-autofill::first-line {
color: #ffffff !important;
}
`}),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background-dark",children:e.jsxs("div",{className:"max-w-md w-full space-y-8 p-8 bg-card-dark border border-border-dark rounded-lg shadow-md",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"mb-4",children:e.jsx("img",{src:"/logo.png",alt:"Calypso Logo",className:"w-16 h-16 object-contain"})}),e.jsx("h2",{className:"text-center text-3xl font-extrabold text-white",children:"Calypso"}),e.jsx("p",{className:"mt-1 text-center text-xs text-text-secondary",children:"Dev Release V.1"}),e.jsx("p",{className:"mt-2 text-center text-sm text-text-secondary",children:"Adastra Backup Storage Appliance"}),e.jsx("p",{className:"mt-4 text-center text-sm text-text-secondary",children:"Sign in to your account"})]}),e.jsxs("form",{className:"mt-8 space-y-6",onSubmit:h,children:[d&&e.jsx("div",{className:"rounded-md bg-red-500/10 border border-red-500/30 p-4",children:e.jsx("p",{className:"text-sm text-red-400 font-medium",children:d})}),e.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"username",className:"sr-only",children:"Username"}),e.jsx("input",{id:"username",name:"username",type:"text",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-border-dark bg-[#111a22] placeholder-text-secondary text-white rounded-t-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm autofill:bg-[#111a22] autofill:text-white",placeholder:"Username",value:s,onChange:m=>n(m.target.value),autoComplete:"username"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"sr-only",children:"Password"}),e.jsx("input",{id:"password",name:"password",type:"password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-border-dark bg-[#111a22] placeholder-text-secondary text-white rounded-b-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm autofill:bg-[#111a22] autofill:text-white",placeholder:"Password",value:o,onChange:m=>l(m.target.value),autoComplete:"current-password"})]})]}),e.jsx("div",{children:e.jsxs("button",{type:"submit",disabled:u.isPending,className:"relative group relative w-full flex justify-center py-2.5 px-4 border border-primary/30 bg-card-dark text-white text-sm font-bold rounded-lg hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsx("span",{className:"relative z-10 flex items-center gap-2",children:u.isPending?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"material-symbols-outlined text-[18px] animate-spin",children:"refresh"}),"Signing in..."]}):"Sign in"})]})})]})]})})]})}const Cc={listAlerts:async r=>(await ze.get("/monitoring/alerts",{params:r})).data,getAlert:async r=>(await ze.get(`/monitoring/alerts/${r}`)).data,acknowledgeAlert:async r=>{await ze.post(`/monitoring/alerts/${r}/acknowledge`)},resolveAlert:async r=>{await ze.post(`/monitoring/alerts/${r}/resolve`)},getMetrics:async()=>(await ze.get("/monitoring/metrics")).data},Xd={listDisks:async()=>(await ze.get("/storage/disks")).data.disks||[],syncDisks:async()=>(await ze.post("/storage/disks/sync")).data,listVolumeGroups:async()=>(await ze.get("/storage/volume-groups")).data.volume_groups||[],listRepositories:async()=>(await ze.get("/storage/repositories")).data.repositories||[],getRepository:async r=>(await ze.get(`/storage/repositories/${r}`)).data,createRepository:async r=>(await ze.post("/storage/repositories",r)).data,deleteRepository:async r=>{await ze.delete(`/storage/repositories/${r}`)}},sn={listPools:async()=>(await ze.get("/storage/zfs/pools")).data.pools||[],getPool:async r=>(await ze.get(`/storage/zfs/pools/${r}`)).data,createPool:async r=>(await ze.post("/storage/zfs/pools",r)).data,deletePool:async r=>{await ze.delete(`/storage/zfs/pools/${r}`)},addSpareDisk:async(r,t)=>{await ze.post(`/storage/zfs/pools/${r}/spare`,{disks:t})},listDatasets:async r=>(await ze.get(`/storage/zfs/pools/${r}/datasets`)).data.datasets||[],createDataset:async(r,t)=>(await ze.post(`/storage/zfs/pools/${r}/datasets`,t)).data,deleteDataset:async(r,t)=>{await ze.delete(`/storage/zfs/pools/${r}/datasets/${encodeURIComponent(t)}`)},getARCStats:async()=>(await ze.get("/storage/zfs/arc/stats")).data},$u={listSnapshots:async r=>{const t=r?`?dataset=${encodeURIComponent(r)}`:"";return(await ze.get(`/storage/zfs/snapshots${t}`)).data.snapshots||[]},createSnapshot:async r=>{await ze.post("/storage/zfs/snapshots",r)},deleteSnapshot:async(r,t)=>{const s=t?"?recursive=true":"";await ze.delete(`/storage/zfs/snapshots/${encodeURIComponent(r)}${s}`)},rollbackSnapshot:async(r,t)=>{await ze.post(`/storage/zfs/snapshots/${encodeURIComponent(r)}/rollback`,{force:t||!1})},cloneSnapshot:async(r,t)=>{await ze.post(`/storage/zfs/snapshots/${encodeURIComponent(r)}/clone`,t)}},eh={listSchedules:async()=>(await ze.get("/storage/zfs/snapshot-schedules")).data.schedules||[],getSchedule:async r=>(await ze.get(`/storage/zfs/snapshot-schedules/${r}`)).data,createSchedule:async r=>(await ze.post("/storage/zfs/snapshot-schedules",r)).data,updateSchedule:async(r,t)=>(await ze.put(`/storage/zfs/snapshot-schedules/${r}`,t)).data,deleteSchedule:async r=>{await ze.delete(`/storage/zfs/snapshot-schedules/${r}`)},toggleSchedule:async(r,t)=>{await ze.post(`/storage/zfs/snapshot-schedules/${r}/toggle`,{enabled:t})}},th={listTasks:async r=>{const t=r?`?direction=${r}`:"";return(await ze.get(`/storage/zfs/replication-tasks${t}`)).data.tasks||[]},getTask:async r=>(await ze.get(`/storage/zfs/replication-tasks/${r}`)).data,createTask:async r=>(await ze.post("/storage/zfs/replication-tasks",r)).data,updateTask:async(r,t)=>(await ze.put(`/storage/zfs/replication-tasks/${r}`,t)).data,deleteTask:async r=>{await ze.delete(`/storage/zfs/replication-tasks/${r}`)}},ao={listNetworkInterfaces:async()=>(await ze.get("/system/interfaces")).data.interfaces||[],updateNetworkInterface:async(r,t)=>(await ze.put(`/system/interfaces/${r}`,t)).data.interface,getNTPSettings:async()=>(await ze.get("/system/ntp")).data.settings,saveNTPSettings:async r=>{await ze.post("/system/ntp",r)},listServices:async()=>(await ze.get("/system/services")).data.services||[],restartService:async r=>{await ze.post(`/system/services/${r}/restart`)},getSystemLogs:async(r=30)=>(await ze.get(`/system/logs?limit=${r}`)).data.logs||[],getNetworkThroughput:async(r="5m")=>(await ze.get(`/system/network/throughput?duration=${r}`)).data.data||[],getManagementIPAddress:async()=>(await ze.get("/system/management-ip")).data.ip_address};function fr(r,t=2){if(r===0)return"0 Bytes";const s=1024,n=t<0?0:t,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],l=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,l)).toFixed(n))+" "+o[l]}function sS(r){const t=new Date,s=typeof r=="string"?new Date(r):r,n=Math.floor((t.getTime()-s.getTime())/1e3);return n<60?"just now":n<3600?`${Math.floor(n/60)} minutes ago`:n<86400?`${Math.floor(n/3600)} hours ago`:n<604800?`${Math.floor(n/86400)} days ago`:s.toLocaleDateString()}const tg=[{id:"1",name:"Daily Backup: VM-Cluster-01",type:"Replication",progress:45,speed:"145 MB/s",status:"running",eta:"1h 12m"},{id:"2",name:"ZFS Scrub: Pool-01",type:"Maintenance",progress:78,speed:"1.2 GB/s",status:"running"}];function aS(){const[r,t]=Ce.useState("jobs"),[s,n]=Ce.useState([]),o=5,{data:l=[],isLoading:d,refetch:c}=dt({queryKey:["system-logs"],queryFn:()=>ao.getSystemLogs(30),refetchInterval:600*1e3}),{data:u}=dt({queryKey:["health"],queryFn:async()=>(await ze.get("/health")).data,refetchInterval:o*1e3,staleTime:o*1e3*2,refetchOnWindowFocus:!1,refetchOnMount:!1,notifyOnChangeProps:["data","error"],structuralSharing:(M,V)=>JSON.stringify(M)===JSON.stringify(V)?M:V}),{data:h}=dt({queryKey:["metrics"],queryFn:Cc.getMetrics,refetchInterval:o*1e3,staleTime:o*1e3*2,refetchOnWindowFocus:!1,refetchOnMount:!1,notifyOnChangeProps:["data","error"],structuralSharing:(M,V)=>JSON.stringify(M)===JSON.stringify(V)?M:V}),{data:m}=dt({queryKey:["alerts","dashboard"],queryFn:()=>Cc.listAlerts({is_acknowledged:!1,limit:10}),refetchInterval:o*1e3,staleTime:o*1e3*2,refetchOnWindowFocus:!1,refetchOnMount:!1,notifyOnChangeProps:["data","error"],structuralSharing:(M,V)=>JSON.stringify(M)===JSON.stringify(V)?M:V}),{data:x=[]}=dt({queryKey:["storage","repositories"],queryFn:Xd.listRepositories,staleTime:60*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,notifyOnChangeProps:["data","error"],structuralSharing:(M,V)=>JSON.stringify(M)===JSON.stringify(V)?M:V}),{days:y,hours:p,minutes:v}=Ce.useMemo(()=>{const M=h?.system?.uptime_seconds||0;return{days:Math.floor(M/86400),hours:Math.floor(M%86400/3600),minutes:Math.floor(M%3600/60)}},[h?.system?.uptime_seconds]),{totalStorage:N,usedStorage:B,storagePercent:g}=Ce.useMemo(()=>{const M=Array.isArray(x)?x.reduce((ne,Z)=>ne+(Z?.size_bytes||0),0):0,V=Array.isArray(x)?x.reduce((ne,Z)=>ne+(Z?.used_bytes||0),0):0,T=M>0?V/M*100:0;return{totalStorage:M,usedStorage:V,storagePercent:T}},[x]),{data:j=[]}=dt({queryKey:["network-throughput"],queryFn:()=>ao.getNetworkThroughput("5m"),refetchInterval:5*1e3});Ce.useEffect(()=>{if(j.length>0){const M=j.slice(-30).map(V=>({time:V.time,inbound:Math.round(V.inbound),outbound:Math.round(V.outbound)}));n(M)}},[j]);const _=Ce.useMemo(()=>{if(s.length===0)return{inbound:0,outbound:0,total:0};const M=s[s.length-1];return{inbound:M.inbound,outbound:M.outbound,total:M.inbound+M.outbound}},[s]),w=Ce.useMemo(()=>s.length===0?0:Math.max(...s.map(M=>M.inbound+M.outbound)),[s]),{systemStatus:L,isHealthy:K}=Ce.useMemo(()=>{const M=u?.status==="healthy"?"System Healthy":"System Degraded",V=u?.status==="healthy";return{systemStatus:M,isHealthy:V}},[u?.status]);return e.jsxs("div",{className:"h-full bg-background-dark text-white",children:[e.jsx("header",{className:"flex-none px-6 py-5 border-b border-border-dark bg-background-dark/95 backdrop-blur z-10",children:e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-3 max-w-[1600px] mx-auto",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h2",{className:"text-white text-3xl font-black tracking-tight",children:"System Monitor"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Real-time telemetry, storage health, and system event logs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-card-dark rounded-lg border border-border-dark",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[K&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),!K&&e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-yellow-500"})]}),e.jsx("span",{className:`text-xs font-medium ${K?"text-emerald-400":"text-yellow-400"}`,children:L})]}),e.jsxs("button",{className:"flex items-center gap-2 h-10 px-4 bg-card-dark hover:bg-[#233648] border border-border-dark text-white text-sm font-bold rounded-lg transition-colors",children:[e.jsx(Cn,{className:"h-4 w-4"}),e.jsxs("span",{children:["Refresh: ",o,"s"]})]})]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6",children:e.jsxs("div",{className:"flex flex-col gap-6 max-w-[1600px] mx-auto pb-10",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"CPU Load"}),e.jsx(e4,{className:"text-text-secondary w-5 h-5"})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsxs("p",{className:"text-white text-3xl font-bold",children:[h?.system?.cpu_usage_percent?.toFixed(0)||0,"%"]}),e.jsxs("span",{className:"text-emerald-500 text-sm font-medium mb-1 flex items-center",children:[e.jsx(t4,{className:"w-4 h-4 mr-1"}),"2%"]})]}),e.jsx("div",{className:"h-1.5 w-full bg-[#233648] rounded-full mt-3 overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${h?.system?.cpu_usage_percent||0}%`}})})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"RAM Usage"}),e.jsx(r4,{className:"text-text-secondary w-5 h-5"})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsx("p",{className:"text-white text-3xl font-bold",children:fr(h?.system?.memory_used_bytes||0,1)}),e.jsxs("span",{className:"text-text-secondary text-xs mb-2",children:["/ ",fr(h?.system?.memory_total_bytes||0,1)]})]}),e.jsx("div",{className:"h-1.5 w-full bg-[#233648] rounded-full mt-3 overflow-hidden",children:e.jsx("div",{className:"h-full bg-emerald-500 rounded-full transition-all",style:{width:`${h?.system?.memory_usage_percent||0}%`}})})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Storage Status"}),e.jsx(su,{className:"text-emerald-500 w-5 h-5"})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsx("p",{className:"text-white text-3xl font-bold",children:"Online"}),e.jsx("span",{className:"text-text-secondary text-sm font-medium mb-1",children:"No Errors"})]}),e.jsxs("div",{className:"flex gap-1 mt-3",children:[e.jsx("div",{className:"h-1.5 flex-1 bg-emerald-500 rounded-l-full"}),e.jsx("div",{className:"h-1.5 flex-1 bg-emerald-500"}),e.jsx("div",{className:"h-1.5 flex-1 bg-emerald-500"}),e.jsx("div",{className:"h-1.5 flex-1 bg-emerald-500 rounded-r-full"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"System Uptime"}),e.jsx(Ec,{className:"text-text-secondary w-5 h-5"})]}),e.jsx("div",{className:"mt-1",children:e.jsxs("p",{className:"text-white text-3xl font-bold",children:[y,"d ",p,"h ",v,"m"]})}),e.jsx("p",{className:"text-text-secondary text-xs mt-3",children:"Last reboot: Manual Patching"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 flex flex-col gap-6",children:[e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Network Throughput"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Inbound vs Outbound (eth0)"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-white text-2xl font-bold leading-tight",children:[(_.total/1e3).toFixed(1)," Gbps"]}),e.jsxs("p",{className:"text-emerald-500 text-sm",children:["Peak: ",(w/1e3).toFixed(1)," Gbps"]})]})]}),e.jsx("div",{className:"h-[200px] w-full",children:e.jsx(Cl,{width:"100%",height:"100%",children:e.jsxs(ky,{data:s,margin:{top:5,right:10,left:0,bottom:0},children:[e.jsx(Nc,{strokeDasharray:"3 3",stroke:"#324d67",opacity:.3}),e.jsx(Bc,{dataKey:"time",stroke:"#92adc9",style:{fontSize:"11px"},tick:{fill:"#92adc9"}}),e.jsx(jc,{stroke:"#92adc9",style:{fontSize:"11px"},tick:{fill:"#92adc9"},label:{value:"Mbps",angle:-90,position:"insideLeft",fill:"#92adc9",style:{fontSize:"11px"}}}),e.jsx(Sl,{contentStyle:{backgroundColor:"#1a2632",border:"1px solid #324d67",borderRadius:"8px",color:"#fff"},labelStyle:{color:"#92adc9",fontSize:"12px"},itemStyle:{color:"#fff",fontSize:"12px"},formatter:M=>[`${M} Mbps`,""]}),e.jsx(Qh,{wrapperStyle:{fontSize:"12px",color:"#92adc9"},iconType:"line"}),e.jsx(Lh,{type:"monotone",dataKey:"inbound",stroke:"#137fec",strokeWidth:2,dot:!1,name:"Inbound",activeDot:{r:4}}),e.jsx(Lh,{type:"monotone",dataKey:"outbound",stroke:"#10b981",strokeWidth:2,dot:!1,name:"Outbound",activeDot:{r:4}})]})})})]}),e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Storage Capacity"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Repository usage"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-white text-2xl font-bold leading-tight",children:[g.toFixed(1),"%"]}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Target: <90%"})]})]}),e.jsx("div",{className:"h-[150px] w-full relative",children:e.jsx("div",{className:"w-full h-full bg-[#111a22] rounded flex items-center justify-center",children:e.jsx("div",{className:"w-full px-4",children:e.jsx("div",{className:"w-full bg-[#233648] h-2 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full rounded-full transition-all",style:{width:`${g}%`}})})})})})]})]}),e.jsx("div",{className:"flex flex-col gap-6",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 h-full shadow-sm flex flex-col",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Storage Overview"}),e.jsxs("span",{className:"bg-[#233648] text-white text-xs px-2 py-1 rounded border border-border-dark",children:[x?.length||0," Repos"]})]}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-border-dark",children:[e.jsxs("div",{className:"flex justify-between text-sm text-text-secondary",children:[e.jsx("span",{children:"Total Capacity"}),e.jsx("span",{className:"text-white font-bold",children:fr(N)})]}),e.jsx("div",{className:"w-full bg-[#233648] h-2 rounded-full mt-2 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full transition-all",style:{width:`${g}%`}})}),e.jsxs("div",{className:"flex justify-between text-xs text-text-secondary mt-1",children:[e.jsxs("span",{children:["Used: ",fr(B)]}),e.jsxs("span",{children:["Free: ",fr(N-B)]})]})]})]})})]}),e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-sm overflow-hidden flex flex-col h-[400px]",children:[e.jsxs("div",{className:"flex border-b border-border-dark bg-[#161f29]",children:[e.jsxs("button",{onClick:()=>t("jobs"),className:`px-6 py-4 text-sm font-bold transition-colors ${r==="jobs"?"text-primary border-b-2 border-primary bg-card-dark":"text-text-secondary hover:text-white"}`,children:["Active Jobs"," ",tg.length>0&&e.jsx("span",{className:"ml-2 bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs",children:tg.length})]}),e.jsx("button",{onClick:()=>t("logs"),className:`px-6 py-4 text-sm font-medium transition-colors ${r==="logs"?"text-primary border-b-2 border-primary bg-card-dark":"text-text-secondary hover:text-white"}`,children:"System Logs"}),e.jsx("button",{onClick:()=>t("alerts"),className:`px-6 py-4 text-sm font-medium transition-colors ${r==="alerts"?"text-primary border-b-2 border-primary bg-card-dark":"text-text-secondary hover:text-white"}`,children:"Alerts History"}),e.jsx("div",{className:"flex-1 flex justify-end items-center px-4",children:e.jsxs("div",{className:"relative",children:[e.jsx(Wm,{className:"absolute left-2 top-1.5 text-text-secondary w-4 h-4"}),e.jsx("input",{className:"bg-[#111a22] border border-border-dark rounded-md py-1 pl-8 pr-3 text-sm text-white focus:outline-none focus:border-primary w-48 transition-all",placeholder:"Search logs...",type:"text"})]})})]}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[r==="jobs"&&e.jsx("div",{className:"p-0",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-[#1a2632] text-xs uppercase text-text-secondary font-medium sticky top-0 z-10",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Job Name"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Type"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark w-1/3",children:"Progress"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Speed"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Status"})]})}),e.jsx("tbody",{className:"text-sm divide-y divide-border-dark",children:tg.map(M=>e.jsxs("tr",{className:"group hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4 font-medium text-white",children:M.name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.type}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-full bg-[#111a22] rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full rounded-full relative overflow-hidden",style:{width:`${M.progress}%`},children:e.jsx("div",{className:"absolute inset-0 bg-white/20 animate-pulse"})})}),e.jsxs("span",{className:"text-xs font-mono text-white",children:[M.progress,"%"]})]}),M.eta&&e.jsxs("p",{className:"text-[10px] text-text-secondary mt-1",children:["ETA: ",M.eta]})]}),e.jsx("td",{className:"px-6 py-4 text-text-secondary font-mono",children:M.speed}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-primary/20 text-primary",children:"Running"})})]},M.id))})]})}),r==="logs"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-6 py-2 bg-[#161f29] border-y border-border-dark flex items-center justify-between",children:[e.jsx("h4",{className:"text-xs uppercase text-text-secondary font-bold tracking-wider",children:"Recent System Events"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>c(),disabled:d,className:"text-xs text-primary hover:text-white transition-colors flex items-center gap-1 disabled:opacity-50",children:[e.jsx(Cn,{size:14,className:d?"animate-spin":""}),"Refresh"]}),e.jsx("button",{className:"text-xs text-primary hover:text-white transition-colors",children:"View All Logs"})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#111a22]",children:d?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("span",{className:"text-text-secondary",children:"Loading logs..."})}):l.length===0?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("span",{className:"text-text-secondary",children:"No logs available"})}):e.jsx("table",{className:"w-full text-left border-collapse",children:e.jsx("tbody",{className:"text-sm font-mono divide-y divide-border-dark/50",children:l.map((M,V)=>e.jsxs("tr",{className:"group hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-2 text-text-secondary w-32 whitespace-nowrap",children:M.time}),e.jsx("td",{className:"px-6 py-2 w-24",children:e.jsx("span",{className:M.level==="INFO"||M.level==="NOTICE"||M.level==="DEBUG"?"text-emerald-500":M.level==="WARN"?"text-yellow-500":"text-red-500",children:M.level})}),e.jsx("td",{className:"px-6 py-2 w-32 text-white",children:M.source}),e.jsx("td",{className:"px-6 py-2 text-text-secondary truncate max-w-lg",children:M.message})]},V))})})})]}),r==="alerts"&&e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#111a22] p-6",children:m?.alerts&&m.alerts.length>0?e.jsx("div",{className:"space-y-3",children:m.alerts.map(M=>e.jsx("div",{className:"bg-[#1a2632] border border-border-dark rounded-lg p-4 hover:bg-[#233648] transition-colors",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Eh,{className:`w-4 h-4 ${M.severity==="critical"?"text-red-500":M.severity==="warning"?"text-yellow-500":"text-blue-500"}`}),e.jsx("h4",{className:"text-white font-medium",children:M.title}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${M.severity==="critical"?"bg-red-500/20 text-red-400":M.severity==="warning"?"bg-yellow-500/20 text-yellow-400":"bg-blue-500/20 text-blue-400"}`,children:M.severity})]}),e.jsx("p",{className:"text-text-secondary text-sm",children:M.message}),e.jsx("p",{className:"text-text-secondary text-xs mt-2 font-mono",children:new Date(M.created_at).toLocaleString()})]})})},M.id))}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(su,{className:"w-12 h-12 text-emerald-500 mx-auto mb-4"}),e.jsx("p",{className:"text-text-secondary",children:"No alerts"})]})})]})]})]})})]})}function nS({poolId:r,onDeleteDataset:t,onCreateDataset:s}){const n=["storage","zfs","pools",r,"datasets"],{data:o=[],isLoading:l}=dt({queryKey:n,queryFn:()=>sn.listDatasets(r),refetchOnWindowFocus:!0,refetchOnMount:!0,staleTime:0,refetchInterval:1e3});return l?e.jsx("tr",{className:"bg-[#151d26]",children:e.jsx("td",{colSpan:7,className:"py-3 px-5 pl-10 text-white/60 text-xs",children:"Loading datasets..."})}):o.length===0?e.jsx("tr",{className:"bg-[#151d26]",children:e.jsx("td",{colSpan:7,className:"py-3 px-5 pl-10",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-white/60 text-xs",children:"No datasets found"}),e.jsxs("button",{onClick:d=>{d.stopPropagation(),s(r)},className:"px-3 py-1.5 bg-primary/20 hover:bg-primary/30 text-primary text-xs font-medium rounded-lg border border-primary/30 transition-colors flex items-center gap-1.5",title:"Create Dataset",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Create Dataset"]})]})})}):e.jsx(e.Fragment,{children:o.map(d=>{const c=d.quota>0?d.used_bytes/d.quota*100:d.available_bytes>0?d.used_bytes/(d.used_bytes+d.available_bytes)*100:0,u=d.name.includes("/")?d.name.split("/").slice(1).join("/"):d.name;return e.jsxs("tr",{className:"bg-[#151d26] hover:bg-[#1a242f] transition-colors",children:[e.jsx("td",{className:"py-3 px-5"}),e.jsx("td",{className:"py-3 px-5 pl-10",children:e.jsxs("div",{className:"flex items-center gap-3 relative before:content-[''] before:absolute before:-left-4 before:top-1/2 before:-translate-y-1/2 before:w-3 before:h-px before:bg-border-dark before:opacity-50",children:[e.jsx("span",{className:"material-symbols-outlined text-white/70 text-[18px]",children:d.type==="volume"?"storage":d.type==="snapshot"?"camera":"folder"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-medium text-white",children:u}),d.mount_point&&d.mount_point!=="none"&&d.mount_point!=="-"&&e.jsx("span",{className:"text-xs text-white/50",children:d.mount_point}),d.type==="volume"&&e.jsx("span",{className:"text-xs text-primary/70",children:"Volume (Block Device)"})]})]})}),e.jsx("td",{className:"py-3 px-5",children:e.jsx("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-bold ${d.type==="volume"?"bg-blue-500/20 text-blue-400 border border-blue-500/30":d.mount_point&&d.mount_point!=="none"&&d.mount_point!=="-"?"bg-emerald-500/20 text-emerald-400 border border-emerald-500/30":"bg-gray-500/20 text-gray-400 border border-gray-500/30"}`,children:d.type==="volume"?"VOLUME":d.mount_point&&d.mount_point!=="none"&&d.mount_point!=="-"?"MOUNTED":"UNMOUNTED"})}),e.jsx("td",{className:"py-3 px-5",children:e.jsxs("div",{className:"flex flex-col gap-1 w-32",children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"text-white font-medium",children:fr(d.used_bytes,1)}),e.jsx("span",{className:"text-white/80 font-medium",children:fr(d.available_bytes,1)})]}),e.jsx("div",{className:"w-full bg-[#233648] rounded-full h-1.5",children:e.jsx("div",{className:"h-1.5 rounded-full bg-primary",style:{width:`${Math.min(c,100)}%`}})})]})}),e.jsx("td",{className:"py-3 px-5 text-white/80 text-xs",children:d.quota>0?fr(d.quota,1):"Unlimited"}),e.jsx("td",{className:"py-3 px-5 text-white/80 text-xs",children:d.compression.toUpperCase()}),e.jsx("td",{className:"py-3 px-5 text-right",children:e.jsx("div",{className:"flex items-center gap-1 justify-end",children:e.jsx("button",{onClick:h=>{if(h.stopPropagation(),confirm(`Are you sure you want to delete dataset "${u}"? This action cannot be undone.`)){const m=d.name.includes("/")?d.name.split("/").slice(1).join("/"):d.name;t(r,m)}},className:"p-1 rounded-md hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors",title:"Delete dataset",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})})})]},d.name)})})}function iS(){const[r,t]=Ce.useState(new Set),[s,n]=Ce.useState(null),[o,l]=Ce.useState(""),[d,c]=Ce.useState(!1),[u,h]=Ce.useState(!1),[m,x]=Ce.useState(!1),[y,p]=Ce.useState(null),[v,N]=Ce.useState([]),[B,g]=Ce.useState(!1),[j,_]=Ce.useState({name:"",type:"filesystem",compression:"lz4",quota:"",reservation:"",mount_point:""}),[w,L]=Ce.useState({name:"",description:"",raid_level:"stripe",disks:[],compression:"lz4",deduplication:!1,auto_expand:!1}),K=Nr(),{data:M=[],isLoading:V}=dt({queryKey:["storage","disks"],queryFn:Xd.listDisks}),{data:T=[],isLoading:ne}=dt({queryKey:["storage","repositories"],queryFn:Xd.listRepositories}),{data:Z=[],isLoading:U}=dt({queryKey:["storage","zfs","pools"],queryFn:sn.listPools,refetchInterval:3e3,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:!0}),{data:q}=dt({queryKey:["storage","zfs","arc","stats"],queryFn:sn.getARCStats,refetchInterval:2e3,staleTime:0}),F=ft({mutationFn:Xd.syncDisks,onSuccess:async()=>{await K.invalidateQueries({queryKey:["storage","disks"]}),K.refetchQueries({queryKey:["storage","disks"]}),alert("Disk rescan completed!")},onError:G=>{console.error("Failed to rescan disks:",G),alert(G.response?.data?.error||"Failed to rescan disks")}}),le=ft({mutationFn:sn.createPool,onSuccess:async()=>{await K.invalidateQueries({queryKey:["storage","zfs","pools"]}),await K.refetchQueries({queryKey:["storage","zfs","pools"]}),await K.invalidateQueries({queryKey:["storage","disks"]}),c(!1),L({name:"",description:"",raid_level:"stripe",disks:[],compression:"lz4",deduplication:!1,auto_expand:!1}),alert("Pool created successfully!")},onError:G=>{console.error("Failed to create pool:",G),alert(G.response?.data?.error||"Failed to create pool")}}),ae=ft({mutationFn:({poolId:G,disks:me})=>sn.addSpareDisk(G,me),onSuccess:()=>{K.invalidateQueries({queryKey:["storage","zfs","pools"]}),K.invalidateQueries({queryKey:["storage","disks"]}),h(!1),N([]),alert("Spare disks added successfully!")},onError:G=>{console.error("Failed to add spare disks:",G),alert(G.response?.data?.error||"Failed to add spare disks")}}),se=ft({mutationFn:G=>sn.deletePool(G),onSuccess:async()=>{await K.invalidateQueries({queryKey:["storage","zfs","pools"]}),await K.refetchQueries({queryKey:["storage","zfs","pools"]}),await K.invalidateQueries({queryKey:["storage","disks"]}),n(null),alert("Pool destroyed successfully!")},onError:G=>{console.error("Failed to delete pool:",G),alert(G.response?.data?.error||"Failed to destroy pool")}}),fe=ft({mutationFn:({poolId:G,data:me})=>sn.createDataset(G,me),onSuccess:async(G,me)=>{t(be=>new Set(be).add(me.poolId)),x(!1),p(null),_({name:"",type:"filesystem",compression:"lz4",quota:"",reservation:"",mount_point:""}),K.invalidateQueries({queryKey:["storage","zfs","pools",me.poolId,"datasets"],exact:!0}),alert("Dataset created successfully!")},onError:G=>{console.error("Failed to create dataset:",G),alert(G.response?.data?.error||"Failed to create dataset")}}),ye=ft({mutationFn:({poolId:G,datasetName:me})=>sn.deleteDataset(G,me),onSuccess:async(G,me)=>{t(be=>new Set(be).add(me.poolId)),await K.invalidateQueries({queryKey:["storage","zfs","pools",me.poolId,"datasets"],exact:!0}),alert("Dataset deleted successfully!")},onError:G=>{console.error("Failed to delete dataset:",G),alert(G.response?.data?.error||"Failed to delete dataset")}}),_e=(G,me)=>{ye.mutate({poolId:G,datasetName:me})},xe=G=>{const me=Z.find(be=>be.id===G);me&&(p(me),x(!0))},D=[...Z,...T],$=D.reduce((G,me)=>G+(me.size_bytes||0),0),X=D.reduce((G,me)=>G+(me.used_bytes||0),0),te=$>0?X/$*100:0,J=D.filter(G=>{if("health_status"in G){const me=G.health_status?.toLowerCase()||"";return G.is_active&&me==="online"}return G.is_active}).length,H=D.filter(G=>{if("health_status"in G){const me=G.health_status?.toLowerCase()||"";return!G.is_active||me!=="online"}return!G.is_active}).length===0?"Optimal":"Degraded",re=Z.filter(G=>G.is_active&&G.health_status?.toLowerCase()==="online"),Ae=re.length>0?re.reduce((G,me)=>{if(me.compress_ratio&&me.compress_ratio>0){const He=me.deduplication?1.3:1;return G+me.compress_ratio*He}const Ue={lz4:1.5,zstd:2.5,gzip:2,"gzip-1":1.8,"gzip-9":2.5,off:1}[me.compression?.toLowerCase()||"lz4"]||1.5,Re=me.deduplication?1.3:1;return G+Ue*Re},0)/re.length:1,oe=re.some(G=>G.compression&&G.compression.toLowerCase()!=="off"),ce=re.some(G=>G.deduplication),Se=re.find(G=>G.compression&&G.compression.toLowerCase()!=="off")?.compression?.toUpperCase()||"LZ4",z=q?.hit_ratio??0,ie=q?.cache_usage??0,W=q?.cache_size??0,Q=q?.cache_max??0,I=G=>{const me=new Set(r);me.has(G)?me.delete(G):me.add(G),t(me)},k=D.filter(G=>G.name.toLowerCase().includes(o.toLowerCase()));return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background-dark",children:[e.jsx("header",{className:"flex-shrink-0 px-8 py-6 border-b border-border-dark bg-card-dark/50 backdrop-blur-sm z-10",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto w-full flex flex-col gap-4",children:[e.jsxs("nav",{className:"flex items-center text-sm font-medium text-text-secondary",children:[e.jsx(ba,{to:"/",className:"hover:text-primary transition-colors",children:"Home"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsx("span",{className:"text-white",children:"Storage Management"})]}),e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h1",{className:"text-3xl font-extrabold text-white tracking-tight",children:"Storage Pools"}),e.jsx("p",{className:"text-text-secondary",children:"Manage ZFS pools, datasets, and physical disks topology."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>F.mutate(),disabled:F.isPending,className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-border-dark bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-colors disabled:opacity-50",children:[e.jsx("span",{className:`material-symbols-outlined text-[20px] ${F.isPending?"animate-spin":""}`,children:"refresh"}),F.isPending?"Rescanning...":"Rescan Disks"]}),e.jsxs("button",{onClick:async()=>{g(!0);try{await K.invalidateQueries({queryKey:["storage","zfs","pools"]}),await K.refetchQueries({queryKey:["storage","zfs","pools"]}),await new Promise(G=>setTimeout(G,300)),alert("Pools refreshed successfully!")}catch(G){console.error("Failed to refresh pools:",G),alert("Failed to refresh pools. Please try again.")}finally{g(!1)}},disabled:U||B,className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-border-dark bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh pools list from database",children:[e.jsx("span",{className:`material-symbols-outlined text-[20px] ${U||B?"animate-spin":""}`,children:"sync"}),U||B?"Refreshing...":"Refresh Pools"]}),e.jsxs("button",{onClick:()=>c(!0),className:"relative flex items-center gap-2 px-4 py-2 rounded-lg border border-primary/30 bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsxs("span",{className:"relative flex items-center gap-2 z-10",children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"add_circle"}),"Create Pool"]})]})]})]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-8 custom-scrollbar",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto w-full flex flex-col gap-8 pb-10",children:[e.jsxs("section",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-card-dark p-5 rounded-xl border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("p",{className:"text-text-secondary text-sm font-semibold uppercase tracking-wider",children:"Total Capacity"}),e.jsx("span",{className:"material-symbols-outlined text-text-secondary",children:"database"})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("h3",{className:"text-2xl font-bold text-white",children:fr($,1)}),e.jsx("span",{className:"text-xs text-text-secondary",children:"Raw"})]}),e.jsx("div",{className:"mt-3 w-full bg-[#233648] rounded-full h-1.5 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-1.5 rounded-full",style:{width:`${Math.min(te,100)}%`}})}),e.jsxs("p",{className:"mt-2 text-xs text-text-secondary",children:[te.toFixed(0),"% Used (",fr(X,1),")"]})]}),e.jsxs("div",{className:"bg-card-dark p-5 rounded-xl border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("p",{className:"text-white/70 text-sm font-semibold uppercase tracking-wider",children:"Health Status"}),e.jsx("span",{className:`material-symbols-outlined ${H==="Optimal"?"text-emerald-500":"text-orange-500"}`,children:H==="Optimal"?"check_circle":"warning"})]}),e.jsx("div",{className:"flex items-baseline gap-2",children:e.jsx("h3",{className:`text-2xl font-bold ${H==="Optimal"?"text-emerald-500":"text-orange-500"}`,children:H})}),e.jsxs("p",{className:"mt-2 text-xs text-white/80",children:[J," pool",J!==1?"s":""," online"]}),H==="Optimal"&&e.jsx("p",{className:"text-xs text-emerald-500 mt-1 font-medium",children:"Last scrub: N/A"})]}),e.jsxs("div",{className:"bg-card-dark p-5 rounded-xl border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("p",{className:"text-white/70 text-sm font-semibold uppercase tracking-wider",children:"Efficiency"}),e.jsx("span",{className:"material-symbols-outlined text-white/70",children:"compress"})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("h3",{className:"text-2xl font-bold text-white",children:[Ae,"x"]}),e.jsx("span",{className:"text-xs text-white/70",children:"Ratio"})]}),e.jsxs("div",{className:"flex gap-2 mt-3",children:[oe&&e.jsx("span",{className:"px-2 py-0.5 rounded bg-blue-500/10 text-blue-500 text-[10px] font-bold",children:Se}),ce&&e.jsx("span",{className:"px-2 py-0.5 rounded bg-purple-500/10 text-purple-500 text-[10px] font-bold",children:"DEDUP ON"}),!oe&&!ce&&e.jsx("span",{className:"px-2 py-0.5 rounded bg-gray-500/10 text-gray-500 text-[10px] font-bold",children:"NO COMPRESSION"})]})]}),e.jsxs("div",{className:"bg-card-dark p-5 rounded-xl border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("p",{className:"text-white/70 text-sm font-semibold uppercase tracking-wider",children:"ARC Hit Ratio"}),e.jsx("span",{className:"material-symbols-outlined text-white/70",children:"memory"})]}),e.jsx("div",{className:"flex items-baseline gap-2",children:e.jsxs("h3",{className:"text-2xl font-bold text-white",children:[z.toFixed(1),"%"]})}),e.jsxs("p",{className:"mt-2 text-xs text-white/80",children:["Cache Usage: ",Q>0?`${fr(W,1)} / ${fr(Q,1)} (${ie.toFixed(1)}%)`:"N/A"]}),e.jsxs("div",{className:"mt-2 flex gap-1",children:[e.jsx("div",{className:"h-1 flex-1 bg-emerald-500 rounded-full"}),e.jsx("div",{className:"h-1 flex-1 bg-emerald-500 rounded-full"}),e.jsx("div",{className:"h-1 flex-1 bg-emerald-500 rounded-full"}),e.jsx("div",{className:"h-1 flex-1 bg-emerald-500/30 rounded-full"})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Active Pools"}),e.jsx("div",{className:"flex gap-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-white/70 text-[20px]",children:"search"}),e.jsx("input",{className:"pl-10 pr-4 py-1.5 bg-[#233648] border border-border-dark rounded-lg text-sm text-white focus:ring-2 focus:ring-primary focus:border-transparent outline-none w-64 placeholder-white/50",placeholder:"Search datasets...",type:"text",value:o,onChange:G=>l(G.target.value)})]})})]}),e.jsxs("div",{className:"bg-card-dark rounded-xl border border-border-dark overflow-hidden shadow-sm",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#1e2832] border-b border-border-dark",children:[e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70 w-10"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70",children:"Name"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70",children:"Status"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70",children:"Used / Avail"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70",children:"Topology"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70",children:"Compression"}),e.jsx("th",{className:"py-3 px-5 text-xs font-semibold uppercase tracking-wider text-white/70 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:ne||U?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"py-8 px-5 text-center text-white/80",children:"Loading pools..."})}):k.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"py-8 px-5 text-center text-white/80",children:"No pools found"})}):k.map(G=>{const me=r.has(G.id),be=G.size_bytes>0?G.used_bytes/G.size_bytes*100:0,Ue=G.size_bytes-G.used_bytes,Re="raid_level"in G,He=Re&&G.health_status?.toLowerCase()||"online",Ve=G.is_active&&(He==="online"||He===""),it=Ve?"bg-emerald-500/20 text-emerald-400 border-emerald-500/30":"bg-orange-500/20 text-orange-400 border-orange-500/30";return e.jsxs($B.Fragment,{children:[e.jsxs("tr",{className:"group hover:bg-white/5 transition-colors cursor-pointer",onClick:()=>I(G.id),children:[e.jsx("td",{className:"py-4 px-5",children:e.jsx("span",{className:`material-symbols-outlined text-[20px] text-white transition-transform ${me?"rotate-90":""}`,children:"arrow_right"})}),e.jsx("td",{className:"py-4 px-5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`material-symbols-outlined ${Ve?"text-primary":"text-orange-500"}`,children:Ve?"dns":"warning"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-bold text-white block",children:G.name}),e.jsx("span",{className:"text-xs text-white/70",children:Re?`ZFS ${G.raid_level.toUpperCase()}`:G.mount_point||"Not mounted"})]})]})}),e.jsx("td",{className:"py-4 px-5",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold border ${it}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${Ve?"bg-emerald-500":"bg-orange-500 animate-pulse"}`}),Re?He.toUpperCase():Ve?"ONLINE":"DEGRADED"]})}),e.jsx("td",{className:"py-4 px-5",children:e.jsxs("div",{className:"flex flex-col gap-1 w-32",children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"text-white font-medium",children:fr(G.used_bytes,1)}),e.jsx("span",{className:"text-white/80 font-medium",children:fr(Ue,1)})]}),e.jsx("div",{className:"w-full bg-[#233648] rounded-full h-1.5",children:e.jsx("div",{className:`h-1.5 rounded-full ${Ve?"bg-primary":"bg-orange-500"}`,style:{width:`${Math.min(be,100)}%`}})})]})}),e.jsx("td",{className:"py-4 px-5 text-white",children:Re?`${G.raid_level.toUpperCase()} (${G.disks.length} disks)`:G.volume_group||"N/A"}),e.jsx("td",{className:"py-4 px-5 text-white",children:Re?G.compression.toUpperCase():G.filesystem_type||"LZ4"}),e.jsx("td",{className:"py-4 px-5 text-right",children:e.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[Re&&e.jsx("button",{className:"p-1.5 rounded-md hover:bg-primary/20 text-primary hover:text-primary transition-colors",onClick:lt=>{lt.stopPropagation(),p(G),x(!0)},title:"Create Dataset",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"add"})}),e.jsx("button",{className:"p-1.5 rounded-md hover:bg-[#233648] text-white transition-colors",onClick:lt=>{lt.stopPropagation(),n(G)},children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"more_vert"})})]})})]}),me&&Re&&e.jsx(nS,{poolId:G.id,onDeleteDataset:_e,onCreateDataset:xe})]},G.id)})})]})}),e.jsxs("div",{className:"bg-[#1e2832] px-5 py-3 border-t border-border-dark flex justify-between items-center text-xs text-white/80",children:[e.jsxs("span",{children:["Showing ",k.length," active pool",k.length!==1?"s":""]}),e.jsx("button",{className:"hover:text-primary font-medium text-white/80",children:"View Archived Pools"})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Physical Disks"}),e.jsx("button",{className:"text-primary text-sm font-bold hover:underline",children:"View All Disks"})]}),V?e.jsx("div",{className:"text-center py-8 text-white/80",children:"Loading disks..."}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:M.map(G=>{const me=G.health_status==="healthy"||G.health_status==="online",be=G.health_status==="faulted"||G.health_status==="error",Ue=G.is_used?66:0;return e.jsxs("div",{className:`bg-card-dark rounded-lg p-4 border ${be?"border-red-500/30 bg-red-900/10 hover:border-red-500":"border-border-dark hover:border-primary/50"} flex flex-col gap-3 transition-colors group cursor-pointer relative overflow-hidden`,children:[e.jsx("div",{className:"absolute top-0 right-0 p-2",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${be?"bg-red-500 animate-pulse":me?"bg-emerald-500":"bg-blue-500"}`})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded ${be?"bg-red-100 dark:bg-red-900/20":"bg-[#233648]"} flex items-center justify-center`,children:e.jsx("span",{className:`material-symbols-outlined ${be?"text-red-500 group-hover:text-red-400":"text-white/70 group-hover:text-primary"} transition-colors`,children:be?"error":"hard_drive"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:G.device_path}),e.jsx("span",{className:`text-xs ${be?"text-red-500 font-bold":"text-white"}`,children:be?"FAULTED":`Slot ${G.id.slice(-1)}`})]})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex justify-between text-xs text-text-secondary",children:[e.jsxs("span",{children:[G.vendor||"Unknown"," ",G.model||""]}),e.jsx("span",{children:fr(G.size_bytes,1)})]}),G.attached_to_pool&&e.jsxs("div",{className:"text-xs text-primary font-medium",children:["Attached to pool: ",G.attached_to_pool]}),e.jsxs("div",{className:"flex gap-0.5 h-1.5 w-full rounded-full overflow-hidden bg-[#233648]",children:[e.jsx("div",{className:`${be?"bg-red-500 opacity-50":"bg-primary"}`,style:{width:`${Ue}%`}}),e.jsx("div",{className:"bg-transparent flex-1"})]}),e.jsxs("div",{className:"flex flex-col gap-0.5 mt-1",children:[e.jsx("span",{className:`text-[10px] font-medium ${be?"text-red-400":"text-emerald-400"}`,children:be?"FAULTED":"Healthy"}),e.jsx("span",{className:`text-[10px] ${G.is_used||G.attached_to_pool?"text-primary":"text-white/60"}`,children:G.is_used||G.attached_to_pool?"Provisioned":"Unprovisioned"})]})]})]},G.id)})})]})]})}),s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-30",onClick:()=>n(null)}),e.jsxs("div",{className:"fixed inset-y-0 right-0 w-96 bg-card-dark border-l border-border-dark shadow-2xl z-40 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("h3",{className:"text-lg font-bold text-white",children:[s.name," Properties"]}),e.jsx("button",{onClick:()=>n(null),className:"text-white/80 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined text-[24px]",children:"close"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 flex flex-col gap-6 custom-scrollbar",children:[e.jsxs("div",{className:"p-4 rounded-lg bg-primary/10 border border-primary/20",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"info"}),e.jsx("span",{className:"text-sm font-bold text-primary",children:s.is_active&&s.health_status?.toLowerCase()==="online"?"Healthy":"Degraded"})]}),e.jsx("p",{className:"text-xs text-white/90 leading-relaxed mb-3",children:s.is_active&&s.health_status?.toLowerCase()==="online"?"This pool is operating normally.":"This pool has issues and requires attention."}),e.jsxs("div",{className:"mt-3 space-y-1.5 text-xs",children:[e.jsxs("p",{className:"text-white/80",children:["RAID Level: ",e.jsx("span",{className:"font-bold text-white ml-1",children:s.raid_level.toUpperCase()})]}),e.jsxs("p",{className:"text-white/80",children:["Data Disks: ",e.jsx("span",{className:"font-bold text-white ml-1",children:s.disks.length}),e.jsxs("span",{className:"text-white/60 ml-1",children:["(",s.disks.join(", "),")"]})]}),s.spare_disks&&s.spare_disks.length>0&&e.jsxs("p",{className:"text-white/80",children:["Spare Disks: ",e.jsx("span",{className:"font-bold text-white ml-1",children:s.spare_disks.length}),e.jsxs("span",{className:"text-white/60 ml-1",children:["(",s.spare_disks.join(", "),")"]})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Compression Level"}),e.jsxs("select",{defaultValue:s.compression,className:"w-full bg-[#233648] border border-border-dark rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"lz4",children:"LZ4 (Recommended)"}),e.jsx("option",{value:"zstd",children:"ZSTD"}),e.jsx("option",{value:"gzip",children:"GZIP"})]}),e.jsx("p",{className:"text-xs text-white/70 leading-relaxed",children:"Balances performance and storage efficiency."})]}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-border-dark pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Deduplication"}),e.jsx("button",{className:`w-11 h-6 rounded-full relative transition-colors focus:outline-none focus:ring-2 focus:ring-primary ${s.deduplication?"bg-primary":"bg-[#233648]"}`,children:e.jsx("span",{className:`absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform ${s.deduplication?"transform translate-x-5":"transform translate-x-0"}`})})]}),e.jsx("p",{className:"text-xs text-white/70 leading-relaxed",children:"Requires significant RAM. Use with caution."})]}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-border-dark pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Auto-Expand"}),e.jsx("button",{className:`w-11 h-6 rounded-full relative transition-colors focus:outline-none focus:ring-2 focus:ring-primary ${s.auto_expand?"bg-primary":"bg-[#233648]"}`,children:e.jsx("span",{className:`absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform ${s.auto_expand?"transform translate-x-5":"transform translate-x-0"}`})})]}),e.jsx("p",{className:"text-xs text-white/70 leading-relaxed",children:"Automatically grow pool when larger disks are added."})]}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-border-dark pt-4",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Scrub Interval"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{className:"w-20 bg-[#233648] border border-border-dark rounded-lg px-3 py-2 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",type:"number",defaultValue:s.scrub_interval}),e.jsx("span",{className:"text-sm text-white/80 font-medium",children:"days"})]}),e.jsx("p",{className:"text-xs text-white/70 leading-relaxed",children:"Data integrity check interval."})]}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-border-dark pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Spare Disks"}),e.jsxs("button",{onClick:()=>{h(!0),N([])},className:"px-3 py-1.5 text-xs font-bold text-primary border border-primary/30 rounded-lg hover:bg-primary/10 transition-colors flex items-center gap-1.5",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Spare"]})]}),e.jsx("p",{className:"text-xs text-white/70 leading-relaxed",children:"Spare disks are automatically used to replace failed disks in the pool."}),s.spare_disks&&s.spare_disks.length>0&&e.jsx("div",{className:"mt-2 space-y-1",children:s.spare_disks.map(G=>e.jsxs("div",{className:"flex items-center gap-2 text-xs text-white/80 bg-[#233648] px-2 py-1 rounded",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"hard_drive"}),e.jsx("span",{children:G})]},G))})]})]})]}),e.jsxs("div",{className:"p-6 border-t border-border-dark bg-[#1e2832] flex gap-3",children:[e.jsxs("button",{className:"relative flex-1 px-4 py-2 rounded-lg border border-primary/30 bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2 z-10",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"save"}),"Save Changes"]})]}),e.jsx("button",{onClick:()=>n(null),className:"px-4 py-2 bg-card-dark border border-border-dark text-white text-sm font-bold rounded-lg hover:bg-[#233648] transition-colors",children:"Cancel"})]}),e.jsx("div",{className:"p-6 pt-0 bg-[#1e2832]",children:e.jsxs("button",{onClick:()=>{s&&confirm(`Are you sure you want to destroy pool "${s.name}"? This action cannot be undone and will delete all data in the pool.`)&&se.mutate(s.id)},disabled:se.isPending||!s,className:"w-full px-4 py-2 border border-red-500/30 text-red-500 hover:bg-red-500/10 text-sm font-bold rounded-lg transition-colors flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:se.isPending?"hourglass_empty":"delete"}),se.isPending?"Destroying...":"Export / Destroy Pool"]})})]})]}),d&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create ZFS Pool"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Create a new ZFS pool from available physical disks"})]}),e.jsx("button",{onClick:()=>c(!1),className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined text-[24px]",children:"close"})})]}),e.jsxs("form",{onSubmit:G=>{if(G.preventDefault(),!w.name||w.disks.length===0){alert("Please fill in all required fields and select at least one disk");return}const me={stripe:1,mirror:2,raidz:3,raidz2:4,raidz3:5};if(w.disks.length<me[w.raid_level]){alert(`RAID level ${w.raid_level} requires at least ${me[w.raid_level]} disk(s)`);return}if(w.raid_level==="mirror"&&w.disks.length%2!==0){alert("Mirror RAID requires an even number of disks");return}le.mutate({name:w.name,description:w.description||void 0,raid_level:w.raid_level,disks:w.disks,compression:w.compression,deduplication:w.deduplication,auto_expand:w.auto_expand})},className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:["Pool Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:w.name,onChange:G=>L({...w,name:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",placeholder:"e.g., backup-pool-01"}),e.jsx("p",{className:"text-xs text-white/70",children:"Unique name for the ZFS pool"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Description"}),e.jsx("textarea",{value:w.description,onChange:G=>L({...w,description:G.target.value}),rows:2,className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none resize-none",placeholder:"Optional description for this pool"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:["RAID Level ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{required:!0,value:w.raid_level,onChange:G=>L({...w,raid_level:G.target.value,disks:[]}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white focus:ring-2 focus:ring-primary focus:border-transparent outline-none",children:[e.jsx("option",{value:"stripe",children:"Stripe (No redundancy, 1+ disks)"}),e.jsx("option",{value:"mirror",children:"Mirror (2+ disks, even number)"}),e.jsx("option",{value:"raidz",children:"RAIDZ (3+ disks, single parity)"}),e.jsx("option",{value:"raidz2",children:"RAIDZ2 (4+ disks, double parity)"}),e.jsx("option",{value:"raidz3",children:"RAIDZ3 (5+ disks, triple parity)"})]}),e.jsxs("p",{className:"text-xs text-white/70",children:[w.raid_level==="stripe"&&"No redundancy, maximum capacity",w.raid_level==="mirror"&&"50% capacity, full redundancy",w.raid_level==="raidz"&&"Single parity, good balance",w.raid_level==="raidz2"&&"Double parity, high reliability",w.raid_level==="raidz3"&&"Triple parity, maximum reliability"]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:["Select Disks ",e.jsx("span",{className:"text-red-500",children:"*"})]}),V?e.jsx("div",{className:"text-sm text-white/70",children:"Loading disks..."}):e.jsx("div",{className:"max-h-48 overflow-y-auto custom-scrollbar border border-border-dark rounded-lg bg-[#233648] p-3 space-y-2",children:M.filter(G=>!G.is_used).length===0?e.jsx("div",{className:"text-sm text-orange-400 bg-orange-500/10 border border-orange-500/30 rounded-lg p-3",children:"No available disks. All disks are in use."}):M.filter(G=>!G.is_used).map(G=>e.jsxs("label",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-[#1e2832] cursor-pointer transition-colors",children:[e.jsx("input",{type:"checkbox",checked:w.disks.includes(G.device_path),onChange:me=>{me.target.checked?L({...w,disks:[...w.disks,G.device_path]}):L({...w,disks:w.disks.filter(be=>be!==G.device_path)})},className:"w-4 h-4 text-primary bg-[#233648] border-border-dark rounded focus:ring-primary"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm font-medium text-white",children:G.device_path}),e.jsxs("div",{className:"text-xs text-white/70",children:[G.vendor||"Unknown"," ",G.model||""," • ",fr(G.size_bytes,1)]})]})]},G.id))}),e.jsxs("p",{className:"text-xs text-white/70",children:["Selected: ",w.disks.length," disk(s). Minimum: ",w.raid_level==="stripe"?1:w.raid_level==="mirror"?2:w.raid_level==="raidz"?3:w.raid_level==="raidz2"?4:5]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Compression"}),e.jsxs("select",{value:w.compression,onChange:G=>L({...w,compression:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white focus:ring-2 focus:ring-primary focus:border-transparent outline-none",children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"lz4",children:"LZ4 (Recommended)"}),e.jsx("option",{value:"zstd",children:"ZSTD"}),e.jsx("option",{value:"gzip",children:"GZIP"})]}),e.jsx("p",{className:"text-xs text-white/70",children:"LZ4 provides good compression with minimal CPU overhead"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Deduplication"}),e.jsx("button",{type:"button",onClick:()=>L({...w,deduplication:!w.deduplication}),className:`w-11 h-6 rounded-full relative transition-colors focus:outline-none focus:ring-2 focus:ring-primary ${w.deduplication?"bg-primary":"bg-[#233648]"}`,children:e.jsx("span",{className:`absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform ${w.deduplication?"transform translate-x-5":"transform translate-x-0"}`})})]}),e.jsx("p",{className:"text-xs text-white/70",children:"Requires significant RAM. Use with caution."})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Auto-Expand"}),e.jsx("button",{type:"button",onClick:()=>L({...w,auto_expand:!w.auto_expand}),className:`w-11 h-6 rounded-full relative transition-colors focus:outline-none focus:ring-2 focus:ring-primary ${w.auto_expand?"bg-primary":"bg-[#233648]"}`,children:e.jsx("span",{className:`absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform ${w.auto_expand?"transform translate-x-5":"transform translate-x-0"}`})})]}),e.jsx("p",{className:"text-xs text-white/70",children:"Automatically grow pool when larger disks are added"})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:()=>c(!1),className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-border-dark bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsxs("button",{type:"submit",disabled:le.isPending||M.filter(G=>!G.is_used).length===0||w.disks.length===0,className:"relative flex items-center gap-2 px-4 py-2 rounded-lg border border-primary/30 bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsx("span",{className:"relative flex items-center gap-2 z-10",children:le.isPending?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"material-symbols-outlined text-[20px] animate-spin",children:"refresh"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"add_circle"}),"Create ZFS Pool"]})})]})]})]})]})}),m&&y&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create Dataset"}),e.jsxs("p",{className:"text-sm text-text-secondary mt-1",children:["Create a new dataset in pool: ",y.name]})]}),e.jsx("button",{onClick:()=>{x(!1),p(null),_({name:"",type:"filesystem",compression:"lz4",quota:"",reservation:"",mount_point:""})},className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined text-[24px]",children:"close"})})]}),e.jsxs("form",{onSubmit:G=>{if(G.preventDefault(),!j.name){alert("Please enter a dataset name");return}if(j.type==="volume"&&(!j.quota||parseFloat(j.quota)<=0)){alert("Volume size (quota) is required and must be greater than 0");return}fe.mutate({poolId:y.id,data:{name:j.name,type:j.type,compression:j.compression||"lz4",quota:j.quota?parseInt(j.quota)*1024*1024*1024:-1,reservation:j.reservation?parseInt(j.reservation)*1024*1024*1024:0,mount_point:j.mount_point||void 0}})},className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:["Dataset Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:j.name,onChange:G=>_({...j,name:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",placeholder:"e.g., backup-data"}),e.jsxs("p",{className:"text-xs text-white/70",children:["Dataset will be created as: ",y.name,"/",j.name||"dataset-name"]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:["Type ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{required:!0,value:j.type,onChange:G=>_({...j,type:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white focus:ring-2 focus:ring-primary focus:border-transparent outline-none",children:[e.jsx("option",{value:"filesystem",children:"Filesystem"}),e.jsx("option",{value:"volume",children:"Volume (Block Device)"})]}),e.jsx("p",{className:"text-xs text-white/70",children:j.type==="filesystem"?"A filesystem dataset that can be mounted and used like a directory":"A volume that appears as a block device (like /dev/zvol/...)"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Compression"}),e.jsxs("select",{value:j.compression,onChange:G=>_({...j,compression:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white focus:ring-2 focus:ring-primary focus:border-transparent outline-none",children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"lz4",children:"LZ4 (Recommended)"}),e.jsx("option",{value:"zstd",children:"ZSTD"}),e.jsx("option",{value:"gzip",children:"GZIP"})]}),e.jsx("p",{className:"text-xs text-white/70",children:"LZ4 provides good compression with minimal CPU overhead"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-medium text-white",children:[j.type==="volume"?"Volume Size (GB)":"Quota (GB)"," ",j.type==="volume"&&e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"number",required:j.type==="volume",value:j.quota,onChange:G=>_({...j,quota:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",placeholder:j.type==="volume"?"e.g., 100":"Leave empty for unlimited",min:"1"}),e.jsx("p",{className:"text-xs text-white/70",children:j.type==="volume"?"Size of the volume in GB (required for volumes)":"Maximum space this filesystem can use. Leave empty for unlimited."})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Reservation (GB)"}),e.jsx("input",{type:"number",value:j.reservation,onChange:G=>_({...j,reservation:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",placeholder:"Leave empty for none",min:"0"}),e.jsx("p",{className:"text-xs text-white/70",children:"Guaranteed space reserved for this dataset"})]}),j.type==="filesystem"&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-white",children:"Mount Point"}),e.jsx("input",{type:"text",value:j.mount_point,onChange:G=>_({...j,mount_point:G.target.value}),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2.5 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-primary focus:border-transparent outline-none",placeholder:"e.g., /mnt/backup-data (optional)"}),e.jsx("p",{className:"text-xs text-white/70",children:"Optional mount point. Leave empty for default location."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:()=>{x(!1),p(null),_({name:"",type:"filesystem",compression:"lz4",quota:"",reservation:"",mount_point:""})},className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-border-dark bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsxs("button",{type:"submit",disabled:fe.isPending,className:"relative flex items-center gap-2 px-4 py-2 rounded-lg border border-primary/30 bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsx("span",{className:"relative flex items-center gap-2 z-10",children:fe.isPending?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"material-symbols-outlined text-[18px] animate-spin",children:"refresh"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"add_circle"}),"Create Dataset"]})})]})]})]})]})}),u&&s&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Add Spare Disks"}),e.jsxs("p",{className:"text-sm text-text-secondary mt-1",children:["Add spare disks to pool: ",s.name]})]}),e.jsx("button",{onClick:()=>{h(!1),N([])},className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined text-[24px]",children:"close"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"p-4 rounded-lg bg-primary/10 border border-primary/20",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"info"}),e.jsx("span",{className:"text-sm font-bold text-primary",children:"About Spare Disks"})]}),e.jsx("p",{className:"text-xs text-white/90 leading-relaxed",children:"Spare disks are automatically used to replace failed disks in the pool. They provide redundancy and help maintain pool health without manual intervention."})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"text-sm font-semibold text-white",children:["Select Spare Disks ",e.jsx("span",{className:"text-red-500",children:"*"})]}),V?e.jsx("div",{className:"text-sm text-white/70",children:"Loading disks..."}):M.filter(G=>!G.is_used).length===0?e.jsx("div",{className:"text-sm text-orange-400 bg-orange-500/10 border border-orange-500/30 rounded-lg p-3",children:"No available disks found. Please ensure disks are connected and rescanned."}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto custom-scrollbar",children:M.filter(G=>!G.is_used).map(G=>e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border cursor-pointer transition-colors ${v.includes(G.device_path)?"bg-primary/20 border-primary text-white":"bg-[#233648] border-border-dark text-white/80 hover:bg-[#2a3e50]"}`,onClick:()=>{N(me=>me.includes(G.device_path)?me.filter(be=>be!==G.device_path):[...me,G.device_path])},children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:v.includes(G.device_path),onChange:()=>{N(me=>me.includes(G.device_path)?me.filter(be=>be!==G.device_path):[...me,G.device_path])},className:"form-checkbox h-4 w-4 text-primary rounded border-gray-300 focus:ring-primary bg-transparent"}),e.jsx("span",{className:"text-sm font-medium",children:G.device_path})]}),e.jsx("span",{className:"text-xs text-white/70",children:fr(G.size_bytes,1)})]},G.id))}),e.jsxs("p",{className:"text-xs text-white/70",children:["Selected: ",v.length," disk(s)"]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:()=>{h(!1),N([])},className:"px-4 py-2 rounded-lg border border-border-dark bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:()=>{if(v.length===0){alert("Please select at least one disk");return}ae.mutate({poolId:s.id,disks:v})},disabled:ae.isPending||v.length===0,className:"relative flex items-center gap-2 px-4 py-2 rounded-lg border border-primary/30 bg-card-dark text-white text-sm font-bold hover:bg-[#233648] transition-all overflow-hidden electric-glow electric-glow-border disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/15 to-primary/0 opacity-60"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-[shimmer_3s_infinite]"}),e.jsxs("span",{className:"relative flex items-center gap-2 z-10",children:[ae.isPending?e.jsx("span",{className:"material-symbols-outlined text-[18px] animate-spin",children:"refresh"}):e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"add_circle"}),ae.isPending?"Adding...":"Add Spare Disks"]})]})]})]})]})})]})}function Lc(...r){return w6(v6(r))}const bi=Ce.forwardRef(({className:r,...t},s)=>e.jsx("div",{ref:s,className:Lc("rounded-lg border border-border-dark bg-card-dark text-white shadow-sm",r),...t}));bi.displayName="Card";const yi=Ce.forwardRef(({className:r,...t},s)=>e.jsx("div",{ref:s,className:Lc("flex flex-col space-y-1.5 p-6",r),...t}));yi.displayName="CardHeader";const wi=Ce.forwardRef(({className:r,...t},s)=>e.jsx("h3",{ref:s,className:Lc("text-2xl font-semibold leading-none tracking-tight",r),...t}));wi.displayName="CardTitle";const nu=Ce.forwardRef(({className:r,...t},s)=>e.jsx("p",{ref:s,className:Lc("text-sm text-text-secondary",r),...t}));nu.displayName="CardDescription";const vi=Ce.forwardRef(({className:r,...t},s)=>e.jsx("div",{ref:s,className:Lc("p-6 pt-0",r),...t}));vi.displayName="CardContent";const oS=Ce.forwardRef(({className:r,...t},s)=>e.jsx("div",{ref:s,className:Lc("flex items-center p-6 pt-0",r),...t}));oS.displayName="CardFooter";const ct=Ce.forwardRef(({className:r,variant:t="default",size:s="default",...n},o)=>e.jsx("button",{className:Lc("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{"bg-primary text-primary-foreground hover:bg-primary/90":t==="default","bg-destructive text-destructive-foreground hover:bg-destructive/90":t==="destructive","border border-border-dark bg-card-dark hover:bg-[#233648] hover:text-white text-white":t==="outline","bg-secondary text-secondary-foreground hover:bg-secondary/80":t==="secondary","hover:bg-accent hover:text-accent-foreground":t==="ghost","text-primary underline-offset-4 hover:underline":t==="link","h-10 px-4 py-2":s==="default","h-9 rounded-md px-3":s==="sm","h-11 rounded-md px-8":s==="lg","h-10 w-10":s==="icon"},r),ref:o,...n}));ct.displayName="Button";const lS={info:a4,warning:Eh,critical:s4},AS={info:"bg-blue-500/20 text-blue-400 border-blue-500/30",warning:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",critical:"bg-red-500/20 text-red-400 border-red-500/30"};function cS(){const[r,t]=Ce.useState("unacknowledged"),s=Nr(),{data:n,isLoading:o}=dt({queryKey:["alerts",r],queryFn:()=>Cc.listAlerts(r==="unacknowledged"?{is_acknowledged:!1}:void 0)}),l=ft({mutationFn:Cc.acknowledgeAlert,onSuccess:()=>{s.invalidateQueries({queryKey:["alerts"]})}}),d=ft({mutationFn:Cc.resolveAlert,onSuccess:()=>{s.invalidateQueries({queryKey:["alerts"]})}}),c=n?.alerts||[];return e.jsxs("div",{className:"space-y-6 min-h-screen bg-background-dark p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-white",children:"Alerts"}),e.jsx("p",{className:"mt-2 text-sm text-text-secondary",children:"Monitor system alerts and notifications"})]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(ct,{variant:r==="all"?"default":"outline",onClick:()=>t("all"),children:"All Alerts"}),e.jsx(ct,{variant:r==="unacknowledged"?"default":"outline",onClick:()=>t("unacknowledged"),children:"Unacknowledged"})]})]}),e.jsxs(bi,{children:[e.jsxs(yi,{children:[e.jsxs(wi,{className:"flex items-center",children:[e.jsx(Lb,{className:"h-5 w-5 mr-2"}),"Active Alerts"]}),e.jsx(nu,{children:o?"Loading...":`${c.length} ${r==="unacknowledged"?"unacknowledged":""} alert${c.length!==1?"s":""}`})]}),e.jsx(vi,{children:o?e.jsx("p",{className:"text-sm text-text-secondary",children:"Loading alerts..."}):c.length>0?e.jsx("div",{className:"space-y-4",children:c.map(u=>{const h=lS[u.severity];return e.jsx("div",{className:`border rounded-lg p-4 bg-card-dark ${AS[u.severity]}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start space-x-3 flex-1",children:[e.jsx(h,{className:"h-5 w-5 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-white",children:u.title}),e.jsx("span",{className:"text-xs px-2 py-1 bg-[#233648] border border-border-dark rounded text-text-secondary",children:u.source})]}),e.jsx("p",{className:"text-sm mb-2 text-text-secondary",children:u.message}),e.jsxs("div",{className:"flex items-center space-x-4 text-xs",children:[e.jsx("span",{children:sS(u.created_at)}),u.resource_type&&e.jsxs("span",{children:[u.resource_type,": ",u.resource_id]})]})]})]}),e.jsxs("div",{className:"flex space-x-2 ml-4",children:[!u.is_acknowledged&&e.jsxs(ct,{size:"sm",variant:"outline",onClick:()=>l.mutate(u.id),disabled:l.isPending,children:[e.jsx(n4,{className:"h-4 w-4 mr-1"}),"Acknowledge"]}),!u.resolved_at&&e.jsxs(ct,{size:"sm",variant:"outline",onClick:()=>d.mutate(u.id),disabled:d.isPending,children:[e.jsx(s4,{className:"h-4 w-4 mr-1"}),"Resolve"]})]})]})},u.id)})}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx(Lb,{className:"h-12 w-12 text-text-secondary mx-auto mb-4"}),e.jsx("p",{className:"text-sm text-text-secondary",children:"No alerts found"})]})})]})]})}const dS={listLibraries:async()=>(await ze.get("/tape/physical/libraries")).data.libraries||[]},Ym={listLibraries:async()=>(await ze.get("/tape/vtl/libraries")).data.libraries||[],getLibrary:async r=>(await ze.get(`/tape/vtl/libraries/${r}`)).data,createLibrary:async r=>(await ze.post("/tape/vtl/libraries",r)).data.library,deleteLibrary:async r=>{await ze.delete(`/tape/vtl/libraries/${r}`)},getLibraryDrives:async r=>(await ze.get(`/tape/vtl/libraries/${r}/drives`)).data.drives||[],getLibraryTapes:async r=>(await ze.get(`/tape/vtl/libraries/${r}/tapes`)).data.tapes||[],createTape:async(r,t)=>(await ze.post(`/tape/vtl/libraries/${r}/tapes`,t)).data.tape,loadTape:async(r,t)=>(await ze.post(`/tape/vtl/libraries/${r}/load`,t)).data,unloadTape:async(r,t)=>(await ze.post(`/tape/vtl/libraries/${r}/unload`,t)).data};function uS(){const[r,t]=Ce.useState("vtl"),[s,n]=Ce.useState(null),[o,l]=Ce.useState(""),d=Nr(),{data:c=[],isLoading:u}=dt({queryKey:["physical-tape-libraries"],queryFn:dS.listLibraries,enabled:r==="physical",refetchInterval:5e3}),{data:h=[],isLoading:m}=dt({queryKey:["vtl-libraries"],queryFn:Ym.listLibraries,enabled:r==="vtl",refetchInterval:5e3}),{data:x=[]}=dt({queryKey:["vtl-library-tapes",s],queryFn:()=>Ym.getLibraryTapes(s),enabled:!!s&&r==="vtl"}),y=r==="vtl"?h.length:c.length,p=r==="vtl"?h.filter(j=>j.is_active).length:c.filter(j=>j.is_active).length,v=r==="vtl"?h.reduce((j,_)=>j+_.slot_count,0):c.reduce((j,_)=>j+_.slot_count,0),N=x.filter(j=>j.slot_number>0).length,B=(r==="vtl"?h:c).filter(j=>j.name.toLowerCase().includes(o.toLowerCase())||r==="vtl"&&"mhvtl_library_id"in j&&j.mhvtl_library_id.toString().includes(o)),g=()=>{d.invalidateQueries({queryKey:r==="vtl"?["vtl-libraries"]:["physical-tape-libraries"]})};return e.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden relative bg-background-dark",children:[e.jsx("header",{className:"flex-none px-6 py-5 border-b border-border-dark bg-[#111a22]/95 backdrop-blur z-10",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto w-full flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[e.jsx(ba,{to:"/",className:"text-text-secondary text-sm font-medium hover:text-primary transition-colors",children:"Home"}),e.jsx("span",{className:"text-text-secondary text-xs",children:"/"}),e.jsx("span",{className:"text-white text-sm font-medium",children:"Virtual Tape Libraries"})]}),e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h2",{className:"text-white text-3xl font-bold tracking-tight",children:"Virtual Tape Libraries"}),e.jsx("p",{className:"text-text-secondary text-base max-w-2xl",children:"Manage virtual tape devices, emulation profiles, and storage targets."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{onClick:g,className:"px-4 py-2 bg-surface-dark hover:bg-[#2a3b4d] border border-border-dark rounded-lg text-white text-sm font-medium flex items-center gap-2 transition-all",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"refresh"}),"Refresh"]}),r==="vtl"&&e.jsxs(ba,{to:"/tape/vtl/create",className:"px-4 py-2 bg-primary hover:bg-blue-600 rounded-lg text-white text-sm font-bold shadow-lg shadow-blue-900/20 flex items-center gap-2 transition-all",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"add"}),"Create VTL"]})]})]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto bg-background-dark",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto p-6 flex flex-col gap-6 pb-20",children:[e.jsx("div",{className:"border-b border-border-dark",children:e.jsxs("nav",{className:"-mb-px flex space-x-8",children:[e.jsxs("button",{onClick:()=>{t("vtl"),n(null)},className:`py-4 px-1 border-b-2 font-medium text-sm ${r==="vtl"?"border-primary text-primary":"border-transparent text-text-secondary hover:text-white hover:border-border-dark"}`,children:["Virtual Tape Libraries (",h.length,")"]}),e.jsxs("button",{onClick:()=>{t("physical"),n(null)},className:`py-4 px-1 border-b-2 font-medium text-sm ${r==="physical"?"border-primary text-primary":"border-transparent text-text-secondary hover:text-white hover:border-border-dark"}`,children:["Physical Libraries (",c.length,")"]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 p-5 rounded-xl border border-border-dark bg-surface-dark relative overflow-hidden group",children:[e.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx("span",{className:"material-symbols-outlined text-6xl text-white",children:"dns"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Total Libraries"}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:y}),e.jsxs("span",{className:"text-green-500 text-xs font-medium mb-1.5 flex items-center",children:[e.jsx("span",{className:"material-symbols-outlined text-sm mr-0.5",children:"check_circle"}),p===y?"All Online":`${p} Online`]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 p-5 rounded-xl border border-border-dark bg-surface-dark relative overflow-hidden group",children:[e.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx("span",{className:"material-symbols-outlined text-6xl text-white",children:"database"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Total Capacity"}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:fr(r==="vtl"?h.reduce((j,_)=>j+_.slot_count*15*1024*1024*1024*1024,0):0,1)})})]}),e.jsxs("div",{className:"flex flex-col gap-1 p-5 rounded-xl border border-border-dark bg-surface-dark relative overflow-hidden group",children:[e.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx("span",{className:"material-symbols-outlined text-6xl text-white",children:"album"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Tapes Online"}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:N}),e.jsxs("span",{className:"text-text-secondary text-xs font-medium mb-1.5",children:["/ ",v," Slots"]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 p-5 rounded-xl border border-border-dark bg-surface-dark relative overflow-hidden group",children:[e.jsx("div",{className:"absolute right-0 top-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx("span",{className:"material-symbols-outlined text-6xl text-white",children:"swap_horiz"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Active Sessions"}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:r==="vtl"?h.reduce((j,_)=>j+_.drive_count,0):c.reduce((j,_)=>j+_.drive_count,0)}),e.jsx("span",{className:"text-blue-400 text-xs font-medium mb-1.5",children:"Drives"})]})]})]}),e.jsxs("div",{className:"p-5 rounded-xl bg-surface-dark border border-border-dark flex flex-col gap-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-text-secondary",children:"pie_chart"}),e.jsx("h3",{className:"text-white text-sm font-semibold",children:"VTL Partition Usage (ZFS Pool)"})]}),e.jsxs("p",{className:"text-white text-sm font-medium",children:[fr(N*15*1024*1024*1024*1024,1)," /"," ",fr(v*15*1024*1024*1024*1024,1)," Used"]})]}),e.jsx("div",{className:"w-full bg-[#111a22] rounded-full h-3 overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-primary h-3 rounded-full",style:{width:`${v>0?N/v*100:0}%`}})}),e.jsxs("div",{className:"flex justify-between items-center text-xs text-text-secondary",children:[e.jsxs("span",{children:["Compression Ratio: ",e.jsx("span",{className:"text-white font-mono",children:"1.5x"})]}),e.jsxs("span",{className:"flex items-center gap-1 text-green-400",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"})," Pool Healthy"]})]})]}),e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-surface-dark overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-border-dark flex flex-col sm:flex-row gap-4 justify-between items-center bg-[#1c2834]",children:[e.jsxs("div",{className:"relative w-full sm:w-96",children:[e.jsx("span",{className:"material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary text-lg",children:"search"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-border-dark text-white text-sm rounded-lg pl-10 pr-4 py-2 focus:ring-1 focus:ring-primary focus:border-primary placeholder-gray-600 outline-none transition-all",placeholder:"Search libraries by name or ID...",type:"text",value:o,onChange:j=>l(j.target.value)})]}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[e.jsxs("button",{className:"px-3 py-2 bg-[#111a22] hover:bg-[#1a2632] border border-border-dark rounded-lg text-text-secondary text-sm font-medium flex items-center gap-2 transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"filter_list"}),"Filter"]}),e.jsxs("button",{className:"px-3 py-2 bg-[#111a22] hover:bg-[#1a2632] border border-border-dark rounded-lg text-text-secondary text-sm font-medium flex items-center gap-2 transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"settings"}),"Columns"]})]})]}),m||u?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"Loading libraries..."})}):B.length===0?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx("span",{className:"material-symbols-outlined text-6xl text-text-secondary mb-4 block",children:"database"}),e.jsxs("h3",{className:"text-lg font-medium text-white mb-2",children:["No ",r==="vtl"?"Virtual":"Physical"," Tape Libraries"]}),e.jsx("p",{className:"text-sm text-text-secondary mb-4",children:r==="vtl"?"Create your first virtual tape library to get started":"Discover physical tape libraries connected to the system"}),r==="vtl"&&e.jsxs(ba,{to:"/tape/vtl/create",className:"inline-flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 rounded-lg text-white text-sm font-bold",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"add"}),"Create VTL Library"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#151e29] border-b border-border-dark",children:[e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary w-12",children:e.jsx("input",{className:"rounded border-border-dark bg-[#111a22] text-primary focus:ring-offset-background-dark focus:ring-primary h-4 w-4",type:"checkbox"})}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Library Name"}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Status"}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Emulation"}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"Tapes / Slots"}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary",children:"iSCSI Target"}),e.jsx("th",{className:"py-4 px-6 text-xs font-semibold uppercase tracking-wider text-text-secondary text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:B.map(j=>{const _=r==="vtl",w=_?j.mhvtl_library_id:j.id,L=j.is_active?"Ready":"Offline",K=j.is_active?"green":"gray",M=_&&s===j.id?x.length:0;return e.jsxs("tr",{className:"group hover:bg-[#233342] transition-colors cursor-pointer",onClick:()=>_&&n(s===j.id?null:j.id),children:[e.jsx("td",{className:"py-4 px-6",children:e.jsx("input",{className:"rounded border-border-dark bg-[#111a22] text-primary focus:ring-offset-background-dark focus:ring-primary h-4 w-4",type:"checkbox",onClick:V=>V.stopPropagation()})}),e.jsx("td",{className:"py-4 px-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`size-8 rounded flex items-center justify-center ${j.is_active?"bg-blue-900/30 text-primary":"bg-gray-700/30 text-gray-400"}`,children:e.jsx("span",{className:"material-symbols-outlined text-lg",children:"shelves"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white text-sm font-bold",children:j.name}),e.jsxs("p",{className:"text-text-secondary text-xs",children:["ID: ",w]})]})]})}),e.jsx("td",{className:"py-4 px-6",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${K==="green"?"bg-green-500/10 text-green-400 border-green-500/20":"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:[K==="green"&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),K==="gray"&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-500"}),L]})}),e.jsxs("td",{className:"py-4 px-6",children:[e.jsx("p",{className:"text-white text-sm font-medium",children:_?j.vendor||"MHVTL":"physical"in j?j.vendor:"N/A"}),e.jsxs("p",{className:"text-text-secondary text-xs",children:["LTO-8 • ",j.drive_count," ",j.drive_count===1?"Drive":"Drives"]})]}),e.jsxs("td",{className:"py-4 px-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-text-secondary text-lg",children:"album"}),e.jsxs("span",{className:"text-white text-sm",children:[M||0," / ",j.slot_count]})]}),e.jsx("div",{className:"w-24 bg-[#111a22] rounded-full h-1 mt-1.5",children:e.jsx("div",{className:`h-1 rounded-full ${j.is_active?"bg-primary":"bg-gray-500"}`,style:{width:`${j.slot_count>0?(M||0)/j.slot_count*100:0}%`}})})]}),e.jsx("td",{className:"py-4 px-6",children:e.jsxs("div",{className:"flex items-center gap-2 group/copy cursor-pointer",onClick:()=>{const V=`iqn.2023-10.com.vtl:${j.name.toLowerCase().replace(/\s+/g,"")}`;navigator.clipboard.writeText(V)},children:[e.jsxs("code",{className:"text-xs text-text-secondary font-mono bg-[#111a22] px-2 py-1 rounded border border-border-dark group-hover/copy:text-white transition-colors",children:["iqn.2023-10.com.vtl:",j.name.toLowerCase().replace(/\s+/g,"")]}),e.jsx("span",{className:"material-symbols-outlined text-text-secondary text-sm opacity-0 group-hover/copy:opacity-100 transition-opacity",children:"content_copy"})]})}),e.jsx("td",{className:"py-4 px-6 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(ba,{to:_?`/tape/vtl/${j.id}`:`/tape/physical/${j.id}`,className:"p-2 text-text-secondary hover:text-white hover:bg-[#324d67] rounded-lg transition-colors",title:"Manage Tapes",onClick:V=>V.stopPropagation(),children:e.jsx("span",{className:"material-symbols-outlined text-xl",children:"cable"})}),e.jsx("button",{className:"p-2 text-text-secondary hover:text-primary hover:bg-primary/10 rounded-lg transition-colors",title:"Edit Configuration",onClick:V=>V.stopPropagation(),children:e.jsx("span",{className:"material-symbols-outlined text-xl",children:"edit"})}),e.jsx("button",{className:"p-2 text-text-secondary hover:text-red-400 hover:bg-red-400/10 rounded-lg transition-colors",title:"Delete Library",onClick:V=>V.stopPropagation(),children:e.jsx("span",{className:"material-symbols-outlined text-xl",children:"delete"})})]})})]},j.id)})})]})}),e.jsxs("div",{className:"px-6 py-4 border-t border-border-dark flex items-center justify-between bg-[#1c2834]",children:[e.jsxs("p",{className:"text-text-secondary text-sm",children:["Showing ",e.jsxs("span",{className:"text-white font-medium",children:["1-",B.length]})," of"," ",e.jsx("span",{className:"text-white font-medium",children:B.length})," libraries"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{className:"px-3 py-1.5 rounded-lg border border-border-dark bg-[#111a22] text-text-secondary text-sm hover:text-white disabled:opacity-50",disabled:!0,children:"Previous"}),e.jsx("button",{className:"px-3 py-1.5 rounded-lg border border-border-dark bg-[#111a22] text-text-secondary text-sm hover:text-white disabled:opacity-50",disabled:!0,children:"Next"})]})]})]})]})]})}),s&&r==="vtl"&&e.jsx("div",{className:"bg-surface-dark border-t border-border-dark p-6 absolute bottom-0 w-full transform translate-y-0 transition-transform z-30 shadow-2xl shadow-black max-h-[70vh] overflow-y-auto",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-2xl",children:"cable"}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-white text-lg font-bold",children:["Tape Management: ",h.find(j=>j.id===s)?.name]}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Manage virtual cartridges, import/export slots, and barcodes."})]})]}),e.jsxs("div",{className:"flex gap-3 flex-wrap",children:[e.jsx("button",{className:"px-3 py-2 bg-[#111a22] border border-border-dark rounded-lg text-text-secondary hover:text-white text-sm font-medium transition-colors",children:"Bulk Format"}),e.jsxs(ba,{to:`/tape/vtl/${s}/tapes/create`,className:"px-3 py-2 bg-primary hover:bg-blue-600 rounded-lg text-white text-sm font-bold transition-colors flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"add"}),"Add Tapes"]}),e.jsx("button",{onClick:()=>n(null),className:"p-2 text-text-secondary hover:text-white",children:e.jsx("span",{className:"material-symbols-outlined",children:"close"})})]})]}),x.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("span",{className:"material-symbols-outlined text-6xl text-text-secondary mb-4 block",children:"album"}),e.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Tapes Found"}),e.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"This library has no tapes yet. Create tapes to get started."}),e.jsxs(ba,{to:`/tape/vtl/${s}/tapes/create`,className:"inline-flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 rounded-lg text-white text-sm font-bold",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"add"}),"Add Tapes"]})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 gap-3",children:x.map(j=>e.jsxs("div",{className:`p-3 rounded-lg border flex flex-col gap-2 relative group hover:border-primary transition-all cursor-pointer min-h-[120px] ${j.status==="in_drive"?"bg-[#111a22] border-green-500/30 shadow-lg shadow-green-500/10":"bg-[#111a22] border-border-dark hover:shadow-lg hover:shadow-primary/10"}`,children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("span",{className:`material-symbols-outlined text-xl ${j.status==="in_drive"?"text-green-500":"text-text-secondary"}`,children:"album"}),e.jsxs("span",{className:"text-[10px] uppercase font-bold text-text-secondary bg-[#1c2834] px-1.5 py-0.5 rounded",children:["SLOT ",j.slot_number]})]}),e.jsxs("div",{className:"flex-1 flex flex-col justify-center",children:[e.jsx("p",{className:"text-white text-xs font-mono font-bold truncate",title:j.barcode,children:j.barcode}),e.jsxs("p",{className:"text-text-secondary text-[10px] mt-1",children:[fr(j.size_bytes,1)," / ",fr(j.size_bytes,1)]})]}),e.jsxs("div",{className:"absolute inset-0 bg-black/70 hidden group-hover:flex items-center justify-center gap-2 backdrop-blur-sm rounded-lg",children:[e.jsx("button",{className:"p-2 text-white hover:text-primary hover:bg-primary/20 rounded transition-colors",title:"Eject",children:e.jsx("span",{className:"material-symbols-outlined text-lg",children:"eject"})}),e.jsx("button",{className:"p-2 text-white hover:text-red-400 hover:bg-red-400/20 rounded transition-colors",title:"Delete",children:e.jsx("span",{className:"material-symbols-outlined text-lg",children:"delete"})})]})]},j.id))})]})})]})}function hS(){const{id:r}=jy(),t=Ph(),s=Nr(),[n,o]=Ce.useState(null),{data:l,isLoading:d}=dt({queryKey:["vtl-library",r],queryFn:()=>Ym.getLibrary(r),enabled:!!r}),c=ft({mutationFn:()=>Ym.deleteLibrary(r),onSuccess:()=>{s.invalidateQueries({queryKey:["vtl-libraries"]}),t("/tape")}});if(d)return e.jsx("div",{className:"text-sm text-text-secondary min-h-screen bg-background-dark p-6",children:"Loading library details..."});if(!l)return e.jsx("div",{className:"text-sm text-red-400 min-h-screen bg-background-dark p-6",children:"Library not found"});const{library:u,drives:h,tapes:m}=l;return e.jsxs("div",{className:"space-y-6 min-h-screen bg-background-dark p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxs(ct,{variant:"ghost",size:"sm",onClick:()=>t("/tape"),children:[e.jsx(wc,{className:"h-4 w-4 mr-2"}),"Back"]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-white",children:u.name}),e.jsxs("p",{className:"mt-1 text-sm text-text-secondary",children:["Virtual Tape Library • ",u.slot_count," slots • ",u.drive_count," drives"]})]})]}),e.jsxs(ct,{variant:"destructive",onClick:()=>{confirm("Are you sure you want to delete this library?")&&c.mutate()},children:[e.jsx(es,{className:"h-4 w-4 mr-2"}),"Delete Library"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"Library Status"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Status:"}),e.jsx("span",{className:u.is_active?"text-green-400":"text-text-secondary",children:u.is_active?"Active":"Inactive"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"mhVTL ID:"}),e.jsx("span",{className:"font-medium text-white",children:u.mhvtl_library_id})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Storage Path:"}),e.jsx("span",{className:"font-mono text-xs text-white",children:u.storage_path})]})]})})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"Capacity"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Total Slots:"}),e.jsx("span",{className:"font-medium text-white",children:u.slot_count})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Used Slots:"}),e.jsx("span",{className:"font-medium text-white",children:m.length})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Free Slots:"}),e.jsx("span",{className:"font-medium text-white",children:u.slot_count-m.length})]})]})})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"Drives"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Total Drives:"}),e.jsx("span",{className:"font-medium text-white",children:u.drive_count})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Idle:"}),e.jsx("span",{className:"font-medium text-white",children:h.filter(x=>x.status==="idle").length})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Ready:"}),e.jsx("span",{className:"font-medium text-white",children:h.filter(x=>x.status==="ready").length})]})]})})]})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(wi,{children:"Drives"}),e.jsx(nu,{children:"Virtual tape drives in this library"})]}),e.jsxs(ct,{variant:"outline",size:"sm",children:[e.jsx(Cn,{className:"h-4 w-4 mr-2"}),"Refresh"]})]})}),e.jsx(vi,{children:h.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:h.map(x=>e.jsx(fS,{drive:x,tapes:m,isSelected:n===x.id,onSelect:()=>o(x.id)},x.id))}):e.jsx("p",{className:"text-sm text-text-secondary",children:"No drives configured"})})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(wi,{children:"Virtual Tapes"}),e.jsxs(nu,{children:[m.length," of ",u.slot_count," slots used"]})]}),e.jsxs(ct,{variant:"outline",size:"sm",children:[e.jsx(Ks,{className:"h-4 w-4 mr-2"}),"Create Tape"]})]})}),e.jsx(vi,{children:m.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-[#1a2632]",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Barcode"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Slot"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Size"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Status"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Actions"})]})}),e.jsx("tbody",{className:"bg-card-dark divide-y divide-border-dark",children:m.map(x=>e.jsxs("tr",{className:"hover:bg-[#233648]",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-white",children:x.barcode}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-text-secondary",children:x.slot_number}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-text-secondary",children:fr(x.size_bytes)}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded ${x.status==="loaded"?"bg-blue-100 text-blue-800":x.status==="mounted"?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:x.status})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:n&&e.jsxs(ct,{variant:"outline",size:"sm",onClick:()=>{console.log("Load tape",x.id,"to drive",n)},children:[e.jsx(i4,{className:"h-3 w-3 mr-1"}),"Load"]})})]},x.id))})]})}):e.jsx("p",{className:"text-sm text-text-secondary",children:"No tapes created yet"})})]})]})}function fS({drive:r,tapes:t,isSelected:s,onSelect:n}){const o=t.find(l=>l.id===r.current_tape_id);return e.jsxs("div",{className:`border rounded-lg p-4 cursor-pointer transition-colors ${s?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,onClick:n,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("h4",{className:"font-medium",children:["Drive ",r.drive_number]}),e.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded ${r.status==="ready"?"bg-green-100 text-green-800":r.status==="loaded"?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:r.status})]}),o?e.jsxs("div",{className:"text-sm text-text-secondary",children:[e.jsxs("p",{className:"text-white",children:["Tape: ",o.barcode]}),e.jsx("p",{className:"text-xs text-text-secondary",children:fr(o.size_bytes)})]}):e.jsx("p",{className:"text-sm text-text-secondary",children:"No tape loaded"}),s&&e.jsx("div",{className:"mt-2 pt-2 border-t",children:e.jsx("p",{className:"text-xs text-blue-600",children:"Selected - Click tape to load"})})]})}const br={listTargets:async()=>(await ze.get("/scst/targets",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.targets||[],getTarget:async r=>(await ze.get(`/scst/targets/${r}`,{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data,createTarget:async r=>(await ze.post("/scst/targets",r)).data,addLUN:async(r,t)=>(await ze.post(`/scst/targets/${r}/luns`,t)).data,removeLUN:async(r,t)=>(await ze.delete(`/scst/targets/${r}/luns/${t}`)).data,addInitiator:async(r,t)=>(await ze.post(`/scst/targets/${r}/initiators`,t)).data,applyConfig:async()=>(await ze.post("/scst/config/apply")).data,listHandlers:async()=>(await ze.get("/scst/handlers",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.handlers||[],listPortals:async()=>(await ze.get("/scst/portals",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.portals||[],getPortal:async r=>(await ze.get(`/scst/portals/${r}`,{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data,createPortal:async r=>(await ze.post("/scst/portals",r)).data,updatePortal:async(r,t)=>(await ze.put(`/scst/portals/${r}`,t)).data,deletePortal:async r=>{await ze.delete(`/scst/portals/${r}`)},enableTarget:async r=>(await ze.post(`/scst/targets/${r}/enable`)).data,disableTarget:async r=>(await ze.post(`/scst/targets/${r}/disable`)).data,deleteTarget:async r=>(await ze.delete(`/scst/targets/${r}`)).data,listInitiators:async()=>(await ze.get("/scst/initiators",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.initiators||[],getInitiator:async r=>(await ze.get(`/scst/initiators/${r}`,{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data,removeInitiator:async r=>{await ze.delete(`/scst/initiators/${r}`)},listExtents:async()=>(await ze.get("/scst/extents",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.extents||[],createExtent:async r=>(await ze.post("/scst/extents",r)).data,deleteExtent:async r=>{await ze.delete(`/scst/extents/${r}`)},listInitiatorGroups:async()=>(await ze.get("/scst/initiator-groups",{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data.groups||[],getInitiatorGroup:async r=>(await ze.get(`/scst/initiator-groups/${r}`,{headers:{"Cache-Control":"no-cache"},params:{_t:Date.now()}})).data,createInitiatorGroup:async r=>(await ze.post("/scst/initiator-groups",r)).data,updateInitiatorGroup:async(r,t)=>(await ze.put(`/scst/initiator-groups/${r}`,t)).data,deleteInitiatorGroup:async r=>{await ze.delete(`/scst/initiator-groups/${r}`)},addInitiatorToGroup:async(r,t)=>(await ze.post(`/scst/initiator-groups/${r}/initiators`,{initiator_iqn:t})).data,getConfigFile:async r=>(await ze.get("/scst/config/file",{params:r?{path:r}:{}})).data,updateConfigFile:async(r,t)=>(await ze.put("/scst/config/file",{content:r,path:t})).data};function mS(){const r=Nr(),[t,s]=Ce.useState(!1),[n,o]=Ce.useState("targets"),[l,d]=Ce.useState(null),[c,u]=Ce.useState(""),{data:h,isLoading:m}=dt({queryKey:["scst-targets"],queryFn:br.listTargets,refetchInterval:3e3,refetchIntervalInBackground:!0,refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0,gcTime:0,structuralSharing:!1}),x=ft({mutationFn:br.applyConfig,onSuccess:()=>{r.invalidateQueries({queryKey:["scst-targets"]}),alert("Configuration applied successfully!")}}),y=h?.filter(p=>p.iqn.toLowerCase().includes(c.toLowerCase())||p.alias&&p.alias.toLowerCase().includes(c.toLowerCase()))||[];return e.jsxs("div",{className:"flex-1 overflow-y-auto p-8",children:[e.jsxs("div",{className:"max-w-[1200px] mx-auto flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(ba,{to:"/storage",className:"text-text-secondary text-sm font-medium hover:text-white transition-colors",children:"Storage"}),e.jsx(Ka,{className:"text-text-secondary",size:16}),e.jsx("span",{className:"text-white text-sm font-medium",children:"iSCSI Management"})]}),e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h1",{className:"text-white text-3xl font-extrabold leading-tight tracking-tight",children:"iSCSI Management"}),e.jsx("p",{className:"text-text-secondary text-base font-normal",children:"Manage targets, portals, and initiator access control lists."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(ct,{variant:"outline",onClick:()=>x.mutate(),disabled:x.isPending,className:"flex items-center gap-2 px-4 h-10 rounded-lg bg-card-dark border border-border-dark hover:bg-white/5 text-white text-sm font-semibold",children:[e.jsx(vc,{size:20}),e.jsx("span",{children:"Global Settings"})]}),e.jsxs(ct,{onClick:()=>s(!0),className:"flex items-center gap-2 px-4 h-10 rounded-lg bg-primary hover:bg-blue-600 text-white text-sm font-bold shadow-lg shadow-blue-900/20",children:[e.jsx(Ks,{size:20}),e.jsx("span",{children:"Create Target"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-card-dark border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Service Status"}),e.jsx(n4,{className:"text-green-500",size:24})]}),e.jsx("p",{className:"text-white text-2xl font-bold",children:"Running"}),e.jsx("p",{className:"text-green-500 text-xs font-medium mt-1",children:"Uptime: 14d 2h"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-card-dark border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Port Binding"}),e.jsx(ya,{className:"text-text-secondary",size:24})]}),e.jsx("p",{className:"text-white text-2xl font-bold",children:"3260"}),e.jsx("p",{className:"text-text-secondary text-xs font-medium mt-1",children:"Listening on 0.0.0.0"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-card-dark border border-border-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Active Sessions"}),e.jsx(N6,{className:"text-primary",size:24})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("p",{className:"text-white text-2xl font-bold",children:"12"}),e.jsxs("span",{className:"text-green-500 text-sm font-medium flex items-center",children:[e.jsx(B6,{size:16})," 2"]})]}),e.jsx("p",{className:"text-text-secondary text-xs font-medium mt-1",children:"Total throughput: 450 MB/s"})]})]}),e.jsxs("div",{className:"flex flex-col bg-card-dark border border-border-dark rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"border-b border-border-dark px-6",children:e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("button",{onClick:()=>o("targets"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="targets"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Targets",n==="targets"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]}),e.jsxs("button",{onClick:()=>o("portals"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="portals"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Portals",n==="portals"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]}),e.jsxs("button",{onClick:()=>o("initiators"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="initiators"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Initiators",n==="initiators"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]}),e.jsxs("button",{onClick:()=>o("extents"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="extents"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Extents",n==="extents"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]}),e.jsxs("button",{onClick:()=>o("groups"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="groups"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Groups",n==="groups"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]}),e.jsxs("button",{onClick:()=>o("config"),className:`relative py-4 text-sm tracking-wide transition-colors ${n==="config"?"text-primary font-bold":"text-text-secondary hover:text-white font-medium"}`,children:["Config Editor",n==="config"&&e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-t-full"})]})]})}),e.jsxs("div",{className:"p-4 flex items-center justify-between gap-4 border-b border-border-dark/50 bg-[#141d26]",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search targets by alias or IQN...",value:c,onChange:p=>u(p.target.value),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg pl-10 pr-4 py-2 text-sm text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all placeholder-text-secondary/50"})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-md bg-[#0f161d] border border-border-dark",children:[e.jsx("span",{className:"text-xs text-text-secondary font-medium",children:"Filter:"}),e.jsxs("select",{className:"bg-[#0f161d] text-xs text-white font-medium focus:outline-none cursor-pointer border-none appearance-none pr-6",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0 center",paddingRight:"24px"},children:[e.jsx("option",{className:"bg-[#0f161d] text-white",children:"All Status"}),e.jsx("option",{className:"bg-[#0f161d] text-white",children:"Online"}),e.jsx("option",{className:"bg-[#0f161d] text-white",children:"Offline"})]})]})})]}),n==="targets"&&e.jsxs("div",{className:"flex flex-col",children:[m?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading targets..."}):y.length>0?e.jsx(e.Fragment,{children:y.map((p,v)=>e.jsx(pS,{target:p,isExpanded:l===p.id,onToggle:()=>d(l===p.id?null:p.id),onDelete:()=>{l===p.id&&d(null)},isLast:v===y.length-1},p.id))}):e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No targets found"})}),e.jsxs("div",{className:"p-4 bg-[#141d26] border-t border-border-dark flex items-center justify-between",children:[e.jsxs("p",{className:"text-xs text-text-secondary",children:["Showing 1-",y.length," of ",y.length," targets"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{className:"p-1 rounded text-text-secondary hover:text-white hover:bg-white/10 disabled:opacity-50",children:e.jsx(Sy,{size:20})}),e.jsx("button",{className:"p-1 rounded text-text-secondary hover:text-white hover:bg-white/10",children:e.jsx(Ka,{size:20})})]})]})]}),n==="portals"&&e.jsx(bS,{}),n==="initiators"&&e.jsx(wS,{}),n==="extents"&&e.jsx(vS,{}),n==="groups"&&e.jsx(BS,{}),n==="config"&&e.jsx(_S,{})]})]}),t&&e.jsx(gS,{onClose:()=>s(!1),onSuccess:async()=>{s(!1),await r.invalidateQueries({queryKey:["scst-targets"]}),await r.refetchQueries({queryKey:["scst-targets"]})}})]})}function pS({target:r,isExpanded:t,onToggle:s,onDelete:n}){const{data:o}=dt({queryKey:["scst-target",r.id],queryFn:()=>br.getTarget(r.id),enabled:t}),l=o?.luns||[],d=o?.initiator_groups||[],[c,u]=Ce.useState(!1),h=Nr(),m=r.is_active?"bg-green-500/20 text-green-400 border-green-500/20":"bg-red-500/20 text-red-400 border-red-500/20",x=r.is_active?"Online":"Offline",y=ft({mutationFn:()=>br.enableTarget(r.id),onSuccess:()=>{h.invalidateQueries({queryKey:["scst-targets"]}),h.invalidateQueries({queryKey:["scst-target",r.id]})}}),p=ft({mutationFn:()=>br.disableTarget(r.id),onSuccess:()=>{h.invalidateQueries({queryKey:["scst-targets"]}),h.invalidateQueries({queryKey:["scst-target",r.id]})}}),v=ft({mutationFn:()=>br.deleteTarget(r.id),onSuccess:async()=>{t&&s(),n&&n(),h.setQueryData(["scst-targets"],B=>B&&B.filter(g=>g.id!==r.id)),h.removeQueries({queryKey:["scst-target",r.id]}),await h.invalidateQueries({queryKey:["scst-targets"]}),await h.refetchQueries({queryKey:["scst-targets"],type:"active"})},onError:B=>{h.refetchQueries({queryKey:["scst-targets"]}),alert(`Failed to delete target: ${B.response?.data?.error||B.message}`)}}),N=ft({mutationFn:({targetId:B,lunId:g})=>br.removeLUN(B,g),onMutate:async({lunId:B})=>{await h.cancelQueries({queryKey:["scst-target",r.id]}),await h.cancelQueries({queryKey:["scst-targets"]});const g=h.getQueryData(["scst-target",r.id]),j=h.getQueryData(["scst-targets"]);return h.setQueryData(["scst-target",r.id],_=>_&&{..._,luns:_.luns?_.luns.filter(w=>w.id!==B):[]}),h.setQueryData(["scst-targets"],_=>_&&_.map(w=>w.id===r.id?{...w,lun_count:Math.max(0,(w.lun_count||0)-1)}:w)),{previousTarget:g,previousTargets:j}},onSuccess:async()=>{h.removeQueries({queryKey:["scst-target",r.id]}),await h.invalidateQueries({queryKey:["scst-targets"]}),await h.invalidateQueries({queryKey:["scst-target",r.id]}),t&&await h.refetchQueries({queryKey:["scst-target",r.id]}),await h.refetchQueries({queryKey:["scst-targets"],type:"active"})},onError:(B,g,j)=>{if(B.response?.status===404){h.invalidateQueries({queryKey:["scst-target",r.id]}),h.invalidateQueries({queryKey:["scst-targets"]}),h.refetchQueries({queryKey:["scst-target",r.id]}),h.refetchQueries({queryKey:["scst-targets"]});return}j?.previousTarget&&h.setQueryData(["scst-target",r.id],j.previousTarget),j?.previousTargets&&h.setQueryData(["scst-targets"],j.previousTargets),h.refetchQueries({queryKey:["scst-target",r.id]}),h.refetchQueries({queryKey:["scst-targets"]}),alert(`Failed to remove LUN: ${B.response?.data?.error||B.message}`)}});return e.jsxs("div",{className:`group border-b border-border-dark ${t?"bg-white/[0.02]":"bg-transparent"}`,children:[e.jsxs("div",{className:`flex items-center p-4 gap-4 hover:bg-white/5 transition-colors cursor-pointer border-l-4 ${t?"border-primary":"border-transparent hover:border-border-dark"}`,onClick:s,children:[e.jsx("div",{className:`p-2 rounded-md ${t?"bg-primary/10 text-primary":"bg-border-dark/50 text-text-secondary"}`,children:e.jsx(ya,{size:24})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-white font-bold text-sm",children:r.alias||r.iqn.split(":").pop()}),e.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wide border ${m}`,children:x}),r.is_active?e.jsx("button",{onClick:B=>{B.stopPropagation(),confirm("Disable this target? It will stop accepting iSCSI connections.")&&p.mutate()},className:"px-2 py-1 text-xs bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded border border-red-500/20",title:"Disable target",children:"Disable"}):e.jsx("button",{onClick:B=>{B.stopPropagation(),y.mutate()},className:"px-2 py-1 text-xs bg-green-500/20 text-green-400 hover:bg-green-500/30 rounded border border-green-500/20",title:"Enable target",children:"Enable"})]}),e.jsxs("div",{className:"flex items-center gap-2 group/iqn",children:[e.jsx("span",{className:"text-text-secondary font-mono text-xs truncate",children:r.iqn}),e.jsx("button",{className:"opacity-0 group-hover/iqn:opacity-100 text-text-secondary hover:text-white transition-opacity",title:"Copy IQN",onClick:B=>{B.stopPropagation(),navigator.clipboard.writeText(r.iqn)},children:e.jsx(so,{size:14})})]})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-8 mr-4",children:[e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsx("span",{className:"text-[10px] uppercase text-text-secondary font-bold tracking-wider",children:"LUNs"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ul,{className:"text-text-secondary",size:16}),e.jsx("span",{className:"text-white text-sm font-bold",children:r.lun_count||0})]})]}),e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsx("span",{className:"text-[10px] uppercase text-text-secondary font-bold tracking-wider",children:"Auth"}),e.jsx("span",{className:"text-white text-sm font-medium",children:"None"})]})]}),e.jsx("button",{className:"p-2 hover:bg-white/10 rounded-full text-text-secondary hover:text-white transition-colors",onClick:B=>{B.stopPropagation(),s()},children:t?e.jsx(j6,{size:24}):e.jsx(wh,{size:24})})]}),t&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg p-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Attached LUNs"}),e.jsx(ba,{to:`/iscsi/${r.id}`,className:"text-primary text-xs font-bold hover:underline",onClick:B=>B.stopPropagation(),children:"+ Add LUN"})]}),e.jsx("div",{className:"flex flex-col gap-2",children:l.length>0?l.map(B=>e.jsxs("div",{className:"p-3 rounded bg-card-dark border border-border-dark flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-white text-sm font-medium",children:["LUN ",B.lun_number]}),B.is_active&&e.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded bg-green-100 text-green-800",children:"Active"})]}),e.jsxs("div",{className:"text-text-secondary text-xs",children:[B.handler||"Unknown"," • ",B.device_path||"No path"]}),e.jsx("div",{className:"text-text-secondary text-xs",children:B.device_type||"Unknown type"})]}),e.jsx("button",{onClick:()=>{confirm(`Remove LUN ${B.lun_number} from this target?`)&&N.mutate({targetId:r.id,lunId:B.id})},disabled:N.isPending,className:"p-1.5 hover:bg-red-500/10 rounded text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50",title:"Remove LUN",children:e.jsx(es,{size:14})})]},B.id)):e.jsx("div",{className:"p-3 rounded bg-card-dark border border-border-dark text-center text-text-secondary text-sm",children:"No LUNs attached"})})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Access Control"}),e.jsx("button",{className:"text-primary text-xs font-bold hover:underline",onClick:B=>{B.stopPropagation(),u(!0)},children:"Edit Policy"}),e.jsxs("button",{onClick:B=>{B.stopPropagation(),confirm(`Delete target "${r.alias||r.iqn}"? This will remove the target from SCST and all associated LUNs and initiators. This action cannot be undone.`)&&v.mutate()},disabled:v.isPending,className:"px-3 py-1.5 text-xs bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded border border-red-500/20 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[e.jsx(es,{size:14}),"Delete Target"]})]}),e.jsx("div",{className:"flex flex-col gap-2 h-full",children:e.jsxs("div",{className:"p-3 rounded bg-card-dark border border-border-dark flex flex-col gap-2",children:[e.jsxs("div",{className:"flex justify-between items-center pb-2 border-b border-border-dark/50",children:[e.jsx("span",{className:"text-text-secondary text-xs",children:"Auth Method"}),e.jsx("span",{className:"text-white text-xs font-bold",children:"None"})]}),e.jsxs("div",{className:"flex justify-between items-center py-1",children:[e.jsx("span",{className:"text-text-secondary text-xs",children:"Initiator Group"}),d.length>0?e.jsx("div",{className:"flex flex-col items-end gap-1",children:d.map(B=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-primary text-xs font-bold",children:B.group_name}),e.jsxs("span",{className:"text-text-secondary text-xs",children:["(",B.initiators?.length||0," initiators)"]})]},B.id))}):e.jsx("span",{className:"text-text-secondary text-xs",children:"None"})]}),d.length>0&&e.jsx("div",{className:"pt-2 border-t border-border-dark/50",children:e.jsx("div",{className:"flex flex-col gap-1",children:d.flatMap(B=>(B.initiators||[]).map(g=>e.jsx("div",{className:"text-text-secondary text-xs font-mono",children:g.iqn},g.id)))})})]})})]}),e.jsx("div",{className:"col-span-1 lg:col-span-2 flex justify-end gap-2 mt-2 pt-3 border-t border-border-dark/50",children:e.jsx(ba,{to:`/iscsi/${r.id}`,className:"px-3 py-1.5 rounded text-xs font-bold bg-primary text-white hover:bg-blue-600 transition-colors",children:"View Details"})})]})}),c&&e.jsx(xS,{target:r,initiatorGroups:d,onClose:()=>u(!1),onSuccess:()=>{h.invalidateQueries({queryKey:["scst-target",r.id]}),u(!1)}})]})}function xS({target:r,initiatorGroups:t,onClose:s,onSuccess:n}){const[o,l]=Ce.useState(""),d=Nr(),c=ft({mutationFn:x=>br.addInitiator(r.id,{initiator_iqn:x}),onSuccess:()=>{d.invalidateQueries({queryKey:["scst-target",r.id]}),l(""),n()},onError:x=>{alert(`Failed to add initiator: ${x.response?.data?.error||x.message}`)}}),u=ft({mutationFn:x=>br.removeInitiator(x),onSuccess:()=>{d.invalidateQueries({queryKey:["scst-target",r.id]}),d.invalidateQueries({queryKey:["scst-initiators"]}),n()},onError:x=>{alert(`Failed to remove initiator: ${x.response?.data?.error||x.message}`)}}),h=x=>{if(x.preventDefault(),!o.trim()){alert("Please enter an initiator IQN");return}c.mutate(o.trim())},m=t.flatMap(x=>x.initiators||[]);return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:s,children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",onClick:x=>x.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-border-dark flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Edit Access Policy"}),e.jsxs("p",{className:"text-sm text-text-secondary mt-1",children:["Manage initiators for ",r.iqn]})]}),e.jsx("button",{onClick:s,className:"p-2 hover:bg-white/10 rounded-lg text-text-secondary hover:text-white transition-colors",children:e.jsx(Zs,{size:20})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-white mb-3",children:"Add Initiator"}),e.jsxs("form",{onSubmit:h,className:"flex gap-2",children:[e.jsx("input",{type:"text",value:o,onChange:x=>l(x.target.value),placeholder:"iqn.2025-12.example:initiator",className:"flex-1 px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx(ct,{type:"submit",disabled:c.isPending,className:"px-4 bg-primary hover:bg-blue-600",children:c.isPending?"Adding...":"Add"})]})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-bold text-white mb-3",children:["Current Initiators (",m.length,")"]}),m.length>0?e.jsx("div",{className:"space-y-2",children:m.map(x=>e.jsxs("div",{className:"p-3 rounded bg-[#0f161d] border border-border-dark flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded bg-primary/10 text-primary",children:e.jsx(ya,{size:16})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-white text-sm font-mono",children:x.iqn}),e.jsx("div",{className:"text-text-secondary text-xs",children:x.is_active?"Active":"Inactive"})]})]}),e.jsx("button",{onClick:()=>{confirm(`Remove initiator ${x.iqn}?`)&&u.mutate(x.id)},disabled:u.isPending,className:"p-2 hover:bg-red-500/10 rounded-lg text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Remove initiator",children:e.jsx(es,{size:16})})]},x.id))}):e.jsx("div",{className:"p-4 rounded bg-[#0f161d] border border-border-dark text-center text-text-secondary text-sm",children:"No initiators configured"})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-white mb-3",children:"Authentication Method"}),e.jsxs("div",{className:"p-3 rounded bg-[#0f161d] border border-border-dark",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-text-secondary text-sm",children:"Current Method"}),e.jsx("span",{className:"text-white text-sm font-bold",children:"None"})]}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"Authentication configuration coming soon"})]})]})]}),e.jsx("div",{className:"p-6 border-t border-border-dark flex justify-end gap-2",children:e.jsx(ct,{variant:"outline",onClick:s,className:"px-4",children:"Close"})})]})})}function gS({onClose:r,onSuccess:t}){const[s,n]=Ce.useState(""),[o,l]=Ce.useState(""),[d,c]=Ce.useState("disk"),[u,h]=Ce.useState(""),m=Nr(),x=ft({mutationFn:br.createTarget,onSuccess:async p=>{await m.invalidateQueries({queryKey:["scst-targets"]}),await m.refetchQueries({queryKey:["scst-targets"]}),p?.id&&await m.invalidateQueries({queryKey:["scst-target",p.id]}),t()},onError:p=>{console.error("Failed to create target:",p);const v=p.response?.data?.error||p.message||"Failed to create target";alert(v)}}),y=p=>{if(p.preventDefault(),!s.trim()||!o.trim()){alert("IQN and Name are required");return}const v={iqn:s.trim(),target_type:d,name:o.trim(),description:u.trim()||void 0};console.log("Creating target:",v),x.mutate(v)};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"p-6 border-b border-border-dark",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Create iSCSI Target"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Create a new SCST iSCSI target"})]}),e.jsxs("form",{onSubmit:y,className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"iqn",className:"block text-sm font-medium text-white mb-1",children:"IQN (iSCSI Qualified Name) *"}),e.jsx("input",{id:"iqn",type:"text",value:s,onChange:p=>n(p.target.value),placeholder:"iqn.2024-01.com.example:target1",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Format: iqn.YYYY-MM.reverse.domain:identifier"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-white mb-1",children:"Name *"}),e.jsx("input",{id:"name",type:"text",value:o,onChange:p=>l(p.target.value),placeholder:"My Target",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"targetType",className:"block text-sm font-medium text-white mb-1",children:"Target Type *"}),e.jsxs("select",{id:"targetType",value:d,onChange:p=>c(p.target.value),className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0,children:[e.jsx("option",{value:"disk",children:"Disk"}),e.jsx("option",{value:"vtl",children:"Virtual Tape Library"}),e.jsx("option",{value:"physical_tape",children:"Physical Tape"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-white mb-1",children:"Description (Optional)"}),e.jsx("textarea",{id:"description",value:u,onChange:p=>h(p.target.value),placeholder:"Target description",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",rows:3})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:x.isPending,children:x.isPending?"Creating...":"Create Target"})]})]})]})})}function bS(){const r=Nr(),[t,s]=Ce.useState(!1),[n,o]=Ce.useState(null),{data:l=[],isLoading:d}=dt({queryKey:["scst-portals"],queryFn:br.listPortals}),c=ft({mutationFn:br.deletePortal,onSuccess:()=>{r.invalidateQueries({queryKey:["scst-portals"]})},onError:h=>{alert(`Failed to delete portal: ${h.response?.data?.error||h.message}`)}}),u=h=>{confirm(`Delete portal ${h.ip_address}:${h.port}?`)&&c.mutate(h.id)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-2xl font-bold",children:"iSCSI Portals"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage network portals for iSCSI connections"})]}),e.jsxs(ct,{onClick:()=>s(!0),className:"flex items-center gap-2 px-4 h-10 rounded-lg bg-primary hover:bg-blue-600 text-white text-sm font-bold",children:[e.jsx(Ks,{size:20}),e.jsx("span",{children:"Create Portal"})]})]}),d?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading portals..."}):l.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(h=>e.jsxs("div",{className:"p-4 rounded-lg bg-card-dark border border-border-dark hover:border-primary/50 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ya,{size:20,className:"text-primary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-white font-bold text-sm",children:h.ip_address}),e.jsxs("div",{className:"text-text-secondary text-xs",children:["Port: ",h.port]})]})]}),e.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold ${h.is_active?"bg-green-500/20 text-green-400 border border-green-500/20":"bg-gray-500/20 text-gray-400 border border-gray-500/20"}`,children:h.is_active?"Active":"Inactive"})]}),e.jsxs("div",{className:"flex gap-2 mt-4",children:[e.jsx(ct,{variant:"outline",size:"sm",onClick:()=>o(h),className:"flex-1 text-xs",children:"Edit"}),e.jsx(ct,{variant:"outline",size:"sm",onClick:()=>u(h),disabled:c.isPending,className:"flex-1 text-xs text-red-400 hover:text-red-300 hover:bg-red-500/10",children:"Delete"})]})]},h.id))}):e.jsxs("div",{className:"p-12 text-center rounded-lg bg-card-dark border border-border-dark",children:[e.jsx(ya,{size:48,className:"mx-auto text-text-secondary mb-4"}),e.jsx("p",{className:"text-text-secondary",children:"No portals configured"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Create a portal to start accepting iSCSI connections"})]}),(t||n)&&e.jsx(yS,{portal:n,onClose:()=>{s(!1),o(null)},onSuccess:()=>{r.invalidateQueries({queryKey:["scst-portals"]}),s(!1),o(null)}})]})}function yS({portal:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(r?.ip_address||"0.0.0.0"),[l,d]=Ce.useState(r?.port||3260),[c,u]=Ce.useState(r?.is_active??!0),h=Nr(),m=ft({mutationFn:v=>br.createPortal(v),onSuccess:()=>{h.invalidateQueries({queryKey:["scst-portals"]}),s()},onError:v=>{alert(`Failed to create portal: ${v.response?.data?.error||v.message}`)}}),x=ft({mutationFn:v=>br.updatePortal(r.id,v),onSuccess:()=>{h.invalidateQueries({queryKey:["scst-portals"]}),s()},onError:v=>{alert(`Failed to update portal: ${v.response?.data?.error||v.message}`)}}),y=v=>{v.preventDefault();const N={ip_address:n.trim(),port:parseInt(l.toString()),is_active:c};r?x.mutate(N):m.mutate(N)},p=m.isPending||x.isPending;return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:t,children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl max-w-md w-full",onClick:v=>v.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-border-dark flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:r?"Edit Portal":"Create Portal"}),e.jsx("button",{onClick:t,className:"p-2 hover:bg-white/10 rounded-lg text-text-secondary hover:text-white transition-colors",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:y,className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"ipAddress",className:"block text-sm font-medium text-white mb-1",children:"IP Address *"}),e.jsx("input",{id:"ipAddress",type:"text",value:n,onChange:v=>o(v.target.value),placeholder:"0.0.0.0 (all interfaces) or specific IP",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Use 0.0.0.0 to listen on all interfaces, or specify an IP address"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"port",className:"block text-sm font-medium text-white mb-1",children:"Port *"}),e.jsx("input",{id:"port",type:"number",value:l,onChange:v=>d(parseInt(v.target.value)||3260),min:"1",max:"65535",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Default iSCSI port is 3260"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"isActive",type:"checkbox",checked:c,onChange:v=>u(v.target.checked),className:"w-4 h-4 rounded bg-[#0f161d] border-border-dark text-primary focus:ring-primary"}),e.jsx("label",{htmlFor:"isActive",className:"text-sm text-white",children:"Active"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,disabled:p,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:p,children:p?r?"Updating...":"Creating...":r?"Update":"Create"})]})]})]})})}function wS(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState("all"),{data:l=[],isLoading:d}=dt({queryKey:["scst-initiators"],queryFn:br.listInitiators}),c=ft({mutationFn:br.removeInitiator,onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiators"]}),r.invalidateQueries({queryKey:["scst-targets"]})},onError:m=>{alert(`Failed to remove initiator: ${m.response?.data?.error||m.message}`)}}),u=l.filter(m=>{const x=m.iqn.toLowerCase().includes(t.toLowerCase())||m.target_iqn&&m.target_iqn.toLowerCase().includes(t.toLowerCase())||m.target_name&&m.target_name.toLowerCase().includes(t.toLowerCase()),y=n==="all"||n==="active"&&m.is_active||n==="inactive"&&!m.is_active;return x&&y}),h=m=>{confirm(`Remove initiator ${m.iqn}?`)&&c.mutate(m.id)};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-2xl font-bold",children:"iSCSI Initiators"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage initiator access control lists"})]})}),e.jsxs("div",{className:"p-4 flex items-center justify-between gap-4 border-b border-border-dark/50 bg-[#141d26]",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search initiators by IQN or target...",value:t,onChange:m=>s(m.target.value),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg pl-10 pr-4 py-2 text-sm text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all placeholder-text-secondary/50"})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-md bg-[#0f161d] border border-border-dark",children:[e.jsx("span",{className:"text-xs text-text-secondary font-medium",children:"Filter:"}),e.jsxs("select",{value:n,onChange:m=>o(m.target.value),className:"bg-[#0f161d] text-xs text-white font-medium focus:outline-none cursor-pointer border-none appearance-none pr-6",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0 center",paddingRight:"24px"},children:[e.jsx("option",{value:"all",className:"bg-[#0f161d] text-white",children:"All Status"}),e.jsx("option",{value:"active",className:"bg-[#0f161d] text-white",children:"Active"}),e.jsx("option",{value:"inactive",className:"bg-[#0f161d] text-white",children:"Inactive"})]})]})})]}),d?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading initiators..."}):u.length>0?e.jsx("div",{className:"bg-[#141d26] border border-border-dark rounded-lg overflow-hidden",children:e.jsx("div",{className:"divide-y divide-border-dark",children:u.map(m=>e.jsxs("div",{className:"p-4 hover:bg-white/5 transition-colors flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-4",children:[e.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:e.jsx(ya,{size:20})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("span",{className:"text-white font-mono text-sm font-medium truncate",children:m.iqn}),e.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wide border ${m.is_active?"bg-green-500/20 text-green-400 border-green-500/20":"bg-red-500/20 text-red-400 border-red-500/20"}`,children:m.is_active?"Active":"Inactive"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary flex-wrap mt-1",children:[m.target_iqn&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"font-semibold text-text-secondary/80",children:"Target:"}),e.jsx("span",{className:"font-mono text-white/90 truncate max-w-[300px]",title:m.target_iqn,children:m.target_name||m.target_iqn.split(":").pop()})]}),m.group_name&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"font-semibold text-text-secondary/80",children:"Group:"}),e.jsx("span",{className:"font-mono text-white/90 truncate max-w-[300px]",title:m.group_name,children:m.group_name})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(m.iqn)},className:"p-2 hover:bg-white/10 rounded-lg text-text-secondary hover:text-white transition-colors",title:"Copy IQN",children:e.jsx(so,{size:16})}),e.jsx("button",{onClick:()=>h(m),disabled:c.isPending,className:"p-2 hover:bg-red-500/10 rounded-lg text-text-secondary hover:text-red-400 transition-colors",title:"Remove initiator",children:e.jsx(es,{size:16})})]})]},m.id))})}):e.jsxs("div",{className:"p-12 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-border-dark/50 mb-4",children:e.jsx(ya,{className:"text-text-secondary",size:32})}),e.jsx("p",{className:"text-white font-medium mb-1",children:"No initiators found"}),e.jsx("p",{className:"text-text-secondary text-sm",children:t||n!=="all"?"Try adjusting your search or filter criteria":"Initiators will appear here once they are added to targets"})]})]})}function vS(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState(!1),[l,d]=Ce.useState([]),{data:c=[],isLoading:u}=dt({queryKey:["scst-extents"],queryFn:()=>br.listExtents(),refetchInterval:3e3,refetchIntervalInBackground:!0,refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0,gcTime:0,structuralSharing:!1}),{data:h}=dt({queryKey:["scst-handlers"],queryFn:br.listHandlers});Ce.useEffect(()=>{h&&d(h.map(p=>({name:p.name,label:p.label,description:p.description})))},[h]);const m=ft({mutationFn:br.deleteExtent,onMutate:async p=>{await r.cancelQueries({queryKey:["scst-extents"]}),await r.cancelQueries({queryKey:["scst-targets"]});const v=r.getQueryData(["scst-extents"]);return r.setQueryData(["scst-extents"],N=>N?N.filter(B=>B.device_name!==p):[]),{previousExtents:v}},onSuccess:async()=>{r.removeQueries({queryKey:["scst-extents"]}),r.removeQueries({queryKey:["scst-targets"]}),await r.invalidateQueries({queryKey:["scst-extents"]}),await r.invalidateQueries({queryKey:["scst-targets"]}),await r.refetchQueries({queryKey:["scst-extents"],type:"all"}),await r.refetchQueries({queryKey:["scst-targets"],type:"all"})},onError:(p,v,N)=>{N?.previousExtents&&r.setQueryData(["scst-extents"],N.previousExtents),r.refetchQueries({queryKey:["scst-extents"]}),alert(`Failed to delete extent: ${p.response?.data?.error||p.message}`)}}),x=c.filter(p=>p.device_name.toLowerCase().includes(t.toLowerCase())||p.device_path.toLowerCase().includes(t.toLowerCase())||p.handler_type.toLowerCase().includes(t.toLowerCase())),y=p=>{if(p.is_in_use){alert(`Cannot delete extent ${p.device_name}: it is in use by ${p.lun_count} LUN(s)`);return}confirm(`Delete extent ${p.device_name}?`)&&m.mutate(p.device_name)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-2xl font-bold",children:"iSCSI Extents"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage device extents (opened devices) for iSCSI LUNs"})]}),e.jsxs(ct,{onClick:()=>o(!0),className:"flex items-center gap-2 px-4 h-10 rounded-lg bg-primary hover:bg-blue-600 text-white text-sm font-bold",children:[e.jsx(Ks,{size:20}),e.jsx("span",{children:"Create Extent"})]})]}),e.jsx("div",{className:"p-4 flex items-center justify-between gap-4 border-b border-border-dark/50 bg-[#141d26]",children:e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search extents by device name, path, or handler...",value:t,onChange:p=>s(p.target.value),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg pl-10 pr-4 py-2 text-sm text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all placeholder-text-secondary/50"})]})}),u?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading extents..."}):x.length>0?e.jsx("div",{className:"bg-[#141d26] border border-border-dark rounded-lg overflow-hidden",children:e.jsx("div",{className:"divide-y divide-border-dark",children:x.map((p,v)=>e.jsxs("div",{className:"p-4 hover:bg-white/5 transition-colors flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-4",children:[e.jsx("div",{className:`p-2 rounded-md ${p.is_in_use?"bg-yellow-500/10 text-yellow-400":"bg-primary/10 text-primary"}`,children:e.jsx(Ul,{size:20})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("span",{className:"text-white font-mono text-sm font-medium",children:p.device_name}),p.is_in_use&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wide border bg-yellow-500/20 text-yellow-400 border-yellow-500/20",children:["In Use (",p.lun_count," LUN",p.lun_count!==1?"s":"",")"]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium",children:"Handler:"}),e.jsx("span",{className:"truncate",children:p.handler_type})]}),p.device_path&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium",children:"Path:"}),e.jsx("span",{className:"font-mono truncate max-w-[400px]",children:p.device_path})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>{p.device_path&&navigator.clipboard.writeText(p.device_path)},className:"p-2 hover:bg-white/10 rounded-lg text-text-secondary hover:text-white transition-colors",title:"Copy device path",children:e.jsx(so,{size:16})}),e.jsx("button",{onClick:()=>y(p),disabled:m.isPending||p.is_in_use,className:"p-2 hover:bg-red-500/10 rounded-lg text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:p.is_in_use?"Cannot delete: extent is in use":"Delete extent",children:e.jsx(es,{size:16})})]})]},`${p.handler_type}-${p.device_name}-${v}`))})}):e.jsxs("div",{className:"p-12 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-border-dark/50 mb-4",children:e.jsx(Ul,{className:"text-text-secondary",size:32})}),e.jsx("p",{className:"text-white font-medium mb-1",children:"No extents found"}),e.jsx("p",{className:"text-text-secondary text-sm",children:t?"Try adjusting your search criteria":"Create an extent to make a device available for iSCSI LUNs"})]}),n&&e.jsx(NS,{handlers:l,onClose:()=>o(!1),onSuccess:async()=>{o(!1),r.removeQueries({queryKey:["scst-extents"]}),await r.invalidateQueries({queryKey:["scst-extents"]}),await r.refetchQueries({queryKey:["scst-extents"],type:"active"})}})]})}function NS({handlers:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(""),[l,d]=Ce.useState(""),[c,u]=Ce.useState(""),h=ft({mutationFn:y=>br.createExtent(y),onSuccess:async()=>{await s(),alert("Extent created successfully!")},onError:y=>{alert(`Failed to create extent: ${y.response?.data?.error||y.message}`)}}),m=y=>{if(y.preventDefault(),!n||!l||!c){alert("Please fill in all required fields");return}h.mutate({device_name:n,device_path:l,handler_type:c})},x=y=>{if(d(y),!n&&y){const p=y.split("/"),v=p[p.length-1];v&&o(v)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#141d26] border border-border-dark rounded-lg p-6 w-full max-w-md",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Create Extent"}),e.jsx("button",{onClick:t,className:"text-text-secondary hover:text-white transition-colors",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:m,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"handlerType",className:"block text-sm font-medium text-white mb-1",children:"Handler Type *"}),e.jsxs("select",{id:"handlerType",value:c,onChange:y=>u(y.target.value),className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0,children:[e.jsx("option",{value:"",children:"Select handler..."}),r.map(y=>e.jsxs("option",{value:y.name,className:"bg-[#0f161d] text-white",children:[y.label||y.name," - ",y.description]},y.name))]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"devicePath",className:"block text-sm font-medium text-white mb-1",children:"Device Path *"}),e.jsx("input",{id:"devicePath",type:"text",value:l,onChange:y=>x(y.target.value),placeholder:"/dev/zvol/pool/volume or /path/to/file",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Full path to the device or file"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"deviceName",className:"block text-sm font-medium text-white mb-1",children:"Device Name *"}),e.jsx("input",{id:"deviceName",type:"text",value:n,onChange:y=>o(y.target.value),placeholder:"LUN01",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Unique name for this device in SCST"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,disabled:h.isPending,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:h.isPending,children:h.isPending?"Creating...":"Create Extent"})]})]})]})})}function BS(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(null),[c,u]=Ce.useState(null),[h,m]=Ce.useState(null),{data:x=[],isLoading:y}=dt({queryKey:["scst-initiator-groups"],queryFn:br.listInitiatorGroups,refetchInterval:3e3,refetchIntervalInBackground:!0,refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0,gcTime:0,structuralSharing:!1}),{data:p=[]}=dt({queryKey:["scst-targets"],queryFn:br.listTargets}),v=ft({mutationFn:L=>br.createInitiatorGroup(L),onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiator-groups"]}),r.invalidateQueries({queryKey:["scst-targets"]}),o(!1)},onError:L=>{alert(`Failed to create group: ${L.response?.data?.error||L.message}`)}}),N=ft({mutationFn:({id:L,data:K})=>br.updateInitiatorGroup(L,K),onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiator-groups"]}),r.invalidateQueries({queryKey:["scst-targets"]}),d(null)},onError:L=>{alert(`Failed to update group: ${L.response?.data?.error||L.message}`)}}),B=ft({mutationFn:L=>br.deleteInitiatorGroup(L),onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiator-groups"]}),r.invalidateQueries({queryKey:["scst-targets"]})},onError:L=>{alert(`Failed to delete group: ${L.response?.data?.error||L.message}`)}}),g=ft({mutationFn:({groupId:L,initiatorIQN:K})=>br.addInitiatorToGroup(L,K),onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiator-groups"]}),r.invalidateQueries({queryKey:["scst-targets"]}),r.invalidateQueries({queryKey:["scst-initiators"]}),m(null)},onError:L=>{alert(`Failed to add initiator: ${L.response?.data?.error||L.message}`)}}),j=ft({mutationFn:L=>br.removeInitiator(L),onSuccess:()=>{r.invalidateQueries({queryKey:["scst-initiator-groups"]}),r.invalidateQueries({queryKey:["scst-targets"]}),r.invalidateQueries({queryKey:["scst-initiators"]})},onError:L=>{alert(`Failed to remove initiator: ${L.response?.data?.error||L.message}`)}}),_=x.filter(L=>{const K=p.find(V=>V.id===L.target_id);return L.group_name.toLowerCase().includes(t.toLowerCase())||K&&((K.alias||K.iqn).toLowerCase().includes(t.toLowerCase())||K.iqn.toLowerCase().includes(t.toLowerCase()))}),w=L=>{if(L.initiators&&L.initiators.length>0){alert(`Cannot delete group: Group contains ${L.initiators.length} initiator(s). Please remove all initiators first.`);return}confirm(`Delete initiator group "${L.group_name}"?`)&&B.mutate(L.id)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-2xl font-bold",children:"iSCSI Initiator Groups"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage initiator access control groups"})]}),e.jsxs(ct,{onClick:()=>o(!0),children:[e.jsx(Ks,{size:16,className:"mr-2"}),"Create Group"]})]}),e.jsx("div",{className:"p-4 flex items-center justify-between gap-4 border-b border-border-dark/50 bg-[#141d26]",children:e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search groups by name or target...",value:t,onChange:L=>s(L.target.value),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg pl-10 pr-4 py-2 text-sm text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all placeholder-text-secondary/50"})]})}),y?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading groups..."}):_.length>0?e.jsx("div",{className:"bg-[#141d26] border border-border-dark rounded-lg overflow-hidden",children:e.jsx("div",{className:"divide-y divide-border-dark",children:_.map(L=>{const K=p.find(V=>V.id===L.target_id),M=c===L.id;return e.jsxs("div",{className:"border-b border-border-dark last:border-b-0",children:[e.jsx("div",{className:"p-4 hover:bg-white/5 transition-colors",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("button",{onClick:()=>u(M?null:L.id),className:"p-2 rounded-md bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:M?e.jsx(wh,{size:20}):e.jsx(Ka,{size:20})}),e.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:e.jsx(ya,{size:20})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-3 mb-1",children:e.jsx("span",{className:"text-white font-mono text-sm font-medium",children:L.group_name})}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary",children:[K&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium",children:"Target:"}),e.jsx("span",{className:"font-mono truncate max-w-[300px]",title:K.iqn,children:K.alias||K.iqn.split(":").pop()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium",children:"Initiators:"}),e.jsx("span",{className:"text-white/90",children:L.initiators?.length||0})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium",children:"Created:"}),e.jsx("span",{children:new Date(L.created_at).toLocaleDateString()})]})]})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>d(L),className:"p-2 hover:bg-white/10 rounded-lg text-text-secondary hover:text-white transition-colors",title:"Edit group name",children:e.jsx(vc,{size:16})}),e.jsx("button",{onClick:()=>w(L),disabled:B.isPending,className:"p-2 hover:bg-red-500/10 rounded-lg text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50",title:"Delete group",children:e.jsx(es,{size:16})})]})]})}),M&&e.jsxs("div",{className:"px-4 pb-4 bg-[#0f161d] border-t border-border-dark",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 mt-3",children:[e.jsx("h4",{className:"text-white text-sm font-semibold",children:"Group Members"}),e.jsxs(ct,{size:"sm",onClick:()=>m(L.id),variant:"outline",children:[e.jsx(Ks,{size:14,className:"mr-1"}),"Add Initiator"]})]}),L.initiators&&L.initiators.length>0?e.jsx("div",{className:"space-y-2",children:L.initiators.map(V=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#141d26] border border-border-dark rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"p-1.5 rounded bg-primary/10 text-primary",children:e.jsx(ya,{size:14})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-white font-mono text-xs truncate",children:V.iqn}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold uppercase ${V.is_active?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:V.is_active?"Active":"Inactive"})]})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(V.iqn)},className:"p-1.5 hover:bg-white/10 rounded text-text-secondary hover:text-white transition-colors",title:"Copy IQN",children:e.jsx(so,{size:14})}),e.jsx("button",{onClick:()=>{confirm(`Remove initiator "${V.iqn}" from this group?`)&&j.mutate(V.id)},disabled:j.isPending,className:"p-1.5 hover:bg-red-500/10 rounded text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50",title:"Remove initiator",children:e.jsx(es,{size:14})})]})]},V.id))}):e.jsxs("div",{className:"p-6 text-center border border-border-dark rounded-lg bg-[#141d26]",children:[e.jsx("p",{className:"text-text-secondary text-sm mb-2",children:"No initiators in this group"}),e.jsxs(ct,{size:"sm",onClick:()=>m(L.id),variant:"outline",children:[e.jsx(Ks,{size:14,className:"mr-1"}),"Add First Initiator"]})]})]})]},L.id)})})}):e.jsxs("div",{className:"p-12 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-border-dark/50 mb-4",children:e.jsx(ya,{className:"text-text-secondary",size:32})}),e.jsx("p",{className:"text-white font-medium mb-1",children:"No groups found"}),e.jsx("p",{className:"text-text-secondary text-sm",children:t?"Try adjusting your search criteria":"Create an initiator group to organize initiators by access control"})]}),n&&e.jsx(jS,{targets:p,onClose:()=>o(!1),isLoading:v.isPending,onSubmit:L=>v.mutate(L)}),l&&e.jsx(CS,{group:l,onClose:()=>d(null),isLoading:N.isPending,onSubmit:L=>N.mutate({id:l.id,data:L})}),h&&e.jsx(SS,{groupName:x.find(L=>L.id===h)?.group_name||"",onClose:()=>m(null),isLoading:g.isPending,onSubmit:L=>g.mutate({groupId:h,initiatorIQN:L})})]})}function jS({targets:r,onClose:t,isLoading:s,onSubmit:n}){const[o,l]=Ce.useState(""),[d,c]=Ce.useState(""),u=h=>{if(h.preventDefault(),!o||!d.trim()){alert("Please fill in all required fields");return}n({target_id:o,group_name:d.trim()})};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#141d26] border border-border-dark rounded-lg p-6 w-full max-w-md",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Create Initiator Group"}),e.jsx("button",{onClick:t,className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:u,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-2",children:"Target *"}),e.jsxs("select",{value:o,onChange:h=>l(h.target.value),className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0,children:[e.jsx("option",{value:"",children:"Select a target"}),r.map(h=>e.jsxs("option",{value:h.id,className:"bg-[#0f161d] text-white",children:[h.alias||h.iqn.split(":").pop()," (",h.iqn,")"]},h.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-2",children:"Group Name *"}),e.jsx("input",{type:"text",value:d,onChange:h=>c(h.target.value),placeholder:"my-acl-group",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Group name will be used as ACL group name in SCST"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 mt-6",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,disabled:s,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:s,children:s?"Creating...":"Create"})]})]})]})})}function CS({group:r,onClose:t,isLoading:s,onSubmit:n}){const[o,l]=Ce.useState(r.group_name),d=c=>{if(c.preventDefault(),!o.trim()){alert("Group name cannot be empty");return}n({group_name:o.trim()})};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#141d26] border border-border-dark rounded-lg p-6 w-full max-w-md",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Edit Initiator Group"}),e.jsx("button",{onClick:t,className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:d,children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-2",children:"Group Name *"}),e.jsx("input",{type:"text",value:o,onChange:c=>l(c.target.value),placeholder:"my-acl-group",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Changing the group name will recreate it in SCST"})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 mt-6",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,disabled:s,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:s,children:s?"Updating...":"Update"})]})]})]})})}function SS({groupName:r,onClose:t,isLoading:s,onSubmit:n}){const[o,l]=Ce.useState(""),d=c=>{if(c.preventDefault(),!o.trim()){alert("Please enter an initiator IQN");return}if(!o.trim().toLowerCase().startsWith("iqn.")){alert('Invalid IQN format. IQN must start with "iqn."');return}n(o.trim())};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#141d26] border border-border-dark rounded-lg p-6 w-full max-w-md",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Add Initiator to Group"}),e.jsx("button",{onClick:t,className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:d,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-2",children:"Group"}),e.jsx("input",{type:"text",value:r,disabled:!0,className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white/60 text-sm cursor-not-allowed"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-text-secondary mb-2",children:"Initiator IQN *"}),e.jsx("input",{type:"text",value:o,onChange:c=>l(c.target.value),placeholder:"iqn.1993-08.org.debian:01:example",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary font-mono",required:!0}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Enter the IQN of the initiator to add to this group"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 mt-6",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,disabled:s,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:s,children:s?"Adding...":"Add Initiator"})]})]})]})})}function _S(){const[r,t]=Ce.useState(""),[s,n]=Ce.useState(!0),[o,l]=Ce.useState(!1),[d,c]=Ce.useState(""),[u,h]=Ce.useState("/etc/scst.conf"),m=Ce.useRef(null),{data:x,refetch:y,isFetching:p}=dt({queryKey:["scst-config-file"],queryFn:()=>br.getConfigFile()});Ce.useEffect(()=>{x&&(t(x.content),c(x.content),h(x.path),l(!1),n(!1))},[x]),Ce.useEffect(()=>{p?n(!0):x&&n(!1)},[p,x]);const v=ft({mutationFn:j=>br.updateConfigFile(j),onSuccess:()=>{c(r),l(!1),alert("Configuration file saved successfully!")},onError:j=>{alert(`Failed to save configuration: ${j.response?.data?.error||j.message}`)}}),N=j=>{t(j.target.value),l(j.target.value!==d)},B=()=>{o&&confirm("Save changes to scst.conf? This will update the SCST configuration.")&&v.mutate(r)},g=()=>{o&&!confirm("You have unsaved changes. Reload anyway?")||(n(!0),y())};return Ce.useEffect(()=>{m.current&&m.current.focus()},[]),e.jsxs("div",{className:"flex flex-col h-full min-h-[600px] bg-[#0a0f14] border border-border-dark rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-6 py-4 border-b border-border-dark bg-[#141d26] flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Uh,{className:"text-primary",size:20}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-bold text-sm",children:"SCST Configuration Editor"}),e.jsx("p",{className:"text-text-secondary text-xs mt-0.5",children:"Edit /etc/scst.conf file directly"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ct,{variant:"outline",size:"sm",onClick:g,disabled:s,className:"flex items-center gap-2",children:[e.jsx(Cn,{size:16,className:s?"animate-spin":""}),e.jsx("span",{children:"Reload"})]}),e.jsxs(ct,{size:"sm",onClick:B,disabled:!o||v.isPending,className:"flex items-center gap-2 bg-primary hover:bg-blue-600",children:[e.jsx(up,{size:16}),e.jsx("span",{children:v.isPending?"Saving...":"Save"})]})]})]}),e.jsx("div",{className:"flex-1 relative overflow-hidden",children:s?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-text-secondary",children:[e.jsx(Cn,{size:24,className:"animate-spin mx-auto mb-2"}),e.jsx("p",{children:"Loading configuration..."})]})}):e.jsx("textarea",{ref:m,value:r,onChange:N,className:"w-full h-full p-4 bg-[#0a0f14] text-green-400 font-mono text-sm resize-none focus:outline-none focus:ring-0 border-0",style:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',lineHeight:"1.6",tabSize:2},spellCheck:!1,placeholder:"Loading configuration file..."})}),e.jsxs("div",{className:"flex-none px-6 py-3 border-t border-border-dark bg-[#141d26] flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-4 text-text-secondary",children:[e.jsxs("span",{children:["Path: ",u]}),o&&e.jsxs("span",{className:"text-yellow-400 flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 bg-yellow-400 rounded-full"}),"Unsaved changes"]})]}),e.jsxs("div",{className:"text-text-secondary",children:[r.split(`
`).length," lines"]})]})]})}function kS(){const{id:r}=jy(),t=Ph(),s=Nr(),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(!1);Ce.useEffect(()=>{console.log("showAddLUN state:",n)},[n]);const{data:c,isLoading:u}=dt({queryKey:["scst-target",r],queryFn:()=>br.getTarget(r),enabled:!!r}),h=ft({mutationFn:({targetId:p,lunId:v})=>br.removeLUN(p,v),onMutate:async({lunId:p})=>{await s.cancelQueries({queryKey:["scst-target",r]}),await s.cancelQueries({queryKey:["scst-targets"]});const v=s.getQueryData(["scst-target",r]),N=s.getQueryData(["scst-targets"]);return s.setQueryData(["scst-target",r],B=>B&&{...B,luns:B.luns?B.luns.filter(g=>g.id!==p):[]}),s.setQueryData(["scst-targets"],B=>B&&B.map(g=>g.id===r?{...g,lun_count:Math.max(0,(g.lun_count||0)-1)}:g)),{previousTarget:v,previousTargets:N}},onSuccess:()=>{s.invalidateQueries({queryKey:["scst-target",r]}),s.invalidateQueries({queryKey:["scst-targets"]})},onError:(p,v,N)=>{if(p.response?.status===404){s.invalidateQueries({queryKey:["scst-target",r]}),s.invalidateQueries({queryKey:["scst-targets"]});return}N?.previousTarget&&s.setQueryData(["scst-target",r],N.previousTarget),N?.previousTargets&&s.setQueryData(["scst-targets"],N.previousTargets),alert(`Failed to remove LUN: ${p.response?.data?.error||p.message}`)}});if(u)return e.jsx("div",{className:"text-sm text-text-secondary min-h-screen bg-background-dark p-6",children:"Loading target details..."});if(!c)return e.jsx("div",{className:"text-sm text-red-400 min-h-screen bg-background-dark p-6",children:"Target not found"});const{target:m,luns:x}=c,y=x||[];return e.jsxs("div",{className:"space-y-6 min-h-screen bg-background-dark p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxs(ct,{variant:"ghost",size:"sm",onClick:()=>t("/iscsi"),children:[e.jsx(wc,{className:"h-4 w-4 mr-2"}),"Back"]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-white font-mono text-lg",children:m.iqn}),m.alias&&e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:m.alias})]})]}),e.jsxs(ct,{variant:"outline",onClick:()=>{s.invalidateQueries({queryKey:["scst-target",r]})},children:[e.jsx(Cn,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"Target Status"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Status:"}),e.jsx("span",{className:m.is_active?"text-green-400":"text-text-secondary",children:m.is_active?"Active":"Inactive"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"IQN:"}),e.jsx("span",{className:"font-mono text-xs text-white",children:m.iqn})]})]})})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"LUNs"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Total LUNs:"}),e.jsx("span",{className:"font-medium text-white",children:y.length})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Active:"}),e.jsx("span",{className:"font-medium text-white",children:y.filter(p=>p.is_active).length})]})]})})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsx(wi,{className:"text-sm font-medium",children:"Actions"})}),e.jsx(vi,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs(ct,{variant:"outline",size:"sm",className:"w-full",onClick:()=>o(!0),children:[e.jsx(Ks,{className:"h-4 w-4 mr-2"}),"Assign Extent"]}),e.jsxs(ct,{variant:"outline",size:"sm",className:"w-full",onClick:()=>d(!0),children:[e.jsx(Vd,{className:"h-4 w-4 mr-2"}),"Add Initiator"]})]})})]})]}),e.jsxs(bi,{children:[e.jsx(yi,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(wi,{children:"LUNs (Logical Unit Numbers)"}),e.jsx(nu,{children:"Storage devices exported by this target"})]}),e.jsxs(ct,{variant:"outline",size:"sm",onClick:p=>{p.stopPropagation(),o(!0)},children:[e.jsx(Ks,{className:"h-4 w-4 mr-2"}),"Assign Extent"]})]})}),e.jsx(vi,{children:y.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-[#1a2632]",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"LUN #"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Handler"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Device Path"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Type"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase",children:"Status"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-text-secondary uppercase",children:"Actions"})]})}),e.jsx("tbody",{className:"bg-card-dark divide-y divide-border-dark",children:y.map(p=>e.jsxs("tr",{className:"hover:bg-[#233648]",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-white",children:p.lun_number}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-text-secondary",children:p.handler}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-mono text-xs text-white",children:p.device_path}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-text-secondary",children:p.device_type}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded ${p.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:p.is_active?"Active":"Inactive"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:e.jsx("button",{onClick:v=>{v.stopPropagation(),confirm(`Remove LUN ${p.lun_number} from this target?`)&&h.mutate({targetId:m.id,lunId:p.id})},disabled:h.isPending,className:"p-1.5 hover:bg-red-500/10 rounded text-text-secondary hover:text-red-400 transition-colors disabled:opacity-50",title:"Remove LUN",children:e.jsx(es,{size:16})})})]},p.id))})]})}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx(Ul,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),e.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"No LUNs configured"}),e.jsxs(ct,{variant:"outline",onClick:p=>{p.stopPropagation(),o(!0)},children:[e.jsx(Ks,{className:"h-4 w-4 mr-2"}),"Assign First Extent"]})]})})]}),n&&e.jsx(FS,{targetId:m.id,onClose:()=>o(!1),onSuccess:async()=>{o(!1),s.invalidateQueries({queryKey:["scst-target",r]}),s.invalidateQueries({queryKey:["scst-extents"]})}}),l&&e.jsx(ES,{targetId:m.id,onClose:()=>d(!1),onSuccess:()=>{d(!1),s.invalidateQueries({queryKey:["scst-target",r]})}})]})}function FS({targetId:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(""),[l,d]=Ce.useState(0),{data:c=[],isLoading:u}=dt({queryKey:["scst-extents"],queryFn:br.listExtents,staleTime:0,refetchOnMount:!0}),h=c.filter(y=>!y.is_in_use),m=ft({mutationFn:y=>br.addLUN(r,y),onSuccess:async()=>{await s()},onError:y=>{const p=y.response?.data?.error||y.message||"Failed to assign extent";alert(p)}}),x=y=>{if(y.preventDefault(),!n||l<0){alert("Please select an extent and specify LUN number");return}const p=h.find(v=>v.device_name===n);if(!p){alert("Selected extent not found");return}m.mutate({device_name:p.device_name,device_path:p.device_path,handler_type:p.handler_type,lun_number:l})};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"p-6 border-b border-border-dark",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Assign Extent"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Assign an existing extent to this target as a LUN"})]}),e.jsxs("form",{onSubmit:x,className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"extent",className:"block text-sm font-medium text-white mb-1",children:"Available Extent *"}),u?e.jsx("div",{className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-text-secondary text-sm",children:"Loading extents..."}):h.length===0?e.jsx("div",{className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-text-secondary text-sm",children:"No available extents. Please create an extent first in the Extents tab."}):e.jsxs("select",{id:"extent",value:n,onChange:y=>o(y.target.value),className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0,children:[e.jsx("option",{value:"",children:"Select an extent..."}),h.map(y=>e.jsxs("option",{value:y.device_name,children:[y.device_name," (",y.handler_type,") - ",y.device_path]},y.device_name))]}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Select an extent that has been created in the Extents tab"})]}),n&&e.jsxs("div",{className:"p-4 bg-[#0f161d] border border-border-dark rounded-lg",children:[e.jsx("p",{className:"text-sm text-text-secondary mb-2",children:"Extent Details:"}),(()=>{const y=h.find(p=>p.device_name===n);return y?e.jsxs("div",{className:"space-y-1 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Device Name:"}),e.jsx("span",{className:"text-white font-mono",children:y.device_name})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Handler:"}),e.jsx("span",{className:"text-white",children:y.handler_type})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:"Path:"}),e.jsx("span",{className:"text-white font-mono text-xs",children:y.device_path})]})]}):null})()]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"lunNumber",className:"block text-sm font-medium text-white mb-1",children:"LUN Number *"}),e.jsx("input",{id:"lunNumber",type:"number",value:l,onChange:y=>d(parseInt(y.target.value)||0),min:"0",max:"255",className:"w-full px-3 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Logical Unit Number (0-255, typically start from 0)"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:m.isPending||h.length===0,children:m.isPending?"Assigning...":"Assign Extent"})]})]})]})})}function ES({targetId:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(""),l=ft({mutationFn:c=>br.addInitiator(r,c),onSuccess:()=>{s()}}),d=c=>{if(c.preventDefault(),!n){alert("Initiator IQN is required");return}l.mutate({initiator_iqn:n.trim()})};return e.jsxs(bi,{children:[e.jsxs(yi,{children:[e.jsx(wi,{children:"Add Initiator"}),e.jsx(nu,{children:"Allow an iSCSI initiator to access this target"})]}),e.jsx(vi,{children:e.jsxs("form",{onSubmit:d,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"initiatorIqn",className:"block text-sm font-medium text-gray-700 mb-1",children:"Initiator IQN *"}),e.jsx("input",{id:"initiatorIqn",type:"text",value:n,onChange:c=>o(c.target.value),placeholder:"iqn.2024-01.com.client:initiator1",className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 font-mono text-sm",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Format: iqn.YYYY-MM.reverse.domain:identifier"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:l.isPending,children:l.isPending?"Adding...":"Add Initiator"})]})]})})]})}function US(){const[r,t]=Ce.useState(!1),[s,n]=Ce.useState(null),[o,l]=Ce.useState(null),[d,c]=Ce.useState(null),[u,h]=Ce.useState("Etc/UTC"),[m,x]=Ce.useState(["pool.ntp.org","time.google.com"]),[y,p]=Ce.useState(!1),[v,N]=Ce.useState(""),[B,g]=Ce.useState(!1),[j,_]=Ce.useState(""),w=Ce.useRef(null),L=Nr(),K=ft({mutationFn:U=>ao.saveNTPSettings(U),onSuccess:()=>{L.invalidateQueries({queryKey:["system","ntp"]}),alert("NTP settings saved successfully!")},onError:U=>{alert(`Failed to save NTP settings: ${U.message||"Unknown error"}`)}}),{data:M=[],isLoading:V}=dt({queryKey:["system","interfaces"],queryFn:()=>ao.listNetworkInterfaces(),refetchInterval:5e3}),{data:T=[],isLoading:ne}=dt({queryKey:["system","services"],queryFn:()=>ao.listServices(),refetchInterval:5e3}),{data:Z}=dt({queryKey:["system","ntp"],queryFn:()=>ao.getNTPSettings()});return Ce.useEffect(()=>{Z&&(h(Z.timezone),x(Z.ntp_servers))},[Z]),Ce.useEffect(()=>{const U=q=>{w.current&&!w.current.contains(q.target)&&n(null)};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[]),e.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden relative bg-background-dark",children:[e.jsxs("header",{className:"flex h-16 items-center justify-between border-b border-border-dark bg-background-dark px-6 lg:px-10 shrink-0 z-10",children:[e.jsx("div",{className:"flex items-center gap-4",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(ba,{to:"/",className:"text-text-secondary hover:text-white transition-colors",children:"System"}),e.jsx("span",{className:"text-text-secondary",children:"/"}),e.jsx("span",{className:"text-white font-medium",children:"Configuration"})]})}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-2 px-3 py-1.5 rounded-full bg-green-500/10 border border-green-500/20",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-xs font-medium text-green-500",children:"System Healthy"})]}),e.jsx("div",{className:"h-6 w-px bg-border-dark mx-2"}),e.jsxs("button",{className:"flex items-center justify-center gap-2 rounded-lg bg-border-dark px-4 py-2 text-sm font-bold text-white hover:bg-[#2f455a] transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"restart_alt"}),e.jsx("span",{className:"hidden sm:inline",children:"Reboot"})]}),e.jsxs("button",{className:"flex items-center justify-center gap-2 rounded-lg bg-red-500/10 px-4 py-2 text-sm font-bold text-red-500 hover:bg-red-500/20 transition-colors border border-red-500/20",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"}),e.jsx("span",{className:"hidden sm:inline",children:"Shutdown"})]})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4 md:p-8 lg:px-12 scroll-smooth",children:e.jsxs("div",{className:"mx-auto max-w-7xl",children:[e.jsxs("div",{className:"mb-8 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-white mb-2",children:"System Configuration"}),e.jsx("p",{className:"text-text-secondary text-sm max-w-2xl",children:"Manage network interfaces, time synchronization, service states, and remote management protocols."})]}),e.jsxs("button",{className:"flex items-center justify-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-bold text-white hover:bg-blue-600 transition-all shadow-lg shadow-blue-500/20",children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"save"}),"Save Changes"]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 xl:grid-cols-2",children:[e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-card-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"verified"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Feature License"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500"}),e.jsx("span",{className:"text-xs text-text-secondary",children:"Licensed"})]})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-sm font-bold text-white",children:"License Status"}),e.jsx("p",{className:"text-xs text-text-secondary",children:"Enterprise Edition"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-green-500/10 border border-green-500/20",children:[e.jsx("span",{className:"material-symbols-outlined text-green-500 text-[16px]",children:"check_circle"}),e.jsx("span",{className:"text-xs font-bold text-green-500",children:"Active"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"License Key"}),e.jsx("span",{className:"text-xs font-mono text-white",children:"CAL-****-****-****-****-****"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"Expires"}),e.jsx("span",{className:"text-xs font-bold text-white",children:"Dec 31, 2025"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"Days Remaining"}),e.jsx("span",{className:"text-xs font-bold text-emerald-400",children:"365 days"})]})]}),e.jsxs("div",{className:"border-t border-border-dark pt-4",children:[e.jsx("h3",{className:"text-sm font-bold text-white mb-3",children:"Enabled Features"}),e.jsx("div",{className:"flex flex-col gap-2",children:[{name:"Advanced Replication",enabled:!0},{name:"Encryption at Rest",enabled:!0},{name:"Deduplication",enabled:!0},{name:"Cloud Backup Integration",enabled:!0},{name:"Multi-Site Sync",enabled:!0},{name:"Advanced Monitoring",enabled:!0}].map(U=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-[#111a22]",children:[e.jsx("span",{className:"text-xs text-white",children:U.name}),U.enabled?e.jsx("span",{className:"material-symbols-outlined text-green-500 text-[16px]",children:"check_circle"}):e.jsx("span",{className:"material-symbols-outlined text-text-secondary text-[16px]",children:"cancel"})]},U.name))})]}),e.jsxs("div",{className:"border-t border-border-dark pt-4 flex flex-col gap-2",children:[e.jsxs("button",{onClick:()=>g(!0),className:"w-full flex items-center justify-center gap-2 rounded-lg bg-primary px-4 py-2.5 text-sm font-bold text-white hover:bg-blue-600 transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"key"}),"Update License Key"]}),e.jsxs("button",{onClick:()=>{alert("Downloading license information...")},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-border-dark px-4 py-2.5 text-sm font-bold text-white hover:bg-[#2f455a] transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"download"}),"Download License Info"]})]})]})]}),e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-card-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"lan"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Network Interfaces"})]}),e.jsx("button",{className:"text-xs font-bold text-primary hover:text-blue-400",children:"CONFIGURE DNS"})]}),e.jsx("div",{className:"p-2",children:V?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("span",{className:"text-text-secondary",children:"Loading interfaces..."})}):M.length===0?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("span",{className:"text-text-secondary",children:"No network interfaces found"})}):M.map(U=>{const q=U.status==="Connected",F=U.role==="ISCSI"?"bg-purple-500/20":"bg-primary/20",le=U.role==="ISCSI"?"text-purple-400":"text-primary";return e.jsxs("div",{className:`group flex items-center justify-between rounded-lg p-3 hover:bg-border-dark/50 transition-colors ${q?"":"opacity-70"}`,children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg bg-border-dark ${q?"text-white":"text-text-secondary"}`,children:e.jsx("span",{className:"material-symbols-outlined",children:"settings_ethernet"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:`font-bold ${q?"text-white":"text-text-secondary"}`,children:U.name}),U.role&&e.jsx("span",{className:`rounded ${F} px-1.5 py-0.5 text-[10px] font-bold ${le} uppercase`,children:U.role})]}),U.ip_address?e.jsxs("p",{className:"font-mono text-xs text-text-secondary",children:[U.ip_address," ",e.jsx("span",{className:"opacity-50 mx-1",children:"/"})," ",U.subnet]}):e.jsx("p",{className:"font-mono text-xs text-text-secondary",children:"No Carrier"})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"hidden sm:flex flex-col items-end",children:q?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),e.jsx("span",{className:"text-xs font-medium text-white",children:"Connected"})]}),U.speed&&U.speed!=="Unknown"&&e.jsx("span",{className:"text-xs text-text-secondary",children:U.speed})]}):e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-red-500"}),e.jsx("span",{className:"text-xs font-medium text-red-500",children:"Down"})]})}),e.jsxs("div",{className:"relative",ref:w,children:[e.jsx("button",{onClick:()=>n(s===U.name?null:U.name),className:"h-8 w-8 rounded-full hover:bg-border-dark flex items-center justify-center text-text-secondary hover:text-white transition-colors",children:e.jsx("span",{className:"material-symbols-outlined",children:"more_vert"})}),s===U.name&&e.jsxs("div",{className:"absolute right-0 mt-1 w-48 rounded-lg border border-border-dark bg-card-dark shadow-lg z-50",children:[e.jsxs("button",{onClick:()=>{l(U),n(null)},className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white hover:bg-border-dark transition-colors first:rounded-t-lg",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),e.jsx("span",{children:"Edit Connection"})]}),e.jsxs("button",{onClick:()=>{c(U),n(null)},className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white hover:bg-border-dark transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"info"}),e.jsx("span",{children:"View Details"})]}),e.jsx("div",{className:"border-t border-border-dark"}),e.jsxs("button",{onClick:()=>{n(null)},className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white hover:bg-border-dark transition-colors last:rounded-b-lg",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:q?"toggle_on":"toggle_off"}),e.jsx("span",{children:q?"Disable":"Enable"})]})]})]})]})]},U.name)})})]}),e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-card-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"memory"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Service Control"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500"}),e.jsx("span",{className:"text-xs text-text-secondary",children:"All Systems Normal"})]})]}),e.jsx("div",{className:"p-4 flex flex-col gap-1",children:ne?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("span",{className:"text-text-secondary",children:"Loading services..."})}):[{key:"ssh",serviceNames:["ssh","sshd"],displayName:"SSH Service",description:"Remote command line access",icon:"terminal"},{key:"smb",serviceNames:["smbd","samba","smb"],displayName:"SMB / CIFS",description:"Windows file sharing",icon:"folder_shared"},{key:"iscsi",serviceNames:["iscsi-scst","iscsi","scst"],displayName:"iSCSI Target",description:"Block storage sharing",icon:"storage"},{key:"nfs",serviceNames:["nfs-server","nfs","nfsd"],displayName:"NFS Service",description:"Unix file sharing",icon:"share"},{key:"vtl",serviceNames:["mhvtl","vtl"],displayName:"VTL Service",description:"Virtual tape library emulation",icon:"album"}].map(U=>{const q=T.find(se=>{const fe=se.name.toLowerCase();return U.serviceNames.some(ye=>fe.includes(ye.toLowerCase())||ye.toLowerCase().includes(fe))}),F=q?.active_state==="active",le=F?"RUNNING":"STOPPED",ae=F?"bg-green-500/20 text-green-500 border-green-500/20":"bg-yellow-500/20 text-yellow-500 border-yellow-500/20";return e.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-[#111a22] p-3 border border-transparent hover:border-border-dark transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded bg-border-dark/50 text-white",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:U.icon})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-white",children:U.displayName}),e.jsx("p",{className:"text-xs text-text-secondary",children:U.description})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-bold border ${ae}`,children:le}),e.jsxs("label",{className:"relative inline-block w-10 h-5 mr-2 align-middle select-none cursor-pointer",children:[e.jsx("input",{checked:F,onChange:()=>{q&&ao.restartService(q.name).then(()=>{L.invalidateQueries({queryKey:["system","services"]})}).catch(se=>{alert(`Failed to ${F?"stop":"start"} service: ${se.message||"Unknown error"}`)})},className:"sr-only peer",id:`${U.key}-toggle`,name:"toggle",type:"checkbox"}),e.jsx("span",{className:"absolute inset-0 rounded-full bg-border-dark transition-colors duration-300 peer-checked:bg-primary/20"}),e.jsx("span",{className:"absolute left-0.5 top-0.5 h-4 w-4 rounded-full bg-white transition-transform duration-300 peer-checked:translate-x-5"})]})]})]},U.key)})})]}),e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-card-dark shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"schedule"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Date & Time"})]}),e.jsxs("button",{onClick:()=>{K.mutate({timezone:u,ntp_servers:m})},disabled:K.isPending,className:"flex items-center justify-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-bold text-white hover:bg-blue-600 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"save"}),K.isPending?"Saving...":"Save"]})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-6",children:[e.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"System Timezone"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:u,onChange:U=>h(U.target.value),className:"block w-full rounded-lg border-border-dark bg-[#111a22] py-2.5 pl-3 pr-10 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary appearance-none",children:[e.jsx("option",{children:"Etc/UTC"}),e.jsx("option",{children:"Asia/Jakarta"}),e.jsx("option",{children:"Asia/Singapore"}),e.jsx("option",{children:"Asia/Bangkok"}),e.jsx("option",{children:"Asia/Manila"}),e.jsx("option",{children:"Asia/Tokyo"}),e.jsx("option",{children:"Asia/Shanghai"}),e.jsx("option",{children:"Asia/Hong_Kong"}),e.jsx("option",{children:"Europe/London"}),e.jsx("option",{children:"Europe/Paris"}),e.jsx("option",{children:"America/New_York"}),e.jsx("option",{children:"America/Los_Angeles"})]}),e.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-white",children:e.jsx("span",{className:"material-symbols-outlined text-sm",children:"expand_more"})})]})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-xs font-medium text-text-secondary uppercase",children:"NTP Servers"}),e.jsxs("button",{onClick:()=>p(!0),className:"text-xs text-primary font-bold hover:text-white flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"add"})," Add Server"]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[y&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-[#111a22] p-3 border border-border-dark",children:[e.jsx("input",{type:"text",value:v,onChange:U=>N(U.target.value),onKeyDown:U=>{U.key==="Enter"&&v.trim()&&(m.includes(v.trim())||(x([...m,v.trim()]),N(""),p(!1))),U.key==="Escape"&&(N(""),p(!1))},placeholder:"Enter NTP server address (e.g., 0.pool.ntp.org)",className:"flex-1 bg-transparent text-sm text-white placeholder-gray-500 focus:outline-none",autoFocus:!0}),e.jsx("button",{onClick:()=>{v.trim()&&!m.includes(v.trim())&&(x([...m,v.trim()]),N(""),p(!1))},className:"text-green-500 hover:text-green-400",children:e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"check"})}),e.jsx("button",{onClick:()=>{N(""),p(!1)},className:"text-red-500 hover:text-red-400",children:e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),m.map((U,q)=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-[#111a22] p-3 border border-border-dark",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-sm font-mono text-white",children:U})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"Stratum 2 • 12ms"}),e.jsx("button",{onClick:()=>{x(m.filter((F,le)=>le!==q))},className:"text-red-500 hover:text-red-400",children:e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]},q))]})]})]})]}),e.jsxs("div",{className:"flex flex-col rounded-xl border border-border-dark bg-card-dark shadow-sm",children:[e.jsx("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"hub"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Management"})]})}),e.jsxs("div",{className:"p-6 flex flex-col gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-white",children:"SNMP Monitoring"}),e.jsx("p",{className:"text-xs text-text-secondary",children:"Enable Simple Network Management Protocol"})]}),e.jsxs("label",{className:"relative inline-block w-10 h-5 align-middle select-none cursor-pointer",children:[e.jsx("input",{checked:r,onChange:U=>t(U.target.checked),className:"sr-only peer",id:"snmp-toggle",name:"toggle",type:"checkbox"}),e.jsx("span",{className:"absolute inset-0 rounded-full bg-border-dark transition-colors duration-300 peer-checked:bg-primary/20"}),e.jsx("span",{className:"absolute left-0.5 top-0.5 h-4 w-4 rounded-full bg-white transition-transform duration-300 peer-checked:translate-x-5"})]})]}),e.jsxs("div",{className:`grid grid-cols-1 gap-4 transition-opacity ${r?"opacity-100":"opacity-50 pointer-events-none"}`,children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs font-medium text-text-secondary uppercase",children:"Community String"}),e.jsx("input",{className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"e.g. public",type:"text",defaultValue:"public",disabled:!r})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs font-medium text-text-secondary uppercase",children:"Trap Receiver IP"}),e.jsx("input",{className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"e.g. 192.168.1.100",type:"text",disabled:!r})]})]})]}),e.jsxs("div",{className:"border-t border-border-dark pt-4",children:[e.jsx("h3",{className:"text-sm font-bold text-white mb-3",children:"Syslog Forwarding"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{className:"flex-1 rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"Syslog Server Address (UDP:514)",type:"text"}),e.jsx("button",{className:"rounded-lg bg-border-dark px-4 py-2 text-sm font-bold text-white hover:bg-[#2f455a] transition-colors",children:"Test"})]})]})]})]})]}),e.jsx("div",{className:"h-10"})]})}),o&&e.jsx(QS,{interface:o,onClose:()=>l(null)}),d&&e.jsx(LS,{interface:d,onClose:()=>c(null)}),B&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>g(!1),children:e.jsxs("div",{className:"bg-card-dark rounded-xl border border-border-dark max-w-lg w-full",onClick:U=>U.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-border-dark flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:"Update License Key"}),e.jsx("button",{onClick:()=>{g(!1),_("")},className:"text-text-secondary hover:text-white",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"License Key"}),e.jsx("textarea",{className:"w-full bg-[#111a22] border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono resize-none",rows:4,placeholder:"Paste your license key here...",value:j,onChange:U=>_(U.target.value)}),e.jsx("p",{className:"text-xs text-text-secondary",children:"Enter your license key to activate or update features. The key will be validated automatically."})]}),e.jsxs("div",{className:"flex flex-col gap-2 p-3 rounded-lg bg-yellow-500/10 border border-yellow-500/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-yellow-500 text-[18px]",children:"info"}),e.jsx("span",{className:"text-xs font-bold text-yellow-500",children:"Important"})]}),e.jsx("p",{className:"text-xs text-text-secondary",children:"Updating the license key will restart the system services. Make sure you have a valid license key before proceeding."})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx("button",{onClick:()=>{g(!1),_("")},className:"px-4 py-2 rounded-lg border border-border-dark text-white hover:bg-border-dark transition-colors text-sm font-bold",children:"Cancel"}),e.jsx("button",{onClick:()=>{if(!j.trim()){alert("Please enter a license key");return}console.log("Updating license key:",j),alert("License key updated successfully!"),g(!1),_("")},className:"px-4 py-2 rounded-lg bg-primary hover:bg-blue-600 text-white transition-colors text-sm font-bold",children:"Update License"})]})]})]})})]})}function QS({interface:r,onClose:t}){const s=Nr(),[n,o]=Ce.useState({ip_address:r.ip_address||"",subnet:r.subnet||"24",gateway:r.gateway||"",dns1:r.dns1||"",dns2:r.dns2||"",role:r.role||""}),l=ft({mutationFn:c=>ao.updateNetworkInterface(r.name,c),onSuccess:()=>{s.invalidateQueries({queryKey:["system","interfaces"]}),t()},onError:c=>{alert(`Failed to update interface: ${c.response?.data?.error||c.message}`)}}),d=c=>{c.preventDefault(),l.mutate({ip_address:n.ip_address,subnet:n.subnet,gateway:n.gateway||void 0,dns1:n.dns1||void 0,dns2:n.dns2||void 0,role:n.role||void 0})};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:e.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border-dark bg-card-dark shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"settings_ethernet"}),e.jsxs("h2",{className:"text-lg font-bold text-white",children:["Edit Connection - ",r.name]})]}),e.jsx("button",{onClick:t,className:"h-8 w-8 rounded-full hover:bg-border-dark flex items-center justify-center text-text-secondary hover:text-white transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),e.jsxs("form",{onSubmit:d,className:"p-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"IP Address"}),e.jsx("input",{type:"text",value:n.ip_address,onChange:c=>o({...n,ip_address:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"192.168.1.100",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Subnet Mask (CIDR)"}),e.jsx("input",{type:"text",value:n.subnet,onChange:c=>o({...n,subnet:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"24",required:!0}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Enter CIDR notation (e.g., 24 for 255.255.255.0)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Default Gateway"}),e.jsx("input",{type:"text",value:n.gateway,onChange:c=>o({...n,gateway:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"192.168.1.1"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Primary DNS"}),e.jsx("input",{type:"text",value:n.dns1,onChange:c=>o({...n,dns1:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"8.8.8.8"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Secondary DNS"}),e.jsx("input",{type:"text",value:n.dns2,onChange:c=>o({...n,dns2:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] p-2.5 text-sm text-white placeholder-gray-500 focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"8.8.4.4"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Interface Role"}),e.jsxs("select",{value:n.role,onChange:c=>o({...n,role:c.target.value}),className:"block w-full rounded-lg border-border-dark bg-[#111a22] py-2.5 pl-3 pr-10 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary appearance-none",children:[e.jsx("option",{value:"",children:"None"}),e.jsx("option",{value:"Management",children:"Management"}),e.jsx("option",{value:"ISCSI",children:"iSCSI"}),e.jsx("option",{value:"Storage",children:"Storage"})]})]})]}),e.jsxs("div",{className:"mt-6 flex items-center justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-sm font-bold text-text-secondary hover:text-white transition-colors",children:"Cancel"}),e.jsxs("button",{type:"submit",disabled:l.isPending,className:"flex items-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-bold text-white hover:bg-blue-600 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"save"}),l.isPending?"Saving...":"Save Changes"]})]})]})]})})}function LS({interface:r,onClose:t}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:e.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border-dark bg-card-dark shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-dark px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"info"}),e.jsxs("h2",{className:"text-lg font-bold text-white",children:["Interface Details - ",r.name]})]}),e.jsx("button",{onClick:t,className:"h-8 w-8 rounded-full hover:bg-border-dark flex items-center justify-center text-text-secondary hover:text-white transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`h-3 w-3 rounded-full ${r.status==="Connected"?"bg-green-500":"bg-red-500"}`}),e.jsx("span",{className:"text-sm font-medium text-text-secondary",children:"Status"})]}),e.jsx("span",{className:`text-sm font-bold ${r.status==="Connected"?"text-green-500":"text-red-500"}`,children:r.status})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"IP Address"}),e.jsx("p",{className:"text-sm font-mono text-white",children:r.ip_address||"Not configured"})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Subnet Mask (CIDR)"}),e.jsxs("p",{className:"text-sm font-mono text-white",children:["/",r.subnet||"N/A"]})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Default Gateway"}),e.jsx("p",{className:"text-sm font-mono text-white",children:r.gateway||"Not configured"})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Link Speed"}),e.jsx("p",{className:"text-sm font-mono text-white",children:r.speed||"Unknown"})]})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-3 block text-xs font-medium text-text-secondary uppercase",children:"DNS Servers"}),e.jsxs("div",{className:"space-y-2",children:[r.dns1?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"Primary:"}),e.jsx("span",{className:"text-sm font-mono text-white",children:r.dns1})]}):e.jsx("p",{className:"text-xs text-text-secondary",children:"Primary DNS: Not configured"}),r.dns2?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:"Secondary:"}),e.jsx("span",{className:"text-sm font-mono text-white",children:r.dns2})]}):e.jsx("p",{className:"text-xs text-text-secondary",children:"Secondary DNS: Not configured"})]})]}),r.role&&e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Interface Role"}),e.jsx("span",{className:`inline-block px-3 py-1 rounded text-xs font-bold uppercase ${r.role==="ISCSI"?"bg-purple-500/20 text-purple-400 border border-purple-500/20":"bg-primary/20 text-primary border border-primary/20"}`,children:r.role})]}),r.ip_address&&r.subnet&&e.jsxs("div",{className:"p-4 rounded-lg bg-[#111a22] border border-border-dark",children:[e.jsx("label",{className:"mb-2 block text-xs font-medium text-text-secondary uppercase",children:"Full Network Address"}),e.jsxs("p",{className:"text-sm font-mono text-white",children:[r.ip_address,"/",r.subnet]})]})]}),e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsxs("button",{onClick:t,className:"flex items-center justify-center gap-2 rounded-lg bg-primary px-6 py-2.5 text-sm font-bold text-white hover:bg-blue-600 transition-all",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"close"}),"Close"]})})]})]})})}const ys={listJobs:async r=>{const t=new URLSearchParams;return r?.status&&t.append("status",r.status),r?.job_type&&t.append("job_type",r.job_type),r?.client_name&&t.append("client_name",r.client_name),r?.job_name&&t.append("job_name",r.job_name),r?.limit&&t.append("limit",r.limit.toString()),r?.offset&&t.append("offset",r.offset.toString()),(await ze.get(`/backup/jobs${t.toString()?`?${t.toString()}`:""}`)).data},getJob:async r=>(await ze.get(`/backup/jobs/${r}`)).data,createJob:async r=>(await ze.post("/backup/jobs",r)).data,executeBconsoleCommand:async r=>(await ze.post("/backup/console/execute",{command:r})).data,listClients:async r=>{const t=new URLSearchParams;return r?.enabled!==void 0&&t.append("enabled",r.enabled.toString()),r?.search&&t.append("search",r.search),r?.category&&t.append("category",r.category),(await ze.get(`/backup/clients${t.toString()?`?${t.toString()}`:""}`)).data},getDashboardStats:async()=>(await ze.get("/backup/dashboard/stats")).data,listStoragePools:async()=>(await ze.get("/backup/storage/pools")).data,listStorageVolumes:async r=>{const t=new URLSearchParams;return r&&t.append("pool_name",r),(await ze.get(`/backup/storage/volumes${t.toString()?`?${t.toString()}`:""}`)).data},listStorageDaemons:async()=>(await ze.get("/backup/storage/daemons")).data,createStoragePool:async r=>(await ze.post("/backup/storage/pools",r)).data,deleteStoragePool:async r=>{await ze.delete(`/backup/storage/pools/${r}`)},createStorageVolume:async r=>(await ze.post("/backup/storage/volumes",r)).data,updateStorageVolume:async(r,t)=>(await ze.put(`/backup/storage/volumes/${r}`,t)).data,deleteStorageVolume:async r=>{await ze.delete(`/backup/storage/volumes/${r}`)},listMedia:async()=>(await ze.get("/backup/media")).data},TS=`
.status-dot {
box-shadow: 0 0 6px currentColor;
}
.checkbox-custom {
appearance: none;
background-color: #1c2936;
border: 1px solid #324d67;
border-radius: 4px;
width: 16px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.checkbox-custom:checked {
background-color: #137fec;
border-color: #137fec;
}
.checkbox-custom:checked::after {
content: '';
width: 4px;
height: 8px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
margin-bottom: 2px;
}
.agent-item {
position: relative;
}
.agent-item .tree-line-vertical {
position: absolute;
left: 20px;
top: -24px;
bottom: 0;
width: 1px;
background-color: #324d67;
z-index: 0;
}
.agent-item:last-child .tree-line-vertical {
bottom: 50%;
}
.agent-item .tree-line-horizontal {
position: absolute;
left: 20px;
top: 50%;
width: 24px;
height: 1px;
background-color: #324d67;
z-index: 0;
}
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: #324d67;
border-radius: 10px;
}
`;function IS(){const r=Cy(),s=new URLSearchParams(r.search).get("tab"),[n,o]=Ce.useState(s||"dashboard"),[l,d]=Ce.useState(""),c=Nr();Ce.useEffect(()=>{const g=new URLSearchParams(r.search).get("tab");if(g==="pools"||g==="volumes"){const _=new URLSearchParams(r.search);_.set("tab","storage"),g==="volumes"?_.set("view","volumes"):g==="pools"&&_.set("view","pools");const w=`${r.pathname}?${_.toString()}`;window.history.replaceState({},"",w),o("storage");return}const j=g||"dashboard";j!==n&&(j==="dashboard"||j==="jobs"||j==="clients"||j==="storage"||j==="filesets"||j==="console")&&o(j)},[r.search,r.pathname]);const u=g=>{o(g);const j=new URLSearchParams(r.search);g==="dashboard"?j.delete("tab"):j.set("tab",g);const _=`${r.pathname}${j.toString()?"?"+j.toString():""}`;window.history.replaceState({},"",_)},{data:h}=dt({queryKey:["dashboard-stats"],queryFn:()=>ys.getDashboardStats(),enabled:n==="dashboard",refetchInterval:3e4}),{data:m}=dt({queryKey:["dashboard-jobs"],queryFn:()=>ys.listJobs({limit:10}),enabled:n==="dashboard"}),{data:x}=dt({queryKey:["running-jobs"],queryFn:()=>ys.listJobs({status:"Running",limit:10}),enabled:n==="dashboard",refetchInterval:5e3}),y=m?.jobs||[],p=x?.jobs||[],v=g=>{if(g===0)return"0 B";const j=1024,_=["B","KB","MB","GB","TB"],w=Math.floor(Math.log(g)/Math.log(j));return`${(g/Math.pow(j,w)).toFixed(2)} ${_[w]}`},N=g=>{if(!g)return"-";try{const j=new Date(g),w=new Date().getTime()-j.getTime(),L=Math.floor(w/6e4),K=Math.floor(w/36e5),M=Math.floor(w/864e5);return L<1?"Just now":L<60?`${L}m ago`:K<24?`${K}h ago`:M<7?`${M}d ago`:j.toLocaleDateString()}catch{return"-"}},B=g=>{if(!g)return"-";const j=Math.floor(g/3600),_=Math.floor(g%3600/60),w=g%60;return j>0?`${j}:${_.toString().padStart(2,"0")}:${w.toString().padStart(2,"0")}`:`${_}:${w.toString().padStart(2,"0")}`};return e.jsx("div",{className:"flex-1 flex flex-col overflow-hidden bg-slate-50 dark:bg-[#101922]",children:e.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("header",{className:"h-16 flex items-center justify-between px-8 bg-white dark:bg-[#111a22] border-b border-slate-200 dark:border-[#233648] z-10",children:[e.jsxs("div",{className:"flex items-center gap-6 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 bg-primary rounded-lg flex items-center justify-center text-white",children:e.jsx("span",{className:"material-symbols-outlined",children:"backup"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-bold leading-tight",children:"Backup Management"}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-[#92adc9]",children:"Backup Appliance"})]})]}),e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsx("span",{className:"material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 text-[20px]",children:"search"}),e.jsx("input",{className:"w-full bg-slate-100 dark:bg-[#233648] border-none rounded-lg pl-10 pr-4 py-2 text-sm focus:ring-2 focus:ring-primary/50 transition-all outline-none",placeholder:"Search clients, jobs, or logs...",type:"text",value:l,onChange:g=>d(g.target.value)})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-green-500/10 text-green-500 rounded-full border border-green-500/20",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-tighter",children:h?.director_status==="Active"?"SD Connected":"SD Disconnected"})]}),e.jsxs("button",{className:"p-2 text-slate-500 hover:bg-slate-100 dark:hover:bg-[#233648] rounded-lg relative",children:[e.jsx("span",{className:"material-symbols-outlined",children:"notifications"}),e.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-primary rounded-full border-2 border-white dark:border-[#111a22]"})]}),e.jsx("button",{onClick:()=>{c.invalidateQueries({queryKey:["dashboard-stats"]}),c.invalidateQueries({queryKey:["dashboard-jobs"]}),c.invalidateQueries({queryKey:["running-jobs"]})},className:"p-2 text-slate-500 hover:bg-slate-100 dark:hover:bg-[#233648] rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined",children:"refresh"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8 custom-scrollbar bg-slate-50 dark:bg-[#101922]",children:[n==="dashboard"&&e.jsxs(e.Fragment,{children:[e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-widest text-slate-500 dark:text-[#92adc9]",children:"Job Statistics (Last 24h)"}),e.jsx("button",{onClick:()=>u("jobs"),className:"text-xs font-medium text-primary cursor-pointer hover:underline",children:"View detailed report"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#324d67] p-6 rounded-xl flex flex-col gap-1 hover:border-primary/50 transition-colors cursor-default",children:[e.jsx("p",{className:"text-slate-500 dark:text-[#92adc9] text-sm font-medium",children:"Successful Backups"}),e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsx("span",{className:"text-3xl font-bold",children:y.filter(g=>g.status==="Completed").length}),e.jsxs("span",{className:"text-green-500 text-sm font-bold flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"trending_up"}),"+12%"]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#324d67] p-6 rounded-xl flex flex-col gap-1 hover:border-primary/50 transition-colors cursor-default",children:[e.jsx("p",{className:"text-slate-500 dark:text-[#92adc9] text-sm font-medium",children:"Failed Jobs"}),e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsx("span",{className:"text-3xl font-bold",children:y.filter(g=>g.status==="Failed").length}),e.jsxs("span",{className:"text-red-500 text-sm font-bold flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"trending_down"}),"-5%"]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#324d67] p-6 rounded-xl flex flex-col gap-1 hover:border-primary/50 transition-colors cursor-default",children:[e.jsx("p",{className:"text-slate-500 dark:text-[#92adc9] text-sm font-medium",children:"Currently Running"}),e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsx("span",{className:"text-3xl font-bold",children:p.length}),e.jsxs("span",{className:"text-primary text-sm font-bold flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"sync"}),"Active"]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#324d67] p-6 rounded-xl flex flex-col gap-1 hover:border-primary/50 transition-colors cursor-default",children:[e.jsx("p",{className:"text-slate-500 dark:text-[#92adc9] text-sm font-medium",children:"Waiting / Queued"}),e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsx("span",{className:"text-3xl font-bold",children:y.filter(g=>g.status==="Waiting").length}),e.jsx("span",{className:"text-slate-400 text-sm font-bold",children:"No change"})]})]})]})]}),e.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#233648] rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-base font-bold",children:"Storage Pool Utilization"}),e.jsx("span",{className:"material-symbols-outlined text-slate-400",children:"info"})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[e.jsx("span",{className:"text-slate-500 dark:text-[#92adc9]",children:h?.default_pool?.name||"Default Pool"}),e.jsx("span",{className:"font-bold",children:h?.default_pool?`${v(h.default_pool.used_bytes)} / ${v(h.default_pool.total_bytes)}`:"N/A"})]}),e.jsx("div",{className:"w-full bg-slate-100 dark:bg-[#233648] h-3 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full rounded-full",style:{width:`${h?.default_pool?Math.min(h.default_pool.usage_percent,100):0}%`}})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[e.jsx("span",{className:"text-slate-500 dark:text-[#92adc9]",children:"Offsite Cloud Sync"}),e.jsx("span",{className:"font-bold",children:"1.8 TB / 5.0 TB"})]}),e.jsx("div",{className:"w-full bg-slate-100 dark:bg-[#233648] h-3 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-green-500 h-full rounded-full",style:{width:"36%"}})})]})]})]}),e.jsxs("div",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#233648] rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-base font-bold",children:"Resource Summary"}),e.jsx("button",{className:"text-primary text-sm font-semibold",children:"View Hardware"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 dark:bg-[#16232e] p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs text-slate-500 dark:text-[#92adc9] uppercase font-bold mb-1",children:"Active Volumes"}),e.jsx("p",{className:"text-xl font-bold",children:"34"})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-[#16232e] p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs text-slate-500 dark:text-[#92adc9] uppercase font-bold mb-1",children:"Total Clients"}),e.jsx("p",{className:"text-xl font-bold",children:h?.active_jobs_count||0})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-[#16232e] p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs text-slate-500 dark:text-[#92adc9] uppercase font-bold mb-1",children:"Last Full Backup"}),e.jsx("p",{className:"text-xl font-bold",children:h?.last_job?N(h.last_job.ended_at||h.last_job.started_at):"N/A"})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-[#16232e] p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs text-slate-500 dark:text-[#92adc9] uppercase font-bold mb-1",children:"Catalog Size"}),e.jsx("p",{className:"text-xl font-bold",children:"12.4 GB"})]})]})]})]}),p.length>0&&e.jsxs("section",{className:"bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#233648] rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 dark:border-[#233648] flex items-center justify-between",children:[e.jsx("h3",{className:"text-base font-bold",children:"Running Jobs"}),e.jsx("button",{className:"bg-primary text-white text-xs font-bold px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors",children:"Abort All"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50 dark:bg-[#16232e] text-[11px] uppercase tracking-wider text-slate-500 dark:text-[#92adc9] font-bold",children:[e.jsx("th",{className:"px-6 py-3",children:"Job ID"}),e.jsx("th",{className:"px-6 py-3",children:"Client Name"}),e.jsx("th",{className:"px-6 py-3",children:"Level"}),e.jsx("th",{className:"px-6 py-3",children:"Progress"}),e.jsx("th",{className:"px-6 py-3",children:"Bytes Processed"}),e.jsx("th",{className:"px-6 py-3",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-[#233648]",children:p.map(g=>{const j=g.duration_seconds?Math.min(g.duration_seconds/3600*100,100):45;return e.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-[#16232e] transition-colors",children:[e.jsx("td",{className:"px-6 py-4 text-sm font-mono",children:g.job_id}),e.jsx("td",{className:"px-6 py-4 text-sm font-bold",children:g.client_name}),e.jsx("td",{className:"px-6 py-4 text-sm",children:e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase border ${g.job_level==="Full"?"bg-purple-500/10 text-purple-500 border-purple-500/20":"bg-blue-500/10 text-blue-500 border-blue-500/20"}`,children:g.job_level})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 bg-slate-200 dark:bg-[#233648] h-1.5 rounded-full overflow-hidden min-w-[100px]",children:e.jsx("div",{className:"bg-primary h-full",style:{width:`${j}%`}})}),e.jsxs("span",{className:"text-xs font-bold",children:[Math.round(j),"%"]})]})}),e.jsx("td",{className:"px-6 py-4 text-sm",children:v(g.bytes_written)}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("button",{className:"text-slate-400 hover:text-red-500 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"cancel"})})})]},g.id)})})]})})]}),e.jsxs("section",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 bg-white dark:bg-[#111a22] border border-slate-200 dark:border-[#233648] rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 dark:border-[#233648] flex items-center justify-between",children:[e.jsx("h3",{className:"text-base font-bold",children:"Recent Job History"}),e.jsx("button",{onClick:()=>u("jobs"),className:"text-primary text-xs font-bold hover:underline",children:"View All History"})]}),e.jsxs("div",{className:"divide-y divide-slate-100 dark:divide-[#233648]",children:[y.slice(0,5).map(g=>e.jsxs("div",{className:"px-6 py-3 flex items-center justify-between hover:bg-slate-50 dark:hover:bg-[#16232e] transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[g.status==="Completed"?e.jsx("span",{className:"material-symbols-outlined text-green-500",children:"check_circle"}):g.status==="Failed"?e.jsx("span",{className:"material-symbols-outlined text-red-500",children:"error"}):e.jsx("span",{className:"material-symbols-outlined text-primary",children:"sync"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-bold",children:[g.job_name," - ",g.client_name]}),e.jsx("p",{className:"text-[10px] text-slate-500",children:g.status==="Failed"?`Error: ${g.error_message||"Unknown error"}`:`Duration: ${B(g.duration_seconds)} • Size: ${v(g.bytes_written)}`})]})]}),e.jsx("span",{className:"text-xs font-medium text-slate-400",children:g.ended_at?new Date(g.ended_at).toLocaleTimeString():new Date(g.started_at||"").toLocaleTimeString()})]},g.id)),y.length===0&&e.jsx("div",{className:"px-6 py-8 text-center text-slate-500 dark:text-[#92adc9]",children:"No recent jobs found"})]})]}),e.jsxs("div",{className:"bg-black/90 dark:bg-[#080c11] border border-slate-200 dark:border-[#233648] rounded-xl flex flex-col h-[300px] xl:h-auto",children:[e.jsxs("div",{className:"px-4 py-2 border-b border-white/10 flex items-center justify-between bg-white/5",children:[e.jsxs("h3",{className:"text-xs font-bold text-slate-300 uppercase tracking-widest flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary animate-pulse"}),"Live Console Log"]}),e.jsx("button",{className:"text-white/40 hover:text-white",children:e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})})]}),e.jsxs("div",{className:"p-4 flex-1 overflow-y-auto custom-scrollbar font-mono text-[11px] space-y-1",children:[e.jsxs("p",{className:"text-blue-400",children:["15:40:12 [Director] Starting JobId ",p[0]?.job_id||"10928"]}),e.jsx("p",{className:"text-slate-400",children:"15:40:15 [SD] Ready to receive data on port 9103"}),e.jsx("p",{className:"text-slate-400",children:"15:40:18 [FD] Sending attribute data for /etc/passwd"}),h?.last_job&&e.jsxs("p",{className:"text-green-400",children:["15:42:01 [Director] JobId ",h.last_job.job_id," finished successfully"]}),e.jsx("p",{className:"text-slate-400",children:'15:42:05 [Catalog] Pruning expired volumes for Pool "Default"'}),e.jsx("p",{className:"text-slate-500",children:"15:43:00 [System] Health check completed - All systems OK"}),e.jsx("p",{className:"text-yellow-400",children:"15:43:45 [SD] Warning: Volume VOL-0045 reached 90% capacity"}),e.jsx("p",{className:"text-blue-400",children:'15:45:10 [Director] Scheduling next job "NightlyAudit"'})]})]})]})]}),n==="jobs"&&e.jsx(DS,{}),n==="clients"&&e.jsx(HS,{}),n==="clients-filesystem"&&e.jsx(MS,{onSwitchToConsole:()=>u("console")}),n==="clients-database"&&e.jsx(PS,{onSwitchToConsole:()=>u("console")}),n==="clients-virtualization"&&e.jsx(KS,{onSwitchToConsole:()=>u("console")}),n==="storage"&&e.jsx(qS,{}),n==="console"&&e.jsx(OS,{})]})]})})}function DS(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState(null),[l,d]=Ce.useState(!1),[c,u]=Ce.useState(new Date),{data:h,isLoading:m,error:x}=dt({queryKey:["backup-jobs",t],queryFn:()=>ys.listJobs({status:t||void 0,limit:50})}),y=h?.jobs||[],p=y.filter(T=>T.status==="Running"),v=y.filter(T=>T.status==="Completed"),N=y.filter(T=>T.status==="Failed"),B=T=>{if(T===0)return"0 B";const ne=1024,Z=["B","KB","MB","GB","TB"],U=Math.floor(Math.log(T)/Math.log(ne));return`${(T/Math.pow(ne,U)).toFixed(2)} ${Z[U]}`},g=T=>{if(!T)return"-";try{const ne=new Date(T),U=new Date().getTime()-ne.getTime(),q=Math.floor(U/6e4),F=Math.floor(q/60),le=Math.floor(F/24);return q<1?"Just now":q<60?`${q}m ago`:F<24?`${F}h ago`:le<7?`${le}d ago`:ne.toLocaleDateString()}catch{return"-"}},j=T=>T.status==="Running"?"N/A":"Today 22:00",_=T=>{switch(T){case"Completed":return{dot:"bg-success",text:"text-success",label:"Success"};case"Running":return{dot:"bg-primary",text:"text-primary",label:"Running"};case"Failed":return{dot:"bg-danger",text:"text-danger",label:"Failed"};case"Canceled":return{dot:"bg-warning",text:"text-warning",label:"Warning"};default:return{dot:"bg-success",text:"text-success",label:"Success"}}},w=T=>{const ne={Full:{bg:"bg-white/10",text:"text-white",border:"border-white/20"},Incremental:{bg:"bg-blue-500/10",text:"text-primary",border:"border-primary/20"},Differential:{bg:"bg-amber-500/10",text:"text-warning",border:"border-warning/20"}},Z=ne[T]||ne.Incremental;return e.jsx("span",{className:`${Z.bg} ${Z.text} px-2 py-0.5 rounded text-[10px] font-black border ${Z.border} uppercase`,children:T==="Incremental"?"Inc":T==="Differential"?"Diff":T})},K=(T=>{const ne=T.getFullYear(),Z=T.getMonth(),U=new Date(ne,Z,1),F=new Date(ne,Z+1,0).getDate(),le=U.getDay(),ae=[];for(let se=0;se<le;se++)ae.push(null);for(let se=1;se<=F;se++)ae.push(se);return ae})(c),M=new Date().getDate(),V=y.length>0?(v.length/y.length*100).toFixed(1):"100.0";return e.jsxs("div",{className:"flex-1 max-w-[1440px] mx-auto w-full px-6 py-6",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-6 mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-4xl font-extrabold tracking-tighter mb-2 dark:text-white",children:"Jobs & Schedules"}),e.jsx("p",{className:"text-slate-400 max-w-xl dark:text-slate-400",children:"Configure, monitor, and manage Bacula backup policies and automated job schedules from a unified cockpit."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{className:"bg-[#22252a] dark:bg-[#22252a] hover:bg-[#22252a]/80 px-4 py-2.5 rounded-lg flex items-center gap-2 font-bold text-sm transition-all border border-white/5 text-white",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"settings"}),e.jsx("span",{children:"Config"})]}),e.jsxs("button",{className:"bg-[#22252a] dark:bg-[#22252a] hover:bg-[#22252a]/80 px-4 py-2.5 rounded-lg flex items-center gap-2 font-bold text-sm transition-all border border-white/5 text-white",children:[e.jsx("span",{className:"material-symbols-outlined text-lg text-primary",children:"history"}),e.jsx("span",{children:"Restore"})]}),e.jsxs("button",{onClick:()=>d(!0),className:"bg-primary hover:bg-primary/90 px-5 py-2.5 rounded-lg flex items-center gap-2 font-bold text-sm text-white shadow-lg shadow-primary/20 transition-all",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"add_circle"}),e.jsx("span",{children:"Add New Job"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[e.jsx("button",{onClick:()=>s(""),className:`text-xs font-bold px-4 py-1.5 rounded-full transition-colors ${t?"bg-[#22252a] dark:bg-[#22252a] text-slate-400 hover:text-white":"bg-primary text-white"}`,children:"All Jobs"}),e.jsxs("button",{onClick:()=>s("Running"),className:`text-xs font-bold px-4 py-1.5 rounded-full transition-colors ${t==="Running"?"bg-primary text-white":"bg-[#22252a] dark:bg-[#22252a] text-slate-400 hover:text-white"}`,children:["Running (",p.length,")"]}),e.jsx("button",{onClick:()=>s("Completed"),className:`text-xs font-bold px-4 py-1.5 rounded-full transition-colors ${t==="Completed"?"bg-primary text-white":"bg-[#22252a] dark:bg-[#22252a] text-slate-400 hover:text-white"}`,children:"Completed"}),e.jsx("button",{onClick:()=>s("Failed"),className:`text-xs font-bold px-4 py-1.5 rounded-full transition-colors ${t==="Failed"?"bg-primary text-white":"bg-[#22252a] dark:bg-[#22252a] text-slate-400 hover:text-white"}`,children:"Failed"}),e.jsx("button",{onClick:()=>s("Waiting"),className:`text-xs font-bold px-4 py-1.5 rounded-full transition-colors ${t==="Waiting"?"bg-primary text-white":"bg-[#22252a] dark:bg-[#22252a] text-slate-400 hover:text-white"}`,children:"Idle"}),e.jsxs("div",{className:"ml-auto flex gap-2",children:[e.jsx("button",{className:"p-1.5 text-slate-400 hover:text-white",children:e.jsx("span",{className:"material-symbols-outlined",children:"filter_list"})}),e.jsx("button",{className:"p-1.5 text-slate-400 hover:text-white",children:e.jsx("span",{className:"material-symbols-outlined",children:"grid_view"})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:[e.jsx("div",{className:"lg:col-span-8 space-y-4",children:e.jsx("div",{className:"bg-[#1a1d21] dark:bg-[#1a1d21] border border-white/10 rounded-xl overflow-hidden shadow-sm",children:m?e.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading jobs..."}):x?e.jsx("div",{className:"p-8 text-center text-red-400",children:"Failed to load jobs"}):y.length===0?e.jsx("div",{className:"p-12 text-center text-slate-400",children:"No jobs found"}):e.jsx(e.Fragment,{children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#22252a]/50 text-slate-400 text-[11px] uppercase tracking-widest border-b border-white/10",children:[e.jsx("th",{className:"px-6 py-4 font-bold",children:"Status"}),e.jsx("th",{className:"px-4 py-4 font-bold",children:"Job Name"}),e.jsx("th",{className:"px-4 py-4 font-bold",children:"Level"}),e.jsx("th",{className:"px-4 py-4 font-bold",children:"Last Run"}),e.jsx("th",{className:"px-4 py-4 font-bold",children:"Next Run"}),e.jsx("th",{className:"px-6 py-4 font-bold text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-white/5",children:y.slice(0,10).map(T=>{const ne=_(T.status),Z=n===T.id;return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:`transition-colors group ${T.status==="Running"?"bg-primary/[0.03] hover:bg-primary/[0.05]":"hover:bg-white/[0.02]"}`,onClick:()=>o(Z?null:T.id),children:[e.jsx("td",{className:"px-6 py-5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${ne.dot} status-dot ${T.status==="Running"?"animate-pulse":""}`}),e.jsx("span",{className:`text-xs font-bold ${ne.text} uppercase`,children:ne.label})]})}),e.jsx("td",{className:"px-4 py-5",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-bold text-sm tracking-tight text-white",children:T.job_name}),e.jsxs("span",{className:"text-[10px] text-slate-500 uppercase tracking-tighter",children:["SD: ",T.storage_name||"N/A"," | Pool: ",T.pool_name||"N/A"]})]})}),e.jsx("td",{className:"px-4 py-5",children:w(T.job_level)}),e.jsx("td",{className:`px-4 py-5 text-sm ${T.status==="Running"?"text-primary font-bold":"text-slate-300"}`,children:T.status==="Running"?"Active":g(T.ended_at||T.started_at)}),e.jsx("td",{className:"px-4 py-5 text-sm text-slate-300 font-medium",children:j(T)}),e.jsx("td",{className:"px-6 py-5 text-right",children:T.status==="Running"?e.jsx("button",{className:"bg-danger/20 hover:bg-danger text-danger hover:text-white px-3 py-1 rounded-md text-[11px] font-bold transition-all uppercase",children:"Stop"}):e.jsx("button",{className:"bg-primary/20 hover:bg-primary text-primary hover:text-white px-3 py-1 rounded-md text-[11px] font-bold transition-all",children:"RUN"})})]},T.id),Z&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-6 py-5 bg-[#22252a]/20 border-t border-white/5",children:e.jsxs("div",{className:"flex items-start gap-8",children:[e.jsxs("div",{className:"space-y-4 flex-1",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-primary",children:"Live Stats"}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[#121416]/50 p-3 rounded border border-white/5",children:[e.jsx("p",{className:"text-[10px] text-slate-500 font-bold uppercase",children:"Files Tracked"}),e.jsx("p",{className:"text-xl font-bold font-display text-white",children:T.files_written.toLocaleString()})]}),e.jsxs("div",{className:"bg-[#121416]/50 p-3 rounded border border-white/5",children:[e.jsx("p",{className:"text-[10px] text-slate-500 font-bold uppercase",children:"Storage Used"}),e.jsx("p",{className:"text-xl font-bold font-display text-white",children:B(T.bytes_written)})]}),e.jsxs("div",{className:"bg-[#121416]/50 p-3 rounded border border-white/5",children:[e.jsx("p",{className:"text-[10px] text-slate-500 font-bold uppercase",children:"Duration"}),e.jsx("p",{className:"text-xl font-bold font-display text-white",children:T.duration_seconds?`${Math.floor(T.duration_seconds/60)}m`:"-"})]})]})]}),e.jsxs("div",{className:"w-64 space-y-3",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-slate-400",children:"Job Details"}),e.jsxs("ul",{className:"text-xs space-y-2",children:[e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-1",children:[e.jsx("span",{className:"text-slate-500",children:"Client"}),e.jsx("span",{className:"font-bold text-white",children:T.client_name})]}),e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-1",children:[e.jsx("span",{className:"text-slate-500",children:"Type"}),e.jsx("span",{className:"font-bold text-white",children:T.job_type})]}),e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-1",children:[e.jsx("span",{className:"text-slate-500",children:"Job ID"}),e.jsx("span",{className:"font-bold text-white",children:T.job_id})]})]})]})]})})})]})})})]})})})}),e.jsxs("div",{className:"lg:col-span-4 space-y-6",children:[e.jsxs("div",{className:"bg-[#1a1d21] dark:bg-[#1a1d21] border border-white/10 rounded-xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("h3",{className:"font-bold text-sm tracking-tight flex items-center gap-2 text-white",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-xl",children:"calendar_month"}),"Backup Window Schedule"]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>u(new Date(c.getFullYear(),c.getMonth()-1,1)),className:"p-1 hover:bg-white/10 rounded",children:e.jsx("span",{className:"material-symbols-outlined text-sm text-slate-400",children:"chevron_left"})}),e.jsx("button",{onClick:()=>u(new Date(c.getFullYear(),c.getMonth()+1,1)),className:"p-1 hover:bg-white/10 rounded",children:e.jsx("span",{className:"material-symbols-outlined text-sm text-slate-400",children:"chevron_right"})})]})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1 text-center mb-4",children:[["S","M","T","W","T","F","S"].map((T,ne)=>e.jsx("div",{className:"text-[10px] font-bold text-slate-500 uppercase",children:T},ne)),K.map((T,ne)=>{if(T===null)return e.jsx("div",{className:"aspect-square flex items-center justify-center text-[11px] opacity-20"},ne);const Z=T===M&&c.getMonth()===new Date().getMonth(),U=Math.random()>.7;return e.jsxs("div",{className:`aspect-square flex items-center justify-center text-[11px] relative ${Z?"bg-primary text-white rounded font-bold":"text-white"}`,children:[T,U&&!Z&&e.jsx("div",{className:"absolute bottom-1 w-1 h-1 bg-primary rounded-full"})]},ne)})]}),e.jsxs("div",{className:"mt-6 pt-6 border-t border-white/5 space-y-4",children:[e.jsx("h4",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest",children:"Upcoming Jobs"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"bg-[#22252a] rounded px-2 py-1 text-center min-w-[48px]",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Today"}),e.jsx("p",{className:"text-xs font-black text-white",children:"22:00"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-xs font-bold leading-none mb-1 tracking-tight text-white",children:"Cloud_Incremental"}),e.jsx("p",{className:"text-[10px] text-slate-500 uppercase",children:"Priority: 10"})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"bg-[#22252a] rounded px-2 py-1 text-center min-w-[48px]",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Today"}),e.jsx("p",{className:"text-xs font-black text-white",children:"23:30"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-xs font-bold leading-none mb-1 tracking-tight text-white",children:"VM_Snapshot_Cluster"}),e.jsx("p",{className:"text-[10px] text-slate-500 uppercase",children:"Priority: 15"})]})]})]})]}),e.jsxs("div",{className:"bg-primary/5 border border-[#1f5c9c]/30 rounded-xl p-5 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-primary/5 rounded-full -mr-16 -mt-16 blur-3xl"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("span",{className:"material-symbols-outlined text-primary mb-3",children:"verified"}),e.jsx("h4",{className:"font-bold text-sm tracking-tight mb-2 text-white",children:"Backup Health Score"}),e.jsxs("div",{className:"flex items-end gap-2 mb-4",children:[e.jsxs("span",{className:"text-3xl font-black text-primary leading-none",children:[V,"%"]}),e.jsx("span",{className:"text-[10px] text-success font-bold pb-1",children:"+0.4% this week"})]}),e.jsx("div",{className:"w-full bg-white/5 rounded-full h-1.5 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full rounded-full",style:{width:`${V}%`}})}),e.jsxs("p",{className:"text-[11px] text-slate-400 mt-4 leading-relaxed italic",children:["The last ",y.length," jobs completed. ",N.length," job",N.length!==1?"s":""," required manual intervention."]})]})]})]})]}),e.jsxs("footer",{className:"mt-8 border-t border-white/5 bg-[#121416]/80 px-6 py-2 flex justify-between items-center text-[10px] text-slate-500 font-medium",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success"})," Director: Online"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success"})," Storage: Online"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success"})," Database: 0.1ms"]})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("span",{children:"v13.0.2 Bacula Community"}),e.jsx("span",{children:"Up: 12d 4h 12m"})]})]}),l&&e.jsx(RS,{onClose:()=>d(!1),onSuccess:async()=>{d(!1),await r.invalidateQueries({queryKey:["backup-jobs"]}),await r.refetchQueries({queryKey:["backup-jobs"]})}})]})}function RS({onClose:r,onSuccess:t}){const[s,n]=Ce.useState({job_name:"",client_name:"",job_type:"Backup",job_level:"Full",storage_name:"",pool_name:""}),[o,l]=Ce.useState(null),d=ft({mutationFn:ys.createJob,onSuccess:()=>{t()},onError:u=>{l(u.response?.data?.error||"Failed to create job")}}),c=u=>{u.preventDefault(),l(null);const h={job_name:s.job_name,client_name:s.client_name,job_type:s.job_type,job_level:s.job_level};s.storage_name&&(h.storage_name=s.storage_name),s.pool_name&&(h.pool_name=s.pool_name),d.mutate(h)};return e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Create Backup Job"}),e.jsx("button",{onClick:r,className:"text-text-secondary hover:text-white transition-colors",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:c,className:"p-6 space-y-4",children:[o&&e.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/20 rounded-lg text-red-400 text-sm",children:o}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-white text-sm font-semibold mb-2",children:["Job Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:s.job_name,onChange:u=>n({...s,job_name:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"e.g., DailyBackup"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-white text-sm font-semibold mb-2",children:["Client Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:s.client_name,onChange:u=>n({...s,client_name:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"e.g., filesrv-02"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-white text-sm font-semibold mb-2",children:["Job Type ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("select",{required:!0,value:s.job_type,onChange:u=>n({...s,job_type:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent appearance-none cursor-pointer",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.75rem center",paddingRight:"2.5rem"},children:[e.jsx("option",{value:"Backup",children:"Backup"}),e.jsx("option",{value:"Restore",children:"Restore"}),e.jsx("option",{value:"Verify",children:"Verify"}),e.jsx("option",{value:"Copy",children:"Copy"}),e.jsx("option",{value:"Migrate",children:"Migrate"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-white text-sm font-semibold mb-2",children:["Job Level ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("select",{required:!0,value:s.job_level,onChange:u=>n({...s,job_level:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent appearance-none cursor-pointer",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.75rem center",paddingRight:"2.5rem"},children:[e.jsx("option",{value:"Full",children:"Full"}),e.jsx("option",{value:"Incremental",children:"Incremental"}),e.jsx("option",{value:"Differential",children:"Differential"}),e.jsx("option",{value:"Since",children:"Since"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-semibold mb-2",children:"Storage Name (Optional)"}),e.jsx("input",{type:"text",value:s.storage_name,onChange:u=>n({...s,storage_name:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"e.g., backup-srv-01"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-semibold mb-2",children:"Pool Name (Optional)"}),e.jsx("input",{type:"text",value:s.pool_name,onChange:u=>n({...s,pool_name:u.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"e.g., Default"})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 bg-[#111a22] border border-border-dark rounded-lg text-white text-sm font-semibold hover:bg-[#1c2936] transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:d.isPending,className:"px-4 py-2 bg-primary text-white rounded-lg text-sm font-semibold hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d.isPending?"Creating...":"Create Job"})]})]})]})})}function OS(){const[r,t]=Ce.useState([]),[s,n]=Ce.useState(""),[o,l]=Ce.useState(!1),d=Ce.useRef(null),c=Ce.useRef(null);Ce.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[r]),Ce.useEffect(()=>{c.current&&c.current.focus()},[]);const u=ft({mutationFn:x=>ys.executeBconsoleCommand(x),onSuccess:(x,y)=>{t(p=>[...p,{command:y,output:x.output,timestamp:new Date}]),n(""),l(!1),setTimeout(()=>{c.current&&c.current.focus()},100)},onError:x=>{t(y=>[...y,{command:s,output:x?.response?.data?.output||x?.response?.data?.details||x.message||"Error executing command",timestamp:new Date}]),n(""),l(!1),setTimeout(()=>{c.current&&c.current.focus()},100)}}),h=x=>{x.preventDefault();const y=s.trim();!y||o||(l(!0),u.mutate(y))},m=x=>{x.ctrlKey&&x.key==="l"&&(x.preventDefault(),t([]))};return e.jsxs("div",{className:"flex flex-col h-full bg-[#0a0f14] border border-border-dark rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"flex-none px-4 py-3 bg-[#161f29] border-b border-border-dark flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-base text-primary",children:"terminal"}),e.jsx("h3",{className:"text-white text-sm font-bold",children:"Console View"})]}),e.jsx("button",{onClick:()=>t([]),className:"text-xs text-text-secondary hover:text-white transition-colors",children:"Clear"})]}),e.jsxs("div",{ref:d,className:"flex-1 overflow-y-auto p-4 bg-[#0a0f14] custom-scrollbar",style:{minHeight:"400px"},children:[r.length===0?e.jsxs("div",{className:"text-text-secondary",children:[e.jsx("div",{className:"mb-2",children:"Console View - Type commands below"}),e.jsxs("div",{className:"text-xs opacity-70",children:[e.jsx("div",{children:"Common commands:"}),e.jsxs("div",{className:"ml-4 mt-1",children:[e.jsx("div",{children:"• list jobs"}),e.jsx("div",{children:"• list clients"}),e.jsx("div",{children:"• list pools"}),e.jsx("div",{children:"• status director"}),e.jsx("div",{children:"• help"})]})]})]}):r.map((x,y)=>e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"text-primary mb-2 font-mono text-sm",children:[e.jsx("span",{className:"text-text-secondary",children:"$"})," ",e.jsx("span",{className:"text-white",children:x.command})]}),e.jsx("div",{className:"text-green-400 font-mono text-xs leading-relaxed whitespace-pre overflow-x-auto",style:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',lineHeight:"1.6",tabSize:2},children:x.output})]},y)),o&&e.jsx("div",{className:"text-text-secondary",children:e.jsx("span",{className:"animate-pulse",children:"Executing..."})})]}),e.jsx("div",{className:"flex-none border-t border-border-dark bg-[#161f29]",children:e.jsxs("form",{onSubmit:h,className:"flex items-center",children:[e.jsx("span",{className:"px-4 text-primary font-mono text-sm",children:"$"}),e.jsx("input",{ref:c,"data-console-input":!0,type:"text",value:s,onChange:x=>n(x.target.value),onKeyDown:m,disabled:o,placeholder:"Enter bconsole command...",className:"flex-1 bg-transparent text-white font-mono text-sm py-3 focus:outline-none disabled:opacity-50"}),e.jsx("button",{type:"submit",disabled:!s.trim()||o,className:"px-4 py-3 text-primary hover:text-white disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-base",children:"send"})})]})})]})}function HS(){const{data:r}=dt({queryKey:["backup-clients-all"],queryFn:()=>ys.listClients()}),t=r?.clients||[],s=r?.total||0,n=t.filter(h=>h.category==="File"||!h.category).length,o=t.filter(h=>h.category==="Database").length,l=t.filter(h=>h.category==="Virtual").length,c=(()=>{const h=[],m=new Date;for(let x=5;x>=0;x--){const p=new Date(m.getFullYear(),m.getMonth()-x,1).toLocaleDateString("en-US",{month:"short"}),v=Math.max(0,Math.round(n*(.3+(5-x)*.14))),N=Math.max(0,Math.round(o*(.2+(5-x)*.16))),B=Math.max(0,Math.round(l*(.25+(5-x)*.15)));h.push({month:p,Filesystem:v,Database:N,Virtualization:B})}return h})(),u=h=>{const m=new URLSearchParams(window.location.search);m.set("tab",h),window.history.replaceState({},"",`${window.location.pathname}?${m.toString()}`),window.location.reload()};return e.jsxs("div",{className:"flex flex-col gap-6 flex-1",children:[e.jsx("header",{className:"flex flex-wrap justify-between items-end gap-4 border-b border-slate-200 dark:border-[#233648] pb-6",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-white dark:text-white text-3xl md:text-4xl font-black leading-tight tracking-tight",children:"Client Management"}),e.jsxs("span",{className:"flex h-6 px-2 items-center rounded-full bg-primary/20 border border-primary/30 text-xs font-bold text-primary",children:[s," Total"]})]}),e.jsx("p",{className:"text-text-secondary dark:text-slate-400 text-base font-normal max-w-2xl",children:"Monitor and manage backup clients across filesystem, database, and virtualization platforms."})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("button",{onClick:()=>u("clients-filesystem"),className:"bg-white dark:bg-[#1e293b] border border-slate-200 dark:border-slate-800 rounded-xl p-6 hover:shadow-lg transition-all text-left group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("div",{className:"p-3 bg-blue-500/10 dark:bg-blue-500/20 rounded-lg group-hover:bg-blue-500/20 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-blue-500 text-2xl",children:"folder"})}),e.jsx("span",{className:"material-symbols-outlined text-slate-400 group-hover:text-primary transition-colors",children:"arrow_forward"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-1",children:n}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:"Filesystem Clients"}),e.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-2",children:"Local file system backups"})]}),e.jsxs("button",{onClick:()=>u("clients-database"),className:"bg-white dark:bg-[#1e293b] border border-slate-200 dark:border-slate-800 rounded-xl p-6 hover:shadow-lg transition-all text-left group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("div",{className:"p-3 bg-indigo-500/10 dark:bg-indigo-500/20 rounded-lg group-hover:bg-indigo-500/20 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-indigo-500 text-2xl",children:"database"})}),e.jsx("span",{className:"material-symbols-outlined text-slate-400 group-hover:text-primary transition-colors",children:"arrow_forward"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-1",children:o}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:"Database & Application Clients"}),e.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-2",children:"MySQL, PostgreSQL, Oracle, SAP HANA"})]}),e.jsxs("button",{onClick:()=>u("clients-virtualization"),className:"bg-white dark:bg-[#1e293b] border border-slate-200 dark:border-slate-800 rounded-xl p-6 hover:shadow-lg transition-all text-left group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("div",{className:"p-3 bg-purple-500/10 dark:bg-purple-500/20 rounded-lg group-hover:bg-purple-500/20 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-purple-500 text-2xl",children:"dns"})}),e.jsx("span",{className:"material-symbols-outlined text-slate-400 group-hover:text-primary transition-colors",children:"arrow_forward"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-1",children:l}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:"Virtualization Clients"}),e.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-2",children:"VM backups and snapshots"})]})]}),e.jsxs("div",{className:"bg-white dark:bg-[#1e293b] border border-slate-200 dark:border-slate-800 rounded-xl p-6 shadow-sm",children:[e.jsx("div",{className:"flex items-center justify-between mb-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-1",children:"Client Growth Trend"}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Client count growth over the last 6 months"})]})}),e.jsx("div",{className:"h-80 w-full",children:e.jsx(Cl,{width:"100%",height:"100%",children:e.jsxs(f4,{data:c,margin:{top:10,right:30,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"colorFilesystem",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]}),e.jsxs("linearGradient",{id:"colorDatabase",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),e.jsxs("linearGradient",{id:"colorVirtualization",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#a855f7",stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:"#a855f7",stopOpacity:0})]})]}),e.jsx(Nc,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),e.jsx(Bc,{dataKey:"month",stroke:"#64748b",style:{fontSize:"12px"},tick:{fill:"#64748b"}}),e.jsx(jc,{stroke:"#64748b",style:{fontSize:"12px"},tick:{fill:"#64748b"},allowDecimals:!1}),e.jsx(Sl,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"},labelStyle:{color:"#cbd5e1",fontSize:"12px",marginBottom:"4px"},itemStyle:{color:"#fff",fontSize:"12px"},formatter:h=>[h,"Clients"]}),e.jsx(Qh,{wrapperStyle:{fontSize:"12px",color:"#64748b",paddingTop:"20px"},iconType:"circle"}),e.jsx(vh,{type:"monotone",dataKey:"Filesystem",stroke:"#3b82f6",strokeWidth:2,fill:"url(#colorFilesystem)",name:"Filesystem"}),e.jsx(vh,{type:"monotone",dataKey:"Database",stroke:"#6366f1",strokeWidth:2,fill:"url(#colorDatabase)",name:"Database"}),e.jsx(vh,{type:"monotone",dataKey:"Virtualization",stroke:"#a855f7",strokeWidth:2,fill:"url(#colorVirtualization)",name:"Virtualization"})]})})})]})]})}function MS({onSwitchToConsole:r}){const[t,s]=Ce.useState(""),[n,o]=Ce.useState("all"),[l,d]=Ce.useState(new Set),[c,u]=Ce.useState(new Set),{data:h,isLoading:m,error:x}=dt({queryKey:["backup-clients-filesystem",n,t],queryFn:()=>ys.listClients({category:"File",enabled:n==="all"?void 0:n==="enabled",search:t||void 0})}),y=h?.clients||[],p=h?.total||0,v=g=>{if(!g)return"-";try{const j=new Date(g),w=new Date().getTime()-j.getTime(),L=Math.floor(w/6e4),K=Math.floor(w/36e5),M=Math.floor(w/864e5);return L<1?"Just now":L<60?`${L}m ago`:K<24?`${K}h ago`:M<7?`${M}d ago`:j.toLocaleDateString()}catch{return"-"}},N=g=>{d(j=>{const _=new Set(j);return _.has(g)?_.delete(g):_.add(g),_})},B=g=>{const j=new URLSearchParams(window.location.search);j.set("tab",g),window.history.replaceState({},"",`${window.location.pathname}?${j.toString()}`),window.location.reload()};return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:TS}),e.jsxs("div",{className:"max-w-[1400px] mx-auto p-6 space-y-8",children:[e.jsxs("header",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>B("clients"),className:"flex items-center justify-center w-10 h-10 rounded-lg border border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors text-white",title:"Back to Client Dashboard",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_back"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-white",children:"Filesystem Client Management"}),e.jsxs("span",{className:"bg-primary/20 text-primary text-xs font-semibold px-2.5 py-0.5 rounded-full border border-primary/30",children:[p," Clients"]})]}),e.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:"Manage filesystem backup clients, configure local agents, and monitor data integrity."})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>r?.(),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors text-white",children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"terminal"}),"Console"]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium bg-primary text-white rounded-lg hover:bg-blue-600 transition-colors shadow-lg shadow-primary/20",children:[e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"add"}),"Add New FS Client"]})]})]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-center justify-between",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4 w-full lg:w-auto",children:[e.jsxs("div",{className:"relative w-full lg:w-80",children:[e.jsx("span",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-slate-400",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"search"})}),e.jsx("input",{className:"block w-full pl-10 pr-3 py-2 border border-slate-200 dark:border-slate-700 rounded-lg bg-white dark:bg-slate-900 text-sm focus:ring-2 focus:ring-primary focus:border-transparent transition-all outline-none text-white",placeholder:"Search clients by name, IP...",type:"text",value:t,onChange:g=>s(g.target.value)})]}),e.jsxs("div",{className:"flex p-1 bg-slate-100 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700",children:[e.jsx("button",{onClick:()=>o("all"),className:`px-3 py-1 text-xs font-medium rounded-md transition-colors ${n==="all"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,children:"All"}),e.jsx("button",{onClick:()=>o("enabled"),className:`px-3 py-1 text-xs font-medium rounded-md transition-colors ${n==="enabled"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,children:"Online"}),e.jsx("button",{onClick:()=>o("offline"),className:`px-3 py-1 text-xs font-medium rounded-md transition-colors ${n==="offline"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,children:"Offline"})]})]}),e.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 text-xs font-medium border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors text-white ml-auto lg:ml-0",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"sort"}),"Sort: Status"]})]}),e.jsx("div",{className:"bg-white dark:bg-card-dark border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-sm",children:m?e.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading clients..."}):x?e.jsx("div",{className:"p-8 text-center text-red-400",children:"Failed to load clients"}):y.length===0?e.jsx("div",{className:"p-12 text-center text-slate-400",children:"No filesystem clients found"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[11px] font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider border-b border-slate-200 dark:border-slate-800",children:[e.jsx("th",{className:"px-6 py-4 w-12 text-center",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox"})}),e.jsx("th",{className:"px-6 py-4",children:"Client Name"}),e.jsx("th",{className:"px-6 py-4",children:"Category"}),e.jsx("th",{className:"px-6 py-4",children:"Connection"}),e.jsx("th",{className:"px-6 py-4",children:"Status"}),e.jsx("th",{className:"px-6 py-4",children:"Last Backup"}),e.jsx("th",{className:"px-6 py-4",children:"Version"}),e.jsx("th",{className:"px-6 py-4 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:y.map(g=>{const j=l.has(g.client_id),_=g.status==="online";return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:"group hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 text-center",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox",checked:c.has(g.client_id),onChange:w=>{const L=new Set(c);w.target.checked?L.add(g.client_id):L.delete(g.client_id),u(L)}})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>N(g.client_id),className:"text-slate-400 hover:text-primary transition-colors cursor-pointer",children:e.jsx("span",{className:"material-symbols-outlined",children:j?"keyboard_arrow_down":"keyboard_arrow_right"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-800 rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined text-slate-600 dark:text-slate-400",children:"dns"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:g.name}),e.jsx("div",{className:"text-[11px] text-slate-500",children:"13.0.4 (12Feb24) x86_64-pc-linux-gnu"})]})]})]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-[11px] font-medium bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border border-blue-100 dark:border-blue-800",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"folder"}),"File"]})}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsx("div",{className:"text-sm font-medium text-white",children:"192.168.10.25"}),e.jsx("div",{className:"text-[11px] text-slate-500",children:"Port: 9102"})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-semibold ${_?"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 border border-emerald-100 dark:border-emerald-800/30":"bg-slate-100 dark:bg-slate-800 text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-700"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${_?"bg-emerald-500":"bg-slate-400"} ${_?"animate-pulse":""}`}),_?"Online":"Offline"]})}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-tight",children:"Success"})]}),e.jsxs("div",{className:"text-[11px] text-slate-500",children:[v(g.last_backup_at)," (Daily)"]})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"text-xs font-mono text-slate-500 dark:text-slate-400 bg-slate-100 dark:bg-slate-800 px-2 py-0.5 rounded",children:"v22.4.1"})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{className:"text-slate-400 hover:text-slate-600 dark:hover:text-slate-200 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined",children:"more_vert"})})})]},g.client_id),j&&e.jsx("tr",{className:"bg-slate-50/50 dark:bg-slate-900/50",children:e.jsx("td",{className:"p-0",colSpan:8,children:e.jsxs("div",{className:"px-16 py-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-bold text-slate-400 uppercase tracking-widest border-b border-slate-200 dark:border-slate-800 pb-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"extension"}),"Installed Agents & Plugins"]}),e.jsx("div",{className:"space-y-4 ml-8 relative",children:e.jsx("div",{className:"relative tree-line",children:e.jsxs("div",{className:"flex items-center justify-between p-4 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2 bg-blue-50 dark:bg-blue-900/20 text-primary rounded-lg",children:e.jsx("span",{className:"material-symbols-outlined",children:"folder_managed"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold text-white",children:"Standard File Daemon"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Core Bacula Client Engine"})]})]}),e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tighter",children:"Ver"}),e.jsx("span",{className:"text-sm font-mono ml-2 text-white",children:"22.4.1"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 bg-emerald-50 dark:bg-emerald-900/30 text-emerald-600 dark:text-emerald-400 rounded-lg text-xs font-semibold border border-emerald-100 dark:border-emerald-800/30",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Active"]})]})]})})})]})})})]})})})]})}),e.jsxs("div",{className:"px-6 py-4 bg-slate-50/50 dark:bg-slate-900/20 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:["Showing 1 to ",p," of ",p," clients"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"p-1 rounded-md hover:bg-slate-200 dark:hover:bg-slate-800 text-slate-400 disabled:opacity-30",disabled:!0,children:e.jsx("span",{className:"material-symbols-outlined",children:"chevron_left"})}),e.jsx("button",{className:"p-1 rounded-md hover:bg-slate-200 dark:hover:bg-slate-800 text-slate-400",children:e.jsx("span",{className:"material-symbols-outlined",children:"chevron_right"})})]})]})]})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2 text-white",children:[e.jsx("span",{className:"material-symbols-outlined text-slate-400",children:"terminal"}),"Console Log ",e.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(tail -f)"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-semibold text-emerald-500",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Connected"]})]}),e.jsxs("div",{className:"bg-black/90 dark:bg-slate-950 rounded-xl border border-slate-200 dark:border-slate-800 p-4 font-mono text-xs leading-relaxed h-48 overflow-y-auto scrollbar-thin shadow-2xl",children:[e.jsxs("div",{className:"text-slate-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:01]"})," ",e.jsx("span",{className:"text-slate-100",children:"bareos-dir: Connected to Storage at backup-srv-01:9103"})]}),e.jsxs("div",{className:"text-slate-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:02]"})," ",e.jsx("span",{className:"text-slate-100",children:'bareos-sd: Volume "Vol-0012" selected for appending'})]}),e.jsxs("div",{className:"text-slate-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:05]"})," ",e.jsxs("span",{className:"text-slate-100",children:['bareos-fd: Client "',y[0]?.name||"client",'" starting backup of /var/www/html']})]}),e.jsxs("div",{className:"text-amber-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:10]"})," warning: /var/www/html/cache/tmp locked by another process, skipping"]}),e.jsxs("div",{className:"text-slate-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:45]"})," ",e.jsx("span",{className:"text-slate-100",children:"bareos-dir: JobId 10423: Sending Accurate information."})]}),e.jsxs("div",{className:"text-slate-400 mb-1",children:[e.jsx("span",{className:"text-blue-400",children:"[14:25:12]"})," ",e.jsx("span",{className:"text-emerald-400",children:"bareos-dir: Backup completed successfully."})]}),e.jsx("div",{className:"flex items-center gap-1 animate-pulse border-l-2 border-primary pl-2 ml-1 mt-2",children:e.jsx("span",{className:"text-slate-500",children:"_"})})]})]})]})]})}function PS({onSwitchToConsole:r}){const[t,s]=Ce.useState(""),[n,o]=Ce.useState("all"),[l,d]=Ce.useState("all"),[c,u]=Ce.useState(new Set),{data:h,isLoading:m,error:x}=dt({queryKey:["backup-clients-database",n,t,l],queryFn:()=>ys.listClients({category:"Database",enabled:n==="all"?void 0:n==="enabled",search:t||void 0})}),y=[{client_id:1001,name:"postgres-prod-01",engine:"PostgreSQL",engine_version:"15",ip:"172.24.10.45",port:"9102",status:"online",last_backup_at:new Date(Date.now()-7200*1e3).toISOString(),version:"23.1.2",os:"Debian 12 (Bookworm) x64-pc-linux",backup_type:"WAL Archiving",plugin:{name:"PostgreSQL Backup Plugin",version:"23.1.2-b",description:"Support for PITR and Incremental Dumps"}},{client_id:1002,name:"mysql-webapp-db",engine:"MySQL",engine_version:"8.0",ip:"192.168.1.100",port:"9102",status:"online",last_backup_at:new Date(Date.now()-300*60*1e3).toISOString(),version:"22.4.1",os:"Ubuntu 22.04 LTS x64-pc-linux",backup_type:"Binary Log Replication",plugin:{name:"MySQL Backup Plugin",version:"22.4.1-m",description:"Binary log streaming and point-in-time recovery"}},{client_id:1003,name:"oracle-erp-db",engine:"Oracle",engine_version:"19c",ip:"10.50.20.15",port:"9102",status:"online",last_backup_at:new Date(Date.now()-1440*60*1e3).toISOString(),version:"22.3.5",os:"Oracle Linux 8 x64-pc-linux",backup_type:"RMAN Integration",plugin:{name:"Oracle RMAN Plugin",version:"22.3.5-o",description:"RMAN integration for Oracle database backups"}},{client_id:1004,name:"sap-hana-prod",engine:"SAP HANA",engine_version:"2.0",ip:"172.16.5.30",port:"9102",status:"online",last_backup_at:new Date(Date.now()-10800*1e3).toISOString(),version:"22.5.0",os:"SUSE Linux Enterprise Server 15 x64-pc-linux",backup_type:"Backint Integration",plugin:{name:"SAP HANA Backint Plugin",version:"22.5.0-h",description:"SAP HANA Backint interface integration"}}],p=h?.clients||[],v=h?.total||0,N=p.length===0?y:p,B=p.length===0?y.length:v,g=w=>{if(!w)return"-";try{const L=new Date(w),M=new Date().getTime()-L.getTime(),V=Math.floor(M/6e4),T=Math.floor(M/36e5);return V<1?"Just now":V<60?`${V}m ago`:T<24?`${T}h ago`:L.toLocaleDateString()}catch{return"-"}},j=w=>{u(L=>{const K=new Set(L);return K.has(w)?K.delete(w):K.add(w),K})},_=w=>{const L=new URLSearchParams(window.location.search);L.set("tab",w),window.history.replaceState({},"",`${window.location.pathname}?${L.toString()}`),window.location.reload()};return e.jsxs("div",{className:"max-w-[1600px] mx-auto p-6 space-y-8",children:[e.jsxs("header",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>_("clients"),className:"flex items-center justify-center w-10 h-10 rounded-lg border border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors text-white",title:"Back to Client Dashboard",children:e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"arrow_back"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-white",children:"App & DB Management"}),e.jsxs("span",{className:"px-2.5 py-0.5 rounded-full bg-primary/10 text-primary text-sm font-semibold border border-primary/20",children:[B," Clients"]})]}),e.jsx("p",{className:"mt-1 text-slate-500 dark:text-slate-400",children:"Monitor database engines, application instances, and specialized backup agents."})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>r?.(),className:"flex items-center gap-2 px-4 py-2 bg-slate-200 dark:bg-slate-800 hover:bg-slate-300 dark:hover:bg-slate-700 transition-colors rounded-lg font-medium border border-slate-300 dark:border-slate-700 text-white",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"terminal"}),"Console"]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 transition-colors text-white rounded-lg font-medium shadow-lg shadow-primary/20",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"add"}),"Add New App/DB Client"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsxs("div",{className:"relative flex-grow max-w-md",children:[e.jsx("span",{className:"absolute inset-y-0 left-3 flex items-center pointer-events-none text-slate-400",children:e.jsx("span",{className:"material-symbols-rounded",children:"search"})}),e.jsx("input",{className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"Search clients by name, IP, or engine...",type:"text",value:t,onChange:w=>s(w.target.value)})]}),e.jsxs("div",{className:"flex bg-slate-100 dark:bg-slate-800/50 p-1 rounded-lg border border-slate-200 dark:border-slate-700",children:[e.jsx("button",{onClick:()=>o("all"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="all"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"All"}),e.jsx("button",{onClick:()=>o("enabled"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="enabled"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"Online"}),e.jsx("button",{onClick:()=>o("offline"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="offline"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"Offline"})]}),e.jsxs("div",{className:"flex bg-slate-100 dark:bg-slate-800/50 p-1 rounded-lg border border-slate-200 dark:border-slate-700",children:[e.jsx("button",{onClick:()=>d("all"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${l==="all"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"All Types"}),e.jsx("button",{onClick:()=>d("mysql"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${l==="mysql"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"MySQL"}),e.jsx("button",{onClick:()=>d("postgresql"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${l==="postgresql"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"PostgreSQL"}),e.jsx("button",{onClick:()=>d("oracle"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${l==="oracle"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"Oracle"})]}),e.jsxs("button",{className:"ml-auto flex items-center gap-2 px-4 py-2 bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg text-sm font-medium text-white",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"sort"}),"Sort: Status"]})]}),e.jsx("div",{className:"overflow-hidden border border-slate-200 dark:border-slate-800 rounded-xl bg-white dark:bg-slate-900 shadow-sm",children:m?e.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading clients..."}):x?e.jsx("div",{className:"p-8 text-center text-red-400",children:"Failed to load clients"}):N.length===0?e.jsx("div",{className:"p-12 text-center text-slate-400",children:"No database clients found"}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50 dark:bg-slate-800/50 text-slate-500 dark:text-slate-400 text-xs font-bold uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 w-12",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox"})}),e.jsx("th",{className:"px-6 py-4",children:"Client Name"}),e.jsx("th",{className:"px-6 py-4",children:"Engine"}),e.jsx("th",{className:"px-6 py-4",children:"Connection"}),e.jsx("th",{className:"px-6 py-4",children:"Status"}),e.jsx("th",{className:"px-6 py-4",children:"Last Backup"}),e.jsx("th",{className:"px-6 py-4",children:"Version"}),e.jsx("th",{className:"px-6 py-4 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:N.map(w=>{const L=c.has(w.client_id),K=w.status==="online",M=w.engine==="PostgreSQL"?"bg-blue-500":w.engine==="MySQL"?"bg-orange-500":w.engine==="Oracle"?"bg-red-500":w.engine==="SAP HANA"?"bg-purple-500":"bg-blue-400";return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:"group hover:bg-slate-50/50 dark:hover:bg-slate-800/30 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox"})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>j(w.client_id),className:"text-slate-400 hover:text-primary transition-colors cursor-pointer",children:e.jsx("span",{className:"material-symbols-rounded",children:L?"keyboard_arrow_down":"keyboard_arrow_right"})}),e.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-500/10 flex items-center justify-center text-indigo-500",children:e.jsx("span",{className:"material-symbols-rounded",children:"database"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 dark:text-slate-100",children:w.name}),e.jsx("div",{className:"text-xs text-slate-500",children:w.os||"Debian 12 (Bookworm) x64-pc-linux"})]})]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full bg-slate-100 dark:bg-slate-800 text-xs font-medium border border-slate-200 dark:border-slate-700",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${M}`}),w.engine," ",w.engine_version||w.engineVersion||""]})}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsx("div",{className:"text-sm text-white",children:w.ip||"172.24.10.45"}),e.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["Port: ",w.port||"9102"]})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${K?"bg-emerald-500 animate-pulse":"bg-slate-400"}`}),e.jsx("span",{className:`text-sm font-medium ${K?"text-emerald-500":"text-slate-400"}`,children:K?"Online":"Offline"})]})}),e.jsxs("td",{className:"px-6 py-4 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-500 font-medium",children:[e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"check_circle"}),"Success"]}),e.jsxs("div",{className:"text-xs text-slate-500",children:[g(w.last_backup_at)," (",w.backup_type||"WAL Archiving",")"]})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:"px-2 py-1 bg-slate-100 dark:bg-slate-800 rounded text-xs font-mono border border-slate-200 dark:border-slate-700 text-white",children:["v",w.version||"23.1.2"]})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-full transition-colors text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",children:e.jsx("span",{className:"material-symbols-rounded",children:"more_vert"})})})]},w.client_id),L&&e.jsx("tr",{className:"bg-slate-50/50 dark:bg-slate-800/20",children:e.jsx("td",{className:"px-6 py-6 border-t border-slate-100 dark:border-slate-800",colSpan:8,children:e.jsxs("div",{className:"relative pl-12",children:[e.jsx("div",{className:"absolute left-[20px] top-0 bottom-6 w-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"absolute left-[20px] top-1/2 -translate-y-1/2 w-4 h-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"mb-4 text-xs font-bold text-slate-400 uppercase tracking-widest",children:"Installed Agents & Database Plugins"}),e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"flex items-center justify-between p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-500/10 flex items-center justify-center text-emerald-500",children:e.jsx("span",{className:"material-symbols-rounded",children:"storage"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 dark:text-slate-100 text-sm",children:w.plugin?.name||`${w.engine} Backup Plugin`}),e.jsx("div",{className:"text-xs text-slate-500",children:w.plugin?.description||"Database backup and recovery integration"})]})]}),e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:"text-slate-400",children:"VER"}),e.jsx("span",{className:"font-mono ml-1 text-slate-700 dark:text-slate-300",children:w.plugin?.version||w.version||"23.1.2-b"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-500 text-xs font-bold uppercase tracking-wider",children:[e.jsx("span",{className:"material-symbols-rounded text-[18px]",children:"check_circle"}),"Active"]})]})]})})]})})})]})})})]}),e.jsxs("div",{className:"px-6 py-4 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between text-sm text-slate-500",children:[e.jsxs("div",{children:["Showing 1 - ",B," of ",B," clients"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!0,children:e.jsx("span",{className:"material-symbols-rounded",children:"chevron_left"})}),e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!0,children:e.jsx("span",{className:"material-symbols-rounded",children:"chevron_right"})})]})]})]})}),e.jsxs("section",{className:"bg-slate-950 rounded-xl border border-slate-800 overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"px-6 py-3 border-b border-slate-800 flex items-center justify-between bg-slate-900/50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-amber-500/80"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-500/80"})]}),e.jsx("span",{className:"text-xs font-mono text-slate-400 ml-4",children:"Console Log (tail -f)"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-[10px] font-bold text-emerald-500 uppercase tracking-widest",children:"Connected"})]})]}),e.jsxs("div",{className:"p-6 h-48 overflow-y-auto custom-scrollbar font-mono text-[13px] leading-relaxed",children:[e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:01]"})," bareos-dir: Connected to Storage at backup-srv-01:9103"]}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:02]"}),' bareos-sd: Volume "Vol-0012" selected for appending']}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:05]"}),' bareos-fd: Client "',N[0]?.name||"client",'" starting backup of /var/lib/postgresql/15/main']}),e.jsxs("div",{className:"text-amber-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:10]"})," warning: /var/lib/postgresql/15/main/base/16384/2601 locked by another process, skipping..."]}),e.jsxs("div",{className:"text-emerald-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:45]"})," bareos-dir: JobId 10423: Sending Accurate information."]}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:24:12]"})," bareos-fd: Backup successful. Sent 2.4GB to Storage."]}),e.jsx("div",{className:"text-slate-500 italic mt-2 animate-pulse",children:"Waiting for next event..."})]})]})]})}function KS({onSwitchToConsole:r}){const[t,s]=Ce.useState(""),[n,o]=Ce.useState("all"),[l,d]=Ce.useState(new Set),[c,u]=Ce.useState(!1),h=Nr(),{data:m,isLoading:x,error:y}=dt({queryKey:["backup-clients-virtualization",n,t],queryFn:()=>ys.listClients({category:"Virtual",enabled:n==="all"?void 0:n==="enabled",search:t||void 0})}),p={client_id:999,name:"Proxmox Cluster (pve-cluster-01)",ip:"10.0.40.10",hypervisor:"Proxmox VE",version:"8.1",status:"online",last_backup_at:new Date().toISOString(),vms:[{id:101,name:"Ubuntu-Server-Prod",status:"running",last_backup:"Today, 03:00 AM",protection:"protected",node:"pve-01"},{id:102,name:"Win2022-DC",status:"running",last_backup:"Yesterday, 11:45 PM",protection:"protected",node:"pve-01"},{id:105,name:"vm-staging-test",status:"stopped",last_backup:"Never",protection:"unprotected",node:"pve-01"}],total_vms:5,showing_vms:3},v=m?.clients||[],N=m?.total||0,B=v.length===0?[p]:v,g=v.length===0?1:N,j=L=>{if(!L)return"-";try{const K=new Date(L),V=new Date().getTime()-K.getTime(),T=Math.floor(V/6e4),ne=Math.floor(V/36e5);return T<1?"Just now":T<60?`${T}m ago`:ne<24?`${ne}h ago`:K.toLocaleDateString()}catch{return"-"}},_=L=>{d(K=>{const M=new Set(K);return M.has(L)?M.delete(L):M.add(L),M})},w=L=>{const K=new URLSearchParams(window.location.search);K.set("tab",L),window.history.replaceState({},"",`${window.location.pathname}?${K.toString()}`),window.location.reload()};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"max-w-[1600px] mx-auto p-6 space-y-8",children:[e.jsxs("header",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>w("clients"),className:"flex items-center justify-center w-10 h-10 rounded-lg border border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors text-white",title:"Back to Client Dashboard",children:e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"arrow_back"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-white",children:"Virtualization Client Management"}),e.jsxs("span",{className:"px-2.5 py-0.5 rounded-full bg-primary/10 text-primary text-sm font-semibold border border-primary/20",children:[g," Clients"]})]}),e.jsx("p",{className:"mt-1 text-slate-500 dark:text-slate-400",children:"Monitor virtual machine backups, hypervisor integrations, and VM snapshot management."})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>r?.(),className:"flex items-center gap-2 px-4 py-2 bg-slate-200 dark:bg-slate-800 hover:bg-slate-300 dark:hover:bg-slate-700 transition-colors rounded-lg font-medium border border-slate-300 dark:border-slate-700 text-white",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"terminal"}),"Console"]}),e.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 transition-colors text-white rounded-lg font-medium shadow-lg shadow-primary/20",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"add"}),"Add New VM Client"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsxs("div",{className:"relative flex-grow max-w-md",children:[e.jsx("span",{className:"absolute inset-y-0 left-3 flex items-center pointer-events-none text-slate-400",children:e.jsx("span",{className:"material-symbols-rounded",children:"search"})}),e.jsx("input",{className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"Search clients by name, IP, or hypervisor...",type:"text",value:t,onChange:L=>s(L.target.value)})]}),e.jsxs("div",{className:"flex bg-slate-100 dark:bg-slate-800/50 p-1 rounded-lg border border-slate-200 dark:border-slate-700",children:[e.jsx("button",{onClick:()=>o("all"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="all"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"All"}),e.jsx("button",{onClick:()=>o("enabled"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="enabled"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"Online"}),e.jsx("button",{onClick:()=>o("offline"),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${n==="offline"?"bg-white dark:bg-slate-700 shadow-sm text-slate-900 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-100"}`,children:"Offline"})]}),e.jsxs("button",{className:"ml-auto flex items-center gap-2 px-4 py-2 bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg text-sm font-medium text-white",children:[e.jsx("span",{className:"material-symbols-rounded text-[20px]",children:"sort"}),"Sort: Status"]})]}),e.jsx("div",{className:"overflow-hidden border border-slate-200 dark:border-slate-800 rounded-xl bg-white dark:bg-slate-900 shadow-sm",children:x?e.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading clients..."}):y?e.jsx("div",{className:"p-8 text-center text-red-400",children:"Failed to load clients"}):B.length===0?e.jsx("div",{className:"p-12 text-center text-slate-400",children:"No virtualization clients found"}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50 dark:bg-slate-800/50 text-slate-500 dark:text-slate-400 text-xs font-bold uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 w-12",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox"})}),e.jsx("th",{className:"px-6 py-4",children:"Client Name"}),e.jsx("th",{className:"px-6 py-4",children:"Hypervisor"}),e.jsx("th",{className:"px-6 py-4",children:"Connection"}),e.jsx("th",{className:"px-6 py-4",children:"Status"}),e.jsx("th",{className:"px-6 py-4",children:"Last Backup"}),e.jsx("th",{className:"px-6 py-4",children:"Version"}),e.jsx("th",{className:"px-6 py-4 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:B.map(L=>{const K=l.has(L.client_id),M=L.status==="online",V=L.hypervisor==="Proxmox VE"||L.name?.includes("Proxmox");return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{className:"group hover:bg-slate-50/50 dark:hover:bg-slate-800/30 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("input",{className:"rounded border-slate-300 dark:border-slate-600 bg-transparent text-primary focus:ring-primary",type:"checkbox"})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>_(L.client_id),className:"text-slate-400 hover:text-primary transition-colors cursor-pointer",children:e.jsx("span",{className:"material-symbols-rounded",children:K?"keyboard_arrow_down":"keyboard_arrow_right"})}),V?e.jsx("div",{className:"w-10 h-10 rounded-lg bg-orange-500/20 flex items-center justify-center text-orange-500 border border-orange-500/30",children:e.jsx("span",{className:"text-lg font-bold",children:"P"})}):e.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-500/10 flex items-center justify-center text-purple-500",children:e.jsx("span",{className:"material-symbols-rounded",children:"dns"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 dark:text-slate-100",children:L.name}),e.jsx("div",{className:"text-xs text-slate-500",children:L.ip?`${L.ip} • ${L.hypervisor||"VM Host"} ${L.version||""}`.trim():"VM Host / Hypervisor"})]})]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full ${V?"bg-orange-500/10 border-orange-500/30":"bg-slate-100 dark:bg-slate-800 border-slate-200 dark:border-slate-700"} text-xs font-medium border`,children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${V?"bg-orange-500":"bg-purple-500"}`}),L.hypervisor||"VMware vSphere"]})}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsx("div",{className:"text-sm text-white",children:L.ip||"10.0.50.112"}),e.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["Port: ",L.port||"9102"]})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${M?"bg-emerald-500 animate-pulse":"bg-slate-400"}`}),e.jsx("span",{className:`text-sm font-medium ${M?"text-emerald-500":"text-slate-400"}`,children:M?"CONNECTED":"Offline"})]})}),e.jsxs("td",{className:"px-6 py-4 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-500 font-medium",children:[e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"check_circle"}),"Success"]}),e.jsxs("div",{className:"text-xs text-slate-500",children:[j(L.last_backup_at)," (Snapshot)"]})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"px-2 py-1 bg-slate-100 dark:bg-slate-800 rounded text-xs font-mono border border-slate-200 dark:border-slate-700 text-white",children:L.version?`v${L.version}`:"v22.4.1"})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-full transition-colors text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",children:e.jsx("span",{className:"material-symbols-rounded",children:"more_vert"})})})]},L.client_id),K&&e.jsx(e.Fragment,{children:V&&L.vms?e.jsx("tr",{className:"bg-slate-50/50 dark:bg-slate-800/20",children:e.jsx("td",{className:"px-6 py-6 border-t border-slate-100 dark:border-slate-800",colSpan:8,children:e.jsxs("div",{className:"relative pl-12",children:[e.jsx("div",{className:"absolute left-[20px] top-0 bottom-6 w-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"absolute left-[20px] top-1/2 -translate-y-1/2 w-4 h-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"mb-4 text-xs font-bold text-slate-400 uppercase tracking-widest",children:"Virtual Machines"}),e.jsxs("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl overflow-hidden",children:[e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50 dark:bg-slate-800/50 text-slate-500 dark:text-slate-400 text-xs font-bold uppercase tracking-wider",children:[e.jsx("th",{className:"px-4 py-3",children:"VM ID"}),e.jsx("th",{className:"px-4 py-3",children:"Name"}),e.jsx("th",{className:"px-4 py-3",children:"Status"}),e.jsx("th",{className:"px-4 py-3",children:"Last Backup"}),e.jsx("th",{className:"px-4 py-3",children:"Protection"}),e.jsx("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:L.vms.map(T=>e.jsxs("tr",{className:"hover:bg-slate-50/50 dark:hover:bg-slate-800/30 transition-colors",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"font-mono text-sm text-white",children:T.id})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[T.name.includes("Win")?e.jsx("span",{className:"material-symbols-rounded text-slate-400",children:"desktop_windows"}):e.jsx("span",{className:"material-symbols-rounded text-slate-400",children:"folder"}),e.jsx("span",{className:`font-medium text-white ${T.name.includes("staging")?"italic":""}`,children:T.name})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${T.status==="running"?"bg-emerald-500":"bg-slate-400"}`}),e.jsx("span",{className:`text-sm font-medium ${T.status==="running"?"text-emerald-500":"text-slate-400"}`,children:T.status==="running"?"RUNNING":"STOPPED"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-sm text-white",children:T.last_backup})}),e.jsx("td",{className:"px-4 py-3",children:T.protection==="protected"?e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-500 text-sm font-medium",children:[e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"check_circle"}),"Protected"]}):e.jsxs("div",{className:"flex items-center gap-1.5 text-amber-500 text-sm font-medium",children:[e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"warning"}),"Unprotected"]})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{className:"p-1.5 hover:bg-slate-100 dark:hover:bg-slate-700 rounded transition-colors text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",children:e.jsx("span",{className:"material-symbols-rounded text-[18px]",children:"more_vert"})})})]},T.id))})]}),e.jsxs("div",{className:"px-4 py-3 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between text-xs text-slate-500 bg-slate-50 dark:bg-slate-900/50",children:[e.jsxs("div",{children:["Showing ",L.showing_vms||L.vms.length," of ",L.total_vms||L.vms.length," VMs found on node ",L.vms[0]?.node||"pve-01"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!0,children:e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"chevron_left"})}),e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",children:e.jsx("span",{className:"material-symbols-rounded text-[16px]",children:"chevron_right"})})]})]})]})]})})}):e.jsx("tr",{className:"bg-slate-50/50 dark:bg-slate-800/20",children:e.jsx("td",{className:"px-6 py-6 border-t border-slate-100 dark:border-slate-800",colSpan:8,children:e.jsxs("div",{className:"relative pl-12",children:[e.jsx("div",{className:"absolute left-[20px] top-0 bottom-6 w-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"absolute left-[20px] top-1/2 -translate-y-1/2 w-4 h-px bg-slate-300 dark:bg-slate-700"}),e.jsx("div",{className:"mb-4 text-xs font-bold text-slate-400 uppercase tracking-widest",children:"Installed Agents & Virtualization Plugins"}),e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"flex items-center justify-between p-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-500/10 flex items-center justify-center text-purple-500",children:e.jsx("span",{className:"material-symbols-rounded",children:"cloud"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 dark:text-slate-100 text-sm",children:"VMware vSphere Plugin"}),e.jsx("div",{className:"text-xs text-slate-500",children:"VM snapshot and backup integration"})]})]}),e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:"text-slate-400",children:"VER"}),e.jsx("span",{className:"font-mono ml-1 text-slate-700 dark:text-slate-300",children:"22.4.1-vm"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-500 text-xs font-bold uppercase tracking-wider",children:[e.jsx("span",{className:"material-symbols-rounded text-[18px]",children:"check_circle"}),"Active"]})]})]})})]})})})})]})})})]}),e.jsxs("div",{className:"px-6 py-4 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between text-sm text-slate-500",children:[e.jsxs("div",{children:["Showing 1 - ",g," of ",g," clients"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!0,children:e.jsx("span",{className:"material-symbols-rounded",children:"chevron_left"})}),e.jsx("button",{className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-50",disabled:!0,children:e.jsx("span",{className:"material-symbols-rounded",children:"chevron_right"})})]})]})]})}),e.jsxs("section",{className:"bg-slate-950 rounded-xl border border-slate-800 overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"px-6 py-3 border-b border-slate-800 flex items-center justify-between bg-slate-900/50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-amber-500/80"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-500/80"})]}),e.jsx("span",{className:"text-xs font-mono text-slate-400 ml-4",children:"Console Log (tail -f)"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-[10px] font-bold text-emerald-500 uppercase tracking-widest",children:"Connected"})]})]}),e.jsxs("div",{className:"p-6 h-48 overflow-y-auto custom-scrollbar font-mono text-[13px] leading-relaxed",children:[e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:01]"})," bareos-dir: Connected to Storage at backup-srv-01:9103"]}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:02]"}),' bareos-sd: Volume "Vol-0012" selected for appending']}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:22:05]"}),' bareos-fd: Client "',B[0]?.name||"Proxmox Cluster",'" starting VM snapshot backup']}),e.jsxs("div",{className:"text-amber-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:10]"}),' warning: VM "Ubuntu-Server-Prod" is currently powered on, creating snapshot...']}),e.jsxs("div",{className:"text-emerald-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:23:45]"})," bareos-dir: JobId 10423: VM snapshot created successfully."]}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:24:12]"})," bareos-fd: Backup successful. Sent 5.2GB to Storage."]}),e.jsxs("div",{className:"text-slate-400",children:[e.jsx("span",{className:"text-blue-400",children:"[14:25:01]"})," bareos-dir: Found ",B[0]?.total_vms||5," VMs on node pve-01"]}),e.jsx("div",{className:"text-slate-500 italic mt-2 animate-pulse",children:"Waiting for next event..."})]})]})]}),c&&e.jsx(zS,{onClose:()=>u(!1),onSuccess:()=>{u(!1),h.invalidateQueries({queryKey:["backup-clients-virtualization"]})}})]})}function zS({onClose:r,onSuccess:t}){const[s,n]=Ce.useState({clientName:"",ipAddress:"",port:"443",hypervisorType:"vmware",authMethod:"creds",username:"",password:"",retentionPolicy:"standard",storagePool:"pool-01"}),[o]=Ce.useState(1),{data:l}=dt({queryKey:["storage-pools"],queryFn:()=>ys.listStoragePools()}),d=l?.pools||[],c=h=>{h.preventDefault(),console.log("Form submitted:",s),t()},u=()=>{console.log("Testing connection to:",s.ipAddress),alert("Connection test feature coming soon")};return e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white dark:bg-[#161d27] w-full max-w-2xl rounded-xl shadow-2xl border border-slate-200 dark:border-[#2d3748] overflow-hidden flex flex-col max-h-[90vh]",children:[e.jsx("style",{children:`
select option {
background-color: #161d27 !important;
color: white !important;
}
select option:hover,
select option:checked,
select option:focus {
background-color: #1d72f2 !important;
color: white !important;
}
`}),e.jsxs("div",{className:"px-6 py-5 border-b border-slate-200 dark:border-[#2d3748] flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold tracking-tight text-white",children:"Add New VM Client"}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"Configure a new virtualization client for backup operations."})]}),e.jsx("button",{onClick:r,className:"text-slate-400 hover:text-slate-600 dark:hover:text-white transition-colors",children:e.jsx("span",{className:"material-symbols-rounded",children:"close"})})]}),e.jsx("div",{className:"px-6 py-4 bg-slate-50 dark:bg-slate-900/50 border-b border-slate-200 dark:border-[#2d3748] overflow-x-auto",children:e.jsxs("div",{className:"flex items-center space-x-8 text-sm font-medium whitespace-nowrap",children:[e.jsxs("div",{className:`flex items-center ${o===1?"text-primary":"text-slate-400"}`,children:[e.jsx("span",{className:`w-6 h-6 rounded-full ${o===1?"bg-primary/10 border border-primary":"border border-slate-300 dark:border-slate-700"} flex items-center justify-center text-xs mr-2`,children:"1"}),"Client Details"]}),e.jsxs("div",{className:`flex items-center ${o===2?"text-primary":"text-slate-400"}`,children:[e.jsx("span",{className:`w-6 h-6 rounded-full ${o===2?"bg-primary/10 border border-primary":"border border-slate-300 dark:border-slate-700"} flex items-center justify-center text-xs mr-2`,children:"2"}),"Hypervisor"]}),e.jsxs("div",{className:`flex items-center ${o===3?"text-primary":"text-slate-400"}`,children:[e.jsx("span",{className:`w-6 h-6 rounded-full ${o===3?"bg-primary/10 border border-primary":"border border-slate-300 dark:border-slate-700"} flex items-center justify-center text-xs mr-2`,children:"3"}),"Authentication"]}),e.jsxs("div",{className:`flex items-center ${o===4?"text-primary":"text-slate-400"}`,children:[e.jsx("span",{className:`w-6 h-6 rounded-full ${o===4?"bg-primary/10 border border-primary":"border border-slate-300 dark:border-slate-700"} flex items-center justify-center text-xs mr-2`,children:"4"}),"Settings"]})]})}),e.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e.jsxs("form",{onSubmit:c,className:"space-y-8",children:[e.jsxs("section",{children:[e.jsxs("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-4 flex items-center",children:[e.jsx("span",{className:"material-symbols-rounded text-sm mr-2",children:"info"}),"Client Information"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Client Name"}),e.jsx("input",{type:"text",value:s.clientName,onChange:h=>n({...s,clientName:h.target.value}),className:"w-full bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-[#2d3748] rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all placeholder:text-slate-500 text-white",placeholder:"e.g. production-vcenter",required:!0})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"col-span-2 space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"IP Address / FQDN"}),e.jsx("input",{type:"text",value:s.ipAddress,onChange:h=>n({...s,ipAddress:h.target.value}),className:"w-full bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-[#2d3748] rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"192.168.1.50",required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Port"}),e.jsx("input",{type:"text",value:s.port,onChange:h=>n({...s,port:h.target.value}),className:"w-full bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-[#2d3748] rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"443",required:!0})]})]})]})]}),e.jsxs("section",{children:[e.jsxs("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-4 flex items-center",children:[e.jsx("span",{className:"material-symbols-rounded text-sm mr-2",children:"storage"}),"Hypervisor & Auth"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Hypervisor Type"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:s.hypervisorType,onChange:h=>n({...s,hypervisorType:h.target.value}),className:"w-full bg-primary/10 dark:bg-primary/20 border border-primary/30 dark:border-primary/40 rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary outline-none appearance-none cursor-pointer transition-all text-white pr-8 [&>option]:bg-[#161d27] [&>option]:text-white",children:[e.jsx("option",{value:"vmware",className:"bg-[#161d27] text-white",children:"VMware vSphere"}),e.jsx("option",{value:"proxmox",className:"bg-[#161d27] text-white",children:"Proxmox VE"}),e.jsx("option",{value:"ovirt",className:"bg-[#161d27] text-white",children:"oVirt / Red Hat Virtualization"})]}),e.jsx("span",{className:"material-symbols-rounded absolute right-2 top-2 pointer-events-none text-primary",children:"expand_more"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Authentication Method"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:s.authMethod,onChange:h=>n({...s,authMethod:h.target.value}),className:"w-full bg-primary/10 dark:bg-primary/20 border border-primary/30 dark:border-primary/40 rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary outline-none appearance-none cursor-pointer transition-all text-white pr-8 [&>option]:bg-[#161d27] [&>option]:text-white",children:[e.jsx("option",{value:"creds",className:"bg-[#161d27] text-white",children:"Username / Password"}),e.jsx("option",{value:"token",className:"bg-[#161d27] text-white",children:"API Token"})]}),e.jsx("span",{className:"material-symbols-rounded absolute right-2 top-2 pointer-events-none text-primary",children:"expand_more"})]})]})]}),e.jsx("div",{className:"mt-4 p-4 rounded-lg bg-slate-50 dark:bg-slate-900/30 border border-slate-200 dark:border-[#2d3748] space-y-4",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Username"}),e.jsx("input",{type:"text",value:s.username,onChange:h=>n({...s,username:h.target.value}),className:"w-full bg-white dark:bg-[#161d27] border border-slate-200 dark:border-[#2d3748] rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"administrator@vsphere.local",required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Password"}),e.jsx("input",{type:"password",value:s.password,onChange:h=>n({...s,password:h.target.value}),className:"w-full bg-white dark:bg-[#161d27] border border-slate-200 dark:border-[#2d3748] rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all text-white",placeholder:"••••••••••••",required:!0})]})]})})]}),e.jsxs("section",{children:[e.jsxs("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-4 flex items-center",children:[e.jsx("span",{className:"material-symbols-rounded text-sm mr-2",children:"settings_backup_restore"}),"Backup Settings"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Retention Policy"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:s.retentionPolicy,onChange:h=>n({...s,retentionPolicy:h.target.value}),className:"w-full bg-primary/10 dark:bg-primary/20 border border-primary/30 dark:border-primary/40 rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary outline-none appearance-none cursor-pointer transition-all text-white pr-8 [&>option]:bg-[#161d27] [&>option]:text-white",children:[e.jsx("option",{value:"standard",className:"bg-[#161d27] text-white",children:"Standard (30 Days)"}),e.jsx("option",{value:"long",className:"bg-[#161d27] text-white",children:"Long Term (1 Year)"}),e.jsx("option",{value:"short",className:"bg-[#161d27] text-white",children:"Critical (7 Days)"})]}),e.jsx("span",{className:"material-symbols-rounded absolute right-2 top-2 pointer-events-none text-primary",children:"expand_more"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"Target Storage Pool"}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:s.storagePool,onChange:h=>n({...s,storagePool:h.target.value}),className:"w-full bg-primary/10 dark:bg-primary/20 border border-primary/30 dark:border-primary/40 rounded-md px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary outline-none appearance-none cursor-pointer transition-all text-white pr-8 [&>option]:bg-[#161d27] [&>option]:text-white",children:d.length>0?d.map(h=>e.jsx("option",{value:h.name,className:"bg-[#161d27] text-white",children:h.name},h.pool_id)):e.jsxs(e.Fragment,{children:[e.jsx("option",{value:"pool-01",className:"bg-[#161d27] text-white",children:"SSD-Fast-Pool-01"}),e.jsx("option",{value:"pool-02",className:"bg-[#161d27] text-white",children:"HDD-Archive-Pool-02"})]})}),e.jsx("span",{className:"material-symbols-rounded absolute right-2 top-2 pointer-events-none text-primary",children:"expand_more"})]})]})]})]})]})}),e.jsxs("div",{className:"px-6 py-4 bg-slate-50 dark:bg-slate-900/50 border-t border-slate-200 dark:border-[#2d3748] flex items-center justify-between",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-md transition-all",children:"Cancel"}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsxs("button",{type:"button",onClick:u,className:"px-4 py-2 text-sm font-medium text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-md transition-all flex items-center",children:[e.jsx("span",{className:"material-symbols-rounded text-sm mr-1.5",children:"check_circle"}),"Test Connection"]}),e.jsxs("button",{type:"submit",onClick:c,className:"bg-primary hover:bg-primary/90 text-white px-6 py-2 rounded-md font-medium text-sm flex items-center shadow-lg shadow-primary/20 transition-all",children:[e.jsx("span",{className:"material-symbols-rounded text-sm mr-1.5",children:"add"}),"Add Client"]})]})]})]})})}function qS(){const r=Cy(),s=new URLSearchParams(r.search).get("view"),[n,o]=Ce.useState(s||"pools");Ce.useEffect(()=>{const V=new URLSearchParams(r.search).get("view")||"pools";V!==n&&(V==="pools"||V==="volumes"||V==="daemons")&&o(V)},[r.search]);const l=M=>{o(M);const V=new URLSearchParams(r.search);V.set("tab","storage"),M==="pools"?V.delete("view"):V.set("view",M);const T=`${r.pathname}?${V.toString()}`;window.history.replaceState({},"",T)},[d,c]=Ce.useState("list"),[u,h]=Ce.useState(!1),[m,x]=Ce.useState(null),y=Nr(),{data:p,isLoading:v}=dt({queryKey:["storage-pools"],queryFn:()=>ys.listStoragePools()}),N=ft({mutationFn:ys.createStoragePool,onSuccess:()=>{y.invalidateQueries({queryKey:["storage-pools"]}),c("list")}}),B=ft({mutationFn:ys.deleteStoragePool,onSuccess:()=>{y.invalidateQueries({queryKey:["storage-pools"]}),h(!1),x(null)}}),{data:g,isLoading:j}=dt({queryKey:["storage-daemons"],queryFn:()=>ys.listStorageDaemons(),enabled:n==="daemons"}),_=p?.pools||[],w=g?.daemons||[],L=M=>{if(M===0)return"0 B";const V=1024,T=["B","KB","MB","GB","TB"],ne=Math.floor(Math.log(M)/Math.log(V));return`${(M/Math.pow(V,ne)).toFixed(2)} ${T[ne]}`},K=M=>{const T={Full:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},Append:{bg:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/20"},Used:{bg:"bg-yellow-500/10",text:"text-yellow-400",border:"border-yellow-500/20"},Error:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"},Online:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},Offline:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"}}[M]||{bg:"bg-gray-500/10",text:"text-gray-400",border:"border-gray-500/20"};return e.jsx("span",{className:`inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs font-medium ${T.bg} ${T.text} border ${T.border}`,children:M})};return e.jsxs("div",{className:"flex flex-col gap-6 flex-1",children:[e.jsx("header",{className:"flex flex-wrap justify-between items-end gap-4 border-b border-border-dark pb-6",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-white text-3xl md:text-4xl font-black leading-tight tracking-tight",children:"Storage Management"}),e.jsxs("span",{className:"flex h-6 px-2 items-center rounded-full bg-surface-highlight border border-border-dark text-xs font-bold text-primary",children:[_.length," Pools"]})]}),e.jsx("p",{className:"text-text-secondary text-base font-normal max-w-2xl",children:"Manage storage pools, volumes, and storage daemons for backup operations."})]})}),e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsxs("div",{className:"flex border-b border-border-dark gap-8 min-w-max",children:[e.jsxs("button",{onClick:()=>l("pools"),className:`flex items-center gap-2 border-b-[3px] pb-3 pt-2 transition-colors ${n==="pools"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base",children:"hard_drive"}),e.jsx("p",{className:"text-sm font-bold tracking-wide",children:"Pools"})]}),e.jsxs("button",{onClick:()=>l("volumes"),className:`flex items-center gap-2 border-b-[3px] pb-3 pt-2 transition-colors ${n==="volumes"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base",children:"storage"}),e.jsx("p",{className:"text-sm font-bold tracking-wide",children:"Volumes"})]}),e.jsxs("button",{onClick:()=>l("daemons"),className:`flex items-center gap-2 border-b-[3px] pb-3 pt-2 transition-colors ${n==="daemons"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base",children:"dns"}),e.jsx("p",{className:"text-sm font-bold tracking-wide",children:"Storage Daemons"})]})]})}),n==="pools"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4 border-b border-border-dark pb-4",children:[e.jsxs("button",{onClick:()=>c("list"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${d==="list"?"bg-primary text-white":"bg-surface-highlight text-text-secondary hover:text-white hover:bg-[#2a3c50]"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-2 align-middle",children:"list"}),"List Current Pools"]}),e.jsxs("button",{onClick:()=>c("add"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${d==="add"?"bg-primary text-white":"bg-surface-highlight text-text-secondary hover:text-white hover:bg-[#2a3c50]"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-2 align-middle",children:"add"}),"Add Pool"]}),e.jsxs("button",{onClick:()=>c("delete"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${d==="delete"?"bg-primary text-white":"bg-surface-highlight text-text-secondary hover:text-white hover:bg-[#2a3c50]"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-2 align-middle",children:"delete"}),"Delete Pool"]})]}),d==="list"&&e.jsx("div",{className:"rounded-lg border border-border-dark bg-surface-highlight overflow-hidden shadow-sm",children:v?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading pools..."}):_.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No storage pools found"})}):e.jsx(e.Fragment,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface-dark border-b border-border-dark text-text-secondary text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Pool Name"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Type"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Volumes"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Usage"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Capacity"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Options"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:_.map(M=>e.jsxs("tr",{className:"hover:bg-surface-dark/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded bg-surface-dark flex items-center justify-center text-primary border border-border-dark",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"hard_drive"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white font-bold",children:M.name}),M.label_format&&e.jsx("p",{className:"text-text-secondary text-xs",children:M.label_format})]})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.pool_type||"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.volume_count}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("span",{className:"text-white text-xs font-bold",children:[Math.round(M.usage_percent),"%"]})}),e.jsx("div",{className:"w-full bg-[#111a22] h-2 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-primary to-blue-400 h-full rounded-full",style:{width:`${Math.min(M.usage_percent,100)}%`}})})]})}),e.jsxs("td",{className:"px-6 py-4 text-text-secondary font-mono text-xs",children:[L(M.used_bytes)," / ",L(M.total_bytes)]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[M.recycle&&e.jsx("span",{className:"text-xs text-text-secondary",children:"Recycle"}),M.auto_prune&&e.jsx("span",{className:"text-xs text-text-secondary",children:"Auto-Prune"})]})})]},M.pool_id))})]})})})}),d==="add"&&e.jsxs("div",{className:"rounded-lg border border-border-dark bg-surface-highlight p-6",children:[e.jsx("h3",{className:"text-white text-xl font-bold mb-4",children:"Create New Storage Pool"}),e.jsx("p",{className:"text-text-secondary text-sm mb-6",children:"Pools define the set of storage Volumes to be used by Bacula. Configure different pools to organize your backup data."}),e.jsx(GS,{onSubmit:M=>{N.mutate(M)},isLoading:N.isPending,onCancel:()=>c("list")})]}),d==="delete"&&e.jsx("div",{className:"rounded-lg border border-border-dark bg-surface-highlight overflow-hidden shadow-sm",children:v?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading pools..."}):_.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No storage pools found"})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-4 border-b border-border-dark",children:e.jsx("p",{className:"text-text-secondary text-sm mb-4",children:"Select a pool to delete. Pools with volumes cannot be deleted."})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface-dark border-b border-border-dark text-text-secondary text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Pool Name"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Type"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Volumes"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Usage"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:_.map(M=>e.jsxs("tr",{className:"hover:bg-surface-dark/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded bg-surface-dark flex items-center justify-center text-primary border border-border-dark",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"hard_drive"})}),e.jsx("p",{className:"text-white font-bold",children:M.name})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.pool_type||"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.volume_count}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-white text-xs font-bold",children:[Math.round(M.usage_percent),"%"]}),e.jsx("div",{className:"w-24 bg-[#111a22] h-2 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-primary to-blue-400 h-full rounded-full",style:{width:`${Math.min(M.usage_percent,100)}%`}})})]})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("button",{onClick:()=>{x(M),h(!0)},disabled:M.volume_count>0,className:`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${M.volume_count>0?"bg-gray-500/20 text-gray-500 cursor-not-allowed":"bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20"}`,title:M.volume_count>0?"Cannot delete pool with volumes":"Delete pool",children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-1 align-middle",children:"delete"}),"Delete"]})})]},M.pool_id))})]})})]})})]}),n==="volumes"&&e.jsx(VS,{pools:_}),n==="daemons"&&e.jsx("div",{className:"rounded-lg border border-border-dark bg-surface-highlight overflow-hidden shadow-sm",children:j?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading storage daemons..."}):w.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No storage daemons found"})}):e.jsx(e.Fragment,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface-dark border-b border-border-dark text-text-secondary text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Name"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Address"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Port"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Device"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Media Type"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Status"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:w.map(M=>e.jsxs("tr",{className:"hover:bg-surface-dark/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded bg-surface-dark flex items-center justify-center text-primary border border-border-dark",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"dns"})}),e.jsx("p",{className:"text-white font-bold",children:M.name})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary font-mono text-xs",children:M.address}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.port}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.device_name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:M.media_type}),e.jsx("td",{className:"px-6 py-4",children:K(M.status)})]},M.storage_id))})]})})})}),u&&m&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-surface-highlight border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsx("h3",{className:"text-white text-xl font-bold mb-2",children:"Delete Storage Pool"}),e.jsxs("p",{className:"text-text-secondary text-sm mb-4",children:["Are you sure you want to delete pool ",e.jsx("span",{className:"text-white font-bold",children:m.name}),"?"]}),m.volume_count>0&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-3 mb-4",children:e.jsxs("p",{className:"text-red-400 text-sm",children:["⚠️ This pool contains ",m.volume_count," volume(s). Pools with volumes cannot be deleted."]})}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>{h(!1),x(null)},className:"px-4 py-2 rounded-lg bg-surface-dark border border-border-dark text-white text-sm font-bold hover:bg-[#2a3c50] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{m.volume_count===0&&B.mutate(m.pool_id)},disabled:m.volume_count>0||B.isPending,className:"px-4 py-2 rounded-lg bg-red-500 text-white text-sm font-bold hover:bg-red-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:B.isPending?"Deleting...":"Delete Pool"})]})]})})]})}function GS({onSubmit:r,isLoading:t,onCancel:s}){const[n,o]=Ce.useState({name:"",pool_type:"Backup",label_format:"",recycle:!1,auto_prune:!1}),l=d=>{d.preventDefault(),r({name:n.name,pool_type:n.pool_type,label_format:n.label_format||void 0,recycle:n.recycle||void 0,auto_prune:n.auto_prune||void 0})};return e.jsxs("form",{onSubmit:l,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:["Pool Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:n.name,onChange:d=>o({...n,name:d.target.value}),placeholder:"e.g., Full-Backup, Incremental-Backup",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Unique name for the storage pool"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:["Pool Type ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("select",{value:n.pool_type,onChange:d=>o({...n,pool_type:d.target.value}),className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"Backup",children:"Backup"}),e.jsx("option",{value:"Scratch",children:"Scratch"}),e.jsx("option",{value:"Recycle",children:"Recycle"})]}),e.jsxs("p",{className:"text-text-secondary text-xs mt-1",children:[n.pool_type==="Backup"&&"Contains volumes for backup data with retention periods",n.pool_type==="Scratch"&&"Contains volumes that can be used by any pool when needed",n.pool_type==="Recycle"&&"Contains volumes that have been purged and are ready for reuse"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Label Format"}),e.jsx("input",{type:"text",value:n.label_format,onChange:d=>o({...n,label_format:d.target.value}),placeholder:"e.g., Vol-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-${Counter:4}",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Format string for automatic volume labeling"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:n.recycle||!1,onChange:d=>o({...n,recycle:d.target.checked}),className:"checkbox-custom"}),e.jsx("span",{className:"text-text-secondary text-sm",children:"Recycle"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:n.auto_prune||!1,onChange:d=>o({...n,auto_prune:d.target.checked}),className:"checkbox-custom"}),e.jsx("span",{className:"text-text-secondary text-sm",children:"Auto-Prune"})]})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 rounded-lg bg-surface-dark border border-border-dark text-white text-sm font-bold hover:bg-[#2a3c50] transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:t||!n.name,className:"px-4 py-2 rounded-lg bg-primary text-white text-sm font-bold hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:t?"Creating...":"Create Pool"})]})]})}function VS({pools:r}){const[t,s]=Ce.useState("list"),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(!1),[c,u]=Ce.useState(null),[h,m]=Ce.useState(null),[x,y]=Ce.useState(new Set),[p,v]=Ce.useState(""),[N,B]=Ce.useState(null),[g,j]=Ce.useState(1),_=5,w=Nr(),{data:L,isLoading:K}=dt({queryKey:["backup-media"],queryFn:()=>ys.listMedia(),enabled:t==="list",refetchOnWindowFocus:!1}),{data:M,isLoading:V}=dt({queryKey:["storage-volumes"],queryFn:()=>ys.listStorageVolumes(),enabled:t!=="list"}),T=ft({mutationFn:ys.createStorageVolume,onSuccess:()=>{w.invalidateQueries({queryKey:["storage-volumes"]}),s("list")}}),ne=ft({mutationFn:({volumeId:te,data:J})=>ys.updateStorageVolume(te,J),onSuccess:()=>{w.invalidateQueries({queryKey:["storage-volumes"]}),d(!1),m(null)}}),Z=ft({mutationFn:ys.deleteStorageVolume,onSuccess:()=>{w.invalidateQueries({queryKey:["storage-volumes"]}),o(!1),u(null)}}),U=L?.media||[],q=M?.volumes||[],F=te=>{if(te===0)return"0 B";const J=1024,O=["B","KB","MB","GB","TB"],H=Math.floor(Math.log(te)/Math.log(J));return`${(te/Math.pow(J,H)).toFixed(2)} ${O[H]}`},le=te=>{const O={Full:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},Append:{bg:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/20"},Used:{bg:"bg-yellow-500/10",text:"text-yellow-400",border:"border-yellow-500/20"},Error:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"},Recycle:{bg:"bg-gray-500/10",text:"text-gray-400",border:"border-gray-500/20"},Purged:{bg:"bg-gray-500/10",text:"text-gray-400",border:"border-gray-500/20"},Online:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},Offline:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"}}[te]||{bg:"bg-gray-500/10",text:"text-gray-400",border:"border-gray-500/20"};return e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${O.bg} ${O.text} border ${O.border}`,children:te})},ae=U.filter(te=>{if(!p)return!0;const J=p.toLowerCase();return te.volume_name.toLowerCase().includes(J)||te.pool_name.toLowerCase().includes(J)||te.status.toLowerCase().includes(J)||te.media_type.toLowerCase().includes(J)}),se=Math.ceil(ae.length/_),fe=(g-1)*_,ye=fe+_,_e=ae.slice(fe,ye),xe=te=>{if(!te)return"-";try{return new Date(te).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch{return te}},D=te=>{y(te?new Set(_e.map(J=>J.media_id)):new Set)},$=(te,J)=>{const O=new Set(x);J?O.add(te):O.delete(te),y(O)},X=U.find(te=>te.media_id===N);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[e.jsxs("button",{onClick:()=>s("list"),className:"bg-primary hover:bg-primary/90 text-white px-5 py-2 rounded shadow-sm flex items-center gap-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",children:[e.jsx("span",{className:"material-symbols-outlined text-lg",children:"format_list_bulleted"}),"List Current Volumes"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>s("add"),className:"bg-[#1c2936] border border-border-dark text-white hover:bg-[#2a3c50] px-4 py-2 rounded flex items-center gap-2 text-sm font-medium transition-colors shadow-sm",children:[e.jsx("span",{className:"material-symbols-outlined text-lg text-green-500",children:"add"}),"Add Volume"]}),e.jsxs("button",{onClick:()=>s("delete"),className:"bg-[#1c2936] border border-border-dark text-white hover:bg-[#2a3c50] px-4 py-2 rounded flex items-center gap-2 text-sm font-medium transition-colors shadow-sm group",children:[e.jsx("span",{className:"material-symbols-outlined text-lg text-red-500 group-hover:text-red-400",children:"delete_outline"}),"Delete Volume"]}),e.jsxs("button",{onClick:()=>s("update"),className:"bg-[#1c2936] border border-border-dark text-white hover:bg-[#2a3c50] px-4 py-2 rounded flex items-center gap-2 text-sm font-medium transition-colors shadow-sm",children:[e.jsx("span",{className:"material-symbols-outlined text-lg text-text-secondary",children:"edit"}),"Update Volume"]})]}),e.jsxs("div",{className:"md:ml-auto relative",children:[e.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3",children:e.jsx("span",{className:"material-symbols-outlined text-text-secondary text-lg",children:"search"})}),e.jsx("input",{type:"text",value:p,onChange:te=>{v(te.target.value),j(1)},className:"w-full md:w-64 bg-[#1c2936] border border-border-dark text-white text-sm rounded pl-10 pr-3 py-2 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary placeholder-text-secondary shadow-sm",placeholder:"Filter volumes..."})]})]}),t==="list"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-border-dark bg-[#1c2936] flex justify-between items-center",children:[e.jsx("h2",{className:"text-sm font-bold uppercase tracking-wider text-text-secondary",children:"Volume Inventory"}),e.jsx("div",{className:"flex gap-2 text-xs",children:e.jsxs("span",{className:"text-text-secondary",children:["Showing ",e.jsx("span",{className:"font-medium",children:fe+1})," to ",e.jsx("span",{className:"font-medium",children:Math.min(ye,ae.length)})," of"," ",e.jsx("span",{className:"font-medium",children:ae.length})," items"]})})]}),K?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading media..."}):ae.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No media found"})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-sm whitespace-nowrap",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border-dark bg-[#1c2936]",children:[e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary w-10",children:e.jsx("input",{type:"checkbox",checked:_e.length>0&&_e.every(te=>x.has(te.media_id)),onChange:te=>D(te.target.checked),className:"rounded border-border-dark text-primary focus:ring-primary bg-[#1c2936]"})}),e.jsxs("th",{className:"px-6 py-3 font-semibold text-text-secondary cursor-pointer hover:text-primary group",children:["Volume Name ",e.jsx("span",{className:"material-symbols-outlined text-xs align-middle opacity-0 group-hover:opacity-100",children:"arrow_downward"})]}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary",children:"Pool"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary",children:"Status"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary",children:"Library"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary text-right",children:"Capacity"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary text-right",children:"Used"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary",children:"Retention"}),e.jsx("th",{className:"px-6 py-3 font-semibold text-text-secondary text-right",children:"Last Written"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:_e.map(te=>{const J=N===te.media_id;return e.jsxs("tr",{onClick:()=>B(J?null:te.media_id),className:`hover:bg-[#2a3c50] transition-colors cursor-pointer border-l-4 ${J?"bg-primary/10 border-l-primary":"border-l-transparent"}`,children:[e.jsx("td",{className:"px-6 py-4",onClick:O=>O.stopPropagation(),children:e.jsx("input",{type:"checkbox",checked:J||x.has(te.media_id),onChange:O=>{$(te.media_id,O.target.checked),O.target.checked&&B(te.media_id)},onClick:O=>O.stopPropagation(),className:"rounded border-border-dark text-primary focus:ring-primary bg-[#1c2936]"})}),e.jsxs("td",{className:"px-6 py-4 font-medium text-white flex items-center gap-2",children:[e.jsx("span",{className:`material-symbols-outlined text-lg ${J?"text-primary":"text-text-secondary"}`,children:"hard_drive"}),te.volume_name]}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:te.pool_name}),e.jsx("td",{className:"px-6 py-4",children:le(te.status)}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:te.media_type&&(te.media_type.toLowerCase().includes("lto")||te.media_type.toLowerCase().includes("tape"))&&te.in_changer&&te.in_changer>0?e.jsxs("span",{children:[te.library_name||"Unknown"," ",te.slot&&te.slot>0?`(Slot ${te.slot})`:""]}):e.jsx("span",{className:"text-text-secondary/50",children:"-"})}),e.jsx("td",{className:"px-6 py-4 text-right text-text-secondary",children:F(te.max_vol_bytes)}),e.jsx("td",{className:"px-6 py-4 text-right text-white font-medium",children:F(te.vol_bytes)}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:te.max_vol_bytes>0&&te.vol_bytes>0?"30 Days":"-"}),e.jsx("td",{className:"px-6 py-4 text-right text-text-secondary text-xs",children:xe(te.last_written)})]},te.media_id)})})]})}),e.jsxs("div",{className:"px-6 py-3 border-t border-border-dark bg-[#1c2936] flex items-center justify-between",children:[e.jsxs("div",{className:"text-xs text-text-secondary",children:["Showing ",e.jsx("span",{className:"font-medium",children:fe+1})," to ",e.jsx("span",{className:"font-medium",children:Math.min(ye,ae.length)})," of"," ",e.jsx("span",{className:"font-medium",children:ae.length})," results"]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>j(te=>Math.max(1,te-1)),disabled:g===1,className:"p-1 rounded hover:bg-[#2a3c50] text-text-secondary disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx("span",{className:"material-symbols-outlined text-lg",children:"chevron_left"})}),e.jsx("button",{onClick:()=>j(te=>Math.min(se,te+1)),disabled:g>=se,className:"p-1 rounded hover:bg-[#2a3c50] text-text-secondary disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx("span",{className:"material-symbols-outlined text-lg",children:"chevron_right"})})]})]})]})]}),X&&e.jsxs("div",{className:"mt-8 bg-[#1c2936] border border-border-dark rounded shadow-sm",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-border-dark flex justify-between items-center",children:[e.jsxs("h3",{className:"text-lg font-bold text-white font-display flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"info"}),"Volume Details: ",X.volume_name]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{className:"text-xs text-primary hover:underline font-medium",children:"View Jobs"}),e.jsx("span",{className:"text-text-secondary",children:"|"}),e.jsx("button",{className:"text-xs text-primary hover:underline font-medium",children:"Prune Volume"})]})]}),e.jsxs("div",{className:"p-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-semibold text-text-secondary uppercase tracking-wider mb-1",children:"Volume ID"}),e.jsx("span",{className:"text-sm text-white",children:X.media_id})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-semibold text-text-secondary uppercase tracking-wider mb-1",children:"Media Type"}),e.jsx("span",{className:"text-sm text-white",children:X.media_type})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-semibold text-text-secondary uppercase tracking-wider mb-1",children:"Label Date"}),e.jsx("span",{className:"text-sm text-white",children:xe(X.last_written)||"-"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-semibold text-text-secondary uppercase tracking-wider mb-1",children:"Storage Device"}),e.jsx("span",{className:"text-sm text-white",children:X.pool_name})]}),e.jsxs("div",{className:"col-span-1 md:col-span-2 lg:col-span-4 border-t border-border-dark pt-4 mt-2",children:[e.jsx("span",{className:"block text-xs font-semibold text-text-secondary uppercase tracking-wider mb-2",children:"Capacity Usage"}),e.jsx("div",{className:"w-full bg-[#2a3c50] rounded-full h-2.5 mb-1",children:e.jsx("div",{className:"bg-primary h-2.5 rounded-full",style:{width:`${X.max_vol_bytes>0?Math.min(100,X.vol_bytes/X.max_vol_bytes*100):0}%`}})}),e.jsxs("div",{className:"flex justify-between text-xs text-text-secondary",children:[e.jsxs("span",{children:[F(X.vol_bytes)," Used"]}),e.jsxs("span",{children:[F(X.max_vol_bytes)," Total"]})]})]})]}),e.jsxs("div",{className:"px-6 py-4 bg-[#1c2936] border-t border-border-dark flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>B(null),className:"px-4 py-2 text-sm font-medium text-text-secondary hover:text-white transition-colors",children:"Close"}),e.jsx("button",{onClick:()=>{m({volume_id:X.media_id}),d(!0)},className:"bg-primary hover:bg-primary/90 text-white px-4 py-2 rounded text-sm font-medium transition-colors shadow-sm",children:"Edit Properties"})]})]})]}),t==="add"&&e.jsxs("div",{className:"rounded-lg border border-border-dark bg-surface-highlight p-6",children:[e.jsx("h3",{className:"text-white text-xl font-bold mb-4",children:"Create New Storage Volume"}),e.jsx("p",{className:"text-text-secondary text-sm mb-6",children:"Volumes are archive units where Bacula stores backed up data. Each volume belongs to a Pool and can be a tape or a disk file."}),e.jsx(WS,{pools:r,onSubmit:te=>{T.mutate(te)},isLoading:T.isPending,onCancel:()=>s("list")})]}),t==="delete"&&e.jsx("div",{className:"rounded-lg border border-border-dark bg-surface-highlight overflow-hidden shadow-sm",children:V?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading volumes..."}):q.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No volumes found"})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-4 border-b border-border-dark",children:e.jsx("p",{className:"text-text-secondary text-sm mb-4",children:"Select a volume to delete. Volumes with data cannot be deleted."})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface-dark border-b border-border-dark text-text-secondary text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Volume Name"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Pool"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Status"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Size"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:q.map(te=>e.jsxs("tr",{className:"hover:bg-surface-dark/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 text-white font-medium",children:te.volume_name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:te.pool_name}),e.jsx("td",{className:"px-6 py-4",children:le(te.vol_status)}),e.jsxs("td",{className:"px-6 py-4 text-text-secondary font-mono text-xs",children:[F(te.vol_bytes)," / ",F(te.max_vol_bytes)]}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("button",{onClick:()=>{u(te),o(!0)},disabled:te.vol_bytes>0,className:`px-4 py-2 rounded-lg text-sm font-bold transition-colors ${te.vol_bytes>0?"bg-gray-500/20 text-gray-500 cursor-not-allowed":"bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20"}`,title:te.vol_bytes>0?"Cannot delete volume with data":"Delete volume",children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-1 align-middle",children:"delete"}),"Delete"]})})]},te.volume_id))})]})})]})}),t==="update"&&e.jsx("div",{className:"rounded-lg border border-border-dark bg-surface-highlight overflow-hidden shadow-sm",children:V?e.jsx("div",{className:"p-8 text-center text-text-secondary",children:"Loading volumes..."}):q.length===0?e.jsx("div",{className:"p-12 text-center",children:e.jsx("p",{className:"text-text-secondary",children:"No volumes found"})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-4 border-b border-border-dark",children:e.jsx("p",{className:"text-text-secondary text-sm mb-4",children:"Select a volume to update its meta-data (Max Volume Bytes, Retention Period)."})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface-dark border-b border-border-dark text-text-secondary text-xs uppercase tracking-wider",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Volume Name"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Pool"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Status"}),e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Max Size"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark text-sm",children:q.map(te=>e.jsxs("tr",{className:"hover:bg-surface-dark/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 text-white font-medium",children:te.volume_name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:te.pool_name}),e.jsx("td",{className:"px-6 py-4",children:le(te.vol_status)}),e.jsx("td",{className:"px-6 py-4 text-text-secondary font-mono text-xs",children:F(te.max_vol_bytes)}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("button",{onClick:()=>{m(te),d(!0)},className:"px-4 py-2 rounded-lg text-sm font-bold transition-colors bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 border border-blue-500/20",children:[e.jsx("span",{className:"material-symbols-outlined text-base mr-1 align-middle",children:"edit"}),"Update"]})})]},te.volume_id))})]})})]})}),n&&c&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-surface-highlight border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsx("h3",{className:"text-white text-xl font-bold mb-2",children:"Delete Storage Volume"}),e.jsxs("p",{className:"text-text-secondary text-sm mb-4",children:["Are you sure you want to delete volume ",e.jsx("span",{className:"text-white font-bold",children:c.volume_name}),"?"]}),c.vol_bytes>0&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-3 mb-4",children:e.jsxs("p",{className:"text-red-400 text-sm",children:["⚠️ This volume contains ",F(c.vol_bytes)," of data. Volumes with data cannot be deleted."]})}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>{o(!1),u(null)},className:"px-4 py-2 rounded-lg bg-surface-dark border border-border-dark text-white text-sm font-bold hover:bg-[#2a3c50] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{c.vol_bytes===0&&Z.mutate(c.volume_id)},disabled:c.vol_bytes>0||Z.isPending,className:"px-4 py-2 rounded-lg bg-red-500 text-white text-sm font-bold hover:bg-red-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:Z.isPending?"Deleting...":"Delete Volume"})]})]})}),l&&h&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-surface-highlight border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsx("h3",{className:"text-white text-xl font-bold mb-2",children:"Update Storage Volume"}),e.jsxs("p",{className:"text-text-secondary text-sm mb-4",children:["Update meta-data for volume ",e.jsx("span",{className:"text-white font-bold",children:h.volume_name})]}),e.jsx(XS,{volume:h,onSubmit:te=>{ne.mutate({volumeId:h.volume_id,data:te})},isLoading:ne.isPending,onCancel:()=>{d(!1),m(null)}})]})})]})}function WS({pools:r,onSubmit:t,isLoading:s,onCancel:n}){const[o,l]=Ce.useState({volume_name:"",pool_name:"",media_type:"File",max_vol_bytes:"",vol_retention:""}),d=c=>{c.preventDefault(),t({volume_name:o.volume_name,pool_name:o.pool_name,media_type:o.media_type,max_vol_bytes:o.max_vol_bytes?parseInt(o.max_vol_bytes)*1024*1024*1024:void 0,vol_retention:o.vol_retention?parseInt(o.vol_retention):void 0})};return e.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:["Volume Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{type:"text",required:!0,value:o.volume_name,onChange:c=>l({...o,volume_name:c.target.value}),placeholder:"e.g., Vol-001, MyBackup-001",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Unique name for the storage volume"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:["Pool ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("select",{required:!0,value:o.pool_name,onChange:c=>l({...o,pool_name:c.target.value}),className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"",children:"Select a pool"}),r.map(c=>e.jsx("option",{value:c.name,children:c.name},c.pool_id))]}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Pool where this volume will be stored"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Media Type"}),e.jsxs("select",{value:o.media_type,onChange:c=>l({...o,media_type:c.target.value}),className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"File",children:"File (Disk)"}),e.jsx("option",{value:"Tape",children:"Tape"})]}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Type of storage media"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Maximum Volume Size (GB)"}),e.jsx("input",{type:"number",value:o.max_vol_bytes,onChange:c=>l({...o,max_vol_bytes:c.target.value}),placeholder:"e.g., 100",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Maximum size in GB (optional, for disk volumes)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Retention Period (Days)"}),e.jsx("input",{type:"number",value:o.vol_retention,onChange:c=>l({...o,vol_retention:c.target.value}),placeholder:"e.g., 30",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Number of days to retain the volume (optional)"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 rounded-lg bg-surface-dark border border-border-dark text-white text-sm font-bold hover:bg-[#2a3c50] transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:s||!o.volume_name||!o.pool_name,className:"px-4 py-2 rounded-lg bg-primary text-white text-sm font-bold hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Creating...":"Create Volume"})]})]})}function XS({volume:r,onSubmit:t,isLoading:s,onCancel:n}){const[o,l]=Ce.useState({max_vol_bytes:r.max_vol_bytes>0?(r.max_vol_bytes/1073741824).toString():"",vol_retention:""}),d=c=>{c.preventDefault(),t({max_vol_bytes:o.max_vol_bytes?parseInt(o.max_vol_bytes)*1024*1024*1024:void 0,vol_retention:o.vol_retention?parseInt(o.vol_retention):void 0})};return e.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Maximum Volume Size (GB)"}),e.jsx("input",{type:"number",value:o.max_vol_bytes,onChange:c=>l({...o,max_vol_bytes:c.target.value}),placeholder:"e.g., 100",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsxs("p",{className:"text-text-secondary text-xs mt-1",children:["Current: ",r.max_vol_bytes>0?`${(r.max_vol_bytes/(1024*1024*1024)).toFixed(2)} GB`:"Not set"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-text-secondary text-sm font-medium mb-2",children:"Retention Period (Days)"}),e.jsx("input",{type:"number",value:o.vol_retention,onChange:c=>l({...o,vol_retention:c.target.value}),placeholder:"e.g., 30",className:"w-full bg-surface-dark border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Number of days to retain the volume"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4 border-t border-border-dark",children:[e.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 rounded-lg bg-surface-dark border border-border-dark text-white text-sm font-bold hover:bg-[#2a3c50] transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:s||!o.max_vol_bytes&&!o.vol_retention,className:"px-4 py-2 rounded-lg bg-primary text-white text-sm font-bold hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Updating...":"Update Volume"})]})]})}const Fv={listClients:async()=>(await ze.get("/bacula/clients")).data,getClient:async r=>(await ze.get(`/bacula/clients/${r}`)).data,registerClient:async r=>(await ze.post("/bacula/clients/register",r)).data,updateCapabilities:async(r,t)=>(await ze.post(`/bacula/clients/${r}/capabilities`,t)).data,getPendingUpdate:async r=>{const t=await ze.get(`/bacula/clients/${r}/pending-update`);return t.status===204?null:t.data},ping:async(r,t)=>{await ze.post(`/bacula/clients/${r}/ping`,{status:t})}},YS=[{label:"Files",value:"files"},{label:"Database",value:"database"},{label:"Application",value:"application"},{label:"Exchange",value:"exchange"},{label:"Mail",value:"mail"}];function Ev(r){return r?new Date(r).toLocaleString():"Never"}function JS(){const r=Nr(),{data:t,isLoading:s,error:n}=dt({queryKey:["bacula-clients"],queryFn:()=>Fv.listClients()}),[o,l]=Ce.useState(null),[d,c]=Ce.useState([]),[u,h]=Ce.useState(""),[m,x]=Ce.useState(""),y=ft({mutationFn:({id:B,backupTypes:g,notes:j})=>Fv.updateCapabilities(B,{backup_types:g,notes:j}),onSuccess:()=>{r.invalidateQueries({queryKey:["bacula-clients"]}),x("Capability update requested. The agent will pull changes shortly.")},onError:()=>{x("Failed to request capability update. Please try again.")}}),p=t?.find(B=>B.id===o)??null;Ce.useEffect(()=>{if(!p){c([]),h("");return}c(p.pending_backup_types?.length?p.pending_backup_types:p.backup_types),h(p.pending_notes??"")},[p]);const v=B=>{c(g=>g.includes(B)?g.filter(j=>j!==B):[...g,B])},N=B=>{B.preventDefault(),p&&y.mutate({id:p.id,backupTypes:d,notes:u})};return s?e.jsx("p",{className:"text-white",children:"Loading Bacula clients..."}):n?e.jsx("p",{className:"text-red-400",children:"Failed to load Bacula clients."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-3xl font-bold text-white",children:"Bacula Client Management"}),e.jsx("p",{className:"text-sm text-text-secondary",children:"Register agents, monitor their capabilities, and push updates."})]}),e.jsxs("section",{className:"bg-card-dark border border-border-dark rounded-xl p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-text-secondary",children:"Edit capabilities"}),e.jsx("p",{className:"text-lg font-bold text-white",children:p?p.hostname:"Select a client from the list"})]}),m&&e.jsx("p",{className:"text-xs text-primary",children:m})]}),e.jsxs("form",{className:"space-y-4",onSubmit:N,children:[e.jsxs("fieldset",{className:"space-y-2",children:[e.jsx("legend",{className:"text-sm font-semibold text-white",children:"Backup types"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:YS.map(B=>e.jsxs("label",{className:"flex items-center gap-2 rounded-lg border border-border-dark px-3 py-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:d.includes(B.value),onChange:()=>v(B.value),className:"h-4 w-4 rounded border-border-dark text-primary focus:ring-primary",disabled:!p}),e.jsx("span",{className:"text-white",children:B.label})]},B.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",htmlFor:"notes",children:"Notes for agent"}),e.jsx("textarea",{id:"notes",rows:3,value:u,onChange:B=>h(B.target.value),className:"w-full rounded-lg border border-border-dark bg-[#111a22] px-3 py-2 text-sm text-white placeholder:text-text-secondary focus:border-primary focus:outline-none",placeholder:"Optional context for the capability update",disabled:!p})]}),e.jsx("button",{type:"submit",className:"inline-flex items-center justify-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-black",disabled:!p||d.length===0||y.isPending,children:y.isPending?"Requesting...":"Push capabilities"})]})]}),e.jsx("section",{className:"space-y-4",children:t?.map(B=>e.jsxs("article",{className:"rounded-xl border border-border-dark bg-card-dark p-5 text-sm text-white",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-semibold text-white",children:B.hostname}),e.jsx("p",{className:"text-xs text-text-secondary",children:B.agent_version||"Unknown version"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs uppercase tracking-wide text-text-secondary",children:"Status"}),e.jsx("span",{className:"text-sm font-semibold text-primary",children:B.status})]}),e.jsx("button",{className:"rounded-lg border border-border-dark px-3 py-1 text-xs font-semibold text-white",onClick:()=>l(B.id),children:"Edit capabilities"})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4 text-xs",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-text-secondary",children:"Backup types"}),e.jsx("p",{className:"text-sm text-white",children:B.backup_types.join(", ")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-text-secondary",children:"Pending push"}),e.jsx("p",{className:"text-sm text-white",children:B.pending_backup_types?.length?B.pending_backup_types.join(", "):"None"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-text-secondary",children:"Last seen"}),e.jsx("p",{className:"text-sm text-white",children:Ev(B.last_seen)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-text-secondary",children:"Registered by"}),e.jsx("p",{className:"text-sm text-white",children:B.registered_by})]})]}),e.jsxs("div",{className:"mt-4 space-y-2 text-xs",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-text-secondary",children:"Capability history"}),e.jsxs("ul",{className:"space-y-1",children:[B.capability_history?.slice(0,3).map(g=>e.jsxs("li",{className:"flex justify-between text-white",children:[e.jsxs("span",{children:[g.source.toUpperCase()," • ",g.backup_types.join(", ")]}),e.jsx("span",{className:"text-text-secondary",children:Ev(g.requested_at)})]},`${B.id}-${g.requested_at}`)),!B.capability_history?.length&&e.jsx("li",{className:"text-text-secondary",children:"No history yet."})]})]})]},B.id))})]})}function ZS(){const[r,t]=Ce.useState([]),[s,n]=Ce.useState(""),[o,l]=Ce.useState(!1),[d,c]=Ce.useState("system"),u=Ce.useRef(null),h=Ce.useRef(null);Ce.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[r]),Ce.useEffect(()=>{h.current&&h.current.focus()},[]);const m=ft({mutationFn:async N=>(await ze.post("/system/execute",{command:N,service:d})).data,onSuccess:(N,B)=>{t(g=>[...g,{command:B,output:N.output||N.error||"Command executed",timestamp:new Date,error:!!N.error,service:d}]),n(""),l(!1),setTimeout(()=>{h.current&&h.current.focus()},100)},onError:N=>{t(B=>[...B,{command:s,output:N?.response?.data?.error||N?.response?.data?.output||N.message||"Error executing command",timestamp:new Date,error:!0,service:d}]),n(""),l(!1),setTimeout(()=>{h.current&&h.current.focus()},100)}}),x=N=>{N.preventDefault();const B=s.trim();!B||o||(l(!0),m.mutate(B))},y=N=>{N.ctrlKey&&N.key==="l"&&(N.preventDefault(),confirm("Clear terminal history?")&&t([])),N.key==="ArrowUp"&&N.preventDefault()},p=()=>{confirm("Clear terminal history?")&&t([])},v=N=>({system:["ls -la","df -h","free -h","systemctl status scst","scstadmin -list_target","scstadmin -list_device","ip addr show","journalctl -u calypso-api -n 50","ps aux | grep calypso","netstat -tulpn | grep 8080"],scst:["scstadmin -list_target","scstadmin -list_device","scstadmin -list_handler","scstadmin -list_driver","scstadmin -list_group","scstadmin -list","cat /etc/scst.conf","systemctl status scst","systemctl status iscsi-scst"],storage:["zfs list","zpool status","zpool list","lsblk","df -h","zfs get all","zpool get all"],backup:['bconsole -c "list jobs"','bconsole -c "list clients"','bconsole -c "list pools"',"systemctl status bacula-director","systemctl status bacula-sd","systemctl status bacula-fd"],tape:["lsscsi -g","mtx -f /dev/sgX status","sg_inq /dev/sgX","systemctl status mhvtl"]})[N]||[];return e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsxs("div",{className:"max-w-[1400px] mx-auto flex flex-col gap-6 h-full",children:[e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("h1",{className:"text-white text-3xl font-extrabold leading-tight tracking-tight flex items-center gap-3",children:[e.jsx(Uh,{className:"text-primary",size:32}),"Terminal Console"]}),e.jsx("p",{className:"text-text-secondary text-base font-normal",children:"Execute shell commands and manage all appliance services"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(ct,{variant:"outline",onClick:p,className:"flex items-center gap-2",children:[e.jsx(es,{size:16}),e.jsx("span",{children:"Clear"})]})})]}),e.jsxs("div",{className:"flex items-center gap-4 p-4 bg-card-dark border border-border-dark rounded-lg",children:[e.jsx("span",{className:"text-text-secondary text-sm font-medium",children:"Service:"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:["system","scst","storage","backup","tape"].map(N=>e.jsx("button",{onClick:()=>c(N),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-colors ${d===N?"bg-primary text-white":"bg-[#0f161d] text-text-secondary hover:text-white hover:bg-white/5"}`,children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),e.jsxs("div",{className:"flex-1 flex flex-col bg-[#0a0f14] border border-border-dark rounded-lg overflow-hidden min-h-[600px]",children:[e.jsxs("div",{ref:u,className:"flex-1 overflow-y-auto p-4 custom-scrollbar",style:{minHeight:"400px"},children:[r.length===0?e.jsxs("div",{className:"text-text-secondary",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[e.jsx(Uh,{className:"text-primary",size:20}),e.jsx("span",{className:"text-white font-semibold",children:"Terminal Console"}),e.jsx("span",{className:"text-xs px-2 py-0.5 bg-primary/20 text-primary rounded",children:d})]}),e.jsx("div",{className:"mb-2",children:"Type commands below to execute shell commands"}),e.jsxs("div",{className:"text-xs opacity-70 mt-4",children:[e.jsxs("div",{className:"font-semibold mb-2",children:["Common commands for ",d,":"]}),e.jsx("div",{className:"ml-4 space-y-1",children:v(d).map((N,B)=>e.jsxs("div",{children:["• ",e.jsx("span",{className:"text-primary font-mono",children:N})]},B))})]})]}):r.map((N,B)=>e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"text-primary mb-2 font-mono text-sm flex items-center gap-2",children:[e.jsx("span",{className:"text-text-secondary",children:"$"}),e.jsx("span",{className:"text-white",children:N.command}),N.service&&e.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-primary/20 text-primary rounded",children:N.service}),e.jsx("span",{className:"text-text-secondary text-xs ml-auto",children:new Date(N.timestamp).toLocaleTimeString()})]}),e.jsx("div",{className:`font-mono text-xs leading-relaxed whitespace-pre overflow-x-auto ${N.error?"text-red-400":"text-green-400"}`,style:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',lineHeight:"1.6",tabSize:2},children:N.output})]},B)),o&&e.jsxs("div",{className:"text-text-secondary flex items-center gap-2",children:[e.jsx(Cn,{size:16,className:"animate-spin"}),e.jsx("span",{children:"Executing command..."})]})]}),e.jsx("div",{className:"flex-none border-t border-border-dark bg-[#161f29]",children:e.jsxs("form",{onSubmit:x,className:"flex items-center",children:[e.jsxs("div",{className:"px-4 flex items-center gap-2",children:[e.jsx("span",{className:"text-primary font-mono text-sm",children:"$"}),e.jsx("span",{className:"text-xs text-text-secondary px-1.5 py-0.5 bg-primary/20 text-primary rounded",children:d})]}),e.jsx("input",{ref:h,type:"text",value:s,onChange:N=>n(N.target.value),onKeyDown:y,disabled:o,placeholder:`Enter ${d} command...`,className:"flex-1 bg-transparent text-white font-mono text-sm py-3 focus:outline-none disabled:opacity-50"}),e.jsx("button",{type:"submit",disabled:!s.trim()||o,className:"px-4 py-3 text-primary hover:text-white disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(C6,{size:16,className:o?"animate-spin":""})})]})})]}),e.jsxs("div",{className:"flex-none px-6 py-3 border-t border-border-dark bg-[#141d26] flex items-center justify-between text-xs text-text-secondary",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{children:"Terminal Console - Command Execution"}),e.jsxs("span",{children:["• ",r.length," commands executed"]})]}),e.jsxs("div",{children:["Press ",e.jsx("kbd",{className:"px-1.5 py-0.5 bg-[#0a0f14] border border-border-dark rounded text-xs",children:"Ctrl+L"})," to clear"]})]})]})})}const rg={listShares:async()=>(await ze.get("/shares")).data.shares||[],getShare:async r=>(await ze.get(`/shares/${r}`)).data,createShare:async r=>(await ze.post("/shares",r)).data,updateShare:async(r,t)=>(await ze.put(`/shares/${r}`,t)).data,deleteShare:async r=>{await ze.delete(`/shares/${r}`)}};function $S(){const r=Nr(),[t,s]=Ce.useState(null),[n,o]=Ce.useState(""),[l,d]=Ce.useState(!1),[c,u]=Ce.useState("configuration"),[h,m]=Ce.useState(!1),[x,y]=Ce.useState({dataset_id:"",nfs_enabled:!1,nfs_options:"rw,sync,no_subtree_check",nfs_clients:[],smb_enabled:!1,smb_share_name:"",smb_comment:"",smb_guest_ok:!1,smb_read_only:!1,smb_browseable:!0}),[p,v]=Ce.useState(""),{data:N=[],isLoading:B}=dt({queryKey:["shares"],queryFn:rg.listShares,refetchInterval:5e3,staleTime:0}),{data:g=[]}=dt({queryKey:["storage","zfs","pools"],queryFn:sn.listPools}),[j,_]=Ce.useState([]);Ce.useEffect(()=>{const U=async()=>{const q=[];for(const F of g)try{const ae=(await sn.listDatasets(F.id)).filter(se=>se.type==="filesystem");q.push(...ae)}catch(le){console.error(`Failed to fetch datasets for pool ${F.id}:`,le)}_(q)};g.length>0&&U()},[g]);const w=ft({mutationFn:rg.createShare,onSuccess:()=>{r.invalidateQueries({queryKey:["shares"]}),d(!1),y({dataset_id:"",nfs_enabled:!1,nfs_options:"rw,sync,no_subtree_check",nfs_clients:[],smb_enabled:!1,smb_share_name:"",smb_comment:"",smb_guest_ok:!1,smb_read_only:!1,smb_browseable:!0}),alert("Share created successfully!")},onError:U=>{const q=U?.response?.data?.error||U?.message||"Failed to create share";alert(`Error: ${q}`),console.error("Failed to create share:",U)}}),L=ft({mutationFn:({id:U,data:q})=>rg.updateShare(U,q),onSuccess:()=>{r.invalidateQueries({queryKey:["shares"]})}}),K=N.filter(U=>U.dataset_name.toLowerCase().includes(n.toLowerCase())||U.mount_point.toLowerCase().includes(n.toLowerCase())),M=U=>{if(U?.preventDefault(),U?.stopPropagation(),console.log("Creating share with data:",x),!x.dataset_id){alert("Please select a dataset");return}if(!x.nfs_enabled&&!x.smb_enabled){alert("At least one protocol (NFS or SMB) must be enabled");return}const q={dataset_id:x.dataset_id,nfs_enabled:x.nfs_enabled,smb_enabled:x.smb_enabled};x.nfs_enabled&&(q.nfs_options=x.nfs_options||"rw,sync,no_subtree_check",q.nfs_clients=x.nfs_clients||[]),x.smb_enabled&&(q.smb_share_name=x.smb_share_name||"",q.smb_comment=x.smb_comment||"",q.smb_guest_ok=x.smb_guest_ok||!1,q.smb_read_only=x.smb_read_only||!1,q.smb_browseable=x.smb_browseable!==void 0?x.smb_browseable:!0),console.log("Submitting share data:",q),w.mutate(q)},V=U=>{L.mutate({id:U.id,data:{nfs_enabled:!U.nfs_enabled}})},T=U=>{L.mutate({id:U.id,data:{smb_enabled:!U.smb_enabled}})},ne=U=>{if(!p.trim())return;const q=[...U.nfs_clients||[],p.trim()];L.mutate({id:U.id,data:{nfs_clients:q}}),v("")},Z=(U,q)=>{const F=(U.nfs_clients||[]).filter(le=>le!==q);L.mutate({id:U.id,data:{nfs_clients:F}})};return e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col bg-background-dark",children:[e.jsx("div",{className:"flex-shrink-0 border-b border-border-dark bg-background-dark/95 backdrop-blur z-10",children:e.jsxs("div",{className:"flex flex-col gap-4 p-6 pb-4",children:[e.jsxs("div",{className:"flex flex-wrap justify-between gap-3 items-center",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h2",{className:"text-white text-3xl font-black leading-tight tracking-[-0.033em]",children:"Shares Management"}),e.jsxs("div",{className:"flex items-center gap-2 text-text-secondary text-sm",children:[e.jsx("span",{children:"Storage"}),e.jsx(Ka,{size:14}),e.jsx("span",{children:"Shares"}),e.jsx(Ka,{size:14}),e.jsx("span",{className:"text-white",children:"Overview"})]})]}),e.jsxs(ct,{onClick:()=>d(!0),className:"flex items-center gap-2 px-4 h-10 rounded-lg bg-primary hover:bg-blue-600 text-white text-sm font-bold",children:[e.jsx(Ks,{size:20}),e.jsx("span",{children:"Create New Share"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-lg p-4 border border-border-dark bg-surface-dark/50",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-xs font-bold uppercase tracking-wider",children:"SMB Service"}),e.jsx("div",{className:"size-2 rounded-full bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.5)]"})]}),e.jsx("p",{className:"text-white text-xl font-bold leading-tight",children:"Running"}),e.jsx("p",{className:"text-emerald-500 text-xs mt-1",children:"Port 445 Active"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-lg p-4 border border-border-dark bg-surface-dark/50",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-xs font-bold uppercase tracking-wider",children:"NFS Service"}),e.jsx("div",{className:"size-2 rounded-full bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.5)]"})]}),e.jsx("p",{className:"text-white text-xl font-bold leading-tight",children:"Running"}),e.jsx("p",{className:"text-emerald-500 text-xs mt-1",children:"Port 2049 Active"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-lg p-4 border border-border-dark bg-surface-dark/50",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-xs font-bold uppercase tracking-wider",children:"Throughput"}),e.jsx(S6,{className:"text-text-secondary",size:20})]}),e.jsx("p",{className:"text-white text-xl font-bold leading-tight",children:"565 MB/s"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"14 Clients Connected"})]})]})]})}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsxs("div",{className:"w-full lg:w-[400px] flex flex-col border-r border-border-dark bg-background-dark flex-shrink-0",children:[e.jsx("div",{className:"p-4 border-b border-border-dark bg-background-dark sticky top-0 z-10",children:e.jsxs("div",{className:"relative",children:[e.jsx(io,{className:"absolute left-3 top-2.5 text-text-secondary",size:18}),e.jsx("input",{className:"w-full bg-surface-dark border border-border-dark rounded-lg pl-10 pr-4 py-2.5 text-sm text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary placeholder-text-secondary",placeholder:"Filter shares...",value:n,onChange:U=>o(U.target.value)})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:B?e.jsx("div",{className:"p-4 text-center text-text-secondary text-sm",children:"Loading shares..."}):K.length===0?e.jsx("div",{className:"p-4 text-center text-text-secondary text-sm",children:"No shares found"}):K.map(U=>e.jsx("div",{onClick:()=>s(U),className:`group flex flex-col border-b border-border-dark/50 cursor-pointer transition-colors ${t?.id===U.id?"bg-primary/10 border-l-4 border-l-primary":"hover:bg-surface-dark"}`,children:e.jsxs("div",{className:`px-4 py-3 flex items-start gap-3 ${t?.id===U.id?"pl-3":""}`,children:[t?.id===U.id?e.jsx(Tb,{className:"text-primary mt-1",size:20}):e.jsx(au,{className:"text-text-secondary mt-1",size:20}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex justify-between items-center mb-1",children:e.jsx("h3",{className:`text-sm truncate ${t?.id===U.id?"font-bold text-white":"font-medium text-white"}`,children:U.dataset_name})}),e.jsx("p",{className:`text-xs truncate mb-2 ${t?.id===U.id?"text-primary/80":"text-text-secondary"}`,children:U.mount_point||"No mount point"}),e.jsxs("div",{className:"flex gap-2",children:[U.smb_enabled?e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold border ${t?.id===U.id?"bg-surface-dark text-text-secondary border-border-dark":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:"SMB"}):null,U.nfs_enabled&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-bold bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:"NFS"})]})]}),t?.id!==U.id&&e.jsx(Ka,{className:"text-text-secondary text-[18px]",size:18})]})},U.id))}),e.jsx("div",{className:"p-4 border-t border-border-dark bg-background-dark text-center",children:e.jsxs("p",{className:"text-xs text-text-secondary",children:["Showing ",K.length," of ",N.length," shares"]})})]}),e.jsx("div",{className:"flex-1 flex flex-col overflow-hidden bg-background-light dark:bg-[#0d141c]",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-6 pb-0 flex flex-col gap-6",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"bg-primary p-2 rounded-lg text-white",children:e.jsx(Tb,{size:20})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:t.dataset_name.split("/").pop()||t.dataset_name}),e.jsx("p",{className:"text-text-secondary text-sm font-mono",children:t.dataset_name})]})]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(ct,{variant:"outline",className:"flex items-center justify-center rounded-lg h-9 px-4 border border-border-dark text-white text-sm font-medium hover:bg-surface-dark transition-colors",children:[e.jsx(hp,{size:18,className:"mr-2"}),"Revert"]}),e.jsxs(ct,{className:"flex items-center justify-center rounded-lg h-9 px-4 bg-primary text-white text-sm font-bold shadow-lg shadow-primary/20 hover:bg-blue-600 transition-colors",children:[e.jsx(up,{size:18,className:"mr-2"}),"Save Changes"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:`flex items-center justify-between p-4 rounded-xl border ${t.smb_enabled?"border-primary/50 bg-primary/5":"border-border-dark bg-surface-dark/40"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg ${t.smb_enabled?"bg-primary/20 text-primary":"bg-surface-dark text-text-secondary"}`,children:e.jsx(Ib,{size:20})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:"SMB Protocol"}),e.jsx("span",{className:"text-xs text-text-secondary",children:"Windows File Sharing"})]})]}),e.jsxs("button",{onClick:()=>T(t),className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background-dark ${t.smb_enabled?"bg-primary":"bg-slate-700"}`,children:[e.jsx("span",{className:"sr-only",children:"Use setting"}),e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${t.smb_enabled?"translate-x-5":"translate-x-0"}`})]})]}),e.jsxs("div",{className:`flex items-center justify-between p-4 rounded-xl border ${t.nfs_enabled?"border-primary/50 bg-primary/5":"border-border-dark bg-surface-dark/40"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg ${t.nfs_enabled?"bg-primary/20 text-primary":"bg-surface-dark text-text-secondary"}`,children:e.jsx(_6,{size:20})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:"NFS Protocol"}),e.jsx("span",{className:"text-xs text-text-secondary",children:"Unix/Linux File Sharing"})]})]}),e.jsxs("button",{onClick:()=>V(t),className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background-dark ${t.nfs_enabled?"bg-primary":"bg-slate-700"}`,children:[e.jsx("span",{className:"sr-only",children:"Use setting"}),e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${t.nfs_enabled?"translate-x-5":"translate-x-0"}`})]})]})]}),e.jsx("div",{className:"border-b border-border-dark mt-2",children:e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("button",{onClick:()=>u("configuration"),className:`pb-3 border-b-2 text-sm flex items-center gap-2 transition-colors ${c==="configuration"?"border-primary text-primary font-bold":"border-transparent text-text-secondary hover:text-white font-medium"}`,children:[e.jsx(vc,{size:18}),"Configuration"]}),e.jsxs("button",{onClick:()=>u("permissions"),className:`pb-3 border-b-2 text-sm flex items-center gap-2 transition-colors ${c==="permissions"?"border-primary text-primary font-bold":"border-transparent text-text-secondary hover:text-white font-medium"}`,children:[e.jsx(Xm,{size:18}),"Permissions (ACL)"]}),e.jsxs("button",{onClick:()=>u("clients"),className:`pb-3 border-b-2 text-sm flex items-center gap-2 transition-colors ${c==="clients"?"border-primary text-primary font-bold":"border-transparent text-text-secondary hover:text-white font-medium"}`,children:[e.jsx(ya,{size:18}),"Connected Clients",e.jsx("span",{className:"bg-surface-dark text-white text-[10px] px-1.5 py-0.5 rounded-full ml-1",children:"8"})]})]})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:e.jsxs("div",{className:"max-w-4xl flex flex-col gap-6",children:[c==="configuration"&&e.jsxs(e.Fragment,{children:[t.nfs_enabled&&e.jsxs("div",{className:"rounded-xl border border-border-dark bg-surface-dark overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-border-dark flex justify-between items-center bg-[#1c2a39]",children:[e.jsxs("h3",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(ya,{className:"text-primary",size:20}),"NFS Configuration"]}),e.jsx("span",{className:"text-xs text-emerald-500 font-medium px-2 py-1 bg-emerald-500/10 rounded border border-emerald-500/20",children:"Active"})]}),e.jsxs("div",{className:"p-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Allowed Subnets / IPs"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{className:"flex-1 bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary font-mono",type:"text",placeholder:"192.168.10.0/24",value:p,onChange:U=>v(U.target.value),onKeyPress:U=>{U.key==="Enter"&&ne(t)}}),e.jsx("button",{onClick:()=>ne(t),className:"p-2 bg-surface-dark hover:bg-border-dark border border-border-dark rounded-lg text-white",children:e.jsx(Ks,{size:18})})]}),e.jsx("p",{className:"text-xs text-text-secondary",children:"CIDR notation supported. Use comma for multiple entries."}),t.nfs_clients&&t.nfs_clients.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.nfs_clients.map(U=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-primary/20 text-primary text-xs rounded border border-primary/30",children:[U,e.jsx("button",{onClick:()=>Z(t,U),className:"hover:text-red-400",children:e.jsx(Zs,{size:14})})]},U))})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Map Root User"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary appearance-none",children:[e.jsx("option",{children:"root (User ID 0)"}),e.jsx("option",{children:"admin"}),e.jsx("option",{children:"nobody"})]}),e.jsx(wh,{className:"absolute right-3 top-2.5 text-text-secondary pointer-events-none",size:18})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Security Profile"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("label",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border-dark bg-background-dark cursor-pointer flex-1",children:[e.jsx("input",{checked:!0,className:"text-primary focus:ring-primary bg-surface-dark border-border-dark",name:"sec",type:"radio"}),e.jsx("span",{className:"text-sm text-white",children:"sys (Default)"})]}),e.jsxs("label",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border-dark bg-background-dark cursor-pointer flex-1",children:[e.jsx("input",{className:"text-primary focus:ring-primary bg-surface-dark border-border-dark",name:"sec",type:"radio"}),e.jsx("span",{className:"text-sm text-white",children:"krb5"})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Sync Mode"}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary appearance-none",children:[e.jsx("option",{children:"Standard"}),e.jsx("option",{children:"Always Sync"}),e.jsx("option",{children:"Disabled (Async)"})]}),e.jsx(wh,{className:"absolute right-3 top-2.5 text-text-secondary pointer-events-none",size:18})]})]})]})]})]}),t.smb_enabled&&e.jsxs("div",{className:"rounded-xl border border-border-dark bg-surface-dark overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-border-dark flex justify-between items-center bg-[#1c2a39]",children:[e.jsxs("h3",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(Ib,{className:"text-primary",size:20}),"SMB Configuration"]}),e.jsx("span",{className:"text-xs text-emerald-500 font-medium px-2 py-1 bg-emerald-500/10 rounded border border-emerald-500/20",children:"Active"})]}),e.jsxs("div",{className:"p-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Share Name"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary",type:"text",value:t.smb_share_name||"",onChange:U=>{L.mutate({id:t.id,data:{smb_share_name:U.target.value}})}})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Path"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary font-mono",type:"text",value:t.smb_path||t.mount_point||"",readOnly:!0})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-xs font-semibold text-text-secondary uppercase",children:"Comment"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary",type:"text",value:t.smb_comment||"",onChange:U=>{L.mutate({id:t.id,data:{smb_comment:U.target.value}})}})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.smb_guest_ok,onChange:U=>{L.mutate({id:t.id,data:{smb_guest_ok:U.target.checked}})},className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Allow Guest Access"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.smb_read_only,onChange:U=>{L.mutate({id:t.id,data:{smb_read_only:U.target.checked}})},className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Read Only"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.smb_browseable,onChange:U=>{L.mutate({id:t.id,data:{smb_browseable:U.target.checked}})},className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Browseable"})]})]})]})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-surface-dark overflow-hidden",children:[e.jsxs("button",{onClick:()=>m(!h),className:"w-full px-5 py-4 flex justify-between items-center hover:bg-[#1c2a39] transition-colors text-left",children:[e.jsxs("h3",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(vc,{className:"text-text-secondary",size:20}),"Advanced Attributes"]}),e.jsx(wh,{className:`text-text-secondary transition-transform ${h?"rotate-180":""}`,size:20})]}),h&&e.jsxs("div",{className:"p-5 border-t border-border-dark flex flex-wrap gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Read Only"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{checked:!0,type:"checkbox",className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Enable Compression (LZ4)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"rounded border-border-dark bg-background-dark text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Enable Deduplication"})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsx("h3",{className:"text-base font-bold text-white",children:"Top Active Clients"}),e.jsx("a",{className:"text-sm text-primary hover:text-blue-400 font-medium cursor-pointer",href:"#",children:"View all clients"})]}),e.jsx("div",{className:"rounded-lg border border-border-dark overflow-hidden bg-surface-dark",children:e.jsxs("table",{className:"w-full text-sm text-left",children:[e.jsx("thead",{className:"bg-background-dark text-text-secondary font-medium border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3",children:"IP Address"}),e.jsx("th",{className:"px-4 py-3",children:"User"}),e.jsx("th",{className:"px-4 py-3",children:"Protocol"}),e.jsx("th",{className:"px-4 py-3 text-right",children:"Throughput"}),e.jsx("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),e.jsxs("tbody",{className:"text-white divide-y divide-border-dark",children:[e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 font-mono",children:"192.168.10.105"}),e.jsx("td",{className:"px-4 py-3",children:"esxi-host-01"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs font-bold",children:"NFS"})}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-text-secondary",children:"420 MB/s"}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{className:"text-text-secondary hover:text-red-400",title:"Disconnect",children:e.jsx(zf,{size:18})})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 font-mono",children:"192.168.10.106"}),e.jsx("td",{className:"px-4 py-3",children:"esxi-host-02"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs font-bold",children:"NFS"})}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-text-secondary",children:"105 MB/s"}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{className:"text-text-secondary hover:text-red-400",title:"Disconnect",children:e.jsx(zf,{size:18})})})]})]})]})})]})]}),c==="permissions"&&e.jsxs("div",{className:"rounded-xl border border-border-dark bg-surface-dark p-8 text-center",children:[e.jsx(Xm,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Permissions (ACL) configuration coming soon"})]}),c==="clients"&&e.jsxs("div",{className:"rounded-xl border border-border-dark bg-surface-dark overflow-hidden",children:[e.jsx("div",{className:"px-5 py-4 border-b border-border-dark flex justify-between items-center bg-[#1c2a39]",children:e.jsxs("h3",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(ya,{className:"text-primary",size:20}),"Connected Clients"]})}),e.jsx("div",{className:"p-5",children:e.jsx("div",{className:"rounded-lg border border-border-dark overflow-hidden bg-surface-dark",children:e.jsxs("table",{className:"w-full text-sm text-left",children:[e.jsx("thead",{className:"bg-background-dark text-text-secondary font-medium border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3",children:"IP Address"}),e.jsx("th",{className:"px-4 py-3",children:"User"}),e.jsx("th",{className:"px-4 py-3",children:"Protocol"}),e.jsx("th",{className:"px-4 py-3 text-right",children:"Throughput"}),e.jsx("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),e.jsxs("tbody",{className:"text-white divide-y divide-border-dark",children:[e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 font-mono",children:"192.168.10.105"}),e.jsx("td",{className:"px-4 py-3",children:"esxi-host-01"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs font-bold",children:"NFS"})}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-text-secondary",children:"420 MB/s"}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{className:"text-text-secondary hover:text-red-400",title:"Disconnect",children:e.jsx(zf,{size:18})})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 font-mono",children:"192.168.10.106"}),e.jsx("td",{className:"px-4 py-3",children:"esxi-host-02"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs font-bold",children:"NFS"})}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-text-secondary",children:"105 MB/s"}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{className:"text-text-secondary hover:text-red-400",title:"Disconnect",children:e.jsx(zf,{size:18})})})]})]})]})})})]})]})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-text-secondary",children:e.jsxs("div",{className:"text-center",children:[e.jsx(au,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-sm",children:"Select a share to view details"})]})})})]}),l&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>d(!1),children:e.jsxs("div",{className:"bg-surface-dark rounded-xl border border-border-dark max-w-2xl w-full max-h-[90vh] overflow-y-auto",onClick:U=>U.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-border-dark flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:"Create New Share"}),e.jsx("button",{onClick:()=>d(!1),className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Dataset"}),e.jsxs("select",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary",value:x.dataset_id,onChange:U=>y({...x,dataset_id:U.target.value}),children:[e.jsx("option",{value:"",children:"Select a dataset"}),j.map(U=>e.jsxs("option",{value:U.id,children:[U.name," ",U.mount_point&&U.mount_point!=="none"?`(${U.mount_point})`:""]},U.id))]})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl border border-border-dark bg-surface-dark/40",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ya,{className:"text-text-secondary",size:20}),e.jsx("div",{className:"flex flex-col",children:e.jsx("span",{className:"text-sm font-bold text-white",children:"Enable NFS"})})]}),e.jsx("input",{type:"checkbox",checked:x.nfs_enabled,onChange:U=>y({...x,nfs_enabled:U.target.checked}),className:"h-4 w-4 rounded border-border-dark bg-background-dark text-primary focus:ring-primary"})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl border border-border-dark bg-surface-dark/40",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(k6,{className:"text-text-secondary",size:20}),e.jsx("div",{className:"flex flex-col",children:e.jsx("span",{className:"text-sm font-bold text-white",children:"Enable SMB"})})]}),e.jsx("input",{type:"checkbox",checked:x.smb_enabled,onChange:U=>y({...x,smb_enabled:U.target.checked}),className:"h-4 w-4 rounded border-border-dark bg-background-dark text-primary focus:ring-primary"})]})]}),x.nfs_enabled&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"NFS Options"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary font-mono",type:"text",value:x.nfs_options,onChange:U=>y({...x,nfs_options:U.target.value})})]}),x.smb_enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"SMB Share Name"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary",type:"text",value:x.smb_share_name,onChange:U=>y({...x,smb_share_name:U.target.value})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Comment"}),e.jsx("input",{className:"w-full bg-background-dark border border-border-dark rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary",type:"text",value:x.smb_comment,onChange:U=>y({...x,smb_comment:U.target.value})})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(ct,{onClick:()=>d(!1),variant:"outline",className:"px-4 h-10",children:"Cancel"}),e.jsx(ct,{type:"button",onClick:M,disabled:w.isPending,className:"px-4 h-10 bg-primary hover:bg-blue-600",children:w.isPending?"Creating...":"Create Share"})]})]})]})})]})}const Zr={listUsers:async()=>(await ze.get("/iam/users")).data.users||[],getUser:async r=>(await ze.get(`/iam/users/${r}`)).data,createUser:async r=>(await ze.post("/iam/users",r)).data,updateUser:async(r,t)=>{await ze.put(`/iam/users/${r}`,t)},deleteUser:async r=>{await ze.delete(`/iam/users/${r}`)},listGroups:async()=>(await ze.get("/iam/groups")).data.groups||[],getGroup:async r=>(await ze.get(`/iam/groups/${r}`)).data,createGroup:async r=>(await ze.post("/iam/groups",r)).data,updateGroup:async(r,t)=>{await ze.put(`/iam/groups/${r}`,t)},deleteGroup:async r=>{await ze.delete(`/iam/groups/${r}`)},addUserToGroup:async(r,t)=>{await ze.post(`/iam/groups/${r}/users`,{user_id:t})},removeUserFromGroup:async(r,t)=>{await ze.delete(`/iam/groups/${r}/users/${t}`)},assignRoleToUser:async(r,t)=>{await ze.post(`/iam/users/${r}/roles`,{role_name:t})},removeRoleFromUser:async(r,t)=>{await ze.delete(`/iam/users/${r}/roles?role_name=${encodeURIComponent(t)}`)},assignGroupToUser:async(r,t)=>{await ze.post(`/iam/users/${r}/groups`,{group_name:t})},removeGroupFromUser:async(r,t)=>{await ze.delete(`/iam/users/${r}/groups?group_name=${encodeURIComponent(t)}`)},listRoles:async()=>(await ze.get("/iam/roles")).data.roles,getRole:async r=>(await ze.get(`/iam/roles/${r}`)).data,createRole:async r=>(await ze.post("/iam/roles",r)).data,updateRole:async(r,t)=>{await ze.put(`/iam/roles/${r}`,t)},deleteRole:async r=>{await ze.delete(`/iam/roles/${r}`)},getRolePermissions:async r=>(await ze.get(`/iam/roles/${r}/permissions`)).data.permissions,assignPermissionToRole:async(r,t)=>{await ze.post(`/iam/roles/${r}/permissions`,{permission_name:t})},removePermissionFromRole:async(r,t)=>{await ze.delete(`/iam/roles/${r}/permissions?permission_name=${encodeURIComponent(t)}`)},listPermissions:async()=>(await ze.get("/iam/permissions")).data.permissions};function e_(){const[r,t]=Ce.useState("users"),[s,n]=Ce.useState(""),[o,l]=Ce.useState(!1),[d,c]=Ce.useState(!1),[u,h]=Ce.useState(null),[m,x]=Ce.useState(null),y=Nr(),{data:p,isLoading:v,error:N}=dt({queryKey:["iam-users"],queryFn:Zr.listUsers,refetchOnWindowFocus:!0});N&&console.error("Failed to load users:",N);const B=(p||[]).filter(K=>K.username.toLowerCase().includes(s.toLowerCase())||K.full_name&&K.full_name.toLowerCase().includes(s.toLowerCase())||K.email&&K.email.toLowerCase().includes(s.toLowerCase())||K.roles&&K.roles.some(M=>M.toLowerCase().includes(s.toLowerCase()))||K.groups&&K.groups.some(M=>M.toLowerCase().includes(s.toLowerCase()))),g=K=>{if(!K||K.length===0)return{bg:"bg-slate-700",text:"text-slate-300",border:"border-slate-600",icon:Bn,Icon:Bn,label:"No Role"};const M=K[0],T={admin:{bg:"bg-purple-500/10",text:"text-purple-400",border:"border-purple-500/20",icon:E6,label:"Admin"},operator:{bg:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/20",icon:F6,label:"Operator"},auditor:{bg:"bg-yellow-500/10",text:"text-yellow-500",border:"border-yellow-500/20",icon:Db,label:"Auditor"},storage_admin:{bg:"bg-teal-500/10",text:"text-teal-500",border:"border-teal-500/20",icon:Ul,label:"Storage Admin"},service:{bg:"bg-slate-700",text:"text-slate-300",border:"border-slate-600",icon:Bn,label:"Service"}}[M.toLowerCase()]||{bg:"bg-slate-700",text:"text-slate-300",border:"border-slate-600",icon:Bn,label:M},ne=T.icon;return{...T,Icon:ne}},j=K=>K.toLowerCase()==="admin"?"bg-gradient-to-br from-blue-500 to-indigo-600":"bg-slate-700",_=ft({mutationFn:Zr.deleteUser,onSuccess:()=>{y.invalidateQueries({queryKey:["iam-users"]}),y.refetchQueries({queryKey:["iam-users"]})},onError:K=>{console.error("Failed to delete user:",K);const M=K.response?.data?.error||K.message||"Failed to delete user";alert(M)}}),w=K=>{_.mutate(K)},L=K=>{if(!K)return"Never";const M=new Date(K),T=new Date().getTime()-M.getTime(),ne=Math.floor(T/6e4),Z=Math.floor(T/36e5),U=Math.floor(T/864e5);return ne<1?"Just now":ne<60?`${ne} minute${ne>1?"s":""} ago`:Z<24?`${Z} hour${Z>1?"s":""} ago`:U<7?`${U} day${U>1?"s":""} ago`:M.toLocaleDateString()};return e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar h-full",children:e.jsxs("div",{className:"max-w-[1200px] mx-auto w-full p-8 flex flex-col gap-6",children:[e.jsxs("header",{className:"flex flex-wrap justify-between items-end gap-4 border-b border-border-dark pb-6",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("nav",{className:"flex items-center gap-2 text-sm text-text-secondary mb-1",children:[e.jsx("span",{children:"System"}),e.jsx(Ka,{size:16}),e.jsx("span",{className:"text-white",children:"Access Control"})]}),e.jsx("h1",{className:"text-3xl font-black text-white leading-tight",children:"User & Access Management"}),e.jsx("p",{className:"text-text-secondary text-base max-w-2xl",children:"Manage local accounts, define RBAC roles, and configure directory services (LDAP/AD) integration."})]}),e.jsx("div",{className:"flex gap-3",children:e.jsxs(ct,{variant:"outline",className:"flex items-center justify-center gap-2 px-4 py-2 bg-card-dark border border-border-dark rounded-lg text-white hover:bg-border-dark transition-colors font-semibold",children:[e.jsx(hp,{size:20}),e.jsx("span",{children:"Audit Log"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex border-b border-border-dark gap-8",children:[e.jsxs("button",{onClick:()=>t("users"),className:`flex items-center gap-2 pb-3 border-b-[3px] transition-colors ${r==="users"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white hover:border-slate-600"}`,children:[e.jsx(Bn,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Local Users"})]}),e.jsxs("button",{onClick:()=>t("groups"),className:`flex items-center gap-2 pb-3 border-b-[3px] transition-colors ${r==="groups"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white hover:border-slate-600"}`,children:[e.jsx(ya,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Groups"})]}),e.jsxs("button",{onClick:()=>t("roles"),className:`flex items-center gap-2 pb-3 border-b-[3px] transition-colors ${r==="roles"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white hover:border-slate-600"}`,children:[e.jsx(Bn,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Roles"})]}),e.jsxs("button",{onClick:()=>t("directory"),className:`flex items-center gap-2 pb-3 border-b-[3px] transition-colors ${r==="directory"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white hover:border-slate-600"}`,children:[e.jsx(ya,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Directory Services"})]}),e.jsxs("button",{onClick:()=>t("auth"),className:`flex items-center gap-2 pb-3 border-b-[3px] transition-colors ${r==="auth"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white hover:border-slate-600"}`,children:[e.jsx(Xm,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Authentication & SSO"})]})]}),r==="users"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-4 items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 max-w-xl gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search users by name, role, or group...",value:s,onChange:K=>n(K.target.value),className:"w-full bg-card-dark border border-border-dark rounded-lg pl-10 pr-4 py-2.5 text-white placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm"})]}),e.jsxs(ct,{variant:"outline",className:"flex items-center gap-2 px-4 py-2.5 bg-card-dark border border-border-dark rounded-lg text-text-secondary hover:text-white hover:border-slate-500 transition-colors",children:[e.jsx(fp,{size:20}),e.jsx("span",{className:"text-sm font-medium",children:"Filter"})]})]}),e.jsxs(ct,{onClick:()=>l(!0),className:"flex items-center gap-2 bg-primary hover:bg-blue-600 text-white px-5 py-2.5 rounded-lg font-bold shadow-lg shadow-blue-500/20 transition-all",children:[e.jsx(mp,{size:20}),e.jsx("span",{children:"Create User"})]})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-[#111a22] overflow-hidden shadow-sm",children:[e.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-card-dark border-b border-border-dark text-left",children:[e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider w-24",children:"Status"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Username"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Full Name"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Role"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Groups"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Last Login"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:v?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-6 py-8 text-center text-text-secondary",children:"Loading users..."})}):N?e.jsx("tr",{children:e.jsxs("td",{colSpan:7,className:"px-6 py-8 text-center text-red-400",children:["Error loading users: ",N instanceof Error?N.message:"Unknown error"]})}):B.length>0?B.map(K=>{const M=g(K.roles),V=M.Icon,T=K.full_name?K.full_name.split(" ").map(ne=>ne[0]).join("").substring(0,2).toUpperCase():K.username.substring(0,2).toUpperCase();return e.jsxs("tr",{className:"group hover:bg-card-dark transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:K.is_active?e.jsxs("div",{className:"inline-flex items-center gap-2 px-2.5 py-1 rounded-full bg-green-500/10 text-green-500 text-xs font-bold border border-green-500/20",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"Active"]}):e.jsxs("div",{className:"inline-flex items-center gap-2 px-2.5 py-1 rounded-full bg-red-500/10 text-red-500 text-xs font-bold border border-red-500/20",children:[e.jsx(Xm,{size:14}),"Locked"]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-8 h-8 rounded-full ${j(K.username)} flex items-center justify-center text-white text-xs font-bold`,children:T}),e.jsx("span",{className:"text-white font-medium",children:K.username})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:K.full_name||"-"}),e.jsx("td",{className:"px-6 py-4",children:K.roles&&K.roles.length>0?e.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1 rounded-md ${M.bg} ${M.text} border ${M.border}`,children:[e.jsx(V,{size:14}),M.label]}):e.jsx("span",{className:"text-text-secondary text-xs",children:"No role"})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:K.groups&&K.groups.length>0?K.groups.join(", "):"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:L(K.last_login_at)}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:ne=>{ne.stopPropagation(),x(m===K.id?null:K.id)},className:"p-2 text-text-secondary hover:text-white hover:bg-border-dark rounded-lg transition-colors",children:e.jsx(pp,{size:20})}),m===K.id&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>x(null)}),e.jsx("div",{className:"absolute right-0 mt-1 w-48 bg-card-dark border border-border-dark rounded-lg shadow-xl z-20",children:e.jsxs("div",{className:"py-1",children:[e.jsxs("button",{onClick:ne=>{ne.stopPropagation(),h(K),c(!0),x(null)},className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-[#233648] flex items-center gap-2 transition-colors",children:[e.jsx(Wd,{size:16}),"Edit User"]}),e.jsxs("button",{onClick:ne=>{ne.stopPropagation(),window.location.href=`/profile/${K.id}`},className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-[#233648] flex items-center gap-2 transition-colors",children:[e.jsx(o4,{size:16}),"View Profile"]}),!K.is_system&&e.jsxs("button",{onClick:ne=>{ne.stopPropagation(),confirm(`Are you sure you want to delete user "${K.username}"? This action cannot be undone.`)&&w(K.id),x(null)},className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-red-500/10 flex items-center gap-2 transition-colors",children:[e.jsx(es,{size:16}),"Delete User"]})]})})]})]})})]},K.id)}):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-6 py-8 text-center text-text-secondary",children:"No users found"})})})]})}),e.jsxs("div",{className:"px-6 py-4 border-t border-border-dark flex items-center justify-between bg-card-dark",children:[e.jsxs("span",{className:"text-sm text-text-secondary",children:["Showing ",e.jsxs("span",{className:"font-bold text-white",children:["1-",B.length]})," of"," ",e.jsx("span",{className:"font-bold text-white",children:B.length})," users"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{className:"p-2 rounded-lg text-text-secondary hover:bg-border-dark hover:text-white disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(Sy,{size:20})}),e.jsx("button",{className:"p-2 rounded-lg text-text-secondary hover:bg-border-dark hover:text-white",children:e.jsx(Ka,{size:20})})]})]})]})]}),o&&e.jsx(t_,{onClose:()=>l(!1),onSuccess:async()=>{l(!1),y.invalidateQueries({queryKey:["iam-users"]}),await y.refetchQueries({queryKey:["iam-users"]})}}),d&&u&&e.jsx(r_,{user:u,onClose:()=>{c(!1),h(null)},onSuccess:async()=>{c(!1),h(null),y.invalidateQueries({queryKey:["iam-users"]}),await y.refetchQueries({queryKey:["iam-users"]})}}),r==="groups"&&e.jsx(s_,{}),r==="roles"&&e.jsx(n_,{}),r!=="users"&&r!=="groups"&&e.jsxs("div",{className:"p-8 text-center text-text-secondary",children:[r==="directory"&&"Directory Services tab coming soon",r==="auth"&&"Authentication & SSO tab coming soon"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-2",children:[e.jsxs("div",{className:"bg-[#111a22] p-5 rounded-xl border border-border-dark flex flex-col gap-4",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-slate-800 rounded-lg text-text-secondary",children:e.jsx(ya,{size:20})}),e.jsx("h3",{className:"text-white font-bold",children:"Directory Service"})]}),e.jsx("span",{className:"px-2 py-1 rounded text-xs font-bold bg-slate-800 text-text-secondary border border-slate-700",children:"Inactive"})]}),e.jsx("p",{className:"text-sm text-text-secondary",children:"No LDAP or Active Directory server is currently connected. Local authentication is being used."}),e.jsx("div",{className:"mt-auto pt-2",children:e.jsxs("button",{className:"text-primary text-sm font-bold hover:underline flex items-center gap-1",children:["Configure Directory",e.jsx(xv,{size:16})]})})]}),e.jsxs("div",{className:"bg-[#111a22] p-5 rounded-xl border border-border-dark flex flex-col gap-4",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-orange-500/10 rounded-lg text-orange-500",children:e.jsx(Bn,{size:20})}),e.jsx("h3",{className:"text-white font-bold",children:"Security Policy"})]}),e.jsx("span",{className:"px-2 py-1 rounded text-xs font-bold bg-green-500/10 text-green-500 border border-green-500/20",children:"Good"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex justify-between items-center text-sm",children:[e.jsx("span",{className:"text-text-secondary",children:"Multi-Factor Auth"}),e.jsx("span",{className:"text-green-500 font-medium",children:"Enforced"})]}),e.jsxs("div",{className:"flex justify-between items-center text-sm",children:[e.jsx("span",{className:"text-text-secondary",children:"Password Rotation"}),e.jsx("span",{className:"text-white font-medium",children:"90 Days"})]})]}),e.jsx("div",{className:"mt-auto pt-2",children:e.jsxs("button",{className:"text-primary text-sm font-bold hover:underline flex items-center gap-1",children:["Manage Policies",e.jsx(xv,{size:16})]})})]})]})]})]})})}function t_({onClose:r,onSuccess:t}){const[s,n]=Ce.useState(""),[o,l]=Ce.useState(""),[d,c]=Ce.useState(""),[u,h]=Ce.useState(""),m=ft({mutationFn:Zr.createUser,onSuccess:async()=>{await new Promise(y=>setTimeout(y,300)),t()},onError:y=>{console.error("Failed to create user:",y);const p=y.response?.data?.error||y.message||"Failed to create user";alert(p)}}),x=y=>{if(y.preventDefault(),!s.trim()||!o.trim()||!d.trim()){alert("Username, email, and password are required");return}const p={username:s.trim(),email:o.trim(),password:d,full_name:u.trim()||void 0};console.log("Creating user:",{...p,password:"***"}),m.mutate(p)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create User"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Create a new user account"})]}),e.jsx("button",{onClick:r,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:x,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"user-username",className:"block text-sm font-medium text-white mb-2",children:["Username ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"user-username",type:"text",value:s,onChange:y=>n(y.target.value),placeholder:"johndoe",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"user-email",className:"block text-sm font-medium text-white mb-2",children:["Email ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"user-email",type:"email",value:o,onChange:y=>l(y.target.value),placeholder:"john.doe@example.com",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"user-password",className:"block text-sm font-medium text-white mb-2",children:["Password ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"user-password",type:"password",value:d,onChange:y=>c(y.target.value),placeholder:"Enter password",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0,minLength:8}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Minimum 8 characters"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"user-fullname",className:"block text-sm font-medium text-white mb-2",children:["Full Name ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("input",{id:"user-fullname",type:"text",value:u,onChange:y=>h(y.target.value),placeholder:"John Doe",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:r,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:m.isPending,className:"px-6 bg-primary hover:bg-blue-600",children:m.isPending?"Creating...":"Create User"})]})]})]})})}function r_({user:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(r.email||""),[l,d]=Ce.useState(r.full_name||""),[c,u]=Ce.useState(r.is_active),[h,m]=Ce.useState(r.roles||[]),[x,y]=Ce.useState(r.groups||[]),[p,v]=Ce.useState(""),[N,B]=Ce.useState(""),g=Nr(),j=Ce.useRef(h),_=Ce.useRef(x);Ce.useEffect(()=>{j.current=h,console.log("useEffect userRoles - state updated:",h)},[h]),Ce.useEffect(()=>{_.current=x,console.log("useEffect userGroups - state updated:",x)},[x]),Ce.useEffect(()=>{console.log("EditUserForm - userRoles state changed:",h)},[h]),Ce.useEffect(()=>{console.log("EditUserForm - userGroups state changed:",x)},[x]);const{data:w=[]}=dt({queryKey:["iam-roles"],queryFn:Zr.listRoles}),{data:L=[]}=dt({queryKey:["iam-groups"],queryFn:Zr.listGroups}),K=w.filter(F=>!h.includes(F.name)),M=L.filter(F=>!x.includes(F.name)),V=ft({mutationFn:F=>Zr.updateUser(r.id,F),onSuccess:async()=>{s(),g.invalidateQueries({queryKey:["iam-users"]}),g.invalidateQueries({queryKey:["iam-user",r.id]}),g.invalidateQueries({queryKey:["iam-roles"]}),g.invalidateQueries({queryKey:["iam-groups"]}),await g.refetchQueries({queryKey:["iam-users"]}),await g.refetchQueries({queryKey:["iam-user",r.id]}),await g.refetchQueries({queryKey:["iam-roles"]}),await g.refetchQueries({queryKey:["iam-groups"]})},onError:F=>{console.error("Failed to update user:",F);const le=F.response?.data?.error||F.message||"Failed to update user";alert(le)}}),T=ft({mutationFn:F=>Zr.assignRoleToUser(r.id,F),onMutate:async F=>{console.log("assignRoleMutation onMutate - BEFORE update, current userRoles:",j.current),m(le=>{const ae=le.includes(F)?le:[...le,F];return console.log("assignRoleMutation onMutate - prev:",le,"roleName:",F,"newRoles:",ae),j.current=ae,ae}),v(""),console.log("assignRoleMutation onMutate - AFTER update, ref should be:",j.current)},onSuccess:async(F,le)=>{g.invalidateQueries({queryKey:["iam-users"]}),g.invalidateQueries({queryKey:["iam-user",r.id]}),g.invalidateQueries({queryKey:["iam-roles"]}),await g.refetchQueries({queryKey:["iam-roles"]}),m(ae=>(console.log("assignRoleMutation onSuccess - roleName:",le,"current userRoles:",ae),ae))},onError:(F,le)=>{console.error("Failed to assign role:",F,le),m(ae=>ae.filter(se=>se!==le)),alert(F.response?.data?.error||F.message||"Failed to assign role")}}),ne=ft({mutationFn:F=>Zr.removeRoleFromUser(r.id,F),onMutate:async F=>{const le=h;return m(ae=>ae.filter(se=>se!==F)),{previousRoles:le}},onSuccess:async(F,le)=>{g.invalidateQueries({queryKey:["iam-users"]}),g.invalidateQueries({queryKey:["iam-user",r.id]}),g.invalidateQueries({queryKey:["iam-roles"]}),await g.refetchQueries({queryKey:["iam-roles"]}),console.log("Role removed successfully:",le,"Current userRoles:",h)},onError:(F,le,ae)=>{console.error("Failed to remove role:",F),ae?.previousRoles&&m(ae.previousRoles),alert(F.response?.data?.error||F.message||"Failed to remove role")}}),Z=ft({mutationFn:F=>Zr.assignGroupToUser(r.id,F),onMutate:async F=>{console.log("assignGroupMutation onMutate - BEFORE update, current userGroups:",_.current),y(le=>{const ae=le.includes(F)?le:[...le,F];return console.log("assignGroupMutation onMutate - prev:",le,"groupName:",F,"newGroups:",ae),_.current=ae,ae}),B(""),console.log("assignGroupMutation onMutate - AFTER update, ref should be:",_.current)},onSuccess:async(F,le)=>{g.invalidateQueries({queryKey:["iam-users"]}),g.invalidateQueries({queryKey:["iam-user",r.id]}),g.invalidateQueries({queryKey:["iam-groups"]}),await g.refetchQueries({queryKey:["iam-groups"]}),y(ae=>(console.log("assignGroupMutation onSuccess - groupName:",le,"current userGroups:",ae),ae))},onError:(F,le)=>{console.error("Failed to assign group:",F,le),y(ae=>ae.filter(se=>se!==le)),alert(F.response?.data?.error||F.message||"Failed to assign group")}}),U=ft({mutationFn:F=>Zr.removeGroupFromUser(r.id,F),onMutate:async F=>{const le=x;return y(ae=>ae.filter(se=>se!==F)),{previousGroups:le}},onSuccess:async(F,le)=>{g.invalidateQueries({queryKey:["iam-users"]}),g.invalidateQueries({queryKey:["iam-user",r.id]}),g.invalidateQueries({queryKey:["iam-groups"]}),await g.refetchQueries({queryKey:["iam-groups"]}),console.log("Group removed successfully:",le,"Current userGroups:",x)},onError:(F,le,ae)=>{console.error("Failed to remove group:",F),ae?.previousGroups&&y(ae.previousGroups),alert(F.response?.data?.error||F.message||"Failed to remove group")}}),q=F=>{F.preventDefault();const le=j.current,ae=_.current,se={email:n.trim(),full_name:l.trim()||void 0,is_active:c,roles:le,groups:ae};console.log("EditUserForm - Submitting payload:",se),console.log("EditUserForm - currentRoles from ref:",le),console.log("EditUserForm - currentGroups from ref:",ae),console.log("EditUserForm - userRoles from state:",h),console.log("EditUserForm - userGroups from state:",x),V.mutate(se)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Edit User"}),e.jsxs("p",{className:"text-sm text-text-secondary mt-1",children:["Edit user account: ",r.username]})]}),e.jsx("button",{onClick:t,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:q,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-username",className:"block text-sm font-medium text-white mb-2",children:"Username"}),e.jsx("input",{id:"edit-username",type:"text",value:r.username,disabled:!0,className:"w-full px-4 py-3 bg-[#0a0f14] border border-border-dark rounded-lg text-text-secondary text-sm cursor-not-allowed"}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Username cannot be changed"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-email",className:"block text-sm font-medium text-white mb-2",children:["Email ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"edit-email",type:"email",value:n,onChange:F=>o(F.target.value),placeholder:"john.doe@example.com",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-fullname",className:"block text-sm font-medium text-white mb-2",children:["Full Name ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("input",{id:"edit-fullname",type:"text",value:l,onChange:F=>d(F.target.value),placeholder:"John Doe",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors"})]}),e.jsxs("div",{className:"border-t border-border-dark pt-6",children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-3",children:"Roles"}),e.jsxs("div",{className:"flex gap-2 mb-3",children:[e.jsxs("select",{value:p,onChange:F=>v(F.target.value),className:"flex-1 px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"",children:"Select a role..."}),K.map(F=>e.jsxs("option",{value:F.name,children:[F.name," ",F.description?`- ${F.description}`:""]},F.name))]}),e.jsx(ct,{type:"button",onClick:()=>{p&&T.mutate(p)},disabled:!p||T.isPending,className:"px-4 bg-primary hover:bg-blue-600",children:e.jsx(Ks,{size:16})})]}),e.jsx("div",{className:"space-y-2",children:h.length>0?h.map(F=>e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg",children:[e.jsx("span",{className:"text-white text-sm font-medium",children:F}),e.jsx("button",{type:"button",onClick:()=>ne.mutate(F),disabled:ne.isPending,className:"text-red-400 hover:text-red-300 transition-colors",children:e.jsx(es,{size:16})})]},F)):e.jsx("p",{className:"text-text-secondary text-sm text-center py-2",children:"No roles assigned"})})]}),e.jsxs("div",{className:"border-t border-border-dark pt-6",children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-3",children:"Groups"}),e.jsxs("div",{className:"flex gap-2 mb-3",children:[e.jsxs("select",{value:N,onChange:F=>B(F.target.value),className:"flex-1 px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"",children:"Select a group..."}),M.map(F=>e.jsxs("option",{value:F.name,children:[F.name," ",F.description?`- ${F.description}`:""]},F.id))]}),e.jsx(ct,{type:"button",onClick:()=>{N&&Z.mutate(N)},disabled:!N||Z.isPending,className:"px-4 bg-primary hover:bg-blue-600",children:e.jsx(Ks,{size:16})})]}),e.jsx("div",{className:"space-y-2",children:x.length>0?x.map(F=>e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg",children:[e.jsx("span",{className:"text-white text-sm font-medium",children:F}),e.jsx("button",{type:"button",onClick:()=>U.mutate(F),disabled:U.isPending,className:"text-red-400 hover:text-red-300 transition-colors",children:e.jsx(es,{size:16})})]},F)):e.jsx("p",{className:"text-text-secondary text-sm text-center py-2",children:"No groups assigned"})})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:c,onChange:F=>u(F.target.checked),className:"w-4 h-4 rounded bg-[#0f161d] border-border-dark text-primary focus:ring-2 focus:ring-primary"}),e.jsx("span",{className:"text-sm font-medium text-white",children:"Active Account"})]}),e.jsx("p",{className:"text-xs text-text-secondary mt-1 ml-7",children:c?"User can log in and access the system":"User account is disabled"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:V.isPending,className:"px-6 bg-primary hover:bg-blue-600",children:V.isPending?"Saving...":"Save Changes"})]})]})]})})}function s_(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(!1),[c,u]=Ce.useState(null),[h,m]=Ce.useState(null),{data:x,isLoading:y}=dt({queryKey:["iam-groups"],queryFn:Zr.listGroups}),p=x?.filter(B=>B.name.toLowerCase().includes(t.toLowerCase())||B.description&&B.description.toLowerCase().includes(t.toLowerCase()))||[],v=ft({mutationFn:Zr.deleteGroup,onSuccess:async()=>{r.invalidateQueries({queryKey:["iam-groups"]}),await r.refetchQueries({queryKey:["iam-groups"]}),r.invalidateQueries({queryKey:["iam-users"]}),await r.refetchQueries({queryKey:["iam-users"]}),alert("Group deleted successfully!")},onError:B=>{console.error("Failed to delete group:",B),alert(B.response?.data?.error||B.message||"Failed to delete group")}}),N=(B,g)=>{confirm(`Are you sure you want to delete group "${g}"? This action cannot be undone.`)&&v.mutate(B)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-4 items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 max-w-xl gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search groups by name or description...",value:t,onChange:B=>s(B.target.value),className:"w-full bg-card-dark border border-border-dark rounded-lg pl-10 pr-4 py-2.5 text-white placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm"})]}),e.jsxs(ct,{variant:"outline",className:"flex items-center gap-2 px-4 py-2.5 bg-card-dark border border-border-dark rounded-lg text-text-secondary hover:text-white hover:border-slate-500 transition-colors",children:[e.jsx(fp,{size:20}),e.jsx("span",{className:"text-sm font-medium",children:"Filter"})]})]}),e.jsxs(ct,{onClick:()=>o(!0),className:"flex items-center gap-2 bg-primary hover:bg-blue-600 text-white px-5 py-2.5 rounded-lg font-bold shadow-lg shadow-blue-500/20 transition-all",children:[e.jsx(mp,{size:20}),e.jsx("span",{children:"Create Group"})]})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-[#111a22] overflow-hidden shadow-sm",children:[e.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-card-dark border-b border-border-dark text-left",children:[e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Name"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Description"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Users"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Roles"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Type"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:y?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-6 py-8 text-center text-text-secondary",children:"Loading groups..."})}):p.length>0?p.map(B=>e.jsxs("tr",{className:"group hover:bg-card-dark transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"text-white font-medium",children:B.name})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:B.description||"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:B.user_count}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:B.role_count}),e.jsx("td",{className:"px-6 py-4",children:B.is_system?e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-purple-500/10 text-purple-400 text-xs font-medium border border-purple-500/20",children:[e.jsx(Bn,{size:12}),"System"]}):e.jsx("span",{className:"text-text-secondary text-xs",children:"Custom"})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:g=>{g.stopPropagation(),m(h===B.id?null:B.id)},className:"p-2 text-text-secondary hover:text-white hover:bg-border-dark rounded-lg transition-colors",children:e.jsx(pp,{size:20})}),h===B.id&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>m(null)}),e.jsx("div",{className:"absolute right-0 mt-1 w-48 bg-card-dark border border-border-dark rounded-lg shadow-xl z-20",children:e.jsxs("div",{className:"py-1",children:[e.jsxs("button",{onClick:g=>{g.stopPropagation(),u(B),d(!0),m(null)},disabled:B.is_system,className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-[#233648] flex items-center gap-2 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(Wd,{size:16}),"Edit Group"]}),e.jsxs("button",{onClick:g=>{g.stopPropagation(),N(B.id,B.name),m(null)},disabled:B.is_system||v.isPending,className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-red-500/10 flex items-center gap-2 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(es,{size:16}),"Delete Group"]})]})})]})]})})]},B.id)):e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-6 py-8 text-center text-text-secondary",children:"No groups found"})})})]})}),e.jsxs("div",{className:"px-6 py-4 border-t border-border-dark flex items-center justify-between bg-card-dark",children:[e.jsxs("span",{className:"text-sm text-text-secondary",children:["Showing ",e.jsxs("span",{className:"font-bold text-white",children:["1-",p.length]})," of"," ",e.jsx("span",{className:"font-bold text-white",children:p.length})," groups"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{className:"p-2 rounded-lg text-text-secondary hover:bg-border-dark hover:text-white disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(Sy,{size:20})}),e.jsx("button",{className:"p-2 rounded-lg text-text-secondary hover:bg-border-dark hover:text-white",children:e.jsx(Ka,{size:20})})]})]})]}),n&&e.jsx(a_,{onClose:()=>o(!1),onSuccess:async()=>{o(!1),r.invalidateQueries({queryKey:["iam-groups"]}),await r.refetchQueries({queryKey:["iam-groups"]})}}),l&&c&&e.jsx(l_,{group:c,onClose:()=>{d(!1),u(null)},onSuccess:async()=>{d(!1),u(null),r.invalidateQueries({queryKey:["iam-groups"]}),await r.refetchQueries({queryKey:["iam-groups"]}),r.invalidateQueries({queryKey:["iam-users"]}),await r.refetchQueries({queryKey:["iam-users"]})}})]})}function a_({onClose:r,onSuccess:t}){const[s,n]=Ce.useState(""),[o,l]=Ce.useState(""),d=ft({mutationFn:Zr.createGroup,onSuccess:()=>{t()},onError:u=>{console.error("Failed to create group:",u);const h=u.response?.data?.error||u.message||"Failed to create group";alert(h)}}),c=u=>{if(u.preventDefault(),!s.trim()){alert("Name is required");return}const h={name:s.trim(),description:o.trim()||""};console.log("Creating group:",h),d.mutate(h)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create Group"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Create a new user group"})]}),e.jsx("button",{onClick:r,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:20})})]}),e.jsxs("form",{onSubmit:c,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"group-name",className:"block text-sm font-medium text-white mb-2",children:["Group Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"group-name",type:"text",value:s,onChange:u=>n(u.target.value),placeholder:"operators",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"group-description",className:"block text-sm font-medium text-white mb-2",children:["Description ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("textarea",{id:"group-description",value:o,onChange:u=>l(u.target.value),placeholder:"Group description",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors resize-none",rows:4})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:r,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:d.isPending,className:"px-6 bg-primary hover:bg-blue-600",children:d.isPending?"Creating...":"Create Group"})]})]})]})})}function n_(){const r=Nr(),[t,s]=Ce.useState(""),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(!1),[c,u]=Ce.useState(null),{data:h,isLoading:m}=dt({queryKey:["iam-roles"],queryFn:Zr.listRoles}),x=h?.filter(v=>v.name.toLowerCase().includes(t.toLowerCase())||v.description&&v.description.toLowerCase().includes(t.toLowerCase()))||[],y=ft({mutationFn:Zr.deleteRole,onSuccess:async()=>{r.invalidateQueries({queryKey:["iam-roles"]}),await r.refetchQueries({queryKey:["iam-roles"]}),r.invalidateQueries({queryKey:["iam-users"]}),await r.refetchQueries({queryKey:["iam-users"]}),alert("Role deleted successfully!")},onError:v=>{console.error("Failed to delete role:",v),alert(v.response?.data?.error||v.message||"Failed to delete role")}}),p=v=>{confirm("Are you sure you want to delete this role? This action cannot be undone.")&&y.mutate(v)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-4 items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 max-w-xl gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(io,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",size:20}),e.jsx("input",{type:"text",placeholder:"Search roles by name or description...",value:t,onChange:v=>s(v.target.value),className:"w-full bg-card-dark border border-border-dark rounded-lg pl-10 pr-4 py-2.5 text-white placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm"})]}),e.jsxs(ct,{variant:"outline",className:"flex items-center gap-2 px-4 py-2.5 bg-card-dark border border-border-dark rounded-lg text-text-secondary hover:text-white hover:border-slate-500 transition-colors",children:[e.jsx(fp,{size:20}),e.jsx("span",{className:"text-sm font-medium",children:"Filter"})]})]}),e.jsxs(ct,{onClick:()=>o(!0),className:"flex items-center gap-2 bg-primary hover:bg-blue-600 text-white px-5 py-2.5 rounded-lg font-bold shadow-lg shadow-blue-500/20 transition-all",children:[e.jsx(mp,{size:20}),e.jsx("span",{children:"Create Role"})]})]}),e.jsx("div",{className:"rounded-xl border border-border-dark bg-[#111a22] overflow-hidden shadow-sm",children:e.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-card-dark border-b border-border-dark text-left",children:[e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Name"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Description"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Users"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider",children:"Type"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-text-secondary uppercase tracking-wider text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:m?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"px-6 py-8 text-center text-text-secondary",children:"Loading roles..."})}):x.length>0?x.map(v=>e.jsxs("tr",{className:"group hover:bg-card-dark transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"text-white font-medium",children:v.name})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:v.description||"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary text-sm",children:v.user_count||0}),e.jsx("td",{className:"px-6 py-4",children:v.is_system?e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-purple-500/10 text-purple-400 text-xs font-medium border border-purple-500/20",children:[e.jsx(Bn,{size:12}),"System"]}):e.jsx("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-blue-500/10 text-blue-400 text-xs font-medium border border-blue-500/20",children:"Custom"})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("button",{onClick:()=>{u(v),d(!0)},className:"p-2 text-text-secondary hover:text-white hover:bg-border-dark rounded-lg transition-colors",title:"Edit role",children:e.jsx(Wd,{size:16})}),!v.is_system&&e.jsx("button",{onClick:()=>p(v.id),disabled:y.isPending,className:"p-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors",title:"Delete role",children:e.jsx(es,{size:16})})]})})]},v.id)):e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"px-6 py-8 text-center text-text-secondary",children:"No roles found"})})})]})})}),n&&e.jsx(i_,{onClose:()=>o(!1),onSuccess:async()=>{o(!1),r.invalidateQueries({queryKey:["iam-roles"]}),await r.refetchQueries({queryKey:["iam-roles"]})}}),l&&c&&e.jsx(o_,{role:c,onClose:()=>{d(!1),u(null)},onSuccess:async()=>{d(!1),u(null),r.invalidateQueries({queryKey:["iam-roles"]}),await r.refetchQueries({queryKey:["iam-roles"]}),r.invalidateQueries({queryKey:["iam-users"]}),await r.refetchQueries({queryKey:["iam-users"]})}})]})}function i_({onClose:r,onSuccess:t}){const[s,n]=Ce.useState(""),[o,l]=Ce.useState(""),d=ft({mutationFn:u=>Zr.createRole(u),onSuccess:()=>{t()},onError:u=>{console.error("Failed to create role:",u);const h=u.response?.data?.error||u.message||"Failed to create role";alert(h)}}),c=u=>{u.preventDefault(),d.mutate({name:s.trim(),description:o.trim()||void 0})};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create Role"}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Create a new role for access control"})]}),e.jsx("button",{onClick:r,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:24})})]}),e.jsxs("form",{onSubmit:c,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"role-name",className:"block text-sm font-medium text-white mb-2",children:["Role Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"role-name",type:"text",value:s,onChange:u=>n(u.target.value),placeholder:"e.g., operator, auditor",className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"role-description",className:"block text-sm font-medium text-white mb-2",children:["Description ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("textarea",{id:"role-description",value:o,onChange:u=>l(u.target.value),placeholder:"Describe the role's purpose and permissions",rows:3,className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors resize-none"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:r,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:d.isPending,className:"px-6 bg-primary hover:bg-blue-600",children:d.isPending?"Creating...":"Create Role"})]})]})]})})}function o_({role:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(r.name),[l,d]=Ce.useState(r.description||""),[c,u]=Ce.useState([]),[h,m]=Ce.useState(""),x=Nr(),{data:y=[]}=dt({queryKey:["iam-role-permissions",r.id],queryFn:()=>Zr.getRolePermissions(r.id)});Ce.useEffect(()=>{y&&u(y)},[y]);const{data:p=[]}=dt({queryKey:["iam-permissions"],queryFn:Zr.listPermissions}),v=p.filter(_=>!c.includes(_.name)),N=ft({mutationFn:_=>Zr.updateRole(r.id,_),onSuccess:()=>{s()},onError:_=>{console.error("Failed to update role:",_);const w=_.response?.data?.error||_.message||"Failed to update role";alert(w)}}),B=ft({mutationFn:_=>Zr.assignPermissionToRole(r.id,_),onSuccess:async()=>{const _=await Zr.getRolePermissions(r.id);u(_),x.invalidateQueries({queryKey:["iam-role-permissions",r.id]}),await x.refetchQueries({queryKey:["iam-role-permissions",r.id]}),x.invalidateQueries({queryKey:["iam-users"]}),await x.refetchQueries({queryKey:["iam-users"]}),m("")},onError:_=>{console.error("Failed to assign permission:",_),alert(_.response?.data?.error||_.message||"Failed to assign permission")}}),g=ft({mutationFn:_=>Zr.removePermissionFromRole(r.id,_),onSuccess:async()=>{const _=await Zr.getRolePermissions(r.id);u(_),x.invalidateQueries({queryKey:["iam-role-permissions",r.id]}),await x.refetchQueries({queryKey:["iam-role-permissions",r.id]}),x.invalidateQueries({queryKey:["iam-users"]}),await x.refetchQueries({queryKey:["iam-users"]})},onError:_=>{console.error("Failed to remove permission:",_),alert(_.response?.data?.error||_.message||"Failed to remove permission")}}),j=_=>{_.preventDefault(),N.mutate({name:n.trim(),description:l.trim()||void 0})};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold text-white",children:["Edit Role: ",r.name]}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Modify role details"})]}),e.jsx("button",{onClick:t,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:24})})]}),e.jsxs("form",{onSubmit:j,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-role-name",className:"block text-sm font-medium text-white mb-2",children:["Role Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"edit-role-name",type:"text",value:n,onChange:_=>o(_.target.value),disabled:r.is_system,className:`w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors ${r.is_system?"cursor-not-allowed opacity-50":""}`,required:!0}),r.is_system&&e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"System roles cannot be renamed"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-role-description",className:"block text-sm font-medium text-white mb-2",children:["Description ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("textarea",{id:"edit-role-description",value:l,onChange:_=>d(_.target.value),placeholder:"Describe the role's purpose and permissions",rows:3,className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors resize-none"})]}),e.jsxs("div",{className:"border-t border-border-dark pt-6",children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-3",children:"Permissions"}),e.jsxs("div",{className:"flex gap-2 mb-3",children:[e.jsxs("select",{value:h,onChange:_=>m(_.target.value),className:"flex-1 px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",children:[e.jsx("option",{value:"",children:"Select a permission..."}),v.map(_=>e.jsxs("option",{value:_.name,children:[_.name," ",_.description?`- ${_.description}`:`(${_.resource}:${_.action})`]},_.id))]}),e.jsx(ct,{type:"button",onClick:()=>{h&&B.mutate(h)},disabled:!h||B.isPending,className:"px-4 bg-primary hover:bg-blue-600",children:e.jsx(Ks,{size:16})})]}),e.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto custom-scrollbar",children:c.length>0?c.map(_=>{const w=p.find(L=>L.name===_);return e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[#0f161d] border border-border-dark rounded-lg",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-white text-sm font-medium",children:_}),w&&e.jsxs("span",{className:"text-text-secondary text-xs",children:[w.resource,":",w.action,w.description&&` - ${w.description}`]})]}),e.jsx("button",{type:"button",onClick:()=>g.mutate(_),disabled:g.isPending,className:"text-red-400 hover:text-red-300 transition-colors",children:e.jsx(es,{size:16})})]},_)}):e.jsx("p",{className:"text-text-secondary text-sm text-center py-2",children:"No permissions assigned"})})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:N.isPending||r.is_system,className:"px-6 bg-primary hover:bg-blue-600",children:N.isPending?"Saving...":"Save Changes"})]})]})]})})}function l_({group:r,onClose:t,onSuccess:s}){const[n,o]=Ce.useState(r.name),[l,d]=Ce.useState(r.description||""),c=ft({mutationFn:h=>Zr.updateGroup(r.id,h),onSuccess:()=>{s()},onError:h=>{console.error("Failed to update group:",h);const m=h.response?.data?.error||h.message||"Failed to update group";alert(m)}}),u=h=>{h.preventDefault(),c.mutate({name:n.trim(),description:l.trim()||void 0})};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border-dark bg-[#1e2832]",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold text-white",children:["Edit Group: ",r.name]}),e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:"Modify group details"})]}),e.jsx("button",{onClick:t,className:"text-white/70 hover:text-white transition-colors p-2 hover:bg-[#233648] rounded-lg",children:e.jsx(Zs,{size:24})})]}),e.jsxs("form",{onSubmit:u,className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-group-name",className:"block text-sm font-medium text-white mb-2",children:["Group Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx("input",{id:"edit-group-name",type:"text",value:n,onChange:h=>o(h.target.value),disabled:r.is_system,className:`w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors ${r.is_system?"cursor-not-allowed opacity-50":""}`,required:!0}),r.is_system&&e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"System groups cannot be renamed"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"edit-group-description",className:"block text-sm font-medium text-white mb-2",children:["Description ",e.jsx("span",{className:"text-text-secondary text-xs",children:"(Optional)"})]}),e.jsx("textarea",{id:"edit-group-description",value:l,onChange:h=>d(h.target.value),placeholder:"Describe the group's purpose",rows:3,className:"w-full px-4 py-3 bg-[#0f161d] border border-border-dark rounded-lg text-white text-sm placeholder-text-secondary/50 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-colors resize-none"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-border-dark",children:[e.jsx(ct,{type:"button",variant:"outline",onClick:t,className:"px-6",children:"Cancel"}),e.jsx(ct,{type:"submit",disabled:c.isPending||r.is_system,className:"px-6 bg-primary hover:bg-blue-600",children:c.isPending?"Saving...":"Save Changes"})]})]})]})})}function Uv(){const{id:r}=jy(),t=Ph(),{user:s}=hu(),n=Nr(),[o,l]=Ce.useState(!1),[d,c]=Ce.useState({email:"",full_name:""}),[u,h]=Ce.useState(null),m=r||s?.id,x=!!s&&!!m&&(m===s.id||s.roles.includes("admin")),{data:y,isLoading:p}=dt({queryKey:["iam-user",m],queryFn:()=>Zr.getUser(m),enabled:x}),v=ft({mutationFn:M=>Zr.updateUser(m,M),onSuccess:()=>{n.invalidateQueries({queryKey:["iam-user",m]}),n.invalidateQueries({queryKey:["iam-users"]}),l(!1),m===s?.id&&n.invalidateQueries({queryKey:["auth-me"]})}});if(Ce.useEffect(()=>{if(y){c({email:y.email||"",full_name:y.full_name||""});const M=localStorage.getItem(`avatar_${y.id}`);M&&h(M)}},[y]),!x)return e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsx("div",{className:"max-w-[1200px] mx-auto",children:e.jsxs("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-6 text-center",children:[e.jsx("p",{className:"text-red-400 font-semibold",children:"Access Denied"}),e.jsx("p",{className:"text-text-secondary text-sm mt-2",children:"You don't have permission to view this profile."}),e.jsxs(ct,{variant:"outline",onClick:()=>t(-1),className:"mt-4",children:[e.jsx(wc,{className:"h-4 w-4 mr-2"}),"Go Back"]})]})})});if(p)return e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsx("div",{className:"max-w-[1200px] mx-auto",children:e.jsx("p",{className:"text-text-secondary",children:"Loading profile..."})})});if(!y)return e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsx("div",{className:"max-w-[1200px] mx-auto",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-lg p-6 text-center",children:[e.jsx("p",{className:"text-text-secondary",children:"User not found"}),e.jsxs(ct,{variant:"outline",onClick:()=>t(-1),className:"mt-4",children:[e.jsx(wc,{className:"h-4 w-4 mr-2"}),"Go Back"]})]})})});const N=m===s?.id,B=N||s?.roles.includes("admin"),g=()=>{v.mutate({email:d.email,full_name:d.full_name}),u&&y&&(localStorage.setItem(`avatar_${y.id}`,u),window.dispatchEvent(new Event("avatar-updated")))},j=M=>{const V=M.target.files?.[0];if(V){if(!V.type.startsWith("image/")){alert("Please select an image file");return}if(V.size>2*1024*1024){alert("Image size must be less than 2MB");return}const T=new FileReader;T.onloadend=()=>{h(T.result)},T.readAsDataURL(V)}},_=()=>{h(null),y&&(localStorage.removeItem(`avatar_${y.id}`),window.dispatchEvent(new Event("avatar-updated")))},w=M=>new Date(M).toLocaleString(),L=M=>M?w(M):"Never",K=()=>y?.full_name?y.full_name.split(" ").map(M=>M[0]).join("").substring(0,2).toUpperCase():y?.username?.substring(0,2).toUpperCase()||"U";return e.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:e.jsxs("div",{className:"max-w-[1200px] mx-auto flex flex-col gap-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(ct,{variant:"ghost",size:"sm",onClick:()=>t(-1),className:"text-text-secondary hover:text-white",children:[e.jsx(wc,{className:"h-4 w-4 mr-2"}),"Back"]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-black text-white leading-tight",children:"User Profile"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:N?"Your profile information":`Viewing profile for ${y.username}`})]})]}),B&&e.jsx("div",{className:"flex gap-2",children:o?e.jsxs(e.Fragment,{children:[e.jsxs(ct,{variant:"outline",onClick:()=>{l(!1),c({email:y.email||"",full_name:y.full_name||""})},children:[e.jsx(Zs,{className:"h-4 w-4 mr-2"}),"Cancel"]}),e.jsxs(ct,{onClick:g,disabled:v.isPending,children:[e.jsx(up,{className:"h-4 w-4 mr-2"}),v.isPending?"Saving...":"Save Changes"]})]}):e.jsxs(ct,{onClick:()=>l(!0),children:[e.jsx(gv,{className:"h-4 w-4 mr-2"}),"Edit Profile"]})})]}),e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-primary/20 to-blue-600/20 p-8 border-b border-border-dark",children:e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"w-24 h-24 rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white text-3xl font-bold overflow-hidden",children:[u?e.jsx("img",{src:u,alt:y.full_name||y.username,className:"w-full h-full object-cover",onError:M=>{const V=M.target;V.style.display="none";const T=V.nextElementSibling;T&&(T.style.display="flex")}}):null,e.jsx("span",{className:u?"hidden":"",children:K()})]}),B&&e.jsx("div",{className:"absolute bottom-0 right-0",children:e.jsxs("label",{className:"cursor-pointer bg-primary hover:bg-primary/90 rounded-full p-2 border-2 border-background-dark flex items-center justify-center transition-colors",children:[e.jsx(gv,{className:"h-4 w-4 text-white"}),e.jsx("input",{type:"file",accept:"image/*",onChange:j,className:"hidden"})]})}),B&&u&&e.jsx("button",{onClick:_,className:"absolute top-0 right-0 bg-red-500 hover:bg-red-600 rounded-full p-1.5 border-2 border-background-dark flex items-center justify-center transition-colors",title:"Remove avatar",children:e.jsx(Zs,{className:"h-3 w-3 text-white"})})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:y.full_name||y.username}),e.jsxs("p",{className:"text-text-secondary mt-1",children:["@",y.username]}),e.jsxs("div",{className:"flex items-center gap-4 mt-3",children:[e.jsxs("div",{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold ${y.is_active?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${y.is_active?"bg-green-400":"bg-red-400"}`}),y.is_active?"Active":"Inactive"]}),y.is_system&&e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold bg-purple-500/10 text-purple-400 border border-purple-500/20",children:[e.jsx(Bn,{size:12}),"System User"]})]})]})]})}),e.jsx("div",{className:"p-8",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[e.jsx(o4,{className:"h-5 w-5 text-primary"}),"Basic Information"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Username"}),e.jsx("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white font-mono",children:y.username}),e.jsx("p",{className:"text-xs text-text-secondary mt-1",children:"Username cannot be changed"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Email Address"}),o?e.jsx("input",{type:"email",value:d.email,onChange:M=>c({...d,email:M.target.value}),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"email@example.com"}):e.jsxs("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white flex items-center gap-2",children:[e.jsx(U6,{className:"h-4 w-4 text-text-secondary"}),y.email||"-"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Full Name"}),o?e.jsx("input",{type:"text",value:d.full_name,onChange:M=>c({...d,full_name:M.target.value}),className:"w-full bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",placeholder:"Full Name"}):e.jsx("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white",children:y.full_name||"-"})]})]})]})}),e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[e.jsx(Bn,{className:"h-5 w-5 text-primary"}),"Account Details"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Roles"}),e.jsx("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3",children:y.roles&&y.roles.length>0?e.jsx("div",{className:"flex flex-wrap gap-2",children:y.roles.map(M=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-primary/10 text-primary text-xs font-medium border border-primary/20",children:[e.jsx(Bn,{size:12}),M]},M))}):e.jsx("span",{className:"text-text-secondary text-sm",children:"No roles assigned"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Permissions"}),e.jsx("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3",children:y.permissions&&y.permissions.length>0?e.jsx("div",{className:"flex flex-wrap gap-2",children:y.permissions.map(M=>e.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-slate-700 text-slate-300 text-xs font-medium",children:M},M))}):e.jsx("span",{className:"text-text-secondary text-sm",children:"No permissions assigned"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Last Login"}),e.jsxs("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white flex items-center gap-2",children:[e.jsx(Ec,{className:"h-4 w-4 text-text-secondary"}),L(y.last_login_at)]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-text-secondary uppercase tracking-wider mb-2",children:"Account Created"}),e.jsxs("div",{className:"bg-[#0f161d] border border-border-dark rounded-lg px-4 py-3 text-white flex items-center gap-2",children:[e.jsx(l4,{className:"h-4 w-4 text-text-secondary"}),w(y.created_at)]})]})]})]})})]})})]})]})})}const Qv=[{id:"1",name:"Daily Backup: VM-Cluster-01",type:"Replication",progress:45,speed:"145 MB/s",status:"running",eta:"1h 12m"},{id:"2",name:"ZFS Scrub: Pool-01",type:"Maintenance",progress:78,speed:"1.2 GB/s",status:"running"}];function A_(){const[r,t]=Ce.useState("jobs"),[s,n]=Ce.useState(""),o=5,{data:l,isLoading:d}=dt({queryKey:["monitoring-metrics"],queryFn:Cc.getMetrics,refetchInterval:o*1e3}),{data:c=[],isLoading:u}=dt({queryKey:["monitoring-logs"],queryFn:()=>ao.getSystemLogs(50),refetchInterval:10*1e3}),{data:h=[]}=dt({queryKey:["monitoring-network"],queryFn:()=>ao.getNetworkThroughput("15m"),refetchInterval:o*1e3}),{data:m=[]}=dt({queryKey:["monitoring-pools"],queryFn:sn.listPools,refetchInterval:30*1e3}),{data:x}=dt({queryKey:["monitoring-alerts"],queryFn:()=>Cc.listAlerts({limit:20}),refetchInterval:10*1e3}),y=w=>{const L=Math.floor(w/86400),K=Math.floor(w%86400/3600),M=Math.floor(w%3600/60);return`${L}d ${K}h ${M}m`},p=m.length>0?m[0]:null,v=p?.health_status==="online"?"Online":"Degraded",N=p?.health_status==="online",B=c.filter(w=>w.message.toLowerCase().includes(s.toLowerCase())||w.source.toLowerCase().includes(s.toLowerCase())),g=w=>{const L=w.toUpperCase();return L==="INFO"||L==="DEBUG"?"text-emerald-500":L==="WARN"||L==="WARNING"?"text-yellow-500":L==="ERROR"||L==="CRITICAL"||L==="FATAL"?"text-red-500":"text-text-secondary"},j=h.length>0?Math.max(...h.map(w=>Math.max(w.inbound,w.outbound))):0,_=h.length>0?((h[h.length-1].inbound+h[h.length-1].outbound)/1e3).toFixed(1):"0.0";return e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col bg-background-dark",children:[e.jsx("header",{className:"flex-none px-6 py-5 border-b border-border-dark bg-background-dark/95 backdrop-blur z-10",children:e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-3 max-w-[1600px] mx-auto",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h2",{className:"text-white text-3xl font-black tracking-tight",children:"System Monitor"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Real-time telemetry, ZFS health, and system event logs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-card-dark rounded-lg border border-border-dark",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),e.jsx("span",{className:"text-xs font-medium text-emerald-400",children:"System Healthy"})]}),e.jsxs("button",{className:"flex items-center gap-2 h-10 px-4 bg-card-dark hover:bg-[#233648] border border-border-dark text-white text-sm font-bold rounded-lg transition-colors",children:[e.jsx(Cn,{size:18}),e.jsxs("span",{children:["Refresh: ",o,"s"]})]})]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6",children:e.jsxs("div",{className:"flex flex-col gap-6 max-w-[1600px] mx-auto pb-10",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"CPU Load"}),e.jsx(e4,{className:"text-text-secondary",size:20})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsx("p",{className:"text-white text-3xl font-bold",children:d?"...":`${l?.system?.cpu_usage_percent?.toFixed(0)||0}%`}),e.jsxs("span",{className:"text-emerald-500 text-sm font-medium mb-1 flex items-center",children:[e.jsx(t4,{size:16,className:"mr-1"}),"2%"]})]}),e.jsx("div",{className:"h-1.5 w-full bg-[#233648] rounded-full mt-3 overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${l?.system?.cpu_usage_percent||0}%`}})})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"RAM Usage"}),e.jsx(r4,{className:"text-text-secondary",size:20})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsx("p",{className:"text-white text-3xl font-bold",children:d?"...":fr(l?.system?.memory_used_bytes||0)}),e.jsxs("span",{className:"text-text-secondary text-xs mb-2",children:["/ ",fr(l?.system?.memory_total_bytes||0)]})]}),e.jsx("div",{className:"h-1.5 w-full bg-[#233648] rounded-full mt-3 overflow-hidden",children:e.jsx("div",{className:"h-full bg-emerald-500 rounded-full transition-all",style:{width:`${l?.system?.memory_usage_percent||0}%`}})})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"ZFS Pool Status"}),e.jsx(su,{className:N?"text-emerald-500":"text-yellow-500",size:20})]}),e.jsxs("div",{className:"flex items-end gap-3 mt-1",children:[e.jsx("p",{className:"text-white text-3xl font-bold",children:v}),e.jsx("span",{className:"text-text-secondary text-sm font-medium mb-1",children:"No Errors"})]}),e.jsx("div",{className:"flex gap-1 mt-3",children:[1,2,3,4].map(w=>e.jsx("div",{className:`h-1.5 flex-1 rounded-full ${w===1?"rounded-l-full":w===4?"rounded-r-full":""} ${N?"bg-emerald-500":"bg-yellow-500"}`},w))})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-xl p-5 border border-border-dark bg-card-dark",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"System Uptime"}),e.jsx(Ec,{className:"text-text-secondary",size:20})]}),e.jsx("div",{className:"mt-1",children:e.jsx("p",{className:"text-white text-3xl font-bold",children:d?"...":y(l?.system?.uptime_seconds||0)})}),e.jsx("p",{className:"text-text-secondary text-xs mt-3",children:"Last reboot: Manual Patching"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 flex flex-col gap-6",children:[e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Network Throughput"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Inbound vs Outbound (eth0)"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-white text-2xl font-bold leading-tight",children:[_," Gbps"]}),e.jsxs("p",{className:"text-emerald-500 text-sm",children:["Peak: ",(j/1e3).toFixed(1)," Gbps"]})]})]}),e.jsx("div",{className:"h-[200px] w-full",children:h.length>0?e.jsx(Cl,{width:"100%",height:"100%",children:e.jsxs(f4,{data:h.map(w=>({time:new Date(w.time).toLocaleTimeString(),inbound:w.inbound,outbound:w.outbound})),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"gradientPrimary",x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#137fec",stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:"#137fec",stopOpacity:0})]})}),e.jsx(Nc,{strokeDasharray:"3 3",stroke:"#324d67"}),e.jsx(Bc,{dataKey:"time",stroke:"#92adc9",style:{fontSize:"12px"}}),e.jsx(jc,{stroke:"#92adc9",style:{fontSize:"12px"}}),e.jsx(Sl,{contentStyle:{backgroundColor:"#1a2632",border:"1px solid #324d67",borderRadius:"0.5rem"}}),e.jsx(Qh,{}),e.jsx(vh,{type:"monotone",dataKey:"outbound",stroke:"#92adc9",strokeDasharray:"5 5",strokeWidth:2,fill:"none"}),e.jsx(vh,{type:"monotone",dataKey:"inbound",stroke:"#137fec",strokeWidth:3,fill:"url(#gradientPrimary)"})]})}):e.jsx("div",{className:"h-full flex items-center justify-center text-text-secondary",children:"Loading network data..."})})]}),e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"ZFS ARC Hit Ratio"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Cache efficiency"})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-white text-2xl font-bold leading-tight",children:"94%"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Target: >90%"})]})]}),e.jsxs("div",{className:"h-[150px] w-full relative",children:[e.jsx(Cl,{width:"100%",height:"100%",children:e.jsxs(ky,{data:[{time:"10:00",ratio:95},{time:"10:15",ratio:94},{time:"10:30",ratio:96},{time:"10:45",ratio:93},{time:"11:00",ratio:94}],children:[e.jsx(Nc,{strokeDasharray:"3 3",stroke:"#324d67"}),e.jsx(Bc,{dataKey:"time",stroke:"#92adc9",style:{fontSize:"12px"}}),e.jsx(jc,{stroke:"#92adc9",domain:[90,100],style:{fontSize:"12px"}}),e.jsx(Sl,{contentStyle:{backgroundColor:"#1a2632",border:"1px solid #324d67",borderRadius:"0.5rem"}}),e.jsx(Lh,{type:"monotone",dataKey:"ratio",stroke:"#10b981",strokeWidth:2,dot:!1})]})}),e.jsx("div",{className:"w-full h-[1px] bg-border-dark absolute top-[20%]"}),e.jsx("div",{className:"absolute top-[20%] right-0 text-xs text-text-secondary -mt-5",children:"95%"})]})]})]}),e.jsx("div",{className:"flex flex-col gap-6",children:e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl p-6 h-full shadow-sm flex flex-col",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Disk Health"}),e.jsx("span",{className:"bg-[#233648] text-white text-xs px-2 py-1 rounded border border-border-dark",children:"Pool 1"})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 flex-1 content-start",children:[[0,1,2,3,4,5,6,7].map(w=>e.jsxs("div",{className:`aspect-square border rounded flex flex-col items-center justify-center ${w===5?"bg-[#332a18] border-yellow-700/50":"bg-[#1a2e22] border-emerald-800"}`,children:[w===5?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"absolute top-1 right-1 h-2 w-2 rounded-full bg-yellow-500 animate-pulse"}),e.jsx(Eh,{className:"text-yellow-500",size:20})]}):e.jsx(Ul,{className:"text-emerald-500",size:20}),e.jsxs("span",{className:`text-[10px] font-mono mt-1 ${w===5?"text-yellow-500":"text-emerald-500"}`,children:["da",w]})]},w)),[8,9,10,11].map(w=>e.jsx("div",{className:"aspect-square bg-[#161f29] border border-border-dark border-dashed rounded flex flex-col items-center justify-center opacity-50",children:e.jsx("span",{className:"text-[10px] text-text-secondary font-mono",children:"Empty"})},w))]}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-border-dark",children:[e.jsxs("div",{className:"flex justify-between text-sm text-text-secondary",children:[e.jsx("span",{children:"Total Capacity"}),e.jsx("span",{className:"text-white font-bold",children:fr(l?.storage?.total_capacity_bytes||0)})]}),e.jsx("div",{className:"w-full bg-[#233648] h-2 rounded-full mt-2 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full transition-all",style:{width:`${l?.storage?.total_capacity_bytes?l.storage.used_capacity_bytes/l.storage.total_capacity_bytes*100:0}%`}})}),e.jsxs("div",{className:"flex justify-between text-xs text-text-secondary mt-1",children:[e.jsxs("span",{children:["Used: ",fr(l?.storage?.used_capacity_bytes||0)]}),e.jsxs("span",{children:["Free: ",fr((l?.storage?.total_capacity_bytes||0)-(l?.storage?.used_capacity_bytes||0))]})]})]})]})})]}),e.jsxs("div",{className:"bg-card-dark border border-border-dark rounded-xl shadow-sm overflow-hidden flex flex-col h-[400px]",children:[e.jsxs("div",{className:"flex border-b border-border-dark bg-[#161f29]",children:[e.jsxs("button",{onClick:()=>t("jobs"),className:`px-6 py-4 text-sm font-bold flex items-center transition-colors ${r==="jobs"?"text-primary border-b-2 border-primary bg-card-dark":"text-text-secondary hover:text-white"}`,children:["Active Jobs"," ",e.jsx("span",{className:"ml-2 bg-primary/20 text-primary px-1.5 py-0.5 rounded text-xs",children:Qv.length})]}),e.jsx("button",{onClick:()=>t("logs"),className:`px-6 py-4 text-sm transition-colors ${r==="logs"?"text-primary border-b-2 border-primary bg-card-dark font-bold":"text-text-secondary hover:text-white font-medium"}`,children:"System Logs"}),e.jsx("button",{onClick:()=>t("alerts"),className:`px-6 py-4 text-sm transition-colors ${r==="alerts"?"text-primary border-b-2 border-primary bg-card-dark font-bold":"text-text-secondary hover:text-white font-medium"}`,children:"Alerts History"}),e.jsx("div",{className:"flex-1 flex justify-end items-center px-4",children:e.jsxs("div",{className:"relative",children:[e.jsx(io,{className:"absolute left-2 top-1.5 text-text-secondary",size:18}),e.jsx("input",{className:"bg-[#111a22] border border-border-dark rounded-md py-1 pl-8 pr-3 text-sm text-white focus:outline-none focus:border-primary w-48 transition-all",placeholder:"Search logs...",type:"text",value:s,onChange:w=>n(w.target.value)})]})})]}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[r==="jobs"&&e.jsx("div",{className:"p-0 overflow-y-auto custom-scrollbar",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-[#1a2632] text-xs uppercase text-text-secondary font-medium sticky top-0 z-10",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Job Name"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Type"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark w-1/3",children:"Progress"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Speed"}),e.jsx("th",{className:"px-6 py-3 border-b border-border-dark",children:"Status"})]})}),e.jsx("tbody",{className:"text-sm divide-y divide-border-dark",children:Qv.map(w=>e.jsxs("tr",{className:"group hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4 font-medium text-white",children:w.name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:w.type}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-full bg-[#111a22] rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full rounded-full relative overflow-hidden",style:{width:`${w.progress}%`},children:e.jsx("div",{className:"absolute inset-0 bg-white/20 animate-pulse"})})}),e.jsxs("span",{className:"text-xs font-mono text-white",children:[w.progress,"%"]})]}),w.eta&&e.jsxs("p",{className:"text-[10px] text-text-secondary mt-1",children:["ETA: ",w.eta]})]}),e.jsx("td",{className:"px-6 py-4 text-text-secondary font-mono",children:w.speed}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-primary/20 text-primary",children:"Running"})})]},w.id))})]})}),r==="logs"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-6 py-2 bg-[#161f29] border-y border-border-dark flex items-center justify-between",children:[e.jsx("h4",{className:"text-xs uppercase text-text-secondary font-bold tracking-wider",children:"Recent System Events"}),e.jsx("button",{className:"text-xs text-primary hover:text-white transition-colors",children:"View All Logs"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#111a22]",children:e.jsx("table",{className:"w-full text-left border-collapse",children:e.jsx("tbody",{className:"text-sm font-mono divide-y divide-border-dark/50",children:u?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-6 py-4 text-center text-text-secondary",children:"Loading logs..."})}):B.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-6 py-4 text-center text-text-secondary",children:"No logs found"})}):B.map((w,L)=>e.jsxs("tr",{className:"group hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-2 text-text-secondary w-32 whitespace-nowrap",children:new Date(w.time).toLocaleTimeString()}),e.jsx("td",{className:"px-6 py-2 w-24",children:e.jsx("span",{className:g(w.level),children:w.level})}),e.jsx("td",{className:"px-6 py-2 w-32 text-white",children:w.source}),e.jsx("td",{className:"px-6 py-2 text-text-secondary truncate max-w-lg",children:w.message})]},L))})})})]}),r==="alerts"&&e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#111a22] p-6",children:x?.alerts&&x.alerts.length>0?e.jsx("div",{className:"space-y-3",children:x.alerts.map(w=>e.jsx("div",{className:"bg-[#1a2632] border border-border-dark rounded-lg p-4 hover:bg-[#233648] transition-colors",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[w.severity==="critical"?e.jsx(_l,{className:"text-red-500 mt-1",size:20}):w.severity==="warning"?e.jsx(Eh,{className:"text-yellow-500 mt-1",size:20}):e.jsx(a4,{className:"text-blue-500 mt-1",size:20}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-medium",children:w.title}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:w.message}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:new Date(w.created_at).toLocaleString()})]})]}),e.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${w.severity==="critical"?"bg-red-500/20 text-red-400":w.severity==="warning"?"bg-yellow-500/20 text-yellow-400":"bg-blue-500/20 text-blue-400"}`,children:w.severity.toUpperCase()})]})},w.id))}):e.jsx("div",{className:"text-center text-text-secondary py-8",children:"No alerts"})})]})]})]})})]})}const Ea={listBuckets:async()=>(await ze.get("/object-storage/buckets")).data.buckets||[],getBucket:async r=>(await ze.get(`/object-storage/buckets/${encodeURIComponent(r)}`)).data,createBucket:async r=>{await ze.post("/object-storage/buckets",{name:r})},deleteBucket:async r=>{await ze.delete(`/object-storage/buckets/${encodeURIComponent(r)}`)},getAvailableDatasets:async()=>(await ze.get("/object-storage/setup/datasets")).data.pools||[],getCurrentSetup:async()=>{const r=await ze.get("/object-storage/setup/current");return!r.data.configured||!r.data.setup?null:{dataset_path:r.data.setup.dataset_path,mount_point:r.data.setup.mount_point}},setupObjectStorage:async(r,t,s)=>(await ze.post("/object-storage/setup",{pool_name:r,dataset_name:t,create_new:s})).data,updateObjectStorage:async(r,t,s)=>(await ze.put("/object-storage/setup",{pool_name:r,dataset_name:t,create_new:s})).data,listUsers:async()=>(await ze.get("/object-storage/users")).data.users||[],createUser:async r=>{await ze.post("/object-storage/users",r)},deleteUser:async r=>{await ze.delete(`/object-storage/users/${encodeURIComponent(r)}`)},listServiceAccounts:async()=>(await ze.get("/object-storage/service-accounts")).data.service_accounts||[],createServiceAccount:async r=>(await ze.post("/object-storage/service-accounts",r)).data,deleteServiceAccount:async r=>{await ze.delete(`/object-storage/service-accounts/${encodeURIComponent(r)}`)},listObjects:async(r,t)=>{const s=t?`?prefix=${encodeURIComponent(t)}`:"";return(await ze.get(`/object-storage/buckets/${encodeURIComponent(r)}/objects${s}`)).data.objects||[]}};function c_({S3_ENDPOINT:r}){const[t,s]=Ce.useState("users"),[n,o]=Ce.useState(!1),[l,d]=Ce.useState(""),[c,u]=Ce.useState(""),[h,m]=Ce.useState(!1),[x,y]=Ce.useState(""),[p,v]=Ce.useState(""),[N,B]=Ce.useState(""),[g,j]=Ce.useState(null),[_,w]=Ce.useState(!1),[L,K]=Ce.useState(null),[M,V]=Ce.useState(null),[T,ne]=Ce.useState(!1),[Z,U]=Ce.useState(!1),q=Nr(),{data:F=[],isLoading:le}=dt({queryKey:["object-storage-users"],queryFn:Ea.listUsers,refetchInterval:1e4}),{data:ae=[],isLoading:se}=dt({queryKey:["object-storage-service-accounts"],queryFn:Ea.listServiceAccounts,refetchInterval:1e4}),fe=ft({mutationFn:J=>Ea.createUser(J),onMutate:async J=>{await q.cancelQueries({queryKey:["object-storage-users"]});const O=q.getQueryData(["object-storage-users"]);return q.setQueryData(["object-storage-users"],(H=[])=>{const re={access_key:J.access_key,status:"enabled",created_at:new Date().toISOString()};return[...H,re]}),o(!1),d(""),u(""),{previousUsers:O}},onError:(J,O,H)=>{H?.previousUsers&&q.setQueryData(["object-storage-users"],H.previousUsers),o(!0),alert(J.response?.data?.error||"Failed to create user")},onSuccess:()=>{q.invalidateQueries({queryKey:["object-storage-users"]}),alert("User created successfully!")},onSettled:()=>{q.invalidateQueries({queryKey:["object-storage-users"]})}}),ye=ft({mutationFn:J=>Ea.deleteUser(J),onMutate:async J=>{await q.cancelQueries({queryKey:["object-storage-users"]});const O=q.getQueryData(["object-storage-users"]);return q.setQueryData(["object-storage-users"],(H=[])=>H.filter(re=>re.access_key!==J)),{previousUsers:O}},onError:(J,O,H)=>{H?.previousUsers&&q.setQueryData(["object-storage-users"],H.previousUsers),alert(J.response?.data?.error||"Failed to delete user")},onSuccess:()=>{q.invalidateQueries({queryKey:["object-storage-users"]})},onSettled:()=>{q.invalidateQueries({queryKey:["object-storage-users"]})}}),_e=ft({mutationFn:J=>Ea.createServiceAccount(J),onMutate:async J=>{await q.cancelQueries({queryKey:["object-storage-service-accounts"]});const O=q.getQueryData(["object-storage-service-accounts"]);return m(!1),y(""),v(""),B(""),{previousAccounts:O}},onError:(J,O,H)=>{H?.previousAccounts&&q.setQueryData(["object-storage-service-accounts"],H.previousAccounts),m(!0),alert(J.response?.data?.error||"Failed to create access key")},onSuccess:J=>{q.setQueryData(["object-storage-service-accounts"],(O=[])=>[...O,J]),j(J),q.invalidateQueries({queryKey:["object-storage-service-accounts"]})},onSettled:()=>{q.invalidateQueries({queryKey:["object-storage-service-accounts"]})}}),xe=ft({mutationFn:J=>Ea.deleteServiceAccount(J),onMutate:async J=>{await q.cancelQueries({queryKey:["object-storage-service-accounts"]});const O=q.getQueryData(["object-storage-service-accounts"]);return q.setQueryData(["object-storage-service-accounts"],(H=[])=>H.filter(re=>re.access_key!==J)),{previousAccounts:O}},onError:(J,O,H)=>{H?.previousAccounts&&q.setQueryData(["object-storage-service-accounts"],H.previousAccounts),alert(J.response?.data?.error||"Failed to delete access key")},onSuccess:()=>{q.invalidateQueries({queryKey:["object-storage-service-accounts"]})},onSettled:()=>{q.invalidateQueries({queryKey:["object-storage-service-accounts"]})}}),D=async()=>{ne(!0);try{await q.invalidateQueries({queryKey:["object-storage-users"]}),await q.refetchQueries({queryKey:["object-storage-users"]}),setTimeout(()=>{alert("Users refreshed successfully!")},300)}catch{alert("Failed to refresh users")}finally{ne(!1)}},$=async()=>{U(!0);try{await q.invalidateQueries({queryKey:["object-storage-service-accounts"]}),await q.refetchQueries({queryKey:["object-storage-service-accounts"]}),setTimeout(()=>{alert("Access keys refreshed successfully!")},300)}catch{alert("Failed to refresh access keys")}finally{U(!1)}},X=J=>new Date(J).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),te=async(J,O)=>{try{await navigator.clipboard.writeText(J),alert(`${O} copied to clipboard!`)}catch(H){console.error("Failed to copy:",H);const re=document.createElement("textarea");re.value=J,re.style.position="fixed",re.style.left="-999999px",document.body.appendChild(re),re.select();try{document.execCommand("copy"),alert(`${O} copied to clipboard!`)}catch{alert(`Failed to copy. ${O}: ${J}`)}document.body.removeChild(re)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-border-dark",children:[e.jsx("button",{onClick:()=>s("users"),className:`px-4 py-2 text-sm font-medium transition-colors ${t==="users"?"text-primary border-b-2 border-primary":"text-text-secondary hover:text-white"}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Vd,{size:18}),e.jsxs("span",{children:["Users (",F.length,")"]})]})}),e.jsx("button",{onClick:()=>s("keys"),className:`px-4 py-2 text-sm font-medium transition-colors ${t==="keys"?"text-primary border-b-2 border-primary":"text-text-secondary hover:text-white"}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Wx,{size:18}),e.jsxs("span",{children:["Access Keys (",ae.length,")"]})]})})]}),t==="users"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"IAM Users"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage MinIO IAM users for accessing object storage"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:D,disabled:T,className:"px-4 py-2 bg-[#233648] hover:bg-[#2b4055] text-white text-sm font-medium rounded-lg border border-border-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[e.jsx(Cn,{size:16,className:T?"animate-spin":""}),T?"Refreshing...":"Refresh"]}),e.jsxs("button",{onClick:()=>o(!0),className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2",children:[e.jsx(mp,{size:16}),"Create User"]})]})]}),le?e.jsx("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:e.jsx("p",{className:"text-text-secondary text-sm",children:"Loading users..."})}):F.length===0?e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:[e.jsx(Vd,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm mb-4",children:"No users found"}),e.jsx("button",{onClick:()=>o(!0),className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors",children:"Create First User"})]}):e.jsx("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[#16202a] border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Access Key"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Status"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Created"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:F.map(J=>e.jsxs("tr",{className:"hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Vd,{size:16,className:"text-primary"}),e.jsx("span",{className:"text-white font-mono text-sm",children:J.access_key})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${J.status==="enabled"?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,children:J.status==="enabled"?e.jsxs(e.Fragment,{children:[e.jsx(su,{size:12,className:"mr-1"}),"Enabled"]}):"Disabled"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-text-secondary text-sm",children:X(J.created_at)}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsxs("button",{onClick:async()=>{await te(J.access_key,"Access Key")},className:"px-3 py-1.5 text-xs font-medium text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors flex items-center gap-1.5",title:"Copy Access Key",children:[e.jsx(so,{size:14}),"Copy"]}),e.jsxs("button",{onClick:()=>K(J.access_key),disabled:ye.isPending,className:"px-3 py-1.5 text-xs font-medium text-red-400 bg-red-500/10 hover:bg-red-500/20 border border-red-500/20 rounded-lg transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Delete User",children:[e.jsx(es,{size:14}),"Delete"]})]})})]},J.access_key))})]})})})]}),t==="keys"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Access Keys"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1",children:"Manage service account access keys for programmatic access"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:$,disabled:Z,className:"px-4 py-2 bg-[#233648] hover:bg-[#2b4055] text-white text-sm font-medium rounded-lg border border-border-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[e.jsx(Cn,{size:16,className:Z?"animate-spin":""}),Z?"Refreshing...":"Refresh"]}),e.jsxs("button",{onClick:()=>{if(F.length===0){alert("Please create at least one user before creating access keys"),s("users");return}m(!0)},className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2",children:[e.jsx(Q6,{size:16}),"Create Access Key"]})]})]}),se?e.jsx("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:e.jsx("p",{className:"text-text-secondary text-sm",children:"Loading access keys..."})}):ae.length===0?e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:[e.jsx(Wx,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm mb-4",children:"No access keys found"}),e.jsx("button",{onClick:()=>{if(F.length===0){alert("Please create at least one user before creating access keys"),s("users");return}m(!0)},className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors",children:"Create First Access Key"})]}):e.jsx("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[#16202a] border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Access Key"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Parent User"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Expiration"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Created"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:ae.map(J=>e.jsxs("tr",{className:"hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Wx,{size:16,className:"text-primary"}),e.jsx("span",{className:"text-white font-mono text-sm",children:J.access_key})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-text-secondary text-sm",children:J.parent_user}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-text-secondary text-sm",children:J.expiration?X(J.expiration):"Never"}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-text-secondary text-sm",children:X(J.created_at)}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsxs("button",{onClick:async()=>{await te(J.access_key,"Access Key")},className:"px-3 py-1.5 text-xs font-medium text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors flex items-center gap-1.5",title:"Copy Access Key",children:[e.jsx(so,{size:14}),"Copy"]}),e.jsxs("button",{onClick:()=>V(J.access_key),disabled:xe.isPending,className:"px-3 py-1.5 text-xs font-medium text-red-400 bg-red-500/10 hover:bg-red-500/20 border border-red-500/20 rounded-lg transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Delete Access Key",children:[e.jsx(es,{size:14}),"Delete"]})]})})]},J.access_key))})]})})})]}),n&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Create IAM User"}),e.jsx("button",{onClick:()=>{o(!1),d(""),u("")},className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Access Key"}),e.jsx("input",{type:"text",value:l,onChange:J=>d(J.target.value),placeholder:"e.g., myuser",className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:ring-1 focus:ring-primary focus:border-primary outline-none font-mono",autoFocus:!0}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"Access key must be unique and follow MinIO naming conventions"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Secret Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:_?"text":"password",value:c,onChange:J=>u(J.target.value),placeholder:"Enter secret key",className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 pr-10 text-white text-sm focus:ring-1 focus:ring-primary focus:border-primary outline-none font-mono"}),e.jsx("button",{type:"button",onClick:()=>w(!_),className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-white",children:_?e.jsx(bv,{size:18}):e.jsx(Db,{size:18})})]}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"Secret key must be at least 8 characters long"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>{o(!1),d(""),u("")},className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{if(!l.trim()){alert("Please enter an access key");return}if(!c.trim()||c.length<8){alert("Please enter a secret key (minimum 8 characters)");return}fe.mutate({access_key:l.trim(),secret_key:c})},disabled:fe.isPending||!l.trim()||!c.trim(),className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:fe.isPending?"Creating...":"Create User"})]})]})]})}),h&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Create Access Key"}),e.jsx("button",{onClick:()=>{m(!1),y(""),v(""),B("")},className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Parent User"}),e.jsxs("select",{value:x,onChange:J=>y(J.target.value),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:ring-1 focus:ring-primary focus:border-primary outline-none",autoFocus:!0,children:[e.jsx("option",{value:"",children:"-- Select User --"}),F.map(J=>e.jsx("option",{value:J.access_key,children:J.access_key},J.access_key))]}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"Select the IAM user this access key will belong to"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Policy (Optional)"}),e.jsx("textarea",{value:p,onChange:J=>v(J.target.value),placeholder:'{"Version":"2012-10-17","Statement":[...]}',rows:4,className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:ring-1 focus:ring-primary focus:border-primary outline-none font-mono"}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"JSON policy document (leave empty for default permissions)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Expiration (Optional)"}),e.jsx("input",{type:"datetime-local",value:N,onChange:J=>B(J.target.value),className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm focus:ring-1 focus:ring-primary focus:border-primary outline-none"}),e.jsx("p",{className:"text-text-secondary text-xs mt-2",children:"Leave empty for no expiration"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>{m(!1),y(""),v(""),B("")},className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{if(!x.trim()){alert("Please select a parent user");return}_e.mutate({parent_user:x.trim(),policy:p.trim()||void 0,expiration:N?new Date(N).toISOString():void 0})},disabled:_e.isPending||!x.trim(),className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:_e.isPending?"Creating...":"Create Access Key"})]})]})]})}),L&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-red-500/10 rounded-lg",children:e.jsx(_l,{className:"text-red-400",size:24})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-lg font-bold",children:"Delete User"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"This action cannot be undone"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("p",{className:"text-white text-sm mb-2",children:["Are you sure you want to delete user ",e.jsx("span",{className:"font-mono font-semibold text-primary",children:L}),"?"]}),e.jsx("p",{className:"text-text-secondary text-xs",children:"All access keys associated with this user will also be deleted. This action cannot be undone."})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>K(null),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:()=>{ye.mutate(L),K(null)},disabled:ye.isPending,className:"px-4 py-2 bg-red-500 hover:bg-red-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[e.jsx(es,{size:16}),ye.isPending?"Deleting...":"Delete User"]})]})]})}),M&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-red-500/10 rounded-lg",children:e.jsx(_l,{className:"text-red-400",size:24})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-white text-lg font-bold",children:"Delete Access Key"}),e.jsx("p",{className:"text-text-secondary text-sm",children:"This action cannot be undone"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("p",{className:"text-white text-sm mb-2",children:["Are you sure you want to delete access key ",e.jsx("span",{className:"font-mono font-semibold text-primary",children:M}),"?"]}),e.jsx("p",{className:"text-text-secondary text-xs",children:"Applications using this access key will lose access immediately. This action cannot be undone."})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>V(null),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:()=>{xe.mutate(M),V(null)},disabled:xe.isPending,className:"px-4 py-2 bg-red-500 hover:bg-red-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[e.jsx(es,{size:16}),xe.isPending?"Deleting...":"Delete Key"]})]})]})}),g&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-lg w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Access Key Created"}),e.jsx("button",{onClick:()=>{j(null),w(!1)},className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-orange-500/10 border border-orange-500/20 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(_l,{className:"text-orange-400 mt-0.5",size:20}),e.jsxs("div",{children:[e.jsx("p",{className:"text-orange-400 text-sm font-medium mb-1",children:"Important"}),e.jsx("p",{className:"text-orange-300 text-xs",children:"Save these credentials now. The secret key will not be shown again."})]})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Access Key"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:g.access_key,readOnly:!0,className:"flex-1 bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm font-mono"}),e.jsx("button",{onClick:()=>te(g.access_key,"Access Key"),className:"px-3 py-2 bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg text-white text-sm transition-colors",children:e.jsx(so,{size:16})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Secret Key"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx("input",{type:_?"text":"password",value:g.secret_key||"",readOnly:!0,className:"w-full bg-[#233648] border border-border-dark rounded-lg px-4 py-2 pr-10 text-white text-sm font-mono"}),e.jsx("button",{type:"button",onClick:()=>w(!_),className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-white",children:_?e.jsx(bv,{size:18}):e.jsx(Db,{size:18})})]}),e.jsx("button",{onClick:()=>te(g.secret_key||"","Secret Key"),className:"px-3 py-2 bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg text-white text-sm transition-colors",children:e.jsx(so,{size:16})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-white text-sm font-medium mb-2",children:"Endpoint"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:r,readOnly:!0,className:"flex-1 bg-[#233648] border border-border-dark rounded-lg px-4 py-2 text-white text-sm font-mono"}),e.jsx("button",{onClick:()=>te(r,"Endpoint"),className:"px-3 py-2 bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg text-white text-sm transition-colors",children:e.jsx(so,{size:16})})]})]}),e.jsx("div",{className:"flex gap-3 justify-end pt-4",children:e.jsx("button",{onClick:()=>{j(null),w(!1)},className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors",children:"I've Saved These Credentials"})})]})]})})]})}const d_=9e3;function u_(){const[r,t]=Ce.useState("buckets"),[s,n]=Ce.useState(""),[o,l]=Ce.useState(1),[d,c]=Ce.useState(!1),[u,h]=Ce.useState(""),[m,x]=Ce.useState(""),[y,p]=Ce.useState(!1),[v,N]=Ce.useState(""),[B,g]=Ce.useState(!1),[j,_]=Ce.useState(!1),[w,L]=Ce.useState(""),[K,M]=Ce.useState(null),V=10,T=Nr(),{data:ne="localhost"}=dt({queryKey:["system-management-ip"],queryFn:ao.getManagementIPAddress,staleTime:300*1e3,retry:2}),Z=`http://${ne}:${d_}`,{data:U=[],isLoading:q}=dt({queryKey:["object-storage-buckets"],queryFn:Ea.listBuckets,refetchInterval:5e3,staleTime:0}),{data:F=[]}=dt({queryKey:["object-storage-setup-datasets"],queryFn:Ea.getAvailableDatasets,enabled:d}),{data:le}=dt({queryKey:["object-storage-current-setup"],queryFn:Ea.getCurrentSetup}),ae=ft({mutationFn:({poolName:re,datasetName:Ae,createNew:oe})=>le?Ea.updateObjectStorage(re,Ae,oe):Ea.setupObjectStorage(re,Ae,oe),onSuccess:re=>{T.invalidateQueries({queryKey:["object-storage-current-setup"]}),T.invalidateQueries({queryKey:["object-storage-buckets"]}),c(!1),alert(le?`Object storage dataset updated successfully!
${re.message}
⚠️ IMPORTANT: Existing data in the previous dataset is NOT automatically migrated. You may need to manually migrate data or restart MinIO service to use the new dataset.`:"Object storage setup completed successfully!")},onError:re=>{alert(re.response?.data?.error||`Failed to ${le?"update":"setup"} object storage`)}}),se=ft({mutationFn:re=>Ea.createBucket(re),onMutate:async re=>{await T.cancelQueries({queryKey:["object-storage-buckets"]});const Ae=T.getQueryData(["object-storage-buckets"]);return T.setQueryData(["object-storage-buckets"],(oe=[])=>{const ce={name:re,creation_date:new Date().toISOString(),size:0,objects:0,access_policy:"private"};return[...oe,ce]}),_(!1),L(""),{previousBuckets:Ae}},onError:(re,Ae,oe)=>{oe?.previousBuckets&&T.setQueryData(["object-storage-buckets"],oe.previousBuckets),_(!0),alert(re.response?.data?.error||"Failed to create bucket")},onSuccess:()=>{T.invalidateQueries({queryKey:["object-storage-buckets"]}),alert("Bucket created successfully!")},onSettled:()=>{T.invalidateQueries({queryKey:["object-storage-buckets"]})}}),fe=ft({mutationFn:re=>Ea.deleteBucket(re),onSuccess:()=>{T.invalidateQueries({queryKey:["object-storage-buckets"]}),M(null),alert("Bucket deleted successfully!")},onError:re=>{alert(re.response?.data?.error||"Failed to delete bucket")}}),ye=U.map(re=>({...re,usage:re.size||0,objects:re.objects||0,accessPolicy:re.access_policy||"private"})),_e=ye.filter(re=>re.name.toLowerCase().includes(s.toLowerCase())),xe=Math.ceil(_e.length/V),D=_e.slice((o-1)*V,o*V),$=ye.reduce((re,Ae)=>re+Ae.usage,0),X=ye.reduce((re,Ae)=>re+Ae.objects,0),te=re=>re.accessPolicy==="public-read"||re.accessPolicy==="public-read-write"?e.jsx(u4,{className:"text-orange-500",size:20}):e.jsx(h4,{className:"text-purple-500",size:20}),J=re=>re==="public-read-write"?e.jsx("span",{className:"inline-flex items-center rounded-full bg-red-500/10 px-2.5 py-0.5 text-xs font-medium text-red-500 border border-red-500/20",children:"Public Read/Write"}):re==="public-read"?e.jsx("span",{className:"inline-flex items-center rounded-full bg-orange-500/10 px-2.5 py-0.5 text-xs font-medium text-orange-500 border border-orange-500/20",children:"Public Read"}):e.jsx("span",{className:"inline-flex items-center rounded-full bg-green-500/10 px-2.5 py-0.5 text-xs font-medium text-green-500 border border-green-500/20",children:"Private"}),O=re=>new Date(re).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),H=async(re,Ae)=>{try{await navigator.clipboard.writeText(re),alert(`${Ae} copied to clipboard!`)}catch(oe){console.error(`Failed to copy ${Ae}:`,oe);const ce=document.createElement("textarea");ce.value=re,ce.style.position="fixed",ce.style.left="-999999px",document.body.appendChild(ce),ce.select();try{document.execCommand("copy"),alert(`${Ae} copied to clipboard!`)}catch{alert(`Failed to copy. ${Ae}: ${re}`)}document.body.removeChild(ce)}};return e.jsxs("div",{className:"flex flex-col h-full bg-[#0f1720]",children:[e.jsx("main",{className:"flex-1 flex flex-col overflow-y-auto relative scroll-smooth",children:e.jsxs("div",{className:"flex flex-col max-w-[1200px] w-full mx-auto p-6 md:p-8 lg:p-12 gap-8",children:[e.jsxs("div",{className:"flex flex-wrap justify-between items-start gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h1",{className:"text-white tracking-tight text-[32px] font-bold leading-tight",children:"Object Storage Service"}),e.jsx("p",{className:"text-text-secondary text-sm font-normal max-w-xl",children:"Manage S3-compatible buckets, configure access policies, and monitor real-time object storage performance."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{onClick:async()=>{g(!0);try{await T.invalidateQueries({queryKey:["object-storage-buckets"]}),await T.refetchQueries({queryKey:["object-storage-buckets"]}),await new Promise(re=>setTimeout(re,300)),alert("Buckets refreshed successfully!")}catch(re){console.error("Failed to refresh buckets:",re),alert("Failed to refresh buckets. Please try again.")}finally{g(!1)}},disabled:q||B,className:"flex h-10 items-center justify-center rounded-lg border border-border-dark px-4 text-white text-sm font-medium hover:bg-[#233648] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh buckets list",children:[e.jsx(Cn,{className:`mr-2 ${B?"animate-spin":""}`,size:20}),B?"Refreshing...":"Refresh Buckets"]}),le?e.jsxs("button",{onClick:()=>c(!0),className:"flex h-10 items-center justify-center rounded-lg bg-orange-500 px-4 text-white text-sm font-medium hover:bg-orange-600 transition-colors",children:[e.jsx(vc,{className:"mr-2",size:20}),"Change Dataset"]}):e.jsxs("button",{onClick:()=>c(!0),className:"flex h-10 items-center justify-center rounded-lg bg-primary px-4 text-white text-sm font-medium hover:bg-blue-600 transition-colors",children:[e.jsx(Ks,{className:"mr-2",size:20}),"Setup Object Storage"]}),e.jsxs("button",{className:"flex h-10 items-center justify-center rounded-lg border border-border-dark px-4 text-white text-sm font-medium hover:bg-[#233648] transition-colors",children:[e.jsx(A4,{className:"mr-2",size:20}),"Documentation"]}),e.jsxs("button",{className:"flex h-10 items-center justify-center rounded-lg bg-[#233648] px-4 text-white text-sm font-medium hover:bg-[#2b4055] transition-colors border border-border-dark",children:[e.jsx(vc,{className:"mr-2",size:20}),"Config"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg p-5 border border-border-dark bg-[#1c2936]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Service Status"}),e.jsx(su,{className:"text-[#0bda5b]",size:20})]}),e.jsx("p",{className:"text-white tracking-tight text-2xl font-bold",children:"Running"}),e.jsx("p",{className:"text-text-secondary text-xs",children:"Port 9000 (TLS Enabled)"})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg p-5 border border-border-dark bg-[#1c2936]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Total Usage"}),e.jsx(Ul,{className:"text-primary",size:20})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("p",{className:"text-white tracking-tight text-2xl font-bold",children:fr($,1)}),e.jsx("p",{className:"text-[#0bda5b] text-sm font-medium",children:"+2.1%"})]}),e.jsx("div",{className:"w-full bg-[#233648] rounded-full h-1.5 mt-1",children:e.jsx("div",{className:"bg-primary h-1.5 rounded-full",style:{width:"45%"}})})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg p-5 border border-border-dark bg-[#1c2936]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Object Count"}),e.jsx(_y,{className:"text-blue-400",size:20})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("p",{className:"text-white tracking-tight text-2xl font-bold",children:[(X/1e6).toFixed(1),"M"]}),e.jsx("p",{className:"text-[#0bda5b] text-sm font-medium",children:"+0.5%"})]}),e.jsx("p",{className:"text-text-secondary text-xs",children:"Total objects across all buckets"})]}),e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg p-5 border border-border-dark bg-[#1c2936]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-text-secondary text-sm font-medium",children:"Uptime"}),e.jsx(Ec,{className:"text-green-400",size:20})]}),e.jsx("p",{className:"text-white tracking-tight text-2xl font-bold",children:"99.9%"}),e.jsx("p",{className:"text-text-secondary text-xs",children:"Last 30 days"})]})]}),e.jsx("div",{className:"border-b border-border-dark",children:e.jsxs("div",{className:"flex gap-8 px-2",children:[e.jsxs("button",{onClick:()=>t("buckets"),className:`flex items-center gap-2 border-b-2 pb-3 pt-2 transition-colors ${r==="buckets"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx(c4,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Buckets"})]}),e.jsxs("button",{onClick:()=>t("browse"),className:`flex items-center gap-2 border-b-2 pb-3 pt-2 transition-colors ${r==="browse"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx(au,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Browse"})]}),e.jsxs("button",{onClick:()=>t("users"),className:`flex items-center gap-2 border-b-2 pb-3 pt-2 transition-colors ${r==="users"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx(Vd,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Users & Keys"})]}),e.jsxs("button",{onClick:()=>t("monitoring"),className:`flex items-center gap-2 border-b-2 pb-3 pt-2 transition-colors ${r==="monitoring"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx(Wm,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Monitoring"})]}),e.jsxs("button",{onClick:()=>t("settings"),className:`flex items-center gap-2 border-b-2 pb-3 pt-2 transition-colors ${r==="settings"?"border-primary text-white":"border-transparent text-text-secondary hover:text-white"}`,children:[e.jsx(fp,{size:20}),e.jsx("span",{className:"text-sm font-bold",children:"Settings"})]})]})}),r==="browse"&&e.jsx(h_,{S3_ENDPOINT:Z}),r==="buckets"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(io,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-text-secondary",size:18}),e.jsx("input",{type:"text",placeholder:"Filter buckets...",value:s,onChange:re=>{n(re.target.value),l(1)},className:"w-full pl-10 pr-4 py-2 bg-[#1c2936] border border-border-dark rounded-lg text-white placeholder-text-secondary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"})]}),e.jsxs("button",{onClick:()=>_(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary text-white rounded-lg hover:bg-blue-600 transition-colors font-medium",children:[e.jsx(Ks,{size:18}),"Create Bucket"]})]}),e.jsxs("div",{className:"rounded-lg border border-border-dark bg-[#1c2936] overflow-hidden",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[#233648] border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Name"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Usage"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Objects"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Access Policy"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Created"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:q?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-6 py-8 text-center text-text-secondary",children:"Loading buckets..."})}):D.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-6 py-8 text-center text-text-secondary",children:s?"No buckets found matching your search.":"No buckets yet. Create your first bucket to get started."})}):D.map(re=>e.jsxs("tr",{className:"hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[te(re),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-white font-medium",children:re.name}),e.jsx("span",{className:"text-text-secondary text-xs",children:"standard"})]})]})}),e.jsx("td",{className:"px-6 py-4 text-white",children:fr(re.usage,1)}),e.jsx("td",{className:"px-6 py-4 text-white",children:re.objects}),e.jsx("td",{className:"px-6 py-4",children:J(re.accessPolicy)}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:O(re.creation_date)}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsxs("button",{onClick:()=>H(re.name,"Bucket Name"),className:"px-3 py-1.5 text-xs font-medium text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors flex items-center gap-1.5",title:"Copy Bucket Name",children:[e.jsx(so,{size:14}),"Copy Name"]}),e.jsxs("button",{onClick:()=>H(`${Z}/${re.name}`,"Bucket Endpoint"),className:"px-3 py-1.5 text-xs font-medium text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors flex items-center gap-1.5",title:"Copy Bucket Endpoint",children:[e.jsx(d4,{size:14}),"Copy Endpoint"]}),e.jsxs("button",{onClick:()=>M(re.name),disabled:fe.isPending,className:"px-3 py-1.5 text-xs font-medium text-red-400 hover:bg-red-500/10 border border-red-500/20 rounded-lg transition-colors flex items-center gap-1.5 disabled:opacity-50",title:"Delete Bucket",children:[e.jsx(es,{size:14}),fe.isPending?"Deleting...":"Delete"]})]})})]},re.name))})]})}),xe>1&&e.jsxs("div",{className:"px-6 py-4 border-t border-border-dark flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-text-secondary",children:["Showing ",(o-1)*V+1," to ",Math.min(o*V,_e.length)," of ",_e.length," buckets"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>l(re=>Math.max(1,re-1)),disabled:o===1,className:"px-3 py-1.5 text-sm text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Previous"}),e.jsx("button",{onClick:()=>l(re=>Math.min(xe,re+1)),disabled:o===xe,className:"px-3 py-1.5 text-sm text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]})]})]})}),r==="users"&&e.jsx(c_,{S3_ENDPOINT:Z}),r==="monitoring"&&e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:[e.jsx(Wm,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Monitoring dashboard coming soon"})]}),r==="settings"&&e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-8 text-center",children:[e.jsx(vc,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Settings configuration coming soon"})]})]})}),j&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Create New Bucket"}),e.jsx("button",{onClick:()=>{_(!1),L("")},className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Bucket Name"}),e.jsx("input",{type:"text",value:w,onChange:re=>L(re.target.value),placeholder:"Enter bucket name",className:"w-full px-4 py-2 bg-[#233648] border border-border-dark rounded-lg text-white placeholder-text-secondary focus:outline-none focus:ring-2 focus:ring-primary",onKeyDown:re=>{re.key==="Enter"&&w.trim()&&se.mutate(w.trim())}}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:"Bucket names must be unique and follow S3 naming conventions"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>{_(!1),L("")},className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{w.trim()&&se.mutate(w.trim())},disabled:!w.trim()||se.isPending,className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:se.isPending?"Creating...":"Create Bucket"})]})]})]})}),K&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Confirm Delete Bucket"}),e.jsx("button",{onClick:()=>M(null),className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(_l,{className:"text-red-400 mt-0.5",size:20}),e.jsxs("div",{children:[e.jsx("p",{className:"text-red-400 text-sm font-medium mb-1",children:"Warning"}),e.jsxs("p",{className:"text-red-300 text-xs",children:['This action cannot be undone. All objects within the bucket "',K,'" will be permanently deleted.']})]})]})}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>M(null),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{fe.mutate(K),M(null)},disabled:fe.isPending,className:"px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:fe.isPending?"Deleting...":"Delete Bucket"})]})]})]})}),d&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#1c2936] border border-border-dark rounded-lg p-6 max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:le?"Change Object Storage Dataset":"Setup Object Storage"}),e.jsx("button",{onClick:()=>c(!1),className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Select Pool"}),e.jsxs("select",{value:u,onChange:re=>{h(re.target.value),x("")},className:"w-full px-4 py-2 bg-[#233648] border border-border-dark rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-primary",children:[e.jsx("option",{value:"",children:"Select a pool..."}),F.map(re=>e.jsx("option",{value:re.pool_id,children:re.pool_name},re.pool_id))]})]}),u&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Select Dataset"}),e.jsxs("div",{className:"space-y-2 mb-3",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",checked:!y,onChange:()=>{p(!1),N("")},className:"text-primary"}),e.jsx("span",{className:"text-white text-sm",children:"Use existing dataset"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",checked:y,onChange:()=>p(!0),className:"text-primary"}),e.jsx("span",{className:"text-white text-sm",children:"Create new dataset"})]})]}),y?e.jsx("input",{type:"text",value:v,onChange:re=>N(re.target.value),placeholder:"Enter new dataset name",className:"w-full px-4 py-2 bg-[#233648] border border-border-dark rounded-lg text-white placeholder-text-secondary focus:outline-none focus:ring-2 focus:ring-primary"}):e.jsxs("select",{value:m,onChange:re=>x(re.target.value),className:"w-full px-4 py-2 bg-[#233648] border border-border-dark rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-primary",children:[e.jsx("option",{value:"",children:"Select a dataset..."}),F.find(re=>re.pool_id===u)?.datasets.map(re=>e.jsxs("option",{value:re.name,children:[re.name," ",re.mount_point&&`(${re.mount_point})`]},re.id))]})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>c(!1),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-border-dark hover:bg-[#233648] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{const re=F.find(oe=>oe.pool_id===u);if(!re)return;const Ae=y?v:m;if(!Ae.trim()){alert("Please select or enter a dataset name");return}ae.mutate({poolName:re.pool_name,datasetName:Ae.trim(),createNew:y})},disabled:!u||!y&&!m||y&&!v.trim()||ae.isPending,className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:ae.isPending?"Setting up...":le?"Update Configuration":"Setup Object Storage"})]})]})]})})]})}function h_({S3_ENDPOINT:r}){const[t,s]=Ce.useState(null),[n,o]=Ce.useState(""),l=Nr(),{data:d=[]}=dt({queryKey:["object-storage-buckets"],queryFn:Ea.listBuckets,refetchInterval:5e3,staleTime:0}),{data:c=[],isLoading:u}=dt({queryKey:["object-storage-objects",t,n],queryFn:()=>t?Ea.listObjects(t,n||void 0):Promise.resolve([]),enabled:!!t,refetchInterval:5e3,staleTime:0}),h=v=>{o(v)},m=()=>{if(!n){s(null);return}const v=n.split("/").filter(N=>N);v.length>0?(v.pop(),o(v.length>0?v.join("/")+"/":"")):o("")},x=()=>{const v=[{name:t||"",path:""}];if(n){const N=n.split("/").filter(g=>g);let B="";N.forEach(g=>{B+=g+"/",v.push({name:g,path:B})})}return v},y=v=>v?new Date(v).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-";if(!t)return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("h2",{className:"text-white text-xl font-semibold",children:"Select a Bucket to Browse"})}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(v=>e.jsxs("button",{onClick:()=>s(v.name),className:"flex flex-col gap-3 p-6 rounded-lg border border-border-dark bg-[#1c2936] hover:bg-[#233648] transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(au,{className:"text-primary",size:24}),e.jsx("span",{className:"text-white font-medium",children:v.name})]}),v.access_policy==="public-read"||v.access_policy==="public-read-write"?e.jsx(u4,{className:"text-orange-500",size:18}):e.jsx(h4,{className:"text-purple-500",size:18})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-text-secondary",children:fr(v.size,1)}),e.jsxs("span",{className:"text-text-secondary",children:[v.objects," objects"]})]})]},v.name))}),d.length===0&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx(au,{className:"mx-auto text-text-secondary mb-4",size:48}),e.jsx("p",{className:"text-text-secondary",children:"No buckets available"})]})]});const p=x();return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("button",{onClick:()=>{s(null),o("")},className:"flex items-center gap-2 px-3 py-1.5 text-sm text-text-secondary hover:text-white transition-colors rounded-lg hover:bg-[#233648]",children:[e.jsx(wc,{size:16}),"Back to Buckets"]}),e.jsx(Ka,{className:"text-text-secondary",size:16}),p.map((v,N)=>e.jsxs("div",{className:"flex items-center gap-2",children:[N>0&&e.jsx(Ka,{className:"text-text-secondary",size:16}),e.jsx("button",{onClick:()=>{o(N===0?"":v.path)},className:`px-3 py-1.5 text-sm rounded-lg transition-colors ${N===p.length-1?"text-white bg-[#233648]":"text-text-secondary hover:text-white hover:bg-[#233648]"}`,children:v.name||"root"})]},N))]}),e.jsxs("button",{onClick:()=>{l.invalidateQueries({queryKey:["object-storage-objects",t,n]})},className:"flex items-center gap-2 px-4 py-2 text-sm text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors",children:[e.jsx(Cn,{size:16}),"Refresh"]})]}),e.jsx("div",{className:"rounded-lg border border-border-dark bg-[#1c2936] overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[#233648] border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Name"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Size"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Last Modified"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",children:"Actions"})]})}),e.jsxs("tbody",{className:"divide-y divide-border-dark",children:[n&&e.jsxs("tr",{className:"hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("button",{onClick:m,className:"flex items-center gap-2 text-white hover:text-primary transition-colors",children:[e.jsx(wc,{size:16}),e.jsx("span",{children:".."})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:"-"}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:"-"}),e.jsx("td",{className:"px-6 py-4"})]}),u?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-6 py-8 text-center text-text-secondary",children:"Loading..."})}):c.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-6 py-8 text-center text-text-secondary",children:n?"This folder is empty":"This bucket is empty"})}):c.map(v=>e.jsxs("tr",{className:"hover:bg-[#233648] transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:v.is_dir?e.jsxs("button",{onClick:()=>h(v.key),className:"flex items-center gap-2 text-white hover:text-primary transition-colors",children:[e.jsx(c4,{className:"text-primary",size:18}),e.jsx("span",{children:v.name})]}):e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(L6,{className:"text-text-secondary",size:18}),e.jsx("span",{children:v.name})]})}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:v.is_dir?"-":fr(v.size,1)}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:y(v.last_modified)}),e.jsx("td",{className:"px-6 py-4 text-right",children:!v.is_dir&&e.jsx("div",{className:"flex items-center justify-end gap-2",children:e.jsxs("button",{onClick:()=>{const N=`${r}/${t}/${v.key}`;f_(N,"Object URL")},className:"px-3 py-1.5 text-xs font-medium text-white bg-[#233648] hover:bg-[#2b4055] border border-border-dark rounded-lg transition-colors flex items-center gap-1.5",title:"Copy URL",children:[e.jsx(d4,{size:14}),"Copy URL"]})})})]},v.key))]})]})})})]})}function f_(r,t){navigator.clipboard.writeText(r).then(()=>{alert(`${t} copied to clipboard!`)}).catch(()=>{alert(`Failed to copy. ${t}: ${r}`)})}function m_(){const[r,t]=Ce.useState("snapshots"),[s,n]=Ce.useState(""),[o,l]=Ce.useState(1),[d,c]=Ce.useState(!1),[u,h]=Ce.useState(!1),[m,x]=Ce.useState(!1),[y,p]=Ce.useState(null),[v,N]=Ce.useState({dataset:"",name:"",recursive:!1}),[B,g]=Ce.useState({name:"",dataset:"",snapshot_name_template:"auto-%Y-%m-%d-%H%M",schedule_type:"daily",schedule_config:{time:"00:00"},recursive:!1}),[j,_]=Ce.useState(""),[w,L]=Ce.useState(null),[K,M]=Ce.useState(null),V=10,T=Nr(),[ne,Z]=Ce.useState({name:"",direction:"outbound",source_dataset:"",target_host:"",target_port:22,target_user:"root",target_dataset:"",source_host:"",source_port:22,source_user:"root",local_dataset:"",schedule_type:"daily",schedule_config:{time:"00:00"},compression:"lz4",recursive:!1,incremental:!0,auto_snapshot:!0,encryption:!1,enabled:!0}),[U,q]=Ce.useState(null),{data:F=[]}=dt({queryKey:["replication-pools"],queryFn:sn.listPools}),{data:le=[],isLoading:ae,refetch:se}=dt({queryKey:["snapshots",j],queryFn:()=>$u.listSnapshots(j||void 0),refetchInterval:5e3,staleTime:0}),{data:fe=[],isLoading:ye,refetch:_e}=dt({queryKey:["snapshot-schedules"],queryFn:eh.listSchedules,refetchInterval:5e3,staleTime:0}),{data:xe=[],isLoading:D,refetch:$}=dt({queryKey:["replication-tasks"],queryFn:()=>th.listTasks(),refetchInterval:5e3,staleTime:0}),X=xe.filter(k=>k.direction==="outbound"),te=xe.filter(k=>k.direction==="inbound"),[J,O]=Ce.useState([]),H=async k=>{try{const G=F.find(Ue=>Ue.name===k||Ue.id===k);if(!G||J.find(Ue=>Ue.pool===k||Ue.pool===G.id||Ue.pool===G.name))return;const be=await sn.listDatasets(G.id);O(Ue=>[...Ue.filter(He=>He.pool!==k&&He.pool!==G.id&&He.pool!==G.name),{pool:G.name,datasets:be}])}catch(G){console.error("Failed to fetch datasets:",G)}},re=async()=>{if(F.length!==0)for(const k of F)try{if(J.find(be=>be.pool===k.name||be.pool===k.id))continue;const me=await sn.listDatasets(k.id);O(be=>[...be.filter(Re=>Re.pool!==k.name&&Re.pool!==k.id),{pool:k.name,datasets:me}])}catch(G){console.error(`Failed to fetch datasets for pool ${k.name}:`,G)}};Ce.useEffect(()=>{u&&F.length>0&&re()},[u,F.length]),Ce.useEffect(()=>{m&&F.length>0&&re()},[m,F.length]),Ce.useEffect(()=>{y?g({name:y.name,dataset:y.dataset,snapshot_name_template:y.snapshot_name_template,schedule_type:y.schedule_type,schedule_config:y.schedule_config,recursive:y.recursive,retention_count:y.retention_count,retention_days:y.retention_days}):m||g({name:"",dataset:"",snapshot_name_template:"auto-%Y-%m-%d-%H%M",schedule_type:"daily",schedule_config:{time:"00:00"},recursive:!1})},[y,m]);const Ae=ft({mutationFn:k=>$u.createSnapshot(k),onSuccess:async()=>{h(!1),N({dataset:"",name:"",recursive:!1}),await T.invalidateQueries({queryKey:["snapshots"]}),await se(),alert("Snapshot created successfully!")},onError:k=>{alert(k.response?.data?.error||"Failed to create snapshot")}}),oe=ft({mutationFn:({name:k,recursive:G})=>$u.deleteSnapshot(k,G),onSuccess:()=>{T.invalidateQueries({queryKey:["snapshots"]}),L(null),alert("Snapshot deleted successfully!")},onError:k=>{alert(k.response?.data?.error||"Failed to delete snapshot")}}),ce=ft({mutationFn:({name:k,force:G})=>$u.rollbackSnapshot(k,G),onSuccess:()=>{T.invalidateQueries({queryKey:["snapshots"]}),M(null),alert("Snapshot rollback completed successfully!")},onError:k=>{alert(k.response?.data?.error||"Failed to rollback snapshot")}}),Se=le.filter(k=>k.name.toLowerCase().includes(s.toLowerCase())||k.dataset.toLowerCase().includes(s.toLowerCase())||k.snapshot_name.toLowerCase().includes(s.toLowerCase())),z=Math.ceil(Se.length/V),ie=Se.slice((o-1)*V,o*V),W=le.length,Q=le.reduce((k,G)=>k+G.referenced,0),I=k=>new Date(k).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"});return e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col bg-background-dark",children:[e.jsxs("header",{className:"flex items-center justify-between px-8 py-5 border-b border-[#233648] bg-background-dark shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ba,{to:"/storage",className:"text-text-secondary hover:text-white text-sm font-medium transition-colors",children:"Storage"}),e.jsx(Ka,{className:"text-[#536b85]",size:16}),e.jsx(ba,{to:"/storage",className:"text-text-secondary hover:text-white text-sm font-medium transition-colors",children:"Pools"}),e.jsx(Ka,{className:"text-[#536b85]",size:16}),e.jsx("span",{className:"text-white text-sm font-bold bg-[#1e2936] px-2 py-1 rounded",children:"Data Protection"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("button",{className:"flex items-center justify-center w-8 h-8 rounded-full hover:bg-[#1e2936] text-text-secondary transition-colors relative",children:[e.jsx(_l,{size:20}),e.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 bg-red-500 rounded-full border border-background-dark"})]}),e.jsx("button",{className:"flex items-center justify-center w-8 h-8 rounded-full hover:bg-[#1e2936] text-text-secondary transition-colors",children:e.jsx(pp,{size:20})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-8 custom-scrollbar",children:e.jsxs("div",{className:"mx-auto max-w-[1200px] flex flex-col gap-8",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h1",{className:"text-white text-3xl font-extrabold tracking-tight",children:"Snapshots & Replication"}),e.jsx("p",{className:"text-text-secondary text-base font-normal max-w-2xl",children:"Manage local ZFS snapshots and configure remote replication tasks to ensure data redundancy and disaster recovery."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{className:"px-4 py-2 bg-[#1e2936] hover:bg-[#2a3b4d] text-white text-sm font-bold rounded-lg border border-[#324d67] transition-all flex items-center gap-2",children:[e.jsx(hp,{size:18}),"View Logs"]}),e.jsxs("button",{onClick:()=>{r==="replication"?c(!0):r==="schedules"?(p(null),x(!0)):h(!0)},className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-bold rounded-lg shadow-[0_4px_12px_rgba(19,127,236,0.3)] transition-all flex items-center gap-2",children:[e.jsx(Ks,{size:18}),r==="replication"?"Create Replication":r==="schedules"?"Create Schedule":"Create Snapshot"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-[#18232e] border border-[#2a3b4d] relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx(Tm,{className:"text-6xl text-primary"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Total Snapshots"}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:W.toLocaleString()}),e.jsxs("span",{className:"text-emerald-400 text-sm font-medium mb-1 flex items-center",children:[e.jsx(T6,{size:14,className:"mr-0.5"}),"+12 today"]})]}),e.jsxs("p",{className:"text-[#536b85] text-xs font-medium mt-1",children:[fr(Q,1)," Reclaimable Space"]})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-[#18232e] border border-[#2a3b4d] relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx(Cn,{className:"text-6xl text-emerald-500"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Last Replication"}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:"Success"})}),e.jsx("p",{className:"text-[#536b85] text-xs font-medium mt-1",children:"15 mins ago • tank/backup"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-xl p-5 bg-[#18232e] border border-[#2a3b4d] relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity",children:e.jsx(Ec,{className:"text-6xl text-purple-500"})}),e.jsx("p",{className:"text-text-secondary text-sm font-medium uppercase tracking-wider",children:"Next Scheduled"}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx("p",{className:"text-white text-3xl font-bold tracking-tight",children:"10:00 PM"})}),e.jsx("p",{className:"text-[#536b85] text-xs font-medium mt-1",children:"Daily Offsite Backup"})]})]}),e.jsxs("div",{className:"flex flex-col bg-[#18232e] border border-[#2a3b4d] rounded-xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"flex border-b border-[#2a3b4d] bg-[#151f29]",children:[e.jsxs("button",{onClick:()=>t("snapshots"),className:`px-6 py-4 text-sm font-bold flex items-center gap-2 transition-colors ${r==="snapshots"?"text-white border-b-2 border-primary bg-[#18232e]":"text-text-secondary hover:text-white border-b-2 border-transparent hover:bg-[#18232e]"}`,children:[e.jsx(Tm,{size:20}),"Snapshots"]}),e.jsxs("button",{onClick:()=>t("schedules"),className:`px-6 py-4 text-sm font-bold flex items-center gap-2 transition-colors ${r==="schedules"?"text-white border-b-2 border-primary bg-[#18232e]":"text-text-secondary hover:text-white border-b-2 border-transparent hover:bg-[#18232e]"}`,children:[e.jsx(Ec,{size:20}),"Schedules",fe.length>0&&e.jsx("span",{className:"ml-1 bg-[#2a3b4d] text-white text-[10px] px-1.5 py-0.5 rounded-full",children:fe.length})]}),e.jsxs("button",{onClick:()=>t("replication"),className:`px-6 py-4 text-sm font-bold flex items-center gap-2 transition-colors ${r==="replication"?"text-white border-b-2 border-primary bg-[#18232e]":"text-text-secondary hover:text-white border-b-2 border-transparent hover:bg-[#18232e]"}`,children:[e.jsx(Xx,{size:20}),"Replication Tasks",xe.length>0&&e.jsx("span",{className:"ml-1 bg-[#2a3b4d] text-white text-[10px] px-1.5 py-0.5 rounded-full",children:xe.length})]}),e.jsxs("button",{onClick:()=>t("restore"),className:`px-6 py-4 text-sm font-bold flex items-center gap-2 transition-colors ${r==="restore"?"text-white border-b-2 border-primary bg-[#18232e]":"text-text-secondary hover:text-white border-b-2 border-transparent hover:bg-[#18232e]"}`,children:[e.jsx(Im,{size:20}),"Restore Points"]})]}),e.jsxs("div",{className:"p-4 flex flex-col sm:flex-row gap-4 justify-between items-center border-b border-[#2a3b4d] bg-[#18232e]",children:[e.jsxs("div",{className:"relative w-full sm:w-96 group",children:[e.jsx(io,{className:"absolute left-3 top-2.5 text-[#536b85] group-focus-within:text-primary transition-colors",size:20}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] text-white text-sm rounded-lg pl-10 pr-4 py-2.5 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all placeholder-[#536b85]",placeholder:"Search snapshot name or dataset...",type:"text",value:s,onChange:k=>n(k.target.value)})]}),e.jsxs("div",{className:"flex gap-3 w-full sm:w-auto",children:[e.jsx("div",{className:"relative group",children:e.jsxs("select",{className:"flex items-center gap-2 px-4 py-2.5 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-sm font-medium text-text-secondary hover:text-white hover:border-[#536b85] transition-all appearance-none cursor-pointer",value:j,onChange:k=>{_(k.target.value),l(1)},children:[e.jsx("option",{value:"",children:"Dataset: All"}),Array.from(new Set(le.map(k=>k.dataset))).map(k=>e.jsx("option",{value:k,children:k},k))]})}),e.jsx("div",{className:"relative group",children:e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2.5 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-sm font-medium text-text-secondary hover:text-white hover:border-[#536b85] transition-all",children:[e.jsx(l4,{size:18}),"Date Range"]})})]})]}),r==="snapshots"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-[#151f29] text-text-secondary",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] w-[50px]",children:e.jsx("input",{className:"w-4 h-4 rounded border-[#324d67] bg-[#111a22] text-primary focus:ring-offset-[#111a22]",type:"checkbox"})}),e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] text-xs font-bold uppercase tracking-wider",children:"Snapshot Name"}),e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] text-xs font-bold uppercase tracking-wider",children:"Dataset"}),e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] text-xs font-bold uppercase tracking-wider",children:"Created"}),e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] text-xs font-bold uppercase tracking-wider",children:"Referenced"}),e.jsx("th",{className:"p-4 border-b border-[#2a3b4d] text-xs font-bold uppercase tracking-wider text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"text-sm",children:ae?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-8 text-center text-text-secondary",children:"Loading snapshots..."})}):ie.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-8 text-center text-text-secondary",children:s?"No snapshots found matching your search.":"No snapshots yet. Create your first snapshot to get started."})}):ie.map(k=>e.jsxs("tr",{className:"group hover:bg-[#1e2936] transition-colors border-b border-[#2a3b4d]",children:[e.jsx("td",{className:"p-4",children:e.jsx("input",{className:"w-4 h-4 rounded border-[#324d67] bg-[#111a22] text-primary focus:ring-offset-[#111a22]",type:"checkbox"})}),e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Tm,{className:"text-[#536b85]",size:20}),e.jsx("span",{className:"text-white font-medium",children:k.snapshot_name}),k.is_latest&&e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-primary/20 text-primary border border-primary/20",children:"LATEST"})]})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:"text-text-secondary",children:k.dataset})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:"text-text-secondary",children:I(k.created)})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:"text-white font-mono",children:fr(k.referenced)})}),e.jsx("td",{className:"p-4 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:()=>M(k.name),className:"p-1.5 hover:bg-[#2a3b4d] rounded text-text-secondary hover:text-white",title:"Rollback",children:e.jsx(Im,{size:20})}),e.jsx("button",{onClick:()=>{const G=prompt(`Enter clone dataset name for ${k.snapshot_name}:`);G&&$u.cloneSnapshot(k.name,{clone_name:G}).then(()=>{T.invalidateQueries({queryKey:["snapshots"]}),alert("Snapshot cloned successfully!")}).catch(me=>{alert(me.response?.data?.error||"Failed to clone snapshot")})},className:"p-1.5 hover:bg-[#2a3b4d] rounded text-text-secondary hover:text-white",title:"Clone",children:e.jsx(so,{size:20})}),e.jsx("button",{onClick:()=>L(k.name),className:"p-1.5 hover:bg-red-500/20 rounded text-text-secondary hover:text-red-500",title:"Delete",children:e.jsx(es,{size:20})})]})})]},k.id))})]})}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#18232e]",children:[e.jsxs("p",{className:"text-text-secondary text-sm",children:["Showing ",e.jsxs("span",{className:"text-white font-bold",children:["1-",ie.length]})," of"," ",e.jsx("span",{className:"text-white font-bold",children:Se.length})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>l(k=>Math.max(1,k-1)),disabled:o===1,className:"px-3 py-1 text-sm rounded border border-[#2a3b4d] text-text-secondary hover:bg-[#2a3b4d] hover:text-white disabled:opacity-50",children:"Previous"}),Array.from({length:Math.min(3,z)},(k,G)=>G+1).map(k=>e.jsx("button",{onClick:()=>l(k),className:`px-3 py-1 text-sm rounded border border-[#2a3b4d] ${o===k?"text-white bg-[#2a3b4d]":"text-text-secondary hover:bg-[#2a3b4d] hover:text-white"}`,children:k},k)),z>3&&e.jsx("span",{className:"text-text-secondary",children:"..."}),e.jsx("button",{onClick:()=>l(k=>Math.min(z,k+1)),disabled:o===z,className:"px-3 py-1 text-sm rounded border border-[#2a3b4d] text-text-secondary hover:bg-[#2a3b4d] hover:text-white disabled:opacity-50",children:"Next"})]})]})]}),r==="schedules"&&e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Snapshot Schedules"}),e.jsxs("button",{onClick:()=>{p(null),x(!0)},className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-bold rounded-lg transition-colors",children:[e.jsx(Ks,{size:18}),"Create Schedule"]})]}),ye?e.jsx("div",{className:"text-center py-8 text-text-secondary",children:"Loading schedules..."}):fe.length===0?e.jsx("div",{className:"text-center py-8 text-text-secondary",children:"No schedules configured. Create your first schedule to automate snapshot creation."}):e.jsx("div",{className:"space-y-3",children:fe.map(k=>e.jsxs("div",{className:"flex items-center gap-4 bg-[#111a22] p-4 rounded-lg border border-[#2a3b4d] hover:bg-[#1e2936] transition-colors",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${k.enabled?"bg-emerald-500":"bg-gray-500"}`}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-white text-sm font-medium",children:k.name}),e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-[#2a3b4d] text-text-secondary",children:k.schedule_type})]}),e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Dataset: ",k.dataset," • Template: ",k.snapshot_name_template]}),k.next_run_at&&e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Next run: ",new Date(k.next_run_at).toLocaleString()]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:async()=>{try{await eh.toggleSchedule(k.id,!k.enabled),await T.invalidateQueries({queryKey:["snapshot-schedules"]}),await _e(),alert(`Schedule ${k.enabled?"disabled":"enabled"} successfully`)}catch(G){alert(G.response?.data?.error||"Failed to toggle schedule")}},className:`px-3 py-1 text-xs font-medium rounded transition-colors ${k.enabled?"bg-emerald-500/20 text-emerald-400 hover:bg-emerald-500/30":"bg-gray-500/20 text-gray-400 hover:bg-gray-500/30"}`,children:k.enabled?"Enabled":"Disabled"}),e.jsxs("button",{onClick:()=>{p(k),x(!0)},className:"flex items-center gap-1.5 px-3 py-1.5 hover:bg-[#2a3b4d] rounded text-text-secondary hover:text-white transition-colors border border-[#2a3b4d] hover:border-primary",title:"Edit Schedule",children:[e.jsx(Wd,{size:16}),e.jsx("span",{className:"text-xs font-medium",children:"Edit"})]}),e.jsx("button",{onClick:async()=>{if(confirm(`Delete schedule "${k.name}"?`))try{await eh.deleteSchedule(k.id),await T.invalidateQueries({queryKey:["snapshot-schedules"]}),await _e(),alert("Schedule deleted successfully")}catch(G){alert(G.response?.data?.error||"Failed to delete schedule")}},className:"p-1.5 hover:bg-red-500/20 rounded text-text-secondary hover:text-red-500 transition-colors",title:"Delete Schedule",children:e.jsx(es,{size:18})})]})]},k.id))})]}),r==="replication"&&e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("h3",{className:"text-white text-lg font-bold",children:"Replication Tasks"}),e.jsxs("button",{onClick:()=>{q(null),Z({name:"",direction:"outbound",source_dataset:"",target_host:"",target_port:22,target_user:"root",target_dataset:"",source_host:"",source_port:22,source_user:"root",local_dataset:"",schedule_type:"daily",schedule_config:{time:"00:00"},compression:"lz4",recursive:!1,incremental:!0,auto_snapshot:!0,encryption:!1,enabled:!0}),c(!0)},className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-bold rounded-lg transition-colors",children:[e.jsx(Ks,{size:18}),"Create Replication"]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Xx,{size:20,className:"text-primary"}),e.jsx("h4",{className:"text-white text-base font-bold",children:"Outbound Replication"}),e.jsx("span",{className:"text-text-secondary text-sm",children:"(Sending to remote)"})]}),D?e.jsx("div",{className:"text-center py-8 text-text-secondary",children:"Loading replication tasks..."}):X.length===0?e.jsx("div",{className:"text-center py-8 text-text-secondary bg-[#111a22] rounded-lg border border-[#2a3b4d]",children:"No outbound replication tasks configured."}):e.jsx("div",{className:"space-y-3",children:X.map(k=>e.jsxs("div",{className:"flex items-center gap-4 bg-[#111a22] p-4 rounded-lg border border-[#2a3b4d] hover:bg-[#1e2936] transition-colors",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${k.status==="running"?"bg-primary animate-pulse":k.status==="failed"?"bg-red-500":"bg-emerald-500"}`}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-white text-sm font-medium",children:k.name}),!k.enabled&&e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-gray-500/20 text-gray-400",children:"Disabled"})]}),e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Source: ",k.source_dataset," → Target: ",k.target_host,":",k.target_port," (",k.target_dataset,")"]}),k.last_run_at&&e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Last run: ",new Date(k.last_run_at).toLocaleString(),k.last_run_status&&e.jsxs("span",{className:`ml-2 ${k.last_run_status==="success"?"text-emerald-400":"text-red-400"}`,children:["(",k.last_run_status,")"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>{q(k),Z({name:k.name,direction:k.direction,source_dataset:k.source_dataset,target_host:k.target_host,target_port:k.target_port,target_user:k.target_user,target_dataset:k.target_dataset,source_host:k.source_host,source_port:k.source_port,source_user:k.source_user,local_dataset:k.local_dataset,schedule_type:k.schedule_type,schedule_config:k.schedule_config,compression:k.compression,recursive:k.recursive,incremental:k.incremental,auto_snapshot:k.auto_snapshot,encryption:k.encryption,enabled:k.enabled}),c(!0)},className:"p-1.5 hover:bg-[#2a3b4d] rounded text-text-secondary hover:text-white transition-colors",title:"Edit",children:e.jsx(Wd,{size:18})}),e.jsx("button",{onClick:async()=>{if(confirm(`Delete replication task "${k.name}"?`))try{await th.deleteTask(k.id),await T.invalidateQueries({queryKey:["replication-tasks"]}),await $(),alert("Replication task deleted successfully")}catch(G){alert(G.response?.data?.error||"Failed to delete replication task")}},className:"p-1.5 hover:bg-red-500/20 rounded text-text-secondary hover:text-red-500 transition-colors",title:"Delete",children:e.jsx(es,{size:18})})]})]},k.id))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Xx,{size:20,className:"text-emerald-500"}),e.jsx("h4",{className:"text-white text-base font-bold",children:"Inbound Replication"}),e.jsx("span",{className:"text-text-secondary text-sm",children:"(Receiving from remote)"})]}),D?e.jsx("div",{className:"text-center py-8 text-text-secondary",children:"Loading replication tasks..."}):te.length===0?e.jsx("div",{className:"text-center py-8 text-text-secondary bg-[#111a22] rounded-lg border border-[#2a3b4d]",children:"No inbound replication tasks configured."}):e.jsx("div",{className:"space-y-3",children:te.map(k=>e.jsxs("div",{className:"flex items-center gap-4 bg-[#111a22] p-4 rounded-lg border border-[#2a3b4d] hover:bg-[#1e2936] transition-colors",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${k.status==="running"?"bg-primary animate-pulse":k.status==="failed"?"bg-red-500":"bg-emerald-500"}`}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-white text-sm font-medium",children:k.name}),!k.enabled&&e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-gray-500/20 text-gray-400",children:"Disabled"})]}),e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Source: ",k.source_host,":",k.source_port," (",k.source_dataset,") → Local: ",k.local_dataset]}),k.last_run_at&&e.jsxs("p",{className:"text-[#536b85] text-xs mt-1",children:["Last run: ",new Date(k.last_run_at).toLocaleString(),k.last_run_status&&e.jsxs("span",{className:`ml-2 ${k.last_run_status==="success"?"text-emerald-400":"text-red-400"}`,children:["(",k.last_run_status,")"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>{q(k),Z({name:k.name,direction:k.direction,source_dataset:k.source_dataset,target_host:k.target_host,target_port:k.target_port,target_user:k.target_user,target_dataset:k.target_dataset,source_host:k.source_host,source_port:k.source_port,source_user:k.source_user,local_dataset:k.local_dataset,schedule_type:k.schedule_type,schedule_config:k.schedule_config,compression:k.compression,recursive:k.recursive,incremental:k.incremental,auto_snapshot:k.auto_snapshot,encryption:k.encryption,enabled:k.enabled}),c(!0)},className:"p-1.5 hover:bg-[#2a3b4d] rounded text-text-secondary hover:text-white transition-colors",title:"Edit",children:e.jsx(Wd,{size:18})}),e.jsx("button",{onClick:async()=>{if(confirm(`Delete replication task "${k.name}"?`))try{await th.deleteTask(k.id),await T.invalidateQueries({queryKey:["replication-tasks"]}),await $(),alert("Replication task deleted successfully")}catch(G){alert(G.response?.data?.error||"Failed to delete replication task")}},className:"p-1.5 hover:bg-red-500/20 rounded text-text-secondary hover:text-red-500 transition-colors",title:"Delete",children:e.jsx(es,{size:18})})]})]},k.id))})]})]}),r==="restore"&&e.jsxs("div",{className:"p-8 text-center",children:[e.jsx(Im,{className:"mx-auto mb-4 text-text-secondary",size:48}),e.jsx("p",{className:"text-text-secondary text-sm",children:"Restore points coming soon"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-[#18232e] border border-[#2a3b4d] rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-white font-bold text-lg",children:"Replication Status"}),e.jsx("a",{className:"text-primary text-sm font-bold hover:underline",href:"#",children:"Manage All"})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[xe.slice(0,3).map(k=>e.jsxs("div",{className:"flex items-center gap-4 bg-[#111a22] p-3 rounded-lg border border-[#2a3b4d]",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${k.status==="running"?"bg-primary animate-pulse":k.status==="failed"?"bg-red-500":"bg-emerald-500"}`}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-white text-sm font-medium",children:k.name}),e.jsx("p",{className:"text-[#536b85] text-xs",children:k.direction==="outbound"?`Target: ${k.target_host}:${k.target_port}`:`Source: ${k.source_host}:${k.source_port}`})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:`text-sm ${k.status==="running"?"text-primary font-bold":"text-text-secondary"}`,children:k.status==="running"?"Running":k.status}),k.last_run_at&&e.jsx("p",{className:"text-[#536b85] text-xs",children:new Date(k.last_run_at).toLocaleString()})]})]},k.id)),xe.length===0&&e.jsx("p",{className:"text-text-secondary text-sm text-center py-4",children:"No replication tasks"})]})]}),e.jsxs("div",{className:"bg-[#18232e] border border-[#2a3b4d] rounded-xl p-6 flex flex-col justify-center items-center text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mb-3",children:e.jsx(_l,{className:"text-primary text-2xl"})}),e.jsx("h3",{className:"text-white font-bold text-lg",children:"Snapshot Retention"}),e.jsx("p",{className:"text-text-secondary text-sm mt-1 mb-4",children:"You have 14 snapshots marked for expiration in the next 24 hours."}),e.jsx("button",{className:"text-white bg-[#2a3b4d] hover:bg-[#324d67] px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:"Review Expiration Policy"})]})]})]})}),d&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>c(!1),children:e.jsxs("div",{className:"bg-[#18232e] rounded-xl border border-[#2a3b4d] max-w-2xl w-full max-h-[90vh] overflow-y-auto",onClick:k=>k.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-[#2a3b4d] flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:U?"Edit Replication Task":"Create Replication Task"}),e.jsx("button",{onClick:()=>{c(!1),q(null),Z({name:"",direction:"outbound",source_dataset:"",target_host:"",target_port:22,target_user:"root",target_dataset:"",source_host:"",source_port:22,source_user:"root",local_dataset:"",schedule_type:"daily",schedule_config:{time:"00:00"},compression:"lz4",recursive:!1,incremental:!0,auto_snapshot:!0,encryption:!1,enabled:!0})},className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Task Name"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none",type:"text",placeholder:"Daily Offsite Backup",value:ne.name,onChange:k=>Z({...ne,name:k.target.value})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Direction"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none appearance-none",value:ne.direction,onChange:k=>Z({...ne,direction:k.target.value}),children:[e.jsx("option",{value:"outbound",children:"Outbound (Sending to remote)"}),e.jsx("option",{value:"inbound",children:"Inbound (Receiving from remote)"})]})]}),ne.direction==="outbound"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Source Dataset"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none appearance-none",value:ne.source_dataset||"",onChange:k=>{Z({...ne,source_dataset:k.target.value||void 0});const G=k.target.value.split("/")[0];G&&H(G)},children:[e.jsx("option",{value:"",children:"Select a dataset"}),F.map(k=>e.jsx("optgroup",{label:k.name,children:J.find(G=>G.pool===k.name)?.datasets.filter(G=>G.type==="filesystem").map(G=>e.jsx("option",{value:G.name,children:G.name},G.id))},k.id))]})]})}),ne.direction==="inbound"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Source Host"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"text",placeholder:"192.168.20.5",value:ne.source_host||"",onChange:k=>Z({...ne,source_host:k.target.value||void 0})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Source Dataset (on remote)"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"text",placeholder:"tank/backup",value:ne.source_dataset||"",onChange:k=>Z({...ne,source_dataset:k.target.value||void 0})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Local Dataset"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none appearance-none",value:ne.local_dataset||"",onChange:k=>{Z({...ne,local_dataset:k.target.value||void 0});const G=k.target.value.split("/")[0];G&&H(G)},children:[e.jsx("option",{value:"",children:"Select a dataset"}),F.map(k=>e.jsx("optgroup",{label:k.name,children:J.find(G=>G.pool===k.name)?.datasets.filter(G=>G.type==="filesystem").map(G=>e.jsx("option",{value:G.name,children:G.name},G.id))},k.id))]})]})]}),ne.direction==="outbound"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Target Host"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"text",placeholder:"192.168.20.5",value:ne.target_host||"",onChange:k=>Z({...ne,target_host:k.target.value||void 0})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"SSH Port"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"number",placeholder:"22",value:ne.target_port||22,onChange:k=>Z({...ne,target_port:parseInt(k.target.value)||22})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Target User"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none",type:"text",placeholder:"root",value:ne.target_user||"root",onChange:k=>Z({...ne,target_user:k.target.value||void 0})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Target Dataset"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"text",placeholder:"tank/backup",value:ne.target_dataset||"",onChange:k=>Z({...ne,target_dataset:k.target.value||void 0})})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Schedule"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none appearance-none",value:ne.schedule_type||"daily",onChange:k=>Z({...ne,schedule_type:k.target.value||void 0}),children:[e.jsx("option",{value:"hourly",children:"Hourly"}),e.jsx("option",{value:"daily",children:"Daily"}),e.jsx("option",{value:"weekly",children:"Weekly"}),e.jsx("option",{value:"monthly",children:"Monthly"}),e.jsx("option",{value:"cron",children:"Custom (Cron)"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Time"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none font-mono",type:"time",value:ne.schedule_config?.time||"00:00",onChange:k=>Z({...ne,schedule_config:{...ne.schedule_config,time:k.target.value}})})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Compression"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none appearance-none",value:ne.compression,onChange:k=>Z({...ne,compression:k.target.value}),children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"lz4",children:"LZ4 (Fast)"}),e.jsx("option",{value:"gzip",children:"GZIP"}),e.jsx("option",{value:"zstd",children:"ZSTD"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:ne.recursive,onChange:k=>Z({...ne,recursive:k.target.checked}),className:"rounded border-[#324d67] bg-[#111a22] text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Recursive (include child datasets)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:ne.auto_snapshot||!1,onChange:k=>Z({...ne,auto_snapshot:k.target.checked}),className:"rounded border-[#324d67] bg-[#111a22] text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Auto-create snapshot before replication"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:ne.encryption,onChange:k=>Z({...ne,encryption:k.target.checked}),className:"rounded border-[#324d67] bg-[#111a22] text-primary focus:ring-primary h-4 w-4"}),e.jsx("span",{className:"text-sm text-white",children:"Enable encryption (SSH tunnel)"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-[#2a3b4d]",children:[e.jsx(ct,{onClick:()=>c(!1),variant:"outline",className:"px-4 h-10 border-[#2a3b4d] text-white hover:bg-[#2a3b4d]",children:"Cancel"}),e.jsxs(ct,{onClick:async()=>{try{U?(await th.updateTask(U.id,ne),alert("Replication task updated successfully!")):(await th.createTask(ne),alert("Replication task created successfully!")),await T.invalidateQueries({queryKey:["replication-tasks"]}),await $(),c(!1),q(null),Z({name:"",direction:"outbound",source_dataset:"",target_host:"",target_port:22,target_user:"root",target_dataset:"",source_host:"",source_port:22,source_user:"root",local_dataset:"",schedule_type:"daily",schedule_config:{time:"00:00"},compression:"lz4",recursive:!1,incremental:!0,auto_snapshot:!0,encryption:!1,enabled:!0})}catch(k){alert(k.response?.data?.error||"Failed to save replication task")}},className:"px-4 h-10 bg-primary hover:bg-blue-600",children:[e.jsx(up,{size:18,className:"mr-2"}),U?"Update Replication":"Create Replication"]})]})]})]})}),u&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>{h(!1),N({dataset:"",name:"",recursive:!1})},children:e.jsxs("div",{className:"bg-[#18232e] rounded-xl border border-[#2a3b4d] max-w-lg w-full",onClick:k=>k.stopPropagation(),children:[e.jsxs("div",{className:"p-6 border-b border-[#2a3b4d] flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:"Create Snapshot"}),e.jsx("button",{onClick:()=>{h(!1),N({dataset:"",name:"",recursive:!1})},className:"text-text-secondary hover:text-white",children:e.jsx(Zs,{size:20})})]}),e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Dataset"}),e.jsxs("select",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none",value:v.dataset,onChange:k=>{N({...v,dataset:k.target.value})},onFocus:()=>{J.length===0&&re()},children:[e.jsx("option",{value:"",children:"Select a dataset"}),F.map(k=>{const G=J.find(me=>me.pool===k.name||me.pool===k.id);return!G||G.datasets.length===0?e.jsx("optgroup",{label:k.name,children:e.jsx("option",{value:"",disabled:!0,children:"Loading datasets..."})},k.id):e.jsx("optgroup",{label:k.name,children:G.datasets.filter(me=>me.type==="filesystem").map(me=>e.jsx("option",{value:me.name,children:me.name},me.id))},k.id)})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-semibold text-white",children:"Snapshot Name"}),e.jsx("input",{className:"w-full bg-[#111a22] border border-[#2a3b4d] rounded-lg px-3 py-2 text-sm text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none",type:"text",placeholder:"manual-backup-2024",value:v.name,onChange:k=>N({...v,name:k.target.value})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",className:"w-4 h-4 rounded border-[#324d67] bg-[#111a22] text-primary",checked:v.recursive,onChange:k=>N({...v,recursive:k.target.checked})}),e.jsx("label",{className:"text-sm text-white",children:"Recursive (include child datasets)"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(ct,{onClick:()=>{h(!1),N({dataset:"",name:"",recursive:!1})},variant:"outline",className:"px-4 h-10 border-[#2a3b4d] text-white hover:bg-[#2a3b4d]",children:"Cancel"}),e.jsx(ct,{onClick:()=>{if(!v.dataset||!v.name){alert("Please fill in all required fields");return}Ae.mutate({dataset:v.dataset,name:v.name,recursive:v.recursive})},disabled:Ae.isPending||!v.dataset||!v.name,className:"px-4 h-10 bg-primary hover:bg-blue-600 disabled:opacity-50",children:Ae.isPending?"Creating...":"Create Snapshot"})]})]})]})}),w&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#18232e] border border-[#2a3b4d] rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Confirm Delete Snapshot"}),e.jsx("button",{onClick:()=>L(null),className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(_l,{className:"text-red-400 mt-0.5",size:20}),e.jsxs("div",{children:[e.jsx("p",{className:"text-red-400 text-sm font-medium mb-1",children:"Warning"}),e.jsxs("p",{className:"text-red-300 text-xs",children:['This action cannot be undone. Snapshot "',w,'" will be permanently deleted.']})]})]})}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>L(null),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-[#2a3b4d] hover:bg-[#111a22] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{oe.mutate({name:w,recursive:!1})},disabled:oe.isPending,className:"px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:oe.isPending?"Deleting...":"Delete Snapshot"})]})]})]})}),K&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-[#18232e] border border-[#2a3b4d] rounded-lg p-6 max-w-md w-full mx-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:"Confirm Rollback to Snapshot"}),e.jsx("button",{onClick:()=>M(null),className:"text-text-secondary hover:text-white transition-colors",children:"✕"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-orange-500/10 border border-orange-500/20 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(_l,{className:"text-orange-400 mt-0.5",size:20}),e.jsxs("div",{children:[e.jsx("p",{className:"text-orange-400 text-sm font-medium mb-1",children:"Warning"}),e.jsxs("p",{className:"text-orange-300 text-xs",children:['Rolling back to snapshot "',K,'" will destroy all changes made after this snapshot was created. This action cannot be undone.']})]})]})}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>M(null),className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-[#2a3b4d] hover:bg-[#111a22] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:()=>{ce.mutate({name:K,force:!1})},disabled:ce.isPending,className:"px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:ce.isPending?"Rolling back...":"Rollback to Snapshot"})]})]})]})}),m&&e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-[#18232e] border border-[#2a3b4d] rounded-xl shadow-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx("div",{className:"p-6 border-b border-[#2a3b4d]",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-white text-xl font-bold",children:y?"Edit Schedule":"Create Snapshot Schedule"}),e.jsx("button",{onClick:()=>{x(!1),p(null),g({name:"",dataset:"",snapshot_name_template:"auto-%Y-%m-%d-%H%M",schedule_type:"daily",schedule_config:{time:"00:00"},recursive:!1})},className:"text-text-secondary hover:text-white transition-colors",children:e.jsx(Zs,{size:24})})]})}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Schedule Name"}),e.jsx("input",{type:"text",value:B.name,onChange:k=>g({...B,name:k.target.value}),placeholder:"e.g., Daily Backup",className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white placeholder-text-secondary focus:outline-none focus:border-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Dataset"}),e.jsxs("select",{value:B.dataset,onChange:k=>g({...B,dataset:k.target.value}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary",children:[e.jsx("option",{value:"",children:"Select dataset..."}),J.flatMap(k=>k.datasets.map(G=>e.jsx("option",{value:G.name,children:G.name},G.name)))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Snapshot Name Template"}),e.jsx("input",{type:"text",value:B.snapshot_name_template,onChange:k=>g({...B,snapshot_name_template:k.target.value}),placeholder:"e.g., auto-%Y-%m-%d-%H%M or daily-backup",className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white placeholder-text-secondary focus:outline-none focus:border-primary"}),e.jsx("p",{className:"text-[#536b85] text-xs mt-1",children:"Use %Y, %m, %d, %H, %M for date/time formatting (e.g., %Y-%m-%d-%H%M)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Schedule Type"}),e.jsxs("select",{value:B.schedule_type,onChange:k=>{const G=k.target.value;let me={};G==="daily"||G==="weekly"||G==="monthly"?(me={time:B.schedule_config?.time||"00:00"},G==="weekly"?me.day=B.schedule_config?.day||0:G==="monthly"&&(me.day=B.schedule_config?.day||1)):G==="cron"&&(me={cron:B.schedule_config?.cron||"0 0 * * *"}),g({...B,schedule_type:G,schedule_config:me})},className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary",children:[e.jsx("option",{value:"hourly",children:"Hourly"}),e.jsx("option",{value:"daily",children:"Daily"}),e.jsx("option",{value:"weekly",children:"Weekly"}),e.jsx("option",{value:"monthly",children:"Monthly"}),e.jsx("option",{value:"cron",children:"Custom (Cron)"})]})]}),B.schedule_type==="daily"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Time (HH:MM)"}),e.jsx("input",{type:"time",value:B.schedule_config?.time||"00:00",onChange:k=>g({...B,schedule_config:{...B.schedule_config,time:k.target.value}}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary"})]}),B.schedule_type==="weekly"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Day of Week"}),e.jsxs("select",{value:B.schedule_config?.day||0,onChange:k=>g({...B,schedule_config:{...B.schedule_config,day:parseInt(k.target.value)}}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary",children:[e.jsx("option",{value:0,children:"Sunday"}),e.jsx("option",{value:1,children:"Monday"}),e.jsx("option",{value:2,children:"Tuesday"}),e.jsx("option",{value:3,children:"Wednesday"}),e.jsx("option",{value:4,children:"Thursday"}),e.jsx("option",{value:5,children:"Friday"}),e.jsx("option",{value:6,children:"Saturday"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Time (HH:MM)"}),e.jsx("input",{type:"time",value:B.schedule_config?.time||"00:00",onChange:k=>g({...B,schedule_config:{...B.schedule_config,time:k.target.value}}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary"})]})]}),B.schedule_type==="monthly"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Day of Month (1-31)"}),e.jsx("input",{type:"number",min:"1",max:"31",value:B.schedule_config?.day||1,onChange:k=>g({...B,schedule_config:{...B.schedule_config,day:parseInt(k.target.value)}}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Time (HH:MM)"}),e.jsx("input",{type:"time",value:B.schedule_config?.time||"00:00",onChange:k=>g({...B,schedule_config:{...B.schedule_config,time:k.target.value}}),className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white focus:outline-none focus:border-primary"})]})]}),B.schedule_type==="cron"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Cron Expression"}),e.jsx("input",{type:"text",value:B.schedule_config?.cron||"0 0 * * *",onChange:k=>g({...B,schedule_config:{...B.schedule_config,cron:k.target.value}}),placeholder:"0 0 * * *",className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white placeholder-text-secondary focus:outline-none focus:border-primary"}),e.jsx("p",{className:"text-[#536b85] text-xs mt-1",children:"Format: minute hour day month weekday"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"recursive",checked:B.recursive,onChange:k=>g({...B,recursive:k.target.checked}),className:"w-4 h-4 rounded border-[#2a3b4d] bg-[#111a22] text-primary focus:ring-primary"}),e.jsx("label",{htmlFor:"recursive",className:"text-sm text-white",children:"Recursive (include child datasets)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Retention Count (optional)"}),e.jsx("input",{type:"number",min:"1",value:B.retention_count||"",onChange:k=>g({...B,retention_count:k.target.value?parseInt(k.target.value):void 0}),placeholder:"Keep last N snapshots (leave empty for unlimited)",className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white placeholder-text-secondary focus:outline-none focus:border-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-semibold text-white mb-2 block",children:"Retention Days (optional)"}),e.jsx("input",{type:"number",min:"1",value:B.retention_days||"",onChange:k=>g({...B,retention_days:k.target.value?parseInt(k.target.value):void 0}),placeholder:"Keep snapshots for N days (leave empty for unlimited)",className:"w-full px-4 py-2 bg-[#111a22] border border-[#2a3b4d] rounded-lg text-white placeholder-text-secondary focus:outline-none focus:border-primary"})]}),e.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[e.jsx("button",{onClick:()=>{x(!1),p(null),g({name:"",dataset:"",snapshot_name_template:"auto-%Y-%m-%d-%H%M",schedule_type:"daily",schedule_config:{time:"00:00"},recursive:!1})},className:"px-4 py-2 text-white text-sm font-medium rounded-lg border border-[#2a3b4d] hover:bg-[#111a22] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:async()=>{if(!B.name||!B.dataset||!B.snapshot_name_template){alert("Please fill in all required fields");return}try{y?(await eh.updateSchedule(y.id,B),alert("Schedule updated successfully!")):(await eh.createSchedule(B),alert("Schedule created successfully!")),await T.invalidateQueries({queryKey:["snapshot-schedules"]}),await _e(),x(!1),p(null),g({name:"",dataset:"",snapshot_name_template:"auto-%Y-%m-%d-%H%M",schedule_type:"daily",schedule_config:{time:"00:00"},recursive:!1})}catch(k){alert(k.response?.data?.error||"Failed to save schedule")}},className:"px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-medium rounded-lg transition-colors",children:y?"Update Schedule":"Create Schedule"})]})]})]})})]})}const rh=[{id:"1",filename:"invoice_2024.pdf.exe",path:"/mnt/pool0/users/finance/",threat:"Win.Trojan.Agent-1",threatLevel:"high",date:"2024-10-24T10:42:00Z"},{id:"2",filename:"keygen_v2.zip",path:"/mnt/pool0/public/software/",threat:"PUA.Win.Tool.Keygen",threatLevel:"medium",date:"2024-10-22T20:15:00Z"},{id:"3",filename:"script_final.sh",path:"/root/downloads/",threat:"Unix.Malware.Agent",threatLevel:"high",date:"2024-10-20T02:30:00Z"}],p_=[{id:"1",name:"Daily Full System",target:"/",frequency:"Every day at 02:00",lastRun:"Yesterday 02:00",status:"success"},{id:"2",name:"Weekly Pool Scan",target:"/mnt/pool0",frequency:"Sundays at 04:00",lastRun:"3 days ago",status:"success"}];function x_(){const[r,t]=Ce.useState(!0),[s,n]=Ce.useState("/mnt/pool0/data"),[o,l]=Ce.useState(!0),[d,c]=Ce.useState(!1),[u,h]=Ce.useState(!1),[m,x]=Ce.useState([]),y=B=>new Date(B).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}),p=B=>B==="high"?"bg-red-500/10 text-red-400 border-red-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20",v=()=>{m.length===rh.length?x([]):x(rh.map(B=>B.id))},N=B=>{m.includes(B)?x(m.filter(g=>g!==B)):x([...m,B])};return e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col bg-background-dark",children:[e.jsx("header",{className:"sticky top-0 z-20 bg-background-dark/95 backdrop-blur border-b border-border-dark px-6 py-4 lg:px-10",children:e.jsx("div",{className:"max-w-7xl mx-auto w-full",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(ba,{to:"/system",className:"text-text-secondary hover:text-primary transition-colors",children:"System"}),e.jsx(Ka,{className:"text-text-secondary",size:16}),e.jsx(ba,{to:"/system",className:"text-text-secondary hover:text-primary transition-colors",children:"Security"}),e.jsx(Ka,{className:"text-text-secondary",size:16}),e.jsx("span",{className:"text-white font-medium",children:"Share Shield System"})]}),e.jsxs("div",{className:"flex flex-wrap justify-between items-end gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-white text-3xl font-black tracking-tight mb-1",children:"Share Shield System"}),e.jsx("p",{className:"text-text-secondary text-sm lg:text-base max-w-2xl",children:"Manage virus definitions, on-demand scans, and quarantine settings for your storage pools."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-[#233648] hover:bg-[#2c445a] text-white text-sm font-medium rounded-lg border border-border-dark transition-all",children:[e.jsx(hp,{size:16}),"Scan History"]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-blue-600 text-white text-sm font-bold rounded-lg shadow-lg shadow-blue-500/20 transition-all",children:[e.jsx(Cn,{size:16}),"Update Definitions"]})]})]})]})})}),e.jsx("div",{className:"flex-1 p-6 lg:px-10 py-8 overflow-y-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto w-full flex flex-col gap-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"xl:col-span-2 rounded-xl border border-border-dark bg-card-dark p-5 flex items-center justify-between shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-full bg-emerald-500/10 border border-emerald-500/20",children:e.jsx(Bn,{className:"text-emerald-500",size:32})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white text-base font-bold",children:"Share Shield Service"}),e.jsxs("p",{className:"text-emerald-400 text-sm font-medium flex items-center gap-1.5",children:[e.jsx("span",{className:"size-1.5 rounded-full bg-emerald-400 animate-pulse"}),"Active & Protecting"]})]})]}),e.jsxs("label",{className:"relative flex h-[28px] w-[48px] cursor-pointer items-center rounded-full border-none bg-[#233648] p-0.5 transition-colors duration-300 has-[:checked]:justify-end has-[:checked]:bg-primary",children:[e.jsx("div",{className:"h-[24px] w-[24px] rounded-full bg-white shadow-sm"}),e.jsx("input",{checked:r,onChange:B=>t(B.target.checked),className:"invisible absolute",type:"checkbox"})]})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-card-dark p-5 flex flex-col justify-between shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("span",{className:"text-text-secondary text-sm font-medium",children:"Virus Definitions"}),e.jsx(_y,{className:"text-text-secondary",size:20})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white text-2xl font-bold tracking-tight",children:"v26500"}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Updated: 2 hours ago"})]})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-card-dark p-5 flex flex-col justify-between shadow-sm",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("span",{className:"text-text-secondary text-sm font-medium",children:"Quarantined Files"}),e.jsx(Eh,{className:"text-amber-500",size:20})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("p",{className:"text-white text-2xl font-bold tracking-tight",children:"12"}),e.jsx("span",{className:"text-emerald-500 text-xs font-bold bg-emerald-500/10 px-1.5 py-0.5 rounded",children:"+2 new"})]}),e.jsx("p",{className:"text-text-secondary text-xs mt-1",children:"Since last reboot"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsx("div",{className:"flex flex-col gap-6 xl:col-span-1",children:e.jsxs("div",{className:"rounded-xl border border-border-dark bg-card-dark overflow-hidden flex flex-col",children:[e.jsx("div",{className:"p-5 border-b border-border-dark bg-[#16202a]",children:e.jsxs("h3",{className:"text-white font-bold text-lg flex items-center gap-2",children:[e.jsx(I6,{className:"text-primary",size:20}),"On-Demand Scanner"]})}),e.jsxs("div",{className:"p-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-text-secondary",children:"Target Directory"}),e.jsxs("div",{className:"flex",children:[e.jsx("input",{className:"flex-1 bg-[#111a22] border border-border-dark text-white text-sm rounded-l-lg px-3 py-2.5 focus:ring-1 focus:ring-primary focus:border-primary outline-none placeholder-gray-600",placeholder:"/path/to/scan",type:"text",value:s,onChange:B=>n(B.target.value)}),e.jsx("button",{className:"bg-[#233648] hover:bg-[#2c445a] text-white px-3 border-y border-r border-border-dark rounded-r-lg transition-colors",children:e.jsx(au,{size:18})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("input",{checked:o,onChange:B=>l(B.target.checked),className:"rounded border-border-dark bg-[#233648] text-primary focus:ring-offset-[#111a22] focus:ring-primary size-4",type:"checkbox"}),e.jsx("span",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:"Recursive Scan"})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("input",{checked:d,onChange:B=>c(B.target.checked),className:"rounded border-border-dark bg-[#233648] text-primary focus:ring-offset-[#111a22] focus:ring-primary size-4",type:"checkbox"}),e.jsx("span",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:"Scan Archives (zip, rar)"})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("input",{checked:u,onChange:B=>h(B.target.checked),className:"rounded border-border-dark bg-[#233648] text-primary focus:ring-offset-[#111a22] focus:ring-primary size-4",type:"checkbox"}),e.jsx("span",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:"Remove Threats Automatically"})]})]}),e.jsxs("div",{className:"pt-2 border-t border-border-dark/50 flex flex-col gap-3",children:[e.jsxs("button",{className:"w-full py-2.5 bg-primary hover:bg-blue-600 text-white font-bold rounded-lg shadow-lg shadow-blue-500/20 transition-all flex justify-center items-center gap-2",children:[e.jsx(i4,{size:18}),"Start Scan"]}),e.jsxs("button",{className:"w-full py-2.5 bg-[#233648] hover:bg-[#2c445a] text-text-secondary hover:text-white font-medium rounded-lg border border-border-dark transition-all flex justify-center items-center gap-2",children:[e.jsx(Ec,{size:18}),"Schedule Scan"]})]})]})]})}),e.jsx("div",{className:"xl:col-span-2 flex flex-col gap-6",children:e.jsxs("div",{className:"rounded-xl border border-border-dark bg-card-dark overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"p-5 border-b border-border-dark bg-[#16202a] flex justify-between items-center",children:[e.jsxs("h3",{className:"text-white font-bold text-lg flex items-center gap-2",children:[e.jsx(D6,{className:"text-amber-500",size:20}),"Quarantine Manager"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:v,className:"text-xs font-medium text-text-secondary hover:text-white px-3 py-1.5 rounded-md hover:bg-[#233648] transition-colors border border-transparent hover:border-border-dark",children:"Select All"}),e.jsx("button",{className:"text-xs font-medium text-red-400 hover:text-red-300 px-3 py-1.5 rounded-md hover:bg-red-400/10 transition-colors border border-transparent hover:border-red-400/20",children:"Delete Selected"})]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-[#16202a] text-text-secondary font-medium",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-5 py-3 w-10",children:e.jsx("input",{checked:m.length===rh.length,onChange:v,className:"rounded border-border-dark bg-[#233648] text-primary focus:ring-offset-[#111a22] focus:ring-primary size-4",type:"checkbox"})}),e.jsx("th",{className:"px-5 py-3",children:"Filename"}),e.jsx("th",{className:"px-5 py-3",children:"Threat Detected"}),e.jsx("th",{className:"px-5 py-3",children:"Date"}),e.jsx("th",{className:"px-5 py-3 text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:rh.map(B=>e.jsxs("tr",{className:"group hover:bg-[#233648]/30 transition-colors",children:[e.jsx("td",{className:"px-5 py-4",children:e.jsx("input",{checked:m.includes(B.id),onChange:()=>N(B.id),className:"rounded border-border-dark bg-[#233648] text-primary focus:ring-offset-[#111a22] focus:ring-primary size-4",type:"checkbox"})}),e.jsx("td",{className:"px-5 py-4",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-white font-medium",children:B.filename}),e.jsx("span",{className:"text-xs text-text-secondary font-mono",children:B.path})]})}),e.jsx("td",{className:"px-5 py-4",children:e.jsx("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${p(B.threatLevel)}`,children:B.threat})}),e.jsx("td",{className:"px-5 py-4 text-text-secondary",children:y(B.date)}),e.jsx("td",{className:"px-5 py-4 text-right",children:e.jsxs("div",{className:"flex justify-end gap-2 opacity-60 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{className:"p-1.5 text-text-secondary hover:text-emerald-400 hover:bg-emerald-400/10 rounded-md transition-colors",title:"Restore",children:e.jsx(Im,{size:20})}),e.jsx("button",{className:"p-1.5 text-text-secondary hover:text-red-400 hover:bg-red-400/10 rounded-md transition-colors",title:"Delete Permanently",children:e.jsx(es,{size:20})})]})})]},B.id))})]})}),e.jsxs("div",{className:"p-4 border-t border-border-dark bg-[#16202a] text-xs text-text-secondary flex justify-center",children:["Showing ",rh.length," of 12 quarantined items"]})]})})]}),e.jsxs("div",{className:"rounded-xl border border-border-dark bg-card-dark overflow-hidden mt-2",children:[e.jsxs("div",{className:"p-5 border-b border-border-dark bg-[#16202a] flex justify-between items-center",children:[e.jsx("h3",{className:"text-white font-bold text-lg",children:"Scheduled Scans"}),e.jsxs("button",{className:"text-primary hover:text-blue-400 text-sm font-bold flex items-center gap-1",children:[e.jsx(Ks,{size:18}),"Add Schedule"]})]}),e.jsx("div",{className:"p-0 overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"text-text-secondary font-medium border-b border-border-dark",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 font-medium",children:"Name"}),e.jsx("th",{className:"px-6 py-3 font-medium",children:"Target"}),e.jsx("th",{className:"px-6 py-3 font-medium",children:"Frequency"}),e.jsx("th",{className:"px-6 py-3 font-medium",children:"Last Run"}),e.jsx("th",{className:"px-6 py-3 font-medium",children:"Status"}),e.jsx("th",{className:"px-6 py-3 font-medium text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-border-dark",children:p_.map(B=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-6 py-4 text-white font-medium",children:B.name}),e.jsx("td",{className:"px-6 py-4 text-text-secondary font-mono text-xs",children:B.target}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:B.frequency}),e.jsx("td",{className:"px-6 py-4 text-text-secondary",children:B.lastRun}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("span",{className:"text-emerald-400 flex items-center gap-1",children:[e.jsx(su,{size:16}),"Success"]})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{className:"text-text-secondary hover:text-white",children:e.jsx(pp,{size:18})})})]},B.id))})]})})]})]})})]})}const g_="modulepreload",b_=function(r){return"/"+r},Lv={},sg=function(t,s,n){let o=Promise.resolve();if(s&&s.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),c=d?.nonce||d?.getAttribute("nonce");o=u(s.map(h=>{if(h=b_(h),h in Lv)return;Lv[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":g_,m||(y.as="script"),y.crossOrigin="",y.href=h,c&&y.setAttribute("nonce",c),document.head.appendChild(y),m)return new Promise((p,v)=>{y.addEventListener("load",p),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(d){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=d,window.dispatchEvent(c),!c.defaultPrevented)throw d}return o.then(d=>{for(const c of d||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})};var no=Uint8Array,Wn=Uint16Array,Fy=Int32Array,Ey=new no([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Uy=new no([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tv=new no([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),p4=function(r,t){for(var s=new Wn(31),n=0;n<31;++n)s[n]=t+=1<<r[n-1];for(var o=new Fy(s[30]),n=1;n<30;++n)for(var l=s[n];l<s[n+1];++l)o[l]=l-s[n]<<5|n;return{b:s,r:o}},x4=p4(Ey,2),y_=x4.b,Rb=x4.r;y_[28]=258,Rb[258]=28;var w_=p4(Uy,0),Iv=w_.r,Ob=new Wn(32768);for(var os=0;os<32768;++os){var pA=(os&43690)>>1|(os&21845)<<1;pA=(pA&52428)>>2|(pA&13107)<<2,pA=(pA&61680)>>4|(pA&3855)<<4,Ob[os]=((pA&65280)>>8|(pA&255)<<8)>>1}var Nh=(function(r,t,s){for(var n=r.length,o=0,l=new Wn(t);o<n;++o)r[o]&&++l[r[o]-1];var d=new Wn(t);for(o=1;o<t;++o)d[o]=d[o-1]+l[o-1]<<1;var c;if(s){c=new Wn(1<<t);var u=15-t;for(o=0;o<n;++o)if(r[o])for(var h=o<<4|r[o],m=t-r[o],x=d[r[o]-1]++<<m,y=x|(1<<m)-1;x<=y;++x)c[Ob[x]>>u]=h}else for(c=new Wn(n),o=0;o<n;++o)r[o]&&(c[o]=Ob[d[r[o]-1]++]>>15-r[o]);return c}),Uc=new no(288);for(var os=0;os<144;++os)Uc[os]=8;for(var os=144;os<256;++os)Uc[os]=9;for(var os=256;os<280;++os)Uc[os]=7;for(var os=280;os<288;++os)Uc[os]=8;var Jm=new no(32);for(var os=0;os<32;++os)Jm[os]=5;var v_=Nh(Uc,9,0),N_=Nh(Jm,5,0),g4=function(r){return(r+7)/8|0},B_=function(r,t,s){return(s==null||s>r.length)&&(s=r.length),new no(r.subarray(t,s))},bl=function(r,t,s){s<<=t&7;var n=t/8|0;r[n]|=s,r[n+1]|=s>>8},sh=function(r,t,s){s<<=t&7;var n=t/8|0;r[n]|=s,r[n+1]|=s>>8,r[n+2]|=s>>16},ag=function(r,t){for(var s=[],n=0;n<r.length;++n)r[n]&&s.push({s:n,f:r[n]});var o=s.length,l=s.slice();if(!o)return{t:y4,l:0};if(o==1){var d=new no(s[0].s+1);return d[s[0].s]=1,{t:d,l:1}}s.sort(function(L,K){return L.f-K.f}),s.push({s:-1,f:25001});var c=s[0],u=s[1],h=0,m=1,x=2;for(s[0]={s:-1,f:c.f+u.f,l:c,r:u};m!=o-1;)c=s[s[h].f<s[x].f?h++:x++],u=s[h!=m&&s[h].f<s[x].f?h++:x++],s[m++]={s:-1,f:c.f+u.f,l:c,r:u};for(var y=l[0].s,n=1;n<o;++n)l[n].s>y&&(y=l[n].s);var p=new Wn(y+1),v=Hb(s[m-1],p,0);if(v>t){var n=0,N=0,B=v-t,g=1<<B;for(l.sort(function(K,M){return p[M.s]-p[K.s]||K.f-M.f});n<o;++n){var j=l[n].s;if(p[j]>t)N+=g-(1<<v-p[j]),p[j]=t;else break}for(N>>=B;N>0;){var _=l[n].s;p[_]<t?N-=1<<t-p[_]++-1:++n}for(;n>=0&&N;--n){var w=l[n].s;p[w]==t&&(--p[w],++N)}v=t}return{t:new no(p),l:v}},Hb=function(r,t,s){return r.s==-1?Math.max(Hb(r.l,t,s+1),Hb(r.r,t,s+1)):t[r.s]=s},Dv=function(r){for(var t=r.length;t&&!r[--t];);for(var s=new Wn(++t),n=0,o=r[0],l=1,d=function(u){s[n++]=u},c=1;c<=t;++c)if(r[c]==o&&c!=t)++l;else{if(!o&&l>2){for(;l>138;l-=138)d(32754);l>2&&(d(l>10?l-11<<5|28690:l-3<<5|12305),l=0)}else if(l>3){for(d(o),--l;l>6;l-=6)d(8304);l>2&&(d(l-3<<5|8208),l=0)}for(;l--;)d(o);l=1,o=r[c]}return{c:s.subarray(0,n),n:t}},ah=function(r,t){for(var s=0,n=0;n<t.length;++n)s+=r[n]*t[n];return s},b4=function(r,t,s){var n=s.length,o=g4(t+2);r[o]=n&255,r[o+1]=n>>8,r[o+2]=r[o]^255,r[o+3]=r[o+1]^255;for(var l=0;l<n;++l)r[o+l+4]=s[l];return(o+4+n)*8},Rv=function(r,t,s,n,o,l,d,c,u,h,m){bl(t,m++,s),++o[256];for(var x=ag(o,15),y=x.t,p=x.l,v=ag(l,15),N=v.t,B=v.l,g=Dv(y),j=g.c,_=g.n,w=Dv(N),L=w.c,K=w.n,M=new Wn(19),V=0;V<j.length;++V)++M[j[V]&31];for(var V=0;V<L.length;++V)++M[L[V]&31];for(var T=ag(M,7),ne=T.t,Z=T.l,U=19;U>4&&!ne[Tv[U-1]];--U);var q=h+5<<3,F=ah(o,Uc)+ah(l,Jm)+d,le=ah(o,y)+ah(l,N)+d+14+3*U+ah(M,ne)+2*M[16]+3*M[17]+7*M[18];if(u>=0&&q<=F&&q<=le)return b4(t,m,r.subarray(u,u+h));var ae,se,fe,ye;if(bl(t,m,1+(le<F)),m+=2,le<F){ae=Nh(y,p,0),se=y,fe=Nh(N,B,0),ye=N;var _e=Nh(ne,Z,0);bl(t,m,_-257),bl(t,m+5,K-1),bl(t,m+10,U-4),m+=14;for(var V=0;V<U;++V)bl(t,m+3*V,ne[Tv[V]]);m+=3*U;for(var xe=[j,L],D=0;D<2;++D)for(var $=xe[D],V=0;V<$.length;++V){var X=$[V]&31;bl(t,m,_e[X]),m+=ne[X],X>15&&(bl(t,m,$[V]>>5&127),m+=$[V]>>12)}}else ae=v_,se=Uc,fe=N_,ye=Jm;for(var V=0;V<c;++V){var te=n[V];if(te>255){var X=te>>18&31;sh(t,m,ae[X+257]),m+=se[X+257],X>7&&(bl(t,m,te>>23&31),m+=Ey[X]);var J=te&31;sh(t,m,fe[J]),m+=ye[J],J>3&&(sh(t,m,te>>5&8191),m+=Uy[J])}else sh(t,m,ae[te]),m+=se[te]}return sh(t,m,ae[256]),m+se[256]},j_=new Fy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),y4=new no(0),C_=function(r,t,s,n,o,l){var d=l.z||r.length,c=new no(n+d+5*(1+Math.ceil(d/7e3))+o),u=c.subarray(n,c.length-o),h=l.l,m=(l.r||0)&7;if(t){m&&(u[0]=l.r>>3);for(var x=j_[t-1],y=x>>13,p=x&8191,v=(1<<s)-1,N=l.p||new Wn(32768),B=l.h||new Wn(v+1),g=Math.ceil(s/3),j=2*g,_=function(z){return(r[z]^r[z+1]<<g^r[z+2]<<j)&v},w=new Fy(25e3),L=new Wn(288),K=new Wn(32),M=0,V=0,T=l.i||0,ne=0,Z=l.w||0,U=0;T+2<d;++T){var q=_(T),F=T&32767,le=B[q];if(N[F]=le,B[q]=F,Z<=T){var ae=d-T;if((M>7e3||ne>24576)&&(ae>423||!h)){m=Rv(r,u,0,w,L,K,V,ne,U,T-U,m),ne=M=V=0,U=T;for(var se=0;se<286;++se)L[se]=0;for(var se=0;se<30;++se)K[se]=0}var fe=2,ye=0,_e=p,xe=F-le&32767;if(ae>2&&q==_(T-xe))for(var D=Math.min(y,ae)-1,$=Math.min(32767,T),X=Math.min(258,ae);xe<=$&&--_e&&F!=le;){if(r[T+fe]==r[T+fe-xe]){for(var te=0;te<X&&r[T+te]==r[T+te-xe];++te);if(te>fe){if(fe=te,ye=xe,te>D)break;for(var J=Math.min(xe,te-2),O=0,se=0;se<J;++se){var H=T-xe+se&32767,re=N[H],Ae=H-re&32767;Ae>O&&(O=Ae,le=H)}}}F=le,le=N[F],xe+=F-le&32767}if(ye){w[ne++]=268435456|Rb[fe]<<18|Iv[ye];var oe=Rb[fe]&31,ce=Iv[ye]&31;V+=Ey[oe]+Uy[ce],++L[257+oe],++K[ce],Z=T+fe,++M}else w[ne++]=r[T],++L[r[T]]}}for(T=Math.max(T,Z);T<d;++T)w[ne++]=r[T],++L[r[T]];m=Rv(r,u,h,w,L,K,V,ne,U,T-U,m),h||(l.r=m&7|u[m/8|0]<<3,m-=7,l.h=B,l.p=N,l.i=T,l.w=Z)}else{for(var T=l.w||0;T<d+h;T+=65535){var Se=T+65535;Se>=d&&(u[m/8|0]=h,Se=d),m=b4(u,m+1,r.subarray(T,Se))}l.i=d}return B_(c,0,n+g4(m)+o)},w4=function(){var r=1,t=0;return{p:function(s){for(var n=r,o=t,l=s.length|0,d=0;d!=l;){for(var c=Math.min(d+2655,l);d<c;++d)o+=n+=s[d];n=(n&65535)+15*(n>>16),o=(o&65535)+15*(o>>16)}r=n,t=o},d:function(){return r%=65521,t%=65521,(r&255)<<24|(r&65280)<<8|(t&255)<<8|t>>8}}},S_=function(r,t,s,n,o){if(!o&&(o={l:1},t.dictionary)){var l=t.dictionary.subarray(-32768),d=new no(l.length+r.length);d.set(l),d.set(r,l.length),r=d,o.w=l.length}return C_(r,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+t.mem,s,n,o)},v4=function(r,t,s){for(;s;++t)r[t]=s,s>>>=8},__=function(r,t){var s=t.level,n=s==0?0:s<6?1:s==9?3:2;if(r[0]=120,r[1]=n<<6|(t.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,t.dictionary){var o=w4();o.p(t.dictionary),v4(r,2,o.d())}};function Mb(r,t){t||(t={});var s=w4();s.p(r);var n=S_(r,t,t.dictionary?6:2,4);return __(n,t),v4(n,n.length-4,s.d()),n}var k_=typeof TextDecoder<"u"&&new TextDecoder,F_=0;try{k_.decode(y4,{stream:!0}),F_=1}catch{}function E_(r){if(Array.isArray(r))return r}function U_(r,t){var s=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(s!=null){var n,o,l,d,c=[],u=!0,h=!1;try{if(l=(s=s.call(r)).next,t!==0)for(;!(u=(n=l.call(s)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(m){h=!0,o=m}finally{try{if(!u&&s.return!=null&&(d=s.return(),Object(d)!==d))return}finally{if(h)throw o}}return c}}function Q_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ov(r,t){return E_(r)||U_(r,t)||y6(r,t)||Q_()}function Hv(r,t="utf8"){return new TextDecoder(t).decode(r)}const L_=new TextEncoder;function T_(r){return L_.encode(r)}const I_=1024*8,D_=(()=>{const r=new Uint8Array(4),t=new Uint32Array(r.buffer);return!((t[0]=1)&r[0])})(),ng={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Qy{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=I_,s={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);const o=s.offset?s.offset>>>0:0,l=t.byteLength-o;let d=o;(ArrayBuffer.isView(t)||t instanceof Qy)&&(t.byteLength!==t.buffer.byteLength&&(d=t.byteOffset+o),t=t.buffer),n?this.lastWrittenByte=l:this.lastWrittenByte=0,this.buffer=t,this.length=l,this.byteLength=l,this.byteOffset=d,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,d,l),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const n=(this.offset+t)*2,o=new Uint8Array(n);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,s){const n=ng[s].BYTES_PER_ELEMENT*t,o=this.byteOffset+this.offset,l=this.buffer.slice(o,o+n);if(this.littleEndian===D_&&s!=="uint8"&&s!=="int8"){const c=new Uint8Array(this.buffer.slice(o,o+n));c.reverse();const u=new ng[s](c.buffer);return this.offset+=n,u.reverse(),u}const d=new ng[s](l);return this.offset+=n,d}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let s="";for(let n=0;n<t;n++)s+=this.readChar();return s}readUtf8(t=1){return Hv(this.readBytes(t))}decodeText(t=1,s="utf8"){return Hv(this.readBytes(t),s)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let s=0;s<t.length;s++)this._data.setUint8(this.offset++,t[s]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let s=0;s<t.length;s++)this.writeUint8(t.charCodeAt(s));return this}writeUtf8(t){return this.writeBytes(T_(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function fu(r){let t=r.length;for(;--t>=0;)r[t]=0}const R_=3,O_=258,N4=29,H_=256,M_=H_+1+N4,B4=30,P_=512,K_=new Array((M_+2)*2);fu(K_);const z_=new Array(B4*2);fu(z_);const q_=new Array(P_);fu(q_);const G_=new Array(O_-R_+1);fu(G_);const V_=new Array(N4);fu(V_);const W_=new Array(B4);fu(W_);const X_=(r,t,s,n)=>{let o=r&65535|0,l=r>>>16&65535|0,d=0;for(;s!==0;){d=s>2e3?2e3:s,s-=d;do o=o+t[n++]|0,l=l+o|0;while(--d);o%=65521,l%=65521}return o|l<<16|0};var Pb=X_;const Y_=()=>{let r,t=[];for(var s=0;s<256;s++){r=s;for(var n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;t[s]=r}return t},J_=new Uint32Array(Y_()),Z_=(r,t,s,n)=>{const o=J_,l=n+s;r^=-1;for(let d=n;d<l;d++)r=r>>>8^o[(r^t[d])&255];return r^-1};var Eo=Z_,Kb={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j4={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const $_=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var ek=function(r){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const s=t.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(const n in s)$_(s,n)&&(r[n]=s[n])}}return r},tk=r=>{let t=0;for(let n=0,o=r.length;n<o;n++)t+=r[n].length;const s=new Uint8Array(t);for(let n=0,o=0,l=r.length;n<l;n++){let d=r[n];s.set(d,o),o+=d.length}return s},C4={assign:ek,flattenChunks:tk};let S4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{S4=!1}const Ih=new Uint8Array(256);for(let r=0;r<256;r++)Ih[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;Ih[254]=Ih[254]=1;var rk=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let t,s,n,o,l,d=r.length,c=0;for(o=0;o<d;o++)s=r.charCodeAt(o),(s&64512)===55296&&o+1<d&&(n=r.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),c+=s<128?1:s<2048?2:s<65536?3:4;for(t=new Uint8Array(c),l=0,o=0;l<c;o++)s=r.charCodeAt(o),(s&64512)===55296&&o+1<d&&(n=r.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),s<128?t[l++]=s:s<2048?(t[l++]=192|s>>>6,t[l++]=128|s&63):s<65536?(t[l++]=224|s>>>12,t[l++]=128|s>>>6&63,t[l++]=128|s&63):(t[l++]=240|s>>>18,t[l++]=128|s>>>12&63,t[l++]=128|s>>>6&63,t[l++]=128|s&63);return t};const sk=(r,t)=>{if(t<65534&&r.subarray&&S4)return String.fromCharCode.apply(null,r.length===t?r:r.subarray(0,t));let s="";for(let n=0;n<t;n++)s+=String.fromCharCode(r[n]);return s};var ak=(r,t)=>{const s=t||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,t));let n,o;const l=new Array(s*2);for(o=0,n=0;n<s;){let d=r[n++];if(d<128){l[o++]=d;continue}let c=Ih[d];if(c>4){l[o++]=65533,n+=c-1;continue}for(d&=c===2?31:c===3?15:7;c>1&&n<s;)d=d<<6|r[n++]&63,c--;if(c>1){l[o++]=65533;continue}d<65536?l[o++]=d:(d-=65536,l[o++]=55296|d>>10&1023,l[o++]=56320|d&1023)}return sk(l,o)},nk=(r,t)=>{t=t||r.length,t>r.length&&(t=r.length);let s=t-1;for(;s>=0&&(r[s]&192)===128;)s--;return s<0||s===0?t:s+Ih[r[s]]>t?s:t},zb={string2buf:rk,buf2string:ak,utf8border:nk};function ik(){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}var ok=ik;const qf=16209,lk=16191;var Ak=function(t,s){let n,o,l,d,c,u,h,m,x,y,p,v,N,B,g,j,_,w,L,K,M,V,T,ne;const Z=t.state;n=t.next_in,T=t.input,o=n+(t.avail_in-5),l=t.next_out,ne=t.output,d=l-(s-t.avail_out),c=l+(t.avail_out-257),u=Z.dmax,h=Z.wsize,m=Z.whave,x=Z.wnext,y=Z.window,p=Z.hold,v=Z.bits,N=Z.lencode,B=Z.distcode,g=(1<<Z.lenbits)-1,j=(1<<Z.distbits)-1;e:do{v<15&&(p+=T[n++]<<v,v+=8,p+=T[n++]<<v,v+=8),_=N[p&g];t:for(;;){if(w=_>>>24,p>>>=w,v-=w,w=_>>>16&255,w===0)ne[l++]=_&65535;else if(w&16){L=_&65535,w&=15,w&&(v<w&&(p+=T[n++]<<v,v+=8),L+=p&(1<<w)-1,p>>>=w,v-=w),v<15&&(p+=T[n++]<<v,v+=8,p+=T[n++]<<v,v+=8),_=B[p&j];r:for(;;){if(w=_>>>24,p>>>=w,v-=w,w=_>>>16&255,w&16){if(K=_&65535,w&=15,v<w&&(p+=T[n++]<<v,v+=8,v<w&&(p+=T[n++]<<v,v+=8)),K+=p&(1<<w)-1,K>u){t.msg="invalid distance too far back",Z.mode=qf;break e}if(p>>>=w,v-=w,w=l-d,K>w){if(w=K-w,w>m&&Z.sane){t.msg="invalid distance too far back",Z.mode=qf;break e}if(M=0,V=y,x===0){if(M+=h-w,w<L){L-=w;do ne[l++]=y[M++];while(--w);M=l-K,V=ne}}else if(x<w){if(M+=h+x-w,w-=x,w<L){L-=w;do ne[l++]=y[M++];while(--w);if(M=0,x<L){w=x,L-=w;do ne[l++]=y[M++];while(--w);M=l-K,V=ne}}}else if(M+=x-w,w<L){L-=w;do ne[l++]=y[M++];while(--w);M=l-K,V=ne}for(;L>2;)ne[l++]=V[M++],ne[l++]=V[M++],ne[l++]=V[M++],L-=3;L&&(ne[l++]=V[M++],L>1&&(ne[l++]=V[M++]))}else{M=l-K;do ne[l++]=ne[M++],ne[l++]=ne[M++],ne[l++]=ne[M++],L-=3;while(L>2);L&&(ne[l++]=ne[M++],L>1&&(ne[l++]=ne[M++]))}}else if((w&64)===0){_=B[(_&65535)+(p&(1<<w)-1)];continue r}else{t.msg="invalid distance code",Z.mode=qf;break e}break}}else if((w&64)===0){_=N[(_&65535)+(p&(1<<w)-1)];continue t}else if(w&32){Z.mode=lk;break e}else{t.msg="invalid literal/length code",Z.mode=qf;break e}break}}while(n<o&&l<c);L=v>>3,n-=L,v-=L<<3,p&=(1<<v)-1,t.next_in=n,t.next_out=l,t.avail_in=n<o?5+(o-n):5-(n-o),t.avail_out=l<c?257+(c-l):257-(l-c),Z.hold=p,Z.bits=v};const kd=15,Mv=852,Pv=592,Kv=0,ig=1,zv=2,ck=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),dk=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),uk=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),hk=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),fk=(r,t,s,n,o,l,d,c)=>{const u=c.bits;let h=0,m=0,x=0,y=0,p=0,v=0,N=0,B=0,g=0,j=0,_,w,L,K,M,V=null,T;const ne=new Uint16Array(kd+1),Z=new Uint16Array(kd+1);let U=null,q,F,le;for(h=0;h<=kd;h++)ne[h]=0;for(m=0;m<n;m++)ne[t[s+m]]++;for(p=u,y=kd;y>=1&&ne[y]===0;y--);if(p>y&&(p=y),y===0)return o[l++]=1<<24|64<<16|0,o[l++]=1<<24|64<<16|0,c.bits=1,0;for(x=1;x<y&&ne[x]===0;x++);for(p<x&&(p=x),B=1,h=1;h<=kd;h++)if(B<<=1,B-=ne[h],B<0)return-1;if(B>0&&(r===Kv||y!==1))return-1;for(Z[1]=0,h=1;h<kd;h++)Z[h+1]=Z[h]+ne[h];for(m=0;m<n;m++)t[s+m]!==0&&(d[Z[t[s+m]]++]=m);if(r===Kv?(V=U=d,T=20):r===ig?(V=ck,U=dk,T=257):(V=uk,U=hk,T=0),j=0,m=0,h=x,M=l,v=p,N=0,L=-1,g=1<<p,K=g-1,r===ig&&g>Mv||r===zv&&g>Pv)return 1;for(;;){q=h-N,d[m]+1<T?(F=0,le=d[m]):d[m]>=T?(F=U[d[m]-T],le=V[d[m]-T]):(F=96,le=0),_=1<<h-N,w=1<<v,x=w;do w-=_,o[M+(j>>N)+w]=q<<24|F<<16|le|0;while(w!==0);for(_=1<<h-1;j&_;)_>>=1;if(_!==0?(j&=_-1,j+=_):j=0,m++,--ne[h]===0){if(h===y)break;h=t[s+d[m]]}if(h>p&&(j&K)!==L){for(N===0&&(N=p),M+=x,v=h-N,B=1<<v;v+N<y&&(B-=ne[v+N],!(B<=0));)v++,B<<=1;if(g+=1<<v,r===ig&&g>Mv||r===zv&&g>Pv)return 1;L=j&K,o[L]=p<<24|v<<16|M-l|0}}return j!==0&&(o[M+j]=h-N<<24|64<<16|0),c.bits=p,0};var Bh=fk;const mk=0,_4=1,k4=2,{Z_FINISH:qv,Z_BLOCK:pk,Z_TREES:Gf,Z_OK:Qc,Z_STREAM_END:xk,Z_NEED_DICT:gk,Z_STREAM_ERROR:ji,Z_DATA_ERROR:F4,Z_MEM_ERROR:E4,Z_BUF_ERROR:bk,Z_DEFLATED:Gv}=j4,xp=16180,Vv=16181,Wv=16182,Xv=16183,Yv=16184,Jv=16185,Zv=16186,$v=16187,e2=16188,t2=16189,Zm=16190,yl=16191,og=16192,r2=16193,lg=16194,s2=16195,a2=16196,n2=16197,i2=16198,Vf=16199,Wf=16200,o2=16201,l2=16202,A2=16203,c2=16204,d2=16205,Ag=16206,u2=16207,h2=16208,us=16209,U4=16210,Q4=16211,yk=852,wk=592,vk=15,Nk=vk,f2=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function Bk(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Tc=r=>{if(!r)return 1;const t=r.state;return!t||t.strm!==r||t.mode<xp||t.mode>Q4?1:0},L4=r=>{if(Tc(r))return ji;const t=r.state;return r.total_in=r.total_out=t.total=0,r.msg="",t.wrap&&(r.adler=t.wrap&1),t.mode=xp,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(yk),t.distcode=t.distdyn=new Int32Array(wk),t.sane=1,t.back=-1,Qc},T4=r=>{if(Tc(r))return ji;const t=r.state;return t.wsize=0,t.whave=0,t.wnext=0,L4(r)},I4=(r,t)=>{let s;if(Tc(r))return ji;const n=r.state;return t<0?(s=0,t=-t):(s=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?ji:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=s,n.wbits=t,T4(r))},D4=(r,t)=>{if(!r)return ji;const s=new Bk;r.state=s,s.strm=r,s.window=null,s.mode=xp;const n=I4(r,t);return n!==Qc&&(r.state=null),n},jk=r=>D4(r,Nk);let m2=!0,cg,dg;const Ck=r=>{if(m2){cg=new Int32Array(512),dg=new Int32Array(32);let t=0;for(;t<144;)r.lens[t++]=8;for(;t<256;)r.lens[t++]=9;for(;t<280;)r.lens[t++]=7;for(;t<288;)r.lens[t++]=8;for(Bh(_4,r.lens,0,288,cg,0,r.work,{bits:9}),t=0;t<32;)r.lens[t++]=5;Bh(k4,r.lens,0,32,dg,0,r.work,{bits:5}),m2=!1}r.lencode=cg,r.lenbits=9,r.distcode=dg,r.distbits=5},R4=(r,t,s,n)=>{let o;const l=r.state;return l.window===null&&(l.wsize=1<<l.wbits,l.wnext=0,l.whave=0,l.window=new Uint8Array(l.wsize)),n>=l.wsize?(l.window.set(t.subarray(s-l.wsize,s),0),l.wnext=0,l.whave=l.wsize):(o=l.wsize-l.wnext,o>n&&(o=n),l.window.set(t.subarray(s-n,s-n+o),l.wnext),n-=o,n?(l.window.set(t.subarray(s-n,s),0),l.wnext=n,l.whave=l.wsize):(l.wnext+=o,l.wnext===l.wsize&&(l.wnext=0),l.whave<l.wsize&&(l.whave+=o))),0},Sk=(r,t)=>{let s,n,o,l,d,c,u,h,m,x,y,p,v,N,B=0,g,j,_,w,L,K,M,V;const T=new Uint8Array(4);let ne,Z;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Tc(r)||!r.output||!r.input&&r.avail_in!==0)return ji;s=r.state,s.mode===yl&&(s.mode=og),d=r.next_out,o=r.output,u=r.avail_out,l=r.next_in,n=r.input,c=r.avail_in,h=s.hold,m=s.bits,x=c,y=u,V=Qc;e:for(;;)switch(s.mode){case xp:if(s.wrap===0){s.mode=og;break}for(;m<16;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(s.wrap&2&&h===35615){s.wbits===0&&(s.wbits=15),s.check=0,T[0]=h&255,T[1]=h>>>8&255,s.check=Eo(s.check,T,2,0),h=0,m=0,s.mode=Vv;break}if(s.head&&(s.head.done=!1),!(s.wrap&1)||(((h&255)<<8)+(h>>8))%31){r.msg="incorrect header check",s.mode=us;break}if((h&15)!==Gv){r.msg="unknown compression method",s.mode=us;break}if(h>>>=4,m-=4,M=(h&15)+8,s.wbits===0&&(s.wbits=M),M>15||M>s.wbits){r.msg="invalid window size",s.mode=us;break}s.dmax=1<<s.wbits,s.flags=0,r.adler=s.check=1,s.mode=h&512?t2:yl,h=0,m=0;break;case Vv:for(;m<16;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(s.flags=h,(s.flags&255)!==Gv){r.msg="unknown compression method",s.mode=us;break}if(s.flags&57344){r.msg="unknown header flags set",s.mode=us;break}s.head&&(s.head.text=h>>8&1),s.flags&512&&s.wrap&4&&(T[0]=h&255,T[1]=h>>>8&255,s.check=Eo(s.check,T,2,0)),h=0,m=0,s.mode=Wv;case Wv:for(;m<32;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.head&&(s.head.time=h),s.flags&512&&s.wrap&4&&(T[0]=h&255,T[1]=h>>>8&255,T[2]=h>>>16&255,T[3]=h>>>24&255,s.check=Eo(s.check,T,4,0)),h=0,m=0,s.mode=Xv;case Xv:for(;m<16;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.head&&(s.head.xflags=h&255,s.head.os=h>>8),s.flags&512&&s.wrap&4&&(T[0]=h&255,T[1]=h>>>8&255,s.check=Eo(s.check,T,2,0)),h=0,m=0,s.mode=Yv;case Yv:if(s.flags&1024){for(;m<16;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.length=h,s.head&&(s.head.extra_len=h),s.flags&512&&s.wrap&4&&(T[0]=h&255,T[1]=h>>>8&255,s.check=Eo(s.check,T,2,0)),h=0,m=0}else s.head&&(s.head.extra=null);s.mode=Jv;case Jv:if(s.flags&1024&&(p=s.length,p>c&&(p=c),p&&(s.head&&(M=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(n.subarray(l,l+p),M)),s.flags&512&&s.wrap&4&&(s.check=Eo(s.check,n,p,l)),c-=p,l+=p,s.length-=p),s.length))break e;s.length=0,s.mode=Zv;case Zv:if(s.flags&2048){if(c===0)break e;p=0;do M=n[l+p++],s.head&&M&&s.length<65536&&(s.head.name+=String.fromCharCode(M));while(M&&p<c);if(s.flags&512&&s.wrap&4&&(s.check=Eo(s.check,n,p,l)),c-=p,l+=p,M)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=$v;case $v:if(s.flags&4096){if(c===0)break e;p=0;do M=n[l+p++],s.head&&M&&s.length<65536&&(s.head.comment+=String.fromCharCode(M));while(M&&p<c);if(s.flags&512&&s.wrap&4&&(s.check=Eo(s.check,n,p,l)),c-=p,l+=p,M)break e}else s.head&&(s.head.comment=null);s.mode=e2;case e2:if(s.flags&512){for(;m<16;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(s.wrap&4&&h!==(s.check&65535)){r.msg="header crc mismatch",s.mode=us;break}h=0,m=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),r.adler=s.check=0,s.mode=yl;break;case t2:for(;m<32;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}r.adler=s.check=f2(h),h=0,m=0,s.mode=Zm;case Zm:if(s.havedict===0)return r.next_out=d,r.avail_out=u,r.next_in=l,r.avail_in=c,s.hold=h,s.bits=m,gk;r.adler=s.check=1,s.mode=yl;case yl:if(t===pk||t===Gf)break e;case og:if(s.last){h>>>=m&7,m-=m&7,s.mode=Ag;break}for(;m<3;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}switch(s.last=h&1,h>>>=1,m-=1,h&3){case 0:s.mode=r2;break;case 1:if(Ck(s),s.mode=Vf,t===Gf){h>>>=2,m-=2;break e}break;case 2:s.mode=a2;break;case 3:r.msg="invalid block type",s.mode=us}h>>>=2,m-=2;break;case r2:for(h>>>=m&7,m-=m&7;m<32;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if((h&65535)!==(h>>>16^65535)){r.msg="invalid stored block lengths",s.mode=us;break}if(s.length=h&65535,h=0,m=0,s.mode=lg,t===Gf)break e;case lg:s.mode=s2;case s2:if(p=s.length,p){if(p>c&&(p=c),p>u&&(p=u),p===0)break e;o.set(n.subarray(l,l+p),d),c-=p,l+=p,u-=p,d+=p,s.length-=p;break}s.mode=yl;break;case a2:for(;m<14;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(s.nlen=(h&31)+257,h>>>=5,m-=5,s.ndist=(h&31)+1,h>>>=5,m-=5,s.ncode=(h&15)+4,h>>>=4,m-=4,s.nlen>286||s.ndist>30){r.msg="too many length or distance symbols",s.mode=us;break}s.have=0,s.mode=n2;case n2:for(;s.have<s.ncode;){for(;m<3;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.lens[U[s.have++]]=h&7,h>>>=3,m-=3}for(;s.have<19;)s.lens[U[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,ne={bits:s.lenbits},V=Bh(mk,s.lens,0,19,s.lencode,0,s.work,ne),s.lenbits=ne.bits,V){r.msg="invalid code lengths set",s.mode=us;break}s.have=0,s.mode=i2;case i2:for(;s.have<s.nlen+s.ndist;){for(;B=s.lencode[h&(1<<s.lenbits)-1],g=B>>>24,j=B>>>16&255,_=B&65535,!(g<=m);){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(_<16)h>>>=g,m-=g,s.lens[s.have++]=_;else{if(_===16){for(Z=g+2;m<Z;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(h>>>=g,m-=g,s.have===0){r.msg="invalid bit length repeat",s.mode=us;break}M=s.lens[s.have-1],p=3+(h&3),h>>>=2,m-=2}else if(_===17){for(Z=g+3;m<Z;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}h>>>=g,m-=g,M=0,p=3+(h&7),h>>>=3,m-=3}else{for(Z=g+7;m<Z;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}h>>>=g,m-=g,M=0,p=11+(h&127),h>>>=7,m-=7}if(s.have+p>s.nlen+s.ndist){r.msg="invalid bit length repeat",s.mode=us;break}for(;p--;)s.lens[s.have++]=M}}if(s.mode===us)break;if(s.lens[256]===0){r.msg="invalid code -- missing end-of-block",s.mode=us;break}if(s.lenbits=9,ne={bits:s.lenbits},V=Bh(_4,s.lens,0,s.nlen,s.lencode,0,s.work,ne),s.lenbits=ne.bits,V){r.msg="invalid literal/lengths set",s.mode=us;break}if(s.distbits=6,s.distcode=s.distdyn,ne={bits:s.distbits},V=Bh(k4,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,ne),s.distbits=ne.bits,V){r.msg="invalid distances set",s.mode=us;break}if(s.mode=Vf,t===Gf)break e;case Vf:s.mode=Wf;case Wf:if(c>=6&&u>=258){r.next_out=d,r.avail_out=u,r.next_in=l,r.avail_in=c,s.hold=h,s.bits=m,Ak(r,y),d=r.next_out,o=r.output,u=r.avail_out,l=r.next_in,n=r.input,c=r.avail_in,h=s.hold,m=s.bits,s.mode===yl&&(s.back=-1);break}for(s.back=0;B=s.lencode[h&(1<<s.lenbits)-1],g=B>>>24,j=B>>>16&255,_=B&65535,!(g<=m);){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(j&&(j&240)===0){for(w=g,L=j,K=_;B=s.lencode[K+((h&(1<<w+L)-1)>>w)],g=B>>>24,j=B>>>16&255,_=B&65535,!(w+g<=m);){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}h>>>=w,m-=w,s.back+=w}if(h>>>=g,m-=g,s.back+=g,s.length=_,j===0){s.mode=d2;break}if(j&32){s.back=-1,s.mode=yl;break}if(j&64){r.msg="invalid literal/length code",s.mode=us;break}s.extra=j&15,s.mode=o2;case o2:if(s.extra){for(Z=s.extra;m<Z;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.length+=h&(1<<s.extra)-1,h>>>=s.extra,m-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=l2;case l2:for(;B=s.distcode[h&(1<<s.distbits)-1],g=B>>>24,j=B>>>16&255,_=B&65535,!(g<=m);){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if((j&240)===0){for(w=g,L=j,K=_;B=s.distcode[K+((h&(1<<w+L)-1)>>w)],g=B>>>24,j=B>>>16&255,_=B&65535,!(w+g<=m);){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}h>>>=w,m-=w,s.back+=w}if(h>>>=g,m-=g,s.back+=g,j&64){r.msg="invalid distance code",s.mode=us;break}s.offset=_,s.extra=j&15,s.mode=A2;case A2:if(s.extra){for(Z=s.extra;m<Z;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}s.offset+=h&(1<<s.extra)-1,h>>>=s.extra,m-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){r.msg="invalid distance too far back",s.mode=us;break}s.mode=c2;case c2:if(u===0)break e;if(p=y-u,s.offset>p){if(p=s.offset-p,p>s.whave&&s.sane){r.msg="invalid distance too far back",s.mode=us;break}p>s.wnext?(p-=s.wnext,v=s.wsize-p):v=s.wnext-p,p>s.length&&(p=s.length),N=s.window}else N=o,v=d-s.offset,p=s.length;p>u&&(p=u),u-=p,s.length-=p;do o[d++]=N[v++];while(--p);s.length===0&&(s.mode=Wf);break;case d2:if(u===0)break e;o[d++]=s.length,u--,s.mode=Wf;break;case Ag:if(s.wrap){for(;m<32;){if(c===0)break e;c--,h|=n[l++]<<m,m+=8}if(y-=u,r.total_out+=y,s.total+=y,s.wrap&4&&y&&(r.adler=s.check=s.flags?Eo(s.check,o,y,d-y):Pb(s.check,o,y,d-y)),y=u,s.wrap&4&&(s.flags?h:f2(h))!==s.check){r.msg="incorrect data check",s.mode=us;break}h=0,m=0}s.mode=u2;case u2:if(s.wrap&&s.flags){for(;m<32;){if(c===0)break e;c--,h+=n[l++]<<m,m+=8}if(s.wrap&4&&h!==(s.total&4294967295)){r.msg="incorrect length check",s.mode=us;break}h=0,m=0}s.mode=h2;case h2:V=xk;break e;case us:V=F4;break e;case U4:return E4;case Q4:default:return ji}return r.next_out=d,r.avail_out=u,r.next_in=l,r.avail_in=c,s.hold=h,s.bits=m,(s.wsize||y!==r.avail_out&&s.mode<us&&(s.mode<Ag||t!==qv))&&R4(r,r.output,r.next_out,y-r.avail_out),x-=r.avail_in,y-=r.avail_out,r.total_in+=x,r.total_out+=y,s.total+=y,s.wrap&4&&y&&(r.adler=s.check=s.flags?Eo(s.check,o,y,r.next_out-y):Pb(s.check,o,y,r.next_out-y)),r.data_type=s.bits+(s.last?64:0)+(s.mode===yl?128:0)+(s.mode===Vf||s.mode===lg?256:0),(x===0&&y===0||t===qv)&&V===Qc&&(V=bk),V},_k=r=>{if(Tc(r))return ji;let t=r.state;return t.window&&(t.window=null),r.state=null,Qc},kk=(r,t)=>{if(Tc(r))return ji;const s=r.state;return(s.wrap&2)===0?ji:(s.head=t,t.done=!1,Qc)},Fk=(r,t)=>{const s=t.length;let n,o,l;return Tc(r)||(n=r.state,n.wrap!==0&&n.mode!==Zm)?ji:n.mode===Zm&&(o=1,o=Pb(o,t,s,0),o!==n.check)?F4:(l=R4(r,t,s,s),l?(n.mode=U4,E4):(n.havedict=1,Qc))};var Ek=T4,Uk=I4,Qk=L4,Lk=jk,Tk=D4,Ik=Sk,Dk=_k,Rk=kk,Ok=Fk,Hk="pako inflate (from Nodeca project)",jl={inflateReset:Ek,inflateReset2:Uk,inflateResetKeep:Qk,inflateInit:Lk,inflateInit2:Tk,inflate:Ik,inflateEnd:Dk,inflateGetHeader:Rk,inflateSetDictionary:Ok,inflateInfo:Hk};function Mk(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Pk=Mk;const O4=Object.prototype.toString,{Z_NO_FLUSH:Kk,Z_FINISH:zk,Z_OK:Dh,Z_STREAM_END:ug,Z_NEED_DICT:hg,Z_STREAM_ERROR:qk,Z_DATA_ERROR:p2,Z_MEM_ERROR:Gk}=j4;function Kh(r){this.options=C4.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(r&&r.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ok,this.strm.avail_out=0;let s=jl.inflateInit2(this.strm,t.windowBits);if(s!==Dh)throw new Error(Kb[s]);if(this.header=new Pk,jl.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=zb.string2buf(t.dictionary):O4.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(s=jl.inflateSetDictionary(this.strm,t.dictionary),s!==Dh)))throw new Error(Kb[s])}Kh.prototype.push=function(r,t){const s=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let l,d,c;if(this.ended)return!1;for(t===~~t?d=t:d=t===!0?zk:Kk,O4.call(r)==="[object ArrayBuffer]"?s.input=new Uint8Array(r):s.input=r,s.next_in=0,s.avail_in=s.input.length;;){for(s.avail_out===0&&(s.output=new Uint8Array(n),s.next_out=0,s.avail_out=n),l=jl.inflate(s,d),l===hg&&o&&(l=jl.inflateSetDictionary(s,o),l===Dh?l=jl.inflate(s,d):l===p2&&(l=hg));s.avail_in>0&&l===ug&&s.state.wrap>0&&r[s.next_in]!==0;)jl.inflateReset(s),l=jl.inflate(s,d);switch(l){case qk:case p2:case hg:case Gk:return this.onEnd(l),this.ended=!0,!1}if(c=s.avail_out,s.next_out&&(s.avail_out===0||l===ug))if(this.options.to==="string"){let u=zb.utf8border(s.output,s.next_out),h=s.next_out-u,m=zb.buf2string(s.output,u);s.next_out=h,s.avail_out=n-h,h&&s.output.set(s.output.subarray(u,u+h),0),this.onData(m)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(!(l===Dh&&c===0)){if(l===ug)return l=jl.inflateEnd(this.strm),this.onEnd(l),this.ended=!0,!0;if(s.avail_in===0)break}}return!0};Kh.prototype.onData=function(r){this.chunks.push(r)};Kh.prototype.onEnd=function(r){r===Dh&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=C4.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function Vk(r,t){const s=new Kh(t);if(s.push(r),s.err)throw s.msg||Kb[s.err];return s.result}var Wk=Kh,Xk=Vk,Yk={Inflate:Wk,inflate:Xk};const{Inflate:Jk,inflate:Zk}=Yk;var x2=Jk,$k=Zk;const H4=[];for(let r=0;r<256;r++){let t=r;for(let s=0;s<8;s++)t&1?t=3988292384^t>>>1:t=t>>>1;H4[r]=t}const g2=4294967295;function eF(r,t,s){let n=r;for(let o=0;o<s;o++)n=H4[(n^t[o])&255]^n>>>8;return n}function tF(r,t){return(eF(g2,r,t)^g2)>>>0}function b2(r,t,s){const n=r.readUint32(),o=tF(new Uint8Array(r.buffer,r.byteOffset+r.offset-t-4,t),t);if(o!==n)throw new Error(`CRC mismatch for chunk ${s}. Expected ${n}, found ${o}`)}function M4(r,t,s){for(let n=0;n<s;n++)t[n]=r[n]}function P4(r,t,s,n){let o=0;for(;o<n;o++)t[o]=r[o];for(;o<s;o++)t[o]=r[o]+t[o-n]&255}function K4(r,t,s,n){let o=0;if(s.length===0)for(;o<n;o++)t[o]=r[o];else for(;o<n;o++)t[o]=r[o]+s[o]&255}function z4(r,t,s,n,o){let l=0;if(s.length===0){for(;l<o;l++)t[l]=r[l];for(;l<n;l++)t[l]=r[l]+(t[l-o]>>1)&255}else{for(;l<o;l++)t[l]=r[l]+(s[l]>>1)&255;for(;l<n;l++)t[l]=r[l]+(t[l-o]+s[l]>>1)&255}}function q4(r,t,s,n,o){let l=0;if(s.length===0){for(;l<o;l++)t[l]=r[l];for(;l<n;l++)t[l]=r[l]+t[l-o]&255}else{for(;l<o;l++)t[l]=r[l]+s[l]&255;for(;l<n;l++)t[l]=r[l]+rF(t[l-o],s[l],s[l-o])&255}}function rF(r,t,s){const n=r+t-s,o=Math.abs(n-r),l=Math.abs(n-t),d=Math.abs(n-s);return o<=l&&o<=d?r:l<=d?t:s}function sF(r,t,s,n,o,l){switch(r){case 0:M4(t,s,o);break;case 1:P4(t,s,o,l);break;case 2:K4(t,s,n,o);break;case 3:z4(t,s,n,o,l);break;case 4:q4(t,s,n,o,l);break;default:throw new Error(`Unsupported filter: ${r}`)}}const aF=new Uint16Array([255]),nF=new Uint8Array(aF.buffer),iF=nF[0]===255;function oF(r){const{data:t,width:s,height:n,channels:o,depth:l}=r,d=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],c=Math.ceil(l/8)*o,u=new Uint8Array(n*s*c);let h=0;for(let m=0;m<7;m++){const x=d[m],y=Math.ceil((s-x.x)/x.xStep),p=Math.ceil((n-x.y)/x.yStep);if(y<=0||p<=0)continue;const v=y*c,N=new Uint8Array(v);for(let B=0;B<p;B++){const g=t[h++],j=t.subarray(h,h+v);h+=v;const _=new Uint8Array(v);sF(g,j,_,N,v,c),N.set(_);for(let w=0;w<y;w++){const L=x.x+w*x.xStep,K=x.y+B*x.yStep;if(!(L>=s||K>=n))for(let M=0;M<c;M++)u[(K*s+L)*c+M]=_[w*c+M]}}}if(l===16){const m=new Uint16Array(u.buffer);if(iF)for(let x=0;x<m.length;x++)m[x]=lF(m[x]);return m}else return u}function lF(r){return(r&255)<<8|r>>8&255}const AF=new Uint16Array([255]),cF=new Uint8Array(AF.buffer),dF=cF[0]===255,uF=new Uint8Array(0);function y2(r){const{data:t,width:s,height:n,channels:o,depth:l}=r,d=Math.ceil(l/8)*o,c=Math.ceil(l/8*o*s),u=new Uint8Array(n*c);let h=uF,m=0,x,y;for(let p=0;p<n;p++){switch(x=t.subarray(m+1,m+1+c),y=u.subarray(p*c,(p+1)*c),t[m]){case 0:M4(x,y,c);break;case 1:P4(x,y,c,d);break;case 2:K4(x,y,h,c);break;case 3:z4(x,y,h,c,d);break;case 4:q4(x,y,h,c,d);break;default:throw new Error(`Unsupported filter: ${t[m]}`)}h=y,m+=c+1}if(l===16){const p=new Uint16Array(u.buffer);if(dF)for(let v=0;v<p.length;v++)p[v]=hF(p[v]);return p}else return u}function hF(r){return(r&255)<<8|r>>8&255}const Dm=Uint8Array.of(137,80,78,71,13,10,26,10);function w2(r){if(!fF(r.readBytes(Dm.length)))throw new Error("wrong PNG signature")}function fF(r){if(r.length<Dm.length)return!1;for(let t=0;t<Dm.length;t++)if(r[t]!==Dm[t])return!1;return!0}const mF="tEXt",pF=0,G4=new TextDecoder("latin1");function xF(r){if(bF(r),r.length===0||r.length>79)throw new Error("keyword length must be between 1 and 79")}const gF=/^[\u0000-\u00FF]*$/;function bF(r){if(!gF.test(r))throw new Error("invalid latin1 text")}function yF(r,t,s){const n=V4(t);r[n]=wF(t,s-n.length-1)}function V4(r){for(r.mark();r.readByte()!==pF;);const t=r.offset;r.reset();const s=G4.decode(r.readBytes(t-r.offset-1));return r.skip(1),xF(s),s}function wF(r,t){return G4.decode(r.readBytes(t))}const Gn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},fg={UNKNOWN:-1,DEFLATE:0},v2={UNKNOWN:-1,ADAPTIVE:0},mg={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Xf={NONE:0,BACKGROUND:1,PREVIOUS:2},pg={SOURCE:0,OVER:1};class vF extends Qy{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,s={}){super(t);const{checkCrc:n=!1}=s;this._checkCrc=n,this._inflator=new x2,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=fg.UNKNOWN,this._filterMethod=v2.UNKNOWN,this._interlaceMethod=mg.UNKNOWN,this._colorType=Gn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(w2(this);!this._end;){const t=this.readUint32(),s=this.readChars(4);this.decodeChunk(t,s)}return this.decodeImage(),this._png}decodeApng(){for(w2(this);!this._end;){const t=this.readUint32(),s=this.readChars(4);this.decodeApngChunk(t,s)}return this.decodeApngImage(),this._apng}decodeChunk(t,s){const n=this.offset;switch(s){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case mF:yF(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${s}`);this._checkCrc?b2(this,t+4,s):this.skip(4)}decodeApngChunk(t,s){const n=this.offset;switch(s!=="fdAT"&&s!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),s){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,s),this.offset=n+t;break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${s}`);this._checkCrc?b2(this,t+4,s):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=NF(this.readUint8());const s=this.readUint8();this._colorType=s;let n;switch(s){case Gn.GREYSCALE:n=1;break;case Gn.TRUECOLOUR:n=3;break;case Gn.INDEXED_COLOUR:n=1;break;case Gn.GREYSCALE_ALPHA:n=2;break;case Gn.TRUECOLOUR_ALPHA:n=4;break;case Gn.UNKNOWN:default:throw new Error(`Unknown color type: ${s}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==fg.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const s=t/3;this._hasPalette=!0;const n=[];this._palette=n;for(let o=0;o<s;o++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const s=t,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,s)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let s=t,n=this.offset+this.byteOffset;if(n+=4,s-=4,this._inflator.push(new Uint8Array(this.buffer,n,s)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case Gn.GREYSCALE:case Gn.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let s=0;s<t/2;s++)this._transparency[s]=this.readUint16();break}case Gn.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let s=0;for(;s<t;s++){const n=this.readByte();this._palette[s].push(n)}for(;s<this._palette.length;s++)this._palette[s].push(255);break}case Gn.UNKNOWN:case Gn.GREYSCALE_ALPHA:case Gn.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const s=V4(this),n=this.readUint8();if(n!==fg.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const o=this.readBytes(t-s.length-2);this._png.iccEmbeddedProfile={name:s,profile:$k(o)}}decodepHYs(){const t=this.readUint32(),s=this.readUint32(),n=this.readByte();this._png.resolution={x:t,y:s,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const s={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(t);if(n){if(n.data=y2({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)s.data=n.data;else{const o=this._apng.frames.at(t-1);this.disposeFrame(n,o,s),this.addFrameDataToCanvas(s,n)}this._apng.frames.push(s)}}return this._apng}disposeFrame(t,s,n){switch(t.disposeOp){case Xf.NONE:break;case Xf.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let l=0;l<this._png.width;l++){const d=(o*t.width+l)*this._png.channels;for(let c=0;c<this._png.channels;c++)n.data[d+c]=0}break;case Xf.PREVIOUS:n.data.set(s.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,s){const n=1<<this._png.depth,o=(l,d)=>{const c=((l+s.yOffset)*this._png.width+s.xOffset+d)*this._png.channels,u=(l*s.width+d)*this._png.channels;return{index:c,frameIndex:u}};switch(s.blendOp){case pg.SOURCE:for(let l=0;l<s.height;l++)for(let d=0;d<s.width;d++){const{index:c,frameIndex:u}=o(l,d);for(let h=0;h<this._png.channels;h++)t.data[c+h]=s.data[u+h]}break;case pg.OVER:for(let l=0;l<s.height;l++)for(let d=0;d<s.width;d++){const{index:c,frameIndex:u}=o(l,d);for(let h=0;h<this._png.channels;h++){const m=s.data[u+this._png.channels-1]/n,x=h%(this._png.channels-1)===0?1:s.data[u+h],y=Math.floor(m*x+(1-m)*t.data[c+h]);t.data[c+h]+=y}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==v2.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===mg.NO_INTERLACE)this._png.data=y2({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===mg.ADAM7)this._png.data=oF({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,s=this._frames.at(-1);s?s.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Xf.NONE,blendOp:pg.SOURCE,data:t}),this._inflator=new x2,this._writingDataChunks=!1}}function NF(r){if(r!==1&&r!==2&&r!==4&&r!==8&&r!==16)throw new Error(`invalid bit depth: ${r}`);return r}var N2;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.METRE=1]="METRE"})(N2||(N2={}));function BF(r,t){return new vF(r,t).decode()}var Wt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function xg(){Wt.console&&typeof Wt.console.log=="function"&&Wt.console.log.apply(Wt.console,arguments)}var Xr={log:xg,warn:function(r){Wt.console&&(typeof Wt.console.warn=="function"?Wt.console.warn.apply(Wt.console,arguments):xg.call(null,arguments))},error:function(r){Wt.console&&(typeof Wt.console.error=="function"?Wt.console.error.apply(Wt.console,arguments):xg(r))}};function gg(r,t,s){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){mc(n.response,t,s)},n.onerror=function(){Xr.error("could not download file")},n.send()}function B2(r){var t=new XMLHttpRequest;t.open("HEAD",r,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Yf(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}var mc=Wt.saveAs||((typeof window>"u"?"undefined":Yr(window))!=="object"||window!==Wt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,t,s){var n=Wt.URL||Wt.webkitURL,o=document.createElement("a");t=t||r.name||"download",o.download=t,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?B2(o.href)?gg(r,t,s):Yf(o,o.target="_blank"):Yf(o)):(o.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){Yf(o)},0))}:"msSaveOrOpenBlob"in navigator?function(r,t,s){if(t=t||r.name||"download",typeof r=="string")if(B2(r))gg(r,t,s);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Yf(n)})}else navigator.msSaveOrOpenBlob((function(o,l){return l===void 0?l={autoBom:!1}:Yr(l)!=="object"&&(Xr.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o})(r,s),t)}:function(r,t,s,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return gg(r,t,s);var o=r.type==="application/octet-stream",l=/constructor/i.test(Wt.HTMLElement)||Wt.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||o&&l)&&(typeof FileReader>"u"?"undefined":Yr(FileReader))==="object"){var c=new FileReader;c.onloadend=function(){var m=c.result;m=d?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=m:location=m,n=null},c.readAsDataURL(r)}else{var u=Wt.URL||Wt.webkitURL,h=u.createObjectURL(r);n?n.location=h:location.href=h,n=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});function W4(r){var t;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var s=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(c){return[parseInt(c[1]),parseInt(c[2]),parseInt(c[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(c){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(c){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]}}],n=0;n<s.length;n++){var o=s[n].re,l=s[n].process,d=o.exec(r);d&&(t=l(d),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var c=this.r.toString(16),u=this.g.toString(16),h=this.b.toString(16);return c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),"#"+c+u+h}}var Rm=Wt.atob.bind(Wt),j2=Wt.btoa.bind(Wt);function bg(r,t){var s=r[0],n=r[1],o=r[2],l=r[3];s=Da(s,n,o,l,t[0],7,-680876936),l=Da(l,s,n,o,t[1],12,-389564586),o=Da(o,l,s,n,t[2],17,606105819),n=Da(n,o,l,s,t[3],22,-1044525330),s=Da(s,n,o,l,t[4],7,-176418897),l=Da(l,s,n,o,t[5],12,1200080426),o=Da(o,l,s,n,t[6],17,-1473231341),n=Da(n,o,l,s,t[7],22,-45705983),s=Da(s,n,o,l,t[8],7,1770035416),l=Da(l,s,n,o,t[9],12,-1958414417),o=Da(o,l,s,n,t[10],17,-42063),n=Da(n,o,l,s,t[11],22,-1990404162),s=Da(s,n,o,l,t[12],7,1804603682),l=Da(l,s,n,o,t[13],12,-40341101),o=Da(o,l,s,n,t[14],17,-1502002290),s=Ra(s,n=Da(n,o,l,s,t[15],22,1236535329),o,l,t[1],5,-165796510),l=Ra(l,s,n,o,t[6],9,-1069501632),o=Ra(o,l,s,n,t[11],14,643717713),n=Ra(n,o,l,s,t[0],20,-373897302),s=Ra(s,n,o,l,t[5],5,-701558691),l=Ra(l,s,n,o,t[10],9,38016083),o=Ra(o,l,s,n,t[15],14,-660478335),n=Ra(n,o,l,s,t[4],20,-405537848),s=Ra(s,n,o,l,t[9],5,568446438),l=Ra(l,s,n,o,t[14],9,-1019803690),o=Ra(o,l,s,n,t[3],14,-187363961),n=Ra(n,o,l,s,t[8],20,1163531501),s=Ra(s,n,o,l,t[13],5,-1444681467),l=Ra(l,s,n,o,t[2],9,-51403784),o=Ra(o,l,s,n,t[7],14,1735328473),s=Oa(s,n=Ra(n,o,l,s,t[12],20,-1926607734),o,l,t[5],4,-378558),l=Oa(l,s,n,o,t[8],11,-2022574463),o=Oa(o,l,s,n,t[11],16,1839030562),n=Oa(n,o,l,s,t[14],23,-35309556),s=Oa(s,n,o,l,t[1],4,-1530992060),l=Oa(l,s,n,o,t[4],11,1272893353),o=Oa(o,l,s,n,t[7],16,-155497632),n=Oa(n,o,l,s,t[10],23,-1094730640),s=Oa(s,n,o,l,t[13],4,681279174),l=Oa(l,s,n,o,t[0],11,-358537222),o=Oa(o,l,s,n,t[3],16,-722521979),n=Oa(n,o,l,s,t[6],23,76029189),s=Oa(s,n,o,l,t[9],4,-640364487),l=Oa(l,s,n,o,t[12],11,-421815835),o=Oa(o,l,s,n,t[15],16,530742520),s=Ha(s,n=Oa(n,o,l,s,t[2],23,-995338651),o,l,t[0],6,-198630844),l=Ha(l,s,n,o,t[7],10,1126891415),o=Ha(o,l,s,n,t[14],15,-1416354905),n=Ha(n,o,l,s,t[5],21,-57434055),s=Ha(s,n,o,l,t[12],6,1700485571),l=Ha(l,s,n,o,t[3],10,-1894986606),o=Ha(o,l,s,n,t[10],15,-1051523),n=Ha(n,o,l,s,t[1],21,-2054922799),s=Ha(s,n,o,l,t[8],6,1873313359),l=Ha(l,s,n,o,t[15],10,-30611744),o=Ha(o,l,s,n,t[6],15,-1560198380),n=Ha(n,o,l,s,t[13],21,1309151649),s=Ha(s,n,o,l,t[4],6,-145523070),l=Ha(l,s,n,o,t[11],10,-1120210379),o=Ha(o,l,s,n,t[2],15,718787259),n=Ha(n,o,l,s,t[9],21,-343485551),r[0]=wA(s,r[0]),r[1]=wA(n,r[1]),r[2]=wA(o,r[2]),r[3]=wA(l,r[3])}function gp(r,t,s,n,o,l){return t=wA(wA(t,r),wA(n,l)),wA(t<<o|t>>>32-o,s)}function Da(r,t,s,n,o,l,d){return gp(t&s|~t&n,r,t,o,l,d)}function Ra(r,t,s,n,o,l,d){return gp(t&n|s&~n,r,t,o,l,d)}function Oa(r,t,s,n,o,l,d){return gp(t^s^n,r,t,o,l,d)}function Ha(r,t,s,n,o,l,d){return gp(s^(t|~n),r,t,o,l,d)}function X4(r){var t,s=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=r.length;t+=64)bg(n,jF(r.substring(t-64,t)));r=r.substring(t-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r.length;t++)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(bg(n,o),t=0;t<16;t++)o[t]=0;return o[14]=8*s,bg(n,o),n}function jF(r){var t,s=[];for(t=0;t<64;t+=4)s[t>>2]=r.charCodeAt(t)+(r.charCodeAt(t+1)<<8)+(r.charCodeAt(t+2)<<16)+(r.charCodeAt(t+3)<<24);return s}var C2="0123456789abcdef".split("");function CF(r){for(var t="",s=0;s<4;s++)t+=C2[r>>8*s+4&15]+C2[r>>8*s&15];return t}function SF(r){return String.fromCharCode(255&r,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function qb(r){return X4(r).map(SF).join("")}var _F=(function(r){for(var t=0;t<r.length;t++)r[t]=CF(r[t]);return r.join("")})(X4("hello"))!="5d41402abc4b2a76b9719d911017c592";function wA(r,t){if(_F){var s=(65535&r)+(65535&t);return(r>>16)+(t>>16)+(s>>16)<<16|65535&s}return r+t&4294967295}function Gb(r,t){var s,n,o,l;if(r!==s){for(var d=(o=r,l=1+(256/r.length|0),new Array(l+1).join(o)),c=[],u=0;u<256;u++)c[u]=u;var h=0;for(u=0;u<256;u++){var m=c[u];h=(h+m+d.charCodeAt(u))%256,c[u]=c[h],c[h]=m}s=r,n=c}else c=n;var x=t.length,y=0,p=0,v="";for(u=0;u<x;u++)p=(p+(m=c[y=(y+1)%256]))%256,c[y]=c[p],c[p]=m,d=c[(c[y]+c[p])%256],v+=String.fromCharCode(t.charCodeAt(u)^d);return v}var S2={print:4,modify:8,copy:16,"annot-forms":32};function Hd(r,t,s,n){this.v=1,this.r=2;var o=192;r.forEach(function(c){if(S2.perm!==void 0)throw new Error("Invalid permission: "+c);o+=S2[c]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var l=(t+this.padding).substr(0,32),d=(s+this.padding).substr(0,32);this.O=this.processOwnerPassword(l,d),this.P=-(1+(255^o)),this.encryptionKey=qb(l+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Gb(this.encryptionKey,this.padding)}function Md(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var t="",s=r.length,n=0;n<s;n++){var o=r.charCodeAt(n);t+=o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?"#"+("0"+o.toString(16)).slice(-2):r[n]}return t}function _2(r){if(Yr(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(s,n,o){if(o=o||!1,typeof s!="string"||typeof n!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(s)||(t[s]={});var l=Math.random().toString(35);return t[s][l]=[n,!!o],l},this.unsubscribe=function(s){for(var n in t)if(t[n][s])return delete t[n][s],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(s){if(t.hasOwnProperty(s)){var n=Array.prototype.slice.call(arguments,1),o=[];for(var l in t[s]){var d=t[s][l];try{d[0].apply(r,n)}catch(c){Wt.console&&Xr.error("jsPDF PubSub Error",c.message,c)}d[1]&&o.push(l)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function $m(r){if(!(this instanceof $m))return new $m(r);var t="opacity,stroke-opacity".split(",");for(var s in r)r.hasOwnProperty(s)&&t.indexOf(s)>=0&&(this[s]=r[s]);this.id="",this.objectNumber=-1}function Y4(r,t){this.gState=r,this.matrix=t,this.id="",this.objectNumber=-1}function pc(r,t,s,n,o){if(!(this instanceof pc))return new pc(r,t,s,n,o);this.type=r==="axial"?2:3,this.coords=t,this.colors=s,Y4.call(this,n,o)}function qd(r,t,s,n,o){if(!(this instanceof qd))return new qd(r,t,s,n,o);this.boundingBox=r,this.xStep=t,this.yStep=s,this.stream="",this.cloneIndex=0,Y4.call(this,n,o)}function Ft(r){var t,s=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],o=arguments[2],l=arguments[3],d=[],c=1,u=16,h="S",m=null;Yr(r=r||{})==="object"&&(s=r.orientation,n=r.unit||n,o=r.format||o,l=r.compress||r.compressPdf||l,(m=r.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),c=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(t=r.precision),r.floatPrecision!==void 0&&(u=r.floatPrecision),h=r.defaultPathOperation||"S"),d=r.filters||(l===!0?["FlateEncode"]:d),n=n||"mm",s=(""+(s||"P")).toLowerCase();var x=r.putOnlyUsedFonts||!1,y={},p={internal:{},__private__:{}};p.__private__.PubSub=_2;var v="1.3",N=p.__private__.getPdfVersion=function(){return v};p.__private__.setPdfVersion=function(R){v=R};var B={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return B};var g=p.__private__.getPageFormat=function(R){return B[R]};o=o||"a4";var j="compat",_="advanced",w=j;function L(){this.saveGraphicsState(),ie(new Et(Tt,0,0,-Tt,0,Ti()*Tt).toString()+" cm"),this.setFontSize(this.getFontSize()/Tt),h="n",w=_}function K(){this.restoreGraphicsState(),h="S",w=j}var M=p.__private__.combineFontStyleAndFontWeight=function(R,de){if(R=="bold"&&de=="normal"||R=="bold"&&de==400||R=="normal"&&de=="italic"||R=="bold"&&de=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return de&&(R=de==400||de==="normal"?R==="italic"?"italic":"normal":de!=700&&de!=="bold"||R!=="normal"?(de==700?"bold":de)+""+R:"bold"),R};p.advancedAPI=function(R){var de=w===j;return de&&L.call(this),typeof R!="function"||(R(this),de&&K.call(this)),this},p.compatAPI=function(R){var de=w===_;return de&&K.call(this),typeof R!="function"||(R(this),de&&L.call(this)),this},p.isAdvancedAPI=function(){return w===_};var V,T=function(R){if(w!==_)throw new Error(R+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},ne=p.roundToPrecision=p.__private__.roundToPrecision=function(R,de){var je=t||de;if(isNaN(R)||isNaN(je))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return R.toFixed(je).replace(/0+$/,"")};V=p.hpf=p.__private__.hpf=typeof u=="number"?function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return ne(R,u)}:u==="smart"?function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return ne(R,R>-1&&R<1?16:5)}:function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.hpf");return ne(R,16)};var Z=p.f2=p.__private__.f2=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.f2");return ne(R,2)},U=p.__private__.f3=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.f3");return ne(R,3)},q=p.scale=p.__private__.scale=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.scale");return w===j?R*Tt:w===_?R:void 0},F=function(R){return q((function(de){return w===j?Ti()-de:w===_?de:void 0})(R))};p.__private__.setPrecision=p.setPrecision=function(R){typeof parseInt(R,10)=="number"&&(t=parseInt(R,10))};var le,ae="00000000000000000000000000000000",se=p.__private__.getFileId=function(){return ae},fe=p.__private__.setFileId=function(R){return ae=R!==void 0&&/^[a-fA-F0-9]{32}$/.test(R)?R.toUpperCase():ae.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(Ls=new Hd(m.userPermissions,m.userPassword,m.ownerPassword,ae)),ae};p.setFileId=function(R){return fe(R),this},p.getFileId=function(){return se()};var ye=p.__private__.convertDateToPDFDate=function(R){var de=R.getTimezoneOffset(),je=de<0?"+":"-",Fe=Math.floor(Math.abs(de/60)),Te=Math.abs(de%60),Je=[je,X(Fe),"'",X(Te),"'"].join("");return["D:",R.getFullYear(),X(R.getMonth()+1),X(R.getDate()),X(R.getHours()),X(R.getMinutes()),X(R.getSeconds()),Je].join("")},_e=p.__private__.convertPDFDateToDate=function(R){var de=parseInt(R.substr(2,4),10),je=parseInt(R.substr(6,2),10)-1,Fe=parseInt(R.substr(8,2),10),Te=parseInt(R.substr(10,2),10),Je=parseInt(R.substr(12,2),10),at=parseInt(R.substr(14,2),10);return new Date(de,je,Fe,Te,Je,at,0)},xe=p.__private__.setCreationDate=function(R){var de;if(R===void 0&&(R=new Date),R instanceof Date)de=ye(R);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(R))throw new Error("Invalid argument passed to jsPDF.setCreationDate");de=R}return le=de},D=p.__private__.getCreationDate=function(R){var de=le;return R==="jsDate"&&(de=_e(le)),de};p.setCreationDate=function(R){return xe(R),this},p.getCreationDate=function(R){return D(R)};var $,X=p.__private__.padd2=function(R){return("0"+parseInt(R)).slice(-2)},te=p.__private__.padd2Hex=function(R){return("00"+(R=R.toString())).substr(R.length)},J=0,O=[],H=[],re=0,Ae=[],oe=[],ce=!1,Se=H;p.__private__.setCustomOutputDestination=function(R){ce=!0,Se=R};var z=function(R){ce||(Se=R)};p.__private__.resetCustomOutputDestination=function(){ce=!1,Se=H};var ie=p.__private__.out=function(R){return R=R.toString(),re+=R.length+1,Se.push(R),Se},W=p.__private__.write=function(R){return ie(arguments.length===1?R.toString():Array.prototype.join.call(arguments," "))},Q=p.__private__.getArrayBuffer=function(R){for(var de=R.length,je=new ArrayBuffer(de),Fe=new Uint8Array(je);de--;)Fe[de]=R.charCodeAt(de);return je},I=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return I};var k=r.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(R){return k=w===_?R/Tt:R,this};var G,me=p.__private__.getFontSize=p.getFontSize=function(){return w===j?k:k*Tt},be=r.R2L||!1;p.__private__.setR2L=p.setR2L=function(R){return be=R,this},p.__private__.getR2L=p.getR2L=function(){return be};var Ue,Re=p.__private__.setZoomMode=function(R){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(R))G=R;else if(isNaN(R)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(R)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+R+'" is not recognized.');G=R}else G=parseInt(R,10)};p.__private__.getZoomMode=function(){return G};var He,Ve=p.__private__.setPageMode=function(R){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(R)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+R+'" is not recognized.');Ue=R};p.__private__.getPageMode=function(){return Ue};var it=p.__private__.setLayoutMode=function(R){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(R)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+R+'" is not recognized.');He=R};p.__private__.getLayoutMode=function(){return He},p.__private__.setDisplayMode=p.setDisplayMode=function(R,de,je){return Re(R),it(de),Ve(je),this};var lt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(R){if(Object.keys(lt).indexOf(R)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return lt[R]},p.__private__.getDocumentProperties=function(){return lt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(R){for(var de in lt)lt.hasOwnProperty(de)&&R[de]&&(lt[de]=R[de]);return this},p.__private__.setDocumentProperty=function(R,de){if(Object.keys(lt).indexOf(R)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return lt[R]=de};var ut,Tt,mt,Ur,jt,_t={},Dt={},Gt=[],kt={},Fr={},It={},Pt={},Br=null,zt=0,Bt=[],cr=new _2(p),_n=r.hotfixes||[],Aa={},Xn={},an=[],Et=function R(de,je,Fe,Te,Je,at){if(!(this instanceof R))return new R(de,je,Fe,Te,Je,at);isNaN(de)&&(de=1),isNaN(je)&&(je=0),isNaN(Fe)&&(Fe=0),isNaN(Te)&&(Te=1),isNaN(Je)&&(Je=0),isNaN(at)&&(at=0),this._matrix=[de,je,Fe,Te,Je,at]};Object.defineProperty(Et.prototype,"sx",{get:function(){return this._matrix[0]},set:function(R){this._matrix[0]=R}}),Object.defineProperty(Et.prototype,"shy",{get:function(){return this._matrix[1]},set:function(R){this._matrix[1]=R}}),Object.defineProperty(Et.prototype,"shx",{get:function(){return this._matrix[2]},set:function(R){this._matrix[2]=R}}),Object.defineProperty(Et.prototype,"sy",{get:function(){return this._matrix[3]},set:function(R){this._matrix[3]=R}}),Object.defineProperty(Et.prototype,"tx",{get:function(){return this._matrix[4]},set:function(R){this._matrix[4]=R}}),Object.defineProperty(Et.prototype,"ty",{get:function(){return this._matrix[5]},set:function(R){this._matrix[5]=R}}),Object.defineProperty(Et.prototype,"a",{get:function(){return this._matrix[0]},set:function(R){this._matrix[0]=R}}),Object.defineProperty(Et.prototype,"b",{get:function(){return this._matrix[1]},set:function(R){this._matrix[1]=R}}),Object.defineProperty(Et.prototype,"c",{get:function(){return this._matrix[2]},set:function(R){this._matrix[2]=R}}),Object.defineProperty(Et.prototype,"d",{get:function(){return this._matrix[3]},set:function(R){this._matrix[3]=R}}),Object.defineProperty(Et.prototype,"e",{get:function(){return this._matrix[4]},set:function(R){this._matrix[4]=R}}),Object.defineProperty(Et.prototype,"f",{get:function(){return this._matrix[5]},set:function(R){this._matrix[5]=R}}),Object.defineProperty(Et.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Et.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Et.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Et.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Et.prototype.join=function(R){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(V).join(R)},Et.prototype.multiply=function(R){var de=R.sx*this.sx+R.shy*this.shx,je=R.sx*this.shy+R.shy*this.sy,Fe=R.shx*this.sx+R.sy*this.shx,Te=R.shx*this.shy+R.sy*this.sy,Je=R.tx*this.sx+R.ty*this.shx+this.tx,at=R.tx*this.shy+R.ty*this.sy+this.ty;return new Et(de,je,Fe,Te,Je,at)},Et.prototype.decompose=function(){var R=this.sx,de=this.shy,je=this.shx,Fe=this.sy,Te=this.tx,Je=this.ty,at=Math.sqrt(R*R+de*de),yt=(R/=at)*je+(de/=at)*Fe;je-=R*yt,Fe-=de*yt;var Ct=Math.sqrt(je*je+Fe*Fe);return yt/=Ct,R*(Fe/=Ct)<de*(je/=Ct)&&(R=-R,de=-de,yt=-yt,at=-at),{scale:new Et(at,0,0,Ct,0,0),translate:new Et(1,0,0,1,Te,Je),rotate:new Et(R,de,-de,R,0,0),skew:new Et(1,0,yt,1,0,0)}},Et.prototype.toString=function(R){return this.join(" ")},Et.prototype.inversed=function(){var R=this.sx,de=this.shy,je=this.shx,Fe=this.sy,Te=this.tx,Je=this.ty,at=1/(R*Fe-de*je),yt=Fe*at,Ct=-de*at,Kt=-je*at,Yt=R*at;return new Et(yt,Ct,Kt,Yt,-yt*Te-Kt*Je,-Ct*Te-Yt*Je)},Et.prototype.applyToPoint=function(R){var de=R.x*this.sx+R.y*this.shx+this.tx,je=R.x*this.shy+R.y*this.sy+this.ty;return new ln(de,je)},Et.prototype.applyToRectangle=function(R){var de=this.applyToPoint(R),je=this.applyToPoint(new ln(R.x+R.w,R.y+R.h));return new Fi(de.x,de.y,je.x-de.x,je.y-de.y)},Et.prototype.clone=function(){var R=this.sx,de=this.shy,je=this.shx,Fe=this.sy,Te=this.tx,Je=this.ty;return new Et(R,de,je,Fe,Te,Je)},p.Matrix=Et;var Ci=p.matrixMult=function(R,de){return de.multiply(R)},Yn=new Et(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Yn;var qa=function(R,de){if(!Fr[R]){var je=(de instanceof pc?"Sh":"P")+(Object.keys(kt).length+1).toString(10);de.id=je,Fr[R]=je,kt[je]=de,cr.publish("addPattern",de)}};p.ShadingPattern=pc,p.TilingPattern=qd,p.addShadingPattern=function(R,de){return T("addShadingPattern()"),qa(R,de),this},p.beginTilingPattern=function(R){T("beginTilingPattern()"),Jo(R.boundingBox[0],R.boundingBox[1],R.boundingBox[2]-R.boundingBox[0],R.boundingBox[3]-R.boundingBox[1],R.matrix)},p.endTilingPattern=function(R,de){T("endTilingPattern()"),de.stream=oe[$].join(`
`),qa(R,de),cr.publish("endTilingPattern",de),an.pop().restore()};var Ga,Jr=p.__private__.newObject=function(){var R=ws();return qs(R,!0),R},ws=p.__private__.newObjectDeferred=function(){return J++,O[J]=function(){return re},J},qs=function(R,de){return de=typeof de=="boolean"&&de,O[R]=re,de&&ie(R+" 0 obj"),R},co=p.__private__.newAdditionalObject=function(){var R={objId:ws(),content:""};return Ae.push(R),R},wa=ws(),Qr=ws(),ts=p.__private__.decodeColorString=function(R){var de=R.split(" ");if(de.length!==2||de[1]!=="g"&&de[1]!=="G")de.length!==5||de[4]!=="k"&&de[4]!=="K"||(de=[(1-de[0])*(1-de[3]),(1-de[1])*(1-de[3]),(1-de[2])*(1-de[3]),"r"]);else{var je=parseFloat(de[0]);de=[je,je,je,"r"]}for(var Fe="#",Te=0;Te<3;Te++)Fe+=("0"+Math.floor(255*parseFloat(de[Te])).toString(16)).slice(-2);return Fe},ca=p.__private__.encodeColorString=function(R){var de;typeof R=="string"&&(R={ch1:R});var je=R.ch1,Fe=R.ch2,Te=R.ch3,Je=R.ch4,at=R.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof je=="string"&&je.charAt(0)!=="#"){var yt=new W4(je);if(yt.ok)je=yt.toHex();else if(!/^\d*\.?\d*$/.test(je))throw new Error('Invalid color "'+je+'" passed to jsPDF.encodeColorString.')}if(typeof je=="string"&&/^#[0-9A-Fa-f]{3}$/.test(je)&&(je="#"+je[1]+je[1]+je[2]+je[2]+je[3]+je[3]),typeof je=="string"&&/^#[0-9A-Fa-f]{6}$/.test(je)){var Ct=parseInt(je.substr(1),16);je=Ct>>16&255,Fe=Ct>>8&255,Te=255&Ct}if(Fe===void 0||Je===void 0&&je===Fe&&Fe===Te)de=typeof je=="string"?je+" "+at[0]:R.precision===2?Z(je/255)+" "+at[0]:U(je/255)+" "+at[0];else if(Je===void 0||Yr(Je)==="object"){if(Je&&!isNaN(Je.a)&&Je.a===0)return["1.","1.","1.",at[1]].join(" ");de=typeof je=="string"?[je,Fe,Te,at[1]].join(" "):R.precision===2?[Z(je/255),Z(Fe/255),Z(Te/255),at[1]].join(" "):[U(je/255),U(Fe/255),U(Te/255),at[1]].join(" ")}else de=typeof je=="string"?[je,Fe,Te,Je,at[2]].join(" "):R.precision===2?[Z(je),Z(Fe),Z(Te),Z(Je),at[2]].join(" "):[U(je),U(Fe),U(Te),U(Je),at[2]].join(" ");return de},Va=p.__private__.getFilters=function(){return d},nn=p.__private__.putStream=function(R){var de=(R=R||{}).data||"",je=R.filters||Va(),Fe=R.alreadyAppliedFilters||[],Te=R.addLength1||!1,Je=de.length,at=R.objectId,yt=function(Ts){return Ts};if(m!==null&&at===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(yt=Ls.encryptor(at,0));var Ct={};je===!0&&(je=["FlateEncode"]);var Kt=R.additionalKeyValues||[],Yt=(Ct=Ft.API.processDataByFilters!==void 0?Ft.API.processDataByFilters(de,je):{data:de,reverseChain:[]}).reverseChain+(Array.isArray(Fe)?Fe.join(" "):Fe.toString());if(Ct.data.length!==0&&(Kt.push({key:"Length",value:Ct.data.length}),Te===!0&&Kt.push({key:"Length1",value:Je})),Yt.length!=0)if(Yt.split("/").length-1==1)Kt.push({key:"Filter",value:Yt});else{Kt.push({key:"Filter",value:"["+Yt+"]"});for(var dr=0;dr<Kt.length;dr+=1)if(Kt[dr].key==="DecodeParms"){for(var rs=[],ms=0;ms<Ct.reverseChain.split("/").length-1;ms+=1)rs.push("null");rs.push(Kt[dr].value),Kt[dr].value="["+rs.join(" ")+"]"}}ie("<<");for(var Dr=0;Dr<Kt.length;Dr++)ie("/"+Kt[Dr].key+" "+Kt[Dr].value);ie(">>"),Ct.data.length!==0&&(ie("stream"),ie(yt(Ct.data)),ie("endstream"))},qo=p.__private__.putPage=function(R){var de=R.number,je=R.data,Fe=R.objId,Te=R.contentsObjId;qs(Fe,!0),ie("<</Type /Page"),ie("/Parent "+R.rootDictionaryObjId+" 0 R"),ie("/Resources "+R.resourceDictionaryObjId+" 0 R"),ie("/MediaBox ["+parseFloat(V(R.mediaBox.bottomLeftX))+" "+parseFloat(V(R.mediaBox.bottomLeftY))+" "+V(R.mediaBox.topRightX)+" "+V(R.mediaBox.topRightY)+"]"),R.cropBox!==null&&ie("/CropBox ["+V(R.cropBox.bottomLeftX)+" "+V(R.cropBox.bottomLeftY)+" "+V(R.cropBox.topRightX)+" "+V(R.cropBox.topRightY)+"]"),R.bleedBox!==null&&ie("/BleedBox ["+V(R.bleedBox.bottomLeftX)+" "+V(R.bleedBox.bottomLeftY)+" "+V(R.bleedBox.topRightX)+" "+V(R.bleedBox.topRightY)+"]"),R.trimBox!==null&&ie("/TrimBox ["+V(R.trimBox.bottomLeftX)+" "+V(R.trimBox.bottomLeftY)+" "+V(R.trimBox.topRightX)+" "+V(R.trimBox.topRightY)+"]"),R.artBox!==null&&ie("/ArtBox ["+V(R.artBox.bottomLeftX)+" "+V(R.artBox.bottomLeftY)+" "+V(R.artBox.topRightX)+" "+V(R.artBox.topRightY)+"]"),typeof R.userUnit=="number"&&R.userUnit!==1&&ie("/UserUnit "+R.userUnit),cr.publish("putPage",{objId:Fe,pageContext:Bt[de],pageNumber:de,page:je}),ie("/Contents "+Te+" 0 R"),ie(">>"),ie("endobj");var Je=je.join(`
`);return w===_&&(Je+=`
Q`),qs(Te,!0),nn({data:Je,filters:Va(),objectId:Te}),ie("endobj"),Fe},kn=p.__private__.putPages=function(){var R,de,je=[];for(R=1;R<=zt;R++)Bt[R].objId=ws(),Bt[R].contentsObjId=ws();for(R=1;R<=zt;R++)je.push(qo({number:R,data:oe[R],objId:Bt[R].objId,contentsObjId:Bt[R].contentsObjId,mediaBox:Bt[R].mediaBox,cropBox:Bt[R].cropBox,bleedBox:Bt[R].bleedBox,trimBox:Bt[R].trimBox,artBox:Bt[R].artBox,userUnit:Bt[R].userUnit,rootDictionaryObjId:wa,resourceDictionaryObjId:Qr}));qs(wa,!0),ie("<</Type /Pages");var Fe="/Kids [";for(de=0;de<zt;de++)Fe+=je[de]+" 0 R ";ie(Fe+"]"),ie("/Count "+zt),ie(">>"),ie("endobj"),cr.publish("postPutPages")},Fn=function(R){cr.publish("putFont",{font:R,out:ie,newObject:Jr,putStream:nn}),R.isAlreadyPutted!==!0&&(R.objectNumber=Jr(),ie("<<"),ie("/Type /Font"),ie("/BaseFont /"+Md(R.postScriptName)),ie("/Subtype /Type1"),typeof R.encoding=="string"&&ie("/Encoding /"+R.encoding),ie("/FirstChar 32"),ie("/LastChar 255"),ie(">>"),ie("endobj"))},uo=function(R){R.objectNumber=Jr();var de=[];de.push({key:"Type",value:"/XObject"}),de.push({key:"Subtype",value:"/Form"}),de.push({key:"BBox",value:"["+[V(R.x),V(R.y),V(R.x+R.width),V(R.y+R.height)].join(" ")+"]"}),de.push({key:"Matrix",value:"["+R.matrix.toString()+"]"});var je=R.pages[1].join(`
`);nn({data:je,additionalKeyValues:de,objectId:R.objectNumber}),ie("endobj")},En=function(R,de){de||(de=21);var je=Jr(),Fe=(function(at,yt){var Ct,Kt=[],Yt=1/(yt-1);for(Ct=0;Ct<1;Ct+=Yt)Kt.push(Ct);if(Kt.push(1),at[0].offset!=0){var dr={offset:0,color:at[0].color};at.unshift(dr)}if(at[at.length-1].offset!=1){var rs={offset:1,color:at[at.length-1].color};at.push(rs)}for(var ms="",Dr=0,Ts=0;Ts<Kt.length;Ts++){for(Ct=Kt[Ts];Ct>at[Dr+1].offset;)Dr++;var Ns=at[Dr].offset,ea=(Ct-Ns)/(at[Dr+1].offset-Ns),Ii=at[Dr].color,Dn=at[Dr+1].color;ms+=te(Math.round((1-ea)*Ii[0]+ea*Dn[0]).toString(16))+te(Math.round((1-ea)*Ii[1]+ea*Dn[1]).toString(16))+te(Math.round((1-ea)*Ii[2]+ea*Dn[2]).toString(16))}return ms.trim()})(R.colors,de),Te=[];Te.push({key:"FunctionType",value:"0"}),Te.push({key:"Domain",value:"[0.0 1.0]"}),Te.push({key:"Size",value:"["+de+"]"}),Te.push({key:"BitsPerSample",value:"8"}),Te.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Te.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),nn({data:Fe,additionalKeyValues:Te,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:je}),ie("endobj"),R.objectNumber=Jr(),ie("<< /ShadingType "+R.type),ie("/ColorSpace /DeviceRGB");var Je="/Coords ["+V(parseFloat(R.coords[0]))+" "+V(parseFloat(R.coords[1]))+" ";R.type===2?Je+=V(parseFloat(R.coords[2]))+" "+V(parseFloat(R.coords[3])):Je+=V(parseFloat(R.coords[2]))+" "+V(parseFloat(R.coords[3]))+" "+V(parseFloat(R.coords[4]))+" "+V(parseFloat(R.coords[5])),ie(Je+="]"),R.matrix&&ie("/Matrix ["+R.matrix.toString()+"]"),ie("/Function "+je+" 0 R"),ie("/Extend [true true]"),ie(">>"),ie("endobj")},Un=function(R,de){var je=ws(),Fe=Jr();de.push({resourcesOid:je,objectOid:Fe}),R.objectNumber=Fe;var Te=[];Te.push({key:"Type",value:"/Pattern"}),Te.push({key:"PatternType",value:"1"}),Te.push({key:"PaintType",value:"1"}),Te.push({key:"TilingType",value:"1"}),Te.push({key:"BBox",value:"["+R.boundingBox.map(V).join(" ")+"]"}),Te.push({key:"XStep",value:V(R.xStep)}),Te.push({key:"YStep",value:V(R.yStep)}),Te.push({key:"Resources",value:je+" 0 R"}),R.matrix&&Te.push({key:"Matrix",value:"["+R.matrix.toString()+"]"}),nn({data:R.stream,additionalKeyValues:Te,objectId:R.objectNumber}),ie("endobj")},Go=function(R){for(var de in R.objectNumber=Jr(),ie("<<"),R)switch(de){case"opacity":ie("/ca "+Z(R[de]));break;case"stroke-opacity":ie("/CA "+Z(R[de]))}ie(">>"),ie("endobj")},Jn=function(R){qs(R.resourcesOid,!0),ie("<<"),ie("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var de in ie("/Font <<"),_t)_t.hasOwnProperty(de)&&(x===!1||x===!0&&y.hasOwnProperty(de))&&ie("/"+de+" "+_t[de].objectNumber+" 0 R");ie(">>")})(),(function(){if(Object.keys(kt).length>0){for(var de in ie("/Shading <<"),kt)kt.hasOwnProperty(de)&&kt[de]instanceof pc&&kt[de].objectNumber>=0&&ie("/"+de+" "+kt[de].objectNumber+" 0 R");cr.publish("putShadingPatternDict"),ie(">>")}})(),(function(de){if(Object.keys(kt).length>0){for(var je in ie("/Pattern <<"),kt)kt.hasOwnProperty(je)&&kt[je]instanceof p.TilingPattern&&kt[je].objectNumber>=0&&kt[je].objectNumber<de&&ie("/"+je+" "+kt[je].objectNumber+" 0 R");cr.publish("putTilingPatternDict"),ie(">>")}})(R.objectOid),(function(){if(Object.keys(It).length>0){var de;for(de in ie("/ExtGState <<"),It)It.hasOwnProperty(de)&&It[de].objectNumber>=0&&ie("/"+de+" "+It[de].objectNumber+" 0 R");cr.publish("putGStateDict"),ie(">>")}})(),(function(){for(var de in ie("/XObject <<"),Aa)Aa.hasOwnProperty(de)&&Aa[de].objectNumber>=0&&ie("/"+de+" "+Aa[de].objectNumber+" 0 R");cr.publish("putXobjectDict"),ie(">>")})(),ie(">>"),ie("endobj")},fs=function(R){Dt[R.fontName]=Dt[R.fontName]||{},Dt[R.fontName][R.fontStyle]=R.id},UA=function(R,de,je,Fe,Te){var Je={id:"F"+(Object.keys(_t).length+1).toString(10),postScriptName:R,fontName:de,fontStyle:je,encoding:Fe,isStandardFont:Te||!1,metadata:{}};return cr.publish("addFont",{font:Je,instance:this}),_t[Je.id]=Je,fs(Je),Je.id},Wa=p.__private__.pdfEscape=p.pdfEscape=function(R,de){return(function(je,Fe){var Te,Je,at,yt,Ct,Kt,Yt,dr,rs;if(at=(Fe=Fe||{}).sourceEncoding||"Unicode",Ct=Fe.outputEncoding,(Fe.autoencode||Ct)&&_t[ut].metadata&&_t[ut].metadata[at]&&_t[ut].metadata[at].encoding&&(yt=_t[ut].metadata[at].encoding,!Ct&&_t[ut].encoding&&(Ct=_t[ut].encoding),!Ct&&yt.codePages&&(Ct=yt.codePages[0]),typeof Ct=="string"&&(Ct=yt[Ct]),Ct)){for(Yt=!1,Kt=[],Te=0,Je=je.length;Te<Je;Te++)(dr=Ct[je.charCodeAt(Te)])?Kt.push(String.fromCharCode(dr)):Kt.push(je[Te]),Kt[Te].charCodeAt(0)>>8&&(Yt=!0);je=Kt.join("")}for(Te=je.length;Yt===void 0&&Te!==0;)je.charCodeAt(Te-1)>>8&&(Yt=!0),Te--;if(!Yt)return je;for(Kt=Fe.noBOM?[]:[254,255],Te=0,Je=je.length;Te<Je;Te++){if((rs=(dr=je.charCodeAt(Te))>>8)>>8)throw new Error("Character at position "+Te+" of string '"+je+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Kt.push(rs),Kt.push(dr-(rs<<8))}return String.fromCharCode.apply(void 0,Kt)})(R,de).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qn=p.__private__.beginPage=function(R){oe[++zt]=[],Bt[zt]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(R[0]),topRightY:Number(R[1])}},LA(zt),z(oe[$])},Si=function(R,de){var je,Fe,Te;switch(s=de||s,typeof R=="string"&&(je=g(R.toLowerCase()),Array.isArray(je)&&(Fe=je[0],Te=je[1])),Array.isArray(R)&&(Fe=R[0]*Tt,Te=R[1]*Tt),isNaN(Fe)&&(Fe=o[0],Te=o[1]),(Fe>14400||Te>14400)&&(Xr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Fe=Math.min(14400,Fe),Te=Math.min(14400,Te)),o=[Fe,Te],s.substr(0,1)){case"l":Te>Fe&&(o=[Te,Fe]);break;case"p":Fe>Te&&(o=[Te,Fe])}Qn(o),Rt(Wo),ie(Ja),Rl!==0&&ie(Rl+" J"),Gs!==0&&ie(Gs+" j"),cr.publish("addPage",{pageNumber:zt})},QA=function(R){R>0&&R<=zt&&(oe.splice(R,1),Bt.splice(R,1),zt--,$>zt&&($=zt),this.setPage($))},LA=function(R){R>0&&R<=zt&&($=R)},TA=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return oe.length-1},Oc=function(R,de,je){var Fe,Te=void 0;return je=je||{},R=R!==void 0?R:_t[ut].fontName,de=de!==void 0?de:_t[ut].fontStyle,Fe=R.toLowerCase(),Dt[Fe]!==void 0&&Dt[Fe][de]!==void 0?Te=Dt[Fe][de]:Dt[R]!==void 0&&Dt[R][de]!==void 0?Te=Dt[R][de]:je.disableWarning===!1&&Xr.warn("Unable to look up font label for font '"+R+"', '"+de+"'. Refer to getFontList() for available fonts."),Te||je.noFallback||(Te=Dt.times[de])==null&&(Te=Dt.times.normal),Te},Xa=p.__private__.putInfo=function(){var R=Jr(),de=function(Fe){return Fe};for(var je in m!==null&&(de=Ls.encryptor(R,0)),ie("<<"),ie("/Producer ("+Wa(de("jsPDF "+Ft.version))+")"),lt)lt.hasOwnProperty(je)&&lt[je]&&ie("/"+je.substr(0,1).toUpperCase()+je.substr(1)+" ("+Wa(de(lt[je]))+")");ie("/CreationDate ("+Wa(de(le))+")"),ie(">>"),ie("endobj")},_i=p.__private__.putCatalog=function(R){var de=(R=R||{}).rootDictionaryObjId||wa;switch(Jr(),ie("<<"),ie("/Type /Catalog"),ie("/Pages "+de+" 0 R"),G||(G="fullwidth"),G){case"fullwidth":ie("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ie("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ie("/OpenAction [3 0 R /Fit]");break;case"original":ie("/OpenAction [3 0 R /XYZ null null 1]");break;default:var je=""+G;je.substr(je.length-1)==="%"&&(G=parseInt(G)/100),typeof G=="number"&&ie("/OpenAction [3 0 R /XYZ null null "+Z(G)+"]")}switch(He||(He="continuous"),He){case"continuous":ie("/PageLayout /OneColumn");break;case"single":ie("/PageLayout /SinglePage");break;case"two":case"twoleft":ie("/PageLayout /TwoColumnLeft");break;case"tworight":ie("/PageLayout /TwoColumnRight")}Ue&&ie("/PageMode /"+Ue),cr.publish("putCatalog"),ie(">>"),ie("endobj")},Ln=p.__private__.putTrailer=function(){ie("trailer"),ie("<<"),ie("/Size "+(J+1)),ie("/Root "+J+" 0 R"),ie("/Info "+(J-1)+" 0 R"),m!==null&&ie("/Encrypt "+Ls.oid+" 0 R"),ie("/ID [ <"+ae+"> <"+ae+"> ]"),ie(">>")},yr=p.__private__.putHeader=function(){ie("%PDF-"+v),ie("%ºß¬à")},IA=p.__private__.putXRef=function(){var R="0000000000";ie("xref"),ie("0 "+(J+1)),ie("0000000000 65535 f ");for(var de=1;de<=J;de++)typeof O[de]=="function"?ie((R+O[de]()).slice(-10)+" 00000 n "):O[de]!==void 0?ie((R+O[de]).slice(-10)+" 00000 n "):ie("0000000000 00000 n ")},Zn=p.__private__.buildDocument=function(){var R;J=0,re=0,H=[],O=[],Ae=[],wa=ws(),Qr=ws(),z(H),cr.publish("buildDocument"),yr(),kn(),(function(){cr.publish("putAdditionalObjects");for(var je=0;je<Ae.length;je++){var Fe=Ae[je];qs(Fe.objId,!0),ie(Fe.content),ie("endobj")}cr.publish("postPutAdditionalObjects")})(),R=[],(function(){for(var je in _t)_t.hasOwnProperty(je)&&(x===!1||x===!0&&y.hasOwnProperty(je))&&Fn(_t[je])})(),(function(){var je;for(je in It)It.hasOwnProperty(je)&&Go(It[je])})(),(function(){for(var je in Aa)Aa.hasOwnProperty(je)&&uo(Aa[je])})(),(function(je){var Fe;for(Fe in kt)kt.hasOwnProperty(Fe)&&(kt[Fe]instanceof pc?En(kt[Fe]):kt[Fe]instanceof qd&&Un(kt[Fe],je))})(R),cr.publish("putResources"),R.forEach(Jn),Jn({resourcesOid:Qr,objectOid:Number.MAX_SAFE_INTEGER}),cr.publish("postPutResources"),m!==null&&(Ls.oid=Jr(),ie("<<"),ie("/Filter /Standard"),ie("/V "+Ls.v),ie("/R "+Ls.r),ie("/U <"+Ls.toHexString(Ls.U)+">"),ie("/O <"+Ls.toHexString(Ls.O)+">"),ie("/P "+Ls.P),ie(">>"),ie("endobj")),Xa(),_i();var de=re;return IA(),Ln(),ie("startxref"),ie(""+de),ie("%%EOF"),z(oe[$]),H.join(`
`)},ho=p.__private__.getBlob=function(R){return new Blob([Q(R)],{type:"application/pdf"})},DA=p.output=p.__private__.output=(Ga=function(R,de){switch(typeof(de=de||{})=="string"?de={filename:de}:de.filename=de.filename||"generated.pdf",R){case void 0:return Zn();case"save":p.save(de.filename);break;case"arraybuffer":return Q(Zn());case"blob":return ho(Zn());case"bloburi":case"bloburl":if(Wt.URL!==void 0&&typeof Wt.URL.createObjectURL=="function")return Wt.URL&&Wt.URL.createObjectURL(ho(Zn()))||void 0;Xr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var je="",Fe=Zn();try{je=j2(Fe)}catch{je=j2(unescape(encodeURIComponent(Fe)))}return"data:application/pdf;filename="+de.filename+";base64,"+je;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Wt)==="[object Window]"){var Te="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Je=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';de.pdfObjectUrl&&(Te=de.pdfObjectUrl,Je="");var at='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Te+'"'+Je+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(de)+");<\/script></body></html>",yt=Wt.open();return yt!==null&&yt.document.write(at),yt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Wt)==="[object Window]"){var Ct='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(de.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+de.filename+'" width="500px" height="400px" /></body></html>',Kt=Wt.open();if(Kt!==null){Kt.document.write(Ct);var Yt=this;Kt.document.documentElement.querySelector("#pdfViewer").onload=function(){Kt.document.title=de.filename,Kt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Yt.output("bloburl"))}}return Kt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Wt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var dr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",de)+'"></iframe></body></html>',rs=Wt.open();if(rs!==null&&(rs.document.write(dr),rs.document.title=de.filename),rs||typeof safari>"u")return rs;break;case"datauri":case"dataurl":return Wt.document.location.href=this.output("datauristring",de);default:return null}},Ga.foo=function(){try{return Ga.apply(this,arguments)}catch(je){var R=je.stack||"";~R.indexOf(" at ")&&(R=R.split(" at ")[1]);var de="Error in function "+R.split(`
`)[0].split("<")[0]+": "+je.message;if(!Wt.console)throw new Error(de);Wt.console.error(de,je),Wt.alert&&alert(de)}},Ga.foo.bar=Ga,Ga.foo),va=function(R){return Array.isArray(_n)===!0&&_n.indexOf(R)>-1};switch(n){case"pt":Tt=1;break;case"mm":Tt=72/25.4;break;case"cm":Tt=72/2.54;break;case"in":Tt=72;break;case"px":Tt=va("px_scaling")==1?.75:96/72;break;case"pc":case"em":Tt=12;break;case"ex":Tt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);Tt=n}var Ls=null;xe(),fe();var vs=p.__private__.getPageInfo=p.getPageInfo=function(R){if(isNaN(R)||R%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Bt[R].objId,pageNumber:R,pageContext:Bt[R]}},Il=p.__private__.getPageInfoByObjId=function(R){if(isNaN(R)||R%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var de in Bt)if(Bt[de].objId===R)break;return vs(de)},Hc=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Bt[$].objId,pageNumber:$,pageContext:Bt[$]}};p.addPage=function(){return Si.apply(this,arguments),this},p.setPage=function(){return LA.apply(this,arguments),z.call(this,oe[$]),this},p.insertPage=function(R){return this.addPage(),this.movePage($,R),this},p.movePage=function(R,de){var je,Fe;if(R>de){je=oe[R],Fe=Bt[R];for(var Te=R;Te>de;Te--)oe[Te]=oe[Te-1],Bt[Te]=Bt[Te-1];oe[de]=je,Bt[de]=Fe,this.setPage(de)}else if(R<de){je=oe[R],Fe=Bt[R];for(var Je=R;Je<de;Je++)oe[Je]=oe[Je+1],Bt[Je]=Bt[Je+1];oe[de]=je,Bt[de]=Fe,this.setPage(de)}return this},p.deletePage=function(){return QA.apply(this,arguments),this},p.__private__.text=p.text=function(R,de,je,Fe,Te){var Je,at,yt,Ct,Kt,Yt,dr,rs,ms,Dr=(Fe=Fe||{}).scope||this;if(typeof R=="number"&&typeof de=="number"&&(typeof je=="string"||Array.isArray(je))){var Ts=je;je=de,de=R,R=Ts}if(arguments[3]instanceof Et==0?(yt=arguments[4],Ct=arguments[5],Yr(dr=arguments[3])==="object"&&dr!==null||(typeof yt=="string"&&(Ct=yt,yt=null),typeof dr=="string"&&(Ct=dr,dr=null),typeof dr=="number"&&(yt=dr,dr=null),Fe={flags:dr,angle:yt,align:Ct})):(T("The transform parameter of text() with a Matrix value"),ms=Te),isNaN(de)||isNaN(je)||R==null)throw new Error("Invalid arguments passed to jsPDF.text");if(R.length===0)return Dr;var Ns,ea="",Ii=typeof Fe.lineHeightFactor=="number"?Fe.lineHeightFactor:ki,Dn=Dr.internal.scaleFactor;function Di(wr){return wr=wr.split(" ").join(Array(Fe.TabLen||9).join(" ")),Wa(wr,dr)}function GA(wr){for(var ur,Rr=wr.concat(),xs=[],li=Rr.length;li--;)typeof(ur=Rr.shift())=="string"?xs.push(ur):Array.isArray(wr)&&(ur.length===1||ur[1]===void 0&&ur[2]===void 0)?xs.push(ur[0]):xs.push([ur[0],ur[1],ur[2]]);return xs}function Hl(wr,ur){var Rr;if(typeof wr=="string")Rr=ur(wr)[0];else if(Array.isArray(wr)){for(var xs,li,Mn=wr.concat(),tl=[],XA=Mn.length;XA--;)typeof(xs=Mn.shift())=="string"?tl.push(ur(xs)[0]):Array.isArray(xs)&&typeof xs[0]=="string"&&(li=ur(xs[0],xs[1],xs[2]),tl.push([li[0],li[1],li[2]]));Rr=tl}return Rr}var ti=!1,Rn=!0;if(typeof R=="string")ti=!0;else if(Array.isArray(R)){var $o=R.concat();at=[];for(var Ri,Vs=$o.length;Vs--;)(typeof(Ri=$o.shift())!="string"||Array.isArray(Ri)&&typeof Ri[0]!="string")&&(Rn=!1);ti=Rn}if(ti===!1)throw new Error('Type of text must be string or Array. "'+R+'" is not recognized.');typeof R=="string"&&(R=R.match(/[\r?\n]/)?R.split(/\r\n|\r|\n/g):[R]);var mo=k/Dr.internal.scaleFactor,po=mo*(Ii-1);switch(Fe.baseline){case"bottom":je-=po;break;case"top":je+=mo-po;break;case"hanging":je+=mo-2*po;break;case"middle":je+=mo/2-po}if((Yt=Fe.maxWidth||0)>0&&(typeof R=="string"?R=Dr.splitTextToSize(R,Yt):Object.prototype.toString.call(R)==="[object Array]"&&(R=R.reduce(function(wr,ur){return wr.concat(Dr.splitTextToSize(ur,Yt))},[]))),Je={text:R,x:de,y:je,options:Fe,mutex:{pdfEscape:Wa,activeFontKey:ut,fonts:_t,activeFontSize:k}},cr.publish("preProcessText",Je),R=Je.text,yt=(Fe=Je.options).angle,ms instanceof Et==0&&yt&&typeof yt=="number"){yt*=Math.PI/180,Fe.rotationDirection===0&&(yt=-yt),w===_&&(yt=-yt);var Ml=Math.cos(yt),ri=Math.sin(yt);ms=new Et(Ml,ri,-ri,Ml,0,0)}else yt&&yt instanceof Et&&(ms=yt);w!==_||ms||(ms=Yn),(Kt=Fe.charSpace||on)!==void 0&&(ea+=V(q(Kt))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(rs=Fe.horizontalScale)!==void 0&&(ea+=V(100*rs)+` Tz
`),Fe.lang;var Ba=-1,Oi=Fe.renderingMode!==void 0?Fe.renderingMode:Fe.stroke,Pl=Dr.internal.getCurrentPageInfo().pageContext;switch(Oi){case 0:case!1:case"fill":Ba=0;break;case 1:case!0:case"stroke":Ba=1;break;case 2:case"fillThenStroke":Ba=2;break;case 3:case"invisible":Ba=3;break;case 4:case"fillAndAddForClipping":Ba=4;break;case 5:case"strokeAndAddPathForClipping":Ba=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Ba=6;break;case 7:case"addToPathForClipping":Ba=7}var VA=Pl.usedRenderingMode!==void 0?Pl.usedRenderingMode:-1;Ba!==-1?ea+=Ba+` Tr
`:VA!==-1&&(ea+=`0 Tr
`),Ba!==-1&&(Pl.usedRenderingMode=Ba),Ct=Fe.align||"left";var Za,On=k*Ii,Hi=Dr.internal.pageSize.getWidth(),WA=_t[ut];Kt=Fe.charSpace||on,Yt=Fe.maxWidth||0,dr=Object.assign({autoencode:!0,noBOM:!0},Fe.flags);var Hn=[],xo=function(wr){return Dr.getStringUnitWidth(wr,{font:WA,charSpace:Kt,fontSize:k,doKerning:!1})*k/Dn};if(Object.prototype.toString.call(R)==="[object Array]"){var Ta;at=GA(R),Ct!=="left"&&(Za=at.map(xo));var ja,si=0;if(Ct==="right"){de-=Za[0],R=[],Vs=at.length;for(var ai=0;ai<Vs;ai++)ai===0?(ja=Ya(de),Ta=$s(je)):(ja=q(si-Za[ai]),Ta=-On),R.push([at[ai],ja,Ta]),si=Za[ai]}else if(Ct==="center"){de-=Za[0]/2,R=[],Vs=at.length;for(var Mi=0;Mi<Vs;Mi++)Mi===0?(ja=Ya(de),Ta=$s(je)):(ja=q((si-Za[Mi])/2),Ta=-On),R.push([at[Mi],ja,Ta]),si=Za[Mi]}else if(Ct==="left"){R=[],Vs=at.length;for(var Kl=0;Kl<Vs;Kl++)R.push(at[Kl])}else if(Ct==="justify"&&WA.encoding==="Identity-H"){R=[],Vs=at.length,Yt=Yt!==0?Yt:Hi;for(var zl=0,ps=0;ps<Vs;ps++)if(Ta=ps===0?$s(je):-On,ja=ps===0?Ya(de):zl,ps<Vs-1){var Xc=q((Yt-Za[ps])/(at[ps].split(" ").length-1)),ni=at[ps].split(" ");R.push([ni[0]+" ",ja,Ta]),zl=0;for(var ii=1;ii<ni.length;ii++){var ta=(xo(ni[ii-1]+" "+ni[ii])-xo(ni[ii]))*Dn+Xc;ii==ni.length-1?R.push([ni[ii],ta,0]):R.push([ni[ii]+" ",ta,0]),zl-=ta}}else R.push([at[ps],ja,Ta]);R.push(["",zl,0])}else{if(Ct!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(R=[],Vs=at.length,Yt=Yt!==0?Yt:Hi,ps=0;ps<Vs;ps++){Ta=ps===0?$s(je):-On,ja=ps===0?Ya(de):0;var Pi=at[ps].split(" ").length-1,ql=Pi>0?(Yt-Za[ps])/Pi:0;ps<Vs-1?Hn.push(V(q(ql))):Hn.push(0),R.push([at[ps],ja,Ta])}}}(typeof Fe.R2L=="boolean"?Fe.R2L:be)===!0&&(R=Hl(R,function(wr,ur,Rr){return[wr.split("").reverse().join(""),ur,Rr]})),Je={text:R,x:de,y:je,options:Fe,mutex:{pdfEscape:Wa,activeFontKey:ut,fonts:_t,activeFontSize:k}},cr.publish("postProcessText",Je),R=Je.text,Ns=Je.mutex.isHex||!1;var Gl=_t[ut].encoding;Gl!=="WinAnsiEncoding"&&Gl!=="StandardEncoding"||(R=Hl(R,function(wr,ur,Rr){return[Di(wr),ur,Rr]})),at=GA(R),R=[];for(var Ki,zi,oi,el=Array.isArray(at[0])?1:0,$a="",qi=function(wr,ur,Rr){var xs="";return Rr instanceof Et?(Rr=typeof Fe.angle=="number"?Ci(Rr,new Et(1,0,0,1,wr,ur)):Ci(new Et(1,0,0,1,wr,ur),Rr),w===_&&(Rr=Ci(new Et(1,0,0,-1,0,0),Rr)),xs=Rr.join(" ")+` Tm
`):xs=V(wr)+" "+V(ur)+` Td
`,xs},da=0;da<at.length;da++){switch($a="",el){case 1:oi=(Ns?"<":"(")+at[da][0]+(Ns?">":")"),Ki=parseFloat(at[da][1]),zi=parseFloat(at[da][2]);break;case 0:oi=(Ns?"<":"(")+at[da]+(Ns?">":")"),Ki=Ya(de),zi=$s(je)}Hn!==void 0&&Hn[da]!==void 0&&($a=Hn[da]+` Tw
`),da===0?R.push($a+qi(Ki,zi,ms)+oi):el===0?R.push($a+oi):el===1&&R.push($a+qi(Ki,zi,ms)+oi)}R=el===0?R.join(` Tj
T* `):R.join(` Tj
`),R+=` Tj
`;var An=`BT
/`;return An+=ut+" "+k+` Tf
`,An+=V(k*Ii)+` TL
`,An+=$n+`
`,An+=ea,An+=R,ie(An+="ET"),y[ut]=!0,Dr};var RA=p.__private__.clip=p.clip=function(R){return ie(R==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return RA("evenodd")},p.__private__.discardPath=p.discardPath=function(){return ie("n"),this};var Na=p.__private__.isValidStyle=function(R){var de=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(R)!==-1&&(de=!0),de};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(R){return Na(R)&&(h=R),this};var OA=p.__private__.getStyle=p.getStyle=function(R){var de=h;switch(R){case"D":case"S":de="S";break;case"F":de="f";break;case"FD":case"DF":de="B";break;case"f":case"f*":case"B":case"B*":de=R}return de},HA=p.close=function(){return ie("h"),this};p.stroke=function(){return ie("S"),this},p.fill=function(R){return Tn("f",R),this},p.fillEvenOdd=function(R){return Tn("f*",R),this},p.fillStroke=function(R){return Tn("B",R),this},p.fillStrokeEvenOdd=function(R){return Tn("B*",R),this};var Tn=function(R,de){Yr(de)==="object"?Pc(de,R):ie(R)},Vo=function(R){R===null||w===_&&R===void 0||(R=OA(R),ie(R))};function Mc(R,de,je,Fe,Te){var Je=new qd(de||this.boundingBox,je||this.xStep,Fe||this.yStep,this.gState,Te||this.matrix);Je.stream=this.stream;var at=R+"$$"+this.cloneIndex+++"$$";return qa(at,Je),Je}var Pc=function(R,de){var je=Fr[R.key],Fe=kt[je];if(Fe instanceof pc)ie("q"),ie(MA(de)),Fe.gState&&p.setGState(Fe.gState),ie(R.matrix.toString()+" cm"),ie("/"+je+" sh"),ie("Q");else if(Fe instanceof qd){var Te=new Et(1,0,0,-1,0,Ti());R.matrix&&(Te=Te.multiply(R.matrix||Yn),je=Mc.call(Fe,R.key,R.boundingBox,R.xStep,R.yStep,Te).id),ie("q"),ie("/Pattern cs"),ie("/"+je+" scn"),Fe.gState&&p.setGState(Fe.gState),ie(de),ie("Q")}},MA=function(R){switch(R){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},PA=p.moveTo=function(R,de){return ie(V(q(R))+" "+V(F(de))+" m"),this},Kc=p.lineTo=function(R,de){return ie(V(q(R))+" "+V(F(de))+" l"),this},La=p.curveTo=function(R,de,je,Fe,Te,Je){return ie([V(q(R)),V(F(de)),V(q(je)),V(F(Fe)),V(q(Te)),V(F(Je)),"c"].join(" ")),this};p.__private__.line=p.line=function(R,de,je,Fe,Te){if(isNaN(R)||isNaN(de)||isNaN(je)||isNaN(Fe)||!Na(Te))throw new Error("Invalid arguments passed to jsPDF.line");return w===j?this.lines([[je-R,Fe-de]],R,de,[1,1],Te||"S"):this.lines([[je-R,Fe-de]],R,de,[1,1]).stroke()},p.__private__.lines=p.lines=function(R,de,je,Fe,Te,Je){var at,yt,Ct,Kt,Yt,dr,rs,ms,Dr,Ts,Ns,ea;if(typeof R=="number"&&(ea=je,je=de,de=R,R=ea),Fe=Fe||[1,1],Je=Je||!1,isNaN(de)||isNaN(je)||!Array.isArray(R)||!Array.isArray(Fe)||!Na(Te)||typeof Je!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(PA(de,je),at=Fe[0],yt=Fe[1],Kt=R.length,Ts=de,Ns=je,Ct=0;Ct<Kt;Ct++)(Yt=R[Ct]).length===2?(Ts=Yt[0]*at+Ts,Ns=Yt[1]*yt+Ns,Kc(Ts,Ns)):(dr=Yt[0]*at+Ts,rs=Yt[1]*yt+Ns,ms=Yt[2]*at+Ts,Dr=Yt[3]*yt+Ns,Ts=Yt[4]*at+Ts,Ns=Yt[5]*yt+Ns,La(dr,rs,ms,Dr,Ts,Ns));return Je&&HA(),Vo(Te),this},p.path=function(R){for(var de=0;de<R.length;de++){var je=R[de],Fe=je.c;switch(je.op){case"m":PA(Fe[0],Fe[1]);break;case"l":Kc(Fe[0],Fe[1]);break;case"c":La.apply(this,Fe);break;case"h":HA()}}return this},p.__private__.rect=p.rect=function(R,de,je,Fe,Te){if(isNaN(R)||isNaN(de)||isNaN(je)||isNaN(Fe)||!Na(Te))throw new Error("Invalid arguments passed to jsPDF.rect");return w===j&&(Fe=-Fe),ie([V(q(R)),V(F(de)),V(q(je)),V(q(Fe)),"re"].join(" ")),Vo(Te),this},p.__private__.triangle=p.triangle=function(R,de,je,Fe,Te,Je,at){if(isNaN(R)||isNaN(de)||isNaN(je)||isNaN(Fe)||isNaN(Te)||isNaN(Je)||!Na(at))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[je-R,Fe-de],[Te-je,Je-Fe],[R-Te,de-Je]],R,de,[1,1],at,!0),this},p.__private__.roundedRect=p.roundedRect=function(R,de,je,Fe,Te,Je,at){if(isNaN(R)||isNaN(de)||isNaN(je)||isNaN(Fe)||isNaN(Te)||isNaN(Je)||!Na(at))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var yt=4/3*(Math.SQRT2-1);return Te=Math.min(Te,.5*je),Je=Math.min(Je,.5*Fe),this.lines([[je-2*Te,0],[Te*yt,0,Te,Je-Je*yt,Te,Je],[0,Fe-2*Je],[0,Je*yt,-Te*yt,Je,-Te,Je],[2*Te-je,0],[-Te*yt,0,-Te,-Je*yt,-Te,-Je],[0,2*Je-Fe],[0,-Je*yt,Te*yt,-Je,Te,-Je]],R+Te,de,[1,1],at,!0),this},p.__private__.ellipse=p.ellipse=function(R,de,je,Fe,Te){if(isNaN(R)||isNaN(de)||isNaN(je)||isNaN(Fe)||!Na(Te))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Je=4/3*(Math.SQRT2-1)*je,at=4/3*(Math.SQRT2-1)*Fe;return PA(R+je,de),La(R+je,de-at,R+Je,de-Fe,R,de-Fe),La(R-Je,de-Fe,R-je,de-at,R-je,de),La(R-je,de+at,R-Je,de+Fe,R,de+Fe),La(R+Je,de+Fe,R+je,de+at,R+je,de),Vo(Te),this},p.__private__.circle=p.circle=function(R,de,je,Fe){if(isNaN(R)||isNaN(de)||isNaN(je)||!Na(Fe))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(R,de,je,je,Fe)},p.setFont=function(R,de,je){return je&&(de=M(de,je)),ut=Oc(R,de,{disableWarning:!1}),this};var In=p.__private__.getFont=p.getFont=function(){return _t[Oc.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var R,de,je={};for(R in Dt)if(Dt.hasOwnProperty(R))for(de in je[R]=[],Dt[R])Dt[R].hasOwnProperty(de)&&je[R].push(de);return je},p.addFont=function(R,de,je,Fe,Te){var Je=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Je.indexOf(arguments[3])!==-1?Te=arguments[3]:arguments[3]&&Je.indexOf(arguments[3])==-1&&(je=M(je,Fe)),UA.call(this,R,de,je,Te=Te||"Identity-H")};var ki,Wo=r.lineWidth||.200025,fo=p.__private__.getLineWidth=p.getLineWidth=function(){return Wo},Rt=p.__private__.setLineWidth=p.setLineWidth=function(R){return Wo=R,ie(V(q(R))+" w"),this};p.__private__.setLineDash=Ft.API.setLineDash=Ft.API.setLineDashPattern=function(R,de){if(R=R||[],de=de||0,isNaN(de)||!Array.isArray(R))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return R=R.map(function(je){return V(q(je))}).join(" "),de=V(q(de)),ie("["+R+"] "+de+" d"),this};var zc=p.__private__.getLineHeight=p.getLineHeight=function(){return k*ki};p.__private__.getLineHeight=p.getLineHeight=function(){return k*ki};var KA=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(R){return typeof(R=R||1.15)=="number"&&(ki=R),this},qc=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return ki};KA(r.lineHeight);var Ya=p.__private__.getHorizontalCoordinate=function(R){return q(R)},$s=p.__private__.getVerticalCoordinate=function(R){return w===_?R:Bt[$].mediaBox.topRightY-Bt[$].mediaBox.bottomLeftY-q(R)},zA=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(R){return V(Ya(R))},Xo=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(R){return V($s(R))},Ja=r.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return ts(Ja)},p.__private__.setStrokeColor=p.setDrawColor=function(R,de,je,Fe){return Ja=ca({ch1:R,ch2:de,ch3:je,ch4:Fe,pdfColorType:"draw",precision:2}),ie(Ja),this};var Yo=r.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return ts(Yo)},p.__private__.setFillColor=p.setFillColor=function(R,de,je,Fe){return Yo=ca({ch1:R,ch2:de,ch3:je,ch4:Fe,pdfColorType:"fill",precision:2}),ie(Yo),this};var $n=r.textColor||"0 g",Gc=p.__private__.getTextColor=p.getTextColor=function(){return ts($n)};p.__private__.setTextColor=p.setTextColor=function(R,de,je,Fe){return $n=ca({ch1:R,ch2:de,ch3:je,ch4:Fe,pdfColorType:"text",precision:3}),this};var on=r.charSpace,Dl=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(on||0)};p.__private__.setCharSpace=p.setCharSpace=function(R){if(isNaN(R))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return on=R,this};var Rl=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(R){var de=p.CapJoinStyles[R];if(de===void 0)throw new Error("Line cap style of '"+R+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Rl=de,ie(de+" J"),this};var Gs=0;p.__private__.setLineJoin=p.setLineJoin=function(R){var de=p.CapJoinStyles[R];if(de===void 0)throw new Error("Line join style of '"+R+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Gs=de,ie(de+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(R){if(R=R||0,isNaN(R))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ie(V(q(R))+" M"),this},p.GState=$m,p.setGState=function(R){(R=typeof R=="string"?It[Pt[R]]:ei(null,R)).equals(Br)||(ie("/"+R.id+" gs"),Br=R)};var ei=function(R,de){if(!R||!Pt[R]){var je=!1;for(var Fe in It)if(It.hasOwnProperty(Fe)&&It[Fe].equals(de)){je=!0;break}if(je)de=It[Fe];else{var Te="GS"+(Object.keys(It).length+1).toString(10);It[Te]=de,de.id=Te}return R&&(Pt[R]=de.id),cr.publish("addGState",de),de}};p.addGState=function(R,de){return ei(R,de),this},p.saveGraphicsState=function(){return ie("q"),Gt.push({key:ut,size:k,color:$n}),this},p.restoreGraphicsState=function(){ie("Q");var R=Gt.pop();return ut=R.key,k=R.size,$n=R.color,Br=null,this},p.setCurrentTransformationMatrix=function(R){return ie(R.toString()+" cm"),this},p.comment=function(R){return ie("#"+R),this};var ln=function(R,de){var je=R||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return je},set:function(Je){isNaN(Je)||(je=parseFloat(Je))}});var Fe=de||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Fe},set:function(Je){isNaN(Je)||(Fe=parseFloat(Je))}});var Te="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Te},set:function(Je){Te=Je.toString()}}),this},Fi=function(R,de,je,Fe){ln.call(this,R,de),this.type="rect";var Te=je||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Te},set:function(at){isNaN(at)||(Te=parseFloat(at))}});var Je=Fe||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Je},set:function(at){isNaN(at)||(Je=parseFloat(at))}}),this},Ol=function(){this.page=zt,this.currentPage=$,this.pages=oe.slice(0),this.pagesContext=Bt.slice(0),this.x=mt,this.y=Ur,this.matrix=jt,this.width=Ui($),this.height=qA($),this.outputDestination=Se,this.id="",this.objectNumber=-1};Ol.prototype.restore=function(){zt=this.page,$=this.currentPage,Bt=this.pagesContext,oe=this.pages,mt=this.x,Ur=this.y,jt=this.matrix,Zo($,this.width),Qi($,this.height),Se=this.outputDestination};var Jo=function(R,de,je,Fe,Te){an.push(new Ol),zt=$=0,oe=[],mt=R,Ur=de,jt=Te,Qn([je,Fe])};for(var Ei in p.beginFormObject=function(R,de,je,Fe,Te){return Jo(R,de,je,Fe,Te),this},p.endFormObject=function(R){return(function(de){if(Xn[de])an.pop().restore();else{var je=new Ol,Fe="Xo"+(Object.keys(Aa).length+1).toString(10);je.id=Fe,Xn[de]=Fe,Aa[Fe]=je,cr.publish("addFormObject",je),an.pop().restore()}})(R),this},p.doFormObject=function(R,de){var je=Aa[Xn[R]];return ie("q"),ie(de.toString()+" cm"),ie("/"+je.id+" Do"),ie("Q"),this},p.getFormObject=function(R){var de=Aa[Xn[R]];return{x:de.x,y:de.y,width:de.width,height:de.height,matrix:de.matrix}},p.save=function(R,de){return R=R||"generated.pdf",(de=de||{}).returnPromise=de.returnPromise||!1,de.returnPromise===!1?(mc(ho(Zn()),R),typeof mc.unload=="function"&&Wt.setTimeout&&setTimeout(mc.unload,911),this):new Promise(function(je,Fe){try{var Te=mc(ho(Zn()),R);typeof mc.unload=="function"&&Wt.setTimeout&&setTimeout(mc.unload,911),je(Te)}catch(Je){Fe(Je.message)}})},Ft.API)Ft.API.hasOwnProperty(Ei)&&(Ei==="events"&&Ft.API.events.length?(function(R,de){var je,Fe,Te;for(Te=de.length-1;Te!==-1;Te--)je=de[Te][0],Fe=de[Te][1],R.subscribe.apply(R,[je].concat(typeof Fe=="function"?[Fe]:Fe))})(cr,Ft.API.events):p[Ei]=Ft.API[Ei]);function Ui(R){return Bt[R].mediaBox.topRightX-Bt[R].mediaBox.bottomLeftX}function Zo(R,de){Bt[R].mediaBox.topRightX=de+Bt[R].mediaBox.bottomLeftX}function qA(R){return Bt[R].mediaBox.topRightY-Bt[R].mediaBox.bottomLeftY}function Qi(R,de){Bt[R].mediaBox.topRightY=de+Bt[R].mediaBox.bottomLeftY}var Li=p.getPageWidth=function(R){return Ui(R=R||$)/Tt},Vc=p.setPageWidth=function(R,de){Zo(R,de*Tt)},Ti=p.getPageHeight=function(R){return qA(R=R||$)/Tt},Wc=p.setPageHeight=function(R,de){Qi(R,de*Tt)};return p.internal={pdfEscape:Wa,getStyle:OA,getFont:In,getFontSize:me,getCharSpace:Dl,getTextColor:Gc,getLineHeight:zc,getLineHeightFactor:qc,getLineWidth:fo,write:W,getHorizontalCoordinate:Ya,getVerticalCoordinate:$s,getCoordinateString:zA,getVerticalCoordinateString:Xo,collections:{},newObject:Jr,newAdditionalObject:co,newObjectDeferred:ws,newObjectDeferredBegin:qs,getFilters:Va,putStream:nn,events:cr,scaleFactor:Tt,pageSize:{getWidth:function(){return Li($)},setWidth:function(R){Vc($,R)},getHeight:function(){return Ti($)},setHeight:function(R){Wc($,R)}},encryptionOptions:m,encryption:Ls,getEncryptor:function(R){return m!==null?Ls.encryptor(R,0):function(de){return de}},output:DA,getNumberOfPages:TA,get pages(){return oe},out:ie,f2:Z,f3:U,getPageInfo:vs,getPageInfoByObjId:Il,getCurrentPageInfo:Hc,getPDFVersion:N,Point:ln,Rectangle:Fi,Matrix:Et,hasHotfix:va},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return Li($)},set:function(R){Vc($,R)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Ti($)},set:function(R){Wc($,R)},enumerable:!0,configurable:!0}),(function(R){for(var de=0,je=I.length;de<je;de++){var Fe=UA.call(this,R[de][0],R[de][1],R[de][2],I[de][3],!0);x===!1&&(y[Fe]=!0);var Te=R[de][0].split("-");fs({id:Fe,fontName:Te[0],fontStyle:Te[1]||""})}cr.publish("addFonts",{fonts:_t,dictionary:Dt})}).call(p,I),ut="F1",Si(o,s),cr.publish("initialized"),p}Hd.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Hd.prototype.toHexString=function(r){return r.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Hd.prototype.hexToBytes=function(r){for(var t=[],s=0;s<r.length;s+=2)t.push(String.fromCharCode(parseInt(r.substr(s,2),16)));return t.join("")},Hd.prototype.processOwnerPassword=function(r,t){return Gb(qb(t).substr(0,5),r)},Hd.prototype.encryptor=function(r,t){var s=qb(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return Gb(s,n)}},$m.prototype.equals=function(r){var t,s="id,objectNumber,equals";if(!r||Yr(r)!==Yr(this))return!1;var n=0;for(t in this)if(!(s.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!r.hasOwnProperty(t)||this[t]!==r[t])return!1;n++}for(t in r)r.hasOwnProperty(t)&&s.indexOf(t)<0&&n--;return n===0},Ft.API={events:[]},Ft.version="4.0.0";var Us=Ft.API,Ly=1,Ic=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Fd=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Zt=function(r){return r.toFixed(2)},xA=function(r){return r.toFixed(5)};Us.__acroform__={};var Sn=function(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r},k2=function(r){return r*Ly},Lo=function(r){var t=new Z4,s=Nt.internal.getHeight(r)||0,n=Nt.internal.getWidth(r)||0;return t.BBox=[0,0,Number(Zt(n)),Number(Zt(s))],t},kF=Us.__acroform__.setBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<t},FF=Us.__acroform__.clearBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<t)},EF=Us.__acroform__.getBit=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<t?1:0},Hs=Us.__acroform__.getBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return EF(r,t-1)},Ms=Us.__acroform__.setBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return kF(r,t-1)},Ps=Us.__acroform__.clearBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return FF(r,t-1)},UF=Us.__acroform__.calculateCoordinates=function(r,t){var s=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,o=r[0],l=r[1],d=r[2],c=r[3],u={};return u.lowerLeft_X=s(o)||0,u.lowerLeft_Y=n(l+c)||0,u.upperRight_X=s(o+d)||0,u.upperRight_Y=n(l)||0,[Number(Zt(u.lowerLeft_X)),Number(Zt(u.lowerLeft_Y)),Number(Zt(u.upperRight_X)),Number(Zt(u.upperRight_Y))]},QF=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var t=[],s=r._V||r.DV,n=Vb(r,s),o=r.scope.internal.getFont(r.fontName,r.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(r.scope.__private__.encodeColorString(r.color)),t.push("/"+o+" "+Zt(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var l=Lo(r);return l.scope=r.scope,l.stream=t.join(`
`),l}},Vb=function(r,t){var s=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},o=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");o=r.multiline?o.map(function(Z){return Z.split(`
`)}):o.map(function(Z){return[Z]});var l=s,d=Nt.internal.getHeight(r)||0;d=d<0?-d:d;var c=Nt.internal.getWidth(r)||0;c=c<0?-c:c;var u=function(Z,U,q){if(Z+1<o.length){var F=U+" "+o[Z+1][0];return Jf(F,r,q).width<=c-4}return!1};l++;e:for(;l>0;){t="",l--;var h,m,x=Jf("3",r,l).height,y=r.multiline?d-l:(d-x)/2,p=y+=2,v=0,N=0,B=0;if(l<=0){t=`(...) Tj
`,t+="% Width of Text: "+Jf(t,r,l=12).width+", FieldWidth:"+c+`
`;break}for(var g="",j=0,_=0;_<o.length;_++)if(o.hasOwnProperty(_)){var w=!1;if(o[_].length!==1&&B!==o[_].length-1){if((x+2)*(j+2)+2>d)continue e;g+=o[_][B],w=!0,N=_,_--}else{g=(g+=o[_][B]+" ").substr(g.length-1)==" "?g.substr(0,g.length-1):g;var L=parseInt(_),K=u(L,g,l),M=_>=o.length-1;if(K&&!M){g+=" ",B=0;continue}if(K||M){if(M)N=L;else if(r.multiline&&(x+2)*(j+2)+2>d)continue e}else{if(!r.multiline||(x+2)*(j+2)+2>d)continue e;N=L}}for(var V="",T=v;T<=N;T++){var ne=o[T];if(r.multiline){if(T===N){V+=ne[B]+" ",B=(B+1)%ne.length;continue}if(T===v){V+=ne[ne.length-1]+" ";continue}}V+=ne[0]+" "}switch(V=V.substr(V.length-1)==" "?V.substr(0,V.length-1):V,m=Jf(V,r,l).width,r.textAlign){case"right":h=c-m-2;break;case"center":h=(c-m)/2;break;default:h=2}t+=Zt(h)+" "+Zt(p)+` Td
`,t+="("+Ic(V)+`) Tj
`,t+=-Zt(h)+` 0 Td
`,p=-(l+2),m=0,v=w?N:N+1,j++,g=""}break}return n.text=t,n.fontSize=l,n},Jf=function(r,t,s){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),o=t.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(s),charSpace:0})*parseFloat(s);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(s),charSpace:0})*parseFloat(s)*1.5,width:o}},LF={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},TF=function(r,t){var s={type:"reference",object:r};t.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===s.type&&n.object===s.object})===void 0&&t.internal.getPageInfo(r.page).pageContext.annotations.push(s)},IF=function(r,t){if(t.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(oo.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(LF)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Ly=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new $4,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(s){s.internal.events.unsubscribe(s.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete s.internal.acroformPlugin.acroFormDictionaryRoot._eventID,s.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(s){s.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=s.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in n)if(n.hasOwnProperty(o)){var l=n[o];l.objId=void 0,l.hasAnnotation&&TF(l,s)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(s){if(s.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");s.internal.write("/AcroForm "+s.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(s){(function(n,o){var l=!n;for(var d in n||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(d)){var c=n[d],u=[],h=c.Rect;if(c.Rect&&(c.Rect=UF(c.Rect,o)),o.internal.newObjectDeferredBegin(c.objId,!0),c.DA=Nt.createDefaultAppearanceStream(c),Yr(c)==="object"&&typeof c.getKeyValueListForStream=="function"&&(u=c.getKeyValueListForStream()),c.Rect=h,c.hasAppearanceStream&&!c.appearanceStreamContent){var m=QF(c);u.push({key:"AP",value:"<</N "+m+">>"}),o.internal.acroformPlugin.xForms.push(m)}if(c.appearanceStreamContent){var x="";for(var y in c.appearanceStreamContent)if(c.appearanceStreamContent.hasOwnProperty(y)){var p=c.appearanceStreamContent[y];if(x+="/"+y+" ",x+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var d in p)if(p.hasOwnProperty(d)){var v=p[d];typeof v=="function"&&(v=v.call(o,c)),x+="/"+d+" "+v+" ",o.internal.acroformPlugin.xForms.indexOf(v)>=0||o.internal.acroformPlugin.xForms.push(v)}}else typeof(v=p)=="function"&&(v=v.call(o,c)),x+="/"+d+" "+v,o.internal.acroformPlugin.xForms.indexOf(v)>=0||o.internal.acroformPlugin.xForms.push(v);x+=">>"}u.push({key:"AP",value:`<<
`+x+">>"})}o.internal.putStream({additionalKeyValues:u,objectId:c.objId}),o.internal.out("endobj")}l&&(function(N,B){for(var g in N)if(N.hasOwnProperty(g)){var j=g,_=N[g];B.internal.newObjectDeferredBegin(_.objId,!0),Yr(_)==="object"&&typeof _.putStream=="function"&&_.putStream(),delete N[j]}})(o.internal.acroformPlugin.xForms,o)})(s,r)}),r.internal.acroformPlugin.isInitialized=!0}},J4=Us.__acroform__.arrayToPdfArray=function(r,t,s){var n=function(d){return d};if(Array.isArray(r)){for(var o="[",l=0;l<r.length;l++)switch(l!==0&&(o+=" "),Yr(r[l])){case"boolean":case"number":case"object":o+=r[l].toString();break;case"string":r[l].substr(0,1)!=="/"?(t!==void 0&&s&&(n=s.internal.getEncryptor(t)),o+="("+Ic(n(r[l].toString()))+")"):o+=r[l].toString()}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},yg=function(r,t,s){var n=function(o){return o};return t!==void 0&&s&&(n=s.internal.getEncryptor(t)),(r=r||"").toString(),"("+Ic(n(r))+")"},Ro=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ro.prototype.toString=function(){return this.objId+" 0 R"},Ro.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},Ro.prototype.getKeyValueListForStream=function(){var r=[],t=Object.getOwnPropertyNames(this).filter(function(l){return l!="content"&&l!="appearanceStreamContent"&&l!="scope"&&l!="objId"&&l.substring(0,1)!="_"});for(var s in t)if(Object.getOwnPropertyDescriptor(this,t[s]).configurable===!1){var n=t[s],o=this[n];o&&(Array.isArray(o)?r.push({key:n,value:J4(o,this.objId,this.scope)}):o instanceof Ro?(o.scope=this.scope,r.push({key:n,value:o.objId+" 0 R"})):typeof o!="function"&&r.push({key:n,value:o}))}return r};var Z4=function(){Ro.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(s){t=s}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(s){r=s.trim()},get:function(){return r||null}})};Sn(Z4,Ro);var $4=function(){Ro.call(this);var r,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var s=function(n){return n};return this.scope&&(s=this.scope.internal.getEncryptor(this.objId)),"("+Ic(s(r))+")"}},set:function(s){r=s}})};Sn($4,Ro);var oo=function r(){Ro.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute F supplied.');t=g}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Hs(t,3)},set:function(g){g?this.F=Ms(t,3):this.F=Ps(t,3)}});var s=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return s},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute Ff supplied.');s=g}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(g){n=g!==void 0?g:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(g){n[0]=g}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(g){n[1]=g}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(g){n[2]=g}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(g){n[3]=g}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(g){switch(g){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=g;break;default:throw new Error('Invalid value "'+g+'" for attribute FT supplied.')}}});var l=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!l||l.length<1){if(this instanceof ep)return;l="FieldObject"+r.FieldNum++}var g=function(j){return j};return this.scope&&(g=this.scope.internal.getEncryptor(this.objId)),"("+Ic(g(l))+")"},set:function(g){l=g.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return l},set:function(g){l=g}});var d="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return d},set:function(g){d=g}});var c="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return c},set:function(g){c=g}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(g){u=g}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/Ly:h},set:function(g){h=g}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(g){m=g}});var x="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!x||this instanceof ep||this instanceof Sc))return yg(x,this.objId,this.scope)},set:function(g){g=g.toString(),x=g}});var y=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(y)return this instanceof ga==0?yg(y,this.objId,this.scope):y},set:function(g){g=g.toString(),y=this instanceof ga==0?g.substr(0,1)==="("?Fd(g.substr(1,g.length-2)):Fd(g):g}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ga==1?Fd(y.substr(1,y.length-1)):y},set:function(g){g=g.toString(),y=this instanceof ga==1?"/"+g:g}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(g){this.V=g}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof ga==0?yg(p,this.objId,this.scope):p},set:function(g){g=g.toString(),p=this instanceof ga==0?g.substr(0,1)==="("?Fd(g.substr(1,g.length-2)):Fd(g):g}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ga==1?Fd(p.substr(1,p.length-1)):p},set:function(g){g=g.toString(),p=this instanceof ga==1?"/"+g:g}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var v,N=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return N},set:function(g){g=!!g,N=g}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(v)return v},set:function(g){v=g}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,1)},set:function(g){g?this.Ff=Ms(this.Ff,1):this.Ff=Ps(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,2)},set:function(g){g?this.Ff=Ms(this.Ff,2):this.Ff=Ps(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,3)},set:function(g){g?this.Ff=Ms(this.Ff,3):this.Ff=Ps(this.Ff,3)}});var B=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(B!==null)return B},set:function(g){if([0,1,2].indexOf(g)===-1)throw new Error('Invalid value "'+g+'" for attribute Q supplied.');B=g}}),Object.defineProperty(this,"textAlign",{get:function(){var g;switch(B){case 0:default:g="left";break;case 1:g="center";break;case 2:g="right"}return g},configurable:!0,enumerable:!0,set:function(g){switch(g){case"right":case 2:B=2;break;case"center":case 1:B=1;break;default:B=0}}})};Sn(oo,Ro);var Yd=function(){oo.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(s){r=s}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(s){r=s}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return J4(t,this.objId,this.scope)},set:function(s){var n,o;o=[],typeof(n=s)=="string"&&(o=(function(l,d,c){c||(c=1);for(var u,h=[];u=d.exec(l);)h.push(u[c]);return h})(n,/\((.*?)\)/g)),t=o}}),this.getOptions=function(){return t},this.setOptions=function(s){t=s,this.sort&&t.sort()},this.addOption=function(s){s=(s=s||"").toString(),t.push(s),this.sort&&t.sort()},this.removeOption=function(s,n){for(n=n||!1,s=(s=s||"").toString();t.indexOf(s)!==-1&&(t.splice(t.indexOf(s),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,18)},set:function(s){s?this.Ff=Ms(this.Ff,18):this.Ff=Ps(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,19)},set:function(s){this.combo===!0&&(s?this.Ff=Ms(this.Ff,19):this.Ff=Ps(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,20)},set:function(s){s?(this.Ff=Ms(this.Ff,20),t.sort()):this.Ff=Ps(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,22)},set:function(s){s?this.Ff=Ms(this.Ff,22):this.Ff=Ps(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,23)},set:function(s){s?this.Ff=Ms(this.Ff,23):this.Ff=Ps(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,27)},set:function(s){s?this.Ff=Ms(this.Ff,27):this.Ff=Ps(this.Ff,27)}}),this.hasAppearanceStream=!1};Sn(Yd,oo);var Jd=function(){Yd.call(this),this.fontName="helvetica",this.combo=!1};Sn(Jd,Yd);var Zd=function(){Jd.call(this),this.combo=!0};Sn(Zd,Jd);var Om=function(){Zd.call(this),this.edit=!0};Sn(Om,Zd);var ga=function(){oo.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,15)},set:function(s){s?this.Ff=Ms(this.Ff,15):this.Ff=Ps(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,16)},set:function(s){s?this.Ff=Ms(this.Ff,16):this.Ff=Ps(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,17)},set:function(s){s?this.Ff=Ms(this.Ff,17):this.Ff=Ps(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,26)},set:function(s){s?this.Ff=Ms(this.Ff,26):this.Ff=Ps(this.Ff,26)}});var r,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var s=function(l){return l};if(this.scope&&(s=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,o=[];for(n in o.push("<<"),t)o.push("/"+n+" ("+Ic(s(t[n]))+")");return o.push(">>"),o.join(`
`)}},set:function(s){Yr(s)==="object"&&(t=s)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(s){typeof s=="string"&&(t.CA=s)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(s){r=s}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(s){r="/"+s}})};Sn(ga,oo);var Hm=function(){ga.call(this),this.pushButton=!0};Sn(Hm,ga);var $d=function(){ga.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t!==void 0?t:[]}})};Sn($d,ga);var ep=function(){var r,t;oo.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(o){r=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(o){t=o}});var s,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(c){return c};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var l,d=[];for(l in d.push("<<"),n)d.push("/"+l+" ("+Ic(o(n[l]))+")");return d.push(">>"),d.join(`
`)},set:function(o){Yr(o)==="object"&&(n=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(o){typeof o=="string"&&(n.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return s},set:function(o){s=o}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return s.substr(1,s.length-1)},set:function(o){s="/"+o}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Nt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Sn(ep,oo),$d.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var s=this.Kids[t];s.appearanceStreamContent=r.createAppearanceStream(s.optionName),s.caption=r.getCA()}},$d.prototype.createOption=function(r){var t=new ep;return t.Parent=this,t.optionName=r,this.Kids.push(t),DF.call(this.scope,t),t};var Mm=function(){ga.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Nt.CheckBox.createAppearanceStream()};Sn(Mm,ga);var Sc=function(){oo.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,13)},set:function(t){t?this.Ff=Ms(this.Ff,13):this.Ff=Ps(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,21)},set:function(t){t?this.Ff=Ms(this.Ff,21):this.Ff=Ps(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,23)},set:function(t){t?this.Ff=Ms(this.Ff,23):this.Ff=Ps(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,24)},set:function(t){t?this.Ff=Ms(this.Ff,24):this.Ff=Ps(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,25)},set:function(t){t?this.Ff=Ms(this.Ff,25):this.Ff=Ps(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,26)},set:function(t){t?this.Ff=Ms(this.Ff,26):this.Ff=Ps(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){Number.isInteger(t)&&(r=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Sn(Sc,oo);var Pm=function(){Sc.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Hs(this.Ff,14)},set:function(r){r?this.Ff=Ms(this.Ff,14):this.Ff=Ps(this.Ff,14)}}),this.password=!0};Sn(Pm,Sc);var Nt={CheckBox:{createAppearanceStream:function(){return{N:{On:Nt.CheckBox.YesNormal},D:{On:Nt.CheckBox.YesPushDown,Off:Nt.CheckBox.OffPushDown}}},YesPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,o=r.scope.__private__.encodeColorString(r.color),l=Vb(r,r.caption);return s.push("0.749023 g"),s.push("0 0 "+Zt(Nt.internal.getWidth(r))+" "+Zt(Nt.internal.getHeight(r))+" re"),s.push("f"),s.push("BMC"),s.push("q"),s.push("0 0 1 rg"),s.push("/"+n+" "+Zt(l.fontSize)+" Tf "+o),s.push("BT"),s.push(l.text),s.push("ET"),s.push("Q"),s.push("EMC"),t.stream=s.join(`
`),t},YesNormal:function(r){var t=Lo(r);t.scope=r.scope;var s=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),o=[],l=Nt.internal.getHeight(r),d=Nt.internal.getWidth(r),c=Vb(r,r.caption);return o.push("1 g"),o.push("0 0 "+Zt(d)+" "+Zt(l)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+Zt(d-1)+" "+Zt(l-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+s+" "+Zt(c.fontSize)+" Tf "+n),o.push(c.text),o.push("ET"),o.push("Q"),t.stream=o.join(`
`),t},OffPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=[];return s.push("0.749023 g"),s.push("0 0 "+Zt(Nt.internal.getWidth(r))+" "+Zt(Nt.internal.getHeight(r))+" re"),s.push("f"),t.stream=s.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(r){var t={D:{Off:Nt.RadioButton.Circle.OffPushDown},N:{}};return t.N[r]=Nt.RadioButton.Circle.YesNormal,t.D[r]=Nt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(r){var t=Lo(r);t.scope=r.scope;var s=[],n=Nt.internal.getWidth(r)<=Nt.internal.getHeight(r)?Nt.internal.getWidth(r)/4:Nt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Nt.internal.Bezier_C,l=Number((n*o).toFixed(5));return s.push("q"),s.push("1 0 0 1 "+xA(Nt.internal.getWidth(r)/2)+" "+xA(Nt.internal.getHeight(r)/2)+" cm"),s.push(n+" 0 m"),s.push(n+" "+l+" "+l+" "+n+" 0 "+n+" c"),s.push("-"+l+" "+n+" -"+n+" "+l+" -"+n+" 0 c"),s.push("-"+n+" -"+l+" -"+l+" -"+n+" 0 -"+n+" c"),s.push(l+" -"+n+" "+n+" -"+l+" "+n+" 0 c"),s.push("f"),s.push("Q"),t.stream=s.join(`
`),t},YesPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=[],n=Nt.internal.getWidth(r)<=Nt.internal.getHeight(r)?Nt.internal.getWidth(r)/4:Nt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Number((2*n).toFixed(5)),l=Number((o*Nt.internal.Bezier_C).toFixed(5)),d=Number((n*Nt.internal.Bezier_C).toFixed(5));return s.push("0.749023 g"),s.push("q"),s.push("1 0 0 1 "+xA(Nt.internal.getWidth(r)/2)+" "+xA(Nt.internal.getHeight(r)/2)+" cm"),s.push(o+" 0 m"),s.push(o+" "+l+" "+l+" "+o+" 0 "+o+" c"),s.push("-"+l+" "+o+" -"+o+" "+l+" -"+o+" 0 c"),s.push("-"+o+" -"+l+" -"+l+" -"+o+" 0 -"+o+" c"),s.push(l+" -"+o+" "+o+" -"+l+" "+o+" 0 c"),s.push("f"),s.push("Q"),s.push("0 g"),s.push("q"),s.push("1 0 0 1 "+xA(Nt.internal.getWidth(r)/2)+" "+xA(Nt.internal.getHeight(r)/2)+" cm"),s.push(n+" 0 m"),s.push(n+" "+d+" "+d+" "+n+" 0 "+n+" c"),s.push("-"+d+" "+n+" -"+n+" "+d+" -"+n+" 0 c"),s.push("-"+n+" -"+d+" -"+d+" -"+n+" 0 -"+n+" c"),s.push(d+" -"+n+" "+n+" -"+d+" "+n+" 0 c"),s.push("f"),s.push("Q"),t.stream=s.join(`
`),t},OffPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=[],n=Nt.internal.getWidth(r)<=Nt.internal.getHeight(r)?Nt.internal.getWidth(r)/4:Nt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Number((2*n).toFixed(5)),l=Number((o*Nt.internal.Bezier_C).toFixed(5));return s.push("0.749023 g"),s.push("q"),s.push("1 0 0 1 "+xA(Nt.internal.getWidth(r)/2)+" "+xA(Nt.internal.getHeight(r)/2)+" cm"),s.push(o+" 0 m"),s.push(o+" "+l+" "+l+" "+o+" 0 "+o+" c"),s.push("-"+l+" "+o+" -"+o+" "+l+" -"+o+" 0 c"),s.push("-"+o+" -"+l+" -"+l+" -"+o+" 0 -"+o+" c"),s.push(l+" -"+o+" "+o+" -"+l+" "+o+" 0 c"),s.push("f"),s.push("Q"),t.stream=s.join(`
`),t}},Cross:{createAppearanceStream:function(r){var t={D:{Off:Nt.RadioButton.Cross.OffPushDown},N:{}};return t.N[r]=Nt.RadioButton.Cross.YesNormal,t.D[r]=Nt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(r){var t=Lo(r);t.scope=r.scope;var s=[],n=Nt.internal.calculateCross(r);return s.push("q"),s.push("1 1 "+Zt(Nt.internal.getWidth(r)-2)+" "+Zt(Nt.internal.getHeight(r)-2)+" re"),s.push("W"),s.push("n"),s.push(Zt(n.x1.x)+" "+Zt(n.x1.y)+" m"),s.push(Zt(n.x2.x)+" "+Zt(n.x2.y)+" l"),s.push(Zt(n.x4.x)+" "+Zt(n.x4.y)+" m"),s.push(Zt(n.x3.x)+" "+Zt(n.x3.y)+" l"),s.push("s"),s.push("Q"),t.stream=s.join(`
`),t},YesPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=Nt.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+Zt(Nt.internal.getWidth(r))+" "+Zt(Nt.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Zt(Nt.internal.getWidth(r)-2)+" "+Zt(Nt.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(Zt(s.x1.x)+" "+Zt(s.x1.y)+" m"),n.push(Zt(s.x2.x)+" "+Zt(s.x2.y)+" l"),n.push(Zt(s.x4.x)+" "+Zt(s.x4.y)+" m"),n.push(Zt(s.x3.x)+" "+Zt(s.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(r){var t=Lo(r);t.scope=r.scope;var s=[];return s.push("0.749023 g"),s.push("0 0 "+Zt(Nt.internal.getWidth(r))+" "+Zt(Nt.internal.getHeight(r))+" re"),s.push("f"),t.stream=s.join(`
`),t}}},createDefaultAppearanceStream:function(r){var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,s=r.scope.__private__.encodeColorString(r.color);return"/"+t+" "+r.fontSize+" Tf "+s}};Nt.internal={Bezier_C:.551915024494,calculateCross:function(r){var t=Nt.internal.getWidth(r),s=Nt.internal.getHeight(r),n=Math.min(t,s);return{x1:{x:(t-n)/2,y:(s-n)/2+n},x2:{x:(t-n)/2+n,y:(s-n)/2},x3:{x:(t-n)/2,y:(s-n)/2},x4:{x:(t-n)/2+n,y:(s-n)/2+n}}}},Nt.internal.getWidth=function(r){var t=0;return Yr(r)==="object"&&(t=k2(r.Rect[2])),t},Nt.internal.getHeight=function(r){var t=0;return Yr(r)==="object"&&(t=k2(r.Rect[3])),t};var DF=Us.addField=function(r){if(IF(this,r),!(r instanceof oo))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=r).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Us.AcroFormChoiceField=Yd,Us.AcroFormListBox=Jd,Us.AcroFormComboBox=Zd,Us.AcroFormEditBox=Om,Us.AcroFormButton=ga,Us.AcroFormPushButton=Hm,Us.AcroFormRadioButton=$d,Us.AcroFormCheckBox=Mm,Us.AcroFormTextField=Sc,Us.AcroFormPasswordField=Pm,Us.AcroFormAppearance=Nt,Us.AcroForm={ChoiceField:Yd,ListBox:Jd,ComboBox:Zd,EditBox:Om,Button:ga,PushButton:Hm,RadioButton:$d,CheckBox:Mm,TextField:Sc,PasswordField:Pm,Appearance:Nt},Ft.AcroForm={ChoiceField:Yd,ListBox:Jd,ComboBox:Zd,EditBox:Om,Button:ga,PushButton:Hm,RadioButton:$d,CheckBox:Mm,TextField:Sc,PasswordField:Pm,Appearance:Nt};Ft.AcroForm;function ej(r){return r.reduce(function(t,s,n){return t[s]=n,t},{})}(function(r){var t="addImage_";r.__addimage__={};var s="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},o=r.__addimage__.getImageFileTypeByImageData=function(Z,U){var q,F,le,ae,se,fe=s;if((U=U||s)==="RGBA"||Z.data!==void 0&&Z.data instanceof Uint8ClampedArray&&"height"in Z&&"width"in Z)return"RGBA";if(K(Z))for(se in n)for(le=n[se],q=0;q<le.length;q+=1){for(ae=!0,F=0;F<le[q].length;F+=1)if(le[q][F]!==void 0&&le[q][F]!==Z[F]){ae=!1;break}if(ae===!0){fe=se;break}}else for(se in n)for(le=n[se],q=0;q<le.length;q+=1){for(ae=!0,F=0;F<le[q].length;F+=1)if(le[q][F]!==void 0&&le[q][F]!==Z.charCodeAt(F)){ae=!1;break}if(ae===!0){fe=se;break}}return fe===s&&U!==s&&(fe=U),fe},l=function Z(U){for(var q=this.internal.write,F=this.internal.putStream,le=(0,this.internal.getFilters)();le.indexOf("FlateEncode")!==-1;)le.splice(le.indexOf("FlateEncode"),1);U.objectId=this.internal.newObject();var ae=[];if(ae.push({key:"Type",value:"/XObject"}),ae.push({key:"Subtype",value:"/Image"}),ae.push({key:"Width",value:U.width}),ae.push({key:"Height",value:U.height}),U.colorSpace===g.INDEXED?ae.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(U.palette.length/3-1)+" "+("sMask"in U&&U.sMask!==void 0?U.objectId+2:U.objectId+1)+" 0 R]"}):(ae.push({key:"ColorSpace",value:"/"+U.colorSpace}),U.colorSpace===g.DEVICE_CMYK&&ae.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ae.push({key:"BitsPerComponent",value:U.bitsPerComponent}),"decodeParameters"in U&&U.decodeParameters!==void 0&&ae.push({key:"DecodeParms",value:"<<"+U.decodeParameters+">>"}),"transparency"in U&&Array.isArray(U.transparency)&&U.transparency.length>0){for(var se="",fe=0,ye=U.transparency.length;fe<ye;fe++)se+=U.transparency[fe]+" "+U.transparency[fe]+" ";ae.push({key:"Mask",value:"["+se+"]"})}U.sMask!==void 0&&ae.push({key:"SMask",value:U.objectId+1+" 0 R"});var _e=U.filter!==void 0?["/"+U.filter]:void 0;if(F({data:U.data,additionalKeyValues:ae,alreadyAppliedFilters:_e,objectId:U.objectId}),q("endobj"),"sMask"in U&&U.sMask!==void 0){var xe,D=(xe=U.sMaskBitsPerComponent)!==null&&xe!==void 0?xe:U.bitsPerComponent,$={width:U.width,height:U.height,colorSpace:"DeviceGray",bitsPerComponent:D,data:U.sMask};"filter"in U&&($.decodeParameters="/Predictor ".concat(U.predictor," /Colors 1 /BitsPerComponent ").concat(D," /Columns ").concat(U.width),$.filter=U.filter),Z.call(this,$)}if(U.colorSpace===g.INDEXED){var X=this.internal.newObject();F({data:V(new Uint8Array(U.palette)),objectId:X}),q("endobj")}},d=function(){var Z=this.internal.collections[t+"images"];for(var U in Z)l.call(this,Z[U])},c=function(){var Z,U=this.internal.collections[t+"images"],q=this.internal.write;for(var F in U)q("/I"+(Z=U[F]).index,Z.objectId,"0","R")},u=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",d),this.internal.events.subscribe("putXobjectDict",c))},h=function(){var Z=this.internal.collections[t+"images"];return u.call(this),Z},m=function(){return Object.keys(this.internal.collections[t+"images"]).length},x=function(Z){return typeof r["process"+Z.toUpperCase()]=="function"},y=function(Z){return Yr(Z)==="object"&&Z.nodeType===1},p=function(Z,U){if(Z.nodeName==="IMG"&&Z.hasAttribute("src")){var q=""+Z.getAttribute("src");if(q.indexOf("data:image/")===0)return Rm(unescape(q).split("base64,").pop());var F=r.loadFile(q,!0);if(F!==void 0)return F}if(Z.nodeName==="CANVAS"){if(Z.width===0||Z.height===0)throw new Error("Given canvas must have data. Canvas width: "+Z.width+", height: "+Z.height);var le;switch(U){case"PNG":le="image/png";break;case"WEBP":le="image/webp";break;default:le="image/jpeg"}return Rm(Z.toDataURL(le,1).split("base64,").pop())}},v=function(Z){var U=this.internal.collections[t+"images"];if(U){for(var q in U)if(Z===U[q].alias)return U[q]}},N=function(Z,U,q){return Z||U||(Z=-96,U=-96),Z<0&&(Z=-1*q.width*72/Z/this.internal.scaleFactor),U<0&&(U=-1*q.height*72/U/this.internal.scaleFactor),Z===0&&(Z=U*q.width/q.height),U===0&&(U=Z*q.height/q.width),[Z,U]},B=function(Z,U,q,F,le,ae){var se=N.call(this,q,F,le),fe=this.internal.getCoordinateString,ye=this.internal.getVerticalCoordinateString,_e=h.call(this);if(q=se[0],F=se[1],_e[le.index]=le,ae){ae*=Math.PI/180;var xe=Math.cos(ae),D=Math.sin(ae),$=function(te){return te.toFixed(4)},X=[$(xe),$(D),$(-1*D),$(xe),0,0,"cm"]}this.internal.write("q"),ae?(this.internal.write([1,"0","0",1,fe(Z),ye(U+F),"cm"].join(" ")),this.internal.write(X.join(" ")),this.internal.write([fe(q),"0","0",fe(F),"0","0","cm"].join(" "))):this.internal.write([fe(q),"0","0",fe(F),fe(Z),ye(U+F),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+le.index+" Do"),this.internal.write("Q")},g=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var j=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},_=r.__addimage__.sHashCode=function(Z){var U,q,F=0;if(typeof Z=="string")for(q=Z.length,U=0;U<q;U++)F=(F<<5)-F+Z.charCodeAt(U),F|=0;else if(K(Z))for(q=Z.byteLength/2,U=0;U<q;U++)F=(F<<5)-F+Z[U],F|=0;return F},w=r.__addimage__.validateStringAsBase64=function(Z){(Z=Z||"").toString().trim();var U=!0;return Z.length===0&&(U=!1),Z.length%4!=0&&(U=!1),/^[A-Za-z0-9+/]+$/.test(Z.substr(0,Z.length-2))===!1&&(U=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(Z.substr(-2))===!1&&(U=!1),U},L=r.__addimage__.extractImageFromDataUrl=function(Z){if(Z==null||!(Z=Z.trim()).startsWith("data:"))return null;var U=Z.indexOf(",");return U<0?null:Z.substring(0,U).trim().endsWith("base64")?Z.substring(U+1):null};r.__addimage__.isArrayBuffer=function(Z){return Z instanceof ArrayBuffer};var K=r.__addimage__.isArrayBufferView=function(Z){return Z instanceof Int8Array||Z instanceof Uint8Array||Z instanceof Uint8ClampedArray||Z instanceof Int16Array||Z instanceof Uint16Array||Z instanceof Int32Array||Z instanceof Uint32Array||Z instanceof Float32Array||Z instanceof Float64Array},M=r.__addimage__.binaryStringToUint8Array=function(Z){for(var U=Z.length,q=new Uint8Array(U),F=0;F<U;F++)q[F]=Z.charCodeAt(F);return q},V=r.__addimage__.arrayBufferToBinaryString=function(Z){for(var U="",q=K(Z)?Z:new Uint8Array(Z),F=0;F<q.length;F+=8192)U+=String.fromCharCode.apply(null,q.subarray(F,F+8192));return U};r.addImage=function(){var Z,U,q,F,le,ae,se,fe,ye;if(typeof arguments[1]=="number"?(U=s,q=arguments[1],F=arguments[2],le=arguments[3],ae=arguments[4],se=arguments[5],fe=arguments[6],ye=arguments[7]):(U=arguments[1],q=arguments[2],F=arguments[3],le=arguments[4],ae=arguments[5],se=arguments[6],fe=arguments[7],ye=arguments[8]),Yr(Z=arguments[0])==="object"&&!y(Z)&&"imageData"in Z){var _e=Z;Z=_e.imageData,U=_e.format||U||s,q=_e.x||q||0,F=_e.y||F||0,le=_e.w||_e.width||le,ae=_e.h||_e.height||ae,se=_e.alias||se,fe=_e.compression||fe,ye=_e.rotation||_e.angle||ye}var xe=this.internal.getFilters();if(fe===void 0&&xe.indexOf("FlateEncode")!==-1&&(fe="SLOW"),isNaN(q)||isNaN(F))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var D=T.call(this,Z,U,se,fe);return B.call(this,q,F,le,ae,D,ye),this};var T=function(Z,U,q,F){var le,ae,se;if(typeof Z=="string"&&o(Z)===s){Z=unescape(Z);var fe=ne(Z,!1);(fe!==""||(fe=r.loadFile(Z,!0))!==void 0)&&(Z=fe)}if(y(Z)&&(Z=p(Z,U)),U=o(Z,U),!x(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(((se=q)==null||se.length===0)&&(q=(function(ye){return typeof ye=="string"||K(ye)?_(ye):K(ye.data)?_(ye.data):null})(Z)),(le=v.call(this,q))||(Z instanceof Uint8Array||U==="RGBA"||(ae=Z,Z=M(Z)),le=this["process"+U.toUpperCase()](Z,m.call(this),q,(function(ye){return ye&&typeof ye=="string"&&(ye=ye.toUpperCase()),ye in r.image_compression?ye:j.NONE})(F),ae)),!le)throw new Error("An unknown error occurred whilst processing the image.");return le},ne=r.__addimage__.convertBase64ToBinaryString=function(Z,U){U=typeof U!="boolean"||U;var q,F="";if(typeof Z=="string"){var le;q=(le=L(Z))!==null&&le!==void 0?le:Z;try{F=Rm(q)}catch(ae){if(U)throw w(q)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ae.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return F};r.getImageProperties=function(Z){var U,q,F="";if(y(Z)&&(Z=p(Z)),typeof Z=="string"&&o(Z)===s&&((F=ne(Z,!1))===""&&(F=r.loadFile(Z)||""),Z=F),q=o(Z),!x(q))throw new Error("addImage does not support files of type '"+q+"', please ensure that a plugin for '"+q+"' support is added.");if(Z instanceof Uint8Array||(Z=M(Z)),!(U=this["process"+q.toUpperCase()](Z)))throw new Error("An unknown error occurred whilst processing the image");return U.fileType=q,U}})(Ft.API),(function(r){var t=function(s){if(s!==void 0&&s!="")return!0};Ft.API.events.push(["addPage",function(s){this.internal.getPageInfo(s.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(s){for(var n,o,l,d=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(s.objId),h=s.pageContext.annotations,m=!1,x=0;x<h.length&&!m;x++)switch((n=h[x]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var y=0;y<h.length;y++){n=h[y];var p=this.internal.pdfEscape,v=this.internal.getEncryptor(s.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var N=this.internal.newAdditionalObject(),B=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(N.objId),j=n.title||"Note";l="<</Type /Annot /Subtype /Text "+(o="/Rect ["+d(n.bounds.x)+" "+c(n.bounds.y+n.bounds.h)+" "+d(n.bounds.x+n.bounds.w)+" "+c(n.bounds.y)+"] ")+"/Contents ("+p(g(n.contents))+")",l+=" /Popup "+B.objId+" 0 R",l+=" /P "+u.objId+" 0 R",l+=" /T ("+p(g(j))+") >>",N.content=l;var _=N.objId+" 0 R";l="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+d(n.bounds.x+30)+" "+c(n.bounds.y+n.bounds.h)+" "+d(n.bounds.x+n.bounds.w+30)+" "+c(n.bounds.y)+"] ")+" /Parent "+_,n.open&&(l+=" /Open true"),l+=" >>",B.content=l,this.internal.write(N.objId,"0 R",B.objId,"0 R");break;case"freetext":o="/Rect ["+d(n.bounds.x)+" "+c(n.bounds.y)+" "+d(n.bounds.x+n.bounds.w)+" "+c(n.bounds.y+n.bounds.h)+"] ";var w=n.color||"#000000";l="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+p(v(n.contents))+")",l+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+w+")",l+=" /Border [0 0 0]",l+=" >>",this.internal.write(l);break;case"link":if(n.options.name){var L=this.annotations._nameMap[n.options.name];n.options.pageNumber=L.page,n.options.top=L.y}else n.options.top||(n.options.top=0);if(o="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",l="",n.options.url)l="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+p(v(n.options.url))+") >>";else if(n.options.pageNumber)switch(l="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":l+=" /Fit]";break;case"FitH":l+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,l+=" /FitV "+n.options.left+"]";break;default:var K=c(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),l+=" /XYZ "+n.options.left+" "+K+" "+n.options.zoom+"]"}l!=""&&(l+=" >>",this.internal.write(l))}}this.internal.write("]")}}]),r.createAnnotation=function(s){var n=this.internal.getCurrentPageInfo();switch(s.type){case"link":this.link(s.bounds.x,s.bounds.y,s.bounds.w,s.bounds.h,s);break;case"text":case"freetext":n.pageContext.annotations.push(s)}},r.link=function(s,n,o,l,d){var c=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;c.pageContext.annotations.push({finalBounds:{x:u(s),y:h(n),w:u(s+o),h:h(n+l)},options:d,type:"link"})},r.textWithLink=function(s,n,o,l){var d,c,u=this.getTextWidth(s),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(l.maxWidth!==void 0){c=l.maxWidth;var m=this.splitTextToSize(s,c).length;d=Math.ceil(h*m)}else c=u,d=h;return this.text(s,n,o,l),o+=.2*h,l.align==="center"&&(n-=u/2),l.align==="right"&&(n-=u),this.link(n,o-h,c,d,l),u},r.getTextWidth=function(s){var n=this.internal.getFontSize();return this.getStringUnitWidth(s)*n/this.internal.scaleFactor}})(Ft.API),(function(r){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},s={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];r.__arabicParser__={};var l=r.__arabicParser__.isInArabicSubstitutionA=function(N){return t[N.charCodeAt(0)]!==void 0},d=r.__arabicParser__.isArabicLetter=function(N){return typeof N=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(N)},c=r.__arabicParser__.isArabicEndLetter=function(N){return d(N)&&l(N)&&t[N.charCodeAt(0)].length<=2},u=r.__arabicParser__.isArabicAlfLetter=function(N){return d(N)&&o.indexOf(N.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(N){return d(N)&&l(N)&&t[N.charCodeAt(0)].length>=1};var h=r.__arabicParser__.arabicLetterHasFinalForm=function(N){return d(N)&&l(N)&&t[N.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(N){return d(N)&&l(N)&&t[N.charCodeAt(0)].length>=3};var m=r.__arabicParser__.arabicLetterHasMedialForm=function(N){return d(N)&&l(N)&&t[N.charCodeAt(0)].length==4},x=r.__arabicParser__.resolveLigatures=function(N){var B=0,g=s,j="",_=0;for(B=0;B<N.length;B+=1)g[N.charCodeAt(B)]!==void 0?(_++,typeof(g=g[N.charCodeAt(B)])=="number"&&(j+=String.fromCharCode(g),g=s,_=0),B===N.length-1&&(g=s,j+=N.charAt(B-(_-1)),B-=_-1,_=0)):(g=s,j+=N.charAt(B-_),B-=_,_=0);return j};r.__arabicParser__.isArabicDiacritic=function(N){return N!==void 0&&n[N.charCodeAt(0)]!==void 0};var y=r.__arabicParser__.getCorrectForm=function(N,B,g){return d(N)?l(N)===!1?-1:!h(N)||!d(B)&&!d(g)||!d(g)&&c(B)||c(N)&&!d(B)||c(N)&&u(B)||c(N)&&c(B)?0:m(N)&&d(B)&&!c(B)&&d(g)&&h(g)?3:c(N)||!d(g)?1:2:-1},p=function(N){var B=0,g=0,j=0,_="",w="",L="",K=(N=N||"").split("\\s+"),M=[];for(B=0;B<K.length;B+=1){for(M.push(""),g=0;g<K[B].length;g+=1)_=K[B][g],w=K[B][g-1],L=K[B][g+1],d(_)?(j=y(_,w,L),M[B]+=j!==-1?String.fromCharCode(t[_.charCodeAt(0)][j]):_):M[B]+=_;M[B]=x(M[B])}return M.join(" ")},v=r.__arabicParser__.processArabic=r.processArabic=function(){var N,B=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,g=[];if(Array.isArray(B)){var j=0;for(g=[],j=0;j<B.length;j+=1)Array.isArray(B[j])?g.push([p(B[j][0]),B[j][1],B[j][2]]):g.push([p(B[j])]);N=g}else N=p(B);return typeof arguments[0]=="string"?N:(arguments[0].text=N,arguments[0])};r.events.push(["preProcessText",v])})(Ft.API),Ft.API.autoPrint=function(r){var t;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(r){var t=function(){var s=void 0;Object.defineProperty(this,"pdf",{get:function(){return s},set:function(c){s=c}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(c){n=isNaN(c)||Number.isInteger(c)===!1||c<0?150:c,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(c){o=isNaN(c)||Number.isInteger(c)===!1||c<0?300:c,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var l=[];Object.defineProperty(this,"childNodes",{get:function(){return l},set:function(c){l=c}});var d={};Object.defineProperty(this,"style",{get:function(){return d},set:function(c){d=c}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(s,n){var o;if((s=s||"2d")!=="2d")return null;for(o in n)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=n[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Ft.API),(function(r){var t={left:0,top:0,bottom:0,right:0},s=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new l,this.internal.__cell__.pages=1},l=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(N){u=N}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(N){h=N}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(N){m=N}});var x=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return x},set:function(N){x=N}});var y=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return y},set:function(N){y=N}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(N){p=N}});var v=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return v},set:function(N){v=N}}),this};l.prototype.clone=function(){return new l(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},l.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(u){return n.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},r.getTextDimensions=function(u,h){n.call(this);var m=(h=h||{}).fontSize||this.getFontSize(),x=h.font||this.getFont(),y=h.scaleFactor||this.internal.scaleFactor,p=0,v=0,N=0,B=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var g=h.maxWidth;g>0?typeof u=="string"?u=this.splitTextToSize(u,g):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(_,w){return _.concat(B.splitTextToSize(w,g))},[])):u=Array.isArray(u)?u:[u];for(var j=0;j<u.length;j++)p<(N=this.getStringUnitWidth(u[j],{font:x})*m)&&(p=N);return p!==0&&(v=u.length),{w:p/=y,h:Math.max((v*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/y,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var u=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new l(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var d=r.cell=function(){var u;u=arguments[0]instanceof l?arguments[0]:new l(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var h=this.internal.__cell__.lastCell,m=this.internal.__cell__.padding,x=this.internal.__cell__.margins||t,y=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+x.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=x.top,p&&y&&(this.printHeaderRow(u.lineNumber,!0),u.y+=y[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,s===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-m,u.y+m,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+m,{align:"center",baseline:"top",maxWidth:u.width-m-m}):this.text(u.text,u.x+m,u.y+m,{align:"left",baseline:"top",maxWidth:u.width-m-m})),this.internal.__cell__.lastCell=u,this};r.table=function(u,h,m,x,y){if(n.call(this),!m)throw new Error("No data for PDF table.");var p,v,N,B,g=[],j=[],_=[],w={},L={},K=[],M=[],V=(y=y||{}).autoSize||!1,T=y.printHeaders!==!1,ne=y.css&&y.css["font-size"]!==void 0?16*y.css["font-size"]:y.fontSize||12,Z=y.margins||Object.assign({width:this.getPageWidth()},t),U=typeof y.padding=="number"?y.padding:3,q=y.headerBackgroundColor||"#c8c8c8",F=y.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=T,this.internal.__cell__.margins=Z,this.internal.__cell__.table_font_size=ne,this.internal.__cell__.padding=U,this.internal.__cell__.headerBackgroundColor=q,this.internal.__cell__.headerTextColor=F,this.setFontSize(ne),x==null)j=g=Object.keys(m[0]),_=g.map(function(){return"left"});else if(Array.isArray(x)&&Yr(x[0])==="object")for(g=x.map(function(_e){return _e.name}),j=x.map(function(_e){return _e.prompt||_e.name||""}),_=x.map(function(_e){return _e.align||"left"}),p=0;p<x.length;p+=1)L[x[p].name]=.7499990551181103*x[p].width;else Array.isArray(x)&&typeof x[0]=="string"&&(j=g=x,_=g.map(function(){return"left"}));if(V||Array.isArray(x)&&typeof x[0]=="string")for(p=0;p<g.length;p+=1){for(w[B=g[p]]=m.map(function(_e){return _e[B]}),this.setFont(void 0,"bold"),K.push(this.getTextDimensions(j[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),v=w[B],this.setFont(void 0,"normal"),N=0;N<v.length;N+=1)K.push(this.getTextDimensions(v[N],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);L[B]=Math.max.apply(null,K)+U+U,K=[]}if(T){var le={};for(p=0;p<g.length;p+=1)le[g[p]]={},le[g[p]].text=j[p],le[g[p]].align=_[p];var ae=c.call(this,le,L);M=g.map(function(_e){return new l(u,h,L[_e],ae,le[_e].text,void 0,le[_e].align)}),this.setTableHeaderRow(M),this.printHeaderRow(1,!1)}var se=x.reduce(function(_e,xe){return _e[xe.name]=xe.align,_e},{});for(p=0;p<m.length;p+=1){"rowStart"in y&&y.rowStart instanceof Function&&y.rowStart({row:p,data:m[p]},this);var fe=c.call(this,m[p],L);for(N=0;N<g.length;N+=1){var ye=m[p][g[N]];"cellStart"in y&&y.cellStart instanceof Function&&y.cellStart({row:p,col:N,data:ye},this),d.call(this,new l(u,h,L[g[N]],fe,ye,p+2,se[g[N]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var c=function(u,h){var m=this.internal.__cell__.padding,x=this.internal.__cell__.table_font_size,y=this.internal.scaleFactor;return Object.keys(u).map(function(p){var v=u[p];return this.splitTextToSize(v.hasOwnProperty("text")?v.text:v,h[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*x/y+m+m},this).reduce(function(p,v){return Math.max(p,v)},0)};r.setTableHeaderRow=function(u){n.call(this),this.internal.__cell__.tableHeaderRow=u},r.printHeaderRow=function(u,h){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(s=!0,typeof this.internal.__cell__.headerFunction=="function"){var x=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new l(x[0],x[1],x[2],x[3],void 0,-1)}this.setFont(void 0,"bold");for(var y=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){m=this.internal.__cell__.tableHeaderRow[p].clone(),h&&(m.y=this.internal.__cell__.margins.top||0,y.push(m)),m.lineNumber=u;var v=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),d.call(this,m),this.setTextColor(v)}y.length>0&&this.setTableHeaderRow(y),this.setFont(void 0,"normal"),s=!1}})(Ft.API);var tj={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},rj=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Wb=ej(rj),sj=[100,200,300,400,500,600,700,800,900],RF=ej(sj);function wg(r){var t=r.family.replace(/"|'/g,"").toLowerCase(),s=(function(l){return tj[l=l||"normal"]?l:"normal"})(r.style),n=(function(l){return l?typeof l=="number"?l>=100&&l<=900&&l%100==0?l:400:/^\d00$/.test(l)?parseInt(l):l==="bold"?700:400:400})(r.weight),o=(function(l){return typeof Wb[l=l||"normal"]=="number"?l:"normal"})(r.stretch);return{family:t,style:s,weight:n,stretch:o,src:r.src||[],ref:r.ref||{name:t,style:[o,s,n].join(" ")}}}function F2(r,t,s,n){var o;for(o=s;o>=0&&o<t.length;o+=n)if(r[t[o]])return r[t[o]];for(o=s;o>=0&&o<t.length;o-=n)if(r[t[o]])return r[t[o]]}var OF={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},E2={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function U2(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function Q2(r){return r.trimLeft()}function HF(r,t){for(var s=0;s<r.length;){if(r.charAt(s)===t)return[r.substring(0,s),r.substring(s+1)];s+=1}return null}function MF(r){var t=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],r.substring(t[0].length)]}var Zf,L2,T2,Ed,$f,I2,D2,R2,vg=["times"];function O2(r,t,s,n,o){var l=4,d=M2;switch(o){case Ft.API.image_compression.FAST:l=1,d=H2;break;case Ft.API.image_compression.MEDIUM:l=6,d=P2;break;case Ft.API.image_compression.SLOW:l=9,d=K2}r=(function(u,h,m,x){for(var y,p=u.length/h,v=new Uint8Array(u.length+p),N=[PF,H2,M2,P2,K2],B=0;B<p;B+=1){var g=B*h,j=u.subarray(g,g+h);if(x)v.set(x(j,m,y),g+B);else{for(var _=N.length,w=[],L=0;L<_;L+=1)w[L]=N[L](j,m,y);var K=zF(w.concat());v.set(w[K],g+B)}y=j}return v})(r,t,Math.ceil(s*n/8),d);var c=Mb(r,{level:l});return Ft.API.__addimage__.arrayBufferToBinaryString(c)}function PF(r){var t=Array.apply([],r);return t.unshift(0),t}function H2(r,t){var s=r.length,n=[];n[0]=1;for(var o=0;o<s;o+=1){var l=r[o-t]||0;n[o+1]=r[o]-l+256&255}return n}function M2(r,t,s){var n=r.length,o=[];o[0]=2;for(var l=0;l<n;l+=1){var d=s&&s[l]||0;o[l+1]=r[l]-d+256&255}return o}function P2(r,t,s){var n=r.length,o=[];o[0]=3;for(var l=0;l<n;l+=1){var d=r[l-t]||0,c=s&&s[l]||0;o[l+1]=r[l]+256-(d+c>>>1)&255}return o}function K2(r,t,s){var n=r.length,o=[];o[0]=4;for(var l=0;l<n;l+=1){var d=KF(r[l-t]||0,s&&s[l]||0,s&&s[l-t]||0);o[l+1]=r[l]-d+256&255}return o}function KF(r,t,s){if(r===t&&t===s)return r;var n=Math.abs(t-s),o=Math.abs(r-s),l=Math.abs(r+t-s-s);return n<=o&&n<=l?r:o<=l?t:s}function zF(r){var t=r.map(function(s){return s.reduce(function(n,o){return n+Math.abs(o)},0)});return t.indexOf(Math.min.apply(null,t))}function Ng(r,t,s){var n=t*s,o=Math.floor(n/8),l=16-(n-8*o+s),d=(1<<s)-1;return aj(r,o)>>l&d}function z2(r,t,s,n){var o=s*n,l=Math.floor(o/8),d=16-(o-8*l+n),c=(1<<n)-1,u=(t&c)<<d;(function(h,m,x){if(m+1<h.byteLength)h.setUint16(m,x,!1);else{var y=x>>8&255;h.setUint8(m,y)}})(r,l,aj(r,l)&~(c<<d)&65535|u)}function aj(r,t){return t+1<r.byteLength?r.getUint16(t,!1):r.getUint8(t)<<8}function qF(r){var t=0;if(r[t++]!==71||r[t++]!==73||r[t++]!==70||r[t++]!==56||(r[t++]+1&253)!=56||r[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var s=r[t++]|r[t++]<<8,n=r[t++]|r[t++]<<8,o=r[t++],l=o>>7,d=1<<1+(7&o);r[t++],r[t++];var c=null,u=null;l&&(c=t,u=d,t+=3*d);var h=!0,m=[],x=0,y=null,p=0,v=null;for(this.width=s,this.height=n;h&&t<r.length;)switch(r[t++]){case 33:switch(r[t++]){case 255:if(r[t]!==11||r[t+1]==78&&r[t+2]==69&&r[t+3]==84&&r[t+4]==83&&r[t+5]==67&&r[t+6]==65&&r[t+7]==80&&r[t+8]==69&&r[t+9]==50&&r[t+10]==46&&r[t+11]==48&&r[t+12]==3&&r[t+13]==1&&r[t+16]==0)t+=14,v=r[t++]|r[t++]<<8,t++;else for(t+=12;;){if(!((Z=r[t++])>=0))throw Error("Invalid block size");if(Z===0)break;t+=Z}break;case 249:if(r[t++]!==4||r[t+4]!==0)throw new Error("Invalid graphics extension block.");var N=r[t++];x=r[t++]|r[t++]<<8,y=r[t++],1&N||(y=null),p=N>>2&7,t++;break;case 254:for(;;){if(!((Z=r[t++])>=0))throw Error("Invalid block size");if(Z===0)break;t+=Z}break;default:throw new Error("Unknown graphic control label: 0x"+r[t-1].toString(16))}break;case 44:var B=r[t++]|r[t++]<<8,g=r[t++]|r[t++]<<8,j=r[t++]|r[t++]<<8,_=r[t++]|r[t++]<<8,w=r[t++],L=w>>6&1,K=1<<1+(7&w),M=c,V=u,T=!1;w>>7&&(T=!0,M=t,V=K,t+=3*K);var ne=t;for(t++;;){var Z;if(!((Z=r[t++])>=0))throw Error("Invalid block size");if(Z===0)break;t+=Z}m.push({x:B,y:g,width:j,height:_,has_local_palette:T,palette_offset:M,palette_size:V,data_offset:ne,data_length:t-ne,transparent_index:y,interlaced:!!L,delay:x,disposal:p});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+r[t-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return v},this.frameInfo=function(U){if(U<0||U>=m.length)throw new Error("Frame index out of range.");return m[U]},this.decodeAndBlitFrameBGRA=function(U,q){var F=this.frameInfo(U),le=F.width*F.height,ae=new Uint8Array(le);q2(r,F.data_offset,ae,le);var se=F.palette_offset,fe=F.transparent_index;fe===null&&(fe=256);var ye=F.width,_e=s-ye,xe=ye,D=4*(F.y*s+F.x),$=4*((F.y+F.height)*s+F.x),X=D,te=4*_e;F.interlaced===!0&&(te+=4*s*7);for(var J=8,O=0,H=ae.length;O<H;++O){var re=ae[O];if(xe===0&&(xe=ye,(X+=te)>=$&&(te=4*_e+4*s*(J-1),X=D+(ye+_e)*(J<<1),J>>=1)),re===fe)X+=4;else{var Ae=r[se+3*re],oe=r[se+3*re+1],ce=r[se+3*re+2];q[X++]=ce,q[X++]=oe,q[X++]=Ae,q[X++]=255}--xe}},this.decodeAndBlitFrameRGBA=function(U,q){var F=this.frameInfo(U),le=F.width*F.height,ae=new Uint8Array(le);q2(r,F.data_offset,ae,le);var se=F.palette_offset,fe=F.transparent_index;fe===null&&(fe=256);var ye=F.width,_e=s-ye,xe=ye,D=4*(F.y*s+F.x),$=4*((F.y+F.height)*s+F.x),X=D,te=4*_e;F.interlaced===!0&&(te+=4*s*7);for(var J=8,O=0,H=ae.length;O<H;++O){var re=ae[O];if(xe===0&&(xe=ye,(X+=te)>=$&&(te=4*_e+4*s*(J-1),X=D+(ye+_e)*(J<<1),J>>=1)),re===fe)X+=4;else{var Ae=r[se+3*re],oe=r[se+3*re+1],ce=r[se+3*re+2];q[X++]=Ae,q[X++]=oe,q[X++]=ce,q[X++]=255}--xe}}}function q2(r,t,s,n){for(var o=r[t++],l=1<<o,d=l+1,c=d+1,u=o+1,h=(1<<u)-1,m=0,x=0,y=0,p=r[t++],v=new Int32Array(4096),N=null;;){for(;m<16&&p!==0;)x|=r[t++]<<m,m+=8,p===1?p=r[t++]:--p;if(m<u)break;var B=x&h;if(x>>=u,m-=u,B!==l){if(B===d)break;for(var g=B<c?B:N,j=0,_=g;_>l;)_=v[_]>>8,++j;var w=_;if(y+j+(g!==B?1:0)>n)return void Xr.log("Warning, gif stream longer than expected.");s[y++]=w;var L=y+=j;for(g!==B&&(s[y++]=w),_=g;j--;)_=v[_],s[--L]=255&_,_>>=8;N!==null&&c<4096&&(v[c++]=N<<8|w,c>=h+1&&u<12&&(++u,h=h<<1|1)),N=B}else c=d+1,h=(1<<(u=o+1))-1,N=null}return y!==n&&Xr.log("Warning, gif stream shorter than expected."),s}function Bg(r){var t,s,n,o,l,d=Math.floor,c=new Array(64),u=new Array(64),h=new Array(64),m=new Array(64),x=new Array(65535),y=new Array(65535),p=new Array(64),v=new Array(64),N=[],B=0,g=7,j=new Array(64),_=new Array(64),w=new Array(64),L=new Array(256),K=new Array(2048),M=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],V=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],ne=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],Z=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],le=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ae(D,$){for(var X=0,te=0,J=new Array,O=1;O<=16;O++){for(var H=1;H<=D[O];H++)J[$[te]]=[],J[$[te]][0]=X,J[$[te]][1]=O,te++,X++;X*=2}return J}function se(D){for(var $=D[0],X=D[1]-1;X>=0;)$&1<<X&&(B|=1<<g),X--,--g<0&&(B==255?(fe(255),fe(0)):fe(B),g=7,B=0)}function fe(D){N.push(D)}function ye(D){fe(D>>8&255),fe(255&D)}function _e(D,$,X,te,J){for(var O,H=J[0],re=J[240],Ae=(function(k,G){var me,be,Ue,Re,He,Ve,it,lt,ut,Tt,mt=0;for(ut=0;ut<8;++ut){me=k[mt],be=k[mt+1],Ue=k[mt+2],Re=k[mt+3],He=k[mt+4],Ve=k[mt+5],it=k[mt+6];var Ur=me+(lt=k[mt+7]),jt=me-lt,_t=be+it,Dt=be-it,Gt=Ue+Ve,kt=Ue-Ve,Fr=Re+He,It=Re-He,Pt=Ur+Fr,Br=Ur-Fr,zt=_t+Gt,Bt=_t-Gt;k[mt]=Pt+zt,k[mt+4]=Pt-zt;var cr=.707106781*(Bt+Br);k[mt+2]=Br+cr,k[mt+6]=Br-cr;var _n=.382683433*((Pt=It+kt)-(Bt=Dt+jt)),Aa=.5411961*Pt+_n,Xn=1.306562965*Bt+_n,an=.707106781*(zt=kt+Dt),Et=jt+an,Ci=jt-an;k[mt+5]=Ci+Aa,k[mt+3]=Ci-Aa,k[mt+1]=Et+Xn,k[mt+7]=Et-Xn,mt+=8}for(mt=0,ut=0;ut<8;++ut){me=k[mt],be=k[mt+8],Ue=k[mt+16],Re=k[mt+24],He=k[mt+32],Ve=k[mt+40],it=k[mt+48];var Yn=me+(lt=k[mt+56]),qa=me-lt,Ga=be+it,Jr=be-it,ws=Ue+Ve,qs=Ue-Ve,co=Re+He,wa=Re-He,Qr=Yn+co,ts=Yn-co,ca=Ga+ws,Va=Ga-ws;k[mt]=Qr+ca,k[mt+32]=Qr-ca;var nn=.707106781*(Va+ts);k[mt+16]=ts+nn,k[mt+48]=ts-nn;var qo=.382683433*((Qr=wa+qs)-(Va=Jr+qa)),kn=.5411961*Qr+qo,Fn=1.306562965*Va+qo,uo=.707106781*(ca=qs+Jr),En=qa+uo,Un=qa-uo;k[mt+40]=Un+kn,k[mt+24]=Un-kn,k[mt+8]=En+Fn,k[mt+56]=En-Fn,mt++}for(ut=0;ut<64;++ut)Tt=k[ut]*G[ut],p[ut]=Tt>0?Tt+.5|0:Tt-.5|0;return p})(D,$),oe=0;oe<64;++oe)v[M[oe]]=Ae[oe];var ce=v[0]-X;X=v[0],ce==0?se(te[0]):(se(te[y[O=32767+ce]]),se(x[O]));for(var Se=63;Se>0&&v[Se]==0;)Se--;if(Se==0)return se(H),X;for(var z,ie=1;ie<=Se;){for(var W=ie;v[ie]==0&&ie<=Se;)++ie;var Q=ie-W;if(Q>=16){z=Q>>4;for(var I=1;I<=z;++I)se(re);Q&=15}O=32767+v[ie],se(J[(Q<<4)+y[O]]),se(x[O]),ie++}return Se!=63&&se(H),X}function xe(D){D=Math.min(Math.max(D,1),100),l!=D&&((function($){for(var X=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],te=0;te<64;te++){var J=d((X[te]*$+50)/100);J=Math.min(Math.max(J,1),255),c[M[te]]=J}for(var O=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],H=0;H<64;H++){var re=d((O[H]*$+50)/100);re=Math.min(Math.max(re,1),255),u[M[H]]=re}for(var Ae=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],oe=0,ce=0;ce<8;ce++)for(var Se=0;Se<8;Se++)h[oe]=1/(c[M[oe]]*Ae[ce]*Ae[Se]*8),m[oe]=1/(u[M[oe]]*Ae[ce]*Ae[Se]*8),oe++})(D<50?Math.floor(5e3/D):Math.floor(200-2*D)),l=D)}this.encode=function(D,$){$&&xe($),N=new Array,B=0,g=7,ye(65496),ye(65504),ye(16),fe(74),fe(70),fe(73),fe(70),fe(0),fe(1),fe(1),fe(0),ye(1),ye(1),fe(0),fe(0),(function(){ye(65499),ye(132),fe(0);for(var be=0;be<64;be++)fe(c[be]);fe(1);for(var Ue=0;Ue<64;Ue++)fe(u[Ue])})(),(function(be,Ue){ye(65472),ye(17),fe(8),ye(Ue),ye(be),fe(3),fe(1),fe(17),fe(0),fe(2),fe(17),fe(1),fe(3),fe(17),fe(1)})(D.width,D.height),(function(){ye(65476),ye(418),fe(0);for(var be=0;be<16;be++)fe(V[be+1]);for(var Ue=0;Ue<=11;Ue++)fe(T[Ue]);fe(16);for(var Re=0;Re<16;Re++)fe(ne[Re+1]);for(var He=0;He<=161;He++)fe(Z[He]);fe(1);for(var Ve=0;Ve<16;Ve++)fe(U[Ve+1]);for(var it=0;it<=11;it++)fe(q[it]);fe(17);for(var lt=0;lt<16;lt++)fe(F[lt+1]);for(var ut=0;ut<=161;ut++)fe(le[ut])})(),ye(65498),ye(12),fe(3),fe(1),fe(0),fe(2),fe(17),fe(3),fe(17),fe(0),fe(63),fe(0);var X=0,te=0,J=0;B=0,g=7,this.encode.displayName="_encode_";for(var O,H,re,Ae,oe,ce,Se,z,ie,W=D.data,Q=D.width,I=D.height,k=4*Q,G=0;G<I;){for(O=0;O<k;){for(oe=k*G+O,Se=-1,z=0,ie=0;ie<64;ie++)ce=oe+(z=ie>>3)*k+(Se=4*(7&ie)),G+z>=I&&(ce-=k*(G+1+z-I)),O+Se>=k&&(ce-=O+Se-k+4),H=W[ce++],re=W[ce++],Ae=W[ce++],j[ie]=(K[H]+K[re+256|0]+K[Ae+512|0]>>16)-128,_[ie]=(K[H+768|0]+K[re+1024|0]+K[Ae+1280|0]>>16)-128,w[ie]=(K[H+1280|0]+K[re+1536|0]+K[Ae+1792|0]>>16)-128;X=_e(j,h,X,t,n),te=_e(_,m,te,s,o),J=_e(w,m,J,s,o),O+=32}G+=8}if(g>=0){var me=[];me[1]=g+1,me[0]=(1<<g+1)-1,se(me)}return ye(65497),new Uint8Array(N)},r=r||50,(function(){for(var D=String.fromCharCode,$=0;$<256;$++)L[$]=D($)})(),t=ae(V,T),s=ae(U,q),n=ae(ne,Z),o=ae(F,le),(function(){for(var D=1,$=2,X=1;X<=15;X++){for(var te=D;te<$;te++)y[32767+te]=X,x[32767+te]=[],x[32767+te][1]=X,x[32767+te][0]=te;for(var J=-($-1);J<=-D;J++)y[32767+J]=X,x[32767+J]=[],x[32767+J][1]=X,x[32767+J][0]=$-1+J;D<<=1,$<<=1}})(),(function(){for(var D=0;D<256;D++)K[D]=19595*D,K[D+256|0]=38470*D,K[D+512|0]=7471*D+32768,K[D+768|0]=-11059*D,K[D+1024|0]=-21709*D,K[D+1280|0]=32768*D+8421375,K[D+1536|0]=-27439*D,K[D+1792|0]=-5329*D})(),xe(r)}function eo(r,t){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function G2(r){function t(T){if(!T)throw Error("assert :P")}function s(T,ne,Z){for(var U=0;4>U;U++)if(T[ne+U]!=Z.charCodeAt(U))return!0;return!1}function n(T,ne,Z,U,q){for(var F=0;F<q;F++)T[ne+F]=Z[U+F]}function o(T,ne,Z,U){for(var q=0;q<U;q++)T[ne+q]=Z}function l(T){return new Int32Array(T)}function d(T,ne){for(var Z=[],U=0;U<T;U++)Z.push(new ne);return Z}function c(T,ne){var Z=[];return(function U(q,F,le){for(var ae=le[F],se=0;se<ae&&(q.push(le.length>F+1?[]:new ne),!(le.length<F+1));se++)U(q[se],F+1,le)})(Z,0,T),Z}var u=function(){var T=this;function ne(b,S){for(var P=1<<S-1>>>0;b&P;)P>>>=1;return P?(b&P-1)+P:b}function Z(b,S,P,Y,ue){t(!(Y%P));do b[S+(Y-=P)]=ue;while(0<Y)}function U(b,S,P,Y,ue){if(t(2328>=ue),512>=ue)var he=l(512);else if((he=l(ue))==null)return 0;return(function(pe,we,ve,Be,Ee,Me){var Ne,Le,De=we,Xe=1<<ve,Oe=l(16),We=l(16);for(t(Ee!=0),t(Be!=null),t(pe!=null),t(0<ve),Le=0;Le<Ee;++Le){if(15<Be[Le])return 0;++Oe[Be[Le]]}if(Oe[0]==Ee)return 0;for(We[1]=0,Ne=1;15>Ne;++Ne){if(Oe[Ne]>1<<Ne)return 0;We[Ne+1]=We[Ne]+Oe[Ne]}for(Le=0;Le<Ee;++Le)Ne=Be[Le],0<Be[Le]&&(Me[We[Ne]++]=Le);if(We[15]==1)return(Be=new q).g=0,Be.value=Me[0],Z(pe,De,1,Xe,Be),Xe;var Ze,ot=-1,st=Xe-1,vt=0,pt=1,Vt=1,bt=1<<ve;for(Le=0,Ne=1,Ee=2;Ne<=ve;++Ne,Ee<<=1){if(pt+=Vt<<=1,0>(Vt-=Oe[Ne]))return 0;for(;0<Oe[Ne];--Oe[Ne])(Be=new q).g=Ne,Be.value=Me[Le++],Z(pe,De+vt,Ee,bt,Be),vt=ne(vt,Ne)}for(Ne=ve+1,Ee=2;15>=Ne;++Ne,Ee<<=1){if(pt+=Vt<<=1,0>(Vt-=Oe[Ne]))return 0;for(;0<Oe[Ne];--Oe[Ne]){if(Be=new q,(vt&st)!=ot){for(De+=bt,Ze=1<<(ot=Ne)-ve;15>ot&&!(0>=(Ze-=Oe[ot]));)++ot,Ze<<=1;Xe+=bt=1<<(Ze=ot-ve),pe[we+(ot=vt&st)].g=Ze+ve,pe[we+ot].value=De-we-ot}Be.g=Ne-ve,Be.value=Me[Le++],Z(pe,De+(vt>>ve),Ee,bt,Be),vt=ne(vt,Ne)}}return pt!=2*We[15]-1?0:Xe})(b,S,P,Y,ue,he)}function q(){this.value=this.g=0}function F(){this.value=this.g=0}function le(){this.G=d(5,q),this.H=l(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=d(xo,F)}function ae(b,S,P,Y){t(b!=null),t(S!=null),t(2147483648>Y),b.Ca=254,b.I=0,b.b=-8,b.Ka=0,b.oa=S,b.pa=P,b.Jd=S,b.Yc=P+Y,b.Zc=4<=Y?P+Y-4+1:P,H(b)}function se(b,S){for(var P=0;0<S--;)P|=Ae(b,128)<<S;return P}function fe(b,S){var P=se(b,S);return re(b)?-P:P}function ye(b,S,P,Y){var ue,he=0;for(t(b!=null),t(S!=null),t(4294967288>Y),b.Sb=Y,b.Ra=0,b.u=0,b.h=0,4<Y&&(Y=4),ue=0;ue<Y;++ue)he+=S[P+ue]<<8*ue;b.Ra=he,b.bb=Y,b.oa=S,b.pa=P}function _e(b){for(;8<=b.u&&b.bb<b.Sb;)b.Ra>>>=8,b.Ra+=b.oa[b.pa+b.bb]<<si-8>>>0,++b.bb,b.u-=8;te(b)&&(b.h=1,b.u=0)}function xe(b,S){if(t(0<=S),!b.h&&S<=ja){var P=X(b)&Ta[S];return b.u+=S,_e(b),P}return b.h=1,b.u=0}function D(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function $(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function X(b){return b.Ra>>>(b.u&si-1)>>>0}function te(b){return t(b.bb<=b.Sb),b.h||b.bb==b.Sb&&b.u>si}function J(b,S){b.u=S,b.h=te(b)}function O(b){b.u>=ai&&(t(b.u>=ai),_e(b))}function H(b){t(b!=null&&b.oa!=null),b.pa<b.Zc?(b.I=(b.oa[b.pa++]|b.I<<8)>>>0,b.b+=8):(t(b!=null&&b.oa!=null),b.pa<b.Yc?(b.b+=8,b.I=b.oa[b.pa++]|b.I<<8):b.Ka?b.b=0:(b.I<<=8,b.b+=8,b.Ka=1))}function re(b){return se(b,1)}function Ae(b,S){var P=b.Ca;0>b.b&&H(b);var Y=b.b,ue=P*S>>>8,he=(b.I>>>Y>ue)+0;for(he?(P-=ue,b.I-=ue+1<<Y>>>0):P=ue+1,Y=P,ue=0;256<=Y;)ue+=8,Y>>=8;return Y=7^ue+Mi[Y],b.b-=Y,b.Ca=(P<<Y)-1,he}function oe(b,S,P){b[S+0]=P>>24&255,b[S+1]=P>>16&255,b[S+2]=P>>8&255,b[S+3]=255&P}function ce(b,S){return b[S+0]|b[S+1]<<8}function Se(b,S){return ce(b,S)|b[S+2]<<16}function z(b,S){return ce(b,S)|ce(b,S+2)<<16}function ie(b,S){var P=1<<S;return t(b!=null),t(0<S),b.X=l(P),b.X==null?0:(b.Mb=32-S,b.Xa=S,1)}function W(b,S){t(b!=null),t(S!=null),t(b.Xa==S.Xa),n(S.X,0,b.X,0,1<<S.Xa)}function Q(){this.X=[],this.Xa=this.Mb=0}function I(b,S,P,Y){t(P!=null),t(Y!=null);var ue=P[0],he=Y[0];return ue==0&&(ue=(b*he+S/2)/S),he==0&&(he=(S*ue+b/2)/b),0>=ue||0>=he?0:(P[0]=ue,Y[0]=he,1)}function k(b,S){return b+(1<<S)-1>>>S}function G(b,S){return((4278255360&b)+(4278255360&S)>>>0&4278255360)+((16711935&b)+(16711935&S)>>>0&16711935)>>>0}function me(b,S){T[S]=function(P,Y,ue,he,pe,we,ve){var Be;for(Be=0;Be<pe;++Be){var Ee=T[b](we[ve+Be-1],ue,he+Be);we[ve+Be]=G(P[Y+Be],Ee)}}}function be(){this.ud=this.hd=this.jd=0}function Ue(b,S){return((4278124286&(b^S))>>>1)+(b&S)>>>0}function Re(b){return 0<=b&&256>b?b:0>b?0:255<b?255:void 0}function He(b,S){return Re(b+(b-S+.5>>1))}function Ve(b,S,P){return Math.abs(S-P)-Math.abs(b-P)}function it(b,S,P,Y,ue,he,pe){for(Y=he[pe-1],P=0;P<ue;++P)he[pe+P]=Y=G(b[S+P],Y)}function lt(b,S,P,Y,ue){var he;for(he=0;he<P;++he){var pe=b[S+he],we=pe>>8&255,ve=16711935&(ve=(ve=16711935&pe)+((we<<16)+we));Y[ue+he]=(4278255360&pe)+ve>>>0}}function ut(b,S){S.jd=255&b,S.hd=b>>8&255,S.ud=b>>16&255}function Tt(b,S,P,Y,ue,he){var pe;for(pe=0;pe<Y;++pe){var we=S[P+pe],ve=we>>>8,Be=we,Ee=255&(Ee=(Ee=we>>>16)+((b.jd<<24>>24)*(ve<<24>>24)>>>5));Be=255&(Be=(Be+=(b.hd<<24>>24)*(ve<<24>>24)>>>5)+((b.ud<<24>>24)*(Ee<<24>>24)>>>5)),ue[he+pe]=(4278255360&we)+(Ee<<16)+Be}}function mt(b,S,P,Y,ue){T[S]=function(he,pe,we,ve,Be,Ee,Me,Ne,Le){for(ve=Me;ve<Ne;++ve)for(Me=0;Me<Le;++Me)Be[Ee++]=ue(we[Y(he[pe++])])},T[b]=function(he,pe,we,ve,Be,Ee,Me){var Ne=8>>he.b,Le=he.Ea,De=he.K[0],Xe=he.w;if(8>Ne)for(he=(1<<he.b)-1,Xe=(1<<Ne)-1;pe<we;++pe){var Oe,We=0;for(Oe=0;Oe<Le;++Oe)Oe&he||(We=Y(ve[Be++])),Ee[Me++]=ue(De[We&Xe]),We>>=Ne}else T["VP8LMapColor"+P](ve,Be,De,Xe,Ee,Me,pe,we,Le)}}function Ur(b,S,P,Y,ue){for(P=S+P;S<P;){var he=b[S++];Y[ue++]=he>>16&255,Y[ue++]=he>>8&255,Y[ue++]=255&he}}function jt(b,S,P,Y,ue){for(P=S+P;S<P;){var he=b[S++];Y[ue++]=he>>16&255,Y[ue++]=he>>8&255,Y[ue++]=255&he,Y[ue++]=he>>24&255}}function _t(b,S,P,Y,ue){for(P=S+P;S<P;){var he=(pe=b[S++])>>16&240|pe>>12&15,pe=240&pe|pe>>28&15;Y[ue++]=he,Y[ue++]=pe}}function Dt(b,S,P,Y,ue){for(P=S+P;S<P;){var he=(pe=b[S++])>>16&248|pe>>13&7,pe=pe>>5&224|pe>>3&31;Y[ue++]=he,Y[ue++]=pe}}function Gt(b,S,P,Y,ue){for(P=S+P;S<P;){var he=b[S++];Y[ue++]=255&he,Y[ue++]=he>>8&255,Y[ue++]=he>>16&255}}function kt(b,S,P,Y,ue,he){if(he==0)for(P=S+P;S<P;)oe(Y,((he=b[S++])[0]>>24|he[1]>>8&65280|he[2]<<8&16711680|he[3]<<24)>>>0),ue+=32;else n(Y,ue,b,S,P)}function Fr(b,S){T[S][0]=T[b+"0"],T[S][1]=T[b+"1"],T[S][2]=T[b+"2"],T[S][3]=T[b+"3"],T[S][4]=T[b+"4"],T[S][5]=T[b+"5"],T[S][6]=T[b+"6"],T[S][7]=T[b+"7"],T[S][8]=T[b+"8"],T[S][9]=T[b+"9"],T[S][10]=T[b+"10"],T[S][11]=T[b+"11"],T[S][12]=T[b+"12"],T[S][13]=T[b+"13"],T[S][14]=T[b+"0"],T[S][15]=T[b+"0"]}function It(b){return b==tc||b==ed||b==Wl||b==td}function Pt(){this.eb=[],this.size=this.A=this.fb=0}function Br(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function zt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Pt,this.f.kb=new Br,this.sd=null}function Bt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function cr(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function _n(b){return alert("todo:WebPSamplerProcessPlane"),b.T}function Aa(b,S){var P=b.T,Y=S.ba.f.RGBA,ue=Y.eb,he=Y.fb+b.ka*Y.A,pe=aa[S.ba.S],we=b.y,ve=b.O,Be=b.f,Ee=b.N,Me=b.ea,Ne=b.W,Le=S.cc,De=S.dc,Xe=S.Mc,Oe=S.Nc,We=b.ka,Ze=b.ka+b.T,ot=b.U,st=ot+1>>1;for(We==0?pe(we,ve,null,null,Be,Ee,Me,Ne,Be,Ee,Me,Ne,ue,he,null,null,ot):(pe(S.ec,S.fc,we,ve,Le,De,Xe,Oe,Be,Ee,Me,Ne,ue,he-Y.A,ue,he,ot),++P);We+2<Ze;We+=2)Le=Be,De=Ee,Xe=Me,Oe=Ne,Ee+=b.Rc,Ne+=b.Rc,he+=2*Y.A,pe(we,(ve+=2*b.fa)-b.fa,we,ve,Le,De,Xe,Oe,Be,Ee,Me,Ne,ue,he-Y.A,ue,he,ot);return ve+=b.fa,b.j+Ze<b.o?(n(S.ec,S.fc,we,ve,ot),n(S.cc,S.dc,Be,Ee,st),n(S.Mc,S.Nc,Me,Ne,st),P--):1&Ze||pe(we,ve,null,null,Be,Ee,Me,Ne,Be,Ee,Me,Ne,ue,he+Y.A,null,null,ot),P}function Xn(b,S,P){var Y=b.F,ue=[b.J];if(Y!=null){var he=b.U,pe=S.ba.S,we=pe==ec||pe==Wl;S=S.ba.f.RGBA;var ve=[0],Be=b.ka;ve[0]=b.T,b.Kb&&(Be==0?--ve[0]:(--Be,ue[0]-=b.width),b.j+b.ka+b.T==b.o&&(ve[0]=b.o-b.j-Be));var Ee=S.eb;Be=S.fb+Be*S.A,b=YA(Y,ue[0],b.width,he,ve,Ee,Be+(we?0:3),S.A),t(P==ve),b&&It(pe)&&rl(Ee,Be,we,he,ve,S.A)}return 0}function an(b){var S=b.ma,P=S.ba.S,Y=11>P,ue=P==ha||P==dn||P==ec||P==Vl||P==12||It(P);if(S.memory=null,S.Ib=null,S.Jb=null,S.Nd=null,!Hi(S.Oa,b,ue?11:12))return 0;if(ue&&It(P)&&GA(),b.da)alert("todo:use_scaling");else{if(Y){if(S.Ib=_n,b.Kb){if(P=b.U+1>>1,S.memory=l(b.U+2*P),S.memory==null)return 0;S.ec=S.memory,S.fc=0,S.cc=S.ec,S.dc=S.fc+b.U,S.Mc=S.cc,S.Nc=S.dc+P,S.Ib=Aa,GA()}}else alert("todo:EmitYUV");ue&&(S.Jb=Xn,Y&&Dn())}if(Y&&!Bo){for(b=0;256>b;++b)na[b]=89858*(b-128)+Jl>>xn,Dp[b]=-22014*(b-128)+Jl,rf[b]=-45773*(b-128),id[b]=113618*(b-128)+Jl>>xn;for(b=il;b<No;++b)S=76283*(b-16)+Jl>>xn,Rp[b-il]=Xa(S,255),Op[b-il]=Xa(S+8>>4,15);Bo=1}return 1}function Et(b){var S=b.ma,P=b.U,Y=b.T;return t(!(1&b.ka)),0>=P||0>=Y?0:(P=S.Ib(b,S),S.Jb!=null&&S.Jb(b,S,P),S.Dc+=P,1)}function Ci(b){b.ma.memory=null}function Yn(b,S,P,Y){return xe(b,8)!=47?0:(S[0]=xe(b,14)+1,P[0]=xe(b,14)+1,Y[0]=xe(b,1),xe(b,3)!=0?0:!b.h)}function qa(b,S){if(4>b)return b+1;var P=b-2>>1;return(2+(1&b)<<P)+xe(S,P)+1}function Ga(b,S){return 120<S?S-120:1<=(P=((P=hn[S-1])>>4)*b+(8-(15&P)))?P:1;var P}function Jr(b,S,P){var Y=X(P),ue=b[S+=255&Y].g-8;return 0<ue&&(J(P,P.u+8),Y=X(P),S+=b[S].value,S+=Y&(1<<ue)-1),J(P,P.u+b[S].g),b[S].value}function ws(b,S,P){return P.g+=b.g,P.value+=b.value<<S>>>0,t(8>=P.g),b.g}function qs(b,S,P){var Y=b.xc;return t((S=Y==0?0:b.vc[b.md*(P>>Y)+(S>>Y)])<b.Wb),b.Ya[S]}function co(b,S,P,Y){var ue=b.ab,he=b.c*S,pe=b.C;S=pe+S;var we=P,ve=Y;for(Y=b.Ta,P=b.Ua;0<ue--;){var Be=b.gc[ue],Ee=pe,Me=S,Ne=we,Le=ve,De=(ve=Y,we=P,Be.Ea);switch(t(Ee<Me),t(Me<=Be.nc),Be.hc){case 2:ps(Ne,Le,(Me-Ee)*De,ve,we);break;case 0:var Xe=Ee,Oe=Me,We=ve,Ze=we,ot=(bt=Be).Ea;Xe==0&&(Kl(Ne,Le,null,null,1,We,Ze),it(Ne,Le+1,0,0,ot-1,We,Ze+1),Le+=ot,Ze+=ot,++Xe);for(var st=1<<bt.b,vt=st-1,pt=k(ot,bt.b),Vt=bt.K,bt=bt.w+(Xe>>bt.b)*pt;Xe<Oe;){var sr=Vt,Vr=bt,Jt=1;for(zl(Ne,Le,We,Ze-ot,1,We,Ze);Jt<ot;){var xt=(Jt&~vt)+st;xt>ot&&(xt=ot),(0,Pi[sr[Vr++]>>8&15])(Ne,Le+ +Jt,We,Ze+Jt-ot,xt-Jt,We,Ze+Jt),Jt=xt}Le+=ot,Ze+=ot,++Xe&vt||(bt+=pt)}Me!=Be.nc&&n(ve,we-De,ve,we+(Me-Ee-1)*De,De);break;case 1:for(De=Ne,Oe=Le,ot=(Ne=Be.Ea)-(Ze=Ne&~(We=(Le=1<<Be.b)-1)),Xe=k(Ne,Be.b),st=Be.K,Be=Be.w+(Ee>>Be.b)*Xe;Ee<Me;){for(vt=st,pt=Be,Vt=new be,bt=Oe+Ze,sr=Oe+Ne;Oe<bt;)ut(vt[pt++],Vt),ql(Vt,De,Oe,Le,ve,we),Oe+=Le,we+=Le;Oe<sr&&(ut(vt[pt++],Vt),ql(Vt,De,Oe,ot,ve,we),Oe+=ot,we+=ot),++Ee&We||(Be+=Xe)}break;case 3:if(Ne==ve&&Le==we&&0<Be.b){for(Oe=ve,Ne=De=we+(Me-Ee)*De-(Ze=(Me-Ee)*k(Be.Ea,Be.b)),Le=ve,We=we,Xe=[],Ze=(ot=Ze)-1;0<=Ze;--Ze)Xe[Ze]=Le[We+Ze];for(Ze=ot-1;0<=Ze;--Ze)Oe[Ne+Ze]=Xe[Ze];Xc(Be,Ee,Me,ve,De,ve,we)}else Xc(Be,Ee,Me,Ne,Le,ve,we)}we=Y,ve=P}ve!=P&&n(Y,P,we,ve,he)}function wa(b,S){var P=b.V,Y=b.Ba+b.c*b.C,ue=S-b.C;if(t(S<=b.l.o),t(16>=ue),0<ue){var he=b.l,pe=b.Ta,we=b.Ua,ve=he.width;if(co(b,ue,P,Y),ue=we=[we],t((P=b.C)<(Y=S)),t(he.v<he.va),Y>he.o&&(Y=he.o),P<he.j){var Be=he.j-P;P=he.j,ue[0]+=Be*ve}if(P>=Y?P=0:(ue[0]+=4*he.v,he.ka=P-he.j,he.U=he.va-he.v,he.T=Y-P,P=1),P){if(we=we[0],11>(P=b.ca).S){var Ee=P.f.RGBA,Me=(Y=P.S,ue=he.U,he=he.T,Be=Ee.eb,Ee.A),Ne=he;for(Ee=Ee.fb+b.Ma*Ee.A;0<Ne--;){var Le=pe,De=we,Xe=ue,Oe=Be,We=Ee;switch(Y){case Zc:Gl(Le,De,Xe,Oe,We);break;case ha:Ki(Le,De,Xe,Oe,We);break;case tc:Ki(Le,De,Xe,Oe,We),rl(Oe,We,0,Xe,1,0);break;case $c:el(Le,De,Xe,Oe,We);break;case dn:kt(Le,De,Xe,Oe,We,1);break;case ed:kt(Le,De,Xe,Oe,We,1),rl(Oe,We,0,Xe,1,0);break;case ec:kt(Le,De,Xe,Oe,We,0);break;case Wl:kt(Le,De,Xe,Oe,We,0),rl(Oe,We,1,Xe,1,0);break;case Vl:zi(Le,De,Xe,Oe,We);break;case td:zi(Le,De,Xe,Oe,We),cn(Oe,We,Xe,1,0);break;case go:oi(Le,De,Xe,Oe,We);break;default:t(0)}we+=ve,Ee+=Me}b.Ma+=he}else alert("todo:EmitRescaledRowsYUVA");t(b.Ma<=P.height)}}b.C=S,t(b.C<=b.i)}function Qr(b){var S;if(0<b.ua)return 0;for(S=0;S<b.Wb;++S){var P=b.Ya[S].G,Y=b.Ya[S].H;if(0<P[1][Y[1]+0].g||0<P[2][Y[2]+0].g||0<P[3][Y[3]+0].g)return 0}return 1}function ts(b,S,P,Y,ue,he){if(b.Z!=0){var pe=b.qd,we=b.rd;for(t(Vi[b.Z]!=null);S<P;++S)Vi[b.Z](pe,we,Y,ue,Y,ue,he),pe=Y,we=ue,ue+=he;b.qd=pe,b.rd=we}}function ca(b,S){var P=b.l.ma,Y=P.Z==0||P.Z==1?b.l.j:b.C;if(Y=b.C<Y?Y:b.C,t(S<=b.l.o),S>Y){var ue=b.l.width,he=P.ca,pe=P.tb+ue*Y,we=b.V,ve=b.Ba+b.c*Y,Be=b.gc;t(b.ab==1),t(Be[0].hc==3),ii(Be[0],Y,S,we,ve,he,pe),ts(P,Y,S,he,pe,ue)}b.C=b.Ma=S}function Va(b,S,P,Y,ue,he,pe){var we=b.$/Y,ve=b.$%Y,Be=b.m,Ee=b.s,Me=P+b.$,Ne=Me;ue=P+Y*ue;var Le=P+Y*he,De=280+Ee.ua,Xe=b.Pb?we:16777216,Oe=0<Ee.ua?Ee.Wa:null,We=Ee.wc,Ze=Me<Le?qs(Ee,ve,we):null;t(b.C<he),t(Le<=ue);var ot=!1;e:for(;;){for(;ot||Me<Le;){var st=0;if(we>=Xe){var vt=Me-P;t((Xe=b).Pb),Xe.wd=Xe.m,Xe.xd=vt,0<Xe.s.ua&&W(Xe.s.Wa,Xe.s.vb),Xe=we+bo}if(ve&We||(Ze=qs(Ee,ve,we)),t(Ze!=null),Ze.Qb&&(S[Me]=Ze.qb,ot=!0),!ot)if(O(Be),Ze.jc){st=Be,vt=S;var pt=Me,Vt=Ze.pd[X(st)&xo-1];t(Ze.jc),256>Vt.g?(J(st,st.u+Vt.g),vt[pt]=Vt.value,st=0):(J(st,st.u+Vt.g-256),t(256<=Vt.value),st=Vt.value),st==0&&(ot=!0)}else st=Jr(Ze.G[0],Ze.H[0],Be);if(Be.h)break;if(ot||256>st){if(!ot)if(Ze.nd)S[Me]=(Ze.qb|st<<8)>>>0;else{if(O(Be),ot=Jr(Ze.G[1],Ze.H[1],Be),O(Be),vt=Jr(Ze.G[2],Ze.H[2],Be),pt=Jr(Ze.G[3],Ze.H[3],Be),Be.h)break;S[Me]=(pt<<24|ot<<16|st<<8|vt)>>>0}if(ot=!1,++Me,++ve>=Y&&(ve=0,++we,pe!=null&&we<=he&&!(we%16)&&pe(b,we),Oe!=null))for(;Ne<Me;)st=S[Ne++],Oe.X[(506832829*st&4294967295)>>>Oe.Mb]=st}else if(280>st){if(st=qa(st-256,Be),vt=Jr(Ze.G[4],Ze.H[4],Be),O(Be),vt=Ga(Y,vt=qa(vt,Be)),Be.h)break;if(Me-P<vt||ue-Me<st)break e;for(pt=0;pt<st;++pt)S[Me+pt]=S[Me+pt-vt];for(Me+=st,ve+=st;ve>=Y;)ve-=Y,++we,pe!=null&&we<=he&&!(we%16)&&pe(b,we);if(t(Me<=ue),ve&We&&(Ze=qs(Ee,ve,we)),Oe!=null)for(;Ne<Me;)st=S[Ne++],Oe.X[(506832829*st&4294967295)>>>Oe.Mb]=st}else{if(!(st<De))break e;for(ot=st-280,t(Oe!=null);Ne<Me;)st=S[Ne++],Oe.X[(506832829*st&4294967295)>>>Oe.Mb]=st;st=Me,t(!(ot>>>(vt=Oe).Xa)),S[st]=vt.X[ot],ot=!0}ot||t(Be.h==te(Be))}if(b.Pb&&Be.h&&Me<ue)t(b.m.h),b.a=5,b.m=b.wd,b.$=b.xd,0<b.s.ua&&W(b.s.vb,b.s.Wa);else{if(Be.h)break e;pe?.(b,we>he?he:we),b.a=0,b.$=Me-P}return 1}return b.a=3,0}function nn(b){t(b!=null),b.vc=null,b.yc=null,b.Ya=null;var S=b.Wa;S!=null&&(S.X=null),b.vb=null,t(b!=null)}function qo(){var b=new Kt;return b==null?null:(b.a=0,b.xb=wu,Fr("Predictor","VP8LPredictors"),Fr("Predictor","VP8LPredictors_C"),Fr("PredictorAdd","VP8LPredictorsAdd"),Fr("PredictorAdd","VP8LPredictorsAdd_C"),ps=lt,ql=Tt,Gl=Ur,Ki=jt,zi=_t,oi=Dt,el=Gt,T.VP8LMapColor32b=ni,T.VP8LMapColor8b=ta,b)}function kn(b,S,P,Y,ue){var he=1,pe=[b],we=[S],ve=Y.m,Be=Y.s,Ee=null,Me=0;e:for(;;){if(P)for(;he&&xe(ve,1);){var Ne=pe,Le=we,De=Y,Xe=1,Oe=De.m,We=De.gc[De.ab],Ze=xe(Oe,2);if(De.Oc&1<<Ze)he=0;else{switch(De.Oc|=1<<Ze,We.hc=Ze,We.Ea=Ne[0],We.nc=Le[0],We.K=[null],++De.ab,t(4>=De.ab),Ze){case 0:case 1:We.b=xe(Oe,3)+2,Xe=kn(k(We.Ea,We.b),k(We.nc,We.b),0,De,We.K),We.K=We.K[0];break;case 3:var ot,st=xe(Oe,8)+1,vt=16<st?0:4<st?1:2<st?2:3;if(Ne[0]=k(We.Ea,vt),We.b=vt,ot=Xe=kn(st,1,0,De,We.K)){var pt,Vt=st,bt=We,sr=1<<(8>>bt.b),Vr=l(sr);if(Vr==null)ot=0;else{var Jt=bt.K[0],xt=bt.w;for(Vr[0]=bt.K[0][0],pt=1;pt<1*Vt;++pt)Vr[pt]=G(Jt[xt+pt],Vr[pt-1]);for(;pt<4*sr;++pt)Vr[pt]=0;bt.K[0]=null,bt.K[0]=Vr,ot=1}}Xe=ot;break;case 2:break;default:t(0)}he=Xe}}if(pe=pe[0],we=we[0],he&&xe(ve,1)&&!(he=1<=(Me=xe(ve,4))&&11>=Me)){Y.a=3;break e}var At;if(At=he)t:{var ss,Ot,$t,Sr=Y,Is=pe,ia=we,Or=Me,Bs=P,fa=Sr.m,js=Sr.s,tr=[null],mr=1,as=0,vr=fn[Or];r:for(;;){if(Bs&&xe(fa,1)){var Ds=xe(fa,3)+2,ns=k(Is,Ds),pr=k(ia,Ds),bs=ns*pr;if(!kn(ns,pr,0,Sr,tr))break r;for(tr=tr[0],js.xc=Ds,ss=0;ss<bs;++ss){var _r=tr[ss]>>8&65535;tr[ss]=_r,_r>=mr&&(mr=_r+1)}}if(fa.h)break r;for(Ot=0;5>Ot;++Ot){var Cs=al[Ot];!Ot&&0<Or&&(Cs+=1<<Or),as<Cs&&(as=Cs)}var Ss=d(mr*vr,q),Lr=mr,hr=d(Lr,le);if(hr==null)var ma=null;else t(65536>=Lr),ma=hr;var As=l(as);if(ma==null||As==null||Ss==null){Sr.a=1;break r}var Ut=Ss;for(ss=$t=0;ss<mr;++ss){var Qt=ma[ss],xr=Qt.G,Ia=Qt.H,gn=0,Sa=1,_s=0;for(Ot=0;5>Ot;++Ot){Cs=al[Ot],xr[Ot]=Ut,Ia[Ot]=$t,!Ot&&0<Or&&(Cs+=1<<Or);a:{var jo,Co=Cs,ld=Sr,Hr=As,Nu=Ut,Bu=$t,Ad=0,Wi=ld.m,Hp=xe(Wi,1);if(o(Hr,0,0,Co),Hp){var ju=xe(Wi,1)+1,Cu=xe(Wi,1),cd=xe(Wi,Cu==0?1:8);Hr[cd]=1,ju==2&&(Hr[cd=xe(Wi,8)]=1);var Ws=1}else{var cs=l(19),nc=xe(Wi,4)+4;if(19<nc){ld.a=3;var So=0;break a}for(jo=0;jo<nc;++jo)cs[rc[jo]]=xe(Wi,3);var $l=void 0,ol=void 0,ci=ld,dd=cs,eA=Co,ud=Hr,hd=0,Xi=ci.m,Su=8,_u=d(128,q);s:for(;U(_u,0,7,dd,19);){if(xe(Xi,1)){var sf=2+2*xe(Xi,3);if(($l=2+xe(Xi,sf))>eA)break s}else $l=eA;for(ol=0;ol<eA&&$l--;){O(Xi);var ku=_u[0+(127&X(Xi))];J(Xi,Xi.u+ku.g);var _o=ku.value;if(16>_o)ud[ol++]=_o,_o!=0&&(Su=_o);else{var af=_o==16,nf=_o-16,of=Xl[nf],Fu=xe(Xi,un[nf])+of;if(ol+Fu>eA)break s;for(var lf=af?Su:0;0<Fu--;)ud[ol++]=lf}}hd=1;break s}hd||(ci.a=3),Ws=hd}(Ws=Ws&&!Wi.h)&&(Ad=U(Nu,Bu,8,Hr,Co)),Ws&&Ad!=0?So=Ad:(ld.a=3,So=0)}if(So==0)break r;if(Sa&&rd[Ot]==1&&(Sa=Ut[$t].g==0),gn+=Ut[$t].g,$t+=So,3>=Ot){var ll,fd=As[0];for(ll=1;ll<Cs;++ll)As[ll]>fd&&(fd=As[ll]);_s+=fd}}if(Qt.nd=Sa,Qt.Qb=0,Sa&&(Qt.qb=(xr[3][Ia[3]+0].value<<24|xr[1][Ia[1]+0].value<<16|xr[2][Ia[2]+0].value)>>>0,gn==0&&256>xr[0][Ia[0]+0].value&&(Qt.Qb=1,Qt.qb+=xr[0][Ia[0]+0].value<<8)),Qt.jc=!Qt.Qb&&6>_s,Qt.jc){var ic,di=Qt;for(ic=0;ic<xo;++ic){var Yi=ic,Ji=di.pd[Yi],md=di.G[0][di.H[0]+Yi];256<=md.value?(Ji.g=md.g+256,Ji.value=md.value):(Ji.g=0,Ji.value=0,Yi>>=ws(md,8,Ji),Yi>>=ws(di.G[1][di.H[1]+Yi],16,Ji),Yi>>=ws(di.G[2][di.H[2]+Yi],0,Ji),ws(di.G[3][di.H[3]+Yi],24,Ji))}}}js.vc=tr,js.Wb=mr,js.Ya=ma,js.yc=Ss,At=1;break t}At=0}if(!(he=At)){Y.a=3;break e}if(0<Me){if(Be.ua=1<<Me,!ie(Be.Wa,Me)){Y.a=1,he=0;break e}}else Be.ua=0;var pd=Y,Al=pe,Af=we,tA=pd.s,rA=tA.xc;if(pd.c=Al,pd.i=Af,tA.md=k(Al,rA),tA.wc=rA==0?-1:(1<<rA)-1,P){Y.xb=yo;break e}if((Ee=l(pe*we))==null){Y.a=1,he=0;break e}he=(he=Va(Y,Ee,0,pe,we,we,null))&&!ve.h;break e}return he?(ue!=null?ue[0]=Ee:(t(Ee==null),t(P)),Y.$=0,P||nn(Be)):nn(Be),he}function Fn(b,S){var P=b.c*b.i,Y=P+S+16*S;return t(b.c<=S),b.V=l(Y),b.V==null?(b.Ta=null,b.Ua=0,b.a=1,0):(b.Ta=b.V,b.Ua=b.Ba+P+S,1)}function uo(b,S){var P=b.C,Y=S-P,ue=b.V,he=b.Ba+b.c*P;for(t(S<=b.l.o);0<Y;){var pe=16<Y?16:Y,we=b.l.ma,ve=b.l.width,Be=ve*pe,Ee=we.ca,Me=we.tb+ve*P,Ne=b.Ta,Le=b.Ua;co(b,pe,ue,he),en(Ne,Le,Ee,Me,Be),ts(we,P,P+pe,Ee,Me,ve),Y-=pe,ue+=pe*b.c,P+=pe}t(P==S),b.C=b.Ma=S}function En(){this.ub=this.yd=this.td=this.Rb=0}function Un(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Go(){this.Fb=this.Bb=this.Cb=0,this.Zb=l(4),this.Lb=l(4)}function Jn(){this.Yb=(function(){var b=[];return(function S(P,Y,ue){for(var he=ue[Y],pe=0;pe<he&&(P.push(ue.length>Y+1?[]:0),!(ue.length<Y+1));pe++)S(P[pe],Y+1,ue)})(b,0,[3,11]),b})()}function fs(){this.jb=l(3),this.Wc=c([4,8],Jn),this.Xc=c([4,17],Jn)}function UA(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new l(4),this.od=new l(4)}function Wa(){this.ld=this.La=this.dd=this.tc=0}function Qn(){this.Na=this.la=0}function Si(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function QA(){this.ad=l(384),this.Za=0,this.Ob=l(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function LA(){this.uc=this.M=this.Nb=0,this.wa=Array(new Wa),this.Y=0,this.ya=Array(new QA),this.aa=0,this.l=new _i}function TA(){this.y=l(16),this.f=l(8),this.ea=l(8)}function Oc(){this.cb=this.a=0,this.sc="",this.m=new D,this.Od=new En,this.Kc=new Un,this.ed=new UA,this.Qa=new Go,this.Ic=this.$c=this.Aa=0,this.D=new LA,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=d(8,D),this.ia=0,this.pb=d(4,Si),this.Pa=new fs,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new TA),this.Hd=0,this.rb=Array(new Qn),this.sb=0,this.wa=Array(new Wa),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new QA),this.L=this.aa=0,this.gd=c([4,2],Wa),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Xa(b,S){return 0>b?0:b>S?S:b}function _i(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ln(){var b=new Oc;return b!=null&&(b.a=0,b.sc="OK",b.cb=0,b.Xb=0,tn||(tn=ho)),b}function yr(b,S,P){return b.a==0&&(b.a=S,b.sc=P,b.cb=0),0}function IA(b,S,P){return 3<=P&&b[S+0]==157&&b[S+1]==1&&b[S+2]==42}function Zn(b,S){if(b==null)return 0;if(b.a=0,b.sc="OK",S==null)return yr(b,2,"null VP8Io passed to VP8GetHeaders()");var P=S.data,Y=S.w,ue=S.ha;if(4>ue)return yr(b,7,"Truncated header.");var he=P[Y+0]|P[Y+1]<<8|P[Y+2]<<16,pe=b.Od;if(pe.Rb=!(1&he),pe.td=he>>1&7,pe.yd=he>>4&1,pe.ub=he>>5,3<pe.td)return yr(b,3,"Incorrect keyframe parameters.");if(!pe.yd)return yr(b,4,"Frame not displayable.");Y+=3,ue-=3;var we=b.Kc;if(pe.Rb){if(7>ue)return yr(b,7,"cannot parse picture header");if(!IA(P,Y,ue))return yr(b,3,"Bad code word");we.c=16383&(P[Y+4]<<8|P[Y+3]),we.Td=P[Y+4]>>6,we.i=16383&(P[Y+6]<<8|P[Y+5]),we.Ud=P[Y+6]>>6,Y+=7,ue-=7,b.za=we.c+15>>4,b.Ub=we.i+15>>4,S.width=we.c,S.height=we.i,S.Da=0,S.j=0,S.v=0,S.va=S.width,S.o=S.height,S.da=0,S.ib=S.width,S.hb=S.height,S.U=S.width,S.T=S.height,o((he=b.Pa).jb,0,255,he.jb.length),t((he=b.Qa)!=null),he.Cb=0,he.Bb=0,he.Fb=1,o(he.Zb,0,0,he.Zb.length),o(he.Lb,0,0,he.Lb)}if(pe.ub>ue)return yr(b,7,"bad partition length");ae(he=b.m,P,Y,pe.ub),Y+=pe.ub,ue-=pe.ub,pe.Rb&&(we.Ld=re(he),we.Kd=re(he)),we=b.Qa;var ve,Be=b.Pa;if(t(he!=null),t(we!=null),we.Cb=re(he),we.Cb){if(we.Bb=re(he),re(he)){for(we.Fb=re(he),ve=0;4>ve;++ve)we.Zb[ve]=re(he)?fe(he,7):0;for(ve=0;4>ve;++ve)we.Lb[ve]=re(he)?fe(he,6):0}if(we.Bb)for(ve=0;3>ve;++ve)Be.jb[ve]=re(he)?se(he,8):255}else we.Bb=0;if(he.Ka)return yr(b,3,"cannot parse segment header");if((we=b.ed).zd=re(he),we.Tb=se(he,6),we.wb=se(he,3),we.Pc=re(he),we.Pc&&re(he)){for(Be=0;4>Be;++Be)re(he)&&(we.vd[Be]=fe(he,6));for(Be=0;4>Be;++Be)re(he)&&(we.od[Be]=fe(he,6))}if(b.L=we.Tb==0?0:we.zd?1:2,he.Ka)return yr(b,3,"cannot parse filter header");var Ee=ue;if(ue=ve=Y,Y=ve+Ee,we=Ee,b.Xb=(1<<se(b.m,2))-1,Ee<3*(Be=b.Xb))P=7;else{for(ve+=3*Be,we-=3*Be,Ee=0;Ee<Be;++Ee){var Me=P[ue+0]|P[ue+1]<<8|P[ue+2]<<16;Me>we&&(Me=we),ae(b.Jc[+Ee],P,ve,Me),ve+=Me,we-=Me,ue+=3}ae(b.Jc[+Be],P,ve,we),P=ve<Y?0:5}if(P!=0)return yr(b,P,"cannot parse partitions");for(P=se(ve=b.m,7),ue=re(ve)?fe(ve,4):0,Y=re(ve)?fe(ve,4):0,we=re(ve)?fe(ve,4):0,Be=re(ve)?fe(ve,4):0,ve=re(ve)?fe(ve,4):0,Ee=b.Qa,Me=0;4>Me;++Me){if(Ee.Cb){var Ne=Ee.Zb[Me];Ee.Fb||(Ne+=P)}else{if(0<Me){b.pb[Me]=b.pb[0];continue}Ne=P}var Le=b.pb[Me];Le.Sc[0]=mn[Xa(Ne+ue,127)],Le.Sc[1]=pn[Xa(Ne+0,127)],Le.Eb[0]=2*mn[Xa(Ne+Y,127)],Le.Eb[1]=101581*pn[Xa(Ne+we,127)]>>16,8>Le.Eb[1]&&(Le.Eb[1]=8),Le.Qc[0]=mn[Xa(Ne+Be,117)],Le.Qc[1]=pn[Xa(Ne+ve,127)],Le.lc=Ne+ve}if(!pe.Rb)return yr(b,4,"Not a key frame.");for(re(he),pe=b.Pa,P=0;4>P;++P){for(ue=0;8>ue;++ue)for(Y=0;3>Y;++Y)for(we=0;11>we;++we)Be=Ae(he,Gr[P][ue][Y][we])?se(he,8):tf[P][ue][Y][we],pe.Wc[P][ue].Yb[Y][we]=Be;for(ue=0;17>ue;++ue)pe.Xc[P][ue]=pe.Wc[P][ar[ue]]}return b.kc=re(he),b.kc&&(b.Bd=se(he,8)),b.cb=1}function ho(b,S,P,Y,ue,he,pe){var we=S[ue].Yb[P];for(P=0;16>ue;++ue){if(!Ae(b,we[P+0]))return ue;for(;!Ae(b,we[P+1]);)if(we=S[++ue].Yb[0],P=0,ue==16)return 16;var ve=S[ue+1].Yb;if(Ae(b,we[P+2])){var Be=b,Ee=0;if(Ae(Be,(Ne=we)[(Me=P)+3]))if(Ae(Be,Ne[Me+6])){for(we=0,Me=2*(Ee=Ae(Be,Ne[Me+8]))+(Ne=Ae(Be,Ne[Me+9+Ee])),Ee=0,Ne=ef[Me];Ne[we];++we)Ee+=Ee+Ae(Be,Ne[we]);Ee+=3+(8<<Me)}else Ae(Be,Ne[Me+7])?(Ee=7+2*Ae(Be,165),Ee+=Ae(Be,145)):Ee=5+Ae(Be,159);else Ee=Ae(Be,Ne[Me+4])?3+Ae(Be,Ne[Me+5]):2;we=ve[2]}else Ee=1,we=ve[1];ve=pe+yu[ue],0>(Be=b).b&&H(Be);var Me,Ne=Be.b,Le=(Me=Be.Ca>>1)-(Be.I>>Ne)>>31;--Be.b,Be.Ca+=Le,Be.Ca|=1,Be.I-=(Me+1&Le)<<Ne,he[ve]=((Ee^Le)-Le)*Y[(0<ue)+0]}return 16}function DA(b){var S=b.rb[b.sb-1];S.la=0,S.Na=0,o(b.zc,0,0,b.zc.length),b.ja=0}function va(b,S,P,Y,ue){ue=b[S+P+32*Y]+(ue>>3),b[S+P+32*Y]=-256&ue?0>ue?0:255:ue}function Ls(b,S,P,Y,ue,he){va(b,S,0,P,Y+ue),va(b,S,1,P,Y+he),va(b,S,2,P,Y-he),va(b,S,3,P,Y-ue)}function vs(b){return(20091*b>>16)+b}function Il(b,S,P,Y){var ue,he=0,pe=l(16);for(ue=0;4>ue;++ue){var we=b[S+0]+b[S+8],ve=b[S+0]-b[S+8],Be=(35468*b[S+4]>>16)-vs(b[S+12]),Ee=vs(b[S+4])+(35468*b[S+12]>>16);pe[he+0]=we+Ee,pe[he+1]=ve+Be,pe[he+2]=ve-Be,pe[he+3]=we-Ee,he+=4,S++}for(ue=he=0;4>ue;++ue)we=(b=pe[he+0]+4)+pe[he+8],ve=b-pe[he+8],Be=(35468*pe[he+4]>>16)-vs(pe[he+12]),va(P,Y,0,0,we+(Ee=vs(pe[he+4])+(35468*pe[he+12]>>16))),va(P,Y,1,0,ve+Be),va(P,Y,2,0,ve-Be),va(P,Y,3,0,we-Ee),he++,Y+=32}function Hc(b,S,P,Y){var ue=b[S+0]+4,he=35468*b[S+4]>>16,pe=vs(b[S+4]),we=35468*b[S+1]>>16;Ls(P,Y,0,ue+pe,b=vs(b[S+1]),we),Ls(P,Y,1,ue+he,b,we),Ls(P,Y,2,ue-he,b,we),Ls(P,Y,3,ue-pe,b,we)}function RA(b,S,P,Y,ue){Il(b,S,P,Y),ue&&Il(b,S+16,P,Y+4)}function Na(b,S,P,Y){qi(b,S+0,P,Y,1),qi(b,S+32,P,Y+128,1)}function OA(b,S,P,Y){var ue;for(b=b[S+0]+4,ue=0;4>ue;++ue)for(S=0;4>S;++S)va(P,Y,S,ue,b)}function HA(b,S,P,Y){b[S+0]&&wr(b,S+0,P,Y),b[S+16]&&wr(b,S+16,P,Y+4),b[S+32]&&wr(b,S+32,P,Y+128),b[S+48]&&wr(b,S+48,P,Y+128+4)}function Tn(b,S,P,Y){var ue,he=l(16);for(ue=0;4>ue;++ue){var pe=b[S+0+ue]+b[S+12+ue],we=b[S+4+ue]+b[S+8+ue],ve=b[S+4+ue]-b[S+8+ue],Be=b[S+0+ue]-b[S+12+ue];he[0+ue]=pe+we,he[8+ue]=pe-we,he[4+ue]=Be+ve,he[12+ue]=Be-ve}for(ue=0;4>ue;++ue)pe=(b=he[0+4*ue]+3)+he[3+4*ue],we=he[1+4*ue]+he[2+4*ue],ve=he[1+4*ue]-he[2+4*ue],Be=b-he[3+4*ue],P[Y+0]=pe+we>>3,P[Y+16]=Be+ve>>3,P[Y+32]=pe-we>>3,P[Y+48]=Be-ve>>3,Y+=64}function Vo(b,S,P){var Y,ue=S-32,he=ua,pe=255-b[ue-1];for(Y=0;Y<P;++Y){var we,ve=he,Be=pe+b[S-1];for(we=0;we<P;++we)b[S+we]=ve[Be+b[ue+we]];S+=32}}function Mc(b,S){Vo(b,S,4)}function Pc(b,S){Vo(b,S,8)}function MA(b,S){Vo(b,S,16)}function PA(b,S){var P;for(P=0;16>P;++P)n(b,S+32*P,b,S-32,16)}function Kc(b,S){var P;for(P=16;0<P;--P)o(b,S,b[S-1],16),S+=32}function La(b,S,P){var Y;for(Y=0;16>Y;++Y)o(S,P+32*Y,b,16)}function In(b,S){var P,Y=16;for(P=0;16>P;++P)Y+=b[S-1+32*P]+b[S+P-32];La(Y>>5,b,S)}function ki(b,S){var P,Y=8;for(P=0;16>P;++P)Y+=b[S-1+32*P];La(Y>>4,b,S)}function Wo(b,S){var P,Y=8;for(P=0;16>P;++P)Y+=b[S+P-32];La(Y>>4,b,S)}function fo(b,S){La(128,b,S)}function Rt(b,S,P){return b+2*S+P+2>>2}function zc(b,S){var P,Y=S-32;for(Y=new Uint8Array([Rt(b[Y-1],b[Y+0],b[Y+1]),Rt(b[Y+0],b[Y+1],b[Y+2]),Rt(b[Y+1],b[Y+2],b[Y+3]),Rt(b[Y+2],b[Y+3],b[Y+4])]),P=0;4>P;++P)n(b,S+32*P,Y,0,Y.length)}function KA(b,S){var P=b[S-1],Y=b[S-1+32],ue=b[S-1+64],he=b[S-1+96];oe(b,S+0,16843009*Rt(b[S-1-32],P,Y)),oe(b,S+32,16843009*Rt(P,Y,ue)),oe(b,S+64,16843009*Rt(Y,ue,he)),oe(b,S+96,16843009*Rt(ue,he,he))}function qc(b,S){var P,Y=4;for(P=0;4>P;++P)Y+=b[S+P-32]+b[S-1+32*P];for(Y>>=3,P=0;4>P;++P)o(b,S+32*P,Y,4)}function Ya(b,S){var P=b[S-1+0],Y=b[S-1+32],ue=b[S-1+64],he=b[S-1-32],pe=b[S+0-32],we=b[S+1-32],ve=b[S+2-32],Be=b[S+3-32];b[S+0+96]=Rt(Y,ue,b[S-1+96]),b[S+1+96]=b[S+0+64]=Rt(P,Y,ue),b[S+2+96]=b[S+1+64]=b[S+0+32]=Rt(he,P,Y),b[S+3+96]=b[S+2+64]=b[S+1+32]=b[S+0+0]=Rt(pe,he,P),b[S+3+64]=b[S+2+32]=b[S+1+0]=Rt(we,pe,he),b[S+3+32]=b[S+2+0]=Rt(ve,we,pe),b[S+3+0]=Rt(Be,ve,we)}function $s(b,S){var P=b[S+1-32],Y=b[S+2-32],ue=b[S+3-32],he=b[S+4-32],pe=b[S+5-32],we=b[S+6-32],ve=b[S+7-32];b[S+0+0]=Rt(b[S+0-32],P,Y),b[S+1+0]=b[S+0+32]=Rt(P,Y,ue),b[S+2+0]=b[S+1+32]=b[S+0+64]=Rt(Y,ue,he),b[S+3+0]=b[S+2+32]=b[S+1+64]=b[S+0+96]=Rt(ue,he,pe),b[S+3+32]=b[S+2+64]=b[S+1+96]=Rt(he,pe,we),b[S+3+64]=b[S+2+96]=Rt(pe,we,ve),b[S+3+96]=Rt(we,ve,ve)}function zA(b,S){var P=b[S-1+0],Y=b[S-1+32],ue=b[S-1+64],he=b[S-1-32],pe=b[S+0-32],we=b[S+1-32],ve=b[S+2-32],Be=b[S+3-32];b[S+0+0]=b[S+1+64]=he+pe+1>>1,b[S+1+0]=b[S+2+64]=pe+we+1>>1,b[S+2+0]=b[S+3+64]=we+ve+1>>1,b[S+3+0]=ve+Be+1>>1,b[S+0+96]=Rt(ue,Y,P),b[S+0+64]=Rt(Y,P,he),b[S+0+32]=b[S+1+96]=Rt(P,he,pe),b[S+1+32]=b[S+2+96]=Rt(he,pe,we),b[S+2+32]=b[S+3+96]=Rt(pe,we,ve),b[S+3+32]=Rt(we,ve,Be)}function Xo(b,S){var P=b[S+0-32],Y=b[S+1-32],ue=b[S+2-32],he=b[S+3-32],pe=b[S+4-32],we=b[S+5-32],ve=b[S+6-32],Be=b[S+7-32];b[S+0+0]=P+Y+1>>1,b[S+1+0]=b[S+0+64]=Y+ue+1>>1,b[S+2+0]=b[S+1+64]=ue+he+1>>1,b[S+3+0]=b[S+2+64]=he+pe+1>>1,b[S+0+32]=Rt(P,Y,ue),b[S+1+32]=b[S+0+96]=Rt(Y,ue,he),b[S+2+32]=b[S+1+96]=Rt(ue,he,pe),b[S+3+32]=b[S+2+96]=Rt(he,pe,we),b[S+3+64]=Rt(pe,we,ve),b[S+3+96]=Rt(we,ve,Be)}function Ja(b,S){var P=b[S-1+0],Y=b[S-1+32],ue=b[S-1+64],he=b[S-1+96];b[S+0+0]=P+Y+1>>1,b[S+2+0]=b[S+0+32]=Y+ue+1>>1,b[S+2+32]=b[S+0+64]=ue+he+1>>1,b[S+1+0]=Rt(P,Y,ue),b[S+3+0]=b[S+1+32]=Rt(Y,ue,he),b[S+3+32]=b[S+1+64]=Rt(ue,he,he),b[S+3+64]=b[S+2+64]=b[S+0+96]=b[S+1+96]=b[S+2+96]=b[S+3+96]=he}function Yo(b,S){var P=b[S-1+0],Y=b[S-1+32],ue=b[S-1+64],he=b[S-1+96],pe=b[S-1-32],we=b[S+0-32],ve=b[S+1-32],Be=b[S+2-32];b[S+0+0]=b[S+2+32]=P+pe+1>>1,b[S+0+32]=b[S+2+64]=Y+P+1>>1,b[S+0+64]=b[S+2+96]=ue+Y+1>>1,b[S+0+96]=he+ue+1>>1,b[S+3+0]=Rt(we,ve,Be),b[S+2+0]=Rt(pe,we,ve),b[S+1+0]=b[S+3+32]=Rt(P,pe,we),b[S+1+32]=b[S+3+64]=Rt(Y,P,pe),b[S+1+64]=b[S+3+96]=Rt(ue,Y,P),b[S+1+96]=Rt(he,ue,Y)}function $n(b,S){var P;for(P=0;8>P;++P)n(b,S+32*P,b,S-32,8)}function Gc(b,S){var P;for(P=0;8>P;++P)o(b,S,b[S-1],8),S+=32}function on(b,S,P){var Y;for(Y=0;8>Y;++Y)o(S,P+32*Y,b,8)}function Dl(b,S){var P,Y=8;for(P=0;8>P;++P)Y+=b[S+P-32]+b[S-1+32*P];on(Y>>4,b,S)}function Rl(b,S){var P,Y=4;for(P=0;8>P;++P)Y+=b[S+P-32];on(Y>>3,b,S)}function Gs(b,S){var P,Y=4;for(P=0;8>P;++P)Y+=b[S-1+32*P];on(Y>>3,b,S)}function ei(b,S){on(128,b,S)}function ln(b,S,P){var Y=b[S-P],ue=b[S+0],he=3*(ue-Y)+Gi[1020+b[S-2*P]-b[S+P]],pe=$A[112+(he+4>>3)];b[S-P]=ua[255+Y+$A[112+(he+3>>3)]],b[S+0]=ua[255+ue-pe]}function Fi(b,S,P,Y){var ue=b[S+0],he=b[S+P];return ra[255+b[S-2*P]-b[S-P]]>Y||ra[255+he-ue]>Y}function Ol(b,S,P,Y){return 4*ra[255+b[S-P]-b[S+0]]+ra[255+b[S-2*P]-b[S+P]]<=Y}function Jo(b,S,P,Y,ue){var he=b[S-3*P],pe=b[S-2*P],we=b[S-P],ve=b[S+0],Be=b[S+P],Ee=b[S+2*P],Me=b[S+3*P];return 4*ra[255+we-ve]+ra[255+pe-Be]>Y?0:ra[255+b[S-4*P]-he]<=ue&&ra[255+he-pe]<=ue&&ra[255+pe-we]<=ue&&ra[255+Me-Ee]<=ue&&ra[255+Ee-Be]<=ue&&ra[255+Be-ve]<=ue}function Ei(b,S,P,Y){var ue=2*Y+1;for(Y=0;16>Y;++Y)Ol(b,S+Y,P,ue)&&ln(b,S+Y,P)}function Ui(b,S,P,Y){var ue=2*Y+1;for(Y=0;16>Y;++Y)Ol(b,S+Y*P,1,ue)&&ln(b,S+Y*P,1)}function Zo(b,S,P,Y){var ue;for(ue=3;0<ue;--ue)Ei(b,S+=4*P,P,Y)}function qA(b,S,P,Y){var ue;for(ue=3;0<ue;--ue)Ui(b,S+=4,P,Y)}function Qi(b,S,P,Y,ue,he,pe,we){for(he=2*he+1;0<ue--;){if(Jo(b,S,P,he,pe))if(Fi(b,S,P,we))ln(b,S,P);else{var ve=b,Be=S,Ee=P,Me=ve[Be-2*Ee],Ne=ve[Be-Ee],Le=ve[Be+0],De=ve[Be+Ee],Xe=ve[Be+2*Ee],Oe=27*(Ze=Gi[1020+3*(Le-Ne)+Gi[1020+Me-De]])+63>>7,We=18*Ze+63>>7,Ze=9*Ze+63>>7;ve[Be-3*Ee]=ua[255+ve[Be-3*Ee]+Ze],ve[Be-2*Ee]=ua[255+Me+We],ve[Be-Ee]=ua[255+Ne+Oe],ve[Be+0]=ua[255+Le-Oe],ve[Be+Ee]=ua[255+De-We],ve[Be+2*Ee]=ua[255+Xe-Ze]}S+=Y}}function Li(b,S,P,Y,ue,he,pe,we){for(he=2*he+1;0<ue--;){if(Jo(b,S,P,he,pe))if(Fi(b,S,P,we))ln(b,S,P);else{var ve=b,Be=S,Ee=P,Me=ve[Be-Ee],Ne=ve[Be+0],Le=ve[Be+Ee],De=$A[112+(4+(Xe=3*(Ne-Me))>>3)],Xe=$A[112+(Xe+3>>3)],Oe=De+1>>1;ve[Be-2*Ee]=ua[255+ve[Be-2*Ee]+Oe],ve[Be-Ee]=ua[255+Me+Xe],ve[Be+0]=ua[255+Ne-De],ve[Be+Ee]=ua[255+Le-Oe]}S+=Y}}function Vc(b,S,P,Y,ue,he){Qi(b,S,P,1,16,Y,ue,he)}function Ti(b,S,P,Y,ue,he){Qi(b,S,1,P,16,Y,ue,he)}function Wc(b,S,P,Y,ue,he){var pe;for(pe=3;0<pe;--pe)Li(b,S+=4*P,P,1,16,Y,ue,he)}function R(b,S,P,Y,ue,he){var pe;for(pe=3;0<pe;--pe)Li(b,S+=4,1,P,16,Y,ue,he)}function de(b,S,P,Y,ue,he,pe,we){Qi(b,S,ue,1,8,he,pe,we),Qi(P,Y,ue,1,8,he,pe,we)}function je(b,S,P,Y,ue,he,pe,we){Qi(b,S,1,ue,8,he,pe,we),Qi(P,Y,1,ue,8,he,pe,we)}function Fe(b,S,P,Y,ue,he,pe,we){Li(b,S+4*ue,ue,1,8,he,pe,we),Li(P,Y+4*ue,ue,1,8,he,pe,we)}function Te(b,S,P,Y,ue,he,pe,we){Li(b,S+4,1,ue,8,he,pe,we),Li(P,Y+4,1,ue,8,he,pe,we)}function Je(){this.ba=new zt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new cr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function at(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function yt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ct(){this.ua=0,this.Wa=new Q,this.vb=new Q,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new le,this.yc=new q}function Kt(){this.xb=this.a=0,this.l=new _i,this.ca=new zt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new $,this.Pb=0,this.wd=new $,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ct,this.ab=0,this.gc=d(4,yt),this.Oc=0}function Yt(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new _i,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function dr(b,S,P,Y,ue,he,pe){for(b=b==null?0:b[S+0],S=0;S<pe;++S)ue[he+S]=b+P[Y+S]&255,b=ue[he+S]}function rs(b,S,P,Y,ue,he,pe){var we;if(b==null)dr(null,null,P,Y,ue,he,pe);else for(we=0;we<pe;++we)ue[he+we]=b[S+we]+P[Y+we]&255}function ms(b,S,P,Y,ue,he,pe){if(b==null)dr(null,null,P,Y,ue,he,pe);else{var we,ve=b[S+0],Be=ve,Ee=ve;for(we=0;we<pe;++we)Be=Ee+(ve=b[S+we])-Be,Ee=P[Y+we]+(-256&Be?0>Be?0:255:Be)&255,Be=ve,ue[he+we]=Ee}}function Dr(b,S,P,Y){var ue=S.width,he=S.o;if(t(b!=null&&S!=null),0>P||0>=Y||P+Y>he)return null;if(!b.Cc){if(b.ga==null){var pe;if(b.ga=new Yt,(pe=b.ga==null)||(pe=S.width*S.o,t(b.Gb.length==0),b.Gb=l(pe),b.Uc=0,b.Gb==null?pe=0:(b.mb=b.Gb,b.nb=b.Uc,b.rc=null,pe=1),pe=!pe),!pe){pe=b.ga;var we=b.Fa,ve=b.P,Be=b.qc,Ee=b.mb,Me=b.nb,Ne=ve+1,Le=Be-1,De=pe.l;if(t(we!=null&&Ee!=null&&S!=null),Vi[0]=null,Vi[1]=dr,Vi[2]=rs,Vi[3]=ms,pe.ca=Ee,pe.tb=Me,pe.c=S.width,pe.i=S.height,t(0<pe.c&&0<pe.i),1>=Be)S=0;else if(pe.$a=3&we[ve+0],pe.Z=we[ve+0]>>2&3,pe.Lc=we[ve+0]>>4&3,ve=we[ve+0]>>6&3,0>pe.$a||1<pe.$a||4<=pe.Z||1<pe.Lc||ve)S=0;else if(De.put=Et,De.ac=an,De.bc=Ci,De.ma=pe,De.width=S.width,De.height=S.height,De.Da=S.Da,De.v=S.v,De.va=S.va,De.j=S.j,De.o=S.o,pe.$a)e:{t(pe.$a==1),S=qo();t:for(;;){if(S==null){S=0;break e}if(t(pe!=null),pe.mc=S,S.c=pe.c,S.i=pe.i,S.l=pe.l,S.l.ma=pe,S.l.width=pe.c,S.l.height=pe.i,S.a=0,ye(S.m,we,Ne,Le),!kn(pe.c,pe.i,1,S,null)||(S.ab==1&&S.gc[0].hc==3&&Qr(S.s)?(pe.ic=1,we=S.c*S.i,S.Ta=null,S.Ua=0,S.V=l(we),S.Ba=0,S.V==null?(S.a=1,S=0):S=1):(pe.ic=0,S=Fn(S,pe.c)),!S))break t;S=1;break e}pe.mc=null,S=0}else S=Le>=pe.c*pe.i;pe=!S}if(pe)return null;b.ga.Lc!=1?b.Ga=0:Y=he-P}t(b.ga!=null),t(P+Y<=he);e:{if(S=(we=b.ga).c,he=we.l.o,we.$a==0){if(Ne=b.rc,Le=b.Vc,De=b.Fa,ve=b.P+1+P*S,Be=b.mb,Ee=b.nb+P*S,t(ve<=b.P+b.qc),we.Z!=0)for(t(Vi[we.Z]!=null),pe=0;pe<Y;++pe)Vi[we.Z](Ne,Le,De,ve,Be,Ee,S),Ne=Be,Le=Ee,Ee+=S,ve+=S;else for(pe=0;pe<Y;++pe)n(Be,Ee,De,ve,S),Ne=Be,Le=Ee,Ee+=S,ve+=S;b.rc=Ne,b.Vc=Le}else{if(t(we.mc!=null),S=P+Y,t((pe=we.mc)!=null),t(S<=pe.i),pe.C>=S)S=1;else if(we.ic||Dn(),we.ic){we=pe.V,Ne=pe.Ba,Le=pe.c;var Xe=pe.i,Oe=(De=1,ve=pe.$/Le,Be=pe.$%Le,Ee=pe.m,Me=pe.s,pe.$),We=Le*Xe,Ze=Le*S,ot=Me.wc,st=Oe<Ze?qs(Me,Be,ve):null;t(Oe<=We),t(S<=Xe),t(Qr(Me));t:for(;;){for(;!Ee.h&&Oe<Ze;){if(Be&ot||(st=qs(Me,Be,ve)),t(st!=null),O(Ee),256>(Xe=Jr(st.G[0],st.H[0],Ee)))we[Ne+Oe]=Xe,++Oe,++Be>=Le&&(Be=0,++ve<=S&&!(ve%16)&&ca(pe,ve));else{if(!(280>Xe)){De=0;break t}Xe=qa(Xe-256,Ee);var vt,pt=Jr(st.G[4],st.H[4],Ee);if(O(Ee),!(Oe>=(pt=Ga(Le,pt=qa(pt,Ee)))&&We-Oe>=Xe)){De=0;break t}for(vt=0;vt<Xe;++vt)we[Ne+Oe+vt]=we[Ne+Oe+vt-pt];for(Oe+=Xe,Be+=Xe;Be>=Le;)Be-=Le,++ve<=S&&!(ve%16)&&ca(pe,ve);Oe<Ze&&Be&ot&&(st=qs(Me,Be,ve))}t(Ee.h==te(Ee))}ca(pe,ve>S?S:ve);break t}!De||Ee.h&&Oe<We?(De=0,pe.a=Ee.h?5:3):pe.$=Oe,S=De}else S=Va(pe,pe.V,pe.Ba,pe.c,pe.i,S,uo);if(!S){Y=0;break e}}P+Y>=he&&(b.Cc=1),Y=1}if(!Y)return null;if(b.Cc&&((Y=b.ga)!=null&&(Y.mc=null),b.ga=null,0<b.Ga))return alert("todo:WebPDequantizeLevels"),null}return b.nb+P*ue}function Ts(b,S,P,Y,ue,he){for(;0<ue--;){var pe,we=b,ve=S+(P?1:0),Be=b,Ee=S+(P?0:3);for(pe=0;pe<Y;++pe){var Me=Be[Ee+4*pe];Me!=255&&(Me*=32897,we[ve+4*pe+0]=we[ve+4*pe+0]*Me>>23,we[ve+4*pe+1]=we[ve+4*pe+1]*Me>>23,we[ve+4*pe+2]=we[ve+4*pe+2]*Me>>23)}S+=he}}function Ns(b,S,P,Y,ue){for(;0<Y--;){var he;for(he=0;he<P;++he){var pe=b[S+2*he+0],we=15&(Be=b[S+2*he+1]),ve=4369*we,Be=(240&Be|Be>>4)*ve>>16;b[S+2*he+0]=(240&pe|pe>>4)*ve>>16&240|(15&pe|pe<<4)*ve>>16>>4&15,b[S+2*he+1]=240&Be|we}S+=ue}}function ea(b,S,P,Y,ue,he,pe,we){var ve,Be,Ee=255;for(Be=0;Be<ue;++Be){for(ve=0;ve<Y;++ve){var Me=b[S+ve];he[pe+4*ve]=Me,Ee&=Me}S+=P,pe+=we}return Ee!=255}function Ii(b,S,P,Y,ue){var he;for(he=0;he<ue;++he)P[Y+he]=b[S+he]>>8}function Dn(){rl=Ts,cn=Ns,YA=ea,en=Ii}function Di(b,S,P){T[b]=function(Y,ue,he,pe,we,ve,Be,Ee,Me,Ne,Le,De,Xe,Oe,We,Ze,ot){var st,vt=ot-1>>1,pt=we[ve+0]|Be[Ee+0]<<16,Vt=Me[Ne+0]|Le[De+0]<<16;t(Y!=null);var bt=3*pt+Vt+131074>>2;for(S(Y[ue+0],255&bt,bt>>16,Xe,Oe),he!=null&&(bt=3*Vt+pt+131074>>2,S(he[pe+0],255&bt,bt>>16,We,Ze)),st=1;st<=vt;++st){var sr=we[ve+st]|Be[Ee+st]<<16,Vr=Me[Ne+st]|Le[De+st]<<16,Jt=pt+sr+Vt+Vr+524296,xt=Jt+2*(sr+Vt)>>3;bt=xt+pt>>1,pt=(Jt=Jt+2*(pt+Vr)>>3)+sr>>1,S(Y[ue+2*st-1],255&bt,bt>>16,Xe,Oe+(2*st-1)*P),S(Y[ue+2*st-0],255&pt,pt>>16,Xe,Oe+(2*st-0)*P),he!=null&&(bt=Jt+Vt>>1,pt=xt+Vr>>1,S(he[pe+2*st-1],255&bt,bt>>16,We,Ze+(2*st-1)*P),S(he[pe+2*st+0],255&pt,pt>>16,We,Ze+(2*st+0)*P)),pt=sr,Vt=Vr}1&ot||(bt=3*pt+Vt+131074>>2,S(Y[ue+ot-1],255&bt,bt>>16,Xe,Oe+(ot-1)*P),he!=null&&(bt=3*Vt+pt+131074>>2,S(he[pe+ot-1],255&bt,bt>>16,We,Ze+(ot-1)*P)))}}function GA(){aa[Zc]=nl,aa[ha]=Yl,aa[$c]=vu,aa[dn]=ad,aa[ec]=wo,aa[Vl]=Ai,aa[go]=vo,aa[tc]=Yl,aa[ed]=ad,aa[Wl]=wo,aa[td]=Ai}function Hl(b){return b&-16384?0>b?0:255:b>>nd}function ti(b,S){return Hl((19077*b>>8)+(26149*S>>8)-14234)}function Rn(b,S,P){return Hl((19077*b>>8)-(6419*S>>8)-(13320*P>>8)+8708)}function $o(b,S){return Hl((19077*b>>8)+(33050*S>>8)-17685)}function Ri(b,S,P,Y,ue){Y[ue+0]=ti(b,P),Y[ue+1]=Rn(b,S,P),Y[ue+2]=$o(b,S)}function Vs(b,S,P,Y,ue){Y[ue+0]=$o(b,S),Y[ue+1]=Rn(b,S,P),Y[ue+2]=ti(b,P)}function mo(b,S,P,Y,ue){var he=Rn(b,S,P);S=he<<3&224|$o(b,S)>>3,Y[ue+0]=248&ti(b,P)|he>>5,Y[ue+1]=S}function po(b,S,P,Y,ue){var he=240&$o(b,S)|15;Y[ue+0]=240&ti(b,P)|Rn(b,S,P)>>4,Y[ue+1]=he}function Ml(b,S,P,Y,ue){Y[ue+0]=255,Ri(b,S,P,Y,ue+1)}function ri(b,S,P,Y,ue){Vs(b,S,P,Y,ue),Y[ue+3]=255}function Ba(b,S,P,Y,ue){Ri(b,S,P,Y,ue),Y[ue+3]=255}function Oi(b,S,P){T[b]=function(Y,ue,he,pe,we,ve,Be,Ee,Me){for(var Ne=Ee+(-2&Me)*P;Ee!=Ne;)S(Y[ue+0],he[pe+0],we[ve+0],Be,Ee),S(Y[ue+1],he[pe+0],we[ve+0],Be,Ee+P),ue+=2,++pe,++ve,Ee+=2*P;1&Me&&S(Y[ue+0],he[pe+0],we[ve+0],Be,Ee)}}function Pl(b,S,P){return P==0?b==0?S==0?6:5:S==0?4:0:P}function VA(b,S,P,Y,ue){switch(b>>>30){case 3:qi(S,P,Y,ue,0);break;case 2:da(S,P,Y,ue);break;case 1:wr(S,P,Y,ue)}}function Za(b,S){var P,Y,ue=S.M,he=S.Nb,pe=b.oc,we=b.pc+40,ve=b.oc,Be=b.pc+584,Ee=b.oc,Me=b.pc+600;for(P=0;16>P;++P)pe[we+32*P-1]=129;for(P=0;8>P;++P)ve[Be+32*P-1]=129,Ee[Me+32*P-1]=129;for(0<ue?pe[we-1-32]=ve[Be-1-32]=Ee[Me-1-32]=129:(o(pe,we-32-1,127,21),o(ve,Be-32-1,127,9),o(Ee,Me-32-1,127,9)),Y=0;Y<b.za;++Y){var Ne=S.ya[S.aa+Y];if(0<Y){for(P=-1;16>P;++P)n(pe,we+32*P-4,pe,we+32*P+12,4);for(P=-1;8>P;++P)n(ve,Be+32*P-4,ve,Be+32*P+4,4),n(Ee,Me+32*P-4,Ee,Me+32*P+4,4)}var Le=b.Gd,De=b.Hd+Y,Xe=Ne.ad,Oe=Ne.Hc;if(0<ue&&(n(pe,we-32,Le[De].y,0,16),n(ve,Be-32,Le[De].f,0,8),n(Ee,Me-32,Le[De].ea,0,8)),Ne.Za){var We=pe,Ze=we-32+16;for(0<ue&&(Y>=b.za-1?o(We,Ze,Le[De].y[15],4):n(We,Ze,Le[De+1].y,0,4)),P=0;4>P;P++)We[Ze+128+P]=We[Ze+256+P]=We[Ze+384+P]=We[Ze+0+P];for(P=0;16>P;++P,Oe<<=2)We=pe,Ze=we+gs[P],ls[Ne.Ob[P]](We,Ze),VA(Oe,Xe,16*+P,We,Ze)}else if(We=Pl(Y,ue,Ne.Ob[0]),Ca[We](pe,we),Oe!=0)for(P=0;16>P;++P,Oe<<=2)VA(Oe,Xe,16*+P,pe,we+gs[P]);for(P=Ne.Gc,We=Pl(Y,ue,Ne.Dd),Pn[We](ve,Be),Pn[We](Ee,Me),Oe=Xe,We=ve,Ze=Be,255&(Ne=0|P)&&(170&Ne?An(Oe,256,We,Ze):ur(Oe,256,We,Ze)),Ne=Ee,Oe=Me,255&(P>>=8)&&(170&P?An(Xe,320,Ne,Oe):ur(Xe,320,Ne,Oe)),ue<b.Ub-1&&(n(Le[De].y,0,pe,we+480,16),n(Le[De].f,0,ve,Be+224,8),n(Le[De].ea,0,Ee,Me+224,8)),P=8*he*b.B,Le=b.sa,De=b.ta+16*Y+16*he*b.R,Xe=b.qa,Ne=b.ra+8*Y+P,Oe=b.Ha,We=b.Ia+8*Y+P,P=0;16>P;++P)n(Le,De+P*b.R,pe,we+32*P,16);for(P=0;8>P;++P)n(Xe,Ne+P*b.B,ve,Be+32*P,8),n(Oe,We+P*b.B,Ee,Me+32*P,8)}}function On(b,S,P,Y,ue,he,pe,we,ve){var Be=[0],Ee=[0],Me=0,Ne=ve!=null?ve.kd:0,Le=ve??new at;if(b==null||12>P)return 7;Le.data=b,Le.w=S,Le.ha=P,S=[S],P=[P],Le.gb=[Le.gb];e:{var De=S,Xe=P,Oe=Le.gb;if(t(b!=null),t(Xe!=null),t(Oe!=null),Oe[0]=0,12<=Xe[0]&&!s(b,De[0],"RIFF")){if(s(b,De[0]+8,"WEBP")){Oe=3;break e}var We=z(b,De[0]+4);if(12>We||4294967286<We){Oe=3;break e}if(Ne&&We>Xe[0]-8){Oe=7;break e}Oe[0]=We,De[0]+=12,Xe[0]-=12}Oe=0}if(Oe!=0)return Oe;for(We=0<Le.gb[0],P=P[0];;){e:{var Ze=b;Xe=S,Oe=P;var ot=Be,st=Ee,vt=De=[0];if((bt=Me=[Me])[0]=0,8>Oe[0])Oe=7;else{if(!s(Ze,Xe[0],"VP8X")){if(z(Ze,Xe[0]+4)!=10){Oe=3;break e}if(18>Oe[0]){Oe=7;break e}var pt=z(Ze,Xe[0]+8),Vt=1+Se(Ze,Xe[0]+12);if(2147483648<=Vt*(Ze=1+Se(Ze,Xe[0]+15))){Oe=3;break e}vt!=null&&(vt[0]=pt),ot!=null&&(ot[0]=Vt),st!=null&&(st[0]=Ze),Xe[0]+=18,Oe[0]-=18,bt[0]=1}Oe=0}}if(Me=Me[0],De=De[0],Oe!=0)return Oe;if(Xe=!!(2&De),!We&&Me)return 3;if(he!=null&&(he[0]=!!(16&De)),pe!=null&&(pe[0]=Xe),we!=null&&(we[0]=0),pe=Be[0],De=Ee[0],Me&&Xe&&ve==null){Oe=0;break}if(4>P){Oe=7;break}if(We&&Me||!We&&!Me&&!s(b,S[0],"ALPH")){P=[P],Le.na=[Le.na],Le.P=[Le.P],Le.Sa=[Le.Sa];e:{pt=b,Oe=S,We=P;var bt=Le.gb;ot=Le.na,st=Le.P,vt=Le.Sa,Vt=22,t(pt!=null),t(We!=null),Ze=Oe[0];var sr=We[0];for(t(ot!=null),t(vt!=null),ot[0]=null,st[0]=null,vt[0]=0;;){if(Oe[0]=Ze,We[0]=sr,8>sr){Oe=7;break e}var Vr=z(pt,Ze+4);if(4294967286<Vr){Oe=3;break e}var Jt=8+Vr+1&-2;if(Vt+=Jt,0<bt&&Vt>bt){Oe=3;break e}if(!s(pt,Ze,"VP8 ")||!s(pt,Ze,"VP8L")){Oe=0;break e}if(sr[0]<Jt){Oe=7;break e}s(pt,Ze,"ALPH")||(ot[0]=pt,st[0]=Ze+8,vt[0]=Vr),Ze+=Jt,sr-=Jt}}if(P=P[0],Le.na=Le.na[0],Le.P=Le.P[0],Le.Sa=Le.Sa[0],Oe!=0)break}P=[P],Le.Ja=[Le.Ja],Le.xa=[Le.xa];e:if(bt=b,Oe=S,We=P,ot=Le.gb[0],st=Le.Ja,vt=Le.xa,pt=Oe[0],Ze=!s(bt,pt,"VP8 "),Vt=!s(bt,pt,"VP8L"),t(bt!=null),t(We!=null),t(st!=null),t(vt!=null),8>We[0])Oe=7;else{if(Ze||Vt){if(bt=z(bt,pt+4),12<=ot&&bt>ot-12){Oe=3;break e}if(Ne&&bt>We[0]-8){Oe=7;break e}st[0]=bt,Oe[0]+=8,We[0]-=8,vt[0]=Vt}else vt[0]=5<=We[0]&&bt[pt+0]==47&&!(bt[pt+4]>>5),st[0]=We[0];Oe=0}if(P=P[0],Le.Ja=Le.Ja[0],Le.xa=Le.xa[0],S=S[0],Oe!=0)break;if(4294967286<Le.Ja)return 3;if(we==null||Xe||(we[0]=Le.xa?2:1),pe=[pe],De=[De],Le.xa){if(5>P){Oe=7;break}we=pe,Ne=De,Xe=he,b==null||5>P?b=0:5<=P&&b[S+0]==47&&!(b[S+4]>>5)?(We=[0],bt=[0],ot=[0],ye(st=new $,b,S,P),Yn(st,We,bt,ot)?(we!=null&&(we[0]=We[0]),Ne!=null&&(Ne[0]=bt[0]),Xe!=null&&(Xe[0]=ot[0]),b=1):b=0):b=0}else{if(10>P){Oe=7;break}we=De,b==null||10>P||!IA(b,S+3,P-3)?b=0:(Ne=b[S+0]|b[S+1]<<8|b[S+2]<<16,Xe=16383&(b[S+7]<<8|b[S+6]),b=16383&(b[S+9]<<8|b[S+8]),1&Ne||3<(Ne>>1&7)||!(Ne>>4&1)||Ne>>5>=Le.Ja||!Xe||!b?b=0:(pe&&(pe[0]=Xe),we&&(we[0]=b),b=1))}if(!b||(pe=pe[0],De=De[0],Me&&(Be[0]!=pe||Ee[0]!=De)))return 3;ve!=null&&(ve[0]=Le,ve.offset=S-ve.w,t(4294967286>S-ve.w),t(ve.offset==ve.ha-P));break}return Oe==0||Oe==7&&Me&&ve==null?(he!=null&&(he[0]|=Le.na!=null&&0<Le.na.length),Y!=null&&(Y[0]=pe),ue!=null&&(ue[0]=De),0):Oe}function Hi(b,S,P){var Y=S.width,ue=S.height,he=0,pe=0,we=Y,ve=ue;if(S.Da=b!=null&&0<b.Da,S.Da&&(we=b.cd,ve=b.bd,he=b.v,pe=b.j,11>P||(he&=-2,pe&=-2),0>he||0>pe||0>=we||0>=ve||he+we>Y||pe+ve>ue))return 0;if(S.v=he,S.j=pe,S.va=he+we,S.o=pe+ve,S.U=we,S.T=ve,S.da=b!=null&&0<b.da,S.da){if(!I(we,ve,P=[b.ib],he=[b.hb]))return 0;S.ib=P[0],S.hb=he[0]}return S.ob=b!=null&&b.ob,S.Kb=b==null||!b.Sd,S.da&&(S.ob=S.ib<3*Y/4&&S.hb<3*ue/4,S.Kb=0),1}function WA(b){if(b==null)return 2;if(11>b.S){var S=b.f.RGBA;S.fb+=(b.height-1)*S.A,S.A=-S.A}else S=b.f.kb,b=b.height,S.O+=(b-1)*S.fa,S.fa=-S.fa,S.N+=(b-1>>1)*S.Ab,S.Ab=-S.Ab,S.W+=(b-1>>1)*S.Db,S.Db=-S.Db,S.F!=null&&(S.J+=(b-1)*S.lb,S.lb=-S.lb);return 0}function Hn(b,S,P,Y){if(Y==null||0>=b||0>=S)return 2;if(P!=null){if(P.Da){var ue=P.cd,he=P.bd,pe=-2&P.v,we=-2&P.j;if(0>pe||0>we||0>=ue||0>=he||pe+ue>b||we+he>S)return 2;b=ue,S=he}if(P.da){if(!I(b,S,ue=[P.ib],he=[P.hb]))return 2;b=ue[0],S=he[0]}}Y.width=b,Y.height=S;e:{var ve=Y.width,Be=Y.height;if(b=Y.S,0>=ve||0>=Be||!(b>=Zc&&13>b))b=2;else{if(0>=Y.Rd&&Y.sd==null){pe=he=ue=S=0;var Ee=(we=ve*od[b])*Be;if(11>b||(he=(Be+1)/2*(S=(ve+1)/2),b==12&&(pe=(ue=ve)*Be)),(Be=l(Ee+2*he+pe))==null){b=1;break e}Y.sd=Be,11>b?((ve=Y.f.RGBA).eb=Be,ve.fb=0,ve.A=we,ve.size=Ee):((ve=Y.f.kb).y=Be,ve.O=0,ve.fa=we,ve.Fd=Ee,ve.f=Be,ve.N=0+Ee,ve.Ab=S,ve.Cd=he,ve.ea=Be,ve.W=0+Ee+he,ve.Db=S,ve.Ed=he,b==12&&(ve.F=Be,ve.J=0+Ee+2*he),ve.Tc=pe,ve.lb=ue)}if(S=1,ue=Y.S,he=Y.width,pe=Y.height,ue>=Zc&&13>ue)if(11>ue)b=Y.f.RGBA,S&=(we=Math.abs(b.A))*(pe-1)+he<=b.size,S&=we>=he*od[ue],S&=b.eb!=null;else{b=Y.f.kb,we=(he+1)/2,Ee=(pe+1)/2,ve=Math.abs(b.fa),Be=Math.abs(b.Ab);var Me=Math.abs(b.Db),Ne=Math.abs(b.lb),Le=Ne*(pe-1)+he;S&=ve*(pe-1)+he<=b.Fd,S&=Be*(Ee-1)+we<=b.Cd,S=(S&=Me*(Ee-1)+we<=b.Ed)&ve>=he&Be>=we&Me>=we,S&=b.y!=null,S&=b.f!=null,S&=b.ea!=null,ue==12&&(S&=Ne>=he,S&=Le<=b.Tc,S&=b.F!=null)}else S=0;b=S?0:2}}return b!=0||P!=null&&P.fd&&(b=WA(Y)),b}var xo=64,Ta=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],ja=24,si=32,ai=8,Mi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];me("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(b){return b},T.Predictor2=function(b,S,P){return S[P+0]},T.Predictor3=function(b,S,P){return S[P+1]},T.Predictor4=function(b,S,P){return S[P-1]},T.Predictor5=function(b,S,P){return Ue(Ue(b,S[P+1]),S[P+0])},T.Predictor6=function(b,S,P){return Ue(b,S[P-1])},T.Predictor7=function(b,S,P){return Ue(b,S[P+0])},T.Predictor8=function(b,S,P){return Ue(S[P-1],S[P+0])},T.Predictor9=function(b,S,P){return Ue(S[P+0],S[P+1])},T.Predictor10=function(b,S,P){return Ue(Ue(b,S[P-1]),Ue(S[P+0],S[P+1]))},T.Predictor11=function(b,S,P){var Y=S[P+0];return 0>=Ve(Y>>24&255,b>>24&255,(S=S[P-1])>>24&255)+Ve(Y>>16&255,b>>16&255,S>>16&255)+Ve(Y>>8&255,b>>8&255,S>>8&255)+Ve(255&Y,255&b,255&S)?Y:b},T.Predictor12=function(b,S,P){var Y=S[P+0];return(Re((b>>24&255)+(Y>>24&255)-((S=S[P-1])>>24&255))<<24|Re((b>>16&255)+(Y>>16&255)-(S>>16&255))<<16|Re((b>>8&255)+(Y>>8&255)-(S>>8&255))<<8|Re((255&b)+(255&Y)-(255&S)))>>>0},T.Predictor13=function(b,S,P){var Y=S[P-1];return(He((b=Ue(b,S[P+0]))>>24&255,Y>>24&255)<<24|He(b>>16&255,Y>>16&255)<<16|He(b>>8&255,Y>>8&255)<<8|He(255&b,255&Y))>>>0};var Kl=T.PredictorAdd0;T.PredictorAdd1=it,me("Predictor2","PredictorAdd2"),me("Predictor3","PredictorAdd3"),me("Predictor4","PredictorAdd4"),me("Predictor5","PredictorAdd5"),me("Predictor6","PredictorAdd6"),me("Predictor7","PredictorAdd7"),me("Predictor8","PredictorAdd8"),me("Predictor9","PredictorAdd9"),me("Predictor10","PredictorAdd10"),me("Predictor11","PredictorAdd11"),me("Predictor12","PredictorAdd12"),me("Predictor13","PredictorAdd13");var zl=T.PredictorAdd2;mt("ColorIndexInverseTransform","MapARGB","32b",function(b){return b>>8&255},function(b){return b}),mt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(b){return b},function(b){return b>>8&255});var ps,Xc=T.ColorIndexInverseTransform,ni=T.MapARGB,ii=T.VP8LColorIndexInverseTransformAlpha,ta=T.MapAlpha,Pi=T.VP8LPredictorsAdd=[];Pi.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var ql,Gl,Ki,zi,oi,el,$a,qi,da,An,wr,ur,Rr,xs,li,Mn,tl,XA,xu,Jh,Zh,$h,gu,bu,rl,cn,YA,en,sl=l(511),Yc=l(2041),JA=l(225),ZA=l(767),Jc=0,Gi=Yc,$A=JA,ua=ZA,ra=sl,Zc=0,ha=1,$c=2,dn=3,ec=4,Vl=5,go=6,tc=7,ed=8,Wl=9,td=10,un=[2,3,7],Xl=[3,3,11],al=[280,256,256,256,40],rd=[0,1,1,1,0],rc=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],hn=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],fn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],bo=8,mn=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],pn=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],tn=null,ef=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],yu=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],sd=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],tf=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],sa=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Gr=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ar=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ca=[],ls=[],Pn=[],yo=1,wu=2,Vi=[],aa=[];Di("UpsampleRgbLinePair",Ri,3),Di("UpsampleBgrLinePair",Vs,3),Di("UpsampleRgbaLinePair",Ba,4),Di("UpsampleBgraLinePair",ri,4),Di("UpsampleArgbLinePair",Ml,4),Di("UpsampleRgba4444LinePair",po,2),Di("UpsampleRgb565LinePair",mo,2);var nl=T.UpsampleRgbLinePair,vu=T.UpsampleBgrLinePair,Yl=T.UpsampleRgbaLinePair,ad=T.UpsampleBgraLinePair,wo=T.UpsampleArgbLinePair,Ai=T.UpsampleRgba4444LinePair,vo=T.UpsampleRgb565LinePair,xn=16,Jl=1<<xn-1,il=-227,No=482,nd=6,Bo=0,na=l(256),id=l(256),rf=l(256),Dp=l(256),Rp=l(No-il),Op=l(No-il);Oi("YuvToRgbRow",Ri,3),Oi("YuvToBgrRow",Vs,3),Oi("YuvToRgbaRow",Ba,4),Oi("YuvToBgraRow",ri,4),Oi("YuvToArgbRow",Ml,4),Oi("YuvToRgba4444Row",po,2),Oi("YuvToRgb565Row",mo,2);var gs=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Zl=[0,2,8],sc=[8,7,6,4,4,2,2,2,1,1,1,1],ac=1;this.WebPDecodeRGBA=function(b,S,P,Y,ue){var he=ha,pe=new Je,we=new zt;pe.ba=we,we.S=he,we.width=[we.width],we.height=[we.height];var ve=we.width,Be=we.height,Ee=new Bt;if(Ee==null||b==null)var Me=2;else t(Ee!=null),Me=On(b,S,P,Ee.width,Ee.height,Ee.Pd,Ee.Qd,Ee.format,null);if(Me!=0?ve=0:(ve!=null&&(ve[0]=Ee.width[0]),Be!=null&&(Be[0]=Ee.height[0]),ve=1),ve){we.width=we.width[0],we.height=we.height[0],Y!=null&&(Y[0]=we.width),ue!=null&&(ue[0]=we.height);e:{if(Y=new _i,(ue=new at).data=b,ue.w=S,ue.ha=P,ue.kd=1,S=[0],t(ue!=null),((b=On(ue.data,ue.w,ue.ha,null,null,null,S,null,ue))==0||b==7)&&S[0]&&(b=4),(S=b)==0){if(t(pe!=null),Y.data=ue.data,Y.w=ue.w+ue.offset,Y.ha=ue.ha-ue.offset,Y.put=Et,Y.ac=an,Y.bc=Ci,Y.ma=pe,ue.xa){if((b=qo())==null){pe=1;break e}if((function(Ne,Le){var De=[0],Xe=[0],Oe=[0];t:for(;;){if(Ne==null)return 0;if(Le==null)return Ne.a=2,0;if(Ne.l=Le,Ne.a=0,ye(Ne.m,Le.data,Le.w,Le.ha),!Yn(Ne.m,De,Xe,Oe)){Ne.a=3;break t}if(Ne.xb=wu,Le.width=De[0],Le.height=Xe[0],!kn(De[0],Xe[0],1,Ne,null))break t;return 1}return t(Ne.a!=0),0})(b,Y)){if(Y=(S=Hn(Y.width,Y.height,pe.Oa,pe.ba))==0){t:{Y=b;r:for(;;){if(Y==null){Y=0;break t}if(t(Y.s.yc!=null),t(Y.s.Ya!=null),t(0<Y.s.Wb),t((P=Y.l)!=null),t((ue=P.ma)!=null),Y.xb!=0){if(Y.ca=ue.ba,Y.tb=ue.tb,t(Y.ca!=null),!Hi(ue.Oa,P,dn)){Y.a=2;break r}if(!Fn(Y,P.width)||P.da)break r;if((P.da||It(Y.ca.S))&&Dn(),11>Y.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),Y.ca.f.kb.F!=null&&Dn()),Y.Pb&&0<Y.s.ua&&Y.s.vb.X==null&&!ie(Y.s.vb,Y.s.Wa.Xa)){Y.a=1;break r}Y.xb=0}if(!Va(Y,Y.V,Y.Ba,Y.c,Y.i,P.o,wa))break r;ue.Dc=Y.Ma,Y=1;break t}t(Y.a!=0),Y=0}Y=!Y}Y&&(S=b.a)}else S=b.a}else{if((b=new Ln)==null){pe=1;break e}if(b.Fa=ue.na,b.P=ue.P,b.qc=ue.Sa,Zn(b,Y)){if((S=Hn(Y.width,Y.height,pe.Oa,pe.ba))==0){if(b.Aa=0,P=pe.Oa,t((ue=b)!=null),P!=null){if(0<(ve=0>(ve=P.Md)?0:100<ve?255:255*ve/100)){for(Be=Ee=0;4>Be;++Be)12>(Me=ue.pb[Be]).lc&&(Me.ia=ve*sc[0>Me.lc?0:Me.lc]>>3),Ee|=Me.ia;Ee&&(alert("todo:VP8InitRandom"),ue.ia=1)}ue.Ga=P.Id,100<ue.Ga?ue.Ga=100:0>ue.Ga&&(ue.Ga=0)}(function(Ne,Le){if(Ne==null)return 0;if(Le==null)return yr(Ne,2,"NULL VP8Io parameter in VP8Decode().");if(!Ne.cb&&!Zn(Ne,Le))return 0;if(t(Ne.cb),Le.ac==null||Le.ac(Le)){Le.ob&&(Ne.L=0);var De=Zl[Ne.L];if(Ne.L==2?(Ne.yb=0,Ne.zb=0):(Ne.yb=Le.v-De>>4,Ne.zb=Le.j-De>>4,0>Ne.yb&&(Ne.yb=0),0>Ne.zb&&(Ne.zb=0)),Ne.Va=Le.o+15+De>>4,Ne.Hb=Le.va+15+De>>4,Ne.Hb>Ne.za&&(Ne.Hb=Ne.za),Ne.Va>Ne.Ub&&(Ne.Va=Ne.Ub),0<Ne.L){var Xe=Ne.ed;for(De=0;4>De;++De){var Oe;if(Ne.Qa.Cb){var We=Ne.Qa.Lb[De];Ne.Qa.Fb||(We+=Xe.Tb)}else We=Xe.Tb;for(Oe=0;1>=Oe;++Oe){var Ze=Ne.gd[De][Oe],ot=We;if(Xe.Pc&&(ot+=Xe.vd[0],Oe&&(ot+=Xe.od[0])),0<(ot=0>ot?0:63<ot?63:ot)){var st=ot;0<Xe.wb&&(st=4<Xe.wb?st>>2:st>>1)>9-Xe.wb&&(st=9-Xe.wb),1>st&&(st=1),Ze.dd=st,Ze.tc=2*ot+st,Ze.ld=40<=ot?2:15<=ot?1:0}else Ze.tc=0;Ze.La=Oe}}}De=0}else yr(Ne,6,"Frame setup failed"),De=Ne.a;if(De=De==0){if(De){Ne.$c=0,0<Ne.Aa||(Ne.Ic=ac);t:{De=Ne.Ic,Xe=4*(st=Ne.za);var vt=32*st,pt=st+1,Vt=0<Ne.L?st*(0<Ne.Aa?2:1):0,bt=(Ne.Aa==2?2:1)*st;if((Ze=Xe+832+(Oe=3*(16*De+Zl[Ne.L])/2*vt)+(We=Ne.Fa!=null&&0<Ne.Fa.length?Ne.Kc.c*Ne.Kc.i:0))!=Ze)De=0;else{if(Ze>Ne.Vb){if(Ne.Vb=0,Ne.Ec=l(Ze),Ne.Fc=0,Ne.Ec==null){De=yr(Ne,1,"no memory during frame initialization.");break t}Ne.Vb=Ze}Ze=Ne.Ec,ot=Ne.Fc,Ne.Ac=Ze,Ne.Bc=ot,ot+=Xe,Ne.Gd=d(vt,TA),Ne.Hd=0,Ne.rb=d(pt+1,Qn),Ne.sb=1,Ne.wa=Vt?d(Vt,Wa):null,Ne.Y=0,Ne.D.Nb=0,Ne.D.wa=Ne.wa,Ne.D.Y=Ne.Y,0<Ne.Aa&&(Ne.D.Y+=st),t(!0),Ne.oc=Ze,Ne.pc=ot,ot+=832,Ne.ya=d(bt,QA),Ne.aa=0,Ne.D.ya=Ne.ya,Ne.D.aa=Ne.aa,Ne.Aa==2&&(Ne.D.aa+=st),Ne.R=16*st,Ne.B=8*st,st=(vt=Zl[Ne.L])*Ne.R,vt=vt/2*Ne.B,Ne.sa=Ze,Ne.ta=ot+st,Ne.qa=Ne.sa,Ne.ra=Ne.ta+16*De*Ne.R+vt,Ne.Ha=Ne.qa,Ne.Ia=Ne.ra+8*De*Ne.B+vt,Ne.$c=0,ot+=Oe,Ne.mb=We?Ze:null,Ne.nb=We?ot:null,t(ot+We<=Ne.Fc+Ne.Vb),DA(Ne),o(Ne.Ac,Ne.Bc,0,Xe),De=1}}if(De){if(Le.ka=0,Le.y=Ne.sa,Le.O=Ne.ta,Le.f=Ne.qa,Le.N=Ne.ra,Le.ea=Ne.Ha,Le.Vd=Ne.Ia,Le.fa=Ne.R,Le.Rc=Ne.B,Le.F=null,Le.J=0,!Jc){for(De=-255;255>=De;++De)sl[255+De]=0>De?-De:De;for(De=-1020;1020>=De;++De)Yc[1020+De]=-128>De?-128:127<De?127:De;for(De=-112;112>=De;++De)JA[112+De]=-16>De?-16:15<De?15:De;for(De=-255;510>=De;++De)ZA[255+De]=0>De?0:255<De?255:De;Jc=1}$a=Tn,qi=RA,An=Na,wr=OA,ur=HA,da=Hc,Rr=Vc,xs=Ti,li=de,Mn=je,tl=Wc,XA=R,xu=Fe,Jh=Te,Zh=Ei,$h=Ui,gu=Zo,bu=qA,ls[0]=qc,ls[1]=Mc,ls[2]=zc,ls[3]=KA,ls[4]=Ya,ls[5]=zA,ls[6]=$s,ls[7]=Xo,ls[8]=Yo,ls[9]=Ja,Ca[0]=In,Ca[1]=MA,Ca[2]=PA,Ca[3]=Kc,Ca[4]=ki,Ca[5]=Wo,Ca[6]=fo,Pn[0]=Dl,Pn[1]=Pc,Pn[2]=$n,Pn[3]=Gc,Pn[4]=Gs,Pn[5]=Rl,Pn[6]=ei,De=1}else De=0}De&&(De=(function(sr,Vr){for(sr.M=0;sr.M<sr.Va;++sr.M){var Jt,xt=sr.Jc[sr.M&sr.Xb],At=sr.m,ss=sr;for(Jt=0;Jt<ss.za;++Jt){var Ot=At,$t=ss,Sr=$t.Ac,Is=$t.Bc+4*Jt,ia=$t.zc,Or=$t.ya[$t.aa+Jt];if($t.Qa.Bb?Or.$b=Ae(Ot,$t.Pa.jb[0])?2+Ae(Ot,$t.Pa.jb[2]):Ae(Ot,$t.Pa.jb[1]):Or.$b=0,$t.kc&&(Or.Ad=Ae(Ot,$t.Bd)),Or.Za=!Ae(Ot,145)+0,Or.Za){var Bs=Or.Ob,fa=0;for($t=0;4>$t;++$t){var js,tr=ia[0+$t];for(js=0;4>js;++js){tr=sa[Sr[Is+js]][tr];for(var mr=sd[Ae(Ot,tr[0])];0<mr;)mr=sd[2*mr+Ae(Ot,tr[mr])];tr=-mr,Sr[Is+js]=tr}n(Bs,fa,Sr,Is,4),fa+=4,ia[0+$t]=tr}}else tr=Ae(Ot,156)?Ae(Ot,128)?1:3:Ae(Ot,163)?2:0,Or.Ob[0]=tr,o(Sr,Is,tr,4),o(ia,0,tr,4);Or.Dd=Ae(Ot,142)?Ae(Ot,114)?Ae(Ot,183)?1:3:2:0}if(ss.m.Ka)return yr(sr,7,"Premature end-of-partition0 encountered.");for(;sr.ja<sr.za;++sr.ja){if(ss=xt,Ot=(At=sr).rb[At.sb-1],Sr=At.rb[At.sb+At.ja],Jt=At.ya[At.aa+At.ja],Is=At.kc?Jt.Ad:0)Ot.la=Sr.la=0,Jt.Za||(Ot.Na=Sr.Na=0),Jt.Hc=0,Jt.Gc=0,Jt.ia=0;else{var as,vr;if(Ot=Sr,Sr=ss,Is=At.Pa.Xc,ia=At.ya[At.aa+At.ja],Or=At.pb[ia.$b],$t=ia.ad,Bs=0,fa=At.rb[At.sb-1],tr=js=0,o($t,Bs,0,384),ia.Za)var Ds=0,ns=Is[3];else{mr=l(16);var pr=Ot.Na+fa.Na;if(pr=tn(Sr,Is[1],pr,Or.Eb,0,mr,0),Ot.Na=fa.Na=(0<pr)+0,1<pr)$a(mr,0,$t,Bs);else{var bs=mr[0]+3>>3;for(mr=0;256>mr;mr+=16)$t[Bs+mr]=bs}Ds=1,ns=Is[0]}var _r=15&Ot.la,Cs=15&fa.la;for(mr=0;4>mr;++mr){var Ss=1&Cs;for(bs=vr=0;4>bs;++bs)_r=_r>>1|(Ss=(pr=tn(Sr,ns,pr=Ss+(1&_r),Or.Sc,Ds,$t,Bs))>Ds)<<7,vr=vr<<2|(3<pr?3:1<pr?2:$t[Bs+0]!=0),Bs+=16;_r>>=4,Cs=Cs>>1|Ss<<7,js=(js<<8|vr)>>>0}for(ns=_r,Ds=Cs>>4,as=0;4>as;as+=2){for(vr=0,_r=Ot.la>>4+as,Cs=fa.la>>4+as,mr=0;2>mr;++mr){for(Ss=1&Cs,bs=0;2>bs;++bs)pr=Ss+(1&_r),_r=_r>>1|(Ss=0<(pr=tn(Sr,Is[2],pr,Or.Qc,0,$t,Bs)))<<3,vr=vr<<2|(3<pr?3:1<pr?2:$t[Bs+0]!=0),Bs+=16;_r>>=2,Cs=Cs>>1|Ss<<5}tr|=vr<<4*as,ns|=_r<<4<<as,Ds|=(240&Cs)<<as}Ot.la=ns,fa.la=Ds,ia.Hc=js,ia.Gc=tr,ia.ia=43690&tr?0:Or.ia,Is=!(js|tr)}if(0<At.L&&(At.wa[At.Y+At.ja]=At.gd[Jt.$b][Jt.Za],At.wa[At.Y+At.ja].La|=!Is),ss.Ka)return yr(sr,7,"Premature end-of-file encountered.")}if(DA(sr),At=Vr,ss=1,Jt=(xt=sr).D,Ot=0<xt.L&&xt.M>=xt.zb&&xt.M<=xt.Va,xt.Aa==0)t:{if(Jt.M=xt.M,Jt.uc=Ot,Za(xt,Jt),ss=1,Jt=(vr=xt.D).Nb,Ot=(tr=Zl[xt.L])*xt.R,Sr=tr/2*xt.B,mr=16*Jt*xt.R,bs=8*Jt*xt.B,Is=xt.sa,ia=xt.ta-Ot+mr,Or=xt.qa,$t=xt.ra-Sr+bs,Bs=xt.Ha,fa=xt.Ia-Sr+bs,Cs=(_r=vr.M)==0,js=_r>=xt.Va-1,xt.Aa==2&&Za(xt,vr),vr.uc)for(Ss=(pr=xt).D.M,t(pr.D.uc),vr=pr.yb;vr<pr.Hb;++vr){Ds=vr,ns=Ss;var Lr=(hr=(_s=pr).D).Nb;as=_s.R;var hr=hr.wa[hr.Y+Ds],ma=_s.sa,As=_s.ta+16*Lr*as+16*Ds,Ut=hr.dd,Qt=hr.tc;if(Qt!=0)if(t(3<=Qt),_s.L==1)0<Ds&&$h(ma,As,as,Qt+4),hr.La&&bu(ma,As,as,Qt),0<ns&&Zh(ma,As,as,Qt+4),hr.La&&gu(ma,As,as,Qt);else{var xr=_s.B,Ia=_s.qa,gn=_s.ra+8*Lr*xr+8*Ds,Sa=_s.Ha,_s=_s.Ia+8*Lr*xr+8*Ds;Lr=hr.ld,0<Ds&&(xs(ma,As,as,Qt+4,Ut,Lr),Mn(Ia,gn,Sa,_s,xr,Qt+4,Ut,Lr)),hr.La&&(XA(ma,As,as,Qt,Ut,Lr),Jh(Ia,gn,Sa,_s,xr,Qt,Ut,Lr)),0<ns&&(Rr(ma,As,as,Qt+4,Ut,Lr),li(Ia,gn,Sa,_s,xr,Qt+4,Ut,Lr)),hr.La&&(tl(ma,As,as,Qt,Ut,Lr),xu(Ia,gn,Sa,_s,xr,Qt,Ut,Lr))}}if(xt.ia&&alert("todo:DitherRow"),At.put!=null){if(vr=16*_r,_r=16*(_r+1),Cs?(At.y=xt.sa,At.O=xt.ta+mr,At.f=xt.qa,At.N=xt.ra+bs,At.ea=xt.Ha,At.W=xt.Ia+bs):(vr-=tr,At.y=Is,At.O=ia,At.f=Or,At.N=$t,At.ea=Bs,At.W=fa),js||(_r-=tr),_r>At.o&&(_r=At.o),At.F=null,At.J=null,xt.Fa!=null&&0<xt.Fa.length&&vr<_r&&(At.J=Dr(xt,At,vr,_r-vr),At.F=xt.mb,At.F==null&&At.F.length==0)){ss=yr(xt,3,"Could not decode alpha data.");break t}vr<At.j&&(tr=At.j-vr,vr=At.j,t(!(1&tr)),At.O+=xt.R*tr,At.N+=xt.B*(tr>>1),At.W+=xt.B*(tr>>1),At.F!=null&&(At.J+=At.width*tr)),vr<_r&&(At.O+=At.v,At.N+=At.v>>1,At.W+=At.v>>1,At.F!=null&&(At.J+=At.v),At.ka=vr-At.j,At.U=At.va-At.v,At.T=_r-vr,ss=At.put(At))}Jt+1!=xt.Ic||js||(n(xt.sa,xt.ta-Ot,Is,ia+16*xt.R,Ot),n(xt.qa,xt.ra-Sr,Or,$t+8*xt.B,Sr),n(xt.Ha,xt.Ia-Sr,Bs,fa+8*xt.B,Sr))}if(!ss)return yr(sr,6,"Output aborted.")}return 1})(Ne,Le)),Le.bc!=null&&Le.bc(Le),De&=1}return De?(Ne.cb=0,De):0})(b,Y)||(S=b.a)}}else S=b.a}S==0&&pe.Oa!=null&&pe.Oa.fd&&(S=WA(pe.ba))}pe=S}he=pe!=0?null:11>he?we.f.RGBA.eb:we.f.kb.y}else he=null;return he};var od=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(T,ne){for(var Z="",U=0;U<4;U++)Z+=String.fromCharCode(T[ne++]);return Z}function m(T,ne){return T[ne+0]|T[ne+1]<<8}function x(T,ne){return(T[ne+0]|T[ne+1]<<8|T[ne+2]<<16)>>>0}function y(T,ne){return(T[ne+0]|T[ne+1]<<8|T[ne+2]<<16|T[ne+3]<<24)>>>0}new u;var p=[0],v=[0],N=[],B=new u,g=r,j=(function(T,ne){var Z={},U=0,q=!1,F=0,le=0;if(Z.frames=[],!(function(D,$){for(var X=0;X<4;X++)if(D[$+X]!="RIFF".charCodeAt(X))return!0;return!1})(T,ne)){for(y(T,ne+=4),ne+=8;ne<T.length;){var ae=h(T,ne),se=y(T,ne+=4);ne+=4;var fe=se+(1&se);switch(ae){case"VP8 ":case"VP8L":Z.frames[U]===void 0&&(Z.frames[U]={}),(xe=Z.frames[U]).src_off=q?le:ne-8,xe.src_size=F+se+8,U++,q&&(q=!1,F=0,le=0);break;case"VP8X":(xe=Z.header={}).feature_flags=T[ne];var ye=ne+4;xe.canvas_width=1+x(T,ye),ye+=3,xe.canvas_height=1+x(T,ye),ye+=3;break;case"ALPH":q=!0,F=fe+8,le=ne-8;break;case"ANIM":(xe=Z.header).bgcolor=y(T,ne),ye=ne+4,xe.loop_count=m(T,ye),ye+=2;break;case"ANMF":var _e,xe;(xe=Z.frames[U]={}).offset_x=2*x(T,ne),ne+=3,xe.offset_y=2*x(T,ne),ne+=3,xe.width=1+x(T,ne),ne+=3,xe.height=1+x(T,ne),ne+=3,xe.duration=x(T,ne),ne+=3,_e=T[ne++],xe.dispose=1&_e,xe.blend=_e>>1&1}ae!="ANMF"&&(ne+=fe)}return Z}})(g,0);j.response=g,j.rgbaoutput=!0,j.dataurl=!1;var _=j.header?j.header:null,w=j.frames?j.frames:null;if(_){_.loop_counter=_.loop_count,p=[_.canvas_height],v=[_.canvas_width];for(var L=0;L<w.length&&w[L].blend!=0;L++);}var K=w[0],M=B.WebPDecodeRGBA(g,K.src_off,K.src_size,v,p);K.rgba=M,K.imgwidth=v[0],K.imgheight=p[0];for(var V=0;V<v[0]*p[0]*4;V++)N[V]=M[V];return this.width=v,this.height=p,this.data=N,this}(function(r){var t,s,n,o,l,d,c,u,h,m=function(D){return D=D||{},this.isStrokeTransparent=D.isStrokeTransparent||!1,this.strokeOpacity=D.strokeOpacity||1,this.strokeStyle=D.strokeStyle||"#000000",this.fillStyle=D.fillStyle||"#000000",this.isFillTransparent=D.isFillTransparent||!1,this.fillOpacity=D.fillOpacity||1,this.font=D.font||"10px sans-serif",this.textBaseline=D.textBaseline||"alphabetic",this.textAlign=D.textAlign||"left",this.lineWidth=D.lineWidth||1,this.lineJoin=D.lineJoin||"miter",this.lineCap=D.lineCap||"butt",this.path=D.path||[],this.transform=D.transform!==void 0?D.transform.clone():new u,this.globalCompositeOperation=D.globalCompositeOperation||"normal",this.globalAlpha=D.globalAlpha||1,this.clip_path=D.clip_path||[],this.currentPoint=D.currentPoint||new d,this.miterLimit=D.miterLimit||10,this.lastPoint=D.lastPoint||new d,this.lineDashOffset=D.lineDashOffset||0,this.lineDash=D.lineDash||[],this.margin=D.margin||[0,0,0,0],this.prevPageLastElemOffset=D.prevPageLastElemOffset||0,this.ignoreClearRect=typeof D.ignoreClearRect!="boolean"||D.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new x(this),t=this.internal.f2,s=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,l=this.internal.getVerticalCoordinate,d=this.internal.Point,c=this.internal.Rectangle,u=this.internal.Matrix,h=new m}]);var x=function(D){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=D;Object.defineProperty(this,"pdf",{get:function(){return $}});var X=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return X},set:function(ie){X=!!ie}});var te=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return te},set:function(ie){te=!!ie}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(ie){isNaN(ie)||(J=ie)}});var O=0;Object.defineProperty(this,"posY",{get:function(){return O},set:function(ie){isNaN(ie)||(O=ie)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(ie){var W;typeof ie=="number"?W=[ie,ie,ie,ie]:((W=new Array(4))[0]=ie[0],W[1]=ie.length>=2?ie[1]:W[0],W[2]=ie.length>=3?ie[2]:W[0],W[3]=ie.length>=4?ie[3]:W[1]),h.margin=W}});var H=!1;Object.defineProperty(this,"autoPaging",{get:function(){return H},set:function(ie){H=ie}});var re=0;Object.defineProperty(this,"lastBreak",{get:function(){return re},set:function(ie){re=ie}});var Ae=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Ae},set:function(ie){Ae=ie}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(ie){ie instanceof m&&(h=ie)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(ie){h.path=ie}});var oe=[];Object.defineProperty(this,"ctxStack",{get:function(){return oe},set:function(ie){oe=ie}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(ie){var W;W=y(ie),this.ctx.fillStyle=W.style,this.ctx.isFillTransparent=W.a===0,this.ctx.fillOpacity=W.a,this.pdf.setFillColor(W.r,W.g,W.b,{a:W.a}),this.pdf.setTextColor(W.r,W.g,W.b,{a:W.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(ie){var W=y(ie);this.ctx.strokeStyle=W.style,this.ctx.isStrokeTransparent=W.a===0,this.ctx.strokeOpacity=W.a,W.a===0?this.pdf.setDrawColor(255,255,255):(W.a,this.pdf.setDrawColor(W.r,W.g,W.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(ie){["butt","round","square"].indexOf(ie)!==-1&&(this.ctx.lineCap=ie,this.pdf.setLineCap(ie))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(ie){isNaN(ie)||(this.ctx.lineWidth=ie,this.pdf.setLineWidth(ie))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(ie){["bevel","round","miter"].indexOf(ie)!==-1&&(this.ctx.lineJoin=ie,this.pdf.setLineJoin(ie))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(ie){isNaN(ie)||(this.ctx.miterLimit=ie,this.pdf.setMiterLimit(ie))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(ie){this.ctx.textBaseline=ie}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(ie){["right","end","center","left","start"].indexOf(ie)!==-1&&(this.ctx.textAlign=ie)}});var ce=null,Se=null,z=null;Object.defineProperty(this,"fontFaces",{get:function(){return z},set:function(ie){ce=null,Se=null,z=ie}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(ie){var W;if(this.ctx.font=ie,(W=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(ie))!==null){var Q=W[1];W[2];var I=W[3],k=W[4];W[5];var G=W[6],me=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(k)[2];k=Math.floor(me==="px"?parseFloat(k)*this.pdf.internal.scaleFactor:me==="em"?parseFloat(k)*this.pdf.getFontSize():parseFloat(k)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(k);var be=(function(mt){var Ur,jt,_t=[],Dt=mt.trim();if(Dt==="")return vg;if(Dt in E2)return[E2[Dt]];for(;Dt!=="";){switch(jt=null,Ur=(Dt=Q2(Dt)).charAt(0)){case'"':case"'":jt=HF(Dt.substring(1),Ur);break;default:jt=MF(Dt)}if(jt===null||(_t.push(jt[0]),(Dt=Q2(jt[1]))!==""&&Dt.charAt(0)!==","))return vg;Dt=Dt.replace(/^,/,"")}return _t})(G);if(this.fontFaces){var Ue=(function(mt,Ur){var jt=mt.getFontList(),_t=JSON.stringify(jt);if(ce===null||Se!==_t){var Dt=(function(Gt){var kt=[];return Object.keys(Gt).forEach(function(Fr){Gt[Fr].forEach(function(It){var Pt=null;switch(It){case"bold":Pt={family:Fr,weight:"bold"};break;case"italic":Pt={family:Fr,style:"italic"};break;case"bolditalic":Pt={family:Fr,weight:"bold",style:"italic"};break;case"":case"normal":Pt={family:Fr}}Pt!==null&&(Pt.ref={name:Fr,style:It},kt.push(Pt))})}),kt})(jt);ce=(function(Gt){for(var kt={},Fr=0;Fr<Gt.length;++Fr){var It=wg(Gt[Fr]),Pt=It.family,Br=It.stretch,zt=It.style,Bt=It.weight;kt[Pt]=kt[Pt]||{},kt[Pt][Br]=kt[Pt][Br]||{},kt[Pt][Br][zt]=kt[Pt][Br][zt]||{},kt[Pt][Br][zt][Bt]=It}return kt})(Dt.concat(Ur)),Se=_t}return ce})(this.pdf,this.fontFaces),Re=be.map(function(mt){return{family:mt,stretch:"normal",weight:I,style:Q}}),He=(function(mt,Ur,jt){for(var _t=(jt=jt||{}).defaultFontFamily||"times",Dt=Object.assign({},OF,jt.genericFontFamilies||{}),Gt=null,kt=null,Fr=0;Fr<Ur.length;++Fr)if(Dt[(Gt=wg(Ur[Fr])).family]&&(Gt.family=Dt[Gt.family]),mt.hasOwnProperty(Gt.family)){kt=mt[Gt.family];break}if(!(kt=kt||mt[_t]))throw new Error("Could not find a font-family for the rule '"+U2(Gt)+"' and default family '"+_t+"'.");if(kt=(function(It,Pt){if(Pt[It])return Pt[It];var Br=Wb[It],zt=Br<=Wb.normal?-1:1,Bt=F2(Pt,rj,Br,zt);if(!Bt)throw new Error("Could not find a matching font-stretch value for "+It);return Bt})(Gt.stretch,kt),kt=(function(It,Pt){if(Pt[It])return Pt[It];for(var Br=tj[It],zt=0;zt<Br.length;++zt)if(Pt[Br[zt]])return Pt[Br[zt]];throw new Error("Could not find a matching font-style for "+It)})(Gt.style,kt),!(kt=(function(It,Pt){if(Pt[It])return Pt[It];if(It===400&&Pt[500])return Pt[500];if(It===500&&Pt[400])return Pt[400];var Br=RF[It],zt=F2(Pt,sj,Br,It<400?-1:1);if(!zt)throw new Error("Could not find a matching font-weight for value "+It);return zt})(Gt.weight,kt)))throw new Error("Failed to resolve a font for the rule '"+U2(Gt)+"'.");return kt})(Ue,Re);this.pdf.setFont(He.ref.name,He.ref.style)}else{var Ve="";(I==="bold"||parseInt(I,10)>=700||Q==="bold")&&(Ve="bold"),Q==="italic"&&(Ve+="italic"),Ve.length===0&&(Ve="normal");for(var it="",lt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ut=0;ut<be.length;ut++){if(this.pdf.internal.getFont(be[ut],Ve,{noFallback:!0,disableWarning:!0})!==void 0){it=be[ut];break}if(Ve==="bolditalic"&&this.pdf.internal.getFont(be[ut],"bold",{noFallback:!0,disableWarning:!0})!==void 0)it=be[ut],Ve="bold";else if(this.pdf.internal.getFont(be[ut],"normal",{noFallback:!0,disableWarning:!0})!==void 0){it=be[ut],Ve="normal";break}}if(it===""){for(var Tt=0;Tt<be.length;Tt++)if(lt[be[Tt]]){it=lt[be[Tt]];break}}it=it===""?"Times":it,this.pdf.setFont(it,Ve)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(ie){this.ctx.globalCompositeOperation=ie}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(ie){this.ctx.globalAlpha=ie}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(ie){this.ctx.lineDashOffset=ie,xe.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(ie){this.ctx.lineDash=ie,xe.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(ie){this.ctx.ignoreClearRect=!!ie}})};x.prototype.setLineDash=function(D){this.lineDash=D},x.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},x.prototype.fill=function(){w.call(this,"fill",!1)},x.prototype.stroke=function(){w.call(this,"stroke",!1)},x.prototype.beginPath=function(){this.path=[{type:"begin"}]},x.prototype.moveTo=function(D,$){if(isNaN(D)||isNaN($))throw Xr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var X=this.ctx.transform.applyToPoint(new d(D,$));this.path.push({type:"mt",x:X.x,y:X.y}),this.ctx.lastPoint=new d(D,$)},x.prototype.closePath=function(){var D=new d(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&Yr(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){D=new d(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new d(D.x,D.y)},x.prototype.lineTo=function(D,$){if(isNaN(D)||isNaN($))throw Xr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var X=this.ctx.transform.applyToPoint(new d(D,$));this.path.push({type:"lt",x:X.x,y:X.y}),this.ctx.lastPoint=new d(X.x,X.y)},x.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),w.call(this,null,!0)},x.prototype.quadraticCurveTo=function(D,$,X,te){if(isNaN(X)||isNaN(te)||isNaN(D)||isNaN($))throw Xr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new d(X,te)),O=this.ctx.transform.applyToPoint(new d(D,$));this.path.push({type:"qct",x1:O.x,y1:O.y,x:J.x,y:J.y}),this.ctx.lastPoint=new d(J.x,J.y)},x.prototype.bezierCurveTo=function(D,$,X,te,J,O){if(isNaN(J)||isNaN(O)||isNaN(D)||isNaN($)||isNaN(X)||isNaN(te))throw Xr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var H=this.ctx.transform.applyToPoint(new d(J,O)),re=this.ctx.transform.applyToPoint(new d(D,$)),Ae=this.ctx.transform.applyToPoint(new d(X,te));this.path.push({type:"bct",x1:re.x,y1:re.y,x2:Ae.x,y2:Ae.y,x:H.x,y:H.y}),this.ctx.lastPoint=new d(H.x,H.y)},x.prototype.arc=function(D,$,X,te,J,O){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te)||isNaN(J))throw Xr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(O=!!O,!this.ctx.transform.isIdentity){var H=this.ctx.transform.applyToPoint(new d(D,$));D=H.x,$=H.y;var re=this.ctx.transform.applyToPoint(new d(0,X)),Ae=this.ctx.transform.applyToPoint(new d(0,0));X=Math.sqrt(Math.pow(re.x-Ae.x,2)+Math.pow(re.y-Ae.y,2))}Math.abs(J-te)>=2*Math.PI&&(te=0,J=2*Math.PI),this.path.push({type:"arc",x:D,y:$,radius:X,startAngle:te,endAngle:J,counterclockwise:O})},x.prototype.arcTo=function(D,$,X,te,J){throw new Error("arcTo not implemented.")},x.prototype.rect=function(D,$,X,te){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te))throw Xr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(D,$),this.lineTo(D+X,$),this.lineTo(D+X,$+te),this.lineTo(D,$+te),this.lineTo(D,$),this.lineTo(D+X,$),this.lineTo(D,$)},x.prototype.fillRect=function(D,$,X,te){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te))throw Xr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(D,$,X,te),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},x.prototype.strokeRect=function(D,$,X,te){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te))throw Xr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");v.call(this)||(this.beginPath(),this.rect(D,$,X,te),this.stroke())},x.prototype.clearRect=function(D,$,X,te){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te))throw Xr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(D,$,X,te))},x.prototype.save=function(D){D=typeof D!="boolean"||D;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("q");if(this.pdf.setPage($),D){this.ctx.fontSize=this.pdf.internal.getFontSize();var te=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=te}},x.prototype.restore=function(D){D=typeof D!="boolean"||D;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("Q");this.pdf.setPage($),D&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},x.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var y=function(D){var $,X,te,J;if(D.isCanvasGradient===!0&&(D=D.getColor()),!D)return{r:0,g:0,b:0,a:0,style:D};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(D))$=0,X=0,te=0,J=0;else{var O=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(D);if(O!==null)$=parseInt(O[1]),X=parseInt(O[2]),te=parseInt(O[3]),J=1;else if((O=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(D))!==null)$=parseInt(O[1]),X=parseInt(O[2]),te=parseInt(O[3]),J=parseFloat(O[4]);else{if(J=1,typeof D=="string"&&D.charAt(0)!=="#"){var H=new W4(D);D=H.ok?H.toHex():"#000000"}D.length===4?($=D.substring(1,2),$+=$,X=D.substring(2,3),X+=X,te=D.substring(3,4),te+=te):($=D.substring(1,3),X=D.substring(3,5),te=D.substring(5,7)),$=parseInt($,16),X=parseInt(X,16),te=parseInt(te,16)}}return{r:$,g:X,b:te,a:J,style:D}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},v=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};x.prototype.fillText=function(D,$,X,te){if(isNaN($)||isNaN(X)||typeof D!="string")throw Xr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(te=isNaN(te)?void 0:te,!p.call(this)){var J=fe(this.ctx.transform.rotation),O=this.ctx.transform.scaleX;U.call(this,{text:D,x:$,y:X,scale:O,angle:J,align:this.textAlign,maxWidth:te})}},x.prototype.strokeText=function(D,$,X,te){if(isNaN($)||isNaN(X)||typeof D!="string")throw Xr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!v.call(this)){te=isNaN(te)?void 0:te;var J=fe(this.ctx.transform.rotation),O=this.ctx.transform.scaleX;U.call(this,{text:D,x:$,y:X,scale:O,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:te})}},x.prototype.measureText=function(D){if(typeof D!="string")throw Xr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,X=this.pdf.internal.scaleFactor,te=$.internal.getFontSize(),J=$.getStringUnitWidth(D)*te/$.internal.scaleFactor;return new function(O){var H=(O=O||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return H}}),this}({width:J*=Math.round(96*X/72*1e4)/1e4})},x.prototype.scale=function(D,$){if(isNaN(D)||isNaN($))throw Xr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var X=new u(D,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(X)},x.prototype.rotate=function(D){if(isNaN(D))throw Xr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new u(Math.cos(D),Math.sin(D),-Math.sin(D),Math.cos(D),0,0);this.ctx.transform=this.ctx.transform.multiply($)},x.prototype.translate=function(D,$){if(isNaN(D)||isNaN($))throw Xr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var X=new u(1,0,0,1,D,$);this.ctx.transform=this.ctx.transform.multiply(X)},x.prototype.transform=function(D,$,X,te,J,O){if(isNaN(D)||isNaN($)||isNaN(X)||isNaN(te)||isNaN(J)||isNaN(O))throw Xr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var H=new u(D,$,X,te,J,O);this.ctx.transform=this.ctx.transform.multiply(H)},x.prototype.setTransform=function(D,$,X,te,J,O){D=isNaN(D)?1:D,$=isNaN($)?0:$,X=isNaN(X)?0:X,te=isNaN(te)?1:te,J=isNaN(J)?0:J,O=isNaN(O)?0:O,this.ctx.transform=new u(D,$,X,te,J,O)};var N=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};x.prototype.drawImage=function(D,$,X,te,J,O,H,re,Ae){var oe=this.pdf.getImageProperties(D),ce=1,Se=1,z=1,ie=1;te!==void 0&&re!==void 0&&(z=re/te,ie=Ae/J,ce=oe.width/te*re/te,Se=oe.height/J*Ae/J),O===void 0&&(O=$,H=X,$=0,X=0),te!==void 0&&re===void 0&&(re=te,Ae=J),te===void 0&&re===void 0&&(re=oe.width,Ae=oe.height);var W=this.ctx.transform.decompose(),Q=fe(W.rotate.shx),I=new u,k=(I=(I=(I=I.multiply(W.translate)).multiply(W.skew)).multiply(W.scale)).applyToRectangle(new c(O-$*z,H-X*ie,te*ce,J*Se));if(this.autoPaging){for(var G,me=B.call(this,k),be=[],Ue=0;Ue<me.length;Ue+=1)be.indexOf(me[Ue])===-1&&be.push(me[Ue]);_(be);for(var Re=be[0],He=be[be.length-1],Ve=Re;Ve<He+1;Ve++){this.pdf.setPage(Ve);var it=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],lt=Ve===1?this.posY+this.margin[0]:this.margin[0],ut=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Tt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],mt=Ve===1?0:ut+(Ve-2)*Tt;if(this.ctx.clip_path.length!==0){var Ur=this.path;G=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=j(G,this.posX+this.margin[3],-mt+lt+this.ctx.prevPageLastElemOffset),L.call(this,"fill",!0),this.path=Ur}var jt=JSON.parse(JSON.stringify(k));jt=j([jt],this.posX+this.margin[3],-mt+lt+this.ctx.prevPageLastElemOffset)[0];var _t=(Ve>Re||Ve<He)&&N.call(this);_t&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],it,Tt,null).clip().discardPath()),this.pdf.addImage(D,"JPEG",jt.x,jt.y,jt.w,jt.h,null,null,Q),_t&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(D,"JPEG",k.x,k.y,k.w,k.h,null,null,Q)};var B=function(D,$,X){var te=[];$=$||this.pdf.internal.pageSize.width,X=X||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(D.type){default:case"mt":case"lt":te.push(Math.floor((D.y+J)/X)+1);break;case"arc":te.push(Math.floor((D.y+J-D.radius)/X)+1),te.push(Math.floor((D.y+J+D.radius)/X)+1);break;case"qct":var O=ye(this.ctx.lastPoint.x,this.ctx.lastPoint.y,D.x1,D.y1,D.x,D.y);te.push(Math.floor((O.y+J)/X)+1),te.push(Math.floor((O.y+O.h+J)/X)+1);break;case"bct":var H=_e(this.ctx.lastPoint.x,this.ctx.lastPoint.y,D.x1,D.y1,D.x2,D.y2,D.x,D.y);te.push(Math.floor((H.y+J)/X)+1),te.push(Math.floor((H.y+H.h+J)/X)+1);break;case"rect":te.push(Math.floor((D.y+J)/X)+1),te.push(Math.floor((D.y+D.h+J)/X)+1)}for(var re=0;re<te.length;re+=1)for(;this.pdf.internal.getNumberOfPages()<te[re];)g.call(this);return te},g=function(){var D=this.fillStyle,$=this.strokeStyle,X=this.font,te=this.lineCap,J=this.lineWidth,O=this.lineJoin;this.pdf.addPage(),this.fillStyle=D,this.strokeStyle=$,this.font=X,this.lineCap=te,this.lineWidth=J,this.lineJoin=O},j=function(D,$,X){for(var te=0;te<D.length;te++)switch(D[te].type){case"bct":D[te].x2+=$,D[te].y2+=X;case"qct":D[te].x1+=$,D[te].y1+=X;default:D[te].x+=$,D[te].y+=X}return D},_=function(D){return D.sort(function($,X){return $-X})},w=function(D,$){var X=this.fillStyle,te=this.strokeStyle,J=this.lineCap,O=this.lineWidth,H=Math.abs(O*this.ctx.transform.scaleX),re=this.lineJoin;if(this.autoPaging){for(var Ae,oe,ce=JSON.parse(JSON.stringify(this.path)),Se=JSON.parse(JSON.stringify(this.path)),z=[],ie=0;ie<Se.length;ie++)if(Se[ie].x!==void 0)for(var W=B.call(this,Se[ie]),Q=0;Q<W.length;Q+=1)z.indexOf(W[Q])===-1&&z.push(W[Q]);for(var I=0;I<z.length;I++)for(;this.pdf.internal.getNumberOfPages()<z[I];)g.call(this);_(z);for(var k=z[0],G=z[z.length-1],me=k;me<G+1;me++){this.pdf.setPage(me),this.fillStyle=X,this.strokeStyle=te,this.lineCap=J,this.lineWidth=H,this.lineJoin=re;var be=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ue=me===1?this.posY+this.margin[0]:this.margin[0],Re=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],He=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ve=me===1?0:Re+(me-2)*He;if(this.ctx.clip_path.length!==0){var it=this.path;Ae=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=j(Ae,this.posX+this.margin[3],-Ve+Ue+this.ctx.prevPageLastElemOffset),L.call(this,D,!0),this.path=it}if(oe=JSON.parse(JSON.stringify(ce)),this.path=j(oe,this.posX+this.margin[3],-Ve+Ue+this.ctx.prevPageLastElemOffset),$===!1||me===0){var lt=(me>k||me<G)&&N.call(this);lt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],be,He,null).clip().discardPath()),L.call(this,D,$),lt&&this.pdf.restoreGraphicsState()}this.lineWidth=O}this.path=ce}else this.lineWidth=H,L.call(this,D,$),this.lineWidth=O},L=function(D,$){if((D!=="stroke"||$||!v.call(this))&&(D==="stroke"||$||!p.call(this))){for(var X,te,J=[],O=this.path,H=0;H<O.length;H++){var re=O[H];switch(re.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:re,deltas:[],abs:[]});break;case"lt":var Ae=J.length;if(O[H-1]&&!isNaN(O[H-1].x)&&(X=[re.x-O[H-1].x,re.y-O[H-1].y],Ae>0)){for(;Ae>=0;Ae--)if(J[Ae-1].close!==!0&&J[Ae-1].begin!==!0){J[Ae-1].deltas.push(X),J[Ae-1].abs.push(re);break}}break;case"bct":X=[re.x1-O[H-1].x,re.y1-O[H-1].y,re.x2-O[H-1].x,re.y2-O[H-1].y,re.x-O[H-1].x,re.y-O[H-1].y],J[J.length-1].deltas.push(X);break;case"qct":var oe=O[H-1].x+2/3*(re.x1-O[H-1].x),ce=O[H-1].y+2/3*(re.y1-O[H-1].y),Se=re.x+2/3*(re.x1-re.x),z=re.y+2/3*(re.y1-re.y),ie=re.x,W=re.y;X=[oe-O[H-1].x,ce-O[H-1].y,Se-O[H-1].x,z-O[H-1].y,ie-O[H-1].x,W-O[H-1].y],J[J.length-1].deltas.push(X);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(re)}}te=$?null:D==="stroke"?"stroke":"fill";for(var Q=!1,I=0;I<J.length;I++)if(J[I].arc)for(var k=J[I].abs,G=0;G<k.length;G++){var me=k[G];me.type==="arc"?V.call(this,me.x,me.y,me.radius,me.startAngle,me.endAngle,me.counterclockwise,void 0,$,!Q):q.call(this,me.x,me.y),Q=!0}else if(J[I].close===!0)this.pdf.internal.out("h"),Q=!1;else if(J[I].begin!==!0){var be=J[I].start.x,Ue=J[I].start.y;F.call(this,J[I].deltas,be,Ue),Q=!0}te&&T.call(this,te),$&&ne.call(this)}},K=function(D){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,X=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return D-X;case"top":return D+$-X;case"hanging":return D+$-2*X;case"middle":return D+$/2-X;default:return D}},M=function(D){return D+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};x.prototype.createLinearGradient=function(){var D=function(){};return D.colorStops=[],D.addColorStop=function($,X){this.colorStops.push([$,X])},D.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},D.isCanvasGradient=!0,D},x.prototype.createPattern=function(){return this.createLinearGradient()},x.prototype.createRadialGradient=function(){return this.createLinearGradient()};var V=function(D,$,X,te,J,O,H,re,Ae){for(var oe=ae.call(this,X,te,J,O),ce=0;ce<oe.length;ce++){var Se=oe[ce];ce===0&&(Ae?Z.call(this,Se.x1+D,Se.y1+$):q.call(this,Se.x1+D,Se.y1+$)),le.call(this,D,$,Se.x2,Se.y2,Se.x3,Se.y3,Se.x4,Se.y4)}re?ne.call(this):T.call(this,H)},T=function(D){switch(D){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},ne=function(){this.pdf.clip(),this.pdf.discardPath()},Z=function(D,$){this.pdf.internal.out(s(D)+" "+n($)+" m")},U=function(D){var $;switch(D.align){case"right":case"end":$="right";break;case"center":$="center";break;default:$="left"}var X,te,J,O=this.pdf.getTextDimensions(D.text),H=K.call(this,D.y),re=M.call(this,H)-O.h,Ae=this.ctx.transform.applyToPoint(new d(D.x,H));if(this.autoPaging){var oe=this.ctx.transform.decompose(),ce=new u;ce=(ce=(ce=ce.multiply(oe.translate)).multiply(oe.skew)).multiply(oe.scale);for(var Se=this.ctx.transform.applyToRectangle(new c(D.x,H,O.w,O.h)),z=ce.applyToRectangle(new c(D.x,re,O.w,O.h)),ie=B.call(this,z),W=[],Q=0;Q<ie.length;Q+=1)W.indexOf(ie[Q])===-1&&W.push(ie[Q]);_(W);for(var I=W[0],k=W[W.length-1],G=I;G<k+1;G++){this.pdf.setPage(G);var me=G===1?this.posY+this.margin[0]:this.margin[0],be=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ue=this.pdf.internal.pageSize.height-this.margin[2],Re=Ue-this.margin[0],He=this.pdf.internal.pageSize.width-this.margin[1],Ve=He-this.margin[3],it=G===1?0:be+(G-2)*Re;if(this.ctx.clip_path.length!==0){var lt=this.path;X=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=j(X,this.posX+this.margin[3],-1*it+me),L.call(this,"fill",!0),this.path=lt}var ut=j([JSON.parse(JSON.stringify(z))],this.posX+this.margin[3],-it+me+this.ctx.prevPageLastElemOffset)[0];D.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*D.scale),J=this.lineWidth,this.lineWidth=J*D.scale);var Tt=this.autoPaging!=="text";if(Tt||ut.y+ut.h<=Ue){if(Tt||ut.y>=me&&ut.x<=He){var mt=Tt?D.text:this.pdf.splitTextToSize(D.text,D.maxWidth||He-ut.x)[0],Ur=j([JSON.parse(JSON.stringify(Se))],this.posX+this.margin[3],-it+me+this.ctx.prevPageLastElemOffset)[0],jt=Tt&&(G>I||G<k)&&N.call(this);jt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ve,Re,null).clip().discardPath()),this.pdf.text(mt,Ur.x,Ur.y,{angle:D.angle,align:$,renderingMode:D.renderingMode}),jt&&this.pdf.restoreGraphicsState()}}else ut.y<Ue&&(this.ctx.prevPageLastElemOffset+=Ue-ut.y);D.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=J)}}else D.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*D.scale),J=this.lineWidth,this.lineWidth=J*D.scale),this.pdf.text(D.text,Ae.x+this.posX,Ae.y+this.posY,{angle:D.angle,align:$,renderingMode:D.renderingMode,maxWidth:D.maxWidth}),D.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=J)},q=function(D,$,X,te){X=X||0,te=te||0,this.pdf.internal.out(s(D+X)+" "+n($+te)+" l")},F=function(D,$,X){return this.pdf.lines(D,$,X,null,null)},le=function(D,$,X,te,J,O,H,re){this.pdf.internal.out([t(o(X+D)),t(l(te+$)),t(o(J+D)),t(l(O+$)),t(o(H+D)),t(l(re+$)),"c"].join(" "))},ae=function(D,$,X,te){for(var J=2*Math.PI,O=Math.PI/2;$>X;)$-=J;var H=Math.abs(X-$);H<J&&te&&(H=J-H);for(var re=[],Ae=te?-1:1,oe=$;H>1e-5;){var ce=oe+Ae*Math.min(H,O);re.push(se.call(this,D,oe,ce)),H-=Math.abs(ce-oe),oe=ce}return re},se=function(D,$,X){var te=(X-$)/2,J=D*Math.cos(te),O=D*Math.sin(te),H=J,re=-O,Ae=H*H+re*re,oe=Ae+H*J+re*O,ce=4/3*(Math.sqrt(2*Ae*oe)-oe)/(H*O-re*J),Se=H-ce*re,z=re+ce*H,ie=Se,W=-z,Q=te+$,I=Math.cos(Q),k=Math.sin(Q);return{x1:D*Math.cos($),y1:D*Math.sin($),x2:Se*I-z*k,y2:Se*k+z*I,x3:ie*I-W*k,y3:ie*k+W*I,x4:D*Math.cos(X),y4:D*Math.sin(X)}},fe=function(D){return 180*D/Math.PI},ye=function(D,$,X,te,J,O){var H=D+.5*(X-D),re=$+.5*(te-$),Ae=J+.5*(X-J),oe=O+.5*(te-O),ce=Math.min(D,J,H,Ae),Se=Math.max(D,J,H,Ae),z=Math.min($,O,re,oe),ie=Math.max($,O,re,oe);return new c(ce,z,Se-ce,ie-z)},_e=function(D,$,X,te,J,O,H,re){var Ae,oe,ce,Se,z,ie,W,Q,I,k,G,me,be,Ue,Re=X-D,He=te-$,Ve=J-X,it=O-te,lt=H-J,ut=re-O;for(oe=0;oe<41;oe++)I=(W=(ce=D+(Ae=oe/40)*Re)+Ae*((z=X+Ae*Ve)-ce))+Ae*(z+Ae*(J+Ae*lt-z)-W),k=(Q=(Se=$+Ae*He)+Ae*((ie=te+Ae*it)-Se))+Ae*(ie+Ae*(O+Ae*ut-ie)-Q),oe==0?(G=I,me=k,be=I,Ue=k):(G=Math.min(G,I),me=Math.min(me,k),be=Math.max(be,I),Ue=Math.max(Ue,k));return new c(Math.round(G),Math.round(me),Math.round(be-G),Math.round(Ue-me))},xe=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var D,$,X=(D=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:D,lineDashOffset:$}));this.prevLineDash!==X&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=X)}}})(Ft.API),(function(r){var t=function(d){var c,u,h,m,x,y,p,v,N,B;for(u=[],h=0,m=(d+=c="\0\0\0\0".slice(d.length%4||4)).length;m>h;h+=4)(x=(d.charCodeAt(h)<<24)+(d.charCodeAt(h+1)<<16)+(d.charCodeAt(h+2)<<8)+d.charCodeAt(h+3))!==0?(y=(x=((x=((x=((x=(x-(B=x%85))/85)-(N=x%85))/85)-(v=x%85))/85)-(p=x%85))/85)%85,u.push(y+33,p+33,v+33,N+33,B+33)):u.push(122);return(function(g,j){for(var _=j;_>0;_--)g.pop()})(u,c.length),String.fromCharCode.apply(String,u)+"~>"},s=function(d){var c,u,h,m,x,y=String,p="length",v=255,N="charCodeAt",B="slice",g="replace";for(d[B](-2),d=d[B](0,-2)[g](/\s/g,"")[g]("z","!!!!!"),h=[],m=0,x=(d+=c="uuuuu"[B](d[p]%5||5))[p];x>m;m+=5)u=52200625*(d[N](m)-33)+614125*(d[N](m+1)-33)+7225*(d[N](m+2)-33)+85*(d[N](m+3)-33)+(d[N](m+4)-33),h.push(v&u>>24,v&u>>16,v&u>>8,v&u);return(function(j,_){for(var w=_;w>0;w--)j.pop()})(h,c[p]),y.fromCharCode.apply(y,h)},n=function(d){return d.split("").map(function(c){return("0"+c.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(d){var c=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((d=d.replace(/\s/g,"")).indexOf(">")!==-1&&(d=d.substr(0,d.indexOf(">"))),d.length%2&&(d+="0"),c.test(d)===!1)return"";for(var u="",h=0;h<d.length;h+=2)u+=String.fromCharCode("0x"+(d[h]+d[h+1]));return u},l=function(d){for(var c=new Uint8Array(d.length),u=d.length;u--;)c[u]=d.charCodeAt(u);return(c=Mb(c)).reduce(function(h,m){return h+String.fromCharCode(m)},"")};r.processDataByFilters=function(d,c){var u=0,h=d||"",m=[];for(typeof(c=c||[])=="string"&&(c=[c]),u=0;u<c.length;u+=1)switch(c[u]){case"ASCII85Decode":case"/ASCII85Decode":h=s(h),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=t(h),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=o(h),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=n(h),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=l(h),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+c[u]+'" is not implemented')}return{data:h,reverseChain:m.reverse().join(" ")}}})(Ft.API),(function(r){r.loadFile=function(t,s,n){return(function(o,l,d){l=l!==!1,d=typeof d=="function"?d:function(){};var c=void 0;try{c=(function(u,h,m){var x=new XMLHttpRequest,y=0,p=function(v){var N=v.length,B=[],g=String.fromCharCode;for(y=0;y<N;y+=1)B.push(g(255&v.charCodeAt(y)));return B.join("")};if(x.open("GET",u,!h),x.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(x.onload=function(){x.status===200?m(p(this.responseText)):m(void 0)}),x.send(null),h&&x.status===200)return p(x.responseText)})(o,l,d)}catch{}return c})(t,s,n)},r.allowFsRead=void 0,r.loadImageFile=r.loadFile})(Ft.API),(function(r){function t(){return(Wt.html2canvas?Promise.resolve(Wt.html2canvas):sg(()=>Promise.resolve().then(()=>ET),void 0)).catch(function(c){return Promise.reject(new Error("Could not load html2canvas: "+c))}).then(function(c){return c.default?c.default:c})}function s(){return(Wt.DOMPurify?Promise.resolve(Wt.DOMPurify):sg(()=>import("./purify.es-Bzr520pe.js"),[])).catch(function(c){return Promise.reject(new Error("Could not load dompurify: "+c))}).then(function(c){return c.default?c.default:c})}var n=function(c){var u=Yr(c);return u==="undefined"?"undefined":u==="string"||c instanceof String?"string":u==="number"||c instanceof Number?"number":u==="function"||c instanceof Function?"function":c&&c.constructor===Array?"array":c&&c.nodeType===1?"element":u==="object"?"object":"unknown"},o=function(c,u){var h=document.createElement(c);for(var m in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[m]=u.style[m];return h},l=function c(u,h){for(var m=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),x=u.firstChild;x;x=x.nextSibling)h!==!0&&x.nodeType===1&&x.nodeName==="SCRIPT"||m.appendChild(c(x,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(m.width=u.width,m.height=u.height,m.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(m.value=u.value),m.addEventListener("load",function(){m.scrollTop=u.scrollTop,m.scrollLeft=u.scrollLeft},!0)),m},d=function c(u){var h=Object.assign(c.convert(Promise.resolve()),JSON.parse(JSON.stringify(c.template))),m=c.convert(Promise.resolve(),h);return(m=m.setProgress(1,c,1,[c])).set(u)};(d.prototype=Object.create(Promise.prototype)).constructor=d,d.convert=function(c,u){return c.__proto__=u||d.prototype,c},d.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},d.prototype.from=function(c,u){return this.then(function(){switch(u=u||(function(h){switch(n(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(c),u){case"string":return this.then(s).then(function(h){return this.set({src:o("div",{innerHTML:c,dompurify:h})})});case"element":return this.set({src:c});case"canvas":return this.set({canvas:c});case"img":return this.set({img:c});default:return this.error("Unknown source type.")}})},d.prototype.to=function(c){switch(c){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},d.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var c={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=l(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(c.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:c}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},d.prototype.toCanvas=function(){var c=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(c).then(t).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},d.prototype.toContext2d=function(){var c=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(c).then(t).then(function(u){var h=this.opt.jsPDF,m=this.opt.fontFaces,x=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,y=Object.assign({async:!0,allowTaint:!0,scale:x,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete y.onrendered,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=m,m)for(var p=0;p<m.length;++p){var v=m[p],N=v.src.find(function(B){return B.format==="truetype"});N&&h.addFont(N.url,v.ref.name,v.ref.style)}return y.windowHeight=y.windowHeight||0,y.windowHeight=y.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):y.windowHeight,h.context2d.save(!0),u(this.prop.container,y)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},d.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var c=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=c})},d.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},d.prototype.output=function(c,u,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(c,u):this.outputPdf(c,u)},d.prototype.outputPdf=function(c,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(c,u)})},d.prototype.outputImg=function(c){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(c){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+c+'" is not supported.'}})},d.prototype.save=function(c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(c?{filename:c}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},d.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},d.prototype.set=function(c){if(n(c)!=="object")return this;var u=Object.keys(c||{}).map(function(h){if(h in d.template.prop)return function(){this.prop[h]=c[h]};switch(h){case"margin":return this.setMargin.bind(this,c.margin);case"jsPDF":return function(){return this.opt.jsPDF=c.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,c.pageSize);default:return function(){this.opt[h]=c[h]}}},this);return this.then(function(){return this.thenList(u)})},d.prototype.get=function(c,u){return this.then(function(){var h=c in d.template.prop?this.prop[c]:this.opt[c];return u?u(h):h})},d.prototype.setMargin=function(c){return this.then(function(){switch(n(c)){case"number":c=[c,c,c,c];case"array":if(c.length===2&&(c=[c[0],c[1],c[0],c[1]]),c.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=c}).then(this.setPageSize)},d.prototype.setPageSize=function(c){function u(h,m){return Math.floor(h*m/72*96)}return this.then(function(){(c=c||Ft.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(c.inner={width:c.width-this.opt.margin[1]-this.opt.margin[3],height:c.height-this.opt.margin[0]-this.opt.margin[2]},c.inner.px={width:u(c.inner.width,c.k),height:u(c.inner.height,c.k)},c.inner.ratio=c.inner.height/c.inner.width),this.prop.pageSize=c})},d.prototype.setProgress=function(c,u,h,m){return c!=null&&(this.progress.val=c),u!=null&&(this.progress.state=u),h!=null&&(this.progress.n=h),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},d.prototype.updateProgress=function(c,u,h,m){return this.setProgress(c?this.progress.val+c:null,u||null,h?this.progress.n+h:null,m?this.progress.stack.concat(m):null)},d.prototype.then=function(c,u){var h=this;return this.thenCore(c,u,function(m,x){return h.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(y){return h.updateProgress(null,m),y}).then(m,x).then(function(y){return h.updateProgress(1),y})})},d.prototype.thenCore=function(c,u,h){h=h||Promise.prototype.then;var m=this;c&&(c=c.bind(m)),u&&(u=u.bind(m));var x=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:d.convert(Object.assign({},m),Promise.prototype),y=h.call(x,c,u);return d.convert(y,m.__proto__)},d.prototype.thenExternal=function(c,u){return Promise.prototype.then.call(this,c,u)},d.prototype.thenList=function(c){var u=this;return c.forEach(function(h){u=u.thenCore(h)}),u},d.prototype.catch=function(c){c&&(c=c.bind(this));var u=Promise.prototype.catch.call(this,c);return d.convert(u,this)},d.prototype.catchExternal=function(c){return Promise.prototype.catch.call(this,c)},d.prototype.error=function(c){return this.then(function(){throw new Error(c)})},d.prototype.using=d.prototype.set,d.prototype.saveAs=d.prototype.save,d.prototype.export=d.prototype.output,d.prototype.run=d.prototype.then,Ft.getPageSize=function(c,u,h){if(Yr(c)==="object"){var m=c;c=m.orientation,u=m.unit||u,h=m.format||h}u=u||"mm",h=h||"a4",c=(""+(c||"P")).toLowerCase();var x,y=(""+h).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":x=1;break;case"mm":x=72/25.4;break;case"cm":x=72/2.54;break;case"in":x=72;break;case"px":x=.75;break;case"pc":case"em":x=12;break;case"ex":x=6;break;default:throw"Invalid unit: "+u}var v,N=0,B=0;if(p.hasOwnProperty(y))N=p[y][1]/x,B=p[y][0]/x;else try{N=h[1],B=h[0]}catch{throw new Error("Invalid format: "+h)}if(c==="p"||c==="portrait")c="p",B>N&&(v=B,B=N,N=v);else{if(c!=="l"&&c!=="landscape")throw"Invalid orientation: "+c;c="l",N>B&&(v=B,B=N,N=v)}return{width:B,height:N,unit:u,k:x,orientation:c}},r.html=function(c,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(wg):null;var h=new d(u);return u.worker?h:h.from(c).doCallback()}})(Ft.API),Ft.API.addJS=function(r){return T2=r,this.internal.events.subscribe("postPutResources",function(){Zf=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Zf+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),L2=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+T2+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Zf!==void 0&&L2!==void 0&&this.internal.out("/Names <</JavaScript "+Zf+" 0 R>>")}),this},(function(r){var t;r.events.push(["postPutResources",function(){var s=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=s.outline.render().split(/\r\n/),l=0;l<o.length;l++){var d=o[l],c=n.exec(d);if(c!=null){var u=c[1];s.internal.newObjectDeferredBegin(u,!1)}s.internal.write(d)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,m=[];for(l=0;l<h;l++){var x=s.internal.newObject();m.push(x);var y=s.internal.getPageInfo(l+1);s.internal.write("<< /D["+y.objId+" 0 R /XYZ null null null]>> endobj")}var p=s.internal.newObject();for(s.internal.write("<< /Names [ "),l=0;l<m.length;l++)s.internal.write("(page_"+(l+1)+")"+m[l]+" 0 R");s.internal.write(" ] >>","endobj"),t=s.internal.newObject(),s.internal.write("<< /Dests "+p+" 0 R"),s.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){var s=this;s.outline.root.children.length>0&&(s.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&s.internal.write("/Names "+t+" 0 R"))}]),r.events.push(["initialized",function(){var s=this;s.outline={createNamedDestinations:!1,root:{children:[]}},s.outline.add=function(n,o,l){var d={title:o,options:l,children:[]};return n==null&&(n=this.root),n.children.push(d),d},s.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=s,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},s.outline.genIds_r=function(n){n.id=s.internal.newObjectDeferred();for(var o=0;o<n.children.length;o++)this.genIds_r(n.children[o])},s.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},s.outline.renderItems=function(n){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,l=0;l<n.children.length;l++){var d=n.children[l];this.objStart(d),this.line("/Title "+this.makeString(d.title)),this.line("/Parent "+this.makeRef(n)),l>0&&this.line("/Prev "+this.makeRef(n.children[l-1])),l<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[l+1])),d.children.length>0&&(this.line("/First "+this.makeRef(d.children[0])),this.line("/Last "+this.makeRef(d.children[d.children.length-1])));var c=this.count=this.count_r({count:0},d);if(c>0&&this.line("/Count "+c),d.options&&d.options.pageNumber){var u=s.internal.getPageInfo(d.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var h=0;h<n.children.length;h++)this.renderItems(n.children[h])},s.outline.line=function(n){this.ctx.val+=n+`\r
`},s.outline.makeRef=function(n){return n.id+" 0 R"},s.outline.makeString=function(n){return"("+s.internal.pdfEscape(n)+")"},s.outline.objStart=function(n){this.ctx.val+=`\r
`+n.id+` 0 obj\r
<<\r
`},s.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},s.outline.count_r=function(n,o){for(var l=0;l<o.children.length;l++)n.count++,this.count_r(n,o.children[l]);return n.count}}])})(Ft.API),(function(r){var t=[192,193,194,195,196,197,198,199];r.processJPEG=function(s,n,o,l,d,c){var u,h=this.decode.DCT_DECODE,m=null;if(typeof s=="string"||this.__addimage__.isArrayBuffer(s)||this.__addimage__.isArrayBufferView(s)){switch(s=d||s,s=this.__addimage__.isArrayBuffer(s)?new Uint8Array(s):s,u=(function(x){for(var y,p=256*x.charCodeAt(4)+x.charCodeAt(5),v=x.length,N={width:0,height:0,numcomponents:1},B=4;B<v;B+=2){if(B+=p,t.indexOf(x.charCodeAt(B+1))!==-1){y=256*x.charCodeAt(B+5)+x.charCodeAt(B+6),N={width:256*x.charCodeAt(B+7)+x.charCodeAt(B+8),height:y,numcomponents:x.charCodeAt(B+9)};break}p=256*x.charCodeAt(B+2)+x.charCodeAt(B+3)}return N})(s=this.__addimage__.isArrayBufferView(s)?this.__addimage__.arrayBufferToBinaryString(s):s),u.numcomponents){case 1:c=this.color_spaces.DEVICE_GRAY;break;case 4:c=this.color_spaces.DEVICE_CMYK;break;case 3:c=this.color_spaces.DEVICE_RGB}m={data:s,width:u.width,height:u.height,colorSpace:c,bitsPerComponent:8,filter:h,index:n,alias:o}}return m}})(Ft.API),Ft.API.processPNG=function(r,t,s,n){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var o,l=BF(r,{checkCrc:!0}),d=l.width,c=l.height,u=l.channels,h=l.palette,m=l.depth;o=h&&u===1?(function(V){for(var T=V.width,ne=V.height,Z=V.data,U=V.palette,q=V.depth,F=!1,le=[],ae=[],se=void 0,fe=!1,ye=0,_e=0;_e<U.length;_e++){var xe=Ov(U[_e],4),D=xe[0],$=xe[1],X=xe[2],te=xe[3];le.push(D,$,X),te!=null&&(te===0?(ye++,ae.length<1&&ae.push(_e)):te<255&&(fe=!0))}if(fe||ye>1){F=!0,ae=void 0;var J=T*ne;se=new Uint8Array(J);for(var O=new DataView(Z.buffer),H=0;H<J;H++){var re=Ng(O,H,q),Ae=Ov(U[re],4)[3];se[H]=Ae}}else ye===0&&(ae=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:F?8:void 0,colorBytes:Z,alphaBytes:se,needSMask:F,palette:le,mask:ae}})(l):u===2||u===4?(function(V){for(var T=V.data,ne=V.width,Z=V.height,U=V.channels,q=V.depth,F=U===2?"DeviceGray":"DeviceRGB",le=U-1,ae=ne*Z,se=le,fe=ae*se,ye=1*ae,_e=Math.ceil(fe*q/8),xe=Math.ceil(ye*q/8),D=new Uint8Array(_e),$=new Uint8Array(xe),X=new DataView(T.buffer),te=new DataView(D.buffer),J=new DataView($.buffer),O=!1,H=0;H<ae;H++){for(var re=H*U,Ae=0;Ae<se;Ae++)z2(te,Ng(X,re+Ae,q),H*se+Ae,q);var oe=Ng(X,re+se,q);oe<(1<<q)-1&&(O=!0),z2(J,oe,1*H,q)}return{colorSpace:F,colorsPerPixel:le,sMaskBitsPerComponent:O?q:void 0,colorBytes:D,alphaBytes:$,needSMask:O}})(l):(function(V){var T=V.data,ne=V.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:ne,colorsPerPixel:ne==="DeviceGray"?1:3,colorBytes:T instanceof Uint16Array?(function(Z){for(var U=Z.length,q=new Uint8Array(2*U),F=new DataView(q.buffer,q.byteOffset,q.byteLength),le=0;le<U;le++)F.setUint16(2*le,Z[le],!1);return q})(T):T,needSMask:!1}})(l);var x,y,p,v=o,N=v.colorSpace,B=v.colorsPerPixel,g=v.sMaskBitsPerComponent,j=v.colorBytes,_=v.alphaBytes,w=v.needSMask,L=v.palette,K=v.mask,M=null;return n!==Ft.API.image_compression.NONE&&typeof Mb=="function"?(M=(function(V){var T;switch(V){case Ft.API.image_compression.FAST:T=11;break;case Ft.API.image_compression.MEDIUM:T=13;break;case Ft.API.image_compression.SLOW:T=14;break;default:T=12}return T})(n),x=this.decode.FLATE_DECODE,y="/Predictor ".concat(M," /Colors ").concat(B," /BitsPerComponent ").concat(m," /Columns ").concat(d),r=O2(j,Math.ceil(d*B*m/8),B,m,n),w&&(p=O2(_,Math.ceil(d*g/8),1,g,n))):(x=void 0,y=void 0,r=j,w&&(p=_)),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:s,data:r,index:t,filter:x,decodeParameters:y,transparency:K,palette:L,sMask:p,predictor:M,width:d,height:c,bitsPerComponent:m,sMaskBitsPerComponent:g,colorSpace:N}}},(function(r){r.processGIF89A=function(t,s,n,o){var l=new qF(t),d=l.width,c=l.height,u=[];l.decodeAndBlitFrameRGBA(0,u);var h={data:u,width:d,height:c},m=new Bg(100).encode(h,100);return r.processJPEG.call(this,m,s,n,o)},r.processGIF87A=r.processGIF89A})(Ft.API),eo.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var t=0;t<r;t++){var s=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:o,green:n,blue:s,quad:l}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},eo.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[r]()}catch(s){Xr.log("bit decode error:"+s)}},eo.prototype.bit1=function(){var r,t=Math.ceil(this.width/8),s=t%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,o=0;o<t;o++)for(var l=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+8*o*4,c=0;c<8&&8*o+c<this.width;c++){var u=this.palette[l>>7-c&1];this.data[d+4*c]=u.blue,this.data[d+4*c+1]=u.green,this.data[d+4*c+2]=u.red,this.data[d+4*c+3]=255}s!==0&&(this.pos+=4-s)}},eo.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),t=r%4,s=this.height-1;s>=0;s--){for(var n=this.bottom_up?s:this.height-1-s,o=0;o<r;o++){var l=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+2*o*4,c=l>>4,u=15&l,h=this.palette[c];if(this.data[d]=h.blue,this.data[d+1]=h.green,this.data[d+2]=h.red,this.data[d+3]=255,2*o+1>=this.width)break;h=this.palette[u],this.data[d+4]=h.blue,this.data[d+4+1]=h.green,this.data[d+4+2]=h.red,this.data[d+4+3]=255}t!==0&&(this.pos+=4-t)}},eo.prototype.bit8=function(){for(var r=this.width%4,t=this.height-1;t>=0;t--){for(var s=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var o=this.datav.getUint8(this.pos++,!0),l=s*this.width*4+4*n;if(o<this.palette.length){var d=this.palette[o];this.data[l]=d.red,this.data[l+1]=d.green,this.data[l+2]=d.blue,this.data[l+3]=255}else this.data[l]=255,this.data[l+1]=255,this.data[l+2]=255,this.data[l+3]=255}r!==0&&(this.pos+=4-r)}},eo.prototype.bit15=function(){for(var r=this.width%3,t=parseInt("11111",2),s=this.height-1;s>=0;s--){for(var n=this.bottom_up?s:this.height-1-s,o=0;o<this.width;o++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var d=(l&t)/t*255|0,c=(l>>5&t)/t*255|0,u=(l>>10&t)/t*255|0,h=l>>15?255:0,m=n*this.width*4+4*o;this.data[m]=u,this.data[m+1]=c,this.data[m+2]=d,this.data[m+3]=h}this.pos+=r}},eo.prototype.bit16=function(){for(var r=this.width%3,t=parseInt("11111",2),s=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var o=this.bottom_up?n:this.height-1-n,l=0;l<this.width;l++){var d=this.datav.getUint16(this.pos,!0);this.pos+=2;var c=(d&t)/t*255|0,u=(d>>5&s)/s*255|0,h=(d>>11)/t*255|0,m=o*this.width*4+4*l;this.data[m]=h,this.data[m+1]=u,this.data[m+2]=c,this.data[m+3]=255}this.pos+=r}},eo.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var t=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),d=t*this.width*4+4*s;this.data[d]=l,this.data[d+1]=o,this.data[d+2]=n,this.data[d+3]=255}this.pos+=this.width%4}},eo.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var t=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),d=this.datav.getUint8(this.pos++,!0),c=t*this.width*4+4*s;this.data[c]=l,this.data[c+1]=o,this.data[c+2]=n,this.data[c+3]=d}},eo.prototype.getData=function(){return this.data},(function(r){r.processBMP=function(t,s,n,o){var l=new eo(t,!1),d=l.width,c=l.height,u={data:l.getData(),width:d,height:c},h=new Bg(100).encode(u,100);return r.processJPEG.call(this,h,s,n,o)}})(Ft.API),G2.prototype.getData=function(){return this.data},(function(r){r.processWEBP=function(t,s,n,o){var l=new G2(t),d=l.width,c=l.height,u={data:l.getData(),width:d,height:c},h=new Bg(100).encode(u,100);return r.processJPEG.call(this,h,s,n,o)}})(Ft.API),Ft.API.processRGBA=function(r,t,s){for(var n=r.data,o=n.length,l=new Uint8Array(o/4*3),d=new Uint8Array(o/4),c=0,u=0,h=0;h<o;h+=4){var m=n[h],x=n[h+1],y=n[h+2],p=n[h+3];l[c++]=m,l[c++]=x,l[c++]=y,d[u++]=p}var v=this.__addimage__.arrayBufferToBinaryString(l);return{alpha:this.__addimage__.arrayBufferToBinaryString(d),data:v,index:t,alias:s,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Ft.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ed=Ft.API,$f=Ed.getCharWidthsArray=function(r,t){var s,n,o=(t=t||{}).font||this.internal.getFont(),l=t.fontSize||this.internal.getFontSize(),d=t.charSpace||this.internal.getCharSpace(),c=t.widths?t.widths:o.metadata.Unicode.widths,u=c.fof?c.fof:1,h=t.kerning?t.kerning:o.metadata.Unicode.kerning,m=h.fof?h.fof:1,x=t.doKerning!==!1,y=0,p=r.length,v=0,N=c[0]||u,B=[];for(s=0;s<p;s++)n=r.charCodeAt(s),typeof o.metadata.widthOfString=="function"?B.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(n))+d*(1e3/l)||0)/1e3):(y=x&&Yr(h[n])==="object"&&!isNaN(parseInt(h[n][v],10))?h[n][v]/m:0,B.push((c[n]||N)/u+y)),v=n;return B},I2=Ed.getStringUnitWidth=function(r,t){var s=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),o=t.charSpace||this.internal.getCharSpace();return Ed.processArabic&&(r=Ed.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,s,o)/s:$f.apply(this,arguments).reduce(function(l,d){return l+d},0)},D2=function(r,t,s,n){for(var o=[],l=0,d=r.length,c=0;l!==d&&c+t[l]<s;)c+=t[l],l++;o.push(r.slice(0,l));var u=l;for(c=0;l!==d;)c+t[l]>n&&(o.push(r.slice(u,l)),c=0,u=l),c+=t[l],l++;return u!==l&&o.push(r.slice(u,l)),o},R2=function(r,t,s){s||(s={});var n,o,l,d,c,u,h,m=[],x=[m],y=s.textIndent||0,p=0,v=0,N=r.split(" "),B=$f.apply(this,[" ",s])[0];if(u=s.lineIndent===-1?N[0].length+2:s.lineIndent||0){var g=Array(u).join(" "),j=[];N.map(function(w){(w=w.split(/\s*\n/)).length>1?j=j.concat(w.map(function(L,K){return(K&&L.length?`
`:"")+L})):j.push(w[0])}),N=j,u=I2.apply(this,[g,s])}for(l=0,d=N.length;l<d;l++){var _=0;if(n=N[l],u&&n[0]==`
`&&(n=n.substr(1),_=1),y+p+(v=(o=$f.apply(this,[n,s])).reduce(function(w,L){return w+L},0))>t||_){if(v>t){for(c=D2.apply(this,[n,o,t-(y+p),t]),m.push(c.shift()),m=[c.pop()];c.length;)x.push([c.shift()]);v=o.slice(n.length-(m[0]?m[0].length:0)).reduce(function(w,L){return w+L},0)}else m=[n];x.push(m),y=v+u,p=B}else m.push(n),y+=p+v,p=B}return h=u?function(w,L){return(L?g:"")+w.join(" ")}:function(w){return w.join(" ")},x.map(h)},Ed.splitTextToSize=function(r,t,s){var n,o=(s=s||{}).fontSize||this.internal.getFontSize(),l=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var x=this.internal.getFont(m.fontName,m.fontStyle),y="Unicode";return x.metadata[y]?{widths:x.metadata[y].widths||{0:1},kerning:x.metadata[y].kerning||{}}:{font:x.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,s);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var d=1*this.internal.scaleFactor*t/o;l.textIndent=s.textIndent?1*s.textIndent*this.internal.scaleFactor/o:0,l.lineIndent=s.lineIndent;var c,u,h=[];for(c=0,u=n.length;c<u;c++)h=h.concat(R2.apply(this,[n[c],d,l]));return h},(function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var t="0123456789abcdef",s="klmnopqrstuvwxyz",n={},o={},l=0;l<16;l++)n[s[l]]=t[l],o[t[l]]=s[l];var d=function(y){return"0x"+parseInt(y,10).toString(16)},c=r.__fontmetrics__.compress=function(y){var p,v,N,B,g=["{"];for(var j in y){if(p=y[j],isNaN(parseInt(j,10))?v="'"+j+"'":(j=parseInt(j,10),v=(v=d(j).slice(2)).slice(0,-1)+o[v.slice(-1)]),typeof p=="number")p<0?(N=d(p).slice(3),B="-"):(N=d(p).slice(2),B=""),N=B+N.slice(0,-1)+o[N.slice(-1)];else{if(Yr(p)!=="object")throw new Error("Don't know what to do with value type "+Yr(p)+".");N=c(p)}g.push(v+N)}return g.push("}"),g.join("")},u=r.__fontmetrics__.uncompress=function(y){if(typeof y!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,v,N,B,g={},j=1,_=g,w=[],L="",K="",M=y.length-1,V=1;V<M;V+=1)(B=y[V])=="'"?p?(N=p.join(""),p=void 0):p=[]:p?p.push(B):B=="{"?(w.push([_,N]),_={},N=void 0):B=="}"?((v=w.pop())[0][v[1]]=_,N=void 0,_=v[0]):B=="-"?j=-1:N===void 0?n.hasOwnProperty(B)?(L+=n[B],N=parseInt(L,16)*j,j=1,L=""):L+=B:n.hasOwnProperty(B)?(K+=n[B],_[N]=parseInt(K,16)*j,j=1,N=void 0,K=""):K+=B;return g},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},m={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},x={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(y){var p=y.font,v=x.Unicode[p.postScriptName];v&&(p.metadata.Unicode={},p.metadata.Unicode.widths=v.widths,p.metadata.Unicode.kerning=v.kerning);var N=m.Unicode[p.postScriptName];N&&(p.metadata.Unicode.encoding=N,p.encoding=N.codePages[0])}])})(Ft.API),(function(r){var t=function(s){for(var n=s.length,o=new Uint8Array(n),l=0;l<n;l++)o[l]=s.charCodeAt(l);return o};r.API.events.push(["addFont",function(s){var n=void 0,o=s.font,l=s.instance;if(!o.isStandardFont){if(l===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(n=l.existsFileInVFS(o.postScriptName)===!1?l.loadFile(o.postScriptName):l.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(d,c){c=/^\x00\x01\x00\x00/.test(c)?t(c):t(Rm(c)),d.metadata=r.API.TTFFont.open(c),d.metadata.Unicode=d.metadata.Unicode||{encoding:{},kerning:{},widths:[]},d.metadata.glyIdsUsed=[0]})(o,n)}}])})(Ft),Ft.API.addSvgAsImage=function(r,t,s,n,o,l,d,c){if(isNaN(t)||isNaN(s))throw Xr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(o))throw Xr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=o;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},x=this;return(Wt.canvg?Promise.resolve(Wt.canvg):sg(()=>import("./index.es-BqkUSV0N.js"),__vite__mapDeps([0,1,2]))).catch(function(y){return Promise.reject(new Error("Could not load canvg: "+y))}).then(function(y){return y.default?y.default:y}).then(function(y){return y.fromString(h,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(y){return y.render(m)}).then(function(){x.addImage(u.toDataURL("image/jpeg",1),t,s,n,o,d,c)})},Ft.API.putTotalPages=function(r){var t,s=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(r,"g"),s=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),s=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var o=0;o<this.internal.pages[n].length;o++)this.internal.pages[n][o]=this.internal.pages[n][o].replace(t,s);return this},Ft.API.viewerPreferences=function(r,t){var s;r=r||{},t=t||!1;var n,o,l,d={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(d),u=[],h=0,m=0,x=0;function y(v,N){var B,g=!1;for(B=0;B<v.length;B+=1)v[B]===N&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(d)),this.internal.viewerpreferences.isSubscribed=!1),s=this.internal.viewerpreferences.configuration,r==="reset"||t===!0){var p=c.length;for(x=0;x<p;x+=1)s[c[x]].value=s[c[x]].defaultValue,s[c[x]].explicitSet=!1}if(Yr(r)==="object"){for(o in r)if(l=r[o],y(c,o)&&l!==void 0){if(s[o].type==="boolean"&&typeof l=="boolean")s[o].value=l;else if(s[o].type==="name"&&y(s[o].valueSet,l))s[o].value=l;else if(s[o].type==="integer"&&Number.isInteger(l))s[o].value=l;else if(s[o].type==="array"){for(h=0;h<l.length;h+=1)if(n=!0,l[h].length===1&&typeof l[h][0]=="number")u.push(String(l[h]-1));else if(l[h].length>1){for(m=0;m<l[h].length;m+=1)typeof l[h][m]!="number"&&(n=!1);n===!0&&u.push([l[h][0]-1,l[h][1]-1].join(" "))}s[o].value="["+u.join(" ")+"]"}else s[o].value=s[o].defaultValue;s[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var v,N=[];for(v in s)s[v].explicitSet===!0&&(s[v].type==="name"?N.push("/"+v+" /"+s[v].value):N.push("/"+v+" "+s[v].value));N.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+N.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=s,this},(function(r){var t=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',o=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),l=unescape(encodeURIComponent(n)),d=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),c=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),u=unescape(encodeURIComponent("</x:xmpmeta>")),h=l.length+d.length+c.length+o.length+u.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+h+" >>"),this.internal.write("stream"),this.internal.write(o+l+d+c+u),this.internal.write("endstream"),this.internal.write("endobj")},s=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(n,o){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:o||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",s),this.internal.events.subscribe("postPutResources",t)),this}})(Ft.API),(function(r){var t=r.API,s=t.pdfEscape16=function(l,d){for(var c,u=d.metadata.Unicode.widths,h=["","0","00","000","0000"],m=[""],x=0,y=l.length;x<y;++x){if(c=d.metadata.characterToGlyph(l.charCodeAt(x)),d.metadata.glyIdsUsed.push(c),d.metadata.toUnicode[c]=l.charCodeAt(x),u.indexOf(c)==-1&&(u.push(c),u.push([parseInt(d.metadata.widthOfGlyph(c),10)])),c=="0")return m.join("");c=c.toString(16),m.push(h[4-c.length],c)}return m.join("")},n=function(l){var d,c,u,h,m,x,y;for(m=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,u=[],x=0,y=(c=Object.keys(l).sort(function(p,v){return p-v})).length;x<y;x++)d=c[x],u.length>=100&&(m+=`
`+u.length+` beginbfchar
`+u.join(`
`)+`
endbfchar`,u=[]),l[d]!==void 0&&l[d]!==null&&typeof l[d].toString=="function"&&(h=("0000"+l[d].toString(16)).slice(-4),d=("0000"+(+d).toString(16)).slice(-4),u.push("<"+d+"><"+h+">"));return u.length&&(m+=`
`+u.length+` beginbfchar
`+u.join(`
`)+`
endbfchar
`),m+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(l){(function(d){var c=d.font,u=d.out,h=d.newObject,m=d.putStream;if(c.metadata instanceof r.API.TTFFont&&c.encoding==="Identity-H"){for(var x=c.metadata.Unicode.widths,y=c.metadata.subset.encode(c.metadata.glyIdsUsed,1),p="",v=0;v<y.length;v++)p+=String.fromCharCode(y[v]);var N=h();m({data:p,addLength1:!0,objectId:N}),u("endobj");var B=h();m({data:n(c.metadata.toUnicode),addLength1:!0,objectId:B}),u("endobj");var g=h();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Md(c.fontName)),u("/FontFile2 "+N+" 0 R"),u("/FontBBox "+r.API.PDFObject.convert(c.metadata.bbox)),u("/Flags "+c.metadata.flags),u("/StemV "+c.metadata.stemV),u("/ItalicAngle "+c.metadata.italicAngle),u("/Ascent "+c.metadata.ascender),u("/Descent "+c.metadata.decender),u("/CapHeight "+c.metadata.capHeight),u(">>"),u("endobj");var j=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+Md(c.fontName)),u("/FontDescriptor "+g+" 0 R"),u("/W "+r.API.PDFObject.convert(x)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+c.encoding+")"),u(">>"),u(">>"),u("endobj"),c.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+B+" 0 R"),u("/BaseFont /"+Md(c.fontName)),u("/Encoding /"+c.encoding),u("/DescendantFonts ["+j+" 0 R]"),u(">>"),u("endobj"),c.isAlreadyPutted=!0}})(l)}]),t.events.push(["putFont",function(l){(function(d){var c=d.font,u=d.out,h=d.newObject,m=d.putStream;if(c.metadata instanceof r.API.TTFFont&&c.encoding==="WinAnsiEncoding"){for(var x=c.metadata.rawData,y="",p=0;p<x.length;p++)y+=String.fromCharCode(x[p]);var v=h();m({data:y,addLength1:!0,objectId:v}),u("endobj");var N=h();m({data:n(c.metadata.toUnicode),addLength1:!0,objectId:N}),u("endobj");var B=h();u("<<"),u("/Descent "+c.metadata.decender),u("/CapHeight "+c.metadata.capHeight),u("/StemV "+c.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+v+" 0 R"),u("/Flags 96"),u("/FontBBox "+r.API.PDFObject.convert(c.metadata.bbox)),u("/FontName /"+Md(c.fontName)),u("/ItalicAngle "+c.metadata.italicAngle),u("/Ascent "+c.metadata.ascender),u(">>"),u("endobj"),c.objectNumber=h();for(var g=0;g<c.metadata.hmtx.widths.length;g++)c.metadata.hmtx.widths[g]=parseInt(c.metadata.hmtx.widths[g]*(1e3/c.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+N+" 0 R/BaseFont/"+Md(c.fontName)+"/FontDescriptor "+B+" 0 R/Encoding/"+c.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(c.metadata.hmtx.widths)+">>"),u("endobj"),c.isAlreadyPutted=!0}})(l)}]);var o=function(l){var d,c=l.text||"",u=l.x,h=l.y,m=l.options||{},x=l.mutex||{},y=x.pdfEscape,p=x.activeFontKey,v=x.fonts,N=p,B="",g=0,j="",_=v[N].encoding;if(v[N].encoding!=="Identity-H")return{text:c,x:u,y:h,options:m,mutex:x};for(j=c,N=p,Array.isArray(c)&&(j=c[0]),g=0;g<j.length;g+=1)v[N].metadata.hasOwnProperty("cmap")&&(d=v[N].metadata.cmap.unicode.codeMap[j[g].charCodeAt(0)]),d||j[g].charCodeAt(0)<256&&v[N].metadata.hasOwnProperty("Unicode")?B+=j[g]:B+="";var w="";return parseInt(N.slice(1))<14||_==="WinAnsiEncoding"?w=y(B,N).split("").map(function(L){return L.charCodeAt(0).toString(16)}).join(""):_==="Identity-H"&&(w=s(B,v[N])),x.isHex=!0,{text:w,x:u,y:h,options:m,mutex:x}};t.events.push(["postProcessText",function(l){var d=l.text||"",c=[],u={text:d,x:l.x,y:l.y,options:l.options,mutex:l.mutex};if(Array.isArray(d)){var h=0;for(h=0;h<d.length;h+=1)Array.isArray(d[h])&&d[h].length===3?c.push([o(Object.assign({},u,{text:d[h][0]})).text,d[h][1],d[h][2]]):c.push(o(Object.assign({},u,{text:d[h]})).text);l.text=c}else l.text=o(Object.assign({},u,{text:d})).text}])})(Ft),(function(r){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(s){return t.call(this),this.internal.vFS[s]!==void 0},r.addFileToVFS=function(s,n){return t.call(this),this.internal.vFS[s]=n,this},r.getFileFromVFS=function(s){return t.call(this),this.internal.vFS[s]!==void 0?this.internal.vFS[s]:null}})(Ft.API),(function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var o,l,d,c,u,h,m,x=t,y=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],v={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},N={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},B=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),j=!1,_=0;this.__bidiEngine__={};var w=function(Z){var U=Z.charCodeAt(),q=U>>8,F=N[q];return F!==void 0?x[256*F+(255&U)]:q===252||q===253?"AL":g.test(q)?"L":q===8?"R":"N"},L=function(Z){for(var U,q=0;q<Z.length;q++){if((U=w(Z.charAt(q)))==="L")return!1;if(U==="R")return!0}return!1},K=function(Z,U,q,F){var le,ae,se,fe,ye=U[F];switch(ye){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":j=!1;break;case"N":case"AN":break;case"EN":j&&(ye="AN");break;case"AL":j=!0,ye="R";break;case"WS":case"BN":ye="N";break;case"CS":F<1||F+1>=U.length||(le=q[F-1])!=="EN"&&le!=="AN"||(ae=U[F+1])!=="EN"&&ae!=="AN"?ye="N":j&&(ae="AN"),ye=ae===le?ae:"N";break;case"ES":ye=(le=F>0?q[F-1]:"B")==="EN"&&F+1<U.length&&U[F+1]==="EN"?"EN":"N";break;case"ET":if(F>0&&q[F-1]==="EN"){ye="EN";break}if(j){ye="N";break}for(se=F+1,fe=U.length;se<fe&&U[se]==="ET";)se++;ye=se<fe&&U[se]==="EN"?"EN":"N";break;case"NSM":if(d&&!c){for(fe=U.length,se=F+1;se<fe&&U[se]==="NSM";)se++;if(se<fe){var _e=Z[F],xe=_e>=1425&&_e<=2303||_e===64286;if(le=U[se],xe&&(le==="R"||le==="AL")){ye="R";break}}}ye=F<1||(le=U[F-1])==="B"?"N":q[F-1];break;case"B":j=!1,o=!0,ye=_;break;case"S":l=!0,ye="N"}return ye},M=function(Z,U,q){var F=Z.split("");return q&&V(F,q,{hiLevel:_}),F.reverse(),U&&U.reverse(),F.join("")},V=function(Z,U,q){var F,le,ae,se,fe,ye=-1,_e=Z.length,xe=0,D=[],$=_?p:y,X=[];for(j=!1,o=!1,l=!1,le=0;le<_e;le++)X[le]=w(Z[le]);for(ae=0;ae<_e;ae++){if(fe=xe,D[ae]=K(Z,X,D,ae),F=240&(xe=$[fe][v[D[ae]]]),xe&=15,U[ae]=se=$[xe][5],F>0)if(F===16){for(le=ye;le<ae;le++)U[le]=1;ye=-1}else ye=-1;if($[xe][6])ye===-1&&(ye=ae);else if(ye>-1){for(le=ye;le<ae;le++)U[le]=se;ye=-1}X[ae]==="B"&&(U[ae]=0),q.hiLevel|=se}l&&(function(te,J,O){for(var H=0;H<O;H++)if(te[H]==="S"){J[H]=_;for(var re=H-1;re>=0&&te[re]==="WS";re--)J[re]=_}})(X,U,_e)},T=function(Z,U,q,F,le){if(!(le.hiLevel<Z)){if(Z===1&&_===1&&!o)return U.reverse(),void(q&&q.reverse());for(var ae,se,fe,ye,_e=U.length,xe=0;xe<_e;){if(F[xe]>=Z){for(fe=xe+1;fe<_e&&F[fe]>=Z;)fe++;for(ye=xe,se=fe-1;ye<se;ye++,se--)ae=U[ye],U[ye]=U[se],U[se]=ae,q&&(ae=q[ye],q[ye]=q[se],q[se]=ae);xe=fe}xe++}}},ne=function(Z,U,q){var F=Z.split(""),le={hiLevel:_};return q||(q=[]),V(F,q,le),(function(ae,se,fe){if(fe.hiLevel!==0&&m)for(var ye,_e=0;_e<ae.length;_e++)se[_e]===1&&(ye=B.indexOf(ae[_e]))>=0&&(ae[_e]=B[ye+1])})(F,q,le),T(2,F,U,q,le),T(1,F,U,q,le),F.join("")};return this.__bidiEngine__.doBidiReorder=function(Z,U,q){if((function(le,ae){if(ae)for(var se=0;se<le.length;se++)ae[se]=se;c===void 0&&(c=L(le)),h===void 0&&(h=L(le))})(Z,U),d||!u||h)if(d&&u&&c^h)_=c?1:0,Z=M(Z,U,q);else if(!d&&u&&h)_=c?1:0,Z=ne(Z,U,q),Z=M(Z,U);else if(!d||c||u||h){if(d&&!u&&c^h)Z=M(Z,U),c?(_=0,Z=ne(Z,U,q)):(_=1,Z=ne(Z,U,q),Z=M(Z,U));else if(d&&c&&!u&&h)_=1,Z=ne(Z,U,q),Z=M(Z,U);else if(!d&&!u&&c^h){var F=m;c?(_=1,Z=ne(Z,U,q),_=0,m=!1,Z=ne(Z,U,q),m=F):(_=0,Z=ne(Z,U,q),Z=M(Z,U),_=1,m=!1,Z=ne(Z,U,q),m=F,Z=M(Z,U))}}else _=0,Z=ne(Z,U,q);else _=c?1:0,Z=ne(Z,U,q);return Z},this.__bidiEngine__.setOptions=function(Z){Z&&(d=Z.isInputVisual,u=Z.isOutputVisual,c=Z.isInputRtl,h=Z.isOutputRtl,m=Z.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],s=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var o=n.text;n.x,n.y;var l=n.options||{};n.mutex,l.lang;var d=[];if(l.isInputVisual=typeof l.isInputVisual!="boolean"||l.isInputVisual,s.setOptions(l),Object.prototype.toString.call(o)==="[object Array]"){var c=0;for(d=[],c=0;c<o.length;c+=1)Object.prototype.toString.call(o[c])==="[object Array]"?d.push([s.doBidiReorder(o[c][0]),o[c][1],o[c][2]]):d.push([s.doBidiReorder(o[c])]);n.text=d}else n.text=s.doBidiReorder(o);s.setOptions({isInputVisual:!0})}])})(Ft),Ft.API.TTFFont=(function(){function r(t){var s;if(this.rawData=t,s=this.contents=new SA(t),this.contents.pos=4,s.readString(4)==="ttcf")throw new Error("TTCF not supported.");s.pos=0,this.parse(),this.subset=new iE(this),this.registerTTF()}return r.open=function(t){return new r(t)},r.prototype.parse=function(){return this.directory=new GF(this.contents),this.head=new WF(this),this.name=new $F(this),this.cmap=new nj(this),this.toUnicode={},this.hhea=new XF(this),this.maxp=new eE(this),this.hmtx=new tE(this),this.post=new JF(this),this.os2=new YF(this),this.loca=new nE(this),this.glyf=new rE(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var t,s,n,o,l;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var d,c,u,h;for(h=[],d=0,c=(u=this.bbox).length;d<c;d++)t=u[d],h.push(Math.round(t*this.scaleFactor));return h}).call(this),this.stemV=0,this.post.exists?(n=255&(o=this.post.italic_angle),32768&(s=o>>16)&&(s=-(1+(65535^s))),this.italicAngle=+(s+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(l=this.familyClass)===1||l===2||l===3||l===4||l===5||l===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(t){var s;return((s=this.cmap.unicode)!=null?s.codeMap[t]:void 0)||0},r.prototype.widthOfGlyph=function(t){var s;return s=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*s},r.prototype.widthOfString=function(t,s,n){var o,l,d,c;for(d=0,l=0,c=(t=""+t).length;0<=c?l<c:l>c;l=0<=c?++l:--l)o=t.charCodeAt(l),d+=this.widthOfGlyph(this.characterToGlyph(o))+n*(1e3/s)||0;return d*(s/1e3)},r.prototype.lineHeight=function(t,s){var n;return s==null&&(s=!1),n=s?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},r})();var lo,SA=(function(){function r(t){this.data=t??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(t){return this.data[this.pos++]=t},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},r.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},r.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},r.prototype.readString=function(t){var s,n;for(n=[],s=0;0<=t?s<t:s>t;s=0<=t?++s:--s)n[s]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(t){var s,n,o;for(o=[],s=0,n=t.length;0<=n?s<n:s>n;s=0<=n?++s:--s)o.push(this.writeByte(t.charCodeAt(s)));return o},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(t){return this.writeInt16(t)},r.prototype.readLongLong=function(){var t,s,n,o,l,d,c,u;return t=this.readByte(),s=this.readByte(),n=this.readByte(),o=this.readByte(),l=this.readByte(),d=this.readByte(),c=this.readByte(),u=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^s)+1099511627776*(255^n)+4294967296*(255^o)+16777216*(255^l)+65536*(255^d)+256*(255^c)+(255^u)+1):72057594037927940*t+281474976710656*s+1099511627776*n+4294967296*o+16777216*l+65536*d+256*c+u},r.prototype.writeLongLong=function(t){var s,n;return s=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(s>>24&255),this.writeByte(s>>16&255),this.writeByte(s>>8&255),this.writeByte(255&s),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(t){return this.writeInt32(t)},r.prototype.read=function(t){var s,n;for(s=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)s.push(this.readByte());return s},r.prototype.write=function(t){var s,n,o,l;for(l=[],n=0,o=t.length;n<o;n++)s=t[n],l.push(this.writeByte(s));return l},r})(),GF=(function(){var r;function t(s){var n,o,l;for(this.scalarType=s.readInt(),this.tableCount=s.readShort(),this.searchRange=s.readShort(),this.entrySelector=s.readShort(),this.rangeShift=s.readShort(),this.tables={},o=0,l=this.tableCount;0<=l?o<l:o>l;o=0<=l?++o:--o)n={tag:s.readString(4),checksum:s.readInt(),offset:s.readInt(),length:s.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(s){var n,o,l,d,c,u,h,m,x,y,p,v,N;for(N in p=Object.keys(s).length,u=Math.log(2),x=16*Math.floor(Math.log(p)/u),d=Math.floor(x/u),m=16*p-x,(o=new SA).writeInt(this.scalarType),o.writeShort(p),o.writeShort(x),o.writeShort(d),o.writeShort(m),l=16*p,h=o.pos+l,c=null,v=[],s)for(y=s[N],o.writeString(N),o.writeInt(r(y)),o.writeInt(h),o.writeInt(y.length),v=v.concat(y),N==="head"&&(c=h),h+=y.length;h%4;)v.push(0),h++;return o.write(v),n=2981146554-r(o.data),o.pos=c+8,o.writeUInt32(n),o.data},r=function(s){var n,o,l,d;for(s=ij.call(s);s.length%4;)s.push(0);for(l=new SA(s),o=0,n=0,d=s.length;n<d;n=n+=4)o+=l.readUInt32();return 4294967295&o},t})(),VF={}.hasOwnProperty,Mo=function(r,t){for(var s in t)VF.call(t,s)&&(r[s]=t[s]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r};lo=(function(){function r(t){var s;this.file=t,s=this.file.directory.tables[this.tag],this.exists=!!s,s&&(this.offset=s.offset,this.length=s.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r})();var WF=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="head",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},r.prototype.encode=function(t){var s;return(s=new SA).writeInt(this.version),s.writeInt(this.revision),s.writeInt(this.checkSumAdjustment),s.writeInt(this.magicNumber),s.writeShort(this.flags),s.writeShort(this.unitsPerEm),s.writeLongLong(this.created),s.writeLongLong(this.modified),s.writeShort(this.xMin),s.writeShort(this.yMin),s.writeShort(this.xMax),s.writeShort(this.yMax),s.writeShort(this.macStyle),s.writeShort(this.lowestRecPPEM),s.writeShort(this.fontDirectionHint),s.writeShort(t),s.writeShort(this.glyphDataFormat),s.data},r})(),V2=(function(){function r(t,s){var n,o,l,d,c,u,h,m,x,y,p,v,N,B,g,j,_;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=s+t.readInt(),x=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=t.readByte();break;case 4:for(p=t.readUInt16(),y=p/2,t.pos+=6,l=(function(){var w,L;for(L=[],u=w=0;0<=y?w<y:w>y;u=0<=y?++w:--w)L.push(t.readUInt16());return L})(),t.pos+=2,N=(function(){var w,L;for(L=[],u=w=0;0<=y?w<y:w>y;u=0<=y?++w:--w)L.push(t.readUInt16());return L})(),h=(function(){var w,L;for(L=[],u=w=0;0<=y?w<y:w>y;u=0<=y?++w:--w)L.push(t.readUInt16());return L})(),m=(function(){var w,L;for(L=[],u=w=0;0<=y?w<y:w>y;u=0<=y?++w:--w)L.push(t.readUInt16());return L})(),o=(this.length-t.pos+this.offset)/2,c=(function(){var w,L;for(L=[],u=w=0;0<=o?w<o:w>o;u=0<=o?++w:--w)L.push(t.readUInt16());return L})(),u=g=0,_=l.length;g<_;u=++g)for(B=l[u],n=j=v=N[u];v<=B?j<=B:j>=B;n=v<=B?++j:--j)m[u]===0?d=n+h[u]:(d=c[m[u]/2+(n-v)-(y-u)]||0)!==0&&(d+=h[u]),this.codeMap[n]=65535&d}t.pos=x}return r.encode=function(t,s){var n,o,l,d,c,u,h,m,x,y,p,v,N,B,g,j,_,w,L,K,M,V,T,ne,Z,U,q,F,le,ae,se,fe,ye,_e,xe,D,$,X,te,J,O,H,re,Ae,oe,ce;switch(F=new SA,d=Object.keys(t).sort(function(Se,z){return Se-z}),s){case"macroman":for(N=0,B=(function(){var Se=[];for(v=0;v<256;++v)Se.push(0);return Se})(),j={0:0},l={},le=0,ye=d.length;le<ye;le++)j[re=t[o=d[le]]]==null&&(j[re]=++N),l[o]={old:t[o],new:j[t[o]]},B[o]=j[t[o]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(B),{charMap:l,subtable:F.data,maxGlyphID:N+1};case"unicode":for(U=[],x=[],_=0,j={},n={},g=h=null,ae=0,_e=d.length;ae<_e;ae++)j[L=t[o=d[ae]]]==null&&(j[L]=++_),n[o]={old:L,new:j[L]},c=j[L]-o,g!=null&&c===h||(g&&x.push(g),U.push(o),h=c),g=o;for(g&&x.push(g),x.push(65535),U.push(65535),ne=2*(T=U.length),V=2*Math.pow(Math.log(T)/Math.LN2,2),y=Math.log(V/2)/Math.LN2,M=2*T-V,u=[],K=[],p=[],v=se=0,xe=U.length;se<xe;v=++se){if(Z=U[v],m=x[v],Z===65535){u.push(0),K.push(0);break}if(Z-(q=n[Z].new)>=32768)for(u.push(0),K.push(2*(p.length+T-v)),o=fe=Z;Z<=m?fe<=m:fe>=m;o=Z<=m?++fe:--fe)p.push(n[o].new);else u.push(q-Z),K.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*T+2*p.length),F.writeUInt16(0),F.writeUInt16(ne),F.writeUInt16(V),F.writeUInt16(y),F.writeUInt16(M),O=0,D=x.length;O<D;O++)o=x[O],F.writeUInt16(o);for(F.writeUInt16(0),H=0,$=U.length;H<$;H++)o=U[H],F.writeUInt16(o);for(Ae=0,X=u.length;Ae<X;Ae++)c=u[Ae],F.writeUInt16(c);for(oe=0,te=K.length;oe<te;oe++)w=K[oe],F.writeUInt16(w);for(ce=0,J=p.length;ce<J;ce++)N=p[ce],F.writeUInt16(N);return{charMap:n,subtable:F.data,maxGlyphID:_+1}}},r})(),nj=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="cmap",r.prototype.parse=function(t){var s,n,o;for(t.pos=this.offset,this.version=t.readUInt16(),o=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=o?n<o:n>o;n=0<=o?++n:--n)s=new V2(t,this.offset),this.tables.push(s),s.isUnicode&&this.unicode==null&&(this.unicode=s);return!0},r.encode=function(t,s){var n,o;return s==null&&(s="macroman"),n=V2.encode(t,s),(o=new SA).writeUInt16(0),o.writeUInt16(1),n.table=o.data.concat(n.subtable),n},r})(),XF=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="hhea",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},r})(),YF=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="OS/2",r.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var s,n;for(n=[],s=0;s<10;++s)n.push(t.readByte());return n})(),this.charRange=(function(){var s,n;for(n=[],s=0;s<4;++s)n.push(t.readInt());return n})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var s,n;for(n=[],s=0;s<2;s=++s)n.push(t.readInt());return n})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},r})(),JF=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="post",r.prototype.parse=function(t){var s,n,o;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var l;for(n=t.readUInt16(),this.glyphNameIndex=[],l=0;0<=n?l<n:l>n;l=0<=n?++l:--l)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],o=[];t.pos<this.offset+this.length;)s=t.readByte(),o.push(this.names.push(t.readString(s)));return o;case 151552:return n=t.readUInt16(),this.offsets=t.read(n);case 262144:return this.map=(function(){var d,c,u;for(u=[],l=d=0,c=this.file.maxp.numGlyphs;0<=c?d<c:d>c;l=0<=c?++d:--d)u.push(t.readUInt32());return u}).call(this)}},r})(),ZF=function(r,t){this.raw=r,this.length=r.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},$F=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="name",r.prototype.parse=function(t){var s,n,o,l,d,c,u,h,m,x,y;for(t.pos=this.offset,t.readShort(),s=t.readShort(),c=t.readShort(),n=[],l=0;0<=s?l<s:l>s;l=0<=s?++l:--l)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+c+t.readShort()});for(u={},l=m=0,x=n.length;m<x;l=++m)o=n[l],t.pos=o.offset,h=t.readString(o.length),d=new ZF(h,o),u[y=o.nameID]==null&&(u[y]=[]),u[o.nameID].push(d);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},r})(),eE=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="maxp",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},r})(),tE=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="hmtx",r.prototype.parse=function(t){var s,n,o,l,d,c,u;for(t.pos=this.offset,this.metrics=[],s=0,c=this.file.hhea.numberOfMetrics;0<=c?s<c:s>c;s=0<=c?++s:--s)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var h,m;for(m=[],s=h=0;0<=o?h<o:h>o;s=0<=o?++h:--h)m.push(t.readInt16());return m})(),this.widths=(function(){var h,m,x,y;for(y=[],h=0,m=(x=this.metrics).length;h<m;h++)l=x[h],y.push(l.advance);return y}).call(this),n=this.widths[this.widths.length-1],u=[],s=d=0;0<=o?d<o:d>o;s=0<=o?++d:--d)u.push(this.widths.push(n));return u},r.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},r})(),ij=[].slice,rE=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(t){var s,n,o,l,d,c,u,h,m,x;return t in this.cache?this.cache[t]:(l=this.file.loca,s=this.file.contents,n=l.indexOf(t),(o=l.lengthOf(t))===0?this.cache[t]=null:(s.pos=this.offset+n,d=(c=new SA(s.read(o))).readShort(),h=c.readShort(),x=c.readShort(),u=c.readShort(),m=c.readShort(),this.cache[t]=d===-1?new aE(c,h,x,u,m):new sE(c,d,h,x,u,m),this.cache[t]))},r.prototype.encode=function(t,s,n){var o,l,d,c,u;for(d=[],l=[],c=0,u=s.length;c<u;c++)o=t[s[c]],l.push(d.length),o&&(d=d.concat(o.encode(n)));return l.push(d.length),{table:d,offsets:l}},r})(),sE=(function(){function r(t,s,n,o,l,d){this.raw=t,this.numberOfContours=s,this.xMin=n,this.yMin=o,this.xMax=l,this.yMax=d,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r})(),aE=(function(){function r(t,s,n,o,l){var d,c;for(this.raw=t,this.xMin=s,this.yMin=n,this.xMax=o,this.yMax=l,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],d=this.raw;c=d.readShort(),this.glyphOffsets.push(d.pos),this.glyphIDs.push(d.readUInt16()),32&c;)d.pos+=1&c?4:2,128&c?d.pos+=8:64&c?d.pos+=4:8&c&&(d.pos+=2)}return r.prototype.encode=function(){var t,s,n;for(s=new SA(ij.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)s.pos=this.glyphOffsets[t];return s.data},r})(),nE=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Mo(r,lo),r.prototype.tag="loca",r.prototype.parse=function(t){var s,n;return t.pos=this.offset,s=this.file.head.indexToLocFormat,this.offsets=s===0?(function(){var o,l;for(l=[],n=0,o=this.length;n<o;n+=2)l.push(2*t.readUInt16());return l}).call(this):(function(){var o,l;for(l=[],n=0,o=this.length;n<o;n+=4)l.push(t.readUInt32());return l}).call(this)},r.prototype.indexOf=function(t){return this.offsets[t]},r.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},r.prototype.encode=function(t,s){for(var n=new Uint32Array(this.offsets.length),o=0,l=0,d=0;d<n.length;++d)if(n[d]=o,l<s.length&&s[l]==d){++l,n[d]=o;var c=this.offsets[d],u=this.offsets[d+1]-c;u>0&&(o+=u)}for(var h=new Array(4*n.length),m=0;m<n.length;++m)h[4*m+3]=255&n[m],h[4*m+2]=(65280&n[m])>>8,h[4*m+1]=(16711680&n[m])>>16,h[4*m]=(4278190080&n[m])>>24;return h},r})(),iE=(function(){function r(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var t,s,n,o,l;for(s in o=this.font.cmap.tables[0].codeMap,t={},l=this.subset)n=l[s],t[s]=o[n];return t},r.prototype.glyphsFor=function(t){var s,n,o,l,d,c,u;for(o={},d=0,c=t.length;d<c;d++)o[l=t[d]]=this.font.glyf.glyphFor(l);for(l in s=[],o)(n=o[l])!=null&&n.compound&&s.push.apply(s,n.glyphIDs);if(s.length>0)for(l in u=this.glyphsFor(s))n=u[l],o[l]=n;return o},r.prototype.encode=function(t,s){var n,o,l,d,c,u,h,m,x,y,p,v,N,B,g;for(o in n=nj.encode(this.generateCmap(),"unicode"),d=this.glyphsFor(t),p={0:0},g=n.charMap)p[(u=g[o]).old]=u.new;for(v in y=n.maxGlyphID,d)v in p||(p[v]=y++);return m=(function(j){var _,w;for(_ in w={},j)w[j[_]]=_;return w})(p),x=Object.keys(m).sort(function(j,_){return j-_}),N=(function(){var j,_,w;for(w=[],j=0,_=x.length;j<_;j++)c=x[j],w.push(m[c]);return w})(),l=this.font.glyf.encode(d,N,p),h=this.font.loca.encode(l.offsets,N),B={cmap:this.font.cmap.raw(),glyf:l.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(s)},this.font.os2.exists&&(B["OS/2"]=this.font.os2.raw()),this.font.directory.encode(B)},r})();Ft.API.PDFObject=(function(){var r;function t(){}return r=function(s,n){return(Array(n+1).join("0")+s).slice(-n)},t.convert=function(s){var n,o,l,d;if(Array.isArray(s))return"["+(function(){var c,u,h;for(h=[],c=0,u=s.length;c<u;c++)n=s[c],h.push(t.convert(n));return h})().join(" ")+"]";if(typeof s=="string")return"/"+s;if(s?.isString)return"("+s+")";if(s instanceof Date)return"(D:"+r(s.getUTCFullYear(),4)+r(s.getUTCMonth(),2)+r(s.getUTCDate(),2)+r(s.getUTCHours(),2)+r(s.getUTCMinutes(),2)+r(s.getUTCSeconds(),2)+"Z)";if({}.toString.call(s)==="[object Object]"){for(o in l=["<<"],s)d=s[o],l.push("/"+o+" "+t.convert(d));return l.push(">>"),l.join(`
`)}return""+s},t})();var Xb=function(r,t){return Xb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,n){s.__proto__=n}||function(s,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(s[o]=n[o])},Xb(r,t)};function Ao(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Xb(r,t);function s(){this.constructor=r}r.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}var Yb=function(){return Yb=Object.assign||function(t){for(var s,n=1,o=arguments.length;n<o;n++){s=arguments[n];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(t[l]=s[l])}return t},Yb.apply(this,arguments)};function rn(r,t,s,n){function o(l){return l instanceof s?l:new s(function(d){d(l)})}return new(s||(s=Promise))(function(l,d){function c(m){try{h(n.next(m))}catch(x){d(x)}}function u(m){try{h(n.throw(m))}catch(x){d(x)}}function h(m){m.done?l(m.value):o(m.value).then(c,u)}h((n=n.apply(r,[])).next())})}function Ma(r,t){var s={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},n,o,l,d;return d={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function c(h){return function(m){return u([h,m])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(l=h[0]&2?o.return:h[0]?o.throw||((l=o.return)&&l.call(o),0):o.next)&&!(l=l.call(o,h[1])).done)return l;switch(o=0,l&&(h=[h[0]&2,l.value]),h[0]){case 0:case 1:l=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,o=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(l=s.trys,!(l=l.length>0&&l[l.length-1])&&(h[0]===6||h[0]===2)){s=0;continue}if(h[0]===3&&(!l||h[1]>l[0]&&h[1]<l[3])){s.label=h[1];break}if(h[0]===6&&s.label<l[1]){s.label=l[1],l=h;break}if(l&&s.label<l[2]){s.label=l[2],s.ops.push(h);break}l[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(m){h=[6,m],o=0}finally{n=l=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function em(r,t,s){if(arguments.length===2)for(var n=0,o=t.length,l;n<o;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return r.concat(l||t)}var Ql=(function(){function r(t,s,n,o){this.left=t,this.top=s,this.width=n,this.height=o}return r.prototype.add=function(t,s,n,o){return new r(this.left+t,this.top+s,this.width+n,this.height+o)},r.fromClientRect=function(t,s){return new r(s.left+t.windowBounds.left,s.top+t.windowBounds.top,s.width,s.height)},r.fromDOMRectList=function(t,s){var n=Array.from(s).find(function(o){return o.width!==0});return n?new r(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):r.EMPTY},r.EMPTY=new r(0,0,0,0),r})(),bp=function(r,t){return Ql.fromClientRect(r,t.getBoundingClientRect())},oE=function(r){var t=r.body,s=r.documentElement;if(!t||!s)throw new Error("Unable to get document size");var n=Math.max(Math.max(t.scrollWidth,s.scrollWidth),Math.max(t.offsetWidth,s.offsetWidth),Math.max(t.clientWidth,s.clientWidth)),o=Math.max(Math.max(t.scrollHeight,s.scrollHeight),Math.max(t.offsetHeight,s.offsetHeight),Math.max(t.clientHeight,s.clientHeight));return new Ql(0,0,n,o)},yp=function(r){for(var t=[],s=0,n=r.length;s<n;){var o=r.charCodeAt(s++);if(o>=55296&&o<=56319&&s<n){var l=r.charCodeAt(s++);(l&64512)===56320?t.push(((o&1023)<<10)+(l&1023)+65536):(t.push(o),s--)}else t.push(o)}return t},Os=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var s=r.length;if(!s)return"";for(var n=[],o=-1,l="";++o<s;){var d=r[o];d<=65535?n.push(d):(d-=65536,n.push((d>>10)+55296,d%1024+56320)),(o+1===s||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},W2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lE=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var tm=0;tm<W2.length;tm++)lE[W2.charCodeAt(tm)]=tm;var X2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var rm=0;rm<X2.length;rm++)fh[X2.charCodeAt(rm)]=rm;var AE=function(r){var t=r.length*.75,s=r.length,n,o=0,l,d,c,u;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);var h=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),m=Array.isArray(h)?h:new Uint8Array(h);for(n=0;n<s;n+=4)l=fh[r.charCodeAt(n)],d=fh[r.charCodeAt(n+1)],c=fh[r.charCodeAt(n+2)],u=fh[r.charCodeAt(n+3)],m[o++]=l<<2|d>>4,m[o++]=(d&15)<<4|c>>2,m[o++]=(c&3)<<6|u&63;return h},cE=function(r){for(var t=r.length,s=[],n=0;n<t;n+=2)s.push(r[n+1]<<8|r[n]);return s},dE=function(r){for(var t=r.length,s=[],n=0;n<t;n+=4)s.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return s},_c=5,Ty=11,jg=2,uE=Ty-_c,oj=65536>>_c,hE=1<<_c,Cg=hE-1,fE=1024>>_c,mE=oj+fE,pE=mE,xE=32,gE=pE+xE,bE=65536>>Ty,yE=1<<uE,wE=yE-1,Y2=function(r,t,s){return r.slice?r.slice(t,s):new Uint16Array(Array.prototype.slice.call(r,t,s))},vE=function(r,t,s){return r.slice?r.slice(t,s):new Uint32Array(Array.prototype.slice.call(r,t,s))},NE=function(r,t){var s=AE(r),n=Array.isArray(s)?dE(s):new Uint32Array(s),o=Array.isArray(s)?cE(s):new Uint16Array(s),l=24,d=Y2(o,l/2,n[4]/2),c=n[5]===2?Y2(o,(l+n[4])/2):vE(n,Math.ceil((l+n[4])/4));return new BE(n[0],n[1],n[2],n[3],d,c)},BE=(function(){function r(t,s,n,o,l,d){this.initialValue=t,this.errorValue=s,this.highStart=n,this.highValueIndex=o,this.index=l,this.data=d}return r.prototype.get=function(t){var s;if(t>=0){if(t<55296||t>56319&&t<=65535)return s=this.index[t>>_c],s=(s<<jg)+(t&Cg),this.data[s];if(t<=65535)return s=this.index[oj+(t-55296>>_c)],s=(s<<jg)+(t&Cg),this.data[s];if(t<this.highStart)return s=gE-bE+(t>>Ty),s=this.index[s],s+=t>>_c&wE,s=this.index[s],s=(s<<jg)+(t&Cg),this.data[s];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r})(),J2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jE=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var sm=0;sm<J2.length;sm++)jE[J2.charCodeAt(sm)]=sm;var CE="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Z2=50,SE=1,lj=2,Aj=3,_E=4,kE=5,$2=7,cj=8,e5=9,vA=10,Jb=11,t5=12,Zb=13,FE=14,mh=15,$b=16,am=17,nh=18,EE=19,r5=20,ey=21,ih=22,Sg=23,Ud=24,Vn=25,ph=26,xh=27,Qd=28,UE=29,xc=30,QE=31,nm=32,im=33,ty=34,ry=35,sy=36,Rh=37,ay=38,Km=39,zm=40,_g=41,dj=42,LE=43,TE=[9001,65288],uj="!",Ar="×",om="÷",ny=NE(CE),wl=[xc,sy],iy=[SE,lj,Aj,kE],hj=[vA,cj],s5=[xh,ph],IE=iy.concat(hj),a5=[ay,Km,zm,ty,ry],DE=[mh,Zb],RE=function(r,t){t===void 0&&(t="strict");var s=[],n=[],o=[];return r.forEach(function(l,d){var c=ny.get(l);if(c>Z2?(o.push(!0),c-=Z2):o.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(l)!==-1)return n.push(d),s.push($b);if(c===_E||c===Jb){if(d===0)return n.push(d),s.push(xc);var u=s[d-1];return IE.indexOf(u)===-1?(n.push(n[d-1]),s.push(u)):(n.push(d),s.push(xc))}if(n.push(d),c===QE)return s.push(t==="strict"?ey:Rh);if(c===dj||c===UE)return s.push(xc);if(c===LE)return l>=131072&&l<=196605||l>=196608&&l<=262141?s.push(Rh):s.push(xc);s.push(c)}),[n,s,o]},kg=function(r,t,s,n){var o=n[s];if(Array.isArray(r)?r.indexOf(o)!==-1:r===o)for(var l=s;l<=n.length;){l++;var d=n[l];if(d===t)return!0;if(d!==vA)break}if(o===vA)for(var l=s;l>0;){l--;var c=n[l];if(Array.isArray(r)?r.indexOf(c)!==-1:r===c)for(var u=s;u<=n.length;){u++;var d=n[u];if(d===t)return!0;if(d!==vA)break}if(c!==vA)break}return!1},n5=function(r,t){for(var s=r;s>=0;){var n=t[s];if(n===vA)s--;else return n}return 0},OE=function(r,t,s,n,o){if(s[n]===0)return Ar;var l=n-1;if(Array.isArray(o)&&o[l]===!0)return Ar;var d=l-1,c=l+1,u=t[l],h=d>=0?t[d]:0,m=t[c];if(u===lj&&m===Aj)return Ar;if(iy.indexOf(u)!==-1)return uj;if(iy.indexOf(m)!==-1||hj.indexOf(m)!==-1)return Ar;if(n5(l,t)===cj)return om;if(ny.get(r[l])===Jb||(u===nm||u===im)&&ny.get(r[c])===Jb||u===$2||m===$2||u===e5||[vA,Zb,mh].indexOf(u)===-1&&m===e5||[am,nh,EE,Ud,Qd].indexOf(m)!==-1||n5(l,t)===ih||kg(Sg,ih,l,t)||kg([am,nh],ey,l,t)||kg(t5,t5,l,t))return Ar;if(u===vA)return om;if(u===Sg||m===Sg)return Ar;if(m===$b||u===$b)return om;if([Zb,mh,ey].indexOf(m)!==-1||u===FE||h===sy&&DE.indexOf(u)!==-1||u===Qd&&m===sy||m===r5||wl.indexOf(m)!==-1&&u===Vn||wl.indexOf(u)!==-1&&m===Vn||u===xh&&[Rh,nm,im].indexOf(m)!==-1||[Rh,nm,im].indexOf(u)!==-1&&m===ph||wl.indexOf(u)!==-1&&s5.indexOf(m)!==-1||s5.indexOf(u)!==-1&&wl.indexOf(m)!==-1||[xh,ph].indexOf(u)!==-1&&(m===Vn||[ih,mh].indexOf(m)!==-1&&t[c+1]===Vn)||[ih,mh].indexOf(u)!==-1&&m===Vn||u===Vn&&[Vn,Qd,Ud].indexOf(m)!==-1)return Ar;if([Vn,Qd,Ud,am,nh].indexOf(m)!==-1)for(var x=l;x>=0;){var y=t[x];if(y===Vn)return Ar;if([Qd,Ud].indexOf(y)!==-1)x--;else break}if([xh,ph].indexOf(m)!==-1)for(var x=[am,nh].indexOf(u)!==-1?d:l;x>=0;){var y=t[x];if(y===Vn)return Ar;if([Qd,Ud].indexOf(y)!==-1)x--;else break}if(ay===u&&[ay,Km,ty,ry].indexOf(m)!==-1||[Km,ty].indexOf(u)!==-1&&[Km,zm].indexOf(m)!==-1||[zm,ry].indexOf(u)!==-1&&m===zm||a5.indexOf(u)!==-1&&[r5,ph].indexOf(m)!==-1||a5.indexOf(m)!==-1&&u===xh||wl.indexOf(u)!==-1&&wl.indexOf(m)!==-1||u===Ud&&wl.indexOf(m)!==-1||wl.concat(Vn).indexOf(u)!==-1&&m===ih&&TE.indexOf(r[c])===-1||wl.concat(Vn).indexOf(m)!==-1&&u===nh)return Ar;if(u===_g&&m===_g){for(var p=s[l],v=1;p>0&&(p--,t[p]===_g);)v++;if(v%2!==0)return Ar}return u===nm&&m===im?Ar:om},HE=function(r,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var s=RE(r,t.lineBreak),n=s[0],o=s[1],l=s[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(o=o.map(function(c){return[Vn,xc,dj].indexOf(c)!==-1?Rh:c}));var d=t.wordBreak==="keep-all"?l.map(function(c,u){return c&&r[u]>=19968&&r[u]<=40959}):void 0;return[n,o,d]},ME=(function(){function r(t,s,n,o){this.codePoints=t,this.required=s===uj,this.start=n,this.end=o}return r.prototype.slice=function(){return Os.apply(void 0,this.codePoints.slice(this.start,this.end))},r})(),PE=function(r,t){var s=yp(r),n=HE(s,t),o=n[0],l=n[1],d=n[2],c=s.length,u=0,h=0;return{next:function(){if(h>=c)return{done:!0,value:null};for(var m=Ar;h<c&&(m=OE(s,l,o,++h,d))===Ar;);if(m!==Ar||h===c){var x=new ME(s,m,u,h);return u=h,{value:x,done:!1}}return{done:!0,value:null}}}},KE=1,zE=2,zh=4,i5=8,tp=10,o5=47,jh=92,qE=9,GE=32,lm=34,oh=61,VE=35,WE=36,XE=37,Am=39,cm=40,lh=41,YE=95,jn=45,JE=33,ZE=60,$E=62,eU=64,tU=91,rU=93,sU=61,aU=123,dm=63,nU=125,l5=124,iU=126,oU=128,A5=65533,Fg=42,gc=43,lU=44,AU=58,cU=59,Oh=46,dU=0,uU=8,hU=11,fU=14,mU=31,pU=127,Uo=-1,fj=48,mj=97,pj=101,xU=102,gU=117,bU=122,xj=65,gj=69,bj=70,yU=85,wU=90,Pa=function(r){return r>=fj&&r<=57},vU=function(r){return r>=55296&&r<=57343},Ld=function(r){return Pa(r)||r>=xj&&r<=bj||r>=mj&&r<=xU},NU=function(r){return r>=mj&&r<=bU},BU=function(r){return r>=xj&&r<=wU},jU=function(r){return NU(r)||BU(r)},CU=function(r){return r>=oU},um=function(r){return r===tp||r===qE||r===GE},rp=function(r){return jU(r)||CU(r)||r===YE},c5=function(r){return rp(r)||Pa(r)||r===jn},SU=function(r){return r>=dU&&r<=uU||r===hU||r>=fU&&r<=mU||r===pU},yA=function(r,t){return r!==jh?!1:t!==tp},hm=function(r,t,s){return r===jn?rp(t)||yA(t,s):rp(r)?!0:!!(r===jh&&yA(r,t))},Eg=function(r,t,s){return r===gc||r===jn?Pa(t)?!0:t===Oh&&Pa(s):Pa(r===Oh?t:r)},_U=function(r){var t=0,s=1;(r[t]===gc||r[t]===jn)&&(r[t]===jn&&(s=-1),t++);for(var n=[];Pa(r[t]);)n.push(r[t++]);var o=n.length?parseInt(Os.apply(void 0,n),10):0;r[t]===Oh&&t++;for(var l=[];Pa(r[t]);)l.push(r[t++]);var d=l.length,c=d?parseInt(Os.apply(void 0,l),10):0;(r[t]===gj||r[t]===pj)&&t++;var u=1;(r[t]===gc||r[t]===jn)&&(r[t]===jn&&(u=-1),t++);for(var h=[];Pa(r[t]);)h.push(r[t++]);var m=h.length?parseInt(Os.apply(void 0,h),10):0;return s*(o+c*Math.pow(10,-d))*Math.pow(10,u*m)},kU={type:2},FU={type:3},EU={type:4},UU={type:13},QU={type:8},LU={type:21},TU={type:9},IU={type:10},DU={type:11},RU={type:12},OU={type:14},fm={type:23},HU={type:1},MU={type:25},PU={type:24},KU={type:26},zU={type:27},qU={type:28},GU={type:29},VU={type:31},oy={type:32},yj=(function(){function r(){this._value=[]}return r.prototype.write=function(t){this._value=this._value.concat(yp(t))},r.prototype.read=function(){for(var t=[],s=this.consumeToken();s!==oy;)t.push(s),s=this.consumeToken();return t},r.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case lm:return this.consumeStringToken(lm);case VE:var s=this.peekCodePoint(0),n=this.peekCodePoint(1),o=this.peekCodePoint(2);if(c5(s)||yA(n,o)){var l=hm(s,n,o)?zE:KE,d=this.consumeName();return{type:5,value:d,flags:l}}break;case WE:if(this.peekCodePoint(0)===oh)return this.consumeCodePoint(),UU;break;case Am:return this.consumeStringToken(Am);case cm:return kU;case lh:return FU;case Fg:if(this.peekCodePoint(0)===oh)return this.consumeCodePoint(),OU;break;case gc:if(Eg(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case lU:return EU;case jn:var c=t,u=this.peekCodePoint(0),h=this.peekCodePoint(1);if(Eg(c,u,h))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(hm(c,u,h))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(u===jn&&h===$E)return this.consumeCodePoint(),this.consumeCodePoint(),PU;break;case Oh:if(Eg(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case o5:if(this.peekCodePoint(0)===Fg)for(this.consumeCodePoint();;){var m=this.consumeCodePoint();if(m===Fg&&(m=this.consumeCodePoint(),m===o5))return this.consumeToken();if(m===Uo)return this.consumeToken()}break;case AU:return KU;case cU:return zU;case ZE:if(this.peekCodePoint(0)===JE&&this.peekCodePoint(1)===jn&&this.peekCodePoint(2)===jn)return this.consumeCodePoint(),this.consumeCodePoint(),MU;break;case eU:var x=this.peekCodePoint(0),y=this.peekCodePoint(1),p=this.peekCodePoint(2);if(hm(x,y,p)){var d=this.consumeName();return{type:7,value:d}}break;case tU:return qU;case jh:if(yA(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case rU:return GU;case sU:if(this.peekCodePoint(0)===oh)return this.consumeCodePoint(),QU;break;case aU:return DU;case nU:return RU;case gU:case yU:var v=this.peekCodePoint(0),N=this.peekCodePoint(1);return v===gc&&(Ld(N)||N===dm)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case l5:if(this.peekCodePoint(0)===oh)return this.consumeCodePoint(),TU;if(this.peekCodePoint(0)===l5)return this.consumeCodePoint(),LU;break;case iU:if(this.peekCodePoint(0)===oh)return this.consumeCodePoint(),IU;break;case Uo:return oy}return um(t)?(this.consumeWhiteSpace(),VU):Pa(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):rp(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:Os(t)}},r.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},r.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},r.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},r.prototype.consumeUnicodeRangeToken=function(){for(var t=[],s=this.consumeCodePoint();Ld(s)&&t.length<6;)t.push(s),s=this.consumeCodePoint();for(var n=!1;s===dm&&t.length<6;)t.push(s),s=this.consumeCodePoint(),n=!0;if(n){var o=parseInt(Os.apply(void 0,t.map(function(u){return u===dm?fj:u})),16),l=parseInt(Os.apply(void 0,t.map(function(u){return u===dm?bj:u})),16);return{type:30,start:o,end:l}}var d=parseInt(Os.apply(void 0,t),16);if(this.peekCodePoint(0)===jn&&Ld(this.peekCodePoint(1))){this.consumeCodePoint(),s=this.consumeCodePoint();for(var c=[];Ld(s)&&c.length<6;)c.push(s),s=this.consumeCodePoint();var l=parseInt(Os.apply(void 0,c),16);return{type:30,start:d,end:l}}else return{type:30,start:d,end:d}},r.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===cm?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===cm?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},r.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Uo)return{type:22,value:""};var s=this.peekCodePoint(0);if(s===Am||s===lm){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Uo||this.peekCodePoint(0)===lh)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),fm)}for(;;){var o=this.consumeCodePoint();if(o===Uo||o===lh)return{type:22,value:Os.apply(void 0,t)};if(um(o))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Uo||this.peekCodePoint(0)===lh?(this.consumeCodePoint(),{type:22,value:Os.apply(void 0,t)}):(this.consumeBadUrlRemnants(),fm);if(o===lm||o===Am||o===cm||SU(o))return this.consumeBadUrlRemnants(),fm;if(o===jh)if(yA(o,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),fm;else t.push(o)}},r.prototype.consumeWhiteSpace=function(){for(;um(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===lh||t===Uo)return;yA(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(t){for(var s=5e4,n="";t>0;){var o=Math.min(s,t);n+=Os.apply(void 0,this._value.splice(0,o)),t-=o}return this._value.shift(),n},r.prototype.consumeStringToken=function(t){var s="",n=0;do{var o=this._value[n];if(o===Uo||o===void 0||o===t)return s+=this.consumeStringSlice(n),{type:0,value:s};if(o===tp)return this._value.splice(0,n),HU;if(o===jh){var l=this._value[n+1];l!==Uo&&l!==void 0&&(l===tp?(s+=this.consumeStringSlice(n),n=-1,this._value.shift()):yA(o,l)&&(s+=this.consumeStringSlice(n),s+=Os(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var t=[],s=zh,n=this.peekCodePoint(0);for((n===gc||n===jn)&&t.push(this.consumeCodePoint());Pa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0);var o=this.peekCodePoint(1);if(n===Oh&&Pa(o))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),s=i5;Pa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0),o=this.peekCodePoint(1);var l=this.peekCodePoint(2);if((n===gj||n===pj)&&((o===gc||o===jn)&&Pa(l)||Pa(o)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),s=i5;Pa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[_U(t),s]},r.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),s=t[0],n=t[1],o=this.peekCodePoint(0),l=this.peekCodePoint(1),d=this.peekCodePoint(2);if(hm(o,l,d)){var c=this.consumeName();return{type:15,number:s,flags:n,unit:c}}return o===XE?(this.consumeCodePoint(),{type:16,number:s,flags:n}):{type:17,number:s,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(Ld(t)){for(var s=Os(t);Ld(this.peekCodePoint(0))&&s.length<6;)s+=Os(this.consumeCodePoint());um(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(s,16);return n===0||vU(n)||n>1114111?A5:n}return t===Uo?A5:t},r.prototype.consumeName=function(){for(var t="";;){var s=this.consumeCodePoint();if(c5(s))t+=Os(s);else if(yA(s,this.peekCodePoint(0)))t+=Os(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(s),t}},r})(),wj=(function(){function r(t){this._tokens=t}return r.create=function(t){var s=new yj;return s.write(t),new r(s.read())},r.parseValue=function(t){return r.create(t).parseComponentValue()},r.parseValues=function(t){return r.create(t).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var s=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return s;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var t=[];;){var s=this.consumeComponentValue();if(s.type===32)return t;t.push(s),t.push()}},r.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},r.prototype.consumeSimpleBlock=function(t){for(var s={type:t,values:[]},n=this.consumeToken();;){if(n.type===32||XU(n,t))return s;this.reconsumeToken(n),s.values.push(this.consumeComponentValue()),n=this.consumeToken()}},r.prototype.consumeFunction=function(t){for(var s={name:t.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return s;this.reconsumeToken(n),s.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?oy:t},r.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},r})(),qh=function(r){return r.type===15},mu=function(r){return r.type===17},qr=function(r){return r.type===20},WU=function(r){return r.type===0},ly=function(r,t){return qr(r)&&r.value===t},vj=function(r){return r.type!==31},iu=function(r){return r.type!==31&&r.type!==4},Po=function(r){var t=[],s=[];return r.forEach(function(n){if(n.type===4){if(s.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(s),s=[];return}n.type!==31&&s.push(n)}),s.length&&t.push(s),t},XU=function(r,t){return t===11&&r.type===12||t===28&&r.type===29?!0:t===2&&r.type===3},_A=function(r){return r.type===17||r.type===15},Js=function(r){return r.type===16||_A(r)},Nj=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},Qa={type:17,number:0,flags:zh},Iy={type:16,number:50,flags:zh},NA={type:16,number:100,flags:zh},gh=function(r,t,s){var n=r[0],o=r[1];return[$r(n,t),$r(typeof o<"u"?o:n,s)]},$r=function(r,t){if(r.type===16)return r.number/100*t;if(qh(r))switch(r.unit){case"rem":case"em":return 16*r.number;default:return r.number}return r.number},Bj="deg",jj="grad",Cj="rad",Sj="turn",wp={name:"angle",parse:function(r,t){if(t.type===15)switch(t.unit){case Bj:return Math.PI*t.number/180;case jj:return Math.PI/200*t.number;case Cj:return t.number;case Sj:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},_j=function(r){return r.type===15&&(r.unit===Bj||r.unit===jj||r.unit===Cj||r.unit===Sj)},kj=function(r){var t=r.filter(qr).map(function(s){return s.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Qa,Qa];case"to top":case"bottom":return Ni(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Qa,NA];case"to right":case"left":return Ni(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[NA,NA];case"to bottom":case"top":return Ni(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[NA,Qa];case"to left":case"right":return Ni(270)}return 0},Ni=function(r){return Math.PI*r/180},jA={name:"color",parse:function(r,t){if(t.type===18){var s=YU[t.name];if(typeof s>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return s(r,t.values)}if(t.type===5){if(t.value.length===3){var n=t.value.substring(0,1),o=t.value.substring(1,2),l=t.value.substring(2,3);return BA(parseInt(n+n,16),parseInt(o+o,16),parseInt(l+l,16),1)}if(t.value.length===4){var n=t.value.substring(0,1),o=t.value.substring(1,2),l=t.value.substring(2,3),d=t.value.substring(3,4);return BA(parseInt(n+n,16),parseInt(o+o,16),parseInt(l+l,16),parseInt(d+d,16)/255)}if(t.value.length===6){var n=t.value.substring(0,2),o=t.value.substring(2,4),l=t.value.substring(4,6);return BA(parseInt(n,16),parseInt(o,16),parseInt(l,16),1)}if(t.value.length===8){var n=t.value.substring(0,2),o=t.value.substring(2,4),l=t.value.substring(4,6),d=t.value.substring(6,8);return BA(parseInt(n,16),parseInt(o,16),parseInt(l,16),parseInt(d,16)/255)}}if(t.type===20){var c=El[t.value.toUpperCase()];if(typeof c<"u")return c}return El.TRANSPARENT}},CA=function(r){return(255&r)===0},xa=function(r){var t=255&r,s=255&r>>8,n=255&r>>16,o=255&r>>24;return t<255?"rgba("+o+","+n+","+s+","+t/255+")":"rgb("+o+","+n+","+s+")"},BA=function(r,t,s,n){return(r<<24|t<<16|s<<8|Math.round(n*255)<<0)>>>0},d5=function(r,t){if(r.type===17)return r.number;if(r.type===16){var s=t===3?1:255;return t===3?r.number/100*s:Math.round(r.number/100*s)}return 0},u5=function(r,t){var s=t.filter(iu);if(s.length===3){var n=s.map(d5),o=n[0],l=n[1],d=n[2];return BA(o,l,d,1)}if(s.length===4){var c=s.map(d5),o=c[0],l=c[1],d=c[2],u=c[3];return BA(o,l,d,u)}return 0};function Ug(r,t,s){return s<0&&(s+=1),s>=1&&(s-=1),s<1/6?(t-r)*s*6+r:s<1/2?t:s<2/3?(t-r)*6*(2/3-s)+r:r}var h5=function(r,t){var s=t.filter(iu),n=s[0],o=s[1],l=s[2],d=s[3],c=(n.type===17?Ni(n.number):wp.parse(r,n))/(Math.PI*2),u=Js(o)?o.number/100:0,h=Js(l)?l.number/100:0,m=typeof d<"u"&&Js(d)?$r(d,1):1;if(u===0)return BA(h*255,h*255,h*255,1);var x=h<=.5?h*(u+1):h+u-h*u,y=h*2-x,p=Ug(y,x,c+1/3),v=Ug(y,x,c),N=Ug(y,x,c-1/3);return BA(p*255,v*255,N*255,m)},YU={hsl:h5,hsla:h5,rgb:u5,rgba:u5},Ch=function(r,t){return jA.parse(r,wj.create(t).parseComponentValue())},El={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},JU={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,t){return t.map(function(s){if(qr(s))switch(s.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ZU={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},vp=function(r,t){var s=jA.parse(r,t[0]),n=t[1];return n&&Js(n)?{color:s,stop:n}:{color:s,stop:null}},f5=function(r,t){var s=r[0],n=r[r.length-1];s.stop===null&&(s.stop=Qa),n.stop===null&&(n.stop=NA);for(var o=[],l=0,d=0;d<r.length;d++){var c=r[d].stop;if(c!==null){var u=$r(c,t);u>l?o.push(u):o.push(l),l=u}else o.push(null)}for(var h=null,d=0;d<o.length;d++){var m=o[d];if(m===null)h===null&&(h=d);else if(h!==null){for(var x=d-h,y=o[h-1],p=(m-y)/(x+1),v=1;v<=x;v++)o[h+v-1]=p*v;h=null}}return r.map(function(N,B){var g=N.color;return{color:g,stop:Math.max(Math.min(1,o[B]/t),0)}})},$U=function(r,t,s){var n=t/2,o=s/2,l=$r(r[0],t)-n,d=o-$r(r[1],s);return(Math.atan2(d,l)+Math.PI*2)%(Math.PI*2)},e8=function(r,t,s){var n=typeof r=="number"?r:$U(r,t,s),o=Math.abs(t*Math.sin(n))+Math.abs(s*Math.cos(n)),l=t/2,d=s/2,c=o/2,u=Math.sin(n-Math.PI/2)*c,h=Math.cos(n-Math.PI/2)*c;return[o,l-h,l+h,d-u,d+u]},ro=function(r,t){return Math.sqrt(r*r+t*t)},m5=function(r,t,s,n,o){var l=[[0,0],[0,t],[r,0],[r,t]];return l.reduce(function(d,c){var u=c[0],h=c[1],m=ro(s-u,n-h);return(o?m<d.optimumDistance:m>d.optimumDistance)?{optimumCorner:c,optimumDistance:m}:d},{optimumDistance:o?1/0:-1/0,optimumCorner:null}).optimumCorner},t8=function(r,t,s,n,o){var l=0,d=0;switch(r.size){case 0:r.shape===0?l=d=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(s),Math.abs(s-o)):r.shape===1&&(l=Math.min(Math.abs(t),Math.abs(t-n)),d=Math.min(Math.abs(s),Math.abs(s-o)));break;case 2:if(r.shape===0)l=d=Math.min(ro(t,s),ro(t,s-o),ro(t-n,s),ro(t-n,s-o));else if(r.shape===1){var c=Math.min(Math.abs(s),Math.abs(s-o))/Math.min(Math.abs(t),Math.abs(t-n)),u=m5(n,o,t,s,!0),h=u[0],m=u[1];l=ro(h-t,(m-s)/c),d=c*l}break;case 1:r.shape===0?l=d=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(s),Math.abs(s-o)):r.shape===1&&(l=Math.max(Math.abs(t),Math.abs(t-n)),d=Math.max(Math.abs(s),Math.abs(s-o)));break;case 3:if(r.shape===0)l=d=Math.max(ro(t,s),ro(t,s-o),ro(t-n,s),ro(t-n,s-o));else if(r.shape===1){var c=Math.max(Math.abs(s),Math.abs(s-o))/Math.max(Math.abs(t),Math.abs(t-n)),x=m5(n,o,t,s,!1),h=x[0],m=x[1];l=ro(h-t,(m-s)/c),d=c*l}break}return Array.isArray(r.size)&&(l=$r(r.size[0],n),d=r.size.length===2?$r(r.size[1],o):l),[l,d]},r8=function(r,t){var s=Ni(180),n=[];return Po(t).forEach(function(o,l){if(l===0){var d=o[0];if(d.type===20&&d.value==="to"){s=kj(o);return}else if(_j(d)){s=wp.parse(r,d);return}}var c=vp(r,o);n.push(c)}),{angle:s,stops:n,type:1}},mm=function(r,t){var s=Ni(180),n=[];return Po(t).forEach(function(o,l){if(l===0){var d=o[0];if(d.type===20&&["top","left","right","bottom"].indexOf(d.value)!==-1){s=kj(o);return}else if(_j(d)){s=(wp.parse(r,d)+Ni(270))%Ni(360);return}}var c=vp(r,o);n.push(c)}),{angle:s,stops:n,type:1}},s8=function(r,t){var s=Ni(180),n=[],o=1,l=0,d=3,c=[];return Po(t).forEach(function(u,h){var m=u[0];if(h===0){if(qr(m)&&m.value==="linear"){o=1;return}else if(qr(m)&&m.value==="radial"){o=2;return}}if(m.type===18){if(m.name==="from"){var x=jA.parse(r,m.values[0]);n.push({stop:Qa,color:x})}else if(m.name==="to"){var x=jA.parse(r,m.values[0]);n.push({stop:NA,color:x})}else if(m.name==="color-stop"){var y=m.values.filter(iu);if(y.length===2){var x=jA.parse(r,y[1]),p=y[0];mu(p)&&n.push({stop:{type:16,number:p.number*100,flags:p.flags},color:x})}}}}),o===1?{angle:(s+Ni(180))%Ni(360),stops:n,type:o}:{size:d,shape:l,stops:n,position:c,type:o}},Fj="closest-side",Ej="farthest-side",Uj="closest-corner",Qj="farthest-corner",Lj="circle",Tj="ellipse",Ij="cover",Dj="contain",a8=function(r,t){var s=0,n=3,o=[],l=[];return Po(t).forEach(function(d,c){var u=!0;if(c===0){var h=!1;u=d.reduce(function(x,y){if(h)if(qr(y))switch(y.value){case"center":return l.push(Iy),x;case"top":case"left":return l.push(Qa),x;case"right":case"bottom":return l.push(NA),x}else(Js(y)||_A(y))&&l.push(y);else if(qr(y))switch(y.value){case Lj:return s=0,!1;case Tj:return s=1,!1;case"at":return h=!0,!1;case Fj:return n=0,!1;case Ij:case Ej:return n=1,!1;case Dj:case Uj:return n=2,!1;case Qj:return n=3,!1}else if(_A(y)||Js(y))return Array.isArray(n)||(n=[]),n.push(y),!1;return x},u)}if(u){var m=vp(r,d);o.push(m)}}),{size:n,shape:s,stops:o,position:l,type:2}},pm=function(r,t){var s=0,n=3,o=[],l=[];return Po(t).forEach(function(d,c){var u=!0;if(c===0?u=d.reduce(function(m,x){if(qr(x))switch(x.value){case"center":return l.push(Iy),!1;case"top":case"left":return l.push(Qa),!1;case"right":case"bottom":return l.push(NA),!1}else if(Js(x)||_A(x))return l.push(x),!1;return m},u):c===1&&(u=d.reduce(function(m,x){if(qr(x))switch(x.value){case Lj:return s=0,!1;case Tj:return s=1,!1;case Dj:case Fj:return n=0,!1;case Ej:return n=1,!1;case Uj:return n=2,!1;case Ij:case Qj:return n=3,!1}else if(_A(x)||Js(x))return Array.isArray(n)||(n=[]),n.push(x),!1;return m},u)),u){var h=vp(r,d);o.push(h)}}),{size:n,shape:s,stops:o,position:l,type:2}},n8=function(r){return r.type===1},i8=function(r){return r.type===2},Dy={name:"image",parse:function(r,t){if(t.type===22){var s={url:t.value,type:0};return r.cache.addImage(t.value),s}if(t.type===18){var n=Rj[t.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(r,t.values)}throw new Error("Unsupported image type "+t.type)}};function o8(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!Rj[r.name])}var Rj={"linear-gradient":r8,"-moz-linear-gradient":mm,"-ms-linear-gradient":mm,"-o-linear-gradient":mm,"-webkit-linear-gradient":mm,"radial-gradient":a8,"-moz-radial-gradient":pm,"-ms-radial-gradient":pm,"-o-radial-gradient":pm,"-webkit-radial-gradient":pm,"-webkit-gradient":s8},l8={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,t){if(t.length===0)return[];var s=t[0];return s.type===20&&s.value==="none"?[]:t.filter(function(n){return iu(n)&&o8(n)}).map(function(n){return Dy.parse(r,n)})}},A8={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,t){return t.map(function(s){if(qr(s))switch(s.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},c8={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,t){return Po(t).map(function(s){return s.filter(Js)}).map(Nj)}},d8={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,t){return Po(t).map(function(s){return s.filter(qr).map(function(n){return n.value}).join(" ")}).map(u8)}},u8=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},eu;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(eu||(eu={}));var h8={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,t){return Po(t).map(function(s){return s.filter(f8)})}},f8=function(r){return qr(r)||Js(r)},Np=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},m8=Np("top"),p8=Np("right"),x8=Np("bottom"),g8=Np("left"),Bp=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(t,s){return Nj(s.filter(Js))}}},b8=Bp("top-left"),y8=Bp("top-right"),w8=Bp("bottom-right"),v8=Bp("bottom-left"),jp=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,s){switch(s){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},N8=jp("top"),B8=jp("right"),j8=jp("bottom"),C8=jp("left"),Cp=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,s){return qh(s)?s.number:0}}},S8=Cp("top"),_8=Cp("right"),k8=Cp("bottom"),F8=Cp("left"),E8={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},U8={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,t){return t==="rtl"?1:0}},Q8={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,t){return t.filter(qr).reduce(function(s,n){return s|L8(n.value)},0)}},L8=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},T8={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},I8={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},sp;(function(r){r.NORMAL="normal",r.STRICT="strict"})(sp||(sp={}));var D8={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,t){return t==="strict"?sp.STRICT:sp.NORMAL}},R8={name:"line-height",initialValue:"normal",prefix:!1,type:4},p5=function(r,t){return qr(r)&&r.value==="normal"?1.2*t:r.type===17?t*r.number:Js(r)?$r(r,t):t},O8={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,t){return t.type===20&&t.value==="none"?null:Dy.parse(r,t)}},H8={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,t){return t==="inside"?0:1}},Ay={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Sp=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},M8=Sp("top"),P8=Sp("right"),K8=Sp("bottom"),z8=Sp("left"),q8={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,t){return t.filter(qr).map(function(s){switch(s.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},G8={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,t){return t==="break-word"?"break-word":"normal"}},_p=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},V8=_p("top"),W8=_p("right"),X8=_p("bottom"),Y8=_p("left"),J8={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Z8={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},$8={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,t){return t.length===1&&ly(t[0],"none")?[]:Po(t).map(function(s){for(var n={color:El.TRANSPARENT,offsetX:Qa,offsetY:Qa,blur:Qa},o=0,l=0;l<s.length;l++){var d=s[l];_A(d)?(o===0?n.offsetX=d:o===1?n.offsetY=d:n.blur=d,o++):n.color=jA.parse(r,d)}return n})}},eQ={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(r,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},tQ={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(r,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var s=aQ[t.name];if(typeof s>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return s(t.values)}return null}},rQ=function(r){var t=r.filter(function(s){return s.type===17}).map(function(s){return s.number});return t.length===6?t:null},sQ=function(r){var t=r.filter(function(u){return u.type===17}).map(function(u){return u.number}),s=t[0],n=t[1];t[2],t[3];var o=t[4],l=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var d=t[12],c=t[13];return t[14],t[15],t.length===16?[s,n,o,l,d,c]:null},aQ={matrix:rQ,matrix3d:sQ},x5={type:16,number:50,flags:zh},nQ=[x5,x5],iQ={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,t){var s=t.filter(Js);return s.length!==2?nQ:[s[0],s[1]]}},oQ={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(r,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Sh;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(Sh||(Sh={}));var lQ={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,t){switch(t){case"break-all":return Sh.BREAK_ALL;case"keep-all":return Sh.KEEP_ALL;default:return Sh.NORMAL}}},AQ={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,t){if(t.type===20)return{auto:!0,order:0};if(mu(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Oj={name:"time",parse:function(r,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},cQ={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,t){return mu(t)?t.number:1}},dQ={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},uQ={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,t){return t.filter(qr).map(function(s){switch(s.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(s){return s!==0})}},hQ={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(r,t){var s=[],n=[];return t.forEach(function(o){switch(o.type){case 20:case 0:s.push(o.value);break;case 17:s.push(o.number.toString());break;case 4:n.push(s.join(" ")),s.length=0;break}}),s.length&&n.push(s.join(" ")),n.map(function(o){return o.indexOf(" ")===-1?o:"'"+o+"'"})}},fQ={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},mQ={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,t){return mu(t)?t.number:qr(t)&&t.value==="bold"?700:400}},pQ={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,t){return t.filter(qr).map(function(s){return s.value})}},xQ={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(r,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},la=function(r,t){return(r&t)!==0},gQ={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(r,t){if(t.length===0)return[];var s=t[0];return s.type===20&&s.value==="none"?[]:t}},bQ={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(r,t){if(t.length===0)return null;var s=t[0];if(s.type===20&&s.value==="none")return null;for(var n=[],o=t.filter(vj),l=0;l<o.length;l++){var d=o[l],c=o[l+1];if(d.type===20){var u=c&&mu(c)?c.number:1;n.push({counter:d.value,increment:u})}}return n}},yQ={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,t){if(t.length===0)return[];for(var s=[],n=t.filter(vj),o=0;o<n.length;o++){var l=n[o],d=n[o+1];if(qr(l)&&l.value!=="none"){var c=d&&mu(d)?d.number:0;s.push({counter:l.value,reset:c})}}return s}},wQ={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,t){return t.filter(qh).map(function(s){return Oj.parse(r,s)})}},vQ={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(r,t){if(t.length===0)return null;var s=t[0];if(s.type===20&&s.value==="none")return null;var n=[],o=t.filter(WU);if(o.length%2!==0)return null;for(var l=0;l<o.length;l+=2){var d=o[l].value,c=o[l+1].value;n.push({open:d,close:c})}return n}},g5=function(r,t,s){if(!r)return"";var n=r[Math.min(t,r.length-1)];return n?s?n.open:n.close:""},NQ={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,t){return t.length===1&&ly(t[0],"none")?[]:Po(t).map(function(s){for(var n={color:255,offsetX:Qa,offsetY:Qa,blur:Qa,spread:Qa,inset:!1},o=0,l=0;l<s.length;l++){var d=s[l];ly(d,"inset")?n.inset=!0:_A(d)?(o===0?n.offsetX=d:o===1?n.offsetY=d:o===2?n.blur=d:n.spread=d,o++):n.color=jA.parse(r,d)}return n})}},BQ={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,t){var s=[0,1,2],n=[];return t.filter(qr).forEach(function(o){switch(o.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2);break}}),s.forEach(function(o){n.indexOf(o)===-1&&n.push(o)}),n}},jQ={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},CQ={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,t){return qh(t)?t.number:0}},SQ=(function(){function r(t,s){var n,o;this.animationDuration=gt(t,wQ,s.animationDuration),this.backgroundClip=gt(t,JU,s.backgroundClip),this.backgroundColor=gt(t,ZU,s.backgroundColor),this.backgroundImage=gt(t,l8,s.backgroundImage),this.backgroundOrigin=gt(t,A8,s.backgroundOrigin),this.backgroundPosition=gt(t,c8,s.backgroundPosition),this.backgroundRepeat=gt(t,d8,s.backgroundRepeat),this.backgroundSize=gt(t,h8,s.backgroundSize),this.borderTopColor=gt(t,m8,s.borderTopColor),this.borderRightColor=gt(t,p8,s.borderRightColor),this.borderBottomColor=gt(t,x8,s.borderBottomColor),this.borderLeftColor=gt(t,g8,s.borderLeftColor),this.borderTopLeftRadius=gt(t,b8,s.borderTopLeftRadius),this.borderTopRightRadius=gt(t,y8,s.borderTopRightRadius),this.borderBottomRightRadius=gt(t,w8,s.borderBottomRightRadius),this.borderBottomLeftRadius=gt(t,v8,s.borderBottomLeftRadius),this.borderTopStyle=gt(t,N8,s.borderTopStyle),this.borderRightStyle=gt(t,B8,s.borderRightStyle),this.borderBottomStyle=gt(t,j8,s.borderBottomStyle),this.borderLeftStyle=gt(t,C8,s.borderLeftStyle),this.borderTopWidth=gt(t,S8,s.borderTopWidth),this.borderRightWidth=gt(t,_8,s.borderRightWidth),this.borderBottomWidth=gt(t,k8,s.borderBottomWidth),this.borderLeftWidth=gt(t,F8,s.borderLeftWidth),this.boxShadow=gt(t,NQ,s.boxShadow),this.color=gt(t,E8,s.color),this.direction=gt(t,U8,s.direction),this.display=gt(t,Q8,s.display),this.float=gt(t,T8,s.cssFloat),this.fontFamily=gt(t,hQ,s.fontFamily),this.fontSize=gt(t,fQ,s.fontSize),this.fontStyle=gt(t,xQ,s.fontStyle),this.fontVariant=gt(t,pQ,s.fontVariant),this.fontWeight=gt(t,mQ,s.fontWeight),this.letterSpacing=gt(t,I8,s.letterSpacing),this.lineBreak=gt(t,D8,s.lineBreak),this.lineHeight=gt(t,R8,s.lineHeight),this.listStyleImage=gt(t,O8,s.listStyleImage),this.listStylePosition=gt(t,H8,s.listStylePosition),this.listStyleType=gt(t,Ay,s.listStyleType),this.marginTop=gt(t,M8,s.marginTop),this.marginRight=gt(t,P8,s.marginRight),this.marginBottom=gt(t,K8,s.marginBottom),this.marginLeft=gt(t,z8,s.marginLeft),this.opacity=gt(t,cQ,s.opacity);var l=gt(t,q8,s.overflow);this.overflowX=l[0],this.overflowY=l[l.length>1?1:0],this.overflowWrap=gt(t,G8,s.overflowWrap),this.paddingTop=gt(t,V8,s.paddingTop),this.paddingRight=gt(t,W8,s.paddingRight),this.paddingBottom=gt(t,X8,s.paddingBottom),this.paddingLeft=gt(t,Y8,s.paddingLeft),this.paintOrder=gt(t,BQ,s.paintOrder),this.position=gt(t,Z8,s.position),this.textAlign=gt(t,J8,s.textAlign),this.textDecorationColor=gt(t,dQ,(n=s.textDecorationColor)!==null&&n!==void 0?n:s.color),this.textDecorationLine=gt(t,uQ,(o=s.textDecorationLine)!==null&&o!==void 0?o:s.textDecoration),this.textShadow=gt(t,$8,s.textShadow),this.textTransform=gt(t,eQ,s.textTransform),this.transform=gt(t,tQ,s.transform),this.transformOrigin=gt(t,iQ,s.transformOrigin),this.visibility=gt(t,oQ,s.visibility),this.webkitTextStrokeColor=gt(t,jQ,s.webkitTextStrokeColor),this.webkitTextStrokeWidth=gt(t,CQ,s.webkitTextStrokeWidth),this.wordBreak=gt(t,lQ,s.wordBreak),this.zIndex=gt(t,AQ,s.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return CA(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return la(this.display,4)||la(this.display,33554432)||la(this.display,268435456)||la(this.display,536870912)||la(this.display,67108864)||la(this.display,134217728)},r})(),_Q=(function(){function r(t,s){this.content=gt(t,gQ,s.content),this.quotes=gt(t,vQ,s.quotes)}return r})(),b5=(function(){function r(t,s){this.counterIncrement=gt(t,bQ,s.counterIncrement),this.counterReset=gt(t,yQ,s.counterReset)}return r})(),gt=function(r,t,s){var n=new yj,o=s!==null&&typeof s<"u"?s.toString():t.initialValue;n.write(o);var l=new wj(n.read());switch(t.type){case 2:var d=l.parseComponentValue();return t.parse(r,qr(d)?d.value:t.initialValue);case 0:return t.parse(r,l.parseComponentValue());case 1:return t.parse(r,l.parseComponentValues());case 4:return l.parseComponentValue();case 3:switch(t.format){case"angle":return wp.parse(r,l.parseComponentValue());case"color":return jA.parse(r,l.parseComponentValue());case"image":return Dy.parse(r,l.parseComponentValue());case"length":var c=l.parseComponentValue();return _A(c)?c:Qa;case"length-percentage":var u=l.parseComponentValue();return Js(u)?u:Qa;case"time":return Oj.parse(r,l.parseComponentValue())}break}},kQ="data-html2canvas-debug",FQ=function(r){var t=r.getAttribute(kQ);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},cy=function(r,t){var s=FQ(r);return s===1||t===s},Ko=(function(){function r(t,s){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,cy(s,3))debugger;this.styles=new SQ(t,window.getComputedStyle(s,null)),hy(s)&&(this.styles.animationDuration.some(function(n){return n>0})&&(s.style.animationDuration="0s"),this.styles.transform!==null&&(s.style.transform="none")),this.bounds=bp(this.context,s),cy(s,4)&&(this.flags|=16)}return r})(),EQ="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",y5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var xm=0;xm<y5.length;xm++)bh[y5.charCodeAt(xm)]=xm;var UQ=function(r){var t=r.length*.75,s=r.length,n,o=0,l,d,c,u;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);var h=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),m=Array.isArray(h)?h:new Uint8Array(h);for(n=0;n<s;n+=4)l=bh[r.charCodeAt(n)],d=bh[r.charCodeAt(n+1)],c=bh[r.charCodeAt(n+2)],u=bh[r.charCodeAt(n+3)],m[o++]=l<<2|d>>4,m[o++]=(d&15)<<4|c>>2,m[o++]=(c&3)<<6|u&63;return h},QQ=function(r){for(var t=r.length,s=[],n=0;n<t;n+=2)s.push(r[n+1]<<8|r[n]);return s},LQ=function(r){for(var t=r.length,s=[],n=0;n<t;n+=4)s.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return s},kc=5,Ry=11,Qg=2,TQ=Ry-kc,Hj=65536>>kc,IQ=1<<kc,Lg=IQ-1,DQ=1024>>kc,RQ=Hj+DQ,OQ=RQ,HQ=32,MQ=OQ+HQ,PQ=65536>>Ry,KQ=1<<TQ,zQ=KQ-1,w5=function(r,t,s){return r.slice?r.slice(t,s):new Uint16Array(Array.prototype.slice.call(r,t,s))},qQ=function(r,t,s){return r.slice?r.slice(t,s):new Uint32Array(Array.prototype.slice.call(r,t,s))},GQ=function(r,t){var s=UQ(r),n=Array.isArray(s)?LQ(s):new Uint32Array(s),o=Array.isArray(s)?QQ(s):new Uint16Array(s),l=24,d=w5(o,l/2,n[4]/2),c=n[5]===2?w5(o,(l+n[4])/2):qQ(n,Math.ceil((l+n[4])/4));return new VQ(n[0],n[1],n[2],n[3],d,c)},VQ=(function(){function r(t,s,n,o,l,d){this.initialValue=t,this.errorValue=s,this.highStart=n,this.highValueIndex=o,this.index=l,this.data=d}return r.prototype.get=function(t){var s;if(t>=0){if(t<55296||t>56319&&t<=65535)return s=this.index[t>>kc],s=(s<<Qg)+(t&Lg),this.data[s];if(t<=65535)return s=this.index[Hj+(t-55296>>kc)],s=(s<<Qg)+(t&Lg),this.data[s];if(t<this.highStart)return s=MQ-PQ+(t>>Ry),s=this.index[s],s+=t>>kc&zQ,s=this.index[s],s=(s<<Qg)+(t&Lg),this.data[s];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r})(),v5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WQ=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var gm=0;gm<v5.length;gm++)WQ[v5.charCodeAt(gm)]=gm;var XQ=1,Tg=2,Ig=3,N5=4,B5=5,YQ=7,j5=8,Dg=9,Rg=10,C5=11,S5=12,_5=13,k5=14,Og=15,JQ=function(r){for(var t=[],s=0,n=r.length;s<n;){var o=r.charCodeAt(s++);if(o>=55296&&o<=56319&&s<n){var l=r.charCodeAt(s++);(l&64512)===56320?t.push(((o&1023)<<10)+(l&1023)+65536):(t.push(o),s--)}else t.push(o)}return t},ZQ=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var s=r.length;if(!s)return"";for(var n=[],o=-1,l="";++o<s;){var d=r[o];d<=65535?n.push(d):(d-=65536,n.push((d>>10)+55296,d%1024+56320)),(o+1===s||n.length>16384)&&(l+=String.fromCharCode.apply(String,n),n.length=0)}return l},$Q=GQ(EQ),pi="×",Hg="÷",eL=function(r){return $Q.get(r)},tL=function(r,t,s){var n=s-2,o=t[n],l=t[s-1],d=t[s];if(l===Tg&&d===Ig)return pi;if(l===Tg||l===Ig||l===N5||d===Tg||d===Ig||d===N5)return Hg;if(l===j5&&[j5,Dg,C5,S5].indexOf(d)!==-1||(l===C5||l===Dg)&&(d===Dg||d===Rg)||(l===S5||l===Rg)&&d===Rg||d===_5||d===B5||d===YQ||l===XQ)return pi;if(l===_5&&d===k5){for(;o===B5;)o=t[--n];if(o===k5)return pi}if(l===Og&&d===Og){for(var c=0;o===Og;)c++,o=t[--n];if(c%2===0)return pi}return Hg},rL=function(r){var t=JQ(r),s=t.length,n=0,o=0,l=t.map(eL);return{next:function(){if(n>=s)return{done:!0,value:null};for(var d=pi;n<s&&(d=tL(t,l,++n))===pi;);if(d!==pi||n===s){var c=ZQ.apply(null,t.slice(o,n));return o=n,{value:c,done:!1}}return{done:!0,value:null}}}},sL=function(r){for(var t=rL(r),s=[],n;!(n=t.next()).done;)n.value&&s.push(n.value.slice());return s},aL=function(r){var t=123;if(r.createRange){var s=r.createRange();if(s.getBoundingClientRect){var n=r.createElement("boundtest");n.style.height=t+"px",n.style.display="block",r.body.appendChild(n),s.selectNode(n);var o=s.getBoundingClientRect(),l=Math.round(o.height);if(r.body.removeChild(n),l===t)return!0}}return!1},nL=function(r){var t=r.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",r.body.appendChild(t);var s=r.createRange();t.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var n=t.firstChild,o=yp(n.data).map(function(u){return Os(u)}),l=0,d={},c=o.every(function(u,h){s.setStart(n,l),s.setEnd(n,l+u.length);var m=s.getBoundingClientRect();l+=u.length;var x=m.x>d.x||m.y>d.y;return d=m,h===0?!0:x});return r.body.removeChild(t),c},iL=function(){return typeof new Image().crossOrigin<"u"},oL=function(){return typeof new XMLHttpRequest().responseType=="string"},lL=function(r){var t=new Image,s=r.createElement("canvas"),n=s.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),s.toDataURL()}catch{return!1}return!0},F5=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},AL=function(r){var t=r.createElement("canvas"),s=100;t.width=s,t.height=s;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,s,s);var o=new Image,l=t.toDataURL();o.src=l;var d=dy(s,s,0,0,o);return n.fillStyle="red",n.fillRect(0,0,s,s),E5(d).then(function(c){n.drawImage(c,0,0);var u=n.getImageData(0,0,s,s).data;n.fillStyle="red",n.fillRect(0,0,s,s);var h=r.createElement("div");return h.style.backgroundImage="url("+l+")",h.style.height=s+"px",F5(u)?E5(dy(s,s,0,0,h)):Promise.reject(!1)}).then(function(c){return n.drawImage(c,0,0),F5(n.getImageData(0,0,s,s).data)}).catch(function(){return!1})},dy=function(r,t,s,n,o){var l="http://www.w3.org/2000/svg",d=document.createElementNS(l,"svg"),c=document.createElementNS(l,"foreignObject");return d.setAttributeNS(null,"width",r.toString()),d.setAttributeNS(null,"height",t.toString()),c.setAttributeNS(null,"width","100%"),c.setAttributeNS(null,"height","100%"),c.setAttributeNS(null,"x",s.toString()),c.setAttributeNS(null,"y",n.toString()),c.setAttributeNS(null,"externalResourcesRequired","true"),d.appendChild(c),c.appendChild(o),d},E5=function(r){return new Promise(function(t,s){var n=new Image;n.onload=function(){return t(n)},n.onerror=s,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Fa={get SUPPORT_RANGE_BOUNDS(){var r=aL(document);return Object.defineProperty(Fa,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=Fa.SUPPORT_RANGE_BOUNDS&&nL(document);return Object.defineProperty(Fa,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=lL(document);return Object.defineProperty(Fa,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?AL(document):Promise.resolve(!1);return Object.defineProperty(Fa,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=iL();return Object.defineProperty(Fa,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=oL();return Object.defineProperty(Fa,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Fa,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Fa,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},_h=(function(){function r(t,s){this.text=t,this.bounds=s}return r})(),cL=function(r,t,s,n){var o=hL(t,s),l=[],d=0;return o.forEach(function(c){if(s.textDecorationLine.length||c.trim().length>0)if(Fa.SUPPORT_RANGE_BOUNDS){var u=U5(n,d,c.length).getClientRects();if(u.length>1){var h=Oy(c),m=0;h.forEach(function(y){l.push(new _h(y,Ql.fromDOMRectList(r,U5(n,m+d,y.length).getClientRects()))),m+=y.length})}else l.push(new _h(c,Ql.fromDOMRectList(r,u)))}else{var x=n.splitText(c.length);l.push(new _h(c,dL(r,n))),n=x}else Fa.SUPPORT_RANGE_BOUNDS||(n=n.splitText(c.length));d+=c.length}),l},dL=function(r,t){var s=t.ownerDocument;if(s){var n=s.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var o=t.parentNode;if(o){o.replaceChild(n,t);var l=bp(r,n);return n.firstChild&&o.replaceChild(n.firstChild,n),l}}return Ql.EMPTY},U5=function(r,t,s){var n=r.ownerDocument;if(!n)throw new Error("Node has no owner document");var o=n.createRange();return o.setStart(r,t),o.setEnd(r,t+s),o},Oy=function(r){if(Fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(r)).map(function(s){return s.segment})}return sL(r)},uL=function(r,t){if(Fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var s=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(s.segment(r)).map(function(n){return n.segment})}return mL(r,t)},hL=function(r,t){return t.letterSpacing!==0?Oy(r):uL(r,t)},fL=[32,160,4961,65792,65793,4153,4241],mL=function(r,t){for(var s=PE(r,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),n=[],o,l=function(){if(o.value){var d=o.value.slice(),c=yp(d),u="";c.forEach(function(h){fL.indexOf(h)===-1?u+=Os(h):(u.length&&n.push(u),n.push(Os(h)),u="")}),u.length&&n.push(u)}};!(o=s.next()).done;)l();return n},pL=(function(){function r(t,s,n){this.text=xL(s.data,n.textTransform),this.textBounds=cL(t,this.text,n,s)}return r})(),xL=function(r,t){switch(t){case 1:return r.toLowerCase();case 3:return r.replace(gL,bL);case 2:return r.toUpperCase();default:return r}},gL=/(^|\s|:|-|\(|\))([a-z])/g,bL=function(r,t,s){return r.length>0?t+s.toUpperCase():r},Mj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.src=n.currentSrc||n.src,o.intrinsicWidth=n.naturalWidth,o.intrinsicHeight=n.naturalHeight,o.context.cache.addImage(o.src),o}return t})(Ko),Pj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.canvas=n,o.intrinsicWidth=n.width,o.intrinsicHeight=n.height,o}return t})(Ko),Kj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this,l=new XMLSerializer,d=bp(s,n);return n.setAttribute("width",d.width+"px"),n.setAttribute("height",d.height+"px"),o.svg="data:image/svg+xml,"+encodeURIComponent(l.serializeToString(n)),o.intrinsicWidth=n.width.baseVal.value,o.intrinsicHeight=n.height.baseVal.value,o.context.cache.addImage(o.svg),o}return t})(Ko),zj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.value=n.value,o}return t})(Ko),uy=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.start=n.start,o.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,o}return t})(Ko),yL=[{type:15,flags:0,unit:"px",number:3}],wL=[{type:16,flags:0,number:50}],vL=function(r){return r.width>r.height?new Ql(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new Ql(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},NL=function(r){var t=r.type===BL?new Array(r.value.length+1).join("•"):r.value;return t.length===0?r.placeholder||"":t},ap="checkbox",np="radio",BL="password",Q5=707406591,Hy=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;switch(o.type=n.type.toLowerCase(),o.checked=n.checked,o.value=NL(n),(o.type===ap||o.type===np)&&(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=1,o.styles.backgroundClip=[0],o.styles.backgroundOrigin=[0],o.bounds=vL(o.bounds)),o.type){case ap:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=yL;break;case np:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=wL;break}return o}return t})(Ko),qj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this,l=n.options[n.selectedIndex||0];return o.value=l&&l.text||"",o}return t})(Ko),Gj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.value=n.value,o}return t})(Ko),Vj=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;o.src=n.src,o.width=parseInt(n.width,10)||0,o.height=parseInt(n.height,10)||0,o.backgroundColor=o.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){o.tree=Xj(s,n.contentWindow.document.documentElement);var l=n.contentWindow.document.documentElement?Ch(s,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):El.TRANSPARENT,d=n.contentWindow.document.body?Ch(s,getComputedStyle(n.contentWindow.document.body).backgroundColor):El.TRANSPARENT;o.backgroundColor=CA(l)?CA(d)?o.styles.backgroundColor:d:l}}catch{}return o}return t})(Ko),jL=["OL","UL","MENU"],qm=function(r,t,s,n){for(var o=t.firstChild,l=void 0;o;o=l)if(l=o.nextSibling,Yj(o)&&o.data.trim().length>0)s.textNodes.push(new pL(r,o,s.styles));else if(Gd(o))if(e3(o)&&o.assignedNodes)o.assignedNodes().forEach(function(c){return qm(r,c,s,n)});else{var d=Wj(r,o);d.styles.isVisible()&&(CL(o,d,n)?d.flags|=4:SL(d.styles)&&(d.flags|=2),jL.indexOf(o.tagName)!==-1&&(d.flags|=8),s.elements.push(d),o.slot,o.shadowRoot?qm(r,o.shadowRoot,d,n):!ip(o)&&!Jj(o)&&!op(o)&&qm(r,o,d,n))}},Wj=function(r,t){return fy(t)?new Mj(r,t):Zj(t)?new Pj(r,t):Jj(t)?new Kj(r,t):_L(t)?new zj(r,t):kL(t)?new uy(r,t):FL(t)?new Hy(r,t):op(t)?new qj(r,t):ip(t)?new Gj(r,t):$j(t)?new Vj(r,t):new Ko(r,t)},Xj=function(r,t){var s=Wj(r,t);return s.flags|=4,qm(r,t,s,s),s},CL=function(r,t,s){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||My(r)&&s.styles.isTransparent()},SL=function(r){return r.isPositioned()||r.isFloating()},Yj=function(r){return r.nodeType===Node.TEXT_NODE},Gd=function(r){return r.nodeType===Node.ELEMENT_NODE},hy=function(r){return Gd(r)&&typeof r.style<"u"&&!Gm(r)},Gm=function(r){return typeof r.className=="object"},_L=function(r){return r.tagName==="LI"},kL=function(r){return r.tagName==="OL"},FL=function(r){return r.tagName==="INPUT"},EL=function(r){return r.tagName==="HTML"},Jj=function(r){return r.tagName==="svg"},My=function(r){return r.tagName==="BODY"},Zj=function(r){return r.tagName==="CANVAS"},L5=function(r){return r.tagName==="VIDEO"},fy=function(r){return r.tagName==="IMG"},$j=function(r){return r.tagName==="IFRAME"},T5=function(r){return r.tagName==="STYLE"},UL=function(r){return r.tagName==="SCRIPT"},ip=function(r){return r.tagName==="TEXTAREA"},op=function(r){return r.tagName==="SELECT"},e3=function(r){return r.tagName==="SLOT"},I5=function(r){return r.tagName.indexOf("-")>0},QL=(function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(t){var s=this.counters[t];return s&&s.length?s[s.length-1]:1},r.prototype.getCounterValues=function(t){var s=this.counters[t];return s||[]},r.prototype.pop=function(t){var s=this;t.forEach(function(n){return s.counters[n].pop()})},r.prototype.parse=function(t){var s=this,n=t.counterIncrement,o=t.counterReset,l=!0;n!==null&&n.forEach(function(c){var u=s.counters[c.counter];u&&c.increment!==0&&(l=!1,u.length||u.push(1),u[Math.max(0,u.length-1)]+=c.increment)});var d=[];return l&&o.forEach(function(c){var u=s.counters[c.counter];d.push(c.counter),u||(u=s.counters[c.counter]=[]),u.push(c.reset)}),d},r})(),D5={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},R5={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},LL={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},TL={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Td=function(r,t,s,n,o,l){return r<t||r>s?Hh(r,o,l.length>0):n.integers.reduce(function(d,c,u){for(;r>=c;)r-=c,d+=n.values[u];return d},"")+l},t3=function(r,t,s,n){var o="";do s||r--,o=n(r)+o,r/=t;while(r*t>=t);return o},Rs=function(r,t,s,n,o){var l=s-t+1;return(r<0?"-":"")+(t3(Math.abs(r),l,n,function(d){return Os(Math.floor(d%l)+t)})+o)},cc=function(r,t,s){s===void 0&&(s=". ");var n=t.length;return t3(Math.abs(r),n,!1,function(o){return t[Math.floor(o%n)]})+s},Pd=1,gA=2,bA=4,yh=8,vl=function(r,t,s,n,o,l){if(r<-9999||r>9999)return Hh(r,4,o.length>0);var d=Math.abs(r),c=o;if(d===0)return t[0]+c;for(var u=0;d>0&&u<=4;u++){var h=d%10;h===0&&la(l,Pd)&&c!==""?c=t[h]+c:h>1||h===1&&u===0||h===1&&u===1&&la(l,gA)||h===1&&u===1&&la(l,bA)&&r>100||h===1&&u>1&&la(l,yh)?c=t[h]+(u>0?s[u-1]:"")+c:h===1&&u>0&&(c=s[u-1]+c),d=Math.floor(d/10)}return(r<0?n:"")+c},O5="十百千萬",H5="拾佰仟萬",M5="マイナス",Mg="마이너스",Hh=function(r,t,s){var n=s?". ":"",o=s?"、":"",l=s?", ":"",d=s?" ":"";switch(t){case 0:return"•"+d;case 1:return"◦"+d;case 2:return"◾"+d;case 5:var c=Rs(r,48,57,!0,n);return c.length<4?"0"+c:c;case 4:return cc(r,"〇一二三四五六七八九",o);case 6:return Td(r,1,3999,D5,3,n).toLowerCase();case 7:return Td(r,1,3999,D5,3,n);case 8:return Rs(r,945,969,!1,n);case 9:return Rs(r,97,122,!1,n);case 10:return Rs(r,65,90,!1,n);case 11:return Rs(r,1632,1641,!0,n);case 12:case 49:return Td(r,1,9999,R5,3,n);case 35:return Td(r,1,9999,R5,3,n).toLowerCase();case 13:return Rs(r,2534,2543,!0,n);case 14:case 30:return Rs(r,6112,6121,!0,n);case 15:return cc(r,"子丑寅卯辰巳午未申酉戌亥",o);case 16:return cc(r,"甲乙丙丁戊己庚辛壬癸",o);case 17:case 48:return vl(r,"零一二三四五六七八九",O5,"負",o,gA|bA|yh);case 47:return vl(r,"零壹貳參肆伍陸柒捌玖",H5,"負",o,Pd|gA|bA|yh);case 42:return vl(r,"零一二三四五六七八九",O5,"负",o,gA|bA|yh);case 41:return vl(r,"零壹贰叁肆伍陆柒捌玖",H5,"负",o,Pd|gA|bA|yh);case 26:return vl(r,"〇一二三四五六七八九","十百千万",M5,o,0);case 25:return vl(r,"零壱弐参四伍六七八九","拾百千万",M5,o,Pd|gA|bA);case 31:return vl(r,"영일이삼사오육칠팔구","십백천만",Mg,l,Pd|gA|bA);case 33:return vl(r,"零一二三四五六七八九","十百千萬",Mg,l,0);case 32:return vl(r,"零壹貳參四五六七八九","拾百千",Mg,l,Pd|gA|bA);case 18:return Rs(r,2406,2415,!0,n);case 20:return Td(r,1,19999,TL,3,n);case 21:return Rs(r,2790,2799,!0,n);case 22:return Rs(r,2662,2671,!0,n);case 22:return Td(r,1,10999,LL,3,n);case 23:return cc(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return cc(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Rs(r,3302,3311,!0,n);case 28:return cc(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",o);case 29:return cc(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",o);case 34:return Rs(r,3792,3801,!0,n);case 37:return Rs(r,6160,6169,!0,n);case 38:return Rs(r,4160,4169,!0,n);case 39:return Rs(r,2918,2927,!0,n);case 40:return Rs(r,1776,1785,!0,n);case 43:return Rs(r,3046,3055,!0,n);case 44:return Rs(r,3174,3183,!0,n);case 45:return Rs(r,3664,3673,!0,n);case 46:return Rs(r,3872,3881,!0,n);default:return Rs(r,48,57,!0,n)}},r3="data-html2canvas-ignore",P5=(function(){function r(t,s,n){if(this.context=t,this.options=n,this.scrolledElements=[],this.referenceElement=s,this.counters=new QL,this.quoteDepth=0,!s.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(s.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(t,s){var n=this,o=IL(t,s);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var l=t.defaultView.pageXOffset,d=t.defaultView.pageYOffset,c=o.contentWindow,u=c.document,h=OL(o).then(function(){return rn(n,void 0,void 0,function(){var m,x;return Ma(this,function(y){switch(y.label){case 0:return this.scrolledElements.forEach(KL),c&&(c.scrollTo(s.left,s.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.scrollY!==s.top||c.scrollX!==s.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-s.left,c.scrollY-s.top,0,0))),m=this.options.onclone,x=this.clonedReferenceElement,typeof x>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:u.fonts&&u.fonts.ready?[4,u.fonts.ready]:[3,2];case 1:y.sent(),y.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,RL(u)]:[3,4];case 3:y.sent(),y.label=4;case 4:return typeof m=="function"?[2,Promise.resolve().then(function(){return m(u,x)}).then(function(){return o})]:[2,o]}})})});return u.open(),u.write(ML(document.doctype)+"<html></html>"),PL(this.referenceElement.ownerDocument,l,d),u.replaceChild(u.adoptNode(this.documentElement),u.documentElement),u.close(),h},r.prototype.createElementClone=function(t){if(cy(t,2))debugger;if(Zj(t))return this.createCanvasClone(t);if(L5(t))return this.createVideoClone(t);if(T5(t))return this.createStyleClone(t);var s=t.cloneNode(!1);return fy(s)&&(fy(t)&&t.currentSrc&&t.currentSrc!==t.src&&(s.src=t.currentSrc,s.srcset=""),s.loading==="lazy"&&(s.loading="eager")),I5(s)?this.createCustomElementClone(s):s},r.prototype.createCustomElementClone=function(t){var s=document.createElement("html2canvascustomelement");return Pg(t.style,s),s},r.prototype.createStyleClone=function(t){try{var s=t.sheet;if(s&&s.cssRules){var n=[].slice.call(s.cssRules,0).reduce(function(l,d){return d&&typeof d.cssText=="string"?l+d.cssText:l},""),o=t.cloneNode(!1);return o.textContent=n,o}}catch(l){if(this.context.logger.error("Unable to access cssRules property",l),l.name!=="SecurityError")throw l}return t.cloneNode(!1)},r.prototype.createCanvasClone=function(t){var s;if(this.options.inlineImages&&t.ownerDocument){var n=t.ownerDocument.createElement("img");try{return n.src=t.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var o=t.cloneNode(!1);try{o.width=t.width,o.height=t.height;var l=t.getContext("2d"),d=o.getContext("2d");if(d)if(!this.options.allowTaint&&l)d.putImageData(l.getImageData(0,0,t.width,t.height),0,0);else{var c=(s=t.getContext("webgl2"))!==null&&s!==void 0?s:t.getContext("webgl");if(c){var u=c.getContextAttributes();u?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}d.drawImage(t,0,0)}return o}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return o},r.prototype.createVideoClone=function(t){var s=t.ownerDocument.createElement("canvas");s.width=t.offsetWidth,s.height=t.offsetHeight;var n=s.getContext("2d");try{return n&&(n.drawImage(t,0,0,s.width,s.height),this.options.allowTaint||n.getImageData(0,0,s.width,s.height)),s}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var o=t.ownerDocument.createElement("canvas");return o.width=t.offsetWidth,o.height=t.offsetHeight,o},r.prototype.appendChildNode=function(t,s,n){(!Gd(s)||!UL(s)&&!s.hasAttribute(r3)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(s)))&&(!this.options.copyStyles||!Gd(s)||!T5(s))&&t.appendChild(this.cloneNode(s,n))},r.prototype.cloneChildNodes=function(t,s,n){for(var o=this,l=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;l;l=l.nextSibling)if(Gd(l)&&e3(l)&&typeof l.assignedNodes=="function"){var d=l.assignedNodes();d.length&&d.forEach(function(c){return o.appendChildNode(s,c,n)})}else this.appendChildNode(s,l,n)},r.prototype.cloneNode=function(t,s){if(Yj(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var n=t.ownerDocument.defaultView;if(n&&Gd(t)&&(hy(t)||Gm(t))){var o=this.createElementClone(t);o.style.transitionProperty="none";var l=n.getComputedStyle(t),d=n.getComputedStyle(t,":before"),c=n.getComputedStyle(t,":after");this.referenceElement===t&&hy(o)&&(this.clonedReferenceElement=o),My(o)&&GL(o);var u=this.counters.parse(new b5(this.context,l)),h=this.resolvePseudoContent(t,o,d,kh.BEFORE);I5(t)&&(s=!0),L5(t)||this.cloneChildNodes(t,o,s),h&&o.insertBefore(h,o.firstChild);var m=this.resolvePseudoContent(t,o,c,kh.AFTER);return m&&o.appendChild(m),this.counters.pop(u),(l&&(this.options.copyStyles||Gm(t))&&!$j(t)||s)&&Pg(l,o),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([o,t.scrollLeft,t.scrollTop]),(ip(t)||op(t))&&(ip(o)||op(o))&&(o.value=t.value),o}return t.cloneNode(!1)},r.prototype.resolvePseudoContent=function(t,s,n,o){var l=this;if(n){var d=n.content,c=s.ownerDocument;if(!(!c||!d||d==="none"||d==="-moz-alt-content"||n.display==="none")){this.counters.parse(new b5(this.context,n));var u=new _Q(this.context,n),h=c.createElement("html2canvaspseudoelement");Pg(n,h),u.content.forEach(function(x){if(x.type===0)h.appendChild(c.createTextNode(x.value));else if(x.type===22){var y=c.createElement("img");y.src=x.value,y.style.opacity="1",h.appendChild(y)}else if(x.type===18){if(x.name==="attr"){var p=x.values.filter(qr);p.length&&h.appendChild(c.createTextNode(t.getAttribute(p[0].value)||""))}else if(x.name==="counter"){var v=x.values.filter(iu),N=v[0],B=v[1];if(N&&qr(N)){var g=l.counters.getCounterValue(N.value),j=B&&qr(B)?Ay.parse(l.context,B.value):3;h.appendChild(c.createTextNode(Hh(g,j,!1)))}}else if(x.name==="counters"){var _=x.values.filter(iu),N=_[0],w=_[1],B=_[2];if(N&&qr(N)){var L=l.counters.getCounterValues(N.value),K=B&&qr(B)?Ay.parse(l.context,B.value):3,M=w&&w.type===0?w.value:"",V=L.map(function(Z){return Hh(Z,K,!1)}).join(M);h.appendChild(c.createTextNode(V))}}}else if(x.type===20)switch(x.value){case"open-quote":h.appendChild(c.createTextNode(g5(u.quotes,l.quoteDepth++,!0)));break;case"close-quote":h.appendChild(c.createTextNode(g5(u.quotes,--l.quoteDepth,!1)));break;default:h.appendChild(c.createTextNode(x.value))}}),h.className=my+" "+py;var m=o===kh.BEFORE?" "+my:" "+py;return Gm(s)?s.className.baseValue+=m:s.className+=m,h}}},r.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},r})(),kh;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(kh||(kh={}));var IL=function(r,t){var s=r.createElement("iframe");return s.className="html2canvas-container",s.style.visibility="hidden",s.style.position="fixed",s.style.left="-10000px",s.style.top="0px",s.style.border="0",s.width=t.width.toString(),s.height=t.height.toString(),s.scrolling="no",s.setAttribute(r3,"true"),r.body.appendChild(s),s},DL=function(r){return new Promise(function(t){if(r.complete){t();return}if(!r.src){t();return}r.onload=t,r.onerror=t})},RL=function(r){return Promise.all([].slice.call(r.images,0).map(DL))},OL=function(r){return new Promise(function(t,s){var n=r.contentWindow;if(!n)return s("No window assigned for iframe");var o=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var l=setInterval(function(){o.body.childNodes.length>0&&o.readyState==="complete"&&(clearInterval(l),t(r))},50)}})},HL=["all","d","content"],Pg=function(r,t){for(var s=r.length-1;s>=0;s--){var n=r.item(s);HL.indexOf(n)===-1&&t.style.setProperty(n,r.getPropertyValue(n))}return t},ML=function(r){var t="";return r&&(t+="<!DOCTYPE ",r.name&&(t+=r.name),r.internalSubset&&(t+=r.internalSubset),r.publicId&&(t+='"'+r.publicId+'"'),r.systemId&&(t+='"'+r.systemId+'"'),t+=">"),t},PL=function(r,t,s){r&&r.defaultView&&(t!==r.defaultView.pageXOffset||s!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(t,s)},KL=function(r){var t=r[0],s=r[1],n=r[2];t.scrollLeft=s,t.scrollTop=n},zL=":before",qL=":after",my="___html2canvas___pseudoelement_before",py="___html2canvas___pseudoelement_after",K5=`{
content: "" !important;
display: none !important;
}`,GL=function(r){VL(r,"."+my+zL+K5+`
.`+py+qL+K5)},VL=function(r,t){var s=r.ownerDocument;if(s){var n=s.createElement("style");n.textContent=t,r.appendChild(n)}},s3=(function(){function r(){}return r.getOrigin=function(t){var s=r._link;return s?(s.href=t,s.href=s.href,s.protocol+s.hostname+s.port):"about:blank"},r.isSameOrigin=function(t){return r.getOrigin(t)===r._origin},r.setContext=function(t){r._link=t.document.createElement("a"),r._origin=r.getOrigin(t.location.href)},r._origin="about:blank",r})(),WL=(function(){function r(t,s){this.context=t,this._options=s,this._cache={}}return r.prototype.addImage=function(t){var s=Promise.resolve();return this.has(t)||(zg(t)||ZL(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),s},r.prototype.match=function(t){return this._cache[t]},r.prototype.loadImage=function(t){return rn(this,void 0,void 0,function(){var s,n,o,l,d=this;return Ma(this,function(c){switch(c.label){case 0:return s=s3.isSameOrigin(t),n=!Kg(t)&&this._options.useCORS===!0&&Fa.SUPPORT_CORS_IMAGES&&!s,o=!Kg(t)&&!s&&!zg(t)&&typeof this._options.proxy=="string"&&Fa.SUPPORT_CORS_XHR&&!n,!s&&this._options.allowTaint===!1&&!Kg(t)&&!zg(t)&&!o&&!n?[2]:(l=t,o?[4,this.proxy(l)]:[3,2]);case 1:l=c.sent(),c.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(u,h){var m=new Image;m.onload=function(){return u(m)},m.onerror=h,($L(l)||n)&&(m.crossOrigin="anonymous"),m.src=l,m.complete===!0&&setTimeout(function(){return u(m)},500),d._options.imageTimeout>0&&setTimeout(function(){return h("Timed out ("+d._options.imageTimeout+"ms) loading image")},d._options.imageTimeout)})];case 3:return[2,c.sent()]}})})},r.prototype.has=function(t){return typeof this._cache[t]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(t){var s=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var o=t.substring(0,256);return new Promise(function(l,d){var c=Fa.SUPPORT_RESPONSE_TYPE?"blob":"text",u=new XMLHttpRequest;u.onload=function(){if(u.status===200)if(c==="text")l(u.response);else{var x=new FileReader;x.addEventListener("load",function(){return l(x.result)},!1),x.addEventListener("error",function(y){return d(y)},!1),x.readAsDataURL(u.response)}else d("Failed to proxy resource "+o+" with status code "+u.status)},u.onerror=d;var h=n.indexOf("?")>-1?"&":"?";if(u.open("GET",""+n+h+"url="+encodeURIComponent(t)+"&responseType="+c),c!=="text"&&u instanceof XMLHttpRequest&&(u.responseType=c),s._options.imageTimeout){var m=s._options.imageTimeout;u.timeout=m,u.ontimeout=function(){return d("Timed out ("+m+"ms) proxying "+o)}}u.send()})},r})(),XL=/^data:image\/svg\+xml/i,YL=/^data:image\/.*;base64,/i,JL=/^data:image\/.*/i,ZL=function(r){return Fa.SUPPORT_SVG_DRAWING||!eT(r)},Kg=function(r){return JL.test(r)},$L=function(r){return YL.test(r)},zg=function(r){return r.substr(0,4)==="blob"},eT=function(r){return r.substr(-3).toLowerCase()==="svg"||XL.test(r)},ht=(function(){function r(t,s){this.type=0,this.x=t,this.y=s}return r.prototype.add=function(t,s){return new r(this.x+t,this.y+s)},r})(),Id=function(r,t,s){return new ht(r.x+(t.x-r.x)*s,r.y+(t.y-r.y)*s)},bm=(function(){function r(t,s,n,o){this.type=1,this.start=t,this.startControl=s,this.endControl=n,this.end=o}return r.prototype.subdivide=function(t,s){var n=Id(this.start,this.startControl,t),o=Id(this.startControl,this.endControl,t),l=Id(this.endControl,this.end,t),d=Id(n,o,t),c=Id(o,l,t),u=Id(d,c,t);return s?new r(this.start,n,d,u):new r(u,c,l,this.end)},r.prototype.add=function(t,s){return new r(this.start.add(t,s),this.startControl.add(t,s),this.endControl.add(t,s),this.end.add(t,s))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r})(),gi=function(r){return r.type===1},tT=(function(){function r(t){var s=t.styles,n=t.bounds,o=gh(s.borderTopLeftRadius,n.width,n.height),l=o[0],d=o[1],c=gh(s.borderTopRightRadius,n.width,n.height),u=c[0],h=c[1],m=gh(s.borderBottomRightRadius,n.width,n.height),x=m[0],y=m[1],p=gh(s.borderBottomLeftRadius,n.width,n.height),v=p[0],N=p[1],B=[];B.push((l+u)/n.width),B.push((v+x)/n.width),B.push((d+N)/n.height),B.push((h+y)/n.height);var g=Math.max.apply(Math,B);g>1&&(l/=g,d/=g,u/=g,h/=g,x/=g,y/=g,v/=g,N/=g);var j=n.width-u,_=n.height-y,w=n.width-x,L=n.height-N,K=s.borderTopWidth,M=s.borderRightWidth,V=s.borderBottomWidth,T=s.borderLeftWidth,ne=$r(s.paddingTop,t.bounds.width),Z=$r(s.paddingRight,t.bounds.width),U=$r(s.paddingBottom,t.bounds.width),q=$r(s.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=l>0||d>0?hs(n.left+T/3,n.top+K/3,l-T/3,d-K/3,Er.TOP_LEFT):new ht(n.left+T/3,n.top+K/3),this.topRightBorderDoubleOuterBox=l>0||d>0?hs(n.left+j,n.top+K/3,u-M/3,h-K/3,Er.TOP_RIGHT):new ht(n.left+n.width-M/3,n.top+K/3),this.bottomRightBorderDoubleOuterBox=x>0||y>0?hs(n.left+w,n.top+_,x-M/3,y-V/3,Er.BOTTOM_RIGHT):new ht(n.left+n.width-M/3,n.top+n.height-V/3),this.bottomLeftBorderDoubleOuterBox=v>0||N>0?hs(n.left+T/3,n.top+L,v-T/3,N-V/3,Er.BOTTOM_LEFT):new ht(n.left+T/3,n.top+n.height-V/3),this.topLeftBorderDoubleInnerBox=l>0||d>0?hs(n.left+T*2/3,n.top+K*2/3,l-T*2/3,d-K*2/3,Er.TOP_LEFT):new ht(n.left+T*2/3,n.top+K*2/3),this.topRightBorderDoubleInnerBox=l>0||d>0?hs(n.left+j,n.top+K*2/3,u-M*2/3,h-K*2/3,Er.TOP_RIGHT):new ht(n.left+n.width-M*2/3,n.top+K*2/3),this.bottomRightBorderDoubleInnerBox=x>0||y>0?hs(n.left+w,n.top+_,x-M*2/3,y-V*2/3,Er.BOTTOM_RIGHT):new ht(n.left+n.width-M*2/3,n.top+n.height-V*2/3),this.bottomLeftBorderDoubleInnerBox=v>0||N>0?hs(n.left+T*2/3,n.top+L,v-T*2/3,N-V*2/3,Er.BOTTOM_LEFT):new ht(n.left+T*2/3,n.top+n.height-V*2/3),this.topLeftBorderStroke=l>0||d>0?hs(n.left+T/2,n.top+K/2,l-T/2,d-K/2,Er.TOP_LEFT):new ht(n.left+T/2,n.top+K/2),this.topRightBorderStroke=l>0||d>0?hs(n.left+j,n.top+K/2,u-M/2,h-K/2,Er.TOP_RIGHT):new ht(n.left+n.width-M/2,n.top+K/2),this.bottomRightBorderStroke=x>0||y>0?hs(n.left+w,n.top+_,x-M/2,y-V/2,Er.BOTTOM_RIGHT):new ht(n.left+n.width-M/2,n.top+n.height-V/2),this.bottomLeftBorderStroke=v>0||N>0?hs(n.left+T/2,n.top+L,v-T/2,N-V/2,Er.BOTTOM_LEFT):new ht(n.left+T/2,n.top+n.height-V/2),this.topLeftBorderBox=l>0||d>0?hs(n.left,n.top,l,d,Er.TOP_LEFT):new ht(n.left,n.top),this.topRightBorderBox=u>0||h>0?hs(n.left+j,n.top,u,h,Er.TOP_RIGHT):new ht(n.left+n.width,n.top),this.bottomRightBorderBox=x>0||y>0?hs(n.left+w,n.top+_,x,y,Er.BOTTOM_RIGHT):new ht(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=v>0||N>0?hs(n.left,n.top+L,v,N,Er.BOTTOM_LEFT):new ht(n.left,n.top+n.height),this.topLeftPaddingBox=l>0||d>0?hs(n.left+T,n.top+K,Math.max(0,l-T),Math.max(0,d-K),Er.TOP_LEFT):new ht(n.left+T,n.top+K),this.topRightPaddingBox=u>0||h>0?hs(n.left+Math.min(j,n.width-M),n.top+K,j>n.width+M?0:Math.max(0,u-M),Math.max(0,h-K),Er.TOP_RIGHT):new ht(n.left+n.width-M,n.top+K),this.bottomRightPaddingBox=x>0||y>0?hs(n.left+Math.min(w,n.width-T),n.top+Math.min(_,n.height-V),Math.max(0,x-M),Math.max(0,y-V),Er.BOTTOM_RIGHT):new ht(n.left+n.width-M,n.top+n.height-V),this.bottomLeftPaddingBox=v>0||N>0?hs(n.left+T,n.top+Math.min(L,n.height-V),Math.max(0,v-T),Math.max(0,N-V),Er.BOTTOM_LEFT):new ht(n.left+T,n.top+n.height-V),this.topLeftContentBox=l>0||d>0?hs(n.left+T+q,n.top+K+ne,Math.max(0,l-(T+q)),Math.max(0,d-(K+ne)),Er.TOP_LEFT):new ht(n.left+T+q,n.top+K+ne),this.topRightContentBox=u>0||h>0?hs(n.left+Math.min(j,n.width+T+q),n.top+K+ne,j>n.width+T+q?0:u-T+q,h-(K+ne),Er.TOP_RIGHT):new ht(n.left+n.width-(M+Z),n.top+K+ne),this.bottomRightContentBox=x>0||y>0?hs(n.left+Math.min(w,n.width-(T+q)),n.top+Math.min(_,n.height+K+ne),Math.max(0,x-(M+Z)),y-(V+U),Er.BOTTOM_RIGHT):new ht(n.left+n.width-(M+Z),n.top+n.height-(V+U)),this.bottomLeftContentBox=v>0||N>0?hs(n.left+T+q,n.top+L,Math.max(0,v-(T+q)),N-(V+U),Er.BOTTOM_LEFT):new ht(n.left+T+q,n.top+n.height-(V+U))}return r})(),Er;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Er||(Er={}));var hs=function(r,t,s,n,o){var l=4*((Math.sqrt(2)-1)/3),d=s*l,c=n*l,u=r+s,h=t+n;switch(o){case Er.TOP_LEFT:return new bm(new ht(r,h),new ht(r,h-c),new ht(u-d,t),new ht(u,t));case Er.TOP_RIGHT:return new bm(new ht(r,t),new ht(r+d,t),new ht(u,h-c),new ht(u,h));case Er.BOTTOM_RIGHT:return new bm(new ht(u,t),new ht(u,t+c),new ht(r+d,h),new ht(r,h));case Er.BOTTOM_LEFT:default:return new bm(new ht(u,h),new ht(u-d,h),new ht(r,t+c),new ht(r,t))}},lp=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},rT=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},Ap=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},sT=(function(){function r(t,s,n){this.offsetX=t,this.offsetY=s,this.matrix=n,this.type=0,this.target=6}return r})(),ym=(function(){function r(t,s){this.path=t,this.target=s,this.type=1}return r})(),aT=(function(){function r(t){this.opacity=t,this.type=2,this.target=6}return r})(),nT=function(r){return r.type===0},a3=function(r){return r.type===1},iT=function(r){return r.type===2},z5=function(r,t){return r.length===t.length?r.some(function(s,n){return s===t[n]}):!1},oT=function(r,t,s,n,o){return r.map(function(l,d){switch(d){case 0:return l.add(t,s);case 1:return l.add(t+n,s);case 2:return l.add(t+n,s+o);case 3:return l.add(t,s+o)}return l})},n3=(function(){function r(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r})(),i3=(function(){function r(t,s){if(this.container=t,this.parent=s,this.effects=[],this.curves=new tT(this.container),this.container.styles.opacity<1&&this.effects.push(new aT(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,o=this.container.bounds.top+this.container.styles.transformOrigin[1].number,l=this.container.styles.transform;this.effects.push(new sT(n,o,l))}if(this.container.styles.overflowX!==0){var d=lp(this.curves),c=Ap(this.curves);z5(d,c)?this.effects.push(new ym(d,6)):(this.effects.push(new ym(d,2)),this.effects.push(new ym(c,4)))}}return r.prototype.getEffects=function(t){for(var s=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,o=this.effects.slice(0);n;){var l=n.effects.filter(function(u){return!a3(u)});if(s||n.container.styles.position!==0||!n.parent){if(o.unshift.apply(o,l),s=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var d=lp(n.curves),c=Ap(n.curves);z5(d,c)||o.unshift(new ym(c,6))}}else o.unshift.apply(o,l);n=n.parent}return o.filter(function(u){return la(u.target,t)})},r})(),xy=function(r,t,s,n){r.container.elements.forEach(function(o){var l=la(o.flags,4),d=la(o.flags,2),c=new i3(o,r);la(o.styles.display,2048)&&n.push(c);var u=la(o.flags,8)?[]:n;if(l||d){var h=l||o.styles.isPositioned()?s:t,m=new n3(c);if(o.styles.isPositioned()||o.styles.opacity<1||o.styles.isTransformed()){var x=o.styles.zIndex.order;if(x<0){var y=0;h.negativeZIndex.some(function(v,N){return x>v.element.container.styles.zIndex.order?(y=N,!1):y>0}),h.negativeZIndex.splice(y,0,m)}else if(x>0){var p=0;h.positiveZIndex.some(function(v,N){return x>=v.element.container.styles.zIndex.order?(p=N+1,!1):p>0}),h.positiveZIndex.splice(p,0,m)}else h.zeroOrAutoZIndexOrTransformedOrOpacity.push(m)}else o.styles.isFloating()?h.nonPositionedFloats.push(m):h.nonPositionedInlineLevel.push(m);xy(c,m,l?m:s,u)}else o.styles.isInlineLevel()?t.inlineLevel.push(c):t.nonInlineLevel.push(c),xy(c,t,s,u);la(o.flags,8)&&o3(o,u)})},o3=function(r,t){for(var s=r instanceof uy?r.start:1,n=r instanceof uy?r.reversed:!1,o=0;o<t.length;o++){var l=t[o];l.container instanceof zj&&typeof l.container.value=="number"&&l.container.value!==0&&(s=l.container.value),l.listValue=Hh(s,l.container.styles.listStyleType,!0),s+=n?-1:1}},lT=function(r){var t=new i3(r,null),s=new n3(t),n=[];return xy(t,s,s,n),o3(t.container,n),s},q5=function(r,t){switch(t){case 0:return Bi(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return Bi(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return Bi(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);default:return Bi(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},AT=function(r,t){switch(t){case 0:return Bi(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return Bi(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return Bi(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);default:return Bi(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},cT=function(r,t){switch(t){case 0:return Bi(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return Bi(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return Bi(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);default:return Bi(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},dT=function(r,t){switch(t){case 0:return wm(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return wm(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return wm(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);default:return wm(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},wm=function(r,t){var s=[];return gi(r)?s.push(r.subdivide(.5,!1)):s.push(r),gi(t)?s.push(t.subdivide(.5,!0)):s.push(t),s},Bi=function(r,t,s,n){var o=[];return gi(r)?o.push(r.subdivide(.5,!1)):o.push(r),gi(s)?o.push(s.subdivide(.5,!0)):o.push(s),gi(n)?o.push(n.subdivide(.5,!0).reverse()):o.push(n),gi(t)?o.push(t.subdivide(.5,!1).reverse()):o.push(t),o},l3=function(r){var t=r.bounds,s=r.styles;return t.add(s.borderLeftWidth,s.borderTopWidth,-(s.borderRightWidth+s.borderLeftWidth),-(s.borderTopWidth+s.borderBottomWidth))},cp=function(r){var t=r.styles,s=r.bounds,n=$r(t.paddingLeft,s.width),o=$r(t.paddingRight,s.width),l=$r(t.paddingTop,s.width),d=$r(t.paddingBottom,s.width);return s.add(n+t.borderLeftWidth,l+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+n+o),-(t.borderTopWidth+t.borderBottomWidth+l+d))},uT=function(r,t){return r===0?t.bounds:r===2?cp(t):l3(t)},hT=function(r,t){return r===0?t.bounds:r===2?cp(t):l3(t)},qg=function(r,t,s){var n=uT(Kd(r.styles.backgroundOrigin,t),r),o=hT(Kd(r.styles.backgroundClip,t),r),l=fT(Kd(r.styles.backgroundSize,t),s,n),d=l[0],c=l[1],u=gh(Kd(r.styles.backgroundPosition,t),n.width-d,n.height-c),h=mT(Kd(r.styles.backgroundRepeat,t),u,l,n,o),m=Math.round(n.left+u[0]),x=Math.round(n.top+u[1]);return[h,m,x,d,c]},Dd=function(r){return qr(r)&&r.value===eu.AUTO},vm=function(r){return typeof r=="number"},fT=function(r,t,s){var n=t[0],o=t[1],l=t[2],d=r[0],c=r[1];if(!d)return[0,0];if(Js(d)&&c&&Js(c))return[$r(d,s.width),$r(c,s.height)];var u=vm(l);if(qr(d)&&(d.value===eu.CONTAIN||d.value===eu.COVER)){if(vm(l)){var h=s.width/s.height;return h<l!=(d.value===eu.COVER)?[s.width,s.width/l]:[s.height*l,s.height]}return[s.width,s.height]}var m=vm(n),x=vm(o),y=m||x;if(Dd(d)&&(!c||Dd(c))){if(m&&x)return[n,o];if(!u&&!y)return[s.width,s.height];if(y&&u){var p=m?n:o*l,v=x?o:n/l;return[p,v]}var N=m?n:s.width,B=x?o:s.height;return[N,B]}if(u){var g=0,j=0;return Js(d)?g=$r(d,s.width):Js(c)&&(j=$r(c,s.height)),Dd(d)?g=j*l:(!c||Dd(c))&&(j=g/l),[g,j]}var _=null,w=null;if(Js(d)?_=$r(d,s.width):c&&Js(c)&&(w=$r(c,s.height)),_!==null&&(!c||Dd(c))&&(w=m&&x?_/n*o:s.height),w!==null&&Dd(d)&&(_=m&&x?w/o*n:s.width),_!==null&&w!==null)return[_,w];throw new Error("Unable to calculate background-size for element")},Kd=function(r,t){var s=r[t];return typeof s>"u"?r[0]:s},mT=function(r,t,s,n,o){var l=t[0],d=t[1],c=s[0],u=s[1];switch(r){case 2:return[new ht(Math.round(n.left),Math.round(n.top+d)),new ht(Math.round(n.left+n.width),Math.round(n.top+d)),new ht(Math.round(n.left+n.width),Math.round(u+n.top+d)),new ht(Math.round(n.left),Math.round(u+n.top+d))];case 3:return[new ht(Math.round(n.left+l),Math.round(n.top)),new ht(Math.round(n.left+l+c),Math.round(n.top)),new ht(Math.round(n.left+l+c),Math.round(n.height+n.top)),new ht(Math.round(n.left+l),Math.round(n.height+n.top))];case 1:return[new ht(Math.round(n.left+l),Math.round(n.top+d)),new ht(Math.round(n.left+l+c),Math.round(n.top+d)),new ht(Math.round(n.left+l+c),Math.round(n.top+d+u)),new ht(Math.round(n.left+l),Math.round(n.top+d+u))];default:return[new ht(Math.round(o.left),Math.round(o.top)),new ht(Math.round(o.left+o.width),Math.round(o.top)),new ht(Math.round(o.left+o.width),Math.round(o.height+o.top)),new ht(Math.round(o.left),Math.round(o.height+o.top))]}},pT="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",G5="Hidden Text",xT=(function(){function r(t){this._data={},this._document=t}return r.prototype.parseMetrics=function(t,s){var n=this._document.createElement("div"),o=this._document.createElement("img"),l=this._document.createElement("span"),d=this._document.body;n.style.visibility="hidden",n.style.fontFamily=t,n.style.fontSize=s,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",d.appendChild(n),o.src=pT,o.width=1,o.height=1,o.style.margin="0",o.style.padding="0",o.style.verticalAlign="baseline",l.style.fontFamily=t,l.style.fontSize=s,l.style.margin="0",l.style.padding="0",l.appendChild(this._document.createTextNode(G5)),n.appendChild(l),n.appendChild(o);var c=o.offsetTop-l.offsetTop+2;n.removeChild(l),n.appendChild(this._document.createTextNode(G5)),n.style.lineHeight="normal",o.style.verticalAlign="super";var u=o.offsetTop-n.offsetTop+2;return d.removeChild(n),{baseline:c,middle:u}},r.prototype.getMetrics=function(t,s){var n=t+" "+s;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(t,s)),this._data[n]},r})(),A3=(function(){function r(t,s){this.context=t,this.options=s}return r})(),gT=1e4,bT=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o._activeEffects=[],o.canvas=n.canvas?n.canvas:document.createElement("canvas"),o.ctx=o.canvas.getContext("2d"),n.canvas||(o.canvas.width=Math.floor(n.width*n.scale),o.canvas.height=Math.floor(n.height*n.scale),o.canvas.style.width=n.width+"px",o.canvas.style.height=n.height+"px"),o.fontMetrics=new xT(document),o.ctx.scale(o.options.scale,o.options.scale),o.ctx.translate(-n.x,-n.y),o.ctx.textBaseline="bottom",o._activeEffects=[],o.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),o}return t.prototype.applyEffects=function(s){for(var n=this;this._activeEffects.length;)this.popEffect();s.forEach(function(o){return n.applyEffect(o)})},t.prototype.applyEffect=function(s){this.ctx.save(),iT(s)&&(this.ctx.globalAlpha=s.opacity),nT(s)&&(this.ctx.translate(s.offsetX,s.offsetY),this.ctx.transform(s.matrix[0],s.matrix[1],s.matrix[2],s.matrix[3],s.matrix[4],s.matrix[5]),this.ctx.translate(-s.offsetX,-s.offsetY)),a3(s)&&(this.path(s.path),this.ctx.clip()),this._activeEffects.push(s)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(s){return rn(this,void 0,void 0,function(){var n;return Ma(this,function(o){switch(o.label){case 0:return n=s.element.container.styles,n.isVisible()?[4,this.renderStackContent(s)]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(s){return rn(this,void 0,void 0,function(){return Ma(this,function(n){switch(n.label){case 0:if(la(s.container.flags,16))debugger;return s.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(s)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(s)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(s,n,o){var l=this;if(n===0)this.ctx.fillText(s.text,s.bounds.left,s.bounds.top+o);else{var d=Oy(s.text);d.reduce(function(c,u){return l.ctx.fillText(u,c,s.bounds.top+o),c+l.ctx.measureText(u).width},s.bounds.left)}},t.prototype.createFontStyle=function(s){var n=s.fontVariant.filter(function(d){return d==="normal"||d==="small-caps"}).join(""),o=BT(s.fontFamily).join(", "),l=qh(s.fontSize)?""+s.fontSize.number+s.fontSize.unit:s.fontSize.number+"px";return[[s.fontStyle,n,s.fontWeight,l,o].join(" "),o,l]},t.prototype.renderTextNode=function(s,n){return rn(this,void 0,void 0,function(){var o,l,d,c,u,h,m,x,y=this;return Ma(this,function(p){return o=this.createFontStyle(n),l=o[0],d=o[1],c=o[2],this.ctx.font=l,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",u=this.fontMetrics.getMetrics(d,c),h=u.baseline,m=u.middle,x=n.paintOrder,s.textBounds.forEach(function(v){x.forEach(function(N){switch(N){case 0:y.ctx.fillStyle=xa(n.color),y.renderTextWithLetterSpacing(v,n.letterSpacing,h);var B=n.textShadow;B.length&&v.text.trim().length&&(B.slice(0).reverse().forEach(function(g){y.ctx.shadowColor=xa(g.color),y.ctx.shadowOffsetX=g.offsetX.number*y.options.scale,y.ctx.shadowOffsetY=g.offsetY.number*y.options.scale,y.ctx.shadowBlur=g.blur.number,y.renderTextWithLetterSpacing(v,n.letterSpacing,h)}),y.ctx.shadowColor="",y.ctx.shadowOffsetX=0,y.ctx.shadowOffsetY=0,y.ctx.shadowBlur=0),n.textDecorationLine.length&&(y.ctx.fillStyle=xa(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(g){switch(g){case 1:y.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top+h),v.bounds.width,1);break;case 2:y.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top),v.bounds.width,1);break;case 3:y.ctx.fillRect(v.bounds.left,Math.ceil(v.bounds.top+m),v.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&v.text.trim().length&&(y.ctx.strokeStyle=xa(n.webkitTextStrokeColor),y.ctx.lineWidth=n.webkitTextStrokeWidth,y.ctx.lineJoin=window.chrome?"miter":"round",y.ctx.strokeText(v.text,v.bounds.left,v.bounds.top+h)),y.ctx.strokeStyle="",y.ctx.lineWidth=0,y.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(s,n,o){if(o&&s.intrinsicWidth>0&&s.intrinsicHeight>0){var l=cp(s),d=Ap(n);this.path(d),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(o,0,0,s.intrinsicWidth,s.intrinsicHeight,l.left,l.top,l.width,l.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(s){return rn(this,void 0,void 0,function(){var n,o,l,d,c,u,j,j,h,m,x,y,w,p,v,L,N,B,g,j,_,w,L;return Ma(this,function(K){switch(K.label){case 0:this.applyEffects(s.getEffects(4)),n=s.container,o=s.curves,l=n.styles,d=0,c=n.textNodes,K.label=1;case 1:return d<c.length?(u=c[d],[4,this.renderTextNode(u,l)]):[3,4];case 2:K.sent(),K.label=3;case 3:return d++,[3,1];case 4:if(!(n instanceof Mj))return[3,8];K.label=5;case 5:return K.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return j=K.sent(),this.renderReplacedElement(n,o,j),[3,8];case 7:return K.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof Pj&&this.renderReplacedElement(n,o,n.canvas),!(n instanceof Kj))return[3,12];K.label=9;case 9:return K.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return j=K.sent(),this.renderReplacedElement(n,o,j),[3,12];case 11:return K.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof Vj&&n.tree?(h=new t(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,h.render(n.tree)]):[3,14];case 13:m=K.sent(),n.width&&n.height&&this.ctx.drawImage(m,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),K.label=14;case 14:if(n instanceof Hy&&(x=Math.min(n.bounds.width,n.bounds.height),n.type===ap?n.checked&&(this.ctx.save(),this.path([new ht(n.bounds.left+x*.39363,n.bounds.top+x*.79),new ht(n.bounds.left+x*.16,n.bounds.top+x*.5549),new ht(n.bounds.left+x*.27347,n.bounds.top+x*.44071),new ht(n.bounds.left+x*.39694,n.bounds.top+x*.5649),new ht(n.bounds.left+x*.72983,n.bounds.top+x*.23),new ht(n.bounds.left+x*.84,n.bounds.top+x*.34085),new ht(n.bounds.left+x*.39363,n.bounds.top+x*.79)]),this.ctx.fillStyle=xa(Q5),this.ctx.fill(),this.ctx.restore()):n.type===np&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+x/2,n.bounds.top+x/2,x/4,0,Math.PI*2,!0),this.ctx.fillStyle=xa(Q5),this.ctx.fill(),this.ctx.restore())),yT(n)&&n.value.length){switch(y=this.createFontStyle(l),w=y[0],p=y[1],v=this.fontMetrics.getMetrics(w,p).baseline,this.ctx.font=w,this.ctx.fillStyle=xa(l.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=vT(n.styles.textAlign),L=cp(n),N=0,n.styles.textAlign){case 1:N+=L.width/2;break;case 2:N+=L.width;break}B=L.add(N,0,0,-L.height/2+1),this.ctx.save(),this.path([new ht(L.left,L.top),new ht(L.left+L.width,L.top),new ht(L.left+L.width,L.top+L.height),new ht(L.left,L.top+L.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new _h(n.value,B),l.letterSpacing,v),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!la(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(g=n.styles.listStyleImage,g.type!==0)return[3,18];j=void 0,_=g.url,K.label=15;case 15:return K.trys.push([15,17,,18]),[4,this.context.cache.match(_)];case 16:return j=K.sent(),this.ctx.drawImage(j,n.bounds.left-(j.width+10),n.bounds.top),[3,18];case 17:return K.sent(),this.context.logger.error("Error loading list-style-image "+_),[3,18];case 18:return[3,20];case 19:s.listValue&&n.styles.listStyleType!==-1&&(w=this.createFontStyle(l)[0],this.ctx.font=w,this.ctx.fillStyle=xa(l.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",L=new Ql(n.bounds.left,n.bounds.top+$r(n.styles.paddingTop,n.bounds.width),n.bounds.width,p5(l.lineHeight,l.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new _h(s.listValue,L),l.letterSpacing,p5(l.lineHeight,l.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),K.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(s){return rn(this,void 0,void 0,function(){var n,o,g,l,d,g,c,u,g,h,m,g,x,y,g,p,v,g,N,B,g;return Ma(this,function(j){switch(j.label){case 0:if(la(s.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(s.element)];case 1:j.sent(),n=0,o=s.negativeZIndex,j.label=2;case 2:return n<o.length?(g=o[n],[4,this.renderStack(g)]):[3,5];case 3:j.sent(),j.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(s.element)];case 6:j.sent(),l=0,d=s.nonInlineLevel,j.label=7;case 7:return l<d.length?(g=d[l],[4,this.renderNode(g)]):[3,10];case 8:j.sent(),j.label=9;case 9:return l++,[3,7];case 10:c=0,u=s.nonPositionedFloats,j.label=11;case 11:return c<u.length?(g=u[c],[4,this.renderStack(g)]):[3,14];case 12:j.sent(),j.label=13;case 13:return c++,[3,11];case 14:h=0,m=s.nonPositionedInlineLevel,j.label=15;case 15:return h<m.length?(g=m[h],[4,this.renderStack(g)]):[3,18];case 16:j.sent(),j.label=17;case 17:return h++,[3,15];case 18:x=0,y=s.inlineLevel,j.label=19;case 19:return x<y.length?(g=y[x],[4,this.renderNode(g)]):[3,22];case 20:j.sent(),j.label=21;case 21:return x++,[3,19];case 22:p=0,v=s.zeroOrAutoZIndexOrTransformedOrOpacity,j.label=23;case 23:return p<v.length?(g=v[p],[4,this.renderStack(g)]):[3,26];case 24:j.sent(),j.label=25;case 25:return p++,[3,23];case 26:N=0,B=s.positiveZIndex,j.label=27;case 27:return N<B.length?(g=B[N],[4,this.renderStack(g)]):[3,30];case 28:j.sent(),j.label=29;case 29:return N++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(s){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(s.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(s){this.ctx.beginPath(),this.formatPath(s),this.ctx.closePath()},t.prototype.formatPath=function(s){var n=this;s.forEach(function(o,l){var d=gi(o)?o.start:o;l===0?n.ctx.moveTo(d.x,d.y):n.ctx.lineTo(d.x,d.y),gi(o)&&n.ctx.bezierCurveTo(o.startControl.x,o.startControl.y,o.endControl.x,o.endControl.y,o.end.x,o.end.y)})},t.prototype.renderRepeat=function(s,n,o,l){this.path(s),this.ctx.fillStyle=n,this.ctx.translate(o,l),this.ctx.fill(),this.ctx.translate(-o,-l)},t.prototype.resizeImage=function(s,n,o){var l;if(s.width===n&&s.height===o)return s;var d=(l=this.canvas.ownerDocument)!==null&&l!==void 0?l:document,c=d.createElement("canvas");c.width=Math.max(1,n),c.height=Math.max(1,o);var u=c.getContext("2d");return u.drawImage(s,0,0,s.width,s.height,0,0,n,o),c},t.prototype.renderBackgroundImage=function(s){return rn(this,void 0,void 0,function(){var n,o,l,d,c,u;return Ma(this,function(h){switch(h.label){case 0:n=s.styles.backgroundImage.length-1,o=function(m){var x,y,p,ne,ae,se,q,F,V,v,ne,ae,se,q,F,N,B,g,j,_,w,L,K,M,V,T,ne,Z,U,q,F,le,ae,se,fe,ye,_e,xe,D,$,X,te;return Ma(this,function(J){switch(J.label){case 0:if(m.type!==0)return[3,5];x=void 0,y=m.url,J.label=1;case 1:return J.trys.push([1,3,,4]),[4,l.context.cache.match(y)];case 2:return x=J.sent(),[3,4];case 3:return J.sent(),l.context.logger.error("Error loading background-image "+y),[3,4];case 4:return x&&(p=qg(s,n,[x.width,x.height,x.width/x.height]),ne=p[0],ae=p[1],se=p[2],q=p[3],F=p[4],V=l.ctx.createPattern(l.resizeImage(x,q,F),"repeat"),l.renderRepeat(ne,V,ae,se)),[3,6];case 5:n8(m)?(v=qg(s,n,[null,null,null]),ne=v[0],ae=v[1],se=v[2],q=v[3],F=v[4],N=e8(m.angle,q,F),B=N[0],g=N[1],j=N[2],_=N[3],w=N[4],L=document.createElement("canvas"),L.width=q,L.height=F,K=L.getContext("2d"),M=K.createLinearGradient(g,_,j,w),f5(m.stops,B).forEach(function(O){return M.addColorStop(O.stop,xa(O.color))}),K.fillStyle=M,K.fillRect(0,0,q,F),q>0&&F>0&&(V=l.ctx.createPattern(L,"repeat"),l.renderRepeat(ne,V,ae,se))):i8(m)&&(T=qg(s,n,[null,null,null]),ne=T[0],Z=T[1],U=T[2],q=T[3],F=T[4],le=m.position.length===0?[Iy]:m.position,ae=$r(le[0],q),se=$r(le[le.length-1],F),fe=t8(m,ae,se,q,F),ye=fe[0],_e=fe[1],ye>0&&_e>0&&(xe=l.ctx.createRadialGradient(Z+ae,U+se,0,Z+ae,U+se,ye),f5(m.stops,ye*2).forEach(function(O){return xe.addColorStop(O.stop,xa(O.color))}),l.path(ne),l.ctx.fillStyle=xe,ye!==_e?(D=s.bounds.left+.5*s.bounds.width,$=s.bounds.top+.5*s.bounds.height,X=_e/ye,te=1/X,l.ctx.save(),l.ctx.translate(D,$),l.ctx.transform(1,0,0,X,0,0),l.ctx.translate(-D,-$),l.ctx.fillRect(Z,te*(U-$)+$,q,F*te),l.ctx.restore()):l.ctx.fill())),J.label=6;case 6:return n--,[2]}})},l=this,d=0,c=s.styles.backgroundImage.slice(0).reverse(),h.label=1;case 1:return d<c.length?(u=c[d],[5,o(u)]):[3,4];case 2:h.sent(),h.label=3;case 3:return d++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(s,n,o){return rn(this,void 0,void 0,function(){return Ma(this,function(l){return this.path(q5(o,n)),this.ctx.fillStyle=xa(s),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(s,n,o,l){return rn(this,void 0,void 0,function(){var d,c;return Ma(this,function(u){switch(u.label){case 0:return n<3?[4,this.renderSolidBorder(s,o,l)]:[3,2];case 1:return u.sent(),[2];case 2:return d=AT(l,o),this.path(d),this.ctx.fillStyle=xa(s),this.ctx.fill(),c=cT(l,o),this.path(c),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(s){return rn(this,void 0,void 0,function(){var n,o,l,d,c,u,h,m,x=this;return Ma(this,function(y){switch(y.label){case 0:return this.applyEffects(s.getEffects(2)),n=s.container.styles,o=!CA(n.backgroundColor)||n.backgroundImage.length,l=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],d=wT(Kd(n.backgroundClip,0),s.curves),o||n.boxShadow.length?(this.ctx.save(),this.path(d),this.ctx.clip(),CA(n.backgroundColor)||(this.ctx.fillStyle=xa(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(s.container)]):[3,2];case 1:y.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(p){x.ctx.save();var v=lp(s.curves),N=p.inset?0:gT,B=oT(v,-N+(p.inset?1:-1)*p.spread.number,(p.inset?1:-1)*p.spread.number,p.spread.number*(p.inset?-2:2),p.spread.number*(p.inset?-2:2));p.inset?(x.path(v),x.ctx.clip(),x.mask(B)):(x.mask(v),x.ctx.clip(),x.path(B)),x.ctx.shadowOffsetX=p.offsetX.number+N,x.ctx.shadowOffsetY=p.offsetY.number,x.ctx.shadowColor=xa(p.color),x.ctx.shadowBlur=p.blur.number,x.ctx.fillStyle=p.inset?xa(p.color):"rgba(0,0,0,1)",x.ctx.fill(),x.ctx.restore()}),y.label=2;case 2:c=0,u=0,h=l,y.label=3;case 3:return u<h.length?(m=h[u],m.style!==0&&!CA(m.color)&&m.width>0?m.style!==2?[3,5]:[4,this.renderDashedDottedBorder(m.color,m.width,c,s.curves,2)]:[3,11]):[3,13];case 4:return y.sent(),[3,11];case 5:return m.style!==3?[3,7]:[4,this.renderDashedDottedBorder(m.color,m.width,c,s.curves,3)];case 6:return y.sent(),[3,11];case 7:return m.style!==4?[3,9]:[4,this.renderDoubleBorder(m.color,m.width,c,s.curves)];case 8:return y.sent(),[3,11];case 9:return[4,this.renderSolidBorder(m.color,c,s.curves)];case 10:y.sent(),y.label=11;case 11:c++,y.label=12;case 12:return u++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(s,n,o,l,d){return rn(this,void 0,void 0,function(){var c,u,h,m,x,y,p,v,N,B,g,j,_,w,L,K,L,K;return Ma(this,function(M){return this.ctx.save(),c=dT(l,o),u=q5(l,o),d===2&&(this.path(u),this.ctx.clip()),gi(u[0])?(h=u[0].start.x,m=u[0].start.y):(h=u[0].x,m=u[0].y),gi(u[1])?(x=u[1].end.x,y=u[1].end.y):(x=u[1].x,y=u[1].y),o===0||o===2?p=Math.abs(h-x):p=Math.abs(m-y),this.ctx.beginPath(),d===3?this.formatPath(c):this.formatPath(u.slice(0,2)),v=n<3?n*3:n*2,N=n<3?n*2:n,d===3&&(v=n,N=n),B=!0,p<=v*2?B=!1:p<=v*2+N?(g=p/(2*v+N),v*=g,N*=g):(j=Math.floor((p+N)/(v+N)),_=(p-j*v)/(j-1),w=(p-(j+1)*v)/j,N=w<=0||Math.abs(N-_)<Math.abs(N-w)?_:w),B&&(d===3?this.ctx.setLineDash([0,v+N]):this.ctx.setLineDash([v,N])),d===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=xa(s),this.ctx.stroke(),this.ctx.setLineDash([]),d===2&&(gi(u[0])&&(L=u[3],K=u[0],this.ctx.beginPath(),this.formatPath([new ht(L.end.x,L.end.y),new ht(K.start.x,K.start.y)]),this.ctx.stroke()),gi(u[1])&&(L=u[1],K=u[2],this.ctx.beginPath(),this.formatPath([new ht(L.end.x,L.end.y),new ht(K.start.x,K.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(s){return rn(this,void 0,void 0,function(){var n;return Ma(this,function(o){switch(o.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=xa(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=lT(s),[4,this.renderStack(n)];case 1:return o.sent(),this.applyEffects([]),[2,this.canvas]}})})},t})(A3),yT=function(r){return r instanceof Gj||r instanceof qj?!0:r instanceof Hy&&r.type!==np&&r.type!==ap},wT=function(r,t){switch(r){case 0:return lp(t);case 2:return rT(t);default:return Ap(t)}},vT=function(r){switch(r){case 1:return"center";case 2:return"right";default:return"left"}},NT=["-apple-system","system-ui"],BT=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(t){return NT.indexOf(t)===-1}):r},jT=(function(r){Ao(t,r);function t(s,n){var o=r.call(this,s,n)||this;return o.canvas=n.canvas?n.canvas:document.createElement("canvas"),o.ctx=o.canvas.getContext("2d"),o.options=n,o.canvas.width=Math.floor(n.width*n.scale),o.canvas.height=Math.floor(n.height*n.scale),o.canvas.style.width=n.width+"px",o.canvas.style.height=n.height+"px",o.ctx.scale(o.options.scale,o.options.scale),o.ctx.translate(-n.x,-n.y),o.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),o}return t.prototype.render=function(s){return rn(this,void 0,void 0,function(){var n,o;return Ma(this,function(l){switch(l.label){case 0:return n=dy(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,s),[4,CT(n)];case 1:return o=l.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=xa(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(o,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t})(A3),CT=function(r){return new Promise(function(t,s){var n=new Image;n.onload=function(){t(n)},n.onerror=s,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},ST=(function(){function r(t){var s=t.id,n=t.enabled;this.id=s,this.enabled=n,this.start=Date.now()}return r.prototype.debug=function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,em([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,em([this.id,this.getTime()+"ms"],t))},r.prototype.warn=function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,em([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},r.prototype.error=function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,em([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},r.instances={},r})(),_T=(function(){function r(t,s){var n;this.windowBounds=s,this.instanceName="#"+r.instanceCount++,this.logger=new ST({id:this.instanceName,enabled:t.logging}),this.cache=(n=t.cache)!==null&&n!==void 0?n:new WL(this,t)}return r.instanceCount=1,r})(),c3=function(r,t){return t===void 0&&(t={}),kT(r,t)};typeof window<"u"&&s3.setContext(window);var kT=function(r,t){return rn(void 0,void 0,void 0,function(){var s,n,o,l,d,c,u,h,m,x,y,p,v,N,B,g,j,_,w,L,M,K,M,V,T,ne,Z,U,q,F,le,ae,se,fe,ye,_e,xe,D,$,X;return Ma(this,function(te){switch(te.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(s=r.ownerDocument,!s)throw new Error("Element is not attached to a Document");if(n=s.defaultView,!n)throw new Error("Document is not attached to a Window");return o={allowTaint:(V=t.allowTaint)!==null&&V!==void 0?V:!1,imageTimeout:(T=t.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:t.proxy,useCORS:(ne=t.useCORS)!==null&&ne!==void 0?ne:!1},l=Yb({logging:(Z=t.logging)!==null&&Z!==void 0?Z:!0,cache:t.cache},o),d={windowWidth:(U=t.windowWidth)!==null&&U!==void 0?U:n.innerWidth,windowHeight:(q=t.windowHeight)!==null&&q!==void 0?q:n.innerHeight,scrollX:(F=t.scrollX)!==null&&F!==void 0?F:n.pageXOffset,scrollY:(le=t.scrollY)!==null&&le!==void 0?le:n.pageYOffset},c=new Ql(d.scrollX,d.scrollY,d.windowWidth,d.windowHeight),u=new _T(l,c),h=(ae=t.foreignObjectRendering)!==null&&ae!==void 0?ae:!1,m={allowTaint:(se=t.allowTaint)!==null&&se!==void 0?se:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:h,copyStyles:h},u.logger.debug("Starting document clone with size "+c.width+"x"+c.height+" scrolled to "+-c.left+","+-c.top),x=new P5(u,r,m),y=x.clonedReferenceElement,y?[4,x.toIFrame(s,c)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return p=te.sent(),v=My(y)||EL(y)?oE(y.ownerDocument):bp(u,y),N=v.width,B=v.height,g=v.left,j=v.top,_=FT(u,y,t.backgroundColor),w={canvas:t.canvas,backgroundColor:_,scale:(ye=(fe=t.scale)!==null&&fe!==void 0?fe:n.devicePixelRatio)!==null&&ye!==void 0?ye:1,x:((_e=t.x)!==null&&_e!==void 0?_e:0)+g,y:((xe=t.y)!==null&&xe!==void 0?xe:0)+j,width:(D=t.width)!==null&&D!==void 0?D:Math.ceil(N),height:($=t.height)!==null&&$!==void 0?$:Math.ceil(B)},h?(u.logger.debug("Document cloned, using foreign object rendering"),M=new jT(u,w),[4,M.render(y)]):[3,3];case 2:return L=te.sent(),[3,5];case 3:return u.logger.debug("Document cloned, element located at "+g+","+j+" with size "+N+"x"+B+" using computed rendering"),u.logger.debug("Starting DOM parsing"),K=Xj(u,y),_===K.styles.backgroundColor&&(K.styles.backgroundColor=El.TRANSPARENT),u.logger.debug("Starting renderer for element at "+w.x+","+w.y+" with size "+w.width+"x"+w.height),M=new bT(u,w),[4,M.render(K)];case 4:L=te.sent(),te.label=5;case 5:return(!((X=t.removeContainer)!==null&&X!==void 0)||X)&&(P5.destroy(p)||u.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),u.logger.debug("Finished rendering"),[2,L]}})})},FT=function(r,t,s){var n=t.ownerDocument,o=n.documentElement?Ch(r,getComputedStyle(n.documentElement).backgroundColor):El.TRANSPARENT,l=n.body?Ch(r,getComputedStyle(n.body).backgroundColor):El.TRANSPARENT,d=typeof s=="string"?Ch(r,s):s===null?El.TRANSPARENT:4294967295;return t===n.documentElement?CA(o)?CA(l)?d:l:o:d};const ET=Object.freeze(Object.defineProperty({__proto__:null,default:c3},Symbol.toStringTag,{value:"Module"}));var UT=Object.defineProperty,QT=Object.defineProperties,LT=Object.getOwnPropertyDescriptors,V5=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,IT=Object.prototype.propertyIsEnumerable,gy=(r,t,s)=>t in r?UT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s,gr=(r,t)=>{for(var s in t||(t={}))TT.call(t,s)&&gy(r,s,t[s]);if(V5)for(var s of V5(t))IT.call(t,s)&&gy(r,s,t[s]);return r},ou=(r,t)=>QT(r,LT(t)),et=(r,t,s)=>gy(r,typeof t!="symbol"?t+"":t,s),DT=(r,t,s)=>new Promise((n,o)=>{var l=u=>{try{c(s.next(u))}catch(h){o(h)}},d=u=>{try{c(s.throw(u))}catch(h){o(h)}},c=u=>u.done?n(u.value):Promise.resolve(u.value).then(l,d);c((s=s.apply(r,t)).next())});class dp{constructor(t){et(this,"rootKey"),this.rootKey=t}}const RT=Object.seal({});class rt extends dp{constructor(t){super(t),et(this,"root"),this.root=new Array}prepForXml(t){var s;t.stack.push(this);const n=this.root.map(o=>o instanceof dp?o.prepForXml(t):o).filter(o=>o!==void 0);return t.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((s=n[0])!=null&&s._attr)?n[0]:n:RT}}addChildElement(t){return this.root.push(t),this}}class Ll extends rt{prepForXml(t){const s=super.prepForXml(t);if(s&&(typeof s[this.rootKey]!="object"||Object.keys(s[this.rootKey]).length))return s}}class Ht extends dp{constructor(t){super("_attr"),et(this,"xmlKeys"),this.root=t}prepForXml(t){const s={};return Object.entries(this.root).forEach(([n,o])=>{if(o!==void 0){const l=this.xmlKeys&&this.xmlKeys[n]||n;s[l]=o}}),{_attr:s}}}class kA extends dp{constructor(t){super("_attr"),this.root=t}prepForXml(t){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:o,value:l})=>ou(gr({},n),{[o]:l}),{})}}}class Qs extends Ht{constructor(){super(...arguments),et(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 Oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d3(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Gg={},Nm={exports:{}},W5;function Py(){if(W5)return Nm.exports;W5=1;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(L,K,M){return Function.prototype.apply.call(L,K,M)},s;r&&typeof r.ownKeys=="function"?s=r.ownKeys:Object.getOwnPropertySymbols?s=function(L){return Object.getOwnPropertyNames(L).concat(Object.getOwnPropertySymbols(L))}:s=function(L){return Object.getOwnPropertyNames(L)};function n(w){console&&console.warn&&console.warn(w)}var o=Number.isNaN||function(L){return L!==L};function l(){l.init.call(this)}Nm.exports=l,Nm.exports.once=g,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var d=10;function c(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(w){if(typeof w!="number"||w<0||o(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");d=w}}),l.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},l.prototype.setMaxListeners=function(L){if(typeof L!="number"||L<0||o(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this};function u(w){return w._maxListeners===void 0?l.defaultMaxListeners:w._maxListeners}l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(L){for(var K=[],M=1;M<arguments.length;M++)K.push(arguments[M]);var V=L==="error",T=this._events;if(T!==void 0)V=V&&T.error===void 0;else if(!V)return!1;if(V){var ne;if(K.length>0&&(ne=K[0]),ne instanceof Error)throw ne;var Z=new Error("Unhandled error."+(ne?" ("+ne.message+")":""));throw Z.context=ne,Z}var U=T[L];if(U===void 0)return!1;if(typeof U=="function")t(U,this,K);else for(var q=U.length,F=v(U,q),M=0;M<q;++M)t(F[M],this,K);return!0};function h(w,L,K,M){var V,T,ne;if(c(K),T=w._events,T===void 0?(T=w._events=Object.create(null),w._eventsCount=0):(T.newListener!==void 0&&(w.emit("newListener",L,K.listener?K.listener:K),T=w._events),ne=T[L]),ne===void 0)ne=T[L]=K,++w._eventsCount;else if(typeof ne=="function"?ne=T[L]=M?[K,ne]:[ne,K]:M?ne.unshift(K):ne.push(K),V=u(w),V>0&&ne.length>V&&!ne.warned){ne.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+ne.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=w,Z.type=L,Z.count=ne.length,n(Z)}return w}l.prototype.addListener=function(L,K){return h(this,L,K,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(L,K){return h(this,L,K,!0)};function m(){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 x(w,L,K){var M={fired:!1,wrapFn:void 0,target:w,type:L,listener:K},V=m.bind(M);return V.listener=K,M.wrapFn=V,V}l.prototype.once=function(L,K){return c(K),this.on(L,x(this,L,K)),this},l.prototype.prependOnceListener=function(L,K){return c(K),this.prependListener(L,x(this,L,K)),this},l.prototype.removeListener=function(L,K){var M,V,T,ne,Z;if(c(K),V=this._events,V===void 0)return this;if(M=V[L],M===void 0)return this;if(M===K||M.listener===K)--this._eventsCount===0?this._events=Object.create(null):(delete V[L],V.removeListener&&this.emit("removeListener",L,M.listener||K));else if(typeof M!="function"){for(T=-1,ne=M.length-1;ne>=0;ne--)if(M[ne]===K||M[ne].listener===K){Z=M[ne].listener,T=ne;break}if(T<0)return this;T===0?M.shift():N(M,T),M.length===1&&(V[L]=M[0]),V.removeListener!==void 0&&this.emit("removeListener",L,Z||K)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var K,M,V;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[L]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[L]),this;if(arguments.length===0){var T=Object.keys(M),ne;for(V=0;V<T.length;++V)ne=T[V],ne!=="removeListener"&&this.removeAllListeners(ne);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(K=M[L],typeof K=="function")this.removeListener(L,K);else if(K!==void 0)for(V=K.length-1;V>=0;V--)this.removeListener(L,K[V]);return this};function y(w,L,K){var M=w._events;if(M===void 0)return[];var V=M[L];return V===void 0?[]:typeof V=="function"?K?[V.listener||V]:[V]:K?B(V):v(V,V.length)}l.prototype.listeners=function(L){return y(this,L,!0)},l.prototype.rawListeners=function(L){return y(this,L,!1)},l.listenerCount=function(w,L){return typeof w.listenerCount=="function"?w.listenerCount(L):p.call(w,L)},l.prototype.listenerCount=p;function p(w){var L=this._events;if(L!==void 0){var K=L[w];if(typeof K=="function")return 1;if(K!==void 0)return K.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function v(w,L){for(var K=new Array(L),M=0;M<L;++M)K[M]=w[M];return K}function N(w,L){for(;L+1<w.length;L++)w[L]=w[L+1];w.pop()}function B(w){for(var L=new Array(w.length),K=0;K<L.length;++K)L[K]=w[K].listener||w[K];return L}function g(w,L){return new Promise(function(K,M){function V(ne){w.removeListener(L,T),M(ne)}function T(){typeof w.removeListener=="function"&&w.removeListener("error",V),K([].slice.call(arguments))}_(w,L,T,{once:!0}),L!=="error"&&j(w,V,{once:!0})})}function j(w,L,K){typeof w.on=="function"&&_(w,"error",L,K)}function _(w,L,K,M){if(typeof w.on=="function")M.once?w.once(L,K):w.on(L,K);else if(typeof w.addEventListener=="function")w.addEventListener(L,function V(T){M.once&&w.removeEventListener(L,V),K(T)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}return Nm.exports}var Bm={exports:{}},X5;function FA(){return X5||(X5=1,typeof Object.create=="function"?Bm.exports=function(t,s){s&&(t.super_=s,t.prototype=Object.create(s.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Bm.exports=function(t,s){if(s){t.super_=s;var n=function(){};n.prototype=s.prototype,t.prototype=new n,t.prototype.constructor=t}}),Bm.exports}function OT(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var u3={exports:{}},zs=u3.exports={},Io,Do;function by(){throw new Error("setTimeout has not been defined")}function yy(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Io=setTimeout:Io=by}catch{Io=by}try{typeof clearTimeout=="function"?Do=clearTimeout:Do=yy}catch{Do=yy}})();function h3(r){if(Io===setTimeout)return setTimeout(r,0);if((Io===by||!Io)&&setTimeout)return Io=setTimeout,setTimeout(r,0);try{return Io(r,0)}catch{try{return Io.call(null,r,0)}catch{return Io.call(this,r,0)}}}function HT(r){if(Do===clearTimeout)return clearTimeout(r);if((Do===yy||!Do)&&clearTimeout)return Do=clearTimeout,clearTimeout(r);try{return Do(r)}catch{try{return Do.call(null,r)}catch{return Do.call(this,r)}}}var kl=[],tu=!1,bc,Vm=-1;function MT(){!tu||!bc||(tu=!1,bc.length?kl=bc.concat(kl):Vm=-1,kl.length&&f3())}function f3(){if(!tu){var r=h3(MT);tu=!0;for(var t=kl.length;t;){for(bc=kl,kl=[];++Vm<t;)bc&&bc[Vm].run();Vm=-1,t=kl.length}bc=null,tu=!1,HT(r)}}zs.nextTick=function(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)t[s-1]=arguments[s];kl.push(new m3(r,t)),kl.length===1&&!tu&&h3(f3)};function m3(r,t){this.fun=r,this.array=t}m3.prototype.run=function(){this.fun.apply(null,this.array)};zs.title="browser";zs.browser=!0;zs.env={};zs.argv=[];zs.version="";zs.versions={};function Tl(){}zs.on=Tl;zs.addListener=Tl;zs.once=Tl;zs.off=Tl;zs.removeListener=Tl;zs.removeAllListeners=Tl;zs.emit=Tl;zs.prependListener=Tl;zs.prependOnceListener=Tl;zs.listeners=function(r){return[]};zs.binding=function(r){throw new Error("process.binding is not supported")};zs.cwd=function(){return"/"};zs.chdir=function(r){throw new Error("process.chdir is not supported")};zs.umask=function(){return 0};var PT=u3.exports;const rr=OT(PT);var Vg,Y5;function p3(){return Y5||(Y5=1,Vg=Py().EventEmitter),Vg}var Wg={},Ah={},J5;function KT(){if(J5)return Ah;J5=1,Ah.byteLength=c,Ah.toByteArray=h,Ah.fromByteArray=y;for(var r=[],t=[],s=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=n.length;o<l;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;t[45]=62,t[95]=63;function d(p){var v=p.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=p.indexOf("=");N===-1&&(N=v);var B=N===v?0:4-N%4;return[N,B]}function c(p){var v=d(p),N=v[0],B=v[1];return(N+B)*3/4-B}function u(p,v,N){return(v+N)*3/4-N}function h(p){var v,N=d(p),B=N[0],g=N[1],j=new s(u(p,B,g)),_=0,w=g>0?B-4:B,L;for(L=0;L<w;L+=4)v=t[p.charCodeAt(L)]<<18|t[p.charCodeAt(L+1)]<<12|t[p.charCodeAt(L+2)]<<6|t[p.charCodeAt(L+3)],j[_++]=v>>16&255,j[_++]=v>>8&255,j[_++]=v&255;return g===2&&(v=t[p.charCodeAt(L)]<<2|t[p.charCodeAt(L+1)]>>4,j[_++]=v&255),g===1&&(v=t[p.charCodeAt(L)]<<10|t[p.charCodeAt(L+1)]<<4|t[p.charCodeAt(L+2)]>>2,j[_++]=v>>8&255,j[_++]=v&255),j}function m(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function x(p,v,N){for(var B,g=[],j=v;j<N;j+=3)B=(p[j]<<16&16711680)+(p[j+1]<<8&65280)+(p[j+2]&255),g.push(m(B));return g.join("")}function y(p){for(var v,N=p.length,B=N%3,g=[],j=16383,_=0,w=N-B;_<w;_+=j)g.push(x(p,_,_+j>w?w:_+j));return B===1?(v=p[N-1],g.push(r[v>>2]+r[v<<4&63]+"==")):B===2&&(v=(p[N-2]<<8)+p[N-1],g.push(r[v>>10]+r[v>>4&63]+r[v<<2&63]+"=")),g.join("")}return Ah}var jm={};var Z5;function zT(){return Z5||(Z5=1,jm.read=function(r,t,s,n,o){var l,d,c=o*8-n-1,u=(1<<c)-1,h=u>>1,m=-7,x=s?o-1:0,y=s?-1:1,p=r[t+x];for(x+=y,l=p&(1<<-m)-1,p>>=-m,m+=c;m>0;l=l*256+r[t+x],x+=y,m-=8);for(d=l&(1<<-m)-1,l>>=-m,m+=n;m>0;d=d*256+r[t+x],x+=y,m-=8);if(l===0)l=1-h;else{if(l===u)return d?NaN:(p?-1:1)*(1/0);d=d+Math.pow(2,n),l=l-h}return(p?-1:1)*d*Math.pow(2,l-n)},jm.write=function(r,t,s,n,o,l){var d,c,u,h=l*8-o-1,m=(1<<h)-1,x=m>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:l-1,v=n?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,d=m):(d=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-d))<1&&(d--,u*=2),d+x>=1?t+=y/u:t+=y*Math.pow(2,1-x),t*u>=2&&(d++,u/=2),d+x>=m?(c=0,d=m):d+x>=1?(c=(t*u-1)*Math.pow(2,o),d=d+x):(c=t*Math.pow(2,x-1)*Math.pow(2,o),d=0));o>=8;r[s+p]=c&255,p+=v,c/=256,o-=8);for(d=d<<o|c,h+=o;h>0;r[s+p]=d&255,p+=v,d/=256,h-=8);r[s+p-v]|=N*128}),jm}var $5;function kp(){return $5||($5=1,(function(r){var t=KT(),s=zT(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=c,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;var o=2147483647;r.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=l(),!c.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 l(){try{var W=new Uint8Array(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,Uint8Array.prototype),Object.setPrototypeOf(W,Q),W.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function d(W){if(W>o)throw new RangeError('The value "'+W+'" is invalid for option "size"');var Q=new Uint8Array(W);return Object.setPrototypeOf(Q,c.prototype),Q}function c(W,Q,I){if(typeof W=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(W)}return u(W,Q,I)}c.poolSize=8192;function u(W,Q,I){if(typeof W=="string")return y(W,Q);if(ArrayBuffer.isView(W))return v(W);if(W==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W);if(Se(W,ArrayBuffer)||W&&Se(W.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Se(W,SharedArrayBuffer)||W&&Se(W.buffer,SharedArrayBuffer)))return N(W,Q,I);if(typeof W=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var k=W.valueOf&&W.valueOf();if(k!=null&&k!==W)return c.from(k,Q,I);var G=B(W);if(G)return G;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof W[Symbol.toPrimitive]=="function")return c.from(W[Symbol.toPrimitive]("string"),Q,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W)}c.from=function(W,Q,I){return u(W,Q,I)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function h(W){if(typeof W!="number")throw new TypeError('"size" argument must be of type number');if(W<0)throw new RangeError('The value "'+W+'" is invalid for option "size"')}function m(W,Q,I){return h(W),W<=0?d(W):Q!==void 0?typeof I=="string"?d(W).fill(Q,I):d(W).fill(Q):d(W)}c.alloc=function(W,Q,I){return m(W,Q,I)};function x(W){return h(W),d(W<0?0:g(W)|0)}c.allocUnsafe=function(W){return x(W)},c.allocUnsafeSlow=function(W){return x(W)};function y(W,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!c.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);var I=_(W,Q)|0,k=d(I),G=k.write(W,Q);return G!==I&&(k=k.slice(0,G)),k}function p(W){for(var Q=W.length<0?0:g(W.length)|0,I=d(Q),k=0;k<Q;k+=1)I[k]=W[k]&255;return I}function v(W){if(Se(W,Uint8Array)){var Q=new Uint8Array(W);return N(Q.buffer,Q.byteOffset,Q.byteLength)}return p(W)}function N(W,Q,I){if(Q<0||W.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(W.byteLength<Q+(I||0))throw new RangeError('"length" is outside of buffer bounds');var k;return Q===void 0&&I===void 0?k=new Uint8Array(W):I===void 0?k=new Uint8Array(W,Q):k=new Uint8Array(W,Q,I),Object.setPrototypeOf(k,c.prototype),k}function B(W){if(c.isBuffer(W)){var Q=g(W.length)|0,I=d(Q);return I.length===0||W.copy(I,0,0,Q),I}if(W.length!==void 0)return typeof W.length!="number"||z(W.length)?d(0):p(W);if(W.type==="Buffer"&&Array.isArray(W.data))return p(W.data)}function g(W){if(W>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return W|0}function j(W){return+W!=W&&(W=0),c.alloc(+W)}c.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==c.prototype},c.compare=function(Q,I){if(Se(Q,Uint8Array)&&(Q=c.from(Q,Q.offset,Q.byteLength)),Se(I,Uint8Array)&&(I=c.from(I,I.offset,I.byteLength)),!c.isBuffer(Q)||!c.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===I)return 0;for(var k=Q.length,G=I.length,me=0,be=Math.min(k,G);me<be;++me)if(Q[me]!==I[me]){k=Q[me],G=I[me];break}return k<G?-1:G<k?1:0},c.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(Q,I){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return c.alloc(0);var k;if(I===void 0)for(I=0,k=0;k<Q.length;++k)I+=Q[k].length;var G=c.allocUnsafe(I),me=0;for(k=0;k<Q.length;++k){var be=Q[k];if(Se(be,Uint8Array))me+be.length>G.length?c.from(be).copy(G,me):Uint8Array.prototype.set.call(G,be,me);else if(c.isBuffer(be))be.copy(G,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=be.length}return G};function _(W,Q){if(c.isBuffer(W))return W.length;if(ArrayBuffer.isView(W)||Se(W,ArrayBuffer))return W.byteLength;if(typeof W!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W);var I=W.length,k=arguments.length>2&&arguments[2]===!0;if(!k&&I===0)return 0;for(var G=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return H(W).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return oe(W).length;default:if(G)return k?-1:H(W).length;Q=(""+Q).toLowerCase(),G=!0}}c.byteLength=_;function w(W,Q,I){var k=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,Q>>>=0,I<=Q))return"";for(W||(W="utf8");;)switch(W){case"hex":return ye(this,Q,I);case"utf8":case"utf-8":return F(this,Q,I);case"ascii":return se(this,Q,I);case"latin1":case"binary":return fe(this,Q,I);case"base64":return q(this,Q,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,Q,I);default:if(k)throw new TypeError("Unknown encoding: "+W);W=(W+"").toLowerCase(),k=!0}}c.prototype._isBuffer=!0;function L(W,Q,I){var k=W[Q];W[Q]=W[I],W[I]=k}c.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;I<Q;I+=2)L(this,I,I+1);return this},c.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;I<Q;I+=4)L(this,I,I+3),L(this,I+1,I+2);return this},c.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;I<Q;I+=8)L(this,I,I+7),L(this,I+1,I+6),L(this,I+2,I+5),L(this,I+3,I+4);return this},c.prototype.toString=function(){var Q=this.length;return Q===0?"":arguments.length===0?F(this,0,Q):w.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(Q){if(!c.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:c.compare(this,Q)===0},c.prototype.inspect=function(){var Q="",I=r.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(Q+=" ... "),"<Buffer "+Q+">"},n&&(c.prototype[n]=c.prototype.inspect),c.prototype.compare=function(Q,I,k,G,me){if(Se(Q,Uint8Array)&&(Q=c.from(Q,Q.offset,Q.byteLength)),!c.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(I===void 0&&(I=0),k===void 0&&(k=Q?Q.length:0),G===void 0&&(G=0),me===void 0&&(me=this.length),I<0||k>Q.length||G<0||me>this.length)throw new RangeError("out of range index");if(G>=me&&I>=k)return 0;if(G>=me)return-1;if(I>=k)return 1;if(I>>>=0,k>>>=0,G>>>=0,me>>>=0,this===Q)return 0;for(var be=me-G,Ue=k-I,Re=Math.min(be,Ue),He=this.slice(G,me),Ve=Q.slice(I,k),it=0;it<Re;++it)if(He[it]!==Ve[it]){be=He[it],Ue=Ve[it];break}return be<Ue?-1:Ue<be?1:0};function K(W,Q,I,k,G){if(W.length===0)return-1;if(typeof I=="string"?(k=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,z(I)&&(I=G?0:W.length-1),I<0&&(I=W.length+I),I>=W.length){if(G)return-1;I=W.length-1}else if(I<0)if(G)I=0;else return-1;if(typeof Q=="string"&&(Q=c.from(Q,k)),c.isBuffer(Q))return Q.length===0?-1:M(W,Q,I,k,G);if(typeof Q=="number")return Q=Q&255,typeof Uint8Array.prototype.indexOf=="function"?G?Uint8Array.prototype.indexOf.call(W,Q,I):Uint8Array.prototype.lastIndexOf.call(W,Q,I):M(W,[Q],I,k,G);throw new TypeError("val must be string, number or Buffer")}function M(W,Q,I,k,G){var me=1,be=W.length,Ue=Q.length;if(k!==void 0&&(k=String(k).toLowerCase(),k==="ucs2"||k==="ucs-2"||k==="utf16le"||k==="utf-16le")){if(W.length<2||Q.length<2)return-1;me=2,be/=2,Ue/=2,I/=2}function Re(ut,Tt){return me===1?ut[Tt]:ut.readUInt16BE(Tt*me)}var He;if(G){var Ve=-1;for(He=I;He<be;He++)if(Re(W,He)===Re(Q,Ve===-1?0:He-Ve)){if(Ve===-1&&(Ve=He),He-Ve+1===Ue)return Ve*me}else Ve!==-1&&(He-=He-Ve),Ve=-1}else for(I+Ue>be&&(I=be-Ue),He=I;He>=0;He--){for(var it=!0,lt=0;lt<Ue;lt++)if(Re(W,He+lt)!==Re(Q,lt)){it=!1;break}if(it)return He}return-1}c.prototype.includes=function(Q,I,k){return this.indexOf(Q,I,k)!==-1},c.prototype.indexOf=function(Q,I,k){return K(this,Q,I,k,!0)},c.prototype.lastIndexOf=function(Q,I,k){return K(this,Q,I,k,!1)};function V(W,Q,I,k){I=Number(I)||0;var G=W.length-I;k?(k=Number(k),k>G&&(k=G)):k=G;var me=Q.length;k>me/2&&(k=me/2);for(var be=0;be<k;++be){var Ue=parseInt(Q.substr(be*2,2),16);if(z(Ue))return be;W[I+be]=Ue}return be}function T(W,Q,I,k){return ce(H(Q,W.length-I),W,I,k)}function ne(W,Q,I,k){return ce(re(Q),W,I,k)}function Z(W,Q,I,k){return ce(oe(Q),W,I,k)}function U(W,Q,I,k){return ce(Ae(Q,W.length-I),W,I,k)}c.prototype.write=function(Q,I,k,G){if(I===void 0)G="utf8",k=this.length,I=0;else if(k===void 0&&typeof I=="string")G=I,k=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(k)?(k=k>>>0,G===void 0&&(G="utf8")):(G=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var me=this.length-I;if((k===void 0||k>me)&&(k=me),Q.length>0&&(k<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");G||(G="utf8");for(var be=!1;;)switch(G){case"hex":return V(this,Q,I,k);case"utf8":case"utf-8":return T(this,Q,I,k);case"ascii":case"latin1":case"binary":return ne(this,Q,I,k);case"base64":return Z(this,Q,I,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Q,I,k);default:if(be)throw new TypeError("Unknown encoding: "+G);G=(""+G).toLowerCase(),be=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(W,Q,I){return Q===0&&I===W.length?t.fromByteArray(W):t.fromByteArray(W.slice(Q,I))}function F(W,Q,I){I=Math.min(W.length,I);for(var k=[],G=Q;G<I;){var me=W[G],be=null,Ue=me>239?4:me>223?3:me>191?2:1;if(G+Ue<=I){var Re,He,Ve,it;switch(Ue){case 1:me<128&&(be=me);break;case 2:Re=W[G+1],(Re&192)===128&&(it=(me&31)<<6|Re&63,it>127&&(be=it));break;case 3:Re=W[G+1],He=W[G+2],(Re&192)===128&&(He&192)===128&&(it=(me&15)<<12|(Re&63)<<6|He&63,it>2047&&(it<55296||it>57343)&&(be=it));break;case 4:Re=W[G+1],He=W[G+2],Ve=W[G+3],(Re&192)===128&&(He&192)===128&&(Ve&192)===128&&(it=(me&15)<<18|(Re&63)<<12|(He&63)<<6|Ve&63,it>65535&&it<1114112&&(be=it))}}be===null?(be=65533,Ue=1):be>65535&&(be-=65536,k.push(be>>>10&1023|55296),be=56320|be&1023),k.push(be),G+=Ue}return ae(k)}var le=4096;function ae(W){var Q=W.length;if(Q<=le)return String.fromCharCode.apply(String,W);for(var I="",k=0;k<Q;)I+=String.fromCharCode.apply(String,W.slice(k,k+=le));return I}function se(W,Q,I){var k="";I=Math.min(W.length,I);for(var G=Q;G<I;++G)k+=String.fromCharCode(W[G]&127);return k}function fe(W,Q,I){var k="";I=Math.min(W.length,I);for(var G=Q;G<I;++G)k+=String.fromCharCode(W[G]);return k}function ye(W,Q,I){var k=W.length;(!Q||Q<0)&&(Q=0),(!I||I<0||I>k)&&(I=k);for(var G="",me=Q;me<I;++me)G+=ie[W[me]];return G}function _e(W,Q,I){for(var k=W.slice(Q,I),G="",me=0;me<k.length-1;me+=2)G+=String.fromCharCode(k[me]+k[me+1]*256);return G}c.prototype.slice=function(Q,I){var k=this.length;Q=~~Q,I=I===void 0?k:~~I,Q<0?(Q+=k,Q<0&&(Q=0)):Q>k&&(Q=k),I<0?(I+=k,I<0&&(I=0)):I>k&&(I=k),I<Q&&(I=Q);var G=this.subarray(Q,I);return Object.setPrototypeOf(G,c.prototype),G};function xe(W,Q,I){if(W%1!==0||W<0)throw new RangeError("offset is not uint");if(W+Q>I)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(Q,I,k){Q=Q>>>0,I=I>>>0,k||xe(Q,I,this.length);for(var G=this[Q],me=1,be=0;++be<I&&(me*=256);)G+=this[Q+be]*me;return G},c.prototype.readUintBE=c.prototype.readUIntBE=function(Q,I,k){Q=Q>>>0,I=I>>>0,k||xe(Q,I,this.length);for(var G=this[Q+--I],me=1;I>0&&(me*=256);)G+=this[Q+--I]*me;return G},c.prototype.readUint8=c.prototype.readUInt8=function(Q,I){return Q=Q>>>0,I||xe(Q,1,this.length),this[Q]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(Q,I){return Q=Q>>>0,I||xe(Q,2,this.length),this[Q]|this[Q+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(Q,I){return Q=Q>>>0,I||xe(Q,2,this.length),this[Q]<<8|this[Q+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},c.prototype.readIntLE=function(Q,I,k){Q=Q>>>0,I=I>>>0,k||xe(Q,I,this.length);for(var G=this[Q],me=1,be=0;++be<I&&(me*=256);)G+=this[Q+be]*me;return me*=128,G>=me&&(G-=Math.pow(2,8*I)),G},c.prototype.readIntBE=function(Q,I,k){Q=Q>>>0,I=I>>>0,k||xe(Q,I,this.length);for(var G=I,me=1,be=this[Q+--G];G>0&&(me*=256);)be+=this[Q+--G]*me;return me*=128,be>=me&&(be-=Math.pow(2,8*I)),be},c.prototype.readInt8=function(Q,I){return Q=Q>>>0,I||xe(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},c.prototype.readInt16LE=function(Q,I){Q=Q>>>0,I||xe(Q,2,this.length);var k=this[Q]|this[Q+1]<<8;return k&32768?k|4294901760:k},c.prototype.readInt16BE=function(Q,I){Q=Q>>>0,I||xe(Q,2,this.length);var k=this[Q+1]|this[Q]<<8;return k&32768?k|4294901760:k},c.prototype.readInt32LE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},c.prototype.readInt32BE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},c.prototype.readFloatLE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),s.read(this,Q,!0,23,4)},c.prototype.readFloatBE=function(Q,I){return Q=Q>>>0,I||xe(Q,4,this.length),s.read(this,Q,!1,23,4)},c.prototype.readDoubleLE=function(Q,I){return Q=Q>>>0,I||xe(Q,8,this.length),s.read(this,Q,!0,52,8)},c.prototype.readDoubleBE=function(Q,I){return Q=Q>>>0,I||xe(Q,8,this.length),s.read(this,Q,!1,52,8)};function D(W,Q,I,k,G,me){if(!c.isBuffer(W))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>G||Q<me)throw new RangeError('"value" argument is out of bounds');if(I+k>W.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(Q,I,k,G){if(Q=+Q,I=I>>>0,k=k>>>0,!G){var me=Math.pow(2,8*k)-1;D(this,Q,I,k,me,0)}var be=1,Ue=0;for(this[I]=Q&255;++Ue<k&&(be*=256);)this[I+Ue]=Q/be&255;return I+k},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(Q,I,k,G){if(Q=+Q,I=I>>>0,k=k>>>0,!G){var me=Math.pow(2,8*k)-1;D(this,Q,I,k,me,0)}var be=k-1,Ue=1;for(this[I+be]=Q&255;--be>=0&&(Ue*=256);)this[I+be]=Q/Ue&255;return I+k},c.prototype.writeUint8=c.prototype.writeUInt8=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,1,255,0),this[I]=Q&255,I+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,2,65535,0),this[I]=Q&255,this[I+1]=Q>>>8,I+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,2,65535,0),this[I]=Q>>>8,this[I+1]=Q&255,I+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,4,4294967295,0),this[I+3]=Q>>>24,this[I+2]=Q>>>16,this[I+1]=Q>>>8,this[I]=Q&255,I+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,4,4294967295,0),this[I]=Q>>>24,this[I+1]=Q>>>16,this[I+2]=Q>>>8,this[I+3]=Q&255,I+4},c.prototype.writeIntLE=function(Q,I,k,G){if(Q=+Q,I=I>>>0,!G){var me=Math.pow(2,8*k-1);D(this,Q,I,k,me-1,-me)}var be=0,Ue=1,Re=0;for(this[I]=Q&255;++be<k&&(Ue*=256);)Q<0&&Re===0&&this[I+be-1]!==0&&(Re=1),this[I+be]=(Q/Ue>>0)-Re&255;return I+k},c.prototype.writeIntBE=function(Q,I,k,G){if(Q=+Q,I=I>>>0,!G){var me=Math.pow(2,8*k-1);D(this,Q,I,k,me-1,-me)}var be=k-1,Ue=1,Re=0;for(this[I+be]=Q&255;--be>=0&&(Ue*=256);)Q<0&&Re===0&&this[I+be+1]!==0&&(Re=1),this[I+be]=(Q/Ue>>0)-Re&255;return I+k},c.prototype.writeInt8=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,1,127,-128),Q<0&&(Q=255+Q+1),this[I]=Q&255,I+1},c.prototype.writeInt16LE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,2,32767,-32768),this[I]=Q&255,this[I+1]=Q>>>8,I+2},c.prototype.writeInt16BE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,2,32767,-32768),this[I]=Q>>>8,this[I+1]=Q&255,I+2},c.prototype.writeInt32LE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,4,2147483647,-2147483648),this[I]=Q&255,this[I+1]=Q>>>8,this[I+2]=Q>>>16,this[I+3]=Q>>>24,I+4},c.prototype.writeInt32BE=function(Q,I,k){return Q=+Q,I=I>>>0,k||D(this,Q,I,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[I]=Q>>>24,this[I+1]=Q>>>16,this[I+2]=Q>>>8,this[I+3]=Q&255,I+4};function $(W,Q,I,k,G,me){if(I+k>W.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function X(W,Q,I,k,G){return Q=+Q,I=I>>>0,G||$(W,Q,I,4),s.write(W,Q,I,k,23,4),I+4}c.prototype.writeFloatLE=function(Q,I,k){return X(this,Q,I,!0,k)},c.prototype.writeFloatBE=function(Q,I,k){return X(this,Q,I,!1,k)};function te(W,Q,I,k,G){return Q=+Q,I=I>>>0,G||$(W,Q,I,8),s.write(W,Q,I,k,52,8),I+8}c.prototype.writeDoubleLE=function(Q,I,k){return te(this,Q,I,!0,k)},c.prototype.writeDoubleBE=function(Q,I,k){return te(this,Q,I,!1,k)},c.prototype.copy=function(Q,I,k,G){if(!c.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(k||(k=0),!G&&G!==0&&(G=this.length),I>=Q.length&&(I=Q.length),I||(I=0),G>0&&G<k&&(G=k),G===k||Q.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("sourceEnd out of bounds");G>this.length&&(G=this.length),Q.length-I<G-k&&(G=Q.length-I+k);var me=G-k;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,k,G):Uint8Array.prototype.set.call(Q,this.subarray(k,G),I),me},c.prototype.fill=function(Q,I,k,G){if(typeof Q=="string"){if(typeof I=="string"?(G=I,I=0,k=this.length):typeof k=="string"&&(G=k,k=this.length),G!==void 0&&typeof G!="string")throw new TypeError("encoding must be a string");if(typeof G=="string"&&!c.isEncoding(G))throw new TypeError("Unknown encoding: "+G);if(Q.length===1){var me=Q.charCodeAt(0);(G==="utf8"&&me<128||G==="latin1")&&(Q=me)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(I<0||this.length<I||this.length<k)throw new RangeError("Out of range index");if(k<=I)return this;I=I>>>0,k=k===void 0?this.length:k>>>0,Q||(Q=0);var be;if(typeof Q=="number")for(be=I;be<k;++be)this[be]=Q;else{var Ue=c.isBuffer(Q)?Q:c.from(Q,G),Re=Ue.length;if(Re===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(be=0;be<k-I;++be)this[be+I]=Ue[be%Re]}return this};var J=/[^+/0-9A-Za-z-_]/g;function O(W){if(W=W.split("=")[0],W=W.trim().replace(J,""),W.length<2)return"";for(;W.length%4!==0;)W=W+"=";return W}function H(W,Q){Q=Q||1/0;for(var I,k=W.length,G=null,me=[],be=0;be<k;++be){if(I=W.charCodeAt(be),I>55295&&I<57344){if(!G){if(I>56319){(Q-=3)>-1&&me.push(239,191,189);continue}else if(be+1===k){(Q-=3)>-1&&me.push(239,191,189);continue}G=I;continue}if(I<56320){(Q-=3)>-1&&me.push(239,191,189),G=I;continue}I=(G-55296<<10|I-56320)+65536}else G&&(Q-=3)>-1&&me.push(239,191,189);if(G=null,I<128){if((Q-=1)<0)break;me.push(I)}else if(I<2048){if((Q-=2)<0)break;me.push(I>>6|192,I&63|128)}else if(I<65536){if((Q-=3)<0)break;me.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((Q-=4)<0)break;me.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return me}function re(W){for(var Q=[],I=0;I<W.length;++I)Q.push(W.charCodeAt(I)&255);return Q}function Ae(W,Q){for(var I,k,G,me=[],be=0;be<W.length&&!((Q-=2)<0);++be)I=W.charCodeAt(be),k=I>>8,G=I%256,me.push(G),me.push(k);return me}function oe(W){return t.toByteArray(O(W))}function ce(W,Q,I,k){for(var G=0;G<k&&!(G+I>=Q.length||G>=W.length);++G)Q[G+I]=W[G];return G}function Se(W,Q){return W instanceof Q||W!=null&&W.constructor!=null&&W.constructor.name!=null&&W.constructor.name===Q.name}function z(W){return W!==W}var ie=(function(){for(var W="0123456789abcdef",Q=new Array(256),I=0;I<16;++I)for(var k=I*16,G=0;G<16;++G)Q[k+G]=W[I]+W[G];return Q})()})(Wg)),Wg}var Xg={},Yg={},Jg,eN;function x3(){return eN||(eN=1,Jg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),n=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[s]=o;for(var l in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var d=Object.getOwnPropertySymbols(t);if(d.length!==1||d[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,s);if(c.value!==o||c.enumerable!==!0)return!1}return!0}),Jg}var Zg,tN;function Ky(){if(tN)return Zg;tN=1;var r=x3();return Zg=function(){return r()&&!!Symbol.toStringTag},Zg}var $g,rN;function g3(){return rN||(rN=1,$g=Object),$g}var e0,sN;function qT(){return sN||(sN=1,e0=Error),e0}var t0,aN;function GT(){return aN||(aN=1,t0=EvalError),t0}var r0,nN;function VT(){return nN||(nN=1,r0=RangeError),r0}var s0,iN;function WT(){return iN||(iN=1,s0=ReferenceError),s0}var a0,oN;function b3(){return oN||(oN=1,a0=SyntaxError),a0}var n0,lN;function Gh(){return lN||(lN=1,n0=TypeError),n0}var i0,AN;function XT(){return AN||(AN=1,i0=URIError),i0}var o0,cN;function YT(){return cN||(cN=1,o0=Math.abs),o0}var l0,dN;function JT(){return dN||(dN=1,l0=Math.floor),l0}var A0,uN;function ZT(){return uN||(uN=1,A0=Math.max),A0}var c0,hN;function $T(){return hN||(hN=1,c0=Math.min),c0}var d0,fN;function eI(){return fN||(fN=1,d0=Math.pow),d0}var u0,mN;function tI(){return mN||(mN=1,u0=Math.round),u0}var h0,pN;function rI(){return pN||(pN=1,h0=Number.isNaN||function(t){return t!==t}),h0}var f0,xN;function sI(){if(xN)return f0;xN=1;var r=rI();return f0=function(s){return r(s)||s===0?s:s<0?-1:1},f0}var m0,gN;function aI(){return gN||(gN=1,m0=Object.getOwnPropertyDescriptor),m0}var p0,bN;function Vh(){if(bN)return p0;bN=1;var r=aI();if(r)try{r([],"length")}catch{r=null}return p0=r,p0}var x0,yN;function Fp(){if(yN)return x0;yN=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return x0=r,x0}var g0,wN;function nI(){if(wN)return g0;wN=1;var r=typeof Symbol<"u"&&Symbol,t=x3();return g0=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},g0}var b0,vN;function y3(){return vN||(vN=1,b0=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),b0}var y0,NN;function w3(){if(NN)return y0;NN=1;var r=g3();return y0=r.getPrototypeOf||null,y0}var w0,BN;function iI(){if(BN)return w0;BN=1;var r="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,s=Math.max,n="[object Function]",o=function(u,h){for(var m=[],x=0;x<u.length;x+=1)m[x]=u[x];for(var y=0;y<h.length;y+=1)m[y+u.length]=h[y];return m},l=function(u,h){for(var m=[],x=h,y=0;x<u.length;x+=1,y+=1)m[y]=u[x];return m},d=function(c,u){for(var h="",m=0;m<c.length;m+=1)h+=c[m],m+1<c.length&&(h+=u);return h};return w0=function(u){var h=this;if(typeof h!="function"||t.apply(h)!==n)throw new TypeError(r+h);for(var m=l(arguments,1),x,y=function(){if(this instanceof x){var g=h.apply(this,o(m,arguments));return Object(g)===g?g:this}return h.apply(u,o(m,arguments))},p=s(0,h.length-m.length),v=[],N=0;N<p;N++)v[N]="$"+N;if(x=Function("binder","return function ("+d(v,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var B=function(){};B.prototype=h.prototype,x.prototype=new B,B.prototype=null}return x},w0}var v0,jN;function Wh(){if(jN)return v0;jN=1;var r=iI();return v0=Function.prototype.bind||r,v0}var N0,CN;function zy(){return CN||(CN=1,N0=Function.prototype.call),N0}var B0,SN;function v3(){return SN||(SN=1,B0=Function.prototype.apply),B0}var j0,_N;function oI(){return _N||(_N=1,j0=typeof Reflect<"u"&&Reflect&&Reflect.apply),j0}var C0,kN;function lI(){if(kN)return C0;kN=1;var r=Wh(),t=v3(),s=zy(),n=oI();return C0=n||r.call(s,t),C0}var S0,FN;function AI(){if(FN)return S0;FN=1;var r=Wh(),t=Gh(),s=zy(),n=lI();return S0=function(l){if(l.length<1||typeof l[0]!="function")throw new t("a function is required");return n(r,s,l)},S0}var _0,EN;function cI(){if(EN)return _0;EN=1;var r=AI(),t=Vh(),s;try{s=[].__proto__===Array.prototype}catch(d){if(!d||typeof d!="object"||!("code"in d)||d.code!=="ERR_PROTO_ACCESS")throw d}var n=!!s&&t&&t(Object.prototype,"__proto__"),o=Object,l=o.getPrototypeOf;return _0=n&&typeof n.get=="function"?r([n.get]):typeof l=="function"?(function(c){return l(c==null?c:o(c))}):!1,_0}var k0,UN;function dI(){if(UN)return k0;UN=1;var r=y3(),t=w3(),s=cI();return k0=r?function(o){return r(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:s?function(o){return s(o)}:null,k0}var F0,QN;function uI(){if(QN)return F0;QN=1;var r=Function.prototype.call,t=Object.prototype.hasOwnProperty,s=Wh();return F0=s.call(r,t),F0}var E0,LN;function qy(){if(LN)return E0;LN=1;var r,t=g3(),s=qT(),n=GT(),o=VT(),l=WT(),d=b3(),c=Gh(),u=XT(),h=YT(),m=JT(),x=ZT(),y=$T(),p=eI(),v=tI(),N=sI(),B=Function,g=function(re){try{return B('"use strict"; return ('+re+").constructor;")()}catch{}},j=Vh(),_=Fp(),w=function(){throw new c},L=j?(function(){try{return arguments.callee,w}catch{try{return j(arguments,"callee").get}catch{return w}}})():w,K=nI()(),M=dI(),V=w3(),T=y3(),ne=v3(),Z=zy(),U={},q=typeof Uint8Array>"u"||!M?r:M(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":K&&M?M([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%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%":s,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":B,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":K&&M?M(M([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!K||!M?r:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":j,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!K||!M?r:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":K&&M?M(""[Symbol.iterator]()):r,"%Symbol%":K?Symbol:r,"%SyntaxError%":d,"%ThrowTypeError%":L,"%TypedArray%":q,"%TypeError%":c,"%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%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":Z,"%Function.prototype.apply%":ne,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":V,"%Math.abs%":h,"%Math.floor%":m,"%Math.max%":x,"%Math.min%":y,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":N,"%Reflect.getPrototypeOf%":T};if(M)try{null.error}catch(re){var le=M(M(re));F["%Error.prototype%"]=le}var ae=function re(Ae){var oe;if(Ae==="%AsyncFunction%")oe=g("async function () {}");else if(Ae==="%GeneratorFunction%")oe=g("function* () {}");else if(Ae==="%AsyncGeneratorFunction%")oe=g("async function* () {}");else if(Ae==="%AsyncGenerator%"){var ce=re("%AsyncGeneratorFunction%");ce&&(oe=ce.prototype)}else if(Ae==="%AsyncIteratorPrototype%"){var Se=re("%AsyncGenerator%");Se&&M&&(oe=M(Se.prototype))}return F[Ae]=oe,oe},se={__proto__:null,"%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"]},fe=Wh(),ye=uI(),_e=fe.call(Z,Array.prototype.concat),xe=fe.call(ne,Array.prototype.splice),D=fe.call(Z,String.prototype.replace),$=fe.call(Z,String.prototype.slice),X=fe.call(Z,RegExp.prototype.exec),te=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,O=function(Ae){var oe=$(Ae,0,1),ce=$(Ae,-1);if(oe==="%"&&ce!=="%")throw new d("invalid intrinsic syntax, expected closing `%`");if(ce==="%"&&oe!=="%")throw new d("invalid intrinsic syntax, expected opening `%`");var Se=[];return D(Ae,te,function(z,ie,W,Q){Se[Se.length]=W?D(Q,J,"$1"):ie||z}),Se},H=function(Ae,oe){var ce=Ae,Se;if(ye(se,ce)&&(Se=se[ce],ce="%"+Se[0]+"%"),ye(F,ce)){var z=F[ce];if(z===U&&(z=ae(ce)),typeof z>"u"&&!oe)throw new c("intrinsic "+Ae+" exists, but is not available. Please file an issue!");return{alias:Se,name:ce,value:z}}throw new d("intrinsic "+Ae+" does not exist!")};return E0=function(Ae,oe){if(typeof Ae!="string"||Ae.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new c('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,Ae)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ce=O(Ae),Se=ce.length>0?ce[0]:"",z=H("%"+Se+"%",oe),ie=z.name,W=z.value,Q=!1,I=z.alias;I&&(Se=I[0],xe(ce,_e([0,1],I)));for(var k=1,G=!0;k<ce.length;k+=1){var me=ce[k],be=$(me,0,1),Ue=$(me,-1);if((be==='"'||be==="'"||be==="`"||Ue==='"'||Ue==="'"||Ue==="`")&&be!==Ue)throw new d("property names with quotes must have matching quotes");if((me==="constructor"||!G)&&(Q=!0),Se+="."+me,ie="%"+Se+"%",ye(F,ie))W=F[ie];else if(W!=null){if(!(me in W)){if(!oe)throw new c("base intrinsic for "+Ae+" exists, but the property is not available.");return}if(j&&k+1>=ce.length){var Re=j(W,me);G=!!Re,G&&"get"in Re&&!("originalValue"in Re.get)?W=Re.get:W=W[me]}else G=ye(W,me),W=W[me];G&&!Q&&(F[ie]=W)}}return W},E0}var U0={exports:{}},Q0,TN;function hI(){if(TN)return Q0;TN=1;var r=Fp(),t=b3(),s=Gh(),n=Vh();return Q0=function(l,d,c){if(!l||typeof l!="object"&&typeof l!="function")throw new s("`obj` must be an object or a function`");if(typeof d!="string"&&typeof d!="symbol")throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new s("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,m=arguments.length>5?arguments[5]:null,x=arguments.length>6?arguments[6]:!1,y=!!n&&n(l,d);if(r)r(l,d,{configurable:m===null&&y?y.configurable:!m,enumerable:u===null&&y?y.enumerable:!u,value:c,writable:h===null&&y?y.writable:!h});else if(x||!u&&!h&&!m)l[d]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Q0}var L0,IN;function fI(){if(IN)return L0;IN=1;var r=Fp(),t=function(){return!!r};return t.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},L0=t,L0}var T0,DN;function mI(){if(DN)return T0;DN=1;var r=qy(),t=hI(),s=fI()(),n=Vh(),o=Gh(),l=r("%Math.floor%");return T0=function(c,u){if(typeof c!="function")throw new o("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||l(u)!==u)throw new o("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],m=!0,x=!0;if("length"in c&&n){var y=n(c,"length");y&&!y.configurable&&(m=!1),y&&!y.writable&&(x=!1)}return(m||x||!h)&&(s?t(c,"length",u,!0,!0):t(c,"length",u)),c},T0}var RN;function N3(){return RN||(RN=1,(function(r){var t=Wh(),s=qy(),n=mI(),o=Gh(),l=s("%Function.prototype.apply%"),d=s("%Function.prototype.call%"),c=s("%Reflect.apply%",!0)||t.call(d,l),u=Fp(),h=s("%Math.max%");r.exports=function(y){if(typeof y!="function")throw new o("a function is required");var p=c(t,d,arguments);return n(p,1+h(0,y.length-(arguments.length-1)),!0)};var m=function(){return c(t,l,arguments)};u?u(r.exports,"apply",{value:m}):r.exports.apply=m})(U0)),U0.exports}var I0,ON;function B3(){if(ON)return I0;ON=1;var r=qy(),t=N3(),s=t(r("String.prototype.indexOf"));return I0=function(o,l){var d=r(o,!!l);return typeof d=="function"&&s(o,".prototype.")>-1?t(d):d},I0}var D0,HN;function pI(){if(HN)return D0;HN=1;var r=Ky()(),t=B3(),s=t("Object.prototype.toString"),n=function(c){return r&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:s(c)==="[object Arguments]"},o=function(c){return n(c)?!0:c!==null&&typeof c=="object"&&typeof c.length=="number"&&c.length>=0&&s(c)!=="[object Array]"&&s(c.callee)==="[object Function]"},l=(function(){return n(arguments)})();return n.isLegacyArguments=o,D0=l?n:o,D0}var R0,MN;function xI(){if(MN)return R0;MN=1;var r=Object.prototype.toString,t=Function.prototype.toString,s=/^\s*(?:function)?\*/,n=Ky()(),o=Object.getPrototypeOf,l=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},d;return R0=function(u){if(typeof u!="function")return!1;if(s.test(t.call(u)))return!0;if(!n){var h=r.call(u);return h==="[object GeneratorFunction]"}if(!o)return!1;if(typeof d>"u"){var m=l();d=m?o(m):!1}return o(u)===d},R0}var O0,PN;function gI(){if(PN)return O0;PN=1;var r=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,s,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{s=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,s)}catch(j){j!==n&&(t=null)}else t=null;var o=/^\s*class\b/,l=function(_){try{var w=r.call(_);return o.test(w)}catch{return!1}},d=function(_){try{return l(_)?!1:(r.call(_),!0)}catch{return!1}},c=Object.prototype.toString,u="[object Object]",h="[object Function]",m="[object GeneratorFunction]",x="[object HTMLAllCollection]",y="[object HTML document.all class]",p="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,N=!(0 in[,]),B=function(){return!1};if(typeof document=="object"){var g=document.all;c.call(g)===c.call(document.all)&&(B=function(_){if((N||!_)&&(typeof _>"u"||typeof _=="object"))try{var w=c.call(_);return(w===x||w===y||w===p||w===u)&&_("")==null}catch{}return!1})}return O0=t?function(_){if(B(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;try{t(_,null,s)}catch(w){if(w!==n)return!1}return!l(_)&&d(_)}:function(_){if(B(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;if(v)return d(_);if(l(_))return!1;var w=c.call(_);return w!==h&&w!==m&&!/^\[object HTML/.test(w)?!1:d(_)},O0}var H0,KN;function bI(){if(KN)return H0;KN=1;var r=gI(),t=Object.prototype.toString,s=Object.prototype.hasOwnProperty,n=function(u,h,m){for(var x=0,y=u.length;x<y;x++)s.call(u,x)&&(m==null?h(u[x],x,u):h.call(m,u[x],x,u))},o=function(u,h,m){for(var x=0,y=u.length;x<y;x++)m==null?h(u.charAt(x),x,u):h.call(m,u.charAt(x),x,u)},l=function(u,h,m){for(var x in u)s.call(u,x)&&(m==null?h(u[x],x,u):h.call(m,u[x],x,u))},d=function(u,h,m){if(!r(h))throw new TypeError("iterator must be a function");var x;arguments.length>=3&&(x=m),t.call(u)==="[object Array]"?n(u,h,x):typeof u=="string"?o(u,h,x):l(u,h,x)};return H0=d,H0}var M0,zN;function yI(){return zN||(zN=1,M0=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),M0}var P0,qN;function wI(){if(qN)return P0;qN=1;var r=yI(),t=typeof globalThis>"u"?Oo:globalThis;return P0=function(){for(var n=[],o=0;o<r.length;o++)typeof t[r[o]]=="function"&&(n[n.length]=r[o]);return n},P0}var K0,GN;function j3(){if(GN)return K0;GN=1;var r=bI(),t=wI(),s=N3(),n=B3(),o=Vh(),l=n("Object.prototype.toString"),d=Ky()(),c=typeof globalThis>"u"?Oo:globalThis,u=t(),h=n("String.prototype.slice"),m=Object.getPrototypeOf,x=n("Array.prototype.indexOf",!0)||function(B,g){for(var j=0;j<B.length;j+=1)if(B[j]===g)return j;return-1},y={__proto__:null};d&&o&&m?r(u,function(N){var B=new c[N];if(Symbol.toStringTag in B){var g=m(B),j=o(g,Symbol.toStringTag);if(!j){var _=m(g);j=o(_,Symbol.toStringTag)}y["$"+N]=s(j.get)}}):r(u,function(N){var B=new c[N],g=B.slice||B.set;g&&(y["$"+N]=s(g))});var p=function(B){var g=!1;return r(y,function(j,_){if(!g)try{"$"+j(B)===_&&(g=h(_,1))}catch{}}),g},v=function(B){var g=!1;return r(y,function(j,_){if(!g)try{j(B),g=h(_,1)}catch{}}),g};return K0=function(B){if(!B||typeof B!="object")return!1;if(!d){var g=h(l(B),8,-1);return x(u,g)>-1?g:g!=="Object"?!1:v(B)}return o?p(B):null},K0}var z0,VN;function vI(){if(VN)return z0;VN=1;var r=j3();return z0=function(s){return!!r(s)},z0}var WN;function NI(){return WN||(WN=1,(function(r){var t=pI(),s=xI(),n=j3(),o=vI();function l(k){return k.call.bind(k)}var d=typeof BigInt<"u",c=typeof Symbol<"u",u=l(Object.prototype.toString),h=l(Number.prototype.valueOf),m=l(String.prototype.valueOf),x=l(Boolean.prototype.valueOf);if(d)var y=l(BigInt.prototype.valueOf);if(c)var p=l(Symbol.prototype.valueOf);function v(k,G){if(typeof k!="object")return!1;try{return G(k),!0}catch{return!1}}r.isArgumentsObject=t,r.isGeneratorFunction=s,r.isTypedArray=o;function N(k){return typeof Promise<"u"&&k instanceof Promise||k!==null&&typeof k=="object"&&typeof k.then=="function"&&typeof k.catch=="function"}r.isPromise=N;function B(k){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(k):o(k)||$(k)}r.isArrayBufferView=B;function g(k){return n(k)==="Uint8Array"}r.isUint8Array=g;function j(k){return n(k)==="Uint8ClampedArray"}r.isUint8ClampedArray=j;function _(k){return n(k)==="Uint16Array"}r.isUint16Array=_;function w(k){return n(k)==="Uint32Array"}r.isUint32Array=w;function L(k){return n(k)==="Int8Array"}r.isInt8Array=L;function K(k){return n(k)==="Int16Array"}r.isInt16Array=K;function M(k){return n(k)==="Int32Array"}r.isInt32Array=M;function V(k){return n(k)==="Float32Array"}r.isFloat32Array=V;function T(k){return n(k)==="Float64Array"}r.isFloat64Array=T;function ne(k){return n(k)==="BigInt64Array"}r.isBigInt64Array=ne;function Z(k){return n(k)==="BigUint64Array"}r.isBigUint64Array=Z;function U(k){return u(k)==="[object Map]"}U.working=typeof Map<"u"&&U(new Map);function q(k){return typeof Map>"u"?!1:U.working?U(k):k instanceof Map}r.isMap=q;function F(k){return u(k)==="[object Set]"}F.working=typeof Set<"u"&&F(new Set);function le(k){return typeof Set>"u"?!1:F.working?F(k):k instanceof Set}r.isSet=le;function ae(k){return u(k)==="[object WeakMap]"}ae.working=typeof WeakMap<"u"&&ae(new WeakMap);function se(k){return typeof WeakMap>"u"?!1:ae.working?ae(k):k instanceof WeakMap}r.isWeakMap=se;function fe(k){return u(k)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function ye(k){return fe(k)}r.isWeakSet=ye;function _e(k){return u(k)==="[object ArrayBuffer]"}_e.working=typeof ArrayBuffer<"u"&&_e(new ArrayBuffer);function xe(k){return typeof ArrayBuffer>"u"?!1:_e.working?_e(k):k instanceof ArrayBuffer}r.isArrayBuffer=xe;function D(k){return u(k)==="[object DataView]"}D.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&D(new DataView(new ArrayBuffer(1),0,1));function $(k){return typeof DataView>"u"?!1:D.working?D(k):k instanceof DataView}r.isDataView=$;var X=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function te(k){return u(k)==="[object SharedArrayBuffer]"}function J(k){return typeof X>"u"?!1:(typeof te.working>"u"&&(te.working=te(new X)),te.working?te(k):k instanceof X)}r.isSharedArrayBuffer=J;function O(k){return u(k)==="[object AsyncFunction]"}r.isAsyncFunction=O;function H(k){return u(k)==="[object Map Iterator]"}r.isMapIterator=H;function re(k){return u(k)==="[object Set Iterator]"}r.isSetIterator=re;function Ae(k){return u(k)==="[object Generator]"}r.isGeneratorObject=Ae;function oe(k){return u(k)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=oe;function ce(k){return v(k,h)}r.isNumberObject=ce;function Se(k){return v(k,m)}r.isStringObject=Se;function z(k){return v(k,x)}r.isBooleanObject=z;function ie(k){return d&&v(k,y)}r.isBigIntObject=ie;function W(k){return c&&v(k,p)}r.isSymbolObject=W;function Q(k){return ce(k)||Se(k)||z(k)||ie(k)||W(k)}r.isBoxedPrimitive=Q;function I(k){return typeof Uint8Array<"u"&&(xe(k)||J(k))}r.isAnyArrayBuffer=I,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(k){Object.defineProperty(r,k,{enumerable:!1,value:function(){throw new Error(k+" is not supported in userland")}})})})(Yg)),Yg}var q0,XN;function BI(){return XN||(XN=1,q0=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),q0}var YN;function C3(){return YN||(YN=1,(function(r){var t=Object.getOwnPropertyDescriptors||function($){for(var X=Object.keys($),te={},J=0;J<X.length;J++)te[X[J]]=Object.getOwnPropertyDescriptor($,X[J]);return te},s=/%[sdj%]/g;r.format=function(D){if(!L(D)){for(var $=[],X=0;X<arguments.length;X++)$.push(d(arguments[X]));return $.join(" ")}for(var X=1,te=arguments,J=te.length,O=String(D).replace(s,function(re){if(re==="%%")return"%";if(X>=J)return re;switch(re){case"%s":return String(te[X++]);case"%d":return Number(te[X++]);case"%j":try{return JSON.stringify(te[X++])}catch{return"[Circular]"}default:return re}}),H=te[X];X<J;H=te[++X])j(H)||!T(H)?O+=" "+H:O+=" "+d(H);return O},r.deprecate=function(D,$){if(typeof rr<"u"&&rr.noDeprecation===!0)return D;if(typeof rr>"u")return function(){return r.deprecate(D,$).apply(this,arguments)};var X=!1;function te(){if(!X){if(rr.throwDeprecation)throw new Error($);rr.traceDeprecation?console.trace($):console.error($),X=!0}return D.apply(this,arguments)}return te};var n={},o=/^$/;if(rr.env.NODE_DEBUG){var l=rr.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+l+"$","i")}r.debuglog=function(D){if(D=D.toUpperCase(),!n[D])if(o.test(D)){var $=rr.pid;n[D]=function(){var X=r.format.apply(r,arguments);console.error("%s %d: %s",D,$,X)}}else n[D]=function(){};return n[D]};function d(D,$){var X={seen:[],stylize:u};return arguments.length>=3&&(X.depth=arguments[2]),arguments.length>=4&&(X.colors=arguments[3]),g($)?X.showHidden=$:$&&r._extend(X,$),M(X.showHidden)&&(X.showHidden=!1),M(X.depth)&&(X.depth=2),M(X.colors)&&(X.colors=!1),M(X.customInspect)&&(X.customInspect=!0),X.colors&&(X.stylize=c),m(X,D,X.depth)}r.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(D,$){var X=d.styles[$];return X?"\x1B["+d.colors[X][0]+"m"+D+"\x1B["+d.colors[X][1]+"m":D}function u(D,$){return D}function h(D){var $={};return D.forEach(function(X,te){$[X]=!0}),$}function m(D,$,X){if(D.customInspect&&$&&U($.inspect)&&$.inspect!==r.inspect&&!($.constructor&&$.constructor.prototype===$)){var te=$.inspect(X,D);return L(te)||(te=m(D,te,X)),te}var J=x(D,$);if(J)return J;var O=Object.keys($),H=h(O);if(D.showHidden&&(O=Object.getOwnPropertyNames($)),Z($)&&(O.indexOf("message")>=0||O.indexOf("description")>=0))return y($);if(O.length===0){if(U($)){var re=$.name?": "+$.name:"";return D.stylize("[Function"+re+"]","special")}if(V($))return D.stylize(RegExp.prototype.toString.call($),"regexp");if(ne($))return D.stylize(Date.prototype.toString.call($),"date");if(Z($))return y($)}var Ae="",oe=!1,ce=["{","}"];if(B($)&&(oe=!0,ce=["[","]"]),U($)){var Se=$.name?": "+$.name:"";Ae=" [Function"+Se+"]"}if(V($)&&(Ae=" "+RegExp.prototype.toString.call($)),ne($)&&(Ae=" "+Date.prototype.toUTCString.call($)),Z($)&&(Ae=" "+y($)),O.length===0&&(!oe||$.length==0))return ce[0]+Ae+ce[1];if(X<0)return V($)?D.stylize(RegExp.prototype.toString.call($),"regexp"):D.stylize("[Object]","special");D.seen.push($);var z;return oe?z=p(D,$,X,H,O):z=O.map(function(ie){return v(D,$,X,H,ie,oe)}),D.seen.pop(),N(z,Ae,ce)}function x(D,$){if(M($))return D.stylize("undefined","undefined");if(L($)){var X="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return D.stylize(X,"string")}if(w($))return D.stylize(""+$,"number");if(g($))return D.stylize(""+$,"boolean");if(j($))return D.stylize("null","null")}function y(D){return"["+Error.prototype.toString.call(D)+"]"}function p(D,$,X,te,J){for(var O=[],H=0,re=$.length;H<re;++H)fe($,String(H))?O.push(v(D,$,X,te,String(H),!0)):O.push("");return J.forEach(function(Ae){Ae.match(/^\d+$/)||O.push(v(D,$,X,te,Ae,!0))}),O}function v(D,$,X,te,J,O){var H,re,Ae;if(Ae=Object.getOwnPropertyDescriptor($,J)||{value:$[J]},Ae.get?Ae.set?re=D.stylize("[Getter/Setter]","special"):re=D.stylize("[Getter]","special"):Ae.set&&(re=D.stylize("[Setter]","special")),fe(te,J)||(H="["+J+"]"),re||(D.seen.indexOf(Ae.value)<0?(j(X)?re=m(D,Ae.value,null):re=m(D,Ae.value,X-1),re.indexOf(`
`)>-1&&(O?re=re.split(`
`).map(function(oe){return" "+oe}).join(`
`).slice(2):re=`
`+re.split(`
`).map(function(oe){return" "+oe}).join(`
`))):re=D.stylize("[Circular]","special")),M(H)){if(O&&J.match(/^\d+$/))return re;H=JSON.stringify(""+J),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=D.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=D.stylize(H,"string"))}return H+": "+re}function N(D,$,X){var te=D.reduce(function(J,O){return O.indexOf(`
`)>=0,J+O.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?X[0]+($===""?"":$+`
`)+" "+D.join(`,
`)+" "+X[1]:X[0]+$+" "+D.join(", ")+" "+X[1]}r.types=NI();function B(D){return Array.isArray(D)}r.isArray=B;function g(D){return typeof D=="boolean"}r.isBoolean=g;function j(D){return D===null}r.isNull=j;function _(D){return D==null}r.isNullOrUndefined=_;function w(D){return typeof D=="number"}r.isNumber=w;function L(D){return typeof D=="string"}r.isString=L;function K(D){return typeof D=="symbol"}r.isSymbol=K;function M(D){return D===void 0}r.isUndefined=M;function V(D){return T(D)&&F(D)==="[object RegExp]"}r.isRegExp=V,r.types.isRegExp=V;function T(D){return typeof D=="object"&&D!==null}r.isObject=T;function ne(D){return T(D)&&F(D)==="[object Date]"}r.isDate=ne,r.types.isDate=ne;function Z(D){return T(D)&&(F(D)==="[object Error]"||D instanceof Error)}r.isError=Z,r.types.isNativeError=Z;function U(D){return typeof D=="function"}r.isFunction=U;function q(D){return D===null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||typeof D=="symbol"||typeof D>"u"}r.isPrimitive=q,r.isBuffer=BI();function F(D){return Object.prototype.toString.call(D)}function le(D){return D<10?"0"+D.toString(10):D.toString(10)}var ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(){var D=new Date,$=[le(D.getHours()),le(D.getMinutes()),le(D.getSeconds())].join(":");return[D.getDate(),ae[D.getMonth()],$].join(" ")}r.log=function(){console.log("%s - %s",se(),r.format.apply(r,arguments))},r.inherits=FA(),r._extend=function(D,$){if(!$||!T($))return D;for(var X=Object.keys($),te=X.length;te--;)D[X[te]]=$[X[te]];return D};function fe(D,$){return Object.prototype.hasOwnProperty.call(D,$)}var ye=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(ye&&$[ye]){var X=$[ye];if(typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,ye,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var te,J,O=new Promise(function(Ae,oe){te=Ae,J=oe}),H=[],re=0;re<arguments.length;re++)H.push(arguments[re]);H.push(function(Ae,oe){Ae?J(Ae):te(oe)});try{$.apply(this,H)}catch(Ae){J(Ae)}return O}return Object.setPrototypeOf(X,Object.getPrototypeOf($)),ye&&Object.defineProperty(X,ye,{value:X,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(X,t($))},r.promisify.custom=ye;function _e(D,$){if(!D){var X=new Error("Promise was rejected with a falsy value");X.reason=D,D=X}return $(D)}function xe(D){if(typeof D!="function")throw new TypeError('The "original" argument must be of type Function');function $(){for(var X=[],te=0;te<arguments.length;te++)X.push(arguments[te]);var J=X.pop();if(typeof J!="function")throw new TypeError("The last argument must be of type Function");var O=this,H=function(){return J.apply(O,arguments)};D.apply(this,X).then(function(re){rr.nextTick(H.bind(null,null,re))},function(re){rr.nextTick(_e.bind(null,re,H))})}return Object.setPrototypeOf($,Object.getPrototypeOf(D)),Object.defineProperties($,t(D)),$}r.callbackify=xe})(Xg)),Xg}var G0,JN;function jI(){if(JN)return G0;JN=1;function r(y,p){var v=Object.keys(y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(y);p&&(N=N.filter(function(B){return Object.getOwnPropertyDescriptor(y,B).enumerable})),v.push.apply(v,N)}return v}function t(y){for(var p=1;p<arguments.length;p++){var v=arguments[p]!=null?arguments[p]:{};p%2?r(Object(v),!0).forEach(function(N){s(y,N,v[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(v)):r(Object(v)).forEach(function(N){Object.defineProperty(y,N,Object.getOwnPropertyDescriptor(v,N))})}return y}function s(y,p,v){return p in y?Object.defineProperty(y,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):y[p]=v,y}function n(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}function o(y,p){for(var v=0;v<p.length;v++){var N=p[v];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}function l(y,p,v){return p&&o(y.prototype,p),y}var d=kp(),c=d.Buffer,u=C3(),h=u.inspect,m=h&&h.custom||"inspect";function x(y,p,v){c.prototype.copy.call(y,p,v)}return G0=(function(){function y(){n(this,y),this.head=null,this.tail=null,this.length=0}return l(y,[{key:"push",value:function(v){var N={data:v,next:null};this.length>0?this.tail.next=N:this.head=N,this.tail=N,++this.length}},{key:"unshift",value:function(v){var N={data:v,next:this.head};this.length===0&&(this.tail=N),this.head=N,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var N=this.head,B=""+N.data;N=N.next;)B+=v+N.data;return B}},{key:"concat",value:function(v){if(this.length===0)return c.alloc(0);for(var N=c.allocUnsafe(v>>>0),B=this.head,g=0;B;)x(B.data,N,g),g+=B.data.length,B=B.next;return N}},{key:"consume",value:function(v,N){var B;return v<this.head.data.length?(B=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?B=this.shift():B=N?this._getString(v):this._getBuffer(v),B}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var N=this.head,B=1,g=N.data;for(v-=g.length;N=N.next;){var j=N.data,_=v>j.length?j.length:v;if(_===j.length?g+=j:g+=j.slice(0,v),v-=_,v===0){_===j.length?(++B,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=j.slice(_));break}++B}return this.length-=B,g}},{key:"_getBuffer",value:function(v){var N=c.allocUnsafe(v),B=this.head,g=1;for(B.data.copy(N),v-=B.data.length;B=B.next;){var j=B.data,_=v>j.length?j.length:v;if(j.copy(N,N.length-v,0,_),v-=_,v===0){_===j.length?(++g,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=j.slice(_));break}++g}return this.length-=g,N}},{key:m,value:function(v,N){return h(this,t({},N,{depth:0,customInspect:!1}))}}]),y})(),G0}var V0,ZN;function S3(){if(ZN)return V0;ZN=1;function r(d,c){var u=this,h=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return h||m?(c?c(d):d&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,rr.nextTick(o,this,d)):rr.nextTick(o,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(x){!c&&x?u._writableState?u._writableState.errorEmitted?rr.nextTick(s,u):(u._writableState.errorEmitted=!0,rr.nextTick(t,u,x)):rr.nextTick(t,u,x):c?(rr.nextTick(s,u),c(x)):rr.nextTick(s,u)}),this)}function t(d,c){o(d,c),s(d)}function s(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.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 o(d,c){d.emit("error",c)}function l(d,c){var u=d._readableState,h=d._writableState;u&&u.autoDestroy||h&&h.autoDestroy?d.destroy(c):d.emit("error",c)}return V0={destroy:r,undestroy:n,errorOrDestroy:l},V0}var W0={},$N;function pu(){if($N)return W0;$N=1;function r(c,u){c.prototype=Object.create(u.prototype),c.prototype.constructor=c,c.__proto__=u}var t={};function s(c,u,h){h||(h=Error);function m(y,p,v){return typeof u=="string"?u:u(y,p,v)}var x=(function(y){r(p,y);function p(v,N,B){return y.call(this,m(v,N,B))||this}return p})(h);x.prototype.name=h.name,x.prototype.code=c,t[c]=x}function n(c,u){if(Array.isArray(c)){var h=c.length;return c=c.map(function(m){return String(m)}),h>2?"one of ".concat(u," ").concat(c.slice(0,h-1).join(", "),", or ")+c[h-1]:h===2?"one of ".concat(u," ").concat(c[0]," or ").concat(c[1]):"of ".concat(u," ").concat(c[0])}else return"of ".concat(u," ").concat(String(c))}function o(c,u,h){return c.substr(0,u.length)===u}function l(c,u,h){return(h===void 0||h>c.length)&&(h=c.length),c.substring(h-u.length,h)===u}function d(c,u,h){return typeof h!="number"&&(h=0),h+u.length>c.length?!1:c.indexOf(u,h)!==-1}return s("ERR_INVALID_OPT_VALUE",function(c,u){return'The value "'+u+'" is invalid for option "'+c+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(c,u,h){var m;typeof u=="string"&&o(u,"not ")?(m="must not be",u=u.replace(/^not /,"")):m="must be";var x;if(l(c," argument"))x="The ".concat(c," ").concat(m," ").concat(n(u,"type"));else{var y=d(c,".")?"property":"argument";x='The "'.concat(c,'" ').concat(y," ").concat(m," ").concat(n(u,"type"))}return x+=". Received type ".concat(typeof h),x},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(c){return"The "+c+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(c){return"Cannot call "+c+" after a stream was destroyed"}),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",function(c){return"Unknown encoding: "+c},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),W0.codes=t,W0}var X0,eB;function _3(){if(eB)return X0;eB=1;var r=pu().codes.ERR_INVALID_OPT_VALUE;function t(n,o,l){return n.highWaterMark!=null?n.highWaterMark:o?n[l]:null}function s(n,o,l,d){var c=t(o,d,l);if(c!=null){if(!(isFinite(c)&&Math.floor(c)===c)||c<0){var u=d?l:"highWaterMark";throw new r(u,c)}return Math.floor(c)}return n.objectMode?16:16*1024}return X0={getHighWaterMark:s},X0}var Y0,tB;function CI(){if(tB)return Y0;tB=1,Y0=r;function r(s,n){if(t("noDeprecation"))return s;var o=!1;function l(){if(!o){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation")?console.trace(n):console.warn(n),o=!0}return s.apply(this,arguments)}return l}function t(s){try{if(!Oo.localStorage)return!1}catch{return!1}var n=Oo.localStorage[s];return n==null?!1:String(n).toLowerCase()==="true"}return Y0}var J0,rB;function k3(){if(rB)return J0;rB=1,J0=V;function r(J){var O=this;this.next=null,this.entry=null,this.finish=function(){te(O,J)}}var t;V.WritableState=K;var s={deprecate:CI()},n=p3(),o=kp().Buffer,l=Oo.Uint8Array||function(){};function d(J){return o.from(J)}function c(J){return o.isBuffer(J)||J instanceof l}var u=S3(),h=_3(),m=h.getHighWaterMark,x=pu().codes,y=x.ERR_INVALID_ARG_TYPE,p=x.ERR_METHOD_NOT_IMPLEMENTED,v=x.ERR_MULTIPLE_CALLBACK,N=x.ERR_STREAM_CANNOT_PIPE,B=x.ERR_STREAM_DESTROYED,g=x.ERR_STREAM_NULL_VALUES,j=x.ERR_STREAM_WRITE_AFTER_END,_=x.ERR_UNKNOWN_ENCODING,w=u.errorOrDestroy;FA()(V,n);function L(){}function K(J,O,H){t=t||lu(),J=J||{},typeof H!="boolean"&&(H=O instanceof t),this.objectMode=!!J.objectMode,H&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=m(this,J,"writableHighWaterMark",H),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var re=J.decodeStrings===!1;this.decodeStrings=!re,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ae){ae(O,Ae)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}K.prototype.getBuffer=function(){for(var O=this.bufferedRequest,H=[];O;)H.push(O),O=O.next;return H},(function(){try{Object.defineProperty(K.prototype,"buffer",{get:s.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(V,Symbol.hasInstance,{value:function(O){return M.call(this,O)?!0:this!==V?!1:O&&O._writableState instanceof K}})):M=function(O){return O instanceof this};function V(J){t=t||lu();var O=this instanceof t;if(!O&&!M.call(V,this))return new V(J);this._writableState=new K(J,this,O),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),n.call(this)}V.prototype.pipe=function(){w(this,new N)};function T(J,O){var H=new j;w(J,H),rr.nextTick(O,H)}function ne(J,O,H,re){var Ae;return H===null?Ae=new g:typeof H!="string"&&!O.objectMode&&(Ae=new y("chunk",["string","Buffer"],H)),Ae?(w(J,Ae),rr.nextTick(re,Ae),!1):!0}V.prototype.write=function(J,O,H){var re=this._writableState,Ae=!1,oe=!re.objectMode&&c(J);return oe&&!o.isBuffer(J)&&(J=d(J)),typeof O=="function"&&(H=O,O=null),oe?O="buffer":O||(O=re.defaultEncoding),typeof H!="function"&&(H=L),re.ending?T(this,H):(oe||ne(this,re,J,H))&&(re.pendingcb++,Ae=U(this,re,oe,J,O,H)),Ae},V.prototype.cork=function(){this._writableState.corked++},V.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&ye(this,J))},V.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new _(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Z(J,O,H){return!J.objectMode&&J.decodeStrings!==!1&&typeof O=="string"&&(O=o.from(O,H)),O}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(J,O,H,re,Ae,oe){if(!H){var ce=Z(O,re,Ae);re!==ce&&(H=!0,Ae="buffer",re=ce)}var Se=O.objectMode?1:re.length;O.length+=Se;var z=O.length<O.highWaterMark;if(z||(O.needDrain=!0),O.writing||O.corked){var ie=O.lastBufferedRequest;O.lastBufferedRequest={chunk:re,encoding:Ae,isBuf:H,callback:oe,next:null},ie?ie.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else q(J,O,!1,Se,re,Ae,oe);return z}function q(J,O,H,re,Ae,oe,ce){O.writelen=re,O.writecb=ce,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new B("write")):H?J._writev(Ae,O.onwrite):J._write(Ae,oe,O.onwrite),O.sync=!1}function F(J,O,H,re,Ae){--O.pendingcb,H?(rr.nextTick(Ae,re),rr.nextTick($,J,O),J._writableState.errorEmitted=!0,w(J,re)):(Ae(re),J._writableState.errorEmitted=!0,w(J,re),$(J,O))}function le(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function ae(J,O){var H=J._writableState,re=H.sync,Ae=H.writecb;if(typeof Ae!="function")throw new v;if(le(H),O)F(J,H,re,O,Ae);else{var oe=_e(H)||J.destroyed;!oe&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&ye(J,H),re?rr.nextTick(se,J,H,oe,Ae):se(J,H,oe,Ae)}}function se(J,O,H,re){H||fe(J,O),O.pendingcb--,re(),$(J,O)}function fe(J,O){O.length===0&&O.needDrain&&(O.needDrain=!1,J.emit("drain"))}function ye(J,O){O.bufferProcessing=!0;var H=O.bufferedRequest;if(J._writev&&H&&H.next){var re=O.bufferedRequestCount,Ae=new Array(re),oe=O.corkedRequestsFree;oe.entry=H;for(var ce=0,Se=!0;H;)Ae[ce]=H,H.isBuf||(Se=!1),H=H.next,ce+=1;Ae.allBuffers=Se,q(J,O,!0,O.length,Ae,"",oe.finish),O.pendingcb++,O.lastBufferedRequest=null,oe.next?(O.corkedRequestsFree=oe.next,oe.next=null):O.corkedRequestsFree=new r(O),O.bufferedRequestCount=0}else{for(;H;){var z=H.chunk,ie=H.encoding,W=H.callback,Q=O.objectMode?1:z.length;if(q(J,O,!1,Q,z,ie,W),H=H.next,O.bufferedRequestCount--,O.writing)break}H===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=H,O.bufferProcessing=!1}V.prototype._write=function(J,O,H){H(new p("_write()"))},V.prototype._writev=null,V.prototype.end=function(J,O,H){var re=this._writableState;return typeof J=="function"?(H=J,J=null,O=null):typeof O=="function"&&(H=O,O=null),J!=null&&this.write(J,O),re.corked&&(re.corked=1,this.uncork()),re.ending||X(this,re,H),this},Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _e(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function xe(J,O){J._final(function(H){O.pendingcb--,H&&w(J,H),O.prefinished=!0,J.emit("prefinish"),$(J,O)})}function D(J,O){!O.prefinished&&!O.finalCalled&&(typeof J._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,rr.nextTick(xe,J,O)):(O.prefinished=!0,J.emit("prefinish")))}function $(J,O){var H=_e(O);if(H&&(D(J,O),O.pendingcb===0&&(O.finished=!0,J.emit("finish"),O.autoDestroy))){var re=J._readableState;(!re||re.autoDestroy&&re.endEmitted)&&J.destroy()}return H}function X(J,O,H){O.ending=!0,$(J,O),H&&(O.finished?rr.nextTick(H):J.once("finish",H)),O.ended=!0,J.writable=!1}function te(J,O,H){var re=J.entry;for(J.entry=null;re;){var Ae=re.callback;O.pendingcb--,Ae(H),re=re.next}O.corkedRequestsFree.next=J}return Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),V.prototype.destroy=u.destroy,V.prototype._undestroy=u.undestroy,V.prototype._destroy=function(J,O){O(J)},J0}var Z0,sB;function lu(){if(sB)return Z0;sB=1;var r=Object.keys||function(h){var m=[];for(var x in h)m.push(x);return m};Z0=d;var t=F3(),s=k3();FA()(d,t);for(var n=r(s.prototype),o=0;o<n.length;o++){var l=n[o];d.prototype[l]||(d.prototype[l]=s.prototype[l])}function d(h){if(!(this instanceof d))return new d(h);t.call(this,h),s.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)))}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function c(){this._writableState.ended||rr.nextTick(u,this)}function u(h){h.end()}return Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(m){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=m,this._writableState.destroyed=m)}}),Z0}var $0={},Cm={exports:{}},aB;function SI(){return aB||(aB=1,(function(r,t){var s=kp(),n=s.Buffer;function o(d,c){for(var u in d)c[u]=d[u]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=s:(o(s,t),t.Buffer=l);function l(d,c,u){return n(d,c,u)}o(n,l),l.from=function(d,c,u){if(typeof d=="number")throw new TypeError("Argument must not be a number");return n(d,c,u)},l.alloc=function(d,c,u){if(typeof d!="number")throw new TypeError("Argument must be a number");var h=n(d);return c!==void 0?typeof u=="string"?h.fill(c,u):h.fill(c):h.fill(0),h},l.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return n(d)},l.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(d)}})(Cm,Cm.exports)),Cm.exports}var nB;function wy(){if(nB)return $0;nB=1;var r=SI().Buffer,t=r.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(g){if(!g)return"utf8";for(var j;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(j)return;g=(""+g).toLowerCase(),j=!0}}function n(g){var j=s(g);if(typeof j!="string"&&(r.isEncoding===t||!t(g)))throw new Error("Unknown encoding: "+g);return j||g}$0.StringDecoder=o;function o(g){this.encoding=n(g);var j;switch(this.encoding){case"utf16le":this.text=x,this.end=y,j=4;break;case"utf8":this.fillLast=u,j=4;break;case"base64":this.text=p,this.end=v,j=3;break;default:this.write=N,this.end=B;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(j)}o.prototype.write=function(g){if(g.length===0)return"";var j,_;if(this.lastNeed){if(j=this.fillLast(g),j===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<g.length?j?j+this.text(g,_):this.text(g,_):j||""},o.prototype.end=m,o.prototype.text=h,o.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function l(g){return g<=127?0:g>>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function d(g,j,_){var w=j.length-1;if(w<_)return 0;var L=l(j[w]);return L>=0?(L>0&&(g.lastNeed=L-1),L):--w<_||L===-2?0:(L=l(j[w]),L>=0?(L>0&&(g.lastNeed=L-2),L):--w<_||L===-2?0:(L=l(j[w]),L>=0?(L>0&&(L===2?L=0:g.lastNeed=L-3),L):0))}function c(g,j,_){if((j[0]&192)!==128)return g.lastNeed=0,"<22>";if(g.lastNeed>1&&j.length>1){if((j[1]&192)!==128)return g.lastNeed=1,"<22>";if(g.lastNeed>2&&j.length>2&&(j[2]&192)!==128)return g.lastNeed=2,"<22>"}}function u(g){var j=this.lastTotal-this.lastNeed,_=c(this,g);if(_!==void 0)return _;if(this.lastNeed<=g.length)return g.copy(this.lastChar,j,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,j,0,g.length),this.lastNeed-=g.length}function h(g,j){var _=d(this,g,j);if(!this.lastNeed)return g.toString("utf8",j);this.lastTotal=_;var w=g.length-(_-this.lastNeed);return g.copy(this.lastChar,0,w),g.toString("utf8",j,w)}function m(g){var j=g&&g.length?this.write(g):"";return this.lastNeed?j+"<22>":j}function x(g,j){if((g.length-j)%2===0){var _=g.toString("utf16le",j);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",j,g.length-1)}function y(g){var j=g&&g.length?this.write(g):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return j+this.lastChar.toString("utf16le",0,_)}return j}function p(g,j){var _=(g.length-j)%3;return _===0?g.toString("base64",j):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",j,g.length-_))}function v(g){var j=g&&g.length?this.write(g):"";return this.lastNeed?j+this.lastChar.toString("base64",0,3-this.lastNeed):j}function N(g){return g.toString(this.encoding)}function B(g){return g&&g.length?this.write(g):""}return $0}var eb,iB;function Gy(){if(iB)return eb;iB=1;var r=pu().codes.ERR_STREAM_PREMATURE_CLOSE;function t(l){var d=!1;return function(){if(!d){d=!0;for(var c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];l.apply(this,u)}}}function s(){}function n(l){return l.setHeader&&typeof l.abort=="function"}function o(l,d,c){if(typeof d=="function")return o(l,null,d);d||(d={}),c=t(c||s);var u=d.readable||d.readable!==!1&&l.readable,h=d.writable||d.writable!==!1&&l.writable,m=function(){l.writable||y()},x=l._writableState&&l._writableState.finished,y=function(){h=!1,x=!0,u||c.call(l)},p=l._readableState&&l._readableState.endEmitted,v=function(){u=!1,p=!0,h||c.call(l)},N=function(_){c.call(l,_)},B=function(){var _;if(u&&!p)return(!l._readableState||!l._readableState.ended)&&(_=new r),c.call(l,_);if(h&&!x)return(!l._writableState||!l._writableState.ended)&&(_=new r),c.call(l,_)},g=function(){l.req.on("finish",y)};return n(l)?(l.on("complete",y),l.on("abort",B),l.req?g():l.on("request",g)):h&&!l._writableState&&(l.on("end",m),l.on("close",m)),l.on("end",v),l.on("finish",y),d.error!==!1&&l.on("error",N),l.on("close",B),function(){l.removeListener("complete",y),l.removeListener("abort",B),l.removeListener("request",g),l.req&&l.req.removeListener("finish",y),l.removeListener("end",m),l.removeListener("close",m),l.removeListener("finish",y),l.removeListener("end",v),l.removeListener("error",N),l.removeListener("close",B)}}return eb=o,eb}var tb,oB;function _I(){if(oB)return tb;oB=1;var r;function t(g,j,_){return j in g?Object.defineProperty(g,j,{value:_,enumerable:!0,configurable:!0,writable:!0}):g[j]=_,g}var s=Gy(),n=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),h=Symbol("stream");function m(g,j){return{value:g,done:j}}function x(g){var j=g[n];if(j!==null){var _=g[h].read();_!==null&&(g[c]=null,g[n]=null,g[o]=null,j(m(_,!1)))}}function y(g){rr.nextTick(x,g)}function p(g,j){return function(_,w){g.then(function(){if(j[d]){_(m(void 0,!0));return}j[u](_,w)},w)}}var v=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((r={get stream(){return this[h]},next:function(){var j=this,_=this[l];if(_!==null)return Promise.reject(_);if(this[d])return Promise.resolve(m(void 0,!0));if(this[h].destroyed)return new Promise(function(M,V){rr.nextTick(function(){j[l]?V(j[l]):M(m(void 0,!0))})});var w=this[c],L;if(w)L=new Promise(p(w,this));else{var K=this[h].read();if(K!==null)return Promise.resolve(m(K,!1));L=new Promise(this[u])}return this[c]=L,L}},t(r,Symbol.asyncIterator,function(){return this}),t(r,"return",function(){var j=this;return new Promise(function(_,w){j[h].destroy(null,function(L){if(L){w(L);return}_(m(void 0,!0))})})}),r),v),B=function(j){var _,w=Object.create(N,(_={},t(_,h,{value:j,writable:!0}),t(_,n,{value:null,writable:!0}),t(_,o,{value:null,writable:!0}),t(_,l,{value:null,writable:!0}),t(_,d,{value:j._readableState.endEmitted,writable:!0}),t(_,u,{value:function(K,M){var V=w[h].read();V?(w[c]=null,w[n]=null,w[o]=null,K(m(V,!1))):(w[n]=K,w[o]=M)},writable:!0}),_));return w[c]=null,s(j,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var K=w[o];K!==null&&(w[c]=null,w[n]=null,w[o]=null,K(L)),w[l]=L;return}var M=w[n];M!==null&&(w[c]=null,w[n]=null,w[o]=null,M(m(void 0,!0))),w[d]=!0}),j.on("readable",y.bind(null,w)),w};return tb=B,tb}var rb,lB;function kI(){return lB||(lB=1,rb=function(){throw new Error("Readable.from is not available in the browser")}),rb}var sb,AB;function F3(){if(AB)return sb;AB=1,sb=T;var r;T.ReadableState=V,Py().EventEmitter;var t=function(ce,Se){return ce.listeners(Se).length},s=p3(),n=kp().Buffer,o=Oo.Uint8Array||function(){};function l(oe){return n.from(oe)}function d(oe){return n.isBuffer(oe)||oe instanceof o}var c=C3(),u;c&&c.debuglog?u=c.debuglog("stream"):u=function(){};var h=jI(),m=S3(),x=_3(),y=x.getHighWaterMark,p=pu().codes,v=p.ERR_INVALID_ARG_TYPE,N=p.ERR_STREAM_PUSH_AFTER_EOF,B=p.ERR_METHOD_NOT_IMPLEMENTED,g=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,j,_,w;FA()(T,s);var L=m.errorOrDestroy,K=["error","close","destroy","pause","resume"];function M(oe,ce,Se){if(typeof oe.prependListener=="function")return oe.prependListener(ce,Se);!oe._events||!oe._events[ce]?oe.on(ce,Se):Array.isArray(oe._events[ce])?oe._events[ce].unshift(Se):oe._events[ce]=[Se,oe._events[ce]]}function V(oe,ce,Se){r=r||lu(),oe=oe||{},typeof Se!="boolean"&&(Se=ce instanceof r),this.objectMode=!!oe.objectMode,Se&&(this.objectMode=this.objectMode||!!oe.readableObjectMode),this.highWaterMark=y(this,oe,"readableHighWaterMark",Se),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,oe.encoding&&(j||(j=wy().StringDecoder),this.decoder=new j(oe.encoding),this.encoding=oe.encoding)}function T(oe){if(r=r||lu(),!(this instanceof T))return new T(oe);var ce=this instanceof r;this._readableState=new V(oe,this,ce),this.readable=!0,oe&&(typeof oe.read=="function"&&(this._read=oe.read),typeof oe.destroy=="function"&&(this._destroy=oe.destroy)),s.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ce){this._readableState&&(this._readableState.destroyed=ce)}}),T.prototype.destroy=m.destroy,T.prototype._undestroy=m.undestroy,T.prototype._destroy=function(oe,ce){ce(oe)},T.prototype.push=function(oe,ce){var Se=this._readableState,z;return Se.objectMode?z=!0:typeof oe=="string"&&(ce=ce||Se.defaultEncoding,ce!==Se.encoding&&(oe=n.from(oe,ce),ce=""),z=!0),ne(this,oe,ce,!1,z)},T.prototype.unshift=function(oe){return ne(this,oe,null,!0,!1)};function ne(oe,ce,Se,z,ie){u("readableAddChunk",ce);var W=oe._readableState;if(ce===null)W.reading=!1,ae(oe,W);else{var Q;if(ie||(Q=U(W,ce)),Q)L(oe,Q);else if(W.objectMode||ce&&ce.length>0)if(typeof ce!="string"&&!W.objectMode&&Object.getPrototypeOf(ce)!==n.prototype&&(ce=l(ce)),z)W.endEmitted?L(oe,new g):Z(oe,W,ce,!0);else if(W.ended)L(oe,new N);else{if(W.destroyed)return!1;W.reading=!1,W.decoder&&!Se?(ce=W.decoder.write(ce),W.objectMode||ce.length!==0?Z(oe,W,ce,!1):ye(oe,W)):Z(oe,W,ce,!1)}else z||(W.reading=!1,ye(oe,W))}return!W.ended&&(W.length<W.highWaterMark||W.length===0)}function Z(oe,ce,Se,z){ce.flowing&&ce.length===0&&!ce.sync?(ce.awaitDrain=0,oe.emit("data",Se)):(ce.length+=ce.objectMode?1:Se.length,z?ce.buffer.unshift(Se):ce.buffer.push(Se),ce.needReadable&&se(oe)),ye(oe,ce)}function U(oe,ce){var Se;return!d(ce)&&typeof ce!="string"&&ce!==void 0&&!oe.objectMode&&(Se=new v("chunk",["string","Buffer","Uint8Array"],ce)),Se}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(oe){j||(j=wy().StringDecoder);var ce=new j(oe);this._readableState.decoder=ce,this._readableState.encoding=this._readableState.decoder.encoding;for(var Se=this._readableState.buffer.head,z="";Se!==null;)z+=ce.write(Se.data),Se=Se.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var q=1073741824;function F(oe){return oe>=q?oe=q:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function le(oe,ce){return oe<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:oe!==oe?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(oe>ce.highWaterMark&&(ce.highWaterMark=F(oe)),oe<=ce.length?oe:ce.ended?ce.length:(ce.needReadable=!0,0))}T.prototype.read=function(oe){u("read",oe),oe=parseInt(oe,10);var ce=this._readableState,Se=oe;if(oe!==0&&(ce.emittedReadable=!1),oe===0&&ce.needReadable&&((ce.highWaterMark!==0?ce.length>=ce.highWaterMark:ce.length>0)||ce.ended))return u("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?H(this):se(this),null;if(oe=le(oe,ce),oe===0&&ce.ended)return ce.length===0&&H(this),null;var z=ce.needReadable;u("need readable",z),(ce.length===0||ce.length-oe<ce.highWaterMark)&&(z=!0,u("length less than watermark",z)),ce.ended||ce.reading?(z=!1,u("reading or ended",z)):z&&(u("do read"),ce.reading=!0,ce.sync=!0,ce.length===0&&(ce.needReadable=!0),this._read(ce.highWaterMark),ce.sync=!1,ce.reading||(oe=le(Se,ce)));var ie;return oe>0?ie=O(oe,ce):ie=null,ie===null?(ce.needReadable=ce.length<=ce.highWaterMark,oe=0):(ce.length-=oe,ce.awaitDrain=0),ce.length===0&&(ce.ended||(ce.needReadable=!0),Se!==oe&&ce.ended&&H(this)),ie!==null&&this.emit("data",ie),ie};function ae(oe,ce){if(u("onEofChunk"),!ce.ended){if(ce.decoder){var Se=ce.decoder.end();Se&&Se.length&&(ce.buffer.push(Se),ce.length+=ce.objectMode?1:Se.length)}ce.ended=!0,ce.sync?se(oe):(ce.needReadable=!1,ce.emittedReadable||(ce.emittedReadable=!0,fe(oe)))}}function se(oe){var ce=oe._readableState;u("emitReadable",ce.needReadable,ce.emittedReadable),ce.needReadable=!1,ce.emittedReadable||(u("emitReadable",ce.flowing),ce.emittedReadable=!0,rr.nextTick(fe,oe))}function fe(oe){var ce=oe._readableState;u("emitReadable_",ce.destroyed,ce.length,ce.ended),!ce.destroyed&&(ce.length||ce.ended)&&(oe.emit("readable"),ce.emittedReadable=!1),ce.needReadable=!ce.flowing&&!ce.ended&&ce.length<=ce.highWaterMark,J(oe)}function ye(oe,ce){ce.readingMore||(ce.readingMore=!0,rr.nextTick(_e,oe,ce))}function _e(oe,ce){for(;!ce.reading&&!ce.ended&&(ce.length<ce.highWaterMark||ce.flowing&&ce.length===0);){var Se=ce.length;if(u("maybeReadMore read 0"),oe.read(0),Se===ce.length)break}ce.readingMore=!1}T.prototype._read=function(oe){L(this,new B("_read()"))},T.prototype.pipe=function(oe,ce){var Se=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=oe;break;case 1:z.pipes=[z.pipes,oe];break;default:z.pipes.push(oe);break}z.pipesCount+=1,u("pipe count=%d opts=%j",z.pipesCount,ce);var ie=(!ce||ce.end!==!1)&&oe!==rr.stdout&&oe!==rr.stderr,W=ie?I:Ve;z.endEmitted?rr.nextTick(W):Se.once("end",W),oe.on("unpipe",Q);function Q(it,lt){u("onunpipe"),it===Se&&lt&&lt.hasUnpiped===!1&&(lt.hasUnpiped=!0,me())}function I(){u("onend"),oe.end()}var k=xe(Se);oe.on("drain",k);var G=!1;function me(){u("cleanup"),oe.removeListener("close",Re),oe.removeListener("finish",He),oe.removeListener("drain",k),oe.removeListener("error",Ue),oe.removeListener("unpipe",Q),Se.removeListener("end",I),Se.removeListener("end",Ve),Se.removeListener("data",be),G=!0,z.awaitDrain&&(!oe._writableState||oe._writableState.needDrain)&&k()}Se.on("data",be);function be(it){u("ondata");var lt=oe.write(it);u("dest.write",lt),lt===!1&&((z.pipesCount===1&&z.pipes===oe||z.pipesCount>1&&Ae(z.pipes,oe)!==-1)&&!G&&(u("false write response, pause",z.awaitDrain),z.awaitDrain++),Se.pause())}function Ue(it){u("onerror",it),Ve(),oe.removeListener("error",Ue),t(oe,"error")===0&&L(oe,it)}M(oe,"error",Ue);function Re(){oe.removeListener("finish",He),Ve()}oe.once("close",Re);function He(){u("onfinish"),oe.removeListener("close",Re),Ve()}oe.once("finish",He);function Ve(){u("unpipe"),Se.unpipe(oe)}return oe.emit("pipe",Se),z.flowing||(u("pipe resume"),Se.resume()),oe};function xe(oe){return function(){var Se=oe._readableState;u("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&t(oe,"data")&&(Se.flowing=!0,J(oe))}}T.prototype.unpipe=function(oe){var ce=this._readableState,Se={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return oe&&oe!==ce.pipes?this:(oe||(oe=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,oe&&oe.emit("unpipe",this,Se),this);if(!oe){var z=ce.pipes,ie=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var W=0;W<ie;W++)z[W].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=Ae(ce.pipes,oe);return Q===-1?this:(ce.pipes.splice(Q,1),ce.pipesCount-=1,ce.pipesCount===1&&(ce.pipes=ce.pipes[0]),oe.emit("unpipe",this,Se),this)},T.prototype.on=function(oe,ce){var Se=s.prototype.on.call(this,oe,ce),z=this._readableState;return oe==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):oe==="readable"&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,u("on readable",z.length,z.reading),z.length?se(this):z.reading||rr.nextTick($,this)),Se},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(oe,ce){var Se=s.prototype.removeListener.call(this,oe,ce);return oe==="readable"&&rr.nextTick(D,this),Se},T.prototype.removeAllListeners=function(oe){var ce=s.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&rr.nextTick(D,this),ce};function D(oe){var ce=oe._readableState;ce.readableListening=oe.listenerCount("readable")>0,ce.resumeScheduled&&!ce.paused?ce.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function $(oe){u("readable nexttick read 0"),oe.read(0)}T.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(u("resume"),oe.flowing=!oe.readableListening,X(this,oe)),oe.paused=!1,this};function X(oe,ce){ce.resumeScheduled||(ce.resumeScheduled=!0,rr.nextTick(te,oe,ce))}function te(oe,ce){u("resume",ce.reading),ce.reading||oe.read(0),ce.resumeScheduled=!1,oe.emit("resume"),J(oe),ce.flowing&&!ce.reading&&oe.read(0)}T.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 J(oe){var ce=oe._readableState;for(u("flow",ce.flowing);ce.flowing&&oe.read()!==null;);}T.prototype.wrap=function(oe){var ce=this,Se=this._readableState,z=!1;oe.on("end",function(){if(u("wrapped end"),Se.decoder&&!Se.ended){var Q=Se.decoder.end();Q&&Q.length&&ce.push(Q)}ce.push(null)}),oe.on("data",function(Q){if(u("wrapped data"),Se.decoder&&(Q=Se.decoder.write(Q)),!(Se.objectMode&&Q==null)&&!(!Se.objectMode&&(!Q||!Q.length))){var I=ce.push(Q);I||(z=!0,oe.pause())}});for(var ie in oe)this[ie]===void 0&&typeof oe[ie]=="function"&&(this[ie]=(function(I){return function(){return oe[I].apply(oe,arguments)}})(ie));for(var W=0;W<K.length;W++)oe.on(K[W],this.emit.bind(this,K[W]));return this._read=function(Q){u("wrapped _read",Q),z&&(z=!1,oe.resume())},this},typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return _===void 0&&(_=_I()),_(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ce){this._readableState&&(this._readableState.flowing=ce)}}),T._fromList=O,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(oe,ce){if(ce.length===0)return null;var Se;return ce.objectMode?Se=ce.buffer.shift():!oe||oe>=ce.length?(ce.decoder?Se=ce.buffer.join(""):ce.buffer.length===1?Se=ce.buffer.first():Se=ce.buffer.concat(ce.length),ce.buffer.clear()):Se=ce.buffer.consume(oe,ce.decoder),Se}function H(oe){var ce=oe._readableState;u("endReadable",ce.endEmitted),ce.endEmitted||(ce.ended=!0,rr.nextTick(re,ce,oe))}function re(oe,ce){if(u("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,ce.readable=!1,ce.emit("end"),oe.autoDestroy)){var Se=ce._writableState;(!Se||Se.autoDestroy&&Se.finished)&&ce.destroy()}}typeof Symbol=="function"&&(T.from=function(oe,ce){return w===void 0&&(w=kI()),w(T,oe,ce)});function Ae(oe,ce){for(var Se=0,z=oe.length;Se<z;Se++)if(oe[Se]===ce)return Se;return-1}return sb}var ab,cB;function E3(){if(cB)return ab;cB=1,ab=c;var r=pu().codes,t=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,n=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,l=lu();FA()(c,l);function d(m,x){var y=this._transformState;y.transforming=!1;var p=y.writecb;if(p===null)return this.emit("error",new s);y.writechunk=null,y.writecb=null,x!=null&&this.push(x),p(m);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function c(m){if(!(this instanceof c))return new c(m);l.call(this,m),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,m&&(typeof m.transform=="function"&&(this._transform=m.transform),typeof m.flush=="function"&&(this._flush=m.flush)),this.on("prefinish",u)}function u(){var m=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(x,y){h(m,x,y)}):h(this,null,null)}c.prototype.push=function(m,x){return this._transformState.needTransform=!1,l.prototype.push.call(this,m,x)},c.prototype._transform=function(m,x,y){y(new t("_transform()"))},c.prototype._write=function(m,x,y){var p=this._transformState;if(p.writecb=y,p.writechunk=m,p.writeencoding=x,!p.transforming){var v=this._readableState;(p.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},c.prototype._read=function(m){var x=this._transformState;x.writechunk!==null&&!x.transforming?(x.transforming=!0,this._transform(x.writechunk,x.writeencoding,x.afterTransform)):x.needTransform=!0},c.prototype._destroy=function(m,x){l.prototype._destroy.call(this,m,function(y){x(y)})};function h(m,x,y){if(x)return m.emit("error",x);if(y!=null&&m.push(y),m._writableState.length)throw new o;if(m._transformState.transforming)throw new n;return m.push(null)}return ab}var nb,dB;function FI(){if(dB)return nb;dB=1,nb=t;var r=E3();FA()(t,r);function t(s){if(!(this instanceof t))return new t(s);r.call(this,s)}return t.prototype._transform=function(s,n,o){o(null,s)},nb}var ib,uB;function EI(){if(uB)return ib;uB=1;var r;function t(y){var p=!1;return function(){p||(p=!0,y.apply(void 0,arguments))}}var s=pu().codes,n=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function l(y){if(y)throw y}function d(y){return y.setHeader&&typeof y.abort=="function"}function c(y,p,v,N){N=t(N);var B=!1;y.on("close",function(){B=!0}),r===void 0&&(r=Gy()),r(y,{readable:p,writable:v},function(j){if(j)return N(j);B=!0,N()});var g=!1;return function(j){if(!B&&!g){if(g=!0,d(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();N(j||new o("pipe"))}}}function u(y){y()}function h(y,p){return y.pipe(p)}function m(y){return!y.length||typeof y[y.length-1]!="function"?l:y.pop()}function x(){for(var y=arguments.length,p=new Array(y),v=0;v<y;v++)p[v]=arguments[v];var N=m(p);if(Array.isArray(p[0])&&(p=p[0]),p.length<2)throw new n("streams");var B,g=p.map(function(j,_){var w=_<p.length-1,L=_>0;return c(j,w,L,function(K){B||(B=K),K&&g.forEach(u),!w&&(g.forEach(u),N(B))})});return p.reduce(h)}return ib=x,ib}var ob,hB;function Vy(){if(hB)return ob;hB=1,ob=s;var r=Py().EventEmitter,t=FA();t(s,r),s.Readable=F3(),s.Writable=k3(),s.Duplex=lu(),s.Transform=E3(),s.PassThrough=FI(),s.finished=Gy(),s.pipeline=EI(),s.Stream=s;function s(){r.call(this)}return s.prototype.pipe=function(n,o){var l=this;function d(p){n.writable&&n.write(p)===!1&&l.pause&&l.pause()}l.on("data",d);function c(){l.readable&&l.resume&&l.resume()}n.on("drain",c),!n._isStdio&&(!o||o.end!==!1)&&(l.on("end",h),l.on("close",m));var u=!1;function h(){u||(u=!0,n.end())}function m(){u||(u=!0,typeof n.destroy=="function"&&n.destroy())}function x(p){if(y(),r.listenerCount(this,"error")===0)throw p}l.on("error",x),n.on("error",x);function y(){l.removeListener("data",d),n.removeListener("drain",c),l.removeListener("end",h),l.removeListener("close",m),l.removeListener("error",x),n.removeListener("error",x),l.removeListener("end",y),l.removeListener("close",y),n.removeListener("close",y)}return l.on("end",y),l.on("close",y),n.on("close",y),n.emit("pipe",l),n},ob}var fB;function UI(){return fB||(fB=1,(function(r){(function(t){t.parser=function(O,H){return new n(O,H)},t.SAXParser=n,t.SAXStream=m,t.createStream=h,t.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(O,H){if(!(this instanceof n))return new n(O,H);var re=this;l(re),re.q=re.c="",re.bufferCheckPosition=t.MAX_BUFFER_LENGTH,re.opt=H||{},re.opt.lowercase=re.opt.lowercase||re.opt.lowercasetags,re.looseCase=re.opt.lowercase?"toLowerCase":"toUpperCase",re.tags=[],re.closed=re.closedRoot=re.sawRoot=!1,re.tag=re.error=null,re.strict=!!O,re.noscript=!!(O||re.opt.noscript),re.state=T.BEGIN,re.strictEntities=re.opt.strictEntities,re.ENTITIES=re.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),re.attribList=[],re.opt.xmlns&&(re.ns=Object.create(N)),re.trackPosition=re.opt.position!==!1,re.trackPosition&&(re.position=re.line=re.column=0),Z(re,"onready")}Object.create||(Object.create=function(O){function H(){}H.prototype=O;var re=new H;return re}),Object.keys||(Object.keys=function(O){var H=[];for(var re in O)O.hasOwnProperty(re)&&H.push(re);return H});function o(O){for(var H=Math.max(t.MAX_BUFFER_LENGTH,10),re=0,Ae=0,oe=s.length;Ae<oe;Ae++){var ce=O[s[Ae]].length;if(ce>H)switch(s[Ae]){case"textNode":q(O);break;case"cdata":U(O,"oncdata",O.cdata),O.cdata="";break;case"script":U(O,"onscript",O.script),O.script="";break;default:le(O,"Max buffer length exceeded: "+s[Ae])}re=Math.max(re,ce)}var Se=t.MAX_BUFFER_LENGTH-re;O.bufferCheckPosition=Se+O.position}function l(O){for(var H=0,re=s.length;H<re;H++)O[s[H]]=""}function d(O){q(O),O.cdata!==""&&(U(O,"oncdata",O.cdata),O.cdata=""),O.script!==""&&(U(O,"onscript",O.script),O.script="")}n.prototype={end:function(){ae(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){d(this)}};var c;try{c=Vy().Stream}catch{c=function(){}}var u=t.EVENTS.filter(function(O){return O!=="error"&&O!=="end"});function h(O,H){return new m(O,H)}function m(O,H){if(!(this instanceof m))return new m(O,H);c.apply(this),this._parser=new n(O,H),this.writable=!0,this.readable=!0;var re=this;this._parser.onend=function(){re.emit("end")},this._parser.onerror=function(Ae){re.emit("error",Ae),re._parser.error=null},this._decoder=null,u.forEach(function(Ae){Object.defineProperty(re,"on"+Ae,{get:function(){return re._parser["on"+Ae]},set:function(oe){if(!oe)return re.removeAllListeners(Ae),re._parser["on"+Ae]=oe,oe;re.on(Ae,oe)},enumerable:!0,configurable:!1})})}m.prototype=Object.create(c.prototype,{constructor:{value:m}}),m.prototype.write=function(O){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(O)){if(!this._decoder){var H=wy().StringDecoder;this._decoder=new H("utf8")}O=this._decoder.write(O)}return this._parser.write(O.toString()),this.emit("data",O),!0},m.prototype.end=function(O){return O&&O.length&&this.write(O),this._parser.end(),!0},m.prototype.on=function(O,H){var re=this;return!re._parser["on"+O]&&u.indexOf(O)!==-1&&(re._parser["on"+O]=function(){var Ae=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ae.splice(0,0,O),re.emit.apply(re,Ae)}),c.prototype.on.call(re,O,H)};var x="[CDATA[",y="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",v="http://www.w3.org/2000/xmlns/",N={xml:p,xmlns:v},B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,j=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function w(O){return O===" "||O===`
`||O==="\r"||O===" "}function L(O){return O==='"'||O==="'"}function K(O){return O===">"||w(O)}function M(O,H){return O.test(H)}function V(O,H){return!M(O,H)}var T=0;t.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.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(t.ENTITIES).forEach(function(O){var H=t.ENTITIES[O],re=typeof H=="number"?String.fromCharCode(H):H;t.ENTITIES[O]=re});for(var ne in t.STATE)t.STATE[t.STATE[ne]]=ne;T=t.STATE;function Z(O,H,re){O[H]&&O[H](re)}function U(O,H,re){O.textNode&&q(O),Z(O,H,re)}function q(O){O.textNode=F(O.opt,O.textNode),O.textNode&&Z(O,"ontext",O.textNode),O.textNode=""}function F(O,H){return O.trim&&(H=H.trim()),O.normalize&&(H=H.replace(/\s+/g," ")),H}function le(O,H){return q(O),O.trackPosition&&(H+=`
Line: `+O.line+`
Column: `+O.column+`
Char: `+O.c),H=new Error(H),O.error=H,Z(O,"onerror",H),O}function ae(O){return O.sawRoot&&!O.closedRoot&&se(O,"Unclosed root tag"),O.state!==T.BEGIN&&O.state!==T.BEGIN_WHITESPACE&&O.state!==T.TEXT&&le(O,"Unexpected end"),q(O),O.c="",O.closed=!0,Z(O,"onend"),n.call(O,O.strict,O.opt),O}function se(O,H){if(typeof O!="object"||!(O instanceof n))throw new Error("bad call to strictFail");O.strict&&le(O,H)}function fe(O){O.strict||(O.tagName=O.tagName[O.looseCase]());var H=O.tags[O.tags.length-1]||O,re=O.tag={name:O.tagName,attributes:{}};O.opt.xmlns&&(re.ns=H.ns),O.attribList.length=0,U(O,"onopentagstart",re)}function ye(O,H){var re=O.indexOf(":"),Ae=re<0?["",O]:O.split(":"),oe=Ae[0],ce=Ae[1];return H&&O==="xmlns"&&(oe="xmlns",ce=""),{prefix:oe,local:ce}}function _e(O){if(O.strict||(O.attribName=O.attribName[O.looseCase]()),O.attribList.indexOf(O.attribName)!==-1||O.tag.attributes.hasOwnProperty(O.attribName)){O.attribName=O.attribValue="";return}if(O.opt.xmlns){var H=ye(O.attribName,!0),re=H.prefix,Ae=H.local;if(re==="xmlns")if(Ae==="xml"&&O.attribValue!==p)se(O,"xml: prefix must be bound to "+p+`
Actual: `+O.attribValue);else if(Ae==="xmlns"&&O.attribValue!==v)se(O,"xmlns: prefix must be bound to "+v+`
Actual: `+O.attribValue);else{var oe=O.tag,ce=O.tags[O.tags.length-1]||O;oe.ns===ce.ns&&(oe.ns=Object.create(ce.ns)),oe.ns[Ae]=O.attribValue}O.attribList.push([O.attribName,O.attribValue])}else O.tag.attributes[O.attribName]=O.attribValue,U(O,"onattribute",{name:O.attribName,value:O.attribValue});O.attribName=O.attribValue=""}function xe(O,H){if(O.opt.xmlns){var re=O.tag,Ae=ye(O.tagName);re.prefix=Ae.prefix,re.local=Ae.local,re.uri=re.ns[Ae.prefix]||"",re.prefix&&!re.uri&&(se(O,"Unbound namespace prefix: "+JSON.stringify(O.tagName)),re.uri=Ae.prefix);var oe=O.tags[O.tags.length-1]||O;re.ns&&oe.ns!==re.ns&&Object.keys(re.ns).forEach(function(be){U(O,"onopennamespace",{prefix:be,uri:re.ns[be]})});for(var ce=0,Se=O.attribList.length;ce<Se;ce++){var z=O.attribList[ce],ie=z[0],W=z[1],Q=ye(ie,!0),I=Q.prefix,k=Q.local,G=I===""?"":re.ns[I]||"",me={name:ie,value:W,prefix:I,local:k,uri:G};I&&I!=="xmlns"&&!G&&(se(O,"Unbound namespace prefix: "+JSON.stringify(I)),me.uri=I),O.tag.attributes[ie]=me,U(O,"onattribute",me)}O.attribList.length=0}O.tag.isSelfClosing=!!H,O.sawRoot=!0,O.tags.push(O.tag),U(O,"onopentag",O.tag),H||(!O.noscript&&O.tagName.toLowerCase()==="script"?O.state=T.SCRIPT:O.state=T.TEXT,O.tag=null,O.tagName=""),O.attribName=O.attribValue="",O.attribList.length=0}function D(O){if(!O.tagName){se(O,"Weird empty close tag."),O.textNode+="</>",O.state=T.TEXT;return}if(O.script){if(O.tagName!=="script"){O.script+="</"+O.tagName+">",O.tagName="",O.state=T.SCRIPT;return}U(O,"onscript",O.script),O.script=""}var H=O.tags.length,re=O.tagName;O.strict||(re=re[O.looseCase]());for(var Ae=re;H--;){var oe=O.tags[H];if(oe.name!==Ae)se(O,"Unexpected close tag");else break}if(H<0){se(O,"Unmatched closing tag: "+O.tagName),O.textNode+="</"+O.tagName+">",O.state=T.TEXT;return}O.tagName=re;for(var ce=O.tags.length;ce-- >H;){var Se=O.tag=O.tags.pop();O.tagName=O.tag.name,U(O,"onclosetag",O.tagName);var z={};for(var ie in Se.ns)z[ie]=Se.ns[ie];var W=O.tags[O.tags.length-1]||O;O.opt.xmlns&&Se.ns!==W.ns&&Object.keys(Se.ns).forEach(function(Q){var I=Se.ns[Q];U(O,"onclosenamespace",{prefix:Q,uri:I})})}H===0&&(O.closedRoot=!0),O.tagName=O.attribValue=O.attribName="",O.attribList.length=0,O.state=T.TEXT}function $(O){var H=O.entity,re=H.toLowerCase(),Ae,oe="";return O.ENTITIES[H]?O.ENTITIES[H]:O.ENTITIES[re]?O.ENTITIES[re]:(H=re,H.charAt(0)==="#"&&(H.charAt(1)==="x"?(H=H.slice(2),Ae=parseInt(H,16),oe=Ae.toString(16)):(H=H.slice(1),Ae=parseInt(H,10),oe=Ae.toString(10))),H=H.replace(/^0+/,""),isNaN(Ae)||oe.toLowerCase()!==H?(se(O,"Invalid character entity"),"&"+O.entity+";"):String.fromCodePoint(Ae))}function X(O,H){H==="<"?(O.state=T.OPEN_WAKA,O.startTagPosition=O.position):w(H)||(se(O,"Non-whitespace before first tag."),O.textNode=H,O.state=T.TEXT)}function te(O,H){var re="";return H<O.length&&(re=O.charAt(H)),re}function J(O){var H=this;if(this.error)throw this.error;if(H.closed)return le(H,"Cannot write after close. Assign an onready handler.");if(O===null)return ae(H);typeof O=="object"&&(O=O.toString());for(var re=0,Ae="";Ae=te(O,re++),H.c=Ae,!!Ae;)switch(H.trackPosition&&(H.position++,Ae===`
`?(H.line++,H.column=0):H.column++),H.state){case T.BEGIN:if(H.state=T.BEGIN_WHITESPACE,Ae==="\uFEFF")continue;X(H,Ae);continue;case T.BEGIN_WHITESPACE:X(H,Ae);continue;case T.TEXT:if(H.sawRoot&&!H.closedRoot){for(var oe=re-1;Ae&&Ae!=="<"&&Ae!=="&";)Ae=te(O,re++),Ae&&H.trackPosition&&(H.position++,Ae===`
`?(H.line++,H.column=0):H.column++);H.textNode+=O.substring(oe,re-1)}Ae==="<"&&!(H.sawRoot&&H.closedRoot&&!H.strict)?(H.state=T.OPEN_WAKA,H.startTagPosition=H.position):(!w(Ae)&&(!H.sawRoot||H.closedRoot)&&se(H,"Text data outside of root node."),Ae==="&"?H.state=T.TEXT_ENTITY:H.textNode+=Ae);continue;case T.SCRIPT:Ae==="<"?H.state=T.SCRIPT_ENDING:H.script+=Ae;continue;case T.SCRIPT_ENDING:Ae==="/"?H.state=T.CLOSE_TAG:(H.script+="<"+Ae,H.state=T.SCRIPT);continue;case T.OPEN_WAKA:if(Ae==="!")H.state=T.SGML_DECL,H.sgmlDecl="";else if(!w(Ae))if(M(B,Ae))H.state=T.OPEN_TAG,H.tagName=Ae;else if(Ae==="/")H.state=T.CLOSE_TAG,H.tagName="";else if(Ae==="?")H.state=T.PROC_INST,H.procInstName=H.procInstBody="";else{if(se(H,"Unencoded <"),H.startTagPosition+1<H.position){var ce=H.position-H.startTagPosition;Ae=new Array(ce).join(" ")+Ae}H.textNode+="<"+Ae,H.state=T.TEXT}continue;case T.SGML_DECL:(H.sgmlDecl+Ae).toUpperCase()===x?(U(H,"onopencdata"),H.state=T.CDATA,H.sgmlDecl="",H.cdata=""):H.sgmlDecl+Ae==="--"?(H.state=T.COMMENT,H.comment="",H.sgmlDecl=""):(H.sgmlDecl+Ae).toUpperCase()===y?(H.state=T.DOCTYPE,(H.doctype||H.sawRoot)&&se(H,"Inappropriately located doctype declaration"),H.doctype="",H.sgmlDecl=""):Ae===">"?(U(H,"onsgmldeclaration",H.sgmlDecl),H.sgmlDecl="",H.state=T.TEXT):(L(Ae)&&(H.state=T.SGML_DECL_QUOTED),H.sgmlDecl+=Ae);continue;case T.SGML_DECL_QUOTED:Ae===H.q&&(H.state=T.SGML_DECL,H.q=""),H.sgmlDecl+=Ae;continue;case T.DOCTYPE:Ae===">"?(H.state=T.TEXT,U(H,"ondoctype",H.doctype),H.doctype=!0):(H.doctype+=Ae,Ae==="["?H.state=T.DOCTYPE_DTD:L(Ae)&&(H.state=T.DOCTYPE_QUOTED,H.q=Ae));continue;case T.DOCTYPE_QUOTED:H.doctype+=Ae,Ae===H.q&&(H.q="",H.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:H.doctype+=Ae,Ae==="]"?H.state=T.DOCTYPE:L(Ae)&&(H.state=T.DOCTYPE_DTD_QUOTED,H.q=Ae);continue;case T.DOCTYPE_DTD_QUOTED:H.doctype+=Ae,Ae===H.q&&(H.state=T.DOCTYPE_DTD,H.q="");continue;case T.COMMENT:Ae==="-"?H.state=T.COMMENT_ENDING:H.comment+=Ae;continue;case T.COMMENT_ENDING:Ae==="-"?(H.state=T.COMMENT_ENDED,H.comment=F(H.opt,H.comment),H.comment&&U(H,"oncomment",H.comment),H.comment=""):(H.comment+="-"+Ae,H.state=T.COMMENT);continue;case T.COMMENT_ENDED:Ae!==">"?(se(H,"Malformed comment"),H.comment+="--"+Ae,H.state=T.COMMENT):H.state=T.TEXT;continue;case T.CDATA:Ae==="]"?H.state=T.CDATA_ENDING:H.cdata+=Ae;continue;case T.CDATA_ENDING:Ae==="]"?H.state=T.CDATA_ENDING_2:(H.cdata+="]"+Ae,H.state=T.CDATA);continue;case T.CDATA_ENDING_2:Ae===">"?(H.cdata&&U(H,"oncdata",H.cdata),U(H,"onclosecdata"),H.cdata="",H.state=T.TEXT):Ae==="]"?H.cdata+="]":(H.cdata+="]]"+Ae,H.state=T.CDATA);continue;case T.PROC_INST:Ae==="?"?H.state=T.PROC_INST_ENDING:w(Ae)?H.state=T.PROC_INST_BODY:H.procInstName+=Ae;continue;case T.PROC_INST_BODY:if(!H.procInstBody&&w(Ae))continue;Ae==="?"?H.state=T.PROC_INST_ENDING:H.procInstBody+=Ae;continue;case T.PROC_INST_ENDING:Ae===">"?(U(H,"onprocessinginstruction",{name:H.procInstName,body:H.procInstBody}),H.procInstName=H.procInstBody="",H.state=T.TEXT):(H.procInstBody+="?"+Ae,H.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:M(g,Ae)?H.tagName+=Ae:(fe(H),Ae===">"?xe(H):Ae==="/"?H.state=T.OPEN_TAG_SLASH:(w(Ae)||se(H,"Invalid character in tag name"),H.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:Ae===">"?(xe(H,!0),D(H)):(se(H,"Forward-slash in opening tag not followed by >"),H.state=T.ATTRIB);continue;case T.ATTRIB:if(w(Ae))continue;Ae===">"?xe(H):Ae==="/"?H.state=T.OPEN_TAG_SLASH:M(B,Ae)?(H.attribName=Ae,H.attribValue="",H.state=T.ATTRIB_NAME):se(H,"Invalid attribute name");continue;case T.ATTRIB_NAME:Ae==="="?H.state=T.ATTRIB_VALUE:Ae===">"?(se(H,"Attribute without value"),H.attribValue=H.attribName,_e(H),xe(H)):w(Ae)?H.state=T.ATTRIB_NAME_SAW_WHITE:M(g,Ae)?H.attribName+=Ae:se(H,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if(Ae==="=")H.state=T.ATTRIB_VALUE;else{if(w(Ae))continue;se(H,"Attribute without value"),H.tag.attributes[H.attribName]="",H.attribValue="",U(H,"onattribute",{name:H.attribName,value:""}),H.attribName="",Ae===">"?xe(H):M(B,Ae)?(H.attribName=Ae,H.state=T.ATTRIB_NAME):(se(H,"Invalid attribute name"),H.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(w(Ae))continue;L(Ae)?(H.q=Ae,H.state=T.ATTRIB_VALUE_QUOTED):(se(H,"Unquoted attribute value"),H.state=T.ATTRIB_VALUE_UNQUOTED,H.attribValue=Ae);continue;case T.ATTRIB_VALUE_QUOTED:if(Ae!==H.q){Ae==="&"?H.state=T.ATTRIB_VALUE_ENTITY_Q:H.attribValue+=Ae;continue}_e(H),H.q="",H.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:w(Ae)?H.state=T.ATTRIB:Ae===">"?xe(H):Ae==="/"?H.state=T.OPEN_TAG_SLASH:M(B,Ae)?(se(H,"No whitespace between attributes"),H.attribName=Ae,H.attribValue="",H.state=T.ATTRIB_NAME):se(H,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!K(Ae)){Ae==="&"?H.state=T.ATTRIB_VALUE_ENTITY_U:H.attribValue+=Ae;continue}_e(H),Ae===">"?xe(H):H.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(H.tagName)Ae===">"?D(H):M(g,Ae)?H.tagName+=Ae:H.script?(H.script+="</"+H.tagName,H.tagName="",H.state=T.SCRIPT):(w(Ae)||se(H,"Invalid tagname in closing tag"),H.state=T.CLOSE_TAG_SAW_WHITE);else{if(w(Ae))continue;V(B,Ae)?H.script?(H.script+="</"+Ae,H.state=T.SCRIPT):se(H,"Invalid tagname in closing tag."):H.tagName=Ae}continue;case T.CLOSE_TAG_SAW_WHITE:if(w(Ae))continue;Ae===">"?D(H):se(H,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var Se,z;switch(H.state){case T.TEXT_ENTITY:Se=T.TEXT,z="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:Se=T.ATTRIB_VALUE_QUOTED,z="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:Se=T.ATTRIB_VALUE_UNQUOTED,z="attribValue";break}Ae===";"?(H[z]+=$(H),H.entity="",H.state=Se):M(H.entity.length?_:j,Ae)?H.entity+=Ae:(se(H,"Invalid character in entity name"),H[z]+="&"+H.entity+Ae,H.entity="",H.state=Se);continue;default:throw new Error(H,"Unknown state: "+H.state)}return H.position>=H.bufferCheckPosition&&o(H),H}String.fromCodePoint||(function(){var O=String.fromCharCode,H=Math.floor,re=function(){var Ae=16384,oe=[],ce,Se,z=-1,ie=arguments.length;if(!ie)return"";for(var W="";++z<ie;){var Q=Number(arguments[z]);if(!isFinite(Q)||Q<0||Q>1114111||H(Q)!==Q)throw RangeError("Invalid code point: "+Q);Q<=65535?oe.push(Q):(Q-=65536,ce=(Q>>10)+55296,Se=Q%1024+56320,oe.push(ce,Se)),(z+1===ie||oe.length>Ae)&&(W+=O.apply(null,oe),oe.length=0)}return W};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:re,configurable:!0,writable:!0}):String.fromCodePoint=re})()})(r)})(Gg)),Gg}var lb,mB;function Wy(){return mB||(mB=1,lb={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}}),lb}var Ab,pB;function Xy(){if(pB)return Ab;pB=1;var r=Wy().isArray;return Ab={copyOptions:function(t){var s,n={};for(s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);return n},ensureFlagExists:function(t,s){(!(t in s)||typeof s[t]!="boolean")&&(s[t]=!1)},ensureSpacesExists:function(t){(!("spaces"in t)||typeof t.spaces!="number"&&typeof t.spaces!="string")&&(t.spaces=0)},ensureAlwaysArrayExists:function(t){(!("alwaysArray"in t)||typeof t.alwaysArray!="boolean"&&!r(t.alwaysArray))&&(t.alwaysArray=!1)},ensureKeyExists:function(t,s){(!(t+"Key"in s)||typeof s[t+"Key"]!="string")&&(s[t+"Key"]=s.compact?"_"+t:t)},checkFnExists:function(t,s){return t+"Fn"in s}},Ab}var cb,xB;function U3(){if(xB)return cb;xB=1;var r=UI(),t=Xy(),s=Wy().isArray,n,o;function l(g){return n=t.copyOptions(g),t.ensureFlagExists("ignoreDeclaration",n),t.ensureFlagExists("ignoreInstruction",n),t.ensureFlagExists("ignoreAttributes",n),t.ensureFlagExists("ignoreText",n),t.ensureFlagExists("ignoreComment",n),t.ensureFlagExists("ignoreCdata",n),t.ensureFlagExists("ignoreDoctype",n),t.ensureFlagExists("compact",n),t.ensureFlagExists("alwaysChildren",n),t.ensureFlagExists("addParent",n),t.ensureFlagExists("trim",n),t.ensureFlagExists("nativeType",n),t.ensureFlagExists("nativeTypeAttributes",n),t.ensureFlagExists("sanitize",n),t.ensureFlagExists("instructionHasAttributes",n),t.ensureFlagExists("captureSpacesBetweenElements",n),t.ensureAlwaysArrayExists(n),t.ensureKeyExists("declaration",n),t.ensureKeyExists("instruction",n),t.ensureKeyExists("attributes",n),t.ensureKeyExists("text",n),t.ensureKeyExists("comment",n),t.ensureKeyExists("cdata",n),t.ensureKeyExists("doctype",n),t.ensureKeyExists("type",n),t.ensureKeyExists("name",n),t.ensureKeyExists("elements",n),t.ensureKeyExists("parent",n),t.checkFnExists("doctype",n),t.checkFnExists("instruction",n),t.checkFnExists("cdata",n),t.checkFnExists("comment",n),t.checkFnExists("text",n),t.checkFnExists("instructionName",n),t.checkFnExists("elementName",n),t.checkFnExists("attributeName",n),t.checkFnExists("attributeValue",n),t.checkFnExists("attributes",n),n}function d(g){var j=Number(g);if(!isNaN(j))return j;var _=g.toLowerCase();return _==="true"?!0:_==="false"?!1:g}function c(g,j){var _;if(n.compact){if(!o[n[g+"Key"]]&&(s(n.alwaysArray)?n.alwaysArray.indexOf(n[g+"Key"])!==-1:n.alwaysArray)&&(o[n[g+"Key"]]=[]),o[n[g+"Key"]]&&!s(o[n[g+"Key"]])&&(o[n[g+"Key"]]=[o[n[g+"Key"]]]),g+"Fn"in n&&typeof j=="string"&&(j=n[g+"Fn"](j,o)),g==="instruction"&&("instructionFn"in n||"instructionNameFn"in n)){for(_ in j)if(j.hasOwnProperty(_))if("instructionFn"in n)j[_]=n.instructionFn(j[_],_,o);else{var w=j[_];delete j[_],j[n.instructionNameFn(_,w,o)]=w}}s(o[n[g+"Key"]])?o[n[g+"Key"]].push(j):o[n[g+"Key"]]=j}else{o[n.elementsKey]||(o[n.elementsKey]=[]);var L={};if(L[n.typeKey]=g,g==="instruction"){for(_ in j)if(j.hasOwnProperty(_))break;L[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(_,j,o):_,n.instructionHasAttributes?(L[n.attributesKey]=j[_][n.attributesKey],"instructionFn"in n&&(L[n.attributesKey]=n.instructionFn(L[n.attributesKey],_,o))):("instructionFn"in n&&(j[_]=n.instructionFn(j[_],_,o)),L[n.instructionKey]=j[_])}else g+"Fn"in n&&(j=n[g+"Fn"](j,o)),L[n[g+"Key"]]=j;n.addParent&&(L[n.parentKey]=o),o[n.elementsKey].push(L)}}function u(g){if("attributesFn"in n&&g&&(g=n.attributesFn(g,o)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&g){var j;for(j in g)if(g.hasOwnProperty(j)&&(n.trim&&(g[j]=g[j].trim()),n.nativeTypeAttributes&&(g[j]=d(g[j])),"attributeValueFn"in n&&(g[j]=n.attributeValueFn(g[j],j,o)),"attributeNameFn"in n)){var _=g[j];delete g[j],g[n.attributeNameFn(j,g[j],o)]=_}}return g}function h(g){var j={};if(g.body&&(g.name.toLowerCase()==="xml"||n.instructionHasAttributes)){for(var _=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,w;(w=_.exec(g.body))!==null;)j[w[1]]=w[2]||w[3]||w[4];j=u(j)}if(g.name.toLowerCase()==="xml"){if(n.ignoreDeclaration)return;o[n.declarationKey]={},Object.keys(j).length&&(o[n.declarationKey][n.attributesKey]=j),n.addParent&&(o[n.declarationKey][n.parentKey]=o)}else{if(n.ignoreInstruction)return;n.trim&&(g.body=g.body.trim());var L={};n.instructionHasAttributes&&Object.keys(j).length?(L[g.name]={},L[g.name][n.attributesKey]=j):L[g.name]=g.body,c("instruction",L)}}function m(g,j){var _;if(typeof g=="object"&&(j=g.attributes,g=g.name),j=u(j),"elementNameFn"in n&&(g=n.elementNameFn(g,o)),n.compact){if(_={},!n.ignoreAttributes&&j&&Object.keys(j).length){_[n.attributesKey]={};var w;for(w in j)j.hasOwnProperty(w)&&(_[n.attributesKey][w]=j[w])}!(g in o)&&(s(n.alwaysArray)?n.alwaysArray.indexOf(g)!==-1:n.alwaysArray)&&(o[g]=[]),o[g]&&!s(o[g])&&(o[g]=[o[g]]),s(o[g])?o[g].push(_):o[g]=_}else o[n.elementsKey]||(o[n.elementsKey]=[]),_={},_[n.typeKey]="element",_[n.nameKey]=g,!n.ignoreAttributes&&j&&Object.keys(j).length&&(_[n.attributesKey]=j),n.alwaysChildren&&(_[n.elementsKey]=[]),o[n.elementsKey].push(_);_[n.parentKey]=o,o=_}function x(g){n.ignoreText||!g.trim()&&!n.captureSpacesBetweenElements||(n.trim&&(g=g.trim()),n.nativeType&&(g=d(g)),n.sanitize&&(g=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),c("text",g))}function y(g){n.ignoreComment||(n.trim&&(g=g.trim()),c("comment",g))}function p(g){var j=o[n.parentKey];n.addParent||delete o[n.parentKey],o=j}function v(g){n.ignoreCdata||(n.trim&&(g=g.trim()),c("cdata",g))}function N(g){n.ignoreDoctype||(g=g.replace(/^ /,""),n.trim&&(g=g.trim()),c("doctype",g))}function B(g){g.note=g}return cb=function(g,j){var _=r.parser(!0,{}),w={};if(o=w,n=l(j),_.opt={strictEntities:!0},_.onopentag=m,_.ontext=x,_.oncomment=y,_.onclosetag=p,_.onerror=B,_.oncdata=v,_.ondoctype=N,_.onprocessinginstruction=h,_.write(g).close(),w[n.elementsKey]){var L=w[n.elementsKey];delete w[n.elementsKey],w[n.elementsKey]=L,delete w.text}return w},cb}var db,gB;function QI(){if(gB)return db;gB=1;var r=Xy(),t=U3();function s(n){var o=r.copyOptions(n);return r.ensureSpacesExists(o),o}return db=function(n,o){var l,d,c,u;return l=s(o),d=t(n,l),u="compact"in l&&l.compact?"_parent":"parent","addParent"in l&&l.addParent?c=JSON.stringify(d,function(h,m){return h===u?"_":m},l.spaces):c=JSON.stringify(d,null,l.spaces),c.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},db}var ub,bB;function Q3(){if(bB)return ub;bB=1;var r=Xy(),t=Wy().isArray,s,n;function o(_){var w=r.copyOptions(_);return r.ensureFlagExists("ignoreDeclaration",w),r.ensureFlagExists("ignoreInstruction",w),r.ensureFlagExists("ignoreAttributes",w),r.ensureFlagExists("ignoreText",w),r.ensureFlagExists("ignoreComment",w),r.ensureFlagExists("ignoreCdata",w),r.ensureFlagExists("ignoreDoctype",w),r.ensureFlagExists("compact",w),r.ensureFlagExists("indentText",w),r.ensureFlagExists("indentCdata",w),r.ensureFlagExists("indentAttributes",w),r.ensureFlagExists("indentInstruction",w),r.ensureFlagExists("fullTagEmptyElement",w),r.ensureFlagExists("noQuotesForNativeAttributes",w),r.ensureSpacesExists(w),typeof w.spaces=="number"&&(w.spaces=Array(w.spaces+1).join(" ")),r.ensureKeyExists("declaration",w),r.ensureKeyExists("instruction",w),r.ensureKeyExists("attributes",w),r.ensureKeyExists("text",w),r.ensureKeyExists("comment",w),r.ensureKeyExists("cdata",w),r.ensureKeyExists("doctype",w),r.ensureKeyExists("type",w),r.ensureKeyExists("name",w),r.ensureKeyExists("elements",w),r.checkFnExists("doctype",w),r.checkFnExists("instruction",w),r.checkFnExists("cdata",w),r.checkFnExists("comment",w),r.checkFnExists("text",w),r.checkFnExists("instructionName",w),r.checkFnExists("elementName",w),r.checkFnExists("attributeName",w),r.checkFnExists("attributeValue",w),r.checkFnExists("attributes",w),r.checkFnExists("fullTagEmptyElement",w),w}function l(_,w,L){return(!L&&_.spaces?`
`:"")+Array(w+1).join(_.spaces)}function d(_,w,L){if(w.ignoreAttributes)return"";"attributesFn"in w&&(_=w.attributesFn(_,n,s));var K,M,V,T,ne=[];for(K in _)_.hasOwnProperty(K)&&_[K]!==null&&_[K]!==void 0&&(T=w.noQuotesForNativeAttributes&&typeof _[K]!="string"?"":'"',M=""+_[K],M=M.replace(/"/g,"&quot;"),V="attributeNameFn"in w?w.attributeNameFn(K,M,n,s):K,ne.push(w.spaces&&w.indentAttributes?l(w,L+1,!1):" "),ne.push(V+"="+T+("attributeValueFn"in w?w.attributeValueFn(M,K,n,s):M)+T));return _&&Object.keys(_).length&&w.spaces&&w.indentAttributes&&ne.push(l(w,L,!1)),ne.join("")}function c(_,w,L){return s=_,n="xml",w.ignoreDeclaration?"":"<?xml"+d(_[w.attributesKey],w,L)+"?>"}function u(_,w,L){if(w.ignoreInstruction)return"";var K;for(K in _)if(_.hasOwnProperty(K))break;var M="instructionNameFn"in w?w.instructionNameFn(K,_[K],n,s):K;if(typeof _[K]=="object")return s=_,n=M,"<?"+M+d(_[K][w.attributesKey],w,L)+"?>";var V=_[K]?_[K]:"";return"instructionFn"in w&&(V=w.instructionFn(V,K,n,s)),"<?"+M+(V?" "+V:"")+"?>"}function h(_,w){return w.ignoreComment?"":"<!--"+("commentFn"in w?w.commentFn(_,n,s):_)+"-->"}function m(_,w){return w.ignoreCdata?"":"<![CDATA["+("cdataFn"in w?w.cdataFn(_,n,s):_.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function x(_,w){return w.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in w?w.doctypeFn(_,n,s):_)+">"}function y(_,w){return w.ignoreText?"":(_=""+_,_=_.replace(/&amp;/g,"&"),_=_.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in w?w.textFn(_,n,s):_)}function p(_,w){var L;if(_.elements&&_.elements.length)for(L=0;L<_.elements.length;++L)switch(_.elements[L][w.typeKey]){case"text":if(w.indentText)return!0;break;case"cdata":if(w.indentCdata)return!0;break;case"instruction":if(w.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function v(_,w,L){s=_,n=_.name;var K=[],M="elementNameFn"in w?w.elementNameFn(_.name,_):_.name;K.push("<"+M),_[w.attributesKey]&&K.push(d(_[w.attributesKey],w,L));var V=_[w.elementsKey]&&_[w.elementsKey].length||_[w.attributesKey]&&_[w.attributesKey]["xml:space"]==="preserve";return V||("fullTagEmptyElementFn"in w?V=w.fullTagEmptyElementFn(_.name,_):V=w.fullTagEmptyElement),V?(K.push(">"),_[w.elementsKey]&&_[w.elementsKey].length&&(K.push(N(_[w.elementsKey],w,L+1)),s=_,n=_.name),K.push(w.spaces&&p(_,w)?`
`+Array(L+1).join(w.spaces):""),K.push("</"+M+">")):K.push("/>"),K.join("")}function N(_,w,L,K){return _.reduce(function(M,V){var T=l(w,L,K&&!M);switch(V.type){case"element":return M+T+v(V,w,L);case"comment":return M+T+h(V[w.commentKey],w);case"doctype":return M+T+x(V[w.doctypeKey],w);case"cdata":return M+(w.indentCdata?T:"")+m(V[w.cdataKey],w);case"text":return M+(w.indentText?T:"")+y(V[w.textKey],w);case"instruction":var ne={};return ne[V[w.nameKey]]=V[w.attributesKey]?V:V[w.instructionKey],M+(w.indentInstruction?T:"")+u(ne,w,L)}},"")}function B(_,w,L){var K;for(K in _)if(_.hasOwnProperty(K))switch(K){case w.parentKey:case w.attributesKey:break;case w.textKey:if(w.indentText||L)return!0;break;case w.cdataKey:if(w.indentCdata||L)return!0;break;case w.instructionKey:if(w.indentInstruction||L)return!0;break;case w.doctypeKey:case w.commentKey:return!0;default:return!0}return!1}function g(_,w,L,K,M){s=_,n=w;var V="elementNameFn"in L?L.elementNameFn(w,_):w;if(typeof _>"u"||_===null||_==="")return"fullTagEmptyElementFn"in L&&L.fullTagEmptyElementFn(w,_)||L.fullTagEmptyElement?"<"+V+"></"+V+">":"<"+V+"/>";var T=[];if(w){if(T.push("<"+V),typeof _!="object")return T.push(">"+y(_,L)+"</"+V+">"),T.join("");_[L.attributesKey]&&T.push(d(_[L.attributesKey],L,K));var ne=B(_,L,!0)||_[L.attributesKey]&&_[L.attributesKey]["xml:space"]==="preserve";if(ne||("fullTagEmptyElementFn"in L?ne=L.fullTagEmptyElementFn(w,_):ne=L.fullTagEmptyElement),ne)T.push(">");else return T.push("/>"),T.join("")}return T.push(j(_,L,K+1,!1)),s=_,n=w,w&&T.push((M?l(L,K,!1):"")+"</"+V+">"),T.join("")}function j(_,w,L,K){var M,V,T,ne=[];for(V in _)if(_.hasOwnProperty(V))for(T=t(_[V])?_[V]:[_[V]],M=0;M<T.length;++M){switch(V){case w.declarationKey:ne.push(c(T[M],w,L));break;case w.instructionKey:ne.push((w.indentInstruction?l(w,L,K):"")+u(T[M],w,L));break;case w.attributesKey:case w.parentKey:break;case w.textKey:ne.push((w.indentText?l(w,L,K):"")+y(T[M],w));break;case w.cdataKey:ne.push((w.indentCdata?l(w,L,K):"")+m(T[M],w));break;case w.doctypeKey:ne.push(l(w,L,K)+x(T[M],w));break;case w.commentKey:ne.push(l(w,L,K)+h(T[M],w));break;default:ne.push(l(w,L,K)+g(T[M],V,w,L,B(T[M],w)))}K=K&&!ne.length}return ne.join("")}return ub=function(_,w){w=o(w);var L=[];return s=_,n="_root_",w.compact?L.push(j(_,w,0,!0)):(_[w.declarationKey]&&L.push(c(_[w.declarationKey],w,0)),_[w.elementsKey]&&_[w.elementsKey].length&&L.push(N(_[w.elementsKey],w,0,!L.length))),L.join("")},ub}var hb,yB;function LI(){if(yB)return hb;yB=1;var r=Q3();return hb=function(t,s){t instanceof Buffer&&(t=t.toString());var n=null;if(typeof t=="string")try{n=JSON.parse(t)}catch{throw new Error("The JSON structure is invalid")}else n=t;return r(n,s)},hb}var fb,wB;function TI(){if(wB)return fb;wB=1;var r=U3(),t=QI(),s=Q3(),n=LI();return fb={xml2js:r,xml2json:t,js2xml:s,json2xml:n},fb}var L3=TI();const Yy=r=>{switch(r.type){case void 0:case"element":const t=new DI(r.name,r.attributes),s=r.elements||[];for(const n of s){const o=Yy(n);o!==void 0&&t.push(o)}return t;case"text":return r.text;default:return}};class II extends Ht{}class DI extends rt{static fromXmlString(t){const s=L3.xml2js(t,{compact:!1});return Yy(s)}constructor(t,s){super(t),s&&this.root.push(new II(s))}push(t){this.root.push(t)}}class RI extends rt{constructor(t){super(""),this._attr=t}prepForXml(t){return{_attr:this._attr}}}class T3 extends rt{constructor(t,s){super(t),s&&(this.root=s.root)}}const za=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},Ep=r=>{const t=za(r);if(t<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return t},I3=(r,t)=>{const s=t*2;if(r.length!==s||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${s} digit hex value`);return r},vB=r=>I3(r,1),Jy=r=>{const t=r.slice(-2),s=r.substring(0,r.length-2);return`${Number(s)}${t}`},D3=r=>{const t=Jy(r);if(parseFloat(t)<0)throw new Error(`Invalid value '${t}' specified. Expected a positive number.`);return t},Au=r=>{if(r==="auto")return r;const t=r.charAt(0)==="#"?r.substring(1):r;return I3(t,3)},Fl=r=>typeof r=="string"?Jy(r):za(r),OI=r=>typeof r=="string"?D3(r):Ep(r),Ua=r=>typeof r=="string"?D3(r):Ep(r),HI=r=>{const t=r.substring(0,r.length-1);return`${Number(t)}%`},R3=r=>typeof r=="number"?za(r):r.slice(-1)==="%"?HI(r):Jy(r),MI=Ep,PI=Ep,KI=r=>r.toISOString();class nt extends rt{constructor(t,s=!0){super(t),s!==!0&&this.root.push(new Qs({val:s}))}}class mb extends rt{constructor(t,s){super(t),this.root.push(new Qs({val:OI(s)}))}}class Fc extends rt{constructor(t,s){super(t),this.root.push(new Qs({val:s}))}}const ch=(r,t)=>new Ho({name:r,attributes:{value:{key:"w:val",value:t}}});class Fh extends rt{constructor(t,s){super(t),this.root.push(new Qs({val:s}))}}class zI extends rt{constructor(t,s){super(t),this.root.push(new Qs({val:s}))}}class dc extends rt{constructor(t,s){super(t),this.root.push(s)}}class Ho extends rt{constructor({name:t,attributes:s,children:n}){super(t),s&&this.root.push(new kA(s)),n&&this.root.push(...n)}}const xi={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 qI extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class O3 extends rt{constructor(t){super("w:jc"),this.root.push(new qI({val:t}))}}class zr extends rt{constructor(t,{color:s,size:n,space:o,style:l}){super(t),this.root.push(new GI({style:l,color:s===void 0?void 0:Au(s),size:n===void 0?void 0:MI(n),space:o===void 0?void 0:PI(o)}))}}class GI extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const Zy={SINGLE:"single",NONE:"none"};class VI extends Ll{constructor(t){super("w:pBdr"),t.top&&this.root.push(new zr("w:top",t.top)),t.bottom&&this.root.push(new zr("w:bottom",t.bottom)),t.left&&this.root.push(new zr("w:left",t.left)),t.right&&this.root.push(new zr("w:right",t.right))}}class WI extends rt{constructor(){super("w:pBdr");const t=new zr("w:bottom",{color:"auto",space:1,style:Zy.SINGLE,size:6});this.root.push(t)}}class XI extends rt{constructor({start:t,end:s,left:n,right:o,hanging:l,firstLine:d}){super("w:ind"),this.root.push(new kA({start:{key:"w:start",value:t===void 0?void 0:Fl(t)},end:{key:"w:end",value:s===void 0?void 0:Fl(s)},left:{key:"w:left",value:n===void 0?void 0:Fl(n)},right:{key:"w:right",value:o===void 0?void 0:Fl(o)},hanging:{key:"w:hanging",value:l===void 0?void 0:Ua(l)},firstLine:{key:"w:firstLine",value:d===void 0?void 0:Ua(d)}}))}}let YI=class extends rt{constructor(){super("w:br")}};const $y={BEGIN:"begin",END:"end",SEPARATE:"separate"};class e1 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class Sm extends rt{constructor(t){super("w:fldChar"),this.root.push(new e1({type:$y.BEGIN,dirty:t}))}}class _m extends rt{constructor(t){super("w:fldChar"),this.root.push(new e1({type:$y.SEPARATE,dirty:t}))}}class km extends rt{constructor(t){super("w:fldChar"),this.root.push(new e1({type:$y.END,dirty:t}))}}const cu={DEFAULT:"default",PRESERVE:"preserve"};class du extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{space:"xml:space"})}}class JI extends rt{constructor(){super("w:instrText"),this.root.push(new du({space:cu.PRESERVE})),this.root.push("PAGE")}}class ZI extends rt{constructor(){super("w:instrText"),this.root.push(new du({space:cu.PRESERVE})),this.root.push("NUMPAGES")}}class $I extends rt{constructor(){super("w:instrText"),this.root.push(new du({space:cu.PRESERVE})),this.root.push("SECTIONPAGES")}}class eD extends rt{constructor(){super("w:instrText"),this.root.push(new du({space:cu.PRESERVE})),this.root.push("SECTION")}}class tD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class Up extends rt{constructor({fill:t,color:s,type:n}){super("w:shd"),this.root.push(new tD({fill:t===void 0?void 0:Au(t),color:s===void 0?void 0:Au(s),type:n}))}}class rD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const sD={DOT:"dot"};class aD extends rt{constructor(t){super("w:em"),this.root.push(new Qs({val:t}))}}class nD extends aD{constructor(t=sD.DOT){super(t)}}class iD extends rt{constructor(t){super("w:spacing"),this.root.push(new Qs({val:Fl(t)}))}}class oD extends rt{constructor(t){super("w:color"),this.root.push(new Qs({val:Au(t)}))}}class lD extends rt{constructor(t){super("w:highlight"),this.root.push(new Qs({val:t}))}}class AD extends rt{constructor(t){super("w:highlightCs"),this.root.push(new Qs({val:t}))}}const cD=r=>new Ho({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 NB extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class pb extends rt{constructor(t,s){if(super("w:rFonts"),typeof t=="string"){const n=t;this.root.push(new NB({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:s}))}else{const n=t;this.root.push(new NB(n))}}}let H3=class extends rt{constructor(t){super("w:vertAlign"),this.root.push(new Qs({val:t}))}};class dD extends H3{constructor(){super("superscript")}}class uD extends H3{constructor(){super("subscript")}}const M3={SINGLE:"single"};class hD extends rt{constructor(t=M3.SINGLE,s){super("w:u"),this.root.push(new Qs({val:t,color:s===void 0?void 0:Au(s)}))}}class Dc extends Ll{constructor(t){var s,n;if(super("w:rPr"),!t)return;t.style&&this.push(new Fc("w:rStyle",t.style)),t.font&&(typeof t.font=="string"?this.push(new pb(t.font)):"name"in t.font?this.push(new pb(t.font.name,t.font.hint)):this.push(new pb(t.font))),t.bold!==void 0&&this.push(new nt("w:b",t.bold)),(t.boldComplexScript===void 0&&t.bold!==void 0||t.boldComplexScript)&&this.push(new nt("w:bCs",(s=t.boldComplexScript)!=null?s:t.bold)),t.italics!==void 0&&this.push(new nt("w:i",t.italics)),(t.italicsComplexScript===void 0&&t.italics!==void 0||t.italicsComplexScript)&&this.push(new nt("w:iCs",(n=t.italicsComplexScript)!=null?n:t.italics)),t.smallCaps!==void 0?this.push(new nt("w:smallCaps",t.smallCaps)):t.allCaps!==void 0&&this.push(new nt("w:caps",t.allCaps)),t.strike!==void 0&&this.push(new nt("w:strike",t.strike)),t.doubleStrike!==void 0&&this.push(new nt("w:dstrike",t.doubleStrike)),t.emboss!==void 0&&this.push(new nt("w:emboss",t.emboss)),t.imprint!==void 0&&this.push(new nt("w:imprint",t.imprint)),t.noProof!==void 0&&this.push(new nt("w:noProof",t.noProof)),t.snapToGrid!==void 0&&this.push(new nt("w:snapToGrid",t.snapToGrid)),t.vanish&&this.push(new nt("w:vanish",t.vanish)),t.color&&this.push(new oD(t.color)),t.characterSpacing&&this.push(new iD(t.characterSpacing)),t.scale!==void 0&&this.push(new Fh("w:w",t.scale)),t.kern&&this.push(new mb("w:kern",t.kern)),t.position&&this.push(new Fc("w:position",t.position)),t.size!==void 0&&this.push(new mb("w:sz",t.size));const o=t.sizeComplexScript===void 0||t.sizeComplexScript===!0?t.size:t.sizeComplexScript;o&&this.push(new mb("w:szCs",o)),t.highlight&&this.push(new lD(t.highlight));const l=t.highlightComplexScript===void 0||t.highlightComplexScript===!0?t.highlight:t.highlightComplexScript;l&&this.push(new AD(l)),t.underline&&this.push(new hD(t.underline.type,t.underline.color)),t.effect&&this.push(new Fc("w:effect",t.effect)),t.border&&this.push(new zr("w:bdr",t.border)),t.shading&&this.push(new Up(t.shading)),t.subScript&&this.push(new uD),t.superScript&&this.push(new dD),t.rightToLeft!==void 0&&this.push(new nt("w:rtl",t.rightToLeft)),t.emphasisMark&&this.push(new nD(t.emphasisMark.type)),t.language&&this.push(cD(t.language)),t.specVanish&&this.push(new nt("w:specVanish",t.vanish)),t.math&&this.push(new nt("w:oMath",t.math)),t.revision&&this.push(new fD(t.revision))}push(t){this.root.push(t)}}class fD extends rt{constructor(t){super("w:rPrChange"),this.root.push(new rD({id:t.id,author:t.author,date:t.date})),this.addChildElement(new Dc(t))}}class BB extends rt{constructor(t){var s;super("w:t"),typeof t=="string"?(this.root.push(new du({space:cu.PRESERVE})),this.root.push(t)):(this.root.push(new du({space:(s=t.space)!=null?s:cu.DEFAULT})),this.root.push(t.text))}}const Fm={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class Qp extends rt{constructor(t){if(super("w:r"),et(this,"properties"),this.properties=new Dc(t),this.root.push(this.properties),t.break)for(let s=0;s<t.break;s++)this.root.push(new YI);if(t.children)for(const s of t.children){if(typeof s=="string"){switch(s){case Fm.CURRENT:this.root.push(new Sm),this.root.push(new JI),this.root.push(new _m),this.root.push(new km);break;case Fm.TOTAL_PAGES:this.root.push(new Sm),this.root.push(new ZI),this.root.push(new _m),this.root.push(new km);break;case Fm.TOTAL_PAGES_IN_SECTION:this.root.push(new Sm),this.root.push(new $I),this.root.push(new _m),this.root.push(new km);break;case Fm.CURRENT_SECTION:this.root.push(new Sm),this.root.push(new eD),this.root.push(new _m),this.root.push(new km);break;default:this.root.push(new BB(s));break}continue}this.root.push(s)}else t.text!==void 0&&this.root.push(new BB(t.text))}}class Xt extends Qp{constructor(t){super(typeof t=="string"?{text:t}:t)}}var xb={},Kr={},gb,jB;function Xh(){if(jB)return gb;jB=1,gb=r;function r(t,s){if(!t)throw new Error(s||"Assertion failed")}return r.equal=function(s,n,o){if(s!=n)throw new Error(o||"Assertion failed: "+s+" != "+n)},gb}var CB;function zo(){if(CB)return Kr;CB=1;var r=Xh(),t=FA();Kr.inherits=t;function s(U,q){return(U.charCodeAt(q)&64512)!==55296||q<0||q+1>=U.length?!1:(U.charCodeAt(q+1)&64512)===56320}function n(U,q){if(Array.isArray(U))return U.slice();if(!U)return[];var F=[];if(typeof U=="string")if(q){if(q==="hex")for(U=U.replace(/[^a-z0-9]+/ig,""),U.length%2!==0&&(U="0"+U),ae=0;ae<U.length;ae+=2)F.push(parseInt(U[ae]+U[ae+1],16))}else for(var le=0,ae=0;ae<U.length;ae++){var se=U.charCodeAt(ae);se<128?F[le++]=se:se<2048?(F[le++]=se>>6|192,F[le++]=se&63|128):s(U,ae)?(se=65536+((se&1023)<<10)+(U.charCodeAt(++ae)&1023),F[le++]=se>>18|240,F[le++]=se>>12&63|128,F[le++]=se>>6&63|128,F[le++]=se&63|128):(F[le++]=se>>12|224,F[le++]=se>>6&63|128,F[le++]=se&63|128)}else for(ae=0;ae<U.length;ae++)F[ae]=U[ae]|0;return F}Kr.toArray=n;function o(U){for(var q="",F=0;F<U.length;F++)q+=c(U[F].toString(16));return q}Kr.toHex=o;function l(U){var q=U>>>24|U>>>8&65280|U<<8&16711680|(U&255)<<24;return q>>>0}Kr.htonl=l;function d(U,q){for(var F="",le=0;le<U.length;le++){var ae=U[le];q==="little"&&(ae=l(ae)),F+=u(ae.toString(16))}return F}Kr.toHex32=d;function c(U){return U.length===1?"0"+U:U}Kr.zero2=c;function u(U){return U.length===7?"0"+U:U.length===6?"00"+U:U.length===5?"000"+U:U.length===4?"0000"+U:U.length===3?"00000"+U:U.length===2?"000000"+U:U.length===1?"0000000"+U:U}Kr.zero8=u;function h(U,q,F,le){var ae=F-q;r(ae%4===0);for(var se=new Array(ae/4),fe=0,ye=q;fe<se.length;fe++,ye+=4){var _e;le==="big"?_e=U[ye]<<24|U[ye+1]<<16|U[ye+2]<<8|U[ye+3]:_e=U[ye+3]<<24|U[ye+2]<<16|U[ye+1]<<8|U[ye],se[fe]=_e>>>0}return se}Kr.join32=h;function m(U,q){for(var F=new Array(U.length*4),le=0,ae=0;le<U.length;le++,ae+=4){var se=U[le];q==="big"?(F[ae]=se>>>24,F[ae+1]=se>>>16&255,F[ae+2]=se>>>8&255,F[ae+3]=se&255):(F[ae+3]=se>>>24,F[ae+2]=se>>>16&255,F[ae+1]=se>>>8&255,F[ae]=se&255)}return F}Kr.split32=m;function x(U,q){return U>>>q|U<<32-q}Kr.rotr32=x;function y(U,q){return U<<q|U>>>32-q}Kr.rotl32=y;function p(U,q){return U+q>>>0}Kr.sum32=p;function v(U,q,F){return U+q+F>>>0}Kr.sum32_3=v;function N(U,q,F,le){return U+q+F+le>>>0}Kr.sum32_4=N;function B(U,q,F,le,ae){return U+q+F+le+ae>>>0}Kr.sum32_5=B;function g(U,q,F,le){var ae=U[q],se=U[q+1],fe=le+se>>>0,ye=(fe<le?1:0)+F+ae;U[q]=ye>>>0,U[q+1]=fe}Kr.sum64=g;function j(U,q,F,le){var ae=q+le>>>0,se=(ae<q?1:0)+U+F;return se>>>0}Kr.sum64_hi=j;function _(U,q,F,le){var ae=q+le;return ae>>>0}Kr.sum64_lo=_;function w(U,q,F,le,ae,se,fe,ye){var _e=0,xe=q;xe=xe+le>>>0,_e+=xe<q?1:0,xe=xe+se>>>0,_e+=xe<se?1:0,xe=xe+ye>>>0,_e+=xe<ye?1:0;var D=U+F+ae+fe+_e;return D>>>0}Kr.sum64_4_hi=w;function L(U,q,F,le,ae,se,fe,ye){var _e=q+le+se+ye;return _e>>>0}Kr.sum64_4_lo=L;function K(U,q,F,le,ae,se,fe,ye,_e,xe){var D=0,$=q;$=$+le>>>0,D+=$<q?1:0,$=$+se>>>0,D+=$<se?1:0,$=$+ye>>>0,D+=$<ye?1:0,$=$+xe>>>0,D+=$<xe?1:0;var X=U+F+ae+fe+_e+D;return X>>>0}Kr.sum64_5_hi=K;function M(U,q,F,le,ae,se,fe,ye,_e,xe){var D=q+le+se+ye+xe;return D>>>0}Kr.sum64_5_lo=M;function V(U,q,F){var le=q<<32-F|U>>>F;return le>>>0}Kr.rotr64_hi=V;function T(U,q,F){var le=U<<32-F|q>>>F;return le>>>0}Kr.rotr64_lo=T;function ne(U,q,F){return U>>>F}Kr.shr64_hi=ne;function Z(U,q,F){var le=U<<32-F|q>>>F;return le>>>0}return Kr.shr64_lo=Z,Kr}var bb={},SB;function Yh(){if(SB)return bb;SB=1;var r=zo(),t=Xh();function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return bb.BlockHash=s,s.prototype.update=function(o,l){if(o=r.toArray(o,l),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var d=o.length%this._delta8;this.pending=o.slice(o.length-d,o.length),this.pending.length===0&&(this.pending=null),o=r.join32(o,0,o.length-d,this.endian);for(var c=0;c<o.length;c+=this._delta32)this._update(o,c,c+this._delta32)}return this},s.prototype.digest=function(o){return this.update(this._pad()),t(this.pending===null),this._digest(o)},s.prototype._pad=function(){var o=this.pendingTotal,l=this._delta8,d=l-(o+this.padLength)%l,c=new Array(d+this.padLength);c[0]=128;for(var u=1;u<d;u++)c[u]=0;if(o<<=3,this.endian==="big"){for(var h=8;h<this.padLength;h++)c[u++]=0;c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=o>>>24&255,c[u++]=o>>>16&255,c[u++]=o>>>8&255,c[u++]=o&255}else for(c[u++]=o&255,c[u++]=o>>>8&255,c[u++]=o>>>16&255,c[u++]=o>>>24&255,c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0,h=8;h<this.padLength;h++)c[u++]=0;return c},bb}var uc={},Qo={},_B;function P3(){if(_B)return Qo;_B=1;var r=zo(),t=r.rotr32;function s(m,x,y,p){if(m===0)return n(x,y,p);if(m===1||m===3)return l(x,y,p);if(m===2)return o(x,y,p)}Qo.ft_1=s;function n(m,x,y){return m&x^~m&y}Qo.ch32=n;function o(m,x,y){return m&x^m&y^x&y}Qo.maj32=o;function l(m,x,y){return m^x^y}Qo.p32=l;function d(m){return t(m,2)^t(m,13)^t(m,22)}Qo.s0_256=d;function c(m){return t(m,6)^t(m,11)^t(m,25)}Qo.s1_256=c;function u(m){return t(m,7)^t(m,18)^m>>>3}Qo.g0_256=u;function h(m){return t(m,17)^t(m,19)^m>>>10}return Qo.g1_256=h,Qo}var yb,kB;function mD(){if(kB)return yb;kB=1;var r=zo(),t=Yh(),s=P3(),n=r.rotl32,o=r.sum32,l=r.sum32_5,d=s.ft_1,c=t.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(h,c),yb=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(x,y){for(var p=this.W,v=0;v<16;v++)p[v]=x[y+v];for(;v<p.length;v++)p[v]=n(p[v-3]^p[v-8]^p[v-14]^p[v-16],1);var N=this.h[0],B=this.h[1],g=this.h[2],j=this.h[3],_=this.h[4];for(v=0;v<p.length;v++){var w=~~(v/20),L=l(n(N,5),d(w,B,g,j),_,p[v],u[w]);_=j,j=g,g=n(B,30),B=N,N=L}this.h[0]=o(this.h[0],N),this.h[1]=o(this.h[1],B),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],j),this.h[4]=o(this.h[4],_)},h.prototype._digest=function(x){return x==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},yb}var wb,FB;function K3(){if(FB)return wb;FB=1;var r=zo(),t=Yh(),s=P3(),n=Xh(),o=r.sum32,l=r.sum32_4,d=r.sum32_5,c=s.ch32,u=s.maj32,h=s.s0_256,m=s.s1_256,x=s.g0_256,y=s.g1_256,p=t.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function N(){if(!(this instanceof N))return new N;p.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}return r.inherits(N,p),wb=N,N.blockSize=512,N.outSize=256,N.hmacStrength=192,N.padLength=64,N.prototype._update=function(g,j){for(var _=this.W,w=0;w<16;w++)_[w]=g[j+w];for(;w<_.length;w++)_[w]=l(y(_[w-2]),_[w-7],x(_[w-15]),_[w-16]);var L=this.h[0],K=this.h[1],M=this.h[2],V=this.h[3],T=this.h[4],ne=this.h[5],Z=this.h[6],U=this.h[7];for(n(this.k.length===_.length),w=0;w<_.length;w++){var q=d(U,m(T),c(T,ne,Z),this.k[w],_[w]),F=o(h(L),u(L,K,M));U=Z,Z=ne,ne=T,T=o(V,q),V=M,M=K,K=L,L=o(q,F)}this.h[0]=o(this.h[0],L),this.h[1]=o(this.h[1],K),this.h[2]=o(this.h[2],M),this.h[3]=o(this.h[3],V),this.h[4]=o(this.h[4],T),this.h[5]=o(this.h[5],ne),this.h[6]=o(this.h[6],Z),this.h[7]=o(this.h[7],U)},N.prototype._digest=function(g){return g==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},wb}var vb,EB;function pD(){if(EB)return vb;EB=1;var r=zo(),t=K3();function s(){if(!(this instanceof s))return new s;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return r.inherits(s,t),vb=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(o){return o==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},vb}var Nb,UB;function z3(){if(UB)return Nb;UB=1;var r=zo(),t=Yh(),s=Xh(),n=r.rotr64_hi,o=r.rotr64_lo,l=r.shr64_hi,d=r.shr64_lo,c=r.sum64,u=r.sum64_hi,h=r.sum64_lo,m=r.sum64_4_hi,x=r.sum64_4_lo,y=r.sum64_5_hi,p=r.sum64_5_lo,v=t.BlockHash,N=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function B(){if(!(this instanceof B))return new B;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=N,this.W=new Array(160)}r.inherits(B,v),Nb=B,B.blockSize=1024,B.outSize=512,B.hmacStrength=192,B.padLength=128,B.prototype._prepareBlock=function(F,le){for(var ae=this.W,se=0;se<32;se++)ae[se]=F[le+se];for(;se<ae.length;se+=2){var fe=Z(ae[se-4],ae[se-3]),ye=U(ae[se-4],ae[se-3]),_e=ae[se-14],xe=ae[se-13],D=T(ae[se-30],ae[se-29]),$=ne(ae[se-30],ae[se-29]),X=ae[se-32],te=ae[se-31];ae[se]=m(fe,ye,_e,xe,D,$,X,te),ae[se+1]=x(fe,ye,_e,xe,D,$,X,te)}},B.prototype._update=function(F,le){this._prepareBlock(F,le);var ae=this.W,se=this.h[0],fe=this.h[1],ye=this.h[2],_e=this.h[3],xe=this.h[4],D=this.h[5],$=this.h[6],X=this.h[7],te=this.h[8],J=this.h[9],O=this.h[10],H=this.h[11],re=this.h[12],Ae=this.h[13],oe=this.h[14],ce=this.h[15];s(this.k.length===ae.length);for(var Se=0;Se<ae.length;Se+=2){var z=oe,ie=ce,W=M(te,J),Q=V(te,J),I=g(te,J,O,H,re),k=j(te,J,O,H,re,Ae),G=this.k[Se],me=this.k[Se+1],be=ae[Se],Ue=ae[Se+1],Re=y(z,ie,W,Q,I,k,G,me,be,Ue),He=p(z,ie,W,Q,I,k,G,me,be,Ue);z=L(se,fe),ie=K(se,fe),W=_(se,fe,ye,_e,xe),Q=w(se,fe,ye,_e,xe,D);var Ve=u(z,ie,W,Q),it=h(z,ie,W,Q);oe=re,ce=Ae,re=O,Ae=H,O=te,H=J,te=u($,X,Re,He),J=h(X,X,Re,He),$=xe,X=D,xe=ye,D=_e,ye=se,_e=fe,se=u(Re,He,Ve,it),fe=h(Re,He,Ve,it)}c(this.h,0,se,fe),c(this.h,2,ye,_e),c(this.h,4,xe,D),c(this.h,6,$,X),c(this.h,8,te,J),c(this.h,10,O,H),c(this.h,12,re,Ae),c(this.h,14,oe,ce)},B.prototype._digest=function(F){return F==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function g(q,F,le,ae,se){var fe=q&le^~q&se;return fe<0&&(fe+=4294967296),fe}function j(q,F,le,ae,se,fe){var ye=F&ae^~F&fe;return ye<0&&(ye+=4294967296),ye}function _(q,F,le,ae,se){var fe=q&le^q&se^le&se;return fe<0&&(fe+=4294967296),fe}function w(q,F,le,ae,se,fe){var ye=F&ae^F&fe^ae&fe;return ye<0&&(ye+=4294967296),ye}function L(q,F){var le=n(q,F,28),ae=n(F,q,2),se=n(F,q,7),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function K(q,F){var le=o(q,F,28),ae=o(F,q,2),se=o(F,q,7),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function M(q,F){var le=n(q,F,14),ae=n(q,F,18),se=n(F,q,9),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function V(q,F){var le=o(q,F,14),ae=o(q,F,18),se=o(F,q,9),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function T(q,F){var le=n(q,F,1),ae=n(q,F,8),se=l(q,F,7),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function ne(q,F){var le=o(q,F,1),ae=o(q,F,8),se=d(q,F,7),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function Z(q,F){var le=n(q,F,19),ae=n(F,q,29),se=l(q,F,6),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}function U(q,F){var le=o(q,F,19),ae=o(F,q,29),se=d(q,F,6),fe=le^ae^se;return fe<0&&(fe+=4294967296),fe}return Nb}var Bb,QB;function xD(){if(QB)return Bb;QB=1;var r=zo(),t=z3();function s(){if(!(this instanceof s))return new s;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return r.inherits(s,t),Bb=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(o){return o==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},Bb}var LB;function gD(){return LB||(LB=1,uc.sha1=mD(),uc.sha224=pD(),uc.sha256=K3(),uc.sha384=xD(),uc.sha512=z3()),uc}var jb={},TB;function bD(){if(TB)return jb;TB=1;var r=zo(),t=Yh(),s=r.rotl32,n=r.sum32,o=r.sum32_3,l=r.sum32_4,d=t.BlockHash;function c(){if(!(this instanceof c))return new c;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}r.inherits(c,d),jb.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(B,g){for(var j=this.h[0],_=this.h[1],w=this.h[2],L=this.h[3],K=this.h[4],M=j,V=_,T=w,ne=L,Z=K,U=0;U<80;U++){var q=n(s(l(j,u(U,_,w,L),B[x[U]+g],h(U)),p[U]),K);j=K,K=L,L=s(w,10),w=_,_=q,q=n(s(l(M,u(79-U,V,T,ne),B[y[U]+g],m(U)),v[U]),Z),M=Z,Z=ne,ne=s(T,10),T=V,V=q}q=o(this.h[1],w,ne),this.h[1]=o(this.h[2],L,Z),this.h[2]=o(this.h[3],K,M),this.h[3]=o(this.h[4],j,V),this.h[4]=o(this.h[0],_,T),this.h[0]=q},c.prototype._digest=function(B){return B==="hex"?r.toHex32(this.h,"little"):r.split32(this.h,"little")};function u(N,B,g,j){return N<=15?B^g^j:N<=31?B&g|~B&j:N<=47?(B|~g)^j:N<=63?B&j|g&~j:B^(g|~j)}function h(N){return N<=15?0:N<=31?1518500249:N<=47?1859775393:N<=63?2400959708:2840853838}function m(N){return N<=15?1352829926:N<=31?1548603684:N<=47?1836072691:N<=63?2053994217:0}var x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return jb}var Cb,IB;function yD(){if(IB)return Cb;IB=1;var r=zo(),t=Xh();function s(n,o,l){if(!(this instanceof s))return new s(n,o,l);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(o,l))}return Cb=s,s.prototype._init=function(o){o.length>this.blockSize&&(o=new this.Hash().update(o).digest()),t(o.length<=this.blockSize);for(var l=o.length;l<this.blockSize;l++)o.push(0);for(l=0;l<o.length;l++)o[l]^=54;for(this.inner=new this.Hash().update(o),l=0;l<o.length;l++)o[l]^=106;this.outer=new this.Hash().update(o)},s.prototype.update=function(o,l){return this.inner.update(o,l),this},s.prototype.digest=function(o){return this.outer.update(this.inner.digest()),this.outer.digest(o)},Cb}var DB;function wD(){return DB||(DB=1,(function(r){var t=r;t.utils=zo(),t.common=Yh(),t.sha=gD(),t.ripemd=bD(),t.hmac=yD(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160})(xb)),xb}wD();let vD="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ND=(r,t=21)=>(s=t)=>{let n="",o=s|0;for(;o--;)n+=r[Math.random()*r.length|0];return n},BD=(r=21)=>{let t="",s=r|0;for(;s--;)t+=vD[Math.random()*64|0];return t};const to=r=>Math.floor(r*72*20),t1=(r=0)=>{let t=r;return()=>++t},jD=()=>t1(),CD=()=>t1(1),SD=()=>t1(),_D=()=>BD().toLowerCase(),dh=r=>ND("1234567890abcdef",r)(),kD=()=>`${dh(8)}-${dh(4)}-${dh(4)}-${dh(4)}-${dh(12)}`;class FD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{xmlns:"xmlns"})}}class ED extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const UD={EXTERNAL:"External"};class QD extends rt{constructor(t,s,n,o){super("Relationship"),this.root.push(new ED({id:t,type:s,target:n,targetMode:o}))}}class Rc extends rt{constructor(){super("Relationships"),this.root.push(new FD({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(t,s,n,o){const l=new QD(`rId${t}`,s,n,o);return this.root.push(l),l}get RelationshipCount(){return this.root.length-1}}class LD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class TD extends Ht{constructor(){super(...arguments),et(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 ID extends rt{constructor({id:t,initials:s,author:n,date:o=new Date,children:l}){super("w:comment"),this.root.push(new LD({id:t,initials:s,author:n,date:o.toISOString()}));for(const d of l)this.root.push(d)}}class DD extends rt{constructor({children:t}){super("w:comments"),et(this,"relationships"),this.root.push(new TD({"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 s of t)this.root.push(new ID(s));this.relationships=new Rc}get Relationships(){return this.relationships}}class RD extends rt{constructor(){super("w:pageBreakBefore")}}const vy={AUTO:"auto"};class OD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule",beforeAutoSpacing:"w:beforeAutospacing",afterAutoSpacing:"w:afterAutospacing"})}}class HD extends rt{constructor(t){super("w:spacing"),this.root.push(new OD(t))}}const hc={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"};let Em=class extends rt{constructor(t){super("w:pStyle"),this.root.push(new Qs({val:t}))}};class MD extends rt{constructor(t){super("w:tabs");for(const s of t)this.root.push(new KD(s))}}const RB={LEFT:"left",RIGHT:"right"};class PD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class KD extends rt{constructor({type:t,position:s,leader:n}){super("w:tab"),this.root.push(new PD({val:t,pos:s,leader:n}))}}class Sb extends rt{constructor(t,s){super("w:numPr"),this.root.push(new zD(s)),this.root.push(new qD(t))}}class zD extends rt{constructor(t){if(super("w:ilvl"),t>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 Qs({val:t}))}}class qD extends rt{constructor(t){super("w:numId"),this.root.push(new Qs({val:typeof t=="string"?`{${t}}`:t}))}}class q3 extends rt{constructor(){super(...arguments),et(this,"fileChild",Symbol())}}class GD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class VD extends rt{constructor(t,s,n){super("w:hyperlink"),et(this,"linkId"),this.linkId=s;const o={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},l=new GD(o);this.root.push(l),t.forEach(d=>{this.root.push(d)})}}class WD extends rt{constructor(t){super("w:externalHyperlink"),this.options=t}}class XD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class YD extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{id:"w:id"})}}class JD{constructor(t){et(this,"bookmarkUniqueNumericId",SD()),et(this,"start"),et(this,"children"),et(this,"end");const s=this.bookmarkUniqueNumericId();this.start=new ZD(t.id,s),this.children=t.children,this.end=new $D(s)}}class ZD extends rt{constructor(t,s){super("w:bookmarkStart");const n=new XD({name:t,id:s});this.root.push(n)}}class $D extends rt{constructor(t){super("w:bookmarkEnd");const s=new YD({id:t});this.root.push(s)}}class e7 extends rt{constructor(t){super("w:outlineLvl"),this.level=t,this.root.push(new Qs({val:t}))}}const t7={TOP:"top",CENTER:"center",BOTTOM:"bottom"};ou(gr({},t7),{BOTH:"both"});class r7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{verticalAlign:"w:val"})}}class G3 extends rt{constructor(t){super("w:vAlign"),this.root.push(new r7({verticalAlign:t}))}}class s7 extends rt{constructor({space:t,count:s,separate:n,equalWidth:o,children:l}){super("w:cols"),this.root.push(new kA({space:{key:"w:space",value:t===void 0?void 0:Ua(t)},count:{key:"w:num",value:s===void 0?void 0:za(s)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:o}})),!o&&l&&l.forEach(d=>this.addChildElement(d))}}const a7=({type:r,linePitch:t,charSpace:s})=>new Ho({name:"w:docGrid",attributes:{type:{key:"w:type",value:r},linePitch:{key:"w:linePitch",value:za(t)},charSpace:{key:"w:charSpace",value:s?za(s):void 0}}}),ru={DEFAULT:"default",FIRST:"first",EVEN:"even"};class n7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const OB={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class _b extends rt{constructor(t,s){super(t),this.root.push(new n7({type:s.type||ru.DEFAULT,id:`rId${s.id}`}))}}const i7=({countBy:r,start:t,restart:s,distance:n})=>new Ho({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:za(r)},start:{key:"w:start",value:t===void 0?void 0:za(t)},restart:{key:"w:restart",value:s},distance:{key:"w:distance",value:n===void 0?void 0:Ua(n)}}});class HB extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class o7 extends Ll{constructor(t){if(super("w:pgBorders"),!t)return this;t.pageBorders?this.root.push(new HB({display:t.pageBorders.display,offsetFrom:t.pageBorders.offsetFrom,zOrder:t.pageBorders.zOrder})):this.root.push(new HB({})),t.pageBorderTop&&this.root.push(new zr("w:top",t.pageBorderTop)),t.pageBorderLeft&&this.root.push(new zr("w:left",t.pageBorderLeft)),t.pageBorderBottom&&this.root.push(new zr("w:bottom",t.pageBorderBottom)),t.pageBorderRight&&this.root.push(new zr("w:right",t.pageBorderRight))}}class l7 extends rt{constructor(t,s,n,o,l,d,c){super("w:pgMar"),this.root.push(new kA({top:{key:"w:top",value:Fl(t)},right:{key:"w:right",value:Ua(s)},bottom:{key:"w:bottom",value:Fl(n)},left:{key:"w:left",value:Ua(o)},header:{key:"w:header",value:Ua(l)},footer:{key:"w:footer",value:Ua(d)},gutter:{key:"w:gutter",value:Ua(c)}}))}}class A7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class c7 extends rt{constructor({start:t,formatType:s,separator:n}){super("w:pgNumType"),this.root.push(new A7({start:t===void 0?void 0:za(t),formatType:s,separator:n}))}}const Ny={PORTRAIT:"portrait",LANDSCAPE:"landscape"},d7=({width:r,height:t,orientation:s,code:n})=>{const o=Ua(r),l=Ua(t);return new Ho({name:"w:pgSz",attributes:{width:{key:"w:w",value:s===Ny.LANDSCAPE?l:o},height:{key:"w:h",value:s===Ny.LANDSCAPE?o:l},orientation:{key:"w:orient",value:s},code:{key:"w:code",value:n}}})};class u7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class h7 extends rt{constructor(t){super("w:textDirection"),this.root.push(new u7({val:t}))}}class f7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class m7 extends rt{constructor(t){super("w:type"),this.root.push(new f7({val:t}))}}const fc={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},kb={WIDTH:11906,HEIGHT:16838,ORIENTATION:Ny.PORTRAIT};class p7 extends rt{constructor({page:{size:{width:t=kb.WIDTH,height:s=kb.HEIGHT,orientation:n=kb.ORIENTATION}={},margin:{top:o=fc.TOP,right:l=fc.RIGHT,bottom:d=fc.BOTTOM,left:c=fc.LEFT,header:u=fc.HEADER,footer:h=fc.FOOTER,gutter:m=fc.GUTTER}={},pageNumbers:x={},borders:y,textDirection:p}={},grid:{linePitch:v=360,charSpace:N,type:B}={},headerWrapperGroup:g={},footerWrapperGroup:j={},lineNumbers:_,titlePage:w,verticalAlign:L,column:K,type:M}={}){super("w:sectPr"),this.addHeaderFooterGroup(OB.HEADER,g),this.addHeaderFooterGroup(OB.FOOTER,j),M&&this.root.push(new m7(M)),this.root.push(d7({width:t,height:s,orientation:n})),this.root.push(new l7(o,l,d,c,u,h,m)),y&&this.root.push(new o7(y)),_&&this.root.push(i7(_)),this.root.push(new c7(x)),K&&this.root.push(new s7(K)),L&&this.root.push(new G3(L)),w!==void 0&&this.root.push(new nt("w:titlePg",w)),p&&this.root.push(new h7(p)),this.root.push(a7({linePitch:v,charSpace:N,type:B}))}addHeaderFooterGroup(t,s){s.default&&this.root.push(new _b(t,{type:ru.DEFAULT,id:s.default.View.ReferenceId})),s.first&&this.root.push(new _b(t,{type:ru.FIRST,id:s.first.View.ReferenceId})),s.even&&this.root.push(new _b(t,{type:ru.EVEN,id:s.even.View.ReferenceId}))}}class x7 extends rt{constructor(){super("w:body"),et(this,"sections",[])}addSection(t){const s=this.sections.pop();this.root.push(this.createSectionParagraph(s)),this.sections.push(new p7(t))}prepForXml(t){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(t)}push(t){this.root.push(t)}createSectionParagraph(t){const s=new qt({}),n=new uu({});return n.push(t),s.addChildElement(n),s}}const MB={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",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",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"};class Lp extends Ht{constructor(t,s){super(gr({Ignorable:s},Object.fromEntries(t.map(n=>[n,MB[n]])))),et(this,"xmlKeys",gr({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(MB).map(n=>[n,`xmlns:${n}`]))))}}class g7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class b7 extends rt{constructor(t){super("w:background"),this.root.push(new g7({color:t.color===void 0?void 0:Au(t.color),themeColor:t.themeColor,themeShade:t.themeShade===void 0?void 0:vB(t.themeShade),themeTint:t.themeTint===void 0?void 0:vB(t.themeTint)}))}}class y7 extends rt{constructor(t){super("w:document"),et(this,"body"),this.root.push(new Lp(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new x7,t.background&&this.root.push(new b7(t.background)),this.root.push(this.body)}add(t){return this.body.push(t),this}get Body(){return this.body}}class V3{constructor(t){et(this,"document"),et(this,"relationships"),this.document=new y7(t),this.relationships=new Rc}get View(){return this.document}get Relationships(){return this.relationships}}class w7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class v7 extends rt{constructor(){super("w:wordWrap"),this.root.push(new w7({val:0}))}}const N7=r=>{var t,s;return new Ho({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:(t=r.space)==null?void 0:t.horizontal},spaceVertical:{key:"w:vSpace",value:(s=r.space)==null?void 0:s.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 uu extends Ll{constructor(t){var s,n;if(super("w:pPr"),et(this,"numberingReferences",[]),!t)return this;t.heading&&this.push(new Em(t.heading)),t.bullet&&this.push(new Em("ListParagraph")),t.numbering&&!t.style&&!t.heading&&(t.numbering.custom||this.push(new Em("ListParagraph"))),t.style&&this.push(new Em(t.style)),t.keepNext!==void 0&&this.push(new nt("w:keepNext",t.keepNext)),t.keepLines!==void 0&&this.push(new nt("w:keepLines",t.keepLines)),t.pageBreakBefore&&this.push(new RD),t.frame&&this.push(N7(t.frame)),t.widowControl!==void 0&&this.push(new nt("w:widowControl",t.widowControl)),t.bullet&&this.push(new Sb(1,t.bullet.level)),t.numbering?(this.numberingReferences.push({reference:t.numbering.reference,instance:(s=t.numbering.instance)!=null?s:0}),this.push(new Sb(`${t.numbering.reference}-${(n=t.numbering.instance)!=null?n:0}`,t.numbering.level))):t.numbering===!1&&this.push(new Sb(0,0)),t.border&&this.push(new VI(t.border)),t.thematicBreak&&this.push(new WI),t.shading&&this.push(new Up(t.shading)),t.wordWrap&&this.push(new v7),t.overflowPunctuation&&this.push(new nt("w:overflowPunct",t.overflowPunctuation));const o=[...t.rightTabStop!==void 0?[{type:RB.RIGHT,position:t.rightTabStop}]:[],...t.tabStops?t.tabStops:[],...t.leftTabStop!==void 0?[{type:RB.LEFT,position:t.leftTabStop}]:[]];o.length>0&&this.push(new MD(o)),t.bidirectional!==void 0&&this.push(new nt("w:bidi",t.bidirectional)),t.spacing&&this.push(new HD(t.spacing)),t.indent&&this.push(new XI(t.indent)),t.contextualSpacing!==void 0&&this.push(new nt("w:contextualSpacing",t.contextualSpacing)),t.alignment&&this.push(new O3(t.alignment)),t.outlineLevel!==void 0&&this.push(new e7(t.outlineLevel)),t.suppressLineNumbers!==void 0&&this.push(new nt("w:suppressLineNumbers",t.suppressLineNumbers)),t.autoSpaceEastAsianText!==void 0&&this.push(new nt("w:autoSpaceDN",t.autoSpaceEastAsianText)),t.run&&this.push(new Dc(t.run))}push(t){this.root.push(t)}prepForXml(t){if(t.viewWrapper instanceof V3)for(const s of this.numberingReferences)t.file.Numbering.createConcreteNumberingInstance(s.reference,s.instance);return super.prepForXml(t)}}class qt extends q3{constructor(t){if(super("w:p"),et(this,"properties"),typeof t=="string")return this.properties=new uu({}),this.root.push(this.properties),this.root.push(new Xt(t)),this;if(this.properties=new uu(t),this.root.push(this.properties),t.text&&this.root.push(new Xt(t.text)),t.children)for(const s of t.children){if(s instanceof JD){this.root.push(s.start);for(const n of s.children)this.root.push(n);this.root.push(s.end);continue}this.root.push(s)}}prepForXml(t){for(const s of this.root)if(s instanceof WD){const n=this.root.indexOf(s),o=new VD(s.options.children,_D());t.viewWrapper.Relationships.createRelationship(o.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",s.options.link,UD.EXTERNAL),this.root[n]=o}return super.prepForXml(t)}addRunToFront(t){return this.root.splice(1,0,t),this}}class B7 extends rt{constructor(t){super("w:tblGrid");for(const s of t)this.root.push(new j7(s))}}class j7 extends rt{constructor(t){super("w:gridCol"),t!==void 0&&this.root.push(new kA({width:{key:"w:w",value:Ua(t)}}))}}const W3={TABLE:"w:tblCellMar",TABLE_CELL:"w:tcMar"};class X3 extends Ll{constructor(t,{marginUnitType:s=Mh.DXA,top:n,left:o,bottom:l,right:d}){super(t),n!==void 0&&this.root.push(new yc("w:top",{type:s,size:n})),o!==void 0&&this.root.push(new yc("w:left",{type:s,size:o})),l!==void 0&&this.root.push(new yc("w:bottom",{type:s,size:l})),d!==void 0&&this.root.push(new yc("w:right",{type:s,size:d}))}}const Mh={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"};class yc extends rt{constructor(t,{type:s=Mh.AUTO,size:n}){super(t);let o=n;s===Mh.PERCENTAGE&&typeof n=="number"&&(o=`${n}%`),this.root.push(new kA({type:{key:"w:type",value:s},size:{key:"w:w",value:R3(o)}}))}}class C7 extends Ll{constructor(t){super("w:tcBorders"),t.top&&this.root.push(new zr("w:top",t.top)),t.start&&this.root.push(new zr("w:start",t.start)),t.left&&this.root.push(new zr("w:left",t.left)),t.bottom&&this.root.push(new zr("w:bottom",t.bottom)),t.end&&this.root.push(new zr("w:end",t.end)),t.right&&this.root.push(new zr("w:right",t.right))}}class S7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class _7 extends rt{constructor(t){super("w:gridSpan"),this.root.push(new S7({val:za(t)}))}}const Y3={CONTINUE:"continue",RESTART:"restart"};class k7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class PB extends rt{constructor(t){super("w:vMerge"),this.root.push(new k7({val:t}))}}class F7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class E7 extends rt{constructor(t){super("w:textDirection"),this.root.push(new F7({val:t}))}}class U7 extends Ll{constructor(t){super("w:tcPr"),t.width&&this.root.push(new yc("w:tcW",t.width)),t.columnSpan&&this.root.push(new _7(t.columnSpan)),t.verticalMerge?this.root.push(new PB(t.verticalMerge)):t.rowSpan&&t.rowSpan>1&&this.root.push(new PB(Y3.RESTART)),t.borders&&this.root.push(new C7(t.borders)),t.shading&&this.root.push(new Up(t.shading)),t.margins&&this.root.push(new X3(W3.TABLE_CELL,t.margins)),t.textDirection&&this.root.push(new E7(t.textDirection)),t.verticalAlign&&this.root.push(new G3(t.verticalAlign))}}class To extends rt{constructor(t){super("w:tc"),this.options=t,this.root.push(new U7(t));for(const s of t.children)this.root.push(s)}prepForXml(t){return this.root[this.root.length-1]instanceof qt||this.root.push(new qt({})),super.prepForXml(t)}}const Rd={style:Zy.NONE,size:0,color:"auto"},Od={style:Zy.SINGLE,size:4,color:"auto"};class J3 extends rt{constructor(t){super("w:tblBorders"),t.top?this.root.push(new zr("w:top",t.top)):this.root.push(new zr("w:top",Od)),t.left?this.root.push(new zr("w:left",t.left)):this.root.push(new zr("w:left",Od)),t.bottom?this.root.push(new zr("w:bottom",t.bottom)):this.root.push(new zr("w:bottom",Od)),t.right?this.root.push(new zr("w:right",t.right)):this.root.push(new zr("w:right",Od)),t.insideHorizontal?this.root.push(new zr("w:insideH",t.insideHorizontal)):this.root.push(new zr("w:insideH",Od)),t.insideVertical?this.root.push(new zr("w:insideV",t.insideVertical)):this.root.push(new zr("w:insideV",Od))}}et(J3,"NONE",{top:Rd,bottom:Rd,left:Rd,right:Rd,insideHorizontal:Rd,insideVertical:Rd});class Q7 extends rt{constructor({horizontalAnchor:t,verticalAnchor:s,absoluteHorizontalPosition:n,relativeHorizontalPosition:o,absoluteVerticalPosition:l,relativeVerticalPosition:d,bottomFromText:c,topFromText:u,leftFromText:h,rightFromText:m,overlap:x}){super("w:tblpPr"),this.root.push(new kA({leftFromText:{key:"w:leftFromText",value:h===void 0?void 0:Ua(h)},rightFromText:{key:"w:rightFromText",value:m===void 0?void 0:Ua(m)},topFromText:{key:"w:topFromText",value:u===void 0?void 0:Ua(u)},bottomFromText:{key:"w:bottomFromText",value:c===void 0?void 0:Ua(c)},absoluteHorizontalPosition:{key:"w:tblpX",value:n===void 0?void 0:Fl(n)},absoluteVerticalPosition:{key:"w:tblpY",value:l===void 0?void 0:Fl(l)},horizontalAnchor:{key:"w:horzAnchor",value:t===void 0?void 0:t},relativeHorizontalPosition:{key:"w:tblpXSpec",value:o},relativeVerticalPosition:{key:"w:tblpYSpec",value:d},verticalAnchor:{key:"w:vertAnchor",value:s}})),x&&this.root.push(new zI("w:tblOverlap",x))}}class L7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"w:type"})}}class T7 extends rt{constructor(t){super("w:tblLayout"),this.root.push(new L7({type:t}))}}const I7={DXA:"dxa"};class Z3 extends rt{constructor({type:t=I7.DXA,value:s}){super("w:tblCellSpacing"),this.root.push(new kA({type:{key:"w:type",value:t},value:{key:"w:w",value:R3(s)}}))}}class D7 extends Ll{constructor(t){super("w:tblPr"),t.style&&this.root.push(new Fc("w:tblStyle",t.style)),t.float&&this.root.push(new Q7(t.float)),t.visuallyRightToLeft!==void 0&&this.root.push(new nt("w:bidiVisual",t.visuallyRightToLeft)),t.width&&this.root.push(new yc("w:tblW",t.width)),t.alignment&&this.root.push(new O3(t.alignment)),t.indent&&this.root.push(new yc("w:tblInd",t.indent)),t.borders&&this.root.push(new J3(t.borders)),t.shading&&this.root.push(new Up(t.shading)),t.layout&&this.root.push(new T7(t.layout)),t.cellMargin&&this.root.push(new X3(W3.TABLE,t.cellMargin)),t.cellSpacing&&this.root.push(new Z3(t.cellSpacing))}}class KB extends q3{constructor({rows:t,width:s,columnWidths:n=Array(Math.max(...t.map(p=>p.CellCount))).fill(100),margins:o,indent:l,float:d,layout:c,style:u,borders:h,alignment:m,visuallyRightToLeft:x,cellSpacing:y}){super("w:tbl"),this.root.push(new D7({borders:h??{},width:s??{size:100},indent:l,float:d,layout:c,style:u,alignment:m,cellMargin:o,visuallyRightToLeft:x,cellSpacing:y})),this.root.push(new B7(n));for(const p of t)this.root.push(p);t.forEach((p,v)=>{if(v===t.length-1)return;let N=0;p.cells.forEach(B=>{if(B.options.rowSpan&&B.options.rowSpan>1){const g=new To({rowSpan:B.options.rowSpan-1,columnSpan:B.options.columnSpan,borders:B.options.borders,children:[],verticalMerge:Y3.CONTINUE});t[v+1].addCellToColumnIndex(g,N)}N+=B.options.columnSpan||1})})}}class R7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{value:"w:val",rule:"w:hRule"})}}class O7 extends rt{constructor(t,s){super("w:trHeight"),this.root.push(new R7({value:Ua(t),rule:s}))}}class H7 extends Ll{constructor(t){super("w:trPr"),t.cantSplit!==void 0&&this.root.push(new nt("w:cantSplit",t.cantSplit)),t.tableHeader!==void 0&&this.root.push(new nt("w:tblHeader",t.tableHeader)),t.height&&this.root.push(new O7(t.height.value,t.height.rule)),t.cellSpacing&&this.root.push(new Z3(t.cellSpacing))}}class Um extends rt{constructor(t){super("w:tr"),this.options=t,this.root.push(new H7(t));for(const s of t.children)this.root.push(s)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(t=>t instanceof To)}addCellToIndex(t,s){this.root.splice(s+1,0,t)}addCellToColumnIndex(t,s){const n=this.columnIndexToRootIndex(s,!0);this.addCellToIndex(t,n-1)}rootIndexToColumnIndex(t){if(t<1||t>=this.root.length)throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let s=0;for(let n=1;n<t;n++){const o=this.root[n];s+=o.options.columnSpan||1}return s}columnIndexToRootIndex(t,s=!1){if(t<0)throw new Error("cell 'columnIndex' should not less than zero");let n=0,o=1;for(;n<=t;){if(o>=this.root.length){if(s)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${n-1}`)}const l=this.root[o];o+=1,n+=l&&l.options.columnSpan||1}return o-1}}class M7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class P7 extends rt{constructor(){super("Properties"),this.root.push(new M7({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class K7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{xmlns:"xmlns"})}}class z7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Nl extends rt{constructor(t,s){super("Default"),this.root.push(new z7({contentType:t,extension:s}))}}class q7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class fi extends rt{constructor(t,s){super("Override"),this.root.push(new q7({contentType:t,partName:s}))}}class G7 extends rt{constructor(){super("Types"),this.root.push(new K7({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Nl("image/png","png")),this.root.push(new Nl("image/jpeg","jpeg")),this.root.push(new Nl("image/jpeg","jpg")),this.root.push(new Nl("image/bmp","bmp")),this.root.push(new Nl("image/gif","gif")),this.root.push(new Nl("image/svg+xml","svg")),this.root.push(new Nl("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Nl("application/xml","xml")),this.root.push(new Nl("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new fi("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(t){this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${t}.xml`))}addHeader(t){this.root.push(new fi("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${t}.xml`))}}class V7 extends rt{constructor(t){super("cp:coreProperties"),this.root.push(new Lp(["cp","dc","dcterms","dcmitype","xsi"])),t.title&&this.root.push(new dc("dc:title",t.title)),t.subject&&this.root.push(new dc("dc:subject",t.subject)),t.creator&&this.root.push(new dc("dc:creator",t.creator)),t.keywords&&this.root.push(new dc("cp:keywords",t.keywords)),t.description&&this.root.push(new dc("dc:description",t.description)),t.lastModifiedBy&&this.root.push(new dc("cp:lastModifiedBy",t.lastModifiedBy)),t.revision&&this.root.push(new dc("cp:revision",String(t.revision))),this.root.push(new zB("dcterms:created")),this.root.push(new zB("dcterms:modified"))}}class W7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"xsi:type"})}}class zB extends rt{constructor(t){super(t),this.root.push(new W7({type:"dcterms:W3CDTF"})),this.root.push(KI(new Date))}}class X7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Y7 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class J7 extends rt{constructor(t,s){super("property"),this.root.push(new Y7({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t.toString(),name:s.name})),this.root.push(new Z7(s.value))}}class Z7 extends rt{constructor(t){super("vt:lpwstr"),this.root.push(t)}}class $7 extends rt{constructor(t){super("Properties"),et(this,"nextId"),et(this,"properties",[]),this.root.push(new X7({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const s of t)this.addCustomProperty(s)}prepForXml(t){return this.properties.forEach(s=>this.root.push(s)),super.prepForXml(t)}addCustomProperty(t){this.properties.push(new J7(this.nextId++,t))}}const Qm=({id:r,fontKey:t,subsetted:s},n)=>new Ho({name:n,attributes:gr({id:{key:"r:id",value:r}},t?{fontKey:{key:"w:fontKey",value:`{${t}}`}}:{}),children:[...s?[new nt("w:subsetted",s)]:[]]}),eR=({name:r,altName:t,panose1:s,charset:n,family:o,notTrueType:l,pitch:d,sig:c,embedRegular:u,embedBold:h,embedItalic:m,embedBoldItalic:x})=>new Ho({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...t?[ch("w:altName",t)]:[],...s?[ch("w:panose1",s)]:[],...n?[ch("w:charset",n)]:[],ch("w:family",o),...l?[new nt("w:notTrueType",l)]:[],ch("w:pitch",d),...c?[new Ho({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:c.usb0},usb1:{key:"w:usb1",value:c.usb1},usb2:{key:"w:usb2",value:c.usb2},usb3:{key:"w:usb3",value:c.usb3},csb0:{key:"w:csb0",value:c.csb0},csb1:{key:"w:csb1",value:c.csb1}}})]:[],...u?[Qm(u,"w:embedRegular")]:[],...h?[Qm(h,"w:embedBold")]:[],...m?[Qm(m,"w:embedItalic")]:[],...x?[Qm(x,"w:embedBoldItalic")]:[]]}),tR=({name:r,index:t,fontKey:s,characterSet:n})=>eR({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:s,id:`rId${t}`}}),rR=r=>new Ho({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((t,s)=>tR({name:t.name,index:s+1,fontKey:t.fontKey}))});class sR{constructor(t){et(this,"fontTable"),et(this,"relationships"),et(this,"fontOptionsWithKey",[]),this.options=t,this.fontOptionsWithKey=t.map(s=>ou(gr({},s),{fontKey:kD()})),this.fontTable=rR(this.fontOptionsWithKey),this.relationships=new Rc;for(let s=0;s<t.length;s++)this.relationships.createRelationship(s+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${t[s].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}class aR extends Ht{constructor(){super(...arguments),et(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 nR=class extends T3{constructor(t,s){super("w:ftr",s),et(this,"refId"),this.refId=t,s||this.root.push(new aR({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(t){this.root.push(t)}};class iR{constructor(t,s,n){et(this,"footer"),et(this,"relationships"),this.media=t,this.footer=new nR(s,n),this.relationships=new Rc}add(t){this.footer.add(t)}addChildElement(t){this.footer.addChildElement(t)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class oR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class lR extends rt{constructor(){super("w:footnoteRef")}}class AR extends Qp{constructor(){super({style:"FootnoteReference"}),this.root.push(new lR)}}const qB={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class Fb extends rt{constructor(t){super("w:footnote"),this.root.push(new oR({type:t.type,id:t.id}));for(let s=0;s<t.children.length;s++){const n=t.children[s];s===0&&n.addRunToFront(new AR),this.root.push(n)}}}class cR extends rt{constructor(){super("w:continuationSeparator")}}class dR extends Qp{constructor(){super({}),this.root.push(new cR)}}class uR extends rt{constructor(){super("w:separator")}}class hR extends Qp{constructor(){super({}),this.root.push(new uR)}}class fR extends Ht{constructor(){super(...arguments),et(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 mR extends rt{constructor(){super("w:footnotes"),this.root.push(new fR({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 Fb({id:-1,type:qB.SEPERATOR,children:[new qt({spacing:{after:0,line:240,lineRule:vy.AUTO},children:[new hR]})]});this.root.push(t);const s=new Fb({id:0,type:qB.CONTINUATION_SEPERATOR,children:[new qt({spacing:{after:0,line:240,lineRule:vy.AUTO},children:[new dR]})]});this.root.push(s)}createFootNote(t,s){const n=new Fb({id:t,children:s});this.root.push(n)}}class pR{constructor(){et(this,"footnotess"),et(this,"relationships"),this.footnotess=new mR,this.relationships=new Rc}get View(){return this.footnotess}get Relationships(){return this.relationships}}class xR extends Ht{constructor(){super(...arguments),et(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",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",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let gR=class extends T3{constructor(t,s){super("w:hdr",s),et(this,"refId"),this.refId=t,s||this.root.push(new xR({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",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(t){this.root.push(t)}};class bR{constructor(t,s,n){et(this,"header"),et(this,"relationships"),this.media=t,this.header=new gR(s,n),this.relationships=new Rc}add(t){return this.header.add(t),this}addChildElement(t){this.header.addChildElement(t)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class yR{constructor(){et(this,"map"),this.map=new Map}addImage(t,s){this.map.set(t,s)}get Array(){return Array.from(this.map.values())}}const Bl={BULLET:"bullet"};class wR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class vR extends rt{constructor(t){super("w:numFmt"),this.root.push(new Qs({val:t}))}}class NR extends rt{constructor(t){super("w:lvlText"),this.root.push(new Qs({val:t}))}}class BR extends rt{constructor(t){super("w:lvlJc"),this.root.push(new Qs({val:t}))}}class jR extends rt{constructor(t){super("w:suff"),this.root.push(new Qs({val:t}))}}class CR extends rt{constructor(){super("w:isLgl")}}class SR extends rt{constructor({level:t,format:s,text:n,alignment:o=xi.START,start:l=1,style:d,suffix:c,isLegalNumberingStyle:u}){if(super("w:lvl"),et(this,"paragraphProperties"),et(this,"runProperties"),this.root.push(new Fh("w:start",za(l))),s&&this.root.push(new vR(s)),c&&this.root.push(new jR(c)),u&&this.root.push(new CR),n&&this.root.push(new NR(n)),this.root.push(new BR(o)),this.paragraphProperties=new uu(d&&d.paragraph),this.runProperties=new Dc(d&&d.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),t>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 wR({ilvl:za(t),tentative:1}))}}class _R extends SR{}class kR extends rt{constructor(t){super("w:multiLevelType"),this.root.push(new Qs({val:t}))}}class FR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class GB extends rt{constructor(t,s){super("w:abstractNum"),et(this,"id"),this.root.push(new FR({abstractNumId:za(t),restartNumberingAfterBreak:0})),this.root.push(new kR("hybridMultilevel")),this.id=t;for(const n of s)this.root.push(new _R(n))}}class ER extends rt{constructor(t){super("w:abstractNumId"),this.root.push(new Qs({val:t}))}}class UR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{numId:"w:numId"})}}class VB extends rt{constructor(t){if(super("w:num"),et(this,"numId"),et(this,"reference"),et(this,"instance"),this.numId=t.numId,this.reference=t.reference,this.instance=t.instance,this.root.push(new UR({numId:za(t.numId)})),this.root.push(new ER(za(t.abstractNumId))),t.overrideLevels&&t.overrideLevels.length)for(const s of t.overrideLevels)this.root.push(new LR(s.num,s.start))}}class QR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{ilvl:"w:ilvl"})}}class LR extends rt{constructor(t,s){super("w:lvlOverride"),this.root.push(new QR({ilvl:t})),s!==void 0&&this.root.push(new IR(s))}}class TR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class IR extends rt{constructor(t){super("w:startOverride"),this.root.push(new TR({val:t}))}}class DR extends rt{constructor(t){super("w:numbering"),et(this,"abstractNumberingMap",new Map),et(this,"concreteNumberingMap",new Map),et(this,"referenceConfigMap",new Map),et(this,"abstractNumUniqueNumericId",jD()),et(this,"concreteNumUniqueNumericId",CD()),this.root.push(new Lp(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));const s=new GB(this.abstractNumUniqueNumericId(),[{level:0,format:Bl.BULLET,text:"●",alignment:xi.LEFT,style:{paragraph:{indent:{left:to(.5),hanging:to(.25)}}}},{level:1,format:Bl.BULLET,text:"○",alignment:xi.LEFT,style:{paragraph:{indent:{left:to(1),hanging:to(.25)}}}},{level:2,format:Bl.BULLET,text:"■",alignment:xi.LEFT,style:{paragraph:{indent:{left:2160,hanging:to(.25)}}}},{level:3,format:Bl.BULLET,text:"●",alignment:xi.LEFT,style:{paragraph:{indent:{left:2880,hanging:to(.25)}}}},{level:4,format:Bl.BULLET,text:"○",alignment:xi.LEFT,style:{paragraph:{indent:{left:3600,hanging:to(.25)}}}},{level:5,format:Bl.BULLET,text:"■",alignment:xi.LEFT,style:{paragraph:{indent:{left:4320,hanging:to(.25)}}}},{level:6,format:Bl.BULLET,text:"●",alignment:xi.LEFT,style:{paragraph:{indent:{left:5040,hanging:to(.25)}}}},{level:7,format:Bl.BULLET,text:"●",alignment:xi.LEFT,style:{paragraph:{indent:{left:5760,hanging:to(.25)}}}},{level:8,format:Bl.BULLET,text:"●",alignment:xi.LEFT,style:{paragraph:{indent:{left:6480,hanging:to(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new VB({numId:1,abstractNumId:s.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",s);for(const n of t.config)this.abstractNumberingMap.set(n.reference,new GB(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(t){for(const s of this.abstractNumberingMap.values())this.root.push(s);for(const s of this.concreteNumberingMap.values())this.root.push(s);return super.prepForXml(t)}createConcreteNumberingInstance(t,s){const n=this.abstractNumberingMap.get(t);if(!n)return;const o=`${t}-${s}`;if(this.concreteNumberingMap.has(o))return;const l=this.referenceConfigMap.get(t),d=l&&l[0].start,c={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:t,instance:s,overrideLevels:[d&&Number.isInteger(d)?{num:0,start:d}:{num:0,start:1}]};this.concreteNumberingMap.set(o,new VB(c))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class RR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class OR extends rt{constructor(t){super("w:compatSetting"),this.root.push(new RR({version:t,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class HR extends rt{constructor(t){super("w:compat"),t.version&&this.root.push(new OR(t.version)),t.useSingleBorderforContiguousCells&&this.root.push(new nt("w:useSingleBorderforContiguousCells",t.useSingleBorderforContiguousCells)),t.wordPerfectJustification&&this.root.push(new nt("w:wpJustification",t.wordPerfectJustification)),t.noTabStopForHangingIndent&&this.root.push(new nt("w:noTabHangInd",t.noTabStopForHangingIndent)),t.noLeading&&this.root.push(new nt("w:noLeading",t.noLeading)),t.spaceForUnderline&&this.root.push(new nt("w:spaceForUL",t.spaceForUnderline)),t.noColumnBalance&&this.root.push(new nt("w:noColumnBalance",t.noColumnBalance)),t.balanceSingleByteDoubleByteWidth&&this.root.push(new nt("w:balanceSingleByteDoubleByteWidth",t.balanceSingleByteDoubleByteWidth)),t.noExtraLineSpacing&&this.root.push(new nt("w:noExtraLineSpacing",t.noExtraLineSpacing)),t.doNotLeaveBackslashAlone&&this.root.push(new nt("w:doNotLeaveBackslashAlone",t.doNotLeaveBackslashAlone)),t.underlineTrailingSpaces&&this.root.push(new nt("w:ulTrailSpace",t.underlineTrailingSpaces)),t.doNotExpandShiftReturn&&this.root.push(new nt("w:doNotExpandShiftReturn",t.doNotExpandShiftReturn)),t.spacingInWholePoints&&this.root.push(new nt("w:spacingInWholePoints",t.spacingInWholePoints)),t.lineWrapLikeWord6&&this.root.push(new nt("w:lineWrapLikeWord6",t.lineWrapLikeWord6)),t.printBodyTextBeforeHeader&&this.root.push(new nt("w:printBodyTextBeforeHeader",t.printBodyTextBeforeHeader)),t.printColorsBlack&&this.root.push(new nt("w:printColBlack",t.printColorsBlack)),t.spaceWidth&&this.root.push(new nt("w:wpSpaceWidth",t.spaceWidth)),t.showBreaksInFrames&&this.root.push(new nt("w:showBreaksInFrames",t.showBreaksInFrames)),t.subFontBySize&&this.root.push(new nt("w:subFontBySize",t.subFontBySize)),t.suppressBottomSpacing&&this.root.push(new nt("w:suppressBottomSpacing",t.suppressBottomSpacing)),t.suppressTopSpacing&&this.root.push(new nt("w:suppressTopSpacing",t.suppressTopSpacing)),t.suppressSpacingAtTopOfPage&&this.root.push(new nt("w:suppressSpacingAtTopOfPage",t.suppressSpacingAtTopOfPage)),t.suppressTopSpacingWP&&this.root.push(new nt("w:suppressTopSpacingWP",t.suppressTopSpacingWP)),t.suppressSpBfAfterPgBrk&&this.root.push(new nt("w:suppressSpBfAfterPgBrk",t.suppressSpBfAfterPgBrk)),t.swapBordersFacingPages&&this.root.push(new nt("w:swapBordersFacingPages",t.swapBordersFacingPages)),t.convertMailMergeEsc&&this.root.push(new nt("w:convMailMergeEsc",t.convertMailMergeEsc)),t.truncateFontHeightsLikeWP6&&this.root.push(new nt("w:truncateFontHeightsLikeWP6",t.truncateFontHeightsLikeWP6)),t.macWordSmallCaps&&this.root.push(new nt("w:mwSmallCaps",t.macWordSmallCaps)),t.usePrinterMetrics&&this.root.push(new nt("w:usePrinterMetrics",t.usePrinterMetrics)),t.doNotSuppressParagraphBorders&&this.root.push(new nt("w:doNotSuppressParagraphBorders",t.doNotSuppressParagraphBorders)),t.wrapTrailSpaces&&this.root.push(new nt("w:wrapTrailSpaces",t.wrapTrailSpaces)),t.footnoteLayoutLikeWW8&&this.root.push(new nt("w:footnoteLayoutLikeWW8",t.footnoteLayoutLikeWW8)),t.shapeLayoutLikeWW8&&this.root.push(new nt("w:shapeLayoutLikeWW8",t.shapeLayoutLikeWW8)),t.alignTablesRowByRow&&this.root.push(new nt("w:alignTablesRowByRow",t.alignTablesRowByRow)),t.forgetLastTabAlignment&&this.root.push(new nt("w:forgetLastTabAlignment",t.forgetLastTabAlignment)),t.adjustLineHeightInTable&&this.root.push(new nt("w:adjustLineHeightInTable",t.adjustLineHeightInTable)),t.autoSpaceLikeWord95&&this.root.push(new nt("w:autoSpaceLikeWord95",t.autoSpaceLikeWord95)),t.noSpaceRaiseLower&&this.root.push(new nt("w:noSpaceRaiseLower",t.noSpaceRaiseLower)),t.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new nt("w:doNotUseHTMLParagraphAutoSpacing",t.doNotUseHTMLParagraphAutoSpacing)),t.layoutRawTableWidth&&this.root.push(new nt("w:layoutRawTableWidth",t.layoutRawTableWidth)),t.layoutTableRowsApart&&this.root.push(new nt("w:layoutTableRowsApart",t.layoutTableRowsApart)),t.useWord97LineBreakRules&&this.root.push(new nt("w:useWord97LineBreakRules",t.useWord97LineBreakRules)),t.doNotBreakWrappedTables&&this.root.push(new nt("w:doNotBreakWrappedTables",t.doNotBreakWrappedTables)),t.doNotSnapToGridInCell&&this.root.push(new nt("w:doNotSnapToGridInCell",t.doNotSnapToGridInCell)),t.selectFieldWithFirstOrLastCharacter&&this.root.push(new nt("w:selectFldWithFirstOrLastChar",t.selectFieldWithFirstOrLastCharacter)),t.applyBreakingRules&&this.root.push(new nt("w:applyBreakingRules",t.applyBreakingRules)),t.doNotWrapTextWithPunctuation&&this.root.push(new nt("w:doNotWrapTextWithPunct",t.doNotWrapTextWithPunctuation)),t.doNotUseEastAsianBreakRules&&this.root.push(new nt("w:doNotUseEastAsianBreakRules",t.doNotUseEastAsianBreakRules)),t.useWord2002TableStyleRules&&this.root.push(new nt("w:useWord2002TableStyleRules",t.useWord2002TableStyleRules)),t.growAutofit&&this.root.push(new nt("w:growAutofit",t.growAutofit)),t.useFELayout&&this.root.push(new nt("w:useFELayout",t.useFELayout)),t.useNormalStyleForList&&this.root.push(new nt("w:useNormalStyleForList",t.useNormalStyleForList)),t.doNotUseIndentAsNumberingTabStop&&this.root.push(new nt("w:doNotUseIndentAsNumberingTabStop",t.doNotUseIndentAsNumberingTabStop)),t.useAlternateEastAsianLineBreakRules&&this.root.push(new nt("w:useAltKinsokuLineBreakRules",t.useAlternateEastAsianLineBreakRules)),t.allowSpaceOfSameStyleInTable&&this.root.push(new nt("w:allowSpaceOfSameStyleInTable",t.allowSpaceOfSameStyleInTable)),t.doNotSuppressIndentation&&this.root.push(new nt("w:doNotSuppressIndentation",t.doNotSuppressIndentation)),t.doNotAutofitConstrainedTables&&this.root.push(new nt("w:doNotAutofitConstrainedTables",t.doNotAutofitConstrainedTables)),t.autofitToFirstFixedWidthCell&&this.root.push(new nt("w:autofitToFirstFixedWidthCell",t.autofitToFirstFixedWidthCell)),t.underlineTabInNumberingList&&this.root.push(new nt("w:underlineTabInNumList",t.underlineTabInNumberingList)),t.displayHangulFixedWidth&&this.root.push(new nt("w:displayHangulFixedWidth",t.displayHangulFixedWidth)),t.splitPgBreakAndParaMark&&this.root.push(new nt("w:splitPgBreakAndParaMark",t.splitPgBreakAndParaMark)),t.doNotVerticallyAlignCellWithSp&&this.root.push(new nt("w:doNotVertAlignCellWithSp",t.doNotVerticallyAlignCellWithSp)),t.doNotBreakConstrainedForcedTable&&this.root.push(new nt("w:doNotBreakConstrainedForcedTable",t.doNotBreakConstrainedForcedTable)),t.ignoreVerticalAlignmentInTextboxes&&this.root.push(new nt("w:doNotVertAlignInTxbx",t.ignoreVerticalAlignmentInTextboxes)),t.useAnsiKerningPairs&&this.root.push(new nt("w:useAnsiKerningPairs",t.useAnsiKerningPairs)),t.cachedColumnBalance&&this.root.push(new nt("w:cachedColBalance",t.cachedColumnBalance))}}class MR extends Ht{constructor(){super(...arguments),et(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 PR extends rt{constructor(t){var s,n,o,l,d,c,u,h;super("w:settings"),this.root.push(new MR({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 nt("w:displayBackgroundShape",!0)),t.trackRevisions!==void 0&&this.root.push(new nt("w:trackRevisions",t.trackRevisions)),t.evenAndOddHeaders!==void 0&&this.root.push(new nt("w:evenAndOddHeaders",t.evenAndOddHeaders)),t.updateFields!==void 0&&this.root.push(new nt("w:updateFields",t.updateFields)),t.defaultTabStop!==void 0&&this.root.push(new Fh("w:defaultTabStop",t.defaultTabStop)),((s=t.hyphenation)==null?void 0:s.autoHyphenation)!==void 0&&this.root.push(new nt("w:autoHyphenation",t.hyphenation.autoHyphenation)),((n=t.hyphenation)==null?void 0:n.hyphenationZone)!==void 0&&this.root.push(new Fh("w:hyphenationZone",t.hyphenation.hyphenationZone)),((o=t.hyphenation)==null?void 0:o.consecutiveHyphenLimit)!==void 0&&this.root.push(new Fh("w:consecutiveHyphenLimit",t.hyphenation.consecutiveHyphenLimit)),((l=t.hyphenation)==null?void 0:l.doNotHyphenateCaps)!==void 0&&this.root.push(new nt("w:doNotHyphenateCaps",t.hyphenation.doNotHyphenateCaps)),this.root.push(new HR(ou(gr({},(d=t.compatibility)!=null?d:{}),{version:(h=(u=(c=t.compatibility)==null?void 0:c.version)!=null?u:t.compatibilityModeVersion)!=null?h:15})))}}class $3 extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{val:"w:val"})}}class KR extends rt{constructor(t){super("w:name"),this.root.push(new $3({val:t}))}}class zR extends rt{constructor(t){super("w:uiPriority"),this.root.push(new $3({val:za(t)}))}}class qR extends Ht{constructor(){super(...arguments),et(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class eC extends rt{constructor(t,s){super("w:style"),this.root.push(new qR(t)),s.name&&this.root.push(new KR(s.name)),s.basedOn&&this.root.push(new Fc("w:basedOn",s.basedOn)),s.next&&this.root.push(new Fc("w:next",s.next)),s.link&&this.root.push(new Fc("w:link",s.link)),s.uiPriority!==void 0&&this.root.push(new zR(s.uiPriority)),s.semiHidden!==void 0&&this.root.push(new nt("w:semiHidden",s.semiHidden)),s.unhideWhenUsed!==void 0&&this.root.push(new nt("w:unhideWhenUsed",s.unhideWhenUsed)),s.quickFormat!==void 0&&this.root.push(new nt("w:qFormat",s.quickFormat))}}class Tp extends eC{constructor(t){super({type:"paragraph",styleId:t.id},t),et(this,"paragraphProperties"),et(this,"runProperties"),this.paragraphProperties=new uu(t.paragraph),this.runProperties=new Dc(t.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class Ip extends eC{constructor(t){super({type:"character",styleId:t.id},gr({uiPriority:99,unhideWhenUsed:!0},t)),et(this,"runProperties"),this.runProperties=new Dc(t.run),this.root.push(this.runProperties)}}class EA extends Tp{constructor(t){super(gr({basedOn:"Normal",next:"Normal",quickFormat:!0},t))}}class GR extends EA{constructor(t){super(gr({id:"Title",name:"Title"},t))}}class VR extends EA{constructor(t){super(gr({id:"Heading1",name:"Heading 1"},t))}}class WR extends EA{constructor(t){super(gr({id:"Heading2",name:"Heading 2"},t))}}class XR extends EA{constructor(t){super(gr({id:"Heading3",name:"Heading 3"},t))}}class YR extends EA{constructor(t){super(gr({id:"Heading4",name:"Heading 4"},t))}}class JR extends EA{constructor(t){super(gr({id:"Heading5",name:"Heading 5"},t))}}class ZR extends EA{constructor(t){super(gr({id:"Heading6",name:"Heading 6"},t))}}class $R extends EA{constructor(t){super(gr({id:"Strong",name:"Strong"},t))}}class eO extends Tp{constructor(t){super(gr({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},t))}}class tO extends Tp{constructor(t){super(gr({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:vy.AUTO}},run:{size:20}},t))}}class rO extends Ip{constructor(t){super(gr({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},t))}}class sO extends Ip{constructor(t){super(gr({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},t))}}class aO extends Ip{constructor(t){super(gr({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:M3.SINGLE}}},t))}}class By extends rt{constructor(t){if(super("w:styles"),t.initialStyles&&this.root.push(t.initialStyles),t.importedStyles)for(const s of t.importedStyles)this.root.push(s);if(t.paragraphStyles)for(const s of t.paragraphStyles)this.root.push(new Tp(s));if(t.characterStyles)for(const s of t.characterStyles)this.root.push(new Ip(s))}}class nO extends rt{constructor(t){super("w:pPrDefault"),this.root.push(new uu(t))}}class iO extends rt{constructor(t){super("w:rPrDefault"),this.root.push(new Dc(t))}}class oO extends rt{constructor(t){super("w:docDefaults"),et(this,"runPropertiesDefaults"),et(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new iO(t.run),this.paragraphPropertiesDefaults=new nO(t.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class lO{newInstance(t){const s=L3.xml2js(t,{compact:!1});let n;for(const d of s.elements||[])d.name==="w:styles"&&(n=d);if(n===void 0)throw new Error("can not find styles element");const o=n.elements||[];return new By({initialStyles:new RI(n.attributes),importedStyles:o.map(d=>Yy(d))})}}class WB{newInstance(t={}){var s;return{initialStyles:new Lp(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new oO((s=t.document)!=null?s:{}),new GR(gr({run:{size:56}},t.title)),new VR(gr({run:{color:"2E74B5",size:32}},t.heading1)),new WR(gr({run:{color:"2E74B5",size:26}},t.heading2)),new XR(gr({run:{color:"1F4D78",size:24}},t.heading3)),new YR(gr({run:{color:"2E74B5",italics:!0}},t.heading4)),new JR(gr({run:{color:"2E74B5"}},t.heading5)),new ZR(gr({run:{color:"1F4D78"}},t.heading6)),new $R(gr({run:{bold:!0}},t.strong)),new eO(t.listParagraph||{}),new aO(t.hyperlink||{}),new rO(t.footnoteReference||{}),new tO(t.footnoteText||{}),new sO(t.footnoteTextChar||{})]}}}class AO{constructor(t){et(this,"currentRelationshipId",1),et(this,"documentWrapper"),et(this,"headers",[]),et(this,"footers",[]),et(this,"coreProperties"),et(this,"numbering"),et(this,"media"),et(this,"fileRelationships"),et(this,"footnotesWrapper"),et(this,"settings"),et(this,"contentTypes"),et(this,"customProperties"),et(this,"appProperties"),et(this,"styles"),et(this,"comments"),et(this,"fontWrapper");var s,n,o,l,d,c,u,h,m,x,y,p;if(this.coreProperties=new V7(ou(gr({},t),{creator:(s=t.creator)!=null?s:"Un-named",revision:(n=t.revision)!=null?n:1,lastModifiedBy:(o=t.lastModifiedBy)!=null?o:"Un-named"})),this.numbering=new DR(t.numbering?t.numbering:{config:[]}),this.comments=new DD((l=t.comments)!=null?l:{children:[]}),this.fileRelationships=new Rc,this.customProperties=new $7((d=t.customProperties)!=null?d:[]),this.appProperties=new P7,this.footnotesWrapper=new pR,this.contentTypes=new G7,this.documentWrapper=new V3({background:t.background}),this.settings=new PR({compatibilityModeVersion:t.compatabilityModeVersion,compatibility:t.compatibility,evenAndOddHeaders:!!t.evenAndOddHeaderAndFooters,trackRevisions:(c=t.features)==null?void 0:c.trackRevisions,updateFields:(u=t.features)==null?void 0:u.updateFields,defaultTabStop:t.defaultTabStop,hyphenation:{autoHyphenation:(h=t.hyphenation)==null?void 0:h.autoHyphenation,hyphenationZone:(m=t.hyphenation)==null?void 0:m.hyphenationZone,consecutiveHyphenLimit:(x=t.hyphenation)==null?void 0:x.consecutiveHyphenLimit,doNotHyphenateCaps:(y=t.hyphenation)==null?void 0:y.doNotHyphenateCaps}}),this.media=new yR,t.externalStyles!==void 0){const v=new lO;this.styles=v.newInstance(t.externalStyles)}else if(t.styles){const N=new WB().newInstance(t.styles.default);this.styles=new By(gr(gr({},N),t.styles))}else{const v=new WB;this.styles=new By(v.newInstance())}this.addDefaultRelationships();for(const v of t.sections)this.addSection(v);if(t.footnotes)for(const v in t.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(v),t.footnotes[v].children);this.fontWrapper=new sR((p=t.fonts)!=null?p:[])}addSection({headers:t={},footers:s={},children:n,properties:o}){this.documentWrapper.View.Body.addSection(ou(gr({},o),{headerWrapperGroup:{default:t.default?this.createHeader(t.default):void 0,first:t.first?this.createHeader(t.first):void 0,even:t.even?this.createHeader(t.even):void 0},footerWrapperGroup:{default:s.default?this.createFooter(s.default):void 0,first:s.first?this.createFooter(s.first):void 0,even:s.even?this.createFooter(s.even):void 0}}));for(const l of n)this.documentWrapper.View.add(l)}createHeader(t){const s=new bR(this.media,this.currentRelationshipId++);for(const n of t.options.children)s.add(n);return this.addHeaderToDocument(s),s}createFooter(t){const s=new iR(this.media,this.currentRelationshipId++);for(const n of t.options.children)s.add(n);return this.addFooterToDocument(s),s}addHeaderToDocument(t,s=ru.DEFAULT){this.headers.push({header:t,type:s}),this.documentWrapper.Relationships.createRelationship(t.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(t,s=ru.DEFAULT){this.footers.push({footer:t,type:s}),this.documentWrapper.Relationships.createRelationship(t.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.createRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.createRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.createRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.createRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(t=>t.header)}get Footers(){return this.footers.map(t=>t.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}}var cO=Vy();function Lm(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 Eb={exports:{}},XB;function dO(){return XB||(XB=1,(function(r,t){(function(s){r.exports=s()})(function(){return(function s(n,o,l){function d(h,m){if(!o[h]){if(!n[h]){var x=typeof Lm=="function"&&Lm;if(!m&&x)return x(h,!0);if(c)return c(h,!0);var y=new Error("Cannot find module '"+h+"'");throw y.code="MODULE_NOT_FOUND",y}var p=o[h]={exports:{}};n[h][0].call(p.exports,function(v){var N=n[h][1][v];return d(N||v)},p,p.exports,s,n,o,l)}return o[h].exports}for(var c=typeof Lm=="function"&&Lm,u=0;u<l.length;u++)d(l[u]);return d})({1:[function(s,n,o){var l=s("./utils"),d=s("./support"),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(u){for(var h,m,x,y,p,v,N,B=[],g=0,j=u.length,_=j,w=l.getTypeOf(u)!=="string";g<u.length;)_=j-g,x=w?(h=u[g++],m=g<j?u[g++]:0,g<j?u[g++]:0):(h=u.charCodeAt(g++),m=g<j?u.charCodeAt(g++):0,g<j?u.charCodeAt(g++):0),y=h>>2,p=(3&h)<<4|m>>4,v=1<_?(15&m)<<2|x>>6:64,N=2<_?63&x:64,B.push(c.charAt(y)+c.charAt(p)+c.charAt(v)+c.charAt(N));return B.join("")},o.decode=function(u){var h,m,x,y,p,v,N=0,B=0,g="data:";if(u.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var j,_=3*(u=u.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(u.charAt(u.length-1)===c.charAt(64)&&_--,u.charAt(u.length-2)===c.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(j=d.uint8array?new Uint8Array(0|_):new Array(0|_);N<u.length;)h=c.indexOf(u.charAt(N++))<<2|(y=c.indexOf(u.charAt(N++)))>>4,m=(15&y)<<4|(p=c.indexOf(u.charAt(N++)))>>2,x=(3&p)<<6|(v=c.indexOf(u.charAt(N++))),j[B++]=h,p!==64&&(j[B++]=m),v!==64&&(j[B++]=x);return j}},{"./support":30,"./utils":32}],2:[function(s,n,o){var l=s("./external"),d=s("./stream/DataWorker"),c=s("./stream/Crc32Probe"),u=s("./stream/DataLengthProbe");function h(m,x,y,p,v){this.compressedSize=m,this.uncompressedSize=x,this.crc32=y,this.compression=p,this.compressedContent=v}h.prototype={getContentWorker:function(){var m=new d(l.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),x=this;return m.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new d(l.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(m,x,y){return m.pipe(new c).pipe(new u("uncompressedSize")).pipe(x.compressWorker(y)).pipe(new u("compressedSize")).withStreamInfo("compression",x)},n.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,n,o){var l=s("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new l("STORE compression")},uncompressWorker:function(){return new l("STORE decompression")}},o.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,n,o){var l=s("./utils"),d=(function(){for(var c,u=[],h=0;h<256;h++){c=h;for(var m=0;m<8;m++)c=1&c?3988292384^c>>>1:c>>>1;u[h]=c}return u})();n.exports=function(c,u){return c!==void 0&&c.length?l.getTypeOf(c)!=="string"?(function(h,m,x,y){var p=d,v=y+x;h^=-1;for(var N=y;N<v;N++)h=h>>>8^p[255&(h^m[N])];return-1^h})(0|u,c,c.length,0):(function(h,m,x,y){var p=d,v=y+x;h^=-1;for(var N=y;N<v;N++)h=h>>>8^p[255&(h^m.charCodeAt(N))];return-1^h})(0|u,c,c.length,0):0}},{"./utils":32}],5:[function(s,n,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(s,n,o){var l=null;l=typeof Promise<"u"?Promise:s("lie"),n.exports={Promise:l}},{lie:37}],7:[function(s,n,o){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",d=s("pako"),c=s("./utils"),u=s("./stream/GenericWorker"),h=l?"uint8array":"array";function m(x,y){u.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=y,this.meta={}}o.magic="\b\0",c.inherits(m,u),m.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(c.transformTo(h,x.data),!1)},m.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new d[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(y){x.push({data:y,meta:x.meta})}},o.compressWorker=function(x){return new m("Deflate",x)},o.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,n,o){function l(p,v){var N,B="";for(N=0;N<v;N++)B+=String.fromCharCode(255&p),p>>>=8;return B}function d(p,v,N,B,g,j){var _,w,L=p.file,K=p.compression,M=j!==h.utf8encode,V=c.transformTo("string",j(L.name)),T=c.transformTo("string",h.utf8encode(L.name)),ne=L.comment,Z=c.transformTo("string",j(ne)),U=c.transformTo("string",h.utf8encode(ne)),q=T.length!==L.name.length,F=U.length!==ne.length,le="",ae="",se="",fe=L.dir,ye=L.date,_e={crc32:0,compressedSize:0,uncompressedSize:0};v&&!N||(_e.crc32=p.crc32,_e.compressedSize=p.compressedSize,_e.uncompressedSize=p.uncompressedSize);var xe=0;v&&(xe|=8),M||!q&&!F||(xe|=2048);var D=0,$=0;fe&&(D|=16),g==="UNIX"?($=798,D|=(function(te,J){var O=te;return te||(O=J?16893:33204),(65535&O)<<16})(L.unixPermissions,fe)):($=20,D|=(function(te){return 63&(te||0)})(L.dosPermissions)),_=ye.getUTCHours(),_<<=6,_|=ye.getUTCMinutes(),_<<=5,_|=ye.getUTCSeconds()/2,w=ye.getUTCFullYear()-1980,w<<=4,w|=ye.getUTCMonth()+1,w<<=5,w|=ye.getUTCDate(),q&&(ae=l(1,1)+l(m(V),4)+T,le+="up"+l(ae.length,2)+ae),F&&(se=l(1,1)+l(m(Z),4)+U,le+="uc"+l(se.length,2)+se);var X="";return X+=`
\0`,X+=l(xe,2),X+=K.magic,X+=l(_,2),X+=l(w,2),X+=l(_e.crc32,4),X+=l(_e.compressedSize,4),X+=l(_e.uncompressedSize,4),X+=l(V.length,2),X+=l(le.length,2),{fileRecord:x.LOCAL_FILE_HEADER+X+V+le,dirRecord:x.CENTRAL_FILE_HEADER+l($,2)+X+l(Z.length,2)+"\0\0\0\0"+l(D,4)+l(B,4)+V+le+Z}}var c=s("../utils"),u=s("../stream/GenericWorker"),h=s("../utf8"),m=s("../crc32"),x=s("../signature");function y(p,v,N,B){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=N,this.encodeFileName=B,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}c.inherits(y,u),y.prototype.push=function(p){var v=p.meta.percent||0,N=this.entriesCount,B=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,u.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:N?(v+100*(N-B-1))/N:100}}))},y.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var v=this.streamFiles&&!p.file.dir;if(v){var N=d(p,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(p){this.accumulate=!1;var v=this.streamFiles&&!p.file.dir,N=d(p,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),v)this.push({data:(function(B){return x.DATA_DESCRIPTOR+l(B.crc32,4)+l(B.compressedSize,4)+l(B.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.prototype.flush=function(){for(var p=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var N=this.bytesWritten-p,B=(function(g,j,_,w,L){var K=c.transformTo("string",L(w));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+l(g,2)+l(g,2)+l(j,4)+l(_,4)+l(K.length,2)+K})(this.dirRecords.length,N,p,this.zipComment,this.encodeFileName);this.push({data:B,meta:{percent:100}})},y.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},y.prototype.registerPrevious=function(p){this._sources.push(p);var v=this;return p.on("data",function(N){v.processChunk(N)}),p.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),p.on("error",function(N){v.error(N)}),this},y.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},y.prototype.error=function(p){var v=this._sources;if(!u.prototype.error.call(this,p))return!1;for(var N=0;N<v.length;N++)try{v[N].error(p)}catch{}return!0},y.prototype.lock=function(){u.prototype.lock.call(this);for(var p=this._sources,v=0;v<p.length;v++)p[v].lock()},n.exports=y},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,n,o){var l=s("../compressions"),d=s("./ZipFileWorker");o.generateWorker=function(c,u,h){var m=new d(u.streamFiles,h,u.platform,u.encodeFileName),x=0;try{c.forEach(function(y,p){x++;var v=(function(j,_){var w=j||_,L=l[w];if(!L)throw new Error(w+" is not a valid compression method !");return L})(p.options.compression,u.compression),N=p.options.compressionOptions||u.compressionOptions||{},B=p.dir,g=p.date;p._compressWorker(v,N).withStreamInfo("file",{name:y,dir:B,date:g,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(m)}),m.entriesCount=x}catch(y){m.error(y)}return m}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,n,o){function l(){if(!(this instanceof l))return new l;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var d=new l;for(var c in this)typeof this[c]!="function"&&(d[c]=this[c]);return d}}(l.prototype=s("./object")).loadAsync=s("./load"),l.support=s("./support"),l.defaults=s("./defaults"),l.version="3.10.1",l.loadAsync=function(d,c){return new l().loadAsync(d,c)},l.external=s("./external"),n.exports=l},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,n,o){var l=s("./utils"),d=s("./external"),c=s("./utf8"),u=s("./zipEntries"),h=s("./stream/Crc32Probe"),m=s("./nodejsUtils");function x(y){return new d.Promise(function(p,v){var N=y.decompressed.getContentWorker().pipe(new h);N.on("error",function(B){v(B)}).on("end",function(){N.streamInfo.crc32!==y.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(y,p){var v=this;return p=l.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:c.utf8decode}),m.isNode&&m.isStream(y)?d.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):l.prepareContent("the loaded zip file",y,!0,p.optimizedBinaryString,p.base64).then(function(N){var B=new u(p);return B.load(N),B}).then(function(N){var B=[d.Promise.resolve(N)],g=N.files;if(p.checkCRC32)for(var j=0;j<g.length;j++)B.push(x(g[j]));return d.Promise.all(B)}).then(function(N){for(var B=N.shift(),g=B.files,j=0;j<g.length;j++){var _=g[j],w=_.fileNameStr,L=l.resolve(_.fileNameStr);v.file(L,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:p.createFolders}),_.dir||(v.file(L).unsafeOriginalName=w)}return B.zipComment.length&&(v.comment=B.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,n,o){var l=s("../utils"),d=s("../stream/GenericWorker");function c(u,h){d.call(this,"Nodejs stream input adapter for "+u),this._upstreamEnded=!1,this._bindStream(h)}l.inherits(c,d),c.prototype._bindStream=function(u){var h=this;(this._stream=u).pause(),u.on("data",function(m){h.push({data:m,meta:{percent:0}})}).on("error",function(m){h.isPaused?this.generatedError=m:h.error(m)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},c.prototype.pause=function(){return!!d.prototype.pause.call(this)&&(this._stream.pause(),!0)},c.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=c},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,n,o){var l=s("readable-stream").Readable;function d(c,u,h){l.call(this,u),this._helper=c;var m=this;c.on("data",function(x,y){m.push(x)||m._helper.pause(),h&&h(y)}).on("error",function(x){m.emit("error",x)}).on("end",function(){m.push(null)})}s("../utils").inherits(d,l),d.prototype._read=function(){this._helper.resume()},n.exports=d},{"../utils":32,"readable-stream":16}],14:[function(s,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(l,d){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(l,d);if(typeof l=="number")throw new Error('The "data" argument must not be a number');return new Buffer(l,d)},allocBuffer:function(l){if(Buffer.alloc)return Buffer.alloc(l);var d=new Buffer(l);return d.fill(0),d},isBuffer:function(l){return Buffer.isBuffer(l)},isStream:function(l){return l&&typeof l.on=="function"&&typeof l.pause=="function"&&typeof l.resume=="function"}}},{}],15:[function(s,n,o){function l(L,K,M){var V,T=c.getTypeOf(K),ne=c.extend(M||{},m);ne.date=ne.date||new Date,ne.compression!==null&&(ne.compression=ne.compression.toUpperCase()),typeof ne.unixPermissions=="string"&&(ne.unixPermissions=parseInt(ne.unixPermissions,8)),ne.unixPermissions&&16384&ne.unixPermissions&&(ne.dir=!0),ne.dosPermissions&&16&ne.dosPermissions&&(ne.dir=!0),ne.dir&&(L=g(L)),ne.createFolders&&(V=B(L))&&j.call(this,V,!0);var Z=T==="string"&&ne.binary===!1&&ne.base64===!1;M&&M.binary!==void 0||(ne.binary=!Z),(K instanceof x&&K.uncompressedSize===0||ne.dir||!K||K.length===0)&&(ne.base64=!1,ne.binary=!0,K="",ne.compression="STORE",T="string");var U=null;U=K instanceof x||K instanceof u?K:v.isNode&&v.isStream(K)?new N(L,K):c.prepareContent(L,K,ne.binary,ne.optimizedBinaryString,ne.base64);var q=new y(L,U,ne);this.files[L]=q}var d=s("./utf8"),c=s("./utils"),u=s("./stream/GenericWorker"),h=s("./stream/StreamHelper"),m=s("./defaults"),x=s("./compressedObject"),y=s("./zipObject"),p=s("./generate"),v=s("./nodejsUtils"),N=s("./nodejs/NodejsStreamInputAdapter"),B=function(L){L.slice(-1)==="/"&&(L=L.substring(0,L.length-1));var K=L.lastIndexOf("/");return 0<K?L.substring(0,K):""},g=function(L){return L.slice(-1)!=="/"&&(L+="/"),L},j=function(L,K){return K=K!==void 0?K:m.createFolders,L=g(L),this.files[L]||l.call(this,L,null,{dir:!0,createFolders:K}),this.files[L]};function _(L){return Object.prototype.toString.call(L)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(L){var K,M,V;for(K in this.files)V=this.files[K],(M=K.slice(this.root.length,K.length))&&K.slice(0,this.root.length)===this.root&&L(M,V)},filter:function(L){var K=[];return this.forEach(function(M,V){L(M,V)&&K.push(V)}),K},file:function(L,K,M){if(arguments.length!==1)return L=this.root+L,l.call(this,L,K,M),this;if(_(L)){var V=L;return this.filter(function(ne,Z){return!Z.dir&&V.test(ne)})}var T=this.files[this.root+L];return T&&!T.dir?T:null},folder:function(L){if(!L)return this;if(_(L))return this.filter(function(T,ne){return ne.dir&&L.test(T)});var K=this.root+L,M=j.call(this,K),V=this.clone();return V.root=M.name,V},remove:function(L){L=this.root+L;var K=this.files[L];if(K||(L.slice(-1)!=="/"&&(L+="/"),K=this.files[L]),K&&!K.dir)delete this.files[L];else for(var M=this.filter(function(T,ne){return ne.name.slice(0,L.length)===L}),V=0;V<M.length;V++)delete this.files[M[V].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(L){var K,M={};try{if((M=c.extend(L||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:d.utf8encode})).type=M.type.toLowerCase(),M.compression=M.compression.toUpperCase(),M.type==="binarystring"&&(M.type="string"),!M.type)throw new Error("No output type specified.");c.checkSupport(M.type),M.platform!=="darwin"&&M.platform!=="freebsd"&&M.platform!=="linux"&&M.platform!=="sunos"||(M.platform="UNIX"),M.platform==="win32"&&(M.platform="DOS");var V=M.comment||this.comment||"";K=p.generateWorker(this,M,V)}catch(T){(K=new u("error")).error(T)}return new h(K,M.type||"string",M.mimeType)},generateAsync:function(L,K){return this.generateInternalStream(L).accumulate(K)},generateNodeStream:function(L,K){return(L=L||{}).type||(L.type="nodebuffer"),this.generateInternalStream(L).toNodejsStream(K)}};n.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,n,o){n.exports=s("stream")},{stream:void 0}],17:[function(s,n,o){var l=s("./DataReader");function d(c){l.call(this,c);for(var u=0;u<this.data.length;u++)c[u]=255&c[u]}s("../utils").inherits(d,l),d.prototype.byteAt=function(c){return this.data[this.zero+c]},d.prototype.lastIndexOfSignature=function(c){for(var u=c.charCodeAt(0),h=c.charCodeAt(1),m=c.charCodeAt(2),x=c.charCodeAt(3),y=this.length-4;0<=y;--y)if(this.data[y]===u&&this.data[y+1]===h&&this.data[y+2]===m&&this.data[y+3]===x)return y-this.zero;return-1},d.prototype.readAndCheckSignature=function(c){var u=c.charCodeAt(0),h=c.charCodeAt(1),m=c.charCodeAt(2),x=c.charCodeAt(3),y=this.readData(4);return u===y[0]&&h===y[1]&&m===y[2]&&x===y[3]},d.prototype.readData=function(c){if(this.checkOffset(c),c===0)return[];var u=this.data.slice(this.zero+this.index,this.zero+this.index+c);return this.index+=c,u},n.exports=d},{"../utils":32,"./DataReader":18}],18:[function(s,n,o){var l=s("../utils");function d(c){this.data=c,this.length=c.length,this.index=0,this.zero=0}d.prototype={checkOffset:function(c){this.checkIndex(this.index+c)},checkIndex:function(c){if(this.length<this.zero+c||c<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+c+"). Corrupted zip ?")},setIndex:function(c){this.checkIndex(c),this.index=c},skip:function(c){this.setIndex(this.index+c)},byteAt:function(){},readInt:function(c){var u,h=0;for(this.checkOffset(c),u=this.index+c-1;u>=this.index;u--)h=(h<<8)+this.byteAt(u);return this.index+=c,h},readString:function(c){return l.transformTo("string",this.readData(c))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var c=this.readInt(4);return new Date(Date.UTC(1980+(c>>25&127),(c>>21&15)-1,c>>16&31,c>>11&31,c>>5&63,(31&c)<<1))}},n.exports=d},{"../utils":32}],19:[function(s,n,o){var l=s("./Uint8ArrayReader");function d(c){l.call(this,c)}s("../utils").inherits(d,l),d.prototype.readData=function(c){this.checkOffset(c);var u=this.data.slice(this.zero+this.index,this.zero+this.index+c);return this.index+=c,u},n.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,n,o){var l=s("./DataReader");function d(c){l.call(this,c)}s("../utils").inherits(d,l),d.prototype.byteAt=function(c){return this.data.charCodeAt(this.zero+c)},d.prototype.lastIndexOfSignature=function(c){return this.data.lastIndexOf(c)-this.zero},d.prototype.readAndCheckSignature=function(c){return c===this.readData(4)},d.prototype.readData=function(c){this.checkOffset(c);var u=this.data.slice(this.zero+this.index,this.zero+this.index+c);return this.index+=c,u},n.exports=d},{"../utils":32,"./DataReader":18}],21:[function(s,n,o){var l=s("./ArrayReader");function d(c){l.call(this,c)}s("../utils").inherits(d,l),d.prototype.readData=function(c){if(this.checkOffset(c),c===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+c);return this.index+=c,u},n.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(s,n,o){var l=s("../utils"),d=s("../support"),c=s("./ArrayReader"),u=s("./StringReader"),h=s("./NodeBufferReader"),m=s("./Uint8ArrayReader");n.exports=function(x){var y=l.getTypeOf(x);return l.checkSupport(y),y!=="string"||d.uint8array?y==="nodebuffer"?new h(x):d.uint8array?new m(l.transformTo("uint8array",x)):new c(l.transformTo("array",x)):new u(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,n,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,n,o){var l=s("./GenericWorker"),d=s("../utils");function c(u){l.call(this,"ConvertWorker to "+u),this.destType=u}d.inherits(c,l),c.prototype.processChunk=function(u){this.push({data:d.transformTo(this.destType,u.data),meta:u.meta})},n.exports=c},{"../utils":32,"./GenericWorker":28}],25:[function(s,n,o){var l=s("./GenericWorker"),d=s("../crc32");function c(){l.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(c,l),c.prototype.processChunk=function(u){this.streamInfo.crc32=d(u.data,this.streamInfo.crc32||0),this.push(u)},n.exports=c},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,n,o){var l=s("../utils"),d=s("./GenericWorker");function c(u){d.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}l.inherits(c,d),c.prototype.processChunk=function(u){if(u){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+u.data.length}d.prototype.processChunk.call(this,u)},n.exports=c},{"../utils":32,"./GenericWorker":28}],27:[function(s,n,o){var l=s("../utils"),d=s("./GenericWorker");function c(u){d.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(m){h.dataIsReady=!0,h.data=m,h.max=m&&m.length||0,h.type=l.getTypeOf(m),h.isPaused||h._tickAndRepeat()},function(m){h.error(m)})}l.inherits(c,d),c.prototype.cleanUp=function(){d.prototype.cleanUp.call(this),this.data=null},c.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,l.delay(this._tickAndRepeat,[],this)),!0)},c.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(l.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},c.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,h=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,h);break;case"uint8array":u=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":u=this.data.slice(this.index,h)}return this.index=h,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=c},{"../utils":32,"./GenericWorker":28}],28:[function(s,n,o){function l(d){this.name=d||"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}l.prototype={push:function(d){this.emit("data",d)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(d){this.emit("error",d)}return!0},error:function(d){return!this.isFinished&&(this.isPaused?this.generatedError=d:(this.isFinished=!0,this.emit("error",d),this.previous&&this.previous.error(d),this.cleanUp()),!0)},on:function(d,c){return this._listeners[d].push(c),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(d,c){if(this._listeners[d])for(var u=0;u<this._listeners[d].length;u++)this._listeners[d][u].call(this,c)},pipe:function(d){return d.registerPrevious(this)},registerPrevious:function(d){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=d.streamInfo,this.mergeStreamInfo(),this.previous=d;var c=this;return d.on("data",function(u){c.processChunk(u)}),d.on("end",function(){c.end()}),d.on("error",function(u){c.error(u)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var d=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),d=!0),this.previous&&this.previous.resume(),!d},flush:function(){},processChunk:function(d){this.push(d)},withStreamInfo:function(d,c){return this.extraStreamInfo[d]=c,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var d in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,d)&&(this.streamInfo[d]=this.extraStreamInfo[d])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var d="Worker "+this.name;return this.previous?this.previous+" -> "+d:d}},n.exports=l},{}],29:[function(s,n,o){var l=s("../utils"),d=s("./ConvertWorker"),c=s("./GenericWorker"),u=s("../base64"),h=s("../support"),m=s("../external"),x=null;if(h.nodestream)try{x=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function y(v,N){return new m.Promise(function(B,g){var j=[],_=v._internalType,w=v._outputType,L=v._mimeType;v.on("data",function(K,M){j.push(K),N&&N(M)}).on("error",function(K){j=[],g(K)}).on("end",function(){try{var K=(function(M,V,T){switch(M){case"blob":return l.newBlob(l.transformTo("arraybuffer",V),T);case"base64":return u.encode(V);default:return l.transformTo(M,V)}})(w,(function(M,V){var T,ne=0,Z=null,U=0;for(T=0;T<V.length;T++)U+=V[T].length;switch(M){case"string":return V.join("");case"array":return Array.prototype.concat.apply([],V);case"uint8array":for(Z=new Uint8Array(U),T=0;T<V.length;T++)Z.set(V[T],ne),ne+=V[T].length;return Z;case"nodebuffer":return Buffer.concat(V);default:throw new Error("concat : unsupported type '"+M+"'")}})(_,j),L);B(K)}catch(M){g(M)}j=[]}).resume()})}function p(v,N,B){var g=N;switch(N){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=N,this._mimeType=B,l.checkSupport(g),this._worker=v.pipe(new d(g)),v.lock()}catch(j){this._worker=new c("error"),this._worker.error(j)}}p.prototype={accumulate:function(v){return y(this,v)},on:function(v,N){var B=this;return v==="data"?this._worker.on(v,function(g){N.call(B,g.data,g.meta)}):this._worker.on(v,function(){l.delay(N,arguments,B)}),this},resume:function(){return l.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(l.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},v)}},n.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,n,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var l=new ArrayBuffer(0);try{o.blob=new Blob([l],{type:"application/zip"}).size===0}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);d.append(l),o.blob=d.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!s("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(s,n,o){for(var l=s("./utils"),d=s("./support"),c=s("./nodejsUtils"),u=s("./stream/GenericWorker"),h=new Array(256),m=0;m<256;m++)h[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;h[254]=h[254]=1;function x(){u.call(this,"utf-8 decode"),this.leftOver=null}function y(){u.call(this,"utf-8 encode")}o.utf8encode=function(p){return d.nodebuffer?c.newBufferFrom(p,"utf-8"):(function(v){var N,B,g,j,_,w=v.length,L=0;for(j=0;j<w;j++)(64512&(B=v.charCodeAt(j)))==55296&&j+1<w&&(64512&(g=v.charCodeAt(j+1)))==56320&&(B=65536+(B-55296<<10)+(g-56320),j++),L+=B<128?1:B<2048?2:B<65536?3:4;for(N=d.uint8array?new Uint8Array(L):new Array(L),j=_=0;_<L;j++)(64512&(B=v.charCodeAt(j)))==55296&&j+1<w&&(64512&(g=v.charCodeAt(j+1)))==56320&&(B=65536+(B-55296<<10)+(g-56320),j++),B<128?N[_++]=B:(B<2048?N[_++]=192|B>>>6:(B<65536?N[_++]=224|B>>>12:(N[_++]=240|B>>>18,N[_++]=128|B>>>12&63),N[_++]=128|B>>>6&63),N[_++]=128|63&B);return N})(p)},o.utf8decode=function(p){return d.nodebuffer?l.transformTo("nodebuffer",p).toString("utf-8"):(function(v){var N,B,g,j,_=v.length,w=new Array(2*_);for(N=B=0;N<_;)if((g=v[N++])<128)w[B++]=g;else if(4<(j=h[g]))w[B++]=65533,N+=j-1;else{for(g&=j===2?31:j===3?15:7;1<j&&N<_;)g=g<<6|63&v[N++],j--;1<j?w[B++]=65533:g<65536?w[B++]=g:(g-=65536,w[B++]=55296|g>>10&1023,w[B++]=56320|1023&g)}return w.length!==B&&(w.subarray?w=w.subarray(0,B):w.length=B),l.applyFromCharCode(w)})(p=l.transformTo(d.uint8array?"uint8array":"array",p))},l.inherits(x,u),x.prototype.processChunk=function(p){var v=l.transformTo(d.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(d.uint8array){var N=v;(v=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),v.set(N,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var B=(function(j,_){var w;for((_=_||j.length)>j.length&&(_=j.length),w=_-1;0<=w&&(192&j[w])==128;)w--;return w<0||w===0?_:w+h[j[w]]>_?w:_})(v),g=v;B!==v.length&&(d.uint8array?(g=v.subarray(0,B),this.leftOver=v.subarray(B,v.length)):(g=v.slice(0,B),this.leftOver=v.slice(B,v.length))),this.push({data:o.utf8decode(g),meta:p.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=x,l.inherits(y,u),y.prototype.processChunk=function(p){this.push({data:o.utf8encode(p.data),meta:p.meta})},o.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,n,o){var l=s("./support"),d=s("./base64"),c=s("./nodejsUtils"),u=s("./external");function h(N){return N}function m(N,B){for(var g=0;g<N.length;++g)B[g]=255&N.charCodeAt(g);return B}s("setimmediate"),o.newBlob=function(N,B){o.checkSupport("blob");try{return new Blob([N],{type:B})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(N),g.getBlob(B)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(N,B,g){var j=[],_=0,w=N.length;if(w<=g)return String.fromCharCode.apply(null,N);for(;_<w;)B==="array"||B==="nodebuffer"?j.push(String.fromCharCode.apply(null,N.slice(_,Math.min(_+g,w)))):j.push(String.fromCharCode.apply(null,N.subarray(_,Math.min(_+g,w)))),_+=g;return j.join("")},stringifyByChar:function(N){for(var B="",g=0;g<N.length;g++)B+=String.fromCharCode(N[g]);return B},applyCanBeUsed:{uint8array:(function(){try{return l.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return l.nodebuffer&&String.fromCharCode.apply(null,c.allocBuffer(1)).length===1}catch{return!1}})()}};function y(N){var B=65536,g=o.getTypeOf(N),j=!0;if(g==="uint8array"?j=x.applyCanBeUsed.uint8array:g==="nodebuffer"&&(j=x.applyCanBeUsed.nodebuffer),j)for(;1<B;)try{return x.stringifyByChunk(N,g,B)}catch{B=Math.floor(B/2)}return x.stringifyByChar(N)}function p(N,B){for(var g=0;g<N.length;g++)B[g]=N[g];return B}o.applyFromCharCode=y;var v={};v.string={string:h,array:function(N){return m(N,new Array(N.length))},arraybuffer:function(N){return v.string.uint8array(N).buffer},uint8array:function(N){return m(N,new Uint8Array(N.length))},nodebuffer:function(N){return m(N,c.allocBuffer(N.length))}},v.array={string:y,array:h,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return c.newBufferFrom(N)}},v.arraybuffer={string:function(N){return y(new Uint8Array(N))},array:function(N){return p(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:h,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return c.newBufferFrom(new Uint8Array(N))}},v.uint8array={string:y,array:function(N){return p(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:h,nodebuffer:function(N){return c.newBufferFrom(N)}},v.nodebuffer={string:y,array:function(N){return p(N,new Array(N.length))},arraybuffer:function(N){return v.nodebuffer.uint8array(N).buffer},uint8array:function(N){return p(N,new Uint8Array(N.length))},nodebuffer:h},o.transformTo=function(N,B){if(B=B||"",!N)return B;o.checkSupport(N);var g=o.getTypeOf(B);return v[g][N](B)},o.resolve=function(N){for(var B=N.split("/"),g=[],j=0;j<B.length;j++){var _=B[j];_==="."||_===""&&j!==0&&j!==B.length-1||(_===".."?g.pop():g.push(_))}return g.join("/")},o.getTypeOf=function(N){return typeof N=="string"?"string":Object.prototype.toString.call(N)==="[object Array]"?"array":l.nodebuffer&&c.isBuffer(N)?"nodebuffer":l.uint8array&&N instanceof Uint8Array?"uint8array":l.arraybuffer&&N instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(N){if(!l[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(N){var B,g,j="";for(g=0;g<(N||"").length;g++)j+="\\x"+((B=N.charCodeAt(g))<16?"0":"")+B.toString(16).toUpperCase();return j},o.delay=function(N,B,g){setImmediate(function(){N.apply(g||null,B||[])})},o.inherits=function(N,B){function g(){}g.prototype=B.prototype,N.prototype=new g},o.extend=function(){var N,B,g={};for(N=0;N<arguments.length;N++)for(B in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],B)&&g[B]===void 0&&(g[B]=arguments[N][B]);return g},o.prepareContent=function(N,B,g,j,_){return u.Promise.resolve(B).then(function(w){return l.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1)&&typeof FileReader<"u"?new u.Promise(function(L,K){var M=new FileReader;M.onload=function(V){L(V.target.result)},M.onerror=function(V){K(V.target.error)},M.readAsArrayBuffer(w)}):w}).then(function(w){var L=o.getTypeOf(w);return L?(L==="arraybuffer"?w=o.transformTo("uint8array",w):L==="string"&&(_?w=d.decode(w):g&&j!==!0&&(w=(function(K){return m(K,l.uint8array?new Uint8Array(K.length):new Array(K.length))})(w))),w):u.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,n,o){var l=s("./reader/readerFor"),d=s("./utils"),c=s("./signature"),u=s("./zipEntry"),h=s("./support");function m(x){this.files=[],this.loadOptions=x}m.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var y=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+d.pretty(y)+", expected "+d.pretty(x)+")")}},isSignature:function(x,y){var p=this.reader.index;this.reader.setIndex(x);var v=this.reader.readString(4)===y;return this.reader.setIndex(p),v},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var x=this.reader.readData(this.zipCommentLength),y=h.uint8array?"uint8array":"array",p=d.transformTo(y,x);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var x,y,p,v=this.zip64EndOfCentralSize-44;0<v;)x=this.reader.readInt(2),y=this.reader.readInt(4),p=this.reader.readData(y),this.zip64ExtensibleData[x]={id:x,length:y,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var x,y;for(x=0;x<this.files.length;x++)y=this.files[x],this.reader.setIndex(y.localHeaderOffset),this.checkSignature(c.LOCAL_FILE_HEADER),y.readLocalPart(this.reader),y.handleUTF8(),y.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(c.CENTRAL_FILE_HEADER);)(x=new u({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var x=this.reader.lastIndexOfSignature(c.CENTRAL_DIRECTORY_END);if(x<0)throw this.isSignature(0,c.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(x);var y=x;if(this.checkSignature(c.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,(x=this.reader.lastIndexOfSignature(c.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(x),this.checkSignature(c.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,c.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(c.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(c.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var v=y-p;if(0<v)this.isSignature(y,c.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(x){this.reader=l(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=m},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,n,o){var l=s("./reader/readerFor"),d=s("./utils"),c=s("./compressedObject"),u=s("./crc32"),h=s("./utf8"),m=s("./compressions"),x=s("./support");function y(p,v){this.options=p,this.loadOptions=v}y.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var v,N;if(p.skip(22),this.fileNameLength=p.readInt(2),N=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((v=(function(B){for(var g in m)if(Object.prototype.hasOwnProperty.call(m,g)&&m[g].magic===B)return m[g];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+d.pretty(this.compressionMethod)+" unknown (inner file : "+d.transformTo("string",this.fileName)+")");this.decompressed=new c(this.compressedSize,this.uncompressedSize,this.crc32,v,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var v=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(v),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=l(this.extraFields[1].value);this.uncompressedSize===d.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===d.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===d.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===d.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var v,N,B,g=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<g;)v=p.readInt(2),N=p.readInt(2),B=p.readData(N),this.extraFields[v]={id:v,length:N,value:B};p.setIndex(g)},handleUTF8:function(){var p=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var N=d.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var B=this.findExtraFieldUnicodeComment();if(B!==null)this.fileCommentStr=B;else{var g=d.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var v=l(p.value);return v.readInt(1)!==1||u(this.fileName)!==v.readInt(4)?null:h.utf8decode(v.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var v=l(p.value);return v.readInt(1)!==1||u(this.fileComment)!==v.readInt(4)?null:h.utf8decode(v.readData(p.length-5))}return null}},n.exports=y},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,n,o){function l(v,N,B){this.name=v,this.dir=B.dir,this.date=B.date,this.comment=B.comment,this.unixPermissions=B.unixPermissions,this.dosPermissions=B.dosPermissions,this._data=N,this._dataBinary=B.binary,this.options={compression:B.compression,compressionOptions:B.compressionOptions}}var d=s("./stream/StreamHelper"),c=s("./stream/DataWorker"),u=s("./utf8"),h=s("./compressedObject"),m=s("./stream/GenericWorker");l.prototype={internalStream:function(v){var N=null,B="string";try{if(!v)throw new Error("No output type specified.");var g=(B=v.toLowerCase())==="string"||B==="text";B!=="binarystring"&&B!=="text"||(B="string"),N=this._decompressWorker();var j=!this._dataBinary;j&&!g&&(N=N.pipe(new u.Utf8EncodeWorker)),!j&&g&&(N=N.pipe(new u.Utf8DecodeWorker))}catch(_){(N=new m("error")).error(_)}return new d(N,B,"")},async:function(v,N){return this.internalStream(v).accumulate(N)},nodeStream:function(v,N){return this.internalStream(v||"nodebuffer").toNodejsStream(N)},_compressWorker:function(v,N){if(this._data instanceof h&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var B=this._decompressWorker();return this._dataBinary||(B=B.pipe(new u.Utf8EncodeWorker)),h.createWorkerFrom(B,v,N)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof m?this._data:new c(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],y=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<x.length;p++)l.prototype[x[p]]=y;n.exports=l},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,n,o){(function(l){var d,c,u=l.MutationObserver||l.WebKitMutationObserver;if(u){var h=0,m=new u(v),x=l.document.createTextNode("");m.observe(x,{characterData:!0}),d=function(){x.data=h=++h%2}}else if(l.setImmediate||l.MessageChannel===void 0)d="document"in l&&"onreadystatechange"in l.document.createElement("script")?function(){var N=l.document.createElement("script");N.onreadystatechange=function(){v(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},l.document.documentElement.appendChild(N)}:function(){setTimeout(v,0)};else{var y=new l.MessageChannel;y.port1.onmessage=v,d=function(){y.port2.postMessage(0)}}var p=[];function v(){var N,B;c=!0;for(var g=p.length;g;){for(B=p,p=[],N=-1;++N<g;)B[N]();g=p.length}c=!1}n.exports=function(N){p.push(N)!==1||c||d()}}).call(this,typeof Oo<"u"?Oo:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,n,o){var l=s("immediate");function d(){}var c={},u=["REJECTED"],h=["FULFILLED"],m=["PENDING"];function x(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,g!==d&&N(this,g)}function y(g,j,_){this.promise=g,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function p(g,j,_){l(function(){var w;try{w=j(_)}catch(L){return c.reject(g,L)}w===g?c.reject(g,new TypeError("Cannot resolve promise with itself")):c.resolve(g,w)})}function v(g){var j=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof j=="function")return function(){j.apply(g,arguments)}}function N(g,j){var _=!1;function w(M){_||(_=!0,c.reject(g,M))}function L(M){_||(_=!0,c.resolve(g,M))}var K=B(function(){j(L,w)});K.status==="error"&&w(K.value)}function B(g,j){var _={};try{_.value=g(j),_.status="success"}catch(w){_.status="error",_.value=w}return _}(n.exports=x).prototype.finally=function(g){if(typeof g!="function")return this;var j=this.constructor;return this.then(function(_){return j.resolve(g()).then(function(){return _})},function(_){return j.resolve(g()).then(function(){throw _})})},x.prototype.catch=function(g){return this.then(null,g)},x.prototype.then=function(g,j){if(typeof g!="function"&&this.state===h||typeof j!="function"&&this.state===u)return this;var _=new this.constructor(d);return this.state!==m?p(_,this.state===h?g:j,this.outcome):this.queue.push(new y(_,g,j)),_},y.prototype.callFulfilled=function(g){c.resolve(this.promise,g)},y.prototype.otherCallFulfilled=function(g){p(this.promise,this.onFulfilled,g)},y.prototype.callRejected=function(g){c.reject(this.promise,g)},y.prototype.otherCallRejected=function(g){p(this.promise,this.onRejected,g)},c.resolve=function(g,j){var _=B(v,j);if(_.status==="error")return c.reject(g,_.value);var w=_.value;if(w)N(g,w);else{g.state=h,g.outcome=j;for(var L=-1,K=g.queue.length;++L<K;)g.queue[L].callFulfilled(j)}return g},c.reject=function(g,j){g.state=u,g.outcome=j;for(var _=-1,w=g.queue.length;++_<w;)g.queue[_].callRejected(j);return g},x.resolve=function(g){return g instanceof this?g:c.resolve(new this(d),g)},x.reject=function(g){var j=new this(d);return c.reject(j,g)},x.all=function(g){var j=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=g.length,w=!1;if(!_)return this.resolve([]);for(var L=new Array(_),K=0,M=-1,V=new this(d);++M<_;)T(g[M],M);return V;function T(ne,Z){j.resolve(ne).then(function(U){L[Z]=U,++K!==_||w||(w=!0,c.resolve(V,L))},function(U){w||(w=!0,c.reject(V,U))})}},x.race=function(g){var j=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=g.length,w=!1;if(!_)return this.resolve([]);for(var L=-1,K=new this(d);++L<_;)M=g[L],j.resolve(M).then(function(V){w||(w=!0,c.resolve(K,V))},function(V){w||(w=!0,c.reject(K,V))});var M;return K}},{immediate:36}],38:[function(s,n,o){var l={};(0,s("./lib/utils/common").assign)(l,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),n.exports=l},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,n,o){var l=s("./zlib/deflate"),d=s("./utils/common"),c=s("./utils/strings"),u=s("./zlib/messages"),h=s("./zlib/zstream"),m=Object.prototype.toString,x=0,y=-1,p=0,v=8;function N(g){if(!(this instanceof N))return new N(g);this.options=d.assign({level:y,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},g||{});var j=this.options;j.raw&&0<j.windowBits?j.windowBits=-j.windowBits:j.gzip&&0<j.windowBits&&j.windowBits<16&&(j.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var _=l.deflateInit2(this.strm,j.level,j.method,j.windowBits,j.memLevel,j.strategy);if(_!==x)throw new Error(u[_]);if(j.header&&l.deflateSetHeader(this.strm,j.header),j.dictionary){var w;if(w=typeof j.dictionary=="string"?c.string2buf(j.dictionary):m.call(j.dictionary)==="[object ArrayBuffer]"?new Uint8Array(j.dictionary):j.dictionary,(_=l.deflateSetDictionary(this.strm,w))!==x)throw new Error(u[_]);this._dict_set=!0}}function B(g,j){var _=new N(j);if(_.push(g,!0),_.err)throw _.msg||u[_.err];return _.result}N.prototype.push=function(g,j){var _,w,L=this.strm,K=this.options.chunkSize;if(this.ended)return!1;w=j===~~j?j:j===!0?4:0,typeof g=="string"?L.input=c.string2buf(g):m.call(g)==="[object ArrayBuffer]"?L.input=new Uint8Array(g):L.input=g,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new d.Buf8(K),L.next_out=0,L.avail_out=K),(_=l.deflate(L,w))!==1&&_!==x)return this.onEnd(_),!(this.ended=!0);L.avail_out!==0&&(L.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(c.buf2binstring(d.shrinkBuf(L.output,L.next_out))):this.onData(d.shrinkBuf(L.output,L.next_out)))}while((0<L.avail_in||L.avail_out===0)&&_!==1);return w===4?(_=l.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===x):w!==2||(this.onEnd(x),!(L.avail_out=0))},N.prototype.onData=function(g){this.chunks.push(g)},N.prototype.onEnd=function(g){g===x&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},o.Deflate=N,o.deflate=B,o.deflateRaw=function(g,j){return(j=j||{}).raw=!0,B(g,j)},o.gzip=function(g,j){return(j=j||{}).gzip=!0,B(g,j)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,n,o){var l=s("./zlib/inflate"),d=s("./utils/common"),c=s("./utils/strings"),u=s("./zlib/constants"),h=s("./zlib/messages"),m=s("./zlib/zstream"),x=s("./zlib/gzheader"),y=Object.prototype.toString;function p(N){if(!(this instanceof p))return new p(N);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},N||{});var B=this.options;B.raw&&0<=B.windowBits&&B.windowBits<16&&(B.windowBits=-B.windowBits,B.windowBits===0&&(B.windowBits=-15)),!(0<=B.windowBits&&B.windowBits<16)||N&&N.windowBits||(B.windowBits+=32),15<B.windowBits&&B.windowBits<48&&(15&B.windowBits)==0&&(B.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var g=l.inflateInit2(this.strm,B.windowBits);if(g!==u.Z_OK)throw new Error(h[g]);this.header=new x,l.inflateGetHeader(this.strm,this.header)}function v(N,B){var g=new p(B);if(g.push(N,!0),g.err)throw g.msg||h[g.err];return g.result}p.prototype.push=function(N,B){var g,j,_,w,L,K,M=this.strm,V=this.options.chunkSize,T=this.options.dictionary,ne=!1;if(this.ended)return!1;j=B===~~B?B:B===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof N=="string"?M.input=c.binstring2buf(N):y.call(N)==="[object ArrayBuffer]"?M.input=new Uint8Array(N):M.input=N,M.next_in=0,M.avail_in=M.input.length;do{if(M.avail_out===0&&(M.output=new d.Buf8(V),M.next_out=0,M.avail_out=V),(g=l.inflate(M,u.Z_NO_FLUSH))===u.Z_NEED_DICT&&T&&(K=typeof T=="string"?c.string2buf(T):y.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,g=l.inflateSetDictionary(this.strm,K)),g===u.Z_BUF_ERROR&&ne===!0&&(g=u.Z_OK,ne=!1),g!==u.Z_STREAM_END&&g!==u.Z_OK)return this.onEnd(g),!(this.ended=!0);M.next_out&&(M.avail_out!==0&&g!==u.Z_STREAM_END&&(M.avail_in!==0||j!==u.Z_FINISH&&j!==u.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=c.utf8border(M.output,M.next_out),w=M.next_out-_,L=c.buf2string(M.output,_),M.next_out=w,M.avail_out=V-w,w&&d.arraySet(M.output,M.output,_,w,0),this.onData(L)):this.onData(d.shrinkBuf(M.output,M.next_out)))),M.avail_in===0&&M.avail_out===0&&(ne=!0)}while((0<M.avail_in||M.avail_out===0)&&g!==u.Z_STREAM_END);return g===u.Z_STREAM_END&&(j=u.Z_FINISH),j===u.Z_FINISH?(g=l.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===u.Z_OK):j!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),!(M.avail_out=0))},p.prototype.onData=function(N){this.chunks.push(N)},p.prototype.onEnd=function(N){N===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},o.Inflate=p,o.inflate=v,o.inflateRaw=function(N,B){return(B=B||{}).raw=!0,v(N,B)},o.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,n,o){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(u){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var m=h.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var x in m)m.hasOwnProperty(x)&&(u[x]=m[x])}}return u},o.shrinkBuf=function(u,h){return u.length===h?u:u.subarray?u.subarray(0,h):(u.length=h,u)};var d={arraySet:function(u,h,m,x,y){if(h.subarray&&u.subarray)u.set(h.subarray(m,m+x),y);else for(var p=0;p<x;p++)u[y+p]=h[m+p]},flattenChunks:function(u){var h,m,x,y,p,v;for(h=x=0,m=u.length;h<m;h++)x+=u[h].length;for(v=new Uint8Array(x),h=y=0,m=u.length;h<m;h++)p=u[h],v.set(p,y),y+=p.length;return v}},c={arraySet:function(u,h,m,x,y){for(var p=0;p<x;p++)u[y+p]=h[m+p]},flattenChunks:function(u){return[].concat.apply([],u)}};o.setTyped=function(u){u?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,d)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,c))},o.setTyped(l)},{}],42:[function(s,n,o){var l=s("./common"),d=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{d=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new l.Buf8(256),h=0;h<256;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function m(x,y){if(y<65537&&(x.subarray&&c||!x.subarray&&d))return String.fromCharCode.apply(null,l.shrinkBuf(x,y));for(var p="",v=0;v<y;v++)p+=String.fromCharCode(x[v]);return p}u[254]=u[254]=1,o.string2buf=function(x){var y,p,v,N,B,g=x.length,j=0;for(N=0;N<g;N++)(64512&(p=x.charCodeAt(N)))==55296&&N+1<g&&(64512&(v=x.charCodeAt(N+1)))==56320&&(p=65536+(p-55296<<10)+(v-56320),N++),j+=p<128?1:p<2048?2:p<65536?3:4;for(y=new l.Buf8(j),N=B=0;B<j;N++)(64512&(p=x.charCodeAt(N)))==55296&&N+1<g&&(64512&(v=x.charCodeAt(N+1)))==56320&&(p=65536+(p-55296<<10)+(v-56320),N++),p<128?y[B++]=p:(p<2048?y[B++]=192|p>>>6:(p<65536?y[B++]=224|p>>>12:(y[B++]=240|p>>>18,y[B++]=128|p>>>12&63),y[B++]=128|p>>>6&63),y[B++]=128|63&p);return y},o.buf2binstring=function(x){return m(x,x.length)},o.binstring2buf=function(x){for(var y=new l.Buf8(x.length),p=0,v=y.length;p<v;p++)y[p]=x.charCodeAt(p);return y},o.buf2string=function(x,y){var p,v,N,B,g=y||x.length,j=new Array(2*g);for(p=v=0;p<g;)if((N=x[p++])<128)j[v++]=N;else if(4<(B=u[N]))j[v++]=65533,p+=B-1;else{for(N&=B===2?31:B===3?15:7;1<B&&p<g;)N=N<<6|63&x[p++],B--;1<B?j[v++]=65533:N<65536?j[v++]=N:(N-=65536,j[v++]=55296|N>>10&1023,j[v++]=56320|1023&N)}return m(j,v)},o.utf8border=function(x,y){var p;for((y=y||x.length)>x.length&&(y=x.length),p=y-1;0<=p&&(192&x[p])==128;)p--;return p<0||p===0?y:p+u[x[p]]>y?p:y}},{"./common":41}],43:[function(s,n,o){n.exports=function(l,d,c,u){for(var h=65535&l|0,m=l>>>16&65535|0,x=0;c!==0;){for(c-=x=2e3<c?2e3:c;m=m+(h=h+d[u++]|0)|0,--x;);h%=65521,m%=65521}return h|m<<16|0}},{}],44:[function(s,n,o){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,n,o){var l=(function(){for(var d,c=[],u=0;u<256;u++){d=u;for(var h=0;h<8;h++)d=1&d?3988292384^d>>>1:d>>>1;c[u]=d}return c})();n.exports=function(d,c,u,h){var m=l,x=h+u;d^=-1;for(var y=h;y<x;y++)d=d>>>8^m[255&(d^c[y])];return-1^d}},{}],46:[function(s,n,o){var l,d=s("../utils/common"),c=s("./trees"),u=s("./adler32"),h=s("./crc32"),m=s("./messages"),x=0,y=4,p=0,v=-2,N=-1,B=4,g=2,j=8,_=9,w=286,L=30,K=19,M=2*w+1,V=15,T=3,ne=258,Z=ne+T+1,U=42,q=113,F=1,le=2,ae=3,se=4;function fe(z,ie){return z.msg=m[ie],ie}function ye(z){return(z<<1)-(4<z?9:0)}function _e(z){for(var ie=z.length;0<=--ie;)z[ie]=0}function xe(z){var ie=z.state,W=ie.pending;W>z.avail_out&&(W=z.avail_out),W!==0&&(d.arraySet(z.output,ie.pending_buf,ie.pending_out,W,z.next_out),z.next_out+=W,ie.pending_out+=W,z.total_out+=W,z.avail_out-=W,ie.pending-=W,ie.pending===0&&(ie.pending_out=0))}function D(z,ie){c._tr_flush_block(z,0<=z.block_start?z.block_start:-1,z.strstart-z.block_start,ie),z.block_start=z.strstart,xe(z.strm)}function $(z,ie){z.pending_buf[z.pending++]=ie}function X(z,ie){z.pending_buf[z.pending++]=ie>>>8&255,z.pending_buf[z.pending++]=255&ie}function te(z,ie){var W,Q,I=z.max_chain_length,k=z.strstart,G=z.prev_length,me=z.nice_match,be=z.strstart>z.w_size-Z?z.strstart-(z.w_size-Z):0,Ue=z.window,Re=z.w_mask,He=z.prev,Ve=z.strstart+ne,it=Ue[k+G-1],lt=Ue[k+G];z.prev_length>=z.good_match&&(I>>=2),me>z.lookahead&&(me=z.lookahead);do if(Ue[(W=ie)+G]===lt&&Ue[W+G-1]===it&&Ue[W]===Ue[k]&&Ue[++W]===Ue[k+1]){k+=2,W++;do;while(Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&Ue[++k]===Ue[++W]&&k<Ve);if(Q=ne-(Ve-k),k=Ve-ne,G<Q){if(z.match_start=ie,me<=(G=Q))break;it=Ue[k+G-1],lt=Ue[k+G]}}while((ie=He[ie&Re])>be&&--I!=0);return G<=z.lookahead?G:z.lookahead}function J(z){var ie,W,Q,I,k,G,me,be,Ue,Re,He=z.w_size;do{if(I=z.window_size-z.lookahead-z.strstart,z.strstart>=He+(He-Z)){for(d.arraySet(z.window,z.window,He,He,0),z.match_start-=He,z.strstart-=He,z.block_start-=He,ie=W=z.hash_size;Q=z.head[--ie],z.head[ie]=He<=Q?Q-He:0,--W;);for(ie=W=He;Q=z.prev[--ie],z.prev[ie]=He<=Q?Q-He:0,--W;);I+=He}if(z.strm.avail_in===0)break;if(G=z.strm,me=z.window,be=z.strstart+z.lookahead,Ue=I,Re=void 0,Re=G.avail_in,Ue<Re&&(Re=Ue),W=Re===0?0:(G.avail_in-=Re,d.arraySet(me,G.input,G.next_in,Re,be),G.state.wrap===1?G.adler=u(G.adler,me,Re,be):G.state.wrap===2&&(G.adler=h(G.adler,me,Re,be)),G.next_in+=Re,G.total_in+=Re,Re),z.lookahead+=W,z.lookahead+z.insert>=T)for(k=z.strstart-z.insert,z.ins_h=z.window[k],z.ins_h=(z.ins_h<<z.hash_shift^z.window[k+1])&z.hash_mask;z.insert&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[k+T-1])&z.hash_mask,z.prev[k&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=k,k++,z.insert--,!(z.lookahead+z.insert<T)););}while(z.lookahead<Z&&z.strm.avail_in!==0)}function O(z,ie){for(var W,Q;;){if(z.lookahead<Z){if(J(z),z.lookahead<Z&&ie===x)return F;if(z.lookahead===0)break}if(W=0,z.lookahead>=T&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+T-1])&z.hash_mask,W=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),W!==0&&z.strstart-W<=z.w_size-Z&&(z.match_length=te(z,W)),z.match_length>=T)if(Q=c._tr_tally(z,z.strstart-z.match_start,z.match_length-T),z.lookahead-=z.match_length,z.match_length<=z.max_lazy_match&&z.lookahead>=T){for(z.match_length--;z.strstart++,z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+T-1])&z.hash_mask,W=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart,--z.match_length!=0;);z.strstart++}else z.strstart+=z.match_length,z.match_length=0,z.ins_h=z.window[z.strstart],z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+1])&z.hash_mask;else Q=c._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++;if(Q&&(D(z,!1),z.strm.avail_out===0))return F}return z.insert=z.strstart<T-1?z.strstart:T-1,ie===y?(D(z,!0),z.strm.avail_out===0?ae:se):z.last_lit&&(D(z,!1),z.strm.avail_out===0)?F:le}function H(z,ie){for(var W,Q,I;;){if(z.lookahead<Z){if(J(z),z.lookahead<Z&&ie===x)return F;if(z.lookahead===0)break}if(W=0,z.lookahead>=T&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+T-1])&z.hash_mask,W=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),z.prev_length=z.match_length,z.prev_match=z.match_start,z.match_length=T-1,W!==0&&z.prev_length<z.max_lazy_match&&z.strstart-W<=z.w_size-Z&&(z.match_length=te(z,W),z.match_length<=5&&(z.strategy===1||z.match_length===T&&4096<z.strstart-z.match_start)&&(z.match_length=T-1)),z.prev_length>=T&&z.match_length<=z.prev_length){for(I=z.strstart+z.lookahead-T,Q=c._tr_tally(z,z.strstart-1-z.prev_match,z.prev_length-T),z.lookahead-=z.prev_length-1,z.prev_length-=2;++z.strstart<=I&&(z.ins_h=(z.ins_h<<z.hash_shift^z.window[z.strstart+T-1])&z.hash_mask,W=z.prev[z.strstart&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=z.strstart),--z.prev_length!=0;);if(z.match_available=0,z.match_length=T-1,z.strstart++,Q&&(D(z,!1),z.strm.avail_out===0))return F}else if(z.match_available){if((Q=c._tr_tally(z,0,z.window[z.strstart-1]))&&D(z,!1),z.strstart++,z.lookahead--,z.strm.avail_out===0)return F}else z.match_available=1,z.strstart++,z.lookahead--}return z.match_available&&(Q=c._tr_tally(z,0,z.window[z.strstart-1]),z.match_available=0),z.insert=z.strstart<T-1?z.strstart:T-1,ie===y?(D(z,!0),z.strm.avail_out===0?ae:se):z.last_lit&&(D(z,!1),z.strm.avail_out===0)?F:le}function re(z,ie,W,Q,I){this.good_length=z,this.max_lazy=ie,this.nice_length=W,this.max_chain=Q,this.func=I}function Ae(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=j,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new d.Buf16(2*M),this.dyn_dtree=new d.Buf16(2*(2*L+1)),this.bl_tree=new d.Buf16(2*(2*K+1)),_e(this.dyn_ltree),_e(this.dyn_dtree),_e(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new d.Buf16(V+1),this.heap=new d.Buf16(2*w+1),_e(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.Buf16(2*w+1),_e(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function oe(z){var ie;return z&&z.state?(z.total_in=z.total_out=0,z.data_type=g,(ie=z.state).pending=0,ie.pending_out=0,ie.wrap<0&&(ie.wrap=-ie.wrap),ie.status=ie.wrap?U:q,z.adler=ie.wrap===2?0:1,ie.last_flush=x,c._tr_init(ie),p):fe(z,v)}function ce(z){var ie=oe(z);return ie===p&&(function(W){W.window_size=2*W.w_size,_e(W.head),W.max_lazy_match=l[W.level].max_lazy,W.good_match=l[W.level].good_length,W.nice_match=l[W.level].nice_length,W.max_chain_length=l[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=T-1,W.match_available=0,W.ins_h=0})(z.state),ie}function Se(z,ie,W,Q,I,k){if(!z)return v;var G=1;if(ie===N&&(ie=6),Q<0?(G=0,Q=-Q):15<Q&&(G=2,Q-=16),I<1||_<I||W!==j||Q<8||15<Q||ie<0||9<ie||k<0||B<k)return fe(z,v);Q===8&&(Q=9);var me=new Ae;return(z.state=me).strm=z,me.wrap=G,me.gzhead=null,me.w_bits=Q,me.w_size=1<<me.w_bits,me.w_mask=me.w_size-1,me.hash_bits=I+7,me.hash_size=1<<me.hash_bits,me.hash_mask=me.hash_size-1,me.hash_shift=~~((me.hash_bits+T-1)/T),me.window=new d.Buf8(2*me.w_size),me.head=new d.Buf16(me.hash_size),me.prev=new d.Buf16(me.w_size),me.lit_bufsize=1<<I+6,me.pending_buf_size=4*me.lit_bufsize,me.pending_buf=new d.Buf8(me.pending_buf_size),me.d_buf=1*me.lit_bufsize,me.l_buf=3*me.lit_bufsize,me.level=ie,me.strategy=k,me.method=W,ce(z)}l=[new re(0,0,0,0,function(z,ie){var W=65535;for(W>z.pending_buf_size-5&&(W=z.pending_buf_size-5);;){if(z.lookahead<=1){if(J(z),z.lookahead===0&&ie===x)return F;if(z.lookahead===0)break}z.strstart+=z.lookahead,z.lookahead=0;var Q=z.block_start+W;if((z.strstart===0||z.strstart>=Q)&&(z.lookahead=z.strstart-Q,z.strstart=Q,D(z,!1),z.strm.avail_out===0)||z.strstart-z.block_start>=z.w_size-Z&&(D(z,!1),z.strm.avail_out===0))return F}return z.insert=0,ie===y?(D(z,!0),z.strm.avail_out===0?ae:se):(z.strstart>z.block_start&&(D(z,!1),z.strm.avail_out),F)}),new re(4,4,8,4,O),new re(4,5,16,8,O),new re(4,6,32,32,O),new re(4,4,16,16,H),new re(8,16,32,32,H),new re(8,16,128,128,H),new re(8,32,128,256,H),new re(32,128,258,1024,H),new re(32,258,258,4096,H)],o.deflateInit=function(z,ie){return Se(z,ie,j,15,8,0)},o.deflateInit2=Se,o.deflateReset=ce,o.deflateResetKeep=oe,o.deflateSetHeader=function(z,ie){return z&&z.state?z.state.wrap!==2?v:(z.state.gzhead=ie,p):v},o.deflate=function(z,ie){var W,Q,I,k;if(!z||!z.state||5<ie||ie<0)return z?fe(z,v):v;if(Q=z.state,!z.output||!z.input&&z.avail_in!==0||Q.status===666&&ie!==y)return fe(z,z.avail_out===0?-5:v);if(Q.strm=z,W=Q.last_flush,Q.last_flush=ie,Q.status===U)if(Q.wrap===2)z.adler=0,$(Q,31),$(Q,139),$(Q,8),Q.gzhead?($(Q,(Q.gzhead.text?1:0)+(Q.gzhead.hcrc?2:0)+(Q.gzhead.extra?4:0)+(Q.gzhead.name?8:0)+(Q.gzhead.comment?16:0)),$(Q,255&Q.gzhead.time),$(Q,Q.gzhead.time>>8&255),$(Q,Q.gzhead.time>>16&255),$(Q,Q.gzhead.time>>24&255),$(Q,Q.level===9?2:2<=Q.strategy||Q.level<2?4:0),$(Q,255&Q.gzhead.os),Q.gzhead.extra&&Q.gzhead.extra.length&&($(Q,255&Q.gzhead.extra.length),$(Q,Q.gzhead.extra.length>>8&255)),Q.gzhead.hcrc&&(z.adler=h(z.adler,Q.pending_buf,Q.pending,0)),Q.gzindex=0,Q.status=69):($(Q,0),$(Q,0),$(Q,0),$(Q,0),$(Q,0),$(Q,Q.level===9?2:2<=Q.strategy||Q.level<2?4:0),$(Q,3),Q.status=q);else{var G=j+(Q.w_bits-8<<4)<<8;G|=(2<=Q.strategy||Q.level<2?0:Q.level<6?1:Q.level===6?2:3)<<6,Q.strstart!==0&&(G|=32),G+=31-G%31,Q.status=q,X(Q,G),Q.strstart!==0&&(X(Q,z.adler>>>16),X(Q,65535&z.adler)),z.adler=1}if(Q.status===69)if(Q.gzhead.extra){for(I=Q.pending;Q.gzindex<(65535&Q.gzhead.extra.length)&&(Q.pending!==Q.pending_buf_size||(Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),xe(z),I=Q.pending,Q.pending!==Q.pending_buf_size));)$(Q,255&Q.gzhead.extra[Q.gzindex]),Q.gzindex++;Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),Q.gzindex===Q.gzhead.extra.length&&(Q.gzindex=0,Q.status=73)}else Q.status=73;if(Q.status===73)if(Q.gzhead.name){I=Q.pending;do{if(Q.pending===Q.pending_buf_size&&(Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),xe(z),I=Q.pending,Q.pending===Q.pending_buf_size)){k=1;break}k=Q.gzindex<Q.gzhead.name.length?255&Q.gzhead.name.charCodeAt(Q.gzindex++):0,$(Q,k)}while(k!==0);Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),k===0&&(Q.gzindex=0,Q.status=91)}else Q.status=91;if(Q.status===91)if(Q.gzhead.comment){I=Q.pending;do{if(Q.pending===Q.pending_buf_size&&(Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),xe(z),I=Q.pending,Q.pending===Q.pending_buf_size)){k=1;break}k=Q.gzindex<Q.gzhead.comment.length?255&Q.gzhead.comment.charCodeAt(Q.gzindex++):0,$(Q,k)}while(k!==0);Q.gzhead.hcrc&&Q.pending>I&&(z.adler=h(z.adler,Q.pending_buf,Q.pending-I,I)),k===0&&(Q.status=103)}else Q.status=103;if(Q.status===103&&(Q.gzhead.hcrc?(Q.pending+2>Q.pending_buf_size&&xe(z),Q.pending+2<=Q.pending_buf_size&&($(Q,255&z.adler),$(Q,z.adler>>8&255),z.adler=0,Q.status=q)):Q.status=q),Q.pending!==0){if(xe(z),z.avail_out===0)return Q.last_flush=-1,p}else if(z.avail_in===0&&ye(ie)<=ye(W)&&ie!==y)return fe(z,-5);if(Q.status===666&&z.avail_in!==0)return fe(z,-5);if(z.avail_in!==0||Q.lookahead!==0||ie!==x&&Q.status!==666){var me=Q.strategy===2?(function(be,Ue){for(var Re;;){if(be.lookahead===0&&(J(be),be.lookahead===0)){if(Ue===x)return F;break}if(be.match_length=0,Re=c._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++,Re&&(D(be,!1),be.strm.avail_out===0))return F}return be.insert=0,Ue===y?(D(be,!0),be.strm.avail_out===0?ae:se):be.last_lit&&(D(be,!1),be.strm.avail_out===0)?F:le})(Q,ie):Q.strategy===3?(function(be,Ue){for(var Re,He,Ve,it,lt=be.window;;){if(be.lookahead<=ne){if(J(be),be.lookahead<=ne&&Ue===x)return F;if(be.lookahead===0)break}if(be.match_length=0,be.lookahead>=T&&0<be.strstart&&(He=lt[Ve=be.strstart-1])===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]){it=be.strstart+ne;do;while(He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&He===lt[++Ve]&&Ve<it);be.match_length=ne-(it-Ve),be.match_length>be.lookahead&&(be.match_length=be.lookahead)}if(be.match_length>=T?(Re=c._tr_tally(be,1,be.match_length-T),be.lookahead-=be.match_length,be.strstart+=be.match_length,be.match_length=0):(Re=c._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++),Re&&(D(be,!1),be.strm.avail_out===0))return F}return be.insert=0,Ue===y?(D(be,!0),be.strm.avail_out===0?ae:se):be.last_lit&&(D(be,!1),be.strm.avail_out===0)?F:le})(Q,ie):l[Q.level].func(Q,ie);if(me!==ae&&me!==se||(Q.status=666),me===F||me===ae)return z.avail_out===0&&(Q.last_flush=-1),p;if(me===le&&(ie===1?c._tr_align(Q):ie!==5&&(c._tr_stored_block(Q,0,0,!1),ie===3&&(_e(Q.head),Q.lookahead===0&&(Q.strstart=0,Q.block_start=0,Q.insert=0))),xe(z),z.avail_out===0))return Q.last_flush=-1,p}return ie!==y?p:Q.wrap<=0?1:(Q.wrap===2?($(Q,255&z.adler),$(Q,z.adler>>8&255),$(Q,z.adler>>16&255),$(Q,z.adler>>24&255),$(Q,255&z.total_in),$(Q,z.total_in>>8&255),$(Q,z.total_in>>16&255),$(Q,z.total_in>>24&255)):(X(Q,z.adler>>>16),X(Q,65535&z.adler)),xe(z),0<Q.wrap&&(Q.wrap=-Q.wrap),Q.pending!==0?p:1)},o.deflateEnd=function(z){var ie;return z&&z.state?(ie=z.state.status)!==U&&ie!==69&&ie!==73&&ie!==91&&ie!==103&&ie!==q&&ie!==666?fe(z,v):(z.state=null,ie===q?fe(z,-3):p):v},o.deflateSetDictionary=function(z,ie){var W,Q,I,k,G,me,be,Ue,Re=ie.length;if(!z||!z.state||(k=(W=z.state).wrap)===2||k===1&&W.status!==U||W.lookahead)return v;for(k===1&&(z.adler=u(z.adler,ie,Re,0)),W.wrap=0,Re>=W.w_size&&(k===0&&(_e(W.head),W.strstart=0,W.block_start=0,W.insert=0),Ue=new d.Buf8(W.w_size),d.arraySet(Ue,ie,Re-W.w_size,W.w_size,0),ie=Ue,Re=W.w_size),G=z.avail_in,me=z.next_in,be=z.input,z.avail_in=Re,z.next_in=0,z.input=ie,J(W);W.lookahead>=T;){for(Q=W.strstart,I=W.lookahead-(T-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[Q+T-1])&W.hash_mask,W.prev[Q&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Q,Q++,--I;);W.strstart=Q,W.lookahead=T-1,J(W)}return W.strstart+=W.lookahead,W.block_start=W.strstart,W.insert=W.lookahead,W.lookahead=0,W.match_length=W.prev_length=T-1,W.match_available=0,z.next_in=me,z.input=be,z.avail_in=G,W.wrap=k,p},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,n,o){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,n,o){n.exports=function(l,d){var c,u,h,m,x,y,p,v,N,B,g,j,_,w,L,K,M,V,T,ne,Z,U,q,F,le;c=l.state,u=l.next_in,F=l.input,h=u+(l.avail_in-5),m=l.next_out,le=l.output,x=m-(d-l.avail_out),y=m+(l.avail_out-257),p=c.dmax,v=c.wsize,N=c.whave,B=c.wnext,g=c.window,j=c.hold,_=c.bits,w=c.lencode,L=c.distcode,K=(1<<c.lenbits)-1,M=(1<<c.distbits)-1;e:do{_<15&&(j+=F[u++]<<_,_+=8,j+=F[u++]<<_,_+=8),V=w[j&K];t:for(;;){if(j>>>=T=V>>>24,_-=T,(T=V>>>16&255)===0)le[m++]=65535&V;else{if(!(16&T)){if((64&T)==0){V=w[(65535&V)+(j&(1<<T)-1)];continue t}if(32&T){c.mode=12;break e}l.msg="invalid literal/length code",c.mode=30;break e}ne=65535&V,(T&=15)&&(_<T&&(j+=F[u++]<<_,_+=8),ne+=j&(1<<T)-1,j>>>=T,_-=T),_<15&&(j+=F[u++]<<_,_+=8,j+=F[u++]<<_,_+=8),V=L[j&M];r:for(;;){if(j>>>=T=V>>>24,_-=T,!(16&(T=V>>>16&255))){if((64&T)==0){V=L[(65535&V)+(j&(1<<T)-1)];continue r}l.msg="invalid distance code",c.mode=30;break e}if(Z=65535&V,_<(T&=15)&&(j+=F[u++]<<_,(_+=8)<T&&(j+=F[u++]<<_,_+=8)),p<(Z+=j&(1<<T)-1)){l.msg="invalid distance too far back",c.mode=30;break e}if(j>>>=T,_-=T,(T=m-x)<Z){if(N<(T=Z-T)&&c.sane){l.msg="invalid distance too far back",c.mode=30;break e}if(q=g,(U=0)===B){if(U+=v-T,T<ne){for(ne-=T;le[m++]=g[U++],--T;);U=m-Z,q=le}}else if(B<T){if(U+=v+B-T,(T-=B)<ne){for(ne-=T;le[m++]=g[U++],--T;);if(U=0,B<ne){for(ne-=T=B;le[m++]=g[U++],--T;);U=m-Z,q=le}}}else if(U+=B-T,T<ne){for(ne-=T;le[m++]=g[U++],--T;);U=m-Z,q=le}for(;2<ne;)le[m++]=q[U++],le[m++]=q[U++],le[m++]=q[U++],ne-=3;ne&&(le[m++]=q[U++],1<ne&&(le[m++]=q[U++]))}else{for(U=m-Z;le[m++]=le[U++],le[m++]=le[U++],le[m++]=le[U++],2<(ne-=3););ne&&(le[m++]=le[U++],1<ne&&(le[m++]=le[U++]))}break}}break}}while(u<h&&m<y);u-=ne=_>>3,j&=(1<<(_-=ne<<3))-1,l.next_in=u,l.next_out=m,l.avail_in=u<h?h-u+5:5-(u-h),l.avail_out=m<y?y-m+257:257-(m-y),c.hold=j,c.bits=_}},{}],49:[function(s,n,o){var l=s("../utils/common"),d=s("./adler32"),c=s("./crc32"),u=s("./inffast"),h=s("./inftrees"),m=1,x=2,y=0,p=-2,v=1,N=852,B=592;function g(U){return(U>>>24&255)+(U>>>8&65280)+((65280&U)<<8)+((255&U)<<24)}function j(){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 l.Buf16(320),this.work=new l.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(U){var q;return U&&U.state?(q=U.state,U.total_in=U.total_out=q.total=0,U.msg="",q.wrap&&(U.adler=1&q.wrap),q.mode=v,q.last=0,q.havedict=0,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new l.Buf32(N),q.distcode=q.distdyn=new l.Buf32(B),q.sane=1,q.back=-1,y):p}function w(U){var q;return U&&U.state?((q=U.state).wsize=0,q.whave=0,q.wnext=0,_(U)):p}function L(U,q){var F,le;return U&&U.state?(le=U.state,q<0?(F=0,q=-q):(F=1+(q>>4),q<48&&(q&=15)),q&&(q<8||15<q)?p:(le.window!==null&&le.wbits!==q&&(le.window=null),le.wrap=F,le.wbits=q,w(U))):p}function K(U,q){var F,le;return U?(le=new j,(U.state=le).window=null,(F=L(U,q))!==y&&(U.state=null),F):p}var M,V,T=!0;function ne(U){if(T){var q;for(M=new l.Buf32(512),V=new l.Buf32(32),q=0;q<144;)U.lens[q++]=8;for(;q<256;)U.lens[q++]=9;for(;q<280;)U.lens[q++]=7;for(;q<288;)U.lens[q++]=8;for(h(m,U.lens,0,288,M,0,U.work,{bits:9}),q=0;q<32;)U.lens[q++]=5;h(x,U.lens,0,32,V,0,U.work,{bits:5}),T=!1}U.lencode=M,U.lenbits=9,U.distcode=V,U.distbits=5}function Z(U,q,F,le){var ae,se=U.state;return se.window===null&&(se.wsize=1<<se.wbits,se.wnext=0,se.whave=0,se.window=new l.Buf8(se.wsize)),le>=se.wsize?(l.arraySet(se.window,q,F-se.wsize,se.wsize,0),se.wnext=0,se.whave=se.wsize):(le<(ae=se.wsize-se.wnext)&&(ae=le),l.arraySet(se.window,q,F-le,ae,se.wnext),(le-=ae)?(l.arraySet(se.window,q,F-le,le,0),se.wnext=le,se.whave=se.wsize):(se.wnext+=ae,se.wnext===se.wsize&&(se.wnext=0),se.whave<se.wsize&&(se.whave+=ae))),0}o.inflateReset=w,o.inflateReset2=L,o.inflateResetKeep=_,o.inflateInit=function(U){return K(U,15)},o.inflateInit2=K,o.inflate=function(U,q){var F,le,ae,se,fe,ye,_e,xe,D,$,X,te,J,O,H,re,Ae,oe,ce,Se,z,ie,W,Q,I=0,k=new l.Buf8(4),G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!U||!U.state||!U.output||!U.input&&U.avail_in!==0)return p;(F=U.state).mode===12&&(F.mode=13),fe=U.next_out,ae=U.output,_e=U.avail_out,se=U.next_in,le=U.input,ye=U.avail_in,xe=F.hold,D=F.bits,$=ye,X=_e,ie=y;e:for(;;)switch(F.mode){case v:if(F.wrap===0){F.mode=13;break}for(;D<16;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(2&F.wrap&&xe===35615){k[F.check=0]=255&xe,k[1]=xe>>>8&255,F.check=c(F.check,k,2,0),D=xe=0,F.mode=2;break}if(F.flags=0,F.head&&(F.head.done=!1),!(1&F.wrap)||(((255&xe)<<8)+(xe>>8))%31){U.msg="incorrect header check",F.mode=30;break}if((15&xe)!=8){U.msg="unknown compression method",F.mode=30;break}if(D-=4,z=8+(15&(xe>>>=4)),F.wbits===0)F.wbits=z;else if(z>F.wbits){U.msg="invalid window size",F.mode=30;break}F.dmax=1<<z,U.adler=F.check=1,F.mode=512&xe?10:12,D=xe=0;break;case 2:for(;D<16;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(F.flags=xe,(255&F.flags)!=8){U.msg="unknown compression method",F.mode=30;break}if(57344&F.flags){U.msg="unknown header flags set",F.mode=30;break}F.head&&(F.head.text=xe>>8&1),512&F.flags&&(k[0]=255&xe,k[1]=xe>>>8&255,F.check=c(F.check,k,2,0)),D=xe=0,F.mode=3;case 3:for(;D<32;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.head&&(F.head.time=xe),512&F.flags&&(k[0]=255&xe,k[1]=xe>>>8&255,k[2]=xe>>>16&255,k[3]=xe>>>24&255,F.check=c(F.check,k,4,0)),D=xe=0,F.mode=4;case 4:for(;D<16;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.head&&(F.head.xflags=255&xe,F.head.os=xe>>8),512&F.flags&&(k[0]=255&xe,k[1]=xe>>>8&255,F.check=c(F.check,k,2,0)),D=xe=0,F.mode=5;case 5:if(1024&F.flags){for(;D<16;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.length=xe,F.head&&(F.head.extra_len=xe),512&F.flags&&(k[0]=255&xe,k[1]=xe>>>8&255,F.check=c(F.check,k,2,0)),D=xe=0}else F.head&&(F.head.extra=null);F.mode=6;case 6:if(1024&F.flags&&(ye<(te=F.length)&&(te=ye),te&&(F.head&&(z=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),l.arraySet(F.head.extra,le,se,te,z)),512&F.flags&&(F.check=c(F.check,le,te,se)),ye-=te,se+=te,F.length-=te),F.length))break e;F.length=0,F.mode=7;case 7:if(2048&F.flags){if(ye===0)break e;for(te=0;z=le[se+te++],F.head&&z&&F.length<65536&&(F.head.name+=String.fromCharCode(z)),z&&te<ye;);if(512&F.flags&&(F.check=c(F.check,le,te,se)),ye-=te,se+=te,z)break e}else F.head&&(F.head.name=null);F.length=0,F.mode=8;case 8:if(4096&F.flags){if(ye===0)break e;for(te=0;z=le[se+te++],F.head&&z&&F.length<65536&&(F.head.comment+=String.fromCharCode(z)),z&&te<ye;);if(512&F.flags&&(F.check=c(F.check,le,te,se)),ye-=te,se+=te,z)break e}else F.head&&(F.head.comment=null);F.mode=9;case 9:if(512&F.flags){for(;D<16;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(xe!==(65535&F.check)){U.msg="header crc mismatch",F.mode=30;break}D=xe=0}F.head&&(F.head.hcrc=F.flags>>9&1,F.head.done=!0),U.adler=F.check=0,F.mode=12;break;case 10:for(;D<32;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}U.adler=F.check=g(xe),D=xe=0,F.mode=11;case 11:if(F.havedict===0)return U.next_out=fe,U.avail_out=_e,U.next_in=se,U.avail_in=ye,F.hold=xe,F.bits=D,2;U.adler=F.check=1,F.mode=12;case 12:if(q===5||q===6)break e;case 13:if(F.last){xe>>>=7&D,D-=7&D,F.mode=27;break}for(;D<3;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}switch(F.last=1&xe,D-=1,3&(xe>>>=1)){case 0:F.mode=14;break;case 1:if(ne(F),F.mode=20,q!==6)break;xe>>>=2,D-=2;break e;case 2:F.mode=17;break;case 3:U.msg="invalid block type",F.mode=30}xe>>>=2,D-=2;break;case 14:for(xe>>>=7&D,D-=7&D;D<32;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if((65535&xe)!=(xe>>>16^65535)){U.msg="invalid stored block lengths",F.mode=30;break}if(F.length=65535&xe,D=xe=0,F.mode=15,q===6)break e;case 15:F.mode=16;case 16:if(te=F.length){if(ye<te&&(te=ye),_e<te&&(te=_e),te===0)break e;l.arraySet(ae,le,se,te,fe),ye-=te,se+=te,_e-=te,fe+=te,F.length-=te;break}F.mode=12;break;case 17:for(;D<14;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(F.nlen=257+(31&xe),xe>>>=5,D-=5,F.ndist=1+(31&xe),xe>>>=5,D-=5,F.ncode=4+(15&xe),xe>>>=4,D-=4,286<F.nlen||30<F.ndist){U.msg="too many length or distance symbols",F.mode=30;break}F.have=0,F.mode=18;case 18:for(;F.have<F.ncode;){for(;D<3;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.lens[G[F.have++]]=7&xe,xe>>>=3,D-=3}for(;F.have<19;)F.lens[G[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,W={bits:F.lenbits},ie=h(0,F.lens,0,19,F.lencode,0,F.work,W),F.lenbits=W.bits,ie){U.msg="invalid code lengths set",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have<F.nlen+F.ndist;){for(;re=(I=F.lencode[xe&(1<<F.lenbits)-1])>>>16&255,Ae=65535&I,!((H=I>>>24)<=D);){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(Ae<16)xe>>>=H,D-=H,F.lens[F.have++]=Ae;else{if(Ae===16){for(Q=H+2;D<Q;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(xe>>>=H,D-=H,F.have===0){U.msg="invalid bit length repeat",F.mode=30;break}z=F.lens[F.have-1],te=3+(3&xe),xe>>>=2,D-=2}else if(Ae===17){for(Q=H+3;D<Q;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}D-=H,z=0,te=3+(7&(xe>>>=H)),xe>>>=3,D-=3}else{for(Q=H+7;D<Q;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}D-=H,z=0,te=11+(127&(xe>>>=H)),xe>>>=7,D-=7}if(F.have+te>F.nlen+F.ndist){U.msg="invalid bit length repeat",F.mode=30;break}for(;te--;)F.lens[F.have++]=z}}if(F.mode===30)break;if(F.lens[256]===0){U.msg="invalid code -- missing end-of-block",F.mode=30;break}if(F.lenbits=9,W={bits:F.lenbits},ie=h(m,F.lens,0,F.nlen,F.lencode,0,F.work,W),F.lenbits=W.bits,ie){U.msg="invalid literal/lengths set",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,W={bits:F.distbits},ie=h(x,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,W),F.distbits=W.bits,ie){U.msg="invalid distances set",F.mode=30;break}if(F.mode=20,q===6)break e;case 20:F.mode=21;case 21:if(6<=ye&&258<=_e){U.next_out=fe,U.avail_out=_e,U.next_in=se,U.avail_in=ye,F.hold=xe,F.bits=D,u(U,X),fe=U.next_out,ae=U.output,_e=U.avail_out,se=U.next_in,le=U.input,ye=U.avail_in,xe=F.hold,D=F.bits,F.mode===12&&(F.back=-1);break}for(F.back=0;re=(I=F.lencode[xe&(1<<F.lenbits)-1])>>>16&255,Ae=65535&I,!((H=I>>>24)<=D);){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(re&&(240&re)==0){for(oe=H,ce=re,Se=Ae;re=(I=F.lencode[Se+((xe&(1<<oe+ce)-1)>>oe)])>>>16&255,Ae=65535&I,!(oe+(H=I>>>24)<=D);){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}xe>>>=oe,D-=oe,F.back+=oe}if(xe>>>=H,D-=H,F.back+=H,F.length=Ae,re===0){F.mode=26;break}if(32&re){F.back=-1,F.mode=12;break}if(64&re){U.msg="invalid literal/length code",F.mode=30;break}F.extra=15&re,F.mode=22;case 22:if(F.extra){for(Q=F.extra;D<Q;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.length+=xe&(1<<F.extra)-1,xe>>>=F.extra,D-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;re=(I=F.distcode[xe&(1<<F.distbits)-1])>>>16&255,Ae=65535&I,!((H=I>>>24)<=D);){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if((240&re)==0){for(oe=H,ce=re,Se=Ae;re=(I=F.distcode[Se+((xe&(1<<oe+ce)-1)>>oe)])>>>16&255,Ae=65535&I,!(oe+(H=I>>>24)<=D);){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}xe>>>=oe,D-=oe,F.back+=oe}if(xe>>>=H,D-=H,F.back+=H,64&re){U.msg="invalid distance code",F.mode=30;break}F.offset=Ae,F.extra=15&re,F.mode=24;case 24:if(F.extra){for(Q=F.extra;D<Q;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}F.offset+=xe&(1<<F.extra)-1,xe>>>=F.extra,D-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){U.msg="invalid distance too far back",F.mode=30;break}F.mode=25;case 25:if(_e===0)break e;if(te=X-_e,F.offset>te){if((te=F.offset-te)>F.whave&&F.sane){U.msg="invalid distance too far back",F.mode=30;break}J=te>F.wnext?(te-=F.wnext,F.wsize-te):F.wnext-te,te>F.length&&(te=F.length),O=F.window}else O=ae,J=fe-F.offset,te=F.length;for(_e<te&&(te=_e),_e-=te,F.length-=te;ae[fe++]=O[J++],--te;);F.length===0&&(F.mode=21);break;case 26:if(_e===0)break e;ae[fe++]=F.length,_e--,F.mode=21;break;case 27:if(F.wrap){for(;D<32;){if(ye===0)break e;ye--,xe|=le[se++]<<D,D+=8}if(X-=_e,U.total_out+=X,F.total+=X,X&&(U.adler=F.check=F.flags?c(F.check,ae,X,fe-X):d(F.check,ae,X,fe-X)),X=_e,(F.flags?xe:g(xe))!==F.check){U.msg="incorrect data check",F.mode=30;break}D=xe=0}F.mode=28;case 28:if(F.wrap&&F.flags){for(;D<32;){if(ye===0)break e;ye--,xe+=le[se++]<<D,D+=8}if(xe!==(4294967295&F.total)){U.msg="incorrect length check",F.mode=30;break}D=xe=0}F.mode=29;case 29:ie=1;break e;case 30:ie=-3;break e;case 31:return-4;default:return p}return U.next_out=fe,U.avail_out=_e,U.next_in=se,U.avail_in=ye,F.hold=xe,F.bits=D,(F.wsize||X!==U.avail_out&&F.mode<30&&(F.mode<27||q!==4))&&Z(U,U.output,U.next_out,X-U.avail_out)?(F.mode=31,-4):($-=U.avail_in,X-=U.avail_out,U.total_in+=$,U.total_out+=X,F.total+=X,F.wrap&&X&&(U.adler=F.check=F.flags?c(F.check,ae,X,U.next_out-X):d(F.check,ae,X,U.next_out-X)),U.data_type=F.bits+(F.last?64:0)+(F.mode===12?128:0)+(F.mode===20||F.mode===15?256:0),($==0&&X===0||q===4)&&ie===y&&(ie=-5),ie)},o.inflateEnd=function(U){if(!U||!U.state)return p;var q=U.state;return q.window&&(q.window=null),U.state=null,y},o.inflateGetHeader=function(U,q){var F;return U&&U.state?(2&(F=U.state).wrap)==0?p:((F.head=q).done=!1,y):p},o.inflateSetDictionary=function(U,q){var F,le=q.length;return U&&U.state?(F=U.state).wrap!==0&&F.mode!==11?p:F.mode===11&&d(1,q,le,0)!==F.check?-3:Z(U,q,le,le)?(F.mode=31,-4):(F.havedict=1,y):p},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,n,o){var l=s("../utils/common"),d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],c=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(m,x,y,p,v,N,B,g){var j,_,w,L,K,M,V,T,ne,Z=g.bits,U=0,q=0,F=0,le=0,ae=0,se=0,fe=0,ye=0,_e=0,xe=0,D=null,$=0,X=new l.Buf16(16),te=new l.Buf16(16),J=null,O=0;for(U=0;U<=15;U++)X[U]=0;for(q=0;q<p;q++)X[x[y+q]]++;for(ae=Z,le=15;1<=le&&X[le]===0;le--);if(le<ae&&(ae=le),le===0)return v[N++]=20971520,v[N++]=20971520,g.bits=1,0;for(F=1;F<le&&X[F]===0;F++);for(ae<F&&(ae=F),U=ye=1;U<=15;U++)if(ye<<=1,(ye-=X[U])<0)return-1;if(0<ye&&(m===0||le!==1))return-1;for(te[1]=0,U=1;U<15;U++)te[U+1]=te[U]+X[U];for(q=0;q<p;q++)x[y+q]!==0&&(B[te[x[y+q]]++]=q);if(M=m===0?(D=J=B,19):m===1?(D=d,$-=257,J=c,O-=257,256):(D=u,J=h,-1),U=F,K=N,fe=q=xe=0,w=-1,L=(_e=1<<(se=ae))-1,m===1&&852<_e||m===2&&592<_e)return 1;for(;;){for(V=U-fe,ne=B[q]<M?(T=0,B[q]):B[q]>M?(T=J[O+B[q]],D[$+B[q]]):(T=96,0),j=1<<U-fe,F=_=1<<se;v[K+(xe>>fe)+(_-=j)]=V<<24|T<<16|ne|0,_!==0;);for(j=1<<U-1;xe&j;)j>>=1;if(j!==0?(xe&=j-1,xe+=j):xe=0,q++,--X[U]==0){if(U===le)break;U=x[y+B[q]]}if(ae<U&&(xe&L)!==w){for(fe===0&&(fe=ae),K+=F,ye=1<<(se=U-fe);se+fe<le&&!((ye-=X[se+fe])<=0);)se++,ye<<=1;if(_e+=1<<se,m===1&&852<_e||m===2&&592<_e)return 1;v[w=xe&L]=ae<<24|se<<16|K-N|0}}return xe!==0&&(v[K+xe]=U-fe<<24|64<<16|0),g.bits=ae,0}},{"../utils/common":41}],51:[function(s,n,o){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,n,o){var l=s("../utils/common"),d=0,c=1;function u(I){for(var k=I.length;0<=--k;)I[k]=0}var h=0,m=29,x=256,y=x+1+m,p=30,v=19,N=2*y+1,B=15,g=16,j=7,_=256,w=16,L=17,K=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],V=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=new Array(2*(y+2));u(Z);var U=new Array(2*p);u(U);var q=new Array(512);u(q);var F=new Array(256);u(F);var le=new Array(m);u(le);var ae,se,fe,ye=new Array(p);function _e(I,k,G,me,be){this.static_tree=I,this.extra_bits=k,this.extra_base=G,this.elems=me,this.max_length=be,this.has_stree=I&&I.length}function xe(I,k){this.dyn_tree=I,this.max_code=0,this.stat_desc=k}function D(I){return I<256?q[I]:q[256+(I>>>7)]}function $(I,k){I.pending_buf[I.pending++]=255&k,I.pending_buf[I.pending++]=k>>>8&255}function X(I,k,G){I.bi_valid>g-G?(I.bi_buf|=k<<I.bi_valid&65535,$(I,I.bi_buf),I.bi_buf=k>>g-I.bi_valid,I.bi_valid+=G-g):(I.bi_buf|=k<<I.bi_valid&65535,I.bi_valid+=G)}function te(I,k,G){X(I,G[2*k],G[2*k+1])}function J(I,k){for(var G=0;G|=1&I,I>>>=1,G<<=1,0<--k;);return G>>>1}function O(I,k,G){var me,be,Ue=new Array(B+1),Re=0;for(me=1;me<=B;me++)Ue[me]=Re=Re+G[me-1]<<1;for(be=0;be<=k;be++){var He=I[2*be+1];He!==0&&(I[2*be]=J(Ue[He]++,He))}}function H(I){var k;for(k=0;k<y;k++)I.dyn_ltree[2*k]=0;for(k=0;k<p;k++)I.dyn_dtree[2*k]=0;for(k=0;k<v;k++)I.bl_tree[2*k]=0;I.dyn_ltree[2*_]=1,I.opt_len=I.static_len=0,I.last_lit=I.matches=0}function re(I){8<I.bi_valid?$(I,I.bi_buf):0<I.bi_valid&&(I.pending_buf[I.pending++]=I.bi_buf),I.bi_buf=0,I.bi_valid=0}function Ae(I,k,G,me){var be=2*k,Ue=2*G;return I[be]<I[Ue]||I[be]===I[Ue]&&me[k]<=me[G]}function oe(I,k,G){for(var me=I.heap[G],be=G<<1;be<=I.heap_len&&(be<I.heap_len&&Ae(k,I.heap[be+1],I.heap[be],I.depth)&&be++,!Ae(k,me,I.heap[be],I.depth));)I.heap[G]=I.heap[be],G=be,be<<=1;I.heap[G]=me}function ce(I,k,G){var me,be,Ue,Re,He=0;if(I.last_lit!==0)for(;me=I.pending_buf[I.d_buf+2*He]<<8|I.pending_buf[I.d_buf+2*He+1],be=I.pending_buf[I.l_buf+He],He++,me===0?te(I,be,k):(te(I,(Ue=F[be])+x+1,k),(Re=M[Ue])!==0&&X(I,be-=le[Ue],Re),te(I,Ue=D(--me),G),(Re=V[Ue])!==0&&X(I,me-=ye[Ue],Re)),He<I.last_lit;);te(I,_,k)}function Se(I,k){var G,me,be,Ue=k.dyn_tree,Re=k.stat_desc.static_tree,He=k.stat_desc.has_stree,Ve=k.stat_desc.elems,it=-1;for(I.heap_len=0,I.heap_max=N,G=0;G<Ve;G++)Ue[2*G]!==0?(I.heap[++I.heap_len]=it=G,I.depth[G]=0):Ue[2*G+1]=0;for(;I.heap_len<2;)Ue[2*(be=I.heap[++I.heap_len]=it<2?++it:0)]=1,I.depth[be]=0,I.opt_len--,He&&(I.static_len-=Re[2*be+1]);for(k.max_code=it,G=I.heap_len>>1;1<=G;G--)oe(I,Ue,G);for(be=Ve;G=I.heap[1],I.heap[1]=I.heap[I.heap_len--],oe(I,Ue,1),me=I.heap[1],I.heap[--I.heap_max]=G,I.heap[--I.heap_max]=me,Ue[2*be]=Ue[2*G]+Ue[2*me],I.depth[be]=(I.depth[G]>=I.depth[me]?I.depth[G]:I.depth[me])+1,Ue[2*G+1]=Ue[2*me+1]=be,I.heap[1]=be++,oe(I,Ue,1),2<=I.heap_len;);I.heap[--I.heap_max]=I.heap[1],(function(lt,ut){var Tt,mt,Ur,jt,_t,Dt,Gt=ut.dyn_tree,kt=ut.max_code,Fr=ut.stat_desc.static_tree,It=ut.stat_desc.has_stree,Pt=ut.stat_desc.extra_bits,Br=ut.stat_desc.extra_base,zt=ut.stat_desc.max_length,Bt=0;for(jt=0;jt<=B;jt++)lt.bl_count[jt]=0;for(Gt[2*lt.heap[lt.heap_max]+1]=0,Tt=lt.heap_max+1;Tt<N;Tt++)zt<(jt=Gt[2*Gt[2*(mt=lt.heap[Tt])+1]+1]+1)&&(jt=zt,Bt++),Gt[2*mt+1]=jt,kt<mt||(lt.bl_count[jt]++,_t=0,Br<=mt&&(_t=Pt[mt-Br]),Dt=Gt[2*mt],lt.opt_len+=Dt*(jt+_t),It&&(lt.static_len+=Dt*(Fr[2*mt+1]+_t)));if(Bt!==0){do{for(jt=zt-1;lt.bl_count[jt]===0;)jt--;lt.bl_count[jt]--,lt.bl_count[jt+1]+=2,lt.bl_count[zt]--,Bt-=2}while(0<Bt);for(jt=zt;jt!==0;jt--)for(mt=lt.bl_count[jt];mt!==0;)kt<(Ur=lt.heap[--Tt])||(Gt[2*Ur+1]!==jt&&(lt.opt_len+=(jt-Gt[2*Ur+1])*Gt[2*Ur],Gt[2*Ur+1]=jt),mt--)}})(I,k),O(Ue,it,I.bl_count)}function z(I,k,G){var me,be,Ue=-1,Re=k[1],He=0,Ve=7,it=4;for(Re===0&&(Ve=138,it=3),k[2*(G+1)+1]=65535,me=0;me<=G;me++)be=Re,Re=k[2*(me+1)+1],++He<Ve&&be===Re||(He<it?I.bl_tree[2*be]+=He:be!==0?(be!==Ue&&I.bl_tree[2*be]++,I.bl_tree[2*w]++):He<=10?I.bl_tree[2*L]++:I.bl_tree[2*K]++,Ue=be,it=(He=0)===Re?(Ve=138,3):be===Re?(Ve=6,3):(Ve=7,4))}function ie(I,k,G){var me,be,Ue=-1,Re=k[1],He=0,Ve=7,it=4;for(Re===0&&(Ve=138,it=3),me=0;me<=G;me++)if(be=Re,Re=k[2*(me+1)+1],!(++He<Ve&&be===Re)){if(He<it)for(;te(I,be,I.bl_tree),--He!=0;);else be!==0?(be!==Ue&&(te(I,be,I.bl_tree),He--),te(I,w,I.bl_tree),X(I,He-3,2)):He<=10?(te(I,L,I.bl_tree),X(I,He-3,3)):(te(I,K,I.bl_tree),X(I,He-11,7));Ue=be,it=(He=0)===Re?(Ve=138,3):be===Re?(Ve=6,3):(Ve=7,4)}}u(ye);var W=!1;function Q(I,k,G,me){X(I,(h<<1)+(me?1:0),3),(function(be,Ue,Re,He){re(be),$(be,Re),$(be,~Re),l.arraySet(be.pending_buf,be.window,Ue,Re,be.pending),be.pending+=Re})(I,k,G)}o._tr_init=function(I){W||((function(){var k,G,me,be,Ue,Re=new Array(B+1);for(be=me=0;be<m-1;be++)for(le[be]=me,k=0;k<1<<M[be];k++)F[me++]=be;for(F[me-1]=be,be=Ue=0;be<16;be++)for(ye[be]=Ue,k=0;k<1<<V[be];k++)q[Ue++]=be;for(Ue>>=7;be<p;be++)for(ye[be]=Ue<<7,k=0;k<1<<V[be]-7;k++)q[256+Ue++]=be;for(G=0;G<=B;G++)Re[G]=0;for(k=0;k<=143;)Z[2*k+1]=8,k++,Re[8]++;for(;k<=255;)Z[2*k+1]=9,k++,Re[9]++;for(;k<=279;)Z[2*k+1]=7,k++,Re[7]++;for(;k<=287;)Z[2*k+1]=8,k++,Re[8]++;for(O(Z,y+1,Re),k=0;k<p;k++)U[2*k+1]=5,U[2*k]=J(k,5);ae=new _e(Z,M,x+1,y,B),se=new _e(U,V,0,p,B),fe=new _e(new Array(0),T,0,v,j)})(),W=!0),I.l_desc=new xe(I.dyn_ltree,ae),I.d_desc=new xe(I.dyn_dtree,se),I.bl_desc=new xe(I.bl_tree,fe),I.bi_buf=0,I.bi_valid=0,H(I)},o._tr_stored_block=Q,o._tr_flush_block=function(I,k,G,me){var be,Ue,Re=0;0<I.level?(I.strm.data_type===2&&(I.strm.data_type=(function(He){var Ve,it=4093624447;for(Ve=0;Ve<=31;Ve++,it>>>=1)if(1&it&&He.dyn_ltree[2*Ve]!==0)return d;if(He.dyn_ltree[18]!==0||He.dyn_ltree[20]!==0||He.dyn_ltree[26]!==0)return c;for(Ve=32;Ve<x;Ve++)if(He.dyn_ltree[2*Ve]!==0)return c;return d})(I)),Se(I,I.l_desc),Se(I,I.d_desc),Re=(function(He){var Ve;for(z(He,He.dyn_ltree,He.l_desc.max_code),z(He,He.dyn_dtree,He.d_desc.max_code),Se(He,He.bl_desc),Ve=v-1;3<=Ve&&He.bl_tree[2*ne[Ve]+1]===0;Ve--);return He.opt_len+=3*(Ve+1)+5+5+4,Ve})(I),be=I.opt_len+3+7>>>3,(Ue=I.static_len+3+7>>>3)<=be&&(be=Ue)):be=Ue=G+5,G+4<=be&&k!==-1?Q(I,k,G,me):I.strategy===4||Ue===be?(X(I,2+(me?1:0),3),ce(I,Z,U)):(X(I,4+(me?1:0),3),(function(He,Ve,it,lt){var ut;for(X(He,Ve-257,5),X(He,it-1,5),X(He,lt-4,4),ut=0;ut<lt;ut++)X(He,He.bl_tree[2*ne[ut]+1],3);ie(He,He.dyn_ltree,Ve-1),ie(He,He.dyn_dtree,it-1)})(I,I.l_desc.max_code+1,I.d_desc.max_code+1,Re+1),ce(I,I.dyn_ltree,I.dyn_dtree)),H(I),me&&re(I)},o._tr_tally=function(I,k,G){return I.pending_buf[I.d_buf+2*I.last_lit]=k>>>8&255,I.pending_buf[I.d_buf+2*I.last_lit+1]=255&k,I.pending_buf[I.l_buf+I.last_lit]=255&G,I.last_lit++,k===0?I.dyn_ltree[2*G]++:(I.matches++,k--,I.dyn_ltree[2*(F[G]+x+1)]++,I.dyn_dtree[2*D(k)]++),I.last_lit===I.lit_bufsize-1},o._tr_align=function(I){X(I,2,3),te(I,_,Z),(function(k){k.bi_valid===16?($(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):8<=k.bi_valid&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)})(I)}},{"../utils/common":41}],53:[function(s,n,o){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(s,n,o){(function(l){(function(d,c){if(!d.setImmediate){var u,h,m,x,y=1,p={},v=!1,N=d.document,B=Object.getPrototypeOf&&Object.getPrototypeOf(d);B=B&&B.setTimeout?B:d,u={}.toString.call(d.process)==="[object process]"?function(w){rr.nextTick(function(){j(w)})}:(function(){if(d.postMessage&&!d.importScripts){var w=!0,L=d.onmessage;return d.onmessage=function(){w=!1},d.postMessage("","*"),d.onmessage=L,w}})()?(x="setImmediate$"+Math.random()+"$",d.addEventListener?d.addEventListener("message",_,!1):d.attachEvent("onmessage",_),function(w){d.postMessage(x+w,"*")}):d.MessageChannel?((m=new MessageChannel).port1.onmessage=function(w){j(w.data)},function(w){m.port2.postMessage(w)}):N&&"onreadystatechange"in N.createElement("script")?(h=N.documentElement,function(w){var L=N.createElement("script");L.onreadystatechange=function(){j(w),L.onreadystatechange=null,h.removeChild(L),L=null},h.appendChild(L)}):function(w){setTimeout(j,0,w)},B.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var L=new Array(arguments.length-1),K=0;K<L.length;K++)L[K]=arguments[K+1];var M={callback:w,args:L};return p[y]=M,u(y),y++},B.clearImmediate=g}function g(w){delete p[w]}function j(w){if(v)setTimeout(j,0,w);else{var L=p[w];if(L){v=!0;try{(function(K){var M=K.callback,V=K.args;switch(V.length){case 0:M();break;case 1:M(V[0]);break;case 2:M(V[0],V[1]);break;case 3:M(V[0],V[1],V[2]);break;default:M.apply(c,V)}})(L)}finally{g(w),v=!1}}}}function _(w){w.source===d&&typeof w.data=="string"&&w.data.indexOf(x)===0&&j(+w.data.slice(x.length))}})(typeof self>"u"?l===void 0?this:l:self)}).call(this,typeof Oo<"u"?Oo:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Eb)),Eb.exports}var uO=dO();const hO=d3(uO);var uh={exports:{}},Ub,YB;function fO(){if(YB)return Ub;YB=1;var r={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};function t(s){return s&&s.replace?s.replace(/([&"<>'])/g,function(n,o){return r[o]}):s}return Ub=t,Ub}var JB;function mO(){if(JB)return uh.exports;JB=1;var r=fO(),t=Vy().Stream,s=" ";function n(h,m){typeof m!="object"&&(m={indent:m});var x=m.stream?new t:null,y="",p=!1,v=m.indent?m.indent===!0?s:m.indent:"",N=!0;function B(L){N?rr.nextTick(L):L()}function g(L,K){if(K!==void 0&&(y+=K),L&&!p&&(x=x||new t,p=!0),L&&p){var M=y;B(function(){x.emit("data",M)}),y=""}}function j(L,K){c(g,d(L,v,v?1:0),K)}function _(){if(x){var L=y;B(function(){x.emit("data",L),x.emit("end"),x.readable=!1,x.emit("close")})}}function w(L){var K=L.encoding||"UTF-8",M={version:"1.0",encoding:K};L.standalone&&(M.standalone=L.standalone),j({"?xml":{_attr:M}}),y=y.replace("/>","?>")}return B(function(){N=!1}),m.declaration&&w(m.declaration),h&&h.forEach?h.forEach(function(L,K){var M;K+1===h.length&&(M=_),j(L,M)}):j(h,_),x?(x.readable=!0,x):y}function o(){var h=Array.prototype.slice.call(arguments),m={_elem:d(h)};return m.push=function(x){if(!this.append)throw new Error("not assigned to a parent!");var y=this,p=this._elem.indent;c(this.append,d(x,p,this._elem.icount+(p?1:0)),function(){y.append(!0)})},m.close=function(x){x!==void 0&&this.push(x),this.end&&this.end()},m}function l(h,m){return new Array(m||0).join(h||"")}function d(h,m,x){x=x||0;var y=l(m,x),p,v=h,N=!1;if(typeof h=="object"){var B=Object.keys(h);if(p=B[0],v=h[p],v&&v._elem)return v._elem.name=p,v._elem.icount=x,v._elem.indent=m,v._elem.indents=y,v._elem.interrupt=v,v._elem}var g=[],j=[],_;function w(L){var K=Object.keys(L);K.forEach(function(M){g.push(u(M,L[M]))})}switch(typeof v){case"object":if(v===null)break;v._attr&&w(v._attr),v._cdata&&j.push(("<![CDATA["+v._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),v.forEach&&(_=!1,j.push(""),v.forEach(function(L){if(typeof L=="object"){var K=Object.keys(L)[0];K=="_attr"?w(L._attr):j.push(d(L,m,x+1))}else j.pop(),_=!0,j.push(r(L))}),_||j.push(""));break;default:j.push(r(v))}return{name:p,interrupt:N,attributes:g,content:j,icount:x,indents:y,indent:m}}function c(h,m,x){if(typeof m!="object")return h(!1,m);var y=m.interrupt?1:m.content.length;function p(){for(;m.content.length;){var N=m.content.shift();if(N!==void 0){if(v(N))return;c(h,N)}}h(!1,(y>1?m.indents:"")+(m.name?"</"+m.name+">":"")+(m.indent&&!x?`
`:"")),x&&x()}function v(N){return N.interrupt?(N.interrupt.append=h,N.interrupt.end=p,N.interrupt=!1,h(!0),!0):!1}if(h(!1,m.indents+(m.name?"<"+m.name:"")+(m.attributes.length?" "+m.attributes.join(" "):"")+(y?m.name?">":"":m.name?"/>":"")+(m.indent&&y>1?`
`:"")),!y)return h(!1,m.indent?`
`:"");v(m)||p()}function u(h,m){return h+'="'+r(m)+'"'}return uh.exports=n,uh.exports.element=uh.exports.Element=o,uh.exports}var pO=mO();const Es=d3(pO),hh=0,Qb=32,xO=32,gO=(r,t)=>{const s=t.replace(/-/g,"");if(s.length!==xO)throw new Error(`Error: Cannot extract GUID from font filename: ${t}`);const o=s.replace(/(..)/g,"$1 ").trim().split(" ").map(u=>parseInt(u,16));o.reverse();const d=r.slice(hh,Qb).map((u,h)=>u^o[h%o.length]),c=new Uint8Array(hh+d.length+Math.max(0,r.length-Qb));return c.set(r.slice(0,hh)),c.set(d,hh),c.set(r.slice(Qb),hh+d.length),c};class bO{format(t,s={stack:[]}){const n=t.prepForXml(s);if(n)return n;throw Error("XMLComponent did not format correctly")}}class yO{replace(t,s,n){let o=t;return s.forEach((l,d)=>{o=o.replace(new RegExp(`{${l.fileName}}`,"g"),(n+d).toString())}),o}getMediaData(t,s){return s.Array.filter(n=>t.search(`{${n.fileName}}`)>0)}}class wO{replace(t,s){let n=t;for(const o of s)n=n.replace(new RegExp(`{${o.reference}-${o.instance}}`,"g"),o.numId.toString());return n}}class vO{constructor(){et(this,"formatter"),et(this,"imageReplacer"),et(this,"numberingReplacer"),this.formatter=new bO,this.imageReplacer=new yO,this.numberingReplacer=new wO}compile(t,s,n=[]){const o=new hO,l=this.xmlifyFile(t,s),d=new Map(Object.entries(l));for(const[,c]of d)if(Array.isArray(c))for(const u of c)o.file(u.path,u.data);else o.file(c.path,c.data);for(const c of n)o.file(c.path,c.data);for(const c of t.Media.Array)c.type!=="svg"?o.file(`word/media/${c.fileName}`,c.data):(o.file(`word/media/${c.fileName}`,c.data),o.file(`word/media/${c.fallback.fileName}`,c.fallback.data));for(const{data:c,name:u,fontKey:h}of t.FontTable.fontOptionsWithKey){const[m]=u.split(".");o.file(`word/fonts/${m}.odttf`,gO(c,h))}return o}xmlifyFile(t,s){const n=t.Document.Relationships.RelationshipCount+1,o=Es(this.formatter.format(t.Document.View,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),l=t.Comments.Relationships.RelationshipCount+1,d=Es(this.formatter.format(t.Comments,{viewWrapper:{View:t.Comments,Relationships:t.Comments.Relationships},file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(o,t.Media),u=this.imageReplacer.getMediaData(d,t.Media);return{Relationships:{data:(c.forEach((h,m)=>{t.Document.Relationships.createRelationship(n+m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),t.Document.Relationships.createRelationship(t.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),Es(this.formatter.format(t.Document.Relationships,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const h=this.imageReplacer.replace(o,c,n);return this.numberingReplacer.replace(h,t.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const h=Es(this.formatter.format(t.Styles,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(h,t.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:Es(this.formatter.format(t.CoreProperties,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:Es(this.formatter.format(t.Numbering,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:Es(this.formatter.format(t.FileRelationships,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:t.Headers.map((h,m)=>{const x=Es(this.formatter.format(h.View,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(x,t.Media).forEach((p,v)=>{h.Relationships.createRelationship(v,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${p.fileName}`)}),{data:Es(this.formatter.format(h.Relationships,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${m+1}.xml.rels`}}),FooterRelationships:t.Footers.map((h,m)=>{const x=Es(this.formatter.format(h.View,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(x,t.Media).forEach((p,v)=>{h.Relationships.createRelationship(v,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${p.fileName}`)}),{data:Es(this.formatter.format(h.Relationships,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${m+1}.xml.rels`}}),Headers:t.Headers.map((h,m)=>{const x=Es(this.formatter.format(h.View,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),y=this.imageReplacer.getMediaData(x,t.Media),p=this.imageReplacer.replace(x,y,0);return{data:this.numberingReplacer.replace(p,t.Numbering.ConcreteNumbering),path:`word/header${m+1}.xml`}}),Footers:t.Footers.map((h,m)=>{const x=Es(this.formatter.format(h.View,{viewWrapper:h,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),y=this.imageReplacer.getMediaData(x,t.Media),p=this.imageReplacer.replace(x,y,0);return{data:this.numberingReplacer.replace(p,t.Numbering.ConcreteNumbering),path:`word/footer${m+1}.xml`}}),ContentTypes:{data:Es(this.formatter.format(t.ContentTypes,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:Es(this.formatter.format(t.CustomProperties,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:Es(this.formatter.format(t.AppProperties,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:Es(this.formatter.format(t.FootNotes.View,{viewWrapper:t.FootNotes,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:Es(this.formatter.format(t.FootNotes.Relationships,{viewWrapper:t.FootNotes,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:Es(this.formatter.format(t.Settings,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{const h=this.imageReplacer.replace(d,u,l);return this.numberingReplacer.replace(h,t.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(u.forEach((h,m)=>{t.Comments.Relationships.createRelationship(l+m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),Es(this.formatter.format(t.Comments.Relationships,{viewWrapper:{View:t.Comments,Relationships:t.Comments.Relationships},file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}})),path:"word/_rels/comments.xml.rels"},FontTable:{data:Es(this.formatter.format(t.FontTable.View,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:Es(this.formatter.format(t.FontTable.Relationships,{viewWrapper:t.Document,file:t,stack:[]}),{indent:s,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const NO={WITH_2_BLANKS:" "},ZB=r=>r===!0?NO.WITH_2_BLANKS:r===!1?void 0:r,tC=class zd{static pack(t,s,n){return DT(this,arguments,function*(o,l,d,c=[]){return this.compiler.compile(o,ZB(d),c).generateAsync({type:l,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toString(t,s,n=[]){return zd.pack(t,"string",s,n)}static toBuffer(t,s,n=[]){return zd.pack(t,"nodebuffer",s,n)}static toBase64String(t,s,n=[]){return zd.pack(t,"base64",s,n)}static toBlob(t,s,n=[]){return zd.pack(t,"blob",s,n)}static toArrayBuffer(t,s,n=[]){return zd.pack(t,"arraybuffer",s,n)}static toStream(t,s,n=[]){const o=new cO.Stream;return this.compiler.compile(t,ZB(s),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(d=>{o.emit("data",d),o.emit("end")}),o}};et(tC,"compiler",new vO);let BO=tC;const mi=["#1d72f2","#10b981","#f59e0b","#ef4444","#8b5cf6"];function jO(){const r=Ce.useRef(null),[t,s]=Ce.useState(!1),{data:n}=dt({queryKey:["backup-clients-all"],queryFn:()=>ys.listClients()}),{data:o}=dt({queryKey:["backup-jobs"],queryFn:()=>ys.listJobs({limit:100})}),{data:l}=dt({queryKey:["storage-pools"],queryFn:()=>ys.listStoragePools()}),{data:d=[]}=dt({queryKey:["zfs-pools"],queryFn:()=>sn.listPools()}),{data:c=[]}=dt({queryKey:["repositories"],queryFn:()=>Xd.listRepositories()}),{data:u=[]}=dt({queryKey:["disks"],queryFn:()=>Xd.listDisks()}),{data:h=[]}=dt({queryKey:["object-storage-buckets"],queryFn:()=>Ea.listBuckets()}),{data:m=[]}=dt({queryKey:["object-storage-users"],queryFn:()=>Ea.listUsers()}),x=n?.clients||[],y=o?.jobs||[],p=l?.pools||[],v=x.length,N=x.filter(X=>X.category==="File"||!X.category).length,B=x.filter(X=>X.category==="Database").length,g=x.filter(X=>X.category==="Virtual").length,j=y.length,_=y.filter(X=>X.status==="Completed").length,w=y.filter(X=>X.status==="Failed").length,L=y.filter(X=>X.status==="Running").length,K=p.reduce((X,te)=>X+(te.total_bytes||0),0),M=p.reduce((X,te)=>X+(te.used_bytes||0),0),V=K>0?M/K*100:0,T=d.reduce((X,te)=>X+(te.size_bytes||0),0),ne=d.reduce((X,te)=>X+(te.used_bytes||0),0),Z=T>0?ne/T*100:0,U=h.reduce((X,te)=>X+(te.size||0),0),q=h.reduce((X,te)=>X+(te.objects||0),0),F=h.filter(X=>X.access_policy!=="private").length,le=h.filter(X=>X.access_policy==="private").length,ae=[{name:"Filesystem",value:N,color:mi[0]},{name:"Database",value:B,color:mi[1]},{name:"Virtualization",value:g,color:mi[2]}],se=[{name:"Successful",value:_,color:mi[1]},{name:"Failed",value:w,color:mi[3]},{name:"Running",value:L,color:mi[0]},{name:"Other",value:j-_-w-L,color:mi[4]}],fe=[{name:"Backup Storage",value:K,used:M,color:mi[0]},{name:"ZFS Storage",value:T,used:ne,color:mi[1]},{name:"Object Storage",value:U,used:U,color:mi[2]}],ye=[{name:"Private",value:le,color:mi[3]},{name:"Public",value:F,color:mi[1]}],_e=[],xe=new Date;for(let X=5;X>=0;X--){const J=new Date(xe.getFullYear(),xe.getMonth()-X,1).toLocaleDateString("en-US",{month:"short"});_e.push({month:J,backups:Math.floor(Math.random()*50)+20,size:Math.floor(Math.random()*500)+200})}const D=async()=>{if(r.current){s(!0);try{const X=await c3(r.current,{scale:2,useCORS:!0,logging:!1}),te=X.toDataURL("image/png"),J=new Ft("p","mm","a4"),O=J.internal.pageSize.getWidth(),H=J.internal.pageSize.getHeight(),re=X.width,Ae=X.height,oe=Math.min(O/re,H/Ae),ce=re*oe,Se=Ae*oe,z=(O-ce)/2,ie=(H-Se)/2;J.addImage(te,"PNG",z,ie,ce,Se);const W=Math.ceil(Se/H);if(W>1)for(let Q=1;Q<W;Q++){J.addPage();const I=-(Q*H-ie);J.addImage(te,"PNG",z,I,ce,Se)}J.save(`calypso-executive-report-${new Date().toISOString().split("T")[0]}.pdf`)}catch(X){console.error("Error exporting to PDF:",X),alert("Failed to export PDF. Please try again.")}finally{s(!1)}}},$=async()=>{s(!0);try{const X=new AO({sections:[{properties:{},children:[new qt({text:"Calypso Executive Dashboard Report",heading:hc.TITLE,alignment:xi.CENTER}),new qt({text:`Generated on ${new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}`,alignment:xi.CENTER}),new qt({text:""}),new qt({text:"Executive Summary",heading:hc.HEADING_1}),new qt({children:[new Xt({text:"Total Clients: ",bold:!0}),new Xt({text:`${v}`})]}),new qt({children:[new Xt({text:"Total Backup Jobs: ",bold:!0}),new Xt({text:`${j}`})]}),new qt({children:[new Xt({text:"Success Rate: ",bold:!0}),new Xt({text:`${j>0?(_/j*100).toFixed(2):0}%`})]}),new qt({children:[new Xt({text:"Backup Storage Utilization: ",bold:!0}),new Xt({text:`${V.toFixed(2)}%`})]}),new qt({children:[new Xt({text:"ZFS Storage Utilization: ",bold:!0}),new Xt({text:`${Z.toFixed(2)}%`})]}),new qt({children:[new Xt({text:"Object Storage Buckets: ",bold:!0}),new Xt({text:`${h.length}`})]}),new qt({children:[new Xt({text:"Total Objects: ",bold:!0}),new Xt({text:`${q}`})]}),new qt({text:""}),new qt({text:"Client Distribution",heading:hc.HEADING_1}),new KB({width:{size:100,type:Mh.PERCENTAGE},rows:[new Um({children:[new To({children:[new qt("Category")]}),new To({children:[new qt("Count")]})]}),...ae.map(H=>new Um({children:[new To({children:[new qt(H.name)]}),new To({children:[new qt(H.value.toString())]})]}))]}),new qt({text:""}),new qt({text:"Backup Job Status",heading:hc.HEADING_1}),new KB({width:{size:100,type:Mh.PERCENTAGE},rows:[new Um({children:[new To({children:[new qt("Status")]}),new To({children:[new qt("Count")]})]}),...se.map(H=>new Um({children:[new To({children:[new qt(H.name)]}),new To({children:[new qt(H.value.toString())]})]}))]}),new qt({text:""}),new qt({text:"Backup Storage Information",heading:hc.HEADING_1}),new qt({children:[new Xt({text:"Total Storage Pools: ",bold:!0}),new Xt({text:`${p.length}`})]}),new qt({children:[new Xt({text:"Total Capacity: ",bold:!0}),new Xt({text:`${(K/1073741824).toFixed(2)} GB`})]}),new qt({children:[new Xt({text:"Used Storage: ",bold:!0}),new Xt({text:`${(M/1073741824).toFixed(2)} GB`})]}),new qt({children:[new Xt({text:"Available Storage: ",bold:!0}),new Xt({text:`${((K-M)/1073741824).toFixed(2)} GB`})]}),new qt({text:""}),new qt({text:"ZFS Storage Information",heading:hc.HEADING_1}),new qt({children:[new Xt({text:"Total ZFS Pools: ",bold:!0}),new Xt({text:`${d.length}`})]}),new qt({children:[new Xt({text:"Total Repositories: ",bold:!0}),new Xt({text:`${c.length}`})]}),new qt({children:[new Xt({text:"Total Physical Disks: ",bold:!0}),new Xt({text:`${u.length}`})]}),new qt({children:[new Xt({text:"Total Capacity: ",bold:!0}),new Xt({text:`${(T/1073741824).toFixed(2)} GB`})]}),new qt({children:[new Xt({text:"Used Storage: ",bold:!0}),new Xt({text:`${(ne/1073741824).toFixed(2)} GB`})]}),new qt({text:""}),new qt({text:"Object Storage Information",heading:hc.HEADING_1}),new qt({children:[new Xt({text:"Total Buckets: ",bold:!0}),new Xt({text:`${h.length}`})]}),new qt({children:[new Xt({text:"Total Objects: ",bold:!0}),new Xt({text:`${q}`})]}),new qt({children:[new Xt({text:"Total Storage: ",bold:!0}),new Xt({text:`${(U/1073741824).toFixed(2)} GB`})]}),new qt({children:[new Xt({text:"Total Users: ",bold:!0}),new Xt({text:`${m.length}`})]}),new qt({children:[new Xt({text:"Private Buckets: ",bold:!0}),new Xt({text:`${le}`})]}),new qt({children:[new Xt({text:"Public Buckets: ",bold:!0}),new Xt({text:`${F}`})]})]}]}),te=await BO.toBlob(X),J=window.URL.createObjectURL(te),O=document.createElement("a");O.href=J,O.download=`calypso-executive-report-${new Date().toISOString().split("T")[0]}.docx`,O.click(),window.URL.revokeObjectURL(J)}catch(X){console.error("Error exporting to Word:",X),alert("Failed to export Word document. Please try again.")}finally{s(!1)}};return e.jsx("div",{className:"flex-1 overflow-y-auto bg-background-dark p-6",children:e.jsxs("div",{className:"max-w-[1600px] mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-white",children:"Executive Dashboard"}),e.jsx("p",{className:"text-slate-400 mt-1",children:"Comprehensive overview of backup operations and system health"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:D,disabled:t,className:"flex items-center gap-2 px-4 py-2 bg-primary hover:bg-primary/90 text-white rounded-lg font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(R6,{className:"w-4 h-4"}),t?"Exporting...":"Export PDF"]}),e.jsxs("button",{onClick:$,disabled:t,className:"flex items-center gap-2 px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(A4,{className:"w-4 h-4"}),t?"Exporting...":"Export Word"]})]})]}),e.jsxs("div",{ref:r,className:"bg-white dark:bg-slate-900 rounded-xl p-8 space-y-8",children:[e.jsxs("div",{className:"text-center border-b pb-6",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white",children:"Calypso Executive Dashboard Report"}),e.jsxs("p",{className:"text-slate-600 dark:text-slate-400 mt-2",children:["Generated on ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"Total Clients"}),e.jsx("div",{className:"text-3xl font-bold text-slate-900 dark:text-white mt-2",children:v}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[N," Filesystem • ",B," Database • ",g," Virtualization"]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"Total Jobs"}),e.jsx("div",{className:"text-3xl font-bold text-slate-900 dark:text-white mt-2",children:j}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[_," Successful • ",w," Failed • ",L," Running"]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"Success Rate"}),e.jsxs("div",{className:"text-3xl font-bold text-emerald-600 mt-2",children:[j>0?(_/j*100).toFixed(1):0,"%"]}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Based on ",j," total jobs"]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"Backup Storage Utilization"}),e.jsxs("div",{className:"text-3xl font-bold text-slate-900 dark:text-white mt-2",children:[V.toFixed(1),"%"]}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[(M/1024**3).toFixed(2)," GB / ",(K/1024**3).toFixed(2)," GB"]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"ZFS Storage Utilization"}),e.jsxs("div",{className:"text-3xl font-bold text-slate-900 dark:text-white mt-2",children:[Z.toFixed(1),"%"]}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[(ne/1024**3).toFixed(2)," GB / ",(T/1024**3).toFixed(2)," GB"]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("div",{className:"text-sm text-slate-600 dark:text-slate-400 font-medium",children:"Object Storage Buckets"}),e.jsx("div",{className:"text-3xl font-bold text-slate-900 dark:text-white mt-2",children:h.length}),e.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[q," Objects • ",(U/1024**3).toFixed(2)," GB"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Client Distribution"}),e.jsx(Cl,{width:"100%",height:300,children:e.jsxs(Nv,{children:[e.jsx(Bv,{data:ae,cx:"50%",cy:"50%",labelLine:!1,label:({name:X,percent:te})=>`${X}: ${(te*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:ae.map((X,te)=>e.jsx(Yx,{fill:X.color},`cell-${te}`))}),e.jsx(Sl,{})]})})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Job Status Distribution"}),e.jsx(Cl,{width:"100%",height:300,children:e.jsxs(jv,{data:se,children:[e.jsx(Nc,{strokeDasharray:"3 3"}),e.jsx(Bc,{dataKey:"name"}),e.jsx(jc,{}),e.jsx(Sl,{}),e.jsx(Jx,{dataKey:"value",fill:"#1d72f2",children:se.map((X,te)=>e.jsx(Yx,{fill:X.color},`cell-${te}`))})]})})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Storage Distribution"}),e.jsx(Cl,{width:"100%",height:300,children:e.jsxs(jv,{data:fe,children:[e.jsx(Nc,{strokeDasharray:"3 3"}),e.jsx(Bc,{dataKey:"name"}),e.jsx(jc,{}),e.jsx(Sl,{formatter:X=>`${(X/1024**3).toFixed(2)} GB`}),e.jsx(Qh,{}),e.jsx(Jx,{dataKey:"value",fill:"#1d72f2",name:"Total"}),e.jsx(Jx,{dataKey:"used",fill:"#10b981",name:"Used"})]})})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Object Storage Bucket Access"}),e.jsx(Cl,{width:"100%",height:300,children:e.jsxs(Nv,{children:[e.jsx(Bv,{data:ye,cx:"50%",cy:"50%",labelLine:!1,label:({name:X,percent:te})=>`${X}: ${(te*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:ye.map((X,te)=>e.jsx(Yx,{fill:X.color},`cell-${te}`))}),e.jsx(Sl,{})]})})]})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Monthly Backup Trend"}),e.jsx(Cl,{width:"100%",height:300,children:e.jsxs(ky,{data:_e,children:[e.jsx(Nc,{strokeDasharray:"3 3"}),e.jsx(Bc,{dataKey:"month"}),e.jsx(jc,{}),e.jsx(Sl,{}),e.jsx(Qh,{}),e.jsx(Lh,{type:"monotone",dataKey:"backups",stroke:"#1d72f2",name:"Number of Backups"}),e.jsx(Lh,{type:"monotone",dataKey:"size",stroke:"#10b981",name:"Size (GB)"})]})})]}),e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Backup Storage Pools"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-300 dark:border-slate-700",children:[e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Pool Name"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Total Size"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Used"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Available"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Utilization"})]})}),e.jsx("tbody",{children:p.map(X=>{const te=(X.total_bytes||0)/1073741824,J=(X.used_bytes||0)/1024**3,O=te-J,H=te>0?J/te*100:0;return e.jsxs("tr",{className:"border-b border-slate-200 dark:border-slate-700",children:[e.jsx("td",{className:"py-2 text-sm text-slate-900 dark:text-white",children:X.name}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[te.toFixed(2)," GB"]}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[J.toFixed(2)," GB"]}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[O.toFixed(2)," GB"]}),e.jsx("td",{className:"py-2 text-sm",children:e.jsxs("span",{className:`font-medium ${H>80?"text-red-600":H>60?"text-amber-600":"text-emerald-600"}`,children:[H.toFixed(1),"%"]})})]},X.pool_id)})})]})})]}),d.length>0&&e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"ZFS Storage Pools"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-300 dark:border-slate-700",children:[e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Pool Name"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Total Size"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Used"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Available"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Utilization"})]})}),e.jsx("tbody",{children:d.map(X=>{const te=(X.size_bytes||0)/1073741824,J=(X.used_bytes||0)/1024**3,O=te-J,H=te>0?J/te*100:0;return e.jsxs("tr",{className:"border-b border-slate-200 dark:border-slate-700",children:[e.jsx("td",{className:"py-2 text-sm text-slate-900 dark:text-white",children:X.name}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[te.toFixed(2)," GB"]}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[J.toFixed(2)," GB"]}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[O.toFixed(2)," GB"]}),e.jsx("td",{className:"py-2 text-sm",children:e.jsxs("span",{className:`font-medium ${H>80?"text-red-600":H>60?"text-amber-600":"text-emerald-600"}`,children:[H.toFixed(1),"%"]})})]},X.id)})})]})})]}),h.length>0&&e.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-6 border border-slate-200 dark:border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4",children:"Object Storage Buckets"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-300 dark:border-slate-700",children:[e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Bucket Name"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Size"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Objects"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Access Policy"}),e.jsx("th",{className:"pb-2 text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Created"})]})}),e.jsx("tbody",{children:h.map(X=>{const te=(X.size||0)/1073741824;return e.jsxs("tr",{className:"border-b border-slate-200 dark:border-slate-700",children:[e.jsx("td",{className:"py-2 text-sm text-slate-900 dark:text-white",children:X.name}),e.jsxs("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:[te.toFixed(2)," GB"]}),e.jsx("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:X.objects||0}),e.jsx("td",{className:"py-2 text-sm",children:e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${X.access_policy==="private"?"bg-red-500/10 text-red-600":X.access_policy==="public-read"?"bg-amber-500/10 text-amber-600":"bg-emerald-500/10 text-emerald-600"}`,children:X.access_policy})}),e.jsx("td",{className:"py-2 text-sm text-slate-600 dark:text-slate-400",children:new Date(X.creation_date).toLocaleDateString()})]},X.name)})})]})})]})]})]})})}typeof window<"u"&&window.addEventListener("storage",()=>{window.dispatchEvent(new Event("avatar-updated"))});function CO(){const{user:r,clearAuth:t}=hu(),s=Ph(),n=Cy(),[o,l]=Ce.useState(!1),[d,c]=Ce.useState(0);Ce.useEffect(()=>{const v=()=>{c(N=>N+1)};return window.addEventListener("avatar-updated",v),window.addEventListener("storage",v),()=>{window.removeEventListener("avatar-updated",v),window.removeEventListener("storage",v)}},[]);const[u,h]=Ce.useState(!0);Ce.useEffect(()=>{const v=()=>{window.innerWidth>=1024?l(!0):l(!1)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const m=()=>{t(),s("/login")},x=[{name:"Dashboard",href:"/backup",icon:wv,exact:!0},{name:"Jobs",href:"/backup?tab=jobs",icon:vv},{name:"Clients",href:"/backup?tab=clients",icon:M6},{name:"Storage",href:"/backup?tab=storage",icon:Ul},{name:"Console",href:"/backup?tab=console",icon:Uh}],y=[{name:"Dashboard",href:"/",icon:wv},{name:"Storage",href:"/storage",icon:Ul},{name:"Object Storage",href:"/object-storage",icon:O6},{name:"Shares",href:"/shares",icon:Ib},{name:"Snapshots & Replication",href:"/snapshots",icon:Tm},{name:"Tape Libraries",href:"/tape",icon:_y},{name:"iSCSI Management",href:"/iscsi",icon:ya},{name:"Backup Management",href:"/backup",icon:vv,hasSubMenu:!0},{name:"Terminal Console",href:"/terminal",icon:Uh},{name:"Share Shield",href:"/share-shield",icon:Bn},{name:"Monitoring & Logs",href:"/monitoring",icon:Wm},{name:"Alerts",href:"/alerts",icon:Lb},{name:"System",href:"/system",icon:Tb},{name:"Reporting",href:"/reporting",icon:H6}];r?.roles.includes("admin")&&y.push({name:"User Management",href:"/iam",icon:Vd}),Ce.useEffect(()=>{n.pathname.startsWith("/backup")&&h(!0)},[n.pathname]);const p=v=>v==="/"?n.pathname==="/":n.pathname.startsWith(v);return e.jsxs("div",{className:"h-screen bg-background-dark flex overflow-hidden",children:[o&&e.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>l(!1)}),e.jsx("div",{className:`fixed inset-y-0 left-0 z-50 w-64 bg-background-dark border-r border-border-dark text-white transition-transform duration-300 ${o?"translate-x-0":"-translate-x-full"}`,children:e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border-dark",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:"/logo.png",alt:"Calypso Logo",className:"w-10 h-10 object-contain",onError:v=>{const N=v.target;N.style.display="none";const B=N.nextElementSibling;B&&(B.style.display="flex")}}),e.jsx("div",{className:"w-10 h-10 bg-primary rounded-lg flex items-center justify-center hidden",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"C"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h1",{className:"text-xl font-black text-white font-display tracking-tight",children:"Calypso"}),e.jsx("p",{className:"text-[10px] text-text-secondary leading-tight",children:"Dev Release V.1"})]})]}),e.jsx("button",{onClick:()=>l(!1),className:"lg:hidden text-text-secondary hover:text-white transition-colors",children:e.jsx(yv,{className:"h-5 w-5"})})]}),e.jsx("nav",{className:"flex-1 px-3 py-4 space-y-1 overflow-y-auto custom-scrollbar",children:y.map(v=>{const N=v.icon,B=p(v.href),g=v.name==="Backup Management",j=n.pathname.startsWith("/backup");return g&&v.hasSubMenu?e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>h(!u),className:`w-full flex items-center gap-3 px-4 py-2.5 rounded-lg transition-all ${j?"bg-primary/20 text-primary border-l-2 border-primary":"text-text-secondary hover:bg-card-dark hover:text-white"}`,children:[e.jsx(N,{className:`h-5 w-5 ${j?"text-primary":""}`}),e.jsx("span",{className:`text-sm font-medium flex-1 text-left ${j?"font-semibold":""}`,children:v.name}),e.jsx(Ka,{className:`h-4 w-4 transition-transform ${u?"rotate-90":""}`})]}),u&&e.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l-2 border-border-dark pl-4",children:x.map(_=>{const w=_.icon,L=new URLSearchParams(n.search).get("tab");let K=!1;if(_.exact)K=n.pathname==="/backup"&&(!L||L==="dashboard");else{const M=_.href.split("tab=")[1];K=n.pathname==="/backup"&&L===M}return e.jsxs(ba,{to:_.href,className:`flex items-center gap-3 px-3 py-2 rounded-lg transition-all ${K?"bg-primary/10 text-primary":"text-text-secondary hover:bg-card-dark hover:text-white"}`,children:[e.jsx(w,{className:`h-4 w-4 ${K?"text-primary":""}`}),e.jsx("span",{className:`text-sm ${K?"font-semibold":"font-medium"}`,children:_.name})]},_.name)})})]},v.name):e.jsxs(ba,{to:v.href,className:`flex items-center gap-3 px-4 py-2.5 rounded-lg transition-all ${B?"bg-primary/20 text-primary border-l-2 border-primary":"text-text-secondary hover:bg-card-dark hover:text-white"}`,children:[e.jsx(N,{className:`h-5 w-5 ${B?"text-primary":""}`}),e.jsx("span",{className:`text-sm font-medium ${B?"font-semibold":""}`,children:v.name})]},v.name)})}),e.jsxs("div",{className:"p-4 border-t border-border-dark bg-[#0d1419]",children:[e.jsx(ba,{to:"/profile",className:"mb-3 px-2 py-2 rounded-lg hover:bg-card-dark transition-colors block",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white text-sm font-bold flex-shrink-0 overflow-hidden",children:(()=>{const v=localStorage.getItem(`avatar_${r?.id}`);if(v)return e.jsxs(e.Fragment,{children:[e.jsx("img",{src:v,alt:r?.username||"User",className:"w-full h-full object-cover",onError:B=>{const g=B.target;g.style.display="none";const j=g.nextElementSibling;j&&(j.style.display="flex")}}),e.jsx("span",{className:"hidden",children:r?.full_name?r.full_name.split(" ").map(B=>B[0]).join("").substring(0,2).toUpperCase():r?.username?.substring(0,2).toUpperCase()||"U"})]});const N=r?.full_name?r.full_name.split(" ").map(B=>B[0]).join("").substring(0,2).toUpperCase():r?.username?.substring(0,2).toUpperCase()||"U";return e.jsx("span",{children:N})})()},d),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-white mb-0.5 truncate",children:r?.username}),e.jsx("p",{className:"text-xs text-text-secondary font-mono",children:r?.roles.join(", ").toUpperCase()})]})]})}),e.jsxs("button",{onClick:m,className:"w-full flex items-center gap-2 px-4 py-2.5 rounded-lg text-text-secondary hover:bg-card-dark hover:text-white transition-colors border border-border-dark",children:[e.jsx(P6,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm font-medium",children:"Logout"})]})]})]})}),e.jsxs("div",{className:`transition-all duration-300 flex-1 flex flex-col overflow-hidden ${o?"lg:ml-64":"ml-0"} bg-background-dark`,children:[e.jsx("div",{className:"flex-none lg:hidden bg-background-dark border-b border-border-dark px-4 py-3",children:e.jsx("button",{onClick:()=>l(!0),className:"text-text-secondary hover:text-white transition-colors","aria-label":"Open menu",children:e.jsx(yv,{className:"h-6 w-6"})})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsx(f6,{})})]})]})}const SO=new A6({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:300*1e3}}});function _O({children:r}){const{isAuthenticated:t}=hu();return t?e.jsx(e.Fragment,{children:r}):e.jsx(x6,{to:"/login",replace:!0})}function kO(){return e.jsx(c6,{client:SO,children:e.jsxs(m6,{children:[e.jsxs(p6,{children:[e.jsx(Fs,{path:"/login",element:e.jsx(rS,{})}),e.jsxs(Fs,{path:"/",element:e.jsx(_O,{children:e.jsx(CO,{})}),children:[e.jsx(Fs,{index:!0,element:e.jsx(aS,{})}),e.jsx(Fs,{path:"storage",element:e.jsx(iS,{})}),e.jsx(Fs,{path:"tape",element:e.jsx(uS,{})}),e.jsx(Fs,{path:"tape/vtl/:id",element:e.jsx(hS,{})}),e.jsx(Fs,{path:"iscsi",element:e.jsx(mS,{})}),e.jsx(Fs,{path:"iscsi/:id",element:e.jsx(kS,{})}),e.jsx(Fs,{path:"backup",element:e.jsx(IS,{})}),e.jsx(Fs,{path:"bacula/clients",element:e.jsx(JS,{})}),e.jsx(Fs,{path:"shares",element:e.jsx($S,{})}),e.jsx(Fs,{path:"terminal",element:e.jsx(ZS,{})}),e.jsx(Fs,{path:"object-storage",element:e.jsx(u_,{})}),e.jsx(Fs,{path:"snapshots",element:e.jsx(m_,{})}),e.jsx(Fs,{path:"share-shield",element:e.jsx(x_,{})}),e.jsx(Fs,{path:"monitoring",element:e.jsx(A_,{})}),e.jsx(Fs,{path:"alerts",element:e.jsx(cS,{})}),e.jsx(Fs,{path:"system",element:e.jsx(US,{})}),e.jsx(Fs,{path:"iam",element:e.jsx(e_,{})}),e.jsx(Fs,{path:"profile",element:e.jsx(Uv,{})}),e.jsx(Fs,{path:"profile/:id",element:e.jsx(Uv,{})}),e.jsx(Fs,{path:"reporting",element:e.jsx(jO,{})})]})]}),e.jsx(X6,{})]})})}W6.createRoot(document.getElementById("root")).render(e.jsx($B.StrictMode,{children:e.jsx(kO,{})}));
//# sourceMappingURL=index-ChZMKDzx.js.map