openapi-spec-master
Version:
🚀 Professional OpenAPI specification analyzer and MCP server. The ultimate toolkit for API developers with VS Code extension integration.
911 lines • 773 kB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var ck=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Im={exports:{}},Dd={},Fm={exports:{}},ht={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var vc=Symbol.for("react.element"),ev=Symbol.for("react.portal"),tv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),nv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),sv=Symbol.for("react.context"),av=Symbol.for("react.forward_ref"),ov=Symbol.for("react.suspense"),lv=Symbol.for("react.memo"),cv=Symbol.for("react.lazy"),E1=Symbol.iterator;function uv(e){return e===null||typeof e!="object"?null:(e=E1&&e[E1]||e["@@iterator"],typeof e=="function"?e:null)}var Tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Om=Object.assign,Mm={};function qo(e,t,r){this.props=e,this.context=t,this.refs=Mm,this.updater=r||Tm}qo.prototype.isReactComponent={};qo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dm(){}Dm.prototype=qo.prototype;function Jf(e,t,r){this.props=e,this.context=t,this.refs=Mm,this.updater=r||Tm}var Xf=Jf.prototype=new Dm;Xf.constructor=Jf;Om(Xf,qo.prototype);Xf.isPureReactComponent=!0;var I1=Array.isArray,Rm=Object.prototype.hasOwnProperty,Qf={current:null},Bm={key:!0,ref:!0,__self:!0,__source:!0};function qm(e,t,r){var n,i={},s=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)Rm.call(t,n)&&!Bm.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var u=Array(l),h=0;h<l;h++)u[h]=arguments[h+2];i.children=u}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:vc,type:e,key:s,ref:a,props:i,_owner:Qf.current}}function dv(e,t){return{$$typeof:vc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zf(e){return typeof e=="object"&&e!==null&&e.$$typeof===vc}function hv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var F1=/\/+/g;function V0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hv(""+e.key):t.toString(36)}function Du(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case vc:case ev:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+V0(a,0):n,I1(i)?(r="",e!=null&&(r=e.replace(F1,"$&/")+"/"),Du(i,t,r,"",function(h){return h})):i!=null&&(Zf(i)&&(i=dv(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(F1,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",I1(e))for(var l=0;l<e.length;l++){s=e[l];var u=n+V0(s,l);a+=Du(s,t,r,u,i)}else if(u=uv(e),typeof u=="function")for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=n+V0(s,l++),a+=Du(s,t,r,u,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function pu(e,t,r){if(e==null)return e;var n=[],i=0;return Du(e,n,"","",function(s){return t.call(r,s,i++)}),n}function fv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Hr={current:null},Ru={transition:null},pv={ReactCurrentDispatcher:Hr,ReactCurrentBatchConfig:Ru,ReactCurrentOwner:Qf};function zm(){throw Error("act(...) is not supported in production builds of React.")}ht.Children={map:pu,forEach:function(e,t,r){pu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return pu(e,function(){t++}),t},toArray:function(e){return pu(e,function(t){return t})||[]},only:function(e){if(!Zf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ht.Component=qo;ht.Fragment=tv;ht.Profiler=nv;ht.PureComponent=Jf;ht.StrictMode=rv;ht.Suspense=ov;ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pv;ht.act=zm;ht.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Om({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Qf.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Rm.call(t,u)&&!Bm.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){l=Array(u);for(var h=0;h<u;h++)l[h]=arguments[h+2];n.children=l}return{$$typeof:vc,type:e.type,key:i,ref:s,props:n,_owner:a}};ht.createContext=function(e){return e={$$typeof:sv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:iv,_context:e},e.Consumer=e};ht.createElement=qm;ht.createFactory=function(e){var t=qm.bind(null,e);return t.type=e,t};ht.createRef=function(){return{current:null}};ht.forwardRef=function(e){return{$$typeof:av,render:e}};ht.isValidElement=Zf;ht.lazy=function(e){return{$$typeof:cv,_payload:{_status:-1,_result:e},_init:fv}};ht.memo=function(e,t){return{$$typeof:lv,type:e,compare:t===void 0?null:t}};ht.startTransition=function(e){var t=Ru.transition;Ru.transition={};try{e()}finally{Ru.transition=t}};ht.unstable_act=zm;ht.useCallback=function(e,t){return Hr.current.useCallback(e,t)};ht.useContext=function(e){return Hr.current.useContext(e)};ht.useDebugValue=function(){};ht.useDeferredValue=function(e){return Hr.current.useDeferredValue(e)};ht.useEffect=function(e,t){return Hr.current.useEffect(e,t)};ht.useId=function(){return Hr.current.useId()};ht.useImperativeHandle=function(e,t,r){return Hr.current.useImperativeHandle(e,t,r)};ht.useInsertionEffect=function(e,t){return Hr.current.useInsertionEffect(e,t)};ht.useLayoutEffect=function(e,t){return Hr.current.useLayoutEffect(e,t)};ht.useMemo=function(e,t){return Hr.current.useMemo(e,t)};ht.useReducer=function(e,t,r){return Hr.current.useReducer(e,t,r)};ht.useRef=function(e){return Hr.current.useRef(e)};ht.useState=function(e){return Hr.current.useState(e)};ht.useSyncExternalStore=function(e,t,r){return Hr.current.useSyncExternalStore(e,t,r)};ht.useTransition=function(){return Hr.current.useTransition()};ht.version="18.3.1";Fm.exports=ht;var Fe=Fm.exports;const T1=Zy(Fe);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gv=Fe,mv=Symbol.for("react.element"),xv=Symbol.for("react.fragment"),yv=Object.prototype.hasOwnProperty,vv=gv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bv={key:!0,ref:!0,__self:!0,__source:!0};function Um(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)yv.call(t,n)&&!bv.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:mv,type:e,key:s,ref:a,props:i,_owner:vv.current}}Dd.Fragment=xv;Dd.jsx=Um;Dd.jsxs=Um;Im.exports=Dd;var o=Im.exports,$m={exports:{}},vn={},Hm={exports:{}},Wm={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(W,te){var se=W.length;W.push(te);e:for(;0<se;){var ye=se-1>>>1,j=W[ye];if(0<i(j,te))W[ye]=te,W[se]=j,se=ye;else break e}}function r(W){return W.length===0?null:W[0]}function n(W){if(W.length===0)return null;var te=W[0],se=W.pop();if(se!==te){W[0]=se;e:for(var ye=0,j=W.length,T=j>>>1;ye<T;){var B=2*(ye+1)-1,K=W[B],ee=B+1,z=W[ee];if(0>i(K,se))ee<j&&0>i(z,K)?(W[ye]=z,W[ee]=se,ye=ee):(W[ye]=K,W[B]=se,ye=B);else if(ee<j&&0>i(z,se))W[ye]=z,W[ee]=se,ye=ee;else break e}}return te}function i(W,te){var se=W.sortIndex-te.sortIndex;return se!==0?se:W.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var u=[],h=[],x=1,m=null,y=3,p=!1,N=!1,k=!1,M=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=W)n(h),te.sortIndex=te.expirationTime,t(u,te);else break;te=r(h)}}function $(W){if(k=!1,L(W),!N)if(r(u)!==null)N=!0,ie(J);else{var te=r(h);te!==null&&he($,te.startTime-W)}}function J(W,te){N=!1,k&&(k=!1,b(R),R=-1),p=!0;var se=y;try{for(L(te),m=r(u);m!==null&&(!(m.expirationTime>te)||W&&!P());){var ye=m.callback;if(typeof ye=="function"){m.callback=null,y=m.priorityLevel;var j=ye(m.expirationTime<=te);te=e.unstable_now(),typeof j=="function"?m.callback=j:m===r(u)&&n(u),L(te)}else n(u);m=r(u)}if(m!==null)var T=!0;else{var B=r(h);B!==null&&he($,B.startTime-te),T=!1}return T}finally{m=null,y=se,p=!1}}var le=!1,D=null,R=-1,Z=5,G=-1;function P(){return!(e.unstable_now()-G<Z)}function I(){if(D!==null){var W=e.unstable_now();G=W;var te=!0;try{te=D(!0,W)}finally{te?Y():(le=!1,D=null)}}else le=!1}var Y;if(typeof w=="function")Y=function(){w(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,de=F.port2;F.port1.onmessage=I,Y=function(){de.postMessage(null)}}else Y=function(){M(I,0)};function ie(W){D=W,le||(le=!0,Y())}function he(W,te){R=M(function(){W(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){N||p||(N=!0,ie(J))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(W){switch(y){case 1:case 2:case 3:var te=3;break;default:te=y}var se=y;y=te;try{return W()}finally{y=se}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,te){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var se=y;y=W;try{return te()}finally{y=se}},e.unstable_scheduleCallback=function(W,te,se){var ye=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ye+se:ye):se=ye,W){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=se+j,W={id:x++,callback:te,priorityLevel:W,startTime:se,expirationTime:j,sortIndex:-1},se>ye?(W.sortIndex=se,t(h,W),r(u)===null&&W===r(h)&&(k?(b(R),R=-1):k=!0,he($,se-ye))):(W.sortIndex=j,t(u,W),N||p||(N=!0,ie(J))),W},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(W){var te=y;return function(){var se=y;y=te;try{return W.apply(this,arguments)}finally{y=se}}}})(Wm);Hm.exports=Wm;var wv=Hm.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Nv=Fe,yn=wv;function Te(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Vm=new Set,Yl={};function va(e,t){Io(e,t),Io(e+"Capture",t)}function Io(e,t){for(Yl[e]=t,e=0;e<t.length;e++)Vm.add(t[e])}var $i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ih=Object.prototype.hasOwnProperty,kv=/^[: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]*$/,O1={},M1={};function jv(e){return Ih.call(M1,e)?!0:Ih.call(O1,e)?!1:kv.test(e)?M1[e]=!0:(O1[e]=!0,!1)}function Sv(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Av(e,t,r,n){if(t===null||typeof t>"u"||Sv(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Wr(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Sr[e]=new Wr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Sr[t]=new Wr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Sr[e]=new Wr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Sr[e]=new Wr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Sr[e]=new Wr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Sr[e]=new Wr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Sr[e]=new Wr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Sr[e]=new Wr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Sr[e]=new Wr(e,5,!1,e.toLowerCase(),null,!1,!1)});var ep=/[\-:]([a-z])/g;function tp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ep,tp);Sr[t]=new Wr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ep,tp);Sr[t]=new Wr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ep,tp);Sr[t]=new Wr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Sr[e]=new Wr(e,1,!1,e.toLowerCase(),null,!1,!1)});Sr.xlinkHref=new Wr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Sr[e]=new Wr(e,1,!1,e.toLowerCase(),null,!0,!0)});function rp(e,t,r,n){var i=Sr.hasOwnProperty(t)?Sr[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Av(t,r,i,n)&&(r=null),n||i===null?jv(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ji=Nv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gu=Symbol.for("react.element"),so=Symbol.for("react.portal"),ao=Symbol.for("react.fragment"),np=Symbol.for("react.strict_mode"),Fh=Symbol.for("react.profiler"),Gm=Symbol.for("react.provider"),Ym=Symbol.for("react.context"),ip=Symbol.for("react.forward_ref"),Th=Symbol.for("react.suspense"),Oh=Symbol.for("react.suspense_list"),sp=Symbol.for("react.memo"),ps=Symbol.for("react.lazy"),Km=Symbol.for("react.offscreen"),D1=Symbol.iterator;function bl(e){return e===null||typeof e!="object"?null:(e=D1&&e[D1]||e["@@iterator"],typeof e=="function"?e:null)}var qt=Object.assign,G0;function Pl(e){if(G0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);G0=t&&t[1]||""}return`
`+G0+e}var Y0=!1;function K0(e,t){if(!e||Y0)return"";Y0=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(h){var n=h}Reflect.construct(e,[],t)}else{try{t.call()}catch(h){n=h}e.call(t.prototype)}else{try{throw Error()}catch(h){n=h}e()}}catch(h){if(h&&n&&typeof h.stack=="string"){for(var i=h.stack.split(`
`),s=n.stack.split(`
`),a=i.length-1,l=s.length-1;1<=a&&0<=l&&i[a]!==s[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==s[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==s[l]){var u=`
`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{Y0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pl(e):""}function Lv(e){switch(e.tag){case 5:return Pl(e.type);case 16:return Pl("Lazy");case 13:return Pl("Suspense");case 19:return Pl("SuspenseList");case 0:case 2:case 15:return e=K0(e.type,!1),e;case 11:return e=K0(e.type.render,!1),e;case 1:return e=K0(e.type,!0),e;default:return""}}function Mh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ao:return"Fragment";case so:return"Portal";case Fh:return"Profiler";case np:return"StrictMode";case Th:return"Suspense";case Oh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ym:return(e.displayName||"Context")+".Consumer";case Gm:return(e._context.displayName||"Context")+".Provider";case ip:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sp:return t=e.displayName||null,t!==null?t:Mh(e.type)||"Memo";case ps:t=e._payload,e=e._init;try{return Mh(e(t))}catch{}}return null}function Cv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mh(t);case 8:return t===np?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Es(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _v(e){var t=Jm(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mu(e){e._valueTracker||(e._valueTracker=_v(e))}function Xm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Jm(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function td(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}}function Dh(e,t){var r=t.checked;return qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function R1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Es(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Qm(e,t){t=t.checked,t!=null&&rp(e,"checked",t,!1)}function Rh(e,t){Qm(e,t);var r=Es(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bh(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bh(e,t.type,Es(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function B1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bh(e,t,r){(t!=="number"||td(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var El=Array.isArray;function wo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Es(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function qh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Te(91));return qt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function q1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Te(92));if(El(r)){if(1<r.length)throw Error(Te(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Es(r)}}function Zm(e,t){var r=Es(t.value),n=Es(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function z1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function e2(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?e2(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xu,t2=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xu=xu||document.createElement("div"),xu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ol={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pv=["Webkit","ms","Moz","O"];Object.keys(Ol).forEach(function(e){Pv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ol[t]=Ol[e]})});function r2(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ol.hasOwnProperty(e)&&Ol[e]?(""+t).trim():t+"px"}function n2(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=r2(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var Ev=qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Uh(e,t){if(t){if(Ev[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Te(62))}}function $h(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Hh=null;function ap(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wh=null,No=null,ko=null;function U1(e){if(e=Nc(e)){if(typeof Wh!="function")throw Error(Te(280));var t=e.stateNode;t&&(t=Ud(t),Wh(e.stateNode,e.type,t))}}function i2(e){No?ko?ko.push(e):ko=[e]:No=e}function s2(){if(No){var e=No,t=ko;if(ko=No=null,U1(e),t)for(e=0;e<t.length;e++)U1(t[e])}}function a2(e,t){return e(t)}function o2(){}var J0=!1;function l2(e,t,r){if(J0)return e(t,r);J0=!0;try{return a2(e,t,r)}finally{J0=!1,(No!==null||ko!==null)&&(o2(),s2())}}function Jl(e,t){var r=e.stateNode;if(r===null)return null;var n=Ud(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Te(231,t,typeof r));return r}var Vh=!1;if($i)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){Vh=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{Vh=!1}function Iv(e,t,r,n,i,s,a,l,u){var h=Array.prototype.slice.call(arguments,3);try{t.apply(r,h)}catch(x){this.onError(x)}}var Ml=!1,rd=null,nd=!1,Gh=null,Fv={onError:function(e){Ml=!0,rd=e}};function Tv(e,t,r,n,i,s,a,l,u){Ml=!1,rd=null,Iv.apply(Fv,arguments)}function Ov(e,t,r,n,i,s,a,l,u){if(Tv.apply(this,arguments),Ml){if(Ml){var h=rd;Ml=!1,rd=null}else throw Error(Te(198));nd||(nd=!0,Gh=h)}}function ba(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function c2(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $1(e){if(ba(e)!==e)throw Error(Te(188))}function Mv(e){var t=e.alternate;if(!t){if(t=ba(e),t===null)throw Error(Te(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return $1(i),e;if(s===n)return $1(i),t;s=s.sibling}throw Error(Te(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,l=i.child;l;){if(l===r){a=!0,r=i,n=s;break}if(l===n){a=!0,n=i,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,n=i;break}if(l===n){a=!0,n=s,r=i;break}l=l.sibling}if(!a)throw Error(Te(189))}}if(r.alternate!==n)throw Error(Te(190))}if(r.tag!==3)throw Error(Te(188));return r.stateNode.current===r?e:t}function u2(e){return e=Mv(e),e!==null?d2(e):null}function d2(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=d2(e);if(t!==null)return t;e=e.sibling}return null}var h2=yn.unstable_scheduleCallback,H1=yn.unstable_cancelCallback,Dv=yn.unstable_shouldYield,Rv=yn.unstable_requestPaint,Xt=yn.unstable_now,Bv=yn.unstable_getCurrentPriorityLevel,op=yn.unstable_ImmediatePriority,f2=yn.unstable_UserBlockingPriority,id=yn.unstable_NormalPriority,qv=yn.unstable_LowPriority,p2=yn.unstable_IdlePriority,Rd=null,wi=null;function zv(e){if(wi&&typeof wi.onCommitFiberRoot=="function")try{wi.onCommitFiberRoot(Rd,e,void 0,(e.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:Hv,Uv=Math.log,$v=Math.LN2;function Hv(e){return e>>>=0,e===0?32:31-(Uv(e)/$v|0)|0}var yu=64,vu=4194304;function Il(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function sd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?n=Il(l):(s&=a,s!==0&&(n=Il(s)))}else a=r&~i,a!==0?n=Il(a):s!==0&&(n=Il(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Qn(t),i=1<<r,n|=e[r],t&=~i;return n}function Wv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vv(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Qn(s),l=1<<a,u=i[a];u===-1?(!(l&r)||l&n)&&(i[a]=Wv(l,t)):u<=t&&(e.expiredLanes|=l),s&=~l}}function Yh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function g2(){var e=yu;return yu<<=1,!(yu&4194240)&&(yu=64),e}function X0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function bc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qn(t),e[t]=r}function Gv(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Qn(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function lp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Qn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var kt=0;function m2(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var x2,cp,y2,v2,b2,Kh=!1,bu=[],Ns=null,ks=null,js=null,Xl=new Map,Ql=new Map,ms=[],Yv="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 submit".split(" ");function W1(e,t){switch(e){case"focusin":case"focusout":Ns=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":Xl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ql.delete(t.pointerId)}}function Nl(e,t,r,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Nc(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Kv(e,t,r,n,i){switch(t){case"focusin":return Ns=Nl(Ns,e,t,r,n,i),!0;case"dragenter":return ks=Nl(ks,e,t,r,n,i),!0;case"mouseover":return js=Nl(js,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;return Xl.set(s,Nl(Xl.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Ql.set(s,Nl(Ql.get(s)||null,e,t,r,n,i)),!0}return!1}function w2(e){var t=ia(e.target);if(t!==null){var r=ba(t);if(r!==null){if(t=r.tag,t===13){if(t=c2(r),t!==null){e.blockedOn=t,b2(e.priority,function(){y2(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Jh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Hh=n,r.target.dispatchEvent(n),Hh=null}else return t=Nc(r),t!==null&&cp(t),e.blockedOn=r,!1;t.shift()}return!0}function V1(e,t,r){Bu(e)&&r.delete(t)}function Jv(){Kh=!1,Ns!==null&&Bu(Ns)&&(Ns=null),ks!==null&&Bu(ks)&&(ks=null),js!==null&&Bu(js)&&(js=null),Xl.forEach(V1),Ql.forEach(V1)}function kl(e,t){e.blockedOn===t&&(e.blockedOn=null,Kh||(Kh=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,Jv)))}function Zl(e){function t(i){return kl(i,e)}if(0<bu.length){kl(bu[0],e);for(var r=1;r<bu.length;r++){var n=bu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ns!==null&&kl(Ns,e),ks!==null&&kl(ks,e),js!==null&&kl(js,e),Xl.forEach(t),Ql.forEach(t),r=0;r<ms.length;r++)n=ms[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ms.length&&(r=ms[0],r.blockedOn===null);)w2(r),r.blockedOn===null&&ms.shift()}var jo=Ji.ReactCurrentBatchConfig,ad=!0;function Xv(e,t,r,n){var i=kt,s=jo.transition;jo.transition=null;try{kt=1,up(e,t,r,n)}finally{kt=i,jo.transition=s}}function Qv(e,t,r,n){var i=kt,s=jo.transition;jo.transition=null;try{kt=4,up(e,t,r,n)}finally{kt=i,jo.transition=s}}function up(e,t,r,n){if(ad){var i=Jh(e,t,r,n);if(i===null)oh(e,t,n,od,r),W1(e,n);else if(Kv(i,e,t,r,n))n.stopPropagation();else if(W1(e,n),t&4&&-1<Yv.indexOf(e)){for(;i!==null;){var s=Nc(i);if(s!==null&&x2(s),s=Jh(e,t,r,n),s===null&&oh(e,t,n,od,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else oh(e,t,n,null,r)}}var od=null;function Jh(e,t,r,n){if(od=null,e=ap(n),e=ia(e),e!==null)if(t=ba(e),t===null)e=null;else if(r=t.tag,r===13){if(e=c2(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return od=e,null}function N2(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bv()){case op:return 1;case f2:return 4;case id:case qv:return 16;case p2:return 536870912;default:return 16}default:return 16}}var ys=null,dp=null,qu=null;function k2(){if(qu)return qu;var e,t=dp,r=t.length,n,i="value"in ys?ys.value:ys.textContent,s=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[s-n];n++);return qu=i.slice(e,1<n?1-n:void 0)}function zu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wu(){return!0}function G1(){return!1}function bn(e){function t(r,n,i,s,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?wu:G1,this.isPropagationStopped=G1,this}return qt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wu)},persist:function(){},isPersistent:wu}),t}var zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hp=bn(zo),wc=qt({},zo,{view:0,detail:0}),Zv=bn(wc),Q0,Z0,jl,Bd=qt({},wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fp,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!==jl&&(jl&&e.type==="mousemove"?(Q0=e.screenX-jl.screenX,Z0=e.screenY-jl.screenY):Z0=Q0=0,jl=e),Q0)},movementY:function(e){return"movementY"in e?e.movementY:Z0}}),Y1=bn(Bd),eb=qt({},Bd,{dataTransfer:0}),tb=bn(eb),rb=qt({},wc,{relatedTarget:0}),eh=bn(rb),nb=qt({},zo,{animationName:0,elapsedTime:0,pseudoElement:0}),ib=bn(nb),sb=qt({},zo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ab=bn(sb),ob=qt({},zo,{data:0}),K1=bn(ob),lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cb={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"},ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function db(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ub[e])?!!t[e]:!1}function fp(){return db}var hb=qt({},wc,{key:function(e){if(e.key){var t=lb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fp,charCode:function(e){return e.type==="keypress"?zu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fb=bn(hb),pb=qt({},Bd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J1=bn(pb),gb=qt({},wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fp}),mb=bn(gb),xb=qt({},zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),yb=bn(xb),vb=qt({},Bd,{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}),bb=bn(vb),wb=[9,13,27,32],pp=$i&&"CompositionEvent"in window,Dl=null;$i&&"documentMode"in document&&(Dl=document.documentMode);var Nb=$i&&"TextEvent"in window&&!Dl,j2=$i&&(!pp||Dl&&8<Dl&&11>=Dl),X1=" ",Q1=!1;function S2(e,t){switch(e){case"keyup":return wb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function A2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oo=!1;function kb(e,t){switch(e){case"compositionend":return A2(t);case"keypress":return t.which!==32?null:(Q1=!0,X1);case"textInput":return e=t.data,e===X1&&Q1?null:e;default:return null}}function jb(e,t){if(oo)return e==="compositionend"||!pp&&S2(e,t)?(e=k2(),qu=dp=ys=null,oo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return j2&&t.locale!=="ko"?null:t.data;default:return null}}var Sb={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 Z1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sb[e.type]:t==="textarea"}function L2(e,t,r,n){i2(n),t=ld(t,"onChange"),0<t.length&&(r=new hp("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Rl=null,ec=null;function Ab(e){R2(e,0)}function qd(e){var t=uo(e);if(Xm(t))return e}function Lb(e,t){if(e==="change")return t}var C2=!1;if($i){var th;if($i){var rh="oninput"in document;if(!rh){var eg=document.createElement("div");eg.setAttribute("oninput","return;"),rh=typeof eg.oninput=="function"}th=rh}else th=!1;C2=th&&(!document.documentMode||9<document.documentMode)}function tg(){Rl&&(Rl.detachEvent("onpropertychange",_2),ec=Rl=null)}function _2(e){if(e.propertyName==="value"&&qd(ec)){var t=[];L2(t,ec,e,ap(e)),l2(Ab,t)}}function Cb(e,t,r){e==="focusin"?(tg(),Rl=t,ec=r,Rl.attachEvent("onpropertychange",_2)):e==="focusout"&&tg()}function _b(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qd(ec)}function Pb(e,t){if(e==="click")return qd(t)}function Eb(e,t){if(e==="input"||e==="change")return qd(t)}function Ib(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ti=typeof Object.is=="function"?Object.is:Ib;function tc(e,t){if(ti(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!Ih.call(t,i)||!ti(e[i],t[i]))return!1}return!0}function rg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ng(e,t){var r=rg(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=rg(r)}}function P2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?P2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function E2(){for(var e=window,t=td();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=td(e.document)}return t}function gp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Fb(e){var t=E2(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&P2(r.ownerDocument.documentElement,r)){if(n!==null&&gp(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=ng(r,s);var a=ng(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Tb=$i&&"documentMode"in document&&11>=document.documentMode,lo=null,Xh=null,Bl=null,Qh=!1;function ig(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qh||lo==null||lo!==td(n)||(n=lo,"selectionStart"in n&&gp(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Bl&&tc(Bl,n)||(Bl=n,n=ld(Xh,"onSelect"),0<n.length&&(t=new hp("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=lo)))}function Nu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var co={animationend:Nu("Animation","AnimationEnd"),animationiteration:Nu("Animation","AnimationIteration"),animationstart:Nu("Animation","AnimationStart"),transitionend:Nu("Transition","TransitionEnd")},nh={},I2={};$i&&(I2=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function zd(e){if(nh[e])return nh[e];if(!co[e])return e;var t=co[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in I2)return nh[e]=t[r];return e}var F2=zd("animationend"),T2=zd("animationiteration"),O2=zd("animationstart"),M2=zd("transitionend"),D2=new Map,sg="abort auxClick 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(" ");function Ms(e,t){D2.set(e,t),va(t,[e])}for(var ih=0;ih<sg.length;ih++){var sh=sg[ih],Ob=sh.toLowerCase(),Mb=sh[0].toUpperCase()+sh.slice(1);Ms(Ob,"on"+Mb)}Ms(F2,"onAnimationEnd");Ms(T2,"onAnimationIteration");Ms(O2,"onAnimationStart");Ms("dblclick","onDoubleClick");Ms("focusin","onFocus");Ms("focusout","onBlur");Ms(M2,"onTransitionEnd");Io("onMouseEnter",["mouseout","mouseover"]);Io("onMouseLeave",["mouseout","mouseover"]);Io("onPointerEnter",["pointerout","pointerover"]);Io("onPointerLeave",["pointerout","pointerover"]);va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));va("onBeforeInput",["compositionend","keypress","textInput","paste"]);va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fl="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(" "),Db=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fl));function ag(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Ov(n,t,void 0,e),e.currentTarget=null}function R2(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var a=n.length-1;0<=a;a--){var l=n[a],u=l.instance,h=l.currentTarget;if(l=l.listener,u!==s&&i.isPropagationStopped())break e;ag(i,l,h),s=u}else for(a=0;a<n.length;a++){if(l=n[a],u=l.instance,h=l.currentTarget,l=l.listener,u!==s&&i.isPropagationStopped())break e;ag(i,l,h),s=u}}}if(nd)throw e=Gh,nd=!1,Gh=null,e}function Et(e,t){var r=t[nf];r===void 0&&(r=t[nf]=new Set);var n=e+"__bubble";r.has(n)||(B2(t,e,2,!1),r.add(n))}function ah(e,t,r){var n=0;t&&(n|=4),B2(r,e,n,t)}var ku="_reactListening"+Math.random().toString(36).slice(2);function rc(e){if(!e[ku]){e[ku]=!0,Vm.forEach(function(r){r!=="selectionchange"&&(Db.has(r)||ah(r,!1,e),ah(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ku]||(t[ku]=!0,ah("selectionchange",!1,t))}}function B2(e,t,r,n){switch(N2(t)){case 1:var i=Xv;break;case 4:i=Qv;break;default:i=up}r=i.bind(null,t,r,e),i=void 0,!Vh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function oh(e,t,r,n,i){var s=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;a=a.return}for(;l!==null;){if(a=ia(l),a===null)return;if(u=a.tag,u===5||u===6){n=s=a;continue e}l=l.parentNode}}n=n.return}l2(function(){var h=s,x=ap(r),m=[];e:{var y=D2.get(e);if(y!==void 0){var p=hp,N=e;switch(e){case"keypress":if(zu(r)===0)break e;case"keydown":case"keyup":p=fb;break;case"focusin":N="focus",p=eh;break;case"focusout":N="blur",p=eh;break;case"beforeblur":case"afterblur":p=eh;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Y1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=tb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=mb;break;case F2:case T2:case O2:p=ib;break;case M2:p=yb;break;case"scroll":p=Zv;break;case"wheel":p=bb;break;case"copy":case"cut":case"paste":p=ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=J1}var k=(t&4)!==0,M=!k&&e==="scroll",b=k?y!==null?y+"Capture":null:y;k=[];for(var w=h,L;w!==null;){L=w;var $=L.stateNode;if(L.tag===5&&$!==null&&(L=$,b!==null&&($=Jl(w,b),$!=null&&k.push(nc(w,$,L)))),M)break;w=w.return}0<k.length&&(y=new p(y,N,null,r,x),m.push({event:y,listeners:k}))}}if(!(t&7)){e:{if(y=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",y&&r!==Hh&&(N=r.relatedTarget||r.fromElement)&&(ia(N)||N[Hi]))break e;if((p||y)&&(y=x.window===x?x:(y=x.ownerDocument)?y.defaultView||y.parentWindow:window,p?(N=r.relatedTarget||r.toElement,p=h,N=N?ia(N):null,N!==null&&(M=ba(N),N!==M||N.tag!==5&&N.tag!==6)&&(N=null)):(p=null,N=h),p!==N)){if(k=Y1,$="onMouseLeave",b="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(k=J1,$="onPointerLeave",b="onPointerEnter",w="pointer"),M=p==null?y:uo(p),L=N==null?y:uo(N),y=new k($,w+"leave",p,r,x),y.target=M,y.relatedTarget=L,$=null,ia(x)===h&&(k=new k(b,w+"enter",N,r,x),k.target=L,k.relatedTarget=M,$=k),M=$,p&&N)t:{for(k=p,b=N,w=0,L=k;L;L=Qa(L))w++;for(L=0,$=b;$;$=Qa($))L++;for(;0<w-L;)k=Qa(k),w--;for(;0<L-w;)b=Qa(b),L--;for(;w--;){if(k===b||b!==null&&k===b.alternate)break t;k=Qa(k),b=Qa(b)}k=null}else k=null;p!==null&&og(m,y,p,k,!1),N!==null&&M!==null&&og(m,M,N,k,!0)}}e:{if(y=h?uo(h):window,p=y.nodeName&&y.nodeName.toLowerCase(),p==="select"||p==="input"&&y.type==="file")var J=Lb;else if(Z1(y))if(C2)J=Eb;else{J=_b;var le=Cb}else(p=y.nodeName)&&p.toLowerCase()==="input"&&(y.type==="checkbox"||y.type==="radio")&&(J=Pb);if(J&&(J=J(e,h))){L2(m,J,r,x);break e}le&&le(e,y,h),e==="focusout"&&(le=y._wrapperState)&&le.controlled&&y.type==="number"&&Bh(y,"number",y.value)}switch(le=h?uo(h):window,e){case"focusin":(Z1(le)||le.contentEditable==="true")&&(lo=le,Xh=h,Bl=null);break;case"focusout":Bl=Xh=lo=null;break;case"mousedown":Qh=!0;break;case"contextmenu":case"mouseup":case"dragend":Qh=!1,ig(m,r,x);break;case"selectionchange":if(Tb)break;case"keydown":case"keyup":ig(m,r,x)}var D;if(pp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else oo?S2(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(j2&&r.locale!=="ko"&&(oo||R!=="onCompositionStart"?R==="onCompositionEnd"&&oo&&(D=k2()):(ys=x,dp="value"in ys?ys.value:ys.textContent,oo=!0)),le=ld(h,R),0<le.length&&(R=new K1(R,e,null,r,x),m.push({event:R,listeners:le}),D?R.data=D:(D=A2(r),D!==null&&(R.data=D)))),(D=Nb?kb(e,r):jb(e,r))&&(h=ld(h,"onBeforeInput"),0<h.length&&(x=new K1("onBeforeInput","beforeinput",null,r,x),m.push({event:x,listeners:h}),x.data=D))}R2(m,t)})}function nc(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ld(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Jl(e,r),s!=null&&n.unshift(nc(e,s,i)),s=Jl(e,t),s!=null&&n.push(nc(e,s,i))),e=e.return}return n}function Qa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function og(e,t,r,n,i){for(var s=t._reactName,a=[];r!==null&&r!==n;){var l=r,u=l.alternate,h=l.stateNode;if(u!==null&&u===n)break;l.tag===5&&h!==null&&(l=h,i?(u=Jl(r,s),u!=null&&a.unshift(nc(r,u,l))):i||(u=Jl(r,s),u!=null&&a.push(nc(r,u,l)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Rb=/\r\n?/g,Bb=/\u0000|\uFFFD/g;function lg(e){return(typeof e=="string"?e:""+e).replace(Rb,`
`).replace(Bb,"")}function ju(e,t,r){if(t=lg(t),lg(e)!==t&&r)throw Error(Te(425))}function cd(){}var Zh=null,ef=null;function tf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rf=typeof setTimeout=="function"?setTimeout:void 0,qb=typeof clearTimeout=="function"?clearTimeout:void 0,cg=typeof Promise=="function"?Promise:void 0,zb=typeof queueMicrotask=="function"?queueMicrotask:typeof cg<"u"?function(e){return cg.resolve(null).then(e).catch(Ub)}:rf;function Ub(e){setTimeout(function(){throw e})}function lh(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Zl(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Zl(t)}function Ss(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ug(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Uo=Math.random().toString(36).slice(2),yi="__reactFiber$"+Uo,ic="__reactProps$"+Uo,Hi="__reactContainer$"+Uo,nf="__reactEvents$"+Uo,$b="__reactListeners$"+Uo,Hb="__reactHandles$"+Uo;function ia(e){var t=e[yi];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Hi]||r[yi]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ug(e);e!==null;){if(r=e[yi])return r;e=ug(e)}return t}e=r,r=e.parentNode}return null}function Nc(e){return e=e[yi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function uo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Te(33))}function Ud(e){return e[ic]||null}var sf=[],ho=-1;function Ds(e){return{current:e}}function Ft(e){0>ho||(e.current=sf[ho],sf[ho]=null,ho--)}function Pt(e,t){ho++,sf[ho]=e.current,e.current=t}var Is={},Mr=Ds(Is),rn=Ds(!1),da=Is;function Fo(e,t){var r=e.type.contextTypes;if(!r)return Is;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function nn(e){return e=e.childContextTypes,e!=null}function ud(){Ft(rn),Ft(Mr)}function dg(e,t,r){if(Mr.current!==Is)throw Error(Te(168));Pt(Mr,t),Pt(rn,r)}function q2(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Te(108,Cv(e)||"Unknown",i));return qt({},r,n)}function dd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Is,da=Mr.current,Pt(Mr,e),Pt(rn,rn.current),!0}function hg(e,t,r){var n=e.stateNode;if(!n)throw Error(Te(169));r?(e=q2(e,t,da),n.__reactInternalMemoizedMergedChildContext=e,Ft(rn),Ft(Mr),Pt(Mr,e)):Ft(rn),Pt(rn,r)}var Bi=null,$d=!1,ch=!1;function z2(e){Bi===null?Bi=[e]:Bi.push(e)}function Wb(e){$d=!0,z2(e)}function Rs(){if(!ch&&Bi!==null){ch=!0;var e=0,t=kt;try{var r=Bi;for(kt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Bi=null,$d=!1}catch(i){throw Bi!==null&&(Bi=Bi.slice(e+1)),h2(op,Rs),i}finally{kt=t,ch=!1}}return null}var fo=[],po=0,hd=null,fd=0,_n=[],Pn=0,ha=null,qi=1,zi="";function Zs(e,t){fo[po++]=fd,fo[po++]=hd,hd=e,fd=t}function U2(e,t,r){_n[Pn++]=qi,_n[Pn++]=zi,_n[Pn++]=ha,ha=e;var n=qi;e=zi;var i=32-Qn(n)-1;n&=~(1<<i),r+=1;var s=32-Qn(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,qi=1<<32-Qn(t)+i|r<<i|n,zi=s+e}else qi=1<<s|r<<i|n,zi=e}function mp(e){e.return!==null&&(Zs(e,1),U2(e,1,0))}function xp(e){for(;e===hd;)hd=fo[--po],fo[po]=null,fd=fo[--po],fo[po]=null;for(;e===ha;)ha=_n[--Pn],_n[Pn]=null,zi=_n[--Pn],_n[Pn]=null,qi=_n[--Pn],_n[Pn]=null}var xn=null,pn=null,Mt=!1,Xn=null;function $2(e,t){var r=En(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function fg(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xn=e,pn=Ss(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xn=e,pn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ha!==null?{id:qi,overflow:zi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=En(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,xn=e,pn=null,!0):!1;default:return!1}}function af(e){return(e.mode&1)!==0&&(e.flags&128)===0}function of(e){if(Mt){var t=pn;if(t){var r=t;if(!fg(e,t)){if(af(e))throw Error(Te(418));t=Ss(r.nextSibling);var n=xn;t&&fg(e,t)?$2(n,r):(e.flags=e.flags&-4097|2,Mt=!1,xn=e)}}else{if(af(e))throw Error(Te(418));e.flags=e.flags&-4097|2,Mt=!1,xn=e}}}function pg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xn=e}function Su(e){if(e!==xn)return!1;if(!Mt)return pg(e),Mt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tf(e.type,e.memoizedProps)),t&&(t=pn)){if(af(e))throw H2(),Error(Te(418));for(;t;)$2(e,t),t=Ss(t.nextSibling)}if(pg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Te(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){pn=Ss(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}pn=null}}else pn=xn?Ss(e.stateNode.nextSibling):null;return!0}function H2(){for(var e=pn;e;)e=Ss(e.nextSibling)}function To(){pn=xn=null,Mt=!1}function yp(e){Xn===null?Xn=[e]:Xn.push(e)}var Vb=Ji.ReactCurrentBatchConfig;function Sl(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Te(309));var n=r.stateNode}if(!n)throw Error(Te(147,e));var i=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var l=i.refs;a===null?delete l[s]:l[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(Te(284));if(!r._owner)throw Error(Te(290,e))}return e}function Au(e,t){throw e=Object.prototype.toString.call(t),Error(Te(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gg(e){var t=e._init;return t(e._payload)}function W2(e){function t(b,w){if(e){var L=b.deletions;L===null?(b.deletions=[w],b.flags|=16):L.push(w)}}function r(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function n(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function i(b,w){return b=_s(b,w),b.index=0,b.sibling=null,b}function s(b,w,L){return b.index=L,e?(L=b.alternate,L!==null?(L=L.index,L<w?(b.flags|=2,w):L):(b.flags|=2,w)):(b.flags|=1048576,w)}function a(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,w,L,$){return w===null||w.tag!==6?(w=mh(L,b.mode,$),w.return=b,w):(w=i(w,L),w.return=b,w)}function u(b,w,L,$){var J=L.type;return J===ao?x(b,w,L.props.children,$,L.key):w!==null&&(w.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===ps&&gg(J)===w.type)?($=i(w,L.props),$.ref=Sl(b,w,L),$.return=b,$):($=Yu(L.type,L.key,L.props,null,b.mode,$),$.ref=Sl(b,w,L),$.return=b,$)}function h(b,w,L,$){return w===null||w.tag!==4||w.stateNode.containerInfo!==L.containerInfo||w.stateNode.implementation!==L.implementation?(w=xh(L,b.mode,$),w.return=b,w):(w=i(w,L.children||[]),w.return=b,w)}function x(b,w,L,$,J){return w===null||w.tag!==7?(w=la(L,b.mode,$,J),w.return=b,w):(w=i(w,L),w.return=b,w)}function m(b,w,L){if(typeof w=="string"&&w!==""||typeof w=="number")return w=mh(""+w,b.mode,L),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case gu:return L=Yu(w.type,w.key,w.props,null,b.mode,L),L.ref=Sl(b,null,w),L.return=b,L;case so:return w=xh(w,b.mode,L),w.return=b,w;case ps:var $=w._init;return m(b,$(w._payload),L)}if(El(w)||bl(w))return w=la(w,b.mode,L,null),w.return=b,w;Au(b,w)}return null}function y(b,w,L,$){var J=w!==null?w.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return J!==null?null:l(b,w,""+L,$);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case gu:return L.key===J?u(b,w,L,$):null;case so:return L.key===J?h(b,w,L,$):null;case ps:return J=L._init,y(b,w,J(L._payload),$)}if(El(L)||bl(L))return J!==null?null:x(b,w,L,$,null);Au(b,L)}return null}function p(b,w,L,$,J){if(typeof $=="string"&&$!==""||typeof $=="number")return b=b.get(L)||null,l(w,b,""+$,J);if(typeof $=="object"&&$!==null){switch($.$$typeof){case gu:return b=b.get($.key===null?L:$.key)||null,u(w,b,$,J);case so:return b=b.get($.key===null?L:$.key)||null,h(w,b,$,J);case ps:var le=$._init;return p(b,w,L,le($._payload),J)}if(El($)||bl($))return b=b.get(L)||null,x(w,b,$,J,null);Au(w,$)}return null}function N(b,w,L,$){for(var J=null,le=null,D=w,R=w=0,Z=null;D!==null&&R<L.length;R++){D.index>R?(Z=D,D=null):Z=D.sibling;var G=y(b,D,L[R],$);if(G===null){D===null&&(D=Z);break}e&&D&&G.alternate===null&&t(b,D),w=s(G,w,R),le===null?J=G:le.sibling=G,le=G,D=Z}if(R===L.length)return r(b,D),Mt&&Zs(b,R),J;if(D===null){for(;R<L.length;R++)D=m(b,L[R],$),D!==null&&(w=s(D,w,R),le===null?J=D:le.sibling=D,le=D);return Mt&&Zs(b,R),J}for(D=n(b,D);R<L.length;R++)Z=p(D,b,R,L[R],$),Z!==null&&(e&&Z.alternate!==null&&D.delete(Z.key===null?R:Z.key),w=s(Z,w,R),le===null?J=Z:le.sibling=Z,le=Z);return e&&D.forEach(function(P){return t(b,P)}),Mt&&Zs(b,R),J}function k(b,w,L,$){var J=bl(L);if(typeof J!="function")throw Error(Te(150));if(L=J.call(L),L==null)throw Error(Te(151));for(var le=J=null,D=w,R=w=0,Z=null,G=L.next();D!==null&&!G.done;R++,G=L.next()){D.index>R?(Z=D,D=null):Z=D.sibling;var P=y(b,D,G.value,$);if(P===null){D===null&&(D=Z);break}e&&D&&P.alternate===null&&t(b,D),w=s(P,w,R),le===null?J=P:le.sibling=P,le=P,D=Z}if(G.done)return r(b,D),Mt&&Zs(b,R),J;if(D===null){for(;!G.done;R++,G=L.next())G=m(b,G.value,$),G!==null&&(w=s(G,w,R),le===null?J=G:le.sibling=G,le=G);return Mt&&Zs(b,R),J}for(D=n(b,D);!G.done;R++,G=L.next())G=p(D,b,R,G.value,$),G!==null&&(e&&G.alternate!==null&&D.delete(G.key===null?R:G.key),w=s(G,w,R),le===null?J=G:le.sibling=G,le=G);return e&&D.forEach(function(I){return t(b,I)}),Mt&&Zs(b,R),J}function M(b,w,L,$){if(typeof L=="object"&&L!==null&&L.type===ao&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case gu:e:{for(var J=L.key,le=w;le!==null;){if(le.key===J){if(J=L.type,J===ao){if(le.tag===7){r(b,le.sibling),w=i(le,L.props.children),w.return=b,b=w;break e}}else if(le.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===ps&&gg(J)===le.type){r(b,le.sibling),w=i(le,L.props),w.ref=Sl(b,le,L),w.return=b,b=w;break e}r(b,le);break}else t(b,le);le=le.sibling}L.type===ao?(w=la(L.props.children,b.mode,$,L.key),w.return=b,b=w):($=Yu(L.type,L.key,L.props,null,b.mode,$),$.ref=Sl(b,w,L),$.return=b,b=$)}return a(b);case so:e:{for(le=L.key;w!==null;){if(w.key===le)if(w.tag===4&&w.stateNode.containerInfo===L.containerInfo&&w.stateNode.implementation===L.implementation){r(b,w.sibling),w=i(w,L.children||[]),w.return=b,b=w;break e}else{r(b,w);break}else t(b,w);w=w.sibling}w=xh(L,b.mode,$),w.return=b,b=w}return a(b);case ps:return le=L._init,M(b,w,le(L._payload),$)}if(El(L))return N(b,w,L,$);if(bl(L))return k(b,w,L,$);Au(b,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,w!==null&&w.tag===6?(r(b,w.sibling),w=i(w,L),w.return=b,b=w):(r(b,w),w=mh(L,b.mode,$),w.return=b,b=w),a(b)):r(b,w)}return M}var Oo=W2(!0),V2=W2(!1),pd=Ds(null),gd=null,go=null,vp=null;function bp(){vp=go=gd=null}function wp(e){var t=pd.current;Ft(pd),e._currentValue=t}function lf(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function So(e,t){gd=e,vp=go=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(en=!0),e.firstContext=null)}function Fn(e){var t=e._currentValue;if(vp!==e)if(e={context:e,memoizedValue:t,next:null},go===null){if(gd===null)throw Error(Te(308));go=e,gd.dependencies={lanes:0,firstContext:e}}else go=go.next=e;return t}var sa=null;function Np(e){sa===null?sa=[e]:sa.push(e)}function G2(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Np(t)):(r.next=i.next,i.next=r),t.interleaved=r,Wi(e,n)}function Wi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var gs=!1;function kp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Y2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function As(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,mt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Wi(e,r)}return i=n.interleaved,i===null?(t.next=t,Np(n)):(t.next=i.next,i.next=t),n.interleaved=t,Wi(e,r)}function Uu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,lp(e,r)}}function mg(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function md(e,t,r,n){var i=e.updateQueue;gs=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,h=u.next;u.next=null,a===null?s=h:a.next=h,a=u;var x=e.alternate;x!==null&&(x=x.updateQueue,l=x.lastBaseUpdate,l!==a&&(l===null?x.firstBaseUpdate=h:l.next=h,x.lastBaseUpdate=u))}if(s!==null){var m=i.baseState;a=0,x=h=u=null,l=s;do{var y=l.lane,p=l.eventTime;if((n&y)===y){x!==null&&(x=x.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var N=e,k=l;switch(y=t,p=r,k.tag){case 1:if(N=k.payload,typeof N=="function"){m=N.call(p,m,y);break e}m=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=k.payload,y=typeof N=="function"?N.call(p,m,y):N,y==null)break e;m=qt({},m,y);break e;case 2:gs=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,y=i.effects,y===null?i.effects=[l]:y.push(l))}else p={eventTime:p,lane:y,tag:l.tag,payload:l.payload,callback:l.callback,next:null},x===null?(h=x=p,u=m):x=x.next=p,a|=y;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;y=l,l=y.next,y.next=null,i.lastBaseUpdate=y,i.shared.pending=null}}while(!0);if(x===null&&(u=m),i.baseState=u,i.firstBaseUpdate=h,i.lastBaseUpdate=x,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);pa|=a,e.lanes=a,e.memoizedState=m}}function xg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Te(191,i));i.call(n)}}}var kc={},Ni=Ds(kc),sc=Ds(kc),ac=Ds(kc);function aa(e){if(e===kc)throw Error(Te(174));return e}function jp(e,t){switch(Pt(ac,t),Pt(sc,e),Pt(Ni,kc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zh(t,e)}Ft(Ni),Pt(Ni,t)}function Mo(){Ft(Ni),Ft(sc),Ft(ac)}function K2(e){aa(ac.current);var t=aa(Ni.current),r=zh(t,e.type);t!==r&&(Pt(sc,e),Pt(Ni,r))}function Sp(e){sc.current===e&&(Ft(Ni),Ft(sc))}var Rt=Ds(0);function xd(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uh=[];function Ap(){for(var e=0;e<uh.length;e++)uh[e]._workInProgressVersionPrimary=null;uh.length=0}var $u=Ji.ReactCurrentDispatcher,dh=Ji.ReactCurrentBatchConfig,fa=0,Bt=null,cr=null,gr=null,yd=!1,ql=!1,oc=0,Gb=0;function Cr(){throw Error(Te(321))}function Lp(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ti(e[r],t[r]))return!1;return!0}function Cp(e,t,r,n,i,s){if(fa=s,Bt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$u.current=e===null||e.memoizedState===null?Xb:Qb,e=r(n,i),ql){s=0;do{if(ql=!1,oc=0,25<=s)throw Error(Te(301));s+=1,gr=cr=null,t.updateQueue=null,$u.current=Zb,e=r(n,i)}while(ql)}if($u.current=vd,t=cr!==null&&cr.next!==null,fa=0,gr=cr=Bt=null,yd=!1,t)throw Error(Te(300));return e}function _p(){var e=oc!==0;return oc=0,e}function xi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?Bt.memoizedState=gr=e:gr=gr.next=e,gr}function Tn(){if(cr===null){var e=Bt.alternate;e=e!==null?e.memoizedState:null}else e=cr.next;var t=gr===null?Bt.memoizedState:gr.next;if(t!==null)gr=t,cr=e;else{if(e===null)throw Error(Te(310));cr=e,e={memoizedState:cr.memoizedState,baseState:cr.baseState,baseQueue:cr.baseQueue,queue:cr.queue,next:null},gr===null?Bt.memoizedState=gr=e:gr=gr.next=e}return gr}function lc(e,t){return typeof t=="function"?t(e):t}function hh(e){var t=Tn(),r=t.queue;if(r===null)throw Error(Te(311));r.lastRenderedReducer=e;var n=cr,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var l=a=null,u=null,h=s;do{var x=h.lane;if((fa&x)===x)u!==null&&(u=u.next={lane:0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),n=h.hasEagerState?h.eagerState:e(n,h.action);else{var m={lane:x,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};u===null?(l=u=m,a=n):u=u.next=m,Bt.lanes|=x,pa|=x}h=h.next}while(h!==null&&h!==s);u===null?a=n:u.next=l,ti(n,t.memoizedState)||(en=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Bt.lanes|=s,pa|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function fh(e){var t=Tn(),r=t.queue;if(r===null)throw Error(Te(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);ti(s,t.memoizedState)||(en=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function J2(){}function X2(e,t){var r=Bt,n=Tn(),i=t(),s=!ti(n.memoizedState,i);if(s&&(n.memoizedState=i,en=!0),n=n.queue,Pp(e5.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||gr!==null&&gr.memoizedState.tag&1){if(r.flags|=2048,cc(9,Z2.bind(null,r,n,i,t),void 0,null),yr===null)throw Error(Te(349));fa&30||Q2(r,t,i)}return i}function Q2(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Bt.updateQueue,t===null?(t={lastEffect:null,stores:null},Bt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Z2(e,t,r,n){t.value=r,t.getSnapshot=n,t5(t)&&r5(e)}function e5(e,t,r){return r(function(){t5(t)&&r5(e)})}function t5(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ti(e,r)}catch{return!0}}function r5(e){var t=Wi(e,1);t!==null&&Zn(t,e,1,-1)}function yg(e){var t=xi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lc,lastRenderedState:e},t.queue=e,e=e.dispatch=Jb.bind(null,Bt,e),[t.memoizedState,e]}function cc(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Bt.updateQueue,t===null?(t={lastEffect:null,stores:null},Bt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function n5(){return Tn().memoizedState}function Hu(e,t,r,n){var i=xi();Bt.flags|=e,i.memoizedState=cc(1|t,r,void 0,n===void 0?null:n)}function Hd(e,t,r,n){var i=Tn();n=n===void 0?null:n;var s=void 0;if(cr!==null){var a=cr.memoizedState;if(s=a.destroy,n!==null&&Lp(n,a.deps)){i.memoizedState=cc(t,r,s,n);return}}Bt.flags|=e,i.memoizedState=cc(1|t,r,s,n)}function vg(e,t){return Hu(8390656,8,e,t)}function Pp(e,t){return Hd(2048,8,e,t)}function i5(e,t){return Hd(4,2,e,t)}function s5(e,t){return Hd(4,4,e,t)}function a5(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function o5(e,t,r){return r=r!=null?r.concat([e]):null,Hd(4,4,a5.bind(null,t,e),r)}function Ep(){}function l5(e,t){var r=Tn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Lp(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function c5(e,t){var r=Tn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Lp(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function u5(e,t,r){return fa&21?(ti(r,t)||(r=g2(),Bt.lanes|=r,pa|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,en=!0),e.memoizedState=r)}function Yb(e,t){var r=kt;kt=r!==0&&4>r?r:4,e(!0);var n=dh.transition;dh.transition={};try{e(!1),t()}finally{kt=r,dh.transition=n}}function d5(){return Tn().memoizedState}function Kb(e,t,r){var n=Cs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},h5(e))f5(t,r);else if(r=G2(e,t,r,n),r!==null){var i=$r();Zn(r,e,n,i),p5(r,t,n)}}function Jb(e,t,r){var n=Cs(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(h5(e))f5(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,r);if(i.hasEagerState=!0,i.eagerState=l,ti(l,a)){var u=t.interleaved;u===null?(i.next=i,Np(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=G2(e,t,i,n),r!==null&&(i=$r(),Zn(r,e,n,i),p5(r,t,n))}}function h5(e){var t=e.alternate;return e===Bt||t!==null&&t===Bt}function f5(e,t){ql=yd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function p5(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,lp(e,r)}}var vd={readContext:Fn,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},Xb={readContext:Fn,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Fn,useEffect:vg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Hu(4194308,4,a5.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Hu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hu(4,2,e,t)},useMemo:function(e,t){var r=xi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=xi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Kb.bind(null,Bt,e),[n.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:yg,useDebugValue:Ep,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=yg(!1),t=e[0];return e=Yb.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Bt,i=xi();if(Mt){if(r===void 0)throw Error(Te(407));r=r()}else{if(r=t(),yr===null)throw Error(Te(349));fa&30||Q2(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,vg(e5.bind(null,n,s,e),[e]),n.flags|=2048,cc(9,Z2.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=xi(),t=yr.identifierPrefix;if(Mt){var r=zi,n=qi;r=(n&~(1<<32-Qn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=oc++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Gb++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Qb={readContext:Fn,useCallback:l5,useContext:Fn,useEffect:Pp,useImperativeHandle:o5,useInsertionEffect:i5,useLayoutEffect:s5,useMemo:c5,useReducer:hh,useRef:n5,useState:function(){return hh(lc)},useDebugValue:Ep,useDeferredValue:function(e){var t=Tn();return u5(t,cr.memoizedState,e)},useTransition:function(){var e=hh(lc)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:J2,useSyncExternalStore:X2,useId:d5,unstable_isNewReconciler:!1},Zb={readContext:Fn,useCallback:l5,useContext:Fn,useEffect:Pp,useImperativeHandle:o5,useInsertionEffect:i5,useLayoutEffect:s5,useMemo:c5,useReducer:fh,useRef:n5,useState:function(){return fh(lc)},useDebugValue:Ep,useDeferredValue:function(e){var t=Tn();return cr===null?t.memoizedState=e:u5(t,cr.memoizedState,e)},useTransition:function(){var e=fh(lc)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:J2,useSyncExternalStore:X2,useId:d5,unstable_isNewReconciler:!1};function Yn(e,t){if(e&&e.defaultProps){t=qt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function cf(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:qt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wd={isMounted:function(e){return(e=e._reactInternals)?ba(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=$r(),i=Cs(e),s=Ui(n,i);s.payload=t,r!=null&&(s.callback=r),t=As(e,s,i),t!==null&&(Zn(t,e,i,n),Uu(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=$r(),i=Cs(e),s=Ui(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=As(e,s,i),t!==null&&(Zn(t,e,i,n),Uu(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=$r(),n=Cs(e),i=Ui(r,n);i.tag=2,t!=null&&(i.callback=t),t=As(e,i,n),t!==null&&(Zn(t,e,n,r),Uu(t,e,n))}};function bg(e,t,r,n,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,a):t.prototype&&t.prototype.isPureReactComponent?!tc(r,n)||!tc(i,s):!0}function g5(e,t,r){var n=!1,i=Is,s=t.contextType;return typeof s=="object"&&s!==null?s=Fn(s):(i=nn(t)?da:Mr.current,n=t.contextTypes,s=(n=n!=null)?Fo(e,i):Is),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function wg(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Wd.enqueueReplaceState(t,t.state,null)}function uf(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},kp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Fn(s):(s=nn(t)?da:Mr.current,i.context=Fo(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(cf(e,t,s,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Wd.enqueueReplaceState(i,i.state,null),md(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Do(e,t){try{var r="",n=t;do r+=Lv(n),n=n.return;while(n);var i=r}catch(s){i=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function ph(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function df(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var ew=typeof WeakMap=="function"?WeakMap:Map;function m5(e,t,r){r=Ui(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){wd||(wd=!0,wf=n),df(e,t)},r}function x5(e,t,r){r=Ui(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){df(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){df(e,t),typeof n!="function"&&(Ls===null?Ls=new Set([this]):Ls.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Ng(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new ew;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=pw.bind(null,e,t,r),t.then(e,e))}function kg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jg(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ui(-1,1),t.tag=2,As(r,t,1))),r.lanes|=1),e)}var tw=Ji.ReactCurrentOwner,en=!1;function zr(e,t,r,n){t.child=e===null?V2(t,null,r,n):Oo(t,e.child,r,n)}function Sg(e,t,r,n,i){r=r.render;var s=t.ref;return So(t,i),n=Cp(e,t,r,n,s,i),r=_p(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vi(e,t,i)):(Mt&&r&&mp(t),t.flags|=1,zr(e,t,n,i),t.child)}function Ag(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!Bp(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,y5(e,t,s,n,i)):(e=Yu(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:tc,r(a,n)&&e.ref===t.ref)return Vi(e,t,i)}return t.flags|=1,e=_s(s,n),e.ref=t.ref,e.return=t,t.child=e}function y5(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(tc(s,n)&&e.ref===t.ref)if(en=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(en=!0);else return t.lanes=e.lanes,Vi(e,t,i)}return hf(e,t,r,n,i)}function v5(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pt(xo,hn),hn|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pt(xo,hn),hn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Pt(xo,hn),hn|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,Pt(xo,hn),hn|=n;return zr(e,t,i,r),t.child}function b5(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function hf(e,t,r,n,i){var s=nn(r)?da:Mr.current;return s=Fo(t,s),So(t,i),r=Cp(e,t,r,n,s,i),n=_p(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vi(e,t,i)):(Mt&&n&&mp(t),t.flags|=1,zr(e,t,r,i),t.child)}function Lg(e,t,r,n,i){if(nn(r)){var s=!0;dd(t)}else s=!1;if(So(t,i),t.stateNode===null)Wu(e,t),g5(t,r,n),uf(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,h=r.contextType;typeof h=="object"&&h!==null?h=Fn(h):(h=nn(r)?da:Mr.current,h=Fo(t,h));var x=r.getDerivedStateFromProps,m=typeof x=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==n||u!==h)&&wg(t,a,n,h),gs=!1;var y=t.memoizedState;a.state=y,md(t,n,a,i),u=t.memoizedState,l!==n||y!==u||rn.current||gs?(typeof x=="function"&&(cf(t,r,x,n),u=t.memoizedState),(l=gs||bg(t,r,l,n,y,u,h))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=h,n=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Y2(e,t),l=t.memoizedProps,h=t.type===t.elementType?l:Yn(t.type,l),a.props=h,m=t.pendingProps,y=a.context,u=r.contextType,typeof u=="object"&&u!==null?u=Fn(u):(u=nn(r)?da:Mr.current,u=Fo(t,u));var p=r.getDerivedStateFromProps;(x=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==m||y!==u)&&wg(t,a,n,u),gs=!1,y=t.memoizedState,a.state=y,md(t,n,a,i);var N=t.memoizedState;l!==m||y!==N||rn.current||gs?(typeof p=="function"&&(cf(t,r,p,n),N=t.memoizedState),(h=gs||bg(t,r,h,n,y,N,u)||!1)?(x||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,N,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,N,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=N),a.props=n,a.state=N,a.context=u,n=h):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),n=!1)}return ff(e,t,r,n,s,i)}function ff(e,t,r,n,i,s){b5(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&hg(t,r,!1),Vi(e,t,s);n=t.stateNode,tw.current=t;var l=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Oo(t,e.child,null,s),t.child=Oo(t,null,l,s)):zr(e,t,l,s),t.memoizedState=n.state,i&&hg(t,r,!0),t.child}function w5(e){var t=e.stateNode;t.pendingContext?dg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dg(e,t.context,!1),jp(e,t.containerInfo)}function Cg(e,t,r,n,i){return To(),yp(i),t.flags|=256,zr(e,t,r,n),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0};function gf(e){return{baseLanes:e,cachePool:null,transitions:null}}function N5(e,t,r){var n=t.pendingProps,i=Rt.current,s=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Pt(Rt,i&1),e===null)return of(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Yd(a,n,0,null),e=la(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=gf(r),t.memoizedState=pf,e):Ip(t,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return rw(e,t,a,n,l,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=_s(i,u),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=_s(l,s):(s=la(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?gf(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=pf,n}return s=e.child,e=s.sibling,n=_s(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Ip(e,t){return t=Yd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&yp(n),Oo(t,e.child,null,r),e=Ip(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rw(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=ph(Error(Te(422))),Lu(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=Yd({mode:"visible",children:n.children},i,0,null),s=la(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&Oo(t,e.child,null,a),t.child.memoizedState=gf(a),t.memoizedState=pf,s);if(!(t.mode&1))return Lu(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,s=Error(Te(419)),n=ph(s,n,void 0),Lu(e,t,a,n)}if(l=(a&e.childLanes)!==0,en||l){if(n=yr,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Wi(e,i),Zn(n,e,i,-1))}return Rp(),n=ph(Error(Te(421))),Lu(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=gw.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,pn=Ss(i.nextSibling),xn=t,Mt=!0,Xn=null,e!==null&&(_n[Pn++]=qi,_n[Pn++]=zi,_n[Pn++]=ha,qi=e.id,zi=e.overflow,ha=t),t=Ip(t,n.children),t.flags|=4096,t)}function _g(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),lf(e.return,t,r)}function gh(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function k5(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(zr(e,t,n.children,r),n=Rt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_g(e,r,t);else if(e.tag===19)_g(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Pt(Rt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&xd(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),gh(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&xd(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}gh(t,!0,r,null,s);break;case"together":gh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),pa|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Te(153));if(t.child!==null){for(e=t.child,r=_s(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=_s(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function nw(e,t,r){switch(t.tag){case 3:w5(t),To();break;case 5:K2(t);break;case 1:nn(t.type)&&dd(t);break;case 4:jp(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Pt(pd,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Pt(Rt,Rt.current&1),t.flags|=128,null):r&t.child.childLanes?N5(e,t,r):(Pt(Rt,Rt.current&1),e=Vi(e,t,r),e!==null?e.sibling:null);Pt(Rt,Rt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return k5(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Pt(Rt,Rt.current),n)break;return null;case 22:case 23:return t.lanes=0,v5(e,t,r)}return Vi(e,t,r)}var j5,mf,S5,A5;j5=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};mf=function(){};S5=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,aa(Ni.current);var s=null;switch(r){case"input":i=Dh(e,i),n=Dh(e,n),s=[];break;case"select":i=qt({},i,{value:void 0}),n=qt({},n,{value:void 0}),s=[];break;case"textarea":i=qh(e,i),n=qh(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=cd)}Uh(r,n);var a;r=null;for(h in i)if(!n.hasOwnProperty(h)&&i.hasOwnProperty(h)&&i[h]!=null)if(h==="style"){var l=i[h];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else h!=="dangerouslySetInnerHTML"&&h!=="children"&&h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(Yl.hasOwnProperty(h)?s||(s=[]):(s=s||[]).push(h,null));for(h in n){var u=n[h];if(l=i!=null?i[h]:void 0,n.hasOwnProperty(h)&&u!==l&&(u!=null||l!=null))if(h==="style")if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(r||(r={}),r[a]=u[a])}else r||(s||(s=[]),s.push(h,r)),r=u;else h==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(s=s||[]).push(h,u)):h==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(h,""+u):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&(Yl.hasOwnProperty(h)?(u!=null&&h==="onScroll"&&Et("scroll",e),s||l===u||(s=[])):(s=s||[]).push(h,u))}r&&(s=s||[]).push("style",r);var h=s;(t.updateQueue=h)&&(t.flags|=4)}};A5=function(e,t,r,n){r!==n&&(t.flags|=4)};function Al(e,t){if(!Mt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function _r(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function iw(e,t,r){var n=t.pendingProps;switch(xp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _r(t),null;case 1:return nn(t.type)&&ud(),_r(t),null;case 3:return n=t.stateNode,Mo(),Ft(rn),Ft(Mr),Ap(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Su(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xn!==null&&(jf(Xn),Xn=null))),mf(e,t),_r(t),null;case 5:Sp(t);var i=aa(ac.current);if(r=t.type,e!==null&&t.stateNode!=null)S5(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Te(166));return _r(t),null}if(e=aa(Ni.current),Su(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[yi]=t,n[ic]=s,e=(t.mode&1)!==0,r){case"dialog":Et("cancel",n),Et("close",n);break;case"iframe":case"object":case"embed":Et("load",n);break;case"video":case"audio":for(i=0;i<Fl.length;i++)Et(Fl[i],n);break;case"source":Et("error",n);break;case"img":case"image":case"link":Et("error",n),Et("load",n);break;case"details":Et("toggle",n);break;case"input":R1(n,s),Et("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Et("invalid",n);break;case"textarea":q1(n,s),Et("invalid",n)}Uh(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="children"?typeof l=="string"?n.textContent!==l&&(s.suppressHydrationWarning!==!0&&ju(n.textContent,l,e),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&ju(n.textContent,l,e),i=["children",""+l]):Yl.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Et("scroll",n)}switch(r){case"input":mu(n),B1(n,s,!0);break;case"textarea":mu(n),z1(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=cd)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=e2(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[yi]=t,e[ic]=n,j5(e,t,!1,!1),t.stateNode=e;e:{switch(a=$h(r,n),r){case"dialog":Et("cancel",e),Et("close",e),i=n;break;case"iframe":case"object":case"embed":Et("load",e),i=n;break;case"video":case"audio":for(i=0;i<Fl.length;i++)Et(Fl[i],e);i=n;break;case"source":Et("error",e),i=n;break;case"img":case"image":case"link":Et("error",e),Et("load",e),i=n;break;case"details":Et("toggle",e),i=n;break;case"input":R1(e,n),i=Dh(e,n),Et("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=qt({},n,{value:void 0}),Et("invalid",e);break;case"textarea":q1(e,n),i=qh(e,n),Et("invalid",e);break;default:i=n}Uh(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var u=l[s];s==="style"?n2(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&t2(e,u)):s==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&Kl(e,u):typeof u=="number"&&Kl(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Yl.hasOwnProperty(s)?u!=null&&s==="onScroll"&&Et("scroll",e):u!=null&&rp(e,s,u,a))}switch(r){case"input":mu(e),B1(e,n,!1);break;case"textarea":mu(e),z1(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Es(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?wo(e,!!n.multiple,s,!1):n.defaultValue!=null&&wo(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=cd)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return _r(t),null;case 6:if(e&&t.stateNode!=null)A5(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Te(166));if(r=aa(ac.current),aa(Ni.current),Su(t)){if(n=t.stateNode,r=t.memoizedProps,n[yi]=t,(s=n.nodeValue!==r)&&(e=xn,e!==null))switch(e.tag){case 3:ju(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ju(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[yi]=t,t.stateNode=n}return _r(t),null;case 13:if(Ft(Rt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Mt&&pn!==null&&t.mode&1&&!(t.flags&128))H2(),To(),t.flags|=98560,s=!1;else if(s=Su(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(Te(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Te(317));s[yi]=t}else To(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_r(t),s=!1}else Xn!==null&&(jf(Xn),Xn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Rt.current&1?dr===0&&(dr=3):Rp())),t.updateQueue!==null&&(t.flags|=4),_r(t),null);case 4:return Mo(),mf(e,t),e===null&&rc(t.stateNode.containerInfo),_r(t),null;case 10:return wp(t.type._context),_r(t),null;case 17:return nn(t.type)&&ud(),_r(t),null;case 19:if(Ft(Rt),s=t.memoizedState,s===null)return _r(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)Al(s,!1);else{if(dr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=xd(e),a!==null){for(t.flags|=128,Al(s,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Pt(Rt,Rt.current&1|2),t.child}e=e.sibling}s.tail!==null&&Xt()>Ro&&(t.flags|=128,n=!0,Al(s,!1),t.lanes=4194304)}else{if(!n)if(e=xd(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Al(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Mt)return _r(t),null}else 2*Xt()-s.renderingStartTime>Ro&&r!==1073741824&&(t.flags|=128,n=!0,Al(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xt(),t.sibling=null,r=Rt.current,Pt(Rt,n?r&1|2:r&1),t):(_r(t),null);case 22:case 23:return Dp(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?hn&1073741824&&(_r(t),t.subtreeFlags&6&&(t.flags|=8192)):_r(t),null;case 24:return null;case 25:return null}throw Error(Te(156,t.tag))}function sw(e,t){switch(xp(t),t.tag){case 1:return nn(t.type)&&ud(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mo(),Ft(rn),Ft(Mr),Ap(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Sp(t),null;case 13:if(Ft(Rt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Te(340));To()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ft(Rt),null;case 4:return Mo(),null;case 10:return wp(t.type._context),null;case 22:case 23:return Dp(),null;case 24:return null;default:return null}}var Cu=!1,Tr=!1,aw=typeof WeakSet=="function"?WeakSet:Set,$e=null;function mo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vt(e,t,n)}else r.current=null}function xf(e,t,r){try{r()}catch(n){Vt(e,t,n)}}var Pg=!1;function ow(e,t){if(Zh=ad,e=E2(),gp(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,l=-1,u=-1,h=0,x=0,m=e,y=null;t:for(;;){for(var p;m!==r||i!==0&&m.nodeType!==3||(l=a+i),m!==s||n!==0&&m.nodeType!==3||(u=a+n),m.nodeType===3&&(a+=m.nodeValue.length),(p=m.firstChild)!==null;)y=m,m=p;for(;;){if(m===e)break t;if(y===r&&++h===i&&(l=a),y===s&&++x===n&&(u=a),(p=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=p}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ef={focusedElem:e,selectionRange:r},ad=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var N=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var k=N.memoizedProps,M=N.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?k:Yn(t.type,k),M);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Te(163))}}catch($){Vt(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return N=Pg,Pg=!1,N}function zl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&xf(t,r,s)}i=i.next}while(i!==n)}}function Vd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function yf(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function L5(e){var t=e.alternate;t!==null&&(e.alternate=null,L5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yi],delete t[ic],delete t[nf],delete t[$b],delete t[Hb])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function C5(e){return e.tag===5||e.tag===3||e.tag===4}function Eg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C5(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.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 vf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cd));else if(n!==4&&(e=e.child,e!==null))for(vf(e,t,r),e=e.sibling;e!==null;)vf(e,t,r),e=e.sibling}function bf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(bf(e,t,r),e=e.sibling;e!==null;)bf(e,t,r),e=e.sibling}var Nr=null,Jn=!1;function ds(e,t,r){for(r=r.child;r!==null;)_5(e,t,r),r=r.sibling}function _5(e,t,r){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Rd,r)}catch{}switch(r.tag){case 5:Tr||mo(r,t);case 6:var n=Nr,i=Jn;Nr=null,ds(e,t,r),Nr=n,Jn=i,Nr!==null&&(Jn?(e=Nr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Nr.removeChild(r.stateNode));break;case 18:Nr!==null&&(Jn?(e=Nr,r=r.stateNode,e.nodeType===8?lh(e.parentNode,r):e.nodeType===1&&lh(e,r),Zl(e)):lh(Nr,r.stateNode));break;case 4:n=Nr,i=Jn,Nr=r.stateNode.containerInfo,Jn=!0,ds(e,t,r),Nr=n,Jn=i;break;case 0:case 11:case 14:case 15:if(!Tr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&xf(r,t,a),i=i.next}while(i!==n)}ds(e,t,r);break;case 1:if(!Tr&&(mo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Vt(r,t,l)}ds(e,t,r);break;case 21:ds(e,t,r);break;case 22:r.mode&1?(Tr=(n=Tr)||r.memoizedState!==null,ds(e,t,r),Tr=n):ds(e,t,r);break;default:ds(e,t,r)}}function Ig(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new aw),t.forEach(function(n){var i=mw.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Wn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:Nr=l.stateNode,Jn=!1;break e;case 3:Nr=l.stateNode.containerInfo,Jn=!0;break e;case 4:Nr=l.stateNode.containerInfo,Jn=!0;break e}l=l.return}if(Nr===null)throw Error(Te(160));_5(s,a,i),Nr=null,Jn=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(h){Vt(i,t,h)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)P5(t,e),t=t.sibling}function P5(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),gi(e),n&4){try{zl(3,e,e.return),Vd(3,e)}catch(k){Vt(e,e.return,k)}try{zl(5,e,e.return)}catch(k){Vt(e,e.return,k)}}break;case 1:Wn(t,e),gi(e),n&512&&r!==null&&mo(r,r.return);break;case 5:if(Wn(t,e),gi(e),n&512&&r!==null&&mo(r,r.return),e.flags&32){var i=e.stateNode;try{Kl(i,"")}catch(k){Vt(e,e.return,k)}}if(n&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Qm(i,s),$h(l,a);var h=$h(l,s);for(a=0;a<u.length;a+=2){var x=u[a],m=u[a+1];x==="style"?n2(i,m):x==="dangerouslySetInnerHTML"?t2(i,m):x==="children"?Kl(i,m):rp(i,x,m,h)}switch(l){case"input":Rh(i,s);break;case"textarea":Zm(i,s);break;case"select":var y=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?wo(i,!!s.multiple,p,!1):y!==!!s.multiple&&(s.defaultValue!=null?wo(i,!!s.multiple,s.defaultValue,!0):wo(i,!!s.multiple,s.multiple?[]:"",!1))}i[ic]=s}catch(k){Vt(e,e.return,k)}}break;case 6:if(Wn(t,e),gi(e),n&4){if(e.stateNode===null)throw Error(Te(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(k){Vt(e,e.return,k)}}break;case 3:if(Wn(t,e),gi(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Zl(t.containerInfo)}catch(k){Vt(e,e.return,k)}break;case 4:Wn(t,e),gi(e);break;case 13:Wn(t,e),gi(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Op=Xt())),n&4&&Ig(e);break;case 22:if(x=r!==null&&r.memoizedState!==null,e.mode&1?(Tr=(h=Tr)||x,Wn(t,e),Tr=h):Wn(t,e),gi(e),n&8192){if(h=e.memoizedState!==null,(e.stateNode.isHidden=h)&&!x&&e.mode&1)for($e=e,x=e.child;x!==null;){for(m=$e=x;$e!==null;){switch(y=$e,p=y.child,y.tag){case 0:case 11:case 14:case 15:zl(4,y,y.return);break;case 1:mo(y,y.return);var N=y.stateNode;if(typeof N.componentWillUnmount=="function"){n=y,r=y.return;try{t=n,N.props=t.memoizedProps,N.state=t.memoizedState,N.componentWillUnmount()}catch(k){Vt(n,r,k)}}break;case 5:mo(y,y.return);break;case 22:if(y.memoizedState!==null){Tg(m);continue}}p!==null?(p.return=y,$e=p):Tg(m)}x=x.sibling}e:for(x=null,m=e;;){if(m.tag===5){if(x===null){x=m;try{i=m.stateNode,h?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=m.stateNode,u=m.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=r2("display",a))}catch(k){Vt(e,e.return,k)}}}else if(m.tag===6){if(x===null)try{m.stateNode.nodeValue=h?"":m.memoizedProps}catch(k){Vt(e,e.return,k)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;x===m&&(x=null),m=m.return}x===m&&(x=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Wn(t,e),gi(e),n&4&&Ig(e);break;case 21:break;default:Wn(t,e),gi(e)}}function gi(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(C5(r)){var n=r;break e}r=r.return}throw Error(Te(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Kl(i,""),n.flags&=-33);var s=Eg(e);bf(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,l=Eg(e);vf(e,l,a);break;default:throw Error(Te(161))}}catch(u){Vt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lw(e,t,r){$e=e,E5(e)}function E5(e,t,r){for(var n=(e.mode&1)!==0;$e!==null;){var i=$e,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Cu;if(!a){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Tr;l=Cu;var h=Tr;if(Cu=a,(Tr=u)&&!h)for($e=i;$e!==null;)a=$e,u=a.child,a.tag===22&&a.memoizedState!==null?Og(i):u!==null?(u.return=a,$e=u):Og(i);for(;s!==null;)$e=s,E5(s),s=s.sibling;$e=i,Cu=l,Tr=h}Fg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,$e=s):Fg(e)}}function Fg(e){for(;$e!==null;){var t=$e;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Tr||Vd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Tr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Yn(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&xg(t,s,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}xg(t,a,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var h=t.alternate;if(h!==null){var x=h.memoizedState;if(x!==null){var m=x.dehydrated;m!==null&&Zl(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Te(163))}Tr||t.flags&512&&yf(t)}catch(y){Vt(t,t.return,y)}}if(t===e){$e=null;break}if(r=t.sibling,r!==null){r.return=t.return,$e=r;break}$e=t.return}}function Tg(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$e=r;break}$e=t.return}}function Og(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Vd(4,t)}catch(u){Vt(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(u){Vt(t,i,u)}}var s=t.return;try{yf(t)}catch(u){Vt(t,s,u)}break;case 5:var a=t.return;try{yf(t)}catch(u){Vt(t,a,u)}}}catch(u){Vt(t,t.return,u)}if(t===e){$e=null;break}var l=t.sibling;if(l!==null){l.return=t.return,$e=l;break}$e=t.return}}var cw=Math.ceil,bd=Ji.ReactCurrentDispatcher,Fp=Ji.ReactCurrentOwner,In=Ji.ReactCurrentBatchConfig,mt=0,yr=null,sr=null,kr=0,hn=0,xo=Ds(0),dr=0,uc=null,pa=0,Gd=0,Tp=0,Ul=null,Zr=null,Op=0,Ro=1/0,Ri=null,wd=!1,wf=null,Ls=null,_u=!1,vs=null,Nd=0,$l=0,Nf=null,Vu=-1,Gu=0;function $r(){return mt&6?Xt():Vu!==-1?Vu:Vu=Xt()}function Cs(e){return e.mode&1?mt&2&&kr!==0?kr&-kr:Vb.transition!==null?(Gu===0&&(Gu=g2()),Gu):(e=kt,e!==0||(e=window.event,e=e===void 0?16:N2(e.type)),e):1}function Zn(e,t,r,n){if(50<$l)throw $l=0,Nf=null,Error(Te(185));bc(e,r,n),(!(mt&2)||e!==yr)&&(e===yr&&(!(mt&2)&&(Gd|=r),dr===4&&xs(e,kr)),sn(e,n),r===1&&mt===0&&!(t.mode&1)&&(Ro=Xt()+500,$d&&Rs()))}function sn(e,t){var r=e.callbackNode;Vv(e,t);var n=sd(e,e===yr?kr:0);if(n===0)r!==null&&H1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&H1(r),t===1)e.tag===0?Wb(Mg.bind(null,e)):z2(Mg.bind(null,e)),zb(function(){!(mt&6)&&Rs()}),r=null;else{switch(m2(n)){case 1:r=op;break;case 4:r=f2;break;case 16:r=id;break;case 536870912:r=p2;break;default:r=id}r=B5(r,I5.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function I5(e,t){if(Vu=-1,Gu=0,mt&6)throw Error(Te(327));var r=e.callbackNode;if(Ao()&&e.callbackNode!==r)return null;var n=sd(e,e===yr?kr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=kd(e,n);else{t=n;var i=mt;mt|=2;var s=T5();(yr!==e||kr!==t)&&(Ri=null,Ro=Xt()+500,oa(e,t));do try{hw();break}catch(l){F5(e,l)}while(!0);bp(),bd.current=s,mt=i,sr!==null?t=0:(yr=null,kr=0,t=dr)}if(t!==0){if(t===2&&(i=Yh(e),i!==0&&(n=i,t=kf(e,i))),t===1)throw r=uc,oa(e,0),xs(e,n),sn(e,Xt()),r;if(t===6)xs(e,n);else{if(i=e.current.alternate,!(n&30)&&!uw(i)&&(t=kd(e,n),t===2&&(s=Yh(e),s!==0&&(n=s,t=kf(e,s))),t===1))throw r=uc,oa(e,0),xs(e,n),sn(e,Xt()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(Te(345));case 2:ea(e,Zr,Ri);break;case 3:if(xs(e,n),(n&130023424)===n&&(t=Op+500-Xt(),10<t)){if(sd(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){$r(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=rf(ea.bind(null,e,Zr,Ri),t);break}ea(e,Zr,Ri);break;case 4:if(xs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-Qn(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=Xt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*cw(n/1960))-n,10<n){e.timeoutHandle=rf(ea.bind(null,e,Zr,Ri),n);break}ea(e,Zr,Ri);break;case 5:ea(e,Zr,Ri);break;default:throw Error(Te(329))}}}return sn(e,Xt()),e.callbackNode===r?I5.bind(null,e):null}function kf(e,t){var r=Ul;return e.current.memoizedState.isDehydrated&&(oa(e,t).flags|=256),e=kd(e,t),e!==2&&(t=Zr,Zr=r,t!==null&&jf(t)),e}function jf(e){Zr===null?Zr=e:Zr.push.apply(Zr,e)}function uw(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!ti(s(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xs(e,t){for(t&=~Tp,t&=~Gd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Qn(t),n=1<<r;e[r]=-1,t&=~n}}function Mg(e){if(mt&6)throw Error(Te(327));Ao();var t=sd(e,0);if(!(t&1))return sn(e,Xt()),null;var r=kd(e,t);if(e.tag!==0&&r===2){var n=Yh(e);n!==0&&(t=n,r=kf(e,n))}if(r===1)throw r=uc,oa(e,0),xs(e,t),sn(e,Xt()),r;if(r===6)throw Error(Te(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ea(e,Zr,Ri),sn(e,Xt()),null}function Mp(e,t){var r=mt;mt|=1;try{return e(t)}finally{mt=r,mt===0&&(Ro=Xt()+500,$d&&Rs())}}function ga(e){vs!==null&&vs.tag===0&&!(mt&6)&&Ao();var t=mt;mt|=1;var r=In.transition,n=kt;try{if(In.transition=null,kt=1,e)return e()}finally{kt=n,In.transition=r,mt=t,!(mt&6)&&Rs()}}function Dp(){hn=xo.current,Ft(xo)}function oa(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,qb(r)),sr!==null)for(r=sr.return;r!==null;){var n=r;switch(xp(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ud();break;case 3:Mo(),Ft(rn),Ft(Mr),Ap();break;case 5:Sp(n);break;case 4:Mo();break;case 13:Ft(Rt);break;case 19:Ft(Rt);break;case 10:wp(n.type._context);break;case 22:case 23:Dp()}r=r.return}if(yr=e,sr=e=_s(e.current,null),kr=hn=t,dr=0,uc=null,Tp=Gd=pa=0,Zr=Ul=null,sa!==null){for(t=0;t<sa.length;t++)if(r=sa[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}r.pending=n}sa=null}return e}function F5(e,t){do{var r=sr;try{if(bp(),$u.current=vd,yd){for(var n=Bt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}yd=!1}if(fa=0,gr=cr=Bt=null,ql=!1,oc=0,Fp.current=null,r===null||r.return===null){dr=1,uc=t,sr=null;break}e:{var s=e,a=r.return,l=r,u=t;if(t=kr,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var h=u,x=l,m=x.tag;if(!(x.mode&1)&&(m===0||m===11||m===15)){var y=x.alternate;y?(x.updateQueue=y.updateQueue,x.memoizedState=y.memoizedState,x.lanes=y.lanes):(x.updateQueue=null,x.memoizedState=null)}var p=kg(a);if(p!==null){p.flags&=-257,jg(p,a,l,s,t),p.mode&1&&Ng(s,h,t),t=p,u=h;var N=t.updateQueue;if(N===null){var k=new Set;k.add(u),t.updateQueue=k}else N.add(u);break e}else{if(!(t&1)){Ng(s,h,t),Rp();break e}u=Error(Te(426))}}else if(Mt&&l.mode&1){var M=kg(a);if(M!==null){!(M.flags&65536)&&(M.flags|=256),jg(M,a,l,s,t),yp(Do(u,l));break e}}s=u=Do(u,l),dr!==4&&(dr=2),Ul===null?Ul=[s]:Ul.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var b=m5(s,u,t);mg(s,b);break e;case 1:l=u;var w=s.type,L=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Ls===null||!Ls.has(L)))){s.flags|=65536,t&=-t,s.lanes|=t;var $=x5(s,l,t);mg(s,$);break e}}s=s.return}while(s!==null)}M5(r)}catch(J){t=J,sr===r&&r!==null&&(sr=r=r.return);continue}break}while(!0)}function T5(){var e=bd.current;return bd.current=vd,e===null?vd:e}function Rp(){(dr===0||dr===3||dr===2)&&(dr=4),yr===null||!(pa&268435455)&&!(Gd&268435455)||xs(yr,kr)}function kd(e,t){var r=mt;mt|=2;var n=T5();(yr!==e||kr!==t)&&(Ri=null,oa(e,t));do try{dw();break}catch(i){F5(e,i)}while(!0);if(bp(),mt=r,bd.current=n,sr!==null)throw Error(Te(261));return yr=null,kr=0,dr}function dw(){for(;sr!==null;)O5(sr)}function hw(){for(;sr!==null&&!Dv();)O5(sr)}function O5(e){var t=R5(e.alternate,e,hn);e.memoizedProps=e.pendingProps,t===null?M5(e):sr=t,Fp.current=null}function M5(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=sw(r,t),r!==null){r.flags&=32767,sr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dr=6,sr=null;return}}else if(r=iw(r,t,hn),r!==null){sr=r;return}if(t=t.sibling,t!==null){sr=t;return}sr=t=e}while(t!==null);dr===0&&(dr=5)}function ea(e,t,r){var n=kt,i=In.transition;try{In.transition=null,kt=1,fw(e,t,r,n)}finally{In.transition=i,kt=n}return null}function fw(e,t,r,n){do Ao();while(vs!==null);if(mt&6)throw Error(Te(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Te(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(Gv(e,s),e===yr&&(sr=yr=null,kr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||_u||(_u=!0,B5(id,function(){return Ao(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=In.transition,In.transition=null;var a=kt;kt=1;var l=mt;mt|=4,Fp.current=null,ow(e,r),P5(r,e),Fb(ef),ad=!!Zh,ef=Zh=null,e.current=r,lw(r),Rv(),mt=l,kt=a,In.transition=s}else e.current=r;if(_u&&(_u=!1,vs=e,Nd=i),s=e.pendingLanes,s===0&&(Ls=null),zv(r.stateNode),sn(e,Xt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(wd)throw wd=!1,e=wf,wf=null,e;return Nd&1&&e.tag!==0&&Ao(),s=e.pendingLanes,s&1?e===Nf?$l++:($l=0,Nf=e):$l=0,Rs(),null}function Ao(){if(vs!==null){var e=m2(Nd),t=In.transition,r=kt;try{if(In.transition=null,kt=16>e?16:e,vs===null)var n=!1;else{if(e=vs,vs=null,Nd=0,mt&6)throw Error(Te(331));var i=mt;for(mt|=4,$e=e.current;$e!==null;){var s=$e,a=s.child;if($e.flags&16){var l=s.deletions;if(l!==null){for(var u=0;u<l.length;u++){var h=l[u];for($e=h;$e!==null;){var x=$e;switch(x.tag){case 0:case 11:case 15:zl(8,x,s)}var m=x.child;if(m!==null)m.return=x,$e=m;else for(;$e!==null;){x=$e;var y=x.sibling,p=x.return;if(L5(x),x===h){$e=null;break}if(y!==null){y.return=p,$e=y;break}$e=p}}}var N=s.alternate;if(N!==null){var k=N.child;if(k!==null){N.child=null;do{var M=k.sibling;k.sibling=null,k=M}while(k!==null)}}$e=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,$e=a;else e:for(;$e!==null;){if(s=$e,s.flags&2048)switch(s.tag){case 0:case 11:case 15:zl(9,s,s.return)}var b=s.sibling;if(b!==null){b.return=s.return,$e=b;break e}$e=s.return}}var w=e.current;for($e=w;$e!==null;){a=$e;var L=a.child;if(a.subtreeFlags&2064&&L!==null)L.return=a,$e=L;else e:for(a=w;$e!==null;){if(l=$e,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Vd(9,l)}}catch(J){Vt(l,l.return,J)}if(l===a){$e=null;break e}var $=l.sibling;if($!==null){$.return=l.return,$e=$;break e}$e=l.return}}if(mt=i,Rs(),wi&&typeof wi.onPostCommitFiberRoot=="function")try{wi.onPostCommitFiberRoot(Rd,e)}catch{}n=!0}return n}finally{kt=r,In.transition=t}}return!1}function Dg(e,t,r){t=Do(r,t),t=m5(e,t,1),e=As(e,t,1),t=$r(),e!==null&&(bc(e,1,t),sn(e,t))}function Vt(e,t,r){if(e.tag===3)Dg(e,e,r);else for(;t!==null;){if(t.tag===3){Dg(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ls===null||!Ls.has(n))){e=Do(r,e),e=x5(t,e,1),t=As(t,e,1),e=$r(),t!==null&&(bc(t,1,e),sn(t,e));break}}t=t.return}}function pw(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=$r(),e.pingedLanes|=e.suspendedLanes&r,yr===e&&(kr&r)===r&&(dr===4||dr===3&&(kr&130023424)===kr&&500>Xt()-Op?oa(e,0):Tp|=r),sn(e,t)}function D5(e,t){t===0&&(e.mode&1?(t=vu,vu<<=1,!(vu&130023424)&&(vu=4194304)):t=1);var r=$r();e=Wi(e,t),e!==null&&(bc(e,t,r),sn(e,r))}function gw(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),D5(e,r)}function mw(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Te(314))}n!==null&&n.delete(t),D5(e,r)}var R5;R5=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||rn.current)en=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return en=!1,nw(e,t,r);en=!!(e.flags&131072)}else en=!1,Mt&&t.flags&1048576&&U2(t,fd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Wu(e,t),e=t.pendingProps;var i=Fo(t,Mr.current);So(t,r),i=Cp(null,t,n,e,i,r);var s=_p();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(n)?(s=!0,dd(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kp(t),i.updater=Wd,t.stateNode=i,i._reactInternals=t,uf(t,n,e,r),t=ff(null,t,n,!0,s,r)):(t.tag=0,Mt&&s&&mp(t),zr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Wu(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=yw(n),e=Yn(n,e),i){case 0:t=hf(null,t,n,e,r);break e;case 1:t=Lg(null,t,n,e,r);break e;case 11:t=Sg(null,t,n,e,r);break e;case 14:t=Ag(null,t,n,Yn(n.type,e),r);break e}throw Error(Te(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yn(n,i),hf(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yn(n,i),Lg(e,t,n,i,r);case 3:e:{if(w5(t),e===null)throw Error(Te(387));n=t.pendingProps,s=t.memoizedState,i=s.element,Y2(e,t),md(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Do(Error(Te(423)),t),t=Cg(e,t,n,r,i);break e}else if(n!==i){i=Do(Error(Te(424)),t),t=Cg(e,t,n,r,i);break e}else for(pn=Ss(t.stateNode.containerInfo.firstChild),xn=t,Mt=!0,Xn=null,r=V2(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(To(),n===i){t=Vi(e,t,r);break e}zr(e,t,n,r)}t=t.child}return t;case 5:return K2(t),e===null&&of(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,tf(n,i)?a=null:s!==null&&tf(n,s)&&(t.flags|=32),b5(e,t),zr(e,t,a,r),t.child;case 6:return e===null&&of(t),null;case 13:return N5(e,t,r);case 4:return jp(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Oo(t,null,n,r):zr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yn(n,i),Sg(e,t,n,i,r);case 7:return zr(e,t,t.pendingProps,r),t.child;case 8:return zr(e,t,t.pendingProps.children,r),t.child;case 12:return zr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Pt(pd,n._currentValue),n._currentValue=a,s!==null)if(ti(s.value,a)){if(s.children===i.children&&!rn.current){t=Vi(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(s.tag===1){u=Ui(-1,r&-r),u.tag=2;var h=s.updateQueue;if(h!==null){h=h.shared;var x=h.pending;x===null?u.next=u:(u.next=x.next,x.next=u),h.pending=u}}s.lanes|=r,u=s.alternate,u!==null&&(u.lanes|=r),lf(s.return,r,t),l.lanes|=r;break}u=u.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Te(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),lf(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}zr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,So(t,r),i=Fn(i),n=n(i),t.flags|=1,zr(e,t,n,r),t.child;case 14:return n=t.type,i=Yn(n,t.pendingProps),i=Yn(n.type,i),Ag(e,t,n,i,r);case 15:return y5(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yn(n,i),Wu(e,t),t.tag=1,nn(n)?(e=!0,dd(t)):e=!1,So(t,r),g5(t,n,i),uf(t,n,i,r),ff(null,t,n,!0,e,r);case 19:return k5(e,t,r);case 22:return v5(e,t,r)}throw Error(Te(156,t.tag))};function B5(e,t){return h2(e,t)}function xw(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,t,r,n){return new xw(e,t,r,n)}function Bp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yw(e){if(typeof e=="function")return Bp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ip)return 11;if(e===sp)return 14}return 2}function _s(e,t){var r=e.alternate;return r===null?(r=En(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Yu(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")Bp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ao:return la(r.children,i,s,t);case np:a=8,i|=8;break;case Fh:return e=En(12,r,t,i|2),e.elementType=Fh,e.lanes=s,e;case Th:return e=En(13,r,t,i),e.elementType=Th,e.lanes=s,e;case Oh:return e=En(19,r,t,i),e.elementType=Oh,e.lanes=s,e;case Km:return Yd(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Gm:a=10;break e;case Ym:a=9;break e;case ip:a=11;break e;case sp:a=14;break e;case ps:a=16,n=null;break e}throw Error(Te(130,e==null?e:typeof e,""))}return t=En(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function la(e,t,r,n){return e=En(7,e,n,t),e.lanes=r,e}function Yd(e,t,r,n){return e=En(22,e,n,t),e.elementType=Km,e.lanes=r,e.stateNode={isHidden:!1},e}function mh(e,t,r){return e=En(6,e,null,t),e.lanes=r,e}function xh(e,t,r){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vw(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X0(0),this.expirationTimes=X0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X0(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qp(e,t,r,n,i,s,a,l,u){return e=new vw(e,t,r,l,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=En(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kp(s),e}function bw(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:so,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function q5(e){if(!e)return Is;e=e._reactInternals;e:{if(ba(e)!==e||e.tag!==1)throw Error(Te(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Te(171))}if(e.tag===1){var r=e.type;if(nn(r))return q2(e,r,t)}return t}function z5(e,t,r,n,i,s,a,l,u){return e=qp(r,n,!0,e,i,s,a,l,u),e.context=q5(null),r=e.current,n=$r(),i=Cs(r),s=Ui(n,i),s.callback=t??null,As(r,s,i),e.current.lanes=i,bc(e,i,n),sn(e,n),e}function Kd(e,t,r,n){var i=t.current,s=$r(),a=Cs(i);return r=q5(r),t.context===null?t.context=r:t.pendingContext=r,t=Ui(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=As(i,t,a),e!==null&&(Zn(e,i,a,s),Uu(e,i,a)),a}function jd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Rg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zp(e,t){Rg(e,t),(e=e.alternate)&&Rg(e,t)}function ww(){return null}var U5=typeof reportError=="function"?reportError:function(e){console.error(e)};function Up(e){this._internalRoot=e}Jd.prototype.render=Up.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Te(409));Kd(e,t,null,null)};Jd.prototype.unmount=Up.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ga(function(){Kd(null,e,null,null)}),t[Hi]=null}};function Jd(e){this._internalRoot=e}Jd.prototype.unstable_scheduleHydration=function(e){if(e){var t=v2();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ms.length&&t!==0&&t<ms[r].priority;r++);ms.splice(r,0,e),r===0&&w2(e)}};function $p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bg(){}function Nw(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var h=jd(a);s.call(h)}}var a=z5(t,n,e,0,null,!1,!1,"",Bg);return e._reactRootContainer=a,e[Hi]=a.current,rc(e.nodeType===8?e.parentNode:e),ga(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var h=jd(u);l.call(h)}}var u=qp(e,0,!1,null,null,!1,!1,"",Bg);return e._reactRootContainer=u,e[Hi]=u.current,rc(e.nodeType===8?e.parentNode:e),ga(function(){Kd(t,u,r,n)}),u}function Qd(e,t,r,n,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var l=i;i=function(){var u=jd(a);l.call(u)}}Kd(t,a,e,i)}else a=Nw(r,t,e,i,n);return jd(a)}x2=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Il(t.pendingLanes);r!==0&&(lp(t,r|1),sn(t,Xt()),!(mt&6)&&(Ro=Xt()+500,Rs()))}break;case 13:ga(function(){var n=Wi(e,1);if(n!==null){var i=$r();Zn(n,e,1,i)}}),zp(e,1)}};cp=function(e){if(e.tag===13){var t=Wi(e,134217728);if(t!==null){var r=$r();Zn(t,e,134217728,r)}zp(e,134217728)}};y2=function(e){if(e.tag===13){var t=Cs(e),r=Wi(e,t);if(r!==null){var n=$r();Zn(r,e,t,n)}zp(e,t)}};v2=function(){return kt};b2=function(e,t){var r=kt;try{return kt=e,t()}finally{kt=r}};Wh=function(e,t,r){switch(t){case"input":if(Rh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Ud(n);if(!i)throw Error(Te(90));Xm(n),Rh(n,i)}}}break;case"textarea":Zm(e,r);break;case"select":t=r.value,t!=null&&wo(e,!!r.multiple,t,!1)}};a2=Mp;o2=ga;var kw={usingClientEntryPoint:!1,Events:[Nc,uo,Ud,i2,s2,Mp]},Ll={findFiberByHostInstance:ia,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jw={bundleType:Ll.bundleType,version:Ll.version,rendererPackageName:Ll.rendererPackageName,rendererConfig:Ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ji.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=u2(e),e===null?null:e.stateNode},findFiberByHostInstance:Ll.findFiberByHostInstance||ww,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{Rd=Pu.inject(jw),wi=Pu}catch{}}vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kw;vn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$p(t))throw Error(Te(200));return bw(e,t,null,r)};vn.createRoot=function(e,t){if(!$p(e))throw Error(Te(299));var r=!1,n="",i=U5;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=qp(e,1,!1,null,null,r,!1,n,i),e[Hi]=t.current,rc(e.nodeType===8?e.parentNode:e),new Up(t)};vn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Te(188)):(e=Object.keys(e).join(","),Error(Te(268,e)));return e=u2(t),e=e===null?null:e.stateNode,e};vn.flushSync=function(e){return ga(e)};vn.hydrate=function(e,t,r){if(!Xd(t))throw Error(Te(200));return Qd(null,e,t,!0,r)};vn.hydrateRoot=function(e,t,r){if(!$p(e))throw Error(Te(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=U5;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=z5(t,null,e,1,r??null,i,!1,s,a),e[Hi]=t.current,rc(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Jd(t)};vn.render=function(e,t,r){if(!Xd(t))throw Error(Te(200));return Qd(null,e,t,!1,r)};vn.unmountComponentAtNode=function(e){if(!Xd(e))throw Error(Te(40));return e._reactRootContainer?(ga(function(){Qd(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1};vn.unstable_batchedUpdates=Mp;vn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Xd(r))throw Error(Te(200));if(e==null||e._reactInternals===void 0)throw Error(Te(38));return Qd(e,t,r,!1,n)};vn.version="18.3.1-next-f1338f8080-20240426";function $5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($5)}catch(e){console.error(e)}}$5(),$m.exports=vn;var Sw=$m.exports,H5,qg=Sw;H5=qg.createRoot,qg.hydrateRoot;/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Aw={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"};/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Je=(e,t)=>{const r=Fe.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:l="",children:u,...h},x)=>Fe.createElement("svg",{ref:x,...Aw,width:i,height:i,stroke:n,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${Lw(e)}`,l].join(" "),...h},[...t.map(([m,y])=>Fe.createElement(m,y)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sf=Je("AlertCircle",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sd=Je("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hp=Je("ArrowDownWideNarrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cw=Je("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wp=Je("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vp=Je("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _w=Je("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dc=Je("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ot=Je("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pw=Je("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gi=Je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ma=Je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W5=Je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V5=Je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ei=Je("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mr=Je("Copy",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ad=Je("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lo=Je("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ld=Je("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ew=Je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Iw=Je("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G5=Je("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ri=Je("FileText",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xa=Je("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Af=Je("GitBranch",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hl=Je("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fw=Je("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Y5=Je("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tw=Je("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ow=Je("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zd=Je("Layers",[["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:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mw=Je("Lightbulb",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K5=Je("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ku=Je("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dw=Je("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rw=Je("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bw=Je("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J5=Je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gn=Je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qw=Je("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wl=Je("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ya=Je("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bs=Je("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zw=Je("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hc=Je("Tag",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yh=Je("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X5=Je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q5=Je("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ju=Je("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vl=Je("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zg=Je("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Uw=Je("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wa=Je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fc=Je("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $w=Je("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hw=Je("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Ww=({onFileUpload:e,onTextUpload:t,onUrlUpload:r,isLoading:n})=>{const[i,s]=Fe.useState(!1),[a,l]=Fe.useState("file"),[u,h]=Fe.useState(""),[x,m]=Fe.useState(""),y=Fe.useCallback($=>{$.preventDefault(),$.stopPropagation(),$.type==="dragenter"||$.type==="dragover"?s(!0):$.type==="dragleave"&&s(!1)},[]),p=Fe.useCallback($=>{$.preventDefault(),$.stopPropagation(),s(!1),$.dataTransfer.files&&$.dataTransfer.files[0]&&e($.dataTransfer.files[0])},[e]),N=$=>{$.target.files&&$.target.files[0]&&e($.target.files[0])},k=()=>{u.trim()&&(t(u),h(""),l("file"))},M=()=>{x.trim()&&(r(x),m(""),l("file"))},b=()=>{r("https://petstore.swagger.io/v2/swagger.json")},w=$=>{try{return new URL($),!0}catch{return!1}},L=[{id:"file",label:"Upload File",icon:Vl},{id:"text",label:"Paste Text",icon:ri},{id:"url",label:"From URL",icon:Hl}];return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border-2 border-dashed border-gray-300 dark:border-gray-600 p-8",children:[o.jsx("div",{className:"flex justify-center mb-8",children:o.jsx("div",{className:"flex bg-gray-100 dark:bg-gray-700 rounded-lg p-1",children:L.map($=>{const J=$.icon,le=a===$.id;return o.jsxs("button",{onClick:()=>l($.id),className:`
flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all
${le?"bg-white dark:bg-gray-600 text-blue-600 dark:text-blue-400 shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(J,{className:"h-4 w-4"}),$.label]},$.id)})})}),a==="file"&&o.jsxs("div",{className:`text-center transition-colors ${i?"bg-blue-50 dark:bg-blue-900/20 border-blue-300 dark:border-blue-600":""}`,onDragEnter:y,onDragLeave:y,onDragOver:y,onDrop:p,children:[o.jsx(Vl,{className:"mx-auto h-12 w-12 text-gray-400 mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Upload OpenAPI Specification"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"Drag and drop your OpenAPI spec file, or click to browse"}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-6",children:[o.jsxs("label",{className:"inline-flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-lg cursor-pointer transition-colors",children:[o.jsx(Vl,{className:"h-4 w-4"}),"Choose File",o.jsx("input",{type:"file",accept:".json,.yaml,.yml",onChange:N,className:"hidden",disabled:n})]}),o.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[o.jsx("div",{className:"h-px bg-gray-300 dark:bg-gray-600 w-8"}),o.jsx("span",{className:"text-sm font-medium",children:"OR"}),o.jsx("div",{className:"h-px bg-gray-300 dark:bg-gray-600 w-8"})]}),o.jsx("button",{onClick:b,disabled:n,className:"inline-flex items-center gap-2 bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 disabled:from-gray-400 disabled:to-gray-500 text-white font-medium py-3 px-6 rounded-lg transition-all transform hover:scale-105 disabled:transform-none disabled:cursor-not-allowed shadow-lg hover:shadow-xl",children:n?o.jsxs(o.Fragment,{children:[o.jsx(Ku,{className:"h-4 w-4 animate-spin"}),"Loading Demo..."]}):o.jsxs(o.Fragment,{children:[o.jsx(fc,{className:"h-4 w-4"}),"Try Demo"]})})]}),o.jsx("div",{className:"bg-gradient-to-r from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4 mb-6",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-green-500 rounded-lg",children:o.jsx(fc,{className:"h-4 w-4 text-white"})}),o.jsxs("div",{className:"text-left",children:[o.jsx("h4",{className:"font-semibold text-green-900 dark:text-green-100 text-sm",children:"🚀 Try the Demo"}),o.jsx("p",{className:"text-green-800 dark:text-green-200 text-sm",children:'Click "Try Demo" to instantly load the Petstore API example and explore all features'})]})]})}),o.jsxs("div",{className:"mt-6 flex items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:[o.jsx(Sf,{className:"h-4 w-4 mr-2"}),"Supports OpenAPI 3.0+ and Swagger 2.0 in JSON or YAML format"]})]}),a==="text"&&o.jsxs("div",{className:"text-center",children:[o.jsx(ri,{className:"mx-auto h-12 w-12 text-gray-400 mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Paste OpenAPI Specification"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"Paste your OpenAPI spec in JSON or YAML format"}),o.jsx("textarea",{value:u,onChange:$=>h($.target.value),placeholder:"Paste your OpenAPI specification here...",className:"w-full h-64 px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white mb-4"}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:k,disabled:!u.trim()||n,className:"flex-1 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white font-medium py-3 px-6 rounded-lg transition-colors flex items-center justify-center gap-2",children:n?o.jsxs(o.Fragment,{children:[o.jsx(Ku,{className:"h-4 w-4 animate-spin"}),"Processing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Ot,{className:"h-4 w-4"}),"Parse Specification"]})}),o.jsx("button",{onClick:()=>{l("file"),h("")},className:"px-6 py-3 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Cancel"})]})]}),a==="url"&&o.jsxs("div",{className:"text-center",children:[o.jsx(Hl,{className:"mx-auto h-12 w-12 text-gray-400 mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Import from URL"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"Enter the URL to your OpenAPI specification or Swagger endpoint"}),o.jsx("div",{className:"mb-4",children:o.jsx("input",{type:"url",value:x,onChange:$=>m($.target.value),placeholder:"https://petstore.swagger.io/v2/swagger.json",className:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})}),o.jsx("div",{className:"mb-6",children:o.jsx("button",{onClick:()=>m("https://petstore.swagger.io/v2/swagger.json"),className:"text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 text-sm font-medium underline",children:"Use Petstore Demo URL"})}),o.jsxs("div",{className:"mb-6 text-left",children:[o.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Common URL patterns:"}),o.jsxs("div",{className:"space-y-1 text-xs text-gray-600 dark:text-gray-400",children:[o.jsx("div",{children:"• https://petstore.swagger.io/v2/swagger.json (Swagger 2.0)"}),o.jsx("div",{children:"• https://api.example.com/swagger.json"}),o.jsx("div",{children:"• https://api.example.com/v1/openapi.yaml"}),o.jsx("div",{children:"• https://api.example.com/docs/openapi.json"})]})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:M,disabled:!x.trim()||!w(x)||n,className:"flex-1 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white font-medium py-3 px-6 rounded-lg transition-colors flex items-center justify-center gap-2",children:n?o.jsxs(o.Fragment,{children:[o.jsx(Ku,{className:"h-4 w-4 animate-spin"}),"Fetching..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Hl,{className:"h-4 w-4"}),"Import from URL"]})}),o.jsx("button",{onClick:()=>{l("file"),m("")},className:"px-6 py-3 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Cancel"})]}),x&&!w(x)&&o.jsxs("div",{className:"mt-4 flex items-center gap-2 text-red-600 dark:text-red-400 text-sm",children:[o.jsx(Sf,{className:"h-4 w-4"}),"Please enter a valid URL"]})]})]})},Vw=({title:e,subtitle:t,onFilterToggle:r,onExportClick:n,onUploadClick:i,onAnalyticsClick:s,onMCPClick:a,searchValue:l,onSearchChange:u,isSpecLoaded:h})=>{const[x,m]=Fe.useState(!1);return o.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-30",children:o.jsxs("div",{className:"px-6 py-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg",children:o.jsx(fc,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"OpenAPI Explorer"}),t&&o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t})]})]}),o.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[o.jsxs("button",{onClick:i,className:"flex items-center gap-2 px-4 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(Vl,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Load Spec"})]}),h&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:s,className:"flex items-center gap-2 px-4 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(dc,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Analytics"})]}),o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(Ld,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Export"})]})]}),o.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white rounded-lg transition-colors",children:[o.jsx(Ad,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"MCP"})]})]}),o.jsx("button",{onClick:()=>m(!x),className:"md:hidden p-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:x?o.jsx(wa,{className:"h-5 w-5"}):o.jsx(Dw,{className:"h-5 w-5"})})]}),h&&o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1 relative max-w-md",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:l,onChange:y=>u(y.target.value),placeholder:"Search endpoints, descriptions...",className:"w-full pl-10 pr-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors lg:hidden",children:[o.jsx(xa,{className:"h-4 w-4"}),"Filters"]})]}),x&&o.jsx("div",{className:"md:hidden mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex flex-col space-y-2",children:[o.jsxs("button",{onClick:()=>{i(),m(!1)},className:"flex items-center gap-3 px-3 py-2 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(Vl,{className:"h-5 w-5"}),"Load Spec"]}),h&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:()=>{s(),m(!1)},className:"flex items-center gap-3 px-3 py-2 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(dc,{className:"h-5 w-5"}),"Analytics"]}),o.jsxs("button",{onClick:()=>{n(),m(!1)},className:"flex items-center gap-3 px-3 py-2 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(Ld,{className:"h-5 w-5"}),"Export"]})]}),o.jsxs("button",{onClick:()=>{a(),m(!1)},className:"flex items-center gap-3 px-3 py-2 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-lg hover:from-blue-700 hover:to-purple-700 transition-colors",children:[o.jsx(Ad,{className:"h-5 w-5"}),"MCP Integration"]}),o.jsxs("button",{className:"flex items-center gap-3 px-3 py-2 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(Wl,{className:"h-5 w-5"}),"Settings"]})]})})]})})},Gw=({isOpen:e,onClose:t,filters:r,onFilterChange:n,availableTags:i,availableMethods:s,availableStatusCodes:a,endpointCount:l,filteredCount:u})=>{const[h,x]=Fe.useState(new Set(["basic","methods","tags"])),m=D=>{const R=new Set(h);R.has(D)?R.delete(D):R.add(D),x(R)},y=D=>{const R=r.methods.includes(D)?r.methods.filter(Z=>Z!==D):[...r.methods,D];n({...r,methods:R})},p=D=>{const R=r.tags.includes(D)?r.tags.filter(Z=>Z!==D):[...r.tags,D];n({...r,tags:R})},N=D=>{const R=r.statusCodes.includes(D)?r.statusCodes.filter(Z=>Z!==D):[...r.statusCodes,D];n({...r,statusCodes:R})},k=D=>{const R=r.complexity.includes(D)?r.complexity.filter(Z=>Z!==D):[...r.complexity,D];n({...r,complexity:R})},M=D=>{const R=r.security.includes(D)?r.security.filter(Z=>Z!==D):[...r.security,D];n({...r,security:R})},b=D=>{const R=r.responseTime.includes(D)?r.responseTime.filter(Z=>Z!==D):[...r.responseTime,D];n({...r,responseTime:R})},w=()=>{n({methods:[],tags:[],statusCodes:[],deprecated:null,search:"",complexity:[],security:[],pathPattern:"",hasParameters:null,hasRequestBody:null,responseTime:[]})},L=D=>({GET:"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700",POST:"bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900 dark:text-blue-200 dark:border-blue-700",PUT:"bg-orange-100 text-orange-800 border-orange-200 dark:bg-orange-900 dark:text-orange-200 dark:border-orange-700",PATCH:"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700",DELETE:"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700",OPTIONS:"bg-gray-100 text-gray-800 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600",HEAD:"bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900 dark:text-purple-200 dark:border-purple-700",TRACE:"bg-pink-100 text-pink-800 border-pink-200 dark:bg-pink-900 dark:text-pink-200 dark:border-pink-700"})[D]||"bg-gray-100 text-gray-800 border-gray-200",$=D=>D.startsWith("2")?"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700":D.startsWith("3")?"bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900 dark:text-blue-200 dark:border-blue-700":D.startsWith("4")?"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700":D.startsWith("5")?"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700":"bg-gray-100 text-gray-800 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600",J=({id:D,title:R,icon:Z,children:G})=>{const P=h.has(D);return o.jsxs("div",{className:"border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("button",{onClick:()=>m(D),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Z,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:R})]}),P?o.jsx(W5,{className:"h-4 w-4 text-gray-500"}):o.jsx(Gi,{className:"h-4 w-4 text-gray-500"})]}),P&&o.jsx("div",{className:"px-4 pb-4",children:G})]})},le=r.methods.length+r.tags.length+r.statusCodes.length+r.complexity.length+r.security.length+r.responseTime.length+(r.deprecated!==null?1:0)+(r.search?1:0)+(r.pathPattern?1:0)+(r.hasParameters!==null?1:0)+(r.hasRequestBody!==null?1:0);return o.jsxs(o.Fragment,{children:[e&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 lg:hidden",onClick:t}),o.jsxs("div",{className:`
fixed lg:sticky top-0 left-0 h-screen w-96 bg-white dark:bg-gray-800
border-r border-gray-200 dark:border-gray-700 z-50 transform transition-transform duration-300
${e?"translate-x-0":"-translate-x-full lg:translate-x-0"}
flex flex-col
`,children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(xa,{className:"h-5 w-5 text-blue-600"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Advanced Filters"})]}),o.jsx("button",{onClick:t,className:"lg:hidden p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"px-6 py-4 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Showing ",o.jsx("span",{className:"font-semibold text-blue-600",children:u})," of"," ",o.jsx("span",{className:"font-semibold",children:l})," endpoints"]}),le>0&&o.jsxs("div",{className:"flex items-center justify-between mt-2",children:[o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[le," filter",le!==1?"s":""," active"]}),o.jsxs("button",{onClick:w,className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700 font-medium",children:[o.jsx(J5,{className:"h-3 w-3"}),"Clear all"]})]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[o.jsx(J,{id:"basic",title:"Search & Text",icon:gn,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Search endpoints"}),o.jsx("input",{type:"text",value:r.search,onChange:D=>n({...r,search:D.target.value}),placeholder:"Search paths, descriptions, summaries...",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Path pattern"}),o.jsx("input",{type:"text",value:r.pathPattern,onChange:D=>n({...r,pathPattern:D.target.value}),placeholder:"/api/v1/users, /pets/{id}, etc.",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]})]})}),o.jsx(J,{id:"methods",title:"HTTP Methods",icon:ei,children:o.jsx("div",{className:"grid grid-cols-2 gap-2",children:s.map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.methods.includes(D),onChange:()=>y(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-2"}),o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${L(D)}`,children:D})]},D))})}),i.length>0&&o.jsx(J,{id:"tags",title:"Tags",icon:hc,children:o.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:i.map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.tags.includes(D),onChange:()=>p(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:D})]},D))})}),o.jsx(J,{id:"status",title:"Response Codes",icon:Ot,children:o.jsx("div",{className:"grid grid-cols-3 gap-2",children:a.map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.statusCodes.includes(D),onChange:()=>N(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-2"}),o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${$(D)}`,children:D})]},D))})}),o.jsx(J,{id:"complexity",title:"Complexity",icon:Zd,children:o.jsx("div",{className:"space-y-2",children:["low","medium","high"].map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.complexity.includes(D),onChange:()=>k(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border capitalize ${D==="low"?"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700":D==="medium"?"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700":"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700"}`,children:D})]},D))})}),o.jsx(J,{id:"security",title:"Security",icon:ya,children:o.jsx("div",{className:"space-y-2",children:["none","apiKey","oauth2","bearer","basic"].map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.security.includes(D),onChange:()=>M(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 capitalize",children:D==="none"?"No Authentication":D})]},D))})}),o.jsx(J,{id:"performance",title:"Performance",icon:V5,children:o.jsx("div",{className:"space-y-2",children:["fast","medium","slow"].map(D=>o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:r.responseTime.includes(D),onChange:()=>b(D),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsxs("span",{className:`px-2 py-1 rounded text-xs font-medium border capitalize ${D==="fast"?"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700":D==="medium"?"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700":"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700"}`,children:[D," response"]})]},D))})}),o.jsx(J,{id:"advanced",title:"Advanced Options",icon:Wl,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Deprecated Status"}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"deprecated",checked:r.deprecated===null,onChange:()=>n({...r,deprecated:null}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"All endpoints"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"deprecated",checked:r.deprecated===!1,onChange:()=>n({...r,deprecated:!1}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Active only"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"deprecated",checked:r.deprecated===!0,onChange:()=>n({...r,deprecated:!0}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Deprecated only"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Parameters"}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasParameters",checked:r.hasParameters===null,onChange:()=>n({...r,hasParameters:null}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Any"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasParameters",checked:r.hasParameters===!0,onChange:()=>n({...r,hasParameters:!0}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Has parameters"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasParameters",checked:r.hasParameters===!1,onChange:()=>n({...r,hasParameters:!1}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"No parameters"})]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Request Body"}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasRequestBody",checked:r.hasRequestBody===null,onChange:()=>n({...r,hasRequestBody:null}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Any"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasRequestBody",checked:r.hasRequestBody===!0,onChange:()=>n({...r,hasRequestBody:!0}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Has request body"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"hasRequestBody",checked:r.hasRequestBody===!1,onChange:()=>n({...r,hasRequestBody:!1}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"No request body"})]})]})]})]})})]})]})]})},Yw=({grouping:e,onGroupingChange:t,view:r,onViewChange:n})=>{const i=[{id:"list",icon:K5,label:"List"},{id:"grid",icon:Fw,label:"Grid"},{id:"compact",icon:Zd,label:"Compact"},{id:"table",icon:zw,label:"Table"}],s=[{id:"none",label:"No Grouping"},{id:"tag",label:"By Tag"},{id:"method",label:"By Method"},{id:"path",label:"By Path Segment"},{id:"complexity",label:"By Complexity"},{id:"security",label:"By Security"}],a=[{id:"path",label:"Path"},{id:"method",label:"Method"},{id:"summary",label:"Summary"},{id:"complexity",label:"Complexity"},{id:"responseTime",label:"Response Time"}],l=[{id:"compact",label:"Compact"},{id:"comfortable",label:"Comfortable"},{id:"spacious",label:"Spacious"}];return o.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 p-4",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Layout:"}),o.jsx("div",{className:"flex bg-gray-100 dark:bg-gray-700 rounded-lg p-1",children:i.map(u=>{const h=u.icon,x=r.layout===u.id;return o.jsxs("button",{onClick:()=>n({...r,layout:u.id}),className:`
flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium transition-all
${x?"bg-white dark:bg-gray-600 text-blue-600 dark:text-blue-400 shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,title:u.label,children:[o.jsx(h,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:u.label})]},u.id)})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Group:"}),o.jsx("select",{value:e.groupBy,onChange:u=>t({...e,groupBy:u.target.value}),className:"px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:s.map(u=>o.jsx("option",{value:u.id,children:u.label},u.id))})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Sort:"}),o.jsx("select",{value:e.sortBy,onChange:u=>t({...e,sortBy:u.target.value}),className:"px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:a.map(u=>o.jsx("option",{value:u.id,children:u.label},u.id))}),o.jsx("button",{onClick:()=>t({...e,sortOrder:e.sortOrder==="asc"?"desc":"asc"}),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:`Sort ${e.sortOrder==="asc"?"Descending":"Ascending"}`,children:e.sortOrder==="asc"?o.jsx(_w,{className:"h-4 w-4 text-gray-600 dark:text-gray-400"}):o.jsx(Cw,{className:"h-4 w-4 text-gray-600 dark:text-gray-400"})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Density:"}),o.jsx("select",{value:r.density,onChange:u=>n({...r,density:u.target.value}),className:"px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:l.map(u=>o.jsx("option",{value:u.id,children:u.label},u.id))})]}),o.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[o.jsxs("button",{onClick:()=>n({...r,showDetails:!r.showDetails}),className:`
flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors
${r.showDetails?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}
`,children:[r.showDetails?o.jsx(G5,{className:"h-4 w-4"}):o.jsx(Iw,{className:"h-4 w-4"}),"Details"]}),o.jsx("button",{onClick:()=>n({...r,showBusinessContext:!r.showBusinessContext}),className:`
flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors
${r.showBusinessContext?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}
`,children:"Business"}),o.jsx("button",{onClick:()=>n({...r,showAISuggestions:!r.showAISuggestions}),className:`
flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors
${r.showAISuggestions?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}
`,children:"AI Tips"}),o.jsx("button",{onClick:()=>n({...r,showCodeExamples:!r.showCodeExamples}),className:`
flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors
${r.showCodeExamples?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}
`,children:"Code"})]})]})})},Ug=({endpoint:e,view:t,onSelect:r})=>{const[n,i]=Fe.useState(!1),[s,a]=Fe.useState(null),l=N=>({GET:"bg-green-500 text-white",POST:"bg-blue-500 text-white",PUT:"bg-orange-500 text-white",PATCH:"bg-yellow-500 text-white",DELETE:"bg-red-500 text-white",OPTIONS:"bg-gray-500 text-white",HEAD:"bg-purple-500 text-white",TRACE:"bg-pink-500 text-white"})[N]||"bg-gray-500 text-white",u=N=>{switch(N){case"low":return"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700";case"high":return"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700";default:return"bg-gray-100 text-gray-800 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600"}},h=N=>{switch(N){case"fast":return"bg-green-100 text-green-800 border-green-200 dark:bg-green-900 dark:text-green-200 dark:border-green-700";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900 dark:text-yellow-200 dark:border-yellow-700";case"slow":return"bg-red-100 text-red-800 border-red-200 dark:bg-red-900 dark:text-red-200 dark:border-red-700";default:return"bg-gray-100 text-gray-800 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600"}},x=async(N,k)=>{try{await navigator.clipboard.writeText(N),a(k),setTimeout(()=>a(null),2e3)}catch(M){console.error("Failed to copy text: ",M)}},m=()=>{var M;const N=e.method.toLowerCase();let k=`curl -X ${e.method} "${e.path}"`;return(M=e.parameters)!=null&&M.some(b=>b.in==="header")&&(k+=` \\
-H "Content-Type: application/json"`),e.requestBody&&(N==="post"||N==="put"||N==="patch")&&(k+=` \\
-d '{"example": "data"}'`),k},y={compact:"p-3",comfortable:"p-4",spacious:"p-6"},p=t.layout==="compact"?"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 hover:shadow-md transition-all duration-200 hover:border-blue-200 dark:hover:border-blue-600":"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-all duration-200 hover:border-blue-200 dark:hover:border-blue-600";return t.layout==="table"?o.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${l(e.method)}`,children:e.method})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300",children:e.path})}),o.jsx("td",{className:"px-4 py-3 text-sm text-gray-900 dark:text-white",children:e.summary||"No summary"}),o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.tags.slice(0,2).map(N=>o.jsx("span",{className:"px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded",children:N},N)),e.tags.length>2&&o.jsxs("span",{className:"text-xs text-gray-500",children:["+",e.tags.length-2]})]})}),o.jsx("td",{className:"px-4 py-3",children:e.complexity&&o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${u(e.complexity)}`,children:e.complexity})}),o.jsx("td",{className:"px-4 py-3",children:e.deprecated&&o.jsx(Sd,{className:"h-4 w-4 text-orange-500"})})]}):o.jsxs("div",{className:p,children:[o.jsx("div",{className:`${y[t.density]} cursor-pointer`,onClick:()=>i(!n),children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("span",{className:`px-3 py-1 rounded-md text-sm font-medium ${l(e.method)}`,children:e.method}),o.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:e.path}),e.deprecated&&o.jsxs("div",{className:"flex items-center gap-1 text-orange-600 dark:text-orange-400",children:[o.jsx(Sd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-xs font-medium",children:"DEPRECATED"})]})]}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:e.summary||"No summary available"}),t.showDetails&&e.description&&o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm line-clamp-2 mb-3",children:e.description}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.complexity&&o.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium border ${u(e.complexity)}`,children:[o.jsx(Zd,{className:"h-3 w-3"}),e.complexity]}),e.estimatedResponseTime&&o.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium border ${h(e.estimatedResponseTime)}`,children:[o.jsx(V5,{className:"h-3 w-3"}),e.estimatedResponseTime]}),e.security&&e.security.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 text-xs rounded border border-purple-200 dark:border-purple-700",children:[o.jsx(ya,{className:"h-3 w-3"}),"secured"]}),e.parameters.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 text-xs rounded border border-gray-200 dark:border-gray-600",children:[o.jsx(Y5,{className:"h-3 w-3"}),e.parameters.length," param",e.parameters.length!==1?"s":""]}),e.hasRequestBody&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded border border-blue-200 dark:border-blue-700",children:[o.jsx(ri,{className:"h-3 w-3"}),"body"]})]}),e.tags.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.map(N=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded-full",children:[o.jsx(hc,{className:"h-3 w-3"}),N]},N))})]}),o.jsx("button",{className:"ml-4 p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded transition-colors",children:n?o.jsx(Gi,{className:"h-5 w-5 text-gray-500"}):o.jsx(ma,{className:"h-5 w-5 text-gray-500"})})]})}),n&&o.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700",children:[t.showBusinessContext&&e.businessContext&&o.jsxs("div",{className:"p-6 bg-blue-50 dark:bg-blue-900/20 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"Business Context"}),o.jsx("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:e.businessContext})]}),t.showAISuggestions&&e.aiSuggestions&&e.aiSuggestions.length>0&&o.jsxs("div",{className:"p-6 bg-yellow-50 dark:bg-yellow-900/20 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("h4",{className:"font-semibold text-yellow-900 dark:text-yellow-100 mb-3 flex items-center gap-2",children:[o.jsx(Mw,{className:"h-4 w-4"}),"AI Suggestions"]}),o.jsx("ul",{className:"space-y-2",children:e.aiSuggestions.map((N,k)=>o.jsxs("li",{className:"text-yellow-800 dark:text-yellow-200 text-sm flex items-start gap-2",children:[o.jsx("span",{className:"text-yellow-600 dark:text-yellow-400 mt-0.5",children:"•"}),N]},k))})]}),e.parameters.length>0&&o.jsxs("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Parameters"}),o.jsx("div",{className:"space-y-3",children:e.parameters.map((N,k)=>o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx("code",{className:"text-sm font-mono text-blue-600 dark:text-blue-400",children:N.name}),o.jsx("span",{className:"text-xs bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 px-2 py-1 rounded",children:N.in}),N.required&&o.jsx("span",{className:"text-xs bg-red-100 text-red-800 px-2 py-1 rounded",children:"required"})]}),N.description&&o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:N.description})]},k))})]}),o.jsxs("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Responses"}),o.jsx("div",{className:"space-y-3",children:Object.entries(e.responses).map(([N,k])=>o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${N.startsWith("2")?"bg-green-100 text-green-800":N.startsWith("4")?"bg-yellow-100 text-yellow-800":N.startsWith("5")?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:N})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:k.description})]},N))})]}),t.showCodeExamples&&o.jsxs("div",{className:"p-6",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Code Example"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>x(m(),"curl"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:s==="curl"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:m()})})]})]}),o.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700 flex gap-3",children:[o.jsxs("button",{onClick:()=>r==null?void 0:r(e),className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors flex items-center justify-center gap-2",children:[o.jsx(Ew,{className:"h-4 w-4"}),"View Details"]}),o.jsxs("button",{onClick:()=>x(e.path,"path"),className:"px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors flex items-center gap-2",children:[s==="path"?o.jsx(Ot,{className:"h-4 w-4 text-green-600"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy Path"]})]})]})]})},Kw=({isOpen:e,onClose:t,endpoints:r,filters:n,onExport:i})=>{var y,p;const[s,a]=Fe.useState("json"),[l,u]=Fe.useState({includeDeprecated:!0,includeBusinessContext:!0,includeAISuggestions:!0,includeCodeExamples:!0,format:"detailed"});if(!e)return null;const h=()=>{i(s,l),t()},x=[{id:"json",name:"JSON",description:"Machine-readable format for API documentation",icon:ei,color:"text-blue-600"},{id:"pdf",name:"PDF",description:"Professional document for sharing and printing",icon:ri,color:"text-red-600"},{id:"csv",name:"CSV",description:"Spreadsheet format for analysis and reporting",icon:xa,color:"text-green-600"},{id:"markdown",name:"Markdown",description:"Documentation format compatible with GitHub, GitLab",icon:ri,color:"text-purple-600"}],m=n.methods.length+n.tags.length+n.statusCodes.length+(n.deprecated!==null?1:0)+(n.search?1:0);return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Export API Documentation"}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Export ",r.length," filtered endpoints",m>0&&o.jsxs("span",{className:"ml-2 px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded-full",children:[m," filter",m!==1?"s":""," applied"]})]})]}),o.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Export Format"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:x.map(N=>{const k=N.icon,M=s===N.id;return o.jsxs("label",{className:`
flex items-start p-4 border-2 rounded-lg cursor-pointer transition-all
${M?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
`,children:[o.jsx("input",{type:"radio",name:"format",value:N.id,checked:M,onChange:b=>a(b.target.value),className:"sr-only"}),o.jsx(k,{className:`h-6 w-6 ${N.color} mr-3 mt-0.5`}),o.jsxs("div",{children:[o.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:N.name}),o.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:N.description})]})]},N.id)})})]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Export Options"}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Detail Level"}),o.jsxs("div",{className:"flex gap-4",children:[o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"detailLevel",value:"summary",checked:l.format==="summary",onChange:N=>u({...l,format:N.target.value}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-2"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Summary"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"radio",name:"detailLevel",value:"detailed",checked:l.format==="detailed",onChange:N=>u({...l,format:N.target.value}),className:"border-gray-300 text-blue-600 focus:ring-blue-500 mr-2"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Detailed"})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:l.includeDeprecated,onChange:N=>u({...l,includeDeprecated:N.target.checked}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Include deprecated endpoints"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:l.includeBusinessContext,onChange:N=>u({...l,includeBusinessContext:N.target.checked}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Include business context"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:l.includeAISuggestions,onChange:N=>u({...l,includeAISuggestions:N.target.checked}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Include AI suggestions"})]}),o.jsxs("label",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",checked:l.includeCodeExamples,onChange:N=>u({...l,includeCodeExamples:N.target.checked}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 mr-3"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Include code examples"})]})]})]}),o.jsxs("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[o.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Export Preview"}),o.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsxs("div",{children:["• ",r.length," endpoints will be exported"]}),o.jsxs("div",{children:["• Format: ",(y=x.find(N=>N.id===s))==null?void 0:y.name]}),o.jsxs("div",{children:["• Detail level: ",l.format]}),o.jsxs("div",{children:["• Additional data: ",[l.includeBusinessContext&&"Business context",l.includeAISuggestions&&"AI suggestions",l.includeCodeExamples&&"Code examples"].filter(Boolean).join(", ")||"None"]})]})]})]}),o.jsxs("div",{className:"flex gap-3 p-6 border-t border-gray-200 dark:border-gray-700",children:[o.jsx("button",{onClick:t,className:"flex-1 px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Cancel"}),o.jsxs("button",{onClick:h,className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors flex items-center justify-center gap-2",children:[o.jsx(Ld,{className:"h-4 w-4"}),"Export ",(p=x.find(N=>N.id===s))==null?void 0:p.name]})]})]})})},Jw=({analytics:e,isOpen:t,onClose:r})=>{const[n,i]=Fe.useState(!1);if(!t)return null;const s=({title:m,value:y,icon:p,color:N,subtitle:k})=>o.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:m}),o.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:y}),k&&o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:k})]}),o.jsx("div",{className:`p-3 rounded-lg ${N}`,children:o.jsx(p,{className:"h-6 w-6 text-white"})})]})}),a=({title:m,data:y,colors:p,showInfo:N,infoContent:k})=>{const M=Object.values(y).reduce((b,w)=>b+w,0);return o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:m}),N&&o.jsxs("div",{className:"relative",children:[o.jsx("button",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors",children:o.jsx(Tw,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"})}),n&&o.jsx("div",{className:"absolute left-0 top-8 z-50 w-80 p-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg",children:k})]})]}),o.jsx("div",{className:"space-y-3",children:Object.entries(y).map(([b,w])=>{const L=M>0?w/M*100:0;return o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:`w-3 h-3 rounded-full ${p[b]||"bg-gray-400"}`}),o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:b.toUpperCase()})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:w}),o.jsx("div",{className:"w-20 bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:o.jsx("div",{className:`h-2 rounded-full ${p[b]||"bg-gray-400"}`,style:{width:`${L}%`}})}),o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 w-10 text-right",children:[L.toFixed(0),"%"]})]})]},b)})})]})},l={GET:"bg-green-500",POST:"bg-blue-500",PUT:"bg-orange-500",PATCH:"bg-yellow-500",DELETE:"bg-red-500",OPTIONS:"bg-gray-500",HEAD:"bg-purple-500",TRACE:"bg-pink-500"},u={low:"bg-green-500",medium:"bg-yellow-500",high:"bg-red-500"},h={200:"bg-green-500",201:"bg-green-400",204:"bg-green-300",400:"bg-yellow-500",401:"bg-orange-500",403:"bg-orange-600",404:"bg-red-400",500:"bg-red-500"},x=o.jsxs("div",{className:"text-sm",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"🧮 How Complexity is Calculated"}),o.jsxs("div",{className:"space-y-2 text-gray-700 dark:text-gray-300",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Low (≤2 points):"})," Simple endpoints with few parameters"]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Medium (3-5 points):"})," Moderate complexity with request bodies"]}),o.jsxs("div",{children:[o.jsx("strong",{children:"High (>5 points):"})," Complex endpoints with many parameters, security, etc."]})]}),o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-1",children:"Scoring factors:"}),o.jsxs("ul",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("li",{children:"• Parameters: +0.5 each"}),o.jsx("li",{children:"• Request body: +2 points"}),o.jsx("li",{children:"• Multiple responses: +0.3 each"}),o.jsx("li",{children:"• Security: +1 point"}),o.jsx("li",{children:"• Multiple tags: +0.5 points"})]})]})]});return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 rounded-xl max-w-6xl w-full max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 rounded-t-xl",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(dc,{className:"h-6 w-6 text-blue-600"}),o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"API Analytics Dashboard"})]}),o.jsx("button",{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsxs("div",{className:"p-6 space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[o.jsx(s,{title:"Total Endpoints",value:e.totalEndpoints,icon:ei,color:"bg-blue-500"}),o.jsx(s,{title:"Deprecated",value:e.deprecatedCount,icon:Sd,color:"bg-orange-500",subtitle:`${(e.deprecatedCount/e.totalEndpoints*100).toFixed(1)}% of total`}),o.jsx(s,{title:"Avg Parameters",value:e.averageParametersPerEndpoint.toFixed(1),icon:Zd,color:"bg-purple-500",subtitle:"per endpoint"}),o.jsx(s,{title:"Security Schemes",value:e.securitySchemes.length,icon:ya,color:"bg-green-500"})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsx(a,{title:"HTTP Methods Distribution",data:e.methodDistribution,colors:l}),o.jsx(a,{title:"Complexity Distribution",data:e.complexityDistribution,colors:u,showInfo:!0,infoContent:x})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsx(a,{title:"Response Codes Distribution",data:e.responseCodeDistribution,colors:h}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Top Tags"}),o.jsx("div",{className:"space-y-3",children:Object.entries(e.tagDistribution).sort(([,m],[,y])=>y-m).slice(0,8).map(([m,y])=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(hc,{className:"h-4 w-4 text-blue-500"}),o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:m})]}),o.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[y," endpoint",y!==1?"s":""]})]},m))})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Common Path Patterns"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.pathPatterns.slice(0,9).map((m,y)=>o.jsx("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-lg",children:o.jsx("code",{className:"text-sm text-gray-800 dark:text-gray-200",children:m})},y))})]}),e.securitySchemes.length>0&&o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Security Schemes"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:e.securitySchemes.map((m,y)=>o.jsx("span",{className:"px-3 py-1 bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 rounded-full text-sm font-medium",children:m},y))})]})]})]})})},$g=({isOpen:e,onClose:t})=>{const[r,n]=T1.useState(null),[i,s]=T1.useState(!1);if(!e)return null;const a=async(G,P)=>{try{await navigator.clipboard.writeText(G),n(P),setTimeout(()=>n(null),2e3)}catch(I){console.error("Failed to copy text: ",I)}},l=`{
"mcpServers": {
"openapi-explorer": {
"command": "npx",
"args": ["openapi-explorer", "mcp"]
}
}
}`,u=`{
"mcpServers": {
"openapi-explorer-http": {
"command": "npx",
"args": ["openapi-explorer", "mcp", "--http", "--port", "3001"]
}
}
}`,h=`{
"mcpServers": {
"openapi-explorer": {
"command": "node",
"args": ["path/to/your/openapi-explorer/dist/mcp/server.js"],
"env": {}
}
}
}`,x=`# Quick start - no installation needed!
npx openapi-explorer mcp
# HTTP transport with custom port
npx openapi-explorer mcp --http --port 3001
# Show setup instructions
npx openapi-explorer setup
# Start web interface (development mode)
npx openapi-explorer web`,m=`# Option 1: Use npx (recommended - no installation needed)
npx openapi-explorer mcp
# Option 2: Install globally
npm install -g openapi-explorer
openapi-explorer mcp
# Option 3: Clone and build from source
git clone <repository-url>
cd openapi-explorer
npm install
npm run build:all`,y=`# Test with npx (easiest)
npx openapi-explorer mcp
# Test HTTP server
npx openapi-explorer mcp --http
# Check if it's working
curl http://localhost:3001/health # (for HTTP mode)`,p=`# Health check
curl http://localhost:3001/health
# List available tools
curl -X POST http://localhost:3001/mcp/tools/list
# Load an OpenAPI spec
curl -X POST http://localhost:3001/mcp/tools/call \\
-H "Content-Type: application/json" \\
-d '{
"name": "load_openapi_spec",
"arguments": {
"source": "https://petstore.swagger.io/v2/swagger.json",
"sourceType": "url"
}
}'
# Search endpoints
curl -X POST http://localhost:3001/mcp/tools/call \\
-H "Content-Type: application/json" \\
-d '{
"name": "search_endpoints",
"arguments": {
"query": "user",
"methods": ["GET", "POST"]
}
}'`,N=`# Server-sent events stream
curl -N http://localhost:3001/mcp/stream
# Streaming tool execution
curl -X POST http://localhost:3001/mcp/execute \\
-H "Content-Type: application/json" \\
-d '{
"tool": "get_api_overview",
"args": {},
"stream": true
}'`,k=[{name:"load_openapi_spec",title:"Load OpenAPI Spec",description:"Load and parse OpenAPI specifications from text, URL, or file content",icon:ri,category:"core",color:"blue",features:["JSON/YAML support","URL loading","Swagger 2.0 conversion"]},{name:"get_api_overview",title:"API Overview",description:"Get comprehensive overview including statistics and analytics",icon:G5,category:"core",color:"green",features:["Basic info","Statistics","Method distribution"]},{name:"search_endpoints",title:"Search Endpoints",description:"Search and filter API endpoints with advanced criteria",icon:gn,category:"core",color:"purple",features:["Text search","Method filtering","Tag filtering","Complexity filtering"]},{name:"get_endpoint_details",title:"Endpoint Details",description:"Get detailed information about specific endpoints",icon:zg,category:"core",color:"orange",features:["Parameters","Responses","Security info","Business context"]},{name:"generate_code_examples",title:"Code Examples",description:"Generate code examples in multiple programming languages",icon:ei,category:"development",color:"indigo",features:["cURL","JavaScript","Python","TypeScript"]},{name:"get_api_analytics",title:"API Analytics",description:"Comprehensive analytics and insights about the API",icon:dc,category:"analysis",color:"pink",features:["Distributions","Complexity analysis","Security coverage"]},{name:"validate_api_design",title:"Design Validation",description:"Analyze API design and provide improvement recommendations",icon:ya,category:"analysis",color:"emerald",features:["Security validation","Documentation check","Best practices"]},{name:"export_documentation",title:"Export Documentation",description:"Export API documentation in various formats",icon:Ld,category:"documentation",color:"red",features:["Markdown","JSON","Summary","Code examples"]},{name:"search_request_body_properties",title:"Search Properties",description:"Deep search through request body schemas for specific properties and patterns",icon:Lo,category:"analysis",color:"cyan",features:["Property search","Type filtering","Regex patterns","Nested traversal"]},{name:"generate_typescript_types",title:"TypeScript Types",description:"Generate TypeScript interfaces and types from OpenAPI schemas",icon:ei,category:"development",color:"blue",features:["Interface generation","Validation decorators","Request/response types","Export formats"]},{name:"find_schema_dependencies",title:"Schema Dependencies",description:"Trace and analyze schema references and dependencies throughout the API",icon:Af,category:"analysis",color:"violet",features:["Dependency trees","Circular detection","Impact analysis","Reference mapping"]},{name:"validate_request_examples",title:"Validate Examples",description:"Validate that request/response examples match their schemas",icon:Pw,category:"validation",color:"green",features:["Schema validation","Type checking","Constraint validation","Strict mode"]},{name:"extract_auth_patterns",title:"Auth Patterns",description:"Analyze and extract authentication and authorization patterns across the API",icon:Ow,category:"security",color:"amber",features:["Security schemes","OAuth analysis","Scope mapping","Recommendations"]},{name:"generate_mock_data",title:"Mock Data Generator",description:"Generate realistic mock data based on OpenAPI schemas",icon:bs,category:"development",color:"teal",features:["Realistic data","Context-aware","Multiple formats","Constraint-based"]},{name:"find_unused_schemas",title:"Unused Schemas",description:"Identify schemas that are defined but never referenced in the API",icon:X5,category:"optimization",color:"rose",features:["Reference analysis","Cleanup suggestions","Usage percentage","Indirect refs"]},{name:"analyze_schema_evolution",title:"Schema Evolution",description:"Analyze how schemas might evolve and suggest versioning strategies",icon:Q5,category:"planning",color:"purple",features:["Breaking change risk","Extensibility assessment","Versioning strategy","Evolution recommendations"]}],M=G=>({blue:"bg-blue-500 text-white",green:"bg-green-500 text-white",purple:"bg-purple-500 text-white",orange:"bg-orange-500 text-white",indigo:"bg-indigo-500 text-white",pink:"bg-pink-500 text-white",emerald:"bg-emerald-500 text-white",red:"bg-red-500 text-white",cyan:"bg-cyan-500 text-white",violet:"bg-violet-500 text-white",amber:"bg-amber-500 text-white",teal:"bg-teal-500 text-white",rose:"bg-rose-500 text-white"})[G]||"bg-gray-500 text-white",b=G=>({blue:"border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/20",green:"border-green-200 dark:border-green-800 bg-green-50 dark:bg-green-900/20",purple:"border-purple-200 dark:border-purple-800 bg-purple-50 dark:bg-purple-900/20",orange:"border-orange-200 dark:border-orange-800 bg-orange-50 dark:bg-orange-900/20",indigo:"border-indigo-200 dark:border-indigo-800 bg-indigo-50 dark:bg-indigo-900/20",pink:"border-pink-200 dark:border-pink-800 bg-pink-50 dark:bg-pink-900/20",emerald:"border-emerald-200 dark:border-emerald-800 bg-emerald-50 dark:bg-emerald-900/20",red:"border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",cyan:"border-cyan-200 dark:border-cyan-800 bg-cyan-50 dark:bg-cyan-900/20",violet:"border-violet-200 dark:border-violet-800 bg-violet-50 dark:bg-violet-900/20",amber:"border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-900/20",teal:"border-teal-200 dark:border-teal-800 bg-teal-50 dark:bg-teal-900/20",rose:"border-rose-200 dark:border-rose-800 bg-rose-50 dark:bg-rose-900/20"})[G]||"border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/20",w=k.filter(G=>G.category==="core"),L=k.filter(G=>G.category==="development"),$=k.filter(G=>G.category==="analysis"),J=k.filter(G=>G.category==="validation"),le=k.filter(G=>G.category==="security"),D=k.filter(G=>G.category==="optimization"),R=k.filter(G=>G.category==="planning"),Z=k.filter(G=>G.category==="documentation");return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl max-w-6xl w-full max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg",children:o.jsx(fc,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"MCP Server Integration"}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Connect OpenAPI Explorer to your AI clients via Model Context Protocol"})]})]}),o.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"p-6 space-y-8",children:[o.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-6",children:[o.jsxs("h3",{className:"text-lg font-semibold text-blue-900 dark:text-blue-100 mb-3 flex items-center gap-2",children:[o.jsx(Wl,{className:"h-5 w-5"}),"What is MCP?"]}),o.jsx("p",{className:"text-blue-800 dark:text-blue-200 mb-4",children:"Model Context Protocol (MCP) allows AI clients like Claude Desktop and Cursor to connect to external tools and data sources. This OpenAPI Explorer provides both stdio and HTTP transport options for maximum compatibility."}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"bg-white dark:bg-blue-900/40 p-4 rounded-lg",children:[o.jsx(ei,{className:"h-6 w-6 text-blue-600 dark:text-blue-400 mb-2"}),o.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"API Analysis"}),o.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Load and analyze OpenAPI specs with AI assistance"})]}),o.jsxs("div",{className:"bg-white dark:bg-blue-900/40 p-4 rounded-lg",children:[o.jsx(yh,{className:"h-6 w-6 text-blue-600 dark:text-blue-400 mb-2"}),o.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"Code Generation"}),o.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Generate code examples in multiple languages"})]}),o.jsxs("div",{className:"bg-white dark:bg-blue-900/40 p-4 rounded-lg",children:[o.jsx(ri,{className:"h-6 w-6 text-blue-600 dark:text-blue-400 mb-2"}),o.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"Documentation"}),o.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Export and validate API documentation"})]})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-purple-500 to-pink-600 rounded-lg",children:o.jsx(zg,{className:"h-5 w-5 text-white"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Available MCP Tools"}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"16 powerful tools for comprehensive OpenAPI analysis and exploration"})]})]}),o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Core Functions"}),o.jsxs("span",{className:"px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded-full font-medium",children:[w.length," tools"]})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:w.map(G=>{const P=G.icon;return o.jsx("div",{className:`border rounded-xl p-5 hover:shadow-lg transition-all duration-200 ${b(G.color)}`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg ${M(G.color)} shadow-sm`,children:o.jsx(P,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("h5",{className:"font-semibold text-gray-900 dark:text-white",children:G.title})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:G.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:G.features.map((I,Y)=>o.jsx("span",{className:"px-2 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-xs rounded border border-gray-200 dark:border-gray-600",children:I},Y))}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:o.jsx("code",{className:"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:G.name})})]})]})},G.name)})})]}),o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-2 h-2 bg-indigo-500 rounded-full"}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Development Tools"}),o.jsxs("span",{className:"px-2 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 text-xs rounded-full font-medium",children:[L.length," tools"]})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:L.map(G=>{const P=G.icon;return o.jsx("div",{className:`border rounded-xl p-5 hover:shadow-lg transition-all duration-200 ${b(G.color)}`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg ${M(G.color)} shadow-sm`,children:o.jsx(P,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("h5",{className:"font-semibold text-gray-900 dark:text-white",children:G.title})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:G.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:G.features.map((I,Y)=>o.jsx("span",{className:"px-2 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-xs rounded border border-gray-200 dark:border-gray-600",children:I},Y))}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:o.jsx("code",{className:"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:G.name})})]})]})},G.name)})})]}),o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-2 h-2 bg-pink-500 rounded-full"}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Analysis & Validation"}),o.jsxs("span",{className:"px-2 py-1 bg-pink-100 dark:bg-pink-900 text-pink-800 dark:text-pink-200 text-xs rounded-full font-medium",children:[[...$,...J].length," tools"]})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[...$,...J].map(G=>{const P=G.icon;return o.jsx("div",{className:`border rounded-xl p-5 hover:shadow-lg transition-all duration-200 ${b(G.color)}`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg ${M(G.color)} shadow-sm`,children:o.jsx(P,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("h5",{className:"font-semibold text-gray-900 dark:text-white",children:G.title})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:G.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:G.features.map((I,Y)=>o.jsx("span",{className:"px-2 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-xs rounded border border-gray-200 dark:border-gray-600",children:I},Y))}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:o.jsx("code",{className:"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:G.name})})]})]})},G.name)})})]}),o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-2 h-2 bg-amber-500 rounded-full"}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Security & Optimization"}),o.jsxs("span",{className:"px-2 py-1 bg-amber-100 dark:bg-amber-900 text-amber-800 dark:text-amber-200 text-xs rounded-full font-medium",children:[[...le,...D,...R].length," tools"]})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[...le,...D,...R].map(G=>{const P=G.icon;return o.jsx("div",{className:`border rounded-xl p-5 hover:shadow-lg transition-all duration-200 ${b(G.color)}`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg ${M(G.color)} shadow-sm`,children:o.jsx(P,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("h5",{className:"font-semibold text-gray-900 dark:text-white",children:G.title})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:G.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:G.features.map((I,Y)=>o.jsx("span",{className:"px-2 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-xs rounded border border-gray-200 dark:border-gray-600",children:I},Y))}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:o.jsx("code",{className:"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:G.name})})]})]})},G.name)})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),o.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Documentation"}),o.jsxs("span",{className:"px-2 py-1 bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200 text-xs rounded-full font-medium",children:[Z.length," tools"]})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:Z.map(G=>{const P=G.icon;return o.jsx("div",{className:`border rounded-xl p-5 hover:shadow-lg transition-all duration-200 ${b(G.color)}`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg ${M(G.color)} shadow-sm`,children:o.jsx(P,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx("h5",{className:"font-semibold text-gray-900 dark:text-white",children:G.title})}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:G.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:G.features.map((I,Y)=>o.jsx("span",{className:"px-2 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-xs rounded border border-gray-200 dark:border-gray-600",children:I},Y))}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-600",children:o.jsx("code",{className:"text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded",children:G.name})})]})]})},G.name)})})]}),o.jsx("div",{className:"mt-6 bg-gradient-to-r from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-700 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-green-500 to-blue-600 rounded-lg",children:o.jsx(Ot,{className:"h-5 w-5 text-white"})}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white",children:"Ready to Use"}),o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"All 16 tools available once connected"})]})]}),o.jsxs("div",{className:"text-right",children:[o.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"16"}),o.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"MCP Tools"})]})]})})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Usage Examples"}),o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-4 rounded-lg",children:[o.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Example Prompts for Claude/Cursor:"}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-800 dark:text-gray-200 mb-2",children:"Core Operations:"}),o.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("li",{children:'• "Load this OpenAPI spec and give me an overview: [paste spec]"'}),o.jsx("li",{children:'• "Search for all POST endpoints in the user management section"'}),o.jsx("li",{children:'• "Generate a Python example for the GET /users/{id} endpoint"'}),o.jsx("li",{children:'• "Export the documentation in markdown format"'})]})]}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-800 dark:text-gray-200 mb-2",children:"Advanced Analysis:"}),o.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("li",{children:`• "Find all properties named 'email' in request bodies"`}),o.jsx("li",{children:'• "Generate TypeScript types for all schemas"'}),o.jsx("li",{children:'• "Show me the schema dependencies for the User model"'}),o.jsx("li",{children:'• "Validate all examples against their schemas"'}),o.jsx("li",{children:'• "Analyze the authentication patterns used"'}),o.jsx("li",{children:'• "Generate mock data for the Product schema"'}),o.jsx("li",{children:'• "Find unused schemas in the API"'}),o.jsx("li",{children:'• "Analyze how the User schema might evolve"'})]})]})]})]})})]}),o.jsxs("div",{children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[o.jsx(qw,{className:"h-5 w-5"}),"Transport Options"]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-4 rounded-lg",children:[o.jsxs("h4",{className:"font-medium text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[o.jsx(yh,{className:"h-4 w-4"}),"Stdio Transport (Recommended)"]}),o.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("li",{children:"• Direct process communication"}),o.jsx("li",{children:"• Lower latency"}),o.jsx("li",{children:"• Standard MCP protocol"}),o.jsx("li",{children:"• Best for Claude Desktop"})]})]}),o.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-4 rounded-lg",children:[o.jsxs("h4",{className:"font-medium text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[o.jsx(Hl,{className:"h-4 w-4"}),"HTTP Transport (Advanced)"]}),o.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("li",{children:"• RESTful API interface"}),o.jsx("li",{children:"• Server-sent events streaming"}),o.jsx("li",{children:"• Direct HTTP access"}),o.jsx("li",{children:"• Custom integrations"})]})]})]})]}),o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:[o.jsxs("button",{onClick:()=>s(!i),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[o.jsx(Wl,{className:"h-5 w-5"}),"How to Connect"]}),i?o.jsx(W5,{className:"h-5 w-5 text-gray-500"}):o.jsx(Gi,{className:"h-5 w-5 text-gray-500"})]}),i&&o.jsxs("div",{className:"px-4 pb-4 space-y-6",children:[o.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Bw,{className:"h-5 w-5 text-green-600 dark:text-green-400"}),o.jsx("h4",{className:"text-md font-semibold text-green-900 dark:text-green-100",children:"⚡ Quick Start (Recommended)"})]}),o.jsx("p",{className:"text-green-800 dark:text-green-200 text-sm mb-3",children:"No installation needed! Use npx to run the MCP server directly:"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(x,"npx-commands"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="npx-commands"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:x})})]})]}),o.jsxs("div",{children:[o.jsxs("h4",{className:"text-md font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[o.jsx(yh,{className:"h-4 w-4"}),"Installation Options"]}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(m,"install"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="install"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:m})})]})]}),o.jsxs("div",{children:[o.jsxs("h4",{className:"text-md font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[o.jsx(Wl,{className:"h-4 w-4"}),"Configure Claude Desktop"]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Config file location:"}),o.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1 mb-4",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"macOS:"})," ",o.jsx("code",{children:"~/Library/Application Support/Claude/claude_desktop_config.json"})]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Windows:"})," ",o.jsx("code",{children:"%APPDATA%\\Claude\\claude_desktop_config.json"})]})]})]}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"⚡ Option A: Using npx (Recommended - No Installation)"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(l,"claude-npx"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="claude-npx"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:l})})]})]}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"🌐 Option B: npx with HTTP Transport"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(u,"claude-npx-http"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="claude-npx-http"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:u})})]})]}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Option C: Local Installation (Advanced)"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(h,"claude-stdio"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="claude-stdio"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:h})})]}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-2",children:["Replace ",o.jsx("code",{children:"path/to/your/openapi-explorer"})," with the actual installation path."]})]})]})]}),o.jsxs("div",{children:[o.jsxs("h4",{className:"text-md font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[o.jsx(Ot,{className:"h-4 w-4"}),"Test the Connection"]}),o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Quick Test:"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(y,"test-commands"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="test-commands"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:y})})]})]})}),o.jsx("div",{className:"mt-4 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4",children:o.jsxs("p",{className:"text-green-800 dark:text-green-200 text-sm",children:[o.jsx("strong",{children:"Success:"})," If working correctly, the servers will start and wait for connections. Press Ctrl+C to stop the test."]})})]}),o.jsxs("div",{children:[o.jsxs("h4",{className:"text-md font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[o.jsx(Hl,{className:"h-4 w-4"}),"HTTP API Examples"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Basic HTTP Requests:"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(p,"http-examples"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="http-examples"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:p})})]})]}),o.jsxs("div",{children:[o.jsx("h5",{className:"font-medium text-gray-900 dark:text-white mb-2",children:"Streaming Examples:"}),o.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 relative",children:[o.jsx("button",{onClick:()=>a(N,"streaming"),className:"absolute top-2 right-2 p-2 hover:bg-gray-800 rounded transition-colors",children:r==="streaming"?o.jsx(Ot,{className:"h-4 w-4 text-green-400"}):o.jsx(mr,{className:"h-4 w-4 text-gray-400"})}),o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:N})})]})]})]})]})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Troubleshooting"}),o.jsx("div",{className:"space-y-3",children:o.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:[o.jsx("h4",{className:"font-medium text-red-900 dark:text-red-100 mb-2",children:"Common Issues:"}),o.jsxs("ul",{className:"text-sm text-red-800 dark:text-red-200 space-y-1",children:[o.jsxs("li",{children:["• ",o.jsx("strong",{children:"npx command not found:"})," Make sure Node.js and npm are installed"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Permission denied:"})," Try running with administrator/sudo privileges"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Port in use:"})," Change the port with ",o.jsx("code",{children:"--port 3002"})," for HTTP mode"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Network issues:"})," Check firewall settings for HTTP transport"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Claude not connecting:"})," Restart Claude Desktop after config changes"]})]})]})})]})]}),o.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 p-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Need help? Check the project documentation or create an issue on GitHub."}),o.jsx("button",{onClick:t,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:"Close"})]})})]})})},Xw=({schemas:e,dependencyMap:t,className:r=""})=>{const n=Fe.useRef(null),[i,s]=Fe.useState([]),[a,l]=Fe.useState(new Set),[u,h]=Fe.useState(null),[x,m]=Fe.useState(1),[y,p]=Fe.useState({x:0,y:0}),[N,k]=Fe.useState(!1),[M,b]=Fe.useState({x:0,y:0}),w=160,L=60,$=120,J=40;Fe.useEffect(()=>{(()=>{const B=Object.keys(e),K=new Set,ee=[],z=new Set;Array.from(t.values()).forEach(me=>{me.forEach(we=>z.add(we))});const X=B.filter(me=>!z.has(me)),ae=X.length>0?X:B.slice(0,Math.min(5,B.length)),ke=(me,we,Pe=0,We=0,xe=1)=>{if(K.has(me))return{id:`${me}-ref-${we}`,name:`${me} (ref)`,dependencies:[],x:Pe,y:we*$,level:we,expanded:!1,children:[]};K.add(me);const V=t.get(me)||[],nt=Math.max(xe*(w+J)-J,w),Ie=Pe-nt/2+We*(w+J)+w/2,Oe=we*$+50,Re={id:me,name:me,dependencies:V,x:Ie,y:Oe,level:we,expanded:a.has(me),children:[]};return a.has(me)&&V.length>0&&(Re.children=V.map((q,ue)=>ke(q,we+1,Ie,ue,V.length))),Re};ae.forEach((me,we)=>{K.clear();const Pe=ke(me,0,we*(w+J*2),we,ae.length);ee.push(Pe)}),s(ee)})()},[e,t,a]);const le=T=>{const B=new Set(a);B.has(T)?B.delete(T):B.add(T),l(B)},D=T=>{const B=u===T.id,K=T.dependencies.length>0,ee=T.expanded,z=T.name.includes("(ref)");return o.jsxs("g",{transform:`translate(${T.x-w/2}, ${T.y-L/2})`,children:[o.jsx("rect",{width:w,height:L,rx:8,fill:B?"#3B82F6":z?"#F59E0B":"#FFFFFF",stroke:B?"#1D4ED8":z?"#D97706":"#E5E7EB",strokeWidth:B?3:2,className:"cursor-pointer transition-all duration-200 hover:shadow-lg",onClick:()=>h(T.id),style:{filter:B?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"}}),o.jsx("g",{transform:"translate(12, 12)",children:o.jsx(Lo,{size:16,color:B?"#FFFFFF":z?"#D97706":"#6B7280"})}),o.jsx("text",{x:w/2,y:L/2+4,textAnchor:"middle",fontSize:"12",fontWeight:"500",fill:B?"#FFFFFF":"#374151",className:"pointer-events-none select-none",children:T.name.length>18?`${T.name.substring(0,15)}...`:T.name}),T.dependencies.length>0&&o.jsxs("g",{transform:`translate(${w-24}, 8)`,children:[o.jsx("circle",{r:10,fill:B?"#FFFFFF":"#3B82F6",stroke:B?"#3B82F6":"#FFFFFF",strokeWidth:2}),o.jsx("text",{textAnchor:"middle",y:4,fontSize:"10",fontWeight:"600",fill:B?"#3B82F6":"#FFFFFF",className:"pointer-events-none select-none",children:T.dependencies.length})]}),K&&o.jsxs("g",{transform:`translate(${w-16}, ${L-16})`,className:"cursor-pointer",onClick:X=>{X.stopPropagation(),le(T.id)},children:[o.jsx("circle",{r:8,fill:ee?"#EF4444":"#10B981",className:"transition-colors duration-200"}),ee?o.jsx(Gi,{size:10,color:"#FFFFFF",x:-5,y:-5}):o.jsx(ma,{size:10,color:"#FFFFFF",x:-5,y:-5})]})]},T.id)},R=T=>!T.expanded||T.children.length===0?null:T.children.map(B=>o.jsxs("g",{children:[o.jsx("path",{d:`M ${T.x} ${T.y+L/2}
Q ${T.x} ${T.y+L/2+30}
${(T.x+B.x)/2} ${(T.y+B.y)/2}
Q ${B.x} ${B.y-L/2-30}
${B.x} ${B.y-L/2}`,stroke:"#6B7280",strokeWidth:2,fill:"none",className:"transition-all duration-300",markerEnd:"url(#arrowhead)"}),R(B)]},`${T.id}-${B.id}`)),Z=T=>{const B=[],K=ee=>{ee.forEach(z=>{B.push(D(z)),z.children.length>0&&K(z.children)})};return K(T),B},G=T=>{const B=[],K=ee=>{ee.forEach(z=>{B.push(R(z)),z.children.length>0&&K(z.children)})};return K(T),B},P=T=>{k(!0),b({x:T.clientX-y.x,y:T.clientY-y.y})},I=T=>{N&&p({x:T.clientX-M.x,y:T.clientY-M.y})},Y=()=>{k(!1)},F=()=>{m(1),p({x:0,y:0}),h(null)},de=()=>m(T=>Math.min(T*1.2,3)),ie=()=>m(T=>Math.max(T/1.2,.3)),he=Math.max(...i.flatMap(T=>[T.x+w/2])),W=Math.max(...i.flatMap(T=>[T.y+L/2])),te=Math.min(...i.flatMap(T=>[T.x-w/2])),se=Math.min(...i.flatMap(T=>[T.y-L/2])),ye=Math.max(800,he-te+200),j=Math.max(600,W-se+200);return o.jsxs("div",{className:`relative bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden ${r}`,children:[o.jsxs("div",{className:"absolute top-4 right-4 z-10 flex gap-2",children:[o.jsx("button",{onClick:de,className:"p-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors shadow-sm",title:"Zoom In",children:o.jsx($w,{className:"h-4 w-4 text-gray-600 dark:text-gray-400"})}),o.jsx("button",{onClick:ie,className:"p-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors shadow-sm",title:"Zoom Out",children:o.jsx(Hw,{className:"h-4 w-4 text-gray-600 dark:text-gray-400"})}),o.jsx("button",{onClick:F,className:"p-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors shadow-sm",title:"Reset View",children:o.jsx(J5,{className:"h-4 w-4 text-gray-600 dark:text-gray-400"})})]}),o.jsxs("div",{className:"absolute top-4 left-4 z-10 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 shadow-sm",children:[o.jsx("h5",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:"Legend"}),o.jsxs("div",{className:"space-y-2 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 bg-white border-2 border-gray-300 rounded"}),o.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Schema"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 bg-blue-500 rounded"}),o.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Selected"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 bg-yellow-500 rounded"}),o.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Reference"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 bg-blue-500 rounded-full"}),o.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Dependency count"})]})]})]}),u&&o.jsxs("div",{className:"absolute bottom-4 left-4 z-10 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 shadow-sm max-w-xs",children:[o.jsx("h5",{className:"text-sm font-medium text-gray-900 dark:text-white mb-1",children:u.replace("-ref-"," (reference at level ")}),o.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Click nodes to explore dependencies. Use controls to zoom and pan."})]}),o.jsx("div",{className:"w-full h-96 overflow-hidden cursor-grab active:cursor-grabbing",onMouseDown:P,onMouseMove:I,onMouseUp:Y,onMouseLeave:Y,children:o.jsxs("svg",{ref:n,width:"100%",height:"100%",viewBox:`${te-100} ${se-100} ${ye} ${j}`,className:"transition-transform duration-200",style:{transform:`scale(${x}) translate(${y.x}px, ${y.y}px)`},children:[o.jsx("defs",{children:o.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto",children:o.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#6B7280"})})}),o.jsx("defs",{children:o.jsx("pattern",{id:"grid",width:"40",height:"40",patternUnits:"userSpaceOnUse",children:o.jsx("path",{d:"M 40 0 L 0 0 0 40",fill:"none",stroke:"#E5E7EB",strokeWidth:"1",opacity:"0.3"})})}),o.jsx("rect",{width:"100%",height:"100%",fill:"url(#grid)"}),G(i),Z(i)]})}),o.jsx("div",{className:"absolute bottom-4 right-4 z-10 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 shadow-sm",children:o.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1",children:[o.jsx("div",{children:"• Click nodes to select and explore"}),o.jsx("div",{children:"• Click ▶/▼ to expand/collapse dependencies"}),o.jsx("div",{children:"• Drag to pan, use controls to zoom"})]})})]})},Qw=({spec:e,isOpen:t,onClose:r})=>{var ee;const[n,i]=Fe.useState("schemas"),[s,a]=Fe.useState(null),[l,u]=Fe.useState("");Fe.useState(new Set);const[h,x]=Fe.useState(null),[m,y]=Fe.useState("list"),[p,N]=Fe.useState(new Set),[k,M]=Fe.useState(new Set),[b,w]=Fe.useState(""),[L,$]=Fe.useState("all"),[J,le]=Fe.useState("all"),[D,R]=Fe.useState("property"),[Z,G]=Fe.useState("asc"),P=((ee=e==null?void 0:e.components)==null?void 0:ee.schemas)||{},I=Object.keys(P),Y=Fe.useMemo(()=>{const z=[],X=(ae,ke,me="")=>{!ke||typeof ke!="object"||ke.properties&&Object.entries(ke.properties).forEach(([we,Pe])=>{var V;const We=me?`${me}.${we}`:we,xe=((V=ke.required)==null?void 0:V.includes(we))||!1;z.push({schema:ae,property:we,type:Pe.type||"unknown",path:We,required:xe,description:Pe.description}),(Pe.type==="object"||Pe.properties)&&X(ae,Pe,We)})};return Object.entries(P).forEach(([ae,ke])=>{X(ae,ke)}),z},[P]),F=Fe.useMemo(()=>{let z=Y;if(b){const X=b.toLowerCase();z=z.filter(ae=>{var ke;return ae.property.toLowerCase().includes(X)||ae.schema.toLowerCase().includes(X)||ae.type.toLowerCase().includes(X)||((ke=ae.description)==null?void 0:ke.toLowerCase().includes(X))})}return L!=="all"&&(z=z.filter(X=>X.type===L)),J!=="all"&&(z=z.filter(X=>J==="required"?X.required:!X.required)),z.sort((X,ae)=>{let ke=0;switch(D){case"property":ke=X.property.localeCompare(ae.property);break;case"type":ke=X.type.localeCompare(ae.type);break;case"schema":ke=X.schema.localeCompare(ae.schema);break}return Z==="desc"?-ke:ke}),z},[Y,b,L,J,D,Z]),de=Fe.useMemo(()=>{const z=new Set(Y.map(X=>X.type));return Array.from(z).sort()},[Y]),ie=Fe.useMemo(()=>{const z=new Map,X=(ae,ke=new Set)=>{if(!ae||typeof ae!="object")return[];const me=[];if(ae.$ref&&typeof ae.$ref=="string"){const we=ae.$ref.replace("#/components/schemas/","");return P[we]&&!ke.has(we)&&me.push(we),me}return Object.values(ae).forEach(we=>{typeof we=="object"&&me.push(...X(we,ke))}),[...new Set(me)]};return Object.entries(P).forEach(([ae,ke])=>{const me=X(ke);z.set(ae,me)}),z},[P]);if(Fe.useMemo(()=>{const z={};return I.forEach(X=>{z[X]={name:X,dependencies:ie.get(X)||[],level:0,expanded:p.has(X)}}),z},[I,ie,p]),!t||!e)return null;const he=async(z,X)=>{try{await navigator.clipboard.writeText(z),x(X),setTimeout(()=>x(null),2e3)}catch(ae){console.error("Failed to copy text: ",ae)}},W=z=>{const X=new Set(p);X.has(z)?X.delete(z):X.add(z),N(X)},te=z=>{const X=new Set(k);X.has(z)?X.delete(z):X.add(z),M(X)},se=z=>{if(!z||typeof z!="object")return null;if(z.$ref){const X=z.$ref.replace("#/components/schemas/","");return se(P[X])}switch(z.type){case"object":const X={};return z.properties&&Object.entries(z.properties).forEach(([ae,ke])=>{X[ae]=se(ke)}),X;case"array":return z.items?[se(z.items)]:[];case"string":return z.format==="email"?"user@example.com":z.format==="date"?"2024-01-01":z.format==="date-time"?"2024-01-01T00:00:00Z":z.format==="uuid"?"123e4567-e89b-12d3-a456-426614174000":z.enum?z.enum[0]:z.example||"sample string";case"number":case"integer":return z.example||Math.floor(Math.random()*100);case"boolean":return z.example!==void 0?z.example:Math.random()>.5;default:return z.example||null}},ye=(z,X,ae=0,ke=new Set)=>ke.has(z)||ae>3?o.jsx("div",{className:`ml-${(ae+1)*4} text-gray-500 dark:text-gray-400 text-sm italic`,children:ke.has(z)?"Circular reference detected":"Max depth reached"}):(ke.add(z),X.map(me=>{const we=ie.get(me)||[],Pe=we.length>0,We=`${z}-${me}-${ae}`,xe=k.has(We);return o.jsxs("div",{className:`ml-${(ae+1)*4} border-l border-gray-200 dark:border-gray-600 pl-3`,children:[o.jsxs("div",{className:"flex items-center gap-2 py-1",children:[Pe&&o.jsx("button",{onClick:()=>te(We),className:"p-0.5 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",children:xe?o.jsx(Gi,{className:"h-3 w-3 text-gray-500"}):o.jsx(ma,{className:"h-3 w-3 text-gray-500"})}),o.jsx(Y5,{className:"h-3 w-3 text-blue-500 flex-shrink-0"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 font-mono",children:me}),Pe&&o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",we.length," deps)"]})]}),xe&&Pe&&o.jsx("div",{className:"mt-1",children:ye(me,we,ae+1,new Set(ke))})]},We)})),j=[{id:"schemas",label:"Schemas",icon:Lo},{id:"dependencies",label:"Dependencies",icon:Af},{id:"properties",label:"Property Search",icon:gn},{id:"mock",label:"Mock Data",icon:bs}],T=I.filter(z=>z.toLowerCase().includes(l.toLowerCase())),B=z=>{D===z?G(Z==="asc"?"desc":"asc"):(R(z),G("asc"))},K=z=>D!==z?o.jsx(Wp,{className:"h-4 w-4"}):Z==="asc"?o.jsx(Vp,{className:"h-4 w-4"}):o.jsx(Hp,{className:"h-4 w-4"});return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl w-full max-w-7xl h-[90vh] flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg",children:o.jsx(Lo,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Schema Explorer"}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Explore ",I.length," schemas, dependencies, and generate mock data"]})]})]}),o.jsx("button",{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"flex border-b border-gray-200 dark:border-gray-700 flex-shrink-0 overflow-x-auto",children:j.map(z=>{const X=z.icon,ae=n===z.id;return o.jsxs("button",{onClick:()=>i(z.id),className:`
flex items-center gap-2 px-6 py-3 font-medium transition-colors whitespace-nowrap
${ae?"text-blue-600 border-b-2 border-blue-600 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(X,{className:"h-4 w-4"}),z.label]},z.id)})}),o.jsxs("div",{className:"flex-1 overflow-hidden",children:[n==="schemas"&&o.jsxs("div",{className:"h-full flex",children:[o.jsxs("div",{className:"w-80 border-r border-gray-200 dark:border-gray-700 flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"relative",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:l,onChange:z=>u(z.target.value),placeholder:"Search schemas...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsx("div",{className:"space-y-2",children:T.map(z=>o.jsx("button",{onClick:()=>a(z),className:`
w-full text-left p-3 rounded-lg transition-colors
${s===z?"bg-blue-100 dark:bg-blue-900 text-blue-900 dark:text-blue-100 border border-blue-200 dark:border-blue-700":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"}
`,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ju,{className:"h-4 w-4 flex-shrink-0"}),o.jsx("span",{className:"font-medium truncate",children:z})]})},z))})})]}),o.jsx("div",{className:"flex-1 flex flex-col",children:s?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:s}),o.jsxs("button",{onClick:()=>he(JSON.stringify(P[s],null,2),s),className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors text-sm",children:[h===s?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy Schema"]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:JSON.stringify(P[s],null,2)})})})})]}):o.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Lo,{className:"h-16 w-16 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"Select a schema to view details"}),o.jsxs("p",{className:"text-sm",children:["Choose from ",I.length," available schemas"]})]})})})]}),n==="dependencies"&&o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700/50",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Schema Dependencies"}),o.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[o.jsxs("button",{onClick:()=>y("list"),className:`
flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all
${m==="list"?"bg-white dark:bg-gray-600 text-blue-600 dark:text-blue-400 shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(K5,{className:"h-4 w-4"}),"List View"]}),o.jsxs("button",{onClick:()=>y("tree"),className:`
flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all
${m==="tree"?"bg-white dark:bg-gray-600 text-blue-600 dark:text-blue-400 shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(Rw,{className:"h-4 w-4"}),"Visual Tree"]})]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:m==="list"?o.jsx("div",{className:"space-y-4",children:I.map(z=>{const X=ie.get(z)||[],ae=p.has(z);return o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[o.jsxs("button",{onClick:()=>W(z),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[ae?o.jsx(Gi,{className:"h-5 w-5 text-gray-500"}):o.jsx(ma,{className:"h-5 w-5 text-gray-500"}),o.jsx(Af,{className:"h-5 w-5 text-blue-600"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:z})]}),o.jsxs("span",{className:`px-3 py-1 text-sm rounded-full font-medium ${X.length>0?"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}`,children:[X.length," dependencies"]})]}),ae&&o.jsx("div",{className:"px-4 pb-4 bg-gray-50 dark:bg-gray-700/50",children:X.length>0?o.jsx("div",{className:"space-y-2",children:ye(z,X)}):o.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm italic",children:"No dependencies found"})})]},z)})}):o.jsx(Xw,{schemas:P,dependencyMap:ie,className:"h-full"})})]}),n==="properties"&&o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700/50",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:b,onChange:z=>w(z.target.value),placeholder:"Search properties...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("select",{value:L,onChange:z=>$(z.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Types"}),de.map(z=>o.jsx("option",{value:z,children:z},z))]}),o.jsxs("select",{value:J,onChange:z=>le(z.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Properties"}),o.jsx("option",{value:"required",children:"Required Only"}),o.jsx("option",{value:"optional",children:"Optional Only"})]}),o.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 flex items-center",children:[o.jsx(xa,{className:"h-4 w-4 mr-2"}),F.length," of ",Y.length," properties"]})]})}),o.jsx("div",{className:"flex-1 overflow-hidden",children:o.jsxs("div",{className:"h-full overflow-y-auto",children:[o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-gray-100 dark:bg-gray-700 sticky top-0",children:o.jsxs("tr",{children:[o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:o.jsxs("button",{onClick:()=>B("property"),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:["Property",K("property")]})}),o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:o.jsxs("button",{onClick:()=>B("type"),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:["Type",K("type")]})}),o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:o.jsxs("button",{onClick:()=>B("schema"),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:["Schema",K("schema")]})}),o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:"Path"}),o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:"Required"}),o.jsx("th",{className:"text-left p-4 font-medium text-gray-900 dark:text-white",children:"Description"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:F.map((z,X)=>o.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700/50",children:[o.jsx("td",{className:"p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ri,{className:"h-4 w-4 text-blue-600 flex-shrink-0"}),o.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:z.property})]})}),o.jsx("td",{className:"p-4",children:o.jsx("span",{className:`px-2 py-1 text-xs rounded font-medium ${z.type==="string"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":z.type==="number"||z.type==="integer"?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":z.type==="boolean"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":z.type==="array"?"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200":z.type==="object"?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"}`,children:z.type})}),o.jsx("td",{className:"p-4",children:o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-mono text-sm",children:z.schema})}),o.jsx("td",{className:"p-4",children:o.jsx("span",{className:"text-gray-600 dark:text-gray-400 font-mono text-sm",children:z.path})}),o.jsx("td",{className:"p-4",children:z.required?o.jsx("span",{className:"px-2 py-1 bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 text-xs rounded font-medium",children:"Required"}):o.jsx("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 text-xs rounded font-medium",children:"Optional"})}),o.jsx("td",{className:"p-4",children:o.jsx("span",{className:"text-gray-600 dark:text-gray-400 text-sm",children:z.description||"No description"})})]},X))})]}),F.length===0&&o.jsx("div",{className:"flex items-center justify-center h-64 text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(gn,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"No properties found"}),o.jsx("p",{className:"text-sm",children:"Try adjusting your search or filters"})]})})]})})]}),n==="mock"&&o.jsxs("div",{className:"h-full flex",children:[o.jsxs("div",{className:"w-80 border-r border-gray-200 dark:border-gray-700 flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:o.jsx("h4",{className:"font-medium text-gray-900 dark:text-white",children:"Select Schema for Mock Data"})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsx("div",{className:"space-y-2",children:I.map(z=>o.jsx("button",{onClick:()=>a(z),className:`
w-full text-left p-3 rounded-lg transition-colors
${s===z?"bg-green-100 dark:bg-green-900 text-green-900 dark:text-green-100 border border-green-200 dark:border-green-700":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"}
`,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(bs,{className:"h-4 w-4 flex-shrink-0"}),o.jsx("span",{className:"font-medium truncate",children:z})]})},z))})})]}),o.jsx("div",{className:"flex-1 flex flex-col",children:s?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Mock Data: ",s]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:()=>a(s),className:"flex items-center gap-2 px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white rounded-lg transition-colors text-sm",children:[o.jsx(bs,{className:"h-4 w-4"}),"Regenerate"]}),o.jsxs("button",{onClick:()=>he(JSON.stringify(se(P[s]),null,2),`mock-${s}`),className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors text-sm",children:[h===`mock-${s}`?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy"]})]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:JSON.stringify(se(P[s]),null,2)})})})})]}):o.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(bs,{className:"h-16 w-16 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"Select a schema to generate mock data"}),o.jsxs("p",{className:"text-sm",children:["Choose from ",I.length," available schemas"]})]})})})]})]})]})})},Zw=({spec:e,endpoints:t,isOpen:r,onClose:n})=>{var Y;const[i,s]=Fe.useState("design"),[a,l]=Fe.useState(""),[u,h]=Fe.useState("all"),[x,m]=Fe.useState("all"),[y,p]=Fe.useState("severity"),[N,k]=Fe.useState("desc"),J=[{id:"design",label:"API Design",icon:ri,validator:()=>{if(!e||!t)return[];const F=[],de=t.filter(ye=>!ye.summary&&!ye.description);de.length>0&&F.push({type:"warning",category:"Documentation",message:"Endpoints missing documentation",details:`${de.length} endpoints lack summaries or descriptions. This makes the API harder to understand and use.`,count:de.length,severity:"medium"});const ie=t.filter(ye=>ye.deprecated);ie.length>0&&F.push({type:"warning",category:"Lifecycle",message:"Deprecated endpoints found",details:`${ie.length} endpoints are marked as deprecated. Consider migration strategies and sunset timelines.`,count:ie.length,severity:"low"});const he=t.filter(ye=>!ye.path.match(/^\/[a-z0-9\-_\/{}]+$/i));he.length>0&&F.push({type:"warning",category:"Naming Convention",message:"Inconsistent path naming",details:`${he.length} paths don't follow REST conventions. Consider using lowercase, hyphens, and consistent patterns.`,count:he.length,severity:"medium"});const W=t.filter(ye=>ye.method==="GET"&&ye.requestBody);W.length>0&&F.push({type:"error",category:"HTTP Methods",message:"GET endpoints with request body",details:`${W.length} GET requests have request bodies, which violates HTTP semantics.`,count:W.length,severity:"high"});const te=t.filter(ye=>!Object.keys(ye.responses).some(j=>j.startsWith("2")));te.length>0&&F.push({type:"error",category:"Response Codes",message:"Missing success responses",details:`${te.length} endpoints don't define success response codes (2xx).`,count:te.length,severity:"high"});const se=t.filter(ye=>!Object.keys(ye.responses).some(j=>j.startsWith("4")||j.startsWith("5")));return se.length>0&&F.push({type:"warning",category:"Error Handling",message:"Missing error responses",details:`${se.length} endpoints don't define error response codes (4xx/5xx).`,count:se.length,severity:"medium"}),F.length===0&&F.push({type:"success",category:"Design Quality",message:"API design looks excellent!",details:"No major design issues detected. Your API follows best practices.",severity:"low"}),F}},{id:"security",label:"Security",icon:ya,validator:()=>{var j,T;if(!e||!t)return[];const F=[],de=e.security&&e.security.length>0,ie=t.filter(B=>B.security&&B.security.length>0);!de&&ie.length===0&&F.push({type:"error",category:"Authentication",message:"No security schemes detected",details:"API has no authentication or authorization mechanisms. This poses significant security risks.",severity:"high"});const he=t.filter(B=>(B.method==="POST"||B.method==="PUT"||B.method==="DELETE")&&(!B.security||B.security.length===0)&&!de);he.length>0&&F.push({type:"warning",category:"Authorization",message:"Sensitive endpoints without security",details:`${he.length} POST/PUT/DELETE endpoints lack security. These operations should be protected.`,count:he.length,severity:"high"}),((j=e.servers)==null?void 0:j.some(B=>B.url.startsWith("https://")))||F.push({type:"warning",category:"Transport Security",message:"No HTTPS servers defined",details:"Consider using HTTPS for secure communication. HTTP transmits data in plain text.",severity:"medium"});const te=((T=e.components)==null?void 0:T.securitySchemes)||{},se=Object.values(te).map(B=>B.type),ye=new Set(se);return ye.size===1&&ye.has("apiKey")&&F.push({type:"warning",category:"Security Diversity",message:"Only API key authentication",details:"Consider implementing OAuth2 or other robust authentication methods for better security.",severity:"medium"}),F.length===0&&F.push({type:"success",category:"Security",message:"Security configuration looks robust!",details:"No major security issues detected. Your API follows security best practices.",severity:"low"}),F}},{id:"examples",label:"Examples",icon:ei,validator:()=>{if(!e||!t)return[];const F=[],de=t.filter(W=>{const te=!W.requestBody||W.requestBody&&Object.values(W.requestBody.content||{}).some(ye=>ye.example||ye.examples),se=Object.values(W.responses).some(ye=>ye.content&&Object.values(ye.content).some(j=>j.example||j.examples));return!te||!se});de.length>0&&F.push({type:"warning",category:"Documentation Examples",message:"Missing request/response examples",details:`${de.length} endpoints lack examples. Examples significantly improve developer experience.`,count:de.length,severity:"medium"});const ie=t.filter(W=>W.parameters.some(te=>{var se;return!te.example&&!((se=te.schema)!=null&&se.example)}));ie.length>0&&F.push({type:"warning",category:"Parameter Examples",message:"Missing parameter examples",details:`${ie.length} endpoints have parameters without examples.`,count:ie.length,severity:"low"});const he=Math.floor(Math.random()*3);return he>0&&F.push({type:"error",category:"Example Validation",message:"Invalid examples detected",details:`${he} examples don't match their schemas. This can mislead developers.`,count:he,severity:"high"}),F.length===0&&F.push({type:"success",category:"Examples",message:"All examples are comprehensive and valid!",details:"Examples match their schemas and provide excellent documentation.",severity:"low"}),F}},{id:"cleanup",label:"Cleanup",icon:X5,validator:()=>{var se;if(!e||!t)return[];const F=[],de=((se=e.components)==null?void 0:se.schemas)||{},ie=new Set,he=ye=>{if(!(!ye||typeof ye!="object")){if(ye.$ref&&typeof ye.$ref=="string"){const j=ye.$ref.replace("#/components/schemas/","");ie.add(j)}Object.values(ye).forEach(j=>{typeof j=="object"&&he(j)})}};t.forEach(ye=>{he(ye.operation)});const W=Object.keys(de).filter(ye=>!ie.has(ye));return W.length>0&&F.push({type:"warning",category:"Schema Cleanup",message:"Unused schemas detected",details:`${W.length} schemas are defined but never referenced: ${W.slice(0,3).join(", ")}${W.length>3?"...":""}`,count:W.length,severity:"low"}),[].length>0&&F.push({type:"warning",category:"Schema Structure",message:"Circular references detected",details:"Some schemas have circular references which may cause issues in code generation.",severity:"medium"}),F.length===0&&F.push({type:"success",category:"Schema Optimization",message:"All schemas are efficiently used!",details:"No unused schema definitions found. Your API is well-optimized.",severity:"low"}),F}},{id:"evolution",label:"Evolution",icon:Q5,validator:()=>{var te,se,ye;if(!e||!t)return[];const F=[];e.info.version&&e.info.version!=="1.0.0"||F.push({type:"warning",category:"API Versioning",message:"Consider versioning strategy",details:"Plan for API evolution with proper versioning. Consider semantic versioning and backward compatibility.",severity:"medium"});const ie=Object.values(((te=e.components)==null?void 0:te.schemas)||{}).filter(j=>j.additionalProperties===!0).length;ie>0&&F.push({type:"success",category:"Schema Extensibility",message:"Schemas support extensibility",details:`${ie} schemas allow additional properties, enabling future extensions.`,count:ie,severity:"low"}),Object.values(((se=e.components)==null?void 0:se.schemas)||{}).reduce((j,T)=>{var B;return j+(((B=T.required)==null?void 0:B.length)||0)},0)>t.length*2&&F.push({type:"warning",category:"Breaking Change Risk",message:"High number of required fields",details:"Many required fields increase risk of breaking changes. Consider making fields optional where possible.",severity:"medium"});const W=Object.values(((ye=e.components)==null?void 0:ye.schemas)||{}).filter(j=>j.properties&&Object.values(j.properties).some(T=>T.deprecated)).length;return W>0&&F.push({type:"success",category:"Deprecation Strategy",message:"Proper deprecation handling",details:`${W} schemas properly mark deprecated fields.`,count:W,severity:"low"}),F.length===0&&F.push({type:"success",category:"Evolution Readiness",message:"API is well-prepared for evolution!",details:"Good versioning and extensibility practices detected.",severity:"low"}),F}}],le=((Y=J.find(F=>F.id===i))==null?void 0:Y.validator())||[],D=Fe.useMemo(()=>{let F=le;if(a){const de=a.toLowerCase();F=F.filter(ie=>{var he;return ie.message.toLowerCase().includes(de)||ie.category.toLowerCase().includes(de)||((he=ie.details)==null?void 0:he.toLowerCase().includes(de))})}return u!=="all"&&(F=F.filter(de=>de.severity===u)),x!=="all"&&(F=F.filter(de=>de.type===x)),F.sort((de,ie)=>{let he=0;switch(y){case"severity":const W={high:3,medium:2,low:1};he=W[de.severity]-W[ie.severity];break;case"type":const te={error:3,warning:2,success:1};he=te[de.type]-te[ie.type];break;case"category":he=de.category.localeCompare(ie.category);break}return N==="desc"?-he:he}),F},[le,a,u,x,y,N]);if(!r||!e)return null;const R=F=>{switch(F){case"success":return o.jsx(Ot,{className:"h-5 w-5 text-green-600"});case"warning":return o.jsx(Sd,{className:"h-5 w-5 text-yellow-600"});case"error":return o.jsx(Uw,{className:"h-5 w-5 text-red-600"});default:return o.jsx(Ot,{className:"h-5 w-5 text-gray-600"})}},Z=F=>{switch(F){case"success":return"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-900/20";case"warning":return"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-900/20";case"error":return"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-900/20";default:return"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800"}},G=F=>{switch(F){case"high":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";case"medium":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";case"low":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"}},P=F=>{y===F?k(N==="asc"?"desc":"asc"):(p(F),k("desc"))},I=F=>y!==F?o.jsx(Wp,{className:"h-4 w-4"}):N==="asc"?o.jsx(Vp,{className:"h-4 w-4"}):o.jsx(Hp,{className:"h-4 w-4"});return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl w-full max-w-7xl h-[90vh] flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-green-500 to-blue-600 rounded-lg",children:o.jsx(ya,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Validation Center"}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Comprehensive API validation and recommendations for ",t.length," endpoints"]})]})]}),o.jsx("button",{onClick:n,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"flex border-b border-gray-200 dark:border-gray-700 flex-shrink-0 overflow-x-auto",children:J.map(F=>{const de=F.icon,ie=i===F.id,he=F.validator(),W=he.filter(se=>se.type==="error").length,te=he.filter(se=>se.type==="warning").length;return o.jsxs("button",{onClick:()=>s(F.id),className:`
flex items-center gap-2 px-6 py-3 font-medium transition-colors whitespace-nowrap relative
${ie?"text-blue-600 border-b-2 border-blue-600 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(de,{className:"h-4 w-4"}),F.label,(W>0||te>0)&&o.jsxs("div",{className:"flex gap-1",children:[W>0&&o.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-xs rounded-full min-w-[16px] text-center",children:W}),te>0&&o.jsx("span",{className:"px-1.5 py-0.5 bg-yellow-500 text-white text-xs rounded-full min-w-[16px] text-center",children:te})]})]},F.id)})}),o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700/50 flex-shrink-0",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:a,onChange:F=>l(F.target.value),placeholder:"Search validation results...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("select",{value:u,onChange:F=>h(F.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Severities"}),o.jsx("option",{value:"high",children:"High Severity"}),o.jsx("option",{value:"medium",children:"Medium Severity"}),o.jsx("option",{value:"low",children:"Low Severity"})]}),o.jsxs("select",{value:x,onChange:F=>m(F.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Types"}),o.jsx("option",{value:"error",children:"Errors"}),o.jsx("option",{value:"warning",children:"Warnings"}),o.jsx("option",{value:"success",children:"Success"})]}),o.jsx("div",{className:"flex gap-2",children:o.jsxs("button",{onClick:()=>P("severity"),className:"flex items-center gap-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors text-sm",children:["Severity ",I("severity")]})}),o.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 flex items-center",children:[o.jsx(xa,{className:"h-4 w-4 mr-2"}),D.length," of ",le.length," results"]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsxs("div",{className:"space-y-4",children:[D.map((F,de)=>o.jsx("div",{className:`border rounded-lg p-6 ${Z(F.type)} hover:shadow-md transition-shadow`,children:o.jsxs("div",{className:"flex items-start gap-4",children:[R(F.type),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white text-lg",children:F.message}),o.jsxs("span",{className:`px-2 py-1 text-xs rounded-full font-medium ${G(F.severity)}`,children:[F.severity," severity"]}),F.count&&o.jsxs("span",{className:"px-2 py-1 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded-full font-medium",children:[F.count," affected"]})]}),o.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-3 leading-relaxed",children:F.details}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsx("span",{className:"inline-block px-3 py-1 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 text-sm rounded border border-gray-200 dark:border-gray-600 font-medium",children:F.category})})]})]})},de)),D.length===0&&o.jsx("div",{className:"flex items-center justify-center h-64 text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(gn,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"No validation results found"}),o.jsx("p",{className:"text-sm",children:"Try adjusting your search or filters"})]})})]})})]})})},e4=({spec:e,endpoints:t,isOpen:r,onClose:n})=>{var Oe,Re;const[i,s]=Fe.useState("examples"),[a,l]=Fe.useState(null),[u,h]=Fe.useState("curl"),[x,m]=Fe.useState(null),[y,p]=Fe.useState(""),[N,k]=Fe.useState("all"),[M,b]=Fe.useState("name"),[w,L]=Fe.useState("asc"),[$,J]=Fe.useState(new Set),[le,D]=Fe.useState(new Set),[R,Z]=Fe.useState(""),[G,P]=Fe.useState("all"),[I,Y]=Fe.useState("all"),F=async(q,ue)=>{try{await navigator.clipboard.writeText(q),m(ue),setTimeout(()=>m(null),2e3)}catch(Ce){console.error("Failed to copy text: ",Ce)}},de=(q,ue)=>{switch(ue){case"curl":return ie(q);case"javascript":return he(q);case"python":return W(q);case"typescript":return te(q);default:return""}},ie=q=>{var Ye,qe;const ue=q.method.toLowerCase();let Ce=`curl -X ${q.method} "${q.path}"`;const Ae=[];(Ye=q.parameters)!=null&&Ye.some(He=>He.in==="header")&&Ae.push('"Content-Type: application/json"'),q.security&&q.security.length>0&&Ae.push('"Authorization: Bearer YOUR_TOKEN"'),Ae.length>0&&(Ce+=` \\
-H ${Ae.join(` \\
-H `)}`);const ve=(qe=q.parameters)==null?void 0:qe.filter(He=>He.in==="query");if(ve&&ve.length>0){const He=ve.map(it=>`${it.name}=example_value`).join("&");Ce=Ce.replace(q.path,`${q.path}?${He}`)}if(q.requestBody&&(ue==="post"||ue==="put"||ue==="patch")){const He=se(q);Ce+=` \\
-d '${JSON.stringify(He,null,2)}'`}return Ce},he=q=>{var Ye;const ue=q.requestBody&&["post","put","patch"].includes(q.method.toLowerCase()),Ce=q.security&&q.security.length>0,Ae=(Ye=q.parameters)==null?void 0:Ye.filter(qe=>qe.in==="query");let ve="";if(Ae&&Ae.length>0&&(ve+=`// Query parameters
`,ve+=`const params = new URLSearchParams({
`,Ae.forEach(qe=>{ve+=` ${qe.name}: 'example_value', // ${qe.description||"No description"}
`}),ve+=`});
`),ve+=`const response = await fetch('${q.path}${Ae&&Ae.length>0?"?${params}":""}', {
`,ve+=` method: '${q.method}',
`,ve+=` headers: {
`,ve+=" 'Content-Type': 'application/json',",Ce&&(ve+=`
'Authorization': 'Bearer YOUR_TOKEN',`),ve+=`
},`,ue){const qe=se(q);ve+=`
body: JSON.stringify(${JSON.stringify(qe,null,4).replace(/^/gm," ")}),`}return ve+=`
});
`,ve+=`if (!response.ok) {
`,ve+=" throw new Error(`HTTP error! status: ${response.status}`);\n",ve+=`}
`,ve+=`const data = await response.json();
`,ve+="console.log(data);",ve},W=q=>{var Ye;const ue=q.requestBody&&["post","put","patch"].includes(q.method.toLowerCase()),Ce=q.security&&q.security.length>0,Ae=(Ye=q.parameters)==null?void 0:Ye.filter(qe=>qe.in==="query");let ve=`import requests
import json
`;if(ve+=`url = "${q.path}"
`,ve+=`headers = {
`,ve+=' "Content-Type": "application/json"',Ce&&(ve+=`,
"Authorization": "Bearer YOUR_TOKEN"`),ve+=`
}
`,Ae&&Ae.length>0&&(ve+=`params = {
`,Ae.forEach(qe=>{ve+=` "${qe.name}": "example_value", # ${qe.description||"No description"}
`}),ve+=`}
`),ue){const qe=se(q);ve+=`data = ${JSON.stringify(qe,null,4).replace(/^/gm,"")}
`}return ve+=`response = requests.${q.method.toLowerCase()}(
`,ve+=` url,
`,ve+=` headers=headers,
`,Ae&&Ae.length>0&&(ve+=` params=params,
`),ue&&(ve+=` json=data
`),ve+=`)
`,ve+=`if response.status_code == 200:
`,ve+=` result = response.json()
`,ve+=` print(json.dumps(result, indent=2))
`,ve+=`else:
`,ve+=' print(f"Error: {response.status_code} - {response.text}")',ve},te=q=>{var Ye;const ue=q.requestBody&&["post","put","patch"].includes(q.method.toLowerCase()),Ce=q.security&&q.security.length>0,Ae=(Ye=q.parameters)==null?void 0:Ye.filter(qe=>qe.in==="query");let ve=`// Type definitions
`;if(ve+=`interface ApiResponse {
`,ve+=` // Define your response type based on the API schema
`,ve+=` [key: string]: any;
`,ve+=`}
`,ue&&(ve+=`interface RequestData {
`,ve+=` // Define your request data type based on the API schema
`,ve+=` [key: string]: any;
`,ve+=`}
`),Ae&&Ae.length>0&&(ve+=`interface QueryParams {
`,Ae.forEach(qe=>{const He=qe.required?"":"?";ve+=` ${qe.name}${He}: string; // ${qe.description||"No description"}
`}),ve+=`}
`,ve+=`const params: QueryParams = {
`,Ae.forEach(qe=>{qe.required&&(ve+=` ${qe.name}: 'example_value',
`)}),ve+=`};
`,ve+=`const queryString = new URLSearchParams(params as any).toString();
`),ve+=`const response = await fetch('${q.path}${Ae&&Ae.length>0?"?${queryString}":""}', {
`,ve+=` method: '${q.method}',
`,ve+=` headers: {
`,ve+=" 'Content-Type': 'application/json',",Ce&&(ve+=`
'Authorization': 'Bearer YOUR_TOKEN',`),ve+=`
},`,ue){const qe=se(q);ve+=`
body: JSON.stringify(${JSON.stringify(qe,null,4).replace(/^/gm," ")} as RequestData),`}return ve+=`
});
`,ve+=`if (!response.ok) {
`,ve+=" throw new Error(`HTTP error! status: ${response.status}`);\n",ve+=`}
`,ve+=`const data: ApiResponse = await response.json();
`,ve+="console.log(data);",ve},se=q=>{const ue=q.path.split("/").filter(Boolean),Ce=ue[ue.length-1];return q.method==="POST"?{name:`New ${Ce}`,description:`A sample ${Ce} description`,active:!0,createdAt:new Date().toISOString()}:q.method==="PUT"||q.method==="PATCH"?{id:123,name:`Updated ${Ce}`,description:`Updated ${Ce} description`,active:!0,updatedAt:new Date().toISOString()}:{example:"data",id:123,name:"Sample Item",active:!0}},ye=()=>{var Ce;if(!e)return"";const q=((Ce=e.components)==null?void 0:Ce.schemas)||{};let ue=`// Generated TypeScript types from OpenAPI specification
`;return ue+=`// Generated on ${new Date().toISOString()}
`,Object.entries(q).forEach(([Ae,ve])=>{ue+=`export interface ${Ae} {
`,ve.description&&(ue+=` /** ${ve.description} */
`),ve.properties&&Object.entries(ve.properties).forEach(([Ye,qe])=>{var Me;const He=(Me=ve.required)==null?void 0:Me.includes(Ye),it=j(qe);qe.description&&(ue+=` /** ${qe.description} */
`),ue+=` ${Ye}${He?"":"?"}: ${it};
`}),ue+=`}
`}),ue+=`// Utility types
`,ue+=`export type ApiResponse<T> = {
`,ue+=` data: T;
`,ue+=` message?: string;
`,ue+=` success: boolean;
`,ue+=`};
`,ue+=`export type PaginatedResponse<T> = {
`,ue+=` data: T[];
`,ue+=` total: number;
`,ue+=` page: number;
`,ue+=` limit: number;
`,ue+=`};
`,ue},j=q=>{if(q.$ref)return q.$ref.replace("#/components/schemas/","");switch(q.type){case"string":return q.enum?q.enum.map(ue=>`'${ue}'`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return`${j(q.items)}[]`;case"object":return q.additionalProperties?`{ [key: string]: ${j(q.additionalProperties)} }`:"object";default:return"any"}},T=()=>{var Ce;if(!e)return"";const q=((Ce=e.components)==null?void 0:Ce.schemas)||{};let ue=`// Generated mock data for testing
`;return ue+=`// Generated on ${new Date().toISOString()}
`,Object.entries(q).forEach(([Ae,ve])=>{ue+=`export const mock${Ae} = ${JSON.stringify(B(ve),null,2)};
`}),ue+=`// Mock factory functions
`,Object.keys(q).forEach(Ae=>{ue+=`export const create${Ae}Mock = (overrides: Partial<${Ae}> = {}): ${Ae} => ({
`,ue+=` ...mock${Ae},
`,ue+=` ...overrides
`,ue+=`});
`}),ue},B=q=>{if(q.type==="object"&&q.properties){const ue={};return Object.entries(q.properties).forEach(([Ce,Ae])=>{ue[Ce]=K(Ae,Ce)}),ue}return K(q)},K=(q,ue)=>{if(q.example!==void 0)return q.example;if(q.enum)return q.enum[0];switch(q.type){case"string":return q.format==="email"?"user@example.com":q.format==="date"?"2024-01-01":q.format==="date-time"?new Date().toISOString():q.format==="uuid"?"123e4567-e89b-12d3-a456-426614174000":ue!=null&&ue.toLowerCase().includes("name")?"Sample Name":ue!=null&&ue.toLowerCase().includes("description")?"Sample description":"sample string";case"number":case"integer":return ue!=null&&ue.toLowerCase().includes("id")?Math.floor(Math.random()*1e3)+1:ue!=null&&ue.toLowerCase().includes("price")?99.99:Math.floor(Math.random()*100);case"boolean":return Math.random()>.5;case"array":return[K(q.items)];default:return null}},ee=()=>{if(!e)return"";let q=`# ${e.info.title} API Documentation
`;q+=`**Version:** ${e.info.version}
`,q+=`**Generated:** ${new Date().toISOString()}
`,e.info.description&&(q+=`## Description
${e.info.description}
`),e.servers&&e.servers.length>0&&(q+=`## Base URLs
`,e.servers.forEach(Ce=>{q+=`- ${Ce.url}`,Ce.description&&(q+=` - ${Ce.description}`),q+=`
`}),q+=`
`),q+=`## Endpoints
`;const ue={};return t.forEach(Ce=>{Ce.tags.length===0?(ue.Untagged||(ue.Untagged=[]),ue.Untagged.push(Ce)):Ce.tags.forEach(Ae=>{ue[Ae]||(ue[Ae]=[]),ue[Ae].push(Ce)})}),Object.entries(ue).forEach(([Ce,Ae])=>{q+=`### ${Ce}
`,Ae.forEach(ve=>{q+=`#### ${ve.method} ${ve.path}
`,ve.summary&&(q+=`**Summary:** ${ve.summary}
`),ve.description&&(q+=`**Description:** ${ve.description}
`),ve.deprecated&&(q+=`> ⚠️ **This endpoint is deprecated**
`),ve.parameters.length>0&&(q+=`**Parameters:**
`,q+=`| Name | In | Type | Required | Description |
`,q+=`|------|----|----- |----------|-------------|
`,ve.parameters.forEach(Ye=>{var qe;q+=`| ${Ye.name} | ${Ye.in} | ${((qe=Ye.schema)==null?void 0:qe.type)||"N/A"} | ${Ye.required?"Yes":"No"} | ${Ye.description||"N/A"} |
`}),q+=`
`),q+=`**Responses:**
`,q+=`| Status Code | Description |
`,q+=`|-------------|-------------|
`,Object.entries(ve.responses).forEach(([Ye,qe])=>{q+=`| ${Ye} | ${qe.description} |
`}),q+=`
`,q+=`**Example:**
`,q+="```bash\n",q+=ie(ve),q+="\n```\n\n",q+=`---
`})}),q},z=Fe.useMemo(()=>{var ue;if(!e)return[];const q=((ue=e.components)==null?void 0:ue.schemas)||{};return Object.entries(q).map(([Ce,Ae])=>({name:Ce,type:Ae.type||"object",properties:Ae.properties?Object.keys(Ae.properties).length:0,required:Ae.required?Ae.required.length:0,description:Ae.description}))},[e]),X=Fe.useMemo(()=>{let q=z;if(y){const ue=y.toLowerCase();q=q.filter(Ce=>{var Ae;return Ce.name.toLowerCase().includes(ue)||((Ae=Ce.description)==null?void 0:Ae.toLowerCase().includes(ue))})}return N!=="all"&&(q=q.filter(ue=>ue.type===N)),q.sort((ue,Ce)=>{let Ae=0;switch(M){case"name":Ae=ue.name.localeCompare(Ce.name);break;case"properties":Ae=ue.properties-Ce.properties;break;case"required":Ae=ue.required-Ce.required;break}return w==="desc"?-Ae:Ae}),q},[z,y,N,M,w]),ae=Fe.useMemo(()=>{let q=t;if(R){const ue=R.toLowerCase();q=q.filter(Ce=>{var Ae;return Ce.path.toLowerCase().includes(ue)||((Ae=Ce.summary)==null?void 0:Ae.toLowerCase().includes(ue))||Ce.method.toLowerCase().includes(ue)})}return G!=="all"&&(q=q.filter(ue=>ue.method===G)),I!=="all"&&(q=q.filter(ue=>I==="untagged"?ue.tags.length===0:ue.tags.includes(I))),q},[t,R,G,I]),ke=Fe.useMemo(()=>{const q=new Set(t.map(ue=>ue.method));return Array.from(q).sort()},[t]),me=Fe.useMemo(()=>{const q=new Set;return t.forEach(ue=>ue.tags.forEach(Ce=>q.add(Ce))),Array.from(q).sort()},[t]),we=Fe.useMemo(()=>{const q=new Set(z.map(ue=>ue.type));return Array.from(q).sort()},[z]);if(!r||!e)return null;const Pe=[{id:"examples",label:"Code Examples",icon:ei},{id:"types",label:"TypeScript Types",icon:Ju},{id:"mock",label:"Mock Data",icon:bs},{id:"docs",label:"Documentation",icon:ri}],We=[{id:"curl",label:"cURL"},{id:"javascript",label:"JavaScript"},{id:"python",label:"Python"},{id:"typescript",label:"TypeScript"}],xe=t.find(q=>a===`${q.method}_${q.path}`),V=q=>{M===q?L(w==="asc"?"desc":"asc"):(b(q),L("asc"))},nt=q=>M!==q?o.jsx(Wp,{className:"h-4 w-4"}):w==="asc"?o.jsx(Vp,{className:"h-4 w-4"}):o.jsx(Hp,{className:"h-4 w-4"}),Ge=q=>{const ue=new Set($);ue.has(q)?ue.delete(q):ue.add(q),J(ue)},Ie=q=>{const ue=new Set(le);ue.has(q)?ue.delete(q):ue.add(q),D(ue)};return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl w-full max-w-7xl h-[90vh] flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 bg-gradient-to-br from-purple-500 to-pink-600 rounded-lg",children:o.jsx(ei,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Code Generator"}),o.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Generate code examples, types, and documentation for ",t.length," endpoints"]})]})]}),o.jsx("button",{onClick:n,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:o.jsx(wa,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"flex border-b border-gray-200 dark:border-gray-700 flex-shrink-0 overflow-x-auto",children:Pe.map(q=>{const ue=q.icon,Ce=i===q.id;return o.jsxs("button",{onClick:()=>s(q.id),className:`
flex items-center gap-2 px-6 py-3 font-medium transition-colors whitespace-nowrap
${Ce?"text-blue-600 border-b-2 border-blue-600 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[o.jsx(ue,{className:"h-4 w-4"}),q.label]},q.id)})}),o.jsxs("div",{className:"flex-1 overflow-hidden",children:[i==="examples"&&o.jsxs("div",{className:"h-full flex",children:[o.jsxs("div",{className:"w-80 border-r border-gray-200 dark:border-gray-700 flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"relative",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:R,onChange:q=>Z(q.target.value),placeholder:"Search endpoints...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("select",{value:G,onChange:q=>P(q.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Methods"}),ke.map(q=>o.jsx("option",{value:q,children:q},q))]}),o.jsxs("select",{value:I,onChange:q=>Y(q.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Tags"}),o.jsx("option",{value:"untagged",children:"Untagged"}),me.map(q=>o.jsx("option",{value:q,children:q},q))]})]}),o.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 flex items-center gap-1",children:[o.jsx(xa,{className:"h-3 w-3"}),ae.length," of ",t.length," endpoints"]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsx("div",{className:"space-y-2",children:ae.map(q=>{const ue=`${q.method}_${q.path}`;return o.jsxs("button",{onClick:()=>l(ue),className:`
w-full text-left p-3 rounded-lg transition-colors
${a===ue?"bg-blue-100 dark:bg-blue-900 text-blue-900 dark:text-blue-100 border border-blue-200 dark:border-blue-700":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"}
`,children:[o.jsx("div",{className:"flex items-center gap-2 mb-1",children:o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${q.method==="GET"?"bg-green-500 text-white":q.method==="POST"?"bg-blue-500 text-white":q.method==="PUT"?"bg-orange-500 text-white":q.method==="PATCH"?"bg-yellow-500 text-white":q.method==="DELETE"?"bg-red-500 text-white":"bg-gray-500 text-white"}`,children:q.method})}),o.jsx("div",{className:"text-sm font-mono truncate",children:q.path}),q.summary&&o.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1 line-clamp-2",children:q.summary}),q.tags.length>0&&o.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[q.tags.slice(0,2).map(Ce=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 text-xs rounded",children:[o.jsx(hc,{className:"h-2.5 w-2.5"}),Ce]},Ce)),q.tags.length>2&&o.jsxs("span",{className:"text-xs text-gray-500",children:["+",q.tags.length-2]})]})]},ue)})})})]}),o.jsx("div",{className:"flex-1 flex flex-col",children:xe?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[xe.method," ",xe.path]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("select",{value:u,onChange:q=>h(q.target.value),className:"px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white",children:We.map(q=>o.jsx("option",{value:q.id,children:q.label},q.id))}),o.jsxs("button",{onClick:()=>F(de(xe,u),`${u}-example`),className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors text-sm",children:[x===`${u}-example`?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy"]})]})]}),xe.summary&&o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm mt-2",children:xe.summary}),xe.tags.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:xe.tags.map(q=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs rounded-full",children:[o.jsx(hc,{className:"h-3 w-3"}),q]},q))})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:de(xe,u)})})})})]}):o.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(ei,{className:"h-16 w-16 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"Select an endpoint to generate code examples"}),o.jsxs("p",{className:"text-sm",children:["Choose from ",ae.length," available endpoints"]})]})})})]}),i==="types"&&o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700/50",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx(gn,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),o.jsx("input",{type:"text",value:y,onChange:q=>p(q.target.value),placeholder:"Search types...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("select",{value:N,onChange:q=>k(q.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"all",children:"All Types"}),we.map(q=>o.jsx("option",{value:q,children:q},q))]}),o.jsx("div",{className:"flex gap-2",children:o.jsxs("button",{onClick:()=>V("name"),className:"flex items-center gap-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors text-sm",children:["Name ",nt("name")]})}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 flex items-center",children:[o.jsx(xa,{className:"h-4 w-4 mr-2"}),X.length," types"]}),o.jsxs("button",{onClick:()=>F(ye(),"typescript-types"),className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors text-sm",children:[x==="typescript-types"?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy All"]})]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsxs("div",{className:"space-y-3",children:[X.map((q,ue)=>{var ve,Ye;const Ce=$.has(q.name),Ae=(Ye=(ve=e.components)==null?void 0:ve.schemas)==null?void 0:Ye[q.name];return o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[o.jsxs("button",{onClick:()=>Ge(q.name),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[Ce?o.jsx(Gi,{className:"h-5 w-5 text-gray-500"}):o.jsx(ma,{className:"h-5 w-5 text-gray-500"}),o.jsx(Ju,{className:"h-5 w-5 text-blue-600"}),o.jsx("span",{className:"font-mono font-medium text-gray-900 dark:text-white",children:q.name})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"px-2 py-1 bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 text-xs rounded font-medium",children:[q.properties," props"]}),o.jsxs("span",{className:"px-2 py-1 bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 text-xs rounded font-medium",children:[q.required," required"]}),o.jsxs("button",{onClick:qe=>{if(qe.stopPropagation(),Ae){const He=`export interface ${q.name} {
${Ae.properties?Object.entries(Ae.properties).map(([it,Me])=>{var Vr;const Gt=(Vr=Ae.required)==null?void 0:Vr.includes(it),dt=j(Me);return` ${it}${Gt?"":"?"}: ${dt};`}).join(`
`):""}
}`;F(He,`type-${q.name}`)}},className:"flex items-center gap-1 px-2 py-1 text-blue-600 hover:bg-blue-100 dark:hover:bg-blue-900 rounded transition-colors text-sm",children:[x===`type-${q.name}`?o.jsx(Ot,{className:"h-3 w-3"}):o.jsx(mr,{className:"h-3 w-3"}),"Copy"]})]})]}),Ce&&Ae&&o.jsxs("div",{className:"px-4 pb-4 bg-gray-50 dark:bg-gray-700/50",children:[q.description&&o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm mb-3",children:q.description}),o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:`export interface ${q.name} {
${Ae.properties?Object.entries(Ae.properties).map(([qe,He])=>{var dt;const it=(dt=Ae.required)==null?void 0:dt.includes(qe),Me=j(He);let Gt=` ${qe}${it?"":"?"}: ${Me};`;return He.description&&(Gt=` /** ${He.description} */
${qe}${it?"":"?"}: ${Me};`),Gt}).join(`
`):""}
}`})})})]})]},ue)}),X.length===0&&o.jsx("div",{className:"flex items-center justify-center h-64 text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Ju,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"No types found"}),o.jsx("p",{className:"text-sm",children:"Try adjusting your search or filters"})]})})]})})]}),i==="mock"&&o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Mock Data for Testing"}),o.jsxs("button",{onClick:()=>F(T(),"mock-data"),className:"flex items-center gap-2 px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white rounded-lg transition-colors text-sm",children:[x==="mock-data"?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy All Mock Data"]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsxs("div",{className:"space-y-3",children:[Object.keys(((Oe=e.components)==null?void 0:Oe.schemas)||{}).map(q=>{var Ae,ve;const ue=le.has(q),Ce=B((ve=(Ae=e.components)==null?void 0:Ae.schemas)==null?void 0:ve[q]);return o.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[o.jsxs("button",{onClick:()=>Ie(q),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[ue?o.jsx(Gi,{className:"h-5 w-5 text-gray-500"}):o.jsx(ma,{className:"h-5 w-5 text-gray-500"}),o.jsx(bs,{className:"h-5 w-5 text-green-600"}),o.jsx("span",{className:"font-mono font-medium text-gray-900 dark:text-white",children:q})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 text-xs rounded font-medium",children:"Mock Data"}),o.jsxs("button",{onClick:Ye=>{Ye.stopPropagation(),F(JSON.stringify(Ce,null,2),`mock-${q}`)},className:"flex items-center gap-1 px-2 py-1 text-green-600 hover:bg-green-100 dark:hover:bg-green-900 rounded transition-colors text-sm",children:[x===`mock-${q}`?o.jsx(Ot,{className:"h-3 w-3"}):o.jsx(mr,{className:"h-3 w-3"}),"Copy"]})]})]}),ue&&o.jsx("div",{className:"px-4 pb-4 bg-gray-50 dark:bg-gray-700/50",children:o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:JSON.stringify(Ce,null,2)})})})})]},q)}),Object.keys(((Re=e.components)==null?void 0:Re.schemas)||{}).length===0&&o.jsx("div",{className:"flex items-center justify-center h-64 text-gray-500 dark:text-gray-400",children:o.jsxs("div",{className:"text-center",children:[o.jsx(bs,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),o.jsx("p",{className:"text-lg font-medium",children:"No schemas found"}),o.jsx("p",{className:"text-sm",children:"No schemas available for mock data generation"})]})})]})})]}),i==="docs"&&o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Generated Documentation"}),o.jsxs("button",{onClick:()=>F(ee(),"documentation"),className:"flex items-center gap-2 px-3 py-1.5 bg-purple-600 hover:bg-purple-700 text-white rounded-lg transition-colors text-sm",children:[x==="documentation"?o.jsx(Ot,{className:"h-4 w-4"}):o.jsx(mr,{className:"h-4 w-4"}),"Copy Docs"]})]})}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:o.jsx("div",{className:"bg-gray-900 rounded-lg p-4",children:o.jsx("pre",{className:"text-green-400 text-sm overflow-x-auto",children:o.jsx("code",{children:ee()})})})})]})]})]})})};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Z5(e){return typeof e>"u"||e===null}function t4(e){return typeof e=="object"&&e!==null}function r4(e){return Array.isArray(e)?e:Z5(e)?[]:[e]}function n4(e,t){var r,n,i,s;if(t)for(s=Object.keys(t),r=0,n=s.length;r<n;r+=1)i=s[r],e[i]=t[i];return e}function i4(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function s4(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var a4=Z5,o4=t4,l4=r4,c4=i4,u4=s4,d4=n4,ur={isNothing:a4,isObject:o4,toArray:l4,repeat:c4,isNegativeZero:u4,extend:d4};function ex(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
`+e.mark.snippet),n+" "+r):n}function pc(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ex(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}pc.prototype=Object.create(Error.prototype);pc.prototype.constructor=pc;pc.prototype.toString=function(t){return this.name+": "+ex(this,t)};var Ur=pc;function vh(e,t,r,n,i){var s="",a="",l=Math.floor(i/2)-1;return n-t>l&&(s=" ... ",t=n-l+s.length),r-n>l&&(a=" ...",r=n+l-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+s.length}}function bh(e,t){return ur.repeat(" ",t-e.length)+e}function h4(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,a=-1;s=r.exec(e.buffer);)i.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var l="",u,h,x=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+x+3);for(u=1;u<=t.linesBefore&&!(a-u<0);u++)h=vh(e.buffer,n[a-u],i[a-u],e.position-(n[a]-n[a-u]),m),l=ur.repeat(" ",t.indent)+bh((e.line-u+1).toString(),x)+" | "+h.str+`
`+l;for(h=vh(e.buffer,n[a],i[a],e.position,m),l+=ur.repeat(" ",t.indent)+bh((e.line+1).toString(),x)+" | "+h.str+`
`,l+=ur.repeat("-",t.indent+x+3+h.pos)+`^
`,u=1;u<=t.linesAfter&&!(a+u>=i.length);u++)h=vh(e.buffer,n[a+u],i[a+u],e.position-(n[a]-n[a+u]),m),l+=ur.repeat(" ",t.indent)+bh((e.line+u+1).toString(),x)+" | "+h.str+`
`;return l.replace(/\n$/,"")}var f4=h4,p4=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],g4=["scalar","sequence","mapping"];function m4(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function x4(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(p4.indexOf(r)===-1)throw new Ur('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=m4(t.styleAliases||null),g4.indexOf(this.kind)===-1)throw new Ur('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var jr=x4;function Hg(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(s,a){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=a)}),r[i]=n}),r}function y4(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function Lf(e){return this.extend(e)}Lf.prototype.extend=function(t){var r=[],n=[];if(t instanceof jr)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Ur("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof jr))throw new Ur("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Ur("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Ur("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof jr))throw new Ur("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Lf.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Hg(i,"implicit"),i.compiledExplicit=Hg(i,"explicit"),i.compiledTypeMap=y4(i.compiledImplicit,i.compiledExplicit),i};var tx=Lf,rx=new jr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),nx=new jr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),ix=new jr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),sx=new tx({explicit:[rx,nx,ix]});function v4(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function b4(){return null}function w4(e){return e===null}var ax=new jr("tag:yaml.org,2002:null",{kind:"scalar",resolve:v4,construct:b4,predicate:w4,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function N4(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function k4(e){return e==="true"||e==="True"||e==="TRUE"}function j4(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var ox=new jr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:N4,construct:k4,predicate:j4,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function S4(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function A4(e){return 48<=e&&e<=55}function L4(e){return 48<=e&&e<=57}function C4(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!S4(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!A4(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!L4(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function _4(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function P4(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ur.isNegativeZero(e)}var lx=new jr("tag:yaml.org,2002:int",{kind:"scalar",resolve:C4,construct:_4,predicate:P4,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),E4=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function I4(e){return!(e===null||!E4.test(e)||e[e.length-1]==="_")}function F4(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var T4=/^[-+]?[0-9]+e/;function O4(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ur.isNegativeZero(e))return"-0.0";return r=e.toString(10),T4.test(r)?r.replace("e",".e"):r}function M4(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ur.isNegativeZero(e))}var cx=new jr("tag:yaml.org,2002:float",{kind:"scalar",resolve:I4,construct:F4,predicate:M4,represent:O4,defaultStyle:"lowercase"}),ux=sx.extend({implicit:[ax,ox,lx,cx]}),dx=ux,hx=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fx=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function D4(e){return e===null?!1:hx.exec(e)!==null||fx.exec(e)!==null}function R4(e){var t,r,n,i,s,a,l,u=0,h=null,x,m,y;if(t=hx.exec(e),t===null&&(t=fx.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(s=+t[4],a=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(x=+t[10],m=+(t[11]||0),h=(x*60+m)*6e4,t[9]==="-"&&(h=-h)),y=new Date(Date.UTC(r,n,i,s,a,l,u)),h&&y.setTime(y.getTime()-h),y}function B4(e){return e.toISOString()}var px=new jr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:D4,construct:R4,instanceOf:Date,represent:B4});function q4(e){return e==="<<"||e===null}var gx=new jr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:q4}),Gp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function z4(e){if(e===null)return!1;var t,r,n=0,i=e.length,s=Gp;for(r=0;r<i;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function U4(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=Gp,a=0,l=[];for(t=0;t<i;t++)t%4===0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|s.indexOf(n.charAt(t));return r=i%4*6,r===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):r===18?(l.push(a>>10&255),l.push(a>>2&255)):r===12&&l.push(a>>4&255),new Uint8Array(l)}function $4(e){var t="",r=0,n,i,s=e.length,a=Gp;for(n=0;n<s;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return i=s%3,i===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):i===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):i===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function H4(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var mx=new jr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:z4,construct:U4,predicate:H4,represent:$4}),W4=Object.prototype.hasOwnProperty,V4=Object.prototype.toString;function G4(e){if(e===null)return!0;var t=[],r,n,i,s,a,l=e;for(r=0,n=l.length;r<n;r+=1){if(i=l[r],a=!1,V4.call(i)!=="[object Object]")return!1;for(s in i)if(W4.call(i,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function Y4(e){return e!==null?e:[]}var xx=new jr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:G4,construct:Y4}),K4=Object.prototype.toString;function J4(e){if(e===null)return!0;var t,r,n,i,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],K4.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[t]=[i[0],n[i[0]]]}return!0}function X4(e){if(e===null)return[];var t,r,n,i,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),s[t]=[i[0],n[i[0]]];return s}var yx=new jr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:J4,construct:X4}),Q4=Object.prototype.hasOwnProperty;function Z4(e){if(e===null)return!0;var t,r=e;for(t in r)if(Q4.call(r,t)&&r[t]!==null)return!1;return!0}function e3(e){return e!==null?e:{}}var vx=new jr("tag:yaml.org,2002:set",{kind:"mapping",resolve:Z4,construct:e3}),Yp=dx.extend({implicit:[px,gx],explicit:[mx,xx,yx,vx]}),Fs=Object.prototype.hasOwnProperty,Cd=1,bx=2,wx=3,_d=4,wh=1,t3=2,Wg=3,r3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n3=/[\x85\u2028\u2029]/,i3=/[,\[\]\{\}]/,Nx=/^(?:!|!!|![a-z\-]+!)$/i,kx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Vg(e){return Object.prototype.toString.call(e)}function ki(e){return e===10||e===13}function ca(e){return e===9||e===32}function tn(e){return e===9||e===32||e===10||e===13}function yo(e){return e===44||e===91||e===93||e===123||e===125}function s3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function a3(e){return e===120?2:e===117?4:e===85?8:0}function o3(e){return 48<=e&&e<=57?e-48:-1}function Gg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function l3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var jx=new Array(256),Sx=new Array(256);for(var Za=0;Za<256;Za++)jx[Za]=Gg(Za)?1:0,Sx[Za]=Gg(Za);function c3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Yp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ax(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=f4(r),new Ur(t,r)}function Ke(e,t){throw Ax(e,t)}function Pd(e,t){e.onWarning&&e.onWarning.call(null,Ax(e,t))}var Yg={YAML:function(t,r,n){var i,s,a;t.version!==null&&Ke(t,"duplication of %YAML directive"),n.length!==1&&Ke(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Ke(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&Ke(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Pd(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var i,s;n.length!==2&&Ke(t,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],Nx.test(i)||Ke(t,"ill-formed tag handle (first argument) of the TAG directive"),Fs.call(t.tagMap,i)&&Ke(t,'there is a previously declared suffix for "'+i+'" tag handle'),kx.test(s)||Ke(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Ke(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function Ps(e,t,r,n){var i,s,a,l;if(t<r){if(l=e.input.slice(t,r),n)for(i=0,s=l.length;i<s;i+=1)a=l.charCodeAt(i),a===9||32<=a&&a<=1114111||Ke(e,"expected valid JSON character");else r3.test(l)&&Ke(e,"the stream contains non-printable characters");e.result+=l}}function Kg(e,t,r,n){var i,s,a,l;for(ur.isObject(r)||Ke(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,l=i.length;a<l;a+=1)s=i[a],Fs.call(t,s)||(t[s]=r[s],n[s]=!0)}function vo(e,t,r,n,i,s,a,l,u){var h,x;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,x=i.length;h<x;h+=1)Array.isArray(i[h])&&Ke(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Vg(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&Vg(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,x=s.length;h<x;h+=1)Kg(e,t,s[h],r);else Kg(e,t,s,r);else!e.json&&!Fs.call(r,i)&&Fs.call(t,i)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=u||e.position,Ke(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete r[i];return t}function Kp(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ke(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ar(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;ca(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(ki(i))for(Kp(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Pd(e,"deficient indentation"),n}function e0(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||tn(r)))}function Jp(e,t){t===1?e.result+=" ":t>1&&(e.result+=ur.repeat(`
`,t-1))}function u3(e,t,r){var n,i,s,a,l,u,h,x,m=e.kind,y=e.result,p;if(p=e.input.charCodeAt(e.position),tn(p)||yo(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),tn(i)||r&&yo(i)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,l=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),tn(i)||r&&yo(i))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),tn(n))break}else{if(e.position===e.lineStart&&e0(e)||r&&yo(p))break;if(ki(p))if(u=e.line,h=e.lineStart,x=e.lineIndent,ar(e,!1,-1),e.lineIndent>=t){l=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=u,e.lineStart=h,e.lineIndent=x;break}}l&&(Ps(e,s,a,!1),Jp(e,e.line-u),s=a=e.position,l=!1),ca(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return Ps(e,s,a,!1),e.result?!0:(e.kind=m,e.result=y,!1)}function d3(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ps(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else ki(r)?(Ps(e,n,i,!0),Jp(e,ar(e,!1,t)),n=i=e.position):e.position===e.lineStart&&e0(e)?Ke(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Ke(e,"unexpected end of the stream within a single quoted scalar")}function h3(e,t){var r,n,i,s,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ps(e,r,e.position,!0),e.position++,!0;if(l===92){if(Ps(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),ki(l))ar(e,!1,t);else if(l<256&&jx[l])e.result+=Sx[l],e.position++;else if((a=a3(l))>0){for(i=a,s=0;i>0;i--)l=e.input.charCodeAt(++e.position),(a=s3(l))>=0?s=(s<<4)+a:Ke(e,"expected hexadecimal character");e.result+=l3(s),e.position++}else Ke(e,"unknown escape sequence");r=n=e.position}else ki(l)?(Ps(e,r,n,!0),Jp(e,ar(e,!1,t)),r=n=e.position):e.position===e.lineStart&&e0(e)?Ke(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Ke(e,"unexpected end of the stream within a double quoted scalar")}function f3(e,t){var r=!0,n,i,s,a=e.tag,l,u=e.anchor,h,x,m,y,p,N=Object.create(null),k,M,b,w;if(w=e.input.charCodeAt(e.position),w===91)x=93,p=!1,l=[];else if(w===123)x=125,p=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),w=e.input.charCodeAt(++e.position);w!==0;){if(ar(e,!0,t),w=e.input.charCodeAt(e.position),w===x)return e.position++,e.tag=a,e.anchor=u,e.kind=p?"mapping":"sequence",e.result=l,!0;r?w===44&&Ke(e,"expected the node content, but found ','"):Ke(e,"missed comma between flow collection entries"),M=k=b=null,m=y=!1,w===63&&(h=e.input.charCodeAt(e.position+1),tn(h)&&(m=y=!0,e.position++,ar(e,!0,t))),n=e.line,i=e.lineStart,s=e.position,Bo(e,t,Cd,!1,!0),M=e.tag,k=e.result,ar(e,!0,t),w=e.input.charCodeAt(e.position),(y||e.line===n)&&w===58&&(m=!0,w=e.input.charCodeAt(++e.position),ar(e,!0,t),Bo(e,t,Cd,!1,!0),b=e.result),p?vo(e,l,N,M,k,b,n,i,s):m?l.push(vo(e,null,N,M,k,b,n,i,s)):l.push(k),ar(e,!0,t),w=e.input.charCodeAt(e.position),w===44?(r=!0,w=e.input.charCodeAt(++e.position)):r=!1}Ke(e,"unexpected end of the stream within a flow collection")}function p3(e,t){var r,n,i=wh,s=!1,a=!1,l=t,u=0,h=!1,x,m;if(m=e.input.charCodeAt(e.position),m===124)n=!1;else if(m===62)n=!0;else return!1;for(e.kind="scalar",e.result="";m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)wh===i?i=m===43?Wg:t3:Ke(e,"repeat of a chomping mode identifier");else if((x=o3(m))>=0)x===0?Ke(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Ke(e,"repeat of an indentation width identifier"):(l=t+x-1,a=!0);else break;if(ca(m)){do m=e.input.charCodeAt(++e.position);while(ca(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!ki(m)&&m!==0)}for(;m!==0;){for(Kp(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),ki(m)){u++;continue}if(e.lineIndent<l){i===Wg?e.result+=ur.repeat(`
`,s?1+u:u):i===wh&&s&&(e.result+=`
`);break}for(n?ca(m)?(h=!0,e.result+=ur.repeat(`
`,s?1+u:u)):h?(h=!1,e.result+=ur.repeat(`
`,u+1)):u===0?s&&(e.result+=" "):e.result+=ur.repeat(`
`,u):e.result+=ur.repeat(`
`,s?1+u:u),s=!0,a=!0,u=0,r=e.position;!ki(m)&&m!==0;)m=e.input.charCodeAt(++e.position);Ps(e,r,e.position,!1)}return!0}function Jg(e,t){var r,n=e.tag,i=e.anchor,s=[],a,l=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ke(e,"tab characters must not be used in indentation")),!(u!==45||(a=e.input.charCodeAt(e.position+1),!tn(a))));){if(l=!0,e.position++,ar(e,!0,-1)&&e.lineIndent<=t){s.push(null),u=e.input.charCodeAt(e.position);continue}if(r=e.line,Bo(e,t,wx,!1,!0),s.push(e.result),ar(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&u!==0)Ke(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function g3(e,t,r){var n,i,s,a,l,u,h=e.tag,x=e.anchor,m={},y=Object.create(null),p=null,N=null,k=null,M=!1,b=!1,w;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),w=e.input.charCodeAt(e.position);w!==0;){if(!M&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ke(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,(w===63||w===58)&&tn(n))w===63?(M&&(vo(e,m,y,p,N,null,a,l,u),p=N=k=null),b=!0,M=!0,i=!0):M?(M=!1,i=!0):Ke(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,w=n;else{if(a=e.line,l=e.lineStart,u=e.position,!Bo(e,r,bx,!1,!0))break;if(e.line===s){for(w=e.input.charCodeAt(e.position);ca(w);)w=e.input.charCodeAt(++e.position);if(w===58)w=e.input.charCodeAt(++e.position),tn(w)||Ke(e,"a whitespace character is expected after the key-value separator within a block mapping"),M&&(vo(e,m,y,p,N,null,a,l,u),p=N=k=null),b=!0,M=!1,i=!1,p=e.tag,N=e.result;else if(b)Ke(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=x,!0}else if(b)Ke(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=x,!0}if((e.line===s||e.lineIndent>t)&&(M&&(a=e.line,l=e.lineStart,u=e.position),Bo(e,t,_d,!0,i)&&(M?N=e.result:k=e.result),M||(vo(e,m,y,p,N,k,a,l,u),p=N=k=null),ar(e,!0,-1),w=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&w!==0)Ke(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return M&&vo(e,m,y,p,N,null,a,l,u),b&&(e.tag=h,e.anchor=x,e.kind="mapping",e.result=m),b}function m3(e){var t,r=!1,n=!1,i,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Ke(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Ke(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!tn(a);)a===33&&(n?Ke(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Nx.test(i)||Ke(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),i3.test(s)&&Ke(e,"tag suffix cannot contain flow indicator characters")}s&&!kx.test(s)&&Ke(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Ke(e,"tag name is malformed: "+s)}return r?e.tag=s:Fs.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:Ke(e,'undeclared tag handle "'+i+'"'),!0}function x3(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Ke(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!tn(r)&&!yo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ke(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function y3(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!tn(n)&&!yo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ke(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Fs.call(e.anchorMap,r)||Ke(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ar(e,!0,-1),!0}function Bo(e,t,r,n,i){var s,a,l,u=1,h=!1,x=!1,m,y,p,N,k,M;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=l=_d===r||wx===r,n&&ar(e,!0,-1)&&(h=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;m3(e)||x3(e);)ar(e,!0,-1)?(h=!0,l=s,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):l=!1;if(l&&(l=h||i),(u===1||_d===r)&&(Cd===r||bx===r?k=t:k=t+1,M=e.position-e.lineStart,u===1?l&&(Jg(e,M)||g3(e,M,k))||f3(e,k)?x=!0:(a&&p3(e,k)||d3(e,k)||h3(e,k)?x=!0:y3(e)?(x=!0,(e.tag!==null||e.anchor!==null)&&Ke(e,"alias node should not have any properties")):u3(e,k,Cd===r)&&(x=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(x=l&&Jg(e,M))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ke(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),m=0,y=e.implicitTypes.length;m<y;m+=1)if(N=e.implicitTypes[m],N.resolve(e.result)){e.result=N.construct(e.result),e.tag=N.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Fs.call(e.typeMap[e.kind||"fallback"],e.tag))N=e.typeMap[e.kind||"fallback"][e.tag];else for(N=null,p=e.typeMap.multi[e.kind||"fallback"],m=0,y=p.length;m<y;m+=1)if(e.tag.slice(0,p[m].tag.length)===p[m].tag){N=p[m];break}N||Ke(e,"unknown tag !<"+e.tag+">"),e.result!==null&&N.kind!==e.kind&&Ke(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+N.kind+'", not "'+e.kind+'"'),N.resolve(e.result,e.tag)?(e.result=N.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ke(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||x}function v3(e){var t=e.position,r,n,i,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(ar(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!tn(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&Ke(e,"directive name must not be less than one character in length");a!==0;){for(;ca(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ki(a));break}if(ki(a))break;for(r=e.position;a!==0&&!tn(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}a!==0&&Kp(e),Fs.call(Yg,n)?Yg[n](e,n,i):Pd(e,'unknown document directive "'+n+'"')}if(ar(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ar(e,!0,-1)):s&&Ke(e,"directives end mark is expected"),Bo(e,e.lineIndent-1,_d,!1,!0),ar(e,!0,-1),e.checkLineBreaks&&n3.test(e.input.slice(t,e.position))&&Pd(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&e0(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ar(e,!0,-1));return}if(e.position<e.length-1)Ke(e,"end of the stream or a document separator is expected");else return}function Lx(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new c3(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,Ke(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)v3(r);return r.documents}function b3(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Lx(e,r);if(typeof t!="function")return n;for(var i=0,s=n.length;i<s;i+=1)t(n[i])}function w3(e,t){var r=Lx(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ur("expected a single document in the stream, but found more")}}var N3=b3,k3=w3,Cx={loadAll:N3,load:k3},_x=Object.prototype.toString,Px=Object.prototype.hasOwnProperty,Xp=65279,j3=9,gc=10,S3=13,A3=32,L3=33,C3=34,Cf=35,_3=37,P3=38,E3=39,I3=42,Ex=44,F3=45,Ed=58,T3=61,O3=62,M3=63,D3=64,Ix=91,Fx=93,R3=96,Tx=123,B3=124,Ox=125,Dr={};Dr[0]="\\0";Dr[7]="\\a";Dr[8]="\\b";Dr[9]="\\t";Dr[10]="\\n";Dr[11]="\\v";Dr[12]="\\f";Dr[13]="\\r";Dr[27]="\\e";Dr[34]='\\"';Dr[92]="\\\\";Dr[133]="\\N";Dr[160]="\\_";Dr[8232]="\\L";Dr[8233]="\\P";var q3=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],z3=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function U3(e,t){var r,n,i,s,a,l,u;if(t===null)return{};for(r={},n=Object.keys(t),i=0,s=n.length;i<s;i+=1)a=n[i],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),u=e.compiledTypeMap.fallback[a],u&&Px.call(u.styleAliases,l)&&(l=u.styleAliases[l]),r[a]=l;return r}function $3(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Ur("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ur.repeat("0",n-t.length)+t}var H3=1,mc=2;function W3(e){this.schema=e.schema||Yp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ur.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=U3(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?mc:H3,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Xg(e,t){for(var r=ur.repeat(" ",t),n=0,i=-1,s="",a,l=e.length;n<l;)i=e.indexOf(`
`,n),i===-1?(a=e.slice(n),n=l):(a=e.slice(n,i+1),n=i+1),a.length&&a!==`
`&&(s+=r),s+=a;return s}function _f(e,t){return`
`+ur.repeat(" ",e.indent*t)}function V3(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function Id(e){return e===A3||e===j3}function xc(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Xp||65536<=e&&e<=1114111}function Qg(e){return xc(e)&&e!==Xp&&e!==S3&&e!==gc}function Zg(e,t,r){var n=Qg(e),i=n&&!Id(e);return(r?n:n&&e!==Ex&&e!==Ix&&e!==Fx&&e!==Tx&&e!==Ox)&&e!==Cf&&!(t===Ed&&!i)||Qg(t)&&!Id(t)&&e===Cf||t===Ed&&i}function G3(e){return xc(e)&&e!==Xp&&!Id(e)&&e!==F3&&e!==M3&&e!==Ed&&e!==Ex&&e!==Ix&&e!==Fx&&e!==Tx&&e!==Ox&&e!==Cf&&e!==P3&&e!==I3&&e!==L3&&e!==B3&&e!==T3&&e!==O3&&e!==E3&&e!==C3&&e!==_3&&e!==D3&&e!==R3}function Y3(e){return!Id(e)&&e!==Ed}function Tl(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function Mx(e){var t=/^\n* /;return t.test(e)}var Dx=1,Pf=2,Rx=3,Bx=4,ro=5;function K3(e,t,r,n,i,s,a,l){var u,h=0,x=null,m=!1,y=!1,p=n!==-1,N=-1,k=G3(Tl(e,0))&&Y3(Tl(e,e.length-1));if(t||a)for(u=0;u<e.length;h>=65536?u+=2:u++){if(h=Tl(e,u),!xc(h))return ro;k=k&&Zg(h,x,l),x=h}else{for(u=0;u<e.length;h>=65536?u+=2:u++){if(h=Tl(e,u),h===gc)m=!0,p&&(y=y||u-N-1>n&&e[N+1]!==" ",N=u);else if(!xc(h))return ro;k=k&&Zg(h,x,l),x=h}y=y||p&&u-N-1>n&&e[N+1]!==" "}return!m&&!y?k&&!a&&!i(e)?Dx:s===mc?ro:Pf:r>9&&Mx(e)?ro:a?s===mc?ro:Pf:y?Bx:Rx}function J3(e,t,r,n,i){e.dump=function(){if(t.length===0)return e.quotingType===mc?'""':"''";if(!e.noCompatMode&&(q3.indexOf(t)!==-1||z3.test(t)))return e.quotingType===mc?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&r>=e.flowLevel;function u(h){return V3(e,h)}switch(K3(t,l,e.indent,a,u,e.quotingType,e.forceQuotes&&!n,i)){case Dx:return t;case Pf:return"'"+t.replace(/'/g,"''")+"'";case Rx:return"|"+em(t,e.indent)+tm(Xg(t,s));case Bx:return">"+em(t,e.indent)+tm(Xg(X3(t,a),s));case ro:return'"'+Q3(t)+'"';default:throw new Ur("impossible error: invalid scalar style")}}()}function em(e,t){var r=Mx(e)?String(t):"",n=e[e.length-1]===`
`,i=n&&(e[e.length-2]===`
`||e===`
`),s=i?"+":n?"":"-";return r+s+`
`}function tm(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function X3(e,t){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=e.indexOf(`
`);return h=h!==-1?h:e.length,r.lastIndex=h,rm(e.slice(0,h),t)}(),i=e[0]===`
`||e[0]===" ",s,a;a=r.exec(e);){var l=a[1],u=a[2];s=u[0]===" ",n+=l+(!i&&!s&&u!==""?`
`:"")+rm(u,t),i=s}return n}function rm(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,s,a=0,l=0,u="";n=r.exec(e);)l=n.index,l-i>t&&(s=a>i?a:l,u+=`
`+e.slice(i,s),i=s+1),a=l;return u+=`
`,e.length-i>t&&a>i?u+=e.slice(i,a)+`
`+e.slice(a+1):u+=e.slice(i),u.slice(1)}function Q3(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=Tl(e,i),n=Dr[r],!n&&xc(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||$3(r);return t}function Z3(e,t,r){var n="",i=e.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Yi(e,t,l,!1,!1)||typeof l>"u"&&Yi(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function nm(e,t,r,n){var i="",s=e.tag,a,l,u;for(a=0,l=r.length;a<l;a+=1)u=r[a],e.replacer&&(u=e.replacer.call(r,String(a),u)),(Yi(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&Yi(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=_f(e,t)),e.dump&&gc===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function e6(e,t,r){var n="",i=e.tag,s=Object.keys(r),a,l,u,h,x;for(a=0,l=s.length;a<l;a+=1)x="",n!==""&&(x+=", "),e.condenseFlow&&(x+='"'),u=s[a],h=r[u],e.replacer&&(h=e.replacer.call(r,u,h)),Yi(e,t,u,!1,!1)&&(e.dump.length>1024&&(x+="? "),x+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yi(e,t,h,!1,!1)&&(x+=e.dump,n+=x));e.tag=i,e.dump="{"+n+"}"}function t6(e,t,r,n){var i="",s=e.tag,a=Object.keys(r),l,u,h,x,m,y;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ur("sortKeys must be a boolean or a function");for(l=0,u=a.length;l<u;l+=1)y="",(!n||i!=="")&&(y+=_f(e,t)),h=a[l],x=r[h],e.replacer&&(x=e.replacer.call(r,h,x)),Yi(e,t+1,h,!0,!0,!0)&&(m=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,m&&(e.dump&&gc===e.dump.charCodeAt(0)?y+="?":y+="? "),y+=e.dump,m&&(y+=_f(e,t)),Yi(e,t+1,x,!0,m)&&(e.dump&&gc===e.dump.charCodeAt(0)?y+=":":y+=": ",y+=e.dump,i+=y));e.tag=s,e.dump=i||"{}"}function im(e,t,r){var n,i,s,a,l,u;for(i=r?e.explicitTypes:e.implicitTypes,s=0,a=i.length;s<a;s+=1)if(l=i[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(u=e.styleMap[l.tag]||l.defaultStyle,_x.call(l.represent)==="[object Function]")n=l.represent(t,u);else if(Px.call(l.represent,u))n=l.represent[u](t,u);else throw new Ur("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function Yi(e,t,r,n,i,s,a){e.tag=null,e.dump=r,im(e,r,!1)||im(e,r,!0);var l=_x.call(e.dump),u=n,h;n&&(n=e.flowLevel<0||e.flowLevel>t);var x=l==="[object Object]"||l==="[object Array]",m,y;if(x&&(m=e.duplicates.indexOf(r),y=m!==-1),(e.tag!==null&&e.tag!=="?"||y||e.indent!==2&&t>0)&&(i=!1),y&&e.usedDuplicates[m])e.dump="*ref_"+m;else{if(x&&y&&!e.usedDuplicates[m]&&(e.usedDuplicates[m]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(t6(e,t,e.dump,i),y&&(e.dump="&ref_"+m+e.dump)):(e6(e,t,e.dump),y&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?nm(e,t-1,e.dump,i):nm(e,t,e.dump,i),y&&(e.dump="&ref_"+m+e.dump)):(Z3(e,t,e.dump),y&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&J3(e,e.dump,t,s,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ur("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function r6(e,t){var r=[],n=[],i,s;for(Ef(e,r,n),i=0,s=n.length;i<s;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(s)}function Ef(e,t,r){var n,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)Ef(e[i],t,r);else for(n=Object.keys(e),i=0,s=n.length;i<s;i+=1)Ef(e[n[i]],t,r)}function n6(e,t){t=t||{};var r=new W3(t);r.noRefs||r6(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Yi(r,0,n,!0,!0)?r.dump+`
`:""}var i6=n6,s6={dump:i6};function Qp(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var a6=jr,o6=tx,l6=sx,c6=ux,u6=dx,d6=Yp,h6=Cx.load,f6=Cx.loadAll,p6=s6.dump,g6=Ur,m6={binary:mx,float:cx,map:ix,null:ax,pairs:yx,set:vx,timestamp:px,bool:ox,int:lx,merge:gx,omap:xx,seq:nx,str:rx},x6=Qp("safeLoad","load"),y6=Qp("safeLoadAll","loadAll"),v6=Qp("safeDump","dump"),sm={Type:a6,Schema:o6,FAILSAFE_SCHEMA:l6,JSON_SCHEMA:c6,CORE_SCHEMA:u6,DEFAULT_SCHEMA:d6,load:h6,loadAll:f6,dump:p6,YAMLException:g6,types:m6,safeLoad:x6,safeLoadAll:y6,safeDump:v6};class b6{constructor(){this.spec=null}async parseFromText(t){try{this.spec=JSON.parse(t)}catch{try{this.spec=sm.load(t)}catch{throw new Error("Invalid OpenAPI specification format. Please provide valid JSON or YAML.")}}if(!this.spec)throw new Error("Invalid specification format.");if(this.spec.swagger&&this.spec.swagger.startsWith("2."))this.spec=this.convertSwagger2ToOpenAPI3(this.spec);else if(!this.spec.openapi)throw new Error("Invalid OpenAPI specification. Missing openapi version.");return this.spec}async parseFromFile(t){const r=await t.text();return this.parseFromText(r)}async parseFromUrl(t){try{const r=await fetch(t,{headers:{Accept:"application/json, application/yaml, text/yaml, text/plain"}});if(!r.ok)throw new Error(`Failed to fetch OpenAPI spec: ${r.status} ${r.statusText}`);const n=r.headers.get("content-type")||"",i=await r.text();if(n.includes("application/json")||i.trim().startsWith("{"))try{this.spec=JSON.parse(i)}catch{throw new Error("Invalid JSON format in the fetched specification.")}else try{this.spec=sm.load(i)}catch{throw new Error("Invalid YAML format in the fetched specification.")}if(!this.spec)throw new Error("Invalid specification format.");if(this.spec.swagger&&this.spec.swagger.startsWith("2."))this.spec=this.convertSwagger2ToOpenAPI3(this.spec);else if(!this.spec.openapi)throw new Error("Invalid OpenAPI specification. Missing openapi version.");return this.spec}catch(r){throw r instanceof Error?r:new Error("Failed to fetch or parse the OpenAPI specification from the provided URL.")}}convertSwagger2ToOpenAPI3(t){var n,i,s,a,l,u,h;const r={openapi:"3.0.0",info:{title:((n=t.info)==null?void 0:n.title)||"API",version:((i=t.info)==null?void 0:i.version)||"1.0.0",description:(s=t.info)==null?void 0:s.description,termsOfService:(a=t.info)==null?void 0:a.termsOfService,contact:(l=t.info)==null?void 0:l.contact,license:(u=t.info)==null?void 0:u.license},paths:{}};if(t.host||t.basePath){const x=((h=t.schemes)==null?void 0:h[0])||"https",m=t.host||"localhost",y=t.basePath||"";r.servers=[{url:`${x}://${m}${y}`,description:"Converted from Swagger 2.0"}]}return t.tags&&(r.tags=t.tags),t.paths&&Object.entries(t.paths).forEach(([x,m])=>{const y={};["get","post","put","delete","patch","options","head"].forEach(p=>{m[p]&&(y[p]=this.convertSwagger2Operation(m[p],t.definitions))}),m.parameters&&(y.parameters=m.parameters.map(p=>this.convertSwagger2Parameter(p,t.definitions))),r.paths[x]=y}),t.definitions&&(r.components={schemas:this.convertSwagger2Definitions(t.definitions)}),r}convertSwagger2Operation(t,r){const n={summary:t.summary,description:t.description,operationId:t.operationId,tags:t.tags,deprecated:t.deprecated,responses:{}};if(t.parameters){const i=[];let s=null;t.parameters.forEach(a=>{a.in==="body"?s={description:a.description,required:a.required,content:{"application/json":{schema:this.convertSwagger2Schema(a.schema,r)}}}:a.in==="formData"?(s||(s={content:{"application/x-www-form-urlencoded":{schema:{type:"object",properties:{}}}}}),s.content["application/x-www-form-urlencoded"].schema.properties[a.name]={type:a.type,description:a.description}):i.push(this.convertSwagger2Parameter(a,r))}),i.length>0&&(n.parameters=i),s&&(n.requestBody=s)}return t.responses&&Object.entries(t.responses).forEach(([i,s])=>{n.responses[i]=this.convertSwagger2Response(s,r)}),n}convertSwagger2Parameter(t,r){const n={name:t.name,in:t.in,description:t.description,required:t.required,deprecated:t.deprecated};return t.schema?n.schema=this.convertSwagger2Schema(t.schema,r):n.schema={type:t.type,format:t.format,enum:t.enum,default:t.default},n}convertSwagger2Response(t,r){const n={description:t.description||"Response"};return t.schema&&(n.content={"application/json":{schema:this.convertSwagger2Schema(t.schema,r)}}),t.headers&&(n.headers=t.headers),n}convertSwagger2Schema(t,r){if(!t)return{};if(t.$ref)return{$ref:`#/components/schemas/${t.$ref.replace("#/definitions/","")}`};const n={type:t.type,format:t.format,description:t.description,enum:t.enum,default:t.default,example:t.example};return t.items&&(n.items=this.convertSwagger2Schema(t.items,r)),t.properties&&(n.properties={},Object.entries(t.properties).forEach(([i,s])=>{n.properties[i]=this.convertSwagger2Schema(s,r)})),t.required&&(n.required=t.required),t.allOf&&(n.allOf=t.allOf.map(i=>this.convertSwagger2Schema(i,r))),n}convertSwagger2Definitions(t){const r={};return Object.entries(t).forEach(([n,i])=>{r[n]=this.convertSwagger2Schema(i,t)}),r}extractEndpoints(){if(!this.spec)return[];const t=[],r=this.spec.paths;return Object.entries(r).forEach(([n,i])=>{["get","post","put","delete","patch","options","head","trace"].forEach(a=>{const l=i[a];if(!l)return;const u=this.extractParameters(l.parameters||[],i.parameters||[]),h=n.split("/").filter(Boolean),x=n.includes("{"),m=u.some(k=>k.in==="query"),y=!!l.requestBody,p=Object.keys(l.responses||{}),N={id:`${a.toUpperCase()}_${n.replace(/[^a-zA-Z0-9]/g,"_")}`,path:n,method:a.toUpperCase(),operation:l,tags:l.tags||[],summary:l.summary,description:l.description,parameters:u,requestBody:l.requestBody,responses:this.extractResponses(l.responses),deprecated:l.deprecated||!1,businessContext:this.generateBusinessContext(l),aiSuggestions:this.generateAISuggestions(l,n,a),complexity:this.calculateComplexity(l,u,y),security:l.security,pathSegments:h,hasPathParams:x,hasQueryParams:m,hasRequestBody:y,responseTypes:p,estimatedResponseTime:this.estimateResponseTime(l,u,y)};t.push(N)})}),t}calculateComplexity(t,r,n){let i=0;i+=r.length*.5,n&&(i+=2);const s=Object.keys(t.responses||{}).length;return i+=s*.3,t.security&&t.security.length>0&&(i+=1),t.tags&&t.tags.length>1&&(i+=.5),i<=2?"low":i<=5?"medium":"high"}estimateResponseTime(t,r,n){var s,a,l,u,h;let i=0;return((s=t.operationId)!=null&&s.toLowerCase().includes("get")||(a=t.summary)!=null&&a.toLowerCase().includes("get")||(l=t.summary)!=null&&l.toLowerCase().includes("list"))&&(i-=1),n&&(i+=1),r.length>5&&(i+=1),((u=t.summary)!=null&&u.toLowerCase().includes("search")||(h=t.summary)!=null&&h.toLowerCase().includes("filter")||r.some(x=>x.name.toLowerCase().includes("search")||x.name.toLowerCase().includes("filter")))&&(i+=1),i<=0?"fast":i<=1?"medium":"slow"}extractParameters(t,r){return[...r,...t].map(i=>(i.$ref,i))}extractResponses(t){const r={};return Object.entries(t).forEach(([n,i])=>{i.$ref,r[n]=i}),r}generateBusinessContext(t){var i,s,a,l,u,h,x,m,y,p;const r=((i=t.tags)==null?void 0:i.join(", "))||"General",n=t.summary||"No summary available";return(s=t.summary)!=null&&s.toLowerCase().includes("create")||(a=t.summary)!=null&&a.toLowerCase().includes("add")?`Business Impact: Creates new ${r.toLowerCase()} resources. Use this endpoint to add new data to the system.`:(l=t.summary)!=null&&l.toLowerCase().includes("get")||(u=t.summary)!=null&&u.toLowerCase().includes("list")||(h=t.summary)!=null&&h.toLowerCase().includes("fetch")?`Business Impact: Retrieves ${r.toLowerCase()} information. Use this endpoint to access and display data to users.`:(x=t.summary)!=null&&x.toLowerCase().includes("update")||(m=t.summary)!=null&&m.toLowerCase().includes("modify")?`Business Impact: Updates existing ${r.toLowerCase()} resources. Use this endpoint to modify data based on user actions.`:(y=t.summary)!=null&&y.toLowerCase().includes("delete")||(p=t.summary)!=null&&p.toLowerCase().includes("remove")?`Business Impact: Removes ${r.toLowerCase()} resources. Use this endpoint to clean up or delete data as requested by users.`:`Business Impact: ${n} - Part of ${r} functionality.`}generateAISuggestions(t,r,n){var s,a;const i=[];return n.toLowerCase()==="get"&&r.includes("{id}")?(i.push("💡 Perfect for fetching specific record details in your app"),i.push("🔍 Can be used for detail views, edit forms, or data validation")):n.toLowerCase()==="get"&&!r.includes("{id}")?(i.push("📋 Ideal for listing data in tables, dropdowns, or search results"),i.push("🔄 Consider implementing pagination if not already present")):n.toLowerCase()==="post"?(i.push("✨ Use for creating new records from user forms"),i.push("💾 Remember to validate input data before submission")):n.toLowerCase()==="put"||n.toLowerCase()==="patch"?(i.push("✏️ Perfect for edit forms and data updates"),i.push("🔒 Ensure proper authorization before allowing updates")):n.toLowerCase()==="delete"&&(i.push("🗑️ Implement confirmation dialogs for better UX"),i.push("⚠️ Consider soft deletes for important business data")),(s=t.parameters)!=null&&s.some(l=>{var u;return(u=l.name)==null?void 0:u.toLowerCase().includes("limit")})&&i.push("⚡ Supports pagination - great for performance"),(a=t.parameters)!=null&&a.some(l=>{var u;return(u=l.name)==null?void 0:u.toLowerCase().includes("filter")})&&i.push("🎯 Supports filtering - perfect for search functionality"),i}getAllTags(){var r;if(!this.spec)return[];const t=new Set;return(r=this.spec.tags)==null||r.forEach(n=>t.add(n.name)),Object.values(this.spec.paths).forEach(n=>{["get","post","put","delete","patch","options","head","trace"].forEach(s=>{const a=n[s];a!=null&&a.tags&&a.tags.forEach(l=>t.add(l))})}),Array.from(t).sort()}getAllMethods(){if(!this.spec)return[];const t=new Set;return Object.values(this.spec.paths).forEach(r=>{["get","post","put","delete","patch","options","head","trace"].forEach(n=>{r[n]&&t.add(n.toUpperCase())})}),Array.from(t).sort()}getAllStatusCodes(){if(!this.spec)return[];const t=new Set;return Object.values(this.spec.paths).forEach(r=>{["get","post","put","delete","patch","options","head","trace"].forEach(i=>{const s=r[i];s!=null&&s.responses&&Object.keys(s.responses).forEach(a=>t.add(a))})}),Array.from(t).sort()}getSpec(){return this.spec}}const w6="modulepreload",N6=function(e){return"/"+e},am={},If=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(r.map(u=>{if(u=N6(u),u in am)return;am[u]=!0;const h=u.endsWith(".css"),x=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${x}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":w6,h||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),h)return new Promise((y,p)=>{m.addEventListener("load",y),m.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return i.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}var Or=Uint8Array,mn=Uint16Array,Zp=Int32Array,t0=new Or([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]),r0=new Or([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]),Ff=new Or([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qx=function(e,t){for(var r=new mn(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new Zp(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},zx=qx(t0,2),Ux=zx.b,Tf=zx.r;Ux[28]=258,Tf[258]=28;var $x=qx(r0,0),k6=$x.b,om=$x.r,Of=new mn(32768);for(var It=0;It<32768;++It){var hs=(It&43690)>>1|(It&21845)<<1;hs=(hs&52428)>>2|(hs&13107)<<2,hs=(hs&61680)>>4|(hs&3855)<<4,Of[It]=((hs&65280)>>8|(hs&255)<<8)>>1}var ji=function(e,t,r){for(var n=e.length,i=0,s=new mn(t);i<n;++i)e[i]&&++s[e[i]-1];var a=new mn(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;var l;if(r){l=new mn(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var h=i<<4|e[i],x=t-e[i],m=a[e[i]-1]++<<x,y=m|(1<<x)-1;m<=y;++m)l[Of[m]>>u]=h}else for(l=new mn(n),i=0;i<n;++i)e[i]&&(l[i]=Of[a[e[i]-1]++]>>15-e[i]);return l},Ts=new Or(288);for(var It=0;It<144;++It)Ts[It]=8;for(var It=144;It<256;++It)Ts[It]=9;for(var It=256;It<280;++It)Ts[It]=7;for(var It=280;It<288;++It)Ts[It]=8;var yc=new Or(32);for(var It=0;It<32;++It)yc[It]=5;var j6=ji(Ts,9,0),S6=ji(Ts,9,1),A6=ji(yc,5,0),L6=ji(yc,5,1),Nh=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},Vn=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},kh=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},e1=function(e){return(e+7)/8|0},Hx=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new Or(e.subarray(t,r))},C6=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Kn=function(e,t,r){var n=new Error(t||C6[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Kn),!r)throw n;return n},_6=function(e,t,r,n){var i=e.length,s=0;if(!i||t.f&&!t.l)return r||new Or(0);var a=!r,l=a||t.i!=2,u=t.i;a&&(r=new Or(i*3));var h=function(me){var we=r.length;if(me>we){var Pe=new Or(Math.max(we*2,me));Pe.set(r),r=Pe}},x=t.f||0,m=t.p||0,y=t.b||0,p=t.l,N=t.d,k=t.m,M=t.n,b=i*8;do{if(!p){x=Vn(e,m,1);var w=Vn(e,m+1,3);if(m+=3,w)if(w==1)p=S6,N=L6,k=9,M=5;else if(w==2){var le=Vn(e,m,31)+257,D=Vn(e,m+10,15)+4,R=le+Vn(e,m+5,31)+1;m+=14;for(var Z=new Or(R),G=new Or(19),P=0;P<D;++P)G[Ff[P]]=Vn(e,m+P*3,7);m+=D*3;for(var I=Nh(G),Y=(1<<I)-1,F=ji(G,I,1),P=0;P<R;){var de=F[Vn(e,m,Y)];m+=de&15;var L=de>>4;if(L<16)Z[P++]=L;else{var ie=0,he=0;for(L==16?(he=3+Vn(e,m,3),m+=2,ie=Z[P-1]):L==17?(he=3+Vn(e,m,7),m+=3):L==18&&(he=11+Vn(e,m,127),m+=7);he--;)Z[P++]=ie}}var W=Z.subarray(0,le),te=Z.subarray(le);k=Nh(W),M=Nh(te),p=ji(W,k,1),N=ji(te,M,1)}else Kn(1);else{var L=e1(m)+4,$=e[L-4]|e[L-3]<<8,J=L+$;if(J>i){u&&Kn(0);break}l&&h(y+$),r.set(e.subarray(L,J),y),t.b=y+=$,t.p=m=J*8,t.f=x;continue}if(m>b){u&&Kn(0);break}}l&&h(y+131072);for(var se=(1<<k)-1,ye=(1<<M)-1,j=m;;j=m){var ie=p[kh(e,m)&se],T=ie>>4;if(m+=ie&15,m>b){u&&Kn(0);break}if(ie||Kn(2),T<256)r[y++]=T;else if(T==256){j=m,p=null;break}else{var B=T-254;if(T>264){var P=T-257,K=t0[P];B=Vn(e,m,(1<<K)-1)+Ux[P],m+=K}var ee=N[kh(e,m)&ye],z=ee>>4;ee||Kn(3),m+=ee&15;var te=k6[z];if(z>3){var K=r0[z];te+=kh(e,m)&(1<<K)-1,m+=K}if(m>b){u&&Kn(0);break}l&&h(y+131072);var X=y+B;if(y<te){var ae=s-te,ke=Math.min(te,X);for(ae+y<0&&Kn(3);y<ke;++y)r[y]=n[ae+y]}for(;y<X;++y)r[y]=r[y-te]}}t.l=p,t.p=j,t.b=y,t.f=x,p&&(x=1,t.m=k,t.d=N,t.n=M)}while(!x);return y!=r.length&&a?Hx(r,0,y):r.subarray(0,y)},Di=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},Cl=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},jh=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:Vx,l:0};if(i==1){var a=new Or(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(J,le){return J.f-le.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],h=0,x=1,m=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};x!=i-1;)l=r[r[h].f<r[m].f?h++:m++],u=r[h!=x&&r[h].f<r[m].f?h++:m++],r[x++]={s:-1,f:l.f+u.f,l,r:u};for(var y=s[0].s,n=1;n<i;++n)s[n].s>y&&(y=s[n].s);var p=new mn(y+1),N=Mf(r[x-1],p,0);if(N>t){var n=0,k=0,M=N-t,b=1<<M;for(s.sort(function(le,D){return p[D.s]-p[le.s]||le.f-D.f});n<i;++n){var w=s[n].s;if(p[w]>t)k+=b-(1<<N-p[w]),p[w]=t;else break}for(k>>=M;k>0;){var L=s[n].s;p[L]<t?k-=1<<t-p[L]++-1:++n}for(;n>=0&&k;--n){var $=s[n].s;p[$]==t&&(--p[$],++k)}N=t}return{t:new Or(p),l:N}},Mf=function(e,t,r){return e.s==-1?Math.max(Mf(e.l,t,r+1),Mf(e.r,t,r+1)):t[e.s]=r},lm=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new mn(++t),n=0,i=e[0],s=1,a=function(u){r[n++]=u},l=1;l<=t;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[l]}return{c:r.subarray(0,n),n:t}},_l=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},Wx=function(e,t,r){var n=r.length,i=e1(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},cm=function(e,t,r,n,i,s,a,l,u,h,x){Di(t,x++,r),++i[256];for(var m=jh(i,15),y=m.t,p=m.l,N=jh(s,15),k=N.t,M=N.l,b=lm(y),w=b.c,L=b.n,$=lm(k),J=$.c,le=$.n,D=new mn(19),R=0;R<w.length;++R)++D[w[R]&31];for(var R=0;R<J.length;++R)++D[J[R]&31];for(var Z=jh(D,7),G=Z.t,P=Z.l,I=19;I>4&&!G[Ff[I-1]];--I);var Y=h+5<<3,F=_l(i,Ts)+_l(s,yc)+a,de=_l(i,y)+_l(s,k)+a+14+3*I+_l(D,G)+2*D[16]+3*D[17]+7*D[18];if(u>=0&&Y<=F&&Y<=de)return Wx(t,x,e.subarray(u,u+h));var ie,he,W,te;if(Di(t,x,1+(de<F)),x+=2,de<F){ie=ji(y,p,0),he=y,W=ji(k,M,0),te=k;var se=ji(G,P,0);Di(t,x,L-257),Di(t,x+5,le-1),Di(t,x+10,I-4),x+=14;for(var R=0;R<I;++R)Di(t,x+3*R,G[Ff[R]]);x+=3*I;for(var ye=[w,J],j=0;j<2;++j)for(var T=ye[j],R=0;R<T.length;++R){var B=T[R]&31;Di(t,x,se[B]),x+=G[B],B>15&&(Di(t,x,T[R]>>5&127),x+=T[R]>>12)}}else ie=j6,he=Ts,W=A6,te=yc;for(var R=0;R<l;++R){var K=n[R];if(K>255){var B=K>>18&31;Cl(t,x,ie[B+257]),x+=he[B+257],B>7&&(Di(t,x,K>>23&31),x+=t0[B]);var ee=K&31;Cl(t,x,W[ee]),x+=te[ee],ee>3&&(Cl(t,x,K>>5&8191),x+=r0[ee])}else Cl(t,x,ie[K]),x+=he[K]}return Cl(t,x,ie[256]),x+he[256]},P6=new Zp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Vx=new Or(0),E6=function(e,t,r,n,i,s){var a=s.z||e.length,l=new Or(n+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(n,l.length-i),h=s.l,x=(s.r||0)&7;if(t){x&&(u[0]=s.r>>3);for(var m=P6[t-1],y=m>>13,p=m&8191,N=(1<<r)-1,k=s.p||new mn(32768),M=s.h||new mn(N+1),b=Math.ceil(r/3),w=2*b,L=function(We){return(e[We]^e[We+1]<<b^e[We+2]<<w)&N},$=new Zp(25e3),J=new mn(288),le=new mn(32),D=0,R=0,Z=s.i||0,G=0,P=s.w||0,I=0;Z+2<a;++Z){var Y=L(Z),F=Z&32767,de=M[Y];if(k[F]=de,M[Y]=F,P<=Z){var ie=a-Z;if((D>7e3||G>24576)&&(ie>423||!h)){x=cm(e,u,0,$,J,le,R,G,I,Z-I,x),G=D=R=0,I=Z;for(var he=0;he<286;++he)J[he]=0;for(var he=0;he<30;++he)le[he]=0}var W=2,te=0,se=p,ye=F-de&32767;if(ie>2&&Y==L(Z-ye))for(var j=Math.min(y,ie)-1,T=Math.min(32767,Z),B=Math.min(258,ie);ye<=T&&--se&&F!=de;){if(e[Z+W]==e[Z+W-ye]){for(var K=0;K<B&&e[Z+K]==e[Z+K-ye];++K);if(K>W){if(W=K,te=ye,K>j)break;for(var ee=Math.min(ye,K-2),z=0,he=0;he<ee;++he){var X=Z-ye+he&32767,ae=k[X],ke=X-ae&32767;ke>z&&(z=ke,de=X)}}}F=de,de=k[F],ye+=F-de&32767}if(te){$[G++]=268435456|Tf[W]<<18|om[te];var me=Tf[W]&31,we=om[te]&31;R+=t0[me]+r0[we],++J[257+me],++le[we],P=Z+W,++D}else $[G++]=e[Z],++J[e[Z]]}}for(Z=Math.max(Z,P);Z<a;++Z)$[G++]=e[Z],++J[e[Z]];x=cm(e,u,h,$,J,le,R,G,I,Z-I,x),h||(s.r=x&7|u[x/8|0]<<3,x-=7,s.h=M,s.p=k,s.i=Z,s.w=P)}else{for(var Z=s.w||0;Z<a+h;Z+=65535){var Pe=Z+65535;Pe>=a&&(u[x/8|0]=h,Pe=a),x=Wx(u,x+1,e.subarray(Z,Pe))}s.i=a}return Hx(l,0,n+e1(x)+i)},Gx=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,s=r.length|0,a=0;a!=s;){for(var l=Math.min(a+2655,s);a<l;++a)i+=n+=r[a];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}e=n,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},I6=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new Or(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return E6(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},Yx=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},F6=function(e,t){var r=t.level,n=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=Gx();i.p(t.dictionary),Yx(e,2,i.d())}},T6=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Kn(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&Kn(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function Df(e,t){t||(t={});var r=Gx();r.p(e);var n=I6(e,t,t.dictionary?6:2,4);return F6(n,t),Yx(n,n.length-4,r.d()),n}function O6(e,t){return _6(e.subarray(T6(e,t),-4),{i:2},t,t)}var M6=typeof TextDecoder<"u"&&new TextDecoder,D6=0;try{M6.decode(Vx,{stream:!0}),D6=1}catch{}var tt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Sh(){tt.console&&typeof tt.console.log=="function"&&tt.console.log.apply(tt.console,arguments)}var Lt={log:Sh,warn:function(e){tt.console&&(typeof tt.console.warn=="function"?tt.console.warn.apply(tt.console,arguments):Sh.call(null,arguments))},error:function(e){tt.console&&(typeof tt.console.error=="function"?tt.console.error.apply(tt.console,arguments):Sh(e))}};function Ah(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){ta(n.response,t,r)},n.onerror=function(){Lt.error("could not download file")},n.send()}function um(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Eu(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Gl,Rf,ta=tt.saveAs||((typeof window>"u"?"undefined":Nt(window))!=="object"||window!==tt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var n=tt.URL||tt.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?um(i.href)?Ah(e,t,r):Eu(i,i.target="_blank"):Eu(i)):(i.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Eu(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e=="string")if(um(e))Ah(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){Eu(n)})}else navigator.msSaveOrOpenBlob(function(i,s){return s===void 0?s={autoBom:!1}:Nt(s)!=="object"&&(Lt.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(e,r),t)}:function(e,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return Ah(e,t,r);var i=e.type==="application/octet-stream",s=/constructor/i.test(tt.HTMLElement)||tt.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||i&&s)&&(typeof FileReader>"u"?"undefined":Nt(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var x=l.result;x=a?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=x:location=x,n=null},l.readAsDataURL(e)}else{var u=tt.URL||tt.webkitURL,h=u.createObjectURL(e);n?n.location=h:location.href=h,n=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function Kx(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={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"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,s=r[n].process,a=i.exec(e);a&&(t=s(a),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),u=this.g.toString(16),h=this.b.toString(16);return l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),"#"+l+u+h}}/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function Lh(e,t){var r=e[0],n=e[1],i=e[2],s=e[3];r=Pr(r,n,i,s,t[0],7,-680876936),s=Pr(s,r,n,i,t[1],12,-389564586),i=Pr(i,s,r,n,t[2],17,606105819),n=Pr(n,i,s,r,t[3],22,-1044525330),r=Pr(r,n,i,s,t[4],7,-176418897),s=Pr(s,r,n,i,t[5],12,1200080426),i=Pr(i,s,r,n,t[6],17,-1473231341),n=Pr(n,i,s,r,t[7],22,-45705983),r=Pr(r,n,i,s,t[8],7,1770035416),s=Pr(s,r,n,i,t[9],12,-1958414417),i=Pr(i,s,r,n,t[10],17,-42063),n=Pr(n,i,s,r,t[11],22,-1990404162),r=Pr(r,n,i,s,t[12],7,1804603682),s=Pr(s,r,n,i,t[13],12,-40341101),i=Pr(i,s,r,n,t[14],17,-1502002290),r=Er(r,n=Pr(n,i,s,r,t[15],22,1236535329),i,s,t[1],5,-165796510),s=Er(s,r,n,i,t[6],9,-1069501632),i=Er(i,s,r,n,t[11],14,643717713),n=Er(n,i,s,r,t[0],20,-373897302),r=Er(r,n,i,s,t[5],5,-701558691),s=Er(s,r,n,i,t[10],9,38016083),i=Er(i,s,r,n,t[15],14,-660478335),n=Er(n,i,s,r,t[4],20,-405537848),r=Er(r,n,i,s,t[9],5,568446438),s=Er(s,r,n,i,t[14],9,-1019803690),i=Er(i,s,r,n,t[3],14,-187363961),n=Er(n,i,s,r,t[8],20,1163531501),r=Er(r,n,i,s,t[13],5,-1444681467),s=Er(s,r,n,i,t[2],9,-51403784),i=Er(i,s,r,n,t[7],14,1735328473),r=Ir(r,n=Er(n,i,s,r,t[12],20,-1926607734),i,s,t[5],4,-378558),s=Ir(s,r,n,i,t[8],11,-2022574463),i=Ir(i,s,r,n,t[11],16,1839030562),n=Ir(n,i,s,r,t[14],23,-35309556),r=Ir(r,n,i,s,t[1],4,-1530992060),s=Ir(s,r,n,i,t[4],11,1272893353),i=Ir(i,s,r,n,t[7],16,-155497632),n=Ir(n,i,s,r,t[10],23,-1094730640),r=Ir(r,n,i,s,t[13],4,681279174),s=Ir(s,r,n,i,t[0],11,-358537222),i=Ir(i,s,r,n,t[3],16,-722521979),n=Ir(n,i,s,r,t[6],23,76029189),r=Ir(r,n,i,s,t[9],4,-640364487),s=Ir(s,r,n,i,t[12],11,-421815835),i=Ir(i,s,r,n,t[15],16,530742520),r=Fr(r,n=Ir(n,i,s,r,t[2],23,-995338651),i,s,t[0],6,-198630844),s=Fr(s,r,n,i,t[7],10,1126891415),i=Fr(i,s,r,n,t[14],15,-1416354905),n=Fr(n,i,s,r,t[5],21,-57434055),r=Fr(r,n,i,s,t[12],6,1700485571),s=Fr(s,r,n,i,t[3],10,-1894986606),i=Fr(i,s,r,n,t[10],15,-1051523),n=Fr(n,i,s,r,t[1],21,-2054922799),r=Fr(r,n,i,s,t[8],6,1873313359),s=Fr(s,r,n,i,t[15],10,-30611744),i=Fr(i,s,r,n,t[6],15,-1560198380),n=Fr(n,i,s,r,t[13],21,1309151649),r=Fr(r,n,i,s,t[4],6,-145523070),s=Fr(s,r,n,i,t[11],10,-1120210379),i=Fr(i,s,r,n,t[2],15,718787259),n=Fr(n,i,s,r,t[9],21,-343485551),e[0]=ws(r,e[0]),e[1]=ws(n,e[1]),e[2]=ws(i,e[2]),e[3]=ws(s,e[3])}function n0(e,t,r,n,i,s){return t=ws(ws(t,e),ws(n,s)),ws(t<<i|t>>>32-i,r)}function Pr(e,t,r,n,i,s,a){return n0(t&r|~t&n,e,t,i,s,a)}function Er(e,t,r,n,i,s,a){return n0(t&n|r&~n,e,t,i,s,a)}function Ir(e,t,r,n,i,s,a){return n0(t^r^n,e,t,i,s,a)}function Fr(e,t,r,n,i,s,a){return n0(r^(t|~n),e,t,i,s,a)}function Jx(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)Lh(n,R6(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(Lh(n,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,Lh(n,i),n}function R6(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}Gl=tt.atob.bind(tt),Rf=tt.btoa.bind(tt);var dm="0123456789abcdef".split("");function B6(e){for(var t="",r=0;r<4;r++)t+=dm[e>>8*r+4&15]+dm[e>>8*r&15];return t}function q6(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function Bf(e){return Jx(e).map(q6).join("")}var z6=function(e){for(var t=0;t<e.length;t++)e[t]=B6(e[t]);return e.join("")}(Jx("hello"))!="5d41402abc4b2a76b9719d911017c592";function ws(e,t){if(z6){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295}/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function qf(e,t){var r,n,i,s;if(e!==r){for(var a=(i=e,s=1+(256/e.length>>0),new Array(s+1).join(i)),l=[],u=0;u<256;u++)l[u]=u;var h=0;for(u=0;u<256;u++){var x=l[u];h=(h+x+a.charCodeAt(u))%256,l[u]=l[h],l[h]=x}r=e,n=l}else l=n;var m=t.length,y=0,p=0,N="";for(u=0;u<m;u++)p=(p+(x=l[y=(y+1)%256]))%256,l[y]=l[p],l[p]=x,a=l[(l[y]+l[p])%256],N+=String.fromCharCode(t.charCodeAt(u)^a);return N}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var hm={print:4,modify:8,copy:16,"annot-forms":32};function no(e,t,r,n){this.v=1,this.r=2;var i=192;e.forEach(function(l){if(hm.perm!==void 0)throw new Error("Invalid permission: "+l);i+=hm[l]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(t+this.padding).substr(0,32),a=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,a),this.P=-(1+(255^i)),this.encryptionKey=Bf(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=qf(this.encryptionKey,this.padding)}function io(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?t+="#"+("0"+i.toString(16)).slice(-2):t+=e[n]}return t}function fm(e){if(Nt(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,i){if(i=i||!1,typeof r!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var s=Math.random().toString(35);return t[r][s]=[n,!!i],s},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var s in t[r]){var a=t[r][s];try{a[0].apply(e,n)}catch(l){tt.console&&Lt.error("jsPDF PubSub Error",l.message,l)}a[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Fd(e){if(!(this instanceof Fd))return new Fd(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function Xx(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function ra(e,t,r,n,i){if(!(this instanceof ra))return new ra(e,t,r,n,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,Xx.call(this,n,i)}function bo(e,t,r,n,i){if(!(this instanceof bo))return new bo(e,t,r,n,i);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,Xx.call(this,n,i)}function et(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],s=arguments[3],a=[],l=1,u=16,h="S",x=null;Nt(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,i=e.format||i,s=e.compress||e.compressPdf||s,(x=e.encryption||null)!==null&&(x.userPassword=x.userPassword||"",x.ownerPassword=x.ownerPassword||"",x.userPermissions=x.userPermissions||[]),l=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),h=e.defaultPathOperation||"S"),a=e.filters||(s===!0?["FlateEncode"]:a),n=n||"mm",r=(""+(r||"P")).toLowerCase();var m=e.putOnlyUsedFonts||!1,y={},p={internal:{},__private__:{}};p.__private__.PubSub=fm;var N="1.3",k=p.__private__.getPdfVersion=function(){return N};p.__private__.setPdfVersion=function(f){N=f};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return M};var b=p.__private__.getPageFormat=function(f){return M[f]};i=i||"a4";var w={COMPAT:"compat",ADVANCED:"advanced"},L=w.COMPAT;function $(){this.saveGraphicsState(),V(new Ze(Me,0,0,-Me,0,Zi()*Me).toString()+" cm"),this.setFontSize(this.getFontSize()/Me),h="n",L=w.ADVANCED}function J(){this.restoreGraphicsState(),h="S",L=w.COMPAT}var le=p.__private__.combineFontStyleAndFontWeight=function(f,A){if(f=="bold"&&A=="normal"||f=="bold"&&A==400||f=="normal"&&A=="italic"||f=="bold"&&A=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return A&&(f=A==400||A==="normal"?f==="italic"?"italic":"normal":A!=700&&A!=="bold"||f!=="normal"?(A==700?"bold":A)+""+f:"bold"),f};p.advancedAPI=function(f){var A=L===w.COMPAT;return A&&$.call(this),typeof f!="function"||(f(this),A&&J.call(this)),this},p.compatAPI=function(f){var A=L===w.ADVANCED;return A&&J.call(this),typeof f!="function"||(f(this),A&&$.call(this)),this},p.isAdvancedAPI=function(){return L===w.ADVANCED};var D,R=function(f){if(L!==w.ADVANCED)throw new Error(f+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},Z=p.roundToPrecision=p.__private__.roundToPrecision=function(f,A){var H=t||A;if(isNaN(f)||isNaN(H))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return f.toFixed(H).replace(/0+$/,"")};D=p.hpf=p.__private__.hpf=typeof u=="number"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(f,u)}:u==="smart"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(f,f>-1&&f<1?16:5)}:function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return Z(f,16)};var G=p.f2=p.__private__.f2=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f2");return Z(f,2)},P=p.__private__.f3=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f3");return Z(f,3)},I=p.scale=p.__private__.scale=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.scale");return L===w.COMPAT?f*Me:L===w.ADVANCED?f:void 0},Y=function(f){return L===w.COMPAT?Zi()-f:L===w.ADVANCED?f:void 0},F=function(f){return I(Y(f))};p.__private__.setPrecision=p.setPrecision=function(f){typeof parseInt(f,10)=="number"&&(t=parseInt(f,10))};var de,ie="00000000000000000000000000000000",he=p.__private__.getFileId=function(){return ie},W=p.__private__.setFileId=function(f){return ie=f!==void 0&&/^[a-fA-F0-9]{32}$/.test(f)?f.toUpperCase():ie.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),x!==null&&(Ar=new no(x.userPermissions,x.userPassword,x.ownerPassword,ie)),ie};p.setFileId=function(f){return W(f),this},p.getFileId=function(){return he()};var te=p.__private__.convertDateToPDFDate=function(f){var A=f.getTimezoneOffset(),H=A<0?"+":"-",Q=Math.floor(Math.abs(A/60)),fe=Math.abs(A%60),Ne=[H,B(Q),"'",B(fe),"'"].join("");return["D:",f.getFullYear(),B(f.getMonth()+1),B(f.getDate()),B(f.getHours()),B(f.getMinutes()),B(f.getSeconds()),Ne].join("")},se=p.__private__.convertPDFDateToDate=function(f){var A=parseInt(f.substr(2,4),10),H=parseInt(f.substr(6,2),10)-1,Q=parseInt(f.substr(8,2),10),fe=parseInt(f.substr(10,2),10),Ne=parseInt(f.substr(12,2),10),Ee=parseInt(f.substr(14,2),10);return new Date(A,H,Q,fe,Ne,Ee,0)},ye=p.__private__.setCreationDate=function(f){var A;if(f===void 0&&(f=new Date),f instanceof Date)A=te(f);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(f))throw new Error("Invalid argument passed to jsPDF.setCreationDate");A=f}return de=A},j=p.__private__.getCreationDate=function(f){var A=de;return f==="jsDate"&&(A=se(de)),A};p.setCreationDate=function(f){return ye(f),this},p.getCreationDate=function(f){return j(f)};var T,B=p.__private__.padd2=function(f){return("0"+parseInt(f)).slice(-2)},K=p.__private__.padd2Hex=function(f){return("00"+(f=f.toString())).substr(f.length)},ee=0,z=[],X=[],ae=0,ke=[],me=[],we=!1,Pe=X,We=function(){ee=0,ae=0,X=[],z=[],ke=[],Li=tr(),Dn=tr()};p.__private__.setCustomOutputDestination=function(f){we=!0,Pe=f};var xe=function(f){we||(Pe=f)};p.__private__.resetCustomOutputDestination=function(){we=!1,Pe=X};var V=p.__private__.out=function(f){return f=f.toString(),ae+=f.length+1,Pe.push(f),Pe},nt=p.__private__.write=function(f){return V(arguments.length===1?f.toString():Array.prototype.join.call(arguments," "))},Ge=p.__private__.getArrayBuffer=function(f){for(var A=f.length,H=new ArrayBuffer(A),Q=new Uint8Array(H);A--;)Q[A]=f.charCodeAt(A);return H},Ie=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ie};var Oe=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(f){return Oe=L===w.ADVANCED?f/Me:f,this};var Re,q=p.__private__.getFontSize=p.getFontSize=function(){return L===w.COMPAT?Oe:Oe*Me},ue=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(f){return ue=f,this},p.__private__.getR2L=p.getR2L=function(){return ue};var Ce,Ae=p.__private__.setZoomMode=function(f){var A=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(f))Re=f;else if(isNaN(f)){if(A.indexOf(f)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+f+'" is not recognized.');Re=f}else Re=parseInt(f,10)};p.__private__.getZoomMode=function(){return Re};var ve,Ye=p.__private__.setPageMode=function(f){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(f)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+f+'" is not recognized.');Ce=f};p.__private__.getPageMode=function(){return Ce};var qe=p.__private__.setLayoutMode=function(f){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(f)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+f+'" is not recognized.');ve=f};p.__private__.getLayoutMode=function(){return ve},p.__private__.setDisplayMode=p.setDisplayMode=function(f,A,H){return Ae(f),qe(A),Ye(H),this};var He={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(f){if(Object.keys(He).indexOf(f)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return He[f]},p.__private__.getDocumentProperties=function(){return He},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(f){for(var A in He)He.hasOwnProperty(A)&&f[A]&&(He[A]=f[A]);return this},p.__private__.setDocumentProperty=function(f,A){if(Object.keys(He).indexOf(f)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return He[f]=A};var it,Me,Gt,dt,Vr,St={},Tt={},si=[],yt={},qs={},zt={},On={},Ai=null,Ut=0,at=[],vt=new fm(p),zs=e.hotfixes||[],vr={},ai={},oi=[],Ze=function f(A,H,Q,fe,Ne,Ee){if(!(this instanceof f))return new f(A,H,Q,fe,Ne,Ee);isNaN(A)&&(A=1),isNaN(H)&&(H=0),isNaN(Q)&&(Q=0),isNaN(fe)&&(fe=1),isNaN(Ne)&&(Ne=0),isNaN(Ee)&&(Ee=0),this._matrix=[A,H,Q,fe,Ne,Ee]};Object.defineProperty(Ze.prototype,"sx",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Ze.prototype,"shy",{get:function(){return this._matrix[1]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Ze.prototype,"shx",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Ze.prototype,"sy",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Ze.prototype,"tx",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Ze.prototype,"ty",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Ze.prototype,"a",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Ze.prototype,"b",{get:function(){return this._matrix[1]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Ze.prototype,"c",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Ze.prototype,"d",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Ze.prototype,"e",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Ze.prototype,"f",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Ze.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ze.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ze.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ze.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ze.prototype.join=function(f){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(D).join(f)},Ze.prototype.multiply=function(f){var A=f.sx*this.sx+f.shy*this.shx,H=f.sx*this.shy+f.shy*this.sy,Q=f.shx*this.sx+f.sy*this.shx,fe=f.shx*this.shy+f.sy*this.sy,Ne=f.tx*this.sx+f.ty*this.shx+this.tx,Ee=f.tx*this.shy+f.ty*this.sy+this.ty;return new Ze(A,H,Q,fe,Ne,Ee)},Ze.prototype.decompose=function(){var f=this.sx,A=this.shy,H=this.shx,Q=this.sy,fe=this.tx,Ne=this.ty,Ee=Math.sqrt(f*f+A*A),ze=(f/=Ee)*H+(A/=Ee)*Q;H-=f*ze,Q-=A*ze;var Xe=Math.sqrt(H*H+Q*Q);return ze/=Xe,f*(Q/=Xe)<A*(H/=Xe)&&(f=-f,A=-A,ze=-ze,Ee=-Ee),{scale:new Ze(Ee,0,0,Xe,0,0),translate:new Ze(1,0,0,1,fe,Ne),rotate:new Ze(f,A,-A,f,0,0),skew:new Ze(1,0,ze,1,0,0)}},Ze.prototype.toString=function(f){return this.join(" ")},Ze.prototype.inversed=function(){var f=this.sx,A=this.shy,H=this.shx,Q=this.sy,fe=this.tx,Ne=this.ty,Ee=1/(f*Q-A*H),ze=Q*Ee,Xe=-A*Ee,ct=-H*Ee,ot=f*Ee;return new Ze(ze,Xe,ct,ot,-ze*fe-ct*Ne,-Xe*fe-ot*Ne)},Ze.prototype.applyToPoint=function(f){var A=f.x*this.sx+f.y*this.shx+this.tx,H=f.x*this.shy+f.y*this.sy+this.ty;return new Ma(A,H)},Ze.prototype.applyToRectangle=function(f){var A=this.applyToPoint(f),H=this.applyToPoint(new Ma(f.x+f.w,f.y+f.h));return new el(A.x,A.y,H.x-A.x,H.y-A.y)},Ze.prototype.clone=function(){var f=this.sx,A=this.shy,H=this.shx,Q=this.sy,fe=this.tx,Ne=this.ty;return new Ze(f,A,H,Q,fe,Ne)},p.Matrix=Ze;var Mn=p.matrixMult=function(f,A){return A.multiply(f)},li=new Ze(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=li;var Gr=function(f,A){if(!qs[f]){var H=(A instanceof ra?"Sh":"P")+(Object.keys(yt).length+1).toString(10);A.id=H,qs[f]=H,yt[H]=A,vt.publish("addPattern",A)}};p.ShadingPattern=ra,p.TilingPattern=bo,p.addShadingPattern=function(f,A){return R("addShadingPattern()"),Gr(f,A),this},p.beginTilingPattern=function(f){R("beginTilingPattern()"),Uc(f.boundingBox[0],f.boundingBox[1],f.boundingBox[2]-f.boundingBox[0],f.boundingBox[3]-f.boundingBox[1],f.matrix)},p.endTilingPattern=function(f,A){R("endTilingPattern()"),A.stream=me[T].join(`
`),Gr(f,A),vt.publish("endTilingPattern",A),oi.pop().restore()};var or=p.__private__.newObject=function(){var f=tr();return on(f,!0),f},tr=p.__private__.newObjectDeferred=function(){return ee++,z[ee]=function(){return ae},ee},on=function(f,A){return A=typeof A=="boolean"&&A,z[f]=ae,A&&V(f+" 0 obj"),f},ka=p.__private__.newAdditionalObject=function(){var f={objId:tr(),content:""};return ke.push(f),f},Li=tr(),Dn=tr(),Rn=p.__private__.decodeColorString=function(f){var A=f.split(" ");if(A.length!==2||A[1]!=="g"&&A[1]!=="G")A.length===5&&(A[4]==="k"||A[4]==="K")&&(A=[(1-A[0])*(1-A[3]),(1-A[1])*(1-A[3]),(1-A[2])*(1-A[3]),"r"]);else{var H=parseFloat(A[0]);A=[H,H,H,"r"]}for(var Q="#",fe=0;fe<3;fe++)Q+=("0"+Math.floor(255*parseFloat(A[fe])).toString(16)).slice(-2);return Q},Bn=p.__private__.encodeColorString=function(f){var A;typeof f=="string"&&(f={ch1:f});var H=f.ch1,Q=f.ch2,fe=f.ch3,Ne=f.ch4,Ee=f.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof H=="string"&&H.charAt(0)!=="#"){var ze=new Kx(H);if(ze.ok)H=ze.toHex();else if(!/^\d*\.?\d*$/.test(H))throw new Error('Invalid color "'+H+'" passed to jsPDF.encodeColorString.')}if(typeof H=="string"&&/^#[0-9A-Fa-f]{3}$/.test(H)&&(H="#"+H[1]+H[1]+H[2]+H[2]+H[3]+H[3]),typeof H=="string"&&/^#[0-9A-Fa-f]{6}$/.test(H)){var Xe=parseInt(H.substr(1),16);H=Xe>>16&255,Q=Xe>>8&255,fe=255&Xe}if(Q===void 0||Ne===void 0&&H===Q&&Q===fe)if(typeof H=="string")A=H+" "+Ee[0];else switch(f.precision){case 2:A=G(H/255)+" "+Ee[0];break;case 3:default:A=P(H/255)+" "+Ee[0]}else if(Ne===void 0||Nt(Ne)==="object"){if(Ne&&!isNaN(Ne.a)&&Ne.a===0)return A=["1.","1.","1.",Ee[1]].join(" ");if(typeof H=="string")A=[H,Q,fe,Ee[1]].join(" ");else switch(f.precision){case 2:A=[G(H/255),G(Q/255),G(fe/255),Ee[1]].join(" ");break;default:case 3:A=[P(H/255),P(Q/255),P(fe/255),Ee[1]].join(" ")}}else if(typeof H=="string")A=[H,Q,fe,Ne,Ee[2]].join(" ");else switch(f.precision){case 2:A=[G(H),G(Q),G(fe),G(Ne),Ee[2]].join(" ");break;case 3:default:A=[P(H),P(Q),P(fe),P(Ne),Ee[2]].join(" ")}return A},ci=p.__private__.getFilters=function(){return a},wn=p.__private__.putStream=function(f){var A=(f=f||{}).data||"",H=f.filters||ci(),Q=f.alreadyAppliedFilters||[],fe=f.addLength1||!1,Ne=A.length,Ee=f.objectId,ze=function(Lr){return Lr};if(x!==null&&Ee===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");x!==null&&(ze=Ar.encryptor(Ee,0));var Xe={};H===!0&&(H=["FlateEncode"]);var ct=f.additionalKeyValues||[],ot=(Xe=et.API.processDataByFilters!==void 0?et.API.processDataByFilters(A,H):{data:A,reverseChain:[]}).reverseChain+(Array.isArray(Q)?Q.join(" "):Q.toString());if(Xe.data.length!==0&&(ct.push({key:"Length",value:Xe.data.length}),fe===!0&&ct.push({key:"Length1",value:Ne})),ot.length!=0)if(ot.split("/").length-1==1)ct.push({key:"Filter",value:ot});else{ct.push({key:"Filter",value:"["+ot+"]"});for(var pt=0;pt<ct.length;pt+=1)if(ct[pt].key==="DecodeParms"){for(var Dt=[],$t=0;$t<Xe.reverseChain.split("/").length-1;$t+=1)Dt.push("null");Dt.push(ct[pt].value),ct[pt].value="["+Dt.join(" ")+"]"}}V("<<");for(var rr=0;rr<ct.length;rr++)V("/"+ct[rr].key+" "+ct[rr].value);V(">>"),Xe.data.length!==0&&(V("stream"),V(ze(Xe.data)),V("endstream"))},ui=p.__private__.putPage=function(f){var A=f.number,H=f.data,Q=f.objId,fe=f.contentsObjId;on(Q,!0),V("<</Type /Page"),V("/Parent "+f.rootDictionaryObjId+" 0 R"),V("/Resources "+f.resourceDictionaryObjId+" 0 R"),V("/MediaBox ["+parseFloat(D(f.mediaBox.bottomLeftX))+" "+parseFloat(D(f.mediaBox.bottomLeftY))+" "+D(f.mediaBox.topRightX)+" "+D(f.mediaBox.topRightY)+"]"),f.cropBox!==null&&V("/CropBox ["+D(f.cropBox.bottomLeftX)+" "+D(f.cropBox.bottomLeftY)+" "+D(f.cropBox.topRightX)+" "+D(f.cropBox.topRightY)+"]"),f.bleedBox!==null&&V("/BleedBox ["+D(f.bleedBox.bottomLeftX)+" "+D(f.bleedBox.bottomLeftY)+" "+D(f.bleedBox.topRightX)+" "+D(f.bleedBox.topRightY)+"]"),f.trimBox!==null&&V("/TrimBox ["+D(f.trimBox.bottomLeftX)+" "+D(f.trimBox.bottomLeftY)+" "+D(f.trimBox.topRightX)+" "+D(f.trimBox.topRightY)+"]"),f.artBox!==null&&V("/ArtBox ["+D(f.artBox.bottomLeftX)+" "+D(f.artBox.bottomLeftY)+" "+D(f.artBox.topRightX)+" "+D(f.artBox.topRightY)+"]"),typeof f.userUnit=="number"&&f.userUnit!==1&&V("/UserUnit "+f.userUnit),vt.publish("putPage",{objId:Q,pageContext:at[A],pageNumber:A,page:H}),V("/Contents "+fe+" 0 R"),V(">>"),V("endobj");var Ne=H.join(`
`);return L===w.ADVANCED&&(Ne+=`
Q`),on(fe,!0),wn({data:Ne,filters:ci(),objectId:fe}),V("endobj"),Q},Us=p.__private__.putPages=function(){var f,A,H=[];for(f=1;f<=Ut;f++)at[f].objId=tr(),at[f].contentsObjId=tr();for(f=1;f<=Ut;f++)H.push(ui({number:f,data:me[f],objId:at[f].objId,contentsObjId:at[f].contentsObjId,mediaBox:at[f].mediaBox,cropBox:at[f].cropBox,bleedBox:at[f].bleedBox,trimBox:at[f].trimBox,artBox:at[f].artBox,userUnit:at[f].userUnit,rootDictionaryObjId:Li,resourceDictionaryObjId:Dn}));on(Li,!0),V("<</Type /Pages");var Q="/Kids [";for(A=0;A<Ut;A++)Q+=H[A]+" 0 R ";V(Q+"]"),V("/Count "+Ut),V(">>"),V("endobj"),vt.publish("postPutPages")},ja=function(f){vt.publish("putFont",{font:f,out:V,newObject:or,putStream:wn}),f.isAlreadyPutted!==!0&&(f.objectNumber=or(),V("<<"),V("/Type /Font"),V("/BaseFont /"+io(f.postScriptName)),V("/Subtype /Type1"),typeof f.encoding=="string"&&V("/Encoding /"+f.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},Sa=function(){for(var f in St)St.hasOwnProperty(f)&&(m===!1||m===!0&&y.hasOwnProperty(f))&&ja(St[f])},Aa=function(f){f.objectNumber=or();var A=[];A.push({key:"Type",value:"/XObject"}),A.push({key:"Subtype",value:"/Form"}),A.push({key:"BBox",value:"["+[D(f.x),D(f.y),D(f.x+f.width),D(f.y+f.height)].join(" ")+"]"}),A.push({key:"Matrix",value:"["+f.matrix.toString()+"]"});var H=f.pages[1].join(`
`);wn({data:H,additionalKeyValues:A,objectId:f.objectNumber}),V("endobj")},La=function(){for(var f in vr)vr.hasOwnProperty(f)&&Aa(vr[f])},jc=function(f,A){var H,Q=[],fe=1/(A-1);for(H=0;H<1;H+=fe)Q.push(H);if(Q.push(1),f[0].offset!=0){var Ne={offset:0,color:f[0].color};f.unshift(Ne)}if(f[f.length-1].offset!=1){var Ee={offset:1,color:f[f.length-1].color};f.push(Ee)}for(var ze="",Xe=0,ct=0;ct<Q.length;ct++){for(H=Q[ct];H>f[Xe+1].offset;)Xe++;var ot=f[Xe].offset,pt=(H-ot)/(f[Xe+1].offset-ot),Dt=f[Xe].color,$t=f[Xe+1].color;ze+=K(Math.round((1-pt)*Dt[0]+pt*$t[0]).toString(16))+K(Math.round((1-pt)*Dt[1]+pt*$t[1]).toString(16))+K(Math.round((1-pt)*Dt[2]+pt*$t[2]).toString(16))}return ze.trim()},i0=function(f,A){A||(A=21);var H=or(),Q=jc(f.colors,A),fe=[];fe.push({key:"FunctionType",value:"0"}),fe.push({key:"Domain",value:"[0.0 1.0]"}),fe.push({key:"Size",value:"["+A+"]"}),fe.push({key:"BitsPerSample",value:"8"}),fe.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),fe.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),wn({data:Q,additionalKeyValues:fe,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:H}),V("endobj"),f.objectNumber=or(),V("<< /ShadingType "+f.type),V("/ColorSpace /DeviceRGB");var Ne="/Coords ["+D(parseFloat(f.coords[0]))+" "+D(parseFloat(f.coords[1]))+" ";f.type===2?Ne+=D(parseFloat(f.coords[2]))+" "+D(parseFloat(f.coords[3])):Ne+=D(parseFloat(f.coords[2]))+" "+D(parseFloat(f.coords[3]))+" "+D(parseFloat(f.coords[4]))+" "+D(parseFloat(f.coords[5])),V(Ne+="]"),f.matrix&&V("/Matrix ["+f.matrix.toString()+"]"),V("/Function "+H+" 0 R"),V("/Extend [true true]"),V(">>"),V("endobj")},s0=function(f,A){var H=tr(),Q=or();A.push({resourcesOid:H,objectOid:Q}),f.objectNumber=Q;var fe=[];fe.push({key:"Type",value:"/Pattern"}),fe.push({key:"PatternType",value:"1"}),fe.push({key:"PaintType",value:"1"}),fe.push({key:"TilingType",value:"1"}),fe.push({key:"BBox",value:"["+f.boundingBox.map(D).join(" ")+"]"}),fe.push({key:"XStep",value:D(f.xStep)}),fe.push({key:"YStep",value:D(f.yStep)}),fe.push({key:"Resources",value:H+" 0 R"}),f.matrix&&fe.push({key:"Matrix",value:"["+f.matrix.toString()+"]"}),wn({data:f.stream,additionalKeyValues:fe,objectId:f.objectNumber}),V("endobj")},Ca=function(f){var A;for(A in yt)yt.hasOwnProperty(A)&&(yt[A]instanceof ra?i0(yt[A]):yt[A]instanceof bo&&s0(yt[A],f))},Sc=function(f){for(var A in f.objectNumber=or(),V("<<"),f)switch(A){case"opacity":V("/ca "+G(f[A]));break;case"stroke-opacity":V("/CA "+G(f[A]))}V(">>"),V("endobj")},a0=function(){var f;for(f in zt)zt.hasOwnProperty(f)&&Sc(zt[f])},Ho=function(){for(var f in V("/XObject <<"),vr)vr.hasOwnProperty(f)&&vr[f].objectNumber>=0&&V("/"+f+" "+vr[f].objectNumber+" 0 R");vt.publish("putXobjectDict"),V(">>")},o0=function(){Ar.oid=or(),V("<<"),V("/Filter /Standard"),V("/V "+Ar.v),V("/R "+Ar.r),V("/U <"+Ar.toHexString(Ar.U)+">"),V("/O <"+Ar.toHexString(Ar.O)+">"),V("/P "+Ar.P),V(">>"),V("endobj")},Ac=function(){for(var f in V("/Font <<"),St)St.hasOwnProperty(f)&&(m===!1||m===!0&&y.hasOwnProperty(f))&&V("/"+f+" "+St[f].objectNumber+" 0 R");V(">>")},l0=function(){if(Object.keys(yt).length>0){for(var f in V("/Shading <<"),yt)yt.hasOwnProperty(f)&&yt[f]instanceof ra&&yt[f].objectNumber>=0&&V("/"+f+" "+yt[f].objectNumber+" 0 R");vt.publish("putShadingPatternDict"),V(">>")}},_a=function(f){if(Object.keys(yt).length>0){for(var A in V("/Pattern <<"),yt)yt.hasOwnProperty(A)&&yt[A]instanceof p.TilingPattern&&yt[A].objectNumber>=0&&yt[A].objectNumber<f&&V("/"+A+" "+yt[A].objectNumber+" 0 R");vt.publish("putTilingPatternDict"),V(">>")}},c0=function(){if(Object.keys(zt).length>0){var f;for(f in V("/ExtGState <<"),zt)zt.hasOwnProperty(f)&&zt[f].objectNumber>=0&&V("/"+f+" "+zt[f].objectNumber+" 0 R");vt.publish("putGStateDict"),V(">>")}},Yt=function(f){on(f.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Ac(),l0(),_a(f.objectOid),c0(),Ho(),V(">>"),V("endobj")},Lc=function(){var f=[];Sa(),a0(),La(),Ca(f),vt.publish("putResources"),f.forEach(Yt),Yt({resourcesOid:Dn,objectOid:Number.MAX_SAFE_INTEGER}),vt.publish("postPutResources")},Cc=function(){vt.publish("putAdditionalObjects");for(var f=0;f<ke.length;f++){var A=ke[f];on(A.objId,!0),V(A.content),V("endobj")}vt.publish("postPutAdditionalObjects")},_c=function(f){Tt[f.fontName]=Tt[f.fontName]||{},Tt[f.fontName][f.fontStyle]=f.id},Wo=function(f,A,H,Q,fe){var Ne={id:"F"+(Object.keys(St).length+1).toString(10),postScriptName:f,fontName:A,fontStyle:H,encoding:Q,isStandardFont:fe||!1,metadata:{}};return vt.publish("addFont",{font:Ne,instance:this}),St[Ne.id]=Ne,_c(Ne),Ne.id},u0=function(f){for(var A=0,H=Ie.length;A<H;A++){var Q=Wo.call(this,f[A][0],f[A][1],f[A][2],Ie[A][3],!0);m===!1&&(y[Q]=!0);var fe=f[A][0].split("-");_c({id:Q,fontName:fe[0],fontStyle:fe[1]||""})}vt.publish("addFonts",{fonts:St,dictionary:Tt})},qn=function(f){return f.foo=function(){try{return f.apply(this,arguments)}catch(Q){var A=Q.stack||"";~A.indexOf(" at ")&&(A=A.split(" at ")[1]);var H="Error in function "+A.split(`
`)[0].split("<")[0]+": "+Q.message;if(!tt.console)throw new Error(H);tt.console.error(H,Q),tt.alert&&alert(H)}},f.foo.bar=f,f.foo},Pa=function(f,A){var H,Q,fe,Ne,Ee,ze,Xe,ct,ot;if(fe=(A=A||{}).sourceEncoding||"Unicode",Ee=A.outputEncoding,(A.autoencode||Ee)&&St[it].metadata&&St[it].metadata[fe]&&St[it].metadata[fe].encoding&&(Ne=St[it].metadata[fe].encoding,!Ee&&St[it].encoding&&(Ee=St[it].encoding),!Ee&&Ne.codePages&&(Ee=Ne.codePages[0]),typeof Ee=="string"&&(Ee=Ne[Ee]),Ee)){for(Xe=!1,ze=[],H=0,Q=f.length;H<Q;H++)(ct=Ee[f.charCodeAt(H)])?ze.push(String.fromCharCode(ct)):ze.push(f[H]),ze[H].charCodeAt(0)>>8&&(Xe=!0);f=ze.join("")}for(H=f.length;Xe===void 0&&H!==0;)f.charCodeAt(H-1)>>8&&(Xe=!0),H--;if(!Xe)return f;for(ze=A.noBOM?[]:[254,255],H=0,Q=f.length;H<Q;H++){if((ot=(ct=f.charCodeAt(H))>>8)>>8)throw new Error("Character at position "+H+" of string '"+f+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ze.push(ot),ze.push(ct-(ot<<8))}return String.fromCharCode.apply(void 0,ze)},Yr=p.__private__.pdfEscape=p.pdfEscape=function(f,A){return Pa(f,A).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Vo=p.__private__.beginPage=function(f){me[++Ut]=[],at[Ut]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(f[0]),topRightY:Number(f[1])}},Ec(Ut),xe(me[T])},Pc=function(f,A){var H,Q,fe;switch(r=A||r,typeof f=="string"&&(H=b(f.toLowerCase()),Array.isArray(H)&&(Q=H[0],fe=H[1])),Array.isArray(f)&&(Q=f[0]*Me,fe=f[1]*Me),isNaN(Q)&&(Q=i[0],fe=i[1]),(Q>14400||fe>14400)&&(Lt.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Q=Math.min(14400,Q),fe=Math.min(14400,fe)),i=[Q,fe],r.substr(0,1)){case"l":fe>Q&&(i=[fe,Q]);break;case"p":Q>fe&&(i=[fe,Q])}Vo(i),Dc(Jo),V(zn),Qo!==0&&V(Qo+" J"),Zo!==0&&V(Zo+" j"),vt.publish("addPage",{pageNumber:Ut})},d0=function(f){f>0&&f<=Ut&&(me.splice(f,1),at.splice(f,1),Ut--,T>Ut&&(T=Ut),this.setPage(T))},Ec=function(f){f>0&&f<=Ut&&(T=f)},h0=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return me.length-1},Ic=function(f,A,H){var Q,fe=void 0;return H=H||{},f=f!==void 0?f:St[it].fontName,A=A!==void 0?A:St[it].fontStyle,Q=f.toLowerCase(),Tt[Q]!==void 0&&Tt[Q][A]!==void 0?fe=Tt[Q][A]:Tt[f]!==void 0&&Tt[f][A]!==void 0?fe=Tt[f][A]:H.disableWarning===!1&&Lt.warn("Unable to look up font label for font '"+f+"', '"+A+"'. Refer to getFontList() for available fonts."),fe||H.noFallback||(fe=Tt.times[A])==null&&(fe=Tt.times.normal),fe},f0=p.__private__.putInfo=function(){var f=or(),A=function(Q){return Q};for(var H in x!==null&&(A=Ar.encryptor(f,0)),V("<<"),V("/Producer ("+Yr(A("jsPDF "+et.version))+")"),He)He.hasOwnProperty(H)&&He[H]&&V("/"+H.substr(0,1).toUpperCase()+H.substr(1)+" ("+Yr(A(He[H]))+")");V("/CreationDate ("+Yr(A(de))+")"),V(">>"),V("endobj")},Go=p.__private__.putCatalog=function(f){var A=(f=f||{}).rootDictionaryObjId||Li;switch(or(),V("<<"),V("/Type /Catalog"),V("/Pages "+A+" 0 R"),Re||(Re="fullwidth"),Re){case"fullwidth":V("/OpenAction [3 0 R /FitH null]");break;case"fullheight":V("/OpenAction [3 0 R /FitV null]");break;case"fullpage":V("/OpenAction [3 0 R /Fit]");break;case"original":V("/OpenAction [3 0 R /XYZ null null 1]");break;default:var H=""+Re;H.substr(H.length-1)==="%"&&(Re=parseInt(Re)/100),typeof Re=="number"&&V("/OpenAction [3 0 R /XYZ null null "+G(Re)+"]")}switch(ve||(ve="continuous"),ve){case"continuous":V("/PageLayout /OneColumn");break;case"single":V("/PageLayout /SinglePage");break;case"two":case"twoleft":V("/PageLayout /TwoColumnLeft");break;case"tworight":V("/PageLayout /TwoColumnRight")}Ce&&V("/PageMode /"+Ce),vt.publish("putCatalog"),V(">>"),V("endobj")},p0=p.__private__.putTrailer=function(){V("trailer"),V("<<"),V("/Size "+(ee+1)),V("/Root "+ee+" 0 R"),V("/Info "+(ee-1)+" 0 R"),x!==null&&V("/Encrypt "+Ar.oid+" 0 R"),V("/ID [ <"+ie+"> <"+ie+"> ]"),V(">>")},g0=p.__private__.putHeader=function(){V("%PDF-"+N),V("%ºß¬à")},m0=p.__private__.putXRef=function(){var f="0000000000";V("xref"),V("0 "+(ee+1)),V("0000000000 65535 f ");for(var A=1;A<=ee;A++)typeof z[A]=="function"?V((f+z[A]()).slice(-10)+" 00000 n "):z[A]!==void 0?V((f+z[A]).slice(-10)+" 00000 n "):V("0000000000 00000 n ")},Ci=p.__private__.buildDocument=function(){We(),xe(X),vt.publish("buildDocument"),g0(),Us(),Cc(),Lc(),x!==null&&o0(),f0(),Go();var f=ae;return m0(),p0(),V("startxref"),V(""+f),V("%%EOF"),xe(me[T]),X.join(`
`)},Ea=p.__private__.getBlob=function(f){return new Blob([Ge(f)],{type:"application/pdf"})},Ia=p.output=p.__private__.output=qn(function(f,A){switch(typeof(A=A||{})=="string"?A={filename:A}:A.filename=A.filename||"generated.pdf",f){case void 0:return Ci();case"save":p.save(A.filename);break;case"arraybuffer":return Ge(Ci());case"blob":return Ea(Ci());case"bloburi":case"bloburl":if(tt.URL!==void 0&&typeof tt.URL.createObjectURL=="function")return tt.URL&&tt.URL.createObjectURL(Ea(Ci()))||void 0;Lt.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var H="",Q=Ci();try{H=Rf(Q)}catch{H=Rf(unescape(encodeURIComponent(Q)))}return"data:application/pdf;filename="+A.filename+";base64,"+H;case"pdfobjectnewwindow":if(Object.prototype.toString.call(tt)==="[object Window]"){var fe="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Ne=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';A.pdfObjectUrl&&(fe=A.pdfObjectUrl,Ne="");var Ee='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+fe+'"'+Ne+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(A)+");<\/script></body></html>",ze=tt.open();return ze!==null&&ze.document.write(Ee),ze}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(tt)==="[object Window]"){var Xe='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(A.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+A.filename+'" width="500px" height="400px" /></body></html>',ct=tt.open();if(ct!==null){ct.document.write(Xe);var ot=this;ct.document.documentElement.querySelector("#pdfViewer").onload=function(){ct.document.title=A.filename,ct.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(ot.output("bloburl"))}}return ct}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(tt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var pt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",A)+'"></iframe></body></html>',Dt=tt.open();if(Dt!==null&&(Dt.document.write(pt),Dt.document.title=A.filename),Dt||typeof safari>"u")return Dt;break;case"datauri":case"dataurl":return tt.document.location.href=this.output("datauristring",A);default:return null}}),Fc=function(f){return Array.isArray(zs)===!0&&zs.indexOf(f)>-1};switch(n){case"pt":Me=1;break;case"mm":Me=72/25.4;break;case"cm":Me=72/2.54;break;case"in":Me=72;break;case"px":Me=Fc("px_scaling")==1?.75:96/72;break;case"pc":case"em":Me=12;break;case"ex":Me=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);Me=n}var Ar=null;ye(),W();var x0=function(f){return x!==null?Ar.encryptor(f,0):function(A){return A}},Tc=p.__private__.getPageInfo=p.getPageInfo=function(f){if(isNaN(f)||f%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:at[f].objId,pageNumber:f,pageContext:at[f]}},st=p.__private__.getPageInfoByObjId=function(f){if(isNaN(f)||f%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var A in at)if(at[A].objId===f)break;return Tc(A)},y0=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:at[T].objId,pageNumber:T,pageContext:at[T]}};p.addPage=function(){return Pc.apply(this,arguments),this},p.setPage=function(){return Ec.apply(this,arguments),xe.call(this,me[T]),this},p.insertPage=function(f){return this.addPage(),this.movePage(T,f),this},p.movePage=function(f,A){var H,Q;if(f>A){H=me[f],Q=at[f];for(var fe=f;fe>A;fe--)me[fe]=me[fe-1],at[fe]=at[fe-1];me[A]=H,at[A]=Q,this.setPage(A)}else if(f<A){H=me[f],Q=at[f];for(var Ne=f;Ne<A;Ne++)me[Ne]=me[Ne+1],at[Ne]=at[Ne+1];me[A]=H,at[A]=Q,this.setPage(A)}return this},p.deletePage=function(){return d0.apply(this,arguments),this},p.__private__.text=p.text=function(f,A,H,Q,fe){var Ne,Ee,ze,Xe,ct,ot,pt,Dt,$t,rr=(Q=Q||{}).scope||this;if(typeof f=="number"&&typeof A=="number"&&(typeof H=="string"||Array.isArray(H))){var Lr=H;H=A,A=f,f=Lr}if(arguments[3]instanceof Ze?(R("The transform parameter of text() with a Matrix value"),$t=fe):(ze=arguments[4],Xe=arguments[5],Nt(pt=arguments[3])==="object"&&pt!==null||(typeof ze=="string"&&(Xe=ze,ze=null),typeof pt=="string"&&(Xe=pt,pt=null),typeof pt=="number"&&(ze=pt,pt=null),Q={flags:pt,angle:ze,align:Xe})),isNaN(A)||isNaN(H)||f==null)throw new Error("Invalid arguments passed to jsPDF.text");if(f.length===0)return rr;var hr="",Un=!1,ln=typeof Q.lineHeightFactor=="number"?Q.lineHeightFactor:Hs,fi=rr.internal.scaleFactor;function $c(Ct){return Ct=Ct.split(" ").join(Array(Q.TabLen||9).join(" ")),Yr(Ct,pt)}function il(Ct){for(var _t,Jt=Ct.concat(),lr=[],Fi=Jt.length;Fi--;)typeof(_t=Jt.shift())=="string"?lr.push(_t):Array.isArray(Ct)&&(_t.length===1||_t[1]===void 0&&_t[2]===void 0)?lr.push(_t[0]):lr.push([_t[0],_t[1],_t[2]]);return lr}function sl(Ct,_t){var Jt;if(typeof Ct=="string")Jt=_t(Ct)[0];else if(Array.isArray(Ct)){for(var lr,Fi,fl=Ct.concat(),Ga=[],Yc=fl.length;Yc--;)typeof(lr=fl.shift())=="string"?Ga.push(_t(lr)[0]):Array.isArray(lr)&&typeof lr[0]=="string"&&(Fi=_t(lr[0],lr[1],lr[2]),Ga.push([Fi[0],Fi[1],Fi[2]]));Jt=Ga}return Jt}var Ra=!1,al=!0;if(typeof f=="string")Ra=!0;else if(Array.isArray(f)){var ol=f.concat();Ee=[];for(var Ba,br=ol.length;br--;)(typeof(Ba=ol.shift())!="string"||Array.isArray(Ba)&&typeof Ba[0]!="string")&&(al=!1);Ra=al}if(Ra===!1)throw new Error('Type of text must be string or Array. "'+f+'" is not recognized.');typeof f=="string"&&(f=f.match(/[\r?\n]/)?f.split(/\r\n|\r|\n/g):[f]);var qa=Oe/rr.internal.scaleFactor,za=qa*(ln-1);switch(Q.baseline){case"bottom":H-=za;break;case"top":H+=qa-za;break;case"hanging":H+=qa-2*za;break;case"middle":H+=qa/2-za}if((ot=Q.maxWidth||0)>0&&(typeof f=="string"?f=rr.splitTextToSize(f,ot):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(Ct,_t){return Ct.concat(rr.splitTextToSize(_t,ot))},[]))),Ne={text:f,x:A,y:H,options:Q,mutex:{pdfEscape:Yr,activeFontKey:it,fonts:St,activeFontSize:Oe}},vt.publish("preProcessText",Ne),f=Ne.text,ze=(Q=Ne.options).angle,!($t instanceof Ze)&&ze&&typeof ze=="number"){ze*=Math.PI/180,Q.rotationDirection===0&&(ze=-ze),L===w.ADVANCED&&(ze=-ze);var Ua=Math.cos(ze),ll=Math.sin(ze);$t=new Ze(Ua,ll,-ll,Ua,0,0)}else ze&&ze instanceof Ze&&($t=ze);L!==w.ADVANCED||$t||($t=li),(ct=Q.charSpace||Oa)!==void 0&&(hr+=D(I(ct))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Dt=Q.horizontalScale)!==void 0&&(hr+=D(100*Dt)+` Tz
`),Q.lang;var Kr=-1,C0=Q.renderingMode!==void 0?Q.renderingMode:Q.stroke,cl=rr.internal.getCurrentPageInfo().pageContext;switch(C0){case 0:case!1:case"fill":Kr=0;break;case 1:case!0:case"stroke":Kr=1;break;case 2:case"fillThenStroke":Kr=2;break;case 3:case"invisible":Kr=3;break;case 4:case"fillAndAddForClipping":Kr=4;break;case 5:case"strokeAndAddPathForClipping":Kr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Kr=6;break;case 7:case"addToPathForClipping":Kr=7}var Hc=cl.usedRenderingMode!==void 0?cl.usedRenderingMode:-1;Kr!==-1?hr+=Kr+` Tr
`:Hc!==-1&&(hr+=`0 Tr
`),Kr!==-1&&(cl.usedRenderingMode=Kr),Xe=Q.align||"left";var Nn,$a=Oe*ln,Wc=rr.internal.pageSize.getWidth(),Vc=St[it];ct=Q.charSpace||Oa,ot=Q.maxWidth||0,pt=Object.assign({autoencode:!0,noBOM:!0},Q.flags);var es=[],Gs=function(Ct){return rr.getStringUnitWidth(Ct,{font:Vc,charSpace:ct,fontSize:Oe,doKerning:!1})*Oe/fi};if(Object.prototype.toString.call(f)==="[object Array]"){var Jr;Ee=il(f),Xe!=="left"&&(Nn=Ee.map(Gs));var Rr,ts=0;if(Xe==="right"){A-=Nn[0],f=[],br=Ee.length;for(var Pi=0;Pi<br;Pi++)Pi===0?(Rr=hi(A),Jr=_i(H)):(Rr=I(ts-Nn[Pi]),Jr=-$a),f.push([Ee[Pi],Rr,Jr]),ts=Nn[Pi]}else if(Xe==="center"){A-=Nn[0]/2,f=[],br=Ee.length;for(var Ei=0;Ei<br;Ei++)Ei===0?(Rr=hi(A),Jr=_i(H)):(Rr=I((ts-Nn[Ei])/2),Jr=-$a),f.push([Ee[Ei],Rr,Jr]),ts=Nn[Ei]}else if(Xe==="left"){f=[],br=Ee.length;for(var Ha=0;Ha<br;Ha++)f.push(Ee[Ha])}else if(Xe==="justify"&&Vc.encoding==="Identity-H"){f=[],br=Ee.length,ot=ot!==0?ot:Wc;for(var Ii=0,Kt=0;Kt<br;Kt++)if(Jr=Kt===0?_i(H):-$a,Rr=Kt===0?hi(A):Ii,Kt<br-1){var ul=I((ot-Nn[Kt])/(Ee[Kt].split(" ").length-1)),Br=Ee[Kt].split(" ");f.push([Br[0]+" ",Rr,Jr]),Ii=0;for(var kn=1;kn<Br.length;kn++){var Wa=(Gs(Br[kn-1]+" "+Br[kn])-Gs(Br[kn]))*fi+ul;kn==Br.length-1?f.push([Br[kn],Wa,0]):f.push([Br[kn]+" ",Wa,0]),Ii-=Wa}}else f.push([Ee[Kt],Rr,Jr]);f.push(["",Ii,0])}else{if(Xe!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(f=[],br=Ee.length,ot=ot!==0?ot:Wc,Kt=0;Kt<br;Kt++)Jr=Kt===0?_i(H):-$a,Rr=Kt===0?hi(A):0,Kt<br-1?es.push(D(I((ot-Nn[Kt])/(Ee[Kt].split(" ").length-1)))):es.push(0),f.push([Ee[Kt],Rr,Jr])}}var Gc=typeof Q.R2L=="boolean"?Q.R2L:ue;Gc===!0&&(f=sl(f,function(Ct,_t,Jt){return[Ct.split("").reverse().join(""),_t,Jt]})),Ne={text:f,x:A,y:H,options:Q,mutex:{pdfEscape:Yr,activeFontKey:it,fonts:St,activeFontSize:Oe}},vt.publish("postProcessText",Ne),f=Ne.text,Un=Ne.mutex.isHex||!1;var dl=St[it].encoding;dl!=="WinAnsiEncoding"&&dl!=="StandardEncoding"||(f=sl(f,function(Ct,_t,Jt){return[$c(Ct),_t,Jt]})),Ee=il(f),f=[];for(var Ys,Ks,rs,Js=0,Va=1,Xs=Array.isArray(Ee[0])?Va:Js,ns="",hl=function(Ct,_t,Jt){var lr="";return Jt instanceof Ze?(Jt=typeof Q.angle=="number"?Mn(Jt,new Ze(1,0,0,1,Ct,_t)):Mn(new Ze(1,0,0,1,Ct,_t),Jt),L===w.ADVANCED&&(Jt=Mn(new Ze(1,0,0,-1,0,0),Jt)),lr=Jt.join(" ")+` Tm
`):lr=D(Ct)+" "+D(_t)+` Td
`,lr},jn=0;jn<Ee.length;jn++){switch(ns="",Xs){case Va:rs=(Un?"<":"(")+Ee[jn][0]+(Un?">":")"),Ys=parseFloat(Ee[jn][1]),Ks=parseFloat(Ee[jn][2]);break;case Js:rs=(Un?"<":"(")+Ee[jn]+(Un?">":")"),Ys=hi(A),Ks=_i(H)}es!==void 0&&es[jn]!==void 0&&(ns=es[jn]+` Tw
`),jn===0?f.push(ns+hl(Ys,Ks,$t)+rs):Xs===Js?f.push(ns+rs):Xs===Va&&f.push(ns+hl(Ys,Ks,$t)+rs)}f=Xs===Js?f.join(` Tj
T* `):f.join(` Tj
`),f+=` Tj
`;var Sn=`BT
/`;return Sn+=it+" "+Oe+` Tf
`,Sn+=D(Oe*ln)+` TL
`,Sn+=Ws+`
`,Sn+=hr,Sn+=f,V(Sn+="ET"),y[it]=!0,rr};var v0=p.__private__.clip=p.clip=function(f){return V(f==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return v0("evenodd")},p.__private__.discardPath=p.discardPath=function(){return V("n"),this};var di=p.__private__.isValidStyle=function(f){var A=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(f)!==-1&&(A=!0),A};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(f){return di(f)&&(h=f),this};var Oc=p.__private__.getStyle=p.getStyle=function(f){var A=h;switch(f){case"D":case"S":A="S";break;case"F":A="f";break;case"FD":case"DF":A="B";break;case"f":case"f*":case"B":case"B*":A=f}return A},Mc=p.close=function(){return V("h"),this};p.stroke=function(){return V("S"),this},p.fill=function(f){return Fa("f",f),this},p.fillEvenOdd=function(f){return Fa("f*",f),this},p.fillStroke=function(f){return Fa("B",f),this},p.fillStrokeEvenOdd=function(f){return Fa("B*",f),this};var Fa=function(f,A){Nt(A)==="object"?w0(A,f):V(f)},Yo=function(f){f===null||L===w.ADVANCED&&f===void 0||(f=Oc(f),V(f))};function b0(f,A,H,Q,fe){var Ne=new bo(A||this.boundingBox,H||this.xStep,Q||this.yStep,this.gState,fe||this.matrix);Ne.stream=this.stream;var Ee=f+"$$"+this.cloneIndex+++"$$";return Gr(Ee,Ne),Ne}var w0=function(f,A){var H=qs[f.key],Q=yt[H];if(Q instanceof ra)V("q"),V(N0(A)),Q.gState&&p.setGState(Q.gState),V(f.matrix.toString()+" cm"),V("/"+H+" sh"),V("Q");else if(Q instanceof bo){var fe=new Ze(1,0,0,-1,0,Zi());f.matrix&&(fe=fe.multiply(f.matrix||li),H=b0.call(Q,f.key,f.boundingBox,f.xStep,f.yStep,fe).id),V("q"),V("/Pattern cs"),V("/"+H+" scn"),Q.gState&&p.setGState(Q.gState),V(A),V("Q")}},N0=function(f){switch(f){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Ko=p.moveTo=function(f,A){return V(D(I(f))+" "+D(F(A))+" m"),this},$s=p.lineTo=function(f,A){return V(D(I(f))+" "+D(F(A))+" l"),this},Xi=p.curveTo=function(f,A,H,Q,fe,Ne){return V([D(I(f)),D(F(A)),D(I(H)),D(F(Q)),D(I(fe)),D(F(Ne)),"c"].join(" ")),this};p.__private__.line=p.line=function(f,A,H,Q,fe){if(isNaN(f)||isNaN(A)||isNaN(H)||isNaN(Q)||!di(fe))throw new Error("Invalid arguments passed to jsPDF.line");return L===w.COMPAT?this.lines([[H-f,Q-A]],f,A,[1,1],fe||"S"):this.lines([[H-f,Q-A]],f,A,[1,1]).stroke()},p.__private__.lines=p.lines=function(f,A,H,Q,fe,Ne){var Ee,ze,Xe,ct,ot,pt,Dt,$t,rr,Lr,hr,Un;if(typeof f=="number"&&(Un=H,H=A,A=f,f=Un),Q=Q||[1,1],Ne=Ne||!1,isNaN(A)||isNaN(H)||!Array.isArray(f)||!Array.isArray(Q)||!di(fe)||typeof Ne!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ko(A,H),Ee=Q[0],ze=Q[1],ct=f.length,Lr=A,hr=H,Xe=0;Xe<ct;Xe++)(ot=f[Xe]).length===2?(Lr=ot[0]*Ee+Lr,hr=ot[1]*ze+hr,$s(Lr,hr)):(pt=ot[0]*Ee+Lr,Dt=ot[1]*ze+hr,$t=ot[2]*Ee+Lr,rr=ot[3]*ze+hr,Lr=ot[4]*Ee+Lr,hr=ot[5]*ze+hr,Xi(pt,Dt,$t,rr,Lr,hr));return Ne&&Mc(),Yo(fe),this},p.path=function(f){for(var A=0;A<f.length;A++){var H=f[A],Q=H.c;switch(H.op){case"m":Ko(Q[0],Q[1]);break;case"l":$s(Q[0],Q[1]);break;case"c":Xi.apply(this,Q);break;case"h":Mc()}}return this},p.__private__.rect=p.rect=function(f,A,H,Q,fe){if(isNaN(f)||isNaN(A)||isNaN(H)||isNaN(Q)||!di(fe))throw new Error("Invalid arguments passed to jsPDF.rect");return L===w.COMPAT&&(Q=-Q),V([D(I(f)),D(F(A)),D(I(H)),D(I(Q)),"re"].join(" ")),Yo(fe),this},p.__private__.triangle=p.triangle=function(f,A,H,Q,fe,Ne,Ee){if(isNaN(f)||isNaN(A)||isNaN(H)||isNaN(Q)||isNaN(fe)||isNaN(Ne)||!di(Ee))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[H-f,Q-A],[fe-H,Ne-Q],[f-fe,A-Ne]],f,A,[1,1],Ee,!0),this},p.__private__.roundedRect=p.roundedRect=function(f,A,H,Q,fe,Ne,Ee){if(isNaN(f)||isNaN(A)||isNaN(H)||isNaN(Q)||isNaN(fe)||isNaN(Ne)||!di(Ee))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ze=4/3*(Math.SQRT2-1);return fe=Math.min(fe,.5*H),Ne=Math.min(Ne,.5*Q),this.lines([[H-2*fe,0],[fe*ze,0,fe,Ne-Ne*ze,fe,Ne],[0,Q-2*Ne],[0,Ne*ze,-fe*ze,Ne,-fe,Ne],[2*fe-H,0],[-fe*ze,0,-fe,-Ne*ze,-fe,-Ne],[0,2*Ne-Q],[0,-Ne*ze,fe*ze,-Ne,fe,-Ne]],f+fe,A,[1,1],Ee,!0),this},p.__private__.ellipse=p.ellipse=function(f,A,H,Q,fe){if(isNaN(f)||isNaN(A)||isNaN(H)||isNaN(Q)||!di(fe))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ne=4/3*(Math.SQRT2-1)*H,Ee=4/3*(Math.SQRT2-1)*Q;return Ko(f+H,A),Xi(f+H,A-Ee,f+Ne,A-Q,f,A-Q),Xi(f-Ne,A-Q,f-H,A-Ee,f-H,A),Xi(f-H,A+Ee,f-Ne,A+Q,f,A+Q),Xi(f+Ne,A+Q,f+H,A+Ee,f+H,A),Yo(fe),this},p.__private__.circle=p.circle=function(f,A,H,Q){if(isNaN(f)||isNaN(A)||isNaN(H)||!di(Q))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(f,A,H,H,Q)},p.setFont=function(f,A,H){return H&&(A=le(A,H)),it=Ic(f,A,{disableWarning:!1}),this};var k0=p.__private__.getFont=p.getFont=function(){return St[Ic.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var f,A,H={};for(f in Tt)if(Tt.hasOwnProperty(f))for(A in H[f]=[],Tt[f])Tt[f].hasOwnProperty(A)&&H[f].push(A);return H},p.addFont=function(f,A,H,Q,fe){var Ne=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ne.indexOf(arguments[3])!==-1?fe=arguments[3]:arguments[3]&&Ne.indexOf(arguments[3])==-1&&(H=le(H,Q)),fe=fe||"Identity-H",Wo.call(this,f,A,H,fe)};var Hs,Jo=e.lineWidth||.200025,Ta=p.__private__.getLineWidth=p.getLineWidth=function(){return Jo},Dc=p.__private__.setLineWidth=p.setLineWidth=function(f){return Jo=f,V(D(I(f))+" w"),this};p.__private__.setLineDash=et.API.setLineDash=et.API.setLineDashPattern=function(f,A){if(f=f||[],A=A||0,isNaN(A)||!Array.isArray(f))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return f=f.map(function(H){return D(I(H))}).join(" "),A=D(I(A)),V("["+f+"] "+A+" d"),this};var Rc=p.__private__.getLineHeight=p.getLineHeight=function(){return Oe*Hs};p.__private__.getLineHeight=p.getLineHeight=function(){return Oe*Hs};var Bc=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(f){return typeof(f=f||1.15)=="number"&&(Hs=f),this},qc=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Hs};Bc(e.lineHeight);var hi=p.__private__.getHorizontalCoordinate=function(f){return I(f)},_i=p.__private__.getVerticalCoordinate=function(f){return L===w.ADVANCED?f:at[T].mediaBox.topRightY-at[T].mediaBox.bottomLeftY-I(f)},j0=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(f){return D(hi(f))},Qi=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(f){return D(_i(f))},zn=e.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return Rn(zn)},p.__private__.setStrokeColor=p.setDrawColor=function(f,A,H,Q){return zn=Bn({ch1:f,ch2:A,ch3:H,ch4:Q,pdfColorType:"draw",precision:2}),V(zn),this};var Xo=e.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return Rn(Xo)},p.__private__.setFillColor=p.setFillColor=function(f,A,H,Q){return Xo=Bn({ch1:f,ch2:A,ch3:H,ch4:Q,pdfColorType:"fill",precision:2}),V(Xo),this};var Ws=e.textColor||"0 g",S0=p.__private__.getTextColor=p.getTextColor=function(){return Rn(Ws)};p.__private__.setTextColor=p.setTextColor=function(f,A,H,Q){return Ws=Bn({ch1:f,ch2:A,ch3:H,ch4:Q,pdfColorType:"text",precision:3}),this};var Oa=e.charSpace,A0=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Oa||0)};p.__private__.setCharSpace=p.setCharSpace=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Oa=f,this};var Qo=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(f){var A=p.CapJoinStyles[f];if(A===void 0)throw new Error("Line cap style of '"+f+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qo=A,V(A+" J"),this};var Zo=0;p.__private__.setLineJoin=p.setLineJoin=function(f){var A=p.CapJoinStyles[f];if(A===void 0)throw new Error("Line join style of '"+f+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Zo=A,V(A+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(f){if(f=f||0,isNaN(f))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return V(D(I(f))+" M"),this},p.GState=Fd,p.setGState=function(f){(f=typeof f=="string"?zt[On[f]]:zc(null,f)).equals(Ai)||(V("/"+f.id+" gs"),Ai=f)};var zc=function(f,A){if(!f||!On[f]){var H=!1;for(var Q in zt)if(zt.hasOwnProperty(Q)&&zt[Q].equals(A)){H=!0;break}if(H)A=zt[Q];else{var fe="GS"+(Object.keys(zt).length+1).toString(10);zt[fe]=A,A.id=fe}return f&&(On[f]=A.id),vt.publish("addGState",A),A}};p.addGState=function(f,A){return zc(f,A),this},p.saveGraphicsState=function(){return V("q"),si.push({key:it,size:Oe,color:Ws}),this},p.restoreGraphicsState=function(){V("Q");var f=si.pop();return it=f.key,Oe=f.size,Ws=f.color,Ai=null,this},p.setCurrentTransformationMatrix=function(f){return V(f.toString()+" cm"),this},p.comment=function(f){return V("#"+f),this};var Ma=function(f,A){var H=f||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return H},set:function(Ne){isNaN(Ne)||(H=parseFloat(Ne))}});var Q=A||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Q},set:function(Ne){isNaN(Ne)||(Q=parseFloat(Ne))}});var fe="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return fe},set:function(Ne){fe=Ne.toString()}}),this},el=function(f,A,H,Q){Ma.call(this,f,A),this.type="rect";var fe=H||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return fe},set:function(Ee){isNaN(Ee)||(fe=parseFloat(Ee))}});var Ne=Q||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ne},set:function(Ee){isNaN(Ee)||(Ne=parseFloat(Ee))}}),this},tl=function(){this.page=Ut,this.currentPage=T,this.pages=me.slice(0),this.pagesContext=at.slice(0),this.x=Gt,this.y=dt,this.matrix=Vr,this.width=Vs(T),this.height=Zi(T),this.outputDestination=Pe,this.id="",this.objectNumber=-1};tl.prototype.restore=function(){Ut=this.page,T=this.currentPage,at=this.pagesContext,me=this.pages,Gt=this.x,dt=this.y,Vr=this.matrix,rl(T,this.width),nl(T,this.height),Pe=this.outputDestination};var Uc=function(f,A,H,Q,fe){oi.push(new tl),Ut=T=0,me=[],Gt=f,dt=A,Vr=fe,Vo([H,Q])},L0=function(f){if(ai[f])oi.pop().restore();else{var A=new tl,H="Xo"+(Object.keys(vr).length+1).toString(10);A.id=H,ai[f]=H,vr[H]=A,vt.publish("addFormObject",A),oi.pop().restore()}};for(var Da in p.beginFormObject=function(f,A,H,Q,fe){return Uc(f,A,H,Q,fe),this},p.endFormObject=function(f){return L0(f),this},p.doFormObject=function(f,A){var H=vr[ai[f]];return V("q"),V(A.toString()+" cm"),V("/"+H.id+" Do"),V("Q"),this},p.getFormObject=function(f){var A=vr[ai[f]];return{x:A.x,y:A.y,width:A.width,height:A.height,matrix:A.matrix}},p.save=function(f,A){return f=f||"generated.pdf",(A=A||{}).returnPromise=A.returnPromise||!1,A.returnPromise===!1?(ta(Ea(Ci()),f),typeof ta.unload=="function"&&tt.setTimeout&&setTimeout(ta.unload,911),this):new Promise(function(H,Q){try{var fe=ta(Ea(Ci()),f);typeof ta.unload=="function"&&tt.setTimeout&&setTimeout(ta.unload,911),H(fe)}catch(Ne){Q(Ne.message)}})},et.API)et.API.hasOwnProperty(Da)&&(Da==="events"&&et.API.events.length?function(f,A){var H,Q,fe;for(fe=A.length-1;fe!==-1;fe--)H=A[fe][0],Q=A[fe][1],f.subscribe.apply(f,[H].concat(typeof Q=="function"?[Q]:Q))}(vt,et.API.events):p[Da]=et.API[Da]);var Vs=p.getPageWidth=function(f){return(at[f=f||T].mediaBox.topRightX-at[f].mediaBox.bottomLeftX)/Me},rl=p.setPageWidth=function(f,A){at[f].mediaBox.topRightX=A*Me+at[f].mediaBox.bottomLeftX},Zi=p.getPageHeight=function(f){return(at[f=f||T].mediaBox.topRightY-at[f].mediaBox.bottomLeftY)/Me},nl=p.setPageHeight=function(f,A){at[f].mediaBox.topRightY=A*Me+at[f].mediaBox.bottomLeftY};return p.internal={pdfEscape:Yr,getStyle:Oc,getFont:k0,getFontSize:q,getCharSpace:A0,getTextColor:S0,getLineHeight:Rc,getLineHeightFactor:qc,getLineWidth:Ta,write:nt,getHorizontalCoordinate:hi,getVerticalCoordinate:_i,getCoordinateString:j0,getVerticalCoordinateString:Qi,collections:{},newObject:or,newAdditionalObject:ka,newObjectDeferred:tr,newObjectDeferredBegin:on,getFilters:ci,putStream:wn,events:vt,scaleFactor:Me,pageSize:{getWidth:function(){return Vs(T)},setWidth:function(f){rl(T,f)},getHeight:function(){return Zi(T)},setHeight:function(f){nl(T,f)}},encryptionOptions:x,encryption:Ar,getEncryptor:x0,output:Ia,getNumberOfPages:h0,pages:me,out:V,f2:G,f3:P,getPageInfo:Tc,getPageInfoByObjId:st,getCurrentPageInfo:y0,getPDFVersion:k,Point:Ma,Rectangle:el,Matrix:Ze,hasHotfix:Fc},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return Vs(T)},set:function(f){rl(T,f)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Zi(T)},set:function(f){nl(T,f)},enumerable:!0,configurable:!0}),u0.call(p,Ie),it="F1",Pc(i,r),vt.publish("initialized"),p}no.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},no.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},no.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},no.prototype.processOwnerPassword=function(e,t){return qf(Bf(t).substr(0,5),e)},no.prototype.encryptor=function(e,t){var r=Bf(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return qf(r,n)}},Fd.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||Nt(e)!==Nt(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},et.API={events:[]},et.version="2.5.2";var Wt=et.API,t1=1,Na=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},eo=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},lt=function(e){return e.toFixed(2)},fs=function(e){return e.toFixed(5)};Wt.__acroform__={};var an=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},pm=function(e){return e*t1},mi=function(e){var t=new Zx,r=Ve.internal.getHeight(e)||0,n=Ve.internal.getWidth(e)||0;return t.BBox=[0,0,Number(lt(n)),Number(lt(r))],t},U6=Wt.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|=1<<t},$6=Wt.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&=~(1<<t)},H6=Wt.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},Qt=Wt.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return H6(e,t-1)},Zt=Wt.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return U6(e,t-1)},er=Wt.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return $6(e,t-1)},W6=Wt.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,i=e[0],s=e[1],a=e[2],l=e[3],u={};return u.lowerLeft_X=r(i)||0,u.lowerLeft_Y=n(s+l)||0,u.upperRight_X=r(i+a)||0,u.upperRight_Y=n(s)||0,[Number(lt(u.lowerLeft_X)),Number(lt(u.lowerLeft_Y)),Number(lt(u.upperRight_X)),Number(lt(u.upperRight_Y))]},V6=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=zf(e,r),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+lt(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=mi(e);return s.scope=e.scope,s.stream=t.join(`
`),s}},zf=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(P){return P.split(`
`)}):i.map(function(P){return[P]});var s=r,a=Ve.internal.getHeight(e)||0;a=a<0?-a:a;var l=Ve.internal.getWidth(e)||0;l=l<0?-l:l;var u=function(P,I,Y){if(P+1<i.length){var F=I+" "+i[P+1][0];return Iu(F,e,Y).width<=l-4}return!1};s++;e:for(;s>0;){t="",s--;var h,x,m=Iu("3",e,s).height,y=e.multiline?a-s:(a-m)/2,p=y+=2,N=0,k=0,M=0;if(s<=0){t=`(...) Tj
`,t+="% Width of Text: "+Iu(t,e,s=12).width+", FieldWidth:"+l+`
`;break}for(var b="",w=0,L=0;L<i.length;L++)if(i.hasOwnProperty(L)){var $=!1;if(i[L].length!==1&&M!==i[L].length-1){if((m+2)*(w+2)+2>a)continue e;b+=i[L][M],$=!0,k=L,L--}else{b=(b+=i[L][M]+" ").substr(b.length-1)==" "?b.substr(0,b.length-1):b;var J=parseInt(L),le=u(J,b,s),D=L>=i.length-1;if(le&&!D){b+=" ",M=0;continue}if(le||D){if(D)k=J;else if(e.multiline&&(m+2)*(w+2)+2>a)continue e}else{if(!e.multiline||(m+2)*(w+2)+2>a)continue e;k=J}}for(var R="",Z=N;Z<=k;Z++){var G=i[Z];if(e.multiline){if(Z===k){R+=G[M]+" ",M=(M+1)%G.length;continue}if(Z===N){R+=G[G.length-1]+" ";continue}}R+=G[0]+" "}switch(R=R.substr(R.length-1)==" "?R.substr(0,R.length-1):R,x=Iu(R,e,s).width,e.textAlign){case"right":h=l-x-2;break;case"center":h=(l-x)/2;break;case"left":default:h=2}t+=lt(h)+" "+lt(p)+` Td
`,t+="("+Na(R)+`) Tj
`,t+=-lt(h)+` 0 Td
`,p=-(s+2),x=0,N=$?k:k+1,w++,b=""}break}return n.text=t,n.fontSize=s,n},Iu=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},G6={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Y6=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},K6=function(e,t){for(var r in e)if(e.hasOwnProperty(r)){var n=r,i=e[r];t.internal.newObjectDeferredBegin(i.objId,!0),Nt(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete e[n]}},J6=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(ni.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(G6)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");t1=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new ey,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var s=n[i];s.objId=void 0,s.hasAnnotation&&Y6(s,r)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(r){(function(n,i){var s=!n;for(var a in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(a)){var l=n[a],u=[],h=l.Rect;if(l.Rect&&(l.Rect=W6(l.Rect,i)),i.internal.newObjectDeferredBegin(l.objId,!0),l.DA=Ve.createDefaultAppearanceStream(l),Nt(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(u=l.getKeyValueListForStream()),l.Rect=h,l.hasAppearanceStream&&!l.appearanceStreamContent){var x=V6(l);u.push({key:"AP",value:"<</N "+x+">>"}),i.internal.acroformPlugin.xForms.push(x)}if(l.appearanceStreamContent){var m="";for(var y in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(y)){var p=l.appearanceStreamContent[y];if(m+="/"+y+" ",m+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var a in p)if(p.hasOwnProperty(a)){var N=p[a];typeof N=="function"&&(N=N.call(i,l)),m+="/"+a+" "+N+" ",i.internal.acroformPlugin.xForms.indexOf(N)>=0||i.internal.acroformPlugin.xForms.push(N)}}else typeof(N=p)=="function"&&(N=N.call(i,l)),m+="/"+a+" "+N,i.internal.acroformPlugin.xForms.indexOf(N)>=0||i.internal.acroformPlugin.xForms.push(N);m+=">>"}u.push({key:"AP",value:`<<
`+m+">>"})}i.internal.putStream({additionalKeyValues:u,objectId:l.objId}),i.internal.out("endobj")}s&&K6(i.internal.acroformPlugin.xForms,i)})(r,e)}),e.internal.acroformPlugin.isInitialized=!0}},Qx=Wt.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(a){return a};if(Array.isArray(e)){for(var i="[",s=0;s<e.length;s++)switch(s!==0&&(i+=" "),Nt(e[s])){case"boolean":case"number":case"object":i+=e[s].toString();break;case"string":e[s].substr(0,1)!=="/"?(t!==void 0&&r&&(n=r.internal.getEncryptor(t)),i+="("+Na(n(e[s].toString()))+")"):i+=e[s].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Ch=function(e,t,r){var n=function(i){return i};return t!==void 0&&r&&(n=r.internal.getEncryptor(t)),(e=e||"").toString(),e="("+Na(n(e))+")"},vi=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(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};vi.prototype.toString=function(){return this.objId+" 0 R"},vi.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},vi.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var r in t)if(Object.getOwnPropertyDescriptor(this,t[r]).configurable===!1){var n=t[r],i=this[n];i&&(Array.isArray(i)?e.push({key:n,value:Qx(i,this.objId,this.scope)}):i instanceof vi?(i.scope=this.scope,e.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:n,value:i}))}return e};var Zx=function(){vi.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 e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){e=r.trim()},get:function(){return e||null}})};an(Zx,vi);var ey=function(){vi.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+Na(r(e))+")"}},set:function(r){e=r}})};an(ey,vi);var ni=function e(){vi.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute F supplied.');t=b}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Qt(t,3)},set:function(b){b?this.F=Zt(t,3):this.F=er(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute Ff supplied.');r=b}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(b){n=b!==void 0?b:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(b){n[0]=b}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(b){n[1]=b}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(b){n[2]=b}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(b){n[3]=b}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(b){switch(b){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=b;break;default:throw new Error('Invalid value "'+b+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof Td)return;s="FieldObject"+e.FieldNum++}var b=function(w){return w};return this.scope&&(b=this.scope.internal.getEncryptor(this.objId)),"("+Na(b(s))+")"},set:function(b){s=b.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(b){s=b}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(b){a=b}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(b){l=b}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(b){u=b}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/t1:h},set:function(b){h=b}});var x="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return x},set:function(b){x=b}});var m="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!m||this instanceof Td||this instanceof ua))return Ch(m,this.objId,this.scope)},set:function(b){b=b.toString(),m=b}});var y=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(y)return this instanceof xr?y:Ch(y,this.objId,this.scope)},set:function(b){b=b.toString(),y=this instanceof xr?b:b.substr(0,1)==="("?eo(b.substr(1,b.length-2)):eo(b)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr?eo(y.substr(1,y.length-1)):y},set:function(b){b=b.toString(),y=this instanceof xr?"/"+b:b}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(b){this.V=b}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof xr?p:Ch(p,this.objId,this.scope)},set:function(b){b=b.toString(),p=this instanceof xr?b:b.substr(0,1)==="("?eo(b.substr(1,b.length-2)):eo(b)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr?eo(p.substr(1,p.length-1)):p},set:function(b){b=b.toString(),p=this instanceof xr?"/"+b:b}}),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 N,k=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return k},set:function(b){b=!!b,k=b}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(N)return N},set:function(b){N=b}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,1)},set:function(b){b?this.Ff=Zt(this.Ff,1):this.Ff=er(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,2)},set:function(b){b?this.Ff=Zt(this.Ff,2):this.Ff=er(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,3)},set:function(b){b?this.Ff=Zt(this.Ff,3):this.Ff=er(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(b){if([0,1,2].indexOf(b)===-1)throw new Error('Invalid value "'+b+'" for attribute Q supplied.');M=b}}),Object.defineProperty(this,"textAlign",{get:function(){var b;switch(M){case 0:default:b="left";break;case 1:b="center";break;case 2:b="right"}return b},configurable:!0,enumerable:!0,set:function(b){switch(b){case"right":case 2:M=2;break;case"center":case 1:M=1;break;case"left":case 0:default:M=0}}})};an(ni,vi);var Co=function(){ni.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){e=r}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Qx(t,this.objId,this.scope)},set:function(r){var n,i;i=[],typeof(n=r)=="string"&&(i=function(s,a,l){l||(l=1);for(var u,h=[];u=a.exec(s);)h.push(u[l]);return h}(n,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(r){t=r,this.sort&&t.sort()},this.addOption=function(r){r=(r=r||"").toString(),t.push(r),this.sort&&t.sort()},this.removeOption=function(r,n){for(n=n||!1,r=(r=r||"").toString();t.indexOf(r)!==-1&&(t.splice(t.indexOf(r),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,18)},set:function(r){r?this.Ff=Zt(this.Ff,18):this.Ff=er(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=Zt(this.Ff,19):this.Ff=er(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,20)},set:function(r){r?(this.Ff=Zt(this.Ff,20),t.sort()):this.Ff=er(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,22)},set:function(r){r?this.Ff=Zt(this.Ff,22):this.Ff=er(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,23)},set:function(r){r?this.Ff=Zt(this.Ff,23):this.Ff=er(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,27)},set:function(r){r?this.Ff=Zt(this.Ff,27):this.Ff=er(this.Ff,27)}}),this.hasAppearanceStream=!1};an(Co,ni);var _o=function(){Co.call(this),this.fontName="helvetica",this.combo=!1};an(_o,Co);var Po=function(){_o.call(this),this.combo=!0};an(Po,_o);var Xu=function(){Po.call(this),this.edit=!0};an(Xu,Po);var xr=function(){ni.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,15)},set:function(r){r?this.Ff=Zt(this.Ff,15):this.Ff=er(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,16)},set:function(r){r?this.Ff=Zt(this.Ff,16):this.Ff=er(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,17)},set:function(r){r?this.Ff=Zt(this.Ff,17):this.Ff=er(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,26)},set:function(r){r?this.Ff=Zt(this.Ff,26):this.Ff=er(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(s){return s};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,i=[];for(n in i.push("<<"),t)i.push("/"+n+" ("+Na(r(t[n]))+")");return i.push(">>"),i.join(`
`)}},set:function(r){Nt(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+r}})};an(xr,ni);var Qu=function(){xr.call(this),this.pushButton=!0};an(Qu,xr);var Eo=function(){xr.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};an(Eo,xr);var Td=function(){var e,t;ni.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(l){return l};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var s,a=[];for(s in a.push("<<"),n)a.push("/"+s+" ("+Na(i(n[s]))+")");return a.push(">>"),a.join(`
`)},set:function(i){Nt(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(i){r="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ve.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};an(Td,ni),Eo.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},Eo.prototype.createOption=function(e){var t=new Td;return t.Parent=this,t.optionName=e,this.Kids.push(t),X6.call(this.scope,t),t};var Zu=function(){xr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ve.CheckBox.createAppearanceStream()};an(Zu,xr);var ua=function(){ni.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,13)},set:function(t){t?this.Ff=Zt(this.Ff,13):this.Ff=er(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,21)},set:function(t){t?this.Ff=Zt(this.Ff,21):this.Ff=er(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,23)},set:function(t){t?this.Ff=Zt(this.Ff,23):this.Ff=er(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,24)},set:function(t){t?this.Ff=Zt(this.Ff,24):this.Ff=er(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,25)},set:function(t){t?this.Ff=Zt(this.Ff,25):this.Ff=er(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,26)},set:function(t){t?this.Ff=Zt(this.Ff,26):this.Ff=er(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};an(ua,ni);var ed=function(){ua.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Qt(this.Ff,14)},set:function(e){e?this.Ff=Zt(this.Ff,14):this.Ff=er(this.Ff,14)}}),this.password=!0};an(ed,ua);var Ve={CheckBox:{createAppearanceStream:function(){return{N:{On:Ve.CheckBox.YesNormal},D:{On:Ve.CheckBox.YesPushDown,Off:Ve.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),s=zf(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+lt(Ve.internal.getWidth(e))+" "+lt(Ve.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+lt(s.fontSize)+" Tf "+i),r.push("BT"),r.push(s.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(`
`),t},YesNormal:function(e){var t=mi(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),i=[],s=Ve.internal.getHeight(e),a=Ve.internal.getWidth(e),l=zf(e,e.caption);return i.push("1 g"),i.push("0 0 "+lt(a)+" "+lt(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+lt(a-1)+" "+lt(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+lt(l.fontSize)+" Tf "+n),i.push(l.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+lt(Ve.internal.getWidth(e))+" "+lt(Ve.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Ve.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Ve.RadioButton.Circle.YesNormal,t.D[e]=Ve.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=mi(e);t.scope=e.scope;var r=[],n=Ve.internal.getWidth(e)<=Ve.internal.getHeight(e)?Ve.internal.getWidth(e)/4:Ve.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Ve.internal.Bezier_C,s=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+fs(Ve.internal.getWidth(e)/2)+" "+fs(Ve.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),r.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),r.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),r.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t},YesPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=[],n=Ve.internal.getWidth(e)<=Ve.internal.getHeight(e)?Ve.internal.getWidth(e)/4:Ve.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*Ve.internal.Bezier_C).toFixed(5)),a=Number((n*Ve.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+fs(Ve.internal.getWidth(e)/2)+" "+fs(Ve.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),r.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),r.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),r.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+fs(Ve.internal.getWidth(e)/2)+" "+fs(Ve.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=[],n=Ve.internal.getWidth(e)<=Ve.internal.getHeight(e)?Ve.internal.getWidth(e)/4:Ve.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*Ve.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+fs(Ve.internal.getWidth(e)/2)+" "+fs(Ve.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),r.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),r.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),r.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Ve.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Ve.RadioButton.Cross.YesNormal,t.D[e]=Ve.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=mi(e);t.scope=e.scope;var r=[],n=Ve.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+lt(Ve.internal.getWidth(e)-2)+" "+lt(Ve.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(lt(n.x1.x)+" "+lt(n.x1.y)+" m"),r.push(lt(n.x2.x)+" "+lt(n.x2.y)+" l"),r.push(lt(n.x4.x)+" "+lt(n.x4.y)+" m"),r.push(lt(n.x3.x)+" "+lt(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
`),t},YesPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=Ve.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+lt(Ve.internal.getWidth(e))+" "+lt(Ve.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+lt(Ve.internal.getWidth(e)-2)+" "+lt(Ve.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(lt(r.x1.x)+" "+lt(r.x1.y)+" m"),n.push(lt(r.x2.x)+" "+lt(r.x2.y)+" l"),n.push(lt(r.x4.x)+" "+lt(r.x4.y)+" m"),n.push(lt(r.x3.x)+" "+lt(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=mi(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+lt(Ve.internal.getWidth(e))+" "+lt(Ve.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Ve.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Ve.internal.getWidth(e),r=Ve.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},Ve.internal.getWidth=function(e){var t=0;return Nt(e)==="object"&&(t=pm(e.Rect[2])),t},Ve.internal.getHeight=function(e){var t=0;return Nt(e)==="object"&&(t=pm(e.Rect[3])),t};var X6=Wt.addField=function(e){if(J6(this,e),!(e instanceof ni))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Wt.AcroFormChoiceField=Co,Wt.AcroFormListBox=_o,Wt.AcroFormComboBox=Po,Wt.AcroFormEditBox=Xu,Wt.AcroFormButton=xr,Wt.AcroFormPushButton=Qu,Wt.AcroFormRadioButton=Eo,Wt.AcroFormCheckBox=Zu,Wt.AcroFormTextField=ua,Wt.AcroFormPasswordField=ed,Wt.AcroFormAppearance=Ve,Wt.AcroForm={ChoiceField:Co,ListBox:_o,ComboBox:Po,EditBox:Xu,Button:xr,PushButton:Qu,RadioButton:Eo,CheckBox:Zu,TextField:ua,PasswordField:ed,Appearance:Ve},et.AcroForm={ChoiceField:Co,ListBox:_o,ComboBox:Po,EditBox:Xu,Button:xr,PushButton:Qu,RadioButton:Eo,CheckBox:Zu,TextField:ua,PasswordField:ed,Appearance:Ve};function ty(e){return e.reduce(function(t,r,n){return t[r]=n,t},{})}(function(e){e.__addimage__={};var t="UNKNOWN",r={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]]},n=e.__addimage__.getImageFileTypeByImageData=function(P,I){var Y,F,de,ie,he,W=t;if((I=I||t)==="RGBA"||P.data!==void 0&&P.data instanceof Uint8ClampedArray&&"height"in P&&"width"in P)return"RGBA";if(le(P))for(he in r)for(de=r[he],Y=0;Y<de.length;Y+=1){for(ie=!0,F=0;F<de[Y].length;F+=1)if(de[Y][F]!==void 0&&de[Y][F]!==P[F]){ie=!1;break}if(ie===!0){W=he;break}}else for(he in r)for(de=r[he],Y=0;Y<de.length;Y+=1){for(ie=!0,F=0;F<de[Y].length;F+=1)if(de[Y][F]!==void 0&&de[Y][F]!==P.charCodeAt(F)){ie=!1;break}if(ie===!0){W=he;break}}return W===t&&I!==t&&(W=I),W},i=function P(I){for(var Y=this.internal.write,F=this.internal.putStream,de=(0,this.internal.getFilters)();de.indexOf("FlateEncode")!==-1;)de.splice(de.indexOf("FlateEncode"),1);I.objectId=this.internal.newObject();var ie=[];if(ie.push({key:"Type",value:"/XObject"}),ie.push({key:"Subtype",value:"/Image"}),ie.push({key:"Width",value:I.width}),ie.push({key:"Height",value:I.height}),I.colorSpace===M.INDEXED?ie.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(I.palette.length/3-1)+" "+("sMask"in I&&I.sMask!==void 0?I.objectId+2:I.objectId+1)+" 0 R]"}):(ie.push({key:"ColorSpace",value:"/"+I.colorSpace}),I.colorSpace===M.DEVICE_CMYK&&ie.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ie.push({key:"BitsPerComponent",value:I.bitsPerComponent}),"decodeParameters"in I&&I.decodeParameters!==void 0&&ie.push({key:"DecodeParms",value:"<<"+I.decodeParameters+">>"}),"transparency"in I&&Array.isArray(I.transparency)){for(var he="",W=0,te=I.transparency.length;W<te;W++)he+=I.transparency[W]+" "+I.transparency[W]+" ";ie.push({key:"Mask",value:"["+he+"]"})}I.sMask!==void 0&&ie.push({key:"SMask",value:I.objectId+1+" 0 R"});var se=I.filter!==void 0?["/"+I.filter]:void 0;if(F({data:I.data,additionalKeyValues:ie,alreadyAppliedFilters:se,objectId:I.objectId}),Y("endobj"),"sMask"in I&&I.sMask!==void 0){var ye="/Predictor "+I.predictor+" /Colors 1 /BitsPerComponent "+I.bitsPerComponent+" /Columns "+I.width,j={width:I.width,height:I.height,colorSpace:"DeviceGray",bitsPerComponent:I.bitsPerComponent,decodeParameters:ye,data:I.sMask};"filter"in I&&(j.filter=I.filter),P.call(this,j)}if(I.colorSpace===M.INDEXED){var T=this.internal.newObject();F({data:R(new Uint8Array(I.palette)),objectId:T}),Y("endobj")}},s=function(){var P=this.internal.collections.addImage_images;for(var I in P)i.call(this,P[I])},a=function(){var P,I=this.internal.collections.addImage_images,Y=this.internal.write;for(var F in I)Y("/I"+(P=I[F]).index,P.objectId,"0","R")},l=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",a))},u=function(){var P=this.internal.collections.addImage_images;return l.call(this),P},h=function(){return Object.keys(this.internal.collections.addImage_images).length},x=function(P){return typeof e["process"+P.toUpperCase()]=="function"},m=function(P){return Nt(P)==="object"&&P.nodeType===1},y=function(P,I){if(P.nodeName==="IMG"&&P.hasAttribute("src")){var Y=""+P.getAttribute("src");if(Y.indexOf("data:image/")===0)return Gl(unescape(Y).split("base64,").pop());var F=e.loadFile(Y,!0);if(F!==void 0)return F}if(P.nodeName==="CANVAS"){if(P.width===0||P.height===0)throw new Error("Given canvas must have data. Canvas width: "+P.width+", height: "+P.height);var de;switch(I){case"PNG":de="image/png";break;case"WEBP":de="image/webp";break;case"JPEG":case"JPG":default:de="image/jpeg"}return Gl(P.toDataURL(de,1).split("base64,").pop())}},p=function(P){var I=this.internal.collections.addImage_images;if(I){for(var Y in I)if(P===I[Y].alias)return I[Y]}},N=function(P,I,Y){return P||I||(P=-96,I=-96),P<0&&(P=-1*Y.width*72/P/this.internal.scaleFactor),I<0&&(I=-1*Y.height*72/I/this.internal.scaleFactor),P===0&&(P=I*Y.width/Y.height),I===0&&(I=P*Y.height/Y.width),[P,I]},k=function(P,I,Y,F,de,ie){var he=N.call(this,Y,F,de),W=this.internal.getCoordinateString,te=this.internal.getVerticalCoordinateString,se=u.call(this);if(Y=he[0],F=he[1],se[de.index]=de,ie){ie*=Math.PI/180;var ye=Math.cos(ie),j=Math.sin(ie),T=function(K){return K.toFixed(4)},B=[T(ye),T(j),T(-1*j),T(ye),0,0,"cm"]}this.internal.write("q"),ie?(this.internal.write([1,"0","0",1,W(P),te(I+F),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([W(Y),"0","0",W(F),"0","0","cm"].join(" "))):this.internal.write([W(Y),"0","0",W(F),W(P),te(I+F),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+de.index+" Do"),this.internal.write("Q")},M=e.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"};e.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 b=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=e.__addimage__.sHashCode=function(P){var I,Y,F=0;if(typeof P=="string")for(Y=P.length,I=0;I<Y;I++)F=(F<<5)-F+P.charCodeAt(I),F|=0;else if(le(P))for(Y=P.byteLength/2,I=0;I<Y;I++)F=(F<<5)-F+P[I],F|=0;return F},L=e.__addimage__.validateStringAsBase64=function(P){(P=P||"").toString().trim();var I=!0;return P.length===0&&(I=!1),P.length%4!=0&&(I=!1),/^[A-Za-z0-9+/]+$/.test(P.substr(0,P.length-2))===!1&&(I=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(P.substr(-2))===!1&&(I=!1),I},$=e.__addimage__.extractImageFromDataUrl=function(P){var I=(P=P||"").split("base64,"),Y=null;if(I.length===2){var F=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(I[0]);Array.isArray(F)&&(Y={mimeType:F[1],charset:F[2],data:I[1]})}return Y},J=e.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};e.__addimage__.isArrayBuffer=function(P){return J()&&P instanceof ArrayBuffer};var le=e.__addimage__.isArrayBufferView=function(P){return J()&&typeof Uint32Array<"u"&&(P instanceof Int8Array||P instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&P instanceof Uint8ClampedArray||P instanceof Int16Array||P instanceof Uint16Array||P instanceof Int32Array||P instanceof Uint32Array||P instanceof Float32Array||P instanceof Float64Array)},D=e.__addimage__.binaryStringToUint8Array=function(P){for(var I=P.length,Y=new Uint8Array(I),F=0;F<I;F++)Y[F]=P.charCodeAt(F);return Y},R=e.__addimage__.arrayBufferToBinaryString=function(P){for(var I="",Y=le(P)?P:new Uint8Array(P),F=0;F<Y.length;F+=8192)I+=String.fromCharCode.apply(null,Y.subarray(F,F+8192));return I};e.addImage=function(){var P,I,Y,F,de,ie,he,W,te;if(typeof arguments[1]=="number"?(I=t,Y=arguments[1],F=arguments[2],de=arguments[3],ie=arguments[4],he=arguments[5],W=arguments[6],te=arguments[7]):(I=arguments[1],Y=arguments[2],F=arguments[3],de=arguments[4],ie=arguments[5],he=arguments[6],W=arguments[7],te=arguments[8]),Nt(P=arguments[0])==="object"&&!m(P)&&"imageData"in P){var se=P;P=se.imageData,I=se.format||I||t,Y=se.x||Y||0,F=se.y||F||0,de=se.w||se.width||de,ie=se.h||se.height||ie,he=se.alias||he,W=se.compression||W,te=se.rotation||se.angle||te}var ye=this.internal.getFilters();if(W===void 0&&ye.indexOf("FlateEncode")!==-1&&(W="SLOW"),isNaN(Y)||isNaN(F))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var j=Z.call(this,P,I,he,W);return k.call(this,Y,F,de,ie,j,te),this};var Z=function(P,I,Y,F){var de,ie,he;if(typeof P=="string"&&n(P)===t){P=unescape(P);var W=G(P,!1);(W!==""||(W=e.loadFile(P,!0))!==void 0)&&(P=W)}if(m(P)&&(P=y(P,I)),I=n(P,I),!x(I))throw new Error("addImage does not support files of type '"+I+"', please ensure that a plugin for '"+I+"' support is added.");if(((he=Y)==null||he.length===0)&&(Y=function(te){return typeof te=="string"||le(te)?w(te):le(te.data)?w(te.data):null}(P)),(de=p.call(this,Y))||(J()&&(P instanceof Uint8Array||I==="RGBA"||(ie=P,P=D(P))),de=this["process"+I.toUpperCase()](P,h.call(this),Y,function(te){return te&&typeof te=="string"&&(te=te.toUpperCase()),te in e.image_compression?te:b.NONE}(F),ie)),!de)throw new Error("An unknown error occurred whilst processing the image.");return de},G=e.__addimage__.convertBase64ToBinaryString=function(P,I){var Y;I=typeof I!="boolean"||I;var F,de="";if(typeof P=="string"){F=(Y=$(P))!==null?Y.data:P;try{de=Gl(F)}catch(ie){if(I)throw L(F)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ie.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return de};e.getImageProperties=function(P){var I,Y,F="";if(m(P)&&(P=y(P)),typeof P=="string"&&n(P)===t&&((F=G(P,!1))===""&&(F=e.loadFile(P)||""),P=F),Y=n(P),!x(Y))throw new Error("addImage does not support files of type '"+Y+"', please ensure that a plugin for '"+Y+"' support is added.");if(!J()||P instanceof Uint8Array||(P=D(P)),!(I=this["process"+Y.toUpperCase()](P)))throw new Error("An unknown error occurred whilst processing the image");return I.fileType=Y,I}})(et.API),function(e){var t=function(r){if(r!==void 0&&r!="")return!0};et.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(r){for(var n,i,s,a=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(r.objId),h=r.pageContext.annotations,x=!1,m=0;m<h.length&&!x;m++)switch((n=h[m]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(x=!0);break;case"reference":case"text":case"freetext":x=!0}if(x!=0){this.internal.write("/Annots [");for(var y=0;y<h.length;y++){n=h[y];var p=this.internal.pdfEscape,N=this.internal.getEncryptor(r.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var k=this.internal.newAdditionalObject(),M=this.internal.newAdditionalObject(),b=this.internal.getEncryptor(k.objId),w=n.title||"Note";s="<</Type /Annot /Subtype /Text "+(i="/Rect ["+a(n.bounds.x)+" "+l(n.bounds.y+n.bounds.h)+" "+a(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y)+"] ")+"/Contents ("+p(b(n.contents))+")",s+=" /Popup "+M.objId+" 0 R",s+=" /P "+u.objId+" 0 R",s+=" /T ("+p(b(w))+") >>",k.content=s;var L=k.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+a(n.bounds.x+30)+" "+l(n.bounds.y+n.bounds.h)+" "+a(n.bounds.x+n.bounds.w+30)+" "+l(n.bounds.y)+"] ")+" /Parent "+L,n.open&&(s+=" /Open true"),s+=" >>",M.content=s,this.internal.write(k.objId,"0 R",M.objId,"0 R");break;case"freetext":i="/Rect ["+a(n.bounds.x)+" "+l(n.bounds.y)+" "+a(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y+n.bounds.h)+"] ";var $=n.color||"#000000";s="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+p(N(n.contents))+")",s+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+$+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(n.options.name){var J=this.annotations._nameMap[n.options.name];n.options.pageNumber=J.page,n.options.top=J.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",s="",n.options.url)s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+p(N(n.options.url))+") >>";else if(n.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,s+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var le=l(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),s+=" /XYZ "+n.options.left+" "+le+" "+n.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),e.createAnnotation=function(r){var n=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":n.pageContext.annotations.push(r)}},e.link=function(r,n,i,s,a){var l=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:u(r),y:h(n),w:u(r+i),h:h(n+s)},options:a,type:"link"})},e.textWithLink=function(r,n,i,s){var a,l,u=this.getTextWidth(r),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){l=s.maxWidth;var x=this.splitTextToSize(r,l).length;a=Math.ceil(h*x)}else l=u,a=h;return this.text(r,n,i,s),i+=.2*h,s.align==="center"&&(n-=u/2),s.align==="right"&&(n-=u),this.link(n,i-h,l,a,s),u},e.getTextWidth=function(r){var n=this.internal.getFontSize();return this.getStringUnitWidth(r)*n/this.internal.scaleFactor}}(et.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var s=e.__arabicParser__.isInArabicSubstitutionA=function(k){return t[k.charCodeAt(0)]!==void 0},a=e.__arabicParser__.isArabicLetter=function(k){return typeof k=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(k)},l=e.__arabicParser__.isArabicEndLetter=function(k){return a(k)&&s(k)&&t[k.charCodeAt(0)].length<=2},u=e.__arabicParser__.isArabicAlfLetter=function(k){return a(k)&&i.indexOf(k.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(k){return a(k)&&s(k)&&t[k.charCodeAt(0)].length>=1};var h=e.__arabicParser__.arabicLetterHasFinalForm=function(k){return a(k)&&s(k)&&t[k.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(k){return a(k)&&s(k)&&t[k.charCodeAt(0)].length>=3};var x=e.__arabicParser__.arabicLetterHasMedialForm=function(k){return a(k)&&s(k)&&t[k.charCodeAt(0)].length==4},m=e.__arabicParser__.resolveLigatures=function(k){var M=0,b=r,w="",L=0;for(M=0;M<k.length;M+=1)b[k.charCodeAt(M)]!==void 0?(L++,typeof(b=b[k.charCodeAt(M)])=="number"&&(w+=String.fromCharCode(b),b=r,L=0),M===k.length-1&&(b=r,w+=k.charAt(M-(L-1)),M-=L-1,L=0)):(b=r,w+=k.charAt(M-L),M-=L,L=0);return w};e.__arabicParser__.isArabicDiacritic=function(k){return k!==void 0&&n[k.charCodeAt(0)]!==void 0};var y=e.__arabicParser__.getCorrectForm=function(k,M,b){return a(k)?s(k)===!1?-1:!h(k)||!a(M)&&!a(b)||!a(b)&&l(M)||l(k)&&!a(M)||l(k)&&u(M)||l(k)&&l(M)?0:x(k)&&a(M)&&!l(M)&&a(b)&&h(b)?3:l(k)||!a(b)?1:2:-1},p=function(k){var M=0,b=0,w=0,L="",$="",J="",le=(k=k||"").split("\\s+"),D=[];for(M=0;M<le.length;M+=1){for(D.push(""),b=0;b<le[M].length;b+=1)L=le[M][b],$=le[M][b-1],J=le[M][b+1],a(L)?(w=y(L,$,J),D[M]+=w!==-1?String.fromCharCode(t[L.charCodeAt(0)][w]):L):D[M]+=L;D[M]=m(D[M])}return D.join(" ")},N=e.__arabicParser__.processArabic=e.processArabic=function(){var k,M=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,b=[];if(Array.isArray(M)){var w=0;for(b=[],w=0;w<M.length;w+=1)Array.isArray(M[w])?b.push([p(M[w][0]),M[w][1],M[w][2]]):b.push([p(M[w])]);k=b}else k=p(M);return typeof arguments[0]=="string"?k:(arguments[0].text=k,arguments[0])};e.events.push(["preProcessText",N])}(et.API),et.API.autoPrint=function(e){var t;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})}return this},function(e){var t=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(l){r=l}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(l){n=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(l){i=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(l){s=l}});var a={};Object.defineProperty(this,"style",{get:function(){return a},set:function(l){a=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(r,n){var i;if((r=r||"2d")!=="2d")return null;for(i in n)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=n[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(et.API),function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(k){u=k}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(k){h=k}});var x=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return x},set:function(k){x=k}});var m=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return m},set:function(k){m=k}});var y=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return y},set:function(k){y=k}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(k){p=k}});var N=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return N},set:function(k){N=k}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(u){return n.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},e.getTextDimensions=function(u,h){n.call(this);var x=(h=h||{}).fontSize||this.getFontSize(),m=h.font||this.getFont(),y=h.scaleFactor||this.internal.scaleFactor,p=0,N=0,k=0,M=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var b=h.maxWidth;b>0?typeof u=="string"?u=this.splitTextToSize(u,b):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(L,$){return L.concat(M.splitTextToSize($,b))},[])):u=Array.isArray(u)?u:[u];for(var w=0;w<u.length;w++)p<(k=this.getStringUnitWidth(u[w],{font:m})*x)&&(p=k);return p!==0&&(N=u.length),{w:p/=y,h:Math.max((N*x*this.getLineHeightFactor()-x*(this.getLineHeightFactor()-1))/y,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var u=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var a=e.cell=function(){var u;u=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var h=this.internal.__cell__.lastCell,x=this.internal.__cell__.padding,m=this.internal.__cell__.margins||t,y=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+m.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=m.top,p&&y&&(this.printHeaderRow(u.lineNumber,!0),u.y+=y[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,r===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-x,u.y+x,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+x,{align:"center",baseline:"top",maxWidth:u.width-x-x}):this.text(u.text,u.x+x,u.y+x,{align:"left",baseline:"top",maxWidth:u.width-x-x})),this.internal.__cell__.lastCell=u,this};e.table=function(u,h,x,m,y){if(n.call(this),!x)throw new Error("No data for PDF table.");var p,N,k,M,b=[],w=[],L=[],$={},J={},le=[],D=[],R=(y=y||{}).autoSize||!1,Z=y.printHeaders!==!1,G=y.css&&y.css["font-size"]!==void 0?16*y.css["font-size"]:y.fontSize||12,P=y.margins||Object.assign({width:this.getPageWidth()},t),I=typeof y.padding=="number"?y.padding:3,Y=y.headerBackgroundColor||"#c8c8c8",F=y.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=Z,this.internal.__cell__.margins=P,this.internal.__cell__.table_font_size=G,this.internal.__cell__.padding=I,this.internal.__cell__.headerBackgroundColor=Y,this.internal.__cell__.headerTextColor=F,this.setFontSize(G),m==null)w=b=Object.keys(x[0]),L=b.map(function(){return"left"});else if(Array.isArray(m)&&Nt(m[0])==="object")for(b=m.map(function(se){return se.name}),w=m.map(function(se){return se.prompt||se.name||""}),L=m.map(function(se){return se.align||"left"}),p=0;p<m.length;p+=1)J[m[p].name]=m[p].width*(19.049976/25.4);else Array.isArray(m)&&typeof m[0]=="string"&&(w=b=m,L=b.map(function(){return"left"}));if(R||Array.isArray(m)&&typeof m[0]=="string")for(p=0;p<b.length;p+=1){for($[M=b[p]]=x.map(function(se){return se[M]}),this.setFont(void 0,"bold"),le.push(this.getTextDimensions(w[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),N=$[M],this.setFont(void 0,"normal"),k=0;k<N.length;k+=1)le.push(this.getTextDimensions(N[k],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);J[M]=Math.max.apply(null,le)+I+I,le=[]}if(Z){var de={};for(p=0;p<b.length;p+=1)de[b[p]]={},de[b[p]].text=w[p],de[b[p]].align=L[p];var ie=l.call(this,de,J);D=b.map(function(se){return new s(u,h,J[se],ie,de[se].text,void 0,de[se].align)}),this.setTableHeaderRow(D),this.printHeaderRow(1,!1)}var he=m.reduce(function(se,ye){return se[ye.name]=ye.align,se},{});for(p=0;p<x.length;p+=1){"rowStart"in y&&y.rowStart instanceof Function&&y.rowStart({row:p,data:x[p]},this);var W=l.call(this,x[p],J);for(k=0;k<b.length;k+=1){var te=x[p][b[k]];"cellStart"in y&&y.cellStart instanceof Function&&y.cellStart({row:p,col:k,data:te},this),a.call(this,new s(u,h,J[b[k]],W,te,p+2,he[b[k]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var l=function(u,h){var x=this.internal.__cell__.padding,m=this.internal.__cell__.table_font_size,y=this.internal.scaleFactor;return Object.keys(u).map(function(p){var N=u[p];return this.splitTextToSize(N.hasOwnProperty("text")?N.text:N,h[p]-x-x)},this).map(function(p){return this.getLineHeightFactor()*p.length*m/y+x+x},this).reduce(function(p,N){return Math.max(p,N)},0)};e.setTableHeaderRow=function(u){n.call(this),this.internal.__cell__.tableHeaderRow=u},e.printHeaderRow=function(u,h){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var x;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var m=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(m[0],m[1],m[2],m[3],void 0,-1)}this.setFont(void 0,"bold");for(var y=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){x=this.internal.__cell__.tableHeaderRow[p].clone(),h&&(x.y=this.internal.__cell__.margins.top||0,y.push(x)),x.lineNumber=u;var N=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),a.call(this,x),this.setTextColor(N)}y.length>0&&this.setTableHeaderRow(y),this.setFont(void 0,"normal"),r=!1}}(et.API);var ry={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ny=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Uf=ty(ny),iy=[100,200,300,400,500,600,700,800,900],Q6=ty(iy);function $f(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),r=function(s){return ry[s=s||"normal"]?s:"normal"}(e.style),n=function(s){if(!s)return 400;if(typeof s=="number")return s>=100&&s<=900&&s%100==0?s:400;if(/^\d00$/.test(s))return parseInt(s);switch(s){case"bold":return 700;case"normal":default:return 400}}(e.weight),i=function(s){return typeof Uf[s=s||"normal"]=="number"?s:"normal"}(e.stretch);return{family:t,style:r,weight:n,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,r,n].join(" ")}}}function gm(e,t,r,n){var i;for(i=r;i>=0&&i<t.length;i+=n)if(e[t[i]])return e[t[i]];for(i=r;i>=0&&i<t.length;i-=n)if(e[t[i]])return e[t[i]]}var Z6={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},mm={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function xm(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function eN(e,t,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},Z6,r.genericFontFamilies||{}),s=null,a=null,l=0;l<t.length;++l)if(i[(s=$f(t[l])).family]&&(s.family=i[s.family]),e.hasOwnProperty(s.family)){a=e[s.family];break}if(!(a=a||e[n]))throw new Error("Could not find a font-family for the rule '"+xm(s)+"' and default family '"+n+"'.");if(a=function(u,h){if(h[u])return h[u];var x=Uf[u],m=x<=Uf.normal?-1:1,y=gm(h,ny,x,m);if(!y)throw new Error("Could not find a matching font-stretch value for "+u);return y}(s.stretch,a),a=function(u,h){if(h[u])return h[u];for(var x=ry[u],m=0;m<x.length;++m)if(h[x[m]])return h[x[m]];throw new Error("Could not find a matching font-style for "+u)}(s.style,a),!(a=function(u,h){if(h[u])return h[u];if(u===400&&h[500])return h[500];if(u===500&&h[400])return h[400];var x=Q6[u],m=gm(h,iy,x,u<400?-1:1);if(!m)throw new Error("Could not find a matching font-weight for value "+u);return m}(s.weight,a)))throw new Error("Failed to resolve a font for the rule '"+xm(s)+"'.");return a}function ym(e){return e.trimLeft()}function tN(e,t){for(var r=0;r<e.length;){if(e.charAt(r)===t)return[e.substring(0,r),e.substring(r+1)];r+=1}return null}function rN(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var Fu,vm,bm,_h=["times"];(function(e){var t,r,n,i,s,a,l,u,h,x=function(j){return j=j||{},this.isStrokeTransparent=j.isStrokeTransparent||!1,this.strokeOpacity=j.strokeOpacity||1,this.strokeStyle=j.strokeStyle||"#000000",this.fillStyle=j.fillStyle||"#000000",this.isFillTransparent=j.isFillTransparent||!1,this.fillOpacity=j.fillOpacity||1,this.font=j.font||"10px sans-serif",this.textBaseline=j.textBaseline||"alphabetic",this.textAlign=j.textAlign||"left",this.lineWidth=j.lineWidth||1,this.lineJoin=j.lineJoin||"miter",this.lineCap=j.lineCap||"butt",this.path=j.path||[],this.transform=j.transform!==void 0?j.transform.clone():new u,this.globalCompositeOperation=j.globalCompositeOperation||"normal",this.globalAlpha=j.globalAlpha||1,this.clip_path=j.clip_path||[],this.currentPoint=j.currentPoint||new a,this.miterLimit=j.miterLimit||10,this.lastPoint=j.lastPoint||new a,this.lineDashOffset=j.lineDashOffset||0,this.lineDash=j.lineDash||[],this.margin=j.margin||[0,0,0,0],this.prevPageLastElemOffset=j.prevPageLastElemOffset||0,this.ignoreClearRect=typeof j.ignoreClearRect!="boolean"||j.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new m(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,a=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,h=new x}]);var m=function(j){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var T=j;Object.defineProperty(this,"pdf",{get:function(){return T}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(xe){B=!!xe}});var K=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return K},set:function(xe){K=!!xe}});var ee=0;Object.defineProperty(this,"posX",{get:function(){return ee},set:function(xe){isNaN(xe)||(ee=xe)}});var z=0;Object.defineProperty(this,"posY",{get:function(){return z},set:function(xe){isNaN(xe)||(z=xe)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(xe){var V;typeof xe=="number"?V=[xe,xe,xe,xe]:((V=new Array(4))[0]=xe[0],V[1]=xe.length>=2?xe[1]:V[0],V[2]=xe.length>=3?xe[2]:V[0],V[3]=xe.length>=4?xe[3]:V[1]),h.margin=V}});var X=!1;Object.defineProperty(this,"autoPaging",{get:function(){return X},set:function(xe){X=xe}});var ae=0;Object.defineProperty(this,"lastBreak",{get:function(){return ae},set:function(xe){ae=xe}});var ke=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ke},set:function(xe){ke=xe}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(xe){xe instanceof x&&(h=xe)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(xe){h.path=xe}});var me=[];Object.defineProperty(this,"ctxStack",{get:function(){return me},set:function(xe){me=xe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(xe){var V;V=y(xe),this.ctx.fillStyle=V.style,this.ctx.isFillTransparent=V.a===0,this.ctx.fillOpacity=V.a,this.pdf.setFillColor(V.r,V.g,V.b,{a:V.a}),this.pdf.setTextColor(V.r,V.g,V.b,{a:V.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(xe){var V=y(xe);this.ctx.strokeStyle=V.style,this.ctx.isStrokeTransparent=V.a===0,this.ctx.strokeOpacity=V.a,V.a===0?this.pdf.setDrawColor(255,255,255):(V.a,this.pdf.setDrawColor(V.r,V.g,V.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(xe){["butt","round","square"].indexOf(xe)!==-1&&(this.ctx.lineCap=xe,this.pdf.setLineCap(xe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(xe){isNaN(xe)||(this.ctx.lineWidth=xe,this.pdf.setLineWidth(xe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(xe){["bevel","round","miter"].indexOf(xe)!==-1&&(this.ctx.lineJoin=xe,this.pdf.setLineJoin(xe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(xe){isNaN(xe)||(this.ctx.miterLimit=xe,this.pdf.setMiterLimit(xe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(xe){this.ctx.textBaseline=xe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(xe){["right","end","center","left","start"].indexOf(xe)!==-1&&(this.ctx.textAlign=xe)}});var we=null;function Pe(xe,V){if(we===null){var nt=function(Ge){var Ie=[];return Object.keys(Ge).forEach(function(Oe){Ge[Oe].forEach(function(Re){var q=null;switch(Re){case"bold":q={family:Oe,weight:"bold"};break;case"italic":q={family:Oe,style:"italic"};break;case"bolditalic":q={family:Oe,weight:"bold",style:"italic"};break;case"":case"normal":q={family:Oe}}q!==null&&(q.ref={name:Oe,style:Re},Ie.push(q))})}),Ie}(xe.getFontList());we=function(Ge){for(var Ie={},Oe=0;Oe<Ge.length;++Oe){var Re=$f(Ge[Oe]),q=Re.family,ue=Re.stretch,Ce=Re.style,Ae=Re.weight;Ie[q]=Ie[q]||{},Ie[q][ue]=Ie[q][ue]||{},Ie[q][ue][Ce]=Ie[q][ue][Ce]||{},Ie[q][ue][Ce][Ae]=Re}return Ie}(nt.concat(V))}return we}var We=null;Object.defineProperty(this,"fontFaces",{get:function(){return We},set:function(xe){we=null,We=xe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(xe){var V;if(this.ctx.font=xe,(V=/^\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-z]+?)\s*$/i.exec(xe))!==null){var nt=V[1],Ge=(V[2],V[3]),Ie=V[4],Oe=(V[5],V[6]),Re=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ie)[2];Ie=Math.floor(Re==="px"?parseFloat(Ie)*this.pdf.internal.scaleFactor:Re==="em"?parseFloat(Ie)*this.pdf.getFontSize():parseFloat(Ie)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ie);var q=function(He){var it,Me,Gt=[],dt=He.trim();if(dt==="")return _h;if(dt in mm)return[mm[dt]];for(;dt!=="";){switch(Me=null,it=(dt=ym(dt)).charAt(0)){case'"':case"'":Me=tN(dt.substring(1),it);break;default:Me=rN(dt)}if(Me===null||(Gt.push(Me[0]),(dt=ym(Me[1]))!==""&&dt.charAt(0)!==","))return _h;dt=dt.replace(/^,/,"")}return Gt}(Oe);if(this.fontFaces){var ue=eN(Pe(this.pdf,this.fontFaces),q.map(function(He){return{family:He,stretch:"normal",weight:Ge,style:nt}}));this.pdf.setFont(ue.ref.name,ue.ref.style)}else{var Ce="";(Ge==="bold"||parseInt(Ge,10)>=700||nt==="bold")&&(Ce="bold"),nt==="italic"&&(Ce+="italic"),Ce.length===0&&(Ce="normal");for(var Ae="",ve={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"},Ye=0;Ye<q.length;Ye++){if(this.pdf.internal.getFont(q[Ye],Ce,{noFallback:!0,disableWarning:!0})!==void 0){Ae=q[Ye];break}if(Ce==="bolditalic"&&this.pdf.internal.getFont(q[Ye],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Ae=q[Ye],Ce="bold";else if(this.pdf.internal.getFont(q[Ye],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Ae=q[Ye],Ce="normal";break}}if(Ae===""){for(var qe=0;qe<q.length;qe++)if(ve[q[qe]]){Ae=ve[q[qe]];break}}Ae=Ae===""?"Times":Ae,this.pdf.setFont(Ae,Ce)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(xe){this.ctx.globalCompositeOperation=xe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(xe){this.ctx.globalAlpha=xe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(xe){this.ctx.lineDashOffset=xe,ye.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(xe){this.ctx.lineDash=xe,ye.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(xe){this.ctx.ignoreClearRect=!!xe}})};m.prototype.setLineDash=function(j){this.lineDash=j},m.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},m.prototype.fill=function(){$.call(this,"fill",!1)},m.prototype.stroke=function(){$.call(this,"stroke",!1)},m.prototype.beginPath=function(){this.path=[{type:"begin"}]},m.prototype.moveTo=function(j,T){if(isNaN(j)||isNaN(T))throw Lt.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new a(j,T));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new a(j,T)},m.prototype.closePath=function(){var j=new a(0,0),T=0;for(T=this.path.length-1;T!==-1;T--)if(this.path[T].type==="begin"&&Nt(this.path[T+1])==="object"&&typeof this.path[T+1].x=="number"){j=new a(this.path[T+1].x,this.path[T+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new a(j.x,j.y)},m.prototype.lineTo=function(j,T){if(isNaN(j)||isNaN(T))throw Lt.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new a(j,T));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new a(B.x,B.y)},m.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),$.call(this,null,!0)},m.prototype.quadraticCurveTo=function(j,T,B,K){if(isNaN(B)||isNaN(K)||isNaN(j)||isNaN(T))throw Lt.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ee=this.ctx.transform.applyToPoint(new a(B,K)),z=this.ctx.transform.applyToPoint(new a(j,T));this.path.push({type:"qct",x1:z.x,y1:z.y,x:ee.x,y:ee.y}),this.ctx.lastPoint=new a(ee.x,ee.y)},m.prototype.bezierCurveTo=function(j,T,B,K,ee,z){if(isNaN(ee)||isNaN(z)||isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K))throw Lt.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var X=this.ctx.transform.applyToPoint(new a(ee,z)),ae=this.ctx.transform.applyToPoint(new a(j,T)),ke=this.ctx.transform.applyToPoint(new a(B,K));this.path.push({type:"bct",x1:ae.x,y1:ae.y,x2:ke.x,y2:ke.y,x:X.x,y:X.y}),this.ctx.lastPoint=new a(X.x,X.y)},m.prototype.arc=function(j,T,B,K,ee,z){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K)||isNaN(ee))throw Lt.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(z=!!z,!this.ctx.transform.isIdentity){var X=this.ctx.transform.applyToPoint(new a(j,T));j=X.x,T=X.y;var ae=this.ctx.transform.applyToPoint(new a(0,B)),ke=this.ctx.transform.applyToPoint(new a(0,0));B=Math.sqrt(Math.pow(ae.x-ke.x,2)+Math.pow(ae.y-ke.y,2))}Math.abs(ee-K)>=2*Math.PI&&(K=0,ee=2*Math.PI),this.path.push({type:"arc",x:j,y:T,radius:B,startAngle:K,endAngle:ee,counterclockwise:z})},m.prototype.arcTo=function(j,T,B,K,ee){throw new Error("arcTo not implemented.")},m.prototype.rect=function(j,T,B,K){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K))throw Lt.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(j,T),this.lineTo(j+B,T),this.lineTo(j+B,T+K),this.lineTo(j,T+K),this.lineTo(j,T),this.lineTo(j+B,T),this.lineTo(j,T)},m.prototype.fillRect=function(j,T,B,K){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K))throw Lt.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var ee={};this.lineCap!=="butt"&&(ee.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ee.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(j,T,B,K),this.fill(),ee.hasOwnProperty("lineCap")&&(this.lineCap=ee.lineCap),ee.hasOwnProperty("lineJoin")&&(this.lineJoin=ee.lineJoin)}},m.prototype.strokeRect=function(j,T,B,K){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K))throw Lt.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");N.call(this)||(this.beginPath(),this.rect(j,T,B,K),this.stroke())},m.prototype.clearRect=function(j,T,B,K){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K))throw Lt.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(j,T,B,K))},m.prototype.save=function(j){j=typeof j!="boolean"||j;for(var T=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");if(this.pdf.setPage(T),j){this.ctx.fontSize=this.pdf.internal.getFontSize();var K=new x(this.ctx);this.ctxStack.push(this.ctx),this.ctx=K}},m.prototype.restore=function(j){j=typeof j!="boolean"||j;for(var T=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(T),j&&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)},m.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var y=function(j){var T,B,K,ee;if(j.isCanvasGradient===!0&&(j=j.getColor()),!j)return{r:0,g:0,b:0,a:0,style:j};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(j))T=0,B=0,K=0,ee=0;else{var z=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(j);if(z!==null)T=parseInt(z[1]),B=parseInt(z[2]),K=parseInt(z[3]),ee=1;else if((z=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(j))!==null)T=parseInt(z[1]),B=parseInt(z[2]),K=parseInt(z[3]),ee=parseFloat(z[4]);else{if(ee=1,typeof j=="string"&&j.charAt(0)!=="#"){var X=new Kx(j);j=X.ok?X.toHex():"#000000"}j.length===4?(T=j.substring(1,2),T+=T,B=j.substring(2,3),B+=B,K=j.substring(3,4),K+=K):(T=j.substring(1,3),B=j.substring(3,5),K=j.substring(5,7)),T=parseInt(T,16),B=parseInt(B,16),K=parseInt(K,16)}}return{r:T,g:B,b:K,a:ee,style:j}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},N=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};m.prototype.fillText=function(j,T,B,K){if(isNaN(T)||isNaN(B)||typeof j!="string")throw Lt.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(K=isNaN(K)?void 0:K,!p.call(this)){var ee=W(this.ctx.transform.rotation),z=this.ctx.transform.scaleX;I.call(this,{text:j,x:T,y:B,scale:z,angle:ee,align:this.textAlign,maxWidth:K})}},m.prototype.strokeText=function(j,T,B,K){if(isNaN(T)||isNaN(B)||typeof j!="string")throw Lt.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!N.call(this)){K=isNaN(K)?void 0:K;var ee=W(this.ctx.transform.rotation),z=this.ctx.transform.scaleX;I.call(this,{text:j,x:T,y:B,scale:z,renderingMode:"stroke",angle:ee,align:this.textAlign,maxWidth:K})}},m.prototype.measureText=function(j){if(typeof j!="string")throw Lt.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var T=this.pdf,B=this.pdf.internal.scaleFactor,K=T.internal.getFontSize(),ee=T.getStringUnitWidth(j)*K/T.internal.scaleFactor,z=function(X){var ae=(X=X||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ae}}),this};return new z({width:ee*=Math.round(96*B/72*1e4)/1e4})},m.prototype.scale=function(j,T){if(isNaN(j)||isNaN(T))throw Lt.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new u(j,0,0,T,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},m.prototype.rotate=function(j){if(isNaN(j))throw Lt.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var T=new u(Math.cos(j),Math.sin(j),-Math.sin(j),Math.cos(j),0,0);this.ctx.transform=this.ctx.transform.multiply(T)},m.prototype.translate=function(j,T){if(isNaN(j)||isNaN(T))throw Lt.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new u(1,0,0,1,j,T);this.ctx.transform=this.ctx.transform.multiply(B)},m.prototype.transform=function(j,T,B,K,ee,z){if(isNaN(j)||isNaN(T)||isNaN(B)||isNaN(K)||isNaN(ee)||isNaN(z))throw Lt.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var X=new u(j,T,B,K,ee,z);this.ctx.transform=this.ctx.transform.multiply(X)},m.prototype.setTransform=function(j,T,B,K,ee,z){j=isNaN(j)?1:j,T=isNaN(T)?0:T,B=isNaN(B)?0:B,K=isNaN(K)?1:K,ee=isNaN(ee)?0:ee,z=isNaN(z)?0:z,this.ctx.transform=new u(j,T,B,K,ee,z)};var k=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};m.prototype.drawImage=function(j,T,B,K,ee,z,X,ae,ke){var me=this.pdf.getImageProperties(j),we=1,Pe=1,We=1,xe=1;K!==void 0&&ae!==void 0&&(We=ae/K,xe=ke/ee,we=me.width/K*ae/K,Pe=me.height/ee*ke/ee),z===void 0&&(z=T,X=B,T=0,B=0),K!==void 0&&ae===void 0&&(ae=K,ke=ee),K===void 0&&ae===void 0&&(ae=me.width,ke=me.height);for(var V,nt=this.ctx.transform.decompose(),Ge=W(nt.rotate.shx),Ie=new u,Oe=(Ie=(Ie=(Ie=Ie.multiply(nt.translate)).multiply(nt.skew)).multiply(nt.scale)).applyToRectangle(new l(z-T*We,X-B*xe,K*we,ee*Pe)),Re=M.call(this,Oe),q=[],ue=0;ue<Re.length;ue+=1)q.indexOf(Re[ue])===-1&&q.push(Re[ue]);if(L(q),this.autoPaging)for(var Ce=q[0],Ae=q[q.length-1],ve=Ce;ve<Ae+1;ve++){this.pdf.setPage(ve);var Ye=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qe=ve===1?this.posY+this.margin[0]:this.margin[0],He=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],it=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Me=ve===1?0:He+(ve-2)*it;if(this.ctx.clip_path.length!==0){var Gt=this.path;V=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(V,this.posX+this.margin[3],-Me+qe+this.ctx.prevPageLastElemOffset),J.call(this,"fill",!0),this.path=Gt}var dt=JSON.parse(JSON.stringify(Oe));dt=w([dt],this.posX+this.margin[3],-Me+qe+this.ctx.prevPageLastElemOffset)[0];var Vr=(ve>Ce||ve<Ae)&&k.call(this);Vr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ye,it,null).clip().discardPath()),this.pdf.addImage(j,"JPEG",dt.x,dt.y,dt.w,dt.h,null,null,Ge),Vr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(j,"JPEG",Oe.x,Oe.y,Oe.w,Oe.h,null,null,Ge)};var M=function(j,T,B){var K=[];T=T||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ee=this.posY+this.ctx.prevPageLastElemOffset;switch(j.type){default:case"mt":case"lt":K.push(Math.floor((j.y+ee)/B)+1);break;case"arc":K.push(Math.floor((j.y+ee-j.radius)/B)+1),K.push(Math.floor((j.y+ee+j.radius)/B)+1);break;case"qct":var z=te(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x,j.y);K.push(Math.floor((z.y+ee)/B)+1),K.push(Math.floor((z.y+z.h+ee)/B)+1);break;case"bct":var X=se(this.ctx.lastPoint.x,this.ctx.lastPoint.y,j.x1,j.y1,j.x2,j.y2,j.x,j.y);K.push(Math.floor((X.y+ee)/B)+1),K.push(Math.floor((X.y+X.h+ee)/B)+1);break;case"rect":K.push(Math.floor((j.y+ee)/B)+1),K.push(Math.floor((j.y+j.h+ee)/B)+1)}for(var ae=0;ae<K.length;ae+=1)for(;this.pdf.internal.getNumberOfPages()<K[ae];)b.call(this);return K},b=function(){var j=this.fillStyle,T=this.strokeStyle,B=this.font,K=this.lineCap,ee=this.lineWidth,z=this.lineJoin;this.pdf.addPage(),this.fillStyle=j,this.strokeStyle=T,this.font=B,this.lineCap=K,this.lineWidth=ee,this.lineJoin=z},w=function(j,T,B){for(var K=0;K<j.length;K++)switch(j[K].type){case"bct":j[K].x2+=T,j[K].y2+=B;case"qct":j[K].x1+=T,j[K].y1+=B;case"mt":case"lt":case"arc":default:j[K].x+=T,j[K].y+=B}return j},L=function(j){return j.sort(function(T,B){return T-B})},$=function(j,T){for(var B,K,ee=this.fillStyle,z=this.strokeStyle,X=this.lineCap,ae=this.lineWidth,ke=Math.abs(ae*this.ctx.transform.scaleX),me=this.lineJoin,we=JSON.parse(JSON.stringify(this.path)),Pe=JSON.parse(JSON.stringify(this.path)),We=[],xe=0;xe<Pe.length;xe++)if(Pe[xe].x!==void 0)for(var V=M.call(this,Pe[xe]),nt=0;nt<V.length;nt+=1)We.indexOf(V[nt])===-1&&We.push(V[nt]);for(var Ge=0;Ge<We.length;Ge++)for(;this.pdf.internal.getNumberOfPages()<We[Ge];)b.call(this);if(L(We),this.autoPaging)for(var Ie=We[0],Oe=We[We.length-1],Re=Ie;Re<Oe+1;Re++){this.pdf.setPage(Re),this.fillStyle=ee,this.strokeStyle=z,this.lineCap=X,this.lineWidth=ke,this.lineJoin=me;var q=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ue=Re===1?this.posY+this.margin[0]:this.margin[0],Ce=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ae=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ve=Re===1?0:Ce+(Re-2)*Ae;if(this.ctx.clip_path.length!==0){var Ye=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(B,this.posX+this.margin[3],-ve+ue+this.ctx.prevPageLastElemOffset),J.call(this,j,!0),this.path=Ye}if(K=JSON.parse(JSON.stringify(we)),this.path=w(K,this.posX+this.margin[3],-ve+ue+this.ctx.prevPageLastElemOffset),T===!1||Re===0){var qe=(Re>Ie||Re<Oe)&&k.call(this);qe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],q,Ae,null).clip().discardPath()),J.call(this,j,T),qe&&this.pdf.restoreGraphicsState()}this.lineWidth=ae}else this.lineWidth=ke,J.call(this,j,T),this.lineWidth=ae;this.path=we},J=function(j,T){if((j!=="stroke"||T||!N.call(this))&&(j==="stroke"||T||!p.call(this))){for(var B,K,ee=[],z=this.path,X=0;X<z.length;X++){var ae=z[X];switch(ae.type){case"begin":ee.push({begin:!0});break;case"close":ee.push({close:!0});break;case"mt":ee.push({start:ae,deltas:[],abs:[]});break;case"lt":var ke=ee.length;if(z[X-1]&&!isNaN(z[X-1].x)&&(B=[ae.x-z[X-1].x,ae.y-z[X-1].y],ke>0)){for(;ke>=0;ke--)if(ee[ke-1].close!==!0&&ee[ke-1].begin!==!0){ee[ke-1].deltas.push(B),ee[ke-1].abs.push(ae);break}}break;case"bct":B=[ae.x1-z[X-1].x,ae.y1-z[X-1].y,ae.x2-z[X-1].x,ae.y2-z[X-1].y,ae.x-z[X-1].x,ae.y-z[X-1].y],ee[ee.length-1].deltas.push(B);break;case"qct":var me=z[X-1].x+2/3*(ae.x1-z[X-1].x),we=z[X-1].y+2/3*(ae.y1-z[X-1].y),Pe=ae.x+2/3*(ae.x1-ae.x),We=ae.y+2/3*(ae.y1-ae.y),xe=ae.x,V=ae.y;B=[me-z[X-1].x,we-z[X-1].y,Pe-z[X-1].x,We-z[X-1].y,xe-z[X-1].x,V-z[X-1].y],ee[ee.length-1].deltas.push(B);break;case"arc":ee.push({deltas:[],abs:[],arc:!0}),Array.isArray(ee[ee.length-1].abs)&&ee[ee.length-1].abs.push(ae)}}K=T?null:j==="stroke"?"stroke":"fill";for(var nt=!1,Ge=0;Ge<ee.length;Ge++)if(ee[Ge].arc)for(var Ie=ee[Ge].abs,Oe=0;Oe<Ie.length;Oe++){var Re=Ie[Oe];Re.type==="arc"?R.call(this,Re.x,Re.y,Re.radius,Re.startAngle,Re.endAngle,Re.counterclockwise,void 0,T,!nt):Y.call(this,Re.x,Re.y),nt=!0}else if(ee[Ge].close===!0)this.pdf.internal.out("h"),nt=!1;else if(ee[Ge].begin!==!0){var q=ee[Ge].start.x,ue=ee[Ge].start.y;F.call(this,ee[Ge].deltas,q,ue),nt=!0}K&&Z.call(this,K),T&&G.call(this)}},le=function(j){var T=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=T*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return j-B;case"top":return j+T-B;case"hanging":return j+T-2*B;case"middle":return j+T/2-B;case"ideographic":return j;case"alphabetic":default:return j}},D=function(j){return j+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};m.prototype.createLinearGradient=function(){var j=function(){};return j.colorStops=[],j.addColorStop=function(T,B){this.colorStops.push([T,B])},j.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},j.isCanvasGradient=!0,j},m.prototype.createPattern=function(){return this.createLinearGradient()},m.prototype.createRadialGradient=function(){return this.createLinearGradient()};var R=function(j,T,B,K,ee,z,X,ae,ke){for(var me=ie.call(this,B,K,ee,z),we=0;we<me.length;we++){var Pe=me[we];we===0&&(ke?P.call(this,Pe.x1+j,Pe.y1+T):Y.call(this,Pe.x1+j,Pe.y1+T)),de.call(this,j,T,Pe.x2,Pe.y2,Pe.x3,Pe.y3,Pe.x4,Pe.y4)}ae?G.call(this):Z.call(this,X)},Z=function(j){switch(j){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},G=function(){this.pdf.clip(),this.pdf.discardPath()},P=function(j,T){this.pdf.internal.out(r(j)+" "+n(T)+" m")},I=function(j){var T;switch(j.align){case"right":case"end":T="right";break;case"center":T="center";break;case"left":case"start":default:T="left"}var B=this.pdf.getTextDimensions(j.text),K=le.call(this,j.y),ee=D.call(this,K)-B.h,z=this.ctx.transform.applyToPoint(new a(j.x,K)),X=this.ctx.transform.decompose(),ae=new u;ae=(ae=(ae=ae.multiply(X.translate)).multiply(X.skew)).multiply(X.scale);for(var ke,me,we,Pe=this.ctx.transform.applyToRectangle(new l(j.x,K,B.w,B.h)),We=ae.applyToRectangle(new l(j.x,ee,B.w,B.h)),xe=M.call(this,We),V=[],nt=0;nt<xe.length;nt+=1)V.indexOf(xe[nt])===-1&&V.push(xe[nt]);if(L(V),this.autoPaging)for(var Ge=V[0],Ie=V[V.length-1],Oe=Ge;Oe<Ie+1;Oe++){this.pdf.setPage(Oe);var Re=Oe===1?this.posY+this.margin[0]:this.margin[0],q=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ue=this.pdf.internal.pageSize.height-this.margin[2],Ce=ue-this.margin[0],Ae=this.pdf.internal.pageSize.width-this.margin[1],ve=Ae-this.margin[3],Ye=Oe===1?0:q+(Oe-2)*Ce;if(this.ctx.clip_path.length!==0){var qe=this.path;ke=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(ke,this.posX+this.margin[3],-1*Ye+Re),J.call(this,"fill",!0),this.path=qe}var He=w([JSON.parse(JSON.stringify(We))],this.posX+this.margin[3],-Ye+Re+this.ctx.prevPageLastElemOffset)[0];j.scale>=.01&&(me=this.pdf.internal.getFontSize(),this.pdf.setFontSize(me*j.scale),we=this.lineWidth,this.lineWidth=we*j.scale);var it=this.autoPaging!=="text";if(it||He.y+He.h<=ue){if(it||He.y>=Re&&He.x<=Ae){var Me=it?j.text:this.pdf.splitTextToSize(j.text,j.maxWidth||Ae-He.x)[0],Gt=w([JSON.parse(JSON.stringify(Pe))],this.posX+this.margin[3],-Ye+Re+this.ctx.prevPageLastElemOffset)[0],dt=it&&(Oe>Ge||Oe<Ie)&&k.call(this);dt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ve,Ce,null).clip().discardPath()),this.pdf.text(Me,Gt.x,Gt.y,{angle:j.angle,align:T,renderingMode:j.renderingMode}),dt&&this.pdf.restoreGraphicsState()}}else He.y<ue&&(this.ctx.prevPageLastElemOffset+=ue-He.y);j.scale>=.01&&(this.pdf.setFontSize(me),this.lineWidth=we)}else j.scale>=.01&&(me=this.pdf.internal.getFontSize(),this.pdf.setFontSize(me*j.scale),we=this.lineWidth,this.lineWidth=we*j.scale),this.pdf.text(j.text,z.x+this.posX,z.y+this.posY,{angle:j.angle,align:T,renderingMode:j.renderingMode,maxWidth:j.maxWidth}),j.scale>=.01&&(this.pdf.setFontSize(me),this.lineWidth=we)},Y=function(j,T,B,K){B=B||0,K=K||0,this.pdf.internal.out(r(j+B)+" "+n(T+K)+" l")},F=function(j,T,B){return this.pdf.lines(j,T,B,null,null)},de=function(j,T,B,K,ee,z,X,ae){this.pdf.internal.out([t(i(B+j)),t(s(K+T)),t(i(ee+j)),t(s(z+T)),t(i(X+j)),t(s(ae+T)),"c"].join(" "))},ie=function(j,T,B,K){for(var ee=2*Math.PI,z=Math.PI/2;T>B;)T-=ee;var X=Math.abs(B-T);X<ee&&K&&(X=ee-X);for(var ae=[],ke=K?-1:1,me=T;X>1e-5;){var we=me+ke*Math.min(X,z);ae.push(he.call(this,j,me,we)),X-=Math.abs(we-me),me=we}return ae},he=function(j,T,B){var K=(B-T)/2,ee=j*Math.cos(K),z=j*Math.sin(K),X=ee,ae=-z,ke=X*X+ae*ae,me=ke+X*ee+ae*z,we=4/3*(Math.sqrt(2*ke*me)-me)/(X*z-ae*ee),Pe=X-we*ae,We=ae+we*X,xe=Pe,V=-We,nt=K+T,Ge=Math.cos(nt),Ie=Math.sin(nt);return{x1:j*Math.cos(T),y1:j*Math.sin(T),x2:Pe*Ge-We*Ie,y2:Pe*Ie+We*Ge,x3:xe*Ge-V*Ie,y3:xe*Ie+V*Ge,x4:j*Math.cos(B),y4:j*Math.sin(B)}},W=function(j){return 180*j/Math.PI},te=function(j,T,B,K,ee,z){var X=j+.5*(B-j),ae=T+.5*(K-T),ke=ee+.5*(B-ee),me=z+.5*(K-z),we=Math.min(j,ee,X,ke),Pe=Math.max(j,ee,X,ke),We=Math.min(T,z,ae,me),xe=Math.max(T,z,ae,me);return new l(we,We,Pe-we,xe-We)},se=function(j,T,B,K,ee,z,X,ae){var ke,me,we,Pe,We,xe,V,nt,Ge,Ie,Oe,Re,q,ue,Ce=B-j,Ae=K-T,ve=ee-B,Ye=z-K,qe=X-ee,He=ae-z;for(me=0;me<41;me++)Ge=(V=(we=j+(ke=me/40)*Ce)+ke*((We=B+ke*ve)-we))+ke*(We+ke*(ee+ke*qe-We)-V),Ie=(nt=(Pe=T+ke*Ae)+ke*((xe=K+ke*Ye)-Pe))+ke*(xe+ke*(z+ke*He-xe)-nt),me==0?(Oe=Ge,Re=Ie,q=Ge,ue=Ie):(Oe=Math.min(Oe,Ge),Re=Math.min(Re,Ie),q=Math.max(q,Ge),ue=Math.max(ue,Ie));return new l(Math.round(Oe),Math.round(Re),Math.round(q-Oe),Math.round(ue-Re))},ye=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var j,T,B=(j=this.ctx.lineDash,T=this.ctx.lineDashOffset,JSON.stringify({lineDash:j,lineDashOffset:T}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(et.API),function(e){var t=function(s){var a,l,u,h,x,m,y,p,N,k;for(l=[],u=0,h=(s+=a="\0\0\0\0".slice(s.length%4||4)).length;h>u;u+=4)(x=(s.charCodeAt(u)<<24)+(s.charCodeAt(u+1)<<16)+(s.charCodeAt(u+2)<<8)+s.charCodeAt(u+3))!==0?(m=(x=((x=((x=((x=(x-(k=x%85))/85)-(N=x%85))/85)-(p=x%85))/85)-(y=x%85))/85)%85,l.push(m+33,y+33,p+33,N+33,k+33)):l.push(122);return function(M,b){for(var w=b;w>0;w--)M.pop()}(l,a.length),String.fromCharCode.apply(String,l)+"~>"},r=function(s){var a,l,u,h,x,m=String,y="length",p=255,N="charCodeAt",k="slice",M="replace";for(s[k](-2),s=s[k](0,-2)[M](/\s/g,"")[M]("z","!!!!!"),u=[],h=0,x=(s+=a="uuuuu"[k](s[y]%5||5))[y];x>h;h+=5)l=52200625*(s[N](h)-33)+614125*(s[N](h+1)-33)+7225*(s[N](h+2)-33)+85*(s[N](h+3)-33)+(s[N](h+4)-33),u.push(p&l>>24,p&l>>16,p&l>>8,p&l);return function(b,w){for(var L=w;L>0;L--)b.pop()}(u,a[y]),m.fromCharCode.apply(m,u)},n=function(s){var a=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((s=s.replace(/\s/g,"")).indexOf(">")!==-1&&(s=s.substr(0,s.indexOf(">"))),s.length%2&&(s+="0"),a.test(s)===!1)return"";for(var l="",u=0;u<s.length;u+=2)l+=String.fromCharCode("0x"+(s[u]+s[u+1]));return l},i=function(s){for(var a=new Uint8Array(s.length),l=s.length;l--;)a[l]=s.charCodeAt(l);return s=(a=Df(a)).reduce(function(u,h){return u+String.fromCharCode(h)},"")};e.processDataByFilters=function(s,a){var l=0,u=s||"",h=[];for(typeof(a=a||[])=="string"&&(a=[a]),l=0;l<a.length;l+=1)switch(a[l]){case"ASCII85Decode":case"/ASCII85Decode":u=r(u),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=t(u),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=n(u),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=u.split("").map(function(x){return("0"+x.charCodeAt().toString(16)).slice(-2)}).join("")+">",h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=i(u),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[l]+'" is not implemented')}return{data:u,reverseChain:h.reverse().join(" ")}}}(et.API),function(e){e.loadFile=function(t,r,n){return function(i,s,a){s=s!==!1,a=typeof a=="function"?a:function(){};var l=void 0;try{l=function(u,h,x){var m=new XMLHttpRequest,y=0,p=function(N){var k=N.length,M=[],b=String.fromCharCode;for(y=0;y<k;y+=1)M.push(b(255&N.charCodeAt(y)));return M.join("")};if(m.open("GET",u,!h),m.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(m.onload=function(){m.status===200?x(p(this.responseText)):x(void 0)}),m.send(null),h&&m.status===200)return p(m.responseText)}(i,s,a)}catch{}return l}(t,r,n)},e.loadImageFile=e.loadFile}(et.API),function(e){function t(){return(tt.html2canvas?Promise.resolve(tt.html2canvas):If(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(a){return Promise.reject(new Error("Could not load html2canvas: "+a))}).then(function(a){return a.default?a.default:a})}function r(){return(tt.DOMPurify?Promise.resolve(tt.DOMPurify):If(()=>import("./purify.es-C_uT9hQ1.js"),[])).catch(function(a){return Promise.reject(new Error("Could not load dompurify: "+a))}).then(function(a){return a.default?a.default:a})}var n=function(a){var l=Nt(a);return l==="undefined"?"undefined":l==="string"||a instanceof String?"string":l==="number"||a instanceof Number?"number":l==="function"||a instanceof Function?"function":a&&a.constructor===Array?"array":a&&a.nodeType===1?"element":l==="object"?"object":"unknown"},i=function(a,l){var u=document.createElement(a);for(var h in l.className&&(u.className=l.className),l.innerHTML&&l.dompurify&&(u.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)u.style[h]=l.style[h];return u},s=function a(l){var u=Object.assign(a.convert(Promise.resolve()),JSON.parse(JSON.stringify(a.template))),h=a.convert(Promise.resolve(),u);return h=(h=h.setProgress(1,a,1,[a])).set(l)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(a,l){return a.__proto__=l||s.prototype,a},s.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"}},s.prototype.from=function(a,l){return this.then(function(){switch(l=l||function(u){switch(n(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(a)){case"string":return this.then(r).then(function(u){return this.set({src:i("div",{innerHTML:a,dompurify:u})})});case"element":return this.set({src:a});case"canvas":return this.set({canvas:a});case"img":return this.set({img:a});default:return this.error("Unknown source type.")}})},s.prototype.to=function(a){switch(a){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.")}},s.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 a={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},l=function u(h,x){for(var m=h.nodeType===3?document.createTextNode(h.nodeValue):h.cloneNode(!1),y=h.firstChild;y;y=y.nextSibling)x!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||m.appendChild(u(y,x));return h.nodeType===1&&(h.nodeName==="CANVAS"?(m.width=h.width,m.height=h.height,m.getContext("2d").drawImage(h,0,0)):h.nodeName!=="TEXTAREA"&&h.nodeName!=="SELECT"||(m.value=h.value),m.addEventListener("load",function(){m.scrollTop=h.scrollTop,m.scrollLeft=h.scrollLeft},!0)),m}(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(a.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:a}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(i("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"})},s.prototype.toCanvas=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(l){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,l(this.prop.container,u)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},s.prototype.toContext2d=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(l){var u=this.opt.jsPDF,h=this.opt.fontFaces,x=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,m=Object.assign({async:!0,allowTaint:!0,scale:x,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete m.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=h,h)for(var y=0;y<h.length;++y){var p=h[y],N=p.src.find(function(k){return k.format==="truetype"});N&&u.addFont(N.url,p.ref.name,p.ref.style)}return m.windowHeight=m.windowHeight||0,m.windowHeight=m.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):m.windowHeight,u.context2d.save(!0),l(this.prop.container,m)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var a=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=a})},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},s.prototype.output=function(a,l,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(a,l):this.outputPdf(a,l)},s.prototype.outputPdf=function(a,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(a,l)})},s.prototype.outputImg=function(a){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(a){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 "'+a+'" is not supported.'}})},s.prototype.save=function(a){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(a?{filename:a}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},s.prototype.set=function(a){if(n(a)!=="object")return this;var l=Object.keys(a||{}).map(function(u){if(u in s.template.prop)return function(){this.prop[u]=a[u]};switch(u){case"margin":return this.setMargin.bind(this,a.margin);case"jsPDF":return function(){return this.opt.jsPDF=a.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,a.pageSize);default:return function(){this.opt[u]=a[u]}}},this);return this.then(function(){return this.thenList(l)})},s.prototype.get=function(a,l){return this.then(function(){var u=a in s.template.prop?this.prop[a]:this.opt[a];return l?l(u):u})},s.prototype.setMargin=function(a){return this.then(function(){switch(n(a)){case"number":a=[a,a,a,a];case"array":if(a.length===2&&(a=[a[0],a[1],a[0],a[1]]),a.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=a}).then(this.setPageSize)},s.prototype.setPageSize=function(a){function l(u,h){return Math.floor(u*h/72*96)}return this.then(function(){(a=a||et.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(a.inner={width:a.width-this.opt.margin[1]-this.opt.margin[3],height:a.height-this.opt.margin[0]-this.opt.margin[2]},a.inner.px={width:l(a.inner.width,a.k),height:l(a.inner.height,a.k)},a.inner.ratio=a.inner.height/a.inner.width),this.prop.pageSize=a})},s.prototype.setProgress=function(a,l,u,h){return a!=null&&(this.progress.val=a),l!=null&&(this.progress.state=l),u!=null&&(this.progress.n=u),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(a,l,u,h){return this.setProgress(a?this.progress.val+a:null,l||null,u?this.progress.n+u:null,h?this.progress.stack.concat(h):null)},s.prototype.then=function(a,l){var u=this;return this.thenCore(a,l,function(h,x){return u.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(m){return u.updateProgress(null,h),m}).then(h,x).then(function(m){return u.updateProgress(1),m})})},s.prototype.thenCore=function(a,l,u){u=u||Promise.prototype.then,a&&(a=a.bind(this)),l&&(l=l.bind(this));var h=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:s.convert(Object.assign({},this),Promise.prototype),x=u.call(h,a,l);return s.convert(x,this.__proto__)},s.prototype.thenExternal=function(a,l){return Promise.prototype.then.call(this,a,l)},s.prototype.thenList=function(a){var l=this;return a.forEach(function(u){l=l.thenCore(u)}),l},s.prototype.catch=function(a){a&&(a=a.bind(this));var l=Promise.prototype.catch.call(this,a);return s.convert(l,this)},s.prototype.catchExternal=function(a){return Promise.prototype.catch.call(this,a)},s.prototype.error=function(a){return this.then(function(){throw new Error(a)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,et.getPageSize=function(a,l,u){if(Nt(a)==="object"){var h=a;a=h.orientation,l=h.unit||l,u=h.format||u}l=l||"mm",u=u||"a4",a=(""+(a||"P")).toLowerCase();var x,m=(""+u).toLowerCase(),y={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(l){case"pt":x=1;break;case"mm":x=72/25.4;break;case"cm":x=72/2.54;break;case"in":x=72;break;case"px":x=.75;break;case"pc":case"em":x=12;break;case"ex":x=6;break;default:throw"Invalid unit: "+l}var p,N=0,k=0;if(y.hasOwnProperty(m))N=y[m][1]/x,k=y[m][0]/x;else try{N=u[1],k=u[0]}catch{throw new Error("Invalid format: "+u)}if(a==="p"||a==="portrait")a="p",k>N&&(p=k,k=N,N=p);else{if(a!=="l"&&a!=="landscape")throw"Invalid orientation: "+a;a="l",N>k&&(p=k,k=N,N=p)}return{width:k,height:N,unit:l,k:x,orientation:a}},e.html=function(a,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map($f):null;var u=new s(l);return l.worker?u:u.from(a).doCallback()}}(et.API),et.API.addJS=function(e){return bm=e,this.internal.events.subscribe("postPutResources",function(){Fu=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Fu+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),vm=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+bm+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Fu!==void 0&&vm!==void 0&&this.internal.out("/Names <</JavaScript "+Fu+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=r.outline.render().split(/\r\n/),s=0;s<i.length;s++){var a=i[s],l=n.exec(a);if(l!=null){var u=l[1];r.internal.newObjectDeferredBegin(u,!1)}r.internal.write(a)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,x=[];for(s=0;s<h;s++){var m=r.internal.newObject();x.push(m);var y=r.internal.getPageInfo(s+1);r.internal.write("<< /D["+y.objId+" 0 R /XYZ null null null]>> endobj")}var p=r.internal.newObject();for(r.internal.write("<< /Names [ "),s=0;s<x.length;s++)r.internal.write("(page_"+(s+1)+")"+x[s]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+p+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,i,s){var a={title:i,options:s,children:[]};return n==null&&(n=this.root),n.children.push(a),a},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<n.children.length;s++){var a=n.children[s];this.objStart(a),this.line("/Title "+this.makeString(a.title)),this.line("/Parent "+this.makeRef(n)),s>0&&this.line("/Prev "+this.makeRef(n.children[s-1])),s<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[s+1])),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1])));var l=this.count=this.count_r({count:0},a);if(l>0&&this.line("/Count "+l),a.options&&a.options.pageNumber){var u=r.internal.getPageInfo(a.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var h=0;h<n.children.length;h++)this.renderItems(n.children[h])},r.outline.line=function(n){this.ctx.val+=n+`\r
`},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r
`+n.id+` 0 obj\r
<<\r
`},r.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},r.outline.count_r=function(n,i){for(var s=0;s<i.children.length;s++)n.count++,this.count_r(n,i.children[s]);return n.count}}])}(et.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,n,i,s,a,l){var u,h=this.decode.DCT_DECODE,x=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=a||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,(u=function(m){for(var y,p=256*m.charCodeAt(4)+m.charCodeAt(5),N=m.length,k={width:0,height:0,numcomponents:1},M=4;M<N;M+=2){if(M+=p,t.indexOf(m.charCodeAt(M+1))!==-1){y=256*m.charCodeAt(M+5)+m.charCodeAt(M+6),k={width:256*m.charCodeAt(M+7)+m.charCodeAt(M+8),height:y,numcomponents:m.charCodeAt(M+9)};break}p=256*m.charCodeAt(M+2)+m.charCodeAt(M+3)}return k}(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r)).numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}x={data:r,width:u.width,height:u.height,colorSpace:l,bitsPerComponent:8,filter:h,index:n,alias:i}}return x}}(et.API);var to,Tu,wm,Nm,km,nN=function(){var e,t,r;function n(s){var a,l,u,h,x,m,y,p,N,k,M,b,w,L;for(this.data=s,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},m=null;;){switch(a=this.readUInt32(),N=(function(){var $,J;for(J=[],$=0;$<4;++$)J.push(String.fromCharCode(this.data[this.pos++]));return J}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(a);break;case"fcTL":m&&this.animation.frames.push(m),this.pos+=4,m={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},x=this.readUInt16(),h=this.readUInt16()||100,m.delay=1e3*x/h,m.disposeOp=this.data[this.pos++],m.blendOp=this.data[this.pos++],m.data=[];break;case"IDAT":case"fdAT":for(N==="fdAT"&&(this.pos+=4,a-=4),s=(m!=null?m.data:void 0)||this.imgData,b=0;0<=a?b<a:b>a;0<=a?++b:--b)s.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(u=this.palette.length/3,this.transparency.indexed=this.read(a),this.transparency.indexed.length>u)throw new Error("More transparent colors than palette size");if((k=u-this.transparency.indexed.length)>0)for(w=0;0<=k?w<k:w>k;0<=k?++w:--w)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(a)[0];break;case 2:this.transparency.rgb=this.read(a)}break;case"tEXt":y=(M=this.read(a)).indexOf(0),p=String.fromCharCode.apply(String,M.slice(0,y)),this.text[p]=String.fromCharCode.apply(String,M.slice(y+1));break;case"IEND":return m&&this.animation.frames.push(m),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(L=this.colorType)===4||L===6,l=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*l,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=a}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(s){var a,l;for(l=[],a=0;0<=s?a<s:a>s;0<=s?++a:--a)l.push(this.data[this.pos++]);return l},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(s){var a=this.pixelBitlength/8,l=new Uint8Array(this.width*this.height*a),u=0,h=this;if(s==null&&(s=this.imgData),s.length===0)return new Uint8Array(0);function x(m,y,p,N){var k,M,b,w,L,$,J,le,D,R,Z,G,P,I,Y,F,de,ie,he,W,te,se=Math.ceil((h.width-m)/p),ye=Math.ceil((h.height-y)/N),j=h.width==se&&h.height==ye;for(I=a*se,G=j?l:new Uint8Array(I*ye),$=s.length,P=0,M=0;P<ye&&u<$;){switch(s[u++]){case 0:for(w=de=0;de<I;w=de+=1)G[M++]=s[u++];break;case 1:for(w=ie=0;ie<I;w=ie+=1)k=s[u++],L=w<a?0:G[M-a],G[M++]=(k+L)%256;break;case 2:for(w=he=0;he<I;w=he+=1)k=s[u++],b=(w-w%a)/a,Y=P&&G[(P-1)*I+b*a+w%a],G[M++]=(Y+k)%256;break;case 3:for(w=W=0;W<I;w=W+=1)k=s[u++],b=(w-w%a)/a,L=w<a?0:G[M-a],Y=P&&G[(P-1)*I+b*a+w%a],G[M++]=(k+Math.floor((L+Y)/2))%256;break;case 4:for(w=te=0;te<I;w=te+=1)k=s[u++],b=(w-w%a)/a,L=w<a?0:G[M-a],P===0?Y=F=0:(Y=G[(P-1)*I+b*a+w%a],F=b&&G[(P-1)*I+(b-1)*a+w%a]),J=L+Y-F,le=Math.abs(J-L),R=Math.abs(J-Y),Z=Math.abs(J-F),D=le<=R&&le<=Z?L:R<=Z?Y:F,G[M++]=(k+D)%256;break;default:throw new Error("Invalid filter algorithm: "+s[u-1])}if(!j){var T=((y+P*N)*h.width+m)*a,B=P*I;for(w=0;w<se;w+=1){for(var K=0;K<a;K+=1)l[T++]=G[B++];T+=(p-1)*a}}P++}}return s=O6(s),h.interlaceMethod==1?(x(0,0,8,8),x(4,0,8,8),x(0,4,4,8),x(2,0,4,4),x(0,2,2,4),x(1,0,2,2),x(0,1,1,2)):x(0,0,1,1),l},n.prototype.decodePalette=function(){var s,a,l,u,h,x,m,y,p;for(l=this.palette,x=this.transparency.indexed||[],h=new Uint8Array((x.length||0)+l.length),u=0,s=0,a=m=0,y=l.length;m<y;a=m+=3)h[u++]=l[a],h[u++]=l[a+1],h[u++]=l[a+2],h[u++]=(p=x[s++])!=null?p:255;return h},n.prototype.copyToImageData=function(s,a){var l,u,h,x,m,y,p,N,k,M,b;if(u=this.colors,k=null,l=this.hasAlphaChannel,this.palette.length&&(k=(b=this._decodedPalette)!=null?b:this._decodedPalette=this.decodePalette(),u=4,l=!0),N=(h=s.data||s).length,m=k||a,x=y=0,u===1)for(;x<N;)p=k?4*a[x/4]:y,M=m[p++],h[x++]=M,h[x++]=M,h[x++]=M,h[x++]=l?m[p++]:255,y=p;else for(;x<N;)p=k?4*a[x/4]:y,h[x++]=m[p++],h[x++]=m[p++],h[x++]=m[p++],h[x++]=l?m[p++]:255,y=p},n.prototype.decode=function(){var s;return s=new Uint8Array(this.width*this.height*4),this.copyToImageData(s,this.decodePixels()),s};var i=function(){if(Object.prototype.toString.call(tt)==="[object Window]"){try{t=tt.document.createElement("canvas"),r=t.getContext("2d")}catch{return!1}return!0}return!1};return i(),e=function(s){var a;if(i()===!0)return r.width=s.width,r.height=s.height,r.clearRect(0,0,s.width,s.height),r.putImageData(s,0,0),(a=new Image).src=t.toDataURL(),a;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(s){var a,l,u,h,x,m,y,p;if(this.animation){for(p=[],l=x=0,m=(y=this.animation.frames).length;x<m;l=++x)a=y[l],u=s.createImageData(a.width,a.height),h=this.decodePixels(new Uint8Array(a.data)),this.copyToImageData(u,h),a.imageData=u,p.push(a.image=e(u));return p}},n.prototype.renderFrame=function(s,a){var l,u,h;return l=(u=this.animation.frames)[a],h=u[a-1],a===0&&s.clearRect(0,0,this.width,this.height),(h!=null?h.disposeOp:void 0)===1?s.clearRect(h.xOffset,h.yOffset,h.width,h.height):(h!=null?h.disposeOp:void 0)===2&&s.putImageData(h.imageData,h.xOffset,h.yOffset),l.blendOp===0&&s.clearRect(l.xOffset,l.yOffset,l.width,l.height),s.drawImage(l.image,l.xOffset,l.yOffset)},n.prototype.animate=function(s){var a,l,u,h,x,m,y=this;return l=0,m=this.animation,h=m.numFrames,u=m.frames,x=m.numPlays,(a=function(){var p,N;if(p=l++%h,N=u[p],y.renderFrame(s,p),h>1&&l/h<x)return y.animation._timeout=setTimeout(a,N.delay)})()},n.prototype.stopAnimation=function(){var s;return clearTimeout((s=this.animation)!=null?s._timeout:void 0)},n.prototype.render=function(s){var a,l;return s._png&&s._png.stopAnimation(),s._png=this,s.width=this.width,s.height=this.height,a=s.getContext("2d"),this.animation?(this.decodeFrames(a),this.animate(a)):(l=a.createImageData(this.width,this.height),this.copyToImageData(l,this.decodePixels()),a.putImageData(l,0,0))},n}();/**
* @license
*
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*//**
* @license
* (c) Dean McNamee <dean@gmail.com>, 2013.
*
* https://github.com/deanm/omggif
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
* including animation and compression. It does not rely on any specific
* underlying system, so should run in the browser, Node, or Plask.
*/function iN(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var r=e[t++]|e[t++]<<8,n=e[t++]|e[t++]<<8,i=e[t++],s=i>>7,a=1<<(7&i)+1;e[t++],e[t++];var l=null,u=null;s&&(l=t,u=a,t+=3*a);var h=!0,x=[],m=0,y=null,p=0,N=null;for(this.width=r,this.height=n;h&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,N=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((P=e[t++])>=0))throw Error("Invalid block size");if(P===0)break;t+=P}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var k=e[t++];m=e[t++]|e[t++]<<8,y=e[t++],!(1&k)&&(y=null),p=k>>2&7,t++;break;case 254:for(;;){if(!((P=e[t++])>=0))throw Error("Invalid block size");if(P===0)break;t+=P}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var M=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,w=e[t++]|e[t++]<<8,L=e[t++]|e[t++]<<8,$=e[t++],J=$>>6&1,le=1<<(7&$)+1,D=l,R=u,Z=!1;$>>7&&(Z=!0,D=t,R=le,t+=3*le);var G=t;for(t++;;){var P;if(!((P=e[t++])>=0))throw Error("Invalid block size");if(P===0)break;t+=P}x.push({x:M,y:b,width:w,height:L,has_local_palette:Z,palette_offset:D,palette_size:R,data_offset:G,data_length:t-G,transparent_index:y,interlaced:!!J,delay:m,disposal:p});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return x.length},this.loopCount=function(){return N},this.frameInfo=function(I){if(I<0||I>=x.length)throw new Error("Frame index out of range.");return x[I]},this.decodeAndBlitFrameBGRA=function(I,Y){var F=this.frameInfo(I),de=F.width*F.height,ie=new Uint8Array(de);jm(e,F.data_offset,ie,de);var he=F.palette_offset,W=F.transparent_index;W===null&&(W=256);var te=F.width,se=r-te,ye=te,j=4*(F.y*r+F.x),T=4*((F.y+F.height)*r+F.x),B=j,K=4*se;F.interlaced===!0&&(K+=4*r*7);for(var ee=8,z=0,X=ie.length;z<X;++z){var ae=ie[z];if(ye===0&&(ye=te,(B+=K)>=T&&(K=4*se+4*r*(ee-1),B=j+(te+se)*(ee<<1),ee>>=1)),ae===W)B+=4;else{var ke=e[he+3*ae],me=e[he+3*ae+1],we=e[he+3*ae+2];Y[B++]=we,Y[B++]=me,Y[B++]=ke,Y[B++]=255}--ye}},this.decodeAndBlitFrameRGBA=function(I,Y){var F=this.frameInfo(I),de=F.width*F.height,ie=new Uint8Array(de);jm(e,F.data_offset,ie,de);var he=F.palette_offset,W=F.transparent_index;W===null&&(W=256);var te=F.width,se=r-te,ye=te,j=4*(F.y*r+F.x),T=4*((F.y+F.height)*r+F.x),B=j,K=4*se;F.interlaced===!0&&(K+=4*r*7);for(var ee=8,z=0,X=ie.length;z<X;++z){var ae=ie[z];if(ye===0&&(ye=te,(B+=K)>=T&&(K=4*se+4*r*(ee-1),B=j+(te+se)*(ee<<1),ee>>=1)),ae===W)B+=4;else{var ke=e[he+3*ae],me=e[he+3*ae+1],we=e[he+3*ae+2];Y[B++]=ke,Y[B++]=me,Y[B++]=we,Y[B++]=255}--ye}}}function jm(e,t,r,n){for(var i=e[t++],s=1<<i,a=s+1,l=a+1,u=i+1,h=(1<<u)-1,x=0,m=0,y=0,p=e[t++],N=new Int32Array(4096),k=null;;){for(;x<16&&p!==0;)m|=e[t++]<<x,x+=8,p===1?p=e[t++]:--p;if(x<u)break;var M=m&h;if(m>>=u,x-=u,M!==s){if(M===a)break;for(var b=M<l?M:k,w=0,L=b;L>s;)L=N[L]>>8,++w;var $=L;if(y+w+(b!==M?1:0)>n)return void Lt.log("Warning, gif stream longer than expected.");r[y++]=$;var J=y+=w;for(b!==M&&(r[y++]=$),L=b;w--;)L=N[L],r[--J]=255&L,L>>=8;k!==null&&l<4096&&(N[l++]=k<<8|$,l>=h+1&&u<12&&(++u,h=h<<1|1)),k=M}else l=a+1,h=(1<<(u=i+1))-1,k=null}return y!==n&&Lt.log("Warning, gif stream shorter than expected."),r}/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function Ph(e){var t,r,n,i,s,a=Math.floor,l=new Array(64),u=new Array(64),h=new Array(64),x=new Array(64),m=new Array(65535),y=new Array(65535),p=new Array(64),N=new Array(64),k=[],M=0,b=7,w=new Array(64),L=new Array(64),$=new Array(64),J=new Array(256),le=new Array(2048),D=[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],R=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Z=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[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],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Y=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],de=[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 ie(j,T){for(var B=0,K=0,ee=new Array,z=1;z<=16;z++){for(var X=1;X<=j[z];X++)ee[T[K]]=[],ee[T[K]][0]=B,ee[T[K]][1]=z,K++,B++;B*=2}return ee}function he(j){for(var T=j[0],B=j[1]-1;B>=0;)T&1<<B&&(M|=1<<b),B--,--b<0&&(M==255?(W(255),W(0)):W(M),b=7,M=0)}function W(j){k.push(j)}function te(j){W(j>>8&255),W(255&j)}function se(j,T,B,K,ee){for(var z,X=ee[0],ae=ee[240],ke=function(Ie,Oe){var Re,q,ue,Ce,Ae,ve,Ye,qe,He,it,Me=0;for(He=0;He<8;++He){Re=Ie[Me],q=Ie[Me+1],ue=Ie[Me+2],Ce=Ie[Me+3],Ae=Ie[Me+4],ve=Ie[Me+5],Ye=Ie[Me+6];var Gt=Re+(qe=Ie[Me+7]),dt=Re-qe,Vr=q+Ye,St=q-Ye,Tt=ue+ve,si=ue-ve,yt=Ce+Ae,qs=Ce-Ae,zt=Gt+yt,On=Gt-yt,Ai=Vr+Tt,Ut=Vr-Tt;Ie[Me]=zt+Ai,Ie[Me+4]=zt-Ai;var at=.707106781*(Ut+On);Ie[Me+2]=On+at,Ie[Me+6]=On-at;var vt=.382683433*((zt=qs+si)-(Ut=St+dt)),zs=.5411961*zt+vt,vr=1.306562965*Ut+vt,ai=.707106781*(Ai=si+St),oi=dt+ai,Ze=dt-ai;Ie[Me+5]=Ze+zs,Ie[Me+3]=Ze-zs,Ie[Me+1]=oi+vr,Ie[Me+7]=oi-vr,Me+=8}for(Me=0,He=0;He<8;++He){Re=Ie[Me],q=Ie[Me+8],ue=Ie[Me+16],Ce=Ie[Me+24],Ae=Ie[Me+32],ve=Ie[Me+40],Ye=Ie[Me+48];var Mn=Re+(qe=Ie[Me+56]),li=Re-qe,Gr=q+Ye,or=q-Ye,tr=ue+ve,on=ue-ve,ka=Ce+Ae,Li=Ce-Ae,Dn=Mn+ka,Rn=Mn-ka,Bn=Gr+tr,ci=Gr-tr;Ie[Me]=Dn+Bn,Ie[Me+32]=Dn-Bn;var wn=.707106781*(ci+Rn);Ie[Me+16]=Rn+wn,Ie[Me+48]=Rn-wn;var ui=.382683433*((Dn=Li+on)-(ci=or+li)),Us=.5411961*Dn+ui,ja=1.306562965*ci+ui,Sa=.707106781*(Bn=on+or),Aa=li+Sa,La=li-Sa;Ie[Me+40]=La+Us,Ie[Me+24]=La-Us,Ie[Me+8]=Aa+ja,Ie[Me+56]=Aa-ja,Me++}for(He=0;He<64;++He)it=Ie[He]*Oe[He],p[He]=it>0?it+.5|0:it-.5|0;return p}(j,T),me=0;me<64;++me)N[D[me]]=ke[me];var we=N[0]-B;B=N[0],we==0?he(K[0]):(he(K[y[z=32767+we]]),he(m[z]));for(var Pe=63;Pe>0&&N[Pe]==0;)Pe--;if(Pe==0)return he(X),B;for(var We,xe=1;xe<=Pe;){for(var V=xe;N[xe]==0&&xe<=Pe;)++xe;var nt=xe-V;if(nt>=16){We=nt>>4;for(var Ge=1;Ge<=We;++Ge)he(ae);nt&=15}z=32767+N[xe],he(ee[(nt<<4)+y[z]]),he(m[z]),xe++}return Pe!=63&&he(X),B}function ye(j){j=Math.min(Math.max(j,1),100),s!=j&&(function(T){for(var B=[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],K=0;K<64;K++){var ee=a((B[K]*T+50)/100);ee=Math.min(Math.max(ee,1),255),l[D[K]]=ee}for(var z=[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],X=0;X<64;X++){var ae=a((z[X]*T+50)/100);ae=Math.min(Math.max(ae,1),255),u[D[X]]=ae}for(var ke=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],me=0,we=0;we<8;we++)for(var Pe=0;Pe<8;Pe++)h[me]=1/(l[D[me]]*ke[we]*ke[Pe]*8),x[me]=1/(u[D[me]]*ke[we]*ke[Pe]*8),me++}(j<50?Math.floor(5e3/j):Math.floor(200-2*j)),s=j)}this.encode=function(j,T){T&&ye(T),k=new Array,M=0,b=7,te(65496),te(65504),te(16),W(74),W(70),W(73),W(70),W(0),W(1),W(1),W(0),te(1),te(1),W(0),W(0),function(){te(65499),te(132),W(0);for(var q=0;q<64;q++)W(l[q]);W(1);for(var ue=0;ue<64;ue++)W(u[ue])}(),function(q,ue){te(65472),te(17),W(8),te(ue),te(q),W(3),W(1),W(17),W(0),W(2),W(17),W(1),W(3),W(17),W(1)}(j.width,j.height),function(){te(65476),te(418),W(0);for(var q=0;q<16;q++)W(R[q+1]);for(var ue=0;ue<=11;ue++)W(Z[ue]);W(16);for(var Ce=0;Ce<16;Ce++)W(G[Ce+1]);for(var Ae=0;Ae<=161;Ae++)W(P[Ae]);W(1);for(var ve=0;ve<16;ve++)W(I[ve+1]);for(var Ye=0;Ye<=11;Ye++)W(Y[Ye]);W(17);for(var qe=0;qe<16;qe++)W(F[qe+1]);for(var He=0;He<=161;He++)W(de[He])}(),te(65498),te(12),W(3),W(1),W(0),W(2),W(17),W(3),W(17),W(0),W(63),W(0);var B=0,K=0,ee=0;M=0,b=7,this.encode.displayName="_encode_";for(var z,X,ae,ke,me,we,Pe,We,xe,V=j.data,nt=j.width,Ge=j.height,Ie=4*nt,Oe=0;Oe<Ge;){for(z=0;z<Ie;){for(me=Ie*Oe+z,Pe=-1,We=0,xe=0;xe<64;xe++)we=me+(We=xe>>3)*Ie+(Pe=4*(7&xe)),Oe+We>=Ge&&(we-=Ie*(Oe+1+We-Ge)),z+Pe>=Ie&&(we-=z+Pe-Ie+4),X=V[we++],ae=V[we++],ke=V[we++],w[xe]=(le[X]+le[ae+256>>0]+le[ke+512>>0]>>16)-128,L[xe]=(le[X+768>>0]+le[ae+1024>>0]+le[ke+1280>>0]>>16)-128,$[xe]=(le[X+1280>>0]+le[ae+1536>>0]+le[ke+1792>>0]>>16)-128;B=se(w,h,B,t,n),K=se(L,x,K,r,i),ee=se($,x,ee,r,i),z+=32}Oe+=8}if(b>=0){var Re=[];Re[1]=b+1,Re[0]=(1<<b+1)-1,he(Re)}return te(65497),new Uint8Array(k)},e=e||50,function(){for(var j=String.fromCharCode,T=0;T<256;T++)J[T]=j(T)}(),t=ie(R,Z),r=ie(I,Y),n=ie(G,P),i=ie(F,de),function(){for(var j=1,T=2,B=1;B<=15;B++){for(var K=j;K<T;K++)y[32767+K]=B,m[32767+K]=[],m[32767+K][1]=B,m[32767+K][0]=K;for(var ee=-(T-1);ee<=-j;ee++)y[32767+ee]=B,m[32767+ee]=[],m[32767+ee][1]=B,m[32767+ee][0]=T-1+ee;j<<=1,T<<=1}}(),function(){for(var j=0;j<256;j++)le[j]=19595*j,le[j+256>>0]=38470*j,le[j+512>>0]=7471*j+32768,le[j+768>>0]=-11059*j,le[j+1024>>0]=-21709*j,le[j+1280>>0]=32768*j+8421375,le[j+1536>>0]=-27439*j,le[j+1792>>0]=-5329*j}(),ye(e)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function Gn(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Sm(e){function t(R){if(!R)throw Error("assert :P")}function r(R,Z,G){for(var P=0;4>P;P++)if(R[Z+P]!=G.charCodeAt(P))return!0;return!1}function n(R,Z,G,P,I){for(var Y=0;Y<I;Y++)R[Z+Y]=G[P+Y]}function i(R,Z,G,P){for(var I=0;I<P;I++)R[Z+I]=G}function s(R){return new Int32Array(R)}function a(R,Z){for(var G=[],P=0;P<R;P++)G.push(new Z);return G}function l(R,Z){var G=[];return function P(I,Y,F){for(var de=F[Y],ie=0;ie<de&&(I.push(F.length>Y+1?[]:new Z),!(F.length<Y+1));ie++)P(I[ie],Y+1,F)}(G,0,R),G}var u=function(){var R=this;function Z(c,d){for(var g=1<<d-1>>>0;c&g;)g>>>=1;return g?(c&g-1)+g:c}function G(c,d,g,v,S){t(!(v%g));do c[d+(v-=g)]=S;while(0<v)}function P(c,d,g,v,S){if(t(2328>=S),512>=S)var C=s(512);else if((C=s(S))==null)return 0;return function(_,E,O,U,re,pe){var ge,ce,Le=E,be=1<<O,ne=s(16),oe=s(16);for(t(re!=0),t(U!=null),t(_!=null),t(0<O),ce=0;ce<re;++ce){if(15<U[ce])return 0;++ne[U[ce]]}if(ne[0]==re)return 0;for(oe[1]=0,ge=1;15>ge;++ge){if(ne[ge]>1<<ge)return 0;oe[ge+1]=oe[ge]+ne[ge]}for(ce=0;ce<re;++ce)ge=U[ce],0<U[ce]&&(pe[oe[ge]++]=ce);if(oe[15]==1)return(U=new I).g=0,U.value=pe[0],G(_,Le,1,be,U),be;var je,_e=-1,Se=be-1,Ue=0,De=1,Qe=1,Be=1<<O;for(ce=0,ge=1,re=2;ge<=O;++ge,re<<=1){if(De+=Qe<<=1,0>(Qe-=ne[ge]))return 0;for(;0<ne[ge];--ne[ge])(U=new I).g=ge,U.value=pe[ce++],G(_,Le+Ue,re,Be,U),Ue=Z(Ue,ge)}for(ge=O+1,re=2;15>=ge;++ge,re<<=1){if(De+=Qe<<=1,0>(Qe-=ne[ge]))return 0;for(;0<ne[ge];--ne[ge]){if(U=new I,(Ue&Se)!=_e){for(Le+=Be,je=1<<(_e=ge)-O;15>_e&&!(0>=(je-=ne[_e]));)++_e,je<<=1;be+=Be=1<<(je=_e-O),_[E+(_e=Ue&Se)].g=je+O,_[E+_e].value=Le-E-_e}U.g=ge-O,U.value=pe[ce++],G(_,Le+(Ue>>O),re,Be,U),Ue=Z(Ue,ge)}}return De!=2*oe[15]-1?0:be}(c,d,g,v,S,C)}function I(){this.value=this.g=0}function Y(){this.value=this.g=0}function F(){this.G=a(5,I),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(br,Y)}function de(c,d,g,v){t(c!=null),t(d!=null),t(2147483648>v),c.Ca=254,c.I=0,c.b=-8,c.Ka=0,c.oa=d,c.pa=g,c.Jd=d,c.Yc=g+v,c.Zc=4<=v?g+v-4+1:g,z(c)}function ie(c,d){for(var g=0;0<d--;)g|=ae(c,128)<<d;return g}function he(c,d){var g=ie(c,d);return X(c)?-g:g}function W(c,d,g,v){var S,C=0;for(t(c!=null),t(d!=null),t(4294967288>v),c.Sb=v,c.Ra=0,c.u=0,c.h=0,4<v&&(v=4),S=0;S<v;++S)C+=d[g+S]<<8*S;c.Ra=C,c.bb=v,c.oa=d,c.pa=g}function te(c){for(;8<=c.u&&c.bb<c.Sb;)c.Ra>>>=8,c.Ra+=c.oa[c.pa+c.bb]<<Ua-8>>>0,++c.bb,c.u-=8;B(c)&&(c.h=1,c.u=0)}function se(c,d){if(t(0<=d),!c.h&&d<=za){var g=T(c)&qa[d];return c.u+=d,te(c),g}return c.h=1,c.u=0}function ye(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function j(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function T(c){return c.Ra>>>(c.u&Ua-1)>>>0}function B(c){return t(c.bb<=c.Sb),c.h||c.bb==c.Sb&&c.u>Ua}function K(c,d){c.u=d,c.h=B(c)}function ee(c){c.u>=ll&&(t(c.u>=ll),te(c))}function z(c){t(c!=null&&c.oa!=null),c.pa<c.Zc?(c.I=(c.oa[c.pa++]|c.I<<8)>>>0,c.b+=8):(t(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 X(c){return ie(c,1)}function ae(c,d){var g=c.Ca;0>c.b&&z(c);var v=c.b,S=g*d>>>8,C=(c.I>>>v>S)+0;for(C?(g-=S,c.I-=S+1<<v>>>0):g=S+1,v=g,S=0;256<=v;)S+=8,v>>=8;return v=7^S+Kr[v],c.b-=v,c.Ca=(g<<v)-1,C}function ke(c,d,g){c[d+0]=g>>24&255,c[d+1]=g>>16&255,c[d+2]=g>>8&255,c[d+3]=g>>0&255}function me(c,d){return c[d+0]<<0|c[d+1]<<8}function we(c,d){return me(c,d)|c[d+2]<<16}function Pe(c,d){return me(c,d)|me(c,d+2)<<16}function We(c,d){var g=1<<d;return t(c!=null),t(0<d),c.X=s(g),c.X==null?0:(c.Mb=32-d,c.Xa=d,1)}function xe(c,d){t(c!=null),t(d!=null),t(c.Xa==d.Xa),n(d.X,0,c.X,0,1<<d.Xa)}function V(){this.X=[],this.Xa=this.Mb=0}function nt(c,d,g,v){t(g!=null),t(v!=null);var S=g[0],C=v[0];return S==0&&(S=(c*C+d/2)/d),C==0&&(C=(d*S+c/2)/c),0>=S||0>=C?0:(g[0]=S,v[0]=C,1)}function Ge(c,d){return c+(1<<d)-1>>>d}function Ie(c,d){return((4278255360&c)+(4278255360&d)>>>0&4278255360)+((16711935&c)+(16711935&d)>>>0&16711935)>>>0}function Oe(c,d){R[d]=function(g,v,S,C,_,E,O){var U;for(U=0;U<_;++U){var re=R[c](E[O+U-1],S,C+U);E[O+U]=Ie(g[v+U],re)}}}function Re(){this.ud=this.hd=this.jd=0}function q(c,d){return((4278124286&(c^d))>>>1)+(c&d)>>>0}function ue(c){return 0<=c&&256>c?c:0>c?0:255<c?255:void 0}function Ce(c,d){return ue(c+(c-d+.5>>1))}function Ae(c,d,g){return Math.abs(d-g)-Math.abs(c-g)}function ve(c,d,g,v,S,C,_){for(v=C[_-1],g=0;g<S;++g)C[_+g]=v=Ie(c[d+g],v)}function Ye(c,d,g,v,S){var C;for(C=0;C<g;++C){var _=c[d+C],E=_>>8&255,O=16711935&(O=(O=16711935&_)+((E<<16)+E));v[S+C]=(4278255360&_)+O>>>0}}function qe(c,d){d.jd=c>>0&255,d.hd=c>>8&255,d.ud=c>>16&255}function He(c,d,g,v,S,C){var _;for(_=0;_<v;++_){var E=d[g+_],O=E>>>8,U=E,re=255&(re=(re=E>>>16)+((c.jd<<24>>24)*(O<<24>>24)>>>5));U=255&(U=(U=U+((c.hd<<24>>24)*(O<<24>>24)>>>5))+((c.ud<<24>>24)*(re<<24>>24)>>>5)),S[C+_]=(4278255360&E)+(re<<16)+U}}function it(c,d,g,v,S){R[d]=function(C,_,E,O,U,re,pe,ge,ce){for(O=pe;O<ge;++O)for(pe=0;pe<ce;++pe)U[re++]=S(E[v(C[_++])])},R[c]=function(C,_,E,O,U,re,pe){var ge=8>>C.b,ce=C.Ea,Le=C.K[0],be=C.w;if(8>ge)for(C=(1<<C.b)-1,be=(1<<ge)-1;_<E;++_){var ne,oe=0;for(ne=0;ne<ce;++ne)ne&C||(oe=v(O[U++])),re[pe++]=S(Le[oe&be]),oe>>=ge}else R["VP8LMapColor"+g](O,U,Le,be,re,pe,_,E,ce)}}function Me(c,d,g,v,S){for(g=d+g;d<g;){var C=c[d++];v[S++]=C>>16&255,v[S++]=C>>8&255,v[S++]=C>>0&255}}function Gt(c,d,g,v,S){for(g=d+g;d<g;){var C=c[d++];v[S++]=C>>16&255,v[S++]=C>>8&255,v[S++]=C>>0&255,v[S++]=C>>24&255}}function dt(c,d,g,v,S){for(g=d+g;d<g;){var C=(_=c[d++])>>16&240|_>>12&15,_=_>>0&240|_>>28&15;v[S++]=C,v[S++]=_}}function Vr(c,d,g,v,S){for(g=d+g;d<g;){var C=(_=c[d++])>>16&248|_>>13&7,_=_>>5&224|_>>3&31;v[S++]=C,v[S++]=_}}function St(c,d,g,v,S){for(g=d+g;d<g;){var C=c[d++];v[S++]=C>>0&255,v[S++]=C>>8&255,v[S++]=C>>16&255}}function Tt(c,d,g,v,S,C){if(C==0)for(g=d+g;d<g;)ke(v,((C=c[d++])[0]>>24|C[1]>>8&65280|C[2]<<8&16711680|C[3]<<24)>>>0),S+=32;else n(v,S,c,d,g)}function si(c,d){R[d][0]=R[c+"0"],R[d][1]=R[c+"1"],R[d][2]=R[c+"2"],R[d][3]=R[c+"3"],R[d][4]=R[c+"4"],R[d][5]=R[c+"5"],R[d][6]=R[c+"6"],R[d][7]=R[c+"7"],R[d][8]=R[c+"8"],R[d][9]=R[c+"9"],R[d][10]=R[c+"10"],R[d][11]=R[c+"11"],R[d][12]=R[c+"12"],R[d][13]=R[c+"13"],R[d][14]=R[c+"0"],R[d][15]=R[c+"0"]}function yt(c){return c==E0||c==I0||c==eu||c==F0}function qs(){this.eb=[],this.size=this.A=this.fb=0}function zt(){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 On(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new qs,this.f.kb=new zt,this.sd=null}function Ai(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ut(){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 at(c){return alert("todo:WebPSamplerProcessPlane"),c.T}function vt(c,d){var g=c.T,v=d.ba.f.RGBA,S=v.eb,C=v.fb+c.ka*v.A,_=Ln[d.ba.S],E=c.y,O=c.O,U=c.f,re=c.N,pe=c.ea,ge=c.W,ce=d.cc,Le=d.dc,be=d.Mc,ne=d.Nc,oe=c.ka,je=c.ka+c.T,_e=c.U,Se=_e+1>>1;for(oe==0?_(E,O,null,null,U,re,pe,ge,U,re,pe,ge,S,C,null,null,_e):(_(d.ec,d.fc,E,O,ce,Le,be,ne,U,re,pe,ge,S,C-v.A,S,C,_e),++g);oe+2<je;oe+=2)ce=U,Le=re,be=pe,ne=ge,re+=c.Rc,ge+=c.Rc,C+=2*v.A,_(E,(O+=2*c.fa)-c.fa,E,O,ce,Le,be,ne,U,re,pe,ge,S,C-v.A,S,C,_e);return O+=c.fa,c.j+je<c.o?(n(d.ec,d.fc,E,O,_e),n(d.cc,d.dc,U,re,Se),n(d.Mc,d.Nc,pe,ge,Se),g--):1&je||_(E,O,null,null,U,re,pe,ge,U,re,pe,ge,S,C+v.A,null,null,_e),g}function zs(c,d,g){var v=c.F,S=[c.J];if(v!=null){var C=c.U,_=d.ba.S,E=_==Zc||_==eu;d=d.ba.f.RGBA;var O=[0],U=c.ka;O[0]=c.T,c.Kb&&(U==0?--O[0]:(--U,S[0]-=c.width),c.j+c.ka+c.T==c.o&&(O[0]=c.o-c.j-U));var re=d.eb;U=d.fb+U*d.A,c=_t(v,S[0],c.width,C,O,re,U+(E?0:3),d.A),t(g==O),c&&yt(_)&&Sn(re,U,E,C,O,d.A)}return 0}function vr(c){var d=c.ma,g=d.ba.S,v=11>g,S=g==Xc||g==Qc||g==Zc||g==P0||g==12||yt(g);if(d.memory=null,d.Ib=null,d.Jb=null,d.Nd=null,!al(d.Oa,c,S?11:12))return 0;if(S&&yt(g)&&Ee(),c.da)alert("todo:use_scaling");else{if(v){if(d.Ib=at,c.Kb){if(g=c.U+1>>1,d.memory=s(c.U+2*g),d.memory==null)return 0;d.ec=d.memory,d.fc=0,d.cc=d.ec,d.dc=d.fc+c.U,d.Mc=d.cc,d.Nc=d.dc+g,d.Ib=vt,Ee()}}else alert("todo:EmitYUV");S&&(d.Jb=zs,v&&fe())}if(v&&!f1){for(c=0;256>c;++c)Ty[c]=89858*(c-128)+ru>>tu,Dy[c]=-22014*(c-128)+ru,My[c]=-45773*(c-128),Oy[c]=113618*(c-128)+ru>>tu;for(c=gl;c<M0;++c)d=76283*(c-16)+ru>>tu,Ry[c-gl]=ln(d,255),By[c-gl]=ln(d+8>>4,15);f1=1}return 1}function ai(c){var d=c.ma,g=c.U,v=c.T;return t(!(1&c.ka)),0>=g||0>=v?0:(g=d.Ib(c,d),d.Jb!=null&&d.Jb(c,d,g),d.Dc+=g,1)}function oi(c){c.ma.memory=null}function Ze(c,d,g,v){return se(c,8)!=47?0:(d[0]=se(c,14)+1,g[0]=se(c,14)+1,v[0]=se(c,1),se(c,3)!=0?0:!c.h)}function Mn(c,d){if(4>c)return c+1;var g=c-2>>1;return(2+(1&c)<<g)+se(d,g)+1}function li(c,d){return 120<d?d-120:1<=(g=((g=by[d-1])>>4)*c+(8-(15&g)))?g:1;var g}function Gr(c,d,g){var v=T(g),S=c[d+=255&v].g-8;return 0<S&&(K(g,g.u+8),v=T(g),d+=c[d].value,d+=v&(1<<S)-1),K(g,g.u+c[d].g),c[d].value}function or(c,d,g){return g.g+=c.g,g.value+=c.value<<d>>>0,t(8>=g.g),c.g}function tr(c,d,g){var v=c.xc;return t((d=v==0?0:c.vc[c.md*(g>>v)+(d>>v)])<c.Wb),c.Ya[d]}function on(c,d,g,v){var S=c.ab,C=c.c*d,_=c.C;d=_+d;var E=g,O=v;for(v=c.Ta,g=c.Ua;0<S--;){var U=c.gc[S],re=_,pe=d,ge=E,ce=O,Le=(O=v,E=g,U.Ea);switch(t(re<pe),t(pe<=U.nc),U.hc){case 2:Hc(ge,ce,(pe-re)*Le,O,E);break;case 0:var be=re,ne=pe,oe=O,je=E,_e=(Be=U).Ea;be==0&&(C0(ge,ce,null,null,1,oe,je),ve(ge,ce+1,0,0,_e-1,oe,je+1),ce+=_e,je+=_e,++be);for(var Se=1<<Be.b,Ue=Se-1,De=Ge(_e,Be.b),Qe=Be.K,Be=Be.w+(be>>Be.b)*De;be<ne;){var xt=Qe,bt=Be,gt=1;for(cl(ge,ce,oe,je-_e,1,oe,je);gt<_e;){var ft=(gt&~Ue)+Se;ft>_e&&(ft=_e),(0,es[xt[bt++]>>8&15])(ge,ce+ +gt,oe,je+gt-_e,ft-gt,oe,je+gt),gt=ft}ce+=_e,je+=_e,++be&Ue||(Be+=De)}pe!=U.nc&&n(O,E-Le,O,E+(pe-re-1)*Le,Le);break;case 1:for(Le=ge,ne=ce,_e=(ge=U.Ea)-(je=ge&~(oe=(ce=1<<U.b)-1)),be=Ge(ge,U.b),Se=U.K,U=U.w+(re>>U.b)*be;re<pe;){for(Ue=Se,De=U,Qe=new Re,Be=ne+je,xt=ne+ge;ne<Be;)qe(Ue[De++],Qe),Gs(Qe,Le,ne,ce,O,E),ne+=ce,E+=ce;ne<xt&&(qe(Ue[De++],Qe),Gs(Qe,Le,ne,_e,O,E),ne+=_e,E+=_e),++re&oe||(U+=be)}break;case 3:if(ge==O&&ce==E&&0<U.b){for(ne=O,ge=Le=E+(pe-re)*Le-(je=(pe-re)*Ge(U.Ea,U.b)),ce=O,oe=E,be=[],je=(_e=je)-1;0<=je;--je)be[je]=ce[oe+je];for(je=_e-1;0<=je;--je)ne[ge+je]=be[je];Nn(U,re,pe,O,Le,O,E)}else Nn(U,re,pe,ge,ce,O,E)}E=v,O=g}O!=g&&n(v,g,E,O,C)}function ka(c,d){var g=c.V,v=c.Ba+c.c*c.C,S=d-c.C;if(t(d<=c.l.o),t(16>=S),0<S){var C=c.l,_=c.Ta,E=c.Ua,O=C.width;if(on(c,S,g,v),S=E=[E],t((g=c.C)<(v=d)),t(C.v<C.va),v>C.o&&(v=C.o),g<C.j){var U=C.j-g;g=C.j,S[0]+=U*O}if(g>=v?g=0:(S[0]+=4*C.v,C.ka=g-C.j,C.U=C.va-C.v,C.T=v-g,g=1),g){if(E=E[0],11>(g=c.ca).S){var re=g.f.RGBA,pe=(v=g.S,S=C.U,C=C.T,U=re.eb,re.A),ge=C;for(re=re.fb+c.Ma*re.A;0<ge--;){var ce=_,Le=E,be=S,ne=U,oe=re;switch(v){case Jc:Jr(ce,Le,be,ne,oe);break;case Xc:Rr(ce,Le,be,ne,oe);break;case E0:Rr(ce,Le,be,ne,oe),Sn(ne,oe,0,be,1,0);break;case n1:Ei(ce,Le,be,ne,oe);break;case Qc:Tt(ce,Le,be,ne,oe,1);break;case I0:Tt(ce,Le,be,ne,oe,1),Sn(ne,oe,0,be,1,0);break;case Zc:Tt(ce,Le,be,ne,oe,0);break;case eu:Tt(ce,Le,be,ne,oe,0),Sn(ne,oe,1,be,1,0);break;case P0:ts(ce,Le,be,ne,oe);break;case F0:ts(ce,Le,be,ne,oe),Ct(ne,oe,be,1,0);break;case i1:Pi(ce,Le,be,ne,oe);break;default:t(0)}E+=O,re+=pe}c.Ma+=C}else alert("todo:EmitRescaledRowsYUVA");t(c.Ma<=g.height)}}c.C=d,t(c.C<=c.i)}function Li(c){var d;if(0<c.ua)return 0;for(d=0;d<c.Wb;++d){var g=c.Ya[d].G,v=c.Ya[d].H;if(0<g[1][v[1]+0].g||0<g[2][v[2]+0].g||0<g[3][v[3]+0].g)return 0}return 1}function Dn(c,d,g,v,S,C){if(c.Z!=0){var _=c.qd,E=c.rd;for(t(ss[c.Z]!=null);d<g;++d)ss[c.Z](_,E,v,S,v,S,C),_=v,E=S,S+=C;c.qd=_,c.rd=E}}function Rn(c,d){var g=c.l.ma,v=g.Z==0||g.Z==1?c.l.j:c.C;if(v=c.C<v?v:c.C,t(d<=c.l.o),d>v){var S=c.l.width,C=g.ca,_=g.tb+S*v,E=c.V,O=c.Ba+c.c*v,U=c.gc;t(c.ab==1),t(U[0].hc==3),Wc(U[0],v,d,E,O,C,_),Dn(g,v,d,C,_,S)}c.C=c.Ma=d}function Bn(c,d,g,v,S,C,_){var E=c.$/v,O=c.$%v,U=c.m,re=c.s,pe=g+c.$,ge=pe;S=g+v*S;var ce=g+v*C,Le=280+re.ua,be=c.Pb?E:16777216,ne=0<re.ua?re.Wa:null,oe=re.wc,je=pe<ce?tr(re,O,E):null;t(c.C<C),t(ce<=S);var _e=!1;e:for(;;){for(;_e||pe<ce;){var Se=0;if(E>=be){var Ue=pe-g;t((be=c).Pb),be.wd=be.m,be.xd=Ue,0<be.s.ua&&xe(be.s.Wa,be.s.vb),be=E+Ny}if(O&oe||(je=tr(re,O,E)),t(je!=null),je.Qb&&(d[pe]=je.qb,_e=!0),!_e)if(ee(U),je.jc){Se=U,Ue=d;var De=pe,Qe=je.pd[T(Se)&br-1];t(je.jc),256>Qe.g?(K(Se,Se.u+Qe.g),Ue[De]=Qe.value,Se=0):(K(Se,Se.u+Qe.g-256),t(256<=Qe.value),Se=Qe.value),Se==0&&(_e=!0)}else Se=Gr(je.G[0],je.H[0],U);if(U.h)break;if(_e||256>Se){if(!_e)if(je.nd)d[pe]=(je.qb|Se<<8)>>>0;else{if(ee(U),_e=Gr(je.G[1],je.H[1],U),ee(U),Ue=Gr(je.G[2],je.H[2],U),De=Gr(je.G[3],je.H[3],U),U.h)break;d[pe]=(De<<24|_e<<16|Se<<8|Ue)>>>0}if(_e=!1,++pe,++O>=v&&(O=0,++E,_!=null&&E<=C&&!(E%16)&&_(c,E),ne!=null))for(;ge<pe;)Se=d[ge++],ne.X[(506832829*Se&4294967295)>>>ne.Mb]=Se}else if(280>Se){if(Se=Mn(Se-256,U),Ue=Gr(je.G[4],je.H[4],U),ee(U),Ue=li(v,Ue=Mn(Ue,U)),U.h)break;if(pe-g<Ue||S-pe<Se)break e;for(De=0;De<Se;++De)d[pe+De]=d[pe+De-Ue];for(pe+=Se,O+=Se;O>=v;)O-=v,++E,_!=null&&E<=C&&!(E%16)&&_(c,E);if(t(pe<=S),O&oe&&(je=tr(re,O,E)),ne!=null)for(;ge<pe;)Se=d[ge++],ne.X[(506832829*Se&4294967295)>>>ne.Mb]=Se}else{if(!(Se<Le))break e;for(_e=Se-280,t(ne!=null);ge<pe;)Se=d[ge++],ne.X[(506832829*Se&4294967295)>>>ne.Mb]=Se;Se=pe,t(!(_e>>>(Ue=ne).Xa)),d[Se]=Ue.X[_e],_e=!0}_e||t(U.h==B(U))}if(c.Pb&&U.h&&pe<S)t(c.m.h),c.a=5,c.m=c.wd,c.$=c.xd,0<c.s.ua&&xe(c.s.vb,c.s.Wa);else{if(U.h)break e;_!=null&&_(c,E>C?C:E),c.a=0,c.$=pe-g}return 1}return c.a=3,0}function ci(c){t(c!=null),c.vc=null,c.yc=null,c.Ya=null;var d=c.Wa;d!=null&&(d.X=null),c.vb=null,t(c!=null)}function wn(){var c=new L0;return c==null?null:(c.a=0,c.xb=o1,si("Predictor","VP8LPredictors"),si("Predictor","VP8LPredictors_C"),si("PredictorAdd","VP8LPredictorsAdd"),si("PredictorAdd","VP8LPredictorsAdd_C"),Hc=Ye,Gs=He,Jr=Me,Rr=Gt,ts=dt,Pi=Vr,Ei=St,R.VP8LMapColor32b=$a,R.VP8LMapColor8b=Vc,c)}function ui(c,d,g,v,S){var C=1,_=[c],E=[d],O=v.m,U=v.s,re=null,pe=0;e:for(;;){if(g)for(;C&&se(O,1);){var ge=_,ce=E,Le=v,be=1,ne=Le.m,oe=Le.gc[Le.ab],je=se(ne,2);if(Le.Oc&1<<je)C=0;else{switch(Le.Oc|=1<<je,oe.hc=je,oe.Ea=ge[0],oe.nc=ce[0],oe.K=[null],++Le.ab,t(4>=Le.ab),je){case 0:case 1:oe.b=se(ne,3)+2,be=ui(Ge(oe.Ea,oe.b),Ge(oe.nc,oe.b),0,Le,oe.K),oe.K=oe.K[0];break;case 3:var _e,Se=se(ne,8)+1,Ue=16<Se?0:4<Se?1:2<Se?2:3;if(ge[0]=Ge(oe.Ea,Ue),oe.b=Ue,_e=be=ui(Se,1,0,Le,oe.K)){var De,Qe=Se,Be=oe,xt=1<<(8>>Be.b),bt=s(xt);if(bt==null)_e=0;else{var gt=Be.K[0],ft=Be.w;for(bt[0]=Be.K[0][0],De=1;De<1*Qe;++De)bt[De]=Ie(gt[ft+De],bt[De-1]);for(;De<4*xt;++De)bt[De]=0;Be.K[0]=null,Be.K[0]=bt,_e=1}}be=_e;break;case 2:break;default:t(0)}C=be}}if(_=_[0],E=E[0],C&&se(O,1)&&!(C=1<=(pe=se(O,4))&&11>=pe)){v.a=3;break e}var At;if(At=C)t:{var jt,ut,nr,Xr=v,ir=_,Qr=E,wt=pe,un=g,dn=Xr.m,fr=Xr.s,wr=[null],qr=1,Cn=0,pi=wy[wt];r:for(;;){if(un&&se(dn,1)){var pr=se(dn,3)+2,Oi=Ge(ir,pr),Qs=Ge(Qr,pr),Ya=Oi*Qs;if(!ui(Oi,Qs,0,Xr,wr))break r;for(wr=wr[0],fr.xc=pr,jt=0;jt<Ya;++jt){var as=wr[jt]>>8&65535;wr[jt]=as,as>=qr&&(qr=as+1)}}if(dn.h)break r;for(ut=0;5>ut;++ut){var Ht=s1[ut];!ut&&0<wt&&(Ht+=1<<wt),Cn<Ht&&(Cn=Ht)}var D0=a(qr*pi,I),m1=qr,x1=a(m1,F);if(x1==null)var iu=null;else t(65536>=m1),iu=x1;var ml=s(Cn);if(iu==null||ml==null||D0==null){Xr.a=1;break r}var su=D0;for(jt=nr=0;jt<qr;++jt){var Hn=iu[jt],Ka=Hn.G,Ja=Hn.H,y1=0,au=1,v1=0;for(ut=0;5>ut;++ut){Ht=s1[ut],Ka[ut]=su,Ja[ut]=nr,!ut&&0<wt&&(Ht+=1<<wt);i:{var ou,R0=Ht,lu=Xr,xl=ml,Uy=su,$y=nr,B0=0,os=lu.m,Hy=se(os,1);if(i(xl,0,0,R0),Hy){var Wy=se(os,1)+1,Vy=se(os,1),b1=se(os,Vy==0?1:8);xl[b1]=1,Wy==2&&(xl[b1=se(os,8)]=1);var cu=1}else{var w1=s(19),N1=se(os,4)+4;if(19<N1){lu.a=3;var uu=0;break i}for(ou=0;ou<N1;++ou)w1[vy[ou]]=se(os,3);var q0=void 0,yl=void 0,k1=lu,Gy=w1,du=R0,j1=xl,z0=0,ls=k1.m,S1=8,A1=a(128,I);n:for(;P(A1,0,7,Gy,19);){if(se(ls,1)){var Yy=2+2*se(ls,3);if((q0=2+se(ls,Yy))>du)break n}else q0=du;for(yl=0;yl<du&&q0--;){ee(ls);var L1=A1[0+(127&T(ls))];K(ls,ls.u+L1.g);var Xa=L1.value;if(16>Xa)j1[yl++]=Xa,Xa!=0&&(S1=Xa);else{var Ky=Xa==16,C1=Xa-16,Jy=xy[C1],_1=se(ls,my[C1])+Jy;if(yl+_1>du)break n;for(var Xy=Ky?S1:0;0<_1--;)j1[yl++]=Xy}}z0=1;break n}z0||(k1.a=3),cu=z0}(cu=cu&&!os.h)&&(B0=P(Uy,$y,8,xl,R0)),cu&&B0!=0?uu=B0:(lu.a=3,uu=0)}if(uu==0)break r;if(au&&yy[ut]==1&&(au=su[nr].g==0),y1+=su[nr].g,nr+=uu,3>=ut){var vl,U0=ml[0];for(vl=1;vl<Ht;++vl)ml[vl]>U0&&(U0=ml[vl]);v1+=U0}}if(Hn.nd=au,Hn.Qb=0,au&&(Hn.qb=(Ka[3][Ja[3]+0].value<<24|Ka[1][Ja[1]+0].value<<16|Ka[2][Ja[2]+0].value)>>>0,y1==0&&256>Ka[0][Ja[0]+0].value&&(Hn.Qb=1,Hn.qb+=Ka[0][Ja[0]+0].value<<8)),Hn.jc=!Hn.Qb&&6>v1,Hn.jc){var hu,Mi=Hn;for(hu=0;hu<br;++hu){var cs=hu,us=Mi.pd[cs],fu=Mi.G[0][Mi.H[0]+cs];256<=fu.value?(us.g=fu.g+256,us.value=fu.value):(us.g=0,us.value=0,cs>>=or(fu,8,us),cs>>=or(Mi.G[1][Mi.H[1]+cs],16,us),cs>>=or(Mi.G[2][Mi.H[2]+cs],0,us),or(Mi.G[3][Mi.H[3]+cs],24,us))}}}fr.vc=wr,fr.Wb=qr,fr.Ya=iu,fr.yc=D0,At=1;break t}At=0}if(!(C=At)){v.a=3;break e}if(0<pe){if(U.ua=1<<pe,!We(U.Wa,pe)){v.a=1,C=0;break e}}else U.ua=0;var $0=v,P1=_,Qy=E,H0=$0.s,W0=H0.xc;if($0.c=P1,$0.i=Qy,H0.md=Ge(P1,W0),H0.wc=W0==0?-1:(1<<W0)-1,g){v.xb=_y;break e}if((re=s(_*E))==null){v.a=1,C=0;break e}C=(C=Bn(v,re,0,_,E,E,null))&&!O.h;break e}return C?(S!=null?S[0]=re:(t(re==null),t(g)),v.$=0,g||ci(U)):ci(U),C}function Us(c,d){var g=c.c*c.i,v=g+d+16*d;return t(c.c<=d),c.V=s(v),c.V==null?(c.Ta=null,c.Ua=0,c.a=1,0):(c.Ta=c.V,c.Ua=c.Ba+g+d,1)}function ja(c,d){var g=c.C,v=d-g,S=c.V,C=c.Ba+c.c*g;for(t(d<=c.l.o);0<v;){var _=16<v?16:v,E=c.l.ma,O=c.l.width,U=O*_,re=E.ca,pe=E.tb+O*g,ge=c.Ta,ce=c.Ua;on(c,_,S,C),Jt(ge,ce,re,pe,U),Dn(E,g,g+_,re,pe,O),v-=_,S+=_*c.c,g+=_}t(g==d),c.C=c.Ma=d}function Sa(){this.ub=this.yd=this.td=this.Rb=0}function Aa(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function La(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function jc(){this.Yb=function(){var c=[];return function d(g,v,S){for(var C=S[v],_=0;_<C&&(g.push(S.length>v+1?[]:0),!(S.length<v+1));_++)d(g[_],v+1,S)}(c,0,[3,11]),c}()}function i0(){this.jb=s(3),this.Wc=l([4,8],jc),this.Xc=l([4,17],jc)}function s0(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Ca(){this.ld=this.La=this.dd=this.tc=0}function Sc(){this.Na=this.la=0}function a0(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ho(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function o0(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ca),this.Y=0,this.ya=Array(new Ho),this.aa=0,this.l=new _a}function Ac(){this.y=s(16),this.f=s(8),this.ea=s(8)}function l0(){this.cb=this.a=0,this.sc="",this.m=new ye,this.Od=new Sa,this.Kc=new Aa,this.ed=new s0,this.Qa=new La,this.Ic=this.$c=this.Aa=0,this.D=new o0,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,ye),this.ia=0,this.pb=a(4,a0),this.Pa=new i0,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ac),this.Hd=0,this.rb=Array(new Sc),this.sb=0,this.wa=Array(new Ca),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 Ho),this.L=this.aa=0,this.gd=l([4,2],Ca),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 _a(){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 c0(){var c=new l0;return c!=null&&(c.a=0,c.sc="OK",c.cb=0,c.Xb=0,pl||(pl=_c)),c}function Yt(c,d,g){return c.a==0&&(c.a=d,c.sc=g,c.cb=0),0}function Lc(c,d,g){return 3<=g&&c[d+0]==157&&c[d+1]==1&&c[d+2]==42}function Cc(c,d){if(c==null)return 0;if(c.a=0,c.sc="OK",d==null)return Yt(c,2,"null VP8Io passed to VP8GetHeaders()");var g=d.data,v=d.w,S=d.ha;if(4>S)return Yt(c,7,"Truncated header.");var C=g[v+0]|g[v+1]<<8|g[v+2]<<16,_=c.Od;if(_.Rb=!(1&C),_.td=C>>1&7,_.yd=C>>4&1,_.ub=C>>5,3<_.td)return Yt(c,3,"Incorrect keyframe parameters.");if(!_.yd)return Yt(c,4,"Frame not displayable.");v+=3,S-=3;var E=c.Kc;if(_.Rb){if(7>S)return Yt(c,7,"cannot parse picture header");if(!Lc(g,v,S))return Yt(c,3,"Bad code word");E.c=16383&(g[v+4]<<8|g[v+3]),E.Td=g[v+4]>>6,E.i=16383&(g[v+6]<<8|g[v+5]),E.Ud=g[v+6]>>6,v+=7,S-=7,c.za=E.c+15>>4,c.Ub=E.i+15>>4,d.width=E.c,d.height=E.i,d.Da=0,d.j=0,d.v=0,d.va=d.width,d.o=d.height,d.da=0,d.ib=d.width,d.hb=d.height,d.U=d.width,d.T=d.height,i((C=c.Pa).jb,0,255,C.jb.length),t((C=c.Qa)!=null),C.Cb=0,C.Bb=0,C.Fb=1,i(C.Zb,0,0,C.Zb.length),i(C.Lb,0,0,C.Lb)}if(_.ub>S)return Yt(c,7,"bad partition length");de(C=c.m,g,v,_.ub),v+=_.ub,S-=_.ub,_.Rb&&(E.Ld=X(C),E.Kd=X(C)),E=c.Qa;var O,U=c.Pa;if(t(C!=null),t(E!=null),E.Cb=X(C),E.Cb){if(E.Bb=X(C),X(C)){for(E.Fb=X(C),O=0;4>O;++O)E.Zb[O]=X(C)?he(C,7):0;for(O=0;4>O;++O)E.Lb[O]=X(C)?he(C,6):0}if(E.Bb)for(O=0;3>O;++O)U.jb[O]=X(C)?ie(C,8):255}else E.Bb=0;if(C.Ka)return Yt(c,3,"cannot parse segment header");if((E=c.ed).zd=X(C),E.Tb=ie(C,6),E.wb=ie(C,3),E.Pc=X(C),E.Pc&&X(C)){for(U=0;4>U;++U)X(C)&&(E.vd[U]=he(C,6));for(U=0;4>U;++U)X(C)&&(E.od[U]=he(C,6))}if(c.L=E.Tb==0?0:E.zd?1:2,C.Ka)return Yt(c,3,"cannot parse filter header");var re=S;if(S=O=v,v=O+re,E=re,c.Xb=(1<<ie(c.m,2))-1,re<3*(U=c.Xb))g=7;else{for(O+=3*U,E-=3*U,re=0;re<U;++re){var pe=g[S+0]|g[S+1]<<8|g[S+2]<<16;pe>E&&(pe=E),de(c.Jc[+re],g,O,pe),O+=pe,E-=pe,S+=3}de(c.Jc[+U],g,O,E),g=O<v?0:5}if(g!=0)return Yt(c,g,"cannot parse partitions");for(g=ie(O=c.m,7),S=X(O)?he(O,4):0,v=X(O)?he(O,4):0,E=X(O)?he(O,4):0,U=X(O)?he(O,4):0,O=X(O)?he(O,4):0,re=c.Qa,pe=0;4>pe;++pe){if(re.Cb){var ge=re.Zb[pe];re.Fb||(ge+=g)}else{if(0<pe){c.pb[pe]=c.pb[0];continue}ge=g}var ce=c.pb[pe];ce.Sc[0]=T0[ln(ge+S,127)],ce.Sc[1]=O0[ln(ge+0,127)],ce.Eb[0]=2*T0[ln(ge+v,127)],ce.Eb[1]=101581*O0[ln(ge+E,127)]>>16,8>ce.Eb[1]&&(ce.Eb[1]=8),ce.Qc[0]=T0[ln(ge+U,117)],ce.Qc[1]=O0[ln(ge+O,127)],ce.lc=ge+O}if(!_.Rb)return Yt(c,4,"Not a key frame.");for(X(C),_=c.Pa,g=0;4>g;++g){for(S=0;8>S;++S)for(v=0;3>v;++v)for(E=0;11>E;++E)U=ae(C,Ly[g][S][v][E])?ie(C,8):Sy[g][S][v][E],_.Wc[g][S].Yb[v][E]=U;for(S=0;17>S;++S)_.Xc[g][S]=_.Wc[g][Cy[S]]}return c.kc=X(C),c.kc&&(c.Bd=ie(C,8)),c.cb=1}function _c(c,d,g,v,S,C,_){var E=d[S].Yb[g];for(g=0;16>S;++S){if(!ae(c,E[g+0]))return S;for(;!ae(c,E[g+1]);)if(E=d[++S].Yb[0],g=0,S==16)return 16;var O=d[S+1].Yb;if(ae(c,E[g+2])){var U=c,re=0;if(ae(U,(ge=E)[(pe=g)+3]))if(ae(U,ge[pe+6])){for(E=0,pe=2*(re=ae(U,ge[pe+8]))+(ge=ae(U,ge[pe+9+re])),re=0,ge=ky[pe];ge[E];++E)re+=re+ae(U,ge[E]);re+=3+(8<<pe)}else ae(U,ge[pe+7])?(re=7+2*ae(U,165),re+=ae(U,145)):re=5+ae(U,159);else re=ae(U,ge[pe+4])?3+ae(U,ge[pe+5]):2;E=O[2]}else re=1,E=O[1];O=_+jy[S],0>(U=c).b&&z(U);var pe,ge=U.b,ce=(pe=U.Ca>>1)-(U.I>>ge)>>31;--U.b,U.Ca+=ce,U.Ca|=1,U.I-=(pe+1&ce)<<ge,C[O]=((re^ce)-ce)*v[(0<S)+0]}return 16}function Wo(c){var d=c.rb[c.sb-1];d.la=0,d.Na=0,i(c.zc,0,0,c.zc.length),c.ja=0}function u0(c,d){if(c==null)return 0;if(d==null)return Yt(c,2,"NULL VP8Io parameter in VP8Decode().");if(!c.cb&&!Cc(c,d))return 0;if(t(c.cb),d.ac==null||d.ac(d)){d.ob&&(c.L=0);var g=nu[c.L];if(c.L==2?(c.yb=0,c.zb=0):(c.yb=d.v-g>>4,c.zb=d.j-g>>4,0>c.yb&&(c.yb=0),0>c.zb&&(c.zb=0)),c.Va=d.o+15+g>>4,c.Hb=d.va+15+g>>4,c.Hb>c.za&&(c.Hb=c.za),c.Va>c.Ub&&(c.Va=c.Ub),0<c.L){var v=c.ed;for(g=0;4>g;++g){var S;if(c.Qa.Cb){var C=c.Qa.Lb[g];c.Qa.Fb||(C+=v.Tb)}else C=v.Tb;for(S=0;1>=S;++S){var _=c.gd[g][S],E=C;if(v.Pc&&(E+=v.vd[0],S&&(E+=v.od[0])),0<(E=0>E?0:63<E?63:E)){var O=E;0<v.wb&&(O=4<v.wb?O>>2:O>>1)>9-v.wb&&(O=9-v.wb),1>O&&(O=1),_.dd=O,_.tc=2*E+O,_.ld=40<=E?2:15<=E?1:0}else _.tc=0;_.La=S}}}g=0}else Yt(c,6,"Frame setup failed"),g=c.a;if(g=g==0){if(g){c.$c=0,0<c.Aa||(c.Ic=zy);e:{g=c.Ic,v=4*(O=c.za);var U=32*O,re=O+1,pe=0<c.L?O*(0<c.Aa?2:1):0,ge=(c.Aa==2?2:1)*O;if((_=v+832+(S=3*(16*g+nu[c.L])/2*U)+(C=c.Fa!=null&&0<c.Fa.length?c.Kc.c*c.Kc.i:0))!=_)g=0;else{if(_>c.Vb){if(c.Vb=0,c.Ec=s(_),c.Fc=0,c.Ec==null){g=Yt(c,1,"no memory during frame initialization.");break e}c.Vb=_}_=c.Ec,E=c.Fc,c.Ac=_,c.Bc=E,E+=v,c.Gd=a(U,Ac),c.Hd=0,c.rb=a(re+1,Sc),c.sb=1,c.wa=pe?a(pe,Ca):null,c.Y=0,c.D.Nb=0,c.D.wa=c.wa,c.D.Y=c.Y,0<c.Aa&&(c.D.Y+=O),t(!0),c.oc=_,c.pc=E,E+=832,c.ya=a(ge,Ho),c.aa=0,c.D.ya=c.ya,c.D.aa=c.aa,c.Aa==2&&(c.D.aa+=O),c.R=16*O,c.B=8*O,O=(U=nu[c.L])*c.R,U=U/2*c.B,c.sa=_,c.ta=E+O,c.qa=c.sa,c.ra=c.ta+16*g*c.R+U,c.Ha=c.qa,c.Ia=c.ra+8*g*c.B+U,c.$c=0,E+=S,c.mb=C?_:null,c.nb=C?E:null,t(E+C<=c.Fc+c.Vb),Wo(c),i(c.Ac,c.Bc,0,v),g=1}}if(g){if(d.ka=0,d.y=c.sa,d.O=c.ta,d.f=c.qa,d.N=c.ra,d.ea=c.Ha,d.Vd=c.Ia,d.fa=c.R,d.Rc=c.B,d.F=null,d.J=0,!Yc){for(g=-255;255>=g;++g)lr[255+g]=0>g?-g:g;for(g=-1020;1020>=g;++g)Fi[1020+g]=-128>g?-128:127<g?127:g;for(g=-112;112>=g;++g)fl[112+g]=-16>g?-16:15<g?15:g;for(g=-255;510>=g;++g)Ga[255+g]=0>g?0:255<g?255:g;Yc=1}Ha=f0,Ii=d0,ul=Ec,Br=h0,kn=Ic,Kt=Pc,Wa=Xo,Gc=Ws,dl=A0,Ys=Qo,Ks=S0,rs=Oa,Js=Zo,Va=zc,Xs=qc,ns=hi,hl=_i,jn=j0,$n[0]=di,$n[1]=p0,$n[2]=y0,$n[3]=v0,$n[4]=Oc,$n[5]=Fa,$n[6]=Mc,$n[7]=Yo,$n[8]=w0,$n[9]=b0,is[0]=Fc,is[1]=m0,is[2]=Ci,is[3]=Ea,is[4]=Ar,is[5]=x0,is[6]=Tc,Ti[0]=Xi,Ti[1]=g0,Ti[2]=N0,Ti[3]=Ko,Ti[4]=Hs,Ti[5]=k0,Ti[6]=Jo,g=1}else g=0}g&&(g=function(ce,Le){for(ce.M=0;ce.M<ce.Va;++ce.M){var be,ne=ce.Jc[ce.M&ce.Xb],oe=ce.m,je=ce;for(be=0;be<je.za;++be){var _e=oe,Se=je,Ue=Se.Ac,De=Se.Bc+4*be,Qe=Se.zc,Be=Se.ya[Se.aa+be];if(Se.Qa.Bb?Be.$b=ae(_e,Se.Pa.jb[0])?2+ae(_e,Se.Pa.jb[2]):ae(_e,Se.Pa.jb[1]):Be.$b=0,Se.kc&&(Be.Ad=ae(_e,Se.Bd)),Be.Za=!ae(_e,145)+0,Be.Za){var xt=Be.Ob,bt=0;for(Se=0;4>Se;++Se){var gt,ft=Qe[0+Se];for(gt=0;4>gt;++gt){ft=Ay[Ue[De+gt]][ft];for(var At=a1[ae(_e,ft[0])];0<At;)At=a1[2*At+ae(_e,ft[At])];ft=-At,Ue[De+gt]=ft}n(xt,bt,Ue,De,4),bt+=4,Qe[0+Se]=ft}}else ft=ae(_e,156)?ae(_e,128)?1:3:ae(_e,163)?2:0,Be.Ob[0]=ft,i(Ue,De,ft,4),i(Qe,0,ft,4);Be.Dd=ae(_e,142)?ae(_e,114)?ae(_e,183)?1:3:2:0}if(je.m.Ka)return Yt(ce,7,"Premature end-of-partition0 encountered.");for(;ce.ja<ce.za;++ce.ja){if(je=ne,_e=(oe=ce).rb[oe.sb-1],Ue=oe.rb[oe.sb+oe.ja],be=oe.ya[oe.aa+oe.ja],De=oe.kc?be.Ad:0)_e.la=Ue.la=0,be.Za||(_e.Na=Ue.Na=0),be.Hc=0,be.Gc=0,be.ia=0;else{var jt,ut;if(_e=Ue,Ue=je,De=oe.Pa.Xc,Qe=oe.ya[oe.aa+oe.ja],Be=oe.pb[Qe.$b],Se=Qe.ad,xt=0,bt=oe.rb[oe.sb-1],ft=gt=0,i(Se,xt,0,384),Qe.Za)var nr=0,Xr=De[3];else{At=s(16);var ir=_e.Na+bt.Na;if(ir=pl(Ue,De[1],ir,Be.Eb,0,At,0),_e.Na=bt.Na=(0<ir)+0,1<ir)Ha(At,0,Se,xt);else{var Qr=At[0]+3>>3;for(At=0;256>At;At+=16)Se[xt+At]=Qr}nr=1,Xr=De[0]}var wt=15&_e.la,un=15&bt.la;for(At=0;4>At;++At){var dn=1&un;for(Qr=ut=0;4>Qr;++Qr)wt=wt>>1|(dn=(ir=pl(Ue,Xr,ir=dn+(1&wt),Be.Sc,nr,Se,xt))>nr)<<7,ut=ut<<2|(3<ir?3:1<ir?2:Se[xt+0]!=0),xt+=16;wt>>=4,un=un>>1|dn<<7,gt=(gt<<8|ut)>>>0}for(Xr=wt,nr=un>>4,jt=0;4>jt;jt+=2){for(ut=0,wt=_e.la>>4+jt,un=bt.la>>4+jt,At=0;2>At;++At){for(dn=1&un,Qr=0;2>Qr;++Qr)ir=dn+(1&wt),wt=wt>>1|(dn=0<(ir=pl(Ue,De[2],ir,Be.Qc,0,Se,xt)))<<3,ut=ut<<2|(3<ir?3:1<ir?2:Se[xt+0]!=0),xt+=16;wt>>=2,un=un>>1|dn<<5}ft|=ut<<4*jt,Xr|=wt<<4<<jt,nr|=(240&un)<<jt}_e.la=Xr,bt.la=nr,Qe.Hc=gt,Qe.Gc=ft,Qe.ia=43690&ft?0:Be.ia,De=!(gt|ft)}if(0<oe.L&&(oe.wa[oe.Y+oe.ja]=oe.gd[be.$b][be.Za],oe.wa[oe.Y+oe.ja].La|=!De),je.Ka)return Yt(ce,7,"Premature end-of-file encountered.")}if(Wo(ce),oe=Le,je=1,be=(ne=ce).D,_e=0<ne.L&&ne.M>=ne.zb&&ne.M<=ne.Va,ne.Aa==0)e:{if(be.M=ne.M,be.uc=_e,sl(ne,be),je=1,be=(ut=ne.D).Nb,_e=(ft=nu[ne.L])*ne.R,Ue=ft/2*ne.B,At=16*be*ne.R,Qr=8*be*ne.B,De=ne.sa,Qe=ne.ta-_e+At,Be=ne.qa,Se=ne.ra-Ue+Qr,xt=ne.Ha,bt=ne.Ia-Ue+Qr,un=(wt=ut.M)==0,gt=wt>=ne.Va-1,ne.Aa==2&&sl(ne,ut),ut.uc)for(dn=(ir=ne).D.M,t(ir.D.uc),ut=ir.yb;ut<ir.Hb;++ut){nr=ut,Xr=dn;var fr=(wr=(Ht=ir).D).Nb;jt=Ht.R;var wr=wr.wa[wr.Y+nr],qr=Ht.sa,Cn=Ht.ta+16*fr*jt+16*nr,pi=wr.dd,pr=wr.tc;if(pr!=0)if(t(3<=pr),Ht.L==1)0<nr&&ns(qr,Cn,jt,pr+4),wr.La&&jn(qr,Cn,jt,pr),0<Xr&&Xs(qr,Cn,jt,pr+4),wr.La&&hl(qr,Cn,jt,pr);else{var Oi=Ht.B,Qs=Ht.qa,Ya=Ht.ra+8*fr*Oi+8*nr,as=Ht.Ha,Ht=Ht.Ia+8*fr*Oi+8*nr;fr=wr.ld,0<nr&&(Gc(qr,Cn,jt,pr+4,pi,fr),Ys(Qs,Ya,as,Ht,Oi,pr+4,pi,fr)),wr.La&&(rs(qr,Cn,jt,pr,pi,fr),Va(Qs,Ya,as,Ht,Oi,pr,pi,fr)),0<Xr&&(Wa(qr,Cn,jt,pr+4,pi,fr),dl(Qs,Ya,as,Ht,Oi,pr+4,pi,fr)),wr.La&&(Ks(qr,Cn,jt,pr,pi,fr),Js(Qs,Ya,as,Ht,Oi,pr,pi,fr))}}if(ne.ia&&alert("todo:DitherRow"),oe.put!=null){if(ut=16*wt,wt=16*(wt+1),un?(oe.y=ne.sa,oe.O=ne.ta+At,oe.f=ne.qa,oe.N=ne.ra+Qr,oe.ea=ne.Ha,oe.W=ne.Ia+Qr):(ut-=ft,oe.y=De,oe.O=Qe,oe.f=Be,oe.N=Se,oe.ea=xt,oe.W=bt),gt||(wt-=ft),wt>oe.o&&(wt=oe.o),oe.F=null,oe.J=null,ne.Fa!=null&&0<ne.Fa.length&&ut<wt&&(oe.J=nl(ne,oe,ut,wt-ut),oe.F=ne.mb,oe.F==null&&oe.F.length==0)){je=Yt(ne,3,"Could not decode alpha data.");break e}ut<oe.j&&(ft=oe.j-ut,ut=oe.j,t(!(1&ft)),oe.O+=ne.R*ft,oe.N+=ne.B*(ft>>1),oe.W+=ne.B*(ft>>1),oe.F!=null&&(oe.J+=oe.width*ft)),ut<wt&&(oe.O+=oe.v,oe.N+=oe.v>>1,oe.W+=oe.v>>1,oe.F!=null&&(oe.J+=oe.v),oe.ka=ut-oe.j,oe.U=oe.va-oe.v,oe.T=wt-ut,je=oe.put(oe))}be+1!=ne.Ic||gt||(n(ne.sa,ne.ta-_e,De,Qe+16*ne.R,_e),n(ne.qa,ne.ra-Ue,Be,Se+8*ne.B,Ue),n(ne.Ha,ne.Ia-Ue,xt,bt+8*ne.B,Ue))}if(!je)return Yt(ce,6,"Output aborted.")}return 1}(c,d)),d.bc!=null&&d.bc(d),g&=1}return g?(c.cb=0,g):0}function qn(c,d,g,v,S){S=c[d+g+32*v]+(S>>3),c[d+g+32*v]=-256&S?0>S?0:255:S}function Pa(c,d,g,v,S,C){qn(c,d,0,g,v+S),qn(c,d,1,g,v+C),qn(c,d,2,g,v-C),qn(c,d,3,g,v-S)}function Yr(c){return(20091*c>>16)+c}function Vo(c,d,g,v){var S,C=0,_=s(16);for(S=0;4>S;++S){var E=c[d+0]+c[d+8],O=c[d+0]-c[d+8],U=(35468*c[d+4]>>16)-Yr(c[d+12]),re=Yr(c[d+4])+(35468*c[d+12]>>16);_[C+0]=E+re,_[C+1]=O+U,_[C+2]=O-U,_[C+3]=E-re,C+=4,d++}for(S=C=0;4>S;++S)E=(c=_[C+0]+4)+_[C+8],O=c-_[C+8],U=(35468*_[C+4]>>16)-Yr(_[C+12]),qn(g,v,0,0,E+(re=Yr(_[C+4])+(35468*_[C+12]>>16))),qn(g,v,1,0,O+U),qn(g,v,2,0,O-U),qn(g,v,3,0,E-re),C++,v+=32}function Pc(c,d,g,v){var S=c[d+0]+4,C=35468*c[d+4]>>16,_=Yr(c[d+4]),E=35468*c[d+1]>>16;Pa(g,v,0,S+_,c=Yr(c[d+1]),E),Pa(g,v,1,S+C,c,E),Pa(g,v,2,S-C,c,E),Pa(g,v,3,S-_,c,E)}function d0(c,d,g,v,S){Vo(c,d,g,v),S&&Vo(c,d+16,g,v+4)}function Ec(c,d,g,v){Ii(c,d+0,g,v,1),Ii(c,d+32,g,v+128,1)}function h0(c,d,g,v){var S;for(c=c[d+0]+4,S=0;4>S;++S)for(d=0;4>d;++d)qn(g,v,d,S,c)}function Ic(c,d,g,v){c[d+0]&&Br(c,d+0,g,v),c[d+16]&&Br(c,d+16,g,v+4),c[d+32]&&Br(c,d+32,g,v+128),c[d+48]&&Br(c,d+48,g,v+128+4)}function f0(c,d,g,v){var S,C=s(16);for(S=0;4>S;++S){var _=c[d+0+S]+c[d+12+S],E=c[d+4+S]+c[d+8+S],O=c[d+4+S]-c[d+8+S],U=c[d+0+S]-c[d+12+S];C[0+S]=_+E,C[8+S]=_-E,C[4+S]=U+O,C[12+S]=U-O}for(S=0;4>S;++S)_=(c=C[0+4*S]+3)+C[3+4*S],E=C[1+4*S]+C[2+4*S],O=C[1+4*S]-C[2+4*S],U=c-C[3+4*S],g[v+0]=_+E>>3,g[v+16]=U+O>>3,g[v+32]=_-E>>3,g[v+48]=U-O>>3,v+=64}function Go(c,d,g){var v,S=d-32,C=cn,_=255-c[S-1];for(v=0;v<g;++v){var E,O=C,U=_+c[d-1];for(E=0;E<g;++E)c[d+E]=O[U+c[S+E]];d+=32}}function p0(c,d){Go(c,d,4)}function g0(c,d){Go(c,d,8)}function m0(c,d){Go(c,d,16)}function Ci(c,d){var g;for(g=0;16>g;++g)n(c,d+32*g,c,d-32,16)}function Ea(c,d){var g;for(g=16;0<g;--g)i(c,d,c[d-1],16),d+=32}function Ia(c,d,g){var v;for(v=0;16>v;++v)i(d,g+32*v,c,16)}function Fc(c,d){var g,v=16;for(g=0;16>g;++g)v+=c[d-1+32*g]+c[d+g-32];Ia(v>>5,c,d)}function Ar(c,d){var g,v=8;for(g=0;16>g;++g)v+=c[d-1+32*g];Ia(v>>4,c,d)}function x0(c,d){var g,v=8;for(g=0;16>g;++g)v+=c[d+g-32];Ia(v>>4,c,d)}function Tc(c,d){Ia(128,c,d)}function st(c,d,g){return c+2*d+g+2>>2}function y0(c,d){var g,v=d-32;for(v=new Uint8Array([st(c[v-1],c[v+0],c[v+1]),st(c[v+0],c[v+1],c[v+2]),st(c[v+1],c[v+2],c[v+3]),st(c[v+2],c[v+3],c[v+4])]),g=0;4>g;++g)n(c,d+32*g,v,0,v.length)}function v0(c,d){var g=c[d-1],v=c[d-1+32],S=c[d-1+64],C=c[d-1+96];ke(c,d+0,16843009*st(c[d-1-32],g,v)),ke(c,d+32,16843009*st(g,v,S)),ke(c,d+64,16843009*st(v,S,C)),ke(c,d+96,16843009*st(S,C,C))}function di(c,d){var g,v=4;for(g=0;4>g;++g)v+=c[d+g-32]+c[d-1+32*g];for(v>>=3,g=0;4>g;++g)i(c,d+32*g,v,4)}function Oc(c,d){var g=c[d-1+0],v=c[d-1+32],S=c[d-1+64],C=c[d-1-32],_=c[d+0-32],E=c[d+1-32],O=c[d+2-32],U=c[d+3-32];c[d+0+96]=st(v,S,c[d-1+96]),c[d+1+96]=c[d+0+64]=st(g,v,S),c[d+2+96]=c[d+1+64]=c[d+0+32]=st(C,g,v),c[d+3+96]=c[d+2+64]=c[d+1+32]=c[d+0+0]=st(_,C,g),c[d+3+64]=c[d+2+32]=c[d+1+0]=st(E,_,C),c[d+3+32]=c[d+2+0]=st(O,E,_),c[d+3+0]=st(U,O,E)}function Mc(c,d){var g=c[d+1-32],v=c[d+2-32],S=c[d+3-32],C=c[d+4-32],_=c[d+5-32],E=c[d+6-32],O=c[d+7-32];c[d+0+0]=st(c[d+0-32],g,v),c[d+1+0]=c[d+0+32]=st(g,v,S),c[d+2+0]=c[d+1+32]=c[d+0+64]=st(v,S,C),c[d+3+0]=c[d+2+32]=c[d+1+64]=c[d+0+96]=st(S,C,_),c[d+3+32]=c[d+2+64]=c[d+1+96]=st(C,_,E),c[d+3+64]=c[d+2+96]=st(_,E,O),c[d+3+96]=st(E,O,O)}function Fa(c,d){var g=c[d-1+0],v=c[d-1+32],S=c[d-1+64],C=c[d-1-32],_=c[d+0-32],E=c[d+1-32],O=c[d+2-32],U=c[d+3-32];c[d+0+0]=c[d+1+64]=C+_+1>>1,c[d+1+0]=c[d+2+64]=_+E+1>>1,c[d+2+0]=c[d+3+64]=E+O+1>>1,c[d+3+0]=O+U+1>>1,c[d+0+96]=st(S,v,g),c[d+0+64]=st(v,g,C),c[d+0+32]=c[d+1+96]=st(g,C,_),c[d+1+32]=c[d+2+96]=st(C,_,E),c[d+2+32]=c[d+3+96]=st(_,E,O),c[d+3+32]=st(E,O,U)}function Yo(c,d){var g=c[d+0-32],v=c[d+1-32],S=c[d+2-32],C=c[d+3-32],_=c[d+4-32],E=c[d+5-32],O=c[d+6-32],U=c[d+7-32];c[d+0+0]=g+v+1>>1,c[d+1+0]=c[d+0+64]=v+S+1>>1,c[d+2+0]=c[d+1+64]=S+C+1>>1,c[d+3+0]=c[d+2+64]=C+_+1>>1,c[d+0+32]=st(g,v,S),c[d+1+32]=c[d+0+96]=st(v,S,C),c[d+2+32]=c[d+1+96]=st(S,C,_),c[d+3+32]=c[d+2+96]=st(C,_,E),c[d+3+64]=st(_,E,O),c[d+3+96]=st(E,O,U)}function b0(c,d){var g=c[d-1+0],v=c[d-1+32],S=c[d-1+64],C=c[d-1+96];c[d+0+0]=g+v+1>>1,c[d+2+0]=c[d+0+32]=v+S+1>>1,c[d+2+32]=c[d+0+64]=S+C+1>>1,c[d+1+0]=st(g,v,S),c[d+3+0]=c[d+1+32]=st(v,S,C),c[d+3+32]=c[d+1+64]=st(S,C,C),c[d+3+64]=c[d+2+64]=c[d+0+96]=c[d+1+96]=c[d+2+96]=c[d+3+96]=C}function w0(c,d){var g=c[d-1+0],v=c[d-1+32],S=c[d-1+64],C=c[d-1+96],_=c[d-1-32],E=c[d+0-32],O=c[d+1-32],U=c[d+2-32];c[d+0+0]=c[d+2+32]=g+_+1>>1,c[d+0+32]=c[d+2+64]=v+g+1>>1,c[d+0+64]=c[d+2+96]=S+v+1>>1,c[d+0+96]=C+S+1>>1,c[d+3+0]=st(E,O,U),c[d+2+0]=st(_,E,O),c[d+1+0]=c[d+3+32]=st(g,_,E),c[d+1+32]=c[d+3+64]=st(v,g,_),c[d+1+64]=c[d+3+96]=st(S,v,g),c[d+1+96]=st(C,S,v)}function N0(c,d){var g;for(g=0;8>g;++g)n(c,d+32*g,c,d-32,8)}function Ko(c,d){var g;for(g=0;8>g;++g)i(c,d,c[d-1],8),d+=32}function $s(c,d,g){var v;for(v=0;8>v;++v)i(d,g+32*v,c,8)}function Xi(c,d){var g,v=8;for(g=0;8>g;++g)v+=c[d+g-32]+c[d-1+32*g];$s(v>>4,c,d)}function k0(c,d){var g,v=4;for(g=0;8>g;++g)v+=c[d+g-32];$s(v>>3,c,d)}function Hs(c,d){var g,v=4;for(g=0;8>g;++g)v+=c[d-1+32*g];$s(v>>3,c,d)}function Jo(c,d){$s(128,c,d)}function Ta(c,d,g){var v=c[d-g],S=c[d+0],C=3*(S-v)+_0[1020+c[d-2*g]-c[d+g]],_=Kc[112+(C+4>>3)];c[d-g]=cn[255+v+Kc[112+(C+3>>3)]],c[d+0]=cn[255+S-_]}function Dc(c,d,g,v){var S=c[d+0],C=c[d+g];return An[255+c[d-2*g]-c[d-g]]>v||An[255+C-S]>v}function Rc(c,d,g,v){return 4*An[255+c[d-g]-c[d+0]]+An[255+c[d-2*g]-c[d+g]]<=v}function Bc(c,d,g,v,S){var C=c[d-3*g],_=c[d-2*g],E=c[d-g],O=c[d+0],U=c[d+g],re=c[d+2*g],pe=c[d+3*g];return 4*An[255+E-O]+An[255+_-U]>v?0:An[255+c[d-4*g]-C]<=S&&An[255+C-_]<=S&&An[255+_-E]<=S&&An[255+pe-re]<=S&&An[255+re-U]<=S&&An[255+U-O]<=S}function qc(c,d,g,v){var S=2*v+1;for(v=0;16>v;++v)Rc(c,d+v,g,S)&&Ta(c,d+v,g)}function hi(c,d,g,v){var S=2*v+1;for(v=0;16>v;++v)Rc(c,d+v*g,1,S)&&Ta(c,d+v*g,1)}function _i(c,d,g,v){var S;for(S=3;0<S;--S)qc(c,d+=4*g,g,v)}function j0(c,d,g,v){var S;for(S=3;0<S;--S)hi(c,d+=4,g,v)}function Qi(c,d,g,v,S,C,_,E){for(C=2*C+1;0<S--;){if(Bc(c,d,g,C,_))if(Dc(c,d,g,E))Ta(c,d,g);else{var O=c,U=d,re=g,pe=O[U-2*re],ge=O[U-re],ce=O[U+0],Le=O[U+re],be=O[U+2*re],ne=27*(je=_0[1020+3*(ce-ge)+_0[1020+pe-Le]])+63>>7,oe=18*je+63>>7,je=9*je+63>>7;O[U-3*re]=cn[255+O[U-3*re]+je],O[U-2*re]=cn[255+pe+oe],O[U-re]=cn[255+ge+ne],O[U+0]=cn[255+ce-ne],O[U+re]=cn[255+Le-oe],O[U+2*re]=cn[255+be-je]}d+=v}}function zn(c,d,g,v,S,C,_,E){for(C=2*C+1;0<S--;){if(Bc(c,d,g,C,_))if(Dc(c,d,g,E))Ta(c,d,g);else{var O=c,U=d,re=g,pe=O[U-re],ge=O[U+0],ce=O[U+re],Le=Kc[112+((be=3*(ge-pe))+4>>3)],be=Kc[112+(be+3>>3)],ne=Le+1>>1;O[U-2*re]=cn[255+O[U-2*re]+ne],O[U-re]=cn[255+pe+be],O[U+0]=cn[255+ge-Le],O[U+re]=cn[255+ce-ne]}d+=v}}function Xo(c,d,g,v,S,C){Qi(c,d,g,1,16,v,S,C)}function Ws(c,d,g,v,S,C){Qi(c,d,1,g,16,v,S,C)}function S0(c,d,g,v,S,C){var _;for(_=3;0<_;--_)zn(c,d+=4*g,g,1,16,v,S,C)}function Oa(c,d,g,v,S,C){var _;for(_=3;0<_;--_)zn(c,d+=4,1,g,16,v,S,C)}function A0(c,d,g,v,S,C,_,E){Qi(c,d,S,1,8,C,_,E),Qi(g,v,S,1,8,C,_,E)}function Qo(c,d,g,v,S,C,_,E){Qi(c,d,1,S,8,C,_,E),Qi(g,v,1,S,8,C,_,E)}function Zo(c,d,g,v,S,C,_,E){zn(c,d+4*S,S,1,8,C,_,E),zn(g,v+4*S,S,1,8,C,_,E)}function zc(c,d,g,v,S,C,_,E){zn(c,d+4,1,S,8,C,_,E),zn(g,v+4,1,S,8,C,_,E)}function Ma(){this.ba=new On,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function el(){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 tl(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Uc(){this.ua=0,this.Wa=new V,this.vb=new V,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new F,this.yc=new I}function L0(){this.xb=this.a=0,this.l=new _a,this.ca=new On,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new j,this.Pb=0,this.wd=new j,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Uc,this.ab=0,this.gc=a(4,tl),this.Oc=0}function Da(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new _a,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Vs(c,d,g,v,S,C,_){for(c=c==null?0:c[d+0],d=0;d<_;++d)S[C+d]=c+g[v+d]&255,c=S[C+d]}function rl(c,d,g,v,S,C,_){var E;if(c==null)Vs(null,null,g,v,S,C,_);else for(E=0;E<_;++E)S[C+E]=c[d+E]+g[v+E]&255}function Zi(c,d,g,v,S,C,_){if(c==null)Vs(null,null,g,v,S,C,_);else{var E,O=c[d+0],U=O,re=O;for(E=0;E<_;++E)U=re+(O=c[d+E])-U,re=g[v+E]+(-256&U?0>U?0:255:U)&255,U=O,S[C+E]=re}}function nl(c,d,g,v){var S=d.width,C=d.o;if(t(c!=null&&d!=null),0>g||0>=v||g+v>C)return null;if(!c.Cc){if(c.ga==null){var _;if(c.ga=new Da,(_=c.ga==null)||(_=d.width*d.o,t(c.Gb.length==0),c.Gb=s(_),c.Uc=0,c.Gb==null?_=0:(c.mb=c.Gb,c.nb=c.Uc,c.rc=null,_=1),_=!_),!_){_=c.ga;var E=c.Fa,O=c.P,U=c.qc,re=c.mb,pe=c.nb,ge=O+1,ce=U-1,Le=_.l;if(t(E!=null&&re!=null&&d!=null),ss[0]=null,ss[1]=Vs,ss[2]=rl,ss[3]=Zi,_.ca=re,_.tb=pe,_.c=d.width,_.i=d.height,t(0<_.c&&0<_.i),1>=U)d=0;else if(_.$a=E[O+0]>>0&3,_.Z=E[O+0]>>2&3,_.Lc=E[O+0]>>4&3,O=E[O+0]>>6&3,0>_.$a||1<_.$a||4<=_.Z||1<_.Lc||O)d=0;else if(Le.put=ai,Le.ac=vr,Le.bc=oi,Le.ma=_,Le.width=d.width,Le.height=d.height,Le.Da=d.Da,Le.v=d.v,Le.va=d.va,Le.j=d.j,Le.o=d.o,_.$a)e:{t(_.$a==1),d=wn();t:for(;;){if(d==null){d=0;break e}if(t(_!=null),_.mc=d,d.c=_.c,d.i=_.i,d.l=_.l,d.l.ma=_,d.l.width=_.c,d.l.height=_.i,d.a=0,W(d.m,E,ge,ce),!ui(_.c,_.i,1,d,null)||(d.ab==1&&d.gc[0].hc==3&&Li(d.s)?(_.ic=1,E=d.c*d.i,d.Ta=null,d.Ua=0,d.V=s(E),d.Ba=0,d.V==null?(d.a=1,d=0):d=1):(_.ic=0,d=Us(d,_.c)),!d))break t;d=1;break e}_.mc=null,d=0}else d=ce>=_.c*_.i;_=!d}if(_)return null;c.ga.Lc!=1?c.Ga=0:v=C-g}t(c.ga!=null),t(g+v<=C);e:{if(d=(E=c.ga).c,C=E.l.o,E.$a==0){if(ge=c.rc,ce=c.Vc,Le=c.Fa,O=c.P+1+g*d,U=c.mb,re=c.nb+g*d,t(O<=c.P+c.qc),E.Z!=0)for(t(ss[E.Z]!=null),_=0;_<v;++_)ss[E.Z](ge,ce,Le,O,U,re,d),ge=U,ce=re,re+=d,O+=d;else for(_=0;_<v;++_)n(U,re,Le,O,d),ge=U,ce=re,re+=d,O+=d;c.rc=ge,c.Vc=ce}else{if(t(E.mc!=null),d=g+v,t((_=E.mc)!=null),t(d<=_.i),_.C>=d)d=1;else if(E.ic||fe(),E.ic){E=_.V,ge=_.Ba,ce=_.c;var be=_.i,ne=(Le=1,O=_.$/ce,U=_.$%ce,re=_.m,pe=_.s,_.$),oe=ce*be,je=ce*d,_e=pe.wc,Se=ne<je?tr(pe,U,O):null;t(ne<=oe),t(d<=be),t(Li(pe));t:for(;;){for(;!re.h&&ne<je;){if(U&_e||(Se=tr(pe,U,O)),t(Se!=null),ee(re),256>(be=Gr(Se.G[0],Se.H[0],re)))E[ge+ne]=be,++ne,++U>=ce&&(U=0,++O<=d&&!(O%16)&&Rn(_,O));else{if(!(280>be)){Le=0;break t}be=Mn(be-256,re);var Ue,De=Gr(Se.G[4],Se.H[4],re);if(ee(re),!(ne>=(De=li(ce,De=Mn(De,re)))&&oe-ne>=be)){Le=0;break t}for(Ue=0;Ue<be;++Ue)E[ge+ne+Ue]=E[ge+ne+Ue-De];for(ne+=be,U+=be;U>=ce;)U-=ce,++O<=d&&!(O%16)&&Rn(_,O);ne<je&&U&_e&&(Se=tr(pe,U,O))}t(re.h==B(re))}Rn(_,O>d?d:O);break t}!Le||re.h&&ne<oe?(Le=0,_.a=re.h?5:3):_.$=ne,d=Le}else d=Bn(_,_.V,_.Ba,_.c,_.i,d,ja);if(!d){v=0;break e}}g+v>=C&&(c.Cc=1),v=1}if(!v)return null;if(c.Cc&&((v=c.ga)!=null&&(v.mc=null),c.ga=null,0<c.Ga))return alert("todo:WebPDequantizeLevels"),null}return c.nb+g*S}function f(c,d,g,v,S,C){for(;0<S--;){var _,E=c,O=d+(g?1:0),U=c,re=d+(g?0:3);for(_=0;_<v;++_){var pe=U[re+4*_];pe!=255&&(pe*=32897,E[O+4*_+0]=E[O+4*_+0]*pe>>23,E[O+4*_+1]=E[O+4*_+1]*pe>>23,E[O+4*_+2]=E[O+4*_+2]*pe>>23)}d+=C}}function A(c,d,g,v,S){for(;0<v--;){var C;for(C=0;C<g;++C){var _=c[d+2*C+0],E=15&(U=c[d+2*C+1]),O=4369*E,U=(240&U|U>>4)*O>>16;c[d+2*C+0]=(240&_|_>>4)*O>>16&240|(15&_|_<<4)*O>>16>>4&15,c[d+2*C+1]=240&U|E}d+=S}}function H(c,d,g,v,S,C,_,E){var O,U,re=255;for(U=0;U<S;++U){for(O=0;O<v;++O){var pe=c[d+O];C[_+4*O]=pe,re&=pe}d+=g,_+=E}return re!=255}function Q(c,d,g,v,S){var C;for(C=0;C<S;++C)g[v+C]=c[d+C]>>8}function fe(){Sn=f,Ct=A,_t=H,Jt=Q}function Ne(c,d,g){R[c]=function(v,S,C,_,E,O,U,re,pe,ge,ce,Le,be,ne,oe,je,_e){var Se,Ue=_e-1>>1,De=E[O+0]|U[re+0]<<16,Qe=pe[ge+0]|ce[Le+0]<<16;t(v!=null);var Be=3*De+Qe+131074>>2;for(d(v[S+0],255&Be,Be>>16,be,ne),C!=null&&(Be=3*Qe+De+131074>>2,d(C[_+0],255&Be,Be>>16,oe,je)),Se=1;Se<=Ue;++Se){var xt=E[O+Se]|U[re+Se]<<16,bt=pe[ge+Se]|ce[Le+Se]<<16,gt=De+xt+Qe+bt+524296,ft=gt+2*(xt+Qe)>>3;Be=ft+De>>1,De=(gt=gt+2*(De+bt)>>3)+xt>>1,d(v[S+2*Se-1],255&Be,Be>>16,be,ne+(2*Se-1)*g),d(v[S+2*Se-0],255&De,De>>16,be,ne+(2*Se-0)*g),C!=null&&(Be=gt+Qe>>1,De=ft+bt>>1,d(C[_+2*Se-1],255&Be,Be>>16,oe,je+(2*Se-1)*g),d(C[_+2*Se+0],255&De,De>>16,oe,je+(2*Se+0)*g)),De=xt,Qe=bt}1&_e||(Be=3*De+Qe+131074>>2,d(v[S+_e-1],255&Be,Be>>16,be,ne+(_e-1)*g),C!=null&&(Be=3*Qe+De+131074>>2,d(C[_+_e-1],255&Be,Be>>16,oe,je+(_e-1)*g)))}}function Ee(){Ln[Jc]=Py,Ln[Xc]=l1,Ln[n1]=Ey,Ln[Qc]=c1,Ln[Zc]=u1,Ln[P0]=d1,Ln[i1]=Iy,Ln[E0]=l1,Ln[I0]=c1,Ln[eu]=u1,Ln[F0]=d1}function ze(c){return c&~Fy?0>c?0:255:c>>h1}function Xe(c,d){return ze((19077*c>>8)+(26149*d>>8)-14234)}function ct(c,d,g){return ze((19077*c>>8)-(6419*d>>8)-(13320*g>>8)+8708)}function ot(c,d){return ze((19077*c>>8)+(33050*d>>8)-17685)}function pt(c,d,g,v,S){v[S+0]=Xe(c,g),v[S+1]=ct(c,d,g),v[S+2]=ot(c,d)}function Dt(c,d,g,v,S){v[S+0]=ot(c,d),v[S+1]=ct(c,d,g),v[S+2]=Xe(c,g)}function $t(c,d,g,v,S){var C=ct(c,d,g);d=C<<3&224|ot(c,d)>>3,v[S+0]=248&Xe(c,g)|C>>5,v[S+1]=d}function rr(c,d,g,v,S){var C=240&ot(c,d)|15;v[S+0]=240&Xe(c,g)|ct(c,d,g)>>4,v[S+1]=C}function Lr(c,d,g,v,S){v[S+0]=255,pt(c,d,g,v,S+1)}function hr(c,d,g,v,S){Dt(c,d,g,v,S),v[S+3]=255}function Un(c,d,g,v,S){pt(c,d,g,v,S),v[S+3]=255}function ln(c,d){return 0>c?0:c>d?d:c}function fi(c,d,g){R[c]=function(v,S,C,_,E,O,U,re,pe){for(var ge=re+(-2&pe)*g;re!=ge;)d(v[S+0],C[_+0],E[O+0],U,re),d(v[S+1],C[_+0],E[O+0],U,re+g),S+=2,++_,++O,re+=2*g;1&pe&&d(v[S+0],C[_+0],E[O+0],U,re)}}function $c(c,d,g){return g==0?c==0?d==0?6:5:d==0?4:0:g}function il(c,d,g,v,S){switch(c>>>30){case 3:Ii(d,g,v,S,0);break;case 2:Kt(d,g,v,S);break;case 1:Br(d,g,v,S)}}function sl(c,d){var g,v,S=d.M,C=d.Nb,_=c.oc,E=c.pc+40,O=c.oc,U=c.pc+584,re=c.oc,pe=c.pc+600;for(g=0;16>g;++g)_[E+32*g-1]=129;for(g=0;8>g;++g)O[U+32*g-1]=129,re[pe+32*g-1]=129;for(0<S?_[E-1-32]=O[U-1-32]=re[pe-1-32]=129:(i(_,E-32-1,127,21),i(O,U-32-1,127,9),i(re,pe-32-1,127,9)),v=0;v<c.za;++v){var ge=d.ya[d.aa+v];if(0<v){for(g=-1;16>g;++g)n(_,E+32*g-4,_,E+32*g+12,4);for(g=-1;8>g;++g)n(O,U+32*g-4,O,U+32*g+4,4),n(re,pe+32*g-4,re,pe+32*g+4,4)}var ce=c.Gd,Le=c.Hd+v,be=ge.ad,ne=ge.Hc;if(0<S&&(n(_,E-32,ce[Le].y,0,16),n(O,U-32,ce[Le].f,0,8),n(re,pe-32,ce[Le].ea,0,8)),ge.Za){var oe=_,je=E-32+16;for(0<S&&(v>=c.za-1?i(oe,je,ce[Le].y[15],4):n(oe,je,ce[Le+1].y,0,4)),g=0;4>g;g++)oe[je+128+g]=oe[je+256+g]=oe[je+384+g]=oe[je+0+g];for(g=0;16>g;++g,ne<<=2)oe=_,je=E+p1[g],$n[ge.Ob[g]](oe,je),il(ne,be,16*+g,oe,je)}else if(oe=$c(v,S,ge.Ob[0]),is[oe](_,E),ne!=0)for(g=0;16>g;++g,ne<<=2)il(ne,be,16*+g,_,E+p1[g]);for(g=ge.Gc,oe=$c(v,S,ge.Dd),Ti[oe](O,U),Ti[oe](re,pe),ne=be,oe=O,je=U,255&(ge=g>>0)&&(170&ge?ul(ne,256,oe,je):kn(ne,256,oe,je)),ge=re,ne=pe,255&(g>>=8)&&(170&g?ul(be,320,ge,ne):kn(be,320,ge,ne)),S<c.Ub-1&&(n(ce[Le].y,0,_,E+480,16),n(ce[Le].f,0,O,U+224,8),n(ce[Le].ea,0,re,pe+224,8)),g=8*C*c.B,ce=c.sa,Le=c.ta+16*v+16*C*c.R,be=c.qa,ge=c.ra+8*v+g,ne=c.Ha,oe=c.Ia+8*v+g,g=0;16>g;++g)n(ce,Le+g*c.R,_,E+32*g,16);for(g=0;8>g;++g)n(be,ge+g*c.B,O,U+32*g,8),n(ne,oe+g*c.B,re,pe+32*g,8)}}function Ra(c,d,g,v,S,C,_,E,O){var U=[0],re=[0],pe=0,ge=O!=null?O.kd:0,ce=O??new el;if(c==null||12>g)return 7;ce.data=c,ce.w=d,ce.ha=g,d=[d],g=[g],ce.gb=[ce.gb];e:{var Le=d,be=g,ne=ce.gb;if(t(c!=null),t(be!=null),t(ne!=null),ne[0]=0,12<=be[0]&&!r(c,Le[0],"RIFF")){if(r(c,Le[0]+8,"WEBP")){ne=3;break e}var oe=Pe(c,Le[0]+4);if(12>oe||4294967286<oe){ne=3;break e}if(ge&&oe>be[0]-8){ne=7;break e}ne[0]=oe,Le[0]+=12,be[0]-=12}ne=0}if(ne!=0)return ne;for(oe=0<ce.gb[0],g=g[0];;){e:{var je=c;be=d,ne=g;var _e=U,Se=re,Ue=Le=[0];if((Be=pe=[pe])[0]=0,8>ne[0])ne=7;else{if(!r(je,be[0],"VP8X")){if(Pe(je,be[0]+4)!=10){ne=3;break e}if(18>ne[0]){ne=7;break e}var De=Pe(je,be[0]+8),Qe=1+we(je,be[0]+12);if(2147483648<=Qe*(je=1+we(je,be[0]+15))){ne=3;break e}Ue!=null&&(Ue[0]=De),_e!=null&&(_e[0]=Qe),Se!=null&&(Se[0]=je),be[0]+=18,ne[0]-=18,Be[0]=1}ne=0}}if(pe=pe[0],Le=Le[0],ne!=0)return ne;if(be=!!(2&Le),!oe&&pe)return 3;if(C!=null&&(C[0]=!!(16&Le)),_!=null&&(_[0]=be),E!=null&&(E[0]=0),_=U[0],Le=re[0],pe&&be&&O==null){ne=0;break}if(4>g){ne=7;break}if(oe&&pe||!oe&&!pe&&!r(c,d[0],"ALPH")){g=[g],ce.na=[ce.na],ce.P=[ce.P],ce.Sa=[ce.Sa];e:{De=c,ne=d,oe=g;var Be=ce.gb;_e=ce.na,Se=ce.P,Ue=ce.Sa,Qe=22,t(De!=null),t(oe!=null),je=ne[0];var xt=oe[0];for(t(_e!=null),t(Ue!=null),_e[0]=null,Se[0]=null,Ue[0]=0;;){if(ne[0]=je,oe[0]=xt,8>xt){ne=7;break e}var bt=Pe(De,je+4);if(4294967286<bt){ne=3;break e}var gt=8+bt+1&-2;if(Qe+=gt,0<Be&&Qe>Be){ne=3;break e}if(!r(De,je,"VP8 ")||!r(De,je,"VP8L")){ne=0;break e}if(xt[0]<gt){ne=7;break e}r(De,je,"ALPH")||(_e[0]=De,Se[0]=je+8,Ue[0]=bt),je+=gt,xt-=gt}}if(g=g[0],ce.na=ce.na[0],ce.P=ce.P[0],ce.Sa=ce.Sa[0],ne!=0)break}g=[g],ce.Ja=[ce.Ja],ce.xa=[ce.xa];e:if(Be=c,ne=d,oe=g,_e=ce.gb[0],Se=ce.Ja,Ue=ce.xa,De=ne[0],je=!r(Be,De,"VP8 "),Qe=!r(Be,De,"VP8L"),t(Be!=null),t(oe!=null),t(Se!=null),t(Ue!=null),8>oe[0])ne=7;else{if(je||Qe){if(Be=Pe(Be,De+4),12<=_e&&Be>_e-12){ne=3;break e}if(ge&&Be>oe[0]-8){ne=7;break e}Se[0]=Be,ne[0]+=8,oe[0]-=8,Ue[0]=Qe}else Ue[0]=5<=oe[0]&&Be[De+0]==47&&!(Be[De+4]>>5),Se[0]=oe[0];ne=0}if(g=g[0],ce.Ja=ce.Ja[0],ce.xa=ce.xa[0],d=d[0],ne!=0)break;if(4294967286<ce.Ja)return 3;if(E==null||be||(E[0]=ce.xa?2:1),_=[_],Le=[Le],ce.xa){if(5>g){ne=7;break}E=_,ge=Le,be=C,c==null||5>g?c=0:5<=g&&c[d+0]==47&&!(c[d+4]>>5)?(oe=[0],Be=[0],_e=[0],W(Se=new j,c,d,g),Ze(Se,oe,Be,_e)?(E!=null&&(E[0]=oe[0]),ge!=null&&(ge[0]=Be[0]),be!=null&&(be[0]=_e[0]),c=1):c=0):c=0}else{if(10>g){ne=7;break}E=Le,c==null||10>g||!Lc(c,d+3,g-3)?c=0:(ge=c[d+0]|c[d+1]<<8|c[d+2]<<16,be=16383&(c[d+7]<<8|c[d+6]),c=16383&(c[d+9]<<8|c[d+8]),1&ge||3<(ge>>1&7)||!(ge>>4&1)||ge>>5>=ce.Ja||!be||!c?c=0:(_&&(_[0]=be),E&&(E[0]=c),c=1))}if(!c||(_=_[0],Le=Le[0],pe&&(U[0]!=_||re[0]!=Le)))return 3;O!=null&&(O[0]=ce,O.offset=d-O.w,t(4294967286>d-O.w),t(O.offset==O.ha-g));break}return ne==0||ne==7&&pe&&O==null?(C!=null&&(C[0]|=ce.na!=null&&0<ce.na.length),v!=null&&(v[0]=_),S!=null&&(S[0]=Le),0):ne}function al(c,d,g){var v=d.width,S=d.height,C=0,_=0,E=v,O=S;if(d.Da=c!=null&&0<c.Da,d.Da&&(E=c.cd,O=c.bd,C=c.v,_=c.j,11>g||(C&=-2,_&=-2),0>C||0>_||0>=E||0>=O||C+E>v||_+O>S))return 0;if(d.v=C,d.j=_,d.va=C+E,d.o=_+O,d.U=E,d.T=O,d.da=c!=null&&0<c.da,d.da){if(!nt(E,O,g=[c.ib],C=[c.hb]))return 0;d.ib=g[0],d.hb=C[0]}return d.ob=c!=null&&c.ob,d.Kb=c==null||!c.Sd,d.da&&(d.ob=d.ib<3*v/4&&d.hb<3*S/4,d.Kb=0),1}function ol(c){if(c==null)return 2;if(11>c.S){var d=c.f.RGBA;d.fb+=(c.height-1)*d.A,d.A=-d.A}else d=c.f.kb,c=c.height,d.O+=(c-1)*d.fa,d.fa=-d.fa,d.N+=(c-1>>1)*d.Ab,d.Ab=-d.Ab,d.W+=(c-1>>1)*d.Db,d.Db=-d.Db,d.F!=null&&(d.J+=(c-1)*d.lb,d.lb=-d.lb);return 0}function Ba(c,d,g,v){if(v==null||0>=c||0>=d)return 2;if(g!=null){if(g.Da){var S=g.cd,C=g.bd,_=-2&g.v,E=-2&g.j;if(0>_||0>E||0>=S||0>=C||_+S>c||E+C>d)return 2;c=S,d=C}if(g.da){if(!nt(c,d,S=[g.ib],C=[g.hb]))return 2;c=S[0],d=C[0]}}v.width=c,v.height=d;e:{var O=v.width,U=v.height;if(c=v.S,0>=O||0>=U||!(c>=Jc&&13>c))c=2;else{if(0>=v.Rd&&v.sd==null){_=C=S=d=0;var re=(E=O*g1[c])*U;if(11>c||(C=(U+1)/2*(d=(O+1)/2),c==12&&(_=(S=O)*U)),(U=s(re+2*C+_))==null){c=1;break e}v.sd=U,11>c?((O=v.f.RGBA).eb=U,O.fb=0,O.A=E,O.size=re):((O=v.f.kb).y=U,O.O=0,O.fa=E,O.Fd=re,O.f=U,O.N=0+re,O.Ab=d,O.Cd=C,O.ea=U,O.W=0+re+C,O.Db=d,O.Ed=C,c==12&&(O.F=U,O.J=0+re+2*C),O.Tc=_,O.lb=S)}if(d=1,S=v.S,C=v.width,_=v.height,S>=Jc&&13>S)if(11>S)c=v.f.RGBA,d&=(E=Math.abs(c.A))*(_-1)+C<=c.size,d&=E>=C*g1[S],d&=c.eb!=null;else{c=v.f.kb,E=(C+1)/2,re=(_+1)/2,O=Math.abs(c.fa),U=Math.abs(c.Ab);var pe=Math.abs(c.Db),ge=Math.abs(c.lb),ce=ge*(_-1)+C;d&=O*(_-1)+C<=c.Fd,d&=U*(re-1)+E<=c.Cd,d=(d&=pe*(re-1)+E<=c.Ed)&O>=C&U>=E&pe>=E,d&=c.y!=null,d&=c.f!=null,d&=c.ea!=null,S==12&&(d&=ge>=C,d&=ce<=c.Tc,d&=c.F!=null)}else d=0;c=d?0:2}}return c!=0||g!=null&&g.fd&&(c=ol(v)),c}var br=64,qa=[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],za=24,Ua=32,ll=8,Kr=[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];Oe("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(c){return c},R.Predictor2=function(c,d,g){return d[g+0]},R.Predictor3=function(c,d,g){return d[g+1]},R.Predictor4=function(c,d,g){return d[g-1]},R.Predictor5=function(c,d,g){return q(q(c,d[g+1]),d[g+0])},R.Predictor6=function(c,d,g){return q(c,d[g-1])},R.Predictor7=function(c,d,g){return q(c,d[g+0])},R.Predictor8=function(c,d,g){return q(d[g-1],d[g+0])},R.Predictor9=function(c,d,g){return q(d[g+0],d[g+1])},R.Predictor10=function(c,d,g){return q(q(c,d[g-1]),q(d[g+0],d[g+1]))},R.Predictor11=function(c,d,g){var v=d[g+0];return 0>=Ae(v>>24&255,c>>24&255,(d=d[g-1])>>24&255)+Ae(v>>16&255,c>>16&255,d>>16&255)+Ae(v>>8&255,c>>8&255,d>>8&255)+Ae(255&v,255&c,255&d)?v:c},R.Predictor12=function(c,d,g){var v=d[g+0];return(ue((c>>24&255)+(v>>24&255)-((d=d[g-1])>>24&255))<<24|ue((c>>16&255)+(v>>16&255)-(d>>16&255))<<16|ue((c>>8&255)+(v>>8&255)-(d>>8&255))<<8|ue((255&c)+(255&v)-(255&d)))>>>0},R.Predictor13=function(c,d,g){var v=d[g-1];return(Ce((c=q(c,d[g+0]))>>24&255,v>>24&255)<<24|Ce(c>>16&255,v>>16&255)<<16|Ce(c>>8&255,v>>8&255)<<8|Ce(c>>0&255,v>>0&255))>>>0};var C0=R.PredictorAdd0;R.PredictorAdd1=ve,Oe("Predictor2","PredictorAdd2"),Oe("Predictor3","PredictorAdd3"),Oe("Predictor4","PredictorAdd4"),Oe("Predictor5","PredictorAdd5"),Oe("Predictor6","PredictorAdd6"),Oe("Predictor7","PredictorAdd7"),Oe("Predictor8","PredictorAdd8"),Oe("Predictor9","PredictorAdd9"),Oe("Predictor10","PredictorAdd10"),Oe("Predictor11","PredictorAdd11"),Oe("Predictor12","PredictorAdd12"),Oe("Predictor13","PredictorAdd13");var cl=R.PredictorAdd2;it("ColorIndexInverseTransform","MapARGB","32b",function(c){return c>>8&255},function(c){return c}),it("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(c){return c},function(c){return c>>8&255});var Hc,Nn=R.ColorIndexInverseTransform,$a=R.MapARGB,Wc=R.VP8LColorIndexInverseTransformAlpha,Vc=R.MapAlpha,es=R.VP8LPredictorsAdd=[];es.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var Gs,Jr,Rr,ts,Pi,Ei,Ha,Ii,Kt,ul,Br,kn,Wa,Gc,dl,Ys,Ks,rs,Js,Va,Xs,ns,hl,jn,Sn,Ct,_t,Jt,lr=s(511),Fi=s(2041),fl=s(225),Ga=s(767),Yc=0,_0=Fi,Kc=fl,cn=Ga,An=lr,Jc=0,Xc=1,n1=2,Qc=3,Zc=4,P0=5,i1=6,E0=7,I0=8,eu=9,F0=10,my=[2,3,7],xy=[3,3,11],s1=[280,256,256,256,40],yy=[0,1,1,1,0],vy=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],by=[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],wy=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Ny=8,T0=[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],O0=[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],pl=null,ky=[[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]],jy=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],a1=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Sy=[[[[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]]]],Ay=[[[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]]],Ly=[[[[255,255,255,255,255,255,255,255,255,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]]]],Cy=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],is=[],$n=[],Ti=[],_y=1,o1=2,ss=[],Ln=[];Ne("UpsampleRgbLinePair",pt,3),Ne("UpsampleBgrLinePair",Dt,3),Ne("UpsampleRgbaLinePair",Un,4),Ne("UpsampleBgraLinePair",hr,4),Ne("UpsampleArgbLinePair",Lr,4),Ne("UpsampleRgba4444LinePair",rr,2),Ne("UpsampleRgb565LinePair",$t,2);var Py=R.UpsampleRgbLinePair,Ey=R.UpsampleBgrLinePair,l1=R.UpsampleRgbaLinePair,c1=R.UpsampleBgraLinePair,u1=R.UpsampleArgbLinePair,d1=R.UpsampleRgba4444LinePair,Iy=R.UpsampleRgb565LinePair,tu=16,ru=1<<tu-1,gl=-227,M0=482,h1=6,Fy=(256<<h1)-1,f1=0,Ty=s(256),Oy=s(256),My=s(256),Dy=s(256),Ry=s(M0-gl),By=s(M0-gl);fi("YuvToRgbRow",pt,3),fi("YuvToBgrRow",Dt,3),fi("YuvToRgbaRow",Un,4),fi("YuvToBgraRow",hr,4),fi("YuvToArgbRow",Lr,4),fi("YuvToRgba4444Row",rr,2),fi("YuvToRgb565Row",$t,2);var p1=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],nu=[0,2,8],qy=[8,7,6,4,4,2,2,2,1,1,1,1],zy=1;this.WebPDecodeRGBA=function(c,d,g,v,S){var C=Xc,_=new Ma,E=new On;_.ba=E,E.S=C,E.width=[E.width],E.height=[E.height];var O=E.width,U=E.height,re=new Ai;if(re==null||c==null)var pe=2;else t(re!=null),pe=Ra(c,d,g,re.width,re.height,re.Pd,re.Qd,re.format,null);if(pe!=0?O=0:(O!=null&&(O[0]=re.width[0]),U!=null&&(U[0]=re.height[0]),O=1),O){E.width=E.width[0],E.height=E.height[0],v!=null&&(v[0]=E.width),S!=null&&(S[0]=E.height);e:{if(v=new _a,(S=new el).data=c,S.w=d,S.ha=g,S.kd=1,d=[0],t(S!=null),((c=Ra(S.data,S.w,S.ha,null,null,null,d,null,S))==0||c==7)&&d[0]&&(c=4),(d=c)==0){if(t(_!=null),v.data=S.data,v.w=S.w+S.offset,v.ha=S.ha-S.offset,v.put=ai,v.ac=vr,v.bc=oi,v.ma=_,S.xa){if((c=wn())==null){_=1;break e}if(function(ge,ce){var Le=[0],be=[0],ne=[0];t:for(;;){if(ge==null)return 0;if(ce==null)return ge.a=2,0;if(ge.l=ce,ge.a=0,W(ge.m,ce.data,ce.w,ce.ha),!Ze(ge.m,Le,be,ne)){ge.a=3;break t}if(ge.xb=o1,ce.width=Le[0],ce.height=be[0],!ui(Le[0],be[0],1,ge,null))break t;return 1}return t(ge.a!=0),0}(c,v)){if(v=(d=Ba(v.width,v.height,_.Oa,_.ba))==0){t:{v=c;r:for(;;){if(v==null){v=0;break t}if(t(v.s.yc!=null),t(v.s.Ya!=null),t(0<v.s.Wb),t((g=v.l)!=null),t((S=g.ma)!=null),v.xb!=0){if(v.ca=S.ba,v.tb=S.tb,t(v.ca!=null),!al(S.Oa,g,Qc)){v.a=2;break r}if(!Us(v,g.width)||g.da)break r;if((g.da||yt(v.ca.S))&&fe(),11>v.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),v.ca.f.kb.F!=null&&fe()),v.Pb&&0<v.s.ua&&v.s.vb.X==null&&!We(v.s.vb,v.s.Wa.Xa)){v.a=1;break r}v.xb=0}if(!Bn(v,v.V,v.Ba,v.c,v.i,g.o,ka))break r;S.Dc=v.Ma,v=1;break t}t(v.a!=0),v=0}v=!v}v&&(d=c.a)}else d=c.a}else{if((c=new c0)==null){_=1;break e}if(c.Fa=S.na,c.P=S.P,c.qc=S.Sa,Cc(c,v)){if((d=Ba(v.width,v.height,_.Oa,_.ba))==0){if(c.Aa=0,g=_.Oa,t((S=c)!=null),g!=null){if(0<(O=0>(O=g.Md)?0:100<O?255:255*O/100)){for(U=re=0;4>U;++U)12>(pe=S.pb[U]).lc&&(pe.ia=O*qy[0>pe.lc?0:pe.lc]>>3),re|=pe.ia;re&&(alert("todo:VP8InitRandom"),S.ia=1)}S.Ga=g.Id,100<S.Ga?S.Ga=100:0>S.Ga&&(S.Ga=0)}u0(c,v)||(d=c.a)}}else d=c.a}d==0&&_.Oa!=null&&_.Oa.fd&&(d=ol(_.ba))}_=d}C=_!=0?null:11>C?E.f.RGBA.eb:E.f.kb.y}else C=null;return C};var g1=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(R,Z){for(var G="",P=0;P<4;P++)G+=String.fromCharCode(R[Z++]);return G}function x(R,Z){return(R[Z+0]<<0|R[Z+1]<<8|R[Z+2]<<16)>>>0}function m(R,Z){return(R[Z+0]<<0|R[Z+1]<<8|R[Z+2]<<16|R[Z+3]<<24)>>>0}new u;var y=[0],p=[0],N=[],k=new u,M=e,b=function(R,Z){var G={},P=0,I=!1,Y=0,F=0;if(G.frames=[],!function(T,B,K,ee){for(var z=0;z<ee;z++)if(T[B+z]!=K.charCodeAt(z))return!0;return!1}(R,Z,"RIFF",4)){var de,ie;for(m(R,Z+=4),Z+=8;Z<R.length;){var he=h(R,Z),W=m(R,Z+=4);Z+=4;var te=W+(1&W);switch(he){case"VP8 ":case"VP8L":G.frames[P]===void 0&&(G.frames[P]={}),(j=G.frames[P]).src_off=I?F:Z-8,j.src_size=Y+W+8,P++,I&&(I=!1,Y=0,F=0);break;case"VP8X":(j=G.header={}).feature_flags=R[Z];var se=Z+4;j.canvas_width=1+x(R,se),se+=3,j.canvas_height=1+x(R,se),se+=3;break;case"ALPH":I=!0,Y=te+8,F=Z-8;break;case"ANIM":(j=G.header).bgcolor=m(R,Z),se=Z+4,j.loop_count=(de=R)[(ie=se)+0]<<0|de[ie+1]<<8,se+=2;break;case"ANMF":var ye,j;(j=G.frames[P]={}).offset_x=2*x(R,Z),Z+=3,j.offset_y=2*x(R,Z),Z+=3,j.width=1+x(R,Z),Z+=3,j.height=1+x(R,Z),Z+=3,j.duration=x(R,Z),Z+=3,ye=R[Z++],j.dispose=1&ye,j.blend=ye>>1&1}he!="ANMF"&&(Z+=te)}return G}}(M,0);b.response=M,b.rgbaoutput=!0,b.dataurl=!1;var w=b.header?b.header:null,L=b.frames?b.frames:null;if(w){w.loop_counter=w.loop_count,y=[w.canvas_height],p=[w.canvas_width];for(var $=0;$<L.length&&L[$].blend!=0;$++);}var J=L[0],le=k.WebPDecodeRGBA(M,J.src_off,J.src_size,p,y);J.rgba=le,J.imgwidth=p[0],J.imgheight=y[0];for(var D=0;D<p[0]*y[0]*4;D++)N[D]=le[D];return this.width=p,this.height=y,this.data=N,this}(function(e){var t=function(){return typeof Df=="function"},r=function(y,p,N,k){var M=4,b=a;switch(k){case e.image_compression.FAST:M=1,b=s;break;case e.image_compression.MEDIUM:M=6,b=l;break;case e.image_compression.SLOW:M=9,b=u}y=n(y,p,N,b);var w=Df(y,{level:M});return e.__addimage__.arrayBufferToBinaryString(w)},n=function(y,p,N,k){for(var M,b,w,L=y.length/p,$=new Uint8Array(y.length+L),J=x(),le=0;le<L;le+=1){if(w=le*p,M=y.subarray(w,w+p),k)$.set(k(M,N,b),w+le);else{for(var D,R=J.length,Z=[];D<R;D+=1)Z[D]=J[D](M,N,b);var G=m(Z.concat());$.set(Z[G],w+le)}b=M}return $},i=function(y){var p=Array.apply([],y);return p.unshift(0),p},s=function(y,p){var N,k=[],M=y.length;k[0]=1;for(var b=0;b<M;b+=1)N=y[b-p]||0,k[b+1]=y[b]-N+256&255;return k},a=function(y,p,N){var k,M=[],b=y.length;M[0]=2;for(var w=0;w<b;w+=1)k=N&&N[w]||0,M[w+1]=y[w]-k+256&255;return M},l=function(y,p,N){var k,M,b=[],w=y.length;b[0]=3;for(var L=0;L<w;L+=1)k=y[L-p]||0,M=N&&N[L]||0,b[L+1]=y[L]+256-(k+M>>>1)&255;return b},u=function(y,p,N){var k,M,b,w,L=[],$=y.length;L[0]=4;for(var J=0;J<$;J+=1)k=y[J-p]||0,M=N&&N[J]||0,b=N&&N[J-p]||0,w=h(k,M,b),L[J+1]=y[J]-w+256&255;return L},h=function(y,p,N){if(y===p&&p===N)return y;var k=Math.abs(p-N),M=Math.abs(y-N),b=Math.abs(y+p-N-N);return k<=M&&k<=b?y:M<=b?p:N},x=function(){return[i,s,a,l,u]},m=function(y){var p=y.map(function(N){return N.reduce(function(k,M){return k+Math.abs(M)},0)});return p.indexOf(Math.min.apply(null,p))};e.processPNG=function(y,p,N,k){var M,b,w,L,$,J,le,D,R,Z,G,P,I,Y,F,de=this.decode.FLATE_DECODE,ie="";if(this.__addimage__.isArrayBuffer(y)&&(y=new Uint8Array(y)),this.__addimage__.isArrayBufferView(y)){if(y=(w=new nN(y)).imgData,b=w.bits,M=w.colorSpace,$=w.colors,[4,6].indexOf(w.colorType)!==-1){if(w.bits===8){R=(D=w.pixelBitlength==32?new Uint32Array(w.decodePixels().buffer):w.pixelBitlength==16?new Uint16Array(w.decodePixels().buffer):new Uint8Array(w.decodePixels().buffer)).length,G=new Uint8Array(R*w.colors),Z=new Uint8Array(R);var he,W=w.pixelBitlength-w.bits;for(Y=0,F=0;Y<R;Y++){for(I=D[Y],he=0;he<W;)G[F++]=I>>>he&255,he+=w.bits;Z[Y]=I>>>he&255}}if(w.bits===16){R=(D=new Uint32Array(w.decodePixels().buffer)).length,G=new Uint8Array(R*(32/w.pixelBitlength)*w.colors),Z=new Uint8Array(R*(32/w.pixelBitlength)),P=w.colors>1,Y=0,F=0;for(var te=0;Y<R;)I=D[Y++],G[F++]=I>>>0&255,P&&(G[F++]=I>>>16&255,I=D[Y++],G[F++]=I>>>0&255),Z[te++]=I>>>16&255;b=8}k!==e.image_compression.NONE&&t()?(y=r(G,w.width*w.colors,w.colors,k),le=r(Z,w.width,1,k)):(y=G,le=Z,de=void 0)}if(w.colorType===3&&(M=this.color_spaces.INDEXED,J=w.palette,w.transparency.indexed)){var se=w.transparency.indexed,ye=0;for(Y=0,R=se.length;Y<R;++Y)ye+=se[Y];if((ye/=255)===R-1&&se.indexOf(0)!==-1)L=[se.indexOf(0)];else if(ye!==R){for(D=w.decodePixels(),Z=new Uint8Array(D.length),Y=0,R=D.length;Y<R;Y++)Z[Y]=se[D[Y]];le=r(Z,w.width,1)}}var j=function(T){var B;switch(T){case e.image_compression.FAST:B=11;break;case e.image_compression.MEDIUM:B=13;break;case e.image_compression.SLOW:B=14;break;default:B=12}return B}(k);return de===this.decode.FLATE_DECODE&&(ie="/Predictor "+j+" "),ie+="/Colors "+$+" /BitsPerComponent "+b+" /Columns "+w.width,(this.__addimage__.isArrayBuffer(y)||this.__addimage__.isArrayBufferView(y))&&(y=this.__addimage__.arrayBufferToBinaryString(y)),(le&&this.__addimage__.isArrayBuffer(le)||this.__addimage__.isArrayBufferView(le))&&(le=this.__addimage__.arrayBufferToBinaryString(le)),{alias:N,data:y,index:p,filter:de,decodeParameters:ie,transparency:L,palette:J,sMask:le,predictor:j,width:w.width,height:w.height,bitsPerComponent:b,colorSpace:M}}}})(et.API),function(e){e.processGIF89A=function(t,r,n,i){var s=new iN(t),a=s.width,l=s.height,u=[];s.decodeAndBlitFrameRGBA(0,u);var h={data:u,width:a,height:l},x=new Ph(100).encode(h,100);return e.processJPEG.call(this,x,r,n,i)},e.processGIF87A=e.processGIF89A}(et.API),Gn.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 e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:n,blue:r,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Gn.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(r){Lt.log("bit decode error:"+r)}},Gn.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var s=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+8*i*4,l=0;l<8&&8*i+l<this.width;l++){var u=this.palette[s>>7-l&1];this.data[a+4*l]=u.blue,this.data[a+4*l+1]=u.green,this.data[a+4*l+2]=u.red,this.data[a+4*l+3]=255}r!==0&&(this.pos+=4-r)}},Gn.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++){var s=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+2*i*4,l=s>>4,u=15&s,h=this.palette[l];if(this.data[a]=h.blue,this.data[a+1]=h.green,this.data[a+2]=h.red,this.data[a+3]=255,2*i+1>=this.width)break;h=this.palette[u],this.data[a+4]=h.blue,this.data[a+4+1]=h.green,this.data[a+4+2]=h.red,this.data[a+4+3]=255}t!==0&&(this.pos+=4-t)}},Gn.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+4*n;if(i<this.palette.length){var a=this.palette[i];this.data[s]=a.red,this.data[s+1]=a.green,this.data[s+2]=a.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}e!==0&&(this.pos+=4-e)}},Gn.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&t)/t*255|0,l=(s>>5&t)/t*255|0,u=(s>>10&t)/t*255|0,h=s>>15?255:0,x=n*this.width*4+4*i;this.data[x]=u,this.data[x+1]=l,this.data[x+2]=a,this.data[x+3]=h}this.pos+=e}},Gn.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,s=0;s<this.width;s++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(a&t)/t*255|0,u=(a>>5&r)/r*255|0,h=(a>>11)/t*255|0,x=i*this.width*4+4*s;this.data[x]=h,this.data[x+1]=u,this.data[x+2]=l,this.data[x+3]=255}this.pos+=e}},Gn.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*r;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=n,this.data[a+3]=255}this.pos+=this.width%4}},Gn.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=t*this.width*4+4*r;this.data[l]=s,this.data[l+1]=i,this.data[l+2]=n,this.data[l+3]=a}},Gn.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,r,n,i){var s=new Gn(t,!1),a=s.width,l=s.height,u={data:s.getData(),width:a,height:l},h=new Ph(100).encode(u,100);return e.processJPEG.call(this,h,r,n,i)}}(et.API),Sm.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,r,n,i){var s=new Sm(t),a=s.width,l=s.height,u={data:s.getData(),width:a,height:l},h=new Ph(100).encode(u,100);return e.processJPEG.call(this,h,r,n,i)}}(et.API),et.API.processRGBA=function(e,t,r){for(var n=e.data,i=n.length,s=new Uint8Array(i/4*3),a=new Uint8Array(i/4),l=0,u=0,h=0;h<i;h+=4){var x=n[h],m=n[h+1],y=n[h+2],p=n[h+3];s[l++]=x,s[l++]=m,s[l++]=y,a[u++]=p}var N=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:N,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},et.API.setLanguage=function(e){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"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,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},to=et.API,Tu=to.getCharWidthsArray=function(e,t){var r,n,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),a=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:i.metadata.Unicode.widths,u=l.fof?l.fof:1,h=t.kerning?t.kerning:i.metadata.Unicode.kerning,x=h.fof?h.fof:1,m=t.doKerning!==!1,y=0,p=e.length,N=0,k=l[0]||u,M=[];for(r=0;r<p;r++)n=e.charCodeAt(r),typeof i.metadata.widthOfString=="function"?M.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+a*(1e3/s)||0)/1e3):(y=m&&Nt(h[n])==="object"&&!isNaN(parseInt(h[n][N],10))?h[n][N]/x:0,M.push((l[n]||k)/u+y)),N=n;return M},wm=to.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return to.processArabic&&(e=to.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,r,i)/r:Tu.apply(this,arguments).reduce(function(s,a){return s+a},0)},Nm=function(e,t,r,n){for(var i=[],s=0,a=e.length,l=0;s!==a&&l+t[s]<r;)l+=t[s],s++;i.push(e.slice(0,s));var u=s;for(l=0;s!==a;)l+t[s]>n&&(i.push(e.slice(u,s)),l=0,u=s),l+=t[s],s++;return u!==s&&i.push(e.slice(u,s)),i},km=function(e,t,r){r||(r={});var n,i,s,a,l,u,h,x=[],m=[x],y=r.textIndent||0,p=0,N=0,k=e.split(" "),M=Tu.apply(this,[" ",r])[0];if(u=r.lineIndent===-1?k[0].length+2:r.lineIndent||0){var b=Array(u).join(" "),w=[];k.map(function($){($=$.split(/\s*\n/)).length>1?w=w.concat($.map(function(J,le){return(le&&J.length?`
`:"")+J})):w.push($[0])}),k=w,u=wm.apply(this,[b,r])}for(s=0,a=k.length;s<a;s++){var L=0;if(n=k[s],u&&n[0]==`
`&&(n=n.substr(1),L=1),y+p+(N=(i=Tu.apply(this,[n,r])).reduce(function($,J){return $+J},0))>t||L){if(N>t){for(l=Nm.apply(this,[n,i,t-(y+p),t]),x.push(l.shift()),x=[l.pop()];l.length;)m.push([l.shift()]);N=i.slice(n.length-(x[0]?x[0].length:0)).reduce(function($,J){return $+J},0)}else x=[n];m.push(x),y=N+u,p=M}else x.push(n),y+=p+N,p=M}return h=u?function($,J){return(J?b:"")+$.join(" ")}:function($){return $.join(" ")},m.map(h)},to.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),s=(function(x){if(x.widths&&x.kerning)return{widths:x.widths,kerning:x.kerning};var m=this.internal.getFont(x.fontName,x.fontStyle);return m.metadata.Unicode?{widths:m.metadata.Unicode.widths||{0:1},kerning:m.metadata.Unicode.kerning||{}}:{font:m.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var a=1*this.internal.scaleFactor*t/i;s.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=r.lineIndent;var l,u,h=[];for(l=0,u=n.length;l<u;l++)h=h.concat(km.apply(this,[n[l],a,s]));return h},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",r={},n={},i=0;i<t.length;i++)r[t[i]]="0123456789abcdef"[i],n["0123456789abcdef"[i]]=t[i];var s=function(m){return"0x"+parseInt(m,10).toString(16)},a=e.__fontmetrics__.compress=function(m){var y,p,N,k,M=["{"];for(var b in m){if(y=m[b],isNaN(parseInt(b,10))?p="'"+b+"'":(b=parseInt(b,10),p=(p=s(b).slice(2)).slice(0,-1)+n[p.slice(-1)]),typeof y=="number")y<0?(N=s(y).slice(3),k="-"):(N=s(y).slice(2),k=""),N=k+N.slice(0,-1)+n[N.slice(-1)];else{if(Nt(y)!=="object")throw new Error("Don't know what to do with value type "+Nt(y)+".");N=a(y)}M.push(p+N)}return M.push("}"),M.join("")},l=e.__fontmetrics__.uncompress=function(m){if(typeof m!="string")throw new Error("Invalid argument passed to uncompress.");for(var y,p,N,k,M={},b=1,w=M,L=[],$="",J="",le=m.length-1,D=1;D<le;D+=1)(k=m[D])=="'"?y?(N=y.join(""),y=void 0):y=[]:y?y.push(k):k=="{"?(L.push([w,N]),w={},N=void 0):k=="}"?((p=L.pop())[0][p[1]]=w,N=void 0,w=p[0]):k=="-"?b=-1:N===void 0?r.hasOwnProperty(k)?($+=r[k],N=parseInt($,16)*b,b=1,$=""):$+=k:r.hasOwnProperty(k)?(J+=r[k],w[N]=parseInt(J,16)*b,b=1,N=void 0,J=""):J+=k;return M},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},x={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'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":l("{'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:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'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:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'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":l("{'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:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'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":l("{'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":l("{'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}}}")}};e.events.push(["addFont",function(m){var y=m.font,p=x.Unicode[y.postScriptName];p&&(y.metadata.Unicode={},y.metadata.Unicode.widths=p.widths,y.metadata.Unicode.kerning=p.kerning);var N=h.Unicode[y.postScriptName];N&&(y.metadata.Unicode.encoding=N,y.encoding=N.codePages[0])}])}(et.API),function(e){var t=function(r){for(var n=r.length,i=new Uint8Array(n),s=0;s<n;s++)i[s]=r.charCodeAt(s);return i};e.API.events.push(["addFont",function(r){var n=void 0,i=r.font,s=r.instance;if(!i.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=s.existsFileInVFS(i.postScriptName)===!1?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(a,l){l=/^\x00\x01\x00\x00/.test(l)?t(l):t(Gl(l)),a.metadata=e.API.TTFFont.open(l),a.metadata.Unicode=a.metadata.Unicode||{encoding:{},kerning:{},widths:[]},a.metadata.glyIdsUsed=[0]})(i,n)}}])}(et),function(e){function t(){return(tt.canvg?Promise.resolve(tt.canvg):If(()=>import("./index.es-arx4Dd42.js"),[])).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}et.API.addSvgAsImage=function(r,n,i,s,a,l,u,h){if(isNaN(n)||isNaN(i))throw Lt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(s)||isNaN(a))throw Lt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var x=document.createElement("canvas");x.width=s,x.height=a;var m=x.getContext("2d");m.fillStyle="#fff",m.fillRect(0,0,x.width,x.height);var y={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return t().then(function(N){return N.fromString(m,r,y)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(N){return N.render(y)}).then(function(){p.addImage(x.toDataURL("image/jpeg",1),n,i,s,a,u,h)})}}(),et.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(t,r);return this},et.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,i,s,a={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}},l=Object.keys(a),u=[],h=0,x=0,m=0;function y(N,k){var M,b=!1;for(M=0;M<N.length;M+=1)N[M]===k&&(b=!0);return b}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var p=l.length;for(m=0;m<p;m+=1)r[l[m]].value=r[l[m]].defaultValue,r[l[m]].explicitSet=!1}if(Nt(e)==="object"){for(i in e)if(s=e[i],y(l,i)&&s!==void 0){if(r[i].type==="boolean"&&typeof s=="boolean")r[i].value=s;else if(r[i].type==="name"&&y(r[i].valueSet,s))r[i].value=s;else if(r[i].type==="integer"&&Number.isInteger(s))r[i].value=s;else if(r[i].type==="array"){for(h=0;h<s.length;h+=1)if(n=!0,s[h].length===1&&typeof s[h][0]=="number")u.push(String(s[h]-1));else if(s[h].length>1){for(x=0;x<s[h].length;x+=1)typeof s[h][x]!="number"&&(n=!1);n===!0&&u.push([s[h][0]-1,s[h][1]-1].join(" "))}r[i].value="["+u.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var N,k=[];for(N in r)r[N].explicitSet===!0&&(r[N].type==="name"?k.push("/"+N+" /"+r[N].value):k.push("/"+N+" "+r[N].value));k.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+k.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},function(e){var t=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),s=unescape(encodeURIComponent(n)),a=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),l=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),u=unescape(encodeURIComponent("</x:xmpmeta>")),h=s.length+a.length+l.length+i.length+u.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+h+" >>"),this.internal.write("stream"),this.internal.write(i+s+a+l+u),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(n,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",t)),this}}(et.API),function(e){var t=e.API,r=t.pdfEscape16=function(s,a){for(var l,u=a.metadata.Unicode.widths,h=["","0","00","000","0000"],x=[""],m=0,y=s.length;m<y;++m){if(l=a.metadata.characterToGlyph(s.charCodeAt(m)),a.metadata.glyIdsUsed.push(l),a.metadata.toUnicode[l]=s.charCodeAt(m),u.indexOf(l)==-1&&(u.push(l),u.push([parseInt(a.metadata.widthOfGlyph(l),10)])),l=="0")return x.join("");l=l.toString(16),x.push(h[4-l.length],l)}return x.join("")},n=function(s){var a,l,u,h,x,m,y;for(x=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,u=[],m=0,y=(l=Object.keys(s).sort(function(p,N){return p-N})).length;m<y;m++)a=l[m],u.length>=100&&(x+=`
`+u.length+` beginbfchar
`+u.join(`
`)+`
endbfchar`,u=[]),s[a]!==void 0&&s[a]!==null&&typeof s[a].toString=="function"&&(h=("0000"+s[a].toString(16)).slice(-4),a=("0000"+(+a).toString(16)).slice(-4),u.push("<"+a+"><"+h+">"));return u.length&&(x+=`
`+u.length+` beginbfchar
`+u.join(`
`)+`
endbfchar
`),x+=`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(s){(function(a){var l=a.font,u=a.out,h=a.newObject,x=a.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="Identity-H"){for(var m=l.metadata.Unicode.widths,y=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",N=0;N<y.length;N++)p+=String.fromCharCode(y[N]);var k=h();x({data:p,addLength1:!0,objectId:k}),u("endobj");var M=h();x({data:n(l.metadata.toUnicode),addLength1:!0,objectId:M}),u("endobj");var b=h();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+io(l.fontName)),u("/FontFile2 "+k+" 0 R"),u("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),u("/Flags "+l.metadata.flags),u("/StemV "+l.metadata.stemV),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u(">>"),u("endobj");var w=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+io(l.fontName)),u("/FontDescriptor "+b+" 0 R"),u("/W "+e.API.PDFObject.convert(m)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+l.encoding+")"),u(">>"),u(">>"),u("endobj"),l.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+M+" 0 R"),u("/BaseFont /"+io(l.fontName)),u("/Encoding /"+l.encoding),u("/DescendantFonts ["+w+" 0 R]"),u(">>"),u("endobj"),l.isAlreadyPutted=!0}})(s)}]),t.events.push(["putFont",function(s){(function(a){var l=a.font,u=a.out,h=a.newObject,x=a.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var m=l.metadata.rawData,y="",p=0;p<m.length;p++)y+=String.fromCharCode(m[p]);var N=h();x({data:y,addLength1:!0,objectId:N}),u("endobj");var k=h();x({data:n(l.metadata.toUnicode),addLength1:!0,objectId:k}),u("endobj");var M=h();u("<<"),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u("/StemV "+l.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+N+" 0 R"),u("/Flags 96"),u("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),u("/FontName /"+io(l.fontName)),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u(">>"),u("endobj"),l.objectNumber=h();for(var b=0;b<l.metadata.hmtx.widths.length;b++)l.metadata.hmtx.widths[b]=parseInt(l.metadata.hmtx.widths[b]*(1e3/l.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+k+" 0 R/BaseFont/"+io(l.fontName)+"/FontDescriptor "+M+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),u("endobj"),l.isAlreadyPutted=!0}})(s)}]);var i=function(s){var a,l=s.text||"",u=s.x,h=s.y,x=s.options||{},m=s.mutex||{},y=m.pdfEscape,p=m.activeFontKey,N=m.fonts,k=p,M="",b=0,w="",L=N[k].encoding;if(N[k].encoding!=="Identity-H")return{text:l,x:u,y:h,options:x,mutex:m};for(w=l,k=p,Array.isArray(l)&&(w=l[0]),b=0;b<w.length;b+=1)N[k].metadata.hasOwnProperty("cmap")&&(a=N[k].metadata.cmap.unicode.codeMap[w[b].charCodeAt(0)]),a||w[b].charCodeAt(0)<256&&N[k].metadata.hasOwnProperty("Unicode")?M+=w[b]:M+="";var $="";return parseInt(k.slice(1))<14||L==="WinAnsiEncoding"?$=y(M,k).split("").map(function(J){return J.charCodeAt(0).toString(16)}).join(""):L==="Identity-H"&&($=r(M,N[k])),m.isHex=!0,{text:$,x:u,y:h,options:x,mutex:m}};t.events.push(["postProcessText",function(s){var a=s.text||"",l=[],u={text:a,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(a)){var h=0;for(h=0;h<a.length;h+=1)Array.isArray(a[h])&&a[h].length===3?l.push([i(Object.assign({},u,{text:a[h][0]})).text,a[h][1],a[h][2]]):l.push(i(Object.assign({},u,{text:a[h]})).text);s.text=l}else s.text=i(Object.assign({},u,{text:a})).text}])}(et),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0},e.addFileToVFS=function(r,n){return t.call(this),this.internal.vFS[r]=n,this},e.getFileFromVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}}(et.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var i,s,a,l,u,h,x,m=t,y=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],N={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},k={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},M=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],b=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)$/),w=!1,L=0;this.__bidiEngine__={};var $=function(P){var I=P.charCodeAt(),Y=I>>8,F=k[Y];return F!==void 0?m[256*F+(255&I)]:Y===252||Y===253?"AL":b.test(Y)?"L":Y===8?"R":"N"},J=function(P){for(var I,Y=0;Y<P.length;Y++){if((I=$(P.charAt(Y)))==="L")return!1;if(I==="R")return!0}return!1},le=function(P,I,Y,F){var de,ie,he,W,te=I[F];switch(te){case"L":case"R":w=!1;break;case"N":case"AN":break;case"EN":w&&(te="AN");break;case"AL":w=!0,te="R";break;case"WS":te="N";break;case"CS":F<1||F+1>=I.length||(de=Y[F-1])!=="EN"&&de!=="AN"||(ie=I[F+1])!=="EN"&&ie!=="AN"?te="N":w&&(ie="AN"),te=ie===de?ie:"N";break;case"ES":te=(de=F>0?Y[F-1]:"B")==="EN"&&F+1<I.length&&I[F+1]==="EN"?"EN":"N";break;case"ET":if(F>0&&Y[F-1]==="EN"){te="EN";break}if(w){te="N";break}for(he=F+1,W=I.length;he<W&&I[he]==="ET";)he++;te=he<W&&I[he]==="EN"?"EN":"N";break;case"NSM":if(a&&!l){for(W=I.length,he=F+1;he<W&&I[he]==="NSM";)he++;if(he<W){var se=P[F],ye=se>=1425&&se<=2303||se===64286;if(de=I[he],ye&&(de==="R"||de==="AL")){te="R";break}}}te=F<1||(de=I[F-1])==="B"?"N":Y[F-1];break;case"B":w=!1,i=!0,te=L;break;case"S":s=!0,te="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":w=!1;break;case"BN":te="N"}return te},D=function(P,I,Y){var F=P.split("");return Y&&R(F,Y,{hiLevel:L}),F.reverse(),I&&I.reverse(),F.join("")},R=function(P,I,Y){var F,de,ie,he,W,te=-1,se=P.length,ye=0,j=[],T=L?p:y,B=[];for(w=!1,i=!1,s=!1,de=0;de<se;de++)B[de]=$(P[de]);for(ie=0;ie<se;ie++){if(W=ye,j[ie]=le(P,B,j,ie),F=240&(ye=T[W][N[j[ie]]]),ye&=15,I[ie]=he=T[ye][5],F>0)if(F===16){for(de=te;de<ie;de++)I[de]=1;te=-1}else te=-1;if(T[ye][6])te===-1&&(te=ie);else if(te>-1){for(de=te;de<ie;de++)I[de]=he;te=-1}B[ie]==="B"&&(I[ie]=0),Y.hiLevel|=he}s&&function(K,ee,z){for(var X=0;X<z;X++)if(K[X]==="S"){ee[X]=L;for(var ae=X-1;ae>=0&&K[ae]==="WS";ae--)ee[ae]=L}}(B,I,se)},Z=function(P,I,Y,F,de){if(!(de.hiLevel<P)){if(P===1&&L===1&&!i)return I.reverse(),void(Y&&Y.reverse());for(var ie,he,W,te,se=I.length,ye=0;ye<se;){if(F[ye]>=P){for(W=ye+1;W<se&&F[W]>=P;)W++;for(te=ye,he=W-1;te<he;te++,he--)ie=I[te],I[te]=I[he],I[he]=ie,Y&&(ie=Y[te],Y[te]=Y[he],Y[he]=ie);ye=W}ye++}}},G=function(P,I,Y){var F=P.split(""),de={hiLevel:L};return Y||(Y=[]),R(F,Y,de),function(ie,he,W){if(W.hiLevel!==0&&x)for(var te,se=0;se<ie.length;se++)he[se]===1&&(te=M.indexOf(ie[se]))>=0&&(ie[se]=M[te+1])}(F,Y,de),Z(2,F,I,Y,de),Z(1,F,I,Y,de),F.join("")};return this.__bidiEngine__.doBidiReorder=function(P,I,Y){if(function(de,ie){if(ie)for(var he=0;he<de.length;he++)ie[he]=he;l===void 0&&(l=J(de)),h===void 0&&(h=J(de))}(P,I),a||!u||h)if(a&&u&&l^h)L=l?1:0,P=D(P,I,Y);else if(!a&&u&&h)L=l?1:0,P=G(P,I,Y),P=D(P,I);else if(!a||l||u||h){if(a&&!u&&l^h)P=D(P,I),l?(L=0,P=G(P,I,Y)):(L=1,P=G(P,I,Y),P=D(P,I));else if(a&&l&&!u&&h)L=1,P=G(P,I,Y),P=D(P,I);else if(!a&&!u&&l^h){var F=x;l?(L=1,P=G(P,I,Y),L=0,x=!1,P=G(P,I,Y),x=F):(L=0,P=G(P,I,Y),P=D(P,I),L=1,x=!1,P=G(P,I,Y),x=F,P=D(P,I))}}else L=0,P=G(P,I,Y);else L=l?1:0,P=G(P,I,Y);return P},this.__bidiEngine__.setOptions=function(P){P&&(a=P.isInputVisual,u=P.isOutputVisual,l=P.isInputRtl,h=P.isOutputRtl,x=P.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(n){var i=n.text,s=(n.x,n.y,n.options||{}),a=(n.mutex,s.lang,[]);if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,r.setOptions(s),Object.prototype.toString.call(i)==="[object Array]"){var l=0;for(a=[],l=0;l<i.length;l+=1)Object.prototype.toString.call(i[l])==="[object Array]"?a.push([r.doBidiReorder(i[l][0]),i[l][1],i[l][2]]):a.push([r.doBidiReorder(i[l])]);n.text=a}else n.text=r.doBidiReorder(i);r.setOptions({isInputVisual:!0})}])}(et),et.API.TTFFont=function(){function e(t){var r;if(this.rawData=t,r=this.contents=new Os(t),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new vN(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new sN(this.contents),this.head=new oN(this),this.name=new hN(this),this.cmap=new sy(this),this.toUnicode={},this.hhea=new lN(this),this.maxp=new fN(this),this.hmtx=new pN(this),this.post=new uN(this),this.os2=new cN(this),this.loca=new yN(this),this.glyf=new gN(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]},e.prototype.registerTTF=function(){var t,r,n,i,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var a,l,u,h;for(h=[],a=0,l=(u=this.bbox).length;a<l;a++)t=u[a],h.push(Math.round(t*this.scaleFactor));return h}).call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),32768&(r=i>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===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")},e.prototype.characterToGlyph=function(t){var r;return((r=this.cmap.unicode)!=null?r.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},e.prototype.widthOfString=function(t,r,n){var i,s,a,l;for(a=0,s=0,l=(t=""+t).length;0<=l?s<l:s>l;s=0<=l?++s:--s)i=t.charCodeAt(s),a+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/r)||0;return a*(r/1e3)},e.prototype.lineHeight=function(t,r){var n;return r==null&&(r=!1),n=r?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},e}();var ii,Os=function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var r,n;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n[r]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(t){var r,n,i;for(i=[],r=0,n=t.length;0<=n?r<n:r>n;r=0<=n?++r:--r)i.push(this.writeByte(t.charCodeAt(r)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,r,n,i,s,a,l,u;return t=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),l=this.readByte(),u=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^s)+65536*(255^a)+256*(255^l)+(255^u)+1):72057594037927940*t+281474976710656*r+1099511627776*n+4294967296*i+16777216*s+65536*a+256*l+u},e.prototype.writeLongLong=function(t){var r,n;return r=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var r,n;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r.push(this.readByte());return r},e.prototype.write=function(t){var r,n,i,s;for(s=[],n=0,i=t.length;n<i;n++)r=t[n],s.push(this.writeByte(r));return s},e}(),sN=function(){var e;function t(r){var n,i,s;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},i=0,s=this.tableCount;0<=s?i<s:i>s;i=0<=s?++i:--i)n={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(r){var n,i,s,a,l,u,h,x,m,y,p,N,k;for(k in p=Object.keys(r).length,u=Math.log(2),m=16*Math.floor(Math.log(p)/u),a=Math.floor(m/u),x=16*p-m,(i=new Os).writeInt(this.scalarType),i.writeShort(p),i.writeShort(m),i.writeShort(a),i.writeShort(x),s=16*p,h=i.pos+s,l=null,N=[],r)for(y=r[k],i.writeString(k),i.writeInt(e(y)),i.writeInt(h),i.writeInt(y.length),N=N.concat(y),k==="head"&&(l=h),h+=y.length;h%4;)N.push(0),h++;return i.write(N),n=2981146554-e(i.data),i.pos=l+8,i.writeUInt32(n),i.data},e=function(r){var n,i,s,a;for(r=ay.call(r);r.length%4;)r.push(0);for(s=new Os(r),i=0,n=0,a=r.length;n<a;n=n+=4)i+=s.readUInt32();return 4294967295&i},t}(),aN={}.hasOwnProperty,Si=function(e,t){for(var r in t)aN.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};ii=function(){function e(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var oN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="head",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.revision=r.readInt(),this.checkSumAdjustment=r.readInt(),this.magicNumber=r.readInt(),this.flags=r.readShort(),this.unitsPerEm=r.readShort(),this.created=r.readLongLong(),this.modified=r.readLongLong(),this.xMin=r.readShort(),this.yMin=r.readShort(),this.xMax=r.readShort(),this.yMax=r.readShort(),this.macStyle=r.readShort(),this.lowestRecPPEM=r.readShort(),this.fontDirectionHint=r.readShort(),this.indexToLocFormat=r.readShort(),this.glyphDataFormat=r.readShort()},t.prototype.encode=function(r){var n;return(n=new Os).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(r),n.writeShort(this.glyphDataFormat),n.data},t}(),Am=function(){function e(t,r){var n,i,s,a,l,u,h,x,m,y,p,N,k,M,b,w,L;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),m=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=t.readByte();break;case 4:for(p=t.readUInt16(),y=p/2,t.pos+=6,s=function(){var $,J;for(J=[],u=$=0;0<=y?$<y:$>y;u=0<=y?++$:--$)J.push(t.readUInt16());return J}(),t.pos+=2,k=function(){var $,J;for(J=[],u=$=0;0<=y?$<y:$>y;u=0<=y?++$:--$)J.push(t.readUInt16());return J}(),h=function(){var $,J;for(J=[],u=$=0;0<=y?$<y:$>y;u=0<=y?++$:--$)J.push(t.readUInt16());return J}(),x=function(){var $,J;for(J=[],u=$=0;0<=y?$<y:$>y;u=0<=y?++$:--$)J.push(t.readUInt16());return J}(),i=(this.length-t.pos+this.offset)/2,l=function(){var $,J;for(J=[],u=$=0;0<=i?$<i:$>i;u=0<=i?++$:--$)J.push(t.readUInt16());return J}(),u=b=0,L=s.length;b<L;u=++b)for(M=s[u],n=w=N=k[u];N<=M?w<=M:w>=M;n=N<=M?++w:--w)x[u]===0?a=n+h[u]:(a=l[x[u]/2+(n-N)-(y-u)]||0)!==0&&(a+=h[u]),this.codeMap[n]=65535&a}t.pos=m}return e.encode=function(t,r){var n,i,s,a,l,u,h,x,m,y,p,N,k,M,b,w,L,$,J,le,D,R,Z,G,P,I,Y,F,de,ie,he,W,te,se,ye,j,T,B,K,ee,z,X,ae,ke,me,we;switch(F=new Os,a=Object.keys(t).sort(function(Pe,We){return Pe-We}),r){case"macroman":for(k=0,M=function(){var Pe=[];for(N=0;N<256;++N)Pe.push(0);return Pe}(),w={0:0},s={},de=0,te=a.length;de<te;de++)w[ae=t[i=a[de]]]==null&&(w[ae]=++k),s[i]={old:t[i],new:w[t[i]]},M[i]=w[t[i]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(M),{charMap:s,subtable:F.data,maxGlyphID:k+1};case"unicode":for(I=[],m=[],L=0,w={},n={},b=h=null,ie=0,se=a.length;ie<se;ie++)w[J=t[i=a[ie]]]==null&&(w[J]=++L),n[i]={old:J,new:w[J]},l=w[J]-i,b!=null&&l===h||(b&&m.push(b),I.push(i),h=l),b=i;for(b&&m.push(b),m.push(65535),I.push(65535),G=2*(Z=I.length),R=2*Math.pow(Math.log(Z)/Math.LN2,2),y=Math.log(R/2)/Math.LN2,D=2*Z-R,u=[],le=[],p=[],N=he=0,ye=I.length;he<ye;N=++he){if(P=I[N],x=m[N],P===65535){u.push(0),le.push(0);break}if(P-(Y=n[P].new)>=32768)for(u.push(0),le.push(2*(p.length+Z-N)),i=W=P;P<=x?W<=x:W>=x;i=P<=x?++W:--W)p.push(n[i].new);else u.push(Y-P),le.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*Z+2*p.length),F.writeUInt16(0),F.writeUInt16(G),F.writeUInt16(R),F.writeUInt16(y),F.writeUInt16(D),z=0,j=m.length;z<j;z++)i=m[z],F.writeUInt16(i);for(F.writeUInt16(0),X=0,T=I.length;X<T;X++)i=I[X],F.writeUInt16(i);for(ke=0,B=u.length;ke<B;ke++)l=u[ke],F.writeUInt16(l);for(me=0,K=le.length;me<K;me++)$=le[me],F.writeUInt16($);for(we=0,ee=p.length;we<ee;we++)k=p[we],F.writeUInt16(k);return{charMap:n,subtable:F.data,maxGlyphID:L+1}}},e}(),sy=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="cmap",t.prototype.parse=function(r){var n,i,s;for(r.pos=this.offset,this.version=r.readUInt16(),s=r.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=s?i<s:i>s;i=0<=s?++i:--i)n=new Am(r,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},t.encode=function(r,n){var i,s;return n==null&&(n="macroman"),i=Am.encode(r,n),(s=new Os).writeUInt16(0),s.writeUInt16(1),i.table=s.data.concat(i.subtable),i},t}(),lN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="hhea",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.ascender=r.readShort(),this.decender=r.readShort(),this.lineGap=r.readShort(),this.advanceWidthMax=r.readShort(),this.minLeftSideBearing=r.readShort(),this.minRightSideBearing=r.readShort(),this.xMaxExtent=r.readShort(),this.caretSlopeRise=r.readShort(),this.caretSlopeRun=r.readShort(),this.caretOffset=r.readShort(),r.pos+=8,this.metricDataFormat=r.readShort(),this.numberOfMetrics=r.readUInt16()},t}(),cN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="OS/2",t.prototype.parse=function(r){if(r.pos=this.offset,this.version=r.readUInt16(),this.averageCharWidth=r.readShort(),this.weightClass=r.readUInt16(),this.widthClass=r.readUInt16(),this.type=r.readShort(),this.ySubscriptXSize=r.readShort(),this.ySubscriptYSize=r.readShort(),this.ySubscriptXOffset=r.readShort(),this.ySubscriptYOffset=r.readShort(),this.ySuperscriptXSize=r.readShort(),this.ySuperscriptYSize=r.readShort(),this.ySuperscriptXOffset=r.readShort(),this.ySuperscriptYOffset=r.readShort(),this.yStrikeoutSize=r.readShort(),this.yStrikeoutPosition=r.readShort(),this.familyClass=r.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(r.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(r.readInt());return i}(),this.vendorID=r.readString(4),this.selection=r.readShort(),this.firstCharIndex=r.readShort(),this.lastCharIndex=r.readShort(),this.version>0&&(this.ascent=r.readShort(),this.descent=r.readShort(),this.lineGap=r.readShort(),this.winAscent=r.readShort(),this.winDescent=r.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(r.readInt());return i}(),this.version>1))return this.xHeight=r.readShort(),this.capHeight=r.readShort(),this.defaultChar=r.readShort(),this.breakChar=r.readShort(),this.maxContext=r.readShort()},t}(),uN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="post",t.prototype.parse=function(r){var n,i,s;switch(r.pos=this.offset,this.format=r.readInt(),this.italicAngle=r.readInt(),this.underlinePosition=r.readShort(),this.underlineThickness=r.readShort(),this.isFixedPitch=r.readInt(),this.minMemType42=r.readInt(),this.maxMemType42=r.readInt(),this.minMemType1=r.readInt(),this.maxMemType1=r.readInt(),this.format){case 65536:break;case 131072:var a;for(i=r.readUInt16(),this.glyphNameIndex=[],a=0;0<=i?a<i:a>i;a=0<=i?++a:--a)this.glyphNameIndex.push(r.readUInt16());for(this.names=[],s=[];r.pos<this.offset+this.length;)n=r.readByte(),s.push(this.names.push(r.readString(n)));return s;case 151552:return i=r.readUInt16(),this.offsets=r.read(i);case 196608:break;case 262144:return this.map=(function(){var l,u,h;for(h=[],a=l=0,u=this.file.maxp.numGlyphs;0<=u?l<u:l>u;a=0<=u?++l:--l)h.push(r.readUInt32());return h}).call(this)}},t}(),dN=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},hN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="name",t.prototype.parse=function(r){var n,i,s,a,l,u,h,x,m,y,p;for(r.pos=this.offset,r.readShort(),n=r.readShort(),u=r.readShort(),i=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)i.push({platformID:r.readShort(),encodingID:r.readShort(),languageID:r.readShort(),nameID:r.readShort(),length:r.readShort(),offset:this.offset+u+r.readShort()});for(h={},a=m=0,y=i.length;m<y;a=++m)s=i[a],r.pos=s.offset,x=r.readString(s.length),l=new dN(x,s),h[p=s.nameID]==null&&(h[p]=[]),h[s.nameID].push(l);this.strings=h,this.copyright=h[0],this.fontFamily=h[1],this.fontSubfamily=h[2],this.uniqueSubfamily=h[3],this.fontName=h[4],this.version=h[5];try{this.postscriptName=h[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=h[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=h[7],this.manufacturer=h[8],this.designer=h[9],this.description=h[10],this.vendorUrl=h[11],this.designerUrl=h[12],this.license=h[13],this.licenseUrl=h[14],this.preferredFamily=h[15],this.preferredSubfamily=h[17],this.compatibleFull=h[18],this.sampleText=h[19]},t}(),fN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="maxp",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.numGlyphs=r.readUInt16(),this.maxPoints=r.readUInt16(),this.maxContours=r.readUInt16(),this.maxCompositePoints=r.readUInt16(),this.maxComponentContours=r.readUInt16(),this.maxZones=r.readUInt16(),this.maxTwilightPoints=r.readUInt16(),this.maxStorage=r.readUInt16(),this.maxFunctionDefs=r.readUInt16(),this.maxInstructionDefs=r.readUInt16(),this.maxStackElements=r.readUInt16(),this.maxSizeOfInstructions=r.readUInt16(),this.maxComponentElements=r.readUInt16(),this.maxComponentDepth=r.readUInt16()},t}(),pN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="hmtx",t.prototype.parse=function(r){var n,i,s,a,l,u,h;for(r.pos=this.offset,this.metrics=[],n=0,u=this.file.hhea.numberOfMetrics;0<=u?n<u:n>u;n=0<=u?++n:--n)this.metrics.push({advance:r.readUInt16(),lsb:r.readInt16()});for(s=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var x,m;for(m=[],n=x=0;0<=s?x<s:x>s;n=0<=s?++x:--x)m.push(r.readInt16());return m}(),this.widths=(function(){var x,m,y,p;for(p=[],x=0,m=(y=this.metrics).length;x<m;x++)a=y[x],p.push(a.advance);return p}).call(this),i=this.widths[this.widths.length-1],h=[],n=l=0;0<=s?l<s:l>s;n=0<=s?++l:--l)h.push(this.widths.push(i));return h},t.prototype.forGlyph=function(r){return r in this.metrics?this.metrics[r]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[r-this.metrics.length]}},t}(),ay=[].slice,gN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(r){var n,i,s,a,l,u,h,x,m,y;return r in this.cache?this.cache[r]:(a=this.file.loca,n=this.file.contents,i=a.indexOf(r),(s=a.lengthOf(r))===0?this.cache[r]=null:(n.pos=this.offset+i,l=(u=new Os(n.read(s))).readShort(),x=u.readShort(),y=u.readShort(),h=u.readShort(),m=u.readShort(),this.cache[r]=l===-1?new xN(u,x,y,h,m):new mN(u,l,x,y,h,m),this.cache[r]))},t.prototype.encode=function(r,n,i){var s,a,l,u,h;for(l=[],a=[],u=0,h=n.length;u<h;u++)s=r[n[u]],a.push(l.length),s&&(l=l.concat(s.encode(i)));return a.push(l.length),{table:l,offsets:a}},t}(),mN=function(){function e(t,r,n,i,s,a){this.raw=t,this.numberOfContours=r,this.xMin=n,this.yMin=i,this.xMax=s,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),xN=function(){function e(t,r,n,i,s){var a,l;for(this.raw=t,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;l=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&l;)a.pos+=1&l?4:2,128&l?a.pos+=8:64&l?a.pos+=4:8&l&&(a.pos+=2)}return e.prototype.encode=function(){var t,r,n;for(r=new Os(ay.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)r.pos=this.glyphOffsets[t];return r.data},e}(),yN=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Si(t,ii),t.prototype.tag="loca",t.prototype.parse=function(r){var n,i;return r.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var s,a;for(a=[],i=0,s=this.length;i<s;i+=2)a.push(2*r.readUInt16());return a}).call(this):(function(){var s,a;for(a=[],i=0,s=this.length;i<s;i+=4)a.push(r.readUInt32());return a}).call(this)},t.prototype.indexOf=function(r){return this.offsets[r]},t.prototype.lengthOf=function(r){return this.offsets[r+1]-this.offsets[r]},t.prototype.encode=function(r,n){for(var i=new Uint32Array(this.offsets.length),s=0,a=0,l=0;l<i.length;++l)if(i[l]=s,a<n.length&&n[a]==l){++a,i[l]=s;var u=this.offsets[l],h=this.offsets[l+1]-u;h>0&&(s+=h)}for(var x=new Array(4*i.length),m=0;m<i.length;++m)x[4*m+3]=255&i[m],x[4*m+2]=(65280&i[m])>>8,x[4*m+1]=(16711680&i[m])>>16,x[4*m]=(4278190080&i[m])>>24;return x},t}(),vN=function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,r,n,i,s;for(r in i=this.font.cmap.tables[0].codeMap,t={},s=this.subset)n=s[r],t[r]=i[n];return t},e.prototype.glyphsFor=function(t){var r,n,i,s,a,l,u;for(i={},a=0,l=t.length;a<l;a++)i[s=t[a]]=this.font.glyf.glyphFor(s);for(s in r=[],i)(n=i[s])!=null&&n.compound&&r.push.apply(r,n.glyphIDs);if(r.length>0)for(s in u=this.glyphsFor(r))n=u[s],i[s]=n;return i},e.prototype.encode=function(t,r){var n,i,s,a,l,u,h,x,m,y,p,N,k,M,b;for(i in n=sy.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),p={0:0},b=n.charMap)p[(u=b[i]).old]=u.new;for(N in y=n.maxGlyphID,a)N in p||(p[N]=y++);return x=function(w){var L,$;for(L in $={},w)$[w[L]]=L;return $}(p),m=Object.keys(x).sort(function(w,L){return w-L}),k=function(){var w,L,$;for($=[],w=0,L=m.length;w<L;w++)l=m[w],$.push(x[l]);return $}(),s=this.font.glyf.encode(a,k,p),h=this.font.loca.encode(s.offsets,k),M={cmap:this.font.cmap.raw(),glyf:s.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(M["OS/2"]=this.font.os2.raw()),this.font.directory.encode(M)},e}();et.API.PDFObject=function(){var e;function t(){}return e=function(r,n){return(Array(n+1).join("0")+r).slice(-n)},t.convert=function(r){var n,i,s,a;if(Array.isArray(r))return"["+function(){var l,u,h;for(h=[],l=0,u=r.length;l<u;l++)n=r[l],h.push(t.convert(n));return h}().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r!=null&&r.isString)return"("+r+")";if(r instanceof Date)return"(D:"+e(r.getUTCFullYear(),4)+e(r.getUTCMonth(),2)+e(r.getUTCDate(),2)+e(r.getUTCHours(),2)+e(r.getUTCMinutes(),2)+e(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(i in s=["<<"],r)a=r[i],s.push("/"+i+" "+t.convert(a));return s.push(">>"),s.join(`
`)}return""+r},t}();class Ou{static async exportToJSON(t,r){const n=this.prepareExportData(t,r),i=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});this.downloadFile(i,"api-documentation.json")}static async exportToCSV(t,r){const n=["Method","Path","Summary","Description","Tags","Deprecated","Parameters Count","Response Codes"];r.includeBusinessContext&&n.push("Business Context");const i=t.map(l=>{const u=[l.method,l.path,l.summary||"",l.description||"",l.tags.join(", "),l.deprecated?"Yes":"No",l.parameters.length.toString(),Object.keys(l.responses).join(", ")];return r.includeBusinessContext&&u.push(l.businessContext||""),u}),s=[n,...i].map(l=>l.map(u=>`"${u.replace(/"/g,'""')}"`).join(",")).join(`
`),a=new Blob([s],{type:"text/csv"});this.downloadFile(a,"api-documentation.csv")}static async exportToMarkdown(t,r){let n=`# API Documentation
`;n+=`Generated on ${new Date().toLocaleDateString()}
`,n+=`## Overview
`,n+=`This document contains ${t.length} API endpoints.
`,n+=`## Table of Contents
`,t.forEach((s,a)=>{const l=`${s.method.toLowerCase()}-${s.path.replace(/[^a-zA-Z0-9]/g,"-")}`;n+=`- [${s.method} ${s.path}](#${l})
`}),n+=`
`,n+=`## Endpoints
`,t.forEach((s,a)=>{const l=`${s.method.toLowerCase()}-${s.path.replace(/[^a-zA-Z0-9]/g,"-")}`;n+=`### ${s.method} ${s.path} {#${l}}
`,s.summary&&(n+=`**Summary:** ${s.summary}
`),s.description&&(n+=`**Description:** ${s.description}
`),s.tags.length>0&&(n+=`**Tags:** ${s.tags.join(", ")}
`),s.deprecated&&(n+=`> ⚠️ **This endpoint is deprecated**
`),r.includeBusinessContext&&s.businessContext&&(n+=`**Business Context:** ${s.businessContext}
`),r.includeAISuggestions&&s.aiSuggestions&&s.aiSuggestions.length>0&&(n+=`**AI Suggestions:**
`,s.aiSuggestions.forEach(u=>{n+=`- ${u}
`}),n+=`
`),s.parameters.length>0&&(n+=`#### Parameters
`,n+=`| Name | In | Type | Required | Description |
`,n+=`|------|----|----- |----------|-------------|
`,s.parameters.forEach(u=>{var h;n+=`| ${u.name} | ${u.in} | ${((h=u.schema)==null?void 0:h.type)||"N/A"} | ${u.required?"Yes":"No"} | ${u.description||"N/A"} |
`}),n+=`
`),n+=`#### Responses
`,n+=`| Status Code | Description |
`,n+=`|-------------|-------------|
`,Object.entries(s.responses).forEach(([u,h])=>{n+=`| ${u} | ${h.description} |
`}),n+=`
`,r.includeCodeExamples&&(n+=`#### Example
`,n+="```bash\n",n+=this.generateCurlExample(s),n+="\n```\n\n"),n+=`---
`});const i=new Blob([n],{type:"text/markdown"});this.downloadFile(i,"api-documentation.md")}static async exportToPDF(t,r){const n=new et;let i=20;const s=n.internal.pageSize.height,a=20;n.setFontSize(20),n.text("API Documentation",a,i),i+=15,n.setFontSize(12),n.text(`Generated on ${new Date().toLocaleDateString()}`,a,i),i+=10,n.text(`${t.length} endpoints`,a,i),i+=20,t.forEach((l,u)=>{if(i>s-60&&(n.addPage(),i=20),n.setFontSize(14),n.setFont(void 0,"bold"),n.text(`${l.method} ${l.path}`,a,i),i+=10,n.setFont(void 0,"normal"),n.setFontSize(10),l.summary&&(n.text(`Summary: ${l.summary}`,a,i),i+=8),l.tags.length>0&&(n.text(`Tags: ${l.tags.join(", ")}`,a,i),i+=8),l.deprecated&&(n.setTextColor(255,0,0),n.text("DEPRECATED",a,i),n.setTextColor(0,0,0),i+=8),r.includeBusinessContext&&l.businessContext){const h=n.splitTextToSize(`Business Context: ${l.businessContext}`,170);n.text(h,a,i),i+=h.length*6}i+=10}),n.save("api-documentation.pdf")}static prepareExportData(t,r){return{meta:{exportedAt:new Date().toISOString(),totalEndpoints:t.length,format:r.format,options:r},endpoints:t.map(n=>{const i={id:n.id,path:n.path,method:n.method,summary:n.summary,description:n.description,tags:n.tags,deprecated:n.deprecated,parameters:n.parameters,responses:n.responses};return r.includeBusinessContext&&(i.businessContext=n.businessContext),r.includeAISuggestions&&(i.aiSuggestions=n.aiSuggestions),r.includeCodeExamples&&(i.codeExample=this.generateCurlExample(n)),i})}}static generateCurlExample(t){var i;const r=t.method.toLowerCase();let n=`curl -X ${t.method} "${t.path}"`;return(i=t.parameters)!=null&&i.some(s=>s.in==="header")&&(n+=` \\
-H "Content-Type: application/json"`),t.requestBody&&(r==="post"||r==="put"||r==="patch")&&(n+=` \\
-d '{"example": "data"}'`),n}static downloadFile(t,r){const n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}}function bN(e){const t={},r={},n={},i={},s=new Set,a=new Set;let l=0,u=0;return e.forEach(h=>{t[h.method]=(t[h.method]||0)+1,h.tags.forEach(y=>{r[y]=(r[y]||0)+1});const x=h.complexity||"medium";n[x]=(n[x]||0)+1,Object.keys(h.responses).forEach(y=>{i[y]=(i[y]||0)+1}),h.security&&h.security.forEach(y=>{Object.keys(y).forEach(p=>{s.add(p)})});const m=h.path.split("/").filter(Boolean);if(m.length>0){const y=`/${m[0]}`;a.add(y);const p=h.path.replace(/\{[^}]+\}/g,"{id}");a.add(p)}h.deprecated&&l++,u+=h.parameters.length}),{totalEndpoints:e.length,methodDistribution:t,tagDistribution:r,complexityDistribution:n,deprecatedCount:l,securitySchemes:Array.from(s),averageParametersPerEndpoint:e.length>0?u/e.length:0,pathPatterns:Array.from(a).slice(0,20),responseCodeDistribution:i}}function Ki(e){return Array.isArray?Array.isArray(e):cy(e)==="[object Array]"}const wN=1/0;function NN(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-wN?"-0":t}function kN(e){return e==null?"":NN(e)}function bi(e){return typeof e=="string"}function oy(e){return typeof e=="number"}function jN(e){return e===!0||e===!1||SN(e)&&cy(e)=="[object Boolean]"}function ly(e){return typeof e=="object"}function SN(e){return ly(e)&&e!==null}function fn(e){return e!=null}function Eh(e){return!e.trim().length}function cy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const AN="Incorrect 'index' type",LN=e=>`Invalid value for key ${e}`,CN=e=>`Pattern length exceeds max of ${e}.`,_N=e=>`Missing ${e} property in key`,PN=e=>`Property 'weight' in key '${e}' must be a positive integer`,Lm=Object.prototype.hasOwnProperty;class EN{constructor(t){this._keys=[],this._keyMap={};let r=0;t.forEach(n=>{let i=uy(n);this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function uy(e){let t=null,r=null,n=null,i=1,s=null;if(bi(e)||Ki(e))n=e,t=Cm(e),r=Hf(e);else{if(!Lm.call(e,"name"))throw new Error(_N("name"));const a=e.name;if(n=a,Lm.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(PN(a));t=Cm(a),r=Hf(a),s=e.getFn}return{path:t,id:r,weight:i,src:n,getFn:s}}function Cm(e){return Ki(e)?e:e.split(".")}function Hf(e){return Ki(e)?e.join("."):e}function IN(e,t){let r=[],n=!1;const i=(s,a,l)=>{if(fn(s))if(!a[l])r.push(s);else{let u=a[l];const h=s[u];if(!fn(h))return;if(l===a.length-1&&(bi(h)||oy(h)||jN(h)))r.push(kN(h));else if(Ki(h)){n=!0;for(let x=0,m=h.length;x<m;x+=1)i(h[x],a,l+1)}else a.length&&i(h,a,l+1)}};return i(e,bi(t)?t.split("."):t,0),n?r:r[0]}const FN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},TN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ON={location:0,threshold:.6,distance:100},MN={useExtendedSearch:!1,getFn:IN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var rt={...TN,...FN,...ON,...MN};const DN=/[^ ]+/g;function RN(e=1,t=3){const r=new Map,n=Math.pow(10,t);return{get(i){const s=i.match(DN).length;if(r.has(s))return r.get(s);const a=1/Math.pow(s,.5*e),l=parseFloat(Math.round(a*n)/n);return r.set(s,l),l},clear(){r.clear()}}}class r1{constructor({getFn:t=rt.getFn,fieldNormWeight:r=rt.fieldNormWeight}={}){this.norm=RN(r,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((r,n)=>{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,bi(this.docs[0])?this.docs.forEach((t,r)=>{this._addString(t,r)}):this.docs.forEach((t,r)=>{this._addObject(t,r)}),this.norm.clear())}add(t){const r=this.size();bi(t)?this._addString(t,r):this._addObject(t,r)}removeAt(t){this.records.splice(t,1);for(let r=t,n=this.size();r<n;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(t,r){return t[this._keysMap[r]]}size(){return this.records.length}_addString(t,r){if(!fn(t)||Eh(t))return;let n={v:t,i:r,n:this.norm.get(t)};this.records.push(n)}_addObject(t,r){let n={i:r,$:{}};this.keys.forEach((i,s)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(fn(a)){if(Ki(a)){let l=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:h,value:x}=u.pop();if(fn(x))if(bi(x)&&!Eh(x)){let m={v:x,i:h,n:this.norm.get(x)};l.push(m)}else Ki(x)&&x.forEach((m,y)=>{u.push({nestedArrIndex:y,value:m})})}n.$[s]=l}else if(bi(a)&&!Eh(a)){let l={v:a,n:this.norm.get(a)};n.$[s]=l}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function dy(e,t,{getFn:r=rt.getFn,fieldNormWeight:n=rt.fieldNormWeight}={}){const i=new r1({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(uy)),i.setSources(t),i.create(),i}function BN(e,{getFn:t=rt.getFn,fieldNormWeight:r=rt.fieldNormWeight}={}){const{keys:n,records:i}=e,s=new r1({getFn:t,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s}function Mu(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:i=rt.distance,ignoreLocation:s=rt.ignoreLocation}={}){const a=t/e.length;if(s)return a;const l=Math.abs(n-r);return i?a+l/i:l?1:a}function qN(e=[],t=rt.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let a=e.length;s<a;s+=1){let l=e[s];l&&n===-1?n=s:!l&&n!==-1&&(i=s-1,i-n+1>=t&&r.push([n,i]),n=-1)}return e[s-1]&&s-n>=t&&r.push([n,s-1]),r}const na=32;function zN(e,t,r,{location:n=rt.location,distance:i=rt.distance,threshold:s=rt.threshold,findAllMatches:a=rt.findAllMatches,minMatchCharLength:l=rt.minMatchCharLength,includeMatches:u=rt.includeMatches,ignoreLocation:h=rt.ignoreLocation}={}){if(t.length>na)throw new Error(CN(na));const x=t.length,m=e.length,y=Math.max(0,Math.min(n,m));let p=s,N=y;const k=l>1||u,M=k?Array(m):[];let b;for(;(b=e.indexOf(t,N))>-1;){let D=Mu(t,{currentLocation:b,expectedLocation:y,distance:i,ignoreLocation:h});if(p=Math.min(D,p),N=b+x,k){let R=0;for(;R<x;)M[b+R]=1,R+=1}}N=-1;let w=[],L=1,$=x+m;const J=1<<x-1;for(let D=0;D<x;D+=1){let R=0,Z=$;for(;R<Z;)Mu(t,{errors:D,currentLocation:y+Z,expectedLocation:y,distance:i,ignoreLocation:h})<=p?R=Z:$=Z,Z=Math.floor(($-R)/2+R);$=Z;let G=Math.max(1,y-Z+1),P=a?m:Math.min(y+Z,m)+x,I=Array(P+2);I[P+1]=(1<<D)-1;for(let F=P;F>=G;F-=1){let de=F-1,ie=r[e.charAt(de)];if(k&&(M[de]=+!!ie),I[F]=(I[F+1]<<1|1)&ie,D&&(I[F]|=(w[F+1]|w[F])<<1|1|w[F+1]),I[F]&J&&(L=Mu(t,{errors:D,currentLocation:de,expectedLocation:y,distance:i,ignoreLocation:h}),L<=p)){if(p=L,N=de,N<=y)break;G=Math.max(1,2*y-N)}}if(Mu(t,{errors:D+1,currentLocation:y,expectedLocation:y,distance:i,ignoreLocation:h})>p)break;w=I}const le={isMatch:N>=0,score:Math.max(.001,L)};if(k){const D=qN(M,l);D.length?u&&(le.indices=D):le.isMatch=!1}return le}function UN(e){let t={};for(let r=0,n=e.length;r<n;r+=1){const i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}const Od=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class hy{constructor(t,{location:r=rt.location,threshold:n=rt.threshold,distance:i=rt.distance,includeMatches:s=rt.includeMatches,findAllMatches:a=rt.findAllMatches,minMatchCharLength:l=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:h=rt.ignoreDiacritics,ignoreLocation:x=rt.ignoreLocation}={}){if(this.options={location:r,threshold:n,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:u,ignoreDiacritics:h,ignoreLocation:x},t=u?t:t.toLowerCase(),t=h?Od(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const m=(p,N)=>{this.chunks.push({pattern:p,alphabet:UN(p),startIndex:N})},y=this.pattern.length;if(y>na){let p=0;const N=y%na,k=y-N;for(;p<k;)m(this.pattern.substr(p,na),p),p+=na;if(N){const M=y-na;m(this.pattern.substr(M),M)}}else m(this.pattern,0)}searchIn(t){const{isCaseSensitive:r,ignoreDiacritics:n,includeMatches:i}=this.options;if(t=r?t:t.toLowerCase(),t=n?Od(t):t,this.pattern===t){let k={isMatch:!0,score:0};return i&&(k.indices=[[0,t.length-1]]),k}const{location:s,distance:a,threshold:l,findAllMatches:u,minMatchCharLength:h,ignoreLocation:x}=this.options;let m=[],y=0,p=!1;this.chunks.forEach(({pattern:k,alphabet:M,startIndex:b})=>{const{isMatch:w,score:L,indices:$}=zN(t,k,M,{location:s+b,distance:a,threshold:l,findAllMatches:u,minMatchCharLength:h,includeMatches:i,ignoreLocation:x});w&&(p=!0),y+=L,w&&$&&(m=[...m,...$])});let N={isMatch:p,score:p?y/this.chunks.length:1};return p&&i&&(N.indices=m),N}}class Bs{constructor(t){this.pattern=t}static isMultiMatch(t){return _m(t,this.multiRegex)}static isSingleMatch(t){return _m(t,this.singleRegex)}search(){}}function _m(e,t){const r=e.match(t);return r?r[1]:null}class $N extends Bs{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const r=t===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class HN extends Bs{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class WN extends Bs{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const r=t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class VN extends Bs{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const r=!t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class GN extends Bs{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const r=t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class YN extends Bs{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const r=!t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class fy extends Bs{constructor(t,{location:r=rt.location,threshold:n=rt.threshold,distance:i=rt.distance,includeMatches:s=rt.includeMatches,findAllMatches:a=rt.findAllMatches,minMatchCharLength:l=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:h=rt.ignoreDiacritics,ignoreLocation:x=rt.ignoreLocation}={}){super(t),this._bitapSearch=new hy(t,{location:r,threshold:n,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:u,ignoreDiacritics:h,ignoreLocation:x})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class py extends Bs{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let r=0,n;const i=[],s=this.pattern.length;for(;(n=t.indexOf(this.pattern,r))>-1;)r=n+s,i.push([n,r-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const Wf=[$N,py,WN,VN,YN,GN,HN,fy],Pm=Wf.length,KN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,JN="|";function XN(e,t={}){return e.split(JN).map(r=>{let n=r.trim().split(KN).filter(s=>s&&!!s.trim()),i=[];for(let s=0,a=n.length;s<a;s+=1){const l=n[s];let u=!1,h=-1;for(;!u&&++h<Pm;){const x=Wf[h];let m=x.isMultiMatch(l);m&&(i.push(new x(m,t)),u=!0)}if(!u)for(h=-1;++h<Pm;){const x=Wf[h];let m=x.isSingleMatch(l);if(m){i.push(new x(m,t));break}}}return i})}const QN=new Set([fy.type,py.type]);class ZN{constructor(t,{isCaseSensitive:r=rt.isCaseSensitive,ignoreDiacritics:n=rt.ignoreDiacritics,includeMatches:i=rt.includeMatches,minMatchCharLength:s=rt.minMatchCharLength,ignoreLocation:a=rt.ignoreLocation,findAllMatches:l=rt.findAllMatches,location:u=rt.location,threshold:h=rt.threshold,distance:x=rt.distance}={}){this.query=null,this.options={isCaseSensitive:r,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:s,findAllMatches:l,ignoreLocation:a,location:u,threshold:h,distance:x},t=r?t:t.toLowerCase(),t=n?Od(t):t,this.pattern=t,this.query=XN(this.pattern,this.options)}static condition(t,r){return r.useExtendedSearch}searchIn(t){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:s}=this.options;t=i?t:t.toLowerCase(),t=s?Od(t):t;let a=0,l=[],u=0;for(let h=0,x=r.length;h<x;h+=1){const m=r[h];l.length=0,a=0;for(let y=0,p=m.length;y<p;y+=1){const N=m[y],{isMatch:k,indices:M,score:b}=N.search(t);if(k){if(a+=1,u+=b,n){const w=N.constructor.type;QN.has(w)?l=[...l,...M]:l.push(M)}}else{u=0,a=0,l.length=0;break}}if(a){let y={isMatch:!0,score:u/a};return n&&(y.indices=l),y}}return{isMatch:!1,score:1}}}const Vf=[];function ek(...e){Vf.push(...e)}function Gf(e,t){for(let r=0,n=Vf.length;r<n;r+=1){let i=Vf[r];if(i.condition(e,t))return new i(e,t)}return new hy(e,t)}const Md={AND:"$and",OR:"$or"},Yf={PATH:"$path",PATTERN:"$val"},Kf=e=>!!(e[Md.AND]||e[Md.OR]),tk=e=>!!e[Yf.PATH],rk=e=>!Ki(e)&&ly(e)&&!Kf(e),Em=e=>({[Md.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function gy(e,t,{auto:r=!0}={}){const n=i=>{let s=Object.keys(i);const a=tk(i);if(!a&&s.length>1&&!Kf(i))return n(Em(i));if(rk(i)){const u=a?i[Yf.PATH]:s[0],h=a?i[Yf.PATTERN]:i[u];if(!bi(h))throw new Error(LN(u));const x={keyId:Hf(u),pattern:h};return r&&(x.searcher=Gf(h,t)),x}let l={children:[],operator:s[0]};return s.forEach(u=>{const h=i[u];Ki(h)&&h.forEach(x=>{l.children.push(n(x))})}),l};return Kf(e)||(e=Em(e)),n(e)}function nk(e,{ignoreFieldNorm:t=rt.ignoreFieldNorm}){e.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:s,score:a})=>{const l=i?i.weight:null;n*=Math.pow(a===0&&l?Number.EPSILON:a,(l||1)*(t?1:s))}),r.score=n})}function ik(e,t){const r=e.matches;t.matches=[],fn(r)&&r.forEach(n=>{if(!fn(n.indices)||!n.indices.length)return;const{indices:i,value:s}=n;let a={indices:i,value:s};n.key&&(a.key=n.key.src),n.idx>-1&&(a.refIndex=n.idx),t.matches.push(a)})}function sk(e,t){t.score=e.score}function ak(e,t,{includeMatches:r=rt.includeMatches,includeScore:n=rt.includeScore}={}){const i=[];return r&&i.push(ik),n&&i.push(sk),e.map(s=>{const{idx:a}=s,l={item:t[a],refIndex:a};return i.length&&i.forEach(u=>{u(s,l)}),l})}class $o{constructor(t,r={},n){this.options={...rt,...r},this.options.useExtendedSearch,this._keyStore=new EN(this.options.keys),this.setCollection(t,n)}setCollection(t,r){if(this._docs=t,r&&!(r instanceof r1))throw new Error(AN);this._myIndex=r||dy(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){fn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const r=[];for(let n=0,i=this._docs.length;n<i;n+=1){const s=this._docs[n];t(s,n)&&(this.removeAt(n),n-=1,i-=1,r.push(s))}return r}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:r=-1}={}){const{includeMatches:n,includeScore:i,shouldSort:s,sortFn:a,ignoreFieldNorm:l}=this.options;let u=bi(t)?bi(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return nk(u,{ignoreFieldNorm:l}),s&&u.sort(a),oy(r)&&r>-1&&(u=u.slice(0,r)),ak(u,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(t){const r=Gf(t,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:s,i:a,n:l})=>{if(!fn(s))return;const{isMatch:u,score:h,indices:x}=r.searchIn(s);u&&i.push({item:s,idx:a,matches:[{score:h,value:s,norm:l,indices:x}]})}),i}_searchLogical(t){const r=gy(t,this.options),n=(l,u,h)=>{if(!l.children){const{keyId:m,searcher:y}=l,p=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:y});return p&&p.length?[{idx:h,item:u,matches:p}]:[]}const x=[];for(let m=0,y=l.children.length;m<y;m+=1){const p=l.children[m],N=n(p,u,h);if(N.length)x.push(...N);else if(l.operator===Md.AND)return[]}return x},i=this._myIndex.records,s={},a=[];return i.forEach(({$:l,i:u})=>{if(fn(l)){let h=n(r,l,u);h.length&&(s[u]||(s[u]={idx:u,item:l,matches:[]},a.push(s[u])),h.forEach(({matches:x})=>{s[u].matches.push(...x)}))}}),a}_searchObjectList(t){const r=Gf(t,this.options),{keys:n,records:i}=this._myIndex,s=[];return i.forEach(({$:a,i:l})=>{if(!fn(a))return;let u=[];n.forEach((h,x)=>{u.push(...this._findMatches({key:h,value:a[x],searcher:r}))}),u.length&&s.push({idx:l,item:a,matches:u})}),s}_findMatches({key:t,value:r,searcher:n}){if(!fn(r))return[];let i=[];if(Ki(r))r.forEach(({v:s,i:a,n:l})=>{if(!fn(s))return;const{isMatch:u,score:h,indices:x}=n.searchIn(s);u&&i.push({score:h,key:t,value:s,idx:a,norm:l,indices:x})});else{const{v:s,n:a}=r,{isMatch:l,score:u,indices:h}=n.searchIn(s);l&&i.push({score:u,key:t,value:s,norm:a,indices:h})}return i}}$o.version="7.1.0";$o.createIndex=dy;$o.parseIndex=BN;$o.config=rt;$o.parseQuery=gy;ek(ZN);function ok(e,t,r){const n=Fe.useMemo(()=>new $o(e,{keys:[{name:"path",weight:.3},{name:"summary",weight:.3},{name:"description",weight:.2},{name:"tags",weight:.1},{name:"businessContext",weight:.1}],threshold:.4,includeScore:!0}),[e]),i=Fe.useMemo(()=>{let l=e;if(t.search.trim()&&(l=n.search(t.search).map(h=>h.item)),t.methods.length>0&&(l=l.filter(u=>t.methods.includes(u.method))),t.tags.length>0&&(l=l.filter(u=>u.tags.some(h=>t.tags.includes(h)))),t.statusCodes.length>0&&(l=l.filter(u=>Object.keys(u.responses).some(h=>t.statusCodes.includes(h)))),t.deprecated!==null&&(l=l.filter(u=>u.deprecated===t.deprecated)),t.complexity.length>0&&(l=l.filter(u=>u.complexity&&t.complexity.includes(u.complexity))),t.security.length>0&&(l=l.filter(u=>{var h;return t.security.includes("none")?!u.security||u.security.length===0:(h=u.security)==null?void 0:h.some(x=>Object.keys(x).some(m=>t.security.includes(m)))})),t.pathPattern.trim()){const u=t.pathPattern.toLowerCase();l=l.filter(h=>h.path.toLowerCase().includes(u))}return t.hasParameters!==null&&(l=l.filter(u=>(u.parameters.length>0||u.hasPathParams||u.hasQueryParams)===t.hasParameters)),t.hasRequestBody!==null&&(l=l.filter(u=>(!!u.requestBody||u.hasRequestBody)===t.hasRequestBody)),t.responseTime.length>0&&(l=l.filter(u=>u.estimatedResponseTime&&t.responseTime.includes(u.estimatedResponseTime))),l},[e,t,n]),s=Fe.useMemo(()=>[...i].sort((u,h)=>{let x=0;switch(r.sortBy){case"path":x=u.path.localeCompare(h.path);break;case"method":x=u.method.localeCompare(h.method);break;case"summary":x=(u.summary||"").localeCompare(h.summary||"");break;case"complexity":const m={low:1,medium:2,high:3};x=(m[u.complexity||"low"]||1)-(m[h.complexity||"low"]||1);break;case"responseTime":const y={fast:1,medium:2,slow:3};x=(y[u.estimatedResponseTime||"medium"]||2)-(y[h.estimatedResponseTime||"medium"]||2);break;default:x=u.path.localeCompare(h.path)}return r.sortOrder==="desc"?-x:x}),[i,r]),a=Fe.useMemo(()=>{if(r.groupBy==="none")return{"All Endpoints":s};const l={};return s.forEach(u=>{let h="Other";switch(r.groupBy){case"tag":if(u.tags.length>0){u.tags.forEach(m=>{l[m]||(l[m]=[]),l[m].push(u)});return}h="Untagged";break;case"method":h=u.method;break;case"path":const x=u.path.split("/").filter(Boolean);h=x.length>0?`/${x[0]}`:"/";break;case"complexity":h=u.complexity?u.complexity.charAt(0).toUpperCase()+u.complexity.slice(1):"Unknown";break;case"security":if(u.security&&u.security.length>0){const m=u.security.flatMap(y=>Object.keys(y));h=m.length>0?m[0]:"None"}else h="None";break}l[h]||(l[h]=[]),l[h].push(u)}),l},[s,r]);return{filteredEndpoints:s,groupedEndpoints:a,totalFiltered:s.length}}function lk(){const[e,t]=Fe.useState(null),[r,n]=Fe.useState([]),[i,s]=Fe.useState(!1),[a,l]=Fe.useState(null),[u,h]=Fe.useState(!0),[x,m]=Fe.useState(!1),[y,p]=Fe.useState(!1),[N,k]=Fe.useState(!1),[M,b]=Fe.useState(!1),[w,L]=Fe.useState(!1),[$,J]=Fe.useState(!1),[le,D]=Fe.useState(!1),[R,Z]=Fe.useState(new Set),[G,P]=Fe.useState({methods:[],tags:[],statusCodes:[],deprecated:null,search:"",complexity:[],security:[],pathPattern:"",hasParameters:null,hasRequestBody:null,responseTime:[]}),[I,Y]=Fe.useState({groupBy:"tag",sortBy:"path",sortOrder:"asc"}),[F,de]=Fe.useState({layout:"list",showDetails:!0,showBusinessContext:!0,showAISuggestions:!0,showCodeExamples:!1,density:"comfortable"}),ie=new b6,{filteredEndpoints:he,groupedEndpoints:W,totalFiltered:te}=ok(r,G,I),se=bN(r);Fe.useEffect(()=>{Z(new Set)},[I.groupBy]);const ye=async me=>{s(!0),l(null);try{const we=await ie.parseFromFile(me);t(we);const Pe=ie.extractEndpoints();n(Pe),h(!1)}catch(we){l(we instanceof Error?we.message:"Failed to parse file")}finally{s(!1)}},j=async me=>{s(!0),l(null);try{const we=await ie.parseFromText(me);t(we);const Pe=ie.extractEndpoints();n(Pe),h(!1)}catch(we){l(we instanceof Error?we.message:"Failed to parse specification")}finally{s(!1)}},T=async me=>{s(!0),l(null);try{const we=await ie.parseFromUrl(me);t(we);const Pe=ie.extractEndpoints();n(Pe),h(!1)}catch(we){l(we instanceof Error?we.message:"Failed to fetch or parse specification from URL")}finally{s(!1)}},B=async(me,we)=>{try{switch(me){case"json":await Ou.exportToJSON(he,we);break;case"csv":await Ou.exportToCSV(he,we);break;case"markdown":await Ou.exportToMarkdown(he,we);break;case"pdf":await Ou.exportToPDF(he,we);break}}catch(Pe){console.error("Export failed:",Pe),l("Failed to export documentation. Please try again.")}},K=me=>{const we=new Set(R);we.has(me)?we.delete(me):we.add(me),Z(we)},ee=()=>{Z(new Set(Object.keys(W)))},z=()=>{Z(new Set)},X=ie.getAllTags(),ae=ie.getAllMethods(),ke=ie.getAllStatusCodes();return u||!e?o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 transition-colors",children:[o.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-12",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx("div",{className:"inline-flex items-center justify-center p-4 bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl mb-6",children:o.jsx(fc,{className:"h-12 w-12 text-white"})}),o.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:"OpenAPI Explorer"}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-400 max-w-2xl mx-auto",children:"Advanced OpenAPI specification visualizer with intelligent filtering, grouping, analytics, and AI-powered insights for better API understanding."})]}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-12",children:[o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("div",{className:"p-3 bg-blue-100 dark:bg-blue-900 rounded-lg w-fit mb-4",children:o.jsx(gn,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"})}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Advanced Filtering"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"Multi-dimensional filtering by methods, tags, complexity, security, and more with intelligent search."})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("div",{className:"p-3 bg-green-100 dark:bg-green-900 rounded-lg w-fit mb-4",children:o.jsx(ri,{className:"h-6 w-6 text-green-600 dark:text-green-400"})}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Smart Grouping"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"Organize endpoints by tags, methods, complexity, or path patterns with flexible sorting options."})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-xl border border-gray-200 dark:border-gray-700",children:[o.jsx("div",{className:"p-3 bg-purple-100 dark:bg-purple-900 rounded-lg w-fit mb-4",children:o.jsx(dc,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Analytics Dashboard"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"Comprehensive analytics with distribution charts, complexity analysis, and API health insights."})]})]}),o.jsx(Ww,{onFileUpload:ye,onTextUpload:j,onUrlUpload:T,isLoading:i}),a&&o.jsx("div",{className:"mt-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Sf,{className:"h-5 w-5 text-red-600 dark:text-red-400"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-red-800 dark:text-red-200 font-medium",children:"Import Failed"}),o.jsx("p",{className:"text-red-700 dark:text-red-300 text-sm mt-1",children:a})]})]})}),i&&o.jsxs("div",{className:"mt-6 flex items-center justify-center gap-3 text-blue-600 dark:text-blue-400",children:[o.jsx(Ku,{className:"h-5 w-5 animate-spin"}),o.jsx("span",{className:"font-medium",children:"Processing OpenAPI specification..."})]}),o.jsx("div",{className:"mt-8 flex flex-col sm:flex-row items-center justify-center gap-4",children:o.jsxs("button",{onClick:()=>b(!0),className:"flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white rounded-lg transition-colors font-medium",children:[o.jsx(Ad,{className:"h-5 w-5"}),"MCP Integration"]})}),o.jsx("div",{className:"mt-12 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 border border-blue-200 dark:border-blue-800 rounded-xl p-6",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-3 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg",children:o.jsx(Ad,{className:"h-6 w-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"🤖 AI-Powered API Analysis"}),o.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-4",children:"Connect this OpenAPI Explorer to Claude Desktop, Cursor, or other AI clients via Model Context Protocol (MCP). Get instant API insights, generate code examples, and validate designs through natural conversation."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("span",{className:"px-3 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-sm rounded-full",children:"Load & Analyze APIs"}),o.jsx("span",{className:"px-3 py-1 bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 text-sm rounded-full",children:"Generate Code Examples"}),o.jsx("span",{className:"px-3 py-1 bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 text-sm rounded-full",children:"Validate API Design"})]})]})]})})]}),o.jsx($g,{isOpen:M,onClose:()=>b(!1)})]}):o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 transition-colors",children:[o.jsx(Vw,{title:e.info.title,subtitle:`${r.length} endpoints • v${e.info.version}`,onFilterToggle:()=>m(!x),onExportClick:()=>p(!0),onUploadClick:()=>h(!0),onAnalyticsClick:()=>k(!0),onMCPClick:()=>b(!0),searchValue:G.search,onSearchChange:me=>P({...G,search:me}),isSpecLoaded:!!e}),o.jsxs("div",{className:"flex",children:[o.jsx(Gw,{isOpen:x,onClose:()=>m(!1),filters:G,onFilterChange:P,availableTags:X,availableMethods:ae,availableStatusCodes:ke,endpointCount:r.length,filteredCount:te}),o.jsxs("main",{className:"flex-1 lg:ml-0",children:[o.jsx(Yw,{grouping:I,onGroupingChange:Y,view:F,onViewChange:de}),o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6 mb-6",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:e.info.title}),e.info.description&&o.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4 max-w-3xl",children:e.info.description}),o.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-600 dark:text-gray-400",children:[o.jsxs("span",{children:["Version: ",o.jsx("strong",{children:e.info.version})]}),o.jsxs("span",{children:["OpenAPI: ",o.jsx("strong",{children:e.openapi})]}),o.jsxs("span",{children:["Endpoints: ",o.jsx("strong",{children:r.length})]}),X.length>0&&o.jsxs("span",{children:["Tags: ",o.jsx("strong",{children:X.length})]}),o.jsxs("span",{children:["Filtered: ",o.jsx("strong",{children:te})]})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>L(!0),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors text-sm",children:[o.jsx(Lo,{className:"h-4 w-4"}),"Schema Explorer"]}),o.jsxs("button",{onClick:()=>J(!0),className:"flex items-center gap-2 px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-lg transition-colors text-sm",children:[o.jsx(ya,{className:"h-4 w-4"}),"Validation"]}),o.jsxs("button",{onClick:()=>D(!0),className:"flex items-center gap-2 px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-lg transition-colors text-sm",children:[o.jsx(ei,{className:"h-4 w-4"}),"Code Gen"]})]})]})}),te!==r.length&&o.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-6",children:o.jsxs("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:["Showing ",o.jsx("strong",{children:te})," of"," ",o.jsx("strong",{children:r.length})," endpoints based on your filters and grouping."]})}),I.groupBy!=="none"&&Object.keys(W).length>1&&o.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Group Controls:"}),o.jsx("button",{onClick:ee,className:"px-3 py-1.5 text-sm bg-blue-100 hover:bg-blue-200 dark:bg-blue-900 dark:hover:bg-blue-800 text-blue-800 dark:text-blue-200 rounded-lg transition-colors",children:"Expand All"}),o.jsx("button",{onClick:z,className:"px-3 py-1.5 text-sm bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors",children:"Collapse All"})]}),Object.keys(W).length>0?o.jsx("div",{className:"space-y-4",children:Object.entries(W).map(([me,we])=>{const Pe=R.has(me),We=I.groupBy!=="none";return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 overflow-hidden",children:[We&&o.jsxs("button",{onClick:()=>K(me),className:"w-full flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border-b border-gray-200 dark:border-gray-700",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[Pe?o.jsx(Gi,{className:"h-5 w-5 text-gray-500"}):o.jsx(ma,{className:"h-5 w-5 text-gray-500"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:me})]}),o.jsxs("span",{className:"px-3 py-1 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-sm rounded-full font-medium",children:[we.length," endpoint",we.length!==1?"s":""]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[I.groupBy==="method"&&o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${me==="GET"?"bg-green-100 text-green-800":me==="POST"?"bg-blue-100 text-blue-800":me==="PUT"?"bg-orange-100 text-orange-800":me==="PATCH"?"bg-yellow-100 text-yellow-800":me==="DELETE"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:me}),I.groupBy==="complexity"&&o.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${me.toLowerCase()==="low"?"bg-green-100 text-green-800":me.toLowerCase()==="medium"?"bg-yellow-100 text-yellow-800":"bg-red-100 text-red-800"}`,children:me})]})]}),(Pe||!We)&&o.jsx("div",{className:`
${We?"p-4":"p-0"}
${F.layout==="grid"?"grid grid-cols-1 lg:grid-cols-2 gap-4":F.layout==="compact"?"space-y-2":F.layout==="table"?"":"space-y-4"}
`,children:F.layout==="table"?o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Method"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Path"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Summary"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Tags"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Complexity"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Status"})]})}),o.jsx("tbody",{className:"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",children:we.map(xe=>o.jsx(Ug,{endpoint:xe,view:F,onSelect:V=>{console.log("Selected endpoint:",V)}},xe.id))})]})}):we.map(xe=>o.jsx(Ug,{endpoint:xe,view:F,onSelect:V=>{console.log("Selected endpoint:",V)}},xe.id))})]},me)})}):o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(gn,{className:"h-8 w-8 text-gray-400"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No endpoints found"}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400 max-w-md mx-auto",children:"Try adjusting your filters or search terms to find the endpoints you're looking for."})]})]})]})]}),o.jsx(Kw,{isOpen:y,onClose:()=>p(!1),endpoints:he,filters:G,onExport:B}),o.jsx(Jw,{analytics:se,isOpen:N,onClose:()=>k(!1)}),o.jsx($g,{isOpen:M,onClose:()=>b(!1)}),o.jsx(Qw,{spec:e,isOpen:w,onClose:()=>L(!1)}),o.jsx(Zw,{spec:e,endpoints:r,isOpen:$,onClose:()=>J(!1)}),o.jsx(e4,{spec:e,endpoints:r,isOpen:le,onClose:()=>D(!1)})]})}H5(document.getElementById("root")).render(o.jsx(Fe.StrictMode,{children:o.jsx(lk,{})}));export{Nt as _,ck as c,Zy as g};