memctx 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/html2canvas.esm-DXEQVQnt.js +5 -0
- package/dashboard/dist/assets/index-dFfiO3rw.js +136 -0
- package/dashboard/dist/assets/index-gazvDspk.css +1 -0
- package/dashboard/dist/assets/index.es-Dqk41Tqn.js +5 -0
- package/dashboard/dist/assets/jszip.min-DxDw9jtU.js +2 -0
- package/dashboard/dist/assets/purify.es-CovBOfck.js +2 -0
- package/dashboard/dist/index.html +14 -0
- package/dist/bin/claudectx.js +1 -1
- package/dist/bin/claudectx.js.map +1 -1
- package/dist/src/config.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
function uy(t,n){for(var a=0;a<n.length;a++){const s=n[a];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in t)){const u=Object.getOwnPropertyDescriptor(s,o);u&&Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();var i_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s1={exports:{}},Zc={};var S2;function cy(){if(S2)return Zc;S2=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(s,o,u){var h=null;if(u!==void 0&&(h=""+u),o.key!==void 0&&(h=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:t,type:s,key:h,ref:o!==void 0?o:null,props:u}}return Zc.Fragment=n,Zc.jsx=a,Zc.jsxs=a,Zc}var _2;function fy(){return _2||(_2=1,s1.exports=cy()),s1.exports}var g=fy(),o1={exports:{}},Yt={};var A2;function dy(){if(A2)return Yt;A2=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),h=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),_=Symbol.iterator;function j(H){return H===null||typeof H!="object"?null:(H=_&&H[_]||H["@@iterator"],typeof H=="function"?H:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,T={};function D(H,oe,L){this.props=H,this.context=oe,this.refs=T,this.updater=L||w}D.prototype.isReactComponent={},D.prototype.setState=function(H,oe){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,oe,"setState")},D.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function C(){}C.prototype=D.prototype;function K(H,oe,L){this.props=H,this.context=oe,this.refs=T,this.updater=L||w}var W=K.prototype=new C;W.constructor=K,k(W,D.prototype),W.isPureReactComponent=!0;var F=Array.isArray,$={H:null,A:null,T:null,S:null,V:null},Le=Object.prototype.hasOwnProperty;function ke(H,oe,L,q,V,te){return L=te.ref,{$$typeof:t,type:H,key:oe,ref:L!==void 0?L:null,props:te}}function se(H,oe){return ke(H.type,oe,void 0,void 0,void 0,H.props)}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function pe(H){var oe={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(L){return oe[L]})}var O=/\/+/g;function U(H,oe){return typeof H=="object"&&H!==null&&H.key!=null?pe(""+H.key):oe.toString(36)}function G(){}function ne(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(G,G):(H.status="pending",H.then(function(oe){H.status==="pending"&&(H.status="fulfilled",H.value=oe)},function(oe){H.status==="pending"&&(H.status="rejected",H.reason=oe)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function Se(H,oe,L,q,V){var te=typeof H;(te==="undefined"||te==="boolean")&&(H=null);var ae=!1;if(H===null)ae=!0;else switch(te){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(H.$$typeof){case t:case n:ae=!0;break;case y:return ae=H._init,Se(ae(H._payload),oe,L,q,V)}}if(ae)return V=V(H),ae=q===""?"."+U(H,0):q,F(V)?(L="",ae!=null&&(L=ae.replace(O,"$&/")+"/"),Se(V,oe,L,"",function(Ee){return Ee})):V!=null&&(J(V)&&(V=se(V,L+(V.key==null||H&&H.key===V.key?"":(""+V.key).replace(O,"$&/")+"/")+ae)),oe.push(V)),1;ae=0;var me=q===""?".":q+":";if(F(H))for(var _e=0;_e<H.length;_e++)q=H[_e],te=me+U(q,_e),ae+=Se(q,oe,L,te,V);else if(_e=j(H),typeof _e=="function")for(H=_e.call(H),_e=0;!(q=H.next()).done;)q=q.value,te=me+U(q,_e++),ae+=Se(q,oe,L,te,V);else if(te==="object"){if(typeof H.then=="function")return Se(ne(H),oe,L,q,V);throw oe=String(H),Error("Objects are not valid as a React child (found: "+(oe==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":oe)+"). If you meant to render a collection of children, use an array instead.")}return ae}function ee(H,oe,L){if(H==null)return H;var q=[],V=0;return Se(H,q,"","",function(te){return oe.call(L,te,V++)}),q}function ce(H){if(H._status===-1){var oe=H._result;oe=oe(),oe.then(function(L){(H._status===0||H._status===-1)&&(H._status=1,H._result=L)},function(L){(H._status===0||H._status===-1)&&(H._status=2,H._result=L)}),H._status===-1&&(H._status=0,H._result=oe)}if(H._status===1)return H._result.default;throw H._result}var le=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var oe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(oe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)};function Ne(){}return Yt.Children={map:ee,forEach:function(H,oe,L){ee(H,function(){oe.apply(this,arguments)},L)},count:function(H){var oe=0;return ee(H,function(){oe++}),oe},toArray:function(H){return ee(H,function(oe){return oe})||[]},only:function(H){if(!J(H))throw Error("React.Children.only expected to receive a single React element child.");return H}},Yt.Component=D,Yt.Fragment=a,Yt.Profiler=o,Yt.PureComponent=K,Yt.StrictMode=s,Yt.Suspense=f,Yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Yt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return $.H.useMemoCache(H)}},Yt.cache=function(H){return function(){return H.apply(null,arguments)}},Yt.cloneElement=function(H,oe,L){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var q=k({},H.props),V=H.key,te=void 0;if(oe!=null)for(ae in oe.ref!==void 0&&(te=void 0),oe.key!==void 0&&(V=""+oe.key),oe)!Le.call(oe,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&oe.ref===void 0||(q[ae]=oe[ae]);var ae=arguments.length-2;if(ae===1)q.children=L;else if(1<ae){for(var me=Array(ae),_e=0;_e<ae;_e++)me[_e]=arguments[_e+2];q.children=me}return ke(H.type,V,void 0,void 0,te,q)},Yt.createContext=function(H){return H={$$typeof:h,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:u,_context:H},H},Yt.createElement=function(H,oe,L){var q,V={},te=null;if(oe!=null)for(q in oe.key!==void 0&&(te=""+oe.key),oe)Le.call(oe,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(V[q]=oe[q]);var ae=arguments.length-2;if(ae===1)V.children=L;else if(1<ae){for(var me=Array(ae),_e=0;_e<ae;_e++)me[_e]=arguments[_e+2];V.children=me}if(H&&H.defaultProps)for(q in ae=H.defaultProps,ae)V[q]===void 0&&(V[q]=ae[q]);return ke(H,te,void 0,void 0,null,V)},Yt.createRef=function(){return{current:null}},Yt.forwardRef=function(H){return{$$typeof:d,render:H}},Yt.isValidElement=J,Yt.lazy=function(H){return{$$typeof:y,_payload:{_status:-1,_result:H},_init:ce}},Yt.memo=function(H,oe){return{$$typeof:m,type:H,compare:oe===void 0?null:oe}},Yt.startTransition=function(H){var oe=$.T,L={};$.T=L;try{var q=H(),V=$.S;V!==null&&V(L,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(Ne,le)}catch(te){le(te)}finally{$.T=oe}},Yt.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Yt.use=function(H){return $.H.use(H)},Yt.useActionState=function(H,oe,L){return $.H.useActionState(H,oe,L)},Yt.useCallback=function(H,oe){return $.H.useCallback(H,oe)},Yt.useContext=function(H){return $.H.useContext(H)},Yt.useDebugValue=function(){},Yt.useDeferredValue=function(H,oe){return $.H.useDeferredValue(H,oe)},Yt.useEffect=function(H,oe,L){var q=$.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return q.useEffect(H,oe)},Yt.useId=function(){return $.H.useId()},Yt.useImperativeHandle=function(H,oe,L){return $.H.useImperativeHandle(H,oe,L)},Yt.useInsertionEffect=function(H,oe){return $.H.useInsertionEffect(H,oe)},Yt.useLayoutEffect=function(H,oe){return $.H.useLayoutEffect(H,oe)},Yt.useMemo=function(H,oe){return $.H.useMemo(H,oe)},Yt.useOptimistic=function(H,oe){return $.H.useOptimistic(H,oe)},Yt.useReducer=function(H,oe,L){return $.H.useReducer(H,oe,L)},Yt.useRef=function(H){return $.H.useRef(H)},Yt.useState=function(H){return $.H.useState(H)},Yt.useSyncExternalStore=function(H,oe,L){return $.H.useSyncExternalStore(H,oe,L)},Yt.useTransition=function(){return $.H.useTransition()},Yt.version="19.1.0",Yt}var j2;function s0(){return j2||(j2=1,o1.exports=dy()),o1.exports}var ye=s0();const Am=_m(ye),hy=uy({__proto__:null,default:Am},[ye]);var l1={exports:{}},$c={},u1={exports:{}},c1={};var k2;function py(){return k2||(k2=1,(function(t){function n(ee,ce){var le=ee.length;ee.push(ce);e:for(;0<le;){var Ne=le-1>>>1,H=ee[Ne];if(0<o(H,ce))ee[Ne]=ce,ee[le]=H,le=Ne;else break e}}function a(ee){return ee.length===0?null:ee[0]}function s(ee){if(ee.length===0)return null;var ce=ee[0],le=ee.pop();if(le!==ce){ee[0]=le;e:for(var Ne=0,H=ee.length,oe=H>>>1;Ne<oe;){var L=2*(Ne+1)-1,q=ee[L],V=L+1,te=ee[V];if(0>o(q,le))V<H&&0>o(te,q)?(ee[Ne]=te,ee[V]=le,Ne=V):(ee[Ne]=q,ee[L]=le,Ne=L);else if(V<H&&0>o(te,le))ee[Ne]=te,ee[V]=le,Ne=V;else break e}}return ce}function o(ee,ce){var le=ee.sortIndex-ce.sortIndex;return le!==0?le:ee.id-ce.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var h=Date,d=h.now();t.unstable_now=function(){return h.now()-d}}var f=[],m=[],y=1,_=null,j=3,w=!1,k=!1,T=!1,D=!1,C=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function F(ee){for(var ce=a(m);ce!==null;){if(ce.callback===null)s(m);else if(ce.startTime<=ee)s(m),ce.sortIndex=ce.expirationTime,n(f,ce);else break;ce=a(m)}}function $(ee){if(T=!1,F(ee),!k)if(a(f)!==null)k=!0,Le||(Le=!0,U());else{var ce=a(m);ce!==null&&Se($,ce.startTime-ee)}}var Le=!1,ke=-1,se=5,J=-1;function pe(){return D?!0:!(t.unstable_now()-J<se)}function O(){if(D=!1,Le){var ee=t.unstable_now();J=ee;var ce=!0;try{e:{k=!1,T&&(T=!1,K(ke),ke=-1),w=!0;var le=j;try{t:{for(F(ee),_=a(f);_!==null&&!(_.expirationTime>ee&&pe());){var Ne=_.callback;if(typeof Ne=="function"){_.callback=null,j=_.priorityLevel;var H=Ne(_.expirationTime<=ee);if(ee=t.unstable_now(),typeof H=="function"){_.callback=H,F(ee),ce=!0;break t}_===a(f)&&s(f),F(ee)}else s(f);_=a(f)}if(_!==null)ce=!0;else{var oe=a(m);oe!==null&&Se($,oe.startTime-ee),ce=!1}}break e}finally{_=null,j=le,w=!1}ce=void 0}}finally{ce?U():Le=!1}}}var U;if(typeof W=="function")U=function(){W(O)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ne=G.port2;G.port1.onmessage=O,U=function(){ne.postMessage(null)}}else U=function(){C(O,0)};function Se(ee,ce){ke=C(function(){ee(t.unstable_now())},ce)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ee){ee.callback=null},t.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<ee?Math.floor(1e3/ee):5},t.unstable_getCurrentPriorityLevel=function(){return j},t.unstable_next=function(ee){switch(j){case 1:case 2:case 3:var ce=3;break;default:ce=j}var le=j;j=ce;try{return ee()}finally{j=le}},t.unstable_requestPaint=function(){D=!0},t.unstable_runWithPriority=function(ee,ce){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var le=j;j=ee;try{return ce()}finally{j=le}},t.unstable_scheduleCallback=function(ee,ce,le){var Ne=t.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Ne+le:Ne):le=Ne,ee){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=le+H,ee={id:y++,callback:ce,priorityLevel:ee,startTime:le,expirationTime:H,sortIndex:-1},le>Ne?(ee.sortIndex=le,n(m,ee),a(f)===null&&ee===a(m)&&(T?(K(ke),ke=-1):T=!0,Se($,le-Ne))):(ee.sortIndex=H,n(f,ee),k||w||(k=!0,Le||(Le=!0,U()))),ee},t.unstable_shouldYield=pe,t.unstable_wrapCallback=function(ee){var ce=j;return function(){var le=j;j=ce;try{return ee.apply(this,arguments)}finally{j=le}}}})(c1)),c1}var N2;function gy(){return N2||(N2=1,u1.exports=py()),u1.exports}var f1={exports:{}},na={};var L2;function my(){if(L2)return na;L2=1;var t=s0();function n(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(f,m,y){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:_==null?null:""+_,children:f,containerInfo:m,implementation:y}}var h=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,na.createPortal=function(f,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return u(f,m,null,y)},na.flushSync=function(f){var m=h.T,y=s.p;try{if(h.T=null,s.p=2,f)return f()}finally{h.T=m,s.p=y,s.d.f()}},na.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(f,m))},na.prefetchDNS=function(f){typeof f=="string"&&s.d.D(f)},na.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var y=m.as,_=d(y,m.crossOrigin),j=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?s.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:_,integrity:j,fetchPriority:w}):y==="script"&&s.d.X(f,{crossOrigin:_,integrity:j,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},na.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);s.d.M(f,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(f)},na.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,_=d(y,m.crossOrigin);s.d.L(f,y,{crossOrigin:_,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},na.preloadModule=function(f,m){if(typeof f=="string")if(m){var y=d(m.as,m.crossOrigin);s.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(f)},na.requestFormReset=function(f){s.d.r(f)},na.unstable_batchedUpdates=function(f,m){return f(m)},na.useFormState=function(f,m,y){return h.H.useFormState(f,m,y)},na.useFormStatus=function(){return h.H.useHostTransitionStatus()},na.version="19.1.0",na}var T2;function jm(){if(T2)return f1.exports;T2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),f1.exports=my(),f1.exports}var C2;function vy(){if(C2)return $c;C2=1;var t=gy(),n=s0(),a=jm();function s(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var r=e,i=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,(r.flags&4098)!==0&&(i=r.return),e=r.return;while(e)}return r.tag===3?i:null}function h(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(s(188))}function f(e){var r=e.alternate;if(!r){if(r=u(e),r===null)throw Error(s(188));return r!==e?null:e}for(var i=e,l=r;;){var p=i.return;if(p===null)break;var b=p.alternate;if(b===null){if(l=p.return,l!==null){i=l;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===i)return d(p),e;if(b===l)return d(p),r;b=b.sibling}throw Error(s(188))}if(i.return!==l.return)i=p,l=b;else{for(var N=!1,B=p.child;B;){if(B===i){N=!0,i=p,l=b;break}if(B===l){N=!0,l=p,i=b;break}B=B.sibling}if(!N){for(B=b.child;B;){if(B===i){N=!0,i=b,l=p;break}if(B===l){N=!0,l=b,i=p;break}B=B.sibling}if(!N)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:r}function m(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e;for(e=e.child;e!==null;){if(r=m(e),r!==null)return r;e=e.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),K=Symbol.for("react.consumer"),W=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),Le=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),pe=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case D:return"Profiler";case T:return"StrictMode";case $:return"Suspense";case Le:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case W:return(e.displayName||"Context")+".Provider";case K:return(e._context.displayName||"Context")+".Consumer";case F:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return r=e.displayName||null,r!==null?r:ne(e.type)||"Memo";case se:r=e._payload,e=e._init;try{return ne(e(r))}catch{}}return null}var Se=Array.isArray,ee=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Ne=[],H=-1;function oe(e){return{current:e}}function L(e){0>H||(e.current=Ne[H],Ne[H]=null,H--)}function q(e,r){H++,Ne[H]=e.current,e.current=r}var V=oe(null),te=oe(null),ae=oe(null),me=oe(null);function _e(e,r){switch(q(ae,r),q(te,e),q(V,null),r.nodeType){case 9:case 11:e=(e=r.documentElement)&&(e=e.namespaceURI)?Kp(e):0;break;default:if(e=r.tagName,r=r.namespaceURI)r=Kp(r),e=Zp(r,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(V),q(V,e)}function Ee(){L(V),L(te),L(ae)}function ze(e){e.memoizedState!==null&&q(me,e);var r=V.current,i=Zp(r,e.type);r!==i&&(q(te,e),q(V,i))}function We(e){te.current===e&&(L(V),L(te)),me.current===e&&(L(me),Gc._currentValue=le)}var Xe=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,dt=t.unstable_cancelCallback,Y=t.unstable_shouldYield,Qe=t.unstable_requestPaint,xt=t.unstable_now,ut=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,mt=t.unstable_UserBlockingPriority,Ze=t.unstable_NormalPriority,bt=t.unstable_LowPriority,ht=t.unstable_IdlePriority,Wt=t.log,Gt=t.unstable_setDisableYieldValue,wt=null,_t=null;function Dt(e){if(typeof Wt=="function"&&Gt(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(wt,e)}catch{}}var Ke=Math.clz32?Math.clz32:zn,qt=Math.log,pt=Math.LN2;function zn(e){return e>>>=0,e===0?32:31-(qt(e)/pt|0)|0}var be=256,Ye=4194304;function Je(e){var r=e&42;if(r!==0)return r;switch(e&-e){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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kt(e,r,i){var l=e.pendingLanes;if(l===0)return 0;var p=0,b=e.suspendedLanes,N=e.pingedLanes;e=e.warmLanes;var B=l&134217727;return B!==0?(l=B&~b,l!==0?p=Je(l):(N&=B,N!==0?p=Je(N):i||(i=B&~e,i!==0&&(p=Je(i))))):(B=l&~b,B!==0?p=Je(B):N!==0?p=Je(N):i||(i=l&~e,i!==0&&(p=Je(i)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,i=r&-r,b>=i||b===32&&(i&4194048)!==0)?r:p}function rt(e,r){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&r)===0}function un(e,r){switch(e){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 vt(){var e=be;return be<<=1,(be&4194048)===0&&(be=256),e}function At(){var e=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),e}function Tt(e){for(var r=[],i=0;31>i;i++)r.push(e);return r}function Et(e,r){e.pendingLanes|=r,r!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function St(e,r,i,l,p,b){var N=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var B=e.entanglements,re=e.expirationTimes,je=e.hiddenUpdates;for(i=N&~i;0<i;){var Be=31-Ke(i),Ue=1<<Be;B[Be]=0,re[Be]=-1;var Te=je[Be];if(Te!==null)for(je[Be]=null,Be=0;Be<Te.length;Be++){var Ce=Te[Be];Ce!==null&&(Ce.lane&=-536870913)}i&=~Ue}l!==0&&nn(e,l,0),b!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=b&~(N&~r))}function nn(e,r,i){e.pendingLanes|=r,e.suspendedLanes&=~r;var l=31-Ke(r);e.entangledLanes|=r,e.entanglements[l]=e.entanglements[l]|1073741824|i&4194090}function ni(e,r){var i=e.entangledLanes|=r;for(e=e.entanglements;i;){var l=31-Ke(i),p=1<<l;p&r|e[l]&r&&(e[l]|=r),i&=~p}}function pn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Oa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ra(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:m2(e.type))}function jt(e,r){var i=ce.p;try{return ce.p=e,r()}finally{ce.p=i}}var Tr=Math.random().toString(36).slice(2),Mn="__reactFiber$"+Tr,Nn="__reactProps$"+Tr,wr="__reactContainer$"+Tr,On="__reactEvents$"+Tr,mr="__reactListeners$"+Tr,Sr="__reactHandles$"+Tr,Xi="__reactResources$"+Tr,ba="__reactMarker$"+Tr;function oa(e){delete e[Mn],delete e[Nn],delete e[On],delete e[mr],delete e[Sr]}function Ir(e){var r=e[Mn];if(r)return r;for(var i=e.parentNode;i;){if(r=i[wr]||i[Mn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(e=t2(e);e!==null;){if(i=e[Mn])return i;e=t2(e)}return r}e=i,i=e.parentNode}return null}function Cr(e){if(e=e[Mn]||e[wr]){var r=e.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return e}return null}function Hr(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e.stateNode;throw Error(s(33))}function _r(e){var r=e[Xi];return r||(r=e[Xi]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Rn(e){e[ba]=!0}var Da=new Set,Ki={};function xa(e,r){za(e,r),za(e+"Capture",r)}function za(e,r){for(Ki[e]=r,e=0;e<r.length;e++)Da.add(r[e])}var fo=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]*$"),Jl={},ho={};function eu(e){return Xe.call(ho,e)?!0:Xe.call(Jl,e)?!1:fo.test(e)?ho[e]=!0:(Jl[e]=!0,!1)}function ks(e,r,i){if(eu(r))if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(r);return}}e.setAttribute(r,""+i)}}function Wr(e,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttribute(r,""+i)}}function la(e,r,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(r,i,""+l)}}var po,go;function xi(e){if(po===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);po=r&&r[1]||"",go=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+po+e+go}var mo=!1;function vo(e,r){if(!e||mo)return"";mo=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ue=function(){throw Error()};if(Object.defineProperty(Ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ue,[])}catch(Ce){var Te=Ce}Reflect.construct(e,[],Ue)}else{try{Ue.call()}catch(Ce){Te=Ce}e.call(Ue.prototype)}}else{try{throw Error()}catch(Ce){Te=Ce}(Ue=e())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(Ce){if(Ce&&Te&&typeof Ce.stack=="string")return[Ce.stack,Te.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=l.DetermineComponentFrameRoot(),N=b[0],B=b[1];if(N&&B){var re=N.split(`
|
|
4
|
+
`),je=B.split(`
|
|
5
|
+
`);for(p=l=0;l<re.length&&!re[l].includes("DetermineComponentFrameRoot");)l++;for(;p<je.length&&!je[p].includes("DetermineComponentFrameRoot");)p++;if(l===re.length||p===je.length)for(l=re.length-1,p=je.length-1;1<=l&&0<=p&&re[l]!==je[p];)p--;for(;1<=l&&0<=p;l--,p--)if(re[l]!==je[p]){if(l!==1||p!==1)do if(l--,p--,0>p||re[l]!==je[p]){var Be=`
|
|
6
|
+
`+re[l].replace(" at new "," at ");return e.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",e.displayName)),Be}while(1<=l&&0<=p);break}}}finally{mo=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?xi(i):""}function ri(e){switch(e.tag){case 26:case 27:case 5:return xi(e.type);case 16:return xi("Lazy");case 13:return xi("Suspense");case 19:return xi("SuspenseList");case 0:case 15:return vo(e.type,!1);case 11:return vo(e.type.render,!1);case 1:return vo(e.type,!0);case 31:return xi("Activity");default:return""}}function Ns(e){try{var r="";do r+=ri(e),e=e.return;while(e);return r}catch(i){return`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qn(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tu(e){var r=Qn(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var p=i.get,b=i.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return p.call(this)},set:function(N){l=""+N,b.call(this,N)}}),Object.defineProperty(e,r,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function ua(e){e._valueTracker||(e._valueTracker=tu(e))}function Ls(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return e&&(l=Qn(e)?e.checked?"true":"false":e.value),e=l,e!==i?(r.setValue(e),!0):!1}function Zi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ca=/[\n"\\]/g;function Ar(e){return e.replace(ca,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ba(e,r,i,l,p,b,N,B){e.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.type=N:e.removeAttribute("type"),r!=null?N==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+ta(r)):e.value!==""+ta(r)&&(e.value=""+ta(r)):N!=="submit"&&N!=="reset"||e.removeAttribute("value"),r!=null?yo(e,N,ta(r)):i!=null?yo(e,N,ta(i)):l!=null&&e.removeAttribute("value"),p==null&&b!=null&&(e.defaultChecked=!!b),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+ta(B):e.removeAttribute("name")}function vr(e,r,i,l,p,b,N,B){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.type=b),r!=null||i!=null){if(!(b!=="submit"&&b!=="reset"||r!=null))return;i=i!=null?""+ta(i):"",r=r!=null?""+ta(r):i,B||r===e.value||(e.value=r),e.defaultValue=r}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=B?e.checked:!!l,e.defaultChecked=!!l,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(e.name=N)}function yo(e,r,i){r==="number"&&Zi(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function $i(e,r,i,l){if(e=e.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<e.length;i++)p=r.hasOwnProperty("$"+e[i].value),e[i].selected!==p&&(e[i].selected=p),p&&l&&(e[i].defaultSelected=!0)}else{for(i=""+ta(i),r=null,p=0;p<e.length;p++){if(e[p].value===i){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}r!==null||e[p].disabled||(r=e[p])}r!==null&&(r.selected=!0)}}function nu(e,r,i){if(r!=null&&(r=""+ta(r),r!==e.value&&(e.value=r),i==null)){e.defaultValue!==r&&(e.defaultValue=r);return}e.defaultValue=i!=null?""+ta(i):""}function ru(e,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(s(92));if(Se(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=ta(r),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l)}function Yr(e,r){if(r){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=r;return}}e.textContent=r}var au=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 Ts(e,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="":l?e.setProperty(r,i):typeof i!="number"||i===0||au.has(r)?r==="float"?e.cssFloat=i:e[r]=(""+i).trim():e[r]=i+"px"}function Cs(e,r,i){if(r!=null&&typeof r!="object")throw Error(s(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in r)l=r[p],r.hasOwnProperty(p)&&i[p]!==l&&Ts(e,p,l)}else for(var b in r)r.hasOwnProperty(b)&&Ts(e,b,r[b])}function Es(e){if(e.indexOf("-")===-1)return!1;switch(e){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 cc=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"]]),fc=/^[\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 bo(e){return fc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ai=null;function xo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fa=null,Ji=null;function es(e){var r=Cr(e);if(r&&(e=r.stateNode)){var i=e[Nn]||null;e:switch(e=r.stateNode,r.type){case"input":if(Ba(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ar(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==e&&l.form===e.form){var p=l[Nn]||null;if(!p)throw Error(s(90));Ba(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===e.form&&Ls(l)}break e;case"textarea":nu(e,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&$i(e,!!i.multiple,r,!1)}}}var kt=!1;function iu(e,r,i){if(kt)return e(r,i);kt=!0;try{var l=e(r);return l}finally{if(kt=!1,(fa!==null||Ji!==null)&&(td(),fa&&(r=fa,e=Ji,Ji=fa=null,es(r),e)))for(r=0;r<e.length;r++)es(e[r])}}function Ms(e,r){var i=e.stateNode;if(i===null)return null;var l=i[Nn]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,r,typeof i));return i}var Pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ml=!1;if(Pa)try{var Os={};Object.defineProperty(Os,"passive",{get:function(){ml=!0}}),window.addEventListener("test",Os,Os),window.removeEventListener("test",Os,Os)}catch{ml=!1}var Er=null,qa=null,wo=null;function su(){if(wo)return wo;var e,r=qa,i=r.length,l,p="value"in Er?Er.value:Er.textContent,b=p.length;for(e=0;e<i&&r[e]===p[e];e++);var N=i-e;for(l=1;l<=N&&r[i-l]===p[b-l];l++);return wo=p.slice(e,1<l?1-l:void 0)}function wi(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function ts(){return!0}function Ua(){return!1}function Mr(e){function r(i,l,p,b,N){this._reactName=i,this._targetInst=p,this.type=l,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(b):b[B]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ts:Ua,this.isPropagationStopped=Ua,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ts)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ts)},persist:function(){},isPersistent:ts}),r}var wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},So=Mr(wa),Si=y({},wa,{view:0,detail:0}),ns=Mr(Si),Rs,_i,Ai,ji=y({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oe,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ai&&(Ai&&e.type==="mousemove"?(Rs=e.screenX-Ai.screenX,_i=e.screenY-Ai.screenY):_i=Rs=0,Ai=e),Rs)},movementY:function(e){return"movementY"in e?e.movementY:_i}}),_o=Mr(ji),Ao=y({},ji,{dataTransfer:0}),ou=Mr(Ao),ki=y({},Si,{relatedTarget:0}),Fa=Mr(ki),lu=y({},wa,{animationName:0,elapsedTime:0,pseudoElement:0}),uu=Mr(lu),cu=y({},wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ds=Mr(cu),fu=y({},wa,{data:0}),x=Mr(fu),E={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q={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"},ie={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function he(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=ie[e])?!!r[e]:!1}function Oe(){return he}var Fe=y({},Si,{key:function(e){if(e.key){var r=E[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oe,charCode:function(e){return e.type==="keypress"?wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),st=Mr(Fe),at=y({},ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mt=Mr(at),Ft=y({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oe}),Jt=Mr(Ft),tr=y({},wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),mn=Mr(tr),gn=y({},ji,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=Mr(gn),Bn=y({},wa,{newState:0,oldState:0}),Pn=Mr(Bn),Or=[9,13,27,32],Ia=Pa&&"CompositionEvent"in window,Ni=null;Pa&&"documentMode"in document&&(Ni=document.documentMode);var zs=Pa&&"TextEvent"in window&&!Ni,rs=Pa&&(!Ia||Ni&&8<Ni&&11>=Ni),Li=" ",as=!1;function Bs(e,r){switch(e){case"keyup":return Or.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ps(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function qs(e,r){switch(e){case"compositionend":return Ps(r);case"keypress":return r.which!==32?null:(as=!0,Li);case"textInput":return e=r.data,e===Li&&as?null:e;default:return null}}function Us(e,r){if(Xn)return e==="compositionend"||!Ia&&Bs(e,r)?(e=su(),wo=qa=Er=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return rs&&r.locale!=="ko"?null:r.data;default:return null}}var vl={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 Ha(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!vl[e.type]:r==="textarea"}function Rr(e,r,i,l){fa?Ji?Ji.push(l):Ji=[l]:fa=l,r=od(r,"onChange"),0<r.length&&(i=new So("onChange","change",null,i,l),e.push({event:i,listeners:r}))}var is=null,ii=null;function du(e){Yp(e,0)}function Gr(e){var r=Hr(e);if(Ls(r))return e}function ss(e,r){if(e==="change")return r}var jo=!1;if(Pa){var os;if(Pa){var Ti="oninput"in document;if(!Ti){var ko=document.createElement("div");ko.setAttribute("oninput","return;"),Ti=typeof ko.oninput=="function"}os=Ti}else os=!1;jo=os&&(!document.documentMode||9<document.documentMode)}function Dr(){is&&(is.detachEvent("onpropertychange",Vr),ii=is=null)}function Vr(e){if(e.propertyName==="value"&&Gr(ii)){var r=[];Rr(r,ii,e,xo(e)),iu(du,r)}}function No(e,r,i){e==="focusin"?(Dr(),is=r,ii=i,is.attachEvent("onpropertychange",Vr)):e==="focusout"&&Dr()}function ls(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gr(ii)}function us(e,r){if(e==="click")return Gr(r)}function Lo(e,r){if(e==="input"||e==="change")return Gr(r)}function Fs(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var rn=typeof Object.is=="function"?Object.is:Fs;function Is(e,r){if(rn(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var i=Object.keys(e),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var p=i[l];if(!Xe.call(r,p)||!rn(e[p],r[p]))return!1}return!0}function Wa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sa(e,r){var i=Wa(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=r&&l>=r)return{node:i,offset:r-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Wa(i)}}function cs(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?cs(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function To(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var r=Zi(e.document);r instanceof e.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)e=r.contentWindow;else break;r=Zi(e.document)}return r}function Hs(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}var Co=Pa&&"documentMode"in document&&11>=document.documentMode,_a=null,Ci=null,Aa=null,Ya=!1;function Ei(e,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ya||_a==null||_a!==Zi(l)||(l=_a,"selectionStart"in l&&Hs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Aa&&Is(Aa,l)||(Aa=l,l=od(Ci,"onSelect"),0<l.length&&(r=new So("onSelect","select",null,r,i),e.push({event:r,listeners:l}),r.target=_a)))}function ja(e,r){var i={};return i[e.toLowerCase()]=r.toLowerCase(),i["Webkit"+e]="webkit"+r,i["Moz"+e]="moz"+r,i}var Kn={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},ka={},vn={};Pa&&(vn=document.createElement("div").style,"AnimationEvent"in window||(delete Kn.animationend.animation,delete Kn.animationiteration.animation,delete Kn.animationstart.animation),"TransitionEvent"in window||delete Kn.transitionend.transition);function an(e){if(ka[e])return ka[e];if(!Kn[e])return e;var r=Kn[e],i;for(i in r)if(r.hasOwnProperty(i)&&i in vn)return ka[e]=r[i];return e}var Fn=an("animationend"),nr=an("animationiteration"),si=an("animationstart"),yl=an("transitionrun"),Eo=an("transitionstart"),hu=an("transitioncancel"),dc=an("transitionend"),hc=new Map,pu="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(" ");pu.push("scrollEnd");function Na(e,r){hc.set(e,r),xa(r,[e])}var Mo=new WeakMap;function da(e,r){if(typeof e=="object"&&e!==null){var i=Mo.get(e);return i!==void 0?i:(r={value:e,source:r,stack:Ns(r)},Mo.set(e,r),r)}return{value:e,source:r,stack:Ns(r)}}var ha=[],Ws=0,gu=0;function bl(){for(var e=Ws,r=gu=Ws=0;r<e;){var i=ha[r];ha[r++]=null;var l=ha[r];ha[r++]=null;var p=ha[r];ha[r++]=null;var b=ha[r];if(ha[r++]=null,l!==null&&p!==null){var N=l.pending;N===null?p.next=p:(p.next=N.next,N.next=p),l.pending=p}b!==0&&vu(i,p,b)}}function xl(e,r,i,l){ha[Ws++]=e,ha[Ws++]=r,ha[Ws++]=i,ha[Ws++]=l,gu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function mu(e,r,i,l){return xl(e,r,i,l),Gs(e)}function Ys(e,r){return xl(e,null,null,r),Gs(e)}function vu(e,r,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var p=!1,b=e.return;b!==null;)b.childLanes|=i,l=b.alternate,l!==null&&(l.childLanes|=i),b.tag===22&&(e=b.stateNode,e===null||e._visibility&1||(p=!0)),e=b,b=b.return;return e.tag===3?(b=e.stateNode,p&&r!==null&&(p=31-Ke(i),e=b.hiddenUpdates,l=e[p],l===null?e[p]=[r]:l.push(r),r.lane=i|536870912),b):null}function Gs(e){if(50<Pc)throw Pc=0,Ch=null,Error(s(185));for(var r=e.return;r!==null;)e=r,r=e.return;return e.tag===3?e.stateNode:null}var yr={};function La(e,r,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(e,r,i,l){return new La(e,r,i,l)}function Oo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,r){var i=e.alternate;return i===null?(i=zr(e.tag,r,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=r,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,r=e.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function wl(e,r){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=r,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,r=i.dependencies,e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),e}function Vs(e,r,i,l,p,b){var N=0;if(l=e,typeof e=="function")Oo(e)&&(N=1);else if(typeof e=="string")N=Kv(e,i,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=zr(31,i,r,p),e.elementType=J,e.lanes=b,e;case k:return Mi(i.children,p,b,r);case T:N=8,p|=24;break;case D:return e=zr(12,i,r,p|2),e.elementType=D,e.lanes=b,e;case $:return e=zr(13,i,r,p),e.elementType=$,e.lanes=b,e;case Le:return e=zr(19,i,r,p),e.elementType=Le,e.lanes=b,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C:case W:N=10;break e;case K:N=9;break e;case F:N=11;break e;case ke:N=14;break e;case se:N=16,l=null;break e}N=29,i=Error(s(130,e===null?"null":typeof e,"")),l=null}return r=zr(N,i,r,p),r.elementType=e,r.type=l,r.lanes=b,r}function Mi(e,r,i,l){return e=zr(7,e,l,r),e.lanes=i,e}function yu(e,r,i){return e=zr(6,e,null,r),e.lanes=i,e}function Sl(e,r,i){return r=zr(4,e.children!==null?e.children:[],e.key,r),r.lanes=i,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}var fs=[],Oi=0,Ro=null,bu=0,Ta=[],pa=0,Qs=null,Ri=1,Di="";function Xs(e,r){fs[Oi++]=bu,fs[Oi++]=Ro,Ro=e,bu=r}function jf(e,r,i){Ta[pa++]=Ri,Ta[pa++]=Di,Ta[pa++]=Qs,Qs=e;var l=Ri;e=Di;var p=32-Ke(l)-1;l&=~(1<<p),i+=1;var b=32-Ke(r)+p;if(30<b){var N=p-p%5;b=(l&(1<<N)-1).toString(32),l>>=N,p-=N,Ri=1<<32-Ke(r)+p|i<<p|l,Di=b+e}else Ri=1<<b|i<<p|l,Di=e}function _l(e){e.return!==null&&(Xs(e,1),jf(e,1,0))}function Al(e){for(;e===Ro;)Ro=fs[--Oi],fs[Oi]=null,bu=fs[--Oi],fs[Oi]=null;for(;e===Qs;)Qs=Ta[--pa],Ta[pa]=null,Di=Ta[--pa],Ta[pa]=null,Ri=Ta[--pa],Ta[pa]=null}var sr=null,In=null,ln=!1,ds=null,li=!1,pc=Error(s(519));function Ks(e){var r=Error(s(418,""));throw Do(da(r,e)),pc}function kf(e){var r=e.stateNode,i=e.type,l=e.memoizedProps;switch(r[Mn]=e,r[Nn]=l,i){case"dialog":$t("cancel",r),$t("close",r);break;case"iframe":case"object":case"embed":$t("load",r);break;case"video":case"audio":for(i=0;i<Uc.length;i++)$t(Uc[i],r);break;case"source":$t("error",r);break;case"img":case"image":case"link":$t("error",r),$t("load",r);break;case"details":$t("toggle",r);break;case"input":$t("invalid",r),vr(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),ua(r);break;case"select":$t("invalid",r);break;case"textarea":$t("invalid",r),ru(r,l.value,l.defaultValue,l.children),ua(r)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||Xp(r.textContent,i)?(l.popover!=null&&($t("beforetoggle",r),$t("toggle",r)),l.onScroll!=null&&$t("scroll",r),l.onScrollEnd!=null&&$t("scrollend",r),l.onClick!=null&&(r.onclick=ld),r=!0):r=!1,r||Ks(e)}function zi(e){for(sr=e.return;sr;)switch(sr.tag){case 5:case 13:li=!1;return;case 27:case 3:li=!0;return;default:sr=sr.return}}function Qr(e){if(e!==sr)return!1;if(!ln)return zi(e),ln=!0,!1;var r=e.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Gh(e.type,e.memoizedProps)),i=!i),i&&In&&Ks(e),zi(e),r===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8)if(i=e.data,i==="/$"){if(r===0){In=Wi(e.nextSibling);break e}r--}else i!=="$"&&i!=="$!"&&i!=="$?"||r++;e=e.nextSibling}In=null}}else r===27?(r=In,Zo(e.type)?(e=Kh,Kh=null,In=e):In=r):In=sr?Wi(e.stateNode.nextSibling):null;return!0}function ga(){In=sr=null,ln=!1}function Nf(){var e=ds;return e!==null&&(Ea===null?Ea=e:Ea.push.apply(Ea,e),ds=null),e}function Do(e){ds===null?ds=[e]:ds.push(e)}var ui=oe(null),br=null,Bi=null;function hs(e,r,i){q(ui,r._currentValue),r._currentValue=i}function ci(e){e._currentValue=ui.current,L(ui)}function xu(e,r,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===i)break;e=e.return}}function wu(e,r,i,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var b=p.dependencies;if(b!==null){var N=p.child;b=b.firstContext;e:for(;b!==null;){var B=b;b=p;for(var re=0;re<r.length;re++)if(B.context===r[re]){b.lanes|=i,B=b.alternate,B!==null&&(B.lanes|=i),xu(b.return,i,e),l||(N=null);break e}b=B.next}}else if(p.tag===18){if(N=p.return,N===null)throw Error(s(341));N.lanes|=i,b=N.alternate,b!==null&&(b.lanes|=i),xu(N,i,e),N=null}else N=p.child;if(N!==null)N.return=p;else for(N=p;N!==null;){if(N===e){N=null;break}if(p=N.sibling,p!==null){p.return=N.return,N=p;break}N=N.return}p=N}}function zo(e,r,i,l){e=null;for(var p=r,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var N=p.alternate;if(N===null)throw Error(s(387));if(N=N.memoizedProps,N!==null){var B=p.type;rn(p.pendingProps.value,N.value)||(e!==null?e.push(B):e=[B])}}else if(p===me.current){if(N=p.alternate,N===null)throw Error(s(387));N.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(Gc):e=[Gc])}p=p.return}e!==null&&wu(r,e,i,l),r.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fi(e){br=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function or(e){return _u(br,e)}function ps(e,r){return br===null&&fi(e),_u(e,r)}function _u(e,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Bi===null){if(e===null)throw Error(s(308));Bi=r,e.dependencies={lanes:0,firstContext:r},e.flags|=524288}else Bi=Bi.next=r;return i}var th=typeof AbortController<"u"?AbortController:function(){var e=[],r=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){r.aborted=!0,e.forEach(function(i){return i()})}},Lf=t.unstable_scheduleCallback,nh=t.unstable_NormalPriority,lr={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new th,data:new Map,refCount:0}}function jl(e){e.refCount--,e.refCount===0&&Lf(nh,function(){e.controller.abort()})}var kl=null,mc=0,Zs=0,Pi=null;function rh(e,r){if(kl===null){var i=kl=[];mc=0,Zs=Bh(),Pi={status:"pending",value:void 0,then:function(l){i.push(l)}}}return mc++,r.then(Tf,Tf),r}function Tf(){if(--mc===0&&kl!==null){Pi!==null&&(Pi.status="fulfilled");var e=kl;kl=null,Zs=0,Pi=null;for(var r=0;r<e.length;r++)(0,e[r])()}}function Cf(e,r){var i=[],l={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return e.then(function(){l.status="fulfilled",l.value=r;for(var p=0;p<i.length;p++)(0,i[p])(r)},function(p){for(l.status="rejected",l.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),l}var c=ee.S;ee.S=function(e,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&rh(e,r),c!==null&&c(e,r)};var v=oe(null);function S(){var e=v.current;return e!==null?e:Dn.pooledCache}function A(e,r){r===null?q(v,v.current):q(v,r.pool)}function M(){var e=S();return e===null?null:{parent:lr._currentValue,pool:e}}var R=Error(s(460)),z=Error(s(474)),P=Error(s(542)),I={then:function(){}};function Z(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ue(){}function Ae(e,r,i){switch(i=e[i],i===void 0?e.push(r):i!==r&&(r.then(ue,ue),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,ve(e),e;default:if(typeof r.status=="string")r.then(ue,ue);else{if(e=Dn,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=r,e.status="pending",e.then(function(l){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=l}},function(l){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,ve(e),e}throw X=r,R}}var X=null;function de(){if(X===null)throw Error(s(459));var e=X;return X=null,e}function ve(e){if(e===R||e===P)throw Error(s(483))}var Me=!1;function we(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function De(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Re(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function He(e,r,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(bn&2)!==0){var p=l.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),l.pending=r,r=Gs(e),vu(e,null,i),r}return xl(e,l,r,i),Gs(e)}function qe(e,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,ni(e,i)}}function ft(e,r){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var p=null,b=null;if(i=i.firstBaseUpdate,i!==null){do{var N={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};b===null?p=b=N:b=b.next=N,i=i.next}while(i!==null);b===null?p=b=r:b=b.next=r}else p=b=r;i={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=r:e.next=r,i.lastBaseUpdate=r}var et=!1;function zt(){if(et){var e=Pi;if(e!==null)throw e}}function tt(e,r,i,l){et=!1;var p=e.updateQueue;Me=!1;var b=p.firstBaseUpdate,N=p.lastBaseUpdate,B=p.shared.pending;if(B!==null){p.shared.pending=null;var re=B,je=re.next;re.next=null,N===null?b=je:N.next=je,N=re;var Be=e.alternate;Be!==null&&(Be=Be.updateQueue,B=Be.lastBaseUpdate,B!==N&&(B===null?Be.firstBaseUpdate=je:B.next=je,Be.lastBaseUpdate=re))}if(b!==null){var Ue=p.baseState;N=0,Be=je=re=null,B=b;do{var Te=B.lane&-536870913,Ce=Te!==B.lane;if(Ce?(on&Te)===Te:(l&Te)===Te){Te!==0&&Te===Zs&&(et=!0),Be!==null&&(Be=Be.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Rt=e,Lt=B;Te=r;var kn=i;switch(Lt.tag){case 1:if(Rt=Lt.payload,typeof Rt=="function"){Ue=Rt.call(kn,Ue,Te);break e}Ue=Rt;break e;case 3:Rt.flags=Rt.flags&-65537|128;case 0:if(Rt=Lt.payload,Te=typeof Rt=="function"?Rt.call(kn,Ue,Te):Rt,Te==null)break e;Ue=y({},Ue,Te);break e;case 2:Me=!0}}Te=B.callback,Te!==null&&(e.flags|=64,Ce&&(e.flags|=8192),Ce=p.callbacks,Ce===null?p.callbacks=[Te]:Ce.push(Te))}else Ce={lane:Te,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Be===null?(je=Be=Ce,re=Ue):Be=Be.next=Ce,N|=Te;if(B=B.next,B===null){if(B=p.shared.pending,B===null)break;Ce=B,B=Ce.next,Ce.next=null,p.lastBaseUpdate=Ce,p.shared.pending=null}}while(!0);Be===null&&(re=Ue),p.baseState=re,p.firstBaseUpdate=je,p.lastBaseUpdate=Be,b===null&&(p.shared.lanes=0),Vo|=N,e.lanes=N,e.memoizedState=Ue}}function Qt(e,r){if(typeof e!="function")throw Error(s(191,e));e.call(r)}function rr(e,r){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Qt(i[e],r)}var Ot=oe(null),nt=oe(0);function Ge(e,r){e=io,q(nt,e),q(Ot,r),io=e|r.baseLanes}function qn(){q(nt,io),q(Ot,Ot.current)}function Bt(){io=nt.current,L(Ot),L(nt)}var Ht=0,it=null,Ut=null,en=null,Tn=!1,Zn=!1,$n=!1,Hn=0,Vt=0,tn=null,Wn=0;function Nt(){throw Error(s(321))}function ur(e,r){if(r===null)return!1;for(var i=0;i<r.length&&i<e.length;i++)if(!rn(e[i],r[i]))return!1;return!0}function ma(e,r,i,l,p,b){return Ht=b,it=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ee.H=e===null||e.memoizedState===null?T0:C0,$n=!1,b=i(l,p),$n=!1,Zn&&(b=Xr(r,i,l,p)),Yn(e),b}function Yn(e){ee.H=If;var r=Ut!==null&&Ut.next!==null;if(Ht=0,en=Ut=it=null,Tn=!1,Vt=0,tn=null,r)throw Error(s(300));e===null||Pr||(e=e.dependencies,e!==null&&Su(e)&&(Pr=!0))}function Xr(e,r,i,l){it=e;var p=0;do{if(Zn&&(tn=null),Vt=0,Zn=!1,25<=p)throw Error(s(301));if(p+=1,en=Ut=null,e.updateQueue!=null){var b=e.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}ee.H=ov,b=r(i,l)}while(Zn);return b}function yn(){var e=ee.H,r=e.useState()[0];return r=typeof r.then=="function"?kr(r):r,e=e.useState()[0],(Ut!==null?Ut.memoizedState:null)!==e&&(it.flags|=1024),r}function Jn(){var e=Hn!==0;return Hn=0,e}function Kr(e,r,i){r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~i}function jr(e){if(Tn){for(e=e.memoizedState;e!==null;){var r=e.queue;r!==null&&(r.pending=null),e=e.next}Tn=!1}Ht=0,en=Ut=it=null,Zn=!1,Vt=Hn=0,tn=null}function An(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?it.memoizedState=en=e:en=en.next=e,en}function sn(){if(Ut===null){var e=it.alternate;e=e!==null?e.memoizedState:null}else e=Ut.next;var r=en===null?it.memoizedState:en.next;if(r!==null)en=r,Ut=e;else{if(e===null)throw it.alternate===null?Error(s(467)):Error(s(310));Ut=e,e={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},en===null?it.memoizedState=en=e:en=en.next=e}return en}function Br(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(e){var r=Vt;return Vt+=1,tn===null&&(tn=[]),e=Ae(tn,e,r),r=it,(en===null?r.memoizedState:en.next)===null&&(r=r.alternate,ee.H=r===null||r.memoizedState===null?T0:C0),e}function dn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kr(e);if(e.$$typeof===W)return or(e)}throw Error(s(438,String(e)))}function Zr(e){var r=null,i=it.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=it.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Br(),it.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(e),l=0;l<e;l++)i[l]=pe;return r.index++,i}function cr(e,r){return typeof r=="function"?r(e):r}function di(e){var r=sn();return Ga(r,Ut,e)}function Ga(e,r,i){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var p=e.baseQueue,b=l.pending;if(b!==null){if(p!==null){var N=p.next;p.next=b.next,b.next=N}r.baseQueue=p=b,l.pending=null}if(b=e.baseState,p===null)e.memoizedState=b;else{r=p.next;var B=N=null,re=null,je=r,Be=!1;do{var Ue=je.lane&-536870913;if(Ue!==je.lane?(on&Ue)===Ue:(Ht&Ue)===Ue){var Te=je.revertLane;if(Te===0)re!==null&&(re=re.next={lane:0,revertLane:0,action:je.action,hasEagerState:je.hasEagerState,eagerState:je.eagerState,next:null}),Ue===Zs&&(Be=!0);else if((Ht&Te)===Te){je=je.next,Te===Zs&&(Be=!0);continue}else Ue={lane:0,revertLane:je.revertLane,action:je.action,hasEagerState:je.hasEagerState,eagerState:je.eagerState,next:null},re===null?(B=re=Ue,N=b):re=re.next=Ue,it.lanes|=Te,Vo|=Te;Ue=je.action,$n&&i(b,Ue),b=je.hasEagerState?je.eagerState:i(b,Ue)}else Te={lane:Ue,revertLane:je.revertLane,action:je.action,hasEagerState:je.hasEagerState,eagerState:je.eagerState,next:null},re===null?(B=re=Te,N=b):re=re.next=Te,it.lanes|=Ue,Vo|=Ue;je=je.next}while(je!==null&&je!==r);if(re===null?N=b:re.next=B,!rn(b,e.memoizedState)&&(Pr=!0,Be&&(i=Pi,i!==null)))throw i;e.memoizedState=b,e.baseState=N,e.baseQueue=re,l.lastRenderedState=b}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function fr(e){var r=sn(),i=r.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var l=i.dispatch,p=i.pending,b=r.memoizedState;if(p!==null){i.pending=null;var N=p=p.next;do b=e(b,N.action),N=N.next;while(N!==p);rn(b,r.memoizedState)||(Pr=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),i.lastRenderedState=b}return[b,l]}function Nl(e,r,i){var l=it,p=sn(),b=ln;if(b){if(i===void 0)throw Error(s(407));i=i()}else i=r();var N=!rn((Ut||p).memoizedState,i);N&&(p.memoizedState=i,Pr=!0),p=p.queue;var B=Bo.bind(null,l,p,e);if(Uo(2048,8,B,[e]),p.getSnapshot!==r||N||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Ui(9,El(),Ll.bind(null,l,p,i,r),null),Dn===null)throw Error(s(349));b||(Ht&124)!==0||Au(l,r,i)}return i}function Au(e,r,i){e.flags|=16384,e={getSnapshot:r,value:i},r=it.updateQueue,r===null?(r=Br(),it.updateQueue=r,r.stores=[e]):(i=r.stores,i===null?r.stores=[e]:i.push(e))}function Ll(e,r,i,l){r.value=i,r.getSnapshot=l,Ef(r)&&Mf(e)}function Bo(e,r,i){return i(function(){Ef(r)&&Mf(e)})}function Ef(e){var r=e.getSnapshot;e=e.value;try{var i=r();return!rn(e,i)}catch{return!0}}function Mf(e){var r=Ys(e,2);r!==null&&$a(r,e,2)}function Tl(e){var r=An();if(typeof e=="function"){var i=e;if(e=i(),$n){Dt(!0);try{i()}finally{Dt(!1)}}}return r.memoizedState=r.baseState=e,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:e},r}function qi(e,r,i,l){return e.baseState=i,Ga(e,Ut,typeof l=="function"?l:cr)}function ah(e,r,i,l,p){if(Ff(e))throw Error(s(485));if(e=r.action,e!==null){var b={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){b.listeners.push(N)}};ee.T!==null?i(!0):b.isTransition=!1,l(b),i=r.pending,i===null?(b.next=r.pending=b,Of(r,b)):(b.next=i.next,r.pending=i.next=b)}}function Of(e,r){var i=r.action,l=r.payload,p=e.state;if(r.isTransition){var b=ee.T,N={};ee.T=N;try{var B=i(p,l),re=ee.S;re!==null&&re(N,B),Rf(e,r,B)}catch(je){Po(e,r,je)}finally{ee.T=b}}else try{b=i(p,l),Rf(e,r,b)}catch(je){Po(e,r,je)}}function Rf(e,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){vc(e,r,l)},function(l){return Po(e,r,l)}):vc(e,r,i)}function vc(e,r,i){r.status="fulfilled",r.value=i,yc(r),e.state=i,r=e.pending,r!==null&&(i=r.next,i===r?e.pending=null:(i=i.next,r.next=i,Of(e,i)))}function Po(e,r,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,yc(r),r=r.next;while(r!==l)}e.action=null}function yc(e){e=e.listeners;for(var r=0;r<e.length;r++)(0,e[r])()}function bc(e,r){return r}function Cl(e,r){if(ln){var i=Dn.formState;if(i!==null){e:{var l=it;if(ln){if(In){t:{for(var p=In,b=li;p.nodeType!==8;){if(!b){p=null;break t}if(p=Wi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){In=Wi(p.nextSibling),l=p.data==="F!";break e}}Ks(l)}l=!1}l&&(r=i[0])}}return i=An(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bc,lastRenderedState:r},i.queue=l,i=k0.bind(null,it,l),l.dispatch=i,l=Tl(!1),b=ih.bind(null,it,!1,l.queue),l=An(),p={state:r,dispatch:null,action:e,pending:null},l.queue=p,i=ah.bind(null,it,p,b,i),p.dispatch=i,l.memoizedState=e,[r,i,!1]}function ju(e){var r=sn();return qo(r,Ut,e)}function qo(e,r,i){if(r=Ga(e,r,bc)[0],e=di(cr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=kr(r)}catch(N){throw N===R?P:N}else l=r;r=sn();var p=r.queue,b=p.dispatch;return i!==r.memoizedState&&(it.flags|=2048,Ui(9,El(),Df.bind(null,p,i),null)),[l,b,e]}function Df(e,r){e.action=r}function zf(e){var r=sn(),i=Ut;if(i!==null)return qo(r,i,e);sn(),r=r.memoizedState,i=sn();var l=i.queue.dispatch;return i.memoizedState=e,[r,l,!1]}function Ui(e,r,i,l){return e={tag:e,create:i,deps:l,inst:r,next:null},r=it.updateQueue,r===null&&(r=Br(),it.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,r.lastEffect=e),e}function El(){return{destroy:void 0,resource:void 0}}function ku(){return sn().memoizedState}function Va(e,r,i,l){var p=An();l=l===void 0?null:l,it.flags|=e,p.memoizedState=Ui(1|r,El(),i,l)}function Uo(e,r,i,l){var p=sn();l=l===void 0?null:l;var b=p.memoizedState.inst;Ut!==null&&l!==null&&ur(l,Ut.memoizedState.deps)?p.memoizedState=Ui(r,b,i,l):(it.flags|=e,p.memoizedState=Ui(1|r,b,i,l))}function xc(e,r){Va(8390656,8,e,r)}function Bf(e,r){Uo(2048,8,e,r)}function wc(e,r){return Uo(4,2,e,r)}function $s(e,r){return Uo(4,4,e,r)}function Pf(e,r){if(typeof r=="function"){e=e();var i=r(e);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function Sc(e,r,i){i=i!=null?i.concat([e]):null,Uo(4,4,Pf.bind(null,r,e),i)}function _c(){}function Ac(e,r){var i=sn();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&ur(r,l[1])?l[0]:(i.memoizedState=[e,r],e)}function qf(e,r){var i=sn();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&ur(r,l[1]))return l[0];if(l=e(),$n){Dt(!0);try{e()}finally{Dt(!1)}}return i.memoizedState=[l,r],l}function Js(e,r,i){return i===void 0||(Ht&1073741824)!==0?e.memoizedState=r:(e.memoizedState=i,e=Sp(),it.lanes|=e,Vo|=e,i)}function Nu(e,r,i,l){return rn(i,r)?i:Ot.current!==null?(e=Js(e,i,l),rn(e,r)||(Pr=!0),e):(Ht&42)===0?(Pr=!0,e.memoizedState=i):(e=Sp(),it.lanes|=e,Vo|=e,r)}function Ml(e,r,i,l,p){var b=ce.p;ce.p=b!==0&&8>b?b:8;var N=ee.T,B={};ee.T=B,ih(e,!1,r,i);try{var re=p(),je=ee.S;if(je!==null&&je(B,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var Be=Cf(re,l);Lc(e,r,Be,Za(e))}else Lc(e,r,l,Za(e))}catch(Ue){Lc(e,r,{then:function(){},status:"rejected",reason:Ue},Za())}finally{ce.p=b,ee.T=N}}function Fi(){}function hi(e,r,i,l){if(e.tag!==5)throw Error(s(476));var p=Ii(e).queue;Ml(e,p,r,le,i===null?Fi:function(){return Ol(e),i(l)})}function Ii(e){var r=e.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:le},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:i},next:null},e.memoizedState=r,e=e.alternate,e!==null&&(e.memoizedState=r),r}function Ol(e){var r=Ii(e).next.queue;Lc(e,r,{},Za())}function Rl(){return or(Gc)}function jc(){return sn().memoizedState}function Uf(){return sn().memoizedState}function kc(e){for(var r=e.return;r!==null;){switch(r.tag){case 24:case 3:var i=Za();e=Re(i);var l=He(r,e,i);l!==null&&($a(l,r,i),qe(l,r,i)),r={cache:gc()},e.payload=r;return}r=r.return}}function Nc(e,r,i){var l=Za();i={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},Ff(e)?N0(r,i):(i=mu(e,r,i,l),i!==null&&($a(i,e,l),L0(i,r,l)))}function k0(e,r,i){var l=Za();Lc(e,r,i,l)}function Lc(e,r,i,l){var p={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ff(e))N0(r,p);else{var b=e.alternate;if(e.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var N=r.lastRenderedState,B=b(N,i);if(p.hasEagerState=!0,p.eagerState=B,rn(B,N))return xl(e,r,p,0),Dn===null&&bl(),!1}catch{}if(i=mu(e,r,p,l),i!==null)return $a(i,e,l),L0(i,r,l),!0}return!1}function ih(e,r,i,l){if(l={lane:2,revertLane:Bh(),action:l,hasEagerState:!1,eagerState:null,next:null},Ff(e)){if(r)throw Error(s(479))}else r=mu(e,i,l,2),r!==null&&$a(r,e,2)}function Ff(e){var r=e.alternate;return e===it||r!==null&&r===it}function N0(e,r){Zn=Tn=!0;var i=e.pending;i===null?r.next=r:(r.next=i.next,i.next=r),e.pending=r}function L0(e,r,i){if((i&4194048)!==0){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,ni(e,i)}}var If={readContext:or,use:dn,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt},T0={readContext:or,use:dn,useCallback:function(e,r){return An().memoizedState=[e,r===void 0?null:r],e},useContext:or,useEffect:xc,useImperativeHandle:function(e,r,i){i=i!=null?i.concat([e]):null,Va(4194308,4,Pf.bind(null,r,e),i)},useLayoutEffect:function(e,r){return Va(4194308,4,e,r)},useInsertionEffect:function(e,r){Va(4,2,e,r)},useMemo:function(e,r){var i=An();r=r===void 0?null:r;var l=e();if($n){Dt(!0);try{e()}finally{Dt(!1)}}return i.memoizedState=[l,r],l},useReducer:function(e,r,i){var l=An();if(i!==void 0){var p=i(r);if($n){Dt(!0);try{i(r)}finally{Dt(!1)}}}else p=r;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=Nc.bind(null,it,e),[l.memoizedState,e]},useRef:function(e){var r=An();return e={current:e},r.memoizedState=e},useState:function(e){e=Tl(e);var r=e.queue,i=k0.bind(null,it,r);return r.dispatch=i,[e.memoizedState,i]},useDebugValue:_c,useDeferredValue:function(e,r){var i=An();return Js(i,e,r)},useTransition:function(){var e=Tl(!1);return e=Ml.bind(null,it,e.queue,!0,!1),An().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,r,i){var l=it,p=An();if(ln){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),Dn===null)throw Error(s(349));(on&124)!==0||Au(l,r,i)}p.memoizedState=i;var b={value:i,getSnapshot:r};return p.queue=b,xc(Bo.bind(null,l,b,e),[e]),l.flags|=2048,Ui(9,El(),Ll.bind(null,l,b,i,r),null),i},useId:function(){var e=An(),r=Dn.identifierPrefix;if(ln){var i=Di,l=Ri;i=(l&~(1<<32-Ke(l)-1)).toString(32)+i,r="«"+r+"R"+i,i=Hn++,0<i&&(r+="H"+i.toString(32)),r+="»"}else i=Wn++,r="«"+r+"r"+i.toString(32)+"»";return e.memoizedState=r},useHostTransitionStatus:Rl,useFormState:Cl,useActionState:Cl,useOptimistic:function(e){var r=An();r.memoizedState=r.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=ih.bind(null,it,!0,i),i.dispatch=r,[e,r]},useMemoCache:Zr,useCacheRefresh:function(){return An().memoizedState=kc.bind(null,it)}},C0={readContext:or,use:dn,useCallback:Ac,useContext:or,useEffect:Bf,useImperativeHandle:Sc,useInsertionEffect:wc,useLayoutEffect:$s,useMemo:qf,useReducer:di,useRef:ku,useState:function(){return di(cr)},useDebugValue:_c,useDeferredValue:function(e,r){var i=sn();return Nu(i,Ut.memoizedState,e,r)},useTransition:function(){var e=di(cr)[0],r=sn().memoizedState;return[typeof e=="boolean"?e:kr(e),r]},useSyncExternalStore:Nl,useId:jc,useHostTransitionStatus:Rl,useFormState:ju,useActionState:ju,useOptimistic:function(e,r){var i=sn();return qi(i,Ut,e,r)},useMemoCache:Zr,useCacheRefresh:Uf},ov={readContext:or,use:dn,useCallback:Ac,useContext:or,useEffect:Bf,useImperativeHandle:Sc,useInsertionEffect:wc,useLayoutEffect:$s,useMemo:qf,useReducer:fr,useRef:ku,useState:function(){return fr(cr)},useDebugValue:_c,useDeferredValue:function(e,r){var i=sn();return Ut===null?Js(i,e,r):Nu(i,Ut.memoizedState,e,r)},useTransition:function(){var e=fr(cr)[0],r=sn().memoizedState;return[typeof e=="boolean"?e:kr(e),r]},useSyncExternalStore:Nl,useId:jc,useHostTransitionStatus:Rl,useFormState:zf,useActionState:zf,useOptimistic:function(e,r){var i=sn();return Ut!==null?qi(i,Ut,e,r):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Zr,useCacheRefresh:Uf},Lu=null,Tc=0;function Hf(e){var r=Tc;return Tc+=1,Lu===null&&(Lu=[]),Ae(Lu,e,r)}function Cc(e,r){r=r.props.ref,e.ref=r!==void 0?r:null}function Wf(e,r){throw r.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(r),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)))}function E0(e){var r=e._init;return r(e._payload)}function M0(e){function r(ge,fe){if(e){var xe=ge.deletions;xe===null?(ge.deletions=[fe],ge.flags|=16):xe.push(fe)}}function i(ge,fe){if(!e)return null;for(;fe!==null;)r(ge,fe),fe=fe.sibling;return null}function l(ge){for(var fe=new Map;ge!==null;)ge.key!==null?fe.set(ge.key,ge):fe.set(ge.index,ge),ge=ge.sibling;return fe}function p(ge,fe){return ge=oi(ge,fe),ge.index=0,ge.sibling=null,ge}function b(ge,fe,xe){return ge.index=xe,e?(xe=ge.alternate,xe!==null?(xe=xe.index,xe<fe?(ge.flags|=67108866,fe):xe):(ge.flags|=67108866,fe)):(ge.flags|=1048576,fe)}function N(ge){return e&&ge.alternate===null&&(ge.flags|=67108866),ge}function B(ge,fe,xe,Pe){return fe===null||fe.tag!==6?(fe=yu(xe,ge.mode,Pe),fe.return=ge,fe):(fe=p(fe,xe),fe.return=ge,fe)}function re(ge,fe,xe,Pe){var ot=xe.type;return ot===k?Be(ge,fe,xe.props.children,Pe,xe.key):fe!==null&&(fe.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===se&&E0(ot)===fe.type)?(fe=p(fe,xe.props),Cc(fe,xe),fe.return=ge,fe):(fe=Vs(xe.type,xe.key,xe.props,null,ge.mode,Pe),Cc(fe,xe),fe.return=ge,fe)}function je(ge,fe,xe,Pe){return fe===null||fe.tag!==4||fe.stateNode.containerInfo!==xe.containerInfo||fe.stateNode.implementation!==xe.implementation?(fe=Sl(xe,ge.mode,Pe),fe.return=ge,fe):(fe=p(fe,xe.children||[]),fe.return=ge,fe)}function Be(ge,fe,xe,Pe,ot){return fe===null||fe.tag!==7?(fe=Mi(xe,ge.mode,Pe,ot),fe.return=ge,fe):(fe=p(fe,xe),fe.return=ge,fe)}function Ue(ge,fe,xe){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return fe=yu(""+fe,ge.mode,xe),fe.return=ge,fe;if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case j:return xe=Vs(fe.type,fe.key,fe.props,null,ge.mode,xe),Cc(xe,fe),xe.return=ge,xe;case w:return fe=Sl(fe,ge.mode,xe),fe.return=ge,fe;case se:var Pe=fe._init;return fe=Pe(fe._payload),Ue(ge,fe,xe)}if(Se(fe)||U(fe))return fe=Mi(fe,ge.mode,xe,null),fe.return=ge,fe;if(typeof fe.then=="function")return Ue(ge,Hf(fe),xe);if(fe.$$typeof===W)return Ue(ge,ps(ge,fe),xe);Wf(ge,fe)}return null}function Te(ge,fe,xe,Pe){var ot=fe!==null?fe.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return ot!==null?null:B(ge,fe,""+xe,Pe);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case j:return xe.key===ot?re(ge,fe,xe,Pe):null;case w:return xe.key===ot?je(ge,fe,xe,Pe):null;case se:return ot=xe._init,xe=ot(xe._payload),Te(ge,fe,xe,Pe)}if(Se(xe)||U(xe))return ot!==null?null:Be(ge,fe,xe,Pe,null);if(typeof xe.then=="function")return Te(ge,fe,Hf(xe),Pe);if(xe.$$typeof===W)return Te(ge,fe,ps(ge,xe),Pe);Wf(ge,xe)}return null}function Ce(ge,fe,xe,Pe,ot){if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return ge=ge.get(xe)||null,B(fe,ge,""+Pe,ot);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case j:return ge=ge.get(Pe.key===null?xe:Pe.key)||null,re(fe,ge,Pe,ot);case w:return ge=ge.get(Pe.key===null?xe:Pe.key)||null,je(fe,ge,Pe,ot);case se:var Xt=Pe._init;return Pe=Xt(Pe._payload),Ce(ge,fe,xe,Pe,ot)}if(Se(Pe)||U(Pe))return ge=ge.get(xe)||null,Be(fe,ge,Pe,ot,null);if(typeof Pe.then=="function")return Ce(ge,fe,xe,Hf(Pe),ot);if(Pe.$$typeof===W)return Ce(ge,fe,xe,ps(fe,Pe),ot);Wf(fe,Pe)}return null}function Rt(ge,fe,xe,Pe){for(var ot=null,Xt=null,yt=fe,Ct=fe=0,Ur=null;yt!==null&&Ct<xe.length;Ct++){yt.index>Ct?(Ur=yt,yt=null):Ur=yt.sibling;var cn=Te(ge,yt,xe[Ct],Pe);if(cn===null){yt===null&&(yt=Ur);break}e&&yt&&cn.alternate===null&&r(ge,yt),fe=b(cn,fe,Ct),Xt===null?ot=cn:Xt.sibling=cn,Xt=cn,yt=Ur}if(Ct===xe.length)return i(ge,yt),ln&&Xs(ge,Ct),ot;if(yt===null){for(;Ct<xe.length;Ct++)yt=Ue(ge,xe[Ct],Pe),yt!==null&&(fe=b(yt,fe,Ct),Xt===null?ot=yt:Xt.sibling=yt,Xt=yt);return ln&&Xs(ge,Ct),ot}for(yt=l(yt);Ct<xe.length;Ct++)Ur=Ce(yt,ge,Ct,xe[Ct],Pe),Ur!==null&&(e&&Ur.alternate!==null&&yt.delete(Ur.key===null?Ct:Ur.key),fe=b(Ur,fe,Ct),Xt===null?ot=Ur:Xt.sibling=Ur,Xt=Ur);return e&&yt.forEach(function(nl){return r(ge,nl)}),ln&&Xs(ge,Ct),ot}function Lt(ge,fe,xe,Pe){if(xe==null)throw Error(s(151));for(var ot=null,Xt=null,yt=fe,Ct=fe=0,Ur=null,cn=xe.next();yt!==null&&!cn.done;Ct++,cn=xe.next()){yt.index>Ct?(Ur=yt,yt=null):Ur=yt.sibling;var nl=Te(ge,yt,cn.value,Pe);if(nl===null){yt===null&&(yt=Ur);break}e&&yt&&nl.alternate===null&&r(ge,yt),fe=b(nl,fe,Ct),Xt===null?ot=nl:Xt.sibling=nl,Xt=nl,yt=Ur}if(cn.done)return i(ge,yt),ln&&Xs(ge,Ct),ot;if(yt===null){for(;!cn.done;Ct++,cn=xe.next())cn=Ue(ge,cn.value,Pe),cn!==null&&(fe=b(cn,fe,Ct),Xt===null?ot=cn:Xt.sibling=cn,Xt=cn);return ln&&Xs(ge,Ct),ot}for(yt=l(yt);!cn.done;Ct++,cn=xe.next())cn=Ce(yt,ge,Ct,cn.value,Pe),cn!==null&&(e&&cn.alternate!==null&&yt.delete(cn.key===null?Ct:cn.key),fe=b(cn,fe,Ct),Xt===null?ot=cn:Xt.sibling=cn,Xt=cn);return e&&yt.forEach(function(ly){return r(ge,ly)}),ln&&Xs(ge,Ct),ot}function kn(ge,fe,xe,Pe){if(typeof xe=="object"&&xe!==null&&xe.type===k&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case j:e:{for(var ot=xe.key;fe!==null;){if(fe.key===ot){if(ot=xe.type,ot===k){if(fe.tag===7){i(ge,fe.sibling),Pe=p(fe,xe.props.children),Pe.return=ge,ge=Pe;break e}}else if(fe.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===se&&E0(ot)===fe.type){i(ge,fe.sibling),Pe=p(fe,xe.props),Cc(Pe,xe),Pe.return=ge,ge=Pe;break e}i(ge,fe);break}else r(ge,fe);fe=fe.sibling}xe.type===k?(Pe=Mi(xe.props.children,ge.mode,Pe,xe.key),Pe.return=ge,ge=Pe):(Pe=Vs(xe.type,xe.key,xe.props,null,ge.mode,Pe),Cc(Pe,xe),Pe.return=ge,ge=Pe)}return N(ge);case w:e:{for(ot=xe.key;fe!==null;){if(fe.key===ot)if(fe.tag===4&&fe.stateNode.containerInfo===xe.containerInfo&&fe.stateNode.implementation===xe.implementation){i(ge,fe.sibling),Pe=p(fe,xe.children||[]),Pe.return=ge,ge=Pe;break e}else{i(ge,fe);break}else r(ge,fe);fe=fe.sibling}Pe=Sl(xe,ge.mode,Pe),Pe.return=ge,ge=Pe}return N(ge);case se:return ot=xe._init,xe=ot(xe._payload),kn(ge,fe,xe,Pe)}if(Se(xe))return Rt(ge,fe,xe,Pe);if(U(xe)){if(ot=U(xe),typeof ot!="function")throw Error(s(150));return xe=ot.call(xe),Lt(ge,fe,xe,Pe)}if(typeof xe.then=="function")return kn(ge,fe,Hf(xe),Pe);if(xe.$$typeof===W)return kn(ge,fe,ps(ge,xe),Pe);Wf(ge,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,fe!==null&&fe.tag===6?(i(ge,fe.sibling),Pe=p(fe,xe),Pe.return=ge,ge=Pe):(i(ge,fe),Pe=yu(xe,ge.mode,Pe),Pe.return=ge,ge=Pe),N(ge)):i(ge,fe)}return function(ge,fe,xe,Pe){try{Tc=0;var ot=kn(ge,fe,xe,Pe);return Lu=null,ot}catch(yt){if(yt===R||yt===P)throw yt;var Xt=zr(29,yt,null,ge.mode);return Xt.lanes=Pe,Xt.return=ge,Xt}}}var Tu=M0(!0),O0=M0(!1),pi=oe(null),gs=null;function Fo(e){var r=e.alternate;q(Nr,Nr.current&1),q(pi,e),gs===null&&(r===null||Ot.current!==null||r.memoizedState!==null)&&(gs=e)}function R0(e){if(e.tag===22){if(q(Nr,Nr.current),q(pi,e),gs===null){var r=e.alternate;r!==null&&r.memoizedState!==null&&(gs=e)}}else Io()}function Io(){q(Nr,Nr.current),q(pi,pi.current)}function eo(e){L(pi),gs===e&&(gs=null),L(Nr)}var Nr=oe(0);function Yf(e){for(var r=e;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||Xh(i)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function sh(e,r,i,l){r=e.memoizedState,i=i(l,r),i=i==null?r:y({},r,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var oh={enqueueSetState:function(e,r,i){e=e._reactInternals;var l=Za(),p=Re(l);p.payload=r,i!=null&&(p.callback=i),r=He(e,p,l),r!==null&&($a(r,e,l),qe(r,e,l))},enqueueReplaceState:function(e,r,i){e=e._reactInternals;var l=Za(),p=Re(l);p.tag=1,p.payload=r,i!=null&&(p.callback=i),r=He(e,p,l),r!==null&&($a(r,e,l),qe(r,e,l))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var i=Za(),l=Re(i);l.tag=2,r!=null&&(l.callback=r),r=He(e,l,i),r!==null&&($a(r,e,i),qe(r,e,i))}};function D0(e,r,i,l,p,b,N){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,b,N):r.prototype&&r.prototype.isPureReactComponent?!Is(i,l)||!Is(p,b):!0}function z0(e,r,i,l){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==e&&oh.enqueueReplaceState(r,r.state,null)}function Dl(e,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(e=e.defaultProps){i===r&&(i=y({},i));for(var p in e)i[p]===void 0&&(i[p]=e[p])}return i}var Gf=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function B0(e){Gf(e)}function P0(e){console.error(e)}function q0(e){Gf(e)}function Vf(e,r){try{var i=e.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function U0(e,r,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function lh(e,r,i){return i=Re(i),i.tag=3,i.payload={element:null},i.callback=function(){Vf(e,r)},i}function F0(e){return e=Re(e),e.tag=3,e}function I0(e,r,i,l){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var b=l.value;e.payload=function(){return p(b)},e.callback=function(){U0(r,i,l)}}var N=i.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(e.callback=function(){U0(r,i,l),typeof p!="function"&&(Qo===null?Qo=new Set([this]):Qo.add(this));var B=l.stack;this.componentDidCatch(l.value,{componentStack:B!==null?B:""})})}function lv(e,r,i,l,p){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&zo(r,i,p,!0),i=pi.current,i!==null){switch(i.tag){case 13:return gs===null?Mh():i.alternate===null&&ar===0&&(ar=3),i.flags&=-257,i.flags|=65536,i.lanes=p,l===I?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),Rh(e,l,p)),!1;case 22:return i.flags|=65536,l===I?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),Rh(e,l,p)),!1}throw Error(s(435,i.tag))}return Rh(e,l,p),Mh(),!1}if(ln)return r=pi.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,l!==pc&&(e=Error(s(422),{cause:l}),Do(da(e,i)))):(l!==pc&&(r=Error(s(423),{cause:l}),Do(da(r,i))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=da(l,i),p=lh(e.stateNode,l,p),ft(e,p),ar!==4&&(ar=2)),!1;var b=Error(s(520),{cause:l});if(b=da(b,i),Bc===null?Bc=[b]:Bc.push(b),ar!==4&&(ar=2),r===null)return!0;l=da(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,e=p&-p,i.lanes|=e,e=lh(i.stateNode,l,e),ft(i,e),!1;case 1:if(r=i.type,b=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Qo===null||!Qo.has(b))))return i.flags|=65536,p&=-p,i.lanes|=p,p=F0(p),I0(p,e,i,l),ft(i,p),!1}i=i.return}while(i!==null);return!1}var H0=Error(s(461)),Pr=!1;function $r(e,r,i,l){r.child=e===null?O0(r,null,i,l):Tu(r,e.child,i,l)}function W0(e,r,i,l,p){i=i.render;var b=r.ref;if("ref"in l){var N={};for(var B in l)B!=="ref"&&(N[B]=l[B])}else N=l;return fi(r),l=ma(e,r,i,N,b,p),B=Jn(),e!==null&&!Pr?(Kr(e,r,p),to(e,r,p)):(ln&&B&&_l(r),r.flags|=1,$r(e,r,l,p),r.child)}function Y0(e,r,i,l,p){if(e===null){var b=i.type;return typeof b=="function"&&!Oo(b)&&b.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=b,G0(e,r,b,l,p)):(e=Vs(i.type,null,l,r,r.mode,p),e.ref=r.ref,e.return=r,r.child=e)}if(b=e.child,!mh(e,p)){var N=b.memoizedProps;if(i=i.compare,i=i!==null?i:Is,i(N,l)&&e.ref===r.ref)return to(e,r,p)}return r.flags|=1,e=oi(b,l),e.ref=r.ref,e.return=r,r.child=e}function G0(e,r,i,l,p){if(e!==null){var b=e.memoizedProps;if(Is(b,l)&&e.ref===r.ref)if(Pr=!1,r.pendingProps=l=b,mh(e,p))(e.flags&131072)!==0&&(Pr=!0);else return r.lanes=e.lanes,to(e,r,p)}return uh(e,r,i,l,p)}function V0(e,r,i){var l=r.pendingProps,p=l.children,b=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((r.flags&128)!==0){if(l=b!==null?b.baseLanes|i:i,e!==null){for(p=r.child=e.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;r.childLanes=b&~l}else r.childLanes=0,r.child=null;return Q0(e,r,l,i)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},e!==null&&A(r,b!==null?b.cachePool:null),b!==null?Ge(r,b):qn(),R0(r);else return r.lanes=r.childLanes=536870912,Q0(e,r,b!==null?b.baseLanes|i:i,i)}else b!==null?(A(r,b.cachePool),Ge(r,b),Io(),r.memoizedState=null):(e!==null&&A(r,null),qn(),Io());return $r(e,r,p,i),r.child}function Q0(e,r,i,l){var p=S();return p=p===null?null:{parent:lr._currentValue,pool:p},r.memoizedState={baseLanes:i,cachePool:p},e!==null&&A(r,null),qn(),R0(r),e!==null&&zo(e,r,l,!0),null}function Qf(e,r){var i=r.ref;if(i===null)e!==null&&e.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(r.flags|=4194816)}}function uh(e,r,i,l,p){return fi(r),i=ma(e,r,i,l,void 0,p),l=Jn(),e!==null&&!Pr?(Kr(e,r,p),to(e,r,p)):(ln&&l&&_l(r),r.flags|=1,$r(e,r,i,p),r.child)}function X0(e,r,i,l,p,b){return fi(r),r.updateQueue=null,i=Xr(r,l,i,p),Yn(e),l=Jn(),e!==null&&!Pr?(Kr(e,r,b),to(e,r,b)):(ln&&l&&_l(r),r.flags|=1,$r(e,r,i,b),r.child)}function K0(e,r,i,l,p){if(fi(r),r.stateNode===null){var b=yr,N=i.contextType;typeof N=="object"&&N!==null&&(b=or(N)),b=new i(l,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=oh,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=l,b.state=r.memoizedState,b.refs={},we(r),N=i.contextType,b.context=typeof N=="object"&&N!==null?or(N):yr,b.state=r.memoizedState,N=i.getDerivedStateFromProps,typeof N=="function"&&(sh(r,i,N,l),b.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(N=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),N!==b.state&&oh.enqueueReplaceState(b,b.state,null),tt(r,l,b,p),zt(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(e===null){b=r.stateNode;var B=r.memoizedProps,re=Dl(i,B);b.props=re;var je=b.context,Be=i.contextType;N=yr,typeof Be=="object"&&Be!==null&&(N=or(Be));var Ue=i.getDerivedStateFromProps;Be=typeof Ue=="function"||typeof b.getSnapshotBeforeUpdate=="function",B=r.pendingProps!==B,Be||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(B||je!==N)&&z0(r,b,l,N),Me=!1;var Te=r.memoizedState;b.state=Te,tt(r,l,b,p),zt(),je=r.memoizedState,B||Te!==je||Me?(typeof Ue=="function"&&(sh(r,i,Ue,l),je=r.memoizedState),(re=Me||D0(r,i,re,l,Te,je,N))?(Be||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=je),b.props=l,b.state=je,b.context=N,l=re):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{b=r.stateNode,De(e,r),N=r.memoizedProps,Be=Dl(i,N),b.props=Be,Ue=r.pendingProps,Te=b.context,je=i.contextType,re=yr,typeof je=="object"&&je!==null&&(re=or(je)),B=i.getDerivedStateFromProps,(je=typeof B=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==Ue||Te!==re)&&z0(r,b,l,re),Me=!1,Te=r.memoizedState,b.state=Te,tt(r,l,b,p),zt();var Ce=r.memoizedState;N!==Ue||Te!==Ce||Me||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof B=="function"&&(sh(r,i,B,l),Ce=r.memoizedState),(Be=Me||D0(r,i,Be,l,Te,Ce,re)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(je||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(l,Ce,re),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(l,Ce,re)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===e.memoizedProps&&Te===e.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&Te===e.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=Ce),b.props=l,b.state=Ce,b.context=re,l=Be):(typeof b.componentDidUpdate!="function"||N===e.memoizedProps&&Te===e.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&Te===e.memoizedState||(r.flags|=1024),l=!1)}return b=l,Qf(e,r),l=(r.flags&128)!==0,b||l?(b=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,e!==null&&l?(r.child=Tu(r,e.child,null,p),r.child=Tu(r,null,i,p)):$r(e,r,i,p),r.memoizedState=b.state,e=r.child):e=to(e,r,p),e}function Z0(e,r,i,l){return ga(),r.flags|=256,$r(e,r,i,l),r.child}var ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fh(e){return{baseLanes:e,cachePool:M()}}function dh(e,r,i){return e=e!==null?e.childLanes&~i:0,r&&(e|=gi),e}function $0(e,r,i){var l=r.pendingProps,p=!1,b=(r.flags&128)!==0,N;if((N=b)||(N=e!==null&&e.memoizedState===null?!1:(Nr.current&2)!==0),N&&(p=!0,r.flags&=-129),N=(r.flags&32)!==0,r.flags&=-33,e===null){if(ln){if(p?Fo(r):Io(),ln){var B=In,re;if(re=B){e:{for(re=B,B=li;re.nodeType!==8;){if(!B){B=null;break e}if(re=Wi(re.nextSibling),re===null){B=null;break e}}B=re}B!==null?(r.memoizedState={dehydrated:B,treeContext:Qs!==null?{id:Ri,overflow:Di}:null,retryLane:536870912,hydrationErrors:null},re=zr(18,null,null,0),re.stateNode=B,re.return=r,r.child=re,sr=r,In=null,re=!0):re=!1}re||Ks(r)}if(B=r.memoizedState,B!==null&&(B=B.dehydrated,B!==null))return Xh(B)?r.lanes=32:r.lanes=536870912,null;eo(r)}return B=l.children,l=l.fallback,p?(Io(),p=r.mode,B=Xf({mode:"hidden",children:B},p),l=Mi(l,p,i,null),B.return=r,l.return=r,B.sibling=l,r.child=B,p=r.child,p.memoizedState=fh(i),p.childLanes=dh(e,N,i),r.memoizedState=ch,l):(Fo(r),hh(r,B))}if(re=e.memoizedState,re!==null&&(B=re.dehydrated,B!==null)){if(b)r.flags&256?(Fo(r),r.flags&=-257,r=ph(e,r,i)):r.memoizedState!==null?(Io(),r.child=e.child,r.flags|=128,r=null):(Io(),p=l.fallback,B=r.mode,l=Xf({mode:"visible",children:l.children},B),p=Mi(p,B,i,null),p.flags|=2,l.return=r,p.return=r,l.sibling=p,r.child=l,Tu(r,e.child,null,i),l=r.child,l.memoizedState=fh(i),l.childLanes=dh(e,N,i),r.memoizedState=ch,r=p);else if(Fo(r),Xh(B)){if(N=B.nextSibling&&B.nextSibling.dataset,N)var je=N.dgst;N=je,l=Error(s(419)),l.stack="",l.digest=N,Do({value:l,source:null,stack:null}),r=ph(e,r,i)}else if(Pr||zo(e,r,i,!1),N=(i&e.childLanes)!==0,Pr||N){if(N=Dn,N!==null&&(l=i&-i,l=(l&42)!==0?1:pn(l),l=(l&(N.suspendedLanes|i))!==0?0:l,l!==0&&l!==re.retryLane))throw re.retryLane=l,Ys(e,l),$a(N,e,l),H0;B.data==="$?"||Mh(),r=ph(e,r,i)}else B.data==="$?"?(r.flags|=192,r.child=e.child,r=null):(e=re.treeContext,In=Wi(B.nextSibling),sr=r,ln=!0,ds=null,li=!1,e!==null&&(Ta[pa++]=Ri,Ta[pa++]=Di,Ta[pa++]=Qs,Ri=e.id,Di=e.overflow,Qs=r),r=hh(r,l.children),r.flags|=4096);return r}return p?(Io(),p=l.fallback,B=r.mode,re=e.child,je=re.sibling,l=oi(re,{mode:"hidden",children:l.children}),l.subtreeFlags=re.subtreeFlags&65011712,je!==null?p=oi(je,p):(p=Mi(p,B,i,null),p.flags|=2),p.return=r,l.return=r,l.sibling=p,r.child=l,l=p,p=r.child,B=e.child.memoizedState,B===null?B=fh(i):(re=B.cachePool,re!==null?(je=lr._currentValue,re=re.parent!==je?{parent:je,pool:je}:re):re=M(),B={baseLanes:B.baseLanes|i,cachePool:re}),p.memoizedState=B,p.childLanes=dh(e,N,i),r.memoizedState=ch,l):(Fo(r),i=e.child,e=i.sibling,i=oi(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,e!==null&&(N=r.deletions,N===null?(r.deletions=[e],r.flags|=16):N.push(e)),r.child=i,r.memoizedState=null,i)}function hh(e,r){return r=Xf({mode:"visible",children:r},e.mode),r.return=e,e.child=r}function Xf(e,r){return e=zr(22,e,null,r),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function ph(e,r,i){return Tu(r,e.child,null,i),e=hh(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function J0(e,r,i){e.lanes|=r;var l=e.alternate;l!==null&&(l.lanes|=r),xu(e.return,r,i)}function gh(e,r,i,l,p){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:p}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=i,b.tailMode=p)}function ep(e,r,i){var l=r.pendingProps,p=l.revealOrder,b=l.tail;if($r(e,r,l.children,i),l=Nr.current,(l&2)!==0)l=l&1|2,r.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&J0(e,i,r);else if(e.tag===19)J0(e,i,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(q(Nr,l),p){case"forwards":for(i=r.child,p=null;i!==null;)e=i.alternate,e!==null&&Yf(e)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),gh(r,!1,p,i,b);break;case"backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(e=p.alternate,e!==null&&Yf(e)===null){r.child=p;break}e=p.sibling,p.sibling=i,i=p,p=e}gh(r,!0,i,null,b);break;case"together":gh(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function to(e,r,i){if(e!==null&&(r.dependencies=e.dependencies),Vo|=r.lanes,(i&r.childLanes)===0)if(e!==null){if(zo(e,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(e!==null&&r.child!==e.child)throw Error(s(153));if(r.child!==null){for(e=r.child,i=oi(e,e.pendingProps),r.child=i,i.return=r;e.sibling!==null;)e=e.sibling,i=i.sibling=oi(e,e.pendingProps),i.return=r;i.sibling=null}return r.child}function mh(e,r){return(e.lanes&r)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function uv(e,r,i){switch(r.tag){case 3:_e(r,r.stateNode.containerInfo),hs(r,lr,e.memoizedState.cache),ga();break;case 27:case 5:ze(r);break;case 4:_e(r,r.stateNode.containerInfo);break;case 10:hs(r,r.type,r.memoizedProps.value);break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated!==null?(Fo(r),r.flags|=128,null):(i&r.child.childLanes)!==0?$0(e,r,i):(Fo(r),e=to(e,r,i),e!==null?e.sibling:null);Fo(r);break;case 19:var p=(e.flags&128)!==0;if(l=(i&r.childLanes)!==0,l||(zo(e,r,i,!1),l=(i&r.childLanes)!==0),p){if(l)return ep(e,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),q(Nr,Nr.current),l)break;return null;case 22:case 23:return r.lanes=0,V0(e,r,i);case 24:hs(r,lr,e.memoizedState.cache)}return to(e,r,i)}function tp(e,r,i){if(e!==null)if(e.memoizedProps!==r.pendingProps)Pr=!0;else{if(!mh(e,i)&&(r.flags&128)===0)return Pr=!1,uv(e,r,i);Pr=(e.flags&131072)!==0}else Pr=!1,ln&&(r.flags&1048576)!==0&&jf(r,bu,r.index);switch(r.lanes=0,r.tag){case 16:e:{e=r.pendingProps;var l=r.elementType,p=l._init;if(l=p(l._payload),r.type=l,typeof l=="function")Oo(l)?(e=Dl(l,e),r.tag=1,r=K0(null,r,l,e,i)):(r.tag=0,r=uh(null,r,l,e,i));else{if(l!=null){if(p=l.$$typeof,p===F){r.tag=11,r=W0(null,r,l,e,i);break e}else if(p===ke){r.tag=14,r=Y0(null,r,l,e,i);break e}}throw r=ne(l)||l,Error(s(306,r,""))}}return r;case 0:return uh(e,r,r.type,r.pendingProps,i);case 1:return l=r.type,p=Dl(l,r.pendingProps),K0(e,r,l,p,i);case 3:e:{if(_e(r,r.stateNode.containerInfo),e===null)throw Error(s(387));l=r.pendingProps;var b=r.memoizedState;p=b.element,De(e,r),tt(r,l,null,i);var N=r.memoizedState;if(l=N.cache,hs(r,lr,l),l!==b.cache&&wu(r,[lr],i,!0),zt(),l=N.element,b.isDehydrated)if(b={element:l,isDehydrated:!1,cache:N.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=Z0(e,r,l,i);break e}else if(l!==p){p=da(Error(s(424)),r),Do(p),r=Z0(e,r,l,i);break e}else for(e=r.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,In=Wi(e.firstChild),sr=r,ln=!0,ds=null,li=!0,i=O0(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ga(),l===p){r=to(e,r,i);break e}$r(e,r,l,i)}r=r.child}return r;case 26:return Qf(e,r),e===null?(i=i2(r.type,null,r.pendingProps,null))?r.memoizedState=i:ln||(i=r.type,e=r.pendingProps,l=ud(ae.current).createElement(i),l[Mn]=r,l[Nn]=e,ea(l,i,e),Rn(l),r.stateNode=l):r.memoizedState=i2(r.type,e.memoizedProps,r.pendingProps,e.memoizedState),null;case 27:return ze(r),e===null&&ln&&(l=r.stateNode=n2(r.type,r.pendingProps,ae.current),sr=r,li=!0,p=In,Zo(r.type)?(Kh=p,In=Wi(l.firstChild)):In=p),$r(e,r,r.pendingProps.children,i),Qf(e,r),e===null&&(r.flags|=4194304),r.child;case 5:return e===null&&ln&&((p=l=In)&&(l=Bv(l,r.type,r.pendingProps,li),l!==null?(r.stateNode=l,sr=r,In=Wi(l.firstChild),li=!1,p=!0):p=!1),p||Ks(r)),ze(r),p=r.type,b=r.pendingProps,N=e!==null?e.memoizedProps:null,l=b.children,Gh(p,b)?l=null:N!==null&&Gh(p,N)&&(r.flags|=32),r.memoizedState!==null&&(p=ma(e,r,yn,null,null,i),Gc._currentValue=p),Qf(e,r),$r(e,r,l,i),r.child;case 6:return e===null&&ln&&((e=i=In)&&(i=Pv(i,r.pendingProps,li),i!==null?(r.stateNode=i,sr=r,In=null,e=!0):e=!1),e||Ks(r)),null;case 13:return $0(e,r,i);case 4:return _e(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=Tu(r,null,l,i):$r(e,r,l,i),r.child;case 11:return W0(e,r,r.type,r.pendingProps,i);case 7:return $r(e,r,r.pendingProps,i),r.child;case 8:return $r(e,r,r.pendingProps.children,i),r.child;case 12:return $r(e,r,r.pendingProps.children,i),r.child;case 10:return l=r.pendingProps,hs(r,r.type,l.value),$r(e,r,l.children,i),r.child;case 9:return p=r.type._context,l=r.pendingProps.children,fi(r),p=or(p),l=l(p),r.flags|=1,$r(e,r,l,i),r.child;case 14:return Y0(e,r,r.type,r.pendingProps,i);case 15:return G0(e,r,r.type,r.pendingProps,i);case 19:return ep(e,r,i);case 31:return l=r.pendingProps,i=r.mode,l={mode:l.mode,children:l.children},e===null?(i=Xf(l,i),i.ref=r.ref,r.child=i,i.return=r,r=i):(i=oi(e.child,l),i.ref=r.ref,r.child=i,i.return=r,r=i),r;case 22:return V0(e,r,i);case 24:return fi(r),l=or(lr),e===null?(p=S(),p===null&&(p=Dn,b=gc(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=i),p=b),r.memoizedState={parent:l,cache:p},we(r),hs(r,lr,p)):((e.lanes&i)!==0&&(De(e,r),tt(r,null,null,i),zt()),p=e.memoizedState,b=r.memoizedState,p.parent!==l?(p={parent:l,cache:l},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),hs(r,lr,l)):(l=b.cache,hs(r,lr,l),l!==p.cache&&wu(r,[lr],i,!0))),$r(e,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function no(e){e.flags|=4}function np(e,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!c2(r)){if(r=pi.current,r!==null&&((on&4194048)===on?gs!==null:(on&62914560)!==on&&(on&536870912)===0||r!==gs))throw X=I,z;e.flags|=8192}}function Kf(e,r){r!==null&&(e.flags|=4),e.flags&16384&&(r=e.tag!==22?At():536870912,e.lanes|=r,Ou|=r)}function Ec(e,r){if(!ln)switch(e.tailMode){case"hidden":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function er(e){var r=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(r)for(var p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=i,r}function cv(e,r,i){var l=r.pendingProps;switch(Al(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(r),null;case 1:return er(r),null;case 3:return i=r.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ci(lr),Ee(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Qr(r)?no(r):e===null||e.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nf())),er(r),null;case 26:return i=r.memoizedState,e===null?(no(r),i!==null?(er(r),np(r,i)):(er(r),r.flags&=-16777217)):i?i!==e.memoizedState?(no(r),er(r),np(r,i)):(er(r),r.flags&=-16777217):(e.memoizedProps!==l&&no(r),er(r),r.flags&=-16777217),null;case 27:We(r),i=ae.current;var p=r.type;if(e!==null&&r.stateNode!=null)e.memoizedProps!==l&&no(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return er(r),null}e=V.current,Qr(r)?kf(r):(e=n2(p,l,i),r.stateNode=e,no(r))}return er(r),null;case 5:if(We(r),i=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==l&&no(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return er(r),null}if(e=V.current,Qr(r))kf(r);else{switch(p=ud(ae.current),e){case 1:e=p.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:e=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":e=p.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":e=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?p.createElement(i,{is:l.is}):p.createElement(i)}}e[Mn]=r,e[Nn]=l;e:for(p=r.child;p!==null;){if(p.tag===5||p.tag===6)e.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===r)break e;for(;p.sibling===null;){if(p.return===null||p.return===r)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}r.stateNode=e;e:switch(ea(e,i,l),i){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&no(r)}}return er(r),r.flags&=-16777217,null;case 6:if(e&&r.stateNode!=null)e.memoizedProps!==l&&no(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(e=ae.current,Qr(r)){if(e=r.stateNode,i=r.memoizedProps,l=null,p=sr,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[Mn]=r,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Xp(e.nodeValue,i)),e||Ks(r)}else e=ud(e).createTextNode(l),e[Mn]=r,r.stateNode=e}return er(r),null;case 13:if(l=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=Qr(r),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(s(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Mn]=r}else ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;er(r),p=!1}else p=Nf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(eo(r),r):(eo(r),null)}if(eo(r),(r.flags&128)!==0)return r.lanes=i,r;if(i=l!==null,e=e!==null&&e.memoizedState!==null,i){l=r.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool);var b=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(b=l.memoizedState.cachePool.pool),b!==p&&(l.flags|=2048)}return i!==e&&i&&(r.child.flags|=8192),Kf(r,r.updateQueue),er(r),null;case 4:return Ee(),e===null&&Fh(r.stateNode.containerInfo),er(r),null;case 10:return ci(r.type),er(r),null;case 19:if(L(Nr),p=r.memoizedState,p===null)return er(r),null;if(l=(r.flags&128)!==0,b=p.rendering,b===null)if(l)Ec(p,!1);else{if(ar!==0||e!==null&&(e.flags&128)!==0)for(e=r.child;e!==null;){if(b=Yf(e),b!==null){for(r.flags|=128,Ec(p,!1),e=b.updateQueue,r.updateQueue=e,Kf(r,e),r.subtreeFlags=0,e=i,i=r.child;i!==null;)wl(i,e),i=i.sibling;return q(Nr,Nr.current&1|2),r.child}e=e.sibling}p.tail!==null&&xt()>Jf&&(r.flags|=128,l=!0,Ec(p,!1),r.lanes=4194304)}else{if(!l)if(e=Yf(b),e!==null){if(r.flags|=128,l=!0,e=e.updateQueue,r.updateQueue=e,Kf(r,e),Ec(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!ln)return er(r),null}else 2*xt()-p.renderingStartTime>Jf&&i!==536870912&&(r.flags|=128,l=!0,Ec(p,!1),r.lanes=4194304);p.isBackwards?(b.sibling=r.child,r.child=b):(e=p.last,e!==null?e.sibling=b:r.child=b,p.last=b)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=xt(),r.sibling=null,e=Nr.current,q(Nr,l?e&1|2:e&1),r):(er(r),null);case 22:case 23:return eo(r),Bt(),l=r.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(er(r),r.subtreeFlags&6&&(r.flags|=8192)):er(r),i=r.updateQueue,i!==null&&Kf(r,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),e!==null&&L(v),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),ci(lr),er(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function fv(e,r){switch(Al(r),r.tag){case 1:return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return ci(lr),Ee(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 26:case 27:case 5:return We(r),null;case 13:if(eo(r),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ga()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return L(Nr),null;case 4:return Ee(),null;case 10:return ci(r.type),null;case 22:case 23:return eo(r),Bt(),e!==null&&L(v),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 24:return ci(lr),null;case 25:return null;default:return null}}function rp(e,r){switch(Al(r),r.tag){case 3:ci(lr),Ee();break;case 26:case 27:case 5:We(r);break;case 4:Ee();break;case 13:eo(r);break;case 19:L(Nr);break;case 10:ci(r.type);break;case 22:case 23:eo(r),Bt(),e!==null&&L(v);break;case 24:ci(lr)}}function Mc(e,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var p=l.next;i=p;do{if((i.tag&e)===e){l=void 0;var b=i.create,N=i.inst;l=b(),N.destroy=l}i=i.next}while(i!==p)}}catch(B){Cn(r,r.return,B)}}function Ho(e,r,i){try{var l=r.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var b=p.next;l=b;do{if((l.tag&e)===e){var N=l.inst,B=N.destroy;if(B!==void 0){N.destroy=void 0,p=r;var re=i,je=B;try{je()}catch(Be){Cn(p,re,Be)}}}l=l.next}while(l!==b)}}catch(Be){Cn(r,r.return,Be)}}function ap(e){var r=e.updateQueue;if(r!==null){var i=e.stateNode;try{rr(r,i)}catch(l){Cn(e,e.return,l)}}}function ip(e,r,i){i.props=Dl(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Cn(e,r,l)}}function Oc(e,r){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(p){Cn(e,r,p)}}function ms(e,r){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(p){Cn(e,r,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){Cn(e,r,p)}else i.current=null}function sp(e){var r=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(p){Cn(e,e.return,p)}}function vh(e,r,i){try{var l=e.stateNode;Mv(l,e.type,i,r),l[Nn]=r}catch(p){Cn(e,e.return,p)}}function op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zo(e.type)||e.tag===4}function yh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||op(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zo(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bh(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(e),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=ld));else if(l!==4&&(l===27&&Zo(e.type)&&(i=e.stateNode,r=null),e=e.child,e!==null))for(bh(e,r,i),e=e.sibling;e!==null;)bh(e,r,i),e=e.sibling}function Zf(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.insertBefore(e,r):i.appendChild(e);else if(l!==4&&(l===27&&Zo(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Zf(e,r,i),e=e.sibling;e!==null;)Zf(e,r,i),e=e.sibling}function lp(e){var r=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);ea(r,l,i),r[Mn]=e,r[Nn]=i}catch(b){Cn(e,e.return,b)}}var ro=!1,dr=!1,xh=!1,up=typeof WeakSet=="function"?WeakSet:Set,qr=null;function dv(e,r){if(e=e.containerInfo,Wh=gd,e=To(e),Hs(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var p=l.anchorOffset,b=l.focusNode;l=l.focusOffset;try{i.nodeType,b.nodeType}catch{i=null;break e}var N=0,B=-1,re=-1,je=0,Be=0,Ue=e,Te=null;t:for(;;){for(var Ce;Ue!==i||p!==0&&Ue.nodeType!==3||(B=N+p),Ue!==b||l!==0&&Ue.nodeType!==3||(re=N+l),Ue.nodeType===3&&(N+=Ue.nodeValue.length),(Ce=Ue.firstChild)!==null;)Te=Ue,Ue=Ce;for(;;){if(Ue===e)break t;if(Te===i&&++je===p&&(B=N),Te===b&&++Be===l&&(re=N),(Ce=Ue.nextSibling)!==null)break;Ue=Te,Te=Ue.parentNode}Ue=Ce}i=B===-1||re===-1?null:{start:B,end:re}}else i=null}i=i||{start:0,end:0}}else i=null;for(Yh={focusedElem:e,selectionRange:i},gd=!1,qr=r;qr!==null;)if(r=qr,e=r.child,(r.subtreeFlags&1024)!==0&&e!==null)e.return=r,qr=e;else for(;qr!==null;){switch(r=qr,b=r.alternate,e=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&b!==null){e=void 0,i=r,p=b.memoizedProps,b=b.memoizedState,l=i.stateNode;try{var Rt=Dl(i.type,p,i.elementType===i.type);e=l.getSnapshotBeforeUpdate(Rt,b),l.__reactInternalSnapshotBeforeUpdate=e}catch(Lt){Cn(i,i.return,Lt)}}break;case 3:if((e&1024)!==0){if(e=r.stateNode.containerInfo,i=e.nodeType,i===9)Qh(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qh(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=r.sibling,e!==null){e.return=r.return,qr=e;break}qr=r.return}}function cp(e,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Wo(e,i),l&4&&Mc(5,i);break;case 1:if(Wo(e,i),l&4)if(e=i.stateNode,r===null)try{e.componentDidMount()}catch(N){Cn(i,i.return,N)}else{var p=Dl(i.type,r.memoizedProps);r=r.memoizedState;try{e.componentDidUpdate(p,r,e.__reactInternalSnapshotBeforeUpdate)}catch(N){Cn(i,i.return,N)}}l&64&&ap(i),l&512&&Oc(i,i.return);break;case 3:if(Wo(e,i),l&64&&(e=i.updateQueue,e!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{rr(e,r)}catch(N){Cn(i,i.return,N)}}break;case 27:r===null&&l&4&&lp(i);case 26:case 5:Wo(e,i),r===null&&l&4&&sp(i),l&512&&Oc(i,i.return);break;case 12:Wo(e,i);break;case 13:Wo(e,i),l&4&&hp(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=wv.bind(null,i),qv(e,i))));break;case 22:if(l=i.memoizedState!==null||ro,!l){r=r!==null&&r.memoizedState!==null||dr,p=ro;var b=dr;ro=l,(dr=r)&&!b?Yo(e,i,(i.subtreeFlags&8772)!==0):Wo(e,i),ro=p,dr=b}break;case 30:break;default:Wo(e,i)}}function fp(e){var r=e.alternate;r!==null&&(e.alternate=null,fp(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&oa(r)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Gn=null,Ca=!1;function ao(e,r,i){for(i=i.child;i!==null;)dp(e,r,i),i=i.sibling}function dp(e,r,i){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(wt,i)}catch{}switch(i.tag){case 26:dr||ms(i,r),ao(e,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:dr||ms(i,r);var l=Gn,p=Ca;Zo(i.type)&&(Gn=i.stateNode,Ca=!1),ao(e,r,i),Ic(i.stateNode),Gn=l,Ca=p;break;case 5:dr||ms(i,r);case 6:if(l=Gn,p=Ca,Gn=null,ao(e,r,i),Gn=l,Ca=p,Gn!==null)if(Ca)try{(Gn.nodeType===9?Gn.body:Gn.nodeName==="HTML"?Gn.ownerDocument.body:Gn).removeChild(i.stateNode)}catch(b){Cn(i,r,b)}else try{Gn.removeChild(i.stateNode)}catch(b){Cn(i,r,b)}break;case 18:Gn!==null&&(Ca?(e=Gn,e2(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Kc(e)):e2(Gn,i.stateNode));break;case 4:l=Gn,p=Ca,Gn=i.stateNode.containerInfo,Ca=!0,ao(e,r,i),Gn=l,Ca=p;break;case 0:case 11:case 14:case 15:dr||Ho(2,i,r),dr||Ho(4,i,r),ao(e,r,i);break;case 1:dr||(ms(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&ip(i,r,l)),ao(e,r,i);break;case 21:ao(e,r,i);break;case 22:dr=(l=dr)||i.memoizedState!==null,ao(e,r,i),dr=l;break;default:ao(e,r,i)}}function hp(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kc(e)}catch(i){Cn(r,r.return,i)}}function hv(e){switch(e.tag){case 13:case 19:var r=e.stateNode;return r===null&&(r=e.stateNode=new up),r;case 22:return e=e.stateNode,r=e._retryCache,r===null&&(r=e._retryCache=new up),r;default:throw Error(s(435,e.tag))}}function wh(e,r){var i=hv(e);r.forEach(function(l){var p=Sv.bind(null,e,l);i.has(l)||(i.add(l),l.then(p,p))})}function Qa(e,r){var i=r.deletions;if(i!==null)for(var l=0;l<i.length;l++){var p=i[l],b=e,N=r,B=N;e:for(;B!==null;){switch(B.tag){case 27:if(Zo(B.type)){Gn=B.stateNode,Ca=!1;break e}break;case 5:Gn=B.stateNode,Ca=!1;break e;case 3:case 4:Gn=B.stateNode.containerInfo,Ca=!0;break e}B=B.return}if(Gn===null)throw Error(s(160));dp(b,N,p),Gn=null,Ca=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)pp(r,e),r=r.sibling}var Hi=null;function pp(e,r){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qa(r,e),Xa(e),l&4&&(Ho(3,e,e.return),Mc(3,e),Ho(5,e,e.return));break;case 1:Qa(r,e),Xa(e),l&512&&(dr||i===null||ms(i,i.return)),l&64&&ro&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var p=Hi;if(Qa(r,e),Xa(e),l&512&&(dr||i===null||ms(i,i.return)),l&4){var b=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":b=p.getElementsByTagName("title")[0],(!b||b[ba]||b[Mn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(l),p.head.insertBefore(b,p.querySelector("head > title"))),ea(b,l,i),b[Mn]=e,Rn(b),l=b;break e;case"link":var N=l2("link","href",p).get(l+(i.href||""));if(N){for(var B=0;B<N.length;B++)if(b=N[B],b.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&b.getAttribute("rel")===(i.rel==null?null:i.rel)&&b.getAttribute("title")===(i.title==null?null:i.title)&&b.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){N.splice(B,1);break t}}b=p.createElement(l),ea(b,l,i),p.head.appendChild(b);break;case"meta":if(N=l2("meta","content",p).get(l+(i.content||""))){for(B=0;B<N.length;B++)if(b=N[B],b.getAttribute("content")===(i.content==null?null:""+i.content)&&b.getAttribute("name")===(i.name==null?null:i.name)&&b.getAttribute("property")===(i.property==null?null:i.property)&&b.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&b.getAttribute("charset")===(i.charSet==null?null:i.charSet)){N.splice(B,1);break t}}b=p.createElement(l),ea(b,l,i),p.head.appendChild(b);break;default:throw Error(s(468,l))}b[Mn]=e,Rn(b),l=b}e.stateNode=l}else u2(p,e.type,e.stateNode);else e.stateNode=o2(p,l,e.memoizedProps);else b!==l?(b===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):b.count--,l===null?u2(p,e.type,e.stateNode):o2(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&vh(e,e.memoizedProps,i.memoizedProps)}break;case 27:Qa(r,e),Xa(e),l&512&&(dr||i===null||ms(i,i.return)),i!==null&&l&4&&vh(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Qa(r,e),Xa(e),l&512&&(dr||i===null||ms(i,i.return)),e.flags&32){p=e.stateNode;try{Yr(p,"")}catch(Ce){Cn(e,e.return,Ce)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,vh(e,p,i!==null?i.memoizedProps:p)),l&1024&&(xh=!0);break;case 6:if(Qa(r,e),Xa(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ce){Cn(e,e.return,Ce)}}break;case 3:if(dd=null,p=Hi,Hi=cd(r.containerInfo),Qa(r,e),Hi=p,Xa(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Kc(r.containerInfo)}catch(Ce){Cn(e,e.return,Ce)}xh&&(xh=!1,gp(e));break;case 4:l=Hi,Hi=cd(e.stateNode.containerInfo),Qa(r,e),Xa(e),Hi=l;break;case 12:Qa(r,e),Xa(e);break;case 13:Qa(r,e),Xa(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Nh=xt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wh(e,l)));break;case 22:p=e.memoizedState!==null;var re=i!==null&&i.memoizedState!==null,je=ro,Be=dr;if(ro=je||p,dr=Be||re,Qa(r,e),dr=Be,ro=je,Xa(e),l&8192)e:for(r=e.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(i===null||re||ro||dr||zl(e)),i=null,r=e;;){if(r.tag===5||r.tag===26){if(i===null){re=i=r;try{if(b=re.stateNode,p)N=b.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{B=re.stateNode;var Ue=re.memoizedProps.style,Te=Ue!=null&&Ue.hasOwnProperty("display")?Ue.display:null;B.style.display=Te==null||typeof Te=="boolean"?"":(""+Te).trim()}}catch(Ce){Cn(re,re.return,Ce)}}}else if(r.tag===6){if(i===null){re=r;try{re.stateNode.nodeValue=p?"":re.memoizedProps}catch(Ce){Cn(re,re.return,Ce)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,wh(e,i))));break;case 19:Qa(r,e),Xa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wh(e,l)));break;case 30:break;case 21:break;default:Qa(r,e),Xa(e)}}function Xa(e){var r=e.flags;if(r&2){try{for(var i,l=e.return;l!==null;){if(op(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var p=i.stateNode,b=yh(e);Zf(e,b,p);break;case 5:var N=i.stateNode;i.flags&32&&(Yr(N,""),i.flags&=-33);var B=yh(e);Zf(e,B,N);break;case 3:case 4:var re=i.stateNode.containerInfo,je=yh(e);bh(e,je,re);break;default:throw Error(s(161))}}catch(Be){Cn(e,e.return,Be)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var r=e;gp(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),e=e.sibling}}function Wo(e,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)cp(e,r.alternate,r),r=r.sibling}function zl(e){for(e=e.child;e!==null;){var r=e;switch(r.tag){case 0:case 11:case 14:case 15:Ho(4,r,r.return),zl(r);break;case 1:ms(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&ip(r,r.return,i),zl(r);break;case 27:Ic(r.stateNode);case 26:case 5:ms(r,r.return),zl(r);break;case 22:r.memoizedState===null&&zl(r);break;case 30:zl(r);break;default:zl(r)}e=e.sibling}}function Yo(e,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var l=r.alternate,p=e,b=r,N=b.flags;switch(b.tag){case 0:case 11:case 15:Yo(p,b,i),Mc(4,b);break;case 1:if(Yo(p,b,i),l=b,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(je){Cn(l,l.return,je)}if(l=b,p=l.updateQueue,p!==null){var B=l.stateNode;try{var re=p.shared.hiddenCallbacks;if(re!==null)for(p.shared.hiddenCallbacks=null,p=0;p<re.length;p++)Qt(re[p],B)}catch(je){Cn(l,l.return,je)}}i&&N&64&&ap(b),Oc(b,b.return);break;case 27:lp(b);case 26:case 5:Yo(p,b,i),i&&l===null&&N&4&&sp(b),Oc(b,b.return);break;case 12:Yo(p,b,i);break;case 13:Yo(p,b,i),i&&N&4&&hp(p,b);break;case 22:b.memoizedState===null&&Yo(p,b,i),Oc(b,b.return);break;case 30:break;default:Yo(p,b,i)}r=r.sibling}}function Sh(e,r){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(e=r.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&jl(i))}function _h(e,r){e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&jl(e))}function vs(e,r,i,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mp(e,r,i,l),r=r.sibling}function mp(e,r,i,l){var p=r.flags;switch(r.tag){case 0:case 11:case 15:vs(e,r,i,l),p&2048&&Mc(9,r);break;case 1:vs(e,r,i,l);break;case 3:vs(e,r,i,l),p&2048&&(e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&jl(e)));break;case 12:if(p&2048){vs(e,r,i,l),e=r.stateNode;try{var b=r.memoizedProps,N=b.id,B=b.onPostCommit;typeof B=="function"&&B(N,r.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(re){Cn(r,r.return,re)}}else vs(e,r,i,l);break;case 13:vs(e,r,i,l);break;case 23:break;case 22:b=r.stateNode,N=r.alternate,r.memoizedState!==null?b._visibility&2?vs(e,r,i,l):Rc(e,r):b._visibility&2?vs(e,r,i,l):(b._visibility|=2,Cu(e,r,i,l,(r.subtreeFlags&10256)!==0)),p&2048&&Sh(N,r);break;case 24:vs(e,r,i,l),p&2048&&_h(r.alternate,r);break;default:vs(e,r,i,l)}}function Cu(e,r,i,l,p){for(p=p&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var b=e,N=r,B=i,re=l,je=N.flags;switch(N.tag){case 0:case 11:case 15:Cu(b,N,B,re,p),Mc(8,N);break;case 23:break;case 22:var Be=N.stateNode;N.memoizedState!==null?Be._visibility&2?Cu(b,N,B,re,p):Rc(b,N):(Be._visibility|=2,Cu(b,N,B,re,p)),p&&je&2048&&Sh(N.alternate,N);break;case 24:Cu(b,N,B,re,p),p&&je&2048&&_h(N.alternate,N);break;default:Cu(b,N,B,re,p)}r=r.sibling}}function Rc(e,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=e,l=r,p=l.flags;switch(l.tag){case 22:Rc(i,l),p&2048&&Sh(l.alternate,l);break;case 24:Rc(i,l),p&2048&&_h(l.alternate,l);break;default:Rc(i,l)}r=r.sibling}}var Dc=8192;function Eu(e){if(e.subtreeFlags&Dc)for(e=e.child;e!==null;)vp(e),e=e.sibling}function vp(e){switch(e.tag){case 26:Eu(e),e.flags&Dc&&e.memoizedState!==null&&$v(Hi,e.memoizedState,e.memoizedProps);break;case 5:Eu(e);break;case 3:case 4:var r=Hi;Hi=cd(e.stateNode.containerInfo),Eu(e),Hi=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dc,Dc=16777216,Eu(e),Dc=r):Eu(e));break;default:Eu(e)}}function yp(e){var r=e.alternate;if(r!==null&&(e=r.child,e!==null)){r.child=null;do r=e.sibling,e.sibling=null,e=r;while(e!==null)}}function zc(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];qr=l,xp(l,e)}yp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bp(e),e=e.sibling}function bp(e){switch(e.tag){case 0:case 11:case 15:zc(e),e.flags&2048&&Ho(9,e,e.return);break;case 3:zc(e);break;case 12:zc(e);break;case 22:var r=e.stateNode;e.memoizedState!==null&&r._visibility&2&&(e.return===null||e.return.tag!==13)?(r._visibility&=-3,$f(e)):zc(e);break;default:zc(e)}}function $f(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];qr=l,xp(l,e)}yp(e)}for(e=e.child;e!==null;){switch(r=e,r.tag){case 0:case 11:case 15:Ho(8,r,r.return),$f(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,$f(r));break;default:$f(r)}e=e.sibling}}function xp(e,r){for(;qr!==null;){var i=qr;switch(i.tag){case 0:case 11:case 15:Ho(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:jl(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,qr=l;else e:for(i=e;qr!==null;){l=qr;var p=l.sibling,b=l.return;if(fp(l),l===i){qr=null;break e}if(p!==null){p.return=b,qr=p;break e}qr=b}}}var pv={getCacheForType:function(e){var r=or(lr),i=r.data.get(e);return i===void 0&&(i=e(),r.data.set(e,i)),i}},gv=typeof WeakMap=="function"?WeakMap:Map,bn=0,Dn=null,Zt=null,on=0,xn=0,Ka=null,Go=!1,Mu=!1,Ah=!1,io=0,ar=0,Vo=0,Bl=0,jh=0,gi=0,Ou=0,Bc=null,Ea=null,kh=!1,Nh=0,Jf=1/0,ed=null,Qo=null,Jr=0,Xo=null,Ru=null,Du=0,Lh=0,Th=null,wp=null,Pc=0,Ch=null;function Za(){if((bn&2)!==0&&on!==0)return on&-on;if(ee.T!==null){var e=Zs;return e!==0?e:Bh()}return Ra()}function Sp(){gi===0&&(gi=(on&536870912)===0||ln?vt():536870912);var e=pi.current;return e!==null&&(e.flags|=32),gi}function $a(e,r,i){(e===Dn&&(xn===2||xn===9)||e.cancelPendingCommit!==null)&&(zu(e,0),Ko(e,on,gi,!1)),Et(e,i),((bn&2)===0||e!==Dn)&&(e===Dn&&((bn&2)===0&&(Bl|=i),ar===4&&Ko(e,on,gi,!1)),ys(e))}function _p(e,r,i){if((bn&6)!==0)throw Error(s(327));var l=!i&&(r&124)===0&&(r&e.expiredLanes)===0||rt(e,r),p=l?yv(e,r):Oh(e,r,!0),b=l;do{if(p===0){Mu&&!l&&Ko(e,r,0,!1);break}else{if(i=e.current.alternate,b&&!mv(i)){p=Oh(e,r,!1),b=!1;continue}if(p===2){if(b=r,e.errorRecoveryDisabledLanes&b)var N=0;else N=e.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){r=N;e:{var B=e;p=Bc;var re=B.current.memoizedState.isDehydrated;if(re&&(zu(B,N).flags|=256),N=Oh(B,N,!1),N!==2){if(Ah&&!re){B.errorRecoveryDisabledLanes|=b,Bl|=b,p=4;break e}b=Ea,Ea=p,b!==null&&(Ea===null?Ea=b:Ea.push.apply(Ea,b))}p=N}if(b=!1,p!==2)continue}}if(p===1){zu(e,0),Ko(e,r,0,!0);break}e:{switch(l=e,b=p,b){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Ko(l,r,gi,!Go);break e;case 2:Ea=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(p=Nh+300-xt(),10<p)){if(Ko(l,r,gi,!Go),Kt(l,0,!0)!==0)break e;l.timeoutHandle=$p(Ap.bind(null,l,i,Ea,ed,kh,r,gi,Bl,Ou,Go,b,2,-0,0),p);break e}Ap(l,i,Ea,ed,kh,r,gi,Bl,Ou,Go,b,0,-0,0)}}break}while(!0);ys(e)}function Ap(e,r,i,l,p,b,N,B,re,je,Be,Ue,Te,Ce){if(e.timeoutHandle=-1,Ue=r.subtreeFlags,(Ue&8192||(Ue&16785408)===16785408)&&(Yc={stylesheets:null,count:0,unsuspend:Zv},vp(r),Ue=Jv(),Ue!==null)){e.cancelPendingCommit=Ue(Ep.bind(null,e,r,b,i,l,p,N,B,re,Be,1,Te,Ce)),Ko(e,b,N,!je);return}Ep(e,r,b,i,l,p,N,B,re)}function mv(e){for(var r=e;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var p=i[l],b=p.getSnapshot;p=p.value;try{if(!rn(b(),p))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ko(e,r,i,l){r&=~jh,r&=~Bl,e.suspendedLanes|=r,e.pingedLanes&=~r,l&&(e.warmLanes|=r),l=e.expirationTimes;for(var p=r;0<p;){var b=31-Ke(p),N=1<<b;l[b]=-1,p&=~N}i!==0&&nn(e,i,r)}function td(){return(bn&6)===0?(qc(0),!1):!0}function Eh(){if(Zt!==null){if(xn===0)var e=Zt.return;else e=Zt,Bi=br=null,jr(e),Lu=null,Tc=0,e=Zt;for(;e!==null;)rp(e.alternate,e),e=e.return;Zt=null}}function zu(e,r){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Rv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Eh(),Dn=e,Zt=i=oi(e.current,null),on=r,xn=0,Ka=null,Go=!1,Mu=rt(e,r),Ah=!1,Ou=gi=jh=Bl=Vo=ar=0,Ea=Bc=null,kh=!1,(r&8)!==0&&(r|=r&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=r;0<l;){var p=31-Ke(l),b=1<<p;r|=e[p],l&=~b}return io=r,bl(),i}function jp(e,r){it=null,ee.H=If,r===R||r===P?(r=de(),xn=3):r===z?(r=de(),xn=4):xn=r===H0?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ka=r,Zt===null&&(ar=1,Vf(e,da(r,e.current)))}function kp(){var e=ee.H;return ee.H=If,e===null?If:e}function Np(){var e=ee.A;return ee.A=pv,e}function Mh(){ar=4,Go||(on&4194048)!==on&&pi.current!==null||(Mu=!0),(Vo&134217727)===0&&(Bl&134217727)===0||Dn===null||Ko(Dn,on,gi,!1)}function Oh(e,r,i){var l=bn;bn|=2;var p=kp(),b=Np();(Dn!==e||on!==r)&&(ed=null,zu(e,r)),r=!1;var N=ar;e:do try{if(xn!==0&&Zt!==null){var B=Zt,re=Ka;switch(xn){case 8:Eh(),N=6;break e;case 3:case 2:case 9:case 6:pi.current===null&&(r=!0);var je=xn;if(xn=0,Ka=null,Bu(e,B,re,je),i&&Mu){N=0;break e}break;default:je=xn,xn=0,Ka=null,Bu(e,B,re,je)}}vv(),N=ar;break}catch(Be){jp(e,Be)}while(!0);return r&&e.shellSuspendCounter++,Bi=br=null,bn=l,ee.H=p,ee.A=b,Zt===null&&(Dn=null,on=0,bl()),N}function vv(){for(;Zt!==null;)Lp(Zt)}function yv(e,r){var i=bn;bn|=2;var l=kp(),p=Np();Dn!==e||on!==r?(ed=null,Jf=xt()+500,zu(e,r)):Mu=rt(e,r);e:do try{if(xn!==0&&Zt!==null){r=Zt;var b=Ka;t:switch(xn){case 1:xn=0,Ka=null,Bu(e,r,b,1);break;case 2:case 9:if(Z(b)){xn=0,Ka=null,Tp(r);break}r=function(){xn!==2&&xn!==9||Dn!==e||(xn=7),ys(e)},b.then(r,r);break e;case 3:xn=7;break e;case 4:xn=5;break e;case 7:Z(b)?(xn=0,Ka=null,Tp(r)):(xn=0,Ka=null,Bu(e,r,b,7));break;case 5:var N=null;switch(Zt.tag){case 26:N=Zt.memoizedState;case 5:case 27:var B=Zt;if(!N||c2(N)){xn=0,Ka=null;var re=B.sibling;if(re!==null)Zt=re;else{var je=B.return;je!==null?(Zt=je,nd(je)):Zt=null}break t}}xn=0,Ka=null,Bu(e,r,b,5);break;case 6:xn=0,Ka=null,Bu(e,r,b,6);break;case 8:Eh(),ar=6;break e;default:throw Error(s(462))}}bv();break}catch(Be){jp(e,Be)}while(!0);return Bi=br=null,ee.H=l,ee.A=p,bn=i,Zt!==null?0:(Dn=null,on=0,bl(),ar)}function bv(){for(;Zt!==null&&!Y();)Lp(Zt)}function Lp(e){var r=tp(e.alternate,e,io);e.memoizedProps=e.pendingProps,r===null?nd(e):Zt=r}function Tp(e){var r=e,i=r.alternate;switch(r.tag){case 15:case 0:r=X0(i,r,r.pendingProps,r.type,void 0,on);break;case 11:r=X0(i,r,r.pendingProps,r.type.render,r.ref,on);break;case 5:jr(r);default:rp(i,r),r=Zt=wl(r,io),r=tp(i,r,io)}e.memoizedProps=e.pendingProps,r===null?nd(e):Zt=r}function Bu(e,r,i,l){Bi=br=null,jr(r),Lu=null,Tc=0;var p=r.return;try{if(lv(e,p,r,i,on)){ar=1,Vf(e,da(i,e.current)),Zt=null;return}}catch(b){if(p!==null)throw Zt=p,b;ar=1,Vf(e,da(i,e.current)),Zt=null;return}r.flags&32768?(ln||l===1?e=!0:Mu||(on&536870912)!==0?e=!1:(Go=e=!0,(l===2||l===9||l===3||l===6)&&(l=pi.current,l!==null&&l.tag===13&&(l.flags|=16384))),Cp(r,e)):nd(r)}function nd(e){var r=e;do{if((r.flags&32768)!==0){Cp(r,Go);return}e=r.return;var i=cv(r.alternate,r,io);if(i!==null){Zt=i;return}if(r=r.sibling,r!==null){Zt=r;return}Zt=r=e}while(r!==null);ar===0&&(ar=5)}function Cp(e,r){do{var i=fv(e.alternate,e);if(i!==null){i.flags&=32767,Zt=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(e=e.sibling,e!==null)){Zt=e;return}Zt=e=i}while(e!==null);ar=6,Zt=null}function Ep(e,r,i,l,p,b,N,B,re){e.cancelPendingCommit=null;do rd();while(Jr!==0);if((bn&6)!==0)throw Error(s(327));if(r!==null){if(r===e.current)throw Error(s(177));if(b=r.lanes|r.childLanes,b|=gu,St(e,i,b,N,B,re),e===Dn&&(Zt=Dn=null,on=0),Ru=r,Xo=e,Du=i,Lh=b,Th=p,wp=l,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_v(Ze,function(){return zp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ee.T,ee.T=null,p=ce.p,ce.p=2,N=bn,bn|=4;try{dv(e,r,i)}finally{bn=N,ce.p=p,ee.T=l}}Jr=1,Mp(),Op(),Rp()}}function Mp(){if(Jr===1){Jr=0;var e=Xo,r=Ru,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=ee.T,ee.T=null;var l=ce.p;ce.p=2;var p=bn;bn|=4;try{pp(r,e);var b=Yh,N=To(e.containerInfo),B=b.focusedElem,re=b.selectionRange;if(N!==B&&B&&B.ownerDocument&&cs(B.ownerDocument.documentElement,B)){if(re!==null&&Hs(B)){var je=re.start,Be=re.end;if(Be===void 0&&(Be=je),"selectionStart"in B)B.selectionStart=je,B.selectionEnd=Math.min(Be,B.value.length);else{var Ue=B.ownerDocument||document,Te=Ue&&Ue.defaultView||window;if(Te.getSelection){var Ce=Te.getSelection(),Rt=B.textContent.length,Lt=Math.min(re.start,Rt),kn=re.end===void 0?Lt:Math.min(re.end,Rt);!Ce.extend&&Lt>kn&&(N=kn,kn=Lt,Lt=N);var ge=Sa(B,Lt),fe=Sa(B,kn);if(ge&&fe&&(Ce.rangeCount!==1||Ce.anchorNode!==ge.node||Ce.anchorOffset!==ge.offset||Ce.focusNode!==fe.node||Ce.focusOffset!==fe.offset)){var xe=Ue.createRange();xe.setStart(ge.node,ge.offset),Ce.removeAllRanges(),Lt>kn?(Ce.addRange(xe),Ce.extend(fe.node,fe.offset)):(xe.setEnd(fe.node,fe.offset),Ce.addRange(xe))}}}}for(Ue=[],Ce=B;Ce=Ce.parentNode;)Ce.nodeType===1&&Ue.push({element:Ce,left:Ce.scrollLeft,top:Ce.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<Ue.length;B++){var Pe=Ue[B];Pe.element.scrollLeft=Pe.left,Pe.element.scrollTop=Pe.top}}gd=!!Wh,Yh=Wh=null}finally{bn=p,ce.p=l,ee.T=i}}e.current=r,Jr=2}}function Op(){if(Jr===2){Jr=0;var e=Xo,r=Ru,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=ee.T,ee.T=null;var l=ce.p;ce.p=2;var p=bn;bn|=4;try{cp(e,r.alternate,r)}finally{bn=p,ce.p=l,ee.T=i}}Jr=3}}function Rp(){if(Jr===4||Jr===3){Jr=0,Qe();var e=Xo,r=Ru,i=Du,l=wp;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jr=5:(Jr=0,Ru=Xo=null,Dp(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Qo=null),Oa(i),r=r.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(wt,r,void 0,(r.current.flags&128)===128)}catch{}if(l!==null){r=ee.T,p=ce.p,ce.p=2,ee.T=null;try{for(var b=e.onRecoverableError,N=0;N<l.length;N++){var B=l[N];b(B.value,{componentStack:B.stack})}}finally{ee.T=r,ce.p=p}}(Du&3)!==0&&rd(),ys(e),p=e.pendingLanes,(i&4194090)!==0&&(p&42)!==0?e===Ch?Pc++:(Pc=0,Ch=e):Pc=0,qc(0)}}function Dp(e,r){(e.pooledCacheLanes&=r)===0&&(r=e.pooledCache,r!=null&&(e.pooledCache=null,jl(r)))}function rd(e){return Mp(),Op(),Rp(),zp()}function zp(){if(Jr!==5)return!1;var e=Xo,r=Lh;Lh=0;var i=Oa(Du),l=ee.T,p=ce.p;try{ce.p=32>i?32:i,ee.T=null,i=Th,Th=null;var b=Xo,N=Du;if(Jr=0,Ru=Xo=null,Du=0,(bn&6)!==0)throw Error(s(331));var B=bn;if(bn|=4,bp(b.current),mp(b,b.current,N,i),bn=B,qc(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(wt,b)}catch{}return!0}finally{ce.p=p,ee.T=l,Dp(e,r)}}function Bp(e,r,i){r=da(i,r),r=lh(e.stateNode,r,2),e=He(e,r,2),e!==null&&(Et(e,2),ys(e))}function Cn(e,r,i){if(e.tag===3)Bp(e,e,i);else for(;r!==null;){if(r.tag===3){Bp(r,e,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Qo===null||!Qo.has(l))){e=da(i,e),i=F0(2),l=He(r,i,2),l!==null&&(I0(i,l,r,e),Et(l,2),ys(l));break}}r=r.return}}function Rh(e,r,i){var l=e.pingCache;if(l===null){l=e.pingCache=new gv;var p=new Set;l.set(r,p)}else p=l.get(r),p===void 0&&(p=new Set,l.set(r,p));p.has(i)||(Ah=!0,p.add(i),e=xv.bind(null,e,r,i),r.then(e,e))}function xv(e,r,i){var l=e.pingCache;l!==null&&l.delete(r),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Dn===e&&(on&i)===i&&(ar===4||ar===3&&(on&62914560)===on&&300>xt()-Nh?(bn&2)===0&&zu(e,0):jh|=i,Ou===on&&(Ou=0)),ys(e)}function Pp(e,r){r===0&&(r=At()),e=Ys(e,r),e!==null&&(Et(e,r),ys(e))}function wv(e){var r=e.memoizedState,i=0;r!==null&&(i=r.retryLane),Pp(e,i)}function Sv(e,r){var i=0;switch(e.tag){case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(i=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(r),Pp(e,i)}function _v(e,r){return Ve(e,r)}var ad=null,Pu=null,Dh=!1,id=!1,zh=!1,Pl=0;function ys(e){e!==Pu&&e.next===null&&(Pu===null?ad=Pu=e:Pu=Pu.next=e),id=!0,Dh||(Dh=!0,jv())}function qc(e,r){if(!zh&&id){zh=!0;do for(var i=!1,l=ad;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var b=0;else{var N=l.suspendedLanes,B=l.pingedLanes;b=(1<<31-Ke(42|e)+1)-1,b&=p&~(N&~B),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(i=!0,Ip(l,b))}else b=on,b=Kt(l,l===Dn?b:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(b&3)===0||rt(l,b)||(i=!0,Ip(l,b));l=l.next}while(i);zh=!1}}function Av(){qp()}function qp(){id=Dh=!1;var e=0;Pl!==0&&(Ov()&&(e=Pl),Pl=0);for(var r=xt(),i=null,l=ad;l!==null;){var p=l.next,b=Up(l,r);b===0?(l.next=null,i===null?ad=p:i.next=p,p===null&&(Pu=i)):(i=l,(e!==0||(b&3)!==0)&&(id=!0)),l=p}qc(e)}function Up(e,r){for(var i=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,b=e.pendingLanes&-62914561;0<b;){var N=31-Ke(b),B=1<<N,re=p[N];re===-1?((B&i)===0||(B&l)!==0)&&(p[N]=un(B,r)):re<=r&&(e.expiredLanes|=B),b&=~B}if(r=Dn,i=on,i=Kt(e,e===r?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===r&&(xn===2||xn===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&dt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||rt(e,i)){if(r=i&-i,r===e.callbackPriority)return r;switch(l!==null&&dt(l),Oa(i)){case 2:case 8:i=mt;break;case 32:i=Ze;break;case 268435456:i=ht;break;default:i=Ze}return l=Fp.bind(null,e),i=Ve(i,l),e.callbackPriority=r,e.callbackNode=i,r}return l!==null&&l!==null&&dt(l),e.callbackPriority=2,e.callbackNode=null,2}function Fp(e,r){if(Jr!==0&&Jr!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(rd()&&e.callbackNode!==i)return null;var l=on;return l=Kt(e,e===Dn?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(_p(e,l,r),Up(e,xt()),e.callbackNode!=null&&e.callbackNode===i?Fp.bind(null,e):null)}function Ip(e,r){if(rd())return null;_p(e,r,!0)}function jv(){Dv(function(){(bn&6)!==0?Ve(Ie,Av):qp()})}function Bh(){return Pl===0&&(Pl=vt()),Pl}function Hp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bo(""+e)}function Wp(e,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,e.id&&i.setAttribute("form",e.id),r.parentNode.insertBefore(i,r),e=new FormData(e),i.parentNode.removeChild(i),e}function kv(e,r,i,l,p){if(r==="submit"&&i&&i.stateNode===p){var b=Hp((p[Nn]||null).action),N=l.submitter;N&&(r=(r=N[Nn]||null)?Hp(r.formAction):N.getAttribute("formAction"),r!==null&&(b=r,N=null));var B=new So("action","action",null,l,p);e.push({event:B,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Pl!==0){var re=N?Wp(p,N):new FormData(p);hi(i,{pending:!0,data:re,method:p.method,action:b},null,re)}}else typeof b=="function"&&(B.preventDefault(),re=N?Wp(p,N):new FormData(p),hi(i,{pending:!0,data:re,method:p.method,action:b},b,re))},currentTarget:p}]})}}for(var Ph=0;Ph<pu.length;Ph++){var qh=pu[Ph],Nv=qh.toLowerCase(),Lv=qh[0].toUpperCase()+qh.slice(1);Na(Nv,"on"+Lv)}Na(Fn,"onAnimationEnd"),Na(nr,"onAnimationIteration"),Na(si,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(yl,"onTransitionRun"),Na(Eo,"onTransitionStart"),Na(hu,"onTransitionCancel"),Na(dc,"onTransitionEnd"),za("onMouseEnter",["mouseout","mouseover"]),za("onMouseLeave",["mouseout","mouseover"]),za("onPointerEnter",["pointerout","pointerover"]),za("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uc="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(" "),Tv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uc));function Yp(e,r){r=(r&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],p=l.event;l=l.listeners;e:{var b=void 0;if(r)for(var N=l.length-1;0<=N;N--){var B=l[N],re=B.instance,je=B.currentTarget;if(B=B.listener,re!==b&&p.isPropagationStopped())break e;b=B,p.currentTarget=je;try{b(p)}catch(Be){Gf(Be)}p.currentTarget=null,b=re}else for(N=0;N<l.length;N++){if(B=l[N],re=B.instance,je=B.currentTarget,B=B.listener,re!==b&&p.isPropagationStopped())break e;b=B,p.currentTarget=je;try{b(p)}catch(Be){Gf(Be)}p.currentTarget=null,b=re}}}}function $t(e,r){var i=r[On];i===void 0&&(i=r[On]=new Set);var l=e+"__bubble";i.has(l)||(Gp(r,e,2,!1),i.add(l))}function Uh(e,r,i){var l=0;r&&(l|=4),Gp(i,e,l,r)}var sd="_reactListening"+Math.random().toString(36).slice(2);function Fh(e){if(!e[sd]){e[sd]=!0,Da.forEach(function(i){i!=="selectionchange"&&(Tv.has(i)||Uh(i,!1,e),Uh(i,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[sd]||(r[sd]=!0,Uh("selectionchange",!1,r))}}function Gp(e,r,i,l){switch(m2(r)){case 2:var p=ny;break;case 8:p=ry;break;default:p=t1}i=p.bind(null,r,i,e),p=void 0,!ml||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(r,i,{capture:!0,passive:p}):e.addEventListener(r,i,!0):p!==void 0?e.addEventListener(r,i,{passive:p}):e.addEventListener(r,i,!1)}function Ih(e,r,i,l,p){var b=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var N=l.tag;if(N===3||N===4){var B=l.stateNode.containerInfo;if(B===p)break;if(N===4)for(N=l.return;N!==null;){var re=N.tag;if((re===3||re===4)&&N.stateNode.containerInfo===p)return;N=N.return}for(;B!==null;){if(N=Ir(B),N===null)return;if(re=N.tag,re===5||re===6||re===26||re===27){l=b=N;continue e}B=B.parentNode}}l=l.return}iu(function(){var je=b,Be=xo(i),Ue=[];e:{var Te=hc.get(e);if(Te!==void 0){var Ce=So,Rt=e;switch(e){case"keypress":if(wi(i)===0)break e;case"keydown":case"keyup":Ce=st;break;case"focusin":Rt="focus",Ce=Fa;break;case"focusout":Rt="blur",Ce=Fa;break;case"beforeblur":case"afterblur":Ce=Fa;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ce=_o;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=ou;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=Jt;break;case Fn:case nr:case si:Ce=uu;break;case dc:Ce=mn;break;case"scroll":case"scrollend":Ce=ns;break;case"wheel":Ce=Ln;break;case"copy":case"cut":case"paste":Ce=Ds;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=Mt;break;case"toggle":case"beforetoggle":Ce=Pn}var Lt=(r&4)!==0,kn=!Lt&&(e==="scroll"||e==="scrollend"),ge=Lt?Te!==null?Te+"Capture":null:Te;Lt=[];for(var fe=je,xe;fe!==null;){var Pe=fe;if(xe=Pe.stateNode,Pe=Pe.tag,Pe!==5&&Pe!==26&&Pe!==27||xe===null||ge===null||(Pe=Ms(fe,ge),Pe!=null&&Lt.push(Fc(fe,Pe,xe))),kn)break;fe=fe.return}0<Lt.length&&(Te=new Ce(Te,Rt,null,i,Be),Ue.push({event:Te,listeners:Lt}))}}if((r&7)===0){e:{if(Te=e==="mouseover"||e==="pointerover",Ce=e==="mouseout"||e==="pointerout",Te&&i!==ai&&(Rt=i.relatedTarget||i.fromElement)&&(Ir(Rt)||Rt[wr]))break e;if((Ce||Te)&&(Te=Be.window===Be?Be:(Te=Be.ownerDocument)?Te.defaultView||Te.parentWindow:window,Ce?(Rt=i.relatedTarget||i.toElement,Ce=je,Rt=Rt?Ir(Rt):null,Rt!==null&&(kn=u(Rt),Lt=Rt.tag,Rt!==kn||Lt!==5&&Lt!==27&&Lt!==6)&&(Rt=null)):(Ce=null,Rt=je),Ce!==Rt)){if(Lt=_o,Pe="onMouseLeave",ge="onMouseEnter",fe="mouse",(e==="pointerout"||e==="pointerover")&&(Lt=Mt,Pe="onPointerLeave",ge="onPointerEnter",fe="pointer"),kn=Ce==null?Te:Hr(Ce),xe=Rt==null?Te:Hr(Rt),Te=new Lt(Pe,fe+"leave",Ce,i,Be),Te.target=kn,Te.relatedTarget=xe,Pe=null,Ir(Be)===je&&(Lt=new Lt(ge,fe+"enter",Rt,i,Be),Lt.target=xe,Lt.relatedTarget=kn,Pe=Lt),kn=Pe,Ce&&Rt)t:{for(Lt=Ce,ge=Rt,fe=0,xe=Lt;xe;xe=qu(xe))fe++;for(xe=0,Pe=ge;Pe;Pe=qu(Pe))xe++;for(;0<fe-xe;)Lt=qu(Lt),fe--;for(;0<xe-fe;)ge=qu(ge),xe--;for(;fe--;){if(Lt===ge||ge!==null&&Lt===ge.alternate)break t;Lt=qu(Lt),ge=qu(ge)}Lt=null}else Lt=null;Ce!==null&&Vp(Ue,Te,Ce,Lt,!1),Rt!==null&&kn!==null&&Vp(Ue,kn,Rt,Lt,!0)}}e:{if(Te=je?Hr(je):window,Ce=Te.nodeName&&Te.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&Te.type==="file")var ot=ss;else if(Ha(Te))if(jo)ot=Lo;else{ot=ls;var Xt=No}else Ce=Te.nodeName,!Ce||Ce.toLowerCase()!=="input"||Te.type!=="checkbox"&&Te.type!=="radio"?je&&Es(je.elementType)&&(ot=ss):ot=us;if(ot&&(ot=ot(e,je))){Rr(Ue,ot,i,Be);break e}Xt&&Xt(e,Te,je),e==="focusout"&&je&&Te.type==="number"&&je.memoizedProps.value!=null&&yo(Te,"number",Te.value)}switch(Xt=je?Hr(je):window,e){case"focusin":(Ha(Xt)||Xt.contentEditable==="true")&&(_a=Xt,Ci=je,Aa=null);break;case"focusout":Aa=Ci=_a=null;break;case"mousedown":Ya=!0;break;case"contextmenu":case"mouseup":case"dragend":Ya=!1,Ei(Ue,i,Be);break;case"selectionchange":if(Co)break;case"keydown":case"keyup":Ei(Ue,i,Be)}var yt;if(Ia)e:{switch(e){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else Xn?Bs(e,i)&&(Ct="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ct="onCompositionStart");Ct&&(rs&&i.locale!=="ko"&&(Xn||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&Xn&&(yt=su()):(Er=Be,qa="value"in Er?Er.value:Er.textContent,Xn=!0)),Xt=od(je,Ct),0<Xt.length&&(Ct=new x(Ct,e,null,i,Be),Ue.push({event:Ct,listeners:Xt}),yt?Ct.data=yt:(yt=Ps(i),yt!==null&&(Ct.data=yt)))),(yt=zs?qs(e,i):Us(e,i))&&(Ct=od(je,"onBeforeInput"),0<Ct.length&&(Xt=new x("onBeforeInput","beforeinput",null,i,Be),Ue.push({event:Xt,listeners:Ct}),Xt.data=yt)),kv(Ue,e,je,i,Be)}Yp(Ue,r)})}function Fc(e,r,i){return{instance:e,listener:r,currentTarget:i}}function od(e,r){for(var i=r+"Capture",l=[];e!==null;){var p=e,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Ms(e,i),p!=null&&l.unshift(Fc(e,p,b)),p=Ms(e,r),p!=null&&l.push(Fc(e,p,b))),e.tag===3)return l;e=e.return}return[]}function qu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vp(e,r,i,l,p){for(var b=r._reactName,N=[];i!==null&&i!==l;){var B=i,re=B.alternate,je=B.stateNode;if(B=B.tag,re!==null&&re===l)break;B!==5&&B!==26&&B!==27||je===null||(re=je,p?(je=Ms(i,b),je!=null&&N.unshift(Fc(i,je,re))):p||(je=Ms(i,b),je!=null&&N.push(Fc(i,je,re)))),i=i.return}N.length!==0&&e.push({event:r,listeners:N})}var Cv=/\r\n?/g,Ev=/\u0000|\uFFFD/g;function Qp(e){return(typeof e=="string"?e:""+e).replace(Cv,`
|
|
9
|
+
`).replace(Ev,"")}function Xp(e,r){return r=Qp(r),Qp(e)===r}function ld(){}function jn(e,r,i,l,p,b){switch(i){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||Yr(e,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&Yr(e,""+l);break;case"className":Wr(e,"class",l);break;case"tabIndex":Wr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,i,l);break;case"style":Cs(e,l,b);break;case"data":if(r!=="object"){Wr(e,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=bo(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"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 b=="function"&&(i==="formAction"?(r!=="input"&&jn(e,r,"name",p.name,p,null),jn(e,r,"formEncType",p.formEncType,p,null),jn(e,r,"formMethod",p.formMethod,p,null),jn(e,r,"formTarget",p.formTarget,p,null)):(jn(e,r,"encType",p.encType,p,null),jn(e,r,"method",p.method,p,null),jn(e,r,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=bo(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=ld);break;case"onScroll":l!=null&&$t("scroll",e);break;case"onScrollEnd":l!=null&&$t("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=bo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":$t("beforetoggle",e),$t("toggle",e),ks(e,"popover",l);break;case"xlinkActuate":la(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":la(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":la(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":la(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":la(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":la(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":la(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":la(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":la(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ks(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=cc.get(i)||i,ks(e,i,l))}}function Hh(e,r,i,l,p,b){switch(i){case"style":Cs(e,l,b);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Yr(e,l):(typeof l=="number"||typeof l=="bigint")&&Yr(e,""+l);break;case"onScroll":l!=null&&$t("scroll",e);break;case"onScrollEnd":l!=null&&$t("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ld);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ki.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),r=i.slice(2,p?i.length-7:void 0),b=e[Nn]||null,b=b!=null?b[i]:null,typeof b=="function"&&e.removeEventListener(r,b,p),typeof l=="function")){typeof b!="function"&&b!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(r,l,p);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):ks(e,i,l)}}}function ea(e,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$t("error",e),$t("load",e);var l=!1,p=!1,b;for(b in i)if(i.hasOwnProperty(b)){var N=i[b];if(N!=null)switch(b){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:jn(e,r,b,N,i,null)}}p&&jn(e,r,"srcSet",i.srcSet,i,null),l&&jn(e,r,"src",i.src,i,null);return;case"input":$t("invalid",e);var B=b=N=p=null,re=null,je=null;for(l in i)if(i.hasOwnProperty(l)){var Be=i[l];if(Be!=null)switch(l){case"name":p=Be;break;case"type":N=Be;break;case"checked":re=Be;break;case"defaultChecked":je=Be;break;case"value":b=Be;break;case"defaultValue":B=Be;break;case"children":case"dangerouslySetInnerHTML":if(Be!=null)throw Error(s(137,r));break;default:jn(e,r,l,Be,i,null)}}vr(e,b,B,re,je,N,p,!1),ua(e);return;case"select":$t("invalid",e),l=N=b=null;for(p in i)if(i.hasOwnProperty(p)&&(B=i[p],B!=null))switch(p){case"value":b=B;break;case"defaultValue":N=B;break;case"multiple":l=B;default:jn(e,r,p,B,i,null)}r=b,i=N,e.multiple=!!l,r!=null?$i(e,!!l,r,!1):i!=null&&$i(e,!!l,i,!0);return;case"textarea":$t("invalid",e),b=p=l=null;for(N in i)if(i.hasOwnProperty(N)&&(B=i[N],B!=null))switch(N){case"value":l=B;break;case"defaultValue":p=B;break;case"children":b=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(91));break;default:jn(e,r,N,B,i,null)}ru(e,l,p,b),ua(e);return;case"option":for(re in i)i.hasOwnProperty(re)&&(l=i[re],l!=null)&&(re==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":jn(e,r,re,l,i,null));return;case"dialog":$t("beforetoggle",e),$t("toggle",e),$t("cancel",e),$t("close",e);break;case"iframe":case"object":$t("load",e);break;case"video":case"audio":for(l=0;l<Uc.length;l++)$t(Uc[l],e);break;case"image":$t("error",e),$t("load",e);break;case"details":$t("toggle",e);break;case"embed":case"source":case"link":$t("error",e),$t("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(je in i)if(i.hasOwnProperty(je)&&(l=i[je],l!=null))switch(je){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:jn(e,r,je,l,i,null)}return;default:if(Es(r)){for(Be in i)i.hasOwnProperty(Be)&&(l=i[Be],l!==void 0&&Hh(e,r,Be,l,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(l=i[B],l!=null&&jn(e,r,B,l,i,null))}function Mv(e,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,N=null,B=null,re=null,je=null,Be=null;for(Ce in i){var Ue=i[Ce];if(i.hasOwnProperty(Ce)&&Ue!=null)switch(Ce){case"checked":break;case"value":break;case"defaultValue":re=Ue;default:l.hasOwnProperty(Ce)||jn(e,r,Ce,null,l,Ue)}}for(var Te in l){var Ce=l[Te];if(Ue=i[Te],l.hasOwnProperty(Te)&&(Ce!=null||Ue!=null))switch(Te){case"type":b=Ce;break;case"name":p=Ce;break;case"checked":je=Ce;break;case"defaultChecked":Be=Ce;break;case"value":N=Ce;break;case"defaultValue":B=Ce;break;case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(s(137,r));break;default:Ce!==Ue&&jn(e,r,Te,Ce,l,Ue)}}Ba(e,N,B,re,je,Be,b,p);return;case"select":Ce=N=B=Te=null;for(b in i)if(re=i[b],i.hasOwnProperty(b)&&re!=null)switch(b){case"value":break;case"multiple":Ce=re;default:l.hasOwnProperty(b)||jn(e,r,b,null,l,re)}for(p in l)if(b=l[p],re=i[p],l.hasOwnProperty(p)&&(b!=null||re!=null))switch(p){case"value":Te=b;break;case"defaultValue":B=b;break;case"multiple":N=b;default:b!==re&&jn(e,r,p,b,l,re)}r=B,i=N,l=Ce,Te!=null?$i(e,!!i,Te,!1):!!l!=!!i&&(r!=null?$i(e,!!i,r,!0):$i(e,!!i,i?[]:"",!1));return;case"textarea":Ce=Te=null;for(B in i)if(p=i[B],i.hasOwnProperty(B)&&p!=null&&!l.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:jn(e,r,B,null,l,p)}for(N in l)if(p=l[N],b=i[N],l.hasOwnProperty(N)&&(p!=null||b!=null))switch(N){case"value":Te=p;break;case"defaultValue":Ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==b&&jn(e,r,N,p,l,b)}nu(e,Te,Ce);return;case"option":for(var Rt in i)Te=i[Rt],i.hasOwnProperty(Rt)&&Te!=null&&!l.hasOwnProperty(Rt)&&(Rt==="selected"?e.selected=!1:jn(e,r,Rt,null,l,Te));for(re in l)Te=l[re],Ce=i[re],l.hasOwnProperty(re)&&Te!==Ce&&(Te!=null||Ce!=null)&&(re==="selected"?e.selected=Te&&typeof Te!="function"&&typeof Te!="symbol":jn(e,r,re,Te,l,Ce));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 Lt in i)Te=i[Lt],i.hasOwnProperty(Lt)&&Te!=null&&!l.hasOwnProperty(Lt)&&jn(e,r,Lt,null,l,Te);for(je in l)if(Te=l[je],Ce=i[je],l.hasOwnProperty(je)&&Te!==Ce&&(Te!=null||Ce!=null))switch(je){case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(s(137,r));break;default:jn(e,r,je,Te,l,Ce)}return;default:if(Es(r)){for(var kn in i)Te=i[kn],i.hasOwnProperty(kn)&&Te!==void 0&&!l.hasOwnProperty(kn)&&Hh(e,r,kn,void 0,l,Te);for(Be in l)Te=l[Be],Ce=i[Be],!l.hasOwnProperty(Be)||Te===Ce||Te===void 0&&Ce===void 0||Hh(e,r,Be,Te,l,Ce);return}}for(var ge in i)Te=i[ge],i.hasOwnProperty(ge)&&Te!=null&&!l.hasOwnProperty(ge)&&jn(e,r,ge,null,l,Te);for(Ue in l)Te=l[Ue],Ce=i[Ue],!l.hasOwnProperty(Ue)||Te===Ce||Te==null&&Ce==null||jn(e,r,Ue,Te,l,Ce)}var Wh=null,Yh=null;function ud(e){return e.nodeType===9?e:e.ownerDocument}function Kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zp(e,r){if(e===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&r==="foreignObject"?0:e}function Gh(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Vh=null;function Ov(){var e=window.event;return e&&e.type==="popstate"?e===Vh?!1:(Vh=e,!0):(Vh=null,!1)}var $p=typeof setTimeout=="function"?setTimeout:void 0,Rv=typeof clearTimeout=="function"?clearTimeout:void 0,Jp=typeof Promise=="function"?Promise:void 0,Dv=typeof queueMicrotask=="function"?queueMicrotask:typeof Jp<"u"?function(e){return Jp.resolve(null).then(e).catch(zv)}:$p;function zv(e){setTimeout(function(){throw e})}function Zo(e){return e==="head"}function e2(e,r){var i=r,l=0,p=0;do{var b=i.nextSibling;if(e.removeChild(i),b&&b.nodeType===8)if(i=b.data,i==="/$"){if(0<l&&8>l){i=l;var N=e.ownerDocument;if(i&1&&Ic(N.documentElement),i&2&&Ic(N.body),i&4)for(i=N.head,Ic(i),N=i.firstChild;N;){var B=N.nextSibling,re=N.nodeName;N[ba]||re==="SCRIPT"||re==="STYLE"||re==="LINK"&&N.rel.toLowerCase()==="stylesheet"||i.removeChild(N),N=B}}if(p===0){e.removeChild(b),Kc(r);return}p--}else i==="$"||i==="$?"||i==="$!"?p++:l=i.charCodeAt(0)-48;else l=0;i=b}while(i);Kc(r)}function Qh(e){var r=e.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qh(i),oa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Bv(e,r,i,l){for(;e.nodeType===1;){var p=i;if(e.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ba])switch(r){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(b=e.getAttribute("rel"),b==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(b!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(b=e.getAttribute("src"),(b!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(r==="input"&&e.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===b)return e}else return e;if(e=Wi(e.nextSibling),e===null)break}return null}function Pv(e,r,i){if(r==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Wi(e.nextSibling),e===null))return null;return e}function Xh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function qv(e,r){var i=e.ownerDocument;if(e.data!=="$?"||i.readyState==="complete")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Wi(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return e}var Kh=null;function t2(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(r===0)return e;r--}else i==="/$"&&r++}e=e.previousSibling}return null}function n2(e,r,i){switch(r=ud(i),e){case"html":if(e=r.documentElement,!e)throw Error(s(452));return e;case"head":if(e=r.head,!e)throw Error(s(453));return e;case"body":if(e=r.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Ic(e){for(var r=e.attributes;r.length;)e.removeAttributeNode(r[0]);oa(e)}var mi=new Map,r2=new Set;function cd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var so=ce.d;ce.d={f:Uv,r:Fv,D:Iv,C:Hv,L:Wv,m:Yv,X:Vv,S:Gv,M:Qv};function Uv(){var e=so.f(),r=td();return e||r}function Fv(e){var r=Cr(e);r!==null&&r.tag===5&&r.type==="form"?Ol(r):so.r(e)}var Uu=typeof document>"u"?null:document;function a2(e,r,i){var l=Uu;if(l&&typeof r=="string"&&r){var p=Ar(r);p='link[rel="'+e+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),r2.has(p)||(r2.add(p),e={rel:e,crossOrigin:i,href:r},l.querySelector(p)===null&&(r=l.createElement("link"),ea(r,"link",e),Rn(r),l.head.appendChild(r)))}}function Iv(e){so.D(e),a2("dns-prefetch",e,null)}function Hv(e,r){so.C(e,r),a2("preconnect",e,r)}function Wv(e,r,i){so.L(e,r,i);var l=Uu;if(l&&e&&r){var p='link[rel="preload"][as="'+Ar(r)+'"]';r==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+Ar(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+Ar(i.imageSizes)+'"]')):p+='[href="'+Ar(e)+'"]';var b=p;switch(r){case"style":b=Fu(e);break;case"script":b=Iu(e)}mi.has(b)||(e=y({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:e,as:r},i),mi.set(b,e),l.querySelector(p)!==null||r==="style"&&l.querySelector(Hc(b))||r==="script"&&l.querySelector(Wc(b))||(r=l.createElement("link"),ea(r,"link",e),Rn(r),l.head.appendChild(r)))}}function Yv(e,r){so.m(e,r);var i=Uu;if(i&&e){var l=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Ar(l)+'"][href="'+Ar(e)+'"]',b=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Iu(e)}if(!mi.has(b)&&(e=y({rel:"modulepreload",href:e},r),mi.set(b,e),i.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Wc(b)))return}l=i.createElement("link"),ea(l,"link",e),Rn(l),i.head.appendChild(l)}}}function Gv(e,r,i){so.S(e,r,i);var l=Uu;if(l&&e){var p=_r(l).hoistableStyles,b=Fu(e);r=r||"default";var N=p.get(b);if(!N){var B={loading:0,preload:null};if(N=l.querySelector(Hc(b)))B.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":r},i),(i=mi.get(b))&&Zh(e,i);var re=N=l.createElement("link");Rn(re),ea(re,"link",e),re._p=new Promise(function(je,Be){re.onload=je,re.onerror=Be}),re.addEventListener("load",function(){B.loading|=1}),re.addEventListener("error",function(){B.loading|=2}),B.loading|=4,fd(N,r,l)}N={type:"stylesheet",instance:N,count:1,state:B},p.set(b,N)}}}function Vv(e,r){so.X(e,r);var i=Uu;if(i&&e){var l=_r(i).hoistableScripts,p=Iu(e),b=l.get(p);b||(b=i.querySelector(Wc(p)),b||(e=y({src:e,async:!0},r),(r=mi.get(p))&&$h(e,r),b=i.createElement("script"),Rn(b),ea(b,"link",e),i.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},l.set(p,b))}}function Qv(e,r){so.M(e,r);var i=Uu;if(i&&e){var l=_r(i).hoistableScripts,p=Iu(e),b=l.get(p);b||(b=i.querySelector(Wc(p)),b||(e=y({src:e,async:!0,type:"module"},r),(r=mi.get(p))&&$h(e,r),b=i.createElement("script"),Rn(b),ea(b,"link",e),i.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},l.set(p,b))}}function i2(e,r,i,l){var p=(p=ae.current)?cd(p):null;if(!p)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=Fu(i.href),i=_r(p).hoistableStyles,l=i.get(r),l||(l={type:"style",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Fu(i.href);var b=_r(p).hoistableStyles,N=b.get(e);if(N||(p=p.ownerDocument||p,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(e,N),(b=p.querySelector(Hc(e)))&&!b._p&&(N.instance=b,N.state.loading=5),mi.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},mi.set(e,i),b||Xv(p,e,i,N.state))),r&&l===null)throw Error(s(528,""));return N}if(r&&l!==null)throw Error(s(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Iu(i),i=_r(p).hoistableScripts,l=i.get(r),l||(l={type:"script",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Fu(e){return'href="'+Ar(e)+'"'}function Hc(e){return'link[rel="stylesheet"]['+e+"]"}function s2(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Xv(e,r,i,l){e.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=e.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),ea(r,"link",i),Rn(r),e.head.appendChild(r))}function Iu(e){return'[src="'+Ar(e)+'"]'}function Wc(e){return"script[async]"+e}function o2(e,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=e.querySelector('style[data-href~="'+Ar(i.href)+'"]');if(l)return r.instance=l,Rn(l),l;var p=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Rn(l),ea(l,"style",p),fd(l,i.precedence,e),r.instance=l;case"stylesheet":p=Fu(i.href);var b=e.querySelector(Hc(p));if(b)return r.state.loading|=4,r.instance=b,Rn(b),b;l=s2(i),(p=mi.get(p))&&Zh(l,p),b=(e.ownerDocument||e).createElement("link"),Rn(b);var N=b;return N._p=new Promise(function(B,re){N.onload=B,N.onerror=re}),ea(b,"link",l),r.state.loading|=4,fd(b,i.precedence,e),r.instance=b;case"script":return b=Iu(i.src),(p=e.querySelector(Wc(b)))?(r.instance=p,Rn(p),p):(l=i,(p=mi.get(b))&&(l=y({},i),$h(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),Rn(p),ea(p,"link",l),e.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,fd(l,i.precedence,e));return r.instance}function fd(e,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,b=p,N=0;N<l.length;N++){var B=l[N];if(B.dataset.precedence===r)b=B;else if(b!==p)break}b?b.parentNode.insertBefore(e,b.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(e,r.firstChild))}function Zh(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.title==null&&(e.title=r.title)}function $h(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.integrity==null&&(e.integrity=r.integrity)}var dd=null;function l2(e,r,i){if(dd===null){var l=new Map,p=dd=new Map;p.set(i,l)}else p=dd,l=p.get(i),l||(l=new Map,p.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),p=0;p<i.length;p++){var b=i[p];if(!(b[ba]||b[Mn]||e==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var N=b.getAttribute(r)||"";N=e+N;var B=l.get(N);B?B.push(b):l.set(N,[b])}}return l}function u2(e,r,i){e=e.ownerDocument||e,e.head.insertBefore(i,r==="title"?e.querySelector("head > title"):null)}function Kv(e,r,i){if(i===1||r.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(e=r.disabled,typeof r.precedence=="string"&&e==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function c2(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Yc=null;function Zv(){}function $v(e,r,i){if(Yc===null)throw Error(s(475));var l=Yc;if(r.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=Fu(i.href),b=e.querySelector(Hc(p));if(b){e=b._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=hd.bind(l),e.then(l,l)),r.state.loading|=4,r.instance=b,Rn(b);return}b=e.ownerDocument||e,i=s2(i),(p=mi.get(p))&&Zh(i,p),b=b.createElement("link"),Rn(b);var N=b;N._p=new Promise(function(B,re){N.onload=B,N.onerror=re}),ea(b,"link",i),r.instance=b}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(r,e),(e=r.state.preload)&&(r.state.loading&3)===0&&(l.count++,r=hd.bind(l),e.addEventListener("load",r),e.addEventListener("error",r))}}function Jv(){if(Yc===null)throw Error(s(475));var e=Yc;return e.stylesheets&&e.count===0&&Jh(e,e.stylesheets),0<e.count?function(r){var i=setTimeout(function(){if(e.stylesheets&&Jh(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(i)}}:null}function hd(){if(this.count--,this.count===0){if(this.stylesheets)Jh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pd=null;function Jh(e,r){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pd=new Map,r.forEach(ey,e),pd=null,hd.call(e))}function ey(e,r){if(!(r.state.loading&4)){var i=pd.get(e);if(i)var l=i.get(null);else{i=new Map,pd.set(e,i);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var N=p[b];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(i.set(N.dataset.precedence,N),l=N)}l&&i.set(null,l)}p=r.instance,N=p.getAttribute("data-precedence"),b=i.get(N)||l,b===l&&i.set(null,p),i.set(N,p),this.count++,l=hd.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),b?b.parentNode.insertBefore(p,b.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),r.state.loading|=4}}var Gc={$$typeof:W,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function ty(e,r,i,l,p,b,N,B){this.tag=1,this.containerInfo=e,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=Tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tt(0),this.hiddenUpdates=Tt(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function f2(e,r,i,l,p,b,N,B,re,je,Be,Ue){return e=new ty(e,r,i,N,B,re,je,Ue),r=1,b===!0&&(r|=24),b=zr(3,null,null,r),e.current=b,b.stateNode=e,r=gc(),r.refCount++,e.pooledCache=r,r.refCount++,b.memoizedState={element:l,isDehydrated:i,cache:r},we(b),e}function d2(e){return e?(e=yr,e):yr}function h2(e,r,i,l,p,b){p=d2(p),l.context===null?l.context=p:l.pendingContext=p,l=Re(r),l.payload={element:i},b=b===void 0?null:b,b!==null&&(l.callback=b),i=He(e,l,r),i!==null&&($a(i,e,r),qe(i,e,r))}function p2(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<r?i:r}}function e1(e,r){p2(e,r),(e=e.alternate)&&p2(e,r)}function g2(e){if(e.tag===13){var r=Ys(e,67108864);r!==null&&$a(r,e,67108864),e1(e,67108864)}}var gd=!0;function ny(e,r,i,l){var p=ee.T;ee.T=null;var b=ce.p;try{ce.p=2,t1(e,r,i,l)}finally{ce.p=b,ee.T=p}}function ry(e,r,i,l){var p=ee.T;ee.T=null;var b=ce.p;try{ce.p=8,t1(e,r,i,l)}finally{ce.p=b,ee.T=p}}function t1(e,r,i,l){if(gd){var p=n1(l);if(p===null)Ih(e,r,l,md,i),v2(e,l);else if(iy(p,e,r,i,l))l.stopPropagation();else if(v2(e,l),r&4&&-1<ay.indexOf(e)){for(;p!==null;){var b=Cr(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var N=Je(b.pendingLanes);if(N!==0){var B=b;for(B.pendingLanes|=2,B.entangledLanes|=2;N;){var re=1<<31-Ke(N);B.entanglements[1]|=re,N&=~re}ys(b),(bn&6)===0&&(Jf=xt()+500,qc(0))}}break;case 13:B=Ys(b,2),B!==null&&$a(B,b,2),td(),e1(b,2)}if(b=n1(l),b===null&&Ih(e,r,l,md,i),b===p)break;p=b}p!==null&&l.stopPropagation()}else Ih(e,r,l,null,i)}}function n1(e){return e=xo(e),r1(e)}var md=null;function r1(e){if(md=null,e=Ir(e),e!==null){var r=u(e);if(r===null)e=null;else{var i=r.tag;if(i===13){if(e=h(r),e!==null)return e;e=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null)}}return md=e,null}function m2(e){switch(e){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(ut()){case Ie:return 2;case mt:return 8;case Ze:case bt:return 32;case ht:return 268435456;default:return 32}default:return 32}}var a1=!1,$o=null,Jo=null,el=null,Vc=new Map,Qc=new Map,tl=[],ay="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 v2(e,r){switch(e){case"focusin":case"focusout":$o=null;break;case"dragenter":case"dragleave":Jo=null;break;case"mouseover":case"mouseout":el=null;break;case"pointerover":case"pointerout":Vc.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qc.delete(r.pointerId)}}function Xc(e,r,i,l,p,b){return e===null||e.nativeEvent!==b?(e={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:b,targetContainers:[p]},r!==null&&(r=Cr(r),r!==null&&g2(r)),e):(e.eventSystemFlags|=l,r=e.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),e)}function iy(e,r,i,l,p){switch(r){case"focusin":return $o=Xc($o,e,r,i,l,p),!0;case"dragenter":return Jo=Xc(Jo,e,r,i,l,p),!0;case"mouseover":return el=Xc(el,e,r,i,l,p),!0;case"pointerover":var b=p.pointerId;return Vc.set(b,Xc(Vc.get(b)||null,e,r,i,l,p)),!0;case"gotpointercapture":return b=p.pointerId,Qc.set(b,Xc(Qc.get(b)||null,e,r,i,l,p)),!0}return!1}function y2(e){var r=Ir(e.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=h(i),r!==null){e.blockedOn=r,jt(e.priority,function(){if(i.tag===13){var l=Za();l=pn(l);var p=Ys(i,l);p!==null&&$a(p,i,l),e1(i,l)}});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vd(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var i=n1(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);ai=l,i.target.dispatchEvent(l),ai=null}else return r=Cr(i),r!==null&&g2(r),e.blockedOn=i,!1;r.shift()}return!0}function b2(e,r,i){vd(e)&&i.delete(r)}function sy(){a1=!1,$o!==null&&vd($o)&&($o=null),Jo!==null&&vd(Jo)&&(Jo=null),el!==null&&vd(el)&&(el=null),Vc.forEach(b2),Qc.forEach(b2)}function yd(e,r){e.blockedOn===r&&(e.blockedOn=null,a1||(a1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sy)))}var bd=null;function x2(e){bd!==e&&(bd=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){bd===e&&(bd=null);for(var r=0;r<e.length;r+=3){var i=e[r],l=e[r+1],p=e[r+2];if(typeof l!="function"){if(r1(l||i)===null)continue;break}var b=Cr(i);b!==null&&(e.splice(r,3),r-=3,hi(b,{pending:!0,data:p,method:i.method,action:l},l,p))}}))}function Kc(e){function r(re){return yd(re,e)}$o!==null&&yd($o,e),Jo!==null&&yd(Jo,e),el!==null&&yd(el,e),Vc.forEach(r),Qc.forEach(r);for(var i=0;i<tl.length;i++){var l=tl[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<tl.length&&(i=tl[0],i.blockedOn===null);)y2(i),i.blockedOn===null&&tl.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var p=i[l],b=i[l+1],N=p[Nn]||null;if(typeof b=="function")N||x2(i);else if(N){var B=null;if(b&&b.hasAttribute("formAction")){if(p=b,N=b[Nn]||null)B=N.formAction;else if(r1(p)!==null)continue}else B=N.action;typeof B=="function"?i[l+1]=B:(i.splice(l,3),l-=3),x2(i)}}}function i1(e){this._internalRoot=e}xd.prototype.render=i1.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(s(409));var i=r.current,l=Za();h2(i,l,e,r,null,null)},xd.prototype.unmount=i1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;h2(e.current,2,null,e,null,null),td(),r[wr]=null}};function xd(e){this._internalRoot=e}xd.prototype.unstable_scheduleHydration=function(e){if(e){var r=Ra();e={blockedOn:null,target:e,priority:r};for(var i=0;i<tl.length&&r!==0&&r<tl[i].priority;i++);tl.splice(i,0,e),i===0&&y2(e)}};var w2=n.version;if(w2!=="19.1.0")throw Error(s(527,w2,"19.1.0"));ce.findDOMNode=function(e){var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=f(r),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var oy={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:ee,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wd.isDisabled&&wd.supportsFiber)try{wt=wd.inject(oy),_t=wd}catch{}}return $c.createRoot=function(e,r){if(!o(e))throw Error(s(299));var i=!1,l="",p=B0,b=P0,N=q0,B=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(B=r.unstable_transitionCallbacks)),r=f2(e,1,!1,null,null,i,l,p,b,N,B,null),e[wr]=r.current,Fh(e),new i1(r)},$c.hydrateRoot=function(e,r,i){if(!o(e))throw Error(s(299));var l=!1,p="",b=B0,N=P0,B=q0,re=null,je=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(b=i.onUncaughtError),i.onCaughtError!==void 0&&(N=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(re=i.unstable_transitionCallbacks),i.formState!==void 0&&(je=i.formState)),r=f2(e,1,!0,r,i??null,l,p,b,N,B,re,je),r.context=d2(null),i=r.current,l=Za(),l=pn(l),p=Re(l),p.callback=null,He(i,p,l),i=l,r.current.lanes=i,Et(r,i),ys(r),e[wr]=r.current,Fh(e),new xd(r)},$c.version="19.1.0",$c}var E2;function yy(){if(E2)return l1.exports;E2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),l1.exports=vy(),l1.exports}var by=yy();const xy=_m(by);var ac=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wy={setTimeout:(t,n)=>setTimeout(t,n),clearTimeout:t=>clearTimeout(t),setInterval:(t,n)=>setInterval(t,n),clearInterval:t=>clearInterval(t)},Sy=class{#e=wy;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,n){return this.#e.setTimeout(t,n)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,n){return this.#e.setInterval(t,n)}clearInterval(t){this.#e.clearInterval(t)}},Il=new Sy;function _y(t){setTimeout(t,0)}var Yl=typeof window>"u"||"Deno"in globalThis;function va(){}function Ay(t,n){return typeof t=="function"?t(n):t}function B1(t){return typeof t=="number"&&t>=0&&t!==1/0}function km(t,n){return Math.max(t+(n||0)-Date.now(),0)}function ll(t,n){return typeof t=="function"?t(n):t}function vi(t,n){return typeof t=="function"?t(n):t}function M2(t,n){const{type:a="all",exact:s,fetchStatus:o,predicate:u,queryKey:h,stale:d}=t;if(h){if(s){if(n.queryHash!==o0(h,n.options))return!1}else if(!hf(n.queryKey,h))return!1}if(a!=="all"){const f=n.isActive();if(a==="active"&&!f||a==="inactive"&&f)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||o&&o!==n.state.fetchStatus||u&&!u(n))}function O2(t,n){const{exact:a,status:s,predicate:o,mutationKey:u}=t;if(u){if(!n.options.mutationKey)return!1;if(a){if(Gl(n.options.mutationKey)!==Gl(u))return!1}else if(!hf(n.options.mutationKey,u))return!1}return!(s&&n.state.status!==s||o&&!o(n))}function o0(t,n){return(n?.queryKeyHashFn||Gl)(t)}function Gl(t){return JSON.stringify(t,(n,a)=>P1(a)?Object.keys(a).sort().reduce((s,o)=>(s[o]=a[o],s),{}):a)}function hf(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?Object.keys(n).every(a=>hf(t[a],n[a])):!1}var jy=Object.prototype.hasOwnProperty;function Nm(t,n,a=0){if(t===n)return t;if(a>500)return n;const s=R2(t)&&R2(n);if(!s&&!(P1(t)&&P1(n)))return n;const u=(s?t:Object.keys(t)).length,h=s?n:Object.keys(n),d=h.length,f=s?new Array(d):{};let m=0;for(let y=0;y<d;y++){const _=s?y:h[y],j=t[_],w=n[_];if(j===w){f[_]=j,(s?y<u:jy.call(t,_))&&m++;continue}if(j===null||w===null||typeof j!="object"||typeof w!="object"){f[_]=w;continue}const k=Nm(j,w,a+1);f[_]=k,k===j&&m++}return u===d&&m===u?t:f}function qd(t,n){if(!n||Object.keys(t).length!==Object.keys(n).length)return!1;for(const a in t)if(t[a]!==n[a])return!1;return!0}function R2(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function P1(t){if(!D2(t))return!1;const n=t.constructor;if(n===void 0)return!0;const a=n.prototype;return!(!D2(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function D2(t){return Object.prototype.toString.call(t)==="[object Object]"}function ky(t){return new Promise(n=>{Il.setTimeout(n,t)})}function q1(t,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,n):a.structuralSharing!==!1?Nm(t,n):n}function Ny(t,n,a=0){const s=[...t,n];return a&&s.length>a?s.slice(1):s}function Ly(t,n,a=0){const s=[n,...t];return a&&s.length>a?s.slice(0,-1):s}var l0=Symbol();function Lm(t,n){return!t.queryFn&&n?.initialPromise?()=>n.initialPromise:!t.queryFn||t.queryFn===l0?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function u0(t,n){return typeof t=="function"?t(...n):!!t}function Ty(t,n,a){let s=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=n(),s||(s=!0,o.aborted?a():o.addEventListener("abort",a,{once:!0})),o)}),t}var Cy=class extends ac{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!Yl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},c0=new Cy;function U1(){let t,n;const a=new Promise((o,u)=>{t=o,n=u});a.status="pending",a.catch(()=>{});function s(o){Object.assign(a,o),delete a.resolve,delete a.reject}return a.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},a.reject=o=>{s({status:"rejected",reason:o}),n(o)},a}var Ey=_y;function My(){let t=[],n=0,a=d=>{d()},s=d=>{d()},o=Ey;const u=d=>{n?t.push(d):o(()=>{a(d)})},h=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{a(f)})})})};return{batch:d=>{let f;n++;try{f=d()}finally{n--,n||h()}return f},batchCalls:d=>(...f)=>{u(()=>{d(...f)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var Lr=My(),Oy=class extends ac{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!Yl&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(a=>{a(t)}))}isOnline(){return this.#e}},Ud=new Oy;function Ry(t){return Math.min(1e3*2**t,3e4)}function Tm(t){return(t??"online")==="online"?Ud.isOnline():!0}var F1=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Cm(t){let n=!1,a=0,s;const o=U1(),u=()=>o.status!=="pending",h=T=>{if(!u()){const D=new F1(T);j(D),t.onCancel?.(D)}},d=()=>{n=!0},f=()=>{n=!1},m=()=>c0.isFocused()&&(t.networkMode==="always"||Ud.isOnline())&&t.canRun(),y=()=>Tm(t.networkMode)&&t.canRun(),_=T=>{u()||(s?.(),o.resolve(T))},j=T=>{u()||(s?.(),o.reject(T))},w=()=>new Promise(T=>{s=D=>{(u()||m())&&T(D)},t.onPause?.()}).then(()=>{s=void 0,u()||t.onContinue?.()}),k=()=>{if(u())return;let T;const D=a===0?t.initialPromise:void 0;try{T=D??t.fn()}catch(C){T=Promise.reject(C)}Promise.resolve(T).then(_).catch(C=>{if(u())return;const K=t.retry??(Yl?0:3),W=t.retryDelay??Ry,F=typeof W=="function"?W(a,C):W,$=K===!0||typeof K=="number"&&a<K||typeof K=="function"&&K(a,C);if(n||!$){j(C);return}a++,t.onFail?.(a,C),ky(F).then(()=>m()?void 0:w()).then(()=>{n?j(C):k()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(s?.(),o),cancelRetry:d,continueRetry:f,canStart:y,start:()=>(y()?k():w().then(k),o)}}var Em=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B1(this.gcTime)&&(this.#e=Il.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Yl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Il.clearTimeout(this.#e),this.#e=void 0)}},Dy=class extends Em{#e;#t;#n;#a;#r;#s;#o;constructor(t){super(),this.#o=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#a=t.client,this.#n=this.#a.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=B2(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=B2(this.options);n.data!==void 0&&(this.setState(z2(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,n){const a=q1(this.state.data,t,this.options);return this.#i({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(t,n){this.#i({type:"setState",state:t,setStateOptions:n})}cancel(t){const n=this.#r?.promise;return this.#r?.cancel(t),n?n.then(va).catch(va):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>vi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===l0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ll(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!km(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const a=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,a.signal)})},o=()=>{const d=Lm(this.options,n),m=(()=>{const y={client:this.#a,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#o=!1,this.options.persister?this.options.persister(d,m,this):d(m)},h=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return s(d),d})();this.options.behavior?.onFetch(h,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==h.fetchOptions?.meta)&&this.#i({type:"fetch",meta:h.fetchOptions?.meta}),this.#r=Cm({initialPromise:n?.initialPromise,fn:h.fetchFn,onCancel:d=>{d instanceof F1&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),a.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof F1){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Mm(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...z2(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?s:void 0,s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),Lr.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Mm(t,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tm(n.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function z2(t,n){return{data:t,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function B2(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,a=n!==void 0,s=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var zy=class extends ac{constructor(t,n){super(),this.options=n,this.#e=t,this.#i=null,this.#o=U1(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#g;#d;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),P2(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return I1(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return I1(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(t){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vi(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),n._defaulted&&!qd(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&q2(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),s&&(this.#t!==a||vi(this.options.enabled,this.#t)!==vi(n.enabled,this.#t)||ll(this.options.staleTime,this.#t)!==ll(n.staleTime,this.#t))&&this.#m();const o=this.#v();s&&(this.#t!==a||vi(this.options.enabled,this.#t)!==vi(n.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(t){const n=this.#e.getQueryCache().build(this.#e,t),a=this.createResult(n,t);return Py(this,a)&&(this.#a=a,this.#s=this.options,this.#r=this.#t.state),a}getCurrentResult(){return this.#a}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=this.#e.defaultQueryOptions(t),a=this.#e.getQueryCache().build(this.#e,n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(t){this.#S();let n=this.#t.fetch(this.options,t);return t?.throwOnError||(n=n.catch(va)),n}#m(){this.#x();const t=ll(this.options.staleTime,this.#t);if(Yl||this.#a.isStale||!B1(t))return;const a=km(this.#a.dataUpdatedAt,t)+1;this.#u=Il.setTimeout(()=>{this.#a.isStale||this.updateResult()},a)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#w(),this.#l=t,!(Yl||vi(this.options.enabled,this.#t)===!1||!B1(this.#l)||this.#l===0)&&(this.#c=Il.setInterval(()=>{(this.options.refetchIntervalInBackground||c0.isFocused())&&this.#f()},this.#l))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#u&&(Il.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Il.clearInterval(this.#c),this.#c=void 0)}createResult(t,n){const a=this.#t,s=this.options,o=this.#a,u=this.#r,h=this.#s,f=t!==a?t.state:this.#n,{state:m}=t;let y={...m},_=!1,j;if(n._optimisticResults){const se=this.hasListeners(),J=!se&&P2(t,n),pe=se&&q2(t,a,n,s);(J||pe)&&(y={...y,...Mm(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:w,errorUpdatedAt:k,status:T}=y;j=y.data;let D=!1;if(n.placeholderData!==void 0&&j===void 0&&T==="pending"){let se;o?.isPlaceholderData&&n.placeholderData===h?.placeholderData?(se=o.data,D=!0):se=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,se!==void 0&&(T="success",j=q1(o?.data,se,n),_=!0)}if(n.select&&j!==void 0&&!D)if(o&&j===u?.data&&n.select===this.#g)j=this.#d;else try{this.#g=n.select,j=n.select(j),j=q1(o?.data,j,n),this.#d=j,this.#i=null}catch(se){this.#i=se}this.#i&&(w=this.#i,j=this.#d,k=Date.now(),T="error");const C=y.fetchStatus==="fetching",K=T==="pending",W=T==="error",F=K&&C,$=j!==void 0,ke={status:T,fetchStatus:y.fetchStatus,isPending:K,isSuccess:T==="success",isError:W,isInitialLoading:F,isLoading:F,data:j,dataUpdatedAt:y.dataUpdatedAt,error:w,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!K,isLoadingError:W&&!$,isPaused:y.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:W&&$,isStale:f0(t,n),refetch:this.refetch,promise:this.#o,isEnabled:vi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const se=ke.data!==void 0,J=ke.status==="error"&&!se,pe=G=>{J?G.reject(ke.error):se&&G.resolve(ke.data)},O=()=>{const G=this.#o=ke.promise=U1();pe(G)},U=this.#o;switch(U.status){case"pending":t.queryHash===a.queryHash&&pe(U);break;case"fulfilled":(J||ke.data!==U.value)&&O();break;case"rejected":(!J||ke.error!==U.reason)&&O();break}}return ke}updateResult(){const t=this.#a,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),qd(n,t))return;this.#a=n;const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.#p.size)return!0;const u=new Set(o??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#a).some(h=>{const d=h;return this.#a[d]!==t[d]&&u.has(d)})};this.#_({listeners:a()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const n=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(n?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(t){Lr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function By(t,n){return vi(n.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&n.retryOnMount===!1)}function P2(t,n){return By(t,n)||t.state.data!==void 0&&I1(t,n,n.refetchOnMount)}function I1(t,n,a){if(vi(n.enabled,t)!==!1&&ll(n.staleTime,t)!=="static"){const s=typeof a=="function"?a(t):a;return s==="always"||s!==!1&&f0(t,n)}return!1}function q2(t,n,a,s){return(t!==n||vi(s.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&f0(t,a)}function f0(t,n){return vi(n.enabled,t)!==!1&&t.isStaleByTime(ll(n.staleTime,t))}function Py(t,n){return!qd(t.getCurrentResult(),n)}function U2(t){return{onFetch:(n,a)=>{const s=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],h=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const m=async()=>{let y=!1;const _=k=>{Ty(k,()=>n.signal,()=>y=!0)},j=Lm(n.options,n.fetchOptions),w=async(k,T,D)=>{if(y)return Promise.reject();if(T==null&&k.pages.length)return Promise.resolve(k);const K=(()=>{const Le={client:n.client,queryKey:n.queryKey,pageParam:T,direction:D?"backward":"forward",meta:n.options.meta};return _(Le),Le})(),W=await j(K),{maxPages:F}=n.options,$=D?Ly:Ny;return{pages:$(k.pages,W,F),pageParams:$(k.pageParams,T,F)}};if(o&&u.length){const k=o==="backward",T=k?qy:F2,D={pages:u,pageParams:h},C=T(s,D);d=await w(D,C,k)}else{const k=t??u.length;do{const T=f===0?h[0]??s.initialPageParam:F2(s,d);if(f>0&&T==null)break;d=await w(d,T),f++}while(f<k)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=m}}}function F2(t,{pages:n,pageParams:a}){const s=n.length-1;return n.length>0?t.getNextPageParam(n[s],n,a[s],a):void 0}function qy(t,{pages:n,pageParams:a}){return n.length>0?t.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var Uy=class extends Em{#e;#t;#n;#a;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Om(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(n=>n!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(t){const n=()=>{this.#r({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=Cm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(u,h)=>{this.#r({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",o=!this.#a.canStart();try{if(s)n();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,a);const h=await this.options.onMutate?.(t,a);h!==this.state.context&&this.#r({type:"pending",context:h,variables:t,isPaused:o})}const u=await this.#a.start();return await this.#n.config.onSuccess?.(u,t,this.state.context,this,a),await this.options.onSuccess?.(u,t,this.state.context,a),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(u,null,t,this.state.context,a),this.#r({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,t,this.state.context,this,a)}catch(h){Promise.reject(h)}try{await this.options.onError?.(u,t,this.state.context,a)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,a)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,a)}catch(h){Promise.reject(h)}throw this.#r({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#r(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Lr.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Om(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fy=class extends ac{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,n,a){const s=new Uy({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){this.#e.add(t);const n=Sd(t);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=Sd(t);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sd(t);if(typeof n=="string"){const s=this.#t.get(n)?.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){const n=Sd(t);return typeof n=="string"?this.#t.get(n)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Lr.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(a=>O2(n,a))}findAll(t={}){return this.getAll().filter(n=>O2(t,n))}notify(t){Lr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Lr.batch(()=>Promise.all(t.map(n=>n.continue().catch(va))))}};function Sd(t){return t.options.scope?.id}var Iy=class extends ac{#e;#t=void 0;#n;#a;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),qd(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&Gl(a.mutationKey)!==Gl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#s(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(n,a){return this.#a=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Om();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#s(n){Lr.batch(()=>{if(this.#a&&this.hasListeners()){const a=this.#t.variables,s=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#a.onSuccess?.(n.data,a,s,o)}catch(u){Promise.reject(u)}try{this.#a.onSettled?.(n.data,null,a,s,o)}catch(u){Promise.reject(u)}}else if(n?.type==="error"){try{this.#a.onError?.(n.error,a,s,o)}catch(u){Promise.reject(u)}try{this.#a.onSettled?.(void 0,n.error,a,s,o)}catch(u){Promise.reject(u)}}}this.listeners.forEach(a=>{a(this.#t)})})}},Hy=class extends ac{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,a){const s=n.queryKey,o=n.queryHash??o0(s,n);let u=this.get(o);return u||(u=new Dy({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Lr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>M2(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>M2(t,a)):n}notify(t){Lr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Lr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Lr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wy=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(t={}){this.#e=t.queryCache||new Hy,this.#t=t.mutationCache||new Fy,this.#n=t.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=c0.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Ud.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),a=this.#e.build(this,n),s=a.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(ll(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:a})=>{const s=a.data;return[n,s]})}setQueryData(t,n,a){const s=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(s.queryHash)?.state.data,h=Ay(n,u);if(h!==void 0)return this.#e.build(this,s).setData(h,{...a,manual:!0})}setQueriesData(t,n,a){return Lr.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,a)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;Lr.batch(()=>{n.findAll(t).forEach(a=>{n.remove(a)})})}resetQueries(t,n){const a=this.#e;return Lr.batch(()=>(a.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const a={revert:!0,...n},s=Lr.batch(()=>this.#e.findAll(t).map(o=>o.cancel(a)));return Promise.all(s).then(va).catch(va)}invalidateQueries(t,n={}){return Lr.batch(()=>(this.#e.findAll(t).forEach(a=>{a.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},s=Lr.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,a);return a.throwOnError||(u=u.catch(va)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(va)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(ll(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(va).catch(va)}fetchInfiniteQuery(t){return t.behavior=U2(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(va).catch(va)}ensureInfiniteQueryData(t){return t.behavior=U2(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ud.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#a.set(Gl(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#a.values()],a={};return n.forEach(s=>{hf(t,s.queryKey)&&Object.assign(a,s.defaultOptions)}),a}setMutationDefaults(t,n){this.#r.set(Gl(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],a={};return n.forEach(s=>{hf(t,s.mutationKey)&&Object.assign(a,s.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=o0(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===l0&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Rm=ye.createContext(void 0),Sf=t=>{const n=ye.useContext(Rm);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},Yy=({client:t,children:n})=>(ye.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(Rm.Provider,{value:t,children:n})),Dm=ye.createContext(!1),Gy=()=>ye.useContext(Dm);Dm.Provider;function Vy(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Qy=ye.createContext(Vy()),Xy=()=>ye.useContext(Qy),Ky=(t,n,a)=>{const s=a?.state.error&&typeof t.throwOnError=="function"?u0(t.throwOnError,[a.state.error,a]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(n.isReset()||(t.retryOnMount=!1))},Zy=t=>{ye.useEffect(()=>{t.clearReset()},[t])},$y=({result:t,errorResetBoundary:n,throwOnError:a,query:s,suspense:o})=>t.isError&&!n.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||u0(a,[t.error,s])),Jy=t=>{if(t.suspense){const a=o=>o==="static"?o:Math.max(o??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...o)=>a(s(...o)):a(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},eb=(t,n)=>t.isLoading&&t.isFetching&&!n,tb=(t,n)=>t?.suspense&&n.isPending,I2=(t,n,a)=>n.fetchOptimistic(t).catch(()=>{a.clearReset()});function nb(t,n,a){const s=Gy(),o=Xy(),u=Sf(),h=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=u.getQueryCache().get(h.queryHash);h._optimisticResults=s?"isRestoring":"optimistic",Jy(h),Ky(h,o,d),Zy(o);const f=!u.getQueryCache().get(h.queryHash),[m]=ye.useState(()=>new n(u,h)),y=m.getOptimisticResult(h),_=!s&&t.subscribed!==!1;if(ye.useSyncExternalStore(ye.useCallback(j=>{const w=_?m.subscribe(Lr.batchCalls(j)):va;return m.updateResult(),w},[m,_]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),ye.useEffect(()=>{m.setOptions(h)},[h,m]),tb(h,y))throw I2(h,m,o);if($y({result:y,errorResetBoundary:o,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw y.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(h,y),h.experimental_prefetchInRender&&!Yl&&eb(y,s)&&(f?I2(h,m,o):d?.promise)?.catch(va).finally(()=>{m.updateResult()}),h.notifyOnChangeProps?y:m.trackResult(y)}function ya(t,n){return nb(t,zy)}function lf(t,n){const a=Sf(),[s]=ye.useState(()=>new Iy(a,t));ye.useEffect(()=>{s.setOptions(t)},[s,t]);const o=ye.useSyncExternalStore(ye.useCallback(h=>s.subscribe(Lr.batchCalls(h)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=ye.useCallback((h,d)=>{s.mutate(h,d).catch(va)},[s]);if(o.error&&u0(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}jm();function pf(){return pf=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t},pf.apply(this,arguments)}var sl;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(sl||(sl={}));const H2="popstate";function rb(t){t===void 0&&(t={});function n(s,o){let{pathname:u,search:h,hash:d}=s.location;return H1("",{pathname:u,search:h,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(s,o){return typeof o=="string"?o:Fd(o)}return ib(n,a,null,t)}function xr(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function d0(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function ab(){return Math.random().toString(36).substr(2,8)}function W2(t,n){return{usr:t.state,key:t.key,idx:n}}function H1(t,n,a,s){return a===void 0&&(a=null),pf({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof n=="string"?ic(n):n,{state:a,key:n&&n.key||s||ab()})}function Fd(t){let{pathname:n="/",search:a="",hash:s=""}=t;return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function ic(t){let n={};if(t){let a=t.indexOf("#");a>=0&&(n.hash=t.substr(a),t=t.substr(0,a));let s=t.indexOf("?");s>=0&&(n.search=t.substr(s),t=t.substr(0,s)),t&&(n.pathname=t)}return n}function ib(t,n,a,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:u=!1}=s,h=o.history,d=sl.Pop,f=null,m=y();m==null&&(m=0,h.replaceState(pf({},h.state,{idx:m}),""));function y(){return(h.state||{idx:null}).idx}function _(){d=sl.Pop;let D=y(),C=D==null?null:D-m;m=D,f&&f({action:d,location:T.location,delta:C})}function j(D,C){d=sl.Push;let K=H1(T.location,D,C);m=y()+1;let W=W2(K,m),F=T.createHref(K);try{h.pushState(W,"",F)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(F)}u&&f&&f({action:d,location:T.location,delta:1})}function w(D,C){d=sl.Replace;let K=H1(T.location,D,C);m=y();let W=W2(K,m),F=T.createHref(K);h.replaceState(W,"",F),u&&f&&f({action:d,location:T.location,delta:0})}function k(D){let C=o.location.origin!=="null"?o.location.origin:o.location.href,K=typeof D=="string"?D:Fd(D);return K=K.replace(/ $/,"%20"),xr(C,"No window.location.(origin|href) available to create URL for href: "+K),new URL(K,C)}let T={get action(){return d},get location(){return t(o,h)},listen(D){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(H2,_),f=D,()=>{o.removeEventListener(H2,_),f=null}},createHref(D){return n(o,D)},createURL:k,encodeLocation(D){let C=k(D);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:j,replace:w,go(D){return h.go(D)}};return T}var Y2;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Y2||(Y2={}));function sb(t,n,a){return a===void 0&&(a="/"),ob(t,n,a)}function ob(t,n,a,s){let o=typeof n=="string"?ic(n):n,u=h0(o.pathname||"/",a);if(u==null)return null;let h=zm(t);lb(h);let d=null;for(let f=0;d==null&&f<h.length;++f){let m=xb(u);d=vb(h[f],m)}return d}function zm(t,n,a,s){n===void 0&&(n=[]),a===void 0&&(a=[]),s===void 0&&(s="");let o=(u,h,d)=>{let f={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:h,route:u};f.relativePath.startsWith("/")&&(xr(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let m=ul([s,f.relativePath]),y=a.concat(f);u.children&&u.children.length>0&&(xr(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),zm(u.children,n,y,m)),!(u.path==null&&!u.index)&&n.push({path:m,score:gb(m,u.index),routesMeta:y})};return t.forEach((u,h)=>{var d;if(u.path===""||!((d=u.path)!=null&&d.includes("?")))o(u,h);else for(let f of Bm(u.path))o(u,h,f)}),n}function Bm(t){let n=t.split("/");if(n.length===0)return[];let[a,...s]=n,o=a.endsWith("?"),u=a.replace(/\?$/,"");if(s.length===0)return o?[u,""]:[u];let h=Bm(s.join("/")),d=[];return d.push(...h.map(f=>f===""?u:[u,f].join("/"))),o&&d.push(...h),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function lb(t){t.sort((n,a)=>n.score!==a.score?a.score-n.score:mb(n.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}const ub=/^:[\w-]+$/,cb=3,fb=2,db=1,hb=10,pb=-2,G2=t=>t==="*";function gb(t,n){let a=t.split("/"),s=a.length;return a.some(G2)&&(s+=pb),n&&(s+=fb),a.filter(o=>!G2(o)).reduce((o,u)=>o+(ub.test(u)?cb:u===""?db:hb),s)}function mb(t,n){return t.length===n.length&&t.slice(0,-1).every((s,o)=>s===n[o])?t[t.length-1]-n[n.length-1]:0}function vb(t,n,a){let{routesMeta:s}=t,o={},u="/",h=[];for(let d=0;d<s.length;++d){let f=s[d],m=d===s.length-1,y=u==="/"?n:n.slice(u.length)||"/",_=yb({path:f.relativePath,caseSensitive:f.caseSensitive,end:m},y),j=f.route;if(!_)return null;Object.assign(o,_.params),h.push({params:o,pathname:ul([u,_.pathname]),pathnameBase:jb(ul([u,_.pathnameBase])),route:j}),_.pathnameBase!=="/"&&(u=ul([u,_.pathnameBase]))}return h}function yb(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,s]=bb(t.path,t.caseSensitive,t.end),o=n.match(a);if(!o)return null;let u=o[0],h=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:s.reduce((m,y,_)=>{let{paramName:j,isOptional:w}=y;if(j==="*"){let T=d[_]||"";h=u.slice(0,u.length-T.length).replace(/(.)\/+$/,"$1")}const k=d[_];return w&&!k?m[j]=void 0:m[j]=(k||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:h,pattern:t}}function bb(t,n,a){n===void 0&&(n=!1),a===void 0&&(a=!0),d0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),s]}function xb(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return d0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),t}}function h0(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,s=t.charAt(a);return s&&s!=="/"?null:t.slice(a)||"/"}const wb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sb=t=>wb.test(t);function _b(t,n){n===void 0&&(n="/");let{pathname:a,search:s="",hash:o=""}=typeof t=="string"?ic(t):t,u;if(a)if(Sb(a))u=a;else{if(a.includes("//")){let h=a;a=a.replace(/\/\/+/g,"/"),d0(!1,"Pathnames cannot have embedded double slashes - normalizing "+(h+" -> "+a))}a.startsWith("/")?u=V2(a.substring(1),"/"):u=V2(a,n)}else u=n;return{pathname:u,search:kb(s),hash:Nb(o)}}function V2(t,n){let a=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function d1(t,n,a,s){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ab(t){return t.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Pm(t,n){let a=Ab(t);return n?a.map((s,o)=>o===a.length-1?s.pathname:s.pathnameBase):a.map(s=>s.pathnameBase)}function qm(t,n,a,s){s===void 0&&(s=!1);let o;typeof t=="string"?o=ic(t):(o=pf({},t),xr(!o.pathname||!o.pathname.includes("?"),d1("?","pathname","search",o)),xr(!o.pathname||!o.pathname.includes("#"),d1("#","pathname","hash",o)),xr(!o.search||!o.search.includes("#"),d1("#","search","hash",o)));let u=t===""||o.pathname==="",h=u?"/":o.pathname,d;if(h==null)d=a;else{let _=n.length-1;if(!s&&h.startsWith("..")){let j=h.split("/");for(;j[0]==="..";)j.shift(),_-=1;o.pathname=j.join("/")}d=_>=0?n[_]:"/"}let f=_b(o,d),m=h&&h!=="/"&&h.endsWith("/"),y=(u||h===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(m||y)&&(f.pathname+="/"),f}const ul=t=>t.join("/").replace(/\/\/+/g,"/"),jb=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),kb=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Nb=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Lb(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Um=["post","put","patch","delete"];new Set(Um);const Tb=["get",...Um];new Set(Tb);function gf(){return gf=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t},gf.apply(this,arguments)}const p0=ye.createContext(null),Cb=ye.createContext(null),Kl=ye.createContext(null),Zd=ye.createContext(null),pl=ye.createContext({outlet:null,matches:[],isDataRoute:!1}),Fm=ye.createContext(null);function Eb(t,n){let{relative:a}=n===void 0?{}:n;_f()||xr(!1);let{basename:s,navigator:o}=ye.useContext(Kl),{hash:u,pathname:h,search:d}=Hm(t,{relative:a}),f=h;return s!=="/"&&(f=h==="/"?s:ul([s,h])),o.createHref({pathname:f,search:d,hash:u})}function _f(){return ye.useContext(Zd)!=null}function sc(){return _f()||xr(!1),ye.useContext(Zd).location}function Im(t){ye.useContext(Kl).static||ye.useLayoutEffect(t)}function oc(){let{isDataRoute:t}=ye.useContext(pl);return t?Wb():Mb()}function Mb(){_f()||xr(!1);let t=ye.useContext(p0),{basename:n,future:a,navigator:s}=ye.useContext(Kl),{matches:o}=ye.useContext(pl),{pathname:u}=sc(),h=JSON.stringify(Pm(o,a.v7_relativeSplatPath)),d=ye.useRef(!1);return Im(()=>{d.current=!0}),ye.useCallback(function(m,y){if(y===void 0&&(y={}),!d.current)return;if(typeof m=="number"){s.go(m);return}let _=qm(m,JSON.parse(h),u,y.relative==="path");t==null&&n!=="/"&&(_.pathname=_.pathname==="/"?n:ul([n,_.pathname])),(y.replace?s.replace:s.push)(_,y.state,y)},[n,s,h,u,t])}function g0(){let{matches:t}=ye.useContext(pl),n=t[t.length-1];return n?n.params:{}}function Hm(t,n){let{relative:a}=n===void 0?{}:n,{future:s}=ye.useContext(Kl),{matches:o}=ye.useContext(pl),{pathname:u}=sc(),h=JSON.stringify(Pm(o,s.v7_relativeSplatPath));return ye.useMemo(()=>qm(t,JSON.parse(h),u,a==="path"),[t,h,u,a])}function Ob(t,n){return Rb(t,n)}function Rb(t,n,a,s){_f()||xr(!1);let{navigator:o}=ye.useContext(Kl),{matches:u}=ye.useContext(pl),h=u[u.length-1],d=h?h.params:{};h&&h.pathname;let f=h?h.pathnameBase:"/";h&&h.route;let m=sc(),y;if(n){var _;let D=typeof n=="string"?ic(n):n;f==="/"||(_=D.pathname)!=null&&_.startsWith(f)||xr(!1),y=D}else y=m;let j=y.pathname||"/",w=j;if(f!=="/"){let D=f.replace(/^\//,"").split("/");w="/"+j.replace(/^\//,"").split("/").slice(D.length).join("/")}let k=sb(t,{pathname:w}),T=qb(k&&k.map(D=>Object.assign({},D,{params:Object.assign({},d,D.params),pathname:ul([f,o.encodeLocation?o.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?f:ul([f,o.encodeLocation?o.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),u,a,s);return n&&T?ye.createElement(Zd.Provider,{value:{location:gf({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:sl.Pop}},T):T}function Db(){let t=Hb(),n=Lb(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return ye.createElement(ye.Fragment,null,ye.createElement("h2",null,"Unexpected Application Error!"),ye.createElement("h3",{style:{fontStyle:"italic"}},n),a?ye.createElement("pre",{style:o},a):null,null)}const zb=ye.createElement(Db,null);class Bb extends ye.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?ye.createElement(pl.Provider,{value:this.props.routeContext},ye.createElement(Fm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Pb(t){let{routeContext:n,match:a,children:s}=t,o=ye.useContext(p0);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),ye.createElement(pl.Provider,{value:n},s)}function qb(t,n,a,s){var o;if(n===void 0&&(n=[]),a===void 0&&(a=null),s===void 0&&(s=null),t==null){var u;if(!a)return null;if(a.errors)t=a.matches;else if((u=s)!=null&&u.v7_partialHydration&&n.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let h=t,d=(o=a)==null?void 0:o.errors;if(d!=null){let y=h.findIndex(_=>_.route.id&&d?.[_.route.id]!==void 0);y>=0||xr(!1),h=h.slice(0,Math.min(h.length,y+1))}let f=!1,m=-1;if(a&&s&&s.v7_partialHydration)for(let y=0;y<h.length;y++){let _=h[y];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(m=y),_.route.id){let{loaderData:j,errors:w}=a,k=_.route.loader&&j[_.route.id]===void 0&&(!w||w[_.route.id]===void 0);if(_.route.lazy||k){f=!0,m>=0?h=h.slice(0,m+1):h=[h[0]];break}}}return h.reduceRight((y,_,j)=>{let w,k=!1,T=null,D=null;a&&(w=d&&_.route.id?d[_.route.id]:void 0,T=_.route.errorElement||zb,f&&(m<0&&j===0?(Yb("route-fallback"),k=!0,D=null):m===j&&(k=!0,D=_.route.hydrateFallbackElement||null)));let C=n.concat(h.slice(0,j+1)),K=()=>{let W;return w?W=T:k?W=D:_.route.Component?W=ye.createElement(_.route.Component,null):_.route.element?W=_.route.element:W=y,ye.createElement(Pb,{match:_,routeContext:{outlet:y,matches:C,isDataRoute:a!=null},children:W})};return a&&(_.route.ErrorBoundary||_.route.errorElement||j===0)?ye.createElement(Bb,{location:a.location,revalidation:a.revalidation,component:T,error:w,children:K(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):K()},null)}var Wm=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(Wm||{}),Ym=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(Ym||{});function Ub(t){let n=ye.useContext(p0);return n||xr(!1),n}function Fb(t){let n=ye.useContext(Cb);return n||xr(!1),n}function Ib(t){let n=ye.useContext(pl);return n||xr(!1),n}function Gm(t){let n=Ib(),a=n.matches[n.matches.length-1];return a.route.id||xr(!1),a.route.id}function Hb(){var t;let n=ye.useContext(Fm),a=Fb(),s=Gm();return n!==void 0?n:(t=a.errors)==null?void 0:t[s]}function Wb(){let{router:t}=Ub(Wm.UseNavigateStable),n=Gm(Ym.UseNavigateStable),a=ye.useRef(!1);return Im(()=>{a.current=!0}),ye.useCallback(function(o,u){u===void 0&&(u={}),a.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,gf({fromRouteId:n},u)))},[t,n])}const Q2={};function Yb(t,n,a){Q2[t]||(Q2[t]=!0)}function Gb(t,n){t?.v7_startTransition,t?.v7_relativeSplatPath}function xs(t){xr(!1)}function Vb(t){let{basename:n="/",children:a=null,location:s,navigationType:o=sl.Pop,navigator:u,static:h=!1,future:d}=t;_f()&&xr(!1);let f=n.replace(/^\/*/,"/"),m=ye.useMemo(()=>({basename:f,navigator:u,static:h,future:gf({v7_relativeSplatPath:!1},d)}),[f,d,u,h]);typeof s=="string"&&(s=ic(s));let{pathname:y="/",search:_="",hash:j="",state:w=null,key:k="default"}=s,T=ye.useMemo(()=>{let D=h0(y,f);return D==null?null:{location:{pathname:D,search:_,hash:j,state:w,key:k},navigationType:o}},[f,y,_,j,w,k,o]);return T==null?null:ye.createElement(Kl.Provider,{value:m},ye.createElement(Zd.Provider,{children:a,value:T}))}function Qb(t){let{children:n,location:a}=t;return Ob(W1(n),a)}new Promise(()=>{});function W1(t,n){n===void 0&&(n=[]);let a=[];return ye.Children.forEach(t,(s,o)=>{if(!ye.isValidElement(s))return;let u=[...n,o];if(s.type===ye.Fragment){a.push.apply(a,W1(s.props.children,u));return}s.type!==xs&&xr(!1),!s.props.index||!s.props.children||xr(!1);let h={id:s.props.id||u.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(h.children=W1(s.props.children,u)),a.push(h)}),a}function Y1(){return Y1=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t},Y1.apply(this,arguments)}function Xb(t,n){if(t==null)return{};var a={},s=Object.keys(t),o,u;for(u=0;u<s.length;u++)o=s[u],!(n.indexOf(o)>=0)&&(a[o]=t[o]);return a}function Kb(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Zb(t,n){return t.button===0&&(!n||n==="_self")&&!Kb(t)}const $b=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Jb="6";try{window.__reactRouterVersion=Jb}catch{}const ex="startTransition",X2=hy[ex];function tx(t){let{basename:n,children:a,future:s,window:o}=t,u=ye.useRef();u.current==null&&(u.current=rb({window:o,v5Compat:!0}));let h=u.current,[d,f]=ye.useState({action:h.action,location:h.location}),{v7_startTransition:m}=s||{},y=ye.useCallback(_=>{m&&X2?X2(()=>f(_)):f(_)},[f,m]);return ye.useLayoutEffect(()=>h.listen(y),[h,y]),ye.useEffect(()=>Gb(s),[s]),ye.createElement(Vb,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:h,future:s})}const nx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fl=ye.forwardRef(function(n,a){let{onClick:s,relative:o,reloadDocument:u,replace:h,state:d,target:f,to:m,preventScrollReset:y,viewTransition:_}=n,j=Xb(n,$b),{basename:w}=ye.useContext(Kl),k,T=!1;if(typeof m=="string"&&rx.test(m)&&(k=m,nx))try{let W=new URL(window.location.href),F=m.startsWith("//")?new URL(W.protocol+m):new URL(m),$=h0(F.pathname,w);F.origin===W.origin&&$!=null?m=$+F.search+F.hash:T=!0}catch{}let D=Eb(m,{relative:o}),C=ax(m,{replace:h,state:d,target:f,preventScrollReset:y,relative:o,viewTransition:_});function K(W){s&&s(W),W.defaultPrevented||C(W)}return ye.createElement("a",Y1({},j,{href:k||D,onClick:T||u?s:K,ref:a,target:f}))});var K2;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(K2||(K2={}));var Z2;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Z2||(Z2={}));function ax(t,n){let{target:a,replace:s,state:o,preventScrollReset:u,relative:h,viewTransition:d}=n===void 0?{}:n,f=oc(),m=sc(),y=Hm(t,{relative:h});return ye.useCallback(_=>{if(Zb(_,a)){_.preventDefault();let j=s!==void 0?s:Fd(m)===Fd(y);f(t,{replace:j,state:o,preventScrollReset:u,relative:h,viewTransition:d})}},[m,f,y,s,o,a,t,u,h,d])}const ix="";async function fn(t,n){const a=await fetch(ix+t,{...n,headers:{"Content-Type":"application/json",...n?.headers}});if(!a.ok)throw new Error(`API error ${a.status}: ${await a.text()}`);return a.json()}const Sn={getProjects:()=>fn("/api/projects"),getProject:t=>fn(`/api/projects/${t}`),getSessions:(t={})=>{const n=new URLSearchParams(Object.entries(t).map(([a,s])=>[a,String(s)]));return fn(`/api/sessions?${n}`)},getSession:t=>fn(`/api/sessions/${t}`),getHealth:()=>fn("/api/health"),getContext:(t,n=3)=>fn(`/api/context?cwd=${encodeURIComponent(t)}&n=${n}`),search:(t,n)=>fn("/api/search",{method:"POST",body:JSON.stringify({query:t,project_id:n})}),getObservations:t=>fn(`/api/observations?session_id=${t}`),getMemory:t=>fn(`/api/memory?project_id=${t}`),getPreferences:t=>fn(`/api/memory/preferences?project_id=${t}`),getKnowledge:(t,n)=>fn(`/api/memory/knowledge?project_id=${t}${n?`&category=${n}`:""}`),getPatterns:(t,n)=>fn(`/api/memory/patterns?project_id=${t}${n?`&type=${n}`:""}`),getTasks:(t,n)=>fn(`/api/memory/tasks?project_id=${t}${n?`&status=${n}`:""}`),getContacts:t=>fn(`/api/memory/contacts?project_id=${t}`),getMetrics:async()=>(await fn("/api/metrics")).metrics,consolidateMemory:t=>fn(`/api/consolidate/${t}`,{method:"POST"}),resyncProject:(t,n)=>fn(`/api/resync/${t}${n?"?force=true":""}`,{method:"POST"}),resyncSession:t=>fn(`/api/resync/session/${t}`,{method:"POST"}),resyncAll:t=>fn(`/api/resync/all${t?"?force=true":""}`,{method:"POST"}),forceEndSession:t=>fn(`/api/force-end-session/${t}`,{method:"POST"}),deleteSession:t=>fn(`/api/sessions/${t}`,{method:"DELETE"}),toggleBookmark:(t,n)=>fn(`/api/sessions/${t}/bookmark`,{method:"POST",body:JSON.stringify({bookmarked:n})}),getTags:t=>fn(`/api/tags?project_id=${t}`),createTag:(t,n,a)=>fn("/api/tags",{method:"POST",body:JSON.stringify({project_id:t,name:n,color:a})}),deleteTag:t=>fn(`/api/tags/${t}`,{method:"DELETE"}),getSessionTags:t=>fn(`/api/tags/session/${t}`),addSessionTag:(t,n)=>fn(`/api/tags/session/${t}`,{method:"POST",body:JSON.stringify({tag_id:n})}),removeSessionTag:(t,n)=>fn(`/api/tags/session/${t}/${n}`,{method:"DELETE"}),updateSessionNotes:(t,n)=>fn(`/api/sessions/${t}/notes`,{method:"POST",body:JSON.stringify({notes:n})}),toggleArchive:(t,n)=>fn(`/api/sessions/${t}/archive`,{method:"POST",body:JSON.stringify({archived:n})}),getSettings:()=>fn("/api/settings"),updateSettings:t=>fn("/api/settings",{method:"POST",body:JSON.stringify(t)})};function m0(){const t=location.protocol==="https:"?"wss:":"ws:";return new WebSocket(`${t}//${location.host}`)}const sx=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ox=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,s)=>s?s.toUpperCase():a.toLowerCase()),$2=t=>{const n=ox(t);return n.charAt(0).toUpperCase()+n.slice(1)},Vm=(...t)=>t.filter((n,a,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===a).join(" ").trim(),lx=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var ux={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const cx=ye.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:o="",children:u,iconNode:h,...d},f)=>ye.createElement("svg",{ref:f,...ux,width:n,height:n,stroke:t,strokeWidth:s?Number(a)*24/Number(n):a,className:Vm("lucide",o),...!u&&!lx(d)&&{"aria-hidden":"true"},...d},[...h.map(([m,y])=>ye.createElement(m,y)),...Array.isArray(u)?u:[u]]));const ct=(t,n)=>{const a=ye.forwardRef(({className:s,...o},u)=>ye.createElement(cx,{ref:u,iconNode:n,className:Vm(`lucide-${sx($2(t))}`,`lucide-${t}`,s),...o}));return a.displayName=$2(t),a};const fx=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],dx=ct("activity",fx);const hx=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],px=ct("archive-restore",hx);const gx=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],mx=ct("archive",gx);const vx=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],yx=ct("arrow-down",vx);const bx=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],v0=ct("arrow-left",bx);const xx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wx=ct("arrow-right",xx);const Sx=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_x=ct("arrow-up",Sx);const Ax=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],J2=ct("book-open",Ax);const jx=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],mf=ct("brain",jx);const kx=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Id=ct("calendar",kx);const Nx=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],y0=ct("chart-column",Nx);const Lx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qm=ct("check",Lx);const Tx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Cx=ct("chevron-down",Tx);const Ex=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Mx=ct("chevron-left",Ex);const Ox=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Rx=ct("chevron-right",Ox);const Dx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],nc=ct("circle-alert",Dx);const zx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],G1=ct("circle-check",zx);const Bx=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],gl=ct("circle-check-big",Bx);const Px=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xm=ct("circle",Px);const qx=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],As=ct("clock",qx);const Ux=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Fx=ct("code-xml",Ux);const Ix=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Km=ct("copy",Ix);const Hx=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],$d=ct("download",Hx);const Wx=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Yx=ct("file-pen",Wx);const Gx=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],Vx=ct("file-search",Gx);const Qx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yi=ct("file-text",Qx);const Xx=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Zm=ct("flame",Xx);const Kx=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],$m=ct("folder-git-2",Kx);const Zx=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Jm=ct("folder-open",Zx);const $x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Jx=ct("frown",$x);const e3=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],e5=ct("git-branch",e3);const t3=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],n3=ct("layers",t3);const r3=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],a3=ct("layout-grid",r3);const i3=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],V1=ct("lightbulb",i3);const s3=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],o3=ct("link-2",s3);const l3=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],u3=ct("list",l3);const c3=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],f3=ct("loader",c3);const d3=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],h3=ct("menu",d3);const p3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],t5=ct("message-square",p3);const g3=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],m3=ct("monitor",g3);const v3=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],y3=ct("moon",v3);const b3=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],x3=ct("pause",b3);const w3=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],S3=ct("play",w3);const _3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],eg=ct("plus",_3);const A3=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],vf=ct("radio",A3);const j3=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Hl=ct("refresh-cw",j3);const k3=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],N3=ct("save",k3);const L3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],b0=ct("search",L3);const T3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],n5=ct("settings",T3);const C3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],E3=ct("smile",C3);const M3=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Hd=ct("square-check-big",M3);const O3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],r5=ct("square",O3);const R3=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],a5=ct("star",R3);const D3=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],z3=ct("sun",D3);const B3=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],i5=ct("tag",B3);const P3=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],q3=ct("terminal",P3);const U3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s5=ct("trash-2",U3);const F3=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],cl=ct("trending-up",F3);const I3=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],H3=ct("triangle-alert",I3);const W3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],tg=ct("users",W3);const Y3=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_s=ct("wrench",Y3);const G3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ti=ct("x",G3);const V3=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],yf=ct("zap",V3);function Q3(){const[t,n]=ye.useState(()=>localStorage.getItem("theme")||"system");return ye.useEffect(()=>{const a=document.documentElement,s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(t==="system"?s:t)==="dark"?a.classList.add("dark"):a.classList.remove("dark"),localStorage.setItem("theme",t)},[t]),ye.useEffect(()=>{if(t!=="system")return;const a=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>{const o=document.documentElement;a.matches?o.classList.add("dark"):o.classList.remove("dark")};return a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[t]),{theme:t,setTheme:n}}function X3(){const{theme:t,setTheme:n}=Q3(),a=[{value:"light",icon:z3,label:"Light"},{value:"dark",icon:y3,label:"Dark"},{value:"system",icon:m3,label:"System"}];return g.jsx("div",{style:{display:"flex",gap:4,padding:"8px",background:"var(--surface2)",borderRadius:8},children:a.map(({value:s,icon:o,label:u})=>g.jsx("button",{onClick:()=>n(s),title:u,style:{padding:"6px 8px",background:t===s?"var(--accent)":"transparent",color:t===s?"white":"var(--text-muted)",border:"none",borderRadius:6,cursor:"pointer",display:"flex",alignItems:"center",transition:"all 0.15s"},children:g.jsx(o,{size:16})},s))})}function K3({children:t}){const n=sc(),[a,s]=ye.useState(!1),{data:o}=ya({queryKey:["health"],queryFn:Sn.getHealth,refetchInterval:1e4}),u=[{path:"/",icon:Jm,label:"Projects"},{path:"/search",icon:b0,label:"Search"},{path:"/live",icon:vf,label:"Live"},{path:"/metrics",icon:y0,label:"Metrics"},{path:"/logs",icon:yi,label:"Logs"},{path:"/settings",icon:n5,label:"Settings"}];return g.jsxs("div",{style:{display:"flex",minHeight:"100vh",position:"relative"},children:[g.jsx("button",{onClick:()=>s(!a),style:{position:"fixed",top:16,left:16,zIndex:1001,display:"none",padding:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",cursor:"pointer"},className:"mobile-only",children:a?g.jsx(ti,{size:20}):g.jsx(h3,{size:20})}),a&&g.jsx("div",{onClick:()=>s(!1),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:999,display:"none"},className:"mobile-only"}),g.jsxs("aside",{style:{width:240,background:"var(--surface)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",flexShrink:0,position:"fixed",height:"100vh",left:0,top:0,zIndex:1e3,transition:"left 0.3s ease"},className:"sidebar",children:[g.jsxs("div",{style:{padding:"24px 20px 20px",borderBottom:"1px solid var(--border)"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[g.jsx(yf,{size:22,color:"var(--accent)"}),g.jsx("span",{style:{fontWeight:700,fontSize:17,color:"var(--text)"},children:"MemCTX"})]}),g.jsxs("div",{style:{marginTop:10,fontSize:12,color:o?.status==="ok"?"var(--green)":"var(--red)",display:"flex",alignItems:"center",gap:6},children:[g.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:o?.status==="ok"?"var(--green)":"var(--red)",display:"inline-block"}}),o?.status==="ok"?"Worker online":"Connecting..."]})]}),g.jsx("nav",{style:{padding:"12px 10px",flex:1},children:u.map(({path:h,icon:d,label:f})=>{const m=n.pathname===h||h!=="/"&&n.pathname.startsWith(h);return g.jsxs(fl,{to:h,onClick:()=>s(!1),style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px",borderRadius:8,marginBottom:4,color:m?"var(--text)":"var(--text-muted)",background:m?"var(--surface2)":"transparent",transition:"all 0.15s",fontSize:14,fontWeight:m?600:500},children:[g.jsx(d,{size:17}),f]},h)})}),g.jsxs("div",{style:{padding:"16px 20px",borderTop:"1px solid var(--border)"},children:[g.jsx(X3,{}),o&&g.jsxs("div",{style:{marginTop:16,fontSize:12,color:"var(--text-muted)",lineHeight:1.8},children:[g.jsxs("div",{children:["DB: ",o.db]}),g.jsxs("div",{children:["AI: ",o.api_key?"enabled":"no key"]}),g.jsxs("div",{children:["Queue: ",o.queue_size??0," pending"]}),g.jsxs("div",{children:["v",o.version]})]})]})]}),g.jsx("main",{style:{flex:1,overflow:"auto",minWidth:0,marginLeft:240,paddingBottom:60,transition:"margin-left 0.3s ease"},className:"main-content",children:t}),g.jsx("style",{children:`
|
|
10
|
+
@media (max-width: 768px) {
|
|
11
|
+
.mobile-only {
|
|
12
|
+
display: block !important;
|
|
13
|
+
}
|
|
14
|
+
.sidebar {
|
|
15
|
+
left: ${a?"0":"-240px"} !important;
|
|
16
|
+
}
|
|
17
|
+
.main-content {
|
|
18
|
+
margin-left: 0 !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`})]})}function hn(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}function dl(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}const o5=6048e5,Z3=864e5,ng=6e4,rg=525600,Ku=43200,Wd=1440;let $3={};function lc(){return $3}function bf(t,n){const a=lc(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,o=hn(t),u=o.getDay(),h=(u<s?7:0)+u-s;return o.setDate(o.getDate()-h),o.setHours(0,0,0,0),o}function Yd(t){return bf(t,{weekStartsOn:1})}function l5(t){const n=hn(t),a=n.getFullYear(),s=dl(t,0);s.setFullYear(a+1,0,4),s.setHours(0,0,0,0);const o=Yd(s),u=dl(t,0);u.setFullYear(a,0,4),u.setHours(0,0,0,0);const h=Yd(u);return n.getTime()>=o.getTime()?a+1:n.getTime()>=h.getTime()?a:a-1}function Q1(t){const n=hn(t);return n.setHours(0,0,0,0),n}function rc(t){const n=hn(t),a=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return a.setUTCFullYear(n.getFullYear()),+t-+a}function J3(t,n){const a=Q1(t),s=Q1(n),o=+a-rc(a),u=+s-rc(s);return Math.round((o-u)/Z3)}function e4(t){const n=l5(t),a=dl(t,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),Yd(a)}function uf(t,n){const a=hn(t),s=hn(n),o=a.getTime()-s.getTime();return o<0?-1:o>0?1:o}function t4(t){return dl(t,Date.now())}function n4(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function r4(t){if(!n4(t)&&typeof t!="number")return!1;const n=hn(t);return!isNaN(Number(n))}function a4(t,n){const a=hn(t),s=hn(n),o=a.getFullYear()-s.getFullYear(),u=a.getMonth()-s.getMonth();return o*12+u}function u5(t){return n=>{const s=(t?Math[t]:Math.trunc)(n);return s===0?0:s}}function i4(t,n){return+hn(t)-+hn(n)}function s4(t){const n=hn(t);return n.setHours(23,59,59,999),n}function o4(t){const n=hn(t),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(23,59,59,999),n}function l4(t){const n=hn(t);return+s4(n)==+o4(n)}function u4(t,n){const a=hn(t),s=hn(n),o=uf(a,s),u=Math.abs(a4(a,s));let h;if(u<1)h=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*u);let d=uf(a,s)===-o;l4(hn(t))&&u===1&&uf(t,s)===1&&(d=!1),h=o*(u-Number(d))}return h===0?0:h}function c4(t,n,a){const s=i4(t,n)/1e3;return u5(a?.roundingMethod)(s)}function f4(t){const n=hn(t),a=dl(t,0);return a.setFullYear(n.getFullYear(),0,1),a.setHours(0,0,0,0),a}const d4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},h4=(t,n,a)=>{let s;const o=d4[t];return typeof o=="string"?s=o:n===1?s=o.one:s=o.other.replace("{{count}}",n.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+s:s+" ago":s};function h1(t){return(n={})=>{const a=n.width?String(n.width):t.defaultWidth;return t.formats[a]||t.formats[t.defaultWidth]}}const p4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},g4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},v4={date:h1({formats:p4,defaultWidth:"full"}),time:h1({formats:g4,defaultWidth:"full"}),dateTime:h1({formats:m4,defaultWidth:"full"})},y4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},b4=(t,n,a,s)=>y4[t];function Jc(t){return(n,a)=>{const s=a?.context?String(a.context):"standalone";let o;if(s==="formatting"&&t.formattingValues){const h=t.defaultFormattingWidth||t.defaultWidth,d=a?.width?String(a.width):h;o=t.formattingValues[d]||t.formattingValues[h]}else{const h=t.defaultWidth,d=a?.width?String(a.width):t.defaultWidth;o=t.values[d]||t.values[h]}const u=t.argumentCallback?t.argumentCallback(n):n;return o[u]}}const x4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},w4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},A4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},j4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},k4=(t,n)=>{const a=Number(t),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},N4={ordinalNumber:k4,era:Jc({values:x4,defaultWidth:"wide"}),quarter:Jc({values:w4,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Jc({values:S4,defaultWidth:"wide"}),day:Jc({values:_4,defaultWidth:"wide"}),dayPeriod:Jc({values:A4,defaultWidth:"wide",formattingValues:j4,defaultFormattingWidth:"wide"})};function ef(t){return(n,a={})=>{const s=a.width,o=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],u=n.match(o);if(!u)return null;const h=u[0],d=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(d)?T4(d,_=>_.test(h)):L4(d,_=>_.test(h));let m;m=t.valueCallback?t.valueCallback(f):f,m=a.valueCallback?a.valueCallback(m):m;const y=n.slice(h.length);return{value:m,rest:y}}}function L4(t,n){for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n(t[a]))return a}function T4(t,n){for(let a=0;a<t.length;a++)if(n(t[a]))return a}function C4(t){return(n,a={})=>{const s=n.match(t.matchPattern);if(!s)return null;const o=s[0],u=n.match(t.parsePattern);if(!u)return null;let h=t.valueCallback?t.valueCallback(u[0]):u[0];h=a.valueCallback?a.valueCallback(h):h;const d=n.slice(o.length);return{value:h,rest:d}}}const E4=/^(\d+)(th|st|nd|rd)?/i,M4=/\d+/i,O4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},R4={any:[/^b/i,/^(a|c)/i]},D4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},z4={any:[/1/i,/2/i,/3/i,/4/i]},B4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},P4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},q4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},U4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},F4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},I4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},H4={ordinalNumber:C4({matchPattern:E4,parsePattern:M4,valueCallback:t=>parseInt(t,10)}),era:ef({matchPatterns:O4,defaultMatchWidth:"wide",parsePatterns:R4,defaultParseWidth:"any"}),quarter:ef({matchPatterns:D4,defaultMatchWidth:"wide",parsePatterns:z4,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ef({matchPatterns:B4,defaultMatchWidth:"wide",parsePatterns:P4,defaultParseWidth:"any"}),day:ef({matchPatterns:q4,defaultMatchWidth:"wide",parsePatterns:U4,defaultParseWidth:"any"}),dayPeriod:ef({matchPatterns:F4,defaultMatchWidth:"any",parsePatterns:I4,defaultParseWidth:"any"})},x0={code:"en-US",formatDistance:h4,formatLong:v4,formatRelative:b4,localize:N4,match:H4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W4(t){const n=hn(t);return J3(n,f4(n))+1}function Y4(t){const n=hn(t),a=+Yd(n)-+e4(n);return Math.round(a/o5)+1}function c5(t,n){const a=hn(t),s=a.getFullYear(),o=lc(),u=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,h=dl(t,0);h.setFullYear(s+1,0,u),h.setHours(0,0,0,0);const d=bf(h,n),f=dl(t,0);f.setFullYear(s,0,u),f.setHours(0,0,0,0);const m=bf(f,n);return a.getTime()>=d.getTime()?s+1:a.getTime()>=m.getTime()?s:s-1}function G4(t,n){const a=lc(),s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=c5(t,n),u=dl(t,0);return u.setFullYear(o,0,s),u.setHours(0,0,0,0),bf(u,n)}function V4(t,n){const a=hn(t),s=+bf(a,n)-+G4(a,n);return Math.round(s/o5)+1}function wn(t,n){const a=t<0?"-":"",s=Math.abs(t).toString().padStart(n,"0");return a+s}const rl={y(t,n){const a=t.getFullYear(),s=a>0?a:1-a;return wn(n==="yy"?s%100:s,n.length)},M(t,n){const a=t.getMonth();return n==="M"?String(a+1):wn(a+1,2)},d(t,n){return wn(t.getDate(),n.length)},a(t,n){const a=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return a==="am"?"a.m.":"p.m."}},h(t,n){return wn(t.getHours()%12||12,n.length)},H(t,n){return wn(t.getHours(),n.length)},m(t,n){return wn(t.getMinutes(),n.length)},s(t,n){return wn(t.getSeconds(),n.length)},S(t,n){const a=n.length,s=t.getMilliseconds(),o=Math.trunc(s*Math.pow(10,a-3));return wn(o,n.length)}},Hu={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ag={G:function(t,n,a){const s=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return a.era(s,{width:"abbreviated"});case"GGGGG":return a.era(s,{width:"narrow"});default:return a.era(s,{width:"wide"})}},y:function(t,n,a){if(n==="yo"){const s=t.getFullYear(),o=s>0?s:1-s;return a.ordinalNumber(o,{unit:"year"})}return rl.y(t,n)},Y:function(t,n,a,s){const o=c5(t,s),u=o>0?o:1-o;if(n==="YY"){const h=u%100;return wn(h,2)}return n==="Yo"?a.ordinalNumber(u,{unit:"year"}):wn(u,n.length)},R:function(t,n){const a=l5(t);return wn(a,n.length)},u:function(t,n){const a=t.getFullYear();return wn(a,n.length)},Q:function(t,n,a){const s=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(s);case"QQ":return wn(s,2);case"Qo":return a.ordinalNumber(s,{unit:"quarter"});case"QQQ":return a.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(s,{width:"narrow",context:"formatting"});default:return a.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,n,a){const s=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(s);case"qq":return wn(s,2);case"qo":return a.ordinalNumber(s,{unit:"quarter"});case"qqq":return a.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(s,{width:"narrow",context:"standalone"});default:return a.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,n,a){const s=t.getMonth();switch(n){case"M":case"MM":return rl.M(t,n);case"Mo":return a.ordinalNumber(s+1,{unit:"month"});case"MMM":return a.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(s,{width:"narrow",context:"formatting"});default:return a.month(s,{width:"wide",context:"formatting"})}},L:function(t,n,a){const s=t.getMonth();switch(n){case"L":return String(s+1);case"LL":return wn(s+1,2);case"Lo":return a.ordinalNumber(s+1,{unit:"month"});case"LLL":return a.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(s,{width:"narrow",context:"standalone"});default:return a.month(s,{width:"wide",context:"standalone"})}},w:function(t,n,a,s){const o=V4(t,s);return n==="wo"?a.ordinalNumber(o,{unit:"week"}):wn(o,n.length)},I:function(t,n,a){const s=Y4(t);return n==="Io"?a.ordinalNumber(s,{unit:"week"}):wn(s,n.length)},d:function(t,n,a){return n==="do"?a.ordinalNumber(t.getDate(),{unit:"date"}):rl.d(t,n)},D:function(t,n,a){const s=W4(t);return n==="Do"?a.ordinalNumber(s,{unit:"dayOfYear"}):wn(s,n.length)},E:function(t,n,a){const s=t.getDay();switch(n){case"E":case"EE":case"EEE":return a.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(s,{width:"short",context:"formatting"});default:return a.day(s,{width:"wide",context:"formatting"})}},e:function(t,n,a,s){const o=t.getDay(),u=(o-s.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return wn(u,2);case"eo":return a.ordinalNumber(u,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,a,s){const o=t.getDay(),u=(o-s.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return wn(u,n.length);case"co":return a.ordinalNumber(u,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,a){const s=t.getDay(),o=s===0?7:s;switch(n){case"i":return String(o);case"ii":return wn(o,n.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(s,{width:"short",context:"formatting"});default:return a.day(s,{width:"wide",context:"formatting"})}},a:function(t,n,a){const o=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,a){const s=t.getHours();let o;switch(s===12?o=Hu.noon:s===0?o=Hu.midnight:o=s/12>=1?"pm":"am",n){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,a){const s=t.getHours();let o;switch(s>=17?o=Hu.evening:s>=12?o=Hu.afternoon:s>=4?o=Hu.morning:o=Hu.night,n){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,a){if(n==="ho"){let s=t.getHours()%12;return s===0&&(s=12),a.ordinalNumber(s,{unit:"hour"})}return rl.h(t,n)},H:function(t,n,a){return n==="Ho"?a.ordinalNumber(t.getHours(),{unit:"hour"}):rl.H(t,n)},K:function(t,n,a){const s=t.getHours()%12;return n==="Ko"?a.ordinalNumber(s,{unit:"hour"}):wn(s,n.length)},k:function(t,n,a){let s=t.getHours();return s===0&&(s=24),n==="ko"?a.ordinalNumber(s,{unit:"hour"}):wn(s,n.length)},m:function(t,n,a){return n==="mo"?a.ordinalNumber(t.getMinutes(),{unit:"minute"}):rl.m(t,n)},s:function(t,n,a){return n==="so"?a.ordinalNumber(t.getSeconds(),{unit:"second"}):rl.s(t,n)},S:function(t,n){return rl.S(t,n)},X:function(t,n,a){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return sg(s);case"XXXX":case"XX":return ql(s);default:return ql(s,":")}},x:function(t,n,a){const s=t.getTimezoneOffset();switch(n){case"x":return sg(s);case"xxxx":case"xx":return ql(s);default:return ql(s,":")}},O:function(t,n,a){const s=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+ig(s,":");default:return"GMT"+ql(s,":")}},z:function(t,n,a){const s=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+ig(s,":");default:return"GMT"+ql(s,":")}},t:function(t,n,a){const s=Math.trunc(t.getTime()/1e3);return wn(s,n.length)},T:function(t,n,a){const s=t.getTime();return wn(s,n.length)}};function ig(t,n=""){const a=t>0?"-":"+",s=Math.abs(t),o=Math.trunc(s/60),u=s%60;return u===0?a+String(o):a+String(o)+n+wn(u,2)}function sg(t,n){return t%60===0?(t>0?"-":"+")+wn(Math.abs(t)/60,2):ql(t,n)}function ql(t,n=""){const a=t>0?"-":"+",s=Math.abs(t),o=wn(Math.trunc(s/60),2),u=wn(s%60,2);return a+o+n+u}const og=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},f5=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},Q4=(t,n)=>{const a=t.match(/(P+)(p+)?/)||[],s=a[1],o=a[2];if(!o)return og(t,n);let u;switch(s){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",og(s,n)).replace("{{time}}",f5(o,n))},X4={p:f5,P:Q4},K4=/^D+$/,Z4=/^Y+$/,$4=["D","DD","YY","YYYY"];function J4(t){return K4.test(t)}function e6(t){return Z4.test(t)}function t6(t,n,a){const s=n6(t,n,a);if(console.warn(s),$4.includes(t))throw new RangeError(s)}function n6(t,n,a){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${s} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const r6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,a6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,i6=/^'([^]*?)'?$/,s6=/''/g,o6=/[a-zA-Z]/;function co(t,n,a){const s=lc(),o=s.locale??x0,u=s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,h=s.weekStartsOn??s.locale?.options?.weekStartsOn??0,d=hn(t);if(!r4(d))throw new RangeError("Invalid time value");let f=n.match(a6).map(y=>{const _=y[0];if(_==="p"||_==="P"){const j=X4[_];return j(y,o.formatLong)}return y}).join("").match(r6).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const _=y[0];if(_==="'")return{isToken:!1,value:l6(y)};if(ag[_])return{isToken:!0,value:y};if(_.match(o6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(f=o.localize.preprocessor(d,f));const m={firstWeekContainsDate:u,weekStartsOn:h,locale:o};return f.map(y=>{if(!y.isToken)return y.value;const _=y.value;(e6(_)||J4(_))&&t6(_,n,String(t));const j=ag[_[0]];return j(d,_,o.localize,m)}).join("")}function l6(t){const n=t.match(i6);return n?n[1].replace(s6,"'"):t}function u6(t,n,a){const s=lc(),o=a?.locale??s.locale??x0,u=2520,h=uf(t,n);if(isNaN(h))throw new RangeError("Invalid time value");const d=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:h});let f,m;h>0?(f=hn(n),m=hn(t)):(f=hn(t),m=hn(n));const y=c4(m,f),_=(rc(m)-rc(f))/1e3,j=Math.round((y-_)/60);let w;if(j<2)return a?.includeSeconds?y<5?o.formatDistance("lessThanXSeconds",5,d):y<10?o.formatDistance("lessThanXSeconds",10,d):y<20?o.formatDistance("lessThanXSeconds",20,d):y<40?o.formatDistance("halfAMinute",0,d):y<60?o.formatDistance("lessThanXMinutes",1,d):o.formatDistance("xMinutes",1,d):j===0?o.formatDistance("lessThanXMinutes",1,d):o.formatDistance("xMinutes",j,d);if(j<45)return o.formatDistance("xMinutes",j,d);if(j<90)return o.formatDistance("aboutXHours",1,d);if(j<Wd){const k=Math.round(j/60);return o.formatDistance("aboutXHours",k,d)}else{if(j<u)return o.formatDistance("xDays",1,d);if(j<Ku){const k=Math.round(j/Wd);return o.formatDistance("xDays",k,d)}else if(j<Ku*2)return w=Math.round(j/Ku),o.formatDistance("aboutXMonths",w,d)}if(w=u4(m,f),w<12){const k=Math.round(j/Ku);return o.formatDistance("xMonths",k,d)}else{const k=w%12,T=Math.trunc(w/12);return k<3?o.formatDistance("aboutXYears",T,d):k<9?o.formatDistance("overXYears",T,d):o.formatDistance("almostXYears",T+1,d)}}function c6(t,n,a){const o=lc().locale??x0,u=uf(t,n);if(isNaN(u))throw new RangeError("Invalid time value");const h=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:u});let d,f;u>0?(d=hn(n),f=hn(t)):(d=hn(t),f=hn(n));const m=u5("round"),y=f.getTime()-d.getTime(),_=y/ng,j=rc(f)-rc(d),w=(y-j)/ng,k=a?.unit;let T;if(_<1?T="second":_<60?T="minute":_<Wd?T="hour":w<Ku?T="day":w<rg?T="month":T="year",T==="second"){const D=m(y/1e3);return o.formatDistance("xSeconds",D,h)}else if(T==="minute"){const D=m(_);return o.formatDistance("xMinutes",D,h)}else if(T==="hour"){const D=m(_/60);return o.formatDistance("xHours",D,h)}else if(T==="day"){const D=m(w/Wd);return o.formatDistance("xDays",D,h)}else if(T==="month"){const D=m(w/Ku);return D===12&&k!=="month"?o.formatDistance("xYears",1,h):o.formatDistance("xMonths",D,h)}else{const D=m(w/rg);return o.formatDistance("xYears",D,h)}}function d5(t,n){return u6(t,t4(t),n)}function Gd({isOpen:t,title:n,message:a,confirmText:s="Confirm",cancelText:o="Cancel",confirmColor:u="var(--accent)",onConfirm:h,onCancel:d}){return t?g.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",padding:20,animation:"fadeIn 0.2s ease-out"},onClick:d,children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:16,maxWidth:480,width:"100%",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",animation:"scaleIn 0.2s ease-out"},onClick:f=>f.stopPropagation(),children:[g.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[g.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:n}),g.jsx("button",{onClick:d,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex",alignItems:"center",borderRadius:6,transition:"background 0.15s"},onMouseEnter:f=>f.currentTarget.style.background="var(--surface2)",onMouseLeave:f=>f.currentTarget.style.background="transparent",children:g.jsx(ti,{size:20})})]}),g.jsx("div",{style:{padding:"24px",fontSize:14,lineHeight:1.6,color:"var(--text)"},children:a}),g.jsxs("div",{style:{padding:"16px 24px",borderTop:"1px solid var(--border)",display:"flex",gap:12,justifyContent:"flex-end"},children:[g.jsx("button",{onClick:d,style:{padding:"10px 20px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:f=>f.currentTarget.style.background="var(--border)",onMouseLeave:f=>f.currentTarget.style.background="var(--surface2)",children:o}),g.jsx("button",{onClick:h,style:{padding:"10px 20px",background:u,border:"none",borderRadius:8,fontSize:14,fontWeight:600,color:"white",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:f=>f.currentTarget.style.opacity="0.9",onMouseLeave:f=>f.currentTarget.style.opacity="1",children:s})]})]})}):null}function f6({projects:t,onOpenProject:n}){const{data:a}=ya({queryKey:["all-sessions"],queryFn:async()=>{const O=t.map(G=>Sn.getSessions({project_id:G.id,limit:1e3}));return(await Promise.all(O)).flat()},enabled:t.length>0}),s=a||[],o=s.length,u=s.filter(O=>O.status==="completed").length,h=o>0?Math.round(u/o*100):0,d=s.reduce((O,U)=>U.ended_at?O+(U.ended_at-U.started_at):O,0),f=o>0?Math.round(d/o/60):0,m=Math.round(d/3600),_=new Set(s.flatMap(O=>{try{const U=typeof O.summary_files_changed=="string"?JSON.parse(O.summary_files_changed):O.summary_files_changed;return Array.isArray(U)?U:[]}catch{return[]}})).size,j=s.reduce((O,U)=>O+(U.tool_use_count||0),0),w=new Set(s.map(O=>{const U=new Date(O.started_at*1e3);return U.setHours(0,0,0,0),U.getTime()})),k=Array.from(w).sort((O,U)=>U-O);let T=0;const D=new Date;D.setHours(0,0,0,0);const C=D.getTime(),K=C-864e5;if(k.includes(C)||k.includes(K)){let O=k.includes(C)?C:K;for(;k.includes(O);)T++,O-=864e5}const F=Date.now()/1e3-10080*60,$=s.filter(O=>O.started_at>=F),Le={};$.forEach(O=>{const U=new Date(O.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});Le[U]=(Le[U]||0)+1});const ke=[];for(let O=6;O>=0;O--){const G=new Date(Date.now()-O*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});ke.push({date:G,count:Le[G]||0})}const se=Math.max(...ke.map(O=>O.count),1),J=t.map(O=>({name:O.name,sessions:(O.sessions||[]).length})).sort((O,U)=>U.sessions-O.sessions),pe=J[0];return g.jsxs("div",{style:{marginBottom:32},children:[g.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[g.jsx(cl,{size:20}),"Overview Dashboard"]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(gl,{size:16,style:{color:"var(--green)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Sessions"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:o}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[h,"% completed"]})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(As,{size:16,style:{color:"var(--blue)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Time"})]}),g.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[m,"h"]}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[f,"m avg per session"]})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(yi,{size:16,style:{color:"var(--purple)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:_}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"across all projects"})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(_s,{size:16,style:{color:"var(--orange)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:j}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(Zm,{size:16,style:{color:T>0?"var(--orange)":"var(--text-muted)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:T>0?"var(--orange)":"var(--text)"},children:T}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[T===1?"day":"days"," in a row"]})]})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[g.jsx(cl,{size:16}),"Last 7 Days Activity"]}),g.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:ke.map((O,U)=>g.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[g.jsx("div",{style:{width:"100%",height:Math.max(O.count/se*100,4),background:O.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:O.count>0&&g.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:O.count})}),g.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:O.date.split(" ")[1]})]},U))})]}),pe&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[g.jsx(cl,{size:16}),"Most Active Projects"]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:J.slice(0,5).map((O,U)=>g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[g.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--accent)",cursor:"pointer",textDecoration:"none"},onClick:()=>{n(O.id,O.name),window.location.href=`/project/${O.id}`},onMouseEnter:G=>G.currentTarget.style.textDecoration="underline",onMouseLeave:G=>G.currentTarget.style.textDecoration="none",children:O.name}),g.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:O.sessions})]}),g.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:g.jsx("div",{style:{width:`${O.sessions/pe.sessions*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},U))})]})]})]})}let d6=0;const cf=new Set;let of=[];function p1(t){t.forEach(n=>n([...of]))}const $e={show:(t,n="info",a)=>{const s=`toast-${d6++}`;return of.push({id:s,type:n,message:t,progress:a}),p1(cf),n!=="loading"&&setTimeout(()=>$e.dismiss(s),5e3),s},loading:(t,n)=>$e.show(t,"loading",n),success:t=>$e.show(t,"success"),error:t=>$e.show(t,"error"),update:(t,n,a)=>{const s=of.find(o=>o.id===t);s&&(s.message=n,a!==void 0&&(s.progress=a),p1(cf))},dismiss:t=>{of=of.filter(n=>n.id!==t),p1(cf)}};function h6(){const[t,n]=ye.useState([]);return ye.useEffect(()=>(cf.add(n),()=>{cf.delete(n)}),[]),t.length===0?null:g.jsx("div",{style:{position:"fixed",bottom:20,right:20,zIndex:9999,display:"flex",flexDirection:"column",gap:10,maxWidth:400},children:t.map(a=>g.jsx(p6,{toast:a,onDismiss:()=>$e.dismiss(a.id)},a.id))})}function p6({toast:t,onDismiss:n}){const s={success:{bg:"var(--green)15",border:"var(--green)",icon:"var(--green)"},error:{bg:"var(--red)15",border:"var(--red)",icon:"var(--red)"},info:{bg:"var(--blue)15",border:"var(--blue)",icon:"var(--blue)"},loading:{bg:"var(--accent)15",border:"var(--accent)",icon:"var(--accent)"}}[t.type],o=t.type==="success"?gl:t.type==="error"?nc:f3;return g.jsxs("div",{style:{background:"var(--surface)",border:`1px solid ${s.border}`,borderRadius:12,padding:"14px 16px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",display:"flex",alignItems:"flex-start",gap:12,minWidth:300,animation:"slideIn 0.3s ease-out"},children:[g.jsx(o,{size:20,style:{color:s.icon,flexShrink:0,animation:t.type==="loading"?"spin 1s linear infinite":"none"}}),g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:t.progress!==void 0?8:0},children:t.message}),t.progress!==void 0&&g.jsx("div",{style:{height:4,background:"var(--border)",borderRadius:2,overflow:"hidden"},children:g.jsx("div",{style:{height:"100%",background:s.icon,width:`${t.progress}%`,transition:"width 0.3s ease"}})})]}),t.type!=="loading"&&g.jsx("button",{onClick:n,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:0,display:"flex",alignItems:"center"},children:g.jsx(ti,{size:16})})]})}function g1(){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,animation:"fadeIn 0.3s"},children:[g.jsx("div",{style:{height:20,width:"60%",background:"var(--surface2)",borderRadius:4,marginBottom:12,animation:"pulse 1.5s ease-in-out infinite"}}),g.jsx("div",{style:{height:14,width:"40%",background:"var(--surface2)",borderRadius:4,marginBottom:16,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.1s"}}),g.jsx("div",{style:{height:14,width:"80%",background:"var(--surface2)",borderRadius:4,marginBottom:8,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.2s"}}),g.jsx("div",{style:{height:14,width:"70%",background:"var(--surface2)",borderRadius:4,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.3s"}})]})}function g6({onOpenProject:t}){const[n,a]=ye.useState(!1),[s,o]=ye.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:u,isLoading:h,error:d,refetch:f}=ya({queryKey:["projects"],queryFn:Sn.getProjects,refetchInterval:15e3}),m=async(y=!1)=>{o({isOpen:!0,title:y?"Force Resync All Projects":"Resync All Projects",message:y?"This will regenerate ALL summaries across ALL projects with v2.0 fields. This may take a very long time. Continue?":'This will only process sessions without summaries across all projects. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:y?"Force Resync":"Resync",confirmColor:y?"var(--orange)":"var(--blue)",onConfirm:async()=>{o({...s,isOpen:!1}),a(!0);const _=$e.loading("Queueing sessions across all projects...",0);try{const j=await Sn.resyncAll(y);$e.update(_,`Queued ${j.result.queued} sessions. Processing...`,50),setTimeout(()=>{$e.dismiss(_),$e.success(j.result.message)},2e3),f()}catch(j){$e.dismiss(_),$e.error("Resync failed: "+j)}finally{a(!1)}}})};return h?g.jsx(m6,{}):d?g.jsx(v6,{message:String(d)}):g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsx("div",{style:{marginBottom:24},children:g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[g.jsxs("div",{children:[g.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),g.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13},children:["All tracked workspaces — ",u?.length??0," total"]})]}),g.jsxs("div",{style:{display:"flex",gap:8},children:[g.jsxs("button",{onClick:()=>m(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:n?"var(--surface)":"var(--blue)15",color:n?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:n?"var(--border)":"var(--blue)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:n?"not-allowed":"pointer",transition:"all 0.15s"},children:[g.jsx(Hl,{size:16,style:{animation:n?"spin 1s linear infinite":"none"}}),n?"Resyncing...":"Resync New"]}),g.jsxs("button",{onClick:()=>m(!0),disabled:n,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:n?"var(--surface)":"var(--orange)15",color:n?"var(--text-muted)":"var(--orange)",border:"1px solid",borderColor:n?"var(--border)":"var(--orange)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:n?"not-allowed":"pointer",transition:"all 0.15s"},children:[g.jsx(Hl,{size:16,style:{animation:n?"spin 1s linear infinite":"none"}}),n?"Resyncing...":"Force Resync All"]})]})]})}),!u||u.length===0?g.jsx(y6,{}):g.jsxs(g.Fragment,{children:[g.jsx(f6,{projects:u,onOpenProject:t}),g.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:16,marginTop:32},children:"All Projects"}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:14},className:"projects-grid",children:u.map(y=>g.jsx(fl,{to:`/project/${y.id}`,style:{display:"block"},children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:_=>{_.currentTarget.style.borderColor="var(--accent)",_.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:_=>{_.currentTarget.style.borderColor="var(--border)",_.currentTarget.style.transform="none"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,marginBottom:10},children:[g.jsx($m,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),g.jsxs("div",{style:{minWidth:0},children:[g.jsx("div",{style:{fontWeight:700,fontSize:15,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.name}),y.git_remote&&g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")})]})]}),g.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[g.jsx(n3,{size:12,color:"var(--text-muted)"}),g.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[y.session_count??0," sessions"]})]}),y.last_session_at&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[g.jsx(As,{size:12,color:"var(--text-muted)"}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:d5(new Date(y.last_session_at*1e3),{addSuffix:!0})})]})]})]})},y.id))})]}),g.jsx(Gd,{isOpen:s.isOpen,title:s.title,message:s.message,confirmText:s.confirmText,cancelText:"Cancel",confirmColor:s.confirmColor,onConfirm:s.onConfirm,onCancel:()=>o({...s,isOpen:!1})})]})}function m6(){return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs("div",{style:{marginBottom:24},children:[g.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Loading..."})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16},children:[g.jsx(g1,{}),g.jsx(g1,{}),g.jsx(g1,{})]})]})}function v6({message:t}){return g.jsxs("div",{style:{padding:32},children:[g.jsxs("div",{style:{color:"var(--red)",fontSize:13},children:["Error: ",t]}),g.jsx("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:8},children:"Make sure the ClaudeContext worker is running on port 9999."})]})}function y6(){return g.jsxs("div",{style:{textAlign:"center",padding:"60px 32px",color:"var(--text-muted)"},children:[g.jsx($m,{size:40,color:"var(--border)",style:{marginBottom:16}}),g.jsx("div",{style:{fontSize:16,fontWeight:600,marginBottom:8,color:"var(--text)"},children:"No projects yet"}),g.jsx("div",{style:{fontSize:13,maxWidth:360,margin:"0 auto",lineHeight:1.6},children:"Start a Claude Code session in any project to begin tracking. ClaudeContext will automatically capture sessions when hooks fire."}),g.jsx("div",{style:{marginTop:20,padding:"12px 16px",background:"var(--surface2)",borderRadius:8,display:"inline-block",fontFamily:"monospace",fontSize:12},children:"claudectx install"})]})}const b6="modulepreload",x6=function(t){return"/"+t},lg={},Md=function(n,a,s){let o=Promise.resolve();if(a&&a.length>0){let f=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),d=h?.nonce||h?.getAttribute("nonce");o=f(a.map(m=>{if(m=x6(m),m in lg)return;lg[m]=!0;const y=m.endsWith(".css"),_=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${_}`))return;const j=document.createElement("link");if(j.rel=y?"stylesheet":b6,y||(j.as="script"),j.crossOrigin="",j.href=m,d&&j.setAttribute("nonce",d),document.head.appendChild(j),y)return new Promise((w,k)=>{j.addEventListener("load",w),j.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return o.then(h=>{for(const d of h||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},w6={completed:{bg:"#16301e",color:"#22c55e",label:"Completed"},in_progress:{bg:"#2d2505",color:"#eab308",label:"In Progress"},blocked:{bg:"#2d0808",color:"#ef4444",label:"Blocked"},active:{bg:"#0f1f3d",color:"#60a5fa",label:"Active"},compacted:{bg:"#1e1e24",color:"#7a7a99",label:"Compacted"},error:{bg:"#2d0808",color:"#ef4444",label:"Error"}};function h5({status:t}){const n=w6[t]||{bg:"#1e1e24",color:"#7a7a99",label:t},a=t==="active";return g.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:20,background:n.bg,color:n.color,fontSize:11,fontWeight:600,letterSpacing:"0.02em",textTransform:"uppercase"},children:[a&&g.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:n.color,display:"inline-block",animation:"pulse 1.5s infinite"}}),n.label,g.jsx("style",{children:`
|
|
22
|
+
@keyframes pulse {
|
|
23
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
24
|
+
50% { opacity: 0.5; transform: scale(0.8); }
|
|
25
|
+
}
|
|
26
|
+
`})]})}function S6({checked:t,onChange:n,disabled:a}){return g.jsx("button",{onClick:s=>{s.preventDefault(),s.stopPropagation(),a||n(!t)},disabled:a,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,background:"transparent",color:t?"var(--accent)":"var(--text-muted)",border:"none",cursor:a?"not-allowed":"pointer",transition:"color 0.15s"},onMouseEnter:s=>{a||(s.currentTarget.style.color="var(--accent)")},onMouseLeave:s=>{a||(s.currentTarget.style.color=t?"var(--accent)":"var(--text-muted)")},children:t?g.jsx(Hd,{size:18}):g.jsx(r5,{size:18})})}const _6={productive:E3,frustrated:Jx,exploratory:V1,debugging:_s,blocked:nc},A6={trivial:"var(--green)",simple:"var(--green)",moderate:"var(--yellow)",complex:"var(--orange)",very_complex:"var(--red)"};function j6({session:t,onSessionUpdated:n,selectionMode:a,selected:s,onSelectionChange:o}){const[u,h]=ye.useState(!1),[d,f]=ye.useState(!1),[m,y]=ye.useState(!1),[_,j]=ye.useState(!1),[w,k]=ye.useState(!1),[T,D]=ye.useState(!1),C=new Date(t.started_at*1e3),K=t.duration_seconds?Math.floor(t.duration_seconds/60):t.ended_at?Math.floor((t.ended_at-t.started_at)/60):null,W=Array.isArray(t.summary_files_changed)?t.summary_files_changed:[],F=t.summary_mood?_6[t.summary_mood]:null,$=t.summary_complexity?A6[t.summary_complexity]:"var(--text-muted)",Le=t.status==="active"||!t.status&&!t.ended_at||t.summary_status&&t.summary_status.toLowerCase()==="in_progress",ke=async G=>{G.preventDefault(),G.stopPropagation(),y(!0);try{await Sn.toggleBookmark(t.id,!t.is_bookmarked),n&&n()}catch(ne){$e.error("Failed to update bookmark: "+ne)}finally{y(!1)}},se=async G=>{G.preventDefault(),G.stopPropagation(),D(!0)},J=async()=>{D(!1),h(!0);const G=$e.loading("Ending session...");try{await Sn.forceEndSession(t.id),$e.dismiss(G),$e.success("Session ended successfully"),n&&setTimeout(()=>n(),1e3)}catch(ne){$e.dismiss(G),$e.error("Failed to end session: "+ne)}finally{h(!1)}},pe=async G=>{G.preventDefault(),G.stopPropagation(),k(!0)},O=async G=>{G.preventDefault(),G.stopPropagation(),j(!0);try{await Sn.toggleArchive(t.id,!t.is_archived),$e.success(t.is_archived?"Session unarchived":"Session archived"),n&&n()}catch(ne){$e.error("Failed to update archive status: "+ne)}finally{j(!1)}},U=async()=>{k(!1),f(!0);const G=$e.loading("Deleting session...");try{await Sn.deleteSession(t.id),$e.dismiss(G),$e.success("Session deleted successfully"),n&&setTimeout(()=>n(),500)}catch(ne){$e.dismiss(G),$e.error("Failed to delete session: "+ne)}finally{f(!1)}};return g.jsxs(g.Fragment,{children:[g.jsx(fl,{to:`/session/${t.id}`,style:{display:"block"},children:g.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s, background 0.15s"},onMouseEnter:G=>{G.currentTarget.style.borderColor="var(--accent)",G.currentTarget.style.background="var(--surface2)"},onMouseLeave:G=>{G.currentTarget.style.borderColor="var(--border)",G.currentTarget.style.background="var(--surface)"},children:g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[a&&g.jsx("div",{style:{paddingTop:2,marginRight:8},children:g.jsx(S6,{checked:s||!1,onChange:G=>o?.(G)})}),g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[g.jsx("div",{style:{fontWeight:600,fontSize:14,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:t.summary_title||"Session "+t.id.slice(0,8)}),F&&g.jsx(F,{size:14,style:{color:"var(--text-muted)",flexShrink:0}})]}),t.summary_what_we_did&&Array.isArray(t.summary_what_we_did)&&g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8},children:t.summary_what_we_did[0]}),t.summary_key_insight&&g.jsxs("div",{style:{fontSize:11,color:"var(--accent)",marginBottom:8,display:"flex",alignItems:"center",gap:4},children:[g.jsx(yf,{size:11}),t.summary_key_insight]}),g.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[g.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[g.jsx(As,{size:11}),d5(C,{addSuffix:!0})]}),K!==null&&g.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:[K,"m"]}),t.summary_complexity&&g.jsx("span",{style:{fontSize:10,color:$,padding:"2px 6px",background:`${$}15`,borderRadius:4,fontWeight:600},children:t.summary_complexity.replace("_"," ")}),t.total_tool_calls>0&&g.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[g.jsx(_s,{size:11}),t.total_tool_calls," calls"]}),W.length>0&&g.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[g.jsx(yi,{size:11}),W.length," files"]})]})]}),g.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[g.jsx("button",{onClick:ke,disabled:m,title:t.is_bookmarked?"Remove bookmark":"Bookmark session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:t.is_bookmarked?"var(--yellow)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:m?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:G=>{m||(G.currentTarget.style.background="var(--yellow)15",G.currentTarget.style.color="var(--yellow)",G.currentTarget.style.borderColor="var(--yellow)30")},onMouseLeave:G=>{m||(G.currentTarget.style.background="transparent",G.currentTarget.style.color=t.is_bookmarked?"var(--yellow)":"var(--text-muted)",G.currentTarget.style.borderColor="var(--border)")},children:g.jsx(a5,{size:14,fill:t.is_bookmarked?"var(--yellow)":"none"})}),g.jsx("button",{onClick:O,disabled:_,title:t.is_archived?"Unarchive session":"Archive session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:t.is_archived?"var(--blue)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:_?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:G=>{_||(G.currentTarget.style.background="var(--blue)15",G.currentTarget.style.color="var(--blue)",G.currentTarget.style.borderColor="var(--blue)30")},onMouseLeave:G=>{_||(G.currentTarget.style.background="transparent",G.currentTarget.style.color=t.is_archived?"var(--blue)":"var(--text-muted)",G.currentTarget.style.borderColor="var(--border)")},children:t.is_archived?g.jsx(px,{size:14}):g.jsx(mx,{size:14})}),Le&&g.jsxs("button",{onClick:se,disabled:u,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:u?"var(--surface)":"var(--green)15",color:u?"var(--text-muted)":"var(--green)",border:"1px solid",borderColor:u?"var(--border)":"var(--green)30",borderRadius:6,fontSize:11,fontWeight:600,cursor:u?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:G=>{u||(G.currentTarget.style.background="var(--green)25")},onMouseLeave:G=>{u||(G.currentTarget.style.background="var(--green)15")},children:[g.jsx(gl,{size:12}),u?"Ending...":"Force End"]}),g.jsx("button",{onClick:pe,disabled:d,title:"Delete session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:d?"var(--surface)":"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:d?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:G=>{d||(G.currentTarget.style.background="var(--red)15",G.currentTarget.style.color="var(--red)",G.currentTarget.style.borderColor="var(--red)30")},onMouseLeave:G=>{d||(G.currentTarget.style.background="transparent",G.currentTarget.style.color="var(--text-muted)",G.currentTarget.style.borderColor="var(--border)")},children:g.jsx(s5,{size:14})}),g.jsx(h5,{status:t.summary_status||t.status})]})]})})}),g.jsx(Gd,{isOpen:T,title:"Force End Session",message:"This will mark the session as completed and trigger AI summarization. The session will be processed and added to your project history.",confirmText:"Force End",cancelText:"Cancel",confirmColor:"var(--green)",onConfirm:J,onCancel:()=>D(!1)}),g.jsx(Gd,{isOpen:w,title:"Delete Session",message:"This will permanently remove the session and all its data including observations, preferences, knowledge, and tasks. This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",confirmColor:"var(--red)",onConfirm:U,onCancel:()=>k(!1)})]})}function k6({selectedCount:t,onBulkDelete:n,onBulkBookmark:a,onBulkTag:s,onBulkExport:o,onClearSelection:u}){return t===0?null:g.jsxs("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"12px 20px",display:"flex",alignItems:"center",gap:16,boxShadow:"0 8px 24px rgba(0, 0, 0, 0.3)",zIndex:1e3},children:[g.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"var(--text)"},children:[t," selected"]}),g.jsxs("div",{style:{display:"flex",gap:8},children:[g.jsxs("button",{onClick:a,title:"Bookmark selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--yellow)15",color:"var(--yellow)",border:"1px solid var(--yellow)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--yellow)25",onMouseLeave:h=>h.currentTarget.style.background="var(--yellow)15",children:[g.jsx(a5,{size:14}),"Bookmark"]}),g.jsxs("button",{onClick:s,title:"Tag selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--accent)15",color:"var(--accent)",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--accent)25",onMouseLeave:h=>h.currentTarget.style.background="var(--accent)15",children:[g.jsx(i5,{size:14}),"Tag"]}),g.jsxs("button",{onClick:o,title:"Export as ZIP",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--blue)15",color:"var(--blue)",border:"1px solid var(--blue)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--blue)25",onMouseLeave:h=>h.currentTarget.style.background="var(--blue)15",children:[g.jsx($d,{size:14}),"Export ZIP"]}),g.jsxs("button",{onClick:n,title:"Delete selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--red)25",onMouseLeave:h=>h.currentTarget.style.background="var(--red)15",children:[g.jsx(s5,{size:14}),"Delete"]})]}),g.jsx("button",{onClick:u,title:"Clear selection",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>{h.currentTarget.style.background="var(--surface2)",h.currentTarget.style.color="var(--text)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent",h.currentTarget.style.color="var(--text-muted)"},children:g.jsx(ti,{size:16})})]})}const ug=["#7c6cfc","#3b82f6","#22c55e","#eab308","#f97316","#ef4444","#ec4899","#8b5cf6"];function p5({sessionId:t,projectId:n,sessionTags:a,onUpdate:s}){const[o,u]=ye.useState(!1),[h,d]=ye.useState(""),[f,m]=ye.useState(!1),[y,_]=ye.useState(ug[0]),j=ye.useRef(null),w=Sf(),{data:k=[]}=ya({queryKey:["tags",n],queryFn:()=>Sn.getTags(n),enabled:!!n}),T=lf({mutationFn:({tagId:$})=>Sn.addSessionTag(t,$),onSuccess:()=>{w.invalidateQueries({queryKey:["session",t]}),s&&s(),d("")},onError:$=>$e.error("Failed to add tag: "+$)}),D=lf({mutationFn:({tagId:$})=>Sn.removeSessionTag(t,$),onSuccess:()=>{w.invalidateQueries({queryKey:["session",t]}),s&&s()},onError:$=>$e.error("Failed to remove tag: "+$)}),C=lf({mutationFn:({name:$,color:Le})=>Sn.createTag(n,$,Le),onSuccess:$=>{w.invalidateQueries({queryKey:["tags",n]}),T.mutate({tagId:$.id}),d(""),m(!1)},onError:$=>$e.error("Failed to create tag: "+$)}),K=k.filter($=>$.name.toLowerCase().includes(h.toLowerCase())&&!a.some(Le=>Le.id===$.id)),W=()=>{h.trim()&&C.mutate({name:h.trim(),color:y})},F=k.find($=>$.name.toLowerCase()===h.toLowerCase());return ye.useEffect(()=>{o&&j.current&&j.current.focus()},[o]),g.jsxs("div",{style:{position:"relative"},children:[g.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,alignItems:"center"},children:[a.map($=>g.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:$.color?`${$.color}15`:"var(--surface2)",border:"1px solid",borderColor:$.color?`${$.color}30`:"var(--border)",borderRadius:6,fontSize:12,color:$.color||"var(--text)"},children:[g.jsx(i5,{size:11}),$.name,g.jsx("button",{onClick:()=>D.mutate({tagId:$.id}),style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",color:"inherit",opacity:.6},children:g.jsx(ti,{size:12})})]},$.id)),g.jsxs("button",{onClick:()=>u(!o),style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:12,color:"var(--text-muted)",cursor:"pointer"},children:[g.jsx(eg,{size:12}),"Add tag"]})]}),o&&g.jsxs("div",{style:{position:"absolute",top:"100%",left:0,marginTop:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:12,minWidth:280,maxWidth:400,zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},children:[g.jsx("input",{ref:j,type:"text",value:h,onChange:$=>d($.target.value),placeholder:"Search or create tag...",style:{width:"100%",padding:"8px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)",marginBottom:8},onKeyDown:$=>{$.key==="Enter"&&h&&!F&&W(),$.key==="Escape"&&u(!1)}}),g.jsx("div",{style:{maxHeight:200,overflowY:"auto"},children:K.length>0?K.map($=>g.jsxs("button",{onClick:()=>T.mutate({tagId:$.id}),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"transparent",border:"none",borderRadius:6,fontSize:13,color:"var(--text)",cursor:"pointer",textAlign:"left"},onMouseEnter:Le=>Le.currentTarget.style.background="var(--surface2)",onMouseLeave:Le=>Le.currentTarget.style.background="transparent",children:[g.jsx("div",{style:{width:12,height:12,borderRadius:3,background:$.color||"var(--border)"}}),$.name]},$.id)):h&&!F?g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>m(!f),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:6,fontSize:13,color:"var(--accent)",cursor:"pointer",marginBottom:f?8:0},children:[g.jsx(eg,{size:14}),'Create "',h,'"']}),f&&g.jsxs("div",{style:{padding:"8px 0"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:6},children:"Choose color:"}),g.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:ug.map($=>g.jsx("button",{onClick:()=>{_($),W()},style:{width:24,height:24,borderRadius:4,background:$,border:y===$?"2px solid var(--text)":"none",cursor:"pointer"}},$))})]})]}):g.jsx("div",{style:{padding:"8px 10px",fontSize:12,color:"var(--text-muted)"},children:h?"No matching tags":"Start typing to search or create"})})]})]})}function N6({isOpen:t,sessionIds:n,onClose:a,onComplete:s}){const[o,u]=ye.useState([]),[h,d]=ye.useState(!1);if(!t)return null;const f=async()=>{if(o.length===0){$e.error("Please select at least one tag");return}d(!0);const m=$e.loading(`Tagging ${n.length} sessions...`);try{await Promise.all(n.map(y=>Promise.all(o.map(_=>fetch(`/api/sessions/${y}/tags`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag_id:_.id})}))))),$e.dismiss(m),$e.success(`Tagged ${n.length} sessions`),s(),a()}catch(y){$e.dismiss(m),$e.error("Failed to tag sessions: "+y)}finally{d(!1)}};return g.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e3},children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,width:"90%",maxWidth:500},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[g.jsxs("h3",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:["Tag ",n.length," Sessions"]}),g.jsx("button",{onClick:a,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4},children:g.jsx(ti,{size:20})})]}),g.jsxs("div",{style:{marginBottom:20},children:[g.jsx("label",{style:{display:"block",fontSize:13,fontWeight:600,color:"var(--text)",marginBottom:8},children:"Select Tags"}),g.jsx(p5,{selectedTags:o,onChange:u})]}),g.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[g.jsx("button",{onClick:a,disabled:h,style:{padding:"8px 16px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:h?"not-allowed":"pointer"},children:"Cancel"}),g.jsx("button",{onClick:f,disabled:h||o.length===0,style:{padding:"8px 16px",background:h||o.length===0?"var(--surface2)":"var(--accent)",color:h||o.length===0?"var(--text-muted)":"white",border:"none",borderRadius:8,fontSize:13,fontWeight:600,cursor:h||o.length===0?"not-allowed":"pointer"},children:h?"Tagging...":"Apply Tags"})]})]})})}function L6({projectId:t}){const{data:n}=ya({queryKey:["sessions",t],queryFn:async()=>{const m=await fetch(`/api/sessions?project_id=${t}&limit=100`);if(!m.ok)throw new Error("Failed to fetch sessions");return m.json()}}),a=Q1(new Date).getTime()/1e3,s=(n||[]).filter(m=>m.started_at>=a),o=s.reduce((m,y)=>m+(y.total_tool_calls||0),0),u=new Set(s.flatMap(m=>{try{const y=m.summary_files_changed;return Array.isArray(y)?y:typeof y=="string"?JSON.parse(y):[]}catch{return[]}})).size,h=s.reduce((m,y)=>{const _=y.duration_seconds?Math.floor(y.duration_seconds/60):y.ended_at?Math.floor((y.ended_at-y.started_at)/60):0;return m+_},0),d=Math.floor(h/60),f=h%60;return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:24},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:16},children:[g.jsx(Id,{size:18,style:{color:"var(--accent)"}}),g.jsx("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:"Today's Productivity"})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:16},children:[g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[g.jsx(Id,{size:14,style:{color:"var(--accent)"}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Sessions"})]}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:s.length})]}),g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[g.jsx(_s,{size:14,style:{color:"var(--blue)"}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Tool Calls"})]}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--blue)"},children:o})]}),g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[g.jsx(yi,{size:14,style:{color:"var(--green)"}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Files Touched"})]}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--green)"},children:u})]}),g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[g.jsx(As,{size:14,style:{color:"var(--orange)"}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Time Spent"})]}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--orange)"},children:d>0?`${d}h ${f}m`:`${f}m`})]})]})]})}function g5({onSearch:t,placeholder:n="Search sessions...",autoFocus:a}){const[s,o]=ye.useState(""),u=ye.useRef(),h=f=>{const m=f.target.value;o(m),clearTimeout(u.current),m.length>=2?u.current=setTimeout(()=>t(m),300):m.length===0&&t("")},d=()=>{o(""),t("")};return g.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:400},children:[g.jsx(b0,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"}}),g.jsx("input",{type:"text",value:s,onChange:h,placeholder:n,autoFocus:a,style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,fontWeight:500,outline:"none",transition:"all 0.15s"},onFocus:f=>{f.target.style.borderColor="var(--accent)",f.target.style.background="var(--surface)"},onBlur:f=>{f.target.style.borderColor="var(--border)",f.target.style.background="var(--surface2)"}}),s&&g.jsx("button",{onClick:d,style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:f=>{f.currentTarget.style.background="var(--surface)",f.currentTarget.style.color="var(--text)"},onMouseLeave:f=>{f.currentTarget.style.background="transparent",f.currentTarget.style.color="var(--text-muted)"},children:g.jsx(ti,{size:14})})]})}function T6({onDateRangeChange:t}){const[n,a]=ye.useState(""),[s,o]=ye.useState(""),u=m=>{a(m),m&&s?t(new Date(m),new Date(s)):!m&&!s&&t(null,null)},h=m=>{o(m),n&&m?t(new Date(n),new Date(m)):!n&&!m&&t(null,null)},d=()=>{a(""),o(""),t(null,null)},f=n||s;return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:"6px 10px",maxWidth:400},children:[g.jsx(Id,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),g.jsx("input",{type:"date",value:n,onChange:m=>u(m.target.value),placeholder:"Start date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),g.jsx("span",{style:{color:"var(--text-muted)",fontSize:13},children:"to"}),g.jsx("input",{type:"date",value:s,onChange:m=>h(m.target.value),placeholder:"End date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),f&&g.jsx("button",{onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s",flexShrink:0},onMouseEnter:m=>{m.currentTarget.style.background="var(--surface)",m.currentTarget.style.color="var(--text)"},onMouseLeave:m=>{m.currentTarget.style.background="transparent",m.currentTarget.style.color="var(--text-muted)"},children:g.jsx(ti,{size:14})})]})}function C6({viewMode:t,onToggle:n}){return g.jsxs("div",{style:{display:"flex",gap:4,background:"var(--surface2)",padding:4,borderRadius:8,border:"1px solid var(--border)"},children:[g.jsxs("button",{onClick:()=>n("card"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="card"?"var(--surface)":"transparent",color:t==="card"?"var(--text)":"var(--text-muted)",border:t==="card"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="card"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="card"&&(a.currentTarget.style.background="transparent")},children:[g.jsx(a3,{size:16}),"Cards"]}),g.jsxs("button",{onClick:()=>n("table"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="table"?"var(--surface)":"transparent",color:t==="table"?"var(--text)":"var(--text-muted)",border:t==="table"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="table"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="table"&&(a.currentTarget.style.background="transparent")},children:[g.jsx(u3,{size:16}),"Table"]}),g.jsxs("button",{onClick:()=>n("timeline"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="timeline"?"var(--surface)":"transparent",color:t==="timeline"?"var(--text)":"var(--text-muted)",border:t==="timeline"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="timeline"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="timeline"&&(a.currentTarget.style.background="transparent")},children:[g.jsx(As,{size:16}),"Timeline"]})]})}function E6({sessions:t,selectionMode:n,selectedSessions:a,onSelectionChange:s}){const o=oc(),[u,h]=ye.useState("date"),[d,f]=ye.useState("desc"),m=w=>{u===w?f(d==="asc"?"desc":"asc"):(h(w),f("desc"))},y=[...t].sort((w,k)=>{let T=0;if(u==="date")T=w.started_at-k.started_at;else if(u==="title"){const D=(w.summary_title||"").toLowerCase(),C=(k.summary_title||"").toLowerCase();T=D.localeCompare(C)}else if(u==="duration"){const D=w.ended_at?w.ended_at-w.started_at:0,C=k.ended_at?k.ended_at-k.started_at:0;T=D-C}return d==="asc"?T:-T}),_=w=>{const k=Math.floor(w/3600),T=Math.floor(w%3600/60);return k>0?`${k}h ${T}m`:`${T}m`},j=({field:w})=>u!==w?null:d==="asc"?g.jsx(_x,{size:12}):g.jsx(yx,{size:12});return g.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,overflow:"hidden"},children:g.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[g.jsx("thead",{children:g.jsxs("tr",{style:{background:"var(--surface2)",borderBottom:"1px solid var(--border)"},children:[n&&g.jsx("th",{style:{padding:"12px 16px",textAlign:"left",width:40},children:g.jsx("input",{type:"checkbox",checked:a.size===t.length&&t.length>0,onChange:w=>{t.forEach(k=>s(k.id,w.target.checked))},style:{cursor:"pointer"}})}),g.jsx("th",{onClick:()=>m("date"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:140},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Date ",g.jsx(j,{field:"date"})]})}),g.jsx("th",{onClick:()=>m("title"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Title ",g.jsx(j,{field:"title"})]})}),g.jsx("th",{onClick:()=>m("duration"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:100},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Duration ",g.jsx(j,{field:"duration"})]})}),g.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Files"}),g.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Tools"}),g.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:100},children:"Status"})]})}),g.jsx("tbody",{children:y.map((w,k)=>{const T=w.ended_at?w.ended_at-w.started_at:0,D=Array.isArray(w.summary_files_changed)?w.summary_files_changed.length:0,C=w.tool_use_count||0,K=w.status==="completed";return g.jsxs("tr",{onClick:W=>{n?s(w.id,!a.has(w.id)):o(`/session/${w.id}`)},style:{borderBottom:k<y.length-1?"1px solid var(--border)":"none",cursor:"pointer",transition:"background 0.15s"},onMouseEnter:W=>{W.currentTarget.style.background="var(--surface2)"},onMouseLeave:W=>{W.currentTarget.style.background="transparent"},children:[n&&g.jsx("td",{style:{padding:"12px 16px"},children:g.jsx("input",{type:"checkbox",checked:a.has(w.id),onChange:W=>{W.stopPropagation(),s(w.id,W.target.checked)},onClick:W=>W.stopPropagation(),style:{cursor:"pointer"}})}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:new Date(w.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13,fontWeight:500,color:"var(--text)"},children:w.summary_title||"Untitled Session"}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[g.jsx(As,{size:14}),T>0?_(T):"-"]})}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[g.jsx(yi,{size:14}),D]})}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[g.jsx(_s,{size:14}),C]})}),g.jsx("td",{style:{padding:"12px 16px",fontSize:13},children:g.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 10px",background:K?"var(--green)15":"var(--orange)15",color:K?"var(--green)":"var(--orange)",borderRadius:6,fontSize:12,fontWeight:600},children:[K?g.jsx(gl,{size:12}):g.jsx(Xm,{size:12}),K?"Done":"Active"]})})]},w.id)})})]})})}function M6({sessions:t,onDateClick:n,selectedDate:a}){const[s,o]=ye.useState(new Date),u=W=>{const F=W.getFullYear(),$=W.getMonth(),Le=new Date(F,$,1),se=new Date(F,$+1,0).getDate(),J=Le.getDay();return{daysInMonth:se,startingDayOfWeek:J,year:F,month:$}},h=W=>{const F=W.toDateString();return t.filter($=>new Date($.started_at*1e3).toDateString()===F)},{daysInMonth:d,startingDayOfWeek:f,year:m,month:y}=u(s),_=()=>{o(new Date(m,y-1,1))},j=()=>{o(new Date(m,y+1,1))},w=new Date,k=W=>w.getDate()===W&&w.getMonth()===y&&w.getFullYear()===m,T=(W,F)=>W?W.toDateString()===F.toDateString():!1,D=["January","February","March","April","May","June","July","August","September","October","November","December"],C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],K=[];for(let W=0;W<f;W++)K.push(g.jsx("div",{style:{padding:8}},`empty-${W}`));for(let W=1;W<=d;W++){const F=new Date(m,y,W),$=h(F),Le=$.length>0,ke=T(a,F),se=k(W);K.push(g.jsxs("div",{onClick:()=>n(F),style:{padding:8,minHeight:60,background:ke?"var(--accent)15":"transparent",border:"1px solid",borderColor:se?"var(--accent)":"var(--border)",borderRadius:8,cursor:Le?"pointer":"default",transition:"all 0.15s",display:"flex",flexDirection:"column",gap:4},onMouseEnter:J=>{Le&&(J.currentTarget.style.background=ke?"var(--accent)20":"var(--surface2)")},onMouseLeave:J=>{J.currentTarget.style.background=ke?"var(--accent)15":"transparent"},children:[g.jsx("div",{style:{fontSize:13,fontWeight:se?700:500,color:se?"var(--accent)":"var(--text)"},children:W}),Le&&g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,marginTop:"auto"},children:g.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--accent)",background:"var(--accent)15",padding:"2px 6px",borderRadius:4},children:$.length})})]},W))}return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[g.jsx("button",{onClick:_,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:W=>{W.currentTarget.style.background="var(--surface)"},onMouseLeave:W=>{W.currentTarget.style.background="var(--surface2)"},children:g.jsx(Mx,{size:16})}),g.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:[D[y]," ",m]}),g.jsx("button",{onClick:j,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:W=>{W.currentTarget.style.background="var(--surface)"},onMouseLeave:W=>{W.currentTarget.style.background="var(--surface2)"},children:g.jsx(Rx,{size:16})})]}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8,marginBottom:8},children:C.map(W=>g.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textAlign:"center",padding:"4px 0",textTransform:"uppercase",letterSpacing:"0.05em"},children:W},W))}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8},children:K}),a&&g.jsxs("div",{style:{marginTop:16,padding:"8px 12px",background:"var(--accent)10",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,color:"var(--text)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[g.jsxs("span",{children:["Showing sessions from ",g.jsx("strong",{children:a.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]}),g.jsx("button",{onClick:()=>n(a),style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:11,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:W=>{W.currentTarget.style.background="var(--surface)"},onMouseLeave:W=>{W.currentTarget.style.background="var(--surface2)"},children:"Clear"})]})]})}function O6({sessions:t}){const n=t.length,a=t.filter(F=>F.status==="completed").length,s=n>0?Math.round(a/n*100):0,o=t.reduce((F,$)=>$.ended_at?F+($.ended_at-$.started_at):F,0),u=n>0?Math.round(o/n/60):0,h=new Set(t.flatMap(F=>Array.isArray(F.summary_files_changed)?F.summary_files_changed:[])).size,d=t.reduce((F,$)=>F+($.tool_use_count||0),0),f={};t.forEach(F=>{F.tool_use_count>0&&(f.Read=(f.Read||0)+Math.floor(F.tool_use_count*.3),f.Edit=(f.Edit||0)+Math.floor(F.tool_use_count*.25),f.Bash=(f.Bash||0)+Math.floor(F.tool_use_count*.2),f.Write=(f.Write||0)+Math.floor(F.tool_use_count*.15),f.Grep=(f.Grep||0)+Math.floor(F.tool_use_count*.1))});const m=Object.entries(f).sort((F,$)=>$[1]-F[1]).slice(0,5),y=m.length>0?m[0][1]:1,_={};t.forEach(F=>{Array.isArray(F.summary_files_changed)&&F.summary_files_changed.forEach($=>{_[$]=(_[$]||0)+1})});const j=Object.entries(_).sort((F,$)=>$[1]-F[1]).slice(0,10),w=j.length>0?j[0][1]:1,T=Date.now()/1e3-10080*60,D=t.filter(F=>F.started_at>=T),C={};D.forEach(F=>{const $=new Date(F.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});C[$]=(C[$]||0)+1});const K=[];for(let F=6;F>=0;F--){const Le=new Date(Date.now()-F*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});K.push({date:Le,count:C[Le]||0})}const W=Math.max(...K.map(F=>F.count),1);return g.jsxs("div",{style:{marginBottom:24},children:[g.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[g.jsx(y0,{size:20}),"Analytics Dashboard"]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(gl,{size:16,style:{color:"var(--green)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Completion Rate"})]}),g.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[s,"%"]}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[a," of ",n," sessions"]})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(As,{size:16,style:{color:"var(--blue)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Avg Duration"})]}),g.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[u,"m"]}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"per session"})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(yi,{size:16,style:{color:"var(--purple)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:h}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"unique files"})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(_s,{size:16,style:{color:"var(--orange)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:d}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[g.jsx(cl,{size:16}),"Last 7 Days Activity"]}),g.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:K.map((F,$)=>g.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[g.jsx("div",{style:{width:"100%",height:Math.max(F.count/W*100,4),background:F.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:F.count>0&&g.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:F.count})}),g.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:F.date.split(" ")[1]})]},$))})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[g.jsx(_s,{size:16}),"Top Tools Used"]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:m.map(([F,$])=>g.jsxs("div",{children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[g.jsx("span",{style:{fontSize:13,fontWeight:500},children:F}),g.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:$})]}),g.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:g.jsx("div",{style:{width:`${$/y*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},F))})]})]}),j.length>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginTop:16},children:[g.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[g.jsx(yi,{size:16}),"Most Edited Files"]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:j.map(([F,$])=>g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",background:"var(--surface2)",borderRadius:8},children:[g.jsx("div",{style:{flex:1,fontSize:12,fontFamily:"monospace",color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[g.jsx("div",{style:{width:100,height:6,background:"var(--surface)",borderRadius:3,overflow:"hidden"},children:g.jsx("div",{style:{width:`${$/w*100}%`,height:"100%",background:"var(--purple)",transition:"width 0.3s"}})}),g.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",minWidth:30,textAlign:"right"},children:$})]})]},F))})]})]})}function R6({sessions:t}){const n=[...t].filter(k=>k.started_at).sort((k,T)=>T.started_at-k.started_at);if(n.length===0)return null;let a=0,s=0,o=0;const u=new Date;u.setHours(0,0,0,0);const h=new Set(n.map(k=>{const T=new Date(k.started_at*1e3);return T.setHours(0,0,0,0),T.getTime()})),d=Array.from(h).sort((k,T)=>T-k),f=u.getTime(),m=f-864e5;if(d.includes(f)||d.includes(m)){let k=d.includes(f)?f:m;for(;d.includes(k);)a++,k-=864e5}if(d.length>0){o=1,s=1;for(let k=1;k<d.length;k++)(d[k-1]-d[k])/864e5===1?(o++,s=Math.max(s,o)):o=1}let y={duration:0,title:"",date:0};t.forEach(k=>{if(k.ended_at){const T=k.ended_at-k.started_at;T>y.duration&&(y={duration:T,title:k.summary_title||"Untitled",date:k.started_at})}});let _={count:0,title:"",date:0};t.forEach(k=>{const T=Array.isArray(k.summary_files_changed)?k.summary_files_changed.length:0;T>_.count&&(_={count:T,title:k.summary_title||"Untitled",date:k.started_at})});const j=k=>{const T=Math.floor(k/3600),D=Math.floor(k%3600/60);return T>0?`${T}h ${D}m`:`${D}m`},w=k=>new Date(k*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:16,marginBottom:24},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(Zm,{size:16,style:{color:a>0?"var(--orange)":"var(--text-muted)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:a>0?"var(--orange)":"var(--text)"},children:a}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[a===1?"day":"days"," in a row"]})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(cl,{size:16,style:{color:"var(--accent)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Streak"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:s}),g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[s===1?"day":"days"," record"]})]}),y.duration>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(As,{size:16,style:{color:"var(--blue)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Session"})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:j(y.duration)}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.title}),g.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:w(y.date)})]}),_.count>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(yi,{size:16,style:{color:"var(--purple)"}}),g.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Most Files Changed"})]}),g.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:[_.count," files"]}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_.title}),g.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:w(_.date)})]})]})}function _d({label:t,options:n,selected:a,onChange:s,placeholder:o}){const[u,h]=ye.useState(!1),d=ye.useRef(null);ye.useEffect(()=>{const y=_=>{d.current&&!d.current.contains(_.target)&&h(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]);const f=y=>{a.includes(y)?s(a.filter(_=>_!==y)):s([...a,y])},m=()=>{s([])};return g.jsxs("div",{ref:d,style:{position:"relative",minWidth:200},children:[g.jsxs("button",{onClick:()=>h(!u),style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 12px",background:a.length>0?"var(--accent)15":"var(--surface2)",color:a.length>0?"var(--accent)":"var(--text)",border:"1px solid",borderColor:a.length>0?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s",width:"100%"},onMouseEnter:y=>{a.length===0&&(y.currentTarget.style.background="var(--surface)")},onMouseLeave:y=>{a.length===0&&(y.currentTarget.style.background="var(--surface2)")},children:[g.jsx("span",{children:a.length>0?`${t} (${a.length})`:o||t}),g.jsx(Cx,{size:14,style:{transform:u?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),u&&g.jsxs("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,maxHeight:300,overflowY:"auto"},children:[a.length>0&&g.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[a.length," selected"]}),g.jsxs("button",{onClick:m,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,fontSize:11,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:y=>{y.currentTarget.style.background="var(--surface2)",y.currentTarget.style.color="var(--text)"},onMouseLeave:y=>{y.currentTarget.style.background="transparent",y.currentTarget.style.color="var(--text-muted)"},children:[g.jsx(ti,{size:12}),"Clear"]})]}),n.map(y=>g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",cursor:"pointer",transition:"background 0.15s",fontSize:13},onMouseEnter:_=>{_.currentTarget.style.background="var(--surface2)"},onMouseLeave:_=>{_.currentTarget.style.background="transparent"},children:[g.jsx("input",{type:"checkbox",checked:a.includes(y),onChange:()=>f(y),style:{cursor:"pointer"}}),g.jsx("span",{style:{color:"var(--text)"},children:y})]},y))]})]})}function D6({sessions:t,selectionMode:n,selectedSessions:a,onSelectionChange:s}){const o=oc(),u=[...t].sort((m,y)=>y.started_at-m.started_at),h={};u.forEach(m=>{const y=new Date(m.started_at*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});h[y]||(h[y]=[]),h[y].push(m)});const d=m=>new Date(m*1e3).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),f=m=>{const y=Math.floor(m/3600),_=Math.floor(m%3600/60);return y>0?`${y}h ${_}m`:`${_}m`};return g.jsx("div",{style:{position:"relative"},children:Object.entries(h).map(([m,y],_)=>g.jsxs("div",{style:{marginBottom:40},children:[g.jsx("div",{style:{position:"sticky",top:0,background:"var(--background)",zIndex:10,paddingBottom:12,marginBottom:20},children:g.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)",display:"flex",alignItems:"center",gap:12},children:[g.jsx("div",{style:{width:12,height:12,borderRadius:"50%",background:"var(--accent)"}}),m,g.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"var(--text-muted)",marginLeft:8},children:[y.length," ",y.length===1?"session":"sessions"]})]})}),g.jsxs("div",{style:{position:"relative",paddingLeft:40},children:[g.jsx("div",{style:{position:"absolute",left:5,top:0,bottom:_===Object.keys(h).length-1?"50%":0,width:2,background:"var(--border)"}}),y.map((j,w)=>{const k=j.ended_at?j.ended_at-j.started_at:0,T=Array.isArray(j.summary_files_changed)?j.summary_files_changed.length:0,D=j.tool_use_count||0,C=j.status==="completed";return g.jsxs("div",{style:{position:"relative",marginBottom:w<y.length-1?24:0},children:[g.jsx("div",{style:{position:"absolute",left:-34,top:20,width:12,height:12,borderRadius:"50%",background:C?"var(--green)":"var(--orange)",border:"3px solid var(--background)",zIndex:1}}),g.jsx("div",{onClick:K=>{n?s(j.id,!a.has(j.id)):o(`/session/${j.id}`)},style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:K=>{K.currentTarget.style.background="var(--surface2)",K.currentTarget.style.borderColor="var(--accent)30"},onMouseLeave:K=>{K.currentTarget.style.background="var(--surface)",K.currentTarget.style.borderColor="var(--border)"},children:g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[n&&g.jsx("input",{type:"checkbox",checked:a.has(j.id),onChange:K=>{K.stopPropagation(),s(j.id,K.target.checked)},onClick:K=>K.stopPropagation(),style:{marginTop:4,cursor:"pointer"}}),g.jsxs("div",{style:{flex:1},children:[g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8,fontWeight:600},children:d(j.started_at)}),g.jsx("h4",{style:{fontSize:15,fontWeight:600,color:"var(--text)",marginBottom:8},children:j.summary_title||"Untitled Session"}),g.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)",marginBottom:8},children:[k>0&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx(As,{size:12}),f(k)]}),T>0&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx(yi,{size:12}),T," files"]}),D>0&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx(_s,{size:12}),D," tools"]})]}),g.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:C?"var(--green)15":"var(--orange)15",color:C?"var(--green)":"var(--orange)",borderRadius:6,fontSize:11,fontWeight:600},children:[C?g.jsx(gl,{size:10}):g.jsx(Xm,{size:10}),C?"Completed":"Active"]})]})]})})]},j.id)})]})]},m))})}function z6({onOpenProject:t}){const{id:n}=g0(),[a,s]=ye.useState(!1),[o,u]=ye.useState(!1),[h,d]=ye.useState(!1),[f,m]=ye.useState(new Set),[y,_]=ye.useState(!1),[j,w]=ye.useState(!1),[k,T]=ye.useState(!1),[D,C]=ye.useState(""),[K,W]=ye.useState({start:null,end:null}),[F,$]=ye.useState([]),[Le,ke]=ye.useState([]),[se,J]=ye.useState([]),[pe,O]=ye.useState([]),[U,G]=ye.useState(()=>{const be=localStorage.getItem("sessionViewMode");return be==="card"||be==="table"||be==="timeline"?be:"card"}),[ne,Se]=ye.useState(()=>localStorage.getItem("showCalendar")==="true"),[ee,ce]=ye.useState(()=>localStorage.getItem("showAnalytics")==="true"),[le,Ne]=ye.useState(null),[H,oe]=ye.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:L,isLoading:q}=ya({queryKey:["project",n],queryFn:()=>Sn.getProject(n),enabled:!!n}),{data:V,refetch:te}=ya({queryKey:["sessions",n],queryFn:()=>Sn.getSessions({project_id:n,limit:50}),enabled:!!n,refetchInterval:15e3}),{data:ae}=ya({queryKey:["health"],queryFn:Sn.getHealth});ye.useEffect(()=>{L&&n&&t(n,L.name)},[L,n,t]),ye.useEffect(()=>{if(!n)return;let be;try{be=m0(),be.onmessage=Ye=>{try{const Je=JSON.parse(Ye.data);(Je.type==="session_start"||Je.type==="session_end"||Je.type==="summary_ready")&&te()}catch{}},be.onerror=()=>{console.log("[ProjectDetail] WebSocket error, falling back to polling")}}catch(Ye){console.log("[ProjectDetail] WebSocket connection failed:",Ye)}return()=>{be?.close()}},[n,te]);const me=async()=>{if(!n)return;s(!0);const be=$e.loading("Consolidating memory...");try{await Sn.consolidateMemory(n),$e.dismiss(be),$e.success("Memory consolidation complete!")}catch(Ye){$e.dismiss(be),$e.error("Consolidation failed: "+Ye)}finally{s(!1)}},_e=async(be=!1)=>{n&&oe({isOpen:!0,title:be?"Force Resync All Sessions":"Resync New Sessions",message:be?"This will regenerate ALL summaries with v2.0 fields (mood, complexity, blockers, resolved, key insights). This may take several minutes. Continue?":'This will only process sessions without summaries. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:be?"Force Resync":"Resync",confirmColor:be?"var(--orange)":"var(--blue)",onConfirm:async()=>{oe({...H,isOpen:!1}),u(!0);const Ye=$e.loading("Queueing sessions for resync...",0);try{const Je=await Sn.resyncProject(n,be);$e.update(Ye,`Queued ${Je.result.queued} sessions. Processing...`,50),setTimeout(()=>{$e.dismiss(Ye),$e.success(Je.result.message)},2e3),te()}catch(Je){$e.dismiss(Ye),$e.error("Resync failed: "+Je)}finally{u(!1)}}})},Ee=()=>{d(!h),m(new Set)},ze=()=>{f.size===Wt.length?m(new Set):m(new Set(Wt.map(be=>be.id)))},We=(be,Ye)=>{const Je=new Set(f);Ye?Je.add(be):Je.delete(be),m(Je)},Xe=()=>{oe({isOpen:!0,title:"Delete Sessions",message:`This will permanently delete ${f.size} sessions and all their data. This action cannot be undone.`,confirmText:"Delete",confirmColor:"var(--red)",onConfirm:async()=>{oe({...H,isOpen:!1});const be=$e.loading(`Deleting ${f.size} sessions...`);try{await Promise.all(Array.from(f).map(Ye=>Sn.deleteSession(Ye))),$e.dismiss(be),$e.success(`Deleted ${f.size} sessions`),m(new Set),d(!1),te()}catch(Ye){$e.dismiss(be),$e.error("Failed to delete sessions: "+Ye)}}})},Ve=async()=>{const be=$e.loading(`Bookmarking ${f.size} sessions...`);try{await Promise.all(Array.from(f).map(Ye=>Sn.toggleBookmark(Ye,!0))),$e.dismiss(be),$e.success(`Bookmarked ${f.size} sessions`),m(new Set),d(!1),te()}catch(Ye){$e.dismiss(be),$e.error("Failed to bookmark sessions: "+Ye)}},dt=()=>{_(!0)},Y=async()=>{const be=$e.loading(`Exporting ${f.size} sessions...`);try{const Ye=(await Md(async()=>{const{default:Tt}=await import("./jszip.min-DxDw9jtU.js").then(Et=>Et.j);return{default:Tt}},[])).default,Je=new Ye,Kt=Array.from(f).map(Tt=>Sn.getSession(Tt));(await Promise.all(Kt)).forEach(Tt=>{const Et=Tt.summary_title||"Untitled Session",nn=`${new Date(Tt.started_at*1e3).toISOString().split("T")[0]}_${Et.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.md`,ni=`# ${Et}
|
|
27
|
+
|
|
28
|
+
**Date:** ${new Date(Tt.started_at*1e3).toLocaleString()}
|
|
29
|
+
**Status:** ${Tt.status}
|
|
30
|
+
**Duration:** ${Tt.ended_at?Math.round((Tt.ended_at-Tt.started_at)/60):0} minutes
|
|
31
|
+
|
|
32
|
+
## What We Did
|
|
33
|
+
${Array.isArray(Tt.summary_what_we_did)?Tt.summary_what_we_did.map(pn=>`- ${pn}`).join(`
|
|
34
|
+
`):"N/A"}
|
|
35
|
+
|
|
36
|
+
## Decisions Made
|
|
37
|
+
${Array.isArray(Tt.summary_decisions)?Tt.summary_decisions.map(pn=>`- ${pn}`).join(`
|
|
38
|
+
`):"N/A"}
|
|
39
|
+
|
|
40
|
+
## Files Changed
|
|
41
|
+
${Array.isArray(Tt.summary_files_changed)?Tt.summary_files_changed.map(pn=>`- ${pn}`).join(`
|
|
42
|
+
`):"N/A"}
|
|
43
|
+
|
|
44
|
+
## Next Steps
|
|
45
|
+
${Array.isArray(Tt.summary_next_steps)?Tt.summary_next_steps.map(pn=>`- ${pn}`).join(`
|
|
46
|
+
`):"N/A"}
|
|
47
|
+
|
|
48
|
+
## Gotchas
|
|
49
|
+
${Array.isArray(Tt.summary_gotchas)?Tt.summary_gotchas.map(pn=>`- ${pn}`).join(`
|
|
50
|
+
`):"N/A"}
|
|
51
|
+
`;Je.file(nn,ni)});const un=await Je.generateAsync({type:"blob"}),vt=URL.createObjectURL(un),At=document.createElement("a");At.href=vt,At.download=`sessions_export_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(At),At.click(),document.body.removeChild(At),URL.revokeObjectURL(vt),$e.dismiss(be),$e.success(`Exported ${f.size} sessions as ZIP`),m(new Set),d(!1)}catch(Ye){$e.dismiss(be),$e.error("Failed to export sessions: "+Ye)}},Qe=()=>{m(new Set),d(!1),te()};if(ae?.uptime,q)return g.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading..."});if(!L)return g.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Project not found"});const xt=V||L.sessions||[],ut=xt.map(be=>({...be,summary_what_we_did:tf(be.summary_what_we_did),summary_decisions:tf(be.summary_decisions),summary_files_changed:tf(be.summary_files_changed),summary_next_steps:tf(be.summary_next_steps),summary_gotchas:tf(be.summary_gotchas)})),Ie=j?ut:ut.filter(be=>!be.is_archived),mt=k?Ie.filter(be=>be.is_bookmarked):Ie,Ze=D?mt.filter(be=>{const Ye=D.toLowerCase(),Je=(be.summary_title||"").toLowerCase(),Kt=Array.isArray(be.summary_what_we_did)?be.summary_what_we_did.join(" ").toLowerCase():"",rt=Array.isArray(be.summary_files_changed)?be.summary_files_changed.join(" ").toLowerCase():"";return Je.includes(Ye)||Kt.includes(Ye)||rt.includes(Ye)}):mt,bt=Ze.filter(be=>{const Ye=F.length===0||be.summary_mood&&F.includes(be.summary_mood),Je=Le.length===0||be.summary_complexity&&Le.includes(be.summary_complexity),Kt=se.length===0||se.includes(be.status);let rt=!0;return pe.length>0&&Array.isArray(be.summary_files_changed)&&(rt=be.summary_files_changed.some(un=>pe.some(vt=>un.endsWith(vt)))),Ye&&Je&&Kt&&rt}),ht=K.start||K.end?bt.filter(be=>{const Ye=new Date(be.started_at*1e3),Je=!K.start||Ye>=K.start,Kt=!K.end||Ye<=new Date(K.end.getTime()+864e5);return Je&&Kt}):Ze,Wt=le?ht.filter(be=>new Date(be.started_at*1e3).toDateString()===le.toDateString()):ht,Gt=new Set(ut.flatMap(be=>Array.isArray(be.summary_files_changed)?be.summary_files_changed:[])).size,wt=ut.filter(be=>be.is_archived).length,_t=ut.filter(be=>be.is_bookmarked).length,Dt=(be,Ye)=>{W({start:be,end:Ye})},Ke=be=>{G(be),localStorage.setItem("sessionViewMode",be)},qt=()=>{const be=!ne;Se(be),localStorage.setItem("showCalendar",String(be))},pt=()=>{const be=!ee;ce(be),localStorage.setItem("showAnalytics",String(be))},zn=be=>{le&&le.toDateString()===be.toDateString()?Ne(null):Ne(be)};return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs(fl,{to:"/",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[g.jsx(v0,{size:13})," Back to Projects"]}),g.jsxs("div",{style:{marginBottom:24},children:[g.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:6},children:L.name}),L.git_remote&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:12},children:[g.jsx(e5,{size:12}),L.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")]}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:16},children:[g.jsx(Jm,{size:12}),L.root_path]}),g.jsx("div",{style:{display:"flex",gap:20,marginBottom:16},children:[{label:"Sessions",value:xt.length},{label:"Files Changed",value:Gt},{label:"Completed",value:xt.filter(be=>be.status==="completed").length}].map(be=>g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 16px"},children:[g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:be.value}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:be.label})]},be.label))}),g.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[g.jsxs("button",{onClick:Ee,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:h?"var(--accent)":"var(--surface2)",color:h?"white":"var(--text)",border:"1px solid",borderColor:h?"var(--accent)":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:be=>{h||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{h||(be.currentTarget.style.background="var(--surface2)")},children:[h?g.jsx(Hd,{size:16}):g.jsx(r5,{size:16}),h?"Exit Selection":"Select Sessions"]}),h&&ut.length>0&&g.jsx("button",{onClick:ze,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:be=>be.currentTarget.style.background="var(--surface)",onMouseLeave:be=>be.currentTarget.style.background="var(--surface2)",children:f.size===Ie.length?"Deselect All":"Select All"}),g.jsxs(fl,{to:`/project/${n}/memory`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,textDecoration:"none",transition:"all 0.15s"},onMouseEnter:be=>be.currentTarget.style.background="var(--surface)",onMouseLeave:be=>be.currentTarget.style.background="var(--surface2)",children:[g.jsx(mf,{size:16}),"View Memory"]}),g.jsxs("button",{onClick:()=>_e(!1),disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:o?"var(--surface)":"var(--surface2)",color:o?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:o?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:be=>{o||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{o||(be.currentTarget.style.background="var(--surface2)")},children:[g.jsx(Hl,{size:16,style:{animation:o?"spin 1s linear infinite":"none"}}),o?"Resyncing...":"Resync New"]}),g.jsxs("button",{onClick:()=>_e(!0),disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:o?"var(--surface)":"var(--surface2)",color:o?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:o?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:be=>{o||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{o||(be.currentTarget.style.background="var(--surface2)")},children:[g.jsx(Hl,{size:16,style:{animation:o?"spin 1s linear infinite":"none"}}),o?"Resyncing...":"Force Resync All"]}),g.jsxs("button",{onClick:me,disabled:a,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--surface)":"var(--surface2)",color:a?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:be=>{a||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{a||(be.currentTarget.style.background="var(--surface2)")},children:[g.jsx(Hl,{size:16,style:{animation:a?"spin 1s linear infinite":"none"}}),a?"Consolidating...":"Consolidate Memory"]}),wt>0&&g.jsx("button",{onClick:()=>w(!j),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:j?"var(--accent)15":"var(--surface2)",color:j?"var(--accent)":"var(--text)",border:"1px solid",borderColor:j?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:j?"Hide Archived":`Show Archived (${wt})`}),_t>0&&g.jsx("button",{onClick:()=>T(!k),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:k?"var(--accent)15":"var(--surface2)",color:k?"var(--accent)":"var(--text)",border:"1px solid",borderColor:k?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:k?"Show All":`Show Bookmarked (${_t})`}),g.jsxs("button",{onClick:qt,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:ne?"var(--accent)15":"var(--surface2)",color:ne?"var(--accent)":"var(--text)",border:"1px solid",borderColor:ne?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:be=>{ne||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{ne||(be.currentTarget.style.background="var(--surface2)")},children:[g.jsx(Id,{size:16}),ne?"Hide Calendar":"Show Calendar"]}),g.jsxs("button",{onClick:pt,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:ee?"var(--accent)15":"var(--surface2)",color:ee?"var(--accent)":"var(--text)",border:"1px solid",borderColor:ee?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:be=>{ee||(be.currentTarget.style.background="var(--surface)")},onMouseLeave:be=>{ee||(be.currentTarget.style.background="var(--surface2)")},children:[g.jsx(y0,{size:16}),ee?"Hide Analytics":"Show Analytics"]})]})]}),ut.length===0?g.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions recorded yet"}):g.jsxs(g.Fragment,{children:[g.jsx(L6,{projectId:n}),g.jsx(R6,{sessions:ut}),ee&&g.jsx(O6,{sessions:ut}),ne&&g.jsx(M6,{sessions:ht,onDateClick:zn,selectedDate:le}),g.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[g.jsx(g5,{onSearch:C,placeholder:"Search by title, content, or files..."}),g.jsx(T6,{onDateRangeChange:Dt}),g.jsx(_d,{label:"Mood",options:["productive","struggling","learning","blocked","flow"],selected:F,onChange:$,placeholder:"Filter by mood"}),g.jsx(_d,{label:"Complexity",options:["simple","moderate","complex","very-complex"],selected:Le,onChange:ke,placeholder:"Filter by complexity"}),g.jsx(_d,{label:"Status",options:["active","completed"],selected:se,onChange:J,placeholder:"Filter by status"}),g.jsx(_d,{label:"Technology",options:[".ts",".tsx",".js",".jsx",".py",".go",".java",".rs",".md",".json"],selected:pe,onChange:O,placeholder:"Filter by file type"}),g.jsx("div",{style:{marginLeft:"auto"},children:g.jsx(C6,{viewMode:U,onToggle:Ke})})]}),g.jsxs("h2",{style:{fontSize:14,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:["Sessions (",Wt.length,!j&&wt>0?` • ${wt} archived`:"",")",D&&` • Filtered by "${D}"`,(K.start||K.end)&&" • Date filtered",le&&` • ${Wt.length} on ${le.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`,k&&" • Bookmarked only"]}),Wt.length===0?g.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions match your filters"}):U==="table"?g.jsx(E6,{sessions:Wt,selectionMode:h,selectedSessions:f,onSelectionChange:We}):U==="timeline"?g.jsx(D6,{sessions:Wt,selectionMode:h,selectedSessions:f,onSelectionChange:We}):Wt.map(be=>g.jsx(j6,{session:be,onSessionUpdated:te,selectionMode:h,selected:f.has(be.id),onSelectionChange:Ye=>We(be.id,Ye)},be.id))]}),g.jsx(Gd,{isOpen:H.isOpen,title:H.title,message:H.message,confirmText:H.confirmText,cancelText:"Cancel",confirmColor:H.confirmColor,onConfirm:H.onConfirm,onCancel:()=>oe({...H,isOpen:!1})}),g.jsx(k6,{selectedCount:f.size,onBulkDelete:Xe,onBulkBookmark:Ve,onBulkTag:dt,onBulkExport:Y,onClearSelection:()=>{m(new Set),d(!1)}}),g.jsx(N6,{isOpen:y,sessionIds:Array.from(f),onClose:()=>_(!1),onComplete:Qe})]})}function tf(t){if(!t||Array.isArray(t))return t;try{return JSON.parse(t)}catch{return null}}function Wu({icon:t,title:n,items:a,color:s}){return!a||a.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[g.jsx(t,{size:14,color:s}),g.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:n})]}),g.jsx("ul",{style:{paddingLeft:0,listStyle:"none"},children:a.map((o,u)=>g.jsxs("li",{style:{padding:"4px 0",fontSize:13,color:"var(--text)",display:"flex",gap:8,alignItems:"flex-start",borderBottom:u<a.length-1?"1px solid var(--border)":"none"},children:[g.jsx("span",{style:{color:s,marginTop:2,flexShrink:0},children:"•"}),g.jsx("span",{children:o})]},u))})]})}function B6(t){return g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[g.jsx(Wu,{icon:G1,title:"What We Did",items:t.summary_what_we_did,color:"var(--green)"}),g.jsx(Wu,{icon:e5,title:"Decisions Made",items:t.summary_decisions,color:"var(--accent)"}),g.jsx(Wu,{icon:yi,title:"Files Changed",items:t.summary_files_changed,color:"var(--blue)"}),g.jsx(Wu,{icon:wx,title:"Next Steps",items:t.summary_next_steps,color:"var(--yellow)"}),g.jsx(Wu,{icon:H3,title:"Gotchas",items:t.summary_gotchas,color:"var(--red)"}),g.jsx(Wu,{icon:Fx,title:"Tech Notes",items:t.summary_tech_notes,color:"var(--text-muted)"})]})}const P6={tool_call:_s,file_edit:Yx,user_message:t5,assistant_message:mf,decision:mf},q6={tool_call:"var(--accent)",file_edit:"var(--blue)",user_message:"var(--green)",assistant_message:"var(--text-muted)",decision:"var(--yellow)"};function U6({observations:t}){if(!t||t.length===0)return g.jsx("div",{style:{padding:"40px 0",textAlign:"center",color:"var(--text-muted)",fontSize:13},children:"No observations recorded"});const n=[...t].sort((a,s)=>s.created_at-a.created_at);return g.jsxs("div",{style:{position:"relative"},children:[g.jsx("div",{style:{position:"absolute",left:16,top:0,bottom:0,width:1,background:"var(--border)"}}),n.map((a,s)=>{const o=P6[a.event_type]||q3,u=q6[a.event_type]||"var(--text-muted)",h=co(new Date(a.created_at*1e3),"HH:mm:ss");return g.jsxs("div",{style:{display:"flex",gap:14,paddingLeft:0,marginBottom:12},children:[g.jsx("div",{style:{width:32,height:32,borderRadius:"50%",background:"var(--surface2)",border:`1px solid ${u}22`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,zIndex:1},children:g.jsx(o,{size:13,color:u})}),g.jsxs("div",{style:{flex:1,paddingTop:6},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:2},children:[g.jsx("span",{style:{fontSize:12,fontWeight:600,color:u},children:a.tool_name||a.event_type}),g.jsx("span",{style:{fontSize:11,color:"var(--text-muted)"},children:h})]}),a.content&&g.jsx("div",{style:{fontSize:12,color:"var(--text)",fontFamily:a.event_type==="tool_call"?"monospace":"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:a.content}),a.file_path&&g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",marginTop:2},children:a.file_path})]})]},a.id)})]})}function F6({text:t,label:n="Copy"}){const[a,s]=ye.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return g.jsxs("button",{onClick:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--green)15":"var(--surface2)",color:a?"var(--green)":"var(--text)",border:"1px solid",borderColor:a?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:u=>{a||(u.currentTarget.style.background="var(--surface)")},onMouseLeave:u=>{a||(u.currentTarget.style.background="var(--surface2)")},children:[a?g.jsx(Qm,{size:16}):g.jsx(Km,{size:16}),a?"Copied!":n]})}function I6({text:t,filename:n,label:a="Download"}){const s=()=>{const o=new Blob([t],{type:"text/markdown"}),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=n,document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(u)};return g.jsxs("button",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background="var(--surface)"},onMouseLeave:o=>{o.currentTarget.style.background="var(--surface2)"},children:[g.jsx($d,{size:16}),a]})}function _n(t){"@babel/helpers - typeof";return _n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_n(t)}var Gi=Uint8Array,ei=Uint16Array,w0=Int32Array,S0=new Gi([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]),_0=new Gi([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]),cg=new Gi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),m5=function(t,n){for(var a=new ei(31),s=0;s<31;++s)a[s]=n+=1<<t[s-1];for(var o=new w0(a[30]),s=1;s<30;++s)for(var u=a[s];u<a[s+1];++u)o[u]=u-a[s]<<5|s;return{b:a,r:o}},v5=m5(S0,2),H6=v5.b,X1=v5.r;H6[28]=258,X1[258]=28;var W6=m5(_0,0),fg=W6.r,K1=new ei(32768);for(var Un=0;Un<32768;++Un){var al=(Un&43690)>>1|(Un&21845)<<1;al=(al&52428)>>2|(al&13107)<<2,al=(al&61680)>>4|(al&3855)<<4,K1[Un]=((al&65280)>>8|(al&255)<<8)>>1}var ff=(function(t,n,a){for(var s=t.length,o=0,u=new ei(n);o<s;++o)t[o]&&++u[t[o]-1];var h=new ei(n);for(o=1;o<n;++o)h[o]=h[o-1]+u[o-1]<<1;var d;if(a){d=new ei(1<<n);var f=15-n;for(o=0;o<s;++o)if(t[o])for(var m=o<<4|t[o],y=n-t[o],_=h[t[o]-1]++<<y,j=_|(1<<y)-1;_<=j;++_)d[K1[_]>>f]=m}else for(d=new ei(s),o=0;o<s;++o)t[o]&&(d[o]=K1[h[t[o]-1]++]>>15-t[o]);return d}),Vl=new Gi(288);for(var Un=0;Un<144;++Un)Vl[Un]=8;for(var Un=144;Un<256;++Un)Vl[Un]=9;for(var Un=256;Un<280;++Un)Vl[Un]=7;for(var Un=280;Un<288;++Un)Vl[Un]=8;var Vd=new Gi(32);for(var Un=0;Un<32;++Un)Vd[Un]=5;var Y6=ff(Vl,9,0),G6=ff(Vd,5,0),y5=function(t){return(t+7)/8|0},V6=function(t,n,a){return(a==null||a>t.length)&&(a=t.length),new Gi(t.subarray(n,a))},oo=function(t,n,a){a<<=n&7;var s=n/8|0;t[s]|=a,t[s+1]|=a>>8},nf=function(t,n,a){a<<=n&7;var s=n/8|0;t[s]|=a,t[s+1]|=a>>8,t[s+2]|=a>>16},m1=function(t,n){for(var a=[],s=0;s<t.length;++s)t[s]&&a.push({s,f:t[s]});var o=a.length,u=a.slice();if(!o)return{t:x5,l:0};if(o==1){var h=new Gi(a[0].s+1);return h[a[0].s]=1,{t:h,l:1}}a.sort(function($,Le){return $.f-Le.f}),a.push({s:-1,f:25001});var d=a[0],f=a[1],m=0,y=1,_=2;for(a[0]={s:-1,f:d.f+f.f,l:d,r:f};y!=o-1;)d=a[a[m].f<a[_].f?m++:_++],f=a[m!=y&&a[m].f<a[_].f?m++:_++],a[y++]={s:-1,f:d.f+f.f,l:d,r:f};for(var j=u[0].s,s=1;s<o;++s)u[s].s>j&&(j=u[s].s);var w=new ei(j+1),k=Z1(a[y-1],w,0);if(k>n){var s=0,T=0,D=k-n,C=1<<D;for(u.sort(function(Le,ke){return w[ke.s]-w[Le.s]||Le.f-ke.f});s<o;++s){var K=u[s].s;if(w[K]>n)T+=C-(1<<k-w[K]),w[K]=n;else break}for(T>>=D;T>0;){var W=u[s].s;w[W]<n?T-=1<<n-w[W]++-1:++s}for(;s>=0&&T;--s){var F=u[s].s;w[F]==n&&(--w[F],++T)}k=n}return{t:new Gi(w),l:k}},Z1=function(t,n,a){return t.s==-1?Math.max(Z1(t.l,n,a+1),Z1(t.r,n,a+1)):n[t.s]=a},dg=function(t){for(var n=t.length;n&&!t[--n];);for(var a=new ei(++n),s=0,o=t[0],u=1,h=function(f){a[s++]=f},d=1;d<=n;++d)if(t[d]==o&&d!=n)++u;else{if(!o&&u>2){for(;u>138;u-=138)h(32754);u>2&&(h(u>10?u-11<<5|28690:u-3<<5|12305),u=0)}else if(u>3){for(h(o),--u;u>6;u-=6)h(8304);u>2&&(h(u-3<<5|8208),u=0)}for(;u--;)h(o);u=1,o=t[d]}return{c:a.subarray(0,s),n}},rf=function(t,n){for(var a=0,s=0;s<n.length;++s)a+=t[s]*n[s];return a},b5=function(t,n,a){var s=a.length,o=y5(n+2);t[o]=s&255,t[o+1]=s>>8,t[o+2]=t[o]^255,t[o+3]=t[o+1]^255;for(var u=0;u<s;++u)t[o+u+4]=a[u];return(o+4+s)*8},hg=function(t,n,a,s,o,u,h,d,f,m,y){oo(n,y++,a),++o[256];for(var _=m1(o,15),j=_.t,w=_.l,k=m1(u,15),T=k.t,D=k.l,C=dg(j),K=C.c,W=C.n,F=dg(T),$=F.c,Le=F.n,ke=new ei(19),se=0;se<K.length;++se)++ke[K[se]&31];for(var se=0;se<$.length;++se)++ke[$[se]&31];for(var J=m1(ke,7),pe=J.t,O=J.l,U=19;U>4&&!pe[cg[U-1]];--U);var G=m+5<<3,ne=rf(o,Vl)+rf(u,Vd)+h,Se=rf(o,j)+rf(u,T)+h+14+3*U+rf(ke,pe)+2*ke[16]+3*ke[17]+7*ke[18];if(f>=0&&G<=ne&&G<=Se)return b5(n,y,t.subarray(f,f+m));var ee,ce,le,Ne;if(oo(n,y,1+(Se<ne)),y+=2,Se<ne){ee=ff(j,w,0),ce=j,le=ff(T,D,0),Ne=T;var H=ff(pe,O,0);oo(n,y,W-257),oo(n,y+5,Le-1),oo(n,y+10,U-4),y+=14;for(var se=0;se<U;++se)oo(n,y+3*se,pe[cg[se]]);y+=3*U;for(var oe=[K,$],L=0;L<2;++L)for(var q=oe[L],se=0;se<q.length;++se){var V=q[se]&31;oo(n,y,H[V]),y+=pe[V],V>15&&(oo(n,y,q[se]>>5&127),y+=q[se]>>12)}}else ee=Y6,ce=Vl,le=G6,Ne=Vd;for(var se=0;se<d;++se){var te=s[se];if(te>255){var V=te>>18&31;nf(n,y,ee[V+257]),y+=ce[V+257],V>7&&(oo(n,y,te>>23&31),y+=S0[V]);var ae=te&31;nf(n,y,le[ae]),y+=Ne[ae],ae>3&&(nf(n,y,te>>5&8191),y+=_0[ae])}else nf(n,y,ee[te]),y+=ce[te]}return nf(n,y,ee[256]),y+ce[256]},Q6=new w0([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),x5=new Gi(0),X6=function(t,n,a,s,o,u){var h=u.z||t.length,d=new Gi(s+h+5*(1+Math.ceil(h/7e3))+o),f=d.subarray(s,d.length-o),m=u.l,y=(u.r||0)&7;if(n){y&&(f[0]=u.r>>3);for(var _=Q6[n-1],j=_>>13,w=_&8191,k=(1<<a)-1,T=u.p||new ei(32768),D=u.h||new ei(k+1),C=Math.ceil(a/3),K=2*C,W=function(dt){return(t[dt]^t[dt+1]<<C^t[dt+2]<<K)&k},F=new w0(25e3),$=new ei(288),Le=new ei(32),ke=0,se=0,J=u.i||0,pe=0,O=u.w||0,U=0;J+2<h;++J){var G=W(J),ne=J&32767,Se=D[G];if(T[ne]=Se,D[G]=ne,O<=J){var ee=h-J;if((ke>7e3||pe>24576)&&(ee>423||!m)){y=hg(t,f,0,F,$,Le,se,pe,U,J-U,y),pe=ke=se=0,U=J;for(var ce=0;ce<286;++ce)$[ce]=0;for(var ce=0;ce<30;++ce)Le[ce]=0}var le=2,Ne=0,H=w,oe=ne-Se&32767;if(ee>2&&G==W(J-oe))for(var L=Math.min(j,ee)-1,q=Math.min(32767,J),V=Math.min(258,ee);oe<=q&&--H&&ne!=Se;){if(t[J+le]==t[J+le-oe]){for(var te=0;te<V&&t[J+te]==t[J+te-oe];++te);if(te>le){if(le=te,Ne=oe,te>L)break;for(var ae=Math.min(oe,te-2),me=0,ce=0;ce<ae;++ce){var _e=J-oe+ce&32767,Ee=T[_e],ze=_e-Ee&32767;ze>me&&(me=ze,Se=_e)}}}ne=Se,Se=T[ne],oe+=ne-Se&32767}if(Ne){F[pe++]=268435456|X1[le]<<18|fg[Ne];var We=X1[le]&31,Xe=fg[Ne]&31;se+=S0[We]+_0[Xe],++$[257+We],++Le[Xe],O=J+le,++ke}else F[pe++]=t[J],++$[t[J]]}}for(J=Math.max(J,O);J<h;++J)F[pe++]=t[J],++$[t[J]];y=hg(t,f,m,F,$,Le,se,pe,U,J-U,y),m||(u.r=y&7|f[y/8|0]<<3,y-=7,u.h=D,u.p=T,u.i=J,u.w=O)}else{for(var J=u.w||0;J<h+m;J+=65535){var Ve=J+65535;Ve>=h&&(f[y/8|0]=m,Ve=h),y=b5(f,y+1,t.subarray(J,Ve))}u.i=h}return V6(d,0,s+y5(y)+o)},w5=function(){var t=1,n=0;return{p:function(a){for(var s=t,o=n,u=a.length|0,h=0;h!=u;){for(var d=Math.min(h+2655,u);h<d;++h)o+=s+=a[h];s=(s&65535)+15*(s>>16),o=(o&65535)+15*(o>>16)}t=s,n=o},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},K6=function(t,n,a,s,o){if(!o&&(o={l:1},n.dictionary)){var u=n.dictionary.subarray(-32768),h=new Gi(u.length+t.length);h.set(u),h.set(t,u.length),t=h,o.w=u.length}return X6(t,n.level==null?6:n.level,n.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,a,s,o)},S5=function(t,n,a){for(;a;++n)t[n]=a,a>>>=8},Z6=function(t,n){var a=n.level,s=a==0?0:a<6?1:a==9?3:2;if(t[0]=120,t[1]=s<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var o=w5();o.p(n.dictionary),S5(t,2,o.d())}};function $1(t,n){n||(n={});var a=w5();a.p(t);var s=K6(t,n,n.dictionary?6:2,4);return Z6(s,n),S5(s,s.length-4,a.d()),s}var $6=typeof TextDecoder<"u"&&new TextDecoder,J6=0;try{$6.decode(x5,{stream:!0}),J6=1}catch{}function ew(t){if(Array.isArray(t))return t}function tw(t,n){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var s,o,u,h,d=[],f=!0,m=!1;try{if(u=(a=a.call(t)).next,n!==0)for(;!(f=(s=u.call(a)).done)&&(d.push(s.value),d.length!==n);f=!0);}catch(y){m=!0,o=y}finally{try{if(!f&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(m)throw o}}return d}}function pg(t,n){(n==null||n>t.length)&&(n=t.length);for(var a=0,s=Array(n);a<n;a++)s[a]=t[a];return s}function nw(t,n){if(t){if(typeof t=="string")return pg(t,n);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?pg(t,n):void 0}}function rw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gg(t,n){return ew(t)||tw(t,n)||nw(t,n)||rw()}function mg(t,n="utf8"){return new TextDecoder(n).decode(t)}const aw=new TextEncoder;function iw(t){return aw.encode(t)}const sw=1024*8,ow=(()=>{const t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),v1={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 A0{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=sw,a={}){let s=!1;typeof n=="number"?n=new ArrayBuffer(n):(s=!0,this.lastWrittenByte=n.byteLength);const o=a.offset?a.offset>>>0:0,u=n.byteLength-o;let h=o;(ArrayBuffer.isView(n)||n instanceof A0)&&(n.byteLength!==n.buffer.byteLength&&(h=n.byteOffset+o),n=n.buffer),s?this.lastWrittenByte=u:this.lastWrittenByte=0,this.buffer=n,this.length=u,this.byteLength=u,this.byteOffset=h,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,h,u),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,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 n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){const s=(this.offset+n)*2,o=new Uint8Array(s);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=s,this.byteLength=s,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(n=1){return this.readArray(n,"uint8")}readArray(n,a){const s=v1[a].BYTES_PER_ELEMENT*n,o=this.byteOffset+this.offset,u=this.buffer.slice(o,o+s);if(this.littleEndian===ow&&a!=="uint8"&&a!=="int8"){const d=new Uint8Array(this.buffer.slice(o,o+s));d.reverse();const f=new v1[a](d.buffer);return this.offset+=s,f.reverse(),f}const h=new v1[a](u);return this.offset+=s,h}readInt16(){const n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){const n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){const n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){const n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){const n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){const n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){const n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){const n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let a="";for(let s=0;s<n;s++)a+=this.readChar();return a}readUtf8(n=1){return mg(this.readBytes(n))}decodeText(n=1,a="utf8"){return mg(this.readBytes(n),a)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let a=0;a<n.length;a++)this._data.setUint8(this.offset++,n[a]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let a=0;a<n.length;a++)this.writeUint8(n.charCodeAt(a));return this}writeUtf8(n){return this.writeBytes(iw(n))}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 uc(t){let n=t.length;for(;--n>=0;)t[n]=0}const lw=3,uw=258,_5=29,cw=256,fw=cw+1+_5,A5=30,dw=512,hw=new Array((fw+2)*2);uc(hw);const pw=new Array(A5*2);uc(pw);const gw=new Array(dw);uc(gw);const mw=new Array(uw-lw+1);uc(mw);const vw=new Array(_5);uc(vw);const yw=new Array(A5);uc(yw);const bw=(t,n,a,s)=>{let o=t&65535|0,u=t>>>16&65535|0,h=0;for(;a!==0;){h=a>2e3?2e3:a,a-=h;do o=o+n[s++]|0,u=u+o|0;while(--h);o%=65521,u%=65521}return o|u<<16|0};var J1=bw;const xw=()=>{let t,n=[];for(var a=0;a<256;a++){t=a;for(var s=0;s<8;s++)t=t&1?3988292384^t>>>1:t>>>1;n[a]=t}return n},ww=new Uint32Array(xw()),Sw=(t,n,a,s)=>{const o=ww,u=s+a;t^=-1;for(let h=s;h<u;h++)t=t>>>8^o[(t^n[h])&255];return t^-1};var bs=Sw,e0={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"},j5={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 _w=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var Aw=function(t){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const a=n.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(const s in a)_w(a,s)&&(t[s]=a[s])}}return t},jw=t=>{let n=0;for(let s=0,o=t.length;s<o;s++)n+=t[s].length;const a=new Uint8Array(n);for(let s=0,o=0,u=t.length;s<u;s++){let h=t[s];a.set(h,o),o+=h.length}return a},k5={assign:Aw,flattenChunks:jw};let N5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{N5=!1}const xf=new Uint8Array(256);for(let t=0;t<256;t++)xf[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;xf[254]=xf[254]=1;var kw=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,a,s,o,u,h=t.length,d=0;for(o=0;o<h;o++)a=t.charCodeAt(o),(a&64512)===55296&&o+1<h&&(s=t.charCodeAt(o+1),(s&64512)===56320&&(a=65536+(a-55296<<10)+(s-56320),o++)),d+=a<128?1:a<2048?2:a<65536?3:4;for(n=new Uint8Array(d),u=0,o=0;u<d;o++)a=t.charCodeAt(o),(a&64512)===55296&&o+1<h&&(s=t.charCodeAt(o+1),(s&64512)===56320&&(a=65536+(a-55296<<10)+(s-56320),o++)),a<128?n[u++]=a:a<2048?(n[u++]=192|a>>>6,n[u++]=128|a&63):a<65536?(n[u++]=224|a>>>12,n[u++]=128|a>>>6&63,n[u++]=128|a&63):(n[u++]=240|a>>>18,n[u++]=128|a>>>12&63,n[u++]=128|a>>>6&63,n[u++]=128|a&63);return n};const Nw=(t,n)=>{if(n<65534&&t.subarray&&N5)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let a="";for(let s=0;s<n;s++)a+=String.fromCharCode(t[s]);return a};var Lw=(t,n)=>{const a=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let s,o;const u=new Array(a*2);for(o=0,s=0;s<a;){let h=t[s++];if(h<128){u[o++]=h;continue}let d=xf[h];if(d>4){u[o++]=65533,s+=d-1;continue}for(h&=d===2?31:d===3?15:7;d>1&&s<a;)h=h<<6|t[s++]&63,d--;if(d>1){u[o++]=65533;continue}h<65536?u[o++]=h:(h-=65536,u[o++]=55296|h>>10&1023,u[o++]=56320|h&1023)}return Nw(u,o)},Tw=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let a=n-1;for(;a>=0&&(t[a]&192)===128;)a--;return a<0||a===0?n:a+xf[t[a]]>n?a:n},t0={string2buf:kw,buf2string:Lw,utf8border:Tw};function Cw(){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 Ew=Cw;const Ad=16209,Mw=16191;var Ow=function(n,a){let s,o,u,h,d,f,m,y,_,j,w,k,T,D,C,K,W,F,$,Le,ke,se,J,pe;const O=n.state;s=n.next_in,J=n.input,o=s+(n.avail_in-5),u=n.next_out,pe=n.output,h=u-(a-n.avail_out),d=u+(n.avail_out-257),f=O.dmax,m=O.wsize,y=O.whave,_=O.wnext,j=O.window,w=O.hold,k=O.bits,T=O.lencode,D=O.distcode,C=(1<<O.lenbits)-1,K=(1<<O.distbits)-1;e:do{k<15&&(w+=J[s++]<<k,k+=8,w+=J[s++]<<k,k+=8),W=T[w&C];t:for(;;){if(F=W>>>24,w>>>=F,k-=F,F=W>>>16&255,F===0)pe[u++]=W&65535;else if(F&16){$=W&65535,F&=15,F&&(k<F&&(w+=J[s++]<<k,k+=8),$+=w&(1<<F)-1,w>>>=F,k-=F),k<15&&(w+=J[s++]<<k,k+=8,w+=J[s++]<<k,k+=8),W=D[w&K];n:for(;;){if(F=W>>>24,w>>>=F,k-=F,F=W>>>16&255,F&16){if(Le=W&65535,F&=15,k<F&&(w+=J[s++]<<k,k+=8,k<F&&(w+=J[s++]<<k,k+=8)),Le+=w&(1<<F)-1,Le>f){n.msg="invalid distance too far back",O.mode=Ad;break e}if(w>>>=F,k-=F,F=u-h,Le>F){if(F=Le-F,F>y&&O.sane){n.msg="invalid distance too far back",O.mode=Ad;break e}if(ke=0,se=j,_===0){if(ke+=m-F,F<$){$-=F;do pe[u++]=j[ke++];while(--F);ke=u-Le,se=pe}}else if(_<F){if(ke+=m+_-F,F-=_,F<$){$-=F;do pe[u++]=j[ke++];while(--F);if(ke=0,_<$){F=_,$-=F;do pe[u++]=j[ke++];while(--F);ke=u-Le,se=pe}}}else if(ke+=_-F,F<$){$-=F;do pe[u++]=j[ke++];while(--F);ke=u-Le,se=pe}for(;$>2;)pe[u++]=se[ke++],pe[u++]=se[ke++],pe[u++]=se[ke++],$-=3;$&&(pe[u++]=se[ke++],$>1&&(pe[u++]=se[ke++]))}else{ke=u-Le;do pe[u++]=pe[ke++],pe[u++]=pe[ke++],pe[u++]=pe[ke++],$-=3;while($>2);$&&(pe[u++]=pe[ke++],$>1&&(pe[u++]=pe[ke++]))}}else if((F&64)===0){W=D[(W&65535)+(w&(1<<F)-1)];continue n}else{n.msg="invalid distance code",O.mode=Ad;break e}break}}else if((F&64)===0){W=T[(W&65535)+(w&(1<<F)-1)];continue t}else if(F&32){O.mode=Mw;break e}else{n.msg="invalid literal/length code",O.mode=Ad;break e}break}}while(s<o&&u<d);$=k>>3,s-=$,k-=$<<3,w&=(1<<k)-1,n.next_in=s,n.next_out=u,n.avail_in=s<o?5+(o-s):5-(s-o),n.avail_out=u<d?257+(d-u):257-(u-d),O.hold=w,O.bits=k};const Yu=15,vg=852,yg=592,bg=0,y1=1,xg=2,Rw=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]),Dw=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]),zw=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]),Bw=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]),Pw=(t,n,a,s,o,u,h,d)=>{const f=d.bits;let m=0,y=0,_=0,j=0,w=0,k=0,T=0,D=0,C=0,K=0,W,F,$,Le,ke,se=null,J;const pe=new Uint16Array(Yu+1),O=new Uint16Array(Yu+1);let U=null,G,ne,Se;for(m=0;m<=Yu;m++)pe[m]=0;for(y=0;y<s;y++)pe[n[a+y]]++;for(w=f,j=Yu;j>=1&&pe[j]===0;j--);if(w>j&&(w=j),j===0)return o[u++]=1<<24|64<<16|0,o[u++]=1<<24|64<<16|0,d.bits=1,0;for(_=1;_<j&&pe[_]===0;_++);for(w<_&&(w=_),D=1,m=1;m<=Yu;m++)if(D<<=1,D-=pe[m],D<0)return-1;if(D>0&&(t===bg||j!==1))return-1;for(O[1]=0,m=1;m<Yu;m++)O[m+1]=O[m]+pe[m];for(y=0;y<s;y++)n[a+y]!==0&&(h[O[n[a+y]]++]=y);if(t===bg?(se=U=h,J=20):t===y1?(se=Rw,U=Dw,J=257):(se=zw,U=Bw,J=0),K=0,y=0,m=_,ke=u,k=w,T=0,$=-1,C=1<<w,Le=C-1,t===y1&&C>vg||t===xg&&C>yg)return 1;for(;;){G=m-T,h[y]+1<J?(ne=0,Se=h[y]):h[y]>=J?(ne=U[h[y]-J],Se=se[h[y]-J]):(ne=96,Se=0),W=1<<m-T,F=1<<k,_=F;do F-=W,o[ke+(K>>T)+F]=G<<24|ne<<16|Se|0;while(F!==0);for(W=1<<m-1;K&W;)W>>=1;if(W!==0?(K&=W-1,K+=W):K=0,y++,--pe[m]===0){if(m===j)break;m=n[a+h[y]]}if(m>w&&(K&Le)!==$){for(T===0&&(T=w),ke+=_,k=m-T,D=1<<k;k+T<j&&(D-=pe[k+T],!(D<=0));)k++,D<<=1;if(C+=1<<k,t===y1&&C>vg||t===xg&&C>yg)return 1;$=K&Le,o[$]=w<<24|k<<16|ke-u|0}}return K!==0&&(o[ke+K]=m-T<<24|64<<16|0),d.bits=w,0};var df=Pw;const qw=0,L5=1,T5=2,{Z_FINISH:wg,Z_BLOCK:Uw,Z_TREES:jd,Z_OK:Ql,Z_STREAM_END:Fw,Z_NEED_DICT:Iw,Z_STREAM_ERROR:bi,Z_DATA_ERROR:C5,Z_MEM_ERROR:E5,Z_BUF_ERROR:Hw,Z_DEFLATED:Sg}=j5,Jd=16180,_g=16181,Ag=16182,jg=16183,kg=16184,Ng=16185,Lg=16186,Tg=16187,Cg=16188,Eg=16189,Qd=16190,lo=16191,b1=16192,Mg=16193,x1=16194,Og=16195,Rg=16196,Dg=16197,zg=16198,kd=16199,Nd=16200,Bg=16201,Pg=16202,qg=16203,Ug=16204,Fg=16205,w1=16206,Ig=16207,Hg=16208,Vn=16209,M5=16210,O5=16211,Ww=852,Yw=592,Gw=15,Vw=Gw,Wg=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function Qw(){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 Zl=t=>{if(!t)return 1;const n=t.state;return!n||n.strm!==t||n.mode<Jd||n.mode>O5?1:0},R5=t=>{if(Zl(t))return bi;const n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=Jd,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(Ww),n.distcode=n.distdyn=new Int32Array(Yw),n.sane=1,n.back=-1,Ql},D5=t=>{if(Zl(t))return bi;const n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,R5(t)},z5=(t,n)=>{let a;if(Zl(t))return bi;const s=t.state;return n<0?(a=0,n=-n):(a=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?bi:(s.window!==null&&s.wbits!==n&&(s.window=null),s.wrap=a,s.wbits=n,D5(t))},B5=(t,n)=>{if(!t)return bi;const a=new Qw;t.state=a,a.strm=t,a.window=null,a.mode=Jd;const s=z5(t,n);return s!==Ql&&(t.state=null),s},Xw=t=>B5(t,Vw);let Yg=!0,S1,_1;const Kw=t=>{if(Yg){S1=new Int32Array(512),_1=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(df(L5,t.lens,0,288,S1,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;df(T5,t.lens,0,32,_1,0,t.work,{bits:5}),Yg=!1}t.lencode=S1,t.lenbits=9,t.distcode=_1,t.distbits=5},P5=(t,n,a,s)=>{let o;const u=t.state;return u.window===null&&(u.wsize=1<<u.wbits,u.wnext=0,u.whave=0,u.window=new Uint8Array(u.wsize)),s>=u.wsize?(u.window.set(n.subarray(a-u.wsize,a),0),u.wnext=0,u.whave=u.wsize):(o=u.wsize-u.wnext,o>s&&(o=s),u.window.set(n.subarray(a-s,a-s+o),u.wnext),s-=o,s?(u.window.set(n.subarray(a-s,a),0),u.wnext=s,u.whave=u.wsize):(u.wnext+=o,u.wnext===u.wsize&&(u.wnext=0),u.whave<u.wsize&&(u.whave+=o))),0},Zw=(t,n)=>{let a,s,o,u,h,d,f,m,y,_,j,w,k,T,D=0,C,K,W,F,$,Le,ke,se;const J=new Uint8Array(4);let pe,O;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Zl(t)||!t.output||!t.input&&t.avail_in!==0)return bi;a=t.state,a.mode===lo&&(a.mode=b1),h=t.next_out,o=t.output,f=t.avail_out,u=t.next_in,s=t.input,d=t.avail_in,m=a.hold,y=a.bits,_=d,j=f,se=Ql;e:for(;;)switch(a.mode){case Jd:if(a.wrap===0){a.mode=b1;break}for(;y<16;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(a.wrap&2&&m===35615){a.wbits===0&&(a.wbits=15),a.check=0,J[0]=m&255,J[1]=m>>>8&255,a.check=bs(a.check,J,2,0),m=0,y=0,a.mode=_g;break}if(a.head&&(a.head.done=!1),!(a.wrap&1)||(((m&255)<<8)+(m>>8))%31){t.msg="incorrect header check",a.mode=Vn;break}if((m&15)!==Sg){t.msg="unknown compression method",a.mode=Vn;break}if(m>>>=4,y-=4,ke=(m&15)+8,a.wbits===0&&(a.wbits=ke),ke>15||ke>a.wbits){t.msg="invalid window size",a.mode=Vn;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=m&512?Eg:lo,m=0,y=0;break;case _g:for(;y<16;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(a.flags=m,(a.flags&255)!==Sg){t.msg="unknown compression method",a.mode=Vn;break}if(a.flags&57344){t.msg="unknown header flags set",a.mode=Vn;break}a.head&&(a.head.text=m>>8&1),a.flags&512&&a.wrap&4&&(J[0]=m&255,J[1]=m>>>8&255,a.check=bs(a.check,J,2,0)),m=0,y=0,a.mode=Ag;case Ag:for(;y<32;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.head&&(a.head.time=m),a.flags&512&&a.wrap&4&&(J[0]=m&255,J[1]=m>>>8&255,J[2]=m>>>16&255,J[3]=m>>>24&255,a.check=bs(a.check,J,4,0)),m=0,y=0,a.mode=jg;case jg:for(;y<16;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.head&&(a.head.xflags=m&255,a.head.os=m>>8),a.flags&512&&a.wrap&4&&(J[0]=m&255,J[1]=m>>>8&255,a.check=bs(a.check,J,2,0)),m=0,y=0,a.mode=kg;case kg:if(a.flags&1024){for(;y<16;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.length=m,a.head&&(a.head.extra_len=m),a.flags&512&&a.wrap&4&&(J[0]=m&255,J[1]=m>>>8&255,a.check=bs(a.check,J,2,0)),m=0,y=0}else a.head&&(a.head.extra=null);a.mode=Ng;case Ng:if(a.flags&1024&&(w=a.length,w>d&&(w=d),w&&(a.head&&(ke=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(s.subarray(u,u+w),ke)),a.flags&512&&a.wrap&4&&(a.check=bs(a.check,s,w,u)),d-=w,u+=w,a.length-=w),a.length))break e;a.length=0,a.mode=Lg;case Lg:if(a.flags&2048){if(d===0)break e;w=0;do ke=s[u+w++],a.head&&ke&&a.length<65536&&(a.head.name+=String.fromCharCode(ke));while(ke&&w<d);if(a.flags&512&&a.wrap&4&&(a.check=bs(a.check,s,w,u)),d-=w,u+=w,ke)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=Tg;case Tg:if(a.flags&4096){if(d===0)break e;w=0;do ke=s[u+w++],a.head&&ke&&a.length<65536&&(a.head.comment+=String.fromCharCode(ke));while(ke&&w<d);if(a.flags&512&&a.wrap&4&&(a.check=bs(a.check,s,w,u)),d-=w,u+=w,ke)break e}else a.head&&(a.head.comment=null);a.mode=Cg;case Cg:if(a.flags&512){for(;y<16;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(a.wrap&4&&m!==(a.check&65535)){t.msg="header crc mismatch",a.mode=Vn;break}m=0,y=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=lo;break;case Eg:for(;y<32;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}t.adler=a.check=Wg(m),m=0,y=0,a.mode=Qd;case Qd:if(a.havedict===0)return t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=m,a.bits=y,Iw;t.adler=a.check=1,a.mode=lo;case lo:if(n===Uw||n===jd)break e;case b1:if(a.last){m>>>=y&7,y-=y&7,a.mode=w1;break}for(;y<3;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}switch(a.last=m&1,m>>>=1,y-=1,m&3){case 0:a.mode=Mg;break;case 1:if(Kw(a),a.mode=kd,n===jd){m>>>=2,y-=2;break e}break;case 2:a.mode=Rg;break;case 3:t.msg="invalid block type",a.mode=Vn}m>>>=2,y-=2;break;case Mg:for(m>>>=y&7,y-=y&7;y<32;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if((m&65535)!==(m>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Vn;break}if(a.length=m&65535,m=0,y=0,a.mode=x1,n===jd)break e;case x1:a.mode=Og;case Og:if(w=a.length,w){if(w>d&&(w=d),w>f&&(w=f),w===0)break e;o.set(s.subarray(u,u+w),h),d-=w,u+=w,f-=w,h+=w,a.length-=w;break}a.mode=lo;break;case Rg:for(;y<14;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(a.nlen=(m&31)+257,m>>>=5,y-=5,a.ndist=(m&31)+1,m>>>=5,y-=5,a.ncode=(m&15)+4,m>>>=4,y-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Vn;break}a.have=0,a.mode=Dg;case Dg:for(;a.have<a.ncode;){for(;y<3;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.lens[U[a.have++]]=m&7,m>>>=3,y-=3}for(;a.have<19;)a.lens[U[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,pe={bits:a.lenbits},se=df(qw,a.lens,0,19,a.lencode,0,a.work,pe),a.lenbits=pe.bits,se){t.msg="invalid code lengths set",a.mode=Vn;break}a.have=0,a.mode=zg;case zg:for(;a.have<a.nlen+a.ndist;){for(;D=a.lencode[m&(1<<a.lenbits)-1],C=D>>>24,K=D>>>16&255,W=D&65535,!(C<=y);){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(W<16)m>>>=C,y-=C,a.lens[a.have++]=W;else{if(W===16){for(O=C+2;y<O;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(m>>>=C,y-=C,a.have===0){t.msg="invalid bit length repeat",a.mode=Vn;break}ke=a.lens[a.have-1],w=3+(m&3),m>>>=2,y-=2}else if(W===17){for(O=C+3;y<O;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}m>>>=C,y-=C,ke=0,w=3+(m&7),m>>>=3,y-=3}else{for(O=C+7;y<O;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}m>>>=C,y-=C,ke=0,w=11+(m&127),m>>>=7,y-=7}if(a.have+w>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Vn;break}for(;w--;)a.lens[a.have++]=ke}}if(a.mode===Vn)break;if(a.lens[256]===0){t.msg="invalid code -- missing end-of-block",a.mode=Vn;break}if(a.lenbits=9,pe={bits:a.lenbits},se=df(L5,a.lens,0,a.nlen,a.lencode,0,a.work,pe),a.lenbits=pe.bits,se){t.msg="invalid literal/lengths set",a.mode=Vn;break}if(a.distbits=6,a.distcode=a.distdyn,pe={bits:a.distbits},se=df(T5,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,pe),a.distbits=pe.bits,se){t.msg="invalid distances set",a.mode=Vn;break}if(a.mode=kd,n===jd)break e;case kd:a.mode=Nd;case Nd:if(d>=6&&f>=258){t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=m,a.bits=y,Ow(t,j),h=t.next_out,o=t.output,f=t.avail_out,u=t.next_in,s=t.input,d=t.avail_in,m=a.hold,y=a.bits,a.mode===lo&&(a.back=-1);break}for(a.back=0;D=a.lencode[m&(1<<a.lenbits)-1],C=D>>>24,K=D>>>16&255,W=D&65535,!(C<=y);){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(K&&(K&240)===0){for(F=C,$=K,Le=W;D=a.lencode[Le+((m&(1<<F+$)-1)>>F)],C=D>>>24,K=D>>>16&255,W=D&65535,!(F+C<=y);){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}m>>>=F,y-=F,a.back+=F}if(m>>>=C,y-=C,a.back+=C,a.length=W,K===0){a.mode=Fg;break}if(K&32){a.back=-1,a.mode=lo;break}if(K&64){t.msg="invalid literal/length code",a.mode=Vn;break}a.extra=K&15,a.mode=Bg;case Bg:if(a.extra){for(O=a.extra;y<O;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.length+=m&(1<<a.extra)-1,m>>>=a.extra,y-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=Pg;case Pg:for(;D=a.distcode[m&(1<<a.distbits)-1],C=D>>>24,K=D>>>16&255,W=D&65535,!(C<=y);){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if((K&240)===0){for(F=C,$=K,Le=W;D=a.distcode[Le+((m&(1<<F+$)-1)>>F)],C=D>>>24,K=D>>>16&255,W=D&65535,!(F+C<=y);){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}m>>>=F,y-=F,a.back+=F}if(m>>>=C,y-=C,a.back+=C,K&64){t.msg="invalid distance code",a.mode=Vn;break}a.offset=W,a.extra=K&15,a.mode=qg;case qg:if(a.extra){for(O=a.extra;y<O;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}a.offset+=m&(1<<a.extra)-1,m>>>=a.extra,y-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Vn;break}a.mode=Ug;case Ug:if(f===0)break e;if(w=j-f,a.offset>w){if(w=a.offset-w,w>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Vn;break}w>a.wnext?(w-=a.wnext,k=a.wsize-w):k=a.wnext-w,w>a.length&&(w=a.length),T=a.window}else T=o,k=h-a.offset,w=a.length;w>f&&(w=f),f-=w,a.length-=w;do o[h++]=T[k++];while(--w);a.length===0&&(a.mode=Nd);break;case Fg:if(f===0)break e;o[h++]=a.length,f--,a.mode=Nd;break;case w1:if(a.wrap){for(;y<32;){if(d===0)break e;d--,m|=s[u++]<<y,y+=8}if(j-=f,t.total_out+=j,a.total+=j,a.wrap&4&&j&&(t.adler=a.check=a.flags?bs(a.check,o,j,h-j):J1(a.check,o,j,h-j)),j=f,a.wrap&4&&(a.flags?m:Wg(m))!==a.check){t.msg="incorrect data check",a.mode=Vn;break}m=0,y=0}a.mode=Ig;case Ig:if(a.wrap&&a.flags){for(;y<32;){if(d===0)break e;d--,m+=s[u++]<<y,y+=8}if(a.wrap&4&&m!==(a.total&4294967295)){t.msg="incorrect length check",a.mode=Vn;break}m=0,y=0}a.mode=Hg;case Hg:se=Fw;break e;case Vn:se=C5;break e;case M5:return E5;case O5:default:return bi}return t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=m,a.bits=y,(a.wsize||j!==t.avail_out&&a.mode<Vn&&(a.mode<w1||n!==wg))&&P5(t,t.output,t.next_out,j-t.avail_out),_-=t.avail_in,j-=t.avail_out,t.total_in+=_,t.total_out+=j,a.total+=j,a.wrap&4&&j&&(t.adler=a.check=a.flags?bs(a.check,o,j,t.next_out-j):J1(a.check,o,j,t.next_out-j)),t.data_type=a.bits+(a.last?64:0)+(a.mode===lo?128:0)+(a.mode===kd||a.mode===x1?256:0),(_===0&&j===0||n===wg)&&se===Ql&&(se=Hw),se},$w=t=>{if(Zl(t))return bi;let n=t.state;return n.window&&(n.window=null),t.state=null,Ql},Jw=(t,n)=>{if(Zl(t))return bi;const a=t.state;return(a.wrap&2)===0?bi:(a.head=n,n.done=!1,Ql)},eS=(t,n)=>{const a=n.length;let s,o,u;return Zl(t)||(s=t.state,s.wrap!==0&&s.mode!==Qd)?bi:s.mode===Qd&&(o=1,o=J1(o,n,a,0),o!==s.check)?C5:(u=P5(t,n,a,a),u?(s.mode=M5,E5):(s.havedict=1,Ql))};var tS=D5,nS=z5,rS=R5,aS=Xw,iS=B5,sS=Zw,oS=$w,lS=Jw,uS=eS,cS="pako inflate (from Nodeca project)",uo={inflateReset:tS,inflateReset2:nS,inflateResetKeep:rS,inflateInit:aS,inflateInit2:iS,inflate:sS,inflateEnd:oS,inflateGetHeader:lS,inflateSetDictionary:uS,inflateInfo:cS};function fS(){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 dS=fS;const q5=Object.prototype.toString,{Z_NO_FLUSH:hS,Z_FINISH:pS,Z_OK:wf,Z_STREAM_END:A1,Z_NEED_DICT:j1,Z_STREAM_ERROR:gS,Z_DATA_ERROR:Gg,Z_MEM_ERROR:mS}=j5;function Af(t){this.options=k5.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ew,this.strm.avail_out=0;let a=uo.inflateInit2(this.strm,n.windowBits);if(a!==wf)throw new Error(e0[a]);if(this.header=new dS,uo.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=t0.string2buf(n.dictionary):q5.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(a=uo.inflateSetDictionary(this.strm,n.dictionary),a!==wf)))throw new Error(e0[a])}Af.prototype.push=function(t,n){const a=this.strm,s=this.options.chunkSize,o=this.options.dictionary;let u,h,d;if(this.ended)return!1;for(n===~~n?h=n:h=n===!0?pS:hS,q5.call(t)==="[object ArrayBuffer]"?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(a.avail_out===0&&(a.output=new Uint8Array(s),a.next_out=0,a.avail_out=s),u=uo.inflate(a,h),u===j1&&o&&(u=uo.inflateSetDictionary(a,o),u===wf?u=uo.inflate(a,h):u===Gg&&(u=j1));a.avail_in>0&&u===A1&&a.state.wrap>0&&t[a.next_in]!==0;)uo.inflateReset(a),u=uo.inflate(a,h);switch(u){case gS:case Gg:case j1:case mS:return this.onEnd(u),this.ended=!0,!1}if(d=a.avail_out,a.next_out&&(a.avail_out===0||u===A1))if(this.options.to==="string"){let f=t0.utf8border(a.output,a.next_out),m=a.next_out-f,y=t0.buf2string(a.output,f);a.next_out=m,a.avail_out=s-m,m&&a.output.set(a.output.subarray(f,f+m),0),this.onData(y)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(!(u===wf&&d===0)){if(u===A1)return u=uo.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,!0;if(a.avail_in===0)break}}return!0};Af.prototype.onData=function(t){this.chunks.push(t)};Af.prototype.onEnd=function(t){t===wf&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=k5.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function vS(t,n){const a=new Af(n);if(a.push(t),a.err)throw a.msg||e0[a.err];return a.result}var yS=Af,bS=vS,xS={Inflate:yS,inflate:bS};const{Inflate:wS,inflate:SS}=xS;var Vg=wS,_S=SS;const U5=[];for(let t=0;t<256;t++){let n=t;for(let a=0;a<8;a++)n&1?n=3988292384^n>>>1:n=n>>>1;U5[t]=n}const Qg=4294967295;function AS(t,n,a){let s=t;for(let o=0;o<a;o++)s=U5[(s^n[o])&255]^s>>>8;return s}function jS(t,n){return(AS(Qg,t,n)^Qg)>>>0}function Xg(t,n,a){const s=t.readUint32(),o=jS(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(o!==s)throw new Error(`CRC mismatch for chunk ${a}. Expected ${s}, found ${o}`)}function F5(t,n,a){for(let s=0;s<a;s++)n[s]=t[s]}function I5(t,n,a,s){let o=0;for(;o<s;o++)n[o]=t[o];for(;o<a;o++)n[o]=t[o]+n[o-s]&255}function H5(t,n,a,s){let o=0;if(a.length===0)for(;o<s;o++)n[o]=t[o];else for(;o<s;o++)n[o]=t[o]+a[o]&255}function W5(t,n,a,s,o){let u=0;if(a.length===0){for(;u<o;u++)n[u]=t[u];for(;u<s;u++)n[u]=t[u]+(n[u-o]>>1)&255}else{for(;u<o;u++)n[u]=t[u]+(a[u]>>1)&255;for(;u<s;u++)n[u]=t[u]+(n[u-o]+a[u]>>1)&255}}function Y5(t,n,a,s,o){let u=0;if(a.length===0){for(;u<o;u++)n[u]=t[u];for(;u<s;u++)n[u]=t[u]+n[u-o]&255}else{for(;u<o;u++)n[u]=t[u]+a[u]&255;for(;u<s;u++)n[u]=t[u]+kS(n[u-o],a[u],a[u-o])&255}}function kS(t,n,a){const s=t+n-a,o=Math.abs(s-t),u=Math.abs(s-n),h=Math.abs(s-a);return o<=u&&o<=h?t:u<=h?n:a}function NS(t,n,a,s,o,u){switch(t){case 0:F5(n,a,o);break;case 1:I5(n,a,o,u);break;case 2:H5(n,a,s,o);break;case 3:W5(n,a,s,o,u);break;case 4:Y5(n,a,s,o,u);break;default:throw new Error(`Unsupported filter: ${t}`)}}const LS=new Uint16Array([255]),TS=new Uint8Array(LS.buffer),CS=TS[0]===255;function ES(t){const{data:n,width:a,height:s,channels:o,depth:u}=t,h=[{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}],d=Math.ceil(u/8)*o,f=new Uint8Array(s*a*d);let m=0;for(let y=0;y<7;y++){const _=h[y],j=Math.ceil((a-_.x)/_.xStep),w=Math.ceil((s-_.y)/_.yStep);if(j<=0||w<=0)continue;const k=j*d,T=new Uint8Array(k);for(let D=0;D<w;D++){const C=n[m++],K=n.subarray(m,m+k);m+=k;const W=new Uint8Array(k);NS(C,K,W,T,k,d),T.set(W);for(let F=0;F<j;F++){const $=_.x+F*_.xStep,Le=_.y+D*_.yStep;if(!($>=a||Le>=s))for(let ke=0;ke<d;ke++)f[(Le*a+$)*d+ke]=W[F*d+ke]}}}if(u===16){const y=new Uint16Array(f.buffer);if(CS)for(let _=0;_<y.length;_++)y[_]=MS(y[_]);return y}else return f}function MS(t){return(t&255)<<8|t>>8&255}const OS=new Uint16Array([255]),RS=new Uint8Array(OS.buffer),DS=RS[0]===255,zS=new Uint8Array(0);function Kg(t){const{data:n,width:a,height:s,channels:o,depth:u}=t,h=Math.ceil(u/8)*o,d=Math.ceil(u/8*o*a),f=new Uint8Array(s*d);let m=zS,y=0,_,j;for(let w=0;w<s;w++){switch(_=n.subarray(y+1,y+1+d),j=f.subarray(w*d,(w+1)*d),n[y]){case 0:F5(_,j,d);break;case 1:I5(_,j,d,h);break;case 2:H5(_,j,m,d);break;case 3:W5(_,j,m,d,h);break;case 4:Y5(_,j,m,d,h);break;default:throw new Error(`Unsupported filter: ${n[y]}`)}m=j,y+=d+1}if(u===16){const w=new Uint16Array(f.buffer);if(DS)for(let k=0;k<w.length;k++)w[k]=BS(w[k]);return w}else return f}function BS(t){return(t&255)<<8|t>>8&255}const Od=Uint8Array.of(137,80,78,71,13,10,26,10);function Zg(t){if(!PS(t.readBytes(Od.length)))throw new Error("wrong PNG signature")}function PS(t){if(t.length<Od.length)return!1;for(let n=0;n<Od.length;n++)if(t[n]!==Od[n])return!1;return!0}const qS="tEXt",US=0,G5=new TextDecoder("latin1");function FS(t){if(HS(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const IS=/^[\u0000-\u00FF]*$/;function HS(t){if(!IS.test(t))throw new Error("invalid latin1 text")}function WS(t,n,a){const s=V5(n);t[s]=YS(n,a-s.length-1)}function V5(t){for(t.mark();t.readByte()!==US;);const n=t.offset;t.reset();const a=G5.decode(t.readBytes(n-t.offset-1));return t.skip(1),FS(a),a}function YS(t,n){return G5.decode(t.readBytes(n))}const Ja={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},k1={UNKNOWN:-1,DEFLATE:0},$g={UNKNOWN:-1,ADAPTIVE:0},N1={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Ld={NONE:0,BACKGROUND:1,PREVIOUS:2},L1={SOURCE:0,OVER:1};class GS extends A0{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,a={}){super(n);const{checkCrc:s=!1}=a;this._checkCrc=s,this._inflator=new Vg,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=k1.UNKNOWN,this._filterMethod=$g.UNKNOWN,this._interlaceMethod=N1.UNKNOWN,this._colorType=Ja.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Zg(this);!this._end;){const n=this.readUint32(),a=this.readChars(4);this.decodeChunk(n,a)}return this.decodeImage(),this._png}decodeApng(){for(Zg(this);!this._end;){const n=this.readUint32(),a=this.readChars(4);this.decodeApngChunk(n,a)}return this.decodeApngImage(),this._apng}decodeChunk(n,a){const s=this.offset;switch(a){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case qS:WS(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-s!==n)throw new Error(`Length mismatch while decoding chunk ${a}`);this._checkCrc?Xg(this,n+4,a):this.skip(4)}decodeApngChunk(n,a){const s=this.offset;switch(a!=="fdAT"&&a!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),a){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,a),this.offset=s+n;break}if(this.offset-s!==n)throw new Error(`Length mismatch while decoding chunk ${a}`);this._checkCrc?Xg(this,n+4,a):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=VS(this.readUint8());const a=this.readUint8();this._colorType=a;let s;switch(a){case Ja.GREYSCALE:s=1;break;case Ja.TRUECOLOUR:s=3;break;case Ja.INDEXED_COLOUR:s=1;break;case Ja.GREYSCALE_ALPHA:s=2;break;case Ja.TRUECOLOUR_ALPHA:s=4;break;case Ja.UNKNOWN:default:throw new Error(`Unknown color type: ${a}`)}if(this._png.channels=s,this._compressionMethod=this.readUint8(),this._compressionMethod!==k1.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 n={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(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const a=n/3;this._hasPalette=!0;const s=[];this._palette=s;for(let o=0;o<a;o++)s.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const a=n,s=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,s,a)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let a=n,s=this.offset+this.byteOffset;if(s+=4,a-=4,this._inflator.push(new Uint8Array(this.buffer,s,a)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case Ja.GREYSCALE:case Ja.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let a=0;a<n/2;a++)this._transparency[a]=this.readUint16();break}case Ja.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let a=0;for(;a<n;a++){const s=this.readByte();this._palette[a].push(s)}for(;a<this._palette.length;a++)this._palette[a].push(255);break}case Ja.UNKNOWN:case Ja.GREYSCALE_ALPHA:case Ja.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const a=V5(this),s=this.readUint8();if(s!==k1.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${s}`);const o=this.readBytes(n-a.length-2);this._png.iccEmbeddedProfile={name:a,profile:_S(o)}}decodepHYs(){const n=this.readUint32(),a=this.readUint32(),s=this.readByte();this._png.resolution={x:n,y:a,unit:s}}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 n=0;n<this._numberOfFrames;n++){const a={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].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)},s=this._frames.at(n);if(s){if(s.data=Kg({data:s.data,width:s.width,height:s.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||s.xOffset===0&&s.yOffset===0&&s.width===this._png.width&&s.height===this._png.height)a.data=s.data;else{const o=this._apng.frames.at(n-1);this.disposeFrame(s,o,a),this.addFrameDataToCanvas(a,s)}this._apng.frames.push(a)}}return this._apng}disposeFrame(n,a,s){switch(n.disposeOp){case Ld.NONE:break;case Ld.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let u=0;u<this._png.width;u++){const h=(o*n.width+u)*this._png.channels;for(let d=0;d<this._png.channels;d++)s.data[h+d]=0}break;case Ld.PREVIOUS:s.data.set(a.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,a){const s=1<<this._png.depth,o=(u,h)=>{const d=((u+a.yOffset)*this._png.width+a.xOffset+h)*this._png.channels,f=(u*a.width+h)*this._png.channels;return{index:d,frameIndex:f}};switch(a.blendOp){case L1.SOURCE:for(let u=0;u<a.height;u++)for(let h=0;h<a.width;h++){const{index:d,frameIndex:f}=o(u,h);for(let m=0;m<this._png.channels;m++)n.data[d+m]=a.data[f+m]}break;case L1.OVER:for(let u=0;u<a.height;u++)for(let h=0;h<a.width;h++){const{index:d,frameIndex:f}=o(u,h);for(let m=0;m<this._png.channels;m++){const y=a.data[f+this._png.channels-1]/s,_=m%(this._png.channels-1)===0?1:a.data[f+m],j=Math.floor(y*_+(1-y)*n.data[d+m]);n.data[d+m]+=j}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==$g.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===N1.NO_INTERLACE)this._png.data=Kg({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===N1.ADAM7)this._png.data=ES({data:n,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 n=this._inflator.result,a=this._frames.at(-1);a?a.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Ld.NONE,blendOp:L1.SOURCE,data:n}),this._inflator=new Vg,this._writingDataChunks=!1}}function VS(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var Jg;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(Jg||(Jg={}));function QS(t,n){return new GS(t,n).decode()}var Pt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function T1(){Pt.console&&typeof Pt.console.log=="function"&&Pt.console.log.apply(Pt.console,arguments)}var En={log:T1,warn:function(t){Pt.console&&(typeof Pt.console.warn=="function"?Pt.console.warn.apply(Pt.console,arguments):T1.call(null,arguments))},error:function(t){Pt.console&&(typeof Pt.console.error=="function"?Pt.console.error.apply(Pt.console,arguments):T1(t))}};function C1(t,n,a){var s=new XMLHttpRequest;s.open("GET",t),s.responseType="blob",s.onload=function(){Ul(s.response,n,a)},s.onerror=function(){En.error("could not download file")},s.send()}function em(t){var n=new XMLHttpRequest;n.open("HEAD",t,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function Td(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Ul=Pt.saveAs||((typeof window>"u"?"undefined":_n(window))!=="object"||window!==Pt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,a){var s=Pt.URL||Pt.webkitURL,o=document.createElement("a");n=n||t.name||"download",o.download=n,o.rel="noopener",typeof t=="string"?(o.href=t,o.origin!==location.origin?em(o.href)?C1(t,n,a):Td(o,o.target="_blank"):Td(o)):(o.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(o.href)},4e4),setTimeout(function(){Td(o)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,a){if(n=n||t.name||"download",typeof t=="string")if(em(t))C1(t,n,a);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout(function(){Td(s)})}else navigator.msSaveOrOpenBlob((function(o,u){return u===void 0?u={autoBom:!1}:_n(u)!=="object"&&(En.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.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})(t,a),n)}:function(t,n,a,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),typeof t=="string")return C1(t,n,a);var o=t.type==="application/octet-stream",u=/constructor/i.test(Pt.HTMLElement)||Pt.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||o&&u)&&(typeof FileReader>"u"?"undefined":_n(FileReader))==="object"){var d=new FileReader;d.onloadend=function(){var y=d.result;y=h?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=y:location=y,s=null},d.readAsDataURL(t)}else{var f=Pt.URL||Pt.webkitURL,m=f.createObjectURL(t);s?s.location=m:location.href=m,s=null,setTimeout(function(){f.revokeObjectURL(m)},4e4)}});function Q5(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var a=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(d){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(d){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}}],s=0;s<a.length;s++){var o=a[s].re,u=a[s].process,h=o.exec(t);h&&(n=u(h),this.r=n[0],this.g=n[1],this.b=n[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 d=this.r.toString(16),f=this.g.toString(16),m=this.b.toString(16);return d.length==1&&(d="0"+d),f.length==1&&(f="0"+f),m.length==1&&(m="0"+m),"#"+d+f+m}}var Rd=Pt.atob.bind(Pt),tm=Pt.btoa.bind(Pt);function E1(t,n){var a=t[0],s=t[1],o=t[2],u=t[3];a=ra(a,s,o,u,n[0],7,-680876936),u=ra(u,a,s,o,n[1],12,-389564586),o=ra(o,u,a,s,n[2],17,606105819),s=ra(s,o,u,a,n[3],22,-1044525330),a=ra(a,s,o,u,n[4],7,-176418897),u=ra(u,a,s,o,n[5],12,1200080426),o=ra(o,u,a,s,n[6],17,-1473231341),s=ra(s,o,u,a,n[7],22,-45705983),a=ra(a,s,o,u,n[8],7,1770035416),u=ra(u,a,s,o,n[9],12,-1958414417),o=ra(o,u,a,s,n[10],17,-42063),s=ra(s,o,u,a,n[11],22,-1990404162),a=ra(a,s,o,u,n[12],7,1804603682),u=ra(u,a,s,o,n[13],12,-40341101),o=ra(o,u,a,s,n[14],17,-1502002290),a=aa(a,s=ra(s,o,u,a,n[15],22,1236535329),o,u,n[1],5,-165796510),u=aa(u,a,s,o,n[6],9,-1069501632),o=aa(o,u,a,s,n[11],14,643717713),s=aa(s,o,u,a,n[0],20,-373897302),a=aa(a,s,o,u,n[5],5,-701558691),u=aa(u,a,s,o,n[10],9,38016083),o=aa(o,u,a,s,n[15],14,-660478335),s=aa(s,o,u,a,n[4],20,-405537848),a=aa(a,s,o,u,n[9],5,568446438),u=aa(u,a,s,o,n[14],9,-1019803690),o=aa(o,u,a,s,n[3],14,-187363961),s=aa(s,o,u,a,n[8],20,1163531501),a=aa(a,s,o,u,n[13],5,-1444681467),u=aa(u,a,s,o,n[2],9,-51403784),o=aa(o,u,a,s,n[7],14,1735328473),a=ia(a,s=aa(s,o,u,a,n[12],20,-1926607734),o,u,n[5],4,-378558),u=ia(u,a,s,o,n[8],11,-2022574463),o=ia(o,u,a,s,n[11],16,1839030562),s=ia(s,o,u,a,n[14],23,-35309556),a=ia(a,s,o,u,n[1],4,-1530992060),u=ia(u,a,s,o,n[4],11,1272893353),o=ia(o,u,a,s,n[7],16,-155497632),s=ia(s,o,u,a,n[10],23,-1094730640),a=ia(a,s,o,u,n[13],4,681279174),u=ia(u,a,s,o,n[0],11,-358537222),o=ia(o,u,a,s,n[3],16,-722521979),s=ia(s,o,u,a,n[6],23,76029189),a=ia(a,s,o,u,n[9],4,-640364487),u=ia(u,a,s,o,n[12],11,-421815835),o=ia(o,u,a,s,n[15],16,530742520),a=sa(a,s=ia(s,o,u,a,n[2],23,-995338651),o,u,n[0],6,-198630844),u=sa(u,a,s,o,n[7],10,1126891415),o=sa(o,u,a,s,n[14],15,-1416354905),s=sa(s,o,u,a,n[5],21,-57434055),a=sa(a,s,o,u,n[12],6,1700485571),u=sa(u,a,s,o,n[3],10,-1894986606),o=sa(o,u,a,s,n[10],15,-1051523),s=sa(s,o,u,a,n[1],21,-2054922799),a=sa(a,s,o,u,n[8],6,1873313359),u=sa(u,a,s,o,n[15],10,-30611744),o=sa(o,u,a,s,n[6],15,-1560198380),s=sa(s,o,u,a,n[13],21,1309151649),a=sa(a,s,o,u,n[4],6,-145523070),u=sa(u,a,s,o,n[11],10,-1120210379),o=sa(o,u,a,s,n[2],15,718787259),s=sa(s,o,u,a,n[9],21,-343485551),t[0]=ol(a,t[0]),t[1]=ol(s,t[1]),t[2]=ol(o,t[2]),t[3]=ol(u,t[3])}function eh(t,n,a,s,o,u){return n=ol(ol(n,t),ol(s,u)),ol(n<<o|n>>>32-o,a)}function ra(t,n,a,s,o,u,h){return eh(n&a|~n&s,t,n,o,u,h)}function aa(t,n,a,s,o,u,h){return eh(n&s|a&~s,t,n,o,u,h)}function ia(t,n,a,s,o,u,h){return eh(n^a^s,t,n,o,u,h)}function sa(t,n,a,s,o,u,h){return eh(a^(n|~s),t,n,o,u,h)}function X5(t){var n,a=t.length,s=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)E1(s,XS(t.substring(n-64,n)));t=t.substring(n-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<t.length;n++)o[n>>2]|=t.charCodeAt(n)<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(E1(s,o),n=0;n<16;n++)o[n]=0;return o[14]=8*a,E1(s,o),s}function XS(t){var n,a=[];for(n=0;n<64;n+=4)a[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return a}var nm="0123456789abcdef".split("");function KS(t){for(var n="",a=0;a<4;a++)n+=nm[t>>8*a+4&15]+nm[t>>8*a&15];return n}function ZS(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function n0(t){return X5(t).map(ZS).join("")}var $S=(function(t){for(var n=0;n<t.length;n++)t[n]=KS(t[n]);return t.join("")})(X5("hello"))!="5d41402abc4b2a76b9719d911017c592";function ol(t,n){if($S){var a=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(a>>16)<<16|65535&a}return t+n&4294967295}function r0(t,n){var a,s,o,u;if(t!==a){for(var h=(o=t,u=1+(256/t.length|0),new Array(u+1).join(o)),d=[],f=0;f<256;f++)d[f]=f;var m=0;for(f=0;f<256;f++){var y=d[f];m=(m+y+h.charCodeAt(f))%256,d[f]=d[m],d[m]=y}a=t,s=d}else d=s;var _=n.length,j=0,w=0,k="";for(f=0;f<_;f++)w=(w+(y=d[j=(j+1)%256]))%256,d[j]=d[w],d[w]=y,h=d[(d[j]+d[w])%256],k+=String.fromCharCode(n.charCodeAt(f)^h);return k}var rm={print:4,modify:8,copy:16,"annot-forms":32};function Qu(t,n,a,s){this.v=1,this.r=2;var o=192;t.forEach(function(d){if(rm.perm!==void 0)throw new Error("Invalid permission: "+d);o+=rm[d]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var u=(n+this.padding).substr(0,32),h=(a+this.padding).substr(0,32);this.O=this.processOwnerPassword(u,h),this.P=-(1+(255^o)),this.encryptionKey=n0(u+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(s)).substr(0,5),this.U=r0(this.encryptionKey,this.padding)}function Xu(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",a=t.length,s=0;s<a;s++){var o=t.charCodeAt(s);n+=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):t[s]}return n}function am(t){if(_n(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(a,s,o){if(o=o||!1,typeof a!="string"||typeof s!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(a)||(n[a]={});var u=Math.random().toString(35);return n[a][u]=[s,!!o],u},this.unsubscribe=function(a){for(var s in n)if(n[s][a])return delete n[s][a],Object.keys(n[s]).length===0&&delete n[s],!0;return!1},this.publish=function(a){if(n.hasOwnProperty(a)){var s=Array.prototype.slice.call(arguments,1),o=[];for(var u in n[a]){var h=n[a][u];try{h[0].apply(t,s)}catch(d){Pt.console&&En.error("jsPDF PubSub Error",d.message,d)}h[1]&&o.push(u)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function Xd(t){if(!(this instanceof Xd))return new Xd(t);var n="opacity,stroke-opacity".split(",");for(var a in t)t.hasOwnProperty(a)&&n.indexOf(a)>=0&&(this[a]=t[a]);this.id="",this.objectNumber=-1}function K5(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function Fl(t,n,a,s,o){if(!(this instanceof Fl))return new Fl(t,n,a,s,o);this.type=t==="axial"?2:3,this.coords=n,this.colors=a,K5.call(this,s,o)}function Zu(t,n,a,s,o){if(!(this instanceof Zu))return new Zu(t,n,a,s,o);this.boundingBox=t,this.xStep=n,this.yStep=a,this.stream="",this.cloneIndex=0,K5.call(this,s,o)}function gt(t){var n,a=typeof arguments[0]=="string"?arguments[0]:"p",s=arguments[1],o=arguments[2],u=arguments[3],h=[],d=1,f=16,m="S",y=null;_n(t=t||{})==="object"&&(a=t.orientation,s=t.unit||s,o=t.format||o,u=t.compress||t.compressPdf||u,(y=t.encryption||null)!==null&&(y.userPassword=y.userPassword||"",y.ownerPassword=y.ownerPassword||"",y.userPermissions=y.userPermissions||[]),d=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(f=t.floatPrecision),m=t.defaultPathOperation||"S"),h=t.filters||(u===!0?["FlateEncode"]:h),s=s||"mm",a=(""+(a||"P")).toLowerCase();var _=t.putOnlyUsedFonts||!1,j={},w={internal:{},__private__:{}};w.__private__.PubSub=am;var k="1.3",T=w.__private__.getPdfVersion=function(){return k};w.__private__.setPdfVersion=function(x){k=x};var D={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]};w.__private__.getPageFormats=function(){return D};var C=w.__private__.getPageFormat=function(x){return D[x]};o=o||"a4";var K="compat",W="advanced",F=K;function $(){this.saveGraphicsState(),Y(new jt(qt,0,0,-qt,0,Ds()*qt).toString()+" cm"),this.setFontSize(this.getFontSize()/qt),m="n",F=W}function Le(){this.restoreGraphicsState(),m="S",F=K}var ke=w.__private__.combineFontStyleAndFontWeight=function(x,E){if(x=="bold"&&E=="normal"||x=="bold"&&E==400||x=="normal"&&E=="italic"||x=="bold"&&E=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return E&&(x=E==400||E==="normal"?x==="italic"?"italic":"normal":E!=700&&E!=="bold"||x!=="normal"?(E==700?"bold":E)+""+x:"bold"),x};w.advancedAPI=function(x){var E=F===K;return E&&$.call(this),typeof x!="function"||(x(this),E&&Le.call(this)),this},w.compatAPI=function(x){var E=F===W;return E&&Le.call(this),typeof x!="function"||(x(this),E&&$.call(this)),this},w.isAdvancedAPI=function(){return F===W};var se,J=function(x){if(F!==W)throw new Error(x+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},pe=w.roundToPrecision=w.__private__.roundToPrecision=function(x,E){var Q=n||E;if(isNaN(x)||isNaN(Q))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return x.toFixed(Q).replace(/0+$/,"")};se=w.hpf=w.__private__.hpf=typeof f=="number"?function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return pe(x,f)}:f==="smart"?function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return pe(x,x>-1&&x<1?16:5)}:function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return pe(x,16)};var O=w.f2=w.__private__.f2=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.f2");return pe(x,2)},U=w.__private__.f3=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.f3");return pe(x,3)},G=w.scale=w.__private__.scale=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.scale");return F===K?x*qt:F===W?x:void 0},ne=function(x){return G((function(E){return F===K?Ds()-E:F===W?E:void 0})(x))};w.__private__.setPrecision=w.setPrecision=function(x){typeof parseInt(x,10)=="number"&&(n=parseInt(x,10))};var Se,ee="00000000000000000000000000000000",ce=w.__private__.getFileId=function(){return ee},le=w.__private__.setFileId=function(x){return ee=x!==void 0&&/^[a-fA-F0-9]{32}$/.test(x)?x.toUpperCase():ee.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),y!==null&&(vr=new Qu(y.userPermissions,y.userPassword,y.ownerPassword,ee)),ee};w.setFileId=function(x){return le(x),this},w.getFileId=function(){return ce()};var Ne=w.__private__.convertDateToPDFDate=function(x){var E=x.getTimezoneOffset(),Q=E<0?"+":"-",ie=Math.floor(Math.abs(E/60)),he=Math.abs(E%60),Oe=[Q,V(ie),"'",V(he),"'"].join("");return["D:",x.getFullYear(),V(x.getMonth()+1),V(x.getDate()),V(x.getHours()),V(x.getMinutes()),V(x.getSeconds()),Oe].join("")},H=w.__private__.convertPDFDateToDate=function(x){var E=parseInt(x.substr(2,4),10),Q=parseInt(x.substr(6,2),10)-1,ie=parseInt(x.substr(8,2),10),he=parseInt(x.substr(10,2),10),Oe=parseInt(x.substr(12,2),10),Fe=parseInt(x.substr(14,2),10);return new Date(E,Q,ie,he,Oe,Fe,0)},oe=w.__private__.setCreationDate=function(x){var E;if(x===void 0&&(x=new Date),x instanceof Date)E=Ne(x);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(x))throw new Error("Invalid argument passed to jsPDF.setCreationDate");E=x}return Se=E},L=w.__private__.getCreationDate=function(x){var E=Se;return x==="jsDate"&&(E=H(Se)),E};w.setCreationDate=function(x){return oe(x),this},w.getCreationDate=function(x){return L(x)};var q,V=w.__private__.padd2=function(x){return("0"+parseInt(x)).slice(-2)},te=w.__private__.padd2Hex=function(x){return("00"+(x=x.toString())).substr(x.length)},ae=0,me=[],_e=[],Ee=0,ze=[],We=[],Xe=!1,Ve=_e;w.__private__.setCustomOutputDestination=function(x){Xe=!0,Ve=x};var dt=function(x){Xe||(Ve=x)};w.__private__.resetCustomOutputDestination=function(){Xe=!1,Ve=_e};var Y=w.__private__.out=function(x){return x=x.toString(),Ee+=x.length+1,Ve.push(x),Ve},Qe=w.__private__.write=function(x){return Y(arguments.length===1?x.toString():Array.prototype.join.call(arguments," "))},xt=w.__private__.getArrayBuffer=function(x){for(var E=x.length,Q=new ArrayBuffer(E),ie=new Uint8Array(Q);E--;)ie[E]=x.charCodeAt(E);return Q},ut=[["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]];w.__private__.getStandardFonts=function(){return ut};var Ie=t.fontSize||16;w.__private__.setFontSize=w.setFontSize=function(x){return Ie=F===W?x/qt:x,this};var mt,Ze=w.__private__.getFontSize=w.getFontSize=function(){return F===K?Ie:Ie*qt},bt=t.R2L||!1;w.__private__.setR2L=w.setR2L=function(x){return bt=x,this},w.__private__.getR2L=w.getR2L=function(){return bt};var ht,Wt=w.__private__.setZoomMode=function(x){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(x))mt=x;else if(isNaN(x)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(x)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+x+'" is not recognized.');mt=x}else mt=parseInt(x,10)};w.__private__.getZoomMode=function(){return mt};var Gt,wt=w.__private__.setPageMode=function(x){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(x)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+x+'" is not recognized.');ht=x};w.__private__.getPageMode=function(){return ht};var _t=w.__private__.setLayoutMode=function(x){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(x)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+x+'" is not recognized.');Gt=x};w.__private__.getLayoutMode=function(){return Gt},w.__private__.setDisplayMode=w.setDisplayMode=function(x,E,Q){return Wt(x),_t(E),wt(Q),this};var Dt={title:"",subject:"",author:"",keywords:"",creator:""};w.__private__.getDocumentProperty=function(x){if(Object.keys(Dt).indexOf(x)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Dt[x]},w.__private__.getDocumentProperties=function(){return Dt},w.__private__.setDocumentProperties=w.setProperties=w.setDocumentProperties=function(x){for(var E in Dt)Dt.hasOwnProperty(E)&&x[E]&&(Dt[E]=x[E]);return this},w.__private__.setDocumentProperty=function(x,E){if(Object.keys(Dt).indexOf(x)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Dt[x]=E};var Ke,qt,pt,zn,be,Ye={},Je={},Kt=[],rt={},un={},vt={},At={},Tt=null,Et=0,St=[],nn=new am(w),ni=t.hotfixes||[],pn={},Oa={},Ra=[],jt=function x(E,Q,ie,he,Oe,Fe){if(!(this instanceof x))return new x(E,Q,ie,he,Oe,Fe);isNaN(E)&&(E=1),isNaN(Q)&&(Q=0),isNaN(ie)&&(ie=0),isNaN(he)&&(he=1),isNaN(Oe)&&(Oe=0),isNaN(Fe)&&(Fe=0),this._matrix=[E,Q,ie,he,Oe,Fe]};Object.defineProperty(jt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(x){this._matrix[0]=x}}),Object.defineProperty(jt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(x){this._matrix[1]=x}}),Object.defineProperty(jt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(x){this._matrix[2]=x}}),Object.defineProperty(jt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(x){this._matrix[3]=x}}),Object.defineProperty(jt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(x){this._matrix[4]=x}}),Object.defineProperty(jt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(x){this._matrix[5]=x}}),Object.defineProperty(jt.prototype,"a",{get:function(){return this._matrix[0]},set:function(x){this._matrix[0]=x}}),Object.defineProperty(jt.prototype,"b",{get:function(){return this._matrix[1]},set:function(x){this._matrix[1]=x}}),Object.defineProperty(jt.prototype,"c",{get:function(){return this._matrix[2]},set:function(x){this._matrix[2]=x}}),Object.defineProperty(jt.prototype,"d",{get:function(){return this._matrix[3]},set:function(x){this._matrix[3]=x}}),Object.defineProperty(jt.prototype,"e",{get:function(){return this._matrix[4]},set:function(x){this._matrix[4]=x}}),Object.defineProperty(jt.prototype,"f",{get:function(){return this._matrix[5]},set:function(x){this._matrix[5]=x}}),Object.defineProperty(jt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(jt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(jt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(jt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),jt.prototype.join=function(x){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(se).join(x)},jt.prototype.multiply=function(x){var E=x.sx*this.sx+x.shy*this.shx,Q=x.sx*this.shy+x.shy*this.sy,ie=x.shx*this.sx+x.sy*this.shx,he=x.shx*this.shy+x.sy*this.sy,Oe=x.tx*this.sx+x.ty*this.shx+this.tx,Fe=x.tx*this.shy+x.ty*this.sy+this.ty;return new jt(E,Q,ie,he,Oe,Fe)},jt.prototype.decompose=function(){var x=this.sx,E=this.shy,Q=this.shx,ie=this.sy,he=this.tx,Oe=this.ty,Fe=Math.sqrt(x*x+E*E),st=(x/=Fe)*Q+(E/=Fe)*ie;Q-=x*st,ie-=E*st;var at=Math.sqrt(Q*Q+ie*ie);return st/=at,x*(ie/=at)<E*(Q/=at)&&(x=-x,E=-E,st=-st,Fe=-Fe),{scale:new jt(Fe,0,0,at,0,0),translate:new jt(1,0,0,1,he,Oe),rotate:new jt(x,E,-E,x,0,0),skew:new jt(1,0,st,1,0,0)}},jt.prototype.toString=function(x){return this.join(" ")},jt.prototype.inversed=function(){var x=this.sx,E=this.shy,Q=this.shx,ie=this.sy,he=this.tx,Oe=this.ty,Fe=1/(x*ie-E*Q),st=ie*Fe,at=-E*Fe,Mt=-Q*Fe,Ft=x*Fe;return new jt(st,at,Mt,Ft,-st*he-Mt*Oe,-at*he-Ft*Oe)},jt.prototype.applyToPoint=function(x){var E=x.x*this.sx+x.y*this.shx+this.tx,Q=x.x*this.shy+x.y*this.sy+this.ty;return new _i(E,Q)},jt.prototype.applyToRectangle=function(x){var E=this.applyToPoint(x),Q=this.applyToPoint(new _i(x.x+x.w,x.y+x.h));return new Ai(E.x,E.y,Q.x-E.x,Q.y-E.y)},jt.prototype.clone=function(){var x=this.sx,E=this.shy,Q=this.shx,ie=this.sy,he=this.tx,Oe=this.ty;return new jt(x,E,Q,ie,he,Oe)},w.Matrix=jt;var Tr=w.matrixMult=function(x,E){return E.multiply(x)},Mn=new jt(1,0,0,1,0,0);w.unitMatrix=w.identityMatrix=Mn;var Nn=function(x,E){if(!un[x]){var Q=(E instanceof Fl?"Sh":"P")+(Object.keys(rt).length+1).toString(10);E.id=Q,un[x]=Q,rt[Q]=E,nn.publish("addPattern",E)}};w.ShadingPattern=Fl,w.TilingPattern=Zu,w.addShadingPattern=function(x,E){return J("addShadingPattern()"),Nn(x,E),this},w.beginTilingPattern=function(x){J("beginTilingPattern()"),_o(x.boundingBox[0],x.boundingBox[1],x.boundingBox[2]-x.boundingBox[0],x.boundingBox[3]-x.boundingBox[1],x.matrix)},w.endTilingPattern=function(x,E){J("endTilingPattern()"),E.stream=We[q].join(`
|
|
53
|
+
`),Nn(x,E),nn.publish("endTilingPattern",E),Ra.pop().restore()};var wr,On=w.__private__.newObject=function(){var x=mr();return Sr(x,!0),x},mr=w.__private__.newObjectDeferred=function(){return ae++,me[ae]=function(){return Ee},ae},Sr=function(x,E){return E=typeof E=="boolean"&&E,me[x]=Ee,E&&Y(x+" 0 obj"),x},Xi=w.__private__.newAdditionalObject=function(){var x={objId:mr(),content:""};return ze.push(x),x},ba=mr(),oa=mr(),Ir=w.__private__.decodeColorString=function(x){var E=x.split(" ");if(E.length!==2||E[1]!=="g"&&E[1]!=="G")E.length!==5||E[4]!=="k"&&E[4]!=="K"||(E=[(1-E[0])*(1-E[3]),(1-E[1])*(1-E[3]),(1-E[2])*(1-E[3]),"r"]);else{var Q=parseFloat(E[0]);E=[Q,Q,Q,"r"]}for(var ie="#",he=0;he<3;he++)ie+=("0"+Math.floor(255*parseFloat(E[he])).toString(16)).slice(-2);return ie},Cr=w.__private__.encodeColorString=function(x){var E;typeof x=="string"&&(x={ch1:x});var Q=x.ch1,ie=x.ch2,he=x.ch3,Oe=x.ch4,Fe=x.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Q=="string"&&Q.charAt(0)!=="#"){var st=new Q5(Q);if(st.ok)Q=st.toHex();else if(!/^\d*\.?\d*$/.test(Q))throw new Error('Invalid color "'+Q+'" passed to jsPDF.encodeColorString.')}if(typeof Q=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Q)&&(Q="#"+Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]),typeof Q=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Q)){var at=parseInt(Q.substr(1),16);Q=at>>16&255,ie=at>>8&255,he=255&at}if(ie===void 0||Oe===void 0&&Q===ie&&ie===he)E=typeof Q=="string"?Q+" "+Fe[0]:x.precision===2?O(Q/255)+" "+Fe[0]:U(Q/255)+" "+Fe[0];else if(Oe===void 0||_n(Oe)==="object"){if(Oe&&!isNaN(Oe.a)&&Oe.a===0)return["1.","1.","1.",Fe[1]].join(" ");E=typeof Q=="string"?[Q,ie,he,Fe[1]].join(" "):x.precision===2?[O(Q/255),O(ie/255),O(he/255),Fe[1]].join(" "):[U(Q/255),U(ie/255),U(he/255),Fe[1]].join(" ")}else E=typeof Q=="string"?[Q,ie,he,Oe,Fe[2]].join(" "):x.precision===2?[O(Q),O(ie),O(he),O(Oe),Fe[2]].join(" "):[U(Q),U(ie),U(he),U(Oe),Fe[2]].join(" ");return E},Hr=w.__private__.getFilters=function(){return h},_r=w.__private__.putStream=function(x){var E=(x=x||{}).data||"",Q=x.filters||Hr(),ie=x.alreadyAppliedFilters||[],he=x.addLength1||!1,Oe=E.length,Fe=x.objectId,st=function(Ln){return Ln};if(y!==null&&Fe===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");y!==null&&(st=vr.encryptor(Fe,0));var at={};Q===!0&&(Q=["FlateEncode"]);var Mt=x.additionalKeyValues||[],Ft=(at=gt.API.processDataByFilters!==void 0?gt.API.processDataByFilters(E,Q):{data:E,reverseChain:[]}).reverseChain+(Array.isArray(ie)?ie.join(" "):ie.toString());if(at.data.length!==0&&(Mt.push({key:"Length",value:at.data.length}),he===!0&&Mt.push({key:"Length1",value:Oe})),Ft.length!=0)if(Ft.split("/").length-1==1)Mt.push({key:"Filter",value:Ft});else{Mt.push({key:"Filter",value:"["+Ft+"]"});for(var Jt=0;Jt<Mt.length;Jt+=1)if(Mt[Jt].key==="DecodeParms"){for(var tr=[],mn=0;mn<at.reverseChain.split("/").length-1;mn+=1)tr.push("null");tr.push(Mt[Jt].value),Mt[Jt].value="["+tr.join(" ")+"]"}}Y("<<");for(var gn=0;gn<Mt.length;gn++)Y("/"+Mt[gn].key+" "+Mt[gn].value);Y(">>"),at.data.length!==0&&(Y("stream"),Y(st(at.data)),Y("endstream"))},Rn=w.__private__.putPage=function(x){var E=x.number,Q=x.data,ie=x.objId,he=x.contentsObjId;Sr(ie,!0),Y("<</Type /Page"),Y("/Parent "+x.rootDictionaryObjId+" 0 R"),Y("/Resources "+x.resourceDictionaryObjId+" 0 R"),Y("/MediaBox ["+parseFloat(se(x.mediaBox.bottomLeftX))+" "+parseFloat(se(x.mediaBox.bottomLeftY))+" "+se(x.mediaBox.topRightX)+" "+se(x.mediaBox.topRightY)+"]"),x.cropBox!==null&&Y("/CropBox ["+se(x.cropBox.bottomLeftX)+" "+se(x.cropBox.bottomLeftY)+" "+se(x.cropBox.topRightX)+" "+se(x.cropBox.topRightY)+"]"),x.bleedBox!==null&&Y("/BleedBox ["+se(x.bleedBox.bottomLeftX)+" "+se(x.bleedBox.bottomLeftY)+" "+se(x.bleedBox.topRightX)+" "+se(x.bleedBox.topRightY)+"]"),x.trimBox!==null&&Y("/TrimBox ["+se(x.trimBox.bottomLeftX)+" "+se(x.trimBox.bottomLeftY)+" "+se(x.trimBox.topRightX)+" "+se(x.trimBox.topRightY)+"]"),x.artBox!==null&&Y("/ArtBox ["+se(x.artBox.bottomLeftX)+" "+se(x.artBox.bottomLeftY)+" "+se(x.artBox.topRightX)+" "+se(x.artBox.topRightY)+"]"),typeof x.userUnit=="number"&&x.userUnit!==1&&Y("/UserUnit "+x.userUnit),nn.publish("putPage",{objId:ie,pageContext:St[E],pageNumber:E,page:Q}),Y("/Contents "+he+" 0 R"),Y(">>"),Y("endobj");var Oe=Q.join(`
|
|
54
|
+
`);return F===W&&(Oe+=`
|
|
55
|
+
Q`),Sr(he,!0),_r({data:Oe,filters:Hr(),objectId:he}),Y("endobj"),ie},Da=w.__private__.putPages=function(){var x,E,Q=[];for(x=1;x<=Et;x++)St[x].objId=mr(),St[x].contentsObjId=mr();for(x=1;x<=Et;x++)Q.push(Rn({number:x,data:We[x],objId:St[x].objId,contentsObjId:St[x].contentsObjId,mediaBox:St[x].mediaBox,cropBox:St[x].cropBox,bleedBox:St[x].bleedBox,trimBox:St[x].trimBox,artBox:St[x].artBox,userUnit:St[x].userUnit,rootDictionaryObjId:ba,resourceDictionaryObjId:oa}));Sr(ba,!0),Y("<</Type /Pages");var ie="/Kids [";for(E=0;E<Et;E++)ie+=Q[E]+" 0 R ";Y(ie+"]"),Y("/Count "+Et),Y(">>"),Y("endobj"),nn.publish("postPutPages")},Ki=function(x){nn.publish("putFont",{font:x,out:Y,newObject:On,putStream:_r}),x.isAlreadyPutted!==!0&&(x.objectNumber=On(),Y("<<"),Y("/Type /Font"),Y("/BaseFont /"+Xu(x.postScriptName)),Y("/Subtype /Type1"),typeof x.encoding=="string"&&Y("/Encoding /"+x.encoding),Y("/FirstChar 32"),Y("/LastChar 255"),Y(">>"),Y("endobj"))},xa=function(x){x.objectNumber=On();var E=[];E.push({key:"Type",value:"/XObject"}),E.push({key:"Subtype",value:"/Form"}),E.push({key:"BBox",value:"["+[se(x.x),se(x.y),se(x.x+x.width),se(x.y+x.height)].join(" ")+"]"}),E.push({key:"Matrix",value:"["+x.matrix.toString()+"]"});var Q=x.pages[1].join(`
|
|
56
|
+
`);_r({data:Q,additionalKeyValues:E,objectId:x.objectNumber}),Y("endobj")},za=function(x,E){E||(E=21);var Q=On(),ie=(function(Fe,st){var at,Mt=[],Ft=1/(st-1);for(at=0;at<1;at+=Ft)Mt.push(at);if(Mt.push(1),Fe[0].offset!=0){var Jt={offset:0,color:Fe[0].color};Fe.unshift(Jt)}if(Fe[Fe.length-1].offset!=1){var tr={offset:1,color:Fe[Fe.length-1].color};Fe.push(tr)}for(var mn="",gn=0,Ln=0;Ln<Mt.length;Ln++){for(at=Mt[Ln];at>Fe[gn+1].offset;)gn++;var Bn=Fe[gn].offset,Pn=(at-Bn)/(Fe[gn+1].offset-Bn),Or=Fe[gn].color,Ia=Fe[gn+1].color;mn+=te(Math.round((1-Pn)*Or[0]+Pn*Ia[0]).toString(16))+te(Math.round((1-Pn)*Or[1]+Pn*Ia[1]).toString(16))+te(Math.round((1-Pn)*Or[2]+Pn*Ia[2]).toString(16))}return mn.trim()})(x.colors,E),he=[];he.push({key:"FunctionType",value:"0"}),he.push({key:"Domain",value:"[0.0 1.0]"}),he.push({key:"Size",value:"["+E+"]"}),he.push({key:"BitsPerSample",value:"8"}),he.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),he.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),_r({data:ie,additionalKeyValues:he,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Q}),Y("endobj"),x.objectNumber=On(),Y("<< /ShadingType "+x.type),Y("/ColorSpace /DeviceRGB");var Oe="/Coords ["+se(parseFloat(x.coords[0]))+" "+se(parseFloat(x.coords[1]))+" ";x.type===2?Oe+=se(parseFloat(x.coords[2]))+" "+se(parseFloat(x.coords[3])):Oe+=se(parseFloat(x.coords[2]))+" "+se(parseFloat(x.coords[3]))+" "+se(parseFloat(x.coords[4]))+" "+se(parseFloat(x.coords[5])),Y(Oe+="]"),x.matrix&&Y("/Matrix ["+x.matrix.toString()+"]"),Y("/Function "+Q+" 0 R"),Y("/Extend [true true]"),Y(">>"),Y("endobj")},fo=function(x,E){var Q=mr(),ie=On();E.push({resourcesOid:Q,objectOid:ie}),x.objectNumber=ie;var he=[];he.push({key:"Type",value:"/Pattern"}),he.push({key:"PatternType",value:"1"}),he.push({key:"PaintType",value:"1"}),he.push({key:"TilingType",value:"1"}),he.push({key:"BBox",value:"["+x.boundingBox.map(se).join(" ")+"]"}),he.push({key:"XStep",value:se(x.xStep)}),he.push({key:"YStep",value:se(x.yStep)}),he.push({key:"Resources",value:Q+" 0 R"}),x.matrix&&he.push({key:"Matrix",value:"["+x.matrix.toString()+"]"}),_r({data:x.stream,additionalKeyValues:he,objectId:x.objectNumber}),Y("endobj")},Jl=function(x){for(var E in x.objectNumber=On(),Y("<<"),x)switch(E){case"opacity":Y("/ca "+O(x[E]));break;case"stroke-opacity":Y("/CA "+O(x[E]))}Y(">>"),Y("endobj")},ho=function(x){Sr(x.resourcesOid,!0),Y("<<"),Y("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var E in Y("/Font <<"),Ye)Ye.hasOwnProperty(E)&&(_===!1||_===!0&&j.hasOwnProperty(E))&&Y("/"+E+" "+Ye[E].objectNumber+" 0 R");Y(">>")})(),(function(){if(Object.keys(rt).length>0){for(var E in Y("/Shading <<"),rt)rt.hasOwnProperty(E)&&rt[E]instanceof Fl&&rt[E].objectNumber>=0&&Y("/"+E+" "+rt[E].objectNumber+" 0 R");nn.publish("putShadingPatternDict"),Y(">>")}})(),(function(E){if(Object.keys(rt).length>0){for(var Q in Y("/Pattern <<"),rt)rt.hasOwnProperty(Q)&&rt[Q]instanceof w.TilingPattern&&rt[Q].objectNumber>=0&&rt[Q].objectNumber<E&&Y("/"+Q+" "+rt[Q].objectNumber+" 0 R");nn.publish("putTilingPatternDict"),Y(">>")}})(x.objectOid),(function(){if(Object.keys(vt).length>0){var E;for(E in Y("/ExtGState <<"),vt)vt.hasOwnProperty(E)&&vt[E].objectNumber>=0&&Y("/"+E+" "+vt[E].objectNumber+" 0 R");nn.publish("putGStateDict"),Y(">>")}})(),(function(){for(var E in Y("/XObject <<"),pn)pn.hasOwnProperty(E)&&pn[E].objectNumber>=0&&Y("/"+E+" "+pn[E].objectNumber+" 0 R");nn.publish("putXobjectDict"),Y(">>")})(),Y(">>"),Y("endobj")},eu=function(x){Je[x.fontName]=Je[x.fontName]||{},Je[x.fontName][x.fontStyle]=x.id},ks=function(x,E,Q,ie,he){var Oe={id:"F"+(Object.keys(Ye).length+1).toString(10),postScriptName:x,fontName:E,fontStyle:Q,encoding:ie,isStandardFont:he||!1,metadata:{}};return nn.publish("addFont",{font:Oe,instance:this}),Ye[Oe.id]=Oe,eu(Oe),Oe.id},Wr=w.__private__.pdfEscape=w.pdfEscape=function(x,E){return(function(Q,ie){var he,Oe,Fe,st,at,Mt,Ft,Jt,tr;if(Fe=(ie=ie||{}).sourceEncoding||"Unicode",at=ie.outputEncoding,(ie.autoencode||at)&&Ye[Ke].metadata&&Ye[Ke].metadata[Fe]&&Ye[Ke].metadata[Fe].encoding&&(st=Ye[Ke].metadata[Fe].encoding,!at&&Ye[Ke].encoding&&(at=Ye[Ke].encoding),!at&&st.codePages&&(at=st.codePages[0]),typeof at=="string"&&(at=st[at]),at)){for(Ft=!1,Mt=[],he=0,Oe=Q.length;he<Oe;he++)(Jt=at[Q.charCodeAt(he)])?Mt.push(String.fromCharCode(Jt)):Mt.push(Q[he]),Mt[he].charCodeAt(0)>>8&&(Ft=!0);Q=Mt.join("")}for(he=Q.length;Ft===void 0&&he!==0;)Q.charCodeAt(he-1)>>8&&(Ft=!0),he--;if(!Ft)return Q;for(Mt=ie.noBOM?[]:[254,255],he=0,Oe=Q.length;he<Oe;he++){if((tr=(Jt=Q.charCodeAt(he))>>8)>>8)throw new Error("Character at position "+he+" of string '"+Q+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Mt.push(tr),Mt.push(Jt-(tr<<8))}return String.fromCharCode.apply(void 0,Mt)})(x,E).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},la=w.__private__.beginPage=function(x){We[++Et]=[],St[Et]={objId:0,contentsObjId:0,userUnit:Number(d),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(x[0]),topRightY:Number(x[1])}},xi(Et),dt(We[q])},po=function(x,E){var Q,ie,he;switch(a=E||a,typeof x=="string"&&(Q=C(x.toLowerCase()),Array.isArray(Q)&&(ie=Q[0],he=Q[1])),Array.isArray(x)&&(ie=x[0]*qt,he=x[1]*qt),isNaN(ie)&&(ie=o[0],he=o[1]),(ie>14400||he>14400)&&(En.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ie=Math.min(14400,ie),he=Math.min(14400,he)),o=[ie,he],a.substr(0,1)){case"l":he>ie&&(o=[he,ie]);break;case"p":ie>he&&(o=[he,ie])}la(o),Ms(kt),Y(wi),Si!==0&&Y(Si+" J"),ns!==0&&Y(ns+" j"),nn.publish("addPage",{pageNumber:Et})},go=function(x){x>0&&x<=Et&&(We.splice(x,1),St.splice(x,1),Et--,q>Et&&(q=Et),this.setPage(q))},xi=function(x){x>0&&x<=Et&&(q=x)},mo=w.__private__.getNumberOfPages=w.getNumberOfPages=function(){return We.length-1},vo=function(x,E,Q){var ie,he=void 0;return Q=Q||{},x=x!==void 0?x:Ye[Ke].fontName,E=E!==void 0?E:Ye[Ke].fontStyle,ie=x.toLowerCase(),Je[ie]!==void 0&&Je[ie][E]!==void 0?he=Je[ie][E]:Je[x]!==void 0&&Je[x][E]!==void 0?he=Je[x][E]:Q.disableWarning===!1&&En.warn("Unable to look up font label for font '"+x+"', '"+E+"'. Refer to getFontList() for available fonts."),he||Q.noFallback||(he=Je.times[E])==null&&(he=Je.times.normal),he},ri=w.__private__.putInfo=function(){var x=On(),E=function(ie){return ie};for(var Q in y!==null&&(E=vr.encryptor(x,0)),Y("<<"),Y("/Producer ("+Wr(E("jsPDF "+gt.version))+")"),Dt)Dt.hasOwnProperty(Q)&&Dt[Q]&&Y("/"+Q.substr(0,1).toUpperCase()+Q.substr(1)+" ("+Wr(E(Dt[Q]))+")");Y("/CreationDate ("+Wr(E(Se))+")"),Y(">>"),Y("endobj")},Ns=w.__private__.putCatalog=function(x){var E=(x=x||{}).rootDictionaryObjId||ba;switch(On(),Y("<<"),Y("/Type /Catalog"),Y("/Pages "+E+" 0 R"),mt||(mt="fullwidth"),mt){case"fullwidth":Y("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Y("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Y("/OpenAction [3 0 R /Fit]");break;case"original":Y("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Q=""+mt;Q.substr(Q.length-1)==="%"&&(mt=parseInt(mt)/100),typeof mt=="number"&&Y("/OpenAction [3 0 R /XYZ null null "+O(mt)+"]")}switch(Gt||(Gt="continuous"),Gt){case"continuous":Y("/PageLayout /OneColumn");break;case"single":Y("/PageLayout /SinglePage");break;case"two":case"twoleft":Y("/PageLayout /TwoColumnLeft");break;case"tworight":Y("/PageLayout /TwoColumnRight")}ht&&Y("/PageMode /"+ht),nn.publish("putCatalog"),Y(">>"),Y("endobj")},ta=w.__private__.putTrailer=function(){Y("trailer"),Y("<<"),Y("/Size "+(ae+1)),Y("/Root "+ae+" 0 R"),Y("/Info "+(ae-1)+" 0 R"),y!==null&&Y("/Encrypt "+vr.oid+" 0 R"),Y("/ID [ <"+ee+"> <"+ee+"> ]"),Y(">>")},Qn=w.__private__.putHeader=function(){Y("%PDF-"+k),Y("%ºß¬à")},tu=w.__private__.putXRef=function(){var x="0000000000";Y("xref"),Y("0 "+(ae+1)),Y("0000000000 65535 f ");for(var E=1;E<=ae;E++)typeof me[E]=="function"?Y((x+me[E]()).slice(-10)+" 00000 n "):me[E]!==void 0?Y((x+me[E]).slice(-10)+" 00000 n "):Y("0000000000 00000 n ")},ua=w.__private__.buildDocument=function(){var x;ae=0,Ee=0,_e=[],me=[],ze=[],ba=mr(),oa=mr(),dt(_e),nn.publish("buildDocument"),Qn(),Da(),(function(){nn.publish("putAdditionalObjects");for(var Q=0;Q<ze.length;Q++){var ie=ze[Q];Sr(ie.objId,!0),Y(ie.content),Y("endobj")}nn.publish("postPutAdditionalObjects")})(),x=[],(function(){for(var Q in Ye)Ye.hasOwnProperty(Q)&&(_===!1||_===!0&&j.hasOwnProperty(Q))&&Ki(Ye[Q])})(),(function(){var Q;for(Q in vt)vt.hasOwnProperty(Q)&&Jl(vt[Q])})(),(function(){for(var Q in pn)pn.hasOwnProperty(Q)&&xa(pn[Q])})(),(function(Q){var ie;for(ie in rt)rt.hasOwnProperty(ie)&&(rt[ie]instanceof Fl?za(rt[ie]):rt[ie]instanceof Zu&&fo(rt[ie],Q))})(x),nn.publish("putResources"),x.forEach(ho),ho({resourcesOid:oa,objectOid:Number.MAX_SAFE_INTEGER}),nn.publish("postPutResources"),y!==null&&(vr.oid=On(),Y("<<"),Y("/Filter /Standard"),Y("/V "+vr.v),Y("/R "+vr.r),Y("/U <"+vr.toHexString(vr.U)+">"),Y("/O <"+vr.toHexString(vr.O)+">"),Y("/P "+vr.P),Y(">>"),Y("endobj")),ri(),Ns();var E=Ee;return tu(),ta(),Y("startxref"),Y(""+E),Y("%%EOF"),dt(We[q]),_e.join(`
|
|
57
|
+
`)},Ls=w.__private__.getBlob=function(x){return new Blob([xt(x)],{type:"application/pdf"})},Zi=function(x){for(;x.firstChild;)x.removeChild(x.firstChild)},ca=function(x){var E,Q=x.document,ie=Q.documentElement,he=Q.head,Oe=Q.body;return he||(he=Q.createElement("head"),ie.appendChild(he)),Oe||(Oe=Q.createElement("body"),ie.appendChild(Oe)),Zi(he),Zi(Oe),(E=Q.createElement("style")).appendChild(Q.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),he.appendChild(E),{document:Q,body:Oe}},Ar=w.output=w.__private__.output=(wr=function(x,E){switch(typeof(E=E||{})=="string"?E={filename:E}:E.filename=E.filename||"generated.pdf",x){case void 0:return ua();case"save":w.save(E.filename);break;case"arraybuffer":return xt(ua());case"blob":return Ls(ua());case"bloburi":case"bloburl":if(Pt.URL!==void 0&&typeof Pt.URL.createObjectURL=="function")return Pt.URL&&Pt.URL.createObjectURL(Ls(ua()))||void 0;En.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Q="",ie=ua();try{Q=tm(ie)}catch{Q=tm(unescape(encodeURIComponent(ie)))}return"data:application/pdf;filename="+encodeURIComponent(E.filename)+";base64,"+Q;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Pt)==="[object Window]"){var he="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Oe=!E.pdfObjectUrl;Oe||(he=E.pdfObjectUrl);var Fe=Pt.open();if(Fe!==null){var st=ca(Fe),at=st.document.createElement("script"),Mt=this;at.src=he,Oe&&(at.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",at.crossOrigin="anonymous"),at.onload=function(){Fe.PDFObject.embed(Mt.output("dataurlstring"),E)},st.body.appendChild(at)}return Fe}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Pt)==="[object Window]"){var Ft=E.pdfJsUrl||"examples/PDF.js/web/viewer.html",Jt=Pt.open();if(Jt!==null){var tr=ca(Jt),mn=tr.document.createElement("iframe"),gn=Ft.indexOf("?")===-1?"?":"&";Mt=this,mn.id="pdfViewer",mn.width="500px",mn.height="400px",mn.src=Ft+gn+"file=&downloadName="+encodeURIComponent(E.filename),mn.onload=function(){Jt.document.title=E.filename,mn.contentWindow.PDFViewerApplication.open(Mt.output("bloburl"))},tr.body.appendChild(mn)}return Jt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Pt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Ln=Pt.open();if(Ln!==null){var Bn=ca(Ln),Pn=Bn.document.createElement("iframe");Pn.src=this.output("datauristring",E),Bn.body.appendChild(Pn),Ln.document.title=E.filename}if(Ln||typeof safari>"u")return Ln;break;case"datauri":case"dataurl":return Pt.document.location.href=this.output("datauristring",E);default:return null}},wr.foo=function(){try{return wr.apply(this,arguments)}catch(Q){var x=Q.stack||"";~x.indexOf(" at ")&&(x=x.split(" at ")[1]);var E="Error in function "+x.split(`
|
|
58
|
+
`)[0].split("<")[0]+": "+Q.message;if(!Pt.console)throw new Error(E);Pt.console.error(E,Q),Pt.alert&&alert(E)}},wr.foo.bar=wr,wr.foo),Ba=function(x){return Array.isArray(ni)===!0&&ni.indexOf(x)>-1};switch(s){case"pt":qt=1;break;case"mm":qt=72/25.4;break;case"cm":qt=72/2.54;break;case"in":qt=72;break;case"px":qt=Ba("px_scaling")==1?.75:96/72;break;case"pc":case"em":qt=12;break;case"ex":qt=6;break;default:if(typeof s!="number")throw new Error("Invalid unit: "+s);qt=s}var vr=null;oe(),le();var yo=w.__private__.getPageInfo=w.getPageInfo=function(x){if(isNaN(x)||x%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:St[x].objId,pageNumber:x,pageContext:St[x]}},$i=w.__private__.getPageInfoByObjId=function(x){if(isNaN(x)||x%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var E in St)if(St[E].objId===x)break;return yo(E)},nu=w.__private__.getCurrentPageInfo=w.getCurrentPageInfo=function(){return{objId:St[q].objId,pageNumber:q,pageContext:St[q]}};w.addPage=function(){return po.apply(this,arguments),this},w.setPage=function(){return xi.apply(this,arguments),dt.call(this,We[q]),this},w.insertPage=function(x){return this.addPage(),this.movePage(q,x),this},w.movePage=function(x,E){var Q,ie;if(x>E){Q=We[x],ie=St[x];for(var he=x;he>E;he--)We[he]=We[he-1],St[he]=St[he-1];We[E]=Q,St[E]=ie,this.setPage(E)}else if(x<E){Q=We[x],ie=St[x];for(var Oe=x;Oe<E;Oe++)We[Oe]=We[Oe+1],St[Oe]=St[Oe+1];We[E]=Q,St[E]=ie,this.setPage(E)}return this},w.deletePage=function(){return go.apply(this,arguments),this},w.__private__.text=w.text=function(x,E,Q,ie,he){var Oe,Fe,st,at,Mt,Ft,Jt,tr,mn,gn=(ie=ie||{}).scope||this;if(typeof x=="number"&&typeof E=="number"&&(typeof Q=="string"||Array.isArray(Q))){var Ln=Q;Q=E,E=x,x=Ln}if(arguments[3]instanceof jt==0?(st=arguments[4],at=arguments[5],_n(Jt=arguments[3])==="object"&&Jt!==null||(typeof st=="string"&&(at=st,st=null),typeof Jt=="string"&&(at=Jt,Jt=null),typeof Jt=="number"&&(st=Jt,Jt=null),ie={flags:Jt,angle:st,align:at})):(J("The transform parameter of text() with a Matrix value"),mn=he),isNaN(E)||isNaN(Q)||x==null)throw new Error("Invalid arguments passed to jsPDF.text");if(x.length===0)return gn;var Bn,Pn="",Or=typeof ie.lineHeightFactor=="number"?ie.lineHeightFactor:es,Ia=gn.internal.scaleFactor;function Ni(vn){return vn=vn.split(" ").join(Array(ie.TabLen||9).join(" ")),Wr(vn,Jt)}function zs(vn){for(var an,Fn=vn.concat(),nr=[],si=Fn.length;si--;)typeof(an=Fn.shift())=="string"?nr.push(an):Array.isArray(vn)&&(an.length===1||an[1]===void 0&&an[2]===void 0)?nr.push(an[0]):nr.push([an[0],an[1],an[2]]);return nr}function rs(vn,an){var Fn;if(typeof vn=="string")Fn=an(vn)[0];else if(Array.isArray(vn)){for(var nr,si,yl=vn.concat(),Eo=[],hu=yl.length;hu--;)typeof(nr=yl.shift())=="string"?Eo.push(an(nr)[0]):Array.isArray(nr)&&typeof nr[0]=="string"&&(si=an(nr[0],nr[1],nr[2]),Eo.push([si[0],si[1],si[2]]));Fn=Eo}return Fn}var Li=!1,as=!0;if(typeof x=="string")Li=!0;else if(Array.isArray(x)){var Bs=x.concat();Fe=[];for(var Ps,Xn=Bs.length;Xn--;)(typeof(Ps=Bs.shift())!="string"||Array.isArray(Ps)&&typeof Ps[0]!="string")&&(as=!1);Li=as}if(Li===!1)throw new Error('Type of text must be string or Array. "'+x+'" is not recognized.');typeof x=="string"&&(x=x.match(/[\r?\n]/)?x.split(/\r\n|\r|\n/g):[x]);var qs=Ie/gn.internal.scaleFactor,Us=qs*(Or-1);switch(ie.baseline){case"bottom":Q-=Us;break;case"top":Q+=qs-Us;break;case"hanging":Q+=qs-2*Us;break;case"middle":Q+=qs/2-Us}if((Ft=ie.maxWidth||0)>0&&(typeof x=="string"?x=gn.splitTextToSize(x,Ft):Object.prototype.toString.call(x)==="[object Array]"&&(x=x.reduce(function(vn,an){return vn.concat(gn.splitTextToSize(an,Ft))},[]))),Oe={text:x,x:E,y:Q,options:ie,mutex:{pdfEscape:Wr,activeFontKey:Ke,fonts:Ye,activeFontSize:Ie}},nn.publish("preProcessText",Oe),x=Oe.text,st=(ie=Oe.options).angle,mn instanceof jt==0&&st&&typeof st=="number"){st*=Math.PI/180,ie.rotationDirection===0&&(st=-st),F===W&&(st=-st);var vl=Math.cos(st),Ha=Math.sin(st);mn=new jt(vl,Ha,-Ha,vl,0,0)}else st&&st instanceof jt&&(mn=st);F!==W||mn||(mn=Mn),(Mt=ie.charSpace||wa)!==void 0&&(Pn+=se(G(Mt))+` Tc
|
|
59
|
+
`,this.setCharSpace(this.getCharSpace()||0)),(tr=ie.horizontalScale)!==void 0&&(Pn+=se(100*tr)+` Tz
|
|
60
|
+
`),ie.lang;var Rr=-1,is=ie.renderingMode!==void 0?ie.renderingMode:ie.stroke,ii=gn.internal.getCurrentPageInfo().pageContext;switch(is){case 0:case!1:case"fill":Rr=0;break;case 1:case!0:case"stroke":Rr=1;break;case 2:case"fillThenStroke":Rr=2;break;case 3:case"invisible":Rr=3;break;case 4:case"fillAndAddForClipping":Rr=4;break;case 5:case"strokeAndAddPathForClipping":Rr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Rr=6;break;case 7:case"addToPathForClipping":Rr=7}var du=ii.usedRenderingMode!==void 0?ii.usedRenderingMode:-1;Rr!==-1?Pn+=Rr+` Tr
|
|
61
|
+
`:du!==-1&&(Pn+=`0 Tr
|
|
62
|
+
`),Rr!==-1&&(ii.usedRenderingMode=Rr),at=ie.align||"left";var Gr,ss=Ie*Or,jo=gn.internal.pageSize.getWidth(),os=Ye[Ke];Mt=ie.charSpace||wa,Ft=ie.maxWidth||0,Jt=Object.assign({autoencode:!0,noBOM:!0},ie.flags);var Ti=[],ko=function(vn){return gn.getStringUnitWidth(vn,{font:os,charSpace:Mt,fontSize:Ie,doKerning:!1})*Ie/Ia};if(Object.prototype.toString.call(x)==="[object Array]"){var Dr;Fe=zs(x),at!=="left"&&(Gr=Fe.map(ko));var Vr,No=0;if(at==="right"){E-=Gr[0],x=[],Xn=Fe.length;for(var ls=0;ls<Xn;ls++)ls===0?(Vr=Er(E),Dr=qa(Q)):(Vr=G(No-Gr[ls]),Dr=-ss),x.push([Fe[ls],Vr,Dr]),No=Gr[ls]}else if(at==="center"){E-=Gr[0]/2,x=[],Xn=Fe.length;for(var us=0;us<Xn;us++)us===0?(Vr=Er(E),Dr=qa(Q)):(Vr=G((No-Gr[us])/2),Dr=-ss),x.push([Fe[us],Vr,Dr]),No=Gr[us]}else if(at==="left"){x=[],Xn=Fe.length;for(var Lo=0;Lo<Xn;Lo++)x.push(Fe[Lo])}else if(at==="justify"&&os.encoding==="Identity-H"){x=[],Xn=Fe.length,Ft=Ft!==0?Ft:jo;for(var Fs=0,rn=0;rn<Xn;rn++)if(Dr=rn===0?qa(Q):-ss,Vr=rn===0?Er(E):Fs,rn<Xn-1){var Is=G((Ft-Gr[rn])/(Fe[rn].split(" ").length-1)),Wa=Fe[rn].split(" ");x.push([Wa[0]+" ",Vr,Dr]),Fs=0;for(var Sa=1;Sa<Wa.length;Sa++){var cs=(ko(Wa[Sa-1]+" "+Wa[Sa])-ko(Wa[Sa]))*Ia+Is;Sa==Wa.length-1?x.push([Wa[Sa],cs,0]):x.push([Wa[Sa]+" ",cs,0]),Fs-=cs}}else x.push([Fe[rn],Vr,Dr]);x.push(["",Fs,0])}else{if(at!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(x=[],Xn=Fe.length,Ft=Ft!==0?Ft:jo,rn=0;rn<Xn;rn++){Dr=rn===0?qa(Q):-ss,Vr=rn===0?Er(E):0;var To=Fe[rn].split(" ").length-1,Hs=To>0?(Ft-Gr[rn])/To:0;rn<Xn-1?Ti.push(se(G(Hs))):Ti.push(0),x.push([Fe[rn],Vr,Dr])}}}(typeof ie.R2L=="boolean"?ie.R2L:bt)===!0&&(x=rs(x,function(vn,an,Fn){return[vn.split("").reverse().join(""),an,Fn]})),Oe={text:x,x:E,y:Q,options:ie,mutex:{pdfEscape:Wr,activeFontKey:Ke,fonts:Ye,activeFontSize:Ie}},nn.publish("postProcessText",Oe),x=Oe.text,Bn=Oe.mutex.isHex||!1;var Co=Ye[Ke].encoding;Co!=="WinAnsiEncoding"&&Co!=="StandardEncoding"||(x=rs(x,function(vn,an,Fn){return[Ni(vn),an,Fn]})),Fe=zs(x),x=[];for(var _a,Ci,Aa,Ya=Array.isArray(Fe[0])?1:0,Ei="",ja=function(vn,an,Fn){var nr="";return Fn instanceof jt?(Fn=typeof ie.angle=="number"?Tr(Fn,new jt(1,0,0,1,vn,an)):Tr(new jt(1,0,0,1,vn,an),Fn),F===W&&(Fn=Tr(new jt(1,0,0,-1,0,0),Fn)),nr=Fn.join(" ")+` Tm
|
|
63
|
+
`):nr=se(vn)+" "+se(an)+` Td
|
|
64
|
+
`,nr},Kn=0;Kn<Fe.length;Kn++){switch(Ei="",Ya){case 1:Aa=(Bn?"<":"(")+Fe[Kn][0]+(Bn?">":")"),_a=parseFloat(Fe[Kn][1]),Ci=parseFloat(Fe[Kn][2]);break;case 0:Aa=(Bn?"<":"(")+Fe[Kn]+(Bn?">":")"),_a=Er(E),Ci=qa(Q)}Ti!==void 0&&Ti[Kn]!==void 0&&(Ei=Ti[Kn]+` Tw
|
|
65
|
+
`),Kn===0?x.push(Ei+ja(_a,Ci,mn)+Aa):Ya===0?x.push(Ei+Aa):Ya===1&&x.push(Ei+ja(_a,Ci,mn)+Aa)}x=Ya===0?x.join(` Tj
|
|
66
|
+
T* `):x.join(` Tj
|
|
67
|
+
`),x+=` Tj
|
|
68
|
+
`;var ka=`BT
|
|
69
|
+
/`;return ka+=Ke+" "+Ie+` Tf
|
|
70
|
+
`,ka+=se(Ie*Or)+` TL
|
|
71
|
+
`,ka+=Ua+`
|
|
72
|
+
`,ka+=Pn,ka+=x,Y(ka+="ET"),j[Ke]=!0,gn};var ru=w.__private__.clip=w.clip=function(x){return Y(x==="evenodd"?"W*":"W"),this};w.clipEvenOdd=function(){return ru("evenodd")},w.__private__.discardPath=w.discardPath=function(){return Y("n"),this};var Yr=w.__private__.isValidStyle=function(x){var E=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(x)!==-1&&(E=!0),E};w.__private__.setDefaultPathOperation=w.setDefaultPathOperation=function(x){return Yr(x)&&(m=x),this};var au=w.__private__.getStyle=w.getStyle=function(x){var E=m;switch(x){case"D":case"S":E="S";break;case"F":E="f";break;case"FD":case"DF":E="B";break;case"f":case"f*":case"B":case"B*":E=x}return E},Ts=w.close=function(){return Y("h"),this};w.stroke=function(){return Y("S"),this},w.fill=function(x){return Cs("f",x),this},w.fillEvenOdd=function(x){return Cs("f*",x),this},w.fillStroke=function(x){return Cs("B",x),this},w.fillStrokeEvenOdd=function(x){return Cs("B*",x),this};var Cs=function(x,E){_n(E)==="object"?fc(E,x):Y(x)},Es=function(x){x===null||F===W&&x===void 0||(x=au(x),Y(x))};function cc(x,E,Q,ie,he){var Oe=new Zu(E||this.boundingBox,Q||this.xStep,ie||this.yStep,this.gState,he||this.matrix);Oe.stream=this.stream;var Fe=x+"$$"+this.cloneIndex+++"$$";return Nn(Fe,Oe),Oe}var fc=function(x,E){var Q=un[x.key],ie=rt[Q];if(ie instanceof Fl)Y("q"),Y(bo(E)),ie.gState&&w.setGState(ie.gState),Y(x.matrix.toString()+" cm"),Y("/"+Q+" sh"),Y("Q");else if(ie instanceof Zu){var he=new jt(1,0,0,-1,0,Ds());x.matrix&&(he=he.multiply(x.matrix||Mn),Q=cc.call(ie,x.key,x.boundingBox,x.xStep,x.yStep,he).id),Y("q"),Y("/Pattern cs"),Y("/"+Q+" scn"),ie.gState&&w.setGState(ie.gState),Y(E),Y("Q")}},bo=function(x){switch(x){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"}},ai=w.moveTo=function(x,E){return Y(se(G(x))+" "+se(ne(E))+" m"),this},xo=w.lineTo=function(x,E){return Y(se(G(x))+" "+se(ne(E))+" l"),this},fa=w.curveTo=function(x,E,Q,ie,he,Oe){return Y([se(G(x)),se(ne(E)),se(G(Q)),se(ne(ie)),se(G(he)),se(ne(Oe)),"c"].join(" ")),this};w.__private__.line=w.line=function(x,E,Q,ie,he){if(isNaN(x)||isNaN(E)||isNaN(Q)||isNaN(ie)||!Yr(he))throw new Error("Invalid arguments passed to jsPDF.line");return F===K?this.lines([[Q-x,ie-E]],x,E,[1,1],he||"S"):this.lines([[Q-x,ie-E]],x,E,[1,1]).stroke()},w.__private__.lines=w.lines=function(x,E,Q,ie,he,Oe){var Fe,st,at,Mt,Ft,Jt,tr,mn,gn,Ln,Bn,Pn;if(typeof x=="number"&&(Pn=Q,Q=E,E=x,x=Pn),ie=ie||[1,1],Oe=Oe||!1,isNaN(E)||isNaN(Q)||!Array.isArray(x)||!Array.isArray(ie)||!Yr(he)||typeof Oe!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(ai(E,Q),Fe=ie[0],st=ie[1],Mt=x.length,Ln=E,Bn=Q,at=0;at<Mt;at++)(Ft=x[at]).length===2?(Ln=Ft[0]*Fe+Ln,Bn=Ft[1]*st+Bn,xo(Ln,Bn)):(Jt=Ft[0]*Fe+Ln,tr=Ft[1]*st+Bn,mn=Ft[2]*Fe+Ln,gn=Ft[3]*st+Bn,Ln=Ft[4]*Fe+Ln,Bn=Ft[5]*st+Bn,fa(Jt,tr,mn,gn,Ln,Bn));return Oe&&Ts(),Es(he),this},w.path=function(x){for(var E=0;E<x.length;E++){var Q=x[E],ie=Q.c;switch(Q.op){case"m":ai(ie[0],ie[1]);break;case"l":xo(ie[0],ie[1]);break;case"c":fa.apply(this,ie);break;case"h":Ts()}}return this},w.__private__.rect=w.rect=function(x,E,Q,ie,he){if(isNaN(x)||isNaN(E)||isNaN(Q)||isNaN(ie)||!Yr(he))throw new Error("Invalid arguments passed to jsPDF.rect");return F===K&&(ie=-ie),Y([se(G(x)),se(ne(E)),se(G(Q)),se(G(ie)),"re"].join(" ")),Es(he),this},w.__private__.triangle=w.triangle=function(x,E,Q,ie,he,Oe,Fe){if(isNaN(x)||isNaN(E)||isNaN(Q)||isNaN(ie)||isNaN(he)||isNaN(Oe)||!Yr(Fe))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Q-x,ie-E],[he-Q,Oe-ie],[x-he,E-Oe]],x,E,[1,1],Fe,!0),this},w.__private__.roundedRect=w.roundedRect=function(x,E,Q,ie,he,Oe,Fe){if(isNaN(x)||isNaN(E)||isNaN(Q)||isNaN(ie)||isNaN(he)||isNaN(Oe)||!Yr(Fe))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var st=4/3*(Math.SQRT2-1);return he=Math.min(he,.5*Q),Oe=Math.min(Oe,.5*ie),this.lines([[Q-2*he,0],[he*st,0,he,Oe-Oe*st,he,Oe],[0,ie-2*Oe],[0,Oe*st,-he*st,Oe,-he,Oe],[2*he-Q,0],[-he*st,0,-he,-Oe*st,-he,-Oe],[0,2*Oe-ie],[0,-Oe*st,he*st,-Oe,he,-Oe]],x+he,E,[1,1],Fe,!0),this},w.__private__.ellipse=w.ellipse=function(x,E,Q,ie,he){if(isNaN(x)||isNaN(E)||isNaN(Q)||isNaN(ie)||!Yr(he))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Oe=4/3*(Math.SQRT2-1)*Q,Fe=4/3*(Math.SQRT2-1)*ie;return ai(x+Q,E),fa(x+Q,E-Fe,x+Oe,E-ie,x,E-ie),fa(x-Oe,E-ie,x-Q,E-Fe,x-Q,E),fa(x-Q,E+Fe,x-Oe,E+ie,x,E+ie),fa(x+Oe,E+ie,x+Q,E+Fe,x+Q,E),Es(he),this},w.__private__.circle=w.circle=function(x,E,Q,ie){if(isNaN(x)||isNaN(E)||isNaN(Q)||!Yr(ie))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(x,E,Q,Q,ie)},w.setFont=function(x,E,Q){return Q&&(E=ke(E,Q)),Ke=vo(x,E,{disableWarning:!1}),this};var Ji=w.__private__.getFont=w.getFont=function(){return Ye[vo.apply(w,arguments)]};w.__private__.getFontList=w.getFontList=function(){var x,E,Q={};for(x in Je)if(Je.hasOwnProperty(x))for(E in Q[x]=[],Je[x])Je[x].hasOwnProperty(E)&&Q[x].push(E);return Q},w.addFont=function(x,E,Q,ie,he){var Oe=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Oe.indexOf(arguments[3])!==-1?he=arguments[3]:arguments[3]&&Oe.indexOf(arguments[3])==-1&&(Q=ke(Q,ie)),ks.call(this,x,E,Q,he=he||"Identity-H")};var es,kt=t.lineWidth||.200025,iu=w.__private__.getLineWidth=w.getLineWidth=function(){return kt},Ms=w.__private__.setLineWidth=w.setLineWidth=function(x){return kt=x,Y(se(G(x))+" w"),this};w.__private__.setLineDash=gt.API.setLineDash=gt.API.setLineDashPattern=function(x,E){if(x=x||[],E=E||0,isNaN(E)||!Array.isArray(x))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return x=x.map(function(Q){return se(G(Q))}).join(" "),E=se(G(E)),Y("["+x+"] "+E+" d"),this};var Pa=w.__private__.getLineHeight=w.getLineHeight=function(){return Ie*es};w.__private__.getLineHeight=w.getLineHeight=function(){return Ie*es};var ml=w.__private__.setLineHeightFactor=w.setLineHeightFactor=function(x){return typeof(x=x||1.15)=="number"&&(es=x),this},Os=w.__private__.getLineHeightFactor=w.getLineHeightFactor=function(){return es};ml(t.lineHeight);var Er=w.__private__.getHorizontalCoordinate=function(x){return G(x)},qa=w.__private__.getVerticalCoordinate=function(x){return F===W?x:St[q].mediaBox.topRightY-St[q].mediaBox.bottomLeftY-G(x)},wo=w.__private__.getHorizontalCoordinateString=w.getHorizontalCoordinateString=function(x){return se(Er(x))},su=w.__private__.getVerticalCoordinateString=w.getVerticalCoordinateString=function(x){return se(qa(x))},wi=t.strokeColor||"0 G";w.__private__.getStrokeColor=w.getDrawColor=function(){return Ir(wi)},w.__private__.setStrokeColor=w.setDrawColor=function(x,E,Q,ie){return wi=Cr({ch1:x,ch2:E,ch3:Q,ch4:ie,pdfColorType:"draw",precision:2}),Y(wi),this};var ts=t.fillColor||"0 g";w.__private__.getFillColor=w.getFillColor=function(){return Ir(ts)},w.__private__.setFillColor=w.setFillColor=function(x,E,Q,ie){return ts=Cr({ch1:x,ch2:E,ch3:Q,ch4:ie,pdfColorType:"fill",precision:2}),Y(ts),this};var Ua=t.textColor||"0 g",Mr=w.__private__.getTextColor=w.getTextColor=function(){return Ir(Ua)};w.__private__.setTextColor=w.setTextColor=function(x,E,Q,ie){return Ua=Cr({ch1:x,ch2:E,ch3:Q,ch4:ie,pdfColorType:"text",precision:3}),this};var wa=t.charSpace,So=w.__private__.getCharSpace=w.getCharSpace=function(){return parseFloat(wa||0)};w.__private__.setCharSpace=w.setCharSpace=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return wa=x,this};var Si=0;w.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},w.__private__.setLineCap=w.setLineCap=function(x){var E=w.CapJoinStyles[x];if(E===void 0)throw new Error("Line cap style of '"+x+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Si=E,Y(E+" J"),this};var ns=0;w.__private__.setLineJoin=w.setLineJoin=function(x){var E=w.CapJoinStyles[x];if(E===void 0)throw new Error("Line join style of '"+x+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ns=E,Y(E+" j"),this},w.__private__.setLineMiterLimit=w.__private__.setMiterLimit=w.setLineMiterLimit=w.setMiterLimit=function(x){if(x=x||0,isNaN(x))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return Y(se(G(x))+" M"),this},w.GState=Xd,w.setGState=function(x){(x=typeof x=="string"?vt[At[x]]:Rs(null,x)).equals(Tt)||(Y("/"+x.id+" gs"),Tt=x)};var Rs=function(x,E){if(!x||!At[x]){var Q=!1;for(var ie in vt)if(vt.hasOwnProperty(ie)&&vt[ie].equals(E)){Q=!0;break}if(Q)E=vt[ie];else{var he="GS"+(Object.keys(vt).length+1).toString(10);vt[he]=E,E.id=he}return x&&(At[x]=E.id),nn.publish("addGState",E),E}};w.addGState=function(x,E){return Rs(x,E),this},w.saveGraphicsState=function(){return Y("q"),Kt.push({key:Ke,size:Ie,color:Ua}),this},w.restoreGraphicsState=function(){Y("Q");var x=Kt.pop();return Ke=x.key,Ie=x.size,Ua=x.color,Tt=null,this},w.setCurrentTransformationMatrix=function(x){return Y(x.toString()+" cm"),this},w.comment=function(x){return Y("#"+x),this};var _i=function(x,E){var Q=x||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Q},set:function(Oe){isNaN(Oe)||(Q=parseFloat(Oe))}});var ie=E||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return ie},set:function(Oe){isNaN(Oe)||(ie=parseFloat(Oe))}});var he="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return he},set:function(Oe){he=Oe.toString()}}),this},Ai=function(x,E,Q,ie){_i.call(this,x,E),this.type="rect";var he=Q||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return he},set:function(Fe){isNaN(Fe)||(he=parseFloat(Fe))}});var Oe=ie||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Oe},set:function(Fe){isNaN(Fe)||(Oe=parseFloat(Fe))}}),this},ji=function(){this.page=Et,this.currentPage=q,this.pages=We.slice(0),this.pagesContext=St.slice(0),this.x=pt,this.y=zn,this.matrix=be,this.width=ou(q),this.height=Fa(q),this.outputDestination=Ve,this.id="",this.objectNumber=-1};ji.prototype.restore=function(){Et=this.page,q=this.currentPage,St=this.pagesContext,We=this.pages,pt=this.x,zn=this.y,be=this.matrix,ki(q,this.width),lu(q,this.height),Ve=this.outputDestination};var _o=function(x,E,Q,ie,he){Ra.push(new ji),Et=q=0,We=[],pt=x,zn=E,be=he,la([Q,ie])};for(var Ao in w.beginFormObject=function(x,E,Q,ie,he){return _o(x,E,Q,ie,he),this},w.endFormObject=function(x){return(function(E){if(Oa[E])Ra.pop().restore();else{var Q=new ji,ie="Xo"+(Object.keys(pn).length+1).toString(10);Q.id=ie,Oa[E]=ie,pn[ie]=Q,nn.publish("addFormObject",Q),Ra.pop().restore()}})(x),this},w.doFormObject=function(x,E){var Q=pn[Oa[x]];return Y("q"),Y(E.toString()+" cm"),Y("/"+Q.id+" Do"),Y("Q"),this},w.getFormObject=function(x){var E=pn[Oa[x]];return{x:E.x,y:E.y,width:E.width,height:E.height,matrix:E.matrix}},w.save=function(x,E){return x=x||"generated.pdf",(E=E||{}).returnPromise=E.returnPromise||!1,E.returnPromise===!1?(Ul(Ls(ua()),x),typeof Ul.unload=="function"&&Pt.setTimeout&&setTimeout(Ul.unload,911),this):new Promise(function(Q,ie){try{var he=Ul(Ls(ua()),x);typeof Ul.unload=="function"&&Pt.setTimeout&&setTimeout(Ul.unload,911),Q(he)}catch(Oe){ie(Oe.message)}})},gt.API)gt.API.hasOwnProperty(Ao)&&(Ao==="events"&>.API.events.length?(function(x,E){var Q,ie,he;for(he=E.length-1;he!==-1;he--)Q=E[he][0],ie=E[he][1],x.subscribe.apply(x,[Q].concat(typeof ie=="function"?[ie]:ie))})(nn,gt.API.events):w[Ao]=gt.API[Ao]);function ou(x){return St[x].mediaBox.topRightX-St[x].mediaBox.bottomLeftX}function ki(x,E){St[x].mediaBox.topRightX=E+St[x].mediaBox.bottomLeftX}function Fa(x){return St[x].mediaBox.topRightY-St[x].mediaBox.bottomLeftY}function lu(x,E){St[x].mediaBox.topRightY=E+St[x].mediaBox.bottomLeftY}var uu=w.getPageWidth=function(x){return ou(x=x||q)/qt},cu=w.setPageWidth=function(x,E){ki(x,E*qt)},Ds=w.getPageHeight=function(x){return Fa(x=x||q)/qt},fu=w.setPageHeight=function(x,E){lu(x,E*qt)};return w.internal={pdfEscape:Wr,getStyle:au,getFont:Ji,getFontSize:Ze,getCharSpace:So,getTextColor:Mr,getLineHeight:Pa,getLineHeightFactor:Os,getLineWidth:iu,write:Qe,getHorizontalCoordinate:Er,getVerticalCoordinate:qa,getCoordinateString:wo,getVerticalCoordinateString:su,collections:{},newObject:On,newAdditionalObject:Xi,newObjectDeferred:mr,newObjectDeferredBegin:Sr,getFilters:Hr,putStream:_r,events:nn,scaleFactor:qt,pageSize:{getWidth:function(){return uu(q)},setWidth:function(x){cu(q,x)},getHeight:function(){return Ds(q)},setHeight:function(x){fu(q,x)}},encryptionOptions:y,encryption:vr,getEncryptor:function(x){return y!==null?vr.encryptor(x,0):function(E){return E}},output:Ar,getNumberOfPages:mo,get pages(){return We},out:Y,f2:O,f3:U,getPageInfo:yo,getPageInfoByObjId:$i,getCurrentPageInfo:nu,getPDFVersion:T,Point:_i,Rectangle:Ai,Matrix:jt,hasHotfix:Ba},Object.defineProperty(w.internal.pageSize,"width",{get:function(){return uu(q)},set:function(x){cu(q,x)},enumerable:!0,configurable:!0}),Object.defineProperty(w.internal.pageSize,"height",{get:function(){return Ds(q)},set:function(x){fu(q,x)},enumerable:!0,configurable:!0}),(function(x){for(var E=0,Q=ut.length;E<Q;E++){var ie=ks.call(this,x[E][0],x[E][1],x[E][2],ut[E][3],!0);_===!1&&(j[ie]=!0);var he=x[E][0].split("-");eu({id:ie,fontName:he[0],fontStyle:he[1]||""})}nn.publish("addFonts",{fonts:Ye,dictionary:Je})}).call(w,ut),Ke="F1",po(o,a),nn.publish("initialized"),w}Qu.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},Qu.prototype.toHexString=function(t){return t.split("").map(function(n){return("0"+(255&n.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Qu.prototype.hexToBytes=function(t){for(var n=[],a=0;a<t.length;a+=2)n.push(String.fromCharCode(parseInt(t.substr(a,2),16)));return n.join("")},Qu.prototype.processOwnerPassword=function(t,n){return r0(n0(n).substr(0,5),t)},Qu.prototype.encryptor=function(t,n){var a=n0(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&n,n>>8&255)).substr(0,10);return function(s){return r0(a,s)}},Xd.prototype.equals=function(t){var n,a="id,objectNumber,equals";if(!t||_n(t)!==_n(this))return!1;var s=0;for(n in this)if(!(a.indexOf(n)>=0)){if(this.hasOwnProperty(n)&&!t.hasOwnProperty(n)||this[n]!==t[n])return!1;s++}for(n in t)t.hasOwnProperty(n)&&a.indexOf(n)<0&&s--;return s===0},gt.API={events:[]},gt.version="4.2.1";var ir=gt.API,j0=1,$l=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Gu=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xl=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(n){var a=n.charCodeAt(0).toString(16).toUpperCase();return"#"+(a.length===1?"0"+a:a)})},It=function(t){return t.toFixed(2)},il=function(t){return t.toFixed(5)};ir.__acroform__={};var Ma=function(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t},im=function(t){return t*j0},ws=function(t){var n=new $5,a=lt.internal.getHeight(t)||0,s=lt.internal.getWidth(t)||0;return n.BBox=[0,0,Number(It(s)),Number(It(a))],n},JS=ir.__acroform__.setBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<n},e8=ir.__acroform__.clearBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<n)},t8=ir.__acroform__.getBit=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<n?1:0},hr=ir.__acroform__.getBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return t8(t,n-1)},pr=ir.__acroform__.setBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return JS(t,n-1)},gr=ir.__acroform__.clearBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return e8(t,n-1)},n8=ir.__acroform__.calculateCoordinates=function(t,n){var a=n.internal.getHorizontalCoordinate,s=n.internal.getVerticalCoordinate,o=t[0],u=t[1],h=t[2],d=t[3],f={};return f.lowerLeft_X=a(o)||0,f.lowerLeft_Y=s(u+d)||0,f.upperRight_X=a(o+h)||0,f.upperRight_Y=s(u)||0,[Number(It(f.lowerLeft_X)),Number(It(f.lowerLeft_Y)),Number(It(f.upperRight_X)),Number(It(f.upperRight_Y))]},r8=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var n=[],a=t._V||t.DV,s=a0(t,a),o=t.scope.internal.getFont(t.fontName,t.fontStyle).id;n.push("/Tx BMC"),n.push("q"),n.push("BT"),n.push(t.scope.__private__.encodeColorString(t.color)),n.push("/"+o+" "+It(s.fontSize)+" Tf"),n.push("1 0 0 1 0 0 Tm"),n.push(s.text),n.push("ET"),n.push("Q"),n.push("EMC");var u=ws(t);return u.scope=t.scope,u.stream=n.join(`
|
|
73
|
+
`),u}},a0=function(t,n){var a=t.fontSize===0?t.maxFontSize:t.fontSize,s={text:"",fontSize:""},o=(n=(n=n.substr(0,1)=="("?n.substr(1):n).substr(n.length-1)==")"?n.substr(0,n.length-1):n).split(" ");o=t.multiline?o.map(function(O){return O.split(`
|
|
74
|
+
`)}):o.map(function(O){return[O]});var u=a,h=lt.internal.getHeight(t)||0;h=h<0?-h:h;var d=lt.internal.getWidth(t)||0;d=d<0?-d:d;var f=function(O,U,G){if(O+1<o.length){var ne=U+" "+o[O+1][0];return Cd(ne,t,G).width<=d-4}return!1};u++;e:for(;u>0;){n="",u--;var m,y,_=Cd("3",t,u).height,j=t.multiline?h-u:(h-_)/2,w=j+=2,k=0,T=0,D=0;if(u<=0){n=`(...) Tj
|
|
75
|
+
`,n+="% Width of Text: "+Cd(n,t,u=12).width+", FieldWidth:"+d+`
|
|
76
|
+
`;break}for(var C="",K=0,W=0;W<o.length;W++)if(o.hasOwnProperty(W)){var F=!1;if(o[W].length!==1&&D!==o[W].length-1){if((_+2)*(K+2)+2>h)continue e;C+=o[W][D],F=!0,T=W,W--}else{C=(C+=o[W][D]+" ").substr(C.length-1)==" "?C.substr(0,C.length-1):C;var $=parseInt(W),Le=f($,C,u),ke=W>=o.length-1;if(Le&&!ke){C+=" ",D=0;continue}if(Le||ke){if(ke)T=$;else if(t.multiline&&(_+2)*(K+2)+2>h)continue e}else{if(!t.multiline||(_+2)*(K+2)+2>h)continue e;T=$}}for(var se="",J=k;J<=T;J++){var pe=o[J];if(t.multiline){if(J===T){se+=pe[D]+" ",D=(D+1)%pe.length;continue}if(J===k){se+=pe[pe.length-1]+" ";continue}}se+=pe[0]+" "}switch(se=se.substr(se.length-1)==" "?se.substr(0,se.length-1):se,y=Cd(se,t,u).width,t.textAlign){case"right":m=d-y-2;break;case"center":m=(d-y)/2;break;default:m=2}n+=It(m)+" "+It(w)+` Td
|
|
77
|
+
`,n+="("+$l(se)+`) Tj
|
|
78
|
+
`,n+=-It(m)+` 0 Td
|
|
79
|
+
`,w=-(u+2),y=0,k=F?T:T+1,K++,C=""}break}return s.text=n,s.fontSize=u,s},Cd=function(t,n,a){var s=n.scope.internal.getFont(n.fontName,n.fontStyle),o=n.scope.getStringUnitWidth(t,{font:s,fontSize:parseFloat(a),charSpace:0})*parseFloat(a);return{height:n.scope.getStringUnitWidth("3",{font:s,fontSize:parseFloat(a),charSpace:0})*parseFloat(a)*1.5,width:o}},a8={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},i8=function(t,n){var a={type:"reference",object:t};n.internal.getPageInfo(t.page).pageContext.annotations.find(function(s){return s.type===a.type&&s.object===a.object})===void 0&&n.internal.getPageInfo(t.page).pageContext.annotations.push(a)},s8=function(t,n){if(n.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(Vi.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(a8)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");j0=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new J5,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(a){a.internal.events.unsubscribe(a.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete a.internal.acroformPlugin.acroFormDictionaryRoot._eventID,a.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(a){a.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var s=a.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in s)if(s.hasOwnProperty(o)){var u=s[o];u.objId=void 0,u.hasAnnotation&&i8(u,a)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(a){if(a.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");a.internal.write("/AcroForm "+a.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(a){(function(s,o){var u=!s;for(var h in s||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),s=s||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(s.hasOwnProperty(h)){var d=s[h],f=[],m=d.Rect;if(d.Rect&&(d.Rect=n8(d.Rect,o)),o.internal.newObjectDeferredBegin(d.objId,!0),d.DA=lt.createDefaultAppearanceStream(d),_n(d)==="object"&&typeof d.getKeyValueListForStream=="function"&&(f=d.getKeyValueListForStream()),d.Rect=m,d.hasAppearanceStream&&!d.appearanceStreamContent){var y=r8(d);f.push({key:"AP",value:"<</N "+y+">>"}),o.internal.acroformPlugin.xForms.push(y)}if(d.appearanceStreamContent){var _="";for(var j in d.appearanceStreamContent)if(d.appearanceStreamContent.hasOwnProperty(j)){var w=d.appearanceStreamContent[j];if(_+="/"+j+" ",_+="<<",Object.keys(w).length>=1||Array.isArray(w)){for(var h in w)if(w.hasOwnProperty(h)){var k=w[h];typeof k=="function"&&(k=k.call(o,d)),_+="/"+h+" "+k+" ",o.internal.acroformPlugin.xForms.indexOf(k)>=0||o.internal.acroformPlugin.xForms.push(k)}}else typeof(k=w)=="function"&&(k=k.call(o,d)),_+="/"+h+" "+k,o.internal.acroformPlugin.xForms.indexOf(k)>=0||o.internal.acroformPlugin.xForms.push(k);_+=">>"}f.push({key:"AP",value:`<<
|
|
80
|
+
`+_+">>"})}o.internal.putStream({additionalKeyValues:f,objectId:d.objId}),o.internal.out("endobj")}u&&(function(T,D){for(var C in T)if(T.hasOwnProperty(C)){var K=C,W=T[C];D.internal.newObjectDeferredBegin(W.objId,!0),_n(W)==="object"&&typeof W.putStream=="function"&&W.putStream(),delete T[K]}})(o.internal.acroformPlugin.xForms,o)})(a,t)}),t.internal.acroformPlugin.isInitialized=!0}},Z5=ir.__acroform__.arrayToPdfArray=function(t,n,a){var s=function(h){return h};if(Array.isArray(t)){for(var o="[",u=0;u<t.length;u++)switch(u!==0&&(o+=" "),_n(t[u])){case"boolean":case"number":case"object":o+=t[u].toString();break;case"string":t[u].substr(0,1)==="/"?o+="/"+Xl(t[u].substr(1)):(n!==void 0&&a&&(s=a.internal.getEncryptor(n)),o+="("+$l(s(t[u].toString()))+")")}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},M1=function(t,n,a){var s=function(o){return o};return n!==void 0&&a&&(s=a.internal.getEncryptor(n)),(t=t||"").toString(),"("+$l(s(t))+")"},Ss=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(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ss.prototype.toString=function(){return this.objId+" 0 R"},Ss.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Ss.prototype.getKeyValueListForStream=function(){var t=[],n=Object.getOwnPropertyNames(this).filter(function(u){return u!="content"&&u!="appearanceStreamContent"&&u!="scope"&&u!="objId"&&u.substring(0,1)!="_"});for(var a in n)if(Object.getOwnPropertyDescriptor(this,n[a]).configurable===!1){var s=n[a],o=this[s];o&&(Array.isArray(o)?t.push({key:s,value:Z5(o,this.objId,this.scope)}):o instanceof Ss?(o.scope=this.scope,t.push({key:s,value:o.objId+" 0 R"})):typeof o!="function"&&t.push({key:s,value:o}))}return t};var $5=function(){Ss.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 t,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(a){n=a}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(a){t=a.trim()},get:function(){return t||null}})};Ma($5,Ss);var J5=function(){Ss.call(this);var t,n=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return n.length>0?n:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return n}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var a=function(s){return s};return this.scope&&(a=this.scope.internal.getEncryptor(this.objId)),"("+$l(a(t))+")"}},set:function(a){t=a}})};Ma(J5,Ss);var Vi=function t(){Ss.call(this);var n=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return n},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute F supplied.');n=C}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!hr(n,3)},set:function(C){C?this.F=pr(n,3):this.F=gr(n,3)}});var a=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return a},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute Ff supplied.');a=C}});var s=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(s.length!==0)return s},set:function(C){s=C!==void 0?C:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[0])?0:s[0]},set:function(C){s[0]=C}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[1])?0:s[1]},set:function(C){s[1]=C}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[2])?0:s[2]},set:function(C){s[2]=C}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[3])?0:s[3]},set:function(C){s[3]=C}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(C){switch(C){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=C;break;default:throw new Error('Invalid value "'+C+'" for attribute FT supplied.')}}});var u=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!u||u.length<1){if(this instanceof Kd)return;u="FieldObject"+t.FieldNum++}var C=function(K){return K};return this.scope&&(C=this.scope.internal.getEncryptor(this.objId)),"("+$l(C(u))+")"},set:function(C){u=C.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return u},set:function(C){u=C}});var h="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return h},set:function(C){h=C}});var d="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return d},set:function(C){d=C}});var f=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return f},set:function(C){f=C}});var m=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return m===void 0?50/j0:m},set:function(C){m=C}});var y="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return y},set:function(C){y=C}});var _="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!_||this instanceof Kd||this instanceof Wl))return M1(_,this.objId,this.scope)},set:function(C){C=C.toString(),_=C}});var j=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(j)return this instanceof Fr==0?M1(j,this.objId,this.scope):j},set:function(C){C=C.toString(),j=this instanceof Fr==0?C.substr(0,1)==="("?Gu(C.substr(1,C.length-2)):Gu(C):C}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Fr==1?Gu(j.substr(1,j.length-1)):j},set:function(C){C=C.toString(),j=this instanceof Fr==1?"/"+Xl(C):C}});var w=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(w)return w},set:function(C){this.V=C}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof Fr==0?M1(w,this.objId,this.scope):w},set:function(C){C=C.toString(),w=this instanceof Fr==0?C.substr(0,1)==="("?Gu(C.substr(1,C.length-2)):Gu(C):C}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Fr==1?Gu(w.substr(1,w.length-1)):w},set:function(C){C=C.toString(),w=this instanceof Fr==1?"/"+Xl(C):C}}),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 k,T=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return T},set:function(C){C=!!C,T=C}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(k)return k},set:function(C){k=C}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,1)},set:function(C){C?this.Ff=pr(this.Ff,1):this.Ff=gr(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,2)},set:function(C){C?this.Ff=pr(this.Ff,2):this.Ff=gr(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,3)},set:function(C){C?this.Ff=pr(this.Ff,3):this.Ff=gr(this.Ff,3)}});var D=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(D!==null)return D},set:function(C){if([0,1,2].indexOf(C)===-1)throw new Error('Invalid value "'+C+'" for attribute Q supplied.');D=C}}),Object.defineProperty(this,"textAlign",{get:function(){var C;switch(D){case 0:default:C="left";break;case 1:C="center";break;case 2:C="right"}return C},configurable:!0,enumerable:!0,set:function(C){switch(C){case"right":case 2:D=2;break;case"center":case 1:D=1;break;default:D=0}}})};Ma(Vi,Ss);var $u=function(){Vi.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(a){t=a}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Z5(n,this.objId,this.scope)},set:function(a){var s,o;o=[],typeof(s=a)=="string"&&(o=(function(u,h,d){d||(d=1);for(var f,m=[];f=h.exec(u);)m.push(f[d]);return m})(s,/\((.*?)\)/g)),n=o}}),this.getOptions=function(){return n},this.setOptions=function(a){n=a,this.sort&&n.sort()},this.addOption=function(a){a=(a=a||"").toString(),n.push(a),this.sort&&n.sort()},this.removeOption=function(a,s){for(s=s||!1,a=(a=a||"").toString();n.indexOf(a)!==-1&&(n.splice(n.indexOf(a),1),s!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,18)},set:function(a){a?this.Ff=pr(this.Ff,18):this.Ff=gr(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,19)},set:function(a){this.combo===!0&&(a?this.Ff=pr(this.Ff,19):this.Ff=gr(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,20)},set:function(a){a?(this.Ff=pr(this.Ff,20),n.sort()):this.Ff=gr(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,22)},set:function(a){a?this.Ff=pr(this.Ff,22):this.Ff=gr(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,23)},set:function(a){a?this.Ff=pr(this.Ff,23):this.Ff=gr(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,27)},set:function(a){a?this.Ff=pr(this.Ff,27):this.Ff=gr(this.Ff,27)}}),this.hasAppearanceStream=!1};Ma($u,Vi);var Ju=function(){$u.call(this),this.fontName="helvetica",this.combo=!1};Ma(Ju,$u);var ec=function(){Ju.call(this),this.combo=!0};Ma(ec,Ju);var Dd=function(){ec.call(this),this.edit=!0};Ma(Dd,ec);var Fr=function(){Vi.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,15)},set:function(a){a?this.Ff=pr(this.Ff,15):this.Ff=gr(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,16)},set:function(a){a?this.Ff=pr(this.Ff,16):this.Ff=gr(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,17)},set:function(a){a?this.Ff=pr(this.Ff,17):this.Ff=gr(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,26)},set:function(a){a?this.Ff=pr(this.Ff,26):this.Ff=gr(this.Ff,26)}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(u){return u};if(this.scope&&(a=this.scope.internal.getEncryptor(this.objId)),Object.keys(n).length!==0){var s,o=[];for(s in o.push("<<"),n)o.push("/"+s+" ("+$l(a(n[s]))+")");return o.push(">>"),o.join(`
|
|
81
|
+
`)}},set:function(a){_n(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){var s=a==null?"":a.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),t="/"+Xl(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(a){t="/"+Xl(a)}})};Ma(Fr,Vi);var zd=function(){Fr.call(this),this.pushButton=!0};Ma(zd,Fr);var tc=function(){Fr.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n!==void 0?n:[]}})};Ma(tc,Fr);var Kd=function(){var t,n;Vi.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){t=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(o){n=o}});var a,s={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(d){return d};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var u,h=[];for(u in h.push("<<"),s)h.push("/"+u+" ("+$l(o(s[u]))+")");return h.push(">>"),h.join(`
|
|
82
|
+
`)},set:function(o){_n(o)==="object"&&(s=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return s.CA||""},set:function(o){typeof o=="string"&&(s.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return a},set:function(o){var u=o==null?"":o.toString();u.substr(0,1)==="/"&&(u=u.substr(1)),a="/"+Xl(u)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return a.substr(1,a.length-1)},set:function(o){var u=o==null?"":o.toString();u.substr(0,1)==="/"&&(u=u.substr(1)),a="/"+Xl(u)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=lt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ma(Kd,Vi),tc.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var n in this.Kids)if(this.Kids.hasOwnProperty(n)){var a=this.Kids[n];a.appearanceStreamContent=t.createAppearanceStream(a.optionName),a.caption=t.getCA()}},tc.prototype.createOption=function(t){var n=new Kd;return n.Parent=this,n.optionName=t,this.Kids.push(n),o8.call(this.scope,n),n};var Bd=function(){Fr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=lt.CheckBox.createAppearanceStream()};Ma(Bd,Fr);var Wl=function(){Vi.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,13)},set:function(n){n?this.Ff=pr(this.Ff,13):this.Ff=gr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,21)},set:function(n){n?this.Ff=pr(this.Ff,21):this.Ff=gr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,23)},set:function(n){n?this.Ff=pr(this.Ff,23):this.Ff=gr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,24)},set:function(n){n?this.Ff=pr(this.Ff,24):this.Ff=gr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,25)},set:function(n){n?this.Ff=pr(this.Ff,25):this.Ff=gr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,26)},set:function(n){n?this.Ff=pr(this.Ff,26):this.Ff=gr(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){Number.isInteger(n)&&(t=n)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ma(Wl,Vi);var Pd=function(){Wl.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,14)},set:function(t){t?this.Ff=pr(this.Ff,14):this.Ff=gr(this.Ff,14)}}),this.password=!0};Ma(Pd,Wl);var lt={CheckBox:{createAppearanceStream:function(){return{N:{On:lt.CheckBox.YesNormal},D:{On:lt.CheckBox.YesPushDown,Off:lt.CheckBox.OffPushDown}}},YesPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=[],s=t.scope.internal.getFont(t.fontName,t.fontStyle).id,o=t.scope.__private__.encodeColorString(t.color),u=a0(t,t.caption);return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),a.push("BMC"),a.push("q"),a.push("0 0 1 rg"),a.push("/"+s+" "+It(u.fontSize)+" Tf "+o),a.push("BT"),a.push(u.text),a.push("ET"),a.push("Q"),a.push("EMC"),n.stream=a.join(`
|
|
83
|
+
`),n},YesNormal:function(t){var n=ws(t);n.scope=t.scope;var a=t.scope.internal.getFont(t.fontName,t.fontStyle).id,s=t.scope.__private__.encodeColorString(t.color),o=[],u=lt.internal.getHeight(t),h=lt.internal.getWidth(t),d=a0(t,t.caption);return o.push("1 g"),o.push("0 0 "+It(h)+" "+It(u)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+It(h-1)+" "+It(u-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+a+" "+It(d.fontSize)+" Tf "+s),o.push(d.text),o.push("ET"),o.push("Q"),n.stream=o.join(`
|
|
84
|
+
`),n},OffPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=[];return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),n.stream=a.join(`
|
|
85
|
+
`),n}},RadioButton:{Circle:{createAppearanceStream:function(t){var n={D:{Off:lt.RadioButton.Circle.OffPushDown},N:{}};return n.N[t]=lt.RadioButton.Circle.YesNormal,n.D[t]=lt.RadioButton.Circle.YesPushDown,n},getCA:function(){return"l"},YesNormal:function(t){var n=ws(t);n.scope=t.scope;var a=[],s=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;s=Number((.9*s).toFixed(5));var o=lt.internal.Bezier_C,u=Number((s*o).toFixed(5));return a.push("q"),a.push("1 0 0 1 "+il(lt.internal.getWidth(t)/2)+" "+il(lt.internal.getHeight(t)/2)+" cm"),a.push(s+" 0 m"),a.push(s+" "+u+" "+u+" "+s+" 0 "+s+" c"),a.push("-"+u+" "+s+" -"+s+" "+u+" -"+s+" 0 c"),a.push("-"+s+" -"+u+" -"+u+" -"+s+" 0 -"+s+" c"),a.push(u+" -"+s+" "+s+" -"+u+" "+s+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
86
|
+
`),n},YesPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=[],s=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;s=Number((.9*s).toFixed(5));var o=Number((2*s).toFixed(5)),u=Number((o*lt.internal.Bezier_C).toFixed(5)),h=Number((s*lt.internal.Bezier_C).toFixed(5));return a.push("0.749023 g"),a.push("q"),a.push("1 0 0 1 "+il(lt.internal.getWidth(t)/2)+" "+il(lt.internal.getHeight(t)/2)+" cm"),a.push(o+" 0 m"),a.push(o+" "+u+" "+u+" "+o+" 0 "+o+" c"),a.push("-"+u+" "+o+" -"+o+" "+u+" -"+o+" 0 c"),a.push("-"+o+" -"+u+" -"+u+" -"+o+" 0 -"+o+" c"),a.push(u+" -"+o+" "+o+" -"+u+" "+o+" 0 c"),a.push("f"),a.push("Q"),a.push("0 g"),a.push("q"),a.push("1 0 0 1 "+il(lt.internal.getWidth(t)/2)+" "+il(lt.internal.getHeight(t)/2)+" cm"),a.push(s+" 0 m"),a.push(s+" "+h+" "+h+" "+s+" 0 "+s+" c"),a.push("-"+h+" "+s+" -"+s+" "+h+" -"+s+" 0 c"),a.push("-"+s+" -"+h+" -"+h+" -"+s+" 0 -"+s+" c"),a.push(h+" -"+s+" "+s+" -"+h+" "+s+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
87
|
+
`),n},OffPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=[],s=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;s=Number((.9*s).toFixed(5));var o=Number((2*s).toFixed(5)),u=Number((o*lt.internal.Bezier_C).toFixed(5));return a.push("0.749023 g"),a.push("q"),a.push("1 0 0 1 "+il(lt.internal.getWidth(t)/2)+" "+il(lt.internal.getHeight(t)/2)+" cm"),a.push(o+" 0 m"),a.push(o+" "+u+" "+u+" "+o+" 0 "+o+" c"),a.push("-"+u+" "+o+" -"+o+" "+u+" -"+o+" 0 c"),a.push("-"+o+" -"+u+" -"+u+" -"+o+" 0 -"+o+" c"),a.push(u+" -"+o+" "+o+" -"+u+" "+o+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
88
|
+
`),n}},Cross:{createAppearanceStream:function(t){var n={D:{Off:lt.RadioButton.Cross.OffPushDown},N:{}};return n.N[t]=lt.RadioButton.Cross.YesNormal,n.D[t]=lt.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(t){var n=ws(t);n.scope=t.scope;var a=[],s=lt.internal.calculateCross(t);return a.push("q"),a.push("1 1 "+It(lt.internal.getWidth(t)-2)+" "+It(lt.internal.getHeight(t)-2)+" re"),a.push("W"),a.push("n"),a.push(It(s.x1.x)+" "+It(s.x1.y)+" m"),a.push(It(s.x2.x)+" "+It(s.x2.y)+" l"),a.push(It(s.x4.x)+" "+It(s.x4.y)+" m"),a.push(It(s.x3.x)+" "+It(s.x3.y)+" l"),a.push("s"),a.push("Q"),n.stream=a.join(`
|
|
89
|
+
`),n},YesPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=lt.internal.calculateCross(t),s=[];return s.push("0.749023 g"),s.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),s.push("f"),s.push("q"),s.push("1 1 "+It(lt.internal.getWidth(t)-2)+" "+It(lt.internal.getHeight(t)-2)+" re"),s.push("W"),s.push("n"),s.push(It(a.x1.x)+" "+It(a.x1.y)+" m"),s.push(It(a.x2.x)+" "+It(a.x2.y)+" l"),s.push(It(a.x4.x)+" "+It(a.x4.y)+" m"),s.push(It(a.x3.x)+" "+It(a.x3.y)+" l"),s.push("s"),s.push("Q"),n.stream=s.join(`
|
|
90
|
+
`),n},OffPushDown:function(t){var n=ws(t);n.scope=t.scope;var a=[];return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),n.stream=a.join(`
|
|
91
|
+
`),n}}},createDefaultAppearanceStream:function(t){var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,a=t.scope.__private__.encodeColorString(t.color);return"/"+n+" "+t.fontSize+" Tf "+a}};lt.internal={Bezier_C:.551915024494,calculateCross:function(t){var n=lt.internal.getWidth(t),a=lt.internal.getHeight(t),s=Math.min(n,a);return{x1:{x:(n-s)/2,y:(a-s)/2+s},x2:{x:(n-s)/2+s,y:(a-s)/2},x3:{x:(n-s)/2,y:(a-s)/2},x4:{x:(n-s)/2+s,y:(a-s)/2+s}}}},lt.internal.getWidth=function(t){var n=0;return _n(t)==="object"&&(n=im(t.Rect[2])),n},lt.internal.getHeight=function(t){var n=0;return _n(t)==="object"&&(n=im(t.Rect[3])),n};var o8=ir.addField=function(t){if(s8(this,t),!(t instanceof Vi))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=t).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};ir.AcroFormChoiceField=$u,ir.AcroFormListBox=Ju,ir.AcroFormComboBox=ec,ir.AcroFormEditBox=Dd,ir.AcroFormButton=Fr,ir.AcroFormPushButton=zd,ir.AcroFormRadioButton=tc,ir.AcroFormCheckBox=Bd,ir.AcroFormTextField=Wl,ir.AcroFormPasswordField=Pd,ir.AcroFormAppearance=lt,ir.AcroForm={ChoiceField:$u,ListBox:Ju,ComboBox:ec,EditBox:Dd,Button:Fr,PushButton:zd,RadioButton:tc,CheckBox:Bd,TextField:Wl,PasswordField:Pd,Appearance:lt},gt.AcroForm={ChoiceField:$u,ListBox:Ju,ComboBox:ec,EditBox:Dd,Button:Fr,PushButton:zd,RadioButton:tc,CheckBox:Bd,TextField:Wl,PasswordField:Pd,Appearance:lt};gt.AcroForm;function ev(t){return t.reduce(function(n,a,s){return n[a]=s,n},{})}(function(t){var n="addImage_";t.__addimage__={};var a="UNKNOWN",s={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=t.__addimage__.getImageFileTypeByImageData=function(O,U){var G,ne,Se,ee,ce,le=a;if((U=U||a)==="RGBA"||O.data!==void 0&&O.data instanceof Uint8ClampedArray&&"height"in O&&"width"in O)return"RGBA";if(Le(O))for(ce in s)for(Se=s[ce],G=0;G<Se.length;G+=1){for(ee=!0,ne=0;ne<Se[G].length;ne+=1)if(Se[G][ne]!==void 0&&Se[G][ne]!==O[ne]){ee=!1;break}if(ee===!0){le=ce;break}}else for(ce in s)for(Se=s[ce],G=0;G<Se.length;G+=1){for(ee=!0,ne=0;ne<Se[G].length;ne+=1)if(Se[G][ne]!==void 0&&Se[G][ne]!==O.charCodeAt(ne)){ee=!1;break}if(ee===!0){le=ce;break}}return le===a&&U!==a&&(le=U),le},u=function O(U){for(var G=this.internal.write,ne=this.internal.putStream,Se=(0,this.internal.getFilters)();Se.indexOf("FlateEncode")!==-1;)Se.splice(Se.indexOf("FlateEncode"),1);U.objectId=this.internal.newObject();var ee=[];if(ee.push({key:"Type",value:"/XObject"}),ee.push({key:"Subtype",value:"/Image"}),ee.push({key:"Width",value:U.width}),ee.push({key:"Height",value:U.height}),U.colorSpace===C.INDEXED?ee.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]"}):(ee.push({key:"ColorSpace",value:"/"+U.colorSpace}),U.colorSpace===C.DEVICE_CMYK&&ee.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ee.push({key:"BitsPerComponent",value:U.bitsPerComponent}),"decodeParameters"in U&&U.decodeParameters!==void 0&&ee.push({key:"DecodeParms",value:"<<"+U.decodeParameters+">>"}),"transparency"in U&&Array.isArray(U.transparency)&&U.transparency.length>0){for(var ce="",le=0,Ne=U.transparency.length;le<Ne;le++)ce+=U.transparency[le]+" "+U.transparency[le]+" ";ee.push({key:"Mask",value:"["+ce+"]"})}U.sMask!==void 0&&ee.push({key:"SMask",value:U.objectId+1+" 0 R"});var H=U.filter!==void 0?["/"+U.filter]:void 0;if(ne({data:U.data,additionalKeyValues:ee,alreadyAppliedFilters:H,objectId:U.objectId}),G("endobj"),"sMask"in U&&U.sMask!==void 0){var oe,L=(oe=U.sMaskBitsPerComponent)!==null&&oe!==void 0?oe:U.bitsPerComponent,q={width:U.width,height:U.height,colorSpace:"DeviceGray",bitsPerComponent:L,data:U.sMask};"filter"in U&&(q.decodeParameters="/Predictor ".concat(U.predictor," /Colors 1 /BitsPerComponent ").concat(L," /Columns ").concat(U.width),q.filter=U.filter),O.call(this,q)}if(U.colorSpace===C.INDEXED){var V=this.internal.newObject();ne({data:se(new Uint8Array(U.palette)),objectId:V}),G("endobj")}},h=function(){var O=this.internal.collections[n+"images"];for(var U in O)u.call(this,O[U])},d=function(){var O,U=this.internal.collections[n+"images"],G=this.internal.write;for(var ne in U)G("/I"+(O=U[ne]).index,O.objectId,"0","R")},f=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",h),this.internal.events.subscribe("putXobjectDict",d))},m=function(){var O=this.internal.collections[n+"images"];return f.call(this),O},y=function(){return Object.keys(this.internal.collections[n+"images"]).length},_=function(O){return typeof t["process"+O.toUpperCase()]=="function"},j=function(O){return _n(O)==="object"&&O.nodeType===1},w=function(O,U){if(O.nodeName==="IMG"&&O.hasAttribute("src")){var G=""+O.getAttribute("src");if(G.indexOf("data:image/")===0)return Rd(unescape(G).split("base64,").pop());var ne=t.loadFile(G,!0);if(ne!==void 0)return ne}if(O.nodeName==="CANVAS"){if(O.width===0||O.height===0)throw new Error("Given canvas must have data. Canvas width: "+O.width+", height: "+O.height);var Se;switch(U){case"PNG":Se="image/png";break;case"WEBP":Se="image/webp";break;default:Se="image/jpeg"}return Rd(O.toDataURL(Se,1).split("base64,").pop())}},k=function(O){var U=this.internal.collections[n+"images"];if(U){for(var G in U)if(O===U[G].alias)return U[G]}},T=function(O,U,G){return O||U||(O=-96,U=-96),O<0&&(O=-1*G.width*72/O/this.internal.scaleFactor),U<0&&(U=-1*G.height*72/U/this.internal.scaleFactor),O===0&&(O=U*G.width/G.height),U===0&&(U=O*G.height/G.width),[O,U]},D=function(O,U,G,ne,Se,ee){var ce=T.call(this,G,ne,Se),le=this.internal.getCoordinateString,Ne=this.internal.getVerticalCoordinateString,H=m.call(this);if(G=ce[0],ne=ce[1],H[Se.index]=Se,ee){ee*=Math.PI/180;var oe=Math.cos(ee),L=Math.sin(ee),q=function(te){return te.toFixed(4)},V=[q(oe),q(L),q(-1*L),q(oe),0,0,"cm"]}this.internal.write("q"),ee?(this.internal.write([1,"0","0",1,le(O),Ne(U+ne),"cm"].join(" ")),this.internal.write(V.join(" ")),this.internal.write([le(G),"0","0",le(ne),"0","0","cm"].join(" "))):this.internal.write([le(G),"0","0",le(ne),le(O),Ne(U+ne),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Se.index+" Do"),this.internal.write("Q")},C=t.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"};t.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 K=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},W=t.__addimage__.sHashCode=function(O){var U,G,ne=0;if(typeof O=="string")for(G=O.length,U=0;U<G;U++)ne=(ne<<5)-ne+O.charCodeAt(U),ne|=0;else if(Le(O))for(G=O.byteLength/2,U=0;U<G;U++)ne=(ne<<5)-ne+O[U],ne|=0;return ne},F=t.__addimage__.validateStringAsBase64=function(O){(O=O||"").toString().trim();var U=!0;return O.length===0&&(U=!1),O.length%4!=0&&(U=!1),/^[A-Za-z0-9+/]+$/.test(O.substr(0,O.length-2))===!1&&(U=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(O.substr(-2))===!1&&(U=!1),U},$=t.__addimage__.extractImageFromDataUrl=function(O){if(O==null||!(O=O.trim()).startsWith("data:"))return null;var U=O.indexOf(",");return U<0?null:O.substring(0,U).trim().endsWith("base64")?O.substring(U+1):null};t.__addimage__.isArrayBuffer=function(O){return O instanceof ArrayBuffer};var Le=t.__addimage__.isArrayBufferView=function(O){return O instanceof Int8Array||O instanceof Uint8Array||O instanceof Uint8ClampedArray||O instanceof Int16Array||O instanceof Uint16Array||O instanceof Int32Array||O instanceof Uint32Array||O instanceof Float32Array||O instanceof Float64Array},ke=t.__addimage__.binaryStringToUint8Array=function(O){for(var U=O.length,G=new Uint8Array(U),ne=0;ne<U;ne++)G[ne]=O.charCodeAt(ne);return G},se=t.__addimage__.arrayBufferToBinaryString=function(O){for(var U="",G=Le(O)?O:new Uint8Array(O),ne=0;ne<G.length;ne+=8192)U+=String.fromCharCode.apply(null,G.subarray(ne,ne+8192));return U};t.addImage=function(){var O,U,G,ne,Se,ee,ce,le,Ne;if(typeof arguments[1]=="number"?(U=a,G=arguments[1],ne=arguments[2],Se=arguments[3],ee=arguments[4],ce=arguments[5],le=arguments[6],Ne=arguments[7]):(U=arguments[1],G=arguments[2],ne=arguments[3],Se=arguments[4],ee=arguments[5],ce=arguments[6],le=arguments[7],Ne=arguments[8]),_n(O=arguments[0])==="object"&&!j(O)&&"imageData"in O){var H=O;O=H.imageData,U=H.format||U||a,G=H.x||G||0,ne=H.y||ne||0,Se=H.w||H.width||Se,ee=H.h||H.height||ee,ce=H.alias||ce,le=H.compression||le,Ne=H.rotation||H.angle||Ne}var oe=this.internal.getFilters();if(le===void 0&&oe.indexOf("FlateEncode")!==-1&&(le="SLOW"),isNaN(G)||isNaN(ne))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var L=J.call(this,O,U,ce,le);return D.call(this,G,ne,Se,ee,L,Ne),this};var J=function(O,U,G,ne){var Se,ee,ce;if(typeof O=="string"&&o(O)===a){O=unescape(O);var le=pe(O,!1);(le!==""||(le=t.loadFile(O,!0))!==void 0)&&(O=le)}if(j(O)&&(O=w(O,U)),U=o(O,U),!_(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(((ce=G)==null||ce.length===0)&&(G=(function(Ne){return typeof Ne=="string"||Le(Ne)?W(Ne):Le(Ne.data)?W(Ne.data):null})(O)),(Se=k.call(this,G))||(O instanceof Uint8Array||U==="RGBA"||(ee=O,O=ke(O)),Se=this["process"+U.toUpperCase()](O,y.call(this),G,(function(Ne){return Ne&&typeof Ne=="string"&&(Ne=Ne.toUpperCase()),Ne in t.image_compression?Ne:K.NONE})(ne),ee)),!Se)throw new Error("An unknown error occurred whilst processing the image.");return Se},pe=t.__addimage__.convertBase64ToBinaryString=function(O,U){U=typeof U!="boolean"||U;var G,ne="";if(typeof O=="string"){var Se;G=(Se=$(O))!==null&&Se!==void 0?Se:O;try{ne=Rd(G)}catch(ee){if(U)throw F(G)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ee.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return ne};t.getImageProperties=function(O){var U,G,ne="";if(j(O)&&(O=w(O)),typeof O=="string"&&o(O)===a&&((ne=pe(O,!1))===""&&(ne=t.loadFile(O)||""),O=ne),G=o(O),!_(G))throw new Error("addImage does not support files of type '"+G+"', please ensure that a plugin for '"+G+"' support is added.");if(O instanceof Uint8Array||(O=ke(O)),!(U=this["process"+G.toUpperCase()](O)))throw new Error("An unknown error occurred whilst processing the image");return U.fileType=G,U}})(gt.API),(function(t){var n=function(a){if(a!==void 0&&a!="")return!0};gt.API.events.push(["addPage",function(a){this.internal.getPageInfo(a.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(a){for(var s,o,u,h=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(a.objId),m=a.pageContext.annotations,y=!1,_=0;_<m.length&&!y;_++)switch((s=m[_]).type){case"link":(n(s.options.url)||n(s.options.pageNumber))&&(y=!0);break;case"reference":case"text":case"freetext":y=!0}if(y!=0){this.internal.write("/Annots [");for(var j=0;j<m.length;j++){s=m[j];var w=this.internal.pdfEscape,k=this.internal.getEncryptor(a.objId);switch(s.type){case"reference":this.internal.write(" "+s.object.objId+" 0 R ");break;case"text":var T=this.internal.newAdditionalObject(),D=this.internal.newAdditionalObject(),C=this.internal.getEncryptor(T.objId),K=s.title||"Note";u="<</Type /Annot /Subtype /Text "+(o="/Rect ["+h(s.bounds.x)+" "+d(s.bounds.y+s.bounds.h)+" "+h(s.bounds.x+s.bounds.w)+" "+d(s.bounds.y)+"] ")+"/Contents ("+w(C(s.contents))+")",u+=" /Popup "+D.objId+" 0 R",u+=" /P "+f.objId+" 0 R",u+=" /T ("+w(C(K))+") >>",T.content=u;var W=T.objId+" 0 R";u="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+h(s.bounds.x+30)+" "+d(s.bounds.y+s.bounds.h)+" "+h(s.bounds.x+s.bounds.w+30)+" "+d(s.bounds.y)+"] ")+" /Parent "+W,s.open&&(u+=" /Open true"),u+=" >>",D.content=u,this.internal.write(T.objId,"0 R",D.objId,"0 R");break;case"freetext":o="/Rect ["+h(s.bounds.x)+" "+d(s.bounds.y)+" "+h(s.bounds.x+s.bounds.w)+" "+d(s.bounds.y+s.bounds.h)+"] ";var F="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(s.color||"#000000");u="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+w(k(s.contents))+")",u+=" /DS("+w(k(F))+")",u+=" /Border [0 0 0]",u+=" >>",this.internal.write(u);break;case"link":if(s.options.name){var $=this.annotations._nameMap[s.options.name];s.options.pageNumber=$.page,s.options.top=$.y}else s.options.top||(s.options.top=0);if(o="/Rect ["+s.finalBounds.x+" "+s.finalBounds.y+" "+s.finalBounds.w+" "+s.finalBounds.h+"] ",u="",s.options.url)u="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+w(k(s.options.url))+") >>";else if(s.options.pageNumber)switch(u="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(s.options.pageNumber).objId+" 0 R",s.options.magFactor=s.options.magFactor||"XYZ",s.options.magFactor){case"Fit":u+=" /Fit]";break;case"FitH":u+=" /FitH "+s.options.top+"]";break;case"FitV":s.options.left=s.options.left||0,u+=" /FitV "+s.options.left+"]";break;default:var Le=d(s.options.top);s.options.left=s.options.left||0,s.options.zoom===void 0&&(s.options.zoom=0),u+=" /XYZ "+s.options.left+" "+Le+" "+s.options.zoom+"]"}u!=""&&(u+=" >>",this.internal.write(u))}}this.internal.write("]")}}]),t.createAnnotation=function(a){var s=this.internal.getCurrentPageInfo();switch(a.type){case"link":this.link(a.bounds.x,a.bounds.y,a.bounds.w,a.bounds.h,a);break;case"text":case"freetext":s.pageContext.annotations.push(a)}},t.link=function(a,s,o,u,h){var d=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,m=this.internal.getVerticalCoordinateString;d.pageContext.annotations.push({finalBounds:{x:f(a),y:m(s),w:f(a+o),h:m(s+u)},options:h,type:"link"})},t.textWithLink=function(a,s,o,u){var h,d,f=this.getTextWidth(a),m=this.internal.getLineHeight()/this.internal.scaleFactor;if(u.maxWidth!==void 0){d=u.maxWidth;var y=this.splitTextToSize(a,d).length;h=Math.ceil(m*y)}else d=f,h=m;return this.text(a,s,o,u),o+=.2*m,u.align==="center"&&(s-=f/2),u.align==="right"&&(s-=f),this.link(s,o-m,d,h,u),f},t.getTextWidth=function(a){var s=this.internal.getFontSize();return this.getStringUnitWidth(a)*s/this.internal.scaleFactor}})(gt.API),(function(t){var n={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]},a={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}},s={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];t.__arabicParser__={};var u=t.__arabicParser__.isInArabicSubstitutionA=function(T){return n[T.charCodeAt(0)]!==void 0},h=t.__arabicParser__.isArabicLetter=function(T){return typeof T=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(T)},d=t.__arabicParser__.isArabicEndLetter=function(T){return h(T)&&u(T)&&n[T.charCodeAt(0)].length<=2},f=t.__arabicParser__.isArabicAlfLetter=function(T){return h(T)&&o.indexOf(T.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(T){return h(T)&&u(T)&&n[T.charCodeAt(0)].length>=1};var m=t.__arabicParser__.arabicLetterHasFinalForm=function(T){return h(T)&&u(T)&&n[T.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(T){return h(T)&&u(T)&&n[T.charCodeAt(0)].length>=3};var y=t.__arabicParser__.arabicLetterHasMedialForm=function(T){return h(T)&&u(T)&&n[T.charCodeAt(0)].length==4},_=t.__arabicParser__.resolveLigatures=function(T){var D=0,C=a,K="",W=0;for(D=0;D<T.length;D+=1)C[T.charCodeAt(D)]!==void 0?(W++,typeof(C=C[T.charCodeAt(D)])=="number"&&(K+=String.fromCharCode(C),C=a,W=0),D===T.length-1&&(C=a,K+=T.charAt(D-(W-1)),D-=W-1,W=0)):(C=a,K+=T.charAt(D-W),D-=W,W=0);return K};t.__arabicParser__.isArabicDiacritic=function(T){return T!==void 0&&s[T.charCodeAt(0)]!==void 0};var j=t.__arabicParser__.getCorrectForm=function(T,D,C){return h(T)?u(T)===!1?-1:!m(T)||!h(D)&&!h(C)||!h(C)&&d(D)||d(T)&&!h(D)||d(T)&&f(D)||d(T)&&d(D)?0:y(T)&&h(D)&&!d(D)&&h(C)&&m(C)?3:d(T)||!h(C)?1:2:-1},w=function(T){var D=0,C=0,K=0,W="",F="",$="",Le=(T=T||"").split("\\s+"),ke=[];for(D=0;D<Le.length;D+=1){for(ke.push(""),C=0;C<Le[D].length;C+=1)W=Le[D][C],F=Le[D][C-1],$=Le[D][C+1],h(W)?(K=j(W,F,$),ke[D]+=K!==-1?String.fromCharCode(n[W.charCodeAt(0)][K]):W):ke[D]+=W;ke[D]=_(ke[D])}return ke.join(" ")},k=t.__arabicParser__.processArabic=t.processArabic=function(){var T,D=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,C=[];if(Array.isArray(D)){var K=0;for(C=[],K=0;K<D.length;K+=1)Array.isArray(D[K])?C.push([w(D[K][0]),D[K][1],D[K][2]]):C.push([w(D[K])]);T=C}else T=w(D);return typeof arguments[0]=="string"?T:(arguments[0].text=T,arguments[0])};t.events.push(["preProcessText",k])})(gt.API),gt.API.autoPrint=function(t){var n;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=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 "+n+" 0 R")})),this},(function(t){var n=function(){var a=void 0;Object.defineProperty(this,"pdf",{get:function(){return a},set:function(d){a=d}});var s=150;Object.defineProperty(this,"width",{get:function(){return s},set:function(d){s=isNaN(d)||Number.isInteger(d)===!1||d<0?150:d,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=s+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(d){o=isNaN(d)||Number.isInteger(d)===!1||d<0?300:d,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var u=[];Object.defineProperty(this,"childNodes",{get:function(){return u},set:function(d){u=d}});var h={};Object.defineProperty(this,"style",{get:function(){return h},set:function(d){h=d}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(a,s){var o;if((a=a||"2d")!=="2d")return null;for(o in s)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=s[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])})(gt.API),(function(t){var n={left:0,top:0,bottom:0,right:0},a=!1,s=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({},n),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new u,this.internal.__cell__.pages=1},u=function(){var f=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return f},set:function(T){f=T}});var m=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return m},set:function(T){m=T}});var y=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return y},set:function(T){y=T}});var _=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return _},set:function(T){_=T}});var j=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return j},set:function(T){j=T}});var w=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return w},set:function(T){w=T}});var k=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return k},set:function(T){k=T}}),this};u.prototype.clone=function(){return new u(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},u.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(f){return s.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},t.getTextDimensions=function(f,m){s.call(this);var y=(m=m||{}).fontSize||this.getFontSize(),_=m.font||this.getFont(),j=m.scaleFactor||this.internal.scaleFactor,w=0,k=0,T=0,D=this;if(!Array.isArray(f)&&typeof f!="string"){if(typeof f!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");f=String(f)}var C=m.maxWidth;C>0?typeof f=="string"?f=this.splitTextToSize(f,C):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(W,F){return W.concat(D.splitTextToSize(F,C))},[])):f=Array.isArray(f)?f:[f];for(var K=0;K<f.length;K++)w<(T=this.getStringUnitWidth(f[K],{font:_})*y)&&(w=T);return w!==0&&(k=f.length),{w:w/=j,h:Math.max((k*y*this.getLineHeightFactor()-y*(this.getLineHeightFactor()-1))/j,0)}},t.cellAddPage=function(){s.call(this),this.addPage();var f=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new u(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var h=t.cell=function(){var f;f=arguments[0]instanceof u?arguments[0]:new u(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),s.call(this);var m=this.internal.__cell__.lastCell,y=this.internal.__cell__.padding,_=this.internal.__cell__.margins||n,j=this.internal.__cell__.tableHeaderRow,w=this.internal.__cell__.printHeaders;return m.lineNumber!==void 0&&(m.lineNumber===f.lineNumber?(f.x=(m.x||0)+(m.width||0),f.y=m.y||0):m.y+m.height+f.height+_.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=_.top,w&&j&&(this.printHeaderRow(f.lineNumber,!0),f.y+=j[0].height)):f.y=m.y+m.height||f.y),f.text[0]!==void 0&&(this.rect(f.x,f.y,f.width,f.height,a===!0?"FD":void 0),f.align==="right"?this.text(f.text,f.x+f.width-y,f.y+y,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+y,{align:"center",baseline:"top",maxWidth:f.width-y-y}):this.text(f.text,f.x+y,f.y+y,{align:"left",baseline:"top",maxWidth:f.width-y-y})),this.internal.__cell__.lastCell=f,this};t.table=function(f,m,y,_,j){if(s.call(this),!y)throw new Error("No data for PDF table.");var w,k,T,D,C=[],K=[],W=[],F={},$={},Le=[],ke=[],se=(j=j||{}).autoSize||!1,J=j.printHeaders!==!1,pe=j.css&&j.css["font-size"]!==void 0?16*j.css["font-size"]:j.fontSize||12,O=j.margins||Object.assign({width:this.getPageWidth()},n),U=typeof j.padding=="number"?j.padding:3,G=j.headerBackgroundColor||"#c8c8c8",ne=j.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=J,this.internal.__cell__.margins=O,this.internal.__cell__.table_font_size=pe,this.internal.__cell__.padding=U,this.internal.__cell__.headerBackgroundColor=G,this.internal.__cell__.headerTextColor=ne,this.setFontSize(pe),_==null)K=C=Object.keys(y[0]),W=C.map(function(){return"left"});else if(Array.isArray(_)&&_n(_[0])==="object")for(C=_.map(function(H){return H.name}),K=_.map(function(H){return H.prompt||H.name||""}),W=_.map(function(H){return H.align||"left"}),w=0;w<_.length;w+=1)$[_[w].name]=.7499990551181103*_[w].width;else Array.isArray(_)&&typeof _[0]=="string"&&(K=C=_,W=C.map(function(){return"left"}));if(se||Array.isArray(_)&&typeof _[0]=="string")for(w=0;w<C.length;w+=1){for(F[D=C[w]]=y.map(function(H){return H[D]}),this.setFont(void 0,"bold"),Le.push(this.getTextDimensions(K[w],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),k=F[D],this.setFont(void 0,"normal"),T=0;T<k.length;T+=1)Le.push(this.getTextDimensions(k[T],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);$[D]=Math.max.apply(null,Le)+U+U,Le=[]}if(J){var Se={};for(w=0;w<C.length;w+=1)Se[C[w]]={},Se[C[w]].text=K[w],Se[C[w]].align=W[w];var ee=d.call(this,Se,$);ke=C.map(function(H){return new u(f,m,$[H],ee,Se[H].text,void 0,Se[H].align)}),this.setTableHeaderRow(ke),this.printHeaderRow(1,!1)}var ce=_.reduce(function(H,oe){return H[oe.name]=oe.align,H},{});for(w=0;w<y.length;w+=1){"rowStart"in j&&j.rowStart instanceof Function&&j.rowStart({row:w,data:y[w]},this);var le=d.call(this,y[w],$);for(T=0;T<C.length;T+=1){var Ne=y[w][C[T]];"cellStart"in j&&j.cellStart instanceof Function&&j.cellStart({row:w,col:T,data:Ne},this),h.call(this,new u(f,m,$[C[T]],le,Ne,w+2,ce[C[T]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=m,this};var d=function(f,m){var y=this.internal.__cell__.padding,_=this.internal.__cell__.table_font_size,j=this.internal.scaleFactor;return Object.keys(f).map(function(w){var k=f[w];return this.splitTextToSize(k.hasOwnProperty("text")?k.text:k,m[w]-y-y)},this).map(function(w){return this.getLineHeightFactor()*w.length*_/j+y+y},this).reduce(function(w,k){return Math.max(w,k)},0)};t.setTableHeaderRow=function(f){s.call(this),this.internal.__cell__.tableHeaderRow=f},t.printHeaderRow=function(f,m){if(s.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var y;if(a=!0,typeof this.internal.__cell__.headerFunction=="function"){var _=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new u(_[0],_[1],_[2],_[3],void 0,-1)}this.setFont(void 0,"bold");for(var j=[],w=0;w<this.internal.__cell__.tableHeaderRow.length;w+=1){y=this.internal.__cell__.tableHeaderRow[w].clone(),m&&(y.y=this.internal.__cell__.margins.top||0,j.push(y)),y.lineNumber=f;var k=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),h.call(this,y),this.setTextColor(k)}j.length>0&&this.setTableHeaderRow(j),this.setFont(void 0,"normal"),a=!1}})(gt.API);var tv={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},nv=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],i0=ev(nv),rv=[100,200,300,400,500,600,700,800,900],l8=ev(rv);function O1(t){var n=t.family.replace(/"|'/g,"").toLowerCase(),a=(function(u){return tv[u=u||"normal"]?u:"normal"})(t.style),s=(function(u){return u?typeof u=="number"?u>=100&&u<=900&&u%100==0?u:400:/^\d00$/.test(u)?parseInt(u):u==="bold"?700:400:400})(t.weight),o=(function(u){return typeof i0[u=u||"normal"]=="number"?u:"normal"})(t.stretch);return{family:n,style:a,weight:s,stretch:o,src:t.src||[],ref:t.ref||{name:n,style:[o,a,s].join(" ")}}}function sm(t,n,a,s){var o;for(o=a;o>=0&&o<n.length;o+=s)if(t[n[o]])return t[n[o]];for(o=a;o>=0&&o<n.length;o-=s)if(t[n[o]])return t[n[o]]}var u8={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},om={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function lm(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function um(t){return t.trimLeft()}function c8(t,n){for(var a=0;a<t.length;){if(t.charAt(a)===n)return[t.substring(0,a),t.substring(a+1)];a+=1}return null}function f8(t){var n=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],t.substring(n[0].length)]}var Vu,Ed,cm,fm,dm,R1=["times"];function hm(t,n,a,s,o){var u=4,h=gm;switch(o){case gt.API.image_compression.FAST:u=1,h=pm;break;case gt.API.image_compression.MEDIUM:u=6,h=mm;break;case gt.API.image_compression.SLOW:u=9,h=vm}t=(function(f,m,y,_){for(var j,w=f.length/m,k=new Uint8Array(f.length+w),T=[d8,pm,gm,mm,vm],D=0;D<w;D+=1){var C=D*m,K=f.subarray(C,C+m);if(_)k.set(_(K,y,j),C+D);else{for(var W=T.length,F=[],$=0;$<W;$+=1)F[$]=T[$](K,y,j);var Le=p8(F.concat());k.set(F[Le],C+D)}j=K}return k})(t,n,Math.ceil(a*s/8),h);var d=$1(t,{level:u});return gt.API.__addimage__.arrayBufferToBinaryString(d)}function d8(t){var n=Array.apply([],t);return n.unshift(0),n}function pm(t,n){var a=t.length,s=[];s[0]=1;for(var o=0;o<a;o+=1){var u=t[o-n]||0;s[o+1]=t[o]-u+256&255}return s}function gm(t,n,a){var s=t.length,o=[];o[0]=2;for(var u=0;u<s;u+=1){var h=a&&a[u]||0;o[u+1]=t[u]-h+256&255}return o}function mm(t,n,a){var s=t.length,o=[];o[0]=3;for(var u=0;u<s;u+=1){var h=t[u-n]||0,d=a&&a[u]||0;o[u+1]=t[u]+256-(h+d>>>1)&255}return o}function vm(t,n,a){var s=t.length,o=[];o[0]=4;for(var u=0;u<s;u+=1){var h=h8(t[u-n]||0,a&&a[u]||0,a&&a[u-n]||0);o[u+1]=t[u]-h+256&255}return o}function h8(t,n,a){if(t===n&&n===a)return t;var s=Math.abs(n-a),o=Math.abs(t-a),u=Math.abs(t+n-a-a);return s<=o&&s<=u?t:o<=u?n:a}function p8(t){var n=t.map(function(a){return a.reduce(function(s,o){return s+Math.abs(o)},0)});return n.indexOf(Math.min.apply(null,n))}function D1(t,n,a){var s=n*a,o=Math.floor(s/8),u=16-(s-8*o+a),h=(1<<a)-1;return av(t,o)>>u&h}function ym(t,n,a,s){var o=a*s,u=Math.floor(o/8),h=16-(o-8*u+s),d=(1<<s)-1,f=(n&d)<<h;(function(m,y,_){if(y+1<m.byteLength)m.setUint16(y,_,!1);else{var j=_>>8&255;m.setUint8(y,j)}})(t,u,av(t,u)&~(d<<h)&65535|f)}function av(t,n){return n+1<t.byteLength?t.getUint16(n,!1):t.getUint8(n)<<8}function g8(t){var n=0;if(t[n++]!==71||t[n++]!==73||t[n++]!==70||t[n++]!==56||(t[n++]+1&253)!=56||t[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var a=t[n++]|t[n++]<<8,s=t[n++]|t[n++]<<8,o=t[n++],u=o>>7,h=1<<1+(7&o);t[n++],t[n++];var d=null,f=null;u&&(d=n,f=h,n+=3*h);var m=!0,y=[],_=0,j=null,w=0,k=null;for(this.width=a,this.height=s;m&&n<t.length;)switch(t[n++]){case 33:switch(t[n++]){case 255:if(t[n]!==11||t[n+1]==78&&t[n+2]==69&&t[n+3]==84&&t[n+4]==83&&t[n+5]==67&&t[n+6]==65&&t[n+7]==80&&t[n+8]==69&&t[n+9]==50&&t[n+10]==46&&t[n+11]==48&&t[n+12]==3&&t[n+13]==1&&t[n+16]==0)n+=14,k=t[n++]|t[n++]<<8,n++;else for(n+=12;;){if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}break;case 249:if(t[n++]!==4||t[n+4]!==0)throw new Error("Invalid graphics extension block.");var T=t[n++];_=t[n++]|t[n++]<<8,j=t[n++],1&T||(j=null),w=T>>2&7,n++;break;case 254:for(;;){if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}break;default:throw new Error("Unknown graphic control label: 0x"+t[n-1].toString(16))}break;case 44:var D=t[n++]|t[n++]<<8,C=t[n++]|t[n++]<<8,K=t[n++]|t[n++]<<8,W=t[n++]|t[n++]<<8,F=t[n++],$=F>>6&1,Le=1<<1+(7&F),ke=d,se=f,J=!1;F>>7&&(J=!0,ke=n,se=Le,n+=3*Le);var pe=n;for(n++;;){var O;if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}y.push({x:D,y:C,width:K,height:W,has_local_palette:J,palette_offset:ke,palette_size:se,data_offset:pe,data_length:n-pe,transparent_index:j,interlaced:!!$,delay:_,disposal:w});break;case 59:m=!1;break;default:throw new Error("Unknown gif block: 0x"+t[n-1].toString(16))}this.numFrames=function(){return y.length},this.loopCount=function(){return k},this.frameInfo=function(U){if(U<0||U>=y.length)throw new Error("Frame index out of range.");return y[U]},this.decodeAndBlitFrameBGRA=function(U,G){var ne=this.frameInfo(U),Se=ne.width*ne.height;if(Se>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ee=new Uint8Array(Se);bm(t,ne.data_offset,ee,Se);var ce=ne.palette_offset,le=ne.transparent_index;le===null&&(le=256);var Ne=ne.width,H=a-Ne,oe=Ne,L=4*(ne.y*a+ne.x),q=4*((ne.y+ne.height)*a+ne.x),V=L,te=4*H;ne.interlaced===!0&&(te+=4*a*7);for(var ae=8,me=0,_e=ee.length;me<_e;++me){var Ee=ee[me];if(oe===0&&(oe=Ne,(V+=te)>=q&&(te=4*H+4*a*(ae-1),V=L+(Ne+H)*(ae<<1),ae>>=1)),Ee===le)V+=4;else{var ze=t[ce+3*Ee],We=t[ce+3*Ee+1],Xe=t[ce+3*Ee+2];G[V++]=Xe,G[V++]=We,G[V++]=ze,G[V++]=255}--oe}},this.decodeAndBlitFrameRGBA=function(U,G){var ne=this.frameInfo(U),Se=ne.width*ne.height;if(Se>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ee=new Uint8Array(Se);bm(t,ne.data_offset,ee,Se);var ce=ne.palette_offset,le=ne.transparent_index;le===null&&(le=256);var Ne=ne.width,H=a-Ne,oe=Ne,L=4*(ne.y*a+ne.x),q=4*((ne.y+ne.height)*a+ne.x),V=L,te=4*H;ne.interlaced===!0&&(te+=4*a*7);for(var ae=8,me=0,_e=ee.length;me<_e;++me){var Ee=ee[me];if(oe===0&&(oe=Ne,(V+=te)>=q&&(te=4*H+4*a*(ae-1),V=L+(Ne+H)*(ae<<1),ae>>=1)),Ee===le)V+=4;else{var ze=t[ce+3*Ee],We=t[ce+3*Ee+1],Xe=t[ce+3*Ee+2];G[V++]=ze,G[V++]=We,G[V++]=Xe,G[V++]=255}--oe}}}function bm(t,n,a,s){for(var o=t[n++],u=1<<o,h=u+1,d=h+1,f=o+1,m=(1<<f)-1,y=0,_=0,j=0,w=t[n++],k=new Int32Array(4096),T=null;;){for(;y<16&&w!==0;)_|=t[n++]<<y,y+=8,w===1?w=t[n++]:--w;if(y<f)break;var D=_&m;if(_>>=f,y-=f,D!==u){if(D===h)break;for(var C=D<d?D:T,K=0,W=C;W>u;)W=k[W]>>8,++K;var F=W;if(j+K+(C!==D?1:0)>s)return void En.log("Warning, gif stream longer than expected.");a[j++]=F;var $=j+=K;for(C!==D&&(a[j++]=F),W=C;K--;)W=k[W],a[--$]=255&W,W>>=8;T!==null&&d<4096&&(k[d++]=T<<8|F,d>=m+1&&f<12&&(++f,m=m<<1|1)),T=D}else d=h+1,m=(1<<(f=o+1))-1,T=null}return j!==s&&En.log("Warning, gif stream shorter than expected."),a}function z1(t){var n,a,s,o,u,h=Math.floor,d=new Array(64),f=new Array(64),m=new Array(64),y=new Array(64),_=new Array(65535),j=new Array(65535),w=new Array(64),k=new Array(64),T=[],D=0,C=7,K=new Array(64),W=new Array(64),F=new Array(64),$=new Array(256),Le=new Array(2048),ke=[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],se=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],J=[0,1,2,3,4,5,6,7,8,9,10,11],pe=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],O=[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],G=[0,1,2,3,4,5,6,7,8,9,10,11],ne=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Se=[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 ee(L,q){for(var V=0,te=0,ae=new Array,me=1;me<=16;me++){for(var _e=1;_e<=L[me];_e++)ae[q[te]]=[],ae[q[te]][0]=V,ae[q[te]][1]=me,te++,V++;V*=2}return ae}function ce(L){for(var q=L[0],V=L[1]-1;V>=0;)q&1<<V&&(D|=1<<C),V--,--C<0&&(D==255?(le(255),le(0)):le(D),C=7,D=0)}function le(L){T.push(L)}function Ne(L){le(L>>8&255),le(255&L)}function H(L,q,V,te,ae){for(var me,_e=ae[0],Ee=ae[240],ze=(function(Ie,mt){var Ze,bt,ht,Wt,Gt,wt,_t,Dt,Ke,qt,pt=0;for(Ke=0;Ke<8;++Ke){Ze=Ie[pt],bt=Ie[pt+1],ht=Ie[pt+2],Wt=Ie[pt+3],Gt=Ie[pt+4],wt=Ie[pt+5],_t=Ie[pt+6];var zn=Ze+(Dt=Ie[pt+7]),be=Ze-Dt,Ye=bt+_t,Je=bt-_t,Kt=ht+wt,rt=ht-wt,un=Wt+Gt,vt=Wt-Gt,At=zn+un,Tt=zn-un,Et=Ye+Kt,St=Ye-Kt;Ie[pt]=At+Et,Ie[pt+4]=At-Et;var nn=.707106781*(St+Tt);Ie[pt+2]=Tt+nn,Ie[pt+6]=Tt-nn;var ni=.382683433*((At=vt+rt)-(St=Je+be)),pn=.5411961*At+ni,Oa=1.306562965*St+ni,Ra=.707106781*(Et=rt+Je),jt=be+Ra,Tr=be-Ra;Ie[pt+5]=Tr+pn,Ie[pt+3]=Tr-pn,Ie[pt+1]=jt+Oa,Ie[pt+7]=jt-Oa,pt+=8}for(pt=0,Ke=0;Ke<8;++Ke){Ze=Ie[pt],bt=Ie[pt+8],ht=Ie[pt+16],Wt=Ie[pt+24],Gt=Ie[pt+32],wt=Ie[pt+40],_t=Ie[pt+48];var Mn=Ze+(Dt=Ie[pt+56]),Nn=Ze-Dt,wr=bt+_t,On=bt-_t,mr=ht+wt,Sr=ht-wt,Xi=Wt+Gt,ba=Wt-Gt,oa=Mn+Xi,Ir=Mn-Xi,Cr=wr+mr,Hr=wr-mr;Ie[pt]=oa+Cr,Ie[pt+32]=oa-Cr;var _r=.707106781*(Hr+Ir);Ie[pt+16]=Ir+_r,Ie[pt+48]=Ir-_r;var Rn=.382683433*((oa=ba+Sr)-(Hr=On+Nn)),Da=.5411961*oa+Rn,Ki=1.306562965*Hr+Rn,xa=.707106781*(Cr=Sr+On),za=Nn+xa,fo=Nn-xa;Ie[pt+40]=fo+Da,Ie[pt+24]=fo-Da,Ie[pt+8]=za+Ki,Ie[pt+56]=za-Ki,pt++}for(Ke=0;Ke<64;++Ke)qt=Ie[Ke]*mt[Ke],w[Ke]=qt>0?qt+.5|0:qt-.5|0;return w})(L,q),We=0;We<64;++We)k[ke[We]]=ze[We];var Xe=k[0]-V;V=k[0],Xe==0?ce(te[0]):(ce(te[j[me=32767+Xe]]),ce(_[me]));for(var Ve=63;Ve>0&&k[Ve]==0;)Ve--;if(Ve==0)return ce(_e),V;for(var dt,Y=1;Y<=Ve;){for(var Qe=Y;k[Y]==0&&Y<=Ve;)++Y;var xt=Y-Qe;if(xt>=16){dt=xt>>4;for(var ut=1;ut<=dt;++ut)ce(Ee);xt&=15}me=32767+k[Y],ce(ae[(xt<<4)+j[me]]),ce(_[me]),Y++}return Ve!=63&&ce(_e),V}function oe(L){L=Math.min(Math.max(L,1),100),u!=L&&((function(q){for(var V=[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 ae=h((V[te]*q+50)/100);ae=Math.min(Math.max(ae,1),255),d[ke[te]]=ae}for(var me=[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],_e=0;_e<64;_e++){var Ee=h((me[_e]*q+50)/100);Ee=Math.min(Math.max(Ee,1),255),f[ke[_e]]=Ee}for(var ze=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],We=0,Xe=0;Xe<8;Xe++)for(var Ve=0;Ve<8;Ve++)m[We]=1/(d[ke[We]]*ze[Xe]*ze[Ve]*8),y[We]=1/(f[ke[We]]*ze[Xe]*ze[Ve]*8),We++})(L<50?Math.floor(5e3/L):Math.floor(200-2*L)),u=L)}this.encode=function(L,q){q&&oe(q),T=new Array,D=0,C=7,Ne(65496),Ne(65504),Ne(16),le(74),le(70),le(73),le(70),le(0),le(1),le(1),le(0),Ne(1),Ne(1),le(0),le(0),(function(){Ne(65499),Ne(132),le(0);for(var bt=0;bt<64;bt++)le(d[bt]);le(1);for(var ht=0;ht<64;ht++)le(f[ht])})(),(function(bt,ht){Ne(65472),Ne(17),le(8),Ne(ht),Ne(bt),le(3),le(1),le(17),le(0),le(2),le(17),le(1),le(3),le(17),le(1)})(L.width,L.height),(function(){Ne(65476),Ne(418),le(0);for(var bt=0;bt<16;bt++)le(se[bt+1]);for(var ht=0;ht<=11;ht++)le(J[ht]);le(16);for(var Wt=0;Wt<16;Wt++)le(pe[Wt+1]);for(var Gt=0;Gt<=161;Gt++)le(O[Gt]);le(1);for(var wt=0;wt<16;wt++)le(U[wt+1]);for(var _t=0;_t<=11;_t++)le(G[_t]);le(17);for(var Dt=0;Dt<16;Dt++)le(ne[Dt+1]);for(var Ke=0;Ke<=161;Ke++)le(Se[Ke])})(),Ne(65498),Ne(12),le(3),le(1),le(0),le(2),le(17),le(3),le(17),le(0),le(63),le(0);var V=0,te=0,ae=0;D=0,C=7,this.encode.displayName="_encode_";for(var me,_e,Ee,ze,We,Xe,Ve,dt,Y,Qe=L.data,xt=L.width,ut=L.height,Ie=4*xt,mt=0;mt<ut;){for(me=0;me<Ie;){for(We=Ie*mt+me,Ve=-1,dt=0,Y=0;Y<64;Y++)Xe=We+(dt=Y>>3)*Ie+(Ve=4*(7&Y)),mt+dt>=ut&&(Xe-=Ie*(mt+1+dt-ut)),me+Ve>=Ie&&(Xe-=me+Ve-Ie+4),_e=Qe[Xe++],Ee=Qe[Xe++],ze=Qe[Xe++],K[Y]=(Le[_e]+Le[Ee+256|0]+Le[ze+512|0]>>16)-128,W[Y]=(Le[_e+768|0]+Le[Ee+1024|0]+Le[ze+1280|0]>>16)-128,F[Y]=(Le[_e+1280|0]+Le[Ee+1536|0]+Le[ze+1792|0]>>16)-128;V=H(K,m,V,n,s),te=H(W,y,te,a,o),ae=H(F,y,ae,a,o),me+=32}mt+=8}if(C>=0){var Ze=[];Ze[1]=C+1,Ze[0]=(1<<C+1)-1,ce(Ze)}return Ne(65497),new Uint8Array(T)},t=t||50,(function(){for(var L=String.fromCharCode,q=0;q<256;q++)$[q]=L(q)})(),n=ee(se,J),a=ee(U,G),s=ee(pe,O),o=ee(ne,Se),(function(){for(var L=1,q=2,V=1;V<=15;V++){for(var te=L;te<q;te++)j[32767+te]=V,_[32767+te]=[],_[32767+te][1]=V,_[32767+te][0]=te;for(var ae=-(q-1);ae<=-L;ae++)j[32767+ae]=V,_[32767+ae]=[],_[32767+ae][1]=V,_[32767+ae][0]=q-1+ae;L<<=1,q<<=1}})(),(function(){for(var L=0;L<256;L++)Le[L]=19595*L,Le[L+256|0]=38470*L,Le[L+512|0]=7471*L+32768,Le[L+768|0]=-11059*L,Le[L+1024|0]=-21709*L,Le[L+1280|0]=32768*L+8421375,Le[L+1536|0]=-27439*L,Le[L+1792|0]=-5329*L})(),oe(t)}function Yi(t,n){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!n,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 xm(t){function n(J){if(!J)throw Error("assert :P")}function a(J,pe,O){for(var U=0;4>U;U++)if(J[pe+U]!=O.charCodeAt(U))return!0;return!1}function s(J,pe,O,U,G){for(var ne=0;ne<G;ne++)J[pe+ne]=O[U+ne]}function o(J,pe,O,U){for(var G=0;G<U;G++)J[pe+G]=O}function u(J){return new Int32Array(J)}function h(J,pe){for(var O=[],U=0;U<J;U++)O.push(new pe);return O}function d(J,pe){var O=[];return(function U(G,ne,Se){for(var ee=Se[ne],ce=0;ce<ee&&(G.push(Se.length>ne+1?[]:new pe),!(Se.length<ne+1));ce++)U(G[ce],ne+1,Se)})(O,0,J),O}var f=function(){var J=this;function pe(c,v){for(var S=1<<v-1>>>0;c&S;)S>>>=1;return S?(c&S-1)+S:c}function O(c,v,S,A,M){n(!(A%S));do c[v+(A-=S)]=M;while(0<A)}function U(c,v,S,A,M){if(n(2328>=M),512>=M)var R=u(512);else if((R=u(M))==null)return 0;return(function(z,P,I,Z,ue,Ae){var X,de,ve=P,Me=1<<I,we=u(16),De=u(16);for(n(ue!=0),n(Z!=null),n(z!=null),n(0<I),de=0;de<ue;++de){if(15<Z[de])return 0;++we[Z[de]]}if(we[0]==ue)return 0;for(De[1]=0,X=1;15>X;++X){if(we[X]>1<<X)return 0;De[X+1]=De[X]+we[X]}for(de=0;de<ue;++de)X=Z[de],0<Z[de]&&(Ae[De[X]++]=de);if(De[15]==1)return(Z=new G).g=0,Z.value=Ae[0],O(z,ve,1,Me,Z),Me;var Re,He=-1,qe=Me-1,ft=0,et=1,zt=1,tt=1<<I;for(de=0,X=1,ue=2;X<=I;++X,ue<<=1){if(et+=zt<<=1,0>(zt-=we[X]))return 0;for(;0<we[X];--we[X])(Z=new G).g=X,Z.value=Ae[de++],O(z,ve+ft,ue,tt,Z),ft=pe(ft,X)}for(X=I+1,ue=2;15>=X;++X,ue<<=1){if(et+=zt<<=1,0>(zt-=we[X]))return 0;for(;0<we[X];--we[X]){if(Z=new G,(ft&qe)!=He){for(ve+=tt,Re=1<<(He=X)-I;15>He&&!(0>=(Re-=we[He]));)++He,Re<<=1;Me+=tt=1<<(Re=He-I),z[P+(He=ft&qe)].g=Re+I,z[P+He].value=ve-P-He}Z.g=X-I,Z.value=Ae[de++],O(z,ve+(ft>>I),ue,tt,Z),ft=pe(ft,X)}}return et!=2*De[15]-1?0:Me})(c,v,S,A,M,R)}function G(){this.value=this.g=0}function ne(){this.value=this.g=0}function Se(){this.G=h(5,G),this.H=u(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=h(os,ne)}function ee(c,v,S,A){n(c!=null),n(v!=null),n(2147483648>A),c.Ca=254,c.I=0,c.b=-8,c.Ka=0,c.oa=v,c.pa=S,c.Jd=v,c.Yc=S+A,c.Zc=4<=A?S+A-4+1:S,_e(c)}function ce(c,v){for(var S=0;0<v--;)S|=ze(c,128)<<v;return S}function le(c,v){var S=ce(c,v);return Ee(c)?-S:S}function Ne(c,v,S,A){var M,R=0;for(n(c!=null),n(v!=null),n(4294967288>A),c.Sb=A,c.Ra=0,c.u=0,c.h=0,4<A&&(A=4),M=0;M<A;++M)R+=v[S+M]<<8*M;c.Ra=R,c.bb=A,c.oa=v,c.pa=S}function H(c){for(;8<=c.u&&c.bb<c.Sb;)c.Ra>>>=8,c.Ra+=c.oa[c.pa+c.bb]<<Dr-8>>>0,++c.bb,c.u-=8;te(c)&&(c.h=1,c.u=0)}function oe(c,v){if(n(0<=v),!c.h&&v<=ko){var S=V(c)&Ti[v];return c.u+=v,H(c),S}return c.h=1,c.u=0}function L(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function V(c){return c.Ra>>>(c.u&Dr-1)>>>0}function te(c){return n(c.bb<=c.Sb),c.h||c.bb==c.Sb&&c.u>Dr}function ae(c,v){c.u=v,c.h=te(c)}function me(c){c.u>=Vr&&(n(c.u>=Vr),H(c))}function _e(c){n(c!=null&&c.oa!=null),c.pa<c.Zc?(c.I=(c.oa[c.pa++]|c.I<<8)>>>0,c.b+=8):(n(c!=null&&c.oa!=null),c.pa<c.Yc?(c.b+=8,c.I=c.oa[c.pa++]|c.I<<8):c.Ka?c.b=0:(c.I<<=8,c.b+=8,c.Ka=1))}function Ee(c){return ce(c,1)}function ze(c,v){var S=c.Ca;0>c.b&&_e(c);var A=c.b,M=S*v>>>8,R=(c.I>>>A>M)+0;for(R?(S-=M,c.I-=M+1<<A>>>0):S=M+1,A=S,M=0;256<=A;)M+=8,A>>=8;return A=7^M+No[A],c.b-=A,c.Ca=(S<<A)-1,R}function We(c,v,S){c[v+0]=S>>24&255,c[v+1]=S>>16&255,c[v+2]=S>>8&255,c[v+3]=255&S}function Xe(c,v){return c[v+0]|c[v+1]<<8}function Ve(c,v){return Xe(c,v)|c[v+2]<<16}function dt(c,v){return Xe(c,v)|Xe(c,v+2)<<16}function Y(c,v){var S=1<<v;return n(c!=null),n(0<v),c.X=u(S),c.X==null?0:(c.Mb=32-v,c.Xa=v,1)}function Qe(c,v){n(c!=null),n(v!=null),n(c.Xa==v.Xa),s(v.X,0,c.X,0,1<<v.Xa)}function xt(){this.X=[],this.Xa=this.Mb=0}function ut(c,v,S,A){n(S!=null),n(A!=null);var M=S[0],R=A[0];return M==0&&(M=(c*R+v/2)/v),R==0&&(R=(v*M+c/2)/c),0>=M||0>=R?0:(S[0]=M,A[0]=R,1)}function Ie(c,v){return c+(1<<v)-1>>>v}function mt(c,v){return((4278255360&c)+(4278255360&v)>>>0&4278255360)+((16711935&c)+(16711935&v)>>>0&16711935)>>>0}function Ze(c,v){J[v]=function(S,A,M,R,z,P,I){var Z;for(Z=0;Z<z;++Z){var ue=J[c](P[I+Z-1],M,R+Z);P[I+Z]=mt(S[A+Z],ue)}}}function bt(){this.ud=this.hd=this.jd=0}function ht(c,v){return((4278124286&(c^v))>>>1)+(c&v)>>>0}function Wt(c){return 0<=c&&256>c?c:0>c?0:255<c?255:void 0}function Gt(c,v){return Wt(c+(c-v+.5>>1))}function wt(c,v,S){return Math.abs(v-S)-Math.abs(c-S)}function _t(c,v,S,A,M,R,z){for(A=R[z-1],S=0;S<M;++S)R[z+S]=A=mt(c[v+S],A)}function Dt(c,v,S,A,M){var R;for(R=0;R<S;++R){var z=c[v+R],P=z>>8&255,I=16711935&(I=(I=16711935&z)+((P<<16)+P));A[M+R]=(4278255360&z)+I>>>0}}function Ke(c,v){v.jd=255&c,v.hd=c>>8&255,v.ud=c>>16&255}function qt(c,v,S,A,M,R){var z;for(z=0;z<A;++z){var P=v[S+z],I=P>>>8,Z=P,ue=255&(ue=(ue=P>>>16)+((c.jd<<24>>24)*(I<<24>>24)>>>5));Z=255&(Z=(Z+=(c.hd<<24>>24)*(I<<24>>24)>>>5)+((c.ud<<24>>24)*(ue<<24>>24)>>>5)),M[R+z]=(4278255360&P)+(ue<<16)+Z}}function pt(c,v,S,A,M){J[v]=function(R,z,P,I,Z,ue,Ae,X,de){for(I=Ae;I<X;++I)for(Ae=0;Ae<de;++Ae)Z[ue++]=M(P[A(R[z++])])},J[c]=function(R,z,P,I,Z,ue,Ae){var X=8>>R.b,de=R.Ea,ve=R.K[0],Me=R.w;if(8>X)for(R=(1<<R.b)-1,Me=(1<<X)-1;z<P;++z){var we,De=0;for(we=0;we<de;++we)we&R||(De=A(I[Z++])),ue[Ae++]=M(ve[De&Me]),De>>=X}else J["VP8LMapColor"+S](I,Z,ve,Me,ue,Ae,z,P,de)}}function zn(c,v,S,A,M){for(S=v+S;v<S;){var R=c[v++];A[M++]=R>>16&255,A[M++]=R>>8&255,A[M++]=255&R}}function be(c,v,S,A,M){for(S=v+S;v<S;){var R=c[v++];A[M++]=R>>16&255,A[M++]=R>>8&255,A[M++]=255&R,A[M++]=R>>24&255}}function Ye(c,v,S,A,M){for(S=v+S;v<S;){var R=(z=c[v++])>>16&240|z>>12&15,z=240&z|z>>28&15;A[M++]=R,A[M++]=z}}function Je(c,v,S,A,M){for(S=v+S;v<S;){var R=(z=c[v++])>>16&248|z>>13&7,z=z>>5&224|z>>3&31;A[M++]=R,A[M++]=z}}function Kt(c,v,S,A,M){for(S=v+S;v<S;){var R=c[v++];A[M++]=255&R,A[M++]=R>>8&255,A[M++]=R>>16&255}}function rt(c,v,S,A,M,R){if(R==0)for(S=v+S;v<S;)We(A,((R=c[v++])[0]>>24|R[1]>>8&65280|R[2]<<8&16711680|R[3]<<24)>>>0),M+=32;else s(A,M,c,v,S)}function un(c,v){J[v][0]=J[c+"0"],J[v][1]=J[c+"1"],J[v][2]=J[c+"2"],J[v][3]=J[c+"3"],J[v][4]=J[c+"4"],J[v][5]=J[c+"5"],J[v][6]=J[c+"6"],J[v][7]=J[c+"7"],J[v][8]=J[c+"8"],J[v][9]=J[c+"9"],J[v][10]=J[c+"10"],J[v][11]=J[c+"11"],J[v][12]=J[c+"12"],J[v][13]=J[c+"13"],J[v][14]=J[c+"0"],J[v][15]=J[c+"0"]}function vt(c){return c==Sl||c==fs||c==Oi||c==Ro}function At(){this.eb=[],this.size=this.A=this.fb=0}function Tt(){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 Et(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new At,this.f.kb=new Tt,this.sd=null}function St(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function nn(){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 ni(c){return alert("todo:WebPSamplerProcessPlane"),c.T}function pn(c,v){var S=c.T,A=v.ba.f.RGBA,M=A.eb,R=A.fb+c.ka*A.A,z=br[v.ba.S],P=c.y,I=c.O,Z=c.f,ue=c.N,Ae=c.ea,X=c.W,de=v.cc,ve=v.dc,Me=v.Mc,we=v.Nc,De=c.ka,Re=c.ka+c.T,He=c.U,qe=He+1>>1;for(De==0?z(P,I,null,null,Z,ue,Ae,X,Z,ue,Ae,X,M,R,null,null,He):(z(v.ec,v.fc,P,I,de,ve,Me,we,Z,ue,Ae,X,M,R-A.A,M,R,He),++S);De+2<Re;De+=2)de=Z,ve=ue,Me=Ae,we=X,ue+=c.Rc,X+=c.Rc,R+=2*A.A,z(P,(I+=2*c.fa)-c.fa,P,I,de,ve,Me,we,Z,ue,Ae,X,M,R-A.A,M,R,He);return I+=c.fa,c.j+Re<c.o?(s(v.ec,v.fc,P,I,He),s(v.cc,v.dc,Z,ue,qe),s(v.Mc,v.Nc,Ae,X,qe),S--):1&Re||z(P,I,null,null,Z,ue,Ae,X,Z,ue,Ae,X,M,R+A.A,null,null,He),S}function Oa(c,v,S){var A=c.F,M=[c.J];if(A!=null){var R=c.U,z=v.ba.S,P=z==Vs||z==Oi;v=v.ba.f.RGBA;var I=[0],Z=c.ka;I[0]=c.T,c.Kb&&(Z==0?--I[0]:(--Z,M[0]-=c.width),c.j+c.ka+c.T==c.o&&(I[0]=c.o-c.j-Z));var ue=v.eb;Z=v.fb+Z*v.A,c=ha(A,M[0],c.width,R,I,ue,Z+(P?0:3),v.A),n(S==I),c&&vt(z)&&Mo(ue,Z,P,R,I,v.A)}return 0}function Ra(c){var v=c.ma,S=v.ba.S,A=11>S,M=S==Oo||S==wl||S==Vs||S==Mi||S==12||vt(S);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!Gr(v.Oa,c,M?11:12))return 0;if(M&&vt(S)&&Ia(),c.da)alert("todo:use_scaling");else{if(A){if(v.Ib=ni,c.Kb){if(S=c.U+1>>1,v.memory=u(c.U+2*S),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+c.U,v.Mc=v.cc,v.Nc=v.dc+S,v.Ib=pn,Ia()}}else alert("todo:EmitYUV");M&&(v.Jb=Oa,A&&Pn())}if(A&&!Lf){for(c=0;256>c;++c)nh[c]=89858*(c-128)+or>>fi,jl[c]=-22014*(c-128)+or,gc[c]=-45773*(c-128),lr[c]=113618*(c-128)+or>>fi;for(c=ps;c<_u;++c)v=76283*(c-16)+or>>fi,kl[c-ps]=ri(v,255),mc[c-ps]=ri(v+8>>4,15);Lf=1}return 1}function jt(c){var v=c.ma,S=c.U,A=c.T;return n(!(1&c.ka)),0>=S||0>=A?0:(S=v.Ib(c,v),v.Jb!=null&&v.Jb(c,v,S),v.Dc+=S,1)}function Tr(c){c.ma.memory=null}function Mn(c,v,S,A){return oe(c,8)!=47?0:(v[0]=oe(c,14)+1,S[0]=oe(c,14)+1,A[0]=oe(c,1),oe(c,3)!=0?0:!c.h)}function Nn(c,v){if(4>c)return c+1;var S=c-2>>1;return(2+(1&c)<<S)+oe(v,S)+1}function wr(c,v){return 120<v?v-120:1<=(S=((S=Di[v-1])>>4)*c+(8-(15&S)))?S:1;var S}function On(c,v,S){var A=V(S),M=c[v+=255&A].g-8;return 0<M&&(ae(S,S.u+8),A=V(S),v+=c[v].value,v+=A&(1<<M)-1),ae(S,S.u+c[v].g),c[v].value}function mr(c,v,S){return S.g+=c.g,S.value+=c.value<<v>>>0,n(8>=S.g),c.g}function Sr(c,v,S){var A=c.xc;return n((v=A==0?0:c.vc[c.md*(S>>A)+(v>>A)])<c.Wb),c.Ya[v]}function Xi(c,v,S,A){var M=c.ab,R=c.c*v,z=c.C;v=z+v;var P=S,I=A;for(A=c.Ta,S=c.Ua;0<M--;){var Z=c.gc[M],ue=z,Ae=v,X=P,de=I,ve=(I=A,P=S,Z.Ea);switch(n(ue<Ae),n(Ae<=Z.nc),Z.hc){case 2:Lo(X,de,(Ae-ue)*ve,I,P);break;case 0:var Me=ue,we=Ae,De=I,Re=P,He=(tt=Z).Ea;Me==0&&(ls(X,de,null,null,1,De,Re),_t(X,de+1,0,0,He-1,De,Re+1),de+=He,Re+=He,++Me);for(var qe=1<<tt.b,ft=qe-1,et=Ie(He,tt.b),zt=tt.K,tt=tt.w+(Me>>tt.b)*et;Me<we;){var Qt=zt,rr=tt,Ot=1;for(us(X,de,De,Re-He,1,De,Re);Ot<He;){var nt=(Ot&~ft)+qe;nt>He&&(nt=He),(0,Sa[Qt[rr++]>>8&15])(X,de+ +Ot,De,Re+Ot-He,nt-Ot,De,Re+Ot),Ot=nt}de+=He,Re+=He,++Me&ft||(tt+=et)}Ae!=Z.nc&&s(I,P-ve,I,P+(Ae-ue-1)*ve,ve);break;case 1:for(ve=X,we=de,He=(X=Z.Ea)-(Re=X&~(De=(de=1<<Z.b)-1)),Me=Ie(X,Z.b),qe=Z.K,Z=Z.w+(ue>>Z.b)*Me;ue<Ae;){for(ft=qe,et=Z,zt=new bt,tt=we+Re,Qt=we+X;we<tt;)Ke(ft[et++],zt),cs(zt,ve,we,de,I,P),we+=de,P+=de;we<Qt&&(Ke(ft[et++],zt),cs(zt,ve,we,He,I,P),we+=He,P+=He),++ue&De||(Z+=Me)}break;case 3:if(X==I&&de==P&&0<Z.b){for(we=I,X=ve=P+(Ae-ue)*ve-(Re=(Ae-ue)*Ie(Z.Ea,Z.b)),de=I,De=P,Me=[],Re=(He=Re)-1;0<=Re;--Re)Me[Re]=de[De+Re];for(Re=He-1;0<=Re;--Re)we[X+Re]=Me[Re];Fs(Z,ue,Ae,I,ve,I,P)}else Fs(Z,ue,Ae,X,de,I,P)}P=A,I=S}I!=S&&s(A,S,P,I,R)}function ba(c,v){var S=c.V,A=c.Ba+c.c*c.C,M=v-c.C;if(n(v<=c.l.o),n(16>=M),0<M){var R=c.l,z=c.Ta,P=c.Ua,I=R.width;if(Xi(c,M,S,A),M=P=[P],n((S=c.C)<(A=v)),n(R.v<R.va),A>R.o&&(A=R.o),S<R.j){var Z=R.j-S;S=R.j,M[0]+=Z*I}if(S>=A?S=0:(M[0]+=4*R.v,R.ka=S-R.j,R.U=R.va-R.v,R.T=A-S,S=1),S){if(P=P[0],11>(S=c.ca).S){var ue=S.f.RGBA,Ae=(A=S.S,M=R.U,R=R.T,Z=ue.eb,ue.A),X=R;for(ue=ue.fb+c.Ma*ue.A;0<X--;){var de=z,ve=P,Me=M,we=Z,De=ue;switch(A){case zr:To(de,ve,Me,we,De);break;case Oo:Hs(de,ve,Me,we,De);break;case Sl:Hs(de,ve,Me,we,De),Mo(we,De,0,Me,1,0);break;case oi:Ci(de,ve,Me,we,De);break;case wl:rt(de,ve,Me,we,De,1);break;case fs:rt(de,ve,Me,we,De,1),Mo(we,De,0,Me,1,0);break;case Vs:rt(de,ve,Me,we,De,0);break;case Oi:rt(de,ve,Me,we,De,0),Mo(we,De,1,Me,1,0);break;case Mi:Co(de,ve,Me,we,De);break;case Ro:Co(de,ve,Me,we,De),da(we,De,Me,1,0);break;case yu:_a(de,ve,Me,we,De);break;default:n(0)}P+=I,ue+=Ae}c.Ma+=R}else alert("todo:EmitRescaledRowsYUVA");n(c.Ma<=S.height)}}c.C=v,n(c.C<=c.i)}function oa(c){var v;if(0<c.ua)return 0;for(v=0;v<c.Wb;++v){var S=c.Ya[v].G,A=c.Ya[v].H;if(0<S[1][A[1]+0].g||0<S[2][A[2]+0].g||0<S[3][A[3]+0].g)return 0}return 1}function Ir(c,v,S,A,M,R){if(c.Z!=0){var z=c.qd,P=c.rd;for(n(ui[c.Z]!=null);v<S;++v)ui[c.Z](z,P,A,M,A,M,R),z=A,P=M,M+=R;c.qd=z,c.rd=P}}function Cr(c,v){var S=c.l.ma,A=S.Z==0||S.Z==1?c.l.j:c.C;if(A=c.C<A?A:c.C,n(v<=c.l.o),v>A){var M=c.l.width,R=S.ca,z=S.tb+M*A,P=c.V,I=c.Ba+c.c*A,Z=c.gc;n(c.ab==1),n(Z[0].hc==3),Is(Z[0],A,v,P,I,R,z),Ir(S,A,v,R,z,M)}c.C=c.Ma=v}function Hr(c,v,S,A,M,R,z){var P=c.$/A,I=c.$%A,Z=c.m,ue=c.s,Ae=S+c.$,X=Ae;M=S+A*M;var de=S+A*R,ve=280+ue.ua,Me=c.Pb?P:16777216,we=0<ue.ua?ue.Wa:null,De=ue.wc,Re=Ae<de?Sr(ue,I,P):null;n(c.C<R),n(de<=M);var He=!1;e:for(;;){for(;He||Ae<de;){var qe=0;if(P>=Me){var ft=Ae-S;n((Me=c).Pb),Me.wd=Me.m,Me.xd=ft,0<Me.s.ua&&Qe(Me.s.Wa,Me.s.vb),Me=P+jf}if(I&De||(Re=Sr(ue,I,P)),n(Re!=null),Re.Qb&&(v[Ae]=Re.qb,He=!0),!He)if(me(Z),Re.jc){qe=Z,ft=v;var et=Ae,zt=Re.pd[V(qe)&os-1];n(Re.jc),256>zt.g?(ae(qe,qe.u+zt.g),ft[et]=zt.value,qe=0):(ae(qe,qe.u+zt.g-256),n(256<=zt.value),qe=zt.value),qe==0&&(He=!0)}else qe=On(Re.G[0],Re.H[0],Z);if(Z.h)break;if(He||256>qe){if(!He)if(Re.nd)v[Ae]=(Re.qb|qe<<8)>>>0;else{if(me(Z),He=On(Re.G[1],Re.H[1],Z),me(Z),ft=On(Re.G[2],Re.H[2],Z),et=On(Re.G[3],Re.H[3],Z),Z.h)break;v[Ae]=(et<<24|He<<16|qe<<8|ft)>>>0}if(He=!1,++Ae,++I>=A&&(I=0,++P,z!=null&&P<=R&&!(P%16)&&z(c,P),we!=null))for(;X<Ae;)qe=v[X++],we.X[(506832829*qe&4294967295)>>>we.Mb]=qe}else if(280>qe){if(qe=Nn(qe-256,Z),ft=On(Re.G[4],Re.H[4],Z),me(Z),ft=wr(A,ft=Nn(ft,Z)),Z.h)break;if(Ae-S<ft||M-Ae<qe)break e;for(et=0;et<qe;++et)v[Ae+et]=v[Ae+et-ft];for(Ae+=qe,I+=qe;I>=A;)I-=A,++P,z!=null&&P<=R&&!(P%16)&&z(c,P);if(n(Ae<=M),I&De&&(Re=Sr(ue,I,P)),we!=null)for(;X<Ae;)qe=v[X++],we.X[(506832829*qe&4294967295)>>>we.Mb]=qe}else{if(!(qe<ve))break e;for(He=qe-280,n(we!=null);X<Ae;)qe=v[X++],we.X[(506832829*qe&4294967295)>>>we.Mb]=qe;qe=Ae,n(!(He>>>(ft=we).Xa)),v[qe]=ft.X[He],He=!0}He||n(Z.h==te(Z))}if(c.Pb&&Z.h&&Ae<M)n(c.m.h),c.a=5,c.m=c.wd,c.$=c.xd,0<c.s.ua&&Qe(c.s.vb,c.s.Wa);else{if(Z.h)break e;z?.(c,P>R?R:P),c.a=0,c.$=Ae-S}return 1}return c.a=3,0}function _r(c){n(c!=null),c.vc=null,c.yc=null,c.Ya=null;var v=c.Wa;v!=null&&(v.X=null),c.vb=null,n(c!=null)}function Rn(){var c=new st;return c==null?null:(c.a=0,c.xb=Do,un("Predictor","VP8LPredictors"),un("Predictor","VP8LPredictors_C"),un("PredictorAdd","VP8LPredictorsAdd"),un("PredictorAdd","VP8LPredictorsAdd_C"),Lo=Dt,cs=qt,To=zn,Hs=be,Co=Ye,_a=Je,Ci=Kt,J.VP8LMapColor32b=rn,J.VP8LMapColor8b=Wa,c)}function Da(c,v,S,A,M){var R=1,z=[c],P=[v],I=A.m,Z=A.s,ue=null,Ae=0;e:for(;;){if(S)for(;R&&oe(I,1);){var X=z,de=P,ve=A,Me=1,we=ve.m,De=ve.gc[ve.ab],Re=oe(we,2);if(ve.Oc&1<<Re)R=0;else{switch(ve.Oc|=1<<Re,De.hc=Re,De.Ea=X[0],De.nc=de[0],De.K=[null],++ve.ab,n(4>=ve.ab),Re){case 0:case 1:De.b=oe(we,3)+2,Me=Da(Ie(De.Ea,De.b),Ie(De.nc,De.b),0,ve,De.K),De.K=De.K[0];break;case 3:var He,qe=oe(we,8)+1,ft=16<qe?0:4<qe?1:2<qe?2:3;if(X[0]=Ie(De.Ea,ft),De.b=ft,He=Me=Da(qe,1,0,ve,De.K)){var et,zt=qe,tt=De,Qt=1<<(8>>tt.b),rr=u(Qt);if(rr==null)He=0;else{var Ot=tt.K[0],nt=tt.w;for(rr[0]=tt.K[0][0],et=1;et<1*zt;++et)rr[et]=mt(Ot[nt+et],rr[et-1]);for(;et<4*Qt;++et)rr[et]=0;tt.K[0]=null,tt.K[0]=rr,He=1}}Me=He;break;case 2:break;default:n(0)}R=Me}}if(z=z[0],P=P[0],R&&oe(I,1)&&!(R=1<=(Ae=oe(I,4))&&11>=Ae)){A.a=3;break e}var Ge;if(Ge=R)t:{var qn,Bt,Ht,it=A,Ut=z,en=P,Tn=Ae,Zn=S,$n=it.m,Hn=it.s,Vt=[null],tn=1,Wn=0,Nt=Xs[Tn];n:for(;;){if(Zn&&oe($n,1)){var ur=oe($n,3)+2,ma=Ie(Ut,ur),Yn=Ie(en,ur),Xr=ma*Yn;if(!Da(ma,Yn,0,it,Vt))break n;for(Vt=Vt[0],Hn.xc=ur,qn=0;qn<Xr;++qn){var yn=Vt[qn]>>8&65535;Vt[qn]=yn,yn>=tn&&(tn=yn+1)}}if($n.h)break n;for(Bt=0;5>Bt;++Bt){var Jn=pa[Bt];!Bt&&0<Tn&&(Jn+=1<<Tn),Wn<Jn&&(Wn=Jn)}var Kr=h(tn*Nt,G),jr=tn,An=h(jr,Se);if(An==null)var sn=null;else n(65536>=jr),sn=An;var Br=u(Wn);if(sn==null||Br==null||Kr==null){it.a=1;break n}var kr=Kr;for(qn=Ht=0;qn<tn;++qn){var dn=sn[qn],Zr=dn.G,cr=dn.H,di=0,Ga=1,fr=0;for(Bt=0;5>Bt;++Bt){Jn=pa[Bt],Zr[Bt]=kr,cr[Bt]=Ht,!Bt&&0<Tn&&(Jn+=1<<Tn);a:{var Nl,Au=Jn,Ll=it,Bo=Br,Ef=kr,Mf=Ht,Tl=0,qi=Ll.m,ah=oe(qi,1);if(o(Bo,0,0,Au),ah){var Of=oe(qi,1)+1,Rf=oe(qi,1),vc=oe(qi,Rf==0?1:8);Bo[vc]=1,Of==2&&(Bo[vc=oe(qi,8)]=1);var Po=1}else{var yc=u(19),bc=oe(qi,4)+4;if(19<bc){Ll.a=3;var Cl=0;break a}for(Nl=0;Nl<bc;++Nl)yc[Ri[Nl]]=oe(qi,3);var ju=void 0,qo=void 0,Df=Ll,zf=yc,Ui=Au,El=Bo,ku=0,Va=Df.m,Uo=8,xc=h(128,G);r:for(;U(xc,0,7,zf,19);){if(oe(Va,1)){var Bf=2+2*oe(Va,3);if((ju=2+oe(Va,Bf))>Ui)break r}else ju=Ui;for(qo=0;qo<Ui&&ju--;){me(Va);var wc=xc[0+(127&V(Va))];ae(Va,Va.u+wc.g);var $s=wc.value;if(16>$s)El[qo++]=$s,$s!=0&&(Uo=$s);else{var Pf=$s==16,Sc=$s-16,_c=Ta[Sc],Ac=oe(Va,bu[Sc])+_c;if(qo+Ac>Ui)break r;for(var qf=Pf?Uo:0;0<Ac--;)El[qo++]=qf}}ku=1;break r}ku||(Df.a=3),Po=ku}(Po=Po&&!qi.h)&&(Tl=U(Ef,Mf,8,Bo,Au)),Po&&Tl!=0?Cl=Tl:(Ll.a=3,Cl=0)}if(Cl==0)break n;if(Ga&&Qs[Bt]==1&&(Ga=kr[Ht].g==0),di+=kr[Ht].g,Ht+=Cl,3>=Bt){var Js,Nu=Br[0];for(Js=1;Js<Jn;++Js)Br[Js]>Nu&&(Nu=Br[Js]);fr+=Nu}}if(dn.nd=Ga,dn.Qb=0,Ga&&(dn.qb=(Zr[3][cr[3]+0].value<<24|Zr[1][cr[1]+0].value<<16|Zr[2][cr[2]+0].value)>>>0,di==0&&256>Zr[0][cr[0]+0].value&&(dn.Qb=1,dn.qb+=Zr[0][cr[0]+0].value<<8)),dn.jc=!dn.Qb&&6>fr,dn.jc){var Ml,Fi=dn;for(Ml=0;Ml<os;++Ml){var hi=Ml,Ii=Fi.pd[hi],Ol=Fi.G[0][Fi.H[0]+hi];256<=Ol.value?(Ii.g=Ol.g+256,Ii.value=Ol.value):(Ii.g=0,Ii.value=0,hi>>=mr(Ol,8,Ii),hi>>=mr(Fi.G[1][Fi.H[1]+hi],16,Ii),hi>>=mr(Fi.G[2][Fi.H[2]+hi],0,Ii),mr(Fi.G[3][Fi.H[3]+hi],24,Ii))}}}Hn.vc=Vt,Hn.Wb=tn,Hn.Ya=sn,Hn.yc=Kr,Ge=1;break t}Ge=0}if(!(R=Ge)){A.a=3;break e}if(0<Ae){if(Z.ua=1<<Ae,!Y(Z.Wa,Ae)){A.a=1,R=0;break e}}else Z.ua=0;var Rl=A,jc=z,Uf=P,kc=Rl.s,Nc=kc.xc;if(Rl.c=jc,Rl.i=Uf,kc.md=Ie(jc,Nc),kc.wc=Nc==0?-1:(1<<Nc)-1,S){A.xb=Nf;break e}if((ue=u(z*P))==null){A.a=1,R=0;break e}R=(R=Hr(A,ue,0,z,P,P,null))&&!I.h;break e}return R?(M!=null?M[0]=ue:(n(ue==null),n(S)),A.$=0,S||_r(Z)):_r(Z),R}function Ki(c,v){var S=c.c*c.i,A=S+v+16*v;return n(c.c<=v),c.V=u(A),c.V==null?(c.Ta=null,c.Ua=0,c.a=1,0):(c.Ta=c.V,c.Ua=c.Ba+S+v,1)}function xa(c,v){var S=c.C,A=v-S,M=c.V,R=c.Ba+c.c*S;for(n(v<=c.l.o);0<A;){var z=16<A?16:A,P=c.l.ma,I=c.l.width,Z=I*z,ue=P.ca,Ae=P.tb+I*S,X=c.Ta,de=c.Ua;Xi(c,z,M,R),Ws(X,de,ue,Ae,Z),Ir(P,S,S+z,ue,Ae,I),A-=z,M+=z*c.c,S+=z}n(S==v),c.C=c.Ma=v}function za(){this.ub=this.yd=this.td=this.Rb=0}function fo(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Jl(){this.Fb=this.Bb=this.Cb=0,this.Zb=u(4),this.Lb=u(4)}function ho(){this.Yb=(function(){var c=[];return(function v(S,A,M){for(var R=M[A],z=0;z<R&&(S.push(M.length>A+1?[]:0),!(M.length<A+1));z++)v(S[z],A+1,M)})(c,0,[3,11]),c})()}function eu(){this.jb=u(3),this.Wc=d([4,8],ho),this.Xc=d([4,17],ho)}function ks(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new u(4),this.od=new u(4)}function Wr(){this.ld=this.La=this.dd=this.tc=0}function la(){this.Na=this.la=0}function po(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function go(){this.ad=u(384),this.Za=0,this.Ob=u(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function xi(){this.uc=this.M=this.Nb=0,this.wa=Array(new Wr),this.Y=0,this.ya=Array(new go),this.aa=0,this.l=new Ns}function mo(){this.y=u(16),this.f=u(8),this.ea=u(8)}function vo(){this.cb=this.a=0,this.sc="",this.m=new L,this.Od=new za,this.Kc=new fo,this.ed=new ks,this.Qa=new Jl,this.Ic=this.$c=this.Aa=0,this.D=new xi,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=h(8,L),this.ia=0,this.pb=h(4,po),this.Pa=new eu,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new mo),this.Hd=0,this.rb=Array(new la),this.sb=0,this.wa=Array(new Wr),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 go),this.L=this.aa=0,this.gd=d([4,2],Wr),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 ri(c,v){return 0>c?0:c>v?v:c}function Ns(){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 ta(){var c=new vo;return c!=null&&(c.a=0,c.sc="OK",c.cb=0,c.Xb=0,sr||(sr=Ls)),c}function Qn(c,v,S){return c.a==0&&(c.a=v,c.sc=S,c.cb=0),0}function tu(c,v,S){return 3<=S&&c[v+0]==157&&c[v+1]==1&&c[v+2]==42}function ua(c,v){if(c==null)return 0;if(c.a=0,c.sc="OK",v==null)return Qn(c,2,"null VP8Io passed to VP8GetHeaders()");var S=v.data,A=v.w,M=v.ha;if(4>M)return Qn(c,7,"Truncated header.");var R=S[A+0]|S[A+1]<<8|S[A+2]<<16,z=c.Od;if(z.Rb=!(1&R),z.td=R>>1&7,z.yd=R>>4&1,z.ub=R>>5,3<z.td)return Qn(c,3,"Incorrect keyframe parameters.");if(!z.yd)return Qn(c,4,"Frame not displayable.");A+=3,M-=3;var P=c.Kc;if(z.Rb){if(7>M)return Qn(c,7,"cannot parse picture header");if(!tu(S,A,M))return Qn(c,3,"Bad code word");P.c=16383&(S[A+4]<<8|S[A+3]),P.Td=S[A+4]>>6,P.i=16383&(S[A+6]<<8|S[A+5]),P.Ud=S[A+6]>>6,A+=7,M-=7,c.za=P.c+15>>4,c.Ub=P.i+15>>4,v.width=P.c,v.height=P.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,o((R=c.Pa).jb,0,255,R.jb.length),n((R=c.Qa)!=null),R.Cb=0,R.Bb=0,R.Fb=1,o(R.Zb,0,0,R.Zb.length),o(R.Lb,0,0,R.Lb)}if(z.ub>M)return Qn(c,7,"bad partition length");ee(R=c.m,S,A,z.ub),A+=z.ub,M-=z.ub,z.Rb&&(P.Ld=Ee(R),P.Kd=Ee(R)),P=c.Qa;var I,Z=c.Pa;if(n(R!=null),n(P!=null),P.Cb=Ee(R),P.Cb){if(P.Bb=Ee(R),Ee(R)){for(P.Fb=Ee(R),I=0;4>I;++I)P.Zb[I]=Ee(R)?le(R,7):0;for(I=0;4>I;++I)P.Lb[I]=Ee(R)?le(R,6):0}if(P.Bb)for(I=0;3>I;++I)Z.jb[I]=Ee(R)?ce(R,8):255}else P.Bb=0;if(R.Ka)return Qn(c,3,"cannot parse segment header");if((P=c.ed).zd=Ee(R),P.Tb=ce(R,6),P.wb=ce(R,3),P.Pc=Ee(R),P.Pc&&Ee(R)){for(Z=0;4>Z;++Z)Ee(R)&&(P.vd[Z]=le(R,6));for(Z=0;4>Z;++Z)Ee(R)&&(P.od[Z]=le(R,6))}if(c.L=P.Tb==0?0:P.zd?1:2,R.Ka)return Qn(c,3,"cannot parse filter header");var ue=M;if(M=I=A,A=I+ue,P=ue,c.Xb=(1<<ce(c.m,2))-1,ue<3*(Z=c.Xb))S=7;else{for(I+=3*Z,P-=3*Z,ue=0;ue<Z;++ue){var Ae=S[M+0]|S[M+1]<<8|S[M+2]<<16;Ae>P&&(Ae=P),ee(c.Jc[+ue],S,I,Ae),I+=Ae,P-=Ae,M+=3}ee(c.Jc[+Z],S,I,P),S=I<A?0:5}if(S!=0)return Qn(c,S,"cannot parse partitions");for(S=ce(I=c.m,7),M=Ee(I)?le(I,4):0,A=Ee(I)?le(I,4):0,P=Ee(I)?le(I,4):0,Z=Ee(I)?le(I,4):0,I=Ee(I)?le(I,4):0,ue=c.Qa,Ae=0;4>Ae;++Ae){if(ue.Cb){var X=ue.Zb[Ae];ue.Fb||(X+=S)}else{if(0<Ae){c.pb[Ae]=c.pb[0];continue}X=S}var de=c.pb[Ae];de.Sc[0]=_l[ri(X+M,127)],de.Sc[1]=Al[ri(X+0,127)],de.Eb[0]=2*_l[ri(X+A,127)],de.Eb[1]=101581*Al[ri(X+P,127)]>>16,8>de.Eb[1]&&(de.Eb[1]=8),de.Qc[0]=_l[ri(X+Z,117)],de.Qc[1]=Al[ri(X+I,127)],de.lc=X+I}if(!z.Rb)return Qn(c,4,"Not a key frame.");for(Ee(R),z=c.Pa,S=0;4>S;++S){for(M=0;8>M;++M)for(A=0;3>A;++A)for(P=0;11>P;++P)Z=ze(R,Ks[S][M][A][P])?ce(R,8):li[S][M][A][P],z.Wc[S][M].Yb[A][P]=Z;for(M=0;17>M;++M)z.Xc[S][M]=z.Wc[S][kf[M]]}return c.kc=Ee(R),c.kc&&(c.Bd=ce(R,8)),c.cb=1}function Ls(c,v,S,A,M,R,z){var P=v[M].Yb[S];for(S=0;16>M;++M){if(!ze(c,P[S+0]))return M;for(;!ze(c,P[S+1]);)if(P=v[++M].Yb[0],S=0,M==16)return 16;var I=v[M+1].Yb;if(ze(c,P[S+2])){var Z=c,ue=0;if(ze(Z,(X=P)[(Ae=S)+3]))if(ze(Z,X[Ae+6])){for(P=0,Ae=2*(ue=ze(Z,X[Ae+8]))+(X=ze(Z,X[Ae+9+ue])),ue=0,X=In[Ae];X[P];++P)ue+=ue+ze(Z,X[P]);ue+=3+(8<<Ae)}else ze(Z,X[Ae+7])?(ue=7+2*ze(Z,165),ue+=ze(Z,145)):ue=5+ze(Z,159);else ue=ze(Z,X[Ae+4])?3+ze(Z,X[Ae+5]):2;P=I[2]}else ue=1,P=I[1];I=z+ln[M],0>(Z=c).b&&_e(Z);var Ae,X=Z.b,de=(Ae=Z.Ca>>1)-(Z.I>>X)>>31;--Z.b,Z.Ca+=de,Z.Ca|=1,Z.I-=(Ae+1&de)<<X,R[I]=((ue^de)-de)*A[(0<M)+0]}return 16}function Zi(c){var v=c.rb[c.sb-1];v.la=0,v.Na=0,o(c.zc,0,0,c.zc.length),c.ja=0}function ca(c,v,S,A,M){M=c[v+S+32*A]+(M>>3),c[v+S+32*A]=-256&M?0>M?0:255:M}function Ar(c,v,S,A,M,R){ca(c,v,0,S,A+M),ca(c,v,1,S,A+R),ca(c,v,2,S,A-R),ca(c,v,3,S,A-M)}function Ba(c){return(20091*c>>16)+c}function vr(c,v,S,A){var M,R=0,z=u(16);for(M=0;4>M;++M){var P=c[v+0]+c[v+8],I=c[v+0]-c[v+8],Z=(35468*c[v+4]>>16)-Ba(c[v+12]),ue=Ba(c[v+4])+(35468*c[v+12]>>16);z[R+0]=P+ue,z[R+1]=I+Z,z[R+2]=I-Z,z[R+3]=P-ue,R+=4,v++}for(M=R=0;4>M;++M)P=(c=z[R+0]+4)+z[R+8],I=c-z[R+8],Z=(35468*z[R+4]>>16)-Ba(z[R+12]),ca(S,A,0,0,P+(ue=Ba(z[R+4])+(35468*z[R+12]>>16))),ca(S,A,1,0,I+Z),ca(S,A,2,0,I-Z),ca(S,A,3,0,P-ue),R++,A+=32}function yo(c,v,S,A){var M=c[v+0]+4,R=35468*c[v+4]>>16,z=Ba(c[v+4]),P=35468*c[v+1]>>16;Ar(S,A,0,M+z,c=Ba(c[v+1]),P),Ar(S,A,1,M+R,c,P),Ar(S,A,2,M-R,c,P),Ar(S,A,3,M-z,c,P)}function $i(c,v,S,A,M){vr(c,v,S,A),M&&vr(c,v+16,S,A+4)}function nu(c,v,S,A){Ya(c,v+0,S,A,1),Ya(c,v+32,S,A+128,1)}function ru(c,v,S,A){var M;for(c=c[v+0]+4,M=0;4>M;++M)for(v=0;4>v;++v)ca(S,A,v,M,c)}function Yr(c,v,S,A){c[v+0]&&Kn(c,v+0,S,A),c[v+16]&&Kn(c,v+16,S,A+4),c[v+32]&&Kn(c,v+32,S,A+128),c[v+48]&&Kn(c,v+48,S,A+128+4)}function au(c,v,S,A){var M,R=u(16);for(M=0;4>M;++M){var z=c[v+0+M]+c[v+12+M],P=c[v+4+M]+c[v+8+M],I=c[v+4+M]-c[v+8+M],Z=c[v+0+M]-c[v+12+M];R[0+M]=z+P,R[8+M]=z-P,R[4+M]=Z+I,R[12+M]=Z-I}for(M=0;4>M;++M)z=(c=R[0+4*M]+3)+R[3+4*M],P=R[1+4*M]+R[2+4*M],I=R[1+4*M]-R[2+4*M],Z=c-R[3+4*M],S[A+0]=z+P>>3,S[A+16]=Z+I>>3,S[A+32]=z-P>>3,S[A+48]=Z-I>>3,A+=64}function Ts(c,v,S){var A,M=v-32,R=yr,z=255-c[M-1];for(A=0;A<S;++A){var P,I=R,Z=z+c[v-1];for(P=0;P<S;++P)c[v+P]=I[Z+c[M+P]];v+=32}}function Cs(c,v){Ts(c,v,4)}function Es(c,v){Ts(c,v,8)}function cc(c,v){Ts(c,v,16)}function fc(c,v){var S;for(S=0;16>S;++S)s(c,v+32*S,c,v-32,16)}function bo(c,v){var S;for(S=16;0<S;--S)o(c,v,c[v-1],16),v+=32}function ai(c,v,S){var A;for(A=0;16>A;++A)o(v,S+32*A,c,16)}function xo(c,v){var S,A=16;for(S=0;16>S;++S)A+=c[v-1+32*S]+c[v+S-32];ai(A>>5,c,v)}function fa(c,v){var S,A=8;for(S=0;16>S;++S)A+=c[v-1+32*S];ai(A>>4,c,v)}function Ji(c,v){var S,A=8;for(S=0;16>S;++S)A+=c[v+S-32];ai(A>>4,c,v)}function es(c,v){ai(128,c,v)}function kt(c,v,S){return c+2*v+S+2>>2}function iu(c,v){var S,A=v-32;for(A=new Uint8Array([kt(c[A-1],c[A+0],c[A+1]),kt(c[A+0],c[A+1],c[A+2]),kt(c[A+1],c[A+2],c[A+3]),kt(c[A+2],c[A+3],c[A+4])]),S=0;4>S;++S)s(c,v+32*S,A,0,A.length)}function Ms(c,v){var S=c[v-1],A=c[v-1+32],M=c[v-1+64],R=c[v-1+96];We(c,v+0,16843009*kt(c[v-1-32],S,A)),We(c,v+32,16843009*kt(S,A,M)),We(c,v+64,16843009*kt(A,M,R)),We(c,v+96,16843009*kt(M,R,R))}function Pa(c,v){var S,A=4;for(S=0;4>S;++S)A+=c[v+S-32]+c[v-1+32*S];for(A>>=3,S=0;4>S;++S)o(c,v+32*S,A,4)}function ml(c,v){var S=c[v-1+0],A=c[v-1+32],M=c[v-1+64],R=c[v-1-32],z=c[v+0-32],P=c[v+1-32],I=c[v+2-32],Z=c[v+3-32];c[v+0+96]=kt(A,M,c[v-1+96]),c[v+1+96]=c[v+0+64]=kt(S,A,M),c[v+2+96]=c[v+1+64]=c[v+0+32]=kt(R,S,A),c[v+3+96]=c[v+2+64]=c[v+1+32]=c[v+0+0]=kt(z,R,S),c[v+3+64]=c[v+2+32]=c[v+1+0]=kt(P,z,R),c[v+3+32]=c[v+2+0]=kt(I,P,z),c[v+3+0]=kt(Z,I,P)}function Os(c,v){var S=c[v+1-32],A=c[v+2-32],M=c[v+3-32],R=c[v+4-32],z=c[v+5-32],P=c[v+6-32],I=c[v+7-32];c[v+0+0]=kt(c[v+0-32],S,A),c[v+1+0]=c[v+0+32]=kt(S,A,M),c[v+2+0]=c[v+1+32]=c[v+0+64]=kt(A,M,R),c[v+3+0]=c[v+2+32]=c[v+1+64]=c[v+0+96]=kt(M,R,z),c[v+3+32]=c[v+2+64]=c[v+1+96]=kt(R,z,P),c[v+3+64]=c[v+2+96]=kt(z,P,I),c[v+3+96]=kt(P,I,I)}function Er(c,v){var S=c[v-1+0],A=c[v-1+32],M=c[v-1+64],R=c[v-1-32],z=c[v+0-32],P=c[v+1-32],I=c[v+2-32],Z=c[v+3-32];c[v+0+0]=c[v+1+64]=R+z+1>>1,c[v+1+0]=c[v+2+64]=z+P+1>>1,c[v+2+0]=c[v+3+64]=P+I+1>>1,c[v+3+0]=I+Z+1>>1,c[v+0+96]=kt(M,A,S),c[v+0+64]=kt(A,S,R),c[v+0+32]=c[v+1+96]=kt(S,R,z),c[v+1+32]=c[v+2+96]=kt(R,z,P),c[v+2+32]=c[v+3+96]=kt(z,P,I),c[v+3+32]=kt(P,I,Z)}function qa(c,v){var S=c[v+0-32],A=c[v+1-32],M=c[v+2-32],R=c[v+3-32],z=c[v+4-32],P=c[v+5-32],I=c[v+6-32],Z=c[v+7-32];c[v+0+0]=S+A+1>>1,c[v+1+0]=c[v+0+64]=A+M+1>>1,c[v+2+0]=c[v+1+64]=M+R+1>>1,c[v+3+0]=c[v+2+64]=R+z+1>>1,c[v+0+32]=kt(S,A,M),c[v+1+32]=c[v+0+96]=kt(A,M,R),c[v+2+32]=c[v+1+96]=kt(M,R,z),c[v+3+32]=c[v+2+96]=kt(R,z,P),c[v+3+64]=kt(z,P,I),c[v+3+96]=kt(P,I,Z)}function wo(c,v){var S=c[v-1+0],A=c[v-1+32],M=c[v-1+64],R=c[v-1+96];c[v+0+0]=S+A+1>>1,c[v+2+0]=c[v+0+32]=A+M+1>>1,c[v+2+32]=c[v+0+64]=M+R+1>>1,c[v+1+0]=kt(S,A,M),c[v+3+0]=c[v+1+32]=kt(A,M,R),c[v+3+32]=c[v+1+64]=kt(M,R,R),c[v+3+64]=c[v+2+64]=c[v+0+96]=c[v+1+96]=c[v+2+96]=c[v+3+96]=R}function su(c,v){var S=c[v-1+0],A=c[v-1+32],M=c[v-1+64],R=c[v-1+96],z=c[v-1-32],P=c[v+0-32],I=c[v+1-32],Z=c[v+2-32];c[v+0+0]=c[v+2+32]=S+z+1>>1,c[v+0+32]=c[v+2+64]=A+S+1>>1,c[v+0+64]=c[v+2+96]=M+A+1>>1,c[v+0+96]=R+M+1>>1,c[v+3+0]=kt(P,I,Z),c[v+2+0]=kt(z,P,I),c[v+1+0]=c[v+3+32]=kt(S,z,P),c[v+1+32]=c[v+3+64]=kt(A,S,z),c[v+1+64]=c[v+3+96]=kt(M,A,S),c[v+1+96]=kt(R,M,A)}function wi(c,v){var S;for(S=0;8>S;++S)s(c,v+32*S,c,v-32,8)}function ts(c,v){var S;for(S=0;8>S;++S)o(c,v,c[v-1],8),v+=32}function Ua(c,v,S){var A;for(A=0;8>A;++A)o(v,S+32*A,c,8)}function Mr(c,v){var S,A=8;for(S=0;8>S;++S)A+=c[v+S-32]+c[v-1+32*S];Ua(A>>4,c,v)}function wa(c,v){var S,A=4;for(S=0;8>S;++S)A+=c[v+S-32];Ua(A>>3,c,v)}function So(c,v){var S,A=4;for(S=0;8>S;++S)A+=c[v-1+32*S];Ua(A>>3,c,v)}function Si(c,v){Ua(128,c,v)}function ns(c,v,S){var A=c[v-S],M=c[v+0],R=3*(M-A)+vu[1020+c[v-2*S]-c[v+S]],z=Gs[112+(R+4>>3)];c[v-S]=yr[255+A+Gs[112+(R+3>>3)]],c[v+0]=yr[255+M-z]}function Rs(c,v,S,A){var M=c[v+0],R=c[v+S];return La[255+c[v-2*S]-c[v-S]]>A||La[255+R-M]>A}function _i(c,v,S,A){return 4*La[255+c[v-S]-c[v+0]]+La[255+c[v-2*S]-c[v+S]]<=A}function Ai(c,v,S,A,M){var R=c[v-3*S],z=c[v-2*S],P=c[v-S],I=c[v+0],Z=c[v+S],ue=c[v+2*S],Ae=c[v+3*S];return 4*La[255+P-I]+La[255+z-Z]>A?0:La[255+c[v-4*S]-R]<=M&&La[255+R-z]<=M&&La[255+z-P]<=M&&La[255+Ae-ue]<=M&&La[255+ue-Z]<=M&&La[255+Z-I]<=M}function ji(c,v,S,A){var M=2*A+1;for(A=0;16>A;++A)_i(c,v+A,S,M)&&ns(c,v+A,S)}function _o(c,v,S,A){var M=2*A+1;for(A=0;16>A;++A)_i(c,v+A*S,1,M)&&ns(c,v+A*S,1)}function Ao(c,v,S,A){var M;for(M=3;0<M;--M)ji(c,v+=4*S,S,A)}function ou(c,v,S,A){var M;for(M=3;0<M;--M)_o(c,v+=4,S,A)}function ki(c,v,S,A,M,R,z,P){for(R=2*R+1;0<M--;){if(Ai(c,v,S,R,z))if(Rs(c,v,S,P))ns(c,v,S);else{var I=c,Z=v,ue=S,Ae=I[Z-2*ue],X=I[Z-ue],de=I[Z+0],ve=I[Z+ue],Me=I[Z+2*ue],we=27*(Re=vu[1020+3*(de-X)+vu[1020+Ae-ve]])+63>>7,De=18*Re+63>>7,Re=9*Re+63>>7;I[Z-3*ue]=yr[255+I[Z-3*ue]+Re],I[Z-2*ue]=yr[255+Ae+De],I[Z-ue]=yr[255+X+we],I[Z+0]=yr[255+de-we],I[Z+ue]=yr[255+ve-De],I[Z+2*ue]=yr[255+Me-Re]}v+=A}}function Fa(c,v,S,A,M,R,z,P){for(R=2*R+1;0<M--;){if(Ai(c,v,S,R,z))if(Rs(c,v,S,P))ns(c,v,S);else{var I=c,Z=v,ue=S,Ae=I[Z-ue],X=I[Z+0],de=I[Z+ue],ve=Gs[112+(4+(Me=3*(X-Ae))>>3)],Me=Gs[112+(Me+3>>3)],we=ve+1>>1;I[Z-2*ue]=yr[255+I[Z-2*ue]+we],I[Z-ue]=yr[255+Ae+Me],I[Z+0]=yr[255+X-ve],I[Z+ue]=yr[255+de-we]}v+=A}}function lu(c,v,S,A,M,R){ki(c,v,S,1,16,A,M,R)}function uu(c,v,S,A,M,R){ki(c,v,1,S,16,A,M,R)}function cu(c,v,S,A,M,R){var z;for(z=3;0<z;--z)Fa(c,v+=4*S,S,1,16,A,M,R)}function Ds(c,v,S,A,M,R){var z;for(z=3;0<z;--z)Fa(c,v+=4,1,S,16,A,M,R)}function fu(c,v,S,A,M,R,z,P){ki(c,v,M,1,8,R,z,P),ki(S,A,M,1,8,R,z,P)}function x(c,v,S,A,M,R,z,P){ki(c,v,1,M,8,R,z,P),ki(S,A,1,M,8,R,z,P)}function E(c,v,S,A,M,R,z,P){Fa(c,v+4*M,M,1,8,R,z,P),Fa(S,A+4*M,M,1,8,R,z,P)}function Q(c,v,S,A,M,R,z,P){Fa(c,v+4,1,M,8,R,z,P),Fa(S,A+4,1,M,8,R,z,P)}function ie(){this.ba=new Et,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new nn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function he(){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 Oe(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Fe(){this.ua=0,this.Wa=new xt,this.vb=new xt,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Se,this.yc=new G}function st(){this.xb=this.a=0,this.l=new Ns,this.ca=new Et,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Fe,this.ab=0,this.gc=h(4,Oe),this.Oc=0}function at(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ns,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Mt(c,v,S,A,M,R,z){for(c=c==null?0:c[v+0],v=0;v<z;++v)M[R+v]=c+S[A+v]&255,c=M[R+v]}function Ft(c,v,S,A,M,R,z){var P;if(c==null)Mt(null,null,S,A,M,R,z);else for(P=0;P<z;++P)M[R+P]=c[v+P]+S[A+P]&255}function Jt(c,v,S,A,M,R,z){if(c==null)Mt(null,null,S,A,M,R,z);else{var P,I=c[v+0],Z=I,ue=I;for(P=0;P<z;++P)Z=ue+(I=c[v+P])-Z,ue=S[A+P]+(-256&Z?0>Z?0:255:Z)&255,Z=I,M[R+P]=ue}}function tr(c,v,S,A){var M=v.width,R=v.o;if(n(c!=null&&v!=null),0>S||0>=A||S+A>R)return null;if(!c.Cc){if(c.ga==null){var z;if(c.ga=new at,(z=c.ga==null)||(z=v.width*v.o,n(c.Gb.length==0),c.Gb=u(z),c.Uc=0,c.Gb==null?z=0:(c.mb=c.Gb,c.nb=c.Uc,c.rc=null,z=1),z=!z),!z){z=c.ga;var P=c.Fa,I=c.P,Z=c.qc,ue=c.mb,Ae=c.nb,X=I+1,de=Z-1,ve=z.l;if(n(P!=null&&ue!=null&&v!=null),ui[0]=null,ui[1]=Mt,ui[2]=Ft,ui[3]=Jt,z.ca=ue,z.tb=Ae,z.c=v.width,z.i=v.height,n(0<z.c&&0<z.i),1>=Z)v=0;else if(z.$a=3&P[I+0],z.Z=P[I+0]>>2&3,z.Lc=P[I+0]>>4&3,I=P[I+0]>>6&3,0>z.$a||1<z.$a||4<=z.Z||1<z.Lc||I)v=0;else if(ve.put=jt,ve.ac=Ra,ve.bc=Tr,ve.ma=z,ve.width=v.width,ve.height=v.height,ve.Da=v.Da,ve.v=v.v,ve.va=v.va,ve.j=v.j,ve.o=v.o,z.$a)e:{n(z.$a==1),v=Rn();t:for(;;){if(v==null){v=0;break e}if(n(z!=null),z.mc=v,v.c=z.c,v.i=z.i,v.l=z.l,v.l.ma=z,v.l.width=z.c,v.l.height=z.i,v.a=0,Ne(v.m,P,X,de),!Da(z.c,z.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&oa(v.s)?(z.ic=1,P=v.c*v.i,v.Ta=null,v.Ua=0,v.V=u(P),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(z.ic=0,v=Ki(v,z.c)),!v))break t;v=1;break e}z.mc=null,v=0}else v=de>=z.c*z.i;z=!v}if(z)return null;c.ga.Lc!=1?c.Ga=0:A=R-S}n(c.ga!=null),n(S+A<=R);e:{if(v=(P=c.ga).c,R=P.l.o,P.$a==0){if(X=c.rc,de=c.Vc,ve=c.Fa,I=c.P+1+S*v,Z=c.mb,ue=c.nb+S*v,n(I<=c.P+c.qc),P.Z!=0)for(n(ui[P.Z]!=null),z=0;z<A;++z)ui[P.Z](X,de,ve,I,Z,ue,v),X=Z,de=ue,ue+=v,I+=v;else for(z=0;z<A;++z)s(Z,ue,ve,I,v),X=Z,de=ue,ue+=v,I+=v;c.rc=X,c.Vc=de}else{if(n(P.mc!=null),v=S+A,n((z=P.mc)!=null),n(v<=z.i),z.C>=v)v=1;else if(P.ic||Pn(),P.ic){P=z.V,X=z.Ba,de=z.c;var Me=z.i,we=(ve=1,I=z.$/de,Z=z.$%de,ue=z.m,Ae=z.s,z.$),De=de*Me,Re=de*v,He=Ae.wc,qe=we<Re?Sr(Ae,Z,I):null;n(we<=De),n(v<=Me),n(oa(Ae));t:for(;;){for(;!ue.h&&we<Re;){if(Z&He||(qe=Sr(Ae,Z,I)),n(qe!=null),me(ue),256>(Me=On(qe.G[0],qe.H[0],ue)))P[X+we]=Me,++we,++Z>=de&&(Z=0,++I<=v&&!(I%16)&&Cr(z,I));else{if(!(280>Me)){ve=0;break t}Me=Nn(Me-256,ue);var ft,et=On(qe.G[4],qe.H[4],ue);if(me(ue),!(we>=(et=wr(de,et=Nn(et,ue)))&&De-we>=Me)){ve=0;break t}for(ft=0;ft<Me;++ft)P[X+we+ft]=P[X+we+ft-et];for(we+=Me,Z+=Me;Z>=de;)Z-=de,++I<=v&&!(I%16)&&Cr(z,I);we<Re&&Z&He&&(qe=Sr(Ae,Z,I))}n(ue.h==te(ue))}Cr(z,I>v?v:I);break t}!ve||ue.h&&we<De?(ve=0,z.a=ue.h?5:3):z.$=we,v=ve}else v=Hr(z,z.V,z.Ba,z.c,z.i,v,xa);if(!v){A=0;break e}}S+A>=R&&(c.Cc=1),A=1}if(!A)return null;if(c.Cc&&((A=c.ga)!=null&&(A.mc=null),c.ga=null,0<c.Ga))return alert("todo:WebPDequantizeLevels"),null}return c.nb+S*M}function mn(c,v,S,A,M,R){for(;0<M--;){var z,P=c,I=v+(S?1:0),Z=c,ue=v+(S?0:3);for(z=0;z<A;++z){var Ae=Z[ue+4*z];Ae!=255&&(Ae*=32897,P[I+4*z+0]=P[I+4*z+0]*Ae>>23,P[I+4*z+1]=P[I+4*z+1]*Ae>>23,P[I+4*z+2]=P[I+4*z+2]*Ae>>23)}v+=R}}function gn(c,v,S,A,M){for(;0<A--;){var R;for(R=0;R<S;++R){var z=c[v+2*R+0],P=15&(Z=c[v+2*R+1]),I=4369*P,Z=(240&Z|Z>>4)*I>>16;c[v+2*R+0]=(240&z|z>>4)*I>>16&240|(15&z|z<<4)*I>>16>>4&15,c[v+2*R+1]=240&Z|P}v+=M}}function Ln(c,v,S,A,M,R,z,P){var I,Z,ue=255;for(Z=0;Z<M;++Z){for(I=0;I<A;++I){var Ae=c[v+I];R[z+4*I]=Ae,ue&=Ae}v+=S,z+=P}return ue!=255}function Bn(c,v,S,A,M){var R;for(R=0;R<M;++R)S[A+R]=c[v+R]>>8}function Pn(){Mo=mn,da=gn,ha=Ln,Ws=Bn}function Or(c,v,S){J[c]=function(A,M,R,z,P,I,Z,ue,Ae,X,de,ve,Me,we,De,Re,He){var qe,ft=He-1>>1,et=P[I+0]|Z[ue+0]<<16,zt=Ae[X+0]|de[ve+0]<<16;n(A!=null);var tt=3*et+zt+131074>>2;for(v(A[M+0],255&tt,tt>>16,Me,we),R!=null&&(tt=3*zt+et+131074>>2,v(R[z+0],255&tt,tt>>16,De,Re)),qe=1;qe<=ft;++qe){var Qt=P[I+qe]|Z[ue+qe]<<16,rr=Ae[X+qe]|de[ve+qe]<<16,Ot=et+Qt+zt+rr+524296,nt=Ot+2*(Qt+zt)>>3;tt=nt+et>>1,et=(Ot=Ot+2*(et+rr)>>3)+Qt>>1,v(A[M+2*qe-1],255&tt,tt>>16,Me,we+(2*qe-1)*S),v(A[M+2*qe-0],255&et,et>>16,Me,we+(2*qe-0)*S),R!=null&&(tt=Ot+zt>>1,et=nt+rr>>1,v(R[z+2*qe-1],255&tt,tt>>16,De,Re+(2*qe-1)*S),v(R[z+2*qe+0],255&et,et>>16,De,Re+(2*qe+0)*S)),et=Qt,zt=rr}1&He||(tt=3*et+zt+131074>>2,v(A[M+He-1],255&tt,tt>>16,Me,we+(He-1)*S),R!=null&&(tt=3*zt+et+131074>>2,v(R[z+He-1],255&tt,tt>>16,De,Re+(He-1)*S)))}}function Ia(){br[zr]=Bi,br[Oo]=ci,br[oi]=hs,br[wl]=xu,br[Vs]=wu,br[Mi]=zo,br[yu]=Su,br[Sl]=ci,br[fs]=xu,br[Oi]=wu,br[Ro]=zo}function Ni(c){return c&-16384?0>c?0:255:c>>th}function zs(c,v){return Ni((19077*c>>8)+(26149*v>>8)-14234)}function rs(c,v,S){return Ni((19077*c>>8)-(6419*v>>8)-(13320*S>>8)+8708)}function Li(c,v){return Ni((19077*c>>8)+(33050*v>>8)-17685)}function as(c,v,S,A,M){A[M+0]=zs(c,S),A[M+1]=rs(c,v,S),A[M+2]=Li(c,v)}function Bs(c,v,S,A,M){A[M+0]=Li(c,v),A[M+1]=rs(c,v,S),A[M+2]=zs(c,S)}function Ps(c,v,S,A,M){var R=rs(c,v,S);v=R<<3&224|Li(c,v)>>3,A[M+0]=248&zs(c,S)|R>>5,A[M+1]=v}function Xn(c,v,S,A,M){var R=240&Li(c,v)|15;A[M+0]=240&zs(c,S)|rs(c,v,S)>>4,A[M+1]=R}function qs(c,v,S,A,M){A[M+0]=255,as(c,v,S,A,M+1)}function Us(c,v,S,A,M){Bs(c,v,S,A,M),A[M+3]=255}function vl(c,v,S,A,M){as(c,v,S,A,M),A[M+3]=255}function Ha(c,v,S){J[c]=function(A,M,R,z,P,I,Z,ue,Ae){for(var X=ue+(-2&Ae)*S;ue!=X;)v(A[M+0],R[z+0],P[I+0],Z,ue),v(A[M+1],R[z+0],P[I+0],Z,ue+S),M+=2,++z,++I,ue+=2*S;1&Ae&&v(A[M+0],R[z+0],P[I+0],Z,ue)}}function Rr(c,v,S){return S==0?c==0?v==0?6:5:v==0?4:0:S}function is(c,v,S,A,M){switch(c>>>30){case 3:Ya(v,S,A,M,0);break;case 2:Ei(v,S,A,M);break;case 1:Kn(v,S,A,M)}}function ii(c,v){var S,A,M=v.M,R=v.Nb,z=c.oc,P=c.pc+40,I=c.oc,Z=c.pc+584,ue=c.oc,Ae=c.pc+600;for(S=0;16>S;++S)z[P+32*S-1]=129;for(S=0;8>S;++S)I[Z+32*S-1]=129,ue[Ae+32*S-1]=129;for(0<M?z[P-1-32]=I[Z-1-32]=ue[Ae-1-32]=129:(o(z,P-32-1,127,21),o(I,Z-32-1,127,9),o(ue,Ae-32-1,127,9)),A=0;A<c.za;++A){var X=v.ya[v.aa+A];if(0<A){for(S=-1;16>S;++S)s(z,P+32*S-4,z,P+32*S+12,4);for(S=-1;8>S;++S)s(I,Z+32*S-4,I,Z+32*S+4,4),s(ue,Ae+32*S-4,ue,Ae+32*S+4,4)}var de=c.Gd,ve=c.Hd+A,Me=X.ad,we=X.Hc;if(0<M&&(s(z,P-32,de[ve].y,0,16),s(I,Z-32,de[ve].f,0,8),s(ue,Ae-32,de[ve].ea,0,8)),X.Za){var De=z,Re=P-32+16;for(0<M&&(A>=c.za-1?o(De,Re,de[ve].y[15],4):s(De,Re,de[ve+1].y,0,4)),S=0;4>S;S++)De[Re+128+S]=De[Re+256+S]=De[Re+384+S]=De[Re+0+S];for(S=0;16>S;++S,we<<=2)De=z,Re=P+Zs[S],Qr[X.Ob[S]](De,Re),is(we,Me,16*+S,De,Re)}else if(De=Rr(A,M,X.Ob[0]),zi[De](z,P),we!=0)for(S=0;16>S;++S,we<<=2)is(we,Me,16*+S,z,P+Zs[S]);for(S=X.Gc,De=Rr(A,M,X.Dd),ga[De](I,Z),ga[De](ue,Ae),we=Me,De=I,Re=Z,255&(X=0|S)&&(170&X?ja(we,256,De,Re):ka(we,256,De,Re)),X=ue,we=Ae,255&(S>>=8)&&(170&S?ja(Me,320,X,we):ka(Me,320,X,we)),M<c.Ub-1&&(s(de[ve].y,0,z,P+480,16),s(de[ve].f,0,I,Z+224,8),s(de[ve].ea,0,ue,Ae+224,8)),S=8*R*c.B,de=c.sa,ve=c.ta+16*A+16*R*c.R,Me=c.qa,X=c.ra+8*A+S,we=c.Ha,De=c.Ia+8*A+S,S=0;16>S;++S)s(de,ve+S*c.R,z,P+32*S,16);for(S=0;8>S;++S)s(Me,X+S*c.B,I,Z+32*S,8),s(we,De+S*c.B,ue,Ae+32*S,8)}}function du(c,v,S,A,M,R,z,P,I){var Z=[0],ue=[0],Ae=0,X=I!=null?I.kd:0,de=I??new he;if(c==null||12>S)return 7;de.data=c,de.w=v,de.ha=S,v=[v],S=[S],de.gb=[de.gb];e:{var ve=v,Me=S,we=de.gb;if(n(c!=null),n(Me!=null),n(we!=null),we[0]=0,12<=Me[0]&&!a(c,ve[0],"RIFF")){if(a(c,ve[0]+8,"WEBP")){we=3;break e}var De=dt(c,ve[0]+4);if(12>De||4294967286<De){we=3;break e}if(X&&De>Me[0]-8){we=7;break e}we[0]=De,ve[0]+=12,Me[0]-=12}we=0}if(we!=0)return we;for(De=0<de.gb[0],S=S[0];;){e:{var Re=c;Me=v,we=S;var He=Z,qe=ue,ft=ve=[0];if((tt=Ae=[Ae])[0]=0,8>we[0])we=7;else{if(!a(Re,Me[0],"VP8X")){if(dt(Re,Me[0]+4)!=10){we=3;break e}if(18>we[0]){we=7;break e}var et=dt(Re,Me[0]+8),zt=1+Ve(Re,Me[0]+12);if(2147483648<=zt*(Re=1+Ve(Re,Me[0]+15))){we=3;break e}ft!=null&&(ft[0]=et),He!=null&&(He[0]=zt),qe!=null&&(qe[0]=Re),Me[0]+=18,we[0]-=18,tt[0]=1}we=0}}if(Ae=Ae[0],ve=ve[0],we!=0)return we;if(Me=!!(2&ve),!De&&Ae)return 3;if(R!=null&&(R[0]=!!(16&ve)),z!=null&&(z[0]=Me),P!=null&&(P[0]=0),z=Z[0],ve=ue[0],Ae&&Me&&I==null){we=0;break}if(4>S){we=7;break}if(De&&Ae||!De&&!Ae&&!a(c,v[0],"ALPH")){S=[S],de.na=[de.na],de.P=[de.P],de.Sa=[de.Sa];e:{et=c,we=v,De=S;var tt=de.gb;He=de.na,qe=de.P,ft=de.Sa,zt=22,n(et!=null),n(De!=null),Re=we[0];var Qt=De[0];for(n(He!=null),n(ft!=null),He[0]=null,qe[0]=null,ft[0]=0;;){if(we[0]=Re,De[0]=Qt,8>Qt){we=7;break e}var rr=dt(et,Re+4);if(4294967286<rr){we=3;break e}var Ot=8+rr+1&-2;if(zt+=Ot,0<tt&&zt>tt){we=3;break e}if(!a(et,Re,"VP8 ")||!a(et,Re,"VP8L")){we=0;break e}if(Qt[0]<Ot){we=7;break e}a(et,Re,"ALPH")||(He[0]=et,qe[0]=Re+8,ft[0]=rr),Re+=Ot,Qt-=Ot}}if(S=S[0],de.na=de.na[0],de.P=de.P[0],de.Sa=de.Sa[0],we!=0)break}S=[S],de.Ja=[de.Ja],de.xa=[de.xa];e:if(tt=c,we=v,De=S,He=de.gb[0],qe=de.Ja,ft=de.xa,et=we[0],Re=!a(tt,et,"VP8 "),zt=!a(tt,et,"VP8L"),n(tt!=null),n(De!=null),n(qe!=null),n(ft!=null),8>De[0])we=7;else{if(Re||zt){if(tt=dt(tt,et+4),12<=He&&tt>He-12){we=3;break e}if(X&&tt>De[0]-8){we=7;break e}qe[0]=tt,we[0]+=8,De[0]-=8,ft[0]=zt}else ft[0]=5<=De[0]&&tt[et+0]==47&&!(tt[et+4]>>5),qe[0]=De[0];we=0}if(S=S[0],de.Ja=de.Ja[0],de.xa=de.xa[0],v=v[0],we!=0)break;if(4294967286<de.Ja)return 3;if(P==null||Me||(P[0]=de.xa?2:1),z=[z],ve=[ve],de.xa){if(5>S){we=7;break}P=z,X=ve,Me=R,c==null||5>S?c=0:5<=S&&c[v+0]==47&&!(c[v+4]>>5)?(De=[0],tt=[0],He=[0],Ne(qe=new q,c,v,S),Mn(qe,De,tt,He)?(P!=null&&(P[0]=De[0]),X!=null&&(X[0]=tt[0]),Me!=null&&(Me[0]=He[0]),c=1):c=0):c=0}else{if(10>S){we=7;break}P=ve,c==null||10>S||!tu(c,v+3,S-3)?c=0:(X=c[v+0]|c[v+1]<<8|c[v+2]<<16,Me=16383&(c[v+7]<<8|c[v+6]),c=16383&(c[v+9]<<8|c[v+8]),1&X||3<(X>>1&7)||!(X>>4&1)||X>>5>=de.Ja||!Me||!c?c=0:(z&&(z[0]=Me),P&&(P[0]=c),c=1))}if(!c||(z=z[0],ve=ve[0],Ae&&(Z[0]!=z||ue[0]!=ve)))return 3;I!=null&&(I[0]=de,I.offset=v-I.w,n(4294967286>v-I.w),n(I.offset==I.ha-S));break}return we==0||we==7&&Ae&&I==null?(R!=null&&(R[0]|=de.na!=null&&0<de.na.length),A!=null&&(A[0]=z),M!=null&&(M[0]=ve),0):we}function Gr(c,v,S){var A=v.width,M=v.height,R=0,z=0,P=A,I=M;if(v.Da=c!=null&&0<c.Da,v.Da&&(P=c.cd,I=c.bd,R=c.v,z=c.j,11>S||(R&=-2,z&=-2),0>R||0>z||0>=P||0>=I||R+P>A||z+I>M))return 0;if(v.v=R,v.j=z,v.va=R+P,v.o=z+I,v.U=P,v.T=I,v.da=c!=null&&0<c.da,v.da){if(!ut(P,I,S=[c.ib],R=[c.hb]))return 0;v.ib=S[0],v.hb=R[0]}return v.ob=c!=null&&c.ob,v.Kb=c==null||!c.Sd,v.da&&(v.ob=v.ib<3*A/4&&v.hb<3*M/4,v.Kb=0),1}function ss(c){if(c==null)return 2;if(11>c.S){var v=c.f.RGBA;v.fb+=(c.height-1)*v.A,v.A=-v.A}else v=c.f.kb,c=c.height,v.O+=(c-1)*v.fa,v.fa=-v.fa,v.N+=(c-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(c-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(c-1)*v.lb,v.lb=-v.lb);return 0}function jo(c,v,S,A){if(A==null||0>=c||0>=v)return 2;if(S!=null){if(S.Da){var M=S.cd,R=S.bd,z=-2&S.v,P=-2&S.j;if(0>z||0>P||0>=M||0>=R||z+M>c||P+R>v)return 2;c=M,v=R}if(S.da){if(!ut(c,v,M=[S.ib],R=[S.hb]))return 2;c=M[0],v=R[0]}}A.width=c,A.height=v;e:{var I=A.width,Z=A.height;if(c=A.S,0>=I||0>=Z||!(c>=zr&&13>c))c=2;else{if(0>=A.Rd&&A.sd==null){z=R=M=v=0;var ue=(P=I*Cf[c])*Z;if(11>c||(R=(Z+1)/2*(v=(I+1)/2),c==12&&(z=(M=I)*Z)),(Z=u(ue+2*R+z))==null){c=1;break e}A.sd=Z,11>c?((I=A.f.RGBA).eb=Z,I.fb=0,I.A=P,I.size=ue):((I=A.f.kb).y=Z,I.O=0,I.fa=P,I.Fd=ue,I.f=Z,I.N=0+ue,I.Ab=v,I.Cd=R,I.ea=Z,I.W=0+ue+R,I.Db=v,I.Ed=R,c==12&&(I.F=Z,I.J=0+ue+2*R),I.Tc=z,I.lb=M)}if(v=1,M=A.S,R=A.width,z=A.height,M>=zr&&13>M)if(11>M)c=A.f.RGBA,v&=(P=Math.abs(c.A))*(z-1)+R<=c.size,v&=P>=R*Cf[M],v&=c.eb!=null;else{c=A.f.kb,P=(R+1)/2,ue=(z+1)/2,I=Math.abs(c.fa),Z=Math.abs(c.Ab);var Ae=Math.abs(c.Db),X=Math.abs(c.lb),de=X*(z-1)+R;v&=I*(z-1)+R<=c.Fd,v&=Z*(ue-1)+P<=c.Cd,v=(v&=Ae*(ue-1)+P<=c.Ed)&I>=R&Z>=P&Ae>=P,v&=c.y!=null,v&=c.f!=null,v&=c.ea!=null,M==12&&(v&=X>=R,v&=de<=c.Tc,v&=c.F!=null)}else v=0;c=v?0:2}}return c!=0||S!=null&&S.fd&&(c=ss(A)),c}var os=64,Ti=[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],ko=24,Dr=32,Vr=8,No=[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];Ze("Predictor0","PredictorAdd0"),J.Predictor0=function(){return 4278190080},J.Predictor1=function(c){return c},J.Predictor2=function(c,v,S){return v[S+0]},J.Predictor3=function(c,v,S){return v[S+1]},J.Predictor4=function(c,v,S){return v[S-1]},J.Predictor5=function(c,v,S){return ht(ht(c,v[S+1]),v[S+0])},J.Predictor6=function(c,v,S){return ht(c,v[S-1])},J.Predictor7=function(c,v,S){return ht(c,v[S+0])},J.Predictor8=function(c,v,S){return ht(v[S-1],v[S+0])},J.Predictor9=function(c,v,S){return ht(v[S+0],v[S+1])},J.Predictor10=function(c,v,S){return ht(ht(c,v[S-1]),ht(v[S+0],v[S+1]))},J.Predictor11=function(c,v,S){var A=v[S+0];return 0>=wt(A>>24&255,c>>24&255,(v=v[S-1])>>24&255)+wt(A>>16&255,c>>16&255,v>>16&255)+wt(A>>8&255,c>>8&255,v>>8&255)+wt(255&A,255&c,255&v)?A:c},J.Predictor12=function(c,v,S){var A=v[S+0];return(Wt((c>>24&255)+(A>>24&255)-((v=v[S-1])>>24&255))<<24|Wt((c>>16&255)+(A>>16&255)-(v>>16&255))<<16|Wt((c>>8&255)+(A>>8&255)-(v>>8&255))<<8|Wt((255&c)+(255&A)-(255&v)))>>>0},J.Predictor13=function(c,v,S){var A=v[S-1];return(Gt((c=ht(c,v[S+0]))>>24&255,A>>24&255)<<24|Gt(c>>16&255,A>>16&255)<<16|Gt(c>>8&255,A>>8&255)<<8|Gt(255&c,255&A))>>>0};var ls=J.PredictorAdd0;J.PredictorAdd1=_t,Ze("Predictor2","PredictorAdd2"),Ze("Predictor3","PredictorAdd3"),Ze("Predictor4","PredictorAdd4"),Ze("Predictor5","PredictorAdd5"),Ze("Predictor6","PredictorAdd6"),Ze("Predictor7","PredictorAdd7"),Ze("Predictor8","PredictorAdd8"),Ze("Predictor9","PredictorAdd9"),Ze("Predictor10","PredictorAdd10"),Ze("Predictor11","PredictorAdd11"),Ze("Predictor12","PredictorAdd12"),Ze("Predictor13","PredictorAdd13");var us=J.PredictorAdd2;pt("ColorIndexInverseTransform","MapARGB","32b",function(c){return c>>8&255},function(c){return c}),pt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(c){return c},function(c){return c>>8&255});var Lo,Fs=J.ColorIndexInverseTransform,rn=J.MapARGB,Is=J.VP8LColorIndexInverseTransformAlpha,Wa=J.MapAlpha,Sa=J.VP8LPredictorsAdd=[];Sa.length=16,(J.VP8LPredictors=[]).length=16,(J.VP8LPredictorsAdd_C=[]).length=16,(J.VP8LPredictors_C=[]).length=16;var cs,To,Hs,Co,_a,Ci,Aa,Ya,Ei,ja,Kn,ka,vn,an,Fn,nr,si,yl,Eo,hu,dc,hc,pu,Na,Mo,da,ha,Ws,gu=u(511),bl=u(2041),xl=u(225),mu=u(767),Ys=0,vu=bl,Gs=xl,yr=mu,La=gu,zr=0,Oo=1,oi=2,wl=3,Vs=4,Mi=5,yu=6,Sl=7,fs=8,Oi=9,Ro=10,bu=[2,3,7],Ta=[3,3,11],pa=[280,256,256,256,40],Qs=[0,1,1,1,0],Ri=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Di=[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],Xs=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],jf=8,_l=[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],Al=[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],sr=null,In=[[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]],ln=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ds=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],li=[[[[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]]]],pc=[[[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]]],Ks=[[[[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]]]],kf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],zi=[],Qr=[],ga=[],Nf=1,Do=2,ui=[],br=[];Or("UpsampleRgbLinePair",as,3),Or("UpsampleBgrLinePair",Bs,3),Or("UpsampleRgbaLinePair",vl,4),Or("UpsampleBgraLinePair",Us,4),Or("UpsampleArgbLinePair",qs,4),Or("UpsampleRgba4444LinePair",Xn,2),Or("UpsampleRgb565LinePair",Ps,2);var Bi=J.UpsampleRgbLinePair,hs=J.UpsampleBgrLinePair,ci=J.UpsampleRgbaLinePair,xu=J.UpsampleBgraLinePair,wu=J.UpsampleArgbLinePair,zo=J.UpsampleRgba4444LinePair,Su=J.UpsampleRgb565LinePair,fi=16,or=1<<fi-1,ps=-227,_u=482,th=6,Lf=0,nh=u(256),lr=u(256),gc=u(256),jl=u(256),kl=u(_u-ps),mc=u(_u-ps);Ha("YuvToRgbRow",as,3),Ha("YuvToBgrRow",Bs,3),Ha("YuvToRgbaRow",vl,4),Ha("YuvToBgraRow",Us,4),Ha("YuvToArgbRow",qs,4),Ha("YuvToRgba4444Row",Xn,2),Ha("YuvToRgb565Row",Ps,2);var Zs=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Pi=[0,2,8],rh=[8,7,6,4,4,2,2,2,1,1,1,1],Tf=1;this.WebPDecodeRGBA=function(c,v,S,A,M){var R=Oo,z=new ie,P=new Et;z.ba=P,P.S=R,P.width=[P.width],P.height=[P.height];var I=P.width,Z=P.height,ue=new St;if(ue==null||c==null)var Ae=2;else n(ue!=null),Ae=du(c,v,S,ue.width,ue.height,ue.Pd,ue.Qd,ue.format,null);if(Ae!=0?I=0:(I!=null&&(I[0]=ue.width[0]),Z!=null&&(Z[0]=ue.height[0]),I=1),I){P.width=P.width[0],P.height=P.height[0],A!=null&&(A[0]=P.width),M!=null&&(M[0]=P.height);e:{if(A=new Ns,(M=new he).data=c,M.w=v,M.ha=S,M.kd=1,v=[0],n(M!=null),((c=du(M.data,M.w,M.ha,null,null,null,v,null,M))==0||c==7)&&v[0]&&(c=4),(v=c)==0){if(n(z!=null),A.data=M.data,A.w=M.w+M.offset,A.ha=M.ha-M.offset,A.put=jt,A.ac=Ra,A.bc=Tr,A.ma=z,M.xa){if((c=Rn())==null){z=1;break e}if((function(X,de){var ve=[0],Me=[0],we=[0];t:for(;;){if(X==null)return 0;if(de==null)return X.a=2,0;if(X.l=de,X.a=0,Ne(X.m,de.data,de.w,de.ha),!Mn(X.m,ve,Me,we)){X.a=3;break t}if(X.xb=Do,de.width=ve[0],de.height=Me[0],!Da(ve[0],Me[0],1,X,null))break t;return 1}return n(X.a!=0),0})(c,A)){if(A=(v=jo(A.width,A.height,z.Oa,z.ba))==0){t:{A=c;n:for(;;){if(A==null){A=0;break t}if(n(A.s.yc!=null),n(A.s.Ya!=null),n(0<A.s.Wb),n((S=A.l)!=null),n((M=S.ma)!=null),A.xb!=0){if(A.ca=M.ba,A.tb=M.tb,n(A.ca!=null),!Gr(M.Oa,S,wl)){A.a=2;break n}if(!Ki(A,S.width)||S.da)break n;if((S.da||vt(A.ca.S))&&Pn(),11>A.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),A.ca.f.kb.F!=null&&Pn()),A.Pb&&0<A.s.ua&&A.s.vb.X==null&&!Y(A.s.vb,A.s.Wa.Xa)){A.a=1;break n}A.xb=0}if(!Hr(A,A.V,A.Ba,A.c,A.i,S.o,ba))break n;M.Dc=A.Ma,A=1;break t}n(A.a!=0),A=0}A=!A}A&&(v=c.a)}else v=c.a}else{if((c=new ta)==null){z=1;break e}if(c.Fa=M.na,c.P=M.P,c.qc=M.Sa,ua(c,A)){if((v=jo(A.width,A.height,z.Oa,z.ba))==0){if(c.Aa=0,S=z.Oa,n((M=c)!=null),S!=null){if(0<(I=0>(I=S.Md)?0:100<I?255:255*I/100)){for(Z=ue=0;4>Z;++Z)12>(Ae=M.pb[Z]).lc&&(Ae.ia=I*rh[0>Ae.lc?0:Ae.lc]>>3),ue|=Ae.ia;ue&&(alert("todo:VP8InitRandom"),M.ia=1)}M.Ga=S.Id,100<M.Ga?M.Ga=100:0>M.Ga&&(M.Ga=0)}(function(X,de){if(X==null)return 0;if(de==null)return Qn(X,2,"NULL VP8Io parameter in VP8Decode().");if(!X.cb&&!ua(X,de))return 0;if(n(X.cb),de.ac==null||de.ac(de)){de.ob&&(X.L=0);var ve=Pi[X.L];if(X.L==2?(X.yb=0,X.zb=0):(X.yb=de.v-ve>>4,X.zb=de.j-ve>>4,0>X.yb&&(X.yb=0),0>X.zb&&(X.zb=0)),X.Va=de.o+15+ve>>4,X.Hb=de.va+15+ve>>4,X.Hb>X.za&&(X.Hb=X.za),X.Va>X.Ub&&(X.Va=X.Ub),0<X.L){var Me=X.ed;for(ve=0;4>ve;++ve){var we;if(X.Qa.Cb){var De=X.Qa.Lb[ve];X.Qa.Fb||(De+=Me.Tb)}else De=Me.Tb;for(we=0;1>=we;++we){var Re=X.gd[ve][we],He=De;if(Me.Pc&&(He+=Me.vd[0],we&&(He+=Me.od[0])),0<(He=0>He?0:63<He?63:He)){var qe=He;0<Me.wb&&(qe=4<Me.wb?qe>>2:qe>>1)>9-Me.wb&&(qe=9-Me.wb),1>qe&&(qe=1),Re.dd=qe,Re.tc=2*He+qe,Re.ld=40<=He?2:15<=He?1:0}else Re.tc=0;Re.La=we}}}ve=0}else Qn(X,6,"Frame setup failed"),ve=X.a;if(ve=ve==0){if(ve){X.$c=0,0<X.Aa||(X.Ic=Tf);t:{ve=X.Ic,Me=4*(qe=X.za);var ft=32*qe,et=qe+1,zt=0<X.L?qe*(0<X.Aa?2:1):0,tt=(X.Aa==2?2:1)*qe;if((Re=Me+832+(we=3*(16*ve+Pi[X.L])/2*ft)+(De=X.Fa!=null&&0<X.Fa.length?X.Kc.c*X.Kc.i:0))!=Re)ve=0;else{if(Re>X.Vb){if(X.Vb=0,X.Ec=u(Re),X.Fc=0,X.Ec==null){ve=Qn(X,1,"no memory during frame initialization.");break t}X.Vb=Re}Re=X.Ec,He=X.Fc,X.Ac=Re,X.Bc=He,He+=Me,X.Gd=h(ft,mo),X.Hd=0,X.rb=h(et+1,la),X.sb=1,X.wa=zt?h(zt,Wr):null,X.Y=0,X.D.Nb=0,X.D.wa=X.wa,X.D.Y=X.Y,0<X.Aa&&(X.D.Y+=qe),n(!0),X.oc=Re,X.pc=He,He+=832,X.ya=h(tt,go),X.aa=0,X.D.ya=X.ya,X.D.aa=X.aa,X.Aa==2&&(X.D.aa+=qe),X.R=16*qe,X.B=8*qe,qe=(ft=Pi[X.L])*X.R,ft=ft/2*X.B,X.sa=Re,X.ta=He+qe,X.qa=X.sa,X.ra=X.ta+16*ve*X.R+ft,X.Ha=X.qa,X.Ia=X.ra+8*ve*X.B+ft,X.$c=0,He+=we,X.mb=De?Re:null,X.nb=De?He:null,n(He+De<=X.Fc+X.Vb),Zi(X),o(X.Ac,X.Bc,0,Me),ve=1}}if(ve){if(de.ka=0,de.y=X.sa,de.O=X.ta,de.f=X.qa,de.N=X.ra,de.ea=X.Ha,de.Vd=X.Ia,de.fa=X.R,de.Rc=X.B,de.F=null,de.J=0,!Ys){for(ve=-255;255>=ve;++ve)gu[255+ve]=0>ve?-ve:ve;for(ve=-1020;1020>=ve;++ve)bl[1020+ve]=-128>ve?-128:127<ve?127:ve;for(ve=-112;112>=ve;++ve)xl[112+ve]=-16>ve?-16:15<ve?15:ve;for(ve=-255;510>=ve;++ve)mu[255+ve]=0>ve?0:255<ve?255:ve;Ys=1}Aa=au,Ya=$i,ja=nu,Kn=ru,ka=Yr,Ei=yo,vn=lu,an=uu,Fn=fu,nr=x,si=cu,yl=Ds,Eo=E,hu=Q,dc=ji,hc=_o,pu=Ao,Na=ou,Qr[0]=Pa,Qr[1]=Cs,Qr[2]=iu,Qr[3]=Ms,Qr[4]=ml,Qr[5]=Er,Qr[6]=Os,Qr[7]=qa,Qr[8]=su,Qr[9]=wo,zi[0]=xo,zi[1]=cc,zi[2]=fc,zi[3]=bo,zi[4]=fa,zi[5]=Ji,zi[6]=es,ga[0]=Mr,ga[1]=Es,ga[2]=wi,ga[3]=ts,ga[4]=So,ga[5]=wa,ga[6]=Si,ve=1}else ve=0}ve&&(ve=(function(Qt,rr){for(Qt.M=0;Qt.M<Qt.Va;++Qt.M){var Ot,nt=Qt.Jc[Qt.M&Qt.Xb],Ge=Qt.m,qn=Qt;for(Ot=0;Ot<qn.za;++Ot){var Bt=Ge,Ht=qn,it=Ht.Ac,Ut=Ht.Bc+4*Ot,en=Ht.zc,Tn=Ht.ya[Ht.aa+Ot];if(Ht.Qa.Bb?Tn.$b=ze(Bt,Ht.Pa.jb[0])?2+ze(Bt,Ht.Pa.jb[2]):ze(Bt,Ht.Pa.jb[1]):Tn.$b=0,Ht.kc&&(Tn.Ad=ze(Bt,Ht.Bd)),Tn.Za=!ze(Bt,145)+0,Tn.Za){var Zn=Tn.Ob,$n=0;for(Ht=0;4>Ht;++Ht){var Hn,Vt=en[0+Ht];for(Hn=0;4>Hn;++Hn){Vt=pc[it[Ut+Hn]][Vt];for(var tn=ds[ze(Bt,Vt[0])];0<tn;)tn=ds[2*tn+ze(Bt,Vt[tn])];Vt=-tn,it[Ut+Hn]=Vt}s(Zn,$n,it,Ut,4),$n+=4,en[0+Ht]=Vt}}else Vt=ze(Bt,156)?ze(Bt,128)?1:3:ze(Bt,163)?2:0,Tn.Ob[0]=Vt,o(it,Ut,Vt,4),o(en,0,Vt,4);Tn.Dd=ze(Bt,142)?ze(Bt,114)?ze(Bt,183)?1:3:2:0}if(qn.m.Ka)return Qn(Qt,7,"Premature end-of-partition0 encountered.");for(;Qt.ja<Qt.za;++Qt.ja){if(qn=nt,Bt=(Ge=Qt).rb[Ge.sb-1],it=Ge.rb[Ge.sb+Ge.ja],Ot=Ge.ya[Ge.aa+Ge.ja],Ut=Ge.kc?Ot.Ad:0)Bt.la=it.la=0,Ot.Za||(Bt.Na=it.Na=0),Ot.Hc=0,Ot.Gc=0,Ot.ia=0;else{var Wn,Nt;if(Bt=it,it=qn,Ut=Ge.Pa.Xc,en=Ge.ya[Ge.aa+Ge.ja],Tn=Ge.pb[en.$b],Ht=en.ad,Zn=0,$n=Ge.rb[Ge.sb-1],Vt=Hn=0,o(Ht,Zn,0,384),en.Za)var ur=0,ma=Ut[3];else{tn=u(16);var Yn=Bt.Na+$n.Na;if(Yn=sr(it,Ut[1],Yn,Tn.Eb,0,tn,0),Bt.Na=$n.Na=(0<Yn)+0,1<Yn)Aa(tn,0,Ht,Zn);else{var Xr=tn[0]+3>>3;for(tn=0;256>tn;tn+=16)Ht[Zn+tn]=Xr}ur=1,ma=Ut[0]}var yn=15&Bt.la,Jn=15&$n.la;for(tn=0;4>tn;++tn){var Kr=1&Jn;for(Xr=Nt=0;4>Xr;++Xr)yn=yn>>1|(Kr=(Yn=sr(it,ma,Yn=Kr+(1&yn),Tn.Sc,ur,Ht,Zn))>ur)<<7,Nt=Nt<<2|(3<Yn?3:1<Yn?2:Ht[Zn+0]!=0),Zn+=16;yn>>=4,Jn=Jn>>1|Kr<<7,Hn=(Hn<<8|Nt)>>>0}for(ma=yn,ur=Jn>>4,Wn=0;4>Wn;Wn+=2){for(Nt=0,yn=Bt.la>>4+Wn,Jn=$n.la>>4+Wn,tn=0;2>tn;++tn){for(Kr=1&Jn,Xr=0;2>Xr;++Xr)Yn=Kr+(1&yn),yn=yn>>1|(Kr=0<(Yn=sr(it,Ut[2],Yn,Tn.Qc,0,Ht,Zn)))<<3,Nt=Nt<<2|(3<Yn?3:1<Yn?2:Ht[Zn+0]!=0),Zn+=16;yn>>=2,Jn=Jn>>1|Kr<<5}Vt|=Nt<<4*Wn,ma|=yn<<4<<Wn,ur|=(240&Jn)<<Wn}Bt.la=ma,$n.la=ur,en.Hc=Hn,en.Gc=Vt,en.ia=43690&Vt?0:Tn.ia,Ut=!(Hn|Vt)}if(0<Ge.L&&(Ge.wa[Ge.Y+Ge.ja]=Ge.gd[Ot.$b][Ot.Za],Ge.wa[Ge.Y+Ge.ja].La|=!Ut),qn.Ka)return Qn(Qt,7,"Premature end-of-file encountered.")}if(Zi(Qt),Ge=rr,qn=1,Ot=(nt=Qt).D,Bt=0<nt.L&&nt.M>=nt.zb&&nt.M<=nt.Va,nt.Aa==0)t:{if(Ot.M=nt.M,Ot.uc=Bt,ii(nt,Ot),qn=1,Ot=(Nt=nt.D).Nb,Bt=(Vt=Pi[nt.L])*nt.R,it=Vt/2*nt.B,tn=16*Ot*nt.R,Xr=8*Ot*nt.B,Ut=nt.sa,en=nt.ta-Bt+tn,Tn=nt.qa,Ht=nt.ra-it+Xr,Zn=nt.Ha,$n=nt.Ia-it+Xr,Jn=(yn=Nt.M)==0,Hn=yn>=nt.Va-1,nt.Aa==2&&ii(nt,Nt),Nt.uc)for(Kr=(Yn=nt).D.M,n(Yn.D.uc),Nt=Yn.yb;Nt<Yn.Hb;++Nt){ur=Nt,ma=Kr;var jr=(An=(fr=Yn).D).Nb;Wn=fr.R;var An=An.wa[An.Y+ur],sn=fr.sa,Br=fr.ta+16*jr*Wn+16*ur,kr=An.dd,dn=An.tc;if(dn!=0)if(n(3<=dn),fr.L==1)0<ur&&hc(sn,Br,Wn,dn+4),An.La&&Na(sn,Br,Wn,dn),0<ma&&dc(sn,Br,Wn,dn+4),An.La&&pu(sn,Br,Wn,dn);else{var Zr=fr.B,cr=fr.qa,di=fr.ra+8*jr*Zr+8*ur,Ga=fr.Ha,fr=fr.Ia+8*jr*Zr+8*ur;jr=An.ld,0<ur&&(an(sn,Br,Wn,dn+4,kr,jr),nr(cr,di,Ga,fr,Zr,dn+4,kr,jr)),An.La&&(yl(sn,Br,Wn,dn,kr,jr),hu(cr,di,Ga,fr,Zr,dn,kr,jr)),0<ma&&(vn(sn,Br,Wn,dn+4,kr,jr),Fn(cr,di,Ga,fr,Zr,dn+4,kr,jr)),An.La&&(si(sn,Br,Wn,dn,kr,jr),Eo(cr,di,Ga,fr,Zr,dn,kr,jr))}}if(nt.ia&&alert("todo:DitherRow"),Ge.put!=null){if(Nt=16*yn,yn=16*(yn+1),Jn?(Ge.y=nt.sa,Ge.O=nt.ta+tn,Ge.f=nt.qa,Ge.N=nt.ra+Xr,Ge.ea=nt.Ha,Ge.W=nt.Ia+Xr):(Nt-=Vt,Ge.y=Ut,Ge.O=en,Ge.f=Tn,Ge.N=Ht,Ge.ea=Zn,Ge.W=$n),Hn||(yn-=Vt),yn>Ge.o&&(yn=Ge.o),Ge.F=null,Ge.J=null,nt.Fa!=null&&0<nt.Fa.length&&Nt<yn&&(Ge.J=tr(nt,Ge,Nt,yn-Nt),Ge.F=nt.mb,Ge.F==null&&Ge.F.length==0)){qn=Qn(nt,3,"Could not decode alpha data.");break t}Nt<Ge.j&&(Vt=Ge.j-Nt,Nt=Ge.j,n(!(1&Vt)),Ge.O+=nt.R*Vt,Ge.N+=nt.B*(Vt>>1),Ge.W+=nt.B*(Vt>>1),Ge.F!=null&&(Ge.J+=Ge.width*Vt)),Nt<yn&&(Ge.O+=Ge.v,Ge.N+=Ge.v>>1,Ge.W+=Ge.v>>1,Ge.F!=null&&(Ge.J+=Ge.v),Ge.ka=Nt-Ge.j,Ge.U=Ge.va-Ge.v,Ge.T=yn-Nt,qn=Ge.put(Ge))}Ot+1!=nt.Ic||Hn||(s(nt.sa,nt.ta-Bt,Ut,en+16*nt.R,Bt),s(nt.qa,nt.ra-it,Tn,Ht+8*nt.B,it),s(nt.Ha,nt.Ia-it,Zn,$n+8*nt.B,it))}if(!qn)return Qn(Qt,6,"Output aborted.")}return 1})(X,de)),de.bc!=null&&de.bc(de),ve&=1}return ve?(X.cb=0,ve):0})(c,A)||(v=c.a)}}else v=c.a}v==0&&z.Oa!=null&&z.Oa.fd&&(v=ss(z.ba))}z=v}R=z!=0?null:11>R?P.f.RGBA.eb:P.f.kb.y}else R=null;return R};var Cf=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function m(J,pe){for(var O="",U=0;U<4;U++)O+=String.fromCharCode(J[pe++]);return O}function y(J,pe){return J[pe+0]|J[pe+1]<<8}function _(J,pe){return(J[pe+0]|J[pe+1]<<8|J[pe+2]<<16)>>>0}function j(J,pe){return(J[pe+0]|J[pe+1]<<8|J[pe+2]<<16|J[pe+3]<<24)>>>0}new f;var w=[0],k=[0],T=[],D=new f,C=t,K=(function(J,pe){var O={},U=0,G=!1,ne=0,Se=0;if(O.frames=[],!(function(L,q){for(var V=0;V<4;V++)if(L[q+V]!="RIFF".charCodeAt(V))return!0;return!1})(J,pe)){for(j(J,pe+=4),pe+=8;pe<J.length;){var ee=m(J,pe),ce=j(J,pe+=4);pe+=4;var le=ce+(1&ce);switch(ee){case"VP8 ":case"VP8L":O.frames[U]===void 0&&(O.frames[U]={}),(oe=O.frames[U]).src_off=G?Se:pe-8,oe.src_size=ne+ce+8,U++,G&&(G=!1,ne=0,Se=0);break;case"VP8X":(oe=O.header={}).feature_flags=J[pe];var Ne=pe+4;oe.canvas_width=1+_(J,Ne),Ne+=3,oe.canvas_height=1+_(J,Ne),Ne+=3;break;case"ALPH":G=!0,ne=le+8,Se=pe-8;break;case"ANIM":(oe=O.header).bgcolor=j(J,pe),Ne=pe+4,oe.loop_count=y(J,Ne),Ne+=2;break;case"ANMF":var H,oe;(oe=O.frames[U]={}).offset_x=2*_(J,pe),pe+=3,oe.offset_y=2*_(J,pe),pe+=3,oe.width=1+_(J,pe),pe+=3,oe.height=1+_(J,pe),pe+=3,oe.duration=_(J,pe),pe+=3,H=J[pe++],oe.dispose=1&H,oe.blend=H>>1&1}ee!="ANMF"&&(pe+=le)}return O}})(C,0);K.response=C,K.rgbaoutput=!0,K.dataurl=!1;var W=K.header?K.header:null,F=K.frames?K.frames:null;if(W){W.loop_counter=W.loop_count,w=[W.canvas_height],k=[W.canvas_width];for(var $=0;$<F.length&&F[$].blend!=0;$++);}var Le=F[0],ke=D.WebPDecodeRGBA(C,Le.src_off,Le.src_size,k,w);Le.rgba=ke,Le.imgwidth=k[0],Le.imgheight=w[0];for(var se=0;se<k[0]*w[0]*4;se++)T[se]=ke[se];return this.width=k,this.height=w,this.data=T,this}function m8(){var t,n=this.internal.__metadata__.metadata,a=unescape(encodeURIComponent(n));t=this.internal.__metadata__.rawXml?a:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function v8(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var n,a,s,o,u,h,d,f,m,y=function(L){return L=L||{},this.isStrokeTransparent=L.isStrokeTransparent||!1,this.strokeOpacity=L.strokeOpacity||1,this.strokeStyle=L.strokeStyle||"#000000",this.fillStyle=L.fillStyle||"#000000",this.isFillTransparent=L.isFillTransparent||!1,this.fillOpacity=L.fillOpacity||1,this.font=L.font||"10px sans-serif",this.textBaseline=L.textBaseline||"alphabetic",this.textAlign=L.textAlign||"left",this.lineWidth=L.lineWidth||1,this.lineJoin=L.lineJoin||"miter",this.lineCap=L.lineCap||"butt",this.path=L.path||[],this.transform=L.transform!==void 0?L.transform.clone():new f,this.globalCompositeOperation=L.globalCompositeOperation||"normal",this.globalAlpha=L.globalAlpha||1,this.clip_path=L.clip_path||[],this.currentPoint=L.currentPoint||new h,this.miterLimit=L.miterLimit||10,this.lastPoint=L.lastPoint||new h,this.lineDashOffset=L.lineDashOffset||0,this.lineDash=L.lineDash||[],this.margin=L.margin||[0,0,0,0],this.prevPageLastElemOffset=L.prevPageLastElemOffset||0,this.ignoreClearRect=typeof L.ignoreClearRect!="boolean"||L.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new _(this),n=this.internal.f2,a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,u=this.internal.getVerticalCoordinate,h=this.internal.Point,d=this.internal.Rectangle,f=this.internal.Matrix,m=new y}]);var _=function(L){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var q=L;Object.defineProperty(this,"pdf",{get:function(){return q}});var V=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return V},set:function(Y){V=!!Y}});var te=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return te},set:function(Y){te=!!Y}});var ae=0;Object.defineProperty(this,"posX",{get:function(){return ae},set:function(Y){isNaN(Y)||(ae=Y)}});var me=0;Object.defineProperty(this,"posY",{get:function(){return me},set:function(Y){isNaN(Y)||(me=Y)}}),Object.defineProperty(this,"margin",{get:function(){return m.margin},set:function(Y){var Qe;typeof Y=="number"?Qe=[Y,Y,Y,Y]:((Qe=new Array(4))[0]=Y[0],Qe[1]=Y.length>=2?Y[1]:Qe[0],Qe[2]=Y.length>=3?Y[2]:Qe[0],Qe[3]=Y.length>=4?Y[3]:Qe[1]),m.margin=Qe}});var _e=!1;Object.defineProperty(this,"autoPaging",{get:function(){return _e},set:function(Y){_e=Y}});var Ee=0;Object.defineProperty(this,"lastBreak",{get:function(){return Ee},set:function(Y){Ee=Y}});var ze=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ze},set:function(Y){ze=Y}}),Object.defineProperty(this,"ctx",{get:function(){return m},set:function(Y){Y instanceof y&&(m=Y)}}),Object.defineProperty(this,"path",{get:function(){return m.path},set:function(Y){m.path=Y}});var We=[];Object.defineProperty(this,"ctxStack",{get:function(){return We},set:function(Y){We=Y}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Y){var Qe;Qe=j(Y),this.ctx.fillStyle=Qe.style,this.ctx.isFillTransparent=Qe.a===0,this.ctx.fillOpacity=Qe.a,this.pdf.setFillColor(Qe.r,Qe.g,Qe.b,{a:Qe.a}),this.pdf.setTextColor(Qe.r,Qe.g,Qe.b,{a:Qe.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Y){var Qe=j(Y);this.ctx.strokeStyle=Qe.style,this.ctx.isStrokeTransparent=Qe.a===0,this.ctx.strokeOpacity=Qe.a,Qe.a===0?this.pdf.setDrawColor(255,255,255):(Qe.a,this.pdf.setDrawColor(Qe.r,Qe.g,Qe.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Y){["butt","round","square"].indexOf(Y)!==-1&&(this.ctx.lineCap=Y,this.pdf.setLineCap(Y))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Y){isNaN(Y)||(this.ctx.lineWidth=Y,this.pdf.setLineWidth(Y))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Y){["bevel","round","miter"].indexOf(Y)!==-1&&(this.ctx.lineJoin=Y,this.pdf.setLineJoin(Y))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Y){isNaN(Y)||(this.ctx.miterLimit=Y,this.pdf.setMiterLimit(Y))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Y){this.ctx.textBaseline=Y}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Y){["right","end","center","left","start"].indexOf(Y)!==-1&&(this.ctx.textAlign=Y)}});var Xe=null,Ve=null,dt=null;Object.defineProperty(this,"fontFaces",{get:function(){return dt},set:function(Y){Xe=null,Ve=null,dt=Y}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Y){var Qe;if(this.ctx.font=Y,(Qe=/^\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(Y))!==null){var xt=Qe[1];Qe[2];var ut=Qe[3],Ie=Qe[4];Qe[5];var mt=Qe[6],Ze=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ie)[2];Ie=Math.floor(Ze==="px"?parseFloat(Ie)*this.pdf.internal.scaleFactor:Ze==="em"?parseFloat(Ie)*this.pdf.getFontSize():parseFloat(Ie)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ie);var bt=(function(pt){var zn,be,Ye=[],Je=pt.trim();if(Je==="")return R1;if(Je in om)return[om[Je]];for(;Je!=="";){switch(be=null,zn=(Je=um(Je)).charAt(0)){case'"':case"'":be=c8(Je.substring(1),zn);break;default:be=f8(Je)}if(be===null||(Ye.push(be[0]),(Je=um(be[1]))!==""&&Je.charAt(0)!==","))return R1;Je=Je.replace(/^,/,"")}return Ye})(mt);if(this.fontFaces){var ht=(function(pt,zn){var be=pt.getFontList(),Ye=JSON.stringify(be);if(Xe===null||Ve!==Ye){var Je=(function(Kt){var rt=[];return Object.keys(Kt).forEach(function(un){Kt[un].forEach(function(vt){var At=null;switch(vt){case"bold":At={family:un,weight:"bold"};break;case"italic":At={family:un,style:"italic"};break;case"bolditalic":At={family:un,weight:"bold",style:"italic"};break;case"":case"normal":At={family:un}}At!==null&&(At.ref={name:un,style:vt},rt.push(At))})}),rt})(be);Xe=(function(Kt){for(var rt={},un=0;un<Kt.length;++un){var vt=O1(Kt[un]),At=vt.family,Tt=vt.stretch,Et=vt.style,St=vt.weight;rt[At]=rt[At]||{},rt[At][Tt]=rt[At][Tt]||{},rt[At][Tt][Et]=rt[At][Tt][Et]||{},rt[At][Tt][Et][St]=vt}return rt})(Je.concat(zn)),Ve=Ye}return Xe})(this.pdf,this.fontFaces),Wt=bt.map(function(pt){return{family:pt,stretch:"normal",weight:ut,style:xt}}),Gt=(function(pt,zn,be){for(var Ye=(be=be||{}).defaultFontFamily||"times",Je=Object.assign({},u8,be.genericFontFamilies||{}),Kt=null,rt=null,un=0;un<zn.length;++un)if(Je[(Kt=O1(zn[un])).family]&&(Kt.family=Je[Kt.family]),pt.hasOwnProperty(Kt.family)){rt=pt[Kt.family];break}if(!(rt=rt||pt[Ye]))throw new Error("Could not find a font-family for the rule '"+lm(Kt)+"' and default family '"+Ye+"'.");if(rt=(function(vt,At){if(At[vt])return At[vt];var Tt=i0[vt],Et=Tt<=i0.normal?-1:1,St=sm(At,nv,Tt,Et);if(!St)throw new Error("Could not find a matching font-stretch value for "+vt);return St})(Kt.stretch,rt),rt=(function(vt,At){if(At[vt])return At[vt];for(var Tt=tv[vt],Et=0;Et<Tt.length;++Et)if(At[Tt[Et]])return At[Tt[Et]];throw new Error("Could not find a matching font-style for "+vt)})(Kt.style,rt),!(rt=(function(vt,At){if(At[vt])return At[vt];if(vt===400&&At[500])return At[500];if(vt===500&&At[400])return At[400];var Tt=l8[vt],Et=sm(At,rv,Tt,vt<400?-1:1);if(!Et)throw new Error("Could not find a matching font-weight for value "+vt);return Et})(Kt.weight,rt)))throw new Error("Failed to resolve a font for the rule '"+lm(Kt)+"'.");return rt})(ht,Wt);this.pdf.setFont(Gt.ref.name,Gt.ref.style)}else{var wt="";(ut==="bold"||parseInt(ut,10)>=700||xt==="bold")&&(wt="bold"),xt==="italic"&&(wt+="italic"),wt.length===0&&(wt="normal");for(var _t="",Dt={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"},Ke=0;Ke<bt.length;Ke++){if(this.pdf.internal.getFont(bt[Ke],wt,{noFallback:!0,disableWarning:!0})!==void 0){_t=bt[Ke];break}if(wt==="bolditalic"&&this.pdf.internal.getFont(bt[Ke],"bold",{noFallback:!0,disableWarning:!0})!==void 0)_t=bt[Ke],wt="bold";else if(this.pdf.internal.getFont(bt[Ke],"normal",{noFallback:!0,disableWarning:!0})!==void 0){_t=bt[Ke],wt="normal";break}}if(_t===""){for(var qt=0;qt<bt.length;qt++)if(Dt[bt[qt]]){_t=Dt[bt[qt]];break}}_t=_t===""?"Times":_t,this.pdf.setFont(_t,wt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Y){this.ctx.globalCompositeOperation=Y}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Y){this.ctx.globalAlpha=Y}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Y){this.ctx.lineDashOffset=Y,oe.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Y){this.ctx.lineDash=Y,oe.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Y){this.ctx.ignoreClearRect=!!Y}})};_.prototype.setLineDash=function(L){this.lineDash=L},_.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},_.prototype.fill=function(){F.call(this,"fill",!1)},_.prototype.stroke=function(){F.call(this,"stroke",!1)},_.prototype.beginPath=function(){this.path=[{type:"begin"}]},_.prototype.moveTo=function(L,q){if(isNaN(L)||isNaN(q))throw En.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var V=this.ctx.transform.applyToPoint(new h(L,q));this.path.push({type:"mt",x:V.x,y:V.y}),this.ctx.lastPoint=new h(L,q)},_.prototype.closePath=function(){var L=new h(0,0),q=0;for(q=this.path.length-1;q!==-1;q--)if(this.path[q].type==="begin"&&_n(this.path[q+1])==="object"&&typeof this.path[q+1].x=="number"){L=new h(this.path[q+1].x,this.path[q+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new h(L.x,L.y)},_.prototype.lineTo=function(L,q){if(isNaN(L)||isNaN(q))throw En.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var V=this.ctx.transform.applyToPoint(new h(L,q));this.path.push({type:"lt",x:V.x,y:V.y}),this.ctx.lastPoint=new h(V.x,V.y)},_.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),F.call(this,null,!0)},_.prototype.quadraticCurveTo=function(L,q,V,te){if(isNaN(V)||isNaN(te)||isNaN(L)||isNaN(q))throw En.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ae=this.ctx.transform.applyToPoint(new h(V,te)),me=this.ctx.transform.applyToPoint(new h(L,q));this.path.push({type:"qct",x1:me.x,y1:me.y,x:ae.x,y:ae.y}),this.ctx.lastPoint=new h(ae.x,ae.y)},_.prototype.bezierCurveTo=function(L,q,V,te,ae,me){if(isNaN(ae)||isNaN(me)||isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te))throw En.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var _e=this.ctx.transform.applyToPoint(new h(ae,me)),Ee=this.ctx.transform.applyToPoint(new h(L,q)),ze=this.ctx.transform.applyToPoint(new h(V,te));this.path.push({type:"bct",x1:Ee.x,y1:Ee.y,x2:ze.x,y2:ze.y,x:_e.x,y:_e.y}),this.ctx.lastPoint=new h(_e.x,_e.y)},_.prototype.arc=function(L,q,V,te,ae,me){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te)||isNaN(ae))throw En.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(me=!!me,!this.ctx.transform.isIdentity){var _e=this.ctx.transform.applyToPoint(new h(L,q));L=_e.x,q=_e.y;var Ee=this.ctx.transform.applyToPoint(new h(0,V)),ze=this.ctx.transform.applyToPoint(new h(0,0));V=Math.sqrt(Math.pow(Ee.x-ze.x,2)+Math.pow(Ee.y-ze.y,2))}Math.abs(ae-te)>=2*Math.PI&&(te=0,ae=2*Math.PI),this.path.push({type:"arc",x:L,y:q,radius:V,startAngle:te,endAngle:ae,counterclockwise:me})},_.prototype.arcTo=function(L,q,V,te,ae){throw new Error("arcTo not implemented.")},_.prototype.rect=function(L,q,V,te){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te))throw En.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(L,q),this.lineTo(L+V,q),this.lineTo(L+V,q+te),this.lineTo(L,q+te),this.lineTo(L,q),this.lineTo(L+V,q),this.lineTo(L,q)},_.prototype.fillRect=function(L,q,V,te){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te))throw En.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!w.call(this)){var ae={};this.lineCap!=="butt"&&(ae.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ae.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(L,q,V,te),this.fill(),ae.hasOwnProperty("lineCap")&&(this.lineCap=ae.lineCap),ae.hasOwnProperty("lineJoin")&&(this.lineJoin=ae.lineJoin)}},_.prototype.strokeRect=function(L,q,V,te){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te))throw En.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");k.call(this)||(this.beginPath(),this.rect(L,q,V,te),this.stroke())},_.prototype.clearRect=function(L,q,V,te){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te))throw En.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(L,q,V,te))},_.prototype.save=function(L){L=typeof L!="boolean"||L;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,V=0;V<this.pdf.internal.getNumberOfPages();V++)this.pdf.setPage(V+1),this.pdf.internal.out("q");if(this.pdf.setPage(q),L){this.ctx.fontSize=this.pdf.internal.getFontSize();var te=new y(this.ctx);this.ctxStack.push(this.ctx),this.ctx=te}},_.prototype.restore=function(L){L=typeof L!="boolean"||L;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,V=0;V<this.pdf.internal.getNumberOfPages();V++)this.pdf.setPage(V+1),this.pdf.internal.out("Q");this.pdf.setPage(q),L&&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)},_.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var j=function(L){var q,V,te,ae;if(L.isCanvasGradient===!0&&(L=L.getColor()),!L)return{r:0,g:0,b:0,a:0,style:L};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(L))q=0,V=0,te=0,ae=0;else{var me=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(L);if(me!==null)q=parseInt(me[1]),V=parseInt(me[2]),te=parseInt(me[3]),ae=1;else if((me=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(L))!==null)q=parseInt(me[1]),V=parseInt(me[2]),te=parseInt(me[3]),ae=parseFloat(me[4]);else{if(ae=1,typeof L=="string"&&L.charAt(0)!=="#"){var _e=new Q5(L);L=_e.ok?_e.toHex():"#000000"}L.length===4?(q=L.substring(1,2),q+=q,V=L.substring(2,3),V+=V,te=L.substring(3,4),te+=te):(q=L.substring(1,3),V=L.substring(3,5),te=L.substring(5,7)),q=parseInt(q,16),V=parseInt(V,16),te=parseInt(te,16)}}return{r:q,g:V,b:te,a:ae,style:L}},w=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},k=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};_.prototype.fillText=function(L,q,V,te){if(isNaN(q)||isNaN(V)||typeof L!="string")throw En.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(te=isNaN(te)?void 0:te,!w.call(this)){var ae=le(this.ctx.transform.rotation),me=this.ctx.transform.scaleX;U.call(this,{text:L,x:q,y:V,scale:me,angle:ae,align:this.textAlign,maxWidth:te})}},_.prototype.strokeText=function(L,q,V,te){if(isNaN(q)||isNaN(V)||typeof L!="string")throw En.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!k.call(this)){te=isNaN(te)?void 0:te;var ae=le(this.ctx.transform.rotation),me=this.ctx.transform.scaleX;U.call(this,{text:L,x:q,y:V,scale:me,renderingMode:"stroke",angle:ae,align:this.textAlign,maxWidth:te})}},_.prototype.measureText=function(L){if(typeof L!="string")throw En.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var q=this.pdf,V=this.pdf.internal.scaleFactor,te=q.internal.getFontSize(),ae=q.getStringUnitWidth(L)*te/q.internal.scaleFactor;return new function(me){var _e=(me=me||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return _e}}),this}({width:ae*=Math.round(96*V/72*1e4)/1e4})},_.prototype.scale=function(L,q){if(isNaN(L)||isNaN(q))throw En.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var V=new f(L,0,0,q,0,0);this.ctx.transform=this.ctx.transform.multiply(V)},_.prototype.rotate=function(L){if(isNaN(L))throw En.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var q=new f(Math.cos(L),Math.sin(L),-Math.sin(L),Math.cos(L),0,0);this.ctx.transform=this.ctx.transform.multiply(q)},_.prototype.translate=function(L,q){if(isNaN(L)||isNaN(q))throw En.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var V=new f(1,0,0,1,L,q);this.ctx.transform=this.ctx.transform.multiply(V)},_.prototype.transform=function(L,q,V,te,ae,me){if(isNaN(L)||isNaN(q)||isNaN(V)||isNaN(te)||isNaN(ae)||isNaN(me))throw En.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var _e=new f(L,q,V,te,ae,me);this.ctx.transform=this.ctx.transform.multiply(_e)},_.prototype.setTransform=function(L,q,V,te,ae,me){L=isNaN(L)?1:L,q=isNaN(q)?0:q,V=isNaN(V)?0:V,te=isNaN(te)?1:te,ae=isNaN(ae)?0:ae,me=isNaN(me)?0:me,this.ctx.transform=new f(L,q,V,te,ae,me)};var T=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};_.prototype.drawImage=function(L,q,V,te,ae,me,_e,Ee,ze){var We=this.pdf.getImageProperties(L),Xe=1,Ve=1,dt=1,Y=1;te!==void 0&&Ee!==void 0&&(dt=Ee/te,Y=ze/ae,Xe=We.width/te*Ee/te,Ve=We.height/ae*ze/ae),me===void 0&&(me=q,_e=V,q=0,V=0),te!==void 0&&Ee===void 0&&(Ee=te,ze=ae),te===void 0&&Ee===void 0&&(Ee=We.width,ze=We.height);var Qe=this.ctx.transform.decompose(),xt=le(Qe.rotate.shx),ut=new f,Ie=(ut=(ut=(ut=ut.multiply(Qe.translate)).multiply(Qe.skew)).multiply(Qe.scale)).applyToRectangle(new d(me-q*dt,_e-V*Y,te*Xe,ae*Ve));if(this.autoPaging){for(var mt,Ze=D.call(this,Ie),bt=[],ht=0;ht<Ze.length;ht+=1)bt.indexOf(Ze[ht])===-1&&bt.push(Ze[ht]);W(bt);for(var Wt=bt[0],Gt=bt[bt.length-1],wt=Wt;wt<Gt+1;wt++){this.pdf.setPage(wt);var _t=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Dt=wt===1?this.posY+this.margin[0]:this.margin[0],Ke=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],pt=wt===1?0:Ke+(wt-2)*qt;if(this.ctx.clip_path.length!==0){var zn=this.path;mt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=K(mt,this.posX+this.margin[3],-pt+Dt+this.ctx.prevPageLastElemOffset),$.call(this,"fill",!0),this.path=zn}var be=JSON.parse(JSON.stringify(Ie));be=K([be],this.posX+this.margin[3],-pt+Dt+this.ctx.prevPageLastElemOffset)[0];var Ye=(wt>Wt||wt<Gt)&&T.call(this);Ye&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_t,qt,null).clip().discardPath()),this.pdf.addImage(L,"JPEG",be.x,be.y,be.w,be.h,null,null,xt),Ye&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(L,"JPEG",Ie.x,Ie.y,Ie.w,Ie.h,null,null,xt)};var D=function(L,q,V){var te=[];q=q||this.pdf.internal.pageSize.width,V=V||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ae=this.posY+this.ctx.prevPageLastElemOffset;switch(L.type){default:case"mt":case"lt":te.push(Math.floor((L.y+ae)/V)+1);break;case"arc":te.push(Math.floor((L.y+ae-L.radius)/V)+1),te.push(Math.floor((L.y+ae+L.radius)/V)+1);break;case"qct":var me=Ne(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x,L.y);te.push(Math.floor((me.y+ae)/V)+1),te.push(Math.floor((me.y+me.h+ae)/V)+1);break;case"bct":var _e=H(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x2,L.y2,L.x,L.y);te.push(Math.floor((_e.y+ae)/V)+1),te.push(Math.floor((_e.y+_e.h+ae)/V)+1);break;case"rect":te.push(Math.floor((L.y+ae)/V)+1),te.push(Math.floor((L.y+L.h+ae)/V)+1)}for(var Ee=0;Ee<te.length;Ee+=1)for(;this.pdf.internal.getNumberOfPages()<te[Ee];)C.call(this);return te},C=function(){var L=this.fillStyle,q=this.strokeStyle,V=this.font,te=this.lineCap,ae=this.lineWidth,me=this.lineJoin;this.pdf.addPage(),this.fillStyle=L,this.strokeStyle=q,this.font=V,this.lineCap=te,this.lineWidth=ae,this.lineJoin=me},K=function(L,q,V){for(var te=0;te<L.length;te++)switch(L[te].type){case"bct":L[te].x2+=q,L[te].y2+=V;case"qct":L[te].x1+=q,L[te].y1+=V;default:L[te].x+=q,L[te].y+=V}return L},W=function(L){return L.sort(function(q,V){return q-V})},F=function(L,q){var V=this.fillStyle,te=this.strokeStyle,ae=this.lineCap,me=this.lineWidth,_e=Math.abs(me*this.ctx.transform.scaleX),Ee=this.lineJoin;if(this.autoPaging){for(var ze,We,Xe=JSON.parse(JSON.stringify(this.path)),Ve=JSON.parse(JSON.stringify(this.path)),dt=[],Y=0;Y<Ve.length;Y++)if(Ve[Y].x!==void 0)for(var Qe=D.call(this,Ve[Y]),xt=0;xt<Qe.length;xt+=1)dt.indexOf(Qe[xt])===-1&&dt.push(Qe[xt]);for(var ut=0;ut<dt.length;ut++)for(;this.pdf.internal.getNumberOfPages()<dt[ut];)C.call(this);W(dt);for(var Ie=dt[0],mt=dt[dt.length-1],Ze=Ie;Ze<mt+1;Ze++){this.pdf.setPage(Ze),this.fillStyle=V,this.strokeStyle=te,this.lineCap=ae,this.lineWidth=_e,this.lineJoin=Ee;var bt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ht=Ze===1?this.posY+this.margin[0]:this.margin[0],Wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Gt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],wt=Ze===1?0:Wt+(Ze-2)*Gt;if(this.ctx.clip_path.length!==0){var _t=this.path;ze=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=K(ze,this.posX+this.margin[3],-wt+ht+this.ctx.prevPageLastElemOffset),$.call(this,L,!0),this.path=_t}if(We=JSON.parse(JSON.stringify(Xe)),this.path=K(We,this.posX+this.margin[3],-wt+ht+this.ctx.prevPageLastElemOffset),q===!1||Ze===0){var Dt=(Ze>Ie||Ze<mt)&&T.call(this);Dt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],bt,Gt,null).clip().discardPath()),$.call(this,L,q),Dt&&this.pdf.restoreGraphicsState()}this.lineWidth=me}this.path=Xe}else this.lineWidth=_e,$.call(this,L,q),this.lineWidth=me},$=function(L,q){if((L!=="stroke"||q||!k.call(this))&&(L==="stroke"||q||!w.call(this))){for(var V,te,ae=[],me=this.path,_e=0;_e<me.length;_e++){var Ee=me[_e];switch(Ee.type){case"begin":ae.push({begin:!0});break;case"close":ae.push({close:!0});break;case"mt":ae.push({start:Ee,deltas:[],abs:[]});break;case"lt":var ze=ae.length;if(me[_e-1]&&!isNaN(me[_e-1].x)&&(V=[Ee.x-me[_e-1].x,Ee.y-me[_e-1].y],ze>0)){for(;ze>=0;ze--)if(ae[ze-1].close!==!0&&ae[ze-1].begin!==!0){ae[ze-1].deltas.push(V),ae[ze-1].abs.push(Ee);break}}break;case"bct":V=[Ee.x1-me[_e-1].x,Ee.y1-me[_e-1].y,Ee.x2-me[_e-1].x,Ee.y2-me[_e-1].y,Ee.x-me[_e-1].x,Ee.y-me[_e-1].y],ae[ae.length-1].deltas.push(V);break;case"qct":var We=me[_e-1].x+2/3*(Ee.x1-me[_e-1].x),Xe=me[_e-1].y+2/3*(Ee.y1-me[_e-1].y),Ve=Ee.x+2/3*(Ee.x1-Ee.x),dt=Ee.y+2/3*(Ee.y1-Ee.y),Y=Ee.x,Qe=Ee.y;V=[We-me[_e-1].x,Xe-me[_e-1].y,Ve-me[_e-1].x,dt-me[_e-1].y,Y-me[_e-1].x,Qe-me[_e-1].y],ae[ae.length-1].deltas.push(V);break;case"arc":ae.push({deltas:[],abs:[],arc:!0}),Array.isArray(ae[ae.length-1].abs)&&ae[ae.length-1].abs.push(Ee)}}te=q?null:L==="stroke"?"stroke":"fill";for(var xt=!1,ut=0;ut<ae.length;ut++)if(ae[ut].arc)for(var Ie=ae[ut].abs,mt=0;mt<Ie.length;mt++){var Ze=Ie[mt];Ze.type==="arc"?se.call(this,Ze.x,Ze.y,Ze.radius,Ze.startAngle,Ze.endAngle,Ze.counterclockwise,void 0,q,!xt):G.call(this,Ze.x,Ze.y),xt=!0}else if(ae[ut].close===!0)this.pdf.internal.out("h"),xt=!1;else if(ae[ut].begin!==!0){var bt=ae[ut].start.x,ht=ae[ut].start.y;ne.call(this,ae[ut].deltas,bt,ht),xt=!0}te&&J.call(this,te),q&&pe.call(this)}},Le=function(L){var q=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,V=q*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return L-V;case"top":return L+q-V;case"hanging":return L+q-2*V;case"middle":return L+q/2-V;default:return L}},ke=function(L){return L+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};_.prototype.createLinearGradient=function(){var L=function(){};return L.colorStops=[],L.addColorStop=function(q,V){this.colorStops.push([q,V])},L.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},L.isCanvasGradient=!0,L},_.prototype.createPattern=function(){return this.createLinearGradient()},_.prototype.createRadialGradient=function(){return this.createLinearGradient()};var se=function(L,q,V,te,ae,me,_e,Ee,ze){for(var We=ee.call(this,V,te,ae,me),Xe=0;Xe<We.length;Xe++){var Ve=We[Xe];Xe===0&&(ze?O.call(this,Ve.x1+L,Ve.y1+q):G.call(this,Ve.x1+L,Ve.y1+q)),Se.call(this,L,q,Ve.x2,Ve.y2,Ve.x3,Ve.y3,Ve.x4,Ve.y4)}Ee?pe.call(this):J.call(this,_e)},J=function(L){switch(L){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},pe=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(L,q){this.pdf.internal.out(a(L)+" "+s(q)+" m")},U=function(L){var q;switch(L.align){case"right":case"end":q="right";break;case"center":q="center";break;default:q="left"}var V,te,ae,me=this.pdf.getTextDimensions(L.text),_e=Le.call(this,L.y),Ee=ke.call(this,_e)-me.h,ze=this.ctx.transform.applyToPoint(new h(L.x,_e));if(this.autoPaging){var We=this.ctx.transform.decompose(),Xe=new f;Xe=(Xe=(Xe=Xe.multiply(We.translate)).multiply(We.skew)).multiply(We.scale);for(var Ve=this.ctx.transform.applyToRectangle(new d(L.x,_e,me.w,me.h)),dt=Xe.applyToRectangle(new d(L.x,Ee,me.w,me.h)),Y=D.call(this,dt),Qe=[],xt=0;xt<Y.length;xt+=1)Qe.indexOf(Y[xt])===-1&&Qe.push(Y[xt]);W(Qe);for(var ut=Qe[0],Ie=Qe[Qe.length-1],mt=ut;mt<Ie+1;mt++){this.pdf.setPage(mt);var Ze=mt===1?this.posY+this.margin[0]:this.margin[0],bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[2],Wt=ht-this.margin[0],Gt=this.pdf.internal.pageSize.width-this.margin[1],wt=Gt-this.margin[3],_t=mt===1?0:bt+(mt-2)*Wt;if(this.ctx.clip_path.length!==0){var Dt=this.path;V=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=K(V,this.posX+this.margin[3],-1*_t+Ze),$.call(this,"fill",!0),this.path=Dt}var Ke=K([JSON.parse(JSON.stringify(dt))],this.posX+this.margin[3],-_t+Ze+this.ctx.prevPageLastElemOffset)[0];L.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*L.scale),ae=this.lineWidth,this.lineWidth=ae*L.scale);var qt=this.autoPaging!=="text";if(qt||Ke.y+Ke.h<=ht){if(qt||Ke.y>=Ze&&Ke.x<=Gt){var pt=qt?L.text:this.pdf.splitTextToSize(L.text,L.maxWidth||Gt-Ke.x)[0],zn=K([JSON.parse(JSON.stringify(Ve))],this.posX+this.margin[3],-_t+Ze+this.ctx.prevPageLastElemOffset)[0],be=qt&&(mt>ut||mt<Ie)&&T.call(this);be&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],wt,Wt,null).clip().discardPath()),this.pdf.text(pt,zn.x,zn.y,{angle:L.angle,align:q,renderingMode:L.renderingMode}),be&&this.pdf.restoreGraphicsState()}}else Ke.y<ht&&(this.ctx.prevPageLastElemOffset+=ht-Ke.y);L.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=ae)}}else L.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*L.scale),ae=this.lineWidth,this.lineWidth=ae*L.scale),this.pdf.text(L.text,ze.x+this.posX,ze.y+this.posY,{angle:L.angle,align:q,renderingMode:L.renderingMode,maxWidth:L.maxWidth}),L.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=ae)},G=function(L,q,V,te){V=V||0,te=te||0,this.pdf.internal.out(a(L+V)+" "+s(q+te)+" l")},ne=function(L,q,V){return this.pdf.lines(L,q,V,null,null)},Se=function(L,q,V,te,ae,me,_e,Ee){this.pdf.internal.out([n(o(V+L)),n(u(te+q)),n(o(ae+L)),n(u(me+q)),n(o(_e+L)),n(u(Ee+q)),"c"].join(" "))},ee=function(L,q,V,te){for(var ae=2*Math.PI,me=Math.PI/2;q>V;)q-=ae;var _e=Math.abs(V-q);_e<ae&&te&&(_e=ae-_e);for(var Ee=[],ze=te?-1:1,We=q;_e>1e-5;){var Xe=We+ze*Math.min(_e,me);Ee.push(ce.call(this,L,We,Xe)),_e-=Math.abs(Xe-We),We=Xe}return Ee},ce=function(L,q,V){var te=(V-q)/2,ae=L*Math.cos(te),me=L*Math.sin(te),_e=ae,Ee=-me,ze=_e*_e+Ee*Ee,We=ze+_e*ae+Ee*me,Xe=4/3*(Math.sqrt(2*ze*We)-We)/(_e*me-Ee*ae),Ve=_e-Xe*Ee,dt=Ee+Xe*_e,Y=Ve,Qe=-dt,xt=te+q,ut=Math.cos(xt),Ie=Math.sin(xt);return{x1:L*Math.cos(q),y1:L*Math.sin(q),x2:Ve*ut-dt*Ie,y2:Ve*Ie+dt*ut,x3:Y*ut-Qe*Ie,y3:Y*Ie+Qe*ut,x4:L*Math.cos(V),y4:L*Math.sin(V)}},le=function(L){return 180*L/Math.PI},Ne=function(L,q,V,te,ae,me){var _e=L+.5*(V-L),Ee=q+.5*(te-q),ze=ae+.5*(V-ae),We=me+.5*(te-me),Xe=Math.min(L,ae,_e,ze),Ve=Math.max(L,ae,_e,ze),dt=Math.min(q,me,Ee,We),Y=Math.max(q,me,Ee,We);return new d(Xe,dt,Ve-Xe,Y-dt)},H=function(L,q,V,te,ae,me,_e,Ee){var ze,We,Xe,Ve,dt,Y,Qe,xt,ut,Ie,mt,Ze,bt,ht,Wt=V-L,Gt=te-q,wt=ae-V,_t=me-te,Dt=_e-ae,Ke=Ee-me;for(We=0;We<41;We++)ut=(Qe=(Xe=L+(ze=We/40)*Wt)+ze*((dt=V+ze*wt)-Xe))+ze*(dt+ze*(ae+ze*Dt-dt)-Qe),Ie=(xt=(Ve=q+ze*Gt)+ze*((Y=te+ze*_t)-Ve))+ze*(Y+ze*(me+ze*Ke-Y)-xt),We==0?(mt=ut,Ze=Ie,bt=ut,ht=Ie):(mt=Math.min(mt,ut),Ze=Math.min(Ze,Ie),bt=Math.max(bt,ut),ht=Math.max(ht,Ie));return new d(Math.round(mt),Math.round(Ze),Math.round(bt-mt),Math.round(ht-Ze))},oe=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var L,q,V=(L=this.ctx.lineDash,q=this.ctx.lineDashOffset,JSON.stringify({lineDash:L,lineDashOffset:q}));this.prevLineDash!==V&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=V)}}})(gt.API),(function(t){var n=function(h){var d,f,m,y,_,j,w,k,T,D;for(f=[],m=0,y=(h+=d="\0\0\0\0".slice(h.length%4||4)).length;y>m;m+=4)(_=(h.charCodeAt(m)<<24)+(h.charCodeAt(m+1)<<16)+(h.charCodeAt(m+2)<<8)+h.charCodeAt(m+3))!==0?(j=(_=((_=((_=((_=(_-(D=_%85))/85)-(T=_%85))/85)-(k=_%85))/85)-(w=_%85))/85)%85,f.push(j+33,w+33,k+33,T+33,D+33)):f.push(122);return(function(C,K){for(var W=K;W>0;W--)C.pop()})(f,d.length),String.fromCharCode.apply(String,f)+"~>"},a=function(h){var d,f,m,y,_,j=String,w="length",k=255,T="charCodeAt",D="slice",C="replace";for(h[D](-2),h=h[D](0,-2)[C](/\s/g,"")[C]("z","!!!!!"),m=[],y=0,_=(h+=d="uuuuu"[D](h[w]%5||5))[w];_>y;y+=5)f=52200625*(h[T](y)-33)+614125*(h[T](y+1)-33)+7225*(h[T](y+2)-33)+85*(h[T](y+3)-33)+(h[T](y+4)-33),m.push(k&f>>24,k&f>>16,k&f>>8,k&f);return(function(K,W){for(var F=W;F>0;F--)K.pop()})(m,d[w]),j.fromCharCode.apply(j,m)},s=function(h){return h.split("").map(function(d){return("0"+d.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(h){var d=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((h=h.replace(/\s/g,"")).indexOf(">")!==-1&&(h=h.substr(0,h.indexOf(">"))),h.length%2&&(h+="0"),d.test(h)===!1)return"";for(var f="",m=0;m<h.length;m+=2)f+=String.fromCharCode("0x"+(h[m]+h[m+1]));return f},u=function(h){for(var d=new Uint8Array(h.length),f=h.length;f--;)d[f]=h.charCodeAt(f);return(d=$1(d)).reduce(function(m,y){return m+String.fromCharCode(y)},"")};t.processDataByFilters=function(h,d){var f=0,m=h||"",y=[];for(typeof(d=d||[])=="string"&&(d=[d]),f=0;f<d.length;f+=1)switch(d[f]){case"ASCII85Decode":case"/ASCII85Decode":m=a(m),y.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":m=n(m),y.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":m=o(m),y.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":m=s(m),y.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":m=u(m),y.push("/FlateDecode");break;default:throw new Error('The filter: "'+d[f]+'" is not implemented')}return{data:m,reverseChain:y.reverse().join(" ")}}})(gt.API),(function(t){t.loadFile=function(n,a,s){return(function(o,u,h){u=u!==!1,h=typeof h=="function"?h:function(){};var d=void 0;try{d=(function(f,m,y){var _=new XMLHttpRequest,j=0,w=function(k){var T=k.length,D=[],C=String.fromCharCode;for(j=0;j<T;j+=1)D.push(C(255&k.charCodeAt(j)));return D.join("")};if(_.open("GET",f,!m),_.overrideMimeType("text/plain; charset=x-user-defined"),m===!1&&(_.onload=function(){_.status===200?y(w(this.responseText)):y(void 0)}),_.send(null),m&&_.status===200)return w(_.responseText)})(o,u,h)}catch{}return d})(n,a,s)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile})(gt.API),(function(t){function n(){return(Pt.html2canvas?Promise.resolve(Pt.html2canvas):Md(()=>import("./html2canvas.esm-DXEQVQnt.js"),[])).catch(function(d){return Promise.reject(new Error("Could not load html2canvas: "+d))}).then(function(d){return d.default?d.default:d})}function a(){return(Pt.DOMPurify?Promise.resolve(Pt.DOMPurify):Md(()=>import("./purify.es-CovBOfck.js"),[])).catch(function(d){return Promise.reject(new Error("Could not load dompurify: "+d))}).then(function(d){return d.default?d.default:d})}var s=function(d){var f=_n(d);return f==="undefined"?"undefined":f==="string"||d instanceof String?"string":f==="number"||d instanceof Number?"number":f==="function"||d instanceof Function?"function":d&&d.constructor===Array?"array":d&&d.nodeType===1?"element":f==="object"?"object":"unknown"},o=function(d,f){var m=document.createElement(d);for(var y in f.className&&(m.className=f.className),f.innerHTML&&f.dompurify&&(m.innerHTML=f.dompurify.sanitize(f.innerHTML)),f.style)m.style[y]=f.style[y];return m},u=function d(f,m){for(var y=f.nodeType===3?document.createTextNode(f.nodeValue):f.cloneNode(!1),_=f.firstChild;_;_=_.nextSibling)m!==!0&&_.nodeType===1&&_.nodeName==="SCRIPT"||y.appendChild(d(_,m));return f.nodeType===1&&(f.nodeName==="CANVAS"?(y.width=f.width,y.height=f.height,y.getContext("2d").drawImage(f,0,0)):f.nodeName!=="TEXTAREA"&&f.nodeName!=="SELECT"||(y.value=f.value),y.addEventListener("load",function(){y.scrollTop=f.scrollTop,y.scrollLeft=f.scrollLeft},!0)),y},h=function d(f){var m=Object.assign(d.convert(Promise.resolve()),JSON.parse(JSON.stringify(d.template))),y=d.convert(Promise.resolve(),m);return(y=y.setProgress(1,d,1,[d])).set(f)};(h.prototype=Object.create(Promise.prototype)).constructor=h,h.convert=function(d,f){return d.__proto__=f||h.prototype,d},h.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"}},h.prototype.from=function(d,f){return this.then(function(){switch(f=f||(function(m){switch(s(m)){case"string":return"string";case"element":return m.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(d),f){case"string":return this.then(a).then(function(m){return this.set({src:o("div",{innerHTML:d,dompurify:m})})});case"element":return this.set({src:d});case"canvas":return this.set({canvas:d});case"img":return this.set({img:d});default:return this.error("Unknown source type.")}})},h.prototype.to=function(d){switch(d){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.")}},h.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 d={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},f=u(this.prop.src,this.opt.html2canvas.javascriptEnabled);f.tagName==="BODY"&&(d.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:d}),this.prop.container.appendChild(f),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"})},h.prototype.toCanvas=function(){var d=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(d).then(n).then(function(f){var m=Object.assign({},this.opt.html2canvas);return delete m.onrendered,f(this.prop.container,m)}).then(function(f){(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toContext2d=function(){var d=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(d).then(n).then(function(f){var m=this.opt.jsPDF,y=this.opt.fontFaces,_=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,j=Object.assign({async:!0,allowTaint:!0,scale:_,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 j.onrendered,m.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,m.context2d.posX=this.opt.x,m.context2d.posY=this.opt.y,m.context2d.margin=this.opt.margin,m.context2d.fontFaces=y,y)for(var w=0;w<y.length;++w){var k=y[w],T=k.src.find(function(D){return D.format==="truetype"});T&&m.addFont(T.url,k.ref.name,k.ref.style)}return j.windowHeight=j.windowHeight||0,j.windowHeight=j.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):j.windowHeight,m.context2d.save(!0),f(this.prop.container,j)}).then(function(f){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var d=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=d})},h.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},h.prototype.output=function(d,f,m){return(m=m||"pdf").toLowerCase()==="img"||m.toLowerCase()==="image"?this.outputImg(d,f):this.outputPdf(d,f)},h.prototype.outputPdf=function(d,f){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(d,f)})},h.prototype.outputImg=function(d){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(d){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 "'+d+'" is not supported.'}})},h.prototype.save=function(d){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(d?{filename:d}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},h.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},h.prototype.set=function(d){if(s(d)!=="object")return this;var f=Object.keys(d||{}).map(function(m){if(m in h.template.prop)return function(){this.prop[m]=d[m]};switch(m){case"margin":return this.setMargin.bind(this,d.margin);case"jsPDF":return function(){return this.opt.jsPDF=d.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,d.pageSize);default:return function(){this.opt[m]=d[m]}}},this);return this.then(function(){return this.thenList(f)})},h.prototype.get=function(d,f){return this.then(function(){var m=d in h.template.prop?this.prop[d]:this.opt[d];return f?f(m):m})},h.prototype.setMargin=function(d){return this.then(function(){switch(s(d)){case"number":d=[d,d,d,d];case"array":if(d.length===2&&(d=[d[0],d[1],d[0],d[1]]),d.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=d}).then(this.setPageSize)},h.prototype.setPageSize=function(d){function f(m,y){return Math.floor(m*y/72*96)}return this.then(function(){(d=d||gt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(d.inner={width:d.width-this.opt.margin[1]-this.opt.margin[3],height:d.height-this.opt.margin[0]-this.opt.margin[2]},d.inner.px={width:f(d.inner.width,d.k),height:f(d.inner.height,d.k)},d.inner.ratio=d.inner.height/d.inner.width),this.prop.pageSize=d})},h.prototype.setProgress=function(d,f,m,y){return d!=null&&(this.progress.val=d),f!=null&&(this.progress.state=f),m!=null&&(this.progress.n=m),y!=null&&(this.progress.stack=y),this.progress.ratio=this.progress.val/this.progress.state,this},h.prototype.updateProgress=function(d,f,m,y){return this.setProgress(d?this.progress.val+d:null,f||null,m?this.progress.n+m:null,y?this.progress.stack.concat(y):null)},h.prototype.then=function(d,f){var m=this;return this.thenCore(d,f,function(y,_){return m.updateProgress(null,null,1,[y]),Promise.prototype.then.call(this,function(j){return m.updateProgress(null,y),j}).then(y,_).then(function(j){return m.updateProgress(1),j})})},h.prototype.thenCore=function(d,f,m){m=m||Promise.prototype.then;var y=this;d&&(d=d.bind(y)),f&&(f=f.bind(y));var _=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?y:h.convert(Object.assign({},y),Promise.prototype),j=m.call(_,d,f);return h.convert(j,y.__proto__)},h.prototype.thenExternal=function(d,f){return Promise.prototype.then.call(this,d,f)},h.prototype.thenList=function(d){var f=this;return d.forEach(function(m){f=f.thenCore(m)}),f},h.prototype.catch=function(d){d&&(d=d.bind(this));var f=Promise.prototype.catch.call(this,d);return h.convert(f,this)},h.prototype.catchExternal=function(d){return Promise.prototype.catch.call(this,d)},h.prototype.error=function(d){return this.then(function(){throw new Error(d)})},h.prototype.using=h.prototype.set,h.prototype.saveAs=h.prototype.save,h.prototype.export=h.prototype.output,h.prototype.run=h.prototype.then,gt.getPageSize=function(d,f,m){if(_n(d)==="object"){var y=d;d=y.orientation,f=y.unit||f,m=y.format||m}f=f||"mm",m=m||"a4",d=(""+(d||"P")).toLowerCase();var _,j=(""+m).toLowerCase(),w={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(f){case"pt":_=1;break;case"mm":_=72/25.4;break;case"cm":_=72/2.54;break;case"in":_=72;break;case"px":_=.75;break;case"pc":case"em":_=12;break;case"ex":_=6;break;default:throw"Invalid unit: "+f}var k,T=0,D=0;if(w.hasOwnProperty(j))T=w[j][1]/_,D=w[j][0]/_;else try{T=m[1],D=m[0]}catch{throw new Error("Invalid format: "+m)}if(d==="p"||d==="portrait")d="p",D>T&&(k=D,D=T,T=k);else{if(d!=="l"&&d!=="landscape")throw"Invalid orientation: "+d;d="l",T>D&&(k=D,D=T,T=k)}return{width:D,height:T,unit:f,k:_,orientation:d}},t.html=function(d,f){(f=f||{}).callback=f.callback||function(){},f.html2canvas=f.html2canvas||{},f.html2canvas.canvas=f.html2canvas.canvas||this.canvas,f.jsPDF=f.jsPDF||this,f.fontFaces=f.fontFaces?f.fontFaces.map(O1):null;var m=new h(f);return f.worker?m:m.from(d).doCallback()}})(gt.API),gt.API.addJS=function(t){var n,a,s=(function(o){for(var u="",h=0;h<o.length;h++){var d=o[h];if(d==="("||d===")"){for(var f=0,m=h-1;m>=0&&o[m]==="\\";m--)f++;u+=f%2==0?"\\"+d:d}else u+=d}return u})(t);return this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(n+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),a=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+s+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){n!==void 0&&a!==void 0&&this.internal.out("/Names <</JavaScript "+n+" 0 R>>")}),this},(function(t){var n;t.events.push(["postPutResources",function(){var a=this,s=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=a.outline.render().split(/\r\n/),u=0;u<o.length;u++){var h=o[u],d=s.exec(h);if(d!=null){var f=d[1];a.internal.newObjectDeferredBegin(f,!1)}a.internal.write(h)}if(this.outline.createNamedDestinations){var m=this.internal.pages.length,y=[];for(u=0;u<m;u++){var _=a.internal.newObject();y.push(_);var j=a.internal.getPageInfo(u+1);a.internal.write("<< /D["+j.objId+" 0 R /XYZ null null null]>> endobj")}var w=a.internal.newObject();for(a.internal.write("<< /Names [ "),u=0;u<y.length;u++)a.internal.write("(page_"+(u+1)+")"+y[u]+" 0 R");a.internal.write(" ] >>","endobj"),n=a.internal.newObject(),a.internal.write("<< /Dests "+w+" 0 R"),a.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var a=this;a.outline.root.children.length>0&&(a.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&a.internal.write("/Names "+n+" 0 R"))}]),t.events.push(["initialized",function(){var a=this;a.outline={createNamedDestinations:!1,root:{children:[]}},a.outline.add=function(s,o,u){var h={title:o,options:u,children:[]};return s==null&&(s=this.root),s.children.push(h),h},a.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=a,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},a.outline.genIds_r=function(s){s.id=a.internal.newObjectDeferred();for(var o=0;o<s.children.length;o++)this.genIds_r(s.children[o])},a.outline.renderRoot=function(s){this.objStart(s),this.line("/Type /Outlines"),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1]))),this.line("/Count "+this.count_r({count:0},s)),this.objEnd()},a.outline.renderItems=function(s){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,u=0;u<s.children.length;u++){var h=s.children[u];this.objStart(h),this.line("/Title "+this.makeString(h.title)),this.line("/Parent "+this.makeRef(s)),u>0&&this.line("/Prev "+this.makeRef(s.children[u-1])),u<s.children.length-1&&this.line("/Next "+this.makeRef(s.children[u+1])),h.children.length>0&&(this.line("/First "+this.makeRef(h.children[0])),this.line("/Last "+this.makeRef(h.children[h.children.length-1])));var d=this.count=this.count_r({count:0},h);if(d>0&&this.line("/Count "+d),h.options&&h.options.pageNumber){var f=a.internal.getPageInfo(h.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var m=0;m<s.children.length;m++)this.renderItems(s.children[m])},a.outline.line=function(s){this.ctx.val+=s+`\r
|
|
92
|
+
`},a.outline.makeRef=function(s){return s.id+" 0 R"},a.outline.makeString=function(s){return"("+a.internal.pdfEscape(s)+")"},a.outline.objStart=function(s){this.ctx.val+=`\r
|
|
93
|
+
`+s.id+` 0 obj\r
|
|
94
|
+
<<\r
|
|
95
|
+
`},a.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
96
|
+
endobj\r
|
|
97
|
+
`},a.outline.count_r=function(s,o){for(var u=0;u<o.children.length;u++)s.count++,this.count_r(s,o.children[u]);return s.count}}])})(gt.API),(function(t){var n=[192,193,194,195,196,197,198,199];t.processJPEG=function(a,s,o,u,h,d){var f,m=this.decode.DCT_DECODE,y=null;if(typeof a=="string"||this.__addimage__.isArrayBuffer(a)||this.__addimage__.isArrayBufferView(a)){switch(a=h||a,a=this.__addimage__.isArrayBuffer(a)?new Uint8Array(a):a,f=(function(_){for(var j,w=256*_.charCodeAt(4)+_.charCodeAt(5),k=_.length,T={width:0,height:0,numcomponents:1},D=4;D<k;D+=2){if(D+=w,n.indexOf(_.charCodeAt(D+1))!==-1){j=256*_.charCodeAt(D+5)+_.charCodeAt(D+6),T={width:256*_.charCodeAt(D+7)+_.charCodeAt(D+8),height:j,numcomponents:_.charCodeAt(D+9)};break}w=256*_.charCodeAt(D+2)+_.charCodeAt(D+3)}return T})(a=this.__addimage__.isArrayBufferView(a)?this.__addimage__.arrayBufferToBinaryString(a):a),f.numcomponents){case 1:d=this.color_spaces.DEVICE_GRAY;break;case 4:d=this.color_spaces.DEVICE_CMYK;break;case 3:d=this.color_spaces.DEVICE_RGB}y={data:a,width:f.width,height:f.height,colorSpace:d,bitsPerComponent:8,filter:m,index:s,alias:o}}return y}})(gt.API),gt.API.processPNG=function(t,n,a,s){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var o,u=QS(t,{checkCrc:!0}),h=u.width,d=u.height,f=u.channels,m=u.palette,y=u.depth;o=m&&f===1?(function(se){for(var J=se.width,pe=se.height,O=se.data,U=se.palette,G=se.depth,ne=!1,Se=[],ee=[],ce=void 0,le=!1,Ne=0,H=0;H<U.length;H++){var oe=gg(U[H],4),L=oe[0],q=oe[1],V=oe[2],te=oe[3];Se.push(L,q,V),te!=null&&(te===0?(Ne++,ee.length<1&&ee.push(H)):te<255&&(le=!0))}if(le||Ne>1){ne=!0,ee=void 0;var ae=J*pe;ce=new Uint8Array(ae);for(var me=new DataView(O.buffer),_e=0;_e<ae;_e++){var Ee=D1(me,_e,G),ze=gg(U[Ee],4)[3];ce[_e]=ze}}else Ne===0&&(ee=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:ne?8:void 0,colorBytes:O,alphaBytes:ce,needSMask:ne,palette:Se,mask:ee}})(u):f===2||f===4?(function(se){for(var J=se.data,pe=se.width,O=se.height,U=se.channels,G=se.depth,ne=U===2?"DeviceGray":"DeviceRGB",Se=U-1,ee=pe*O,ce=Se,le=ee*ce,Ne=1*ee,H=Math.ceil(le*G/8),oe=Math.ceil(Ne*G/8),L=new Uint8Array(H),q=new Uint8Array(oe),V=new DataView(J.buffer),te=new DataView(L.buffer),ae=new DataView(q.buffer),me=!1,_e=0;_e<ee;_e++){for(var Ee=_e*U,ze=0;ze<ce;ze++)ym(te,D1(V,Ee+ze,G),_e*ce+ze,G);var We=D1(V,Ee+ce,G);We<(1<<G)-1&&(me=!0),ym(ae,We,1*_e,G)}return{colorSpace:ne,colorsPerPixel:Se,sMaskBitsPerComponent:me?G:void 0,colorBytes:L,alphaBytes:q,needSMask:me}})(u):(function(se){var J=se.data,pe=se.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:pe,colorsPerPixel:pe==="DeviceGray"?1:3,colorBytes:J instanceof Uint16Array?(function(O){for(var U=O.length,G=new Uint8Array(2*U),ne=new DataView(G.buffer,G.byteOffset,G.byteLength),Se=0;Se<U;Se++)ne.setUint16(2*Se,O[Se],!1);return G})(J):J,needSMask:!1}})(u);var _,j,w,k=o,T=k.colorSpace,D=k.colorsPerPixel,C=k.sMaskBitsPerComponent,K=k.colorBytes,W=k.alphaBytes,F=k.needSMask,$=k.palette,Le=k.mask,ke=null;return s!==gt.API.image_compression.NONE&&typeof $1=="function"?(ke=(function(se){var J;switch(se){case gt.API.image_compression.FAST:J=11;break;case gt.API.image_compression.MEDIUM:J=13;break;case gt.API.image_compression.SLOW:J=14;break;default:J=12}return J})(s),_=this.decode.FLATE_DECODE,j="/Predictor ".concat(ke," /Colors ").concat(D," /BitsPerComponent ").concat(y," /Columns ").concat(h),t=hm(K,Math.ceil(h*D*y/8),D,y,s),F&&(w=hm(W,Math.ceil(h*C/8),1,C,s))):(_=void 0,j=void 0,t=K,F&&(w=W)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(w&&this.__addimage__.isArrayBuffer(w)||this.__addimage__.isArrayBufferView(w))&&(w=this.__addimage__.arrayBufferToBinaryString(w)),{alias:a,data:t,index:n,filter:_,decodeParameters:j,transparency:Le,palette:$,sMask:w,predictor:ke,width:h,height:d,bitsPerComponent:y,sMaskBitsPerComponent:C,colorSpace:T}}},(function(t){t.processGIF89A=function(n,a,s,o){var u=new g8(n),h=u.width,d=u.height,f=[];u.decodeAndBlitFrameRGBA(0,f);var m={data:f,width:h,height:d},y=new z1(100).encode(m,100);return t.processJPEG.call(this,y,a,s,o)},t.processGIF87A=t.processGIF89A})(gt.API),Yi.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 t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var n=0;n<t;n++){var a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:o,green:s,blue:a,quad:u}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Yi.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,n=this.width*this.height*4;if(n>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(n);try{this[t]()}catch(a){En.log("bit decode error:"+a)}},Yi.prototype.bit1=function(){var t,n=Math.ceil(this.width/8),a=n%4;for(t=this.height-1;t>=0;t--){for(var s=this.bottom_up?t:this.height-1-t,o=0;o<n;o++)for(var u=this.datav.getUint8(this.pos++,!0),h=s*this.width*4+8*o*4,d=0;d<8&&8*o+d<this.width;d++){var f=this.palette[u>>7-d&1];this.data[h+4*d]=f.blue,this.data[h+4*d+1]=f.green,this.data[h+4*d+2]=f.red,this.data[h+4*d+3]=255}a!==0&&(this.pos+=4-a)}},Yi.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),n=t%4,a=this.height-1;a>=0;a--){for(var s=this.bottom_up?a:this.height-1-a,o=0;o<t;o++){var u=this.datav.getUint8(this.pos++,!0),h=s*this.width*4+2*o*4,d=u>>4,f=15&u,m=this.palette[d];if(this.data[h]=m.blue,this.data[h+1]=m.green,this.data[h+2]=m.red,this.data[h+3]=255,2*o+1>=this.width)break;m=this.palette[f],this.data[h+4]=m.blue,this.data[h+4+1]=m.green,this.data[h+4+2]=m.red,this.data[h+4+3]=255}n!==0&&(this.pos+=4-n)}},Yi.prototype.bit8=function(){for(var t=this.width%4,n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,s=0;s<this.width;s++){var o=this.datav.getUint8(this.pos++,!0),u=a*this.width*4+4*s;if(o<this.palette.length){var h=this.palette[o];this.data[u]=h.red,this.data[u+1]=h.green,this.data[u+2]=h.blue,this.data[u+3]=255}else this.data[u]=255,this.data[u+1]=255,this.data[u+2]=255,this.data[u+3]=255}t!==0&&(this.pos+=4-t)}},Yi.prototype.bit15=function(){for(var t=this.width%3,n=parseInt("11111",2),a=this.height-1;a>=0;a--){for(var s=this.bottom_up?a:this.height-1-a,o=0;o<this.width;o++){var u=this.datav.getUint16(this.pos,!0);this.pos+=2;var h=(u&n)/n*255|0,d=(u>>5&n)/n*255|0,f=(u>>10&n)/n*255|0,m=u>>15?255:0,y=s*this.width*4+4*o;this.data[y]=f,this.data[y+1]=d,this.data[y+2]=h,this.data[y+3]=m}this.pos+=t}},Yi.prototype.bit16=function(){for(var t=this.width%3,n=parseInt("11111",2),a=parseInt("111111",2),s=this.height-1;s>=0;s--){for(var o=this.bottom_up?s:this.height-1-s,u=0;u<this.width;u++){var h=this.datav.getUint16(this.pos,!0);this.pos+=2;var d=(h&n)/n*255|0,f=(h>>5&a)/a*255|0,m=(h>>11)/n*255|0,y=o*this.width*4+4*u;this.data[y]=m,this.data[y+1]=f,this.data[y+2]=d,this.data[y+3]=255}this.pos+=t}},Yi.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),h=n*this.width*4+4*a;this.data[h]=u,this.data[h+1]=o,this.data[h+2]=s,this.data[h+3]=255}this.pos+=this.width%4}},Yi.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),h=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+4*a;this.data[d]=u,this.data[d+1]=o,this.data[d+2]=s,this.data[d+3]=h}},Yi.prototype.getData=function(){return this.data},(function(t){t.processBMP=function(n,a,s,o){var u=new Yi(n,!1),h=u.width,d=u.height,f={data:u.getData(),width:h,height:d},m=new z1(100).encode(f,100);return t.processJPEG.call(this,m,a,s,o)}})(gt.API),xm.prototype.getData=function(){return this.data},(function(t){t.processWEBP=function(n,a,s,o){var u=new xm(n),h=u.width,d=u.height,f={data:u.getData(),width:h,height:d},m=new z1(100).encode(f,100);return t.processJPEG.call(this,m,a,s,o)}})(gt.API),gt.API.processRGBA=function(t,n,a){for(var s=t.data,o=s.length,u=new Uint8Array(o/4*3),h=new Uint8Array(o/4),d=0,f=0,m=0;m<o;m+=4){var y=s[m],_=s[m+1],j=s[m+2],w=s[m+3];u[d++]=y,u[d++]=_,u[d++]=j,h[f++]=w}var k=this.__addimage__.arrayBufferToBinaryString(u);return{alpha:this.__addimage__.arrayBufferToBinaryString(h),data:k,index:n,alias:a,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},gt.API.setLanguage=function(t){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"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,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},Vu=gt.API,Ed=Vu.getCharWidthsArray=function(t,n){var a,s,o=(n=n||{}).font||this.internal.getFont(),u=n.fontSize||this.internal.getFontSize(),h=n.charSpace||this.internal.getCharSpace(),d=n.widths?n.widths:o.metadata.Unicode.widths,f=d.fof?d.fof:1,m=n.kerning?n.kerning:o.metadata.Unicode.kerning,y=m.fof?m.fof:1,_=n.doKerning!==!1,j=0,w=t.length,k=0,T=d[0]||f,D=[];for(a=0;a<w;a++)s=t.charCodeAt(a),typeof o.metadata.widthOfString=="function"?D.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(s))+h*(1e3/u)||0)/1e3):(j=_&&_n(m[s])==="object"&&!isNaN(parseInt(m[s][k],10))?m[s][k]/y:0,D.push((d[s]||T)/f+j)),k=s;return D},cm=Vu.getStringUnitWidth=function(t,n){var a=(n=n||{}).fontSize||this.internal.getFontSize(),s=n.font||this.internal.getFont(),o=n.charSpace||this.internal.getCharSpace();return Vu.processArabic&&(t=Vu.processArabic(t)),typeof s.metadata.widthOfString=="function"?s.metadata.widthOfString(t,a,o)/a:Ed.apply(this,arguments).reduce(function(u,h){return u+h},0)},fm=function(t,n,a,s){for(var o=[],u=0,h=t.length,d=0;u!==h&&d+n[u]<a;)d+=n[u],u++;o.push(t.slice(0,u));var f=u;for(d=0;u!==h;)d+n[u]>s&&(o.push(t.slice(f,u)),d=0,f=u),d+=n[u],u++;return f!==u&&o.push(t.slice(f,u)),o},dm=function(t,n,a){a||(a={});var s,o,u,h,d,f,m,y=[],_=[y],j=a.textIndent||0,w=0,k=0,T=t.split(" "),D=Ed.apply(this,[" ",a])[0];if(f=a.lineIndent===-1?T[0].length+2:a.lineIndent||0){var C=Array(f).join(" "),K=[];T.map(function(F){(F=F.split(/\s*\n/)).length>1?K=K.concat(F.map(function($,Le){return(Le&&$.length?`
|
|
98
|
+
`:"")+$})):K.push(F[0])}),T=K,f=cm.apply(this,[C,a])}for(u=0,h=T.length;u<h;u++){var W=0;if(s=T[u],f&&s[0]==`
|
|
99
|
+
`&&(s=s.substr(1),W=1),j+w+(k=(o=Ed.apply(this,[s,a])).reduce(function(F,$){return F+$},0))>n||W){if(k>n){for(d=fm.apply(this,[s,o,n-(j+w),n]),y.push(d.shift()),y=[d.pop()];d.length;)_.push([d.shift()]);k=o.slice(s.length-(y[0]?y[0].length:0)).reduce(function(F,$){return F+$},0)}else y=[s];_.push(y),j=k+f,w=D}else y.push(s),j+=w+k,w=D}return m=f?function(F,$){return($?C:"")+F.join(" ")}:function(F){return F.join(" ")},_.map(m)},Vu.splitTextToSize=function(t,n,a){var s,o=(a=a||{}).fontSize||this.internal.getFontSize(),u=(function(y){if(y.widths&&y.kerning)return{widths:y.widths,kerning:y.kerning};var _=this.internal.getFont(y.fontName,y.fontStyle),j="Unicode";return _.metadata[j]?{widths:_.metadata[j].widths||{0:1},kerning:_.metadata[j].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,a);s=Array.isArray(t)?t:String(t).split(/\r?\n/);var h=1*this.internal.scaleFactor*n/o;u.textIndent=a.textIndent?1*a.textIndent*this.internal.scaleFactor/o:0,u.lineIndent=a.lineIndent;var d,f,m=[];for(d=0,f=s.length;d<f;d++)m=m.concat(dm.apply(this,[s[d],h,u]));return m},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var n="0123456789abcdef",a="klmnopqrstuvwxyz",s={},o={},u=0;u<16;u++)s[a[u]]=n[u],o[n[u]]=a[u];var h=function(j){return"0x"+parseInt(j,10).toString(16)},d=t.__fontmetrics__.compress=function(j){var w,k,T,D,C=["{"];for(var K in j){if(w=j[K],isNaN(parseInt(K,10))?k="'"+K+"'":(K=parseInt(K,10),k=(k=h(K).slice(2)).slice(0,-1)+o[k.slice(-1)]),typeof w=="number")w<0?(T=h(w).slice(3),D="-"):(T=h(w).slice(2),D=""),T=D+T.slice(0,-1)+o[T.slice(-1)];else{if(_n(w)!=="object")throw new Error("Don't know what to do with value type "+_n(w)+".");T=d(w)}C.push(k+T)}return C.push("}"),C.join("")},f=t.__fontmetrics__.uncompress=function(j){if(typeof j!="string")throw new Error("Invalid argument passed to uncompress.");for(var w,k,T,D,C={},K=1,W=C,F=[],$="",Le="",ke=j.length-1,se=1;se<ke;se+=1)(D=j[se])=="'"?w?(T=w.join(""),w=void 0):w=[]:w?w.push(D):D=="{"?(F.push([W,T]),W={},T=void 0):D=="}"?((k=F.pop())[0][k[1]]=W,T=void 0,W=k[0]):D=="-"?K=-1:T===void 0?s.hasOwnProperty(D)?($+=s[D],T=parseInt($,16)*K,K=1,$=""):$+=D:s.hasOwnProperty(D)?(Le+=s[D],W[T]=parseInt(Le,16)*K,K=1,T=void 0,Le=""):Le+=D;return C},m={codePages:["WinAnsiEncoding"],WinAnsiEncoding:f("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},y={Unicode:{Courier:m,"Courier-Bold":m,"Courier-BoldOblique":m,"Courier-Oblique":m,Helvetica:m,"Helvetica-Bold":m,"Helvetica-BoldOblique":m,"Helvetica-Oblique":m,"Times-Roman":m,"Times-Bold":m,"Times-BoldItalic":m,"Times-Italic":m}},_={Unicode:{"Courier-Oblique":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":f("{'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":f("{'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:f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":f("{'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:f("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:f("{'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":f("{'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:f("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":f("{'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":f("{'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":f("{'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}}}")}};t.events.push(["addFont",function(j){var w=j.font,k=_.Unicode[w.postScriptName];k&&(w.metadata.Unicode={},w.metadata.Unicode.widths=k.widths,w.metadata.Unicode.kerning=k.kerning);var T=y.Unicode[w.postScriptName];T&&(w.metadata.Unicode.encoding=T,w.encoding=T.codePages[0])}])})(gt.API),(function(t){var n=function(a){for(var s=a.length,o=new Uint8Array(s),u=0;u<s;u++)o[u]=a.charCodeAt(u);return o};t.API.events.push(["addFont",function(a){var s=void 0,o=a.font,u=a.instance;if(!o.isStandardFont){if(u===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(s=u.existsFileInVFS(o.postScriptName)===!1?u.loadFile(o.postScriptName):u.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(h,d){d=/^\x00\x01\x00\x00/.test(d)?n(d):n(Rd(d)),h.metadata=t.API.TTFFont.open(d),h.metadata.Unicode=h.metadata.Unicode||{encoding:{},kerning:{},widths:[]},h.metadata.glyIdsUsed=[0]})(o,s)}}])})(gt),gt.API.addSvgAsImage=function(t,n,a,s,o,u,h,d){if(isNaN(n)||isNaN(a))throw En.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(s)||isNaN(o))throw En.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=s,f.height=o;var m=f.getContext("2d");m.fillStyle="#fff",m.fillRect(0,0,f.width,f.height);var y={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},_=this;return(Pt.canvg?Promise.resolve(Pt.canvg):Md(()=>import("./index.es-Dqk41Tqn.js"),[])).catch(function(j){return Promise.reject(new Error("Could not load canvg: "+j))}).then(function(j){return j.default?j.default:j}).then(function(j){return j.fromString(m,t,y)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(j){return j.render(y)}).then(function(){_.addImage(f.toDataURL("image/jpeg",1),n,a,s,o,h,d)})},gt.API.putTotalPages=function(t){var n,a=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),a=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),a=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var s=1;s<=this.internal.getNumberOfPages();s++)for(var o=0;o<this.internal.pages[s].length;o++)this.internal.pages[s][o]=this.internal.pages[s][o].replace(n,a);return this},gt.API.viewerPreferences=function(t,n){var a;t=t||{},n=n||!1;var s,o,u,h={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}},d=Object.keys(h),f=[],m=0,y=0,_=0;function j(k,T){var D,C=!1;for(D=0;D<k.length;D+=1)k[D]===T&&(C=!0);return C}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(h)),this.internal.viewerpreferences.isSubscribed=!1),a=this.internal.viewerpreferences.configuration,t==="reset"||n===!0){var w=d.length;for(_=0;_<w;_+=1)a[d[_]].value=a[d[_]].defaultValue,a[d[_]].explicitSet=!1}if(_n(t)==="object"){for(o in t)if(u=t[o],j(d,o)&&u!==void 0){if(a[o].type==="boolean"&&typeof u=="boolean")a[o].value=u;else if(a[o].type==="name"&&j(a[o].valueSet,u))a[o].value=u;else if(a[o].type==="integer"&&Number.isInteger(u))a[o].value=u;else if(a[o].type==="array"){for(m=0;m<u.length;m+=1)if(s=!0,u[m].length===1&&typeof u[m][0]=="number")f.push(String(u[m]-1));else if(u[m].length>1){for(y=0;y<u[m].length;y+=1)typeof u[m][y]!="number"&&(s=!1);s===!0&&f.push([u[m][0]-1,u[m][1]-1].join(" "))}a[o].value="["+f.join(" ")+"]"}else a[o].value=a[o].defaultValue;a[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var k,T=[];for(k in a)a[k].explicitSet===!0&&(a[k].type==="name"?T.push("/"+k+" /"+a[k].value):T.push("/"+k+" "+a[k].value));T.length!==0&&this.internal.write(`/ViewerPreferences
|
|
100
|
+
<<
|
|
101
|
+
`+T.join(`
|
|
102
|
+
`)+`
|
|
103
|
+
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=a,this},gt.API.addMetadata=function(t,n){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:n??"http://jspdf.default.namespaceuri/",rawXml:typeof n=="boolean"&&n},this.internal.events.subscribe("putCatalog",v8),this.internal.events.subscribe("postPutResources",m8)),this},(function(t){var n=t.API,a=n.pdfEscape16=function(u,h){for(var d,f=h.metadata.Unicode.widths,m=["","0","00","000","0000"],y=[""],_=0,j=u.length;_<j;++_){if(d=h.metadata.characterToGlyph(u.charCodeAt(_)),h.metadata.glyIdsUsed.push(d),h.metadata.toUnicode[d]=u.charCodeAt(_),f.indexOf(d)==-1&&(f.push(d),f.push([parseInt(h.metadata.widthOfGlyph(d),10)])),d=="0")return y.join("");d=d.toString(16),y.push(m[4-d.length],d)}return y.join("")},s=function(u){var h,d,f,m,y,_,j;for(y=`/CIDInit /ProcSet findresource begin
|
|
104
|
+
12 dict begin
|
|
105
|
+
begincmap
|
|
106
|
+
/CIDSystemInfo <<
|
|
107
|
+
/Registry (Adobe)
|
|
108
|
+
/Ordering (UCS)
|
|
109
|
+
/Supplement 0
|
|
110
|
+
>> def
|
|
111
|
+
/CMapName /Adobe-Identity-UCS def
|
|
112
|
+
/CMapType 2 def
|
|
113
|
+
1 begincodespacerange
|
|
114
|
+
<0000><ffff>
|
|
115
|
+
endcodespacerange`,f=[],_=0,j=(d=Object.keys(u).sort(function(w,k){return w-k})).length;_<j;_++)h=d[_],f.length>=100&&(y+=`
|
|
116
|
+
`+f.length+` beginbfchar
|
|
117
|
+
`+f.join(`
|
|
118
|
+
`)+`
|
|
119
|
+
endbfchar`,f=[]),u[h]!==void 0&&u[h]!==null&&typeof u[h].toString=="function"&&(m=("0000"+u[h].toString(16)).slice(-4),h=("0000"+(+h).toString(16)).slice(-4),f.push("<"+h+"><"+m+">"));return f.length&&(y+=`
|
|
120
|
+
`+f.length+` beginbfchar
|
|
121
|
+
`+f.join(`
|
|
122
|
+
`)+`
|
|
123
|
+
endbfchar
|
|
124
|
+
`),y+`endcmap
|
|
125
|
+
CMapName currentdict /CMap defineresource pop
|
|
126
|
+
end
|
|
127
|
+
end`};n.events.push(["putFont",function(u){(function(h){var d=h.font,f=h.out,m=h.newObject,y=h.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="Identity-H"){for(var _=d.metadata.Unicode.widths,j=d.metadata.subset.encode(d.metadata.glyIdsUsed,1),w="",k=0;k<j.length;k++)w+=String.fromCharCode(j[k]);var T=m();y({data:w,addLength1:!0,objectId:T}),f("endobj");var D=m();y({data:s(d.metadata.toUnicode),addLength1:!0,objectId:D}),f("endobj");var C=m();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+Xu(d.fontName)),f("/FontFile2 "+T+" 0 R"),f("/FontBBox "+t.API.PDFObject.convert(d.metadata.bbox)),f("/Flags "+d.metadata.flags),f("/StemV "+d.metadata.stemV),f("/ItalicAngle "+d.metadata.italicAngle),f("/Ascent "+d.metadata.ascender),f("/Descent "+d.metadata.decender),f("/CapHeight "+d.metadata.capHeight),f(">>"),f("endobj");var K=m();f("<<"),f("/Type /Font"),f("/BaseFont /"+Xu(d.fontName)),f("/FontDescriptor "+C+" 0 R"),f("/W "+t.API.PDFObject.convert(_)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+d.encoding+")"),f(">>"),f(">>"),f("endobj"),d.objectNumber=m(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+D+" 0 R"),f("/BaseFont /"+Xu(d.fontName)),f("/Encoding /"+d.encoding),f("/DescendantFonts ["+K+" 0 R]"),f(">>"),f("endobj"),d.isAlreadyPutted=!0}})(u)}]),n.events.push(["putFont",function(u){(function(h){var d=h.font,f=h.out,m=h.newObject,y=h.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="WinAnsiEncoding"){for(var _=d.metadata.rawData,j="",w=0;w<_.length;w++)j+=String.fromCharCode(_[w]);var k=m();y({data:j,addLength1:!0,objectId:k}),f("endobj");var T=m();y({data:s(d.metadata.toUnicode),addLength1:!0,objectId:T}),f("endobj");var D=m();f("<<"),f("/Descent "+d.metadata.decender),f("/CapHeight "+d.metadata.capHeight),f("/StemV "+d.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+k+" 0 R"),f("/Flags 96"),f("/FontBBox "+t.API.PDFObject.convert(d.metadata.bbox)),f("/FontName /"+Xu(d.fontName)),f("/ItalicAngle "+d.metadata.italicAngle),f("/Ascent "+d.metadata.ascender),f(">>"),f("endobj"),d.objectNumber=m();for(var C=0;C<d.metadata.hmtx.widths.length;C++)d.metadata.hmtx.widths[C]=parseInt(d.metadata.hmtx.widths[C]*(1e3/d.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+T+" 0 R/BaseFont/"+Xu(d.fontName)+"/FontDescriptor "+D+" 0 R/Encoding/"+d.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(d.metadata.hmtx.widths)+">>"),f("endobj"),d.isAlreadyPutted=!0}})(u)}]);var o=function(u){var h,d=u.text||"",f=u.x,m=u.y,y=u.options||{},_=u.mutex||{},j=_.pdfEscape,w=_.activeFontKey,k=_.fonts,T=w,D="",C=0,K="",W=k[T].encoding;if(k[T].encoding!=="Identity-H")return{text:d,x:f,y:m,options:y,mutex:_};for(K=d,T=w,Array.isArray(d)&&(K=d[0]),C=0;C<K.length;C+=1)k[T].metadata.hasOwnProperty("cmap")&&(h=k[T].metadata.cmap.unicode.codeMap[K[C].charCodeAt(0)]),h||K[C].charCodeAt(0)<256&&k[T].metadata.hasOwnProperty("Unicode")?D+=K[C]:D+="";var F="";return parseInt(T.slice(1))<14||W==="WinAnsiEncoding"?F=j(D,T).split("").map(function($){return $.charCodeAt(0).toString(16)}).join(""):W==="Identity-H"&&(F=a(D,k[T])),_.isHex=!0,{text:F,x:f,y:m,options:y,mutex:_}};n.events.push(["postProcessText",function(u){var h=u.text||"",d=[],f={text:h,x:u.x,y:u.y,options:u.options,mutex:u.mutex};if(Array.isArray(h)){var m=0;for(m=0;m<h.length;m+=1)Array.isArray(h[m])&&h[m].length===3?d.push([o(Object.assign({},f,{text:h[m][0]})).text,h[m][1],h[m][2]]):d.push(o(Object.assign({},f,{text:h[m]})).text);u.text=d}else u.text=o(Object.assign({},f,{text:h})).text}])})(gt),(function(t){var n=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(a){return n.call(this),this.internal.vFS[a]!==void 0},t.addFileToVFS=function(a,s){return n.call(this),this.internal.vFS[a]=s,this},t.getFileFromVFS=function(a){return n.call(this),this.internal.vFS[a]!==void 0?this.internal.vFS[a]:null}})(gt.API),(function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(s){var o,u,h,d,f,m,y,_=n,j=[[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]],w=[[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]],k={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},T={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},D=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],C=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)$/),K=!1,W=0;this.__bidiEngine__={};var F=function(O){var U=O.charCodeAt(),G=U>>8,ne=T[G];return ne!==void 0?_[256*ne+(255&U)]:G===252||G===253?"AL":C.test(G)?"L":G===8?"R":"N"},$=function(O){for(var U,G=0;G<O.length;G++){if((U=F(O.charAt(G)))==="L")return!1;if(U==="R")return!0}return!1},Le=function(O,U,G,ne){var Se,ee,ce,le,Ne=U[ne];switch(Ne){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":K=!1;break;case"N":case"AN":break;case"EN":K&&(Ne="AN");break;case"AL":K=!0,Ne="R";break;case"WS":case"BN":Ne="N";break;case"CS":ne<1||ne+1>=U.length||(Se=G[ne-1])!=="EN"&&Se!=="AN"||(ee=U[ne+1])!=="EN"&&ee!=="AN"?Ne="N":K&&(ee="AN"),Ne=ee===Se?ee:"N";break;case"ES":Ne=(Se=ne>0?G[ne-1]:"B")==="EN"&&ne+1<U.length&&U[ne+1]==="EN"?"EN":"N";break;case"ET":if(ne>0&&G[ne-1]==="EN"){Ne="EN";break}if(K){Ne="N";break}for(ce=ne+1,le=U.length;ce<le&&U[ce]==="ET";)ce++;Ne=ce<le&&U[ce]==="EN"?"EN":"N";break;case"NSM":if(h&&!d){for(le=U.length,ce=ne+1;ce<le&&U[ce]==="NSM";)ce++;if(ce<le){var H=O[ne],oe=H>=1425&&H<=2303||H===64286;if(Se=U[ce],oe&&(Se==="R"||Se==="AL")){Ne="R";break}}}Ne=ne<1||(Se=U[ne-1])==="B"?"N":G[ne-1];break;case"B":K=!1,o=!0,Ne=W;break;case"S":u=!0,Ne="N"}return Ne},ke=function(O,U,G){var ne=O.split("");return G&&se(ne,G,{hiLevel:W}),ne.reverse(),U&&U.reverse(),ne.join("")},se=function(O,U,G){var ne,Se,ee,ce,le,Ne=-1,H=O.length,oe=0,L=[],q=W?w:j,V=[];for(K=!1,o=!1,u=!1,Se=0;Se<H;Se++)V[Se]=F(O[Se]);for(ee=0;ee<H;ee++){if(le=oe,L[ee]=Le(O,V,L,ee),ne=240&(oe=q[le][k[L[ee]]]),oe&=15,U[ee]=ce=q[oe][5],ne>0)if(ne===16){for(Se=Ne;Se<ee;Se++)U[Se]=1;Ne=-1}else Ne=-1;if(q[oe][6])Ne===-1&&(Ne=ee);else if(Ne>-1){for(Se=Ne;Se<ee;Se++)U[Se]=ce;Ne=-1}V[ee]==="B"&&(U[ee]=0),G.hiLevel|=ce}u&&(function(te,ae,me){for(var _e=0;_e<me;_e++)if(te[_e]==="S"){ae[_e]=W;for(var Ee=_e-1;Ee>=0&&te[Ee]==="WS";Ee--)ae[Ee]=W}})(V,U,H)},J=function(O,U,G,ne,Se){if(!(Se.hiLevel<O)){if(O===1&&W===1&&!o)return U.reverse(),void(G&&G.reverse());for(var ee,ce,le,Ne,H=U.length,oe=0;oe<H;){if(ne[oe]>=O){for(le=oe+1;le<H&&ne[le]>=O;)le++;for(Ne=oe,ce=le-1;Ne<ce;Ne++,ce--)ee=U[Ne],U[Ne]=U[ce],U[ce]=ee,G&&(ee=G[Ne],G[Ne]=G[ce],G[ce]=ee);oe=le}oe++}}},pe=function(O,U,G){var ne=O.split(""),Se={hiLevel:W};return G||(G=[]),se(ne,G,Se),(function(ee,ce,le){if(le.hiLevel!==0&&y)for(var Ne,H=0;H<ee.length;H++)ce[H]===1&&(Ne=D.indexOf(ee[H]))>=0&&(ee[H]=D[Ne+1])})(ne,G,Se),J(2,ne,U,G,Se),J(1,ne,U,G,Se),ne.join("")};return this.__bidiEngine__.doBidiReorder=function(O,U,G){if((function(Se,ee){if(ee)for(var ce=0;ce<Se.length;ce++)ee[ce]=ce;d===void 0&&(d=$(Se)),m===void 0&&(m=$(Se))})(O,U),h||!f||m)if(h&&f&&d^m)W=d?1:0,O=ke(O,U,G);else if(!h&&f&&m)W=d?1:0,O=pe(O,U,G),O=ke(O,U);else if(!h||d||f||m){if(h&&!f&&d^m)O=ke(O,U),d?(W=0,O=pe(O,U,G)):(W=1,O=pe(O,U,G),O=ke(O,U));else if(h&&d&&!f&&m)W=1,O=pe(O,U,G),O=ke(O,U);else if(!h&&!f&&d^m){var ne=y;d?(W=1,O=pe(O,U,G),W=0,y=!1,O=pe(O,U,G),y=ne):(W=0,O=pe(O,U,G),O=ke(O,U),W=1,y=!1,O=pe(O,U,G),y=ne,O=ke(O,U))}}else W=0,O=pe(O,U,G);else W=d?1:0,O=pe(O,U,G);return O},this.__bidiEngine__.setOptions=function(O){O&&(h=O.isInputVisual,f=O.isOutputVisual,d=O.isInputRtl,m=O.isOutputRtl,y=O.isSymmetricSwapping)},this.__bidiEngine__.setOptions(s),this.__bidiEngine__};var n=["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"],a=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(s){var o=s.text;s.x,s.y;var u=s.options||{};s.mutex,u.lang;var h=[];if(u.isInputVisual=typeof u.isInputVisual!="boolean"||u.isInputVisual,a.setOptions(u),Object.prototype.toString.call(o)==="[object Array]"){var d=0;for(h=[],d=0;d<o.length;d+=1)Object.prototype.toString.call(o[d])==="[object Array]"?h.push([a.doBidiReorder(o[d][0]),o[d][1],o[d][2]]):h.push([a.doBidiReorder(o[d])]);s.text=h}else s.text=a.doBidiReorder(o);a.setOptions({isInputVisual:!0})}])})(gt),gt.API.TTFFont=(function(){function t(n){var a;if(this.rawData=n,a=this.contents=new hl(n),this.contents.pos=4,a.readString(4)==="ttcf")throw new Error("TTCF not supported.");a.pos=0,this.parse(),this.subset=new M8(this),this.registerTTF()}return t.open=function(n){return new t(n)},t.prototype.parse=function(){return this.directory=new y8(this.contents),this.head=new x8(this),this.name=new j8(this),this.cmap=new iv(this),this.toUnicode={},this.hhea=new w8(this),this.maxp=new k8(this),this.hmtx=new N8(this),this.post=new _8(this),this.os2=new S8(this),this.loca=new E8(this),this.glyf=new L8(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]},t.prototype.registerTTF=function(){var n,a,s,o,u;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var h,d,f,m;for(m=[],h=0,d=(f=this.bbox).length;h<d;h++)n=f[h],m.push(Math.round(n*this.scaleFactor));return m}).call(this),this.stemV=0,this.post.exists?(s=255&(o=this.post.italic_angle),32768&(a=o>>16)&&(a=-(1+(65535^a))),this.italicAngle=+(a+"."+s)):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=(u=this.familyClass)===1||u===2||u===3||u===4||u===5||u===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")},t.prototype.characterToGlyph=function(n){var a;return((a=this.cmap.unicode)!=null?a.codeMap[n]:void 0)||0},t.prototype.widthOfGlyph=function(n){var a;return a=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*a},t.prototype.widthOfString=function(n,a,s){var o,u,h,d;for(h=0,u=0,d=(n=""+n).length;0<=d?u<d:u>d;u=0<=d?++u:--u)o=n.charCodeAt(u),h+=this.widthOfGlyph(this.characterToGlyph(o))+s*(1e3/a)||0;return h*(a/1e3)},t.prototype.lineHeight=function(n,a){var s;return a==null&&(a=!1),s=a?this.lineGap:0,(this.ascender+s-this.decender)/1e3*n},t})();var Qi,hl=(function(){function t(n){this.data=n??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(n){return this.data[this.pos++]=n},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},t.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},t.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},t.prototype.readString=function(n){var a,s;for(s=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)s[a]=String.fromCharCode(this.readByte());return s.join("")},t.prototype.writeString=function(n){var a,s,o;for(o=[],a=0,s=n.length;0<=s?a<s:a>s;a=0<=s?++a:--a)o.push(this.writeByte(n.charCodeAt(a)));return o},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(n){return this.writeInt16(n)},t.prototype.readLongLong=function(){var n,a,s,o,u,h,d,f;return n=this.readByte(),a=this.readByte(),s=this.readByte(),o=this.readByte(),u=this.readByte(),h=this.readByte(),d=this.readByte(),f=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^a)+1099511627776*(255^s)+4294967296*(255^o)+16777216*(255^u)+65536*(255^h)+256*(255^d)+(255^f)+1):72057594037927940*n+281474976710656*a+1099511627776*s+4294967296*o+16777216*u+65536*h+256*d+f},t.prototype.writeLongLong=function(n){var a,s;return a=Math.floor(n/4294967296),s=4294967295&n,this.writeByte(a>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a),this.writeByte(s>>24&255),this.writeByte(s>>16&255),this.writeByte(s>>8&255),this.writeByte(255&s)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(n){return this.writeInt32(n)},t.prototype.read=function(n){var a,s;for(a=[],s=0;0<=n?s<n:s>n;s=0<=n?++s:--s)a.push(this.readByte());return a},t.prototype.write=function(n){var a,s,o,u;for(u=[],s=0,o=n.length;s<o;s++)a=n[s],u.push(this.writeByte(a));return u},t})(),y8=(function(){var t;function n(a){var s,o,u;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},o=0,u=this.tableCount;0<=u?o<u:o>u;o=0<=u?++o:--o)s={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[s.tag]=s}return n.prototype.encode=function(a){var s,o,u,h,d,f,m,y,_,j,w,k,T;for(T in w=Object.keys(a).length,f=Math.log(2),_=16*Math.floor(Math.log(w)/f),h=Math.floor(_/f),y=16*w-_,(o=new hl).writeInt(this.scalarType),o.writeShort(w),o.writeShort(_),o.writeShort(h),o.writeShort(y),u=16*w,m=o.pos+u,d=null,k=[],a)for(j=a[T],o.writeString(T),o.writeInt(t(j)),o.writeInt(m),o.writeInt(j.length),k=k.concat(j),T==="head"&&(d=m),m+=j.length;m%4;)k.push(0),m++;return o.write(k),s=2981146554-t(o.data),o.pos=d+8,o.writeUInt32(s),o.data},t=function(a){var s,o,u,h;for(a=sv.call(a);a.length%4;)a.push(0);for(u=new hl(a),o=0,s=0,h=a.length;s<h;s=s+=4)o+=u.readUInt32();return 4294967295&o},n})(),b8={}.hasOwnProperty,js=function(t,n){for(var a in n)b8.call(n,a)&&(t[a]=n[a]);function s(){this.constructor=t}return s.prototype=n.prototype,t.prototype=new s,t.__super__=n.prototype,t};Qi=(function(){function t(n){var a;this.file=n,a=this.file.directory.tables[this.tag],this.exists=!!a,a&&(this.offset=a.offset,this.length=a.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t})();var x8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="head",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},t.prototype.encode=function(n){var a;return(a=new hl).writeInt(this.version),a.writeInt(this.revision),a.writeInt(this.checkSumAdjustment),a.writeInt(this.magicNumber),a.writeShort(this.flags),a.writeShort(this.unitsPerEm),a.writeLongLong(this.created),a.writeLongLong(this.modified),a.writeShort(this.xMin),a.writeShort(this.yMin),a.writeShort(this.xMax),a.writeShort(this.yMax),a.writeShort(this.macStyle),a.writeShort(this.lowestRecPPEM),a.writeShort(this.fontDirectionHint),a.writeShort(n),a.writeShort(this.glyphDataFormat),a.data},t})(),wm=(function(){function t(n,a){var s,o,u,h,d,f,m,y,_,j,w,k,T,D,C,K,W;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=a+n.readInt(),_=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.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(f=0;f<256;++f)this.codeMap[f]=n.readByte();break;case 4:for(w=n.readUInt16(),j=w/2,n.pos+=6,u=(function(){var F,$;for($=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)$.push(n.readUInt16());return $})(),n.pos+=2,T=(function(){var F,$;for($=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)$.push(n.readUInt16());return $})(),m=(function(){var F,$;for($=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)$.push(n.readUInt16());return $})(),y=(function(){var F,$;for($=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)$.push(n.readUInt16());return $})(),o=(this.length-n.pos+this.offset)/2,d=(function(){var F,$;for($=[],f=F=0;0<=o?F<o:F>o;f=0<=o?++F:--F)$.push(n.readUInt16());return $})(),f=C=0,W=u.length;C<W;f=++C)for(D=u[f],s=K=k=T[f];k<=D?K<=D:K>=D;s=k<=D?++K:--K)y[f]===0?h=s+m[f]:(h=d[y[f]/2+(s-k)-(j-f)]||0)!==0&&(h+=m[f]),this.codeMap[s]=65535&h}n.pos=_}return t.encode=function(n,a){var s,o,u,h,d,f,m,y,_,j,w,k,T,D,C,K,W,F,$,Le,ke,se,J,pe,O,U,G,ne,Se,ee,ce,le,Ne,H,oe,L,q,V,te,ae,me,_e,Ee,ze,We,Xe;switch(ne=new hl,h=Object.keys(n).sort(function(Ve,dt){return Ve-dt}),a){case"macroman":for(T=0,D=(function(){var Ve=[];for(k=0;k<256;++k)Ve.push(0);return Ve})(),K={0:0},u={},Se=0,Ne=h.length;Se<Ne;Se++)K[Ee=n[o=h[Se]]]==null&&(K[Ee]=++T),u[o]={old:n[o],new:K[n[o]]},D[o]=K[n[o]];return ne.writeUInt16(1),ne.writeUInt16(0),ne.writeUInt32(12),ne.writeUInt16(0),ne.writeUInt16(262),ne.writeUInt16(0),ne.write(D),{charMap:u,subtable:ne.data,maxGlyphID:T+1};case"unicode":for(U=[],_=[],W=0,K={},s={},C=m=null,ee=0,H=h.length;ee<H;ee++)K[$=n[o=h[ee]]]==null&&(K[$]=++W),s[o]={old:$,new:K[$]},d=K[$]-o,C!=null&&d===m||(C&&_.push(C),U.push(o),m=d),C=o;for(C&&_.push(C),_.push(65535),U.push(65535),pe=2*(J=U.length),se=2*Math.pow(Math.log(J)/Math.LN2,2),j=Math.log(se/2)/Math.LN2,ke=2*J-se,f=[],Le=[],w=[],k=ce=0,oe=U.length;ce<oe;k=++ce){if(O=U[k],y=_[k],O===65535){f.push(0),Le.push(0);break}if(O-(G=s[O].new)>=32768)for(f.push(0),Le.push(2*(w.length+J-k)),o=le=O;O<=y?le<=y:le>=y;o=O<=y?++le:--le)w.push(s[o].new);else f.push(G-O),Le.push(0)}for(ne.writeUInt16(3),ne.writeUInt16(1),ne.writeUInt32(12),ne.writeUInt16(4),ne.writeUInt16(16+8*J+2*w.length),ne.writeUInt16(0),ne.writeUInt16(pe),ne.writeUInt16(se),ne.writeUInt16(j),ne.writeUInt16(ke),me=0,L=_.length;me<L;me++)o=_[me],ne.writeUInt16(o);for(ne.writeUInt16(0),_e=0,q=U.length;_e<q;_e++)o=U[_e],ne.writeUInt16(o);for(ze=0,V=f.length;ze<V;ze++)d=f[ze],ne.writeUInt16(d);for(We=0,te=Le.length;We<te;We++)F=Le[We],ne.writeUInt16(F);for(Xe=0,ae=w.length;Xe<ae;Xe++)T=w[Xe],ne.writeUInt16(T);return{charMap:s,subtable:ne.data,maxGlyphID:W+1}}},t})(),iv=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="cmap",t.prototype.parse=function(n){var a,s,o;for(n.pos=this.offset,this.version=n.readUInt16(),o=n.readUInt16(),this.tables=[],this.unicode=null,s=0;0<=o?s<o:s>o;s=0<=o?++s:--s)a=new wm(n,this.offset),this.tables.push(a),a.isUnicode&&this.unicode==null&&(this.unicode=a);return!0},t.encode=function(n,a){var s,o;return a==null&&(a="macroman"),s=wm.encode(n,a),(o=new hl).writeUInt16(0),o.writeUInt16(1),s.table=o.data.concat(s.subtable),s},t})(),w8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="hhea",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},t})(),S8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="OS/2",t.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=(function(){var a,s;for(s=[],a=0;a<10;++a)s.push(n.readByte());return s})(),this.charRange=(function(){var a,s;for(s=[],a=0;a<4;++a)s.push(n.readInt());return s})(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=(function(){var a,s;for(s=[],a=0;a<2;a=++a)s.push(n.readInt());return s})(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},t})(),_8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="post",t.prototype.parse=function(n){var a,s,o;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var u;for(s=n.readUInt16(),this.glyphNameIndex=[],u=0;0<=s?u<s:u>s;u=0<=s?++u:--u)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],o=[];n.pos<this.offset+this.length;)a=n.readByte(),o.push(this.names.push(n.readString(a)));return o;case 151552:return s=n.readUInt16(),this.offsets=n.read(s);case 262144:return this.map=(function(){var h,d,f;for(f=[],u=h=0,d=this.file.maxp.numGlyphs;0<=d?h<d:h>d;u=0<=d?++h:--h)f.push(n.readUInt32());return f}).call(this)}},t})(),A8=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},j8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="name",t.prototype.parse=function(n){var a,s,o,u,h,d,f,m,y,_,j;for(n.pos=this.offset,n.readShort(),a=n.readShort(),d=n.readShort(),s=[],u=0;0<=a?u<a:u>a;u=0<=a?++u:--u)s.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+d+n.readShort()});for(f={},u=y=0,_=s.length;y<_;u=++y)o=s[u],n.pos=o.offset,m=n.readString(o.length),h=new A8(m,o),f[j=o.nameID]==null&&(f[j]=[]),f[o.nameID].push(h);this.strings=f,this.copyright=f[0],this.fontFamily=f[1],this.fontSubfamily=f[2],this.uniqueSubfamily=f[3],this.fontName=f[4],this.version=f[5];try{this.postscriptName=f[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=f[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=f[7],this.manufacturer=f[8],this.designer=f[9],this.description=f[10],this.vendorUrl=f[11],this.designerUrl=f[12],this.license=f[13],this.licenseUrl=f[14],this.preferredFamily=f[15],this.preferredSubfamily=f[17],this.compatibleFull=f[18],this.sampleText=f[19]},t})(),k8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="maxp",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},t})(),N8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="hmtx",t.prototype.parse=function(n){var a,s,o,u,h,d,f;for(n.pos=this.offset,this.metrics=[],a=0,d=this.file.hhea.numberOfMetrics;0<=d?a<d:a>d;a=0<=d?++a:--a)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var m,y;for(y=[],a=m=0;0<=o?m<o:m>o;a=0<=o?++m:--m)y.push(n.readInt16());return y})(),this.widths=(function(){var m,y,_,j;for(j=[],m=0,y=(_=this.metrics).length;m<y;m++)u=_[m],j.push(u.advance);return j}).call(this),s=this.widths[this.widths.length-1],f=[],a=h=0;0<=o?h<o:h>o;a=0<=o?++h:--h)f.push(this.widths.push(s));return f},t.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},t})(),sv=[].slice,L8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(n){var a,s,o,u,h,d,f,m,y,_;return n in this.cache?this.cache[n]:(u=this.file.loca,a=this.file.contents,s=u.indexOf(n),(o=u.lengthOf(n))===0?this.cache[n]=null:(a.pos=this.offset+s,h=(d=new hl(a.read(o))).readShort(),m=d.readShort(),_=d.readShort(),f=d.readShort(),y=d.readShort(),this.cache[n]=h===-1?new C8(d,m,_,f,y):new T8(d,h,m,_,f,y),this.cache[n]))},t.prototype.encode=function(n,a,s){var o,u,h,d,f;for(h=[],u=[],d=0,f=a.length;d<f;d++)o=n[a[d]],u.push(h.length),o&&(h=h.concat(o.encode(s)));return u.push(h.length),{table:h,offsets:u}},t})(),T8=(function(){function t(n,a,s,o,u,h){this.raw=n,this.numberOfContours=a,this.xMin=s,this.yMin=o,this.xMax=u,this.yMax=h,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t})(),C8=(function(){function t(n,a,s,o,u){var h,d;for(this.raw=n,this.xMin=a,this.yMin=s,this.xMax=o,this.yMax=u,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],h=this.raw;d=h.readShort(),this.glyphOffsets.push(h.pos),this.glyphIDs.push(h.readUInt16()),32&d;)h.pos+=1&d?4:2,128&d?h.pos+=8:64&d?h.pos+=4:8&d&&(h.pos+=2)}return t.prototype.encode=function(){var n,a,s;for(a=new hl(sv.call(this.raw.data)),n=0,s=this.glyphIDs.length;n<s;++n)a.pos=this.glyphOffsets[n];return a.data},t})(),E8=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return js(t,Qi),t.prototype.tag="loca",t.prototype.parse=function(n){var a,s;return n.pos=this.offset,a=this.file.head.indexToLocFormat,this.offsets=a===0?(function(){var o,u;for(u=[],s=0,o=this.length;s<o;s+=2)u.push(2*n.readUInt16());return u}).call(this):(function(){var o,u;for(u=[],s=0,o=this.length;s<o;s+=4)u.push(n.readUInt32());return u}).call(this)},t.prototype.indexOf=function(n){return this.offsets[n]},t.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},t.prototype.encode=function(n,a){for(var s=new Uint32Array(this.offsets.length),o=0,u=0,h=0;h<s.length;++h)if(s[h]=o,u<a.length&&a[u]==h){++u,s[h]=o;var d=this.offsets[h],f=this.offsets[h+1]-d;f>0&&(o+=f)}for(var m=new Array(4*s.length),y=0;y<s.length;++y)m[4*y+3]=255&s[y],m[4*y+2]=(65280&s[y])>>8,m[4*y+1]=(16711680&s[y])>>16,m[4*y]=(4278190080&s[y])>>24;return m},t})(),M8=(function(){function t(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var n,a,s,o,u;for(a in o=this.font.cmap.tables[0].codeMap,n={},u=this.subset)s=u[a],n[a]=o[s];return n},t.prototype.glyphsFor=function(n){var a,s,o,u,h,d,f;for(o={},h=0,d=n.length;h<d;h++)o[u=n[h]]=this.font.glyf.glyphFor(u);for(u in a=[],o)(s=o[u])!=null&&s.compound&&a.push.apply(a,s.glyphIDs);if(a.length>0)for(u in f=this.glyphsFor(a))s=f[u],o[u]=s;return o},t.prototype.encode=function(n,a){var s,o,u,h,d,f,m,y,_,j,w,k,T,D,C;for(o in s=iv.encode(this.generateCmap(),"unicode"),h=this.glyphsFor(n),w={0:0},C=s.charMap)w[(f=C[o]).old]=f.new;for(k in j=s.maxGlyphID,h)k in w||(w[k]=j++);return y=(function(K){var W,F;for(W in F={},K)F[K[W]]=W;return F})(w),_=Object.keys(y).sort(function(K,W){return K-W}),T=(function(){var K,W,F;for(F=[],K=0,W=_.length;K<W;K++)d=_[K],F.push(y[d]);return F})(),u=this.font.glyf.encode(h,T,w),m=this.font.loca.encode(u.offsets,T),D={cmap:this.font.cmap.raw(),glyf:u.table,loca:m,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(a)},this.font.os2.exists&&(D["OS/2"]=this.font.os2.raw()),this.font.directory.encode(D)},t})();gt.API.PDFObject=(function(){var t;function n(){}return t=function(a,s){return(Array(s+1).join("0")+a).slice(-s)},n.convert=function(a){var s,o,u,h;if(Array.isArray(a))return"["+(function(){var d,f,m;for(m=[],d=0,f=a.length;d<f;d++)s=a[d],m.push(n.convert(s));return m})().join(" ")+"]";if(typeof a=="string")return"/"+a;if(a?.isString)return"("+a+")";if(a instanceof Date)return"(D:"+t(a.getUTCFullYear(),4)+t(a.getUTCMonth(),2)+t(a.getUTCDate(),2)+t(a.getUTCHours(),2)+t(a.getUTCMinutes(),2)+t(a.getUTCSeconds(),2)+"Z)";if({}.toString.call(a)==="[object Object]"){for(o in u=["<<"],a)h=a[o],u.push("/"+o+" "+n.convert(h));return u.push(">>"),u.join(`
|
|
128
|
+
`)}return""+a},n})();function O8({session:t}){const n=()=>{const a=new gt,s=a.internal.pageSize.getWidth(),o=20,u=s-2*o;let h=20;const d=(_,j=10,w=!1)=>{a.setFontSize(j),w?a.setFont("helvetica","bold"):a.setFont("helvetica","normal"),a.splitTextToSize(_,u).forEach(T=>{h>270&&(a.addPage(),h=20),a.text(T,o,h),h+=j*.5}),h+=2},f=(_,j)=>{j.length!==0&&(h+=3,d(_,12,!0),h+=2,j.forEach(w=>{d(`• ${w}`,10,!1)}))},m=_=>{if(!_)return[];if(Array.isArray(_))return _;try{return JSON.parse(_)}catch{return[]}};d(t.summary_title||"Session Summary",16,!0),h+=2,d(`Date: ${co(new Date(t.started_at*1e3),"PPpp")}`,9,!1),d(`Status: ${t.summary_status||t.status}`,9,!1),t.summary_mood&&d(`Mood: ${t.summary_mood}`,9,!1),t.summary_complexity&&d(`Complexity: ${t.summary_complexity}`,9,!1),t.summary_key_insight&&(h+=2,d(`💡 ${t.summary_key_insight}`,10,!0)),f("What We Did",m(t.summary_what_we_did)),f("Decisions Made",m(t.summary_decisions)),f("Blockers",m(t.summary_blockers)),f("Resolved",m(t.summary_resolved)),f("Files Changed",m(t.summary_files_changed)),f("Next Steps",m(t.summary_next_steps)),f("Gotchas / Remember",m(t.summary_gotchas)),f("Tech Notes",m(t.summary_tech_notes)),h+=5,a.setFontSize(8),a.setTextColor(128,128,128),a.text(`Generated by ClaudeContext on ${co(new Date,"PPpp")}`,o,h);const y=`session-${t.id.slice(0,8)}-${co(new Date(t.started_at*1e3),"yyyy-MM-dd")}.pdf`;a.save(y)};return g.jsxs("button",{onClick:n,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="var(--surface)",onMouseLeave:a=>a.currentTarget.style.background="var(--surface2)",children:[g.jsx($d,{size:16}),"PDF"]})}function R8({sessionId:t}){const[n,a]=ye.useState(!1),s=async()=>{const o=`${window.location.origin}/session/${t}`;try{await navigator.clipboard.writeText(o),a(!0),$e.success("Link copied to clipboard"),setTimeout(()=>a(!1),2e3)}catch{$e.error("Failed to copy link")}};return g.jsxs("button",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:n?"var(--green)15":"var(--surface2)",color:n?"var(--green)":"var(--text)",border:"1px solid",borderColor:n?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{n||(o.currentTarget.style.background="var(--surface)")},onMouseLeave:o=>{n||(o.currentTarget.style.background="var(--surface2)")},children:[n?g.jsx(Qm,{size:16}):g.jsx(o3,{size:16}),n?"Copied!":"Copy Link"]})}function D8({sessionId:t,initialNotes:n="",isOpen:a,onClose:s}){const[o,u]=ye.useState(n),[h,d]=ye.useState(!1),f=Sf(),m=lf({mutationFn:()=>Sn.updateSessionNotes(t,o),onSuccess:()=>{f.invalidateQueries({queryKey:["session",t]}),$e.success("Notes saved"),s()},onError:_=>$e.error("Failed to save notes: "+_)}),y=async()=>{d(!0),await m.mutateAsync(),d(!1)};return a?g.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:s,children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:600,width:"90%",maxHeight:"80vh",display:"flex",flexDirection:"column",animation:"scaleIn 0.2s"},onClick:_=>_.stopPropagation(),children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[g.jsx(yi,{size:20,color:"var(--accent)"}),g.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Session Notes"})]}),g.jsx("button",{onClick:s,style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:_=>_.currentTarget.style.background="var(--surface2)",onMouseLeave:_=>_.currentTarget.style.background="none",children:g.jsx(ti,{size:20})})]}),g.jsx("textarea",{value:o,onChange:_=>u(_.target.value),placeholder:"Add notes about this session...",style:{flex:1,padding:12,background:"var(--bg)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,color:"var(--text)",fontFamily:"inherit",resize:"none",marginBottom:16,minHeight:200},autoFocus:!0}),g.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[g.jsx("button",{onClick:s,style:{padding:"8px 16px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:_=>_.currentTarget.style.background="var(--surface)",onMouseLeave:_=>_.currentTarget.style.background="var(--surface2)",children:"Cancel"}),g.jsx("button",{onClick:y,disabled:h,style:{padding:"8px 16px",background:h?"var(--surface)":"var(--accent)",border:"none",borderRadius:8,fontSize:14,fontWeight:600,cursor:h?"not-allowed":"pointer",color:"white",transition:"all 0.15s"},onMouseEnter:_=>{h||(_.currentTarget.style.background="var(--accent-hover)")},onMouseLeave:_=>{h||(_.currentTarget.style.background="var(--accent)")},children:h?"Saving...":"Save Notes"})]})]})}):null}function Sm(t){const n=[`# ${t.summary_title||"Session"}`,`Date: ${co(new Date(t.started_at*1e3),"PPpp")}`,`Status: ${t.summary_status||t.status}`,""];t.summary_mood&&n.push(`Mood: ${t.summary_mood}`),t.summary_complexity&&n.push(`Complexity: ${t.summary_complexity}`),t.summary_key_insight&&(n.push(`Key Insight: ${t.summary_key_insight}`),n.push(""));const a=_=>{if(!_)return[];if(Array.isArray(_))return _;try{return JSON.parse(_)}catch{return[]}},s=a(t.summary_what_we_did);s.length&&(n.push("## What We Did"),s.forEach(_=>n.push(`- ${_}`)),n.push(""));const o=a(t.summary_decisions);o.length&&(n.push("## Decisions Made"),o.forEach(_=>n.push(`- ${_}`)),n.push(""));const u=a(t.summary_blockers);u.length&&(n.push("## Blockers"),u.forEach(_=>n.push(`- ${_}`)),n.push(""));const h=a(t.summary_resolved);h.length&&(n.push("## Resolved"),h.forEach(_=>n.push(`- ${_}`)),n.push(""));const d=a(t.summary_files_changed);d.length&&(n.push("## Files Changed"),d.forEach(_=>n.push(`- ${_}`)),n.push(""));const f=a(t.summary_next_steps);f.length&&(n.push("## Next Steps"),f.forEach(_=>n.push(`- ${_}`)),n.push(""));const m=a(t.summary_gotchas);m.length&&(n.push("## Gotchas / Remember"),m.forEach(_=>n.push(`- ${_}`)),n.push(""));const y=a(t.summary_tech_notes);return y.length&&(n.push("## Tech Notes"),y.forEach(_=>n.push(`- ${_}`)),n.push("")),n.join(`
|
|
129
|
+
`)}function z8({onOpenSession:t}){const{id:n}=g0(),[a,s]=ye.useState(!1),[o,u]=ye.useState(!1),[h,d]=ye.useState("overview"),{data:f,isLoading:m,refetch:y}=ya({queryKey:["session",n],queryFn:()=>Sn.getSession(n),enabled:!!n,refetchInterval:k=>k?.status==="active"?5e3:!1});ye.useEffect(()=>{f&&n&&t(n,f.summary_title||`Session ${n.slice(0,8)}`,f.project_id)},[f,n,t]),ye.useEffect(()=>{if(!n)return;let k;try{k=m0(),k.onmessage=T=>{try{const D=JSON.parse(T.data);D.session_id===n&&(D.type==="session_end"||D.type==="summary_ready"||D.type==="tool_use"||D.type==="stop")&&y()}catch{}},k.onerror=()=>{console.log("[SessionDetail] WebSocket error, falling back to polling")}}catch(T){console.log("[SessionDetail] WebSocket connection failed:",T)}return()=>{k?.close()}},[n,y]);const _=async()=>{if(!n)return;s(!0);const k=$e.loading("Queueing session for resync...");try{await Sn.resyncSession(n),$e.dismiss(k),$e.success("Session queued for resync. Summary will be regenerated."),setTimeout(()=>y(),2e3)}catch(T){$e.dismiss(k),$e.error("Resync failed: "+T)}finally{s(!1)}};if(m)return g.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading session..."});if(!f)return g.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Session not found"});const j=f.ended_at?c6(new Date(f.ended_at*1e3),new Date(f.started_at*1e3)):null,w=!!f.summary_title;return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs(fl,{to:`/project/${f.project_id}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[g.jsx(v0,{size:13})," Back to Project"]}),g.jsxs("div",{style:{marginBottom:24},children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12,marginBottom:12},children:[g.jsx("h1",{style:{fontSize:24,fontWeight:700,flex:1},children:f.summary_title||"Session "+f.id.slice(0,12)}),g.jsx(h5,{status:f.summary_status||f.status})]}),g.jsxs("div",{style:{display:"flex",gap:8,borderBottom:"1px solid var(--border)",marginBottom:24,marginTop:20},children:[g.jsx("button",{onClick:()=>d("overview"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:h==="overview"?"2px solid var(--accent)":"2px solid transparent",color:h==="overview"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:"Overview"}),g.jsxs("button",{onClick:()=>d("timeline"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:h==="timeline"?"2px solid var(--accent)":"2px solid transparent",color:h==="timeline"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:["Timeline (",f.observations?.length||0," events)"]})]}),h==="overview"&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{style:{display:"flex",gap:20,alignItems:"flex-start"},children:[g.jsxs("div",{style:{flex:"0 0 70%"},children:[g.jsxs("div",{style:{display:"flex",gap:16,flexWrap:"wrap",color:"var(--text-muted)",fontSize:14,marginBottom:16},children:[g.jsx("span",{children:co(new Date(f.started_at*1e3),"PPpp")}),j&&g.jsxs("span",{children:["Duration: ",j]}),f.total_turns>0&&g.jsxs("span",{children:[f.total_turns," turns"]}),f.total_tool_calls>0&&g.jsxs("span",{children:[f.total_tool_calls," tool calls"]})]}),g.jsx("div",{style:{marginBottom:16},children:g.jsx(p5,{sessionId:f.id,projectId:f.project_id,sessionTags:f.tags||[],onUpdate:y})}),f.summary_key_insight&&g.jsxs("div",{style:{padding:"10px 12px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:8,fontSize:15,color:"var(--text)",display:"flex",alignItems:"flex-start",gap:8,marginBottom:16},children:[g.jsx(yf,{size:16,style:{color:"var(--accent)",flexShrink:0,marginTop:2}}),g.jsxs("div",{children:[g.jsx("strong",{style:{color:"var(--accent)"},children:"Key Insight:"})," ",f.summary_key_insight]})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[f.observations&&f.observations.length>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Total Events"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:f.observations.length})]}),f.observations&&f.observations.filter(k=>k.type==="tool_use").length>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tool Uses"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:f.observations.filter(k=>k.type==="tool_use").length})]}),f.observations&&f.observations.filter(k=>k.type==="user_prompt").length>0&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"User Prompts"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--green)"},children:f.observations.filter(k=>k.type==="user_prompt").length})]}),(()=>{const k=f.summary_files_changed?Array.isArray(f.summary_files_changed)?f.summary_files_changed:JSON.parse(f.summary_files_changed):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Files Changed"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--orange)"},children:k.length})]})})(),(()=>{const k=f.summary_decisions?Array.isArray(f.summary_decisions)?f.summary_decisions:JSON.parse(f.summary_decisions):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Decisions Made"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:k.length})]})})(),(()=>{const k=f.summary_next_steps?Array.isArray(f.summary_next_steps)?f.summary_next_steps:JSON.parse(f.summary_next_steps):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Next Steps"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--yellow)"},children:k.length})]})})(),(()=>{const k=f.summary_gotchas?Array.isArray(f.summary_gotchas)?f.summary_gotchas:JSON.parse(f.summary_gotchas):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Gotchas"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--red)"},children:k.length})]})})(),(()=>{const k=f.summary_tech_notes?Array.isArray(f.summary_tech_notes)?f.summary_tech_notes:JSON.parse(f.summary_tech_notes):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tech Notes"}),g.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:k.length})]})})()]})]}),g.jsxs("div",{style:{flex:"0 0 28%",display:"flex",flexDirection:"column",gap:12},children:[f.summary_mood&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Mood"}),g.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:f.summary_mood})]}),f.summary_complexity&&g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Complexity"}),g.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:f.summary_complexity.replace("_"," ")})]}),(()=>{const k=f.summary_resolved?JSON.parse(f.summary_resolved):[];return k.length===0?null:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[g.jsx(gl,{size:14,style:{color:"var(--green)"}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Resolved"})]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:k.map((T,D)=>g.jsxs("div",{style:{fontSize:13,color:"var(--text)",lineHeight:1.4},children:["• ",T]},D))})]})})()]})]}),(()=>{const k=f.summary_blockers?JSON.parse(f.summary_blockers):[];return k.length===0?null:g.jsx("div",{style:{marginTop:16},children:g.jsxs("div",{style:{padding:"10px 12px",background:"var(--red)10",border:"1px solid var(--red)30",borderRadius:8,fontSize:14},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6,color:"var(--red)",fontWeight:600},children:[g.jsx(nc,{size:16}),"Blockers"]}),k.map((T,D)=>g.jsxs("div",{style:{color:"var(--text-muted)",marginBottom:4},children:["• ",T]},D))]})})})(),g.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:20},children:[g.jsxs("button",{onClick:()=>u(!0),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:k=>{k.currentTarget.style.background="var(--surface)"},onMouseLeave:k=>{k.currentTarget.style.background="var(--surface2)"},children:[g.jsx(yi,{size:16}),f.notes?"Edit Notes":"Add Notes"]}),g.jsx(R8,{sessionId:f.id}),w&&g.jsxs(g.Fragment,{children:[g.jsx(F6,{text:Sm(f),label:"Copy as Markdown"}),g.jsx(I6,{text:Sm(f),filename:`session-${f.id.slice(0,8)}-${co(new Date(f.started_at*1e3),"yyyy-MM-dd")}.md`,label:"Download Markdown"}),g.jsx(O8,{session:f})]}),f.status!=="active"&&f.transcript_path&&g.jsxs("button",{onClick:_,disabled:a,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--surface)":"var(--surface2)",color:a?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:k=>{a||(k.currentTarget.style.background="var(--surface)")},onMouseLeave:k=>{a||(k.currentTarget.style.background="var(--surface2)")},children:[g.jsx(Hl,{size:16,style:{animation:a?"spin 1s linear infinite":"none"}}),a?"Resyncing...":"Resync Summary"]})]}),w&&g.jsxs("div",{style:{marginBottom:28},children:[g.jsx("h2",{style:{fontSize:13,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:"Summary"}),g.jsx(B6,{summary_what_we_did:f.summary_what_we_did,summary_decisions:f.summary_decisions,summary_files_changed:f.summary_files_changed,summary_next_steps:f.summary_next_steps,summary_gotchas:f.summary_gotchas,summary_tech_notes:f.summary_tech_notes})]}),!w&&f.status==="active"&&g.jsx("div",{style:{padding:"16px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,color:"var(--text-muted)",marginBottom:24},children:"Session is active. Summary will be generated when the session ends."})]})]}),h==="timeline"&&f.observations&&f.observations.length>0&&g.jsx("div",{children:g.jsx(U6,{observations:f.observations})}),g.jsx(D8,{sessionId:f.id,initialNotes:f.notes||"",isOpen:o,onClose:()=>u(!1)})]})}function B8(){const[t,n]=ye.useState(""),[a,s]=ye.useState(""),{data:o}=ya({queryKey:["projects"],queryFn:Sn.getProjects}),{data:u,isLoading:h,isFetching:d}=ya({queryKey:["search",t,a],queryFn:()=>Sn.search(t,a||void 0),enabled:t.length>=2});return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs("div",{style:{marginBottom:24},children:[g.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Search"}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Full-text search across all session observations"})]}),g.jsxs("div",{style:{display:"flex",gap:12,marginBottom:20},children:[g.jsx("div",{style:{flex:1},children:g.jsx(g5,{onSearch:n,placeholder:"Search sessions, decisions, file paths...",autoFocus:!0})}),g.jsxs("select",{value:a,onChange:f=>s(f.target.value),style:{padding:"10px 12px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,outline:"none",minWidth:140},children:[g.jsx("option",{value:"",children:"All Projects"}),o?.map(f=>g.jsx("option",{value:f.id,children:f.name},f.id))]})]}),t.length<2&&g.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[g.jsx(Vx,{size:36,color:"var(--border)",style:{marginBottom:12}}),g.jsx("div",{style:{fontSize:14},children:"Type at least 2 characters to search"})]}),h&&t.length>=2&&g.jsx("div",{style:{color:"var(--text-muted)",fontSize:13,padding:"20px 0"},children:"Searching..."}),u?.results&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:12},children:[u.results.length," result",u.results.length!==1?"s":"",' for "',t,'"']}),u.results.length===0?g.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No results found"}):u.results.map(f=>g.jsx(fl,{to:`/session/${f.session_id}`,style:{display:"block"},children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s"},onMouseEnter:m=>m.currentTarget.style.borderColor="var(--accent)",onMouseLeave:m=>m.currentTarget.style.borderColor="var(--border)",children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8,marginBottom:6},children:[g.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--accent)"},children:f.project_name}),g.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",flexShrink:0},children:f.created_at?co(new Date(f.created_at*1e3),"MMM d, yyyy"):""})]}),g.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:4},children:f.content}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:f.session_title||`Session ${f.session_id?.slice(0,8)}`})]})},f.observation_id))]})]})}const P8={session_start:{icon:yf,color:"var(--green)",label:"Session Started"},session_end:{icon:G1,color:"var(--text-muted)",label:"Session Ended"},tool_use:{icon:_s,color:"var(--accent)",label:"Tool Use"},user_prompt:{icon:t5,color:"var(--blue)",label:"User Prompt"},stop:{icon:G1,color:"var(--text-muted)",label:"Response"},pre_compact:{icon:vf,color:"var(--yellow)",label:"Pre-Compact"},summary_ready:{icon:yf,color:"var(--green)",label:"Summary Ready"},connected:{icon:vf,color:"var(--green)",label:"Connected"}};function q8(){const[t,n]=ye.useState([]),[a,s]=ye.useState(!1),[o,u]=ye.useState(""),h=ye.useRef(null),d=ye.useRef(null);return ye.useEffect(()=>{let f;const m=()=>{try{f=m0(),h.current=f,f.onopen=()=>{s(!0),u("")},f.onmessage=y=>{try{const _=JSON.parse(y.data);n(j=>[_,...j].slice(0,200))}catch{}},f.onclose=()=>{s(!1),setTimeout(m,3e3)},f.onerror=()=>{u("WebSocket connection failed"),s(!1)}}catch(y){u(String(y))}};return m(),()=>{f?.close()}},[]),g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs("div",{style:{marginBottom:24},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[g.jsx("h1",{style:{fontSize:22,fontWeight:700},children:"Live Feed"}),g.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:a?"var(--green)":"var(--red)",display:"inline-block",animation:a?"pulse 1.5s infinite":"none"}}),g.jsx("style",{children:"@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }"})]}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:a?"Real-time events from active Claude Code sessions":"Connecting..."}),o&&g.jsx("p",{style:{color:"var(--red)",fontSize:12,marginTop:4},children:o})]}),t.length===0&&g.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[g.jsx(vf,{size:36,color:"var(--border)",style:{marginBottom:12}}),g.jsx("div",{style:{fontSize:14},children:"Waiting for events..."}),g.jsx("div",{style:{fontSize:12,marginTop:8},children:"Start a Claude Code session to see live activity"})]}),g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",gap:8},children:t.map((f,m)=>{const y=P8[f.type]||{icon:vf,color:"var(--text-muted)",label:f.type},_=y.icon;return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 14px",display:"flex",gap:12,alignItems:"flex-start",opacity:m>50?.6:1},children:[g.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:`${y.color}15`,border:`1px solid ${y.color}30`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:g.jsx(_,{size:12,color:y.color})}),g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[g.jsx("span",{style:{fontSize:12,fontWeight:600,color:y.color},children:y.label}),g.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",flexShrink:0},children:f.timestamp?co(new Date(f.timestamp),"HH:mm:ss"):""})]}),f.tool_name&&g.jsxs("div",{style:{fontSize:12,color:"var(--text)",marginTop:2,fontFamily:"monospace"},children:[f.tool_name,f.file_path&&g.jsxs("span",{style:{color:"var(--text-muted)"},children:[" ",f.file_path]})]}),f.preview&&g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.preview}),f.session_id&&g.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2,fontFamily:"monospace"},children:[f.session_id.slice(0,16),"..."]}),f.project&&g.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Project: ",f.project.name]}),f.title&&g.jsx("div",{style:{fontSize:12,color:"var(--green)",marginTop:2},children:f.title})]})]},m)})})]})}function U8(){const{id:t}=g0(),{data:n,isLoading:a,error:s}=ya({queryKey:["memory",t],queryFn:()=>Sn.getMemory(t),refetchInterval:15e3,enabled:!!t});if(a)return g.jsx(V8,{});if(s)return g.jsx(Q8,{message:String(s)});const o=n?.stats||{},u=o.total_preferences>0||o.total_knowledge>0||o.total_patterns>0||o.total_tasks>0||o.total_contacts>0;return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsxs(fl,{to:`/project/${t}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:13,marginBottom:20},children:[g.jsx(v0,{size:14})," Back to Project"]}),g.jsxs("div",{style:{marginBottom:32},children:[g.jsxs("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8,display:"flex",alignItems:"center",gap:12},children:[g.jsx(mf,{size:28,color:"var(--accent)"}),"Memory System"]}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:15},children:"Accumulated knowledge, preferences, patterns, and tasks across all sessions"})]}),u?g.jsxs(g.Fragment,{children:[g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:16,marginBottom:40},children:[g.jsx(sf,{icon:g.jsx(cl,{size:20}),label:"Preferences",value:o.total_preferences,color:"var(--blue)"}),g.jsx(sf,{icon:g.jsx(J2,{size:20}),label:"Knowledge",value:o.total_knowledge,color:"var(--accent)"}),g.jsx(sf,{icon:g.jsx(V1,{size:20}),label:"Patterns",value:o.total_patterns,color:"var(--orange)"}),g.jsx(sf,{icon:g.jsx(Hd,{size:20}),label:"Tasks",value:o.total_tasks,color:"var(--green)"}),g.jsx(sf,{icon:g.jsx(tg,{size:20}),label:"Contacts",value:o.total_contacts,color:"var(--red)"})]}),n.preferences&&n.preferences.length>0&&g.jsx(af,{title:"Your Preferences",icon:g.jsx(cl,{size:20,color:"var(--blue)"}),children:g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:n.preferences.map(h=>g.jsx(F8,{pref:h},h.id))})}),n.knowledge&&n.knowledge.length>0&&g.jsx(af,{title:"Domain Knowledge",icon:g.jsx(J2,{size:20,color:"var(--accent)"}),children:g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:n.knowledge.map(h=>g.jsx(I8,{knowledge:h},h.id))})}),n.patterns&&n.patterns.length>0&&g.jsx(af,{title:"Learned Patterns",icon:g.jsx(V1,{size:20,color:"var(--orange)"}),children:g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:n.patterns.map(h=>g.jsx(H8,{pattern:h},h.id))})}),n.tasks&&n.tasks.length>0&&g.jsx(af,{title:"Pending Tasks",icon:g.jsx(Hd,{size:20,color:"var(--green)"}),children:g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:n.tasks.map(h=>g.jsx(W8,{task:h},h.id))})}),n.contacts&&n.contacts.length>0&&g.jsx(af,{title:"Contacts",icon:g.jsx(tg,{size:20,color:"var(--red)"}),children:g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},children:n.contacts.map(h=>g.jsx(Y8,{contact:h},h.id))})})]}):g.jsx(G8,{})]})}function af({title:t,icon:n,children:a}){return g.jsxs("div",{style:{marginBottom:40},children:[g.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:18,display:"flex",alignItems:"center",gap:10},children:[n,t]}),a]})}function sf({icon:t,label:n,value:a,color:s}){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10,color:s},children:[t,g.jsx("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:n})]}),g.jsx("div",{style:{fontSize:32,fontWeight:700},children:a})]})}function F8({pref:t}){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g.jsxs("div",{children:[g.jsx("div",{style:{fontSize:14,fontWeight:600,marginBottom:4},children:t.key}),g.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:t.category})]}),g.jsx("div",{style:{fontSize:15,color:"var(--text)",fontWeight:500},children:t.value})]})}function I8({knowledge:t}){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[g.jsx("div",{style:{fontSize:15,fontWeight:700},children:t.topic}),g.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--accent)15",color:"var(--accent)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.category})]}),g.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6},children:t.content}),t.confidence&&g.jsxs("div",{style:{marginTop:12,display:"flex",alignItems:"center",gap:8},children:[g.jsx("div",{style:{flex:1,height:5,background:"var(--border)",borderRadius:3,overflow:"hidden"},children:g.jsx("div",{style:{width:`${t.confidence*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})}),g.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:[Math.round(t.confidence*100),"%"]})]})]})}function H8({pattern:t}){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[g.jsx("div",{style:{fontSize:15,fontWeight:700},children:t.title}),g.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--orange)15",color:"var(--orange)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.pattern_type})]}),g.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6,marginBottom:12},children:t.description}),(t.success_count>0||t.failure_count>0)&&g.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)"},children:[g.jsxs("span",{style:{color:"var(--green)"},children:["✓ ",t.success_count," success"]}),t.failure_count>0&&g.jsxs("span",{style:{color:"var(--red)"},children:["✗ ",t.failure_count," failed"]})]})]})}function W8({task:t}){const n={urgent:"var(--red)",high:"var(--orange)",medium:"var(--blue)",low:"var(--text-muted)"};return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",alignItems:"center",gap:14},children:[g.jsx("div",{style:{width:10,height:10,borderRadius:"50%",background:n[t.priority]||"var(--text-muted)",flexShrink:0}}),g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:4},children:t.title}),t.description&&g.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:t.description})]}),g.jsx("div",{style:{fontSize:11,padding:"5px 12px",borderRadius:6,background:`${n[t.priority]||"var(--text-muted)"}15`,color:n[t.priority]||"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.priority})]})}function Y8({contact:t}){return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[g.jsx("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:t.name}),t.role&&g.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:8},children:t.role}),g.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--red)15",color:"var(--red)",fontWeight:600,display:"inline-block",textTransform:"uppercase",letterSpacing:"0.5px"},children:t.type})]})}function G8(){return g.jsxs("div",{style:{textAlign:"center",padding:"80px 20px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12},children:[g.jsx(mf,{size:48,color:"var(--text-muted)",style:{marginBottom:16,opacity:.5}}),g.jsx("h3",{style:{fontSize:16,fontWeight:700,marginBottom:8},children:"No Memory Data Yet"}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:13,maxWidth:400,margin:"0 auto"},children:"Memory is extracted from session summaries. Complete a few sessions and the system will start learning your preferences, patterns, and knowledge."})]})}function V8(){return g.jsx("div",{style:{padding:"80px 20px",textAlign:"center"},children:g.jsx("div",{style:{fontSize:14,color:"var(--text-muted)"},children:"Loading memory..."})})}function Q8({message:t}){return g.jsxs("div",{style:{padding:"80px 20px",textAlign:"center"},children:[g.jsx("div",{style:{fontSize:14,color:"#ef4444",marginBottom:8},children:"Failed to load memory"}),g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:t})]})}function X8(){const{data:t}=ya({queryKey:["metrics"],queryFn:Sn.getMetrics,refetchInterval:5e3});if(!t)return g.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading metrics..."});const{summarizations:n,sessions:a,memory:s,queue:o}=t,u=[{label:"Total Summarizations",value:n.total,icon:dx,color:"var(--accent)"},{label:"Success Rate",value:n.total>0?`${Math.round(n.successful/n.total*100)}%`:"0%",icon:cl,color:"var(--green)"},{label:"Avg Duration",value:n.avgDuration>0?`${(n.avgDuration/1e3).toFixed(1)}s`:"0s",icon:As,color:"var(--blue)"},{label:"Failed",value:n.failed,icon:nc,color:"var(--red)"}],h=[{label:"Total Sessions",value:a.total},{label:"Active",value:a.active},{label:"Completed",value:a.completed}],d=[{label:"Preferences",value:s.preferences},{label:"Knowledge",value:s.knowledge},{label:"Patterns",value:s.patterns},{label:"Tasks",value:s.tasks}],f=[{label:"High Priority",value:o.high,color:"var(--red)"},{label:"Normal Priority",value:o.normal,color:"var(--yellow)"},{label:"Low Priority",value:o.low,color:"var(--green)"}];return g.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[g.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:24},children:"System Metrics"}),g.jsxs("div",{style:{marginBottom:32},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Performance"}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:u.map(m=>{const y=m.icon;return g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[g.jsx(y,{size:16,style:{color:m.color}}),g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.5},children:m.label})]}),g.jsx("div",{style:{fontSize:28,fontWeight:700,color:m.color},children:m.value})]},m.label)})})]}),g.jsxs("div",{style:{marginBottom:32},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Sessions"}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:h.map(m=>g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:m.label}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:m.value})]},m.label))})]}),g.jsxs("div",{style:{marginBottom:32},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Memory System"}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:d.map(m=>g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:m.label}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--text)"},children:m.value})]},m.label))})]}),g.jsxs("div",{style:{marginBottom:32},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Queue"}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:f.map(m=>g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:m.label}),g.jsx("div",{style:{fontSize:24,fontWeight:700,color:m.color},children:m.value})]},m.label))})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[g.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:8},children:"Last Updated"}),g.jsx("div",{style:{fontSize:13,color:"var(--text)"},children:new Date().toLocaleString()})]})]})}const K8=[{label:"Last 5 min",value:5},{label:"Last 10 min",value:10},{label:"Last 15 min",value:15},{label:"Last 30 min",value:30},{label:"Last 1 hour",value:60},{label:"All",value:0}],Z8=[{label:"All",value:""},{label:"Info",value:"info",color:"var(--blue)"},{label:"Warn",value:"warn",color:"var(--yellow)"},{label:"Error",value:"error",color:"var(--red)"},{label:"Hook",value:"hook",color:"var(--purple)"},{label:"Broadcast",value:"broadcast",color:"var(--green)"}];function $8(){const[t,n]=ye.useState(!0),[a,s]=ye.useState([]),[o,u]=ye.useState(15),[h,d]=ye.useState(""),[f,m]=ye.useState(""),y=ye.useRef(null),_=ye.useRef(null),{data:j}=ya({queryKey:["logs",o,h,f],queryFn:async()=>{const C=new URLSearchParams;return o>0&&C.append("minutes",String(o)),h&&C.append("level",h),f&&C.append("search",f),(await(await fetch(`/api/logs?${C}`)).json()).logs||[]},refetchInterval:t?!1:5e3});ye.useEffect(()=>{j&&s(j)},[j]),ye.useEffect(()=>{if(!t){_.current?.close();return}const C=new EventSource("/api/logs/stream");return _.current=C,C.onmessage=K=>{const F=JSON.parse(K.data).log;h&&!F.toLowerCase().includes(`[${h.toLowerCase()}]`)||f&&!F.toLowerCase().includes(f.toLowerCase())||s($=>[...$.slice(-999),F])},C.onerror=()=>{console.error("SSE connection error"),C.close()},()=>{C.close()}},[t,h,f]),ye.useEffect(()=>{t&&y.current?.scrollIntoView({behavior:"smooth"})},[a,t]);const w=()=>{navigator.clipboard.writeText(a.join(`
|
|
130
|
+
`)),$e.success("Logs copied to clipboard!")},k=()=>{const C=new Blob([a.join(`
|
|
131
|
+
`)],{type:"text/plain"}),K=URL.createObjectURL(C),W=document.createElement("a");W.href=K,W.download=`claudectx-logs-${new Date().toISOString()}.txt`,W.click(),URL.revokeObjectURL(K),$e.success("Logs downloaded!")},T=()=>{s([]),$e.success("Logs cleared!")},D=C=>C.includes("[ERROR]")||C.includes("error")?"var(--red)":C.includes("[WARN]")||C.includes("warn")?"var(--yellow)":C.includes("[INFO]")||C.includes("info")?"var(--blue)":C.includes("[Hook]")?"var(--purple)":C.includes("[Broadcast]")?"var(--green)":"var(--text)";return g.jsxs("div",{style:{padding:"24px",maxWidth:"100%",width:"100%",margin:"0 auto"},children:[g.jsxs("div",{style:{marginBottom:24},children:[g.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8},children:"System Logs"}),g.jsx("p",{style:{color:"var(--text-muted)",fontSize:14},children:"Real-time streaming logs from ClaudeContext worker"})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,marginBottom:16,display:"flex",flexWrap:"wrap",gap:12,alignItems:"center"},children:[g.jsx("div",{style:{display:"flex",gap:6},children:K8.map(C=>g.jsx("button",{onClick:()=>u(C.value),style:{padding:"6px 12px",background:o===C.value?"var(--accent)":"var(--surface2)",color:o===C.value?"white":"var(--text)",border:"1px solid",borderColor:o===C.value?"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:C.label},C.value))}),g.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),g.jsx("div",{style:{display:"flex",gap:6},children:Z8.map(C=>g.jsx("button",{onClick:()=>d(C.value),style:{padding:"6px 12px",background:h===C.value?C.color||"var(--accent)":"var(--surface2)",color:h===C.value?"white":"var(--text)",border:"1px solid",borderColor:h===C.value?C.color||"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:C.label},C.value))}),g.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),g.jsxs("div",{style:{flex:1,minWidth:200,position:"relative"},children:[g.jsx(b0,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),g.jsx("input",{type:"text",placeholder:"Search logs...",value:f,onChange:C=>m(C.target.value),style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)"}}),f&&g.jsx("button",{onClick:()=>m(""),style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex"},children:g.jsx(ti,{size:14})})]}),g.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),g.jsxs("button",{onClick:()=>n(!t),style:{padding:"8px 12px",background:t?"var(--green)15":"var(--surface2)",color:t?"var(--green)":"var(--text)",border:"1px solid",borderColor:t?"var(--green)30":"var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[t?g.jsx(x3,{size:14}):g.jsx(S3,{size:14}),t?"Pause":"Resume"]}),g.jsxs("button",{onClick:w,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[g.jsx(Km,{size:14}),"Copy"]}),g.jsxs("button",{onClick:k,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[g.jsx($d,{size:14}),"Download"]}),g.jsx("button",{onClick:T,style:{padding:"8px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},children:"Clear"})]}),g.jsxs("div",{style:{background:"#1a1a1a",border:"1px solid var(--border)",borderRadius:12,padding:16,height:"calc(100vh - 320px)",overflow:"auto",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:12,lineHeight:1.6},children:[a.length===0?g.jsx("div",{style:{textAlign:"center",padding:40,color:"var(--text-muted)"},children:"No logs to display. Waiting for logs..."}):a.map((C,K)=>g.jsx("div",{style:{color:D(C),marginBottom:2,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:C},K)),g.jsx("div",{ref:y})]}),g.jsxs("div",{style:{marginTop:12,display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12,color:"var(--text-muted)"},children:[g.jsxs("div",{children:[a.length," logs displayed",t&&g.jsx("span",{style:{color:"var(--green)",marginLeft:8},children:"● Live"})]}),g.jsxs("div",{children:[o>0?`Last ${o} minutes`:"All time",h&&` • ${h}`,f&&` • "${f}"`]})]})]})}function J8(){const t=Sf(),[n,a]=ye.useState({apiProvider:"local-9router",apiKey:"",baseURL:"http://localhost:20128/v1",model:"claude-opus-4-6",disableSummaries:!1}),[s,o]=ye.useState("idle"),{data:u,isLoading:h}=ya({queryKey:["settings"],queryFn:Sn.getSettings});ye.useEffect(()=>{if(u){let y="local-9router";u.baseURL==="http://localhost:20128/v1"?y="local-9router":u.baseURL&&u.baseURL.includes("9router")?y="cloud-9router":(!u.baseURL||u.baseURL==="https://api.anthropic.com")&&(y="direct"),a({apiProvider:y,apiKey:"",baseURL:u.baseURL||"http://localhost:20128/v1",model:u.model||"AWS",disableSummaries:u.disableSummaries||!1})}},[u]);const d=lf({mutationFn:Sn.updateSettings,onSuccess:()=>{o("success"),t.invalidateQueries({queryKey:["settings"]}),t.invalidateQueries({queryKey:["health"]}),setTimeout(()=>o("idle"),3e3)},onError:()=>{o("error"),setTimeout(()=>o("idle"),3e3)}}),f=()=>{o("saving");let y="",_=n.apiKey;n.apiProvider==="local-9router"?(y="http://localhost:20128/v1",(!n.apiKey||n.apiKey.trim()==="")&&(_="sk_9router")):n.apiProvider==="cloud-9router"?y=n.baseURL:y="";const j={baseURL:y,model:n.model,disableSummaries:n.disableSummaries};n.apiKey&&n.apiKey.trim()!==""&&(j.apiKey=_),d.mutate(j)},m=[{value:"claude-opus-4-6",label:"Claude Opus 4.6",description:"Most capable - best for complex analysis"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",description:"Balanced - great speed and quality"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5",description:"Fastest - good for simple tasks"},{value:"AWS",label:"AWS",description:"9router combo or Claude Code default"},{value:"custom",label:"Custom Combo/Model...",description:"Enter your own combo name or model"}];return h?g.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading settings..."}):g.jsxs("div",{style:{padding:"28px 32px",maxWidth:1200},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:24},children:[g.jsx(n5,{size:24,color:"var(--accent)"}),g.jsx("h1",{style:{fontSize:24,fontWeight:700},children:"Settings"})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:20,marginBottom:20},children:[g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:"API Configuration"}),g.jsxs("div",{style:{marginBottom:20},children:[g.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:"API Provider"}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[g.jsxs("button",{onClick:()=>a({...n,apiProvider:"local-9router",baseURL:"http://localhost:20128/v1"}),style:{padding:"12px 16px",background:n.apiProvider==="local-9router"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="local-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[g.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Local (Recommended)"}),g.jsx("div",{style:{fontSize:12,opacity:.8},children:"Running on localhost:20128 - No API key needed"})]}),g.jsxs("button",{onClick:()=>a({...n,apiProvider:"cloud-9router"}),style:{padding:"12px 16px",background:n.apiProvider==="cloud-9router"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="cloud-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[g.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Cloud"}),g.jsx("div",{style:{fontSize:12,opacity:.8},children:"Remote 9router endpoint - Requires API key only"})]}),g.jsxs("button",{onClick:()=>a({...n,apiProvider:"direct",baseURL:""}),style:{padding:"12px 16px",background:n.apiProvider==="direct"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="direct"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[g.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"Direct (Anthropic)"}),g.jsx("div",{style:{fontSize:12,opacity:.8},children:"Connect directly to Anthropic's Claude API"})]})]})]}),(n.apiProvider==="direct"||n.apiProvider==="cloud-9router")&&g.jsxs("div",{style:{marginBottom:20},children:[g.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["API Key ",n.apiProvider==="cloud-9router"&&g.jsx("span",{style:{color:"var(--accent)"},children:"(Required)"})]}),g.jsx("input",{type:"password",value:n.apiKey,onChange:y=>a({...n,apiKey:y.target.value}),placeholder:n.apiProvider==="direct"?"sk-ant-...":"Your 9router API key",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:n.apiProvider==="direct"?"Get your API key from console.anthropic.com":"API key provided by your 9router cloud service"})]}),n.apiProvider==="cloud-9router"&&g.jsxs("div",{style:{marginBottom:20},children:[g.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["Base URL ",g.jsx("span",{style:{color:"var(--text-muted)",fontWeight:400},children:"(Optional - uses default if empty)"})]}),g.jsx("input",{type:"text",value:n.baseURL,onChange:y=>a({...n,baseURL:y.target.value}),placeholder:"https://your-9router-cloud.com/v1",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:"Leave empty to use default 9router cloud endpoint"})]}),n.apiProvider==="local-9router"&&g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[g.jsx("strong",{style:{color:"var(--text)"},children:"Local 9router:"})," Using localhost:20128/v1 - No API key needed. Make sure 9router is running locally."]})]}),g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[g.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:n.apiProvider==="direct"?"Model Selection":"Combo / Model Name"}),g.jsxs("div",{style:{marginBottom:20},children:[g.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:n.apiProvider==="direct"?"Claude Model":"Combo Name or Model"}),g.jsx("select",{value:m.find(y=>y.value===n.model)?n.model:"custom",onChange:y=>{y.target.value==="custom"?m.find(_=>_.value===n.model)&&a({...n,model:""}):a({...n,model:y.target.value})},style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,cursor:"pointer"},children:m.map(y=>g.jsx("option",{value:y.value,children:y.label},y.value))}),!m.find(y=>y.value===n.model)&&g.jsx("input",{type:"text",value:n.model,placeholder:n.apiProvider==="direct"?"Enter model name (e.g., claude-opus-4-6)":"Enter your combo name (e.g., my-fast-combo, production)",onChange:y=>a({...n,model:y.target.value}),style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,marginTop:8}}),g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:n.apiProvider==="direct"?m.find(y=>y.value===n.model)?.description||"Direct Claude API model name":n.apiProvider==="local-9router"?"9router combo name (configured in your local 9router settings)":"9router combo name or model identifier"})]}),n.apiProvider!=="direct"&&g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6,marginBottom:20},children:[g.jsx("strong",{style:{color:"var(--text)"},children:"About 9router Combos:"}),' Combos are custom routing configurations you create in 9router. Each combo can route to different models/providers with specific settings. Common examples: "AWS", "production-combo", "fast-combo", etc.']}),g.jsxs("div",{style:{marginBottom:0},children:[g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",fontSize:13,fontWeight:500},children:[g.jsx("input",{type:"checkbox",checked:n.disableSummaries,onChange:y=>a({...n,disableSummaries:y.target.checked}),style:{cursor:"pointer"}}),"Disable AI Summaries"]}),g.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6,marginLeft:24},children:"Turn off automatic session summarization (saves API costs)"})]})]})]}),g.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:10,padding:16,marginBottom:20,display:"flex",gap:12},children:[g.jsx(nc,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),g.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[g.jsx("strong",{style:{color:"var(--text)"},children:"Note:"})," Changes require a worker restart to take effect. After saving, run ",g.jsx("code",{style:{background:"var(--surface)",padding:"2px 6px",borderRadius:4},children:"claudectx restart"})," in your terminal."]})]}),g.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[g.jsxs("button",{onClick:f,disabled:s==="saving",style:{padding:"12px 24px",background:s==="success"?"var(--green)":"var(--accent)",color:"white",border:"none",borderRadius:8,cursor:s==="saving"?"not-allowed":"pointer",fontSize:14,fontWeight:600,display:"flex",alignItems:"center",gap:8,opacity:s==="saving"?.6:1},children:[s==="saving"&&g.jsx(Hl,{size:16,style:{animation:"spin 1s linear infinite"}}),s==="success"&&g.jsx(gl,{size:16}),s==="idle"&&g.jsx(N3,{size:16}),s==="error"&&g.jsx(nc,{size:16}),s==="saving"?"Saving...":s==="success"?"Saved!":s==="error"?"Error":"Save Settings"]}),s==="error"&&g.jsx("span",{style:{fontSize:13,color:"var(--red)"},children:"Failed to save settings. Please try again."})]}),g.jsx("style",{children:`
|
|
132
|
+
@keyframes spin {
|
|
133
|
+
from { transform: rotate(0deg); }
|
|
134
|
+
to { transform: rotate(360deg); }
|
|
135
|
+
}
|
|
136
|
+
`})]})}function e_(){const[t,n]=ye.useState(!1);if(ye.useEffect(()=>{const s=()=>n(!0),o=()=>n(!1);return document.addEventListener("show-shortcuts",s),document.addEventListener("close-modal",o),()=>{document.removeEventListener("show-shortcuts",s),document.removeEventListener("close-modal",o)}},[]),!t)return null;const a=[{keys:["j"],description:"Next item"},{keys:["k"],description:"Previous item"},{keys:["/"],description:"Focus search"},{keys:["Esc"],description:"Close modal"},{keys:["?"],description:"Show shortcuts"},{keys:["g","h"],description:"Go to home"},{keys:["g","s"],description:"Go to search"},{keys:["g","l"],description:"Go to live"},{keys:["g","m"],description:"Go to metrics"},{keys:["g","b"],description:"Go to memory"}];return g.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:()=>n(!1),children:g.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:500,width:"90%",animation:"scaleIn 0.2s"},onClick:s=>s.stopPropagation(),children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[g.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Keyboard Shortcuts"}),g.jsx("button",{onClick:()=>n(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:s=>s.currentTarget.style.background="var(--surface2)",onMouseLeave:s=>s.currentTarget.style.background="none",children:g.jsx(ti,{size:20})})]}),g.jsx("div",{style:{display:"grid",gap:12},children:a.map((s,o)=>g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g.jsx("span",{style:{fontSize:14,color:"var(--text-muted)"},children:s.description}),g.jsx("div",{style:{display:"flex",gap:4},children:s.keys.map((u,h)=>g.jsx("kbd",{style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:4,fontSize:13,fontFamily:"monospace",color:"var(--text)"},children:u},h))})]},o))})]})})}function t_({openTabs:t,onCloseTab:n}){const a=oc(),o=sc().pathname.match(/\/(project|session)\/([^/]+)/)?.[2];return t.length===0?null:g.jsx("div",{style:{position:"fixed",bottom:0,left:240,right:0,height:48,background:"var(--surface)",borderTop:"1px solid var(--border)",display:"flex",alignItems:"center",gap:4,padding:"0 12px",overflowX:"auto",overflowY:"hidden",zIndex:100,scrollbarWidth:"thin"},children:t.map(u=>{const h=u.id===o;return g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:h?"var(--surface2)":"transparent",border:"1px solid",borderColor:h?"var(--accent)":"var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s",minWidth:120,maxWidth:200,whiteSpace:"nowrap"},onClick:()=>a(`/${u.type}/${u.id}`),onMouseEnter:d=>{h||(d.currentTarget.style.background="var(--surface2)")},onMouseLeave:d=>{h||(d.currentTarget.style.background="transparent")},children:[g.jsx("span",{style:{fontSize:13,fontWeight:h?600:500,color:h?"var(--accent)":"var(--text)",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:u.name}),g.jsx("button",{onClick:d=>{d.stopPropagation(),n(u.id)},style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:2,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:d=>{d.currentTarget.style.background="var(--red)20",d.currentTarget.style.color="var(--red)"},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.color="var(--text-muted)"},children:g.jsx(ti,{size:14})})]},u.id)})})}function n_(){const t=oc();ye.useEffect(()=>{let n=!1;function a(s){if(!(s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement)){if(s.key==="/"){s.preventDefault(),document.querySelector('input[type="search"]')?.focus();return}if(s.key==="Escape"){document.dispatchEvent(new CustomEvent("close-modal"));return}if(s.key==="?"){s.preventDefault(),document.dispatchEvent(new CustomEvent("show-shortcuts"));return}if(s.key==="g"&&!n){n=!0;const o=setTimeout(()=>{n=!1},1e3),u=h=>{clearTimeout(o),n=!1,h.key==="h"?t("/"):h.key==="s"?t("/search"):h.key==="l"?t("/live"):h.key==="m"?t("/metrics"):h.key==="b"&&t("/memory"),window.removeEventListener("keydown",u)};window.addEventListener("keydown",u);return}if(s.key==="j"||s.key==="k"){const o=document.querySelectorAll("[data-keyboard-nav]");if(o.length===0)return;const u=Array.from(o).findIndex(f=>f===document.activeElement||f.contains(document.activeElement));let h=u;s.key==="j"?h=u<o.length-1?u+1:0:h=u>0?u-1:o.length-1;const d=o[h];d?.focus(),d?.scrollIntoView({behavior:"smooth",block:"center"})}}}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t])}function r_(){n_();const t=oc(),[n,a]=ye.useState(()=>{const u=localStorage.getItem("openTabs");return u?JSON.parse(u):[]});ye.useEffect(()=>{localStorage.setItem("openTabs",JSON.stringify(n))},[n]);const s=(u,h,d,f)=>{a(m=>{if(console.log("addTab called:",{id:u,name:h,type:d,projectId:f,currentTabs:m}),m.some(y=>y.id===u&&y.type===d))return console.log("Tab already exists, skipping"),m;if(d==="session"&&f){const y=m.findIndex(_=>_.id===f&&_.type==="project");if(console.log("Looking for project tab:",f,"found at index:",y),y!==-1){const _=[...m];return _[y]={id:u,name:h,type:d,projectId:f},console.log("Replaced project tab with session tab"),_}}if(d==="project"){const y=m.findIndex(_=>_.projectId===u&&_.type==="session");if(console.log("Looking for session tab from project:",u,"found at index:",y),y!==-1){const _=[...m];return _[y]={id:u,name:h,type:d},console.log("Replaced session tab with project tab"),_}}return console.log("Adding new tab"),[...m,{id:u,name:h,type:d,projectId:f}]})},o=u=>{a(h=>{const d=h.filter(m=>m.id!==u);if(window.location.pathname.includes(`/${u}`))if(d.length>0){const m=d[d.length-1];t(`/${m.type}/${m.id}`)}else t("/");return d})};return g.jsxs(g.Fragment,{children:[g.jsx(K3,{children:g.jsxs(Qb,{children:[g.jsx(xs,{path:"/",element:g.jsx(g6,{onOpenProject:(u,h)=>s(u,h,"project")})}),g.jsx(xs,{path:"/project/:id",element:g.jsx(z6,{onOpenProject:(u,h)=>s(u,h,"project")})}),g.jsx(xs,{path:"/project/:id/memory",element:g.jsx(U8,{})}),g.jsx(xs,{path:"/session/:id",element:g.jsx(z8,{onOpenSession:(u,h,d)=>s(u,h,"session",d)})}),g.jsx(xs,{path:"/search",element:g.jsx(B8,{})}),g.jsx(xs,{path:"/live",element:g.jsx(q8,{})}),g.jsx(xs,{path:"/metrics",element:g.jsx(X8,{})}),g.jsx(xs,{path:"/logs",element:g.jsx($8,{})}),g.jsx(xs,{path:"/settings",element:g.jsx(J8,{})})]})}),g.jsx(t_,{openTabs:n,onCloseTab:o}),g.jsx(h6,{}),g.jsx(e_,{})]})}const a_=new Wy({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:1e4}}});xy.createRoot(document.getElementById("root")).render(g.jsx(Am.StrictMode,{children:g.jsx(Yy,{client:a_,children:g.jsx(tx,{children:g.jsx(r_,{})})})}));export{_n as _,i_ as c,_m as g};
|