vendor: 4,105 bytes, lines 1-9
1var aV=Object.defineProperty;var p5=r0=>{throw TypeError(r0)};var iV=(r0,e0,n0)=>e0 in r0?aV(r0,e0,{enumerable:!0,configurable:!0,writable:!0,value:n0}):r0[e0]=n0;var Gw=(r0,e0,n0)=>iV(r0,typeof e0!="symbol"?e0+"":e0,n0),d3=(r0,e0,n0)=>e0.has(r0)||p5("Cannot "+n0);var _0=(r0,e0,n0)=>(d3(r0,e0,"read from private field"),n0?n0.call(r0):e0.get(r0)),K0=(r0,e0,n0)=>e0.has(r0)?p5("Cannot add the same private member more than once"):e0 instanceof WeakSet?e0.add(r0):e0.set(r0,n0),V0=(r0,e0,n0,a0)=>(d3(r0,e0,"write to private field"),a0?a0.call(r0,n0):e0.set(r0,n0),n0),H0=(r0,e0,n0)=>(d3(r0,e0,"access private method"),n0);var o_=(r0,e0,n0,a0)=>({set _(i0){V0(r0,e0,i0,n0)},get _(){return _0(r0,e0,a0)}});function _mergeNamespaces(r0,e0){for(var n0=0;n0<e0.length;n0++){const a0=e0[n0];if(typeof a0!="string"&&!Array.isArray(a0)){for(const i0 in a0)if(i0!=="default"&&!(i0 in r0)){const s0=Object.getOwnPropertyDescriptor(a0,i0);s0&&Object.defineProperty(r0,i0,s0.get?s0:{enumerable:!0,get:()=>a0[i0]})}}}return Object.freeze(Object.defineProperty(r0,Symbol.toStringTag,{value:"Module"}))}(function(){const e0=document.createElement("link").relList;if(e0&&e0.supports&&e0.supports("modulepreload"))return;for(const i0 of document.querySelectorAll('link[rel="modulepreload"]'))a0(i0);new MutationObserver(i0=>{for(const s0 of i0)if(s0.type==="childList")for(const o0 of s0.addedNodes)o0.tagName==="LINK"&&o0.rel==="modulepreload"&&a0(o0)}).observe(document,{childList:!0,subtree:!0});function n0(i0){const s0={};return i0.integrity&&(s0.integrity=i0.integrity),i0.referrerPolicy&&(s0.referrerPolicy=i0.referrerPolicy),i0.crossOrigin==="use-credentials"?s0.credentials="include":i0.crossOrigin==="anonymous"?s0.credentials="omit":s0.credentials="same-origin",s0}function a0(i0){if(i0.ep)return;i0.ep=!0;const s0=n0(i0);fetch(i0.href,s0)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(r0){return r0&&r0.__esModule&&Object.prototype.hasOwnProperty.call(r0,"default")?r0.default:r0}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var l$3=Symbol.for("react.element"),n$3=Symbol.for("react.portal"),p$5=Symbol.for("react.fragment"),q$3=Symbol.for("react.strict_mode"),r$2=Symbol.for("react.profiler"),t$2=Symbol.for("react.provider"),u$3=Symbol.for("react.context"),v$4=Symbol.for("react.forward_ref"),w$1=Symbol.for("react.suspense"),x$2=Symbol.for("react.memo"),y$2=Symbol.for("react.lazy"),z$2=Symbol.iterator;function A$2(r0){return r0===null||typeof r0!="object"?null:(r0=z$2&&r0[z$2]||r0["@@iterator"],typeof r0=="function"?r0:null)}var B$4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$2=Object.assign,D$4={};function E$4(r0,e0,n0){this.props=r0,this.context=e0,this.refs=D$4,this.updater=n0||B$4}E$4.prototype.isReactComponent={};E$4.prototype.setState=function(r0,e0){if(typeof r0!="object"&&typeof r0!="function"&&r0!=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,r0,e0,"setState")};E$4.prototype.forceUpdate=function(r0){this.updater.enqueueForceUpdate(this,r0,"forceUpdate")};function F$1(){}F$1.prototype=E$4.prototype;function G$3(r0,e0,n0){this.props=r0,this.context=e0,this.refs=D$4,this.updater=n0||B$4}var H$3=G$3.prototype=new F$1;H$3.constructor=G$3;C$2(H$3,E$4.prototype);H$3.isPureReactComponent=!0;var I$2=Array.isArray,J$2=Object.prototype.hasOwnProperty,K$4={current:null},L$4={key:!0,ref:!0,__self:!0,__source:!0};function M$3(r0,e0,n0){var a0,i0={},s0=null,o0=null;if(e0!=null)for(a0 in e0.ref!==void 0&&(o0=e0.ref),e0.key!==void 0&&(s0=""+e0.key),e0)J$2.call(e0,a0)&&
vendor: 5,160 bytes, line 9
9!L$4.hasOwnProperty(a0)&&(i0[a0]=e0[a0]);var l0=arguments.length-2;if(l0===1)i0.children=n0;else if(1<l0){for(var c0=Array(l0),u0=0;u0<l0;u0++)c0[u0]=arguments[u0+2];i0.children=c0}if(r0&&r0.defaultProps)for(a0 in l0=r0.defaultProps,l0)i0[a0]===void 0&&(i0[a0]=l0[a0]);return{$$typeof:l$3,type:r0,key:s0,ref:o0,props:i0,_owner:K$4.current}}function N$3(r0,e0){return{$$typeof:l$3,type:r0.type,key:e0,ref:r0.ref,props:r0.props,_owner:r0._owner}}function O$2(r0){return typeof r0=="object"&&r0!==null&&r0.$$typeof===l$3}function escape$1(r0){var e0={"=":"=0",":":"=2"};return"$"+r0.replace(/[=:]/g,function(n0){return e0[n0]})}var P$5=/\/+/g;function Q$2(r0,e0){return typeof r0=="object"&&r0!==null&&r0.key!=null?escape$1(""+r0.key):e0.toString(36)}function R$3(r0,e0,n0,a0,i0){var s0=typeof r0;(s0==="undefined"||s0==="boolean")&&(r0=null);var o0=!1;if(r0===null)o0=!0;else switch(s0){case"string":case"number":o0=!0;break;case"object":switch(r0.$$typeof){case l$3:case n$3:o0=!0}}if(o0)return o0=r0,i0=i0(o0),r0=a0===""?"."+Q$2(o0,0):a0,I$2(i0)?(n0="",r0!=null&&(n0=r0.replace(P$5,"$&/")+"/"),R$3(i0,e0,n0,"",function(u0){return u0})):i0!=null&&(O$2(i0)&&(i0=N$3(i0,n0+(!i0.key||o0&&o0.key===i0.key?"":(""+i0.key).replace(P$5,"$&/")+"/")+r0)),e0.push(i0)),1;if(o0=0,a0=a0===""?".":a0+":",I$2(r0))for(var l0=0;l0<r0.length;l0++){s0=r0[l0];var c0=a0+Q$2(s0,l0);o0+=R$3(s0,e0,n0,c0,i0)}else if(c0=A$2(r0),typeof c0=="function")for(r0=c0.call(r0),l0=0;!(s0=r0.next()).done;)s0=s0.value,c0=a0+Q$2(s0,l0++),o0+=R$3(s0,e0,n0,c0,i0);else if(s0==="object")throw e0=String(r0),Error("Objects are not valid as a React child (found: "+(e0==="[object Object]"?"object with keys {"+Object.keys(r0).join(", ")+"}":e0)+"). If you meant to render a collection of children, use an array instead.");return o0}function S$2(r0,e0,n0){if(r0==null)return r0;var a0=[],i0=0;return R$3(r0,a0,"","",function(s0){return e0.call(n0,s0,i0++)}),a0}function T$3(r0){if(r0._status===-1){var e0=r0._result;e0=e0(),e0.then(function(n0){(r0._status===0||r0._status===-1)&&(r0._status=1,r0._result=n0)},function(n0){(r0._status===0||r0._status===-1)&&(r0._status=2,r0._result=n0)}),r0._status===-1&&(r0._status=0,r0._result=e0)}if(r0._status===1)return r0._result.default;throw r0._result}var U$3={current:null},V$2={transition:null},W$3={ReactCurrentDispatcher:U$3,ReactCurrentBatchConfig:V$2,ReactCurrentOwner:K$4};function X$4(){throw Error("act(...) is not supported in production builds of React.")}react_production_min.Children={map:S$2,forEach:function(r0,e0,n0){S$2(r0,function(){e0.apply(this,arguments)},n0)},count:function(r0){var e0=0;return S$2(r0,function(){e0++}),e0},toArray:function(r0){return S$2(r0,function(e0){return e0})||[]},only:function(r0){if(!O$2(r0))throw Error("React.Children.only expected to receive a single React element child.");return r0}};react_production_min.Component=E$4;react_production_min.Fragment=p$5;react_production_min.Profiler=r$2;react_production_min.PureComponent=G$3;react_production_min.StrictMode=q$3;react_production_min.Suspense=w$1;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$3;react_production_min.act=X$4;react_production_min.cloneElement=function(r0,e0,n0){if(r0==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+r0+".");var a0=C$2({},r0.props),i0=r0.key,s0=r0.ref,o0=r0._owner;if(e0!=null){if(e0.ref!==void 0&&(s0=e0.ref,o0=K$4.current),e0.key!==void 0&&(i0=""+e0.key),r0.type&&r0.type.defaultProps)var l0=r0.type.defaultProps;for(c0 in e0)J$2.call(e0,c0)&&!L$4.hasOwnProperty(c0)&&(a0[c0]=e0[c0]===void 0&&l0!==void 0?l0[c0]:e0[c0])}var c0=arguments.length-2;if(c0===1)a0.children=n0;else if(1<c0){l0=Array(c0);for(var u0=0;u0<c0;u0++)l0[u0]=arguments[u0+2];a0.children=l0}return{$$typeof:l$3,type:r0.type,key:i0,ref:s0,props:a0,_owner:o0}};react_production_min.createContext=function(r0){return r0={$$typeof:u$3,_currentValue:r0,_currentValue2:r0,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},r0.Provider={$$typeof:t$2,_context:r0},r0.Consumer=r0};react_production_min.createElement=M$3;react_production_min.createFactory=function(r0){var e0=M$3.bind(null,r0);return e0.type=r0,e0};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(r0){return{$$typeof:v$4,render:r0}};react_production_min.isValidElement=O$2;react_production_min.lazy=function(r0){return{$$typeof:y$2,_payload:{_status:-1,_result:r0},_init:T$3}};react_production_min.memo=function(r0,e0){return{$$typeof:x$2,type:r0,compare:e0===void 0?null:e0}};react_production_min.startTransition=function(r0){var e0=V$2.transition;V$2.transition={};try{r0()}finally{V$2.transition=e0}};react_production_min.unstable_act=X$4;react_production_min.useCallback=function(r0,e0){return U$3.current.useCallback(r0,e0)};react_production_min.useContext=function(r0){return U$3.current.useContext(r0)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(r0){return U$3.current.useDeferredValue(r0)};react_production_min.useEffect=function(r0,e0){return U$3.current.useEffect(r0,e0
9)};react_production_min.useId=function(){return U$3.current.useId()};react_production_min.useImperativeHandle=function(r0,e0,n0){return U$3.current.useImperativeHandle(r0,e0,n0)};react_production_min.useInsertionEffect=function(r0,e0){return U$3.current.useInsertionEffect(r0,e0)};react_production_min.useLayoutEffect=function(r0,e0){return U$3.current.useLayoutEffect(r0,e0)};react_production_min.useMemo=function(r0,e0){return U$3.current.useMemo(r0,e0)};react_production_min.useReducer=function(r0,e0,n0){return U$3.current.useReducer(r0,e0,n0)};react_production_min.useRef=function(r0){return U$3.current.useRef(r0)};react_production_min.useState=function(r0){return U$3.current.useState(r0)};react_production_min.useSyncExternalStore=function(r0,e0,n0){return U$3.current.useSyncExternalStore(r0,e0,n0)};react_production_min.useTransition=function(){return U$3.current.useTransition()};react_production_min.version="18.3.1";react.exports=react_production_min;var reactExports=react.exports;const React__default=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React__default},[reactExports]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var f$2=reactExports,k$5=Symbol.for("react.element"),l$2=Symbol.for("react.fragment"),m$4=Object.prototype.hasOwnProperty,n$2=f$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$4={key:!0,ref:!0,__self:!0,__source:!0};function q$2(r0,e0,n0){var a0,i0={},s0=null,o0=null;n0!==void 0&&(s0=""+n0),e0.key!==void 0&&(s0=""+e0.key),e0.ref!==void 0&&(o0=e0.ref);for(a0 in e0)m$4.call(e0,a0)&&!p$4.hasOwnProperty(a0)&&(i0[a0]=e0[a0]);if(r0&&r0.defaultProps)for(a0 in e0=r0.defaultProps,e0)i0[a0]===void 0&&(i0[a0]=e0[a0]);return{$$typeof:k$5,type:r0,key:s0,ref:o0,props:i0,_owner:n$2.current}}reactJsxRuntime_production_min.Fragment=l$2;reactJsxRuntime_production_min.jsx=q$2;reactJsxRuntime_production_min.jsxs=q$2;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports,buffer={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$1=0,len=code.length;i$1<len;++i$1)lookup[i$1]=code[i$1],revLookup[code.charCodeAt(i$1)]=i$1;revLookup[45]=62;revLookup[95]=63;function getLens(r0){var e0=r0.length;if(e0%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n0=r0.indexOf("=");n0===-1&&(n0=e0);var a0=n0===e0?0:4-n0%4;return[n0,a0]}function byteLength(r0){var e0=getLens(r0),n0=e0[0],a0=e0[1];return(n0+a0)*3/4-a0}function _byteLength(r0,e0,n0){return(e0+n0)*3/4-n0}function toByteArray(r0){var e0,n0=getLens(r0),a0=n0[0],i0=n0[1],s0=new Arr(_byteLength(r0,a0,i0)),o0=0,l0=i0>0?a0-4:a0,c0;for(c0=0;c0<l0;c0+=4)e0=revLookup[r0.charCodeAt(c0)]<<18|revLookup[r0.charCodeAt(c0+1)]<<12|revLookup[r0.charCodeAt(c0+2)]<<6|revLookup[r0.charCodeAt(c0+3)],s0[o0++]=e0>>16&255,s0[o0++]=e0>>8&255,s0[o0++]=e0&255;return i0===2&&(e0=revLookup[r0.charCodeAt(c0)]<<2|revLookup[r0.charCodeAt(c0+1)]>>4,s0[o0++]=e0&255),i0===1&&(e0=revLookup[r0.charCodeAt(c0)]<<10|revLookup[r0.charCodeAt(c0+1)]<<4|revLookup[r0.charCodeAt(c0+2)]>>2,s0[o0++]=e0>>8&255,s0[o0++]=e0&255),s0}function tripletToBase64(r0){return lookup[r0>>18&63]+lookup[r0>>12&63]+lookup[r0>>6&63]+lookup[r0&63]}function encodeChunk(r0,e0,n0){for(var a0,i0=[],s0=e0;s0<n0;s0+=3)a0=(r0[s0]<<16&16711680)+(r0[s0+1]<<8&65280)+(r0[s0+2]&255),i0.push(tripletToBase64(a0));return i0.join("")}function fromByteArray(r0){for(var e0,n0=r0.length,a0=n0%3,i0=[],s0=16383,o0=0,l0=n0-a0;o0<l0;o0+=s0)i0.push(encodeChunk(r0,o0,o0+s0>l0?l0:o0+s0));return a0===1?(e0=r0[n0-1],i0.push(lookup[e0>>2]+lookup[e0<<4&63]+"==")):a0===2&&(e0=(r0[n0-2]<<8)+r0[n0-1],i0.push(lookup[e0>>10]+lookup[e0>>4&63]+lookup[e0<<2&63]+"=")),i0.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource>
vendor: 24,947 bytes, lines 17-22
17 */ieee754.read=function(r0,e0,n0,a0,i0){var s0,o0,l0=i0*8-a0-1,c0=(1<<l0)-1,u0=c0>>1,d0=-7,h0=n0?i0-1:0,f0=n0?-1:1,p0=r0[e0+h0];for(h0+=f0,s0=p0&(1<<-d0)-1,p0>>=-d0,d0+=l0;d0>0;s0=s0*256+r0[e0+h0],h0+=f0,d0-=8);for(o0=s0&(1<<-d0)-1,s0>>=-d0,d0+=a0;d0>0;o0=o0*256+r0[e0+h0],h0+=f0,d0-=8);if(s0===0)s0=1-u0;else{if(s0===c0)return o0?NaN:(p0?-1:1)*(1/0);o0=o0+Math.pow(2,a0),s0=s0-u0}return(p0?-1:1)*o0*Math.pow(2,s0-a0)};ieee754.write=function(r0,e0,n0,a0,i0,s0){var o0,l0,c0,u0=s0*8-i0-1,d0=(1<<u0)-1,h0=d0>>1,f0=i0===23?Math.pow(2,-24)-Math.pow(2,-77):0,p0=a0?0:s0-1,A0=a0?1:-1,m0=e0<0||e0===0&&1/e0<0?1:0;for(e0=Math.abs(e0),isNaN(e0)||e0===1/0?(l0=isNaN(e0)?1:0,o0=d0):(o0=Math.floor(Math.log(e0)/Math.LN2),e0*(c0=Math.pow(2,-o0))<1&&(o0--,c0*=2),o0+h0>=1?e0+=f0/c0:e0+=f0*Math.pow(2,1-h0),e0*c0>=2&&(o0++,c0/=2),o0+h0>=d0?(l0=0,o0=d0):o0+h0>=1?(l0=(e0*c0-1)*Math.pow(2,i0),o0=o0+h0):(l0=e0*Math.pow(2,h0-1)*Math.pow(2,i0),o0=0));i0>=8;r0[n0+p0]=l0&255,p0+=A0,l0/=256,i0-=8);for(o0=o0<<i0|l0,u0+=i0;u0>0;r0[n0+p0]=o0&255,p0+=A0,o0/=256,u0-=8);r0[n0+p0-A0]|=m0*128};/*! 18 * The buffer module from node.js, for the browser. 19 * 20 * @author Feross Aboukhadijeh <https://feross.org> 21 * @license MIT 22 */(function(r0){const e0=base64Js,n0=ieee754,a0=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r0.Buffer=l0,r0.SlowBuffer=y0,r0.INSPECT_MAX_BYTES=50;const i0=2147483647;r0.kMaxLength=i0,l0.TYPED_ARRAY_SUPPORT=s0(),!l0.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s0(){try{const W0=new Uint8Array(1),P0={foo:function(){return 42}};return Object.setPrototypeOf(P0,Uint8Array.prototype),Object.setPrototypeOf(W0,P0),W0.foo()===42}catch{return!1}}Object.defineProperty(l0.prototype,"parent",{enumerable:!0,get:function(){if(l0.isBuffer(this))return this.buffer}}),Object.defineProperty(l0.prototype,"offset",{enumerable:!0,get:function(){if(l0.isBuffer(this))return this.byteOffset}});function o0(W0){if(W0>i0)throw new RangeError('The value "'+W0+'" is invalid for option "size"');const P0=new Uint8Array(W0);return Object.setPrototypeOf(P0,l0.prototype),P0}function l0(W0,P0,L0){if(typeof W0=="number"){if(typeof P0=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h0(W0)}return c0(W0,P0,L0)}l0.poolSize=8192;function c0(W0,P0,L0){if(typeof W0=="string")return f0(W0,P0);if(ArrayBuffer.isView(W0))return A0(W0);if(W0==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W0);if(Pw(W0,ArrayBuffer)||W0&&Pw(W0.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pw(W0,SharedArrayBuffer)||W0&&Pw(W0.buffer,SharedArrayBuffer)))return m0(W0,P0,L0);if(typeof W0=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z0=W0.valueOf&&W0.valueOf();if(Z0!=null&&Z0!==W0)return l0.from(Z0,P0,L0);const $w=x0(W0);if($w)return $w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof W0[Symbol.toPrimitive]=="function")return l0.from(W0[Symbol.toPrimitive]("string"),P0,L0);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W0)}l0.from=function(W0,P0,L0){return c0(W0,P0,L0)},Object.setPrototypeOf(l0.prototype,Uint8Array.prototype),Object.setPrototypeOf(l0,Uint8Array);function u0(W0){if(typeof W0!="number")throw new TypeError('"size" argument must be of type number');if(W0<0)throw new RangeError('The value "'+W0+'" is invalid for option "size"')}function d0(W0,P0,L0){return u0(W0),W0<=0?o0(W0):P0!==void 0?typeof L0=="string"?o0(W0).fill(P0,L0):o0(W0).fill(P0):o0(W0)}l0.alloc=function(W0,P0,L0){return d0(W0,P0,L0)};function h0(W0){return u0(W0),o0(W0<0?0:g0(W0)|0)}l0.allocUnsafe=function(W0){return h0(W0)},l0.allocUnsafeSlow=function(W0){return h0(W0)};function f0(W0,P0){if((typeof P0!="string"||P0==="")&&(P0="utf8"),!l0.isEncoding(P0))throw new TypeError("Unknown encoding: "+P0);const L0=b0(W0,P0)|0;let Z0=o0(L0);const $w=Z0.write(W0,P0);return $w!==L0&&(Z0=Z0.slice(0,$w)),Z0}function p0(W0){const P0=W0.length<0?0:g0(W0.length)|0,L0=o0(P0);for(let Z0=0;Z0<P0;Z0+=1)L0[Z0]=W0[Z0]&255;return L0}function A0(W0){if(Pw(W0,Uint8Array)){const P0=new Uint8Array(W0);return m0(P0.buffer,P0.byteOffset,P0.byteLength)}return p0(W0)}function m0(W0,P0,L0){if(P0<0||W0.byteLength<P0)throw new RangeError('"offset" is outside of buffer bounds');if(W0.byteLength<P0+(L0||0))throw new RangeError('"length" is outside of buffer bounds');let Z0;return P0===void 0&&L0===void 0?Z0=new Uint8Array(W0):L0===void 0?Z0=new Uint8Array(W0,P0):Z0=new Uint8Array(W0,P0,L0),Object.setPrototypeOf(Z0,l0.prototype),Z0}function x0(W0){if(l0.isBuffer(W0)){const P0=g0(W0.length)|0,L0=o0(P0);return L0.length===0||W0.copy(L0,0,0,P0),L0}if(W0.length!==void 0)return typeof W0.length!="number"||Qw(W0.length)?o0(0):p0(W0);if(W0.type==="Buffer"&&Array.isArray(W0.data))return p0(W0.data)}function g0(W0){if(W0>=i0)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i0.toString(16)+" bytes");return W0|0}function y0(W0){return+W0!=W0&&(W0=0),l0.alloc(+W0)}l0.isBuffer=function(P0){return P0!=null&&P0._isBuffer===!0&&P0!==l0.prototype},l0.compare=function(P0,L0){if(Pw(P0,Uint8Array)&&(P0=l0.from(P0,P0.offset,P0.byteLength)),Pw(L0,Uint8Array)&&(L0=l0.from(L0,L0.offset,L0.byteLength)),!l0.isBuffer(P0)||!l0.isBuffer(L0))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P0===L0)return 0;let Z0=P0.length,$w=L0.length;for(let Bw=0,Vw=Math.min(Z0,$w);Bw<Vw;++Bw)if(P0[Bw]!==L0[Bw]){Z0=P0[Bw],$w=L0[Bw];break}return Z0<$w?-1:$w<Z0?1:0},l0.isEncoding=function(P0){switch(String(P0).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l0.concat=function(P0,L0){if(!Array.isArray(P0))throw new TypeError('"list" argument must be an Array of Buffers');if(P0.length===0)return l0.alloc(0);let Z0;if(L0===void 0)for(L0=0,Z0=0;Z0<P0.length;++Z0)L0+=P0[Z0].length;const $w=l0.allocUnsafe(L0);let Bw=0;for(Z0=0;Z0<P0.length;++Z0){let Vw=P0[Z0];if(Pw(Vw,Uint8Array))Bw+Vw.length>$w.length?(l0.isBuffer(Vw)||(Vw=l0.from(Vw)),Vw.copy($w,Bw)):Uint8Array.prototype.set.call($w,Vw,Bw);else if(l0.isBuffer(Vw))Vw.copy($w,Bw);else throw new TypeError('"list" argument must be an Array of Buffers');Bw+=Vw.length}return $w};function b0(W0,P0){if(l0.isBuffer(W0))return W0.length;if(ArrayBuffer.isView(W0)||Pw(W0,ArrayBuffer))return W0.byteLength;if(typeof W0!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W0);const L0=W0.length,Z0=arguments.length>2&&arguments[2]===!0;if(!Z0&&L0===0)return 0;let $w=!1;for(;;)switch(P0){case"ascii":case"latin1":case"binary":return L0;case"utf8":case"utf-8":return Ww(W0).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L0*2;case"hex":return L0>>>1;case"base64":return l1(W0).length;default:if($w)return Z0?-1:Ww(W0).length;P0=(""+P0).toLowerCase(),$w=!0}}l0.byteLength=b0;function E0(W0,P0,L0){let Z0=!1;if((P0===void 0||P0<0)&&(P0=0),P0>this.length||((L0===void 0||L0>this.length)&&(L0=this.length),L0<=0)||(L0>>>=0,P0>>>=0,L0<=P0))return"";for(W0||(W0="utf8");;)switch(W0){case"hex":return B0(this,P0,L0);case"utf8":case"utf-8":return I0(this,P0,L0);case"ascii":return D0(this,P0,L0);case"latin1":case"binary":return O0(this,P0,L0);case"base64":return T0(this,P0,L0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z0(this,P0,L0);default:if(Z0)throw new TypeError("Unknown encoding: "+W0);W0=(W0+"").toLowerCase(),Z0=!0}}l0.prototype._isBuffer=!0;function w0(W0,P0,L0){const Z0=W0[P0];W0[P0]=W0[L0],W0[L0]=Z0}l0.prototype.swap16=function(){const P0=this.length;if(P0%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let L0=0;L0<P0;L0+=2)w0(this,L0,L0+1);return this},l0.prototype.swap32=function(){const P0=this.length;if(P0%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let L0=0;L0<P0;L0+=4)w0(this,L0,L0+3),w0(this,L0+1,L0+2);return this},l0.prototype.swap64=function(){const P0=this.length;if(P0%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let L0=0;L0<P0;L0+=8)w0(this,L0,L0+7),w0(this,L0+1,L0+6),w0(this,L0+2,L0+5),w0(this,L0+3,L0+4);return this},l0.prototype.toString=function(){const P0=this.length;return P0===0?"":arguments.length===0?I0(this,0,P0):E0.apply(this,arguments)},l0.prototype.toLocaleString=l0.prototype.toString,l0.prototype.equals=function(P0){if(!l0.isBuffer(P0))throw new TypeError("Argument must be a Buffer");return this===P0?!0:l0.compare(this,P0)===0},l0.prototype.inspect=function(){let P0="";const L0=r0.INSPECT_MAX_BYTES;return P0=this.toString("hex",0,L0).replace(/(.{2})/g,"$1 ").trim(),this.length>L0&&(P0+=" ... "),"<Buffer "+P0+">"},a0&&(l0.prototype[a0]=l0.prototype.inspect),l0.prototype.compare=function(P0,L0,Z0,$w,Bw){if(Pw(P0,Uint8Array)&&(P0=l0.from(P0,P0.offset,P0.byteLength)),!l0.isBuffer(P0))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P0);if(L0===void 0&&(L0=0),Z0===void 0&&(Z0=P0?P0.length:0),$w===void 0&&($w=0),Bw===void 0&&(Bw=this.length),L0<0||Z0>P0.length||$w<0||Bw>this.length)throw new RangeError("out of range index");if($w>=Bw&&L0>=Z0)return 0;if($w>=Bw)return-1;if(L0>=Z0)return 1;if(L0>>>=0,Z0>>>=0,$w>>>=0,Bw>>>=0,this===P0)return 0;let Vw=Bw-$w,Dw=Z0-L0;const Kw=Math.min(Vw,Dw),i1=this.slice($w,Bw),m1=P0.slice(L0,Z0);for(let qw=0;qw<Kw;++qw)if(i1[qw]!==m1[qw]){Vw=i1[qw],Dw=m1[qw];break}return Vw<Dw?-1:Dw<Vw?1:0};function v0(W0,P0,L0,Z0,$w){if(W0.length===0)return-1;if(typeof L0=="string"?(Z0=L0,L0=0):L0>2147483647?L0=2147483647:L0<-2147483648&&(L0=-2147483648),L0=+L0,Qw(L0)&&(L0=$w?0:W0.length-1),L0<0&&(L0=W0.length+L0),L0>=W0.length){if($w)return-1;L0=W0.length-1}else if(L0<0)if($w)L0=0;else return-1;if(typeof P0=="string"&&(P0=l0.from(P0,Z0)),l0.isBuffer(P0))return P0.length===0?-1:S0(W0,P0,L0,Z0,$w);if(typeof P0=="number")return P0=P0&255,typeof Uint8Array.prototype.indexOf=="function"?$w?Uint8Array.prototype.indexOf.call(W0,P0,L0):Uint8Array.prototype.lastIndexOf.call(W0,P0,L0):S0(W0,[P0],L0,Z0,$w);throw new TypeError("val must be string, number or Buffer")}function S0(W0,P0,L0,Z0,$w){let Bw=1,Vw=W0.length,Dw=P0.length;if(Z0!==void 0&&(Z0=String(Z0).toLowerCase(),Z0==="ucs2"||Z0==="ucs-2"||Z0==="utf16le"||Z0==="utf-16le")){if(W0.length<2||P0.length<2)return-1;Bw=2,Vw/=2,Dw/=2,L0/=2}function Kw(m1,qw){return Bw===1?m1[qw]:m1.readUInt16BE(qw*Bw)}let i1;if($w){let m1=-1;for(i1=L0;i1<Vw;i1++)if(Kw(W0,i1)===Kw(P0,m1===-1?0:i1-m1)){if(m1===-1&&(m1=i1),i1-m1+1===Dw)return m1*Bw}else m1!==-1&&(i1-=i1-m1),m1=-1}else for(L0+Dw>Vw&&(L0=Vw-Dw),i1=L0;i1>=0;i1--){let m1=!0;for(let qw=0;qw<Dw;qw++)if(Kw(W0,i1+qw)!==Kw(P0,qw)){m1=!1;break}if(m1)return i1}return-1}l0.prototype.includes=function(P0,L0,Z0){return this.indexOf(P0,L0,Z0)!==-1},l0.prototype.indexOf=function(P0,L0,Z0){return v0(this,P0,L0,Z0,!0)},l0.prototype.lastIndexOf=function(P0,L0,Z0){return v0(this,P0,L0,Z0,!1)};function k0(W0,P0,L0,Z0){L0=Number(L0)||0;const $w=W0.length-L0;Z0?(Z0=Number(Z0),Z0>$w&&(Z0=$w)):Z0=$w;const Bw=P0.length;Z0>Bw/2&&(Z0=Bw/2);let Vw;for(Vw=0;Vw<Z0;++Vw){const Dw=parseInt(P0.substr(Vw*2,2),16);if(Qw(Dw))return Vw;W0[L0+Vw]=Dw}return Vw}function R0(W0,P0,L0,Z0){return p1(Ww(P0,W0.length-L0),W0,L0,Z0)}function j0(W0,P0,L0,Z0){return p1(r1(P0),W0,L0,Z0)}function C0(W0,P0,L0,Z0){return p1(l1(P0),W0,L0,Z0)}function $0(W0,P0,L0,Z0){return p1(Yw(P0,W0.length-L0),W0,L0,Z0)}l0.prototype.write=function(P0,L0,Z0,$w){if(L0===void 0)$w="utf8",Z0=this.length,L0=0;else if(Z0===void 0&&typeof L0=="string")$w=L0,Z0=this.length,L0=0;else if(isFinite(L0))L0=L0>>>0,isFinite(Z0)?(Z0=Z0>>>0,$w===void 0&&($w="utf8")):($w=Z0,Z0=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Bw=this.length-L0;if((Z0===void 0||Z0>Bw)&&(Z0=Bw),P0.length>0&&(Z0<0||L0<0)||L0>this.length)throw new RangeError("Attempt to write outside buffer bounds");$w||($w="utf8");let Vw=!1;for(;;)switch($w){case"hex":return k0(this,P0,L0,Z0);case"utf8":case"utf-8":return R0(this,P0,L0,Z0);case"ascii":case"latin1":case"binary":return j0(this,P0,L0,Z0);case"base64":return C0(this,P0,L0,Z0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $0(this,P0,L0,Z0);default:if(Vw)throw new TypeError("Unknown encoding: "+$w);$w=(""+$w).toLowerCase(),Vw=!0}},l0.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T0(W0,P0,L0){return P0===0&&L0===W0.length?e0.fromByteArray(W0):e0.fromByteArray(W0.slice(P0,L0))}function I0(W0,P0,L0){L0=Math.min(W0.length,L0);const Z0=[];let $w=P0;for(;$w<L0;){const Bw=W0[$w];let Vw=null,Dw=Bw>239?4:Bw>223?3:Bw>191?2:1;if($w+Dw<=L0){let Kw,i1,m1,qw;switch(Dw){case 1:Bw<128&&(Vw=Bw);break;case 2:Kw=W0[$w+1],(Kw&192)===128&&(qw=(Bw&31)<<6|Kw&63,qw>127&&(Vw=qw));break;case 3:Kw=W0[$w+1],i1=W0[$w+2],(Kw&192)===128&&(i1&192)===128&&(qw=(Bw&15)<<12|(Kw&63)<<6|i1&63,qw>2047&&(qw<55296||qw>57343)&&(Vw=qw));break;case 4:Kw=W0[$w+1],i1=W0[$w+2],m1=W0[$w+3],(Kw&192)===128&&(i1&192)===128&&(m1&192)===128&&(qw=(Bw&15)<<18|(Kw&63)<<12|(i1&63)<<6|m1&63,qw>65535&&qw<1114112&&(Vw=qw))}}Vw===null?(Vw=65533,Dw=1):Vw>65535&&(Vw-=65536,Z0.push(Vw>>>10&1023|55296),Vw=56320|Vw&1023),Z0.push(Vw),$w+=Dw}return N0(Z0)}const M0=4096;function N0(W0){const P0=W0.length;if(P0<=M0)return String.fromCharCode.apply(String,W0);let L0="",Z0=0;for(;Z0<P0;)L0+=String.fromCharCode.apply(String,W0.slice(Z0,Z0+=M0));return L0}function D0(W0,P0,L0){let Z0="";L0=Math.min(W0.length,L0);for(let $w=P0;$w<L0;++$w)Z0+=String.fromCharCode(W0[$w]&127);return Z0}function O0(W0,P0,L0){let Z0="";L0=Math.min(W0.length,L0);for(let $w=P0;$w<L0;++$w)Z0+=String.fromCharCode(W0[$w]);return Z0}function B0(W0,P0,L0){const Z0=W0.length;(!P0||P0<0)&&(P0=0),(!L0||L0<0||L0>Z0)&&(L0=Z0);let $w="";for(let Bw=P0;Bw<L0;++Bw)$w+=Xw[W0[Bw]];return $w}function z0(W0,P0,L0){const Z0=W0.slice(P0,L0);let $w="";for(let Bw=0;Bw<Z0.length-1;Bw+=2)$w+=String.fromCharCode(Z0[Bw]+Z0[Bw+1]*256);return $w}l0.prototype.slice=function(P0,L0){const Z0=this.length;P0=~~P0,L0=L0===void 0?Z0:~~L0,P0<0?(P0+=Z0,P0<0&&(P0=0)):P0>Z0&&(P0=Z0),L0<0?(L0+=Z0,L0<0&&(L0=0)):L0>Z0&&(L0=Z0),L0<P0&&(L0=P0);const $w=this.subarray(P0,L0);return Object.setPrototypeOf($w,l0.prototype),$w};function G0(W0,P0,L0){if(W0%1!==0||W0<0)throw new RangeError("offset is not uint");if(W0+P0>L0)throw new RangeError("Trying to access beyond buffer length")}l0.prototype.readUintLE=l0.prototype.readUIntLE=function(P0,L0,Z0){P0=P0>>>0,L0=L0>>>0,Z0||G0(P0,L0,this.length);let $w=this[P0],Bw=1,Vw=0;for(;++Vw<L0&&(Bw*=256);)$w+=this[P0+Vw]*Bw;return $w},l0.prototype.readUintBE=l0.prototype.readUIntBE=function(P0,L0,Z0){P0=P0>>>0,L0=L0>>>0,Z0||G0(P0,L0,this.length);let $w=this[P0+--L0],Bw=1;for(;L0>0&&(Bw*=256);)$w+=this[P0+--L0]*Bw;return $w},l0.prototype.readUint8=l0.prototype.readUInt8=function(P0,L0){return P0=P0>>>0,L0||G0(P0,1,this.length),this[P0]},l0.prototype.readUint16LE=l0.prototype.readUInt16LE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,2,this.length),this[P0]|this[P0+1]<<8},l0.prototype.readUint16BE=l0.prototype.readUInt16BE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,2,this.length),this[P0]<<8|this[P0+1]},l0.prototype.readUint32LE=l0.prototype.readUInt32LE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),(this[P0]|this[P0+1]<<8|this[P0+2]<<16)+this[P0+3]*16777216},l0.prototype.readUint32BE=l0.prototype.readUInt32BE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),this[P0]*16777216+(this[P0+1]<<16|this[P0+2]<<8|this[P0+3])},l0.prototype.readBigUInt64LE=f1(function(P0){P0=P0>>>0,xw(P0,"offset");const L0=this[P0],Z0=this[P0+7];(L0===void 0||Z0===void 0)&&X0(P0,this.length-8);const $w=L0+this[++P0]*2**8+this[++P0]*2**16+this[++P0]*2**24,Bw=this[++P0]+this[++P0]*2**8+this[++P0]*2**16+Z0*2**24;return BigInt($w)+(BigInt(Bw)<<BigInt(32))}),l0.prototype.readBigUInt64BE=f1(function(P0){P0=P0>>>0,xw(P0,"offset");const L0=this[P0],Z0=this[P0+7];(L0===void 0||Z0===void 0)&&X0(P0,this.length-8);const $w=L0*2**24+this[++P0]*2**16+this[++P0]*2**8+this[++P0],Bw=this[++P0]*2**24+this[++P0]*2**16+this[++P0]*2**8+Z0;return(BigInt($w)<<BigInt(32))+BigInt(Bw)}),l0.prototype.readIntLE=function(P0,L0,Z0){P0=P0>>>0,L0=L0>>>0,Z0||G0(P0,L0,this.length);let $w=this[P0],Bw=1,Vw=0;for(;++Vw<L0&&(Bw*=256);)$w+=this[P0+Vw]*Bw;return Bw*=128,$w>=Bw&&($w-=Math.pow(2,8*L0)),$w},l0.prototype.readIntBE=function(P0,L0,Z0){P0=P0>>>0,L0=L0>>>0,Z0||G0(P0,L0,this.length);let $w=L0,Bw=1,Vw=this[P0+--$w];for(;$w>0&&(Bw*=256);)Vw+=this[P0+--$w]*Bw;return Bw*=128,Vw>=Bw&&(Vw-=Math.pow(2,8*L0)),Vw},l0.prototype.readInt8=function(P0,L0){return P0=P0>>>0,L0||G0(P0,1,this.length),this[P0]&128?(255-this[P0]+1)*-1:this[P0]},l0.prototype.readInt16LE=function(P0,L0){P0=P0>>>0,L0||G0(P0,2,this.length);const Z0=this[P0]|this[P0+1]<<8;return Z0&32768?Z0|4294901760:Z0},l0.prototype.readInt16BE=function(P0,L0){P0=P0>>>0,L0||G0(P0,2,this.length);const Z0=this[P0+1]|this[P0]<<8;return Z0&32768?Z0|4294901760:Z0},l0.prototype.readInt32LE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),this[P0]|this[P0+1]<<8|this[P0+2]<<16|this[P0+3]<<24},l0.prototype.readInt32BE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),this[P0]<<24|this[P0+1]<<16|this[P0+2]<<8|this[P0+3]},l0.prototype.readBigInt64LE=f1(function(P0){P0=P0>>>0,xw(P0,"offset");const L0=this[P0],Z0=this[P0+7];(L0===void 0||Z0===void 0)&&X0(P0,this.length-8);const $w=this[P0+4]+this[P0+5]*2**8+this[P0+6]*2**16+(Z0<<24);return(BigInt($w)<<BigInt(32))+BigInt(L0+this[++P0]*2**8+this[++P0]*2**16+this[++P0]*2**24)}),l0.prototype.readBigInt64BE=f1(function(P0){P0=P0>>>0,xw(P0,"offset");const L0=this[P0],Z0=this[P0+7];(L0===void 0||Z0===void 0)&&X0(P0,this.length-8);const $w=(L0<<24)+this[++P0]*2**16+this[++P0]*2**8+this[++P0];return(BigInt($w)<<BigInt(32))+BigInt(this[++P0]*2**24+this[++P0]*2**16+this[++P0]*2**8+Z0)}),l0.prototype.readFloatLE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),n0.read(this,P0,!0,23,4)},l0.prototype.readFloatBE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,4,this.length),n0.read(this,P0,!1,23,4)},l0.prototype.readDoubleLE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,8,this.length),n0.read(this,P0,!0,52,8)},l0.prototype.readDoubleBE=function(P0,L0){return P0=P0>>>0,L0||G0(P0,8,this.length),n0.read(this,P0,!1,52,8)};function F0(W0,P0,L0,Z0,$w,Bw){if(!l0.isBuffer(W0))throw new TypeError('"buffer" argument must be a Buffer instance');if(P0>$w||P0<Bw)throw new RangeError('"value" argument is out of bounds');if(L0+Z0>W0.length)throw new RangeError("Index out of range")}l0.prototype.writeUintLE=l0.prototype.writeUIntLE=function(P0,L0,Z0,$w){if(P0=+P0,L0=L0>>>0,Z0=Z0>>>0,!$w){const Dw=Math.pow(2,8*Z0)-1;F0(this,P0,L0,Z0,Dw,0)}let Bw=1,Vw=0;for(this[L0]=P0&255;++Vw<Z0&&(Bw*=256);)this[L0+Vw]=P0/Bw&255;return L0+Z0},l0.prototype.writeUintBE=l0.prototype.writeUIntBE=function(P0,L0,Z0,$w){if(P0=+P0,L0=L0>>>0,Z0=Z0>>>0,!$w){const Dw=Math.pow(2,8*Z0)-1;F0(this,P0,L0,Z0,Dw,0)}let Bw=Z0-1,Vw=1;for(this[L0+Bw]=P0&255;--Bw>=0&&(Vw*=256);)this[L0+Bw]=P0/Vw&255;return L0+Z0},l0.prototype.writeUint8=l0.prototype.writeUInt8=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,1,255,0),this[L0]=P0&255,L0+1},l0.prototype.writeUint16LE=l0.prototype.writeUInt16LE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,2,65535,0),this[L0]=P0&255,this[L0+1]=P0>>>8,L0+2},l0.prototype.writeUint16BE=l0.prototype.writeUInt16BE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,2,65535,0),this[L0]=P0>>>8,this[L0+1]=P0&255,L0+2},l0.prototype.writeUint32LE=l0.prototype.writeUInt32LE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,4,4294967295,0),this[L0+3]=P0>>>24,this[L0+2]=P0>>>16,this[L0+1]=P0>>>8,this[L0]=P0&255,L0+4},l0.prototype.writeUint32BE=l0.prototype.writeUInt32BE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,4,4294967295,0),this[L0]=P0>>>24,this[L0+1]=P0>>>16,this[L0+2]=P0>>>8,this[L0+3]=P0&255,L0+4};function Q0(W0,P0,L0,Z0,$w){Nw(P0,Z0,$w,W0,L0,7);let Bw=Number(P0&BigInt(4294967295));W0[L0++]=Bw,Bw=Bw>>8,W0[L0++]=Bw,Bw=Bw>>8,W0[L0++]=Bw,Bw=Bw>>8,W0[L0++]=Bw;let Vw=Number(P0>>BigInt(32)&BigInt(4294967295));return W0[L0++]=Vw,Vw=Vw>>8,W0[L0++]=Vw,Vw=Vw>>8,W0[L0++]=Vw,Vw=Vw>>8,W0[L0++]=Vw,L0}function U0(W0,P0,L0,Z0,$w){Nw(P0,Z0,$w,W0,L0,7);let Bw=Number(P0&BigInt(4294967295));W0[L0+7]=Bw,Bw=Bw>>8,W0[L0+6]=Bw,Bw=Bw>>8,W0[L0+5]=Bw,Bw=Bw>>8,W0[L0+4]=Bw;let Vw=Number(P0>>BigInt(32)&BigInt(4294967295));return W0[L0+3]=Vw,Vw=Vw>>8,W0[L0+2]=Vw,Vw=Vw>>8,W0[L0+1]=Vw,Vw=Vw>>8,W0[L0]=Vw,L0+8}l0.prototype.writeBigUInt64LE=f1(function(P0,L0=0){return Q0(this,P0,L0,BigInt(0),BigInt("0xffffffffffffffff"))}),l0.prototype.writeBigUInt64BE=f1(function(P0,L0=0){return U0(this,P0,L0,BigInt(0),BigInt("0xffffffffffffffff"))}),l0.prototype.writeIntLE=function(P0,L0,Z0,$w){if(P0=+P0,L0=L0>>>0,!$w){const Kw=Math.pow(2,8*Z0-1);F0(this,P0,L0,Z0,Kw-1,-Kw)}let Bw=0,Vw=1,Dw=0;for(this[L0]=P0&255;++Bw<Z0&&(Vw*=256);)P0<0&&Dw===0&&this[L0+Bw-1]!==0&&(Dw=1),this[L0+Bw]=(P0/Vw>>0)-Dw&255;return L0+Z0},l0.prototype.writeIntBE=function(P0,L0,Z0,$w){if(P0=+P0,L0=L0>>>0,!$w){const Kw=Math.pow(2,8*Z0-1);F0(this,P0,L0,Z0,Kw-1,-Kw)}let Bw=Z0-1,Vw=1,Dw=0;for(this[L0+Bw]=P0&255;--Bw>=0&&(Vw*=256);)P0<0&&Dw===0&&this[L0+Bw+1]!==0&&(Dw=1),this[L0+Bw]=(P0/Vw>>0)-Dw&255;return L0+Z0},l0.prototype.writeInt8=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,1,127,-128),P0<0&&(P0=255+P0+1),this[L0]=P0&255,L0+1},l0.prototype.writeInt16LE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,2,32767,-32768),this[L0]=P0&255,this[L0+1]=P0>>>8,L0+2},l0.prototype.writeInt16BE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,2,32767,-32768),this[L0]=P0>>>8,this[L0+1]=P0&255,L0+2},l0.prototype.writeInt32LE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,4,2147483647,-2147483648),this[L0]=P0&255,this[L0+1]=P0>>>8,this[L0+2]=P0>>>16,this[L0+3]=P0>>>24,L0+4},l0.prototype.writeInt32BE=function(P0,L0,Z0){return P0=+P0,L0=L0>>>0,Z0||F0(this,P0,L0,4,2147483647,-2147483648),P0<0&&(P0=4294967295+P0+1),this[L0]=P0>>>24,this[L0+1]=P0>>>16,this[L0+2]=P0>>>8,this[L0+3]=P0&255,L0+4},l0.prototype.writeBigInt64LE=f1(function(P0,L0=0){return Q0(this,P0,L0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l0.prototype.writeBigInt64BE=f1(function(P0,L0=0){return U0(this,P0,L0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function q0(W0,P0,L0,Z0,$w,Bw){if(L0+Z0>W0.length)throw new RangeError("Index out of range");if(L0<0)throw new RangeError("Index out of range")}function Rw(W0,P0,L0,Z0,$w){return P0=+P0,L0=L0>>>0,$w||q0(W0,P0,L0,4),n0.write(W0,P0,L0,Z0,23,4),L0+4}l0.prototype.writeFloatLE=function(P0,L0,Z0){return Rw(this,P0,L0,!0,Z0)},l0.prototype.writeFloatBE=function(P0,L0,Z0){return Rw(this,P0,L0,!1,Z0)};function _w(W0,P0,L0,Z0,$w){return P0=+P0,L0=L0>>>0,$w||q0(W0,P0,L0,8),n0.write(W0,P0,L0,Z0,52,8),L0+8}l0.prototype.writeDoubleLE=function(P0,L0,Z0){return _w(this,P0,L0,!0,Z0)},l0.prototype.writeDoubleBE=function(P0,L0,Z0){return _w(this,P0,L0,!1,Z0)},l0.prototype.copy=function(P0,L0,Z0,$w){if(!l0.isBuffer(P0))throw new TypeError("argument should be a Buffer");if(Z0||(Z0=0),!$w&&$w!==0&&($w=this.length),L0>=P0.length&&(L0=P0.length),L0||(L0=0),$w>0&&$w<Z0&&($w=Z0),$w===Z0||P0.length===0||this.length===0)return 0;if(L0<0)throw new RangeError("targetStart out of bounds");if(Z0<0||Z0>=this.length)throw new RangeError("Index out of range");if($w<0)throw new RangeError("sourceEnd out of bounds");$w>this.length&&($w=this.length),P0.length-L0<$w-Z0&&($w=P0.length-L0+Z0);const Bw=$w-Z0;return this===P0&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(L0,Z0,$w):Uint8Array.prototype.set.call(P0,this.subarray(Z0,$w),L0),Bw},l0.prototype.fill=function(P0,L0,Z0,$w){if(typeof P0=="string"){if(typeof L0=="string"?($w=L0,L0=0,Z0=this.length):typeof Z0=="string"&&($w=Z0,Z0=this.length),$w!==void 0&&typeof $w!="string")throw new TypeError("encoding must be a string");if(typeof $w=="string"&&!l0.isEncoding($w))throw new TypeError("Unknown encoding: "+$w);if(P0.length===1){const Vw=P0.charCodeAt(0);($w==="utf8"&&Vw<128||$w==="latin1")&&(P0=Vw)}}else typeof P0=="number"?P0=P0&255:typeof P0=="boolean"&&(P0=Number(P0));if(L0<0||this.length<L0||this.length<Z0)throw new RangeError("Out of range index");if(Z0<=L0)return this;L0=L0>>>0,Z0=Z0===void 0?this.length:Z0>>>
vendor: 4,617 bytes, lines 22-30
220,P0||(P0=0);let Bw;if(typeof P0=="number")for(Bw=L0;Bw<Z0;++Bw)this[Bw]=P0;else{const Vw=l0.isBuffer(P0)?P0:l0.from(P0,$w),Dw=Vw.length;if(Dw===0)throw new TypeError('The value "'+P0+'" is invalid for argument "value"');for(Bw=0;Bw<Z0-L0;++Bw)this[Bw+L0]=Vw[Bw%Dw]}return this};const J0={};function Cw(W0,P0,L0){J0[W0]=class extends L0{constructor(){super(),Object.defineProperty(this,"message",{value:P0.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${W0}]`,this.stack,delete this.name}get code(){return W0}set code($w){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$w,writable:!0})}toString(){return`${this.name} [${W0}]: ${this.message}`}}}Cw("ERR_BUFFER_OUT_OF_BOUNDS",function(W0){return W0?`${W0} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Cw("ERR_INVALID_ARG_TYPE",function(W0,P0){return`The "${W0}" argument must be of type number. Received type ${typeof P0}`},TypeError),Cw("ERR_OUT_OF_RANGE",function(W0,P0,L0){let Z0=`The value of "${W0}" is out of range.`,$w=L0;return Number.isInteger(L0)&&Math.abs(L0)>2**32?$w=Ow(String(L0)):typeof L0=="bigint"&&($w=String(L0),(L0>BigInt(2)**BigInt(32)||L0<-(BigInt(2)**BigInt(32)))&&($w=Ow($w)),$w+="n"),Z0+=` It must be ${P0}. Received ${$w}`,Z0},RangeError);function Ow(W0){let P0="",L0=W0.length;const Z0=W0[0]==="-"?1:0;for(;L0>=Z0+4;L0-=3)P0=`_${W0.slice(L0-3,L0)}${P0}`;return`${W0.slice(0,L0)}${P0}`}function jw(W0,P0,L0){xw(P0,"offset"),(W0[P0]===void 0||W0[P0+L0]===void 0)&&X0(P0,W0.length-(L0+1))}function Nw(W0,P0,L0,Z0,$w,Bw){if(W0>L0||W0<P0){const Vw=typeof P0=="bigint"?"n":"";let Dw;throw P0===0||P0===BigInt(0)?Dw=`>= 0${Vw} and < 2${Vw} ** ${(Bw+1)*8}${Vw}`:Dw=`>= -(2${Vw} ** ${(Bw+1)*8-1}${Vw}) and < 2 ** ${(Bw+1)*8-1}${Vw}`,new J0.ERR_OUT_OF_RANGE("value",Dw,W0)}jw(Z0,$w,Bw)}function xw(W0,P0){if(typeof W0!="number")throw new J0.ERR_INVALID_ARG_TYPE(P0,"number",W0)}function X0(W0,P0,L0){throw Math.floor(W0)!==W0?(xw(W0,L0),new J0.ERR_OUT_OF_RANGE("offset","an integer",W0)):P0<0?new J0.ERR_BUFFER_OUT_OF_BOUNDS:new J0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${P0}`,W0)}const Lw=/[^+/0-9A-Za-z-_]/g;function Hw(W0){if(W0=W0.split("=")[0],W0=W0.trim().replace(Lw,""),W0.length<2)return"";for(;W0.length%4!==0;)W0=W0+"=";return W0}function Ww(W0,P0){P0=P0||1/0;let L0;const Z0=W0.length;let $w=null;const Bw=[];for(let Vw=0;Vw<Z0;++Vw){if(L0=W0.charCodeAt(Vw),L0>55295&&L0<57344){if(!$w){if(L0>56319){(P0-=3)>-1&&Bw.push(239,191,189);continue}else if(Vw+1===Z0){(P0-=3)>-1&&Bw.push(239,191,189);continue}$w=L0;continue}if(L0<56320){(P0-=3)>-1&&Bw.push(239,191,189),$w=L0;continue}L0=($w-55296<<10|L0-56320)+65536}else $w&&(P0-=3)>-1&&Bw.push(239,191,189);if($w=null,L0<128){if((P0-=1)<0)break;Bw.push(L0)}else if(L0<2048){if((P0-=2)<0)break;Bw.push(L0>>6|192,L0&63|128)}else if(L0<65536){if((P0-=3)<0)break;Bw.push(L0>>12|224,L0>>6&63|128,L0&63|128)}else if(L0<1114112){if((P0-=4)<0)break;Bw.push(L0>>18|240,L0>>12&63|128,L0>>6&63|128,L0&63|128)}else throw new Error("Invalid code point")}return Bw}function r1(W0){const P0=[];for(let L0=0;L0<W0.length;++L0)P0.push(W0.charCodeAt(L0)&255);return P0}function Yw(W0,P0){let L0,Z0,$w;const Bw=[];for(let Vw=0;Vw<W0.length&&!((P0-=2)<0);++Vw)L0=W0.charCodeAt(Vw),Z0=L0>>8,$w=L0%256,Bw.push($w),Bw.push(Z0);return Bw}function l1(W0){return e0.toByteArray(Hw(W0))}function p1(W0,P0,L0,Z0){let $w;for($w=0;$w<Z0&&!($w+L0>=P0.length||$w>=W0.length);++$w)P0[$w+L0]=W0[$w];return $w}function Pw(W0,P0){return W0 instanceof P0||W0!=null&&W0.constructor!=null&&W0.constructor.name!=null&&W0.constructor.name===P0.name}function Qw(W0){return W0!==W0}const Xw=function(){const W0="0123456789abcdef",P0=new Array(256);for(let L0=0;L0<16;++L0){const Z0=L0*16;for(let $w=0;$w<16;++$w)P0[Z0+$w]=W0[L0]+W0[$w]}return P0}();function f1(W0){return typeof BigInt>"u"?u1:W0}function u1(){throw new Error("BigInt not supported")}})(buffer);var reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/** 23 * @license React 24 * scheduler.production.min.js 25 * 26 * Copyright (c) Facebook, Inc. and its affiliates. 27 * 28 * This source code is licensed under the MIT license found in the 29 * LICENSE file in the root directory of this source tree. 30 */(function(r0){function e0(O0,B0){var z0=O0.length;O0.push(B0);e:for(;0<z0;){var G0=z0-1>>>1,F0=O0[G0];if(0<i0(F0,B0))O0[G0]=B0,O0[z0]=F0,z0=G0;else break e}}function n0(O0){return O0.length===0?null:O0[0]}function a0(O0){if(O0.length===0)return null;var B0=O0[0],z0=O0.pop();if(z0!==B0){O0[0]=z0;e:for(var G0=0,F0=O0.length,Q0=F0>
vendor: 9,914 bytes, lines 30-38
30>>1;G0<Q0;){var U0=2*(G0+1)-1,q0=O0[U0],Rw=U0+1,_w=O0[Rw];if(0>i0(q0,z0))Rw<F0&&0>i0(_w,q0)?(O0[G0]=_w,O0[Rw]=z0,G0=Rw):(O0[G0]=q0,O0[U0]=z0,G0=U0);else if(Rw<F0&&0>i0(_w,z0))O0[G0]=_w,O0[Rw]=z0,G0=Rw;else break e}}return B0}function i0(O0,B0){var z0=O0.sortIndex-B0.sortIndex;return z0!==0?z0:O0.id-B0.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s0=performance;r0.unstable_now=function(){return s0.now()}}else{var o0=Date,l0=o0.now();r0.unstable_now=function(){return o0.now()-l0}}var c0=[],u0=[],d0=1,h0=null,f0=3,p0=!1,A0=!1,m0=!1,x0=typeof setTimeout=="function"?setTimeout:null,g0=typeof clearTimeout=="function"?clearTimeout:null,y0=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b0(O0){for(var B0=n0(u0);B0!==null;){if(B0.callback===null)a0(u0);else if(B0.startTime<=O0)a0(u0),B0.sortIndex=B0.expirationTime,e0(c0,B0);else break;B0=n0(u0)}}function E0(O0){if(m0=!1,b0(O0),!A0)if(n0(c0)!==null)A0=!0,N0(w0);else{var B0=n0(u0);B0!==null&&D0(E0,B0.startTime-O0)}}function w0(O0,B0){A0=!1,m0&&(m0=!1,g0(k0),k0=-1),p0=!0;var z0=f0;try{for(b0(B0),h0=n0(c0);h0!==null&&(!(h0.expirationTime>B0)||O0&&!C0());){var G0=h0.callback;if(typeof G0=="function"){h0.callback=null,f0=h0.priorityLevel;var F0=G0(h0.expirationTime<=B0);B0=r0.unstable_now(),typeof F0=="function"?h0.callback=F0:h0===n0(c0)&&a0(c0),b0(B0)}else a0(c0);h0=n0(c0)}if(h0!==null)var Q0=!0;else{var U0=n0(u0);U0!==null&&D0(E0,U0.startTime-B0),Q0=!1}return Q0}finally{h0=null,f0=z0,p0=!1}}var v0=!1,S0=null,k0=-1,R0=5,j0=-1;function C0(){return!(r0.unstable_now()-j0<R0)}function $0(){if(S0!==null){var O0=r0.unstable_now();j0=O0;var B0=!0;try{B0=S0(!0,O0)}finally{B0?T0():(v0=!1,S0=null)}}else v0=!1}var T0;if(typeof y0=="function")T0=function(){y0($0)};else if(typeof MessageChannel<"u"){var I0=new MessageChannel,M0=I0.port2;I0.port1.onmessage=$0,T0=function(){M0.postMessage(null)}}else T0=function(){x0($0,0)};function N0(O0){S0=O0,v0||(v0=!0,T0())}function D0(O0,B0){k0=x0(function(){O0(r0.unstable_now())},B0)}r0.unstable_IdlePriority=5,r0.unstable_ImmediatePriority=1,r0.unstable_LowPriority=4,r0.unstable_NormalPriority=3,r0.unstable_Profiling=null,r0.unstable_UserBlockingPriority=2,r0.unstable_cancelCallback=function(O0){O0.callback=null},r0.unstable_continueExecution=function(){A0||p0||(A0=!0,N0(w0))},r0.unstable_forceFrameRate=function(O0){0>O0||125<O0?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R0=0<O0?Math.floor(1e3/O0):5},r0.unstable_getCurrentPriorityLevel=function(){return f0},r0.unstable_getFirstCallbackNode=function(){return n0(c0)},r0.unstable_next=function(O0){switch(f0){case 1:case 2:case 3:var B0=3;break;default:B0=f0}var z0=f0;f0=B0;try{return O0()}finally{f0=z0}},r0.unstable_pauseExecution=function(){},r0.unstable_requestPaint=function(){},r0.unstable_runWithPriority=function(O0,B0){switch(O0){case 1:case 2:case 3:case 4:case 5:break;default:O0=3}var z0=f0;f0=O0;try{return B0()}finally{f0=z0}},r0.unstable_scheduleCallback=function(O0,B0,z0){var G0=r0.unstable_now();switch(typeof z0=="object"&&z0!==null?(z0=z0.delay,z0=typeof z0=="number"&&0<z0?G0+z0:G0):z0=G0,O0){case 1:var F0=-1;break;case 2:F0=250;break;case 5:F0=1073741823;break;case 4:F0=1e4;break;default:F0=5e3}return F0=z0+F0,O0={id:d0++,callback:B0,priorityLevel:O0,startTime:z0,expirationTime:F0,sortIndex:-1},z0>G0?(O0.sortIndex=z0,e0(u0,O0),n0(c0)===null&&O0===n0(u0)&&(m0?(g0(k0),k0=-1):m0=!0,D0(E0,z0-G0))):(O0.sortIndex=F0,e0(c0,O0),A0||p0||(A0=!0,N0(w0))),O0},r0.unstable_shouldYield=C0,r0.unstable_wrapCallback=function(O0){var B0=f0;return function(){var z0=f0;f0=B0;try{return O0.apply(this,arguments)}finally{f0=z0}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** 31 * @license React 32 * react-dom.production.min.js 33 * 34 * Copyright (c) Facebook, Inc. and its affiliates. 35 * 36 * This source code is licensed under the MIT license found in the 37 * LICENSE file in the root directory of this source tree. 38 */var aa$1=reactExports,ca$1=schedulerExports;function p$3(r0){for(var e0="https://reactjs.org/docs/error-decoder.html?invariant="+r0,n0=1;n0<arguments.length;n0++)e0+="&args[]="+encodeURIComponent(arguments[n0]);return"Minified React error #"+r0+"; visit "+e0+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da$1=new Set,ea$1={};function fa$1(r0,e0){ha$1(r0,e0),ha$1(r0+"Capture",e0)}function ha$1(r0,e0){for(ea$1[r0]=e0,r0=0;r0<e0.length;r0++)da$1.add(e0[r0])}var ia$1=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja$1=Object.prototype.hasOwnProperty,ka$2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la$1={},ma$1={};function oa$1(r0){return ja$1.call(ma$1,r0)?!0:ja$1.call(la$1,r0)?!1:ka$2.test(r0)?ma$1[r0]=!0:(la$1[r0]=!0,!1)}function pa$1(r0,e0,n0,a0){if(n0!==null&&n0.type===0)return!1;switch(typeof e0){case"function":case"symbol":return!0;case"boolean":return a0?!1:n0!==null?!n0.acceptsBooleans:(r0=r0.toLowerCase().slice(0,5),r0!=="data-"&&r0!=="aria-");default:return!1}}function qa$1(r0,e0,n0,a0){if(e0===null||typeof e0>"u"||pa$1(r0,e0,n0,a0))return!0;if(a0)return!1;if(n0!==null)switch(n0.type){case 3:return!e0;case 4:return e0===!1;case 5:return isNaN(e0);case 6:return isNaN(e0)||1>e0}return!1}function v$3(r0,e0,n0,a0,i0,s0,o0){this.acceptsBooleans=e0===2||e0===3||e0===4,this.attributeName=a0,this.attributeNamespace=i0,this.mustUseProperty=n0,this.propertyName=r0,this.type=e0,this.sanitizeURL=s0,this.removeEmptyString=o0}var z$1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r0){z$1[r0]=new v$3(r0,0,!1,r0,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r0){var e0=r0[0];z$1[e0]=new v$3(e0,1,!1,r0[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(r0){z$1[r0]=new v$3(r0,2,!1,r0.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r0){z$1[r0]=new v$3(r0,2,!1,r0,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(r0){z$1[r0]=new v$3(r0,3,!1,r0.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(r0){z$1[r0]=new v$3(r0,3,!0,r0,null,!1,!1)});["capture","download"].forEach(function(r0){z$1[r0]=new v$3(r0,4,!1,r0,null,!1,!1)});["cols","rows","size","span"].forEach(function(r0){z$1[r0]=new v$3(r0,6,!1,r0,null,!1,!1)});["rowSpan","start"].forEach(function(r0){z$1[r0]=new v$3(r0,5,!1,r0.toLowerCase(),null,!1,!1)});var ra$1=/[\-:]([a-z])/g;function sa$1(r0){return r0[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(r0){var e0=r0.replace(ra$1,sa$1);z$1[e0]=new v$3(e0,1,!1,r0,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r0){var e0=r0.replace(ra$1,sa$1);z$1[e0]=new v$3(e0,1,!1,r0,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(r0){var e0=r0.replace(ra$1,sa$1);z$1[e0]=new v$3(e0,1,!1,r0,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(r0){z$1[r0]=new v$3(r0,1,!1,r0.toLowerCase(),null,!1,!1)});z$1.xlinkHref=new v$3("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(r0){z$1[r0]=new v$3(r0,1,!1,r0.toLowerCase(),null,!0,!0)});function ta$1(r0,e0,n0,a0){var i0=z$1.hasOwnProperty(e0)?z$1[e0]:null;(i0!==null?i0.type!==0:a0||!(2<e0.length)||e0[0]!=="o"&&e0[0]!=="O"||e0[1]!=="n"&&e0[1]!=="N")&&(qa$1(e0,n0,i0,a0)&&(n0=null),a0||i0===null?oa$1(e0)&&(n0===null?r0.removeAttribute(e0):r0.setAttribute(e0,""+n0)):i0.mustUseProperty?r0[i0.propertyName]=n0===null?i0.type===3?!1:"":n0:(e0=i0.attributeName,a0=i0.attributeNamespace,n0===null?r0.removeAttribute(e0):(i0=i0.type,n0=i0===3||i0===4&&n0===!0?"":""+n0,a0?r0.setAttributeNS(a0,e0,n0):r0.setAttribute(e0,n0))))}
vendor: 6,219 bytes, lines 38-42
38var ua$1=aa$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va$1=Symbol.for("react.element"),wa$1=Symbol.for("react.portal"),ya$1=Symbol.for("react.fragment"),za$1=Symbol.for("react.strict_mode"),Aa$1=Symbol.for("react.profiler"),Ba$1=Symbol.for("react.provider"),Ca$1=Symbol.for("react.context"),Da$1=Symbol.for("react.forward_ref"),Ea$1=Symbol.for("react.suspense"),Fa$1=Symbol.for("react.suspense_list"),Ga$1=Symbol.for("react.memo"),Ha$1=Symbol.for("react.lazy"),Ia$1=Symbol.for("react.offscreen"),Ja$1=Symbol.iterator;function Ka$1(r0){return r0===null||typeof r0!="object"?null:(r0=Ja$1&&r0[Ja$1]||r0["@@iterator"],typeof r0=="function"?r0:null)}var A$1=Object.assign,La$1;function Ma$1(r0){if(La$1===void 0)try{throw Error()}catch(n0){var e0=n0.stack.trim().match(/\n( *(at )?)/);La$1=e0&&e0[1]||""}return` 39`+La$1+r0}var Na$1=!1;function Oa$1(r0,e0){if(!r0||Na$1)return"";Na$1=!0;var n0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e0)if(e0=function(){throw Error()},Object.defineProperty(e0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e0,[])}catch(u0){var a0=u0}Reflect.construct(r0,[],e0)}else{try{e0.call()}catch(u0){a0=u0}r0.call(e0.prototype)}else{try{throw Error()}catch(u0){a0=u0}r0()}}catch(u0){if(u0&&a0&&typeof u0.stack=="string"){for(var i0=u0.stack.split(` 40`),s0=a0.stack.split(` 41`),o0=i0.length-1,l0=s0.length-1;1<=o0&&0<=l0&&i0[o0]!==s0[l0];)l0--;for(;1<=o0&&0<=l0;o0--,l0--)if(i0[o0]!==s0[l0]){if(o0!==1||l0!==1)do if(o0--,l0--,0>l0||i0[o0]!==s0[l0]){var c0=` 42`+i0[o0].replace(" at new "," at ");return r0.displayName&&c0.includes("<anonymous>")&&(c0=c0.replace("<anonymous>",r0.displayName)),c0}while(1<=o0&&0<=l0);break}}}finally{Na$1=!1,Error.prepareStackTrace=n0}return(r0=r0?r0.displayName||r0.name:"")?Ma$1(r0):""}function Pa$1(r0){switch(r0.tag){case 5:return Ma$1(r0.type);case 16:return Ma$1("Lazy");case 13:return Ma$1("Suspense");case 19:return Ma$1("SuspenseList");case 0:case 2:case 15:return r0=Oa$1(r0.type,!1),r0;case 11:return r0=Oa$1(r0.type.render,!1),r0;case 1:return r0=Oa$1(r0.type,!0),r0;default:return""}}function Qa$1(r0){if(r0==null)return null;if(typeof r0=="function")return r0.displayName||r0.name||null;if(typeof r0=="string")return r0;switch(r0){case ya$1:return"Fragment";case wa$1:return"Portal";case Aa$1:return"Profiler";case za$1:return"StrictMode";case Ea$1:return"Suspense";case Fa$1:return"SuspenseList"}if(typeof r0=="object")switch(r0.$$typeof){case Ca$1:return(r0.displayName||"Context")+".Consumer";case Ba$1:return(r0._context.displayName||"Context")+".Provider";case Da$1:var e0=r0.render;return r0=r0.displayName,r0||(r0=e0.displayName||e0.name||"",r0=r0!==""?"ForwardRef("+r0+")":"ForwardRef"),r0;case Ga$1:return e0=r0.displayName||null,e0!==null?e0:Qa$1(r0.type)||"Memo";case Ha$1:e0=r0._payload,r0=r0._init;try{return Qa$1(r0(e0))}catch{}}return null}function Ra$1(r0){var e0=r0.type;switch(r0.tag){case 24:return"Cache";case 9:return(e0.displayName||"Context")+".Consumer";case 10:return(e0._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r0=e0.render,r0=r0.displayName||r0.name||"",e0.displayName||(r0!==""?"ForwardRef("+r0+")":"ForwardRef");case 7:return"Fragment";case 5:return e0;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa$1(e0);case 8:return e0===za$1?"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 e0=="function")return e0.displayName||e0.name||null;if(typeof e0=="string")return e0}return null}function Sa$1(r0){switch(typeof r0){case"boolean":case"number":case"string":case"undefined":return r0;case"object":return r0;default:return""}}function Ta$1(r0){var e0=r0.type;return(r0=r0.nodeName)&&r0.toLowerCase()==="input"&&(e0==="checkbox"||e0==="radio")}function Ua$1(r0){var e0=Ta$1(r0)?"checked":"value",n0=Object.getOwnPropertyDescriptor(r0.constructor.prototype,e0),a0=""+r0[e0];if(!r0.hasOwnProperty(e0)&&typeof n0<"u"&&typeof n0.get=="function"&&typeof n0.set=="function"){var i0=n0.get,s0=n0.set;return Object.defineProperty(r0,e0,{configurable:!0,get:function(){return i0.call(this)},set:function(o0){a0=""+o0,s0.call(this,o0)}}),Object.defineProperty(r0,e0,{enumerable:n0.enumerable}),{getValue:function(){return a0},setValue:function(o0){a0=""+o0},stopTracking:function(){r0._valueTracker=null,delete r0[e0]}}}}function Va$1(r0){r0._valueTracker||(r0._valueTracker=Ua$1(r0))}function Wa$1(r0){if(!r0)return!1;var e0=r0._valueTracker;if(!e0)return!0;var n0=e0.getValue(),a0="";return r0&&(a0=Ta$1(r0)?r0.checked?"true":"false":r0.value),r0=a0,r0!==n0?(e0.setValue(r0),!0):!1}function Xa$1(r0){if(r0=r0||(typeof document<"u"?document:void 0),typeof r0>"u")return null;try{return r0.activeElement||r0.body}catch{return r0.body}}function Ya$1(r0,e0){var n0=e0.checked;return A$1({},e0,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n0??r0._wrapperState.initialChecked})}function Za$1(r0,e0){var n0=e0.defaultValue==null?"":e0.defaultValue,a0=e0.checked!=null?e0.checked:e0.defaultChecked;n0=Sa$1(e0.value!=null?e0.value:n0),r0._wrapperState={initialChecked:a0,initialValue:n0,controlled:e0.type==="checkbox"||e0.type==="radio"?e0.checked!=null:e0.value!=null}}function ab(r0,e0){e0=e0.checked,e0!=null&&ta$1(r0,"checked",e0,!1)}function bb$1(r0,e0){ab(r0,e0);var n0=Sa$1(e0.value),a0=e0.type;if(n0!=null)a0==="number"?(n0===0&&r0.value===""||r0.value!=n0)&&(r0.value=""+n0):r0.value!==""+n0&&(r0.value=""+n0);else if(a0==="submit"||a0==="reset"){r0.removeAttribute("value");return}e0.hasOwnProperty("value")?cb(r0,e0.type,n0):e0.hasOwnProperty("defaultValue")&&cb(r0,e0.type,Sa$1(e0.defaultValue)),e0.checked==null&&e0.defaultChecked!=null&&(r0.defaultChecked=!!e0.defaultChecked)}function db$1(r0,e0,n0){if(e0.hasOwnProperty("value")||e0.hasOwnProperty("defaultValue")){var a0=e0.type;if(!(a0!=="submit"&&a0!=="reset"||e0.value!==void 0&&e0.value!==null))return;e0=""+r0._wrapperState.initialValue,n0||e0===r0.value||(r0.value=e0),r0.defaultValue=e0}
vendor: 4,246 bytes, line 42
42n0=r0.name,n0!==""&&(r0.name=""),r0.defaultChecked=!!r0._wrapperState.initialChecked,n0!==""&&(r0.name=n0)}function cb(r0,e0,n0){(e0!=="number"||Xa$1(r0.ownerDocument)!==r0)&&(n0==null?r0.defaultValue=""+r0._wrapperState.initialValue:r0.defaultValue!==""+n0&&(r0.defaultValue=""+n0))}var eb=Array.isArray;function fb$1(r0,e0,n0,a0){if(r0=r0.options,e0){e0={};for(var i0=0;i0<n0.length;i0++)e0["$"+n0[i0]]=!0;for(n0=0;n0<r0.length;n0++)i0=e0.hasOwnProperty("$"+r0[n0].value),r0[n0].selected!==i0&&(r0[n0].selected=i0),i0&&a0&&(r0[n0].defaultSelected=!0)}else{for(n0=""+Sa$1(n0),e0=null,i0=0;i0<r0.length;i0++){if(r0[i0].value===n0){r0[i0].selected=!0,a0&&(r0[i0].defaultSelected=!0);return}e0!==null||r0[i0].disabled||(e0=r0[i0])}e0!==null&&(e0.selected=!0)}}function gb$1(r0,e0){if(e0.dangerouslySetInnerHTML!=null)throw Error(p$3(91));return A$1({},e0,{value:void 0,defaultValue:void 0,children:""+r0._wrapperState.initialValue})}function hb$1(r0,e0){var n0=e0.value;if(n0==null){if(n0=e0.children,e0=e0.defaultValue,n0!=null){if(e0!=null)throw Error(p$3(92));if(eb(n0)){if(1<n0.length)throw Error(p$3(93));n0=n0[0]}e0=n0}e0==null&&(e0=""),n0=e0}r0._wrapperState={initialValue:Sa$1(n0)}}function ib(r0,e0){var n0=Sa$1(e0.value),a0=Sa$1(e0.defaultValue);n0!=null&&(n0=""+n0,n0!==r0.value&&(r0.value=n0),e0.defaultValue==null&&r0.defaultValue!==n0&&(r0.defaultValue=n0)),a0!=null&&(r0.defaultValue=""+a0)}function jb$1(r0){var e0=r0.textContent;e0===r0._wrapperState.initialValue&&e0!==""&&e0!==null&&(r0.value=e0)}function kb$1(r0){switch(r0){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 lb(r0,e0){return r0==null||r0==="http://www.w3.org/1999/xhtml"?kb$1(e0):r0==="http://www.w3.org/2000/svg"&&e0==="foreignObject"?"http://www.w3.org/1999/xhtml":r0}var mb$1,nb=function(r0){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e0,n0,a0,i0){MSApp.execUnsafeLocalFunction(function(){return r0(e0,n0,a0,i0)})}:r0}(function(r0,e0){if(r0.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r0)r0.innerHTML=e0;else{for(mb$1=mb$1||document.createElement("div"),mb$1.innerHTML="<svg>"+e0.valueOf().toString()+"</svg>",e0=mb$1.firstChild;r0.firstChild;)r0.removeChild(r0.firstChild);for(;e0.firstChild;)r0.appendChild(e0.firstChild)}});function ob(r0,e0){if(e0){var n0=r0.firstChild;if(n0&&n0===r0.lastChild&&n0.nodeType===3){n0.nodeValue=e0;return}}r0.textContent=e0}var pb$1={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},qb$1=["Webkit","ms","Moz","O"];Object.keys(pb$1).forEach(function(r0){qb$1.forEach(function(e0){e0=e0+r0.charAt(0).toUpperCase()+r0.substring(1),pb$1[e0]=pb$1[r0]})});function rb(r0,e0,n0){return e0==null||typeof e0=="boolean"||e0===""?"":n0||typeof e0!="number"||e0===0||pb$1.hasOwnProperty(r0)&&pb$1[r0]?(""+e0).trim():e0+"px"}function sb(r0,e0){r0=r0.style;for(var n0 in e0)if(e0.hasOwnProperty(n0)){var a0=n0.indexOf("--")===0,i0=rb(n0,e0[n0],a0);n0==="float"&&(n0="cssFloat"),a0?r0.setProperty(n0,i0):r0[n0]=i0}}var tb=A$1({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 ub$1(r0,e0){if(e0){if(tb[r0]&&(e0.children!=null||e0.dangerouslySetInnerHTML!=null))throw Error(p$3(137,r0));if(e0.dangerouslySetInnerHTML!=null){if(e0.children!=null)throw Error(p$3(60));if(typeof e0.dangerouslySetInnerHTML!="object"||!("__html"in e0.dangerouslySetInnerHTML))throw Error(p$3(61))}if(e0.style!=null&&typeof e0.style!="object")throw Error(p$3(62))}}function vb$1(r0,e0){if(r0.indexOf("-")===-1)return typeof e0.is=="str
42ing";switch(r0){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 wb$1=null;function xb$1(r0){return r0=r0.target||r0.srcElement||window,r0.correspondingUseElement&&(r0=r0.correspondingUseElement),r0.nodeType===3?r0.parentNode:r0}var yb$1=null,zb$1=null,Ab=null;function Bb$1(r0){if(r0=Cb$1(r0)){if(typeof yb$1!="function")throw Error(p$3(280));var e0=r0.stateNode;e0&&(e0=Db$1(e0),yb$1(r0.stateNode,r0.type,e0))}}function Eb$1(r0){zb$1?Ab?Ab.push(r0):Ab=[r0]:zb$1=r0}function Fb$1(){if(zb$1){var r0=zb$1,e0=Ab;if(Ab=zb$1=null,Bb$1(r0),e0)for(r0=0;r0<e0.length;r0++)Bb$1(e0[r0])}}function Gb$1(r0,e0){return r0(e0)}function Hb$1(){}var Ib$1=!1;function Jb$1(r0,e0,n0){if(Ib$1)return r0(e0,n0);Ib$1=!0;try{return Gb$1(r0,e0,n0)}finally{Ib$1=!1,(zb$1!==null||Ab!==null)&&(Hb$1(),Fb$1())}}function Kb$1(r0,e0){var n0=r0.stateNode;if(n0===null)return null;var a0=Db$1(n0);if(a0===null)return null;n0=a0[e0];e:switch(e0){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a0=!a0.disabled)||(r0=r0.type,a0=!(r0==="button"||r0==="input"||r0==="select"||r0==="textarea")),r0=!a0;break e;default:r0=!1}if(r0)return null;if(n0&&typeof n0!="function")throw Error(p$3(231,e0,typeof n0));return n0}var Lb$1=!1;if(ia$1)try{var Mb$1={};Object.defineProperty(Mb$1,"passive",{get:function(){Lb$1=!0}}),window.addEventListener("test",Mb$1,Mb$1),window.removeEventListener("test",Mb$1,Mb$1)}catch{Lb$1=!1}function Nb$1(r0,e0,n0,a0,i0,s0,o0,l0,c0){var u0=Array.prototype.slice.call(arguments,3);try{e0.apply(n0,u0)}catch(d0){this.onError(d0)}}var Ob$1=!1,Pb$1=null,Qb$1=!1,Rb$1=null,Sb$1={onError:function(r0){Ob$1=!0,Pb$1=r0}};function Tb$1(r0,e0,n0,a0,i0,s0,o0,l0,c0){Ob$1=!1,Pb$1=null,Nb$1.apply(Sb$1,arguments)}function Ub$1(r0,e0,n0,a0,i0,s0,o0,l0,c0){if(Tb$1.apply(this,arguments),Ob$1){if(Ob$1){var u0=Pb$1;Ob$1=!1,Pb$1=null}else throw Error(p$3(198));Qb$1||(Qb$1=!0,Rb$1=u0)}}function Vb$1(r0){var e0=r0,n0=r0;if(r0.alternate)for(;e0.return;)e0=e0.return;else{r0=e0;do e0=r0,e0.flags&4098&&(n0=e0.return),r0=e0.return;while(r0)}return e0.tag===3?n0:null}function Wb$1(r0){if(r0.tag===13){var e0=r0.memoizedState;if(e0===null&&(r0=r0.alternate,r0!==null&&(e0=r0.memoizedState)),e0!==null)return e0.dehydrated}return null}function Xb$1(r0){if(Vb$1(r0)!==r0)throw Error(p$3(188))}function Yb$1(r0){var e0=r0.alternate;if(!e0){if(e0=Vb$1(r0),e0===null)throw Error(p$3(188));return e0!==r0?null:r0}for(var n0=r0,a0=e0;;){var i0=n0.return;if(i0===null)break;var s0=i0.alternate;if(s0===null){if(a0=i0.return,a0!==null){n0=a0;continue}break}if(i0.child===s0.child){for(s0=i0.child;s0;){if(s0===n0)return Xb$1(i0),r0;if(s0===a0)return Xb$1(i0),e0;s0=s0.sibling}throw Error(p$3(188))}if(n0.return!==a0.return)n0=i0,a0=s0;else{for(var o0=!1,l0=i0.child;l0;){if(l0===n0){o0=!0,n0=i0,a0=s0;break}if(l0===a0){o0=!0,a0=i0,n0=s0;break}l0=l0.sibling}if(!o0){for(l0=s0.child;l0;){if(l0===n0){o0=!0,n0=s0,a0=i0;break}if(l0===a0){o0=!0,a0=s0,n0=i0;break}l0=l0.sibling}if(!o0)throw Error(p$3(189))}}if(n0.alternate!==a0)throw Error(p$3(190))}if(n0.tag!==3)throw Error(p$3(188));return n0.stateNode.current===n0?r0:e0}function Zb$1(r0){return r0=Yb$1(r0),r0!==null?$b$1(r0):null}function $b$1(r0){if(r0.tag===5||r0.tag===6)return r0;for(r0=r0.child;r0!==null;){var e0=$b$1(r0);if(e0!==null)return e0;r0=r0.sibling}return null}var ac$1=ca$1.unstable_scheduleCallback,bc$1=ca$1.unstable_cancelCallback,cc$1=ca$1.unstable_shouldYield,dc$1=ca$1.unstable_requestPaint,B$3=ca$1.unstable_now,ec$1=ca$1.unstable_getCurrentPriorityLevel,fc$1=ca$1.unstable_ImmediatePriority,gc$1=ca$1.unstable_UserBlockingPriority,hc$1=ca$1.unstable_NormalPriority,ic$1=ca$1.unstable_LowPriority,jc$1=ca$1.unstable_IdlePriority,kc$1=null,lc$1=null;function mc$1(r0){if(lc$1&&typeof lc$1.onCommitFiberRoot=="function")try{lc$1.onCommitFiberRoot(kc$1,r0,void 0,(r0.current.flags&128)===128)}catch{}}var oc$1=Math.clz32?Math.clz32:nc$1,pc$1=Math.log,qc$1=Math.LN2;function nc$1(r0){return r0>>>=0,r0===0?32:31-(pc$1(r0)/qc$1|0)|0}var rc$1=64,sc$1=4194304;function tc$1(r0){switch(r0&-r0){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 r0&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r0&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r0}}function uc$1(r0,e0){var n0=r0.pendingLanes;if(n0===0)return 0;var a0=0,i0=r0.suspendedLanes,s0=r0.pingedLanes,o0=n0&268435455;if(o0!==0){var l0=o0&~i0;l0!==0?a0=tc$1(l0):(s0&=o0,s0!==0&&(a0=tc$1(s0)))}else o0=n0&~i0,o0!==0?a0=tc$1(o0):s0!==0&&(a0=tc$1(s0));if(a0===0)return 0;if(e0!==0&&e0!==a0&&!(e0&i0)&&(i0=a0&-a0,s0=e0&-e0,i0>=s0||i0===16&&(s0&4194240)!==0))return e0;
vendor: 4,505 bytes, line 42
42if(a0&4&&(a0|=n0&16),e0=r0.entangledLanes,e0!==0)for(r0=r0.entanglements,e0&=a0;0<e0;)n0=31-oc$1(e0),i0=1<<n0,a0|=r0[n0],e0&=~i0;return a0}function vc$1(r0,e0){switch(r0){case 1:case 2:case 4:return e0+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 e0+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 wc$1(r0,e0){for(var n0=r0.suspendedLanes,a0=r0.pingedLanes,i0=r0.expirationTimes,s0=r0.pendingLanes;0<s0;){var o0=31-oc$1(s0),l0=1<<o0,c0=i0[o0];c0===-1?(!(l0&n0)||l0&a0)&&(i0[o0]=vc$1(l0,e0)):c0<=e0&&(r0.expiredLanes|=l0),s0&=~l0}}function xc$1(r0){return r0=r0.pendingLanes&-1073741825,r0!==0?r0:r0&1073741824?1073741824:0}function yc$1(){var r0=rc$1;return rc$1<<=1,!(rc$1&4194240)&&(rc$1=64),r0}function zc$1(r0){for(var e0=[],n0=0;31>n0;n0++)e0.push(r0);return e0}function Ac$1(r0,e0,n0){r0.pendingLanes|=e0,e0!==536870912&&(r0.suspendedLanes=0,r0.pingedLanes=0),r0=r0.eventTimes,e0=31-oc$1(e0),r0[e0]=n0}function Bc$1(r0,e0){var n0=r0.pendingLanes&~e0;r0.pendingLanes=e0,r0.suspendedLanes=0,r0.pingedLanes=0,r0.expiredLanes&=e0,r0.mutableReadLanes&=e0,r0.entangledLanes&=e0,e0=r0.entanglements;var a0=r0.eventTimes;for(r0=r0.expirationTimes;0<n0;){var i0=31-oc$1(n0),s0=1<<i0;e0[i0]=0,a0[i0]=-1,r0[i0]=-1,n0&=~s0}}function Cc$1(r0,e0){var n0=r0.entangledLanes|=e0;for(r0=r0.entanglements;n0;){var a0=31-oc$1(n0),i0=1<<a0;i0&e0|r0[a0]&e0&&(r0[a0]|=e0),n0&=~i0}}var C$1=0;function Dc$1(r0){return r0&=-r0,1<r0?4<r0?r0&268435455?16:536870912:4:1}var Ec$1,Fc$1,Gc$1,Hc$1,Ic$1,Jc$1=!1,Kc$1=[],Lc$1=null,Mc$1=null,Nc$1=null,Oc$1=new Map,Pc$1=new Map,Qc$1=[],Rc$1="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 Sc$1(r0,e0){switch(r0){case"focusin":case"focusout":Lc$1=null;break;case"dragenter":case"dragleave":Mc$1=null;break;case"mouseover":case"mouseout":Nc$1=null;break;case"pointerover":case"pointerout":Oc$1.delete(e0.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pc$1.delete(e0.pointerId)}}function Tc$1(r0,e0,n0,a0,i0,s0){return r0===null||r0.nativeEvent!==s0?(r0={blockedOn:e0,domEventName:n0,eventSystemFlags:a0,nativeEvent:s0,targetContainers:[i0]},e0!==null&&(e0=Cb$1(e0),e0!==null&&Fc$1(e0)),r0):(r0.eventSystemFlags|=a0,e0=r0.targetContainers,i0!==null&&e0.indexOf(i0)===-1&&e0.push(i0),r0)}function Uc$1(r0,e0,n0,a0,i0){switch(e0){case"focusin":return Lc$1=Tc$1(Lc$1,r0,e0,n0,a0,i0),!0;case"dragenter":return Mc$1=Tc$1(Mc$1,r0,e0,n0,a0,i0),!0;case"mouseover":return Nc$1=Tc$1(Nc$1,r0,e0,n0,a0,i0),!0;case"pointerover":var s0=i0.pointerId;return Oc$1.set(s0,Tc$1(Oc$1.get(s0)||null,r0,e0,n0,a0,i0)),!0;case"gotpointercapture":return s0=i0.pointerId,Pc$1.set(s0,Tc$1(Pc$1.get(s0)||null,r0,e0,n0,a0,i0)),!0}return!1}function Vc$1(r0){var e0=Wc$1(r0.target);if(e0!==null){var n0=Vb$1(e0);if(n0!==null){if(e0=n0.tag,e0===13){if(e0=Wb$1(n0),e0!==null){r0.blockedOn=e0,Ic$1(r0.priority,function(){Gc$1(n0)});return}}else if(e0===3&&n0.stateNode.current.memoizedState.isDehydrated){r0.blockedOn=n0.tag===3?n0.stateNode.containerInfo:null;return}}}r0.blockedOn=null}function Xc$1(r0){if(r0.blockedOn!==null)return!1;for(var e0=r0.targetContainers;0<e0.length;){var n0=Yc$1(r0.domEventName,r0.eventSystemFlags,e0[0],r0.nativeEvent);if(n0===null){n0=r0.nativeEvent;var a0=new n0.constructor(n0.type,n0);wb$1=a0,n0.target.dispatchEvent(a0),wb$1=null}else return e0=Cb$1(n0),e0!==null&&Fc$1(e0),r0.blockedOn=n0,!1;e0.shift()}return!0}function Zc$1(r0,e0,n0){Xc$1(r0)&&n0.delete(e0)}function $c$1(){Jc$1=!1,Lc$1!==null&&Xc$1(Lc$1)&&(Lc$1=null),Mc$1!==null&&Xc$1(Mc$1)&&(Mc$1=null),Nc$1!==null&&Xc$1(Nc$1)&&(Nc$1=null),Oc$1.forEach(Zc$1),Pc$1.forEach(Zc$1)}function ad$1(r0,e0){r0.blockedOn===e0&&(r0.blockedOn=null,Jc$1||(Jc$1=!0,ca$1.unstable_scheduleCallback(ca$1.unstable_NormalPriority,$c$1)))}function bd$1(r0){function e0(i0){return ad$1(i0,r0)}if(0<Kc$1.length){ad$1(Kc$1[0],r0);for(var n0=1;n0<Kc$1.length;n0++){var a0=Kc$1[n0];a0.blockedOn===r0&&(a0.blockedOn=null)}}for(Lc$1!==null&&ad$1(Lc$1,r0),Mc$1!==null&&ad$1(Mc$1,r0),Nc$1!==null&&ad$1(Nc$1,r0),Oc$1.forEac
vendor: 2,601 bytes, line 42
42h(e0),Pc$1.forEach(e0),n0=0;n0<Qc$1.length;n0++)a0=Qc$1[n0],a0.blockedOn===r0&&(a0.blockedOn=null);for(;0<Qc$1.length&&(n0=Qc$1[0],n0.blockedOn===null);)Vc$1(n0),n0.blockedOn===null&&Qc$1.shift()}var cd$1=ua$1.ReactCurrentBatchConfig,dd$1=!0;function ed$1(r0,e0,n0,a0){var i0=C$1,s0=cd$1.transition;cd$1.transition=null;try{C$1=1,fd$1(r0,e0,n0,a0)}finally{C$1=i0,cd$1.transition=s0}}function gd$1(r0,e0,n0,a0){var i0=C$1,s0=cd$1.transition;cd$1.transition=null;try{C$1=4,fd$1(r0,e0,n0,a0)}finally{C$1=i0,cd$1.transition=s0}}function fd$1(r0,e0,n0,a0){if(dd$1){var i0=Yc$1(r0,e0,n0,a0);if(i0===null)hd$1(r0,e0,a0,id$1,n0),Sc$1(r0,a0);else if(Uc$1(i0,r0,e0,n0,a0))a0.stopPropagation();else if(Sc$1(r0,a0),e0&4&&-1<Rc$1.indexOf(r0)){for(;i0!==null;){var s0=Cb$1(i0);if(s0!==null&&Ec$1(s0),s0=Yc$1(r0,e0,n0,a0),s0===null&&hd$1(r0,e0,a0,id$1,n0),s0===i0)break;i0=s0}i0!==null&&a0.stopPropagation()}else hd$1(r0,e0,a0,null,n0)}}var id$1=null;function Yc$1(r0,e0,n0,a0){if(id$1=null,r0=xb$1(a0),r0=Wc$1(r0),r0!==null)if(e0=Vb$1(r0),e0===null)r0=null;else if(n0=e0.tag,n0===13){if(r0=Wb$1(e0),r0!==null)return r0;r0=null}else if(n0===3){if(e0.stateNode.current.memoizedState.isDehydrated)return e0.tag===3?e0.stateNode.containerInfo:null;r0=null}else e0!==r0&&(r0=null);return id$1=r0,null}function jd$1(r0){switch(r0){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(ec$1()){case fc$1:return 1;case gc$1:return 4;case hc$1:case ic$1:return 16;case jc$1:return 536870912;default:return 16}default:return 16}}var kd$1=null,ld$1=null,md$1=null;
vendor: 6,231 bytes, line 42
42function nd$1(){if(md$1)return md$1;var r0,e0=ld$1,n0=e0.length,a0,i0="value"in kd$1?kd$1.value:kd$1.textContent,s0=i0.length;for(r0=0;r0<n0&&e0[r0]===i0[r0];r0++);var o0=n0-r0;for(a0=1;a0<=o0&&e0[n0-a0]===i0[s0-a0];a0++);return md$1=i0.slice(r0,1<a0?1-a0:void 0)}function od$1(r0){var e0=r0.keyCode;return"charCode"in r0?(r0=r0.charCode,r0===0&&e0===13&&(r0=13)):r0=e0,r0===10&&(r0=13),32<=r0||r0===13?r0:0}function pd$1(){return!0}function qd$1(){return!1}function rd$1(r0){function e0(n0,a0,i0,s0,o0){this._reactName=n0,this._targetInst=i0,this.type=a0,this.nativeEvent=s0,this.target=o0,this.currentTarget=null;for(var l0 in r0)r0.hasOwnProperty(l0)&&(n0=r0[l0],this[l0]=n0?n0(s0):s0[l0]);return this.isDefaultPrevented=(s0.defaultPrevented!=null?s0.defaultPrevented:s0.returnValue===!1)?pd$1:qd$1,this.isPropagationStopped=qd$1,this}return A$1(e0.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n0=this.nativeEvent;n0&&(n0.preventDefault?n0.preventDefault():typeof n0.returnValue!="unknown"&&(n0.returnValue=!1),this.isDefaultPrevented=pd$1)},stopPropagation:function(){var n0=this.nativeEvent;n0&&(n0.stopPropagation?n0.stopPropagation():typeof n0.cancelBubble!="unknown"&&(n0.cancelBubble=!0),this.isPropagationStopped=pd$1)},persist:function(){},isPersistent:pd$1}),e0}var sd$1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r0){return r0.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td$1=rd$1(sd$1),ud$1=A$1({},sd$1,{view:0,detail:0}),vd$1=rd$1(ud$1),wd$1,xd$1,yd$1,Ad$1=A$1({},ud$1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd$1,button:0,buttons:0,relatedTarget:function(r0){return r0.relatedTarget===void 0?r0.fromElement===r0.srcElement?r0.toElement:r0.fromElement:r0.relatedTarget},movementX:function(r0){return"movementX"in r0?r0.movementX:(r0!==yd$1&&(yd$1&&r0.type==="mousemove"?(wd$1=r0.screenX-yd$1.screenX,xd$1=r0.screenY-yd$1.screenY):xd$1=wd$1=0,yd$1=r0),wd$1)},movementY:function(r0){return"movementY"in r0?r0.movementY:xd$1}}),Bd$1=rd$1(Ad$1),Cd$1=A$1({},Ad$1,{dataTransfer:0}),Dd$1=rd$1(Cd$1),Ed$1=A$1({},ud$1,{relatedTarget:0}),Fd$1=rd$1(Ed$1),Gd$1=A$1({},sd$1,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd$1=rd$1(Gd$1),Id$1=A$1({},sd$1,{clipboardData:function(r0){return"clipboardData"in r0?r0.clipboardData:window.clipboardData}}),Jd$1=rd$1(Id$1),Kd$1=A$1({},sd$1,{data:0}),Ld$1=rd$1(Kd$1),Md$1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd$1={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"},Od$1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd$1(r0){var e0=this.nativeEvent;return e0.getModifierState?e0.getModifierState(r0):(r0=Od$1[r0])?!!e0[r0]:!1}function zd$1(){return Pd$1}var Qd$1=A$1({},ud$1,{key:function(r0){if(r0.key){var e0=Md$1[r0.key]||r0.key;if(e0!=="Unidentified")return e0}return r0.type==="keypress"?(r0=od$1(r0),r0===13?"Enter":String.fromCharCode(r0)):r0.type==="keydown"||r0.type==="keyup"?Nd$1[r0.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd$1,charCode:function(r0){return r0.type==="keypress"?od$1(r0):0},keyCode:function(r0){return r0.type==="keydown"||r0.type==="keyup"?r0.keyCode:0},which:function(r0){return r0.type==="keypress"?od$1(r0):r0.type==="keydown"||r0.type==="keyup"?r0.keyCode:0}}),Rd$1=rd$1(Qd$1),Sd$1=A$1({},Ad$1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td$1=rd$1(Sd$1),Ud$1=A$1({},ud$1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd$1}),Vd$1=rd$1(Ud$1),Wd$1=A$1({},sd$1,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd$1=rd$1(Wd$1),Yd$1=A$1({},Ad$1,{deltaX:function(r0){return"deltaX"in r0?r0.deltaX:"wheelDeltaX"in r0?-r0.wheelDeltaX:0},deltaY:function(r0){return"deltaY"in r0?r0.deltaY:"wheelDeltaY"in r0?-r0.wheelDeltaY:"wheelDelta"in r0?-r0.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd$1=rd$1(Yd$1),$d$1=[9,13,27,32],ae$2=ia$1&&"CompositionEvent"in window,be$3=null;ia$1&&"documentMode"in document&&(be$3=document.documentMode);var ce$3=ia$1&&"TextEvent"in window&&!be$3,de$3=ia$1&&(!ae$2||be$3&&8<be$3&&11>=be$3),ee$3=" ",fe$2=!1;function ge$2(r0,e0){switch(r0){case"keyup":return $d$1.indexOf(e0.keyCode)!==-1;case"keydown":return e0.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he$3(r0){return r0=r0.detail,typeof r0=="object"&&"data"in r0?r0.data:null}var ie$2=!1;function je$1(r0,e0){switch(r0){case"compositionend":return he$3(e0);case"keypress":return e0.which!==32?null:(fe$2=!0,ee$3);case"textInput":return r0=e0.data,r0===ee$3&&fe$2?null:r0;default:return null}}function ke$2(r0,e0){if(ie$2)return r0==="compositionend"||!ae$2&&ge$2(r0,e0)?(r0=nd$1(),md$1=ld$1=kd$1=null,ie$2=!1,r0):null;switch(r0){case"paste":return null;case"keypress":if(!(e0.ctrlKey||e0.altKey||e0.metaKey)||e0.ctrlKey&&e0.altKey){if(e0.char&&1<e0.char.length)return e0.char;if(e0.which)return String.fromCharCode(e0.which)}return null;case"compositionend":return de$3&&e0.locale!=="ko"?null:e0.data;default:return null}}var le$3={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 me$3(r0){var e0=r0&&r0.nodeName&&r0.nodeName.toLowerCase();return e0==="input"?!!le$3[r0.type]:e0==="textarea"}function ne$2(r0,e0,n0,a0){Eb$1(a0),e0=oe$2(e0,"onChange"),0<e0.length&&(n0=new td$1("onChange","change",null,n0,a0),r0.push({event:n0,listeners:e0}))}var pe$3=null,qe$1=null;function re$2(r0){se$2(r0,0)}function te$2(r0){var e0=ue$3(r0);if(Wa$1(e0))return r0}
vendor: 6,338 bytes, line 42
42function ve$3(r0,e0){if(r0==="change")return e0}var we$3=!1;if(ia$1){var xe$3;if(ia$1){var ye$3="oninput"in document;if(!ye$3){var ze$1=document.createElement("div");ze$1.setAttribute("oninput","return;"),ye$3=typeof ze$1.oninput=="function"}xe$3=ye$3}else xe$3=!1;we$3=xe$3&&(!document.documentMode||9<document.documentMode)}function Ae$1(){pe$3&&(pe$3.detachEvent("onpropertychange",Be$1),qe$1=pe$3=null)}function Be$1(r0){if(r0.propertyName==="value"&&te$2(qe$1)){var e0=[];ne$2(e0,qe$1,r0,xb$1(r0)),Jb$1(re$2,e0)}}function Ce$2(r0,e0,n0){r0==="focusin"?(Ae$1(),pe$3=e0,qe$1=n0,pe$3.attachEvent("onpropertychange",Be$1)):r0==="focusout"&&Ae$1()}function De$2(r0){if(r0==="selectionchange"||r0==="keyup"||r0==="keydown")return te$2(qe$1)}function Ee$2(r0,e0){if(r0==="click")return te$2(e0)}function Fe$1(r0,e0){if(r0==="input"||r0==="change")return te$2(e0)}function Ge$1(r0,e0){return r0===e0&&(r0!==0||1/r0===1/e0)||r0!==r0&&e0!==e0}var He$1=typeof Object.is=="function"?Object.is:Ge$1;function Ie$2(r0,e0){if(He$1(r0,e0))return!0;if(typeof r0!="object"||r0===null||typeof e0!="object"||e0===null)return!1;var n0=Object.keys(r0),a0=Object.keys(e0);if(n0.length!==a0.length)return!1;for(a0=0;a0<n0.length;a0++){var i0=n0[a0];if(!ja$1.call(e0,i0)||!He$1(r0[i0],e0[i0]))return!1}return!0}function Je$1(r0){for(;r0&&r0.firstChild;)r0=r0.firstChild;return r0}function Ke$1(r0,e0){var n0=Je$1(r0);r0=0;for(var a0;n0;){if(n0.nodeType===3){if(a0=r0+n0.textContent.length,r0<=e0&&a0>=e0)return{node:n0,offset:e0-r0};r0=a0}e:{for(;n0;){if(n0.nextSibling){n0=n0.nextSibling;break e}n0=n0.parentNode}n0=void 0}n0=Je$1(n0)}}function Le$1(r0,e0){return r0&&e0?r0===e0?!0:r0&&r0.nodeType===3?!1:e0&&e0.nodeType===3?Le$1(r0,e0.parentNode):"contains"in r0?r0.contains(e0):r0.compareDocumentPosition?!!(r0.compareDocumentPosition(e0)&16):!1:!1}function Me$2(){for(var r0=window,e0=Xa$1();e0 instanceof r0.HTMLIFrameElement;){try{var n0=typeof e0.contentWindow.location.href=="string"}catch{n0=!1}if(n0)r0=e0.contentWindow;else break;e0=Xa$1(r0.document)}return e0}function Ne$1(r0){var e0=r0&&r0.nodeName&&r0.nodeName.toLowerCase();return e0&&(e0==="input"&&(r0.type==="text"||r0.type==="search"||r0.type==="tel"||r0.type==="url"||r0.type==="password")||e0==="textarea"||r0.contentEditable==="true")}function Oe$1(r0){var e0=Me$2(),n0=r0.focusedElem,a0=r0.selectionRange;if(e0!==n0&&n0&&n0.ownerDocument&&Le$1(n0.ownerDocument.documentElement,n0)){if(a0!==null&&Ne$1(n0)){if(e0=a0.start,r0=a0.end,r0===void 0&&(r0=e0),"selectionStart"in n0)n0.selectionStart=e0,n0.selectionEnd=Math.min(r0,n0.value.length);else if(r0=(e0=n0.ownerDocument||document)&&e0.defaultView||window,r0.getSelection){r0=r0.getSelection();var i0=n0.textContent.length,s0=Math.min(a0.start,i0);a0=a0.end===void 0?s0:Math.min(a0.end,i0),!r0.extend&&s0>a0&&(i0=a0,a0=s0,s0=i0),i0=Ke$1(n0,s0);var o0=Ke$1(n0,a0);i0&&o0&&(r0.rangeCount!==1||r0.anchorNode!==i0.node||r0.anchorOffset!==i0.offset||r0.focusNode!==o0.node||r0.focusOffset!==o0.offset)&&(e0=e0.createRange(),e0.setStart(i0.node,i0.offset),r0.removeAllRanges(),s0>a0?(r0.addRange(e0),r0.extend(o0.node,o0.offset)):(e0.setEnd(o0.node,o0.offset),r0.addRange(e0)))}}for(e0=[],r0=n0;r0=r0.parentNode;)r0.nodeType===1&&e0.push({element:r0,left:r0.scrollLeft,top:r0.scrollTop});for(typeof n0.focus=="function"&&n0.focus(),n0=0;n0<e0.length;n0++)r0=e0[n0],r0.element.scrollLeft=r0.left,r0.element.scrollTop=r0.top}}var Pe$2=ia$1&&"documentMode"in document&&11>=document.documentMode,Qe$1=null,Re$2=null,Se$2=null,Te$3=!1;function Ue$1(r0,e0,n0){var a0=n0.window===n0?n0.document:n0.nodeType===9?n0:n0.ownerDocument;Te$3||Qe$1==null||Qe$1!==Xa$1(a0)||(a0=Qe$1,"selectionStart"in a0&&Ne$1(a0)?a0={start:a0.selectionStart,end:a0.selectionEnd}:(a0=(a0.ownerDocument&&a0.ownerDocument.defaultView||window).getSelection(),a0={anchorNode:a0.anchorNode,anchorOffset:a0.anchorOffset,focusNode:a0.focusNode,focusOffset:a0.focusOffset}),Se$2&&Ie$2(Se$2,a0)||(Se$2=a0,a0=oe$2(Re$2,"onSelect"),0<a0.length&&(e0=new td$1("onSelect","select",null,e0,n0),r0.push({event:e0,listeners:a0}),e0.target=Qe$1)))}function Ve$1(r0,e0){var n0={};return n0[r0.toLowerCase()]=e0.toLowerCase(),n0["Webkit"+r0]="webkit"+e0,n0["Moz"+r0]="moz"+e0,n0}var We$1={animationend:Ve$1("Animation","AnimationEnd"),animationiteration:Ve$1("Animation","AnimationIteration"),animationstart:Ve$1("Animation","AnimationStart"),transitionend:Ve$1("Transition","TransitionEnd")},Xe$1={},Ye$1={};ia$1&&(Ye$1=document.createElement("div").style,"AnimationEvent"in window||(delete We$1.animationend.animation,delete We$1.animationiteration.animation,delete We$1.animationstart.animation),"TransitionEvent"in window||delete We$1.transitionend.transition);function Ze$1(r0){if(Xe$1[r0])return Xe$1[r0];if(!We$1[r0])return r0;var e0=We$1[r0],n0;for(n0 in e0)if(e0.hasOwnProperty(n0)&&n0 in Ye$1)return Xe$1[r0]=e0[n0];return r0}var $e$2=Ze$1("animationend"),af$1=Ze$1("animationiteration"),bf$1=Ze$1("animationstart"),cf$1=Ze$1("transitionend"),df$1=new Map,ef$1="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 ff$1(r0,e0){df$1.set(r0,e0),fa$1(e0,[r0])}for(var gf$1=0;gf$1<ef$1.length;gf$1++){var hf$1=ef$1[gf$1],jf$1=hf$1.toLowerCase(),kf$1=hf$1[0].toUpperCase()+hf$1.slice(1);ff$1(jf$1,"on"+kf$1)}ff$1($e$2,"onAnimationEnd");ff$1(af$1,"onAnimationIteration");ff$1(bf$1,"onAnimationStart");ff$1("dblclick","onDoubleClick");ff$1("focusin","onFocus");ff$1("focusout","onBlur");ff$1(cf$1,"onTransitionEnd");ha$1("onMouseEnter",["mouseout","mouseover"]);ha$1("onMouseLeave",["mouseout","mouseover"]);ha$1("onPointerEnter",["pointerout","pointerover"]);ha$1("onPointerLeave",["pointerout","pointerover"]);fa$1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,642 bytes, line 42
42fa$1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa$1("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa$1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa$1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa$1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf$1="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(" "),mf$1=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf$1));function nf$1(r0,e0,n0){var a0=r0.type||"unknown-event";r0.currentTarget=n0,Ub$1(a0,e0,void 0,r0),r0.currentTarget=null}function se$2(r0,e0){e0=(e0&4)!==0;for(var n0=0;n0<r0.length;n0++){var a0=r0[n0],i0=a0.event;a0=a0.listeners;e:{var s0=void 0;if(e0)for(var o0=a0.length-1;0<=o0;o0--){var l0=a0[o0],c0=l0.instance,u0=l0.currentTarget;if(l0=l0.listener,c0!==s0&&i0.isPropagationStopped())break e;nf$1(i0,l0,u0),s0=c0}else for(o0=0;o0<a0.length;o0++){if(l0=a0[o0],c0=l0.instance,u0=l0.currentTarget,l0=l0.listener,c0!==s0&&i0.isPropagationStopped())break e;nf$1(i0,l0,u0),s0=c0}}}if(Qb$1)throw r0=Rb$1,Qb$1=!1,Rb$1=null,r0}function D$3(r0,e0){var n0=e0[of$1];n0===void 0&&(n0=e0[of$1]=new Set);var a0=r0+"__bubble";n0.has(a0)||(pf$1(e0,r0,2,!1),n0.add(a0))}function qf$1(r0,e0,n0){var a0=0;e0&&(a0|=4),pf$1(n0,r0,a0,e0)}var rf$1="_reactListening"+Math.random().toString(36).slice(2);function sf$1(r0){if(!r0[rf$1]){r0[rf$1]=!0,da$1.forEach(function(n0){n0!=="selectionchange"&&(mf$1.has(n0)||qf$1(n0,!1,r0),qf$1(n0,!0,r0))});var e0=r0.nodeType===9?r0:r0.ownerDocument;e0===null||e0[rf$1]||(e0[rf$1]=!0,qf$1("selectionchange",!1,e0))}}function pf$1(r0,e0,n0,a0){switch(jd$1(e0)){case 1:var i0=ed$1;break;case 4:i0=gd$1;break;default:i0=fd$1}n0=i0.bind(null,e0,n0,r0),i0=void 0,!Lb$1||e0!=="touchstart"&&e0!=="touchmove"&&e0!=="wheel"||(i0=!0),a0?i0!==void 0?r0.addEventListener(e0,n0,{capture:!0,passive:i0}):r0.addEventListener(e0,n0,!0):i0!==void 0?r0.addEventListener(e0,n0,{passive:i0}):r0.addEventListener(e0,n0,!1)}function hd$1(r0,e0,n0,a0,i0){var s0=a0;if(!(e0&1)&&!(e0&2)&&a0!==null)e:for(;;){if(a0===null)return;var o0=a0.tag;if(o0===3||o0===4){var l0=a0.stateNode.containerInfo;if(l0===i0||l0.nodeType===8&&l0.parentNode===i0)break;if(o0===4)for(o0=a0.return;o0!==null;){var c0=o0.tag;if((c0===3||c0===4)&&(c0=o0.stateNode.containerInfo,c0===i0||c0.nodeType===8&&c0.parentNode===i0))return;o0=o0.return}for(;l0!==null;){if(o0=Wc$1(l0),o0===null)return;if(c0=o0.tag,c0===5||c0===6){a0=s0=o0;continue e}l0=l0.parentNode}}a0=a0.return}Jb$1(function(){var u0=s0,d0=xb$1(n0),h0=[];e:{var f0=df$1.get(r0);if(f0!==void 0){var p0=td$1,A0=r0;switch(r0){case"keypress":if(od$1(n0)===0)break e;case"keydown":case"keyup":p0=Rd$1;break;case"focusin":A0="focus",p0=Fd$1;break;case"focusout":A0="blur",p0=Fd$1;break;case"beforeblur":case"afterblur":p0=Fd$1;break;case"click":if(n0.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p0=Bd$1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p0=Dd$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p0=Vd$1;break;case $e$2:case af$1:case bf$1:p0=Hd$1;break;case cf$1:p0=Xd$1;break;case"scroll":p0=vd$1;break;case"wheel":p0=Zd$1;break;case"copy":case"cut":case"paste":p0=Jd$1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p0=Td$1}var m0=(e0&4)!==0,x0=!m0&&r0==="scroll",g0=m0?f0!==null?f0+"Capture":null:f0;m0=[];for(var y0=u0,b0;y0!==null;){b0=y0;var E0=b0.stateNode;if(b0.tag===5&&E0!==null&&(b0=E0,g0!==null&&(E0=Kb$1(y0,g0),E0!=null&&m0.push(tf$1(y0,E0,b0)))),x0)break;y0=y0.return}0<m0.length&&(f0=new p0(f0,A0,null,n0,d0),h0.push({event:f0,listeners:m0}))}}if(!(e0&7)){e:{if(f0=r0==="mouseover"||r0==="pointerover",p0=r0==="mouseout"||r0==="pointerout",f0&&n0!==wb$1&&(A0=n0.relatedTarget||n0.fromElement)&&(Wc$1(A0)||A0[uf$1]))break e;if((p0||f0)&&(f0=d0.window===d0?d0:(f0=d0.ownerDocument)?f0.defaultView||f0.parentWindow:window,p0?(A0=n0.relatedTarget||n0.toElement,p0=u0,A0=A0?Wc$1(A0):null,A0!==null&&(x0=Vb$1(A0),A0!==x0||A0.tag!==5&&A0.tag!==6)&&(A0=null)):(p0=null,A0=u0),p0!==A0)
vendor: 7,428 bytes, lines 42-43
42){if(m0=Bd$1,E0="onMouseLeave",g0="onMouseEnter",y0="mouse",(r0==="pointerout"||r0==="pointerover")&&(m0=Td$1,E0="onPointerLeave",g0="onPointerEnter",y0="pointer"),x0=p0==null?f0:ue$3(p0),b0=A0==null?f0:ue$3(A0),f0=new m0(E0,y0+"leave",p0,n0,d0),f0.target=x0,f0.relatedTarget=b0,E0=null,Wc$1(d0)===u0&&(m0=new m0(g0,y0+"enter",A0,n0,d0),m0.target=b0,m0.relatedTarget=x0,E0=m0),x0=E0,p0&&A0)t:{for(m0=p0,g0=A0,y0=0,b0=m0;b0;b0=vf$1(b0))y0++;for(b0=0,E0=g0;E0;E0=vf$1(E0))b0++;for(;0<y0-b0;)m0=vf$1(m0),y0--;for(;0<b0-y0;)g0=vf$1(g0),b0--;for(;y0--;){if(m0===g0||g0!==null&&m0===g0.alternate)break t;m0=vf$1(m0),g0=vf$1(g0)}m0=null}else m0=null;p0!==null&&wf$1(h0,f0,p0,m0,!1),A0!==null&&x0!==null&&wf$1(h0,x0,A0,m0,!0)}}e:{if(f0=u0?ue$3(u0):window,p0=f0.nodeName&&f0.nodeName.toLowerCase(),p0==="select"||p0==="input"&&f0.type==="file")var w0=ve$3;else if(me$3(f0))if(we$3)w0=Fe$1;else{w0=De$2;var v0=Ce$2}else(p0=f0.nodeName)&&p0.toLowerCase()==="input"&&(f0.type==="checkbox"||f0.type==="radio")&&(w0=Ee$2);if(w0&&(w0=w0(r0,u0))){ne$2(h0,w0,n0,d0);break e}v0&&v0(r0,f0,u0),r0==="focusout"&&(v0=f0._wrapperState)&&v0.controlled&&f0.type==="number"&&cb(f0,"number",f0.value)}switch(v0=u0?ue$3(u0):window,r0){case"focusin":(me$3(v0)||v0.contentEditable==="true")&&(Qe$1=v0,Re$2=u0,Se$2=null);break;case"focusout":Se$2=Re$2=Qe$1=null;break;case"mousedown":Te$3=!0;break;case"contextmenu":case"mouseup":case"dragend":Te$3=!1,Ue$1(h0,n0,d0);break;case"selectionchange":if(Pe$2)break;case"keydown":case"keyup":Ue$1(h0,n0,d0)}var S0;if(ae$2)e:{switch(r0){case"compositionstart":var k0="onCompositionStart";break e;case"compositionend":k0="onCompositionEnd";break e;case"compositionupdate":k0="onCompositionUpdate";break e}k0=void 0}else ie$2?ge$2(r0,n0)&&(k0="onCompositionEnd"):r0==="keydown"&&n0.keyCode===229&&(k0="onCompositionStart");k0&&(de$3&&n0.locale!=="ko"&&(ie$2||k0!=="onCompositionStart"?k0==="onCompositionEnd"&&ie$2&&(S0=nd$1()):(kd$1=d0,ld$1="value"in kd$1?kd$1.value:kd$1.textContent,ie$2=!0)),v0=oe$2(u0,k0),0<v0.length&&(k0=new Ld$1(k0,r0,null,n0,d0),h0.push({event:k0,listeners:v0}),S0?k0.data=S0:(S0=he$3(n0),S0!==null&&(k0.data=S0)))),(S0=ce$3?je$1(r0,n0):ke$2(r0,n0))&&(u0=oe$2(u0,"onBeforeInput"),0<u0.length&&(d0=new Ld$1("onBeforeInput","beforeinput",null,n0,d0),h0.push({event:d0,listeners:u0}),d0.data=S0))}se$2(h0,e0)})}function tf$1(r0,e0,n0){return{instance:r0,listener:e0,currentTarget:n0}}function oe$2(r0,e0){for(var n0=e0+"Capture",a0=[];r0!==null;){var i0=r0,s0=i0.stateNode;i0.tag===5&&s0!==null&&(i0=s0,s0=Kb$1(r0,n0),s0!=null&&a0.unshift(tf$1(r0,s0,i0)),s0=Kb$1(r0,e0),s0!=null&&a0.push(tf$1(r0,s0,i0))),r0=r0.return}return a0}function vf$1(r0){if(r0===null)return null;do r0=r0.return;while(r0&&r0.tag!==5);return r0||null}function wf$1(r0,e0,n0,a0,i0){for(var s0=e0._reactName,o0=[];n0!==null&&n0!==a0;){var l0=n0,c0=l0.alternate,u0=l0.stateNode;if(c0!==null&&c0===a0)break;l0.tag===5&&u0!==null&&(l0=u0,i0?(c0=Kb$1(n0,s0),c0!=null&&o0.unshift(tf$1(n0,c0,l0))):i0||(c0=Kb$1(n0,s0),c0!=null&&o0.push(tf$1(n0,c0,l0)))),n0=n0.return}o0.length!==0&&r0.push({event:e0,listeners:o0})}var xf$1=/\r\n?/g,yf$1=/\u0000|\uFFFD/g;function zf$1(r0){return(typeof r0=="string"?r0:""+r0).replace(xf$1,` 43`).replace(yf$1,"")}function Af$1(r0,e0,n0){if(e0=zf$1(e0),zf$1(r0)!==e0&&n0)throw Error(p$3(425))}function Bf$1(){}var Cf$1=null,Df$1=null;function Ef$1(r0,e0){return r0==="textarea"||r0==="noscript"||typeof e0.children=="string"||typeof e0.children=="number"||typeof e0.dangerouslySetInnerHTML=="object"&&e0.dangerouslySetInnerHTML!==null&&e0.dangerouslySetInnerHTML.__html!=null}var Ff$1=typeof setTimeout=="function"?setTimeout:void 0,Gf$1=typeof clearTimeout=="function"?clearTimeout:void 0,Hf$1=typeof Promise=="function"?Promise:void 0,Jf$1=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf$1<"u"?function(r0){return Hf$1.resolve(null).then(r0).catch(If$1)}:Ff$1;function If$1(r0){setTimeout(function(){throw r0})}function Kf$1(r0,e0){var n0=e0,a0=0;do{var i0=n0.nextSibling;if(r0.removeChild(n0),i0&&i0.nodeType===8)if(n0=i0.data,n0==="/$"){if(a0===0){r0.removeChild(i0),bd$1(e0);return}a0--}else n0!=="$"&&n0!=="$?"&&n0!=="$!"||a0++;n0=i0}while(n0);bd$1(e0)}function Lf$1(r0){for(;r0!=null;r0=r0.nextSibling){var e0=r0.nodeType;if(e0===1||e0===3)break;if(e0===8){if(e0=r0.data,e0==="$"||e0==="$!"||e0==="$?")break;if(e0==="/$")return null}}return r0}function Mf$1(r0){r0=r0.previousSibling;for(var e0=0;r0;){if(r0.nodeType===8){var n0=r0.data;if(n0==="$"||n0==="$!"||n0==="$?"){if(e0===0)return r0;e0--}else n0==="/$"&&e0++}r0=r0.previousSibling}return null}var Nf$1=Math.random().toString(36).slice(2),Of$1="__reactFiber$"+Nf$1,Pf$1="__reactProps$"+Nf$1,uf$1="__reactContainer$"+Nf$1,of$1="__reactEvents$"+Nf$1,Qf$1="__reactListeners$"+Nf$1,Rf$1="__reactHandles$"+Nf$1;function Wc$1(r0){var e0=r0[Of$1];if(e0)return e0;for(var n0=r0.parentNode;n0;){if(e0=n0[uf$1]||n0[Of$1]){if(n0=e0.alternate,e0.child!==null||n0!==null&&n0.child!==null)for(r0=Mf$1(r0);r0!==null;){if(n0=r0[Of$1])return n0;r0=Mf$1(r0)}return e0}r0=n0,n0=r0.parentNode}return null}function Cb$1(r0){return r0=r0[Of$1]||r0[uf$1],!r0||r0.tag!==5&&r0.tag!==6&&r0.tag!==13&&r0.tag!==3?null:r0}function ue$3(r0){if(r0.tag===5||r0.tag===6)return r0.stateNode;throw Error(p$3(33))}function Db$1(r0){return r0[Pf$1]||null}var Sf$1=[],Tf$1=-1;function Uf$1(r0){return{current:r0}}function E$3(r0){0>Tf$1||(r0.current=Sf$1[Tf$1],Sf$1[Tf$1]=null,Tf$1--)}function G$2(r0,e0){Tf$1++,Sf$1[Tf$1]=r0.current,r0.current=e0}var Vf$1={},H$2=Uf$1(Vf$1),Wf$1=Uf$1(!1),Xf$1=Vf$1;function Yf$1(r0,e0){var n0=r0.type.contextTypes;if(!n0)return Vf$1;var a0=r0.stateNode;if(a0&&a0.__reactInternalMemoizedUnmaskedChildContext===e0)return a0.__reactInternalMemoizedMaskedChildContext;var i0={},s0;for(s0 in n0)i0[s0]=e0[s0];return a0&&(r0=r0.stateNode,r0.__reactInternalMemoizedUnmaskedChildContext=e0,r0.__reactInternalMemoizedMaskedChildContext=i0),i0}function Zf$1(r0){return r0=r0.childContextTypes,r0!=null}function $f$1(){E$3(Wf$1),E$3(H$2)}function ag$1(r0,e0,n0){if(H$2.current!==Vf$1)throw Error(p$3(168));G$2(H$2,e0),G$2(Wf$1,n0)}function bg$1(r0,e0,n0){var a0=r0.stateNode;if(e0=e0.childContextTypes,typeof a0.getChildContext!="function")return n0;a0=a0.getChildContext();for(var i0 in a0)if(!(i0 in e0))throw Error(p$3(108,Ra$1(r0)||"Unknown",i0));return A$1({},n0,a0)}function cg$1(r0){return r0=(r0=r0.stateNode)&&r0.__reactInternalMemoizedMergedChildContext||Vf$1,Xf$1=H$2.current,G$2(H$2,r0),G$2(Wf$1,Wf$1.current),!0}function dg$1(r0,e0,n0){var a0=r0.stateNode;if(!a0)throw Error(p$3(169));n0?(r0=bg$1(r0,e0,Xf$1),a0.__reactInternalMemoizedMergedChildContext=r0,E$3(Wf$1),E$3(H$2),G$2(H$2,r0)):E$3(Wf$1),G$2(Wf$1,n0)}var eg$1=null,fg$1=!1,gg$1=!1;function hg$1(r0){eg$1===null?eg$1=[r0]:eg$1.push(r0)}function ig$1(r0){fg$1=!0,hg$1(r0)}function jg$1(){if(!gg$1&&eg$1!==null){gg$1=!0;var r0=0,e0=C$1;try{var n0=eg$1;for(C$1=1;r0<n0.length;r0++){var a0=n0[r0];do a0=a0(!0);while(a0!==null)}eg$1=null,fg$1=!1}catch(i0){throw eg$1!==null&&(eg$1=eg$1.slice(r0+1)),ac$1(fc$1,jg$1),i0}finally{C$1=e0,gg$1=!1}}return null}var kg$1=[],lg$1=0,mg$1=null,ng$1=0,og$1=[],pg$1=0,qg$1=null,rg$1=1,sg$1="";function tg$1(r0,e0){kg$1[lg$1++]=ng$1,kg$1[lg$1++]=mg$1,mg$1=r0,ng$1=e0}function ug$1(r0,e0,n0){og$1[pg$1++]=rg$1,og$1[pg$1++]=sg$1,og$1[pg$1++]=qg$1,qg$1=r0;var a0=rg$1;r0=sg$1;var i0=32-oc$1(a0)-1;a0&=~(1<<i0),n0+=1;var s0=32-oc$1(e0)+i0;
vendor: 4,734 bytes, line 43
43if(30<s0){var o0=i0-i0%5;s0=(a0&(1<<o0)-1).toString(32),a0>>=o0,i0-=o0,rg$1=1<<32-oc$1(e0)+i0|n0<<i0|a0,sg$1=s0+r0}else rg$1=1<<s0|n0<<i0|a0,sg$1=r0}function vg$1(r0){r0.return!==null&&(tg$1(r0,1),ug$1(r0,1,0))}function wg$1(r0){for(;r0===mg$1;)mg$1=kg$1[--lg$1],kg$1[lg$1]=null,ng$1=kg$1[--lg$1],kg$1[lg$1]=null;for(;r0===qg$1;)qg$1=og$1[--pg$1],og$1[pg$1]=null,sg$1=og$1[--pg$1],og$1[pg$1]=null,rg$1=og$1[--pg$1],og$1[pg$1]=null}var xg$1=null,yg$1=null,I$1=!1,zg$1=null;function Ag$1(r0,e0){var n0=Bg$1(5,null,null,0);n0.elementType="DELETED",n0.stateNode=e0,n0.return=r0,e0=r0.deletions,e0===null?(r0.deletions=[n0],r0.flags|=16):e0.push(n0)}function Cg$1(r0,e0){switch(r0.tag){case 5:var n0=r0.type;return e0=e0.nodeType!==1||n0.toLowerCase()!==e0.nodeName.toLowerCase()?null:e0,e0!==null?(r0.stateNode=e0,xg$1=r0,yg$1=Lf$1(e0.firstChild),!0):!1;case 6:return e0=r0.pendingProps===""||e0.nodeType!==3?null:e0,e0!==null?(r0.stateNode=e0,xg$1=r0,yg$1=null,!0):!1;case 13:return e0=e0.nodeType!==8?null:e0,e0!==null?(n0=qg$1!==null?{id:rg$1,overflow:sg$1}:null,r0.memoizedState={dehydrated:e0,treeContext:n0,retryLane:1073741824},n0=Bg$1(18,null,null,0),n0.stateNode=e0,n0.return=r0,r0.child=n0,xg$1=r0,yg$1=null,!0):!1;default:return!1}}function Dg$1(r0){return(r0.mode&1)!==0&&(r0.flags&128)===0}function Eg$1(r0){if(I$1){var e0=yg$1;if(e0){var n0=e0;if(!Cg$1(r0,e0)){if(Dg$1(r0))throw Error(p$3(418));e0=Lf$1(n0.nextSibling);var a0=xg$1;e0&&Cg$1(r0,e0)?Ag$1(a0,n0):(r0.flags=r0.flags&-4097|2,I$1=!1,xg$1=r0)}}else{if(Dg$1(r0))throw Error(p$3(418));r0.flags=r0.flags&-4097|2,I$1=!1,xg$1=r0}}}function Fg$1(r0){for(r0=r0.return;r0!==null&&r0.tag!==5&&r0.tag!==3&&r0.tag!==13;)r0=r0.return;xg$1=r0}function Gg$1(r0){if(r0!==xg$1)return!1;if(!I$1)return Fg$1(r0),I$1=!0,!1;var e0;if((e0=r0.tag!==3)&&!(e0=r0.tag!==5)&&(e0=r0.type,e0=e0!=="head"&&e0!=="body"&&!Ef$1(r0.type,r0.memoizedProps)),e0&&(e0=yg$1)){if(Dg$1(r0))throw Hg$1(),Error(p$3(418));for(;e0;)Ag$1(r0,e0),e0=Lf$1(e0.nextSibling)}if(Fg$1(r0),r0.tag===13){if(r0=r0.memoizedState,r0=r0!==null?r0.dehydrated:null,!r0)throw Error(p$3(317));e:{for(r0=r0.nextSibling,e0=0;r0;){if(r0.nodeType===8){var n0=r0.data;if(n0==="/$"){if(e0===0){yg$1=Lf$1(r0.nextSibling);break e}e0--}else n0!=="$"&&n0!=="$!"&&n0!=="$?"||e0++}r0=r0.nextSibling}yg$1=null}}else yg$1=xg$1?Lf$1(r0.stateNode.nextSibling):null;return!0}function Hg$1(){for(var r0=yg$1;r0;)r0=Lf$1(r0.nextSibling)}function Ig$1(){yg$1=xg$1=null,I$1=!1}function Jg$1(r0){zg$1===null?zg$1=[r0]:zg$1.push(r0)}var Kg$1=ua$1.ReactCurrentBatchConfig;function Lg$1(r0,e0,n0){if(r0=n0.ref,r0!==null&&typeof r0!="function"&&typeof r0!="object"){if(n0._owner){if(n0=n0._owner,n0){if(n0.tag!==1)throw Error(p$3(309));var a0=n0.stateNode}if(!a0)throw Error(p$3(147,r0));var i0=a0,s0=""+r0;return e0!==null&&e0.ref!==null&&typeof e0.ref=="function"&&e0.ref._stringRef===s0?e0.ref:(e0=function(o0){var l0=i0.refs;o0===null?delete l0[s0]:l0[s0]=o0},e0._stringRef=s0,e0)}if(typeof r0!="string")throw Error(p$3(284));if(!n0._owner)throw Error(p$3(290,r0))}return r0}function Mg$1(r0,e0){throw r0=Object.prototype.toString.call(e0),Error(p$3(31,r0==="[object Object]"?"object with keys {"+Object.keys(e0).join(", ")+"}":r0))}function Ng$1(r0){var e0=r0._init;return e0(r0._payload)}function Og$1(r0){function e0(g0,y0){if(r0){var b0=g0.deletions;b0===null?(g0.deletions=[y0],g0.flags|=16):b0.push(y0)}}function n0(g0,y0){if(!r0)return null;for(;y0!==null;)e0(g0,y0),y0=y0.sibling;return null}function a0(g0,y0){for(g0=new Map;y0!==null;)y0.key!==null?g0.set(y0.key,y0):g0.set(y0.index,y0),y0=y0.sibling;return g0}function i0(g0,y0){return g0=Pg$1(g0,y0),g0.index=0,g0.sibling=null,g0}function s0(g0,y0,b0){return g0.index=b0,r0?(b0=g0.alternate,b0!==null?(b0=b0.index,b0<y0?(g0.flags|=2,y0):b0):(g0.flags|=2,y0)):(g0.flags|=1048576,y0)}function o0(g0){return r0&&g0.alternate===null&&(g0.flags|=2),g0}function l0(g0,y0,b0,E0){return y0===null||y0.tag!==6?(y0=Qg$1(b0,g0.mode,E0),y0.return=g0,y0):(y0=i0(y0,b0),y0.return=g0,y0)}function c0(g0,y0,b0,E0){var w0=b0.type;return w0===ya$1?d0(g0,y0,b0.props.children,E0,b0.key):y0!==null&&(y0.elementType===w0||typeof w0=="object"&&w0!==null&&w0.$$typeof===Ha$1&&Ng$1(w0)===y0.type)?(E0=i0(y0,b0.props),E0.ref=Lg$1(g0,y0,b0),E0.return=g0,E0):(E0=Rg$1(b0.type,b0.key,b0.props,null,g0.mode,E0),E0.ref=Lg$1(g0,y0,b0),E0.return=g0,E0)}function u0(g0,y0,b0,E0){return y0===null||y0.tag!==4||y0.stateNode.containerInfo!==b0.containerInfo||y0.stateNode.implementation!==b0.implementation?(y0=Sg$1(b0,g0.mode,E0),y0.return=g0,y0):(y0=i0(y0,b0.children||[]),y0.return=g0,y0)}function d0(g0,y0,b0,E0,w0){return y0===null||y0.tag!==7?(y0=Tg$1(b0,g0.mode,E0,w0),y0.return=g0,y0):(y0=i0(y0,b0),y0.return=g0,y0)}
vendor: 4,425 bytes, line 43
43function h0(g0,y0,b0){if(typeof y0=="string"&&y0!==""||typeof y0=="number")return y0=Qg$1(""+y0,g0.mode,b0),y0.return=g0,y0;if(typeof y0=="object"&&y0!==null){switch(y0.$$typeof){case va$1:return b0=Rg$1(y0.type,y0.key,y0.props,null,g0.mode,b0),b0.ref=Lg$1(g0,null,y0),b0.return=g0,b0;case wa$1:return y0=Sg$1(y0,g0.mode,b0),y0.return=g0,y0;case Ha$1:var E0=y0._init;return h0(g0,E0(y0._payload),b0)}if(eb(y0)||Ka$1(y0))return y0=Tg$1(y0,g0.mode,b0,null),y0.return=g0,y0;Mg$1(g0,y0)}return null}function f0(g0,y0,b0,E0){var w0=y0!==null?y0.key:null;if(typeof b0=="string"&&b0!==""||typeof b0=="number")return w0!==null?null:l0(g0,y0,""+b0,E0);if(typeof b0=="object"&&b0!==null){switch(b0.$$typeof){case va$1:return b0.key===w0?c0(g0,y0,b0,E0):null;case wa$1:return b0.key===w0?u0(g0,y0,b0,E0):null;case Ha$1:return w0=b0._init,f0(g0,y0,w0(b0._payload),E0)}if(eb(b0)||Ka$1(b0))return w0!==null?null:d0(g0,y0,b0,E0,null);Mg$1(g0,b0)}return null}function p0(g0,y0,b0,E0,w0){if(typeof E0=="string"&&E0!==""||typeof E0=="number")return g0=g0.get(b0)||null,l0(y0,g0,""+E0,w0);if(typeof E0=="object"&&E0!==null){switch(E0.$$typeof){case va$1:return g0=g0.get(E0.key===null?b0:E0.key)||null,c0(y0,g0,E0,w0);case wa$1:return g0=g0.get(E0.key===null?b0:E0.key)||null,u0(y0,g0,E0,w0);case Ha$1:var v0=E0._init;return p0(g0,y0,b0,v0(E0._payload),w0)}if(eb(E0)||Ka$1(E0))return g0=g0.get(b0)||null,d0(y0,g0,E0,w0,null);Mg$1(y0,E0)}return null}function A0(g0,y0,b0,E0){for(var w0=null,v0=null,S0=y0,k0=y0=0,R0=null;S0!==null&&k0<b0.length;k0++){S0.index>k0?(R0=S0,S0=null):R0=S0.sibling;var j0=f0(g0,S0,b0[k0],E0);if(j0===null){S0===null&&(S0=R0);break}r0&&S0&&j0.alternate===null&&e0(g0,S0),y0=s0(j0,y0,k0),v0===null?w0=j0:v0.sibling=j0,v0=j0,S0=R0}if(k0===b0.length)return n0(g0,S0),I$1&&tg$1(g0,k0),w0;if(S0===null){for(;k0<b0.length;k0++)S0=h0(g0,b0[k0],E0),S0!==null&&(y0=s0(S0,y0,k0),v0===null?w0=S0:v0.sibling=S0,v0=S0);return I$1&&tg$1(g0,k0),w0}for(S0=a0(g0,S0);k0<b0.length;k0++)R0=p0(S0,g0,k0,b0[k0],E0),R0!==null&&(r0&&R0.alternate!==null&&S0.delete(R0.key===null?k0:R0.key),y0=s0(R0,y0,k0),v0===null?w0=R0:v0.sibling=R0,v0=R0);return r0&&S0.forEach(function(C0){return e0(g0,C0)}),I$1&&tg$1(g0,k0),w0}function m0(g0,y0,b0,E0){var w0=Ka$1(b0);if(typeof w0!="function")throw Error(p$3(150));if(b0=w0.call(b0),b0==null)throw Error(p$3(151));for(var v0=w0=null,S0=y0,k0=y0=0,R0=null,j0=b0.next();S0!==null&&!j0.done;k0++,j0=b0.next()){S0.index>k0?(R0=S0,S0=null):R0=S0.sibling;var C0=f0(g0,S0,j0.value,E0);if(C0===null){S0===null&&(S0=R0);break}r0&&S0&&C0.alternate===null&&e0(g0,S0),y0=s0(C0,y0,k0),v0===null?w0=C0:v0.sibling=C0,v0=C0,S0=R0}if(j0.done)return n0(g0,S0),I$1&&tg$1(g0,k0),w0;if(S0===null){for(;!j0.done;k0++,j0=b0.next())j0=h0(g0,j0.value,E0),j0!==null&&(y0=s0(j0,y0,k0),v0===null?w0=j0:v0.sibling=j0,v0=j0);return I$1&&tg$1(g0,k0),w0}for(S0=a0(g0,S0);!j0.done;k0++,j0=b0.next())j0=p0(S0,g0,k0,j0.value,E0),j0!==null&&(r0&&j0.alternate!==null&&S0.delete(j0.key===null?k0:j0.key),y0=s0(j0,y0,k0),v0===null?w0=j0:v0.sibling=j0,v0=j0);return r0&&S0.forEach(function($0){return e0(g0,$0)}),I$1&&tg$1(g0,k0),w0}function x0(g0,y0,b0,E0){if(typeof b0=="object"&&b0!==null&&b0.type===ya$1&&b0.key===null&&(b0=b0.props.children),typeof b0=="object"&&b0!==null){switch(b0.$$typeof){case va$1:e:{for(var w0=b0.key,v0=y0;v0!==null;){if(v0.key===w0){if(w0=b0.type,w0===ya$1){if(v0.tag===7){n0(g0,v0.sibling),y0=i0(v0,b0.props.children),y0.return=g0,g0=y0;break e}}else if(v0.elementType===w0||typeof w0=="object"&&w0!==null&&w0.$$typeof===Ha$1&&Ng$1(w0)===v0.type){n0(g0,v0.sibling),y0=i0(v0,b0.props),y0.ref=Lg$1(g0,v0,b0),y0.return=g0,g0=y0;break e}n0(g0,v0);break}else e0(g0,v0);v0=v0.sibling}b0.type===ya$1?(y0=Tg$1(b0.props.children,g0.mode,E0,b0.key),y0.return=g0,g0=y0):(E0=Rg$1(b0.type,b0.key,b0.props,null,g0.mode,E0),E0.ref=Lg$1(g0,y0,b0),E0.return=g0,g0=E0)}return o0(g0);case wa$1:e:{for(v0=b0.key;y0!==null;){if(y0.key===v0)if(y0.tag===4&&y0.stateNode.containerInfo===b0.containerInfo&&y0.stateNode.implementation===b0.implementation){n0(g0,y0.sibling),y0=i0(y0,b0.children||[]),y0.return=g0,g0=y0;break e}else{n0(g0,y0);break}else e0(g0,y0);y0=y0.sibling}y0=Sg$1(b0,g0.mode,E0),y0.return=g0,g0=y0}return o0(g0);case Ha$1:return v0=b0._init,x0(g0,y0,v0(b0._payload),E0)}if(eb(b0))return A0(g0,y0,b0,E0);if(Ka$1(b0))return m0(g0,y0,b0,E0);Mg$1(g0,b0)}return typeof b0=="string"&&b0!==""||typeof b0=="number"?(b0=""+b
vendor: 5,044 bytes, line 43
430,y0!==null&&y0.tag===6?(n0(g0,y0.sibling),y0=i0(y0,b0),y0.return=g0,g0=y0):(n0(g0,y0),y0=Qg$1(b0,g0.mode,E0),y0.return=g0,g0=y0),o0(g0)):n0(g0,y0)}return x0}var Ug$1=Og$1(!0),Vg$1=Og$1(!1),Wg$1=Uf$1(null),Xg$1=null,Yg$1=null,Zg$1=null;function $g$1(){Zg$1=Yg$1=Xg$1=null}function ah$1(r0){var e0=Wg$1.current;E$3(Wg$1),r0._currentValue=e0}function bh$1(r0,e0,n0){for(;r0!==null;){var a0=r0.alternate;if((r0.childLanes&e0)!==e0?(r0.childLanes|=e0,a0!==null&&(a0.childLanes|=e0)):a0!==null&&(a0.childLanes&e0)!==e0&&(a0.childLanes|=e0),r0===n0)break;r0=r0.return}}function ch$1(r0,e0){Xg$1=r0,Zg$1=Yg$1=null,r0=r0.dependencies,r0!==null&&r0.firstContext!==null&&(r0.lanes&e0&&(dh$1=!0),r0.firstContext=null)}function eh$1(r0){var e0=r0._currentValue;if(Zg$1!==r0)if(r0={context:r0,memoizedValue:e0,next:null},Yg$1===null){if(Xg$1===null)throw Error(p$3(308));Yg$1=r0,Xg$1.dependencies={lanes:0,firstContext:r0}}else Yg$1=Yg$1.next=r0;return e0}var fh$1=null;function gh$1(r0){fh$1===null?fh$1=[r0]:fh$1.push(r0)}function hh$1(r0,e0,n0,a0){var i0=e0.interleaved;return i0===null?(n0.next=n0,gh$1(e0)):(n0.next=i0.next,i0.next=n0),e0.interleaved=n0,ih$1(r0,a0)}function ih$1(r0,e0){r0.lanes|=e0;var n0=r0.alternate;for(n0!==null&&(n0.lanes|=e0),n0=r0,r0=r0.return;r0!==null;)r0.childLanes|=e0,n0=r0.alternate,n0!==null&&(n0.childLanes|=e0),n0=r0,r0=r0.return;return n0.tag===3?n0.stateNode:null}var jh$1=!1;function kh$1(r0){r0.updateQueue={baseState:r0.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh$1(r0,e0){r0=r0.updateQueue,e0.updateQueue===r0&&(e0.updateQueue={baseState:r0.baseState,firstBaseUpdate:r0.firstBaseUpdate,lastBaseUpdate:r0.lastBaseUpdate,shared:r0.shared,effects:r0.effects})}function mh$1(r0,e0){return{eventTime:r0,lane:e0,tag:0,payload:null,callback:null,next:null}}function nh$1(r0,e0,n0){var a0=r0.updateQueue;if(a0===null)return null;if(a0=a0.shared,K$3&2){var i0=a0.pending;return i0===null?e0.next=e0:(e0.next=i0.next,i0.next=e0),a0.pending=e0,ih$1(r0,n0)}return i0=a0.interleaved,i0===null?(e0.next=e0,gh$1(a0)):(e0.next=i0.next,i0.next=e0),a0.interleaved=e0,ih$1(r0,n0)}function oh$1(r0,e0,n0){if(e0=e0.updateQueue,e0!==null&&(e0=e0.shared,(n0&4194240)!==0)){var a0=e0.lanes;a0&=r0.pendingLanes,n0|=a0,e0.lanes=n0,Cc$1(r0,n0)}}function ph$1(r0,e0){var n0=r0.updateQueue,a0=r0.alternate;if(a0!==null&&(a0=a0.updateQueue,n0===a0)){var i0=null,s0=null;if(n0=n0.firstBaseUpdate,n0!==null){do{var o0={eventTime:n0.eventTime,lane:n0.lane,tag:n0.tag,payload:n0.payload,callback:n0.callback,next:null};s0===null?i0=s0=o0:s0=s0.next=o0,n0=n0.next}while(n0!==null);s0===null?i0=s0=e0:s0=s0.next=e0}else i0=s0=e0;n0={baseState:a0.baseState,firstBaseUpdate:i0,lastBaseUpdate:s0,shared:a0.shared,effects:a0.effects},r0.updateQueue=n0;return}r0=n0.lastBaseUpdate,r0===null?n0.firstBaseUpdate=e0:r0.next=e0,n0.lastBaseUpdate=e0}function qh$1(r0,e0,n0,a0){var i0=r0.updateQueue;jh$1=!1;var s0=i0.firstBaseUpdate,o0=i0.lastBaseUpdate,l0=i0.shared.pending;if(l0!==null){i0.shared.pending=null;var c0=l0,u0=c0.next;c0.next=null,o0===null?s0=u0:o0.next=u0,o0=c0;var d0=r0.alternate;d0!==null&&(d0=d0.updateQueue,l0=d0.lastBaseUpdate,l0!==o0&&(l0===null?d0.firstBaseUpdate=u0:l0.next=u0,d0.lastBaseUpdate=c0))}if(s0!==null){var h0=i0.baseState;o0=0,d0=u0=c0=null,l0=s0;do{var f0=l0.lane,p0=l0.eventTime;if((a0&f0)===f0){d0!==null&&(d0=d0.next={eventTime:p0,lane:0,tag:l0.tag,payload:l0.payload,callback:l0.callback,next:null});e:{var A0=r0,m0=l0;switch(f0=e0,p0=n0,m0.tag){case 1:if(A0=m0.payload,typeof A0=="function"){h0=A0.call(p0,h0,f0);break e}h0=A0;break e;case 3:A0.flags=A0.flags&-65537|128;case 0:if(A0=m0.payload,f0=typeof A0=="function"?A0.call(p0,h0,f0):A0,f0==null)break e;h0=A$1({},h0,f0);break e;case 2:jh$1=!0}}l0.callback!==null&&l0.lane!==0&&(r0.flags|=64,f0=i0.effects,f0===null?i0.effects=[l0]:f0.push(l0))}else p0={eventTime:p0,lane:f0,tag:l0.tag,payload:l0.payload,callback:l0.callback,next:null},d0===null?(u0=d0=p0,c0=h0):d0=d0.next=p0,o0|=f0;if(l0=l0.next,l0===null){if(l0=i0.shared.pending,l0===null)break;f0=l0,l0=f0.next,f0.next=null,i0.lastBaseUpdate=f0,i0.shared.pending=null}}while(!0);if(d0===null&&(c0=h0),i0.baseState=c0,i0.firstBaseUpdate=u0,i0.lastBaseUpdate=d0,e0=i0.shared.interleaved,e0!==null){i0=e0;do o0|=i0.lane,i0=i0.next;while(i0!==e0)}else s0===null&&(i0.shared.lanes=0);rh$1|=o0,r0.lanes=o0,r0.memoizedState=h0}}function sh$1(r0,e0,n0){if(r0=e0.effects,e0.effects=null,r0!==null)for(e0=0;e0<r0.length;e0++){var a0=r0[e0],i0=a0.callback;if(i0!==null){if(a0.callback=null,a0=n0,typeof i0!="function")throw Error(p$3(191,i0));i0.call(a0)}}}var th$1={},uh$1=Uf$1(th$1),vh$1=Uf$1(th$1),wh$1=Uf$1(th$1);function xh$1(r0){if(r0===th$1)throw Error(p$3(174));return r0}function yh$1(r0,e0){switch(G$2(wh$1,e0),G$2(vh$1,r0),G$2(uh$1,th$1),r0=e0.nodeType,r0){case 9:case 11:e0=(e0=e0.documentElement)?e0.namespaceURI:lb(null,"");break;default:r0=r0===8?e0.parentNode:e0,e0=r0.namespaceURI||null,r0=r0.tagName,e0=lb(e0,r0)}
vendor: 8,332 bytes, line 43
43E$3(uh$1),G$2(uh$1,e0)}function zh$1(){E$3(uh$1),E$3(vh$1),E$3(wh$1)}function Ah$1(r0){xh$1(wh$1.current);var e0=xh$1(uh$1.current),n0=lb(e0,r0.type);e0!==n0&&(G$2(vh$1,r0),G$2(uh$1,n0))}function Bh$1(r0){vh$1.current===r0&&(E$3(uh$1),E$3(vh$1))}var L$3=Uf$1(0);function Ch$1(r0){for(var e0=r0;e0!==null;){if(e0.tag===13){var n0=e0.memoizedState;if(n0!==null&&(n0=n0.dehydrated,n0===null||n0.data==="$?"||n0.data==="$!"))return e0}else if(e0.tag===19&&e0.memoizedProps.revealOrder!==void 0){if(e0.flags&128)return e0}else if(e0.child!==null){e0.child.return=e0,e0=e0.child;continue}if(e0===r0)break;for(;e0.sibling===null;){if(e0.return===null||e0.return===r0)return null;e0=e0.return}e0.sibling.return=e0.return,e0=e0.sibling}return null}var Dh$1=[];function Eh$1(){for(var r0=0;r0<Dh$1.length;r0++)Dh$1[r0]._workInProgressVersionPrimary=null;Dh$1.length=0}var Fh$1=ua$1.ReactCurrentDispatcher,Gh$1=ua$1.ReactCurrentBatchConfig,Hh$1=0,M$2=null,N$2=null,O$1=null,Ih$1=!1,Jh$1=!1,Kh$1=0,Lh$1=0;function P$4(){throw Error(p$3(321))}function Mh$1(r0,e0){if(e0===null)return!1;for(var n0=0;n0<e0.length&&n0<r0.length;n0++)if(!He$1(r0[n0],e0[n0]))return!1;return!0}function Nh$1(r0,e0,n0,a0,i0,s0){if(Hh$1=s0,M$2=e0,e0.memoizedState=null,e0.updateQueue=null,e0.lanes=0,Fh$1.current=r0===null||r0.memoizedState===null?Oh$1:Ph$1,r0=n0(a0,i0),Jh$1){s0=0;do{if(Jh$1=!1,Kh$1=0,25<=s0)throw Error(p$3(301));s0+=1,O$1=N$2=null,e0.updateQueue=null,Fh$1.current=Qh$1,r0=n0(a0,i0)}while(Jh$1)}if(Fh$1.current=Rh$1,e0=N$2!==null&&N$2.next!==null,Hh$1=0,O$1=N$2=M$2=null,Ih$1=!1,e0)throw Error(p$3(300));return r0}function Sh$1(){var r0=Kh$1!==0;return Kh$1=0,r0}function Th$1(){var r0={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return O$1===null?M$2.memoizedState=O$1=r0:O$1=O$1.next=r0,O$1}function Uh$1(){if(N$2===null){var r0=M$2.alternate;r0=r0!==null?r0.memoizedState:null}else r0=N$2.next;var e0=O$1===null?M$2.memoizedState:O$1.next;if(e0!==null)O$1=e0,N$2=r0;else{if(r0===null)throw Error(p$3(310));N$2=r0,r0={memoizedState:N$2.memoizedState,baseState:N$2.baseState,baseQueue:N$2.baseQueue,queue:N$2.queue,next:null},O$1===null?M$2.memoizedState=O$1=r0:O$1=O$1.next=r0}return O$1}function Vh$1(r0,e0){return typeof e0=="function"?e0(r0):e0}function Wh$1(r0){var e0=Uh$1(),n0=e0.queue;if(n0===null)throw Error(p$3(311));n0.lastRenderedReducer=r0;var a0=N$2,i0=a0.baseQueue,s0=n0.pending;if(s0!==null){if(i0!==null){var o0=i0.next;i0.next=s0.next,s0.next=o0}a0.baseQueue=i0=s0,n0.pending=null}if(i0!==null){s0=i0.next,a0=a0.baseState;var l0=o0=null,c0=null,u0=s0;do{var d0=u0.lane;if((Hh$1&d0)===d0)c0!==null&&(c0=c0.next={lane:0,action:u0.action,hasEagerState:u0.hasEagerState,eagerState:u0.eagerState,next:null}),a0=u0.hasEagerState?u0.eagerState:r0(a0,u0.action);else{var h0={lane:d0,action:u0.action,hasEagerState:u0.hasEagerState,eagerState:u0.eagerState,next:null};c0===null?(l0=c0=h0,o0=a0):c0=c0.next=h0,M$2.lanes|=d0,rh$1|=d0}u0=u0.next}while(u0!==null&&u0!==s0);c0===null?o0=a0:c0.next=l0,He$1(a0,e0.memoizedState)||(dh$1=!0),e0.memoizedState=a0,e0.baseState=o0,e0.baseQueue=c0,n0.lastRenderedState=a0}if(r0=n0.interleaved,r0!==null){i0=r0;do s0=i0.lane,M$2.lanes|=s0,rh$1|=s0,i0=i0.next;while(i0!==r0)}else i0===null&&(n0.lanes=0);return[e0.memoizedState,n0.dispatch]}function Xh$1(r0){var e0=Uh$1(),n0=e0.queue;if(n0===null)throw Error(p$3(311));n0.lastRenderedReducer=r0;var a0=n0.dispatch,i0=n0.pending,s0=e0.memoizedState;if(i0!==null){n0.pending=null;var o0=i0=i0.next;do s0=r0(s0,o0.action),o0=o0.next;while(o0!==i0);He$1(s0,e0.memoizedState)||(dh$1=!0),e0.memoizedState=s0,e0.baseQueue===null&&(e0.baseState=s0),n0.lastRenderedState=s0}return[s0,a0]}function Yh$1(){}function Zh$1(r0,e0){var n0=M$2,a0=Uh$1(),i0=e0(),s0=!He$1(a0.memoizedState,i0);if(s0&&(a0.memoizedState=i0,dh$1=!0),a0=a0.queue,$h$1(ai$1.bind(null,n0,a0,r0),[r0]),a0.getSnapshot!==e0||s0||O$1!==null&&O$1.memoizedState.tag&1){if(n0.flags|=2048,bi$1(9,ci$1.bind(null,n0,a0,i0,e0),void 0,null),Q$1===null)throw Error(p$3(349));Hh$1&30||di$1(n0,e0,i0)}return i0}function di$1(r0,e0,n0){r0.flags|=16384,r0={getSnapshot:e0,value:n0},e0=M$2.updateQueue,e0===null?(e0={lastEffect:null,stores:null},M$2.updateQueue=e0,e0.stores=[r0]):(n0=e0.stores,n0===null?e0.stores=[r0]:n0.push(r0))}function ci$1(r0,e0,n0,a0){e0.value=n0,e0.getSnapshot=a0,ei$1(e0)&&fi$1(r0)}function ai$1(r0,e0,n0){return n0(function(){ei$1(e0)&&fi$1(r0)})}function ei$1(r0){var e0=r0.getSnapshot;r0=r0.value;try{var n0=e0();return!He$1(r0,n0)}catch{return!0}}function fi$1(r0){var e0=ih$1(r0,1);e0!==null&&gi$1(e0,r0,1,-1)}function hi$1(r0){var e0=Th$1();return typeof r0=="function"&&(r0=r0()),e0.memoizedState=e0.baseState=r0,r0={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh$1,lastRenderedState:r0},e0.queue=r0,r0=r0.dispatch=ii$1.bind(null,M$2,r0),[e0.memoizedState,r0]}function bi$1(r0,e0,n0,a0){return r0={tag:r0,create:e0,destroy:n0,deps:a0,next:null},e0=M$2.updateQueue,e0===null?(e0={lastEffect:null,stores:null},M$2.updateQueue=e0,e0.lastEffect=r0.next=r0):(n0=e0.lastEffect,n0===null?e0.lastEffect=r0.next=r0:(a0=n0.next,n0.next=r0,r0.next=a0,e0.lastEffect=r0)),r0}function ji$1(){return Uh$1().memoizedState}function ki$1(r0,e0,n0,a0){var i0=Th$1();M$2.flags|=r0,i0.memoizedState=bi$1(1|e0,n0,void 0,a0===void 0?null:a0)}function li$1(r0,e0,n0,a0){var i0=Uh$1();a0=a0===void 0?null:a0;var s0=void 0;if(N$2!==null){var o0=N$2.memoizedState;if(s0=o0.destroy,a0!==null&&Mh$1(a0,o0.deps)){i0.memoizedState=bi$1(e0,n0,s0,a0);return}}M$2.flags|=r0,i0.memoizedState=bi$1(1|e0,n0,s0,a0)}function mi$1(r0,e0){return ki$1(8390656,8,r0,e0)}function $h$1(r0,e0){return li$1(2048,8,r0,e0)}function ni$1(r0,e0){return li$1(4,2,r0,e0)}function oi$1(r0,e0){return li$1(4,4,r0,e0)}function pi$3(r0,e0){if(typeof e0=="function")return r0=r0(),e0(r0),function(){e0(null)};if(e0!=null)return r0=r0(),e0.current=r0,function(){e0.current=null}}function qi$1(r0,e0,n0){return n0=n0!=null?n0.concat([r0]):null,li$1(4,4,pi$3.bind(null,e0,r0),n0)}function ri$1(){}function si$1(r0,e0){var n0=Uh$1();e0=e0===void 0?null:e0;var a0=n0.memoizedState;return a0!==null&&e0!==null&&Mh$1(e0,a0[1])?a0[0]:(n0.memoizedState=[r0,e0],r0)}function ti$1(r0,e0){var n0=Uh$1();e0=e0===void 0?null:e0;var a0=n0.memoizedState;return a0!==null&&e0!==null&&Mh$1(e0,a0[1])?a0[0]:(r0=r0(),n0.memoizedState=[r0,e0],r0)}function ui$1(r0,e0,n0){return Hh$1&21?(He$1(n0,e0)||(n0=yc$1(),M$2.lanes|=n0,rh$1|=n0,r0.baseState=!0),e0):(r0.baseState&&(r0.baseState=!1,dh$1=!0),r0.memoizedState=n0)}function vi$1(r0,e0){var n0=C$1;C$1=n0!==0&&4>n0?n0:4,r0(!0);var a0=Gh$1.transition;Gh$1.transition={};try{r0(!1),e0()}finally{C$1=n0,Gh$1.transition=a0}}function wi$1(){return Uh$1().memoizedState}function xi$1(r0,e0,n0){var a0=yi$1(r0);if(n0={lane:a0,action:n0,hasEagerState:!1,eagerState:null,next:null},zi$1(r0))Ai$1(e0,n0);else if(n0=hh$1(r0,e0,n0,a0),n0!==null){var i0=R$2();gi$1(n0,r0,a0,i0),Bi$1(n0,e0,a0)}}function ii$1(r0,e0,n0){var a0=yi$1(r0),i0={lane:a0,action:n0,hasEagerState:!1,eagerState:null,next:null};if(zi$1(r0))Ai$1(e0,i0);else{var s0=r0.alternate;if(r0.lanes===0&&(s0===null||s0.lanes===0)&&(s0=e0.lastRenderedReducer,s0!==null))try{var o0=e0.lastRenderedState,l0=s0(o0,n0);if(i0.hasEagerState=!0,i0.eagerState=l0,He$1(l0,o0)){var c0=e0.interleaved;c0===null?(i0.next=i0,gh$1(e0)):(i0.next=c0.next,c0.next=i0),e0.interleaved=i0;return}}catch{}finally{}n0=hh$1(r0,e0,i0,a0),n0!==null&&(i0=R$2(),gi$1(n0,r0,a0,i0),Bi$1(n0,e0,a0))}}function zi$1(r0){var e0=r0.alternate;return r0===M$2||e0!==null&&e0===M$2}function Ai$1(r0,e0){Jh$1=Ih$1=!0;var n0=r0.pending;n0===null?e0.next=e0:(e0.next=n0.next,n0.next=e0),r0.pending=e0}function Bi$1(r0,e0,n0){if(n0&4194240){var a0=e0.lanes;a0&=r0.pendingLanes,n0|=a0,e0.lanes=n0,Cc$1(r0,n0)}}var Rh$1={readContext:eh$1,useCallback:P$4,useContext:P$4,useEffect:P$4,useImperativeHandle:P$4,useInsertionEffect:P$4,useLayoutEffect:P$4,useMemo:P$4,useReducer:P$4,useRef:P$4,useState:P$4,useDebugValue:P$4,useDeferredValue:P$4,useTransition:P$4,useMutableSource:P$4,useSyncExternalStore:P$4,useId:P$4,unstable_isNewReconciler:!1},Oh$1={readContext:eh$1,useCallback:function(r0,e0){return Th$1().memoizedState=[r0,e0===void 0?null:e0],r0},useContext:eh$1,useEffect:mi$1,useImperativeHandle:function(r0,e0,n0){return n0=n0!=null?n0.
vendor: 8,258 bytes, lines 43-45
43concat([r0]):null,ki$1(4194308,4,pi$3.bind(null,e0,r0),n0)},useLayoutEffect:function(r0,e0){return ki$1(4194308,4,r0,e0)},useInsertionEffect:function(r0,e0){return ki$1(4,2,r0,e0)},useMemo:function(r0,e0){var n0=Th$1();return e0=e0===void 0?null:e0,r0=r0(),n0.memoizedState=[r0,e0],r0},useReducer:function(r0,e0,n0){var a0=Th$1();return e0=n0!==void 0?n0(e0):e0,a0.memoizedState=a0.baseState=e0,r0={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r0,lastRenderedState:e0},a0.queue=r0,r0=r0.dispatch=xi$1.bind(null,M$2,r0),[a0.memoizedState,r0]},useRef:function(r0){var e0=Th$1();return r0={current:r0},e0.memoizedState=r0},useState:hi$1,useDebugValue:ri$1,useDeferredValue:function(r0){return Th$1().memoizedState=r0},useTransition:function(){var r0=hi$1(!1),e0=r0[0];return r0=vi$1.bind(null,r0[1]),Th$1().memoizedState=r0,[e0,r0]},useMutableSource:function(){},useSyncExternalStore:function(r0,e0,n0){var a0=M$2,i0=Th$1();if(I$1){if(n0===void 0)throw Error(p$3(407));n0=n0()}else{if(n0=e0(),Q$1===null)throw Error(p$3(349));Hh$1&30||di$1(a0,e0,n0)}i0.memoizedState=n0;var s0={value:n0,getSnapshot:e0};return i0.queue=s0,mi$1(ai$1.bind(null,a0,s0,r0),[r0]),a0.flags|=2048,bi$1(9,ci$1.bind(null,a0,s0,n0,e0),void 0,null),n0},useId:function(){var r0=Th$1(),e0=Q$1.identifierPrefix;if(I$1){var n0=sg$1,a0=rg$1;n0=(a0&~(1<<32-oc$1(a0)-1)).toString(32)+n0,e0=":"+e0+"R"+n0,n0=Kh$1++,0<n0&&(e0+="H"+n0.toString(32)),e0+=":"}else n0=Lh$1++,e0=":"+e0+"r"+n0.toString(32)+":";return r0.memoizedState=e0},unstable_isNewReconciler:!1},Ph$1={readContext:eh$1,useCallback:si$1,useContext:eh$1,useEffect:$h$1,useImperativeHandle:qi$1,useInsertionEffect:ni$1,useLayoutEffect:oi$1,useMemo:ti$1,useReducer:Wh$1,useRef:ji$1,useState:function(){return Wh$1(Vh$1)},useDebugValue:ri$1,useDeferredValue:function(r0){var e0=Uh$1();return ui$1(e0,N$2.memoizedState,r0)},useTransition:function(){var r0=Wh$1(Vh$1)[0],e0=Uh$1().memoizedState;return[r0,e0]},useMutableSource:Yh$1,useSyncExternalStore:Zh$1,useId:wi$1,unstable_isNewReconciler:!1},Qh$1={readContext:eh$1,useCallback:si$1,useContext:eh$1,useEffect:$h$1,useImperativeHandle:qi$1,useInsertionEffect:ni$1,useLayoutEffect:oi$1,useMemo:ti$1,useReducer:Xh$1,useRef:ji$1,useState:function(){return Xh$1(Vh$1)},useDebugValue:ri$1,useDeferredValue:function(r0){var e0=Uh$1();return N$2===null?e0.memoizedState=r0:ui$1(e0,N$2.memoizedState,r0)},useTransition:function(){var r0=Xh$1(Vh$1)[0],e0=Uh$1().memoizedState;return[r0,e0]},useMutableSource:Yh$1,useSyncExternalStore:Zh$1,useId:wi$1,unstable_isNewReconciler:!1};function Ci$1(r0,e0){if(r0&&r0.defaultProps){e0=A$1({},e0),r0=r0.defaultProps;for(var n0 in r0)e0[n0]===void 0&&(e0[n0]=r0[n0]);return e0}return e0}function Di$1(r0,e0,n0,a0){e0=r0.memoizedState,n0=n0(a0,e0),n0=n0==null?e0:A$1({},e0,n0),r0.memoizedState=n0,r0.lanes===0&&(r0.updateQueue.baseState=n0)}var Ei$1={isMounted:function(r0){return(r0=r0._reactInternals)?Vb$1(r0)===r0:!1},enqueueSetState:function(r0,e0,n0){r0=r0._reactInternals;var a0=R$2(),i0=yi$1(r0),s0=mh$1(a0,i0);s0.payload=e0,n0!=null&&(s0.callback=n0),e0=nh$1(r0,s0,i0),e0!==null&&(gi$1(e0,r0,i0,a0),oh$1(e0,r0,i0))},enqueueReplaceState:function(r0,e0,n0){r0=r0._reactInternals;var a0=R$2(),i0=yi$1(r0),s0=mh$1(a0,i0);s0.tag=1,s0.payload=e0,n0!=null&&(s0.callback=n0),e0=nh$1(r0,s0,i0),e0!==null&&(gi$1(e0,r0,i0,a0),oh$1(e0,r0,i0))},enqueueForceUpdate:function(r0,e0){r0=r0._reactInternals;var n0=R$2(),a0=yi$1(r0),i0=mh$1(n0,a0);i0.tag=2,e0!=null&&(i0.callback=e0),e0=nh$1(r0,i0,a0),e0!==null&&(gi$1(e0,r0,a0,n0),oh$1(e0,r0,a0))}};function Fi$1(r0,e0,n0,a0,i0,s0,o0){return r0=r0.stateNode,typeof r0.shouldComponentUpdate=="function"?r0.shouldComponentUpdate(a0,s0,o0):e0.prototype&&e0.prototype.isPureReactComponent?!Ie$2(n0,a0)||!Ie$2(i0,s0):!0}function Gi$1(r0,e0,n0){var a0=!1,i0=Vf$1,s0=e0.contextType;return typeof s0=="object"&&s0!==null?s0=eh$1(s0):(i0=Zf$1(e0)?Xf$1:H$2.current,a0=e0.contextTypes,s0=(a0=a0!=null)?Yf$1(r0,i0):Vf$1),e0=new e0(n0,s0),r0.memoizedState=e0.state!==null&&e0.state!==void 0?e0.state:null,e0.updater=Ei$1,r0.stateNode=e0,e0._reactInternals=r0,a0&&(r0=r0.stateNode,r0.__reactInternalMemoizedUnmaskedChildContext=i0,r0.__reactInternalMemoizedMaskedChildContext=s0),e0}function Hi$1(r0,e0,n0,a0){r0=e0.state,typeof e0.componentWillReceiveProps=="function"&&e0.componentWillReceiveProps(n0,a0),typeof e0.UNSAFE_componentWillReceiveProps=="function"&&e0.UNSAFE_componentWillReceiveProps(n0,a0),e0.state!==r0&&Ei$1.enqueueReplaceState(e0,e0.state,null)}function Ii$1(r0,e0,n0,a0){var i0=r0.stateNode;i0.props=n0,i0.state=r0.memoizedState,i0.refs={},kh$1(r0);var s0=e0.contextType;typeof s0=="object"&&s0!==null?i0.context=eh$1(s0):(s0=Zf$1(e0)?Xf$1:H$2.current,i0.context=Yf$1(r0,s0)),i0.state=r0.memoizedState,s0=e0.getDerivedStateFromProps,typeof s0=="function"&&(Di$1(r0,e0,s0,n0),i0.state=r0.memoizedState),typeof e0.getDerivedStateFromProps=="function"||typeof i0.getSnapshotBeforeUpdate=="function"||typeof i0.UNSAFE_componentWillMount!="function"&&typeof i0.componentWillMount!="function"||(e0=i0.state,typeof i0.componentWillMount=="function"&&i0.componentWillMount(),typeof i0.UNSAFE_componentWillMount=="function"&&i0.UNSAFE_componentWillMount(),e0!==i0.state&&Ei$1.enqueueReplaceState(i0,i0.state,null),qh$1(r0,n0,i0,a0),i0.state=r0.memoizedState),typeof i0.componentDidMount=="function"&&(r0.flags|=4194308)}function Ji$1(r0,e0){try{var n0="",a0=e0;do n0+=Pa$1(a0),a0=a0.return;while(a0);var i0=n0}catch(s0){i0=` 44Error generating stack: `+s0.message+` 45`+s0.stack}return{value:r0,source:e0,stack:i0,digest:null}}function Ki$1(r0,e0,n0){return{value:r0,source:null,stack:n0??null,digest:e0??null}}function Li$1(r0,e0){try{console.error(e0.value)}catch(n0){setTimeout(function(){throw n0})}}var Mi$1=typeof WeakMap=="function"?WeakMap:Map;function Ni$1(r0,e0,n0){n0=mh$1(-1,n0),n0.tag=3,n0.payload={element:null};var a0=e0.value;return n0.callback=function(){Oi$1||(Oi$1=!0,Pi$1=a0),Li$1(r0,e0)},n0}function Qi$1(r0,e0,n0){n0=mh$1(-1,n0),n0.tag=3;var a0=r0.type.getDerivedStateFromError;if(typeof a0=="function"){var i0=e0.value;n0.payload=function(){return a0(i0)},n0.callback=function(){Li$1(r0,e0)}}var s0=r0.stateNode;return s0!==null&&typeof s0.componentDidCatch=="function"&&(n0.callback=function(){Li$1(r0,e0),typeof a0!="function"&&(Ri$1===null?Ri$1=new Set([this]):Ri$1.add(this));var o0=e0.stack;this.componentDidCatch(e0.value,{componentStack:o0!==null?o0:""})}),n0}function Si$1(r0,e0,n0){var a0=r0.pingCache;if(a0===null){a0=r0.pingCache=new Mi$1;var i0=new Set;a0.set(e0,i0)}else i0=a0.get(e0),i0===void 0&&(i0=new Set,a0.set(e0,i0));i0.has(n0)||(i0.add(n0),r0=Ti$1.bind(null,r0,e0,n0),e0.then(r0,r0))}function Ui$1(r0){do{var e0;if((e0=r0.tag===13)&&(e0=r0.memoizedState,e0=e0!==null?e0.dehydrated!==null:!0),e0)return r0;r0=r0.return}while(r0!==null);return null}function Vi$1(r0,e0,n0,a0,i0){return r0.mode&1?(r0.flags|=65536,r0.lanes=i0,r0):(r0===e0?r0.flags|=65536:(r0.flags|=128,n0.flags|=131072,n0.flags&=-52805,n0.tag===1&&(n0.alternate===null?n0.tag=17:(e0=mh$1(-1,1),e0.tag=2,nh$1(n0,e0,1))),n0.lanes|=1),r0)}var Wi$1=ua$1.ReactCurrentOwner,dh$1=!1;function Xi$1(r0,e0,n0,a0){e0.child=r0===null?Vg$1(e0,null,n0,a0):Ug$1(e0,r0.child,n0,a0)}function Yi$1(r0,e0,n0,a0,i0){n0=n0.render;var s0=e0.ref;return ch$1(e0,i0),a0=Nh$1(r0,e0,n0,a0,s0,i0),n0=Sh$1(),r0!==null&&!dh$1?(e0.updateQueue=r0.updateQueue,e0.flags&=-2053,r0.lanes&=~i0,Zi$1(r0,e0,i0)):(I$1&&n0&&vg$1(e0),e0.flags|=1,Xi$1(r0,e0,a0,i0),e0.child)}function $i$1(r0,e0,n0,a0,i0){if(r0===null){var s0=n0.type;return typeof s0=="function"&&!aj(s0)&&s0.defaultProps===void 0&&n0.compare===null&&n0.defaultProps===void 0?(e0.tag=15,e0.type=s0,bj(r0,e0,s0,a0,i0)):(r0=Rg$1(n0.type,null,a0,e0,e0.mode,i0),r0.ref=e0.ref,r0.return=e0,e0.child=r0)}if(s0=r0.child,!(r0.lanes&i0)){var o0=s0.memoizedProps;if(n0=n0.compare,n0=n0!==null?n0:Ie$2,n0(o0,a0)&&r0.ref===e0.ref)return Zi$1(r0,e0,i0)}return e0.flags|=1,r0=Pg$1(s0,a0),r0.ref=e0.ref,r0.return=e0,e0.child=r0}function bj(r0,e0,n0,a0,i0){if(r0!==null){var s0=r0.memoizedProps;if(Ie$2(s0,a0)&&r0.ref===e0.ref)if(dh$1=!1,e0.pendingProps=a0=s0,(r0.lanes&i0)!==0)r0.flags&131072&&(dh$1=!0);else return e0.lanes=r0.lanes,Zi$1(r0,e0,i0)}return cj(r0,e0,n0,a0,i0)}
vendor: 4,846 bytes, line 45
45function dj(r0,e0,n0){var a0=e0.pendingProps,i0=a0.children,s0=r0!==null?r0.memoizedState:null;if(a0.mode==="hidden")if(!(e0.mode&1))e0.memoizedState={baseLanes:0,cachePool:null,transitions:null},G$2(ej,fj),fj|=n0;else{if(!(n0&1073741824))return r0=s0!==null?s0.baseLanes|n0:n0,e0.lanes=e0.childLanes=1073741824,e0.memoizedState={baseLanes:r0,cachePool:null,transitions:null},e0.updateQueue=null,G$2(ej,fj),fj|=r0,null;e0.memoizedState={baseLanes:0,cachePool:null,transitions:null},a0=s0!==null?s0.baseLanes:n0,G$2(ej,fj),fj|=a0}else s0!==null?(a0=s0.baseLanes|n0,e0.memoizedState=null):a0=n0,G$2(ej,fj),fj|=a0;return Xi$1(r0,e0,i0,n0),e0.child}function gj(r0,e0){var n0=e0.ref;(r0===null&&n0!==null||r0!==null&&r0.ref!==n0)&&(e0.flags|=512,e0.flags|=2097152)}function cj(r0,e0,n0,a0,i0){var s0=Zf$1(n0)?Xf$1:H$2.current;return s0=Yf$1(e0,s0),ch$1(e0,i0),n0=Nh$1(r0,e0,n0,a0,s0,i0),a0=Sh$1(),r0!==null&&!dh$1?(e0.updateQueue=r0.updateQueue,e0.flags&=-2053,r0.lanes&=~i0,Zi$1(r0,e0,i0)):(I$1&&a0&&vg$1(e0),e0.flags|=1,Xi$1(r0,e0,n0,i0),e0.child)}function hj(r0,e0,n0,a0,i0){if(Zf$1(n0)){var s0=!0;cg$1(e0)}else s0=!1;if(ch$1(e0,i0),e0.stateNode===null)ij(r0,e0),Gi$1(e0,n0,a0),Ii$1(e0,n0,a0,i0),a0=!0;else if(r0===null){var o0=e0.stateNode,l0=e0.memoizedProps;o0.props=l0;var c0=o0.context,u0=n0.contextType;typeof u0=="object"&&u0!==null?u0=eh$1(u0):(u0=Zf$1(n0)?Xf$1:H$2.current,u0=Yf$1(e0,u0));var d0=n0.getDerivedStateFromProps,h0=typeof d0=="function"||typeof o0.getSnapshotBeforeUpdate=="function";h0||typeof o0.UNSAFE_componentWillReceiveProps!="function"&&typeof o0.componentWillReceiveProps!="function"||(l0!==a0||c0!==u0)&&Hi$1(e0,o0,a0,u0),jh$1=!1;var f0=e0.memoizedState;o0.state=f0,qh$1(e0,a0,o0,i0),c0=e0.memoizedState,l0!==a0||f0!==c0||Wf$1.current||jh$1?(typeof d0=="function"&&(Di$1(e0,n0,d0,a0),c0=e0.memoizedState),(l0=jh$1||Fi$1(e0,n0,l0,a0,f0,c0,u0))?(h0||typeof o0.UNSAFE_componentWillMount!="function"&&typeof o0.componentWillMount!="function"||(typeof o0.componentWillMount=="function"&&o0.componentWillMount(),typeof o0.UNSAFE_componentWillMount=="function"&&o0.UNSAFE_componentWillMount()),typeof o0.componentDidMount=="function"&&(e0.flags|=4194308)):(typeof o0.componentDidMount=="function"&&(e0.flags|=4194308),e0.memoizedProps=a0,e0.memoizedState=c0),o0.props=a0,o0.state=c0,o0.context=u0,a0=l0):(typeof o0.componentDidMount=="function"&&(e0.flags|=4194308),a0=!1)}else{o0=e0.stateNode,lh$1(r0,e0),l0=e0.memoizedProps,u0=e0.type===e0.elementType?l0:Ci$1(e0.type,l0),o0.props=u0,h0=e0.pendingProps,f0=o0.context,c0=n0.contextType,typeof c0=="object"&&c0!==null?c0=eh$1(c0):(c0=Zf$1(n0)?Xf$1:H$2.current,c0=Yf$1(e0,c0));var p0=n0.getDerivedStateFromProps;(d0=typeof p0=="function"||typeof o0.getSnapshotBeforeUpdate=="function")||typeof o0.UNSAFE_componentWillReceiveProps!="function"&&typeof o0.componentWillReceiveProps!="function"||(l0!==h0||f0!==c0)&&Hi$1(e0,o0,a0,c0),jh$1=!1,f0=e0.memoizedState,o0.state=f0,qh$1(e0,a0,o0,i0);var A0=e0.memoizedState;l0!==h0||f0!==A0||Wf$1.current||jh$1?(typeof p0=="function"&&(Di$1(e0,n0,p0,a0),A0=e0.memoizedState),(u0=jh$1||Fi$1(e0,n0,u0,a0,f0,A0,c0)||!1)?(d0||typeof o0.UNSAFE_componentWillUpdate!="function"&&typeof o0.componentWillUpdate!="function"||(typeof o0.componentWillUpdate=="function"&&o0.componentWillUpdate(a0,A0,c0),typeof o0.UNSAFE_componentWillUpdate=="function"&&o0.UNSAFE_componentWillUpdate(a0,A0,c0)),typeof o0.componentDidUpdate=="function"&&(e0.flags|=4),typeof o0.getSnapshotBeforeUpdate=="function"&&(e0.flags|=1024)):(typeof o0.componentDidUpdate!="function"||l0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=4),typeof o0.getSnapshotBeforeUpdate!="function"||l0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=1024),e0.memoizedProps=a0,e0.memoizedState=A0),o0.props=a0,o0.state=A0,o0.context=c0,a0=u0):(typeof o0.componentDidUpdate!="function"||l0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=4),typeof o0.getSnapshotBeforeUpdate!="function"||l0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=1024),a0=!1)}return jj(r0,e0,n0,a0,s0,i0)}function jj(r0,e0,n0,a0,i0,s0){gj(r0,e0);var o0=(e0.flags&128)!==0;if(!a0&&!o0)return i0&&dg$1(e0,n0,!1),Zi$1(r0,e0,s0);a0=e0.stateNode,Wi$1.current=e0;var l0=o0&&typeof n0.getDerivedStateFromError!="function"?null:a0.render();return e0.flags|=1,r0!==null&&o0?(e0.child=Ug$1(e0,r0.child,null,s0),e0.child=Ug$1(e0,null,l0,s0)):Xi$1(r0,e0,l0,s0),e0.memoizedState=a0.state,i0&&dg$1(e0,n0,!0),e0.child}function kj(r0){var e0=r0.stateNode;e0.pendingContext?ag$1(r0,e0.pendingContext,e0.pendingContext!==e0.context):e0.context&&ag$1(r0,e0.context,!1),yh$1(r0,e0.containerInfo)}function lj(r0,e0,n0,a0,i0){return Ig$1(),Jg$1(i0),e0.flags|=256,Xi$1(r0,e0,n0,a0),e0.child}var mj={dehydrated:null,treeContext:null,retryLane:0};function nj(r0){return{baseLanes:r0,cachePool:null,transitions:null}}
vendor: 8,946 bytes, line 45
45function oj(r0,e0,n0){var a0=e0.pendingProps,i0=L$3.current,s0=!1,o0=(e0.flags&128)!==0,l0;if((l0=o0)||(l0=r0!==null&&r0.memoizedState===null?!1:(i0&2)!==0),l0?(s0=!0,e0.flags&=-129):(r0===null||r0.memoizedState!==null)&&(i0|=1),G$2(L$3,i0&1),r0===null)return Eg$1(e0),r0=e0.memoizedState,r0!==null&&(r0=r0.dehydrated,r0!==null)?(e0.mode&1?r0.data==="$!"?e0.lanes=8:e0.lanes=1073741824:e0.lanes=1,null):(o0=a0.children,r0=a0.fallback,s0?(a0=e0.mode,s0=e0.child,o0={mode:"hidden",children:o0},!(a0&1)&&s0!==null?(s0.childLanes=0,s0.pendingProps=o0):s0=pj(o0,a0,0,null),r0=Tg$1(r0,a0,n0,null),s0.return=e0,r0.return=e0,s0.sibling=r0,e0.child=s0,e0.child.memoizedState=nj(n0),e0.memoizedState=mj,r0):qj(e0,o0));if(i0=r0.memoizedState,i0!==null&&(l0=i0.dehydrated,l0!==null))return rj(r0,e0,o0,a0,l0,i0,n0);if(s0){s0=a0.fallback,o0=e0.mode,i0=r0.child,l0=i0.sibling;var c0={mode:"hidden",children:a0.children};return!(o0&1)&&e0.child!==i0?(a0=e0.child,a0.childLanes=0,a0.pendingProps=c0,e0.deletions=null):(a0=Pg$1(i0,c0),a0.subtreeFlags=i0.subtreeFlags&14680064),l0!==null?s0=Pg$1(l0,s0):(s0=Tg$1(s0,o0,n0,null),s0.flags|=2),s0.return=e0,a0.return=e0,a0.sibling=s0,e0.child=a0,a0=s0,s0=e0.child,o0=r0.child.memoizedState,o0=o0===null?nj(n0):{baseLanes:o0.baseLanes|n0,cachePool:null,transitions:o0.transitions},s0.memoizedState=o0,s0.childLanes=r0.childLanes&~n0,e0.memoizedState=mj,a0}return s0=r0.child,r0=s0.sibling,a0=Pg$1(s0,{mode:"visible",children:a0.children}),!(e0.mode&1)&&(a0.lanes=n0),a0.return=e0,a0.sibling=null,r0!==null&&(n0=e0.deletions,n0===null?(e0.deletions=[r0],e0.flags|=16):n0.push(r0)),e0.child=a0,e0.memoizedState=null,a0}function qj(r0,e0){return e0=pj({mode:"visible",children:e0},r0.mode,0,null),e0.return=r0,r0.child=e0}function sj(r0,e0,n0,a0){return a0!==null&&Jg$1(a0),Ug$1(e0,r0.child,null,n0),r0=qj(e0,e0.pendingProps.children),r0.flags|=2,e0.memoizedState=null,r0}function rj(r0,e0,n0,a0,i0,s0,o0){if(n0)return e0.flags&256?(e0.flags&=-257,a0=Ki$1(Error(p$3(422))),sj(r0,e0,o0,a0)):e0.memoizedState!==null?(e0.child=r0.child,e0.flags|=128,null):(s0=a0.fallback,i0=e0.mode,a0=pj({mode:"visible",children:a0.children},i0,0,null),s0=Tg$1(s0,i0,o0,null),s0.flags|=2,a0.return=e0,s0.return=e0,a0.sibling=s0,e0.child=a0,e0.mode&1&&Ug$1(e0,r0.child,null,o0),e0.child.memoizedState=nj(o0),e0.memoizedState=mj,s0);if(!(e0.mode&1))return sj(r0,e0,o0,null);if(i0.data==="$!"){if(a0=i0.nextSibling&&i0.nextSibling.dataset,a0)var l0=a0.dgst;return a0=l0,s0=Error(p$3(419)),a0=Ki$1(s0,a0,void 0),sj(r0,e0,o0,a0)}if(l0=(o0&r0.childLanes)!==0,dh$1||l0){if(a0=Q$1,a0!==null){switch(o0&-o0){case 4:i0=2;break;case 16:i0=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:i0=32;break;case 536870912:i0=268435456;break;default:i0=0}i0=i0&(a0.suspendedLanes|o0)?0:i0,i0!==0&&i0!==s0.retryLane&&(s0.retryLane=i0,ih$1(r0,i0),gi$1(a0,r0,i0,-1))}return tj(),a0=Ki$1(Error(p$3(421))),sj(r0,e0,o0,a0)}return i0.data==="$?"?(e0.flags|=128,e0.child=r0.child,e0=uj.bind(null,r0),i0._reactRetry=e0,null):(r0=s0.treeContext,yg$1=Lf$1(i0.nextSibling),xg$1=e0,I$1=!0,zg$1=null,r0!==null&&(og$1[pg$1++]=rg$1,og$1[pg$1++]=sg$1,og$1[pg$1++]=qg$1,rg$1=r0.id,sg$1=r0.overflow,qg$1=e0),e0=qj(e0,a0.children),e0.flags|=4096,e0)}function vj(r0,e0,n0){r0.lanes|=e0;var a0=r0.alternate;a0!==null&&(a0.lanes|=e0),bh$1(r0.return,e0,n0)}function wj(r0,e0,n0,a0,i0){var s0=r0.memoizedState;s0===null?r0.memoizedState={isBackwards:e0,rendering:null,renderingStartTime:0,last:a0,tail:n0,tailMode:i0}:(s0.isBackwards=e0,s0.rendering=null,s0.renderingStartTime=0,s0.last=a0,s0.tail=n0,s0.tailMode=i0)}function xj(r0,e0,n0){var a0=e0.pendingProps,i0=a0.revealOrder,s0=a0.tail;if(Xi$1(r0,e0,a0.children,n0),a0=L$3.current,a0&2)a0=a0&1|2,e0.flags|=128;else{if(r0!==null&&r0.flags&128)e:for(r0=e0.child;r0!==null;){if(r0.tag===13)r0.memoizedState!==null&&vj(r0,n0,e0);else if(r0.tag===19)vj(r0,n0,e0);else if(r0.child!==null){r0.child.return=r0,r0=r0.child;continue}if(r0===e0)break e;for(;r0.sibling===null;){if(r0.return===null||r0.return===e0)break e;r0=r0.return}r0.sibling.return=r0.return,r0=r0.sibling}a0&=1}if(G$2(L$3,a0),!(e0.mode&1))e0.memoizedState=null;else switch(i0){case"forwards":for(n0=e0.child,i0=null;n0!==null;)r0=n0.alternate,r0!==null&&Ch$1(r0)===null&&(i0=n0),n0=n0.sibling;n0=i0,n0===null?(i0=e0.child,e0.child=null):(i0=n0.sibling,n0.sibling=null),wj(e0,!1,i0,n0,s0);break;case"backwards":for(n0=null,i0=e0.child,e0.child=null;i0!==null;){if(r0=i0.alternate,r0!==null&&Ch$1(r0)===null){e0.child=i0;break}r0=i0.sibling,i0.sibling=n0,n0=i0,i0=r0}wj(e0,!0,n0,null,s0);break;case"together":wj(e0,!1,null,null,void 0);break;default:e0.memoizedState=null}return e0.child}function ij(r0,e0){!(e0.mode&1)&&r0!==null&&(r0.alternate=null,e0.alternate=null,e0.flags|=2)}function Zi$1(r0,e0,n0){if(r0!==null&&(e0.dependencies=r0.dependencies),rh$1|=e0.lanes,!(n0&e0.childLanes))return null;if(r0!==null&&e0.child!==r0.child)throw Error(p$3(153));if(e0.child!==null){for(r0=e0.child,n0=Pg$1(r0,r0.pendingProps),e0.child=n0,n0.return=e0;r0.sibling!==null;)r0=r0.sibling,n0=n0.sibling=Pg$1(r0,r0.pendingProps),n0.return=e0;n0.sibling=null}return e0.child}function yj(r0,e0,n0){switch(e0.tag){case 3:kj(e0),Ig$1();break;case 5:Ah$1(e0);break;case 1:Zf$1(e0.type)&&cg$1(e0);break;case 4:yh$1(e0,e0.stateNode.containerInfo);break;case 10:var a0=e0.type._context,i0=e0.memoizedProps.value;G$2(Wg$1,a0._currentValue),a0._currentValue=i0;break;case 13:if(a0=e0.memoizedState,a0!==null)return a0.dehydrated!==null?(G$2(L$3,L$3.current&1),e0.flags|=128,null):n0&e0.child.childLanes?oj(r0,e0,n0):(G$2(L$3,L$3.current&1),r0=Zi$1(r0,e0,n0),r0!==null?r0.sibling:null);G$2(L$3,L$3.current&1);break;case 19:if(a0=(n0&e0.childLanes)!==0,r0.flags&128){if(a0)return xj(r0,e0,n0);e0.flags|=128}if(i0=e0.memoizedState,i0!==null&&(i0.rendering=null,i0.tail=null,i0.lastEffect=null),G$2(L$3,L$3.current),a0)break;return null;case 22:case 23:return e0.lanes=0,dj(r0,e0,n0)}return Zi$1(r0,e0,n0)}var zj,Aj,Bj,Cj;zj=function(r0,e0){for(var n0=e0.child;n0!==null;){if(n0.tag===5||n0.tag===6)r0.appendChild(n0.stateNode);else if(n0.tag!==4&&n0.child!==null){n0.child.return=n0,n0=n0.child;continue}if(n0===e0)break;for(;n0.sibling===null;){if(n0.return===null||n0.return===e0)return;n0=n0.return}n0.sibling.return=n0.return,n0=n0.sibling}};Aj=function(){};Bj=function(r0,e0,n0,a0){var i0=r0.memoizedProps;if(i0!==a0){r0=e0.stateNode,xh$1(uh$1.current);var s0=null;switch(n0){case"input":i0=Ya$1(r0,i0),a0=Ya$1(r0,a0),s0=[];break;case"select":i0=A$1({},i0,{value:void 0}),a0=A$1({},a0,{value:void 0}),s0=[];break;case"textarea":i0=gb$1(r0,i0),a0=gb$1(r0,a0),s0=[];break;default:typeof i0.onClick!="function"&&typeof a0.onClick=="function"&&(r0.onclick=Bf$1)}ub$1(n0,a0);var o0;n0=null;for(u0 in i0)if(!a0.hasOwnProperty(u0)&&i0.hasOwnProperty(u0)&&i0[u0]!=null)if(u0==="style"){var l0=i0[u0];for(o0 in l0)l0.hasOwnProperty(o0)&&(n0||(n0={}),n0[o0]="")}else u0!=="dangerouslySetInnerHTML"&&u0!=="children"&&u0!=="suppressContentEditableWarning"&&u0!=="suppressHydrationWarning"&&u0!=="autoFocus"&&(ea$1.hasOwnProperty(u0)?s0||(s0=[]):(s0=s0||[]).push(u0,null));for(u0 in a0){var c0=a0[u0];if(l0=i0!=null?i0[u0]:void 0,a0.hasOwnProperty(u0)&&c0!==l0&&(c0!=null||l0!=null))if(u0==="style")if(l0){for(o0 in l0)!l0.hasOwnProperty(o0)||c0&&c0.hasOwnProperty(o0)||(n0||(n0={}),n0[o0]="");for(o0 in c0)c0.hasOwnProperty(o0)&&l0[o0]!==c0[o0]&&(n0||(n0={}),n0[o0]=c0[o0])}else n0||(s0||(s0=[]),s0.push(u0,n0)),n0=c0;else u0==="dangerouslySetInnerHTML"?(c0=c0?c0.__html:void 0,l0=l0?l0.__html:void 0,c0!=null&&l0!==c0&&(s0=s0||[]).push(u0,c0)):u0==="children"?typeof c0!="string"&&typeof c0!="number"||(s0=s0||[]).push(u0,""+c0):u0!=="suppressContentEditableWarning"&&u0!=="suppressHydrationWarning"&&(ea$1.hasOwnProperty(u0)?(c0!=null&&u0==="onScroll"&&D$3("scroll",r0),s0||l0===c0||(s0=[])):(s0=s0||[]).push(u0,c0))}n0&&(s0=s0||[]).push("style",n0);var u0=s0;(e0.updateQueue=u0)&&(e0.flags|=4)}};Cj=function(r0,e0,n0,a0){n0!==a0&&(e0.flags|=4)};function Dj(r0,e0){if(!I$1)switch(r0.tailMode){case"hidden":e0=r0.tail;for(var n0=null;e0!==null;)e0.alternate!==null&&(n0=e0),e0=e0.sibling;n0===null?r0.tail=null:n0.sibling=null;break;case"collapsed":n0=r0.tail;for(var a0=null;n0!==null;)n0.alternate!==null&&(a0=n0),n0=n0.sibling;a0===null?e0||r0.tail===null?r0.tail=null:r0.tail.sibling=null:a0.sibling=null}}function S$1(r0){var e0=r0.alternate!==null&&r0.alternate.child===r0.child,n0=0,a0=0;if(e0)for(var i0=r0.child;i0!==null;)n0|=i0.lanes|i0.childLanes,a0|=i0.subtreeFlags&14680064,a0|=i0.flags&14680064,i0.return=r0,i0=i0.sibling;else for(i0=r0.child;i0!==null;)n0|=i0.lanes|i0.childLanes,a0|=i0.subtreeFlags,a0|=i0.flags,i0.return=r0,i0=i0.sibling;return r0.subtreeFlags|=a0,r0.childLanes=n0,e0}
vendor: 36,985 bytes, line 45
45function Ej(r0,e0,n0){var a0=e0.pendingProps;switch(wg$1(e0),e0.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S$1(e0),null;case 1:return Zf$1(e0.type)&&$f$1(),S$1(e0),null;case 3:return a0=e0.stateNode,zh$1(),E$3(Wf$1),E$3(H$2),Eh$1(),a0.pendingContext&&(a0.context=a0.pendingContext,a0.pendingContext=null),(r0===null||r0.child===null)&&(Gg$1(e0)?e0.flags|=4:r0===null||r0.memoizedState.isDehydrated&&!(e0.flags&256)||(e0.flags|=1024,zg$1!==null&&(Fj(zg$1),zg$1=null))),Aj(r0,e0),S$1(e0),null;case 5:Bh$1(e0);var i0=xh$1(wh$1.current);if(n0=e0.type,r0!==null&&e0.stateNode!=null)Bj(r0,e0,n0,a0,i0),r0.ref!==e0.ref&&(e0.flags|=512,e0.flags|=2097152);else{if(!a0){if(e0.stateNode===null)throw Error(p$3(166));return S$1(e0),null}if(r0=xh$1(uh$1.current),Gg$1(e0)){a0=e0.stateNode,n0=e0.type;var s0=e0.memoizedProps;switch(a0[Of$1]=e0,a0[Pf$1]=s0,r0=(e0.mode&1)!==0,n0){case"dialog":D$3("cancel",a0),D$3("close",a0);break;case"iframe":case"object":case"embed":D$3("load",a0);break;case"video":case"audio":for(i0=0;i0<lf$1.length;i0++)D$3(lf$1[i0],a0);break;case"source":D$3("error",a0);break;case"img":case"image":case"link":D$3("error",a0),D$3("load",a0);break;case"details":D$3("toggle",a0);break;case"input":Za$1(a0,s0),D$3("invalid",a0);break;case"select":a0._wrapperState={wasMultiple:!!s0.multiple},D$3("invalid",a0);break;case"textarea":hb$1(a0,s0),D$3("invalid",a0)}ub$1(n0,s0),i0=null;for(var o0 in s0)if(s0.hasOwnProperty(o0)){var l0=s0[o0];o0==="children"?typeof l0=="string"?a0.textContent!==l0&&(s0.suppressHydrationWarning!==!0&&Af$1(a0.textContent,l0,r0),i0=["children",l0]):typeof l0=="number"&&a0.textContent!==""+l0&&(s0.suppressHydrationWarning!==!0&&Af$1(a0.textContent,l0,r0),i0=["children",""+l0]):ea$1.hasOwnProperty(o0)&&l0!=null&&o0==="onScroll"&&D$3("scroll",a0)}switch(n0){case"input":Va$1(a0),db$1(a0,s0,!0);break;case"textarea":Va$1(a0),jb$1(a0);break;case"select":case"option":break;default:typeof s0.onClick=="function"&&(a0.onclick=Bf$1)}a0=i0,e0.updateQueue=a0,a0!==null&&(e0.flags|=4)}else{o0=i0.nodeType===9?i0:i0.ownerDocument,r0==="http://www.w3.org/1999/xhtml"&&(r0=kb$1(n0)),r0==="http://www.w3.org/1999/xhtml"?n0==="script"?(r0=o0.createElement("div"),r0.innerHTML="<script><\/script>",r0=r0.removeChild(r0.firstChild)):typeof a0.is=="string"?r0=o0.createElement(n0,{is:a0.is}):(r0=o0.createElement(n0),n0==="select"&&(o0=r0,a0.multiple?o0.multiple=!0:a0.size&&(o0.size=a0.size))):r0=o0.createElementNS(r0,n0),r0[Of$1]=e0,r0[Pf$1]=a0,zj(r0,e0,!1,!1),e0.stateNode=r0;e:{switch(o0=vb$1(n0,a0),n0){case"dialog":D$3("cancel",r0),D$3("close",r0),i0=a0;break;case"iframe":case"object":case"embed":D$3("load",r0),i0=a0;break;case"video":case"audio":for(i0=0;i0<lf$1.length;i0++)D$3(lf$1[i0],r0);i0=a0;break;case"source":D$3("error",r0),i0=a0;break;case"img":case"image":case"link":D$3("error",r0),D$3("load",r0),i0=a0;break;case"details":D$3("toggle",r0),i0=a0;break;case"input":Za$1(r0,a0),i0=Ya$1(r0,a0),D$3("invalid",r0);break;case"option":i0=a0;break;case"select":r0._wrapperState={wasMultiple:!!a0.multiple},i0=A$1({},a0,{value:void 0}),D$3("invalid",r0);break;case"textarea":hb$1(r0,a0),i0=gb$1(r0,a0),D$3("invalid",r0);break;default:i0=a0}ub$1(n0,i0),l0=i0;for(s0 in l0)if(l0.hasOwnProperty(s0)){var c0=l0[s0];s0==="style"?sb(r0,c0):s0==="dangerouslySetInnerHTML"?(c0=c0?c0.__html:void 0,c0!=null&&nb(r0,c0)):s0==="children"?typeof c0=="string"?(n0!=="textarea"||c0!=="")&&ob(r0,c0):typeof c0=="number"&&ob(r0,""+c0):s0!=="suppressContentEditableWarning"&&s0!=="suppressHydrationWarning"&&s0!=="autoFocus"&&(ea$1.hasOwnProperty(s0)?c0!=null&&s0==="onScroll"&&D$3("scroll",r0):c0!=null&&ta$1(r0,s0,c0,o0))}switch(n0){case"input":Va$1(r0),db$1(r0,a0,!1);break;case"textarea":Va$1(r0),jb$1(r0);break;case"option":a0.value!=null&&r0.setAttribute("value",""+Sa$1(a0.value));break;case"select":r0.multiple=!!a0.multiple,s0=a0.value,s0!=null?fb$1(r0,!!a0.multiple,s0,!1):a0.defaultValue!=null&&fb$1(r0,!!a0.multiple,a0.defaultValue,!0);break;default:typeof i0.onClick=="function"&&(r0.onclick=Bf$1)}switch(n0){case"button":case"input":case"select":case"textarea":a0=!!a0.autoFocus;break e;case"img":a0=!0;break e;default:a0=!1}}a0&&(e0.flags|=4)}e0.ref!==null&&(e0.flags|=512,e0.flags|=2097152)}return S$1(e0),null;case 6:if(r0&&e0.stateNode!=null)Cj(r0,e0,r0.memoizedProps,a0);else{if(typeof a0!="string"&&e0.stateNode===null)throw Error(p$3(166));if(n0=xh$1(wh$1.current),xh$1(uh$1.current),Gg$1(e0)){if(a0=e0.stateNode,n0=e0.memoizedProps,a0[Of$1]=e0,(s0=a0.nodeValue!==n0)&&(r0=xg$1,r0!==null))switch(r0.tag){case 3:Af$1(a0.nodeValue,n0,(r0.mode&1)!==0);break;case 5:r0.memoizedProps.suppressHydrationWarning!==!0&&Af$1(a0.nodeValue,n0,(r0.mode&1)!==0)}s0&&(e0.flags|=4)}else a0=(n0.nodeType===9?n0:n0.ownerDocument).createTextNode(a0),a0[Of$1]=e0,e0.stateNode=a0}return S$1(e0),null;case 13:if(E$3(L$3),a0=e0.memoizedState,r0===null||r0.memoizedState!==null&&r0.memoizedState.dehydrated!==null){if(I$1&&yg$1!==null&&e0.mode&1&&!(e0.flags&128))Hg$1(),Ig$1(),e0.flags|=98560,s0=!1;else if(s0=Gg$1(e0),a0!==null&&a0.dehydrated!==null){if(r0===null){if(!s0)throw Error(p$3(318));if(s0=e0.memoizedState,s0=s0!==null?s0.dehydrated:null,!s0)throw Error(p$3(317));s0[Of$1]=e0}else Ig$1(),!(e0.flags&128)&&(e0.memoizedState=null),e0.flags|=4;S$1(e0),s0=!1}else zg$1!==null&&(Fj(zg$1),zg$1=null),s0=!0;if(!s0)return e0.flags&65536?e0:null}return e0.flags&128?(e0.lanes=n0,e0):(a0=a0!==null,a0!==(r0!==null&&r0.memoizedState!==null)&&a0&&(e0.child.flags|=8192,e0.mode&1&&(r0===null||L$3.current&1?T$2===0&&(T$2=3):tj())),e0.updateQueue!==null&&(e0.flags|=4),S$1(e0),null);case 4:return zh$1(),Aj(r0,e0),r0===null&&sf$1(e0.stateNode.containerInfo),S$1(e0),null;case 10:return ah$1(e0.type._context),S$1(e0),null;case 17:return Zf$1(e0.type)&&$f$1(),S$1(e0),null;case 19:if(E$3(L$3),s0=e0.memoizedState,s0===null)return S$1(e0),null;if(a0=(e0.flags&128)!==0,o0=s0.rendering,o0===null)if(a0)Dj(s0,!1);else{if(T$2!==0||r0!==null&&r0.flags&128)for(r0=e0.child;r0!==null;){if(o0=Ch$1(r0),o0!==null){for(e0.flags|=128,Dj(s0,!1),a0=o0.updateQueue,a0!==null&&(e0.updateQueue=a0,e0.flags|=4),e0.subtreeFlags=0,a0=n0,n0=e0.child;n0!==null;)s0=n0,r0=a0,s0.flags&=14680066,o0=s0.alternate,o0===null?(s0.childLanes=0,s0.lanes=r0,s0.child=null,s0.subtreeFlags=0,s0.memoizedProps=null,s0.memoizedState=null,s0.updateQueue=null,s0.dependencies=null,s0.stateNode=null):(s0.childLanes=o0.childLanes,s0.lanes=o0.lanes,s0.child=o0.child,s0.subtreeFlags=0,s0.deletions=null,s0.memoizedProps=o0.memoizedProps,s0.memoizedState=o0.memoizedState,s0.updateQueue=o0.updateQueue,s0.type=o0.type,r0=o0.dependencies,s0.dependencies=r0===null?null:{lanes:r0.lanes,firstContext:r0.firstContext}),n0=n0.sibling;return G$2(L$3,L$3.current&1|2),e0.child}r0=r0.sibling}s0.tail!==null&&B$3()>Gj&&(e0.flags|=128,a0=!0,Dj(s0,!1),e0.lanes=4194304)}else{if(!a0)if(r0=Ch$1(o0),r0!==null){if(e0.flags|=128,a0=!0,n0=r0.updateQueue,n0!==null&&(e0.updateQueue=n0,e0.flags|=4),Dj(s0,!0),s0.tail===null&&s0.tailMode==="hidden"&&!o0.alternate&&!I$1)return S$1(e0),null}else 2*B$3()-s0.renderingStartTime>Gj&&n0!==1073741824&&(e0.flags|=128,a0=!0,Dj(s0,!1),e0.lanes=4194304);s0.isBackwards?(o0.sibling=e0.child,e0.child=o0):(n0=s0.last,n0!==null?n0.sibling=o0:e0.child=o0,s0.last=o0)}return s0.tail!==null?(e0=s0.tail,s0.rendering=e0,s0.tail=e0.sibling,s0.renderingStartTime=B$3(),e0.sibling=null,n0=L$3.current,G$2(L$3,a0?n0&1|2:n0&1),e0):(S$1(e0),null);case 22:case 23:return Hj(),a0=e0.memoizedState!==null,r0!==null&&r0.memoizedState!==null!==a0&&(e0.flags|=8192),a0&&e0.mode&1?fj&1073741824&&(S$1(e0),e0.subtreeFlags&6&&(e0.flags|=8192)):S$1(e0),null;case 24:return null;case 25:return null}throw Error(p$3(156,e0.tag))}function Ij(r0,e0){switch(wg$1(e0),e0.tag){case 1:return Zf$1(e0.type)&&$f$1(),r0=e0.flags,r0&65536?(e0.flags=r0&-65537|128,e0):null;case 3:return zh$1(),E$3(Wf$1),E$3(H$2),Eh$1(),r0=e0.flags,r0&65536&&!(r0&128)?(e0.flags=r0&-65537|128,e0):null;case 5:return Bh$1(e0),null;case 13:if(E$3(L$3),r0=e0.memoizedState,r0!==null&&r0.dehydrated!==null){if(e0.alternate===null)throw Error(p$3(340));Ig$1()}return r0=e0.flags,r0&65536?(e0.flags=r0&-65537|128,e0):null;case 19:return E$3(L$3),null;case 4:return zh$1(),null;case 10:return ah$1(e0.type._context),null;case 22:case 23:return Hj(),null;case 24:return null;default:return null}}var Jj=!1,U$2=!1,Kj=typeof WeakSet=="function"?WeakSet:Set,V$1=null;function Lj(r0,e0){var n0=r0.ref;if(n0!==null)if(typeof n0=="function")try{n0(null)}catch(a0){W$2(r0,e0,a0)}else n0.current=null}function Mj(r0,e0,n0){try{n0()}catch(a0){W$2(r0,e0,a0)}}var Nj=!1;function Oj(r0,e0){if(Cf$1=dd$1,r0=Me$2(),Ne$1(r0)){if("selectionStart"in r0)var n0={start:r0.selectionStart,end:r0.selectionEnd};else e:{n0=(n0=r0.ownerDocument)&&n0.defaultView||window;var a0=n0.getSelection&&n0.getSelection();if(a0&&a0.rangeCount!==0){n0=a0.anchorNode;var i0=a0.anchorOffset,s0=a0.focusNode;a0=a0.focusOffset;try{n0.nodeType,s0.nodeType}catch{n0=null;break e}var o0=0,l0=-1,c0=-1,u0=0,d0=0,h0=r0,f0=null;t:for(;;){for(var p0;h0!==n0||i0!==0&&h0.nodeType!==3||(l0=o0+i0),h0!==s0||a0!==0&&h0.nodeType!==3||(c0=o0+a0),h0.nodeType===3&&(o0+=h0.nodeValue.length),(p0=h0.firstChild)!==null;)f0=h0,h0=p0;for(;;){if(h0===r0)break t;if(f0===n0&&++u0===i0&&(l0=o0),f0===s0&&++d0===a0&&(c0=o0),(p0=h0.nextSibling)!==null)break;h0=f0,f0=h0.parentNode}h0=p0}n0=l0===-1||c0===-1?null:{start:l0,end:c0}}else n0=null}n0=n0||{start:0,end:0}}else n0=null;for(Df$1={focusedElem:r0,selectionRange:n0},dd$1=!1,V$1=e0;V$1!==null;)if(e0=V$1,r0=e0.child,(e0.subtreeFlags&1028)!==0&&r0!==null)r0.return=e0,V$1=r0;else for(;V$1!==null;){e0=V$1;try{var A0=e0.alternate;if(e0.flags&1024)switch(e0.tag){case 0:case 11:case 15:break;case 1:if(A0!==null){var m0=A0.memoizedProps,x0=A0.memoizedState,g0=e0.stateNode,y0=g0.getSnapshotBeforeUpdate(e0.elementType===e0.type?m0:Ci$1(e0.type,m0),x0);g0.__reactInternalSnapshotBeforeUpdate=y0}break;case 3:var b0=e0.stateNode.containerInfo;b0.nodeType===1?b0.textContent="":b0.nodeType===9&&b0.documentElement&&b0.removeChild(b0.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$3(163))}}catch(E0){W$2(e0,e0.return,E0)}if(r0=e0.sibling,r0!==null){r0.return=e0.return,V$1=r0;break}V$1=e0.return}return A0=Nj,Nj=!1,A0}function Pj(r0,e0,n0){var a0=e0.updateQueue;if(a0=a0!==null?a0.lastEffect:null,a0!==null){var i0=a0=a0.next;do{if((i0.tag&r0)===r0){var s0=i0.destroy;i0.destroy=void 0,s0!==void 0&&Mj(e0,n0,s0)}i0=i0.next}while(i0!==a0)}}function Qj(r0,e0){if(e0=e0.updateQueue,e0=e0!==null?e0.lastEffect:null,e0!==null){var n0=e0=e0.next;do{if((n0.tag&r0)===r0){var a0=n0.create;n0.destroy=a0()}n0=n0.next}while(n0!==e0)}}function Rj(r0){var e0=r0.ref;if(e0!==null){var n0=r0.stateNode;switch(r0.tag){case 5:r0=n0;break;default:r0=n0}typeof e0=="function"?e0(r0):e0.current=r0}}function Sj(r0){var e0=r0.alternate;e0!==null&&(r0.alternate=null,Sj(e0)),r0.child=null,r0.deletions=null,r0.sibling=null,r0.tag===5&&(e0=r0.stateNode,e0!==null&&(delete e0[Of$1],delete e0[Pf$1],delete e0[of$1],delete e0[Qf$1],delete e0[Rf$1])),r0.stateNode=null,r0.return=null,r0.dependencies=null,r0.memoizedProps=null,r0.memoizedState=null,r0.pendingProps=null,r0.stateNode=null,r0.updateQueue=null}function Tj(r0){return r0.tag===5||r0.tag===3||r0.tag===4}function Uj(r0){e:for(;;){for(;r0.sibling===null;){if(r0.return===null||Tj(r0.return))return null;r0=r0.return}for(r0.sibling.return=r0.return,r0=r0.sibling;r0.tag!==5&&r0.tag!==6&&r0.tag!==18;){if(r0.flags&2||r0.child===null||r0.tag===4)continue e;r0.child.return=r0,r0=r0.child}if(!(r0.flags&2))return r0.stateNode}}function Vj(r0,e0,n0){var a0=r0.tag;if(a0===5||a0===6)r0=r0.stateNode,e0?n0.nodeType===8?n0.parentNode.insertBefore(r0,e0):n0.insertBefore(r0,e0):(n0.nodeType===8?(e0=n0.parentNode,e0.insertBefore(r0,n0)):(e0=n0,e0.appendChild(r0)),n0=n0._reactRootContainer,n0!=null||e0.onclick!==null||(e0.onclick=Bf$1));else if(a0!==4&&(r0=r0.child,r0!==null))for(Vj(r0,e0,n0),r0=r0.sibling;r0!==null;)Vj(r0,e0,n0),r0=r0.sibling}function Wj(r0,e0,n0){var a0=r0.tag;if(a0===5||a0===6)r0=r0.stateNode,e0?n0.insertBefore(r0,e0):n0.appendChild(r0);else if(a0!==4&&(r0=r0.child,r0!==null))for(Wj(r0,e0,n0),r0=r0.sibling;r0!==null;)Wj(r0,e0,n0),r0=r0.sibling}var X$3=null,Xj=!1;function Yj(r0,e0,n0){for(n0=n0.child;n0!==null;)Zj(r0,e0,n0),n0=n0.sibling}function Zj(r0,e0,n0){if(lc$1&&typeof lc$1.onCommitFiberUnmount=="function")try{lc$1.onCommitFiberUnmount(kc$1,n0)}catch{}switch(n0.tag){case 5:U$2||Lj(n0,e0);case 6:var a0=X$3,i0=Xj;X$3=null,Yj(r0,e0,n0),X$3=a0,Xj=i0,X$3!==null&&(Xj?(r0=X$3,n0=n0.stateNode,r0.nodeType===8?r0.parentNode.removeChild(n0):r0.removeChild(n0)):X$3.removeChild(n0.stateNode));break;case 18:X$3!==null&&(Xj?(r0=X$3,n0=n0.stateNode,r0.nodeType===8?Kf$1(r0.parentNode,n0):r0.nodeType===1&&Kf$1(r0,n0),bd$1(r0)):Kf$1(X$3,n0.stateNode));break;case 4:a0=X$3,i0=Xj,X$3=n0.stateNode.containerInfo,Xj=!0,Yj(r0,e0,n0),X$3=a0,Xj=i0;break;case 0:case 11:case 14:case 15:if(!U$2&&(a0=n0.updateQueue,a0!==null&&(a0=a0.lastEffect,a0!==null))){i0=a0=a0.next;do{var s0=i0,o0=s0.destroy;s0=s0.tag,o0!==void 0&&(s0&2||s0&4)&&Mj(n0,e0,o0),i0=i0.next}while(i0!==a0)}Yj(r0,e0,n0);break;case 1:if(!U$2&&(Lj(n0,e0),a0=n0.stateNode,typeof a0.componentWillUnmount=="function"))try{a0.props=n0.memoizedProps,a0.state=n0.memoizedState,a0.componentWillUnmount()}catch(l0){W$2(n0,e0,l0)}Yj(r0,e0,n0);break;case 21:Yj(r0,e0,n0);break;case 22:n0.mode&1?(U$2=(a0=U$2)||n0.memoizedState!==null,Yj(r0,e0,n0),U$2=a0):Yj(r0,e0,n0);break;default:Yj(r0,e0,n0)}}function ak$1(r0){var e0=r0.updateQueue;if(e0!==null){r0.updateQueue=null;var n0=r0.stateNode;n0===null&&(n0=r0.stateNode=new Kj),e0.forEach(function(a0){var i0=bk$1.bind(null,r0,a0);n0.has(a0)||(n0.add(a0),a0.then(i0,i0))})}}function ck$1(r0,e0){var n0=e0.deletions;if(n0!==null)for(var a0=0;a0<n0.length;a0++){var i0=n0[a0];try{var s0=r0,o0=e0,l0=o0;e:for(;l0!==null;){switch(l0.tag){case 5:X$3=l0.stateNode,Xj=!1;break e;case 3:X$3=l0.stateNode.containerInfo,Xj=!0;break e;case 4:X$3=l0.stateNode.containerInfo,Xj=!0;break e}l0=l0.return}if(X$3===null)throw Error(p$3(160));Zj(s0,o0,i0),X$3=null,Xj=!1;var c0=i0.alternate;c0!==null&&(c0.return=null),i0.return=null}catch(u0){W$2(i0,e0,u0)}}if(e0.subtreeFlags&12854)for(e0=e0.child;e0!==null;)dk$1(e0,r0),e0=e0.sibling}function dk$1(r0,e0){var n0=r0.alternate,a0=r0.flags;switch(r0.tag){case 0:case 11:case 14:case 15:if(ck$1(e0,r0),ek$1(r0),a0&4){try{Pj(3,r0,r0.return),Qj(3,r0)}catch(m0){W$2(r0,r0.return,m0)}try{Pj(5,r0,r0.return)}catch(m0){W$2(r0,r0.return,m0)}}break;case 1:ck$1(e0,r0),ek$1(r0),a0&512&&n0!==null&&Lj(n0,n0.return);break;case 5:if(ck$1(e0,r0),ek$1(r0),a0&512&&n0!==null&&Lj(n0,n0.return),r0.flags&32){var i0=r0.stateNode;try{ob(i0,"")}catch(m0){W$2(r0,r0.return,m0)}}if(a0&4&&(i0=r0.stateNode,i0!=null)){var s0=r0.memoizedProps,o0=n0!==null?n0.memoizedProps:s0,l0=r0.type,c0=r0.updateQueue;if(r0.updateQueue=null,c0!==null)try{l0==="input"&&s0.type==="radio"&&s0.name!=null&&ab(i0,s0),vb$1(l0,o0);var u0=vb$1(l0,s0);for(o0=0;o0<c0.length;o0+=2){var d0=c0[o0],h0=c0[o0+1];d0==="style"?sb(i0,h0):d0==="dangerouslySetInnerHTML"?nb(i0,h0):d0==="children"?ob(i0,h0):ta$1(i0,d0,h0,u0)}switch(l0){case"input":bb$1(i0,s0);break;case"textarea":ib(i0,s0);break;case"select":var f0=i0._wrapperState.wasMultiple;i0._wrapperState.wasMultiple=!!s0.multiple;var p0=s0.value;p0!=null?fb$1(i0,!!s0.multiple,p0,!1):f0!==!!s0.multiple&&(s0.defaultValue!=null?fb$1(i0,!!s0.multiple,s0.defaultValue,!0):fb$1(i0,!!s0.multiple,s0.multiple?[]:"",!1))}i0[Pf$1]=s0}catch(m0){W$2(r0,r0.return,m0)}}break;case 6:if(ck$1(e0,r0),ek$1(r0),a0&4){if(r0.stateNode===null)throw Error(p$3(162));i0=r0.stateNode,s0=r0.memoizedProps;try{i0.nodeValue=s0}catch(m0){W$2(r0,r0.return,m0)}}break;case 3:if(ck$1(e0,r0),ek$1(r0),a0&4&&n0!==null&&n0.memoizedState.isDehydrated)try{bd$1(e0.containerInfo)}catch(m0){W$2(r0,r0.return,m0)}break;case 4:ck$1(e0,r0),ek$1(r0);break;case 13:ck$1(e0,r0),ek$1(r0),i0=r0.child,i0.flags&8192&&(s0=i0.memoizedState!==null,i0.stateNode.isHidden=s0,!s0||i0.alternate!==null&&i0.alternate.memoizedState!==null||(fk$1=B$3())),a0&4&&ak$1(r0);break;case 22:if(d0=n0!==null&&n0.memoizedState!==null,r0.mode&1?(U$2=(u0=U$2)||d0,ck$1(e0,r0),U$2=u0):ck$1(e0,r0),ek$1(r0),a0&8192){if(u0=r0.memoizedState!==null,(r0.stateNode.isHidden=u0)&&!d0&&r0.mode&1)for(V$1=r0,d0=r0.child;d0!==null;){for(h0=V$1=d0;V$1!==null;){switch(f0=V$1,p0=f0.child,f0.tag){case 0:case 11:case 14:case 15:Pj(4,f0,f0.return);break;case 1:Lj(f0,f0.return);var A0=f0.stateNode;if(typeof A0.componentWillUnmount=="function"){a0=f0,n0=f0.return;try{e0=a0,A0.props=e0.memoizedProps,A0.state=e0.memoizedState,A0.componentWillUnmount()}catch(m0){W$2(a0,n0,m0)}}break;case 5:Lj(f0,f0.return);break;case 22:if(f0.memoizedState!==null){gk$1(h0);continue}}p0!==null?(p0.return=f0,V$1=p0):gk$1(h0)}d0=d0.sibling}e:for(d0=null,h0=r0;;){if(h0.tag===5){if(d0===null){d0=h0;try{i0=h0.stateNode,u0?(s0=i0.style,typeof s0.setProperty=="function"?s0.setProperty("display","none","important"):s0.display="none"):(l0=h0.stateNode,c0=h0.memoizedProps.style,o0=c0!=null&&c0.hasOwnProperty("display")?c0.display:null,l0.style.display=rb("display",o0))}catch(m0){W$2(r0,r0.return,m0)}}}else if(h0.tag===6){if(d0===null)try{h0.stateNode.nodeValue=u0?"":h0.memoizedProps}catch(m0){W$2(r0,r0.return,m0)}}else if((h0.tag!==22&&h0.tag!==23||h0.memoizedState===null||h0===r0)&&h0.child!==null){h0.child.return=h0,h0=h0.child;continue}if(h0===r0)break e;for(;h0.sibling===null;){if(h0.return===null||h0.return===r0)break e;d0===h0&&(d0=null),h0=h0.return}d0===h0&&(d0=null),h0.sibling.return=h0.return,h0=h0.sibling}}break;case 19:ck$1(e0,r0),ek$1(r0),a0&4&&ak$1(r0);break;case 21:break;default:ck$1(e0,r0),ek$1(r0)}}function ek$1(r0){var e0=r0.flags;if(e0&2){try{e:{for(var n0=r0.return;n0!==null;){if(Tj(n0)){var a0=n0;break e}n0=n0.return}throw Error(p$3(160))}switch(a0.tag){case 5:var i0=a0.stateNode;a0.flags&32&&(ob(i0,""),a0.flags&=-33);var s0=Uj(r0);Wj(r0,s0,i0);break;case 3:case 4:var o0=a0.stateNode.containerInfo,l0=Uj(r0);Vj(r0,l0,o0);break;default:throw Error(p$3(161))}}catch(c0){W$2(r0,r0.return,c0)}r0.flags&=-3}e0&4096&&(r0.flags&=-4097)}function hk$1(r0,e0,n0){V$1=r0,ik$1(r0)}function ik$1(r0,e0,n0){for(var a0=(r0.mode&1)!==0;V$1!==null;){var i0=V$1,s0=i0.child;if(i0.tag===22&&a0){var o0=i0.memoizedState!==null||Jj;if(!o0){var l0=i0.alternate,c0=l0!==null&&l0.memoizedState!==null||U$2;l0=Jj;var u0=U$2;if(Jj=o0,(U$2=c0)&&!u0)for(V$1=i0;V$1!==null;)o0=V$1,c0=o0.child,o0.tag===22&&o0.memoizedState!==null?jk$1(i0):c0!==null?(c0.return=o0,V$1=c0):jk$1(i0);for(;s0!==null;)V$1=s0,ik$1(s0),s0=s0.sibling;V$1=i0,Jj=l0,U$2=u0}kk$1(r0)}else i0.subtreeFlags&8772&&s0!==null?(s0.return=i0,V$1=s0):kk$1(r0)}}function kk$1(r0){for(;V$1!==null;){var e0=V$1;if(e0.flags&8772){var n0=e0.alternate;try{if(e0.flags&8772)switch(e0.tag){case 0:case 11:case 15:U$2||Qj(5,e0);break;case 1:var a0=e0.stateNode;if(e0.flags&4&&!U$2)if(n0===null)a0.componentDidMount();else{var i0=e0.elementType===e0.type?n0.memoizedProps:Ci$1(e0.type,n0.memoizedProps);a0.componentDidUpdate(i0,n0.memoizedState,a0.__reactInternalSnapshotBeforeUpdate)}var s0=e0.updateQueue;s0!==null&&sh$1(e0,s0,a0);break;case 3:var o0=e0.updateQueue;if(o0!==null){if(n0=null,e0.child!==null)switch(e0.child.tag){case 5:n0=e0.child.stateNode;break;case 1:n0=e0.child.stateNode}sh$1(e0,o0,n0)}break;case 5:var l0=e0.stateNode;if(n0===null&&e0.flags&4){n0=l0;var c0=e0.memoizedProps;switch(e0.type){case"button":case"input":case"select":case"textarea":c0.autoFocus&&n0.focus();break;case"img":c0.src&&(n0.src=c0.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e0.memoizedState===null){var u0=e0.alternate;if(u0!==null){var d0=u0.memoizedState;if(d0!==null){var h0=d0.dehydrated;h0!==null&&bd$1(h0)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p$3(163))}U$2||e0.flags&512&&Rj(e0)}catch(f0){W$2(e0,e0.return,f0)}}if(e0===r0){V$1=null;break}if(n0=e0.sibling,n0!==null){n0.return=e0.return,V$1=n0;break}V$1=e0.return}}function gk$1(r0){for(;V$1!==null;){var e0=V$1;if(e0===r0){V$1=null;break}var n0=e0.sibling;if(n0!==null){n0.return=e0.return,V$1=n0;break}V$1=e0.return}}function jk$1(r0){for(;V$1!==null;){var e0=V$1;try{switch(e0.tag){case 0:case 11:case 15:var n0=e0.return;try{Qj(4,e0)}catch(c0){W$2(e0,n0,c0)}break;case 1:var a0=e0.stateNode;if(typeof a0.componentDidMount=="function"){var i0=e0.return;try{a0.componentDidMount()}catch(c0){W$2(e0,i0,c0)}}var s0=e0.return;try{Rj(e0)}catch(c0){W$2(e0,s0,c0)}break;case 5:var o0=e0.return;try{Rj(e0)}catch(c0){W$2(e0,o0,c0)}}}catch(c0){W$2(e0,e0.return,c0)}if(e0===r0){V$1=null;break}var l0=e0.sibling;if(l0!==null){l0.return=e0.return,V$1=l0;break}V$1=e0.return}}var lk$1=Math.ceil,mk$1=ua$1.ReactCurrentDispatcher,nk$1=ua$1.ReactCurrentOwner,ok$1=ua$1.ReactCurrentBatchConfig,K$3=0,Q$1=null,Y$3=null,Z$2=0,fj=0,ej=Uf$1(0),T$2=0,pk$1=null,rh$1=0,qk$1=0,rk$1=0,sk$1=null,tk$1=null,fk$1=0,Gj=1/0,uk$1=null,Oi$1=!1,Pi$1=null,Ri$1=null,vk$1=!1,wk$1=null,xk$1=0,yk$1=0,zk$1=null,Ak$1=-1,Bk$1=0;function R$2(){return K$3&6?B$3():Ak$1!==-1?Ak$1:Ak$1=B$3()}function yi$1(r0){return r0.mode&1?K$3&2&&Z$2!==0?Z$2&-Z$2:Kg$1.transition!==null?(Bk$1===0&&(Bk$1=yc$1()),Bk$1):(r0=C$1,r0!==0||(r0=window.event,r0=r0===void 0?16:jd$1(r0.type)),r0):1}function gi$1(r0,e0,n0,a0){if(50<yk$1)throw yk$1=0,zk$1=null,Error(p$3(185));Ac$1(r0,n0,a0),(!(K$3&2)||r0!==Q$1)&&(r0===Q$1&&(!(K$3&2)&&(qk$1|=n0),T$2===4&&Ck$1(r0,Z$2)),Dk$1(r0,a0),n0===1&&K$3===0&&!(e0.mode&1)&&(Gj=B$3()+500,fg$1&&jg$1()))}function Dk$1(r0,e0){var n0=r0.callbackNode;wc$1(r0,e0);var a0=uc$1(r0,r0===Q$1?Z$2:0);if(a0===0)n0!==null&&bc$1(n0),r0.callbackNode=null,r0.callbackPriority=0;else if(e0=a0&-a0,r0.callbackPriority!==e0){if(n0!=null&&bc$1(n0),e0===1)r0.tag===0?ig$1(Ek$1.bind(null,r0)):hg$1(Ek$1.bind(null,r0)),Jf$1(function(){!(K$3&6)&&jg$1()}),n0=null;else{switch(Dc$1(a0)){case 1:n0=fc$1;break;case 4:n0=gc$1;break;case 16:n0=hc$1;break;case 536870912:n0=jc$1;break;default:n0=hc$1}n0=Fk$1(n0,Gk$1.bind(null,r0))}r0.callbackPriority=e0,r0.callbackNode=n0}}function Gk$1(r0,e0){if(Ak$1=-1,Bk$1=0,K$3&6)throw Error(p$3(327));var n0=r0.callbackNode;if(Hk$1()&&r0.callbackNode!==n0)return null;var a0=uc$1(r0,r0===Q$1?Z$2:0);if(a0===0)return null;if(a0&30||a0&r0.expiredLanes||e0)e0=Ik$1(r0,a0);else{e0=a0;var i0=K$3;K$3|=2;var s0=Jk$1();(Q$1!==r0||Z$2!==e0)&&(uk$1=null,Gj=B$3()+500,Kk$1(r0,e0));do try{Lk$1();break}catch(l0){Mk$1(r0,l0)}while(!0);$g$1(),mk$1.current=s0,K$3=i0,Y$3!==null?e0=0:(Q$1=null,Z$2=0,e0=T$2)}if(e0!==0){if(e0===2&&(i0=xc$1(r0),i0!==0&&(a0=i0,e0=Nk$1(r0,i0))),e0===1)throw n0=pk$1,Kk$1(r0,0),Ck$1(r0,a0),Dk$1(r0,B$3()),n0;if(e0===6)Ck$1(r0,a0);else{if(i0=r0.current.alternate,!(a0&30)&&!Ok$1(i0)&&(e0=Ik$1(r0,a0),e0===2&&(s0=xc$1(r0),s0!==0&&(a0=s0,e0=Nk$1(r0,s0))),e0===1))throw n0=pk$1,Kk$1(r0,0),Ck$1(r0,a0),Dk$1(r0,B$3()),n0;switch(r0.finishedWork=i0,r0.finishedLanes=a0,e0){case 0:case 1:throw Error(p$3(345));case 2:Pk$1(r0,tk$1,uk$1);break;case 3:if(Ck$1(r0,a0),(a0&130023424)===a0&&(e0=fk$1+500-B$3(),10<e0)){if(uc$1(r0,0)!==0)break;if(i0=r0.suspendedLanes,(i0&a0)!==a0){R$2(),r0.pingedLanes|=r0.suspendedLanes&i0;break}r0.timeoutHandle=Ff$1(Pk$1.bind(null,r0,tk$1,uk$1),e0);break}Pk$1(r0,tk$1,uk$1);break;case 4:if(Ck$1(r0,a0),(a0&4194240)===a0)break;for(e0=r0.eventTimes,i0=-1;0<a0;){var o0=31-oc$1(a0);s0=1<<o0,o0=e0[o0],o0>i0&&(i0=o0),a0&=~s0}if(a0=i0,a0=B$3()-a0,a0=(120>a0?120:480>a0?480:1080>a0?1080:1920>a0?1920:3e3>a0?3e3:4320>a0?4320:1960*lk$1(a0/1960))-a0,10<a0){r0.timeoutHandle=Ff$1(Pk$1.bind(null,r0,tk$1,uk$1),a0);break}Pk$1(r0,tk$1,uk$1);break;case 5:Pk$1(r0,tk$1,uk$1);break;default:throw Error(p$3(329))}}}return Dk$1(r0,B$3()),r0.callbackNode===n0?Gk$1.bind(null,r0):null}function Nk$1(r0,e0){var n0=sk$1;return r0.current.memoizedState.isDehydrated&&(Kk$1(r0,e0).flags|=256),r0=Ik$1(r0,e0),r0!==2&&(e0=tk$1,tk$1=n0,e0!==null&&Fj(e0)),r0}function Fj(r0){tk$1===null?tk$1=r0:tk$1.push.apply(tk$1,r0)}function Ok$1(r0){for(var e0=r0;;){if(e0.flags&16384){var n0=e0.updateQueue;if(n0!==null&&(n0=n0.stores,n0!==null))for(var a0=0;a0<n0.length;a0++){var i0=n0[a0],s0=i0.getSnapshot;i0=i0.value;try{if(!He$1(s0(),i0))return!1}catch{return!1}}}if(n0=e0.child,e0.subtreeFlags&16384&&n0!==null)n0.return=e0,e0=n0;else{if(e0===r0)break;for(;e0.sibling===null;){if(e0.return===null||e0.return===r0)return!0;e0=e0.return}e0.sibling.return=e0.return,e0=e0.sibling}}return!0}function Ck$1(r0,e0){for(e0&=~rk$1,e0&=~qk$1,r0.suspendedLanes|=e0,r0.pingedLanes&=~e0,r0=r0.expirationTimes;0<e0;){var n0=31-oc$1(e0),a0=1<<n0;r0[n0]=-1,e0&=~a0}}function Ek$1(r0){if(K$3&6)throw Error(p$3(327));Hk$1();var e0=uc$1(r0,0);if(!(e0&1))return Dk$1(r0,B$3()),null;var n0=Ik$1(r0,e0);if(r0.tag!==0&&n0===2){var a0=xc$1(r0);a0!==0&&(e0=a0,n0=Nk$1(r0,a0))}if(n0===1)throw n0=pk$1,Kk$1(r0,0),Ck$1(r0,e0),Dk$1(r0,B$3()),n0;if(n0===6)throw Error(p$3(345));return r0.finishedWork=r0.current.alternate,r0.finishedLanes=e0,Pk$1(r0,tk$1,uk$1),Dk$1(r0,B$3()),null}function Qk$1(r0,e0){var n0=K$3;K$3|=1;try{return r0(e0)}finally{K$3=n0,K$3===0&&(Gj=B$3()+500,fg$1&&jg$1())}}function Rk$1(r0){wk$1!==null&&wk$1.tag===0&&!(K$3&6)&&Hk$1();var e0=K$3;K$3|=1;var n0=ok$1.transition,a0=C$1;try{if(ok$1.transition=null,C$1=1,r0)return r0()}finally{C$1=a0,ok$1.transition=n0,K$3=e0,!(K$3&6)&&jg$1()}}function Hj(){fj=ej.current,E$3(ej)}function Kk$1(r0,e0){r0.finishedWork=null,r0.finishedLanes=0;var n0=r0.timeoutHandle;if(n0!==-1&&(r0.timeoutHandle=-1,Gf$1(n0)),Y$3!==null)for(n0=Y$3.return;n0!==null;){var a0=n0;switch(wg$1(a0),a0.tag){case 1:a0=a0.type.childContextTypes,a0!=null&&$f$1();break;case 3:zh$1(),E$3(Wf$1),E$3(H$2),Eh$1();break;case 5:Bh$1(a0);break;case 4:zh$1();break;case 13:E$3(L$3);break;case 19:E$3(L$3);break;case 10:ah$1(a0.type._context);break;case 22:case 23:Hj()}n0=n0.return}if(Q$1=r0,Y$3=r0=Pg$1(r0.current,null),Z$2=fj=e0,T$2=0,pk$1=null,rk$1=qk$1=rh$1=0,tk$1=sk$1=null,fh$1!==null){for(e0=0;e0<fh$1.length;e0++)if(n0=fh$1[e0],a0=n0.interleaved,a0!==null){n0.interleaved=null;var i0=a0.next,s0=n0.pending;if(s0!==null){var o0=s0.next;s0.next=i0,a0.next=o0}n0.pending=a0}fh$1=null}return r0}function Mk$1(r0,e0){do{var n0=Y$3;try{if($g$1(),Fh$1.current=Rh$1,Ih$1){for(var a0=M$2.memoizedState;a0!==null;){var i0=a0.queue;i0!==null&&(i0.pending=null),a0=a0.next}Ih$1=!1}if(Hh$1=0,O$1=N$2=M$2=null,Jh$1=!1,Kh$1=0,nk$1.current=null,n0===null||n0.return===null){T$2=1,pk$1=e0,Y$3=null;break}e:{var s0=r0,o0=n0.return,l0=n0,c0=e0;if(e0=Z$2,l0.flags|=32768,c0!==null&&typeof c0=="object"&&typeof c0.then=="function"){var u0=c0,d0=l0,h0=d0.tag;if(!(d0.mode&1)&&(h0===0||h0===11||h0===15)){var f0=d0.alternate;f0?(d0.updateQueue=f0.updateQueue,d0.memoizedState=f0.memoizedState,d0.lanes=f0.lanes):(d0.updateQueue=null,d0.memoizedState=null)}var p0=Ui$1(o0);if(p0!==null){p0.flags&=-257,Vi$1(p0,o0,l0,s0,e0),p0.mode&1&&Si$1(s0,u0,e0),e0=p0,c0=u0;var A0=e0.updateQueue;if(A0===null){var m0=new Set;m0.add(c0),e0.updateQueue=m0}else A0.add(c0);break e}else{if(!(e0&1)){Si$1(s0,u0,e0),tj();break e}c0=Error(p$3(426))}}else if(I$1&&l0.mode&1){var x0=Ui$1(o0);if(x0!==null){!(x0.flags&65536)&&(x0.flags|=256),Vi$1(x0,o0,l0,s0,e0),Jg$1(Ji$1(c0,l0));break e}}s0=c0=Ji$1(c0,l0),T$2!==4&&(T$2=2),sk$1===null?sk$1=[s0]:sk$1.push(s0),s0=o0;do{switch(s0.tag){case 3:s0.flags|=65536,e0&=-e0,s0.lanes|=e0;var g0=Ni$1(s0,c0,e0);ph$1(s0,g0);break e;case 1:l0=c0;var y0=s0.type,b0=s0.stateNode;if(!(s0.flags&128)&&(typeof y0.getDerivedStateFromError=="function"||b0!==null&&typeof b0.componentDidCatch=="function"&&(Ri$1===null||!Ri$1.has(b0)))){s0.flags|=65536,e0&=-e0,s0.lanes|=e0;var E0=Qi$1(s0,l0,e0);ph$1(s0,E0);break e}}s0=s0.return}while(s0!==null)}Sk$1(n0)}catch(w0){e0=w0,Y$3===n0&&n0!==null&&(Y$3=n0=n0.return);continue}break}while(!0)}function Jk$1(){var r0=mk$1.current;return mk$1.current=Rh$1,r0===null?Rh$1:r0}function tj(){(T$2===0||T$2===3||T$2===2)&&(T$2=4),Q$1===null||!(rh$1&268435455)&&!(qk$1&268435455)||Ck$1(Q$1,Z$2)}function Ik$1(r0,e0){var n0=K$3;K$3|=2;var a0=Jk$1();(Q$1!==r0||Z$2!==e0)&&(uk$1=null,Kk$1(r0,e0));do try{Tk$1();break}catch(i0){Mk$1(r0,i0)}while(!0);if($g$1(),K$3=n0,mk$1.current=a0,Y$3!==null)throw Error(p$3(261));return Q$1=null,Z$2=0,T$2}function Tk$1(){for(;Y$3!==null;)Uk$1(Y$3)}function Lk$1(){for(;Y$3!==null&&!cc$1();)Uk$1(Y$3)}function Uk$1(r0){var e0=Vk$1(r0.alternate,r0,fj);r0.memoizedProps=r0.pendingProps,e0===null?Sk$1(r0):Y$3=e0,nk$1.current=null}function Sk$1(r0){var e0=r0;do{var n0=e0.alternate;if(r0=e0.return,e0.flags&32768){if(n0=Ij(n0,e0),n0!==null){n0.flags&=32767,Y$3=n0;return}if(r0!==null)r0.flags|=32768,r0.subtreeFlags=0,r0.deletions=null;else{T$2=6,Y$3=null;return}}else if(n0=Ej(n0,e0,fj),n0!==null){Y$3=n0;return}if(e0=e0.sibling,e0!==null){Y$3=e0;return}Y$3=e0=r0}while(e0!==null);T$2===0&&(T$2=5)}function Pk$1(r0,e0,n0){var a0=C$1,i0=ok$1.transition;try{ok$1.transition=null,C$1=1,Wk$1(r0,e0,n0,a0)}finally{ok$1.transition=i0,C$1=a0}return null}function Wk$1(r0,e0,n0,a0){do Hk$1();while(wk$1!==null);if(K$3&6)throw Error(p$3(327));n0=r0.finishedWork;var i0=r0.finishedLanes;if(n0===null)return null;if(r0.finishedWork=null,r0.finishedLanes=0,n0===r0.current)throw Error(p$3(177));r0.callbackNode=null,r0.callbackPriority=0;var s0=n0.lanes|n0.childLanes;if(Bc$1(r0,s0),r0===Q$1&&(Y$3=Q$1=null,Z$2=0),!(n0.subtreeFlags&2064)&&!(n0.flags&2064)||vk$1||(vk$1=!0,Fk$1(hc$1,function(){return Hk$1(),null})),s0=(n0.flags&15990)!==0,n0.subtreeFlags&15990||s0){s0=ok$1.transition,ok$1.transition=null;var o0=C$1;C$1=1;var l0=K$3;K$3|=4,nk$1.current=null,Oj(r0,n0),dk$1(n0,r0),Oe$1(Df$1),dd$1=!!Cf$1,Df$1=Cf$1=null,r0.current=n0,hk$1(n0),dc$1(),K$3=l0,C$1=o0,ok$1.transition=s0}else r0.current=n0;if(vk$1&&(vk$1=!1,wk$1=r0,xk$1=i0),s0=r0.pendingLanes,s0===0&&(Ri$1=null),mc$1(n0.stateNode),Dk$1(r0,B$3()),e0!==null)for(a0=r0.onRecoverableError,n0=0;n0<e0.length;n0++)i0=e0[n0],a0(i0.value,{componentStack:i0.stack,digest:i0.digest});if(Oi$1)throw Oi$1=!1,r0=Pi$1,Pi$1=null,r0;return xk$1&1&&r0.tag!==0&&Hk$1(),s0=r0.pendingLanes,s0&1?r0===zk$1?yk$1++:(yk$1=0,zk$1=r0):yk$1=0,jg$1(),null}function Hk$1(){if(wk$1!==null){var r0=Dc$1(xk$1),e0=ok$1.transition,n0=C$1;try{if(ok$1.transition=null,C$1=16>r0?16:r0,wk$1===null)var a0=!1;else{if(r0=wk$1,wk$1=null,xk$1=0,K$3&6)throw Error(p$3(331));var i0=K$3;for(K$3|=4,V$1=r0.current;V$1!==null;){var s0=V$1,o0=s0.child;if(V$1.flags&16){var l0=s0.deletions;if(l0!==null){for(var c0=0;c0<l0.length;c0++){var u0=l0[c0];for(V$1=u0;V$1!==null;){var d0=V$1;switch(d0.tag){case 0:case 11:case 15:Pj(8,d0,s0)}var h0=d0.child;if(h0!==null)h0.return=d0,V$1=h0;else for(;V$1!==null;){d0=V$1;var f0=d0.sibling,p0=d0.return;if(Sj(d0),d0===u0){V$1=null;break}if(f0!==null){f0.return=p0,V$1=f0;break}V$1=p0}}}var A0=s0.alternate;if(A0!==null){var m0=A0.child;if(m0!==null){A0.child=null;do{var x0=m0.sibling;m0.sibling=null,m0=x0}while(m0!==null)}}V$1=s0}}if(s0.subtreeFlags&2064&&o0!==null)o0.return=s0,V$1=o0;else e:for(;V$1!==null;){if(s0=V$1,s0.flags&2048)switch(s0.tag){case 0:case 11:case 15:Pj(9,s0,s0.return)}var g0=s0.sibling;if(g0!==null){g0.return=s0.return,V$1=g0;break e}V$1=s0.return}}var y0=r0.current;for(V$1=y0;V$1!==null;){o0=V$1;var b0=o0.child;if(o0.subtreeFlags&2064&&b0!==null)b0.return=o0,V$1=b0;else e:for(o0=y0;V$1!==null;){if(l0=V$1,l0.flags&2048)try{switch(l0.tag){case 0:case 11:case 15:Qj(9,l0)}}catch(w0){W$2(l0,l0.return,w0)}if(l0===o0){V$1=null;break e}var E0=l0.sibling;if(E0!==null){E0.return=l0.return,V$1=E0;break e}V$1=l0.return}}if(K$3=i0,jg$1(),lc$1&&typeof lc$1.onPostCommitFiberRoot=="function")try{lc$1.onPostCommitFiberRoot(kc$1,r0)}catch{}a0=!0}return a0}finally{C$1=n0,ok$1.transition=e0}}return!1}function Xk$1(r0,e0,n0){e0=Ji$1(n0,e0),e0=Ni$1(r0,e0,1),r0=nh$1(r0,e0,1),e0=R$2(),r0!==null&&(Ac$1(r0,1,e0),Dk$1(r0,e0))}function W$2(r0,e0,n0){if(r0.tag===3)Xk$1(r0,r0,n0);else for(;e0!==null;){if(e0.tag===3){Xk$1(e0,r0,n0);break}else if(e0.tag===1){var a0=e0.stateNode;if(typeof e0.type.getDerivedStateFromError=="function"||typeof a0.componentDidCatch=="function"&&(Ri$1===null||!Ri$1.has(a0))){r0=Ji$1(n0,r0),r0=Qi$1(e0,r0,1),e0=nh$1(e0,r0,1),r0=R$2(),e0!==null&&(Ac$1(e0,1,r0),Dk$1(e0,r0));break}}e0=e0.return}}function Ti$1(r0,e0,n0){var a0=r0.pingCache;a0!==null&&a0.delete(e0),e0=R$2(),r0.pingedLanes|=r0.suspendedLanes&n0,Q$1===r0&&(Z$2&n0)===n0&&(T$2===4||T$2===3&&(Z$2&130023424)===Z$2&&500>B$3()-fk$1?Kk$1(r0,0):rk$1|=n0),Dk$1(r0,e0)}function Yk$1(r0,e0){e0===0&&(r0.mode&1?(e0=sc$1,sc$1<<=1,!(sc$1&130023424)&&(sc$1=4194304)):e0=1);var n0=R$2();r0=ih$1(r0,e0),r0!==null&&(Ac$1(r0,e0,n0),Dk$1(r0,n0))}function uj(r0){var e0=r0.memoizedState,n0=0;e0!==null&&(n0=e0.retryLane),Yk$1(r0,n0)}function bk$1(r0,e0){var n0=0;switch(r0.tag){case 13:var a0=r0.stateNode,i0=r0.memoizedState;i0!==null&&(n0=i0.retryLane);break;case 19:a0=r0.stateNode;break;default:throw Error(p$3(314))}a0!==null&&a0.delete(e0),Yk$1(r0,n0)}var Vk$1;Vk$1=function(r0,e0,n0){if(r0!==null)if(r0.memoizedProps!==e0.pendingProps||Wf$1.current)dh$1=!0;else{if(!(r0.lanes&n0)&&!(e0.flags&128))return dh$1=!1,yj(r0,e0,n0);dh$1=!!(r0.flags&131072)}else dh$1=!1,I$1&&e0.flags&1048576&&ug$1(e0,ng$1,e0.index);switch(e0.lanes=0,e0.tag){case 2:var a0=e0.type;ij(r0,e0),r0=e0.pendingProps;var i0=Yf$1(e0,H$2.current);ch$1(e0,n0),i0=Nh$1(null,e0,a0,r0,i0,n0);var s0=Sh$1();return e0.flags|=1,typeof i0=="object"&&i0!==null&&typeof i0.render=="function"&&i0.$$typeof===void 0?(e0.tag=1,e0.memoizedState=null,e0.updateQueue=null,Zf$1(a0)?(s0=!0,cg$1(e0)):s0=!1,e0.memoizedState=i0.state!==null&&i0.state!==void 0?i0.state:null,kh$1(e0),i0.updater=Ei$1,e0.stateNode=i0,i0._reactInternals=e0,Ii$1(e0,a0,r0,n0),e0=jj(null,e0,a0,!0,s0,n0)):(e0.tag=0,I$1&&s0&&vg$1(e0),Xi$1(null,e0,i0,n0),e0=e0.child),e0;case 16:a0=e0.elementType;e:{switch(ij(r0,e0),r0=e0.pendingProps,i0=a0._init,a0=i0(a0._payload),e0.type=a0,i0=e0.tag=Zk$1(a0),r0=Ci$1(a0,r0),i0){case 0:e0=cj(null,e0,a0,r0,n0);break e;case 1:e0=hj(null,e0,a0,r0,n0);break e;case 11:e0=Yi$1(null,e0,a0,r0,n0);break e;case 14:e0=$i$1(null,e0,a0,Ci$1(a0.type,r0),n0);break e}throw Error(p$3(306,a0,""))}return e0;case 0:return a0=e0.type,i0=e0.pendingProps,i0=e0.elementType===a0?i0:Ci$1(a0,i0),cj(r0,e0,a0,i0,n0);case 1:return a0=e0.type,i0=e0.pendingProps,i0=e0.elementType===a0?i0:Ci$1(a0,i0),hj(r0,e0,a0,i0,n0);case 3:e:{if(kj(e0),r0===null)throw Error(p$3(387));a0=e0.pendingProps,s0=e0.memoizedState,i0=s0.element,lh$1(r0,e0),qh$1(e0,a0,null,n0);var o0=e0.memoizedState;if(a0=o0.element,s0.isDehydrated)if(s0={element:a0,isDehydrated:!1,cache:o0.cache,pendingSuspenseBoundaries:o0.pendingSuspenseBoundaries,transitions:o0.transitions},e0.updateQueue.baseState=s0,e0.memoizedState=s0,e0.flags&256){i0=Ji$1(Error(p$3(423)),e0),e0=lj(r0,e0,a0,n0,i0);break e}else if(a0!==i0){i0=Ji$1(Error(p$3(424)),e0),e0=lj(r0,e0,a0,n0,i0);break e}else for(yg$1=Lf$1(e0.stateNode.containerInfo.firstChild),xg$1=e0,I$1=!0,zg$1=null,n0=Vg$1(e0,null,a0,n0),e0.child=n0;n0;)n0.flags=n0.flags&-3|4096,n0=n0.sibling;else{if(Ig$1(),a0===i0){e0=Zi$1(r0,e0,n0);break e}Xi$1(r0,e0,a0,n0)}e0=e0.child}return e0;case 5:return Ah$1(e0),r0===null&&Eg$1(e0),a0=e0.type,i0=e0.pendingProps,s0=r0!==null?r0.memoizedProps:null,o0=i0.children,Ef$1(a0,i0)?o0=null:s0!==null&&Ef$1(a0,s0)&&(e0.flags|=32),gj(r0,e0),Xi$1(r0,e0,o0,n0),e0.child;case 6:return r0===null&&Eg$1(e0),null;case 13:return oj(r0,e0,n0);case 4:return yh$1(e0,e0.stateNode.containerInfo),a0=e0.pendingProps,r0===null?e0.child=Ug$1(e0,null,a0,n0):Xi$1(r0,e0,a0,n0),e0.child;case 11:return a0=e0.type,i0=e0.pendingProps,i0=e0.elementType===a0?i0:Ci$1(a0,i0),Yi$1(r0,e0,a0,i0,n0);case 7:return Xi$1(r0,e0,e0.pendingProps,n0),e0.child;case 8:return Xi$1(r0,e0,e0.pendingProps.children,n0),e0.child;case 12:return Xi$1(r0,e0,e0.pendingProps.children,n0),e0.child;case 10:e:{if(a0=e0.type._context,i0=e0.pendingProps,s0=e0.memoizedProps,o0=i0.value,G$2(Wg$1,a0._currentValue),a0._currentValue=o0,s0!==null)if(He$1(s0.value,o0)){if(s0.children===i0.children&&!Wf$1.current){e0=Zi$1(r0,e0,n0);break e}}else for(s0=e0.child,s0!==null&&(s0.return=e0);s0!==null;){var l0=s0.dependencies;if(l0!==null){o0=s0.child;for(var c0=l0.firstContext;c0!==null;){if(c0.context===a0){if(s0.tag===1){c0=mh$1(-1,n0&-n0),c0.tag=2;var u0=s0.updateQueue;if(u0!==null){u0=u0.shared;var d0=u0.pending;d0===null?c0.next=c0:(c0.next=d0.next,d0.next=c0),u0.pending=c0}}s0.lanes|=n0,c0=s0.alternate,c0!==null&&(c0.lanes|=n0),bh$1(s0.return,n0,e0),l0.lanes|=n0;break}c0=c0.next}}else if(s0.tag===10)o0=s0.type===e0.type?null:s0.child;else if(s0.tag===18){if(o0=s0.return,o0===null)throw Error(p$3(341));o0.lanes|=n0,l0=o0.alternate,l0!==null&&(l0.lanes|=n0),bh$1(o0,n0,e0),o0=s0.sibling}else o0=s0.child;if(o0!==null)o0.return=s0;else for(o0=s0;o0!==null;){if(o0===e0){o0=null;break}if(s0=o0.sibling,s0!==null){s0.return=o0.return,o0=s0;break}o0=o0.return}s0=o0}Xi$1(r0,e0,i0.children,n0),e0=e0.child}return e0;
vendor: 4,667 bytes, line 45
45case 9:return i0=e0.type,a0=e0.pendingProps.children,ch$1(e0,n0),i0=eh$1(i0),a0=a0(i0),e0.flags|=1,Xi$1(r0,e0,a0,n0),e0.child;case 14:return a0=e0.type,i0=Ci$1(a0,e0.pendingProps),i0=Ci$1(a0.type,i0),$i$1(r0,e0,a0,i0,n0);case 15:return bj(r0,e0,e0.type,e0.pendingProps,n0);case 17:return a0=e0.type,i0=e0.pendingProps,i0=e0.elementType===a0?i0:Ci$1(a0,i0),ij(r0,e0),e0.tag=1,Zf$1(a0)?(r0=!0,cg$1(e0)):r0=!1,ch$1(e0,n0),Gi$1(e0,a0,i0),Ii$1(e0,a0,i0,n0),jj(null,e0,a0,!0,r0,n0);case 19:return xj(r0,e0,n0);case 22:return dj(r0,e0,n0)}throw Error(p$3(156,e0.tag))};function Fk$1(r0,e0){return ac$1(r0,e0)}function $k$1(r0,e0,n0,a0){this.tag=r0,this.key=n0,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e0,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a0,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg$1(r0,e0,n0,a0){return new $k$1(r0,e0,n0,a0)}function aj(r0){return r0=r0.prototype,!(!r0||!r0.isReactComponent)}function Zk$1(r0){if(typeof r0=="function")return aj(r0)?1:0;if(r0!=null){if(r0=r0.$$typeof,r0===Da$1)return 11;if(r0===Ga$1)return 14}return 2}function Pg$1(r0,e0){var n0=r0.alternate;return n0===null?(n0=Bg$1(r0.tag,e0,r0.key,r0.mode),n0.elementType=r0.elementType,n0.type=r0.type,n0.stateNode=r0.stateNode,n0.alternate=r0,r0.alternate=n0):(n0.pendingProps=e0,n0.type=r0.type,n0.flags=0,n0.subtreeFlags=0,n0.deletions=null),n0.flags=r0.flags&14680064,n0.childLanes=r0.childLanes,n0.lanes=r0.lanes,n0.child=r0.child,n0.memoizedProps=r0.memoizedProps,n0.memoizedState=r0.memoizedState,n0.updateQueue=r0.updateQueue,e0=r0.dependencies,n0.dependencies=e0===null?null:{lanes:e0.lanes,firstContext:e0.firstContext},n0.sibling=r0.sibling,n0.index=r0.index,n0.ref=r0.ref,n0}function Rg$1(r0,e0,n0,a0,i0,s0){var o0=2;if(a0=r0,typeof r0=="function")aj(r0)&&(o0=1);else if(typeof r0=="string")o0=5;else e:switch(r0){case ya$1:return Tg$1(n0.children,i0,s0,e0);case za$1:o0=8,i0|=8;break;case Aa$1:return r0=Bg$1(12,n0,e0,i0|2),r0.elementType=Aa$1,r0.lanes=s0,r0;case Ea$1:return r0=Bg$1(13,n0,e0,i0),r0.elementType=Ea$1,r0.lanes=s0,r0;case Fa$1:return r0=Bg$1(19,n0,e0,i0),r0.elementType=Fa$1,r0.lanes=s0,r0;case Ia$1:return pj(n0,i0,s0,e0);default:if(typeof r0=="object"&&r0!==null)switch(r0.$$typeof){case Ba$1:o0=10;break e;case Ca$1:o0=9;break e;case Da$1:o0=11;break e;case Ga$1:o0=14;break e;case Ha$1:o0=16,a0=null;break e}throw Error(p$3(130,r0==null?r0:typeof r0,""))}return e0=Bg$1(o0,n0,e0,i0),e0.elementType=r0,e0.type=a0,e0.lanes=s0,e0}function Tg$1(r0,e0,n0,a0){return r0=Bg$1(7,r0,a0,e0),r0.lanes=n0,r0}function pj(r0,e0,n0,a0){return r0=Bg$1(22,r0,a0,e0),r0.elementType=Ia$1,r0.lanes=n0,r0.stateNode={isHidden:!1},r0}function Qg$1(r0,e0,n0){return r0=Bg$1(6,r0,null,e0),r0.lanes=n0,r0}function Sg$1(r0,e0,n0){return e0=Bg$1(4,r0.children!==null?r0.children:[],r0.key,e0),e0.lanes=n0,e0.stateNode={containerInfo:r0.containerInfo,pendingChildren:null,implementation:r0.implementation},e0}function al$1(r0,e0,n0,a0,i0){this.tag=e0,this.containerInfo=r0,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc$1(0),this.expirationTimes=zc$1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc$1(0),this.identifierPrefix=a0,this.onRecoverableError=i0,this.mutableSourceEagerHydrationData=null}function bl$1(r0,e0,n0,a0,i0,s0,o0,l0,c0){return r0=new al$1(r0,e0,n0,l0,c0),e0===1?(e0=1,s0===!0&&(e0|=8)):e0=0,s0=Bg$1(3,null,null,e0),r0.current=s0,s0.stateNode=r0,s0.memoizedState={element:a0,isDehydrated:n0,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh$1(s0),r0}function cl$1(r0,e0,n0){var a0=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wa$1,key:a0==null?null:""+a0,children:r0,containerInfo:e0,implementation:n0}}function dl$1(r0){if(!r0)return Vf$1;r0=r0._reactInternals;e:{if(Vb$1(r0)!==r0||r0.tag!==1)throw Error(p$3(170));var e0=r0;do{switch(e0.tag){case 3:e0=e0.stateNode.context;break e;case 1:if(Zf$1(e0.type)){e0=e0.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e0=e0.return}while(e0!==null);throw Error(p$3(171))}if(r0.tag===1){var n0=r0.type;if(Zf$1(n0))return bg$1(r0,n0,e0)}return e0}function el$1(r0,e0,n0,a0,i0,s0,o0,l0,c0){return r0=bl$1(n0,a0,!0,r0,i0,s0,o0,l0,c0),r0.context=dl$1(null),n0=r0.current,a0=R$2(),i0=yi$1(n0),s0=mh$1(a0,i0),s0.
vendor: 4,554 bytes, line 45
45callback=e0??null,nh$1(n0,s0,i0),r0.current.lanes=i0,Ac$1(r0,i0,a0),Dk$1(r0,a0),r0}function fl$1(r0,e0,n0,a0){var i0=e0.current,s0=R$2(),o0=yi$1(i0);return n0=dl$1(n0),e0.context===null?e0.context=n0:e0.pendingContext=n0,e0=mh$1(s0,o0),e0.payload={element:r0},a0=a0===void 0?null:a0,a0!==null&&(e0.callback=a0),r0=nh$1(i0,e0,o0),r0!==null&&(gi$1(r0,i0,o0,s0),oh$1(r0,i0,o0)),o0}function gl$1(r0){if(r0=r0.current,!r0.child)return null;switch(r0.child.tag){case 5:return r0.child.stateNode;default:return r0.child.stateNode}}function hl$1(r0,e0){if(r0=r0.memoizedState,r0!==null&&r0.dehydrated!==null){var n0=r0.retryLane;r0.retryLane=n0!==0&&n0<e0?n0:e0}}function il$1(r0,e0){hl$1(r0,e0),(r0=r0.alternate)&&hl$1(r0,e0)}function jl$1(){return null}var kl$1=typeof reportError=="function"?reportError:function(r0){console.error(r0)};function ll$1(r0){this._internalRoot=r0}ml$1.prototype.render=ll$1.prototype.render=function(r0){var e0=this._internalRoot;if(e0===null)throw Error(p$3(409));fl$1(r0,e0,null,null)};ml$1.prototype.unmount=ll$1.prototype.unmount=function(){var r0=this._internalRoot;if(r0!==null){this._internalRoot=null;var e0=r0.containerInfo;Rk$1(function(){fl$1(null,r0,null,null)}),e0[uf$1]=null}};function ml$1(r0){this._internalRoot=r0}ml$1.prototype.unstable_scheduleHydration=function(r0){if(r0){var e0=Hc$1();r0={blockedOn:null,target:r0,priority:e0};for(var n0=0;n0<Qc$1.length&&e0!==0&&e0<Qc$1[n0].priority;n0++);Qc$1.splice(n0,0,r0),n0===0&&Vc$1(r0)}};function nl$1(r0){return!(!r0||r0.nodeType!==1&&r0.nodeType!==9&&r0.nodeType!==11)}function ol$1(r0){return!(!r0||r0.nodeType!==1&&r0.nodeType!==9&&r0.nodeType!==11&&(r0.nodeType!==8||r0.nodeValue!==" react-mount-point-unstable "))}function pl$1(){}function ql$1(r0,e0,n0,a0,i0){if(i0){if(typeof a0=="function"){var s0=a0;a0=function(){var u0=gl$1(o0);s0.call(u0)}}var o0=el$1(e0,a0,r0,0,null,!1,!1,"",pl$1);return r0._reactRootContainer=o0,r0[uf$1]=o0.current,sf$1(r0.nodeType===8?r0.parentNode:r0),Rk$1(),o0}for(;i0=r0.lastChild;)r0.removeChild(i0);if(typeof a0=="function"){var l0=a0;a0=function(){var u0=gl$1(c0);l0.call(u0)}}var c0=bl$1(r0,0,!1,null,null,!1,!1,"",pl$1);return r0._reactRootContainer=c0,r0[uf$1]=c0.current,sf$1(r0.nodeType===8?r0.parentNode:r0),Rk$1(function(){fl$1(e0,c0,n0,a0)}),c0}function rl$1(r0,e0,n0,a0,i0){var s0=n0._reactRootContainer;if(s0){var o0=s0;if(typeof i0=="function"){var l0=i0;i0=function(){var c0=gl$1(o0);l0.call(c0)}}fl$1(e0,o0,r0,i0)}else o0=ql$1(n0,e0,r0,i0,a0);return gl$1(o0)}Ec$1=function(r0){switch(r0.tag){case 3:var e0=r0.stateNode;if(e0.current.memoizedState.isDehydrated){var n0=tc$1(e0.pendingLanes);n0!==0&&(Cc$1(e0,n0|1),Dk$1(e0,B$3()),!(K$3&6)&&(Gj=B$3()+500,jg$1()))}break;case 13:Rk$1(function(){var a0=ih$1(r0,1);if(a0!==null){var i0=R$2();gi$1(a0,r0,1,i0)}}),il$1(r0,1)}};Fc$1=function(r0){if(r0.tag===13){var e0=ih$1(r0,134217728);if(e0!==null){var n0=R$2();gi$1(e0,r0,134217728,n0)}il$1(r0,134217728)}};Gc$1=function(r0){if(r0.tag===13){var e0=yi$1(r0),n0=ih$1(r0,e0);if(n0!==null){var a0=R$2();gi$1(n0,r0,e0,a0)}il$1(r0,e0)}};Hc$1=function(){return C$1};Ic$1=function(r0,e0){var n0=C$1;try{return C$1=r0,e0()}finally{C$1=n0}};yb$1=function(r0,e0,n0){switch(e0){case"input":if(bb$1(r0,n0),e0=n0.name,n0.type==="radio"&&e0!=null){for(n0=r0;n0.parentNode;)n0=n0.parentNode;for(n0=n0.querySelectorAll("input[name="+JSON.stringify(""+e0)+'][type="radio"]'),e0=0;e0<n0.length;e0++){var a0=n0[e0];if(a0!==r0&&a0.form===r0.form){var i0=Db$1(a0);if(!i0)throw Error(p$3(90));Wa$1(a0),bb$1(a0,i0)}}}break;case"textarea":ib(r0,n0);break;case"select":e0=n0.value,e0!=null&&fb$1(r0,!!n0.multiple,e0,!1)}};Gb$1=Qk$1;Hb$1=Rk$1;var sl$1={usingClientEntryPoint:!1,Events:[Cb$1,ue$3,Db$1,Eb$1,Fb$1,Qk$1]},tl$1={findFiberByHostInstance:Wc$1,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ul$1={bundleType:tl$1.bundleType,version:tl$1.version,rendererPackageName:tl$1.rendererPackageName,rendererConfig:tl$1.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua$1.ReactCurrentDispatcher,findHostInstanceByFiber:function(r0){return r0=Zb$1(r0),r0===null?null:r0.stateNode},findFiberByHostInstance:tl$1.findFiberByHostInstance||jl$1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
45if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl$1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl$1.isDisabled&&vl$1.supportsFiber)try{kc$1=vl$1.inject(ul$1),lc$1=vl$1}catch{}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sl$1;reactDom_production_min.createPortal=function(r0,e0){var n0=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nl$1(e0))throw Error(p$3(200));return cl$1(r0,e0,null,n0)};reactDom_production_min.createRoot=function(r0,e0){if(!nl$1(r0))throw Error(p$3(299));var n0=!1,a0="",i0=kl$1;return e0!=null&&(e0.unstable_strictMode===!0&&(n0=!0),e0.identifierPrefix!==void 0&&(a0=e0.identifierPrefix),e0.onRecoverableError!==void 0&&(i0=e0.onRecoverableError)),e0=bl$1(r0,1,!1,null,null,n0,!1,a0,i0),r0[uf$1]=e0.current,sf$1(r0.nodeType===8?r0.parentNode:r0),new ll$1(e0)};reactDom_production_min.findDOMNode=function(r0){if(r0==null)return null;if(r0.nodeType===1)return r0;var e0=r0._reactInternals;if(e0===void 0)throw typeof r0.render=="function"?Error(p$3(188)):(r0=Object.keys(r0).join(","),Error(p$3(268,r0)));return r0=Zb$1(e0),r0=r0===null?null:r0.stateNode,r0};reactDom_production_min.flushSync=function(r0){return Rk$1(r0)};reactDom_production_min.hydrate=function(r0,e0,n0){if(!ol$1(e0))throw Error(p$3(200));return rl$1(null,r0,e0,!0,n0)};reactDom_production_min.hydrateRoot=function(r0,e0,n0){if(!nl$1(r0))throw Error(p$3(405));var a0=n0!=null&&n0.hydratedSources||null,i0=!1,s0="",o0=kl$1;if(n0!=null&&(n0.unstable_strictMode===!0&&(i0=!0),n0.identifierPrefix!==void 0&&(s0=n0.identifierPrefix),n0.onRecoverableError!==void 0&&(o0=n0.onRecoverableError)),e0=el$1(e0,null,r0,1,n0??null,i0,!1,s0,o0),r0[uf$1]=e0.current,sf$1(r0),a0)for(r0=0;r0<a0.length;r0++)n0=a0[r0],i0=n0._getVersion,i0=i0(n0._source),e0.mutableSourceEagerHydrationData==null?e0.mutableSourceEagerHydrationData=[n0,i0]:e0.mutableSourceEagerHydrationData.push(n0,i0);return new ml$1(e0)};reactDom_production_min.render=function(r0,e0,n0){if(!ol$1(e0))throw Error(p$3(200));return rl$1(null,r0,e0,!1,n0)};reactDom_production_min.unmountComponentAtNode=function(r0){if(!ol$1(r0))throw Error(p$3(40));return r0._reactRootContainer?(Rk$1(function(){rl$1(null,null,r0,!1,function(){r0._reactRootContainer=null,r0[uf$1]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Qk$1;reactDom_production_min.unstable_renderSubtreeIntoContainer=function(r0,e0,n0,a0){if(!ol$1(n0))throw Error(p$3(200));if(r0==null||r0._reactInternals===void 0)throw Error(p$3(38));return rl$1(r0,e0,n0,!1,a0)};reactDom_production_min.version="18.3.1-next-f1338f8080-20240426";function checkDCE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(r0){console.error(r0)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var createRoot,m$3=reactDomExports;createRoot=m$3.createRoot,m$3.hydrateRoot;const TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count$2=0;function genId(){return count$2=(count$2+1)%Number.MAX_SAFE_INTEGER,count$2.toString()}const toastTimeouts=new Map,addToRemoveQueue=r0=>{if(toastTimeouts.has(r0))return;const e0=setTimeout(()=>{toastTimeouts.delete(r0),dispatch({type:"REMOVE_TOAST",toastId:r0})},TOAST_REMOVE_DELAY);toastTimeouts.set(r0,e0)},reducer=(r0,e0)=>{switch(e0.type){case"ADD_TOAST":return{...r0,toasts:[e0.toast,...r0.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...r0,toasts:r0.toasts.map(n0=>n0.id===e0.toast.id?{...n0,...e0.toast}:n0)};case"DISMISS_TOAST":{const{toastId:n0}=e0;return n0?addToRemoveQueue(n0):r0.toasts.forEach(a0=>{addToRemoveQueue(a0.id)}),{...r0,toasts:r0.toasts.map(a0=>a0.id===n0||n0===void 0?{...a0,open:!1}:a0)}}case"REMOVE_TOAST":return e0.toastId===void 0?{...r0,toasts:[]}:{...r0,toasts:r0.toasts.filter(n0=>n0.id!==e0.toastId)}}},listeners=[];let memoryState={toasts:[]};function dispatch(r0){memoryState=reducer(memoryState,r0),listeners.forEach(e0=>{e0(memoryState)})}function toast({...r0}){const e0=genId(),n0=i0=>
vendor: 15,085 bytes, line 45
45dispatch({type:"UPDATE_TOAST",toast:{...i0,id:e0}}),a0=()=>dispatch({type:"DISMISS_TOAST",toastId:e0});return dispatch({type:"ADD_TOAST",toast:{...r0,id:e0,open:!0,onOpenChange:i0=>{i0||a0()}}}),{id:e0,dismiss:a0,update:n0}}function useToast(){const[r0,e0]=reactExports.useState(memoryState);return reactExports.useEffect(()=>(listeners.push(e0),()=>{const n0=listeners.indexOf(e0);n0>-1&&listeners.splice(n0,1)}),[r0]),{...r0,toast,dismiss:n0=>dispatch({type:"DISMISS_TOAST",toastId:n0})}}function composeEventHandlers(r0,e0,{checkForDefaultPrevented:n0=!0}={}){return function(i0){if(r0==null||r0(i0),n0===!1||!i0.defaultPrevented)return e0==null?void 0:e0(i0)}}function setRef$1(r0,e0){if(typeof r0=="function")return r0(e0);r0!=null&&(r0.current=e0)}function composeRefs$1(...r0){return e0=>{let n0=!1;const a0=r0.map(i0=>{const s0=setRef$1(i0,e0);return!n0&&typeof s0=="function"&&(n0=!0),s0});if(n0)return()=>{for(let i0=0;i0<a0.length;i0++){const s0=a0[i0];typeof s0=="function"?s0():setRef$1(r0[i0],null)}}}}function useComposedRefs$1(...r0){return reactExports.useCallback(composeRefs$1(...r0),r0)}function createContext2(r0,e0){const n0=reactExports.createContext(e0),a0=s0=>{const{children:o0,...l0}=s0,c0=reactExports.useMemo(()=>l0,Object.values(l0));return jsxRuntimeExports.jsx(n0.Provider,{value:c0,children:o0})};a0.displayName=r0+"Provider";function i0(s0){const o0=reactExports.useContext(n0);if(o0)return o0;if(e0!==void 0)return e0;throw new Error(`\`${s0}\` must be used within \`${r0}\``)}return[a0,i0]}function createContextScope(r0,e0=[]){let n0=[];function a0(s0,o0){const l0=reactExports.createContext(o0),c0=n0.length;n0=[...n0,o0];const u0=h0=>{var g0;const{scope:f0,children:p0,...A0}=h0,m0=((g0=f0==null?void 0:f0[r0])==null?void 0:g0[c0])||l0,x0=reactExports.useMemo(()=>A0,Object.values(A0));return jsxRuntimeExports.jsx(m0.Provider,{value:x0,children:p0})};u0.displayName=s0+"Provider";function d0(h0,f0){var m0;const p0=((m0=f0==null?void 0:f0[r0])==null?void 0:m0[c0])||l0,A0=reactExports.useContext(p0);if(A0)return A0;if(o0!==void 0)return o0;throw new Error(`\`${h0}\` must be used within \`${s0}\``)}return[u0,d0]}const i0=()=>{const s0=n0.map(o0=>reactExports.createContext(o0));return function(l0){const c0=(l0==null?void 0:l0[r0])||s0;return reactExports.useMemo(()=>({[`__scope${r0}`]:{...l0,[r0]:c0}}),[l0,c0])}};return i0.scopeName=r0,[a0,composeContextScopes(i0,...e0)]}function composeContextScopes(...r0){const e0=r0[0];if(r0.length===1)return e0;const n0=()=>{const a0=r0.map(i0=>({useScope:i0(),scopeName:i0.scopeName}));return function(s0){const o0=a0.reduce((l0,{useScope:c0,scopeName:u0})=>{const h0=c0(s0)[`__scope${u0}`];return{...l0,...h0}},{});return reactExports.useMemo(()=>({[`__scope${e0.scopeName}`]:o0}),[o0])}};return n0.scopeName=e0.scopeName,n0}function createSlot(r0){const e0=createSlotClone(r0),n0=reactExports.forwardRef((a0,i0)=>{const{children:s0,...o0}=a0,l0=reactExports.Children.toArray(s0),c0=l0.find(isSlottable);if(c0){const u0=c0.props.children,d0=l0.map(h0=>h0===c0?reactExports.Children.count(u0)>1?reactExports.Children.only(null):reactExports.isValidElement(u0)?u0.props.children:null:h0);return jsxRuntimeExports.jsx(e0,{...o0,ref:i0,children:reactExports.isValidElement(u0)?reactExports.cloneElement(u0,void 0,d0):null})}return jsxRuntimeExports.jsx(e0,{...o0,ref:i0,children:s0})});return n0.displayName=`${r0}.Slot`,n0}var Slot$4=createSlot("Slot");function createSlotClone(r0){const e0=reactExports.forwardRef((n0,a0)=>{const{children:i0,...s0}=n0;if(reactExports.isValidElement(i0)){const o0=getElementRef$1(i0),l0=mergeProps(s0,i0.props);return i0.type!==reactExports.Fragment&&(l0.ref=a0?composeRefs$1(a0,o0):o0),reactExports.cloneElement(i0,l0)}return reactExports.Children.count(i0)>1?reactExports.Children.only(null):null});return e0.displayName=`${r0}.SlotClone`,e0}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function createSlottable(r0){const e0=({children:n0})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:n0});return e0.displayName=`${r0}.Slottable`,e0.__radixId=SLOTTABLE_IDENTIFIER,e0}function isSlottable(r0){return reactExports.isValidElement(r0)&&typeof r0.type=="function"&&"__radixId"in r0.type&&r0.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps(r0,e0){const n0={...e0};for(const a0 in e0){const i0=r0[a0],s0=e0[a0];/^on[A-Z]/.test(a0)?i0&&s0?n0[a0]=(...l0)=>{const c0=s0(...l0);return i0(...l0),c0}:i0&&(n0[a0]=i0):a0==="style"?n0[a0]={...i0,...s0}:a0==="className"&&(n0[a0]=[i0,s0].filter(Boolean).join(" "))}return{...r0,...n0}}function getElementRef$1(r0){var a0,i0;let e0=(a0=Object.getOwnPropertyDescriptor(r0.props,"ref"))==null?void 0:a0.get,n0=e0&&"isReactWarning"in e0&&e0.isReactWarning;return n0?r0.ref:(e0=(i0=Object.getOwnPropertyDescriptor(r0,"ref"))==null?void 0:i0.get,n0=e0&&"isReactWarning"in e0&&e0.isReactWarning,n0?r0.props.ref:r0.props.ref||r0.ref)}function createCollection(r0){const e0=r0+"CollectionProvider",[n0,a0]=createContextScope(e0),[i0,s0]=n0(e0,{collectionRef:{current:null},itemMap:new Map}),o0=m0=>{const{scope:x0,children:g0}=m0,y0=React__default.useRef(null),b0=React__default.useRef(new Map).current;return jsxRuntimeExports.jsx(i0,{scope:x0,itemMap:b0,collectionRef:y0,children:g0})};o0.displayName=e0;const l0=r0+"CollectionSlot",c0=createSlot(l0),u0=React__default.forwardRef((m0,x0)=>{const{scope:g0,children:y0}=m0,b0=s0(l0,g0),E0=useComposedRefs$1(x0,b0.collectionRef);return jsxRuntimeExports.jsx(c0,{ref:E0,children:y0})});u0.displayName=l0;const d0=r0+"CollectionItemSlot",h0="data-radix-collection-item",f0=createSlot(d0),p0=React__default.forwardRef((m0,x0)=>{const{scope:g0,children:y0,...b0}=m0,E0=React__default.useRef(null),w0=useComposedRefs$1(x0,E0),v0=s0(d0,g0);return React__default.useEffect(()=>(v0.itemMap.set(E0,{ref:E0,...b0}),()=>void v0.itemMap.delete(E0))),jsxRuntimeExports.jsx(f0,{[h0]:"",ref:w0,children:y0})});p0.displayName=d0;function A0(m0){const x0=s0(r0+"CollectionConsumer",m0);return React__default.useCallback(()=>{const y0=x0.collectionRef.current;if(!y0)return[];const b0=Array.from(y0.querySelectorAll(`[${h0}]`));return Array.from(x0.itemMap.values()).sort((v0,S0)=>b0.indexOf(v0.ref.current)-b0.indexOf(S0.ref.current))},[x0.collectionRef,x0.itemMap])}return[{Provider:o0,Slot:u0,ItemSlot:p0},A0,a0]}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive=NODES.reduce((r0,e0)=>{const n0=createSlot(`Primitive.${e0}`),a0=reactExports.forwardRef((i0,s0)=>{const{asChild:o0,...l0}=i0,c0=o0?n0:e0;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntimeExports.jsx(c0,{...l0,ref:s0})});return a0.displayName=`Primitive.${e0}`,{...r0,[e0]:a0}},{});function dispatchDiscreteCustomEvent(r0,e0){r0&&reactDomExports.flushSync(()=>r0.dispatchEvent(e0))}function useCallbackRef$2(r0){const e0=reactExports.useRef(r0);return reactExports.useEffect(()=>{e0.current=r0}),reactExports.useMemo(()=>(...n0)=>{var a0;return(a0=e0.current)==null?void 0:a0.call(e0,...n0)},[])}function useEscapeKeydown(r0,e0=globalThis==null?void 0:globalThis.document){const n0=useCallbackRef$2(r0);reactExports.useEffect(()=>{const a0=i0=>{i0.key==="Escape"&&n0(i0)};return e0.addEventListener("keydown",a0,{capture:!0}),()=>e0.removeEventListener("keydown",a0,{capture:!0})},[n0,e0])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=reactExports.forwardRef((r0,e0)=>{const{disableOutsidePointerEvents:n0=!1,onEscapeKeyDown:a0,onPointerDownOutside:i0,onFocusOutside:s0,onInteractOutside:o0,onDismiss:l0,...c0}=r0,u0=reactExports.useContext(DismissableLayerContext),[d0,h0]=reactExports.useState(null),f0=(d0==null?void 0:d0.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p0]=reactExports.useState({}),A0=useComposedRefs$1(e0,S0=>h0(S0)),m0=Array.from(u0.layers),[x0]=[...u0.layersWithOutsidePointerEventsDisabled].slice(-1),g0=m0.indexOf(x0),y0=d0?m0.indexOf(d0):-1,b0=u0.layersWithOutsidePointerEventsDisabled.size>0,E0=y0>=g0,w0=usePointerDownOutside(S0=>{const k0=S0.target,R0=[...u0.branches].some(j0=>j0.contains(k0));!E0||R0||(i0==null||i0(S0),o0==null||o0(S0),S0.defaultPrevented||l0==null||l0())},f0),v0=useFocusOutside(S0=>{const k0=S0.target;[...u0.branches].some(j0=>j0.contains(k0))||(s0==null||s0(S0),o0==null||o0(S0),S0.defaultPrevented||l0==null||l0())},f0);return useEscapeKeydown(S0=>{y0===u0.layers.size-1&&(a0==null||a0(S0),!S0.defaultPrevented&&l0&&(S0.preventDefault(),l0()))},f0),reactExports.useEffect(()=>{if(d0)return n0&&(u0.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=f0.body.style.pointerEvents,f0.body.style.pointerEvents="none"),u0.layersWithOutsidePointerEventsDisabled.add(d0)),u0.layers.add(d0),dispatchUpdate(),()=>{n0&&u0.layersWithOutsidePointerEventsDisabled.size===1&&(f0.body.style.pointerEvents=originalBodyPointerEvents)}},[d0,f0,n0,u0]),reactExports.useEffect(()=>()=>{d0&&(u0.layers.delete(d0),u0.layersWithOutsidePointerEventsDisabled.delete(d0),dispatchUpdate())},[d0,u0]),reactExports.useEffect(()=>{const S0=()=>p0({});return document.addEventListener(CONTEXT_UPDATE,S0),()=>document.removeEventListener(CONTEXT_UPDATE,S0)},[]),jsxRuntimeExports.jsx(Primitive.div,{...c0,ref:A0,style:{pointerEvents:b0?E0?"auto":"none":void 0,...r0.style},onFocusCapture:composeEventHandlers(r0.onFocusCapture,v0.onFocusCapture),onBlurCapture:composeEventHandlers(r0.onBlurCapture,v0.onBlurCapture),onPointerDownCapture:composeEventHandlers(r0.onPointerDownCapture,w0.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=reactExports.forwardRef((r0,e0)=>{const n0=reactExports.useContext(DismissableLayerContext),a0=reactExports.useRef(null),i0=useComposedRefs$1(e0,a0);return reactExports.useEffect(()=>{const s0=a0.current;if(s0)return n0.branches.add(s0),()=>{n0.branches.delete(s0)}},[n0.branches]),jsxRuntimeExports.jsx(Primitive.div,{...r0,ref:i0})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(r0,e0=globalThis==null?void 0:globalThis.document){const n0=useCallbackRef$2(r0),a0=reactExports.useRef(!1),i0=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const s0=l0=>{if(l0.target&&!a0.current){let c0=function(){handleAndDispatchCustomEvent$1(POINTER_DOWN_OUTSIDE,n0,u0,{discrete:!0})};const u0={originalEvent:l0};l0.pointerType==="touch"?(e0.removeEventListener("click",i0.current),i0.current=c0,e0.addEventListener("click",i0.current,{once:!0})):c0()}else e0.removeEventListener("click",i0.current);a0.current=!1},o0=window.setTimeout(()=>{e0.addEventListener("pointerdown",s0)},0);return()=>{window.clearTimeout(o0),e0.removeEventListener("pointerdown",s0),e0.removeEventListener("click",i0.current)}},[e0,n0]),{onPointerDownCapture:()=>a0.current=!0}}function useFocusOutside(r0,e0=globalThis==null?void 0:globalThis.document){const n0=useCallbackRef$2(r0),a0=reactExports.useRef(!1);return reactExports.useEffect(()=>{const i0=s0=>{s0.target&&!a0.current&&handleAndDispatchCustomEvent$1(FOCUS_OUTSIDE,n0,{originalEvent:s0},{discrete:!1})};return e0.addEventListener("focusin",i0),()=>e0.removeEventListener("focusin",i0)},[e0,n0]),{onFocusCapture:()=>a0.current=!0,onBlurCapture:()=>a0.current=!1}}function dispatchUpdate(){const r0=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(r0)}function handleAndDispatchCustomEvent$1(r0,e0,n0,{discrete:a0}){const i0=n0.originalEvent.target,s0=new CustomEvent(r0,{bubbles:!1,cancelable:!0,detail:n0});e0&&i0.addEventListener(r0,e0,{once:!0}),a0?dispatchDiscreteCustomEvent(i0,s0):i0.dispatchEvent(s0)}var Root$d=DismissableLayer,Branch=DismissableLayerBranch,useLayoutEffect2=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},PORTAL_NAME$7="Portal",Portal$5=reactExports.forwardRef((r0,e0)=>{var l0;const{container:n0,...a0}=r0,[i0,s0]=reactExports.useState(!1);useLayoutEffect2(()=>s0(!0),[]);const o0=n0||i0&&((l0=globalThis==null?void 0:globalThis.document)==null?void 0:l0.body);return o0?ReactDOM.createPortal(jsxRuntimeExports.jsx(Primitive.div,{...a0,ref:e0}),o0):null});Portal$5.displayName=PORTAL_NAME$7;function useStateMachine$1(r0,e0){return reactExports.useReducer((n0,a0)=>e0[n0][a0]??n0,r0)}var Presence=r0=>{const{present:e0,children:n0}=r0,a0=usePresence(e0),i0=typeof n0=="function"?n0({present:a0.isPresent}):reactExports.Children.only(n0),s0=useComposedRefs$1(a0.ref,getElementRef(i0));return typeof n0=="function"||a0.isPresent?reactExports.cloneElement(i0,{ref:s0}):null};Presence.displayName="Presence";function usePresence(r0){const[e0,n0]=reactExports.useState(),a0=reactExports.useRef(null),i0=reactExports.useRef(r0),s0=reactExports.useRef("none"),o0=r0?"mounted":"unmounted",[l0,c0]=useStateMachine$1(o0,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const u0=getAnimationName(a0.current);s0.current=l0==="mounted"?u0:"none"},[l0]),useLayoutEffect2(()=>{const u0=a0.current,d0=i0.current;if(d0!==r0){const f0=s0.current,p0=getAnimationName(u0);r0?c0("MOUNT"):p0==="none"||(u0==null?void 0:u0.display)==="none"?c0("UNMOUNT"):c0(d0&&f0!==p0?"ANIMATION_OUT":"UNMOUNT"),i0.current=r0}},[r0,c0]),useLayoutEffect2(()=>{if(e0){let u0;const d0=e0.ownerDocument.defaultView??window,h0=p0=>{const m0=getAnimationName(a0.current).includes(p0.animationName);if(p0.target===e0&&m0&&(c0("ANIMATION_END"),!i0.current)){const x0=e0.style.animationFillMode;e0.style.animationFillMode="forwards",u0=d0.setTimeout(()=>{e0.style.animationFillMode==="forwards"&&(e0.style.animationFillMode=x0)})}},f0=p0=>{p0.target===e0&&(s0.current=getAnimationName(a0.current))};return e0.addEventListener("animationstart",f0),e0.addEventListener("animationcancel",h0),e0.addEventListener("animationend",h0),()=>{d0.clearTimeout(u0),e0.removeEventListener("animationstart",f0),e0.removeEventListener("animationcancel",h0),e0.removeEventListener("animationend",h0)}}else c0("ANIMATION_END")},[e0,c0]),{isPresent:["mounted","unmountSuspended"].includes(l0),ref:reactExports.useCallback(u0=>{a0.current=u0?getComputedStyle(u0):null,n0(u0)},[])}}function getAnimationName(r0){return(r0==null?void 0:r0.animationName)||"none"}function getElementRef(r0){var a0,i0;let e0=(a0=Object.getOwnPropertyDescriptor(r0.props,"ref"))==null?void 0:a0.get,n0=e0&&"isReactWarning"in e0&&e0.isReactWarning;return n0?r0.ref:(e0=(i0=Object.getOwnPropertyDescriptor(r0,"ref"))==null?void 0:i0.get,n0=e0&&"isReactWarning"in e0&&e0.isReactWarning,n0?r0.props.ref:r0.props.ref||r0.ref)}var useInsertionEffect=React$1[" useInsertionEffect ".trim().toString()]||useLayoutEffect2;
45function useControllableState$1({prop:r0,defaultProp:e0,onChange:n0=()=>{},caller:a0}){const[i0,s0,o0]=useUncontrolledState$1({defaultProp:e0,onChange:n0}),l0=r0!==void 0,c0=l0?r0:i0;{const d0=reactExports.useRef(r0!==void 0);reactExports.useEffect(()=>{const h0=d0.current;h0!==l0&&console.warn(`${a0} is changing from ${h0?"controlled":"uncontrolled"} to ${l0?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d0.current=l0},[l0,a0])}const u0=reactExports.useCallback(d0=>{var h0;if(l0){const f0=isFunction$5(d0)?d0(r0):d0;f0!==r0&&((h0=o0.current)==null||h0.call(o0,f0))}else s0(d0)},[l0,r0,s0,o0]);return[c0,u0]}function useUncontrolledState$1({defaultProp:r0,onChange:e0}){const[n0,a0]=reactExports.useState(r0),i0=reactExports.useRef(n0),s0=reactExports.useRef(e0);return useInsertionEffect(()=>{s0.current=e0},[e0]),reactExports.useEffect(()=>{var o0;i0.current!==n0&&((o0=s0.current)==null||o0.call(s0,n0),i0.current=n0)},[n0,i0]),[n0,a0,s0]}function isFunction$5(r0){return typeof r0=="function"}var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME$3="VisuallyHidden",VisuallyHidden=reactExports.forwardRef((r0,e0)=>jsxRuntimeExports.jsx(Primitive.span,{...r0,ref:e0,style:{...VISUALLY_HIDDEN_STYLES,...r0.style}}));VisuallyHidden.displayName=NAME$3;var Root$c=VisuallyHidden,PROVIDER_NAME$1="ToastProvider",[Collection$4,useCollection$4,createCollectionScope$4]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope$4]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME$1),ToastProvider$1=r0=>{const{__scopeToast:e0,label:n0="Notification",duration:a0=5e3,swipeDirection:i0="right",swipeThreshold:s0=50,children:o0}=r0,[l0,c0]=reactExports.useState(null),[u0,d0]=reactExports.useState(0),h0=reactExports.useRef(!1),f0=reactExports.useRef(!1);return n0.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME$1}\`. Expected non-empty \`string\`.`),jsxRuntimeExports.jsx(Collection$4.Provider,{scope:e0,children:jsxRuntimeExports.jsx(ToastProviderProvider,{scope:e0,label:n0,duration:a0,swipeDirection:i0,swipeThreshold:s0,toastCount:u0,viewport:l0,onViewportChange:c0,onToastAdd:reactExports.useCallback(()=>d0(p0=>p0+1),[]),onToastRemove:reactExports.useCallback(()=>d0(p0=>p0-1),[]),isFocusedToastEscapeKeyDownRef:h0,isClosePausedRef:f0,children:o0})})};ToastProvider$1.displayName=PROVIDER_NAME$1;var VIEWPORT_NAME$2="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport$1=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,hotkey:a0=VIEWPORT_DEFAULT_HOTKEY,label:i0="Notifications ({hotkey})",...s0}=r0,o0=useToastProviderContext(VIEWPORT_NAME$2,n0),l0=useCollection$4(n0),c0=reactExports.useRef(null),u0=reactExports.useRef(null),d0=reactExports.useRef(null),h0=reactExports.useRef(null),f0=useComposedRefs$1(e0,h0,o0.onViewportChange),p0=a0.join("+").replace(/Key/g,"").replace(/Digit/g,""),A0=o0.toastCount>0;reactExports.useEffect(()=>{const x0=g0=>{var b0;a0.length!==0&&a0.every(E0=>g0[E0]||g0.code===E0)&&((b0=h0.current)==null||b0.focus())};return document.addEventListener("keydown",x0),()=>document.removeEventListener("keydown",x0)},[a0]),reactExports.useEffect(()=>{const x0=c0.current,g0=h0.current;if(A0&&x0&&g0){const y0=()=>{if(!o0.isClosePausedRef.current){const v0=new CustomEvent(VIEWPORT_PAUSE);g0.dispatchEvent(v0),o0.isClosePausedRef.current=!0}},b0=()=>{if(o0.isClosePausedRef.current){const v0=new CustomEvent(VIEWPORT_RESUME);g0.dispatchEvent(v0),o0.isClosePausedRef.current=!1}},E0=v0=>{!x0.contains(v0.relatedTarget)&&b0()},w0=()=>{x0.contains(document.activeElement)||b0()};return x0.addEventListener("focusin",y0),x0.addEventListener("focusout",E0),x0.addEventListener("pointermove",y0),x0.addEventListener("pointerleave",w0),window.addEventListener("blur",y0),window.addEventListener("focus",b0),()=>{x0.removeEventListener("focusin",y0),x0.removeEventListener("focusout",E0),x0.removeEventListener("pointermove",y0),x0.removeEventListener("pointerleave",w0),window.removeEventListener("blur",y0),window.removeEventListener("focus",b0)}}},[A0,o0.isClosePausedRef]);const m0=reactExports.useCallback(({tabbingDirection:x0})=>{const y0=l0().map(b0=>{const E0=b0.ref.current,w0=[E0,...getTabbableCandidates$1(E0)];return x0==="forwards"?w0:w0.reverse()});return(x0==="forwards"?y0.reverse():y0).flat()},[l0]);return reactExports.useEffect(()=>{const x0=h0.current;if(x0){const g0=y0=>{var w0,v0,S0;const b0=y0.altKey||y0.ctrlKey||y0.metaKey;if(y0.key==="Tab"&&!b0){const k0=document.activeElement,R0=y0.shiftKey;if(y0.target===x0&&R0){(w0=u0.current)==null||w0.focus();return}const $0=m0({tabbingDirection:R0?"backwards":"forwards"}),T0=$0.findIndex(I0=>I0===k0);focusFirst$3($0.slice(T0+1))?y0.preventDefault():R0?(v0=u0.current)==null||v0.focus():(S0=d0.current)==null||S0.focus()}};return x0.addEventListener("keydown",g0),()=>x0.removeEventListener("keydown",g0)}},[l0,m0]),jsxRuntimeExports.jsxs(Branch,{ref:c0,role:"region","aria-label":i0.replace("{hotkey}",p0),tabIndex:-1,style:{pointerEvents:A0?void 0:"none"},children:[A0&&jsxRuntimeExports.jsx(FocusProxy,{ref:u0,onFocusFromOutsideViewport:()=>{const x0=m0({tabbingDirection:"forwards"});focusFirst$3(x0)}}),jsxRuntimeExports.jsx(Collection$4.Slot,{scope:n0,children:jsxRuntimeExports.jsx(Primitive.ol,{tabIndex:-1,...s0,ref:f0})}),A0&&jsxRuntimeExports.jsx(FocusProxy,{ref:d0,onFocusFromOutsideViewport:()=>{const x0=m0({tabbingDirection:"backwards"});focusFirst$3(x0)}})]})});ToastViewport$1.displayName=VIEWPORT_NAME$2;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,onFocusFromOutsideViewport:a0,...i0}=r0,s0=useToastProviderContext(FOCUS_PROXY_NAME,n0);return jsxRuntimeExports.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...i0,ref:e0,style:{position:"fixed"},onFocus:o0=>{var u0;const l0=o0.relatedTarget;!((u0=s0.viewport)!=null&&u0.contains(l0))&&a0()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast$1=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,open:a0,defaultOpen:i0,onOpenChange:s0,...o0}=r0,[l0,c0]=useControllableState$1({prop:a0,defaultProp:i0??!0,onChange:s0,caller:TOAST_NAME});return jsxRuntimeExports.jsx(Presence,{present:n0||l0,children:jsxRuntimeExports.jsx(ToastImpl,{open:l0,...o0,ref:e0,onClose:()=>c0(!1),onPause:useCallbackRef$2(r0.onPause),onResume:useCallbackRef$2(r0.onResume),onSwipeStart:composeEventHandlers(r0.onSwipeStart,u0=>{u0.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(r0.onSwipeMove,u0=>{const{x:d0,y:h0}=u0.detail.delta;u0.currentTarget.setAttribute("data-swipe","move"),u0.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d0}px`),u0.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h0}px`)}
45),onSwipeCancel:composeEventHandlers(r0.onSwipeCancel,u0=>{u0.currentTarget.setAttribute("data-swipe","cancel"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(r0.onSwipeEnd,u0=>{const{x:d0,y:h0}=u0.detail.delta;u0.currentTarget.setAttribute("data-swipe","end"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u0.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u0.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d0}px`),u0.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h0}px`),c0(!1)})})})});Toast$1.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,type:a0="foreground",duration:i0,open:s0,onClose:o0,onEscapeKeyDown:l0,onPause:c0,onResume:u0,onSwipeStart:d0,onSwipeMove:h0,onSwipeCancel:f0,onSwipeEnd:p0,...A0}=r0,m0=useToastProviderContext(TOAST_NAME,n0),[x0,g0]=reactExports.useState(null),y0=useComposedRefs$1(e0,I0=>g0(I0)),b0=reactExports.useRef(null),E0=reactExports.useRef(null),w0=i0||m0.duration,v0=reactExports.useRef(0),S0=reactExports.useRef(w0),k0=reactExports.useRef(0),{onToastAdd:R0,onToastRemove:j0}=m0,C0=useCallbackRef$2(()=>{var M0;(x0==null?void 0:x0.contains(document.activeElement))&&((M0=m0.viewport)==null||M0.focus()),o0()}),$0=reactExports.useCallback(I0=>{!I0||I0===1/0||(window.clearTimeout(k0.current),v0.current=new Date().getTime(),k0.current=window.setTimeout(C0,I0))},[C0]);reactExports.useEffect(()=>{const I0=m0.viewport;if(I0){const M0=()=>{$0(S0.current),u0==null||u0()},N0=()=>{const D0=new Date().getTime()-v0.current;S0.current=S0.current-D0,window.clearTimeout(k0.current),c0==null||c0()};return I0.addEventListener(VIEWPORT_PAUSE,N0),I0.addEventListener(VIEWPORT_RESUME,M0),()=>{I0.removeEventListener(VIEWPORT_PAUSE,N0),I0.removeEventListener(VIEWPORT_RESUME,M0)}}},[m0.viewport,w0,c0,u0,$0]),reactExports.useEffect(()=>{s0&&!m0.isClosePausedRef.current&&$0(w0)},[s0,w0,m0.isClosePausedRef,$0]),reactExports.useEffect(()=>(R0(),()=>j0()),[R0,j0]);const T0=reactExports.useMemo(()=>x0?getAnnounceTextContent(x0):null,[x0]);return m0.viewport?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[T0&&jsxRuntimeExports.jsx(ToastAnnounce,{__scopeToast:n0,role:"status","aria-live":a0==="foreground"?"assertive":"polite","aria-atomic":!0,children:T0}),jsxRuntimeExports.jsx(ToastInteractiveProvider,{scope:n0,onClose:C0,children:reactDomExports.createPortal(jsxRuntimeExports.jsx(Collection$4.ItemSlot,{scope:n0,children:jsxRuntimeExports.jsx(Root$d,{asChild:!0,onEscapeKeyDown:composeEventHandlers(l0,()=>{m0.isFocusedToastEscapeKeyDownRef.current||C0(),m0.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntimeExports.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s0?"open":"closed","data-swipe-direction":m0.swipeDirection,...A0,ref:y0,style:{userSelect:"none",touchAction:"none",...r0.style},onKeyDown:composeEventHandlers(r0.onKeyDown,I0=>{I0.key==="Escape"&&(l0==null||l0(I0.nativeEvent),I0.nativeEvent.defaultPrevented||(m0.isFocusedToastEscapeKeyDownRef.current=!0,C0()))}),onPointerDown:composeEventHandlers(r0.onPointerDown,I0=>{I0.button===0&&(b0.current={x:I0.clientX,y:I0.clientY})}),onPointerMove:composeEventHandlers(r0.onPointerMove,I0=>{if(!b0.current)return;const M0=I0.clientX-b0.current.x,N0=I0.clientY-b0.current.y,D0=!!E0.current,O0=["left","right"].includes(m0.swipeDirection),B0=["left","up"].includes(m0.swipeDirection)?Math.min:Math.max,z0=O0?B0(0,M0):0,G0=O0?0:B0(0,N0),F0=I0.pointerType==="touch"?10:2,Q0={x:z0,y:G0},U0={originalEvent:I0,delta:Q0};D0?(E0.current=Q0,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,h0,U0,{discrete:!1})):isDeltaInDirection(Q0,m0.swipeDirection,F0)?(E0.current=Q0,handleAndDispatchCustomEvent(TOAST_SWIPE_START,d0,U0,{discrete:!1}),I0.target.setPointerCapture(I0.pointerId)):(Math.abs(M0)>F0||Math.abs(N0)>F0)&&(b0.current=null)}),onPointerUp:composeEventHandlers(r0.onPointerUp,I0=>{const M0=E0.current,N0=I0.target;if(N0.hasPointerCapture(I0.pointerId)&&N0.releasePointerCapture(I0.pointerId),E0.current=null,b0.current=null,M0){const D0=I0.currentTarget,O0={originalEvent:I0,delta:M0};isDeltaInDirection(M0,m0.swipeDirection,m0.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,p0,O0,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,f0,O0,{discrete:!0}),D0.addEventListener("click",B0=>B0.preventDefault(),{once:!0})}})})})}),m0.viewport)})]}):null}),ToastAnnounce=r0=>{const{__scopeToast:e0,children:n0,...a0}=r0,i0=useToastProviderContext(TOAST_NAME,e0),[s0,o0]=reactExports.useState(!1),[l0,c0]=reactExports.useState(!1);return useNextFrame(()=>o0(!0)),reactExports.useEffect(()=>{const u0=window.setTimeout(()=>c0(!0),1e3);return()=>window.clearTimeout(u0)},[]),l0?null:jsxRuntimeExports.jsx(Portal$5,{asChild:!0,children:jsxRuntimeExports.jsx(VisuallyHidden,{...a0,children:s0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[i0.label," ",n0]})})})},TITLE_NAME$2="ToastTitle",ToastTitle$1=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{...a0,ref:e0})});ToastTitle$1.displayName=TITLE_NAME$2;var DESCRIPTION_NAME$2="ToastDescription",ToastDescription$1=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{...a0,ref:e0})});ToastDescription$1.displayName=DESCRIPTION_NAME$2;
45var ACTION_NAME$1="ToastAction",ToastAction$1=reactExports.forwardRef((r0,e0)=>{const{altText:n0,...a0}=r0;return n0.trim()?jsxRuntimeExports.jsx(ToastAnnounceExclude,{altText:n0,asChild:!0,children:jsxRuntimeExports.jsx(ToastClose$1,{...a0,ref:e0})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME$1}\`. Expected non-empty \`string\`.`),null)});ToastAction$1.displayName=ACTION_NAME$1;var CLOSE_NAME$2="ToastClose",ToastClose$1=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,...a0}=r0,i0=useToastInteractiveContext(CLOSE_NAME$2,n0);return jsxRuntimeExports.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",...a0,ref:e0,onClick:composeEventHandlers(r0.onClick,i0.onClose)})})});ToastClose$1.displayName=CLOSE_NAME$2;var ToastAnnounceExclude=reactExports.forwardRef((r0,e0)=>{const{__scopeToast:n0,altText:a0,...i0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a0||void 0,...i0,ref:e0})});function getAnnounceTextContent(r0){const e0=[];return Array.from(r0.childNodes).forEach(a0=>{if(a0.nodeType===a0.TEXT_NODE&&a0.textContent&&e0.push(a0.textContent),isHTMLElement$1(a0)){const i0=a0.ariaHidden||a0.hidden||a0.style.display==="none",s0=a0.dataset.radixToastAnnounceExclude==="";if(!i0)if(s0){const o0=a0.dataset.radixToastAnnounceAlt;o0&&e0.push(o0)}else e0.push(...getAnnounceTextContent(a0))}}),e0}function handleAndDispatchCustomEvent(r0,e0,n0,{discrete:a0}){const i0=n0.originalEvent.currentTarget,s0=new CustomEvent(r0,{bubbles:!0,cancelable:!0,detail:n0});e0&&i0.addEventListener(r0,e0,{once:!0}),a0?dispatchDiscreteCustomEvent(i0,s0):i0.dispatchEvent(s0)}var isDeltaInDirection=(r0,e0,n0=0)=>{const a0=Math.abs(r0.x),i0=Math.abs(r0.y),s0=a0>i0;return e0==="left"||e0==="right"?s0&&a0>n0:!s0&&i0>n0};function useNextFrame(r0=()=>{}){const e0=useCallbackRef$2(r0);useLayoutEffect2(()=>{let n0=0,a0=0;return n0=window.requestAnimationFrame(()=>a0=window.requestAnimationFrame(e0)),()=>{window.cancelAnimationFrame(n0),window.cancelAnimationFrame(a0)}},[e0])}function isHTMLElement$1(r0){return r0.nodeType===r0.ELEMENT_NODE}function getTabbableCandidates$1(r0){const e0=[],n0=document.createTreeWalker(r0,NodeFilter.SHOW_ELEMENT,{acceptNode:a0=>{const i0=a0.tagName==="INPUT"&&a0.type==="hidden";return a0.disabled||a0.hidden||i0?NodeFilter.FILTER_SKIP:a0.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n0.nextNode();)e0.push(n0.currentNode);return e0}function focusFirst$3(r0){const e0=document.activeElement;return r0.some(n0=>n0===e0?!0:(n0.focus(),document.activeElement!==e0))}var Provider$1=ToastProvider$1,Viewport$2=ToastViewport$1,Root2$6=Toast$1,Title$1=ToastTitle$1,Description$1=ToastDescription$1,Action$2=ToastAction$1,Close$1=ToastClose$1;function r$1(r0){var e0,n0,a0="";if(typeof r0=="string"||typeof r0=="number")a0+=r0;else if(typeof r0=="object")if(Array.isArray(r0)){var i0=r0.length;for(e0=0;e0<i0;e0++)r0[e0]&&(n0=r$1(r0[e0]))&&(a0&&(a0+=" "),a0+=n0)}else for(n0 in r0)r0[n0]&&(a0&&(a0+=" "),a0+=n0);return a0}function clsx(){for(var r0,e0,n0=0,a0="",i0=arguments.length;n0<i0;
vendor: 4,933 bytes, lines 45-95
45n0++)(r0=arguments[n0])&&(e0=r$1(r0))&&(a0&&(a0+=" "),a0+=e0);return a0}const falsyToString=r0=>typeof r0=="boolean"?`${r0}`:r0===0?"0":r0,cx$1=clsx,cva=(r0,e0)=>n0=>{var a0;if((e0==null?void 0:e0.variants)==null)return cx$1(r0,n0==null?void 0:n0.class,n0==null?void 0:n0.className);const{variants:i0,defaultVariants:s0}=e0,o0=Object.keys(i0).map(u0=>{const d0=n0==null?void 0:n0[u0],h0=s0==null?void 0:s0[u0];if(d0===null)return null;const f0=falsyToString(d0)||falsyToString(h0);return i0[u0][f0]}),l0=n0&&Object.entries(n0).reduce((u0,d0)=>{let[h0,f0]=d0;return f0===void 0||(u0[h0]=f0),u0},{}),c0=e0==null||(a0=e0.compoundVariants)===null||a0===void 0?void 0:a0.reduce((u0,d0)=>{let{class:h0,className:f0,...p0}=d0;return Object.entries(p0).every(A0=>{let[m0,x0]=A0;return Array.isArray(x0)?x0.includes({...s0,...l0}[m0]):{...s0,...l0}[m0]===x0})?[...u0,h0,f0]:u0},[]);return cx$1(r0,o0,c0,n0==null?void 0:n0.class,n0==null?void 0:n0.className)};/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */const toKebabCase=r0=>r0.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mergeClasses=(...r0)=>r0.filter((e0,n0,a0)=>!!e0&&e0.trim()!==""&&a0.indexOf(e0)===n0).join(" ").trim();/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */var defaultAttributes={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"};/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Icon$1=reactExports.forwardRef(({color:r0="currentColor",size:e0=24,strokeWidth:n0=2,absoluteStrokeWidth:a0,className:i0="",children:s0,iconNode:o0,...l0},c0)=>reactExports.createElement("svg",{ref:c0,...defaultAttributes,width:e0,height:e0,stroke:r0,strokeWidth:a0?Number(n0)*24/Number(e0):n0,className:mergeClasses("lucide",i0),...l0},[...o0.map(([u0,d0])=>reactExports.createElement(u0,d0)),...Array.isArray(s0)?s0:[s0]]));/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const createLucideIcon=(r0,e0)=>{const n0=reactExports.forwardRef(({className:a0,...i0},s0)=>reactExports.createElement(Icon$1,{ref:s0,iconNode:e0,className:mergeClasses(`lucide-${toKebabCase(r0)}`,a0),...i0}));return n0.displayName=`${r0}`,n0};/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const ArrowLeft=createLucideIcon("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const ArrowRight=createLucideIcon("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const ArrowUpDown=createLucideIcon("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"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const Bell=createLucideIcon("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const BookUser=createLucideIcon("BookUser",[["path",{d:"M15 13a3 3 0 1 0-6 0",key:"10j68g"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Building2=createLucideIcon("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
95],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Calendar=createLucideIcon("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Check=createLucideIcon("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const ChevronDown=createLucideIcon("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const ChevronRight=createLucideIcon("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const ChevronUp=createLucideIcon("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const CircleAlert=createLucideIcon("CircleAlert",[["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"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const CircleCheckBig=createLucideIcon("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const CircleCheck=createLucideIcon("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const CircleX=createLucideIcon("CircleX",[["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"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const Circle=createLucideIcon("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const ClipboardPaste=createLucideIcon("ClipboardPaste",[["path",{d:"M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z",key:"1pp7kr"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10",key:"2ik1ml"}],["path",{d:"m17 10 4 4-4 4",key:"vp2hj1"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const Clipboard=createLucideIcon("Clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const Clock=createLucideIcon("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const Compass=createLucideIcon("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
165y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const Copy=createLucideIcon("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"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const Crown=createLucideIcon("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const Database=createLucideIcon("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"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const Disc3=createLucideIcon("Disc3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Download=createLucideIcon("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"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Ellipsis=createLucideIcon("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const ExternalLink=createLucideIcon("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"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Eye=createLucideIcon("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const FileAudio=createLucideIcon("FileAudio",[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const FileDown=createLucideIcon("FileDown",[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const FileQuestion=createLucideIcon("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",ke
220y:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const FileSearch=createLucideIcon("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const FileText=createLucideIcon("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"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const Files=createLucideIcon("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const Folder=createLucideIcon("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const Gauge=createLucideIcon("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const Globe=createLucideIcon("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"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const GripVertical=createLucideIcon("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const HardDrive=createLucideIcon("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const Hash$2=createLucideIcon("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"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const History=createLucideIcon("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const Instagram=createLucideIcon("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const Layers=createLucideIcon("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"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const LayoutDashboard=createLucideIcon("LayoutDashboard",[["re
285ct",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const Library=createLucideIcon("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const Lightbulb=createLucideIcon("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"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const Link2=createLucideIcon("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const Link=createLucideIcon("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const ListMusic=createLucideIcon("ListMusic",[["path",{d:"M21 15V6",key:"h1cx4g"}],["path",{d:"M18.5 18a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",key:"8saifv"}],["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const LoaderCircle=createLucideIcon("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const Lock=createLucideIcon("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const LogOut=createLucideIcon("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const Mail=createLucideIcon("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 331 * @license lucide-react v0.462.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const MicVocal=createLucideIcon("MicVocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]);/** 336 * @license lucide-react v0.462.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const Music2=createLucideIcon("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/** 341 * @license lucide-react v0.462.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const Music=createLucideIcon("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 346 * @license lucide-react v0.462.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const Pause=createLucideIcon("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 351 * @license lucide-react v0.462.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const Pencil=createLucideIcon("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Phone=createLucideIcon("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 361 * @license lucide-react v0.462.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const Piano=createLucideIcon("Piano",[["path",{d:"M18.5 8c-1.4 0-2.6-.8-3.2-2A6.87 6.87 0 0 0 2 9v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-8.5C22 9.6 20.4 8 18.5 8",ke
365y:"lag0yf"}],["path",{d:"M2 14h20",key:"myj16y"}],["path",{d:"M6 14v4",key:"9ng0ue"}],["path",{d:"M10 14v4",key:"1v8uk5"}],["path",{d:"M14 14v4",key:"1tqops"}],["path",{d:"M18 14v4",key:"18uqwm"}]]);/** 366 * @license lucide-react v0.462.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const Play=createLucideIcon("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 371 * @license lucide-react v0.462.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const Plus=createLucideIcon("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 376 * @license lucide-react v0.462.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const RefreshCw=createLucideIcon("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 381 * @license lucide-react v0.462.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const RotateCcw=createLucideIcon("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"}]]);/** 386 * @license lucide-react v0.462.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const RotateCw=createLucideIcon("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** 391 * @license lucide-react v0.462.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const Ruler=createLucideIcon("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** 396 * @license lucide-react v0.462.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const ScanLine=createLucideIcon("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/** 401 * @license lucide-react v0.462.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const Search=createLucideIcon("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 406 * @license lucide-react v0.462.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const Send=createLucideIcon("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 411 * @license lucide-react v0.462.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const Share2=createLucideIcon("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 416 * @license lucide-react v0.462.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const Shield=createLucideIcon("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",ke
420y:"oel41y"}]]);/** 421 * @license lucide-react v0.462.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const Sparkles=createLucideIcon("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 426 * @license lucide-react v0.462.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const SquarePen=createLucideIcon("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 431 * @license lucide-react v0.462.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const Tag=createLucideIcon("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"}]]);/** 436 * @license lucide-react v0.462.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const Trash2=createLucideIcon("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"}]]);/** 441 * @license lucide-react v0.462.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const TrendingUp=createLucideIcon("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"}]]);/** 446 * @license lucide-react v0.462.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const TriangleAlert=createLucideIcon("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 451 * @license lucide-react v0.462.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const Unlink=createLucideIcon("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);/** 456 * @license lucide-react v0.462.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const Upload=createLucideIcon("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"}]]);/** 461 * @license lucide-react v0.462.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const UserMinus=createLucideIcon("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 466 * @license lucide-react v0.462.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const UserPlus=createLucideIcon("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 471 * @license lucide-react v0.462.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const User=createLucideIcon("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 476 * @license lucide-react v0.462.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const Users=createLucideIcon("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 481 * @license lucide-react v0.462.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const Volume2=createLucideIcon("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** 486 * @license lucide-react v0.462.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const VolumeX=createLucideIcon("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** 491 * @license lucide-react v0.462.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const Wrench=createLucideIcon("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"}]]);/** 496 * @license lucide-react v0.462.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const X$2=createLucideIcon("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 10,220 bytes, lines 500-505
500],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 501 * @license lucide-react v0.462.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const Zap=createLucideIcon("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),CLASS_PART_SEPARATOR="-",createClassGroupUtils=r0=>{const e0=createClassMap(r0),{conflictingClassGroups:n0,conflictingClassGroupModifiers:a0}=r0;return{getClassGroupId:o0=>{const l0=o0.split(CLASS_PART_SEPARATOR);return l0[0]===""&&l0.length!==1&&l0.shift(),getGroupRecursive(l0,e0)||getGroupIdForArbitraryProperty(o0)},getConflictingClassGroupIds:(o0,l0)=>{const c0=n0[o0]||[];return l0&&a0[o0]?[...c0,...a0[o0]]:c0}}},getGroupRecursive=(r0,e0)=>{var o0;if(r0.length===0)return e0.classGroupId;const n0=r0[0],a0=e0.nextPart.get(n0),i0=a0?getGroupRecursive(r0.slice(1),a0):void 0;if(i0)return i0;if(e0.validators.length===0)return;const s0=r0.join(CLASS_PART_SEPARATOR);return(o0=e0.validators.find(({validator:l0})=>l0(s0)))==null?void 0:o0.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=r0=>{if(arbitraryPropertyRegex.test(r0)){const e0=arbitraryPropertyRegex.exec(r0)[1],n0=e0==null?void 0:e0.substring(0,e0.indexOf(":"));if(n0)return"arbitrary.."+n0}},createClassMap=r0=>{const{theme:e0,prefix:n0}=r0,a0={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(r0.classGroups),n0).forEach(([s0,o0])=>{processClassesRecursively(o0,a0,s0,e0)}),a0},processClassesRecursively=(r0,e0,n0,a0)=>{r0.forEach(i0=>{if(typeof i0=="string"){const s0=i0===""?e0:getPart(e0,i0);s0.classGroupId=n0;return}if(typeof i0=="function"){if(isThemeGetter(i0)){processClassesRecursively(i0(a0),e0,n0,a0);return}e0.validators.push({validator:i0,classGroupId:n0});return}Object.entries(i0).forEach(([s0,o0])=>{processClassesRecursively(o0,getPart(e0,s0),n0,a0)})})},getPart=(r0,e0)=>{let n0=r0;return e0.split(CLASS_PART_SEPARATOR).forEach(a0=>{n0.nextPart.has(a0)||n0.nextPart.set(a0,{nextPart:new Map,validators:[]}),n0=n0.nextPart.get(a0)}),n0},isThemeGetter=r0=>r0.isThemeGetter,getPrefixedClassGroupEntries=(r0,e0)=>e0?r0.map(([n0,a0])=>{const i0=a0.map(s0=>typeof s0=="string"?e0+s0:typeof s0=="object"?Object.fromEntries(Object.entries(s0).map(([o0,l0])=>[e0+o0,l0])):s0);return[n0,i0]}):r0,createLruCache=r0=>{if(r0<1)return{get:()=>{},set:()=>{}};let e0=0,n0=new Map,a0=new Map;const i0=(s0,o0)=>{n0.set(s0,o0),e0++,e0>r0&&(e0=0,a0=n0,n0=new Map)};return{get(s0){let o0=n0.get(s0);if(o0!==void 0)return o0;if((o0=a0.get(s0))!==void 0)return i0(s0,o0),o0},set(s0,o0){n0.has(s0)?n0.set(s0,o0):i0(s0,o0)}}},IMPORTANT_MODIFIER="!",createParseClassName=r0=>{const{separator:e0,experimentalParseClassName:n0}=r0,a0=e0.length===1,i0=e0[0],s0=e0.length,o0=l0=>{const c0=[];let u0=0,d0=0,h0;for(let x0=0;x0<l0.length;x0++){let g0=l0[x0];if(u0===0){if(g0===i0&&(a0||l0.slice(x0,x0+s0)===e0)){c0.push(l0.slice(d0,x0)),d0=x0+s0;continue}if(g0==="/"){h0=x0;continue}}g0==="["?u0++:g0==="]"&&u0--}const f0=c0.length===0?l0:l0.substring(d0),p0=f0.startsWith(IMPORTANT_MODIFIER),A0=p0?f0.substring(1):f0,m0=h0&&h0>d0?h0-d0:void 0;return{modifiers:c0,hasImportantModifier:p0,baseClassName:A0,maybePostfixModifierPosition:m0}};return n0?l0=>n0({className:l0,parseClassName:o0}):o0},sortModifiers=r0=>{if(r0.length<=1)return r0;const e0=[];let n0=[];return r0.forEach(a0=>{a0[0]==="["?(e0.push(...n0.sort(),a0),n0=[]):n0.push(a0)}),e0.push(...n0.sort()),e0},createConfigUtils=r0=>({cache:createLruCache(r0.cacheSize),parseClassName:createParseClassName(r0),...createClassGroupUtils(r0)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(r0,e0)=>{const{parseClassName:n0,getClassGroupId:a0,getConflictingClassGroupIds:i0}=e0,s0=[],o0=r0.trim().split(SPLIT_CLASSES_REGEX);let l0="";for(let c0=o0.length-1;c0>=0;c0-=1){const u0=o0[c0],{modifiers:d0,hasImportantModifier:h0,baseClassName:f0,maybePostfixModifierPosition:p0}=n0(u0);let A0=!!p0,m0=a0(A0?f0.substring(0,p0):f0);if(!m0){if(!A0){l0=u0+(l0.length>0?" "+l0:l0);continue}if(m0=a0(f0),!m0){l0=u0+(l0.length>0?" "+l0:l0);continue}A0=!1}const x0=sortModifiers(d0).join(":"),g0=h0?x0+IMPORTANT_MODIFIER:x0,y0=g0+m0;if(s0.includes(y0))continue;s0.push(y0);const b0=i0(m0,A0);for(let E0=0;E0<b0.length;++E0){const w0=b0[E0];s0.push(g0+w0)}l0=u0+(l0.length>0?" "+l0:l0)}return l0};function twJoin(){let r0=0,e0,n0,a0="";for(;r0<arguments.length;)(e0=arguments[r0++])&&(n0=toValue(e0))&&(a0&&(a0+=" "),a0+=n0);return a0}const toValue=r0=>{if(typeof r0=="string")return r0;let e0,n0="";for(let a0=0;a0<r0.length;a0++)r0[a0]&&(e0=toValue(r0[a0]))&&(n0&&(n0+=" "),n0+=e0);return n0};function createTailwindMerge(r0,...e0){let n0,a0,i0,s0=o0;function o0(c0){const u0=e0.reduce((d0,h0)=>h0(d0),r0());return n0=createConfigUtils(u0),a0=n0.cache.get,i0=n0.cache.set,s0=l0,l0(c0)}function l0(c0){const u0=a0(c0);if(u0)return u0;const d0=mergeClassList(c0,n0);return i0(c0,d0),d0}return function(){return s0(twJoin.apply(null,arguments))}}const fromTheme=r0=>{const e0=n0=>n0[r0]||[];return e0.isThemeGetter=!0,e0},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength$4=r0=>isNumber$5(r0)||stringLengths.has(r0)||fractionRegex.test(r0),isArbitraryLength=r0=>getIsArbitraryValue(r0,"length",isLengthOnly),isNumber$5=r0=>!!r0&&!Number.isNaN(Number(r0)),isArbitraryNumber=r0=>getIsArbitraryValue(r0,"number",isNumber$5),isInteger=r0=>!!r0&&Number.isInteger(Number(r0)),isPercent$1=r0=>r0.endsWith("%")&&isNumber$5(r0.slice(0,-1)),isArbitraryValue=r0=>arbitraryValueRegex.test(r0),isTshirtSize=r0=>tshirtUnitRegex.test(r0),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=r0=>getIsArbitraryValue(r0,sizeLabels,isNever),isArbitraryPosition=r0=>getIsArbitraryValue(r0,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=r0=>getIsArbitraryValue(r0,imageLabels,isImage),isArbitraryShadow=r0=>getIsArbitraryValue(r0,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(r0,e0,n0)=>{const a0=arbitraryValueRegex.exec(r0);return a0?a0[1]?typeof e0=="string"?a0[1]===e0:e0.has(a0[1]):n0(a0[2]):!1},isLengthOnly=r0=>lengthUnitRegex.test(r0)&&!colorFunctionRegex.test(r0),isNever=()=>!1,isShadow=r0=>shadowRegex.test(r0),isImage=r0=>imageRegex.test(r0),getDefaultConfig=()=>{const r0=fromTheme("colors"),e0=fromTheme("spacing"),n0=fromTheme("blur"),a0=fromTheme("brightness"),i0=fromTheme("borderColor"),s0=fromTheme("borderRadius"),o0=fromTheme("borderSpacing"),l0=fromTheme("borderWidth"),c0=fromTheme("contrast"),u0=fromTheme("grayscale"),d0=fromTheme("hueRotate"),h0=fromTheme("invert"),f0=fromTheme("gap"),p0=fromTheme("gradientColorStops"),A0=fromTheme("gradientColorStopPositions"),m0=fromTheme("inset"),x0=fromTheme("margin"),g0=fromTheme("opacity"),y0=fromTheme("padding"),b0=fromTheme("saturate"),E0=fromTheme("scale"),w0=fromTheme("sepia"),v0=fromTheme("skew"),S0=fromTheme("space"),k0=fromTheme("translate"),R0=()=>["auto","contain","none"],j0=()=>["auto","hidden","clip","visible","scroll"],C0=()=>["auto",isArbitraryValue,e0],$0=()=>[isArbitraryValue,e0],T0=()=>["",isLength$4,isArbitraryLength],I0=()=>["auto",isNumber$5,isArbitraryValue],M0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N0=()=>["solid","dashed","dotted","double","none"],D0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O0=()=>["start","end","center","between","around","evenly","stretch"],B0=()=>["","0",isArbitraryValue],z0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G0=()=>[isNumber$5,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength$4,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:G0(),borderColor:[r0],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:$0(),borderWidth:T0(),contrast:G0(),grayscale:B0(),hueRotate:G0(),invert:B0(),gap:$0(),gradientColorStops:[r0],gradientColorStopPositions:[isPercent$1,isArbitraryLength],inset:C0(),margin:C0(),opacity:G0(),padding:$0(),saturate:G0(),scale:G0(),sepia:B0(),skew:G0(),space:$0(),translate:$0()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":z0()}],"break-before":[{"break-before":z0()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M0(),isArbitraryValue]}],overflow:[{overflow:j0()}],"overflow-x":[{"overflow-x":j0()}],"overflow-y":[{"overflow-y":j0()}],overscroll:[{overscroll:R0()}],"overscroll-x":[{"overscroll-x":R0()}],"overscroll-y":[{"overscroll-y":R0()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m0]}],"inset-x":[{"inset-x":[m0]}],"inset-y":[{"inset-y":[m0]}],start:[{start:[m0]}],end:[{end:[m0]}],top:[{top:[m0]}
vendor: 11,244 bytes, line 505
505],right:[{right:[m0]}],bottom:[{bottom:[m0]}],left:[{left:[m0]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:C0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:B0()}],shrink:[{shrink:B0()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":I0()}],"col-end":[{"col-end":I0()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":I0()}],"row-end":[{"row-end":I0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[f0]}],"gap-x":[{"gap-x":[f0]}],"gap-y":[{"gap-y":[f0]}],"justify-content":[{justify:["normal",...O0()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O0(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O0(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y0]}],px:[{px:[y0]}],py:[{py:[y0]}],ps:[{ps:[y0]}],pe:[{pe:[y0]}],pt:[{pt:[y0]}],pr:[{pr:[y0]}],pb:[{pb:[y0]}],pl:[{pl:[y0]}],m:[{m:[x0]}],mx:[{mx:[x0]}],my:[{my:[x0]}],ms:[{ms:[x0]}],me:[{me:[x0]}],mt:[{mt:[x0]}],mr:[{mr:[x0]}],mb:[{mb:[x0]}],ml:[{ml:[x0]}],"space-x":[{"space-x":[S0]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S0]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,e0]}],"min-w":[{"min-w":[isArbitraryValue,e0,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,e0,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,e0,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,e0,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,e0,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,e0,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$5,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength$4,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r0]}],"placeholder-opacity":[{"placeholder-opacity":[g0]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r0]}],"text-opacity":[{"text-opacity":[g0]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N0(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength$4,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength$4,isArbitraryValue]}],"text-decoration-color":[{decoration:[r0]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g0]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M0(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[r0]}],"gradient-from-pos":[{from:[A0]}],"gradient-via-pos":[{via:[A0]}],"gradient-to-pos":[{to:[A0]}],"gradient-from":[{from:[p0]}],"gradient-via":[{via:[p0]}],"gradient-to":[{to:[p0]}],rounded:[{rounded:[s0]}],"rounded-s":[{"rounded-s":[s0]}],"rounded-e":[{"rounded-e":[s0]}],"rounded-t":[{"rounded-t":[s0]}],"rounded-r":[{"rounded-r":[s0]}],"rounded-b":[{"rounded-b":[s0]}],"rounded-l":[{"rounded-l":[s0]}],"rounded-ss":[{"rounded-ss":[s0]}],"rounded-se":[{"rounded-se":[s0]}],"rounded-ee":[{"rounded-ee":[s0]}],"rounded-es":[{"rounded-es":[s0]}],"rounded-tl":[{"rounded-tl":[s0]}],"rounded-tr":[{"rounded-tr":[s0]}],"rounded-br":[{"rounded-br":[s0]}],"rounded-bl":[{"rounded-bl":[s0]}],"border-w":[{border:[l0]}],"border-w-x":[{"border-x":[l0]}],"border-w-y":[{"border-y":[l0]}],"border-w-s":[{"border-s":[l0]}],"border-w-e":[{"border-e":[l0]}],"border-w-t":[{"border-t":[l0]}],"border-w-r":[{"border-r":[l0]}],"border-w-b":[{"border-b":[l0]}],"border-w-l":[{"border-l":[l0]}],"border-opacity":[{"border-opacity":[g0]}],"border-style":[{border:[...N0(),"hidden"]}],"divide-x":[{"divide-x":[l0]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l0]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g0]}],"divide-style":[{divide:N0()}],"border-color":[{border:[i0]}],"border-color-x":[{"border-x":[i0]}],"border-color-y":[{"border-y":[i0]}],"border-color-s":[{"border-s":[i0]}],"border-color-e":[{"border-e":[i0]}],"border-color-t":[{"border-t":[i0]}],"border-color-r":[{"border-r":[i0]}],"border-color-b":[{"border-b":[i0]}],"border-color-l":[{"border-l":[i0]}],"divide-color":[{divide:[i0]}],"outline-style":[{outline:["",...N0()]}],"outline-offset":[{"outline-offset":[isLength$4,isArbitraryValue]}],"outline-w":[{outline:[isLength$4,isArbitraryLength]}],"outline-color":[{outline:[r0]}],"ring-w":[{ring:T0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r0]}],"ring-opacity":[{"ring-opacity":[g0]}],"ring-offset-w":[{"ring-offset":[isLength$4,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[r0]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[g0]}],"mix-blend":[{"mix-blend":[...D0(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D0()}],filter:[{filter:["","none"]}],blur:[{blur:[n0]}],brightness:[{brightness:[a0]}],contrast:[{contrast:[c0]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[u0]}],"hue-rotate":[{"hue-rotate":[d0]}],invert:[{invert:[h0]}],saturate:[{saturate:[b0]}],sepia:[{sepia:[w0]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n0]}],"backdrop-brightness":[{"backdrop-brightness":[a0]}],"backdrop-contrast":[{"backdrop-contrast":[c0]}],"backdrop-grayscale":[{"backdrop-grayscale":[u0]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d0]}],"backdrop-invert":[{"backdrop-invert":[h0]}],"backdrop-opacity":[{"backdrop-opacity":[g0]}],"backdrop-saturate":[{"backdrop-saturate":[b0]}],"backdrop-sepia":[{"backdrop-sepia":[w0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o0]}],"border-spacing-x":[{"border-spacing-x":[o0]}],"border-spacing-y":[{"border-spacing-y":[o0]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:G0()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:G0()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E0]}],"scale-x":[{"scale-x":[E0]}],"scale-y":[{"scale-y":[E0]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[k0]}],"translate-y":[{"translate-y":[k0]}],"skew-x":[{"skew-x":[v0]}],"skew-y":[{"skew-y":[v0]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",r0]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[r0]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$0()}],"scroll-mx":[{"scroll-mx":$0()}],"scroll-my":[{"scroll-my":$0()}],"scroll-ms":[{"scroll-ms":$0()}],"scroll-me":[{"scroll-me":$0()}],"scroll-mt":[{"scroll-mt":$0()}],"scroll-mr":[{"scroll-mr":$0()}],"scroll-mb":[{"scroll-mb":$0()}],"scroll-ml":[{"scroll-ml":$0()}],"scroll-p":[{"scroll-p":$0()}],"scroll-px":[{"scroll-px":$0()}],"scroll-py":[{"scroll-py":$0()}],"scroll-ps":[{"scroll-ps":$0()}],"scroll-pe":[{"scroll-pe":$0()}],"scroll-pt":[{"scroll-pt":$0()}],"scroll-pr":[{"scroll-pr":$0()}],"scroll-pb":[{"scroll-pb":$0()}],"scroll-pl":[{"scroll-pl":$0()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[r0,"none"]}],"stroke-w":[{stroke:[isLength$4,isArbitraryLength,isArbitraryNumber]}
505],stroke:[{stroke:[r0,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...r0){return twMerge(clsx(r0))}const ToastProvider=Provider$1,ToastViewport=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Viewport$2,{ref:n0,className:cn$1("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r0),...e0}));ToastViewport.displayName=Viewport$2.displayName;const toastVariants=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Toast=reactExports.forwardRef(({className:r0,variant:e0,...n0},a0)=>jsxRuntimeExports.jsx(Root2$6,{ref:a0,className:cn$1(toastVariants({variant:e0}),r0),...n0}));Toast.displayName=Root2$6.displayName;const ToastAction=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Action$2,{ref:n0,className:cn$1("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",r0),...e0}));
505ToastAction.displayName=Action$2.displayName;const ToastClose=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Close$1,{ref:n0,className:cn$1("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r0),"toast-close":"",...e0,children:jsxRuntimeExports.jsx(X$2,{className:"h-4 w-4"})}));ToastClose.displayName=Close$1.displayName;const ToastTitle=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Title$1,{ref:n0,className:cn$1("text-sm font-semibold",r0),...e0}));ToastTitle.displayName=Title$1.displayName;const ToastDescription=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Description$1,{ref:n0,className:cn$1("text-sm opacity-90",r0),...e0}));ToastDescription.displayName=Description$1.displayName;function Toaster$1(){const{toasts:r0}=useToast();return jsxRuntimeExports.jsxs(ToastProvider,{children:[r0.map(function({id:e0,title:n0,description:a0,action:i0,...s0}){return jsxRuntimeExports.jsxs(Toast,{...s0,children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[n0&&jsxRuntimeExports.jsx(ToastTitle,{children:n0}),a0&&jsxRuntimeExports.jsx(ToastDescription,{children:a0})]}),i0,jsxRuntimeExports.jsx(ToastClose,{})]},e0)}),jsxRuntimeExports.jsx(ToastViewport,{})]})}var P$3=["light","dark"],E$2="(prefers-color-scheme: dark)",L$2=reactExports.createContext(void 0),D$2={setTheme:r0=>{},themes:[]},j$1=()=>{var r0;return(r0=reactExports.useContext(L$2))!=null?r0:D$2};reactExports.memo(({forcedTheme:r0,storageKey:e0,attribute:n0,enableSystem:a0,enableColorScheme:i0,defaultTheme:s0,value:o0,attrs:l0,nonce:c0})=>{let u0=s0==="system",d0=n0==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l0.map(A0=>`'${A0}'`).join(",")})`};`:`var d=document.documentElement,n='${n0}',s='setAttribute';`,h0=i0?P$3.includes(s0)&&s0?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s0}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f0=(A0,m0=!1,x0=!0)=>{let g0=o0?o0[A0]:A0,y0=m0?A0+"|| ''":`'${g0}'`,b0="";return i0&&x0&&!m0&&P$3.includes(A0)&&(b0+=`d.style.colorScheme = '${A0}';`),n0==="class"?m0||g0?b0+=`c.add(${y0})`:b0+="null":g0&&(b0+=`d[s](n,${y0})`),b0},p0=r0?`!function(){${d0}${f0(r0)}}()`:a0?`!function(){try{${d0}var e=localStorage.getItem('${e0}');if('system'===e||(!e&&${u0})){var t='${E$2}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f0("dark")}}else{${f0("light")}}}else if(e){${o0?`var x=${JSON.stringify(o0)};`:""}${f0(o0?"x[e]":"e",!0)}}${u0?"":"else{"+f0(s0,!1,!1)+"}"}${h0}}catch(e){}}()`:`!function(){try{${d0}var e=localStorage.getItem('${e0}');if(e){${o0?`var x=${JSON.stringify(o0)};`:""}${f0(o0?"x[e]":"e",!0)}}else{${f0(s0,!1,!1)};}${h0}}catch(t){}}();`;return reactExports.createElement("script",{nonce:c0,dangerouslySetInnerHTML:{__html:p0}})});var jt$1=r0=>{switch(r0){case"success":return ee$2;case"info":return ae$1;case"warning":return oe$1;case"error":return se$1;default:return null}},te$1=Array(12).fill(0),Yt$1=({visible:r0,className:e0})=>React__default.createElement("div",{className:["sonner-loading-wrapper",e0].filter(Boolean).join(" "),"data-visible":r0},React__default.createElement("div",{className:"sonner-spinner"},te$1.map((n0,a0)=>React__default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a0}`})))),ee$2=React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React__default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oe$1=React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},React__default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ae$1=React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React__default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),se$1=React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React__default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ot$1=React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},React__default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),React__default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ft$1=()=>{let[r0,e0]=React__default.useState(document.hidden);return React__default.useEffect(()=>{let n0=()=>{e0(document.hidden)};return document.addEventListener("visibilitychange",n0),()=>window.removeEventListener("visibilitychange",n0)},[]),r0},bt$1=1,yt$1=class{constructor(){this.subscribe=e0=>(this.subscribers.push(e0),()=>{let n0=this.subscribers.indexOf(e0);this.subscribers.splice(n0,1)}),this.publish=e0=>
505{this.subscribers.forEach(n0=>n0(e0))},this.addToast=e0=>{this.publish(e0),this.toasts=[...this.toasts,e0]},this.create=e0=>{var n0;let{message:a0,...i0}=e0,s0=typeof(e0==null?void 0:e0.id)=="number"||((n0=e0.id)==null?void 0:n0.length)>0?e0.id:bt$1++,o0=this.toasts.find(c0=>c0.id===s0),l0=e0.dismissible===void 0?!0:e0.dismissible;return this.dismissedToasts.has(s0)&&this.dismissedToasts.delete(s0),o0?this.toasts=this.toasts.map(c0=>c0.id===s0?(this.publish({...c0,...e0,id:s0,title:a0}),{...c0,...e0,id:s0,dismissible:l0,title:a0}):c0):this.addToast({title:a0,...i0,dismissible:l0,id:s0}),s0},this.dismiss=e0=>(this.dismissedToasts.add(e0),e0||this.toasts.forEach(n0=>{this.subscribers.forEach(a0=>a0({id:n0.id,dismiss:!0}))}),this.subscribers.forEach(n0=>n0({id:e0,dismiss:!0})),e0),this.message=(e0,n0)=>this.create({...n0,message:e0}),this.error=(e0,n0)=>this.create({...n0,message:e0,type:"error"}),this.success=(e0,n0)=>this.create({...n0,type:"success",message:e0}),this.info=(e0,n0)=>this.create({...n0,type:"info",message:e0}),this.warning=(e0,n0)=>this.create({...n0,type:"warning",message:e0}),this.loading=(e0,n0)=>this.create({...n0,type:"loading",message:e0}),this.promise=(e0,n0)=>{if(!n0)return;let a0;n0.loading!==void 0&&(a0=this.create({...n0,promise:e0,type:"loading",message:n0.loading,description:typeof n0.description!="function"?n0.description:void 0}));let i0=e0 instanceof Promise?e0:e0(),s0=a0!==void 0,o0,l0=i0.then(async u0=>{if(o0=["resolve",u0],React__default.isValidElement(u0))s0=!1,this.create({id:a0,type:"default",message:u0});else if(ie$1(u0)&&!u0.ok){s0=!1;let d0=typeof n0.error=="function"?await n0.error(`HTTP error! status: ${u0.status}`):n0.error,h0=typeof n0.description=="function"?await n0.description(`HTTP error! status: ${u0.status}`):n0.description;this.create({id:a0,type:"error",message:d0,description:h0})}else if(n0.success!==void 0){s0=!1;let d0=typeof n0.success=="function"?await n0.success(u0):n0.success,h0=typeof n0.description=="function"?await n0.description(u0):n0.description;this.create({id:a0,type:"success",message:d0,description:h0})}}).catch(async u0=>{if(o0=["reject",u0],n0.error!==void 0){s0=!1;let d0=typeof n0.error=="function"?await n0.error(u0):n0.error,h0=typeof n0.description=="function"?await n0.description(u0):n0.description;this.create({id:a0,type:"error",message:d0,description:h0})}}).finally(()=>{var u0;s0&&(this.dismiss(a0),a0=void 0),(u0=n0.finally)==null||u0.call(n0)}),c0=()=>new Promise((u0,d0)=>l0.then(()=>o0[0]==="reject"?d0(o0[1]):u0(o0[1])).catch(d0));return typeof a0!="string"&&typeof a0!="number"?{unwrap:c0}:Object.assign(a0,{unwrap:c0})},this.custom=(e0,n0)=>{let a0=(n0==null?void 0:n0.id)||bt$1++;return this.create({jsx:e0(a0),id:a0,...n0}),a0},this.getActiveToasts=()=>this.toasts.filter(e0=>!this.dismissedToasts.has(e0.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},v$2=new yt$1,ne$1=(r0,e0)=>{let n0=(e0==null?void 0:e0.id)||bt$1++;return v$2.addToast({title:r0,...e0,id:n0}),n0},ie$1=r0=>r0&&typeof r0=="object"&&"ok"in r0&&typeof r0.ok=="boolean"&&"status"in r0&&typeof r0.status=="number",le$2=ne$1,ce$2=()=>v$2.toasts,de$2=()=>v$2.getActiveToasts(),ue$2=Object.assign(le$2,{success:v$2.success,info:v$2.info,warning:v$2.warning,error:v$2.error,custom:v$2.custom,message:v$2.message,promise:v$2.promise,dismiss:v$2.dismiss,loading:v$2.loading},{getHistory:ce$2,getToasts:de$2});function wt$1(r0,{insertAt:e0}={}){if(typeof document>"u")return;let n0=document.head||document.getElementsByTagName("head")[0],a0=document.createElement("style");a0.type="text/css",e0==="top"&&n0.firstChild?n0.insertBefore(a0,n0.firstChild):n0.appendChild(a0),a0.styleSheet?a0.styleSheet.cssText=r0:a0.appendChild(document.createTextNode(r0))}wt$1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
505left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
505:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
505--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 506`);function tt$1(r0){return r0.label!==void 0}var pe$2=3,me$2="32px",ge$1="16px",Wt$1=4e3,he$2=356,be$2=14,ye$2=20,we$2=200;function M$1(...r0){return r0.filter(Boolean).join(" ")}function xe$2(r0){let[e0,n0]=r0.split("-"),a0=[];return e0&&a0.push(e0),n0&&a0.push(n0),a0}var ve$2=r0=>{var e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0;let{invert:f0,toast:p0,unstyled:A0,interacting:m0,setHeights:x0,visibleToasts:g0,heights:y0,index:b0,toasts:E0,expanded:w0,removeToast:v0,defaultRichColors:S0,closeButton:k0,style:R0,cancelButtonStyle:j0,actionButtonStyle:C0,className:$0="",descriptionClassName:T0="",duration:I0,position:M0,gap:N0,loadingIcon:D0,expandByDefault:O0,classNames:B0,icons:z0,closeButtonAriaLabel:G0="Close toast",pauseWhenPageIsHidden:F0}=r0,[Q0,U0]=React__default.useState(null),[q0,Rw]=React__default.useState(null),[_w,J0]=React__default.useState(!1),[Cw,Ow]=React__default.useState(!1),[jw,Nw]=React__default.useState(!1),[xw,X0]=React__default.useState(!1),[Lw,Hw]=React__default.useState(!1),[Ww,r1]=React__default.useState(0),[Yw,l1]=React__default.useState(0),p1=React__default.useRef(p0.duration||I0||Wt$1),Pw=React__default.useRef(null),Qw=React__default.useRef(null),Xw=b0===0,f1=b0+1<=g0,u1=p0.type,W0=p0.dismissible!==!1,P0=p0.className||"",L0=p0.descriptionClassName||"",Z0=React__default.useMemo(()=>y0.findIndex(a1=>a1.toastId===p0.id)||0,[y0,p0.id]),$w=React__default.useMemo(()=>{var a1;return(a1=p0.closeButton)!=null?a1:k0},[p0.closeButton,k0]),Bw=React__default.useMemo(()=>p0.duration||I0||Wt$1,[p0.duration,I0]),Vw=React__default.useRef(0),Dw=React__default.useRef(0),Kw=React__default.useRef(0),i1=React__default.useRef(null),[m1,qw]=M0.split("-"),y1=React__default.useMemo(()=>y0.reduce((a1,h1,Y0)=>Y0>=Z0?a1:a1+h1.height,0),[y0,Z0]),S1=Ft$1(),_1=p0.invert||f0,g1=u1==="loading";Dw.current=React__default.useMemo(()=>Z0*N0+y1,[Z0,y1]),React__default.useEffect(()=>{p1.current=Bw},[Bw]),React__default.useEffect(()=>{J0(!0)},[]),React__default.useEffect(()=>{let a1=Qw.current;if(a1){let h1=a1.getBoundingClientRect().height;return l1(h1),x0(Y0=>[{toastId:p0.id,height:h1,position:p0.position},...Y0]),()=>x0(Y0=>Y0.filter(Tw=>Tw.toastId!==p0.id))}},[x0,p0.id]),React__default.useLayoutEffect(()=>{if(!_w)return;let a1=Qw.current,h1=a1.style.height;a1.style.height="auto";let Y0=a1.getBoundingClientRect().height;a1.style.height=h1,l1(Y0),x0(Tw=>Tw.find(Mw=>Mw.toastId===p0.id)?Tw.map(Mw=>Mw.toastId===p0.id?{...Mw,height:Y0}:Mw):[{toastId:p0.id,height:Y0,position:p0.position},...Tw])},[_w,p0.title,p0.description,x0,p0.id]);let C1=React__default.useCallback(()=>{Ow(!0),r1(Dw.current),x0(a1=>a1.filter(h1=>h1.toastId!==p0.id)),setTimeout(()=>{v0(p0)},we$2)},[p0,v0,x0,Dw]);React__default.useEffect(()=>{if(p0.promise&&u1==="loading"||p0.duration===1/0||p0.type==="loading")return;let a1;return w0||m0||F0&&S1?(()=>
506{if(Kw.current<Vw.current){let h1=new Date().getTime()-Vw.current;p1.current=p1.current-h1}Kw.current=new Date().getTime()})():p1.current!==1/0&&(Vw.current=new Date().getTime(),a1=setTimeout(()=>{var h1;(h1=p0.onAutoClose)==null||h1.call(p0,p0),C1()},p1.current)),()=>clearTimeout(a1)},[w0,m0,p0,u1,F0,S1,C1]),React__default.useEffect(()=>{p0.delete&&C1()},[C1,p0.delete]);function M1(){var a1,h1,Y0;return z0!=null&&z0.loading?React__default.createElement("div",{className:M$1(B0==null?void 0:B0.loader,(a1=p0==null?void 0:p0.classNames)==null?void 0:a1.loader,"sonner-loader"),"data-visible":u1==="loading"},z0.loading):D0?React__default.createElement("div",{className:M$1(B0==null?void 0:B0.loader,(h1=p0==null?void 0:p0.classNames)==null?void 0:h1.loader,"sonner-loader"),"data-visible":u1==="loading"},D0):React__default.createElement(Yt$1,{className:M$1(B0==null?void 0:B0.loader,(Y0=p0==null?void 0:p0.classNames)==null?void 0:Y0.loader),visible:u1==="loading"})}return React__default.createElement("li",{tabIndex:0,ref:Qw,className:M$1($0,P0,B0==null?void 0:B0.toast,(e0=p0==null?void 0:p0.classNames)==null?void 0:e0.toast,B0==null?void 0:B0.default,B0==null?void 0:B0[u1],(n0=p0==null?void 0:p0.classNames)==null?void 0:n0[u1]),"data-sonner-toast":"","data-rich-colors":(a0=p0.richColors)!=null?a0:S0,"data-styled":!(p0.jsx||p0.unstyled||A0),"data-mounted":_w,"data-promise":!!p0.promise,"data-swiped":Lw,"data-removed":Cw,"data-visible":f1,"data-y-position":m1,"data-x-position":qw,"data-index":b0,"data-front":Xw,"data-swiping":jw,"data-dismissible":W0,"data-type":u1,"data-invert":_1,"data-swipe-out":xw,"data-swipe-direction":q0,"data-expanded":!!(w0||O0&&_w),style:{"--index":b0,"--toasts-before":b0,"--z-index":E0.length-b0,"--offset":`${Cw?Ww:Dw.current}px`,"--initial-height":O0?"auto":`${Yw}px`,...R0,...p0.style},onDragEnd:()=>{Nw(!1),U0(null),i1.current=null},onPointerDown:a1=>{g1||!W0||(Pw.current=new Date,r1(Dw.current),a1.target.setPointerCapture(a1.pointerId),a1.target.tagName!=="BUTTON"&&(Nw(!0),i1.current={x:a1.clientX,y:a1.clientY}))},onPointerUp:()=>{var a1,h1,Y0,Tw;if(xw||!W0)return;i1.current=null;let Mw=Number(((a1=Qw.current)==null?void 0:a1.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Uw=Number(((h1=Qw.current)==null?void 0:h1.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Fw=new Date().getTime()-((Y0=Pw.current)==null?void 0:Y0.getTime()),Jw=Q0==="x"?Mw:Uw,s1=Math.abs(Jw)/Fw;if(Math.abs(Jw)>=ye$2||s1>.11){r1(Dw.current),(Tw=p0.onDismiss)==null||Tw.call(p0,p0),Rw(Q0==="x"?Mw>0?"right":"left":Uw>0?"down":"up"),C1(),X0(!0),Hw(!1);return}Nw(!1),U0(null)},onPointerMove:a1=>{var h1,Y0,Tw,Mw;if(!i1.current||!W0||((h1=window.getSelection())==null?void 0:h1.toString().length)>0)return;let Uw=a1.clientY-i1.current.y,Fw=a1.clientX-i1.current.x,Jw=(Y0=r0.swipeDirections)!=null?Y0:xe$2(M0);!Q0&&(Math.abs(Fw)>1||Math.abs(Uw)>1)&&U0(Math.abs(Fw)>Math.abs(Uw)?"x":"y");let s1={x:0,y:0};Q0==="y"?(Jw.includes("top")||Jw.includes("bottom"))&&(Jw.includes("top")&&Uw<0||Jw.includes("bottom")&&Uw>0)&&(s1.y=Uw):Q0==="x"&&(Jw.includes("left")||Jw.includes("right"))&&(Jw.includes("left")&&Fw<0||Jw.includes("right")&&Fw>0)&&(s1.x=Fw),(Math.abs(s1.x)>0||Math.abs(s1.y)>0)&&Hw(!0),(Tw=Qw.current)==null||Tw.style.setProperty("--swipe-amount-x",`${s1.x}px`),(Mw=Qw.current)==null||Mw.style.setProperty("--swipe-amount-y",`${s1.y}px`)}},$w&&!p0.jsx?React__default.createElement("button",{"aria-label":G0,"data-disabled":g1,"data-close-button":!0,onClick:g1||!W0?()=>{}:()=>{var a1;C1(),(a1=p0.onDismiss)==null||a1.call(p0,p0)},className:M$1(B0==null?void 0:B0.closeButton,(i0=p0==null?void 0:p0.classNames)==null?void 0:i0.closeButton)},(s0=z0==null?void 0:z0.close)!=null?s0:Ot$1):null,p0.jsx||reactExports.isValidElement(p0.title)?p0.jsx?p0.jsx:typeof p0.title=="function"?p0.title():p0.title:React__default.createElement(React__default.Fragment,null,u1||p0.icon||p0.promise?React__default.createElement("div",{"data-icon":"",className:M$1(B0==null?void 0:B0.icon,(o0=p0==null?void 0:p0.classNames)==null?void 0:o0.icon)},p0.promise||p0.type==="loading"&&!p0.icon?p0.icon||M1():null,p0.type!=="loading"?p0.icon||(z0==null?void 0:z0[u1])||jt$1(u1):null):null,React__default.createElement("div",{"data-content":"",className:M$1(B0==null?void 0:B0.content,(l0=p0==null?void 0:p0.classNames)==null?void 0:l0.content)},React__default.createElement("div",{"data-title":"",className:M$1(B0==null?void 0:B0.title,(c0=p0==null?void 0:p0.classNames)==null?void 0:c0.title)},typeof p0.title=="function"?p0.title():p0.title),p0.description?React__default.createElement("div",{"data-description":"",className:M$1(T0,L0,B0==null?void 0:B0.description,(u0=p0==null?void 0:p0.classNames)==null?void 0:u0.description)},typeof p0.description=="function"?p0.description():p0.description):null),reactExports.isValidElement(p0.cancel)?p0.cancel:p0.cancel&&tt$1(p0.cancel)?React__default.createElement("button",{"data-button":!0,"data-cancel":!0,style:p0.cancelButtonStyle||j0,onClick:a1=>{var h1,Y0;
vendor: 6,709 bytes, line 506
506tt$1(p0.cancel)&&W0&&((Y0=(h1=p0.cancel).onClick)==null||Y0.call(h1,a1),C1())},className:M$1(B0==null?void 0:B0.cancelButton,(d0=p0==null?void 0:p0.classNames)==null?void 0:d0.cancelButton)},p0.cancel.label):null,reactExports.isValidElement(p0.action)?p0.action:p0.action&&tt$1(p0.action)?React__default.createElement("button",{"data-button":!0,"data-action":!0,style:p0.actionButtonStyle||C0,onClick:a1=>{var h1,Y0;tt$1(p0.action)&&((Y0=(h1=p0.action).onClick)==null||Y0.call(h1,a1),!a1.defaultPrevented&&C1())},className:M$1(B0==null?void 0:B0.actionButton,(h0=p0==null?void 0:p0.classNames)==null?void 0:h0.actionButton)},p0.action.label):null))};function _t$1(){if(typeof window>"u"||typeof document>"u")return"ltr";let r0=document.documentElement.getAttribute("dir");return r0==="auto"||!r0?window.getComputedStyle(document.documentElement).direction:r0}function Te$2(r0,e0){let n0={};return[r0,e0].forEach((a0,i0)=>{let s0=i0===1,o0=s0?"--mobile-offset":"--offset",l0=s0?ge$1:me$2;function c0(u0){["top","right","bottom","left"].forEach(d0=>{n0[`${o0}-${d0}`]=typeof u0=="number"?`${u0}px`:u0})}typeof a0=="number"||typeof a0=="string"?c0(a0):typeof a0=="object"?["top","right","bottom","left"].forEach(u0=>{a0[u0]===void 0?n0[`${o0}-${u0}`]=l0:n0[`${o0}-${u0}`]=typeof a0[u0]=="number"?`${a0[u0]}px`:a0[u0]}):c0(l0)}),n0}var $e$1=reactExports.forwardRef(function(r0,e0){let{invert:n0,position:a0="bottom-right",hotkey:i0=["altKey","KeyT"],expand:s0,closeButton:o0,className:l0,offset:c0,mobileOffset:u0,theme:d0="light",richColors:h0,duration:f0,style:p0,visibleToasts:A0=pe$2,toastOptions:m0,dir:x0=_t$1(),gap:g0=be$2,loadingIcon:y0,icons:b0,containerAriaLabel:E0="Notifications",pauseWhenPageIsHidden:w0}=r0,[v0,S0]=React__default.useState([]),k0=React__default.useMemo(()=>Array.from(new Set([a0].concat(v0.filter(F0=>F0.position).map(F0=>F0.position)))),[v0,a0]),[R0,j0]=React__default.useState([]),[C0,$0]=React__default.useState(!1),[T0,I0]=React__default.useState(!1),[M0,N0]=React__default.useState(d0!=="system"?d0:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D0=React__default.useRef(null),O0=i0.join("+").replace(/Key/g,"").replace(/Digit/g,""),B0=React__default.useRef(null),z0=React__default.useRef(!1),G0=React__default.useCallback(F0=>{S0(Q0=>{var U0;return(U0=Q0.find(q0=>q0.id===F0.id))!=null&&U0.delete||v$2.dismiss(F0.id),Q0.filter(({id:q0})=>q0!==F0.id)})},[]);return React__default.useEffect(()=>v$2.subscribe(F0=>{if(F0.dismiss){S0(Q0=>Q0.map(U0=>U0.id===F0.id?{...U0,delete:!0}:U0));return}setTimeout(()=>{ReactDOM.flushSync(()=>{S0(Q0=>{let U0=Q0.findIndex(q0=>q0.id===F0.id);return U0!==-1?[...Q0.slice(0,U0),{...Q0[U0],...F0},...Q0.slice(U0+1)]:[F0,...Q0]})})})}),[]),React__default.useEffect(()=>{if(d0!=="system"){N0(d0);return}if(d0==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?N0("dark"):N0("light")),typeof window>"u")return;let F0=window.matchMedia("(prefers-color-scheme: dark)");try{F0.addEventListener("change",({matches:Q0})=>{N0(Q0?"dark":"light")})}catch{F0.addListener(({matches:U0})=>{try{N0(U0?"dark":"light")}catch(q0){console.error(q0)}})}},[d0]),React__default.useEffect(()=>{v0.length<=1&&$0(!1)},[v0]),React__default.useEffect(()=>{let F0=Q0=>{var U0,q0;i0.every(Rw=>Q0[Rw]||Q0.code===Rw)&&($0(!0),(U0=D0.current)==null||U0.focus()),Q0.code==="Escape"&&(document.activeElement===D0.current||(q0=D0.current)!=null&&q0.contains(document.activeElement))&&$0(!1)};return document.addEventListener("keydown",F0),()=>document.removeEventListener("keydown",F0)},[i0]),React__default.useEffect(()=>{if(D0.current)return()=>{B0.current&&(B0.current.focus({preventScroll:!0}),B0.current=null,z0.current=!1)}},[D0.current]),React__default.createElement("section",{ref:e0,"aria-label":`${E0} ${O0}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k0.map((F0,Q0)=>{var U0;let[q0,Rw]=F0.split("-");return v0.length?React__default.createElement("ol",{key:F0,dir:x0==="auto"?_t$1():x0,tabIndex:-1,ref:D0,className:l0,"data-sonner-toaster":!0,"data-theme":M0,"data-y-position":q0,"data-lifted":C0&&v0.length>1&&!s0,"data-x-position":Rw,style:{"--front-toast-height":`${((U0=R0[0])==null?void 0:U0.height)||0}px`,"--width":`${he$2}px`,"--gap":`${g0}px`,...p0,...Te$2(c0,u0)},onBlur:_w=>{z0.current&&!_w.currentTarget.contains(_w.relatedTarget)&&(z0.current=!1,B0.current&&(B0.current.focus({preventScroll:!0}),B0.current=null))},onFocus:_w=>{_w.target instanceof HTMLElement&&_w.target.dataset.dismissible==="false"||z0.current||(z0.current=!0,B0.current=_w.relatedTarget)},onMouseEnter:()=>$0(!0),onMouseMove:()=>$0(!0),onMouseLeave:()=>{T0||$0(!1)},onDragEnd:()=>$0(!1),onPointerDown:_w=>{_w.target instanceof HTMLElement&&_w.target.dataset.dismissible==="false"||I0(!0)},onPointerUp:()=>I0(!1)},v0.filter(_w=>!_w.position&&Q0===0||_w.position===F0).map((_w,J0)=>{var Cw,Ow;return React__default.createElement(ve$2,{key:_w.id,icons:b0,index:J0,toast:_w,defaultRichColors:h0,duration:(Cw=m0==null?void 0:m0.duration)!=null?Cw:f0,className:m0==null?void 0:m0.className,descriptionClassName:m0==null?void 0:m0.descriptionClassName,invert:n0,visibleToasts:A0,closeButton:(Ow=m0==null?void 0:m0.closeButton)!=null?Ow:o0,interacting:T0,position:F0,style:m0==null?void 0:m0.style,unstyled:m0==null?void 0:m0.unstyled,classNames:m0==null?void 0:m0.classNames,cancelButtonStyle:m0==null?void 0:m0.cancelButtonStyle,actionButtonStyle:m0==null?void 0:m0.actionButtonStyle,removeToast:G0,toasts:v0.filter(jw=>jw.position==_w.position),heights:R0.filter(jw=>jw.position==_w.position),setHeights:j0,expandByDefault:s0,gap:g0,loadingIcon:y0,expanded:C0,pauseWhenPageIsHidden:w0,swipeDirections:r0.swipeDirections})})):null}))});const Toaster=({...r0})=>{const{theme:e0="system"}=j$1();return jsxRuntimeExports.jsx($e$1,{theme:e0,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...r0})};var useReactId=React$1[" useId ".trim().toString()]||(()=>{}),count$1=0;function useId(r0){const[e0,n0]=reactExports.useState(useReactId());return useLayoutEffect2(()=>{n0(a0=>a0??String(count$1++))},[r0]),e0?`radix-${e0}`:""}const sides=["top","right","bottom","left"],min$3=Math.min,max$3=Math.max,round$1=Math.round,floor=Math.floor,createCoords=r0=>({x:r0,y:r0}
vendor: 14,845 bytes, line 506
506),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(r0,e0,n0){return max$3(r0,min$3(e0,n0))}function evaluate(r0,e0){return typeof r0=="function"?r0(e0):r0}function getSide(r0){return r0.split("-")[0]}function getAlignment(r0){return r0.split("-")[1]}function getOppositeAxis(r0){return r0==="x"?"y":"x"}function getAxisLength(r0){return r0==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(r0){return yAxisSides.has(getSide(r0))?"y":"x"}function getAlignmentAxis(r0){return getOppositeAxis(getSideAxis(r0))}function getAlignmentSides(r0,e0,n0){n0===void 0&&(n0=!1);const a0=getAlignment(r0),i0=getAlignmentAxis(r0),s0=getAxisLength(i0);let o0=i0==="x"?a0===(n0?"end":"start")?"right":"left":a0==="start"?"bottom":"top";return e0.reference[s0]>e0.floating[s0]&&(o0=getOppositePlacement(o0)),[o0,getOppositePlacement(o0)]}function getExpandedPlacements(r0){const e0=getOppositePlacement(r0);return[getOppositeAlignmentPlacement(r0),e0,getOppositeAlignmentPlacement(e0)]}function getOppositeAlignmentPlacement(r0){return r0.replace(/start|end/g,e0=>oppositeAlignmentMap[e0])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(r0,e0,n0){switch(r0){case"top":case"bottom":return n0?e0?rlPlacement:lrPlacement:e0?lrPlacement:rlPlacement;case"left":case"right":return e0?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(r0,e0,n0,a0){const i0=getAlignment(r0);let s0=getSideList(getSide(r0),n0==="start",a0);return i0&&(s0=s0.map(o0=>o0+"-"+i0),e0&&(s0=s0.concat(s0.map(getOppositeAlignmentPlacement)))),s0}function getOppositePlacement(r0){return r0.replace(/left|right|bottom|top/g,e0=>oppositeSideMap[e0])}function expandPaddingObject(r0){return{top:0,right:0,bottom:0,left:0,...r0}}function getPaddingObject(r0){return typeof r0!="number"?expandPaddingObject(r0):{top:r0,right:r0,bottom:r0,left:r0}}function rectToClientRect(r0){const{x:e0,y:n0,width:a0,height:i0}=r0;return{width:a0,height:i0,top:n0,left:e0,right:e0+a0,bottom:n0+i0,x:e0,y:n0}}function computeCoordsFromPlacement(r0,e0,n0){let{reference:a0,floating:i0}=r0;const s0=getSideAxis(e0),o0=getAlignmentAxis(e0),l0=getAxisLength(o0),c0=getSide(e0),u0=s0==="y",d0=a0.x+a0.width/2-i0.width/2,h0=a0.y+a0.height/2-i0.height/2,f0=a0[l0]/2-i0[l0]/2;let p0;switch(c0){case"top":p0={x:d0,y:a0.y-i0.height};break;case"bottom":p0={x:d0,y:a0.y+a0.height};break;case"right":p0={x:a0.x+a0.width,y:h0};break;case"left":p0={x:a0.x-i0.width,y:h0};break;default:p0={x:a0.x,y:a0.y}}switch(getAlignment(e0)){case"start":p0[o0]-=f0*(n0&&u0?-1:1);break;case"end":p0[o0]+=f0*(n0&&u0?-1:1);break}return p0}const computePosition$1=async(r0,e0,n0)=>{const{placement:a0="bottom",strategy:i0="absolute",middleware:s0=[],platform:o0}=n0,l0=s0.filter(Boolean),c0=await(o0.isRTL==null?void 0:o0.isRTL(e0));let u0=await o0.getElementRects({reference:r0,floating:e0,strategy:i0}),{x:d0,y:h0}=computeCoordsFromPlacement(u0,a0,c0),f0=a0,p0={},A0=0;for(let m0=0;m0<l0.length;m0++){const{name:x0,fn:g0}=l0[m0],{x:y0,y:b0,data:E0,reset:w0}=await g0({x:d0,y:h0,initialPlacement:a0,placement:f0,strategy:i0,middlewareData:p0,rects:u0,platform:o0,elements:{reference:r0,floating:e0}});d0=y0??d0,h0=b0??h0,p0={...p0,[x0]:{...p0[x0],...E0}},w0&&A0<=50&&(A0++,typeof w0=="object"&&(w0.placement&&(f0=w0.placement),w0.rects&&(u0=w0.rects===!0?await o0.getElementRects({reference:r0,floating:e0,strategy:i0}):w0.rects),{x:d0,y:h0}=computeCoordsFromPlacement(u0,f0,c0)),m0=-1)}return{x:d0,y:h0,placement:f0,strategy:i0,middlewareData:p0}};async function detectOverflow(r0,e0){var n0;e0===void 0&&(e0={});const{x:a0,y:i0,platform:s0,rects:o0,elements:l0,strategy:c0}=r0,{boundary:u0="clippingAncestors",rootBoundary:d0="viewport",elementContext:h0="floating",altBoundary:f0=!1,padding:p0=0}=evaluate(e0,r0),A0=getPaddingObject(p0),x0=l0[f0?h0==="floating"?"reference":"floating":h0],g0=rectToClientRect(await s0.getClippingRect({element:(n0=await(s0.isElement==null?void 0:s0.isElement(x0)))==null||n0?x0:x0.contextElement||await(s0.getDocumentElement==null?void 0:s0.getDocumentElement(l0.floating)),boundary:u0,rootBoundary:d0,strategy:c0})),y0=h0==="floating"?{x:a0,y:i0,width:o0.floating.width,height:o0.floating.height}:o0.reference,b0=await(s0.getOffsetParent==null?void 0:s0.getOffsetParent(l0.floating)),E0=await(s0.isElement==null?void 0:s0.isElement(b0))?await(s0.getScale==null?void 0:s0.getScale(b0))||{x:1,y:1}:{x:1,y:1},w0=rectToClientRect(s0.convertOffsetParentRelativeRectToViewportRelativeRect?await s0.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l0,rect:y0,offsetParent:b0,strategy:c0}):y0);return{top:(g0.top-w0.top+A0.top)/E0.y,bottom:(w0.bottom-g0.bottom+A0.bottom)/E0.y,left:(g0.left-w0.left+A0.left)/E0.x,right:(w0.right-g0.right+A0.right)/E0.x}}const arrow$3=r0=>({name:"arrow",options:r0,async fn(e0){const{x:n0,y:a0,placement:i0,rects:s0,platform:o0,elements:l0,middlewareData:c0}=e0,{element:u0,padding:d0=0}=evaluate(r0,e0)||{};if(u0==null)return{};const h0=getPaddingObject(d0),f0={x:n0,y:a0},p0=getAlignmentAxis(i0),A0=getAxisLength(p0),m0=await o0.getDimensions(u0),x0=p0==="y",g0=x0?"top":"left",y0=x0?"bottom":"right",b0=x0?"clientHeight":"clientWidth",E0=s0.reference[A0]+s0.reference[p0]-f0[p0]-s0.floating[A0],w0=f0[p0]-s0.reference[p0],v0=await(o0.getOffsetParent==null?void 0:o0.getOffsetParent(u0));let S0=v0?v0[b0]:0;(!S0||!await(o0.isElement==null?void 0:o0.isElement(v0)))&&(S0=l0.floating[b0]||s0.floating[A0]);const k0=E0/2-w0/2,R0=S0/2-m0[A0]/2-1,j0=min$3(h0[g0],R0),C0=min$3(h0[y0],R0),$0=j0,T0=S0-m0[A0]-C0,I0=S0/2-m0[A0]/2+k0,M0=clamp$1($0,I0,T0),N0=!c0.arrow&&getAlignment(i0)!=null&&I0!==M0&&s0.reference[A0]/2-(I0<$0?j0:C0)-m0[A0]/2<0,D0=N0?I0<$0?I0-$0:I0-T0:0;return{[p0]:f0[p0]+D0,data:{[p0]:M0,centerOffset:I0-M0-D0,...N0&&{alignmentOffset:D0}},reset:N0}}}),flip$2=function(r0){return r0===void 0&&(r0={}),{name:"flip",options:r0,async fn(e0){var n0,a0;const{placement:i0,middlewareData:s0,rects:o0,initialPlacement:l0,platform:c0,elements:u0}=e0,{mainAxis:d0=!0,crossAxis:h0=!0,fallbackPlacements:f0,fallbackStrategy:p0="bestFit",fallbackAxisSideDirection:A0="none",flipAlignment:m0=!0,...x0}=evaluate(r0,e0);if((n0=s0.arrow)!=null&&n0.alignmentOffset)return{};const g0=getSide(i0),y0=getSideAxis(l0),b0=getSide(l0)===l0,E0=await(c0.isRTL==null?void 0:c0.isRTL(u0.floating)),w0=f0||(b0||!m0?[getOppositePlacement(l0)]:getExpandedPlacements(l0)),v0=A0!=="none";!f0&&v0&&w0.push(...getOppositeAxisPlacements(l0,m0,A0,E0));const S0=[l0,...w0],k0=await detectOverflow(e0,x0),R0=[];let j0=((a0=s0.flip)==null?void 0:a0.overflows)||[];if(d0&&R0.push(k0[g0]),h0){const I0=getAlignmentSides(i0,o0,E0);R0.push(k0[I0[0]],k0[I0[1]])}if(j0=[...j0,{placement:i0,overflows:R0}],!R0.every(I0=>I0<=0)){var C0,$0;const I0=(((C0=s0.flip)==null?void 0:C0.index)||0)+1,M0=S0[I0];if(M0&&(!(h0==="alignment"?y0!==getSideAxis(M0):!1)||j0.every(O0=>O0.overflows[0]>0&&getSideAxis(O0.placement)===y0)))return{data:{index:I0,overflows:j0},reset:{placement:M0}};let N0=($0=j0.filter(D0=>D0.overflows[0]<=0).sort((D0,O0)=>D0.overflows[1]-O0.overflows[1])[0])==null?void 0:$0.placement;if(!N0)switch(p0){case"bestFit":{var T0;const D0=(T0=j0.filter(O0=>{if(v0){const B0=getSideAxis(O0.placement);return B0===y0||B0==="y"}return!0}).map(O0=>[O0.placement,O0.overflows.filter(B0=>B0>0).reduce((B0,z0)=>B0+z0,0)]).sort((O0,B0)=>O0[1]-B0[1])[0])==null?void 0:T0[0];D0&&(N0=D0);break}case"initialPlacement":N0=l0;break}if(i0!==N0)return{reset:{placement:N0}}}return{}}}};function getSideOffsets(r0,e0){return{top:r0.top-e0.height,right:r0.right-e0.width,bottom:r0.bottom-e0.height,left:r0.left-e0.width}}function isAnySideFullyClipped(r0){return sides.some(e0=>r0[e0]>=0)}const hide$2=function(r0){return r0===void 0&&(r0={}),{name:"hide",options:r0,async fn(e0){const{rects:n0}=e0,{strategy:a0="referenceHidden",...i0}=evaluate(r0,e0);switch(a0){case"referenceHidden":{const s0=await detectOverflow(e0,{...i0,elementContext:"reference"}),o0=getSideOffsets(s0,n0.reference);return{data:{referenceHiddenOffsets:o0,referenceHidden:isAnySideFullyClipped(o0)}}}case"escaped":{const s0=await detectOverflow(e0,{...i0,altBoundary:!0}),o0=getSideOffsets(s0,n0.floating);return{data:{escapedOffsets:o0,escaped:isAnySideFullyClipped(o0)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(r0,e0){const{placement:n0,platform:a0,elements:i0}=r0,s0=await(a0.isRTL==null?void 0:a0.isRTL(i0.floating)),o0=getSide(n0),l0=getAlignment(n0),c0=getSideAxis(n0)==="y",u0=originSides.has(o0)?-1:1,d0=s0&&c0?-1:1,h0=evaluate(e0,r0);let{mainAxis:f0,crossAxis:p0,alignmentAxis:A0}=typeof h0=="number"?{mainAxis:h0,crossAxis:0,alignmentAxis:null}:{mainAxis:h0.mainAxis||0,crossAxis:h0.crossAxis||0,alignmentAxis:h0.alignmentAxis};return l0&&typeof A0=="number"&&(p0=l0==="end"?A0*-1:A0),c0?{x:p0*d0,y:f0*u0}:{x:f0*u0,y:p0*d0}}const offset$2=function(r0){return r0===void 0&&(r0=0),{name:"offset",options:r0,async fn(e0){var n0,a0;const{x:i0,y:s0,placement:o0,middlewareData:l0}=e0,c0=await convertValueToCoords(e0,r0);return o0===((n0=l0.offset)==null?void 0:n0.placement)&&(a0=l0.arrow)!=null&&a0.alignmentOffset?{}:{x:i0+c0.x,y:s0+c0.y,data:{...c0,placement:o0}}}}},shift$2=function(r0){return r0===void 0&&(r0={}),{name:"shift",options:r0,async fn(e0){const{x:n0,y:a0,placement:i0}=e0,{mainAxis:s0=!0,crossAxis:o0=!1,limiter:l0={fn:x0=>{let{x:g0,y:y0}=x0;return{x:g0,y:y0}}},...c0}=evaluate(r0,e0),u0={x:n0,y:a0},d0=await detectOverflow(e0,c0),h0=getSideAxis(getSide(i0)),f0=getOppositeAxis(h0);let p0=u0[f0],A0=u0[h0];if(s0){const x0=f0==="y"?"top":"left",g0=f0==="y"?"bottom":"right",y0=p0+d0[x0],b0=p0-d0[g0];p0=clamp$1(y0,p0,b0)}if(o0){const x0=h0==="y"?"top":"left",g0=h0==="y"?"bottom":"right",y0=A0+d0[x0],b0=A0-d0[g0];A0=clamp$1(y0,A0,b0)}const m0=l0.fn({...e0,[f0]:p0,[h0]:A0});return{...m0,data:{x:m0.x-n0,y:m0.y-a0,enabled:{[f0]:s0,[h0]:o0}}}}}},limitShift$2=function(r0){return r0===void 0&&(r0={}),{options:r0,fn(e0){const{x:n0,y:a0,placement:i0,rects:s0,middlewareData:o0}=e0,{offset:l0=0,mainAxis:c0=!0,crossAxis:u0=!0}=evaluate(r0,e0),d0={x:n0,y:a0},h0=getSideAxis(i0),f0=getOppositeAxis(h0);let p0=d0[f0],A0=d0[h0];const m0=evaluate(l0,e0),x0=typeof m0=="number"?{mainAxis:m0,crossAxis:0}:{mainAxis:0,crossAxis:0,...m0};if(c0){const b0=f0==="y"?"height":"width",E0=s0.reference[f0]-s0.floating[b0]+x0.mainAxis,w0=s0.reference[f0]+s0.reference[b0]-x0.mainAxis;p0<E0?p0=E0:p0>w0&&(p0=w0)}if(u0){var g0,y0;const b0=f0==="y"?"width":"height",E0=originSides.has(getSide(i0)),w0=s0.reference[h0]-s0.floating[b0]+(E0&&((g0=o0.offset)==null?void 0:g0[h0])||0)+(E0?0:x0.crossAxis),v0=s0.reference[h0]+s0.reference[b0]+(E0?0:((y0=o0.offset)==null?void 0:y0[h0])||0)-(E0?x0.crossAxis:0);A0<w0?A0=w0:A0>v0&&(A0=v0)}return{[f0]:p0,[h0]:A0}}}},size$2=function(r0){return r0===void 0&&(r0={}),{name:"size",options:r0,async fn(e0){var n0,a0;const{placement:i0,rects:s0,platform:o0,elements:l0}=e0,{apply:c0=()=>{},...u0}=evaluate(r0,e0),d0=await detectOverflow(e0,u0),h0=getSide(i0),f0=getAlignment(i0),p0=getSideAxis(i0)==="y",{width:A0,height:m0}=s0.floating;let x0,g0;h0==="top"||h0==="bottom"?(x0=h0,g0=f0===(await(o0.isRTL==null?void 0:o0.isRTL(l0.floating))?"start":"end")?"left":"right"):(g0=h0,x0=f0==="end"?"top":"bottom");const y0=m0-d0.top-d0.bottom,b0=A0-d0.left-d0.right,E0=min$3(m0-d0[x0],y0),w0=min$3(A0-d0[g0],b0),v0=!e0.middlewareData.shift;let S0=E0,k0=w0;if((n0=e0.middlewareData.shift)!=null&&n0.enabled.x&&(k0=b0),(a0=e0.middlewareData.shift)!=null&&a0.enabled.y&&(S0=y0),v0&&!f0){const j0=max$3(d0.left,0),C0=max$3(d0.right,0),$0=max$3(d0.top,0),T0=max$3(d0.bottom,0);p0?k0=A0-2*(j0!==0||C0!==0?j0+C0:max$3(d0.left,d0.right)):S0=m0-2*($0!==0||T0!==0?$0+T0:max$3(d0.top,d0.bottom))}await c0({...e0,availableWidth:k0,availableHeight:S0});const R0=await o0.getDimensions(l0.floating);return A0!==R0.width||m0!==R0.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(r0){return isNode(r0)?(r0.nodeName||"").toLowerCase():"#document"}function getWindow(r0){var e0;return(r0==null||(e0=r0.ownerDocument)==null?void 0:e0.defaultView)||window}function getDocumentElement(r0){var e0;return(e0=(isNode(r0)?r0.ownerDocument:r0.document)||window.document)==null?void 0:e0.documentElement}function isNode(r0){return hasWindow()?r0 instanceof Node||r0 instanceof getWindow(r0).Node:!1}function isElement(r0){return hasWindow()?r0 instanceof Element||r0 instanceof getWindow(r0).Element:!1}function isHTMLElement(r0){return hasWindow()?r0 instanceof HTMLElement||r0 instanceof getWindow(r0).HTMLElement:!1}function isShadowRoot(r0){return!hasWindow()||typeof ShadowRoot>"u"?!1:r0 instanceof ShadowRoot||r0 instanceof getWindow(r0).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(r0){const{overflow:e0,overflowX:n0,overflowY:a0,display:i0}=getComputedStyle$1(r0);return/auto|scroll|overlay|hidden|clip/.test(e0+a0+n0)&&!invalidOverflowDisplayValues.has(i0)}const tableElements=new Set(["table","td","th"]);function isTableElement(r0){return tableElements.has(getNodeName(r0))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(r0){return topLayerSelectors.some(e0=>{try{return r0.matches(e0)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(r0){const e0=isWebKit(),n0=isElement(r0)?getComputedStyle$1(r0):r0;return transformProperties.some(a0=>n0[a0]?n0[a0]!=="none":!1)||(n0.containerType?n0.containerType!=="normal":!1)||!e0&&(n0.backdropFilter?n0.backdropFilter!=="none":!1)||!e0&&(n0.filter?n0.filter!=="none":!1)||willChangeValues.some(a0=>(n0.willChange||"").includes(a0))||containValues.some(a0=>(n0.contain||"").includes(a0))}function getContainingBlock(r0){let e0=getParentNode(r0);for(;isHTMLElement(e0)&&!isLastTraversableNode(e0);){if(isContainingBlock(e0))return e0;if(isTopLayer(e0))return null;e0=getParentNode(e0)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(r0){return lastTraversableNodeNames.has(getNodeName(r0))}function getComputedStyle$1(r0){return getWindow(r0).getComputedStyle(r0)}function getNodeScroll(r0){return isElement(r0)?{scrollLeft:r0.scrollLeft,scrollTop:r0.scrollTop}:{scrollLeft:r0.scrollX,scrollTop:r0.scrollY}}function getParentNode(r0){if(getNodeName(r0)==="html")return r0;
vendor: 4,286 bytes, line 506
506const e0=r0.assignedSlot||r0.parentNode||isShadowRoot(r0)&&r0.host||getDocumentElement(r0);return isShadowRoot(e0)?e0.host:e0}function getNearestOverflowAncestor(r0){const e0=getParentNode(r0);return isLastTraversableNode(e0)?r0.ownerDocument?r0.ownerDocument.body:r0.body:isHTMLElement(e0)&&isOverflowElement(e0)?e0:getNearestOverflowAncestor(e0)}function getOverflowAncestors(r0,e0,n0){var a0;e0===void 0&&(e0=[]),n0===void 0&&(n0=!0);const i0=getNearestOverflowAncestor(r0),s0=i0===((a0=r0.ownerDocument)==null?void 0:a0.body),o0=getWindow(i0);if(s0){const l0=getFrameElement(o0);return e0.concat(o0,o0.visualViewport||[],isOverflowElement(i0)?i0:[],l0&&n0?getOverflowAncestors(l0):[])}return e0.concat(i0,getOverflowAncestors(i0,[],n0))}function getFrameElement(r0){return r0.parent&&Object.getPrototypeOf(r0.parent)?r0.frameElement:null}function getCssDimensions(r0){const e0=getComputedStyle$1(r0);let n0=parseFloat(e0.width)||0,a0=parseFloat(e0.height)||0;const i0=isHTMLElement(r0),s0=i0?r0.offsetWidth:n0,o0=i0?r0.offsetHeight:a0,l0=round$1(n0)!==s0||round$1(a0)!==o0;return l0&&(n0=s0,a0=o0),{width:n0,height:a0,$:l0}}function unwrapElement(r0){return isElement(r0)?r0:r0.contextElement}function getScale(r0){const e0=unwrapElement(r0);if(!isHTMLElement(e0))return createCoords(1);const n0=e0.getBoundingClientRect(),{width:a0,height:i0,$:s0}=getCssDimensions(e0);let o0=(s0?round$1(n0.width):n0.width)/a0,l0=(s0?round$1(n0.height):n0.height)/i0;return(!o0||!Number.isFinite(o0))&&(o0=1),(!l0||!Number.isFinite(l0))&&(l0=1),{x:o0,y:l0}}const noOffsets=createCoords(0);function getVisualOffsets(r0){const e0=getWindow(r0);return!isWebKit()||!e0.visualViewport?noOffsets:{x:e0.visualViewport.offsetLeft,y:e0.visualViewport.offsetTop}}function shouldAddVisualOffsets(r0,e0,n0){return e0===void 0&&(e0=!1),!n0||e0&&n0!==getWindow(r0)?!1:e0}function getBoundingClientRect(r0,e0,n0,a0){e0===void 0&&(e0=!1),n0===void 0&&(n0=!1);const i0=r0.getBoundingClientRect(),s0=unwrapElement(r0);let o0=createCoords(1);e0&&(a0?isElement(a0)&&(o0=getScale(a0)):o0=getScale(r0));const l0=shouldAddVisualOffsets(s0,n0,a0)?getVisualOffsets(s0):createCoords(0);let c0=(i0.left+l0.x)/o0.x,u0=(i0.top+l0.y)/o0.y,d0=i0.width/o0.x,h0=i0.height/o0.y;if(s0){const f0=getWindow(s0),p0=a0&&isElement(a0)?getWindow(a0):a0;let A0=f0,m0=getFrameElement(A0);for(;m0&&a0&&p0!==A0;){const x0=getScale(m0),g0=m0.getBoundingClientRect(),y0=getComputedStyle$1(m0),b0=g0.left+(m0.clientLeft+parseFloat(y0.paddingLeft))*x0.x,E0=g0.top+(m0.clientTop+parseFloat(y0.paddingTop))*x0.y;c0*=x0.x,u0*=x0.y,d0*=x0.x,h0*=x0.y,c0+=b0,u0+=E0,A0=getWindow(m0),m0=getFrameElement(A0)}}return rectToClientRect({width:d0,height:h0,x:c0,y:u0})}function getWindowScrollBarX(r0,e0){const n0=getNodeScroll(r0).scrollLeft;return e0?e0.left+n0:getBoundingClientRect(getDocumentElement(r0)).left+n0}function getHTMLOffset(r0,e0,n0){n0===void 0&&(n0=!1);const a0=r0.getBoundingClientRect(),i0=a0.left+e0.scrollLeft-(n0?0:getWindowScrollBarX(r0,a0)),s0=a0.top+e0.scrollTop;return{x:i0,y:s0}}function convertOffsetParentRelativeRectToViewportRelativeRect(r0){let{elements:e0,rect:n0,offsetParent:a0,strategy:i0}=r0;const s0=i0==="fixed",o0=getDocumentElement(a0),l0=e0?isTopLayer(e0.floating):!1;if(a0===o0||l0&&s0)return n0;let c0={scrollLeft:0,scrollTop:0},u0=createCoords(1);const d0=createCoords(0),h0=isHTMLElement(a0);if((h0||!h0&&!s0)&&((getNodeName(a0)!=="body"||isOverflowElement(o0))&&(c0=getNodeScroll(a0)),isHTMLElement(a0))){const p0=getBoundingClientRect(a0);u0=getScale(a0),d0.x=p0.x+a0.clientLeft,d0.y=p0.y+a0.clientTop}const f0=o0&&!h0&&!s0?getHTMLOffset(o0,c0,!0):createCoords(0);return{width:n0.width*u0.x,height:n0.height*u0.y,x:n0.x*u0.x-c0.scrollLeft*u0.x+d0.x+f0.x,y:n0.y*u0.y-c0.scrollTop*u0.y+d0.y+f0.y}}function getClientRects(r0){return Array.from(r0.getClientRects())}function getDocumentRect(r0){const e0=getDocumentElement(r0),n0=getNodeScroll(r0),a0=r0.ownerDocument.body,i0=max$3(e0.scrollWidth,e0.clientWidth,a0.scrollWidth,a0.clientWidth),s0=max$3(e0.scrollHeight,e0.clientHeight,a0.scrollHeight,a0.clientHeight);let o0=-n0.scrollLeft+getWindowScrollBarX(r0);const l0=-n0.scrollTop;return getComputedStyle$1(a0).direction==="rtl"&&(o0+=max$3(e0.clientWidth,a0.clientWidth)-i0),{width:i0,height:s0,x:o0,y:l0}}
vendor: 9,433 bytes, line 506
506function getViewportRect(r0,e0){const n0=getWindow(r0),a0=getDocumentElement(r0),i0=n0.visualViewport;let s0=a0.clientWidth,o0=a0.clientHeight,l0=0,c0=0;if(i0){s0=i0.width,o0=i0.height;const u0=isWebKit();(!u0||u0&&e0==="fixed")&&(l0=i0.offsetLeft,c0=i0.offsetTop)}return{width:s0,height:o0,x:l0,y:c0}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(r0,e0){const n0=getBoundingClientRect(r0,!0,e0==="fixed"),a0=n0.top+r0.clientTop,i0=n0.left+r0.clientLeft,s0=isHTMLElement(r0)?getScale(r0):createCoords(1),o0=r0.clientWidth*s0.x,l0=r0.clientHeight*s0.y,c0=i0*s0.x,u0=a0*s0.y;return{width:o0,height:l0,x:c0,y:u0}}function getClientRectFromClippingAncestor(r0,e0,n0){let a0;if(e0==="viewport")a0=getViewportRect(r0,n0);else if(e0==="document")a0=getDocumentRect(getDocumentElement(r0));else if(isElement(e0))a0=getInnerBoundingClientRect(e0,n0);else{const i0=getVisualOffsets(r0);a0={x:e0.x-i0.x,y:e0.y-i0.y,width:e0.width,height:e0.height}}return rectToClientRect(a0)}function hasFixedPositionAncestor(r0,e0){const n0=getParentNode(r0);return n0===e0||!isElement(n0)||isLastTraversableNode(n0)?!1:getComputedStyle$1(n0).position==="fixed"||hasFixedPositionAncestor(n0,e0)}function getClippingElementAncestors(r0,e0){const n0=e0.get(r0);if(n0)return n0;let a0=getOverflowAncestors(r0,[],!1).filter(l0=>isElement(l0)&&getNodeName(l0)!=="body"),i0=null;const s0=getComputedStyle$1(r0).position==="fixed";let o0=s0?getParentNode(r0):r0;for(;isElement(o0)&&!isLastTraversableNode(o0);){const l0=getComputedStyle$1(o0),c0=isContainingBlock(o0);!c0&&l0.position==="fixed"&&(i0=null),(s0?!c0&&!i0:!c0&&l0.position==="static"&&!!i0&&absoluteOrFixed.has(i0.position)||isOverflowElement(o0)&&!c0&&hasFixedPositionAncestor(r0,o0))?a0=a0.filter(d0=>d0!==o0):i0=l0,o0=getParentNode(o0)}return e0.set(r0,a0),a0}function getClippingRect(r0){let{element:e0,boundary:n0,rootBoundary:a0,strategy:i0}=r0;const o0=[...n0==="clippingAncestors"?isTopLayer(e0)?[]:getClippingElementAncestors(e0,this._c):[].concat(n0),a0],l0=o0[0],c0=o0.reduce((u0,d0)=>{const h0=getClientRectFromClippingAncestor(e0,d0,i0);return u0.top=max$3(h0.top,u0.top),u0.right=min$3(h0.right,u0.right),u0.bottom=min$3(h0.bottom,u0.bottom),u0.left=max$3(h0.left,u0.left),u0},getClientRectFromClippingAncestor(e0,l0,i0));return{width:c0.right-c0.left,height:c0.bottom-c0.top,x:c0.left,y:c0.top}}function getDimensions(r0){const{width:e0,height:n0}=getCssDimensions(r0);return{width:e0,height:n0}}function getRectRelativeToOffsetParent(r0,e0,n0){const a0=isHTMLElement(e0),i0=getDocumentElement(e0),s0=n0==="fixed",o0=getBoundingClientRect(r0,!0,s0,e0);let l0={scrollLeft:0,scrollTop:0};const c0=createCoords(0);function u0(){c0.x=getWindowScrollBarX(i0)}if(a0||!a0&&!s0)if((getNodeName(e0)!=="body"||isOverflowElement(i0))&&(l0=getNodeScroll(e0)),a0){const p0=getBoundingClientRect(e0,!0,s0,e0);c0.x=p0.x+e0.clientLeft,c0.y=p0.y+e0.clientTop}else i0&&u0();s0&&!a0&&i0&&u0();const d0=i0&&!a0&&!s0?getHTMLOffset(i0,l0):createCoords(0),h0=o0.left+l0.scrollLeft-c0.x-d0.x,f0=o0.top+l0.scrollTop-c0.y-d0.y;return{x:h0,y:f0,width:o0.width,height:o0.height}}function isStaticPositioned(r0){return getComputedStyle$1(r0).position==="static"}function getTrueOffsetParent(r0,e0){if(!isHTMLElement(r0)||getComputedStyle$1(r0).position==="fixed")return null;if(e0)return e0(r0);let n0=r0.offsetParent;return getDocumentElement(r0)===n0&&(n0=n0.ownerDocument.body),n0}function getOffsetParent(r0,e0){const n0=getWindow(r0);if(isTopLayer(r0))return n0;if(!isHTMLElement(r0)){let i0=getParentNode(r0);for(;i0&&!isLastTraversableNode(i0);){if(isElement(i0)&&!isStaticPositioned(i0))return i0;i0=getParentNode(i0)}return n0}let a0=getTrueOffsetParent(r0,e0);for(;a0&&isTableElement(a0)&&isStaticPositioned(a0);)a0=getTrueOffsetParent(a0,e0);return a0&&isLastTraversableNode(a0)&&isStaticPositioned(a0)&&!isContainingBlock(a0)?n0:a0||getContainingBlock(r0)||n0}const getElementRects=async function(r0){const e0=this.getOffsetParent||getOffsetParent,n0=this.getDimensions,a0=await n0(r0.floating);return{reference:getRectRelativeToOffsetParent(r0.reference,await e0(r0.floating),r0.strategy),floating:{x:0,y:0,width:a0.width,height:a0.height}}};function isRTL(r0){return getComputedStyle$1(r0).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(r0,e0){return r0.x===e0.x&&r0.y===e0.y&&r0.width===e0.width&&r0.height===e0.height}function observeMove(r0,e0){let n0=null,a0;const i0=getDocumentElement(r0);function s0(){var l0;clearTimeout(a0),(l0=n0)==null||l0.disconnect(),n0=null}function o0(l0,c0){l0===void 0&&(l0=!1),c0===void 0&&(c0=1),s0();const u0=r0.getBoundingClientRect(),{left:d0,top:h0,width:f0,height:p0}=u0;if(l0||e0(),!f0||!p0)return;const A0=floor(h0),m0=floor(i0.clientWidth-(d0+f0)),x0=floor(i0.clientHeight-(h0+p0)),g0=floor(d0),b0={rootMargin:-A0+"px "+-m0+"px "+-x0+"px "+-g0+"px",threshold:max$3(0,min$3(1,c0))||1};let E0=!0;function w0(v0){const S0=v0[0].intersectionRatio;if(S0!==c0){if(!E0)return o0();S0?o0(!1,S0):a0=setTimeout(()=>{o0(!1,1e-7)},1e3)}S0===1&&!rectsAreEqual(u0,r0.getBoundingClientRect())&&o0(),E0=!1}try{n0=new IntersectionObserver(w0,{...b0,root:i0.ownerDocument})}catch{n0=new IntersectionObserver(w0,b0)}n0.observe(r0)}return o0(!0),s0}function autoUpdate(r0,e0,n0,a0){a0===void 0&&(a0={});const{ancestorScroll:i0=!0,ancestorResize:s0=!0,elementResize:o0=typeof ResizeObserver=="function",layoutShift:l0=typeof IntersectionObserver=="function",animationFrame:c0=!1}=a0,u0=unwrapElement(r0),d0=i0||s0?[...u0?getOverflowAncestors(u0):[],...getOverflowAncestors(e0)]:[];d0.forEach(g0=>{i0&&g0.addEventListener("scroll",n0,{passive:!0}),s0&&g0.addEventListener("resize",n0)});const h0=u0&&l0?observeMove(u0,n0):null;let f0=-1,p0=null;o0&&(p0=new ResizeObserver(g0=>{let[y0]=g0;y0&&y0.target===u0&&p0&&(p0.unobserve(e0),cancelAnimationFrame(f0),f0=requestAnimationFrame(()=>{var b0;(b0=p0)==null||b0.observe(e0)})),n0()}),u0&&!c0&&p0.observe(u0),p0.observe(e0));let A0,m0=c0?getBoundingClientRect(r0):null;c0&&x0();function x0(){const g0=getBoundingClientRect(r0);m0&&!rectsAreEqual(m0,g0)&&n0(),m0=g0,A0=requestAnimationFrame(x0)}return n0(),()=>{var g0;d0.forEach(y0=>{i0&&y0.removeEventListener("scroll",n0),s0&&y0.removeEventListener("resize",n0)}),h0==null||h0(),(g0=p0)==null||g0.disconnect(),p0=null,c0&&cancelAnimationFrame(A0)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,limitShift$1=limitShift$2,computePosition=(r0,e0,n0)=>{const a0=new Map,i0={platform,...n0},s0={...i0.platform,_c:a0};return computePosition$1(r0,e0,{...i0,platform:s0})};var isClient=typeof document<"u",noop$8=function(){},index$2=isClient?reactExports.useLayoutEffect:noop$8;function deepEqual$1(r0,e0){if(r0===e0)return!0;if(typeof r0!=typeof e0)return!1;if(typeof r0=="function"&&r0.toString()===e0.toString())return!0;let n0,a0,i0;if(r0&&e0&&typeof r0=="object"){if(Array.isArray(r0)){if(n0=r0.length,n0!==e0.length)return!1;for(a0=n0;a0--!==0;)if(!deepEqual$1(r0[a0],e0[a0]))return!1;return!0}if(i0=Object.keys(r0),n0=i0.length,n0!==Object.keys(e0).length)return!1;for(a0=n0;a0--!==0;)if(!{}.hasOwnProperty.call(e0,i0[a0]))return!1;for(a0=n0;a0--!==0;){const s0=i0[a0];if(!(s0==="_owner"&&r0.$$typeof)&&!deepEqual$1(r0[s0],e0[s0]))return!1}return!0}return r0!==r0&&e0!==e0}function getDPR(r0){return typeof window>"u"?1:(r0.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(r0,e0){const n0=getDPR(r0);return Math.round(e0*n0)/n0}function useLatestRef(r0){const e0=reactExports.useRef(r0);return index$2(()=>{e0.current=r0}),e0}function useFloating(r0){r0===void 0&&(r0={});const{placement:e0="bottom",strategy:n0="absolute",middleware:a0=[],platform:i0,elements:{reference:s0,floating:o0}={},transform:l0=!0,whileElementsMounted:c0,open:u0}=r0,[d0,h0]=reactExports.useState({x:0,y:0,strategy:n0,placement:e0,middlewareData:{},isPositioned:!1}),[f0,p0]=reactExports.useState(a0);deepEqual$1(f0,a0)||p0(a0);const[A0,m0]=reactExports.useState(null),[x0,g0]=reactExports.useState(null),y0=reactExports.useCallback(O0=>{O0!==v0.current&&(v0.current=O0,m0(O0))},[]),b0=reactExports.useCallback(O0=>{O0!==S0.current&&(S0.current=O0,g0(O0))},[]),E0=s0||A0,w0=o0||x0,v0=reactExports.useRef(null),S0=reactExports.useRef(null),k0=reactExports.useRef(d0),R0=c0!=null,j0=useLatestRef(c0),C0=useLatestRef(i0),$0=useLatestRef(u0),T0=reactExports.useCallback(()=>{if(!v0.current||!S0.current)return;const O0={placement:e0,strategy:n0,middleware:f0};C0.current&&(O0.platform=C0.current),computePosition(v0.current,S0.current,O0).then(B0=>{const z0={...B0,isPositioned:$0.current!==!1};I0.current&&!deepEqual$1(k0.current,z0)&&(k0.current=z0,reactDomExports.flushSync(()=>{h0(z0)}))})},[f0,e0,n0,C0,$0]);index$2(()=>{u0===!1&&k0.current.isPositioned&&(k0.current.isPositioned=!1,h0(O0=>({...O0,isPositioned:!1})))},[u0]);const I0=reactExports.useRef(!1);index$2(()=>(I0.current=!0,()=>{I0.current=!1}),[]),index$2(()=>{if(E0&&(v0.current=E0),w0&&(S0.current=w0),E0&&w0){if(j0.current)return j0.current(E0,w0,T0);T0()}},[E0,w0,T0,j0,R0]);const M0=reactExports.useMemo(()=>({reference:v0,floating:S0,setReference:y0,setFloating:b0}),[y0,b0]),N0=reactExports.useMemo(()=>({reference:E0,floating:w0}
vendor: 3,376 bytes, line 506
506),[E0,w0]),D0=reactExports.useMemo(()=>{const O0={position:n0,left:0,top:0};if(!N0.floating)return O0;const B0=roundByDPR(N0.floating,d0.x),z0=roundByDPR(N0.floating,d0.y);return l0?{...O0,transform:"translate("+B0+"px, "+z0+"px)",...getDPR(N0.floating)>=1.5&&{willChange:"transform"}}:{position:n0,left:B0,top:z0}},[n0,l0,N0.floating,d0.x,d0.y]);return reactExports.useMemo(()=>({...d0,update:T0,refs:M0,elements:N0,floatingStyles:D0}),[d0,T0,M0,N0,D0])}const arrow$1=r0=>{function e0(n0){return{}.hasOwnProperty.call(n0,"current")}return{name:"arrow",options:r0,fn(n0){const{element:a0,padding:i0}=typeof r0=="function"?r0(n0):r0;return a0&&e0(a0)?a0.current!=null?arrow$2({element:a0.current,padding:i0}).fn(n0):{}:a0?arrow$2({element:a0,padding:i0}).fn(n0):{}}}},offset=(r0,e0)=>({...offset$1(r0),options:[r0,e0]}),shift=(r0,e0)=>({...shift$1(r0),options:[r0,e0]}),limitShift=(r0,e0)=>({...limitShift$1(r0),options:[r0,e0]}),flip=(r0,e0)=>({...flip$1(r0),options:[r0,e0]}),size=(r0,e0)=>({...size$1(r0),options:[r0,e0]}),hide=(r0,e0)=>({...hide$1(r0),options:[r0,e0]}),arrow=(r0,e0)=>({...arrow$1(r0),options:[r0,e0]});var NAME$2="Arrow",Arrow$1=reactExports.forwardRef((r0,e0)=>{const{children:n0,width:a0=10,height:i0=5,...s0}=r0;return jsxRuntimeExports.jsx(Primitive.svg,{...s0,ref:e0,width:a0,height:i0,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r0.asChild?n0:jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$2;var Root$b=Arrow$1;function useSize(r0){const[e0,n0]=reactExports.useState(void 0);return useLayoutEffect2(()=>{if(r0){n0({width:r0.offsetWidth,height:r0.offsetHeight});const a0=new ResizeObserver(i0=>{if(!Array.isArray(i0)||!i0.length)return;const s0=i0[0];let o0,l0;if("borderBoxSize"in s0){const c0=s0.borderBoxSize,u0=Array.isArray(c0)?c0[0]:c0;o0=u0.inlineSize,l0=u0.blockSize}else o0=r0.offsetWidth,l0=r0.offsetHeight;n0({width:o0,height:l0})});return a0.observe(r0,{box:"border-box"}),()=>a0.unobserve(r0)}else n0(void 0)},[r0]),e0}var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=r0=>{const{__scopePopper:e0,children:n0}=r0,[a0,i0]=reactExports.useState(null);return jsxRuntimeExports.jsx(PopperProvider,{scope:e0,anchor:a0,onAnchorChange:i0,children:n0})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=reactExports.forwardRef((r0,e0)=>{const{__scopePopper:n0,virtualRef:a0,...i0}=r0,s0=usePopperContext(ANCHOR_NAME$2,n0),o0=reactExports.useRef(null),l0=useComposedRefs$1(e0,o0);return reactExports.useEffect(()=>{s0.onAnchorChange((a0==null?void 0:a0.current)||o0.current)}),a0?null:jsxRuntimeExports.jsx(Primitive.div,{...i0,ref:l0})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=reactExports.forwardRef((r0,e0)=>{var _w,J0,Cw,Ow,jw,Nw;const{__scopePopper:n0,side:a0="bottom",sideOffset:i0=0,align:s0="center",alignOffset:o0=0,arrowPadding:l0=0,avoidCollisions:c0=!0,collisionBoundary:u0=[],collisionPadding:d0=0,sticky:h0="partial",hideWhenDetached:f0=!1,updatePositionStrategy:p0="optimized",onPlaced:A0,...m0}=r0,x0=usePopperContext(CONTENT_NAME$9,n0),[g0,y0]=reactExports.useState(null),b0=useComposedRefs$1(e0,xw=>
vendor: 4,959 bytes, line 506
506y0(xw)),[E0,w0]=reactExports.useState(null),v0=useSize(E0),S0=(v0==null?void 0:v0.width)??0,k0=(v0==null?void 0:v0.height)??0,R0=a0+(s0!=="center"?"-"+s0:""),j0=typeof d0=="number"?d0:{top:0,right:0,bottom:0,left:0,...d0},C0=Array.isArray(u0)?u0:[u0],$0=C0.length>0,T0={padding:j0,boundary:C0.filter(isNotNull),altBoundary:$0},{refs:I0,floatingStyles:M0,placement:N0,isPositioned:D0,middlewareData:O0}=useFloating({strategy:"fixed",placement:R0,whileElementsMounted:(...xw)=>autoUpdate(...xw,{animationFrame:p0==="always"}),elements:{reference:x0.anchor},middleware:[offset({mainAxis:i0+k0,alignmentAxis:o0}),c0&&shift({mainAxis:!0,crossAxis:!1,limiter:h0==="partial"?limitShift():void 0,...T0}),c0&&flip({...T0}),size({...T0,apply:({elements:xw,rects:X0,availableWidth:Lw,availableHeight:Hw})=>{const{width:Ww,height:r1}=X0.reference,Yw=xw.floating.style;Yw.setProperty("--radix-popper-available-width",`${Lw}px`),Yw.setProperty("--radix-popper-available-height",`${Hw}px`),Yw.setProperty("--radix-popper-anchor-width",`${Ww}px`),Yw.setProperty("--radix-popper-anchor-height",`${r1}px`)}}),E0&&arrow({element:E0,padding:l0}),transformOrigin({arrowWidth:S0,arrowHeight:k0}),f0&&hide({strategy:"referenceHidden",...T0})]}),[B0,z0]=getSideAndAlignFromPlacement(N0),G0=useCallbackRef$2(A0);useLayoutEffect2(()=>{D0&&(G0==null||G0())},[D0,G0]);const F0=(_w=O0.arrow)==null?void 0:_w.x,Q0=(J0=O0.arrow)==null?void 0:J0.y,U0=((Cw=O0.arrow)==null?void 0:Cw.centerOffset)!==0,[q0,Rw]=reactExports.useState();return useLayoutEffect2(()=>{g0&&Rw(window.getComputedStyle(g0).zIndex)},[g0]),jsxRuntimeExports.jsx("div",{ref:I0.setFloating,"data-radix-popper-content-wrapper":"",style:{...M0,transform:D0?M0.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q0,"--radix-popper-transform-origin":[(Ow=O0.transformOrigin)==null?void 0:Ow.x,(jw=O0.transformOrigin)==null?void 0:jw.y].join(" "),...((Nw=O0.hide)==null?void 0:Nw.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r0.dir,children:jsxRuntimeExports.jsx(PopperContentProvider,{scope:n0,placedSide:B0,onArrowChange:w0,arrowX:F0,arrowY:Q0,shouldHideArrow:U0,children:jsxRuntimeExports.jsx(Primitive.div,{"data-side":B0,"data-align":z0,...m0,ref:b0,style:{...m0.style,animation:D0?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=reactExports.forwardRef(function(e0,n0){const{__scopePopper:a0,...i0}=e0,s0=useContentContext(ARROW_NAME$5,a0),o0=OPPOSITE_SIDE[s0.placedSide];return jsxRuntimeExports.jsx("span",{ref:s0.onArrowChange,style:{position:"absolute",left:s0.arrowX,top:s0.arrowY,[o0]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s0.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s0.placedSide],visibility:s0.shouldHideArrow?"hidden":void 0},children:jsxRuntimeExports.jsx(Root$b,{...i0,ref:n0,style:{...i0.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(r0){return r0!==null}var transformOrigin=r0=>({name:"transformOrigin",options:r0,fn(e0){var x0,g0,y0;const{placement:n0,rects:a0,middlewareData:i0}=e0,o0=((x0=i0.arrow)==null?void 0:x0.centerOffset)!==0,l0=o0?0:r0.arrowWidth,c0=o0?0:r0.arrowHeight,[u0,d0]=getSideAndAlignFromPlacement(n0),h0={start:"0%",center:"50%",end:"100%"}[d0],f0=(((g0=i0.arrow)==null?void 0:g0.x)??0)+l0/2,p0=(((y0=i0.arrow)==null?void 0:y0.y)??0)+c0/2;let A0="",m0="";return u0==="bottom"?(A0=o0?h0:`${f0}px`,m0=`${-c0}px`):u0==="top"?(A0=o0?h0:`${f0}px`,m0=`${a0.floating.height+c0}px`):u0==="right"?(A0=`${-c0}px`,m0=o0?h0:`${p0}px`):u0==="left"&&(A0=`${a0.floating.width+c0}px`,m0=o0?h0:`${p0}px`),{data:{x:A0,y:m0}}}});function getSideAndAlignFromPlacement(r0){const[e0,n0="center"]=r0.split("-");return[e0,n0]}var Root2$5=Popper,Anchor=PopperAnchor,Content$3=PopperContent,Arrow=PopperArrow,[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope]),usePopperScope$3=createPopperScope(),PROVIDER_NAME="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME),TooltipProvider$1=r0=>{const{__scopeTooltip:e0,delayDuration:n0=DEFAULT_DELAY_DURATION,skipDelayDuration:a0=300,disableHoverableContent:i0=!1,children:s0}=r0,o0=reactExports.useRef(!0),l0=reactExports.useRef(!1),c0=reactExports.useRef(0);return reactExports.useEffect(()=>{const u0=c0.current;return()=>window.clearTimeout(u0)},[]),jsxRuntimeExports.jsx(TooltipProviderContextProvider,{scope:e0,isOpenDelayedRef:o0,delayDuration:n0,onOpen:reactExports.useCallback(()=>{window.clearTimeout(c0.current),o0.current=!1},[]),onClose:reactExports.useCallback(()=>{window.clearTimeout(c0.current),c0.current=window.setTimeout(()=>
vendor: 5,689 bytes, line 506
506o0.current=!0,a0)},[a0]),isPointerInTransitRef:l0,onPointerInTransitChange:reactExports.useCallback(u0=>{l0.current=u0},[]),disableHoverableContent:i0,children:s0})};TooltipProvider$1.displayName=PROVIDER_NAME;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),TRIGGER_NAME$8="TooltipTrigger",TooltipTrigger=reactExports.forwardRef((r0,e0)=>{const{__scopeTooltip:n0,...a0}=r0,i0=useTooltipContext(TRIGGER_NAME$8,n0),s0=useTooltipProviderContext(TRIGGER_NAME$8,n0),o0=usePopperScope$3(n0),l0=reactExports.useRef(null),c0=useComposedRefs$1(e0,l0,i0.onTriggerChange),u0=reactExports.useRef(!1),d0=reactExports.useRef(!1),h0=reactExports.useCallback(()=>u0.current=!1,[]);return reactExports.useEffect(()=>()=>document.removeEventListener("pointerup",h0),[h0]),jsxRuntimeExports.jsx(Anchor,{asChild:!0,...o0,children:jsxRuntimeExports.jsx(Primitive.button,{"aria-describedby":i0.open?i0.contentId:void 0,"data-state":i0.stateAttribute,...a0,ref:c0,onPointerMove:composeEventHandlers(r0.onPointerMove,f0=>{f0.pointerType!=="touch"&&!d0.current&&!s0.isPointerInTransitRef.current&&(i0.onTriggerEnter(),d0.current=!0)}),onPointerLeave:composeEventHandlers(r0.onPointerLeave,()=>{i0.onTriggerLeave(),d0.current=!1}),onPointerDown:composeEventHandlers(r0.onPointerDown,()=>{i0.open&&i0.onClose(),u0.current=!0,document.addEventListener("pointerup",h0,{once:!0})}),onFocus:composeEventHandlers(r0.onFocus,()=>{u0.current||i0.onOpen()}),onBlur:composeEventHandlers(r0.onBlur,i0.onClose),onClick:composeEventHandlers(r0.onClick,i0.onClose)})})});TooltipTrigger.displayName=TRIGGER_NAME$8;var PORTAL_NAME$6="TooltipPortal",[PortalProvider$3,usePortalContext$3]=createTooltipContext(PORTAL_NAME$6,{forceMount:void 0}),CONTENT_NAME$8="TooltipContent",TooltipContent$1=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext$3(CONTENT_NAME$8,r0.__scopeTooltip),{forceMount:a0=n0.forceMount,side:i0="top",...s0}=r0,o0=useTooltipContext(CONTENT_NAME$8,r0.__scopeTooltip);return jsxRuntimeExports.jsx(Presence,{present:a0||o0.open,children:o0.disableHoverableContent?jsxRuntimeExports.jsx(TooltipContentImpl,{side:i0,...s0,ref:e0}):jsxRuntimeExports.jsx(TooltipContentHoverable,{side:i0,...s0,ref:e0})})}),TooltipContentHoverable=reactExports.forwardRef((r0,e0)=>{const n0=useTooltipContext(CONTENT_NAME$8,r0.__scopeTooltip),a0=useTooltipProviderContext(CONTENT_NAME$8,r0.__scopeTooltip),i0=reactExports.useRef(null),s0=useComposedRefs$1(e0,i0),[o0,l0]=reactExports.useState(null),{trigger:c0,onClose:u0}=n0,d0=i0.current,{onPointerInTransitChange:h0}=a0,f0=reactExports.useCallback(()=>{l0(null),h0(!1)},[h0]),p0=reactExports.useCallback((A0,m0)=>{const x0=A0.currentTarget,g0={x:A0.clientX,y:A0.clientY},y0=getExitSideFromRect(g0,x0.getBoundingClientRect()),b0=getPaddedExitPoints(g0,y0),E0=getPointsFromRect(m0.getBoundingClientRect()),w0=getHull([...b0,...E0]);l0(w0),h0(!0)},[h0]);return reactExports.useEffect(()=>()=>f0(),[f0]),reactExports.useEffect(()=>{if(c0&&d0){const A0=x0=>p0(x0,d0),m0=x0=>p0(x0,c0);return c0.addEventListener("pointerleave",A0),d0.addEventListener("pointerleave",m0),()=>{c0.removeEventListener("pointerleave",A0),d0.removeEventListener("pointerleave",m0)}}},[c0,d0,p0,f0]),reactExports.useEffect(()=>{if(o0){const A0=m0=>{const x0=m0.target,g0={x:m0.clientX,y:m0.clientY},y0=(c0==null?void 0:c0.contains(x0))||(d0==null?void 0:d0.contains(x0)),b0=!isPointInPolygon$1(g0,o0);y0?f0():b0&&(f0(),u0())};return document.addEventListener("pointermove",A0),()=>document.removeEventListener("pointermove",A0)}},[c0,d0,o0,u0,f0]),jsxRuntimeExports.jsx(TooltipContentImpl,{...r0,ref:s0})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable$1=createSlottable("TooltipContent"),TooltipContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeTooltip:n0,children:a0,"aria-label":i0,onEscapeKeyDown:s0,onPointerDownOutside:o0,...l0}=r0,c0=useTooltipContext(CONTENT_NAME$8,n0),u0=usePopperScope$3(n0),{onClose:d0}=c0;return reactExports.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,d0),()=>document.removeEventListener(TOOLTIP_OPEN,d0)),[d0]),reactExports.useEffect(()=>{if(c0.trigger){const h0=f0=>{const p0=f0.target;p0!=null&&p0.contains(c0.trigger)&&d0()};return window.addEventListener("scroll",h0,{capture:!0}),()=>window.removeEventListener("scroll",h0,{capture:!0})}},[c0.trigger,d0]),jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s0,onPointerDownOutside:o0,onFocusOutside:h0=>h0.preventDefault(),onDismiss:d0,children:jsxRuntimeExports.jsxs(Content$3,{"data-state":c0.stateAttribute,...u0,...l0,ref:e0,style:{...l0.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntimeExports.jsx(Slottable$1,{children:a0}),jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider,{scope:n0,isInside:!0,children:jsxRuntimeExports.jsx(Root$c,{id:c0.contentId,role:"tooltip",children:i0||a0})})]})})});TooltipContent$1.displayName=CONTENT_NAME$8;var ARROW_NAME$4="TooltipArrow",TooltipArrow=reactExports.forwardRef((r0,e0)=>{const{__scopeTooltip:n0,...a0}=r0,i0=usePopperScope$3(n0);return useVisuallyHiddenContentContext(ARROW_NAME$4,n0).isInside?null:jsxRuntimeExports.jsx(Arrow,{...i0,...a0,ref:e0})});TooltipArrow.displayName=ARROW_NAME$4;
506function getExitSideFromRect(r0,e0){const n0=Math.abs(e0.top-r0.y),a0=Math.abs(e0.bottom-r0.y),i0=Math.abs(e0.right-r0.x),s0=Math.abs(e0.left-r0.x);switch(Math.min(n0,a0,i0,s0)){case s0:return"left";case i0:return"right";case n0:return"top";case a0:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(r0,e0,n0=5){const a0=[];switch(e0){case"top":a0.push({x:r0.x-n0,y:r0.y+n0},{x:r0.x+n0,y:r0.y+n0});break;case"bottom":a0.push({x:r0.x-n0,y:r0.y-n0},{x:r0.x+n0,y:r0.y-n0});break;case"left":a0.push({x:r0.x+n0,y:r0.y-n0},{x:r0.x+n0,y:r0.y+n0});break;case"right":a0.push({x:r0.x-n0,y:r0.y-n0},{x:r0.x-n0,y:r0.y+n0});break}return a0}function getPointsFromRect(r0){const{top:e0,right:n0,bottom:a0,left:i0}=r0;return[{x:i0,y:e0},{x:n0,y:e0},{x:n0,y:a0},{x:i0,y:a0}]}function isPointInPolygon$1(r0,e0){const{x:n0,y:a0}=r0;let i0=!1;for(let s0=0,o0=e0.length-1;s0<e0.length;o0=s0++){const l0=e0[s0],c0=e0[o0],u0=l0.x,d0=l0.y,h0=c0.x,f0=c0.y;d0>a0!=f0>a0&&n0<(h0-u0)*(a0-d0)/(f0-d0)+u0&&(i0=!i0)}return i0}function getHull(r0){const e0=r0.slice();return e0.sort((n0,a0)=>n0.x<a0.x?-1:n0.x>a0.x?1:n0.y<a0.y?-1:n0.y>a0.y?1:0),getHullPresorted(e0)}function getHullPresorted(r0){if(r0.length<=1)return r0.slice();const e0=[];for(let a0=0;a0<r0.length;a0++){const i0=r0[a0];for(;e0.length>=2;){const s0=e0[e0.length-1],o0=e0[e0.length-2];if((s0.x-o0.x)*(i0.y-o0.y)>=(s0.y-o0.y)*(i0.x-o0.x))e0.pop();else break}e0.push(i0)}e0.pop();const n0=[];for(let a0=r0.length-1;a0>=0;a0--){const i0=r0[a0];for(;n0.length>=2;){const s0=n0[n0.length-1],o0=n0[n0.length-2];if((s0.x-o0.x)*(i0.y-o0.y)>=(s0.y-o0.y)*(i0.x-o0.x))n0.pop();else break}n0.push(i0)}return n0.pop(),e0.length===1&&n0.length===1&&e0[0].x===n0[0].x&&e0[0].y===n0[0].y?e0:e0.concat(n0)}var Provider=TooltipProvider$1,Content2$5=TooltipContent$1;const TooltipProvider=Provider,TooltipContent=reactExports.forwardRef(({className:r0,sideOffset:e0=4,...n0},a0)=>jsxRuntimeExports.jsx(Content2$5,{ref:a0,sideOffset:e0,className:cn$1("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r0),...n0}));TooltipContent.displayName=Content2$5.displayName;var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r0){return this.listeners.add(r0),this.onSubscribe(),()=>{this.listeners.delete(r0),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>"u"||"Deno"in globalThis;function noop$7(){}function functionalUpdate(r0,e0){return typeof r0=="function"?r0(e0):r0}function isValidTimeout(r0){return typeof r0=="number"&&r0>=0&&r0!==1/0}function timeUntilStale(r0,e0){return Math.max(r0+(e0||0)-Date.now(),0)}function resolveStaleTime(r0,e0){return typeof r0=="function"?r0(e0):r0}function resolveEnabled(r0,e0){return typeof r0=="function"?r0(e0):r0}function matchQuery(r0,e0){const{type:n0="all",exact:a0,fetchStatus:i0,predicate:s0,queryKey:o0,stale:l0}=r0;if(o0){if(a0){if(e0.queryHash!==hashQueryKeyByOptions(o0,e0.options))return!1}else if(!partialMatchKey(e0.queryKey,o0))return!1}if(n0!=="all"){const c0=e0.isActive();if(n0==="active"&&!c0||n0==="inactive"&&c0)return!1}return!(typeof l0=="boolean"&&e0.isStale()!==l0||i0&&i0!==e0.state.fetchStatus||s0&&!s0(e0))}function matchMutation(r0,e0){const{exact:n0,status:a0,predicate:i0,mutationKey:s0}=r0;if(s0){if(!e0.options.mutationKey)return!1;if(n0){if(hashKey(e0.options.mutationKey)!==hashKey(s0))return!1}else if(!partialMatchKey(e0.options.mutationKey,s0))return!1}return!(a0&&e0.state.status!==a0||i0&&!i0(e0))}function hashQueryKeyByOptions(r0,e0){return((e0==null?void 0:e0.queryKeyHashFn)||hashKey)(r0)}function hashKey(r0){return JSON.stringify(r0,(e0,n0)=>isPlainObject$3(n0)?Object.keys(n0).sort().reduce((a0,i0)=>(a0[i0]=n0[i0],a0),{}):n0)}function partialMatchKey(r0,e0){return r0===e0?!0:typeof r0!=typeof e0?!1:r0&&e0&&typeof r0=="object"&&typeof e0=="object"?Object.keys(e0).every(n0=>partialMatchKey(r0[n0],e0[n0])):!1}function replaceEqualDeep(r0,e0){if(r0===e0)return r0;const n0=isPlainArray(r0)&&isPlainArray(e0);if(n0||isPlainObject$3(r0)&&isPlainObject$3(e0)){const a0=n0?r0:Object.keys(r0),i0=a0.length,s0=n0?e0:Object.keys(e0),o0=s0.length,l0=n0?[]:{},c0=new Set(a0);let u0=0;for(let d0=0;d0<o0;d0++){const h0=n0?d0:s0[d0];(!n0&&c0.has(h0)||n0)&&r0[h0]===void 0&&e0[h0]===void 0?(l0[h0]=void 0,u0++):(l0[h0]=replaceEqualDeep(r0[h0],e0[h0]),l0[h0]===r0[h0]&&r0[h0]!==void 0&&u0++)}return i0===o0&&u0===i0?r0:l0}return e0}function isPlainArray(r0){return Array.isArray(r0)&&r0.length===Object.keys(r0).length}function isPlainObject$3(r0){if(!hasObjectPrototype(r0))return!1;
vendor: 17,625 bytes, line 506
506const e0=r0.constructor;if(e0===void 0)return!0;const n0=e0.prototype;return!(!hasObjectPrototype(n0)||!n0.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r0)!==Object.prototype)}function hasObjectPrototype(r0){return Object.prototype.toString.call(r0)==="[object Object]"}function sleep$1(r0){return new Promise(e0=>{setTimeout(e0,r0)})}function replaceData(r0,e0,n0){return typeof n0.structuralSharing=="function"?n0.structuralSharing(r0,e0):n0.structuralSharing!==!1?replaceEqualDeep(r0,e0):e0}function addToEnd(r0,e0,n0=0){const a0=[...r0,e0];return n0&&a0.length>n0?a0.slice(1):a0}function addToStart(r0,e0,n0=0){const a0=[e0,...r0];return n0&&a0.length>n0?a0.slice(0,-1):a0}var skipToken=Symbol();function ensureQueryFn(r0,e0){return!r0.queryFn&&(e0!=null&&e0.initialPromise)?()=>e0.initialPromise:!r0.queryFn||r0.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${r0.queryHash}'`)):r0.queryFn}var lP,v$,$L,m5,FocusManager=(m5=class extends Subscribable{constructor(){super();K0(this,lP);K0(this,v$);K0(this,$L);V0(this,$L,e0=>{if(!isServer&&window.addEventListener){const n0=()=>e0();return window.addEventListener("visibilitychange",n0,!1),()=>{window.removeEventListener("visibilitychange",n0)}}})}onSubscribe(){_0(this,v$)||this.setEventListener(_0(this,$L))}onUnsubscribe(){var e0;this.hasListeners()||((e0=_0(this,v$))==null||e0.call(this),V0(this,v$,void 0))}setEventListener(e0){var n0;V0(this,$L,e0),(n0=_0(this,v$))==null||n0.call(this),V0(this,v$,e0(a0=>{typeof a0=="boolean"?this.setFocused(a0):this.onFocus()}))}setFocused(e0){_0(this,lP)!==e0&&(V0(this,lP,e0),this.onFocus())}onFocus(){const e0=this.isFocused();this.listeners.forEach(n0=>{n0(e0)})}isFocused(){var e0;return typeof _0(this,lP)=="boolean"?_0(this,lP):((e0=globalThis.document)==null?void 0:e0.visibilityState)!=="hidden"}},lP=new WeakMap,v$=new WeakMap,$L=new WeakMap,m5),focusManager=new FocusManager,PL,E$,ML,A5,OnlineManager=(A5=class extends Subscribable{constructor(){super();K0(this,PL,!0);K0(this,E$);K0(this,ML);V0(this,ML,e0=>{if(!isServer&&window.addEventListener){const n0=()=>e0(!0),a0=()=>e0(!1);return window.addEventListener("online",n0,!1),window.addEventListener("offline",a0,!1),()=>{window.removeEventListener("online",n0),window.removeEventListener("offline",a0)}}})}onSubscribe(){_0(this,E$)||this.setEventListener(_0(this,ML))}onUnsubscribe(){var e0;this.hasListeners()||((e0=_0(this,E$))==null||e0.call(this),V0(this,E$,void 0))}setEventListener(e0){var n0;V0(this,ML,e0),(n0=_0(this,E$))==null||n0.call(this),V0(this,E$,e0(this.setOnline.bind(this)))}setOnline(e0){_0(this,PL)!==e0&&(V0(this,PL,e0),this.listeners.forEach(a0=>{a0(e0)}))}isOnline(){return _0(this,PL)}},PL=new WeakMap,E$=new WeakMap,ML=new WeakMap,A5),onlineManager=new OnlineManager;function pendingThenable(){let r0,e0;const n0=new Promise((i0,s0)=>{r0=i0,e0=s0});n0.status="pending",n0.catch(()=>{});function a0(i0){Object.assign(n0,i0),delete n0.resolve,delete n0.reject}return n0.resolve=i0=>{a0({status:"fulfilled",value:i0}),r0(i0)},n0.reject=i0=>{a0({status:"rejected",reason:i0}),e0(i0)},n0}function defaultRetryDelay(r0){return Math.min(1e3*2**r0,3e4)}function canFetch(r0){return(r0??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(r0){super("CancelledError"),this.revert=r0==null?void 0:r0.revert,this.silent=r0==null?void 0:r0.silent}};function isCancelledError(r0){return r0 instanceof CancelledError}function createRetryer(r0){let e0=!1,n0=0,a0=!1,i0;const s0=pendingThenable(),o0=m0=>{var x0;a0||(f0(new CancelledError(m0)),(x0=r0.abort)==null||x0.call(r0))},l0=()=>{e0=!0},c0=()=>{e0=!1},u0=()=>focusManager.isFocused()&&(r0.networkMode==="always"||onlineManager.isOnline())&&r0.canRun(),d0=()=>canFetch(r0.networkMode)&&r0.canRun(),h0=m0=>{var x0;a0||(a0=!0,(x0=r0.onSuccess)==null||x0.call(r0,m0),i0==null||i0(),s0.resolve(m0))},f0=m0=>{var x0;a0||(a0=!0,(x0=r0.onError)==null||x0.call(r0,m0),i0==null||i0(),s0.reject(m0))},p0=()=>new Promise(m0=>{var x0;i0=g0=>{(a0||u0())&&m0(g0)},(x0=r0.onPause)==null||x0.call(r0)}).then(()=>{var m0;i0=void 0,a0||(m0=r0.onContinue)==null||m0.call(r0)}),A0=()=>{if(a0)return;let m0;const x0=n0===0?r0.initialPromise:void 0;try{m0=x0??r0.fn()}catch(g0){m0=Promise.reject(g0)}Promise.resolve(m0).then(h0).catch(g0=>{var v0;if(a0)return;const y0=r0.retry??(isServer?0:3),b0=r0.retryDelay??defaultRetryDelay,E0=typeof b0=="function"?b0(n0,g0):b0,w0=y0===!0||typeof y0=="number"&&n0<y0||typeof y0=="function"&&y0(n0,g0);if(e0||!w0){f0(g0);return}n0++,(v0=r0.onFail)==null||v0.call(r0,n0,g0),sleep$1(E0).then(()=>u0()?void 0:p0()).then(()=>{e0?f0(g0):A0()})})};return{promise:s0,cancel:o0,continue:()=>(i0==null||i0(),s0),cancelRetry:l0,continueRetry:c0,canStart:d0,start:()=>(d0()?A0():p0().then(A0),s0)}}var defaultScheduler=r0=>setTimeout(r0,0);function createNotifyManager(){let r0=[],e0=0,n0=l0=>{l0()},a0=l0=>{l0()},i0=defaultScheduler;const s0=l0=>{e0?r0.push(l0):i0(()=>{n0(l0)})},o0=()=>{const l0=r0;r0=[],l0.length&&i0(()=>{a0(()=>{l0.forEach(c0=>{n0(c0)})})})};return{batch:l0=>{let c0;e0++;try{c0=l0()}finally{e0--,e0||o0()}return c0},batchCalls:l0=>(...c0)=>{s0(()=>{l0(...c0)})},schedule:s0,setNotifyFunction:l0=>{n0=l0},setBatchNotifyFunction:l0=>{a0=l0},setScheduler:l0=>{i0=l0}}}var notifyManager=createNotifyManager(),cP,g5,Removable=(g5=class{constructor(){K0(this,cP)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&V0(this,cP,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r0){this.gcTime=Math.max(this.gcTime||0,r0??(isServer?1/0:5*60*1e3))}clearGcTimeout(){_0(this,cP)&&(clearTimeout(_0(this,cP)),V0(this,cP,void 0))}},cP=new WeakMap,g5),OL,uP,K_,dP,b_,e4,hP,nR,zR,x5,Query=(x5=class extends Removable{constructor(e0){super();K0(this,nR);K0(this,OL);K0(this,uP);K0(this,K_);K0(this,dP);K0(this,b_);K0(this,e4);K0(this,hP);V0(this,hP,!1),V0(this,e4,e0.defaultOptions),this.setOptions(e0.options),this.observers=[],V0(this,dP,e0.client),V0(this,K_,_0(this,dP).getQueryCache()),this.queryKey=e0.queryKey,this.queryHash=e0.queryHash,V0(this,OL,getDefaultState$1(this.options)),this.state=e0.state??_0(this,OL),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e0;return(e0=_0(this,b_))==null?void 0:e0.promise}setOptions(e0){this.options={..._0(this,e4),...e0},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_0(this,K_).remove(this)}setData(e0,n0){const a0=replaceData(this.state.data,e0,this.options);return H0(this,nR,zR).call(this,{data:a0,type:"success",dataUpdatedAt:n0==null?void 0:n0.updatedAt,manual:n0==null?void 0:n0.manual}),a0}setState(e0,n0){H0(this,nR,zR).call(this,{type:"setState",state:e0,setStateOptions:n0})}cancel(e0){var a0,i0;const n0=(a0=_0(this,b_))==null?void 0:a0.promise;return(i0=_0(this,b_))==null||i0.cancel(e0),n0?n0.then(noop$7).catch(noop$7):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_0(this,OL))}isActive(){return this.observers.some(e0=>resolveEnabled(e0.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e0=>resolveStaleTime(e0.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e0=>e0.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e0=0){return this.state.data===void 0?!0:e0==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,e0)}onFocus(){var n0;const e0=this.observers.find(a0=>a0.shouldFetchOnWindowFocus());e0==null||e0.refetch({cancelRefetch:!1}),(n0=_0(this,b_))==null||n0.continue()}onOnline(){var n0;const e0=this.observers.find(a0=>a0.shouldFetchOnReconnect());e0==null||e0.refetch({cancelRefetch:!1}),(n0=_0(this,b_))==null||n0.continue()}addObserver(e0){this.observers.includes(e0)||(this.observers.push(e0),this.clearGcTimeout(),_0(this,K_).notify({type:"observerAdded",query:this,observer:e0}))}removeObserver(e0){this.observers.includes(e0)&&(this.observers=this.observers.filter(n0=>n0!==e0),this.observers.length||(_0(this,b_)&&(_0(this,hP)?_0(this,b_).cancel({revert:!0}):_0(this,b_).cancelRetry()),this.scheduleGc()),_0(this,K_).notify({type:"observerRemoved",query:this,observer:e0}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||H0(this,nR,zR).call(this,{type:"invalidate"})}fetch(e0,n0){var u0,d0,h0;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n0!=null&&n0.cancelRefetch))this.cancel({silent:!0});else if(_0(this,b_))return _0(this,b_).continueRetry(),_0(this,b_).promise}if(e0&&this.setOptions(e0),!this.options.queryFn){const f0=this.observers.find(p0=>p0.options.queryFn);f0&&this.setOptions(f0.options)}const a0=new AbortController,i0=f0=>{Object.defineProperty(f0,"signal",{enumerable:!0,get:()=>(V0(this,hP,!0),a0.signal)})},s0=()=>{const f0=ensureQueryFn(this.options,n0),A0=(()=>{const m0={client:_0(this,dP),queryKey:this.queryKey,meta:this.meta};return i0(m0),m0})();return V0(this,hP,!1),this.options.persister?this.options.persister(f0,A0,this):f0(A0)},l0=(()=>{const f0={fetchOptions:n0,options:this.options,queryKey:this.queryKey,client:_0(this,dP),state:this.state,fetchFn:s0};return i0(f0),f0})();(u0=this.options.behavior)==null||u0.onFetch(l0,this),V0(this,uP,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d0=l0.fetchOptions)==null?void 0:d0.meta))&&H0(this,nR,zR).call(this,{type:"fetch",meta:(h0=l0.fetchOptions)==null?void 0:h0.meta});const c0=f0=>{var p0,A0,m0,x0;isCancelledError(f0)&&f0.silent||H0(this,nR,zR).call(this,{type:"error",error:f0}),isCancelledError(f0)||((A0=(p0=_0(this,K_).config).onError)==null||A0.call(p0,f0,this),(x0=(m0=_0(this,K_).config).onSettled)==null||x0.call(m0,this.state.data,f0,this)),this.scheduleGc()};return V0(this,b_,createRetryer({initialPromise:n0==null?void 0:n0.initialPromise,fn:l0.fetchFn,abort:a0.abort.bind(a0),onSuccess:f0=>{var p0,A0,m0,x0;if(f0===void 0){c0(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f0)}catch(g0){c0(g0);return}(A0=(p0=_0(this,K_).config).onSuccess)==null||A0.call(p0,f0,this),(x0=(m0=_0(this,K_).config).onSettled)==null||x0.call(m0,f0,this.state.error,this),this.scheduleGc()},onError:c0,onFail:(f0,p0)=>{H0(this,nR,zR).call(this,{type:"failed",failureCount:f0,error:p0})},onPause:()=>{H0(this,nR,zR).call(this,{type:"pause"})},onContinue:()=>{H0(this,nR,zR).call(this,{type:"continue"})},retry:l0.options.retry,retryDelay:l0.options.retryDelay,networkMode:l0.options.networkMode,canRun:()=>!0})),_0(this,b_).start()}},OL=new WeakMap,uP=new WeakMap,K_=new WeakMap,dP=new WeakMap,b_=new WeakMap,e4=new WeakMap,hP=new WeakMap,nR=new WeakSet,zR=function(e0){const n0=a0=>{switch(e0.type){case"failed":return{...a0,fetchFailureCount:e0.failureCount,fetchFailureReason:e0.error};case"pause":return{...a0,fetchStatus:"paused"};case"continue":return{...a0,fetchStatus:"fetching"};case"fetch":return{...a0,...fetchState(a0.data,this.options),fetchMeta:e0.meta??null};case"success":return V0(this,uP,void 0),{...a0,data:e0.data,dataUpdateCount:a0.dataUpdateCount+1,dataUpdatedAt:e0.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e0.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i0=e0.error;return isCancelledError(i0)&&i0.revert&&_0(this,uP)?{..._0(this,uP),fetchStatus:"idle"}:{...a0,error:i0,errorUpdateCount:a0.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a0.fetchFailureCount+1,fetchFailureReason:i0,fetchStatus:"idle",status:"error"};case"invalidate":return{...a0,isInvalidated:!0};case"setState":return{...a0,...e0.state}}};this.state=n0(this.state),notifyManager.batch(()=>{this.observers.forEach(a0=>{a0.onQueryUpdate()}),_0(this,K_).notify({query:this,type:"updated",action:e0})})},x5);function fetchState(r0,e0){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(e0.networkMode)?"fetching":"paused",...r0===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(r0){const e0=typeof r0.initialData=="function"?r0.initialData():r0.initialData,n0=e0!==void 0,a0=n0?typeof r0.initialDataUpdatedAt=="function"?r0.initialDataUpdatedAt():r0.initialDataUpdatedAt:0;return{data:e0,dataUpdateCount:0,dataUpdatedAt:n0?a0??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n0?"success":"pending",fetchStatus:"idle"}}var vR,y5,QueryCache=(y5=class extends Subscribable{constructor(e0={}){super();K0(this,vR);this.config=e0,V0(this,vR,new Map)}build(e0,n0,a0){const i0=n0.queryKey,s0=n0.queryHash??hashQueryKeyByOptions(i0,n0);let o0=this.get(s0);return o0||(o0=new Query({client:e0,queryKey:i0,queryHash:s0,options:e0.defaultQueryOptions(n0),state:a0,defaultOptions:e0.getQueryDefaults(i0)}),this.add(o0)),o0}add(e0){_0(this,vR).has(e0.queryHash)||(_0(this,vR).set(e0.queryHash,e0),this.notify({type:"added",query:e0}))}remove(e0){const n0=_0(this,vR).get(e0.queryHash);n0&&(e0.destroy(),n0===e0&&_0(this,vR).delete(e0.queryHash),this.notify({type:"removed",query:e0}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(e0=>{this.remove(e0)})})}get(e0){return _0(this,vR).get(e0)}getAll(){return[..._0(this,vR).values()]}find(e0){const n0={exact:!0,...e0};return this.getAll().find(a0=>matchQuery(n0,a0))}findAll(e0={}){const n0=this.getAll();return Object.keys(e0).length>0?n0.filter(a0=>matchQuery(e0,a0)):n0}notify(e0){notifyManager.batch(()=>{this.listeners.forEach(n0=>{n0(e0)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(e0=>{e0.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(e0=>{e0.onOnline()})})}},vR=new WeakMap,y5),ER,k_,fP,wR,x$,b5,Mutation=(b5=class extends Removable{constructor(e0){super();K0(this,wR);K0(this,ER);K0(this,k_);K0(this,fP);this.mutationId=e0.mutationId,V0(this,k_,e0.mutationCache),V0(this,ER,[]),this.state=e0.state||getDefaultState(),this.setOptions(e0.options),this.scheduleGc()}setOptions(e0){this.options=e0,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e0){_0(this,ER).includes(e0)||(_0(this,ER).push(e0),this.clearGcTimeout(),_0(this,k_).notify({type:"observerAdded",mutation:this,observer:e0}))}removeObserver(e0){V0(this,ER,_0(this,ER).filter(n0=>n0!==e0)),this.scheduleGc(),_0(this,k_).notify({type:"observerRemoved",mutation:this,observer:e0})}optionalRemove(){_0(this,ER).length||(this.state.status==="pending"?this.scheduleGc():_0(this,k_).remove(this))}continue(){var e0;return((e0=_0(this,fP))==null?void 0:e0.continue())??this.execute(this.state.variables)}async execute(e0){var s0,o0,l0,c0,u0,d0,h0,f0,p0,A0,m0,x0,g0,y0,b0,E0,w0,v0,S0,k0;const n0=()=>{H0(this,wR,x$).call(this,{type:"continue"})};V0(this,fP,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e0):Promise.reject(new Error("No mutationFn found")),onFail:(R0,j0)=>{H0(this,wR,x$).call(this,{type:"failed",failureCount:R0,error:j0})},onPause:()=>{H0(this,wR,x$).call(this,{type:"pause"})},onContinue:n0,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_0(this,k_).canRun(this)}));const a0=this.state.status==="pending",i0=!_0(this,fP).canStart();try{if(a0)n0();else{H0(this,wR,x$).call(this,{type:"pending",variables:e0,isPaused:i0}),await((o0=(s0=_0(this,k_).config).onMutate)==null?void 0:o0.call(s0,e0,this));const j0=await((c0=(l0=this.options).onMutate)==null?void 0:c0.call(l0,e0));j0!==this.state.context&&H0(this,wR,x$).call(this,{type:"pending",context:j0,variables:e0,isPaused:i0})}const R0=await _0(this,fP).start();return await((d0=(u0=_0(this,k_).config).onSuccess)==null?void 0:d0.call(u0,R0,e0,this.state.context,this)),await((f0=(h0=this.options).onSuccess)==null?void 0:f0.call(h0,R0,e0,this.state.context)),await((A0=(p0=_0(this,k_).config).onSettled)==null?void 0:A0.call(p0,R0,null,this.state.variables,this.state.context,this)),await((x0=(m0=this.options).onSettled)==null?void 0:x0.call(m0,R0,null,e0,this.state.context)),H0(this,wR,x$).call(this,{type:"success",data:R0}),R0}catch(R0){try{throw await((y0=(g0=_0(this,k_).config).onError)==null?void 0:y0.call(g0,R0,e0,this.state.context,this)),await((E0=(b0=this.options).onError)==null?void 0:E0.call(b0,R0,e0,this.state.context)),await((v0=(w0=_0(this,k_).config).onSettled)==null?void 0:v0.call(w0,void 0,R0,this.state.variables,this.state.context,this)),await((k0=(S0=this.options).onSettled)==null?void 0:k0.call(S0,void 0,R0,e0,this.state.context)),R0}finally{H0(this,wR,x$).call(this,{type:"error",error:R0})}}finally{_0(this,k_).runNext(this)}}},ER=new WeakMap,k_=new WeakMap,fP=new WeakMap,wR=new WeakSet,x$=function(e0){const n0=a0=>{switch(e0.type){case"failed":return{...a0,failureCount:e0.failureCount,failureReason:e0.error};case"pause":return{...a0,isPaused:!0};case"continue":return{...a0,isPaused:!1};case"pending":return{...a0,context:e0.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e0.isPaused,status:"pending",variables:e0.variables,submittedAt:Date.now()};case"success":return{...a0,data:e0.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a0,data:void 0,error:e0.error,failureCount:a0.failureCount+1,failureReason:e0.error,
506isPaused:!1,status:"error"}}};this.state=n0(this.state),notifyManager.batch(()=>{_0(this,ER).forEach(a0=>{a0.onMutationUpdate(e0)}),_0(this,k_).notify({mutation:this,type:"updated",action:e0})})},b5);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var HR,aR,t4,v5,MutationCache=(v5=class extends Subscribable{constructor(e0={}){super();K0(this,HR);K0(this,aR);K0(this,t4);this.config=e0,V0(this,HR,new Set),V0(this,aR,new Map),V0(this,t4,0)}build(e0,n0,a0){const i0=new Mutation({mutationCache:this,mutationId:++o_(this,t4)._,options:e0.defaultMutationOptions(n0),state:a0});return this.add(i0),i0}add(e0){_0(this,HR).add(e0);const n0=scopeFor(e0);if(typeof n0=="string"){const a0=_0(this,aR).get(n0);a0?a0.push(e0):_0(this,aR).set(n0,[e0])}this.notify({type:"added",mutation:e0})}remove(e0){if(_0(this,HR).delete(e0)){const n0=scopeFor(e0);if(typeof n0=="string"){const a0=_0(this,aR).get(n0);if(a0)if(a0.length>1){const i0=a0.indexOf(e0);i0!==-1&&a0.splice(i0,1)}else a0[0]===e0&&_0(this,aR).delete(n0)}}this.notify({type:"removed",mutation:e0})}canRun(e0){const n0=scopeFor(e0);if(typeof n0=="string"){const a0=_0(this,aR).get(n0),i0=a0==null?void 0:a0.find(s0=>s0.state.status==="pending");return!i0||i0===e0}else return!0}runNext(e0){var a0;const n0=scopeFor(e0);if(typeof n0=="string"){const i0=(a0=_0(this,aR).get(n0))==null?void 0:a0.find(s0=>s0!==e0&&s0.state.isPaused);return(i0==null?void 0:i0.continue())??Promise.resolve()}else return Promise.resolve()}clear(){notifyManager.batch(()=>{_0(this,HR).forEach(e0=>{this.notify({type:"removed",mutation:e0})}),_0(this,HR).clear(),_0(this,aR).clear()})}getAll(){return Array.from(_0(this,HR))}find(e0){const n0={exact:!0,...e0};return this.getAll().find(a0=>matchMutation(n0,a0))}findAll(e0={}){return this.getAll().filter(n0=>matchMutation(e0,n0))}notify(e0){notifyManager.batch(()=>{this.listeners.forEach(n0=>{n0(e0)})})}resumePausedMutations(){const e0=this.getAll().filter(n0=>n0.state.isPaused);return notifyManager.batch(()=>Promise.all(e0.map(n0=>n0.continue().catch(noop$7))))}},HR=new WeakMap,aR=new WeakMap,t4=new WeakMap,v5);function scopeFor(r0){var e0;return(e0=r0.options.scope)==null?void 0:e0.id}function infiniteQueryBehavior(r0){return{onFetch:(e0,n0)=>{var d0,h0,f0,p0,A0;const a0=e0.options,i0=(f0=(h0=(d0=e0.fetchOptions)==null?void 0:d0.meta)==null?void 0:h0.fetchMore)==null?void 0:f0.direction,s0=((p0=e0.state.data)==null?void 0:p0.pages)||[],o0=((A0=e0.state.data)==null?void 0:A0.pageParams)||[];let l0={pages:[],pageParams:[]},c0=0;const u0=async()=>{let m0=!1;const x0=b0=>{Object.defineProperty(b0,"signal",{enumerable:!0,get:()=>(e0.signal.aborted?m0=!0:e0.signal.addEventListener("abort",()=>{m0=!0}),e0.signal)})},g0=ensureQueryFn(e0.options,e0.fetchOptions),y0=async(b0,E0,w0)=>{if(m0)return Promise.reject();if(E0==null&&b0.pages.length)return Promise.resolve(b0);const S0=(()=>{const C0={client:e0.client,queryKey:e0.queryKey,pageParam:E0,direction:w0?"backward":"forward",meta:e0.options.meta};return x0(C0),C0})(),k0=await g0(S0),{maxPages:R0}=e0.options,j0=w0?addToStart:addToEnd;return{pages:j0(b0.pages,k0,R0),pageParams:j0(b0.pageParams,E0,R0)}};if(i0&&s0.length){const b0=i0==="backward",E0=b0?getPreviousPageParam:getNextPageParam,w0={pages:s0,pageParams:o0},v0=E0(a0,w0);l0=await y0(w0,v0,b0)}else{const b0=r0??s0.length;do{const E0=c0===0?o0[0]??a0.initialPageParam:getNextPageParam(a0,l0);if(c0>0&&E0==null)break;l0=await y0(l0,E0),c0++}while(c0<b0)}return l0};e0.options.persister?e0.fetchFn=()=>{var m0,x0;return(x0=(m0=e0.options).persister)==null?void 0:x0.call(m0,u0,{
vendor: 4,447 bytes, line 506
506client:e0.client,queryKey:e0.queryKey,meta:e0.options.meta,signal:e0.signal},n0)}:e0.fetchFn=u0}}}function getNextPageParam(r0,{pages:e0,pageParams:n0}){const a0=e0.length-1;return e0.length>0?r0.getNextPageParam(e0[a0],e0,n0[a0],n0):void 0}function getPreviousPageParam(r0,{pages:e0,pageParams:n0}){var a0;return e0.length>0?(a0=r0.getPreviousPageParam)==null?void 0:a0.call(r0,e0[0],e0,n0[0],n0):void 0}var K1,w$,S$,DL,LL,_$,BL,FL,E5,QueryClient=(E5=class{constructor(r0={}){K0(this,K1);K0(this,w$);K0(this,S$);K0(this,DL);K0(this,LL);K0(this,_$);K0(this,BL);K0(this,FL);V0(this,K1,r0.queryCache||new QueryCache),V0(this,w$,r0.mutationCache||new MutationCache),V0(this,S$,r0.defaultOptions||{}),V0(this,DL,new Map),V0(this,LL,new Map),V0(this,_$,0)}mount(){o_(this,_$)._++,_0(this,_$)===1&&(V0(this,BL,focusManager.subscribe(async r0=>{r0&&(await this.resumePausedMutations(),_0(this,K1).onFocus())})),V0(this,FL,onlineManager.subscribe(async r0=>{r0&&(await this.resumePausedMutations(),_0(this,K1).onOnline())})))}unmount(){var r0,e0;o_(this,_$)._--,_0(this,_$)===0&&((r0=_0(this,BL))==null||r0.call(this),V0(this,BL,void 0),(e0=_0(this,FL))==null||e0.call(this),V0(this,FL,void 0))}isFetching(r0){return _0(this,K1).findAll({...r0,fetchStatus:"fetching"}).length}isMutating(r0){return _0(this,w$).findAll({...r0,status:"pending"}).length}getQueryData(r0){var n0;const e0=this.defaultQueryOptions({queryKey:r0});return(n0=_0(this,K1).get(e0.queryHash))==null?void 0:n0.state.data}ensureQueryData(r0){const e0=this.defaultQueryOptions(r0),n0=_0(this,K1).build(this,e0),a0=n0.state.data;return a0===void 0?this.fetchQuery(r0):(r0.revalidateIfStale&&n0.isStaleByTime(resolveStaleTime(e0.staleTime,n0))&&this.prefetchQuery(e0),Promise.resolve(a0))}getQueriesData(r0){return _0(this,K1).findAll(r0).map(({queryKey:e0,state:n0})=>{const a0=n0.data;return[e0,a0]})}setQueryData(r0,e0,n0){const a0=this.defaultQueryOptions({queryKey:r0}),i0=_0(this,K1).get(a0.queryHash),s0=i0==null?void 0:i0.state.data,o0=functionalUpdate(e0,s0);if(o0!==void 0)return _0(this,K1).build(this,a0).setData(o0,{...n0,manual:!0})}setQueriesData(r0,e0,n0){return notifyManager.batch(()=>_0(this,K1).findAll(r0).map(({queryKey:a0})=>[a0,this.setQueryData(a0,e0,n0)]))}getQueryState(r0){var n0;const e0=this.defaultQueryOptions({queryKey:r0});return(n0=_0(this,K1).get(e0.queryHash))==null?void 0:n0.state}removeQueries(r0){const e0=_0(this,K1);notifyManager.batch(()=>{e0.findAll(r0).forEach(n0=>{e0.remove(n0)})})}resetQueries(r0,e0){const n0=_0(this,K1);return notifyManager.batch(()=>(n0.findAll(r0).forEach(a0=>{a0.reset()}),this.refetchQueries({type:"active",...r0},e0)))}cancelQueries(r0,e0={}){const n0={revert:!0,...e0},a0=notifyManager.batch(()=>_0(this,K1).findAll(r0).map(i0=>i0.cancel(n0)));return Promise.all(a0).then(noop$7).catch(noop$7)}invalidateQueries(r0,e0={}){return notifyManager.batch(()=>(_0(this,K1).findAll(r0).forEach(n0=>{n0.invalidate()}),(r0==null?void 0:r0.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r0,type:(r0==null?void 0:r0.refetchType)??(r0==null?void 0:r0.type)??"active"},e0)))}refetchQueries(r0,e0={}){const n0={...e0,cancelRefetch:e0.cancelRefetch??!0},a0=notifyManager.batch(()=>_0(this,K1).findAll(r0).filter(i0=>!i0.isDisabled()&&!i0.isStatic()).map(i0=>{let s0=i0.fetch(void 0,n0);return n0.throwOnError||(s0=s0.catch(noop$7)),i0.state.fetchStatus==="paused"?Promise.resolve():s0}));return Promise.all(a0).then(noop$7)}fetchQuery(r0){const e0=this.defaultQueryOptions(r0);e0.retry===void 0&&(e0.retry=!1);const n0=_0(this,K1).build(this,e0);return n0.isStaleByTime(resolveStaleTime(e0.staleTime,n0))?n0.fetch(e0):Promise.resolve(n0.state.data)}prefetchQuery(r0){return this.fetchQuery(r0).then(noop$7).catch(noop$7)}fetchInfiniteQuery(r0){return r0.behavior=infiniteQueryBehavior(r0.pages),this.fetchQuery(r0)}prefetchInfiniteQuery(r0){return this.fetchInfiniteQuery(r0).then(noop$7).catch(noop$7)}ensureInfiniteQueryData(r0){return r0.behavior=infiniteQueryBehavior(r0.pages),this.ensureQueryData(r0)}resumePausedMutations(){return onlineManager.isOnline()?_0(this,w$).resumePausedMutations():Promise.resolve()}getQueryCache(){return _0(this,K1)}getMutationCache(){return _0(this,w$)}getDefaultOptions(){return _0(this,S$)}setDefaultOptions(r0){V0(this,S$,r0)}setQueryDefaults(r0,e0){_0(this,DL).set(hashKey(r0),{queryKey:r0,defaultOptions:e0})}getQueryDefaults(r0){const e0=[..._0(this,DL).values()],n0={};
506return e0.forEach(a0=>{partialMatchKey(r0,a0.queryKey)&&Object.assign(n0,a0.defaultOptions)}),n0}setMutationDefaults(r0,e0){_0(this,LL).set(hashKey(r0),{mutationKey:r0,defaultOptions:e0})}getMutationDefaults(r0){const e0=[..._0(this,LL).values()],n0={};return e0.forEach(a0=>{partialMatchKey(r0,a0.mutationKey)&&Object.assign(n0,a0.defaultOptions)}),n0}defaultQueryOptions(r0){if(r0._defaulted)return r0;const e0={..._0(this,S$).queries,...this.getQueryDefaults(r0.queryKey),...r0,_defaulted:!0};return e0.queryHash||(e0.queryHash=hashQueryKeyByOptions(e0.queryKey,e0)),e0.refetchOnReconnect===void 0&&(e0.refetchOnReconnect=e0.networkMode!=="always"),e0.throwOnError===void 0&&(e0.throwOnError=!!e0.suspense),!e0.networkMode&&e0.persister&&(e0.networkMode="offlineFirst"),e0.queryFn===skipToken&&(e0.enabled=!1),e0}defaultMutationOptions(r0){return r0!=null&&r0._defaulted?r0:{..._0(this,S$).mutations,...(r0==null?void 0:r0.mutationKey)&&this.getMutationDefaults(r0.mutationKey),...r0,_defaulted:!0}}clear(){_0(this,K1).clear(),_0(this,w$).clear()}},K1=new WeakMap,w$=new WeakMap,S$=new WeakMap,DL=new WeakMap,LL=new WeakMap,_$=new WeakMap,BL=new WeakMap,FL=new WeakMap,E5),QueryClientContext=reactExports.createContext(void 0),QueryClientProvider=({client:r0,children:e0})=>(reactExports.useEffect(()=>(r0.mount(),()=>{r0.unmount()}),[r0]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:r0,children:e0}));/** 507 * @remix-run/router v1.23.0 508 * 509 * Copyright (c) Remix Software Inc. 510 * 511 * This source code is licensed under the MIT license found in the 512 * LICENSE.md file in the root directory of this source tree. 513 * 514 * @license MIT 515 */function _extends$p(){return _extends$p=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$p.apply(this,arguments)}var Action$1;(function(r0){r0.Pop="POP",r0.Push="PUSH",r0.Replace="REPLACE"})(Action$1||(Action$1={}));const PopStateEventType="popstate";function createBrowserHistory(r0){r0===void 0&&(r0={});function e0(a0,i0){let{pathname:s0,search:o0,hash:l0}=a0.location;return createLocation("",{pathname:s0,search:o0,hash:l0},i0.state&&i0.state.usr||null,i0.state&&i0.state.key||"default")}function n0(a0,i0){return typeof i0=="string"?i0:createPath(i0)}return getUrlBasedHistory(e0,n0,null,r0)}function invariant$1(r0,e0){if(r0===!1||r0===null||typeof r0>"u")throw new Error(e0)}function warning(r0,e0){if(!r0){typeof console<"u"&&console.warn(e0);try{throw new Error(e0)}catch{}}}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(r0,e0){return{usr:r0.state,key:r0.key,idx:e0}}function createLocation(r0,e0,n0,a0){return n0===void 0&&(n0=null),_extends$p({pathname:typeof r0=="string"?r0:r0.pathname,search:"",hash:""},typeof e0=="string"?parsePath(e0):e0,{state:n0,key:e0&&e0.key||a0||createKey()})}function createPath(r0){let{pathname:e0="/",search:n0="",hash:a0=""}=r0;return n0&&n0!=="?"&&(e0+=n0.charAt(0)==="?"?n0:"?"+n0),a0&&a0!=="#"&&(e0+=a0.charAt(0)==="#"?a0:"#"+a0),e0}function parsePath(r0){let e0={};if(r0){let n0=r0.indexOf("#");n0>=0&&(e0.hash=r0.substr(n0),r0=r0.substr(0,n0));let a0=r0.indexOf("?");a0>=0&&(e0.search=r0.substr(a0),r0=r0.substr(0,a0)),r0&&(e0.pathname=r0)}return e0}function getUrlBasedHistory(r0,e0,n0,a0){a0===void 0&&(a0={});let{window:i0=document.defaultView,v5Compat:s0=!1}=a0,o0=i0.history,l0=Action$1.Pop,c0=null,u0=d0();u0==null&&(u0=0,o0.replaceState(_extends$p({},o0.state,{idx:u0}),""));function d0(){return(o0.state||{idx:null}).idx}function h0(){l0=Action$1.Pop;let x0=d0(),g0=x0==null?null:x0-u0;u0=x0,c0&&c0({action:l0,location:m0.location,delta:g0})}function f0(x0,g0){l0=Action$1.Push;let y0=createLocation(m0.location,x0,g0);u0=d0()+1;let b0=getHistoryState(y0,u0),E0=m0.createHref(y0);try{o0.pushState(b0,"",E0)}catch(w0){if(w0 instanceof DOMException&&w0.name==="DataCloneError")throw w0;i0.location.assign(E0)}s0&&c0&&c0({action:l0,location:m0.location,delta:1})}function p0(x0,g0){l0=Action$1.Replace;let y0=createLocation(m0.location,x0,g0);u0=d0();let b0=getHistoryState(y0,u0),E0=m0.createHref(y0);o0.replaceState(b0,"",E0),s0&&c0&&c0({action:l0,location:m0.location,delta:0})}function A0(x0){let g0=i0.location.origin!=="null"?i0.location.origin:i0.location.href,y0=typeof x0=="str
515ing"?x0:createPath(x0);return y0=y0.replace(/ $/,"%20"),invariant$1(g0,"No window.location.(origin|href) available to create URL for href: "+y0),new URL(y0,g0)}let m0={get action(){return l0},get location(){return r0(i0,o0)},listen(x0){if(c0)throw new Error("A history only accepts one active listener");return i0.addEventListener(PopStateEventType,h0),c0=x0,()=>{i0.removeEventListener(PopStateEventType,h0),c0=null}},createHref(x0){return e0(i0,x0)},createURL:A0,encodeLocation(x0){let g0=A0(x0);return{pathname:g0.pathname,search:g0.search,hash:g0.hash}},push:f0,replace:p0,go(x0){return o0.go(x0)}};return m0}var ResultType;(function(r0){r0.data="data",r0.deferred="deferred",r0.redirect="redirect",r0.error="error"})(ResultType||(ResultType={}));function matchRoutes(r0,e0,n0){return n0===void 0&&(n0="/"),matchRoutesImpl(r0,e0,n0,!1)}function matchRoutesImpl(r0,e0,n0,a0){let i0=typeof e0=="string"?parsePath(e0):e0,s0=stripBasename(i0.pathname||"/",n0);if(s0==null)return null;let o0=flattenRoutes(r0);rankRouteBranches(o0);let l0=null;for(let c0=0;l0==null&&c0<o0.length;++c0){let u0=decodePath(s0);l0=matchRouteBranch(o0[c0],u0,a0)}return l0}function flattenRoutes(r0,e0,n0,a0){e0===void 0&&(e0=[]),n0===void 0&&(n0=[]),a0===void 0&&(a0="");let i0=(s0,o0,l0)=>{let c0={relativePath:l0===void 0?s0.path||"":l0,caseSensitive:s0.caseSensitive===!0,childrenIndex:o0,route:s0};c0.relativePath.startsWith("/")&&(invariant$1(c0.relativePath.startsWith(a0),'Absolute route path "'+c0.relativePath+'" nested under path '+('"'+a0+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c0.relativePath=c0.relativePath.slice(a0.length));let u0=joinPaths([a0,c0.relativePath]),d0=n0.concat(c0);s0.children&&s0.children.length>0&&(invariant$1(s0.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u0+'".')),flattenRoutes(s0.children,e0,d0,u0)),!(s0.path==null&&!s0.index)&&e0.push({path:u0,score:computeScore(u0,s0.index),routesMeta:d0})};return r0.forEach((s0,o0)=>{var l0;if(s0.path===""||!((l0=s0.path)!=null&&l0.includes("?")))i0(s0,o0);else for(let c0 of explodeOptionalSegments(s0.path))i0(s0,o0,c0)}),e0}function explodeOptionalSegments(r0){let e0=r0.split("/");if(e0.length===0)return[];let[n0,...a0]=e0,i0=n0.endsWith("?"),s0=n0.replace(/\?$/,"");if(a0.length===0)return i0?[s0,""]:[s0];let o0=explodeOptionalSegments(a0.join("/")),l0=[];return l0.push(...o0.map(c0=>c0===""?s0:[s0,c0].join("/"))),i0&&l0.push(...o0),l0.map(c0=>r0.startsWith("/")&&c0===""?"/":c0)}function rankRouteBranches(r0){r0.sort((e0,n0)=>e0.score!==n0.score?n0.score-e0.score:compareIndexes(e0.routesMeta.map(a0=>a0.childrenIndex),n0.routesMeta.map(a0=>a0.childrenIndex)))}const paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=r0=>r0==="*";function computeScore(r0,e0){let n0=r0.split("/"),a0=n0.length;return n0.some(isSplat)&&(a0+=splatPenalty),e0&&(a0+=indexRouteValue),n0.filter(i0=>!isSplat(i0)).reduce((i0,s0)=>i0+(paramRe.test(s0)?dynamicSegmentValue:s0===""?emptySegmentValue:staticSegmentValue),a0)}function compareIndexes(r0,e0){return r0.length===e0.length&&r0.slice(0,-1).every((a0,i0)=>a0===e0[i0])?r0[r0.length-1]-e0[e0.length-1]:0}function matchRouteBranch(r0,e0,n0){let{routesMeta:a0}=r0,i0={},s0="/",o0=[];for(let l0=0;l0<a0.length;++l0){let c0=a0[l0],u0=l0===a0.length-1,d0=s0==="/"?e0:e0.slice(s0.length)||"/",h0=matchPath({path:c0.relativePath,caseSensitive:c0.caseSensitive,end:u0},d0),f0=c0.route;if(!h0&&u0&&n0&&!a0[a0.length-1].route.index&&(h0=matchPath({path:c0.relativePath,caseSensitive:c0.caseSensitive,end:!1},d0)),!h0)return null;
vendor: 11,356 bytes, lines 515-524
515Object.assign(i0,h0.params),o0.push({params:i0,pathname:joinPaths([s0,h0.pathname]),pathnameBase:normalizePathname(joinPaths([s0,h0.pathnameBase])),route:f0}),h0.pathnameBase!=="/"&&(s0=joinPaths([s0,h0.pathnameBase]))}return o0}function matchPath(r0,e0){typeof r0=="string"&&(r0={path:r0,caseSensitive:!1,end:!0});let[n0,a0]=compilePath(r0.path,r0.caseSensitive,r0.end),i0=e0.match(n0);if(!i0)return null;let s0=i0[0],o0=s0.replace(/(.)\/+$/,"$1"),l0=i0.slice(1);return{params:a0.reduce((u0,d0,h0)=>{let{paramName:f0,isOptional:p0}=d0;if(f0==="*"){let m0=l0[h0]||"";o0=s0.slice(0,s0.length-m0.length).replace(/(.)\/+$/,"$1")}const A0=l0[h0];return p0&&!A0?u0[f0]=void 0:u0[f0]=(A0||"").replace(/%2F/g,"/"),u0},{}),pathname:s0,pathnameBase:o0,pattern:r0}}function compilePath(r0,e0,n0){e0===void 0&&(e0=!1),n0===void 0&&(n0=!0),warning(r0==="*"||!r0.endsWith("*")||r0.endsWith("/*"),'Route path "'+r0+'" will be treated as if it were '+('"'+r0.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r0.replace(/\*$/,"/*")+'".'));let a0=[],i0="^"+r0.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o0,l0,c0)=>(a0.push({paramName:l0,isOptional:c0!=null}),c0?"/?([^\\/]+)?":"/([^\\/]+)"));return r0.endsWith("*")?(a0.push({paramName:"*"}),i0+=r0==="*"||r0==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n0?i0+="\\/*$":r0!==""&&r0!=="/"&&(i0+="(?:(?=\\/|$))"),[new RegExp(i0,e0?void 0:"i"),a0]}function decodePath(r0){try{return r0.split("/").map(e0=>decodeURIComponent(e0).replace(/\//g,"%2F")).join("/")}catch(e0){return warning(!1,'The URL path "'+r0+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e0+").")),r0}}function stripBasename(r0,e0){if(e0==="/")return r0;if(!r0.toLowerCase().startsWith(e0.toLowerCase()))return null;let n0=e0.endsWith("/")?e0.length-1:e0.length,a0=r0.charAt(n0);return a0&&a0!=="/"?null:r0.slice(n0)||"/"}function resolvePath(r0,e0){e0===void 0&&(e0="/");let{pathname:n0,search:a0="",hash:i0=""}=typeof r0=="string"?parsePath(r0):r0;return{pathname:n0?n0.startsWith("/")?n0:resolvePathname(n0,e0):e0,search:normalizeSearch(a0),hash:normalizeHash(i0)}}function resolvePathname(r0,e0){let n0=e0.replace(/\/+$/,"").split("/");return r0.split("/").forEach(i0=>{i0===".."?n0.length>1&&n0.pop():i0!=="."&&n0.push(i0)}),n0.length>1?n0.join("/"):"/"}function getInvalidPathError(r0,e0,n0,a0){return"Cannot include a '"+r0+"' character in a manually specified "+("`to."+e0+"` field ["+JSON.stringify(a0)+"]. Please separate it out to the ")+("`to."+n0+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function getPathContributingMatches(r0){return r0.filter((e0,n0)=>n0===0||e0.route.path&&e0.route.path.length>0)}function getResolveToMatches(r0,e0){let n0=getPathContributingMatches(r0);return e0?n0.map((a0,i0)=>i0===n0.length-1?a0.pathname:a0.pathnameBase):n0.map(a0=>a0.pathnameBase)}function resolveTo(r0,e0,n0,a0){a0===void 0&&(a0=!1);let i0;typeof r0=="string"?i0=parsePath(r0):(i0=_extends$p({},r0),invariant$1(!i0.pathname||!i0.pathname.includes("?"),getInvalidPathError("?","pathname","search",i0)),invariant$1(!i0.pathname||!i0.pathname.includes("#"),getInvalidPathError("#","pathname","hash",i0)),invariant$1(!i0.search||!i0.search.includes("#"),getInvalidPathError("#","search","hash",i0)));let s0=r0===""||i0.pathname==="",o0=s0?"/":i0.pathname,l0;if(o0==null)l0=n0;else{let h0=e0.length-1;if(!a0&&o0.startsWith("..")){let f0=o0.split("/");for(;f0[0]==="..";)f0.shift(),h0-=1;i0.pathname=f0.join("/")}l0=h0>=0?e0[h0]:"/"}let c0=resolvePath(i0,l0),u0=o0&&o0!=="/"&&o0.endsWith("/"),d0=(s0||o0===".")&&n0.endsWith("/");return!c0.pathname.endsWith("/")&&(u0||d0)&&(c0.pathname+="/"),c0}const joinPaths=r0=>r0.join("/").replace(/\/\/+/g,"/"),normalizePathname=r0=>r0.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=r0=>!r0||r0==="?"?"":r0.startsWith("?")?r0:"?"+r0,normalizeHash=r0=>!r0||r0==="#"?"":r0.startsWith("#")?r0:"#"+r0;function isRouteErrorResponse(r0){return r0!=null&&typeof r0.status=="number"&&typeof r0.statusText=="string"&&typeof r0.internal=="boolean"&&"data"in r0}const validMutationMethodsArr=["post","put","patch","delete"];new Set(validMutationMethodsArr);const validRequestMethodsArr=["get",...validMutationMethodsArr];new Set(validRequestMethodsArr);/** 516 * React Router v6.30.1 517 * 518 * Copyright (c) Remix Software Inc. 519 * 520 * This source code is licensed under the MIT license found in the 521 * LICENSE.md file in the root directory of this source tree. 522 * 523 * @license MIT 524 */function _extends$o(){return _extends$o=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$o.apply(this,arguments)}const DataRouterContext=reactExports.createContext(null),DataRouterStateContext=reactExports.createContext(null),NavigationContext=reactExports.createContext(null),LocationContext=reactExports.createContext(null),RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1}),RouteErrorContext=reactExports.createContext(null);function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return useInRouterContext()||invariant$1(!1),reactExports.useContext(LocationContext).location}function useIsomorphicLayoutEffect$2(r0){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(r0)}function useNavigate(){let{isDataRoute:r0}=reactExports.useContext(RouteContext);return r0?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){useInRouterContext()||invariant$1(!1);let r0=reactExports.useContext(DataRouterContext),{basename:e0,future:n0,navigator:a0}=reactExports.useContext(NavigationContext),{matches:i0}=reactExports.useContext(RouteContext),{pathname:s0}=useLocation(),o0=JSON.stringify(getResolveToMatches(i0,n0.v7_relativeSplatPath)),l0=reactExports.useRef(!1);return useIsomorphicLayoutEffect$2(()=>{l0.current=!0}),reactExports.useCallback(function(u0,d0){if(d0===void 0&&(d0={}),!l0.current)return;if(typeof u0=="number"){a0.go(u0);return}let h0=resolveTo(u0,JSON.parse(o0),s0,d0.relative==="path");r0==null&&e0!=="/"&&(h0.pathname=h0.pathname==="/"?e0:joinPaths([e0,h0.pathname])),(d0.replace?a0.replace:a0.push)(h0,d0.state,d0)},[e0,a0,o0,s0,r0])}function useParams(){let{matches:r0}=reactExports.useContext(RouteContext),e0=r0[r0.length-1];return e0?e0.params:{}}function useRoutes(r0,e0){return useRoutesImpl(r0,e0)}function useRoutesImpl(r0,e0,n0,a0){useInRouterContext()||invariant$1(!1);let{navigator:i0}=reactExports.useContext(NavigationContext),{matches:s0}=reactExports.useContext(RouteContext),o0=s0[s0.length-1],l0=o0?o0.params:{};o0&&o0.pathname;let c0=o0?o0.pathnameBase:"/";o0&&o0.route;let u0=useLocation(),d0;if(e0){var h0;let x0=typeof e0=="string"?parsePath(e0):e0;c0==="/"||(h0=x0.pathname)!=null&&h0.startsWith(c0)||invariant$1(!1),d0=x0}else d0=u0;let f0=d0.pathname||"/",p0=f0;if(c0!=="/"){let x0=c0.replace(/^\//,"").split("/");p0="/"+f0.replace(/^\//,"").split("/").slice(x0.length).join("/")}let A0=matchRoutes(r0,{pathname:p0}),m0=_renderMatches(A0&&A0.map(x0=>Object.assign({},x0,{params:Object.assign({},l0,x0.params),pathname:joinPaths([c0,i0.encodeLocation?i0.encodeLocation(x0.pathname).pathname:x0.pathname]),pathnameBase:x0.pathnameBase==="/"?c0:joinPaths([c0,i0.encodeLocation?i0.encodeLocation(x0.pathnameBase).pathname:x0.pathnameBase])})),s0,n0,a0);return e0&&m0?reactExports.createElement(LocationContext.Provider,{value:{location:_extends$o({pathname:"/",search:"",hash:"",state:null,key:"default"},d0),navigationType:Action$1.Pop}},m0):m0}function DefaultErrorComponent(){let r0=useRouteError(),e0=isRouteErrorResponse(r0)?r0.status+" "+r0.statusText:r0 instanceof Error?r0.message:JSON.stringify(r0),n0=r0 instanceof Error?r0.stack:null,i0={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},e0),n0?reactExports.createElement("pre",{style:i0},n0):null,null)}const defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null);class RenderErrorBoundary extends reactExports.Component{constructor(e0){super(e0),this.state={location:e0.location,revalidation:e0.revalidation,error:e0.error}}static getDerivedStateFromError(e0){return{error:e0}}static getDerivedStateFromProps(e0,n0){return n0.location!==e0.location||n0.revalidation!=="idle"&&e0.revalidation==="idle"?{error:e0.error,location:e0.location,revalidation:e0.revalidation}:{error:e0.error!==void 0?e0.error:n0.error,location:n0.location,revalidation:e0.revalidation||n0.revalidation}}componentDidCatch(e0,n0){console.error("React Router caught the following error during render",e0,n0)}render(){return this.state.error!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RenderedRoute(r0){let{routeContext:e0,match:n0,children:a0}=r0,i0=reactExports.useContext(DataRouterContext);return i0&&i0.static&&i0.staticContext&&(n0.route.errorElement||n0.route.ErrorBoundary)&&(i0.staticContext._deepestRenderedBoundaryId=n0.route.id),reactExports.createElement(RouteContext.Provider,{value:e0},a0)}function _renderMatches(r0,e0,n0,a0){var i0;if(e0===void 0&&(e0=[]),n0===void 0&&(n0=null),a0===void 0&&(a0=null),r0==null){var s0;if(!n0)return null;if(n0.errors)r0=n0.matches;else if((s0=a0)!=null&&s0.v7_partialHydration&&e0.length===0&&!n0.initialized&&n0.matches.length>0)r0=n0.matches;else return null}let o0=r0,l0=(i0=n0)==null?void 0:i0.errors;if(l0!=null){let d0=o0.findIndex(h0=>h0.route.id&&(l0==null?void 0:l0[h0.route.id])!==void 0);d0>=0||invariant$1(!1),o0=o0.slice(0,Math.min(o0.length,d0+1))}let c0=!1,u0=-1;if(n0&&a0&&a0.v7_partialHydration)for(let d0=0;d0<o0.length;d0++){let h0=o0[d0];if((h0.route.HydrateFallback||h0.route.hydrateFallbackElement)&&(u0=d0),h0.route.id){let{loaderData:f0,errors:p0}=n0,A0=h0.route.loader&&f0[h0.route.id]===void 0&&(!p0||p0[h0.route.id]===void 0);if(h0.route.lazy||A0){c0=!0,u0>=0?o0=o0.slice(0,u0+1):o0=[o0[0]];break}}}return o0.reduceRight((d0,h0,f0)=>{let p0,A0=!1,m0=null,x0=null;n0&&(p0=l0&&h0.route.id?l0[h0.route.id]:void 0,m0=h0.route.errorElement||defaultErrorElement,c0&&(u0<0&&f0===0?(A0=!0,x0=null):u0===f0&&(A0=!0,x0=h0.route.hydrateFallbackElement||null)));let g0=e0.concat(o0.slice(0,f0+1)),y0=()=>{let b0;return p0?b0=m0:A0?b0=x0:h0.route.Component?b0=reactExports.createElement(h0.route.Component,null):h0.route.element?b0=h0.route.element:b0=d0,reactExports.createElement(RenderedRoute,{match:h0,routeContext:{outlet:d0,matches:g0,isDataRoute:n0!=null},children:b0})};return n0&&(h0.route.ErrorBoundary||h0.route.errorElement||f0===0)?reactExports.createElement(RenderErrorBoundary,{location:n0.location,revalidation:n0.revalidation,component:m0,error:p0,children:y0(),routeC
524ontext:{outlet:null,matches:g0,isDataRoute:!0}}):y0()},null)}var DataRouterHook$1=function(r0){return r0.UseBlocker="useBlocker",r0.UseRevalidator="useRevalidator",r0.UseNavigateStable="useNavigate",r0}(DataRouterHook$1||{}),DataRouterStateHook$1=function(r0){return r0.UseBlocker="useBlocker",r0.UseLoaderData="useLoaderData",r0.UseActionData="useActionData",r0.UseRouteError="useRouteError",r0.UseNavigation="useNavigation",r0.UseRouteLoaderData="useRouteLoaderData",r0.UseMatches="useMatches",r0.UseRevalidator="useRevalidator",r0.UseNavigateStable="useNavigate",r0.UseRouteId="useRouteId",r0}(DataRouterStateHook$1||{});function useDataRouterContext(r0){let e0=reactExports.useContext(DataRouterContext);return e0||invariant$1(!1),e0}function useDataRouterState(r0){let e0=reactExports.useContext(DataRouterStateContext);return e0||invariant$1(!1),e0}function useRouteContext(r0){let e0=reactExports.useContext(RouteContext);return e0||invariant$1(!1),e0}function useCurrentRouteId(r0){let e0=useRouteContext(),n0=e0.matches[e0.matches.length-1];return n0.route.id||invariant$1(!1),n0.route.id}function useRouteError(){var r0;let e0=reactExports.useContext(RouteErrorContext),n0=useDataRouterState(DataRouterStateHook$1.UseRouteError),a0=useCurrentRouteId(DataRouterStateHook$1.UseRouteError);return e0!==void 0?e0:(r0=n0.errors)==null?void 0:r0[a0]}function useNavigateStable(){let{router:r0}=useDataRouterContext(DataRouterHook$1.UseNavigateStable),e0=useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable),n0=reactExports.useRef(!1);return useIsomorphicLayoutEffect$2(()=>{n0.current=!0}),reactExports.useCallback(function(i0,s0){s0===void 0&&(s0={}),n0.current&&(typeof i0=="number"?r0.navigate(i0):r0.navigate(i0,_extends$o({fromRouteId:e0},s0)))},[r0,e0])}function logV6DeprecationWarnings(r0,e0){r0==null||r0.v7_startTransition,r0==null||r0.v7_relativeSplatPath}function Navigate(r0){let{to:e0,replace:n0,state:a0,relative:i0}=r0;useInRouterContext()||invariant$1(!1);let{future:s0,static:o0}=reactExports.useContext(NavigationContext),{matches:l0}=reactExports.useContext(RouteContext),{pathname:c0}=useLocation(),u0=useNavigate(),d0=resolveTo(e0,getResolveToMatches(l0,s0.v7_relativeSplatPath),c0,i0==="path"),h0=JSON.stringify(d0);return reactExports.useEffect(()=>u0(JSON.parse(h0),{replace:n0,state:a0,relative:i0}),[u0,h0,i0,n0,a0]),null}function Route(r0){invariant$1(!1)}function Router(r0){let{basename:e0="/",children:n0=null,location:a0,navigationType:i0=Action$1.Pop,navigator:s0,static:o0=!1,future:l0}=r0;useInRouterContext()&&invariant$1(!1);let c0=e0.replace(/^\/*/,"/"),u0=reactExports.useMemo(()=>({basename:c0,navigator:s0,static:o0,future:_extends$o({v7_relativeSplatPath:!1},l0)}),[c0,l0,s0,o0]);typeof a0=="string"&&(a0=parsePath(a0));let{pathname:d0="/",search:h0="",hash:f0="",state:p0=null,key:A0="default"}=a0,m0=reactExports.useMemo(()=>{let x0=stripBasename(d0,c0);return x0==null?null:{location:{pathname:x0,search:h0,hash:f0,state:p0,key:A0},navigationType:i0}},[c0,d0,h0,f0,p0,A0,i0]);return m0==null?null:reactExports.createElement(NavigationContext.Provider,{value:u0},reactExports.createElement(LocationContext.Provider,{children:n0,value:m0}))}function Routes(r0){let{children:e0,location:n0}=r0;return useRoutes(createRoutesFromChildren(e0),n0)}new Promise(()=>{});function createRoutesFromChildren(r0,e0){e0===void 0&&(e0=[]);let n0=[];return reactExports.Children.forEach(r0,(a0,i0)=>{if(!reactExports.isValidElement(a0))return;let s0=[...e0,i0];if(a0.type===reactExports.Fragment){n0.push.apply(n0,createRoutesFromChildren(a0.props.children,s0));return}a0.type!==Route&&invariant$1(!1),!a0.props.index||!a0.props.children||invariant$1(!1);let o0={id:a0.props.id||s0.join("-"),caseSensitive:a0.props.caseSensitive,element:a0.props.element,Component:a0.props.Component,index:a0.props.index,path:a0.props.path,loader:a0.props.loader,action:a0.props.action,errorElement:a0.props.errorElement,ErrorBoundary:a0.props.ErrorBoundary,hasErrorBoundary:a0.props.ErrorBoundary!=null||a0.props.errorElement!=null,shouldRevalidate:a0.props.shouldRevalidate,handle:a0.props.handle,lazy:a0.props.lazy};a0.props.children&&(o0.children=createRoutesFromChildren(a0.props.children,s0)),n0.push(o0)}),n0}/** 525 * React Router DOM v6.30.1 526 * 527 * Copyright (c) Remix Software Inc. 528 * 529 * This source code is licensed under the MIT license found in the 530 * LICENSE.md file in the root directory of this source tree. 531 * 532 * @license MIT 533 */function createSearchParams(r0){return r0===void 0&&(r0=""),new URLSearchParams(typeof r0=="string"||Array.isArray(r0)||r0 instanceof URLSearchParams?r0:Object.keys(r0).reduce((e0,n0)=>{let a0=r0[n0];return e0.concat(Array.isArray(a0)?a0.map(i0=>[n0,i0]):[[n0,a0]])},[]))}function getSearchParamsForLocation(r0,e0){let n0=createSearchParams(r0);
533return e0&&e0.forEach((a0,i0)=>{n0.has(i0)||e0.getAll(i0).forEach(s0=>{n0.append(i0,s0)})}),n0}const REACT_ROUTER_VERSION="6";try{window.__reactRouterVersion=REACT_ROUTER_VERSION}catch{}const START_TRANSITION="startTransition",startTransitionImpl=React$1[START_TRANSITION];function BrowserRouter(r0){let{basename:e0,children:n0,future:a0,window:i0}=r0,s0=reactExports.useRef();s0.current==null&&(s0.current=createBrowserHistory({window:i0,v5Compat:!0}));let o0=s0.current,[l0,c0]=reactExports.useState({action:o0.action,location:o0.location}),{v7_startTransition:u0}=a0||{},d0=reactExports.useCallback(h0=>{u0&&startTransitionImpl?startTransitionImpl(()=>c0(h0)):c0(h0)},[c0,u0]);return reactExports.useLayoutEffect(()=>o0.listen(d0),[o0,d0]),reactExports.useEffect(()=>logV6DeprecationWarnings(a0),[a0]),reactExports.createElement(Router,{basename:e0,children:n0,location:l0.location,navigationType:l0.action,navigator:o0,future:a0})}var DataRouterHook;(function(r0){r0.UseScrollRestoration="useScrollRestoration",r0.UseSubmit="useSubmit",r0.UseSubmitFetcher="useSubmitFetcher",r0.UseFetcher="useFetcher",r0.useViewTransitionState="useViewTransitionState"})(DataRouterHook||(DataRouterHook={}));var DataRouterStateHook;(function(r0){r0.UseFetcher="useFetcher",r0.UseFetchers="useFetchers",r0.UseScrollRestoration="useScrollRestoration"})(DataRouterStateHook||(DataRouterStateHook={}));function useSearchParams(r0){let e0=reactExports.useRef(createSearchParams(r0)),n0=reactExports.useRef(!1),a0=useLocation(),i0=reactExports.useMemo(()=>getSearchParamsForLocation(a0.search,n0.current?null:e0.current),[a0.search]),s0=useNavigate(),o0=reactExports.useCallback((l0,c0)=>{const u0=createSearchParams(typeof l0=="function"?l0(i0):l0);n0.current=!0,s0("?"+u0,c0)},[s0,i0]);return[i0,o0]}var __assign=function(){return __assign=Object.assign||function(e0){for(var n0,a0=1,i0=arguments.length;a0<i0;a0++){n0=arguments[a0];for(var s0 in n0)Object.prototype.hasOwnProperty.call(n0,s0)&&(e0[s0]=n0[s0])}return e0},__assign.apply(this,arguments)};function __rest(r0,e0){var n0={};for(var a0 in r0)Object.prototype.hasOwnProperty.call(r0,a0)&&e0.indexOf(a0)<0&&(n0[a0]=r0[a0]);if(r0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i0=0,a0=Object.getOwnPropertySymbols(r0);i0<a0.length;i0++)e0.indexOf(a0[i0])<0&&Object.prototype.propertyIsEnumerable.call(r0,a0[i0])&&(n0[a0[i0]]=r0[a0[i0]]);return n0}function __awaiter(r0,e0,n0,a0){function i0(s0){return s0 instanceof n0?s0:new n0(function(o0){o0(s0)})}return new(n0||(n0=Promise))(function(s0,o0){function l0(d0){try{u0(a0.next(d0))}catch(h0){o0(h0)}}function c0(d0){try{u0(a0.throw(d0))}catch(h0){o0(h0)}}function u0(d0){d0.done?s0(d0.value):i0(d0.value).then(l0,c0)}u0((a0=a0.apply(r0,e0||[])).next())})}function __spreadArray(r0,e0,n0){if(n0||arguments.length===2)for(var a0=0,i0=e0.length,s0;a0<i0;a0++)(s0||!(a0 in e0))&&(s0||(s0=Array.prototype.slice.call(e0,0,a0)),s0[a0]=e0[a0]);return r0.concat(s0||Array.prototype.slice.call(e0))}typeof SuppressedError=="function"&&SuppressedError;const resolveFetch$3=r0=>
533r0?(...e0)=>r0(...e0):(...e0)=>fetch(...e0);class FunctionsError extends Error{constructor(e0,n0="FunctionsError",a0){super(e0),this.name=n0,this.context=a0}}class FunctionsFetchError extends FunctionsError{constructor(e0){super("Failed to send a request to the Edge Function","FunctionsFetchError",e0)}}class FunctionsRelayError extends FunctionsError{constructor(e0){super("Relay Error invoking the Edge Function","FunctionsRelayError",e0)}}class FunctionsHttpError extends FunctionsError{constructor(e0){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e0)}}var FunctionRegion;(function(r0){r0.Any="any",r0.ApNortheast1="ap-northeast-1",r0.ApNortheast2="ap-northeast-2",r0.ApSouth1="ap-south-1",r0.ApSoutheast1="ap-southeast-1",r0.ApSoutheast2="ap-southeast-2",r0.CaCentral1="ca-central-1",r0.EuCentral1="eu-central-1",r0.EuWest1="eu-west-1",r0.EuWest2="eu-west-2",r0.EuWest3="eu-west-3",r0.SaEast1="sa-east-1",r0.UsEast1="us-east-1",r0.UsWest1="us-west-1",r0.UsWest2="us-west-2"})(FunctionRegion||(FunctionRegion={}));class FunctionsClient{constructor(e0,{headers:n0={},customFetch:a0,region:i0=FunctionRegion.Any}={}){this.url=e0,this.headers=n0,this.region=i0,this.fetch=resolveFetch$3(a0)}setAuth(e0){this.headers.Authorization=`Bearer ${e0}`}invoke(e0){return __awaiter(this,arguments,void 0,function*(n0,a0={}){var i0;let s0,o0;try{const{headers:l0,method:c0,body:u0,signal:d0,timeout:h0}=a0;let f0={},{region:p0}=a0;p0||(p0=this.region);const A0=new URL(`${this.url}/${n0}`);p0&&p0!=="any"&&(f0["x-region"]=p0,A0.searchParams.set("forceFunctionRegion",p0));let m0;u0&&(l0&&!Object.prototype.hasOwnProperty.call(l0,"Content-Type")||!l0)?typeof Blob<"u"&&u0 instanceof Blob||u0 instanceof ArrayBuffer?(f0["Content-Type"]="application/octet-stream",m0=u0):typeof u0=="string"?(f0["Content-Type"]="text/plain",m0=u0):typeof FormData<"u"&&u0 instanceof FormData?m0=u0:(f0["Content-Type"]="application/json",m0=JSON.stringify(u0)):u0&&typeof u0!="string"&&!(typeof Blob<"u"&&u0 instanceof Blob)&&!(u0 instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u0 instanceof FormData)?m0=JSON.stringify(u0):m0=u0;let x0=d0;h0&&(o0=new AbortController,s0=setTimeout(()=>o0.abort(),h0),d0?(x0=o0.signal,d0.addEventListener("abort",()=>o0.abort())):x0=o0.signal);const g0=yield this.fetch(A0.toString(),{method:c0||"POST",headers:Object.assign(Object.assign(Object.assign({},f0),this.headers),l0),body:m0,signal:x0}).catch(w0=>{throw new FunctionsFetchError(w0)}),y0=g0.headers.get("x-relay-error");if(y0&&y0==="true")throw new FunctionsRelayError(g0);if(!g0.ok)throw new FunctionsHttpError(g0);let b0=((i0=g0.headers.get("Content-Type"))!==null&&i0!==void 0?i0:"text/plain").split(";")[0].trim(),E0;return b0==="application/json"?E0=yield g0.json():b0==="application/octet-stream"||b0==="application/pdf"?E0=yield g0.blob():b0==="text/event-stream"?E0=g0:b0==="multipart/form-data"?E0=yield g0.formData():E0=yield g0.text(),{data:E0,error:null,response:g0}}catch(l0){return{data:null,error:l0,response:l0 instanceof FunctionsHttpError||l0 instanceof FunctionsRelayError?l0.context:void 0}}finally{s0&&clearTimeout(s0)}})}}var PostgrestError=class extends Error{constructor(r0){super(r0.message),this.name="PostgrestError",this.details=r0.details,this.hint=r0.hint,this.co
533de=r0.code}},PostgrestBuilder=class{constructor(r0){var e0,n0;this.shouldThrowOnError=!1,this.method=r0.method,this.url=r0.url,this.headers=new Headers(r0.headers),this.schema=r0.schema,this.body=r0.body,this.shouldThrowOnError=(e0=r0.shouldThrowOnError)!==null&&e0!==void 0?e0:!1,this.signal=r0.signal,this.isMaybeSingle=(n0=r0.isMaybeSingle)!==null&&n0!==void 0?n0:!1,r0.fetch?this.fetch=r0.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(r0,e0){return this.headers=new Headers(this.headers),this.headers.set(r0,e0),this}then(r0,e0){var n0=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const a0=this.fetch;let i0=a0(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s0=>{let o0=null,l0=null,c0=null,u0=s0.status,d0=s0.statusText;if(s0.ok){var h0,f0;if(n0.method!=="HEAD"){var p0;const g0=await s0.text();g0===""||(n0.headers.get("Accept")==="text/csv"||n0.headers.get("Accept")&&(!((p0=n0.headers.get("Accept"))===null||p0===void 0)&&p0.includes("application/vnd.pgrst.plan+text"))?l0=g0:l0=JSON.parse(g0))}const m0=(h0=n0.headers.get("Prefer"))===null||h0===void 0?void 0:h0.match(/count=(exact|planned|estimated)/),x0=(f0=s0.headers.get("content-range"))===null||f0===void 0?void 0:f0.split("/");m0&&x0&&x0.length>1&&(c0=parseInt(x0[1])),n0.isMaybeSingle&&n0.method==="GET"&&Array.isArray(l0)&&(l0.length>1?(o0={code:"PGRST116",details:`Results contain ${l0.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l0=null,c0=null,u0=406,d0="Not Acceptable"):l0.length===1?l0=l0[0]:l0=null)}else{var A0;const m0=await s0.text();try{o0=JSON.parse(m0),Array.isArray(o0)&&s0.status===404&&(l0=[],o0=null,u0=200,d0="OK")}catch{s0.status===404&&m0===""?(u0=204,d0="No Content"):o0={message:m0}}if(o0&&n0.isMaybeSingle&&(!(o0==null||(A0=o0.details)===null||A0===void 0)&&A0.includes("0 rows"))&&(o0=null,u0=200,d0="OK"),o0&&n0.shouldThrowOnError)throw new PostgrestError(o0)}return{error:o0,data:l0,count:c0,status:u0,statusText:d0}});return this.shouldThrowOnError||(i0=i0.catch(s0=>{var o0;let l0="";const c0=s0==null?void 0:s0.cause;if(c0){var u0,d0,h0,f0;const A0=(u0=c0==null?void 0:c0.message)!==null&&u0!==void 0?u0:"",m0=(d0=c0==null?void 0:c0.code)!==null&&d0!==void 0?d0:"";l0=`${(h0=s0==null?void 0:s0.name)!==null&&h0!==void 0?h0:"FetchError"}: ${s0==null?void 0:s0.message}`,l0+=` 534 535Caused by: ${(f0=c0==null?void 0:c0.name)!==null&&f0!==void 0?f0:"Error"}: ${A0}`,m0&&(l0+=` (${m0})`),c0!=null&&c0.stack&&(l0+=` 536${c0.stack}`)}else{var p0;l0=(p0=s0==null?void 0:s0.stack)!==null&&p0!==void 0?p0:""}return{error:{message:`${(o0=s0==null?void 0:s0.name)!==null&&o0!==void 0?o0:"FetchError"}: ${s0==null?void 0:s0.message}`,details:l0,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),i0.then(r0,e0)}returns(){return this}overrideTypes(){return this}},PostgrestTransformBuilder=class extends PostgrestBuilder{select(r0){let e0=!1;const n0=(r0??"*").split("").map(a0=>/\s/.test(a0)&&!e0?"":(a0==='"'&&(e0=!e0),a0)).join("");return this.url.searchParams.set("select",n0),this.headers.append("Prefer","return=representation"),this}order(r0,{ascending:e0=!0,nullsFirst:n0,foreignTable:a0,referencedTable:i0=a0}={}){const s0=i0?`${i0}.order`:"order",o0=this.url.searchParams.get(s0);return this.url.searchParams.set(s0,`${o0?`${o0},`:""}${r0}.${e0?"asc":"desc"}${n0===void 0?"":n0?".nullsfirst":".nullslast"}`),this}limit(r0,{foreignTable:e0,referencedTable:n0=e0}={}){const a0=typeof n0>"u"?"limit":`${n0}.limit`;return this.url.searchParams.set(a0,`${r0}`),this}range(r0,e0,{foreignTable:n0,referencedTable:a0=n0}={}){const i0=typeof a0>"u"?"offset":`${a0}
536.offset`,s0=typeof a0>"u"?"limit":`${a0}.limit`;return this.url.searchParams.set(i0,`${r0}`),this.url.searchParams.set(s0,`${e0-r0+1}`),this}abortSignal(r0){return this.signal=r0,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:r0=!1,verbose:e0=!1,settings:n0=!1,buffers:a0=!1,wal:i0=!1,format:s0="text"}={}){var o0;const l0=[r0?"analyze":null,e0?"verbose":null,n0?"settings":null,a0?"buffers":null,i0?"wal":null].filter(Boolean).join("|"),c0=(o0=this.headers.get("Accept"))!==null&&o0!==void 0?o0:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s0}; for="${c0}"; options=${l0};`),s0==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(r0){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${r0}`),this}};const PostgrestReservedCharsRegexp=new RegExp("[,()]");var PostgrestFilterBuilder=class extends PostgrestTransformBuilder{eq(r0,e0){return this.url.searchParams.append(r0,`eq.${e0}`),this}neq(r0,e0){return this.url.searchParams.append(r0,`neq.${e0}`),this}gt(r0,e0){return this.url.searchParams.append(r0,`gt.${e0}`),this}gte(r0,e0){return this.url.searchParams.append(r0,`gte.${e0}`),this}lt(r0,e0){return this.url.searchParams.append(r0,`lt.${e0}`),this}lte(r0,e0){return this.url.searchParams.append(r0,`lte.${e0}`),this}like(r0,e0){return this.url.searchParams.append(r0,`like.${e0}`),this}likeAllOf(r0,e0){return this.url.searchParams.append(r0,`like(all).{${e0.join(",")}}`),this}likeAnyOf(r0,e0){return this.url.searchParams.append(r0,`like(any).{${e0.join(",")}}`),this}ilike(r0,e0){return this.url.searchParams.append(r0,`ilike.${e0}`),this}ilikeAllOf(r0,e0){return this.url.searchParams.append(r0,`ilike(all).{${e0.join(",")}}`),this}ilikeAnyOf(r0,e0){return this.url.searchParams.append(r0,`ilike(any).{${e0.join(",")}}`),this}regexMatch(r0,e0){return this.url.searchParams.append(r0,`match.${e0}`),this}regexIMatch(r0,e0){return this.url.searchParams.append(r0,`imatch.${e0}`),this}is(r0,e0){return this.url.searchParams.append(r0,`is.${e0}`),this}isDistinct(r0,e0){return this.url.searchParams.append(r0,`isdistinct.${e0}`),this}in(r0,e0){const n0=Array.from(new Set(e0)).map(a0=>typeof a0=="string"&&PostgrestReservedCharsRegexp.test(a0)?`"${a0}"`:`${a0}`).join(",");return this.url.searchParams.append(r0,`in.(${n0})`),this}notIn(r0,e0){const n0=Array.from(new Set(e0)).map(a0=>typeof a0=="string"&&PostgrestReservedCharsRegexp.test(a0)?`"${a0}"`:`${a0}`).join(",");return this.url.searchParams.append(r0,`not.in.(${n0})`),this}contains(r0,e0){return typeof e0=="string"?this.url.searchParams.append(r0,`cs.${e0}`):Array.isArray(e0)?this.url.searchParams.append(r0,`cs.{${e0.join(",")}}`):this.url.searchParams.append(r0,`cs.${JSON.stringify(e0)}`),this}containedBy(r0,e0){return typeof e0=="string"?this.url.searchParams.append(r0,`cd.${e0}`):Array.isArray(e0)?this.url.searchParams.append(r0,`cd.{${e0.join(",")}}`):this.url.searchParams.append(r0,`cd.${JSON.stringify(e0)}`),this}rangeGt(r0,e0){return this.url.searchParams.append(r0,`sr.${e0}`),this}rangeGte(r0,e0){return this.url.searchParams.append(r0,`nxl.${e0}`),this}rangeLt(r0,e0){return this.url.searchParams.append(r0,`sl.${e0}`),this}rangeLte(r0,e0){return this.url.searchParams.append(r0,`nxr.${e0}`),this}rangeAdjacent(r0,e0){return this.url.searchParams.append(r0,`adj.${e0}`),this}overlaps(r0,e0){return typeof e0=="string"?this.url.searchParams.append(r0,`ov.${e0}`):this.url.searchParams.append(r0,`ov.{${e0.join(",")}}`),this}textSearch(r0,e0,{config:n0,type:a0}={}){let i0="";a0==="plain"?i0="pl":a0==="phrase"?i0="ph":a0==="websearch"&&(i0="w");const s0=n0===void 0?"":`(${n0})`;return this.url.searchParams.append(r0,`${i0}fts${s0}.${e0}`),this}
536match(r0){return Object.entries(r0).forEach(([e0,n0])=>{this.url.searchParams.append(e0,`eq.${n0}`)}),this}not(r0,e0,n0){return this.url.searchParams.append(r0,`not.${e0}.${n0}`),this}or(r0,{foreignTable:e0,referencedTable:n0=e0}={}){const a0=n0?`${n0}.or`:"or";return this.url.searchParams.append(a0,`(${r0})`),this}filter(r0,e0,n0){return this.url.searchParams.append(r0,`${e0}.${n0}`),this}},PostgrestQueryBuilder=class{constructor(r0,{headers:e0={},schema:n0,fetch:a0}){this.url=r0,this.headers=new Headers(e0),this.schema=n0,this.fetch=a0}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(r0,e0){const{head:n0=!1,count:a0}=e0??{},i0=n0?"HEAD":"GET";let s0=!1;const o0=(r0??"*").split("").map(u0=>/\s/.test(u0)&&!s0?"":(u0==='"'&&(s0=!s0),u0)).join(""),{url:l0,headers:c0}=this.cloneRequestState();return l0.searchParams.set("select",o0),a0&&c0.append("Prefer",`count=${a0}`),new PostgrestFilterBuilder({method:i0,url:l0,headers:c0,schema:this.schema,fetch:this.fetch})}insert(r0,{count:e0,defaultToNull:n0=!0}={}){var a0;const i0="POST",{url:s0,headers:o0}=this.cloneRequestState();if(e0&&o0.append("Prefer",`count=${e0}`),n0||o0.append("Prefer","missing=default"),Array.isArray(r0)){const l0=r0.reduce((c0,u0)=>c0.concat(Object.keys(u0)),[]);if(l0.length>0){const c0=[...new Set(l0)].map(u0=>`"${u0}"`);s0.searchParams.set("columns",c0.join(","))}}return new PostgrestFilterBuilder({method:i0,url:s0,headers:o0,schema:this.schema,body:r0,fetch:(a0=this.fetch)!==null&&a0!==void 0?a0:fetch})}upsert(r0,{onConflict:e0,ignoreDuplicates:n0=!1,count:a0,defaultToNull:i0=!0}={}){var s0;const o0="POST",{url:l0,headers:c0}=this.cloneRequestState();if(c0.append("Prefer",`resolution=${n0?"ignore":"merge"}-duplicates`),e0!==void 0&&l0.searchParams.set("on_conflict",e0),a0&&c0.append("Prefer",`count=${a0}`),i0||c0.append("Prefer","missing=default"),Array.isArray(r0)){const u0=r0.reduce((d0,h0)=>d0.concat(Object.keys(h0)),[]);if(u0.length>0){const d0=[...new Set(u0)].map(h0=>`"${h0}"`);l0.searchParams.set("columns",d0.join(","))}}return new PostgrestFilterBuilder({method:o0,url:l0,headers:c0,schema:this.schema,body:r0,fetch:(s0=this.fetch)!==null&&s0!==void 0?s0:fetch})}update(r0,{count:e0}={}){var n0;const a0="PATCH",{url:i0,headers:s0}=this.cloneRequestState();return e0&&s0.append("Prefer",`count=${e0}`),new PostgrestFilterBuilder({method:a0,url:i0,headers:s0,schema:this.schema,body:r0,fetch:(n0=this.fetch)!==null&&n0!==void 0?n0:fetch})}delete({count:r0}={}){var e0;const n0="DELETE",{url:a0,headers:i0}=this.cloneRequestState();return r0&&i0.append("Prefer",`count=${r0}`),new PostgrestFilterBuilder({method:n0,url:a0,headers:i0,schema:this.schema,fetch:(e0=this.fetch)!==null&&e0!==void 0?e0:fetch})}},PostgrestClient=class _5{constructor(e0,{headers:n0={},schema:a0,fetch:i0}={}){this.url=e0,this.headers=new Headers(n0),this.schemaName=a0,this.fetch=i0}from(e0){if(!e0||typeof e0!="string"||e0.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new PostgrestQueryBuilder(new URL(`${this.url}/${e0}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e0){return new _5(this.url,{headers:this.headers,schema:e0,fetch:this.fetch})}rpc(e0,n0={},{head:a0=!1,get:i0=!1,count:s0}={}){var o0;let l0;const c0=new URL(`${this.url}/rpc/${e0}`);let u0;const d0=p0=>p0!==null&&typeof p0=="object"&&(!Array.isArray(p0)||p0.some(d0)),h0=a0&&Object.values(n0).some(d0);h0?(l0="POST",u0=n0):a0||i0?(l0=a0?"HEAD":"GET",Object.entries(n0).filter(([p0,A0])=>A0!==void 0).map(([p0,A0])=>[p0,Array.isArray(A0)?`{${A0.join(",")}}`:`${A0}`]).forEach(([p0,A0])=>{c0.searchParams.append(p0,A0)})):(l0="POST",u0=n0);const f0=new Headers(this.headers);return h0?f0.set("Prefer",s0?`count=${s0},return=minimal`:"return=minimal"):s0&&f0.set("Prefer",`count=${s0}`),new PostgrestFilterBuilder({method:l0,url:c0,headers:f0,schema:this.schemaName,body:u0,fetch:(o0=this.fetch)!==null&&o0!==void 0?o0:fetch})}};class WebSocketFactory{constructor(){}static detectEnvironment(){var e0;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e0=navigator.userAgent)===null||e0===void 0)&&e0.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n0=globalThis.process;if(n0){const a0=n0.versions;if(a0&&a0.node){const i0=a0.node,s0=parseInt(i0.replace(/^v/,"").split(".")[0]);return s0>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s0} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s0} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 537import ws from "ws" 538new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e0=this.detectEnvironment();
538if(e0.constructor)return e0.constructor;let n0=e0.error||"WebSocket not supported in this environment.";throw e0.workaround&&(n0+=` 539 540Suggested solution: ${e0.workaround}`),new Error(n0)}static createWebSocket(e0,n0){const a0=this.getWebSocketConstructor();return new a0(e0,n0)}static isWebSocketSupported(){try{const e0=this.detectEnvironment();return e0.type==="native"||e0.type==="ws"}catch{return!1}}}const version$4="2.90.1",DEFAULT_VERSION=`realtime-js/${version$4}`,VSN_1_0_0="1.0.0",VSN_2_0_0="2.0.0",DEFAULT_VSN=VSN_1_0_0,DEFAULT_TIMEOUT=1e4,WS_CLOSE_NORMAL=1e3,MAX_PUSH_BUFFER_SIZE=100;var SOCKET_STATES;(function(r0){r0[r0.connecting=0]="connecting",r0[r0.open=1]="open",r0[r0.closing=2]="closing",r0[r0.closed=3]="closed"})(SOCKET_STATES||(SOCKET_STATES={}));var CHANNEL_STATES;(function(r0){r0.closed="closed",r0.errored="errored",r0.joined="joined",r0.joining="joining",r0.leaving="leaving"})(CHANNEL_STATES||(CHANNEL_STATES={}));var CHANNEL_EVENTS;(function(r0){r0.close="phx_close",r0.error="phx_error",r0.join="phx_join",r0.reply="phx_reply",r0.leave="phx_leave",r0.access_token="access_token"})(CHANNEL_EVENTS||(CHANNEL_EVENTS={}));var TRANSPORTS;(function(r0){r0.websocket="websocket"}
540)(TRANSPORTS||(TRANSPORTS={}));var CONNECTION_STATE;(function(r0){r0.Connecting="connecting",r0.Open="open",r0.Closing="closing",r0.Closed="closed"})(CONNECTION_STATE||(CONNECTION_STATE={}));class Serializer{constructor(e0){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e0??[]}encode(e0,n0){if(e0.event===this.BROADCAST_EVENT&&!(e0.payload instanceof ArrayBuffer)&&typeof e0.payload.event=="string")return n0(this._binaryEncodeUserBroadcastPush(e0));let a0=[e0.join_ref,e0.ref,e0.topic,e0.event,e0.payload];return n0(JSON.stringify(a0))}_binaryEncodeUserBroadcastPush(e0){var n0;return this._isArrayBuffer((n0=e0.payload)===null||n0===void 0?void 0:n0.payload)?this._encodeBinaryUserBroadcastPush(e0):this._encodeJsonUserBroadcastPush(e0)}_encodeBinaryUserBroadcastPush(e0){var n0,a0;const i0=(a0=(n0=e0.payload)===null||n0===void 0?void 0:n0.payload)!==null&&a0!==void 0?a0:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e0,this.BINARY_ENCODING,i0)}_encodeJsonUserBroadcastPush(e0){var n0,a0;const i0=(a0=(n0=e0.payload)===null||n0===void 0?void 0:n0.payload)!==null&&a0!==void 0?a0:{},o0=new TextEncoder().encode(JSON.stringify(i0)).buffer;return this._encodeUserBroadcastPush(e0,this.JSON_ENCODING,o0)}_encodeUserBroadcastPush(e0,n0,a0){var i0,s0;const o0=e0.topic,l0=(i0=e0.ref)!==null&&i0!==void 0?i0:"",c0=(s0=e0.join_ref)!==null&&s0!==void 0?s0:"",u0=e0.payload.event,d0=this.allowedMetadataKeys?this._pick(e0.payload,this.allowedMetadataKeys):{},h0=Object.keys(d0).length===0?"":JSON.stringify(d0);if(c0.length>255)throw new Error(`joinRef length ${c0.length} exceeds maximum of 255`);if(l0.length>255)throw new Error(`ref length ${l0.length} exceeds maximum of 255`);if(o0.length>255)throw new Error(`topic length ${o0.length} exceeds maximum of 255`);if(u0.length>255)throw new Error(`userEvent length ${u0.length} exceeds maximum of 255`);if(h0.length>255)throw new Error(`metadata length ${h0.length} exceeds maximum of 255`);const f0=this.USER_BROADCAST_PUSH_META_LENGTH+c0.length+l0.length+o0.length+u0.length+h0.length,p0=new ArrayBuffer(this.HEADER_LENGTH+f0);let A0=new DataView(p0),m0=0;A0.setUint8(m0++,this.KINDS.userBroadcastPush),A0.setUint8(m0++,c0.length),A0.setUint8(m0++,l0.length),A0.setUint8(m0++,o0.length),A0.setUint8(m0++,u0.length),A0.setUint8(m0++,h0.length),A0.setUint8(m0++,n0),Array.from(c0,g0=>A0.setUint8(m0++,g0.charCodeAt(0))),Array.from(l0,g0=>A0.setUint8(m0++,g0.charCodeAt(0))),Array.from(o0,g0=>A0.setUint8(m0++,g0.charCodeAt(0))),Array.from(u0,g0=>A0.setUint8(m0++,g0.charCodeAt(0))),Array.from(h0,g0=>A0.setUint8(m0++,g0.charCodeAt(0)));var x0=new Uint8Array(p0.byteLength+a0.byteLength);return x0.set(new Uint8Array(p0),0),x0.set(new Uint8Array(a0),p0.byteLength),x0.buffer}decode(e0,n0){if(this._isArrayBuffer(e0)){let a0=this._binaryDecode(e0);return n0(a0)}if(typeof e0=="string"){const a0=JSON.parse(e0),[i0,s0,o0,l0,c0]=a0;return n0({join_ref:i0,ref:s0,topic:o0,event:l0,payload:c0})}return n0({})}_binaryDecode(e0){const n0=new DataView(e0),a0=n0.getUint8(0),i0=new TextDecoder;switch(a0){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e0,n0,i0)}}_decodeUserBroadcast(e0,n0,a0){const i0=n0.getUint8(1),s0=n0.getUint8(2),o0=n0.getUint8(3),l0=n0.getUint8(4);let c0=this.HEADER_LENGTH+4;const u0=a0.decode(e0.slice(c0,c0+i0));c0=c0+i0;const d0=a0.decode(e0.slice(c0,c0+s0));c0=c0+s0;const h0=a0.decode(e0.slice(c0,c0+o0));c0=c0+o0;const f0=e0.slice(c0,e0.byteLength),p0=l0===this.JSON_ENCODING?JSON.parse(a0.decode(f0)):f0,A0={type:this.BROADCAST_EVENT,event:d0,payload:p0};return o0>0&&(A0.meta=JSON.parse(h0)),{join_ref:null,ref:null,topic:u0,event:this.BROADCAST_EVENT,payload:A0}}_isArrayBuffer(e0){var n0;return e0 instanceof ArrayBuffer||((n0=e0==null?void 0:e0.constructor)===null||n0===void 0?void 0:n0.name)==="ArrayBuffer"}_pick(e0,n0){return!e0||typeof e0!="object"?{}:Object.fromEntries(Object.entries(e0).filter(([a0])=>n0.includes(a0)))}}class Timer{constructor(e0,n0){this.callback=e0,this.timerCalc=n0,this.timer=void 0,this.tries=0,this.callback=e0,this.timerCalc=n0}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var PostgresTypes;(function(r0){r0.abstime="abstime",r0.bool="bool",r0.date="date",r0.daterange="daterange",r0.float4="float4",r0.float8="float8",r0.int2="int2",r0.int4="int4",r0.int4range="int4range",r0.int8="int8",r0.int8range="int8range",r0.json="json",r0.jsonb="jsonb",r0.money="money",r0.numeric="numeric",r0.oid="oid",r0.reltime="reltime",r0.text="text",r0.time="time",r0.timestamp="timestamp",r0.timestamptz="timestamptz",r0.timetz="timetz",r0.tsrange="tsrange",r0.tstzrange="tstzrange"}
540)(PostgresTypes||(PostgresTypes={}));const convertChangeData=(r0,e0,n0={})=>{var a0;const i0=(a0=n0.skipTypes)!==null&&a0!==void 0?a0:[];return e0?Object.keys(e0).reduce((s0,o0)=>(s0[o0]=convertColumn(o0,r0,e0,i0),s0),{}):{}},convertColumn=(r0,e0,n0,a0)=>{const i0=e0.find(l0=>l0.name===r0),s0=i0==null?void 0:i0.type,o0=n0[r0];return s0&&!a0.includes(s0)?convertCell(s0,o0):noop$6(o0)},convertCell=(r0,e0)=>{if(r0.charAt(0)==="_"){const n0=r0.slice(1,r0.length);return toArray$2(e0,n0)}switch(r0){case PostgresTypes.bool:return toBoolean(e0);case PostgresTypes.float4:case PostgresTypes.float8:case PostgresTypes.int2:case PostgresTypes.int4:case PostgresTypes.int8:case PostgresTypes.numeric:case PostgresTypes.oid:return toNumber$3(e0);case PostgresTypes.json:case PostgresTypes.jsonb:return toJson(e0);case PostgresTypes.timestamp:return toTimestampString(e0);case PostgresTypes.abstime:case PostgresTypes.date:case PostgresTypes.daterange:case PostgresTypes.int4range:case PostgresTypes.int8range:case PostgresTypes.money:case PostgresTypes.reltime:case PostgresTypes.text:case PostgresTypes.time:case PostgresTypes.timestamptz:case PostgresTypes.timetz:case PostgresTypes.tsrange:case PostgresTypes.tstzrange:return noop$6(e0);default:return noop$6(e0)}},noop$6=r0=>r0,toBoolean=r0=>{switch(r0){case"t":return!0;case"f":return!1;default:return r0}},toNumber$3=r0=>{if(typeof r0=="string"){const e0=parseFloat(r0);if(!Number.isNaN(e0))return e0}return r0},toJson=r0=>{if(typeof r0=="string")try{return JSON.parse(r0)}catch{return r0}return r0},toArray$2=(r0,e0)=>{if(typeof r0!="string")return r0;const n0=r0.length-1,a0=r0[n0];if(r0[0]==="{"&&a0==="}"){let s0;const o0=r0.slice(1,n0);try{s0=JSON.parse("["+o0+"]")}catch{s0=o0?o0.split(","):[]}return s0.map(l0=>convertCell(e0,l0))}return r0},toTimestampString=r0=>typeof r0=="string"?r0.replace(" ","T"):r0,httpEndpointURL=r0=>{const e0=new URL(r0);return e0.protocol=e0.protocol.replace(/^ws/i,"http"),e0.pathname=e0.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e0.pathname===""||e0.pathname==="/"?e0.pathname="/api/broadcast":e0.pathname=e0.pathname+"/api/broadcast",e0.href};class Push{constructor(e0,n0,a0={},i0=DEFAULT_TIMEOUT){this.channel=e0,this.event=n0,this.payload=a0,this.timeout=i0,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e0){this.timeout=e0,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e0){this.payload=Object.assign(Object.assign({},this.payload),e0)}receive(e0,n0){var a0;return this._hasReceived(e0)&&n0((a0=this.receivedResp)===null||a0===void 0?void 0:a0.response),this.recHooks.push({status:e0,callback:n0}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e0=n0=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n0,this._matchReceive(n0)};this.channel._on(this.refEvent,{},e0),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e0,n0){this.refEvent&&this.channel._trigger(this.refEvent,{status:e0,response:n0})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e0,response:n0}){this.recHooks.filter(a0=>a0.status===e0).forEach(a0=>a0.callback(n0))}_hasReceived(e0){return this.receivedResp&&this.receivedResp.status===e0}}var REALTIME_PRESENCE_LISTEN_EVENTS;(function(r0){r0.SYNC="sync",r0.JOIN="join",r0.LEAVE="leave"})(REALTIME_PRESENCE_LISTEN_EVENTS||(REALTIME_PRESENCE_LISTEN_EVENTS={}));class RealtimePresence{constructor(e0,n0){this.channel=e0,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const a0=(n0==null?void 0:n0.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(a0.state,{},i0=>{const{onJoin:s0,onLeave:o0,onSync:l0}=this.caller;this.joinRef=this.channel._joinRef(),this.state=RealtimePresence.syncState(this.state,i0,s0,o0),this.pendingDiffs.forEac
vendor: 5,865 bytes, line 540
540h(c0=>{this.state=RealtimePresence.syncDiff(this.state,c0,s0,o0)}),this.pendingDiffs=[],l0()}),this.channel._on(a0.diff,{},i0=>{const{onJoin:s0,onLeave:o0,onSync:l0}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i0):(this.state=RealtimePresence.syncDiff(this.state,i0,s0,o0),l0())}),this.onJoin((i0,s0,o0)=>{this.channel._trigger("presence",{event:"join",key:i0,currentPresences:s0,newPresences:o0})}),this.onLeave((i0,s0,o0)=>{this.channel._trigger("presence",{event:"leave",key:i0,currentPresences:s0,leftPresences:o0})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e0,n0,a0,i0){const s0=this.cloneDeep(e0),o0=this.transformState(n0),l0={},c0={};return this.map(s0,(u0,d0)=>{o0[u0]||(c0[u0]=d0)}),this.map(o0,(u0,d0)=>{const h0=s0[u0];if(h0){const f0=d0.map(x0=>x0.presence_ref),p0=h0.map(x0=>x0.presence_ref),A0=d0.filter(x0=>p0.indexOf(x0.presence_ref)<0),m0=h0.filter(x0=>f0.indexOf(x0.presence_ref)<0);A0.length>0&&(l0[u0]=A0),m0.length>0&&(c0[u0]=m0)}else l0[u0]=d0}),this.syncDiff(s0,{joins:l0,leaves:c0},a0,i0)}static syncDiff(e0,n0,a0,i0){const{joins:s0,leaves:o0}={joins:this.transformState(n0.joins),leaves:this.transformState(n0.leaves)};return a0||(a0=()=>{}),i0||(i0=()=>{}),this.map(s0,(l0,c0)=>{var u0;const d0=(u0=e0[l0])!==null&&u0!==void 0?u0:[];if(e0[l0]=this.cloneDeep(c0),d0.length>0){const h0=e0[l0].map(p0=>p0.presence_ref),f0=d0.filter(p0=>h0.indexOf(p0.presence_ref)<0);e0[l0].unshift(...f0)}a0(l0,d0,c0)}),this.map(o0,(l0,c0)=>{let u0=e0[l0];if(!u0)return;const d0=c0.map(h0=>h0.presence_ref);u0=u0.filter(h0=>d0.indexOf(h0.presence_ref)<0),e0[l0]=u0,i0(l0,u0,c0),u0.length===0&&delete e0[l0]}),e0}static map(e0,n0){return Object.getOwnPropertyNames(e0).map(a0=>n0(a0,e0[a0]))}static transformState(e0){return e0=this.cloneDeep(e0),Object.getOwnPropertyNames(e0).reduce((n0,a0)=>{const i0=e0[a0];return"metas"in i0?n0[a0]=i0.metas.map(s0=>(s0.presence_ref=s0.phx_ref,delete s0.phx_ref,delete s0.phx_ref_prev,s0)):n0[a0]=i0,n0},{})}static cloneDeep(e0){return JSON.parse(JSON.stringify(e0))}onJoin(e0){this.caller.onJoin=e0}onLeave(e0){this.caller.onLeave=e0}onSync(e0){this.caller.onSync=e0}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;(function(r0){r0.ALL="*",r0.INSERT="INSERT",r0.UPDATE="UPDATE",r0.DELETE="DELETE"})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT||(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT={}));var REALTIME_LISTEN_TYPES;(function(r0){r0.BROADCAST="broadcast",r0.PRESENCE="presence",r0.POSTGRES_CHANGES="postgres_changes",r0.SYSTEM="system"})(REALTIME_LISTEN_TYPES||(REALTIME_LISTEN_TYPES={}));var REALTIME_SUBSCRIBE_STATES;(function(r0){r0.SUBSCRIBED="SUBSCRIBED",r0.TIMED_OUT="TIMED_OUT",r0.CLOSED="CLOSED",r0.CHANNEL_ERROR="CHANNEL_ERROR"})(REALTIME_SUBSCRIBE_STATES||(REALTIME_SUBSCRIBE_STATES={}));class RealtimeChannel{constructor(e0,n0={config:{}},a0){var i0,s0;if(this.topic=e0,this.params=n0,this.socket=a0,this.bindings={},this.state=CHANNEL_STATES.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e0.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n0.config),this.timeout=this.socket.timeout,this.joinPush=new Push(this,CHANNEL_EVENTS.join,this.params,this.timeout),this.rejoinTimer=new Timer(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=CHANNEL_STATES.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o0=>o0.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=CHANNEL_STATES.closed,this.socket._remove(this)}),this._onError(o0=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o0),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o0=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o0),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this._on(CHANNEL_EVENTS.reply,{},(o0,l0)=>{this._trigger(this._replyEventName(l0),o0)}),this.presence=new RealtimePresence(this),this.broadcastEndpointURL=httpEndpointURL(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((s0=(i0=this.params.config)===null||i0===void 0?void 0:i0.broadcast)===null||s0===void 0)&&s0.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e0,n0=this.timeout){var a0,i0,s0;if(this.socket.isConnected()||this.socket.connect(),this.state==CHANNEL_STATES.closed){const{config:{broadcast:o0,presence:l0,private:c0}}=this.params,u0=(i0=(a0=this.bindings.postgres_changes)===null||a0===void 0?void 0:a0.map(p0=>p0.filter))!==null&&i0!==void 0?i0:[],d0=!!this.bindings[REALTIME_LISTEN_TYPES.PRESENCE]&&this.bindings[REALTIME_LISTEN_TYPES.PRESENCE].length>0||((s0=this.params.config.presence)===null||s0===void 0?void 0:s0.enabled)===!0,h0={},f0={broadcast:o0,presence:Object.assign(Object.assign({},l0),{enabled:d0}),postgres_changes:u0,private:c0};this.socket.accessTokenValue&&(h0.access_token=this.socket.accessTokenValue),this._onError(p0=>e0==null?void 0:e0(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,p0)),this._onClose(()=>e0==null?void 0:e0(REALTIME_SUBSCRIBE_STATES.CLOSED)),this.updateJoinPayload(Object.assign({config:f0},h0)),this.joinedOnce=!0,this._rejoin(n0),this.joinPush.receive("ok",async({postgres_changes:p0})=>{var A0;if(this.socket._isManualToken()||this.socket.setAuth(),p0===void 0){e0==null||e0(REA
540LTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}else{const m0=this.bindings.postgres_changes,x0=(A0=m0==null?void 0:m0.length)!==null&&A0!==void 0?A0:0,g0=[];for(let y0=0;y0<x0;y0++){const b0=m0[y0],{filter:{event:E0,schema:w0,table:v0,filter:S0}}=b0,k0=p0&&p0[y0];if(k0&&k0.event===E0&&RealtimeChannel.isFilterValueEqual(k0.schema,w0)&&RealtimeChannel.isFilterValueEqual(k0.table,v0)&&RealtimeChannel.isFilterValueEqual(k0.filter,S0))g0.push(Object.assign(Object.assign({},b0),{id:k0.id}));else{this.unsubscribe(),this.state=CHANNEL_STATES.errored,e0==null||e0(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g0,e0&&e0(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}}).receive("error",p0=>{this.state=CHANNEL_STATES.errored,e0==null||e0(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p0).join(", ")||"error")))}).receive("timeout",()=>{e0==null||e0(REALTIME_SUBSCRIBE_STATES.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e0,n0={}){return await this.send({type:"presence",event:"track",payload:e0},n0.timeout||this.timeout)}async untrack(e0={}){return await this.send({type:"presence",event:"untrack"},e0)}on(e0,n0,a0){return this.state===CHANNEL_STATES.joined&&e0===REALTIME_LISTEN_TYPES.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(e0,n0,a0)}async httpSend(e0,n0,a0={}){var i0;if(n0==null)return Promise.reject("Payload is required for httpSend()");const s0={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s0.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o0={method:"POST",headers:s0,body:JSON.stringify({messages:[{topic:this.subTopic,event:e0,payload:n0,private:this.private}]})},l0=await this._fetchWithTimeout(this.broadcastEndpointURL,o0,(i0=a0.timeout)!==null&&i0!==void 0?i0:this.timeout);if(l0.status===202)return{success:!0};let c0=l0.statusText;try{const u0=await l0.json();c0=u0.error||u0.message||c0}catch{}return Promise.reject(new Error(c0))}async send(e0,n0={}){var a0,i0;if(!this._canPush()&&e0.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
540in the future. Please use httpSend() explicitly for REST delivery.");const{event:s0,payload:o0}=e0,l0={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l0.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c0={method:"POST",headers:l0,body:JSON.stringify({messages:[{topic:this.subTopic,event:s0,payload:o0,private:this.private}]})};try{const u0=await this._fetchWithTimeout(this.broadcastEndpointURL,c0,(a0=n0.timeout)!==null&&a0!==void 0?a0:this.timeout);return await((i0=u0.body)===null||i0===void 0?void 0:i0.cancel()),u0.ok?"ok":"error"}catch(u0){return u0.name==="AbortError"?"timed out":"error"}}else return new Promise(s0=>{var o0,l0,c0;const u0=this._push(e0.type,e0,n0.timeout||this.timeout);e0.type==="broadcast"&&!(!((c0=(l0=(o0=this.params)===null||o0===void 0?void 0:o0.config)===null||l0===void 0?void 0:l0.broadcast)===null||c0===void 0)&&c0.ack)&&s0("ok"),u0.receive("ok",()=>s0("ok")),u0.receive("error",()=>s0("error")),u0.receive("timeout",()=>s0("timed out"))})}updateJoinPayload(e0){this.joinPush.updatePayload(e0)}unsubscribe(e0=this.timeout){this.state=CHANNEL_STATES.leaving;const n0=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(CHANNEL_EVENTS.close,"leave",this._joinRef())};this.joinPush.destroy();let a0=null;return new Promise(i0=>{a0=new Push(this,CHANNEL_EVENTS.leave,{},e0),a0.receive("ok",()=>{n0(),i0("ok")}).receive("timeout",()=>{n0(),i0("timed out")}).receive("error",()=>{i0("error")}),a0.send(),this._canPush()||a0.trigger("ok",{})}).finally(()=>{a0==null||a0.destroy()})}teardown(){this.pushBuffer.forEach(e0=>e0.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=CHANNEL_STATES.closed,this.bindings={}}async _fetchWithTimeout(e0,n0,a0){const i0=new AbortController,s0=setTimeout(()=>i0.abort(),a0),o0=await this.socket.fetch(e0,Object.assign(Object.assign({},n0),{signal:i0.signal}));return clearTimeout(s0),o0}_push(e0,n0,a0=this.timeout){if(!this.joinedOnce)throw`tried to push '${e0}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i0=new Push(this,e0,n0,a0);return this._canPush()?i0.send():this._addToPushBuffer(i0),i0}_addToPushBuffer(e0){if(e0.startTimeout(),this.pushBuffer.push(e0),this.pushBuffer.length>MAX_PUSH_BUFFER_SIZE){const n0=this.pushBuffer.shift();n0&&(n0.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n0.event}`,n0.payload))}}_onMessage(e0,n0,a0){return n0}_isMember(e0){return this.topic===e0}_joinRef(){return this.joinPush.ref}_trigger(e0,n0,a0){var i0,s0;const o0=e0.toLocaleLowerCase(),{close:l0,error:c0,leave:u0,join:d0}=CHANNEL_EVENTS;if(a0&&[l0,c0,u0,d0].indexOf(o0)>=0&&a0!==this._joinRef())return;let f0=this._onMessage(o0,n0,a0);if(n0&&!f0)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o0)?(i0=this.bindings.postgres_changes)===null||i0===void 0||i0.filter(p0=>{var A0,m0,x0;return((A0=p0.filter)===null||A0===void 0?void 0:A0.event)==="*"||((x0=(m0=p0.filter)===null||m0===void 0?void 0:m0.event)===null||x0===void 0?void 0:x0.toLocaleLowerCase())===o0}).map(p0=>p0.callback(f0,a0)):(s0=this.bindings[o0])===null||s0===void 0||s0.filter(p0=>{var A0,m0,x0,g0,y0,b0,E0,w0;if(["broadcast","presence","postgres_changes"].includes(o0))if("id"in p0){const v0=p0.id,S0=(A0=p0.filter)===null||A0===void 0?void 0:A0.event;return v0&&((m0=n0.ids)===null||m0===void 0?void 0:m0.includes(v0))&&(S0==="*"||(S0==null?void 0:S0.toLocaleLowerCase())===((x0=n0.data)===null||x0===void 0?void 0:x0.type.toLocaleLowerCase()))&&(!(!((g0=p0.filter)===null||g0===void 0)&&g0.table)||p0.filter.table===((y0=n0.data)===null||y0===void 0?void 0:y0.table))}else{const v0=(E0=(b0=p0==null?void 0:p0.filter)===null||b0===void 0?void 0:b0.event)===null||E0===void 0?void 0:E0.toLocaleLowerCase();return v0==="*"||v0===((w0=n0==null?void 0:n0.event)===null||w0===void 0?void 0:w0.toLocaleLowerCase())}else return p0.type.toLocaleLowerCase()===o0}).map(p0=>{if(typeof f0=="object"&&"ids"in f0){const A0=f0.data,{schema:m0,table:
540x0,commit_timestamp:g0,type:y0,errors:b0}=A0;f0=Object.assign(Object.assign({},{schema:m0,table:x0,commit_timestamp:g0,eventType:y0,new:{},old:{},errors:b0}),this._getPayloadRecords(A0))}p0.callback(f0,a0)})}_isClosed(){return this.state===CHANNEL_STATES.closed}_isJoined(){return this.state===CHANNEL_STATES.joined}_isJoining(){return this.state===CHANNEL_STATES.joining}_isLeaving(){return this.state===CHANNEL_STATES.leaving}_replyEventName(e0){return`chan_reply_${e0}`}_on(e0,n0,a0){const i0=e0.toLocaleLowerCase(),s0={type:i0,filter:n0,callback:a0};return this.bindings[i0]?this.bindings[i0].push(s0):this.bindings[i0]=[s0],this}_off(e0,n0){const a0=e0.toLocaleLowerCase();return this.bindings[a0]&&(this.bindings[a0]=this.bindings[a0].filter(i0=>{var s0;return!(((s0=i0.type)===null||s0===void 0?void 0:s0.toLocaleLowerCase())===a0&&RealtimeChannel.isEqual(i0.filter,n0))})),this}static isEqual(e0,n0){if(Object.keys(e0).length!==Object.keys(n0).length)return!1;for(const a0 in e0)if(e0[a0]!==n0[a0])return!1;return!0}static isFilterValueEqual(e0,n0){return(e0??void 0)===(n0??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e0){this._on(CHANNEL_EVENTS.close,{},e0)}_onError(e0){this._on(CHANNEL_EVENTS.error,{},n0=>e0(n0))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e0=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=CHANNEL_STATES.joining,this.joinPush.resend(e0))}_getPayloadRecords(e0){const n0={new:{},old:{}};return(e0.type==="INSERT"||e0.type==="UPDATE")&&(n0.new=convertChangeData(e0.columns,e0.record)),(e0.type==="UPDATE"||e0.type==="DELETE")&&(n0.old=convertChangeData(e0.columns,e0.old_record)),n0}}const noop$5=()=>{},CONNECTION_TIMEOUTS={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},RECONNECT_INTERVALS=[1e3,2e3,5e3,1e4],DEFAULT_RECONNECT_FALLBACK=1e4,WORKER_SCRIPT=` 541 addEventListener("message", (e) => { 542 if (e.data.event === "start") { 543 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 544 } 545 });`;class RealtimeClient{constructor(e0,n0){var a0;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=DEFAULT_TIMEOUT,this.transport=null,this.heartbeatIntervalMs=CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=noop$5,this.ref=0,this.reconnectTimer=null,this.vsn=DEFAULT_VSN,this.logger=noop$5,this.conn=null,this.sendBuffer=[],this.serializer=new Serializer,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i0=>i0?(...s0)=>i0(...s0):(...s0)=>fetch(...s0),!(!((a0=n0==null?void 0:n0.params)===null||a0===void 0)&&a0.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n0.params.apikey,this.endPoint=`${e0}/${TRANSPORTS.websocket}`,this.httpEndpoint=httpEndpointURL(e0),this._initializeOptions(n0),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n0==null?void 0:n0.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=WebSocketFactory.createWebSocket(this.endpointURL())}catch(e0){this._setConnectionState("disconnected");const n0=e0.message;throw n0.includes("Node.js")?new Error(`${n0} 546 547To use Realtime in Node.js, you need to provide a WebSocket implementation: 548 549Option 1: Use Node.js 22+ which has native WebSocket support 550Option 2: Install and provide the "ws" package: 551 552 npm install ws 553 554 import ws from "ws" 555 const client = new RealtimeClient(url, { 556 ...options, 557 transport: ws 558 })`):new Error(`WebSocket not available: ${n0}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e0,n0){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const a0=setTimeout(()=>{this._setConnectionState("disconnected")},100);
558this.conn.onclose=()=>{clearTimeout(a0),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(e0?this.conn.close(e0,n0??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e0){const n0=await e0.unsubscribe();return this.channels.length===0&&this.disconnect(),n0}async removeAllChannels(){const e0=await Promise.all(this.channels.map(n0=>n0.unsubscribe()));return this.channels=[],this.disconnect(),e0}log(e0,n0,a0){this.logger(e0,n0,a0)}connectionState(){switch(this.conn&&this.conn.readyState){case SOCKET_STATES.connecting:return CONNECTION_STATE.Connecting;case SOCKET_STATES.open:return CONNECTION_STATE.Open;case SOCKET_STATES.closing:return CONNECTION_STATE.Closing;default:return CONNECTION_STATE.Closed}}isConnected(){return this.connectionState()===CONNECTION_STATE.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e0,n0={config:{}}){const a0=`realtime:${e0}`,i0=this.getChannels().find(s0=>s0.topic===a0);if(i0)return i0;{const s0=new RealtimeChannel(`realtime:${e0}`,n0,this);return this.channels.push(s0),s0}}push(e0){const{topic:n0,event:a0,payload:i0,ref:s0}=e0,o0=()=>{this.encode(e0,l0=>{var c0;(c0=this.conn)===null||c0===void 0||c0.send(l0)})};this.log("push",`${n0} ${a0} (${s0})`,i0),this.isConnected()?o0():this.sendBuffer.push(o0)}async setAuth(e0=null){this._authPromise=this._performAuth(e0);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var e0;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n0){this.log("error","error in heartbeat callback",n0)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n0){this.log("error","error in heartbeat callback",n0)}this._wasManualDisconnect=!1,(e0=this.conn)===null||e0===void 0||e0.close(WS_CLOSE_NORMAL,"heartbeat timeout"),setTimeout(()=>{var n0;this.isConnected()||(n0=this.reconnectTimer)===null||n0===void 0||n0.scheduleTimeout()},CONNECTION_TIMEOUTS.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n0){this.log("error","error in heartbeat callback",n0)}this._setAuthSafely("heartbeat")}onHeartbeat(e0){this.heartbeatCallback=e0}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e0=>e0()),this.sendBuffer=[])}_makeRef(){let e0=this.ref+1;return e0===this.ref?this.ref=0:this.ref=e0,this.ref.toString()}_leaveOpenTopic(e0){let n0=this.channels.find(a0=>a0.topic===e0&&(a0._isJoined()||a0._isJoining()));n0&&(this.log("transport",`leaving duplicate topic "${e0}"`),n0.unsubscribe())}_remove(e0){this.channels=this.channels.filter(n0=>n0.topic!==e0.topic)}_onConnMessage(e0){this.decode(e0.data,n0=>{if(n0.topic==="phoenix"&&n0.event==="phx_reply"&&n0.ref&&n0.ref===this.pendingHeartbeatRef){const u0=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n0.payload.status==="ok"?"ok":"error",u0)}catch(d0){this.log("error","error in heartbeat callback",d0)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:a0,event:i0,payload:s0,ref:o0}=n0,l0=o0?`(${o0})`:"",c0=s0.status||"";this.log("receive",`${c0} ${a0} ${i0} ${l0}`.trim(),s0),this.channels.filter(u0=>u0._isMember(a0)).forEach(u0=>u0._trigger(i0,s0,o0)),this._triggerStateCallbacks("message",n0)})}_clearTimer(e0){var n0;e0==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e0==="reconnect"&&((n0=this.reconnectTimer)===null||n0===void 0||n0.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e0=>this._onConnError(e0),this.conn.onmessage=e0=>
558this._onConnMessage(e0),this.conn.onclose=e0=>this._onConnClose(e0),this.conn.readyState===SOCKET_STATES.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===SOCKET_STATES.open||this.conn.readyState===SOCKET_STATES.connecting)try{this.conn.close()}catch(e0){this.log("error","Error closing connection",e0)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(e0=>e0.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n0=>{this.log("error","error waiting for auth on connect",n0),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e0=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e0),this.workerRef.onerror=n0=>{this.log("worker","worker error",n0.message),this._terminateWorker()},this.workerRef.onmessage=n0=>{n0.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(e0){var n0;this._setConnectionState("disconnected"),this.log("transport","close",e0),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n0=this.reconnectTimer)===null||n0===void 0||n0.scheduleTimeout(),this._triggerStateCallbacks("close",e0)}_onConnError(e0){this._setConnectionState("disconnected"),this.log("transport",`${e0}`),this._triggerChanError(),this._triggerStateCallbacks("error",e0)}_triggerChanError(){this.channels.forEach(e0=>e0._trigger(CHANNEL_EVENTS.error))}_appendParams(e0,n0){if(Object.keys(n0).length===0)return e0;const a0=e0.match(/\?/)?"&":"?",i0=new URLSearchParams(n0);return`${e0}${a0}${i0}`}_workerObjectUrl(e0){let n0;if(e0)n0=e0;else{const a0=new Blob([WORKER_SCRIPT],{type:"application/javascript"});n0=URL.createObjectURL(a0)}return n0}_setConnectionState(e0,n0=!1){this._connectionState=e0,e0==="connecting"?this._wasManualDisconnect=!1:e0==="disconnecting"&&(this._wasManualDisconnect=n0)}async _performAuth(e0=null){let n0,a0=!1;if(e0)n0=e0,a0=!0;else if(this.accessToken)try{n0=await this.accessToken()}catch(i0){this.log("error","Error fetching access token from callback",i0),n0=this.accessTokenValue}else n0=this.accessTokenValue;a0?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n0&&(this.accessTokenValue=n0,this.channels.forEach(i0=>{const s0={access_token:n0,version:DEFAULT_VERSION};n0&&i0.updateJoinPayload(s0),i0.joinedOnce&&i0._isJoined()&&i0._push(CHANNEL_EVENTS.access_token,{access_token:n0})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e0="general"){this._isManualToken()||this.setAuth().catch(n0=>{this.log("error",`Error setting auth in ${e0}`,n0)})}_triggerStateCallbacks(e0,n0){try{this.stateChangeCallbacks[e0].forEach(a0=>{try{a0(n0)}catch(i0){this.log("error",`error in ${e0} callback`,i0)}})}catch(a0){this.log("error",`error triggering ${e0} callbacks`,a0)}}_setupReconnectionTimer(){this.reconnectTimer=new Timer(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},CONNECTION_TIMEOUTS.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0,p0;switch(this.transport=(n0=e0==null?void 0:e0.transport)!==null&&n0!==void 0?n0:null,this.timeout=(a0=e0==null?void 0:e0.timeout)!==null&&a0!==void 0?a0:DEFAULT_TIMEOUT,this.heartbeatIntervalMs=(i0=e0==null?void 0:e0.heartbeatIntervalMs)!==null&&i0!==void 0?i0:CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL,this.worker=(s0=e0==null?void 0:e0.worker)!==null&&s0!==void 0?s0:!1,this.accessToken=(o0=e0==null?void 0:e0.accessToken)!==null&&o0!==void 0?o0:null,this.heartbeatCallback=(l0=e0==null?void 0:e0.heartbeatCallback)!==null&&l0!==void 0?l0:noop$5,this.vsn=(c0=e0==null?void 0:e0.vsn)!==null&&c0!==void 0?c0:DEFAULT_
558VSN,e0!=null&&e0.params&&(this.params=e0.params),e0!=null&&e0.logger&&(this.logger=e0.logger),(e0!=null&&e0.logLevel||e0!=null&&e0.log_level)&&(this.logLevel=e0.logLevel||e0.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u0=e0==null?void 0:e0.reconnectAfterMs)!==null&&u0!==void 0?u0:A0=>RECONNECT_INTERVALS[A0-1]||DEFAULT_RECONNECT_FALLBACK,this.vsn){case VSN_1_0_0:this.encode=(d0=e0==null?void 0:e0.encode)!==null&&d0!==void 0?d0:(A0,m0)=>m0(JSON.stringify(A0)),this.decode=(h0=e0==null?void 0:e0.decode)!==null&&h0!==void 0?h0:(A0,m0)=>m0(JSON.parse(A0));break;case VSN_2_0_0:this.encode=(f0=e0==null?void 0:e0.encode)!==null&&f0!==void 0?f0:this.serializer.encode.bind(this.serializer),this.decode=(p0=e0==null?void 0:e0.decode)!==null&&p0!==void 0?p0:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e0==null?void 0:e0.workerUrl}}}var IcebergError=class extends Error{constructor(r0,e0){var n0;super(r0),this.name="IcebergError",this.status=e0.status,this.icebergType=e0.icebergType,this.icebergCode=e0.icebergCode,this.details=e0.details,this.isCommitStateUnknown=e0.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e0.status)&&((n0=e0.icebergType)==null?void 0:n0.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function buildUrl(r0,e0,n0){const a0=new URL(e0,r0);if(n0)for(const[i0,s0]of Object.entries(n0))s0!==void 0&&a0.searchParams.set(i0,s0);return a0.toString()}async function buildAuthHeaders(r0){return!r0||r0.type==="none"?{}:r0.type==="bearer"?{Authorization:`Bearer ${r0.token}`}:r0.type==="header"?{[r0.name]:r0.value}:r0.type==="custom"?await r0.getHeaders():{}}function createFetchClient(r0){const e0=r0.fetchImpl??globalThis.fetch;return{async request({method:n0,path:a0,query:i0,body:s0,headers:o0}){const l0=buildUrl(r0.baseUrl,a0,i0),c0=await buildAuthHeaders(r0.auth),u0=await e0(l0,{method:n0,headers:{...s0?{"Content-Type":"application/json"}:{},...c0,...o0},body:s0?JSON.stringify(s0):void 0}),d0=await u0.text(),h0=(u0.headers.get("content-type")||"").includes("application/json"),f0=h0&&d0?JSON.parse(d0):d0;if(!u0.ok){const p0=h0?f0:void 0,A0=p0==null?void 0:p0.error;throw new IcebergError((A0==null?void 0:A0.message)??`Request failed with status ${u0.status}`,{status:u0.status,icebergType:A0==null?void 0:A0.type,icebergCode:A0==null?void 0:A0.code,details:p0})}return{status:u0.status,headers:u0.headers,data:f0}}}}function namespaceToPath(r0){return r0.join("�")}var NamespaceOperations=class{constructor(r0,e0=""){this.client=r0,this.prefix=e0}async listNamespaces(r0){const e0=r0?{parent:namespaceToPath(r0.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e0})).data.namespaces.map(a0=>({namespace:a0}))}async createNamespace(r0,e0){const n0={namespace:r0.namespace,properties:e0==null?void 0:e0.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n0})).data}async dropNamespace(r0){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${namespaceToPath(r0.namespace)}`})}async loadNamespaceMetadata(r0){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath(r0.namespace)}`})).data.properties}}async namespaceExists(r0){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${namespaceToPath(r0.namespace)}`}),!0}catch(e0){if(e0 instanceof IcebergError&&e0.status===404)return!1;throw e0}}async createNamespaceIfNotExists(r0,e0){try{return await this.createNamespace(r0,e0)}catch(n0){if(n0 instanceof IcebergError&&n0.status===409)return;throw n0}}};function namespaceToPath2(r0){return r0.join("�")}var TableOperations=class{constructor(r0,e0="",n0){this.client=r0,this.prefix=e0,this.accessDelegation=n0}async listTables(r0){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables`})).data.identifiers}async createTable(r0,e0){const n0={};return this.accessDelegation&&(n0["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables`,body:e0,headers:n0})).data.metadata}async updateTable(r0,e0){const n0=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables/${r0.name}`,body:e0});return{"metadata-location":n0.data["metadata-location"],metadata:n0.data.metadata}}async dropTable(r0,e0){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables/${r0.name}`,query:{purgeRequested:String((e0==null?void 0:e0.purge)??!1)}})}async loadTable(r0){const e0={};return this.accessDelegation&&(e0["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables/${r0.name}`,headers:e0})).data.metadata}async tableExists(r0){const e0={};this.accessDelegation&&(e0["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${namespaceToPath2(r0.namespace)}/tables/${r0.name}`,headers:e0}),!0}catch(n0){if(n0 instanceof IcebergError&&n0.status===404)return!1;throw n0}}async createTableIfNotExists(r0,e0){try{return await this.createTable(r0,e0)}catch(n0){if(n0 instanceof IcebergError&&n0.status===409)return await this.loadTable({namespace:r0.namespace,name:e0.name});throw n0}}},IcebergRestCatalog=class{constructor(r0){var a0;let e0="v1";r0.catalogName&&(e0+=`/${r0.catalogName}`);const n0=r0.baseUrl.endsWith("/")?r0.baseUrl:`${r0.baseUrl}/`;this.client=createFetchClient({baseUrl:n0,auth:r0.auth,fetchImpl:r0.fetch}),this.accessDelegation=(a0=r0.accessDelegation)==null?void 0:a0.join(","),this.namespaceOps=new NamespaceOperations(this.client,e0),this.tableOps=new TableOperations(this.client,e0,this.accessDelegation)}async listNamespaces(r0){return this.namespaceOps.listNamespaces(r0)}async createNamespace(r0,e0){return this.namespaceOps.createNamespace(r0,e0)}async dropNamespace(r0){await this.namespaceOps.dropNamespace(r0)}async loadNamespaceMetadata(r0){return this.namespaceOps.loadNamespaceMetadata(r0)}async listTables(r0){return this.tableOps.listTables(r0)}
558async createTable(r0,e0){return this.tableOps.createTable(r0,e0)}async updateTable(r0,e0){return this.tableOps.updateTable(r0,e0)}async dropTable(r0,e0){await this.tableOps.dropTable(r0,e0)}async loadTable(r0){return this.tableOps.loadTable(r0)}async namespaceExists(r0){return this.namespaceOps.namespaceExists(r0)}async tableExists(r0){return this.tableOps.tableExists(r0)}async createNamespaceIfNotExists(r0,e0){return this.namespaceOps.createNamespaceIfNotExists(r0,e0)}async createTableIfNotExists(r0,e0){return this.tableOps.createTableIfNotExists(r0,e0)}},StorageError=class extends Error{constructor(r0){super(r0),this.__isStorageError=!0,this.name="StorageError"}};function isStorageError(r0){return typeof r0=="object"&&r0!==null&&"__isStorageError"in r0}var StorageApiError=class extends StorageError{constructor(r0,e0,n0){super(r0),this.name="StorageApiError",this.status=e0,this.statusCode=n0}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},StorageUnknownError=class extends StorageError{constructor(r0,e0){super(r0),this.name="StorageUnknownError",this.originalError=e0}};const resolveFetch$1$1=r0=>
558r0?(...e0)=>r0(...e0):(...e0)=>fetch(...e0),resolveResponse$1=()=>Response,recursiveToCamel=r0=>{if(Array.isArray(r0))return r0.map(n0=>recursiveToCamel(n0));if(typeof r0=="function"||r0!==Object(r0))return r0;const e0={};return Object.entries(r0).forEach(([n0,a0])=>{const i0=n0.replace(/([-_][a-z])/gi,s0=>s0.toUpperCase().replace(/[-_]/g,""));e0[i0]=recursiveToCamel(a0)}),e0},isPlainObject$1$1=r0=>{if(typeof r0!="object"||r0===null)return!1;const e0=Object.getPrototypeOf(r0);return(e0===null||e0===Object.prototype||Object.getPrototypeOf(e0)===null)&&!(Symbol.toStringTag in r0)&&!(Symbol.iterator in r0)},isValidBucketName=r0=>!r0||typeof r0!="string"||r0.length===0||r0.length>100||r0.trim()!==r0||r0.includes("/")||r0.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(r0);function _typeof$E(r0){"@babel/helpers - typeof";return _typeof$E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$E(r0)}function toPrimitive$1(r0,e0){if(_typeof$E(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$E(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function toPropertyKey$1(r0){var e0=toPrimitive$1(r0,"string");return _typeof$E(e0)=="symbol"?e0:e0+""}function _defineProperty$C(r0,e0,n0){return(e0=toPropertyKey$1(e0))in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function ownKeys$y(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread2$1(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$y(Object(n0),!0).forEach(function(a0){_defineProperty$C(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$y(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}const _getErrorMessage$1=r0=>{var e0;return r0.msg||r0.message||r0.error_description||(typeof r0.error=="string"?r0.error:(e0=r0.error)===null||e0===void 0?void 0:e0.message)||JSON.stringify(r0)},handleError$1=async(r0,e0,n0)=>{r0 instanceof await resolveResponse$1()&&!(n0!=null&&n0.noResolveJson)?r0.json().then(a0=>{const i0=r0.status||500,s0=(a0==null?void 0:a0.statusCode)||i0+"";e0(new StorageApiError(_getErrorMessage$1(a0),i0,s0))}).catch(a0=>{e0(new StorageUnknownError(_getErrorMessage$1(a0),a0))}):e0(new StorageUnknownError(_getErrorMessage$1(r0),r0))}
558,_getRequestParams$1=(r0,e0,n0,a0)=>{const i0={method:r0,headers:(e0==null?void 0:e0.headers)||{}};return r0==="GET"||!a0?i0:(isPlainObject$1$1(a0)?(i0.headers=_objectSpread2$1({"Content-Type":"application/json"},e0==null?void 0:e0.headers),i0.body=JSON.stringify(a0)):i0.body=a0,e0!=null&&e0.duplex&&(i0.duplex=e0.duplex),_objectSpread2$1(_objectSpread2$1({},i0),n0))};async function _handleRequest$1(r0,e0,n0,a0,i0,s0){return new Promise((o0,l0)=>{r0(n0,_getRequestParams$1(e0,a0,i0,s0)).then(c0=>{if(!c0.ok)throw c0;return a0!=null&&a0.noResolveJson?c0:c0.json()}).then(c0=>o0(c0)).catch(c0=>handleError$1(c0,l0,a0))})}async function get$3(r0,e0,n0,a0){return _handleRequest$1(r0,"GET",e0,n0,a0)}async function post$1(r0,e0,n0,a0,i0){return _handleRequest$1(r0,"POST",e0,a0,i0,n0)}async function put(r0,e0,n0,a0,i0){return _handleRequest$1(r0,"PUT",e0,a0,i0,n0)}async function head(r0,e0,n0,a0){return _handleRequest$1(r0,"HEAD",e0,_objectSpread2$1(_objectSpread2$1({},n0),{},{noResolveJson:!0}),a0)}async function remove(r0,e0,n0,a0,i0){return _handleRequest$1(r0,"DELETE",e0,a0,i0,n0)}var StreamDownloadBuilder=class{constructor(r0,e0){this.downloadFn=r0,this.shouldThrowOnError=e0}then(r0,e0){return this.execute().then(r0,e0)}async execute(){var r0=this;try{return{data:(await r0.downloadFn()).body,error:null}}catch(e0){if(r0.shouldThrowOnError)throw e0;if(isStorageError(e0))return{data:null,error:e0};throw e0}}};let _Symbol$toStringTag;_Symbol$toStringTag=Symbol.toStringTag;var BlobDownloadBuilder=class{constructor(r0,e0){this.downloadFn=r0,this.shouldThrowOnError=e0,this[_Symbol$toStringTag]="BlobDownloadBuilder",this.promise=null}asStream(){return new StreamDownloadBuilder(this.downloadFn,this.shouldThrowOnError)}then(r0,e0){return this.getPromise().then(r0,e0)}catch(r0){return this.getPromise().catch(r0)}finally(r0){return this.getPromise().finally(r0)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var r0=this;try{return{data:await(await r0.downloadFn()).blob(),error:null}}catch(e0){if(r0.shouldThrowOnError)throw e0;if(isStorageError(e0))return{data:null,error:e0};throw e0}}};const DEFAULT_SEARCH_OPTIONS={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},DEFAULT_FILE_OPTIONS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var StorageFileApi=class{constructor(r0,e0={},n0,a0){this.shouldThrowOnError=!1,this.url=r0,this.headers=e0,this.bucketId=n0,this.fetch=resolveFetch$1$1(a0)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(r0,e0,n0,a0){var i0=this;try{let s0;const o0=_objectSpread2$1(_objectSpread2$1({},DEFAULT_FILE_OPTIONS),a0);let l0=_objectSpread2$1(_objectSpread2$1({},i0.headers),r0==="POST"&&{"x-upsert":String(o0.upsert)});const c0=o0.metadata;typeof Blob<"u"&&n0 instanceof Blob?(s0=new FormData,s0.append("cacheControl",o0.cacheControl),c0&&s0.append("metadata",i0.encodeMetadata(c0)),s0.append("",n0)):typeof FormData<"u"&&n0 instanceof FormData?(s0=n0,s0.has("cacheControl")||s0.append("cacheControl",o0.cacheControl),c0&&!s0.has("metadata")&&s0.append("metadata",i0.encodeMetadata(c0))):(s0=n0,l0["cache-control"]=`max-age=${o0.cacheControl}`,l0["content-type"]=o0.contentType,c0&&(l0["x-metadata"]=i0.toBase64(i0.encodeMetadata(c0))),(typeof ReadableStream<"u"&&s0 instanceof ReadableStream||s0&&typeof s0=="object"&&"pipe"in s0&&typeof s0.pipe=="function")&&!o0.duplex&&(o0.duplex="half")),a0!=null&&a0.headers&&(l0=_objectSpread2$1(_objectSpread2$1({},l0),a0.headers));const u0=i0._removeEmptyFolders(e0),d0=i0._getFinalPath(u0),h0=await(r0=="PUT"?put:post$1)(i0.fetch,`${i0.url}/object/${d0}`,s0,_objectSpread2$1({headers:l0},o0!=null&&o0.duplex?{duplex:o0.duplex}:{}));return{data:{path:u0,id:h0.Id,fullPath:h0.Key},error:null}}catch(s0){if(i0.shouldThrowOnError)throw s0;if(isStorageError(s0))return{data:null,error:s0};throw s0}}async upload(r0,e0,n0){return this.uploadOrUpdate("POST",r0,e0,n0)}async uploadToSignedUrl(r0,e0,n0,a0){var i0=this;const s0=i0._removeEmptyFolders(r0),o0=i0._getFinalPath(s0),l0=new URL(i0.url+`/object/upload/sign/${o0}`);l0.searchParams.set("token",e0);try{let c0;const u0=_objectSpread2$1({upsert:DEFAULT_FILE_OPTIONS.upsert},a0),d0=_objectSpread2$1(_objectSpread2$1({},i0.headers),{"x-upsert":String(u0.upsert)});return typeof Blob<"u"&&n0 instanceof Blob?(c0=new FormData,c0.append("cacheControl",u0.cacheControl),c0.append("",n0)):typeof FormData<"u"&&n0 instanceof FormData?(c0=n0,c0.append("cacheControl",u0.cacheControl)):(c0=n0,d0["cache-control"]=`max-age=${u0.cacheControl}`,d0["content-type"]=u0.contentType),{data:{path:s0,fullPath:(await put(i0.fetch,l0.toString(),c0,{headers:d0})).Key},error:null}}catch(c0){if(i0.shouldThrowOnError)throw c0;if(isStorageError(c0))return{data:null,error:c0};throw c0}}async createSignedUploadUrl(r0,e0){var n0=this;try{let a0=n0._getFinalPath(r0);const i0=_objectSpread2$1({},n0.headers);e0!=null&&e0.upsert&&(i0["x-upsert"]="true");const s0=await post$1(n0.fetch,`${n0.url}/object/upload/sign/${a0}`,{},{headers:i0}),o0=new URL(n0.url+s0.url),l0=o0.searchParams.get("token");if(!l0)throw new StorageError("No token returned by API");return{data:{signedUrl:o0.toString(),path:r0,token:l0},error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageError(a0))return{data:null,error:a0};throw a0}}async update(r0,e0,n0){return this.uploadOrUpdate("PUT",r0,e0,n0)}async move(r0,e0,n0){var a0=this;try{return{data:await post$1(a0.fetch,`${a0.url}/object/move`,{bucketId:a0.bucketId,sourceKey:r0,destinationKey:e0,destinationBucket:n0==null?void 0:n0.destinationBucket},{headers:a0.headers}),error:null}}catch(i0){if(a0.shouldThrowOnError)throw i0;if(isStorageError(i0))return{data:null,error:i0};throw i0}}async copy(r0,e0,n0){var a0=this;try{return{data:{path:(await post$1(a0.fetch,`${a0.url}/object/copy`,{bucketId:a0.bucketId,sourceKey:r0,destinationKey:e0,destinationBucket:n0==null?void 0:n0.destinationBucket},{headers:a0.headers})).Key},error:null}}catch(i0){if(a0.shouldThrowOnError)throw i0;if(isStorageError(i0))return{data:null,error:i0};throw i0}}async createSignedUrl(r0,e0,n0){var a0=this;try{let i0=a0._getFinalPath(r0),s0=await post$1(a0.fetch,`${a0.url}/object/sign/${i0}
558`,_objectSpread2$1({expiresIn:e0},n0!=null&&n0.transform?{transform:n0.transform}:{}),{headers:a0.headers});const o0=n0!=null&&n0.download?`&download=${n0.download===!0?"":n0.download}`:"";return s0={signedUrl:encodeURI(`${a0.url}${s0.signedURL}${o0}`)},{data:s0,error:null}}catch(i0){if(a0.shouldThrowOnError)throw i0;if(isStorageError(i0))return{data:null,error:i0};throw i0}}async createSignedUrls(r0,e0,n0){var a0=this;try{const i0=await post$1(a0.fetch,`${a0.url}/object/sign/${a0.bucketId}`,{expiresIn:e0,paths:r0},{headers:a0.headers}),s0=n0!=null&&n0.download?`&download=${n0.download===!0?"":n0.download}`:"";return{data:i0.map(o0=>_objectSpread2$1(_objectSpread2$1({},o0),{},{signedUrl:o0.signedURL?encodeURI(`${a0.url}${o0.signedURL}${s0}`):null})),error:null}}catch(i0){if(a0.shouldThrowOnError)throw i0;if(isStorageError(i0))return{data:null,error:i0};throw i0}}download(r0,e0){const n0=typeof(e0==null?void 0:e0.transform)<"u"?"render/image/authenticated":"object",a0=this.transformOptsToQueryString((e0==null?void 0:e0.transform)||{}),i0=a0?`?${a0}`:"",s0=this._getFinalPath(r0),o0=()=>get$3(this.fetch,`${this.url}/${n0}/${s0}${i0}`,{headers:this.headers,noResolveJson:!0});return new BlobDownloadBuilder(o0,this.shouldThrowOnError)}async info(r0){var e0=this;const n0=e0._getFinalPath(r0);try{return{data:recursiveToCamel(await get$3(e0.fetch,`${e0.url}/object/info/${n0}`,{headers:e0.headers})),error:null}}catch(a0){if(e0.shouldThrowOnError)throw a0;if(isStorageError(a0))return{data:null,error:a0};throw a0}}async exists(r0){var e0=this;const n0=e0._getFinalPath(r0);try{return await head(e0.fetch,`${e0.url}/object/${n0}`,{headers:e0.headers}),{data:!0,error:null}}catch(a0){if(e0.shouldThrowOnError)throw a0;if(isStorageError(a0)&&a0 instanceof StorageUnknownError){const i0=a0.originalError;if([400,404].includes(i0==null?void 0:i0.status))return{data:!1,error:a0}}throw a0}}getPublicUrl(r0,e0){const n0=this._getFinalPath(r0),a0=[],i0=e0!=null&&e0.download?`download=${e0.download===!0?"":e0.download}`:"";i0!==""&&a0.push(i0);const s0=typeof(e0==null?void 0:e0.transform)<"u"?"render/image":"object",o0=this.transformOptsToQueryString((e0==null?void 0:e0.transform)||{});o0!==""&&a0.push(o0);let l0=a0.join("&");return l0!==""&&(l0=`?${l0}`),{data:{publicUrl:encodeURI(`${this.url}/${s0}/public/${n0}${l0}`)}}}async remove(r0){var e0=this;try{return{data:await remove(e0.fetch,`${e0.url}/object/${e0.bucketId}`,{prefixes:r0},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}async list(r0,e0,n0){var a0=this;try{const i0=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},DEFAULT_SEARCH_OPTIONS),e0),{},{prefix:r0||""});return{data:await post$1(a0.fetch,`${a0.url}/object/list/${a0.bucketId}`,i0,{headers:a0.headers},n0),error:null}}catch(i0){if(a0.shouldThrowOnError)throw i0;if(isStorageError(i0))return{data:null,error:i0};throw i0}}async listV2(r0,e0){var n0=this;try{const a0=_objectSpread2$1({},r0);return{data:await post$1(n0.fetch,`${n0.url}/object/list-v2/${n0.bucketId}`,a0,{headers:n0.headers},e0),error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageError(a0))return{data:null,error:a0};throw a0}}encodeMetadata(r0){return JSON.stringify(r0)}toBase64(r0){return typeof Buffer<"u"?Buffer.from(r0).toString("base64"):btoa(r0)}_getFinalPath(r0){return`${this.bucketId}/${r0.replace(/^\/+/,"")}`}_removeEmptyFolders(r0){return r0.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(r0){const e0=[];return r0.width&&e0.push(`width=${r0.width}`),r0.height&&e0.push(`height=${r0.height}`),r0.resize&&e0.push(`resize=${r0.resize}`),r0.format&&e0.push(`format=${r0.format}`),r0.quality&&e0.push(`quality=${r0.quality}`),e0.join("&")}};const version$3="2.90.1",DEFAULT_HEADERS$1$1={"X-Client-Info":`storage-js/${version$3}`};var StorageBucketApi=class{constructor(r0,e0={},n0,a0){this.shouldThrowOnError=!1;const i0=new URL(r0);a0!=null&&a0.useNewHostname&&/supabase\.(co|in|red)$/.test(i0.hostname)&&!i0.hostname.includes("storage.supabase.")&&(i0.hostname=i0.hostname.replace("supabase.","storage.supabase.")),this.url=i0.href.replace(/\/$/,""),this.headers=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$1$1),e0),this.fetch=resolveFetch$1$1(n0)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(r0){var e0=this;try{const n0=e0.listBucketOptionsToQueryString(r0);return{data:await get$3(e0.fetch,`${e0.url}/bucket${n0}`,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}
558async getBucket(r0){var e0=this;try{return{data:await get$3(e0.fetch,`${e0.url}/bucket/${r0}`,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}async createBucket(r0,e0={public:!1}){var n0=this;try{return{data:await post$1(n0.fetch,`${n0.url}/bucket`,{id:r0,name:r0,type:e0.type,public:e0.public,file_size_limit:e0.fileSizeLimit,allowed_mime_types:e0.allowedMimeTypes},{headers:n0.headers}),error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageError(a0))return{data:null,error:a0};throw a0}}async updateBucket(r0,e0){var n0=this;try{return{data:await put(n0.fetch,`${n0.url}/bucket/${r0}`,{id:r0,name:r0,public:e0.public,file_size_limit:e0.fileSizeLimit,allowed_mime_types:e0.allowedMimeTypes},{headers:n0.headers}),error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageError(a0))return{data:null,error:a0};throw a0}}async emptyBucket(r0){var e0=this;try{return{data:await post$1(e0.fetch,`${e0.url}/bucket/${r0}/empty`,{},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}
558async deleteBucket(r0){var e0=this;try{return{data:await remove(e0.fetch,`${e0.url}/bucket/${r0}`,{},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}listBucketOptionsToQueryString(r0){const e0={};return r0&&("limit"in r0&&(e0.limit=String(r0.limit)),"offset"in r0&&(e0.offset=String(r0.offset)),r0.search&&(e0.search=r0.search),r0.sortColumn&&(e0.sortColumn=r0.sortColumn),r0.sortOrder&&(e0.sortOrder=r0.sortOrder)),Object.keys(e0).length>0?"?"+new URLSearchParams(e0).toString():""}},StorageAnalyticsClient=class{constructor(r0,e0={},n0){this.shouldThrowOnError=!1,this.url=r0.replace(/\/$/,""),this.headers=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$1$1),e0),this.fetch=resolveFetch$1$1(n0)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(r0){var e0=this;try{return{data:await post$1(e0.fetch,`${e0.url}/bucket`,{name:r0},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}async listBuckets(r0){var e0=this;try{const n0=new URLSearchParams;(r0==null?void 0:r0.limit)!==void 0&&n0.set("limit",r0.limit.toString()),(r0==null?void 0:r0.offset)!==void 0&&n0.set("offset",r0.offset.toString()),r0!=null&&r0.sortColumn&&n0.set("sortColumn",r0.sortColumn),r0!=null&&r0.sortOrder&&n0.set("sortOrder",r0.sortOrder),r0!=null&&r0.search&&n0.set("search",r0.search);const a0=n0.toString(),i0=a0?`${e0.url}/bucket?${a0}`:`${e0.url}/bucket`;return{data:await get$3(e0.fetch,i0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}
558async deleteBucket(r0){var e0=this;try{return{data:await remove(e0.fetch,`${e0.url}/bucket/${r0}`,{},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageError(n0))return{data:null,error:n0};throw n0}}from(r0){var e0=this;if(!isValidBucketName(r0))throw new StorageError("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n0=new IcebergRestCatalog({baseUrl:this.url,catalogName:r0,auth:{type:"custom",getHeaders:async()=>e0.headers},fetch:this.fetch}),a0=this.shouldThrowOnError;return new Proxy(n0,{get(i0,s0){const o0=i0[s0];return typeof o0!="function"?o0:async(...l0)=>{try{return{data:await o0.apply(i0,l0),error:null}}catch(c0){if(a0)throw c0;return{data:null,error:c0}}}}})}};const DEFAULT_HEADERS$2={"X-Client-Info":`storage-js/${version$3}`,"Content-Type":"application/json"};var StorageVectorsError=class extends Error{constructor(r0){super(r0),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function isStorageVectorsError(r0){return typeof r0=="object"&&r0!==null&&"__isStorageVectorsError"in r0}var StorageVectorsApiError=class extends StorageVectorsError{constructor(r0,e0,n0){super(r0),this.name="StorageVectorsApiError",this.status=e0,this.statusCode=n0}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},StorageVectorsUnknownError=class extends StorageVectorsError{constructor(r0,e0){super(r0),this.name="StorageVectorsUnknownError",this.originalError=e0}};const resolveFetch$2=r0=>
558r0?(...e0)=>r0(...e0):(...e0)=>fetch(...e0),isPlainObject$2=r0=>{if(typeof r0!="object"||r0===null)return!1;const e0=Object.getPrototypeOf(r0);return(e0===null||e0===Object.prototype||Object.getPrototypeOf(e0)===null)&&!(Symbol.toStringTag in r0)&&!(Symbol.iterator in r0)},_getErrorMessage$2=r0=>r0.msg||r0.message||r0.error_description||r0.error||JSON.stringify(r0),handleError$2=async(r0,e0,n0)=>{if(r0&&typeof r0=="object"&&"status"in r0&&"ok"in r0&&typeof r0.status=="number"&&!(n0!=null&&n0.noResolveJson)){const a0=r0.status||500,i0=r0;if(typeof i0.json=="function")i0.json().then(s0=>{const o0=(s0==null?void 0:s0.statusCode)||(s0==null?void 0:s0.code)||a0+"";e0(new StorageVectorsApiError(_getErrorMessage$2(s0),a0,o0))}).catch(()=>{const s0=a0+"";e0(new StorageVectorsApiError(i0.statusText||`HTTP ${a0} error`,a0,s0))});else{const s0=a0+"";e0(new StorageVectorsApiError(i0.statusText||`HTTP ${a0} error`,a0,s0))}}else e0(new StorageVectorsUnknownError(_getErrorMessage$2(r0),r0))},_getRequestParams$2=(r0,e0,n0,a0)=>{const i0={method:r0,headers:(e0==null?void 0:e0.headers)||{}};return a0?(isPlainObject$2(a0)?(i0.headers=_objectSpread2$1({"Content-Type":"application/json"},e0==null?void 0:e0.headers),i0.body=JSON.stringify(a0)):i0.body=a0,_objectSpread2$1(_objectSpread2$1({},i0),n0)):i0};async function _handleRequest$2(r0,e0,n0,a0,i0,s0){return new Promise((o0,l0)=>
558{r0(n0,_getRequestParams$2(e0,a0,i0,s0)).then(c0=>{if(!c0.ok)throw c0;if(a0!=null&&a0.noResolveJson)return c0;const u0=c0.headers.get("content-type");return!u0||!u0.includes("application/json")?{}:c0.json()}).then(c0=>o0(c0)).catch(c0=>handleError$2(c0,l0,a0))})}async function post(r0,e0,n0,a0,i0){return _handleRequest$2(r0,"POST",e0,a0,i0,n0)}var VectorIndexApi=class{constructor(r0,e0={},n0){this.shouldThrowOnError=!1,this.url=r0.replace(/\/$/,""),this.headers=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),e0),this.fetch=resolveFetch$2(n0)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/CreateIndex`,r0,{headers:e0.headers})||{},error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async getIndex(r0,e0){var n0=this;try{return{data:await post(n0.fetch,`${n0.url}/GetIndex`,{vectorBucketName:r0,indexName:e0},{headers:n0.headers}),error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageVectorsError(a0))return{data:null,error:a0};throw a0}}async listIndexes(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/ListIndexes`,r0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async deleteIndex(r0,e0){var n0=this;try{return{data:await post(n0.fetch,`${n0.url}/DeleteIndex`,{vectorBucketName:r0,indexName:e0},{headers:n0.headers})||{},error:null}}catch(a0){if(n0.shouldThrowOnError)throw a0;if(isStorageVectorsError(a0))return{data:null,error:a0};throw a0}}},VectorDataApi=class{constructor(r0,e0={},n0){this.shouldThrowOnError=!1,this.url=r0.replace(/\/$/,""),this.headers=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),e0),this.fetch=resolveFetch$2(n0)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(r0){var e0=this;try{if(r0.vectors.length<1||r0.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await post(e0.fetch,`${e0.url}/PutVectors`,r0,{headers:e0.headers})||{},error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async getVectors(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/GetVectors`,r0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async listVectors(r0){var e0=this;try{if(r0.segmentCount!==void 0){if(r0.segmentCount<1||r0.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(r0.segmentIndex!==void 0&&(r0.segmentIndex<0||r0.segmentIndex>=r0.segmentCount))throw new Error(`segmentIndex must be between 0 and ${r0.segmentCount-1}`)}return{data:await post(e0.fetch,`${e0.url}/ListVectors`,r0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async queryVectors(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/QueryVectors`,r0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async deleteVectors(r0){var e0=this;try{if(r0.keys.length<1||r0.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await post(e0.fetch,`${e0.url}/DeleteVectors`,r0,{headers:e0.headers})||{},error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}},VectorBucketApi=class{constructor(r0,e0={},n0){this.shouldThrowOnError=!1,this.url=r0.replace(/\/$/,""),this.headers=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),e0),this.fetch=resolveFetch$2(n0)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/CreateVectorBucket`,{vectorBucketName:r0},{headers:e0.headers})||{},error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}
558async getBucket(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/GetVectorBucket`,{vectorBucketName:r0},{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async listBuckets(r0={}){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/ListVectorBuckets`,r0,{headers:e0.headers}),error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}async deleteBucket(r0){var e0=this;try{return{data:await post(e0.fetch,`${e0.url}/DeleteVectorBucket`,{vectorBucketName:r0},{headers:e0.headers})||{},error:null}}catch(n0){if(e0.shouldThrowOnError)throw n0;if(isStorageVectorsError(n0))return{data:null,error:n0};throw n0}}},StorageVectorsClient=class extends VectorBucketApi{constructor(r0,e0={}){super(r0,e0.headers||{},e0.fetch)}from(r0){return new VectorBucketScope(this.url,this.headers,r0,this.fetch)}async createBucket(r0){var e0=()=>super.createBucket,n0=this;return e0().call(n0,r0)}async getBucket(r0){var e0=()=>super.getBucket,n0=this;return e0().call(n0,r0)}async listBuckets(r0={}){var e0=()=>super.listBuckets,n0=this;return e0().call(n0,r0)}
558async deleteBucket(r0){var e0=()=>super.deleteBucket,n0=this;return e0().call(n0,r0)}},VectorBucketScope=class extends VectorIndexApi{constructor(r0,e0,n0,a0){super(r0,e0,a0),this.vectorBucketName=n0}async createIndex(r0){var e0=()=>super.createIndex,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName}))}async listIndexes(r0={}){var e0=()=>super.listIndexes,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName}))}async getIndex(r0){var e0=()=>super.getIndex,n0=this;return e0().call(n0,n0.vectorBucketName,r0)}async deleteIndex(r0){var e0=()=>super.deleteIndex,n0=this;return e0().call(n0,n0.vectorBucketName,r0)}index(r0){return new VectorIndexScope(this.url,this.headers,this.vectorBucketName,r0,this.fetch)}},VectorIndexScope=class extends VectorDataApi{constructor(r0,e0,n0,a0,i0){super(r0,e0,i0),this.vectorBucketName=n0,this.indexName=a0}async putVectors(r0){var e0=()=>super.putVectors,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName,indexName:n0.indexName}))}async getVectors(r0){var e0=()=>super.getVectors,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName,indexName:n0.indexName}))}async listVectors(r0={}){var e0=()=>super.listVectors,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName,indexName:n0.indexName}))}async queryVectors(r0){var e0=()=>super.queryVectors,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName,indexName:n0.indexName}))}async deleteVectors(r0){var e0=()=>super.deleteVectors,n0=this;return e0().call(n0,_objectSpread2$1(_objectSpread2$1({},r0),{},{vectorBucketName:n0.vectorBucketName,indexName:n0.indexName}))}},StorageClient=class extends StorageBucketApi{constructor(r0,e0={},n0,a0){super(r0,e0,n0,a0)}from(r0){return new StorageFileApi(this.url,this.headers,r0,this.fetch)}get vectors(){return new StorageVectorsClient(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new StorageAnalyticsClient(this.url+"/iceberg",this.headers,this.fetch)}};const version$2="2.90.1",AUTO_REFRESH_TICK_DURATION_MS=30*1e3,AUTO_REFRESH_TICK_THRESHOLD=3,EXPIRY_MARGIN_MS=AUTO_REFRESH_TICK_THRESHOLD*AUTO_REFRESH_TICK_DURATION_MS,GOTRUE_URL="http://localhost:9999",STORAGE_KEY="supabase.auth.token",DEFAULT_HEADERS$1={"X-Client-Info":`gotrue-js/${version$2}`},API_VERSION_HEADER_NAME="X-Supabase-Api-Version",API_VERSIONS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},BASE64URL_REGEX=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JWKS_TTL=10*60*1e3;class AuthError extends Error{constructor(e0,n0,a0){super(e0),this.__isAuthError=!0,this.name="AuthError",this.status=n0,this.code=a0}}function isAuthError(r0){return typeof r0=="object"&&r0!==null&&"__isAuthError"in r0}class AuthApiError extends AuthError{constructor(e0,n0,a0){super(e0,n0,a0),this.name="AuthApiError",this.status=n0,this.code=a0}}function isAuthApiError(r0){return isAuthError(r0)&&r0.name==="AuthApiError"}class AuthUnknownError extends AuthError{constructor(e0,n0){super(e0),this.name="AuthUnknownError",this.originalError=n0}}class CustomAuthError extends AuthError{constructor(e0,n0,a0,i0){super(e0,a0,i0),this.name=n0,this.status=a0}}class AuthSessionMissingError extends CustomAuthError{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function isAuthSessionMissingError(r0){return isAuthError(r0)&&r0.name==="AuthSessionMissingError"}
558class AuthInvalidTokenResponseError extends CustomAuthError{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class AuthInvalidCredentialsError extends CustomAuthError{constructor(e0){super(e0,"AuthInvalidCredentialsError",400,void 0)}}class AuthImplicitGrantRedirectError extends CustomAuthError{constructor(e0,n0=null){super(e0,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n0}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function isAuthImplicitGrantRedirectError(r0){return isAuthError(r0)&&r0.name==="AuthImplicitGrantRedirectError"}class AuthPKCEGrantCodeExchangeError extends CustomAuthError{constructor(e0,n0=null){super(e0,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n0}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class AuthPKCECodeVerifierMissingError extends CustomAuthError{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class AuthRetryableFetchError extends CustomAuthError{constructor(e0,n0){super(e0,"AuthRetryableFetchError",n0,void 0)}}function isAuthRetryableFetchError(r0){return isAuthError(r0)&&r0.name==="AuthRetryableFetchError"}class AuthWeakPasswordError extends CustomAuthError{constructor(e0,n0,a0){super(e0,"AuthWeakPasswordError",n0,"weak_password"),this.reasons=a0}}class AuthInvalidJwtError extends CustomAuthError{constructor(e0){super(e0,"AuthInvalidJwtError",400,"invalid_jwt")}}const TO_BASE64URL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),IGNORE_BASE64URL=` 559\r=`.split(""),FROM_BASE64URL=(()=>{const r0=new Array(128);for(let e0=0;e0<r0.length;e0+=1)r0[e0]=-1;for(let e0=0;e0<IGNORE_BASE64URL.length;e0+=1)r0[IGNORE_BASE64URL[e0].charCodeAt(0)]=-2;for(let e0=0;e0<TO_BASE64URL.length;e0+=1)r0[TO_BASE64URL[e0].charCodeAt(0)]=e0;return r0})();function byteToBase64URL(r0,e0,n0){if(r0!==null)for(e0.queue=e0.queue<<8|r0,e0.queuedBits+=8;e0.queuedBits>=6;){const a0=e0.queue>>e0.queuedBits-6&63;n0(TO_BASE64URL[a0]),e0.queuedBits-=6}else if(e0.queuedBits>0)for(e0.queue=e0.queue<<6-e0.queuedBits,e0.queuedBits=6;e0.queuedBits>=6;){const a0=e0.queue>>e0.queuedBits-6&63;n0(TO_BASE64URL[a0]),e0.queuedBits-=6}}function byteFromBase64URL(r0,e0,n0){const a0=FROM_BASE64URL[r0];if(a0>-1)for(e0.queue=e0.queue<<6|a0,e0.queuedBits+=6;e0.queuedBits>=8;)n0(e0.queue>>e0.queuedBits-8&255),e0.queuedBits-=8;else{if(a0===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(r0)}"`)}}function stringFromBase64URL(r0){const e0=[],n0=o0=>{e0.push(String.fromCodePoint(o0))},a0={utf8seq:0,codepoint:0},i0={queue:0,queuedBits:0},s0=o0=>{stringFromUTF8(o0,a0,n0)};for(let o0=0;o0<r0.length;o0+=1)byteFromBase64URL(r0.charCodeAt(o0),i0,s0);return e0.join("")}function codepointToUTF8(r0,e0){if(r0<=127){e0(r0);return}else if(r0<=2047){e0(192|r0>>6),e0(128|r0&63);return}else if(r0<=65535){e0(224|r0>>12),e0(128|r0>>6&63),e0(128|r0&63);return}else if(r0<=1114111){e0(240|r0>>18),e0(128|r0>>12&63),e0(128|r0>>6&63),e0(128|r0&63);return}throw new Error(`Unrecognized Unicode codepoint: ${r0.toString(16)}`)}function stringToUTF8(r0,e0){for(let n0=0;n0<r0.length;
559n0+=1){let a0=r0.charCodeAt(n0);if(a0>55295&&a0<=56319){const i0=(a0-55296)*1024&65535;a0=(r0.charCodeAt(n0+1)-56320&65535|i0)+65536,n0+=1}codepointToUTF8(a0,e0)}}function stringFromUTF8(r0,e0,n0){if(e0.utf8seq===0){if(r0<=127){n0(r0);return}for(let a0=1;a0<6;a0+=1)if(!(r0>>7-a0&1)){e0.utf8seq=a0;break}if(e0.utf8seq===2)e0.codepoint=r0&31;else if(e0.utf8seq===3)e0.codepoint=r0&15;else if(e0.utf8seq===4)e0.codepoint=r0&7;else throw new Error("Invalid UTF-8 sequence");e0.utf8seq-=1}else if(e0.utf8seq>0){if(r0<=127)throw new Error("Invalid UTF-8 sequence");e0.codepoint=e0.codepoint<<6|r0&63,e0.utf8seq-=1,e0.utf8seq===0&&n0(e0.codepoint)}}function base64UrlToUint8Array(r0){const e0=[],n0={queue:0,queuedBits:0},a0=i0=>{e0.push(i0)};for(let i0=0;i0<r0.length;i0+=1)byteFromBase64URL(r0.charCodeAt(i0),n0,a0);return new Uint8Array(e0)}function stringToUint8Array(r0){const e0=[];return stringToUTF8(r0,n0=>e0.push(n0)),new Uint8Array(e0)}function bytesToBase64URL(r0){const e0=[],n0={queue:0,queuedBits:0},a0=i0=>{e0.push(i0)};return r0.forEach(i0=>byteToBase64URL(i0,n0,a0)),byteToBase64URL(null,n0,a0),e0.join("")}function expiresAt(r0){return Math.round(Date.now()/1e3)+r0}function generateCallbackId(){return Symbol("auth-callback")}const isBrowser=()=>typeof window<"u"&&typeof document<"u",localStorageWriteTests={tested:!1,writable:!1},supportsLocalStorage=()=>{if(!isBrowser())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(localStorageWriteTests.tested)return localStorageWriteTests.writable;const r0=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(r0,r0),globalThis.localStorage.removeItem(r0),localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!0}catch{localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!1}return localStorageWriteTests.writable};function parseParametersFromURL(r0){const e0={},n0=new URL(r0);if(n0.hash&&n0.hash[0]==="#")try{new URLSearchParams(n0.hash.substring(1)).forEach((i0,s0)=>{e0[s0]=i0})}catch{}return n0.searchParams.forEach((a0,i0)=>{e0[i0]=a0}),e0}const resolveFetch$1=r0=>
559r0?(...e0)=>r0(...e0):(...e0)=>fetch(...e0),looksLikeFetchResponse=r0=>typeof r0=="object"&&r0!==null&&"status"in r0&&"ok"in r0&&"json"in r0&&typeof r0.json=="function",setItemAsync=async(r0,e0,n0)=>{await r0.setItem(e0,JSON.stringify(n0))},getItemAsync=async(r0,e0)=>{const n0=await r0.getItem(e0);if(!n0)return null;try{return JSON.parse(n0)}catch{return n0}},removeItemAsync=async(r0,e0)=>{await r0.removeItem(e0)};let Deferred$2=class T5{constructor(){this.promise=new T5.promiseConstructor((e0,n0)=>{this.resolve=e0,this.reject=n0})}};Deferred$2.promiseConstructor=Promise;function decodeJWT(r0){const e0=r0.split(".");if(e0.length!==3)throw new AuthInvalidJwtError("Invalid JWT structure");for(let a0=0;a0<e0.length;a0++)if(!BASE64URL_REGEX.test(e0[a0]))throw new AuthInvalidJwtError("JWT not in base64url format");return{header:JSON.parse(stringFromBase64URL(e0[0])),payload:JSON.parse(stringFromBase64URL(e0[1])),signature:base64UrlToUint8Array(e0[2]),raw:{header:e0[0],payload:e0[1]}}}async function sleep(r0){return await new Promise(e0=>{setTimeout(()=>e0(null),r0)})}function retryable(r0,e0){return new Promise((a0,i0)=>{(async()=>{for(let s0=0;s0<1/0;s0++)try{const o0=await r0(s0);if(!e0(s0,null,o0)){a0(o0);return}}catch(o0){if(!e0(s0,o0)){i0(o0);return}}})()})}function dec2hex(r0){return("0"+r0.toString(16)).substr(-2)}function generatePKCEVerifier(){const e0=new Uint32Array(56);if(typeof crypto>"u"){const n0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a0=n0.length;let i0="";for(let s0=0;s0<56;s0++)i0+=n0.charAt(Math.floor(Math.random()*a0));return i0}return crypto.getRandomValues(e0),Array.from(e0,dec2hex).join("")}async function sha256(r0){const n0=new TextEncoder().encode(r0),a0=await crypto.subtle.digest("SHA-256",n0),i0=new Uint8Array(a0);return Array.from(i0).map(s0=>String.fromCharCode(s0)).join("")}async function generatePKCEChallenge(r0){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),r0;const n0=await sha256(r0);return btoa(n0).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function getCodeChallengeAndMethod(r0,e0,n0=!1){const a0=generatePKCEVerifier();let i0=a0;n0&&(i0+="/PASSWORD_RECOVERY"),await setItemAsync(r0,`${e0}-code-verifier`,i0);const s0=await generatePKCEChallenge(a0);return[s0,a0===s0?"plain":"s256"]}const API_VERSION_REGEX=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function parseResponseAPIVersion(r0){const e0=r0.headers.get(API_VERSION_HEADER_NAME);if(!e0||!e0.match(API_VERSION_REGEX))return null;try{return new Date(`${e0}T00:00:00.0Z`)}catch{return null}}function validateExp(r0){if(!r0)throw new Error("Missing exp claim");const e0=Math.floor(Date.now()/1e3);if(r0<=e0)throw new Error("JWT has expired")}function getAlgorithm(r0){switch(r0){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const UUID_REGEX=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function validateUUID(r0){if(!UUID_REGEX.test(r0))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function userNotAvailableProxy(){const r0={};return new Proxy(r0,{get:(e0,n0)=>{if(n0==="__isUserNotAvailableProxy")return!0;if(typeof n0=="symbol"){const a0=n0.toString();if(a0==="Symbol(Symbol.toPrimitive)"||a0==="Symbol(Symbol.toStringTag)"||a0==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n0}" property of the session object is not supported. Please use getUser() instead.`)},set:(e0,n0)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n0}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e0,n0)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n0}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function insecureUserWarningProxy(r0,e0){return new Proxy(r0,{get:(n0,a0,i0)=>{if(a0==="__isInsecureUserWarningProxy")return!0;
559if(typeof a0=="symbol"){const s0=a0.toString();if(s0==="Symbol(Symbol.toPrimitive)"||s0==="Symbol(Symbol.toStringTag)"||s0==="Symbol(util.inspect.custom)"||s0==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n0,a0,i0)}return!e0.value&&typeof a0=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e0.value=!0),Reflect.get(n0,a0,i0)}})}function deepClone(r0){return JSON.parse(JSON.stringify(r0))}const _getErrorMessage=r0=>r0.msg||r0.message||r0.error_description||r0.error||JSON.stringify(r0),NETWORK_ERROR_CODES=[502,503,504];async function handleError(r0){var e0;if(!looksLikeFetchResponse(r0))throw new AuthRetryableFetchError(_getErrorMessage(r0),0);if(NETWORK_ERROR_CODES.includes(r0.status))throw new AuthRetryableFetchError(_getErrorMessage(r0),r0.status);let n0;try{n0=await r0.json()}catch(s0){throw new AuthUnknownError(_getErrorMessage(s0),s0)}let a0;const i0=parseResponseAPIVersion(r0);if(i0&&i0.getTime()>=API_VERSIONS["2024-01-01"].timestamp&&typeof n0=="object"&&n0&&typeof n0.code=="string"?a0=n0.code:typeof n0=="object"&&n0&&typeof n0.error_code=="string"&&(a0=n0.error_code),a0){if(a0==="weak_password")throw new AuthWeakPasswordError(_getErrorMessage(n0),r0.status,((e0=n0.weak_password)===null||e0===void 0?void 0:e0.reasons)||[]);if(a0==="session_not_found")throw new AuthSessionMissingError}else if(typeof n0=="object"&&n0&&typeof n0.weak_password=="object"&&n0.weak_password&&Array.isArray(n0.weak_password.reasons)&&n0.weak_password.reasons.length&&n0.weak_password.reasons.reduce((s0,o0)=>s0&&typeof o0=="string",!0))throw new AuthWeakPasswordError(_getErrorMessage(n0),r0.status,n0.weak_password.reasons);throw new AuthApiError(_getErrorMessage(n0),r0.status||500,a0)}
559const _getRequestParams=(r0,e0,n0,a0)=>{const i0={method:r0,headers:(e0==null?void 0:e0.headers)||{}};return r0==="GET"?i0:(i0.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e0==null?void 0:e0.headers),i0.body=JSON.stringify(a0),Object.assign(Object.assign({},i0),n0))};async function _request(r0,e0,n0,a0){var i0;const s0=Object.assign({},a0==null?void 0:a0.headers);s0[API_VERSION_HEADER_NAME]||(s0[API_VERSION_HEADER_NAME]=API_VERSIONS["2024-01-01"].name),a0!=null&&a0.jwt&&(s0.Authorization=`Bearer ${a0.jwt}`);const o0=(i0=a0==null?void 0:a0.query)!==null&&i0!==void 0?i0:{};a0!=null&&a0.redirectTo&&(o0.redirect_to=a0.redirectTo);const l0=Object.keys(o0).length?"?"+new URLSearchParams(o0).toString():"",c0=await _handleRequest(r0,e0,n0+l0,{headers:s0,noResolveJson:a0==null?void 0:a0.noResolveJson},{},a0==null?void 0:a0.body);return a0!=null&&a0.xform?a0==null?void 0:a0.xform(c0):{data:Object.assign({},c0),error:null}}async function _handleRequest(r0,e0,n0,a0,i0,s0){const o0=_getRequestParams(e0,a0,i0,s0);let l0;try{l0=await r0(n0,Object.assign({},o0))}catch(c0){throw console.error(c0),new AuthRetryableFetchError(_getErrorMessage(c0),0)}if(l0.ok||await handleError(l0),a0!=null&&a0.noResolveJson)return l0;try{return await l0.json()}catch(c0){await handleError(c0)}}function _sessionResponse(r0){var e0;let n0=null;
559hasSession(r0)&&(n0=Object.assign({},r0),r0.expires_at||(n0.expires_at=expiresAt(r0.expires_in)));const a0=(e0=r0.user)!==null&&e0!==void 0?e0:r0;return{data:{session:n0,user:a0},error:null}}function _sessionResponsePassword(r0){const e0=_sessionResponse(r0);return!e0.error&&r0.weak_password&&typeof r0.weak_password=="object"&&Array.isArray(r0.weak_password.reasons)&&r0.weak_password.reasons.length&&r0.weak_password.message&&typeof r0.weak_password.message=="string"&&r0.weak_password.reasons.reduce((n0,a0)=>n0&&typeof a0=="string",!0)&&(e0.data.weak_password=r0.weak_password),e0}function _userResponse(r0){var e0;return{data:{user:(e0=r0.user)!==null&&e0!==void 0?e0:r0},error:null}}function _ssoResponse(r0){return{data:r0,error:null}}function _generateLinkResponse(r0){const{action_link:e0,email_otp:n0,hashed_token:a0,redirect_to:i0,verification_type:s0}=r0,o0=__rest(r0,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l0={action_link:e0,email_otp:n0,hashed_token:a0,redirect_to:i0,verification_type:s0},c0=Object.assign({},o0);return{data:{properties:l0,user:c0},error:null}}function _noResolveJsonResponse(r0){return r0}function hasSession(r0){return r0.access_token&&r0.refresh_token&&r0.expires_in}const SIGN_OUT_SCOPES=["global","local","others"];class GoTrueAdminApi{constructor({url:e0="",headers:n0={},fetch:a0}){this.url=e0,this.headers=n0,this.fetch=resolveFetch$1(a0),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(e0,n0=SIGN_OUT_SCOPES[0]){if(SIGN_OUT_SCOPES.indexOf(n0)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${SIGN_OUT_SCOPES.join(", ")}`);try{return await _request(this.fetch,"POST",`${this.url}/logout?scope=${n0}`,{headers:this.headers,jwt:e0,noResolveJson:!0}),{data:null,error:null}}catch(a0){if(isAuthError(a0))return{data:null,error:a0};throw a0}}async inviteUserByEmail(e0,n0={}){try{return await _request(this.fetch,"POST",`${this.url}/invite`,{body:{email:e0,data:n0.data},headers:this.headers,redirectTo:n0.redirectTo,xform:_userResponse})}catch(a0){if(isAuthError(a0))return{data:{user:null},error:a0};throw a0}}async generateLink(e0){try{const{options:n0}=e0,a0=__rest(e0,["options"]),i0=Object.assign(Object.assign({},a0),n0);return"newEmail"in a0&&(i0.new_email=a0==null?void 0:a0.newEmail,delete i0.newEmail),await _request(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i0,headers:this.headers,xform:_generateLinkResponse,redirectTo:n0==null?void 0:n0.redirectTo})}catch(n0){if(isAuthError(n0))return{data:{properties:null,user:null},error:n0};throw n0}}async createUser(e0){try{return await _request(this.fetch,"POST",`${this.url}/admin/users`,{body:e0,headers:this.headers,xform:_userResponse})}catch(n0){if(isAuthError(n0))return{data:{user:null},error:n0};throw n0}}async listUsers(e0){var n0,a0,i0,s0,o0,l0,c0;try{const u0={nextPage:null,lastPage:0,total:0},d0=await _request(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a0=(n0=e0==null?void 0:e0.page)===null||n0===void 0?void 0:n0.toString())!==null&&a0!==void 0?a0:"",per_page:(s0=(i0=e0==null?void 0:e0.perPage)===null||i0===void 0?void 0:i0.toString())!==null&&s0!==void 0?s0:""}
vendor: 2,341 bytes, line 559
559,xform:_noResolveJsonResponse});if(d0.error)throw d0.error;const h0=await d0.json(),f0=(o0=d0.headers.get("x-total-count"))!==null&&o0!==void 0?o0:0,p0=(c0=(l0=d0.headers.get("link"))===null||l0===void 0?void 0:l0.split(","))!==null&&c0!==void 0?c0:[];return p0.length>0&&(p0.forEach(A0=>{const m0=parseInt(A0.split(";")[0].split("=")[1].substring(0,1)),x0=JSON.parse(A0.split(";")[1].split("=")[1]);u0[`${x0}Page`]=m0}),u0.total=parseInt(f0)),{data:Object.assign(Object.assign({},h0),u0),error:null}}catch(u0){if(isAuthError(u0))return{data:{users:[]},error:u0};throw u0}}async getUserById(e0){validateUUID(e0);try{return await _request(this.fetch,"GET",`${this.url}/admin/users/${e0}`,{headers:this.headers,xform:_userResponse})}catch(n0){if(isAuthError(n0))return{data:{user:null},error:n0};throw n0}}async updateUserById(e0,n0){validateUUID(e0);try{return await _request(this.fetch,"PUT",`${this.url}/admin/users/${e0}`,{body:n0,headers:this.headers,xform:_userResponse})}catch(a0){if(isAuthError(a0))return{data:{user:null},error:a0};throw a0}}async deleteUser(e0,n0=!1){validateUUID(e0);try{return await _request(this.fetch,"DELETE",`${this.url}/admin/users/${e0}`,{headers:this.headers,body:{should_soft_delete:n0},xform:_userResponse})}catch(a0){if(isAuthError(a0))return{data:{user:null},error:a0};throw a0}}async _listFactors(e0){validateUUID(e0.userId);try{const{data:n0,error:a0}=await _request(this.fetch,"GET",`${this.url}/admin/users/${e0.userId}/factors`,{headers:this.headers,xform:i0=>({data:{factors:i0},error:null})});return{data:n0,error:a0}}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}async _deleteFactor(e0){validateUUID(e0.userId),validateUUID(e0.id);try{return{data:await _request(this.fetch,"DELETE",`${this.url}/admin/users/${e0.userId}/factors/${e0.id}`,{headers:this.headers}),error:null}}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}async _listOAuthClients(e0){var n0,a0,i0,s0,o0,l0,c0;try{const u0={nextPage:null,lastPage:0,total:0},d0=await _request(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a0=(n0=e0==null?void 0:e0.page)===null||n0===void 0?void 0:n0.toString())!==null&&a0!==void 0?a0:"",per_page:(s0=(i0=e0==null?void 0:e0.perPage)===null||i0===void 0?void 0:i0.toString())!==null&&s0!==void 0?s0:""}
559,xform:_noResolveJsonResponse});if(d0.error)throw d0.error;const h0=await d0.json(),f0=(o0=d0.headers.get("x-total-count"))!==null&&o0!==void 0?o0:0,p0=(c0=(l0=d0.headers.get("link"))===null||l0===void 0?void 0:l0.split(","))!==null&&c0!==void 0?c0:[];return p0.length>0&&(p0.forEach(A0=>{const m0=parseInt(A0.split(";")[0].split("=")[1].substring(0,1)),x0=JSON.parse(A0.split(";")[1].split("=")[1]);u0[`${x0}Page`]=m0}),u0.total=parseInt(f0)),{data:Object.assign(Object.assign({},h0),u0),error:null}}catch(u0){if(isAuthError(u0))return{data:{clients:[]},error:u0};throw u0}}async _createOAuthClient(e0){try{return await _request(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e0,headers:this.headers,xform:n0=>({data:n0,error:null})})}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}async _getOAuthClient(e0){try{return await _request(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e0}`,{headers:this.headers,xform:n0=>({data:n0,error:null})})}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}async _updateOAuthClient(e0,n0){try{return await _request(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e0}`,{body:n0,headers:this.headers,xform:a0=>({data:a0,error:null})})}catch(a0){if(isAuthError(a0))return{data:null,error:a0};throw a0}}async _deleteOAuthClient(e0){try{return await _request(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e0}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}async _regenerateOAuthClientSecret(e0){try{return await _request(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e0}/regenerate_secret`,{headers:this.headers,xform:n0=>({data:n0,error:null})})}catch(n0){if(isAuthError(n0))return{data:null,error:n0};throw n0}}}function memoryLocalStorageAdapter(r0={}){return{getItem:e0=>r0[e0]||null,setItem:(e0,n0)=>{r0[e0]=n0},removeItem:e0=>{delete r0[e0]}}}const internals={debug:!!(globalThis&&supportsLocalStorage()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class LockAcquireTimeoutError extends Error{constructor(e0){super(e0),this.isAcquireTimeout=!0}}class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError{}async function navigatorLock(r0,e0,n0){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",r0,e0);const a0=new globalThis.AbortController;return e0>0&&setTimeout(()=>{a0.abort(),internals.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",r0)},e0),await Promise.resolve().then(()=>globalThis.navigator.locks.request(r0,e0===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:a0.signal},async i0=>{if(i0){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",r0,i0.name);try{return await n0()}finally{internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",r0,i0.name)}}else{if(e0===0)throw internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",r0),new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${r0}" immediately failed`);if(internals.debug)try{const s0=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s0,null," "))}catch(s0){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s0)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n0()}}))}function polyfillGlobalThis(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function getAddress(r0){if(!/^0x[a-fA-F0-9]{40}$/.test(r0))throw new Error(`@supabase/auth-js: Address "${r0}
559" is invalid.`);return r0.toLowerCase()}function fromHex(r0){return parseInt(r0,16)}function toHex(r0){const e0=new TextEncoder().encode(r0);return"0x"+Array.from(e0,a0=>a0.toString(16).padStart(2,"0")).join("")}function createSiweMessage(r0){var e0;const{chainId:n0,domain:a0,expirationTime:i0,issuedAt:s0=new Date,nonce:o0,notBefore:l0,requestId:c0,resources:u0,scheme:d0,uri:h0,version:f0}=r0;{if(!Number.isInteger(n0))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n0}`);if(!a0)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o0&&o0.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o0}`);if(!h0)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f0!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f0}`);if(!((e0=r0.statement)===null||e0===void 0)&&e0.includes(` 560`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${r0.statement}`)}const p0=getAddress(r0.address),A0=d0?`${d0}://${a0}`:a0,m0=r0.statement?`${r0.statement} 561`:"",x0=`${A0} wants you to sign in with your Ethereum account: 562${p0} 563 564${m0}`;let g0=`URI: ${h0} 565Version: ${f0} 566Chain ID: ${n0}${o0?` 567Nonce: ${o0}`:""} 568Issued At: ${s0.toISOString()}`;if(i0&&(g0+=` 569Expiration Time: ${i0.toISOString()}`),l0&&(g0+=` 570Not Before: ${l0.toISOString()}`),c0&&(g0+=` 571Request ID: ${c0}`),u0){let y0=` 572Resources:`;for(const b0 of u0){if(!b0||typeof b0!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b0}`);y0+=` 573- ${b0}`}g0+=y0}return`${x0} 574${g0}`}class WebAuthnError extends Error{constructor({message:e0,code:n0,cause:a0,name:i0}){var s0;super(e0,{cause:a0}),this.__isWebAuthnError=!0,this.name=(s0=i0??(a0 instanceof Error?a0.name:void 0))!==null&&s0!==void 0?s0:"Unknown Error",this.code=n0}}class WebAuthnUnknownError extends WebAuthnError{constructor(e0,n0){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n0,message:e0}),this.name="WebAuthnUnknownError",this.originalError=n0}}function identifyRegistrationError({error:r0,options:e0}){var n0,a0,i0;const{publicKey:s0}=e0;if(!s0)throw Error("options was missing required publicKey property");if(r0.name==="AbortError"){if(e0.signal instanceof AbortSignal)return new WebAuthnError({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r0})}else if(r0.name==="ConstraintError"){if(((n0=s0.authenticatorSelection)===null||n0===void 0?void 0:n0.requireResidentKey)===!0)return new WebAuthnError({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:r0});if(e0.mediation==="conditional"&&((a0=s0.authenticatorSelection)===null||a0===void 0?void 0:a0.userVerification)==="required")return new WebAuthnError({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:r0});if(((i0=s0.authenticatorSelection)===null||i0===void 0?void 0:i0.userVerification)==="required")return new WebAuthnError({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:r0})}else{if(r0.name==="InvalidStateError")return new WebAuthnError({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:r0});if(r0.name==="NotAllowedError")return new WebAuthnError({message:r0.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r0});if(r0.name==="NotSupportedError")return s0.pubKeyCredParams.filter(l0=>l0.type==="public-key").length===0?new WebAuthnError({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:r0}):new WebAuthnError({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:r0});if(r0.name==="SecurityError"){const o0=window.location.hostname;if(isValidDomain(o0)){if(s0.rp.id!==o0)return new WebAuthnError({message:`The RP ID "${s0.rp.id}
574" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r0})}else return new WebAuthnError({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r0})}else if(r0.name==="TypeError"){if(s0.user.id.byteLength<1||s0.user.id.byteLength>64)return new WebAuthnError({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:r0})}else if(r0.name==="UnknownError")return new WebAuthnError({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:r0})}return new WebAuthnError({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r0})}function identifyAuthenticationError({error:r0,options:e0}){const{publicKey:n0}=e0;if(!n0)throw Error("options was missing required publicKey property");if(r0.name==="AbortError"){if(e0.signal instanceof AbortSignal)return new WebAuthnError({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r0})}else{if(r0.name==="NotAllowedError")return new WebAuthnError({message:r0.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r0});if(r0.name==="SecurityError"){const a0=window.location.hostname;if(isValidDomain(a0)){if(n0.rpId!==a0)return new WebAuthnError({message:`The RP ID "${n0.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r0})}else return new WebAuthnError({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r0})}else if(r0.name==="UnknownError")return new WebAuthnError({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:r0})}return new WebAuthnError({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r0})}class WebAuthnAbortService{createNewAbortSignal(){if(this.controller){const n0=new Error("Cancelling existing WebAuthn API call for new one");n0.name="AbortError",this.controller.abort(n0)}const e0=new AbortController;return this.controller=e0,e0.signal}cancelCeremony(){if(this.controller){const e0=new Error("Manually cancelling existing WebAuthn API call");e0.name="AbortError",this.controller.abort(e0),this.controller=void 0}}}const webAuthnAbortService=new WebAuthnAbortService;function deserializeCredentialCreationOptions(r0){if(!r0)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(r0);const{challenge:e0,user:n0,excludeCredentials:a0}=r0,i0=__rest(r0,["challenge","user","excludeCredentials"]),s0=base64UrlToUint8Array(e0).buffer,o0=Object.assign(Object.assign({},n0),{id:base64UrlToUint8Array(n0.id).buffer}),l0=Object.assign(Object.assign({},i0),{challenge:s0,user:o0});if(a0&&a0.length>0){l0.excludeCredentials=new Array(a0.length);for(let c0=0;c0<a0.length;c0++){const u0=a0[c0];l0.excludeCredentials[c0]=Object.assign(Object.assign({},u0),{id:base64UrlToUint8Array(u0.id).buffer,type:u0.type||"public-key",transports:u0.transports})}}return l0}function deserializeCredentialRequestOptions(r0){if(!r0)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(r0);const{challenge:e0,allowCredentials:n0}=r0,a0=__rest(r0,["challenge","allowCredentials"]),i0=base64UrlToUint8Array(e0).buffer,s0=Object.assign(Object.assign({},a0),{challenge:i0});if(n0&&n0.length>0){s0.allowCredentials=new Array(n0.length);for(let o0=0;o0<n0.length;o0++){const l0=n0[o0];s0.allowCredentials[o0]=Object.assign(Object.assign({},l0),{id:base64UrlToUint8Array(l0.id).buffer,type:l0.type||"public-key",transports:l0.transports})}}return s0}function serializeCredentialCreationResponse(r0){var e0;if("toJSON"in r0&&typeof r0.toJSON=="function")return r0.toJSON();const n0=r0;return{id:r0.id,rawId:r0.id,response:{attestationObject:bytesToBase64URL(new Uint8Array(r0.response.attestationObject)),clientDataJSON:bytesToBase64URL(new Uint8Array(r0.response.clientDataJSON))},type:"public-key",clientExtensionResults:r0.getClientExtensionResults(),authenticatorAttachment:(e0=n0.authenticatorAttachment)!==null&&e0!==void 0?e0:void 0}}function serializeCredentialRequestResponse(r0){var e0;if("toJSON"in r0&&typeof r0.toJSON=="function")return r0.toJSON();const n0=r0,a0=r0.getClientExtensionResults(),i0=r0.response;return{id:r0.id,rawId:r0.id,response:{authenticatorData:bytesToBase64URL(new Uint8Array(i0.authenticatorData)),clientDataJSON:bytesToBase64URL(new Uint8Array(i0.clientDataJSON)),signature:bytesToBase64URL(new Uint8Array(i0.signature)),userHandle:i0.userHandle?bytesToBase64URL(new Uint8Array(i0.userHandle)):void 0},type:"public-key",clientExtensionResults:a0,authenticatorAttachment:(e0=n0.authenticatorAttachment)!==null&&e0!==void 0?e0:void 0}}function isValidDomain(r0){return r0==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(r0)}function browserSupportsWebAuthn(){var r0,e0;return!!(isBrowser()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((r0=navigator==null?void 0:navigator.credentials)===null||r0===void 0?void 0:r0.create)=="function"&&typeof((e0=navigator==null?void 0:navigator.credentials)===null||e0===void 0?void 0:e0.get)=="function")}async function createCredential(r0){try{const e0=await navigator.credentials.create(r0);return e0?e0 instanceof PublicKeyCredential?{data:e0,error:null}:{data:null,error:new WebAuthnUnknownError("Browser returned unexpected credential type",e0)}:{data:null,error:new WebAuthnUnknownError("Empty credential response",e0)}}catch(e0){return{data:null,error:identifyRegistrationError({error:e0,options:r0})}}}async function getCredential(r0){try{const e0=await navigator.credentials.get(r0);return e0?e0 instanceof PublicKeyCredential?{data:e0,error:null}:{data:null,error:new WebAuthnUnknownError("Browser returned unexpected credential type",e0)}:{data:null,error:new WebAuthnUnknownError("Empty credential response",e0)}}catch(e0){return{data:null,error:identifyAuthenticationError({error:e0,options:r0})}}}const DEFAULT_CREATION_OPTIONS={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},DEFAULT_REQUEST_OPTIONS={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function deepMerge(...r0){const e0=i0=>i0!==null&&typeof i0=="object"&&!Array.isArray(i0),n0=i0=>i0 instanceof ArrayBuffer||ArrayBuffer.isView(i0),a0={};for(const i0 of r0)if(i0)for(const s0 in i0){const o0=i0[s0];if(o0!==void 0)if(Array.isArray(o0))a0[s0]=o0;else if(n0(o0))a0[s0]=o0;else if(e0(o0)){const l0=a0[s0];e0(l0)?a0[s0]=deepMerge(l0,o0):a0[s0]=deepMerge(o0)}else a0[s0]=o0}return a0}function mergeCredentialCreationOptions(r0,e0){return deepMerge(DEFAULT_CREATION_OPTIONS,r0,e0||{})}function mergeCredentialRequestOptions(r0,e0){return deepMerge(DEFAULT_REQUEST_OPTIONS,r0,e0||{})}class WebAuthnApi{constructor(e0){this.client=e0,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e0){return this.client.mfa.enroll(Object.assign(Object.assign({},e0),{factorType:"webauthn"}))}async _challenge({factorId:e0,webauthn:n0,friendlyName:a0,signal:i0},s0){try{const{data:o0,error:l0}=await this.client.mfa.challenge({factorId:e0,webauthn:n0});if(!o0)return{data:null,error:l0};const c0=i0??webAuthnAbortService.createNewAbortSignal();if(o0.webauthn.type==="create"){const{user:u0}=o0.webauthn.credential_options.publicKey;u0.name||(u0.name=`${u0.id}:${a0}`),u0.displayName||(u0.displayName=u0.name)}switch(o0.webauthn.type){case"create":{const u0=mergeCredentialCreationOptions(o0.webauthn.credential_options.publicKey,s0==null?void 0:s0.create),{data:d0,error:h0}=await createCredential({publicKey:u0,signal:c0});return d0?{data:{factorId:e0,challengeId:o0.id,webauthn:{type:o0.webauthn.type,credential_response:d0}},error:null}:{data:null,error:h0}}case"request":{const u0=mergeCredentialRequestOptions(o0.webauthn.credential_options.publicKey,s0==null?void 0:s0.request),{data:d0,error:h0}=await getCredential(Object.assign(Object.assign({},o0.webauthn.credential_options),{publicKey:u0,signal:c0}));return d0?{data:{factorId:e0,challengeId:o0.id,webauthn:{type:o0.webauthn.type,credential_response:d0}},error:null}:{data:null,error:h0}}}}catch(o0){return isAuthError(o0)?{data:null,error:o0}:{data:null,error:new AuthUnknownError("Unexpected error in challenge",o0)}}}async _verify({challengeId:e0,factorId:n0,webauthn:a0}){return this.client.mfa.verify({factorId:n0,challengeId:e0,webauthn:a0})}async _authenticate({factorId:e0,webauthn:{rpId:n0=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a0=typeof window<"u"?[window.location.origin]:void 0,signal:i0}={}},s0){if(!n0)return{data:null,error:new AuthError("rpId is required for WebAuthn authentication")};try{if(!browserSupportsWebAuthn())return{data:null,error:new AuthUnknownError("Browser does not support WebAuthn",null)};const{data:o0,error:l0}=await this.challenge({factorId:e0,webauthn:{rpId:n0,rpOrigins:a0},signal:i0},{request:s0});if(!o0)return{data:null,error:l0};const{webauthn:c0}=o0;return this._verify({factorId:e0,challengeId:o0.challengeId,webauthn:{type:c0.type,rpId:n0,rpOrigins:a0,credential_response:c0.credential_response}})}catch(o0){return isAuthError(o0)?{data:null,error:o0}:{data:null,error:new AuthUnknownError("Unexpected error in authenticate",o0)}}}async _register({friendlyName:e0,webauthn:{rpId:n0=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a0=typeof window<"u"?[window.location.origin]:void 0,signal:i0}={}},s0){if(!n0)return{data:null,error:new AuthError("rpId is required for WebAuthn registration")};try{if(!browserSupportsWebAuthn())return{data:null,error:new AuthUnknownError("Browser does not support WebAuthn",null)};const{data:o0,error:l0}=await this._enroll({friendlyName:e0});if(!o0)return await this.client.mfa.listFactors().then(d0=>{var h0;
574return(h0=d0.data)===null||h0===void 0?void 0:h0.all.find(f0=>f0.factor_type==="webauthn"&&f0.friendly_name===e0&&f0.status!=="unverified")}).then(d0=>d0?this.client.mfa.unenroll({factorId:d0==null?void 0:d0.id}):void 0),{data:null,error:l0};const{data:c0,error:u0}=await this._challenge({factorId:o0.id,friendlyName:o0.friendly_name,webauthn:{rpId:n0,rpOrigins:a0},signal:i0},{create:s0});return c0?this._verify({factorId:o0.id,challengeId:c0.challengeId,webauthn:{rpId:n0,rpOrigins:a0,type:c0.webauthn.type,credential_response:c0.webauthn.credential_response}}):{data:null,error:u0}}catch(o0){return isAuthError(o0)?{data:null,error:o0}:{data:null,error:new AuthUnknownError("Unexpected error in register",o0)}}}}polyfillGlobalThis();const DEFAULT_OPTIONS$i={url:GOTRUE_URL,storageKey:STORAGE_KEY,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DEFAULT_HEADERS$1,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function lockNoOp(r0,e0,n0){return await n0()}const GLOBAL_JWKS={};class GoTrueClient{get jwks(){var e0,n0;return(n0=(e0=GLOBAL_JWKS[this.storageKey])===null||e0===void 0?void 0:e0.jwks)!==null&&n0!==void 0?n0:{keys:[]}}set jwks(e0){GLOBAL_JWKS[this.storageKey]=Object.assign(Object.assign({},GLOBAL_JWKS[this.storageKey]),{jwks:e0})}get jwks_cached_at(){var e0,n0;return(n0=(e0=GLOBAL_JWKS[this.storageKey])===null||e0===void 0?void 0:e0.cachedAt)!==null&&n0!==void 0?n0:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e0){GLOBAL_JWKS[this.storageKey]=Object.assign(Object.assign({},GLOBAL_JWKS[this.storageKey]),{cachedAt:e0})}constructor(e0){var n0,a0,i0;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s0=Object.assign(Object.assign({},DEFAULT_OPTIONS$i),e0);if(this.storageKey=s0.storageKey,this.instanceID=(n0=GoTrueClient.nextInstanceID[this.storageKey])!==null&&n0!==void 0?n0:0,GoTrueClient.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s0.debug,typeof s0.debug=="function"&&(this.logger=s0.debug),this.instanceID>0&&isBrowser()){const o0=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o0),this.logDebugMessages&&console.trace(o0)}if(this.persistSession=s0.persistSession,this.autoRefreshToken=s0.autoRefreshToken,this.admin=new GoTrueAdminApi({url:s0.url,headers:s0.headers,fetch:s0.fetch}),this.url=s0.url,this.headers=s0.headers,this.fetch=resolveFetch$1(s0.fetch),this.lock=s0.lock||lockNoOp,this.detectSessionInUrl=s0.detectSessionInUrl,this.flowType=s0.flowType,this.hasCustomAuthorizationHeader=s0.hasCustomAuthorizationHeader,this.throwOnError=s0.throwOnError,this.lockAcquireTimeout=s0.lockAcquireTimeout,s0.lock?this.lock=s0.lock:this.persistSession&&isBrowser()&&(!((a0=globalThis==null?void 0:globalThis.navigator)===null||a0===void 0)&&a0.locks)?this.lock=navigatorLock:this.lock=lockNoOp,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new WebAuthnApi(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(s0.storage?this.storage=s0.storage:supportsLocalStorage()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),s0.userStorage&&(this.userStorage=s0.userStorage)):(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),isBrowser()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o0){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o0)}(i0=this.broadcastChannel)===null||i0===void 0||i0.addEventListener("message",async o0=>{this._debug("received broadcast notification from other tab or client",o0),await this._notifyAllSubscribers(o0.data.event,o0.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e0){if(this.throwOnError&&e0&&e0.error)throw e0.error;return e0}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${version$2}) ${new Date().toISOString()}`}
574_debug(...e0){return this.logDebugMessages&&this.logger(this._logPrefix(),...e0),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e0;try{let n0={},a0="none";if(isBrowser()&&(n0=parseParametersFromURL(window.location.href),this._isImplicitGrantCallback(n0)?a0="implicit":await this._isPKCECallback(n0)&&(a0="pkce")),isBrowser()&&this.detectSessionInUrl&&a0!=="none"){const{data:i0,error:s0}=await this._getSessionFromURL(n0,a0);if(s0){if(this._debug("#_initialize()","error detecting session from URL",s0),isAuthImplicitGrantRedirectError(s0)){const c0=(e0=s0.details)===null||e0===void 0?void 0:e0.code;if(c0==="identity_already_exists"||c0==="identity_not_found"||c0==="single_identity_not_deletable")return{error:s0}}return{error:s0}}const{session:o0,redirectType:l0}=i0;return this._debug("#_initialize()","detected session in URL",o0,"redirect type",l0),await this._saveSession(o0),setTimeout(async()=>{l0==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o0):await this._notifyAllSubscribers("SIGNED_IN",o0)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n0){return isAuthError(n0)?this._returnResult({error:n0}):this._returnResult({error:new AuthUnknownError("Unexpected error during initialization",n0)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e0){var n0,a0,i0;try{const s0=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a0=(n0=e0==null?void 0:e0.options)===null||n0===void 0?void 0:n0.data)!==null&&a0!==void 0?a0:{},gotrue_meta_security:{captcha_token:(i0=e0==null?void 0:e0.options)===null||i0===void 0?void 0:i0.captchaToken}},xform:_sessionResponse}),{data:o0,error:l0}=s0;if(l0||!o0)return this._returnResult({data:{user:null,session:null},error:l0});const c0=o0.session,u0=o0.user;return o0.session&&(await this._saveSession(o0.session),await this._notifyAllSubscribers("SIGNED_IN",c0)),this._returnResult({data:{user:u0,session:c0},error:null})}catch(s0){if(isAuthError(s0))return this._returnResult({data:{user:null,session:null},error:s0});throw s0}}async signUp(e0){var n0,a0,i0;try{let s0;if("email"in e0){const{email:d0,password:h0,options:f0}=e0;let p0=null,A0=null;this.flowType==="pkce"&&([p0,A0]=await getCodeChallengeAndMethod(this.storage,this.storageKey)),s0=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f0==null?void 0:f0.emailRedirectTo,body:{email:d0,password:h0,data:(n0=f0==null?void 0:f0.data)!==null&&n0!==void 0?n0:{},gotrue_meta_security:{captcha_token:f0==null?void 0:f0.captchaToken},code_challenge:p0,code_challenge_method:A0},xform:_sessionResponse})}else if("phone"in e0){const{phone:d0,password:h0,options:f0}=e0;s0=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d0,password:h0,data:(a0=f0==null?void 0:f0.data)!==null&&a0!==void 0?a0:{},channel:(i0=f0==null?void 0:f0.channel)!==null&&i0!==void 0?i0:"sms",gotrue_meta_security:{captcha_token:f0==null?void 0:f0.captchaToken}},xform:_sessionResponse})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:o0,error:l0}=s0;if(l0||!o0)return await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l0});const c0=o0.session,u0=o0.user;return o0.session&&(await this._saveSession(o0.session),await this._notifyAllSubscribers("SIGNED_IN",c0)),this._returnResult({data:{user:u0,session:c0},error:null})}catch(s0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(s0))return this._returnResult({data:{user:null,session:null},error:s0});throw s0}}async signInWithPassword(e0){try{let n0;if("email"in e0){const{email:s0,password:o0,options:l0}=e0;n0=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s0,password:o0,gotrue_meta_security:{captcha_token:l0==null?void 0:l0.captchaToken}},xform:_sessionResponsePassword})}else if("phone"in e0){const{phone:s0,password:o0,options:l0}=e0;n0=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s0,password:o0,gotrue_meta_security:{captcha_token:l0==null?void 0:l0.captchaToken}},xform:_sessionResponsePassword})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:a0,error:i0}=n0;if(i0)return this._returnResult({data:{user:null,session:null},error:i0});
574if(!a0||!a0.session||!a0.user){const s0=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:s0})}return a0.session&&(await this._saveSession(a0.session),await this._notifyAllSubscribers("SIGNED_IN",a0.session)),this._returnResult({data:Object.assign({user:a0.user,session:a0.session},a0.weak_password?{weakPassword:a0.weak_password}:null),error:i0})}catch(n0){if(isAuthError(n0))return this._returnResult({data:{user:null,session:null},error:n0});throw n0}}async signInWithOAuth(e0){var n0,a0,i0,s0;return await this._handleProviderSignIn(e0.provider,{redirectTo:(n0=e0.options)===null||n0===void 0?void 0:n0.redirectTo,scopes:(a0=e0.options)===null||a0===void 0?void 0:a0.scopes,queryParams:(i0=e0.options)===null||i0===void 0?void 0:i0.queryParams,skipBrowserRedirect:(s0=e0.options)===null||s0===void 0?void 0:s0.skipBrowserRedirect})}async exchangeCodeForSession(e0){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e0))}async signInWithWeb3(e0){const{chain:n0}=e0;switch(n0){case"ethereum":return await this.signInWithEthereum(e0);case"solana":return await this.signInWithSolana(e0);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n0}"`)}}async signInWithEthereum(e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0;let p0,A0;if("message"in e0)p0=e0.message,A0=e0.signature;else{const{chain:m0,wallet:x0,statement:g0,options:y0}=e0;let b0;if(isBrowser())if(typeof x0=="object")b0=x0;else{const R0=window;if("ethereum"in R0&&typeof R0.ethereum=="object"&&"request"in R0.ethereum&&typeof R0.ethereum.request=="function")b0=R0.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x0!="object"||!(y0!=null&&y0.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b0=x0}const E0=new URL((n0=y0==null?void 0:y0.url)!==null&&n0!==void 0?n0:window.location.href),w0=await b0.request({method:"eth_requestAccounts"}).then(R0=>R0).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!w0||w0.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const v0=getAddress(w0[0]);let S0=(a0=y0==null?void 0:y0.signInWithEthereum)===null||a0===void 0?void 0:a0.chainId;if(!S0){const R0=await b0.request({method:"eth_chainId"});S0=fromHex(R0)}const k0={domain:E0.host,address:v0,statement:g0,uri:E0.href,version:"1",chainId:S0,nonce:(i0=y0==null?void 0:y0.signInWithEthereum)===null||i0===void 0?void 0:i0.nonce,issuedAt:(o0=(s0=y0==null?void 0:y0.signInWithEthereum)===null||s0===void 0?void 0:s0.issuedAt)!==null&&o0!==void 0?o0:new Date,expirationTime:(l0=y0==null?void 0:y0.signInWithEthereum)===null||l0===void 0?void 0:l0.expirationTime,notBefore:(c0=y0==null?void 0:y0.signInWithEthereum)===null||c0===void 0?void 0:c0.notBefore,requestId:(u0=y0==null?void 0:y0.signInWithEthereum)===null||u0===void 0?void 0:u0.requestId,resources:(d0=y0==null?void 0:y0.signInWithEthereum)===null||d0===void 0?void 0:d0.resources};p0=createSiweMessage(k0),A0=await b0.request({method:"personal_sign",params:[toHex(p0),v0]})}try{const{data:m0,error:x0}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p0,signature:A0},!((h0=e0.options)===null||h0===void 0)&&h0.captchaToken?{gotrue_meta_security:{captcha_token:(f0=e0.options)===null||f0===void 0?void 0:f0.captchaToken}}:null),xform:_sessionResponse});if(x0)throw x0;
574if(!m0||!m0.session||!m0.user){const g0=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:g0})}return m0.session&&(await this._saveSession(m0.session),await this._notifyAllSubscribers("SIGNED_IN",m0.session)),this._returnResult({data:Object.assign({},m0),error:x0})}catch(m0){if(isAuthError(m0))return this._returnResult({data:{user:null,session:null},error:m0});throw m0}}async signInWithSolana(e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0,p0;let A0,m0;if("message"in e0)A0=e0.message,m0=e0.signature;else{const{chain:x0,wallet:g0,statement:y0,options:b0}=e0;let E0;if(isBrowser())if(typeof g0=="object")E0=g0;else{const v0=window;if("solana"in v0&&typeof v0.solana=="object"&&("signIn"in v0.solana&&typeof v0.solana.signIn=="function"||"signMessage"in v0.solana&&typeof v0.solana.signMessage=="function"))E0=v0.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g0!="object"||!(b0!=null&&b0.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");E0=g0}const w0=new URL((n0=b0==null?void 0:b0.url)!==null&&n0!==void 0?n0:window.location.href);if("signIn"in E0&&E0.signIn){const v0=await E0.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b0==null?void 0:b0.signInWithSolana),{version:"1",domain:w0.host,uri:w0.href}),y0?{statement:y0}:null));let S0;if(Array.isArray(v0)&&v0[0]&&typeof v0[0]=="object")S0=v0[0];else if(v0&&typeof v0=="object"&&"signedMessage"in v0&&"signature"in v0)S0=v0;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S0&&"signature"in S0&&(typeof S0.signedMessage=="string"||S0.signedMessage instanceof Uint8Array)&&S0.signature instanceof Uint8Array)A0=typeof S0.signedMessage=="string"?S0.signedMessage:new TextDecoder().decode(S0.signedMessage),m0=S0.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in E0)||typeof E0.signMessage!="function"||!("publicKey"in E0)||typeof E0!="object"||!E0.publicKey||!("toBase58"in E0.publicKey)||typeof E0.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");A0=[`${w0.host} wants you to sign in with your Solana account:`,E0.publicKey.toBase58(),...y0?["",y0,""]:[""],"Version: 1",`URI: ${w0.href}`,`Issued At: ${(i0=(a0=b0==null?void 0:b0.signInWithSolana)===null||a0===void 0?void 0:a0.issuedAt)!==null&&i0!==void 0?i0:new Date().toISOString()}`,...!((s0=b0==null?void 0:b0.signInWithSolana)===null||s0===void 0)&&s0.notBefore?[`Not Before: ${b0.signInWithSolana.notBefore}`]:[],...!((o0=b0==null?void 0:b0.signInWithSolana)===null||o0===void 0)&&o0.expirationTime?[`Expiration Time: ${b0.signInWithSolana.expirationTime}`]:[],...!((l0=b0==null?void 0:b0.signInWithSolana)===null||l0===void 0)&&l0.chainId?[`Chain ID: ${b0.signInWithSolana.chainId}`]:[],...!((c0=b0==null?void 0:b0.signInWithSolana)===null||c0===void 0)&&c0.nonce?[`Nonce: ${b0.signInWithSolana.nonce}`]:[],...!((u0=b0==null?void 0:b0.signInWithSolana)===null||u0===void 0)&&u0.requestId?[`Request ID: ${b0.signInWithSolana.requestId}`]:[],...!((h0=(d0=b0==null?void 0:b0.signInWithSolana)===null||d0===void 0?void 0:d0.resources)===null||h0===void 0)&&h0.length?["Resources",...b0.signInWithSolana.resources.map(S0=>`- ${S0}`)]:[]].join(` 575`);const v0=await E0.signMessage(new TextEncoder().encode(A0),"utf8");if(!v0||!(v0 instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m0=v0}}try{const{data:x0,error:g0}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:A0,signature:bytesToBase64URL(m0)},!((f0=e0.options)===null||f0===void 0)&&f0.captchaToken?{gotrue_meta_security:{captcha_token:(p0=e0.options)===null||p0===void 0?void 0:p0.captchaToken}}:null),xform:_sessionResponse});if(g0)throw g0;
575if(!x0||!x0.session||!x0.user){const y0=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:y0})}return x0.session&&(await this._saveSession(x0.session),await this._notifyAllSubscribers("SIGNED_IN",x0.session)),this._returnResult({data:Object.assign({},x0),error:g0})}catch(x0){if(isAuthError(x0))return this._returnResult({data:{user:null,session:null},error:x0});throw x0}}async _exchangeCodeForSession(e0){const n0=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`),[a0,i0]=(n0??"").split("/");try{if(!a0&&this.flowType==="pkce")throw new AuthPKCECodeVerifierMissingError;const{data:s0,error:o0}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e0,code_verifier:a0},xform:_sessionResponse});if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),o0)throw o0;if(!s0||!s0.session||!s0.user){const l0=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l0})}return s0.session&&(await this._saveSession(s0.session),await this._notifyAllSubscribers("SIGNED_IN",s0.session)),this._returnResult({data:Object.assign(Object.assign({},s0),{redirectType:i0??null}),error:o0})}catch(s0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(s0))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s0});throw s0}}async signInWithIdToken(e0){try{const{options:n0,provider:a0,token:i0,access_token:s0,nonce:o0}=e0,l0=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a0,id_token:i0,access_token:s0,nonce:o0,gotrue_meta_security:{captcha_token:n0==null?void 0:n0.captchaToken}},xform:_sessionResponse}),{data:c0,error:u0}=l0;if(u0)return this._returnResult({data:{user:null,session:null},error:u0});
575if(!c0||!c0.session||!c0.user){const d0=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:d0})}return c0.session&&(await this._saveSession(c0.session),await this._notifyAllSubscribers("SIGNED_IN",c0.session)),this._returnResult({data:c0,error:u0})}catch(n0){if(isAuthError(n0))return this._returnResult({data:{user:null,session:null},error:n0});throw n0}}async signInWithOtp(e0){var n0,a0,i0,s0,o0;try{if("email"in e0){const{email:l0,options:c0}=e0;let u0=null,d0=null;this.flowType==="pkce"&&([u0,d0]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{error:h0}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l0,data:(n0=c0==null?void 0:c0.data)!==null&&n0!==void 0?n0:{},create_user:(a0=c0==null?void 0:c0.shouldCreateUser)!==null&&a0!==void 0?a0:!0,gotrue_meta_security:{captcha_token:c0==null?void 0:c0.captchaToken},code_challenge:u0,code_challenge_method:d0},redirectTo:c0==null?void 0:c0.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h0})}if("phone"in e0){const{phone:l0,options:c0}=e0,{data:u0,error:d0}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l0,data:(i0=c0==null?void 0:c0.data)!==null&&i0!==void 0?i0:{},create_user:(s0=c0==null?void 0:c0.shouldCreateUser)!==null&&s0!==void 0?s0:!0,gotrue_meta_security:{captcha_token:c0==null?void 0:c0.captchaToken},channel:(o0=c0==null?void 0:c0.channel)!==null&&o0!==void 0?o0:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u0==null?void 0:u0.message_id},error:d0})}throw new AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(l0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(l0))return this._returnResult({data:{user:null,session:null},error:l0});throw l0}}async verifyOtp(e0){var n0,a0;try{let i0,s0;"options"in e0&&(i0=(n0=e0.options)===null||n0===void 0?void 0:n0.redirectTo,s0=(a0=e0.options)===null||a0===void 0?void 0:a0.captchaToken);const{data:o0,error:l0}=await _request(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e0),{gotrue_meta_security:{captcha_token:s0}}),redirectTo:i0,xform:_sessionResponse});if(l0)throw l0;if(!o0)throw new Error("An error occurred on token verification.");const c0=o0.session,u0=o0.user;return c0!=null&&c0.access_token&&(await this._saveSession(c0),await this._notifyAllSubscribers(e0.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c0)),this._returnResult({data:{user:u0,session:c0},error:null})}catch(i0){if(isAuthError(i0))return this._returnResult({data:{user:null,session:null},error:i0});throw i0}}async signInWithSSO(e0){var n0,a0,i0,s0,o0;try{let l0=null,c0=null;this.flowType==="pkce"&&([l0,c0]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const u0=await _request(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e0?{provider_id:e0.providerId}:null),"domain"in e0?{domain:e0.domain}:null),{redirect_to:(a0=(n0=e0.options)===null||n0===void 0?void 0:n0.redirectTo)!==null&&a0!==void 0?a0:void 0}),!((i0=e0==null?void 0:e0.options)===null||i0===void 0)&&i0.captchaToken?{gotrue_meta_security:{captcha_token:e0.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l0,code_challenge_method:c0}),headers:this.headers,xform:_ssoResponse});return!((s0=u0.data)===null||s0===void 0)&&s0.url&&isBrowser()&&!(!((o0=e0.options)===null||o0===void 0)&&o0.skipBrowserRedirect)&&window.location.assign(u0.data.url),this._returnResult(u0)}catch(l0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(l0))return this._returnResult({data:null,error:l0});throw l0}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e0=>{const{data:{session:n0},error:a0}=e0;if(a0)throw a0;if(!n0)throw new AuthSessionMissingError;
575const{error:i0}=await _request(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n0.access_token});return this._returnResult({data:{user:null,session:null},error:i0})})}catch(e0){if(isAuthError(e0))return this._returnResult({data:{user:null,session:null},error:e0});throw e0}}async resend(e0){try{const n0=`${this.url}/resend`;if("email"in e0){const{email:a0,type:i0,options:s0}=e0,{error:o0}=await _request(this.fetch,"POST",n0,{headers:this.headers,body:{email:a0,type:i0,gotrue_meta_security:{captcha_token:s0==null?void 0:s0.captchaToken}},redirectTo:s0==null?void 0:s0.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o0})}else if("phone"in e0){const{phone:a0,type:i0,options:s0}=e0,{data:o0,error:l0}=await _request(this.fetch,"POST",n0,{headers:this.headers,body:{phone:a0,type:i0,gotrue_meta_security:{captcha_token:s0==null?void 0:s0.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o0==null?void 0:o0.message_id},error:l0})}throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch(n0){if(isAuthError(n0))return this._returnResult({data:{user:null,session:null},error:n0});throw n0}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n0=>n0))}async _acquireLock(e0,n0){this._debug("#_acquireLock","begin",e0);try{if(this.lockAcquired){const a0=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i0=(async()=>(await a0,await n0()))();return this.pendingInLock.push((async()=>{try{await i0}catch{}})()),i0}return await this.lock(`lock:${this.storageKey}`,e0,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a0=n0();for(this.pendingInLock.push((async()=>{try{await a0}catch{}})()),await a0;this.pendingInLock.length;){const i0=[...this.pendingInLock];await Promise.all(i0),this.pendingInLock.splice(0,i0.length)}return await a0}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e0){this._debug("#_useSession","begin");try{const n0=await this.__loadSession();return await e0(n0)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e0=null;const n0=await getItemAsync(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n0),n0!==null&&(this._isValidSession(n0)?e0=n0:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e0)return{data:{session:null},error:null};const a0=e0.expires_at?e0.expires_at*1e3-Date.now()<EXPIRY_MARGIN_MS:!1;if(this._debug("#__loadSession()",`session has${a0?"":" not"} expired`,"expires_at",e0.expires_at),!a0){if(this.userStorage){const o0=await getItemAsync(this.userStorage,this.storageKey+"-user");o0!=null&&o0.user?e0.user=o0.user:e0.user=userNotAvailableProxy()}if(this.storage.isServer&&e0.user&&!e0.user.__isUserNotAvailableProxy){const o0={value:this.suppressGetSessionWarning};e0.user=insecureUserWarningProxy(e0.user,o0),o0.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e0},error:null}}const{data:i0,error:s0}=await this._callRefreshToken(e0.refresh_token);return s0?this._returnResult({data:{session:null},error:s0}):this._returnResult({data:{session:i0},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e0){if(e0)return await this._getUser(e0);await this.initializePromise;const n0=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n0.data.user&&(this.suppressGetSessionWarning=!0),n0}async _getUser(e0){try{return e0?await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e0,xform:_userResponse}):await this._useSession(async n0=>{var a0,i0,s0;const{data:o0,error:l0}=n0;if(l0)throw l0;return!(!((a0=o0.session)===null||a0===void 0)&&a0.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new AuthSessionMissingError}:await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s0=(i0=o0.session)===null||i0===void 0?void 0:i0.access_token)!==null&&s0!==void 0?s0:void 0,xform:_userResponse})})}catch(n0){if(isAuthError(n0))return isAuthSessionMissingError(n0)&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n0});throw n0}}async updateUser(e0,n0={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e0,n0))}async _updateUser(e0,n0={}){try{return await this._useSession(async a0=>{const{data:i0,error:s0}=a0;
575if(s0)throw s0;if(!i0.session)throw new AuthSessionMissingError;const o0=i0.session;let l0=null,c0=null;this.flowType==="pkce"&&e0.email!=null&&([l0,c0]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{data:u0,error:d0}=await _request(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n0==null?void 0:n0.emailRedirectTo,body:Object.assign(Object.assign({},e0),{code_challenge:l0,code_challenge_method:c0}),jwt:o0.access_token,xform:_userResponse});if(d0)throw d0;return o0.user=u0.user,await this._saveSession(o0),await this._notifyAllSubscribers("USER_UPDATED",o0),this._returnResult({data:{user:o0.user},error:null})})}catch(a0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(a0))return this._returnResult({data:{user:null},error:a0});throw a0}}async setSession(e0){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e0))}async _setSession(e0){try{if(!e0.access_token||!e0.refresh_token)throw new AuthSessionMissingError;const n0=Date.now()/1e3;let a0=n0,i0=!0,s0=null;const{payload:o0}=decodeJWT(e0.access_token);if(o0.exp&&(a0=o0.exp,i0=a0<=n0),i0){const{data:l0,error:c0}=await this._callRefreshToken(e0.refresh_token);if(c0)return this._returnResult({data:{user:null,session:null},error:c0});if(!l0)return{data:{user:null,session:null},error:null};s0=l0}else{const{data:l0,error:c0}=await this._getUser(e0.access_token);if(c0)throw c0;s0={access_token:e0.access_token,refresh_token:e0.refresh_token,user:l0.user,token_type:"bearer",expires_in:a0-n0,expires_at:a0},await this._saveSession(s0),await this._notifyAllSubscribers("SIGNED_IN",s0)}return this._returnResult({data:{user:s0.user,session:s0},error:null})}catch(n0){if(isAuthError(n0))return this._returnResult({data:{session:null,user:null},error:n0});throw n0}}async refreshSession(e0){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e0))}async _refreshSession(e0){try{return await this._useSession(async n0=>{var a0;if(!e0){const{data:o0,error:l0}=n0;if(l0)throw l0;e0=(a0=o0.session)!==null&&a0!==void 0?a0:void 0}if(!(e0!=null&&e0.refresh_token))throw new AuthSessionMissingError;const{data:i0,error:s0}=await this._callRefreshToken(e0.refresh_token);return s0?this._returnResult({data:{user:null,session:null},error:s0}):i0?this._returnResult({data:{user:i0.user,session:i0},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n0){if(isAuthError(n0))return this._returnResult({data:{user:null,session:null},error:n0});throw n0}}async _getSessionFromURL(e0,n0){try{if(!isBrowser())throw new AuthImplicitGrantRedirectError("No browser detected.");if(e0.error||e0.error_description||e0.error_code)throw new AuthImplicitGrantRedirectError(e0.error_description||"Error in URL with unspecified error_description",{error:e0.error||"unspecified_error",code:e0.error_code||"unspecified_code"});switch(n0){case"implicit":if(this.flowType==="pkce")throw new AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");break;default:}if(n0==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e0.code)throw new AuthPKCEGrantCodeExchangeError("No code detected.");const{data:y0,error:b0}=await this._exchangeCodeForSession(e0.code);if(b0)throw b0;const E0=new URL(window.location.href);return E0.searchParams.delete("code"),window.history.replaceState(window.history.state,"",E0.toString()),{data:{session:y0.session,redirectType:null},error:null}}const{provider_token:a0,provider_refresh_token:i0,access_token:s0,refresh_token:o0,expires_in:l0,expires_at:c0,token_type:u0}=e0;if(!s0||!l0||!o0||!u0)throw new AuthImplicitGrantRedirectError("No session defined in URL");const d0=Math.round(Date.now()/1e3),h0=parseInt(l0);let f0=d0+h0;c0&&(f0=parseInt(c0));const p0=f0-d0;p0*1e3<=AUTO_REFRESH_TICK_DURATION_MS&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p0}s, should have been closer to ${h0}s`);const A0=f0-h0;d0-A0>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A0,f0,d0):d0-A0<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A0,f0,d0);const{data:m0,error:x0}=await this._getUser(s0);if(x0)throw x0;const g0={provider_token:a0,provider_refresh_token:i0,access_token:s0,expires_in:h0,expires_at:f0,refresh_token:o0,token_type:u0,user:m0.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g0,redirectType:e0.type},error:null})}catch(a0){if(isAuthError(a0))return this._returnResult({data:{session:null,redirectType:null},error:a0});throw a0}}_isImplicitGrantCallback(e0){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e0):!!(e0.access_token||e0.error_description)}async _isPKCECallback(e0){const n0=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`);return!!(e0.code&&n0)}async signOut(e0={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e0))}async _signOut({scope:e0}={scope:"global"}){return await this._useSession(async n0=>{var a0;const{data:i0,error:s0}=n0;if(s0)return this._returnResult({error:s0});const o0=(a0=i0.session)===null||a0===void 0?void 0:a0.access_token;if(o0){const{error:l0}=await this.admin.signOut(o0,e0);if(l0&&!(isAuthApiError(l0)&&(l0.status===404||l0.status===401||l0.status===403)))return this._returnResult({error:l0})}return e0!=="others"&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e0){const n0=generateCallbackId(),a0={id:n0,callback:e0,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n0),this.stateChangeEmitters.delete(n0)}};return this._debug("#onAuthStateChange()","registered callback with id",n0),this.stateChangeEmitters.set(n0,a0),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n0)})))(),{data:{subscription:a0}}}async _emitInitialSession(e0){return await this._useSession(async n0=>{var a0,i0;try{const{data:{session:s0},error:o0}=n0;if(o0)throw o0;await((a0=this.stateChangeEmitters.get(e0))===null||a0===void 0?void 0:a0.callback("INITIAL_SESSION",s0)),this._debug("INITIAL_SESSION","callback id",e0,"session",s0)}catch(s0){await((i0=this.stateChangeEmitters.get(e0))===null||i0===void 0?void 0:i0.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e0,"error",s0),console.error(s0)}})}async resetPasswordForEmail(e0,n0={}){let a0=null,i0=null;this.flowType==="pkce"&&([a0,i0]=await getCodeChallengeAndMethod(this.storage,this.storageKey,!0));try{return await _request(this.fetch,"POST",`${this.url}/recover`,{body:{email:e0,code_challenge:a0,code_challenge_method:i0,gotrue_meta_security:{captcha_token:n0.captchaToken}},headers:this.headers,redirectTo:n0.redirectTo})}catch(s0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(s0))return this._returnResult({data:null,error:s0});throw s0}}async getUserIdentities(){var e0;try{const{data:n0,error:a0}=await this.getUser();if(a0)throw a0;return this._returnResult({data:{identities:(e0=n0.user.identities)!==null&&e0!==void 0?e0:[]},error:null})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async linkIdentity(e0){return"token"in e0?this.linkIdentityIdToken(e0):this.linkIdentityOAuth(e0)}async linkIdentityOAuth(e0){var n0;try{const{data:a0,error:i0}=await this._useSession(async s0=>{var o0,l0,c0,u0,d0;const{data:h0,error:f0}=s0;if(f0)throw f0;const p0=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e0.provider,{redirectTo:(o0=e0.options)===null||o0===void 0?void 0:o0.redirectTo,scopes:(l0=e0.options)===null||l0===void 0?void 0:l0.scopes,queryParams:(c0=e0.options)===null||c0===void 0?void 0:c0.queryParams,skipBrowserRedirect:!0});return await _request(this.fetch,"GET",p0,{headers:this.headers,jwt:(d0=(u0=h0.session)===null||u0===void 0?void 0:u0.access_token)!==null&&d0!==void 0?d0:void 0})});if(i0)throw i0;return isBrowser()&&!(!((n0=e0.options)===null||n0===void 0)&&n0.skipBrowserRedirect)&&window.location.assign(a0==null?void 0:a0.url),this._returnResult({data:{provider:e0.provider,url:a0==null?void 0:a0.url},error:null})}catch(a0){if(isAuthError(a0))return this._returnResult({data:{provider:e0.provider,url:null},error:a0});throw a0}}async linkIdentityIdToken(e0){return await this._useSession(async n0=>{var a0;try{const{error:i0,data:{session:s0}}=n0;if(i0)throw i0;
575const{options:o0,provider:l0,token:c0,access_token:u0,nonce:d0}=e0,h0=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a0=s0==null?void 0:s0.access_token)!==null&&a0!==void 0?a0:void 0,body:{provider:l0,id_token:c0,access_token:u0,nonce:d0,link_identity:!0,gotrue_meta_security:{captcha_token:o0==null?void 0:o0.captchaToken}},xform:_sessionResponse}),{data:f0,error:p0}=h0;return p0?this._returnResult({data:{user:null,session:null},error:p0}):!f0||!f0.session||!f0.user?this._returnResult({data:{user:null,session:null},error:new AuthInvalidTokenResponseError}):(f0.session&&(await this._saveSession(f0.session),await this._notifyAllSubscribers("USER_UPDATED",f0.session)),this._returnResult({data:f0,error:p0}))}catch(i0){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(i0))return this._returnResult({data:{user:null,session:null},error:i0});throw i0}})}async unlinkIdentity(e0){try{return await this._useSession(async n0=>{var a0,i0;const{data:s0,error:o0}=n0;if(o0)throw o0;return await _request(this.fetch,"DELETE",`${this.url}/user/identities/${e0.identity_id}`,{headers:this.headers,jwt:(i0=(a0=s0.session)===null||a0===void 0?void 0:a0.access_token)!==null&&i0!==void 0?i0:void 0})})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async _refreshAccessToken(e0){const n0=`#_refreshAccessToken(${e0.substring(0,5)}...)`;this._debug(n0,"begin");try{const a0=Date.now();return await retryable(async i0=>(i0>0&&await sleep(200*Math.pow(2,i0-1)),this._debug(n0,"refreshing attempt",i0),await _request(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e0},headers:this.headers,xform:_sessionResponse})),(i0,s0)=>{const o0=200*Math.pow(2,i0);return s0&&isAuthRetryableFetchError(s0)&&Date.now()+o0-a0<AUTO_REFRESH_TICK_DURATION_MS})}catch(a0){if(this._debug(n0,"error",a0),isAuthError(a0))return this._returnResult({data:{session:null,user:null},error:a0});throw a0}finally{this._debug(n0,"end")}}_isValidSession(e0){return typeof e0=="object"&&e0!==null&&"access_token"in e0&&"refresh_token"in e0&&"expires_at"in e0}async _handleProviderSignIn(e0,n0){const a0=await this._getUrlForProvider(`${this.url}/authorize`,e0,{redirectTo:n0.redirectTo,scopes:n0.scopes,queryParams:n0.queryParams});return this._debug("#_handleProviderSignIn()","provider",e0,"options",n0,"url",a0),isBrowser()&&!n0.skipBrowserRedirect&&window.location.assign(a0),{data:{provider:e0,url:a0},error:null}}async _recoverAndRefresh(){var e0,n0;const a0="#_recoverAndRefresh()";this._debug(a0,"begin");try{const i0=await getItemAsync(this.storage,this.storageKey);if(i0&&this.userStorage){let o0=await getItemAsync(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o0&&(o0={user:i0.user},await setItemAsync(this.userStorage,this.storageKey+"-user",o0)),i0.user=(e0=o0==null?void 0:o0.user)!==null&&e0!==void 0?e0:userNotAvailableProxy()}else if(i0&&!i0.user&&!i0.user){const o0=await getItemAsync(this.storage,this.storageKey+"-user");o0&&(o0!=null&&o0.user)?(i0.user=o0.user,await removeItemAsync(this.storage,this.storageKey+"-user"),await setItemAsync(this.storage,this.storageKey,i0)):i0.user=userNotAvailableProxy()}if(this._debug(a0,"session from storage",i0),!this._isValidSession(i0)){this._debug(a0,"session is not valid"),i0!==null&&await this._removeSession();return}const s0=((n0=i0.expires_at)!==null&&n0!==void 0?n0:1/0)*1e3-Date.now()<EXPIRY_MARGIN_MS;if(this._debug(a0,`session has${s0?"":" not"} expired with margin of ${EXPIRY_MARGIN_MS}s`),s0){if(this.autoRefreshToken&&i0.refresh_token){const{error:o0}=await this._callRefreshToken(i0.refresh_token);o0&&(console.error(o0),isAuthRetryableFetchError(o0)||(this._debug(a0,"refresh failed with a non-retryable error, removing the session",o0),await this._removeSession()))}}else if(i0.user&&i0.user.__isUserNotAvailableProxy===!0)try{const{data:o0,error:l0}=await this._getUser(i0.access_token);!l0&&(o0!=null&&o0.user)?(i0.user=o0.user,await this._saveSession(i0),await this._notifyAllSubscribers("SIGNED_IN",i0)):this._debug(a0,"could not get user data, skipping SIGNED_IN notification")}catch(o0){console.error("Error getting user data:",o0),this._debug(a0,"error getting user data, skipping SIGNED_IN notification",o0)}else await this._notifyAllSubscribers("SIGNED_IN",i0)}catch(i0){this._debug(a0,"error",i0),console.error(i0);return}finally{this._debug(a0,"end")}}async _callRefreshToken(e0){var n0,a0;if(!e0)throw new AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i0=`#_callRefreshToken(${e0.substring(0,5)}...)`;this._debug(i0,"begin");try{this.refreshingDeferred=new Deferred$2;const{data:s0,error:o0}=await this._refreshAccessToken(e0);if(o0)throw o0;if(!s0.session)throw new AuthSessionMissingError;await this._saveSession(s0.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s0.session);const l0={data:s0.session,error:null};return this.refreshingDeferred.resolve(l0),l0}catch(s0){if(this._debug(i0,"error",s0),isAuthError(s0)){const o0={data:null,error:s0};return isAuthRetryableFetchError(s0)||await this._removeSession(),(n0=this.refreshingDeferred)===null||n0===void 0||n0.resolve(o0),o0}throw(a0=this.refreshingDeferred)===null||a0===void 0||a0.reject(s0),s0}finally{this.refreshingDeferred=null,this._debug(i0,"end")}}async _notifyAllSubscribers(e0,n0,a0=!0){const i0=`#_notifyAllSubscribers(${e0})`;this._debug(i0,"begin",n0,`broadcast = ${a0}`);try{this.broadcastChannel&&a0&&this.broadcastChannel.postMessage({event:e0,session:n0});const s0=[],o0=Array.from(this.stateChangeEmitters.values()).map(async l0=>{try{await l0.callback(e0,n0)}catch(c0){s0.push(c0)}});if(await Promise.all(o0),s0.length>0){for(let l0=0;l0<s0.length;l0+=1)console.error(s0[l0]);throw s0[0]}}finally{this._debug(i0,"end")}}async _saveSession(e0){this._debug("#_saveSession()",e0),this.suppressGetSessionWarning=!0,await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`);const n0=Object.assign({},e0),a0=n0.user&&n0.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a0&&n0.user&&await setItemAsync(this.userStorage,this.storageKey+"-user",{user:n0.user});const i0=Object.assign({},n0);delete i0.user;const s0=deepClone(i0);await setItemAsync(this.storage,this.storageKey,s0)}else{const i0=deepClone(n0);await setItemAsync(this.storage,this.storageKey,i0)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await removeItemAsync(this.storage,this.storageKey),await removeItemAsync(this.storage,this.storageKey+"-code-verifier"),await removeItemAsync(this.storage,this.storageKey+"-user"),this.userStorage&&await removeItemAsync(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e0=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e0&&isBrowser()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e0)}
575catch(n0){console.error("removing visibilitychange callback failed",n0)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e0=setInterval(()=>this._autoRefreshTokenTick(),AUTO_REFRESH_TICK_DURATION_MS);this.autoRefreshTicker=e0,e0&&typeof e0=="object"&&typeof e0.unref=="function"?e0.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e0);const n0=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n0,n0&&typeof n0=="object"&&typeof n0.unref=="function"?n0.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e0=this.autoRefreshTicker;this.autoRefreshTicker=null,e0&&clearInterval(e0);const n0=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n0&&clearTimeout(n0)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e0=Date.now();try{return await this._useSession(async n0=>{const{data:{session:a0}}=n0;if(!a0||!a0.refresh_token||!a0.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i0=Math.floor((a0.expires_at*1e3-e0)/AUTO_REFRESH_TICK_DURATION_MS);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i0} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION_MS}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`),i0<=AUTO_REFRESH_TICK_THRESHOLD&&await this._callRefreshToken(a0.refresh_token)})}catch(n0){console.error("Auto refresh tick failed with error. This is likely a transient error.",n0)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e0){if(e0.isAcquireTimeout||e0 instanceof LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw e0}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!isBrowser()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e0){console.error("_handleVisibilityChange",e0)}}async _onVisibilityChanged(e0){const n0=`#_onVisibilityChanged(${e0})`;this._debug(n0,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e0||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n0,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e0,n0,a0){const i0=[`provider=${encodeURIComponent(n0)}`];if(a0!=null&&a0.redirectTo&&i0.push(`redirect_to=${encodeURIComponent(a0.redirectTo)}`),a0!=null&&a0.scopes&&i0.push(`scopes=${encodeURIComponent(a0.scopes)}`),this.flowType==="pkce"){const[s0,o0]=await getCodeChallengeAndMethod(this.storage,this.storageKey),l0=new URLSearchParams({code_challenge:`${encodeURIComponent(s0)}`,code_challenge_method:`${encodeURIComponent(o0)}`});i0.push(l0.toString())}if(a0!=null&&a0.queryParams){const s0=new URLSearchParams(a0.queryParams);i0.push(s0.toString())}return a0!=null&&a0.skipBrowserRedirect&&i0.push(`skip_http_redirect=${a0.skipBrowserRedirect}`),`${e0}?${i0.join("&")}`}async _unenroll(e0){try{return await this._useSession(async n0=>{var a0;const{data:i0,error:s0}=n0;return s0?this._returnResult({data:null,error:s0}):await _request(this.fetch,"DELETE",`${this.url}/factors/${e0.factorId}`,{headers:this.headers,jwt:(a0=i0==null?void 0:i0.session)===null||a0===void 0?void 0:a0.access_token})})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async _enroll(e0){try{return await this._useSession(async n0=>{var a0,i0;const{data:s0,error:o0}=n0;if(o0)return this._returnResult({data:null,error:o0});const l0=Object.assign({friendly_name:e0.friendlyName,factor_type:e0.factorType},e0.factorType==="phone"?{phone:e0.phone}:e0.factorType==="totp"?{issuer:e0.issuer}:{}),{data:c0,error:u0}=await _request(this.fetch,"POST",`${this.url}/factors`,{body:l0,headers:this.headers,jwt:(a0=s0==null?void 0:s0.session)===null||a0===void 0?void 0:a0.access_token});return u0?this._returnResult({data:null,error:u0}
575):(e0.factorType==="totp"&&c0.type==="totp"&&(!((i0=c0==null?void 0:c0.totp)===null||i0===void 0)&&i0.qr_code)&&(c0.totp.qr_code=`data:image/svg+xml;utf-8,${c0.totp.qr_code}`),this._returnResult({data:c0,error:null}))})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async _verify(e0){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n0=>{var a0;const{data:i0,error:s0}=n0;if(s0)return this._returnResult({data:null,error:s0});const o0=Object.assign({challenge_id:e0.challengeId},"webauthn"in e0?{webauthn:Object.assign(Object.assign({},e0.webauthn),{credential_response:e0.webauthn.type==="create"?serializeCredentialCreationResponse(e0.webauthn.credential_response):serializeCredentialRequestResponse(e0.webauthn.credential_response)})}:{code:e0.code}),{data:l0,error:c0}=await _request(this.fetch,"POST",`${this.url}/factors/${e0.factorId}/verify`,{body:o0,headers:this.headers,jwt:(a0=i0==null?void 0:i0.session)===null||a0===void 0?void 0:a0.access_token});return c0?this._returnResult({data:null,error:c0}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l0.expires_in},l0)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l0),this._returnResult({data:l0,error:c0}))})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}})}async _challenge(e0){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n0=>{var a0;const{data:i0,error:s0}=n0;if(s0)return this._returnResult({data:null,error:s0});const o0=await _request(this.fetch,"POST",`${this.url}/factors/${e0.factorId}/challenge`,{body:e0,headers:this.headers,jwt:(a0=i0==null?void 0:i0.session)===null||a0===void 0?void 0:a0.access_token});if(o0.error)return o0;const{data:l0}=o0;if(l0.type!=="webauthn")return{data:l0,error:null};switch(l0.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l0),{webauthn:Object.assign(Object.assign({},l0.webauthn),{credential_options:Object.assign(Object.assign({},l0.webauthn.credential_options),{publicKey:deserializeCredentialCreationOptions(l0.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l0),{webauthn:Object.assign(Object.assign({},l0.webauthn),{credential_options:Object.assign(Object.assign({},l0.webauthn.credential_options),{publicKey:deserializeCredentialRequestOptions(l0.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}})}async _challengeAndVerify(e0){const{data:n0,error:a0}=await this._challenge({factorId:e0.factorId});return a0?this._returnResult({data:null,error:a0}):await this._verify({factorId:e0.factorId,challengeId:n0.id,code:e0.code})}async _listFactors(){var e0;const{data:{user:n0},error:a0}=await this.getUser();if(a0)return{data:null,error:a0};const i0={all:[],phone:[],totp:[],webauthn:[]};for(const s0 of(e0=n0==null?void 0:n0.factors)!==null&&e0!==void 0?e0:[])i0.all.push(s0),s0.status==="verified"&&i0[s0.factor_type].push(s0);return{data:i0,error:null}}async _getAuthenticatorAssuranceLevel(){var e0,n0;const{data:{session:a0},error:i0}
575=await this.getSession();if(i0)return this._returnResult({data:null,error:i0});if(!a0)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:s0}=decodeJWT(a0.access_token);let o0=null;s0.aal&&(o0=s0.aal);let l0=o0;((n0=(e0=a0.user.factors)===null||e0===void 0?void 0:e0.filter(d0=>d0.status==="verified"))!==null&&n0!==void 0?n0:[]).length>0&&(l0="aal2");const u0=s0.amr||[];return{data:{currentLevel:o0,nextLevel:l0,currentAuthenticationMethods:u0},error:null}}async _getAuthorizationDetails(e0){try{return await this._useSession(async n0=>{const{data:{session:a0},error:i0}=n0;return i0?this._returnResult({data:null,error:i0}):a0?await _request(this.fetch,"GET",`${this.url}/oauth/authorizations/${e0}`,{headers:this.headers,jwt:a0.access_token,xform:s0=>({data:s0,error:null})}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async _approveAuthorization(e0,n0){try{return await this._useSession(async a0=>{const{data:{session:i0},error:s0}=a0;if(s0)return this._returnResult({data:null,error:s0});if(!i0)return this._returnResult({data:null,error:new AuthSessionMissingError});const o0=await _request(this.fetch,"POST",`${this.url}/oauth/authorizations/${e0}/consent`,{headers:this.headers,jwt:i0.access_token,body:{action:"approve"},xform:l0=>({data:l0,error:null})});return o0.data&&o0.data.redirect_url&&isBrowser()&&!(n0!=null&&n0.skipBrowserRedirect)&&window.location.assign(o0.data.redirect_url),o0})}catch(a0){if(isAuthError(a0))return this._returnResult({data:null,error:a0});throw a0}}async _denyAuthorization(e0,n0){try{return await this._useSession(async a0=>{const{data:{session:i0},error:s0}=a0;if(s0)return this._returnResult({data:null,error:s0});if(!i0)return this._returnResult({data:null,error:new AuthSessionMissingError});const o0=await _request(this.fetch,"POST",`${this.url}/oauth/authorizations/${e0}/consent`,{headers:this.headers,jwt:i0.access_token,body:{action:"deny"},xform:l0=>({data:l0,error:null})});return o0.data&&o0.data.redirect_url&&isBrowser()&&!(n0!=null&&n0.skipBrowserRedirect)&&window.location.assign(o0.data.redirect_url),o0})}catch(a0){if(isAuthError(a0))return this._returnResult({data:null,error:a0});throw a0}}async _listOAuthGrants(){try{return await this._useSession(async e0=>{const{data:{session:n0},error:a0}=e0;return a0?this._returnResult({data:null,error:a0}):n0?await _request(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n0.access_token,xform:i0=>({data:i0,error:null})}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(e0){if(isAuthError(e0))return this._returnResult({data:null,error:e0});throw e0}}async _revokeOAuthGrant(e0){try{return await this._useSession(async n0=>{const{data:{session:a0},error:i0}=n0;return i0?this._returnResult({data:null,error:i0}):a0?(await _request(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a0.access_token,query:{client_id:e0.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(n0){if(isAuthError(n0))return this._returnResult({data:null,error:n0});throw n0}}async fetchJwk(e0,n0={keys:[]}){let a0=n0.keys.find(l0=>l0.kid===e0);if(a0)return a0;const i0=Date.now();if(a0=this.jwks.keys.find(l0=>l0.kid===e0),a0&&this.jwks_cached_at+JWKS_TTL>i0)return a0;const{data:s0,error:o0}=await _request(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o0)throw o0;return!s0.keys||s0.keys.length===0||(this.jwks=s0,this.jwks_cached_at=i0,a0=s0.keys.find(l0=>l0.kid===e0),!a0)?null:a0}async getClaims(e0,n0={}){try{let a0=e0;if(!a0){const{data:p0,error:A0}
575=await this.getSession();if(A0||!p0.session)return this._returnResult({data:null,error:A0});a0=p0.session.access_token}const{header:i0,payload:s0,signature:o0,raw:{header:l0,payload:c0}}=decodeJWT(a0);n0!=null&&n0.allowExpired||validateExp(s0.exp);const u0=!i0.alg||i0.alg.startsWith("HS")||!i0.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i0.kid,n0!=null&&n0.keys?{keys:n0.keys}:n0==null?void 0:n0.jwks);if(!u0){const{error:p0}=await this.getUser(a0);if(p0)throw p0;return{data:{claims:s0,header:i0,signature:o0},error:null}}const d0=getAlgorithm(i0.alg),h0=await crypto.subtle.importKey("jwk",u0,d0,!0,["verify"]);if(!await crypto.subtle.verify(d0,h0,o0,stringToUint8Array(`${l0}.${c0}`)))throw new AuthInvalidJwtError("Invalid JWT signature");return{data:{claims:s0,header:i0,signature:o0},error:null}}catch(a0){if(isAuthError(a0))return this._returnResult({data:null,error:a0});throw a0}}}GoTrueClient.nextInstanceID={};const AuthClient=GoTrueClient,version$1="2.90.1";let JS_ENV="";typeof Deno<"u"?JS_ENV="deno":typeof document<"u"?JS_ENV="web":typeof navigator<"u"&&navigator.product==="ReactNative"?JS_ENV="react-native":JS_ENV="node";const DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${JS_ENV}/${version$1}`},DEFAULT_GLOBAL_OPTIONS={headers:DEFAULT_HEADERS},DEFAULT_DB_OPTIONS={schema:"public"},DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},DEFAULT_REALTIME_OPTIONS={};function _typeof$D(r0){"@babel/helpers - typeof";return _typeof$D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$D(r0)}function toPrimitive(r0,e0){if(_typeof$D(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$D(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function toPropertyKey(r0){var e0=toPrimitive(r0,"string");return _typeof$D(e0)=="symbol"?e0:e0+""}function _defineProperty$B(r0,e0,n0){return(e0=toPropertyKey(e0))in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function ownKeys$x(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread2(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$x(Object(n0),!0).forEach(function(a0){_defineProperty$B(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$x(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}const resolveFetch=r0=>
575r0?(...e0)=>r0(...e0):(...e0)=>fetch(...e0),resolveHeadersConstructor=()=>Headers,fetchWithAuth=(r0,e0,n0)=>{const a0=resolveFetch(n0),i0=resolveHeadersConstructor();return async(s0,o0)=>{var l0;const c0=(l0=await e0())!==null&&l0!==void 0?l0:r0;let u0=new i0(o0==null?void 0:o0.headers);return u0.has("apikey")||u0.set("apikey",r0),u0.has("Authorization")||u0.set("Authorization",`Bearer ${c0}`),a0(s0,_objectSpread2(_objectSpread2({},o0),{},{headers:u0}))}};function ensureTrailingSlash(r0){return r0.endsWith("/")?r0:r0+"/"}function applySettingDefaults(r0,e0){var n0,a0;const{db:i0,auth:s0,realtime:o0,global:l0}=r0,{db:c0,auth:u0,realtime:d0,global:h0}=e0,f0={db:_objectSpread2(_objectSpread2({},c0),i0),auth:_objectSpread2(_objectSpread2({},u0),s0),realtime:_objectSpread2(_objectSpread2({},d0),o0),storage:{},global:_objectSpread2(_objectSpread2(_objectSpread2({},h0),l0),{},{headers:_objectSpread2(_objectSpread2({},(n0=h0==null?void 0:h0.headers)!==null&&n0!==void 0?n0:{}),(a0=l0==null?void 0:l0.headers)!==null&&a0!==void 0?a0:{})}),accessToken:async()=>""};return r0.accessToken?f0.accessToken=r0.accessToken:delete f0.accessToken,f0}function validateSupabaseUrl(r0){const e0=r0==null?void 0:r0.trim();if(!e0)throw new Error("supabaseUrl is required.");if(!e0.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ensureTrailingSlash(e0))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var SupabaseAuthClient=class extends AuthClient{constructor(r0){super(r0)}},SupabaseClient=class{constructor(r0,e0,n0){var a0,i0;this.supabaseUrl=r0,this.supabaseKey=e0;const s0=validateSupabaseUrl(r0);if(!e0)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s0),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s0),this.storageUrl=new URL("storage/v1",s0),this.functionsUrl=new URL("functions/v1",s0);const o0=`sb-${s0.hostname.split(".")[0]}-auth-token`,l0={db:DEFAULT_DB_OPTIONS,realtime:DEFAULT_REALTIME_OPTIONS,auth:_objectSpread2(_objectSpread2({},DEFAULT_AUTH_OPTIONS),{},{storageKey:o0}),global:DEFAULT_GLOBAL_OPTIONS},c0=applySettingDefaults(n0??{},l0);if(this.storageKey=(a0=c0.auth.storageKey)!==null&&a0!==void 0?a0:"",this.headers=(i0=c0.global.headers)!==null&&i0!==void 0?i0:{},c0.accessToken)this.accessToken=c0.accessToken,this.auth=new Proxy({},{get:(d0,h0)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h0)} is not possible`)}});else{var u0;this.auth=this._initSupabaseAuthClient((u0=c0.auth)!==null&&u0!==void 0?u0:{},this.headers,c0.global.fetch)}this.fetch=fetchWithAuth(e0,this._getAccessToken.bind(this),c0.global.fetch),this.realtime=this._initRealtimeClient(_objectSpread2({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c0.realtime)),this.accessToken&&this.accessToken().then(d0=>this.realtime.setAuth(d0)).catch(d0=>console.warn("Failed to set initial Realtime auth token:",d0)),this.rest=new PostgrestClient(new URL("rest/v1",s0).href,{headers:this.headers,schema:c0.db.schema,fetch:this.fetch}),this.storage=new StorageClient(this.storageUrl.href,this.headers,this.fetch,n0==null?void 0:n0.storage),c0.accessToken||this._listenForAuthEvents()}get functions(){return new FunctionsClient(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(r0){return this.rest.from(r0)}schema(r0){return this.rest.schema(r0)}rpc(r0,e0={},n0={head:!1,get:!1,count:void 0}){return this.rest.rpc(r0,e0,n0)}channel(r0,e0={config:{}}){return this.realtime.channel(r0,e0)}getChannels(){return this.realtime.getChannels()}removeChannel(r0){return this.realtime.removeChannel(r0)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var r0=this,e0,n0;if(r0.accessToken)return await r0.accessToken();const{data:a0}=await r0.auth.getSession();return(e0=(n0=a0.session)===null||n0===void 0?void 0:n0.access_token)!==null&&e0!==void 0?e0:r0.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:r0,persistSession:e0,detectSessionInUrl:n0,storage:a0,userStorage:i0,storageKey:s0,flowType:o0,lock:l0,debug:c0,throwOnError:u0},d0,h0){const f0={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new SupabaseAuthClient({url:this.authUrl.href,headers:_objectSpread2
575(_objectSpread2({},f0),d0),storageKey:s0,autoRefreshToken:r0,persistSession:e0,detectSessionInUrl:n0,storage:a0,userStorage:i0,flowType:o0,lock:l0,debug:c0,throwOnError:u0,fetch:h0,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p0=>p0.toLowerCase()==="authorization")})}_initRealtimeClient(r0){return new RealtimeClient(this.realtimeUrl.href,_objectSpread2(_objectSpread2({},r0),{},{params:_objectSpread2(_objectSpread2({},{apikey:this.supabaseKey}),r0==null?void 0:r0.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r0,e0)=>{this._handleTokenChanged(r0,"CLIENT",e0==null?void 0:e0.access_token)})}_handleTokenChanged(r0,e0,n0){(r0==="TOKEN_REFRESHED"||r0==="SIGNED_IN")&&this.changedAccessToken!==n0?(this.changedAccessToken=n0,this.realtime.setAuth(n0)):r0==="SIGNED_OUT"&&(this.realtime.setAuth(),e0=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const createClient=(r0,e0,n0)=>new SupabaseClient(r0,e0,n0);function shouldShowDeprecationWarning(){if(typeof window<"u")return!1;const r0=globalThis.process;if(!r0)return!1;const e0=r0.version;if(e0==null)return!1;const n0=e0.match(/^v(\d+)\./);return n0?parseInt(n0[1],10)<=18:!1}shouldShowDeprecationWarning()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function brokeredPreviewStorage(){var x0,g0;if(typeof window>"u")return;const r0=location.hostname,n0=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(y0=>r0===y0||r0.endsWith("."+y0)),a0="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i0=n0?((x0=r0.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+a0+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x0[1])??((g0=r0.match(new RegExp("^("+a0+")(?=[.-])","i")))==null?void 0:g0[1]):void 0,s0=window.parent&&window.parent!==window;if(!i0||!s0)return localStorage;const o0=r0.endsWith(".lovableproject-dev.com")||r0.endsWith(".gpt-eng.com"),l0=o0?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c0=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u0=c0&&l0.test(c0)?[c0]:o0?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d0="lovable-preview-auth:result",h0=2e3,f0=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),p0=(y0,b0,E0)=>new Promise(w0=>{const v0=f0();let S0=!1,k0;const R0=$0=>{S0||(S0=!0,clearTimeout(k0),window.removeEventListener("message",j0),w0($0))},j0=$0=>{if(u0.indexOf($0.origin)<0)return;const T0=$0.data;T0&&T0.type===d0&&T0.requestId===v0&&R0(T0)};window.addEventListener("message",j0);const C0={type:y0,requestId:v0,projectId:i0,key:b0};E0!==void 0&&(C0.value=E0);for(const $0 of u0)window.parent.postMessage(C0,$0);k0=setTimeout(()=>R0(null),h0)});let A0=!0;const m0=250;return{getItem:async y0=>{let b0=await p0("lovable-preview-auth:get",y0);return!b0&&A0&&(await new Promise(E0=>setTimeout(E0,m0)),b0=await p0("lovable-preview-auth:get",y0)),A0=!1,b0&&b0.ok&&typeof b0.value=="string"?b0.value===""?(localStorage.removeItem(y0),null):b0.value:localStorage.getItem(y0)},setItem:(y0,b0)=>(localStorage.setItem(y0,b0),p0("lovable-preview-auth:set",y0,b0).then(()=>{})),removeItem:y0=>(localStorage.removeItem(y0),p0("lovable-preview-auth:remove",y0).then(()=>{}))}}const SUPABASE_URL$7="https://unfpdgrtnhbfxinuktue.supabase.co",SUPABASE_PUBLISHABLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVuZnBkZ3J0bmhiZnhpbnVrdHVlIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg0MDQwMzgsImV4cCI6MjA4Mzk4MDAzOH0.U7qammBRJ_U9D6mDC_9lB0nmV848dKbCB-qh99UiNag",supabase=createClient(SUPABASE_URL$7,SUPABASE_PUBLISHABLE_KEY,{auth:{storage:brokeredPreviewStorage(),persistSession:!0,autoRefreshToken:!0}});var EXPECTED_MESSAGE_TYPE="authorization_response",DEFAULT_OAUTH_BROKER_U
575RL="/~oauth/initiate",DEFAULT_SUPPORTED_OAUTH_ORIGINS=["https://oauth.lovable.app","https://lovable.dev"],DEFAULT_MOBILE_DEEP_LINK_REDIRECT_URI="lovable://oauth-callback",DEFAULT_DESKTOP_LOCALHOST_REDIRECT_URI="http://127.0.0.1/iframe-oauth/callback",POPUP_CHECK_INTERVAL_MS=500,IFRAME_FALLBACK_TIMEOUT_MS=12e4;function startWebMessageListener(r0){let e0;const n0=new Promise(s0=>{e0=s0}),a0=s0=>{if(!r0.some(c0=>s0.origin===c0))return;const l0=s0.data;!l0||typeof l0!="object"||l0.type===EXPECTED_MESSAGE_TYPE&&e0(l0.response)},i0=()=>{window.removeEventListener("message",a0)};return window.addEventListener("message",a0),{cleanup:i0,messagePromise:n0}}function getPopupDimensions(r0){const e0=window.screenX!==0||window.screenY!==0||!r0,n0=e0?window.outerWidth*.5:window.screen.width*.5,a0=e0?window.outerHeight*.5:window.screen.height*.5,i0=e0?window.screenX+(window.outerWidth-n0)/2:(window.screen.width-n0)/2,s0=e0?window.screenY+(window.outerHeight-a0)/2:(window.screen.height-a0)/2;return{width:n0,height:a0,left:i0,top:s0}}function processOAuthResponse(r0,e0){return r0.state!==e0?{error:new Error("State is invalid")}:r0.error?r0.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(r0.error_description??"Sign in failed")}:!r0.access_token||!r0.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:r0.access_token,refresh_token:r0.refresh_token},error:null}}function isDevice(){const r0=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(r0)||/Macintosh/i.test(r0)&&navigator.maxTouchPoints>1)}function generateState(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(r0=>r0.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function createAuth(r0={}){const e0=r0.oauthBrokerUrl??DEFAULT_OAUTH_BROKER_URL,n0=r0.supportedOAuthOrigins??DEFAULT_SUPPORTED_OAUTH_ORIGINS;async function a0(i0,s0={}){let o0=!1;try{o0=window.self!==window.top}catch{o0=!0}const l0=navigator.userAgent,c0=/LovableApp\//.test(l0),u0=!c0&&/lovable/i.test(l0),d0=generateState();let h0=s0.redirect_uri??window.location.origin;c0&&o0?h0=DEFAULT_MOBILE_DEEP_LINK_REDIRECT_URI:u0&&o0&&(h0=DEFAULT_DESKTOP_LOCALHOST_REDIRECT_URI);const f0=new URLSearchParams({...s0.extraParams,provider:i0,redirect_uri:h0,state:d0});if(!o0)return window.location.href=`${e0}?${f0.toString()}`,{error:null,redirected:!0};!c0&&!u0&&f0.set("response_mode","web_message");const p0=`${e0}?${f0.toString()}`,A0=u0?[...n0,window.location.origin]:n0,{messagePromise:m0,cleanup:x0}=startWebMessageListener(A0);let g0;if(isDevice())g0=window.open(p0,"_blank");else{const{width:E0,height:w0,left:v0,top:S0}=getPopupDimensions(o0);g0=window.open(p0,"oauth",`width=${E0},height=${w0},left=${v0},top=${S0}`)}if(!g0&&(c0||u0)){let E0;const w0=new Promise((v0,S0)=>{E0=setTimeout(()=>{S0(new Error("OAuth timed out waiting for response"))},IFRAME_FALLBACK_TIMEOUT_MS)});try{const v0=await Promise.race([m0,w0]);return processOAuthResponse(v0,d0)}catch(v0){return{error:v0 instanceof Error?v0:new Error(String(v0))}}finally{E0&&clearTimeout(E0),x0()}}if(!g0)return x0(),{error:new Error("Popup was blocked")};let y0;const b0=new Promise((E0,w0)=>{y0=setInterval(()=>{g0.closed&&(clearInterval(y0),w0(new Error("Sign in was cancelled")))},POPUP_CHECK_INTERVAL_MS)});try{const E0=await Promise.race([m0,b0]);return processOAuthResponse(E0,d0)}catch(E0){return{error:E0 instanceof Error?E0:new Error(String(E0))}}finally{clearInterval(y0),x0(),g0==null||g0.close()}}return{signInWithOAuth:a0}}var package_default={name:"@lovable.dev/cloud-auth-js",version:"1.1.1",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}};typeof window<"u"&&(window.__lovable_cloud_auth_js_version=package_default.version);function createLovableAuth(r0={}){return createAuth(r0)}const lovableAuth=createLovableAuth(),lovable={auth:{signInWithOAuth:async(r0,e0)=>{const n0=await lovableAuth.signInWithOAuth(r0,{redirect_uri:e0==null?void 0:e0.redirect_uri,extraParams:{...e0==null?void 0:e0.extraParams}});if(n0.redirected||n0.error)return n0;try{await supabase.auth.setSession(n0.tokens)}catch(a0){return{error:a0 instanceof Error?a0:new Error(String(a0))}}return n0}}},SUPABASE_URL$6="https://unfpdgrtnhbfxinuktue.supabase.co",AuthContext=reactExports.createContext(void 0),SELECTED_ARCHIVE_KEY="bangerbank_selected_archive";function AuthProvider({children:r0}){const[e0,n0]=reactExports.useState(null),[a0,i0]=reactExports.useState(null),[s0,o0]=reactExports.useState(!0),[l0,c0]=reactExports.useState([]),[u0,d0]=reactExports.useState(null),[h0,f0]=reactExports.useState(!1),[p0,A0]=reactExports.useState(null),[m0,x0]=reactExports.useState(null),g0=reactExports.useCallback(async(T0,I0)=>{try{try{const{data:D0}=await supabase.functions.invoke("claim-roles");if((D0==null?void 0:D0.claimed)>0){console.log(`Claimed ${D0.claimed} placeholder role(s) for ${I0}`);return}}catch(D0){console.error("Error claiming placeholder roles:",D0)}const{data:M0}=await supabase.from("user_roles").select("id").eq("user_id",T0).limit(1);if(M0&&M0.length>0)return;const{data:N0}=await supabase.from("archive_owners").select("id, admin_email").eq("admin_email",I0.toLowerCase());if(N0&&N0.length>0)for(const D0 of N0)await supabase.from("user_roles").insert({user_id:T0,archive_owner_id:D0.id,role:"admin",email:I0.toLowerCase()}),console.log(`Auto-provisioned admin role for ${I0} on archive ${D0.id}`)}catch(M0){console.error("Error auto-provisioning admin role:",M0)}},[]),y0=reactExports.useCallback(async(T0,I0)=>{try{I0&&await g0(T0,I0);const{data:{session:M0}}=await supabase.auth.getSession();if(!(M0!=null&&M0.access_token))return[];const N0=await fetch(`${SUPABASE_URL$6}/functions/v1/auth-verify`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${M0.access_token}`},body:JSON.stringify({action:"archive-access"})});if(!N0.ok)return console.error("Failed to fetch user access:",N0.status),[];const D0=await N0.json();return f0(D0.isSuperAdmin===!0),D0.availableArchives||[]}catch(M0){return console.error("Error fetching user access:",M0),[]}},[g0]),b0=reactExports.useCallback(async(T0,I0,M0)=>{var N0;if(T0.role==="songwriter")try{const{data:D0}=await supabase.from("songwriter_profiles").select("id, display_name").eq("user_id",I0).eq("archive_owner_id",T0.archiveOwnerId).eq("is_active",!0).maybeSingle();A0((D0==null?void 0:D0.id)??null),x0((D0==null?void 0:D0.display_name)??null),
575console.log("[Auth] Songwriter userName set to:",D0==null?void 0:D0.display_name)}catch(D0){console.error("Failed to fetch songwriter profile:",D0),A0(null),x0(null)}else{A0(null);const D0=(M0==null?void 0:M0.full_name)??((N0=M0==null?void 0:M0.email)==null?void 0:N0.split("@")[0])??null;x0(D0),console.log("[Auth] Admin/Viewer userName set to:",D0)}},[]),E0=reactExports.useCallback(async T0=>{if(!(T0!=null&&T0.user)){n0(null),i0(null),c0([]),d0(null),f0(!1),o0(!1);return}n0(T0.user),i0(T0),setTimeout(async()=>{var O0;const I0=T0.user.email,M0=await y0(T0.user.id,I0);c0(M0);const N0=localStorage.getItem(SELECTED_ARCHIVE_KEY);let D0=null;if(M0.length===1)D0=M0[0],d0(M0[0]),localStorage.setItem(SELECTED_ARCHIVE_KEY,M0[0].archiveOwnerId);else if(N0){const B0=M0.find(z0=>z0.archiveOwnerId===N0);B0?(D0=B0,d0(B0)):M0.length>0&&(D0=M0[0],d0(M0[0]),localStorage.setItem(SELECTED_ARCHIVE_KEY,M0[0].archiveOwnerId))}else M0.length>0&&(D0=M0[0],d0(M0[0]),localStorage.setItem(SELECTED_ARCHIVE_KEY,M0[0].archiveOwnerId));D0&&await b0(D0,T0.user.id,{full_name:(O0=T0.user.user_metadata)==null?void 0:O0.full_name,email:T0.user.email}),o0(!1)},0)},[y0,b0]);reactExports.useEffect(()=>{const{data:{subscription:T0}}=supabase.auth.onAuthStateChange((I0,M0)=>{i0(M0),n0((M0==null?void 0:M0.user)??null),I0==="SIGNED_OUT"&&(c0([]),d0(null),f0(!1),A0(null),x0(null),localStorage.removeItem(SELECTED_ARCHIVE_KEY),o0(!1)),I0==="SIGNED_IN"&&M0&&E0(M0)});return supabase.auth.getSession().then(({data:{session:I0}})=>{E0(I0)}),()=>T0.unsubscribe()},[E0]);const w0=async()=>{try{const T0=await lovable.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});return T0!=null&&T0.error?{error:T0.error.message||"Failed to sign in with Google"}:{}}catch(T0){return console.error("Google sign in error:",T0),{error:"Failed to sign in with Google"}}},v0=async()=>{try{await supabase.auth.signOut(),n0(null),i0(null),c0([]),d0(null),f0(!1),localStorage.removeItem(SELECTED_ARCHIVE_KEY)}catch(T0){console.error("Sign out error:",T0)}},S0=async T0=>{var M0;const I0=l0.find(N0=>N0.archiveOwnerId===T0);I0&&e0&&(d0(I0),localStorage.setItem(SELECTED_ARCHIVE_KEY,T0),await b0(I0,e0.id,{full_name:(M0=e0.user_metadata)==null?void 0:M0.full_name,email:e0.email}))},k0=async()=>{if(e0){const T0=await y0(e0.id);if(c0(T0),u0){const I0=T0.find(M0=>M0.archiveOwnerId===u0.archiveOwnerId);I0?d0(I0):T0.length>0?(d0(T0[0]),localStorage.setItem(SELECTED_ARCHIVE_KEY,T0[0].archiveOwnerId)):(d0(null),localStorage.removeItem(SELECTED_ARCHIVE_KEY))}}},R0=!!a0&&!!e0,j0=(u0==null?void 0:u0.role)??null,C0=(u0==null?void 0:u0.archiveOwnerId)??null,$0=(u0==null?void 0:u0.archiveDisplayName)??null;return jsxRuntimeExports.jsx(AuthContext.Provider,{value:{user:e0,session:a0,isAuthenticated:R0,isLoading:s0,currentArchive:u0,availableArchives:l0,role:j0,ownerId:C0,ownerName:$0,userName:m0,isSuperAdmin:h0,songwriterProfileId:p0,signInWithGoogle:w0,signOut:v0,switchArchive:S0,refreshAccess:k0},children:r0})}function useAuth(){const r0=reactExports.useContext(AuthContext);if(r0===void 0)throw new Error("useAuth must be used within an AuthProvider");return r0}const PitchPlaylistsContext=reactExports.createContext(null);function openPitchPlayer(r0){window.open(`${window.location.origin}/pitch/${r0}`,"_blank","noopener,noreferrer")}function PitchPlaylistsProvider({ownerId:r0,children:e0}){const[n0,a0]=reactExports.useState([]),[i0,s0]=reactExports.useState(!0),o0=reactExports.useCallback(async()=>{if(!r0){a0([]),s0(!1);return}s0(!0);const{data:p0,error:A0}=await supabase.functions.invoke("pitch-links",{body:{action:"list",ownerId:r0}});A0&&ue$2.error("Could not load A&R playlists"),a0((p0==null?void 0:p0.pitches)??[]),s0(!1)},[r0]);reactExports.useEffect(()=>{o0()},[o0]);const l0=reactExports.useCallback(async p0=>{if(!r0||!p0.trim())return null;const{data:A0,error:m0}=await supabase.functions.invoke("pitch-links",{body:{action:"create-playlist",ownerId:r0,name:p0.trim()}});if(m0||!(A0!=null&&A0.pitch))return ue$2.error("Could not create playlist"),null;const x0=A0.pitch;return a0(g0=>[{song_ids:[],...x0},...g0.filter(y0=>y0.id!==x0.id)]),ue$2.success("Playlist created"),o0(),x0},[o0,r0]),c0=reactExports.useCallback(async(p0,A0)=>{if(p0.delivery_status!=="draft")return ue$2.error("Sent playlists are locked. Duplicate it in Pitches to edit."),!1;const m0=A0.filter(y0=>!p0.song_ids.includes(y0));if(!m0.length)return ue$2.info("That song is already in the playlist"),!1;const{data:x0,error:g0}=await supabase.functions.invoke("pitch-links",{body:{action:"append-songs",id:p0.id,songIds:m0}});
575return g0||!(x0!=null&&x0.pitch)?(ue$2.error("Could not add songs to playlist"),!1):(a0(y0=>y0.map(b0=>b0.id===p0.id?{...b0,song_ids:x0.pitch.song_ids}:b0)),ue$2.success(`${m0.length===1?"Song":`${m0.length} songs`} added to ${p0.name}`),!0)},[]),u0=reactExports.useCallback(async p0=>{const{data:A0,error:m0}=await supabase.functions.invoke("pitch-links",{body:{action:"delete",id:p0.id}}),g0=(m0&&typeof m0=="object"&&"context"in m0&&m0.context instanceof Response?m0.context.status:null)===404;return m0&&!g0||!m0&&!(A0!=null&&A0.success)?(ue$2.error((A0==null?void 0:A0.error)||"Could not delete playlist"),!1):(a0(y0=>y0.filter(b0=>b0.id!==p0.id)),ue$2.success("Playlist deleted"),!0)},[]),d0=reactExports.useCallback(async(p0,A0)=>{const m0=A0.trim();if(!m0||m0===p0.name)return!0;const{data:x0,error:g0}=await supabase.functions.invoke("pitch-links",{body:{action:"rename",id:p0.id,name:m0}});return g0||!(x0!=null&&x0.success)?(ue$2.error((x0==null?void 0:x0.error)||"Could not rename playlist"),!1):(a0(y0=>y0.map(b0=>b0.id===p0.id?{...b0,name:m0}:b0)),ue$2.success("Playlist renamed"),!0)},[]),h0=reactExports.useCallback(async p0=>{const{error:A0}=await supabase.functions.invoke("pitch-links",{body:{action:"duplicate",id:p0.id}});return A0?(ue$2.error("Could not duplicate pitch"),!1):(ue$2.success("Reusable draft created"),await o0(),!0)},[o0]),f0=reactExports.useMemo(()=>({playlists:n0,isLoading:i0,createPlaylist:l0,addSongs:c0,deletePlaylist:u0,renamePlaylist:d0,duplicatePlaylist:h0,refetch:o0}),[n0,i0,l0,c0,u0,d0,h0,o0]);return jsxRuntimeExports.jsx(PitchPlaylistsContext.Provider,{value:f0,children:e0})}function usePitchPlaylists(){const r0=reactExports.useContext(PitchPlaylistsContext);if(!r0)throw new Error("usePitchPlaylists must be used inside PitchPlaylistsProvider");return r0}const buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({className:r0,variant:e0,size:n0,asChild:a0=!1,...i0},s0)=>{const o0=a0?Slot$4:"button";return jsxRuntimeExports.jsx(o0,{className:cn$1(buttonVariants({variant:e0,size:n0,className:r0})),ref:s0,...i0})});Button.displayName="Button";var count=0;function useFocusGuards(){reactExports.useEffect(()=>{const r0=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r0[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",r0[1]??createFocusGuard()),count++,()=>{count===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e0=>e0.remove()),count--}},[])}function createFocusGuard(){const r0=document.createElement("span");return r0.setAttribute("data-radix-focus-guard",""),r0.tabIndex=0,r0.style.outline="none",r0.style.opacity="0",r0.style.position="fixed",r0.style.pointerEvents="none",r0}var AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS$1={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=reactExports.forwardRef((r0,e0)=>{const{loop:n0=!1,trapped:a0=!1,onMountAutoFocus:i0,onUnmountAutoFocus:s0,...o0}=r0,[l0,c0]=reactExports.useState(null),u0=useCallbackRef$2(i0),d0=useCallbackRef$2(s0),h0=reactExports.useRef(null),f0=useComposedRefs$1(e0,m0=>c0(m0)),p0=reactExports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;reactExports.useEffect(()=>{if(a0){let m0=function(b0){if(p0.paused||!l0)return;const E0=b0.target;l0.contains(E0)?h0.current=E0:focus(h0.current,{select:!0})},x0=function(b0){if(p0.paused||!l0)return;const E0=b0.relatedTarget;E0!==null&&(l0.contains(E0)||focus(h0.current,{select:!0}))},g0=function(b0){if(document.activeElement===document.body)for(const w0 of b0)w0.removedNodes.length>0&&focus(l0)};document.addEventListener("focusin",m0),document.addEventListener("focusout",x0);const y0=new MutationObserver(g0);return l0&&y0.observe(l0,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m0),document.removeEventListener("focusout",x0),y0.disconnect()}}},[a0,l0,p0.paused]),reactExports.useEffect(()=>{if(l0){focusScopesStack.add(p0);const m0=document.activeElement;if(!l0.contains(m0)){const g0=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS$1);l0.addEventListener(AUTOFOCUS_ON_MOUNT,u0),l0.dispatchEvent(g0),g0.defaultPrevented||(focusFirst$2(removeLinks(getTabbableCandidates(l0)),{select:!0}),document.activeElement===m0&&focus(l0))}return()=>{l0.removeEventListener(AUTOFOCUS_ON_MOUNT,u0),setTimeout(()=>{const g0=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS$1);l0.addEventListener(AUTOFOCUS_ON_UNMOUNT,d0),l0.dispatchEvent(g0),g0.defaultPrevented||focus(m0??document.body,{select:!0}),l0.removeEventListener(AUTOFOCUS_ON_UNMOUNT,d0),focusScopesStack.remove(p0)},0)}}},[l0,u0,d0,p0]);const A0=reactExports.useCallback(m0=>{if(!n0&&!a0||p0.paused)return;const x0=m0.key==="Tab"&&!m0.altKey&&!m0.ctrlKey&&!m0.metaKey,g0=document.activeElement;if(x0&&g0){const y0=m0.currentTarget,[b0,E0]=getTabbableEdges(y0);b0&&E0?!m0.shiftKey&&g0===E0?(m0.preventDefault(),n0&&focus(b0,{select:!0})):m0.shiftKey&&g0===b0&&(m0.preventDefault(),n0&&focus(E0,{select:!0})):g0===y0&&m0.preventDefault()}},[n0,a0,p0.paused]);return jsxRuntimeExports.jsx(Primitive.div,{tabIndex:-1,...o0,ref:f0,onKeyDown:A0})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst$2(r0,{select:e0=!1}={}){const n0=document.activeElement;for(const a0 of r0)if(focus(a0,{select:e0}),document.activeElement!==n0)return}function getTabbableEdges(r0){const e0=getTabbableCandidates(r0),n0=findVisible(e0,r0),a0=findVisible(e0.reverse(),r0);return[n0,a0]}function getTabbableCandidates(r0){const e0=[],n0=document.createTreeWalker(r0,NodeFilter.SHOW_ELEMENT,{acceptNode:a0=>{const i0=a0.tagName==="INPUT"&&a0.type==="hidden";return a0.disabled||a0.hidden||i0?NodeFilter.FILTER_SKIP:a0.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n0.nextNode();)e0.push(n0.currentNode);return e0}function findVisible(r0,e0){for(const n0 of r0)if(!isHidden(n0,{upTo:e0}))return n0}function isHidden(r0,{upTo:e0}
vendor: 4,467 bytes, line 575
575){if(getComputedStyle(r0).visibility==="hidden")return!0;for(;r0;){if(e0!==void 0&&r0===e0)return!1;if(getComputedStyle(r0).display==="none")return!0;r0=r0.parentElement}return!1}function isSelectableInput(r0){return r0 instanceof HTMLInputElement&&"select"in r0}function focus(r0,{select:e0=!1}={}){if(r0&&r0.focus){const n0=document.activeElement;r0.focus({preventScroll:!0}),r0!==n0&&isSelectableInput(r0)&&e0&&r0.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let r0=[];return{add(e0){const n0=r0[0];e0!==n0&&(n0==null||n0.pause()),r0=arrayRemove(r0,e0),r0.unshift(e0)},remove(e0){var n0;r0=arrayRemove(r0,e0),(n0=r0[0])==null||n0.resume()}}}function arrayRemove(r0,e0){const n0=[...r0],a0=n0.indexOf(e0);return a0!==-1&&n0.splice(a0,1),n0}function removeLinks(r0){return r0.filter(e0=>e0.tagName!=="A")}var getDefaultParent=function(r0){if(typeof document>"u")return null;var e0=Array.isArray(r0)?r0[0]:r0;return e0.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(r0){return r0&&(r0.host||unwrapHost(r0.parentNode))},correctTargets=function(r0,e0){return e0.map(function(n0){if(r0.contains(n0))return n0;var a0=unwrapHost(n0);return a0&&r0.contains(a0)?a0:(console.error("aria-hidden",n0,"in not contained inside",r0,". Doing nothing"),null)}).filter(function(n0){return!!n0})},applyAttributeToOthers=function(r0,e0,n0,a0){var i0=correctTargets(e0,Array.isArray(r0)?r0:[r0]);markerMap[n0]||(markerMap[n0]=new WeakMap);var s0=markerMap[n0],o0=[],l0=new Set,c0=new Set(i0),u0=function(h0){!h0||l0.has(h0)||(l0.add(h0),u0(h0.parentNode))};i0.forEach(u0);var d0=function(h0){!h0||c0.has(h0)||Array.prototype.forEach.call(h0.children,function(f0){if(l0.has(f0))d0(f0);else try{var p0=f0.getAttribute(a0),A0=p0!==null&&p0!=="false",m0=(counterMap.get(f0)||0)+1,x0=(s0.get(f0)||0)+1;counterMap.set(f0,m0),s0.set(f0,x0),o0.push(f0),m0===1&&A0&&uncontrolledNodes.set(f0,!0),x0===1&&f0.setAttribute(n0,"true"),A0||f0.setAttribute(a0,"true")}catch(g0){console.error("aria-hidden: cannot operate on ",f0,g0)}})};return d0(e0),l0.clear(),lockCount++,function(){o0.forEach(function(h0){var f0=counterMap.get(h0)-1,p0=s0.get(h0)-1;counterMap.set(h0,f0),s0.set(h0,p0),f0||(uncontrolledNodes.has(h0)||h0.removeAttribute(a0),uncontrolledNodes.delete(h0)),p0||h0.removeAttribute(n0)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(r0,e0,n0){n0===void 0&&(n0="data-aria-hidden");var a0=Array.from(Array.isArray(r0)?r0:[r0]),i0=getDefaultParent(r0);return i0?(a0.push.apply(a0,Array.from(i0.querySelectorAll("[aria-live]"))),applyAttributeToOthers(a0,i0,n0,"aria-hidden")):function(){return null}},zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(r0,e0){return typeof r0=="function"?r0(e0):r0&&(r0.current=e0),r0}function useCallbackRef$1(r0,e0){var n0=reactExports.useState(function(){return{value:r0,callback:e0,facade:{get current(){return n0.value},set current(a0){var i0=n0.value;i0!==a0&&(n0.value=a0,n0.callback(a0,i0))}}}})[0];return n0.callback=e0,n0.facade}var useIsomorphicLayoutEffect$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,currentValues=new WeakMap;function useMergeRefs(r0,e0){var n0=useCallbackRef$1(null,function(a0){return r0.forEach(function(i0){return assignRef(i0,a0)})});return useIsomorphicLayoutEffect$1(function(){var a0=currentValues.get(n0);if(a0){var i0=new Set(a0),s0=new Set(r0),o0=n0.current;i0.forEach(function(l0){s0.has(l0)||assignRef(l0,null)}),s0.forEach(function(l0){i0.has(l0)||assignRef(l0,o0)})}currentValues.set(n0,r0)},[r0]),n0}function ItoI(r0){return r0}function innerCreateMedium(r0,e0){e0===void 0&&(e0=ItoI);var n0=[],a0=!1,i0={read:function(){if(a0)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n0.length?n0[n0.length-1]:r0},useMedium:function(s0){var o0=e0(s0,a0);return n0.push(o0),function(){n0=n0.filter(function(l0){return l0!==o0})}},assignSyncMedium:function(s0){for(a0=!0;n0.length;){var o0=n0;n0=[],o0.forEach(s0)}n0={push:function(l0){return s0(l0)},filter:function(){return n0}}},assignMedium:function(s0){a0=!0;var o0=[];if(n0.length){var l0=n0;
vendor: 4,399 bytes, lines 575-590
575n0=[],l0.forEach(s0),o0=n0}var c0=function(){var d0=o0;o0=[],d0.forEach(s0)},u0=function(){return Promise.resolve().then(c0)};u0(),n0={push:function(d0){o0.push(d0),u0()},filter:function(d0){return o0=o0.filter(d0),n0}}}};return i0}function createSidecarMedium(r0){r0===void 0&&(r0={});var e0=innerCreateMedium(null);return e0.options=__assign({async:!0,ssr:!1},r0),e0}var SideCar$1=function(r0){var e0=r0.sideCar,n0=__rest(r0,["sideCar"]);if(!e0)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a0=e0.read();if(!a0)throw new Error("Sidecar medium not found");return reactExports.createElement(a0,__assign({},n0))};SideCar$1.isSideCarExport=!0;function exportSidecar(r0,e0){return r0.useMedium(e0),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=reactExports.forwardRef(function(r0,e0){var n0=reactExports.useRef(null),a0=reactExports.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),i0=a0[0],s0=a0[1],o0=r0.forwardProps,l0=r0.children,c0=r0.className,u0=r0.removeScrollBar,d0=r0.enabled,h0=r0.shards,f0=r0.sideCar,p0=r0.noRelative,A0=r0.noIsolation,m0=r0.inert,x0=r0.allowPinchZoom,g0=r0.as,y0=g0===void 0?"div":g0,b0=r0.gapMode,E0=__rest(r0,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w0=f0,v0=useMergeRefs([n0,e0]),S0=__assign(__assign({},E0),i0);return reactExports.createElement(reactExports.Fragment,null,d0&&reactExports.createElement(w0,{sideCar:effectCar,removeScrollBar:u0,shards:h0,noRelative:p0,noIsolation:A0,inert:m0,setCallbacks:s0,allowPinchZoom:!!x0,lockRef:n0,gapMode:b0}),o0?reactExports.cloneElement(reactExports.Children.only(l0),__assign(__assign({},S0),{ref:v0})):reactExports.createElement(y0,__assign({},S0,{className:c0,ref:v0}),l0))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var r0=document.createElement("style");r0.type="text/css";var e0=getNonce();return e0&&r0.setAttribute("nonce",e0),r0}function injectStyles(r0,e0){r0.styleSheet?r0.styleSheet.cssText=e0:r0.appendChild(document.createTextNode(e0))}function insertStyleTag(r0){var e0=document.head||document.getElementsByTagName("head")[0];e0.appendChild(r0)}var stylesheetSingleton=function(){var r0=0,e0=null;return{add:function(n0){r0==0&&(e0=makeStyleTag())&&(injectStyles(e0,n0),insertStyleTag(e0)),r0++},remove:function(){r0--,!r0&&e0&&(e0.parentNode&&e0.parentNode.removeChild(e0),e0=null)}}},styleHookSingleton=function(){var r0=stylesheetSingleton();return function(e0,n0){reactExports.useEffect(function(){return r0.add(e0),function(){r0.remove()}},[e0&&n0])}},styleSingleton=function(){var r0=styleHookSingleton(),e0=function(n0){var a0=n0.styles,i0=n0.dynamic;return r0(a0,i0),null};return e0},zeroGap={left:0,top:0,right:0,gap:0},parse$3=function(r0){return parseInt(r0||"",10)||0},getOffset$1=function(r0){var e0=window.getComputedStyle(document.body),n0=e0[r0==="padding"?"paddingLeft":"marginLeft"],a0=e0[r0==="padding"?"paddingTop":"marginTop"],i0=e0[r0==="padding"?"paddingRight":"marginRight"];return[parse$3(n0),parse$3(a0),parse$3(i0)]},getGapWidth=function(r0){if(r0===void 0&&(r0="margin"),typeof window>"u")return zeroGap;var e0=getOffset$1(r0),n0=document.documentElement.clientWidth,a0=window.innerWidth;return{left:e0[0],top:e0[1],right:e0[2],gap:Math.max(0,a0-n0+e0[2]-e0[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(r0,e0,n0,a0){var i0=r0.left,s0=r0.top,o0=r0.right,l0=r0.gap;return n0===void 0&&(n0="margin"),` 576 .`.concat(noScrollbarsClassName,` { 577 overflow: hidden `).concat(a0,`; 578 padding-right: `).concat(l0,"px ").concat(a0,`; 579 } 580 body[`).concat(lockAttribute,`] { 581 overflow: hidden `).concat(a0,`; 582 overscroll-behavior: contain; 583 `).concat([e0&&"position: relative ".concat(a0,";"),n0==="margin"&&` 584 padding-left: `.concat(i0,`px; 585 padding-top: `).concat(s0,`px; 586 padding-right: `).concat(o0,`px; 587 margin-left:0; 588 margin-top:0; 589 margin-right: `).concat(l0,"px ").concat(a0,`; 590 `),n0==="padding"&&"padding-right: ".concat(l0,"px ").concat(a0,";
590")].filter(Boolean).join(""),` 591 } 592 593 .`).concat(zeroRightClassName,` { 594 right: `).concat(l0,"px ").concat(a0,`; 595 } 596 597 .`).concat(fullWidthClassName,` { 598 margin-right: `).concat(l0,"px ").concat(a0,`; 599 } 600 601 .`).concat(zeroRightClassName," .").concat(zeroRightClassName,` { 602 right: 0 `).concat(a0,`; 603 } 604 605 .`).concat(fullWidthClassName," .").concat(fullWidthClassName,` { 606 margin-right: 0 `).concat(a0,`; 607 } 608 609 body[`).concat(lockAttribute,`] { 610 `).concat(removedBarSizeVariable,": ").concat(l0,`px; 611 } 612`)},getCurrentUseCounter=function(){var r0=parseInt(document.body.getAttribute(lockAttribute)||"0",10);return isFinite(r0)?r0:0},useLockAttribute=function(){reactExports.useEffect(function(){return document.body.setAttribute(lockAttribute,(getCurrentUseCounter()+1).toString()),function(){var r0=getCurrentUseCounter()-1;r0<=0?document.body.removeAttribute(lockAttribute):document.body.setAttribute(lockAttribute,r0.toString())}},[])},RemoveScrollBar=function(r0){var e0=r0.noRelative,n0=r0.noImportant,a0=r0.gapMode,i0=a0===void 0?"margin":a0;useLockAttribute();var s0=reactExports.useMemo(function(){return getGapWidth(i0)},[i0]);return reactExports.createElement(Style,{styles:getStyles(s0,!e0,i0,n0?"":"!important")})},passiveSupported=!1;if(typeof window<"u")try{var options=Object.defineProperty({},"passive",{get:function(){return passiveSupported=!0,!0}});window.addEventListener("test",options,options),window.removeEventListener("test",options,options)}catch{passiveSupported=!1}var nonPassive=passiveSupported?{passive:!1}:!1,alwaysContainsScroll=function(r0){return r0.tagName==="TEXTAREA"},elementCanBeScrolled=function(r0,e0){if(!(r0 instanceof Element))return!1;var n0=window.getComputedStyle(r0);return n0[e0]!=="hidden"&&!(n0.overflowY===n0.overflowX&&!alwaysContainsScroll(r0)&&n0[e0]==="visible")},elementCouldBeVScrolled=function(r0){return elementCanBeScrolled(r0,"overflowY")},elementCouldBeHScrolled=function(r0){return elementCanBeScrolled(r0,"overflowX")},locationCouldBeScrolled=function(r0,e0){var n0=e0.ownerDocument,a0=e0;do{typeof ShadowRoot<"u"&&a0 instanceof ShadowRoot&&(a0=a0.host);var i0=elementCouldBeScrolled(r0,a0);if(i0){var s0=getScrollVariables(r0,a0),o0=s0[1],l0=s0[2];if(o0>l0)return!0}a0=a0.parentNode}while(a0&&a0!==n0.body);return!1},getVScrollVariables=function(r0){var e0=r0.scrollTop,n0=r0.scrollHeight,a0=r0.clientHeight;return[e0,n0,a0]},getHScrollVariables=function(r0){var e0=r0.scrollLeft,n0=r0.scrollWidth,a0=r0.clientWidth;return[e0,n0,a0]},elementCouldBeScrolled=function(r0,e0){return r0==="v"?elementCouldBeVScrolled(e0):elementCouldBeHScrolled(e0)},getScrollVariables=function(r0,e0){return r0==="v"?getVScrollVariables(e0):getHScrollVariables(e0)},getDirectionFactor=function(r0,e0){return r0==="h"&&e0==="rtl"?-1:1},handleScroll=function(r0,e0,n0,a0,i0){var s0=getDirectionFactor(r0,window.getComputedStyle(e0).direction),o0=s0*a0,l0=n0.target,c0=e0.contains(l0),u0=!1,d0=o0>0,h0=0,f0=0;do{if(!l0)break;var p0=getScrollVariables(r0,l0),A0=p0[0],m0=p0[1],x0=p0[2],g0=m0-x0-s0*A0;(A0||g0)&&elementCouldBeScrolled(r0,l0)&&(h0+=g0,f0+=A0);var y0=l0.parentNode;l0=y0&&y0.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y0.host:y0}while(!c0&&l0!==document.body||c0&&(e0.contains(l0)||e0===l0));return(d0&&(Math.abs(h0)<1||!i0)||!d0&&(Math.abs(f0)<1||!i0))&&(u0=!0),u0},getTouchXY=function(r0){return"changedTouches"in r0?[r0.changedTouches[0].clientX,r0.changedTouches[0].clientY]:[0,0]},getDeltaXY=function(r0){return[r0.deltaX,r0.deltaY]},extractRef=function(r0){return r0&&"current"in r0?r0.current:r0},deltaCompare=function(r0,e0){return r0[0]===e0[0]&&r0[1]===e0[1]},generateStyle=function(r0){return` 613 .block-interactivity-`.concat(r0,` {pointer-events: none;} 614 .allow-interactivity-`).concat(r0,` {pointer-events: all;} 615`)},idCounter$1=0,lockStack=[];function RemoveScrollSideCar(r0){var e0=reactExports.useRef([]),n0=reactExports.useRef([0,0]),a0=reactExports.useRef(),i0=reactExports.useState(idCounter$1++)[0],s0=reactExports.useState(styleSingleton)[0],o0=reactExports.useRef(r0);reactExports.useEffect(function(){o0.current=r0},[r0]),reactExports.useEffect(function(){if(r0.inert){document.body.classList.add("block-interactivity-".concat(i0));var m0=__spreadArray([r0.lockRef.current],(r0.shards||[]).map(extractRef),!0).filter(
vendor: 35,155 bytes, line 615
615Boolean);return m0.forEach(function(x0){return x0.classList.add("allow-interactivity-".concat(i0))}),function(){document.body.classList.remove("block-interactivity-".concat(i0)),m0.forEach(function(x0){return x0.classList.remove("allow-interactivity-".concat(i0))})}}},[r0.inert,r0.lockRef.current,r0.shards]);var l0=reactExports.useCallback(function(m0,x0){if("touches"in m0&&m0.touches.length===2||m0.type==="wheel"&&m0.ctrlKey)return!o0.current.allowPinchZoom;var g0=getTouchXY(m0),y0=n0.current,b0="deltaX"in m0?m0.deltaX:y0[0]-g0[0],E0="deltaY"in m0?m0.deltaY:y0[1]-g0[1],w0,v0=m0.target,S0=Math.abs(b0)>Math.abs(E0)?"h":"v";if("touches"in m0&&S0==="h"&&v0.type==="range")return!1;var k0=locationCouldBeScrolled(S0,v0);if(!k0)return!0;if(k0?w0=S0:(w0=S0==="v"?"h":"v",k0=locationCouldBeScrolled(S0,v0)),!k0)return!1;if(!a0.current&&"changedTouches"in m0&&(b0||E0)&&(a0.current=w0),!w0)return!0;var R0=a0.current||w0;return handleScroll(R0,x0,m0,R0==="h"?b0:E0,!0)},[]),c0=reactExports.useCallback(function(m0){var x0=m0;if(!(!lockStack.length||lockStack[lockStack.length-1]!==s0)){var g0="deltaY"in x0?getDeltaXY(x0):getTouchXY(x0),y0=e0.current.filter(function(w0){return w0.name===x0.type&&(w0.target===x0.target||x0.target===w0.shadowParent)&&deltaCompare(w0.delta,g0)})[0];if(y0&&y0.should){x0.cancelable&&x0.preventDefault();return}if(!y0){var b0=(o0.current.shards||[]).map(extractRef).filter(Boolean).filter(function(w0){return w0.contains(x0.target)}),E0=b0.length>0?l0(x0,b0[0]):!o0.current.noIsolation;E0&&x0.cancelable&&x0.preventDefault()}}},[]),u0=reactExports.useCallback(function(m0,x0,g0,y0){var b0={name:m0,delta:x0,target:g0,should:y0,shadowParent:getOutermostShadowParent(g0)};e0.current.push(b0),setTimeout(function(){e0.current=e0.current.filter(function(E0){return E0!==b0})},1)},[]),d0=reactExports.useCallback(function(m0){n0.current=getTouchXY(m0),a0.current=void 0},[]),h0=reactExports.useCallback(function(m0){u0(m0.type,getDeltaXY(m0),m0.target,l0(m0,r0.lockRef.current))},[]),f0=reactExports.useCallback(function(m0){u0(m0.type,getTouchXY(m0),m0.target,l0(m0,r0.lockRef.current))},[]);reactExports.useEffect(function(){return lockStack.push(s0),r0.setCallbacks({onScrollCapture:h0,onWheelCapture:h0,onTouchMoveCapture:f0}),document.addEventListener("wheel",c0,nonPassive),document.addEventListener("touchmove",c0,nonPassive),document.addEventListener("touchstart",d0,nonPassive),function(){lockStack=lockStack.filter(function(m0){return m0!==s0}),document.removeEventListener("wheel",c0,nonPassive),document.removeEventListener("touchmove",c0,nonPassive),document.removeEventListener("touchstart",d0,nonPassive)}},[]);var p0=r0.removeScrollBar,A0=r0.inert;return reactExports.createElement(reactExports.Fragment,null,A0?reactExports.createElement(s0,{styles:generateStyle(i0)}):null,p0?reactExports.createElement(RemoveScrollBar,{noRelative:r0.noRelative,gapMode:r0.gapMode}):null)}function getOutermostShadowParent(r0){for(var e0=null;r0!==null;)r0 instanceof ShadowRoot&&(e0=r0.host,r0=r0.host),r0=r0.parentNode;return e0}const SideCar=exportSidecar(effectCar,RemoveScrollSideCar);var ReactRemoveScroll=reactExports.forwardRef(function(r0,e0){return reactExports.createElement(RemoveScroll,__assign({},r0,{ref:e0,sideCar:SideCar}))});ReactRemoveScroll.classNames=RemoveScroll.classNames;var POPOVER_NAME="Popover",[createPopoverContext,createPopoverScope]=createContextScope(POPOVER_NAME,[createPopperScope]),usePopperScope$2=createPopperScope(),[PopoverProvider,usePopoverContext]=createPopoverContext(POPOVER_NAME),Popover$1=r0=>{const{__scopePopover:e0,children:n0,open:a0,defaultOpen:i0,onOpenChange:s0,modal:o0=!1}=r0,l0=usePopperScope$2(e0),c0=reactExports.useRef(null),[u0,d0]=reactExports.useState(!1),[h0,f0]=useControllableState$1({prop:a0,defaultProp:i0??!1,onChange:s0,caller:POPOVER_NAME});return jsxRuntimeExports.jsx(Root2$5,{...l0,children:jsxRuntimeExports.jsx(PopoverProvider,{scope:e0,contentId:useId(),triggerRef:c0,open:h0,onOpenChange:f0,onOpenToggle:reactExports.useCallback(()=>f0(p0=>!p0),[f0]),hasCustomAnchor:u0,onCustomAnchorAdd:reactExports.useCallback(()=>d0(!0),[]),onCustomAnchorRemove:reactExports.useCallback(()=>d0(!1),[]),modal:o0,children:n0})})};Popover$1.displayName=POPOVER_NAME;var ANCHOR_NAME$1="PopoverAnchor",PopoverAnchor=reactExports.forwardRef((r0,e0)=>{const{__scopePopover:n0,...a0}=r0,i0=usePopoverContext(ANCHOR_NAME$1,n0),s0=usePopperScope$2(n0),{onCustomAnchorAdd:o0,onCustomAnchorRemove:l0}=i0;return reactExports.useEffect(()=>(o0(),()=>l0()),[o0,l0]),jsxRuntimeExports.jsx(Anchor,{...s0,...a0,ref:e0})});PopoverAnchor.displayName=ANCHOR_NAME$1;var TRIGGER_NAME$7="PopoverTrigger",PopoverTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopePopover:n0,...a0}=r0,i0=usePopoverContext(TRIGGER_NAME$7,n0),s0=usePopperScope$2(n0),o0=useComposedRefs$1(e0,i0.triggerRef),l0=jsxRuntimeExports.jsx(Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i0.open,"aria-controls":i0.contentId,"data-state":getState$4(i0.open),...a0,ref:o0,onClick:composeEventHandlers(r0.onClick,i0.onOpenToggle)});return i0.hasCustomAnchor?l0:jsxRuntimeExports.jsx(Anchor,{asChild:!0,...s0,children:l0})});PopoverTrigger$1.displayName=TRIGGER_NAME$7;var PORTAL_NAME$5="PopoverPortal",[PortalProvider$2,usePortalContext$2]=createPopoverContext(PORTAL_NAME$5,{forceMount:void 0}),PopoverPortal=r0=>{const{__scopePopover:e0,forceMount:n0,children:a0,container:i0}=r0,s0=usePopoverContext(PORTAL_NAME$5,e0);return jsxRuntimeExports.jsx(PortalProvider$2,{scope:e0,forceMount:n0,children:jsxRuntimeExports.jsx(Presence,{present:n0||s0.open,children:jsxRuntimeExports.jsx(Portal$5,{asChild:!0,container:i0,children:a0})})})};PopoverPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$7="PopoverContent",PopoverContent$1=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext$2(CONTENT_NAME$7,r0.__scopePopover),{forceMount:a0=n0.forceMount,...i0}=r0,s0=usePopoverContext(CONTENT_NAME$7,r0.__scopePopover);return jsxRuntimeExports.jsx(Presence,{present:a0||s0.open,children:s0.modal?jsxRuntimeExports.jsx(PopoverContentModal,{...i0,ref:e0}):jsxRuntimeExports.jsx(PopoverContentNonModal,{...i0,ref:e0})})});PopoverContent$1.displayName=CONTENT_NAME$7;var Slot$3=createSlot("PopoverContent.RemoveScroll"),PopoverContentModal=reactExports.forwardRef((r0,e0)=>{const n0=usePopoverContext(CONTENT_NAME$7,r0.__scopePopover),a0=reactExports.useRef(null),i0=useComposedRefs$1(e0,a0),s0=reactExports.useRef(!1);return reactExports.useEffect(()=>{const o0=a0.current;if(o0)return hideOthers(o0)},[]),jsxRuntimeExports.jsx(ReactRemoveScroll,{as:Slot$3,allowPinchZoom:!0,children:jsxRuntimeExports.jsx(PopoverContentImpl,{...r0,ref:i0,trapFocus:n0.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers(r0.onCloseAutoFocus,o0=>{var l0;o0.preventDefault(),s0.current||(l0=n0.triggerRef.current)==null||l0.focus()}),onPointerDownOutside:composeEventHandlers(r0.onPointerDownOutside,o0=>{const l0=o0.detail.originalEvent,c0=l0.button===0&&l0.ctrlKey===!0,u0=l0.button===2||c0;s0.current=u0},{checkForDefaultPrevented:!1}),onFocusOutside:composeEventHandlers(r0.onFocusOutside,o0=>o0.preventDefault(),{checkForDefaultPrevented:!1})})})}),PopoverContentNonModal=reactExports.forwardRef((r0,e0)=>{const n0=usePopoverContext(CONTENT_NAME$7,r0.__scopePopover),a0=reactExports.useRef(!1),i0=reactExports.useRef(!1);return jsxRuntimeExports.jsx(PopoverContentImpl,{...r0,ref:e0,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s0=>{var o0,l0;(o0=r0.onCloseAutoFocus)==null||o0.call(r0,s0),s0.defaultPrevented||(a0.current||(l0=n0.triggerRef.current)==null||l0.focus(),s0.preventDefault()),a0.current=!1,i0.current=!1},onInteractOutside:s0=>{var c0,u0;(c0=r0.onInteractOutside)==null||c0.call(r0,s0),s0.defaultPrevented||(a0.current=!0,s0.detail.originalEvent.type==="pointerdown"&&(i0.current=!0));const o0=s0.target;((u0=n0.triggerRef.current)==null?void 0:u0.contains(o0))&&s0.preventDefault(),s0.detail.originalEvent.type==="focusin"&&i0.current&&s0.preventDefault()}})}),PopoverContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopePopover:n0,trapFocus:a0,onOpenAutoFocus:i0,onCloseAutoFocus:s0,disableOutsidePointerEvents:o0,onEscapeKeyDown:l0,onPointerDownOutside:c0,onFocusOutside:u0,onInteractOutside:d0,...h0}=r0,f0=usePopoverContext(CONTENT_NAME$7,n0),p0=usePopperScope$2(n0);return useFocusGuards(),jsxRuntimeExports.jsx(FocusScope,{asChild:!0,loop:!0,trapped:a0,onMountAutoFocus:i0,onUnmountAutoFocus:s0,children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:o0,onInteractOutside:d0,onEscapeKeyDown:l0,onPointerDownOutside:c0,onFocusOutside:u0,onDismiss:()=>f0.onOpenChange(!1),children:jsxRuntimeExports.jsx(Content$3,{"data-state":getState$4(f0.open),role:"dialog",id:f0.contentId,...p0,...h0,ref:e0,style:{...h0.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),CLOSE_NAME$1="PopoverClose",PopoverClose=reactExports.forwardRef((r0,e0)=>{const{__scopePopover:n0,...a0}=r0,i0=usePopoverContext(CLOSE_NAME$1,n0);return jsxRuntimeExports.jsx(Primitive.button,{type:"button",...a0,ref:e0,onClick:composeEventHandlers(r0.onClick,()=>i0.onOpenChange(!1))})});PopoverClose.displayName=CLOSE_NAME$1;var ARROW_NAME$3="PopoverArrow",PopoverArrow=reactExports.forwardRef((r0,e0)=>{const{__scopePopover:n0,...a0}=r0,i0=usePopperScope$2(n0);return jsxRuntimeExports.jsx(Arrow,{...i0,...a0,ref:e0})});PopoverArrow.displayName=ARROW_NAME$3;function getState$4(r0){return r0?"open":"closed"}var Root2$4=Popover$1,Trigger$4=PopoverTrigger$1,Portal$4=PopoverPortal,Content2$4=PopoverContent$1;const Popover=Root2$4,PopoverTrigger=Trigger$4,PopoverContent=reactExports.forwardRef(({className:r0,align:e0="center",sideOffset:n0=4,...a0},i0)=>jsxRuntimeExports.jsx(Portal$4,{children:jsxRuntimeExports.jsx(Content2$4,{ref:i0,align:e0,sideOffset:n0,className:cn$1("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r0),...a0})}));PopoverContent.displayName=Content2$4.displayName;var DirectionContext=reactExports.createContext(void 0);function useDirection(r0){const e0=reactExports.useContext(DirectionContext);return r0||e0||"ltr"}function clamp(r0,[e0,n0]){return Math.min(n0,Math.max(e0,r0))}function useStateMachine(r0,e0){return reactExports.useReducer((n0,a0)=>e0[n0][a0]??n0,r0)}var SCROLL_AREA_NAME="ScrollArea",[createScrollAreaContext,createScrollAreaScope]=createContextScope(SCROLL_AREA_NAME),[ScrollAreaProvider,useScrollAreaContext]=createScrollAreaContext(SCROLL_AREA_NAME),ScrollArea$1=reactExports.forwardRef((r0,e0)=>{const{__scopeScrollArea:n0,type:a0="hover",dir:i0,scrollHideDelay:s0=600,...o0}=r0,[l0,c0]=reactExports.useState(null),[u0,d0]=reactExports.useState(null),[h0,f0]=reactExports.useState(null),[p0,A0]=reactExports.useState(null),[m0,x0]=reactExports.useState(null),[g0,y0]=reactExports.useState(0),[b0,E0]=reactExports.useState(0),[w0,v0]=reactExports.useState(!1),[S0,k0]=reactExports.useState(!1),R0=useComposedRefs$1(e0,C0=>c0(C0)),j0=useDirection(i0);return jsxRuntimeExports.jsx(ScrollAreaProvider,{scope:n0,type:a0,dir:j0,scrollHideDelay:s0,scrollArea:l0,viewport:u0,onViewportChange:d0,content:h0,onContentChange:f0,scrollbarX:p0,onScrollbarXChange:A0,scrollbarXEnabled:w0,onScrollbarXEnabledChange:v0,scrollbarY:m0,onScrollbarYChange:x0,scrollbarYEnabled:S0,onScrollbarYEnabledChange:k0,onCornerWidthChange:y0,onCornerHeightChange:E0,children:jsxRuntimeExports.jsx(Primitive.div,{dir:j0,...o0,ref:R0,style:{position:"relative","--radix-scroll-area-corner-width":g0+"px","--radix-scroll-area-corner-height":b0+"px",...r0.style}})})});ScrollArea$1.displayName=SCROLL_AREA_NAME;var VIEWPORT_NAME$1="ScrollAreaViewport",ScrollAreaViewport=reactExports.forwardRef((r0,e0)=>{const{__scopeScrollArea:n0,children:a0,nonce:i0,...s0}=r0,o0=useScrollAreaContext(VIEWPORT_NAME$1,n0),l0=reactExports.useRef(null),c0=useComposedRefs$1(e0,l0,o0.onViewportChange);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i0}),jsxRuntimeExports.jsx(Primitive.div,{"data-radix-scroll-area-viewport":"",...s0,ref:c0,style:{overflowX:o0.scrollbarXEnabled?"scroll":"hidden",overflowY:o0.scrollbarYEnabled?"scroll":"hidden",...r0.style},children:jsxRuntimeExports.jsx("div",{ref:o0.onContentChange,style:{minWidth:"100%",display:"table"},children:a0})})]})});ScrollAreaViewport.displayName=VIEWPORT_NAME$1;var SCROLLBAR_NAME="ScrollAreaScrollbar",ScrollAreaScrollbar=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,...a0}=r0,i0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),{onScrollbarXEnabledChange:s0,onScrollbarYEnabledChange:o0}=i0,l0=r0.orientation==="horizontal";return reactExports.useEffect(()=>(l0?s0(!0):o0(!0),()=>{l0?s0(!1):o0(!1)}),[l0,s0,o0]),i0.type==="hover"?jsxRuntimeExports.jsx(ScrollAreaScrollbarHover,{...a0,ref:e0,forceMount:n0}):i0.type==="scroll"?jsxRuntimeExports.jsx(ScrollAreaScrollbarScroll,{...a0,ref:e0,forceMount:n0}):i0.type==="auto"?jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{...a0,ref:e0,forceMount:n0}):i0.type==="always"?jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{...a0,ref:e0}):null});ScrollAreaScrollbar.displayName=SCROLLBAR_NAME;var ScrollAreaScrollbarHover=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,...a0}=r0,i0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),[s0,o0]=reactExports.useState(!1);return reactExports.useEffect(()=>{const l0=i0.scrollArea;let c0=0;if(l0){const u0=()=>{window.clearTimeout(c0),o0(!0)},d0=()=>{c0=window.setTimeout(()=>o0(!1),i0.scrollHideDelay)};return l0.addEventListener("pointerenter",u0),l0.addEventListener("pointerleave",d0),()=>{window.clearTimeout(c0),l0.removeEventListener("pointerenter",u0),l0.removeEventListener("pointerleave",d0)}}},[i0.scrollArea,i0.scrollHideDelay]),jsxRuntimeExports.jsx(Presence,{present:n0||s0,children:jsxRuntimeExports.jsx(ScrollAreaScrollbarAuto,{"data-state":s0?"visible":"hidden",...a0,ref:e0})})}),ScrollAreaScrollbarScroll=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,...a0}=r0,i0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),s0=r0.orientation==="horizontal",o0=useDebounceCallback(()=>c0("SCROLL_END"),100),[l0,c0]=useStateMachine("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return reactExports.useEffect(()=>{if(l0==="idle"){const u0=window.setTimeout(()=>c0("HIDE"),i0.scrollHideDelay);return()=>window.clearTimeout(u0)}},[l0,i0.scrollHideDelay,c0]),reactExports.useEffect(()=>{const u0=i0.viewport,d0=s0?"scrollLeft":"scrollTop";if(u0){let h0=u0[d0];const f0=()=>{const p0=u0[d0];h0!==p0&&(c0("SCROLL"),o0()),h0=p0};return u0.addEventListener("scroll",f0),()=>u0.removeEventListener("scroll",f0)}},[i0.viewport,s0,c0,o0]),jsxRuntimeExports.jsx(Presence,{present:n0||l0!=="hidden",children:jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":l0==="hidden"?"hidden":"visible",...a0,ref:e0,onPointerEnter:composeEventHandlers(r0.onPointerEnter,()=>c0("POINTER_ENTER")),onPointerLeave:composeEventHandlers(r0.onPointerLeave,()=>c0("POINTER_LEAVE"))})})}),ScrollAreaScrollbarAuto=reactExports.forwardRef((r0,e0)=>{const n0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),{forceMount:a0,...i0}=r0,[s0,o0]=reactExports.useState(!1),l0=r0.orientation==="horizontal",c0=useDebounceCallback(()=>{if(n0.viewport){const u0=n0.viewport.offsetWidth<n0.viewport.scrollWidth,d0=n0.viewport.offsetHeight<n0.viewport.scrollHeight;o0(l0?u0:d0)}},10);return useResizeObserver(n0.viewport,c0),useResizeObserver(n0.content,c0),jsxRuntimeExports.jsx(Presence,{present:a0||s0,children:jsxRuntimeExports.jsx(ScrollAreaScrollbarVisible,{"data-state":s0?"visible":"hidden",...i0,ref:e0})})}),ScrollAreaScrollbarVisible=reactExports.forwardRef((r0,e0)=>{const{orientation:n0="vertical",...a0}=r0,i0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),s0=reactExports.useRef(null),o0=reactExports.useRef(0),[l0,c0]=reactExports.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u0=getThumbRatio(l0.viewport,l0.content),d0={...a0,sizes:l0,onSizesChange:c0,hasThumb:u0>0&&u0<1,onThumbChange:f0=>s0.current=f0,onThumbPointerUp:()=>o0.current=0,onThumbPointerDown:f0=>o0.current=f0};function h0(f0,p0){return getScrollPositionFromPointer(f0,o0.current,l0,p0)}return n0==="horizontal"?jsxRuntimeExports.jsx(ScrollAreaScrollbarX,{...d0,ref:e0,onThumbPositionChange:()=>{if(i0.viewport&&s0.current){const f0=i0.viewport.scrollLeft,p0=getThumbOffsetFromScroll(f0,l0,i0.dir);s0.current.style.transform=`translate3d(${p0}px, 0, 0)`}},onWheelScroll:f0=>{i0.viewport&&(i0.viewport.scrollLeft=f0)},onDragScroll:f0=>{i0.viewport&&(i0.viewport.scrollLeft=h0(f0,i0.dir))}}):n0==="vertical"?jsxRuntimeExports.jsx(ScrollAreaScrollbarY,{...d0,ref:e0,onThumbPositionChange:()=>{if(i0.viewport&&s0.current){const f0=i0.viewport.scrollTop,p0=getThumbOffsetFromScroll(f0,l0);s0.current.style.transform=`translate3d(0, ${p0}px, 0)`}},onWheelScroll:f0=>{i0.viewport&&(i0.viewport.scrollTop=f0)},onDragScroll:f0=>{i0.viewport&&(i0.viewport.scrollTop=h0(f0))}}):null}),ScrollAreaScrollbarX=reactExports.forwardRef((r0,e0)=>{const{sizes:n0,onSizesChange:a0,...i0}=r0,s0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),[o0,l0]=reactExports.useState(),c0=reactExports.useRef(null),u0=useComposedRefs$1(e0,c0,s0.onScrollbarXChange);return reactExports.useEffect(()=>{c0.current&&l0(getComputedStyle(c0.current))},[c0]),jsxRuntimeExports.jsx(ScrollAreaScrollbarImpl,{"data-orientation":"horizontal",...i0,ref:u0,sizes:n0,style:{bottom:0,left:s0.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s0.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":getThumbSize(n0)+"px",...r0.style},onThumbPointerDown:d0=>r0.onThumbPointerDown(d0.x),onDragScroll:d0=>r0.onDragScroll(d0.x),onWheelScroll:(d0,h0)=>{if(s0.viewport){const f0=s0.viewport.scrollLeft+d0.deltaX;r0.onWheelScroll(f0),isScrollingWithinScrollbarBounds(f0,h0)&&d0.preventDefault()}},onResize:()=>{c0.current&&s0.viewport&&o0&&a0({content:s0.viewport.scrollWidth,viewport:s0.viewport.offsetWidth,scrollbar:{size:c0.current.clientWidth,paddingStart:toInt(o0.paddingLeft),paddingEnd:toInt(o0.paddingRight)}})}})}),ScrollAreaScrollbarY=reactExports.forwardRef((r0,e0)=>{const{sizes:n0,onSizesChange:a0,...i0}=r0,s0=useScrollAreaContext(SCROLLBAR_NAME,r0.__scopeScrollArea),[o0,l0]=reactExports.useState(),c0=reactExports.useRef(null),u0=useComposedRefs$1(e0,c0,s0.onScrollbarYChange);return reactExports.useEffect(()=>{c0.current&&l0(getComputedStyle(c0.current))},[c0]),jsxRuntimeExports.jsx(ScrollAreaScrollbarImpl,{"data-orientation":"vertical",...i0,ref:u0,sizes:n0,style:{top:0,right:s0.dir==="ltr"?0:void 0,left:s0.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":getThumbSize(n0)+"px",...r0.style},onThumbPointerDown:d0=>r0.onThumbPointerDown(d0.y),onDragScroll:d0=>r0.onDragScroll(d0.y),onWheelScroll:(d0,h0)=>{if(s0.viewport){const f0=s0.viewport.scrollTop+d0.deltaY;r0.onWheelScroll(f0),isScrollingWithinScrollbarBounds(f0,h0)&&d0.preventDefault()}},onResize:()=>{c0.current&&s0.viewport&&o0&&a0({content:s0.viewport.scrollHeight,viewport:s0.viewport.offsetHeight,scrollbar:{size:c0.current.clientHeight,paddingStart:toInt(o0.paddingTop),paddingEnd:toInt(o0.paddingBottom)}})}})}),[ScrollbarProvider,useScrollbarContext]=createScrollAreaContext(SCROLLBAR_NAME),ScrollAreaScrollbarImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeScrollArea:n0,sizes:a0,hasThumb:i0,onThumbChange:s0,onThumbPointerUp:o0,onThumbPointerDown:l0,onThumbPositionChange:c0,onDragScroll:u0,onWheelScroll:d0,onResize:h0,...f0}=r0,p0=useScrollAreaContext(SCROLLBAR_NAME,n0),[A0,m0]=reactExports.useState(null),x0=useComposedRefs$1(e0,R0=>m0(R0)),g0=reactExports.useRef(null),y0=reactExports.useRef(""),b0=p0.viewport,E0=a0.content-a0.viewport,w0=useCallbackRef$2(d0),v0=useCallbackRef$2(c0),S0=useDebounceCallback(h0,10);function k0(R0){if(g0.current){const j0=R0.clientX-g0.current.left,C0=R0.clientY-g0.current.top;u0({x:j0,y:C0})}}return reactExports.useEffect(()=>{const R0=j0=>{const C0=j0.target;(A0==null?void 0:A0.contains(C0))&&w0(j0,E0)};return document.addEventListener("wheel",R0,{passive:!1}),()=>document.removeEventListener("wheel",R0,{passive:!1})},[b0,A0,E0,w0]),reactExports.useEffect(v0,[a0,v0]),useResizeObserver(A0,S0),useResizeObserver(p0.content,S0),jsxRuntimeExports.jsx(ScrollbarProvider,{scope:n0,scrollbar:A0,hasThumb:i0,onThumbChange:useCallbackRef$2(s0),onThumbPointerUp:useCallbackRef$2(o0),onThumbPositionChange:v0,onThumbPointerDown:useCallbackRef$2(l0),children:jsxRuntimeExports.jsx(Primitive.div,{...f0,ref:x0,style:{position:"absolute",...f0.style},onPointerDown:composeEventHandlers(r0.onPointerDown,R0=>{R0.button===0&&(R0.target.setPointerCapture(R0.pointerId),g0.current=A0.getBoundingClientRect(),y0.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p0.viewport&&(p0.viewport.style.scrollBehavior="auto"),k0(R0))}),onPointerMove:composeEventHandlers(r0.onPointerMove,k0),onPointerUp:composeEventHandlers(r0.onPointerUp,R0=>{const j0=R0.target;j0.hasPointerCapture(R0.pointerId)&&j0.releasePointerCapture(R0.pointerId),document.body.style.webkitUserSelect=y0.current,p0.viewport&&(p0.viewport.style.scrollBehavior=""),g0.current=null})})})}),THUMB_NAME$2="ScrollAreaThumb",ScrollAreaThumb=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,...a0}=r0,i0=useScrollbarContext(THUMB_NAME$2,r0.__scopeScrollArea);return jsxRuntimeExports.jsx(Presence,{present:n0||i0.hasThumb,children:jsxRuntimeExports.jsx(ScrollAreaThumbImpl,{ref:e0,...a0})})}),ScrollAreaThumbImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeScrollArea:n0,style:a0,...i0}=r0,s0=useScrollAreaContext(THUMB_NAME$2,n0),o0=useScrollbarContext(THUMB_NAME$2,n0),{onThumbPositionChange:l0}=o0,c0=useComposedRefs$1(e0,h0=>o0.onThumbChange(h0)),u0=reactExports.useRef(void 0),d0=useDebounceCallback(()=>{u0.current&&(u0.current(),u0.current=void 0)},100);return reactExports.useEffect(()=>{const h0=s0.viewport;if(h0){const f0=()=>{if(d0(),!u0.current){const p0=addUnlinkedScrollListener(h0,l0);u0.current=p0,l0()}};return l0(),h0.addEventListener("scroll",f0),()=>h0.removeEventListener("scroll",f0)}},[s0.viewport,d0,l0]),jsxRuntimeExports.jsx(Primitive.div,{"data-state":o0.hasThumb?"visible":"hidden",...i0,ref:c0,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a0},onPointerDownCapture:composeEventHandlers(r0.onPointerDownCapture,h0=>{const p0=h0.target.getBoundingClientRect(),A0=h0.clientX-p0.left,m0=h0.clientY-p0.top;o0.onThumbPointerDown({x:A0,y:m0})}),onPointerUp:composeEventHandlers(r0.onPointerUp,o0.onThumbPointerUp)})});ScrollAreaThumb.displayName=THUMB_NAME$2;var CORNER_NAME="ScrollAreaCorner",ScrollAreaCorner=reactExports.forwardRef((r0,e0)=>{const n0=useScrollAreaContext(CORNER_NAME,r0.__scopeScrollArea),a0=!!(n0.scrollbarX&&n0.scrollbarY);return n0.type!=="scroll"&&a0?jsxRuntimeExports.jsx(ScrollAreaCornerImpl,{...r0,ref:e0}):null});ScrollAreaCorner.displayName=CORNER_NAME;var ScrollAreaCornerImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeScrollArea:n0,...a0}=r0,i0=useScrollAreaContext(CORNER_NAME,n0),[s0,o0]=reactExports.useState(0),[l0,c0]=reactExports.useState(0),u0=!!(s0&&l0);return useResizeObserver(i0.scrollbarX,()=>{var h0;const d0=((h0=i0.scrollbarX)==null?void 0:h0.offsetHeight)||0;i0.onCornerHeightChange(d0),c0(d0)}),useResizeObserver(i0.scrollbarY,()=>{var h0;const d0=((h0=i0.scrollbarY)==null?void 0:h0.offsetWidth)||0;i0.onCornerWidthChange(d0),o0(d0)}),u0?jsxRuntimeExports.jsx(Primitive.div,{...a0,ref:e0,style:{width:s0,height:l0,position:"absolute",right:i0.dir==="ltr"?0:void 0,left:i0.dir==="rtl"?0:void 0,bottom:0,...r0.style}}):null});function toInt(r0){return r0?parseInt(r0,10):0}function getThumbRatio(r0,e0){const n0=r0/e0;return isNaN(n0)?0:n0}function getThumbSize(r0){const e0=getThumbRatio(r0.viewport,r0.content),n0=r0.scrollbar.paddingStart+r0.scrollbar.paddingEnd,a0=(r0.scrollbar.size-n0)*e0;return Math.max(a0,18)}function getScrollPositionFromPointer(r0,e0,n0,a0="ltr"){const i0=getThumbSize(n0),s0=i0/2,o0=e0||s0,l0=i0-o0,c0=n0.scrollbar.paddingStart+o0,u0=n0.scrollbar.size-n0.scrollbar.paddingEnd-l0,d0=n0.content-n0.viewport,h0=a0==="ltr"?[0,d0]:[d0*-1,0];return linearScale$1([c0,u0],h0)(r0)}function getThumbOffsetFromScroll(r0,e0,n0="ltr"){const a0=getThumbSize(e0),i0=e0.scrollbar.paddingStart+e0.scrollbar.paddingEnd,s0=e0.scrollbar.size-i0,o0=e0.content-e0.viewport,l0=s0-a0,c0=n0==="ltr"?[0,o0]:[o0*-1,0],u0=clamp(r0,c0);return linearScale$1([0,o0],[0,l0])(u0)}function linearScale$1(r0,e0){return n0=>{if(r0[0]===r0[1]||e0[0]===e0[1])return e0[0];const a0=(e0[1]-e0[0])/(r0[1]-r0[0]);return e0[0]+a0*(n0-r0[0])}}function isScrollingWithinScrollbarBounds(r0,e0){return r0>0&&r0<e0}var addUnlinkedScrollListener=(r0,e0=()=>{})=>{let n0={left:r0.scrollLeft,top:r0.scrollTop},a0=0;return function i0(){const s0={left:r0.scrollLeft,top:r0.scrollTop},o0=n0.left!==s0.left,l0=n0.top!==s0.top;(o0||l0)&&e0(),n0=s0,a0=window.requestAnimationFrame(i0)}(),()=>window.cancelAnimationFrame(a0)};function useDebounceCallback(r0,e0){const n0=useCallbackRef$2(r0),a0=reactExports.useRef(0);return reactExports.useEffect(()=>()=>window.clearTimeout(a0.current),[]),reactExports.useCallback(()=>{window.clearTimeout(a0.current),a0.current=window.setTimeout(n0,e0)},[n0,e0])}function useResizeObserver(r0,e0){const n0=useCallbackRef$2(e0);useLayoutEffect2(()=>{let a0=0;if(r0){const i0=new ResizeObserver(()=>{cancelAnimationFrame(a0),a0=window.requestAnimationFrame(n0)});return i0.observe(r0),()=>{window.cancelAnimationFrame(a0),i0.unobserve(r0)}}},[r0,n0])}var Root$a=ScrollArea$1,Viewport$1=ScrollAreaViewport,Corner=ScrollAreaCorner;const ScrollArea=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(Root$a,{ref:a0,className:cn$1("relative overflow-hidden",r0),...n0,children:[jsxRuntimeExports.jsx(Viewport$1,{className:"h-full w-full rounded-[inherit]",children:e0}),jsxRuntimeExports.jsx(ScrollBar,{}),jsxRuntimeExports.jsx(Corner,{})]}));ScrollArea.displayName=Root$a.displayName;const ScrollBar=reactExports.forwardRef(({className:r0,orientation:e0="vertical",...n0},a0)=>jsxRuntimeExports.jsx(ScrollAreaScrollbar,{ref:a0,orientation:e0,className:cn$1("flex touch-none select-none transition-colors",e0==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e0==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r0),...n0,children:jsxRuntimeExports.jsx(ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ScrollBar.displayName=ScrollAreaScrollbar.displayName;function toDate(r0){const e0=Object.prototype.toString.call(r0);return r0 instanceof Date||typeof r0=="object"&&e0==="[object Date]"?new r0.constructor(+r0):typeof r0=="number"||e0==="[object Number]"||typeof r0=="string"||e0==="[object String]"?new Date(r0):new Date(NaN)}function constructFrom(r0,e0){return r0 instanceof Date?new r0.constructor(e0):new Date(e0)}function addDays(r0,e0){const n0=toDate(r0);return isNaN(e0)?constructFrom(r0,NaN):(n0.setDate(n0.getDate()+e0),n0)}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,minutesInMonth=43200,minutesInDay=1440;let defaultOptions={};function getDefaultOptions(){return defaultOptions}function startOfWeek(r0,e0){var l0,c0,u0,d0;const n0=getDefaultOptions(),a0=(e0==null?void 0:e0.weekStartsOn)??((c0=(l0=e0==null?void 0:e0.locale)==null?void 0:l0.options)==null?void 0:c0.weekStartsOn)??n0.weekStartsOn??((d0=(u0=n0.locale)==null?void 0:u0.options)==null?void 0:d0.weekStartsOn)??0,i0=toDate(r0),s0=i0.getDay(),o0=(s0<a0?7:0)+s0-a0;return i0.setDate(i0.getDate()-o0),i0.setHours(0,0,0,0),i0}function startOfISOWeek(r0){return startOfWeek(r0,{weekStartsOn:1})}function getISOWeekYear(r0){const e0=toDate(r0),n0=e0.getFullYear(),a0=constructFrom(r0,0);a0.setFullYear(n0+1,0,4),a0.setHours(0,0,0,0);const i0=startOfISOWeek(a0),s0=constructFrom(r0,0);s0.setFullYear(n0,0,4),s0.setHours(0,0,0,0);const o0=startOfISOWeek(s0);return e0.getTime()>=i0.getTime()?n0+1:e0.getTime()>=o0.getTime()?n0:n0-1}function startOfDay(r0){const e0=toDate(r0);return e0.setHours(0,0,0,0),e0}function getTimezoneOffsetInMilliseconds(r0){const e0=toDate(r0),n0=new Date(Date.UTC(e0.getFullYear(),e0.getMonth(),e0.getDate(),e0.getHours(),e0.getMinutes(),e0.getSeconds(),e0.getMilliseconds()));return n0.setUTCFullYear(e0.getFullYear()),+r0-+n0}function differenceInCalendarDays(r0,e0){const n0=startOfDay(r0),a0=startOfDay(e0),i0=+n0-getTimezoneOffsetInMilliseconds(n0),s0=+a0-getTimezoneOffsetInMilliseconds(a0);return Math.round((i0-s0)/millisecondsInDay)}function startOfISOWeekYear(r0){const e0=getISOWeekYear(r0),n0=constructFrom(r0,0);return n0.setFullYear(e0,0,4),n0.setHours(0,0,0,0),startOfISOWeek(n0)}function compareAsc(r0,e0){const n0=toDate(r0),a0=toDate(e0),i0=n0.getTime()-a0.getTime();return i0<0?-1:i0>0?1:i0}function constructNow(r0){return constructFrom(r0,Date.now())}function isSameDay(r0,e0){const n0=startOfDay(r0),a0=startOfDay(e0);return+n0==+a0}function isDate(r0){return r0 instanceof Date||typeof r0=="object"&&Object.prototype.toString.call(r0)==="[object Date]"}function isValid(r0){if(!isDate(r0)&&typeof r0!="number")return!1;const e0=toDate(r0);return!isNaN(Number(e0))}function differenceInCalendarMonths(r0,e0){const n0=toDate(r0),a0=toDate(e0),i0=n0.getFullYear()-a0.getFullYear(),s0=n0.getMonth()-a0.getMonth();return i0*12+s0}function getRoundingMethod(r0){return e0=>{const a0=(r0?Math[r0]:Math.trunc)(e0);return a0===0?0:a0}}function differenceInMilliseconds(r0,e0){return+toDate(r0)-+toDate(e0)}function endOfDay(r0){const e0=toDate(r0);return e0.setHours(23,59,59,999),e0}function endOfMonth(r0){const e0=toDate(r0),n0=e0.getMonth();return e0.setFullYear(e0.getFullYear(),n0+1,0),e0.setHours(23,59,59,999),e0}function isLastDayOfMonth(r0){const e0=toDate(r0);return+endOfDay(e0)==+endOfMonth(e0)}function differenceInMonths(r0,e0){const n0=toDate(r0),a0=toDate(e0),i0=compareAsc(n0,a0),s0=Math.abs(differenceInCalendarMonths(n0,a0));let o0;if(s0<1)o0=0;else{n0.getMonth()===1&&n0.getDate()>27&&n0.setDate(30),n0.setMonth(n0.getMonth()-i0*s0);let l0=compareAsc(n0,a0)===-i0;isLastDayOfMonth(toDate(r0))&&s0===1&&compareAsc(r0,a0)===1&&(l0=!1),o0=i0*(s0-Number(l0))}return o0===0?0:o0}function differenceInSeconds(r0,e0,n0){const a0=differenceInMilliseconds(r0,e0)/1e3;return getRoundingMethod(n0==null?void 0:n0.roundingMethod)(a0)}function startOfYear(r0){const e0=toDate(r0),n0=constructFrom(r0,0);return n0.setFullYear(e0.getFullYear(),0,1),n0.setHours(0,0,0,0),n0}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$1=(r0,e0,n0)=>{let a0;const i0=formatDistanceLocale[r0];return typeof i0=="string"?a0=i0:e0===1?a0=i0.one:a0=i0.other.replace("{{count}}",e0.toString()),n0!=null&&n0.addSuffix?n0.comparison&&n0.comparison>0?"in "+a0:a0+" ago":a0};function buildFormatLongFn(r0){return(e0={})=>{const n0=e0.width?String(e0.width):r0.defaultWidth;return r0.formats[n0]||r0.formats[r0.defaultWidth]}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(r0,e0,n0,a0)=>formatRelativeLocale[r0];function buildLocalizeFn(r0){return(e0,n0)=>{const a0=n0!=null&&n0.context?String(n0.context):"standalone";let i0;if(a0==="formatting"&&r0.formattingValues){const o0=r0.defaultFormattingWidth||r0.defaultWidth,l0=n0!=null&&n0.width?String(n0.width):o0;i0=r0.formattingValues[l0]||r0.formattingValues[o0]}else{const o0=r0.defaultWidth,l0=n0!=null&&n0.width?String(n0.width):r0.defaultWidth;i0=r0.values[l0]||r0.values[o0]}const s0=r0.argumentCallback?r0.argumentCallback(e0):e0;return i0[s0]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
615ay","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(r0,e0)=>{const n0=Number(r0),a0=n0%100;if(a0>20||a0<10)switch(a0%10){case 1:return n0+"st";case 2:return n0+"nd";case 3:return n0+"rd"}return n0+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:r0=>r0-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(r0){return(e0,n0={})=>{const a0=n0.width,i0=a0&&r0.matchPatterns[a0]||r0.matchPatterns[r0.defaultMatchWidth],s0=e0.match(i0);if(!s0)return null;const o0=s0[0],l0=a0&&r0.parsePatterns[a0]||r0.parsePatterns[r0.defaultParseWidth],c0=Array.isArray(l0)?findIndex(l0,h0=>h0.test(o0)):findKey(l0,h0=>h0.test(o0));let u0;u0=r0.valueCallback?r0.valueCallback(c0):c0,u0=n0.valueCallback?n0.valueCallback(u0):u0;const d0=e0.slice(o0.length);return{value:u0,rest:d0}}}function findKey(r0,e0){for(const n0 in r0)if(Object.prototype.hasOwnProperty.call(r0,n0)&&e0(r0[n0]))return n0}function findIndex(r0,e0){for(let n0=0;n0<r0.length;n0++)if(e0(r0[n0]))return n0}function buildMatchPatternFn(r0){return(e0,n0={})=>{const a0=e0.match(r0.matchPattern);if(!a0)return null;const i0=a0[0],s0=e0.match(r0.parsePattern);if(!s0)return null;let o0=r0.valueCallback?r0.valueCallback(s0[0]):s0[0];o0=n0.valueCallback?n0.valueCallback(o0):o0;const l0=e0.slice(i0.length);return{value:o0,rest:l0}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:r0=>parseInt(r0,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:r0=>r0+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance:formatDistance$1,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(r0){const e0=toDate(r0);return differenceInCalendarDays(e0,startOfYear(e0))+1}function getISOWeek(r0){const e0=toDate(r0),n0=+startOfISOWeek(e0)-+startOfISOWeekYear(e0);return Math.round(n0/millisecondsInWeek)+1}
vendor: 13,245 bytes, line 615
615function getWeekYear(r0,e0){var d0,h0,f0,p0;const n0=toDate(r0),a0=n0.getFullYear(),i0=getDefaultOptions(),s0=(e0==null?void 0:e0.firstWeekContainsDate)??((h0=(d0=e0==null?void 0:e0.locale)==null?void 0:d0.options)==null?void 0:h0.firstWeekContainsDate)??i0.firstWeekContainsDate??((p0=(f0=i0.locale)==null?void 0:f0.options)==null?void 0:p0.firstWeekContainsDate)??1,o0=constructFrom(r0,0);o0.setFullYear(a0+1,0,s0),o0.setHours(0,0,0,0);const l0=startOfWeek(o0,e0),c0=constructFrom(r0,0);c0.setFullYear(a0,0,s0),c0.setHours(0,0,0,0);const u0=startOfWeek(c0,e0);return n0.getTime()>=l0.getTime()?a0+1:n0.getTime()>=u0.getTime()?a0:a0-1}function startOfWeekYear(r0,e0){var l0,c0,u0,d0;const n0=getDefaultOptions(),a0=(e0==null?void 0:e0.firstWeekContainsDate)??((c0=(l0=e0==null?void 0:e0.locale)==null?void 0:l0.options)==null?void 0:c0.firstWeekContainsDate)??n0.firstWeekContainsDate??((d0=(u0=n0.locale)==null?void 0:u0.options)==null?void 0:d0.firstWeekContainsDate)??1,i0=getWeekYear(r0,e0),s0=constructFrom(r0,0);return s0.setFullYear(i0,0,a0),s0.setHours(0,0,0,0),startOfWeek(s0,e0)}function getWeek(r0,e0){const n0=toDate(r0),a0=+startOfWeek(n0,e0)-+startOfWeekYear(n0,e0);return Math.round(a0/millisecondsInWeek)+1}function addLeadingZeros(r0,e0){const n0=r0<0?"-":"",a0=Math.abs(r0).toString().padStart(e0,"0");return n0+a0}const lightFormatters={y(r0,e0){const n0=r0.getFullYear(),a0=n0>0?n0:1-n0;return addLeadingZeros(e0==="yy"?a0%100:a0,e0.length)},M(r0,e0){const n0=r0.getMonth();return e0==="M"?String(n0+1):addLeadingZeros(n0+1,2)},d(r0,e0){return addLeadingZeros(r0.getDate(),e0.length)},a(r0,e0){const n0=r0.getHours()/12>=1?"pm":"am";switch(e0){case"a":case"aa":return n0.toUpperCase();case"aaa":return n0;case"aaaaa":return n0[0];case"aaaa":default:return n0==="am"?"a.m.":"p.m."}},h(r0,e0){return addLeadingZeros(r0.getHours()%12||12,e0.length)},H(r0,e0){return addLeadingZeros(r0.getHours(),e0.length)},m(r0,e0){return addLeadingZeros(r0.getMinutes(),e0.length)},s(r0,e0){return addLeadingZeros(r0.getSeconds(),e0.length)},S(r0,e0){const n0=e0.length,a0=r0.getMilliseconds(),i0=Math.trunc(a0*Math.pow(10,n0-3));return addLeadingZeros(i0,e0.length)}},dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(r0,e0,n0){const a0=r0.getFullYear()>0?1:0;switch(e0){case"G":case"GG":case"GGG":return n0.era(a0,{width:"abbreviated"});case"GGGGG":return n0.era(a0,{width:"narrow"});case"GGGG":default:return n0.era(a0,{width:"wide"})}},y:function(r0,e0,n0){if(e0==="yo"){const a0=r0.getFullYear(),i0=a0>0?a0:1-a0;return n0.ordinalNumber(i0,{unit:"year"})}return lightFormatters.y(r0,e0)},Y:function(r0,e0,n0,a0){const i0=getWeekYear(r0,a0),s0=i0>0?i0:1-i0;if(e0==="YY"){const o0=s0%100;return addLeadingZeros(o0,2)}return e0==="Yo"?n0.ordinalNumber(s0,{unit:"year"}):addLeadingZeros(s0,e0.length)},R:function(r0,e0){const n0=getISOWeekYear(r0);return addLeadingZeros(n0,e0.length)},u:function(r0,e0){const n0=r0.getFullYear();return addLeadingZeros(n0,e0.length)},Q:function(r0,e0,n0){const a0=Math.ceil((r0.getMonth()+1)/3);switch(e0){case"Q":return String(a0);case"QQ":return addLeadingZeros(a0,2);case"Qo":return n0.ordinalNumber(a0,{unit:"quarter"});case"QQQ":return n0.quarter(a0,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n0.quarter(a0,{width:"narrow",context:"formatting"});case"QQQQ":default:return n0.quarter(a0,{width:"wide",context:"formatting"})}},q:function(r0,e0,n0){const a0=Math.ceil((r0.getMonth()+1)/3);switch(e0){case"q":return String(a0);case"qq":return addLeadingZeros(a0,2);case"qo":return n0.ordinalNumber(a0,{unit:"quarter"});case"qqq":return n0.quarter(a0,{width:"abbreviated",context:"standalone"});case"qqqqq":return n0.quarter(a0,{width:"narrow",context:"standalone"});case"qqqq":default:return n0.quarter(a0,{width:"wide",context:"standalone"})}},M:function(r0,e0,n0){const a0=r0.getMonth();switch(e0){case"M":case"MM":return lightFormatters.M(r0,e0);case"Mo":return n0.ordinalNumber(a0+1,{unit:"month"});case"MMM":return n0.month(a0,{width:"abbreviated",context:"formatting"});case"MMMMM":return n0.month(a0,{width:"narrow",context:"formatting"});case"MMMM":default:return n0.month(a0,{width:"wide",context:"formatting"})}},L:function(r0,e0,n0){const a0=r0.getMonth();switch(e0){case"L":return String(a0+1);case"LL":return addLeadingZeros(a0+1,2);case"Lo":return n0.ordinalNumber(a0+1,{unit:"month"});case"LLL":return n0.month(a0,{width:"abbreviated",context:"standalone"});case"LLLLL":return n0.month(a0,{width:"narrow",context:"standalone"});case"LLLL":default:return n0.month(a0,{width:"wide",context:"standalone"})}},w:function(r0,e0,n0,a0){const i0=getWeek(r0,a0);return e0==="wo"?n0.ordinalNumber(i0,{unit:"week"}):addLeadingZeros(i0,e0.length)},I:function(r0,e0,n0){const a0=getISOWeek(r0);return e0==="Io"?n0.ordinalNumber(a0,{unit:"week"}):addLeadingZeros(a0,e0.length)},d:function(r0,e0,n0){return e0==="do"?n0.ordinalNumber(r0.getDate(),{unit:"date"}):lightFormatters.d(r0,e0)},D:function(r0,e0,n0){const a0=getDayOfYear(r0);return e0==="Do"?n0.ordinalNumber(a0,{unit:"dayOfYear"}):addLeadingZeros(a0,e0.length)},E:function(r0,e0,n0){const a0=r0.getDay();switch(e0){case"E":case"EE":case"EEE":return n0.day(a0,{width:"abbreviated",context:"formatting"});case"EEEEE":return n0.day(a0,{width:"narrow",context:"formatting"});case"EEEEEE":return n0.day(a0,{width:"short",context:"formatting"});case"EEEE":default:return n0.day(a0,{width:"wide",context:"formatting"})}},e:function(r0,e0,n0,a0){const i0=r0.getDay(),s0=(i0-a0.weekStartsOn+8)%7||7;switch(e0){case"e":return String(s0);case"ee":return addLeadingZeros(s0,2);case"eo":return n0.ordinalNumber(s0,{unit:"day"});case"eee":return n0.day(i0,{width:"abbreviated",context:"formatting"});case"eeeee":return n0.day(i0,{width:"narrow",context:"formatting"});case"eeeeee":return n0.day(i0,{width:"short",context:"formatting"});case"eeee":default:return n0.day(i0,{width:"wide",context:"formatting"})}},c:function(r0,e0,n0,a0){const i0=r0.getDay(),s0=(i0-a0.weekStartsOn+8)%7||7;switch(e0){case"c":return String(s0);case"cc":return addLeadingZeros(s0,e0.length);case"co":return n0.ordinalNumber(s0,{unit:"day"});case"ccc":return n0.day(i0,{width:"abbreviated",context:"standalone"});case"ccccc":return n0.day(i0,{width:"narrow",context:"standalone"});case"cccccc":return n0.day(i0,{width:"short",context:"standalone"});case"cccc":default:return n0.day(i0,{width:"wide",context:"standalone"})}},i:function(r0,e0,n0){const a0=r0.getDay(),i0=a0===0?7:a0;switch(e0){case"i":return String(i0);case"ii":return addLeadingZeros(i0,e0.length);case"io":return n0.ordinalNumber(i0,{unit:"day"});case"iii":return n0.day(a0,{width:"abbreviated",context:"formatting"});case"iiiii":return n0.day(a0,{width:"narrow",context:"formatting"});case"iiiiii":return n0.day(a0,{width:"short",context:"formatting"});case"iiii":default:return n0.day(a0,{width:"wide",context:"formatting"})}},a:function(r0,e0,n0){const i0=r0.getHours()/12>=1?"pm":"am";switch(e0){case"a":case"aa":return n0.dayPeriod(i0,{width:"abbreviated",context:"formatting"});case"aaa":return n0.dayPeriod(i0,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n0.dayPeriod(i0,{width:"narrow",context:"formatting"});case"aaaa":default:return n0.dayPeriod(i0,{width:"wide",context:"formatting"})}},b:function(r0,e0,n0){const a0=r0.getHours();let i0;switch(a0===12?i0=dayPeriodEnum.noon:a0===0?i0=dayPeriodEnum.midnight:i0=a0/12>=1?"pm":"am",e0){case"b":case"bb":return n0.dayPeriod(i0,{width:"abbreviated",context:"formatting"});case"bbb":return n0.dayPeriod(i0,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n0.dayPeriod(i0,{width:"narrow",context:"formatting"});case"bbbb":default:return n0.dayPeriod(i0,{width:"wide",context:"formatting"})}},B:function(r0,e0,n0){const a0=r0.getHours();let i0;switch(a0>=17?i0=dayPeriodEnum.evening:a0>=12?i0=dayPeriodEnum.afternoon:a0>=4?i0=dayPeriodEnum.morning:i0=dayPeriodEnum.night,e0){case"B":case"BB":case"BBB":return n0.dayPeriod(i0,{width:"abbreviated",context:"formatting"});case"BBBBB":return n0.dayPeriod(i0,{width:"narrow",context:"formatting"});case"BBBB":default:return n0.dayPeriod(i0,{width:"wide",context:"formatting"})}},h:function(r0,e0,n0){if(e0==="ho"){let a0=r0.getHours()%12;return a0===0&&(a0=12),n0.ordinalNumber(a0,{unit:"hour"})}return lightFormatters.h(r0,e0)},H:function(r0,e0,n0){return e0==="Ho"?n0.ordinalNumber(r0.getHours(),{unit:"hour"}):lightFormatters.H(r0,e0)},K:function(r0,e0,n0){const a0=r0.getHours()%12;return e0==="Ko"?n0.ordinalNumber(a0,{unit:"hour"}):addLeadingZeros(a0,e0.length)},k:function(r0,e0,n0){let a0=r0.getHours();return a0===0&&(a0=24),e0==="ko"?n0.ordinalNumber(a0,{unit:"hour"}):addLeadingZeros(a0,e0.length)},m:function(r0,e0,n0){return e0==="mo"?n0.ordinalNumber(r0.getMinutes(),{unit:"minute"}):lightFormatters.m(r0,e0)},s:function(r0,e0,n0){return e0==="so"?n0.ordinalNumber(r0.getSeconds(),{unit:"second"}):lightFormatters.s(r0,e0)},S:function(r0,e0){return lightFormatters.S(r0,e0)},X:function(r0,e0,n0){const a0=r0.getTimezoneOffset();if(a0===0)return"Z";switch(e0){case"X":return formatTimezoneWithOptionalMinutes(a0);case"XXXX":case"XX":return formatTimezone(a0);case"XXXXX":case"XXX":default:return formatTimezone(a0,":")}},x:function(r0,e0,n0){const a0=r0.getTimezoneOffset();switch(e0){case"x":return formatTimezoneWithOptionalMinutes(a0);case"xxxx":case"xx":return formatTimezone(a0);case"xxxxx":case"xxx":default:return formatTimezone(a0,":")}},O:function(r0,e0,n0){const a0=r0.getTimezoneOffset();switch(e0){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(a0,":");case"OOOO":default:return"GMT"+formatTimezone(a0,":")}},z:function(r0,e0,n0){const a0=r0.getTimezoneOffset();switch(e0){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(a0,":");case"zzzz":default:return"GMT"+formatTimezone(a0,":")}},t:function(r0,e0,n0){const a0=Math.trunc(r0.getTime()/1e3);return addLeadingZeros(a0,e0.length)},T:function(r0,e0,n0){const a0=r0.getTime();return addLeadingZeros(a0,e0.length)}};function formatTimezoneShort(r0,e0=""){const n0=r0>0?"-":"+",a0=Math.abs(r0),i0=Math.trunc(a0/60),s0=a0%60;return s0===0?n0+String(i0):n0+String(i0)+e0+addLeadingZeros(s0,2)}function formatTimezoneWithOptionalMinutes(r0,e0){return r0%60===0?(r0>0?"-":"+")+addLeadingZeros(Math.abs(r0)/60,2):formatTimezone(r0,e0)}function formatTimezone(r0,e0=""){const n0=r0>0?"-":"+",a0=Math.abs(r0),i0=addLeadingZeros(Math.trunc(a0/60),2),s0=addLeadingZeros(a0%60,2);return n0+i0+e0+s0}const dateLongFormatter=(r0,e0)=>{switch(r0){case"P":return e0.date({width:"short"});case"PP":return e0.date({width:"medium"});case"PPP":return e0.date({width:"long"});case"PPPP":default:return e0.date({width:"full"})}},timeLongFormatter=(r0,e0)=>{switch(r0){case"p":return e0.time({width:"short"});case"pp":return e0.time({width:"medium"});case"ppp":return e0.time({width:"long"});case"pppp":default:return e0.time({width:"full"})}},dateTimeLongFormatter=(r0,e0)=>{const n0=r0.match(/(P+)(p+)?/)||[],a0=n0[1],i0=n0[2];if(!i0)return dateLongFormatter(r0,e0);let s0;switch(a0){case"P":s0=e0.dateTime({width:"short"});break;case"PP":s0=e0.dateTime({width:"medium"});break;case"PPP":s0=e0.dateTime({width:"long"});break;case"PPPP":default:s0=e0.dateTime({width:"full"});break}return s0.replace("{{date}}",dateLongFormatter(a0,e0)).replace("{{time}}",timeLongFormatter(i0,e0))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(r0){return dayOfYearTokenRE.test(r0)}function isProtectedWeekYearToken(r0){return weekYearTokenRE.test(r0)}function warnOrThrowProtectedError(r0,e0,n0){const a0=message(r0,e0,n0);if(console.warn(a0),throwTokens.includes(r0))throw new RangeError(a0)}function message(r0,e0,n0){const a0=r0[0]==="Y"?"years":"days of the month";return`Use \`${r0.toLowerCase()}\` instead of \`${r0}\` (in \`${e0}\`) for formatting ${a0} to the input \`${n0}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format$4(r0,e0,n0){var d0,h0,f0,p0;const a0=getDefaultOptions(),i0=a0.locale??enUS,s0=a0.firstWeekContainsDate??((h0=(d0=a0.locale)==null?void 0:d0.options)==null?void 0:h0.firstWeekContainsDate)??1,o0=a0.weekStartsOn??((p0=(f0=a0.locale)==null?void 0:f0.options)==null?void 0:p0.weekStartsOn)??0,l0=toDate(r0);if(!isValid(l0))throw new RangeError("Invalid time value");let c0=e0.match(longFormattingTokensRegExp).map(A0=>{const m0=A0[0];if(m0==="p"||m0==="P"){const x0=longFormatters[m0];return x0(A0,i0.formatLong)}return A0}).join("").match(formattingTokensRegExp).map(A0=>{if(A0==="''")return{isToken:!1,value:"'"};const m0=A0[0];if(m0==="'")return{isToken:!1,value:cleanEscapedString(A0)};if(formatters[m0])return{isToken:!0,value:A0};if(m0.match(unescapedLatinCharacterRegExp))throw new RangeError("Format str
615ing contains an unescaped latin alphabet character `"+m0+"`");return{isToken:!1,value:A0}});i0.localize.preprocessor&&(c0=i0.localize.preprocessor(l0,c0));const u0={firstWeekContainsDate:s0,weekStartsOn:o0,locale:i0};return c0.map(A0=>{if(!A0.isToken)return A0.value;const m0=A0.value;(isProtectedWeekYearToken(m0)||isProtectedDayOfYearToken(m0))&&warnOrThrowProtectedError(m0,e0,String(r0));const x0=formatters[m0[0]];return x0(l0,m0,i0.localize,u0)}).join("")}function cleanEscapedString(r0){const e0=r0.match(escapedStringRegExp);return e0?e0[1].replace(doubleQuoteRegExp,"'"):r0}function formatDistance(r0,e0,n0){const a0=getDefaultOptions(),i0=(n0==null?void 0:n0.locale)??a0.locale??enUS,s0=2520,o0=compareAsc(r0,e0);if(isNaN(o0))throw new RangeError("Invalid time value");const l0=Object.assign({},n0,{addSuffix:n0==null?void 0:n0.addSuffix,comparison:o0});let c0,u0;o0>0?(c0=toDate(e0),u0=toDate(r0)):(c0=toDate(r0),u0=toDate(e0));const d0=differenceInSeconds(u0,c0),h0=(getTimezoneOffsetInMilliseconds(u0)-getTimezoneOffsetInMilliseconds(c0))/1e3,f0=Math.round((d0-h0)/60);let p0;if(f0<2)return n0!=null&&n0.includeSeconds?d0<5?i0.formatDistance("lessThanXSeconds",5,l0):d0<10?i0.formatDistance("lessThanXSeconds",10,l0):d0<20?i0.formatDistance("lessThanXSeconds",20,l0):d0<40?i0.formatDistance("halfAMinute",0,l0):d0<60?i0.formatDistance("lessThanXMinutes",1,l0):i0.formatDistance("xMinutes",1,l0):f0===0?i0.formatDistance("lessThanXMinutes",1,l0):i0.formatDistance("xMinutes",f0,l0);if(f0<45)return i0.formatDistance("xMinutes",f0,l0);if(f0<90)return i0.formatDistance("aboutXHours",1,l0);if(f0<minutesInDay){const A0=Math.round(f0/60);return i0.formatDistance("aboutXHours",A0,l0)}else{if(f0<s0)return i0.formatDistance("xDays",1,l0);if(f0<minutesInMonth){const A0=Math.round(f0/minutesInDay);return i0.formatDistance("xDays",A0,l0)}else if(f0<minutesInMonth*2)return p0=Math.round(f0/minutesInMonth),i0.formatDistance("aboutXMonths",p0,l0)}if(p0=differenceInMonths(u0,c0),p0<12){const A0=Math.round(f0/minutesInMonth);return i0.formatDistance("xMonths",A0,l0)}else{const A0=p0%12,m0=Math.trunc(p0/12);return A0<3?i0.formatDistance("aboutXYears",m0,l0):A0<9?i0.formatDistance("overXYears",m0,l0):i0.formatDistance("almostXYears",m0+1,l0)}}function formatDistanceToNow(r0,e0){return formatDistance(r0,constructNow(r0),e0)}function isToday(r0){return isSameDay(r0,constructNow(r0))}function subDays(r0,e0){return addDays(r0,-e0)}function isYesterday(r0){return isSameDay(r0,subDays(constructNow(r0),1))}function parseISO(r0,e0){const a0=splitDateString(r0);let i0;if(a0.date){const c0=parseYear$1(a0.date,2);i0=parseDate(c0.restDateString,c0.year)}if(!i0||isNaN(i0.getTime()))return new Date(NaN);const s0=i0.getTime();let o0=0,l0;if(a0.time&&(o0=parseTime(a0.time),isNaN(o0)))return new Date(NaN);if(a0.timezone){if(l0=parseTimezone(a0.timezone),isNaN(l0))return new Date(NaN)}else{const c0=new Date(s0+o0),u0=new Date(0);return u0.setFullYear(c0.getUTCFullYear(),c0.getUTCMonth(),c0.getUTCDate()),u0.setHours(c0.getUTCHours(),c0.getUTCMinutes(),c0.getUTCSeconds(),c0.getUTCMilliseconds()),u0}return new Date(s0+o0+l0)}const patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(r0){const e0={},n0=r0.split(patterns.dateTimeDelimiter);let a0;if(n0.length>2)return e0;if(/:/.test(n0[0])?a0=n0[0]:(e0.date=n0[0],a0=n0[1],patterns.timeZoneDelimiter.test(e0.date)&&(e0.date=r0.split(patterns.timeZoneDelimiter)[0],a0=r0.substr(e0.date.length,r0.length))),a0){const i0=patterns.timezone.exec(a0);i0?(e0.time=a0.replace(i0[1],""),e0.timezone=i0[1]):e0.time=a0}return e0}function parseYear$1(r0,e0){const n0=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e0)+"})|(\\d{2}|[+-]\\d{"+(2+e0)+"})$)"),a0=r0.match(n0);if(!a0)return{year:NaN,restDateString:""};const i0=a0[1]?parseInt(a0[1]):null,s0=a0[2]?parseInt(a0[2]):null;return{year:s0===null?i0:s0*100,restDateString:r0.slice((a0[1]||a0[2]).length)}}function parseDate(r0,e0){if(e0===null)return new Date(NaN);const n0=r0.match(dateRegex);if(!n0)return new Date(NaN);const a0=!!n0[4],i0=parseDateUnit(n0[1]),s0=parseDateUnit(n0[2])-1,o0=parseDateUnit(n0[3]),l0=parseDateUnit(n0[4]),c0=parseDateUnit(n0[5])-1;if(a0)return validateWeekDate(e0,l0,c0)?dayOfISOWeekYear(e0,l0,c0):new Date(NaN);{const u0=new Date(0);return!validateDate(e0,s0,o0)||!validateDayOfYearDate(e0,i0)?new Date(NaN):(u0.setUTCFullYear(e0,s0,Math.max(i0,o0)),u0)}}function parseDateUnit(r0){return r0?parseInt(r0):1}
615function parseTime(r0){const e0=r0.match(timeRegex);if(!e0)return NaN;const n0=parseTimeUnit(e0[1]),a0=parseTimeUnit(e0[2]),i0=parseTimeUnit(e0[3]);return validateTime(n0,a0,i0)?n0*millisecondsInHour+a0*millisecondsInMinute+i0*1e3:NaN}function parseTimeUnit(r0){return r0&&parseFloat(r0.replace(",","."))||0}function parseTimezone(r0){if(r0==="Z")return 0;const e0=r0.match(timezoneRegex);if(!e0)return 0;const n0=e0[1]==="+"?-1:1,a0=parseInt(e0[2]),i0=e0[3]&&parseInt(e0[3])||0;return validateTimezone(a0,i0)?n0*(a0*millisecondsInHour+i0*millisecondsInMinute):NaN}function dayOfISOWeekYear(r0,e0,n0){const a0=new Date(0);a0.setUTCFullYear(r0,0,4);const i0=a0.getUTCDay()||7,s0=(e0-1)*7+n0+1-i0;return a0.setUTCDate(a0.getUTCDate()+s0),a0}const daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(r0){return r0%400===0||r0%4===0&&r0%100!==0}function validateDate(r0,e0,n0){return e0>=0&&e0<=11&&n0>=1&&n0<=(daysInMonths[e0]||(isLeapYearIndex(r0)?29:28))}function validateDayOfYearDate(r0,e0){return e0>=1&&e0<=(isLeapYearIndex(r0)?366:365)}function validateWeekDate(r0,e0,n0){return e0>=1&&e0<=53&&n0>=0&&n0<=6}function validateTime(r0,e0,n0){return r0===24?e0===0&&n0===0:n0>=0&&n0<60&&e0>=0&&e0<60&&r0>=0&&r0<25}function validateTimezone(r0,e0){return e0>=0&&e0<=59}function NotificationItem({notification:r0,onClick:e0}){const n0=()=>{switch(r0.type){case"song_added":return jsxRuntimeExports.jsx(Music,{className:"h-4 w-4"});case"tagged":return jsxRuntimeExports.jsx(Tag,{className:"h-4 w-4"});case"song_edited":return jsxRuntimeExports.jsx(SquarePen,{className:"h-4 w-4"});case"songwriter_joined":return jsxRuntimeExports.jsx(UserPlus,{className:"h-4 w-4"});default:return jsxRuntimeExports.jsx(Bell,{className:"h-4 w-4"})}},a0=()=>{switch(r0.type){case"song_added":return"text-green-500 bg-green-500/10";case"tagged":return"text-blue-500 bg-blue-500/10";case"song_edited":return"text-orange-500 bg-orange-500/10";case"songwriter_joined":return"text-purple-500 bg-purple-500/10";default:return"text-muted-foreground bg-muted"}};return jsxRuntimeExports.jsxs("button",{onClick:e0,className:cn$1("w-full flex items-start gap-3 p-3 text-left transition-colors hover:bg-muted/50 rounded-md",!r0.isRead&&"bg-primary/5"),children:[jsxRuntimeExports.jsx("div",{className:cn$1("p-2 rounded-full shrink-0",a0()),children:n0()}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntimeExports.jsx("p",{className:cn$1("text-sm line-clamp-2",r0.isRead?"text-muted-foreground":"font-medium text-foreground"),children:r0.title}),!r0.isRead&&jsxRuntimeExports.jsx("span",{className:"h-2 w-2 rounded-full bg-primary shrink-0 mt-1.5"})]}),r0.message&&jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:r0.message}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:formatDistanceToNow(new Date(r0.createdAt),{addSuffix:!0})})]})]})}function useNotifications(){var x0;const{session:r0,ownerId:e0}=useAuth(),[n0,a0]=reactExports.useState([]),[i0,s0]=reactExports.useState(0),[o0,l0]=reactExports.useState(!1),[c0,u0]=reactExports.useState(null),d0=reactExports.useCallback(async(g0=50)=>{var y0;
615if(!(!(r0!=null&&r0.access_token)||!e0)){l0(!0);try{const b0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"list",limit:g0}});if(b0.error)throw b0.error;const E0=((y0=b0.data)==null?void 0:y0.data)||[];a0(E0.map(w0=>({id:w0.id,type:w0.type,title:w0.title,message:w0.message,songId:w0.song_id,relatedUserId:w0.related_user_id,relatedUserName:w0.related_user_name,isRead:w0.is_read,createdAt:w0.created_at})))}catch(b0){console.error("Failed to fetch notifications:",b0)}finally{l0(!1)}}},[r0==null?void 0:r0.access_token,e0]),h0=reactExports.useCallback(async()=>{var g0;if(!(!(r0!=null&&r0.access_token)||!e0))try{const y0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"get-unread-count"}});if(y0.error)throw y0.error;s0(((g0=y0.data)==null?void 0:g0.count)||0)}catch(y0){console.error("Failed to fetch unread count:",y0)}},[r0==null?void 0:r0.access_token,e0]),f0=reactExports.useCallback(async g0=>{if(!(!(r0!=null&&r0.access_token)||g0.length===0))try{const y0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"mark-read",notificationIds:g0}});if(y0.error)throw y0.error;a0(b0=>b0.map(E0=>g0.includes(E0.id)?{...E0,isRead:!0}:E0)),s0(b0=>Math.max(0,b0-g0.length))}catch(y0){console.error("Failed to mark notifications as read:",y0)}},[r0==null?void 0:r0.access_token]),p0=reactExports.useCallback(async()=>{if(r0!=null&&r0.access_token)try{const g0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"mark-all-read"}});if(g0.error)throw g0.error;a0(y0=>y0.map(b0=>({...b0,isRead:!0}))),s0(0)}catch(g0){console.error("Failed to mark all as read:",g0)}},[r0==null?void 0:r0.access_token]),A0=reactExports.useCallback(async()=>{var g0;if(r0!=null&&r0.access_token)try{const y0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"get-preferences"}});if(y0.error)throw y0.error;const b0=(g0=y0.data)==null?void 0:g0.data;b0&&u0({notifyNewSongs:b0.notify_new_songs,notifyTagged:b0.notify_tagged,notifySongEdits:b0.notify_song_edits,notifyNewSongwriters:b0.notify_new_songwriters,lastSeenAt:b0.last_seen_at})}catch(y0){console.error("Failed to fetch preferences:",y0)}},[r0==null?void 0:r0.access_token]),m0=reactExports.useCallback(async g0=>{if(r0!=null&&r0.access_token)try{const y0={};g0.notifyNewSongs!==void 0&&(y0.notify_new_songs=g0.notifyNewSongs),g0.notifyTagged!==void 0&&(y0.notify_tagged=g0.notifyTagged),g0.notifySongEdits!==void 0&&(y0.notify_song_edits=g0.notifySongEdits),g0.notifyNewSongwriters!==void 0&&(y0.notify_new_songwriters=g0.notifyNewSongwriters);const b0=await supabase.functions.invoke("manage-features",{body:{feature:"notifications",action:"update-preferences",updates:y0}});if(b0.error)throw b0.error;u0(E0=>E0?{...E0,...g0}:null)}catch(y0){console.error("Failed to update preferences:",y0)}},[r0==null?void 0:r0.access_token]);return reactExports.useEffect(()=>{var y0;
615if(!((y0=r0==null?void 0:r0.user)!=null&&y0.id)||!e0)return;const g0=supabase.channel("notifications").on("postgres_changes",{event:"INSERT",schema:"public",table:"notifications",filter:`user_id=eq.${r0.user.id}`},b0=>{const E0=b0.new,w0={id:E0.id,type:E0.type,title:E0.title,message:E0.message,songId:E0.song_id,relatedUserId:E0.related_user_id,relatedUserName:E0.related_user_name,isRead:E0.is_read,createdAt:E0.created_at};a0(v0=>[w0,...v0]),s0(v0=>v0+1)}).subscribe();return()=>{supabase.removeChannel(g0)}},[(x0=r0==null?void 0:r0.user)==null?void 0:x0.id,e0]),reactExports.useEffect(()=>{r0!=null&&r0.access_token&&e0&&h0()},[r0==null?void 0:r0.access_token,e0,h0]),{notifications:n0,unreadCount:i0,isLoading:o0,preferences:c0,fetchNotifications:d0,fetchUnreadCount:h0,markAsRead:f0,markAllAsRead:p0,fetchPreferences:A0,updatePreferences:m0}}function NotificationBell({onNavigateToSong:r0,onNavigateToDashboard:e0}){const[n0,a0]=reactExports.useState(!1),{notifications:i0,unreadCount:s0,isLoading:o0,fetchNotifications:l0,markAsRead:c0,markAllAsRead:u0}=useNotifications();reactExports.useEffect(()=>{n0&&l0(20)},[n0,l0]);const d0=h0=>{h0.isRead||c0([h0.id]),h0.songId&&r0&&(r0(h0.songId),a0(!1))};return jsxRuntimeExports.jsxs(Popover,{open:n0,onOpenChange:a0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"icon",className:"relative h-9 w-9",children:[jsxRuntimeExports.jsx(Bell,{className:"h-5 w-5"}),s0>0&&jsxRuntimeExports.jsx("span",{className:cn$1("absolute -top-0.5 -right-0.5 flex items-center justify-center","min-w-[18px] h-[18px] rounded-full bg-primary text-primary-foreground","text-[10px] font-medium px-1"),children:s0>99?"99+":s0})]})}),jsxRuntimeExports.jsxs(PopoverContent,{className:"w-80 p-0 bg-card border-border",align:"end",sideOffset:8,children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[jsxRuntimeExports.jsx("h4",{className:"font-semibold text-sm",children:"Notifications"}),s0>0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>u0(),children:[jsxRuntimeExports.jsx(Check,{className:"h-3 w-3 mr-1"}),"Mark all read"]})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"max-h-[400px]",children:o0?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-8",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):i0.length===0?jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center px-4",children:[jsxRuntimeExports.jsx(Bell,{className:"h-8 w-8 text-muted-foreground/50 mb-2"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"No notifications yet"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"You'll see updates about songs and activity here"})]}):jsxRuntimeExports.jsx("div",{className:"p-1",children:i0.map(h0=>jsxRuntimeExports.jsx(NotificationItem,{notification:h0,onClick:()=>d0(h0)},h0.id))})}),i0.length>0&&jsxRuntimeExports.jsx("div",{className:"p-2 border-t border-border",children:jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"w-full text-xs",onClick:()=>{e0==null||e0(),a0(!1)},children:"View all activity"})})]})]})}const bangerBankLogo="/assets/bangerbank-logo-DV-PwOyq.png";function AppSidebar({currentPage:r0,onNavigate:e0,songCount:n0}
615){const{role:a0,ownerName:i0,userName:s0,signOut:o0}=useAuth(),l0=useNavigate(),c0=a0==="admin",u0=a0==="viewer"||a0==="a_and_r"||a0==="manager",d0=async()=>{await o0(),l0("/login")},h0=p0=>p0==="a_and_r"?"A&R":p0==="manager"?"MANAGER":(p0==null?void 0:p0.toUpperCase())||"",f0=[{id:"dashboard",label:"Dashboard",icon:LayoutDashboard},...c0||a0==="songwriter"?[{id:"upload",label:"Upload",icon:Upload}]:[],{id:"library",label:"Library",icon:Library},{id:"brief",label:"Brief",icon:FileSearch},{id:"pitches",label:"Pitches",icon:Send},{id:"songwriting",label:"Songwriting",icon:Ruler},...c0?[{id:"contacts",label:"Contacts",icon:BookUser}]:[],...c0?[{id:"ai-batch-analyze",label:"AI Batch Analyzer",icon:Zap}]:[],...c0?[{id:"admin",label:"Admin",icon:Shield}]:[]];return jsxRuntimeExports.jsxs("aside",{className:"w-64 border-r border-border flex flex-col h-full",style:{backgroundColor:"#000000"},children:[jsxRuntimeExports.jsxs("div",{className:"p-6 border-b border-border",children:[jsxRuntimeExports.jsxs("button",{onClick:d0,className:"flex flex-col items-center gap-2 w-full hover:opacity-80 transition-opacity cursor-pointer",title:"Back to login",children:[jsxRuntimeExports.jsx("img",{src:bangerBankLogo,alt:"BangerBank Logo",className:"w-24 h-24 object-contain"}),jsxRuntimeExports.jsx("h1",{className:"font-bold",style:{color:"#FFC72C"},children:"BangerBank"})]}),s0&&jsxRuntimeExports.jsx("p",{className:"text-center text-sm font-medium text-foreground mt-2",children:s0}),i0&&jsxRuntimeExports.jsxs("p",{className:"text-center text-xs text-muted-foreground mt-1",children:[i0,"'s Archive"]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center gap-2 mt-2",children:[jsxRuntimeExports.jsx("span",{className:cn$1("text-[10px] px-2 py-0.5 rounded-full font-medium",c0?"bg-primary/20 text-primary":u0?"bg-secondary/50 text-secondary-foreground":"bg-muted text-muted-foreground"),children:h0(a0)}),jsxRuntimeExports.jsx(NotificationBell,{onNavigateToDashboard:()=>e0("dashboard")})]})]}),jsxRuntimeExports.jsx("nav",{className:"flex-1 p-4",children:jsxRuntimeExports.jsx("ul",{className:"space-y-1",children:f0.map(p0=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsxs("button",{onClick:()=>e0(p0.id),className:cn$1("w-full flex items-center gap-3 px-4 py-2 rounded-md text-sm font-medium transition-all",r0===p0.id?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[jsxRuntimeExports.jsx(p0.icon,{className:"w-5 h-5"}),p0.label,p0.id==="library"&&n0>0&&jsxRuntimeExports.jsx("span",{className:"ml-auto text-xs font-mono bg-muted px-2 py-0.5 rounded-full",children:n0})]})},p0.id))})}),jsxRuntimeExports.jsx("div",{className:"p-4 border-t border-border",children:jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Powered by Web Audio API"})})]})}function isValidDropboxUrl(r0){try{const e0=new URL(r0),n0=["www.dropbox.com","dropbox.com","dl.dropboxusercontent.com"];return(e0.protocol==="https:"||e0.protocol==="http:")&&n0.includes(e0.hostname.toLowerCase())}catch{return!1}}const Textarea=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("textarea",{className:cn$1("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
615ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r0),ref:n0,...e0}));Textarea.displayName="Textarea";function UploadView({onDropboxLinks:r0,isAnalyzing:e0,uploadQueue:n0,currentUploadIndex:a0,onEditSong:i0,onClearQueue:s0,onRetryItem:o0}){const[l0,c0]=reactExports.useState(""),[u0,d0]=reactExports.useState(null),h0=reactExports.useCallback(()=>{if(d0(null),!l0.trim()){d0("Please enter at least one Dropbox link");return}const g0=l0.split(/[\n,\s]+/).map(E0=>E0.trim()).filter(E0=>E0.length>0),y0=g0.filter(E0=>isValidDropboxUrl(E0)),b0=g0.length-y0.length;if(y0.length===0){d0("No valid Dropbox links found");return}b0>0&&d0(`${b0} invalid link(s) were skipped`),r0(y0),c0("")},[l0,r0]),f0=n0.length>0,p0=n0.filter(g0=>g0.status==="complete").length,A0=n0.filter(g0=>g0.status==="error").length,x0=n0.filter(g0=>g0.status==="pending"||g0.status==="processing").length===0&&f0;return jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 md:p-6 border-b border-border",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Upload"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Add new songs via Dropbox links ⢠Bulk upload supported"})]}),jsxRuntimeExports.jsx("div",{className:"flex-1 overflow-auto p-4 md:p-6",children:jsxRuntimeExports.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:cn$1("glass-card rounded-2xl p-4 md:p-8",e0&&"opacity-50 pointer-events-none"),children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-6 text-center mb-6",children:[jsxRuntimeExports.jsx("div",{className:cn$1("w-20 h-20 rounded-2xl flex items-center justify-center","bg-muted"),children:e0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-10 h-10 text-primary animate-spin"}):jsxRuntimeExports.jsx(Link,{className:"w-10 h-10 text-muted-foreground"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-xl font-semibold text-foreground mb-2",children:e0?"Analyzing...":"Paste Dropbox Links"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground",children:e0?`Processing ${a0+1} of ${n0.length}`:"Add one or more Dropbox links (one per line)"})]})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx(Textarea,{placeholder:`Paste Dropbox links here (one per line) 616https://www.dropbox.com/s/... 617https://www.dropbox.com/s/...`,value:l0,onChange:g0=>c0(g0.target.value),disabled:e0,className:"min-h-[140px] font-mono text-sm"}),jsxRuntimeExports.jsx(Button,{onClick:h0,disabled:e0||!l0.trim(),className:"w-full",size:"lg",children:"Add Links"}),u0&&jsxRuntimeExports.jsx("p",{className:"text-sm text-destructive text-center",children:u0}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Supported formats: .mp3, .wav"})]})]}),f0&&jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Upload Queue"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[p0>0&&jsxRuntimeExports.jsxs("span",{className:"text-green-500 flex items-center gap-1",children:[jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-4 h-4"}),p0]}),A0>0&&jsxRuntimeExports.jsxs("span",{className:"text-destructive flex items-center gap-1",children:[jsxRuntimeExports.jsx(CircleAlert,{className:"w-4 h-4"}),A0]}),jsxRuntimeExports.jsxs("span",{className:"text-muted-foreground",children:[n0.length," total"]}),x0&&s0&&jsxRuntimeExports.jsx(Button,{variant:"outline",size:"sm",onClick:s0,className:"h-7 text-xs",children:"Done"})]})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"max-h-64",children:jsxRuntimeExports.jsx("div",{className:"divide-y divide-border/50",children:n0.map((g0,y0)=>jsxRuntimeExports.jsxs("div",{className:cn$1("flex items-center gap-3 px-4 py-3",g0.status==="processing"&&"bg-primary/5"),children:[jsxRuntimeExports.jsxs("div",{className:"w-6 h-6 flex items-center justify-center shrink-0",children:[g0.status==="pending"&&jsxRuntimeExports.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:y0+1}
617),g0.status==="processing"&&jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4 text-primary animate-spin"}),g0.status==="complete"&&jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-4 h-4 text-green-500"}),g0.status==="error"&&jsxRuntimeExports.jsx(CircleAlert,{className:"w-4 h-4 text-destructive"})]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("p",{className:cn$1("text-sm truncate",g0.status==="complete"&&"text-muted-foreground",g0.status==="error"&&"text-destructive"),children:g0.name}),g0.error&&jsxRuntimeExports.jsx("p",{className:"text-xs text-destructive truncate",children:g0.error}),g0.duplicateMatch&&jsxRuntimeExports.jsxs("div",{className:"mt-1 rounded-md border border-amber-500/40 bg-amber-500/10 px-2 py-1",children:[jsxRuntimeExports.jsxs("p",{className:"text-xs text-amber-500 flex items-center gap-1",children:[jsxRuntimeExports.jsx(Copy,{className:"w-3 h-3"}),g0.duplicateMatch.flagType==="duplicate_certain"?"Already in your library":`Looks like a duplicate (${Math.round(g0.duplicateMatch.confidence*100)}% match)`]}),g0.duplicateMatch.song&&jsxRuntimeExports.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:['Matches "',g0.duplicateMatch.song.name,'" â ',g0.duplicateMatch.reasons[0]]})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("span",{className:"text-xs px-2 py-1 rounded-full bg-secondary/20 text-secondary",children:"Dropbox"}),g0.status==="error"&&o0&&jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>o0(g0.id),className:"h-7 px-2 text-xs gap-1",children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-3 h-3"}),"Retry"]}),g0.status==="complete"&&g0.songId&&i0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",onClick:()=>i0(g0.songId),className:"h-7 px-2 text-xs gap-1",children:[jsxRuntimeExports.jsx(Pencil,{className:"w-3 h-3"}),"Edit"]})]})]},g0.id))})})]})]})})]})}const Input=reactExports.forwardRef(({className:r0,type:e0,...n0},a0)=>jsxRuntimeExports.jsx("input",{type:e0,className:cn$1("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r0),ref:a0,...n0}));Input.displayName="Input";const InlineWaveform=React__default.memo(function({waveformData:e0,progress:n0,isCurrentSong:a0,isHovered:i0,onSeek:s0,className:o0}){const l0=reactExports.useRef(null),c0=reactExports.useMemo(()=>{if(!e0||e0.length===0)return Array(60).fill(.15);const h0=[],f0=e0.length/60;for(let p0=0;p0<60;p0++){const A0=Math.floor(p0*f0),m0=Math.floor((p0+1)*f0);let x0=0,g0=0;for(let b0=A0;b0<m0&&b0<e0.length;b0++)x0+=Math.abs(e0[b0]),g0++;const y0=g0>0?x0/g0:0;h0.push(Math.max(.1,Math.min(1,y0)))}return h0},[e0]),u0=reactExports.useCallback(d0=>{if(!s0||!l0.current||!a0)return;d0.stopPropagation();const h0=l0.current.getBoundingClientRect(),f0=(d0.clientX-h0.left)/h0.width;s0(Math.max(0,Math.min(1,f0)))},[s0,a0]);return jsxRuntimeExports.jsx("div",{ref:l0,className:cn$1("flex items-end gap-[1px] h-8 transition-opacity duration-150",a0&&"cursor-pointer",o0),onClick:u0,children:c0.map((d0,h0)=>{const f0=h0/c0.length,p0=a0&&f0<n0;return jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-sm transition-colors duration-150",style:{height:`${d0*100}%`,minHeight:"2px",backgroundColor:p0?"#22c55e":i0?"#3a3a3a":"#2a2a2a"}},h0)})})}),BPM_PRESETS=[{label:"Slow (60-90)",range:[60,90]},{label:"Mid (90-120)",range:[90,120]},{label:"Upbeat (120-150)",range:[120,150]},{label:"Fast (150+)",range:[150,220]}],GENRES=["Pop","K-Pop","Hip-Hop","Trap","EDM","K-Trap"],KEYS=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],SCALES=["Major","Minor"],VOCALIST_OPTIONS=["Male","Female","Duet","Instrumental"],FOLDER_COLORS=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#06b6d4","#f97316"],badgeV
vendor: 32,056 bytes, line 617
617ariants=cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Badge({className:r0,variant:e0,...n0}){return jsxRuntimeExports.jsx("div",{className:cn$1(badgeVariants({variant:e0}),r0),...n0})}var ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$3="RovingFocusGroup",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(GROUP_NAME$3),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$3,[createCollectionScope$3]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$3),RovingFocusGroup=reactExports.forwardRef((r0,e0)=>jsxRuntimeExports.jsx(Collection$3.Provider,{scope:r0.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(Collection$3.Slot,{scope:r0.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(RovingFocusGroupImpl,{...r0,ref:e0})})}));RovingFocusGroup.displayName=GROUP_NAME$3;var RovingFocusGroupImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeRovingFocusGroup:n0,orientation:a0,loop:i0=!1,dir:s0,currentTabStopId:o0,defaultCurrentTabStopId:l0,onCurrentTabStopIdChange:c0,onEntryFocus:u0,preventScrollOnEntryFocus:d0=!1,...h0}=r0,f0=reactExports.useRef(null),p0=useComposedRefs$1(e0,f0),A0=useDirection(s0),[m0,x0]=useControllableState$1({prop:o0,defaultProp:l0??null,onChange:c0,caller:GROUP_NAME$3}),[g0,y0]=reactExports.useState(!1),b0=useCallbackRef$2(u0),E0=useCollection$3(n0),w0=reactExports.useRef(!1),[v0,S0]=reactExports.useState(0);return reactExports.useEffect(()=>{const k0=f0.current;if(k0)return k0.addEventListener(ENTRY_FOCUS,b0),()=>k0.removeEventListener(ENTRY_FOCUS,b0)},[b0]),jsxRuntimeExports.jsx(RovingFocusProvider,{scope:n0,orientation:a0,dir:A0,loop:i0,currentTabStopId:m0,onItemFocus:reactExports.useCallback(k0=>x0(k0),[x0]),onItemShiftTab:reactExports.useCallback(()=>y0(!0),[]),onFocusableItemAdd:reactExports.useCallback(()=>S0(k0=>k0+1),[]),onFocusableItemRemove:reactExports.useCallback(()=>S0(k0=>k0-1),[]),children:jsxRuntimeExports.jsx(Primitive.div,{tabIndex:g0||v0===0?-1:0,"data-orientation":a0,...h0,ref:p0,style:{outline:"none",...r0.style},onMouseDown:composeEventHandlers(r0.onMouseDown,()=>{w0.current=!0}),onFocus:composeEventHandlers(r0.onFocus,k0=>{const R0=!w0.current;if(k0.target===k0.currentTarget&&R0&&!g0){const j0=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(k0.currentTarget.dispatchEvent(j0),!j0.defaultPrevented){const C0=E0().filter(N0=>N0.focusable),$0=C0.find(N0=>N0.active),T0=C0.find(N0=>N0.id===m0),M0=[$0,T0,...C0].filter(Boolean).map(N0=>N0.ref.current);focusFirst$1(M0,d0)}}w0.current=!1}),onBlur:composeEventHandlers(r0.onBlur,()=>y0(!1))})})}),ITEM_NAME$3="RovingFocusGroupItem",RovingFocusGroupItem=reactExports.forwardRef((r0,e0)=>{const{__scopeRovingFocusGroup:n0,focusable:a0=!0,active:i0=!1,tabStopId:s0,children:o0,...l0}=r0,c0=useId(),u0=s0||c0,d0=useRovingFocusContext(ITEM_NAME$3,n0),h0=d0.currentTabStopId===u0,f0=useCollection$3(n0),{onFocusableItemAdd:p0,onFocusableItemRemove:A0,currentTabStopId:m0}=d0;return reactExports.useEffect(()=>{if(a0)return p0(),()=>A0()},[a0,p0,A0]),jsxRuntimeExports.jsx(Collection$3.ItemSlot,{scope:n0,id:u0,focusable:a0,active:i0,children:jsxRuntimeExports.jsx(Primitive.span,{tabIndex:h0?0:-1,"data-orientation":d0.orientation,...l0,ref:e0,onMouseDown:composeEventHandlers(r0.onMouseDown,x0=>{a0?d0.onItemFocus(u0):x0.preventDefault()}),onFocus:composeEventHandlers(r0.onFocus,()=>d0.onItemFocus(u0)),onKeyDown:composeEventHandlers(r0.onKeyDown,x0=>{if(x0.key==="Tab"&&x0.shiftKey){d0.onItemShiftTab();return}if(x0.target!==x0.currentTarget)return;const g0=getFocusIntent(x0,d0.orientation,d0.dir);if(g0!==void 0){if(x0.metaKey||x0.ctrlKey||x0.altKey||x0.shiftKey)return;x0.preventDefault();let b0=f0().filter(E0=>E0.focusable).map(E0=>E0.ref.current);if(g0==="last")b0.reverse();else if(g0==="prev"||g0==="next"){g0==="prev"&&b0.reverse();const E0=b0.indexOf(x0.currentTarget);b0=d0.loop?wrapArray$2(b0,E0+1):b0.slice(E0+1)}setTimeout(()=>focusFirst$1(b0))}}),children:typeof o0=="function"?o0({isCurrentTabStop:h0,hasTabStop:m0!=null}):o0})})});RovingFocusGroupItem.displayName=ITEM_NAME$3;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(r0,e0){return e0!=="rtl"?r0:r0==="ArrowLeft"?"ArrowRight":r0==="ArrowRight"?"ArrowLeft":r0}function getFocusIntent(r0,e0,n0){const a0=getDirectionAwareKey(r0.key,n0);if(!(e0==="vertical"&&["ArrowLeft","ArrowRight"].includes(a0))&&!(e0==="horizontal"&&["ArrowUp","ArrowDown"].includes(a0)))return MAP_KEY_TO_FOCUS_INTENT[a0]}function focusFirst$1(r0,e0=!1){const n0=document.activeElement;for(const a0 of r0)if(a0===n0||(a0.focus({preventScroll:e0}),document.activeElement!==n0))return}function wrapArray$2(r0,e0){return r0.map((n0,a0)=>r0[(e0+a0)%r0.length])}var Root$9=RovingFocusGroup,Item$2=RovingFocusGroupItem,SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$2,useCollection$2,createCollectionScope$2]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope(MENU_NAME,[createCollectionScope$2,createPopperScope,createRovingFocusGroupScope]),usePopperScope$1=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=r0=>{const{__scopeMenu:e0,open:n0=!1,children:a0,dir:i0,onOpenChange:s0,modal:o0=!0}=r0,l0=usePopperScope$1(e0),[c0,u0]=reactExports.useState(null),d0=reactExports.useRef(!1),h0=useCallbackRef$2(s0),f0=useDirection(i0);return reactExports.useEffect(()=>{const p0=()=>{d0.current=!0,document.addEventListener("pointerdown",A0,{capture:!0,once:!0}),document.addEventListener("pointermove",A0,{capture:!0,once:!0})},A0=()=>d0.current=!1;return document.addEventListener("keydown",p0,{capture:!0}),()=>{document.removeEventListener("keydown",p0,{capture:!0}),document.removeEventListener("pointerdown",A0,{capture:!0}),document.removeEventListener("pointermove",A0,{capture:!0})}},[]),jsxRuntimeExports.jsx(Root2$5,{...l0,children:jsxRuntimeExports.jsx(MenuProvider,{scope:e0,open:n0,onOpenChange:h0,content:c0,onContentChange:u0,children:jsxRuntimeExports.jsx(MenuRootProvider,{scope:e0,onClose:reactExports.useCallback(()=>h0(!1),[h0]),isUsingKeyboardRef:d0,dir:f0,modal:o0,children:a0})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,...a0}=r0,i0=usePopperScope$1(n0);return jsxRuntimeExports.jsx(Anchor,{...i0,...a0,ref:e0})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$4="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$4,{forceMount:void 0}),MenuPortal=r0=>{const{__scopeMenu:e0,forceMount:n0,children:a0,container:i0}=r0,s0=useMenuContext(PORTAL_NAME$4,e0);return jsxRuntimeExports.jsx(PortalProvider$1,{scope:e0,forceMount:n0,children:jsxRuntimeExports.jsx(Presence,{present:n0||s0.open,children:jsxRuntimeExports.jsx(Portal$5,{asChild:!0,container:i0,children:a0})})})};MenuPortal.displayName=PORTAL_NAME$4;var CONTENT_NAME$6="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$6),MenuContent=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext$1(CONTENT_NAME$6,r0.__scopeMenu),{forceMount:a0=n0.forceMount,...i0}=r0,s0=useMenuContext(CONTENT_NAME$6,r0.__scopeMenu),o0=useMenuRootContext(CONTENT_NAME$6,r0.__scopeMenu);return jsxRuntimeExports.jsx(Collection$2.Provider,{scope:r0.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:a0||s0.open,children:jsxRuntimeExports.jsx(Collection$2.Slot,{scope:r0.__scopeMenu,children:o0.modal?jsxRuntimeExports.jsx(MenuRootContentModal,{...i0,ref:e0}):jsxRuntimeExports.jsx(MenuRootContentNonModal,{...i0,ref:e0})})})})}),MenuRootContentModal=reactExports.forwardRef((r0,e0)=>{const n0=useMenuContext(CONTENT_NAME$6,r0.__scopeMenu),a0=reactExports.useRef(null),i0=useComposedRefs$1(e0,a0);return reactExports.useEffect(()=>{const s0=a0.current;if(s0)return hideOthers(s0)},[]),jsxRuntimeExports.jsx(MenuContentImpl,{...r0,ref:i0,trapFocus:n0.open,disableOutsidePointerEvents:n0.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(r0.onFocusOutside,s0=>s0.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n0.onOpenChange(!1)})}),MenuRootContentNonModal=reactExports.forwardRef((r0,e0)=>{const n0=useMenuContext(CONTENT_NAME$6,r0.__scopeMenu);return jsxRuntimeExports.jsx(MenuContentImpl,{...r0,ref:e0,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n0.onOpenChange(!1)})}),Slot$2=createSlot("MenuContent.ScrollLock"),MenuContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,loop:a0=!1,trapFocus:i0,onOpenAutoFocus:s0,onCloseAutoFocus:o0,disableOutsidePointerEvents:l0,onEntryFocus:c0,onEscapeKeyDown:u0,onPointerDownOutside:d0,onFocusOutside:h0,onInteractOutside:f0,onDismiss:p0,disableOutsideScroll:A0,...m0}=r0,x0=useMenuContext(CONTENT_NAME$6,n0),g0=useMenuRootContext(CONTENT_NAME$6,n0),y0=usePopperScope$1(n0),b0=useRovingFocusGroupScope$1(n0),E0=useCollection$2(n0),[w0,v0]=reactExports.useState(null),S0=reactExports.useRef(null),k0=useComposedRefs$1(e0,S0,x0.onContentChange),R0=reactExports.useRef(0),j0=reactExports.useRef(""),C0=reactExports.useRef(0),$0=reactExports.useRef(null),T0=reactExports.useRef("right"),I0=reactExports.useRef(0),M0=A0?ReactRemoveScroll:reactExports.Fragment,N0=A0?{as:Slot$2,allowPinchZoom:!0}:void 0,D0=B0=>{var _w,J0;const z0=j0.current+B0,G0=E0().filter(Cw=>!Cw.disabled),F0=document.activeElement,Q0=(_w=G0.find(Cw=>Cw.ref.current===F0))==null?void 0:_w.textValue,U0=G0.map(Cw=>Cw.textValue),q0=getNextMatch(U0,z0,Q0),Rw=(J0=G0.find(Cw=>Cw.textValue===q0))==null?void 0:J0.ref.current;(function Cw(Ow){j0.current=Ow,window.clearTimeout(R0.current),Ow!==""&&(R0.current=window.setTimeout(()=>Cw(""),1e3))})(z0),Rw&&setTimeout(()=>Rw.focus())};reactExports.useEffect(()=>()=>window.clearTimeout(R0.current),[]),useFocusGuards();const O0=reactExports.useCallback(B0=>{var G0,F0;return T0.current===((G0=$0.current)==null?void 0:G0.side)&&isPointerInGraceArea(B0,(F0=$0.current)==null?void 0:F0.area)},[]);return jsxRuntimeExports.jsx(MenuContentProvider,{scope:n0,searchRef:j0,onItemEnter:reactExports.useCallback(B0=>{O0(B0)&&B0.preventDefault()},[O0]),onItemLeave:reactExports.useCallback(B0=>{var z0;O0(B0)||((z0=S0.current)==null||z0.focus(),v0(null))},[O0]),onTriggerLeave:reactExports.useCallback(B0=>{O0(B0)&&B0.preventDefault()},[O0]),pointerGraceTimerRef:C0,onPointerGraceIntentChange:reactExports.useCallback(B0=>{$0.current=B0},[]),children:jsxRuntimeExports.jsx(M0,{...N0,children:jsxRuntimeExports.jsx(FocusScope,{asChild:!0,trapped:i0,onMountAutoFocus:composeEventHandlers(s0,B0=>{var z0;B0.preventDefault(),(z0=S0.current)==null||z0.focus({preventScroll:!0})}),onUnmountAutoFocus:o0,children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l0,onEscapeKeyDown:u0,onPointerDownOutside:d0,onFocusOutside:h0,onInteractOutside:f0,onDismiss:p0,children:jsxRuntimeExports.jsx(Root$9,{asChild:!0,...b0,dir:g0.dir,orientation:"vertical",loop:a0,currentTabStopId:w0,onCurrentTabStopIdChange:v0,onEntryFocus:composeEventHandlers(c0,B0=>{g0.isUsingKeyboardRef.current||B0.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntimeExports.jsx(Content$3,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(x0.open),"data-radix-menu-content":"",dir:g0.dir,...y0,...m0,ref:k0,style:{outline:"none",...m0.style},onKeyDown:composeEventHandlers(m0.onKeyDown,B0=>{const G0=B0.target.closest("[data-radix-menu-content]")===B0.currentTarget,F0=B0.ctrlKey||B0.altKey||B0.metaKey,Q0=B0.key.length===1;G0&&(B0.key==="Tab"&&B0.preventDefault(),!F0&&Q0&&D0(B0.key));const U0=S0.current;if(B0.target!==U0||!FIRST_LAST_KEYS.includes(B0.key))return;B0.preventDefault();const Rw=E0().filter(_w=>!_w.disabled).map(_w=>_w.ref.current);LAST_KEYS.includes(B0.key)&&Rw.reverse(),focusFirst(Rw)}),onBlur:composeEventHandlers(r0.onBlur,B0=>{B0.currentTarget.contains(B0.target)||(window.clearTimeout(R0.current),j0.current="")}),onPointerMove:composeEventHandlers(r0.onPointerMove,whenMouse(B0=>{const z0=B0.target,G0=I0.current!==B0.clientX;if(B0.currentTarget.contains(z0)&&G0){const F0=B0.clientX>I0.current?"right":"left";T0.current=F0,I0.current=B0.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$6;var GROUP_NAME$2="MenuGroup",MenuGroup=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{role:"group",...a0,ref:e0})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{...a0,ref:e0})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$2="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=reactExports.forwardRef((r0,e0)=>{const{disabled:n0=!1,onSelect:a0,...i0}=r0,s0=reactExports.useRef(null),o0=useMenuRootContext(ITEM_NAME$2,r0.__scopeMenu),l0=useMenuContentContext(ITEM_NAME$2,r0.__scopeMenu),c0=useComposedRefs$1(e0,s0),u0=reactExports.useRef(!1),d0=()=>{const h0=s0.current;if(!n0&&h0){const f0=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});h0.addEventListener(ITEM_SELECT,p0=>a0==null?void 0:a0(p0),{once:!0}),dispatchDiscreteCustomEvent(h0,f0),f0.defaultPrevented?u0.current=!1:o0.onClose()}};return jsxRuntimeExports.jsx(MenuItemImpl,{...i0,ref:c0,disabled:n0,onClick:composeEventHandlers(r0.onClick,d0),onPointerDown:h0=>{var f0;(f0=r0.onPointerDown)==null||f0.call(r0,h0),u0.current=!0},onPointerUp:composeEventHandlers(r0.onPointerUp,h0=>{var f0;u0.current||(f0=h0.currentTarget)==null||f0.click()}),onKeyDown:composeEventHandlers(r0.onKeyDown,h0=>{const f0=l0.searchRef.current!=="";n0||f0&&h0.key===" "||SELECTION_KEYS$1.includes(h0.key)&&(h0.currentTarget.click(),h0.preventDefault())})})});MenuItem.displayName=ITEM_NAME$2;var MenuItemImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,disabled:a0=!1,textValue:i0,...s0}=r0,o0=useMenuContentContext(ITEM_NAME$2,n0),l0=useRovingFocusGroupScope$1(n0),c0=reactExports.useRef(null),u0=useComposedRefs$1(e0,c0),[d0,h0]=reactExports.useState(!1),[f0,p0]=reactExports.useState("");return reactExports.useEffect(()=>{const A0=c0.current;A0&&p0((A0.textContent??"").trim())},[s0.children]),jsxRuntimeExports.jsx(Collection$2.ItemSlot,{scope:n0,disabled:a0,textValue:i0??f0,children:jsxRuntimeExports.jsx(Item$2,{asChild:!0,...l0,focusable:!a0,children:jsxRuntimeExports.jsx(Primitive.div,{role:"menuitem","data-highlighted":d0?"":void 0,"aria-disabled":a0||void 0,"data-disabled":a0?"":void 0,...s0,ref:u0,onPointerMove:composeEventHandlers(r0.onPointerMove,whenMouse(A0=>{a0?o0.onItemLeave(A0):(o0.onItemEnter(A0),A0.defaultPrevented||A0.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(r0.onPointerLeave,whenMouse(A0=>o0.onItemLeave(A0))),onFocus:composeEventHandlers(r0.onFocus,()=>h0(!0)),onBlur:composeEventHandlers(r0.onBlur,()=>h0(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=reactExports.forwardRef((r0,e0)=>{const{checked:n0=!1,onCheckedChange:a0,...i0}=r0;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:r0.__scopeMenu,checked:n0,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n0)?"mixed":n0,...i0,ref:e0,"data-state":getCheckedState(n0),onSelect:composeEventHandlers(i0.onSelect,()=>a0==null?void 0:a0(isIndeterminate$1(n0)?!0:!n0),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=reactExports.forwardRef((r0,e0)=>{const{value:n0,onValueChange:a0,...i0}=r0,s0=useCallbackRef$2(a0);return jsxRuntimeExports.jsx(RadioGroupProvider,{scope:r0.__scopeMenu,value:n0,onValueChange:s0,children:jsxRuntimeExports.jsx(MenuGroup,{...i0,ref:e0})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=reactExports.forwardRef((r0,e0)=>{const{value:n0,...a0}=r0,i0=useRadioGroupContext(RADIO_ITEM_NAME$1,r0.__scopeMenu),s0=n0===i0.value;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:r0.__scopeMenu,checked:s0,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemradio","aria-checked":s0,...a0,ref:e0,"data-state":getCheckedState(s0),onSelect:composeEventHandlers(a0.onSelect,()=>{var o0;return(o0=i0.onValueChange)==null?void 0:o0.call(i0,n0)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,forceMount:a0,...i0}=r0,s0=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n0);return jsxRuntimeExports.jsx(Presence,{present:a0||isIndeterminate$1(s0.checked)||s0.checked===!0,children:jsxRuntimeExports.jsx(Primitive.span,{...i0,ref:e0,"data-state":getCheckedState(s0.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...a0,ref:e0})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$2="MenuArrow",MenuArrow=reactExports.forwardRef((r0,e0)=>{const{__scopeMenu:n0,...a0}=r0,i0=usePopperScope$1(n0);return jsxRuntimeExports.jsx(Arrow,{...i0,...a0,ref:e0})});MenuArrow.displayName=ARROW_NAME$2;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=reactExports.forwardRef((r0,e0)=>{const n0=useMenuContext(SUB_TRIGGER_NAME$1,r0.__scopeMenu),a0=useMenuRootContext(SUB_TRIGGER_NAME$1,r0.__scopeMenu),i0=useMenuSubContext(SUB_TRIGGER_NAME$1,r0.__scopeMenu),s0=useMenuContentContext(SUB_TRIGGER_NAME$1,r0.__scopeMenu),o0=reactExports.useRef(null),{pointerGraceTimerRef:l0,onPointerGraceIntentChange:c0}=s0,u0={__scopeMenu:r0.__scopeMenu},d0=reactExports.useCallback(()=>{o0.current&&window.clearTimeout(o0.current),o0.current=null},[]);return reactExports.useEffect(()=>d0,[d0]),reactExports.useEffect(()=>{const h0=l0.current;return()=>{window.clearTimeout(h0),c0(null)}},[l0,c0]),jsxRuntimeExports.jsx(MenuAnchor,{asChild:!0,...u0,children:jsxRuntimeExports.jsx(MenuItemImpl,{id:i0.triggerId,"aria-haspopup":"menu","aria-expanded":n0.open,"aria-controls":i0.contentId,"data-state":getOpenState(n0.open),...r0,ref:composeRefs$1(e0,i0.onTriggerChange),onClick:h0=>{var f0;(f0=r0.onClick)==null||f0.call(r0,h0),!(r0.disabled||h0.defaultPrevented)&&(h0.currentTarget.focus(),n0.open||n0.onOpenChange(!0))},onPointerMove:composeEventHandlers(r0.onPointerMove,whenMouse(h0=>{s0.onItemEnter(h0),!h0.defaultPrevented&&!r0.disabled&&!n0.open&&!o0.current&&(s0.onPointerGraceIntentChange(null),o0.current=window.setTimeout(()=>{n0.onOpenChange(!0),d0()},100))})),onPointerLeave:composeEventHandlers(r0.onPointerLeave,whenMouse(h0=>{var p0,A0;d0();const f0=(p0=n0.content)==null?void 0:p0.getBoundingClientRect();if(f0){const m0=(A0=n0.content)==null?void 0:A0.dataset.side,x0=m0==="right",g0=x0?-5:5,y0=f0[x0?"left":"right"],b0=f0[x0?"right":"left"];s0.onPointerGraceIntentChange({area:[{x:h0.clientX+g0,y:h0.clientY},{x:y0,y:f0.top},{x:b0,y:f0.top},{x:b0,y:f0.bottom},{x:y0,y:f0.bottom}],side:m0}),window.clearTimeout(l0.current),l0.current=window.setTimeout(()=>s0.onPointerGraceIntentChange(null),300)}else{if(s0.onTriggerLeave(h0),h0.defaultPrevented)return;s0.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(r0.onKeyDown,h0=>{var p0;const f0=s0.searchRef.current!=="";r0.disabled||f0&&h0.key===" "||SUB_OPEN_KEYS[a0.dir].includes(h0.key)&&(n0.onOpenChange(!0),(p0=n0.content)==null||p0.focus(),h0.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext$1(CONTENT_NAME$6,r0.__scopeMenu),{forceMount:a0=n0.forceMount,...i0}=r0,s0=useMenuContext(CONTENT_NAME$6,r0.__scopeMenu),o0=useMenuRootContext(CONTENT_NAME$6,r0.__scopeMenu),l0=useMenuSubContext(SUB_CONTENT_NAME$1,r0.__scopeMenu),c0=reactExports.useRef(null),u0=useComposedRefs$1(e0,c0);return jsxRuntimeExports.jsx(Collection$2.Provider,{scope:r0.__scopeMenu,children:jsxRuntimeExports.jsx(Presence,{present:a0||s0.open,children:jsxRuntimeExports.jsx(Collection$2.Slot,{scope:r0.__scopeMenu,children:jsxRuntimeExports.jsx(MenuContentImpl,{id:l0.contentId,"aria-labelledby":l0.triggerId,...i0,ref:u0,align:"start",side:o0.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d0=>{var h0;o0.isUsingKeyboardRef.current&&((h0=c0.current)==null||h0.focus()),d0.preventDefault()},onCloseAutoFocus:d0=>d0.preventDefault(),onFocusOutside:composeEventHandlers(r0.onFocusOutside,d0=>{d0.target!==l0.trigger&&s0.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(r0.onEscapeKeyDown,d0=>{o0.onClose(),d0.preventDefault()}),onKeyDown:composeEventHandlers(r0.onKeyDown,d0=>{var p0;const h0=d0.currentTarget.contains(d0.target),f0=SUB_CLOSE_KEYS[o0.dir].includes(d0.key);h0&&f0&&(s0.onOpenChange(!1),(p0=l0.trigger)==null||p0.focus(),d0.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(r0){return r0?"open":"closed"}function isIndeterminate$1(r0){return r0==="indeterminate"}function getCheckedState(r0){return isIndeterminate$1(r0)?"indeterminate":r0?"checked":"unchecked"}function focusFirst(r0){const e0=document.activeElement;for(const n0 of r0)if(n0===e0||(n0.focus(),document.activeElement!==e0))return}function wrapArray$1(r0,e0){return r0.map((n0,a0)=>r0[(e0+a0)%r0.length])}function getNextMatch(r0,e0,n0){const i0=e0.length>1&&Array.from(e0).every(u0=>u0===e0[0])?e0[0]:e0,s0=n0?r0.indexOf(n0):-1;let o0=wrapArray$1(r0,Math.max(s0,0));i0.length===1&&(o0=o0.filter(u0=>u0!==n0));const c0=o0.find(u0=>u0.toLowerCase().startsWith(i0.toLowerCase()));return c0!==n0?c0:void 0}function isPointInPolygon(r0,e0){const{x:n0,y:a0}=r0;let i0=!1;for(let s0=0,o0=e0.length-1;s0<e0.length;o0=s0++){const l0=e0[s0],c0=e0[o0],u0=l0.x,d0=l0.y,h0=c0.x,f0=c0.y;d0>a0!=f0>a0&&n0<(h0-u0)*(a0-d0)/(f0-d0)+u0&&(i0=!i0)}return i0}function isPointerInGraceArea(r0,e0){if(!e0)return!1;const n0={x:r0.clientX,y:r0.clientY};return isPointInPolygon(n0,e0)}function whenMouse(r0){return e0=>e0.pointerType==="mouse"?r0(e0):void 0}var Root3=Menu,Anchor2=MenuAnchor,Portal$3=MenuPortal,Content2$3=MenuContent,Group=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=r0=>{const{__scopeDropdownMenu:e0,children:n0,dir:a0,open:i0,defaultOpen:s0,onOpenChange:o0,modal:l0=!0}=r0,c0=useMenuScope(e0),u0=reactExports.useRef(null),[d0,h0]=useControllableState$1({prop:i0,defaultProp:s0??!1,onChange:o0,caller:DROPDOWN_MENU_NAME});return jsxRuntimeExports.jsx(DropdownMenuProvider,{scope:e0,triggerId:useId(),triggerRef:u0,contentId:useId(),open:d0,onOpenChange:h0,onOpenToggle:reactExports.useCallback(()=>h0(f0=>!f0),[h0]),modal:l0,children:jsxRuntimeExports.jsx(Root3,{...c0,open:d0,onOpenChange:h0,dir:a0,modal:l0,children:n0})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$6="DropdownMenuTrigger",DropdownMenuTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,disabled:a0=!1,...i0}=r0,s0=useDropdownMenuContext(TRIGGER_NAME$6,n0),o0=useMenuScope(n0);return jsxRuntimeExports.jsx(Anchor2,{asChild:!0,...o0,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",id:s0.triggerId,"aria-haspopup":"menu","aria-expanded":s0.open,"aria-controls":s0.open?s0.contentId:void 0,"data-state":s0.open?"open":"closed","data-disabled":a0?"":void 0,disabled:a0,...i0,ref:composeRefs$1(e0,s0.triggerRef),onPointerDown:composeEventHandlers(r0.onPointerDown,l0=>{!a0&&l0.button===0&&l0.ctrlKey===!1&&(s0.onOpenToggle(),s0.open||l0.preventDefault())}),onKeyDown:composeEventHandlers(r0.onKeyDown,l0=>{a0||(["Enter"," "].includes(l0.key)&&s0.onOpenToggle(),l0.key==="ArrowDown"&&s0.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l0.key)&&l0.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$6;var PORTAL_NAME$3="DropdownMenuPortal",DropdownMenuPortal=r0=>{const{__scopeDropdownMenu:e0,...n0}=r0,a0=useMenuScope(e0);return jsxRuntimeExports.jsx(Portal$3,{...a0,...n0})};DropdownMenuPortal.displayName=PORTAL_NAME$3;var CONTENT_NAME$5="DropdownMenuContent",DropdownMenuContent$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useDropdownMenuContext(CONTENT_NAME$5,n0),s0=useMenuScope(n0),o0=reactExports.useRef(!1);return jsxRuntimeExports.jsx(Content2$3,{id:i0.contentId,"aria-labelledby":i0.triggerId,...s0,...a0,ref:e0,onCloseAutoFocus:composeEventHandlers(r0.onCloseAutoFocus,l0=>{var c0;o0.current||(c0=i0.triggerRef.current)==null||c0.focus(),o0.current=!1,l0.preventDefault()}),onInteractOutside:composeEventHandlers(r0.onInteractOutside,l0=>{const c0=l0.detail.originalEvent,u0=c0.button===0&&c0.ctrlKey===!0,d0=c0.button===2||u0;(!i0.modal||d0)&&(o0.current=!0)}),style:{...r0.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$5;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(Group,{...i0,...a0,ref:e0})});DropdownMenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(Label$4,{...i0,...a0,ref:e0})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$1="DropdownMenuItem",DropdownMenuItem$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(Item2$1,{...i0,...a0,ref:e0})});DropdownMenuItem$1.displayName=ITEM_NAME$1;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(CheckboxItem,{...i0,...a0,ref:e0})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(RadioGroup,{...i0,...a0,ref:e0})});DropdownMenuRadioGroup.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(RadioItem,{...i0,...a0,ref:e0})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(ItemIndicator$1,{...i0,...a0,ref:e0})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(Separator$3,{...i0,...a0,ref:e0})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$1="DropdownMenuArrow",DropdownMenuArrow=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(Arrow2,{...i0,...a0,ref:e0})});DropdownMenuArrow.displayName=ARROW_NAME$1;var SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(SubTrigger,{...i0,...a0,ref:e0})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDropdownMenu:n0,...a0}=r0,i0=useMenuScope(n0);return jsxRuntimeExports.jsx(SubContent,{...i0,...a0,ref:e0,style:{...r0.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$3=DropdownMenu$1,Trigger$3=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal,Content2$2=DropdownMenuContent$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$3,DropdownMenuTrigger=Trigger$3,DropdownMenuSubTrigger=reactExports.forwardRef(({className:r0,inset:e0,children:n0,...a0},i0)=>jsxRuntimeExports.jsxs(SubTrigger2,{ref:i0,className:cn$1("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",e0&&"pl-8",r0),...a0,children:[n0,jsxRuntimeExports.jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(SubContent2,{ref:n0,className:cn$1("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
617de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r0),...e0}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=reactExports.forwardRef(({className:r0,sideOffset:e0=4,...n0},a0)=>jsxRuntimeExports.jsx(Portal2$1,{children:jsxRuntimeExports.jsx(Content2$2,{ref:a0,sideOffset:e0,className:cn$1("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r0),...n0})}));DropdownMenuContent.displayName=Content2$2.displayName;const DropdownMenuItem=reactExports.forwardRef(({className:r0,inset:e0,...n0},a0)=>jsxRuntimeExports.jsx(Item2,{ref:a0,className:cn$1("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e0&&"pl-8",r0),...n0}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=reactExports.forwardRef(({className:r0,children:e0,checked:n0,...a0},i0)=>jsxRuntimeExports.jsxs(CheckboxItem2,{ref:i0,className:cn$1("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r0),checked:n0,...a0,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(Check,{className:"h-4 w-4"})})}),e0]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(RadioItem2,{ref:a0,className:cn$1("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r0),...n0,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),e0]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=reactExports.forwardRef(({className:r0,inset:e0,...n0},a0)=>jsxRuntimeExports.jsx(Label2,{ref:a0,className:cn$1("px-2 py-1.5 text-sm font-semibold",e0&&"pl-8",r0),...n0}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Separator2,{ref:n0,className:cn$1("-mx-1 my-1 h-px bg-muted",r0),...e0}));DropdownMenuSeparator.displayName=Separator2.displayName;var DIALOG_NAME="Dialog",[createDialogContext,createDialogScope]=createContextScope(DIALOG_NAME),[DialogProvider,useDialogContext]=createDialogContext(DIALOG_NAME),Dialog$1=r0=>{const{__scopeDialog:e0,children:n0,open:a0,defaultOpen:i0,onOpenChange:s0,modal:o0=!0}=r0,l0=reactExports.useRef(null),c0=reactExports.useRef(null),[u0,d0]=useControllableState$1({prop:a0,defaultProp:i0??!1,onChange:s0,caller:DIALOG_NAME});return jsxRuntimeExports.jsx(DialogProvider,{scope:e0,triggerRef:l0,contentRef:c0,contentId:useId(),titleId:useId(),descriptionId:useId(),open:u0,onOpenChange:d0,onOpenToggle:reactExports.useCallback(()=>d0(h0=>!h0),[d0]),modal:o0,children:n0})};Dialog$1.displayName=DIALOG_NAME;var TRIGGER_NAME$5="DialogTrigger",DialogTrigger=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,...a0}=r0,i0=useDialogContext(TRIGGER_NAME$5,n0),s0=useComposedRefs$1(e0,i0.triggerRef);return jsxRuntimeExports.jsx(Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i0.open,"aria-controls":i0.contentId,"data-state":getState$3(i0.open),...a0,ref:s0,onClick:composeEventHandlers(r0.onClick,i0.onOpenToggle)})});DialogTrigger.displayName=TRIGGER_NAME$5;var PORTAL_NAME$2="DialogPortal",[PortalProvider,usePortalContext]=createDialogContext(PORTAL_NAME$2,{forceMount:void 0}),DialogPortal$1=r0=>{const{__scopeDialog:e0,forceMount:n0,children:a0,container:i0}=r0,s0=useDialogContext(PORTAL_NAME$2,e0);return jsxRuntimeExports.jsx(PortalProvider,{scope:e0,forceMount:n0,children:reactExports.Children.map(a0,o0=>jsxRuntimeExports.jsx(Presence,{present:n0||s0.open,children:jsxRuntimeExports.jsx(Portal$5,{asChild:!0,container:i0,children:o0})}))})};DialogPortal$1.displayName=PORTAL_NAME$2;var OVERLAY_NAME$1="DialogOverlay",DialogOverlay$1=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext(OVERLAY_NAME$1,r0.__scopeDialog),{forceMount:a0=n0.forceMount,...i0}=r0,s0=useDialogContext(OVERLAY_NAME$1,r0.__scopeDialog);return s0.modal?jsxRuntimeExports.jsx(Presence,{present:a0||s0.open,children:jsxRuntimeExports.jsx(DialogOverlayImpl,{...i0,ref:e0})}):null});DialogOverlay$1.displayName=OVERLAY_NAME$1;var Slot$1=createSlot("DialogOverlay.RemoveScroll"),DialogOverlayImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,...a0}=r0,i0=useDialogContext(OVERLAY_NAME$1,n0);return jsxRuntimeExports.jsx(ReactRemoveScroll,{as:Slot$1,allowPinchZoom:!0,shards:[i0.contentRef],children:jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState$3(i0.open),...a0,ref:e0,style:{pointerEvents:"auto",...a0.style}})})}),CONTENT_NAME$4="DialogContent",DialogContent$1=reactExports.forwardRef((r0,e0)=>{const n0=usePortalContext(CONTENT_NAME$4,r0.__scopeDialog),{forceMount:a0=n0.forceMount,...i0}=r0,s0=useDialogContext(CONTENT_NAME$4,r0.__scopeDialog);return jsxRuntimeExports.jsx(Presence,{present:a0||s0.open,children:s0.modal?jsxRuntimeExports.jsx(DialogContentModal,{...i0,ref:e0}):jsxRuntimeExports.jsx(DialogContentNonModal,{...i0,ref:e0})})});DialogContent$1.displayName=CONTENT_NAME$4;var DialogContentModal=reactExports.forwardRef((r0,e0)=>{const n0=useDialogContext(CONTENT_NAME$4,r0.__scopeDialog),a0=reactExports.useRef(null),i0=useComposedRefs$1(e0,n0.
vendor: 7,999 bytes, lines 617-622
617contentRef,a0);return reactExports.useEffect(()=>{const s0=a0.current;if(s0)return hideOthers(s0)},[]),jsxRuntimeExports.jsx(DialogContentImpl,{...r0,ref:i0,trapFocus:n0.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers(r0.onCloseAutoFocus,s0=>{var o0;s0.preventDefault(),(o0=n0.triggerRef.current)==null||o0.focus()}),onPointerDownOutside:composeEventHandlers(r0.onPointerDownOutside,s0=>{const o0=s0.detail.originalEvent,l0=o0.button===0&&o0.ctrlKey===!0;(o0.button===2||l0)&&s0.preventDefault()}),onFocusOutside:composeEventHandlers(r0.onFocusOutside,s0=>s0.preventDefault())})}),DialogContentNonModal=reactExports.forwardRef((r0,e0)=>{const n0=useDialogContext(CONTENT_NAME$4,r0.__scopeDialog),a0=reactExports.useRef(!1),i0=reactExports.useRef(!1);return jsxRuntimeExports.jsx(DialogContentImpl,{...r0,ref:e0,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s0=>{var o0,l0;(o0=r0.onCloseAutoFocus)==null||o0.call(r0,s0),s0.defaultPrevented||(a0.current||(l0=n0.triggerRef.current)==null||l0.focus(),s0.preventDefault()),a0.current=!1,i0.current=!1},onInteractOutside:s0=>{var c0,u0;(c0=r0.onInteractOutside)==null||c0.call(r0,s0),s0.defaultPrevented||(a0.current=!0,s0.detail.originalEvent.type==="pointerdown"&&(i0.current=!0));const o0=s0.target;((u0=n0.triggerRef.current)==null?void 0:u0.contains(o0))&&s0.preventDefault(),s0.detail.originalEvent.type==="focusin"&&i0.current&&s0.preventDefault()}})}),DialogContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,trapFocus:a0,onOpenAutoFocus:i0,onCloseAutoFocus:s0,...o0}=r0,l0=useDialogContext(CONTENT_NAME$4,n0),c0=reactExports.useRef(null),u0=useComposedRefs$1(e0,c0);return useFocusGuards(),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FocusScope,{asChild:!0,loop:!0,trapped:a0,onMountAutoFocus:i0,onUnmountAutoFocus:s0,children:jsxRuntimeExports.jsx(DismissableLayer,{role:"dialog",id:l0.contentId,"aria-describedby":l0.descriptionId,"aria-labelledby":l0.titleId,"data-state":getState$3(l0.open),...o0,ref:u0,onDismiss:()=>l0.onOpenChange(!1)})}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TitleWarning,{titleId:l0.titleId}),jsxRuntimeExports.jsx(DescriptionWarning$1,{contentRef:c0,descriptionId:l0.descriptionId})]})]})}),TITLE_NAME$1="DialogTitle",DialogTitle$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,...a0}=r0,i0=useDialogContext(TITLE_NAME$1,n0);return jsxRuntimeExports.jsx(Primitive.h2,{id:i0.titleId,...a0,ref:e0})});DialogTitle$1.displayName=TITLE_NAME$1;var DESCRIPTION_NAME$1="DialogDescription",DialogDescription$1=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,...a0}=r0,i0=useDialogContext(DESCRIPTION_NAME$1,n0);return jsxRuntimeExports.jsx(Primitive.p,{id:i0.descriptionId,...a0,ref:e0})});DialogDescription$1.displayName=DESCRIPTION_NAME$1;var CLOSE_NAME="DialogClose",DialogClose=reactExports.forwardRef((r0,e0)=>{const{__scopeDialog:n0,...a0}=r0,i0=useDialogContext(CLOSE_NAME,n0);return jsxRuntimeExports.jsx(Primitive.button,{type:"button",...a0,ref:e0,onClick:composeEventHandlers(r0.onClick,()=>i0.onOpenChange(!1))})});DialogClose.displayName=CLOSE_NAME;function getState$3(r0){return r0?"open":"closed"}var TITLE_WARNING_NAME="DialogTitleWarning",[WarningProvider,useWarningContext]=createContext2(TITLE_WARNING_NAME,{contentName:CONTENT_NAME$4,titleName:TITLE_NAME$1,docsSlug:"dialog"}),TitleWarning=({titleId:r0})=>{const e0=useWarningContext(TITLE_WARNING_NAME),n0=`\`${e0.contentName}\` requires a \`${e0.titleName}\` for the component to be accessible for screen reader users. 618 619If you want to hide the \`${e0.titleName}\`, you can wrap it with our VisuallyHidden component. 620 621For more information, see https://radix-ui.com/primitives/docs/components/${e0.docsSlug}`;return reactExports.useEffect(()=>{r0&&(document.getElementById(r0)||console.error(n0))},[n0,r0]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:r0,descriptionId:e0})=>{const a0=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var s0;const i0=(s0=r0.current)==null?void 0:s0.getAttribute("aria-describedby");e0&&i0&&(document.getElementById(e0)||console.warn(a0))},[a0,r0,e0]),null},Root$8=Dialog$1,Trigger$2=DialogTrigger,Portal$2=DialogPortal$1,Overlay$1=DialogOverlay$1,Content$2=DialogContent$1,Title=DialogTitle$1,Description=DialogDescription$1,Close=DialogClose,ROOT_NAME="AlertDialog",[createAlertDialogContext,createAlertDialogScope]=createContextScope(ROOT_NAME,[createDialogScope]),useDialogScope=createDialogScope(),AlertDialog$1=r0=>{const{__scopeAlertDialog:e0,...n0}=r0,a0=useDialogScope(e0);return jsxRuntimeExports.jsx(Root$8,{...a0,...n0,modal:!0})};AlertDialog$1.displayName=ROOT_NAME;var TRIGGER_NAME$4="AlertDialogTrigger",AlertDialogTrigger=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,i0=useDialogScope(n0);return jsxRuntimeExports.jsx(Trigger$2,{...i0,...a0,ref:e0})});AlertDialogTrigger.displayName=TRIGGER_NAME$4;var PORTAL_NAME$1="AlertDialogPortal",AlertDialogPortal$1=r0=>{const{__scopeAlertDialog:e0,...n0}=r0,a0=useDialogScope(e0);return jsxRuntimeExports.jsx(Portal$2,{...a0,...n0})};AlertDialogPortal$1.displayName=PORTAL_NAME$1;var OVERLAY_NAME="AlertDialogOverlay",AlertDialogOverlay$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,i0=useDialogScope(n0);return jsxRuntimeExports.jsx(Overlay$1,{...i0,...a0,ref:e0})});AlertDialogOverlay$1.displayName=OVERLAY_NAME;var CONTENT_NAME$3="AlertDialogContent",[AlertDialogContentProvider,useAlertDialogContentContext]=createAlertDialogContext(CONTENT_NAME$3),Slottable=createSlottable("AlertDialogContent"),AlertDialogContent$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,children:a0,...i0}=r0,s0=useDialogScope(n0),o0=reactExports.useRef(null),l0=useComposedRefs$1(e0,o0),c0=reactExports.useRef(null);return jsxRuntimeExports.jsx(WarningProvider,{contentName:CONTENT_NAME$3,titleName:TITLE_NAME,docsSlug:"alert-dialog",children:jsxRuntimeExports.jsx(AlertDialogContentProvider,{scope:n0,cancelRef:c0,children:jsxRuntimeExports.jsxs(Content$2,{role:"alertdialog",...s0,...i0,ref:l0,onOpenAutoFocus:composeEventHandlers(i0.onOpenAutoFocus,u0=>{var d0;u0.preventDefault(),(d0=c0.current)==null||d0.focus({preventScroll:!0})}),onPointerDownOutside:u0=>u0.preventDefault(),onInteractOutside:u0=>u0.preventDefault(),children:[jsxRuntimeExports.jsx(Slottable,{children:a0}),jsxRuntimeExports.jsx(DescriptionWarning,{contentRef:o0})]})})})});AlertDialogContent$1.displayName=CONTENT_NAME$3;var TITLE_NAME="AlertDialogTitle",AlertDialogTitle$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,i0=useDialogScope(n0);return jsxRuntimeExports.jsx(Title,{...i0,...a0,ref:e0})});AlertDialogTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="AlertDialogDescription",AlertDialogDescription$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,i0=useDialogScope(n0);return jsxRuntimeExports.jsx(Description,{...i0,...a0,ref:e0})});AlertDialogDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="AlertDialogAction",AlertDialogAction$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,i0=useDialogScope(n0);return jsxRuntimeExports.jsx(Close,{...i0,...a0,ref:e0})});AlertDialogAction$1.displayName=ACTION_NAME;var CANCEL_NAME="AlertDialogCancel",AlertDialogCancel$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAlertDialog:n0,...a0}=r0,{cancelRef:i0}=useAlertDialogContentContext(CANCEL_NAME,n0),s0=useDialogScope(n0),o0=useComposedRefs$1(e0,i0);return jsxRuntimeExports.jsx(Close,{...s0,...a0,ref:o0})});AlertDialogCancel$1.displayName=CANCEL_NAME;var DescriptionWarning=({contentRef:r0})=>{const e0=`\`${CONTENT_NAME$3}\` requires a description for the component to be accessible for screen reader users. 622
623You can add a description to the \`${CONTENT_NAME$3}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 624 625Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME$3}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 626 627For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return reactExports.useEffect(()=>{var a0;document.getElementById((a0=r0.current)==null?void 0:a0.getAttribute("aria-describedby"))||console.warn(e0)},[e0,r0]),null},Root2$2=AlertDialog$1,Portal2=AlertDialogPortal$1,Overlay2=AlertDialogOverlay$1,Content2$1=AlertDialogContent$1,Action=AlertDialogAction$1,Cancel=AlertDialogCancel$1,Title2=AlertDialogTitle$1,Description2=AlertDialogDescription$1;const AlertDialog=Root2$2,AlertDialogPortal=Portal2,AlertDialogOverlay=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Overlay2,{className:cn$1("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r0),...e0,ref:n0}));AlertDialogOverlay.displayName=Overlay2.displayName;const AlertDialogContent=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsxs(AlertDialogPortal,{children:[jsxRuntimeExports.jsx(AlertDialogOverlay,{}),jsxRuntimeExports.jsx(Content2$1,{ref:n0,className:cn$1("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r0),...e0})]}));AlertDialogContent.displayName=Content2$1.displayName;const AlertDialogHeader=({className:r0,...e0})=>jsxRuntimeExports.jsx("div",{className:cn$1("flex flex-col space-y-2 text-center sm:text-left",r0),...e0});AlertDialogHeader.displayName="AlertDialogHeader";const AlertDialogFooter=({className:r0,...e0})=>jsxRuntimeExports.jsx("div",{className:cn$1("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r0),...e0});AlertDialogFooter.displayName="AlertDialogFooter";const AlertDialogTitle=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Title2,{ref:n0,className:cn$1("text-lg font-semibold",r0),...e0}));AlertDialogTitle.displayName=Title2.displayName;const AlertDialogDescription=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Description2,{ref:n0,className:cn$1("text-sm text-muted-foreground",r0),...e0}));AlertDialogDescription.displayName=Description2.displayName;const AlertDialogAction=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Action,{ref:n0,className:cn$1(buttonVariants(),r0),...e0}));AlertDialogAction.displayName=Action.displayName;const AlertDialogCancel=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Cancel,{ref:n0,className:cn$1(buttonVariants({variant:"outline"}),"mt-2 sm:mt-0",r0),...e0}));AlertDialogCancel.displayName=Cancel.displayName;function getSongYear(r0){if(!r0.originalDate)return"unknown";const n0=(r0.originalDate instanceof Date?r0.originalDate:new Date(r0.originalDate)).getFullYear();return!Number.isFinite(n0)||n0<1900||n0>2100?"unknown":n0}function formatSongYear(r0){return r0==="unknown"?"Unknown":String(r0)}function collectSongYears(r0){const e0=new Set;let n0=!1;for(const i0 of r0){const s0=getSongYear(i0);s0==="unknown"?n0=!0:e0.add(s0)}const a0=[...e0].sort((i0,s0)=>s0-i0);return n0&&a0.push("unknown"),a0}const Dialog=Root$8,DialogPortal=Portal$2,DialogOverlay=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Overlay$1,{ref:n0,className:cn$1("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r0),...e0}));DialogOverlay.displayName=Overlay$1.displayName;const DialogContent=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(DialogPortal,{children:[jsxRuntimeExports.jsx(DialogOverlay,{}),jsxRuntimeExports.jsxs(Content$2,{ref:a0,className:cn$1("fixed left-[50%] top-[50%] z-50 grid w-[calc(100vw-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
627nded-lg",r0),...n0,children:[e0,jsxRuntimeExports.jsxs(Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsxRuntimeExports.jsx(X$2,{className:"h-4 w-4"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$2.displayName;const DialogHeader=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("flex flex-col space-y-1.5 text-center sm:text-left",r0),...e0}));DialogHeader.displayName="DialogHeader";const DialogFooter=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r0),...e0}));DialogFooter.displayName="DialogFooter";const DialogTitle=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Title,{ref:n0,className:cn$1("text-lg font-semibold leading-none tracking-tight",r0),...e0}));DialogTitle.displayName=Title.displayName;const DialogDescription=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Description,{ref:n0,className:cn$1("text-sm text-muted-foreground",r0),...e0}));DialogDescription.displayName=Description.displayName;var NAME$1="Label",Label$3=reactExports.forwardRef((r0,e0)=>jsxRuntimeExports.jsx(Primitive.label,{...r0,ref:e0,onMouseDown:n0=>{var i0;n0.target.closest("button, input, select, textarea")||((i0=r0.onMouseDown)==null||i0.call(r0,n0),!n0.defaultPrevented&&n0.detail>1&&n0.preventDefault())}}));Label$3.displayName=NAME$1;var Root$7=Label$3;const labelVariants=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Label$2=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Root$7,{ref:n0,className:cn$1(labelVariants(),r0),...e0}));Label$2.displayName=Root$7.displayName;function usePrevious(r0){const e0=reactExports.useRef({value:r0,previous:r0});return reactExports.useMemo(()=>(e0.current.value!==r0&&(e0.current.previous=e0.current.value,e0.current.value=r0),e0.current.previous),[r0])}var OPEN_KEYS=[" ","Enter","ArrowUp","ArrowDown"],SELECTION_KEYS=[" ","Enter"],SELECT_NAME="Select",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(SELECT_NAME),[createSelectContext,createSelectScope]=createContextScope(SELECT_NAME,[createCollectionScope$1,createPopperScope]),usePopperScope=createPopperScope(),[SelectProvider,useSelectContext]=createSelectContext(SELECT_NAME),[SelectNativeOptionsProvider,useSelectNativeOptionsContext]=createSelectContext(SELECT_NAME),Select$1=r0=>{const{__scopeSelect:e0,children:n0,open:a0,defaultOpen:i0,onOpenChange:s0,value:o0,defaultValue:l0,onValueChange:c0,dir:u0,name:d0,autoComplete:h0,disabled:f0,required:p0,form:A0}=r0,m0=usePopperScope(e0),[x0,g0]=reactExports.useState(null),[y0,b0]=reactExports.useState(null),[E0,w0]=reactExports.useState(!1),v0=useDirection(u0),[S0,k0]=useControllableState$1({prop:a0,defaultProp:i0??!1,onChange:s0,caller:SELECT_NAME}),[R0,j0]=useControllableState$1({prop:o0,defaultProp:l0,onChange:c0,caller:SELECT_NAME}),C0=reactExports.useRef(null),$0=x0?A0||!!x0.closest("form"):!0,[T0,I0]=reactExports.useState(new Set),M0=Array.from(T0).map(N0=>N0.props.value).join(";");return jsxRuntimeExports.jsx(Root2$5,{...m0,children:jsxRuntimeExports.jsxs(SelectProvider,{required:p0,scope:e0,trigger:x0,onTriggerChange:g0,valueNode:y0,onValueNodeChange:b0,valueNodeHasChildren:E0,onValueNodeHasChildrenChange:w0,contentId:useId(),value:R0,onValueChange:j0,open:S0,onOpenChange:k0,dir:v0,triggerPointerDownPosRef:C0,disabled:f0,children:[jsxRuntimeExports.jsx(Collection$1.Provider,{scope:e0,children:jsxRuntimeExports.jsx(SelectNativeOptionsProvider,{scope:r0.__scopeSelect,onNativeOptionAdd:reactExports.useCallback(N0=>{I0(D0=>new Set(D0).add(N0))},[]),onNativeOptionRemove:reactExports.useCallback(N0=>{I0(D0=>{const O0=new Set(D0);return O0.delete(N0),O0})},[]),children:n0})}),$0?jsxRuntimeExports.jsxs(SelectBubbleInput,{"aria-hidden":!0,required:p0,tabIndex:-1,name:d0,autoComplete:h0,value:R0,onChange:N0=>j0(N0.target.value),disabled:f0,form:A0,children:[R0===void 0?jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(T0)]},M0):null]})})};Select$1.displayName=SELECT_NAME;var TRIGGER_NAME$3="SelectTrigger",SelectTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,disabled:a0=!1,...i0}=r0,s0=usePopperScope(n0),o0=useSelectContext(TRIGGER_NAME$3,n0),l0=o0.disabled||a0,c0=useComposedRefs$1(e0,o0.onTriggerChange),u0=useCollection$1(n0),d0=reactExports.useRef("touch"),[h0,f0,p0]=useTypeaheadSearch(m0=>{const x0=u0().filter(b0=>!b0.disabled),g0=x0.find(b0=>b0.value===o0.value),y0=findNextItem(x0,m0,g0);y0!==void 0&&o0.onValueChange(y0.value)}),A0=m0=>{l0||(o0.onOpenChange(!0),p0()),m0&&(o0.triggerPointerDownPosRef.current={x:Math.round(m0.pageX),y:Math.round(m0.pageY)})};return jsxRuntimeExports.jsx(Anchor,{asChild:!0,...s0,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",role:"combobox","aria-controls":o0.contentId,"aria-expanded":o0.open,"aria-required":o0.required,"aria-autocomplete":"none",dir:o0.dir,"data-state":o0.open?"open":"closed",disabled:l0,"data-disabled":l0?"":void 0,"data-placeholder":shouldShowPlaceholder(o0.value)?"":void 0,...i0,ref:c0,onClick:composeEventHandlers(i0.onClick,m0=>
vendor: 22,007 bytes, line 627
627{m0.currentTarget.focus(),d0.current!=="mouse"&&A0(m0)}),onPointerDown:composeEventHandlers(i0.onPointerDown,m0=>{d0.current=m0.pointerType;const x0=m0.target;x0.hasPointerCapture(m0.pointerId)&&x0.releasePointerCapture(m0.pointerId),m0.button===0&&m0.ctrlKey===!1&&m0.pointerType==="mouse"&&(A0(m0),m0.preventDefault())}),onKeyDown:composeEventHandlers(i0.onKeyDown,m0=>{const x0=h0.current!=="";!(m0.ctrlKey||m0.altKey||m0.metaKey)&&m0.key.length===1&&f0(m0.key),!(x0&&m0.key===" ")&&OPEN_KEYS.includes(m0.key)&&(A0(),m0.preventDefault())})})})});SelectTrigger$1.displayName=TRIGGER_NAME$3;var VALUE_NAME="SelectValue",SelectValue$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,className:a0,style:i0,children:s0,placeholder:o0="",...l0}=r0,c0=useSelectContext(VALUE_NAME,n0),{onValueNodeHasChildrenChange:u0}=c0,d0=s0!==void 0,h0=useComposedRefs$1(e0,c0.onValueNodeChange);return useLayoutEffect2(()=>{u0(d0)},[u0,d0]),jsxRuntimeExports.jsx(Primitive.span,{...l0,ref:h0,style:{pointerEvents:"none"},children:shouldShowPlaceholder(c0.value)?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:o0}):s0})});SelectValue$1.displayName=VALUE_NAME;var ICON_NAME="SelectIcon",SelectIcon=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,children:a0,...i0}=r0;return jsxRuntimeExports.jsx(Primitive.span,{"aria-hidden":!0,...i0,ref:e0,children:a0||"â¼"})});SelectIcon.displayName=ICON_NAME;var PORTAL_NAME="SelectPortal",SelectPortal=r0=>jsxRuntimeExports.jsx(Portal$5,{asChild:!0,...r0});SelectPortal.displayName=PORTAL_NAME;var CONTENT_NAME$2="SelectContent",SelectContent$1=reactExports.forwardRef((r0,e0)=>{const n0=useSelectContext(CONTENT_NAME$2,r0.__scopeSelect),[a0,i0]=reactExports.useState();if(useLayoutEffect2(()=>{i0(new DocumentFragment)},[]),!n0.open){const s0=a0;return s0?reactDomExports.createPortal(jsxRuntimeExports.jsx(SelectContentProvider,{scope:r0.__scopeSelect,children:jsxRuntimeExports.jsx(Collection$1.Slot,{scope:r0.__scopeSelect,children:jsxRuntimeExports.jsx("div",{children:r0.children})})}),s0):null}return jsxRuntimeExports.jsx(SelectContentImpl,{...r0,ref:e0})});SelectContent$1.displayName=CONTENT_NAME$2;var CONTENT_MARGIN=10,[SelectContentProvider,useSelectContentContext]=createSelectContext(CONTENT_NAME$2),CONTENT_IMPL_NAME="SelectContentImpl",Slot=createSlot("SelectContent.RemoveScroll"),SelectContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,position:a0="item-aligned",onCloseAutoFocus:i0,onEscapeKeyDown:s0,onPointerDownOutside:o0,side:l0,sideOffset:c0,align:u0,alignOffset:d0,arrowPadding:h0,collisionBoundary:f0,collisionPadding:p0,sticky:A0,hideWhenDetached:m0,avoidCollisions:x0,...g0}=r0,y0=useSelectContext(CONTENT_NAME$2,n0),[b0,E0]=reactExports.useState(null),[w0,v0]=reactExports.useState(null),S0=useComposedRefs$1(e0,_w=>E0(_w)),[k0,R0]=reactExports.useState(null),[j0,C0]=reactExports.useState(null),$0=useCollection$1(n0),[T0,I0]=reactExports.useState(!1),M0=reactExports.useRef(!1);reactExports.useEffect(()=>{if(b0)return hideOthers(b0)},[b0]),useFocusGuards();const N0=reactExports.useCallback(_w=>{const[J0,...Cw]=$0().map(Nw=>Nw.ref.current),[Ow]=Cw.slice(-1),jw=document.activeElement;for(const Nw of _w)if(Nw===jw||(Nw==null||Nw.scrollIntoView({block:"nearest"}),Nw===J0&&w0&&(w0.scrollTop=0),Nw===Ow&&w0&&(w0.scrollTop=w0.scrollHeight),Nw==null||Nw.focus(),document.activeElement!==jw))return},[$0,w0]),D0=reactExports.useCallback(()=>N0([k0,b0]),[N0,k0,b0]);reactExports.useEffect(()=>{T0&&D0()},[T0,D0]);const{onOpenChange:O0,triggerPointerDownPosRef:B0}=y0;reactExports.useEffect(()=>{if(b0){let _w={x:0,y:0};const J0=Ow=>{var jw,Nw;_w={x:Math.abs(Math.round(Ow.pageX)-(((jw=B0.current)==null?void 0:jw.x)??0)),y:Math.abs(Math.round(Ow.pageY)-(((Nw=B0.current)==null?void 0:Nw.y)??0))}},Cw=Ow=>{_w.x<=10&&_w.y<=10?Ow.preventDefault():b0.contains(Ow.target)||O0(!1),document.removeEventListener("pointermove",J0),B0.current=null};return B0.current!==null&&(document.addEventListener("pointermove",J0),document.addEventListener("pointerup",Cw,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J0),document.removeEventListener("pointerup",Cw,{capture:!0})}}},[b0,O0,B0]),reactExports.useEffect(()=>{const _w=()=>O0(!1);return window.addEventListener("blur",_w),window.addEventListener("resize",_w),()=>{window.removeEventListener("blur",_w),window.removeEventListener("resize",_w)}},[O0]);const[z0,G0]=useTypeaheadSearch(_w=>{const J0=$0().filter(jw=>!jw.disabled),Cw=J0.find(jw=>jw.ref.current===document.activeElement),Ow=findNextItem(J0,_w,Cw);Ow&&setTimeout(()=>Ow.ref.current.focus())}),F0=reactExports.useCallback((_w,J0,Cw)=>{const Ow=!M0.current&&!Cw;(y0.value!==void 0&&y0.value===J0||Ow)&&(R0(_w),Ow&&(M0.current=!0))},[y0.value]),Q0=reactExports.useCallback(()=>b0==null?void 0:b0.focus(),[b0]),U0=reactExports.useCallback((_w,J0,Cw)=>{const Ow=!M0.current&&!Cw;(y0.value!==void 0&&y0.value===J0||Ow)&&C0(_w)},[y0.value]),q0=a0==="popper"?SelectPopperPosition:SelectItemAlignedPosition,Rw=q0===SelectPopperPosition?{side:l0,sideOffset:c0,align:u0,alignOffset:d0,arrowPadding:h0,collisionBoundary:f0,collisionPadding:p0,sticky:A0,hideWhenDetached:m0,avoidCollisions:x0}:{};return jsxRuntimeExports.jsx(SelectContentProvider,{scope:n0,content:b0,viewport:w0,onViewportChange:v0,itemRefCallback:F0,selectedItem:k0,onItemLeave:Q0,itemTextRefCallback:U0,focusSelectedItem:D0,selectedItemText:j0,position:a0,isPositioned:T0,searchRef:z0,children:jsxRuntimeExports.jsx(ReactRemoveScroll,{as:Slot,allowPinchZoom:!0,children:jsxRuntimeExports.jsx(FocusScope,{asChild:!0,trapped:y0.open,onMountAutoFocus:_w=>{_w.preventDefault()},onUnmountAutoFocus:composeEventHandlers(i0,_w=>{var J0;(J0=y0.trigger)==null||J0.focus({preventScroll:!0}),_w.preventDefault()}),children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s0,onPointerDownOutside:o0,onFocusOutside:_w=>_w.preventDefault(),onDismiss:()=>y0.onOpenChange(!1),children:jsxRuntimeExports.jsx(q0,{role:"listbox",id:y0.contentId,"data-state":y0.open?"open":"closed",dir:y0.dir,onContextMenu:_w=>_w.preventDefault(),...g0,...Rw,onPlaced:()=>I0(!0),ref:S0,style:{display:"flex",flexDirection:"column",outline:"none",...g0.style},onKeyDown:composeEventHandlers(g0.onKeyDown,_w=>{const J0=_w.ctrlKey||_w.altKey||_w.metaKey;if(_w.key==="Tab"&&_w.preventDefault(),!J0&&_w.key.length===1&&G0(_w.key),["ArrowUp","ArrowDown","Home","End"].includes(_w.key)){let Ow=$0().filter(jw=>!jw.disabled).map(jw=>jw.ref.current);if(["ArrowUp","End"].includes(_w.key)&&(Ow=Ow.slice().reverse()),["ArrowUp","ArrowDown"].includes(_w.key)){const jw=_w.target,Nw=Ow.indexOf(jw);Ow=Ow.slice(Nw+1)}setTimeout(()=>N0(Ow)),_w.preventDefault()}})})})})})})});SelectContentImpl.displayName=CONTENT_IMPL_NAME;var ITEM_ALIGNED_POSITION_NAME="SelectItemAlignedPosition",SelectItemAlignedPosition=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,onPlaced:a0,...i0}=r0,s0=useSelectContext(CONTENT_NAME$2,n0),o0=useSelectContentContext(CONTENT_NAME$2,n0),[l0,c0]=reactExports.useState(null),[u0,d0]=reactExports.useState(null),h0=useComposedRefs$1(e0,S0=>d0(S0)),f0=useCollection$1(n0),p0=reactExports.useRef(!1),A0=reactExports.useRef(!0),{viewport:m0,selectedItem:x0,selectedItemText:g0,focusSelectedItem:y0}=o0,b0=reactExports.useCallback(()=>{if(s0.trigger&&s0.valueNode&&l0&&u0&&m0&&x0&&g0){const S0=s0.trigger.getBoundingClientRect(),k0=u0.getBoundingClientRect(),R0=s0.valueNode.getBoundingClientRect(),j0=g0.getBoundingClientRect();if(s0.dir!=="rtl"){const jw=j0.left-k0.left,Nw=R0.left-jw,xw=S0.left-Nw,X0=S0.width+xw,Lw=Math.max(X0,k0.width),Hw=window.innerWidth-CONTENT_MARGIN,Ww=clamp(Nw,[CONTENT_MARGIN,Math.max(CONTENT_MARGIN,Hw-Lw)]);l0.style.minWidth=X0+"px",l0.style.left=Ww+"px"}else{const jw=k0.right-j0.right,Nw=window.innerWidth-R0.right-jw,xw=window.innerWidth-S0.right-Nw,X0=S0.width+xw,Lw=Math.max(X0,k0.width),Hw=window.innerWidth-CONTENT_MARGIN,Ww=clamp(Nw,[CONTENT_MARGIN,Math.max(CONTENT_MARGIN,Hw-Lw)]);l0.style.minWidth=X0+"px",l0.style.right=Ww+"px"}const C0=f0(),$0=window.innerHeight-CONTENT_MARGIN*2,T0=m0.scrollHeight,I0=window.getComputedStyle(u0),M0=parseInt(I0.borderTopWidth,10),N0=parseInt(I0.paddingTop,10),D0=parseInt(I0.borderBottomWidth,10),O0=parseInt(I0.paddingBottom,10),B0=M0+N0+T0+O0+D0,z0=Math.min(x0.offsetHeight*5,B0),G0=window.getComputedStyle(m0),F0=parseInt(G0.paddingTop,10),Q0=parseInt(G0.paddingBottom,10),U0=S0.top+S0.height/2-CONTENT_MARGIN,q0=$0-U0,Rw=x0.offsetHeight/2,_w=x0.offsetTop+Rw,J0=M0+N0+_w,Cw=B0-J0;if(J0<=U0){const jw=C0.length>0&&x0===C0[C0.length-1].ref.current;l0.style.bottom="0px";const Nw=u0.clientHeight-m0.offsetTop-m0.offsetHeight,xw=Math.max(q0,Rw+(jw?Q0:0)+Nw+D0),X0=J0+xw;l0.style.height=X0+"px"}else{const jw=C0.length>0&&x0===C0[0].ref.current;l0.style.top="0px";const xw=Math.max(U0,M0+m0.offsetTop+(jw?F0:0)+Rw)+Cw;l0.style.height=xw+"px",m0.scrollTop=J0-U0+m0.offsetTop}l0.style.margin=`${CONTENT_MARGIN}px 0`,l0.style.minHeight=z0+"px",l0.style.maxHeight=$0+"px",a0==null||a0(),requestAnimationFrame(()=>p0.current=!0)}},[f0,s0.trigger,s0.valueNode,l0,u0,m0,x0,g0,s0.dir,a0]);useLayoutEffect2(()=>b0(),[b0]);const[E0,w0]=reactExports.useState();useLayoutEffect2(()=>{u0&&w0(window.getComputedStyle(u0).zIndex)},[u0]);const v0=reactExports.useCallback(S0=>{S0&&A0.current===!0&&(b0(),y0==null||y0(),A0.current=!1)},[b0,y0]);return jsxRuntimeExports.jsx(SelectViewportProvider,{scope:n0,contentWrapper:l0,shouldExpandOnScrollRef:p0,onScrollButtonChange:v0,children:jsxRuntimeExports.jsx("div",{ref:c0,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E0},children:jsxRuntimeExports.jsx(Primitive.div,{...i0,ref:h0,style:{boxSizing:"border-box",maxHeight:"100%",...i0.style}})})})});SelectItemAlignedPosition.displayName=ITEM_ALIGNED_POSITION_NAME;var POPPER_POSITION_NAME="SelectPopperPosition",SelectPopperPosition=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,align:a0="start",collisionPadding:i0=CONTENT_MARGIN,...s0}=r0,o0=usePopperScope(n0);return jsxRuntimeExports.jsx(Content$3,{...o0,...s0,ref:e0,align:a0,collisionPadding:i0,style:{boxSizing:"border-box",...s0.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});SelectPopperPosition.displayName=POPPER_POSITION_NAME;var[SelectViewportProvider,useSelectViewportContext]=createSelectContext(CONTENT_NAME$2,{}),VIEWPORT_NAME="SelectViewport",SelectViewport=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,nonce:a0,...i0}=r0,s0=useSelectContentContext(VIEWPORT_NAME,n0),o0=useSelectViewportContext(VIEWPORT_NAME,n0),l0=useComposedRefs$1(e0,s0.onViewportChange),c0=reactExports.useRef(0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a0}),jsxRuntimeExports.jsx(Collection$1.Slot,{scope:n0,children:jsxRuntimeExports.jsx(Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...i0,ref:l0,style:{position:"relative",flex:1,overflow:"hidden auto",...i0.style},onScroll:composeEventHandlers(i0.onScroll,u0=>{const d0=u0.currentTarget,{contentWrapper:h0,shouldExpandOnScrollRef:f0}=o0;if(f0!=null&&f0.current&&h0){const p0=Math.abs(c0.current-d0.scrollTop);if(p0>0){const A0=window.innerHeight-CONTENT_MARGIN*2,m0=parseFloat(h0.style.minHeight),x0=parseFloat(h0.style.height),g0=Math.max(m0,x0);if(g0<A0){const y0=g0+p0,b0=Math.min(A0,y0),E0=y0-b0;h0.style.height=b0+"px",h0.style.bottom==="0px"&&(d0.scrollTop=E0>0?E0:0,h0.style.justifyContent="flex-end")}}}c0.current=d0.scrollTop})})})]})});SelectViewport.displayName=VIEWPORT_NAME;var GROUP_NAME="SelectGroup",[SelectGroupContextProvider,useSelectGroupContext]=createSelectContext(GROUP_NAME),SelectGroup=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,...a0}=r0,i0=useId();return jsxRuntimeExports.jsx(SelectGroupContextProvider,{scope:n0,id:i0,children:jsxRuntimeExports.jsx(Primitive.div,{role:"group","aria-labelledby":i0,...a0,ref:e0})})});SelectGroup.displayName=GROUP_NAME;var LABEL_NAME="SelectLabel",SelectLabel$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,...a0}=r0,i0=useSelectGroupContext(LABEL_NAME,n0);return jsxRuntimeExports.jsx(Primitive.div,{id:i0.id,...a0,ref:e0})});SelectLabel$1.displayName=LABEL_NAME;var ITEM_NAME="SelectItem",[SelectItemContextProvider,useSelectItemContext]=createSelectContext(ITEM_NAME),SelectItem$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,value:a0,disabled:i0=!1,textValue:s0,...o0}=r0,l0=useSelectContext(ITEM_NAME,n0),c0=useSelectContentContext(ITEM_NAME,n0),u0=l0.value===a0,[d0,h0]=reactExports.useState(s0??""),[f0,p0]=reactExports.useState(!1),A0=useComposedRefs$1(e0,y0=>{var b0;return(b0=c0.itemRefCallback)==null?void 0:b0.call(c0,y0,a0,i0)}),m0=useId(),x0=reactExports.useRef("touch"),g0=()=>{i0||(l0.onValueChange(a0),l0.onOpenChange(!1))};if(a0==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return jsxRuntimeExports.jsx(SelectItemContextProvider,{scope:n0,value:a0,disabled:i0,textId:m0,isSelected:u0,onItemTextChange:reactExports.useCallback(y0=>{h0(b0=>b0||((y0==null?void 0:y0.textContent)??"").trim())},[]),children:jsxRuntimeExports.jsx(Collection$1.ItemSlot,{scope:n0,value:a0,disabled:i0,textValue:d0,children:jsxRuntimeExports.jsx(Primitive.div,{role:"option","aria-labelledby":m0,"data-highlighted":f0?"":void 0,"aria-selected":u0&&f0,"data-state":u0?"checked":"unchecked","aria-disabled":i0||void 0,"data-disabled":i0?"":void 0,tabIndex:i0?void 0:-1,...o0,ref:A0,onFocus:composeEventHandlers(o0.onFocus,()=>p0(!0)),onBlur:composeEventHandlers(o0.onBlur,()=>p0(!1)),onClick:composeEventHandlers(o0.onClick,()=>{x0.current!=="mouse"&&g0()}),onPointerUp:composeEventHandlers(o0.onPointerUp,()=>{x0.current==="mouse"&&g0()}),onPointerDown:composeEventHandlers(o0.onPointerDown,y0=>{x0.current=y0.pointerType}),onPointerMove:composeEventHandlers(o0.onPointerMove,y0=>{var b0;x0.current=y0.pointerType,i0?(b0=c0.onItemLeave)==null||b0.call(c0):x0.current==="mouse"&&y0.currentTarget.focus({preventScroll:!0})}),onPointerLeave:composeEventHandlers(o0.onPointerLeave,y0=>{var b0;y0.currentTarget===document.activeElement&&((b0=c0.onItemLeave)==null||b0.call(c0))}),onKeyDown:composeEventHandlers(o0.onKeyDown,y0=>{var E0;((E0=c0.searchRef)==null?void 0:E0.current)!==""&&y0.key===" "||(SELECTION_KEYS.includes(y0.key)&&g0(),y0.key===" "&&y0.preventDefault())})})})})});SelectItem$1.displayName=ITEM_NAME;var ITEM_TEXT_NAME="SelectItemText",SelectItemText=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,className:a0,style:i0,...s0}=r0,o0=useSelectContext(ITEM_TEXT_NAME,n0),l0=useSelectContentContext(ITEM_TEXT_NAME,n0),c0=useSelectItemContext(ITEM_TEXT_NAME,n0),u0=useSelectNativeOptionsContext(ITEM_TEXT_NAME,n0),[d0,h0]=reactExports.useState(null),f0=useComposedRefs$1(e0,g0=>h0(g0),c0.onItemTextChange,g0=>{var y0;return(y0=l0.itemTextRefCallback)==null?void 0:y0.call(l0,g0,c0.value,c0.disabled)}),p0=d0==null?void 0:d0.textContent,A0=reactExports.useMemo(()=>jsxRuntimeExports.jsx("option",{value:c0.value,disabled:c0.disabled,children:p0},c0.value),[c0.disabled,c0.value,p0]),{onNativeOptionAdd:m0,onNativeOptionRemove:x0}=u0;return useLayoutEffect2(()=>(m0(A0),()=>x0(A0)),[m0,x0,A0]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Primitive.span,{id:c0.textId,...s0,ref:f0}),c0.isSelected&&o0.valueNode&&!o0.valueNodeHasChildren?reactDomExports.createPortal(s0.children,o0.valueNode):null]})});SelectItemText.displayName=ITEM_TEXT_NAME;var ITEM_INDICATOR_NAME="SelectItemIndicator",SelectItemIndicator=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,...a0}=r0;return useSelectItemContext(ITEM_INDICATOR_NAME,n0).isSelected?jsxRuntimeExports.jsx(Primitive.span,{"aria-hidden":!0,...a0,ref:e0}):null});SelectItemIndicator.displayName=ITEM_INDICATOR_NAME;var SCROLL_UP_BUTTON_NAME="SelectScrollUpButton",SelectScrollUpButton$1=reactExports.forwardRef((r0,e0)=>{const n0=useSelectContentContext(SCROLL_UP_BUTTON_NAME,r0.__scopeSelect),a0=useSelectViewportContext(SCROLL_UP_BUTTON_NAME,r0.__scopeSelect),[i0,s0]=reactExports.useState(!1),o0=useComposedRefs$1(e0,a0.onScrollButtonChange);return useLayoutEffect2(()=>{if(n0.viewport&&n0.isPositioned){let l0=function(){const u0=c0.scrollTop>0;s0(u0)};const c0=n0.viewport;return l0(),c0.addEventListener("scroll",l0),()=>c0.removeEventListener("scroll",l0)}},[n0.viewport,n0.isPositioned]),i0?jsxRuntimeExports.jsx(SelectScrollButtonImpl,{...r0,ref:o0,onAutoScroll:()=>{const{viewport:l0,selectedItem:c0}=n0;l0&&c0&&(l0.scrollTop=l0.scrollTop-c0.offsetHeight)}}):null});SelectScrollUpButton$1.displayName=SCROLL_UP_BUTTON_NAME;var SCROLL_DOWN_BUTTON_NAME="SelectScrollDownButton",SelectScrollDownButton$1=reactExports.forwardRef((r0,e0)=>{const n0=useSelectContentContext(SCROLL_DOWN_BUTTON_NAME,r0.__scopeSelect),a0=useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME,r0.__scopeSelect),[i0,s0]=reactExports.useState(!1),o0=useComposedRefs$1(e0,a0.onScrollButtonChange);return useLayoutEffect2(()=>{if(n0.viewport&&n0.isPositioned){let l0=function(){const u0=c0.scrollHeight-c0.clientHeight,d0=Math.ceil(c0.scrollTop)<u0;s0(d0)};const c0=n0.viewport;return l0(),c0.addEventListener("scroll",l0),()=>c0.removeEventListener("scroll",l0)}},[n0.viewport,n0.isPositioned]),i0?jsxRuntimeExports.jsx(SelectScrollButtonImpl,{...r0,ref:o0,onAutoScroll:()=>{const{viewport:l0,selectedItem:c0}=n0;l0&&c0&&(l0.scrollTop=l0.scrollTop+c0.offsetHeight)}}):null});SelectScrollDownButton$1.displayName=SCROLL_DOWN_BUTTON_NAME;var SelectScrollButtonImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,onAutoScroll:a0,...i0}=r0,s0=useSelectContentContext("SelectScrollButton",n0),o0=reactExports.useRef(null),l0=useCollection$1(n0),c0=reactExports.useCallback(()=>{o0.current!==null&&(window.clearInterval(o0.current),o0.current=null)},[]);return reactExports.useEffect(()=>()=>c0(),[c0]),useLayoutEffect2(()=>{var d0;const u0=l0().find(h0=>h0.ref.current===document.activeElement);(d0=u0==null?void 0:u0.ref.current)==null||d0.scrollIntoView({block:"nearest"})},[l0]),jsxRuntimeExports.jsx(Primitive.div,{"aria-hidden":!0,...i0,ref:e0,style:{flexShrink:0,...i0.style},onPointerDown:composeEventHandlers(i0.onPointerDown,()=>{o0.current===null&&(o0.current=window.setInterval(a0,50))}),onPointerMove:composeEventHandlers(i0.onPointerMove,()=>{var u0;(u0=s0.onItemLeave)==null||u0.call(s0),o0.current===null&&(o0.current=window.setInterval(a0,50))}),onPointerLeave:composeEventHandlers(i0.onPointerLeave,()=>{c0()})})}),SEPARATOR_NAME="SelectSeparator",SelectSeparator$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,...a0}=r0;return jsxRuntimeExports.jsx(Primitive.div,{"aria-hidden":!0,...a0,ref:e0})});SelectSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME="SelectArrow",SelectArrow=reactExports.forwardRef((r0,e0)=>{const{__scopeSelect:n0,...a0}=r0,i0=usePopperScope(n0),s0=useSelectContext(ARROW_NAME,n0),o0=useSelectContentContext(ARROW_NAME,n0);return s0.open&&o0.position==="popper"?jsxRuntimeExports.jsx(Arrow,{...i0,...a0,ref:e0}):null});SelectArrow.displayName=ARROW_NAME;var BUBBLE_INPUT_NAME$3="SelectBubbleInput",SelectBubbleInput=reactExports.forwardRef(({__scopeSelect:r0,value:e0,...n0},a0)=>{const i0=reactExports.useRef(null),s0=useComposedRefs$1(a0,i0),o0=usePrevious(e0);return reactExports.useEffect(()=>{const l0=i0.current;if(!l0)return;const c0=window.HTMLSelectElement.prototype,d0=Object.getOwnPropertyDescriptor(c0,"value").set;if(o0!==e0&&d0){const h0=new Event("change",{bubbles:!0});d0.call(l0,e0),l0.dispatchEvent(h0)}},[o0,e0]),jsxRuntimeExports.jsx(Primitive.select,{...n0,style:{...VISUALLY_HIDDEN_STYLES,...n0.style},ref:s0,defaultValue:e0})});SelectBubbleInput.displayName=BUBBLE_INPUT_NAME$3;function shouldShowPlaceholder(r0){return r0===""||r0===void 0}function useTypeaheadSearch(r0){const e0=useCallbackRef$2(r0),n0=reactExports.useRef(""),a0=reactExports.useRef(0),i0=reactExports.useCallback(o0=>{const l0=n0.current+o0;e0(l0),function c0(u0){n0.current=u0,window.clearTimeout(a0.current),u0!==""&&(a0.current=window.setTimeout(()=>c0(""),1e3))}(l0)},[e0]),s0=reactExports.useCallback(()=>{n0.current="",window.clearTimeout(a0.current)},[]);return reactExports.useEffect(()=>()=>window.clearTimeout(a0.current),[]),[n0,i0,s0]}function findNextItem(r0,e0,n0){const i0=e0.length>1&&Array.from(e0).every(u0=>u0===e0[0])?e0[0]:e0,s0=n0?r0.indexOf(n0):-1;let o0=wrapArray(r0,Math.max(s0,0));i0.length===1&&(o0=o0.filter(u0=>u0!==n0));const c0=o0.find(u0=>u0.textValue.toLowerCase().startsWith(i0.toLowerCase()));return c0!==n0?c0:void 0}function wrapArray(r0,e0){return r0.map((n0,a0)=>r0[(e0+a0)%r0.length])}var Root2$1=Select$1,Trigger$1=SelectTrigger$1,Value=SelectValue$1,Icon=SelectIcon,Portal$1=SelectPortal,Content2=SelectContent$1,Viewport=SelectViewport,Label$1=SelectLabel$1,Item$1=SelectItem$1,ItemText=SelectItemText,ItemIndicator=SelectItemIndicator,ScrollUpButton=SelectScrollUpButton$1,ScrollDownButton=SelectScrollDownButton$1,Separator$2=SelectSeparator$1;const Select=Root2$1,SelectValue=Value,SelectTrigger=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(Trigger$1,{ref:a0,className:cn$1("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
627ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r0),...n0,children:[e0,jsxRuntimeExports.jsx(Icon,{asChild:!0,children:jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));SelectTrigger.displayName=Trigger$1.displayName;const SelectScrollUpButton=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(ScrollUpButton,{ref:n0,className:cn$1("flex cursor-default items-center justify-center py-1",r0),...e0,children:jsxRuntimeExports.jsx(ChevronUp,{className:"h-4 w-4"})}));SelectScrollUpButton.displayName=ScrollUpButton.displayName;const SelectScrollDownButton=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(ScrollDownButton,{ref:n0,className:cn$1("flex cursor-default items-center justify-center py-1",r0),...e0,children:jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4"})}));SelectScrollDownButton.displayName=ScrollDownButton.displayName;const SelectContent=reactExports.forwardRef(({className:r0,children:e0,position:n0="popper",...a0},i0)=>jsxRuntimeExports.jsx(Portal$1,{children:jsxRuntimeExports.jsxs(Content2,{ref:i0,className:cn$1("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n0==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r0),position:n0,...a0,children:[jsxRuntimeExports.jsx(SelectScrollUpButton,{}),jsxRuntimeExports.jsx(Viewport,{className:cn$1("p-1",n0==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e0}),jsxRuntimeExports.jsx(SelectScrollDownButton,{})]})}));SelectContent.displayName=Content2.displayName;const SelectLabel=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Label$1,{ref:n0,className:cn$1("py-1.5 pl-8 pr-2 text-sm font-semibold",r0),...e0}));SelectLabel.displayName=Label$1.displayName;const SelectItem=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(Item$1,{ref:a0,className:cn$1("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r0),...n0,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator,{children:jsxRuntimeExports.jsx(Check,{className:"h-4 w-4"})})}),jsxRuntimeExports.jsx(ItemText,{children:e0})]}));SelectItem.displayName=Item$1.displayName;const SelectSeparator=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Separator$2,{ref:n0,className:cn$1("-mx-1 my-1 h-px bg-muted",r0),...e0}));SelectSeparator.displayName=Separator$2.displayName;var NAME="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$1=reactExports.forwardRef((r0,e0)=>{const{decorative:n0,orientation:a0=DEFAULT_ORIENTATION,...i0}=r0,s0=isValidOrientation(a0)?a0:DEFAULT_ORIENTATION,l0=n0?{role:"none"}:{"aria-orientation":s0==="vertical"?s0:void 0,role:"separator"};return jsxRuntimeExports.jsx(Primitive.div,{"data-orientation":s0,...l0,...i0,ref:e0})});Separator$1.displayName=NAME;function isValidOrientation(r0){return ORIENTATIONS.includes(r0)}var Root$6=Separator$1;const Separator=reactExports.forwardRef(({className:r0,orientation:e0="horizontal",decorative:n0=!0,...a0},i0)=>jsxRuntimeExports.jsx(Root$6,{ref:i0,decorative:n0,orientation:e0,className:cn$1("shrink-0 bg-border",e0==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r0),...a0}));Separator.displayName=Root$6.displayName;const WriterAutocomplete=reactExports.forwardRef(function({value:e0,onChange:n0,allWriters:a0,placeholder:i0="Add writers...",className:s0,id:o0,onConfirm:l0},c0){const[u0,d0]=reactExports.useState(!1),[h0,f0]=reactExports.useState([]),[p0,A0]=reactExports.useState(0),[m0,x0]=reactExports.useState(-1),g0=reactExports.useRef(null),y0=reactExports.useRef(null),b0=reactExports.useRef(),E0=reactExports.useCallback($0=>$0.split(",").map(T0=>T0.trim()).filter(T0=>T0.length>0),[]),w0=reactExports.useCallback(($0,T0)=>{let I0=$0.lastIndexOf(",",T0-1);for(I0=I0===-1?0:I0+1;I0<T0&&$0[I0]===" ";)I0++;let M0=$0.indexOf(",",T0);return M0=M0===-1?$0.length:M0,{word:$0.slice(I0,M0).trim(),start:I0,end:M0}},[]),v0=reactExports.useCallback(($0,T0)=>{b0.current&&clearTimeout(b0.current),b0.current=setTimeout(()=>{const{word:I0}=w0($0,T0),M0=E0($0);if(I0.length>=1){const N0=a0.filter(D0=>D0.toLowerCase().includes(I0.toLowerCase())&&D0.toLowerCase()!==I0.toLowerCase()&&!M0.includes(D0));f0(N0.slice(0,8)),d0(N0.length>0)}else{const N0=a0.filter(D0=>!M0.includes(D0));f0(N0.slice(0,8)),d0(N0.length>0)}},100)},[a0,w0,E0]);reactExports.useEffect(()=>()=>{b0.current&&clearTimeout(b0.current)},[]);const S0=reactExports.useCallback($0=>{const T0=$0.target.value,I0=$0.target.selectionStart||0;$0.stopPropagation(),n0(T0),A0(I0),x0(-1),v0(T0,I0)},[n0,v0]),k0=reactExports.useCallback($0=>{if(!g0.current)return;const T0=p0,{start:I0,end:M0}=w0(e0,T0),N0=e0.slice(0,I0),D0=e0.slice(M0),O0=N0+$0+", "+D0.replace(/^,\s*/,"");n0(O0.replace(/,\s*$/,"")),d0(!1),x0(-1),setTimeout(()=>{var z0,G0;(z0=g0.current)==null||z0.focus();const B0=N0.length+$0.length+2;(G0=g0.current)==null||G0.setSelectionRange(B0,B0),v0(O0,B0)},0)},[p0,e0,w0,n0,v0]),R0=reactExports.useCallback($0=>{if($0.key===","){$0.stopPropagation(),setTimeout(()=>{const T0=e0.split(",").map(I0=>I0.trim()).filter(I0=>I0.length>0).join(", ");T0.length>0&&!T0.endsWith(", ")?n0(T0+", "):T0!==e0&&n0(T0),d0(!1),x0(-1)},10);return}
627if($0.altKey&&($0.key==="e"||$0.key==="E")){$0.preventDefault();const T0=$0.target,I0=T0.selectionStart||0,M0=$0.shiftKey?"Ã":"é",N0=e0.slice(0,I0)+M0+e0.slice(I0);n0(N0),setTimeout(()=>T0.setSelectionRange(I0+1,I0+1),0);return}if($0.key==="Enter"){if($0.preventDefault(),$0.stopPropagation(),u0&&m0>=0&&h0[m0]){k0(h0[m0]);return}const T0=e0.split(",").map(I0=>I0.trim()).filter(I0=>I0.length>0).join(", ");n0(T0),d0(!1),l0==null||l0();return}if($0.key==="Escape"){d0(!1),x0(-1);return}if(u0&&h0.length>0){if($0.key==="ArrowDown")$0.preventDefault(),x0(T0=>T0<h0.length-1?T0+1:0);else if($0.key==="ArrowUp")$0.preventDefault(),x0(T0=>T0>0?T0-1:h0.length-1);else if($0.key==="Tab"&&h0.length>0){$0.preventDefault();const T0=m0>=0?m0:0;k0(h0[T0])}}},[e0,n0,u0,m0,h0,k0,l0]),j0=reactExports.useCallback(()=>{setTimeout(()=>{var T0;const $0=e0.length;(T0=g0.current)==null||T0.setSelectionRange($0,$0),A0($0),v0(e0,$0)},0)},[e0,v0]);reactExports.useEffect(()=>{if(m0>=0&&y0.current){const $0=y0.current.children[m0];$0&&$0.scrollIntoView({block:"nearest"})}},[m0]),reactExports.useEffect(()=>{const $0=T0=>{y0.current&&!y0.current.contains(T0.target)&&g0.current&&!g0.current.contains(T0.target)&&(d0(!1),x0(-1))};return document.addEventListener("mousedown",$0),()=>document.removeEventListener("mousedown",$0)},[]);const C0=reactExports.useCallback(($0,T0)=>jsxRuntimeExports.jsx("button",{type:"button",className:cn$1("w-full text-left px-3 py-2 text-sm transition-colors",T0===m0?"bg-primary/20 text-primary":"hover:bg-muted/50"),onClick:()=>k0($0),onMouseEnter:()=>x0(T0),children:$0},`${$0}-${T0}`),[m0,k0]);return jsxRuntimeExports.jsxs("div",{className:"relative",ref:c0,onClick:$0=>$0.stopPropagation(),onMouseDown:$0=>$0.stopPropagation(),children:[jsxRuntimeExports.jsx(Input,{ref:g0,id:o0,value:e0,onChange:S0,onKeyDown:R0,onClick:$0=>$0.stopPropagation(),onMouseDown:$0=>$0.stopPropagation(),onFocus:j0,placeholder:i0,className:cn$1("bg-background",s0),autoComplete:"off",autoFocus:!0}),u0&&h0.length>0&&jsxRuntimeExports.jsxs("div",{ref:y0,className:"absolute z-50 mt-1 w-full bg-popover border border-border rounded-md shadow-lg max-h-48 overflow-y-auto",children:[jsxRuntimeExports.jsx("div",{className:"px-3 py-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground border-b border-border/50",children:"Suggestions (use ââ to navigate, Enter or Tab to select)"}),h0.map(C0)]})]})});var shim$1={exports:{}},useSyncExternalStoreShim_production={};/** 628 * @license React 629 * use-sync-external-store-shim.production.js 630 * 631 * Copyright (c) Meta Platforms, Inc. and affiliates. 632 * 633 * This source code is licensed under the MIT license found in the 634 * LICENSE file in the root directory of this source tree. 635 */var React=reactExports;function is$1(r0,e0){return r0===e0&&(r0!==0||1/r0===1/e0)||r0!==r0&&e0!==e0}var objectIs=typeof Object.is=="function"?Object.is:is$1,useState=React.useState,useEffect=React.useEffect,useLayoutEffect=React.useLayoutEffect,useDebugValue=React.useDebugValue;function useSyncExternalStore$2(r0,e0){var n0=e0(),a0=useState({inst:{value:n0,getSnapshot:e0}}),i0=a0[0].inst,s0=a0[1];return useLayoutEffect(function(){i0.value=n0,i0.getSnapshot=e0,checkIfSnapshotChanged(i0)&&s0({inst:i0})},[r0,n0,e0]),useEffect(function(){return checkIfSnapshotChanged(i0)&&s0({inst:i0}),r0(function(){checkIfSnapshotChanged(i0)&&s0({inst:i0})})},[r0]),useDebugValue(n0),n0}function checkIfSnapshotChanged(r0){var e0=r0.getSnapshot;r0=r0.value;try{var n0=e0();return!objectIs(r0,n0)}catch{return!0}}function useSyncExternalStore$1(r0,e0){return e0()}var shim=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?useSyncExternalStore$1:useSyncExternalStore$2;useSyncExternalStoreShim_production.useSyncExternalStore=React.useSyncExternalStore!==void 0?React.useSyncExternalStore:shim;shim$1.exports=useSyncExternalStoreShim_production;var shimExports=shim$1.exports;function useIsHydrated(){return shimExports.useSyncExternalStore(subscribe,()=>!0,()=>!1)}function subscribe(){return()=>{}}var AVATAR_NAME="Avatar",[createAvatarContext,createAvatarScope]=createContextScope(AVATAR_NAME),[AvatarProvider,useAvatarContext]=createAvatarContext(AVATAR_NAME),Avatar$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAvatar:n0,...a0}=r0,[i0,s0]=reactExports.useState("idle");return jsxRuntimeExports.jsx(AvatarProvider,{scope:n0,imageLoadingStatus:i0,onImageLoadingStatusChange:s0,children:jsxRuntimeExports.jsx(Primitive.span,{...a0,ref:e0})})});Avatar$1.displayName=AVATAR_NAME;var IMAGE_NAME="AvatarImage",AvatarImage$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAvatar:n0,src:a0,onLoadingStatusChange:i0=()=>{},...s0}=r0,o0=useAvatarContext(IMAGE_NAME,n0),l0=useImageLoadingStatus(a0,s0),c0=useCallbackRef$2(u0=>{i0(u0),o0.onImageLoadingStatusChange(u0)});return useLayoutEffect2(()=>{l0!=="idle"&&c0(l0)},[l0,c0]),l0==="loaded"?jsxRuntimeExports.jsx(Primitive.img,{...s0,ref:e0,src:a0}):null});AvatarImage$1.displayName=IMAGE_NAME;var FALLBACK_NAME="AvatarFallback",AvatarFallback$1=reactExports.forwardRef((r0,e0)=>{const{__scopeAvatar:n0,delayMs:a0,...i0}=r0,s0=useAvatarContext(FALLBACK_NAME,n0),[o0,l0]=reactExports.useState(a0===void 0);return reactExports.useEffect(()=>{if(a0!==void 0){const c0=window.setTimeout(()=>l0(!0),a0);return()=>window.clearTimeout(c0)}},[a0]),o0&&s0.imageLoadingStatus!=="loaded"?jsxRuntimeExports.jsx(Primitive.span,{...i0,ref:e0}):null});AvatarFallback$1.displayName=FALLBACK_NAME;function resolveLoadingStatus(r0,e0){return r0?e0?(r0.src!==e0&&(r0.src=e0),r0.complete&&r0.naturalWi
vendor: 17,564 bytes, line 635
635dth>0?"loaded":"loading"):"error":"idle"}function useImageLoadingStatus(r0,{referrerPolicy:e0,crossOrigin:n0}){const a0=useIsHydrated(),i0=reactExports.useRef(null),s0=a0?(i0.current||(i0.current=new window.Image),i0.current):null,[o0,l0]=reactExports.useState(()=>resolveLoadingStatus(s0,r0));return useLayoutEffect2(()=>{l0(resolveLoadingStatus(s0,r0))},[s0,r0]),useLayoutEffect2(()=>{const c0=h0=>()=>{l0(h0)};if(!s0)return;const u0=c0("loaded"),d0=c0("error");return s0.addEventListener("load",u0),s0.addEventListener("error",d0),e0&&(s0.referrerPolicy=e0),typeof n0=="string"&&(s0.crossOrigin=n0),()=>{s0.removeEventListener("load",u0),s0.removeEventListener("error",d0)}},[s0,n0,e0]),o0}var Root$5=Avatar$1,Image$1=AvatarImage$1,Fallback=AvatarFallback$1;const Avatar=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Root$5,{ref:n0,className:cn$1("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r0),...e0}));Avatar.displayName=Root$5.displayName;const AvatarImage=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Image$1,{ref:n0,className:cn$1("aspect-square h-full w-full",r0),...e0}));AvatarImage.displayName=Image$1.displayName;const AvatarFallback=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Fallback,{ref:n0,className:cn$1("flex h-full w-full items-center justify-center rounded-full bg-muted",r0),...e0}));AvatarFallback.displayName=Fallback.displayName;var U$1=1,Y$2=.9,H$1=.8,J$1=.17,p$2=.1,u$2=.999,$$1=.9999,k$4=.99,m$2=/[\\\/_+.#"@\[\(\{&]/,B$2=/[\\\/_+.#"@\[\(\{&]/g,K$2=/[\s-]/,X$1=/[\s-]/g;function G$1(r0,e0,n0,a0,i0,s0,o0){if(s0===e0.length)return i0===r0.length?U$1:k$4;var l0=`${i0},${s0}`;if(o0[l0]!==void 0)return o0[l0];for(var c0=a0.charAt(s0),u0=n0.indexOf(c0,i0),d0=0,h0,f0,p0,A0;u0>=0;)h0=G$1(r0,e0,n0,a0,u0+1,s0+1,o0),h0>d0&&(u0===i0?h0*=U$1:m$2.test(r0.charAt(u0-1))?(h0*=H$1,p0=r0.slice(i0,u0-1).match(B$2),p0&&i0>0&&(h0*=Math.pow(u$2,p0.length))):K$2.test(r0.charAt(u0-1))?(h0*=Y$2,A0=r0.slice(i0,u0-1).match(X$1),A0&&i0>0&&(h0*=Math.pow(u$2,A0.length))):(h0*=J$1,i0>0&&(h0*=Math.pow(u$2,u0-i0))),r0.charAt(u0)!==e0.charAt(s0)&&(h0*=$$1)),(h0<p$2&&n0.charAt(u0-1)===a0.charAt(s0+1)||a0.charAt(s0+1)===a0.charAt(s0)&&n0.charAt(u0-1)!==a0.charAt(s0))&&(f0=G$1(r0,e0,n0,a0,u0+1,s0+2,o0),f0*p$2>h0&&(h0=f0*p$2)),h0>d0&&(d0=h0),u0=n0.indexOf(c0,u0+1);return o0[l0]=d0,d0}function D$1(r0){return r0.toLowerCase().replace(X$1," ")}function W$1(r0,e0,n0){return r0=n0&&n0.length>0?`${r0+" "+n0.join(" ")}`:r0,G$1(r0,e0,D$1(r0),D$1(e0),0,0,{})}var N$1='[cmdk-group=""]',Y$1='[cmdk-group-items=""]',be$1='[cmdk-group-heading=""]',le$1='[cmdk-item=""]',ce$1=`${le$1}:not([aria-disabled="true"])`,Z$1="cmdk-item-select",T$1="data-value",Re$1=(r0,e0,n0)=>W$1(r0,e0,n0),ue$1=reactExports.createContext(void 0),K$1=()=>reactExports.useContext(ue$1),de$1=reactExports.createContext(void 0),ee$1=()=>reactExports.useContext(de$1),fe$1=reactExports.createContext(void 0),me$1=reactExports.forwardRef((r0,e0)=>{let n0=L$1(()=>{var F0,Q0;return{search:"",value:(Q0=(F0=r0.value)!=null?F0:r0.defaultValue)!=null?Q0:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a0=L$1(()=>new Set),i0=L$1(()=>new Map),s0=L$1(()=>new Map),o0=L$1(()=>new Set),l0=pe$1(r0),{label:c0,children:u0,value:d0,onValueChange:h0,filter:f0,shouldFilter:p0,loop:A0,disablePointerSelection:m0=!1,vimBindings:x0=!0,...g0}=r0,y0=useId(),b0=useId(),E0=useId(),w0=reactExports.useRef(null),v0=ke$1();k$3(()=>{if(d0!==void 0){let F0=d0.trim();n0.current.value=F0,S0.emit()}},[d0]),k$3(()=>{v0(6,T0)},[]);let S0=reactExports.useMemo(()=>({subscribe:F0=>(o0.current.add(F0),()=>o0.current.delete(F0)),snapshot:()=>n0.current,setState:(F0,Q0,U0)=>{var q0,Rw,_w,J0;if(!Object.is(n0.current[F0],Q0)){if(n0.current[F0]=Q0,F0==="search")$0(),j0(),v0(1,C0);else if(F0==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Cw=document.getElementById(E0);Cw?Cw.focus():(q0=document.getElementById(y0))==null||q0.focus()}if(v0(7,()=>{var Cw;n0.current.selectedItemId=(Cw=I0())==null?void 0:Cw.id,S0.emit()}),U0||v0(5,T0),((Rw=l0.current)==null?void 0:Rw.value)!==void 0){let Cw=Q0??"";(J0=(_w=l0.current).onValueChange)==null||J0.call(_w,Cw);return}}S0.emit()}},emit:()=>{o0.current.forEach(F0=>F0())}}),[]),k0=reactExports.useMemo(()=>({value:(F0,Q0,U0)=>{var q0;Q0!==((q0=s0.current.get(F0))==null?void 0:q0.value)&&(s0.current.set(F0,{value:Q0,keywords:U0}),n0.current.filtered.items.set(F0,R0(Q0,U0)),v0(2,()=>{j0(),S0.emit()}))},item:(F0,Q0)=>(a0.current.add(F0),Q0&&(i0.current.has(Q0)?i0.current.get(Q0).add(F0):i0.current.set(Q0,new Set([F0]))),v0(3,()=>{$0(),j0(),n0.current.value||C0(),S0.emit()}),()=>{s0.current.delete(F0),a0.current.delete(F0),n0.current.filtered.items.delete(F0);let U0=I0();v0(4,()=>{$0(),(U0==null?void 0:U0.getAttribute("id"))===F0&&C0(),S0.emit()})}),group:F0=>(i0.current.has(F0)||i0.current.set(F0,new Set),()=>{s0.current.delete(F0),i0.current.delete(F0)}),filter:()=>l0.current.shouldFilter,label:c0||r0["aria-label"],getDisablePointerSelection:()=>l0.current.disablePointerSelection,listId:y0,inputId:E0,labelId:b0,listInnerRef:w0}),[]);function R0(F0,Q0){var U0,q0;let Rw=(q0=(U0=l0.current)==null?void 0:U0.filter)!=null?q0:Re$1;return F0?Rw(F0,n0.current.search,Q0):0}function j0(){if(!n0.current.search||l0.current.shouldFilter===!1)return;let F0=n0.current.filtered.items,Q0=[];n0.current.filtered.groups.forEach(q0=>{let Rw=i0.current.get(q0),_w=0;Rw.forEach(J0=>{let Cw=F0.get(J0);_w=Math.max(Cw,_w)}),Q0.push([q0,_w])});let U0=w0.current;M0().sort((q0,Rw)=>{var _w,J0;let Cw=q0.getAttribute("id"),Ow=Rw.getAttribute("id");return((_w=F0.get(Ow))!=null?_w:0)-((J0=F0.get(Cw))!=null?J0:0)}).forEach(q0=>{let Rw=q0.closest(Y$1);Rw?Rw.appendChild(q0.parentElement===Rw?q0:q0.closest(`${Y$1} > *`)):U0.appendChild(q0.parentElement===U0?q0:q0.closest(`${Y$1} > *`))}),Q0.sort((q0,Rw)=>Rw[1]-q0[1]).forEach(q0=>{var Rw;let _w=(Rw=w0.current)==null?void 0:Rw.querySelector(`${N$1}[${T$1}="${encodeURIComponent(q0[0])}"]`);_w==null||_w.parentElement.appendChild(_w)})}function C0(){let F0=M0().find(U0=>U0.getAttribute("aria-disabled")!=="true"),Q0=F0==null?void 0:F0.getAttribute(T$1);S0.setState("value",Q0||void 0)}function $0(){var F0,Q0,U0,q0;if(!n0.current.search||l0.current.shouldFilter===!1){n0.current.filtered.count=a0.current.size;return}n0.current.filtered.groups=new Set;let Rw=0;for(let _w of a0.current){let J0=(Q0=(F0=s0.current.get(_w))==null?void 0:F0.value)!=null?Q0:"",Cw=(q0=(U0=s0.current.get(_w))==null?void 0:U0.keywords)!=null?q0:[],Ow=R0(J0,Cw);n0.current.filtered.items.set(_w,Ow),Ow>0&&Rw++}for(let[_w,J0]of i0.current)for(let Cw of J0)if(n0.current.filtered.items.get(Cw)>0){n0.current.filtered.groups.add(_w);break}n0.current.filtered.count=Rw}function T0(){var F0,Q0,U0;let q0=I0();q0&&(((F0=q0.parentElement)==null?void 0:F0.firstChild)===q0&&((U0=(Q0=q0.closest(N$1))==null?void 0:Q0.querySelector(be$1))==null||U0.scrollIntoView({block:"nearest"})),q0.scrollIntoView({block:"nearest"}))}function I0(){var F0;return(F0=w0.current)==null?void 0:F0.querySelector(`${le$1}[aria-selected="true"]`)}function M0(){var F0;return Array.from(((F0=w0.current)==null?void 0:F0.querySelectorAll(ce$1))||[])}function N0(F0){let Q0=M0()[F0];Q0&&S0.setState("value",Q0.getAttribute(T$1))}function D0(F0){var Q0;let U0=I0(),q0=M0(),Rw=q0.findIndex(J0=>J0===U0),_w=q0[Rw+F0];(Q0=l0.current)!=null&&Q0.loop&&(_w=Rw+F0<0?q0[q0.length-1]:Rw+F0===q0.length?q0[0]:q0[Rw+F0]),_w&&S0.setState("value",_w.getAttribute(T$1))}function O0(F0){let Q0=I0(),U0=Q0==null?void 0:Q0.closest(N$1),q0;for(;U0&&!q0;)U0=F0>0?we$1(U0,N$1):De$1(U0,N$1),q0=U0==null?void 0:U0.querySelector(ce$1);q0?S0.setState("value",q0.getAttribute(T$1)):D0(F0)}let B0=()=>N0(M0().length-1),z0=F0=>{F0.preventDefault(),F0.metaKey?B0():F0.altKey?O0(1):D0(1)},G0=F0=>{F0.preventDefault(),F0.metaKey?N0(0):F0.altKey?O0(-1):D0(-1)};return reactExports.createElement(Primitive.div,{ref:e0,tabIndex:-1,...g0,"cmdk-root":"",onKeyDown:F0=>{var Q0;(Q0=g0.onKeyDown)==null||Q0.call(g0,F0);let U0=F0.nativeEvent.isComposing||F0.keyCode===229;if(!(F0.defaultPrevented||U0))switch(F0.key){case"n":case"j":{x0&&F0.ctrlKey&&z0(F0);break}case"ArrowDown":{z0(F0);break}case"p":case"k":{x0&&F0.ctrlKey&&G0(F0);break}case"ArrowUp":{G0(F0);break}case"Home":{F0.preventDefault(),N0(0);break}case"End":{F0.preventDefault(),B0();break}case"Enter":{F0.preventDefault();let q0=I0();if(q0){let Rw=new Event(Z$1);q0.dispatchEvent(Rw)}}}}},reactExports.createElement("label",{"cmdk-label":"",htmlFor:k0.inputId,id:k0.labelId,style:Te$1},c0),B$1(r0,F0=>reactExports.createElement(de$1.Provider,{value:S0},reactExports.createElement(ue$1.Provider,{value:k0},F0))))}),he$1=reactExports.forwardRef((r0,e0)=>{var n0,a0;let i0=useId(),s0=reactExports.useRef(null),o0=reactExports.useContext(fe$1),l0=K$1(),c0=pe$1(r0),u0=(a0=(n0=c0.current)==null?void 0:n0.forceMount)!=null?a0:o0==null?void 0:o0.forceMount;k$3(()=>{if(!u0)return l0.item(i0,o0==null?void 0:o0.id)},[u0]);let d0=ve$1(i0,s0,[r0.value,r0.children,s0],r0.keywords),h0=ee$1(),f0=P$2(v0=>v0.value&&v0.value===d0.current),p0=P$2(v0=>u0||l0.filter()===!1?!0:v0.search?v0.filtered.items.get(i0)>0:!0);reactExports.useEffect(()=>{let v0=s0.current;if(!(!v0||r0.disabled))return v0.addEventListener(Z$1,A0),()=>v0.removeEventListener(Z$1,A0)},[p0,r0.onSelect,r0.disabled]);function A0(){var v0,S0;m0(),(S0=(v0=c0.current).onSelect)==null||S0.call(v0,d0.current)}function m0(){h0.setState("value",d0.current,!0)}if(!p0)return null;let{disabled:x0,value:g0,onSelect:y0,forceMount:b0,keywords:E0,...w0}=r0;return reactExports.createElement(Primitive.div,{ref:composeRefs$1(s0,e0),...w0,id:i0,"cmdk-item":"",role:"option","aria-disabled":!!x0,"aria-selected":!!f0,"data-disabled":!!x0,"data-selected":!!f0,onPointerMove:x0||l0.getDisablePointerSelection()?void 0:m0,onClick:x0?void 0:A0},r0.children)}),Ee$1=reactExports.forwardRef((r0,e0)=>{let{heading:n0,children:a0,forceMount:i0,...s0}=r0,o0=useId(),l0=reactExports.useRef(null),c0=reactExports.useRef(null),u0=useId(),d0=K$1(),h0=P$2(p0=>i0||d0.filter()===!1?!0:p0.search?p0.filtered.groups.has(o0):!0);k$3(()=>d0.group(o0),[]),ve$1(o0,l0,[r0.value,r0.heading,c0]);let f0=reactExports.useMemo(()=>({id:o0,forceMount:i0}),[i0]);return reactExports.createElement(Primitive.div,{ref:composeRefs$1(l0,e0),...s0,"cmdk-group":"",role:"presentation",hidden:h0?void 0:!0},n0&&reactExports.createElement("div",{ref:c0,"cmdk-group-heading":"","aria-hidden":!0,id:u0},n0),B$1(r0,p0=>reactExports.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n0?u0:void 0},reactExports.createElement(fe$1.Provider,{value:f0},p0))))}),ye$1=reactExports.forwardRef((r0,e0)=>{let{alwaysRender:n0,...a0}=r0,i0=reactExports.useRef(null),s0=P$2(o0=>!o0.search);return!n0&&!s0?null:reactExports.createElement(Primitive.div,{ref:composeRefs$1(i0,e0),...a0,"cmdk-separator":"",role:"separator"})}),Se$1=reactExports.forwardRef((r0,e0)=>{let{onValueChange:n0,...a0}=r0,i0=r0.value!=null,s0=ee$1(),o0=P$2(u0=>u0.search),l0=P$2(u0=>u0.selectedItemId),c0=K$1();return reactExports.useEffect(()=>{r0.value!=null&&s0.setState("search",r0.value)},[r0.value]),reactExports.createElement(Primitive.input,{ref:e0,...a0,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c0.listId,"aria-labelledby":c0.labelId,"aria-activedescendant":l0,id:c0.inputId,type:"text",value:i0?r0.value:o0,onChange:u0=>{i0||s0.setState("search",u0.target.value),n0==null||n0(u0.target.value)}})}),Ce$1=reactExports.forwardRef((r0,e0)=>{let{children:n0,label:a0="Suggestions",...i0}=r0,s0=reactExports.useRef(null),o0=reactExports.useRef(null),l0=P$2(u0=>u0.selectedItemId),c0=K$1();return reactExports.useEffect(()=>{if(o0.current&&s0.current){let u0=o0.current,d0=s0.current,h0,f0=new ResizeObserver(()=>{h0=requestAnimationFrame(()=>{let p0=u0.offsetHeight;d0.style.setProperty("--cmdk-list-height",p0.toFixed(1)+"px")})});return f0.observe(u0),()=>{cancelAnimationFrame(h0),f0.unobserve(u0)}}},[]),reactExports.createElement(Primitive.div,{ref:composeRefs$1(s0,e0),...i0,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l0,"aria-label":a0,id:c0.listId},B$1(r0,u0=>reactExports.createElement("div",{ref:composeRefs$1(o0,c0.listInnerRef),"cmdk-list-sizer":""},u0)))}),xe$1=reactExports.forwardRef((r0,e0)=>{let{open:n0,onOpenChange:a0,overlayClassName:i0,contentClassName:s0,container:o0,...l0}=r0;return reactExports.createElement(Root$8,{open:n0,onOpenChange:a0},reactExports.createElement(Portal$2,{container:o0},reactExports.createElement(Overlay$1,{"cmdk-overlay":"",className:i0}),reactExports.createElement(Content$2,{"aria-label":r0.label,"cmdk-dialog":"",className:s0},reactExports.createElement(me$1,{ref:e0,...l0}))))}),Ie$1=reactExports.forwardRef((r0,e0)=>P$2(n0=>n0.filtered.count===0)?reactExports.createElement(Primitive.div,{ref:e0,...r0,"cmdk-empty":"",role:"presentation"}):null),Pe$1=reactExports.forwardRef((r0,e0)=>{let{progress:n0,children:a0,label:i0="Loading...",...s0}=r0;return reactExports.createElement(Primitive.div,{ref:e0,...s0,"cmdk-loading":"",role:"progressbar","aria-valuenow":n0,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i0},B$1(r0,o0=>reactExports.createElement("div",{"aria-hidden":!0},o0)))}),_e$1=Object.assign(me$1,{List:Ce$1,Item:he$1,Input:Se$1,Group:Ee$1,Separator:ye$1,Dialog:xe$1,Empty:Ie$1,Loading:Pe$1});function we$1(r0,e0){let n0=r0.nextElementSibling;for(;n0;){if(n0.matches(e0))return n0;n0=n0.nextElementSibling}}function De$1(r0,e0){let n0=r0.previousElementSibling;for(;n0;){if(n0.matches(e0))return n0;n0=n0.previousElementSibling}}function pe$1(r0){let e0=reactExports.useRef(r0);return k$3(()=>{e0.current=r0}),e0}var k$3=typeof window>"u"?reactExports.useEffect:reactExports.useLayoutEffect;function L$1(r0){let e0=reactExports.useRef();return e0.current===void 0&&(e0.current=r0()),e0}function P$2(r0){let e0=ee$1(),n0=()=>r0(e0.snapshot());return reactExports.useSyncExternalStore(e0.subscribe,n0,n0)}function ve$1(r0,e0,n0,a0=[]){let i0=reactExports.useRef(),s0=K$1();return k$3(()=>{var o0;let l0=(()=>{var u0;for(let d0 of n0){if(typeof d0=="string")return d0.trim();if(typeof d0=="object"&&"current"in d0)return d0.current?(u0=d0.current.textContent)==null?void 0:u0.trim():i0.current}})(),c0=a0.map(u0=>u0.trim());s0.value(r0,l0,c0),(o0=e0.current)==null||o0.setAttribute(T$1,l0),i0.current=l0}),i0}var ke$1=()=>{let[r0,e0]=reactExports.useState(),n0=L$1(()=>new Map);return k$3(()=>{n0.current.forEach(a0=>a0()),n0.current=new Map},[r0]),(a0,i0)=>{n0.current.set(a0,i0),e0({})}};function Me$1(r0){let e0=r0.type;return typeof e0=="function"?e0(r0.props):"render"in e0?e0.render(r0.props):r0}function B$1({asChild:r0,children:e0},n0){return r0&&reactExports.isValidElement(e0)?reactExports.cloneElement(Me$1(e0),{ref:e0.ref},n0(e0.props.children)):n0(e0)}var Te$1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Command=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(_e$1,{ref:n0,className:cn$1("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r0),...e0}));Command.displayName=_e$1.displayName;const CommandInput=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntimeExports.jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntimeExports.jsx(_e$1.Input,{ref:n0,className:cn$1("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",r0),...e0})]}));CommandInput.displayName=_e$1.Input.displayName;const CommandList=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(_e$1.List,{ref:n0,className:cn$1("max-h-[300px] overflow-y-auto overflow-x-hidden",r0),...e0}));CommandList.displayName=_e$1.List.displayName;const CommandEmpty=reactExports.forwardRef((r0,e0)=>jsxRuntimeExports.jsx(_e$1.Empty,{ref:e0,className:"py-6 text-center text-sm",...r0}));CommandEmpty.displayName=_e$1.Empty.displayName;const CommandGroup=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(_e$1.Group,{ref:n0,className:cn$1("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",r0),...e0}));CommandGroup.displayName=_e$1.Group.displayName;const CommandSeparator=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(_e$1.Separator,{ref:n0,className:cn$1("-mx-1 h-px bg-border",r0),...e0}));CommandSeparator.displayName=_e$1.Separator.displayName;const CommandItem=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(_e$1.Item,{ref:n0,className:cn$1("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",r0),...e0}));CommandItem.displayName=_e$1.Item.displayName;function SongwriterTagging({songId:r0,songwriters:e0,taggedSongwriters:n0,onTagSongwriter
635:a0,onUntagSongwriter:i0,onRefreshTagged:s0,isLoading:o0=!1}){const[l0,c0]=reactExports.useState(!1),[u0,d0]=reactExports.useState(!1),h0=new Set(n0.map(x0=>x0.songwriter.id)),f0=e0.filter(x0=>!h0.has(x0.id)&&x0.is_active),p0=async x0=>{d0(!0);try{await a0(r0,x0),s0(),c0(!1)}finally{d0(!1)}},A0=async x0=>{await i0(r0,x0),s0()},m0=x0=>x0.split(" ").map(g0=>g0[0]).join("").toUpperCase().slice(0,2);return jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[jsxRuntimeExports.jsx(Users,{className:"w-3.5 h-3.5"}),jsxRuntimeExports.jsx("span",{children:"Shared With"}),o0&&jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3 h-3 animate-spin"})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5",children:n0.length===0?jsxRuntimeExports.jsx("span",{className:"text-[11px] text-muted-foreground/70 italic",children:"Not shared with any songwriters"}):n0.map(x0=>jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"pl-1 pr-1 py-0.5 gap-1.5 bg-muted/50 border-border hover:bg-muted/70 transition-colors group",children:[jsxRuntimeExports.jsx(Avatar,{className:"w-4 h-4",children:jsxRuntimeExports.jsx(AvatarFallback,{className:"text-[8px] bg-primary/20 text-primary",children:m0(x0.songwriter.display_name)})}),jsxRuntimeExports.jsx("span",{className:"text-[11px] max-w-[100px] truncate",children:x0.songwriter.display_name}),jsxRuntimeExports.jsx("button",{onClick:()=>A0(x0.songwriter.id),className:"ml-0.5 hover:text-destructive transition-colors opacity-60 group-hover:opacity-100","aria-label":`Remove ${x0.songwriter.display_name}`,children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},x0.id))}),f0.length>0?jsxRuntimeExports.jsxs(Popover,{open:l0,onOpenChange:c0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-6 px-2 text-[11px] text-muted-foreground hover:text-foreground gap-1",children:[jsxRuntimeExports.jsx(Plus,{className:"w-3 h-3"}),"Add songwriter"]})}),jsxRuntimeExports.jsx(PopoverContent,{className:"w-56 p-0",align:"start",children:jsxRuntimeExports.jsxs(Command,{children:[jsxRuntimeExports.jsx(CommandInput,{placeholder:"Search songwriters...",className:"h-8 text-xs"}),jsxRuntimeExports.jsxs(CommandList,{children:[jsxRuntimeExports.jsx(CommandEmpty,{className:"text-xs py-4 text-center text-muted-foreground",children:"No songwriters found"}),jsxRuntimeExports.jsx(CommandGroup,{children:f0.map(x0=>jsxRuntimeExports.jsx(CommandItem,{value:x0.display_name,onSelect:()=>p0(x0.id),disabled:u0,className:"cursor-pointer",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Avatar,{className:"w-5 h-5",children:jsxRuntimeExports.jsx(AvatarFallback,{className:"text-[9px] bg-primary/20 text-primary",children:m0(x0.display_name)})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"text-xs",children:x0.display_name}),jsxRuntimeExports.jsx("span",{className:"text-[10px] text-muted-foreground",children:x0.email})]})]})},x0.id))})]})]})})]}):e0.length===0?jsxRuntimeExports.jsx("p",{className:"text-[10px] text-muted-foreground/60 italic",children:"No songwriters registered yet"}):jsxRuntimeExports.jsx("p",{className:"text-[10px] text-muted-foreground/60 italic",children:"All songwriters already tagged"})]})}const scriptRel="modulepreload",assetsURL=function(r0){return"/"+r0},seen={},__vitePreload=function(e0,n0,a0){let i0=Promise.resolve();if(n0&&n0.length>0){document.getElementsByTagName("link");const o0=document.querySelector("meta[property=csp-nonce]"),l0=(o0==null?void 0:o0.nonce)||(o0==null?void 0:o0.getAttribute("nonce"));i0=Promise.allSettled(n0.map(c0=>{if(c0=assetsURL(c0),c0 in seen)return;seen[c0]=!0;const u0=c0.endsWith(".css"),d0=u0?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c0}"]${d0}`))return;const h0=document.createElement("link");if(h0.rel=u0?"stylesheet":scriptRel,u0||(h0.as="script"),h0.crossOrigin="",h0.href=c0,l0&&h0.setAttribute("nonce",l0),document.head.appendChild(h0),u0)return new Promise((f0,p0)=>{h0.addEventListener("load",f0),h0.addEventListener("error",()=>p0(new Error(`Unable to preload CSS for ${c0}`)))})}))}function s0(o0){const l0=new Event("vite:preloadError",{cancelable:!0});if(l0.payload=o0,window.dispatchEvent(l0),!l0.defaultPrevented)throw o0}return i0.then(o0=>{for(const l0 of o0||[])l0.status==="rejected"&&s0(l0.reason);return e0().catch(s0)})};
vendor: 4,325 bytes, line 635
635var CHECKBOX_NAME="Checkbox",[createCheckboxContext,createCheckboxScope]=createContextScope(CHECKBOX_NAME),[CheckboxProviderImpl,useCheckboxContext]=createCheckboxContext(CHECKBOX_NAME);function CheckboxProvider(r0){const{__scopeCheckbox:e0,checked:n0,children:a0,defaultChecked:i0,disabled:s0,form:o0,name:l0,onCheckedChange:c0,required:u0,value:d0="on",internal_do_not_use_render:h0}=r0,[f0,p0]=useControllableState$1({prop:n0,defaultProp:i0??!1,onChange:c0,caller:CHECKBOX_NAME}),[A0,m0]=reactExports.useState(null),[x0,g0]=reactExports.useState(null),y0=reactExports.useRef(!1),b0=A0?!!o0||!!A0.closest("form"):!0,E0={checked:f0,disabled:s0,setChecked:p0,control:A0,setControl:m0,name:l0,form:o0,value:d0,hasConsumerStoppedPropagationRef:y0,required:u0,defaultChecked:isIndeterminate(i0)?!1:i0,isFormControl:b0,bubbleInput:x0,setBubbleInput:g0};return jsxRuntimeExports.jsx(CheckboxProviderImpl,{scope:e0,...E0,children:isFunction$4(h0)?h0(E0):a0})}var TRIGGER_NAME$2="CheckboxTrigger",CheckboxTrigger=reactExports.forwardRef(({__scopeCheckbox:r0,onKeyDown:e0,onClick:n0,...a0},i0)=>{const{control:s0,value:o0,disabled:l0,checked:c0,required:u0,setControl:d0,setChecked:h0,hasConsumerStoppedPropagationRef:f0,isFormControl:p0,bubbleInput:A0}=useCheckboxContext(TRIGGER_NAME$2,r0),m0=useComposedRefs$1(i0,d0),x0=reactExports.useRef(c0);return reactExports.useEffect(()=>{const g0=s0==null?void 0:s0.form;if(g0){const y0=()=>h0(x0.current);return g0.addEventListener("reset",y0),()=>g0.removeEventListener("reset",y0)}},[s0,h0]),jsxRuntimeExports.jsx(Primitive.button,{type:"button",role:"checkbox","aria-checked":isIndeterminate(c0)?"mixed":c0,"aria-required":u0,"data-state":getState$2(c0),"data-disabled":l0?"":void 0,disabled:l0,value:o0,...a0,ref:m0,onKeyDown:composeEventHandlers(e0,g0=>{g0.key==="Enter"&&g0.preventDefault()}),onClick:composeEventHandlers(n0,g0=>{h0(y0=>isIndeterminate(y0)?!0:!y0),A0&&p0&&(f0.current=g0.isPropagationStopped(),f0.current||g0.stopPropagation())})})});CheckboxTrigger.displayName=TRIGGER_NAME$2;var Checkbox$1=reactExports.forwardRef((r0,e0)=>{const{__scopeCheckbox:n0,name:a0,checked:i0,defaultChecked:s0,required:o0,disabled:l0,value:c0,onCheckedChange:u0,form:d0,...h0}=r0;return jsxRuntimeExports.jsx(CheckboxProvider,{__scopeCheckbox:n0,checked:i0,defaultChecked:s0,disabled:l0,required:o0,onCheckedChange:u0,name:a0,form:d0,value:c0,internal_do_not_use_render:({isFormControl:f0})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CheckboxTrigger,{...h0,ref:e0,__scopeCheckbox:n0}),f0&&jsxRuntimeExports.jsx(CheckboxBubbleInput,{__scopeCheckbox:n0})]})})});Checkbox$1.displayName=CHECKBOX_NAME;var INDICATOR_NAME$1="CheckboxIndicator",CheckboxIndicator=reactExports.forwardRef((r0,e0)=>{const{__scopeCheckbox:n0,forceMount:a0,...i0}=r0,s0=useCheckboxContext(INDICATOR_NAME$1,n0);return jsxRuntimeExports.jsx(Presence,{present:a0||isIndeterminate(s0.checked)||s0.checked===!0,children:jsxRuntimeExports.jsx(Primitive.span,{"data-state":getState$2(s0.checked),"data-disabled":s0.disabled?"":void 0,...i0,ref:e0,style:{pointerEvents:"none",...r0.style}})})});CheckboxIndicator.displayName=INDICATOR_NAME$1;var BUBBLE_INPUT_NAME$2="CheckboxBubbleInput",CheckboxBubbleInput=reactExports.forwardRef(({__scopeCheckbox:r0,...e0},n0)=>{const{control:a0,hasConsumerStoppedPropagationRef:i0,checked:s0,defaultChecked:o0,required:l0,disabled:c0,name:u0,value:d0,form:h0,bubbleInput:f0,setBubbleInput:p0}=useCheckboxContext(BUBBLE_INPUT_NAME$2,r0),A0=useComposedRefs$1(n0,p0),m0=usePrevious(s0),x0=useSize(a0);reactExports.useEffect(()=>{const y0=f0;if(!y0)return;const b0=window.HTMLInputElement.prototype,w0=Object.getOwnPropertyDescriptor(b0,"checked").set,v0=!i0.current;if(m0!==s0&&w0){const S0=new Event("click",{bubbles:v0});y0.indeterminate=isIndeterminate(s0),w0.call(y0,isIndeterminate(s0)?!1:s0),y0.dispatchEvent(S0)}},[f0,m0,s0,i0]);const g0=reactExports.useRef(isIndeterminate(s0)?!1:s0);return jsxRuntimeExports.jsx(Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o0??g0.current,required:l0,disabled:c0,name:u0,value:d0,form:h0,...e0,tabIndex:-1,ref:A0,style:{...e0.style,...x0,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});CheckboxBubbleInput.displayName=BUBBLE_INPUT_NAME$2;
635function isFunction$4(r0){return typeof r0=="function"}function isIndeterminate(r0){return r0==="indeterminate"}function getState$2(r0){return isIndeterminate(r0)?"indeterminate":r0?"checked":"unchecked"}const Checkbox=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Checkbox$1,{ref:n0,className:cn$1("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r0),...e0,children:jsxRuntimeExports.jsx(CheckboxIndicator,{className:cn$1("flex items-center justify-center text-current"),children:jsxRuntimeExports.jsx(Check,{className:"h-4 w-4"})})}));Checkbox.displayName=Checkbox$1.displayName;const SUPABASE_URL$5="https://unfpdgrtnhbfxinuktue.supabase.co";function ReAnalyzePanel({song:r0,formData:e0,lyrics:n0,onBpmDetected:a0,onLyricsDetected:i0,onKeywordsAdded:s0}){const[o0,l0]=reactExports.useState(!1),[c0,u0]=reactExports.useState(!1),[d0,h0]=reactExports.useState(!1),[f0,p0]=reactExports.useState({open:!1,currentBpm:0,newBpm:0}),[A0,m0]=reactExports.useState({open:!1,currentLyrics:"",newLyrics:""}),[x0,g0]=reactExports.useState({open:!1,suggestions:[]}),y0=!!(r0.audioUrl||r0.dropboxUrl),b0=async()=>{const I0=localStorage.getItem("bangerbank_session");if(I0)return I0;const{data:{session:M0}}=await supabase.auth.getSession();return(M0==null?void 0:M0.access_token)||null},E0=async()=>{if(!y0){ue$2.error("No audio file available for analysis");return}let I0=null;try{I0=new(window.AudioContext||window.webkitAudioContext)}catch(M0){console.error("[ReAnalyze] Failed to create AudioContext:",M0),ue$2.error("Audio analysis not supported on this device");return}l0(!0);try{let M0=r0.audioUrl;if(!M0&&r0.dropboxUrl&&(M0=r0.dropboxUrl.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("?dl=0","?dl=1").replace("&dl=0","&dl=1"),M0.includes("dl=1")||(M0+=M0.includes("?")?"&dl=1":"?dl=1")),!M0){ue$2.error("Could not get audio URL"),await I0.close();return}console.log("[ReAnalyze] Fetching audio for BPM detection...");const N0=await fetch(M0);if(!N0.ok)throw new Error("Failed to fetch audio");const D0=await N0.arrayBuffer(),O0=await I0.decodeAudioData(D0);console.log("[ReAnalyze] Audio decoded, duration:",O0.duration,"seconds");let B0;try{console.log("[ReAnalyze] Attempting BPM detection with Essentia.js...");const{detectBpmWithEssentia:G0}=await __vitePreload(async()=>{const{detectBpmWithEssentia:Q0}=await Promise.resolve().then(()=>essentiaAnalysis);return{detectBpmWithEssentia:Q0}},void 0);B0=(await G0(O0)).bpm,console.log("[ReAnalyze] BPM via Essentia:",B0)}catch(G0){console.warn("[ReAnalyze] Essentia failed, trying web-audio-beat-detector:",G0);try{const{analyze:F0}=await __vitePreload(async()=>{const{analyze:Rw}=await Promise.resolve().then(()=>module$1);return{analyze:Rw}},void 0),Q0=Math.min(10,O0.duration*.1),U0=Math.min(30,O0.duration-Q0);console.log("[ReAnalyze] Analyzing with offset:",Q0,"duration:",U0),B0=await F0(O0,Q0,U0),console.log("[ReAnalyze] BPM via web-audio-beat-detector:",B0)}catch(F0){throw console.error("[ReAnalyze] All BPM detection methods failed:",F0),new Error("Could not detect BPM from audio. Try a different audio file.")}}await I0.close();const z0=Math.round(B0);z0!==e0.bpm?p0({open:!0,currentBpm:e0.bpm,newBpm:z0}):ue$2.info(`BPM confirmed: ${z0} (no change)`)}catch(M0){if(console.error("[ReAnalyze] BPM detection failed:",M0),ue$2.error(M0 instanceof Error?M0.message:"Failed to detect BPM from audio"),I0)try{await I0.close()}catch{}}finally{l0(!1)}},w0=async(I0,M0=30)=>{const D0=Math.min(M0,I0.duration),O0=Math.floor(D0*16e3),B0=new OfflineAudioContext(1,O0,16e3),z0=B0.createBufferSource();z0.buffer=I0,z0.connect(B0.destination),z0.start(0,0,D0);const G0=await B0.startRendering(),F0=v0(G0),Q0=new Uint8Array(F0);let U0="";for(let q0=0;q0<Q0.length;q0++)U0+=String.fromCharCode(Q0[q0]);return btoa(U0)},v0=I0=>{const M0=I0.numberOfChannels,N0=I0.sampleRate,D0=1,O0=16,B0=O0/8,z0=M0*B0,G0=I0.getChannelData(0),F0=G0.length*B0,Q0=44+F0,U0=new ArrayBuffer(Q0),q0=new DataView(U0),Rw=(J0,Cw)=>{for(let Ow=0;Ow<Cw.length;Ow++)q0.setUint8(J0+Ow,Cw.charCodeAt(Ow))};Rw(0,"RIFF"),q0.setUint32(4,36+F0,!0),Rw(8,"WAVE"),Rw(12,"fmt "),q0.setUint32(16,16,!0),q0.setUint16(20,D0,!0),q0.setUint16(22,M0,!0),q0.setUint32(24,N0,!0),q0.setUint32(28,N0*z0,!0),q0.setUint16(32,z0,!0),q0.setUint16(34,O0,!0),Rw(36,"data"),q0.setUint32(40,F0,!0);let _w=44;for(let J0=0;J0<G0.length;J0++){const Cw=Math.max(-1,Math.min(1,G0[J0]));
635q0.setInt16(_w,Cw<0?Cw*32768:Cw*32767,!0),_w+=2}return U0},S0=async()=>{var I0;if(!y0){ue$2.error("No audio file available");return}u0(!0);try{const M0=await b0();if(!M0){ue$2.error("Authentication required");return}let N0=r0.audioUrl;if(!N0&&r0.dropboxUrl&&(N0=r0.dropboxUrl.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("?dl=0","?dl=1").replace("&dl=0","&dl=1"),N0.includes("dl=1")||(N0+=N0.includes("?")?"&dl=1":"?dl=1")),!N0){ue$2.error("Could not get audio URL");return}ue$2.info("Analyzing audio for lyrics...",{duration:3e3});const D0=await fetch(N0);if(!D0.ok)throw new Error("Failed to fetch audio");const O0=await D0.arrayBuffer(),B0=new Blob([O0]),F0=(await(await __vitePreload(()=>Promise.resolve().then(()=>index$1),void 0)).parseBlob(B0)).common,Q0=Array.isArray(F0.lyrics)?typeof F0.lyrics[0]=="string"?F0.lyrics[0]:(I0=F0.lyrics[0])==null?void 0:I0.text:void 0;if(Q0&&Q0.trim().length>20)Q0!==n0?m0({open:!0,currentLyrics:n0||"",newLyrics:Q0}):ue$2.info("Lyrics unchanged");else{if(r0.vocalistGender==="Instrumental"){ue$2.info("Track is marked as instrumental â no lyrics expected");return}console.log("[ReAnalyze] No embedded lyrics, attempting AI transcription..."),ue$2.info("No embedded lyrics found. Attempting AI transcription...",{duration:5e3});const U0=new(window.AudioContext||window.webkitAudioContext),q0=await U0.decodeAudioData(O0.slice(0));await U0.close();const Rw=await w0(q0,30);console.log("[ReAnalyze] Audio chunk size:",Math.round(Rw.length/1024),"KB");const _w=await fetch(`${SUPABASE_URL$5}/functions/v1/transcribe-lyrics`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${M0}`},body:JSON.stringify({audioBase64:Rw,audioFormat:"audio/wav",songTitle:r0.name,vocalistGender:r0.vocalistGender,genres:r0.genres})});if(!_w.ok){const Cw=await _w.json().catch(()=>({}));if(_w.status===429){ue$2.error("Rate limit exceeded. Please try again later.");return}if(_w.status===402){ue$2.error("AI credits exhausted. Please add credits to continue.");return}throw new Error(Cw.error||"Transcription failed")}const J0=await _w.json();if(console.log("[ReAnalyze] Transcription result:",J0),J0.hasVocals&&J0.lyrics){const Cw=J0.source==="ai"?" (AI transcribed)":"";m0({open:!0,currentLyrics:n0||"",newLyrics:J0.lyrics}),ue$2.success(`Lyrics detected${Cw}!`)}else J0.hasVocals?ue$2.info("Could not transcribe lyrics. You can add them manually."):ue$2.info("No vocals detected in audio. This appears to be instrumental.")}}catch(M0){console.error("Lyrics detection failed:",M0),ue$2.error(M0 instanceof Error?M0.message:"Failed to detect lyrics")}finally{u0(!1)}},k0=async()=>{h0(!0);try{const I0=await b0();if(!I0){ue$2.error("Authentication required");return}const M0=await fetch(`${SUPABASE_URL$5}/functions/v1/suggest-keywords`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${I0}`},body:JSON.stringify({songName:r0.name,genres:r0.genres||[],bpm:e0.bpm,key:r0.key,scale:r0.scale,vocalistGender:r0.vocalistGender,lyrics:n0||r0.lyrics,existingKeywords:e0.keywords,writers:r0.writers})});if(!M0.ok){const D0=await M0.json();throw new Error(D0.error||"Keyword suggestion failed")}const N0=await M0.json();if(N0.suggestions&&N0.suggestions.length>0){const D0=N0.suggestions.filter(O0=>!e0.keywords.includes(O0.keyword)).map(O0=>({...O0,selected:!0}));D0.length>0?g0({open:!0,suggestions:D0}):ue$2.info("No new keyword suggestions - existing keywords are comprehensive")}else ue$2.info("Could not generate keyword suggestions")}catch(I0){console.error("Keyword suggestion failed:",I0),ue$2.error("Failed to generate keyword suggestions")}finally{h0(!1)}},R0=()=>{a0(f0.newBpm),p0({...f0,open:!1}),ue$2.success(`BPM updated to ${f0.newBpm}`)},j0=()=>{i0(A0.newLyrics),m0({...A0,open:!1}),ue$2.success("Lyrics updated")},C0=()=>{const I0=x0.suggestions.filter(M0=>M0.selected).map(M0=>M0.keyword);I0.length>0&&(s0(I0),ue$2.success(`Added ${I0.length} keyword${I0.length>1?"s":""}`)),g0({...x0,open:!1})},$0=I0=>{g0(M0=>({...M0,suggestions:M0.suggestions.map((N0,D0)=>D0===I0?{...N0,selected:!N0.selected}:N0)}))},T0=()=>{const I0=x0.suggestions.some(M0=>M0.selected);g0(M0=>({...M0,suggestions:M0.suggestions.map(N0=>({...N0,selected:!I0}))}))};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-3",children:[jsxRuntimeExports.jsxs(Label$2,{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-4 h-4"}),"Re-Analyze",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(update with latest detection)"})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntimeExports.jsxs(Button,{type:"button",variant:"outline",size:"sm",onClick:E0,disabled:o0||!y0,className:"gap-1.5",children:[o0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3.5 h-3.5 animate-spin"}):jsxRuntimeExports.jsx(Music,{className:"w-3.5 h-3.5"}),e0.bpm?"Re-detect":"Detect"," BPM"]}),jsxRuntimeExports.jsxs(Button,{type:"button",variant:"outline",size:"sm",onClick:S0,disabled:c0||!y0,className:"gap-1.5",children:[c0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3.5 h-3.5 animate-spin"}):jsxRuntimeExports.jsx(FileText,{className:"w-3.5 h-3.5"}),n0?"Re-detect":"Detect"," Lyrics"]}),jsxRuntimeExports.jsxs(Button,{type:"button",variant:"outline",size:"sm",onClick:k0,disabled:d0,className:"gap-1.5",children:[d0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3.5 h-3.5 animate-spin"}):jsxRuntimeExports.jsx(Sparkles,{className:"w-3.5 h-3.5"}),"AI Keywords"]})]}),!y0&&jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Audio file required for BPM and lyrics detection"})]}),jsxRuntimeExports.jsx(Dialog,{open:f0.open,onOpenChange:I0=>p0({...f0,open:I0}),children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-w-sm bg-card border-border",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Update BPM?"}),jsxRuntimeExports.jsx(DialogDescription,{children:"A new BPM was detected from the audio analysis."})]}),jsxRuntimeExports.jsxs("div",{className:"py-4 space-y-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md bg-muted/50",children:[jsxRuntimeExports.jsx("span",{className:"text-sm text-muted-foreground",children:"Current BPM"}),jsxRuntimeExports.jsx(Badge,{variant:"outline",children:f0.currentBpm})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md bg-primary/10 border border-primary/20",children:[jsxRuntimeExports.jsx("span",{className:"text-sm font-medium",children:"Detected BPM"}),jsxRuntimeExports.jsx(Badge,{variant:"default",children:f0.newBpm})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{className:"gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>p0({...f0,open:!1}),children:"Keep Current"}),jsxRuntimeExports.jsxs(Button,{onClick:R0,children:[jsxRuntimeExports.jsx(Check,{className:"w-4 h-4 mr-1"}),"Apply New BPM"]})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:A0.open,onOpenChange:I0=>m0({...A0,open:I0}),children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-w-lg bg-card border-border",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Update Lyrics?"}),jsxRuntimeExports.jsx(DialogDescription,{children:"New lyrics were detected. Review and confirm the update."})]}),jsxRuntimeExports.jsxs("div",{className:"py-4 space-y-3 max-h-[300px] overflow-y-auto",children:[A0.currentLyrics&&jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs text-muted-foreground",children:"Current Lyrics"}),jsxRuntimeExports.jsx("div",{className:"p-3 rounded-md bg-muted/50 text-sm whitespace-pre-wrap max-h-[100px] overflow-y-auto",children:A0.currentLyrics||jsxRuntimeExports.jsx("span",{className:"text-muted-foreground italic",children:"No lyrics"})})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs text-primary",children:"Detected Lyrics"}),jsxRuntimeExports.jsx("div",{className:"p-3 rounded-md bg-primary/10 border border-primary/20 text-sm whitespace-pre-wrap max-h-[150px] overflow-y-auto",children:A0.newLyrics})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{className:"gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>m0({...A0,open:!1}),children:"Keep Current"}),jsxRuntimeExports.jsxs(Button,{onClick:j0,children:[jsxRuntimeExports.jsx(Check,{className:"w-4 h-4 mr-1"}),"Apply New Lyrics"]})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:x0.open,onOpenChange:I0=>g0({...x0,open:I0}),children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-w-md bg-card border-border",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsxs(DialogTitle,{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Sparkles,{className:"w-5 h-5 text-primary"}),"AI Keyword Suggestions"]}),jsxRuntimeExports.jsx(DialogDescription,{children:"Select keywords to add based on AI analysis of similar songs and artists."})]}),jsxRuntimeExports.jsx("div",{className:"flex justify-end pt-2",children:jsxRuntimeExports.jsx(Button,{type:"button",variant:"ghost",size:"sm",onClick:T0,className:"text-xs text-muted-foreground hover:text-foreground",children:x0.suggestions.some(I0=>I0.selected)?"Deselect All":"Select All"})}),jsxRuntimeExports.jsx("div",{className:"py-2 space-y-2 max-h-[300px] overflow-y-auto",children:x0.suggestions.map((I0,M0)=>jsxRuntimeExports.jsxs("div",{className:`flex items-start gap-3 p-3 rounded-md border transition-colors cursor-pointer ${I0.selected?"bg-primary/10 border-primary/30":"bg-muted/30 border-border hover:bg-muted/50"}`,onClick:()=>$0(M0),children:[jsxRuntimeExports.jsx(Checkbox,{checked:I0.selected,onCheckedChange:()=>$0(M0),className:"mt-0.5"}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-sm",children:I0.keyword}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:I0.reason})]})]},I0.keyword))}),jsxRuntimeExports.jsxs(DialogFooter,{className:"gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>g0({...x0,open:!1}),children:"Cancel"}),jsxRuntimeExports.jsxs(Button,{onClick:C0,disabled:!x0.suggestions.some(I0=>I0.selected),children:[jsxRuntimeExports.jsx(Check,{className:"w-4 h-4 mr-1"}),"Add Selected (",x0.suggestions.filter(I0=>I0.selected).length,")"]})]})]})})]})}var SWITCH_NAME="Switch",[createSwitchContext,createSwitchScope]=createContextScope(SWITCH_NAME),[SwitchProvider,useSwitchContext]=createSwitchContext(SWITCH_NAME),Switch$1=reactExports.forwardRef((r0,e0)=>{const{__scopeSwitch:n0,name:a0,checked:i0,defaultChecked:s0,required:o0,disabled:l0,value:c0="on",onCheckedChange:u0,form:d0,...h0}=r0,[f0,p0]=reactExports.useState(null),A0=useComposedRefs$1(e0,b0=>p0(b0)),m0=reactExports.useRef(!1),x0=f0?d0||!!f0.closest("form"):!0,[g0,y0]=useControllableState$1({prop:i0,defaultProp:s0??!1,onChange:u0,caller:SWITCH_NAME});return jsxRuntimeExports.jsxs(SwitchProvider,{scope:n0,checked:g0,disabled:l0,children:[jsxRuntimeExports.jsx(Primitive.button,{type:"button",role:"switch","aria-checked":g0,"aria-required":o0,"data-state":getState$1(g0),"data-disabled":l0?"":void 0,disabled:l0,value:c0,...h0,ref:A0,onClick:composeEventHandlers(r0.onClick,b0=>{y0(E0=>!E0),x0&&(m0.current=b0.isPropagationStopped(),m0.current||b0.stopPropagation())})}),x0&&jsxRuntimeExports.jsx(SwitchBubbleInput,{control:f0,bubbles:!m0.current,name:a0,value:c0,checked:g0,required:o0,disabled:l0,form:d0,style:{transform:"translateX(-100%)"}})]})});Switch$1.displayName=SWITCH_NAME;var THUMB_NAME$1="SwitchThumb",SwitchThumb=reactExports.forwardRef((r0,e0)=>{const{__scopeSwitch:n0,...a0}=r0,i0=useSwitchContext(THUMB_NAME$1,n0);return jsxRuntimeExports.jsx(Primitive.span,{"data-state":getState$1(i0.checked),"data-disabled":i0.disabled?"":void 0,...a0,ref:e0})});
635SwitchThumb.displayName=THUMB_NAME$1;var BUBBLE_INPUT_NAME$1="SwitchBubbleInput",SwitchBubbleInput=reactExports.forwardRef(({__scopeSwitch:r0,control:e0,checked:n0,bubbles:a0=!0,...i0},s0)=>{const o0=reactExports.useRef(null),l0=useComposedRefs$1(o0,s0),c0=usePrevious(n0),u0=useSize(e0);return reactExports.useEffect(()=>{const d0=o0.current;if(!d0)return;const h0=window.HTMLInputElement.prototype,p0=Object.getOwnPropertyDescriptor(h0,"checked").set;if(c0!==n0&&p0){const A0=new Event("click",{bubbles:a0});p0.call(d0,n0),d0.dispatchEvent(A0)}},[c0,n0,a0]),jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n0,...i0,tabIndex:-1,ref:l0,style:{...i0.style,...u0,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});SwitchBubbleInput.displayName=BUBBLE_INPUT_NAME$1;function getState$1(r0){return r0?"checked":"unchecked"}var Root$4=Switch$1,Thumb$1=SwitchThumb;const Switch=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Root$4,{className:cn$1("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",r0),...e0,ref:n0,children:jsxRuntimeExports.jsx(Thumb$1,{className:cn$1("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Switch.displayName=Root$4.displayName;function EditSongDialog({song:r0,open:e0,onOpenChange:n0,onSave:a0,folders:i0,allWriters:s0,onConfirmWriters:o0,allSongs:l0=[],songwriters:c0,taggedSongwriters:u0,onTagSongwriter:d0,onUntagSongwriter:h0,onRefreshTagged:f0,isLoadingTagged:p0,onPlay:A0,isPlaying:m0,currentPlayingSongId:x0,userRole:g0,includeArKeywords:y0,onIncludeArKeywordsChange:b0}){const E0=x0===(r0==null?void 0:r0.id)&&m0,[w0,v0]=reactExports.useState(""),[S0,k0]=reactExports.useState(""),[R0,j0]=reactExports.useState(""),[C0,$0]=reactExports.useState(""),[T0,I0]=reactExports.useState(""),[M0,N0]=reactExports.useState({bpm:120,key:"C",scale:"Major",vocalistGender:"Male",genres:[],keywords:[],status:"available",folderId:void 0,parentSongId:void 0,lyrics:""}),[D0,O0]=reactExports.useState(""),[B0,z0]=reactExports.useState(""),[G0,F0]=reactExports.useState(""),[Q0,U0]=reactExports.useState([]),[q0,Rw]=reactExports.useState(""),[_w,J0]=reactExports.useState(!1),Cw=reactExports.useRef(),Ow=reactExports.useRef(),jw=reactExports.useRef(),Nw=reactExports.useRef(),xw="bangerbank_song_settings_clipboard",X0=reactExports.useMemo(()=>l0.filter(Dw=>Dw.id!==(r0==null?void 0:r0.id)&&Dw.parentSongId!==(r0==null?void 0:r0.id)&&!Dw.parentSongId),[l0,r0==null?void 0:r0.id]);reactExports.useEffect(()=>{r0&&(v0(r0.name),k0(r0.writers||""),j0(r0.versionLabel||""),$0(r0.dropboxUrl||""),I0(r0.publisher||""),N0({bpm:r0.bpm,key:r0.key,scale:r0.scale,vocalistGender:r0.vocalistGender,genres:r0.genres||[],keywords:r0.keywords||[],status:r0.status||"available",folderId:r0.folderId,parentSongId:r0.parentSongId,lyrics:r0.lyrics||""}),O0(""),z0(""),F0(""),U0(r0.arKeywords||[]),Rw(""))},[r0]),reactExports.useEffect(()=>{e0&&J0(!!sessionStorage.getItem(xw))},[e0]),reactExports.useEffect(()=>()=>{Cw.current&&clearTimeout(Cw.current),Ow.current&&clearTimeout(Ow.current),jw.current&&clearTimeout(jw.current),Nw.current&&clearTimeout(Nw.current)},[]);const Lw=reactExports.useCallback(()=>{const Dw={name:w0,writers:S0,bpm:M0.bpm,key:M0.key,scale:M0.scale,vocalistGender:M0.vocalistGender,genres:M0.genres,keywords:M0.keywords,copiedAt:Date.now()};sessionStorage.setItem(xw,JSON.stringify(Dw)),ue$2.success("Settings copied"),J0(!0)},[w0,S0,M0]),Hw=reactExports.useCallback(()=>{try{const Dw=sessionStorage.getItem(xw);if(!Dw){ue$2.error("No settings to paste");return}const Kw=JSON.parse(Dw);v0(Kw.name??w0),k0(Kw.writers??S0),N0(i1=>({...i1,bpm:Kw.bpm??i1.bpm,key:Kw.key??i1.key,scale:Kw.scale??i1.scale,vocalistGender:Kw.vocalistGender??i1.vocalistGender,genres:Kw.genres??i1.genres,keywords:Kw.keywords??i1.keywords})),ue$2.success("Settings pasted")}catch{ue$2.error("Failed to paste settings")}},[w0,S0]),Ww=reactExports.useCallback(Dw=>{$0(Dw),Dw&&!isValidDropboxUrl(Dw)?Rw("Please enter a valid Dropbox URL"):Rw("")},[]),r1=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,genres:Kw.genres.includes(Dw)?Kw.genres.filter(i1=>i1!==Dw):[...Kw.genres,Dw]}))},[]),Yw=reactExports.useCallback(()=>{const Dw=D0.trim();Dw&&!M0.genres.includes(Dw)&&(N0(Kw=>({...Kw,genres:[...Kw.genres,Dw]})),O0(""))},[D0,M0.genres]),l1=reactExports.useCallback(()=>{const Dw=B0.trim();Dw&&!M0.keywords.includes(Dw)&&(N0(Kw=>({...Kw,keywords:[...Kw.keywords,Dw]})),z0(""))},[B0,M0.keywords]),p1=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,keywords:Kw.keywords.filter(i1=>i1!==Dw)}))},[]),Pw=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,bpm:Dw}))},[]),Qw=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,lyrics:Dw}))},[]),Xw=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,keywords:[...Kw.keywords,...Dw]}))},[]),f1=reactExports.useCallback(()=>
635{if(!r0)return;if(q0){ue$2.error("Please fix the Dropbox URL before saving");return}const Dw={name:w0,writers:S0,publisher:T0,...M0,versionLabel:R0,isPrimaryVersion:!M0.parentSongId,arKeywords:Q0};if(C0!==r0.dropboxUrl&&(Dw.dropboxUrl=C0||void 0),a0(r0.id,Dw),o0&&S0){const Kw=S0.split(",").map(i1=>i1.trim()).filter(i1=>i1.length>1);Kw.length>0&&o0(Kw)}n0(!1)},[r0,q0,w0,S0,T0,R0,C0,M0,Q0,a0,o0,n0]),u1=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,bpm:parseInt(Dw)||120}))},[]),W0=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,key:Dw}))},[]),P0=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,scale:Dw}))},[]),L0=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,vocalistGender:Dw}))},[]),Z0=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,status:Dw}))},[]),$w=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,folderId:Dw==="none"?void 0:Dw}))},[]),Bw=reactExports.useCallback(Dw=>{N0(Kw=>({...Kw,parentSongId:Dw==="none"?void 0:Dw}))},[]),Vw=reactExports.useMemo(()=>M0.genres.filter(Dw=>!GENRES.includes(Dw)),[M0.genres]);return r0?jsxRuntimeExports.jsx(Dialog,{open:e0,onOpenChange:n0,children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-w-[480px] max-h-[90vh] bg-card border-border flex flex-col overflow-hidden",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"flex-shrink-0",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Edit Song"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[A0&&r0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-muted-foreground hover:text-foreground",onClick:()=>A0(r0),title:E0?"Pause":"Play song",children:E0?jsxRuntimeExports.jsx(Pause,{className:"w-4 h-4"}):jsxRuntimeExports.jsx(Play,{className:"w-4 h-4"})}),jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 px-2 gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:Lw,title:"Copy settings to paste into other songs",children:[jsxRuntimeExports.jsx(Clipboard,{className:"w-3.5 h-3.5"}),"Copy"]}),_w&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 px-2 gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:Hw,title:"Paste settings from another song",children:[jsxRuntimeExports.jsx(ClipboardPaste,{className:"w-3.5 h-3.5"}),"Paste"]})]})]})}),jsxRuntimeExports.jsxs("div",{className:"grid gap-4 py-4 flex-1 pr-2 w-full max-w-full overflow-y-auto overflow-x-hidden overscroll-contain",style:{WebkitOverflowScrolling:"touch"},children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"name",children:"Song Name"}),jsxRuntimeExports.jsx(Input,{id:"name",value:w0,onChange:Dw=>v0(Dw.target.value),className:"bg-background"})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Label$2,{htmlFor:"writers",children:["Writers ",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(Alt+E for é, Tab to autocomplete)"})]}),jsxRuntimeExports.jsx(WriterAutocomplete,{id:"writers",value:S0,onChange:k0,allWriters:s0,placeholder:"Add writers..."})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"publisher",children:"Publisher"}),jsxRuntimeExports.jsx(Input,{id:"publisher",value:T0,onChange:Dw=>I0(Dw.target.value),placeholder:"Publisher name...",className:"bg-background"})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"bpm",children:"BPM"}),jsxRuntimeExports.jsx(Input,{id:"bpm",type:"number",min:1,max:300,value:M0.bpm,onChange:Dw=>u1(Dw.target.value),className:"bg-background"})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Key"}),jsxRuntimeExports.jsxs(Select,{value:M0.key,onValueChange:W0,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:KEYS.map(Dw=>jsxRuntimeExports.jsx(SelectItem,{value:Dw,children:Dw},Dw))})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Scale"}),jsxRuntimeExports.jsxs(Select,{value:M0.scale,onValueChange:P0,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:SCALES.map(Dw=>jsxRuntimeExports.jsx(SelectItem,{value:Dw,children:Dw},Dw))})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Vocalist"}),jsxRuntimeExports.jsxs(Select,{value:M0.vocalistGender,onValueChange:L0,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:VOCALIST_OPTIONS.map(Dw=>jsxRuntimeExports.jsx(SelectItem,{value:Dw,children:Dw},Dw))})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Status"}),jsxRuntimeExports.jsxs(Select,{value:M0.status,onValueChange:Z0,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(SelectItem,{value:"available",children:"Available"}),jsxRuntimeExports.jsx(SelectItem,{value:"cut",children:"Cut / Sold"}),jsxRuntimeExports.jsx(SelectItem,{value:"on-hold",children:"On Hold"})]})]})]})]}),i0.length>0&&jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Folder"}),jsxRuntimeExports.jsxs(Select,{value:M0.folderId||"none",onValueChange:$w,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"No folder"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(SelectItem,{value:"none",children:"No folder"}),i0.map(Dw=>jsxRuntimeExports.jsx(SelectItem,{value:Dw.id,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:Dw.color}}),Dw.name]})},Dw.id))]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Genres"}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1.5 p-2 bg-background rounded-md border border-border min-h-[60
635px] max-w-full",children:[GENRES.map(Dw=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("cursor-pointer transition-colors",M0.genres.includes(Dw)?"bg-primary text-primary-foreground border-primary":"hover:bg-muted"),onClick:()=>r1(Dw),children:Dw},Dw)),Vw.map(Dw=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"cursor-pointer transition-colors bg-primary text-primary-foreground border-primary",onClick:()=>r1(Dw),children:Dw},Dw))]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Input,{value:D0,onChange:Dw=>O0(Dw.target.value),placeholder:"Add custom genre...",className:"bg-background h-8 text-sm",onKeyDown:Dw=>{if(Dw.key==="Enter"&&(Dw.preventDefault(),Yw()),Dw.altKey&&(Dw.key==="e"||Dw.key==="E")){Dw.preventDefault();const i1=Dw.target.selectionStart||0,m1=Dw.shiftKey?"Ã":"é";O0(qw=>qw.slice(0,i1)+m1+qw.slice(i1))}}}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",size:"sm",onClick:Yw,disabled:!D0.trim(),children:"Add"})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Label$2,{children:["Keywords ",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(for enhanced search)"})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 p-2 bg-background rounded-md border border-border min-h-[40px] max-w-full",children:M0.keywords.length===0?jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"No keywords added"}):M0.keywords.map(Dw=>jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"cursor-pointer hover:bg-destructive/20 hover:text-destructive transition-colors",onClick:()=>p1(Dw),children:[Dw," Ã"]},Dw))}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Input,{value:B0,onChange:Dw=>z0(Dw.target.value),placeholder:"Add keyword (e.g., upbeat, summer, love)...",className:"bg-background h-8 text-sm",onKeyDown:Dw=>{Dw.key==="Enter"&&(Dw.preventDefault(),l1())}}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",size:"sm",onClick:l1,disabled:!B0.trim(),children:"Add"})]})]}),(Q0.length>0||g0==="a_and_r")&&jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Label$2,{className:"flex items-center gap-2",children:["A&R Keywords",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(added by A&R)"})]}),(g0==="songwriter"||g0==="a_and_r"||g0==="admin")&&b0&&jsxRuntimeExports.jsxs("label",{className:"flex items-center justify-between gap-2 cursor-pointer",children:[jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"Include A&R keywords in search"}),jsxRuntimeExports.jsx(Switch,{checked:y0??!0,onCheckedChange:b0})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 p-2 bg-background rounded-md border border-border min-h-[40px] max-w-full",children:Q0.length===0?jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"No A&R keywords"}):Q0.map(Dw=>jsxRuntimeExports.jsxs(Badge,{className:"bg-purple-500/20 text-purple-300 border-purple-500/30 hover:bg-purple-500/30 transition-colors",children:[Dw,g0==="a_and_r"&&jsxRuntimeExports.jsx("button",{onClick:()=>U0(Kw=>Kw.filter(i1=>i1!==Dw)),className:"ml-1 hover:text-foreground",children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},Dw))}),g0==="a_and_r"&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Input,{value:G0,onChange:Dw=>F0(Dw.target.value),placeholder:"Add A&R keyword...",className:"bg-background h-8 text-sm",onKeyDown:Dw=>{if(Dw.key==="Enter"){Dw.preventDefault();const Kw=G0.trim();Kw&&!Q0.includes(Kw)&&(U0(i1=>[...i1,Kw]),F0(""))}}}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",size:"sm",onClick:()=>{const Dw=G0.trim();Dw&&!Q0.includes(Dw)&&(U0(Kw=>[...Kw,Dw]),F0(""))},disabled:!G0.trim(),children:"Add"})]})]}),jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsx(ReAnalyzePanel,{song:r0,formData:{bpm:M0.bpm,keywords:M0.keywords},lyrics:M0.lyrics,onBpmDetected:Pw,onLyricsDetected:Qw,onKeywordsAdded:Xw}),r0.source==="dropbox"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Label$2,{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Link,{className:"w-4 h-4"}),"Dropbox Link",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(replace source file)"})]}),jsxRuntimeExports.jsx(Input,{value:C0,onChange:Dw=>Ww(Dw.target.value),placeholder:"https://www.dropbox.com/...",className:"bg-background text-sm"}),q0&&jsxRuntimeExports.jsx("span",{className:"text-xs text-destructive",children:q0}),r0.dropboxUrl&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground max-w-full overflow-hidden",children:[jsxRuntimeExports.jsxs("span",{className:"truncate flex-1 min-w-0",children:["Current: ",r0.dropboxUrl]}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2",onClick:()=>{navigator.clipboard.writeText(r0.dropboxUrl||""),ue$2.success("Link copied")},children:jsxRuntimeExports.jsx(Copy,{className:"w-3 h-3"})})]})]})]}),l0.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsxs("div",{className:"grid gap-3",children:[jsxRuntimeExports.jsxs(Label$2,{className:"flex items-center gap-2",children:["Version Grouping",jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(link as alternate version)"})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs text-muted-foreground",children:"Parent Song"}),jsxRuntimeExports.jsxs(Select,{value:M0.parentSongId||"none",onValueChange:Bw,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Not a ver
635sion (standalone song)"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-card border-border max-h-64",children:[jsxRuntimeExports.jsx(SelectItem,{value:"none",children:"Not a version (standalone song)"}),X0.map(Dw=>jsxRuntimeExports.jsxs(SelectItem,{value:Dw.id,children:[Dw.name," ",Dw.writers?`(${Dw.writers})`:""]},Dw.id))]})]})]}),M0.parentSongId&&jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs text-muted-foreground",children:"Version Label"}),jsxRuntimeExports.jsx(Input,{value:R0,onChange:Dw=>j0(Dw.target.value),placeholder:"e.g., stripped, piano, male, female, guetta mix...",className:"bg-background h-8 text-sm"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:["stripped","piano","acoustic","male","female","remix","radio edit"].map(Dw=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"cursor-pointer text-xs hover:bg-muted transition-colors",onClick:()=>j0(Dw),children:Dw},Dw))})]})]})]}),d0&&h0&&c0&&u0&&r0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Shared With"}),jsxRuntimeExports.jsx(SongwriterTagging,{songId:r0.id,songwriters:c0,taggedSongwriters:u0,onTagSongwriter:d0,onUntagSongwriter:h0,onRefreshTagged:f0,isLoading:p0})]})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>n0(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:f1,children:"Save Changes"})]})]})}):null}function GenreDropdownWithCustom({existingGenres:r0,onAddGenre:e0}){const[n0,a0]=reactExports.useState(""),[i0,s0]=reactExports.useState(!1),o0=c0=>{c0.preventDefault(),c0.stopPropagation();const u0=n0.trim();u0&&!r0.includes(u0)&&(e0(u0),a0(""),s0(!1))},l0=GENRES.filter(c0=>!r0.includes(c0));return jsxRuntimeExports.jsxs(DropdownMenu,{open:i0,onOpenChange:s0,children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsx("button",{className:"w-5 h-5 rounded flex items-center justify-center hover:bg-muted/40 transition-colors duration-150 text-muted-foreground hover:text-foreground",children:jsxRuntimeExports.jsx(Plus,{className:"w-3 h-3"})})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"start",className:"bg-card border-border max-h-72 overflow-y-auto w-48",children:[jsxRuntimeExports.jsx("form",{onSubmit:o0,className:"px-2 py-1.5",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(Input,{value:n0,onChange:c0=>a0(c0.target.value),placeholder:"Custom genre...",className:"h-7 text-xs",onClick:c0=>c0.stopPropagation(),onKeyDown:c0=>{c0.key==="Enter"&&o0(c0),c0.stopPropagation()}}),jsxRuntimeExports.jsx("button",{type:"submit",className:"w-7 h-7 shrink-0 flex items-center justify-center rounded hover:bg-muted transition-colors",disabled:!n0.trim(),children:jsxRuntimeExports.jsx(Check,{className:"w-3.5 h-3.5"})})]})}),l0.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsx("div",{className:"px-2 py-1 text-xs font-semibold text-muted-foreground",children:"Preset genres"}),l0.map(c0=>jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>{e0(c0),s0(!1)},children:c0},c0))]})]})]})}const statusConfig={available:{label:"Available",className:"bg-muted text-foreground border-border"},cut:{label:"Cut / Sold",className:"bg-green-500/20 text-green-500 border-green-500/30"},"on-hold":{label:"On Hold",className:"bg-yellow-500/20 text-yellow-500 border-yellow-500/30"}};function SongListItem({song:r0,onDelete:e0,onUpdate:n0,onDuplicate:a0,onPlay:i0,onSelect:s0,isPlaying:o0=!1,isCurrentSong:l0=!1,isSelected:c0=!1,folders:u0=[],allWriters:d0=[],onConfirmWriters:h0,readOnly:f0=!1,canEdit:p0,versionCount:A0,allSongs:m0=[],songwriters:x0=[],onTagSongwriter:g0,onUntagSongwriter:y0,getSongWriters:b0,userRole:E0,includeArKeywords:w0,onIncludeArKeywordsChange:v0,playbackProgress:S0=0,onSeek:k0,playlists:R0=[],onAddToPlaylist:j0,onNewPlaylistWithSong:C0}){const[$0,T0]=reactExports.useState(!1),[I0,M0]=reactExports.useState(null),[N0,D0]=reactExports.useState(""),O0=reactExports.useRef(null),[B0,z0]=reactExports.useState(!1),[G0,F0]=reactExports.useState(!1),[Q0,U0]=reactExports.useState(null),[q0,Rw]=reactExports.useState([]),[_w,J0]=reactExports.useState(!1);reactExports.useEffect(()=>{B0&&b0&&(J0(!0),b0(r0.id).then(Rw).finally(()=>J0(!1)))},[B0,r0.id,b0]);const Cw=async()=>
635{if(b0){const P0=await b0(r0.id);Rw(P0)}},Ow=r0.status||"available",jw=statusConfig[Ow]||statusConfig.available,Nw=r0.genres||(r0.genre?[r0.genre]:["Pop"]),xw=getSongYear(r0),X0=r0.writers||"",Lw=(P0,L0)=>{f0||(M0(P0),D0(L0))},Hw=()=>{if(I0)if(I0==="bpm"){const P0=parseInt(N0);!isNaN(P0)&&P0>0&&P0<300&&n0(r0.id,{bpm:P0})}else I0==="writers"?n0(r0.id,{[I0]:N0.trim()}):N0.trim()&&n0(r0.id,{[I0]:N0.trim()});M0(null)},Ww=()=>{M0(null),D0("")},r1=P0=>{f0||n0(r0.id,{status:P0})},Yw=P0=>{f0||n0(r0.id,{key:P0})},l1=P0=>{f0||n0(r0.id,{scale:P0})},p1=P0=>{f0||n0(r0.id,{vocalistGender:P0})},Pw=P0=>{if(f0)return;const L0=Nw.filter(Z0=>Z0!==P0);n0(r0.id,{genres:L0}),U0(null)},Qw=P0=>{f0||Nw.includes(P0)||n0(r0.id,{genres:[...Nw,P0]})};reactExports.useEffect(()=>{if(!I0)return;const P0=L0=>{var $w,Bw;const Z0=L0.target;O0.current&&!O0.current.contains(Z0)&&((Bw=($w=L0.target)==null?void 0:$w.closest)!=null&&Bw.call($w,"[data-radix-popper-content-wrapper], .z-50")||Hw())};return document.addEventListener("mousedown",P0),()=>document.removeEventListener("mousedown",P0)},[I0,N0]),X0.split(",").map(P0=>P0.trim()).filter(P0=>P0.length>0);const Xw=({field:P0,value:L0,className:Z0=""})=>I0===P0?P0==="writers"?jsxRuntimeExports.jsx("div",{ref:O0,className:"flex items-center gap-1 min-w-[120px]",children:jsxRuntimeExports.jsx(WriterAutocomplete,{value:N0,onChange:D0,allWriters:d0,placeholder:"Add writers...",className:"h-7 text-sm w-full",onConfirm:Hw})}):jsxRuntimeExports.jsx("div",{ref:O0,className:"flex items-center gap-1",children:jsxRuntimeExports.jsx(Input,{value:N0,onChange:$w=>D0($w.target.value),onKeyDown:$w=>{$w.key==="Enter"&&Hw(),$w.key==="Escape"&&Ww()},className:"h-7 text-sm w-full min-w-[60px]",autoFocus:!0})}):f0?jsxRuntimeExports.jsx("span",{className:cn$1("px-1 py-0.5 text-left truncate",Z0),children:L0||jsxRuntimeExports.jsx("span",{className:"text-muted-foreground italic",children:"â"})}):jsxRuntimeExports.jsx("button",{onClick:()=>Lw(P0,L0),className:cn$1("hover:bg-muted/40 px-1 py-0.5 rounded cursor-pointer transition-colors duration-150 text-left truncate",Z0),title:"Click to edit",children:L0||jsxRuntimeExports.jsx("span",{className:"text-muted-foreground italic",children:"Add..."})}),f1=()=>jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors block truncate max-w-full",onClick:P0=>{P0.stopPropagation(),s0==null||s0(r0)},title:X0||"Click to edit in side panel",children:X0||jsxRuntimeExports.jsx("span",{className:"italic",children:"â"})}),u1=!!(r0.audioUrl||r0.dropboxUrl),W0=reactExports.useMemo(()=>{if(!r0.waveformData)return null;const P0=r0.waveformData;return Array.isArray(P0)?P0:P0!=null&&P0.data&&Array.isArray(P0.data)?P0.data:null},[r0.waveformData]);return jsxRuntimeExports.jsxs("div",{onClick:()=>s0==null?void 0:s0(r0),onMouseEnter:()=>T0(!0),onMouseLeave:()=>T0(!1),onDoubleClick:P0=>{P0.stopPropagation(),(p0??!f0)&&z0(!0)},className:cn$1("group flex items-center gap-4 px-4 py-2 transition-colors duration-150 cursor-default",l0&&o0&&"bg-[#0f1f0f]",l0&&!o0&&"bg-muted/60",!l0&&"hover:bg-[#1a1a1a]",c0&&"ring-1 ring-primary/30"),children:[jsxRuntimeExports.jsx("div",{className:"w-10 shrink-0 flex items-center justify-center",children:jsxRuntimeExports.jsx("button",{onClick:P0=>{P0.stopPropagation(),u1&&(i0==null||i0(r0))},disabled:!u1,className:cn$1("w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-all duration-150",u1?"cursor-pointer":"cursor-default opacity-30",l0&&o0||l0?"bg-[#22c55e] text-white":"bg-[#22c55e]/0 group-hover:bg-[#22c55e] text-transparent group-hover:text-white"),title:u1?o0&&l0?"Pause":"Play":"No audio available",children:l0&&o0?jsxRuntimeExports.jsx(Pause,{className:"w-4 h-4"}):jsxRuntimeExports.jsx(Play,{className:"w-4 h-4 ml-0.5"})})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 space-y-0.5",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(Xw,{field:"name",value:r0.name,className:"font-medium text-foreground"}),A0&&A0>0&&jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 bg-primary/10 text-primary border-primary/20 shrink-0",children:[jsxRuntimeExports.jsx(Layers,{className:"w-2.5 h-2.5 mr-0.5"}),"+",A0]}),r0.dropboxUrl&&jsxRuntimeExports.jsx("button",{onClick:P0=>{P0.stopPropagation(),navigator.clipboard.writeText(r0.dropboxUrl),ue$2.success("Dropbox link copied!")},className:"p-0.5 rounded hover:bg-blue-500/20 transition-colors",title:"Click to copy Dropbox link",children:jsxRuntimeExports.jsx(Link,{className:"w-3 h-3 text-blue-400"})})]}),jsxRuntimeExports.jsx(f1,{})]}),(p0??!f0)&&jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground shrink-0",children:jsxRuntimeExports.jsx(Ellipsis,{className:"w-4 h-4"})})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"start",className:"w-40 bg-card border-border",children:[jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>z0(!0),children:[jsxRuntimeExports.jsx(Pencil,{className:"w-3.5 h-3.5 mr-2"}),"Edit Song"]}),jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>a0==null?void 0:a0(r0),children:[jsxRuntimeExports.jsx(Copy,{className:"w-3.5 h-3.5 mr-2"}),"Duplicate"]}),(j0||C0)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsx("p",{className:"px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Add to playlist"}),jsxRuntimeExports.jsx("div",{className:"max-h-56 overflow-y-auto",children:(R0||[]).map(P0=>jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>j0==null?void 0:j0(P0.id),children:[jsxRuntimeExports.jsx(ListMusic,{className:"w-3.5 h-3.5 mr-2"}),jsxRuntimeExports.jsx("span",{className:"truncate",children:P0.name})]},P0.id))}),C0&&jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:C0,children:[jsxRuntimeExports.jsx(Plus,{className:"w-3.5 h-3.5 mr-2"}),"New playlistâ¦"]})]}),u0.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>n0(r0.id,{folderId:void 0}),children:[jsxRuntimeExports.jsx(Folder,{className:"w-3.5 h-3.5 mr-2"}),jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"No folder"})]}),u0.map(P0=>jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>n0(r0.id,{folderId:P0.id}),children:[jsxRuntimeExports.jsx(Folder,{className:"w-3.5 h-3.5 mr-2",style:{color:P0.color}}),P0.name]},P0.id))]}),jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>F0(!0),className:"text-destructive focus:text-destructive",children:[jsxRuntimeExports.jsx(Trash2,{className:"w-3.5 h-3.5 mr-2"}),"Delete"]})]})]}),jsxRuntimeExports.jsx("div",{className:"w-[180px] shrink-0 hidden xl:block",children:jsxRuntimeExports.jsx(InlineWaveform,{waveformData:W0,progress:S0,isCurrentSong:l0,isHovered:$0,onSeek:k0})}),jsxRuntimeExports.jsx("div",{className:"w-16 text-center shrink-0",children:jsxRuntimeExports.jsx(Xw,{field:"bpm",value:String(r0.bpm),className:"font-mono text-sm font-semibold text-foreground"})}),jsxRuntimeExports.jsx("div",{className:"w-16 text-center shrink-0 hidden lg:block",children:jsxRuntimeExports.jsx("span",{className:cn$1("font-mono text-xs",xw==="unknown"?"text-muted-foreground
635/50":"text-muted-foreground"),title:xw==="unknown"?"No original date":`Created ${xw}`,children:formatSongYear(xw)})}),jsxRuntimeExports.jsx("div",{className:"w-24 shrink-0 hidden md:block",children:jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs("button",{className:"flex items-center gap-1 px-2 py-1 rounded-md text-sm text-foreground hover:bg-muted/40 transition-colors duration-150",children:[r0.vocalistGender,jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 opacity-50"})]})}),jsxRuntimeExports.jsx(DropdownMenuContent,{align:"center",className:"bg-card border-border",children:VOCALIST_OPTIONS.map(P0=>jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>p1(P0),className:cn$1(r0.vocalistGender===P0&&"bg-primary/20 text-primary"),children:P0},P0))})]})}),jsxRuntimeExports.jsx("div",{className:"w-16 shrink-0 hidden xl:block",children:r0.aiEnergyLevel&&jsxRuntimeExports.jsx("span",{className:cn$1("text-[11px] px-2 py-0.5 rounded-full font-medium",r0.aiEnergyLevel==="high"&&"text-[#f87171] bg-[#2a1a1a]",r0.aiEnergyLevel==="mid"&&"text-[#fbbf24] bg-[#2a2a1a]",r0.aiEnergyLevel==="low"&&"text-[#4ade80] bg-[#1a2a1a]"),children:r0.aiEnergyLevel.charAt(0).toUpperCase()+r0.aiEnergyLevel.slice(1)})}),jsxRuntimeExports.jsx("div",{className:"w-32 shrink-0 hidden lg:block",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1",children:[Nw.map((P0,L0)=>jsxRuntimeExports.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full",style:{backgroundColor:"#1a1a1a",color:"#888"},children:P0},L0)),!f0&&jsxRuntimeExports.jsx(GenreDropdownWithCustom,{existingGenres:Nw,onAddGenre:Qw})]})}),jsxRuntimeExports.jsx("div",{className:"w-20 shrink-0",children:jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs("button",{className:"flex items-center gap-1 px-2 py-1 rounded-md text-sm text-foreground hover:bg-muted/40 transition-colors duration-150 font-mono",children:[r0.key," ",r0.scale,jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 opacity-50"})]})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"center",className:"bg-card border-border p-2",children:[jsxRuntimeExports.jsx("div",{className:"grid grid-cols-4 gap-1 mb-2",children:KEYS.map(P0=>jsxRuntimeExports.jsx("button",{onClick:()=>Yw(P0),className:cn$1("px-2 py-1 text-sm rounded hover:bg-muted/60 transition-colors",r0.key===P0&&"bg-primary/20 text-primary"),children:P0},P0))}),jsxRuntimeExports.jsx("div",{className:"flex gap-1",children:SCALES.map(P0=>jsxRuntimeExports.jsx("button",{onClick:()=>l1(P0),className:cn$1("flex-1 px-2 py-1 text-sm rounded hover:bg-muted/60 transition-colors",r0.scale===P0&&"bg-primary/20 text-primary"),children:P0},P0))})]})]})}),jsxRuntimeExports.jsx("div",{className:"w-20 shrink-0",children:jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("cursor-pointer transition-colors duration-150 text-xs",jw.className),children:jw.label})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",className:"bg-card border-border",children:[jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>r1("available"),children:"Available"}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>r1("cut"),children:"Cut / Sold"}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>r1("on-hold"),children:"On Hold"})]})]})}),jsxRuntimeExports.jsx(EditSongDialog,{song:r0,open:B0,onOpenChange:z0,onSave:(P0,L0)=>n0(P0,L0),folders:u0,allWriters:d0,onConfirmWriters:h0,allSongs:m0,songwriters:x0,taggedSongwriters:q0,onTagSongwriter:g0,onUntagSongwriter:y0,onRefreshTagged:Cw,isLoadingTagged:_w,onPlay:i0,isPlaying:o0,userRole:E0,currentPlayingSongId:l0?r0.id:null,includeArKeywords:w0,onIncludeArKeywordsChange:v0}),jsxRuntimeExports.jsx(AlertDialog,{open:G0,onOpenChange:F0,children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Delete Song"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:['Are you sure you want to delete "',r0.name,'"? This action cannot be undone.']})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:()=>e0(r0.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:!!Q0,onOpenChange:P0=>!P0&&U0(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Remove Genre"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:['Are you sure you want to remove "',Q0,'" from this song?']})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:()=>Q0&&Pw(Q0),children:"Remove"})]})]})})]})}function SongVersionRow({song:r0,onPlay:e0,onSelect:n0,onDelete:a0,onUpdate:i0,onDuplicate:s0,isPlaying:o0=!1,isCurrentSong:l0=!1,isSelected:c0=!1,folders:u0=[],allWriters:d0=[],onConfirmWriters:h0,readOnly:f0=!1,canEdit:p0,allSongs:A0=[],songwriters:m0=[],onTagSongwriter
635:x0,onUntagSongwriter:g0,getSongWriters:y0,userRole:b0,includeArKeywords:E0,onIncludeArKeywordsChange:w0}){const[v0,S0]=reactExports.useState(!1),[k0,R0]=reactExports.useState(!1),[j0,C0]=reactExports.useState([]),[$0,T0]=reactExports.useState(!1),I0=!!(r0.audioUrl||r0.dropboxUrl),M0=p0??!f0;reactExports.useEffect(()=>{v0&&y0&&(T0(!0),y0(r0.id).then(C0).finally(()=>T0(!1)))},[v0,r0.id,y0]);const N0=async()=>{if(y0){const O0=await y0(r0.id);C0(O0)}},D0=()=>{a0==null||a0(r0.id),R0(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{onClick:()=>n0==null?void 0:n0(r0),onDoubleClick:O0=>{O0.stopPropagation(),M0&&S0(!0)},className:cn$1("group flex items-center gap-4 px-4 py-1.5 hover:bg-muted/50 transition-colors duration-150 cursor-default ml-8 border-l-2 border-border/50",l0&&"bg-muted/60",c0&&"bg-primary/10 ring-1 ring-primary/30"),children:[jsxRuntimeExports.jsx("div",{className:"w-4 flex items-center justify-center text-muted-foreground",children:jsxRuntimeExports.jsx("div",{className:"w-2 h-px bg-border"})}),jsxRuntimeExports.jsx("button",{onClick:O0=>{O0.stopPropagation(),I0&&(e0==null||e0(r0))},disabled:!I0,className:cn$1("w-6 h-6 rounded-md flex items-center justify-center shrink-0 transition-all",I0?"cursor-pointer hover:scale-105":"cursor-default opacity-40",l0&&o0?"bg-primary text-primary-foreground":l0?"bg-primary/80 text-primary-foreground":"bg-muted/60 hover:bg-primary/20 text-muted-foreground hover:text-primary"),title:I0?o0&&l0?"Pause":"Play":"No audio available",children:l0&&o0?jsxRuntimeExports.jsx(Pause,{className:"w-3 h-3"}):jsxRuntimeExports.jsx(Play,{className:"w-3 h-3 ml-0.5"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs bg-muted/50 border-border shrink-0",children:r0.versionLabel||"version"}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground truncate",children:r0.name}),r0.dropboxUrl&&jsxRuntimeExports.jsx("button",{onClick:O0=>{O0.stopPropagation(),navigator.clipboard.writeText(r0.dropboxUrl),ue$2.success("Dropbox link copied!")},className:"p-0.5 rounded hover:bg-blue-500/20 transition-colors shrink-0",title:"Click to copy Dropbox link",children:jsxRuntimeExports.jsx(Link,{className:"w-2.5 h-2.5 text-blue-400"})})]}),M0&&jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-foreground shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:O0=>O0.stopPropagation(),children:jsxRuntimeExports.jsx(Ellipsis,{className:"w-3.5 h-3.5"})})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",className:"w-40 bg-card border-border",children:[jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>S0(!0),children:[jsxRuntimeExports.jsx(Pencil,{className:"w-3.5 h-3.5 mr-2"}),"Edit Song"]}),s0&&jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>s0(r0),children:[jsxRuntimeExports.jsx(Copy,{className:"w-3.5 h-3.5 mr-2"}),"Duplicate"]}),u0.length>0&&i0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>i0(r0.id,{folderId:void 0}),children:[jsxRuntimeExports.jsx(Folder,{className:"w-3.5 h-3.5 mr-2"}),jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"No folder"})]}),u0.map(O0=>jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>i0(r0.id,{folderId:O0.id}),children:[jsxRuntimeExports.jsx(Folder,{className:"w-3.5 h-3.5 mr-2",style:{color:O0.color}}),O0.name]},O0.id))]}),a0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>R0(!0),className:"text-destructive focus:text-destructive",children:[jsxRuntimeExports.jsx(Trash2,{className:"w-3.5 h-3.5 mr-2"}),"Delete"]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"w-12 text-center shrink-0",children:jsxRuntimeExports.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:r0.bpm})}),jsxRuntimeExports.jsx("div",{className:"w-16 shrink-0 hidden md:block",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:r0.vocalistGender})}),jsxRuntimeExports.jsx("div",{className:"w-16 shrink-0 hidden lg:block",children:jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground",children:[r0.key," ",r0.scale]})})]}),i0&&jsxRuntimeExports.jsx(EditSongDialog,{song:r0,open:v0,onOpenChange:S0,onSave:i0,folders:u0,allWriters:d0,onConfirmWriters:h0,allSongs:A0,songwriters:m0,taggedSongwriters:j0,onTagSongwriter
vendor: 4,360 bytes, line 635
635:x0,onUntagSongwriter:g0,onRefreshTagged:N0,isLoadingTagged:$0,onPlay:e0,isPlaying:o0,userRole:b0,currentPlayingSongId:l0?r0.id:null,includeArKeywords:E0,onIncludeArKeywordsChange:w0}),jsxRuntimeExports.jsx(AlertDialog,{open:k0,onOpenChange:R0,children:jsxRuntimeExports.jsxs(AlertDialogContent,{className:"bg-card border-border",children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Delete Song Version"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:['Are you sure you want to delete "',r0.name,'"? This action cannot be undone.']})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:D0,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})}var COLLAPSIBLE_NAME="Collapsible",[createCollapsibleContext,createCollapsibleScope]=createContextScope(COLLAPSIBLE_NAME),[CollapsibleProvider,useCollapsibleContext]=createCollapsibleContext(COLLAPSIBLE_NAME),Collapsible$1=reactExports.forwardRef((r0,e0)=>{const{__scopeCollapsible:n0,open:a0,defaultOpen:i0,disabled:s0,onOpenChange:o0,...l0}=r0,[c0,u0]=useControllableState$1({prop:a0,defaultProp:i0??!1,onChange:o0,caller:COLLAPSIBLE_NAME});return jsxRuntimeExports.jsx(CollapsibleProvider,{scope:n0,disabled:s0,contentId:useId(),open:c0,onOpenToggle:reactExports.useCallback(()=>u0(d0=>!d0),[u0]),children:jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState(c0),"data-disabled":s0?"":void 0,...l0,ref:e0})})});Collapsible$1.displayName=COLLAPSIBLE_NAME;var TRIGGER_NAME$1="CollapsibleTrigger",CollapsibleTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopeCollapsible:n0,...a0}=r0,i0=useCollapsibleContext(TRIGGER_NAME$1,n0);return jsxRuntimeExports.jsx(Primitive.button,{type:"button","aria-controls":i0.contentId,"aria-expanded":i0.open||!1,"data-state":getState(i0.open),"data-disabled":i0.disabled?"":void 0,disabled:i0.disabled,...a0,ref:e0,onClick:composeEventHandlers(r0.onClick,i0.onOpenToggle)})});CollapsibleTrigger$1.displayName=TRIGGER_NAME$1;var CONTENT_NAME$1="CollapsibleContent",CollapsibleContent$1=reactExports.forwardRef((r0,e0)=>{const{forceMount:n0,...a0}=r0,i0=useCollapsibleContext(CONTENT_NAME$1,r0.__scopeCollapsible);return jsxRuntimeExports.jsx(Presence,{present:n0||i0.open,children:({present:s0})=>jsxRuntimeExports.jsx(CollapsibleContentImpl,{...a0,ref:e0,present:s0})})});CollapsibleContent$1.displayName=CONTENT_NAME$1;var CollapsibleContentImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeCollapsible:n0,present:a0,children:i0,...s0}=r0,o0=useCollapsibleContext(CONTENT_NAME$1,n0),[l0,c0]=reactExports.useState(a0),u0=reactExports.useRef(null),d0=useComposedRefs$1(e0,u0),h0=reactExports.useRef(0),f0=h0.current,p0=reactExports.useRef(0),A0=p0.current,m0=o0.open||l0,x0=reactExports.useRef(m0),g0=reactExports.useRef(void 0);return reactExports.useEffect(()=>{const y0=requestAnimationFrame(()=>x0.current=!1);return()=>cancelAnimationFrame(y0)},[]),useLayoutEffect2(()=>{const y0=u0.current;if(y0){g0.current=g0.current||{transitionDuration:y0.style.transitionDuration,animationName:y0.style.animationName},y0.style.transitionDuration="0s",y0.style.animationName="none";const b0=y0.getBoundingClientRect();h0.current=b0.height,p0.current=b0.width,x0.current||(y0.style.transitionDuration=g0.current.transitionDuration,y0.style.animationName=g0.current.animationName),c0(a0)}},[o0.open,a0]),jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState(o0.open),"data-disabled":o0.disabled?"":void 0,id:o0.contentId,hidden:!m0,...s0,ref:d0,style:{"--radix-collapsible-content-height":f0?`${f0}px`:void 0,"--radix-collapsible-content-width":A0?`${A0}px`:void 0,...r0.style},children:m0&&i0})});function getState(r0){return r0?"open":"closed"}var Root$3=Collapsible$1;const Collapsible=Root$3,CollapsibleTrigger=CollapsibleTrigger$1,CollapsibleContent=CollapsibleContent$1,songIcon="/assets/song-icon-DPFwm68J.png";function Skeleton({className:r0,...e0}){return jsxRuntimeExports.jsx("div",{className:cn$1("animate-pulse rounded-md bg-muted",r0),...e0})}function useSongEditHistory(r0){const[e0,n0]=reactExports.useState([]),[a0,i0]=reactExports.useState(!1),[s0,o0]=reactExports.useState(null),l0=reactExports.useCallback(async()=>
635{if(!r0){n0([]);return}i0(!0),o0(null);try{const{data:{session:c0}}=await supabase.auth.getSession();if(!c0){o0("Not authenticated");return}const u0=await supabase.functions.invoke("manage-library",{body:{action:"list_history",table:"song_edit_history",songId:r0}});if(u0.error)throw new Error(u0.error.message);const d0=u0.data;if(!d0.success)throw new Error(d0.error||"Failed to fetch edit history");const h0=d0.data.map(f0=>({id:f0.id,songId:f0.song_id,editorType:f0.editor_type,editorInfo:f0.editor_info,editorSongwriterId:f0.editor_songwriter_id,fieldName:f0.field_name,oldValue:f0.old_value,newValue:f0.new_value,createdAt:f0.created_at}));n0(h0)}catch(c0){console.error("Failed to fetch song edit history:",c0),o0(c0 instanceof Error?c0.message:"Unknown error")}finally{i0(!1)}},[r0]);return{edits:e0,loading:a0,error:s0,refresh:l0}}const FIELD_LABELS={name:"Title",bpm:"BPM",key:"Key",scale:"Scale",groove:"Groove",genres:"Genres",vocalist_gender:"Vocalist",writers:"Writers",keywords:"Keywords",status:"Status",folder_id:"Folder",lyrics:"Lyrics",edit_permission:"Edit Permission",dropbox_url:"Dropbox URL"};function formatValue(r0,e0){if(!e0||e0==="null")return"(empty)";if(r0==="genres"||r0==="keywords")try{const n0=JSON.parse(e0);if(Array.isArray(n0))return n0.length>0?n0.join(", "):"(none)"}catch{return e0}return r0==="status"?{available:"Available",cut:"Cut / Sold","on-hold":"On Hold"}[e0]||e0:r0==="edit_permission"?{owner_only:"Only Uploader",tagged_writers:"Tagged Writers",all_writers:"All Writers"}[e0]||e0:e0.length>50?e0.substring(0,47)+"...":e0}function groupEditsByDate(r0){const e0=new Map;for(const n0 of r0){const a0=parseISO(n0.createdAt);let i0;isToday(a0)?i0="Today":isYesterday(a0)?i0="Yesterday":i0=format$4(a0,"MMM d, yyyy"),e0.has(i0)||e0.set(i0,[]),e0.get(i0).push(n0)}return e0}function getInitials(r0){if(!r0)return"?";if(r0.includes("@"))return r0.charAt(0).toUpperCase();const e0=r0.split(" ").filter(n0=>n0.length>0);return e0.length>=2?(e0[0].charAt(0)+e0[1].charAt(0)).toUpperCase():r0.charAt(0).toUpperCase()}function SongEditHistory({songId:r0}){const[e0,n0]=reactExports.useState(!1),{edits:a0,loading:i0,error:s0,refresh:o0}=useSongEditHistory(r0);reactExports.useEffect(()=>{e0&&o0()},[e0,o0,r0]);const l0=groupEditsByDate(a0);return jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsxs("button",{onClick:()=>n0(!e0),className:"flex items-center gap-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground hover:text-foreground transition-colors w-full",children:[jsxRuntimeExports.jsx(History,{className:"w-3.5 h-3.5"}),jsxRuntimeExports.jsx("span",{children:"Edit History"}),e0?jsxRuntimeExports.jsx(ChevronUp,{className:"w-3 h-3 ml-auto"}):jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 ml-auto"})]}),e0&&jsxRuntimeExports.jsx("div",{className:"space-y-3 pl-1",children:i0?jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Skeleton,{className:"h-12 w-full"}),jsxRuntimeExports.jsx(Skeleton,{className:"h-12 w-full"})]}):s0?jsxRuntimeExports.jsx("p",{className:"text-xs text-destructive",children:s0}):a0.length===0?jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground italic",children:"No edit history yet"}):Array.from(l0.entries()).map(([c0,u0])=>jsxRuntimeExports.jsxs("div",{className:"space-y-1.5",children:[jsxRuntimeExports.jsx("div",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:c0}),jsxRuntimeExports.jsx("div",{className:"space-y-1.5 border-l border-border/50 pl-3",children:u0.map(d0=>jsxRuntimeExports.jsxs("div",{className:"relative flex gap-2 text-xs",children:[jsxRuntimeExports.jsx("div",{className:"absolute -left-[15px] top-1 w-1.5 h-1.5 rounded-full bg-border"}),jsxRuntimeExports.jsx("div",{className:"w-5 h-5 rounded-full bg-muted flex items-center justify-center shrink-0 text-[9px] font-medium text-muted-foreground",children:getInitials(d0.editorInfo)}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsxs("div",{className:"text-foreground",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:d0.editorInfo||"Unknown"}),jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:" changed "}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:FIELD_LABELS[d0.fieldName]||d0.fieldName})]}),jsxRuntimeExports.jsxs("div",{className:"text-muted-foreground text-[11px] mt-0.5",children:[jsxRuntimeExports.jsx("span",{className:"line-through opacity-60",children:formatValue(d0.fieldName,d0.oldValue)}),jsxRuntimeExports.jsx("span",{className:"mx-1",children:"â"}),jsxRuntimeExports.jsx("span",{children:formatValue(d0.fieldName,d0.newValue)})]}
635),jsxRuntimeExports.jsx("div",{className:"text-muted-foreground/60 text-[10px] mt-0.5",children:formatDistanceToNow(parseISO(d0.createdAt),{addSuffix:!0})})]})]},d0.id))})]},c0))})]})}const createCache=r0=>(e0,n0)=>(r0.set(e0,n0),n0),MAX_SAFE_INTEGER$3=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,TWO_TO_THE_POWER_OF_TWENTY_NINE=536870912,TWO_TO_THE_POWER_OF_THIRTY=TWO_TO_THE_POWER_OF_TWENTY_NINE*2,createGenerateUniqueNumber=(r0,e0)=>n0=>{const a0=e0.get(n0);let i0=a0===void 0?n0.size:a0<TWO_TO_THE_POWER_OF_THIRTY?a0+1:0;if(!n0.has(i0))return r0(n0,i0);if(n0.size<TWO_TO_THE_POWER_OF_TWENTY_NINE){for(;n0.has(i0);)i0=Math.floor(Math.random()*TWO_TO_THE_POWER_OF_THIRTY);return r0(n0,i0)}if(n0.size>MAX_SAFE_INTEGER$3)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n0.has(i0);)i0=Math.floor(Math.random()*MAX_SAFE_INTEGER$3);return r0(n0,i0)},LAST_NUMBER_WEAK_MAP=new WeakMap,cache$1=createCache(LAST_NUMBER_WEAK_MAP),generateUniqueNumber=createGenerateUniqueNumber(cache$1,LAST_NUMBER_WEAK_MAP),createBrokerFactory=(r0,e0,n0,a0)=>i0=>{const s0=e0(i0);return o0=>{const l0=r0(o0);o0.addEventListener("message",({data:h0})=>{const{id:f0}=h0;if(f0!==null&&l0.has(f0)){const{reject:p0,resolve:A0}=l0.get(f0);l0.delete(f0),h0.error===void 0?A0(h0.result):p0(new Error(h0.error.message))}}),a0(o0)&&o0.start();const c0=(h0,f0=null,p0=[])=>new Promise((A0,m0)=>{const x0=n0(l0);l0.set(x0,{reject:m0,resolve:A0}),f0===null?o0.postMessage({id:x0,method:h0},p0):o0.postMessage({id:x0,method:h0,params:f0},p0)}),u0=(h0,f0,p0=[])=>{o0.postMessage({id:null,method:h0,params:f0},p0)};let d0={};for(const[h0,f0]of Object.entries(s0))d0={...d0,[h0]:f0({call:c0,notify:u0})};return{...d0}}},createCreateOrGetOngoingRequests=r0=>e0=>{if(r0.has(e0))return r0.get(e0);const n0=new Map;return r0.set(e0,n0),n0},createExtendBrokerImplementation=r0=>e0=>({...e0,connect:({call:n0})=>async()=>{const{port1:a0,port2:i0}=new MessageChannel,s0=await n0("connect",{port:a0},[a0]);return r0.set(i0,s0),i0},disconnect:({call:n0})=>async a0=>{const i0=r0.get(a0);if(i0===void 0)throw new Error("The given port is not connected.");await n0("disconnect",{portId:i0})},isSupported:({call:n0})=>()=>n0("isSupported")}),isMessagePort=r0=>typeof r0.start=="function",createBroker=createBrokerFactory(createCreateOrGetOngoingRequests(new WeakMap),createExtendBrokerImplementation(new WeakMap),generateUniqueNumber,isMessagePort),createExtendedExponentialRampToValueAutomationEvent=(r0,e0,n0)=>({endTime:e0,insertTime:n0,type:"exponentialRampToValue",value:r0}),createExtendedLinearRampToValueAutomationEvent=(r0,e0,n0)=>({endTime:e0,insertTime:n0,type:"linearRampToValue",value:r0}),createSetValueAutomationEvent=(r0,e0)=>({startTime:e0,type:"setValue",value:r0}),createSetValueCurveAutomationEvent=(r0,e0,n0)=>({duration:n0,startTime:e0,type:"setValueCurve",values:r0}),getTargetValueAtTime=(r0,e0,{startTime:n0,target:a0,timeConstant:i0})=>a0+(e0-a0)*Math.exp((n0-r0)/i0),isExponentialRampToValueAutomationEvent=r0=>r0.type==="exponentialRampToValue",isLinearRampToValueAutomationEvent=r0=>r0.type==="linearRampToValue",isAnyRampToValueAutomationEvent=r0=>isExponentialRampToValueAutomationEvent(r0)||isLinearRampToValueAutomationEvent(r0),isSetValueAutomationEvent=r0=>r0.type==="setValue",isSetValueCurveAutomationEvent=r0=>r0.type==="setValueCurve",getValueOfAutomationEventAtIndexAtTime=(r0,e0,n0,a0)=>{const i0=r0[e0];return i0===void 0?a0:isAnyRampToValueAutomationEvent(i0)||isSetValueAutomationEvent(i0)?i0.value:isSetValueCurveAutomationEvent(i0)?i0.values[i0.values.length-1]:getTargetValueAtTime(n0,getValueOfAutomationEventAtIndexAtTime(r0,e0-1,i0.startTime,a0),i0)},getEndTimeAndValueOfPreviousAutomationEvent=(r0,e0,n0,a0,i0)=>n0===void 0?[a0.insertTime,i0]:isAnyRampToValueAutomationEvent(n0)?[n0.endTime,n0.value]:isSetValueAutomationEvent(n0)?[n0.startTime,n0.value]:isSetValueCurveAutomationEvent(n0)?[n0.startTime+n0.duration,n0.values[n0.values.length-1]]:[n0.startTime,getValueOfAutomationEventAtIndexAtTime(r0,e0-1,n0.startTime,i0)],isCancelAndHoldAutomationEvent=r0=>r0.type==="cancelAndHold",isCancelScheduledValuesAutomationEvent=r0=>r0.type==="cancelScheduledValues",getEventTime=r0=>isCancelAndHoldAutomationEvent(r0)||isCancelScheduledValuesAutomationEvent(r0)?r0.cancelTime:isExponentialRampToValueAutomationEvent(r0)||isLinearRampToValueAutomationEvent(r0)?r0.endTime:r0.startTime,getExponentialRampValueAtTime=(r0,e0,n0,{endTime:a0,value:i0})=>n0===i0?i0:0<n0&&0<i0||n0<0&&i0<0?n0*(i0/n0)**((r0-e0)/(a0-e0)):0,getLinearRampValueAtTime=(r0,e0,n0,{endTime:a0,value:i0})=>n0+(r0-e0)/(a0-e0)*(i0-n0),interpolateValue=(r0,e0)=>{const n0=Math.floor(e0),a0=Math.ceil(e0);return n0===a0?r0[n0]:(1-(e0-n0))*r0[n0]+(1-(a0-e0))*r0[a0]},getValueCurveValueAtTime=(r0,{duration:e0,startTime:n0,values:a0})=>{const i0=(r0-n0)/e0*(a0.length-1);return interpolateValue(a0,i0)},isSetTargetAutomationEvent=r0=>r0.type==="setTarget";class AutomationEventList{constructor(e0){this._automationEvents=[],this._currenTime=0,this._defaultValue=e0}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}
vendor: 9,980 bytes, lines 635-637
635add(e0){const n0=getEventTime(e0);if(isCancelAndHoldAutomationEvent(e0)||isCancelScheduledValuesAutomationEvent(e0)){const a0=this._automationEvents.findIndex(s0=>isCancelScheduledValuesAutomationEvent(e0)&&isSetValueCurveAutomationEvent(s0)?s0.startTime+s0.duration>=n0:getEventTime(s0)>=n0),i0=this._automationEvents[a0];if(a0!==-1&&(this._automationEvents=this._automationEvents.slice(0,a0)),isCancelAndHoldAutomationEvent(e0)){const s0=this._automationEvents[this._automationEvents.length-1];if(i0!==void 0&&isAnyRampToValueAutomationEvent(i0)){if(s0!==void 0&&isSetTargetAutomationEvent(s0))throw new Error("The internal list is malformed.");const o0=s0===void 0?i0.insertTime:isSetValueCurveAutomationEvent(s0)?s0.startTime+s0.duration:getEventTime(s0),l0=s0===void 0?this._defaultValue:isSetValueCurveAutomationEvent(s0)?s0.values[s0.values.length-1]:s0.value,c0=isExponentialRampToValueAutomationEvent(i0)?getExponentialRampValueAtTime(n0,o0,l0,i0):getLinearRampValueAtTime(n0,o0,l0,i0),u0=isExponentialRampToValueAutomationEvent(i0)?createExtendedExponentialRampToValueAutomationEvent(c0,n0,this._currenTime):createExtendedLinearRampToValueAutomationEvent(c0,n0,this._currenTime);this._automationEvents.push(u0)}if(s0!==void 0&&isSetTargetAutomationEvent(s0)&&this._automationEvents.push(createSetValueAutomationEvent(this.getValue(n0),n0)),s0!==void 0&&isSetValueCurveAutomationEvent(s0)&&s0.startTime+s0.duration>n0){const o0=n0-s0.startTime,l0=(s0.values.length-1)/s0.duration,c0=Math.max(2,1+Math.ceil(o0*l0)),u0=o0/(c0-1)*l0,d0=s0.values.slice(0,c0);if(u0<1)for(let h0=1;h0<c0;h0+=1){const f0=u0*h0%1;d0[h0]=s0.values[h0-1]*(1-f0)+s0.values[h0]*f0}this._automationEvents[this._automationEvents.length-1]=createSetValueCurveAutomationEvent(d0,s0.startTime,o0)}}}else{const a0=this._automationEvents.findIndex(o0=>getEventTime(o0)>n0),i0=a0===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[a0-1];if(i0!==void 0&&isSetValueCurveAutomationEvent(i0)&&getEventTime(i0)+i0.duration>n0)return!1;const s0=isExponentialRampToValueAutomationEvent(e0)?createExtendedExponentialRampToValueAutomationEvent(e0.value,e0.endTime,this._currenTime):isLinearRampToValueAutomationEvent(e0)?createExtendedLinearRampToValueAutomationEvent(e0.value,n0,this._currenTime):e0;if(a0===-1)this._automationEvents.push(s0);else{if(isSetValueCurveAutomationEvent(e0)&&n0+e0.duration>getEventTime(this._automationEvents[a0]))return!1;this._automationEvents.splice(a0,0,s0)}}return!0}flush(e0){const n0=this._automationEvents.findIndex(a0=>getEventTime(a0)>e0);if(n0>1){const a0=this._automationEvents.slice(n0-1),i0=a0[0];isSetTargetAutomationEvent(i0)&&a0.unshift(createSetValueAutomationEvent(getValueOfAutomationEventAtIndexAtTime(this._automationEvents,n0-2,i0.startTime,this._defaultValue),i0.startTime)),this._automationEvents=a0}}getValue(e0){if(this._automationEvents.length===0)return this._defaultValue;const n0=this._automationEvents.findIndex(o0=>getEventTime(o0)>e0),a0=this._automationEvents[n0],i0=(n0===-1?this._automationEvents.length:n0)-1,s0=this._automationEvents[i0];if(s0!==void 0&&isSetTargetAutomationEvent(s0)&&(a0===void 0||!isAnyRampToValueAutomationEvent(a0)||a0.insertTime>e0))return getTargetValueAtTime(e0,getValueOfAutomationEventAtIndexAtTime(this._automationEvents,i0-1,s0.startTime,this._defaultValue),s0);if(s0!==void 0&&isSetValueAutomationEvent(s0)&&(a0===void 0||!isAnyRampToValueAutomationEvent(a0)))return s0.value;if(s0!==void 0&&isSetValueCurveAutomationEvent(s0)&&(a0===void 0||!isAnyRampToValueAutomationEvent(a0)||s0.startTime+s0.duration>e0))return e0<s0.startTime+s0.duration?getValueCurveValueAtTime(e0,s0):s0.values[s0.values.length-1];if(s0!==void 0&&isAnyRampToValueAutomationEvent(s0)&&(a0===void 0||!isAnyRampToValueAutomationEvent(a0)))return s0.value;if(a0!==void 0&&isExponentialRampToValueAutomationEvent(a0)){const[o0,l0]=getEndTimeAndValueOfPreviousAutomationEvent(this._automationEvents,i0,s0,a0,this._defaultValue);return getExponentialRampValueAtTime(e0,o0,l0,a0)}if(a0!==void 0&&isLinearRampToValueAutomationEvent(a0)){const[o0,l0]=getEndTimeAndValueOfPreviousAutomationEvent(this._automationEvents,i0,s0,a0,this._defaultValue);return getLinearRampValueAtTime(e0,o0,l0,a0)}return this._defaultValue}}const createCancelAndHoldAutomationEvent=r0=>({cancelTime:r0,type:"cancelAndHold"}),createCancelScheduledValuesAutomationEvent=r0=>({cancelTime:r0,type:"cancelScheduledValues"}),createExponentialRampToValueAutomationEvent=(r0,e0)=>({endTime:e0,type:"exponentialRampToValue",value:r0}),createLinearRampToValueAutomationEvent=(r0,e0)=>({endTime:e0,type:"linearRampToValue",value:r0}),createSetTargetAutomationEvent=(r0,e0,n0)=>({startTime:e0,target:r0,timeConstant:n0,type:"setTarget"}),createAbortError=()=>new DOMException("","AbortError"),createAddActiveInputConnectionToAudioNode=r0=>(e0,n0,[a0,i0,s0],o0)=>{r0(e0[i0],[n0,a0,s0],l0=>l0[0]===n0&&l0[1]===a0,o0)},createAddAudioNodeConnections=r0=>(e0,n0,a0)=>{const i0=[];for(let s0=0;s0<a0.numberOfInputs;s0+=1)i0.push(new Set);r0.set(e0,{activeInputs:i0,outputs:new Set,passiveInputs:new WeakMap,renderer:n0})},createAddAudioParamConnections=r0=>(e0,n0)=>{r0.set(e0,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n0})},ACTIVE_AUDIO_NODE_STORE=new WeakSet,AUDIO_NODE_CONNECTIONS_STORE=new WeakMap,AUDIO_NODE_STORE=new WeakMap,AUDIO_PARAM_CONNECTIONS_STORE=new WeakMap,AUDIO_PARAM_STORE=new WeakMap,CONTEXT_STORE=new WeakMap,EVENT_LISTENERS=new WeakMap,CYCLE_COUNTERS=new WeakMap,NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS=new WeakMap,handler={construct(){return handler}},isConstructible=r0=>{try{const e0=new Proxy(r0,handler);new e0}catch{return!1}return!0},IMPORT_STATEMENT_REGEX=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,splitImportStatements=(r0,e0)=>{const n0=[];let a0=r0.replace(/^[\s]+/,""),i0=a0.match(IMPORT_STATEMENT_REGEX);for(;i0!==null;){const s0=i0[1].slice(1,-1),o0=i0[0].replace(/([\s]+)?;?$/,"").replace(s0,new URL(s0,e0).toString());n0.push(o0),a0=a0.slice(i0[0].length).replace(/^[\s]+/,""),i0=a0.match(IMPORT_STATEMENT_REGEX)}return[n0.join(";"),a0]},verifyParameterDescriptors=r0=>{if(r0!==void 0&&!Array.isArray(r0))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},verifyProcessorCtor=r0=>{if(!isConstructible(r0))throw new TypeError("The given value for processorCtor should be a constructor.");if(r0.prototype===null||typeof r0.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},createAddAudioWorkletModule=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0)=>{let p0=0;return(A0,m0,x0={credentials:"omit"})=>{const g0=d0.get(A0);if(g0!==void 0&&g0.has(m0))return Promise.resolve();const y0=u0.get(A0);if(y0!==void 0){const w0=y0.get(m0);if(w0!==void 0)return w0}const b0=s0(A0),E0=b0.audioWorklet===void 0?i0(m0).then(([w0,v0])=>{const[S0,k0]=splitImportStatements(w0,v0),R0=`${S0};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${k0} 636})})(window,'_AWGS')`;return n0(R0)}).then(()=>{const w0=f0._AWGS.pop();if(w0===void 0)throw new SyntaxError;a0(b0.currentTime,b0.sampleRate,()=>w0(class{},void 0,(v0,S0)=>{if(v0.trim()==="")throw e0();const k0=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(b0);if(k0!==void 0){if(k0.has(v0))throw e0();verifyProcessorCtor(S0),verifyParameterDescriptors(S0.parameterDescriptors),k0.set(v0,S0)}else verifyProcessorCtor(S0),verifyParameterDescriptors(S0.parameterDescriptors),NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.set(b0,new Map([[v0,S0]]))},b0.sampleRate,void 0,void 0))}):Promise.all([i0(m0),Promise.resolve(r0(h0,h0))]).then(([[w0,v0],S0])=>{const k0=p0+1;p0=k0;const[R0,j0]=splitImportStatements(w0,v0),I0=`${R0};((AudioWorkletProcessor,registerProcessor)=>{${j0} 637})(${S0?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${S0?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${S0?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${k0}',class extends AudioWorkletProcessor{process(){return !1}})`,M0=new Blob([I0],{type:"application/javascript; charset=utf-8"}),N0=URL.createObjectURL(M0);return b0.audioWorklet.addModule(N0,x0).then(()=>{if(l0(b0))return b0;const D0=o0(b0);return D0.audioWorklet.addModule(N0,x0).then(()=>D0)}).then(D0=>{if(c0===null)throw new SyntaxError;try{new c0(D0,`__sac${k0}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(N0))});return y0===void 0?u0.set(A0,new Map([[m0,E0]])):y0.set(m0,E0),E0.then(()=>{const w0=d0.get(A0);w0===void 0?d0.set(A0,new Set([m0])):w0.add(m0)}).finally(()=>{const w0=u0.get(A0);w0!==void 0&&w0.delete(m0)}),E0}},getValueForKey=(r0,e0)=>{const n0=r0.get(e0);if(n0===void 0)throw new Error("A value with the given key could not be found.");return n0},pickElementFromSet=(r0,e0)=>{const n0=Array.from(r0).filter(e0);if(n0.length>1)throw Error("More than one element was found.");if(n0.length===0)throw Error("No element was found.");const[a0]=n0;return r0.delete(a0),a0},deletePassiveInputConnectionToAudioNode=(r0,e0,n0,a0)=>{const i0=getValueForKey(r0,e0),s0=pickElementFromSet(i0,o0=>o0[0]===n0&&o0[1]===a0);return i0.size===0&&r0.delete(e0),s0},getEventListenersOfAudioNode=r0=>getValueForKey(EVENT_LISTENERS,r0),setInternalStateToActive=r0=>{if(ACTIVE_AUDIO_NODE_STORE.has(r0))throw new Error("The AudioNode is already stored.");ACTIVE_AUDIO_NODE_STORE.add(r0),getEventListenersOfAudioNode(r0).forEac
637h(e0=>e0(!0))},isAudioWorkletNode=r0=>"port"in r0,setInternalStateToPassive=r0=>{if(!ACTIVE_AUDIO_NODE_STORE.has(r0))throw new Error("The AudioNode is not stored.");ACTIVE_AUDIO_NODE_STORE.delete(r0),getEventListenersOfAudioNode(r0).forEach(e0=>e0(!1))},setInternalStateToPassiveWhenNecessary=(r0,e0)=>{!isAudioWorkletNode(r0)&&e0.every(n0=>n0.size===0)&&setInternalStateToPassive(r0)},createAddConnectionToAudioNode=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0)=>{const p0=new WeakMap;return(A0,m0,x0,g0,y0)=>{const{activeInputs:b0,passiveInputs:E0}=s0(m0),{outputs:w0}=s0(A0),v0=l0(A0),S0=k0=>{const R0=c0(m0),j0=c0(A0);if(k0){const C0=deletePassiveInputConnectionToAudioNode(E0,A0,x0,g0);r0(b0,A0,C0,!1),!y0&&!h0(A0)&&n0(j0,R0,x0,g0),f0(m0)&&setInternalStateToActive(m0)}else{const C0=a0(b0,A0,x0,g0);e0(E0,g0,C0,!1),!y0&&!h0(A0)&&i0(j0,R0,x0,g0);const $0=o0(m0);if($0===0)d0(m0)&&setInternalStateToPassiveWhenNecessary(m0,b0);else{const T0=p0.get(m0);T0!==void 0&&clearTimeout(T0),p0.set(m0,setTimeout(()=>{d0(m0)&&setInternalStateToPassiveWhenNecessary(m0,b0)},$0*1e3))}}};return u0(w0,[m0,x0,g0],k0=>k0[0]===m0&&k0[1]===x0&&k0[2]===g0,!0)?(v0.add(S0),d0(A0)?r0(b0,A0,[x0,g0,S0],!0):e0(E0,g0,[A0,x0,S0],!0),!0):!1}},createAddPassiveInputConnectionToAudioNode=r0=>(e0,n0,[a0,i0,s0],o0)=>{const l0=e0.get(a0);l0===void 0?e0.set(a0,new Set([[i0,n0,s0]])):r0(l0,[i0,n0,s0],c0=>c0[0]===i0&&c0[1]===n0,o0)},createAddSilentConnection=r0=>(e0,n0)=>{const a0=r0(e0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});n0.connect(a0).connect(e0.destination);const i0=()=>{n0.removeEventListener("ended",i0),n0.disconnect(a0),a0.disconnect()};n0.addEventListener("ended",i0)},DEFAULT_OPTIONS$h={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},createAnalyserNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=i0(l0),d0={...DEFAULT_OPTIONS$h,...c0},h0=a0(u0,d0),f0=s0(u0)?e0():null;super(l0,!1,h0,f0),this._nativeAnalyserNode=h0}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(l0){this._nativeAnalyserNode.fftSize=l0}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(l0){const c0=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=l0,!(l0>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=c0,n0()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(l0){const c0=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=l0,!(this._nativeAnalyserNode.maxDecibels>l0))throw this._nativeAnalyserNode.minDecibels=c0,n0()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(l0){this._nativeAnalyserNode.smoothingTimeConstant=l0}getByteFrequencyData(l0){this._nativeAnalyserNode.getByteFrequencyData(l0)}getByteTimeDomainData(l0){this._nativeAnalyserNode.getByteTimeDomainData(l0)}getFloatFrequencyData(l0){this._nativeAnalyserNode.getFloatFrequencyData(l0)}getFloatTimeDomainData(l0){this._nativeAnalyserNode.getFloatTimeDomainData(l0)}},isOwnedByContext=(r0,e0)=>r0.context===e0,createAnalyserNodeRendererFactory=(r0,e0,n0)=>()=>{const a0=new WeakMap,i0=async(s0,o0)=>{let l0=e0(s0);if(!isOwnedByContext(l0,o0)){const u0={channelCount:l0.channelCount,channelCountMode:l0.channelCountMode,channelInterpretation:l0.channelInterpretation,fftSize:l0.fftSize,maxDecibels:l0.maxDecibels,minDecibels:l0.minDecibels,smoothingTimeConstant:l0.smoothingTimeConstant};l0=r0(o0,u0)}return a0.set(o0,l0),await n0(s0,o0,l0),l0};return{render(s0,o0){const l0=a0.get(o0);return l0!==void 0?Promise.resolve(l0):i0(s0,o0)}}},testAudioBufferCopyChannelMethodsOutOfBoundsSupport=r0=>{try{r0.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},createIndexSizeError=()=>new DOMException("","IndexSizeError"),wrapAudioBufferGetChannelDataMethod=r
vendor: 17,943 bytes, line 637
6370=>{r0.getChannelData=(e0=>n0=>{try{return e0.call(r0,n0)}catch(a0){throw a0.code===12?createIndexSizeError():a0}})(r0.getChannelData)},DEFAULT_OPTIONS$g={numberOfChannels:1},createAudioBufferConstructor=(r0,e0,n0,a0,i0,s0,o0,l0)=>{let c0=null;return class k5{constructor(d0){if(i0===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h0,numberOfChannels:f0,sampleRate:p0}={...DEFAULT_OPTIONS$g,...d0};c0===null&&(c0=new i0(1,1,44100));const A0=a0!==null&&e0(s0,s0)?new a0({length:h0,numberOfChannels:f0,sampleRate:p0}):c0.createBuffer(f0,h0,p0);if(A0.numberOfChannels===0)throw n0();return typeof A0.copyFromChannel!="function"?(o0(A0),wrapAudioBufferGetChannelDataMethod(A0)):e0(testAudioBufferCopyChannelMethodsOutOfBoundsSupport,()=>testAudioBufferCopyChannelMethodsOutOfBoundsSupport(A0))||l0(A0),r0.add(A0),A0}static[Symbol.hasInstance](d0){return d0!==null&&typeof d0=="object"&&Object.getPrototypeOf(d0)===k5.prototype||r0.has(d0)}}},MOST_NEGATIVE_SINGLE_FLOAT=-34028234663852886e22,MOST_POSITIVE_SINGLE_FLOAT=-MOST_NEGATIVE_SINGLE_FLOAT,isActiveAudioNode=r0=>ACTIVE_AUDIO_NODE_STORE.has(r0),DEFAULT_OPTIONS$f={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},createAudioBufferSourceNodeConstructor=(r0,e0,n0,a0,i0,s0,o0,l0)=>class extends r0{constructor(u0,d0){const h0=s0(u0),f0={...DEFAULT_OPTIONS$f,...d0},p0=i0(h0,f0),A0=o0(h0),m0=A0?e0():null;super(u0,!1,p0,m0),this._audioBufferSourceNodeRenderer=m0,this._isBufferNullified=!1,this._isBufferSet=f0.buffer!==null,this._nativeAudioBufferSourceNode=p0,this._onended=null,this._playbackRate=n0(this,A0,p0.playbackRate,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(u0){if(this._nativeAudioBufferSourceNode.buffer=u0,u0!==null){if(this._isBufferSet)throw a0();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(u0){this._nativeAudioBufferSourceNode.loop=u0}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(u0){this._nativeAudioBufferSourceNode.loopEnd=u0}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(u0){this._nativeAudioBufferSourceNode.loopStart=u0}get onended(){return this._onended}set onended(u0){const d0=typeof u0=="function"?l0(this,u0):null;this._nativeAudioBufferSourceNode.onended=d0;const h0=this._nativeAudioBufferSourceNode.onended;this._onended=h0!==null&&h0===d0?u0:h0}get playbackRate(){return this._playbackRate}start(u0=0,d0=0,h0){if(this._nativeAudioBufferSourceNode.start(u0,d0,h0),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=h0===void 0?[u0,d0]:[u0,d0,h0]),this.context.state!=="closed"){setInternalStateToActive(this);const f0=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",f0),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",f0)}}stop(u0=0){this._nativeAudioBufferSourceNode.stop(u0),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=u0)}},createAudioBufferSourceNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap;let o0=null,l0=null;const c0=async(u0,d0)=>{let h0=n0(u0);const f0=isOwnedByContext(h0,d0);if(!f0){const p0={buffer:h0.buffer,channelCount:h0.channelCount,channelCountMode:h0.channelCountMode,channelInterpretation:h0.channelInterpretation,loop:h0.loop,loopEnd:h0.loopEnd,loopStart:h0.loopStart,playbackRate:h0.playbackRate.value};h0=e0(d0,p0),o0!==null&&h0.start(...o0),l0!==null&&h0.stop(l0)}return s0.set(d0,h0),f0?await r0(d0,u0.playbackRate,h0.playbackRate):await a0(d0,u0.playbackRate,h0.playbackRate),await i0(u0,d0,h0),h0};return{set start(u0){o0=u0},set stop(u0){l0=u0},render(u0,d0){const h0=s0.get(d0);return h0!==void 0?Promise.resolve(h0):c0(u0,d0)}}},isAudioBufferSourceNode=r0=>"playbackRate"in r0,isBiquadFilterNode=r0=>"frequency"in r0&&"gain"in r0,isConstantSourceNode=r0=>"offset"in r0,isGainNode=r0=>!("frequency"in r0)&&"gain"in r0,isOscillatorNode=r0=>"detune"in r0&&"frequency"in r0&&!("gain"in r0),isStereoPannerNode=r0=>"pan"in r0,getAudioNodeConnections=r0=>getValueForKey(AUDIO_NODE_CONNECTIONS_STORE,r0),getAudioParamConnections=r0=>getValueForKey(AUDIO_PARAM_CONNECTIONS_STORE,r0),deactivateActiveAudioNodeInputConnections=(r0,e0)=>{const{activeInputs:n0}=getAudioNodeConnections(r0);n0.forEach(i0=>i0.forEach(([s0])=>{e0.includes(r0)||deactivateActiveAudioNodeInputConnections(s0,[...e0,r0])}));const a0=isAudioBufferSourceNode(r0)?[r0.playbackRate]:isAudioWorkletNode(r0)?Array.from(r0.parameters.values()):isBiquadFilterNode(r0)?[r0.Q,r0.detune,r0.frequency,r0.gain]:isConstantSourceNode(r0)?[r0.offset]:isGainNode(r0)?[r0.gain]:isOscillatorNode(r0)?[r0.detune,r0.frequency]:isStereoPannerNode(r0)?[r0.pan]:[];for(const i0 of a0){const s0=getAudioParamConnections(i0);s0!==void 0&&s0.activeInputs.forEach(([o0])=>deactivateActiveAudioNodeInputConnections(o0,e0))}isActiveAudioNode(r0)&&setInternalStateToPassive(r0)},deactivateAudioGraph=r0=>{deactivateActiveAudioNodeInputConnections(r0.destination,[])},createAudioDestinationNodeConstructor=(r0,e0,n0,a0,i0,s0,o0,l0)=>class extends r0{constructor(u0,d0){const h0=s0(u0),f0=o0(h0),p0=i0(h0,d0,f0),A0=f0?e0(l0):null;super(u0,!1,p0,A0),this._isNodeOfNativeOfflineAudioContext=f0,this._nativeAudioDestinationNode=p0}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(u0){if(this._isNodeOfNativeOfflineAudioContext)throw a0();if(u0>this._nativeAudioDestinationNode.maxChannelCount)throw n0();this._nativeAudioDestinationNode.channelCount=u0}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(u0){if(this._isNodeOfNativeOfflineAudioContext)throw a0();this._nativeAudioDestinationNode.channelCountMode=u0}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},createAudioDestinationNodeRenderer=r0=>{const e0=new WeakMap,n0=async(a0,i0)=>{const s0=i0.destination;return e0.set(i0,s0),await r0(a0,i0,s0),s0};return{render(a0,i0){const s0=e0.get(i0);return s0!==void 0?Promise.resolve(s0):n0(a0,i0)}}},createAudioListenerFactory=(r0,e0,n0,a0,i0,s0,o0,l0)=>(c0,u0)=>{const d0=u0.listener,h0=()=>{const w0=new Float32Array(1),v0=e0(u0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),S0=o0(u0);let k0=!1,R0=[0,0,-1,0,1,0],j0=[0,0,0];const C0=()=>{if(k0)return;k0=!0;const M0=a0(u0,256,9,0);M0.onaudioprocess=({inputBuffer:N0})=>{const D0=[s0(N0,w0,0),s0(N0,w0,1),s0(N0,w0,2),s0(N0,w0,3),s0(N0,w0,4),s0(N0,w0,5)];D0.some((B0,z0)=>B0!==R0[z0])&&(d0.setOrientation(...D0),R0=D0);const O0=[s0(N0,w0,6),s0(N0,w0,7),s0(N0,w0,8)];O0.some((B0,z0)=>B0!==j0[z0])&&(d0.setPosition(...O0),j0=O0)},v0.connect(M0)},$0=M0=>N0=>{N0!==R0[M0]&&(R0[M0]=N0,d0.setOrientation(...R0))},T0=M0=>N0=>{N0!==j0[M0]&&(j0[M0]=N0,d0.setPosition(...j0))},I0=(M0,N0,D0)=>{const O0=n0(u0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:N0});O0.connect(v0,0,M0),O0.start(),Object.defineProperty(O0.offset,"defaultValue",{get(){return N0}});const B0=r0({context:c0},S0,O0.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT);return l0(B0,"value",z0=>()=>z0.call(B0),z0=>G0=>{try{z0.call(B0,G0)}catch(F0){if(F0.code!==9)throw F0}C0(),S0&&D0(G0)}),B0.cancelAndHoldAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.cancelAndHoldAtTime),B0.cancelScheduledValues=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.cancelScheduledValues),B0.exponentialRampToValueAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.exponentialRampToValueAtTime),B0.linearRampToValueAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.linearRampToValueAtTime),B0.setTargetAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.setTargetAtTime),B0.setValueAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.setValueAtTime),B0.setValueCurveAtTime=(z0=>S0?()=>{throw i0()}:(...G0)=>{const F0=z0.apply(B0,G0);return C0(),F0})(B0.setValueCurveAtTime),B0};return{forwardX:I0(0,0,$0(0)),forwardY:I0(1,0,$0(1)),forwardZ:I0(2,-1,$0(2)),positionX:I0(6,0,T0(0)),positionY:I0(7,0,T0(1)),positionZ:I0(8,0,T0(2)),upX:I0(3,0,$0(3)),upY:I0(4,1,$0(4)),upZ:I0(5,0,$0(5))}},{forwardX:f0,forwardY:p0,forwardZ:A0,positionX:m0,positionY:x0,positionZ:g0,upX:y0,upY:b0,upZ:E0}=d0.forwardX===void 0?h0():d0;return{get forwardX(){return f0},get forwardY(){return p0},get forwardZ(){return A0},get positionX(){return m0},get positionY(){return x0},get positionZ(){return g0},get upX(){return y0},get upY(){return b0},get upZ(){return E0}}},isAudioNode=r0=>"context"in r0,isAudioNodeOutputConnection=r0=>isAudioNode(r0[0]),insertElementInSet=(r0,e0,n0,a0)=>{for(const i0 of r0)if(n0(i0)){if(a0)return!1;throw Error("The set contains at least one similar element.")}return r0.add(e0),!0},addActiveInputConnectionToAudioParam=(r0,e0,[n0,a0],i0)=>{insertElementInSet(r0,[e0,n0,a0],s0=>s0[0]===e0&&s0[1]===n0,i0)},addPassiveInputConnectionToAudioParam=(r0,[e0,n0,a0],i0)=>{const s0=r0.get(e0);s0===void 0?r0.set(e0,new Set([[n0,a0]])):insertElementInSet(s0,[n0,a0],o0=>o0[0]===n0,i0)},isNativeAudioNodeFaker=r0=>"inputs"in r0,connectNativeAudioNodeToNativeAudioNode=(r0,e0,n0,a0)=>{if(isNativeAudioNodeFaker(e0)){const i0=e0.inputs[a0];return r0.connect(i0,n0,0),[i0,n0,0]}return r0.connect(e0,n0,a0),[e0,n0,a0]},deleteActiveInputConnection=(r0,e0,n0)=>{for(const a0 of r0)if(a0[0]===e0&&a0[1]===n0)return r0.delete(a0),a0;return null},deleteActiveInputConnectionToAudioParam=(r0,e0,n0)=>pickElementFromSet(r0,a0=>a0[0]===e0&&a0[1]===n0),deleteEventListenerOfAudioNode=(r0,e0)=>{if(!getEventListenersOfAudioNode(r0).delete(e0))throw new Error("Missing the expected event listener.")},deletePassiveInputConnectionToAudioParam=(r0,e0,n0)=>{const a0=getValueForKey(r0,e0),i0=pickElementFromSet(a0,s0=>s0[0]===n0);return a0.size===0&&r0.delete(e0),i0},disconnectNativeAudioNodeFromNativeAudioNode=(r0,e0,n0,a0)=>{isNativeAudioNodeFaker(e0)?r0.disconnect(e0.inputs[a0],n0,0):r0.disconnect(e0,n0,a0)},getNativeAudioNode=r0=>getValueForKey(AUDIO_NODE_STORE,r0),getNativeAudioParam=r0=>getValueForKey(AUDIO_PARAM_STORE,r0),isPartOfACycle=r0=>CYCLE_COUNTERS.has(r0),isPassiveAudioNode=r0=>!ACTIVE_AUDIO_NODE_STORE.has(r0),testAudioNodeDisconnectMethodSupport=(r0,e0)=>new Promise(n0=>{if(e0!==null)n0(!0);else{const a0=r0.createScriptProcessor(256,1,1),i0=r0.createGain(),s0=r0.createBuffer(1,2,44100),o0=s0.getChannelData(0);o0[0]=1,o0[1]=1;const l0=r0.createBufferSource();l0.buffer=s0,l0.loop=!0,l0.connect(a0).connect(r0.destination),l0.connect(i0),l0.disconnect(i0),a0.onaudioprocess=c0=>{const u0=c0.inputBuffer.getChannelData(0);Array.prototype.some.call(u0,d0=>d0===1)?n0(!0):n0(!1),l0.stop(),a0.onaudioprocess=null,l0.disconnect(a0),a0.disconnect(r0.destination)},l0.start()}}),visitEachAudioNodeOnce=(r0,e0)=>{const n0=new Map;for(const a0 of r0)for(const i0 of a0){const s0=n0.get(i0);n0.set(i0,s0===void 0?1:s0+1)}n0.forEach((a0,i0)=>e0(i0,a0))},isNativeAudioNode$1=r0=>"context"in r0,wrapAudioNodeDisconnectMethod=r0=>{const e0=new Map;r0.connect=(n0=>(a0,i0=0,s0=0)=>{const o0=isNativeAudioNode$1(a0)?n0(a0,i0,s0):n0(a0,i0),l0=e0.get(a0);return l0===void 0?e0.set(a0,[{input:s0,output:i0}]):l0.every(c0=>c0.input!==s0||c0.output!==i0)&&l0.push({input:s0,output:i0}),o0})(r0.connect.bind(r0)),r0.disconnect=(n0=>(a0,i0,s0)=>{if(n0.apply(r0),a0===void 0)e0.clear();else if(typeof a0=="number")for(const[o0,l0]of e0){const c0=l0.filter(u0=>u0.output!==a0);c0.length===0?e0.delete(o0):e0.set(o0,c0)}else if(e0.has(a0))if(i0===void 0)e0.delete(a0);else{const o0=e0.get(a0);if(o0!==void 0){const l0=o0.filter(c0=>c0.output!==i0&&(c0.input!==s0||s0===void 0));l0.length===0?e0.delete(a0):e0.set(a0,l0)}}for(const[o0,l0]of e0)l0.forEach(c0=>{isNativeAudioNode$1(o0)?r0.connect(o0,c0.output,c0.input):r0.connect(o0,c0.output)})})(r0.disconnect)},addConnectionToAudioParamOfAudioContext=(r0,e0,n0,a0)=>{const{activeInputs:i0,passiveInputs:s0}=getAudioParamConnections(e0),{outputs:o0}=getAudioNodeConnections(r0),l0=getEventListenersOfAudioNode(r0),c0=u0=>{const d0=getNativeAudioNode(r0),h0=getNativeAudioParam(e0);if(u0){const f0=deletePassiveInputConnectionToAudioParam(s0,r0,n0);addActiveInputConnectionToAudioParam(i0,r0,f0,!1),!a0&&!isPartOfACycle(r0)&&d0.connect(h0,n0)}else{const f0=deleteActiveInputConnectionToAudioParam(i0,r0,n0);addPassiveInputConnectionToAudioParam(s0,f0,!1),!a0&&!isPartOfACycle(r0)&&d0.disconnect(h0,n0)}};return insertElementInSet(o0,[e0,n0],u0=>u0[0]===e0&&u0[1]===n0,!0)?(l0.add(c0),isActiveAudioNode(r0)?addActiveInputConnectionToAudioParam(i0,r0,[n0,c0],!0):addPassiveInputConnectionToAudioParam(s0,[r0,n0,c0],!0),!0):!1},deleteInputConnectionOfAudioNode=(r0,e0,n0,a0)=>{const{activeInputs:i0,passiveInputs:s0}=getAudioNodeConnections(e0),o0=deleteActiveInputConnection(i0[a0],r0,n0);return o0===null?[deletePassiveInputConnectionToAudioNode(s0,r0,n0,a0)[2],!1]:[o0[2],!0]},deleteInputConnectionOfAudioParam=(r0,e0,n0)=>{const{activeInputs:a0,passiveInputs:i0}=getAudioParamConnections(e0),s0=deleteActiveInputConnection(a0,r0,n0);return s0===null?[deletePassiveInputConnectionToAudioParam(i0,r0,n0)[1],!1]:[s0[2],!0]},deleteInputsOfAudioNode=(r0,e0,n0,a0,i0)=>{const[s0,o0]=deleteInputConnectionOfAudioNode(r0,n0,a0,i0);if(s0!==null&&(deleteEventListenerOfAudioNode(r0,s0),o0&&!e0&&!isPartOfACycle(r0)&&disconnectNativeAudioNodeFromNativeAudioNode(getNativeAudioNode(r0),getNativeAudioNode(n0),a0,i0)),isActiveAudioNode(n0)){const{activeInputs:l0}=getAudioNodeConnections(n0);setInternalStateToPassiveWhenNecessary(n0,l0)}},deleteInputsOfAudioParam=(r0,e0,n0,a0)=>{const[i0,s0]=deleteInputConnectionOfAudioParam(r0,n0,a0);i0!==null&&(deleteEventListenerOfAudioNode(r0,i0),s0&&!e0&&!isPartOfACycle(r0)&&getNativeAudioNode(r0).disconnect(getNativeAudioParam(n0),a0))},deleteAnyConnection=(r0,e0)=>{const n0=getAudioNodeConnections(r0),a0=[];for(const i0 of n0.outputs)isAudioNodeOutputConnection(i0)?deleteInputsOfAudioNode(r0,e0,...i0):deleteInputsOfAudioParam(r0,e0,...i0),a0.push(i0[0]);return n0.outputs.clear(),a0},deleteConnectionAtOutput=(r0,e0,n0)=>{const a0=getAudioNodeConnections(r0),i0=[];for(const s0 of a0.outputs)s0[1]===n0&&(isAudioNodeOutputConnection(s0)?deleteInputsOfAudioNode(r0,e0,...s0):deleteInputsOfAudioParam(r0,e0,...s0),i0.push(s0[0]),a0.outputs.delete(s0));return i0},deleteConnectionToDestination=(r0,e0,n0,a0,i0)=>{const s0=getAudioNodeConnections(r0);return Array.from(s0.outputs).filter(o0=>o0[0]===n0&&(a0===void 0||o0[1]===a0)&&(i0===void 0||o0[2]===i0)).map(o0=>(isAudioNodeOutputConnection(o0)?deleteInputsOfAudioNode(r0,e0,...o0):deleteInputsOfAudioParam(r0,e0,...o0),s0.outputs.delete(o0),o0[0]))},createAudioNodeConstructor=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0,p0,A0,m0)=>class extends u0{constructor(g0,y0,b0,E0){super(b0),this._context=g0,this._nativeAudioNode=b0;const w0=d0(g0);h0(w0)&&n0(testAudioNodeDisconnectMethodSupport,()=>testAudioNodeDisconnectMethodSupport(w0,m0))!==!0&&wrapAudioNodeDisconnectMethod(b0),AUDIO_NODE_STORE.set(this,b0),EVENT_LISTENERS.set(this,new Set),g0.state!=="closed"&&y0&&setInternalStateToActive(this),r0(this,E0,b0)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(g0){this._nativeAudioNode.channelCount=g0}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(g0){this._nativeAudioNode.channelCountMode=g0}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(g0){this._nativeAudioNode.channelInterpretation=g0}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(g0,y0=0,b0=0){if(y0<0||y0>=this._nativeAudioNode.numberOfOutputs)throw i0();const E0=d0(this._context),w0=A0(E0);if(f0(g0)||p0(g0))throw s0();if(isAudioNode(g0)){const k0=getNativeAudioNode(g0);try{const j0=connectNativeAudioNodeToNativeAudioNode(this._nativeAudioNode,k0,y0,b0),C0=isPassiveAudioNode(this);(w0||C0)&&this._nativeAudioNode.disconnect(...j0),this.context.state!=="closed"&&!C0&&isPassiveAudioNode(g0)&&setInternalStateToActive(g0)}catch(j0){throw j0.code===12?s0():j0}if(e0(this,g0,y0,b0,w0)){const j0=c0([this],g0);visitEachAudioNodeOnce(j0,a0(w0))}return g0}const v0=getNativeAudioParam(g0);if(v0.name==="playbackRate"&&v0.maxValue===1024)throw o0();try{this._nativeAudioNode.connect(v0,y0),(w0||isPassiveAudioNode(this))&&this._nativeAudioNode.disconnect(v0,y0)}catch(k0){throw k0.code===12?s0():k0}if(addConnectionToAudioParamOfAudioContext(this,g0,y0,w0)){const k0=c0([this],g0);visitEachAudioNodeOnce(k0,a0(w0))}}disconnect(g0,y0,b0){let E0;const w0=d0(this._context),v0=A0(w0);if(g0===void 0)E0=deleteAnyConnection(this,v0);else if(typeof g0=="number"){if(g0<0||g0>=this.numberOfOutputs)throw i0();E0=deleteConnectionAtOutput(this,v0,g0)}else{if(y0!==void 0&&(y0<0||y0>=this.numberOfOutputs)||isAudioNode(g0)&&b0!==void 0&&(b0<0||b0>=g0.numberOfInputs))throw i0();if(E0=deleteConnectionToDestination(this,v0,g0,y0,b0),E0.length===0)throw s0()}for(const S0 of E0){const k0=c0([this],S0);visitEachAudioNodeOnce(k0,l0)}}},createAudioParamFactory=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0)=>(p0,A0,m0,x0=null,g0=null)=>{const y0=m0.value,b0=new AutomationEventList(y0),E0=A0?a0(b0):null,w0={get defaultValue(){return y0},get maxValue(){return x0===null?m0.maxValue:x0},get minValue(){return g0===null?m0.minValue:g0},get value(){return m0.value},set value(v0){m0.value=v0,w0.setValueAtTime(v0,p0.context.currentTime)}
637,cancelAndHoldAtTime(v0){if(typeof m0.cancelAndHoldAtTime=="function")E0===null&&b0.flush(p0.context.currentTime),b0.add(i0(v0)),m0.cancelAndHoldAtTime(v0);else{const S0=Array.from(b0).pop();E0===null&&b0.flush(p0.context.currentTime),b0.add(i0(v0));const k0=Array.from(b0).pop();m0.cancelScheduledValues(v0),S0!==k0&&k0!==void 0&&(k0.type==="exponentialRampToValue"?m0.exponentialRampToValueAtTime(k0.value,k0.endTime):k0.type==="linearRampToValue"?m0.linearRampToValueAtTime(k0.value,k0.endTime):k0.type==="setValue"?m0.setValueAtTime(k0.value,k0.startTime):k0.type==="setValueCurve"&&m0.setValueCurveAtTime(k0.values,k0.startTime,k0.duration))}return w0},cancelScheduledValues(v0){return E0===null&&b0.flush(p0.context.currentTime),b0.add(s0(v0)),m0.cancelScheduledValues(v0),w0},exponentialRampToValueAtTime(v0,S0){if(v0===0)throw new RangeError;if(!Number.isFinite(S0)||S0<0)throw new RangeError;const k0=p0.context.currentTime;return E0===null&&b0.flush(k0),Array.from(b0).length===0&&(b0.add(u0(y0,k0)),m0.setValueAtTime(y0,k0)),b0.add(o0(v0,S0)),m0.exponentialRampToValueAtTime(v0,S0),w0},linearRampToValueAtTime(v0,S0){const k0=p0.context.currentTime;return E0===null&&b0.flush(k0),Array.from(b0).length===0&&(b0.add(u0(y0,k0)),m0.setValueAtTime(y0,k0)),b0.add(l0(v0,S0)),m0.linearRampToValueAtTime(v0,S0),w0},setTargetAtTime(v0,S0,k0){return E0===null&&b0.flush(p0.context.currentTime),b0.add(c0(v0,S0,k0)),m0.setTargetAtTime(v0,S0,k0),w0},setValueAtTime(v0,S0){return E0===null&&b0.flush(p0.context.currentTime),b0.add(u0(v0,S0)),m0.setValueAtTime(v0,S0),w0},setValueCurveAtTime(v0,S0,k0){const R0=v0 instanceof Float32Array?v0:new Float32Array(v0);if(h0!==null&&h0.name==="webkitAudioContext"){const j0=S0+k0,C0=p0.context.sampleRate,$0=Math.ceil(S0*C0),T0=Math.floor(j0*C0),I0=T0-$0,M0=new Float32Array(I0);for(let D0=0;D0<I0;D0+=1){const O0=(R0.length-1)/k0*(($0+D0)/C0-S0),B0=Math.floor(O0),z0=Math.ceil(O0);M0[D0]=B0===z0?R0[B0]:(1-(O0-B0))*R0[B0]+(1-(z0-O0))*R0[z0]}E0===null&&b0.flush(p0.context.currentTime),b0.add(d0(M0,S0,k0)),m0.setValueCurveAtTime(M0,S0,k0);const N0=T0/C0;N0<j0&&f0(w0,M0[M0.length-1],N0),f0(w0,R0[R0.length-1],j0)}else E0===null&&b0.flush(p0.context.currentTime),b0.add(d0(R0,S0,k0)),m0.setValueCurveAtTime(R0,S0,k0);return w0}};return n0.set(w0,m0),e0.set(w0,p0),r0(w0,E0),w0},createAudioParamRenderer=r0=>({replay(e0){for(const n0 of r0)if(n0.type==="exponentialRampToValue"){const{endTime:a0,value:i0}=n0;e0.exponentialRampToValueAtTime(i0,a0)}else if(n0.type==="linearRampToValue"){const{endTime:a0,value:i0}=n0;e0.linearRampToValueAtTime(i0,a0)}else if(n0.type==="setTarget"){const{startTime:a0,target:i0,timeConstant:s0}=n0;e0.setTargetAtTime(i0,a0,s0)}else if(n0.type==="setValue"){const{startTime:a0,value:i0}=n0;e0.setValueAtTime(i0,a0)}else if(n0.type==="setValueCurve"){const{duration:a0,startTime:i0,values:s0}=n0;e0.setValueCurveAtTime(s0,i0,a0)}else throw new Error("Can't apply an unknown automation.")}}),createBaseAudioContextConstructor=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0,p0,A0,m0,x0,g0,y0,b0)=>class extends A0{constructor(w0,v0){super(w0,v0),this._nativeContext=w0,this._audioWorklet=r0===void 0?void 0:{addModule:(S0,k0)=>r0(this,S0,k0)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e0(this)}createBiquadFilter(){return new i0(this)}createBuffer(w0,v0,S0){return new n0({length:v0,numberOfChannels:w0,sampleRate:S0})}createBufferSource(){return new a0(this)}createChannelMerger(w0=6){return new s0(this,{numberOfInputs:w0})}createChannelSplitter(w0=6){return new o0(this,{numberOfOutputs:w0})}createConstantSource(){return new l0(this)}createConvolver(){return new c0(this)}createDelay(w0=1){return new d0(this,{maxDelayTime:w0})}createDynamicsCompressor(){return new h0(this)}createGain(){return new f0(this)}createIIRFilter(w0,v0){return new p0(this,{feedback:v0,feedforward:w0})}createOscillator(){return new m0(this)}createPanner(){return new x0(this)}createPeriodicWave(w0,v0,S0={disableNormalization:!1}){return new g0(this,{...S0,imag:v0,real:w0})}createStereoPanner(){return new y0(this)}createWaveShaper(){return new b0(this)}decodeAudioData(w0,v0,S0){return u0(this._nativeContext,w0).then(k0=>(typeof v0=="function"&&v0(k0),k0),k0=>{throw typeof S0=="function"&&S0(k0),k0})}},DEFAULT_OPTIONS$e={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},createBiquadFilterNodeConstructor=(r0,e0,n0,a0,i0,s0,o0,l0)=>class extends r0{constructor(u0,d0){const h0=s0(u0),f0={...DEFAULT_OPTIONS$e,...d0},p0=i0(h0,f0),A0=o0(h0),m0=A0?n0():null;super(u0,!1,p0,m0),this._Q=e0(this,A0,p0.Q,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._detune=e0(this,A0,p0.detune,1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT),-1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT)),this._frequency=e0(this,A0,p0.frequency,u0.sampleRate/2,0),this._gain=e0(this,A0,p0.gain,40*Math.log10(MOST_POSITIVE_SINGLE_FLOAT),MOST_NEGATIVE_SINGLE_FLOAT),this._nativeBiquadFilterNode=p0,l0(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(u0){this._nativeBiquadFilterNode.type=u0}getFrequencyResponse(u0,d0,h0){try{this._nativeBiquadFilterNode.getFrequencyResponse(u0,d0,h0)}catch(f0){throw f0.code===11?a0():f0}if(u0.length!==d0.length||d0.length!==h0.length)throw a0()}},createBiquadFilterNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap,o0=async(l0,c0)=>{let u0=n0(l0);const d0=isOwnedByContext(u0,c0);if(!d0){const h0={Q:u0.Q.value,channelCount:u0.channelCount,channelCountMode:u0.channelCountMode,channelInterpretation:u0.channelInterpretation,detune:u0.detune.value,frequency:u0.frequency.value,gain:u0.gain.value,type:u0.type};u0=e0(c0,h0)}return s0.set(c0,u0),d0?(await r0(c0,l0.Q,u0.Q),await r0(c0,l0.detune,u0.detune),await r0(c0,l0.frequency,u0.frequency),await r0(c0,l0.gain,u0.gain)):(await a0(c0,l0.Q,u0.Q),await a0(c0,l0.detune,u0.detune),await a0(c0,l0.frequency,u0.frequency),await a0(c0,l0.gain,u0.gain)),await i0(l0,c0,u0),u0};return{render(l0,c0){const u0=s0.get(c0);return u0!==void 0?Promise.resolve(u0):o0(l0,c0)}}},createCacheTestResult=(r0,e0)=>(n0,a0)=>{const i0=e0.get(n0);if(i0!==void 0)return i0;const s0=r0.get(n0);if(s0!==void 0)return s0;try{const o0=a0();return o0 instanceof Promise?(r0.set(n0,o0),o0.catch(()=>!1).then(l0=>(r0.delete(n0),e0.set(n0,l0),l0))):(e0.set(n0,o0),o0)}catch{return e0.set(n0,!1),!1}},DEFAULT_OPTIONS$d={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},createChannelMergerNodeConstructor=(r0,e0,n0,a0,i0)=>class extends r0{constructor(o0,l0){const c0=a0(o0),u0={...DEFAULT_OPTIONS$d,...l0}
637,d0=n0(c0,u0),h0=i0(c0)?e0():null;super(o0,!1,d0,h0)}},createChannelMergerNodeRendererFactory=(r0,e0,n0)=>()=>{const a0=new WeakMap,i0=async(s0,o0)=>{let l0=e0(s0);if(!isOwnedByContext(l0,o0)){const u0={channelCount:l0.channelCount,channelCountMode:l0.channelCountMode,channelInterpretation:l0.channelInterpretation,numberOfInputs:l0.numberOfInputs};l0=r0(o0,u0)}return a0.set(o0,l0),await n0(s0,o0,l0),l0};return{render(s0,o0){const l0=a0.get(o0);return l0!==void 0?Promise.resolve(l0):i0(s0,o0)}}},DEFAULT_OPTIONS$c={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},createChannelSplitterNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=a0(l0),d0=s0({...DEFAULT_OPTIONS$c,...c0}),h0=n0(u0,d0),f0=i0(u0)?e0():null;super(l0,!1,h0,f0)}},createChannelSplitterNodeRendererFactory=(r0,e0,n0)=>()=>{const a0=new WeakMap,i0=async(s0,o0)=>{let l0=e0(s0);if(!isOwnedByContext(l0,o0)){const u0={channelCount:l0.channelCount,channelCountMode:l0.channelCountMode,channelInterpretation:l0.channelInterpretation,numberOfOutputs:l0.numberOfOutputs};l0=r0(o0,u0)}return a0.set(o0,l0),await n0(s0,o0,l0),l0};return{render(s0,o0){const l0=a0.get(o0);return l0!==void 0?Promise.resolve(l0):i0(s0,o0)}}},createConnectAudioParam=r0=>(e0,n0,a0)=>r0(n0,e0,a0),createConnectedNativeAudioBufferSourceNodeFactory=r0=>(e0,n0)=>{const a0=r0(e0,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),i0=e0.createBuffer(1,2,44100);return a0.buffer=i0,a0.loop=!0,a0.connect(n0),a0.start(),()=>{a0.stop(),a0.disconnect(n0)}},DEFAULT_OPTIONS$b={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},createConstantSourceNodeConstructor=(r0,e0,n0,a0,i0,s0,o0)=>class extends r0{constructor(c0,u0){const d0=i0(c0),h0={...DEFAULT_OPTIONS$b,...u0},f0=a0(d0,h0),p0=s0(d0),A0=p0?n0():null;super(c0,!1,f0,A0),this._constantSourceNodeRenderer=A0,this._nativeConstantSourceNode=f0,this._offset=e0(this,p0,f0.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(c0){const u0=typeof c0=="function"?o0(this,c0):null;this._nativeConstantSourceNode.onended=u0;const d0=this._nativeConstantSourceNode.onended;this._onended=d0!==null&&d0===u0?c0:d0}start(c0=0){if(this._nativeConstantSourceNode.start(c0),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=c0),this.context.state!=="closed"){setInternalStateToActive(this);const u0=()=>{this._nativeConstantSourceNode.removeEventListener("ended",u0),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeConstantSourceNode.addEventListener("ended",u0)}}stop(c0=0){this._nativeConstantSourceNode.stop(c0),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c0)}},createConstantSourceNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap;let o0=null,l0=null;const c0=async(u0,d0)=>{let h0=n0(u0);const f0=isOwnedByContext(h0,d0);if(!f0){const p0={channelCount:h0.channelCount,channelCountMode:h0.channelCountMode,channelInterpretation:h0.channelInterpretation,offset:h0.offset.value};h0=e0(d0,p0),o0!==null&&h0.start(o0),l0!==null&&h0.stop(l0)}return s0.set(d0,h0),f0?await r0(d0,u0.offset,h0.offset):await a0(d0,u0.offset,h0.offset),await i0(u0,d0,h0),h0};return{set start(u0){o0=u0},set stop(u0){l0=u0},render(u0,d0){const h0=s0.get(d0);return h0!==void 0?Promise.resolve(h0):c0(u0,d0)}}},createConvertNumberToUnsignedLong=r0=>e0=>(r0[0]=e0,r0[0]),DEFAULT_OPTIONS$a={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},createConvolverNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=a0(l0),d0={...DEFAULT_OPTIONS$a,...c0},h0=n0(u0,d0),p0=i0(u0)?e0():null;super(l0,!1,h0,p0),this._isBufferNullified=!1,this._nativeConvolverNode=h0,d0.buffer!==null&&s0(this,d0.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(l0){if(this._nativeConvolverNode.buffer=l0,l0===null&&this._nativeConvolverNode.buffer!==null){const c0=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=c0.createBuffer(1,1,c0.sampleRate),this._isBufferNullified=!0,s0(this,0)}else this._isBufferNullified=!1,s0(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(l0){this._nativeConvolverNode.normalize=l0}},createConvolverNodeRendererFactory=(r0,e0,n0)=>()=>{const a0=new WeakMap,i0=async(s0,o0)=>{let l0=e0(s0);if(!isOwnedByContext(l0,o0)){const u0={buffer:l0.buffer,channelCount:l0.channelCount,channelCountMode:l0.channelCountMode,channelInterpretation:l0.channelInterpretation,disableNormalization:!l0.normalize};l0=r0(o0,u0)}return a0.set(o0,l0),isNativeAudioNodeFaker(l0)?await n0(s0,o0,l0.inputs[0]):await n0(s0,o0,l0),l0};return{render(s0,o0){const l0=a0.get(o0);return l0!==void 0?Promise.resolve(l0):i0(s0,o0)}}},createCreateNativeOfflineAudioContext=(r0,e0)=>(n0,a0,i0)=>{if(e0===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e0(n0,a0,i0)}catch(s0){throw s0.name==="SyntaxError"?r0():s0}},createDataCloneError=()=>new DOMException("","DataCloneError"),detachArrayBuffer=r0=>{const{port1:e0,port2:n0}=new MessageChannel;return new Promise(a0=>{const i0=()=>{n0.onmessage=null,e0.close(),n0.close(),a0()};n0.onmessage=()=>i0();try{e0.postMessage(r0,[r0])}catch{}finally{i0()}})},createDecodeAudioData=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0)=>(h0,f0)=>{const p0=o0(h0)?h0:s0(h0);if(i0.has(f0)){const A0=n0();return Promise.reject(A0)}try{i0.add(f0)}catch{}return e0(c0,()=>c0(p0))?p0.decodeAudioData(f0).then(A0=>(detachArrayBuffer(f0).catch(()=>{}),e0(l0,()=>l0(A0))||d0(A0),r0.add(A0),A0)):new Promise((A0,m0)=>{const x0=async()=>{try{await detachArrayBuffer(f0)}catch{}},g0=y0=>{m0(y0),x0()};try{p0.decodeAudioData(f0,y0=>{typeof y0.copyFromChannel!="function"&&(u0(y0),wrapAudioBufferGetChannelDataMethod(y0)),r0.add(y0),x0().then(()=>A0(y0))},y0=>{g0(y0===null?a0():y0)})}catch(y0){g0(y0)}})},createDecrementCycleCounter=(r0,e0,n0,a0,i0,s0,o0,l0)=>(c0,u0)=>{const d0=e0.get(c0);if(d0===void 0)throw new Error("Missing the expected cycle count.");const h0=s0(c0.context),f0=l0(h0);if(d0===u0){if(e0.delete(c0),!f0&&o0(c0)){const p0=a0(c0),{outputs:A0}=n0(c0);for(const m0 of A0)if(isAudioNodeOutputConnection(m0)){const x0=a0(m0[0]);r0(p0,x0,m0[1],m0[2])}else{const x0=i0(m0[0]);p0.connect(x0,m0[1])}}}else e0.set(c0,d0-u0)},DEFAULT_OPTIONS$9={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},createDelayNodeConstructor=(r0,e0,n0,a0,i0,s0,o0)=>class extends r0{constructor(c0,u0){const d0=i0(c0),h0={...DEFAULT_OPTIONS$9,...u0},f0=a0(d0,h0),p0=s0(d0),A0=p0?n0(h0.maxDelayTime):null;super(c0,!1,f0,A0),this._delayTime=e0(this,p0,f0.delayTime),o0(this,h0.maxDelayTime)}get delayTime(){return this._delayTime}},createDelayNodeRendererFactory=(r0,e0,n0,a0,i0)=>s0=>{const o0=new WeakMap,l0=async(c0,u0)=>{let d0=n0(c0);
637const h0=isOwnedByContext(d0,u0);if(!h0){const f0={channelCount:d0.channelCount,channelCountMode:d0.channelCountMode,channelInterpretation:d0.channelInterpretation,delayTime:d0.delayTime.value,maxDelayTime:s0};d0=e0(u0,f0)}return o0.set(u0,d0),h0?await r0(u0,c0.delayTime,d0.delayTime):await a0(u0,c0.delayTime,d0.delayTime),await i0(c0,u0,d0),d0};return{render(c0,u0){const d0=o0.get(u0);return d0!==void 0?Promise.resolve(d0):l0(c0,u0)}}},createDeleteActiveInputConnectionToAudioNode=r0=>(e0,n0,a0,i0)=>r0(e0[i0],s0=>s0[0]===n0&&s0[1]===a0),isDelayNode=r0=>"delayTime"in r0,createDetectCycles=(r0,e0,n0)=>function a0(i0,s0){const o0=isAudioNode(s0)?s0:n0(r0,s0);if(isDelayNode(o0))return[];if(i0[0]===o0)return[i0];if(i0.includes(o0))return[];const{outputs:l0}=e0(o0);return Array.from(l0).map(c0=>a0([...i0,o0],c0[0])).reduce((c0,u0)=>c0.concat(u0),[])},DEFAULT_OPTIONS$8={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},createDynamicsCompressorNodeConstructor=(r0,e0,n0,a0,i0,s0,o0,l0)=>class extends r0{constructor(u0,d0){const h0=s0(u0),f0={...DEFAULT_OPTIONS$8,...d0},p0=a0(h0,f0),A0=o0(h0),m0=A0?n0():null;super(u0,!1,p0,m0),this._attack=e0(this,A0,p0.attack),this._knee=e0(this,A0,p0.knee),this._nativeDynamicsCompressorNode=p0,this._ratio=e0(this,A0,p0.ratio),this._release=e0(this,A0,p0.release),this._threshold=e0(this,A0,p0.threshold),l0(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(u0){const d0=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=u0,u0>2)throw this._nativeDynamicsCompressorNode.channelCount=d0,i0()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(u0){const d0=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=u0,u0==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=d0,i0()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},createDynamicsCompressorNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap,o0=async(l0,c0)=>{let u0=n0(l0);const d0=isOwnedByContext(u0,c0);if(!d0){const h0={attack:u0.attack.value,channelCount:u0.channelCount,channelCountMode:u0.channelCountMode,channelInterpretation:u0.channelInterpretation,knee:u0.knee.value,ratio:u0.ratio.value,release:u0.release.value,threshold:u0.threshold.value};u0=e0(c0,h0)}return s0.set(c0,u0),d0?(await r0(c0,l0.attack,u0.attack),await r0(c0,l0.knee,u0.knee),await r0(c0,l0.ratio,u0.ratio),await r0(c0,l0.release,u0.release),await r0(c0,l0.threshold,u0.threshold)):(await a0(c0,l0.attack,u0.attack),await a0(c0,l0.knee,u0.knee),await a0(c0,l0.ratio,u0.ratio),await a0(c0,l0.release,u0.release),await a0(c0,l0.threshold,u0.threshold)),await i0(l0,c0,u0),u0};return{render(l0,c0){const u0=s0.get(c0);return u0!==void 0?Promise.resolve(u0):o0(l0,c0)}}},createEncodingError=()=>new DOMException("","EncodingError"),createEvaluateSource=r0=>e0=>new Promise((n0,a0)=>{if(r0===null){a0(new SyntaxError);return}const i0=r0.document.head;if(i0===null)a0(new SyntaxError);else{const s0=r0.document.createElement("script"),o0=new Blob([e0],{type:"application/javascript"}),l0=URL.createObjectURL(o0),c0=r0.onerror,u0=()=>{r0.onerror=c0,URL.revokeObjectURL(l0)};r0.onerror=(d0,h0,f0,p0,A0)=>{if(h0===l0||h0===r0.location.href&&f0===1&&p0===1)return u0(),a0(A0),!1;if(c0!==null)return c0(d0,h0,f0,p0,A0)},s0.onerror=()=>{u0(),a0(new SyntaxError)},s0.onload=()=>{u0(),n0()},s0.src=l0,s0.type="module",i0.appendChild(s0)}}),createEventTargetConstructor=r0=>class{constructor(n0){this._nativeEventTarget=n0,this._listeners=new WeakMap}addEventListener(n0,a0,i0){if(a0!==null){let s0=this._listeners.get(a0);s0===void 0&&(s0=r0(this,a0),typeof a0=="function"&&this._listeners.set(a0,s0)),this._nativeEventTarget.addEventListener(n0,s0,i0)}}dispatchEvent(n0){return this._nativeEventTarget.dispatchEvent(n0)}removeEventListener(n0,a0,i0){const s0=a0===null?void 0:this._listeners.get(a0);this._nativeEventTarget.removeEventListener(n0,s0===void 0?null:s0,i0)}},createExposeCurrentFrameAndCurrentTime=r0=>(e0,n0,a0)=>{Object.defineProperties(r0,{currentFrame:{configurable:!0,get(){return Math.round(e0*n0)}},currentTime:{configurable:!0,get(){return e0}}});try{return a0()}finally{r0!==null&&(delete r0.currentFrame,delete r0.currentTime)}},createFetchSource=r0=>
637async e0=>{try{const n0=await fetch(e0);if(n0.ok)return[await n0.text(),n0.url]}catch{}throw r0()},DEFAULT_OPTIONS$7={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},createGainNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=i0(l0),d0={...DEFAULT_OPTIONS$7,...c0},h0=a0(u0,d0),f0=s0(u0),p0=f0?n0():null;super(l0,!1,h0,p0),this._gain=e0(this,f0,h0.gain,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get gain(){return this._gain}},createGainNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap,o0=async(l0,c0)=>{let u0=n0(l0);const d0=isOwnedByContext(u0,c0);if(!d0){const h0={channelCount:u0.channelCount,channelCountMode:u0.channelCountMode,channelInterpretation:u0.channelInterpretation,gain:u0.gain.value};u0=e0(c0,h0)}return s0.set(c0,u0),d0?await r0(c0,l0.gain,u0.gain):await a0(c0,l0.gain,u0.gain),await i0(l0,c0,u0),u0};return{render(l0,c0){const u0=s0.get(c0);return u0!==void 0?Promise.resolve(u0):o0(l0,c0)}}},createGetAudioNodeRenderer=r0=>e0=>{const n0=r0(e0);if(n0.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return n0.renderer},createGetAudioNodeTailTime=r0=>e0=>{var n0;return(n0=r0.get(e0))!==null&&n0!==void 0?n0:0},createGetAudioParamRenderer=r0=>e0=>{const n0=r0(e0);if(n0.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n0.renderer},createInvalidStateError=()=>new DOMException("","InvalidStateError"),createGetNativeContext=r0=>e0=>{const n0=r0.get(e0);if(n0===void 0)throw createInvalidStateError();return n0},createGetOrCreateBackupOfflineAudioContext=(r0,e0)=>n0=>{let a0=r0.get(n0);if(a0!==void 0)return a0;if(e0===null)throw new Error("Missing the native OfflineAudioContext constructor.");return a0=new e0(1,1,44100),r0.set(n0,a0),a0},createGetUnrenderedAudioWorkletNodes=r0=>e0=>{const n0=r0.get(e0);if(n0===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return n0},createInvalidAccessError=()=>new DOMException("","InvalidAccessError"),wrapIIRFilterNodeGetFrequencyResponseMethod=r0=>{r0.getFrequencyResponse=(e0=>(n0,a0,i0)=>{if(n0.length!==a0.length||a0.length!==i0.length)throw createInvalidAccessError();return e0.call(r0,n0,a0,i0)})(r0.getFrequencyResponse)},DEFAULT_OPTIONS$6={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},createIIRFilterNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=a0(l0),d0=i0(u0),h0={...DEFAULT_OPTIONS$6,...c0},f0=e0(u0,d0?null:l0.baseLatency,h0),p0=d0?n0(h0.feedback,h0.feedforward):null;super(l0,!1,f0,p0),wrapIIRFilterNodeGetFrequencyResponseMethod(f0),this._nativeIIRFilterNode=f0,s0(this,1)}getFrequencyResponse(l0,c0,u0){return this._nativeIIRFilterNode.getFrequencyResponse(l0,c0,u0)}},filterBuffer=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0)=>{const h0=u0.length;let f0=l0;for(let p0=0;p0<h0;p0+=1){let A0=n0[0]*u0[p0];for(let m0=1;m0<i0;m0+=1){const x0=f0-m0&c0-1;A0+=n0[m0]*s0[x0],A0-=r0[m0]*o0[x0]}for(let m0=i0;m0<a0;m0+=1)A0+=n0[m0]*s0[f0-m0&c0-1];for(let m0=i0;m0<e0;m0+=1)A0-=r0[m0]*o0[f0-m0&c0-1];s0[f0]=u0[p0],o0[f0]=A0,f0=f0+1&c0-1,d0[p0]=A0}return f0},filterFullBuffer=(r0,e0,n0,a0)=>{const i0=n0 instanceof Float64Array?n0:new Float64Array(n0),s0=a0 instanceof Float64Array?a0:new Float64Array(a0),o0=i0.length,l0=s0.length,c0=Math.min(o0,l0);if(i0[0]!==1){for(let A0=0;A0<o0;A0+=1)s0[A0]/=i0[0];for(let A0=1;A0<l0;A0+=1)i0[A0]/=i0[0]}const u0=32,d0=new Float32Array(u0),h0=new Float32Array(u0),f0=e0.createBuffer(r0.numberOfChannels,r0.length,r0.sampleRate),p0=r0.numberOfChannels;for(let A0=0;A0<p0;A0+=1){const m0=r0.getChannelData(A0),x0=f0.getChannelData(A0);d0.fill(0),h0.fill(0),filterBuffer(i0,o0,s0,l0,c0,d0,h0,0,u0,m0,x0)}return f0},createIIRFilterNodeRendererFactory=(r0,e0,n0,a0,i0)=>(s0,o0)=>{const l0=new WeakMap;let c0=null;const u0=async(d0,h0)=>{let f0=null,p0=e0(d0);const A0=isOwnedByContext(p0,h0);if(h0.createIIRFilter===void 0?f0=r0(h0,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):A0||(p0=h0.createIIRFilter(o0,s0)),l0.set(h0,f0===null?p0:f0),f0!==null){if(c0===null){if(n0===null)throw new Error("Missing the native OfflineAudioContext constructor.");const x0=new n0(d0.context.destination.channelCount,d0.context.length,h0.sampleRate);c0=(async()=>{await a0(d0,x0,x0.destination);const g0=await i0(x0);return filterFullBuffer(g0,h0,s0,o0)})()}const m0=await c0;return f0.buffer=m0,f0.start(0),f0}return await a0(d0,h0,p0),p0};return{render(d0,h0){const f0=l0.get(h0);return f0!==void 0?Promise.resolve(f0):u0(d0,h0)}}},createIncrementCycleCounterFactory=(r0,e0,n0,a0,i0,s0)=>
vendor: 10,783 bytes, line 637
637o0=>(l0,c0)=>{const u0=r0.get(l0);if(u0===void 0){if(!o0&&s0(l0)){const d0=a0(l0),{outputs:h0}=n0(l0);for(const f0 of h0)if(isAudioNodeOutputConnection(f0)){const p0=a0(f0[0]);e0(d0,p0,f0[1],f0[2])}else{const p0=i0(f0[0]);d0.disconnect(p0,f0[1])}}r0.set(l0,c0)}else r0.set(l0,u0+c0)},createIsNativeAudioContext=r0=>e0=>r0!==null&&e0 instanceof r0,createIsNativeAudioNode=r0=>e0=>r0!==null&&typeof r0.AudioNode=="function"&&e0 instanceof r0.AudioNode,createIsNativeAudioParam=r0=>e0=>r0!==null&&typeof r0.AudioParam=="function"&&e0 instanceof r0.AudioParam,createIsNativeContext=(r0,e0)=>n0=>r0(n0)||e0(n0),createIsNativeOfflineAudioContext=r0=>e0=>r0!==null&&e0 instanceof r0,createIsSecureContext=r0=>r0!==null&&r0.isSecureContext,createMinimalBaseAudioContextConstructor=(r0,e0,n0,a0,i0,s0)=>class extends n0{constructor(l0,c0){super(l0),this._nativeContext=l0,CONTEXT_STORE.set(this,l0),a0(l0)&&i0.set(l0,new Set),this._destination=new r0(this,c0),this._listener=e0(this,l0),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(l0){const c0=typeof l0=="function"?s0(this,l0):null;this._nativeContext.onstatechange=c0;const u0=this._nativeContext.onstatechange;this._onstatechange=u0!==null&&u0===c0?l0:u0}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},testPromiseSupport=r0=>{const e0=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n0=r0.decodeAudioData(e0.buffer,()=>{});return n0===void 0?!1:(n0.catch(()=>{}),!0)}catch{}return!1},createMonitorConnections=(r0,e0)=>(n0,a0,i0)=>{const s0=new Set;return n0.connect=(o0=>(l0,c0=0,u0=0)=>{const d0=s0.size===0;if(e0(l0))return o0.call(n0,l0,c0,u0),r0(s0,[l0,c0,u0],h0=>h0[0]===l0&&h0[1]===c0&&h0[2]===u0,!0),d0&&a0(),l0;o0.call(n0,l0,c0),r0(s0,[l0,c0],h0=>h0[0]===l0&&h0[1]===c0,!0),d0&&a0()})(n0.connect),n0.disconnect=(o0=>(l0,c0,u0)=>{const d0=s0.size>0;if(l0===void 0)o0.apply(n0),s0.clear();else if(typeof l0=="number"){o0.call(n0,l0);for(const f0 of s0)f0[1]===l0&&s0.delete(f0)}else{e0(l0)?o0.call(n0,l0,c0,u0):o0.call(n0,l0,c0);for(const f0 of s0)f0[0]===l0&&(c0===void 0||f0[1]===c0)&&(u0===void 0||f0[2]===u0)&&s0.delete(f0)}const h0=s0.size===0;d0&&h0&&i0()})(n0.disconnect),n0},assignNativeAudioNodeOption=(r0,e0,n0)=>{const a0=e0[n0];a0!==void 0&&a0!==r0[n0]&&(r0[n0]=a0)},assignNativeAudioNodeOptions=(r0,e0)=>{assignNativeAudioNodeOption(r0,e0,"channelCount"),assignNativeAudioNodeOption(r0,e0,"channelCountMode"),assignNativeAudioNodeOption(r0,e0,"channelInterpretation")},testAnalyserNodeGetFloatTimeDomainDataMethodSupport=r0=>typeof r0.getFloatTimeDomainData=="function",wrapAnalyserNodeGetFloatTimeDomainDataMethod=r0=>{r0.getFloatTimeDomainData=e0=>{const n0=new Uint8Array(e0.length);r0.getByteTimeDomainData(n0);const a0=Math.max(n0.length,r0.fftSize);for(let i0=0;i0<a0;i0+=1)e0[i0]=(n0[i0]-128)*.0078125;return e0}},createNativeAnalyserNodeFactory=(r0,e0)=>(n0,a0)=>{const i0=n0.createAnalyser();if(assignNativeAudioNodeOptions(i0,a0),!(a0.maxDecibels>a0.minDecibels))throw e0();return assignNativeAudioNodeOption(i0,a0,"fftSize"),assignNativeAudioNodeOption(i0,a0,"maxDecibels"),assignNativeAudioNodeOption(i0,a0,"minDecibels"),assignNativeAudioNodeOption(i0,a0,"smoothingTimeConstant"),r0(testAnalyserNodeGetFloatTimeDomainDataMethodSupport,()=>testAnalyserNodeGetFloatTimeDomainDataMethodSupport(i0))||wrapAnalyserNodeGetFloatTimeDomainDataMethod(i0),i0},createNativeAudioBufferConstructor=r0=>r0===null?null:r0.hasOwnProperty("AudioBuffer")?r0.AudioBuffer:null,assignNativeAudioNodeAudioParamValue=(r0,e0,n0)=>{const a0=e0[n0];a0!==void 0&&a0!==r0[n0].value&&(r0[n0].value=a0)},wrapAudioBufferSourceNodeStartMethodConsecutiveCalls=r0=>{r0.start=(e0=>{let n0=!1;return(a0=0,i0=0,s0)=>{if(n0)throw createInvalidStateError();e0.call(r0,a0,i0,s0),n0=!0}})(r0.start)},wrapAudioScheduledSourceNodeStartMethodNegativeParameters=r0=>{r0.start=(e0=>(n0=0,a0=0,i0)=>{if(typeof i0=="number"&&i0<0||a0<0||n0<0)throw new RangeError("The parameters can't be negative.");e0.call(r0,n0,a0,i0)})(r0.start)},wrapAudioScheduledSourceNodeStopMethodNegativeParameters=r0=>{r0.stop=(e0=>(n0=0)=>{if(n0<0)throw new RangeError("The parameter can't be negative.");e0.call(r0,n0)})(r0.stop)},createNativeAudioBufferSourceNodeFactory=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0)=>(h0,f0)=>{const p0=h0.createBufferSource();return assignNativeAudioNodeOptions(p0,f0),assignNativeAudioNodeAudioParamValue(p0,f0,"playbackRate"),assignNativeAudioNodeOption(p0,f0,"buffer"),assignNativeAudioNodeOption(p0,f0,"loop"),assignNativeAudioNodeOption(p0,f0,"loopEnd"),assignNativeAudioNodeOption(p0,f0,"loopStart"),e0(n0,()=>n0(h0))||wrapAudioBufferSourceNodeStartMethodConsecutiveCalls(p0),e0(a0,()=>a0(h0))||c0(p0),e0(i0,()=>i0(h0))||u0(p0,h0),e0(s0,()=>s0(h0))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(p0),e0(o0,()=>o0(h0))||d0(p0,h0),e0(l0,()=>l0(h0))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(p0),r0(h0,p0),p0},createNativeAudioContextConstructor=r0=>r0===null?null:r0.hasOwnProperty("AudioContext")?r0.AudioContext:r0.hasOwnProperty("webkitAudioContext")?r0.webkitAudioContext:null,createNativeAudioDestinationNodeFactory=(r0,e0)=>(n0,a0,i0)=>{const s0=n0.destination;if(s0.channelCount!==a0)try{s0.channelCount=a0}catch{}i0&&s0.channelCountMode!=="explicit"&&(s0.channelCountMode="explicit"),s0.maxChannelCount===0&&Object.defineProperty(s0,"maxChannelCount",{value:a0});const o0=r0(n0,{channelCount:a0,channelCountMode:s0.channelCountMode,channelInterpretation:s0.channelInterpretation,gain:1});return e0(o0,"channelCount",l0=>()=>l0.call(o0),l0=>c0=>{l0.call(o0,c0);try{s0.channelCount=c0}catch(u0){if(c0>s0.maxChannelCount)throw u0}}),e0(o0,"channelCountMode",l0=>()=>l0.call(o0),l0=>c0=>{l0.call(o0,c0),s0.channelCountMode=c0}),e0(o0,"channelInterpretation",l0=>()=>l0.call(o0),l0=>c0=>{l0.call(o0,c0),s0.channelInterpretation=c0}),Object.defineProperty(o0,"maxChannelCount",{get:()=>s0.maxChannelCount}),o0.connect(s0),o0},createNativeAudioWorkletNodeConstructor=r0=>r0===null?null:r0.hasOwnProperty("AudioWorkletNode")?r0.AudioWorkletNode:null,computeBufferSize=(r0,e0)=>r0===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(r0*e0))))),createNativeBiquadFilterNode=(r0,e0)=>{const n0=r0.createBiquadFilter();return assignNativeAudioNodeOptions(n0,e0),assignNativeAudioNodeAudioParamValue(n0,e0,"Q"),assignNativeAudioNodeAudioParamValue(n0,e0,"detune"),assignNativeAudioNodeAudioParamValue(n0,e0,"frequency"),assignNativeAudioNodeAudioParamValue(n0,e0,"gain"),assignNativeAudioNodeOption(n0,e0,"type"),n0},createNativeChannelMergerNodeFactory=(r0,e0)=>(n0,a0)=>{const i0=n0.createChannelMerger(a0.numberOfInputs);return r0!==null&&r0.name==="webkitAudioContext"&&e0(n0,i0),assignNativeAudioNodeOptions(i0,a0),i0},wrapChannelSplitterNode=r0=>{const e0=r0.numberOfOutputs;Object.defineProperty(r0,"channelCount",{get:()=>e0,set:n0=>{if(n0!==e0)throw createInvalidStateError()}}),Object.defineProperty(r0,"channelCountMode",{get:()=>"explicit",set:n0=>{if(n0!=="explicit")throw createInvalidStateError()}}),Object.defineProperty(r0,"channelInterpretation",{get:()=>"discrete",set:n0=>{if(n0!=="discrete")throw createInvalidStateError()}})},createNativeChannelSplitterNode=(r0,e0)=>{const n0=r0.createChannelSplitter(e0.numberOfOutputs);return assignNativeAudioNodeOptions(n0,e0),wrapChannelSplitterNode(n0),n0},createNativeConstantSourceNodeFactory=(r0,e0,n0,a0,i0)=>(s0,o0)=>{if(s0.createConstantSource===void 0)return n0(s0,o0);const l0=s0.createConstantSource();return assignNativeAudioNodeOptions(l0,o0),assignNativeAudioNodeAudioParamValue(l0,o0,"offset"),e0(a0,()=>a0(s0))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(l0),e0(i0,()=>i0(s0))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(l0),r0(s0,l0),l0},interceptConnections=(r0,e0)=>(r0.connect=e0.connect.bind(e0),r0.disconnect=e0.disconnect.bind(e0),r0),createNativeConstantSourceNodeFakerFactory=(r0,e0,n0,a0)=>(i0,{offset:s0,...o0})=>{const l0=i0.createBuffer(1,2,44100),c0=e0(i0,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),u0=n0(i0,{...o0,gain:s0}),d0=l0.getChannelData(0);d0[0]=1,d0[1]=1,c0.buffer=l0,c0.loop=!0;const h0={get bufferSize(){},get channelCount(){return u0.channelCount},set channelCount(A0){u0.channelCount=A0},get channelCountMode(){return u0.channelCountMode},set channelCountMode(A0){u0.channelCountMode=A0},get channelInterpretation(){return u0.channelInterpretation},set channelInterpretation(A0){u0.channelInterpretation=A0},get context(){return u0.context},get inputs(){return[]},get numberOfInputs(){return c0.numberOfInputs},get numberOfOutputs(){return u0.numberOfOutputs},get offset(){return u0.gain},get onended(){return c0.onended},set onended(A0){c0.onended=A0},addEventListener(...A0){return c0.addEventListener(A0[0],A0[1],A0[2])},dispatchEvent(...A0){return c0.dispatchEvent(A0[0])},removeEventListener(...A0){return c0.removeEventListener(A0[0],A0[1],A0[2])},start(A0=0){c0.start.call(c0,A0)},stop(A0=0){c0.stop.call(c0,A0)}},f0=()=>c0.connect(u0),p0=()=>c0.disconnect(u0);return r0(i0,c0),a0(interceptConnections(h0,u0),f0,p0)},createNativeConvolverNodeFactory=(r0,e0)=>(n0,a0)=>{const i0=n0.createConvolver();if(assignNativeAudioNodeOptions(i0,a0),a0.disableNormalization===i0.normalize&&(i0.normalize=!a0.disableNormalization),assignNativeAudioNodeOption(i0,a0,"buffer"),a0.channelCount>2||(e0(i0,"channelCount",s0=>()=>s0.call(i0),s0=>o0=>{if(o0>2)throw r0();return s0.call(i0,o0)}),a0.channelCountMode==="max"))throw r0();return e0(i0,"channelCountMode",s0=>()=>s0.call(i0),s0=>o0=>{if(o0==="max")throw r0();return s0.call(i0,o0)}),i0},createNativeDelayNode=(r0,e0)=>{const n0=r0.createDelay(e0.maxDelayTime);return assignNativeAudioNodeOptions(n0,e0),assignNativeAudioNodeAudioParamValue(n0,e0,"delayTime"),n0},createNativeDynamicsCompressorNodeFactory=r0=>(e0,n0)=>{const a0=e0.createDynamicsCompressor();if(assignNativeAudioNodeOptions(a0,n0),n0.channelCount>2||n0.channelCountMode==="max")throw r0();return assignNativeAudioNodeAudioParamValue(a0,n0,"attack"),assignNativeAudioNodeAudioParamValue(a0,n0,"knee"),assignNativeAudioNodeAudioParamValue(a0,n0,"ratio"),assignNativeAudioNodeAudioParamValue(a0,n0,"release"),assignNativeAudioNodeAudioParamValue(a0,n0,"threshold"),a0},createNativeGainNode=(r0,e0)=>{const n0=r0.createGain();return assignNativeAudioNodeOptions(n0,e0),assignNativeAudioNodeAudioParamValue(n0,e0,"gain"),n0},createNativeIIRFilterNodeFactory=r0=>(e0,n0,a0)=>
637{if(e0.createIIRFilter===void 0)return r0(e0,n0,a0);const i0=e0.createIIRFilter(a0.feedforward,a0.feedback);return assignNativeAudioNodeOptions(i0,a0),i0};function divide$1(r0,e0){const n0=e0[0]*e0[0]+e0[1]*e0[1];return[(r0[0]*e0[0]+r0[1]*e0[1])/n0,(r0[1]*e0[0]-r0[0]*e0[1])/n0]}function multiply(r0,e0){return[r0[0]*e0[0]-r0[1]*e0[1],r0[0]*e0[1]+r0[1]*e0[0]]}function evaluatePolynomial(r0,e0){let n0=[0,0];for(let a0=r0.length-1;a0>=0;a0-=1)n0=multiply(n0,e0),n0[0]+=r0[a0];return n0}const createNativeIIRFilterNodeFakerFactory=(r0,e0,n0,a0)=>(i0,s0,{channelCount:o0,channelCountMode:l0,channelInterpretation:c0,feedback:u0,feedforward:d0})=>{const h0=computeBufferSize(s0,i0.sampleRate),f0=u0 instanceof Float64Array?u0:new Float64Array(u0),p0=d0 instanceof Float64Array?d0:new Float64Array(d0),A0=f0.length,m0=p0.length,x0=Math.min(A0,m0);if(A0===0||A0>20)throw a0();if(f0[0]===0)throw e0();if(m0===0||m0>20)throw a0();if(p0[0]===0)throw e0();if(f0[0]!==1){for(let k0=0;k0<m0;k0+=1)p0[k0]/=f0[0];for(let k0=1;k0<A0;k0+=1)f0[k0]/=f0[0]}const g0=n0(i0,h0,o0,o0);g0.channelCount=o0,g0.channelCountMode=l0,g0.channelInterpretation=c0;const y0=32,b0=[],E0=[],w0=[];for(let k0=0;k0<o0;k0+=1){b0.push(0);const R0=new Float32Array(y0),j0=new Float32Array(y0);R0.fill(0),j0.fill(0),E0.push(R0),w0.push(j0)}g0.onaudioprocess=k0=>{const R0=k0.inputBuffer,j0=k0.outputBuffer,C0=R0.numberOfChannels;for(let $0=0;$0<C0;$0+=1){const T0=R0.getChannelData($0),I0=j0.getChannelData($0);b0[$0]=filterBuffer(f0,A0,p0,m0,x0,E0[$0],w0[$0],b0[$0],y0,T0,I0)}};const v0=i0.sampleRate/2;return interceptConnections({get bufferSize(){return h0},get channelCount(){return g0.channelCount},set channelCount(k0){g0.channelCount=k0},get channelCountMode(){return g0.channelCountMode},set channelCountMode(k0){g0.channelCountMode=k0},get channelInterpretation(){return g0.channelInterpretation},set channelInterpretation(k0){g0.channelInterpretation=k0},get context(){return g0.context},get inputs(){return[g0]},get numberOfInputs(){return g0.numberOfInputs},get numberOfOutputs(){return g0.numberOfOutputs},addEventListener(...k0){return g0.addEventListener(k0[0],k0[1],k0[2])},dispatchEvent(...k0){return g0.dispatchEvent(k0[0])},getFrequencyResponse(k0,R0,j0){if(k0.length!==R0.length||R0.length!==j0.length)throw r0();const C0=k0.length;for(let $0=0;$0<C0;$0+=1){const T0=-Math.PI*(k0[$0]/v0),I0=[Math.cos(T0),Math.sin(T0)],M0=evaluatePolynomial(p0,I0),N0=evaluatePolynomial(f0,I0),D0=divide$1(M0,N0);R0[$0]=Math.sqrt(D0[0]*D0[0]+D0[1]*D0[1]),j0[$0]=Math.atan2(D0[1],D0[0])}},removeEventListener(...k0){return g0.removeEventListener(k0[0],k0[1],k0[2])}},g0)},createNativeOfflineAudioContextConstructor=r0=>r0===null?null:r0.hasOwnProperty("OfflineAudioContext")?r0.OfflineAudioContext:r0.hasOwnProperty("webkitOfflineAudioContext")?r0.webkitOfflineAudioContext:null,createNativeOscillatorNodeFactory=(r0,e0,n0,a0,i0,s0)=>(o0,l0)=>{const c0=o0.createOscillator();return assignNativeAudioNodeOptions(c0,l0),assignNativeAudioNodeAudioParamValue(c0,l0,"detune"),assignNativeAudioNodeAudioParamValue(c0,l0,"frequency"),l0.periodicWave!==void 0?c0.setPeriodicWave(l0.periodicWave):assignNativeAudioNodeOption(c0,l0,"type"),e0(n0,()=>n0(o0))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(c0),e0(a0,()=>a0(o0))||s0(c0,o0),e0(i0,()=>i0(o0))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(c0),r0(o0,c0),c0},createNativePannerNodeFactory=r0=>(e0,n0)=>{const a0=e0.createPanner();return a0.orientationX===void 0?r0(e0,n0):(assignNativeAudioNodeOptions(a0,n0),assignNativeAudioNodeAudioParamValue(a0,n0,"orientationX"),assignNativeAudioNodeAudioParamValue(a0,n0,"orientationY"),assignNativeAudioNodeAudioParamValue(a0,n0,"orientationZ"),assignNativeAudioNodeAudioParamValue(a0,n0,"positionX"),assignNativeAudioNodeAudioParamValue(a0,n0,"positionY"),assignNativeAudioNodeAudioParamValue(a0,n0,"positionZ"),assignNativeAudioNodeOption(a0,n0,"coneInnerAngle"),assignNativeAudioNodeOption(a0,n0,"coneOuterAngle"),assignNativeAudioNodeOption(a0,n0,"coneOuterGain"),assignNativeAudioNodeOption(a0,n0,"distanceModel"),assignNativeAudioNodeOption(a0,n0,"maxDistance"),assignNativeAudioNodeOption(a0,n0,"panningModel"),assignNativeAudioNodeOption(a0,n0,"refDistance"),assignNativeAudioNodeOption(a0,n0,"rolloffFactor"),a0)},createNativePannerNodeFakerFactory=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0)=>(d0,{coneInnerAngle:h0,coneOuterAngle:f0,coneOuterGain:p0,distanceModel:A0,maxDistance:m0,orientationX:x0,orientationY:g0,orientationZ:y0,panningModel:b0,positionX:E0,positionY:w0,positionZ:v0,refDistance:S0,rolloffFactor:k0,...R0})=>{const j0=d0.createPanner();if(R0.channelCount>2||R0.channelCountMode==="max")throw o0();assignNativeAudioNodeOptions(j0,R0);const C0={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},$0=n0(d0,{...C0,channelInterpretation:"speakers",numberOfInputs:6}),T0=a0(d0,{...R0,gain:1}),I0=a0(d0,{...C0,gain:1}),M0=a0(d0,{...C0,gain:0}),N0=a0(d0,{...C0,gain:0}),D0=a0(d0,{...C0,gain:0}),O0=a0(d0,{...C0,gain:0}),B0=a0(d0,{...C0,gain:0}),z0=i0(d0,256,6,1),G0=s0(d0,{...C0,curve:new Float32Array([1,1]),oversample:"none"});let F0=[x0,g0,y0],Q0=[E0,w0,v0];const U0=new Float32Array(1);z0.onaudioprocess=({inputBuffer:J0})=>{const Cw=[c0(J0,U0,0),c0(J0,U0,1),c0(J0,U0,2)];Cw.some((jw,Nw)=>jw!==F0[Nw])&&(j0.setOrientation(...Cw),F0=Cw);const Ow=[c0(J0,U0,3),c0(J0,U0,4),c0(J0,U0,5)];Ow.some((jw,Nw)=>jw!==Q0[Nw])&&(j0.setPosition(...Ow),Q0=Ow)}
637,Object.defineProperty(M0.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N0.gain,"defaultValue",{get:()=>0}),Object.defineProperty(D0.gain,"defaultValue",{get:()=>0}),Object.defineProperty(O0.gain,"defaultValue",{get:()=>0}),Object.defineProperty(B0.gain,"defaultValue",{get:()=>0});const q0={get bufferSize(){},get channelCount(){return j0.channelCount},set channelCount(J0){if(J0>2)throw o0();T0.channelCount=J0,j0.channelCount=J0},get channelCountMode(){return j0.channelCountMode},set channelCountMode(J0){if(J0==="max")throw o0();T0.channelCountMode=J0,j0.channelCountMode=J0},get channelInterpretation(){return j0.channelInterpretation},set channelInterpretation(J0){T0.channelInterpretation=J0,j0.channelInterpretation=J0},get coneInnerAngle(){return j0.coneInnerAngle},set coneInnerAngle(J0){j0.coneInnerAngle=J0},get coneOuterAngle(){return j0.coneOuterAngle},set coneOuterAngle(J0){j0.coneOuterAngle=J0},get coneOuterGain(){return j0.coneOuterGain},set coneOuterGain(J0){if(J0<0||J0>1)throw e0();j0.coneOuterGain=J0},get context(){return j0.context},get distanceModel(){return j0.distanceModel},set distanceModel(J0){j0.distanceModel=J0},get inputs(){return[T0]},get maxDistance(){return j0.maxDistance},set maxDistance(J0){if(J0<0)throw new RangeError;j0.maxDistance=J0},get numberOfInputs(){return j0.numberOfInputs},get numberOfOutputs(){return j0.numberOfOutputs},get orientationX(){return I0.gain},get orientationY(){return M0.gain},get orientationZ(){return N0.gain},get panningModel(){return j0.panningModel},set panningModel(J0){j0.panningModel=J0},get positionX(){return D0.gain},get positionY(){return O0.gain},get positionZ(){return B0.gain},get refDistance(){return j0.refDistance},set refDistance(J0){if(J0<0)throw new RangeError;j0.refDistance=J0},get rolloffFactor(){return j0.rolloffFactor},set rolloffFactor(J0){if(J0<0)throw new RangeError;j0.rolloffFactor=J0},addEventListener(...J0){return T0.addEventListener(J0[0],J0[1],J0[2])},dispatchEvent(...J0){return T0.dispatchEvent(J0[0])},removeEventListener(...J0){return T0.removeEventListener(J0[0],J0[1],J0[2])}};h0!==q0.coneInnerAngle&&(q0.coneInnerAngle=h0),f0!==q0.coneOuterAngle&&(q0.coneOuterAngle=f0),p0!==q0.coneOuterGain&&(q0.coneOuterGain=p0),A0!==q0.distanceModel&&(q0.distanceModel=A0),m0!==q0.maxDistance&&(q0.maxDistance=m0),x0!==q0.orientationX.value&&(q0.orientationX.value=x0),g0!==q0.orientationY.value&&(q0.orientationY.value=g0),y0!==q0.orientationZ.value&&(q0.orientationZ.value=y0),b0!==q0.panningModel&&(q0.panningModel=b0),E0!==q0.positionX.value&&(q0.positionX.value=E0),w0!==q0.positionY.value&&(q0.positionY.value=w0),v0!==q0.positionZ.value&&(q0.positionZ.value=v0),S0!==q0.refDistance&&(q0.refDistance=S0),k0!==q0.rolloffFactor&&(q0.rolloffFactor=k0),(F0[0]!==1||F0[1]!==0||F0[2]!==0)&&j0.setOrientation(...F0),(Q0[0]!==0||Q0[1]!==0||Q0[2]!==0)&&j0.setPosition(...Q0);const Rw=()=>{T0.connect(j0),r0(T0,G0,0,0),G0.connect(I0).connect($0,0,0),G0.connect(M0).connect($0,0,1),G0.connect(N0).connect($0,0,2),G0.connect(D0).connect($0,0,3),G0.connect(O0).connect($0,0,4),G0.connect(B0).connect($0,0,5),$0.connect(z0).connect(d0.destination)},_w=()=>{T0.disconnect(j0),l0(T0,G0,0,0),G0.disconnect(I0),I0.disconnect($0),G0.disconnect(M0),M0.disconnect($0),G0.disconnect(N0),N0.disconnect($0),G0.disconnect(D0),D0.disconnect($0),G0.disconnect(O0),O0.disconnect($0),G0.disconnect(B0),B0.disconnect($0),$0.disconnect(z0),z0.disconnect(d0.destination)};return u0(interceptConnections(q0,j0),Rw,_w)},createNativePeriodicWaveFactory=r0=>(e0,{disableNormalization:n0,imag:a0,real:i0})=>{const s0=a0 instanceof Float32Array?a0:new Float32Array(a0),o0=i0 instanceof Float32Array?i0:new Float32Array(i0),l0=e0.createPeriodicWave(o0,s0,{disableNormalization:n0});if(Array.from(a0).length<2)throw r0();return l0},createNativeScriptProcessorNode=(r0,e0,n0,a0)=>r0.createScriptProcessor(e0,n0,a0),createNativeStereoPannerNodeFactory=(r0,e0)=>(n0,a0)=>{const i0=a0.channelCountMode;if(i0==="clamped-max")throw e0();if(n0.createStereoPanner===void 0)return r0(n0,a0);const s0=n0.createStereoPanner();return assignNativeAudioNodeOptions(s0,a0),assignNativeAudioNodeAudioParamValue(s0,a0,"pan"),Object.defineProperty(s0,"channelCountMode",{get:()=>i0,set:o0=>{if(o0!==i0)throw e0()}}),s0},createNativeStereoPannerNodeFakerFactory=(r0,e0,n0,a0,i0,s0)=>{const l0=new Float32Array([1,1]),c0=Math.PI/2,u0={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},d0={...u0,oversample:"none"},h0=(A0,m0,x0,g0)=>{const y0=new Float32Array(16385),b0=new Float32Array(16385);for(let R0=0;R0<16385;R0+=1){const j0=R0/16384*c0;y0[R0]=Math.cos(j0),b0[R0]=Math.sin(j0)}const E0=n0(A0,{...u0,gain:0}),w0=a0(A0,{...d0,curve:y0}),v0=a0(A0,{...d0,curve:l0}),S0=n0(A0,{...u0,gain:0}),k0=a0(A0,{...d0,curve:b0});return{connectGraph(){m0.connect(E0),m0.connect(v0.inputs===void 0?v0:v0.inputs[0]),m0.connect(S0),v0.connect(x0),x0.connect(w0.inputs===void 0?w0:w0.inputs[0]),x0.connect(k0.inputs===void 0?k0:k0.inputs[0]),w0.connect(E0.gain),
637k0.connect(S0.gain),E0.connect(g0,0,0),S0.connect(g0,0,1)},disconnectGraph(){m0.disconnect(E0),m0.disconnect(v0.inputs===void 0?v0:v0.inputs[0]),m0.disconnect(S0),v0.disconnect(x0),x0.disconnect(w0.inputs===void 0?w0:w0.inputs[0]),x0.disconnect(k0.inputs===void 0?k0:k0.inputs[0]),w0.disconnect(E0.gain),k0.disconnect(S0.gain),E0.disconnect(g0,0,0),S0.disconnect(g0,0,1)}}},f0=(A0,m0,x0,g0)=>{const y0=new Float32Array(16385),b0=new Float32Array(16385),E0=new Float32Array(16385),w0=new Float32Array(16385),v0=Math.floor(16385/2);for(let D0=0;D0<16385;D0+=1)if(D0>v0){const O0=(D0-v0)/(16384-v0)*c0;y0[D0]=Math.cos(O0),b0[D0]=Math.sin(O0),E0[D0]=0,w0[D0]=1}else{const O0=D0/(16384-v0)*c0;y0[D0]=1,b0[D0]=0,E0[D0]=Math.cos(O0),w0[D0]=Math.sin(O0)}const S0=e0(A0,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),k0=n0(A0,{...u0,gain:0}),R0=a0(A0,{...d0,curve:y0}),j0=n0(A0,{...u0,gain:0}),C0=a0(A0,{...d0,curve:b0}),$0=a0(A0,{...d0,curve:l0}),T0=n0(A0,{...u0,gain:0}),I0=a0(A0,{...d0,curve:E0}),M0=n0(A0,{...u0,gain:0}),N0=a0(A0,{...d0,curve:w0});return{connectGraph(){m0.connect(S0),m0.connect($0.inputs===void 0?$0:$0.inputs[0]),S0.connect(k0,0),S0.connect(j0,0),S0.connect(T0,1),S0.connect(M0,1),$0.connect(x0),x0.connect(R0.inputs===void 0?R0:R0.inputs[0]),x0.connect(C0.inputs===void 0?C0:C0.inputs[0]),x0.connect(I0.inputs===void 0?I0:I0.inputs[0]),x0.connect(N0.inputs===void 0?N0:N0.inputs[0]),R0.connect(k0.gain),C0.connect(j0.gain),I0.connect(T0.gain),N0.connect(M0.gain),k0.connect(g0,0,0),T0.connect(g0,0,0),j0.connect(g0,0,1),M0.connect(g0,0,1)},disconnectGraph(){m0.disconnect(S0),m0.disconnect($0.inputs===void 0?$0:$0.inputs[0]),S0.disconnect(k0,0),S0.disconnect(j0,0),S0.disconnect(T0,1),S0.disconnect(M0,1),$0.disconnect(x0),x0.disconnect(R0.inputs===void 0?R0:R0.inputs[0]),x0.disconnect(C0.inputs===void 0?C0:C0.inputs[0]),x0.disconnect(I0.inputs===void 0?I0:I0.inputs[0]),x0.disconnect(N0.inputs===void 0?N0:N0.inputs[0]),R0.disconnect(k0.gain),C0.disconnect(j0.gain),I0.disconnect(T0.gain),N0.disconnect(M0.gain),k0.disconnect(g0,0,0),T0.disconnect(g0,0,0),j0.disconnect(g0,0,1),M0.disconnect(g0,0,1)}}},p0=(A0,m0,x0,g0,y0)=>{if(m0===1)return h0(A0,x0,g0,y0);if(m0===2)return f0(A0,x0,g0,y0);throw i0()};return(A0,{channelCount:m0,channelCountMode:x0,pan:g0,...y0})=>{if(x0==="max")throw i0();const b0=r0(A0,{...y0,channelCount:1,channelCountMode:x0,numberOfInputs:2}),E0=n0(A0,{...y0,channelCount:m0,channelCountMode:x0,gain:1}),w0=n0(A0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:g0});let{connectGraph:v0,disconnectGraph:S0}=p0(A0,m0,E0,w0,b0);Object.defineProperty(w0.gain,"defaultValue",{get:()=>0}),Object.defineProperty(w0.gain,"maxValue",{get:()=>1}),Object.defineProperty(w0.gain,"minValue",{get:()=>-1});const k0={get bufferSize(){},get channelCount(){return E0.channelCount},set channelCount($0){E0.channelCount!==$0&&(R0&&S0(),{connectGraph:v0,disconnectGraph:S0}=p0(A0,$0,E0,w0,b0),R0&&v0()),E0.channelCount=$0},get channelCountMode(){return E0.channelCountMode},set channelCountMode($0){if($0==="clamped-max"||$0==="max")throw i0();E0.channelCountMode=$0},get channelInterpretation(){return E0.channelInterpretation},set channelInterpretation($0){E0.channelInterpretation=$0},get context(){return E0.context},get inputs(){return[E0]},get numberOfInputs(){return E0.numberOfInputs},get numberOfOutputs(){return E0.numberOfOutputs},get pan(){return w0.gain},addEventListener(...$0){return E0.addEventListener($0[0],$0[1],$0[2])},dispatchEvent(...$0){return E0.dispatchEvent($0[0])},removeEventListener(...$0){return E0.removeEventListener($0[0],$0[1],$0[2])}};let R0=!1;const j0=()=>{v0(),R0=!0},C0=()=>{S0(),R0=!1};return s0(interceptConnections(k0,b0),j0,C0)}},createNativeWaveShaperNodeFactory=(r0,e0,n0,a0,i0,s0,o0)=>(l0,c0)=>{const u0=l0.createWaveShaper();if(s0!==null&&s0.name==="webkitAudioContext"&&l0.createGain().gain.automationRate===void 0)return n0(l0,c0);assignNativeAudioNodeOptions(u0,c0);const d0=c0.curve===null||c0.curve instanceof Float32Array?c0.curve:new Float32Array(c0.curve);if(d0!==null&&d0.length<2)throw e0();assignNativeAudioNodeOption(u0,{curve:d0},"curve"),assignNativeAudioNodeOption(u0,c0,"oversample");let h0=null,f0=!1;return o0(u0,"curve",m0=>()=>m0.call(u0),m0=>x0=>(m0.call(u0,x0),f0&&(a0(x0)&&h0===null?h0=r0(l0,u0):!a0(x0)&&h0!==null&&(h0(),h0=null)),x0)),i0(u0,()=>{f0=!0,a0(u0.curve)&&(h0=r0(l0,u0))},()=>{f0=!1,h0!==null&&(h0(),h0=null)})},createNativeWaveShaperNodeFakerFactory=(r0,e0,n0,a0,i0)=>(s0,{curve:o0,oversample:l0,...c0})=>{const u0=s0.createWaveShaper(),d0=s0.createWaveShaper();assignNativeAudioNodeOptions(u0,c0),assignNativeAudioNodeOptions(d0,c0);const h0=n0(s0,{...c0,gain:1}),f0=n0(s0,{...c0,gain:-1}),p0=n0(s0,{...c0,gain:1}),A0=n0(s0,{...c0,gain:-1});let m0=null,x0=!1,g0=null;const y0={get bufferSize(){},get channelCount(){return u0.channelCount},set channelCount(w0){h0.channelCount=w0,f0.channelCount=w0,u0.channelCount=w0,p0.channelCount=w0,d0.channelCount=w0,A0.channelCount=w0},get channelCountMode(){return u0.channelCountMode},set channelCountMode(w0){h0.channelCountMode=w0,f0.channelCountMode=w0,u0.channelCountMode=w0,p0.channelCountMode=w0,d0.channelCountMode=w0,A0.channelCountMode=w0},get channelInterpretation(){return u0.channelInterpretation},set channelInterpretation(w0){h0.channelInterpretation=w0,f0.channelInterpretation=w0,u0.channelInterpretation=w0,p0.channelInterpretation=w0,d0.channelInterpretation=w0,A0.channelInterpretation=w0},get context(){return u0.context},get curve(){return g0},set curve(w0){if(w0!==null&&w0.length<2)throw e0();if(w0===null)u0.curve=w0,d0.curve=w0;else{const v0=w0.length,S0=new Float32Array(v0+2-v0%2),k0=new Float32Array(v0+2-v0%2);S0[0]=w0[0],k0[0]=-w0[v0-1];const R0=Math.ceil((v0+1)/2),j0=(v0+1)/2-1;for(let C0=1;C0<R0;C0+=1){const $0=C0/R0*j0,T0=Math.floor($0),I0=Math.ceil($0);
637S0[C0]=T0===I0?w0[T0]:(1-($0-T0))*w0[T0]+(1-(I0-$0))*w0[I0],k0[C0]=T0===I0?-w0[v0-1-T0]:-((1-($0-T0))*w0[v0-1-T0])-(1-(I0-$0))*w0[v0-1-I0]}S0[R0]=v0%2===1?w0[R0-1]:(w0[R0-2]+w0[R0-1])/2,u0.curve=S0,d0.curve=k0}g0=w0,x0&&(a0(g0)&&m0===null?m0=r0(s0,h0):m0!==null&&(m0(),m0=null))},get inputs(){return[h0]},get numberOfInputs(){return u0.numberOfInputs},get numberOfOutputs(){return u0.numberOfOutputs},get oversample(){return u0.oversample},set oversample(w0){u0.oversample=w0,d0.oversample=w0},addEventListener(...w0){return h0.addEventListener(w0[0],w0[1],w0[2])},dispatchEvent(...w0){return h0.dispatchEvent(w0[0])},removeEventListener(...w0){return h0.removeEventListener(w0[0],w0[1],w0[2])}};o0!==null&&(y0.curve=o0 instanceof Float32Array?o0:new Float32Array(o0)),l0!==y0.oversample&&(y0.oversample=l0);const b0=()=>{h0.connect(u0).connect(p0),h0.connect(f0).connect(d0).connect(A0).connect(p0),x0=!0,a0(g0)&&(m0=r0(s0,h0))},E0=()=>{h0.disconnect(u0),u0.disconnect(p0),h0.disconnect(f0),f0.disconnect(d0),d0.disconnect(A0),A0.disconnect(p0),x0=!1,m0!==null&&(m0(),m0=null)};return i0(interceptConnections(y0,p0),b0,E0)},createNotSupportedError=()=>new DOMException("","NotSupportedError"),DEFAULT_OPTIONS$5={numberOfChannels:1},createOfflineAudioContextConstructor=(r0,e0,n0,a0,i0)=>class extends r0{constructor(o0,l0,c0){let u0;if(typeof o0=="number"&&l0!==void 0&&c0!==void 0)u0={length:l0,numberOfChannels:o0,sampleRate:c0};else if(typeof o0=="object")u0=o0;else throw new Error("The given parameters are not valid.");const{length:d0,numberOfChannels:h0,sampleRate:f0}={...DEFAULT_OPTIONS$5,...u0},p0=a0(h0,d0,f0);e0(testPromiseSupport,()=>testPromiseSupport(p0))||p0.addEventListener("statechange",(()=>{let A0=0;const m0=x0=>{this._state==="running"&&(A0>0?(p0.removeEventListener("statechange",m0),x0.stopImmediatePropagation(),this._waitForThePromiseToSettle(x0)):A0+=1)};return m0})()),super(p0,h0),this._length=d0,this._nativeOfflineAudioContext=p0,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(n0()):(this._state="running",i0(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,deactivateAudioGraph(this)}))}_waitForThePromiseToSettle(o0){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o0):setTimeout(()=>this._waitForThePromiseToSettle(o0))}},DEFAULT_OPTIONS$4={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},createOscillatorNodeConstructor=(r0,e0,n0,a0,i0,s0,o0)=>class extends r0{constructor(c0,u0){const d0=i0(c0),h0={...DEFAULT_OPTIONS$4,...u0},f0=n0(d0,h0),p0=s0(d0),A0=p0?a0():null,m0=c0.sampleRate/2;super(c0,!1,f0,A0),this._detune=e0(this,p0,f0.detune,153600,-153600),this._frequency=e0(this,p0,f0.frequency,m0,-m0),this._nativeOscillatorNode=f0,this._onended=null,this._oscillatorNodeRenderer=A0,this._oscillatorNodeRenderer!==null&&h0.peri
637odicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=h0.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(c0){const u0=typeof c0=="function"?o0(this,c0):null;this._nativeOscillatorNode.onended=u0;const d0=this._nativeOscillatorNode.onended;this._onended=d0!==null&&d0===u0?c0:d0}get type(){return this._nativeOscillatorNode.type}set type(c0){this._nativeOscillatorNode.type=c0,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(c0){this._nativeOscillatorNode.setPeriodicWave(c0),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=c0)}start(c0=0){if(this._nativeOscillatorNode.start(c0),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=c0),this.context.state!=="closed"){setInternalStateToActive(this);const u0=()=>{this._nativeOscillatorNode.removeEventListener("ended",u0),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeOscillatorNode.addEventListener("ended",u0)}}stop(c0=0){this._nativeOscillatorNode.stop(c0),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c0)}},createOscillatorNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap;let o0=null,l0=null,c0=null;const u0=async(d0,h0)=>{let f0=n0(d0);const p0=isOwnedByContext(f0,h0);if(!p0){const A0={channelCount:f0.channelCount,channelCountMode:f0.channelCountMode,channelInterpretation:f0.channelInterpretation,detune:f0.detune.value,frequency:f0.frequency.value,periodicWave:o0===null?void 0:o0,type:f0.type};f0=e0(h0,A0),l0!==null&&f0.start(l0),c0!==null&&f0.stop(c0)}return s0.set(h0,f0),p0?(await r0(h0,d0.detune,f0.detune),await r0(h0,d0.frequency,f0.frequency)):(await a0(h0,d0.detune,f0.detune),await a0(h0,d0.frequency,f0.frequency)),await i0(d0,h0,f0),f0};return{set periodicWave(d0){o0=d0},set start(d0){l0=d0},set stop(d0){c0=d0},render(d0,h0){const f0=s0.get(h0);return f0!==void 0?Promise.resolve(f0):u0(d0,h0)}}},DEFAULT_OPTIONS$3={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},createPannerNodeConstructor=(r0,e0,n0,a0,i0,s0,o0)=>class extends r0{constructor(c0,u0){const d0=i0(c0),h0={...DEFAULT_OPTIONS$3,...u0},f0=n0(d0,h0),p0=s0(d0),A0=p0?a0():null;super(c0,!1,f0,A0),this._nativePannerNode=f0,this._orientationX=e0(this,p0,f0.orientationX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationY=e0(this,p0,f0.orientationY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationZ=e0(this,p0,f0.orientationZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionX=e0(this,p0,f0.positionX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionY=e0(this,p0,f0.positionY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionZ=e0(this,p0,f0.positionZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),o0(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(c0){this._nativePannerNode.coneInnerAngle=c0}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(c0){this._nativePannerNode.coneOuterAngle=c0}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(c0){this._nativePannerNode.coneOuterGain=c0}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(c0){this._nativePannerNode.distanceModel=c0}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(c0){this._nativePannerNode.maxDistance=c0}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(c0){this._nativePannerNode.panningModel=c0}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(c0){this._nativePannerNode.refDistance=c0}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(c0){this._nativePannerNode.rolloffFactor=c0}},createPannerNodeRendererFactory=(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0)=>()=>{const d0=new WeakMap;let h0=null;const f0=async(p0,A0)=>{let m0=null,x0=s0(p0);const g0={channelCount:x0.channelCount,channelCountMode:x0.channelCountMode,channelInterpretation:x0.channelInterpretation},y0={...g0,coneInnerAngle:x0.coneInnerAngle,coneOuterAngle:x0.coneOuterAngle,coneOuterGain:x0.coneOuterGain,distanceModel:x0.distanceModel,maxDistance:x0.maxDistance,panningModel:x0.panningModel,refDistance:x0.refDistance,rolloffFactor:x0.rolloffFactor},b0=isOwnedByContext(x0,A0);if("bufferSize"in x0)m0=a0(A0,{...g0,gain:1});else if(!b0){const E0={...y0,orientationX:x0.orientationX.value,orientationY:x0.orientationY.value,orientationZ:x0.orientationZ.value,positionX:x0.positionX.value,positionY:x0.positionY.value,positionZ:x0.positionZ.value};x0=i0(A0,E0)}if(d0.set(A0,m0===null?x0:m0),m0!==null){if(h0===null){if(o0===null)throw new Error("Missing the native OfflineAudioContext constructor.");const C0=new o0(6,p0.context.length,A0.sampleRate),$0=e0(C0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});$0.connect(C0.destination),h0=(async()=>{const T0=await Promise.all([p0.orientationX,p0.orientationY,p0.orientationZ,p0.positionX,p0.positionY,p0.positionZ].map(async(I0,M0)=>{const N0=n0(C0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:M0===0?1:0});return await l0(C0,I0,N0.offset),N0}));for(let I0=0;I0<6;I0+=1)T0[I0].connect($0,0,I0),T0[I0].start(0);return u0(C0)})()}const E0=await h0,w0=a0(A0,{...g0,gain:1});await c0(p0,A0,w0);const v0=[];for(let C0=0;C0<E0.numberOfChannels;C0+=1)v0.push(E0.getChannelData(C0));let S0=[v0[0][0],v0[1][0],v0[2][0]],k0=[v0[3][0],v0[4][0],v0[5][0]],R0=a0(A0,{...g0,gain:1}),j0=i0(A0,{...y0,orientationX:S0[0],orientationY:S0[1],orientationZ:S0[2],positionX:k0[0],positionY:k0[1],positionZ:k0[2]});w0.connect(R0).connect(j0.inputs[0]),j0.connect(m0);for(let C0=128;C0<E0.length;
637C0+=128){const $0=[v0[0][C0],v0[1][C0],v0[2][C0]],T0=[v0[3][C0],v0[4][C0],v0[5][C0]];if($0.some((I0,M0)=>I0!==S0[M0])||T0.some((I0,M0)=>I0!==k0[M0])){S0=$0,k0=T0;const I0=C0/A0.sampleRate;R0.gain.setValueAtTime(0,I0),R0=a0(A0,{...g0,gain:0}),j0=i0(A0,{...y0,orientationX:S0[0],orientationY:S0[1],orientationZ:S0[2],positionX:k0[0],positionY:k0[1],positionZ:k0[2]}),R0.gain.setValueAtTime(1,I0),w0.connect(R0).connect(j0.inputs[0]),j0.connect(m0)}}return m0}return b0?(await r0(A0,p0.orientationX,x0.orientationX),await r0(A0,p0.orientationY,x0.orientationY),await r0(A0,p0.orientationZ,x0.orientationZ),await r0(A0,p0.positionX,x0.positionX),await r0(A0,p0.positionY,x0.positionY),await r0(A0,p0.positionZ,x0.positionZ)):(await l0(A0,p0.orientationX,x0.orientationX),await l0(A0,p0.orientationY,x0.orientationY),await l0(A0,p0.orientationZ,x0.orientationZ),await l0(A0,p0.positionX,x0.positionX),await l0(A0,p0.positionY,x0.positionY),await l0(A0,p0.positionZ,x0.positionZ)),isNativeAudioNodeFaker(x0)?await c0(p0,A0,x0.inputs[0]):await c0(p0,A0,x0),x0};return{render(p0,A0){const m0=d0.get(A0);return m0!==void 0?Promise.resolve(m0):f0(p0,A0)}}},DEFAULT_OPTIONS$2={disableNormalization:!1},createPeriodicWaveConstructor=(r0,e0,n0,a0)=>class C5{constructor(s0,o0){const l0=e0(s0),c0=a0({...DEFAULT_OPTIONS$2,...o0}),u0=r0(l0,c0);return n0.add(u0),u0}static[Symbol.hasInstance](s0){return s0!==null&&typeof s0=="object"&&Object.getPrototypeOf(s0)===C5.prototype||n0.has(s0)}},createRenderAutomation=(r0,e0)=>(n0,a0,i0)=>(r0(a0).replay(i0),e0(a0,n0,i0)),createRenderInputsOfAudioNode=(r0,e0,n0)=>async(a0,i0,s0)=>{const o0=r0(a0);await Promise.all(o0.activeInputs.map((l0,c0)=>Array.from(l0).map(async([u0,d0])=>{const f0=await e0(u0).render(u0,i0),p0=a0.context.destination;!n0(u0)&&(a0!==p0||!n0(a0))&&f0.connect(s0,d0,c0)})).reduce((l0,c0)=>[...l0,...c0],[]))},createRenderInputsOfAudioParam=(r0,e0,n0)=>async(a0,i0,s0)=>{const o0=e0(a0);await Promise.all(Array.from(o0.activeInputs).map(async([l0,c0])=>{const d0=await r0(l0).render(l0,i0);n0(l0)||d0.connect(s0,c0)}))},createRenderNativeOfflineAudioContext=(r0,e0,n0,a0)=>i0=>r0(testPromiseSupport,()=>testPromiseSupport(i0))?Promise.resolve(r0(a0,a0)).then(s0=>{if(!s0){const o0=n0(i0,512,0,1);i0.oncomplete=()=>{o0.onaudioprocess=null,o0.disconnect()},o0.onaudioprocess=()=>i0.currentTime,o0.connect(i0.destination)}return i0.startRendering()}):new Promise(s0=>{const o0=e0(i0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i0.oncomplete=l0=>{o0.disconnect(),s0(l0.renderedBuffer)},o0.connect(i0.destination),i0.startRendering()}),createSetAudioNodeTailTime=r0=>(e0,n0)=>r0.set(e0,n0),createStartRendering=(r0,e0,n0,a0,i0,s0,o0,l0)=>(c0,u0)=>n0(c0).render(c0,u0).then(()=>Promise.all(Array.from(a0(u0)).map(d0=>n0(d0).render(d0,u0)))).then(()=>i0(u0)).then(d0=>(typeof d0.copyFromChannel!="function"?(o0(d0),wrapAudioBufferGetChannelDataMethod(d0)):e0(s0,()=>s0(d0))||l0(d0),r0.add(d0),d0)),DEFAULT_OPTIONS$1={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},createStereoPannerNodeConstructor=(r0,e0,n0,a0,i0,s0)=>class extends r0{constructor(l0,c0){const u0=i0(l0),d0={...DEFAULT_OPTIONS$1,...c0},h0=n0(u0,d0),f0=s0(u0),p0=f0?a0():null;super(l0,!1,h0,p0),this._pan=e0(this,f0,h0.pan)}get pan(){return this._pan}},createStereoPannerNodeRendererFactory=(r0,e0,n0,a0,i0)=>()=>{const s0=new WeakMap,o0=async(l0,c0)=>{let u0=n0(l0);const d0=isOwnedByContext(u0,c0);if(!d0){const h0={channelCount:u0.channelCount,channelCountMode:u0.channelCountMode,channelInterpretation:u0.channelInterpretation,pan:u0.pan.value};u0=e0(c0,h0)}return s0.set(c0,u0),d0?await r0(c0,l0.pan,u0.pan):await a0(c0,l0.pan,u0.pan),isNativeAudioNodeFaker(u0)?await i0(l0,c0,u0.inputs[0]):await i0(l0,c0,u0),u0};return{render(l0,c0){const u0=s0.get(c0);return u0!==void 0?Promise.resolve(u0):o0(l0,c0)}}},createTestAudioBufferConstructorSupport=r0=>()=>{if(r0===null)return!1;try{new r0({length:1,sampleRate:44100})}catch{return!1}return!0},createTestAudioWorkletProcessorPostMessageSupport=(r0,e0)=>async()=>
637{if(r0===null)return!0;if(e0===null)return!1;const n0=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),a0=new e0(1,128,44100),i0=URL.createObjectURL(n0);let s0=!1,o0=!1;try{await a0.audioWorklet.addModule(i0);const l0=new r0(a0,"a",{numberOfOutputs:0}),c0=a0.createOscillator();l0.port.onmessage=()=>s0=!0,l0.onprocessorerror=()=>o0=!0,c0.connect(l0),c0.start(0),await a0.startRendering(),await new Promise(u0=>setTimeout(u0))}catch{}finally{URL.revokeObjectURL(i0)}return s0&&!o0},createTestOfflineAudioContextCurrentTimeSupport=(r0,e0)=>()=>{if(e0===null)return Promise.resolve(!1);const n0=new e0(1,1,44100),a0=r0(n0,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(i0=>{n0.oncomplete=()=>{a0.disconnect(),i0(n0.currentTime!==0)},n0.startRendering()})},DEFAULT_OPTIONS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},createWaveShaperNodeConstructor=(r0,e0,n0,a0,i0,s0,o0)=>class extends r0{constructor(c0,u0){const d0=i0(c0),h0={...DEFAULT_OPTIONS,...u0},f0=n0(d0,h0),A0=s0(d0)?a0():null;super(c0,!0,f0,A0),this._isCurveNullified=!1,this._nativeWaveShaperNode=f0,o0(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(c0){if(c0===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(c0.length<2)throw e0();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=c0}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(c0){this._nativeWaveShaperNode.oversample=c0}},createWaveShaperNodeRendererFactory=(r0,e0,n0)=>()=>{const a0=new WeakMap,i0=async(s0,o0)=>{let l0=e0(s0);if(!isOwnedByContext(l0,o0)){const u0={channelCount:l0.channelCount,channelCountMode:l0.channelCountMode,channelInterpretation:l0.channelInterpretation,curve:l0.curve,oversample:l0.oversample};l0=r0(o0,u0)}return a0.set(o0,l0),isNativeAudioNodeFaker(l0)?await n0(s0,o0,l0.inputs[0]):await n0(s0,o0,l0),l0};return{render(s0,o0){const l0=a0.get(o0);return l0!==void 0?Promise.resolve(l0):i0(s0,o0)}}},createWindow=()=>typeof window>"u"?null:window,createWrapAudioBufferCopyChannelMethods=(r0,e0)=>n0=>{n0.copyFromChannel=(a0,i0,s0=0)=>{const o0=r0(s0),l0=r0(i0);if(l0>=n0.numberOfChannels)throw e0();const c0=n0.length,u0=n0.getChannelData(l0),d0=a0.length;for(let h0=o0<0?-o0:0;h0+o0<c0&&h0<d0;h0+=1)a0[h0]=u0[h0+o0]},n0.copyToChannel=(a0,i0,s0=0)=>{const o0=r0(s0),l0=r0(i0);if(l0>=n0.numberOfChannels)throw e0();const c0=n0.length,u0=n0.getChannelData(l0),d0=a0.length;for(let h0=o0<0?-o0:0;h0+o0<c0&&h0<d0;h0+=1)u0[h0+o0]=a0[h0]}},createWrapAudioBufferCopyChannelMethodsOutOfBounds=r0=>e0=>{e0.copyFromChannel=(n0=>(a0,i0,s0=0)=>{const o0=r0(s0),l0=r0(i0);if(o0<e0.length)return n0.call(e0,a0,l0,o0)})(e0.copyFromChannel),e0.copyToChannel=(n0=>(a0,i0,s0=0)=>{const o0=r0(s0),l0=r0(i0);if(o0<e0.length)return n0.call(e0,a0,l0,o0)})(e0.copyToChannel)},createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer=r0=>(e0,n0)=>{const a0=n0.createBuffer(1,1,44100);e0.buffer===null&&(e0.buffer=a0),r0(e0,"buffer",i0=>()=>{const s0=i0.call(e0);return s0===a0?null:s0},i0=>s0=>i0.call(e0,s0===null?a0:s0))},createWrapChannelMergerNode=(r0,e0)=>(n0,a0)=>{a0.channelCount=1,a0.channelCountMode="explicit",Object.defineProperty(a0,"channelCount",{get:()=>1,set:()=>{throw r0()}}),Object.defineProperty(a0,"channelCountMode",{get:()=>"explicit",set:()=>{throw r0()}});const i0=n0.createBufferSource();e0(a0,()=>{const l0=a0.numberOfInputs;for(let c0=0;c0<l0;c0+=1)i0.connect(a0,0,c0)},()=>i0.disconnect(a0))},getFirstSample=(r0,e0,n0)=>r0.copyFromChannel===void 0?r0.getChannelData(n0)[0]:(r0.copyFromChannel(e0,n0),e0[0]),isDCCurve=r0=>{if(r0===null)return!1;const e0=r0.length;return e0%2!==0?r0[Math.floor(e0/2)]!==0:r0[e0/2-1]+r0[e0/2]!==0},overwriteAccessors=(r0,e0,n0,a0)=>{let i0=r0;for(;!i0.hasOwnProperty(e0);)i0=Object.getPrototypeOf(i0);const{get:s0,set:o0}=Object.getOwnPropertyDescriptor(i0,e0);Object.defineProperty(r0,e0,{get:n0(s0),set:a0(o0)})},sanitizeChannelSplitterOptions=r0=>({...r0,channelCount:r0.numberOfOutputs}),sanitizePeriodicWaveOptions=r0=>{const{imag:e0,real:n0}=r0;
vendor: 16,072 bytes, line 637
637return e0===void 0?n0===void 0?{...r0,imag:[0,0],real:[0,0]}:{...r0,imag:Array.from(n0,()=>0),real:n0}:n0===void 0?{...r0,imag:e0,real:Array.from(e0,()=>0)}:{...r0,imag:e0,real:n0}},setValueAtTimeUntilPossible=(r0,e0,n0)=>{try{r0.setValueAtTime(e0,n0)}catch(a0){if(a0.code!==9)throw a0;setValueAtTimeUntilPossible(r0,e0,n0+1e-7)}},testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport=r0=>{const e0=r0.createBufferSource();e0.start();try{e0.start()}catch{return!0}return!1},testAudioBufferSourceNodeStartMethodOffsetClampingSupport=r0=>{const e0=r0.createBufferSource(),n0=r0.createBuffer(1,1,44100);e0.buffer=n0;try{e0.start(0,1)}catch{return!1}return!0},testAudioBufferSourceNodeStopMethodNullifiedBufferSupport=r0=>{const e0=r0.createBufferSource();e0.start();try{e0.stop()}catch{return!1}return!0},testAudioScheduledSourceNodeStartMethodNegativeParametersSupport=r0=>{const e0=r0.createOscillator();try{e0.start(-1)}catch(n0){return n0 instanceof RangeError}return!1},testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport=r0=>{const e0=r0.createBuffer(1,1,44100),n0=r0.createBufferSource();n0.buffer=e0,n0.start(),n0.stop();try{return n0.stop(),!0}catch{return!1}},testAudioScheduledSourceNodeStopMethodNegativeParametersSupport=r0=>{const e0=r0.createOscillator();try{e0.stop(-1)}catch(n0){return n0 instanceof RangeError}return!1},wrapAudioBufferSourceNodeStartMethodOffsetClamping=r0=>{r0.start=(e0=>(n0=0,a0=0,i0)=>{const s0=r0.buffer,o0=s0===null?a0:Math.min(s0.duration,a0);s0!==null&&o0>s0.duration-.5/r0.context.sampleRate?e0.call(r0,n0,0,0):e0.call(r0,n0,o0,i0)})(r0.start)},wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls=(r0,e0)=>{const n0=e0.createGain();r0.connect(n0);const a0=(i0=>()=>{i0.call(r0,n0),r0.removeEventListener("ended",a0)})(r0.disconnect);r0.addEventListener("ended",a0),interceptConnections(r0,n0),r0.stop=(i0=>{let s0=!1;return(o0=0)=>{if(s0)try{i0.call(r0,o0)}catch{n0.gain.setValueAtTime(0,o0)}else i0.call(r0,o0),s0=!0}})(r0.stop)},wrapEventListener=(r0,e0)=>n0=>{const a0={value:r0};return Object.defineProperties(n0,{currentTarget:a0,target:a0}),typeof e0=="function"?e0.call(r0,n0):e0.handleEvent.call(r0,n0)},addActiveInputConnectionToAudioNode=createAddActiveInputConnectionToAudioNode(insertElementInSet),addPassiveInputConnectionToAudioNode=createAddPassiveInputConnectionToAudioNode(insertElementInSet),deleteActiveInputConnectionToAudioNode=createDeleteActiveInputConnectionToAudioNode(pickElementFromSet),audioNodeTailTimeStore=new WeakMap,getAudioNodeTailTime=createGetAudioNodeTailTime(audioNodeTailTimeStore),cacheTestResult=createCacheTestResult(new Map,new WeakMap),window$1=createWindow(),createNativeAnalyserNode=createNativeAnalyserNodeFactory(cacheTestResult,createIndexSizeError),getAudioNodeRenderer=createGetAudioNodeRenderer(getAudioNodeConnections),renderInputsOfAudioNode=createRenderInputsOfAudioNode(getAudioNodeConnections,getAudioNodeRenderer,isPartOfACycle),createAnalyserNodeRenderer=createAnalyserNodeRendererFactory(createNativeAnalyserNode,getNativeAudioNode,renderInputsOfAudioNode),getNativeContext=createGetNativeContext(CONTEXT_STORE),nativeOfflineAudioContextConstructor=createNativeOfflineAudioContextConstructor(window$1),isNativeOfflineAudioContext=createIsNativeOfflineAudioContext(nativeOfflineAudioContextConstructor),audioParamAudioNodeStore=new WeakMap,eventTargetConstructor=createEventTargetConstructor(wrapEventListener),nativeAudioContextConstructor=createNativeAudioContextConstructor(window$1),isNativeAudioContext=createIsNativeAudioContext(nativeAudioContextConstructor),isNativeAudioNode=createIsNativeAudioNode(window$1),isNativeAudioParam=createIsNativeAudioParam(window$1),nativeAudioWorkletNodeConstructor=createNativeAudioWorkletNodeConstructor(window$1),audioNodeConstructor=createAudioNodeConstructor(createAddAudioNodeConnections(AUDIO_NODE_CONNECTIONS_STORE),createAddConnectionToAudioNode(addActiveInputConnectionToAudioNode,addPassiveInputConnectionToAudioNode,connectNativeAudioNodeToNativeAudioNode,deleteActiveInputConnectionToAudioNode,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getAudioNodeTailTime,getEventListenersOfAudioNode,getNativeAudioNode,insertElementInSet,isActiveAudioNode,isPartOfACycle,isPassiveAudioNode),cacheTestResult,createIncrementCycleCounterFactory(CYCLE_COUNTERS,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,isActiveAudioNode),createIndexSizeError,createInvalidAccessError,createNotSupportedError,createDecrementCycleCounter(connectNativeAudioNodeToNativeAudioNode,CYCLE_COUNTERS,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,getNativeContext,isActiveAudioNode,isNativeOfflineAudioContext),createDetectCycles(audioParamAudioNodeStore,getAudioNodeConnections,getValueForKey),eventTargetConstructor,getNativeContext,isNativeAudioContext,isNativeAudioNode,isNativeAudioParam,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor),analyserNodeConstructor=createAnalyserNodeConstructor(audioNodeConstructor,createAnalyserNodeRenderer,createIndexSizeError,createNativeAnalyserNode,getNativeContext,isNativeOfflineAudioContext),audioBufferStore=new WeakSet,nativeAudioBufferConstructor=createNativeAudioBufferConstructor(window$1),convertNumberToUnsignedLong=createConvertNumberToUnsignedLong(new Uint32Array(1)),wrapAudioBufferCopyChannelMethods=createWrapAudioBufferCopyChannelMethods(convertNumberToUnsignedLong,createIndexSizeError),wrapAudioBufferCopyChannelMethodsOutOfBounds=createWrapAudioBufferCopyChannelMethodsOutOfBounds(convertNumberToUnsignedLong),audioBufferConstructor=createAudioBufferConstructor(audioBufferStore,cacheTestResult,createNotSupportedError,nativeAudioBufferConstructor,nativeOfflineAudioContextConstructor,createTestAudioBufferConstructorSupport(nativeAudioBufferConstructor),wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),addSilentConnection=createAddSilentConnection(createNativeGainNode),renderInputsOfAudioParam=createRenderInputsOfAudioParam(getAudioNodeRenderer,getAudioParamConnections,isPartOfACycle),connectAudioParam=createConnectAudioParam(renderInputsOfAudioParam),createNativeAudioBufferSourceNode=createNativeAudioBufferSourceNodeFactory(addSilentConnection,cacheTestResult,testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport,testAudioBufferSourceNodeStartMethodOffsetClampingSupport,testAudioBufferSourceNodeStopMethodNullifiedBufferSupport,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioBufferSourceNodeStartMethodOffsetClamping,createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer(overwriteAccessors),wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),renderAutomation=createRenderAutomation(createGetAudioParamRenderer(getAudioParamConnections),renderInputsOfAudioParam),createAudioBufferSourceNodeRenderer=createAudioBufferSourceNodeRendererFactory(connectAudioParam,createNativeAudioBufferSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),createAudioParam=createAudioParamFactory(createAddAudioParamConnections(AUDIO_PARAM_CONNECTIONS_STORE),audioParamAudioNodeStore,AUDIO_PARAM_STORE,createAudioParamRenderer,createCancelAndHoldAutomationEvent,createCancelScheduledValuesAutomationEvent,createExponentialRampToValueAutomationEvent,createLinearRampToValueAutomationEvent,createSetTargetAutomationEvent,createSetValueAutomationEvent,createSetValueCurveAutomationEvent,nativeAudioContextConstructor,setValueAtTimeUntilPossible),audioBufferSourceNodeConstructor=createAudioBufferSourceNodeConstructor(audioNodeConstructor,createAudioBufferSourceNodeRenderer,createAudioParam,createInvalidStateError,createNativeAudioBufferSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),audioDestinationNodeConstructor=createAudioDestinationNodeConstructor(audioNodeConstructor,createAudioDestinationNodeRenderer,createIndexSizeError,createInvalidStateError,createNativeAudioDestinationNodeFactory(createNativeGainNode,overwriteAccessors),getNativeContext,isNativeOfflineAudioContext,renderInputsOfAudioNode),createBiquadFilterNodeRenderer=createBiquadFilterNodeRendererFactory(connectAudioParam,createNativeBiquadFilterNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),setAudioNodeTailTime=createSetAudioNodeTailTime(audioNodeTailTimeStore),biquadFilterNodeConstructor=createBiquadFilterNodeConstructor(audioNodeConstructor,createAudioParam,createBiquadFilterNodeRenderer,createInvalidAccessError,createNativeBiquadFilterNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),monitorConnections=createMonitorConnections(insertElementInSet,isNativeAudioNode),wrapChannelMergerNode=createWrapChannelMergerNode(createInvalidStateError,monitorConnections),createNativeChannelMergerNode=createNativeChannelMergerNodeFactory(nativeAudioContextConstructor,wrapChannelMergerNode),createChannelMergerNodeRenderer=createChannelMergerNodeRendererFactory(createNativeChannelMergerNode,getNativeAudioNode,renderInputsOfAudioNode),channelMergerNodeConstructor=createChannelMergerNodeConstructor(audioNodeConstructor,createChannelMergerNodeRenderer,createNativeChannelMergerNode,getNativeContext,isNativeOfflineAudioContext),createChannelSplitterNodeRenderer=createChannelSplitterNodeRendererFactory(createNativeChannelSplitterNode,getNativeAudioNode,renderInputsOfAudioNode),channelSplitterNodeConstructor=createChannelSplitterNodeConstructor(audioNodeConstructor,createChannelSplitterNodeRenderer,createNativeChannelSplitterNode,getNativeContext,isNativeOfflineAudioContext,sanitizeChannelSplitterOptions),createNativeConstantSourceNodeFaker=createNativeConstantSourceNodeFakerFactory(addSilentConnection,createNativeAudioBufferSourceNode,createNativeGainNode,monitorConnections),createNativeConstantSourceNode=createNativeConstantSourceNodeFactory(addSilentConnection,cacheTestResult,createNativeConstantSourceNodeFaker,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport),createConstantSourceNodeRenderer=createConstantSourceNodeRendererFactory(connectAudioParam,createNativeConstantSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),constantSourceNodeConstructor=createConstantSourceNodeConstructor(audioNodeConstructor,createAudioParam,createConstantSourceNodeRenderer,createNativeConstantSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createNativeConvolverNode=createNativeConvolverNodeFactory(createNotSupportedError,overwriteAccessors),createConvolverNodeRenderer=createConvolverNodeRendererFactory(createNativeConvolverNode,getNativeAudioNode,renderInputsOfAudioNode),convolverNodeConstructor=createConvolverNodeConstructor(audioNodeConstructor,createConvolverNodeRenderer,createNativeConvolverNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createDelayNodeRenderer=createDelayNodeRendererFactory(connectAudioParam,createNativeDelayNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),delayNodeConstructor=createDelayNodeConstructor(audioNodeConstructor,createAudioParam,createDelayNodeRenderer,createNativeDelayNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativeDynamicsCompressorNode=createNativeDynamicsCompressorNodeFactory(createNotSupportedError),createDynamicsCompressorNodeRenderer=createDynamicsCompressorNodeRendererFactory(connectAudioParam,createNativeDynamicsCompressorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),dynamicsCompressorNodeConstructor=createDynamicsCompressorNodeConstructor(audioNodeConstructor,createAudioParam,createDynamicsCompressorNodeRenderer,createNativeDynamicsCompressorNode,createNotSupportedError,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createGainNodeRenderer=createGainNodeRendererFactory(connectAudioParam,createNativeGainNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),gainNodeConstructor=createGainNodeConstructor(audioNodeConstructor,createAudioParam,createGainNodeRenderer,createNativeGainNode,getNativeContext,isNativeOfflineAudioContext),createNativeIIRFilterNodeFaker=createNativeIIRFilterNodeFakerFactory(createInvalidAccessError,createInvalidStateError,createNativeScriptProcessorNode,createNotSupportedError),renderNativeOfflineAudioContext=createRenderNativeOfflineAudioContext(cacheTestResult,createNativeGainNode,createNativeScriptProcessorNode,createTestOfflineAudioContextCurrentTimeSupport(createNativeGainNode,nativeOfflineAudioContextConstructor)),createIIRFilterNodeRenderer=createIIRFilterNodeRendererFactory(createNativeAudioBufferSourceNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderInputsOfAudioNode,renderNativeOfflineAudioContext),createNativeIIRFilterNode=createNativeIIRFilterNodeFactory(createNativeIIRFilterNodeFaker),iIRFilterNodeConstructor=createIIRFilterNodeConstructor(audioNodeConstructor,createNativeIIRFilterNode,createIIRFilterNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createAudioListener=createAudioListenerFactory(createAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeScriptProcessorNode,createNotSupportedError,getFirstSample,isNativeOfflineAudioContext,overwriteAccessors),unrenderedAudioWorkletNodeStore=new WeakMap,minimalBaseAudioContextConstructor=createMinimalBaseAudioContextConstructor(audioDestinationNodeConstructor,createAudioListener,eventTargetConstructor,isNativeOfflineAudioContext,unrenderedAudioWorkletNodeStore,wrapEventListener),createNativeOscillatorNode=createNativeOscillatorNodeFactory(addSilentConnection,cacheTestResult,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),createOscillatorNodeRenderer=createOscillatorNodeRendererFactory(connectAudioParam,createNativeOscillatorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),oscillatorNodeConstructor=createOscillatorNodeConstructor(audioNodeConstructor,createAudioParam,createNativeOscillatorNode,createOscillatorNodeRenderer,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createConnectedNativeAudioBufferSourceNode=createConnectedNativeAudioBufferSourceNodeFactory(createNativeAudioBufferSourceNode),createNativeWaveShaperNodeFaker=createNativeWaveShaperNodeFakerFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeGainNode,isDCCurve,monitorConnections),createNativeWaveShaperNode=createNativeWaveShaperNodeFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeWaveShaperNodeFaker,isDCCurve,monitorConnections,nativeAudioContextConstructor,overwriteAccessors),createNativePannerNodeFaker=createNativePannerNodeFakerFactory(connectNativeAudioNodeToNativeAudioNode,createInvalidStateError,createNativeChannelMergerNode,createNativeGainNode,createNativeScriptProcessorNode,createNativeWaveShaperNode,createNotSupportedError,disconnectNativeAudioNodeFromNativeAudioNode,getFirstSample,monitorConnections),createNativePannerNode=createNativePannerNodeFactory(createNativePannerNodeFaker),createPannerNodeRenderer=createPannerNodeRendererFactory(connectAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeGainNode,createNativePannerNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),pannerNodeConstructor=createPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativePannerNode,createPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativePeriodicWave=createNativePeriodicWaveFactory(createIndexSizeError),periodicWaveC
637onstructor=createPeriodicWaveConstructor(createNativePeriodicWave,getNativeContext,new WeakSet,sanitizePeriodicWaveOptions),nativeStereoPannerNodeFakerFactory=createNativeStereoPannerNodeFakerFactory(createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeGainNode,createNativeWaveShaperNode,createNotSupportedError,monitorConnections),createNativeStereoPannerNode=createNativeStereoPannerNodeFactory(nativeStereoPannerNodeFakerFactory,createNotSupportedError),createStereoPannerNodeRenderer=createStereoPannerNodeRendererFactory(connectAudioParam,createNativeStereoPannerNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),stereoPannerNodeConstructor=createStereoPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativeStereoPannerNode,createStereoPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext),createWaveShaperNodeRenderer=createWaveShaperNodeRendererFactory(createNativeWaveShaperNode,getNativeAudioNode,renderInputsOfAudioNode),waveShaperNodeConstructor=createWaveShaperNodeConstructor(audioNodeConstructor,createInvalidStateError,createNativeWaveShaperNode,createWaveShaperNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),isSecureContext=createIsSecureContext(window$1),exposeCurrentFrameAndCurrentTime=createExposeCurrentFrameAndCurrentTime(window$1),backupOfflineAudioContextStore=new WeakMap,getOrCreateBackupOfflineAudioContext=createGetOrCreateBackupOfflineAudioContext(backupOfflineAudioContextStore,nativeOfflineAudioContextConstructor),addAudioWorkletModule=isSecureContext?createAddAudioWorkletModule(cacheTestResult,createNotSupportedError,createEvaluateSource(window$1),exposeCurrentFrameAndCurrentTime,createFetchSource(createAbortError),getNativeContext,getOrCreateBackupOfflineAudioContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,new WeakMap,new WeakMap,createTestAudioWorkletProcessorPostMessageSupport(nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor),window$1):void 0,isNativeContext=createIsNativeContext(isNativeAudioContext,isNativeOfflineAudioContext),decodeAudioData=createDecodeAudioData(audioBufferStore,cacheTestResult,createDataCloneError,createEncodingError,new WeakSet,getNativeContext,isNativeContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,testPromiseSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),baseAudioContextConstructor=createBaseAudioContextConstructor(addAudioWorkletModule,analyserNodeConstructor,audioBufferConstructor,audioBufferSourceNodeConstructor,biquadFilterNodeConstructor,channelMergerNodeConstructor,channelSplitterNodeConstructor,constantSourceNodeConstructor,convolverNodeConstructor,decodeAudioData,delayNodeConstructor,dynamicsCompressorNodeConstructor,gainNodeConstructor,iIRFilterNodeConstructor,minimalBaseAudioContextConstructor,oscillatorNodeConstructor,pannerNodeConstructor,periodicWaveConstructor,stereoPannerNodeConstructor,waveShaperNodeConstructor),getUnrenderedAudioWorkletNodes=createGetUnrenderedAudioWorkletNodes(unrenderedAudioWorkletNodeStore),createNativeOfflineAudioContext=createCreateNativeOfflineAudioContext(createNotSupportedError,nativeOfflineAudioContextConstructor),startRendering=createStartRendering(audioBufferStore,cacheTestResult,getAudioNodeRenderer,getUnrenderedAudioWorkletNodes,renderNativeOfflineAudioContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),offlineAudioContextConstructor=createOfflineAudioContextConstructor(baseAudioContextConstructor,cacheTestResult,createInvalidStateError,createNativeOfflineAudioContext,startRendering),render=(r0,e0,n0)=>{const a0=new offlineAudioContextConstructor(r0.numberOfChannels,Math.round(n0*r0.sampleRate),r0.sampleRate),i0=a0.createBiquadFilter(),s0=a0.createBufferSource();return i0.frequency.value=240,i0.type="lowpass",s0.buffer=r0,s0.connect(i0).connect(a0.destination),s0.start(0,e0,n0),a0.startRendering().then(o0=>{const l0=o0.getChannelData(0),c0=o0.sampleRate;return{channelData:l0,sampleRate:c0}})},wrap=createBroker({analyze:({call:r0})=>async(...e0)=>{var n0;const[a0,i0,s0]=e0,o0=typeof i0=="number"?i0:0,l0=typeof s0=="number"?s0:a0.duration-o0,{channelData:c0,sampleRate:u0}=await render(a0,o0,l0),d0=typeof i0=="object"?i0:typeof s0=="object"?s0:(n0=e0[3])!==null&&n0!==void 0?n0:null;return r0("analyze",{channelData:c0,sampleRate:u0,...d0===null?d0:{tempoSettings:d0}},[c0.buffer])},guess:({call:r0})=>async(...e0)=>{var n0;const[a0,i0,s0]=e0,o0=typeof i0=="number"?i0:0,l0=typeof s0=="number"?s0:a0.duration-o0,{channelData:c0,sampleRate:u0}=await render(a0,o0,l0),d0=typeof i0=="object"?i0:typeof s0=="object"?s0:(n0=e0[3])!==null&&n0!==void 0?n0:null;return r0("guess",{channelData:c0,sampleRate:u0,...d0===null?d0:{tempoSettings:d0}},[c0.buffer])}}),load=r0=>{const e0=new Worker(r0);return wrap(e0)},createLoadOrReturnBroker=(r0,e0)=>{let n0=null;return()=>{if(n0!==null)return n0;const a0=new Blob([e0],{type:"application/javascript; charset=utf-8"}),i0=URL.createObjectURL(a0);return n0=r0(i0),setTimeout(()=>URL.revokeObjectURL(i0)),n0}},worker=`(()=>{var e={455(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,s=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<s?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*s);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,c=r(i),u=a(c,i),l=t(u);e.addUniqueNumber=l,e.generateUniqueNumber=u}(t)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";const e=-32603,t=-32602,n=-32601,o=(e,t)=>Object.assign(new Error(e),{status:t}),s=t=>o('The handler of the method called "'.concat(t,'" returned an unexpected result.'),e),a=(t,r)=>async({data:{id:a,method:i,params:c}})=>{const u=r[i];try{if(void 0===u)throw(e=>o('The requested method called "'.concat(e,'" is not supported.'),n))(i);const r=void 0===c?u():u(c);if(void 0===r)throw(t=>o('The handler of the method called "'.concat(t,'" returned no required result.'),e))(i);const l=r instanceof Promise?await r:r;if(null===a){if(void 0!==l.result)throw s(i)}else{if(void 0===l.result)throw s(i);const{result:e,transferables:r=[]}=l;t.postMessage({id:a,result:e},r)}}catch(e){const{message:r,status:n=-32603}=e;t.postMessage({error:{code:n,message:r},id:a})}};var i=r(455);const c=new Map,u=(e,r,n)=>({...r,connect:({port:t})=>{t.start();const n=e(t,r),o=(0,i.generateUniqueNumber)(c);return c.set(o,()=>{n(),t.close(),c.delete(o)}),{result:o}},disconnect:({portId:e})=>{const r=c.get(e);if(void 0===r)throw(e=>o('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),t))(e);return r(),{result:null}},isSupported:async()=>
637{if(await new Promise(e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])})){const e=n();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),l=(e,t,r=()=>!0)=>{const n=u(l,t,r),o=a(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)},h=(e,t,r)=>{const n=e.length,o=[];let s=!1;for(let a=0;a<n;a+=1)e[a]>t?s=!0:s&&(s=!1,o.push(a-1),a+=r/4-1);return s&&o.push(n-1),o},d=(e,t,r)=>{const n=(e=>{let t=0;const r=e.length;for(let n=0;n<r;n+=1)e[n]>t&&(t=e[n]);return t})(e),o=.3*n;let s=[],a=n-.05*n;if(n>.25)for(;s.length<30&&a>=o;)s=h(e,a,t),a-=.05*n;const i=(e=>{const t=[];return e.forEach((r,n)=>{const o=Math.min(e.length-n,10);for(let s=1;s<o;s+=1){const o=e[n+s]-r;t.some(e=>e.interval===o&&(e.peaks.push(r),!0))||t.push({interval:o,peaks:[r]})}}),t})(s),c=((e,t,r={})=>{var n,o;const s=Math.max(0,null!==(n=r.maxTempo)&&void 0!==n?n:180),a=Math.max(0,null!==(o=r.minTempo)&&void 0!==o?o:90),i=[];return e.forEach(e=>{let r=60/(e.interval/t);for(;r<a;)r*=2;for(;r>s;)r/=2;if(r<a)return;let n=!1,o=e.peaks.length;i.forEach(t=>{if(t.tempo===r&&(t.score+=e.peaks.length,t.peaks=[...t.peaks,...e.peaks],n=!0),t.tempo>r-.5&&t.tempo<r+.5){const n=2*Math.abs(t.tempo-r);o+=(1-n)*t.peaks.length,t.score+=(1-n)*e.peaks.length}}),n||i.push({peaks:e.peaks,score:o,tempo:r})}),i})(i,t,r);return c.sort((e,t)=>t.score-e.score),c},p=(e,t,r)=>{const n=d(e,t,r);if(0===n.length)throw new Error("The given channelData does not contain any detectable beats.");return n[0].tempo},f=(e,t,r)=>{const n=d(e,t,r);if(0===n.length)throw new Error("The given channelData does not contain any detectable beats.");const{peaks:o,tempo:s}=n[0],a=Math.round(s),i=60/a;o.sort((e,t)=>e-t);let c=o[0]/t;for(;c>i;)c-=i;return{bpm:a,offset:c,tempo:s}};l(self,{analyze:({channelData:e,sampleRate:t,tempoSettings:r})=>({result:p(e,t,r)}),guess:({channelData:e,sampleRate:t,tempoSettings:r})=>({result:f(e,t,r)})})})()})();`,loadOrReturnBroker=createLoadOrReturnBroker(load,worker),analyze=(...r0)=>loadOrReturnBroker().analyze(...r0),module$1=Object.freeze(Object.defineProperty({__proto__:null,analyze},Symbol.toStringTag,{value:"Module"}));var lib$3={},browser$3={exports:{}},ms$1,hasRequiredMs;function requireMs(){if(hasRequiredMs)return ms$1;hasRequiredMs=1;var r0=1e3,e0=r0*60,n0=e0*60,a0=n0*24,i0=a0*7,s0=a0*365.25;ms$1=function(d0,h0){h0=h0||{};var f0=typeof d0;if(f0==="string"&&d0.length>0)return o0(d0);if(f0==="number"&&isFinite(d0))return h0.long?c0(d0):l0(d0);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d0))};function o0(d0){if(d0=String(d0),!(d0.length>100)){var h0=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d0);if(h0){var f0=parseFloat(h0[1]),p0=(h0[2]||"ms").toLowerCase();switch(p0){case"years":case"year":case"yrs":case"yr":case"y":return f0*s0;case"weeks":case"week":case"w":return f0*i0;case"days":case"day":case"d":return f0*a0;case"hours":case"hour":case"hrs":case"hr":case"h":return f0*n0;case"minutes":case"minute":case"mins":case"min":case"m":return f0*e0;case"seconds":case"second":case"secs":case"sec":case"s":return f0*r0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f0;default:return}}}}function l0(d0){var h0=Math.abs(d0);return h0>=a0?Math.round(d0/a0)+"d":h0>=n0?Math.round(d0/n0)+"h":h0>=e0?Math.round(d0/e0)+"m":h0>=r0?Math.round(d0/r0)+"s":d0+"ms"}function c0(d0){var h0=Math.abs(d0);return h0>=a0?u0(d0,h0,a0,"day"):h0>=n0?u0(d0,h0,n0,"hour"):h0>=e0?u0(d0,h0,e0,"minute"):h0>=r0?u0(d0,h0,r0,"second"):d0+" ms"}function u0(d0,h0,f0,p0){var A0=h0>=f0*1.5;return Math.round(d0/f0)+" "+p0+(A0?"s":"")}return ms$1}function setup(r0){n0.debug=n0,n0.default=n0,n0.coerce=c0,n0.disable=o0,n0.enable=i0,n0.enabled=l0,n0.humanize=requireMs(),n0.destroy=u0,Object.keys(r0).forEach(d0=>{n0[d0]=r0[d0]}),n0.names=[],n0.skips=[],n0.formatters={};function e0(d0){let h0=0;for(let f0=0;f0<d0.length;f0++)h0=(h0<<5)-h0+d0.charCodeAt(f0),h0|=0;return n0.colors[Math.abs(h0)%n0.colors.length]}n0.selectColor=e0;function n0(d0){let h0,f0=null,p0,A0;function m0(...x0){if(!m0.enabled)return;const g0=m0,y0=Number(new Date),b0=y0-(h0||y0);g0.diff=b0,g0.prev=h0,g0.curr=y0,h0=y0,x0[0]=n0.coerce(x0[0]),typeof x0[0]!="str
637ing"&&x0.unshift("%O");let E0=0;x0[0]=x0[0].replace(/%([a-zA-Z%])/g,(v0,S0)=>{if(v0==="%%")return"%";E0++;const k0=n0.formatters[S0];if(typeof k0=="function"){const R0=x0[E0];v0=k0.call(g0,R0),x0.splice(E0,1),E0--}return v0}),n0.formatArgs.call(g0,x0),(g0.log||n0.log).apply(g0,x0)}return m0.namespace=d0,m0.useColors=n0.useColors(),m0.color=n0.selectColor(d0),m0.extend=a0,m0.destroy=n0.destroy,Object.defineProperty(m0,"enabled",{enumerable:!0,configurable:!1,get:()=>f0!==null?f0:(p0!==n0.namespaces&&(p0=n0.namespaces,A0=n0.enabled(d0)),A0),set:x0=>{f0=x0}}),typeof n0.init=="function"&&n0.init(m0),m0}function a0(d0,h0){const f0=n0(this.namespace+(typeof h0>"u"?":":h0)+d0);return f0.log=this.log,f0}function i0(d0){n0.save(d0),n0.namespaces=d0,n0.names=[],n0.skips=[];const h0=(typeof d0=="string"?d0:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const f0 of h0)f0[0]==="-"?n0.skips.push(f0.slice(1)):n0.names.push(f0)}function s0(d0,h0){let f0=0,p0=0,A0=-1,m0=0;for(;f0<d0.length;)if(p0<h0.length&&(h0[p0]===d0[f0]||h0[p0]==="*"))h0[p0]==="*"?(A0=p0,m0=f0,p0++):(f0++,p0++);else if(A0!==-1)p0=A0+1,m0++,f0=m0;else return!1;for(;p0<h0.length&&h0[p0]==="*";)p0++;return p0===h0.length}function o0(){const d0=[...n0.names,...n0.skips.map(h0=>"-"+h0)].join(",");return n0.enable(""),d0}function l0(d0){for(const h0 of n0.skips)if(s0(d0,h0))return!1;for(const h0 of n0.names)if(s0(d0,h0))return!0;return!1}function c0(d0){return d0 instanceof Error?d0.stack||d0.message:d0}function u0(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n0.enable(n0.load()),n0}var common$3=setup;(function(r0,e0){var n0={};e0.formatArgs=i0,e0.save=s0,e0.load=o0,e0.useColors=a0,e0.storage=l0(),e0.destroy=(()=>{let u0=!1;return()=>{u0||(u0=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e0.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function a0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let u0;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(u0=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(u0[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i0(u0){if(u0[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u0[0]+(this.useColors?"%c ":" ")+"+"+r0.exports.humanize(this.diff),!this.useColors)return;const d0="color: "+this.color;u0.splice(1,0,d0,"color: inherit");let h0=0,f0=0;u0[0].replace(/%[a-zA-Z%]/g,p0=>{p0!=="%%"&&(h0++,p0==="%c"&&(f0=h0))}),u0.splice(f0,0,d0)}e0.log=console.debug||console.log||(()=>{});function s0(u0){try{u0?e0.storage.setItem("debug",u0):e0.storage.removeItem("debug")}catch{}}function o0(){let u0;try{u0=e0.storage.getItem("debug")||e0.storage.getItem("DEBUG")}catch{}return!u0&&typeof process<"u"&&"env"in process&&(u0=n0.DEBUG),u0}function l0(){try{return localStorage}catch{}}r0.exports=common$3(e0);const{formatters:c0}=r0.exports;c0.j=function(u0){try{return JSON.stringify(u0)}catch(d0){return"[UnexpectedJSONParseError]: "+d0.message}}})(browser$3,browser$3.exports);
637var browserExports$2=browser$3.exports,core$2={},core$1={},ReadStreamTokenizer$1={},AbstractTokenizer$1={},lib$2={},EndOfFileStream={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.EndOfStreamError=r0.defaultMessages=void 0,r0.defaultMessages="End-Of-Stream";class e0 extends Error{constructor(){super(r0.defaultMessages)}}r0.EndOfStreamError=e0})(EndOfFileStream);var StreamReader$1={},Deferred$1={};Object.defineProperty(Deferred$1,"__esModule",{value:!0});Deferred$1.Deferred=void 0;class Deferred{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e0,n0)=>{this.reject=n0,this.resolve=e0})}}Deferred$1.Deferred=Deferred;(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.StreamReader=r0.EndOfStreamError=void 0;const e0=EndOfFileStream,n0=Deferred$1;var a0=EndOfFileStream;Object.defineProperty(r0,"EndOfStreamError",{enumerable:!0,get:function(){return a0.EndOfStreamError}});const i0=1*1024*1024;class s0{constructor(l0){if(this.s=l0,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!l0.read||!l0.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>this.reject(new e0.EndOfStreamError)),this.s.once("error",c0=>this.reject(c0)),this.s.once("close",()=>this.reject(new Error("Stream closed")))}async peek(l0,c0,u0){const d0=await this.read(l0,c0,u0);return this.peekQueue.push(l0.subarray(c0,c0+d0)),d0}async read(l0,c0,u0){if(u0===0)return 0;if(this.peekQueue.length===0&&this.endOfStream)throw new e0.EndOfStreamError;let d0=u0,h0=0;for(;this.peekQueue.length>0&&d0>0;){const f0=this.peekQueue.pop();if(!f0)throw new Error("peekData should be defined");const p0=Math.min(f0.length,d0);l0.set(f0.subarray(0,p0),c0+h0),h0+=p0,d0-=p0,p0<f0.length&&this.peekQueue.push(f0.subarray(p0))}for(;d0>0&&!this.endOfStream;){const f0=Math.min(d0,i0),p0=await this.readFromStream(l0,c0+h0,f0);if(h0+=p0,p0<f0)break;d0-=p0}return h0}async readFromStream(l0,c0,u0){const d0=this.s.read(u0);if(d0)return l0.set(d0,c0),d0.length;{const h0={buffer:l0,offset:c0,length:u0,deferred:new n0.Deferred};return this.deferred=h0.deferred,this.s.once("readable",()=>{this.readDeferred(h0)}),h0.deferred.promise}}readDeferred(l0){const c0=this.s.read(l0.length);c0?(l0.buffer.set(c0,l0.offset),l0.deferred.resolve(c0.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(l0)})}reject(l0){this.endOfStream=!0,this.deferred&&(this.deferred.reject(l0),this.deferred=null)}}r0.StreamReader=s0})(StreamReader$1);(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.StreamReader=r0.EndOfStreamError=void 0;var e0=EndOfFileStream;Object.defineProperty(r0,"EndOfStreamError",{enumerable:!0,get:function(){return e0.EndOfStreamError}});var n0=StreamReader$1;Object.defineProperty(r0,"StreamReader",{enumerable:!0,get:function(){return n0.StreamReader}})})(lib$2);Object.defineProperty(AbstractTokenizer$1,"__esModule",{value:!0});AbstractTokenizer$1.AbstractTokenizer=void 0;const peek_readable_1$2=lib$2;class AbstractTokenizer{constructor(e0){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e0||{}}async readToken(e0,n0=this.position){const a0=Buffer.alloc(e0.len);if(await this.readBuffer(a0,{position:n0})<e0.len)throw new peek_readable_1$2.EndOfStreamError;return e0.get(a0,0)}async peekToken(e0,n0=this.position){const a0=Buffer.alloc(e0.len);if(await this.peekBuffer(a0,{position:n0})<e0.len)throw new peek_readable_1$2.EndOfStreamError;return e0.get(a0,0)}async readNumber(e0){if(await this.readBuffer(this.numBuffer,{length:e0.len})<e0.len)throw new peek_readable_1$2.EndOfStreamError;return e0.get(this.numBuffer,0)}async peekNumber(e0){if(await this.peekBuffer(this.numBuffer,{length:e0.len})<e0.len)throw new peek_readable_1$2.EndOfStreamError;return e0.get(this.numBuffer,0)}async ignore(e0){if(this.fileInfo.size!==void 0){const n0=this.fileInfo.size-this.position;if(e0>n0)return this.position+=n0,n0}return this.position+=e0,e0}async close(){}normalizeOptions(e0,n0){if(n0&&n0.position!==void 0&&n0.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return n0?{mayBeLess:n0.mayBeLess===!0,offset:n0.offset?n0.offset:0,length:n0.length?n0.length:e0.length-(n0.offset?n0.offset:0),position:n0.position?n0.position:this.position}:{mayBeLess:!1,offset:0,length:e0.length,position:this.position}}}AbstractTokenizer$1.AbstractTokenizer=AbstractTokenizer;Object.defineProperty(ReadStreamTokenizer$1,"__esModule",{value:!0});ReadStreamTokenizer$1.ReadStreamTokenizer=void 0;const AbstractTokenizer_1$1=AbstractTokenizer$1,peek_readable_1$1=lib$2,maxBufferSize=256e3;class ReadStreamTokenizer extends AbstractTokenizer_1$1.AbstractTokenizer{constructor(e0,n0){super(n0),this.streamReader=new peek_readable_1$1.StreamReader(e0)}async getFileInfo(){return this.fileInfo}async readBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0),i0=a0.position-this.position;if(i0>0)return await this.ignore(i0),this.readBuffer(e0,n0);if(i0<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(a0.length===0)return 0;const s0=await this.streamReader.read(e0,a0.offset,a0.length);if(this.position+=s0,(!n0||!n0.mayBeLess)&&s0<a0.length)throw new peek_readable_1$1.EndOfStreamError;return s0}async peekBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0);let i0=0;if(a0.position){const s0=a0.position-this.position;if(s0>0){const o0=new Uint8Array(a0.length+s0);return i0=await this.peekBuffer(o0,{mayBeLess:a0.mayBeLess}),e0.set(o0.subarray(s0),a0.offset),i0-s0}else if(s0<0)throw new Error("Cannot peek from a negative offset in a stream")}if(a0.length>0){try{i0=await this.streamReader.peek(e0,a0.offset,a0.length)}catch(s0){if(n0&&n0.mayBeLess&&s0 instanceof peek_readable_1$1.EndOfStreamError)return 0;throw s0}if(!a0.mayBeLess&&i0<a0.length)throw new peek_readable_1$1.EndOfStreamError}return i0}async ignore(e0){const n0=Math.min(maxBufferSize,e0),a0=new Uint8Array(n0);let i0=0;for(;i0<e0;){const s0=e0-i0,o0=await this.readBuffer(a0,{length:Math.min(n0,s0)});if(o0<0)return o0;i0+=o0}return i0}}ReadStreamTokenizer$1.ReadStreamTokenizer=ReadStreamTokenizer;var BufferTokenizer$1={};Object.defineProperty(BufferTokenizer$1,"__esModule",{value:!0});BufferTokenizer$1.BufferTokenizer=void 0;const peek_readable_1=lib$2,AbstractTokenizer_1=AbstractTokenizer$1;class BufferTokenizer extends AbstractTokenizer_1.AbstractTokenizer{constructor(e0,n0){super(n0),this.uint8Array=e0,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e0.length}async readBuffer(e0,n0){if(n0&&n0.position){if(n0.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=n0.position}const a0=await this.peekBuffer(e0,n0);return this.position+=a0,a0}async peekBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0),i0=Math.min(this.uint8Array.length-a0.position,a0.length);if(!a0.mayBeLess&&i0<a0.length)throw new peek_readable_1.EndOfStreamError;return e0.set(this.uint8Array.subarray(a0.position,a0.position+i0),a0.offset),i0}
637async close(){}}BufferTokenizer$1.BufferTokenizer=BufferTokenizer;(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.fromBuffer=r0.fromStream=r0.EndOfStreamError=void 0;const e0=ReadStreamTokenizer$1,n0=BufferTokenizer$1;var a0=lib$2;Object.defineProperty(r0,"EndOfStreamError",{enumerable:!0,get:function(){return a0.EndOfStreamError}});function i0(o0,l0){return l0=l0||{},new e0.ReadStreamTokenizer(o0,l0)}r0.fromStream=i0;function s0(o0,l0){return new n0.BufferTokenizer(o0,l0)}r0.fromBuffer=s0})(core$1);var ParserFactory$1={},lib$1={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.AnsiStringType=r0.StringType=r0.BufferType=r0.Uint8ArrayType=r0.IgnoreType=r0.Float80_LE=r0.Float80_BE=r0.Float64_LE=r0.Float64_BE=r0.Float32_LE=r0.Float32_BE=r0.Float16_LE=r0.Float16_BE=r0.INT64_BE=r0.UINT64_BE=r0.INT64_LE=r0.UINT64_LE=r0.INT32_LE=r0.INT32_BE=r0.INT24_BE=r0.INT24_LE=r0.INT16_LE=r0.INT16_BE=r0.INT8=r0.UINT32_BE=r0.UINT32_LE=r0.UINT24_BE=r0.UINT24_LE=r0.UINT16_BE=r0.UINT16_LE=r0.UINT8=void 0;const e0=ieee754;function n0(c0){return new DataView(c0.buffer,c0.byteOffset)}r0.UINT8={len:1,get(c0,u0){return n0(c0).getUint8(u0)},put(c0,u0,d0){return n0(c0).setUint8(u0,d0),u0+1}},r0.UINT16_LE={len:2,get(c0,u0){return n0(c0).getUint16(u0,!0)},put(c0,u0,d0){return n0(c0).setUint16(u0,d0,!0),u0+2}},r0.UINT16_BE={len:2,get(c0,u0){return n0(c0).getUint16(u0)},put(c0,u0,d0){return n0(c0).setUint16(u0,d0),u0+2}},r0.UINT24_LE={len:3,get(c0,u0){const d0=n0(c0);return d0.getUint8(u0)+(d0.getUint16(u0+1,!0)<<8)},put(c0,u0,d0){const h0=n0(c0);return h0.setUint8(u0,d0&255),h0.setUint16(u0+1,d0>>8,!0),u0+3}},r0.UINT24_BE={len:3,get(c0,u0){const d0=n0(c0);return(d0.getUint16(u0)<<8)+d0.getUint8(u0+2)},put(c0,u0,d0){const h0=n0(c0);return h0.setUint16(u0,d0>>8),h0.setUint8(u0+2,d0&255),u0+3}},r0.UINT32_LE={len:4,get(c0,u0){return n0(c0).getUint32(u0,!0)},put(c0,u0,d0){return n0(c0).setUint32(u0,d0,!0),u0+4}},r0.UINT32_BE={len:4,get(c0,u0){return n0(c0).getUint32(u0)},put(c0,u0,d0){return n0(c0).setUint32(u0,d0),u0+4}},r0.INT8={len:1,get(c0,u0){return n0(c0).getInt8(u0)},put(c0,u0,d0){return n0(c0).setInt8(u0,d0),u0+1}},r0.INT16_BE={len:2,get(c0,u0){return n0(c0).getInt16(u0)},put(c0,u0,d0){return n0(c0).setInt16(u0,d0),u0+2}},r0.INT16_LE={len:2,get(c0,u0){return n0(c0).getInt16(u0,!0)},put(c0,u0,d0){return n0(c0).setInt16(u0,d0,!0),u0+2}},r0.INT24_LE={len:3,get(c0,u0){const d0=r0.UINT24_LE.get(c0,u0);return d0>8388607?d0-16777216:d0},put(c0,u0,d0){const h0=n0(c0);return h0.setUint8(u0,d0&255),h0.setUint16(u0+1,d0>>8,!0),u0+3}},r0.INT24_BE={len:3,get(c0,u0){const d0=r0.UINT24_BE.get(c0,u0);return d0>8388607?d0-16777216:d0},put(c0,u0,d0){const h0=n0(c0);return h0.setUint16(u0,d0>>8),h0.setUint8(u0+2,d0&255),u0+3}},r0.INT32_BE={len:4,get(c0,u0){return n0(c0).getInt32(u0)},put(c0,u0,d0){return n0(c0).setInt32(u0,d0),u0+4}},r0.INT32_LE={len:4,get(c0,u0){return n0(c0).getInt32(u0,!0)},put(c0,u0,d0){return n0(c0).setInt32(u0,d0,!0),u0+4}},r0.UINT64_LE={len:8,get(c0,u0){return n0(c0).getBigUint64(u0,!0)},put(c0,u0,d0){return n0(c0).setBigUint64(u0,d0,!0),u0+8}},r0.INT64_LE={len:8,get(c0,u0){return n0(c0).getBigInt64(u0,!0)},put(c0,u0,d0){return n0(c0).setBigInt64(u0,d0,!0),u0+8}},r0.UINT64_BE={len:8,get(c0,u0){return n0(c0).getBigUint64(u0)},put(c0,u0,d0){return n0(c0).setBigUint64(u0,d0),u0+8}},r0.INT64_BE={len:8,get(c0,u0){return n0(c0).getBigInt64(u0)},put(c0,u0,d0){return n0(c0).setBigInt64(u0,d0),u0+8}},r0.Float16_BE={len:2,get(c0,u0){return e0.read(c0,u0,!1,10,this.len)},put(c0,u0,d0){return e0.write(c0,d0,u0,!1,10,this.len),u0+this.len}},r0.Float16_LE={len:2,get(c0,u0){return e0.read(c0,u0,!0,10,this.len)},put(c0,u0,d0){return e0.write(c0,d0,u0,!0,10,this.len),u0+this.len}},r0.Float32_BE={len:4,get(c0,u0){return n0(c0).getFloat32(u0)},put(c0,u0,d0){return n0(c0).setFloat32(u0,d0),u0+4}},r0.Float32_LE={len:4,get(c0,u0){return n0(c0).getFloat32(u0,!0)},put(c0,u0,d0){return n0(c0).setFloat32(u0,d0,!0),u0+4}},r0.Float64_BE={len:8,get(c0,u0){return n0(c0).getFloat64(u0)},put(c0,u0,d0){return n0(c0).setFloat64(u0,d0),u0+8}},r0.Float64_LE={len:8,get(c0,u0){return n0(c0).getFloat64(u0,!0)},put(c0,u0,d0){return n0(c0).setFloat64(u0,d0,!0),u0+8}},r0.Float80_BE={len:10,get(c0,u0){return e0.read(c0,u0,!1,63,this.len)},put(c0,u0,d0){return e0.write(c0,d0,u0,!1,63,this.len),u0+this.len}},r0.Float80_LE={len:10,get(c0,u0){return e0.read(c0,u0,!0,63,this.len)},put(c0,u0,d0){return e0.write(c0,d0,u0,!0,63,this.len),u0+this.len}};class a0{constructor(u0){this.len=u0}get(u0,d0){}}r0.IgnoreType=a0;class i0{constructor(u0){this.len=u0}get(u0,d0){return u0.subarray(d0,d0+this.len)}}r0.Uint8ArrayType=i0;class s0{constructor(u0){this.len=u0}get(u0,d0){return Buffer.from(u0.subarray(d0,d0+this.len))}}r0.BufferType=s0;class o0{constructor(u0,d0){this.len=u0,this.encoding=d0}get(u0,d0){return Buffer.from(u0).toString(this.encoding,d0,d0+this.len)}}r0.StringType=o0;class l0{constructor(u0){this.len=u0}static decode(u0,d0,h0){let f0="";for(let p0=d0;p0<h0;++p0)f0+=l0.codePointToString(l0.singleByteDecoder(u0[p0]));return f0}static inRange(u0,d0,h0){return d0<=u0&&u0<=h0}static codePointToString(u0){return u0<=65535?String.fromCharCode(u0):(u0-=65536,String.fromCharCode((u0>>10)+55296,(u0&1023)+56320))}
637static singleByteDecoder(u0){if(l0.inRange(u0,0,127))return u0;const d0=l0.windows1252[u0-128];if(d0===null)throw Error("invaliding encoding");return d0}get(u0,d0=0){return l0.decode(u0,d0,d0+this.len)}}r0.AnsiStringType=l0,l0.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]})(lib$1);var util$c={};util$c.stringToBytes=r0=>[...r0].map(e0=>e0.charCodeAt(0));util$c.tarHeaderChecksumMatches=(r0,e0=0)=>{const n0=parseInt(r0.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(n0))return!1;let a0=8*32;for(let i0=e0;i0<e0+148;i0++)a0+=r0[i0];for(let i0=e0+156;i0<e0+512;i0++)a0+=r0[i0];return n0===a0};util$c.uint32SyncSafeToken={get:(r0,e0)=>r0[e0+3]&127|r0[e0+2]<<7|r0[e0+1]<<14|r0[e0]<<21,len:4};var supported$1={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-p
637anasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]};const Token$s=lib$1,strtok3$5=core$1,{stringToBytes:stringToBytes$1,tarHeaderChecksumMatches,uint32SyncSafeToken}=util$c,supported=supported$1,minimumBytes=4100;async function fromStream(r0){const e0=await strtok3$5.fromStream(r0);try{return await fromTokenizer(e0)}finally{await e0.close()}}async function fromBuffer(r0){if(!(r0 instanceof Uint8Array||r0 instanceof ArrayBuffer||Buffer.isBuffer(r0)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof r0}\``);const e0=r0 instanceof Buffer?r0:Buffer.from(r0);if(!(e0&&e0.length>1))return;const n0=strtok3$5.fromBuffer(e0);return fromTokenizer(n0)}function _check(r0,e0,n0){n0={offset:0,...n0};for(const[a0,i0]of e0.entries())if(n0.mask){if(i0!==(n0.mask[a0]&r0[a0+n0.offset]))return!1}else if(i0!==r0[a0+n0.offset])return!1;return!0}async function fromTokenizer(r0){try{return _fromTokenizer(r0)}catch(e0){if(!(e0 instanceof strtok3$5.EndOfStreamError))throw e0}}async function _fromTokenizer(r0){let e0=Buffer.alloc(minimumBytes);const n0=12,a0=(s0,o0)=>_check(e0,s0,o0),i0=(s0,o0)=>a0(stringToBytes$1(s0),o0);if(r0.fileInfo.size||(r0.fileInfo.size=Number.MAX_SAFE_INTEGER),await r0.peekBuffer(e0,{length:n0,mayBeLess:!0}),a0([66,77]))return{ext:"bmp",mime:"image/bmp"};if(a0([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(a0([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(a0([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(a0([37,33]))return await r0.peekBuffer(e0,{length:24,mayBeLess:!0}),i0("PS-Adobe-",{offset:2})&&i0(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(a0([31,160])||a0([31,157]))return{ext:"Z",mime:"application/x-compress"};if(a0([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(a0([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(a0([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(a0([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(i0("ID3")){await r0.ignore(6);const s0=await r0.readToken(uint32SyncSafeToken);return r0.position+s0>r0.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await r0.ignore(s0),fromTokenizer(r0))}if(i0("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((e0[0]===67||e0[0]===70)&&a0([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(a0([71,73,70]))return{ext:"gif",mime:"image/gif"};if(i0("FLIF"))return{ext:"flif",mime:"image/flif"};if(i0("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(i0("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(i0("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(i0("FORM"))return{ext:"aif",mime:"audio/aiff"};if(i0("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(a0([80,75,3,4])){try{for(;r0.position+30<r0.fileInfo.size;){await r0.readBuffer(e0,{length:30});const s0={compressedSize:e0.readUInt32LE(18),uncompressedSize:e0.readUInt32LE(22),filenameLength:e0.readUInt16LE(26),extraFieldLength:e0.readUInt16LE(28)};if(s0.filename=await r0.readToken(new Token$s.StringType(s0.filenameLength,"utf-8")),await r0.ignore(s0.extraFieldLength),s0.filename==="META-INF/mozilla.rsa")return{ext:"xpi",mime:"application/x-xpinstall"};if(s0.filename.endsWith(".rels")||s0.filename.endsWith(".xml"))switch(s0.filename.split("/")[0]){case"_rels":break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};default:break}if(s0.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(s0.filename.startsWith("3D/")&&s0.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if(s0.filename==="mimetype"&&s0.compressedSize===s0.uncompressedSize)switch(await r0.readToken(new Token$s.StringType(s0.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};default:}if(s0.compressedSize===0){let o0=-1;for(;o0<0&&r0.position<r0.fileInfo.size;)await r0.peekBuffer(e0,{mayBeLess:!0}),o0=e0.indexOf("504B0304",0,"hex"),await r0.ignore(o0>=0?o0:e0.length)}else await r0.ignore(s0.compressedSize)}}catch(s0){if(!(s0 instanceof strtok3$5.EndOfStreamError))throw s0}return{ext:"zip",mime:"application/zip"}}if(i0("OggS")){await r0.ignore(28);const s0=Buffer.alloc(8);return await r0.readBuffer(s0),_check(s0,[79,112,117,115,72,101,97,100]
vendor: 9,772 bytes, line 637
637)?{ext:"opus",mime:"audio/opus"}:_check(s0,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(s0,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(s0,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(s0,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(s0,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(a0([80,75])&&(e0[2]===3||e0[2]===5||e0[2]===7)&&(e0[3]===4||e0[3]===6||e0[3]===8))return{ext:"zip",mime:"application/zip"};if(i0("ftyp",{offset:4})&&e0[8]&96){const s0=e0.toString("binary",8,12).replace("\0"," ").trim();switch(s0){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return s0.startsWith("3g")?s0.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(i0("MThd"))return{ext:"mid",mime:"audio/midi"};if(i0("wOFF")&&(a0([0,1,0,0],{offset:4})||i0("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(i0("wOF2")&&(a0([0,1,0,0],{offset:4})||i0("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(a0([212,195,178,161])||a0([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(i0("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(i0("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(i0("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(a0([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(i0("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(i0("%PDF")){await r0.ignore(1350);const s0=10*1024*1024,o0=Buffer.alloc(Math.min(s0,r0.fileInfo.size));return await r0.readBuffer(o0,{mayBeLess:!0}),o0.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(a0([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(a0([73,73,42,0]))return i0("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:a0([28,0,254,0],{offset:8})||a0([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:a0([8,0,0,0],{offset:4})&&(a0([45,0,254,0],{offset:8})||a0([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(e0=Buffer.alloc(24),await r0.peekBuffer(e0),(a0([16,251,134,1],{offset:4})||a0([8,0,0,0],{offset:4}))&&a0([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(a0([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(i0("MAC "))return{ext:"ape",mime:"audio/ape"};if(a0([26,69,223,163])){async function s0(){const d0=await r0.peekNumber(Token$s.UINT8);let h0=128,f0=0;for(;!(d0&h0)&&h0!==0;)++f0,h0>>=1;const p0=Buffer.alloc(f0+1);return await r0.readBuffer(p0),p0}async function o0(){const d0=await s0(),h0=await s0();h0[0]^=128>>h0.length-1;const f0=Math.min(6,h0.length);return{id:d0.readUIntBE(0,d0.length),len:h0.readUIntBE(h0.length-f0,f0)}}async function l0(d0,h0){for(;h0>0;){const f0=await o0();if(f0.id===17026)return r0.readToken(new Token$s.StringType(f0.len,"utf-8"));await r0.ignore(f0.len),--h0}}const c0=await o0();switch(await l0(1,c0.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(a0([82,73,70,70])){if(a0([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(a0([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(a0([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(i0("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(a0([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(i0("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(i0("MSCF")||i0("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(a0([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(a0([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(a0([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(a0([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(i0("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(i0("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(a0([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(i0("IMPM"))return{ext:"it",mime:"audio/x-it"};if(i0("-lh0-",{offset:2})||i0("-lh1-",{offset:2})||i0("-lh2-",{offset:2})||i0("-lh3-",{offset:2})||i0("-lh4-",{offset:2})||i0("-lh5-",{offset:2})||i0("-lh6-",{offset:2})||i0("-lh7-",{offset:2})||i0("-lzs-",{offset:2})||i0("-lz4-",{offset:2})||i0("-lz5-",{offset:2})||i0("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(a0([0,0,1,186])){if(a0([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(a0([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(i0("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(a0([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(i0("<?xml "))return{ext:"xml",mime:"application/xml"};if(a0([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(a0([82,97,114,33,26,7])&&(e0[6]===0||e0[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(i0("solid "))return{ext:"stl",mime:"model/stl"};if(i0("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(i0("!<arch>"))return await r0.ignore(8),await r0.readToken(new Token$s.StringType(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(a0([137,80,78,71,13,10,26,10])){await r0.ignore(8);async function s0(){return{length:await r0.readToken(Token$s.INT32_BE),type:await r0.readToken(new Token$s.StringType(4,"binary"))}}do{const o0=await s0();if(o0.length<0)return;switch(o0.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await r0.ignore(o0.length+4)}}while(r0.position+8<r0.fileInfo.size);return{ext:"png",mime:"image/png"}}if(a0([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(a0([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(a0([102,114,101,101],{offset:4})||a0([109,100,97,116],{offset:4})||a0([109,111,111,118],{offset:4})||a0([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(a0([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(i0("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(a0([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(a0([48,38,178,117,142,102,207,17,166,217])){async function s0(){const o0=Buffer.alloc(16);return await r0.readBuffer(o0),{id:o0,size:Number(await r0.readToken(Token$s.UINT64_LE))}}for(await r0.ignore(30);r0.position+24<r0.fileInfo.size;){const o0=await s0();let l0=o0.size-24;if(_check(o0.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const c0=Buffer.alloc(16);if(l0-=await r0.readBuffer(c0),_check(c0,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(c0,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await r0.ignore(l0)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(a0([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((a0([126,16,4])||a0([126,24,4]))&&a0([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(a0([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(a0([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await r0.ignore(20),await r0.readToken(new Token$s.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(a0([255,10])||a0([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(a0([0,0,1,186])||a0([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(a0([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(a0([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(a0([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(a0([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await r0.peekBuffer(e0,{length:Math.min(256,r0.fileInfo.size),mayBeLess:!0}),i0("BEGIN:")){if(i0("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(i0("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(i0("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(i0("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(i0("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(a0([4,0,0,0])&&e0.length>=16){const s0=e0.readUInt32LE(12);if(s0>12&&e0.length>=s0+16)try{const o0=e0.slice(16,s0+16).toString();if(JSON.parse(o0).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(a0([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(i0("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(a0([71],{offset:4})&&(a0([71],{offset:192})||a0([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(a0([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};
637if(a0([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(a0([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(a0([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(a0([76,80],{offset:34})&&(a0([0,0,1],{offset:8})||a0([1,0,2],{offset:8})||a0([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(a0([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await r0.peekBuffer(e0,{length:Math.min(512,r0.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(e0))return{ext:"tar",mime:"application/x-tar"};if(a0([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(i0("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(e0.length>=2&&a0([255,224],{offset:0,mask:[255,224]})){if(a0([16],{offset:1,mask:[22]}))return a0([8],{offset:1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(a0([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(a0([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(a0([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream$1=readableStream=>new Promise((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",async()=>{const r0=new stream.PassThrough;let e0;stream.pipeline?e0=stream.pipeline(readableStream,r0,()=>{}):e0=readableStream.pipe(r0);const n0=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const a0=await fromBuffer(n0);r0.fileType=a0}catch(a0){reject(a0)}resolve(e0)})}),fileType={fromStream,fromTokenizer,fromBuffer,stream:stream$1};Object.defineProperty(fileType,"extensions",{get(){return new Set(supported.extensions)}});Object.defineProperty(fileType,"mimeTypes",{get(){return new Set(supported.mimeTypes)}});var core=fileType,contentType={};/*! 638 * content-type 639 * Copyright(c) 2015 Douglas Christopher Wilson 640 * MIT Licensed 641 */var PARAM_REGEXP=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,TEXT_REGEXP=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,TOKEN_REGEXP=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,QESC_REGEXP=/\\([\u000b\u0020-\u00ff])/g,QUOTE_REGEXP=/([\\"])/g,TYPE_REGEXP$1=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;contentType.format=format$3;contentType.parse=parse$2;function format$3(r0){if(!r0||typeof r0!="object")throw new TypeError("argument obj is required");var e0=r0.parameters,n0=r0.type;if(!n0||!TYPE_REGEXP$1.test(n0))throw new TypeError("invalid type");var a0=n0;if(e0&&typeof e0=="object")for(var i0,s0=Object.keys(e0).sort(),o0=0;o0<s0.length;o0++){if(i0=s0[o0],!TOKEN_REGEXP.test(i0))throw new TypeError("invalid parameter name");a0+="; "+i0+"="+qstring(e0[i0])}return a0}function parse$2(r0){if(!r0)throw new TypeError("argument string is required");var e0=typeof r0=="object"?getcontenttype(r0):r0;if(typeof e0!="string")throw new TypeError("argument string is required to be a string");var n0=e0.indexOf(";"),a0=n0!==-1?e0.slice(0,n0).trim():e0.trim();if(!TYPE_REGEXP$1.test(a0))throw new TypeError("invalid media type");var i0=new ContentType$1(a0.toLowerCase());if(n0!==-1){var s0,o0,l0;for(PARAM_REGEXP.lastIndex=n0;o0=PARAM_REGEXP.exec(e0);){if(o0.index!==n0)throw new TypeError("invalid parameter format");n0+=o0[0].length,s0=o0[1].toLowerCase(),l0=o0[2],l0.charCodeAt(0)===34&&(l0=l0.slice(1,-1),l0.indexOf("\\")!==-1&&(l0=l0.replace(QESC_REGEXP,"$1"))),i0.parameters[s0]=l0}if(n0!==e0.length)throw new TypeError("invalid parameter format")}return i0}function getcontenttype(r0){var e0;if(typeof r0.getHeader=="function"?e0=r0.getHeader("content-type"):typeof r0.headers=="object"&&(e0=r0.headers&&r0.headers["content-type"]),typeof e0!="string")throw new TypeError("content-type header is missing from object");return e0}function qstring(r0){var e0=String(r0);if(TOKEN_REGEXP.test(e0))return e0;if(e0.length>0&&!TEXT_REGEXP.test(e0))throw new TypeError("invalid parameter value");return'"'+e0.replace(QUOTE_REGEXP,"\\$1")+'"'}function ContentType$1(r0){this.parameters=Object.create(null),this.type=r0}var mediaTyper={};/*! 642 * media-typer 643 * Copyright(c) 2014-2017 Douglas Christopher Wilson 644 * MIT Licensed 645 */var SUBTYPE_NAME_REGEXP=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,TYPE_NAME_REGEXP=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,TYPE_REGEXP=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;mediaTyper.format=format$2;mediaTyper.parse=parse$1;mediaTyper.test=test;function format$2(r0){if(!r0||typeof r0!="object")throw new TypeError("argument obj is required");var e0=r0.subtype,n0=r0.suffix,a0=r0.type;if(!a0||!TYPE_NAME_REGEXP.test(a0))throw new TypeError("invalid type");if(!e0||!SUBTYPE_NAME_REGEXP.test(e0))throw new TypeError("invalid subtype");var i0=a0+"/"+e0;if(n0){if(!TYPE_NAME_REGEXP.test(n0))throw new TypeError("invalid suffix");i0+="+"+n0}return i0}function test(r0){if(!r0)throw new TypeError("argument string is required");
645if(typeof r0!="string")throw new TypeError("argument string is required to be a string");return TYPE_REGEXP.test(r0.toLowerCase())}function parse$1(r0){if(!r0)throw new TypeError("argument string is required");if(typeof r0!="string")throw new TypeError("argument string is required to be a string");var e0=TYPE_REGEXP.exec(r0.toLowerCase());if(!e0)throw new TypeError("invalid media type");var n0=e0[1],a0=e0[2],i0,s0=a0.lastIndexOf("+");return s0!==-1&&(i0=a0.substr(s0+1),a0=a0.substr(0,s0)),new MediaType(n0,a0,i0)}function MediaType(r0,e0,n0){this.type=r0,this.subtype=e0,this.suffix=n0}var MetadataCollector$1={},type={},types={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.TrackType=r0.TargetType=r0.DataType=void 0,function(e0){e0[e0.string=0]="string",e0[e0.uint=1]="uint",e0[e0.uid=2]="uid",e0[e0.bool=3]="bool",e0[e0.binary=4]="binary",e0[e0.float=5]="float"}(r0.DataType||(r0.DataType={})),function(e0){e0[e0.shot=10]="shot",e0[e0.scene=20]="scene",e0[e0.track=30]="track",e0[e0.part=40]="part",e0[e0.album=50]="album",e0[e0.edition=60]="edition",e0[e0.collection=70]="collection"}(r0.TargetType||(r0.TargetType={})),function(e0){e0[e0.video=1]="video",e0[e0.audio=2]="audio",e0[e0.complex=3]="complex",e0[e0.logo=4]="logo",e0[e0.subtitle=17]="subtitle",e0[e0.button=18]="button",e0[e0.control=32]="control"}(r0.TrackType||(r0.TrackType={}))})(types);(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.TrackType=void 0;var e0=types;Object.defineProperty(r0,"TrackType",{enumerable:!0,get:function(){return e0.TrackType}})})(type);var GenericTagTypes={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.isUnique=r0.isSingleton=r0.commonTags=void 0,r0.commonTags={year:{multiple:!1},track:{multiple:!1},disk:{multiple:!1},title:{multiple:!1},artist:{multiple:!1},artists:{multiple:!0,unique:!0},albumartist:{multiple:!1},album:{multiple:!1},date:{multiple:!1},originaldate:{multiple:!1},originalyear:{multiple:!1},comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:{multiple:!1},subtitle:{multiple:!0},discsubtitle:{multiple:!1},totaltracks:{multiple:!1},totaldiscs:{multiple:!1},compilation:{multiple:!1},rating:{multiple:!0},bpm:{multiple:!1},mood:{multiple:!1},media:{multiple:!1},catalognumber:{multiple:!0,unique:!0},tvShow:{multiple:!1},tvShowSort:{multiple:!1},tvSeason:{multiple:!1},tvEpisode:{multiple:!1},tvEpisodeId:{multiple:!1},tvNetwork:{multiple:!1},podcast:{multiple:!1},podcasturl:{multiple:!1},releasestatus:{multiple:!1},releasetype:{multiple:!0},releasecountry:{multiple:!1},script:{multiple:!1},language:{multiple:!1},copyright:{multiple:!1},license:{multiple:!1},encodedby:{multiple:!1},encodersettings:{multiple:!1},gapless:{multiple:!1},barcode:{multiple:!1},isrc:{multiple:!0},asin:{multiple:!1},musicbrainz_recordingid:{multiple:!1},musicbrainz_trackid:{multiple:!1},musicbrainz_albumid:{multiple:!1},musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:{multiple:!1},musicbrainz_workid:{multiple:!1},musicbrainz_trmid:{multiple:!1},musicbrainz_discid:{multiple:!1},acoustid_id:{multiple:!1},acoustid_fingerprint:{multiple:!1},musicip_puid:{multiple:!1},musicip_fingerprint:{multiple:!1},website:{multiple:!1},"performer:instrument":{multiple:!0,unique:!0},averageLevel:{multiple:!1},peakLevel:{multiple:!1},notes:{multiple:!0,unique:!1},key:{multiple:!1},originalalbum:{multiple:!1},originalartist:{multiple:!1},discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:{multiple:!1},discogs_label_id:{multiple:!1},discogs_master_release_id:{multiple:!1},discogs_votes:{multiple:!1},discogs_rating:{multiple:!1},replaygain_track_peak:{multiple:!1},replaygain_track_gain:{multiple:!1},replaygain_album_peak:{multiple:!1},replaygain_album_gain:{multiple:!1},replaygain_track_minmax:{multiple:!1},replaygain_album_minmax:{multiple:!1},replaygain_undo:{multiple:!1},description:{multiple:!0},longDescription:{multiple:!1},category:{multiple:!0},hdVideo:{multiple:!1},keywords:{multiple:!0},movement:{multiple:!1},movementIndex:{multiple:!1},movementTotal:{multiple:!1},podcastId:{multiple:!1},showMovement:{multiple:!1},stik:{multiple:!1}};function e0(a0){return r0.commonTags.hasOwnProperty(a0)&&!r0.commonTags[a0].multiple}r0.isSingleton=e0;function n0(a0){return!r0.commonTags[a0].multiple||r0.commonTags[a0].unique}r0.isUnique=n0})(GenericTagTypes);var CombinedTagMapper$1={},ID3v1TagMap={},GenericTagMapper={};
645Object.defineProperty(GenericTagMapper,"__esModule",{value:!0});GenericTagMapper.CommonTagMapper=void 0;class CommonTagMapper{static toIntOrNull(e0){const n0=parseInt(e0,10);return isNaN(n0)?null:n0}static normalizeTrack(e0){const n0=e0.toString().split("/");return{no:parseInt(n0[0],10)||null,of:parseInt(n0[1],10)||null}}constructor(e0,n0){this.tagTypes=e0,this.tagMap=n0}mapGenericTag(e0,n0){e0={id:e0.id,value:e0.value},this.postMap(e0,n0);const a0=this.getCommonName(e0.id);return a0?{id:a0,value:e0.value}:null}getCommonName(e0){return this.tagMap[e0]}postMap(e0,n0){}}CommonTagMapper.maxRatingScore=1;GenericTagMapper.CommonTagMapper=CommonTagMapper;Object.defineProperty(ID3v1TagMap,"__esModule",{value:!0});ID3v1TagMap.ID3v1TagMapper=void 0;const GenericTagMapper_1$6=GenericTagMapper,id3v1TagMap={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"};class ID3v1TagMapper extends GenericTagMapper_1$6.CommonTagMapper{constructor(){super(["ID3v1"],id3v1TagMap)}}ID3v1TagMap.ID3v1TagMapper=ID3v1TagMapper;var ID3v24TagMapper$1={},CaseInsensitiveTagMap$1={};Object.defineProperty(CaseInsensitiveTagMap$1,"__esModule",{value:!0});CaseInsensitiveTagMap$1.CaseInsensitiveTagMap=void 0;const GenericTagMapper_1$5=GenericTagMapper;class CaseInsensitiveTagMap extends GenericTagMapper_1$5.CommonTagMapper{constructor(e0,n0){const a0={};for(const i0 of Object.keys(n0))a0[i0.toUpperCase()]=n0[i0];super(e0,a0)}getCommonName(e0){return this.tagMap[e0.toUpperCase()]}}CaseInsensitiveTagMap$1.CaseInsensitiveTagMap=CaseInsensitiveTagMap;var Util$1={};Object.defineProperty(Util$1,"__esModule",{value:!0});Util$1.toRatio=Util$1.dbToRatio=Util$1.ratioToDb=Util$1.a2hex=Util$1.isBitSet=Util$1.getBitAllignedNumber=Util$1.stripNulls=Util$1.decodeString=Util$1.trimRightNull=Util$1.findZero=Util$1.getBit=void 0;function getBit(r0,e0,n0){return(r0[e0]&1<<n0)!==0}Util$1.getBit=getBit;function findZero(r0,e0,n0,a0){let i0=e0;if(a0==="utf16le"){for(;r0[i0]!==0||r0[i0+1]!==0;){if(i0>=n0)return n0;i0+=2}return i0}else{for(;r0[i0]!==0;){if(i0>=n0)return n0;i0++}return i0}}Util$1.findZero=findZero;function trimRightNull(r0){const e0=r0.indexOf("\0");return e0===-1?r0:r0.substr(0,e0)}Util$1.trimRightNull=trimRightNull;function swapBytes(r0){const e0=r0.length;if(e0&1)throw new Error("Buffer length must be even");for(let n0=0;n0<e0;n0+=2){const a0=r0[n0];r0[n0]=r0[n0+1],r0[n0+1]=a0}return r0}function decodeString(r0,e0){if(r0[0]===255&&r0[1]===254)return decodeString(r0.subarray(2),e0);if(e0==="utf16le"&&r0[0]===254&&r0[1]===255){if(r0.length&1)throw new Error("Expected even number of octets for 16-bit unicode string");return decodeString(swapBytes(r0),e0)}return Buffer.from(r0).toString(e0)}Util$1.decodeString=decodeString;function stripNulls(r0){return r0=r0.replace(/^\x00+/g,""),r0=r0.replace(/\x00+$/g,""),r0}Util$1.stripNulls=stripNulls;function getBitAllignedNumber(r0,e0,n0,a0){const i0=e0+~~(n0/8),s0=n0%8;let o0=r0[i0];o0&=255>>s0;const l0=8-s0,c0=a0-l0;return c0<0?o0>>=8-s0-a0:c0>0&&(o0<<=c0,o0|=getBitAllignedNumber(r0,e0,n0+l0,c0)),o0}Util$1.getBitAllignedNumber=getBitAllignedNumber;function isBitSet(r0,e0,n0){return getBitAllignedNumber(r0,e0,n0,1)===1}Util$1.isBitSet=isBitSet;function a2hex(r0){const e0=[];for(let n0=0,a0=r0.length;n0<a0;n0++){const i0=Number(r0.charCodeAt(n0)).toString(16);e0.push(i0.length===1?"0"+i0:i0)}return e0.join(" ")}Util$1.a2hex=a2hex;function ratioToDb(r0){return 10*Math.log10(r0)}Util$1.ratioToDb=ratioToDb;function dbToRatio(r0){return Math.pow(10,r0/10)}Util$1.dbToRatio=dbToRatio;function toRatio(r0){const e0=r0.split(" ").map(n0=>n0.trim().toLowerCase());if(e0.length>=1){const n0=parseFloat(e0[0]);return e0.length===2&&e0[1]==="db"?{dB:n0,ratio:dbToRatio(n0)}:{dB:ratioToDb(n0),ratio:n0}}}Util$1.toRatio=toRatio;Object.defineProperty(ID3v24TagMapper$1,"__esModule",{value:!0});ID3v24TagMapper$1.ID3v24TagMapper=void 0;const GenericTagMapper_1$4=GenericTagMapper,CaseInsensitiveTagMap_1$2=CaseInsensitiveTagMap$1,util$b=Util$1,id3v24TagMap={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer","USLT:description":"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"c
645omposersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"date",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl"};class ID3v24TagMapper extends CaseInsensitiveTagMap_1$2.CaseInsensitiveTagMap{static toRating(e0){return{source:e0.email,rating:e0.rating>0?(e0.rating-1)/254*GenericTagMapper_1$4.CommonTagMapper.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],id3v24TagMap)}postMap(e0,n0){switch(e0.id){case"UFID":e0.value.owner_identifier==="http://musicbrainz.org"&&(e0.id+=":"+e0.value.owner_identifier,e0.value=util$b.decodeString(e0.value.identifier,"latin1"));break;case"PRIV":switch(e0.value.owner_identifier){case"AverageLevel":case"PeakValue":e0.id+=":"+e0.value.owner_identifier,e0.value=e0.value.data.length===4?e0.value.data.readUInt32LE(0):null,e0.value===null&&n0.addWarning("Failed to parse PRIV:PeakValue");break;default:n0.addWarning(`Unknown PRIV owner-identifier: ${e0.value.owner_identifier}`)}break;case"COMM":e0.value=e0.value?e0.value.text:null;break;case"POPM":e0.value=ID3v24TagMapper.toRating(e0.value);break}}}ID3v24TagMapper$1.ID3v24TagMapper=ID3v24TagMapper;var AsfTagMapper$1={};Object.defineProperty(AsfTagMapper$1,"__esModule",{value:!0});AsfTagMapper$1.AsfTagMapper=void 0;const GenericTagMapper_1$3=GenericTagMapper,asfTagMap={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/
645Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"};class AsfTagMapper extends GenericTagMapper_1$3.CommonTagMapper{static toRating(e0){return{rating:parseFloat(e0+1)/5}}constructor(){super(["asf"],asfTagMap)}postMap(e0){switch(e0.id){case"WM/SharedUserRating":const n0=e0.id.split(":");e0.value=AsfTagMapper.toRating(e0.value),e0.id=n0[0];break}}}AsfTagMapper$1.AsfTagMapper=AsfTagMapper;var ID3v22TagMapper={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.ID3v22TagMapper=r0.id3v22TagMap=void 0;const e0=CaseInsensitiveTagMap$1;r0.id3v22TagMap={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"c
645opyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website","COM:iTunPGAP":"gapless",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm"};class n0 extends e0.CaseInsensitiveTagMap{constructor(){super(["ID3v2.2"],r0.id3v22TagMap)}}r0.ID3v22TagMapper=n0})(ID3v22TagMapper);var APEv2TagMapper$1={};Object.defineProperty(APEv2TagMapper$1,"__esModule",{value:!0});APEv2TagMapper$1.APEv2TagMapper=void 0;const CaseInsensitiveTagMap_1$1=CaseInsensitiveTagMap$1,apev2TagMap={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"};class APEv2TagMapper extends CaseInsensitiveTagMap_1$1.CaseInsensitiveTagMap{constructor(){super(["APEv2"],apev2TagMap)}}APEv2TagMapper$1.APEv2TagMapper=APEv2TagMapper;var MP4TagMapper={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.MP4TagMapper=r0.tagType=void 0;const e0=CaseInsensitiveTagMap$1,n0={"©nam":"title","©ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","©alb":"album","©day":"date","©cmt":"comment","©com":"comment",trkn:"track",disk:"disk","©gen":"genre",covr:"picture","©wrt":"composer","©lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","©grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","©cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","©too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear",desc:"description",ldes:"longDescription","©mvn":"movement","©mvi":"movementIndex","©mvc":"movementTotal","©wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"};r0.tagType="iTunes";class a0 extends e0.CaseInsensitiveTagMap{constructor(){super([r0.tagType],n0)}postMap(s0,o0){switch(s0.id){case"rate":s0.value={source:void 0,rating:parseFloat(s0.value)/100};break}}}r0.MP4TagMapper=a0})(MP4TagMapper);var VorbisTagMapper$1={};Object.defineProperty(VorbisTagMapper$1,"__esModule",{value:!0});VorbisTagMapper$1.VorbisTagMapper=void 0;const GenericTagMapper_1$2=GenericTagMapper,vorbisTagMap={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT
645:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"};class VorbisTagMapper extends GenericTagMapper_1$2.CommonTagMapper{static toRating(e0,n0,a0){return{source:e0&&e0.toLowerCase(),rating:parseFloat(n0)/a0*GenericTagMapper_1$2.CommonTagMapper.maxRatingScore}}constructor(){super(["vorbis"],vorbisTagMap)}postMap(e0){if(e0.id==="RATING")e0.value=VorbisTagMapper.toRating(void 0,e0.value,100);else if(e0.id.indexOf("RATING:")===0){const n0=e0.id.split(":");e0.value=VorbisTagMapper.toRating(n0[1],e0.value,1),e0.id=n0[0]}}}VorbisTagMapper$1.VorbisTagMapper=VorbisTagMapper;var RiffInfoTagMap={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.RiffInfoTagMapper=r0.riffInfoTagMap=void 0;const e0=GenericTagMapper;r0.riffInfoTagMap={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"};class n0 extends e0.CommonTagMapper{constructor(){super(["exif"],r0.riffInfoTagMap)}}r0.RiffInfoTagMapper=n0})(RiffInfoTagMap);var MatroskaTagMapper$1={};Object.defineProperty(MatroskaTagMapper$1,"__esModule",{value:!0});MatroskaTagMapper$1.MatroskaTagMapper=void 0;const CaseInsensitiveTagMap_1=CaseInsensitiveTagMap$1,ebmlTagMap={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"};class MatroskaTagMapper extends CaseInsensitiveTagMap_1.CaseInsensitiveTagMap{constructor(){super(["matroska"],ebmlTagMap)}}MatroskaTagMapper$1.MatroskaTagMapper=MatroskaTagMapper;var AiffTagMap={};Object.defineProperty(AiffTagMap,"__esModule",{value:!0});AiffTagMap.AiffTagMapper=void 0;const GenericTagMapper_1$1=GenericTagMapper,tagMap={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"
645comment"};class AiffTagMapper extends GenericTagMapper_1$1.CommonTagMapper{constructor(){super(["AIFF"],tagMap)}}AiffTagMap.AiffTagMapper=AiffTagMapper;Object.defineProperty(CombinedTagMapper$1,"__esModule",{value:!0});CombinedTagMapper$1.CombinedTagMapper=void 0;const ID3v1TagMap_1=ID3v1TagMap,ID3v24TagMapper_1=ID3v24TagMapper$1,AsfTagMapper_1=AsfTagMapper$1,ID3v22TagMapper_1=ID3v22TagMapper,APEv2TagMapper_1=APEv2TagMapper$1,MP4TagMapper_1=MP4TagMapper,VorbisTagMapper_1=VorbisTagMapper$1,RiffInfoTagMap_1=RiffInfoTagMap,MatroskaTagMapper_1=MatroskaTagMapper$1,AiffTagMap_1=AiffTagMap;class CombinedTagMapper{constructor(){this.tagMappers={},[new ID3v1TagMap_1.ID3v1TagMapper,new ID3v22TagMapper_1.ID3v22TagMapper,new ID3v24TagMapper_1.ID3v24TagMapper,new MP4TagMapper_1.MP4TagMapper,new MP4TagMapper_1.MP4TagMapper,new VorbisTagMapper_1.VorbisTagMapper,new APEv2TagMapper_1.APEv2TagMapper,new AsfTagMapper_1.AsfTagMapper,new RiffInfoTagMap_1.RiffInfoTagMapper,new MatroskaTagMapper_1.MatroskaTagMapper,new AiffTagMap_1.AiffTagMapper].forEach(e0=>{this.registerTagMapper(e0)})}mapTag(e0,n0,a0){if(this.tagMappers[e0])return this.tagMappers[e0].mapGenericTag(n0,a0);throw new Error("No generic tag mapper defined for tag-format: "+e0)}registerTagMapper(e0){for(const n0 of e0.tagTypes)this.tagMappers[n0]=e0}}CombinedTagMapper$1.CombinedTagMapper=CombinedTagMapper;Object.defineProperty(MetadataCollector$1,"__esModule",{value:!0});MetadataCollector$1.joinArtists=MetadataCollector$1.MetadataCollector=void 0;const type_1$2=type,debug_1$n=browserExports$2,GenericTagTypes_1=GenericTagTypes,CombinedTagMapper_1=CombinedTagMapper$1,GenericTagMapper_1=GenericTagMapper,Util_1$1=Util$1,FileType$1=core,debug$n=(0,debug_1$n.default)("music-metadata:collector"),TagPriority=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"];class MetadataCollector{constructor(e0){this.opts=e0,this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new CombinedTagMapper_1.CombinedTagMapper;let n0=1;for(const a0 of TagPriority)this.originPriority[a0]=n0++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(e0){debug$n(`streamInfo: type=${type_1$2.TrackType[e0.type]}, codec=${e0.codecName}`),this.format.trackInfo.push(e0)}setFormat(e0,n0){debug$n(`format: ${e0} = ${n0}`),this.format[e0]=n0,this.opts.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:e0,value:n0}})}addTag(e0,n0,a0){debug$n(`tag ${e0}.${n0} = ${a0}
645`),this.native[e0]||(this.format.tagTypes.push(e0),this.native[e0]=[]),this.native[e0].push({id:n0,value:a0}),this.toCommon(e0,n0,a0)}addWarning(e0){this.quality.warnings.push({message:e0})}postMap(e0,n0){switch(n0.id){case"artist":if(this.commonOrigin.artist===this.originPriority[e0])return this.postMap("artificial",{id:"artists",value:n0.value});this.common.artists||this.setGenericTag("artificial",{id:"artists",value:n0.value});break;case"artists":if((!this.common.artist||this.commonOrigin.artist===this.originPriority.artificial)&&(!this.common.artists||this.common.artists.indexOf(n0.value)===-1)){const o0=(this.common.artists||[]).concat([n0.value]),c0={id:"artist",value:joinArtists(o0)};this.setGenericTag("artificial",c0)}break;case"picture":this.postFixPicture(n0.value).then(o0=>{o0!==null&&(n0.value=o0,this.setGenericTag(e0,n0))});return;case"totaltracks":this.common.track.of=GenericTagMapper_1.CommonTagMapper.toIntOrNull(n0.value);return;case"totaldiscs":this.common.disk.of=GenericTagMapper_1.CommonTagMapper.toIntOrNull(n0.value);return;case"movementTotal":this.common.movementIndex.of=GenericTagMapper_1.CommonTagMapper.toIntOrNull(n0.value);return;case"track":case"disk":case"movementIndex":const a0=this.common[n0.id].of;this.common[n0.id]=GenericTagMapper_1.CommonTagMapper.normalizeTrack(n0.value),this.common[n0.id].of=a0??this.common[n0.id].of;return;case"bpm":case"year":case"originalyear":n0.value=parseInt(n0.value,10);break;case"date":const i0=parseInt(n0.value.substr(0,4),10);isNaN(i0)||(this.common.year=i0);break;case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":n0.value=typeof n0.value=="string"?parseInt(n0.value,10):n0.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":n0.value=(0,Util_1$1.toRatio)(n0.value);break;case"replaygain_track_minmax":n0.value=n0.value.split(",").map(o0=>parseInt(o0,10));break;case"replaygain_undo":const s0=n0.value.split(",").map(o0=>parseInt(o0,10));n0.value={leftChannel:s0[0],rightChannel:s0[1]};break;case"gapless":case"compilation":case"podcast":case"showMovement":n0.value=n0.value==="1"||n0.value===1;break;case"isrc":if(this.common[n0.id]&&this.common[n0.id].indexOf(n0.value)!==-1)return;break}n0.value!==null&&this.setGenericTag(e0,n0)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}async postFixPicture(e0){if(e0.data&&e0.data.length>0){if(!e0.format){const n0=await FileType$1.fromBuffer(e0.data);if(n0)e0.format=n0.mime;else return null}switch(e0.format=e0.format.toLocaleLowerCase(),e0.format){case"image/jpg":e0.format="image/jpeg"}return e0}return this.addWarning("Empty picture tag found"),null}toCommon(e0,n0,a0){const i0={id:n0,value:a0},s0=this.tagMapper.mapTag(e0,i0,this);s0&&this.postMap(e0,s0)}setGenericTag(e0,n0){debug$n(`common.${n0.id} = ${n0.value}`);const a0=this.commonOrigin[n0.id]||1e3,i0=this.originPriority[e0];if((0,GenericTagTypes_1.isSingleton)(n0.id))if(i0<=a0)this.common[n0.id]=n0.value,this.commonOrigin[n0.id]=i0;else return debug$n(`Ignore native tag (singleton): ${e0}.${n0.id} = ${n0.value}`);else if(i0===a0)!(0,GenericTagTypes_1.isUnique)(n0.id)||this.common[n0.id].indexOf(n0.value)===-1?this.common[n0.id].push(n0.value):debug$n(`Ignore duplicate value: ${e0}.${n0.id} = ${n0.value}`);else if(i0<a0)this.common[n0.id]=[n0.value],this.commonOrigin[n0.id]=i0;else return debug$n(`Ignore native tag (list): ${e0}.${n0.id} = ${n0.value}`);this.opts.observer&&this.opts.observer({metadata:this,tag:{type:"common",id:n0.id,value:n0.value}})}}MetadataCollector$1.MetadataCollector=MetadataCollector;function joinArtists(r0){return r0.length>2?r0.slice(0,r0.length-1).join(", ")+" & "+r0[r0.length-1]:r0.join(" & ")}MetadataCollector$1.joinArtists=joinArtists;var AiffParser={},ID3v2Parser$1={},FrameParser$1={},ID3v2Token={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.TextEncodingToken=r0.ExtendedHeader=r0.ID3v2Header=r0.UINT32SYNCSAFE=r0.AttachedPictureType=void 0;const e0=lib$1,n0=Util$1;(function(a0){a0[a0.Other=0]="Other",a0[a0["32x32 pixels 'file icon' (PNG only)"]=1]="32x32 pixels 'file icon' (PNG only)",a0[a0["Other file icon"]=2]="Other file icon",a0[a0["Cover (front)"]=3]="Cover (front)",a0[a0["Cover (back)"]=4]="Cover (back)",a0[a0["Leaflet page"]=5]="Leaflet page",a0[a0["Media (e.g. label side of CD)"]=6]="Media (e.g. label side of CD)",a0[a0["Lead artist/lead performer/soloist"]=7]="Lead artist/lead performer/soloist",a0[a0["Artist/performer"]=8]="Artist/performer",a0[a0.Conductor=9]="Conductor",a0[a0["Band/Orchestra"]=10]="Band/Orchestra",a0[a0.Composer=11]="Composer",a0[a0["Lyricist/text writer"]=12]="Lyricist/text writer",a0[a0["Recording Location"]=13]="Recording Location",a0[a0["During recording"]=14]="During recording",a0[a0["During performance"]=15]="During performance",a0[a0["Movie/video screen capture"]=16]="Movie/video screen capture",a0[a0["A bright coloured fish"]=17]="A bright coloured fish",a0[a0.Illustration=18]="Illustration",a0[a0["Band/artist logotype"]=19]="Band/artist logotype",a0[a0["Publisher/Studio logotype"]=20]="Publisher/Studio logotype"})(r0.AttachedPictureType||(r0.AttachedPictureType={})),r0.UINT32SYNCSAFE={get:(a0,i0)=>a0[i0+3]&127|a0[i0+2]<<7|a0[i0+1]<<14|a0[i0]<<21,len:4},r0.ID3v2Header={len:10,get:(a0,i0)=>({fileIdentifier:new e0.StringType(3,"ascii").get(a0,i0),version:{major:e0.INT8.get(a0,i0+3),revision:e0.INT8.get(a0,i0+4)},flags:{unsynchronisation:n0.getBit(a0,i0+5,7),isExtendedHeader:n0.getBit(a0,i0+5,6),expIndicator:n0.getBit(a0,i0+5,5),footer:n0.getBit(a0,i0+5,4)},size:r0.UINT32SYNCSAFE.get(a0,i0+6)})},r0.ExtendedHeader={len:10,get:(a0,i0)=>({size:e0.UINT32_BE.get(a0,i0),extendedFlags:e0.UINT16_BE.get(a0,i0+4),sizeOfPadding:e0.UINT32_BE.get(a0,i0+6),crcDataPresent:n0.getBit(a0,i0+4,31)})},r0.TextEncodingToken={len:1,get:(a0,i0)=>{switch(a0[i0]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf16le",bom:!0};case 2:return{encoding:"utf16le",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}}})(ID3v2Token);var ID3v1Parser={},BasicParser$1={};Object.defineProperty(BasicParser$1,"__esModule",{value:!0});BasicParser$1.BasicParser=void 0;class BasicParser{init(e0,n0,a0){return this.metadata=e0,this.tokenizer=n0,this.options=a0,this}}
645BasicParser$1.BasicParser=BasicParser;var APEv2Parser$1={},APEv2Token={},FourCC={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.FourCcToken=void 0;const e0=Util$1,n0=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/;r0.FourCcToken={len:4,get:(a0,i0)=>{const s0=a0.toString("binary",i0,i0+r0.FourCcToken.len);if(!s0.match(n0))throw new Error(`FourCC contains invalid characters: ${e0.a2hex(s0)} "${s0}"`);return s0},put:(a0,i0,s0)=>{const o0=Buffer.from(s0,"binary");if(o0.length!==4)throw new Error("Invalid length");return o0.copy(a0,i0)}}})(FourCC);(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.isBitSet=r0.parseTagFlags=r0.TagField=r0.TagItemHeader=r0.TagFooter=r0.Header=r0.DescriptorParser=r0.DataType=void 0;const e0=lib$1,n0=FourCC;(function(o0){o0[o0.text_utf8=0]="text_utf8",o0[o0.binary=1]="binary",o0[o0.external_info=2]="external_info",o0[o0.reserved=3]="reserved"})(r0.DataType||(r0.DataType={})),r0.DescriptorParser={len:52,get:(o0,l0)=>({ID:n0.FourCcToken.get(o0,l0),version:e0.UINT32_LE.get(o0,l0+4)/1e3,descriptorBytes:e0.UINT32_LE.get(o0,l0+8),headerBytes:e0.UINT32_LE.get(o0,l0+12),seekTableBytes:e0.UINT32_LE.get(o0,l0+16),headerDataBytes:e0.UINT32_LE.get(o0,l0+20),apeFrameDataBytes:e0.UINT32_LE.get(o0,l0+24),apeFrameDataBytesHigh:e0.UINT32_LE.get(o0,l0+28),terminatingDataBytes:e0.UINT32_LE.get(o0,l0+32),fileMD5:new e0.Uint8ArrayType(16).get(o0,l0+36)})},r0.Header={len:24,get:(o0,l0)=>({compressionLevel:e0.UINT16_LE.get(o0,l0),formatFlags:e0.UINT16_LE.get(o0,l0+2),blocksPerFrame:e0.UINT32_LE.get(o0,l0+4),finalFrameBlocks:e0.UINT32_LE.get(o0,l0+8),totalFrames:e0.UINT32_LE.get(o0,l0+12),bitsPerSample:e0.UINT16_LE.get(o0,l0+16),channel:e0.UINT16_LE.get(o0,l0+18),sampleRate:e0.UINT32_LE.get(o0,l0+20)})},r0.TagFooter={len:32,get:(o0,l0)=>({ID:new e0.StringType(8,"ascii").get(o0,l0),version:e0.UINT32_LE.get(o0,l0+8),size:e0.UINT32_LE.get(o0,l0+12),fields:e0.UINT32_LE.get(o0,l0+16),flags:i0(e0.UINT32_LE.get(o0,l0+20))})},r0.TagItemHeader={len:8,get:(o0,l0)=>({size:e0.UINT32_LE.get(o0,l0),flags:i0(e0.UINT32_LE.get(o0,l0+4))})};const a0=o0=>new e0.Uint8ArrayType(o0.size-r0.TagFooter.len);r0.TagField=a0;function i0(o0){return{containsHeader:s0(o0,31),containsFooter:s0(o0,30),isHeader:s0(o0,31),readOnly:s0(o0,0),dataType:(o0&6)>>1}}r0.parseTagFlags=i0;function s0(o0,l0){return(o0&1<<l0)!==0}r0.isBitSet=s0})(APEv2Token);Object.defineProperty(APEv2Parser$1,"__esModule",{value:!0});APEv2Parser$1.APEv2Parser=void 0;const debug_1$m=browserExports$2,strtok3$4=core$1,token_types_1$2=lib$1,util$a=Util$1,BasicParser_1$b=BasicParser$1,APEv2Token_1=APEv2Token,debug$m=(0,debug_1$m.default)("music-metadata:parser:APEv2"),tagFormat$1="APEv2",preamble="APETAGEX";class APEv2Parser extends BasicParser_1$b.BasicParser{constructor(){super(...arguments),this.ape={}}static tryParseApeHeader(e0,n0,a0){const i0=new APEv2Parser;return i0.init(e0,n0,a0),i0.tryParseApeHeader()}static calculateDuration(e0){let n0=e0.totalFrames>1?e0.blocksPerFrame*(e0.totalFrames-1):0;return n0+=e0.finalFrameBlocks,n0/e0.sampleRate}static async findApeFooterOffset(e0,n0){const a0=Buffer.alloc(APEv2Token_1.TagFooter.len);await e0.randomRead(a0,0,APEv2Token_1.TagFooter.len,n0-APEv2Token_1.TagFooter.len);const i0=APEv2Token_1.TagFooter.get(a0,0);if(i0.ID==="APETAGEX")return debug$m(`APE footer header at offset=${n0}`),{footer:i0,offset:n0-i0.size}}static parseTagFooter(e0,n0,a0){const i0=APEv2Token_1.TagFooter.get(n0,n0.length-APEv2Token_1.TagFooter.len);if(i0.ID!==preamble)throw new Error("Unexpected APEv2 Footer ID preamble value.");strtok3$4.fromBuffer(n0);const s0=new APEv2Parser;return s0.init(e0,strtok3$4.fromBuffer(n0),a0),s0.parseTags(i0)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position<APEv2Token_1.TagFooter.len){debug$m("No APEv2 header found, end-of-file reached");return}const e0=await this.tokenizer.peekToken(APEv2Token_1.TagFooter);if(e0.ID===preamble)return await this.tokenizer.ignore(APEv2Token_1.TagFooter.len),this.parseTags(e0);if(debug$m(`APEv2 header not found at offset=${this.tokenizer.position}`),this.tokenizer.fileInfo.size){const n0=this.tokenizer.fileInfo.size-this.tokenizer.position,a0=Buffer.alloc(n0);return await this.tokenizer.readBuffer(a0),APEv2Parser.parseTagFooter(this.metadata,a0,this.options)}}async parse(){const e0=await this.tokenizer.readToken(APEv2Token_1.DescriptorParser);if(e0.ID!=="MAC ")throw new Error("Unexpected descriptor ID");this.ape.descriptor=e0;const n0=e0.descriptorBytes-APEv2Token_1.DescriptorParser.len,a0=await(n0>0?this.parseDescriptorExpansion(n0):this.parseHeader());return await this.tokenizer.ignore(a0.forwardBytes),this.tryParseApeHeader()}async parseTags(e0){const n0=Buffer.alloc(256);let a0=e0.size-APEv2Token_1.TagFooter.len;debug$m(`Parse APE tags at offset=${this.tokenizer.position}, size=${a0}`);for(let i0=0;i0<e0.fields;i0++){if(a0<APEv2Token_1.TagItemHeader.len){this.metadata.addWarning(`APEv2 Tag-header: ${e0.fields-i0} items remaining, but no more tag data to read.`);break}const s0=await this.tokenizer.readToken(APEv2Token_1.TagItemHeader);a0-=APEv2Token_1.TagItemHeader.len+s0.size,await this.tokenizer.peekBuffer(n0,{length:Math.min(n0.length,a0)});let o0=util$a.findZero(n0,0,n0.length);const l0=await this.tokenizer.readToken(new token_types_1$2.StringType(o0,"ascii"));switch(await this.tokenizer.ignore(1),a0-=l0.length+1,s0.flags.dataType){case APEv2Token_1.DataType.text_utf8:{const u0=(await this.tokenizer.readToken(new token_types_1$2.StringType(s0.size,"utf8"))).split(/\x00/g);for(const d0 of u0)this.metadata.addTag(tagFormat$1,l0,d0);break}case APEv2Token_1.DataType.binary:if(this.options.skipCovers)await this.tokenizer.ignore(s0.size);else{const c0=Buffer.alloc(s0.size);await this.tokenizer.readBuffer(c0),o0=util$a.findZero(c0,0,c0.length);const u0=c0.toString("utf8",0,o0),d0=Buffer.from(c0.slice(o0+1));this.metadata.addTag(tagFormat$1,l0,{description:u0,data:d0})}break;case APEv2Token_1.DataType.external_info:debug$m(`Ignore external info ${l0}`),await this.tokenizer.ignore(s0.size);break;case APEv2Token_1.DataType.reserved:debug$m(`Ignore external info ${l0}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${l0}"`),await this.tokenizer.ignore(s0.size);break}}}async parseDescriptorExpansion(e0){return await this.tokenizer.ignore(e0),this.parseHeader()}async parseHeader(){const e0=await this.tokenizer.readToken(APEv2Token_1.Header);return this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",e0.bitsPerSample),this.metadata.setFormat("sampleRate",e0.sampleRate),this.metadata.setFormat("numberOfChannels",e0.channel),this.metadata.setFormat("duration",APEv2Parser.calculateDuration(e0)
645),{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}APEv2Parser$1.APEv2Parser=APEv2Parser;(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.hasID3v1Header=r0.ID3v1Parser=r0.Genres=void 0;const e0=browserExports$2,n0=lib$1,a0=Util$1,i0=BasicParser$1,s0=APEv2Parser$1,o0=(0,e0.default)("music-metadata:parser:ID3v1");r0.Genres=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"];const l0={len:128,get:(h0,f0)=>{const p0=new c0(3).get(h0,f0);return p0==="TAG"?{header:p0,title:new c0(30).get(h0,f0+3),artist:new c0(30).get(h0,f0+33),album:new c0(30).get(h0,f0+63),year:new c0(4).get(h0,f0+93),comment:new c0(28).get(h0,f0+97),zeroByte:n0.UINT8.get(h0,f0+127),track:n0.UINT8.get(h0,f0+126),genre:n0.UINT8.get(h0,f0+127)}:null}};class c0 extends n0.StringType{constructor(f0){super(f0,"binary")}get(f0,p0){let A0=super.get(f0,p0);return A0=a0.trimRightNull(A0),A0=A0.trim(),A0.length>0?A0:void 0}}class u0 extends i0.BasicParser{static getGenre(f0){if(f0<r0.Genres.length)return r0.Genres[f0]}async parse(){if(!this.tokenizer.fileInfo.size){o0("Skip checking for ID3v1 because the file-size is unknown");return}if(this.options.apeHeader){this.tokenizer.ignore(this.options.apeHeader.offset-this.tokenizer.position);const A0=new s0.APEv2Parser;A0.init(this.metadata,this.tokenizer,this.options),await A0.parseTags(this.options.apeHeader.footer)}const f0=this.tokenizer.fileInfo.size-l0.len;if(this.tokenizer.position>f0){o0("Already consumed the last 128 bytes");return}const p0=await this.tokenizer.readToken(l0,f0);if(p0){o0("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-l0.len);for(const m0 of["title","artist","album","comment","track","year"])p0[m0]&&p0[m0]!==""&&this.addTag(m0,p0[m0]);const A0=u0.getGenre(p0.genre);A0&&this.addTag("genre",A0)}else o0("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-l0.len)}addTag(f0,p0){this.metadata.addTag("ID3v1",f0,p0)}}r0.ID3v1Parser=u0;async function d0(h0){if(h0.fileSize>=128){const f0=Buffer.alloc(3);return await h0.randomRead(f0,0,f0.length,h0.fileSize-128),f0.toString("binary")==="TAG"}return!1}r0.hasID3v1Header=d0})(ID3v1Parser);Object.defineProperty(FrameParser$1,"__esModule",{value:!0});FrameParser$1.FrameParser=FrameParser$1.parseGenre=void 0;const debug_1$l=browserExports$2,Token$r=lib$1,util$9=Util$1,ID3v2Token_1$3=ID3v2Token,ID3v1Parser_1$3=ID3v1Parser,debug$l=(0,debug_1$l.default)("music-metadata:id3v2:frame-parser"),defaultEnc="latin1";function parseGenre(r0){const e0=[];let n0,a0="";for(const i0 of r0)if(typeof n0=="string")if(i0==="("&&n0==="")a0+="(",n0=void 0;else if(i0===")"){a0!==""&&(e0.push(a0),a0="");const s0=parseGenreCode(n0);s0&&e0.push(s0),n0=void 0}else n0+=i0;else i0==="("?n0="":a0+=i0;return a0&&(e0.length===0&&a0.match(/^\d*$/)&&(a0=ID3v1Parser_1$3.Genres[a0]),e0.push(a0)),e0}FrameParser$1.parseGenre=parseGenre;function parseGenreCode(r0){if(r0==="RX")return"Remix";if(r0==="CR")return"Cover";if(r0.match(/^\d*$/))return ID3v1Parser_1$3.Genres[r0]}class FrameParser{constructor(e0,n0){this.major=e0,this.warningCollector=n0}
645readData(e0,n0,a0){if(e0.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${n0}`);return}const{encoding:i0,bom:s0}=ID3v2Token_1$3.TextEncodingToken.get(e0,0),o0=e0.length;let l0=0,c0=[];const u0=FrameParser.getNullTerminatorLength(i0);let d0;const h0={};switch(debug$l(`Parsing tag type=${n0}, encoding=${i0}, bom=${s0}`),n0!=="TXXX"&&n0[0]==="T"?"T*":n0){case"T*":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":let f0;try{f0=util$9.decodeString(e0.slice(1),i0).replace(/\x00+$/,"")}catch(m0){this.warningCollector.addWarning(`id3v2.${this.major} type=${n0} header has invalid string value: ${m0.message}`)}switch(n0){case"TMCL":case"TIPL":case"IPLS":c0=this.splitValue(n0,f0),c0=FrameParser.functionList(c0);break;case"TRK":case"TRCK":case"TPOS":c0=f0;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":c0=this.splitValue(n0,f0);break;case"TCO":case"TCON":c0=this.splitValue(n0,f0).map(m0=>parseGenre(m0)).reduce((m0,x0)=>m0.concat(x0),[]);break;case"PCS":case"PCST":c0=this.major>=4?this.splitValue(n0,f0):[f0],c0=Array.isArray(c0)&&c0[0]===""?1:0;break;default:c0=this.major>=4?this.splitValue(n0,f0):[f0]}break;case"TXXX":c0=FrameParser.readIdentifierAndData(e0,l0+1,o0,i0),c0={description:c0.id,text:this.splitValue(n0,util$9.decodeString(c0.data,i0).replace(/\x00+$/,""))};break;case"PIC":case"APIC":if(a0){const m0={};switch(l0+=1,this.major){case 2:m0.format=util$9.decodeString(e0.slice(l0,l0+3),"latin1"),l0+=3;break;case 3:case 4:d0=util$9.findZero(e0,l0,o0,defaultEnc),m0.format=util$9.decodeString(e0.slice(l0,d0),defaultEnc),l0=d0+1;break;default:throw new Error("Warning: unexpected major versionIndex: "+this.major)}m0.format=FrameParser.fixPictureMimeType(m0.format),m0.type=ID3v2Token_1$3.AttachedPictureType[e0[l0]],l0+=1,d0=util$9.findZero(e0,l0,o0,i0),m0.description=util$9.decodeString(e0.slice(l0,d0),i0),l0=d0+u0,m0.data=Buffer.from(e0.slice(l0,o0)),c0=m0}break;case"CNT":case"PCNT":c0=Token$r.UINT32_BE.get(e0,0);break;case"SYLT":for(l0+=7,c0=[];l0<o0;){const m0=e0.slice(l0,l0=util$9.findZero(e0,l0,o0,i0));l0+=5,c0.push(util$9.decodeString(m0,i0))}break;case"ULT":case"USLT":case"COM":case"COMM":l0+=1,h0.language=util$9.decodeString(e0.slice(l0,l0+3),defaultEnc),l0+=3,d0=util$9.findZero(e0,l0,o0,i0),h0.description=util$9.decodeString(e0.slice(l0,d0),i0),l0=d0+u0,h0.text=util$9.decodeString(e0.slice(l0,o0),i0).replace(/\x00+$/,""),c0=[h0];break;case"UFID":c0=FrameParser.readIdentifierAndData(e0,l0,o0,defaultEnc),c0={owner_identifier:c0.id,identifier:c0.data};break;case"PRIV":c0=FrameParser.readIdentifierAndData(e0,l0,o0,defaultEnc),c0={owner_identifier:c0.id,data:c0.data};break;case"POPM":d0=util$9.findZero(e0,l0,o0,defaultEnc);const p0=util$9.decodeString(e0.slice(l0,d0),defaultEnc);l0=d0+1;const A0=o0-l0;c0={email:p0,rating:Token$r.UINT8.get(e0,l0),counter:A0>=5?Token$r.UINT32_BE.get(e0,l0+1):void 0};break;case"GEOB":{d0=util$9.findZero(e0,l0+1,o0,i0);const m0=util$9.decodeString(e0.slice(l0+1,d0),defaultEnc);l0=d0+1,d0=util$9.findZero(e0,l0,o0-l0,i0);const x0=util$9.decodeString(e0.slice(l0,d0),defaultEnc);l0=d0+1,d0=util$9.findZero(e0,l0,o0-l0,i0);const g0=util$9.decodeString(e0.slice(l0,d0),defaultEnc);c0={type:m0,filename:x0,description:g0,data:e0.slice(l0+1,o0)};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":c0=util$9.decodeString(e0.slice(l0,d0),defaultEnc);break;case"WXXX":{d0=util$9.findZero(e0,l0+1,o0,i0);const m0=util$9.decodeString(e0.slice(l0+1,d0),i0);l0=d0+(i0==="utf16le"?2:1),c0={description:m0,url:util$9.decodeString(e0.slice(l0,o0),defaultEnc)};break}case"WFD":case"WFED":c0=util$9.decodeString(e0.slice(l0+1,util$9.findZero(e0,l0+1,o0,i0)),i0);break;case"MCDI":{c0=e0.slice(0,o0);break}default:debug$l("Warning: unsupported id3v2-tag-type: "+n0);break}return c0}static fixPictureMimeType(e0){switch(e0=e0.toLocaleLowerCase(),e0){case"jpg":return"image/jpeg";case"png":return"image/png"}return e0}static functionList(e0){const n0={};for(let a0=0;a0+1<e0.length;a0+=2){const i0=e0[a0+1].split(",");n0[e0[a0]]=n0.hasOwnProperty(e0[a0])?n0[e0[a0]].concat(i0):i0}return n0}splitValue(e0,n0){let a0;return this.major<4?(a0=n0.split(/\x00/g),a0.length>1?this.warningCollector.addWarning(`ID3v2.${this.major} ${e0} uses non standard null-separator.`):a0=n0.split(/\//g)):a0=n0.split(/\x00/g),FrameParser.trimArray(a0)}static trimArray(e0){return e0.map(n0=>n0.replace(/\x00+$/,"").trim())}
645static readIdentifierAndData(e0,n0,a0,i0){const s0=util$9.findZero(e0,n0,a0,i0),o0=util$9.decodeString(e0.slice(n0,s0),i0);return n0=s0+FrameParser.getNullTerminatorLength(i0),{id:o0,data:e0.slice(n0,a0)}}static getNullTerminatorLength(e0){return e0==="utf16le"?2:1}}FrameParser$1.FrameParser=FrameParser;Object.defineProperty(ID3v2Parser$1,"__esModule",{value:!0});ID3v2Parser$1.ID3v2Parser=void 0;const Token$q=lib$1,util$8=Util$1,FrameParser_1=FrameParser$1,ID3v2Token_1$2=ID3v2Token;class ID3v2Parser{static removeUnsyncBytes(e0){let n0=0,a0=0;for(;n0<e0.length-1;)n0!==a0&&(e0[a0]=e0[n0]),n0+=e0[n0]===255&&e0[n0+1]===0?2:1,a0++;return n0<e0.length&&(e0[a0++]=e0[n0]),e0.slice(0,a0)}static getFrameHeaderLength(e0){switch(e0){case 2:return 6;case 3:case 4:return 10;default:throw new Error("header versionIndex is incorrect")}}static readFrameFlags(e0){return{status:{tag_alter_preservation:util$8.getBit(e0,0,6),file_alter_preservation:util$8.getBit(e0,0,5),read_only:util$8.getBit(e0,0,4)},format:{grouping_identity:util$8.getBit(e0,1,7),compression:util$8.getBit(e0,1,3),encryption:util$8.getBit(e0,1,2),unsynchronisation:util$8.getBit(e0,1,1),data_length_indicator:util$8.getBit(e0,1,0)}}}static readFrameData(e0,n0,a0,i0,s0){const o0=new FrameParser_1.FrameParser(a0,s0);switch(a0){case 2:return o0.readData(e0,n0.id,i0);case 3:case 4:return n0.flags.format.unsynchronisation&&(e0=ID3v2Parser.removeUnsyncBytes(e0)),n0.flags.format.data_length_indicator&&(e0=e0.slice(4,e0.length)),o0.readData(e0,n0.id,i0);default:throw new Error("Unexpected majorVer: "+a0)}}static makeDescriptionTagName(e0,n0){return e0+(n0?":"+n0:"")}async parse(e0,n0,a0){this.tokenizer=n0,this.metadata=e0,this.options=a0;const i0=await this.tokenizer.readToken(ID3v2Token_1$2.ID3v2Header);if(i0.fileIdentifier!=="ID3")throw new Error("expected ID3-header file-identifier 'ID3' was not found");return this.id3Header=i0,this.headerType="ID3v2."+i0.version.major,i0.flags.isExtendedHeader?this.parseExtendedHeader():this.parseId3Data(i0.size)}async parseExtendedHeader(){const e0=await this.tokenizer.readToken(ID3v2Token_1$2.ExtendedHeader),n0=e0.size-ID3v2Token_1$2.ExtendedHeader.len;return n0>0?this.parseExtendedHeaderData(n0,e0.size):this.parseId3Data(this.id3Header.size-e0.size)}async parseExtendedHeaderData(e0,n0){return await this.tokenizer.ignore(e0),this.parseId3Data(this.id3Header.size-n0)}async parseId3Data(e0){const n0=await this.tokenizer.readToken(new Token$q.Uint8ArrayType(e0));for(const a0 of this.parseMetadata(n0))if(a0.id==="TXXX"){if(a0.value)for(const i0 of a0.value.text)this.addTag(ID3v2Parser.makeDescriptionTagName(a0.id,a0.value.description),i0)}else if(a0.id==="COM")for(const i0 of a0.value)this.addTag(ID3v2Parser.makeDescriptionTagName(a0.id,i0.description),i0.text);else if(a0.id==="COMM")for(const i0 of a0.value)this.addTag(ID3v2Parser.makeDescriptionTagName(a0.id,i0.description),i0);else if(Array.isArray(a0.value))for(const i0 of a0.value)this.addTag(a0.id,i0);else this.addTag(a0.id,a0.value)}addTag(e0,n0){this.metadata.addTag(this.headerType,e0,n0)}parseMetadata(e0){let n0=0;const a0=[];for(;n0!==e0.length;){const i0=ID3v2Parser.getFrameHeaderLength(this.id3Header.version.major);if(n0+i0>e0.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}const s0=e0.slice(n0,n0+=i0),o0=this.readFrameHeader(s0,this.id3Header.version.major),l0=e0.slice(n0,n0+=o0.length),c0=ID3v2Parser.readFrameData(l0,o0,this.id3Header.version.major,!this.options.skipCovers,this.metadata);c0&&a0.push({id:o0.id,value:c0})}return a0}readFrameHeader(e0,n0){let a0;switch(n0){case 2:a0={id:Buffer.from(e0.slice(0,3)).toString("ascii"),length:Token$q.UINT24_BE.get(e0,3)},a0.id.match(/[A-Z0-9]{3}/g)||this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${a0.id}`);break;case 3:case 4:a0={id:Buffer.from(e0.slice(0,4)).toString("ascii"),length:(n0===4?ID3v2Token_1$2.UINT32SYNCSAFE:Token$q.UINT32_BE).get(e0,4),flags:ID3v2Parser.readFrameFlags(e0.slice(8,10))},a0.id.match(/[A-Z0-9]{4}/g)||this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${a0.id}`);break;default:throw new Error("Unexpected majorVer: "+n0)}return a0}}ID3v2Parser$1.ID3v2Parser=ID3v2Parser;var AiffToken$1={};Object.defineProperty(AiffToken$1,"__esModule",{value:!0});AiffToken$1.Common=void 0;const Token$p=lib$1,FourCC_1$a=FourCC;class Common{constructor(e0,n0){this.isAifc=n0;const a0=n0?22:18;if(e0.chunkSize<a0)throw new Error(`COMMON CHUNK size should always be at least ${a0}`);this.len=e0.chunkSize}get(e0,n0){const a0=e0.readUInt16BE(n0+8)-16398,i0=e0.readUInt16BE(n0+8+2),s0={numChannels:e0.readUInt16BE(n0),numSampleFrames:e0.readUInt32BE(n0+2),sampleSize:e0.readUInt16BE(n0+6),sampleRate:a0<0?i0>>Math.abs(a0):i0<<a0};if(this.isAifc){if(s0.compressionType=FourCC_1$a.FourCcToken.get(e0,n0+18),this.len>22){const o0=e0.readInt8(n0+22);if(o0>0){const l0=(o0+1)%2;if(23+o0+l0===this.len)s0.compressionName=new Token$p.StringType(o0,"binary").get(e0,n0+23);else throw new Error("Illegal pstring length")}else s0.compressionName=void 0}}else s0.compressionName="PCM";return s0}}AiffToken$1.Common=Common;var iff$1={};Object.defineProperty(iff$1,"__esModule",{value:!0});iff$1.Header=void 0;const Token$o=lib$1,FourCC_1$9=FourCC;iff$1.Header={len:8,get:(r0,e0)=>({chunkID:FourCC_1$9.FourCcToken.get(r0,e0),chunkSize:Number(BigInt(Token$o.UINT32_BE.get(r0,e0+4)))})};
645Object.defineProperty(AiffParser,"__esModule",{value:!0});AiffParser.AIFFParser=void 0;const Token$n=lib$1,debug_1$k=browserExports$2,strtok3$3=core$1,ID3v2Parser_1$4=ID3v2Parser$1,FourCC_1$8=FourCC,BasicParser_1$a=BasicParser$1,AiffToken=AiffToken$1,iff=iff$1,debug$k=(0,debug_1$k.default)("music-metadata:parser:aiff"),compressionTypes={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"µLaw 2:1 8-bit ITU-T G.711 µ-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 µ-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "};class AIFFParser extends BasicParser_1$a.BasicParser{async parse(){if((await this.tokenizer.readToken(iff.Header)).chunkID!=="FORM")throw new Error("Invalid Chunk-ID, expected 'FORM'");const n0=await this.tokenizer.readToken(FourCC_1$8.FourCcToken);switch(n0){case"AIFF":this.metadata.setFormat("container",n0),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw Error("Unsupported AIFF type: "+n0)}this.metadata.setFormat("lossless",!this.isCompressed);try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=iff.Header.len;){debug$k("Reading AIFF chunk at offset="+this.tokenizer.position);const a0=await this.tokenizer.readToken(iff.Header),i0=2*Math.round(a0.chunkSize/2),s0=await this.readData(a0);await this.tokenizer.ignore(i0-s0)}}catch(a0){if(a0 instanceof strtok3$3.EndOfStreamError)debug$k("End-of-stream");else throw a0}}async readData(e0){var n0;switch(e0.chunkID){case"COMM":const a0=await this.tokenizer.readToken(new AiffToken.Common(e0,this.isCompressed));return this.metadata.setFormat("bitsPerSample",a0.sampleSize),this.metadata.setFormat("sampleRate",a0.sampleRate),this.metadata.setFormat("numberOfChannels",a0.numChannels),this.metadata.setFormat("numberOfSamples",a0.numSampleFrames),this.metadata.setFormat("duration",a0.numSampleFrames/a0.sampleRate),this.metadata.setFormat("codec",(n0=a0.compressionName)!==null&&n0!==void 0?n0:compressionTypes[a0.compressionType]),e0.chunkSize;case"ID3 ":const i0=await this.tokenizer.readToken(new Token$n.Uint8ArrayType(e0.chunkSize)),s0=strtok3$3.fromBuffer(i0);return await new ID3v2Parser_1$4.ID3v2Parser().parse(this.metadata,s0,this.options),e0.chunkSize;case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*e0.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(e0);default:return debug$k(`Ignore chunk id=${e0.chunkID}, size=${e0.chunkSize}`),0}}async readTextChunk(e0){return(await this.tokenizer.readToken(new Token$n.StringType(e0.chunkSize,"ascii"))).split("\0").map(a0=>a0.trim()).filter(a0=>a0&&a0.length>0).forEach(a0=>{this.metadata.addTag("AIFF",e0.chunkID,a0.trim())}),e0.chunkSize}}AiffParser.AIFFParser=AIFFParser;var AsfParser$1={},GUID$1={};Object.defineProperty(GUID$1,"__esModule",{value:!0});class GUID{static fromBin(e0,n0=0){return new GUID(this.decode(e0,n0))}static decode(e0,n0=0){return(e0.readUInt32LE(n0).toString(16)+"-"+e0.readUInt16LE(n0+4).toString(16)+"-"+e0.readUInt16LE(n0+6).toString(16)+"-"+e0.readUInt16BE(n0+8).toString(16)+"-"+e0.slice(n0+10,n0+16).toString("hex")).toUpperCase()}static decodeMediaType(e0){switch(e0.str){case GUID.AudioMedia.str:return"audio";case GUID.VideoMedia.str:return"video";case GUID.CommandMedia.str:return"command";case GUID.Degradable_JPEG_Media.str:return"degradable-jpeg";case GUID.FileTransferMedia.str:return"file-transfer";case GUID.BinaryMedia.str:return"binary"}}static encode(e0){const n0=Buffer.alloc(16);return n0.writeUInt32LE(parseInt(e0.slice(0,8),16),0),n0.writeUInt16LE(parseInt(e0.slice(9,13),16),4),n0.writeUInt16LE(parseInt(e0.slice(14,18),16),6),Buffer.from(e0.slice(19,23),"hex").copy(n0,8),Buffer.from(e0.slice(24),"hex").copy(n0,10),n0}constructor(e0){this.str=e0}equals(e0){return this.str===e0.str}toBin(){return GUID.encode(this.str)}}
645GUID.HeaderObject=new GUID("75B22630-668E-11CF-A6D9-00AA0062CE6C");GUID.DataObject=new GUID("75B22636-668E-11CF-A6D9-00AA0062CE6C");GUID.SimpleIndexObject=new GUID("33000890-E5B1-11CF-89F4-00A0C90349CB");GUID.IndexObject=new GUID("D6E229D3-35DA-11D1-9034-00A0C90349BE");GUID.MediaObjectIndexObject=new GUID("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");GUID.TimecodeIndexObject=new GUID("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");GUID.FilePropertiesObject=new GUID("8CABDCA1-A947-11CF-8EE4-00C00C205365");GUID.StreamPropertiesObject=new GUID("B7DC0791-A9B7-11CF-8EE6-00C00C205365");GUID.HeaderExtensionObject=new GUID("5FBF03B5-A92E-11CF-8EE3-00C00C205365");GUID.CodecListObject=new GUID("86D15240-311D-11D0-A3A4-00A0C90348F6");GUID.ScriptCommandObject=new GUID("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");GUID.MarkerObject=new GUID("F487CD01-A951-11CF-8EE6-00C00C205365");GUID.BitrateMutualExclusionObject=new GUID("D6E229DC-35DA-11D1-9034-00A0C90349BE");GUID.ErrorCorrectionObject=new GUID("75B22635-668E-11CF-A6D9-00AA0062CE6C");GUID.ContentDescriptionObject=new GUID("75B22633-668E-11CF-A6D9-00AA0062CE6C");GUID.ExtendedContentDescriptionObject=new GUID("D2D0A440-E307-11D2-97F0-00A0C95EA850");GUID.ContentBrandingObject=new GUID("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");GUID.StreamBitratePropertiesObject=new GUID("7BF875CE-468D-11D1-8D82-006097C9A2B2");GUID.ContentEncryptionObject=new GUID("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");GUID.ExtendedContentEncryptionObject=new GUID("298AE614-2622-4C17-B935-DAE07EE9289C");
645GUID.DigitalSignatureObject=new GUID("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");GUID.PaddingObject=new GUID("1806D474-CADF-4509-A4BA-9AABCB96AAE8");GUID.ExtendedStreamPropertiesObject=new GUID("14E6A5CB-C672-4332-8399-A96952065B5A");GUID.AdvancedMutualExclusionObject=new GUID("A08649CF-4775-4670-8A16-6E35357566CD");GUID.GroupMutualExclusionObject=new GUID("D1465A40-5A79-4338-B71B-E36B8FD6C249");GUID.StreamPrioritizationObject=new GUID("D4FED15B-88D3-454F-81F0-ED5C45999E24");GUID.BandwidthSharingObject=new GUID("A69609E6-517B-11D2-B6AF-00C04FD908E9");GUID.LanguageListObject=new GUID("7C4346A9-EFE0-4BFC-B229-393EDE415C85");GUID.MetadataObject=new GUID("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");GUID.MetadataLibraryObject=new GUID("44231C94-9498-49D1-A141-1D134E457054");GUID.IndexParametersObject=new GUID("D6E229DF-35DA-11D1-9034-00A0C90349BE");GUID.MediaObjectIndexParametersObject=new GUID("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");GUID.TimecodeIndexParametersObject=new GUID("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");GUID.CompatibilityObject=new GUID("26F18B5D-4584-47EC-9F5F-0E651F0452C9");GUID.AdvancedContentEncryptionObject=new GUID("43058533-6981-49E6-9B74-AD12CB86D58C");GUID.AudioMedia=new GUID("F8699E40-5B4D-11CF-A8FD-00805F5C442B");GUID.VideoMedia=new GUID("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");GUID.CommandMedia=new GUID("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");GUID.JFIF_Media=new GUID("B61BE100-5B4E-11CF-A8FD-00805F5C442B");GUID.Degradable_JPEG_Media=new GUID("35907DE0-E415-11CF-A917-00805F5C442B");GUID.FileTransferMedia=new GUID("91BD222C-F21C-497A-8B6D-5AA86BFC0185");GUID.BinaryMedia=new GUID("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");GUID.ASF_Index_Placeholder_Object=new GUID("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");GUID$1.default=GUID;var AsfObject$1={},AsfUtil$1={};Object.defineProperty(AsfUtil$1,"__esModule",{value:!0});AsfUtil$1.AsfUtil=void 0;const Token$m=lib$1,util$7=Util$1;class AsfUtil{static getParserForAttr(e0){return AsfUtil.attributeParsers[e0]}static parseUnicodeAttr(e0){return util$7.stripNulls(util$7.decodeString(e0,"utf16le"))}static parseByteArrayAttr(e0){return Buffer.from(e0)}static parseBoolAttr(e0,n0=0){return AsfUtil.parseWordAttr(e0,n0)===1}static parseDWordAttr(e0,n0=0){return e0.readUInt32LE(n0)}static parseQWordAttr(e0,n0=0){return Token$m.UINT64_LE.get(e0,n0)}static parseWordAttr(e0,n0=0){return e0.readUInt16LE(n0)}}AsfUtil.attributeParsers=[AsfUtil.parseUnicodeAttr,AsfUtil.parseByteArrayAttr,AsfUtil.parseBoolAttr,AsfUtil.parseDWordAttr,AsfUtil.parseQWordAttr,AsfUtil.parseWordAttr,AsfUtil.parseByteArrayAttr];AsfUtil$1.AsfUtil=AsfUtil;(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.WmPictureToken=r0.MetadataLibraryObjectState=r0.MetadataObjectState=r0.ExtendedStreamPropertiesObjectState=r0.ExtendedContentDescriptionObjectState=r0.ContentDescriptionObjectState=r0.readCodecEntries=r0.HeaderExtensionObject=r0.StreamPropertiesObject=r0.FilePropertiesObject=r0.IgnoreObjectState=r0.State=r0.HeaderObjectToken=r0.TopLevelHeaderObjectToken=r0.DataType=void 0;const e0=Util$1,n0=lib$1,a0=GUID$1,i0=AsfUtil$1,s0=ID3v2Token;(function(v0){v0[v0.UnicodeString=0]="UnicodeString",v0[v0.ByteArray=1]="ByteArray",v0[v0.Bool=2]="Bool",v0[v0.DWord=3]="DWord",v0[v0.QWord=4]="QWord",v0[v0.Word=5]="Word"})(r0.DataType||(r0.DataType={})),r0.TopLevelHeaderObjectToken={len:30,get:(v0,S0)=>({objectId:a0.default.fromBin(new n0.BufferType(16).get(v0,S0)),objectSize:Number(n0.UINT64_LE.get(v0,S0+16)),numberOfHeaderObjects:n0.UINT32_LE.get(v0,S0+24)})},r0.HeaderObjectToken={len:24,get:(v0,S0)=>({objectId:a0.default.fromBin(new n0.BufferType(16).get(v0,S0)),objectSize:Number(n0.UINT64_LE.get(v0,S0+16))})};class o0{constructor(S0){this.len=Number(S0.objectSize)-r0.HeaderObjectToken.len}postProcessTag(S0,k0,R0,j0){if(k0==="WM/Picture")S0.push({id:k0,value:w0.fromBuffer(j0)});else{const C0=i0.AsfUtil.getParserForAttr(R0);if(!C0)throw new Error("unexpected value headerType: "+R0);S0.push({id:k0,value:C0(j0)})}}}r0.State=o0;class l0 extends o0{constructor(S0){super(S0)}get(S0,k0){return null}}r0.IgnoreObjectState=l0;class c0 extends o0{constructor(S0){super(S0)}get(S0,k0){return{fileId:a0.default.fromBin(S0,k0),fileSize:n0.UINT64_LE.get(S0,k0+16),creationDate:n0.UINT64_LE.get(S0,k0+24),dataPacketsCount:n0.UINT64_LE.get(S0,k0+32),playDuration:n0.UINT64_LE.get(S0,k0+40),sendDuration:n0.UINT64_LE.get(S0,k0+48),preroll:n0.UINT64_LE.get(S0,k0+56),flags:{broadcast:e0.getBit(S0,k0+64,24),seekable:e0.getBit(S0,k0+64,25)},minimumDataPacketSize:n0.UINT32_LE.get(S0,k0+68),maximumDataPacketSize:n0.UINT32_LE.get(S0,k0+72),maximumBitrate:n0.UINT32_LE.get(S0,k0+76)}}}c0.guid=a0.default.FilePropertiesObject,r0.FilePropertiesObject=c0;class u0 extends o0{constructor(S0){super(S0)}get(S0,k0){return{streamType:a0.default.decodeMediaType(a0.default.fromBin(S0,k0)),errorCorrectionType:a0.default.fromBin(S0,k0+8)}}}u0.guid=a0.default.StreamPropertiesObject,r0.StreamPropertiesObject=u0;class d0{constructor(){this.len=22}get(S0,k0){return{reserved1:a0.default.fromBin(S0,k0),reserved2:S0.readUInt16LE(k0+16),extensionDataSize:S0.readUInt32LE(k0+18)}}}d0.guid=a0.default.HeaderExtensionObject,r0.HeaderExtensionObject=d0;const h0={len:20,get:(v0,S0)=>({entryCount:v0.readUInt16LE(S0+16)})};async function f0(v0){const S0=await v0.readNumber(n0.UINT16_LE);return(await v0.readToken(new n0.StringType(S0*2,"utf16le"))).replace("\0","")}async function p0(v0){const S0=await v0.readToken(h0),k0=[];for(let R0=0;R0<S0.entryCount;++R0)k0.push(await m0(v0));return k0}r0.readCodecEntries=p0;async function A0(v0){const S0=await v0.readNumber(n0.UINT16_LE),k0=Buffer.alloc(S0);return await v0.readBuffer(k0),k0}async function m0(v0){const S0=await v0.readNumber(n0.UINT16_LE);return{type:{videoCodec:(S0&1)===1,audioCodec:(S0&2)===2},codecName:await f0(v0),description:await f0(v0),information:await A0(v0)}}class x0 extends o0{constructor(S0){super(S0)}get(S0,k0){const R0=[];let j0=k0+10;for(let C0=0;C0<x0.contentDescTags.length;++C0){const $0=S0.readUInt16LE(k0+C0*2);if($0>0){const T0=x0.contentDescTags[C0],I0=j0+$0;R0.push({id:T0,value:i0.AsfUtil.parseUnicodeAttr(S0.slice(j0,I0))}),j0=I0}}return R0}}x0.guid=a0.default.ContentDescriptionObject,x0.contentDescTags=["Title","Author","Copyright","Description","Rating"],r0.ContentDescriptionObjectState=x0;class g0 extends o0{constructor(S0){super(S0)}get(S0,k0){const R0=[],j0=S0.readUInt16LE(k0);let C0=k0+2;
645for(let $0=0;$0<j0;$0+=1){const T0=S0.readUInt16LE(C0);C0+=2;const I0=i0.AsfUtil.parseUnicodeAttr(S0.slice(C0,C0+T0));C0+=T0;const M0=S0.readUInt16LE(C0);C0+=2;const N0=S0.readUInt16LE(C0);C0+=2;const D0=S0.slice(C0,C0+N0);C0+=N0,this.postProcessTag(R0,I0,M0,D0)}return R0}}g0.guid=a0.default.ExtendedContentDescriptionObject,r0.ExtendedContentDescriptionObjectState=g0;class y0 extends o0{constructor(S0){super(S0)}get(S0,k0){return{startTime:n0.UINT64_LE.get(S0,k0),endTime:n0.UINT64_LE.get(S0,k0+8),dataBitrate:S0.readInt32LE(k0+12),bufferSize:S0.readInt32LE(k0+16),initialBufferFullness:S0.readInt32LE(k0+20),alternateDataBitrate:S0.readInt32LE(k0+24),alternateBufferSize:S0.readInt32LE(k0+28),alternateInitialBufferFullness:S0.readInt32LE(k0+32),maximumObjectSize:S0.readInt32LE(k0+36),flags:{reliableFlag:e0.getBit(S0,k0+40,0),seekableFlag:e0.getBit(S0,k0+40,1),resendLiveCleanpointsFlag:e0.getBit(S0,k0+40,2)},streamNumber:S0.readInt16LE(k0+42),streamLanguageId:S0.readInt16LE(k0+44),averageTimePerFrame:S0.readInt32LE(k0+52),streamNameCount:S0.readInt32LE(k0+54),payloadExtensionSystems:S0.readInt32LE(k0+56),streamNames:[],streamPropertiesObject:null}}}y0.guid=a0.default.ExtendedStreamPropertiesObject,r0.ExtendedStreamPropertiesObjectState=y0;class b0 extends o0{constructor(S0){super(S0)}get(S0,k0){const R0=[],j0=Buffer.from(S0),C0=j0.readUInt16LE(k0);let $0=k0+2;for(let T0=0;T0<C0;T0+=1){$0+=4;const I0=j0.readUInt16LE($0);$0+=2;const M0=j0.readUInt16LE($0);$0+=2;const N0=j0.readUInt32LE($0);$0+=4;const D0=i0.AsfUtil.parseUnicodeAttr(j0.slice($0,$0+I0));$0+=I0;const O0=j0.slice($0,$0+N0);$0+=N0,this.postProcessTag(R0,D0,M0,O0)}return R0}}b0.guid=a0.default.MetadataObject,r0.MetadataObjectState=b0;class E0 extends b0{constructor(S0){super(S0)}}E0.guid=a0.default.MetadataLibraryObject,r0.MetadataLibraryObjectState=E0;class w0{static fromBase64(S0){return this.fromBuffer(Buffer.from(S0,"base64"))}static fromBuffer(S0){return new w0(S0.length).get(S0,0)}constructor(S0){this.len=S0}get(S0,k0){const R0=S0.readUInt8(k0++),j0=S0.readInt32LE(k0);let C0=5;for(;S0.readUInt16BE(C0)!==0;)C0+=2;const $0=S0.slice(5,C0).toString("utf16le");for(;S0.readUInt16BE(C0)!==0;)C0+=2;const T0=S0.slice(5,C0).toString("utf16le");return{type:s0.AttachedPictureType[R0],format:$0,description:T0,size:j0,data:S0.slice(C0+4)}}}r0.WmPictureToken=w0})(AsfObject$1);Object.defineProperty(AsfParser$1,"__esModule",{value:!0});AsfParser$1.AsfParser=void 0;const debug_1$j=browserExports$2,type_1$1=type,GUID_1=GUID$1,AsfObject=AsfObject$1,BasicParser_1$9=BasicParser$1,debug$j=(0,debug_1$j.default)("music-metadata:parser:ASF"),headerType="asf";class AsfParser extends BasicParser_1$9.BasicParser{async parse(){const e0=await this.tokenizer.readToken(AsfObject.TopLevelHeaderObjectToken);if(!e0.objectId.equals(GUID_1.default.HeaderObject))throw new Error("expected asf header; but was not found; got: "+e0.objectId.str);try{await this.parseObjectHeader(e0.numberOfHeaderObjects)}catch(n0){debug$j("Error while parsing ASF: %s",n0)}}async parseObjectHeader(e0){let n0;do{const a0=await this.tokenizer.readToken(AsfObject.HeaderObjectToken);switch(debug$j("header GUID=%s",a0.objectId.str),a0.objectId.str){case AsfObject.FilePropertiesObject.guid.str:const i0=await this.tokenizer.readToken(new AsfObject.FilePropertiesObject(a0));this.metadata.setFormat("duration",Number(i0.playDuration/BigInt(1e3))/1e4-Number(i0.preroll)/1e3),this.metadata.setFormat("bitrate",i0.maximumBitrate);break;case AsfObject.StreamPropertiesObject.guid.str:const s0=await this.tokenizer.readToken(new AsfObject.StreamPropertiesObject(a0));this.metadata.setFormat("container","ASF/"+s0.streamType);break;case AsfObject.HeaderExtensionObject.guid.str:const o0=await this.tokenizer.readToken(new AsfObject.HeaderExtensionObject);await this.parseExtensionObject(o0.extensionDataSize);break;case AsfObject.ContentDescriptionObjectState.guid.str:n0=await this.tokenizer.readToken(new AsfObject.ContentDescriptionObjectState(a0)),this.addTags(n0);break;case AsfObject.ExtendedContentDescriptionObjectState.guid.str:n0=await this.tokenizer.readToken(new AsfObject.ExtendedContentDescriptionObjectState(a0)),this.addTags(n0);break;case GUID_1.default.CodecListObject.str:const l0=await AsfObject.readCodecEntries(this.tokenizer);
645l0.forEach(u0=>{this.metadata.addStreamInfo({type:u0.type.videoCodec?type_1$1.TrackType.video:type_1$1.TrackType.audio,codecName:u0.codecName})});const c0=l0.filter(u0=>u0.type.audioCodec).map(u0=>u0.codecName).join("/");this.metadata.setFormat("codec",c0);break;case GUID_1.default.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(a0.objectSize-AsfObject.HeaderObjectToken.len);break;case GUID_1.default.PaddingObject.str:debug$j("Padding: %s bytes",a0.objectSize-AsfObject.HeaderObjectToken.len),await this.tokenizer.ignore(a0.objectSize-AsfObject.HeaderObjectToken.len);break;default:this.metadata.addWarning("Ignore ASF-Object-GUID: "+a0.objectId.str),debug$j("Ignore ASF-Object-GUID: %s",a0.objectId.str),await this.tokenizer.readToken(new AsfObject.IgnoreObjectState(a0))}}while(--e0)}addTags(e0){e0.forEach(n0=>{this.metadata.addTag(headerType,n0.id,n0.value)})}async parseExtensionObject(e0){do{const n0=await this.tokenizer.readToken(AsfObject.HeaderObjectToken),a0=n0.objectSize-AsfObject.HeaderObjectToken.len;switch(n0.objectId.str){case AsfObject.ExtendedStreamPropertiesObjectState.guid.str:await this.tokenizer.readToken(new AsfObject.ExtendedStreamPropertiesObjectState(n0));break;case AsfObject.MetadataObjectState.guid.str:const i0=await this.tokenizer.readToken(new AsfObject.MetadataObjectState(n0));this.addTags(i0);break;case AsfObject.MetadataLibraryObjectState.guid.str:const s0=await this.tokenizer.readToken(new AsfObject.MetadataLibraryObjectState(n0));this.addTags(s0);break;case GUID_1.default.PaddingObject.str:await this.tokenizer.ignore(a0);break;case GUID_1.default.CompatibilityObject.str:this.tokenizer.ignore(a0);break;case GUID_1.default.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(a0);break;default:this.metadata.addWarning("Ignore ASF-Object-GUID: "+n0.objectId.str),await this.tokenizer.readToken(new AsfObject.IgnoreObjectState(n0));break}e0-=n0.objectSize}while(e0>0)}}AsfParser$1.AsfParser=AsfParser;var FlacParser$1={},Vorbis={};Object.defineProperty(Vorbis,"__esModule",{value:!0});Vorbis.IdentificationHeader=Vorbis.CommonHeader=Vorbis.VorbisPictureToken=void 0;const Token$l=lib$1,ID3v2Token_1$1=ID3v2Token;class VorbisPictureToken{static fromBase64(e0){return this.fromBuffer(Buffer.from(e0,"base64"))}static fromBuffer(e0){return new VorbisPictureToken(e0.length).get(e0,0)}constructor(e0){this.len=e0}get(e0,n0){const a0=ID3v2Token_1$1.AttachedPictureType[Token$l.UINT32_BE.get(e0,n0)],i0=Token$l.UINT32_BE.get(e0,n0+=4),s0=e0.toString("utf-8",n0+=4,n0+i0),o0=Token$l.UINT32_BE.get(e0,n0+=i0),l0=e0.toString("utf-8",n0+=4,n0+o0),c0=Token$l.UINT32_BE.get(e0,n0+=o0),u0=Token$l.UINT32_BE.get(e0,n0+=4),d0=Token$l.UINT32_BE.get(e0,n0+=4),h0=Token$l.UINT32_BE.get(e0,n0+=4),f0=Token$l.UINT32_BE.get(e0,n0+=4),p0=Buffer.from(e0.slice(n0+=4,n0+f0));return{type:a0,format:s0,description:l0,width:c0,height:u0,colour_depth:d0,indexed_color:h0,data:p0}}}Vorbis.VorbisPictureToken=VorbisPictureToken;Vorbis.CommonHeader={len:7,get:(r0,e0)=>({packetType:r0.readUInt8(e0),vorbis:new Token$l.StringType(6,"ascii").get(r0,e0+1)})};Vorbis.IdentificationHeader={len:23,get:(r0,e0)=>{const n0=new DataView(r0.buffer,r0.byteOffset);return{version:n0.getUint32(e0+0,!0),channelMode:n0.getUint8(e0+4),sampleRate:n0.getUint32(e0+5,!0),bitrateMax:n0.getUint32(e0+9,!0),bitrateNominal:n0.getUint32(e0+13,!0),bitrateMin:n0.getUint32(e0+17,!0)}}};var AbstractID3Parser$1={};Object.defineProperty(AbstractID3Parser$1,"__esModule",{value:!0});AbstractID3Parser$1.AbstractID3Parser=void 0;const core_1$2=core$1,debug_1$i=browserExports$2,ID3v2Token_1=ID3v2Token,ID3v2Parser_1$3=ID3v2Parser$1,ID3v1Parser_1$2=ID3v1Parser,BasicParser_1$8=BasicParser$1,debug$i=(0,debug_1$i.default)("music-metadata:parser:ID3");class AbstractID3Parser extends BasicParser_1$8.BasicParser{constructor(){super(...arguments),this.id3parser=new ID3v2Parser_1$3.ID3v2Parser}static async startsWithID3v2Header(e0){return(await e0.peekToken(ID3v2Token_1.ID3v2Header)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(e0){if(e0 instanceof core_1$2.EndOfStreamError)debug$i("End-of-stream");else throw e0}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),debug$i("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new ID3v1Parser_1$2.ID3v1Parser().init(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(ID3v2Token_1.ID3v2Header)).fileIdentifier==="ID3")return debug$i("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}AbstractID3Parser$1.AbstractID3Parser=AbstractID3Parser;var VorbisParser$1={},VorbisDecoder$1={};Object.defineProperty(VorbisDecoder$1,"__esModule",{value:!0});VorbisDecoder$1.VorbisDecoder=void 0;const Token$k=lib$1;class VorbisDecoder{constructor(e0,n0){this.data=e0,this.offset=n0}readInt32(){const e0=Token$k.UINT32_LE.get(this.data,this.offset);return this.offset+=4,e0}readStringUtf8(){const e0=this.readInt32(),n0=Buffer.from(this.data).toString("utf-8",this.offset,this.offset+e0);return this.offset+=e0,n0}parseUserComment(){const e0=this.offset,n0=this.readStringUtf8(),a0=n0.indexOf("=");return{key:n0.slice(0,a0).toUpperCase(),value:n0.slice(a0+1),len:this.offset-e0}}}VorbisDecoder$1.VorbisDecoder=VorbisDecoder;Object.defineProperty(VorbisParser$1,"__esModule",{value:!0});VorbisParser$1.VorbisParser=void 0;const Token$j=lib$1,debug_1$h=browserExports$2,VorbisDecoder_1$1=VorbisDecoder$1,Vorbis_1$1=Vorbis,debug$h=(0,debug_1$h.default)("music-metadata:parser:ogg:vorbis1");class VorbisParser{constructor(e0,n0){this.metadata=e0,this.options=n0,this.pageSegments=[]}parsePage(e0,n0){if(e0.headerType.firstPage)this.parseFirstPage(e0,n0);else{if(e0.headerType.continued){if(this.pageSegments.length===0)throw new Error("Cannot continue on previous page");this.pageSegments.push(n0)}if(e0.headerType.lastPage||!e0.headerType.continued){if(this.pageSegments.length>0){const a0=Buffer.concat(this.pageSegments);this.parseFullPage(a0)}this.pageSegments=e0.headerType.lastPage?[]:[n0]}}e0.headerType.lastPage&&this.calculateDuration(e0)}flush(){this.parseFullPage(Buffer.concat(this.pageSegments))}parseUserComment(e0,n0){const i0=new VorbisDecoder_1$1.VorbisDecoder(e0,n0).parseUserComment();return this.addTag(i0.key,i0.value),i0.len}addTag(e0,n0){if(e0==="METADATA_BLOCK_PICTURE"&&typeof n0=="string"){if(this.options.skipCovers){debug$h("Ignore picture");return}n0=Vorbis_1$1.VorbisPictureToken.fromBase64(n0),debug$h(`Push picture: id=${e0}, format=${n0.format}`)}else debug$h(`Push tag: id=${e0}, value=${n0}`);this.metadata.addTag("vorbis",e0,n0)}calculateDuration(e0){this.metadata.format.sampleRate&&e0.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",e0.absoluteGranulePosition),this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate))}parseFirstPage(e0,n0){this.metadata.setFormat("codec","Vorbis I"),debug$h("Parse first page");const a0=Vorbis_1$1.CommonHeader.get(n0,0);if(a0.vorbis!=="vorbis")throw new Error("Metadata does not look like Vorbis");if(a0.packetType===1){const i0=Vorbis_1$1.IdentificationHeader.get(n0,Vorbis_1$1.CommonHeader.len);this.metadata.setFormat("sampleRate",i0.sampleRate),this.metadata.setFormat("bitrate",i0.bitrateNominal),this.metadata.setFormat("numberOfChannels",i0.channelMode),debug$h("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",i0.sampleRate,i0.bitrateNominal,i0.channelMode)}else throw new Error("First Ogg page should be type 1: the identification header")}parseFullPage(e0){const n0=Vorbis_1$1.CommonHeader.get(e0,0);switch(debug$h("Parse full page: type=%s, byteLength=%s",n0.packetType,e
6450.byteLength),n0.packetType){case 3:return this.parseUserCommentList(e0,Vorbis_1$1.CommonHeader.len)}}parseUserCommentList(e0,n0){const a0=Token$j.UINT32_LE.get(e0,n0);n0+=4,n0+=a0;let i0=Token$j.UINT32_LE.get(e0,n0);for(n0+=4;i0-- >0;)n0+=this.parseUserComment(e0,n0)}}VorbisParser$1.VorbisParser=VorbisParser;Object.defineProperty(FlacParser$1,"__esModule",{value:!0});FlacParser$1.FlacParser=void 0;const token_types_1$1=lib$1,debug_1$g=browserExports$2,util$6=Util$1,Vorbis_1=Vorbis,AbstractID3Parser_1$3=AbstractID3Parser$1,FourCC_1$7=FourCC,VorbisParser_1$3=VorbisParser$1,VorbisDecoder_1=VorbisDecoder$1,debug$g=(0,debug_1$g.default)("music-metadata:parser:FLAC");var BlockType;(function(r0){r0[r0.STREAMINFO=0]="STREAMINFO",r0[r0.PADDING=1]="PADDING",r0[r0.APPLICATION=2]="APPLICATION",r0[r0.SEEKTABLE=3]="SEEKTABLE",r0[r0.VORBIS_COMMENT=4]="VORBIS_COMMENT",r0[r0.CUESHEET=5]="CUESHEET",r0[r0.PICTURE=6]="PICTURE"})(BlockType||(BlockType={}));class FlacParser extends AbstractID3Parser_1$3.AbstractID3Parser{constructor(){super(...arguments),this.padding=0}init(e0,n0,a0){return super.init(e0,n0,a0),this.vorbisParser=new VorbisParser_1$3.VorbisParser(e0,a0),this}async postId3v2Parse(){if((await this.tokenizer.readToken(FourCC_1$7.FourCcToken)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let n0;do n0=await this.tokenizer.readToken(Metadata$1.BlockHeader),await this.parseDataBlock(n0);while(!n0.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){const a0=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*a0/this.metadata.format.duration)}}parseDataBlock(e0){switch(debug$g(`blockHeader type=${e0.type}, length=${e0.length}`),e0.type){case BlockType.STREAMINFO:return this.parseBlockStreamInfo(e0.length);case BlockType.PADDING:this.padding+=e0.length;break;case BlockType.APPLICATION:break;case BlockType.SEEKTABLE:break;case BlockType.VORBIS_COMMENT:return this.parseComment(e0.length);case BlockType.CUESHEET:break;case BlockType.PICTURE:return this.parsePicture(e0.length).then();default:this.metadata.addWarning("Unknown block type: "+e0.type)}return this.tokenizer.ignore(e0.length).then()}async parseBlockStreamInfo(e0){if(e0!==Metadata$1.BlockStreamInfo.len)throw new Error("Unexpected block-stream-info length");const n0=await this.tokenizer.readToken(Metadata$1.BlockStreamInfo);this.metadata.setFormat("container","FLAC"),this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",n0.channels),this.metadata.setFormat("bitsPerSample",n0.bitsPerSample),this.metadata.setFormat("sampleRate",n0.sampleRate),n0.totalSamples>0&&this.metadata.setFormat("duration",n0.totalSamples/n0.sampleRate)}async parseComment(e0){const n0=await this.tokenizer.readToken(new token_types_1$1.Uint8ArrayType(e0)),a0=new VorbisDecoder_1.VorbisDecoder(n0,0);a0.readStringUtf8();const i0=a0.readInt32();for(let s0=0;s0<i0;s0++){const o0=a0.parseUserComment();this.vorbisParser.addTag(o0.key,o0.value)}}async parsePicture(e0){if(this.options.skipCovers)return this.tokenizer.ignore(e0);{const n0=await this.tokenizer.readToken(new Vorbis_1.VorbisPictureToken(e0));this.vorbisParser.addTag("METADATA_BLOCK_PICTURE",n0)}}}FlacParser$1.FlacParser=FlacParser;let Metadata$1=class{};Metadata$1.BlockHeader={len:4,get:(r0,e0)=>({lastBlock:util$6.getBit(r0,e0,7),type:util$6.getBitAllignedNumber(r0,e0,1,7),length:token_types_1$1.UINT24_BE.get(r0,e0+1)})};Metadata$1.BlockStreamInfo={len:34,get:(r0,e0)=>({minimumBlockSize:token_types_1$1.UINT16_BE.get(r0,e0),maximumBlockSize:token_types_1$1.UINT16_BE.get(r0,e0+2)/1e3,minimumFrameSize:token_types_1$1.UINT24_BE.get(r0,e0+4),maximumFrameSize:token_types_1$1.UINT24_BE.get(r0,e0+7),sampleRate:token_types_1$1.UINT24_BE.get(r0,e0+10)>>4,channels:util$6.getBitAllignedNumber(r0,e0+12,4,3)+1,bitsPerSample:util$6.getBitAllignedNumber(r0,e0+12,7,5)+1,totalSamples:util$6.getBitAllignedNumber(r0,e0+13,4,36),fileMD5:new token_types_1$1.Uint8ArrayType(16).get(r0,e0+18)})};var MP4Parser$1={},Atom$1={},AtomToken$2={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.ChapterText=r0.StcoAtom=r0.StszAtom=r0.StscAtom=r0.SampleToChunkToken=r0.SttsAtom=r0.TimeToSampleToken=r0.SoundSampleDescriptionV0=r0.SoundSampleDescriptionVersion=r0.StsdAtom=r0.TrackHeaderAtom=r0.NameAtom=r0.DataAtom=r0.MvhdAtom=r0.MdhdAtom=r0.FixedLengthAtom=r0.mhdr=r0.tkhd=r0.ftyp=r0.ExtendedSize=r0.Header=void 0;const e0=lib$1,n0=browserExports$2,a0=FourCC,i0=(0,n0.default)("music-metadata:parser:MP4:atom");r0.Header={len:8,get:(v0,S0)=>{const k0=e0.UINT32_BE.get(v0,S0);if(k0<0)throw new Error("Invalid atom header length");return{length:BigInt(k0),name:new e0.StringType(4,"binary").get(v0,S0+4)}},put:(v0,S0,k0)=>(e0.UINT32_BE.put(v0,S0,Number(k0.length)),a0.FourCcToken.put(v0,S0+4,k0.name))},r0.ExtendedSize=e0.UINT64_BE,r0.ftyp={len:4,get:(v0,S0)=>({type:new e0.StringType(4,"ascii").get(v0,S0)})},r0.tkhd={len:4,get:(v0,S0)=>({type:new e0.StringType(4,"ascii").get(v0,S0)})},r0.mhdr={len:8,get:(v0,S0)=>({version:e0.UINT8.get(v0,S0),flags:e0.UINT24_BE.get(v0,S0+1),nextItemID:e0.UINT32_BE.get(v0,S0+4)})};class s0{constructor(S0,k0,R0){if(this.len=S0,S0<k0)throw new Error(`Atom ${R0} expected to be ${k0}, but specifies ${S0} bytes long.`);S0>k0&&i0(`Warning: atom ${R0} expected to be ${k0}, but was actually ${S0} bytes long.`)}}r0.FixedLengthAtom=s0;const o0={len:4,get:(v0,S0)=>{const k0=e0.UINT32_BE.get(v0,S0)-2082844800;return new Date(k0*1e3)}};class l0 extends s0{constructor(S0){super(S0,24,"mdhd"),this.len=S0}get(S0,k0){return{version:e0.UINT8.get(S0,k0+0),flags:e0.UINT24_BE.get(S0,k0+1),creationTime:o0.get(S0,k0+4),modificationTime:o0.get(S0,k0+8),timeScale:e0.UINT32_BE.get(S0,k0+12),duration:e0.UINT32_BE.get(S0,k0+16),language:e0.UINT16_BE.get(S0,k0+20),quality:e0.UINT16_BE.get(S0,k0+22)}}}r0.MdhdAtom=l0;class c0 extends s0{constructor(S0){super(S0,100,"mvhd"),this.len=S0}get(S0,k0){return{version:e0.UINT8.get(S0,k0),flags:e0.UINT24_BE.get(S0,k0+1),creationTime:o0.get(S0,k0+4),modificationTime:o0.get(S0,k0+8),timeScale:e0.UINT32_BE.get(S0,k0+12),duration:e0.UINT32_BE.get(S0,k0+16),preferredRate:e0.UINT32_BE.get(S0,k0+20),preferredVolume:e0.UINT16_BE.get(S0,k0+24),previewTime:e0.UINT32_BE.get(S0,k0+72),previewDuration:e0.UINT32_BE.get(S0,k0+76),posterTime:e0.UINT32_BE.get(S0,k0+80),selectionTime:e0.UINT32_BE.get(S0,k0+84),selectionDuration:e0.UINT32_BE.get(S0,k0+88),currentTime:e0.UINT32_BE.get(S0,k0+92),nextTrackID:e0.UINT32_BE.get(S0,k0+96)}}}r0.MvhdAtom=c0;class u0{constructor(S0){this.len=S0}get(S0,k0){return{type:{set:e0.UINT8.get(S0,k0+0),type:e0.UINT24_BE.get(S0,k0+1)},locale:e0.UINT24_BE.get(S0,k0+4),value:Buffer.from(new e0.Uint8ArrayType(this.len-8).get(S0,k0+8))}}}r0.DataAtom=u0;class d0{constructor(S0){this.len=S0}get(S0,k0){return{version:e0.UINT8.get(S0,k0),flags:e0.UINT24_BE.get(S0,k0+1),name:new e0.StringType(this.len-4,"utf-8").get(S0,k0+4)}}}r0.NameAtom=d0;class h0{constructor(S0){this.len=S0}get(S0,k0){return{version:e0.UINT8.get(S0,k0),flags:e0.UINT24_BE.get(S0,k0+1),creationTime:o0.get(S0,k0+4),modificationTime:o0.get(S0,k0+8),trackId:e0.UINT32_BE.get(S0,k0+12),duration:e0.UINT32_BE.get(S0,k0+20),layer:e0.UINT16_BE.get(S0,k0+24),alternateGroup:e0.UINT16_BE.get(S0,k0+26),volume:e0.UINT16_BE.get(S0,k0+28)}}}r0.TrackHeaderAtom=h0;const f0={len:8,get:(v0,S0)=>({version:e0.UINT8.get(v0,S0),flags:e0.UINT24_BE.get(v0,S0+1),numberOfEntries:e0.UINT32_BE.get(v0,S0+4)})};class p0{constructor(S0){this.len=S0}get(S0,k0){return{dataFormat:a0.FourCcToken.get(S0,k0),dataReferenceIndex:e0.UINT16_BE.get(S0,k0+10),description:new e0.Uint8ArrayType(this.len-12).get(S0,k0+12)}}}class A0{constructor(S0){this.len=S0}get(S0,k0){const R0=f0.get(S0,k0);k0+=f0.len;const j0=[];for(let C0=0;C0<R0.numberOfEntries;++C0){const $0=e0.UINT32_BE.get(S0,k0);k0+=e0.UINT32_BE.len,j0.push(new p0($0).get(S0,k0)),k0+=$0}return{header:R0,table:j0}}}r0.StsdAtom=A0,r0.SoundSampleDescriptionVersion={len:8,get(v0,S0){return{version:e0.INT16_BE.get(v0,S0),revision:e0.INT16_BE.get(v0,S0+2),vendor:e0.INT32_BE.get(v0,S0+4)}}},r0.SoundSampleDescriptionV0={len:12,get(v0,S0){return{numAudioChannels:e0.INT16_BE.get(v0,S0+0),sampleSize:e0.INT16_BE.get(v0,S0+2),compressionId:e0.INT16_BE.get(v0,S0+4),packetSize:e0.INT16_BE.get(v0,S0+6),sampleRate:e0.UINT16_BE.get(v0,S0+8)+e0.UINT16_BE.get(v0,S0+10)/1e4}}};class m0{constructor(S0,k0){this.len=S0,this.token=k0}get(S0,k0){const R0=e0.INT32_BE.get(S0,k0+4);return{version:e0.INT8.get(S0,k0+0),flags:e0.INT24_BE.get(S0,k0+1),numberOfEntries:R0,entries:w0(S0,this.token,k0+8,this.len-8,R0)}}}r0.TimeToSampleToken={len:8,get(v0,S0){return{count:e0.INT32_BE.get(v0,S0+0),duration:e0.INT32_BE.get(v0,S0+4)}}};class x0 extends m0{constructor(S0){super(S0,r0.TimeToSampleToken),this.len=S0}}r0.SttsAtom=x0,r0.SampleToChunkToken={len:12,get(v0,S0){return{firstChunk:e0.INT32_BE.get(v0,S0),samplesPerChunk:e0.INT32_BE.get(v0,S0+4),sampleDescriptionId:e0.INT32_BE.get(v0,S0+8)}}};class g0 extends m0{constructor(S0){super(S0,r0.SampleToChunkToken),this.len=S0}}r0.StscAtom=g0;class y0{constructor(S0){this.len=S0}get(S0,k0){const R0=e0.INT32_BE.get(S0,k0+8);return{version:e0.INT8.get(S0,k0),flags:e0.INT24_BE.get(S0,k0+1),sampleSize:e0.INT32_BE.get(S0,k0+4),numberOfEntries:R0,entries:w0(S0,e0.INT32_BE,k0+12,this.len-12,R0)}}}r0.StszAtom=y0;class b0 extends m0{constructor(S0){super(S0,e0.INT32_BE),this.len=S0}}r0.StcoAtom=b0;class E0{constructor(S0){this.len=S0}get(S0,k0){const R0=e0.INT16_BE.get(S0,k0+0);return new e0.StringType(R0,"utf-8").get(S0,k0+2)}}r0.ChapterText=E0;function w0(v0,S0,k0,R0,j0){if(i0(`remainingLen=${R0}, numberOfEntries=${j0} * token-len=${S0.len}`),R0===0)return[];if(R0!==j0*S0.len)throw new Error("mismatch number-of-entries with remaining atom-length");const C0=[];for(let $0=0;$0<j0;++$0)C0.push(S0.get(v0,k0)),k0+=S0.len;return C0}})(AtomToken$2);Object.defineProperty(Atom$1,"__esModule",{value:!0});Atom$1.Atom=void 0;const debug_1$f=browserExports$2,AtomToken$1=AtomToken$2,debug$f=(0,debug_1$f.default)("music-metadata:parser:MP4:Atom");class Atom{static async readAtom(e0,n0,a0,i0){const s0=e0.position,o0=await e0.readToken(AtomToken$1.Header);o0.length===BigInt(1)&&(o0.length=await e0.readToken(AtomToken$1.ExtendedSize));const c0=new Atom(o0,o0.length===BigInt(1),a0),u0=c0.getPayloadLength(i0);return debug$f(`parse atom name=${c0.atomPath}
645, extended=${c0.extended}, offset=${s0}, len=${c0.header.length}`),await c0.readData(e0,n0,u0),c0}constructor(e0,n0,a0){this.header=e0,this.extended=n0,this.parent=a0,this.children=[],this.atomPath=(this.parent?this.parent.atomPath+".":"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(e0){return(this.header.length===BigInt(0)?e0:Number(this.header.length))-this.getHeaderLength()}async readAtoms(e0,n0,a0){for(;a0>0;){const i0=await Atom.readAtom(e0,n0,this,a0);this.children.push(i0),a0-=i0.header.length===BigInt(0)?a0:Number(i0.header.length)}}async readData(e0,n0,a0){switch(this.header.name){case"moov":case"udta":case"trak":case"mdia":case"minf":case"stbl":case"<id>":case"ilst":case"tref":return this.readAtoms(e0,n0,this.getPayloadLength(a0));case"meta":const s0=(await e0.peekToken(AtomToken$1.Header)).name==="hdlr"?0:4;return await e0.ignore(s0),this.readAtoms(e0,n0,this.getPayloadLength(a0)-s0);case"mdhd":case"mvhd":case"tkhd":case"stsz":case"mdat":default:return n0(this,a0)}}}Atom$1.Atom=Atom;Object.defineProperty(MP4Parser$1,"__esModule",{value:!0});MP4Parser$1.MP4Parser=void 0;const debug_1$e=browserExports$2,Token$i=lib$1,BasicParser_1$7=BasicParser$1,ID3v1Parser_1$1=ID3v1Parser,type_1=type,Atom_1=Atom$1,AtomToken=AtomToken$2,debug$e=(0,debug_1$e.default)("music-metadata:parser:MP4"),tagFormat="iTunes",encoderDict={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};function distinct(r0,e0,n0){return n0.indexOf(r0)===e0}class MP4Parser extends BasicParser_1$7.BasicParser{constructor(){super(...arguments),this.atomParsers={mvhd:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.MvhdAtom(e0));this.metadata.setFormat("creationTime",n0.creationTime),this.metadata.setFormat("modificationTime",n0.modificationTime)},mdhd:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.MdhdAtom(e0)),a0=this.getTrackDescription();a0.creationTime=n0.creationTime,a0.modificationTime=n0.modificationTime,a0.timeScale=n0.timeScale,a0.duration=n0.duration},chap:async e0=>{const n0=this.getTrackDescription(),a0=[];for(;e0>=Token$i.UINT32_BE.len;)a0.push(await this.tokenizer.readNumber(Token$i.UINT32_BE)),e0-=Token$i.UINT32_BE.len;n0.chapterList=a0},tkhd:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.TrackHeaderAtom(e0));this.tracks.push(n0)},mdat:async e0=>{if(this.audioLengthInBytes=e0,this.calculateBitRate(),this.options.includeChapters){const n0=this.tracks.filter(a0=>a0.chapterList);if(n0.length===1){const a0=n0[0].chapterList,i0=this.tracks.filter(s0=>a0.indexOf(s0.trackId)!==-1);if(i0.length===1)return this.parseChapterTrack(i0[0],n0[0],e0)}}await this.tokenizer.ignore(e0)},ftyp:async e0=>{const n0=[];for(;e0>0;){const i0=await this.tokenizer.readToken(AtomToken.ftyp);e0-=AtomToken.ftyp.len;const s0=i0.type.replace(/\W/g,"");s0.length>0&&n0.push(s0)}debug$e(`ftyp: ${n0.join("/")}`);const a0=n0.filter(distinct).join("/");this.metadata.setFormat("container",a0)},stsd:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.StsdAtom(e0)),a0=this.getTrackDescription();a0.soundSampleDescription=n0.table.map(i0=>this.parseSoundSampleDescription(i0))},stsc:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.StscAtom(e0));this.getTrackDescription().sampleToChunkTable=n0.entries},stts:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.SttsAtom(e0));this.getTrackDescription().timeToSampleTable=n0.entries},stsz:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.StszAtom(e0)),a0=this.getTrackDescription();a0.sampleSize=n0.sampleSize,a0.sampleSizeTable=n0.entries},stco:async e0=>{const n0=await this.tokenizer.readToken(new AtomToken.StcoAtom(e0));this.getTrackDescription().chunkOffsetTable=n0.entries},date:async e0=>{const n0=await this.tokenizer.readToken(new Token$i.StringType(e0,"utf-8"));this.addTag("date",n0)}}}static read_BE_Integer(e0,n0){const a0=(n0?"INT":"UINT")+e0.length*8+(e0.length>1?"_BE":""),i0=Token$i[a0];if(!i0)throw new Error('Token for integer type not found: "'+a0+'"');return Number(i0.get(e0,0))}async parse(){this.tracks=[];let e0=this.tokenizer.fileInfo.size;
645for(;!this.tokenizer.fileInfo.size||e0>0;){try{if((await this.tokenizer.peekToken(AtomToken.Header)).name==="\0\0\0\0"){const o0=`Error at offset=${this.tokenizer.position}: box.id=0`;debug$e(o0),this.addWarning(o0);break}}catch(s0){const o0=`Error at offset=${this.tokenizer.position}: ${s0.message}`;debug$e(o0),this.addWarning(o0);break}const i0=await Atom_1.Atom.readAtom(this.tokenizer,(s0,o0)=>this.handleAtom(s0,o0),null,e0);e0-=i0.header.length===BigInt(0)?e0:Number(i0.header.length)}const n0=[];this.tracks.forEach(i0=>{const s0=[];i0.soundSampleDescription.forEach(o0=>{const l0={},c0=encoderDict[o0.dataFormat];if(c0?(s0.push(c0.format),l0.codecName=c0.format):l0.codecName=`<${o0.dataFormat}>`,o0.description){const{description:u0}=o0;u0.sampleRate>0&&(l0.type=type_1.TrackType.audio,l0.audio={samplingFrequency:u0.sampleRate,bitDepth:u0.sampleSize,channels:u0.numAudioChannels})}this.metadata.addStreamInfo(l0)}),s0.length>=1&&n0.push(s0.join("/"))}),n0.length>0&&this.metadata.setFormat("codec",n0.filter(distinct).join("+"));const a0=this.tracks.filter(i0=>i0.soundSampleDescription.length>=1&&i0.soundSampleDescription[0].description&&i0.soundSampleDescription[0].description.numAudioChannels>0);if(a0.length>=1){const i0=a0[0];if(i0.timeScale>0){const l0=i0.duration/i0.timeScale;this.metadata.setFormat("duration",l0)}const s0=i0.soundSampleDescription[0];if(s0.description&&(this.metadata.setFormat("sampleRate",s0.description.sampleRate),this.metadata.setFormat("bitsPerSample",s0.description.sampleSize),this.metadata.setFormat("numberOfChannels",s0.description.numAudioChannels),i0.timeScale===0&&i0.timeToSampleTable.length>0)){const c0=i0.timeToSampleTable.map(u0=>u0.count*u0.duration).reduce((u0,d0)=>u0+d0)/s0.description.sampleRate;this.metadata.setFormat("duration",c0)}const o0=encoderDict[s0.dataFormat];o0&&this.metadata.setFormat("lossless",!o0.lossy),this.calculateBitRate()}}async handleAtom(e0,n0){if(e0.parent)switch(e0.parent.header.name){case"ilst":case"<id>":return this.parseMetadataItemData(e0)}if(this.atomParsers[e0.header.name])return this.atomParsers[e0.header.name](n0);debug$e(`No parser for atom path=${e0.atomPath}, payload-len=${n0}, ignoring atom`),await this.tokenizer.ignore(n0)}getTrackDescription(){return this.tracks[this.tracks.length-1]}calculateBitRate(){this.audioLengthInBytes&&this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*this.audioLengthInBytes/this.metadata.format.duration)}addTag(e0,n0){this.metadata.addTag(tagFormat,e0,n0)}addWarning(e0){debug$e("Warning: "+e0),this.metadata.addWarning(e0)}parseMetadataItemData(e0){let n0=e0.header.name;return e0.readAtoms(this.tokenizer,async(a0,i0)=>{const s0=a0.getPayloadLength(i0);switch(a0.header.name){case"data":return this.parseValueAtom(n0,a0);case"name":case"mean":case"rate":const o0=await this.tokenizer.readToken(new AtomToken.NameAtom(s0));n0+=":"+o0.name;break;default:const l0=await this.tokenizer.readToken(new Token$i.BufferType(s0));this.addWarning("Unsupported meta-item: "+n0+"["+a0.header.name+"] => value="+l0.toString("hex")+" ascii="+l0.toString("ascii"))}},e0.getPayloadLength(0))}async parseValueAtom(e0,n0){const a0=await this.tokenizer.readToken(new AtomToken.DataAtom(Number(n0.header.length)-AtomToken.Header.len));if(a0.type.set!==0)throw new Error("Unsupported type-set != 0: "+a0.type.set);switch(a0.type.type){case 0:switch(e0){case"trkn":case"disk":const i0=Token$i.UINT8.get(a0.value,3),s0=Token$i.UINT8.get(a0.value,5);this.addTag(e0,i0+"/"+s0);break;case"gnre":const o0=Token$i.UINT8.get(a0.value,1),l0=ID3v1Parser_1$1.Genres[o0-1];this.addTag(e0,l0);break;case"rate":const c0=a0.value.toString("ascii");this.addTag(e0,c0);break;default:debug$e("unknown proprietary value type for: "+n0.atomPath)}break;case 1:case 18:this.addTag(e0,a0.value.toString("utf-8"));break;case 13:if(this.options.skipCovers)break;this.addTag(e0,{format:"image/jpeg",data:Buffer.from(a0.value)});break;case 14:if(this.options.skipCovers)break;this.addTag(e0,{format:"image/png",data:Buffer.from(a0.value)});break;case 21:this.addTag(e0,MP4Parser.read_BE_Integer(a0.value,!0));break;case 22:this.addTag(e0,MP4Parser.read_BE_Integer(a0.value,!1));break;case 65:this.addTag(e0,a0.value.readInt8(0));break;case 66:this.addTag(e0,a0.value.readInt16BE(0));break;case 67:this.addTag(e0,a0.value.readInt32BE(0));break;default:this.addWarning(`atom key=${e0}, has unknown well-known-type (data-type): ${a0.type.type}`)}}parseSoundSampleDescription(e0){const n0={dataFormat:e0.dataFormat,dataReferenceIndex:e0.dataReferenceIndex};let a0=0;const i0=AtomToken.SoundSampleDescriptionVersion.get(e0.description,a0);return a0+=AtomToken.SoundSampleDescriptionVersion.len,i0.version===0||i0.version===1?n0.description=AtomToken.SoundSampleDescriptionV0.get(e0.description,a0):debug$e(`Warning: sound-sample-description ${i0} not implemented`),n0}async parseChapterTrack(e0,n0,a0){if(!e0.sampleSize&&e0.chunkOffsetTable.length!==e0.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");const i0=[];for(let s0=0;s0<e0.chunkOffsetTable.length&&a0>0;++s0){const l0=e0.chunkOffsetTable[s0]-this.tokenizer.position,c0=e0.sampleSize>0?e0.sampleSize:e0.sampleSizeTable[s0];if(a0-=l0+c0,a0<0)throw new Error("Chapter chunk exceeding token length");await this.tokenizer.ignore(l0);const u0=await this.tokenizer.readToken(new AtomToken.ChapterText(c0));debug$e(`Chapter ${s0+1}: ${u0}`);const d0={title:u0,sampleOffset:this.findSampleOffset(n0,this.tokenizer.position)};debug$e(`Chapter title=${d0.title}, offset=${d0.sampleOffset}/${this.tracks[0].duration}`),i0.push(d0)}this.metadata.setFormat("chapters",i0),await this.tokenizer.ignore(a0)}findSampleOffset(e0,n0){let a0=0;e0.timeToSampleTable.forEach(s0=>{a0+=s0.count*s0.duration}),debug$e(`Total duration=${a0}`);let i0=0;for(;i0<e0.chunkOffsetTable.length&&e0.chunkOffsetTable[i0]<n0;)++i0;return this.getChunkDuration(i0+1,e0)}getChunkDuration(e0,n0){let a0=0,i0=n0.timeToSampleTable[a0].count,s0=n0.timeToSampleTable[a0].duration,o0=1,l0=this.getSamplesPerChunk(o0,n0.sampleToChunkTable),c0=0;for(;o0<e0;){const u0=Math.min(i0,l0);c0+=u0*s0,i0-=u0,l0-=u0,l0===0?(++o0,l0=this.getSamplesPerChunk(o0,n0.sampleToChunkTable)):(++a0,i0=n0.timeToSampleTable[a0].count,s0=n0.timeToSampleTable[a0].duration)}return c0}getSamplesPerChunk(e0,n0){for(let a0=0;a0<n0.length-1;++a0)if(e0>=n0[a0].firstChunk&&e0<n0[a0+1].firstChunk)return n0[a0].samplesPerChunk;return n0[n0.length-1].samplesPerChunk}}MP4Parser$1.MP4Parser=MP4Parser;var MpegParser$1={},XingTag={},ExtendedLameHeader={},ReplayGainDataFormat={};
645Object.defineProperty(ReplayGainDataFormat,"__esModule",{value:!0});ReplayGainDataFormat.ReplayGain=void 0;const common$2=Util$1;var NameCode;(function(r0){r0[r0.not_set=0]="not_set",r0[r0.radio=1]="radio",r0[r0.audiophile=2]="audiophile"})(NameCode||(NameCode={}));var ReplayGainOriginator;(function(r0){r0[r0.unspecified=0]="unspecified",r0[r0.engineer=1]="engineer",r0[r0.user=2]="user",r0[r0.automatic=3]="automatic",r0[r0.rms_average=4]="rms_average"})(ReplayGainOriginator||(ReplayGainOriginator={}));ReplayGainDataFormat.ReplayGain={len:2,get:(r0,e0)=>{const n0=common$2.getBitAllignedNumber(r0,e0,0,3),a0=common$2.getBitAllignedNumber(r0,e0,6,1),i0=common$2.getBitAllignedNumber(r0,e0,7,9)/10;if(n0>0)return{type:common$2.getBitAllignedNumber(r0,e0,0,3),origin:common$2.getBitAllignedNumber(r0,e0,3,3),adjustment:a0?-i0:i0}}};Object.defineProperty(ExtendedLameHeader,"__esModule",{value:!0});ExtendedLameHeader.ExtendedLameHeader=void 0;const Token$h=lib$1,common$1=Util$1,ReplayGainDataFormat_1=ReplayGainDataFormat;ExtendedLameHeader.ExtendedLameHeader={len:27,get:(r0,e0)=>{const n0=Token$h.UINT32_BE.get(r0,e0+2);return{revision:common$1.getBitAllignedNumber(r0,e0,0,4),vbr_method:common$1.getBitAllignedNumber(r0,e0,4,4),lowpass_filter:100*Token$h.UINT8.get(r0,e0+1),track_peak:n0===0?void 0:n0/Math.pow(2,23),track_gain:ReplayGainDataFormat_1.ReplayGain.get(r0,6),album_gain:ReplayGainDataFormat_1.ReplayGain.get(r0,8),music_length:Token$h.UINT32_BE.get(r0,e0+20),music_crc:Token$h.UINT8.get(r0,e0+24),header_crc:Token$h.UINT16_BE.get(r0,e0+24)}}};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.readXingHeader=r0.XingHeaderFlags=r0.LameEncoderVersion=r0.InfoTagHeaderTag=void 0;const e0=lib$1,n0=Util$1,a0=ExtendedLameHeader;r0.InfoTagHeaderTag=new e0.StringType(4,"ascii"),r0.LameEncoderVersion=new e0.StringType(6,"ascii"),r0.XingHeaderFlags={len:4,get:(s0,o0)=>({frames:n0.isBitSet(s0,o0,31),bytes:n0.isBitSet(s0,o0,30),toc:n0.isBitSet(s0,o0,29),vbrScale:n0.isBitSet(s0,o0,28)})};async function i0(s0){const o0=await s0.readToken(r0.XingHeaderFlags),l0={};if(o0.frames&&(l0.numFrames=await s0.readToken(e0.UINT32_BE)),o0.bytes&&(l0.streamSize=await s0.readToken(e0.UINT32_BE)),o0.toc&&(l0.toc=Buffer.alloc(100),await s0.readBuffer(l0.toc)),o0.vbrScale&&(l0.vbrScale=await s0.readToken(e0.UINT32_BE)),await s0.peekToken(new e0.StringType(4,"ascii"))==="LAME"&&(await s0.ignore(4),l0.lame={version:await s0.readToken(new e0.StringType(5,"ascii"))},l0.lame.version.match(/\d+.\d+/g))){const h0=l0.lame.version.match(/\d+.\d+/g)[0].split(".").map(f0=>parseInt(f0,10));h0[0]>=3&&h0[1]>=90&&(l0.lame.extended=await s0.readToken(a0.ExtendedLameHeader))}return l0}r0.readXingHeader=i0})(XingTag);Object.defineProperty(MpegParser$1,"__esModule",{value:!0});MpegParser$1.MpegParser=void 0;const Token$g=lib$1,core_1$1=core$1,debug_1$d=browserExports$2,common=Util$1,AbstractID3Parser_1$2=AbstractID3Parser$1,XingTag_1=XingTag,debug$d=(0,debug_1$d.default)("music-metadata:parser:mpeg"),maxPeekLen=1024,MPEG4={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,void 0,void 0,-1]},MPEG4_ChannelConfigurations=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]];class MpegFrameHeader{constructor(e0,n0){this.versionIndex=common.getBitAllignedNumber(e0,n0+1,3,2),this.layer=MpegFrameHeader.LayerDescription[common.getBitAllignedNumber(e0,n0+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(e0,n0):this.parseMpegHeader(e0,n0),this.isProtectedByCRC=!common.isBitSet(e0,n0+1,7)}calcDuration(e0){return e0*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return MpegFrameHeader.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(e0,n0){this.container="MPEG",this.bitrateIndex=common.getBitAllignedNumber(e0,n0+2,0,4),this.sampRateFreqIndex=common.getBitAllignedNumber(e0,n0+2,4,2),this.padding=common.isBitSet(e0,n0+2,6),this.privateBit=common.isBitSet(e0,n0+2,7),this.channelModeIndex=common.getBitAllignedNumber(e0,n0+3,0,2),this.modeExtension=common.getBitAllignedNumber(e0,n0+3,2,2),this.isCopyrighted=common.isBitSet(e0,n0+3,4),this.isOriginalMedia=common.isBitSet(e0,n0+3,5),this.emphasis=common.getBitAllignedNumber(e0,n0+3,7,2),this.version=MpegFrameHeader.VersionID[this.versionIndex],this.channelMode=MpegFrameHeader.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;const a0=this.calcBitrate();if(!a0)throw new Error("Cannot determine bit-rate");if(this.bitrate=a0*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new Error("Cannot determine sampling-rate")}parseAdtsHeader(e0,n0){debug$d("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container="ADTS/MPEG-"+this.version;const a0=common.getBitAllignedNumber(e0,n0+2,0,2);
645this.codec="AAC",this.codecProfile=MPEG4.AudioObjectTypes[a0],debug$d(`MPEG-4 audio-codec=${this.codec}`);const i0=common.getBitAllignedNumber(e0,n0+2,2,4);this.samplingRate=MPEG4.SamplingFrequencies[i0],debug$d(`sampling-rate=${this.samplingRate}`);const s0=common.getBitAllignedNumber(e0,n0+2,7,3);this.mp4ChannelConfig=MPEG4_ChannelConfigurations[s0],debug$d(`channel-config=${this.mp4ChannelConfig.join("+")}`),this.frameLength=common.getBitAllignedNumber(e0,n0+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return;const e0=`${Math.floor(this.version)}${this.layer}`;return MpegFrameHeader.bitrate_index[this.bitrateIndex][e0]}calcSamplingRate(){return this.sampRateFreqIndex===3?null:MpegFrameHeader.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}}MpegFrameHeader.SyncByte1=255;MpegFrameHeader.SyncByte2=224;MpegFrameHeader.VersionID=[2.5,null,2,1];MpegFrameHeader.LayerDescription=[0,3,2,1];MpegFrameHeader.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];MpegFrameHeader.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};MpegFrameHeader.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};MpegFrameHeader.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];const FrameHeader={len:4,get:(r0,e0)=>new MpegFrameHeader(r0,e0)};function getVbrCodecProfile(r0){return"V"+Math.floor((100-r0)/10)}class MpegParser extends AbstractID3Parser_1$2.AbstractID3Parser{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.countSkipFrameData=0,this.totalDataLength=0,this.bitrates=[],this.calculateEofDuration=!1,this.buf_frame_header=Buffer.alloc(4),this.syncPeek={buf:Buffer.alloc(maxPeekLen),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1);try{let e0=!1;for(;!e0;)await this.sync(),e0=await this.parseCommonMpegHeader()}catch(e0){if(e0 instanceof core_1$1.EndOfStreamError){if(debug$d("End-of-stream"),this.calculateEofDuration){const n0=this.frameCount*this.samplesPerFrame;this.metadata.setFormat("numberOfSamples",n0);const a0=n0/this.metadata.format.sampleRate;debug$d(`Calculate duration at EOF: ${a0} sec.`,a0),this.metadata.setFormat("duration",a0)}}else throw e0}}finalize(){const e0=this.metadata.format,n0=this.metadata.native.hasOwnProperty("ID3v1");if(e0.duration&&this.tokenizer.fileInfo.size){const a0=this.tokenizer.fileInfo.size-this.mpegOffset-(n0?128:0);e0.codecProfile&&e0.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",a0*8/e0.duration)}else if(this.tokenizer.fileInfo.size&&e0.codecProfile==="CBR"){const a0=this.tokenizer.fileInfo.size-this.mpegOffset-(n0?128:0),i0=Math.round(a0/this.frame_size)*this.samplesPerFrame;this.metadata.setFormat("numberOfSamples",i0);const s0=i0/e0.sampleRate;debug$d("Calculate CBR duration based on file size: %s",s0),this.metadata.setFormat("duration",s0)}}async sync(){let e0=!1;for(;;){let n0=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:maxPeekLen,mayBeLess:!0}),this.syncPeek.len<=163)throw new core_1$1.EndOfStreamError;for(;;)if(e0&&(this.syncPeek.buf[n0]&224)===224){this.buf_frame_header[0]=MpegFrameHeader.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[n0],await this.tokenizer.ignore(n0),debug$d(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(debug$d(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}else if(e0=!1,n0=this.syncPeek.buf.indexOf(MpegFrameHeader.SyncByte1,n0),n0===-1){if(this.syncPeek.len<this.syncPeek.buf.length)throw new core_1$1.EndOfStreamError;await this.tokenizer.ignore(this.syncPeek.len);break}else++n0,e0=!0}}async parseCommonMpegHeader(){this.frameCount===0&&(this.mpegOffset=this.tokenizer.position-1),await this.tokenizer.peekBuffer(this.buf_frame_header,{offset:1,length:3});let e0;try{e0=FrameHeader.get(this.buf_frame_header,0)}catch(n0){return await this.tokenizer.ignore(1),this.metadata.addWarning("Parse error: "+n0.message),!1}return await this.tokenizer.ignore(3),this.metadata.setFormat("container",e0.container),this.metadata.setFormat("codec",e0.codec),this.metadata.setFormat("lossless",!1),this.metadata.setFormat("sampleRate",e0.samplingRate),this.frameCount++,e0.version>=2&&e0.layer===0?this.parseAdts(e0):this.parseAudioFrameHeader(e0)}async parseAudioFrameHeader(e0){this.metadata.setFormat("numberOfChannels",e0.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",e0.bitrate),this.frameCount<20*1e4&&debug$d("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,e0.layer,e0.bitrate,e0.samplingRate);const n0=e0.calcSlotSize();if(n0===null)throw new Error("invalid slot_size");
645const a0=e0.calcSamplesPerFrame();debug$d(`samples_per_frame=${a0}`);const s0=a0/8*e0.bitrate/e0.samplingRate+(e0.padding?n0:0);if(this.frame_size=Math.floor(s0),this.audioFrameHeader=e0,this.bitrates.push(e0.bitrate),this.frameCount===1)return this.offset=FrameHeader.len,await this.skipSideInformation(),!1;if(this.frameCount===3){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=a0,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=a0,this.calculateEofDuration=!0),this.offset=4,e0.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(e0){const n0=Buffer.alloc(3);await this.tokenizer.readBuffer(n0),e0.frameLength+=common.getBitAllignedNumber(n0,0,0,11),this.totalDataLength+=e0.frameLength,this.samplesPerFrame=1024;const a0=e0.samplingRate/this.samplesPerFrame,s0=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*a0+.5;if(this.metadata.setFormat("bitrate",s0),debug$d(`frame-count=${this.frameCount}, size=${e0.frameLength} bytes, bit-rate=${s0}`),await this.tokenizer.ignore(e0.frameLength>7?e0.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",e0.codecProfile),e0.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",e0.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return this.crc=await this.tokenizer.readNumber(Token$g.INT16_BE),this.offset+=2,this.skipSideInformation()}async skipSideInformation(){const e0=this.audioFrameHeader.calculateSideInfoLength();await this.tokenizer.readToken(new Token$g.Uint8ArrayType(e0)),this.offset+=e0,await this.readXtraInfoHeader()}async readXtraInfoHeader(){const e0=await this.tokenizer.readToken(XingTag_1.InfoTagHeaderTag);switch(this.offset+=XingTag_1.InfoTagHeaderTag.len,e0){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":const a0=await this.readXingInfoHeader(),i0=getVbrCodecProfile(a0.vbrScale);return this.metadata.setFormat("codecProfile",i0),null;case"Xtra":break;case"LAME":const s0=await this.tokenizer.readToken(XingTag_1.LameEncoderVersion);if(this.frame_size>=this.offset+XingTag_1.LameEncoderVersion.len)return this.offset+=XingTag_1.LameEncoderVersion.len,this.metadata.setFormat("tool","LAME "+s0),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}const n0=this.frame_size-this.offset;return n0<0?this.metadata.addWarning("Frame "+this.frameCount+"corrupt: negative frameDataLeft"):await this.skipFrameData(n0),null}async readXingInfoHeader(){const e0=this.tokenizer.position,n0=await(0,XingTag_1.readXingHeader)(this.tokenizer);if(this.offset+=this.tokenizer.position-e0,n0.lame&&(this.metadata.setFormat("tool","LAME "+common.stripNulls(n0.lame.version)),n0.lame.extended&&(this.metadata.setFormat("trackPeakLevel",n0.lame.extended.track_peak),n0.lame.extended.track_gain&&this.metadata.setFormat("trackGain",n0.lame.extended.track_gain.adjustment),n0.lame.extended.album_gain&&this.metadata.setFormat("albumGain",n0.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",n0.lame.extended.music_length/1e3))),n0.streamSize){const i0=this.audioFrameHeader.calcDuration(n0.numFrames);return this.metadata.setFormat("duration",i0),debug$d("Get duration from Xing header: %s",this.metadata.format.duration),n0}const a0=this.frame_size-this.offset;return await this.skipFrameData(a0),n0}async skipFrameData(e0){if(e0<0)throw new Error("frame-data-left cannot be negative");await this.tokenizer.ignore(e0),this.countSkipFrameData+=e0}areAllSame(e0){const n0=e0[0];return e0.every(a0=>a0===n0)}}MpegParser$1.MpegParser=MpegParser;var musepack={},MpcSv8Parser$1={},StreamVersion8={};Object.defineProperty(StreamVersion8,"__esModule",{value:!0});StreamVersion8.StreamReader=void 0;const Token$f=lib$1,debug_1$c=browserExports$2,util$5=Util$1,debug$c=(0,debug_1$c.default)("music-metadata:parser:musepack:sv8"),PacketKey=new Token$f.StringType(2,"binary"),SH_part1={len:5,get:(r0,e0)=>({crc:Token$f.UINT32_LE.get(r0,e0),streamVersion:Token$f.UINT8.get(r0,e0+4)})},SH_part3={len:2,get:(r0,e0)=>({sampleFrequency:[44100,48e3,37800,32e3][util$5.getBitAllignedNumber(r0,e0,0,3)],maxUsedBands:util$5.getBitAllignedNumber(r0,e0,3,5),channelCount:util$5.getBitAllignedNumber(r0,e0+1,0,4)+1,msUsed:util$5.isBitSet(r0,e0+1,4),audioBlockFrames:util$5.getBitAllignedNumber(r0,e0+1,5,3)})};class StreamReader{constructor(e0){this.tokenizer=e0}async readPacketHeader(){const e0=await this.tokenizer.readToken(PacketKey),n0=await this.readVariableSizeField();return{key:e0,payloadLength:n0.value-2-n0.len}}async readStreamHeader(e0){const n0={};debug$c(`Reading SH at offset=${this.tokenizer.position}`);const a0=await this.tokenizer.readToken(SH_part1);e0-=SH_part1.len,Object.assign(n0,a0),debug$c(`SH.streamVersion = ${a0.streamVersion}`);const i0=await this.readVariableSizeField();e0-=i0.len,n0.sampleCount=i0.value;const s0=await this.readVariableSizeField();e0-=s0.len,n0.beginningOfSilence=s0.value;const o0=await this.tokenizer.readToken(SH_part3);return e0-=SH_part3.len,Object.assign(n0,o0),await this.tokenizer.ignore(e0),n0}async readVariableSizeField(e0=1,n0=0){let a0=await this.tokenizer.readNumber(Token$f.UINT8);return a0&128?(a0&=127,a0+=n0,this.readVariableSizeField(e0+1,a0<<7)):{len:e0,value:n0+a0}}}StreamVersion8.StreamReader=StreamReader;Object.defineProperty(MpcSv8Parser$1,"__esModule",{value:!0});MpcSv8Parser$1.MpcSv8Parser=void 0;const debug_1$b=browserExports$2,BasicParser_1$6=BasicParser$1,APEv2Parser_1$4=APEv2Parser$1,FourCC_1$6=FourCC,SV8=StreamVersion8,debug$b=(0,debug_1$b.default)("music-metadata:parser:musepack");class MpcSv8Parser extends BasicParser_1$6.BasicParser{constructor(){super(...arguments),this.audioLength=0}
645async parse(){if(await this.tokenizer.readToken(FourCC_1$6.FourCcToken)!=="MPCK")throw new Error("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){const e0=new SV8.StreamReader(this.tokenizer);do{const n0=await e0.readPacketHeader();switch(debug$b(`packet-header key=${n0.key}, payloadLength=${n0.payloadLength}`),n0.key){case"SH":const a0=await e0.readStreamHeader(n0.payloadLength);this.metadata.setFormat("numberOfSamples",a0.sampleCount),this.metadata.setFormat("sampleRate",a0.sampleFrequency),this.metadata.setFormat("duration",a0.sampleCount/a0.sampleFrequency),this.metadata.setFormat("numberOfChannels",a0.channelCount);break;case"AP":this.audioLength+=n0.payloadLength,await this.tokenizer.ignore(n0.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(n0.payloadLength);break;case"SE":return this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),APEv2Parser_1$4.APEv2Parser.tryParseApeHeader(this.metadata,this.tokenizer,this.options);default:throw new Error(`Unexpected header: ${n0.key}`)}}while(!0)}}MpcSv8Parser$1.MpcSv8Parser=MpcSv8Parser;var MpcSv7Parser$1={},BitReader$1={};Object.defineProperty(BitReader$1,"__esModule",{value:!0});BitReader$1.BitReader=void 0;const Token$e=lib$1;class BitReader{constructor(e0){this.tokenizer=e0,this.pos=0,this.dword=void 0}async read(e0){for(;this.dword===void 0;)this.dword=await this.tokenizer.readToken(Token$e.UINT32_LE);let n0=this.dword;return this.pos+=e0,this.pos<32?(n0>>>=32-this.pos,n0&(1<<e0)-1):(this.pos-=32,this.pos===0?(this.dword=void 0,n0&(1<<e0)-1):(this.dword=await this.tokenizer.readToken(Token$e.UINT32_LE),this.pos&&(n0<<=this.pos,n0|=this.dword>>>32-this.pos),n0&(1<<e0)-1))}async ignore(e0){if(this.pos>0){const i0=32-this.pos;this.dword=void 0,e0-=i0,this.pos=0}const n0=e0%32,a0=(e0-n0)/32;return await this.tokenizer.ignore(a0*4),this.read(n0)}}BitReader$1.BitReader=BitReader;var StreamVersion7={};Object.defineProperty(StreamVersion7,"__esModule",{value:!0});StreamVersion7.Header=void 0;const Token$d=lib$1,util$4=Util$1;StreamVersion7.Header={len:6*4,get:(r0,e0)=>{const n0={signature:Buffer.from(r0).toString("latin1",e0,e0+3),streamMinorVersion:util$4.getBitAllignedNumber(r0,e0+3,0,4),streamMajorVersion:util$4.getBitAllignedNumber(r0,e0+3,4,4),frameCount:Token$d.UINT32_LE.get(r0,e0+4),maxLevel:Token$d.UINT16_LE.get(r0,e0+8),sampleFrequency:[44100,48e3,37800,32e3][util$4.getBitAllignedNumber(r0,e0+10,0,2)],link:util$4.getBitAllignedNumber(r0,e0+10,2,2),profile:util$4.getBitAllignedNumber(r0,e0+10,4,4),maxBand:util$4.getBitAllignedNumber(r0,e0+11,0,6),intensityStereo:util$4.isBitSet(r0,e0+11,6),midSideStereo:util$4.isBitSet(r0,e0+11,7),titlePeak:Token$d.UINT16_LE.get(r0,e0+12),titleGain:Token$d.UINT16_LE.get(r0,e0+14),albumPeak:Token$d.UINT16_LE.get(r0,e0+16),albumGain:Token$d.UINT16_LE.get(r0,e0+18),lastFrameLength:Token$d.UINT32_LE.get(r0,e0+20)>>>20&2047,trueGapless:util$4.isBitSet(r0,e0+23,0)};return n0.lastFrameLength=n0.trueGapless?Token$d.UINT32_LE.get(r0,20)>>>20&2047:0,n0}};Object.defineProperty(MpcSv7Parser$1,"__esModule",{value:!0});MpcSv7Parser$1.MpcSv7Parser=void 0;const debug_1$a=browserExports$2,BasicParser_1$5=BasicParser$1,APEv2Parser_1$3=APEv2Parser$1,BitReader_1=BitReader$1,SV7=StreamVersion7,debug$a=(0,debug_1$a.default)("music-metadata:parser:musepack");class MpcSv7Parser extends BasicParser_1$5.BasicParser{constructor(){super(...arguments),this.audioLength=0}async parse(){const e0=await this.tokenizer.readToken(SV7.Header);if(e0.signature!=="MP+")throw new Error("Unexpected magic number");debug$a(`stream-version=${e0.streamMajorVersion}.${e0.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",e0.sampleFrequency);const n0=1152*(e0.frameCount-1)+e0.lastFrameLength;this.metadata.setFormat("numberOfSamples",n0),this.duration=n0/e0.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new BitReader_1.BitReader(this.tokenizer),this.metadata.setFormat("numberOfChannels",e0.midSide
645Stereo||e0.intensityStereo?2:1);const a0=await this.bitreader.read(8);return this.metadata.setFormat("codec",(a0/100).toFixed(2)),await this.skipAudioData(e0.frameCount),debug$a(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),APEv2Parser_1$3.APEv2Parser.tryParseApeHeader(this.metadata,this.tokenizer,this.options)}async skipAudioData(e0){for(;e0-- >0;){const a0=await this.bitreader.read(20);this.audioLength+=20+a0,await this.bitreader.ignore(a0)}const n0=await this.bitreader.read(11);this.audioLength+=n0,this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}MpcSv7Parser$1.MpcSv7Parser=MpcSv7Parser;Object.defineProperty(musepack,"__esModule",{value:!0});const debug_1$9=browserExports$2,Token$c=lib$1,AbstractID3Parser_1$1=AbstractID3Parser$1,MpcSv8Parser_1=MpcSv8Parser$1,MpcSv7Parser_1=MpcSv7Parser$1,debug$9=(0,debug_1$9.default)("music-metadata:parser:musepack");class MusepackParser extends AbstractID3Parser_1$1.AbstractID3Parser{async postId3v2Parse(){const e0=await this.tokenizer.peekToken(new Token$c.StringType(3,"binary"));let n0;switch(e0){case"MP+":{debug$9("Musepack stream-version 7"),n0=new MpcSv7Parser_1.MpcSv7Parser;break}case"MPC":{debug$9("Musepack stream-version 8"),n0=new MpcSv8Parser_1.MpcSv8Parser;break}default:throw new Error("Invalid Musepack signature prefix")}return n0.init(this.metadata,this.tokenizer,this.options),n0.parse()}}musepack.default=MusepackParser;var OggParser$1={},OpusParser$1={},Opus$1={};Object.defineProperty(Opus$1,"__esModule",{value:!0});Opus$1.IdHeader=void 0;const Token$b=lib$1;class IdHeader{constructor(e0){if(this.len=e0,e0<19)throw new Error("ID-header-page 0 should be at least 19 bytes long")}get(e0,n0){return{magicSignature:new Token$b.StringType(8,"ascii").get(e0,n0+0),version:e0.readUInt8(n0+8),channelCount:e0.readUInt8(n0+9),preSkip:e0.readInt16LE(n0+10),inputSampleRate:e0.readInt32LE(n0+12),outputGain:e0.readInt16LE(n0+16),channelMapping:e0.readUInt8(n0+18)}}}Opus$1.IdHeader=IdHeader;Object.defineProperty(OpusParser$1,"__esModule",{value:!0});OpusParser$1.OpusParser=void 0;const Token$a=lib$1,VorbisParser_1$2=VorbisParser$1,Opus=Opus$1;class OpusParser extends VorbisParser_1$2.VorbisParser{constructor(e0,n0,a0){super(e0,n0),this.tokenizer=a0,this.lastPos=-1}parseFirstPage(e0,n0){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new Opus.IdHeader(n0.length).get(n0,0),this.idHeader.magicSignature!=="OpusHead")throw new Error("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount)}
645parseFullPage(e0){switch(new Token$a.StringType(8,"ascii").get(e0,0)){case"OpusTags":this.parseUserCommentList(e0,8),this.lastPos=this.tokenizer.position-e0.length;break}}calculateDuration(e0){if(this.metadata.format.sampleRate&&e0.absoluteGranulePosition>=0){const n0=e0.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",n0),this.metadata.setFormat("duration",n0/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){const a0=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*a0/this.metadata.format.duration)}}}}OpusParser$1.OpusParser=OpusParser;var SpeexParser$1={},Speex$1={};Object.defineProperty(Speex$1,"__esModule",{value:!0});Speex$1.Header=void 0;const Token$9=lib$1,util$3=Util$1;Speex$1.Header={len:80,get:(r0,e0)=>({speex:new Token$9.StringType(8,"ascii").get(r0,e0+0),version:util$3.trimRightNull(new Token$9.StringType(20,"ascii").get(r0,e0+8)),version_id:r0.readInt32LE(e0+28),header_size:r0.readInt32LE(e0+32),rate:r0.readInt32LE(e0+36),mode:r0.readInt32LE(e0+40),mode_bitstream_version:r0.readInt32LE(e0+44),nb_channels:r0.readInt32LE(e0+48),bitrate:r0.readInt32LE(e0+52),frame_size:r0.readInt32LE(e0+56),vbr:r0.readInt32LE(e0+60),frames_per_packet:r0.readInt32LE(e0+64),extra_headers:r0.readInt32LE(e0+68),reserved1:r0.readInt32LE(e0+72),reserved2:r0.readInt32LE(e0+76)})};Object.defineProperty(SpeexParser$1,"__esModule",{value:!0});SpeexParser$1.SpeexParser=void 0;const debug_1$8=browserExports$2,VorbisParser_1$1=VorbisParser$1,Speex=Speex$1,debug$8=(0,debug_1$8.default)("music-metadata:parser:ogg:speex");class SpeexParser extends VorbisParser_1$1.VorbisParser{constructor(e0,n0,a0){super(e0,n0),this.tokenizer=a0}parseFirstPage(e0,n0){debug$8("First Ogg/Speex page");const a0=Speex.Header.get(n0,0);this.metadata.setFormat("codec",`Speex ${a0.version}`),this.metadata.setFormat("numberOfChannels",a0.nb_channels),this.metadata.setFormat("sampleRate",a0.rate),a0.bitrate!==-1&&this.metadata.setFormat("bitrate",a0.bitrate)}}SpeexParser$1.SpeexParser=SpeexParser;var TheoraParser$1={},Theora={};Object.defineProperty(Theora,"__esModule",{value:!0});Theora.IdentificationHeader=void 0;const Token$8=lib$1;Theora.IdentificationHeader={len:42,get:(r0,e0)=>({id:new Token$8.StringType(7,"ascii").get(r0,e0),vmaj:r0.readUInt8(e0+7),vmin:r0.readUInt8(e0+8),vrev:r0.readUInt8(e0+9),vmbw:r0.readUInt16BE(e0+10),vmbh:r0.readUInt16BE(e0+17),nombr:Token$8.UINT24_BE.get(r0,e0+37),nqual:r0.readUInt8(e0+40)})};Object.defineProperty(TheoraParser$1,"__esModule",{value:!0});TheoraParser$1.TheoraParser=void 0;const debug_1$7=browserExports$2,Theora_1=Theora,debug$7=(0,debug_1$7.default)("music-metadata:parser:ogg:theora");class TheoraParser{constructor(e0,n0,a0){this.metadata=e0,this.tokenizer=a0}parsePage(e0,n0){e0.headerType.firstPage&&this.parseFirstPage(e0,n0)}flush(){debug$7("flush")}calculateDuration(e0){debug$7("duration calculation not implemented")}parseFirstPage(e0,n0){debug$7("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");const a0=Theora_1.IdentificationHeader.get(n0,0);this.metadata.setFormat("bitrate",a0.nombr)}}TheoraParser$1.TheoraParser=TheoraParser;Object.defineProperty(OggParser$1,"__esModule",{value:!0});OggParser$1.OggParser=OggParser$1.SegmentTable=void 0;const Token$7=lib$1,core_1=core$1,debug_1$6=browserExports$2,util$2=Util$1,FourCC_1$5=FourCC,BasicParser_1$4=BasicParser$1,VorbisParser_1=VorbisParser$1,OpusParser_1=OpusParser$1,SpeexParser_1=SpeexParser$1,TheoraParser_1=TheoraParser$1,debug$6=(0,debug_1$6.default)("music-metadata:parser:ogg");class SegmentTable{static sum(e0,n0,a0){let i0=0;for(let s0=n0;s0<n0+a0;++s0)i0+=e0[s0];return i0}constructor(e0){this.len=e0.page_segments}get(e0,n0){return{totalPageSize:SegmentTable.sum(e0,n0,this.len)}}}OggParser$1.SegmentTable=SegmentTable;class OggParser extends BasicParser_1$4.BasicParser{async parse(){debug$6("pos=%s, parsePage()",this.tokenizer.position);try{let e0;do{if(e0=await this.tokenizer.readToken(OggParser.Header),e0.capturePattern!=="OggS")throw new Error("Invalid Ogg capture pattern");this.metadata.setFormat("container","Ogg"),this.header=e0,this.pageNumber=e0.pageSequenceNo,debug$6("page#=%s, Ogg.id=%s",e0.pageSequenceNo,e0.capturePattern);const n0=await this.tokenizer.readToken(new SegmentTable(e0));debug$6("totalPageSize=%s",n0.totalPageSize);const a0=await this.tokenizer.readToken(new Token$7.Uint8ArrayType(n0.totalPageSize));if(debug$6("firstPage=%s, lastPage=%s, continued=%s",e0.headerType.firstPage,e0.headerType.lastPage,e0.headerType.continued),e0.headerType.firstPage){const i0=new Token$7.StringType(7,"ascii").get(Buffer.from(a0),0);switch(i0){case"�vorbis":debug$6("Set page consumer to Ogg/Vorbis"),this.pageConsumer=new VorbisParser_1.VorbisParser(this.metadata,this.options);break;case"OpusHea":debug$6("Set page consumer to Ogg/Opus"),this.pageConsumer=new OpusParser_1.OpusParser(this.metadata,this.options,this.tokenizer);break;case"Speex ":debug$6("Set page consumer to Ogg/Speex"),this.pageConsumer=new SpeexParser_1.SpeexParser(this.metadata,this.options,this.tokenizer);break;case"fishead":case"\0theora":debug$6("Set page consumer to Ogg/Theora"),this.pageConsumer=new TheoraParser_1.TheoraParser(this.metadata,this.options,this.tokenizer);break;default:throw new Error("gg audio-codec not recognized (id="+i0+")")}}this.pageConsumer.parsePage(e0,a0)}while(!e0.headerType.lastPage)}catch(e0){if(e0 instanceof core_1.EndOfStreamError)this.metadata.addWarning("Last OGG-page is not marked with last-page flag"),debug$6("End-of-stream"),this.metadata.addWarning("Last OGG-page is not marked with last-page flag"),this.header&&this.pageConsumer.calculateDuration(this.header);else if(e0.message.startsWith("FourCC"))this.pageNumber>0&&(this.metadata.addWarning("Invalid FourCC ID, maybe last OGG-page is not marked with last-page flag"),this.pageConsumer.flush());else throw e0}}}OggParser.Header={len:27,get:(r0,e0)=>({capturePattern:FourCC_1$5.FourCcToken.get(r0,e0),version:Token$7.UINT8.get(r0,e0+4),headerType:{continued:util$2.getBit(r0,e0+5,0),firstPage:util$2.getBit(r0,e0+5,1),lastPage:util$2.getBit(r0,e0+5,2)},absoluteGranulePosition:Number(Token$7.UINT64_LE.get(r0,e0+6)),streamSerialNumber:Token$7.UINT32_LE.get(r0,e0+14),pageSequenceNo:Token$7.UINT32_LE.get(r0,e0+18),pageChecksum:Token$7.UINT32_LE.get(r0,e0+22),page_segments:Token$7.UINT8.get(r0,e0+26)})};OggParser$1.OggParser=OggParser;var WaveParser$1={},RiffChunk={};Object.defineProperty(RiffChunk,"__esModule",{value:!0});RiffChunk.ListInfoTagValue=RiffChunk.Header=void 0;const Token$6=lib$1;RiffChunk.Header={len:8,get:(r0,e0)=>({chunkID:r0.toString("binary",e0,e0+4),chunkSize:Token$6.UINT32_LE.get(r0,4)})};class ListInfoTagValue{constructor(e0){this.tagHeader=e0,this.len=e0.chunkSize,this.len+=this.len&1}get(e0,n0){return new Token$6.StringType(this.tagHeader.chunkSize,"ascii").get(e0,n0)}}RiffChunk.ListInfoTagValue=ListInfoTagValue;var WaveChunk$1={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.FactChunk=r0.Format=r0.WaveFormat=void 0,function(a0){a0[a0.PCM=1]="PCM",a0[a0.ADPCM=2]="ADPCM",a0[a0.IEEE_FLOAT=3]="IEEE_FLOAT",a0[a0.MPEG_ADTS_AAC=5632]="MPEG_ADTS_AAC",a0[a0.MPEG_LOAS=5634]="MPEG_LOAS",a0[a0.RAW_AAC1=255]="RAW_AAC1",a0[a0.DOLBY_AC3_SPDIF=146]="DOLBY_AC3_SPDIF",a0[a0.DVM=8192]="DVM",a0[a0.RAW_SPORT=576]="RAW_SPORT",a0[a0.ESST_AC3=577]="ESST_AC3",a0[a0.DRM=9]="DRM",a0[a0.DTS2=8193]="DTS2",a0[a0.MPEG=80]="MPEG"}(r0.WaveFormat||(r0.WaveFormat={}));class e0{constructor(i0){if(i0.chunkSize<16)throw new Error("Invalid chunk size");this.len=i0.chunkSize}get(i0,s0){return{wFormatTag:i0.readUInt16LE(s0),nChannels:i0.readUInt16LE(s0+2),nSamplesPerSec:i0.readUInt32LE(s0+4),nAvgBytesPerSec:i0.readUInt32LE(s0+8),nBlockAlign:i0.readUInt16LE(s0+12),wBitsPerSample:i0.readUInt16LE(s0+14)}}}r0.Format=e0;
645class n0{constructor(i0){if(i0.chunkSize<4)throw new Error("Invalid fact chunk size.");this.len=i0.chunkSize}get(i0,s0){return{dwSampleLength:i0.readUInt32LE(s0)}}}r0.FactChunk=n0})(WaveChunk$1);var BwfChunk={};Object.defineProperty(BwfChunk,"__esModule",{value:!0});BwfChunk.BroadcastAudioExtensionChunk=void 0;const Token$5=lib$1,Util_1=Util$1;BwfChunk.BroadcastAudioExtensionChunk={len:420,get:(r0,e0)=>({description:(0,Util_1.stripNulls)(new Token$5.StringType(256,"ascii").get(r0,e0)).trim(),originator:(0,Util_1.stripNulls)(new Token$5.StringType(32,"ascii").get(r0,e0+256)).trim(),originatorReference:(0,Util_1.stripNulls)(new Token$5.StringType(32,"ascii").get(r0,e0+288)).trim(),originationDate:(0,Util_1.stripNulls)(new Token$5.StringType(10,"ascii").get(r0,e0+320)).trim(),originationTime:(0,Util_1.stripNulls)(new Token$5.StringType(8,"ascii").get(r0,e0+330)).trim(),timeReferenceLow:Token$5.UINT32_LE.get(r0,e0+338),timeReferenceHigh:Token$5.UINT32_LE.get(r0,e0+342),version:Token$5.UINT16_LE.get(r0,e0+346),umid:new Token$5.Uint8ArrayType(64).get(r0,e0+348),loudnessValue:Token$5.UINT16_LE.get(r0,e0+412),maxTruePeakLevel:Token$5.UINT16_LE.get(r0,e0+414),maxMomentaryLoudness:Token$5.UINT16_LE.get(r0,e0+416),maxShortTermLoudness:Token$5.UINT16_LE.get(r0,e0+418)})};Object.defineProperty(WaveParser$1,"__esModule",{value:!0});WaveParser$1.WaveParser=void 0;const strtok3$2=core$1,Token$4=lib$1,debug_1$5=browserExports$2,riff=RiffChunk,WaveChunk=WaveChunk$1,ID3v2Parser_1$2=ID3v2Parser$1,util$1=Util$1,FourCC_1$4=FourCC,BasicParser_1$3=BasicParser$1,BwfChunk_1=BwfChunk,debug$5=(0,debug_1$5.default)("music-metadata:parser:RIFF");class WaveParser extends BasicParser_1$3.BasicParser{async parse(){const e0=await this.tokenizer.readToken(riff.Header);if(debug$5(`pos=${this.tokenizer.position}, parse: chunkID=${e0.chunkID}`),e0.chunkID==="RIFF")return this.parseRiffChunk(e0.chunkSize).catch(n0=>{if(!(n0 instanceof strtok3$2.EndOfStreamError))throw n0})}async parseRiffChunk(e0){const n0=await this.tokenizer.readToken(FourCC_1$4.FourCcToken);switch(this.metadata.setFormat("container",n0),n0){case"WAVE":return this.readWaveChunk(e0-FourCC_1$4.FourCcToken.len);default:throw new Error(`Unsupported RIFF format: RIFF/${n0}`)}}async readWaveChunk(e0){for(;e0>=riff.Header.len;){const n0=await this.tokenizer.readToken(riff.Header);switch(e0-=riff.Header.len+n0.chunkSize,n0.chunkSize>e0&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=n0,debug$5(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${n0.chunkID}`),n0.chunkID){case"LIST":await this.parseListTag(n0);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new WaveChunk.FactChunk(n0));break;case"fmt ":const a0=await this.tokenizer.readToken(new WaveChunk.Format(n0));let i0=WaveChunk.WaveFormat[a0.wFormatTag];i0||(debug$5("WAVE/non-PCM format="+a0.wFormatTag),i0="non-PCM ("+a0.wFormatTag+")"),this.metadata.setFormat("codec",i0),this.metadata.setFormat("bitsPerSample",a0.wBitsPerSample),this.metadata.setFormat("sampleRate",a0.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",a0.nChannels),this.metadata.setFormat("bitrate",a0.nBlockAlign*a0.nSamplesPerSec*8),this.blockAlign=a0.nBlockAlign;break;case"id3 ":case"ID3 ":const s0=await this.tokenizer.readToken(new Token$4.Uint8ArrayType(n0.chunkSize)),o0=strtok3$2.fromBuffer(s0);await new ID3v2Parser_1$2.ID3v2Parser().parse(this.metadata,o0,this.options);break;case"data":this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let l0=n0.chunkSize;if(this.tokenizer.fileInfo.size){const h0=this.tokenizer.fileInfo.size-this.tokenizer.position;h0<l0&&(this.metadata.addWarning("data chunk length exceeding file length"),l0=h0)}const c0=this.fact?this.fact.dwSampleLength:l0===4294967295?void 0:l0/this.blockAlign;c0&&(this.metadata.setFormat("numberOfSamples",c0),this.metadata.setFormat("duration",c0/this.metadata.format.sampleRate)),this.metadata.format.codec==="ADPCM"?this.metadata.setFormat("bitrate",352e3):this.metadata.setFormat("bitrate",this.blockAlign*this.metadata.format.sampleRate*8),await this.tokenizer.ignore(n0.chunkSize);break;case"bext":const u0=await this.tokenizer.readToken(BwfChunk_1.BroadcastAudioExtensionChunk);
645Object.keys(u0).forEach(h0=>{this.metadata.addTag("exif","bext."+h0,u0[h0])});const d0=n0.chunkSize-BwfChunk_1.BroadcastAudioExtensionChunk.len;await this.tokenizer.ignore(d0);break;case"\0\0\0\0":debug$5(`Ignore padding chunk: RIFF/${n0.chunkID} of ${n0.chunkSize} bytes`),this.metadata.addWarning("Ignore chunk: RIFF/"+n0.chunkID),await this.tokenizer.ignore(n0.chunkSize);break;default:debug$5(`Ignore chunk: RIFF/${n0.chunkID} of ${n0.chunkSize} bytes`),this.metadata.addWarning("Ignore chunk: RIFF/"+n0.chunkID),await this.tokenizer.ignore(n0.chunkSize)}this.header.chunkSize%2===1&&(debug$5("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(e0){const n0=await this.tokenizer.readToken(new Token$4.StringType(4,"binary"));switch(debug$5("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,n0),n0){case"INFO":return this.parseRiffInfoTags(e0.chunkSize-4);case"adtl":default:return this.metadata.addWarning("Ignore chunk: RIFF/WAVE/LIST/"+n0),debug$5("Ignoring chunkID=RIFF/WAVE/LIST/"+n0),this.tokenizer.ignore(e0.chunkSize-4).then()}}async parseRiffInfoTags(e0){for(;e0>=8;){const n0=await this.tokenizer.readToken(riff.Header),a0=new riff.ListInfoTagValue(n0),i0=await this.tokenizer.readToken(a0);this.addTag(n0.chunkID,util$1.stripNulls(i0)),e0-=8+a0.len}if(e0!==0)throw Error("Illegal remaining size: "+e0)}addTag(e0,n0){this.metadata.addTag("exif",e0,n0)}}WaveParser$1.WaveParser=WaveParser;var WavPackParser$1={},WavPackToken={};Object.defineProperty(WavPackToken,"__esModule",{value:!0});WavPackToken.WavPack=void 0;const Token$3=lib$1,FourCC_1$3=FourCC,SampleRates=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1];class WavPack{static isBitSet(e0,n0){return WavPack.getBitAllignedNumber(e0,n0,1)===1}static getBitAllignedNumber(e0,n0,a0){return e0>>>n0&4294967295>>>32-a0}}WavPack.BlockHeaderToken={len:32,get:(r0,e0)=>{const n0=Token$3.UINT32_LE.get(r0,e0+24),a0={BlockID:FourCC_1$3.FourCcToken.get(r0,e0),blockSize:Token$3.UINT32_LE.get(r0,e0+4),version:Token$3.UINT16_LE.get(r0,e0+8),totalSamples:Token$3.UINT32_LE.get(r0,e0+12),blockIndex:Token$3.UINT32_LE.get(r0,e0+16),blockSamples:Token$3.UINT32_LE.get(r0,e0+20),flags:{bitsPerSample:(1+WavPack.getBitAllignedNumber(n0,0,2))*8,isMono:WavPack.isBitSet(n0,2),isHybrid:WavPack.isBitSet(n0,3),isJointStereo:WavPack.isBitSet(n0,4),crossChannel:WavPack.isBitSet(n0,5),hybridNoiseShaping:WavPack.isBitSet(n0,6),floatingPoint:WavPack.isBitSet(n0,7),samplingRate:SampleRates[WavPack.getBitAllignedNumber(n0,23,4)],isDSD:WavPack.isBitSet(n0,31)},crc:new Token$3.Uint8ArrayType(4).get(r0,e0+28)};return a0.flags.isDSD&&(a0.totalSamples*=8),a0}};WavPack.MetadataIdToken={len:1,get:(r0,e0)=>({functionId:WavPack.getBitAllignedNumber(r0[e0],0,6),isOptional:WavPack.isBitSet(r0[e0],5),isOddSize:WavPack.isBitSet(r0[e0],6),largeBlock:WavPack.isBitSet(r0[e0],7)})};WavPackToken.WavPack=WavPack;Object.defineProperty(WavPackParser$1,"__esModule",{value:!0});WavPackParser$1.WavPackParser=void 0;const Token$2=lib$1,APEv2Parser_1$2=APEv2Parser$1,FourCC_1$2=FourCC,BasicParser_1$2=BasicParser$1,WavPackToken_1=WavPackToken,debug_1$4=browserExports$2,debug$4=(0,debug_1$4.default)("music-metadata:parser:WavPack");class WavPackParser extends BasicParser_1$2.BasicParser{async parse(){return this.audioDataSize=0,await this.parseWavPackBlocks(),APEv2Parser_1$2.APEv2Parser.tryParseApeHeader(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(FourCC_1$2.FourCcToken)!=="wvpk")break;const n0=await this.tokenizer.readToken(WavPackToken_1.WavPack.BlockHeaderToken);if(n0.BlockID!=="wvpk")throw new Error("Invalid WavPack Block-ID");debug$4(`WavPack header blockIndex=${n0.blockIndex}, len=${WavPackToken_1.WavPack.BlockHeaderToken.len}`),n0.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!n0.flags.isHybrid),this.metadata.setFormat("bitsPerSample",n0.flags.bitsPerSample),n0.flags.isDSD||(this.metadata.setFormat("sampleRate",n0.flags.samplingRate),this.metadata.setFormat("duration",n0.totalSamples/n0.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",n0.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",n0.totalSamples),this.metadata.setFormat("codec",n0.flags.isDSD?"DSD":"PCM"));const a0=n0.blockSize-(WavPackToken_1.WavPack.BlockHeaderToken.len-8);await(n0.blockIndex===0?this.parseMetadataSubBlock(n0,a0):this.tokenizer.ignore(a0)),n0.blockSamples>0&&(this.audioDataSize+=n0.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=WavPackToken_1.WavPack.BlockHeaderToken.len);this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(e0,n0){for(;n0>WavPackToken_1.WavPack.MetadataIdToken.len;){const a0=await this.tokenizer.readToken(WavPackToken_1.WavPack.MetadataIdToken),i0=await this.tokenizer.readNumber(a0.largeBlock?Token$2.UINT24_LE:Token$2.UINT8),s0=Buffer.alloc(i0*2-(a0.isOddSize?1:0));switch(await this.tokenizer.readBuffer(s0),debug$4(`Metadata Sub-Blocks functionId=0x${a0.functionId.toString(16)}, id.largeBlock=${a0.largeBlock},data-size=${s0.length}`),a0.functionId){case 0:break;case 14:debug$4("ID_DSD_BLOCK");const o0=1<<s0.readUInt8(0),l0=e0.flags.samplingRate*o0*8;
645if(!e0.flags.isDSD)throw new Error("Only expect DSD block if DSD-flag is set");this.metadata.setFormat("sampleRate",l0),this.metadata.setFormat("duration",e0.totalSamples/l0);break;case 36:debug$4("ID_ALT_TRAILER: trailer for non-wav files");break;case 38:this.metadata.setFormat("audioMD5",s0);break;case 47:debug$4(`ID_BLOCK_CHECKSUM: checksum=${s0.toString("hex")}`);break;default:debug$4(`Ignore unsupported meta-sub-block-id functionId=0x${a0.functionId.toString(16)}`);break}n0-=WavPackToken_1.WavPack.MetadataIdToken.len+(a0.largeBlock?Token$2.UINT24_LE.len:Token$2.UINT8.len)+i0*2,debug$4(`remainingLength=${n0}`),a0.isOddSize&&this.tokenizer.ignore(1)}if(n0!==0)throw new Error("metadata-sub-block should fit it remaining length")}}WavPackParser$1.WavPackParser=WavPackParser;var DsfParser$1={},DsfChunk={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.FormatChunk=r0.ChannelType=r0.DsdChunk=r0.ChunkHeader=void 0;const e0=lib$1,n0=FourCC;r0.ChunkHeader={len:12,get:(a0,i0)=>({id:n0.FourCcToken.get(a0,i0),size:e0.UINT64_LE.get(a0,i0+4)})},r0.DsdChunk={len:16,get:(a0,i0)=>({fileSize:e0.INT64_LE.get(a0,i0),metadataPointer:e0.INT64_LE.get(a0,i0+8)})},function(a0){a0[a0.mono=1]="mono",a0[a0.stereo=2]="stereo",a0[a0.channels=3]="channels",a0[a0.quad=4]="quad",a0[a0["4 channels"]=5]="4 channels",a0[a0["5 channels"]=6]="5 channels",a0[a0["5.1 channels"]=7]="5.1 channels"}(r0.ChannelType||(r0.ChannelType={})),r0.FormatChunk={len:40,get:(a0,i0)=>({formatVersion:e0.INT32_LE.get(a0,i0),formatID:e0.INT32_LE.get(a0,i0+4),channelType:e0.INT32_LE.get(a0,i0+8),channelNum:e0.INT32_LE.get(a0,i0+12),samplingFrequency:e0.INT32_LE.get(a0,i0+16),bitsPerSample:e0.INT32_LE.get(a0,i0+20),sampleCount:e0.INT64_LE.get(a0,i0+24),blockSizePerChannel:e0.INT32_LE.get(a0,i0+32)})}})(DsfChunk);Object.defineProperty(DsfParser$1,"__esModule",{value:!0});DsfParser$1.DsfParser=void 0;const debug_1$3=browserExports$2,AbstractID3Parser_1=AbstractID3Parser$1,DsfChunk_1=DsfChunk,ID3v2Parser_1$1=ID3v2Parser$1,debug$3=(0,debug_1$3.default)("music-metadata:parser:DSF");class DsfParser extends AbstractID3Parser_1.AbstractID3Parser{async postId3v2Parse(){const e0=this.tokenizer.position,n0=await this.tokenizer.readToken(DsfChunk_1.ChunkHeader);if(n0.id!=="DSD ")throw new Error("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0);const a0=await this.tokenizer.readToken(DsfChunk_1.DsdChunk);if(a0.metadataPointer===BigInt(0))debug$3("No ID3v2 tag present");else return debug$3(`expect ID3v2 at offset=${a0.metadataPointer}`),await this.parseChunks(a0.fileSize-n0.size),await this.tokenizer.ignore(Number(a0.metadataPointer)-this.tokenizer.position-e0),new ID3v2Parser_1$1.ID3v2Parser().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(e0){for(;e0>=DsfChunk_1.ChunkHeader.len;){const n0=await this.tokenizer.readToken(DsfChunk_1.ChunkHeader);switch(debug$3(`Parsing chunk name=${n0.id} size=${n0.size}`),n0.id){case"fmt ":const a0=await this.tokenizer.readToken(DsfChunk_1.FormatChunk);this.metadata.setFormat("numberOfChannels",a0.channelNum),this.metadata.setFormat("sampleRate",a0.samplingFrequency),this.metadata.setFormat("bitsPerSample",a0.bitsPerSample),this.metadata.setFormat("numberOfSamples",a0.sampleCount),this.metadata.setFormat("duration",Number(a0.sampleCount)/a0.samplingFrequency);const i0=a0.bitsPerSample*a0.samplingFrequency*a0.channelNum;this.metadata.setFormat("bitrate",i0);return;default:this.tokenizer.ignore(Number(n0.size)-DsfChunk_1.ChunkHeader.len);break}e0-=n0.size}}}DsfParser$1.DsfParser=DsfParser;var DsdiffParser$1={},DsdiffToken={};Object.defineProperty(DsdiffToken,"__esModule",{value:!0});DsdiffToken.ChunkHeader64=void 0;const Token$1=lib$1,FourCC_1$1=FourCC;DsdiffToken.ChunkHeader64={len:12,get:(r0,e0)=>({chunkID:FourCC_1$1.FourCcToken.get(r0,e0),chunkSize:Token$1.INT64_BE.get(r0,e0+4)})};Object.defineProperty(DsdiffParser$1,"__esModule",{value:!0});DsdiffParser$1.DsdiffParser=void 0;const Token=lib$1,debug_1$2=browserExports$2,strtok3$1=core$1,FourCC_1=FourCC,BasicParser_1$1=BasicParser$1,ID3v2Parser_1=ID3v2Parser$1,DsdiffToken_1=DsdiffToken,debug$2=(0,debug_1$2.default)("music-metadata:parser:aiff");class DsdiffParser extends BasicParser_1$1.BasicParser{async parse(){const e0=await this.tokenizer.readToken(DsdiffToken_1.ChunkHeader64);
645if(e0.chunkID!=="FRM8")throw new Error("Unexpected chunk-ID");const n0=(await this.tokenizer.readToken(FourCC_1.FourCcToken)).trim();switch(n0){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${n0}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(e0.chunkSize-BigInt(FourCC_1.FourCcToken.len));default:throw Error(`Unsupported DSDIFF type: ${n0}`)}}async readFmt8Chunks(e0){for(;e0>=DsdiffToken_1.ChunkHeader64.len;){const n0=await this.tokenizer.readToken(DsdiffToken_1.ChunkHeader64);debug$2(`Chunk id=${n0.chunkID}`),await this.readData(n0),e0-=BigInt(DsdiffToken_1.ChunkHeader64.len)+n0.chunkSize}}async readData(e0){debug$2(`Reading data of chunk[ID=${e0.chunkID}, size=${e0.chunkSize}]`);const n0=this.tokenizer.position;switch(e0.chunkID.trim()){case"FVER":const i0=await this.tokenizer.readToken(Token.UINT32_LE);debug$2(`DSDIFF version=${i0}`);break;case"PROP":if(await this.tokenizer.readToken(FourCC_1.FourCcToken)!=="SND ")throw new Error("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(e0.chunkSize-BigInt(FourCC_1.FourCcToken.len));break;case"ID3":const o0=await this.tokenizer.readToken(new Token.Uint8ArrayType(Number(e0.chunkSize))),l0=strtok3$1.fromBuffer(o0);await new ID3v2Parser_1.ID3v2Parser().parse(this.metadata,l0,this.options);break;default:debug$2(`Ignore chunk[ID=${e0.chunkID}, size=${e0.chunkSize}]`);break;case"DSD":this.metadata.setFormat("numberOfSamples",Number(e0.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break}const a0=e0.chunkSize-BigInt(this.tokenizer.position-n0);a0>0&&(debug$2(`After Parsing chunk, remaining ${a0} bytes`),await this.tokenizer.ignore(Number(a0)))}async handleSoundPropertyChunks(e0){for(debug$2(`Parsing sound-property-chunks, remainingSize=${e0}`);e0>0;){const n0=await this.tokenizer.readToken(DsdiffToken_1.ChunkHeader64);debug$2(`Sound-property-chunk[ID=${n0.chunkID}, size=${n0.chunkSize}]`);const a0=this.tokenizer.position;switch(n0.chunkID.trim()){case"FS":const s0=await this.tokenizer.readToken(Token.UINT32_BE);this.metadata.setFormat("sampleRate",s0);break;case"CHNL":const o0=await this.tokenizer.readToken(Token.UINT16_BE);this.metadata.setFormat("numberOfChannels",o0),await this.handleChannelChunks(n0.chunkSize-BigInt(Token.UINT16_BE.len));break;case"CMPR":const l0=(await this.tokenizer.readToken(FourCC_1.FourCcToken)).trim(),c0=await this.tokenizer.readToken(Token.UINT8),u0=await this.tokenizer.readToken(new Token.StringType(c0,"ascii"));l0==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${l0} (${u0})`);break;case"ABSS":const d0=await this.tokenizer.readToken(Token.UINT16_BE),h0=await this.tokenizer.readToken(Token.UINT8),f0=await this.tokenizer.readToken(Token.UINT8),p0=await this.tokenizer.readToken(Token.UINT32_BE);debug$2(`ABSS ${d0}:${h0}:${f0}.${p0}`);break;case"LSCO":const A0=await this.tokenizer.readToken(Token.UINT16_BE);debug$2(`LSCO lsConfig=${A0}`);break;case"COMT":default:debug$2(`Unknown sound-property-chunk[ID=${n0.chunkID}, size=${n0.chunkSize}]`),await this.tokenizer.ignore(Number(n0.chunkSize))}const i0=n0.chunkSize-BigInt(this.tokenizer.position-a0);i0>0&&(debug$2(`After Parsing sound-property-chunk ${n0.chunkSize}, remaining ${i0} bytes`),await this.tokenizer.ignore(Number(i0))),e0-=BigInt(DsdiffToken_1.ChunkHeader64.len)+n0.chunkSize,debug$2(`Parsing sound-property-chunks, remainingSize=${e0}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){const n0=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",n0)}}async handleChannelChunks(e0){debug$2(`Parsing channel-chunks, remainingSize=${e0}`);const n0=[];for(;e0>=FourCC_1.FourCcToken.len;){const a0=await this.tokenizer.readToken(FourCC_1.FourCcToken);debug$2(`Channel[ID=${a0}]`),n0.push(a0),e0-=BigInt(FourCC_1.FourCcToken.len)}return debug$2(`Channels: ${n0.join(", ")}`),n0}}DsdiffParser$1.DsdiffParser=DsdiffParser;var MatroskaParser$1={},MatroskaDtd={};Object.defineProperty(MatroskaDtd,"__esModule",{value:!0});MatroskaDtd.elements=void 0;const types_1$1=types;MatroskaDtd.elements={440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:types_1$1.DataType.uint},17143:{name:"ebmlReadVersion",value:types_1$1.DataType.uint},17138:{name:"ebmlMaxIDWidth",value:types_1$1.DataType.uint},17139:{name:"ebmlMaxSizeWidth",value:types_1$1.DataType.uint},17026:{name:"docType",value:types_1$1.DataType.string},17031:{name:"docTypeVersion",value:types_1$1.DataType.uint},17029:{name:"docTypeReadVersion",value:types_1$1.DataType.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",container:{21419:{name:"seekId",value:types_1$1.DataType.binary},21420:{name:"seekPosition",value:types_1$1.DataType.uint}}}}}
645,357149030:{name:"info",container:{29604:{name:"uid",value:types_1$1.DataType.uid},29572:{name:"filename",value:types_1$1.DataType.string},3979555:{name:"prevUID",value:types_1$1.DataType.uid},3965867:{name:"prevFilename",value:types_1$1.DataType.string},4110627:{name:"nextUID",value:types_1$1.DataType.uid},4096955:{name:"nextFilename",value:types_1$1.DataType.string},2807729:{name:"timecodeScale",value:types_1$1.DataType.uint},17545:{name:"duration",value:types_1$1.DataType.float},17505:{name:"dateUTC",value:types_1$1.DataType.uint},31657:{name:"title",value:types_1$1.DataType.string},19840:{name:"muxingApp",value:types_1$1.DataType.string},22337:{name:"writingApp",value:types_1$1.DataType.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:types_1$1.DataType.uid},163:{name:"unknown",value:types_1$1.DataType.binary},167:{name:"position",value:types_1$1.DataType.uid},171:{name:"prevSize",value:types_1$1.DataType.uid}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:types_1$1.DataType.uint},29637:{name:"uid",value:types_1$1.DataType.uid},131:{name:"trackType",value:types_1$1.DataType.uint},185:{name:"flagEnabled",value:types_1$1.DataType.bool},136:{name:"flagDefault",value:types_1$1.DataType.bool},21930:{name:"flagForced",value:types_1$1.DataType.bool},156:{name:"flagLacing",value:types_1$1.DataType.bool},28135:{name:"minCache",value:types_1$1.DataType.uint},28136:{name:"maxCache",value:types_1$1.DataType.uint},2352003:{name:"defaultDuration",value:types_1$1.DataType.uint},2306383:{name:"timecodeScale",value:types_1$1.DataType.float},21358:{name:"name",value:types_1$1.DataType.string},2274716:{name:"language",value:types_1$1.DataType.string},134:{name:"codecID",value:types_1$1.DataType.string},25506:{name:"codecPrivate",value:types_1$1.DataType.binary},2459272:{name:"codecName",value:types_1$1.DataType.string},3839639:{name:"codecSettings",value:types_1$1.DataType.string},3883072:{name:"codecInfoUrl",value:types_1$1.DataType.string},2536e3:{name:"codecDownloadUrl",value:types_1$1.DataType.string},170:{name:"codecDecodeAll",value:types_1$1.DataType.bool},28587:{name:"trackOverlay",value:types_1$1.DataType.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:types_1$1.DataType.bool},21432:{name:"stereoMode",value:types_1$1.DataType.uint},176:{name:"pixelWidth",value:types_1$1.DataType.uint},186:{name:"pixelHeight",value:types_1$1.DataType.uint},21680:{name:"displayWidth",value:types_1$1.DataType.uint},21690:{name:"displayHeight",value:types_1$1.DataType.uint},21683:{name:"aspectRatioType",value:types_1$1.DataType.uint},3061028:{name:"colourSpace",value:types_1$1.DataType.uint},3126563:{name:"gammaValue",value:types_1$1.DataType.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:types_1$1.DataType.float},30901:{name:"outputSamplingFrequency",value:types_1$1.DataType.float}
645,159:{name:"channels",value:types_1$1.DataType.uint},148:{name:"channels",value:types_1$1.DataType.uint},32123:{name:"channelPositions",value:types_1$1.DataType.binary},25188:{name:"bitDepth",value:types_1$1.DataType.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:types_1$1.DataType.uint},20530:{name:"scope",value:types_1$1.DataType.bool},20531:{name:"type",value:types_1$1.DataType.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:types_1$1.DataType.uint},16981:{name:"contentCompSettings",value:types_1$1.DataType.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:types_1$1.DataType.uint},18402:{name:"contentEncKeyID",value:types_1$1.DataType.binary},18403:{name:"contentSignature ",value:types_1$1.DataType.binary},18404:{name:"ContentSigKeyID ",value:types_1$1.DataType.binary},18405:{name:"contentSigAlgo ",value:types_1$1.DataType.uint},18406:{name:"contentSigHashAlgo ",value:types_1$1.DataType.uint}}},25188:{name:"bitDepth",value:types_1$1.DataType.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:types_1$1.DataType.uid},183:{name:"positions",container:{247:{name:"track",value:types_1$1.DataType.uint},241:{name:"clusterPosition",value:types_1$1.DataType.uint},21368:{name:"blockNumber",value:types_1$1.DataType.uint},234:{name:"codecState",value:types_1$1.DataType.uint},219:{name:"reference",container:{150:{name:"time",value:types_1$1.DataType.uint},151:{name:"cluster",value:types_1$1.DataType.uint},21343:{name:"number",value:types_1$1.DataType.uint},235:{name:"codecState",value:types_1$1.DataType.uint}}},240:{name:"relativePosition",value:types_1$1.DataType.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:types_1$1.DataType.string},18030:{name:"name",value:types_1$1.DataType.string},18016:{name:"mimeType",value:types_1$1.DataType.string},18012:{name:"data",value:types_1$1.DataType.binary},18094:{name:"uid",value:types_1$1.DataType.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:types_1$1.DataType.uid},145:{name:"timeStart",value:types_1$1.DataType.uint},146:{name:"timeEnd",value:types_1$1.DataType.uid},152:{name:"hidden",value:types_1$1.DataType.bool},17816:{name:"enabled",value:types_1$1.DataType.uid},143:{name:"track",container:{137:{name:"trackNumber",value:types_1$1.DataType.uid},128:{name:"display",container:{133:{name:"string",value:types_1$1.DataType.string},17276:{name:"language ",value:types_1$1.DataType.string},17278:{name:"country ",value:types_1$1.DataType.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:types_1$1.DataType.uid},25540:{name:"tagChapterUID",value:types_1$1.DataType.uint},25542:{name:"tagAttachmentUID",value:types_1$1.DataType.uid},25546:{name:"targetType",value:types_1$1.DataType.string},26826:{name:"targetTypeValue",value:types_1$1.DataType.uint},25545:{name:"tagEditionUID",value:types_1$1.DataType.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:types_1$1.DataType.string},17543:{name:"string",value:types_1$1.DataType.string},17541:{name:"binary",value:types_1$1.DataType.binary},17530:{name:"language",value:types_1$1.DataType.string},17531:{name:"languageIETF",value:types_1$1.DataType.string},17540:{name:"default",value:types_1$1.DataType.bool}}}}}}}}}};Object.defineProperty(MatroskaParser$1,"__esModule",{value:!0});MatroskaParser$1.MatroskaParser=void 0;const token_types_1=lib$1,debug_1$1=browserExports$2,BasicParser_1=BasicParser$1,types_1=types,matroskaDtd=MatroskaDtd,debug$1=(0,debug_1$1.default)("music-metadata:parser:matroska");class MatroskaParser extends BasicParser_1.BasicParser{constructor(){super(),this.padding=0,this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.parserMap.set(types_1.DataType.uint,e0=>this.readUint(e0)),this.parserMap.set(types_1.DataType.string,e0=>this.readString(e0)),this.parserMap.set(types_1.DataType.binary,e0=>this.readBuffer(e0)),this.parserMap.set(types_1.DataType.uid,async e0=>await this.readUint(e0)===1),this.parserMap.set(types_1.DataType.bool,e0=>this.readFlag(e0)),this.parserMap.set(types_1.DataType.float,e0=>this.readFloat(e0))}init(e0,n0,a0){return super.init(e0,n0,a0),this}async parse(){const e0=await this.parseContainer(matroskaDtd.elements,this.tokenizer.fileInfo.size,[]);if(this.metadata.setFormat("container",`EBML/${e0.ebml.docType}`),e0.segment){const n0=e0.segment.info;if(n0){const i0=n0.timecodeScale?n0.timecodeScale:1e6;if(typeof n0.duration=="number"){const s0=n0.duration*i0/1e9;this.addTag("segment:title",n0.title),this.metadata.setFormat("duration",s0)}}const a0=e0.segment.tracks;
645if(a0&&a0.entries){a0.entries.forEach(s0=>{const o0={codecName:s0.codecID.replace("A_","").replace("V_",""),codecSettings:s0.codecSettings,flagDefault:s0.flagDefault,flagLacing:s0.flagLacing,flagEnabled:s0.flagEnabled,language:s0.language,name:s0.name,type:s0.trackType,audio:s0.audio,video:s0.video};this.metadata.addStreamInfo(o0)});const i0=a0.entries.filter(s0=>s0.trackType===types_1.TrackType.audio.valueOf()).reduce((s0,o0)=>!s0||!s0.flagDefault&&o0.flagDefault||o0.trackNumber&&o0.trackNumber<s0.trackNumber?o0:s0,null);i0&&(this.metadata.setFormat("codec",i0.codecID.replace("A_","")),this.metadata.setFormat("sampleRate",i0.audio.samplingFrequency),this.metadata.setFormat("numberOfChannels",i0.audio.channels)),e0.segment.tags&&e0.segment.tags.tag.forEach(s0=>{const o0=s0.target,l0=o0!=null&&o0.targetTypeValue?types_1.TargetType[o0.targetTypeValue]:o0!=null&&o0.targetType?o0.targetType:"track";s0.simpleTags.forEach(c0=>{const u0=c0.string?c0.string:c0.binary;this.addTag(`${l0}:${c0.name}`,u0)})}),e0.segment.attachments&&e0.segment.attachments.attachedFiles.filter(s0=>s0.mimeType.startsWith("image/")).map(s0=>({data:s0.data,format:s0.mimeType,description:s0.description,name:s0.name})).forEach(s0=>{this.addTag("picture",s0)})}}}async parseContainer(e0,n0,a0){const i0={};for(;this.tokenizer.position<n0;){let s0;try{s0=await this.readElement()}catch(l0){if(l0.message==="End-Of-Stream")break;throw l0}const o0=e0[s0.id];if(o0)if(debug$1(`Element: name=${o0.name}, container=${!!o0.container}`),o0.container){const l0=await this.parseContainer(o0.container,s0.len>=0?this.tokenizer.position+s0.len:-1,a0.concat([o0.name]));o0.multiple?(i0[o0.name]||(i0[o0.name]=[]),i0[o0.name].push(l0)):i0[o0.name]=l0}else i0[o0.name]=await this.parserMap.get(o0.value)(s0);else switch(s0.id){case 236:this.padding+=s0.len,await this.tokenizer.ignore(s0.len);break;default:debug$1(`parseEbml: path=${a0.join("/")}, unknown element: id=${s0.id.toString(16)}`),this.padding+=s0.len,await this.tokenizer.ignore(s0.len)}}return i0}async readVintData(e0){const n0=await this.tokenizer.peekNumber(token_types_1.UINT8);let a0=128,i0=1;for(;!(n0&a0);){if(i0>e0)throw new Error("VINT value exceeding maximum size");++i0,a0>>=1}const s0=Buffer.alloc(i0);return await this.tokenizer.readBuffer(s0),s0}async readElement(){const e0=await this.readVintData(this.ebmlMaxIDLength),n0=await this.readVintData(this.ebmlMaxSizeLength);n0[0]^=128>>n0.length-1;const a0=Math.min(6,n0.length);return{id:e0.readUIntBE(0,e0.length),len:n0.readUIntBE(n0.length-a0,a0)}}isMaxValue(e0){if(e0.length===this.ebmlMaxSizeLength){for(let n0=1;n0<this.ebmlMaxSizeLength;++n0)if(e0[n0]!==255)return!1;return!0}return!1}async readFloat(e0){switch(e0.len){case 0:return 0;case 4:return this.tokenizer.readNumber(token_types_1.Float32_BE);case 8:return this.tokenizer.readNumber(token_types_1.Float64_BE);case 10:return this.tokenizer.readNumber(token_types_1.Float64_BE);default:throw new Error(`Invalid IEEE-754 float length: ${e0.len}`)}}async readFlag(e0){return await this.readUint(e0)===1}async readUint(e0){const n0=await this.readBuffer(e0),a0=Math.min(6,e0.len);return n0.readUIntBE(e0.len-a0,a0)}async readString(e0){return(await this.tokenizer.readToken(new token_types_1.StringType(e0.len,"utf-8"))).replace(/\00.*$/g,"")}async readBuffer(e0){const n0=Buffer.alloc(e0.len);return await this.tokenizer.readBuffer(n0),n0}addTag(e0,n0){this.metadata.addTag("matroska",e0,n0)}}MatroskaParser$1.MatroskaParser=MatroskaParser;Object.defineProperty(ParserFactory$1,"__esModule",{value:!0});ParserFactory$1.ParserFactory=ParserFactory$1.parseHttpContentType=void 0;const FileType=core,ContentType=contentType,MimeType=mediaTyper,debug_1=browserExports$2,MetadataCollector_1=MetadataCollector$1,AiffParser_1=AiffParser,APEv2Parser_1$1=APEv2Parser$1,AsfParser_1=AsfParser$1,FlacParser_1=FlacParser$1,MP4Parser_1=MP4Parser$1,MpegParser_1=MpegParser$1,musepack_1=musepack,OggParser_1=OggParser$1,WaveParser_1=WaveParser$1,WavPackParser_1=WavPackParser$1,DsfParser_1=DsfParser$1,DsdiffParser_1=DsdiffParser$1,MatroskaParser_1=MatroskaParser$1,debug=(0,debug_1.default)("music-metadata:parser:factory");function parseHttpContentType(r0){const e0=ContentType.parse(r0),n0=MimeType.parse(e0.type);return{type:n0.type,subtype:n0.subtype,suffix:n0.suffix,parameters:e0.parameters}}ParserFactory$1.parseHttpContentType=parseHttpContentType;async function parse(r0,e0,n0={}){const a0=await ParserFactory.loadParser(e0),i0=new MetadataCollector_1.MetadataCollector(n0);return await a0.init(i0,r0,n0).parse(),i0.toCommonMetadata()}class ParserFactory{static async parseOnContentType(e0,n0){const{mimeType:a0,path:i0,url:s0}=await e0.fileInfo,o0=ParserFactory.getParserIdForMimeType(a0)||ParserFactory.getParserIdForExtension(i0)||ParserFactory.getParserIdForExtension(s0);return o0||debug("No parser found for MIME-type / extension: "+a0),this.parse(e0,o0,n0)}static async parse(e0,n0,a0){if(!n0){debug("Guess parser on content...");const i0=Buffer.alloc(4100);if(await e0.peekBuffer(i0,{mayBeLess:!0}),e0.fileInfo.path&&(n0=this.getParserIdForExtension(e0.fileInfo.path)),!n0){const s0=await FileType.fromBuffer(i0);if(!s0)throw new Error("Failed to determine audio format");if(debug(`Guessed file type is mime=${s0.mime}, extension=${s0.ext}`),n0=ParserFactory.getParserIdForMimeType(s0.mime),!n0)throw new Error("Guessed MIME-type not supported: "+s0.mime)}}return parse(e0,n0,a0)}static getParserIdForExtension(e0){if(!e0)return;switch(this.getExtension(e0).toLocaleLowerCase()||e0){case".mp2":case".mp3":case".m2a":case".aac":return"mpeg";case".ape":return"apev2";case".mp4":case".m4a":case".m4b":case".m4pa":case".m4v":case".m4r":case".3gp":return"mp4";case".wma":case".wmv":case".asf":return"asf";case".flac":return"flac";case".ogg":case".ogv":case".oga":case".ogm":case".ogx":case".opus":case".spx":return"ogg";case".aif":case".aiff":case".aifc":return"aiff";case".wav":case".bwf":return"riff";case".wv":case".wvp":return"wavpack";case".mpc":return"musepack";case".dsf":return"dsf";case".dff":return"dsdiff";case".mka":case".mkv":case".mk3d":case".mks":case".webm":return"matroska"}}static async loadParser(e0){switch(e0){case"aiff":return new AiffParser_1.AIFFParser;case"adts":case"mpeg":return new MpegParser_1.MpegParser;case"apev2":return new APEv2Parser_1$1.APEv2Parser;case"asf":return new AsfParser_1.AsfParser;case"dsf":return new DsfParser_1.DsfParser;case"dsdiff":return new DsdiffParser_1.DsdiffParser;case"flac":return new FlacParser_1.FlacParser;case"mp4":return new MP4Parser_1.MP4Parser;case"musepack":return new musepack_1.default;case"ogg":return new OggParser_1.OggParser;case"riff":return new WaveParser_1.WaveParser;case"wavpack":return new WavPackParser_1.WavPackParser;case"matroska":return new MatroskaParser_1.MatroskaParser;default:throw new Error(`Unknown parser type: ${e0}`)}}static getExtension(e0){const n0=e0.lastIndexOf(".");return n0===-1?"":e0.slice(n0)}static getParserIdForMimeType(e0){let n0;try{n0=parseHttpContentType(e0)}catch{debug(`Invalid HTTP Content-Type header value: ${e0}`);return}const a0=n0.subtype.indexOf("x-")===0?n0.subtype.substring(2):n0.subtype;switch(n0.type){case"audio":switch(a0){case"mp3":case"mpeg":return"mpeg";case"aac":case"aacp":return"adts";case"flac":return"flac";case"ape":case"monkeys-audio":return"apev2";case"mp4":case"m4a":return"mp4";case"ogg":case"opus":case"speex":return"ogg";case"ms-wma":case"ms-wmv":case"ms-asf":return"asf";case"aiff":case"aif":case"aifc":return"aiff";case"vnd.wave":case"wav":case"wave":return"riff";case"wavpack":return"wavpack";case"musepack":return"musepack";case"matroska":case"webm":return"matroska";case"dsf":return"dsf"}break;case"video":switch(a0){case"ms-asf":case"ms-wmv":return"asf";case"m4v":case"mp4":return"mp4";case"ogg":return"ogg";case"matroska":case"webm":return"matroska"}break;case"application":switch(a0){case"vnd.ms-asf":return"asf";case"ogg":return"ogg"}break}}}ParserFactory$1.ParserFactory=ParserFactory;var RandomUint8ArrayReader$1={};Object.defineProperty(RandomUint8ArrayReader$1,"__esModule",{value:!0});RandomUint8ArrayReader$1.RandomUint8ArrayReader=void 0;class RandomUint8ArrayReader{constructor(e0){this.uint8Array=e0,this.fileSize=e0.length}async randomRead(e0,n0,a0,i0){return e0.set(this.uint8Array.subarray(i0,i0+a0),n0),a0}}RandomUint8ArrayReader$1.RandomUint8ArrayReader=RandomUint8ArrayReader;var Lyrics3={};(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.getLyricsHeaderLength=r0.endTag2=void 0,r0.endTag2="LYRICS200";async function e0(n0){if(n0.fileSize>=143){const a0=Buffer.alloc(15);await n0.randomRead(a0,0,a0.length,n0.fileSize-143);const i0=a0.toString("binary");if(i0.substr(6)===r0.endTag2)return parseInt(i0.substr(0,6),10)+15}return 0}r0.getLyricsHeaderLength=e0})(Lyrics3);
645Object.defineProperty(core$2,"__esModule",{value:!0});core$2.scanAppendingHeaders=core$2.selectCover=core$2.ratingToStars=core$2.orderTags=core$2.parseFromTokenizer=core$2.parseBuffer=core$2.parseStream=void 0;const strtok3=core$1,ParserFactory_1=ParserFactory$1,RandomUint8ArrayReader_1=RandomUint8ArrayReader$1,APEv2Parser_1=APEv2Parser$1,ID3v1Parser_1=ID3v1Parser,Lyrics3_1=Lyrics3;function parseStream(r0,e0,n0={}){return parseFromTokenizer(strtok3.fromStream(r0,typeof e0=="string"?{mimeType:e0}:e0),n0)}core$2.parseStream=parseStream;async function parseBuffer(r0,e0,n0={}){const a0=new RandomUint8ArrayReader_1.RandomUint8ArrayReader(r0);await scanAppendingHeaders(a0,n0);const i0=strtok3.fromBuffer(r0,typeof e0=="string"?{mimeType:e0}:e0);return parseFromTokenizer(i0,n0)}core$2.parseBuffer=parseBuffer;function parseFromTokenizer(r0,e0){return ParserFactory_1.ParserFactory.parseOnContentType(r0,e0)}core$2.parseFromTokenizer=parseFromTokenizer;function orderTags(r0){const e0={};for(const n0 of r0)(e0[n0.id]=e0[n0.id]||[]).push(n0.value);return e0}core$2.orderTags=orderTags;function ratingToStars(r0){return r0===void 0?0:1+Math.round(r0*4)}core$2.ratingToStars=ratingToStars;function selectCover(r0){return r0?r0.reduce((e0,n0)=>n0.name&&n0.name.toLowerCase()in["front","cover","cover (front)"]?n0:e0):null}core$2.selectCover=selectCover;async function scanAppendingHeaders(r0,e0={}){let n0=r0.fileSize;if(await(0,ID3v1Parser_1.hasID3v1Header)(r0)){n0-=128;const a0=await(0,Lyrics3_1.getLyricsHeaderLength)(r0);n0-=a0}e0.apeHeader=await APEv2Parser_1.APEv2Parser.findApeFooterOffset(r0,n0)}core$2.scanAppendingHeaders=scanAppendingHeaders;var lib={},browser$2={exports:{}},stream={exports:{}};let AggregateError$1=class extends Error{constructor(e0){if(!Array.isArray(e0))throw new TypeError(`Expected input to be an Array, got ${typeof e0}`);let n0="";for(let a0=0;a0<e0.length;a0++)n0+=` ${e0[a0].stack} 646`;super(n0),this.name="AggregateError",this.errors=e0}};var primordials={AggregateError:AggregateError$1,ArrayIsArray(r0){return Array.isArray(r0)},ArrayPrototypeIncludes(r0,e0){return r0.includes(e0)},ArrayPrototypeIndexOf(r0,e0){return r0.indexOf(e0)},ArrayPrototypeJoin(r0,e0){return r0.join(e0)},ArrayPrototypeMap(r0,e0){return r0.map(e0)},ArrayPrototypePop(r0,e0){return r0.pop(e0)},ArrayPrototypePush(r0,e0){return r0.push(e0)},ArrayPrototypeSlice(r0,e0,n0){return r0.slice(e0,n0)},Error,FunctionPrototypeCall(r0,e0,...n0){return r0.call(e0,...n0)},FunctionPrototypeSymbolHasInstance(r0,e0){return Function.prototype[Symbol.hasInstance].call(r0,e0)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(r0,e0){return Object.defineProperties(r0,e0)},ObjectDefineProperty(r0,e0,n0){return Object.defineProperty(r0,e0,n0)},ObjectGetOwnPropertyDescriptor(r0,e0){return Object.getOwnPropertyDescriptor(r0,e0)},ObjectKeys(r0){return Object.keys(r0)},ObjectSetPrototypeOf(r0,e0){return Object.setPrototypeOf(r0,e0)},Promise,PromisePrototypeCatch(r0,e0){return r0.catch(e0)},PromisePrototypeThen(r0,e0,n0){return r0.then(e0,n0)},PromiseReject(r0){return Promise.reject(r0)},PromiseResolve(r0){return Promise.resolve(r0)},ReflectApply:Reflect.apply,RegExpPrototypeTest(r0,e0){return r0.test(e0)},SafeSet:Set,String,StringPrototypeSlice(r0,e0,n0){return r0.slice(e0,n0)},StringPrototypeToLowerCase(r0){return r0.toLowerCase()},StringPrototypeToUpperCase(r0){return r0.toUpperCase()},StringPrototypeTrim(r0){return r0.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(r0,e0,n0){return r0.set(e0,n0)},Boolean,Uint8Array},util={exports:{}},inspect$2={format(r0,...e0){return r0.replace(/%([sdifj])/g,function(...[n0,a0]){const i0=e0.shift();return a0==="f"?i0.toFixed(6):a0==="j"?JSON.stringify(i0):a0==="s"&&typeof i0=="object"?`${i0.constructor!==Object?i0.
646constructor.name:""} {}`.trim():i0.toString()})},inspect(r0){switch(typeof r0){case"string":if(r0.includes("'"))if(r0.includes('"')){if(!r0.includes("`")&&!r0.includes("${"))return`\`${r0}\``}else return`"${r0}"`;return`'${r0}'`;case"number":return isNaN(r0)?"NaN":Object.is(r0,-0)?String(r0):r0;case"bigint":return`${String(r0)}n`;case"boolean":case"undefined":return String(r0);case"object":return"{}"}}};const{format:format$1,inspect:inspect$1}=inspect$2,{AggregateError:CustomAggregateError}=primordials,AggregateError=globalThis.AggregateError||CustomAggregateError,kIsNodeError=Symbol("kIsNodeError"),kTypes=["string","function","number","object","Function","Object","boolean","bigint","symbol"],classRegExp=/^([A-Z][a-z0-9]*)+$/,nodeInternalPrefix="__node_internal_",codes$1={};function assert$1(r0,e0){if(!r0)throw new codes$1.ERR_INTERNAL_ASSERTION(e0)}function addNumericalSeparator(r0){let e0="",n0=r0.length;const a0=r0[0]==="-"?1:0;for(;n0>=a0+4;n0-=3)e0=`_${r0.slice(n0-3,n0)}${e0}`;return`${r0.slice(0,n0)}${e0}`}function getMessage(r0,e0,n0){if(typeof e0=="function")return assert$1(e0.length<=n0.length,`Code: ${r0}; The provided arguments length (${n0.length}) does not match the required ones (${e0.length}).`),e0(...n0);const a0=(e0.match(/%[dfijoOs]/g)||[]).length;return assert$1(a0===n0.length,`Code: ${r0}; The provided arguments length (${n0.length}) does not match the required ones (${a0}).`),n0.length===0?e0:format$1(e0,...n0)}function E$1(r0,e0,n0){n0||(n0=Error);class a0 extends n0{constructor(...s0){super(getMessage(r0,e0,s0))}toString(){return`${this.name} [${r0}]: ${this.message}`}}Object.defineProperties(a0.prototype,{name:{value:n0.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${r0}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),a0.prototype.code=r0,a0.prototype[kIsNodeError]=!0,codes$1[r0]=a0}function hideStackFrames$1(r0){const e0=nodeInternalPrefix+r0.name;return Object.defineProperty(r0,"name",{value:e0}),r0}function aggregateTwoErrors$2(r0,e0){if(r0&&e0&&r0!==e0){if(Array.isArray(e0.errors))return e0.errors.push(r0),e0;const n0=new AggregateError([e0,r0],e0.message);return n0.code=e0.code,n0}return r0||e0}let AbortError$5=class extends Error{constructor(e0="The operation was aborted",n0=void 0){if(n0!==void 0&&typeof n0!="object")throw new codes$1.ERR_INVALID_ARG_TYPE("options","Object",n0);super(e0,n0),this.code="ABORT_ERR",this.name="AbortError"}};E$1("ERR_ASSERTION","%s",Error);E$1("ERR_INVALID_ARG_TYPE",(r0,e0,n0)=>{assert$1(typeof r0=="string","'name' must be a string"),Array.isArray(e0)||(e0=[e0]);let a0="The ";r0.endsWith(" argument")?a0+=`${r0} `:a0+=`"${r0}" ${r0.includes(".")?"property":"argument"} `,a0+="must be ";const i0=[],s0=[],o0=[];for(const c0 of e0)assert$1(typeof c0=="string","All expected entries have to be of type string"),kTypes.includes(c0)?i0.push(c0.toLowerCase()):classRegExp.test(c0)?s0.push(c0):(assert$1(c0!=="object",'The value "object" should be written as "Object"'),o0.push(c0));if(s0.length>0){const c0=i0.indexOf("object");c0!==-1&&(i0.splice(i0,c0,1),s0.push("Object"))}if(i0.length>0){switch(i0.length){case 1:a0+=`of type ${i0[0]}`;break;case 2:a0+=`one of type ${i0[0]} or ${i0[1]}`;break;default:{const c0=i0.pop();a0+=`one of type ${i0.join(", ")}, or ${c0}`}}(s0.length>0||o0.length>0)&&(a0+=" or ")}if(s0.length>0){switch(s0.length){case 1:a0+=`an instance of ${s0[0]}`;break;case 2:a0+=`an instance of ${s0[0]} or ${s0[1]}`;break;default:{const c0=s0.pop();a0+=`an instance of ${s0.join(", ")}, or ${c0}`}}o0.length>0&&(a0+=" or ")}switch(o0.length){case 0:break;case 1:o0[0].toLowerCase()!==o0[0]&&(a0+="an "),a0+=`${o0[0]}`;break;case 2:a0+=`one of ${o0[0]} or ${o0[1]}`;break;default:{const c0=o0.pop();a0+=`one of ${o0.join(", ")}, or ${c0}`}}if(n0==null)a0+=`. Received ${n0}`;else if(typeof n0=="function"&&n0.name)a0+=`. Received function ${n0.name}`;else if(typeof n0=="object"){var l0;if((l0=n0.constructor)!==null&&l0!==void 0&&l0.name)a0+=`. Received an instance of ${n0.constructor.name}`;else{const c0=inspect$1(n0,{depth:-1});a0+=`. Received ${c0}`}}else{let c0=inspect$1(n0,{colors:!1});c0.length>25&&(c0=`${c0.slice(0,25)}...`),a0+=`. Received type ${typeof n0} (${c0})`}return a0},TypeError);
646E$1("ERR_INVALID_ARG_VALUE",(r0,e0,n0="is invalid")=>{let a0=inspect$1(e0);return a0.length>128&&(a0=a0.slice(0,128)+"..."),`The ${r0.includes(".")?"property":"argument"} '${r0}' ${n0}. Received ${a0}`},TypeError);E$1("ERR_INVALID_RETURN_VALUE",(r0,e0,n0)=>{var a0;const i0=n0!=null&&(a0=n0.constructor)!==null&&a0!==void 0&&a0.name?`instance of ${n0.constructor.name}`:`type ${typeof n0}`;return`Expected ${r0} to be returned from the "${e0}" function but got ${i0}.`},TypeError);E$1("ERR_MISSING_ARGS",(...r0)=>{assert$1(r0.length>0,"At least one arg needs to be specified");let e0;const n0=r0.length;switch(r0=(Array.isArray(r0)?r0:[r0]).map(a0=>`"${a0}"`).join(" or "),n0){case 1:e0+=`The ${r0[0]} argument`;break;case 2:e0+=`The ${r0[0]} and ${r0[1]} arguments`;break;default:{const a0=r0.pop();e0+=`The ${r0.join(", ")}, and ${a0} arguments`}break}return`${e0} must be specified`},TypeError);E$1("ERR_OUT_OF_RANGE",(r0,e0,n0)=>{assert$1(e0,'Missing "range" argument');let a0;if(Number.isInteger(n0)&&Math.abs(n0)>2**32)a0=addNumericalSeparator(String(n0));else if(typeof n0=="bigint"){a0=String(n0);const i0=BigInt(2)**BigInt(32);(n0>i0||n0<-i0)&&(a0=addNumericalSeparator(a0)),a0+="n"}else a0=inspect$1(n0);return`The value of "${r0}" is out of range. It must be ${e0}. Received ${a0}`},RangeError);E$1("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);E$1("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);E$1("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);E$1("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);E$1("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);E$1("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);E$1("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);E$1("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);E$1("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);E$1("ERR_STREAM_WRITE_AFTER_END","write after end",Error);E$1("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var errors={AbortError:AbortError$5,aggregateTwoErrors:hideStackFrames$1(aggregateTwoErrors$2),hideStackFrames:hideStackFrames$1,codes:codes$1},browser$1={exports:{}},hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser$1.exports;hasRequiredBrowser=1;const{AbortController:r0,AbortSignal:e0}=typeof self<"u"?self:typeof window<"u"?window:void 0;return browser$1.exports=r0,browser$1.exports.AbortSignal=e0,browser$1.exports.default=r0,browser$1.exports}var events={exports:{}},R$1=typeof Reflect=="object"?Reflect:null,ReflectApply=R$1&&typeof R$1.apply=="function"?R$1.apply:function r0(e0,n0,a0){return Function.prototype.apply.call(e0,n0,a0)},ReflectOwnKeys;R$1&&typeof R$1.ownKeys=="function"?ReflectOwnKeys=R$1.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(e0){return Object.getOwnPropertyNames(e0).concat(Object.getOwnPropertySymbols(e0))}:ReflectOwnKeys=function(e0){return Object.getOwnPropertyNames(e0)};function ProcessEmitWarning(r0){console&&console.warn&&console.warn(r0)}var NumberIsNaN$2=Number.isNaN||function r0(e0){return e0!==e0};function EventEmitter$1(){EventEmitter$1.init.call(this)}events.exports=EventEmitter$1;events.exports.once=once$2;EventEmitter$1.EventEmitter=EventEmitter$1;EventEmitter$1.prototype._events=void 0;EventEmitter$1.prototype._eventsCount=0;EventEmitter$1.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(r0){if(typeof r0!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r0)}Object.defineProperty(EventEmitter$1,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(r0){if(typeof r0!="number"||r0<0||NumberIsNaN$2(r0))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r0+".");defaultMaxListeners=r0}});EventEmitter$1.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$1.prototype.setMaxListeners=function r0(e0){if(typeof e0!="number"||e0<0||NumberIsNaN$2(e0))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e0+".");return this._maxListeners=e0,this};function _getMaxListeners(r0){return r0._maxListeners===void 0?EventEmitter$1.defaultMaxListeners:r0._maxListeners}EventEmitter$1.prototype.getMaxListeners=function r0(){return _getMaxListeners(this)};EventEmitter$1.prototype.emit=function r0(e0){for(var n0=[],a0=1;a0<arguments.length;a0++)n0.push(arguments[a0]);var i0=e0==="error",s0=this._events;if(s0!==void 0)i0=i0&&s0.error===void 0;else if(!i0)return!1;if(i0){var o0;if(n0.length>0&&(o0=n0[0]),o0 instanceof Error)throw o0;var l0=new Error("Unhandled error."+(o0?" ("+o0.message+")":""));throw l0.context=o0,l0}var c0=s0[e0];if(c0===void 0)return!1;if(typeof c0=="function")ReflectApply(c0,this,n0);else for(var u0=c0.length,d0=arrayClone(c0,u0),a0=0;a0<u0;++a0)ReflectApply(d0[a0],this,n0);return!0};function _addListener(r0,e0,n0,a0){var i0,s0,o0;if(checkListener(n0),s0=r0._events,s0===void 0?(s0=r0._events=Object.create(null),r0._eventsCount=0):(s0.newListener!==void 0&&(r0.emit("newListener",e0,n0.listener?n0.listener:n0),s0=r0._events),o0=s0[e0]),o0===void 0)
vendor: 5,202 bytes, line 646
646o0=s0[e0]=n0,++r0._eventsCount;else if(typeof o0=="function"?o0=s0[e0]=a0?[n0,o0]:[o0,n0]:a0?o0.unshift(n0):o0.push(n0),i0=_getMaxListeners(r0),i0>0&&o0.length>i0&&!o0.warned){o0.warned=!0;var l0=new Error("Possible EventEmitter memory leak detected. "+o0.length+" "+String(e0)+" listeners added. Use emitter.setMaxListeners() to increase limit");l0.name="MaxListenersExceededWarning",l0.emitter=r0,l0.type=e0,l0.count=o0.length,ProcessEmitWarning(l0)}return r0}EventEmitter$1.prototype.addListener=function r0(e0,n0){return _addListener(this,e0,n0,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function r0(e0,n0){return _addListener(this,e0,n0,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(r0,e0,n0){var a0={fired:!1,wrapFn:void 0,target:r0,type:e0,listener:n0},i0=onceWrapper.bind(a0);return i0.listener=n0,a0.wrapFn=i0,i0}EventEmitter$1.prototype.once=function r0(e0,n0){return checkListener(n0),this.on(e0,_onceWrap(this,e0,n0)),this};EventEmitter$1.prototype.prependOnceListener=function r0(e0,n0){return checkListener(n0),this.prependListener(e0,_onceWrap(this,e0,n0)),this};EventEmitter$1.prototype.removeListener=function r0(e0,n0){var a0,i0,s0,o0,l0;if(checkListener(n0),i0=this._events,i0===void 0)return this;if(a0=i0[e0],a0===void 0)return this;if(a0===n0||a0.listener===n0)--this._eventsCount===0?this._events=Object.create(null):(delete i0[e0],i0.removeListener&&this.emit("removeListener",e0,a0.listener||n0));else if(typeof a0!="function"){for(s0=-1,o0=a0.length-1;o0>=0;o0--)if(a0[o0]===n0||a0[o0].listener===n0){l0=a0[o0].listener,s0=o0;break}if(s0<0)return this;s0===0?a0.shift():spliceOne(a0,s0),a0.length===1&&(i0[e0]=a0[0]),i0.removeListener!==void 0&&this.emit("removeListener",e0,l0||n0)}return this};EventEmitter$1.prototype.off=EventEmitter$1.prototype.removeListener;EventEmitter$1.prototype.removeAllListeners=function r0(e0){var n0,a0,i0;if(a0=this._events,a0===void 0)return this;if(a0.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a0[e0]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a0[e0]),this;if(arguments.length===0){var s0=Object.keys(a0),o0;for(i0=0;i0<s0.length;++i0)o0=s0[i0],o0!=="removeListener"&&this.removeAllListeners(o0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n0=a0[e0],typeof n0=="function")this.removeListener(e0,n0);else if(n0!==void 0)for(i0=n0.length-1;i0>=0;i0--)this.removeListener(e0,n0[i0]);return this};function _listeners(r0,e0,n0){var a0=r0._events;if(a0===void 0)return[];var i0=a0[e0];return i0===void 0?[]:typeof i0=="function"?n0?[i0.listener||i0]:[i0]:n0?unwrapListeners(i0):arrayClone(i0,i0.length)}EventEmitter$1.prototype.listeners=function r0(e0){return _listeners(this,e0,!0)};EventEmitter$1.prototype.rawListeners=function r0(e0){return _listeners(this,e0,!1)};EventEmitter$1.listenerCount=function(r0,e0){return typeof r0.listenerCount=="function"?r0.listenerCount(e0):listenerCount.call(r0,e0)};EventEmitter$1.prototype.listenerCount=listenerCount;function listenerCount(r0){var e0=this._events;if(e0!==void 0){var n0=e0[r0];if(typeof n0=="function")return 1;if(n0!==void 0)return n0.length}return 0}EventEmitter$1.prototype.eventNames=function r0(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(r0,e0){for(var n0=new Array(e0),a0=0;a0<e0;++a0)n0[a0]=r0[a0];return n0}function spliceOne(r0,e0){for(;e0+1<r0.length;e0++)r0[e0]=r0[e0+1];r0.pop()}function unwrapListeners(r0){for(var e0=new Array(r0.length),n0=0;n0<e0.length;++n0)e0[n0]=r0[n0].listener||r0[n0];return e0}function once$2(r0,e0){return new Promise(function(n0,a0){function i0(o0){r0.removeListener(e0,s0),a0(o0)}function s0(){typeof r0.removeListener=="function"&&r0.removeListener("error",i0),n0([].slice.call(arguments))}eventTargetAgnosticAddListener(r0,e0,s0,{once:!0}),e0!=="error"&&addErrorHandlerIfEventEmitter(r0,i0,{once:!0})})}function addErrorHandlerIfEventEmitter(r0,e0,n0){typeof r0.on=="function"&&eventTargetAgnosticAddListener(r0,"error",e0,n0)}function eventTargetAgnosticAddListener(r0,e0,n0,a0){if(typeof r0.on=="function")a0.once?r0.once(e0,n0):r0.on(e0,n0);else if(typeof r0.addEventListener=="function")r0.addEventListener(e0,function i0(s0){a0.once&&r0.removeEventListener(e0,i0),n0(s0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r0)}var eventsExports=events.exports;(function(r0){const e0=buffer,{format:n0,inspect:a0}=inspect$2,{codes:{ERR_INVALID_ARG_TYPE:i0}}=errors,{kResistStopPropagation:s0,AggregateError:o0,SymbolDispose:l0}=primordials,c0=globalThis.AbortSignal||requireBrowser().AbortSignal,u0=globalThis.AbortController||requireBrowser().AbortController,d0=Object.getPrototypeOf(async function(){}).constructor,h0=globalThis.Blob||e0.Blob,f0=typeof h0<"u"?function(x0){return x0 instanceof h0}:function(x0){return!1},p0=(m0,x0)=>
646{if(m0!==void 0&&(m0===null||typeof m0!="object"||!("aborted"in m0)))throw new i0(x0,"AbortSignal",m0)},A0=(m0,x0)=>{if(typeof m0!="function")throw new i0(x0,"Function",m0)};r0.exports={AggregateError:o0,kEmptyObject:Object.freeze({}),once(m0){let x0=!1;return function(...g0){x0||(x0=!0,m0.apply(this,g0))}},createDeferredPromise:function(){let m0,x0;return{promise:new Promise((y0,b0)=>{m0=y0,x0=b0}),resolve:m0,reject:x0}},promisify(m0){return new Promise((x0,g0)=>{m0((y0,...b0)=>y0?g0(y0):x0(...b0))})},debuglog(){return function(){}},format:n0,inspect:a0,types:{isAsyncFunction(m0){return m0 instanceof d0},isArrayBufferView(m0){return ArrayBuffer.isView(m0)}},isBlob:f0,deprecate(m0,x0){return m0},addAbortListener:eventsExports.addAbortListener||function(x0,g0){if(x0===void 0)throw new i0("signal","AbortSignal",x0);p0(x0,"signal"),A0(g0,"listener");let y0;return x0.aborted?queueMicrotask(()=>g0()):(x0.addEventListener("abort",g0,{__proto__:null,once:!0,[s0]:!0}),y0=()=>{x0.removeEventListener("abort",g0)}),{__proto__:null,[l0](){var b0;(b0=y0)===null||b0===void 0||b0()}}},AbortSignalAny:c0.any||function(x0){if(x0.length===1)return x0[0];const g0=new u0,y0=()=>g0.abort();return x0.forEach(b0=>{p0(b0,"signals"),b0.addEventListener("abort",y0,{once:!0})}),g0.signal.addEventListener("abort",()=>{x0.forEach(b0=>b0.removeEventListener("abort",y0))},{once:!0}),g0.signal}},r0.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(util);var utilExports=util.exports,operators={};const{ArrayIsArray:ArrayIsArray$2,ArrayPrototypeIncludes,ArrayPrototypeJoin,ArrayPrototypeMap,NumberIsInteger:NumberIsInteger$1,NumberIsNaN:NumberIsNaN$1,NumberMAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER,NumberParseInt,ObjectPrototypeHasOwnProperty,RegExpPrototypeExec,String:String$1,StringPrototypeToUpperCase,StringPrototypeTrim}=primordials,{hideStackFrames,codes:{ERR_SOCKET_BAD_PORT,ERR_INVALID_ARG_TYPE:ERR_INVALID_ARG_TYPE$4,ERR_INVALID_ARG_VALUE:ERR_INVALID_ARG_VALUE$3,ERR_OUT_OF_RANGE:ERR_OUT_OF_RANGE$1,ERR_UNKNOWN_SIGNAL}}=errors,{normalizeEncoding:normalizeEncoding$1}=utilExports,{isAsyncFunction,isArrayBufferView}=utilExports.types,signals={};function isInt32(r0){return r0===(r0|0)}function isUint32(r0){return r0===r0>>>0}const octalReg=/^[0-7]+$/,modeDesc="must be a 32-bit unsigned integer or an octal string";function parseFileMode(r0,e0,n0){if(typeof r0>"u"&&(r0=n0),typeof r0=="string"){if(RegExpPrototypeExec(octalReg,r0)===null)throw new ER
vendor: 2,224 bytes, line 646
646R_INVALID_ARG_VALUE$3(e0,r0,modeDesc);r0=NumberParseInt(r0,8)}return validateUint32(r0,e0),r0}const validateInteger$2=hideStackFrames((r0,e0,n0=NumberMIN_SAFE_INTEGER,a0=NumberMAX_SAFE_INTEGER)=>{if(typeof r0!="number")throw new ERR_INVALID_ARG_TYPE$4(e0,"number",r0);if(!NumberIsInteger$1(r0))throw new ERR_OUT_OF_RANGE$1(e0,"an integer",r0);if(r0<n0||r0>a0)throw new ERR_OUT_OF_RANGE$1(e0,`>= ${n0} && <= ${a0}`,r0)}),validateInt32=hideStackFrames((r0,e0,n0=-2147483648,a0=2147483647)=>{if(typeof r0!="number")throw new ERR_INVALID_ARG_TYPE$4(e0,"number",r0);if(!NumberIsInteger$1(r0))throw new ERR_OUT_OF_RANGE$1(e0,"an integer",r0);if(r0<n0||r0>a0)throw new ERR_OUT_OF_RANGE$1(e0,`>= ${n0} && <= ${a0}`,r0)}),validateUint32=hideStackFrames((r0,e0,n0=!1)=>{if(typeof r0!="number")throw new ERR_INVALID_ARG_TYPE$4(e0,"number",r0);if(!NumberIsInteger$1(r0))throw new ERR_OUT_OF_RANGE$1(e0,"an integer",r0);const a0=n0?1:0,i0=4294967295;if(r0<a0||r0>i0)throw new ERR_OUT_OF_RANGE$1(e0,`>= ${a0} && <= ${i0}`,r0)});function validateString(r0,e0){if(typeof r0!="string")throw new ERR_INVALID_ARG_TYPE$4(e0,"string",r0)}function validateNumber(r0,e0,n0=void 0,a0){if(typeof r0!="number")throw new ERR_INVALID_ARG_TYPE$4(e0,"number",r0);if(n0!=null&&r0<n0||a0!=null&&r0>a0||(n0!=null||a0!=null)&&NumberIsNaN$1(r0))throw new ERR_OUT_OF_RANGE$1(e0,`${n0!=null?`>= ${n0}`:""}${n0!=null&&a0!=null?" && ":""}${a0!=null?`<= ${a0}`:""}`,r0)}const validateOneOf=hideStackFrames((r0,e0,n0)=>{if(!ArrayPrototypeIncludes(n0,r0)){const i0="must be one of: "+ArrayPrototypeJoin(ArrayPrototypeMap(n0,s0=>typeof s0=="string"?`'${s0}'`:String$1(s0)),", ");throw new ERR_INVALID_ARG_VALUE$3(e0,r0,i0)}});function validateBoolean$1(r0,e0){if(typeof r0!="boolean")throw new ERR_INVALID_ARG_TYPE$4(e0,"boolean",r0)}function getOwnPropertyValueOrDefault(r0,e0,n0){return r0==null||!ObjectPrototypeHasOwnProperty(r0,e0)?n0:r0[e0]}const validateObject$2=hideStackFrames((r0,e0,n0=null)=>{const a0=getOwnPropertyValueOrDefault(n0,"allowArray",!1),i0=getOwnPropertyValueOrDefault(n0,"allowFunction",!1);if(!getOwnPropertyValueOrDefault(n0,"nullable",!1)&&r0===null||!a0&&ArrayIsArray$2(r0)||typeof r0!="object"&&(!i0||typeof r0!="function"))throw new ER
vendor: 1,190 bytes, line 646
646R_INVALID_ARG_TYPE$4(e0,"Object",r0)}),validateDictionary=hideStackFrames((r0,e0)=>{if(r0!=null&&typeof r0!="object"&&typeof r0!="function")throw new ERR_INVALID_ARG_TYPE$4(e0,"a dictionary",r0)}),validateArray=hideStackFrames((r0,e0,n0=0)=>{if(!ArrayIsArray$2(r0))throw new ERR_INVALID_ARG_TYPE$4(e0,"Array",r0);if(r0.length<n0){const a0=`must be longer than ${n0}`;throw new ERR_INVALID_ARG_VALUE$3(e0,r0,a0)}});function validateStringArray(r0,e0){validateArray(r0,e0);for(let n0=0;n0<r0.length;n0++)validateString(r0[n0],`${e0}[${n0}]`)}function validateBooleanArray(r0,e0){validateArray(r0,e0);for(let n0=0;n0<r0.length;n0++)validateBoolean$1(r0[n0],`${e0}[${n0}]`)}function validateAbortSignalArray(r0,e0){validateArray(r0,e0);for(let n0=0;n0<r0.length;n0++){const a0=r0[n0],i0=`${e0}[${n0}]`;if(a0==null)throw new ERR_INVALID_ARG_TYPE$4(i0,"AbortSignal",a0);validateAbortSignal$3(a0,i0)}}function validateSignalName(r0,e0="signal"){if(validateString(r0,e0),signals[r0]===void 0)throw signals[StringPrototypeToUpperCase(r0)]!==void 0?new ERR_UNKNOWN_SIGNAL(r0+" (signals must use all capital letters)"):new ERR_UNKNOWN_SIGNAL(r0)}const validateBuffer=hideStackFrames((r0,e0="buffer")=>
vendor: 1,046 bytes, line 646
646{if(!isArrayBufferView(r0))throw new ERR_INVALID_ARG_TYPE$4(e0,["Buffer","TypedArray","DataView"],r0)});function validateEncoding(r0,e0){const n0=normalizeEncoding$1(e0),a0=r0.length;if(n0==="hex"&&a0%2!==0)throw new ERR_INVALID_ARG_VALUE$3("encoding",e0,`is invalid for data of length ${a0}`)}function validatePort(r0,e0="Port",n0=!0){if(typeof r0!="number"&&typeof r0!="string"||typeof r0=="string"&&StringPrototypeTrim(r0).length===0||+r0!==+r0>>>0||r0>65535||r0===0&&!n0)throw new ERR_SOCKET_BAD_PORT(e0,r0,n0);return r0|0}const validateAbortSignal$3=hideStackFrames((r0,e0)=>{if(r0!==void 0&&(r0===null||typeof r0!="object"||!("aborted"in r0)))throw new ERR_INVALID_ARG_TYPE$4(e0,"AbortSignal",r0)}),validateFunction$2=hideStackFrames((r0,e0)=>{if(typeof r0!="function")throw new ERR_INVALID_ARG_TYPE$4(e0,"Function",r0)}),validatePlainFunction=hideStackFrames((r0,e0)=>{if(typeof r0!="function"||isAsyncFunction(r0))throw new ERR_INVALID_ARG_TYPE$4(e0,"Function",r0)}),validateUndefined=hideStackFrames((r0,e0)=>{if(r0!==void 0)throw new ER
vendor: 6,438 bytes, line 646
646R_INVALID_ARG_TYPE$4(e0,"undefined",r0)});function validateUnion(r0,e0,n0){if(!ArrayPrototypeIncludes(n0,r0))throw new ERR_INVALID_ARG_TYPE$4(e0,`('${ArrayPrototypeJoin(n0,"|")}')`,r0)}const linkValueRegExp=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function validateLinkHeaderFormat(r0,e0){if(typeof r0>"u"||!RegExpPrototypeExec(linkValueRegExp,r0))throw new ERR_INVALID_ARG_VALUE$3(e0,r0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function validateLinkHeaderValue(r0){if(typeof r0=="string")return validateLinkHeaderFormat(r0,"hints"),r0;if(ArrayIsArray$2(r0)){const e0=r0.length;let n0="";if(e0===0)return n0;for(let a0=0;a0<e0;a0++){const i0=r0[a0];validateLinkHeaderFormat(i0,"hints"),n0+=i0,a0!==e0-1&&(n0+=", ")}return n0}throw new ERR_INVALID_ARG_VALUE$3("hints",r0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}var validators={isInt32,isUint32,parseFileMode,validateArray,validateStringArray,validateBooleanArray,validateAbortSignalArray,validateBoolean:validateBoolean$1,validateBuffer,validateDictionary,validateEncoding,validateFunction:validateFunction$2,validateInt32,validateInteger:validateInteger$2,validateNumber,validateObject:validateObject$2,validateOneOf,validatePlainFunction,validatePort,validateSignalName,validateString,validateUint32,validateUndefined,validateUnion,validateAbortSignal:validateAbortSignal$3,validateLinkHeaderValue},endOfStream={exports:{}},browser={exports:{}},process$5=browser.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(r0){if(cachedSetTimeout===setTimeout)return setTimeout(r0,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(r0,0);try{return cachedSetTimeout(r0,0)}catch{try{return cachedSetTimeout.call(null,r0,0)}catch{return cachedSetTimeout.call(this,r0,0)}}}function runClearTimeout(r0){if(cachedClearTimeout===clearTimeout)return clearTimeout(r0);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(r0);try{return cachedClearTimeout(r0)}catch{try{return cachedClearTimeout.call(null,r0)}catch{return cachedClearTimeout.call(this,r0)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var r0=runTimeout(cleanUpNextTick);draining=!0;for(var e0=queue.length;e0;){for(currentQueue=queue,queue=[];++queueIndex<e0;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,e0=queue.length}currentQueue=null,draining=!1,runClearTimeout(r0)}}process$5.nextTick=function(r0){var e0=new Array(arguments.length-1);if(arguments.length>1)for(var n0=1;n0<arguments.length;n0++)e0[n0-1]=arguments[n0];queue.push(new Item(r0,e0)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(r0,e0){this.fun=r0,this.array=e0}Item.prototype.run=function(){this.fun.apply(null,this.array)};process$5.title="browser";process$5.browser=!0;process$5.env={};process$5.argv=[];process$5.version="";process$5.versions={};function noop$4(){}process$5.on=noop$4;process$5.addListener=noop$4;process$5.once=noop$4;process$5.off=noop$4;process$5.removeListener=noop$4;process$5.removeAllListeners=noop$4;process$5.emit=noop$4;process$5.prependListener=noop$4;process$5.prependOnceListener=noop$4;process$5.listeners=function(r0){return[]};process$5.binding=function(r0){throw new Error("process.binding is not supported")};process$5.cwd=function(){return"/"};process$5.chdir=function(r0){throw new Error("process.chdir is not supported")};process$5.umask=function(){return 0};var browserExports$1=browser.exports;const{SymbolAsyncIterator:SymbolAsyncIterator$2,SymbolIterator:SymbolIterator$2,SymbolFor}=primordials,kIsDestroyed$1=SymbolFor("nodejs.stream.destroyed"),kIsErrored=SymbolFor("nodejs.stream.errored"),kIsReadable=SymbolFor("nodejs.stream.readable"),kIsWritable=SymbolFor("nodejs.stream.writable"),kIsDisturbed=SymbolFor("nodejs.stream.disturbed"),kIsClosedPromise$1=SymbolFor("nodejs.webstream.isClosedPromise"),kControllerErrorFunction=SymbolFor("nodejs.webstream.controllerErrorFunction");function isReadableNodeStream$2(r0,e0=!1){var n0;return!!(r0&&typeof r0.pipe=="function"&&typeof r0.on=="function"&&(!e0||typeof r0.pause=="function"&&typeof r0.resume=="function")&&(!r0._writableState||((n0=r0._readableState)===null||n0===void 0?void 0:n0.readable)!==!1)&&(!r0._writableState||r0._readableState))}function isWritableNodeStream$1(r0){var e0;return!!(r0&&typeof r0.write=="function"&&typeof r0.on=="function"&&(!r0._readableState||((e0=r0._writableState)===null||e0===void 0?void 0:e0.writable)!==!1))}function isDuplexNodeStream(r0){return!!(r0&&typeof r0.pipe=="function"&&r0._readableState&&typeof r0.on=="function"&&typeof r0.write=="function")}function isNodeStream$4(r0){return r0&&(r0._readableState||r0._writableState||typeof r0.write=="function"&&typeof r0.on=="function"||typeof r0.pipe=="function"&&typeof r0.on=="function")}function isReadableStream$3(r0){return!!(r0&&!isNodeStream$4(r0)&&typeof r0.pipeThrough=="function"&&typeof r0.getReader=="function"&&typeof r0.cancel=="function")}function isWritableStream$2(r0){return!!(r0&&!isNodeStream$4(r0)&&typeof r0.getWriter=="function"&&typeof r0.abort=="function")}function isTransformStream$2(r0){return!!(r0&&!isNodeStream$4(r0)&&typeof r0.readable=="object"&&typeof r0.writable=="object")}function isWebStream$2(r0){return isReadableStream$3(r0)||isWritableStream$2(r0)||isTransformStream$2(r0)}function isIterable$1(r0,e0){return r0==null?!1:e0===!0?typeof r0[SymbolAsyncIterator$2]=="function":e0===!1?typeof r0[SymbolIterator$2]=="function":typeof r0[SymbolAsyncIterator$2]=="function"||typeof r0[SymbolIterator$2]=="function"}function isDestroyed$1(r0){if(!isNodeStream$4(r0))return null;
646const e0=r0._writableState,n0=r0._readableState,a0=e0||n0;return!!(r0.destroyed||r0[kIsDestroyed$1]||a0!=null&&a0.destroyed)}function isWritableEnded(r0){if(!isWritableNodeStream$1(r0))return null;if(r0.writableEnded===!0)return!0;const e0=r0._writableState;return e0!=null&&e0.errored?!1:typeof(e0==null?void 0:e0.ended)!="boolean"?null:e0.ended}function isWritableFinished$1(r0,e0){if(!isWritableNodeStream$1(r0))return null;if(r0.writableFinished===!0)return!0;const n0=r0._writableState;return n0!=null&&n0.errored?!1:typeof(n0==null?void 0:n0.finished)!="boolean"?null:!!(n0.finished||e0===!1&&n0.ended===!0&&n0.length===0)}function isReadableEnded(r0){if(!isReadableNodeStream$2(r0))return null;if(r0.readableEnded===!0)return!0;const e0=r0._readableState;return!e0||e0.errored?!1:typeof(e0==null?void 0:e0.ended)!="boolean"?null:e0.ended}function isReadableFinished$2(r0,e0){if(!isReadableNodeStream$2(r0))return null;const n0=r0._readableState;return n0!=null&&n0.errored?!1:typeof(n0==null?void 0:n0.endEmitted)!="boolean"?null:!!(n0.endEmitted||e0===!1&&n0.ended===!0&&n0.length===0)}function isReadable$3(r0){return r0&&r0[kIsReadable]!=null?r0[kIsReadable]:typeof(r0==null?void 0:r0.readable)!="boolean"?null:isDestroyed$1(r0)?!1:isReadableNodeStream$2(r0)&&r0.readable&&!isReadableFinished$2(r0)}function isWritable$3(r0){return r0&&r0[kIsWritable]!=null?r0[kIsWritable]:typeof(r0==null?void 0:r0.writable)!="boolean"?null:isDestroyed$1(r0)?!1:isWritableNodeStream$1(r0)&&r0.writable&&!isWritableEnded(r0)}function isFinished$1(r0,e0){return isNodeStream$4(r0)?isDestroyed$1(r0)?!0:!((e0==null?void 0:e0.readable)!==!1&&isReadable$3(r0)||(e0==null?void 0:e0.writable)!==!1&&isWritable$3(r0)):null}function isWritableErrored$1(r0){var e0,n0;return isNodeStream$4(r0)?r0.writableErrored?r0.writableErrored:(e0=(n0=r0._writableState)===null||n0===void 0?void 0:n0.errored)!==null&&e0!==void 0?e0:null:null}function isReadableErrored$1(r0){var e0,n0;return isNodeStream$4(r0)?r0.readableErrored?r0.readableErrored:(e0=(n0=r0._readableState)===null||n0===void 0?void 0:n0.errored)!==null&&e0!==void 0?e0:null:null}function isClosed$1(r0){if(!isNodeStream$4(r0))return null;if(typeof r0.closed=="boolean")return r0.closed;const e0=r0._writableState,n0=r0._readableState;return typeof(e0==null?void 0:e0.closed)=="boolean"||typeof(n0==null?void 0:n0.closed)=="boolean"?(e0==null?void 0:e0.closed)||(n0==null?void 0:n0.closed):typeof r0._closed=="boolean"&&isOutgoingMessage(r0)?r0._closed:null}function isOutgoingMessage(r0){return typeof r0._closed=="boolean"&&typeof r0._defaultKeepAlive=="boolean"&&typeof r0._removedConnection=="boolean"&&typeof r0._removedContLen=="boolean"}function isServerResponse(r0){return typeof r0._sent100=="boolean"&&isOutgoingMessage(r0)}function isServerRequest$1(r0){var e0;return typeof r0._consuming=="boolean"&&typeof r0._dumped=="boolean"&&((e0=r0.req)===null||e0===void 0?void 0:e0.upgradeOrConnect)===void 0}function willEmitClose(r0){if(!isNodeStream$4(r0))return null;const e0=r0._writableState,n0=r0._readableState,a0=e0||n0;return!a0&&isServerResponse(r0)||!!(a0&&a0.autoDestroy&&a0.emitClose&&a0.closed===!1)}function isDisturbed(r0){var e0;return!!(r0&&((e0=r0[kIsDisturbed])!==null&&e0!==void 0?e0:r0.readableDidRead||r0.readableAborted))}function isErrored(r0){var e0,n0,a0,i0,s0,o0,l0,c0,u0,d0;return!!(r0&&((e0=(n0=(a0=(i0=(s0=(o0=r0[kIsErrored])!==null&&o0!==void 0?o0:r0.readableErrored)!==null&&s0!==void 0?s0:r0.writableErrored)!==null&&i0!==void 0?i0:(l0=r0._readableState)===null||l0===void 0?void 0:l0.errorEmitted)!==null&&a0!==void 0?a0:(c0=r0._writableState)===null||c0===void 0?void 0:c0.errorEmitted)!==null&&n0!==void 0?n0:(u0=r0._readableState)===null||u0===void 0?void 0:u0.errored)!==null&&e0!==void 0?e0:!((d0=r0._writableState)===null||d0===void 0)&&d0.errored))}var utils={isDestroyed:isDestroyed$1,kIsDestroyed:kIsDestroyed$1,isDisturbed,kIsDisturbed,isErrored,kIsErrored,isReadable:isReadable$3,kIsReadable,kIsClosedPromise:kIsClosedPromise$1,kControllerErrorFunction,kIsWritable,isClosed:isClosed$1,isDuplexNodeStream,isFinished:isFinished$1,isIterable:isIterable$1,isReadableNodeStream
646:isReadableNodeStream$2,isReadableStream:isReadableStream$3,isReadableEnded,isReadableFinished:isReadableFinished$2,isReadableErrored:isReadableErrored$1,isNodeStream:isNodeStream$4,isWebStream:isWebStream$2,isWritable:isWritable$3,isWritableNodeStream:isWritableNodeStream$1,isWritableStream:isWritableStream$2,isWritableEnded,isWritableFinished:isWritableFinished$1,isWritableErrored:isWritableErrored$1,isServerRequest:isServerRequest$1,isServerResponse,willEmitClose,isTransformStream:isTransformStream$2};const process$4=browserExports$1,{AbortError:AbortError$4,codes}=errors,{ERR_INVALID_ARG_TYPE:ERR_INVALID_ARG_TYPE$3,ERR_STREAM_PREMATURE_CLOSE:ERR_STREAM_PREMATURE_CLOSE$1}=codes,{kEmptyObject,once:once$1}=utilExports,{validateAbortSignal:validateAbortSignal$2,validateFunction:validateFunction$1,validateObject:validateObject$1,validateBoolean}=validators,{Promise:Promise$5,PromisePrototypeThen:PromisePrototypeThen$2,SymbolDispose:SymbolDispose$1}=primordials,{isClosed,isReadable:isReadable$2,isReadableNodeStream:isReadableNodeStream$1,isReadableStream:isReadableStream$2,isReadableFinished:isReadableFinished$1,isReadableErrored,isWritable:isWritable$2,isWritableNodeStream,isWritableStream:isWritableStream$1,isWritableFinished,isWritableErrored,isNodeStream:isNodeStream$3,willEmitClose:_willEmitClose,kIsClosedPromise}=utils;let addAbortListener$1;function isRequest$1(r0){return r0.setHeader&&typeof r0.abort=="function"}const nop=()=>{};function eos$2(r0,e0,n0){var a0,i0;if(arguments.length===2?(n0=e0,e0=kEmptyObject):e0==null?e0=kEmptyObject:validateObject$1(e0,"options"),validateFunction$1(n0,"callback"),validateAbortSignal$2(e0.signal,"options.signal"),n0=once$1(n0),isReadableStream$2(r0)||isWritableStream$1(r0))return eosWeb(r0,e0,n0);
vendor: 14,168 bytes, line 646
646if(!isNodeStream$3(r0))throw new ERR_INVALID_ARG_TYPE$3("stream",["ReadableStream","WritableStream","Stream"],r0);const s0=(a0=e0.readable)!==null&&a0!==void 0?a0:isReadableNodeStream$1(r0),o0=(i0=e0.writable)!==null&&i0!==void 0?i0:isWritableNodeStream(r0),l0=r0._writableState,c0=r0._readableState,u0=()=>{r0.writable||f0()};let d0=_willEmitClose(r0)&&isReadableNodeStream$1(r0)===s0&&isWritableNodeStream(r0)===o0,h0=isWritableFinished(r0,!1);const f0=()=>{h0=!0,r0.destroyed&&(d0=!1),!(d0&&(!r0.readable||s0))&&(!s0||p0)&&n0.call(r0)};let p0=isReadableFinished$1(r0,!1);const A0=()=>{p0=!0,r0.destroyed&&(d0=!1),!(d0&&(!r0.writable||o0))&&(!o0||h0)&&n0.call(r0)},m0=w0=>{n0.call(r0,w0)};let x0=isClosed(r0);const g0=()=>{x0=!0;const w0=isWritableErrored(r0)||isReadableErrored(r0);if(w0&&typeof w0!="boolean")return n0.call(r0,w0);if(s0&&!p0&&isReadableNodeStream$1(r0,!0)&&!isReadableFinished$1(r0,!1))return n0.call(r0,new ERR_STREAM_PREMATURE_CLOSE$1);if(o0&&!h0&&!isWritableFinished(r0,!1))return n0.call(r0,new ERR_STREAM_PREMATURE_CLOSE$1);n0.call(r0)},y0=()=>{x0=!0;const w0=isWritableErrored(r0)||isReadableErrored(r0);if(w0&&typeof w0!="boolean")return n0.call(r0,w0);n0.call(r0)},b0=()=>{r0.req.on("finish",f0)};isRequest$1(r0)?(r0.on("complete",f0),d0||r0.on("abort",g0),r0.req?b0():r0.on("request",b0)):o0&&!l0&&(r0.on("end",u0),r0.on("close",u0)),!d0&&typeof r0.aborted=="boolean"&&r0.on("aborted",g0),r0.on("end",A0),r0.on("finish",f0),e0.error!==!1&&r0.on("error",m0),r0.on("close",g0),x0?process$4.nextTick(g0):l0!=null&&l0.errorEmitted||c0!=null&&c0.errorEmitted?d0||process$4.nextTick(y0):(!s0&&(!d0||isReadable$2(r0))&&(h0||isWritable$2(r0)===!1)||!o0&&(!d0||isWritable$2(r0))&&(p0||isReadable$2(r0)===!1)||c0&&r0.req&&r0.aborted)&&process$4.nextTick(y0);const E0=()=>{n0=nop,r0.removeListener("aborted",g0),r0.removeListener("complete",f0),r0.removeListener("abort",g0),r0.removeListener("request",b0),r0.req&&r0.req.removeListener("finish",f0),r0.removeListener("end",u0),r0.removeListener("close",u0),r0.removeListener("finish",f0),r0.removeListener("end",A0),r0.removeListener("error",m0),r0.removeListener("close",g0)};if(e0.signal&&!x0){const w0=()=>{const v0=n0;E0(),v0.call(r0,new AbortError$4(void 0,{cause:e0.signal.reason}))};if(e0.signal.aborted)process$4.nextTick(w0);else{addAbortListener$1=addAbortListener$1||utilExports.addAbortListener;const v0=addAbortListener$1(e0.signal,w0),S0=n0;n0=once$1((...k0)=>{v0[SymbolDispose$1](),S0.apply(r0,k0)})}}return E0}function eosWeb(r0,e0,n0){let a0=!1,i0=nop;if(e0.signal)if(i0=()=>{a0=!0,n0.call(r0,new AbortError$4(void 0,{cause:e0.signal.reason}))},e0.signal.aborted)process$4.nextTick(i0);else{addAbortListener$1=addAbortListener$1||utilExports.addAbortListener;const o0=addAbortListener$1(e0.signal,i0),l0=n0;n0=once$1((...c0)=>{o0[SymbolDispose$1](),l0.apply(r0,c0)})}const s0=(...o0)=>{a0||process$4.nextTick(()=>n0.apply(r0,o0))};return PromisePrototypeThen$2(r0[kIsClosedPromise].promise,s0,s0),nop}function finished$1(r0,e0){var n0;let a0=!1;return e0===null&&(e0=kEmptyObject),(n0=e0)!==null&&n0!==void 0&&n0.cleanup&&(validateBoolean(e0.cleanup,"cleanup"),a0=e0.cleanup),new Promise$5((i0,s0)=>{const o0=eos$2(r0,e0,l0=>{a0&&o0(),l0?s0(l0):i0()})})}endOfStream.exports=eos$2;endOfStream.exports.finished=finished$1;var endOfStreamExports=endOfStream.exports;const process$3=browserExports$1,{aggregateTwoErrors:aggregateTwoErrors$1,codes:{ERR_MULTIPLE_CALLBACK},AbortError:AbortError$3}=errors,{Symbol:Symbol$a}=primordials,{kIsDestroyed,isDestroyed,isFinished,isServerRequest}=utils,kDestroy=Symbol$a("kDestroy"),kConstruct=Symbol$a("kConstruct");function checkError(r0,e0,n0){r0&&(r0.stack,e0&&!e0.errored&&(e0.errored=r0),n0&&!n0.errored&&(n0.errored=r0))}function destroy(r0,e0){const n0=this._readableState,a0=this._writableState,i0=a0||n0;return a0!=null&&a0.destroyed||n0!=null&&n0.destroyed?(typeof e0=="function"&&e0(),this):(checkError(r0,a0,n0),a0&&(a0.destroyed=!0),n0&&(n0.destroyed=!0),i0.constructed?_destroy(this,r0,e0):this.once(kDestroy,function(s0){_destroy(this,aggregateTwoErrors$1(s0,r0),e0)}),this)}function _destroy(r0,e0,n0){let a0=!1;function i0(s0){if(a0)return;a0=!0;const o0=r0._readableState,l0=r0._writableState;checkError(s0,l0,o0),l0&&(l0.closed=!0),o0&&(o0.closed=!0),typeof n0=="function"&&n0(s0),s0?process$3.nextTick(emitErrorCloseNT,r0,s0):process$3.nextTick(emitCloseNT,r0)}try{r0._destroy(e0||null,i0)}catch(s0){i0(s0)}}function emitErrorCloseNT(r0,e0){emitErrorNT(r0,e0),emitCloseNT(r0)}function emitCloseNT(r0){const e0=r0._readableState,n0=r0._writableState;n0&&(n0.closeEmitted=!0),e0&&(e0.closeEmitted=!0),(n0!=null&&n0.emitClose||e0!=null&&e0.emitClose)&&r0.emit("close")}function emitErrorNT(r0,e0){const n0=r0._readableState,a0=r0._writableState;a0!=null&&a0.errorEmitted||n0!=null&&n0.errorEmitted||(a0&&(a0.errorEmitted=!0),n0&&(n0.errorEmitted=!0),r0.emit("error",e0))}function undestroy(){const r0=this._readableState,e0=this._writableState;r0&&(r0.constructed=!0,r0.closed=!1,r0.closeEmitted=!1,r0.destroyed=!1,r0.errored=null,r0.errorEmitted=!1,r0.reading=!1,r0.ended=r0.readable===!1,r0.endEmitted=r0.readable===!1),e0&&(e0.constructed=!0,e0.destroyed=!1,e0.closed=!1,e0.closeEmitted=!1,e0.errored=null,e0.errorEmitted=!1,e0.finalCalled=!1,e0.prefinished=!1,e0.ended=e0.writable===!1,e0.ending=e0.writable===!1,e0.finished=e0.writable===!1)}function errorOrDestroy(r0,e0,n0){const a0=r0._readableState,i0=r0._writableState;if(i0!=null&&i0.destroyed||a0!=null&&a0.destroyed)return this;a0!=null&&a0.autoDestroy||i0!=null&&i0.autoDestroy?r0.destroy(e0):e0&&(e0.stack,i0&&!i0.errored&&(i0.errored=e0),a0&&!a0.errored&&(a0.errored=e0),n0?process$3.nextTick(emitErrorNT,r0,e0):emitErrorNT(r0,e0))}function construct(r0,e0){if(typeof r0._construct!="function")return;const n0=r0._readableState,a0=r0._writableState;n0&&(n0.constructed=!1),a0&&(a0.constructed=!1),r0.once(kConstruct,e0),!(r0.listenerCount(kConstruct)>1)&&process$3.nextTick(constructNT,r0)}function constructNT(r0){let e0=!1;function n0(a0){if(e0){errorOrDestroy(r0,a0??new ERR_MULTIPLE_CALLBACK);return}e0=!0;const i0=r0._readableState,s0=r0._writableState,o0=s0||i0;i0&&(i0.constructed=!0),s0&&(s0.constructed=!0),o0.destroyed?r0.emit(kDestroy,a0):a0?errorOrDestroy(r0,a0,!0):process$3.nextTick(emitConstructNT,r0)}try{r0._construct(a0=>{process$3.nextTick(n0,a0)})}catch(a0){process$3.nextTick(n0,a0)}}function emitConstructNT(r0){r0.emit(kConstruct)}function isRequest(r0){return(r0==null?void 0:r0.setHeader)&&typeof r0.abort=="function"}function emitCloseLegacy(r0){r0.emit("close")}function emitErrorCloseLegacy(r0,e0){r0.emit("error",e0),process$3.nextTick(emitCloseLegacy,r0)}function destroyer$2(r0,e0){!r0||isDestroyed(r0)||(!e0&&!isFinished(r0)&&(e0=new AbortError$3),isServerRequest(r0)?(r0.socket=null,r0.destroy(e0)):isRequest(r0)?r0.abort():isRequest(r0.req)?r0.req.abort():typeof r0.destroy=="function"?r0.destroy(e0):typeof r0.close=="function"?r0.close():e0?process$3.nextTick(emitErrorCloseLegacy,r0,e0):process$3.nextTick(emitCloseLegacy,r0),r0.destroyed||(r0[kIsDestroyed]=!0))}var destroy_1={construct,destroyer:destroyer$2,destroy,undestroy,errorOrDestroy};const{ArrayIsArray:ArrayIsArray$1,ObjectSetPrototypeOf:ObjectSetPrototypeOf$2}=primordials,{EventEmitter:EE$1}=eventsExports;function Stream(r0){EE$1.call(this,r0)}ObjectSetPrototypeOf$2(Stream.prototype,EE$1.prototype);ObjectSetPrototypeOf$2(Stream,EE$1);Stream.prototype.pipe=function(r0,e0){const n0=this;function a0(d0){r0.writable&&r0.write(d0)===!1&&n0.pause&&n0.pause()}n0.on("data",a0);function i0(){n0.readable&&n0.resume&&n0.resume()}r0.on("drain",i0),!r0._isStdio&&(!e0||e0.end!==!1)&&(n0.on("end",o0),n0.on("close",l0));let s0=!1;function o0(){s0||(s0=!0,r0.end())}function l0(){s0||(s0=!0,typeof r0.destroy=="function"&&r0.destroy())}function c0(d0){u0(),EE$1.listenerCount(this,"error")===0&&this.emit("error",d0)}prependListener(n0,"error",c0),prependListener(r0,"error",c0);function u0(){n0.removeListener("data",a0),r0.removeListener("drain",i0),n0.removeListener("end",o0),n0.removeListener("close",l0),n0.removeListener("error",c0),r0.removeListener("error",c0),n0.removeListener("end",u0),n0.removeListener("close",u0),r0.removeListener("close",u0)}return n0.on("end",u0),n0.on("close",u0),r0.on("close",u0),r0.emit("pipe",n0),r0};function prependListener(r0,e0,n0){if(typeof r0.prependListener=="function")return r0.prependListener(e0,n0);!r0._events||!r0._events[e0]?r0.on(e0,n0):ArrayIsArray$1(r0._events[e0])?r0._events[e0].unshift(n0):r0._events[e0]=[n0,r0._events[e0]]}var legacy={Stream,prependListener},addAbortSignal={exports:{}};(function(r0){const{SymbolDispose:e0}=primordials,{AbortError:n0,codes:a0}=errors,{isNodeStream:i0,isWebStream:s0,kControllerErrorFunction:o0}=utils,l0=endOfStreamExports,{ERR_INVALID_ARG_TYPE:c0}=a0;let u0;const d0=(h0,f0)=>{if(typeof h0!="object"||!("aborted"in h0))throw new c0(f0,"AbortSignal",h0)};r0.exports.addAbortSignal=function(f0,p0){if(d0(f0,"signal"),!i0(p0)&&!s0(p0))throw new c0("stream",["ReadableStream","WritableStream","Stream"],p0);return r0.exports.addAbortSignalNoValidate(f0,p0)},r0.exports.addAbortSignalNoValidate=function(h0,f0){if(typeof h0!="object"||!("aborted"in h0))return f0;const p0=i0(f0)?()=>{f0.destroy(new n0(void 0,{cause:h0.reason}))}:()=>{f0[o0](new n0(void 0,{cause:h0.reason}))};if(h0.aborted)p0();else{u0=u0||utilExports.addAbortListener;const A0=u0(h0,p0);l0(f0,A0[e0])}return f0}})(addAbortSignal);var addAbortSignalExports=addAbortSignal.exports;const{StringPrototypeSlice,SymbolIterator:SymbolIterator$1,TypedArrayPrototypeSet,Uint8Array:Uint8Array$3}=primordials,{Buffer:Buffer$3}=buffer,{inspect}=utilExports;var buffer_list=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e0){const n0={data:e0,next:null};this.length>0?this.tail.next=n0:this.head=n0,this.tail=n0,++this.length}unshift(e0){const n0={data:e0,next:this.head};this.length===0&&(this.tail=n0),this.head=n0,++this.length}shift(){if(this.length===0)return;const e0=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e0}clear(){this.head=this.tail=null,this.length=0}join(e0){if(this.length===0)return"";let n0=this.head,a0=""+n0.data;for(;(n0=n0.next)!==null;)a0+=e0+n0.data;return a0}concat(e0){if(this.length===0)return Buffer$3.alloc(0);const n0=Buffer$3.allocUnsafe(e0>>>0);let a0=this.head,i0=0;for(;a0;)TypedArrayPrototypeSet(n0,a0.data,i0),i0+=a0.data.length,a0=a0.next;return n0}consume(e0,n0){const a0=this.head.data;if(e0<a0.length){const i0=a0.slice(0,e0);return this.head.data=a0.slice(e0),i0}return e0===a0.length?this.shift():n0?this._getString(e0):this._getBuffer(e0)}first(){return this.head.data}*[SymbolIterator$1](){for(let e0=this.head;e0;e0=e0.next)yield e0.data}_getString(e0){let n0="",a0=this.head,i0=0;do{const s0=a0.data;if(e0>s0.length)n0+=s0,e0-=s0.length;else{e0===s0.length?(n0+=s0,++i0,a0.next?this.head=a0.next:this.head=this.tail=null):(n0+=StringPrototypeSlice(s0,0,e0),this.head=a0,a0.data=StringPrototypeSlice(s0,e0));break}++i0}while((a0=a0.next)!==null);return this.length-=i0,n0}_getBuffer(e0){const n0=Buffer$3.allocUnsafe(e0),a0=e0;let i0=this.head,s0=0;do{const o0=i0.data;if(e0>o0.length)TypedArrayPrototypeSet(n0,o0,a0-e0),e0-=o0.length;else{e0===o0.length?(TypedArrayPrototypeSet(n0,o0,a0-e0),++s0,i0.next?this.head=i0.next:this.head=this.tail=null):(TypedArrayPrototypeSet(n0,new Uint8Array$3(o0.buffer,o0.byteOffset,e0),a0-e0),this.head=i0,i0.data=o0.slice(e0));break}++s0}while((i0=i0.next)!==null);return this.length-=s0,n0}[Symbol.for("nodejs.util.inspect.custom")](e0,n0){return inspect(this,{...n0,depth:0,customInspect:!1})}};const{MathFloor:MathFloor$1,NumberIsInteger}=primordials,{validateInteger:validateInteger$1}=validators,{ERR_INVALID_ARG_VALUE:ERR_INVALID_ARG_VALUE$2}=errors.codes;let defaultHighWaterMarkBytes=16*1024,defaultHighWaterMarkObjectMode=16;function highWaterMarkFrom(r0,e0,n0){return r0.highWaterMark!=null?r0.highWaterMark:e0?r0[n0]:null}function getDefaultHighWaterMark(r0){return r0?defaultHighWaterMarkObjectMode:defaultHighWaterMarkBytes}function setDefaultHighWaterMark(r0,e0){validateInteger$1(e0,"value",0),r0?defaultHighWaterMarkObjectMode=e0:defaultHighWaterMarkBytes=e0}function getHighWaterMark$1(r0,e0,n0,a0){const i0=highWaterMarkFrom(e0,a0,n0);if(i0!=null){if(!NumberIsInteger(i0)||i0<0){const s0=a0?`options.${n0}`:"options.highWaterMark";throw new ERR_INVALID_ARG_VALUE$2(s0,i0)}return MathFloor$1(i0)}return getDefaultHighWaterMark(r0.objectMode)}var state={getHighWaterMark:getHighWaterMark$1,getDefaultHighWaterMark,setDefaultHighWaterMark},string_decoder={},safeBuffer={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(r0,e0){var n0=buffer,a0=n0.Buffer;function i0(o0,l0){for(var c0 in o0)l0[c0]=o0[c0]}a0.from&&a0.alloc&&a0.allocUnsafe&&a0.allocUnsafeSlow?r0.exports=n0:(i0(n0,e0),e0.Buffer=s0);function s0(o0,l0,c0){return a0(o0,l0,c0)}s0.prototype=Object.create(a0.prototype),i0(a0,s0),s0.from=function(o0,l0,c0){if(typeof o0=="number")throw new TypeError("Argument must not be a number");return a0(o0,l0,c0)},s0.alloc=function(o0,l0,c0){if(typeof o0!="number")throw new TypeError("Argument must be a number");var u0=a0(o0);return l0!==void 0?typeof c0=="string"?u0.fill(l0,c0):u0.fill(l0):u0.fill(0),u0},s0.allocUnsafe=function(o0){if(typeof o0!="number")throw new TypeError("Argument must be a number");return a0(o0)},s0.allocUnsafeSlow=function(o0){if(typeof o0!="number")throw new TypeError("Argument must be a number");return n0.SlowBuffer(o0)}})(safeBuffer,safeBuffer.exports);var safeBufferExports=safeBuffer.exports,Buffer$2=safeBufferExports.Buffer,isEncoding=Buffer$2.isEncoding||function(r0){switch(r0=""+r0,r0&&r0.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(r0){if(!r0)return"utf8";for(var e0;;)switch(r0){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
vendor: 4,339 bytes, line 646
646case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return r0;default:if(e0)return;r0=(""+r0).toLowerCase(),e0=!0}}function normalizeEncoding(r0){var e0=_normalizeEncoding(r0);if(typeof e0!="string"&&(Buffer$2.isEncoding===isEncoding||!isEncoding(r0)))throw new Error("Unknown encoding: "+r0);return e0||r0}string_decoder.StringDecoder=StringDecoder;function StringDecoder(r0){this.encoding=normalizeEncoding(r0);var e0;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,e0=4;break;case"utf8":this.fillLast=utf8FillLast,e0=4;break;case"base64":this.text=base64Text,this.end=base64End,e0=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer$2.allocUnsafe(e0)}StringDecoder.prototype.write=function(r0){if(r0.length===0)return"";var e0,n0;if(this.lastNeed){if(e0=this.fillLast(r0),e0===void 0)return"";n0=this.lastNeed,this.lastNeed=0}else n0=0;return n0<r0.length?e0?e0+this.text(r0,n0):this.text(r0,n0):e0||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(r0){if(this.lastNeed<=r0.length)return r0.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r0.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r0.length),this.lastNeed-=r0.length};function utf8CheckByte(r0){return r0<=127?0:r0>>5===6?2:r0>>4===14?3:r0>>3===30?4:r0>>6===2?-1:-2}function utf8CheckIncomplete(r0,e0,n0){var a0=e0.length-1;if(a0<n0)return 0;var i0=utf8CheckByte(e0[a0]);return i0>=0?(i0>0&&(r0.lastNeed=i0-1),i0):--a0<n0||i0===-2?0:(i0=utf8CheckByte(e0[a0]),i0>=0?(i0>0&&(r0.lastNeed=i0-2),i0):--a0<n0||i0===-2?0:(i0=utf8CheckByte(e0[a0]),i0>=0?(i0>0&&(i0===2?i0=0:r0.lastNeed=i0-3),i0):0))}function utf8CheckExtraBytes(r0,e0,n0){if((e0[0]&192)!==128)return r0.lastNeed=0,"�";if(r0.lastNeed>1&&e0.length>1){if((e0[1]&192)!==128)return r0.lastNeed=1,"�";if(r0.lastNeed>2&&e0.length>2&&(e0[2]&192)!==128)return r0.lastNeed=2,"�"}}function utf8FillLast(r0){var e0=this.lastTotal-this.lastNeed,n0=utf8CheckExtraBytes(this,r0);if(n0!==void 0)return n0;if(this.lastNeed<=r0.length)return r0.copy(this.lastChar,e0,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r0.copy(this.lastChar,e0,0,r0.length),this.lastNeed-=r0.length}function utf8Text(r0,e0){var n0=utf8CheckIncomplete(this,r0,e0);if(!this.lastNeed)return r0.toString("utf8",e0);this.lastTotal=n0;var a0=r0.length-(n0-this.lastNeed);return r0.copy(this.lastChar,0,a0),r0.toString("utf8",e0,a0)}function utf8End(r0){var e0=r0&&r0.length?this.write(r0):"";return this.lastNeed?e0+"�":e0}function utf16Text(r0,e0){if((r0.length-e0)%2===0){var n0=r0.toString("utf16le",e0);if(n0){var a0=n0.charCodeAt(n0.length-1);if(a0>=55296&&a0<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r0[r0.length-2],this.lastChar[1]=r0[r0.length-1],n0.slice(0,-1)}return n0}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r0[r0.length-1],r0.toString("utf16le",e0,r0.length-1)}function utf16End(r0){var e0=r0&&r0.length?this.write(r0):"";if(this.lastNeed){var n0=this.lastTotal-this.lastNeed;return e0+this.lastChar.toString("utf16le",0,n0)}return e0}function base64Text(r0,e0){var n0=(r0.length-e0)%3;return n0===0?r0.toString("base64",e0):(this.lastNeed=3-n0,this.lastTotal=3,n0===1?this.lastChar[0]=r0[r0.length-1]:(this.lastChar[0]=r0[r0.length-2],this.lastChar[1]=r0[r0.length-1]),r0.toString("base64",e0,r0.length-n0))}function base64End(r0){var e0=r0&&r0.length?this.write(r0):"";return this.lastNeed?e0+this.lastChar.toString("base64",0,3-this.lastNeed):e0}function simpleWrite(r0){return r0.toString(this.encoding)}function simpleEnd(r0){return r0&&r0.length?this.write(r0):""}const process$2=browserExports$1,{PromisePrototypeThen:PromisePrototypeThen$1,SymbolAsyncIterator:SymbolAsyncIterator$1,SymbolIterator}=primordials,{Buffer:Buffer$1}=buffer,{ERR_INVALID_ARG_TYPE:ERR_INVALID_ARG_TYPE$2,ERR_STREAM_NULL_VALUES}=errors.codes;function from(r0,e0,n0){let a0;if(typeof e0=="string"||e0 instanceof Buffer$1)return new r0({objectMode:!0,...n0,read(){this.push(e0),this.push(null)}});let i0;if(e0&&e0[SymbolAsyncIterator$1])i0=!0,a0=e0[SymbolAsyncIterator$1]();else if(e0&&e0[SymbolIterator])i0=!1,a0=e0[SymbolIterator]();
646else throw new ERR_INVALID_ARG_TYPE$2("iterable",["Iterable"],e0);const s0=new r0({objectMode:!0,highWaterMark:1,...n0});let o0=!1;s0._read=function(){o0||(o0=!0,c0())},s0._destroy=function(u0,d0){PromisePrototypeThen$1(l0(u0),()=>process$2.nextTick(d0,u0),h0=>process$2.nextTick(d0,h0||u0))};async function l0(u0){const d0=u0!=null,h0=typeof a0.throw=="function";if(d0&&h0){const{value:f0,done:p0}=await a0.throw(u0);if(await f0,p0)return}if(typeof a0.return=="function"){const{value:f0}=await a0.return();await f0}}async function c0(){for(;;){try{const{value:u0,done:d0}=i0?await a0.next():a0.next();if(d0)s0.push(null);else{const h0=u0&&typeof u0.then=="function"?await u0:u0;if(h0===null)throw o0=!1,new ERR_STREAM_NULL_VALUES;if(s0.push(h0))continue;o0=!1}}catch(u0){s0.destroy(u0)}break}}return s0}var from_1=from,readable,hasRequiredReadable;function requireReadable(){if(hasRequiredReadable)return readable;hasRequiredReadable=1;const r0=browserExports$1,{ArrayPrototypeIndexOf:e0,NumberIsInteger:n0,NumberIsNaN:a0,NumberParseInt:i0,ObjectDefineProperties:s0,ObjectKeys:o0,ObjectSetPrototypeOf:l0,Promise:c0,SafeSet:u0,SymbolAsyncDispose:d0,SymbolAsyncIterator:h0,Symbol:f0}=primordials;readable=Pw,Pw.ReadableState=p1;const{EventEmitter:p0}=eventsExports,{Stream:A0,prependListener:m0}=legacy,{Buffer:x0}=buffer,{addAbortSignal:g0}=addAbortSignalExports,y0=endOfStreamExports;let b0=utilExports.debuglog("stream",Y0=>{b0=Y0});const E0=buffer_list,w0=destroy_1,{getHighWaterMark:v0,getDefaultHighWaterMark:S0}=state,{aggregateTwoErrors:k0,codes:{ERR_INVALID_ARG_TYPE:R0,ERR_METHOD_NOT_IMPLEMENTED:j0,ERR_OUT_OF_RANGE:C0,ERR_STREAM_PUSH_AFTER_EOF:$0,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:T0},AbortError:I0}=errors,{validateObject:M0}=validators,N0=f0("kPaused"),{StringDecoder:D0}=string_decoder,O0=from_1;l0(Pw.prototype,A0.prototype),l0(Pw,A0);const B0=()=>{},{errorOrDestroy:z0}=w0,G0=1,F0=2,Q0=4,U0=8,q0=16,Rw=32,_w=64,J0=128,Cw=256,Ow=512,jw=1024,Nw=2048,xw=4096,X0=8192,Lw=16384,Hw=32768,Ww=65536,r1=1<<17,Yw=1<<18;function l1(Y0){return{enumerable:!1,get(){return(this.state&Y0)!==0},set(Tw){Tw?this.state|=Y0:this.state&=~Y0}}}s0(p1.prototype,{objectMode:l1(G0),ended:l1(F0),endEmitted:l1(Q0),reading:l1(U0),constructed:l1(q0),sync:l1(Rw),needReadable:l1(_w),emittedReadable:l1(J0),readableListening:l1(Cw),resumeScheduled:l1(Ow),errorEmitted:l1(jw),emitClose:l1(Nw),autoDestroy:l1(xw),destroyed:l1(X0),closed:l1(Lw),closeEmitted:l1(Hw),multiAwaitDrain:l1(Ww),readingMore:l1(r1),dataEmitted:l1(Yw)});function p1(Y0,Tw,Mw){typeof Mw!="boolean"&&(Mw=Tw instanceof requireDuplex()),this.state=Nw|xw|q0|Rw,Y0&&Y0.objectMode&&(this.state|=G0),Mw&&Y0&&Y0.readableObjectMode&&(this.state|=G0),this.highWaterMark=Y0?v0(this,Y0,"readableHighWaterMark",Mw):S0(!1),this.buffer=new E0,this.length=0,this.pipes=[],this.flowing=null,this[N0]=null,Y0&&Y0.emitClose===!1&&(this.state&=~Nw),Y0&&Y0.autoDestroy===!1&&(this.state&=~xw),this.errored=null,this.defaultEncoding=Y0&&Y0.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,Y0&&Y0.encoding&&(this.decoder=new D0(Y0.encoding),this.encoding=Y0.encoding)}function Pw(Y0){if(!(this instanceof Pw))return new Pw(Y0);const Tw=this instanceof requireDuplex();this._readableState=new p1(Y0,this,Tw),Y0&&(typeof Y0.read=="function"&&(this._read=Y0.read),typeof Y0.destroy=="function"&&(this._destroy=Y0.destroy),typeof Y0.construct=="function"&&(this._construct=Y0.construct),Y0.signal&&!Tw&&g0(Y0.signal,this)),A0.call(this,Y0),w0.construct(this,()=>{this._readableState.needReadable&&$w(this,this._readableState)})}Pw.prototype.destroy=w0.destroy,Pw.prototype._undestroy=w0.undestroy,Pw.prototype._destroy=function(Y0,Tw){Tw(Y0)},Pw.prototype[p0.captureRejectionSymbol]=function(Y0){this.destroy(Y0)},Pw.prototype[d0]=function(){let Y0;return this.destroyed||(Y0=this.readableEnded?null:new I0,this.destroy(Y0)),new c0((Tw,Mw)=>y0(this,Uw=>Uw&&Uw!==Y0?Mw(Uw):Tw(null)))},Pw.prototype.push=function(Y0,Tw){return Qw(this,Y0,Tw,!1)},Pw.prototype.unshift=function(Y0,Tw){return Qw(this,Y0,Tw,!0)};function Qw(Y0,Tw,Mw,Uw){b0("readableAddChunk",Tw);const Fw=Y0._readableState;let Jw;if(Fw.state&G0||(typeof Tw=="string"?(Mw=Mw||Fw.defaultEncoding,Fw.encoding!==Mw&&(Uw&&Fw.encoding?Tw=x0.from(Tw,Mw).toString(Fw.encoding):(Tw=x0.from(Tw,Mw),Mw=""))):Tw instanceof x0?Mw="":A0._isUint8Array(Tw)?(Tw=A0._uint8ArrayToBuffer(Tw),Mw=""):Tw!=null&&(Jw=new R0("chunk",["string","Buffer","Uint8Array"],Tw))),Jw)z0(Y0,Jw);else if(Tw===null)Fw.state&=~U0,P0(Y0,Fw);else if(Fw.state&G0||Tw&&Tw.length>0)if(Uw)if(Fw.state&Q0)z0(Y0,new T0);else{if(Fw.destroyed||Fw.errored)return!1;Xw(Y0,Fw,Tw,!0)}else if(Fw.ended)z0(Y0,new $0);else{if(Fw.destroyed||Fw.errored)return!1;Fw.state&=~U0,Fw.decoder&&!Mw?(Tw=Fw.decoder.write(Tw),Fw.objectMode||Tw.length!==0?Xw(Y0,Fw,Tw,!1):$w(Y0,Fw)):Xw(Y0,Fw,Tw,!1)}else Uw||(Fw.state&=~U0,$w(Y0,Fw));
vendor: 33,578 bytes, line 646
646return!Fw.ended&&(Fw.length<Fw.highWaterMark||Fw.length===0)}function Xw(Y0,Tw,Mw,Uw){Tw.flowing&&Tw.length===0&&!Tw.sync&&Y0.listenerCount("data")>0?(Tw.state&Ww?Tw.awaitDrainWriters.clear():Tw.awaitDrainWriters=null,Tw.dataEmitted=!0,Y0.emit("data",Mw)):(Tw.length+=Tw.objectMode?1:Mw.length,Uw?Tw.buffer.unshift(Mw):Tw.buffer.push(Mw),Tw.state&_w&&L0(Y0)),$w(Y0,Tw)}Pw.prototype.isPaused=function(){const Y0=this._readableState;return Y0[N0]===!0||Y0.flowing===!1},Pw.prototype.setEncoding=function(Y0){const Tw=new D0(Y0);this._readableState.decoder=Tw,this._readableState.encoding=this._readableState.decoder.encoding;const Mw=this._readableState.buffer;let Uw="";for(const Fw of Mw)Uw+=Tw.write(Fw);return Mw.clear(),Uw!==""&&Mw.push(Uw),this._readableState.length=Uw.length,this};const f1=1073741824;function u1(Y0){if(Y0>f1)throw new C0("size","<= 1GiB",Y0);return Y0--,Y0|=Y0>>>1,Y0|=Y0>>>2,Y0|=Y0>>>4,Y0|=Y0>>>8,Y0|=Y0>>>16,Y0++,Y0}function W0(Y0,Tw){return Y0<=0||Tw.length===0&&Tw.ended?0:Tw.state&G0?1:a0(Y0)?Tw.flowing&&Tw.length?Tw.buffer.first().length:Tw.length:Y0<=Tw.length?Y0:Tw.ended?Tw.length:0}Pw.prototype.read=function(Y0){b0("read",Y0),Y0===void 0?Y0=NaN:n0(Y0)||(Y0=i0(Y0,10));const Tw=this._readableState,Mw=Y0;if(Y0>Tw.highWaterMark&&(Tw.highWaterMark=u1(Y0)),Y0!==0&&(Tw.state&=~J0),Y0===0&&Tw.needReadable&&((Tw.highWaterMark!==0?Tw.length>=Tw.highWaterMark:Tw.length>0)||Tw.ended))return b0("read: emitReadable",Tw.length,Tw.ended),Tw.length===0&&Tw.ended?g1(this):L0(this),null;if(Y0=W0(Y0,Tw),Y0===0&&Tw.ended)return Tw.length===0&&g1(this),null;let Uw=(Tw.state&_w)!==0;if(b0("need readable",Uw),(Tw.length===0||Tw.length-Y0<Tw.highWaterMark)&&(Uw=!0,b0("length less than watermark",Uw)),Tw.ended||Tw.reading||Tw.destroyed||Tw.errored||!Tw.constructed)Uw=!1,b0("reading, ended or constructing",Uw);else if(Uw){b0("do read"),Tw.state|=U0|Rw,Tw.length===0&&(Tw.state|=_w);try{this._read(Tw.highWaterMark)}catch(Jw){z0(this,Jw)}Tw.state&=~Rw,Tw.reading||(Y0=W0(Mw,Tw))}let Fw;return Y0>0?Fw=_1(Y0,Tw):Fw=null,Fw===null?(Tw.needReadable=Tw.length<=Tw.highWaterMark,Y0=0):(Tw.length-=Y0,Tw.multiAwaitDrain?Tw.awaitDrainWriters.clear():Tw.awaitDrainWriters=null),Tw.length===0&&(Tw.ended||(Tw.needReadable=!0),Mw!==Y0&&Tw.ended&&g1(this)),Fw!==null&&!Tw.errorEmitted&&!Tw.closeEmitted&&(Tw.dataEmitted=!0,this.emit("data",Fw)),Fw};function P0(Y0,Tw){if(b0("onEofChunk"),!Tw.ended){if(Tw.decoder){const Mw=Tw.decoder.end();Mw&&Mw.length&&(Tw.buffer.push(Mw),Tw.length+=Tw.objectMode?1:Mw.length)}Tw.ended=!0,Tw.sync?L0(Y0):(Tw.needReadable=!1,Tw.emittedReadable=!0,Z0(Y0))}}function L0(Y0){const Tw=Y0._readableState;b0("emitReadable",Tw.needReadable,Tw.emittedReadable),Tw.needReadable=!1,Tw.emittedReadable||(b0("emitReadable",Tw.flowing),Tw.emittedReadable=!0,r0.nextTick(Z0,Y0))}function Z0(Y0){const Tw=Y0._readableState;b0("emitReadable_",Tw.destroyed,Tw.length,Tw.ended),!Tw.destroyed&&!Tw.errored&&(Tw.length||Tw.ended)&&(Y0.emit("readable"),Tw.emittedReadable=!1),Tw.needReadable=!Tw.flowing&&!Tw.ended&&Tw.length<=Tw.highWaterMark,qw(Y0)}function $w(Y0,Tw){!Tw.readingMore&&Tw.constructed&&(Tw.readingMore=!0,r0.nextTick(Bw,Y0,Tw))}function Bw(Y0,Tw){for(;!Tw.reading&&!Tw.ended&&(Tw.length<Tw.highWaterMark||Tw.flowing&&Tw.length===0);){const Mw=Tw.length;if(b0("maybeReadMore read 0"),Y0.read(0),Mw===Tw.length)break}Tw.readingMore=!1}Pw.prototype._read=function(Y0){throw new j0("_read()")},Pw.prototype.pipe=function(Y0,Tw){const Mw=this,Uw=this._readableState;Uw.pipes.length===1&&(Uw.multiAwaitDrain||(Uw.multiAwaitDrain=!0,Uw.awaitDrainWriters=new u0(Uw.awaitDrainWriters?[Uw.awaitDrainWriters]:[]))),Uw.pipes.push(Y0),b0("pipe count=%d opts=%j",Uw.pipes.length,Tw);const Jw=(!Tw||Tw.end!==!1)&&Y0!==r0.stdout&&Y0!==r0.stderr?A1:E1;Uw.endEmitted?r0.nextTick(Jw):Mw.once("end",Jw),Y0.on("unpipe",s1);function s1(B1,U1){b0("onunpipe"),B1===Mw&&U1&&U1.hasUnpiped===!1&&(U1.hasUnpiped=!0,V1())}function A1(){b0("onend"),Y0.end()}let T1,yR=!1;function V1(){b0("cleanup"),Y0.removeListener("close",o1),Y0.removeListener("finish",q1),T1&&Y0.removeListener("drain",T1),Y0.removeListener("error",O_),Y0.removeListener("unpipe",s1),Mw.removeListener("end",A1),Mw.removeListener("end",E1),Mw.removeListener("data",j1),yR=!0,T1&&Uw.awaitDrainWriters&&(!Y0._writableState||Y0._writableState.needDrain)&&T1()}function I_(){yR||(Uw.pipes.length===1&&Uw.pipes[0]===Y0?(b0("false write response, pause",0),Uw.awaitDrainWriters=Y0,Uw.multiAwaitDrain=!1):Uw.pipes.length>1&&Uw.pipes.includes(Y0)&&(b0("false write response, pause",Uw.awaitDrainWriters.size),Uw.awaitDrainWriters.add(Y0)),Mw.pause()),T1||(T1=Vw(Mw,Y0),Y0.on("drain",T1))}Mw.on("data",j1);function j1(B1){b0("ondata");const U1=Y0.write(B1);b0("dest.write",U1),U1===!1&&I_()}function O_(B1){if(b0("onerror",B1),E1(),Y0.removeListener("error",O_),Y0.listenerCount("error")===0){const U1=Y0._writableState||Y0._readableState;U1&&!U1.errorEmitted?z0(Y0,B1):Y0.emit("error",B1)}}m0(Y0,"error",O_);function o1(){Y0.removeListener("finish",q1),E1()}Y0.once("close",o1);function q1(){b0("onfinish"),Y0.removeListener("close",o1),E1()}Y0.once("finish",q1);function E1(){b0("unpipe"),Mw.unpipe(Y0)}return Y0.emit("pipe",Mw),Y0.writableNeedDrain===!0?I_():Uw.flowing||(b0("pipe resume"),Mw.resume()),Y0};function Vw(Y0,Tw){return function(){const Uw=Y0._readableState;Uw.awaitDrainWriters===Tw?(b0("pipeOnDrain",1),Uw.awaitDrainWriters=null):Uw.multiAwaitDrain&&(b0("pipeOnDrain",Uw.awaitDrainWriters.size),Uw.awaitDrainWriters.delete(Tw)),(!Uw.awaitDrainWriters||Uw.awaitDrainWriters.size===0)&&Y0.listenerCount("data")&&Y0.resume()}}Pw.prototype.unpipe=function(Y0){const Tw=this._readableState,Mw={hasUnpiped:!1};if(Tw.pipes.length===0)return this;if(!Y0){const Fw=Tw.pipes;Tw.pipes=[],this.pause();for(let Jw=0;Jw<Fw.length;Jw++)Fw[Jw].emit("unpipe",this,{hasUnpiped:!1});return this}const Uw=e0(Tw.pipes,Y0);return Uw===-1?this:(Tw.pipes.splice(Uw,1),Tw.pipes.length===0&&this.pause(),Y0.emit("unpipe",this,Mw),this)},Pw.prototype.on=function(Y0,Tw){const Mw=A0.prototype.on.call(this,Y0,Tw),Uw=this._readableState;return Y0==="data"?(Uw.readableListening=this.listenerCount("readable")>0,Uw.flowing!==!1&&this.resume()):Y0==="readable"&&!Uw.endEmitted&&!Uw.readableListening&&(Uw.readableListening=Uw.needReadable=!0,Uw.flowing=!1,Uw.emittedReadable=!1,b0("on readable",Uw.length,Uw.reading),Uw.length?L0(this):Uw.reading||r0.nextTick(Kw,this)),Mw},Pw.prototype.addListener=Pw.prototype.on,Pw.prototype.removeListener=function(Y0,Tw){const Mw=A0.prototype.removeListener.call(this,Y0,Tw);return Y0==="readable"&&r0.nextTick(Dw,this),Mw},Pw.prototype.off=Pw.prototype.removeListener,Pw.prototype.removeAllListeners=function(Y0){const Tw=A0.prototype.removeAllListeners.apply(this,arguments);return(Y0==="readable"||Y0===void 0)&&r0.nextTick(Dw,this),Tw};function Dw(Y0){const Tw=Y0._readableState;Tw.readableListening=Y0.listenerCount("readable")>0,Tw.resumeScheduled&&Tw[N0]===!1?Tw.flowing=!0:Y0.listenerCount("data")>0?Y0.resume():Tw.readableListening||(Tw.flowing=null)}function Kw(Y0){b0("readable nexttick read 0"),Y0.read(0)}Pw.prototype.resume=function(){const Y0=this._readableState;return Y0.flowing||(b0("resume"),Y0.flowing=!Y0.readableListening,i1(this,Y0)),Y0[N0]=!1,this};function i1(Y0,Tw){Tw.resumeScheduled||(Tw.resumeScheduled=!0,r0.nextTick(m1,Y0,Tw))}function m1(Y0,Tw){b0("resume",Tw.reading),Tw.reading||Y0.read(0),Tw.resumeScheduled=!1,Y0.emit("resume"),qw(Y0),Tw.flowing&&!Tw.reading&&Y0.read(0)}Pw.prototype.pause=function(){return b0("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b0("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[N0]=!0,this};function qw(Y0){const Tw=Y0._readableState;for(b0("flow",Tw.flowing);Tw.flowing&&Y0.read()!==null;);}Pw.prototype.wrap=function(Y0){let Tw=!1;Y0.on("data",Uw=>{!this.push(Uw)&&Y0.pause&&(Tw=!0,Y0.pause())}),Y0.on("end",()=>{this.push(null)}),Y0.on("error",Uw=>{z0(this,Uw)}),Y0.on("close",()=>{this.destroy()}),Y0.on("destroy",()=>{this.destroy()}),this._read=()=>{Tw&&Y0.resume&&(Tw=!1,Y0.resume())};const Mw=o0(Y0);for(let Uw=1;Uw<Mw.length;Uw++){const Fw=Mw[Uw];this[Fw]===void 0&&typeof Y0[Fw]=="function"&&(this[Fw]=Y0[Fw].bind(Y0))}return this},Pw.prototype[h0]=function(){return y1(this)},Pw.prototype.iterator=function(Y0){return Y0!==void 0&&M0(Y0,"options"),y1(this,Y0)};function y1(Y0,Tw){typeof Y0.read!="function"&&(Y0=Pw.wrap(Y0,{objectMode:!0}));const Mw=S1(Y0,Tw);return Mw.stream=Y0,Mw}async function*S1(Y0,Tw){let Mw=B0;function Uw(s1){this===Y0?(Mw(),Mw=B0):Mw=s1}Y0.on("readable",Uw);let Fw;const Jw=y0(Y0,{writable:!1},s1=>{Fw=s1?k0(Fw,s1):null,Mw(),Mw=B0});try{for(;;){const s1=Y0.destroyed?null:Y0.read();if(s1!==null)yield s1;else{if(Fw)throw Fw;if(Fw===null)return;await new c0(Uw)}}}catch(s1){throw Fw=k0(Fw,s1),Fw}finally{(Fw||(Tw==null?void 0:Tw.destroyOnReturn)!==!1)&&(Fw===void 0||Y0._readableState.autoDestroy)?w0.destroyer(Y0,null):(Y0.off("readable",Uw),Jw())}}s0(Pw.prototype,{readable:{__proto__:null,get(){const Y0=this._readableState;return!!Y0&&Y0.readable!==!1&&!Y0.destroyed&&!Y0.errorEmitted&&!Y0.endEmitted},set(Y0){this._readableState&&(this._readableState.readable=!!Y0)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y0){this._readableState&&(this._readableState.flowing=Y0)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(Y0){this._readableState&&(this._readableState.destroyed=Y0)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s0(p1.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[N0]!==!1},set(Y0){this[N0]=!!Y0}}}),Pw._fromList=_1;function _1(Y0,Tw){if(Tw.length===0)return null;let Mw;return Tw.objectMode?Mw=Tw.buffer.shift():!Y0||Y0>=Tw.length?(Tw.decoder?Mw=Tw.buffer.join(""):Tw.buffer.length===1?Mw=Tw.buffer.first():Mw=Tw.buffer.concat(Tw.length),Tw.buffer.clear()):Mw=Tw.buffer.consume(Y0,Tw.decoder),Mw}function g1(Y0){const Tw=Y0._readableState;b0("endReadable",Tw.endEmitted),Tw.endEmitted||(Tw.ended=!0,r0.nextTick(C1,Tw,Y0))}function C1(Y0,Tw){if(b0("endReadableNT",Y0.endEmitted,Y0.length),!Y0.errored&&!Y0.closeEmitted&&!Y0.endEmitted&&Y0.length===0){if(Y0.endEmitted=!0,Tw.emit("end"),Tw.writable&&Tw.allowHalfOpen===!1)r0.nextTick(M1,Tw);else if(Y0.autoDestroy){const Mw=Tw._writableState;(!Mw||Mw.autoDestroy&&(Mw.finished||Mw.writable===!1))&&Tw.destroy()}}}function M1(Y0){Y0.writable&&!Y0.writableEnded&&!Y0.destroyed&&Y0.end()}Pw.from=function(Y0,Tw){return O0(Pw,Y0,Tw)};let a1;function h1(){return a1===void 0&&(a1={}),a1}return Pw.fromWeb=function(Y0,Tw){return h1().newStreamReadableFromReadableStream(Y0,Tw)},Pw.toWeb=function(Y0,Tw){return h1().newReadableStreamFromStreamReadable(Y0,Tw)},Pw.wrap=function(Y0,Tw){var Mw,Uw;return new Pw({objectMode:(Mw=(Uw=Y0.readableObjectMode)!==null&&Uw!==void 0?Uw:Y0.objectMode)!==null&&Mw!==void 0?Mw:!0,...Tw,destroy(Fw,Jw){w0.destroyer(Y0,Fw),Jw(Fw)}}).wrap(Y0)},readable}var writable,hasRequiredWritable;function requireWritable(){if(hasRequiredWritable)return writable;hasRequiredWritable=1;const r0=browserExports$1,{ArrayPrototypeSlice:e0,Error:n0,FunctionPrototypeSymbolHasInstance:a0,ObjectDefineProperty:i0,ObjectDefineProperties:s0,ObjectSetPrototypeOf:o0,StringPrototypeToLowerCase:l0,Symbol:c0,SymbolHasInstance:u0}=primordials;writable=M0,M0.WritableState=T0;const{EventEmitter:d0}=eventsExports,h0=legacy.Stream,{Buffer:f0}=buffer,p0=destroy_1,{addAbortSignal:A0}=addAbortSignalExports,{getHighWaterMark:m0,getDefaultHighWaterMark:x0}=state,{ERR_INVALID_ARG_TYPE:g0,ERR_METHOD_NOT_IMPLEMENTED:y0,ERR_MULTIPLE_CALLBACK:b0,ERR_STREAM_CANNOT_PIPE:E0,ERR_STREAM_DESTROYED:w0,ERR_STREAM_ALREADY_FINISHED:v0,ERR_STREAM_NULL_VALUES:S0,ERR_STREAM_WRITE_AFTER_END:k0,ERR_UNKNOWN_ENCODING:R0}=errors.codes,{errorOrDestroy:j0}=p0;o0(M0.prototype,h0.prototype),o0(M0,h0);function C0(){}const $0=c0("kOnFinished");function T0(xw,X0,Lw){typeof Lw!="boolean"&&(Lw=X0 instanceof requireDuplex()),this.objectMode=!!(xw&&xw.objectMode),Lw&&(this.objectMode=this.objectMode||!!(xw&&xw.writableObjectMode)),this.highWaterMark=xw?m0(this,xw,"writableHighWaterMark",Lw):x0(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const Hw=!!(xw&&xw.decodeStrings===!1);this.decodeStrings=!Hw,this.defaultEncoding=xw&&xw.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=z0.bind(void 0,X0),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,I0(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!xw||xw.emitClose!==!1,this.autoDestroy=!xw||xw.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[$0]=[]}function I0(xw){xw.buffered=[],xw.bufferedIndex=0,xw.allBuffers=!0,xw.allNoop=!0}T0.prototype.getBuffer=function(){return e0(this.buffered,this.bufferedIndex)},i0(T0.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function M0(xw){const X0=this instanceof requireDuplex();if(!X0&&!a0(M0,this))return new M0(xw);this._writableState=new T0(xw,this,X0),xw&&(typeof xw.write=="function"&&(this._write=xw.write),typeof xw.writev=="function"&&(this._writev=xw.writev),typeof xw.destroy=="function"&&(this._destroy=xw.destroy),typeof xw.final=="function"&&(this._final=xw.final),typeof xw.construct=="function"&&(this._construct=xw.construct),xw.signal&&A0(xw.signal,this)),h0.call(this,xw),p0.construct(this,()=>{const Lw=this._writableState;Lw.writing||U0(this,Lw),J0(this,Lw)})}i0(M0,u0,{__proto__:null,value:function(xw){return a0(this,xw)?!0:this!==M0?!1:xw&&xw._writableState instanceof T0}}),M0.prototype.pipe=function(){j0(this,new E0)};function N0(xw,X0,Lw,Hw){const Ww=xw._writableState;if(typeof Lw=="function")Hw=Lw,Lw=Ww.defaultEncoding;else{if(!Lw)Lw=Ww.defaultEncoding;else if(Lw!=="buffer"&&!f0.isEncoding(Lw))throw new R0(Lw);typeof Hw!="function"&&(Hw=C0)}if(X0===null)throw new S0;if(!Ww.objectMode)if(typeof X0=="string")Ww.decodeStrings!==!1&&(X0=f0.from(X0,Lw),Lw="buffer");else if(X0 instanceof f0)Lw="buffer";else if(h0._isUint8Array(X0))X0=h0._uint8ArrayToBuffer(X0),Lw="buffer";else throw new g0("chunk",["string","Buffer","Uint8Array"],X0);let r1;return Ww.ending?r1=new k0:Ww.destroyed&&(r1=new w0("write")),r1?(r0.nextTick(Hw,r1),j0(xw,r1,!0),r1):(Ww.pendingcb++,D0(xw,Ww,X0,Lw,Hw))}M0.prototype.write=function(xw,X0,Lw){return N0(this,xw,X0,Lw)===!0},M0.prototype.cork=function(){this._writableState.corked++},M0.prototype.uncork=function(){const xw=this._writableState;xw.corked&&(xw.corked--,xw.writing||U0(this,xw))},M0.prototype.setDefaultEncoding=function(X0){if(typeof X0=="string"&&(X0=l0(X0)),!f0.isEncoding(X0))throw new R0(X0);return this._writableState.defaultEncoding=X0,this};function D0(xw,X0,Lw,Hw,Ww){const r1=X0.objectMode?1:Lw.length;X0.length+=r1;const Yw=X0.length<X0.highWaterMark;return Yw||(X0.needDrain=!0),X0.writing||X0.corked||X0.errored||!X0.constructed?(X0.buffered.push({chunk:Lw,encoding:Hw,callback:Ww}),X0.allBuffers&&Hw!=="buffer"&&(X0.allBuffers=!1),X0.allNoop&&Ww!==C0&&(X0.allNoop=!1)):(X0.writelen=r1,X0.writecb=Ww,X0.writing=!0,X0.sync=!0,xw._write(Lw,Hw,X0.onwrite),X0.sync=!1),Yw&&!X0.errored&&!X0.destroyed}function O0(xw,X0,Lw,Hw,Ww,r1,Yw){X0.writelen=Hw,X0.writecb=Yw,X0.writing=!0,X0.sync=!0,X0.destroyed?X0.onwrite(new w0("write")):Lw?xw._writev(Ww,X0.onwrite):xw._write(Ww,r1,X0.onwrite),X0.sync=!1}function B0(xw,X0,Lw,Hw){--X0.pendingcb,Hw(Lw),Q0(X0),j0(xw,Lw)}function z0(xw,X0){const Lw=xw._writableState,Hw=Lw.sync,Ww=Lw.writecb;if(typeof Ww!="function"){j0(xw,new b0);return}Lw.writing=!1,Lw.writecb=null,Lw.length-=Lw.writelen,Lw.writelen=0,X0?(X0.stack,Lw.errored||(Lw.errored=X0),xw._readableState&&!xw._readableState.errored&&(xw._readableState.errored=X0),Hw?r0.nextTick(B0,xw,Lw,X0,Ww):B0(xw,Lw,X0,Ww)):(Lw.buffered.length>Lw.bufferedIndex&&U0(xw,Lw),Hw?Lw.afterWriteTickInfo!==null&&Lw.afterWriteTickInfo.cb===Ww?Lw.afterWriteTickInfo.count++:(Lw.afterWriteTickInfo={count:1,cb:Ww,stream:xw,state:Lw},r0.nextTick(G0,Lw.afterWriteTickInfo)):F0(xw,Lw,1,Ww))}function G0({stream:xw,state:X0,count:Lw,cb:Hw}){return X0.afterWriteTickInfo=null,F0(xw,X0,Lw,Hw)}function F0(xw,X0,Lw,Hw){for(!X0.ending&&!xw.destroyed&&X0.length===0&&X0.needDrain&&(X0.needDrain=!1,xw.emit("drain"));Lw-- >0;)X0.pendingcb--,Hw();X0.destroyed&&Q0(X0),J0(xw,X0)}function Q0(xw){if(xw.writing)return;for(let Ww=xw.bufferedIndex;Ww<xw.buffered.length;++Ww){var X0;const{chunk:r1,callback:Yw}=xw.buffered[Ww],l1=xw.objectMode?1:r1.length;xw.length-=l1,Yw((X0=xw.errored)!==null&&X0!==void 0?X0:new w0("write"))}const Lw=xw[$0].splice(0);for(let Ww=0;Ww<Lw.length;Ww++){var Hw;Lw[Ww]((Hw=xw.errored)!==null&&Hw!==void 0?Hw:new w0("end"))}I0(xw)}function U0(xw,X0){if(X0.corked||X0.bufferProcessing||X0.destroyed||!X0.constructed)return;const{buffered:Lw,bufferedIndex:Hw,objectMode:Ww}=X0,r1=Lw.length-Hw;if(!r1)return;let Yw=Hw;if(X0.bufferProcessing=!0,r1>1&&xw._writev){X0.pendingcb-=r1-1;const l1=X0.allNoop?C0:Pw=>{for(let Qw=Yw;Qw<Lw.length;++Qw)Lw[Qw].callback(Pw)},p1=X0.allNoop&&Yw===0?Lw:e0(Lw,Yw);p1.allBuffers=X0.allBuffers,O0(xw,X0,!0,X0.length,p1,"",l1),I0(X0)}else{do{const{chunk:l1,encoding:p1,callback:Pw}=Lw[Yw];Lw[Yw++]=null;const Qw=Ww?1:l1.length;O0(xw,X0,!1,Qw,l1,p1,Pw)}while(Yw<Lw.length&&!X0.writing);Yw===Lw.length?I0(X0):Yw>256?(Lw.splice(0,Yw),X0.bufferedIndex=0):X0.bufferedIndex=Yw}X0.bufferProcessing=!1}M0.prototype._write=function(xw,X0,Lw){if(this._writev)this._writev([{chunk:xw,encoding:X0}],Lw);else throw new y0("_write()")},M0.prototype._writev=null,M0.prototype.end=function(xw,X0,Lw){const Hw=this._writableState;typeof xw=="function"?(Lw=xw,xw=null,X0=null):typeof X0=="function"&&(Lw=X0,X0=null);let Ww;if(xw!=null){const r1=N0(this,xw,X0);r1 instanceof n0&&(Ww=r1)}return Hw.corked&&(Hw.corked=1,this.uncork()),Ww||(!Hw.errored&&!Hw.ending?(Hw.ending=!0,J0(this,Hw,!0),Hw.ended=!0):Hw.finished?Ww=new v0("end"):Hw.destroyed&&(Ww=new w0("end"))),typeof Lw=="function"&&(Ww||Hw.finished?r0.nextTick(Lw,Ww):Hw[$0].push(Lw)),this};function q0(xw){return xw.ending&&!xw.destroyed&&xw.constructed&&xw.length===0&&!xw.errored&&xw.buffered.length===0&&!xw.finished&&!xw.writing&&!xw.errorEmitted&&!xw.closeEmitted}function Rw(xw,X0){let Lw=!1;function Hw(Ww){if(Lw){j0(xw,Ww??b0());return}if(Lw=!0,X0.pendingcb--,Ww){const r1=X0[$0].splice(0);for(let Yw=0;Yw<r1.length;Yw++)r1[Yw](Ww);j0(xw,Ww,X0.sync)}else q0(X0)&&(X0.prefinished=!0,xw.emit("prefinish"),X0.pendingcb++,r0.nextTick(Cw,xw,X0))}X0.sync=!0,X0.pendingcb++;try{xw._final(Hw)}catch(Ww){Hw(Ww)}X0.sync=!1}function _w(xw,X0){!X0.prefinished&&!X0.finalCalled&&(typeof xw._final=="function"&&!X0.destroyed?(X0.finalCalled=!0,Rw(xw,X0)):(X0.prefinished=!0,xw.emit("prefinish")))}function J0(xw,X0,Lw){q0(X0)&&(_w(xw,X0),X0.pendingcb===0&&(Lw?(X0.pendingcb++,r0.nextTick((Hw,Ww)=>{q0(Ww)?Cw(Hw,Ww):Ww.pendingcb--},xw,X0)):q0(X0)&&(X0.pendingcb++,Cw(xw,X0))))}function Cw(xw,X0){X0.pendingcb--,X0.finished=!0;const Lw=X0[$0].splice(0);for(let Hw=0;Hw<Lw.length;Hw++)Lw[Hw]();if(xw.emit("finish"),X0.autoDestroy){const Hw=xw._readableState;(!Hw||Hw.autoDestroy&&(Hw.endEmitted||Hw.readable===!1))&&xw.destroy()}}s0(M0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(xw){this._writableState&&(this._writableState.destroyed=xw)}},writable:{__proto__:null,get(){const xw=this._writableState;return!!xw&&xw.writable!==!1&&!xw.destroyed&&!xw.errored&&!xw.ending&&!xw.ended},set(xw){this._writableState&&(this._writableState.writable=!!xw)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const xw=this._writableState;return xw?!xw.destroyed&&!xw.ending&&xw.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const Ow=p0.destroy;M0.prototype.destroy=function(xw,X0){const Lw=this._writableState;return!Lw.destroyed&&(Lw.bufferedIndex<Lw.buffered.length||Lw[$0].length)&&r0.nextTick(Q0,Lw),Ow.call(this,xw,X0),this},M0.prototype._undestroy=p0.undestroy,M0.prototype._destroy=function(xw,X0){X0(xw)},M0.prototype[d0.captureRejectionSymbol]=function(xw){this.destroy(xw)};let jw;function Nw(){return jw===void 0&&(jw={}),jw}return M0.fromWeb=function(xw,X0){return Nw().newStreamWritableFromWritableStream(xw,X0)},M0.toWeb=function(xw){return Nw().newWritableStreamFromStreamWritable(xw)},writable}var duplexify,hasRequiredDuplexify;function requireDuplexify(){if(hasRequiredDuplexify)return duplexify;hasRequiredDuplexify=1;const r0=browserExports$1,e0=buffer,{isReadable:n0,isWritable:a0,isIterable:i0,isNodeStream:s0,isReadableNodeStream:o0,isWritableNodeStream:l0,isDuplexNodeStream:c0,isReadableStream:u0,isWritableStream:d0}=utils,h0=endOfStreamExports,{AbortError:f0,codes:{ERR_INVALID_ARG_TYPE:p0,ERR_INVALID_RETURN_VALUE:A0}}=errors,{destroyer:m0}=destroy_1,x0=requireDuplex(),g0=requireReadable(),y0=requireWritable(),{createDeferredPromise:b0}=utilExports,E0=from_1,w0=globalThis.Blob||e0.Blob,v0=typeof w0<"u"?function(T0){return T0 instanceof w0}:function(T0){return!1},S0=globalThis.AbortController||requireBrowser().AbortController,{FunctionPrototypeCall:k0}=primordials;class R0 extends x0{constructor(T0){super(T0),(T0==null?void 0:T0.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(T0==null?void 0:T0.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}duplexify=function $0(T0,I0){if(c0(T0))return T0;if(o0(T0))return C0({readable:T0});if(l0(T0))return C0({writable:T0});if(s0(T0))return C0({writable:!1,readable:!1});if(u0(T0))return C0({readable:g0.fromWeb(T0)});if(d0(T0))return C0({writable:y0.fromWeb(T0)});if(typeof T0=="function"){const{value:N0,write:D0,final:O0,destroy:B0}=j0(T0);if(i0(N0))return E0(R0,N0,{objectMode:!0,write:D0,final:O0,destroy:B0});const z0=N0==null?void 0:N0.then;if(typeof z0=="function"){let G0;const F0=k0(z0,N0,Q0=>{if(Q0!=null)throw new A0("nully","body",Q0)},Q0=>{m0(G0,Q0)});return G0=new R0({objectMode:!0,readable:!1,write:D0,final(Q0){O0(async()=>{try{await F0,r0.nextTick(Q0,null)}catch(U0){r0.nextTick(Q0,U0)}})},destroy:B0})}throw new A0("Iterable, AsyncIterable or AsyncFunction",I0,N0)}if(v0(T0))return $0(T0.arrayBuffer());if(i0(T0))return E0(R0,T0,{objectMode:!0,writable:!1});if(u0(T0==null?void 0:T0.readable)&&d0(T0==null?void 0:T0.writable))return R0.fromWeb(T0);if(typeof(T0==null?void 0:T0.writable)=="object"||typeof(T0==null?void 0:T0.readable)=="object"){const N0=T0!=null&&T0.readable?o0(T0==null?void 0:T0.readable)?T0==null?void 0:T0.readable:$0(T0.readable):void 0,D0=T0!=null&&T0.writable?l0(T0==null?void 0:T0.writable)?T0==null?void 0:T0.writable:$0(T0.writable):void 0;return C0({readable:N0,writable:D0})}const M0=T0==null?void 0:T0.then;if(typeof M0=="function"){let N0;return k0(M0,T0,D0=>{D0!=null&&N0.push(D0),N0.push(null)},D0=>{m0(N0,D0)}),N0=new R0({objectMode:!0,writable:!1,read(){}})}throw new p0(I0,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],T0)};function j0($0){let{promise:T0,resolve:I0}=b0();const M0=new S0,N0=M0.signal;return{value:$0(async function*(){for(;;){const O0=T0;T0=null;const{chunk:B0,done:z0,cb:G0}=await O0;if(r0.nextTick(G0),z0)return;if(N0.aborted)throw new f0(void 0,{cause:N0.reason});({promise:T0,resolve:I0}=b0()),yield B0}}(),{signal:N0}),write(O0,B0,z0){const G0=I0;I0=null,G0({chunk:O0,done:!1,cb:z0})},final(O0){const B0=I0;I0=null,B0({done:!0,cb:O0})},destroy(O0,B0){M0.abort(),B0(O0)}}}function C0($0){const T0=$0.readable&&typeof $0.readable.read!="function"?g0.wrap($0.readable):$0.readable,I0=$0.writable;let M0=!!n0(T0),N0=!!a0(I0),D0,O0,B0,z0,G0;function F0(Q0){const U0=z0;z0=null,U0?U0(Q0):Q0&&G0.destroy(Q0)}return G0=new R0({readableObjectMode:!!(T0!=null&&T0.readableObjectMode),writableObjectMode:!!(I0!=null&&I0.writableObjectMode),readable:M0,writable:N0}),N0&&(h0(I0,Q0=>{N0=!1,Q0&&m0(T0,Q0),F0(Q0)}),G0._write=function(Q0,U0,q0){I0.write(Q0,U0)?q0():D0=q0},G0._final=function(Q0){I0.end(),O0=Q0},I0.on("drain",function(){if(D0){const Q0=D0;D0=null,Q0()}}),I0.on("finish",function(){if(O0){const Q0=O0;O0=null,Q0()}})),M0&&(h0(T0,Q0=>{M0=!1,Q0&&m0(T0,Q0),F0(Q0)}),T0.on("readable",function(){if(B0){const Q0=B0;B0=null,Q0()}}),T0.on("end",function(){G0.push(null)}),G0._read=function(){for(;;){const Q0=T0.read();if(Q0===null){B0=G0._read;return}if(!G0.push(Q0))return}}),G0._destroy=function(Q0,U0){!Q0&&z0!==null&&(Q0=new f0),B0=null,D0=null,O0=null,z0===null?U0(Q0):(z0=U0,m0(I0,Q0),m0(T0,Q0))},G0}return duplexify}var duplex,hasRequiredDuplex;function requireDuplex(){if(hasRequiredDuplex)return duplex;hasRequiredDuplex=1;const{ObjectDefineProperties:r0,ObjectGetOwnPropertyDescriptor:e0,ObjectKeys:n0,ObjectSetPrototypeOf:a0}=primordials;duplex=o0;const i0=requireReadable(),s0=requireWritable();a0(o0.prototype,i0.prototype),a0(o0,i0);{const d0=n0(s0.prototype);for(let h0=0;h0<d0.length;h0++){const f0=d0[h0];o0.prototype[f0]||(o0.prototype[f0]=s0.prototype[f0])}}function o0(d0){if(!(this instanceof o0))return new o0(d0);i0.call(this,d0),s0.call(this,d0),d0?(this.allowHalfOpen=d0.allowHalfOpen!==!1,d0.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),d0.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}r0(o0.prototype,{writable:{__proto__:null,...e0(s0.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e0(s0.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e0(s0.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e0(s0.prototype,"writableBuffer")},writableLength:{__proto__:null,...e0(s0.prototype,"writableLength")},writableFinished:{__proto__:null,...e0(s0.prototype,"writableFinished")},writableCorked:{__proto__:null,...e0(s0.prototype,"writableCorked")},writableEnded:{__proto__:null,...e0(s0.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e0(s0.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(d0){this._readableState&&this._writableState&&(this._readableState.destroyed=d0,this._writableState.destroyed=d0)}}});let l0;function c0(){return l0===void 0&&(l0={}),l0}o0.fromWeb=function(d0,h0){return c0().newStreamDuplexFromReadableWritablePair(d0,h0)},o0.toWeb=function(d0){return c0().newReadableWritablePairFromDuplex(d0)};let u0;return o0.from=function(d0){return u0||(u0=requireDuplexify()),u0(d0,"body")},duplex}const{ObjectSetPrototypeOf:ObjectSetPrototypeOf$1,Symbol:Symbol$9}=primordials;var transform=Transform$1;const{ERR_METHOD_NOT_IMPLEMENTED}=errors.codes,Duplex$2=requireDuplex(),{getHighWaterMark}=state;ObjectSetPrototypeOf$1(Transform$1.prototype,Duplex$2.prototype);ObjectSetPrototypeOf$1(Transform$1,Duplex$2);const kCallback=Symbol$9("kCallback");function Transform$1(r0){if(!(this instanceof Transform$1))return new Transform$1(r0);const e0=r0?getHighWaterMark(this,r0,"readableHighWaterMark",!0):null;e0===0&&(r0={...r0,highWaterMark:null,readableHighWaterMark:e0,writableHighWaterMark:r0.writableHighWaterMark||0}),Duplex$2.call(this,r0),this._readableState.sync=!1,this[kCallback]=null,r0&&(typeof r0.transform=="function"&&(this._transform=r0.transform),typeof r0.flush=="function"&&(this._flush=r0.flush)),this.on("prefinish",prefinish)}function final(r0){typeof this._flush=="function"&&!this.destroyed?this._flush((e0,n0)=>{if(e0){r0?r0(e0):this.destroy(e0);return}n0!=null&&this.push(n0),this.push(null),r0&&r0()}):(this.push(null),r0&&r0())}function prefinish(){this._final!==final&&final.call(this)}Transform$1.prototype._final=final;Transform$1.prototype._transform=function(r0,e0,n0){throw new ERR_METHOD_NOT_IMPLEMENTED("_transform()")};Transform$1.prototype._write=function(r0,e0,n0){const a0=this._readableState,i0=this._writableState,s0=a0.length;this._transform(r0,e0,(o0,l0)=>{if(o0){n0(o0);return}l0!=null&&this.push(l0),i0.ended||s0===a0.length||a0.length<a0.highWaterMark?n0():this[kCallback]=n0})};Transform$1.prototype._read=function(){if(this[kCallback]){const r0=this[kCallback];this[kCallback]=null,r0()}};const{ObjectSetPrototypeOf}=primordials;var passthrough=PassThrough$1;const Transform=transform;ObjectSetPrototypeOf(PassThrough$1.prototype,Transform.prototype);ObjectSetPrototypeOf(PassThrough$1,Transform);function PassThrough$1(r0){if(!(this instanceof PassThrough$1))return new PassThrough$1(r0);Transform.call(this,r0)}PassThrough$1.prototype._transform=function(r0,e0,n0){n0(null,r0)};const process$1=browserExports$1,{ArrayIsArray,Promise:Promise$4,SymbolAsyncIterator,SymbolDispose}=primordials,eos$1=endOfStreamExports,{once}=utilExports,destroyImpl=destroy_1,Duplex$1=requireDuplex(),{aggregateTwoErrors,codes:{ERR_INVALID_ARG_TYPE:ERR_INVALID_ARG_TYPE$1,ERR_INVALID_RETURN_VALUE,ERR_MISSING_ARGS:ERR_MISSING_ARGS$2,ERR_STREAM_DESTROYED,ERR_STREAM_PREMATURE_CLOSE},AbortError:AbortError$2}=errors,{validateFunction,validateAbortSignal:validateAbortSignal$1}=validators,{isIterable,isReadable:isReadable$1,isReadableNodeStream,isNodeStream:isNodeStream$2,isTransformStream:isTransformStream$1,isWebStream:isWebStream$1,isReadableStream:isReadableStream$1,isReadableFinished}=utils,AbortController$2=globalThis.AbortController||requireBrowser().AbortController;let PassThrough,Readable,addAbortListener;function destroyer$1(r0,e0,n0){let a0=!1;r0.on("close",()=>{a0=!0});const i0=eos$1(r0,{readable:e0,writable:n0},s0=>{a0=!s0});return{destroy:s0=>{a0||(a0=!0,destroyImpl.destroyer(r0,s0||new ERR_STREAM_DESTROYED("pipe")))},cleanup:i0}}function popCallback(r0){return validateFunction(r0[r0.length-1],"streams[stream.length - 1]"),r0.pop()}function makeAsyncIterable(r0){if(isIterable(r0))return r0;if(isReadableNodeStream(r0))return fromReadable(r0);throw new ERR_INVALID_ARG_TYPE$1("val",["Readable","Iterable","AsyncIterable"],r0)}async function*fromReadable(r0){Readable||(Readable=requireReadable()),yield*Readable.prototype[SymbolAsyncIterator].call(r0)}async function pumpToNode(r0,e0,n0,{end:a0}){let i0,s0=null;const o0=u0=>{if(u0&&(i0=u0),s0){const d0=s0;s0=null,d0()}},l0=()=>new Promise$4((u0,d0)=>{i0?d0(i0):s0=()=>{i0?d0(i0):u0()}});e0.on("drain",o0);const c0=eos$1(e0,{readable:!1},o0);try{e0.writableNeedDrain&&await l0();for await(const u0 of r0)e0.write(u0)||await l0();a0&&(e0.end(),await l0()),n0()}catch(u0){n0(i0!==u0?aggregateTwoErrors(i0,u0):u0)}finally{c0(),e0.off("drain",o0)}}async function pumpToWeb(r0,e0,n0,{end:a0}){isTransformStream$1(e0)&&(e0=e0.writable);const i0=e0.getWriter();try{for await(const s0 of r0)await i0.ready,i0.write(s0).catch(()=>{});await i0.ready,a0&&await i0.close(),n0()}catch(s0){try{await i0.abort(s0),n0(s0)}catch(o0){n0(o0)}}}function pipeline$1(...r0){return pipelineImpl(r0,once(popCallback(r0)))}function pipelineImpl(r0,e0,n0){if(r0.length===1&&ArrayIsArray(r0[0])&&(r0=r0[0]),r0.length<2)throw new ER
646R_MISSING_ARGS$2("streams");const a0=new AbortController$2,i0=a0.signal,s0=n0==null?void 0:n0.signal,o0=[];validateAbortSignal$1(s0,"options.signal");function l0(){A0(new AbortError$2)}addAbortListener=addAbortListener||utilExports.addAbortListener;let c0;s0&&(c0=addAbortListener(s0,l0));let u0,d0;const h0=[];let f0=0;function p0(b0){A0(b0,--f0===0)}function A0(b0,E0){var w0;if(b0&&(!u0||u0.code==="ERR_STREAM_PREMATURE_CLOSE")&&(u0=b0),!(!u0&&!E0)){for(;h0.length;)h0.shift()(u0);(w0=c0)===null||w0===void 0||w0[SymbolDispose](),a0.abort(),E0&&(u0||o0.forEach(v0=>v0()),process$1.nextTick(e0,u0,d0))}}let m0;for(let b0=0;b0<r0.length;b0++){const E0=r0[b0],w0=b0<r0.length-1,v0=b0>0,S0=w0||(n0==null?void 0:n0.end)!==!1,k0=b0===r0.length-1;if(isNodeStream$2(E0)){let R0=function(j0){j0&&j0.name!=="AbortError"&&j0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&p0(j0)};var y0=R0;if(S0){const{destroy:j0,cleanup:C0}=destroyer$1(E0,w0,v0);h0.push(j0),isReadable$1(E0)&&k0&&o0.push(C0)}E0.on("error",R0),isReadable$1(E0)&&k0&&o0.push(()=>{E0.removeListener("error",R0)})}if(b0===0)if(typeof E0=="function"){if(m0=E0({signal:i0}
vendor: 6,241 bytes, line 646
646),!isIterable(m0))throw new ERR_INVALID_RETURN_VALUE("Iterable, AsyncIterable or Stream","source",m0)}else isIterable(E0)||isReadableNodeStream(E0)||isTransformStream$1(E0)?m0=E0:m0=Duplex$1.from(E0);else if(typeof E0=="function"){if(isTransformStream$1(m0)){var x0;m0=makeAsyncIterable((x0=m0)===null||x0===void 0?void 0:x0.readable)}else m0=makeAsyncIterable(m0);if(m0=E0(m0,{signal:i0}),w0){if(!isIterable(m0,!0))throw new ERR_INVALID_RETURN_VALUE("AsyncIterable",`transform[${b0-1}]`,m0)}else{var g0;PassThrough||(PassThrough=passthrough);const R0=new PassThrough({objectMode:!0}),j0=(g0=m0)===null||g0===void 0?void 0:g0.then;if(typeof j0=="function")f0++,j0.call(m0,T0=>{d0=T0,T0!=null&&R0.write(T0),S0&&R0.end(),process$1.nextTick(p0)},T0=>{R0.destroy(T0),process$1.nextTick(p0,T0)});else if(isIterable(m0,!0))f0++,pumpToNode(m0,R0,p0,{end:S0});else if(isReadableStream$1(m0)||isTransformStream$1(m0)){const T0=m0.readable||m0;f0++,pumpToNode(T0,R0,p0,{end:S0})}else throw new ERR_INVALID_RETURN_VALUE("AsyncIterable or Promise","destination",m0);m0=R0;const{destroy:C0,cleanup:$0}=destroyer$1(m0,!1,!0);h0.push(C0),k0&&o0.push($0)}}else if(isNodeStream$2(E0)){if(isReadableNodeStream(m0)){f0+=2;const R0=pipe(m0,E0,p0,{end:S0});isReadable$1(E0)&&k0&&o0.push(R0)}else if(isTransformStream$1(m0)||isReadableStream$1(m0)){const R0=m0.readable||m0;f0++,pumpToNode(R0,E0,p0,{end:S0})}else if(isIterable(m0))f0++,pumpToNode(m0,E0,p0,{end:S0});else throw new ERR_INVALID_ARG_TYPE$1("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m0);m0=E0}else if(isWebStream$1(E0)){if(isReadableNodeStream(m0))f0++,pumpToWeb(makeAsyncIterable(m0),E0,p0,{end:S0});else if(isReadableStream$1(m0)||isIterable(m0))f0++,pumpToWeb(m0,E0,p0,{end:S0});else if(isTransformStream$1(m0))f0++,pumpToWeb(m0.readable,E0,p0,{end:S0});else throw new ERR_INVALID_ARG_TYPE$1("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m0);m0=E0}else m0=Duplex$1.from(E0)}return(i0!=null&&i0.aborted||s0!=null&&s0.aborted)&&process$1.nextTick(l0),m0}function pipe(r0,e0,n0,{end:a0}){let i0=!1;if(e0.on("close",()=>{i0||n0(new ERR_STREAM_PREMATURE_CLOSE)}),r0.pipe(e0,{end:!1}),a0){let o0=function(){i0=!0,e0.end()};var s0=o0;isReadableFinished(r0)?process$1.nextTick(o0):r0.once("end",o0)}else n0();return eos$1(r0,{readable:!0,writable:!1},o0=>{const l0=r0._readableState;o0&&o0.code==="ERR_STREAM_PREMATURE_CLOSE"&&l0&&l0.ended&&!l0.errored&&!l0.errorEmitted?r0.once("end",n0).once("error",n0):n0(o0)}),eos$1(e0,{readable:!1,writable:!0},n0)}var pipeline_1={pipelineImpl,pipeline:pipeline$1};const{pipeline}=pipeline_1,Duplex=requireDuplex(),{destroyer}=destroy_1,{isNodeStream:isNodeStream$1,isReadable,isWritable:isWritable$1,isWebStream,isTransformStream,isWritableStream,isReadableStream}=utils,{AbortError:AbortError$1,codes:{ERR_INVALID_ARG_VALUE:ERR_INVALID_ARG_VALUE$1,ERR_MISSING_ARGS:ERR_MISSING_ARGS$1}}=errors,eos=endOfStreamExports;var compose$2=function r0(...e0){if(e0.length===0)throw new ERR_MISSING_ARGS$1("streams");if(e0.length===1)return Duplex.from(e0[0]);const n0=[...e0];if(typeof e0[0]=="function"&&(e0[0]=Duplex.from(e0[0])),typeof e0[e0.length-1]=="function"){const p0=e0.length-1;e0[p0]=Duplex.from(e0[p0])}for(let p0=0;p0<e0.length;++p0)if(!(!isNodeStream$1(e0[p0])&&!isWebStream(e0[p0]))){if(p0<e0.length-1&&!(isReadable(e0[p0])||isReadableStream(e0[p0])||isTransformStream(e0[p0])))throw new ERR_INVALID_ARG_VALUE$1(`streams[${p0}]`,n0[p0],"must be readable");if(p0>0&&!(isWritable$1(e0[p0])||isWritableStream(e0[p0])||isTransformStream(e0[p0])))throw new ERR_INVALID_ARG_VALUE$1(`streams[${p0}]`,n0[p0],"must be writable")}let a0,i0,s0,o0,l0;function c0(p0){const A0=o0;o0=null,A0?A0(p0):p0?l0.destroy(p0):!f0&&!h0&&l0.destroy()}const u0=e0[0],d0=pipeline(e0,c0),h0=!!(isWritable$1(u0)||isWritableStream(u0)||isTransformStream(u0)),f0=!!(isReadable(d0)||isReadableStream(d0)||isTransformStream(d0));if(l0=new Duplex({writableObjectMode:!!(u0!=null&&u0.writableObjectMode),readableObjectMode:!!(d0!=null&&d0.readableObjectMode),writable:h0,readable:f0}),h0){if(isNodeStream$1(u0))l0._write=function(A0,m0,x0){u0.write(A0,m0)?x0():a0=x0},l0._final=function(A0){u0.end(),i0=A0},u0.on("drain",function(){if(a0){const A0=a0;a0=null,A0()}});else if(isWebStream(u0)){const m0=(isTransformStream(u0)?u0.writable:u0).getWriter();l0._write=async function(x0,g0,y0){try{await m0.ready,m0.write(x0).catch(()=>{}),y0()}catch(b0){y0(b0)}},l0._final=async function(x0){try{await m0.ready,m0.close().catch(()=>{}),i0=x0}catch(g0){x0(g0)}}}const p0=isTransformStream(d0)?d0.readable:d0;eos(p0,()=>{if(i0){const A0=i0;i0=null,A0()}})}if(f0){if(isNodeStream$1(d0))d0.on("readable",function(){if(s0){const p0=s0;s0=null,p0()}}),d0.on("end",function(){l0.push(null)}),l0._read=function(){for(;;){const p0=d0.read();if(p0===null){s0=l0._read;return}if(!l0.push(p0))return}};else if(isWebStream(d0)){const A0=(isTransformStream(d0)?d0.readable:d0).getReader();l0._read=async function(){for(;;)try{const{value:m0,done:x0}=await A0.read();if(!l0.push(m0))return;if(x0){l0.push(null);return}}catch{return}}}}return l0._destroy=function(p0,A0){!p0&&o0!==null&&(p0=new AbortError$1),s0=null,a0=null,i0=null,o0===null?A0(p0):(o0=A0,isNodeStream$1(d0)&&destroyer(d0,p0))},l0};const AbortController$1=globalThis.AbortController||requireBrowser().AbortController,{codes:{ERR_INVALID_ARG_VALUE,ERR_INVALID_ARG_TYPE,ERR_MISSING_ARGS,ERR_OUT_OF_RANGE},AbortError}=errors,{validateAbortSignal,validateInteger,validateObject}=validators,kWeakHandler=primordials.Symbol("kWeak"),kResistStopPropagation=primordials.Symbol("kResistStopPropagation"),{finished}=endOfStreamExports,staticCompose=compose$2,{addAbortSignalNoValidate}=addAbortSignalExports,{isWritable,isNodeStream}=utils,{deprecate}=utilExports,{ArrayPrototypePush,Boolean:Boolean$1,MathFloor,Number:Number$1,NumberIsNaN,Promise:Promise$3,PromiseReject,PromiseResolve,PromisePrototypeThen,Symbol:Symbol$8}=primordials,kEmpty=Symbol$8("kEmpty"),kEof=Symbol$8("kEof");function compose$1(r0,e0){if(e0!=null&&validateObject(e0,"options"),(e0==null?void 0:e0.signal)!=null&&validateAbortSignal(e0.signal,"options.signal"),isNodeStream(r0)&&!isWritable(r0))throw new ER
646R_INVALID_ARG_VALUE("stream",r0,"must be writable");const n0=staticCompose(this,r0);return e0!=null&&e0.signal&&addAbortSignalNoValidate(e0.signal,n0),n0}function map$4(r0,e0){if(typeof r0!="function")throw new ERR_INVALID_ARG_TYPE("fn",["Function","AsyncFunction"],r0);e0!=null&&validateObject(e0,"options"),(e0==null?void 0:e0.signal)!=null&&validateAbortSignal(e0.signal,"options.signal");let n0=1;(e0==null?void 0:e0.concurrency)!=null&&(n0=MathFloor(e0.concurrency));let a0=n0-1;return(e0==null?void 0:e0.highWaterMark)!=null&&(a0=MathFloor(e0.highWaterMark)),validateInteger(n0,"options.concurrency",1),validateInteger(a0,"options.highWaterMark",0),a0+=n0,(async function*(){const s0=utilExports.AbortSignalAny([e0==null?void 0:e0.signal].filter(Boolean$1)),o0=this,l0=[],c0={signal:s0};let u0,d0,h0=!1,f0=0;function p0(){h0=!0,A0()}function A0(){f0-=1,m0()}function m0(){d0&&!h0&&f0<n0&&l0.length<a0&&(d0(),d0=null)}async function x0(){try{for await(let g0 of o0){if(h0)return;if(s0.aborted)throw new AbortError;try{if(g0=r0(g0,c0),g0===kEmpty)continue;g0=PromiseResolve(g0)}catch(y0){g0=PromiseReject(y0)}f0+=1,PromisePrototypeThen(g0,A0,p0),l0.push(g0),u0&&(u0(),u0=null),!h0&&(l0.length>=a0||f0>=n0)&&await new Promise$3(y0=>{d0=y0})}l0.push(kEof)}catch(g0){const y0=PromiseReject(g0);PromisePrototypeThen(y0,A0,p0),l0.push(y0)}finally{h0=!0,u0&&(u0(),u0=null)}}x0();try{for(;;){for(;l0.length>0;){const g0=await l0[0];if(g0===kEof)return;if(s0.aborted)throw new AbortError;g0!==kEmpty&&(yield g0),l0.shift(),m0()}await new Promise$3(g0=>{u0=g0})}}finally{h0=!0,d0&&(d0(),d0=null)}}).call(this)}function asIndexedPairs(r0=void 0){return r0!=null&&validateObject(r0,"options"),(r0==null?void 0:r0.signal)!=null&&validateAbortSignal(r0.signal,"options.signal"),(async function*(){let n0=0;for await(const i0 of this){var a0;if(r0!=null&&(a0=r0.signal)!==null&&a0!==void 0&&a0.aborted)throw new AbortError({cause:r0.signal.reason});yield[n0++,i0]}}).call(this)}async function some$2(r0,e0=void 0){for await(const n0 of filter.call(this,r0,e0))return!0;return!1}async function every$2(r0,e0=void 0){if(typeof r0!="function")throw new ER
vendor: 2,268 bytes, line 646
646R_INVALID_ARG_TYPE("fn",["Function","AsyncFunction"],r0);return!await some$2.call(this,async(...n0)=>!await r0(...n0),e0)}async function find(r0,e0){for await(const n0 of filter.call(this,r0,e0))return n0}async function forEach(r0,e0){if(typeof r0!="function")throw new ERR_INVALID_ARG_TYPE("fn",["Function","AsyncFunction"],r0);async function n0(a0,i0){return await r0(a0,i0),kEmpty}for await(const a0 of map$4.call(this,n0,e0));}function filter(r0,e0){if(typeof r0!="function")throw new ERR_INVALID_ARG_TYPE("fn",["Function","AsyncFunction"],r0);async function n0(a0,i0){return await r0(a0,i0)?a0:kEmpty}return map$4.call(this,n0,e0)}class ReduceAwareErrMissingArgs extends ERR_MISSING_ARGS{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function reduce(r0,e0,n0){var a0;if(typeof r0!="function")throw new ERR_INVALID_ARG_TYPE("reducer",["Function","AsyncFunction"],r0);n0!=null&&validateObject(n0,"options"),(n0==null?void 0:n0.signal)!=null&&validateAbortSignal(n0.signal,"options.signal");let i0=arguments.length>1;if(n0!=null&&(a0=n0.signal)!==null&&a0!==void 0&&a0.aborted){const u0=new AbortError(void 0,{cause:n0.signal.reason});throw this.once("error",()=>{}),await finished(this.destroy(u0)),u0}const s0=new AbortController$1,o0=s0.signal;if(n0!=null&&n0.signal){const u0={once:!0,[kWeakHandler]:this,[kResistStopPropagation]:!0};n0.signal.addEventListener("abort",()=>s0.abort(),u0)}let l0=!1;try{for await(const u0 of this){var c0;if(l0=!0,n0!=null&&(c0=n0.signal)!==null&&c0!==void 0&&c0.aborted)throw new AbortError;i0?e0=await r0(e0,u0,{signal:o0}):(e0=u0,i0=!0)}if(!l0&&!i0)throw new ReduceAwareErrMissingArgs}finally{s0.abort()}return e0}async function toArray$1(r0){r0!=null&&validateObject(r0,"options"),(r0==null?void 0:r0.signal)!=null&&validateAbortSignal(r0.signal,"options.signal");const e0=[];for await(const a0 of this){var n0;if(r0!=null&&(n0=r0.signal)!==null&&n0!==void 0&&n0.aborted)throw new AbortError(void 0,{cause:r0.signal.reason});ArrayPrototypePush(e0,a0)}return e0}function flatMap$2(r0,e0){const n0=map$4.call(this,r0,e0);return(async function*(){for await(const i0 of n0)yield*i0}).call(this)}function toIntegerOrInfinity(r0){if(r0=Number$1(r0),NumberIsNaN(r0))return 0;
646if(r0<0)throw new ERR_OUT_OF_RANGE("number",">= 0",r0);return r0}function drop(r0,e0=void 0){return e0!=null&&validateObject(e0,"options"),(e0==null?void 0:e0.signal)!=null&&validateAbortSignal(e0.signal,"options.signal"),r0=toIntegerOrInfinity(r0),(async function*(){var a0;if(e0!=null&&(a0=e0.signal)!==null&&a0!==void 0&&a0.aborted)throw new AbortError;for await(const s0 of this){var i0;if(e0!=null&&(i0=e0.signal)!==null&&i0!==void 0&&i0.aborted)throw new AbortError;r0--<=0&&(yield s0)}}).call(this)}function take(r0,e0=void 0){return e0!=null&&validateObject(e0,"options"),(e0==null?void 0:e0.signal)!=null&&validateAbortSignal(e0.signal,"options.signal"),r0=toIntegerOrInfinity(r0),(async function*(){var a0;if(e0!=null&&(a0=e0.signal)!==null&&a0!==void 0&&a0.aborted)throw new AbortError;for await(const s0 of this){var i0;if(e0!=null&&(i0=e0.signal)!==null&&i0!==void 0&&i0.aborted)throw new AbortError;if(r0-- >0&&(yield s0),r0<=0)return}}).call(this)}operators.streamReturningOperators={asIndexedPairs:deprecate(asIndexedPairs,"readable.asIndexedPairs will be removed in a future version."),drop,filter,flatMap:flatMap$2,map:map$4,take,compose:compose$1};operators.promiseReturningOperators={every:every$2,forEach,reduce,toArray:toArray$1,some:some$2,find};var promises,hasRequiredPromises;function requirePromises(){if(hasRequiredPromises)return promises;hasRequiredPromises=1;const{ArrayPrototypePop:r0,Promise:e0}=primordials,{isIterable:n0,isNodeStream:a0,isWebStream:i0}=utils,{pipelineImpl:s0}=pipeline_1,{finished:o0}=endOfStreamExports;requireStream();function l0(...c0){return new e0((u0,d0)=>{let h0,f0;const p0=c0[c0.length-1];if(p0&&typeof p0=="object"&&!a0(p0)&&!n0(p0)&&!i0(p0)){const A0=r0(c0);h0=A0.signal,f0=A0.end}s0(c0,(A0,m0)=>{A0?d0(A0):u0(m0)},{signal:h0,end:f0})})}return promises={finished:o0,pipeline:l0},promises}var hasRequiredStream;function requireStream(){if(hasRequiredStream)return stream.exports;hasRequiredStream=1;const{Buffer:r0}=buffer,{ObjectDefineProperty:e0,ObjectKeys:n0,ReflectApply:a0}=primordials,{promisify:{custom:i0}}=utilExports,{streamReturningOperators:s0,promiseReturningOperators:o0}=operators,{codes:{ERR_ILLEGAL_CONSTRUCTOR:l0}}=errors,c0=compose$2,{setDefaultHighWaterMark:u0,getDefaultHighWaterMark:d0}=state,{pipeline:h0}=pipeline_1,{destroyer:f0}=destroy_1,p0=endOfStreamExports,A0=requirePromises(),m0=utils,x0=stream.exports=legacy.Stream;x0.isDestroyed=m0.isDestroyed,x0.isDisturbed=m0.isDisturbed,x0.isErrored=m0.isErrored,x0.isReadable=m0.isReadable,x0.isWritable=m0.isWritable,x0.Readable=requireReadable();for(const b0 of n0(s0)){let w0=function(...v0){if(new.target)throw l0();return x0.Readable.from(a0(E0,this,v0))};var y0=w0;const E0=s0[b0];e0(w0,"name",{__proto__:null,value:E0.name}),e0(w0,"length",{__proto__:null,value:E0.length}),e0(x0.Readable.prototype,b0,{__proto__:null,value:w0,enumerable:!1,configurable:!0,writable:!0})}for(const b0 of n0(o0)){let w0=function(...S0){if(new.target)throw l0();return a0(E0,this,S0)};var y0=w0;const E0=o0[b0];e0(w0,"name",{__proto__:null,value:E0.name}),e0(w0,"length",{__proto__:null,value:E0.length}),e0(x0.Readable.prototype,b0,{__proto__:null,value:w0,enumerable:!1,configurable:!0,writable:!0})}x0.Writable=requireWritable(),x0.Duplex=requireDuplex(),x0.Transform=transform,x0.PassThrough=passthrough,x0.pipeline=h0;const{addAbortSignal:g0}=addAbortSignalExports;return x0.addAbortSignal=g0,x0.finished=p0,x0.destroy=f0,x0.compose=c0,x0.setDefaultHighWaterMark=u0,x0.getDefaultHighWaterMark=d0,e0(x0,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return A0}}),e0(h0,i0,{__proto__:null,enumerable:!0,get(){return A0.pipeline}}),e0(p0,i0,{__proto__:null,enumerable:!0,get(){return A0.finished}}),x0.Stream=x0,x0._isUint8Array=function(E0){return E0 instanceof Uint8Array},x0._uint8ArrayToBuffer=function(E0){return r0.from(E0.buffer,E0.byteOffset,E0.byteLength)},stream.exports}(function(r0){const e0=requireStream(),n0=requirePromises(),a0=e0.Readable.destroy;r0.exports=e0.Readable,r0.exports._uint8ArrayToBuffer=e0._uint8ArrayToBuffer,r0.exports._isUint8Array=e0._isUint8Array,r0.exports.isDisturbed=e0.isDisturbed,r0.exports.isErrored=e0.isErrored,r0.exports.isReadable=e0.isReadable,r0.exports.Readable=e0.Readable,r0.exports.Writable=e0.Writable,r0.exports.Duplex=e0.Duplex,r0.exports.Transform=e0.Transform,r0.exports.PassThrough=e0.PassThrough,r0.exports.addAbortSignal=e0.addAbortSignal,r0.exports.finished=e0.finished,r0.exports.destroy=e0.destroy,r0.exports.destroy=a0,r0.exports.pipeline=e0.pipeline,r0.exports.compose=e0.compose,Object.defineProperty(e0,"promises",{configurable:!0,enumerable:!0,get(){return n0}}),r0.exports.Stream=e0.Stream,r0.exports.default=r0.exports})(browser$2);var browserExports=browser$2.exports;
646Object.defineProperty(lib,"__esModule",{value:!0});lib.ReadableWebToNodeStream=void 0;const readable_stream_1=browserExports;class ReadableWebToNodeStream extends readable_stream_1.Readable{constructor(e0){super(),this.bytesRead=0,this.released=!1,this.reader=e0.getReader()}_read(){if(this.released){this.push(null);return}this.pendingRead=this.reader.read().then(e0=>{delete this.pendingRead,e0.done||this.released?this.push(null):(this.bytesRead+=e0.value.length,this.push(e0.value))}).catch(e0=>{this.destroy(e0)})}async waitForReadToComplete(){this.pendingRead&&await this.pendingRead}async close(){await this.syncAndRelease()}async syncAndRelease(){this.released=!0,await this.waitForReadToComplete(),await this.reader.releaseLock()}}lib.ReadableWebToNodeStream=ReadableWebToNodeStream;(function(r0){Object.defineProperty(r0,"__esModule",{value:!0}),r0.fetchFromUrl=r0.parseBlob=r0.parseReadableStream=r0.parseNodeStream=r0.selectCover=r0.ratingToStars=r0.orderTags=r0.parseFromTokenizer=r0.parseBuffer=void 0;const e0=browserExports$2,n0=core$2,a0=lib,i0=e0("music-metadata-browser:main");var s0=core$2;Object.defineProperty(r0,"parseBuffer",{enumerable:!0,get:function(){return s0.parseBuffer}}),Object.defineProperty(r0,"parseFromTokenizer",{enumerable:!0,get:function(){return s0.parseFromTokenizer}}),Object.defineProperty(r0,"orderTags",{enumerable:!0,get:function(){return s0.orderTags}}),Object.defineProperty(r0,"ratingToStars",{enumerable:!0,get:function(){return s0.ratingToStars}}),Object.defineProperty(r0,"selectCover",{enumerable:!0,get:function(){return s0.selectCover}}),r0.parseNodeStream=n0.parseStream;async function o0(d0,h0,f0){const p0=new a0.ReadableWebToNodeStream(d0),A0=await(0,r0.parseNodeStream)(p0,typeof h0=="string"?{mimeType:h0}:h0,f0);return await p0.close(),A0}r0.parseReadableStream=o0;async function l0(d0,h0){d0.type,d0.size,d0 instanceof File&&d0.name;const f0=d0.stream?d0.stream():c0(d0);return o0(f0,{mimeType:d0.type,size:d0.size},h0)}r0.parseBlob=l0;function c0(d0){const h0=new FileReader;return new ReadableStream({start(f0){h0.onloadend=p0=>{let A0=p0.target.result;A0 instanceof ArrayBuffer&&(A0=new Uint8Array(A0)),f0.enqueue(A0),f0.close()},h0.onerror=p0=>{f0.close()},h0.onabort=p0=>{f0.close()},h0.readAsArrayBuffer(d0)}})}async function u0(d0,h0){const f0=await fetch(d0),p0={size:parseInt(f0.headers.get("Content-Length"),10),mimeType:f0.headers.get("Content-Type")};if(f0.ok)if(f0.body){const A0=await o0(f0.body,p0,h0);return i0("Closing HTTP-readable-stream..."),f0.body.locked||await f0.body.cancel(),i0("HTTP-readable-stream closed."),A0}else return l0(await f0.blob(),h0);else throw new Error(`HTTP error status=${f0.status}: ${f0.statusText}`)}r0.fetchFromUrl=u0})(lib$3);const index=getDefaultExportFromCjs(lib$3),index$1=_mergeNamespaces({__proto__:null,default:index},[lib$3]);let essentiaInstance=null,essentiaLoading=null;async function getEssentia(){if(essentiaInstance)return essentiaInstance;if(essentiaLoading)return essentiaLoading;essentiaLoading=loadEssentia();try{return essentiaInstance=await essentiaLoading,essentiaInstance}finally{essentiaLoading=null}}async function loadEssentia(){try{const[{default:r0},{default:e0}]=await Promise.all([__vitePreload(()=>import("./essentia.js-core.es-DVL6HGcJ.js"),[]),__vitePreload(()=>import("./essentia-wasm.es-Bv2Jfhwy.js"),[])]),n0=await e0(),a0=new r0(n0,!1);return console.log("[Essentia.js] Initialized successfully, version:",a0.version||"unknown"),a0}catch(r0){throw console.error("[Essentia.js] Failed to initialize:",r0),r0}}async function detectBpmWithEssentia(r0){const e0=await getEssentia(),n0=e0.audioBufferToMonoSignal(r0),a0=e0.arrayToVector(n0);try{const i0=e0.RhythmExtractor2013(a0,210,"multifeature",40),s0=Math.round(i0.bpm),o0=i0.confidence;return console.log(`[Essentia.js] BPM detected: ${s0} (confidence: ${o0.toFixed(2)})`),{bpm:s0,confidence:o0}}catch(i0){throw console.error("[Essentia.js] BPM detection failed:",i0),i0}}async function detectKeyWithEssentia(r0){const e0=await getEssentia(),n0=e0.audioBufferToMonoSignal(r0),a0=e0.arrayToVector(n0);try{const i0=e0.KeyExtractor(a0,!0,4096,4096,12,3500,60,25,.2,"bgate",r0.sampleRate,1e-4,440,"cosine","hann"),s0=i0.scale.charAt(0).toUpperCase()+i0.scale.slice(1);return console.log(`[Essentia.js] Key detected: ${i0.key} ${s0} (strength: ${i0.strength.toFixed(2)})`),{key:i0.key,scale:s0,strength:i0.strength}}catch(i0){throw console.error("[Essentia.js] Key detection failed:",i0),i0}}const essentiaAnalysis=Object.freeze(Object.defineProperty({__proto__:null,detectBpmW
646ithEssentia,detectKeyWithEssentia,getEssentia},Symbol.toStringTag,{value:"Module"}));function linearToDb(r0){return r0<=0?-1/0:20*Math.log10(r0)}function analyzeAudioQuality(r0){const e0=r0.getChannelData(0),n0=r0.sampleRate,a0=e0.length;let i0=0,s0=0;const o0=.99;for(let T0=0;T0<a0;T0++){const I0=Math.abs(e0[T0]);I0>i0&&(i0=I0),I0>=o0&&s0++}const l0=linearToDb(i0),c0=s0/a0*100;let u0=0;for(let T0=0;T0<a0;T0++)u0+=e0[T0]*e0[T0];const d0=Math.sqrt(u0/a0),h0=linearToDb(d0),f0=i0/(d0||1e-4),p0=Math.floor(n0*.1),A0=Math.floor(a0/p0),m0=[];for(let T0=0;T0<A0;T0++){const I0=T0*p0;let M0=0;for(let N0=0;N0<p0;N0++)M0+=e0[I0+N0]*e0[I0+N0];m0.push(Math.sqrt(M0/p0))}m0.sort((T0,I0)=>T0-I0);const x0=Math.max(1,Math.floor(A0*.1));let g0=0;for(let T0=0;T0<x0;T0++)g0+=m0[T0];const y0=g0/x0,b0=linearToDb(y0),w0=m0.slice(-x0).reduce((T0,I0)=>T0+I0,0)/x0,v0=linearToDb(w0)-b0;let S0;c0===0?S0=0:c0<.01?S0=20:c0<.1?S0=40:c0<1?S0=70:S0=Math.min(100,70+c0*3);let k0;v0>20?k0=100:v0>15?k0=85:v0>10?k0=70:v0>6?k0=50:k0=Math.max(0,30+v0*3);let R0;b0<-60?R0=100:b0<-50?R0=85:b0<-40?R0=70:b0<-30?R0=50:R0=Math.max(0,30+Math.abs(b0));const j0=[];S0>30&&(S0>70?j0.push("Severe clipping detected - audio may sound distorted"):j0.push("Minor clipping detected")),k0<50&&j0.push("Low dynamic range - audio may sound compressed/flat"),R0<50&&j0.push("High noise floor - audio may have audible background noise"),f0<3&&j0.push("Very limited headroom - audio is heavily compressed"),l0<-12&&j0.push("Audio level is quite low - may need normalization");const C0=Math.round((100-S0)*.4+k0*.3+R0*.3);let $0;return C0>=85&&j0.length===0?$0="Excellent":C0>=70?$0="Good":C0>=50?$0="Fair":$0="Poor",{clippingScore:S0,clippedSamplesPercent:c0,peakLevel:l0,dynamicRange:v0,dynamicRangeScore:k0,noiseFloor:b0,noiseFloorScore:R0,rmsLevel:h0,crestFactor:f0,overallQuality:C0,qualityGrade:$0,issues:j0}}const SUPABASE_URL$4="https://unfpdgrtnhbfxinuktue.supabase.co";function parseEmbeddedKey(r0){if(!r0)return null;const e0=r0.trim(),n0=/^([A-G][#b]?)\s*(m|min|minor)$/i,a0=/^([A-G][#b]?)\s*(M|maj|major)?$/i,i0=e0.match(n0);if(i0)return{key:i0[1].charAt(0).toUpperCase()+i0[1].slice(1),scale:"Minor"};const s0=e0.match(a0);return s0?{key:s0[1].charAt(0).toUpperCase()+s0[1].slice(1),scale:"Major"}:null}async function detectKeyFromAnalysis(r0){try{const e0=await detectKeyWithEssentia(r0);return console.log(`Detected Key (Essentia): ${e0.key} ${e0.scale} (strength: ${e0.strength.toFixed(2)})`),{key:e0.key,scale:e0.scale}}catch(e0){return console.warn("Essentia key detection failed, using fallback:",e0),detectKeyFromAudio(r0)}}const NOTE_FREQUENCIES=[{note:"C",freq:261.63},{note:"C#",freq:277.18},{note:"D",freq:293.66},{note:"D#",freq:311.13},{note:"E",freq:329.63},{note:"F",freq:349.23},{note:"F#",freq:369.99},{note:"G",freq:392},{note:"G#",freq:415.3},{note:"A",freq:440},{note:"A#",freq:466.16},{note:"B",freq:493.88}];function useAudioAnalysis(){const[r0,e0]=reactExports.useState(!1),[n0,a0]=reactExports.useState(0),[i0,s0]=reactExports.useState(null),[o0,l0]=reactExports.useState(null),[c0,u0]=reactExports.useState(null),d0=reactExports.useCallback(async(A0,m0,x0,g0)=>{a0(2);let y0=120,b0="analysis";if(m0&&m0>0&&m0<300)y0=m0,b0="metadata",console.log(`Using embedded BPM from ID3: ${y0}`);else try{const D0=await detectBpmWithEssentia(A0);y0=D0.bpm,console.log(`Detected BPM (Essentia): ${y0} (confidence: ${D0.confidence.toFixed(2)})`)}catch(D0){console.warn("Essentia BPM detection failed, trying web-audio-beat-detector:",D0);try{const O0=Math.min(10,A0.duration*.1),B0=Math.min(30,A0.duration-O0);y0=await analyze(A0,O0,B0,{minTempo:70,maxTempo:180}),console.log("Detected BPM (web-audio-beat-detector fallback):",y0)}catch(O0){console.warn("web-audio-beat-detector failed, trying onset detection:",O0);try{y0=estimateBpmFromOnsets(A0),console.log("Detected BPM (onset fallback):",y0)}catch{y0=120}}}a0(3);let E0,w0,v0="analysis";if(x0){const D0=parseEmbeddedKey(x0);if(D0)E0=D0.key,w0=D0.scale,v0="metadata",console.log(`Using embedded key from ID3: ${E0} ${w0}`);else{const O0=await detectKeyFromAnalysis(A0);E0=O0.key,w0=O0.scale}}else{const D0=await detectKeyFromAnalysis(A0);E0=D0.key,w0=D0.scale}console.log("Final Key:",E0,w0),a0(4);const S0=calculateEnergy(A0);a0(5);const k0=analyzeSpectrum(A0);a0(6);let R0;try{R0=analyzeAudioQuality(A0),console.log("Audio quality analysis:",R0)}catch(D0){console.warn("Audio quality analysis failed:",D0)}a0(7);const j0=detectTimeSignature(A0,y0);let C0,$0,T0,I0,M0;try{const D0=await detectGenreAI(y0,w0,S0,k0,g0);console.log("AI analysis result:",D0),C0=D0.genre,$0=D0.mood,T0=D0.moodConfidence,I0=D0.energyLevel,M0=D0.energyDescriptor}catch(D0){console.warn("AI genre/mood detection failed, using rule-based fallback:",D0),C0=detectGenre(y0,w0,S0,k0)}const N0=detectVocalistGender(A0);return{bpm:Math.round(y0),key:E0,scale:w0,groove:j0,vibe:C0,vocalistGender:N0,bpmSource:b0,keySource:v0,mood:$0,moodConfidence:T0,energyLevel:I0,energyDescriptor:M0,audioQuality:R0?{overallQuality:R0.overallQuality,qualityGrade:R0.qual
646ityGrade,clippingScore:R0.clippingScore,dynamicRangeScore:R0.dynamicRangeScore,noiseFloorScore:R0.noiseFloorScore,issues:R0.issues}:void 0}},[]),h0=reactExports.useCallback(async A0=>{var m0;e0(!0),s0(null),l0(null),a0(0),u0(null);try{let x0={};try{const S0=(await lib$3.parseBlob(A0)).common;x0={title:S0.title,artists:S0.artists||(S0.artist?[S0.artist]:void 0),composers:S0.composer||void 0,genres:S0.genre,embeddedBpm:typeof S0.bpm=="number"?S0.bpm:void 0,embeddedKey:S0.key,lyrics:Array.isArray(S0.lyrics)?typeof S0.lyrics[0]=="string"?S0.lyrics[0]:(m0=S0.lyrics[0])==null?void 0:m0.text:void 0,originalDate:S0.date||(S0.year?String(S0.year):S0.originaldate)},console.log("Extracted full ID3 metadata:",x0)}catch(v0){console.warn("Could not extract metadata from file:",v0)}const g0=new AudioContext,y0=await A0.arrayBuffer(),b0=await g0.decodeAudioData(y0);a0(1);const E0=await d0(b0,x0.embeddedBpm,x0.embeddedKey,x0.genres);await g0.close();const w0={...E0,originalDate:x0.originalDate,extractedTitle:x0.title,extractedArtists:x0.artists,extractedComposers:x0.composers,extractedLyrics:x0.lyrics,extractedGenres:x0.genres};return s0(w0),w0}catch(x0){return console.error("Analysis failed:",x0),l0("Failed to analyze audio. Please try a different file."),null}finally{e0(!1)}},[d0]),f0=reactExports.useCallback(async A0=>{var m0;e0(!0),s0(null),l0(null),a0(0),u0(A0);try{if(!isValidDropboxUrl(A0))return l0("Invalid Dropbox URL. Please provide a valid Dropbox link."),null;let x0=A0;isValidDropboxUrl(A0)&&(x0=A0.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("?dl=0","?dl=1").replace("&dl=0","&dl=1"),x0.includes("dl=1")||(x0+=x0.includes("?")?"&dl=1":"?dl=1")),console.log("Fetching audio from:",x0),a0(1);const g0=await fetch(x0);if(!g0.ok)throw new Error(`Failed to fetch audio: ${g0.status}`);const y0=await g0.arrayBuffer();let b0={};try{const k0=new Blob([y0]),j0=(await lib$3.parseBlob(k0)).common;b0={title:j0.title,artists:j0.artists||(j0.artist?[j0.artist]:void 0),composers:j0.composer||void 0,genres:j0.genre,embeddedBpm:typeof j0.bpm=="number"?j0.bpm:void 0,embeddedKey:j0.key,lyrics:Array.isArray(j0.lyrics)?typeof j0.lyrics[0]=="string"?j0.lyrics[0]:(m0=j0.lyrics[0])==null?void 0:m0.text:void 0,originalDate:j0.date||(j0.year?String(j0.year):j0.originaldate)},console.log("Extracted full ID3 metadata from URL:",b0)}catch(k0){console.warn("Could not extract metadata from URL:",k0)}const E0=new AudioContext,w0=await E0.decodeAudioData(y0),v0=await d0(w0,b0.embeddedBpm,b0.embeddedKey,b0.genres);await E0.close();const S0={...v0,originalDate:b0.originalDate,extractedTitle:b0.title,extractedArtists:b0.artists,extractedComposers:b0.composers,extractedLyrics:b0.lyrics,extractedGenres:b0.genres};return s0(S0),S0}catch(x0){return console.error("Analysis from URL failed:",x0),l0("Failed to fetch or analyze audio from Dropbox. Make sure the link is public and points to an MP3 or WAV file."),null}finally{e0(!1)}},[d0]),p0=reactExports.useCallback(()=>{s0(null),l0(null),a0(0),u0(null)},[]);return{analyzeAudio:h0,analyzeFromUrl:f0,isAnalyzing:r0,analysisStep:n0,result:i0,error:o0,currentUrl:c0,reset:p0}}async function detectGenreAI(r0,e0,n0,a0,i0){const s0=await fetch(`${SUPABASE_URL$4}/functions/v1/detect-genre`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bpm:r0,scale:e0,energy:n0,subBass:a0.subBassEnergy,bass:a0.bassEnergy,mid:a0.midEnergy,high:a0.highEnergy,treble:a0.trebleActivity,rhythm:a0.rhythmStrength,beatSharpness:a0.beatSharpness,vocalPresence:a0.vocalPresence,embeddedGenres:i0})});if(!s0.ok){const l0=await s0.json().catch(()=>({}));throw new Error(l0.error||`Genre detection failed: ${s0.status}`)}const o0=await s0.json();return{genre:o0.genre||"Pop",mood:o0.mood,moodConfidence:o0.moodConfidence,energyLevel:o0.energyLevel,energyDescriptor:o0.energyDescriptor}}function calculateEnergy(r0){const e0=r0.getChannelData(0);let n0=0;for(let i0=0;i0<e0.length;i0++)n0+=e0[i0]**2;const a0=Math.sqrt(n0/e0.length);return Math.min(100,a0*300)}function estimateBpmFromOnsets(r0){const e0=r0.getChannelData(0),n0=r0.sampleRate,a0=1024,i0=512,s0=Math.min(30,r0.duration),o0=Math.floor(s0*n0),l0=[];for(let x0=0;x0<o0-a0;x0+=i0){let g0=0;for(let y0=0;y0<a0;y0++)g0+=e0[x0+y0]**2;l0.push(g0)}const c0=[],u0=1.5;for(let x0=1;x0<l0.length-1;x0++)l0[x0]>l0[x0-1]*u0&&l0[x0]>l0[x0+1]&&c0.push(x0);if(c0.length<4)return 120;const d0=[];for(let x0=1;x0<c0.length;x0++)d0.push(c0[x0]-c0[x0-1]);const h0=new Map;for(const x0 of d0){const g0=Math.round(x0/2)*2;h0.set(g0,(h0.get(g0)||0)+1)}let f0=0,p0=0;for(const[x0,g0]of h0)g0>f0&&(f0=g0,p0=x0);if(p0===0)return 120;let m0=60/(p0*i0/n0);for(;m0>180;)m0/=2;for(;m0<70;)m0*=2;return Math.round(m0)}
646function detectKeyFromAudio(r0){const e0=r0.getChannelData(0),n0=r0.sampleRate,a0=Math.min(r0.duration,30),i0=Math.floor(a0*n0),s0=computeHPCP(e0,n0,i0),o0=detectKeyKrumhanslSchmuckler(s0),l0=detectKeyTemplateMatching(s0),c0=detectKeyHarmonicAnalysis(s0),u0=new Map,d0=(m0,x0,g0,y0)=>{const b0=`${m0}-${x0}`;u0.set(b0,(u0.get(b0)||0)+g0*y0)};d0(o0.key,o0.scale,1,o0.confidence),d0(l0.key,l0.scale,.8,l0.confidence),d0(c0.key,c0.scale,.7,c0.confidence);const h0=getRelativeKey(o0.key,o0.scale);h0&&o0.confidence>.6&&d0(h0.key,h0.scale,.3,o0.confidence*.5);let f0="C",p0="Major",A0=-1/0;for(const[m0,x0]of u0)if(x0>A0){A0=x0;const[g0,y0]=m0.split("-");f0=g0,p0=y0}return console.log("Key detection results:",{krumhansl:`${o0.key} ${o0.scale} (${(o0.confidence*100).toFixed(1)}%)`,template:`${l0.key} ${l0.scale} (${(l0.confidence*100).toFixed(1)}%)`,harmonic:`${c0.key} ${c0.scale} (${(c0.confidence*100).toFixed(1)}%)`,final:`${f0} ${p0}`}),{key:f0,scale:p0}}function computeHPCP(r0,e0,n0){const a0=new Float32Array(12).fill(0),i0=4096,s0=2048,o0=Math.floor((n0-i0)/s0),l0=440,c0=65.41,u0=2093,d0=6,h0=[1,.5,.33,.25,.2,.17];for(let p0=0;p0<o0;p0++){const A0=p0*s0,m0=new Float32Array(i0);for(let x0=0;x0<i0;x0++){const g0=.5*(1-Math.cos(2*Math.PI*x0/i0));m0[x0]=r0[A0+x0]*g0}for(let x0=0;x0<12;x0++){let g0=0;for(let y0=2;y0<=6;y0++){const b0=x0+(y0-4)*12,E0=l0*Math.pow(2,b0/12);if(E0<c0||E0>u0||E0>e0/2)continue;const w0=goertzelMagnitude(m0,e0,E0);let v0=w0*h0[0];for(let S0=2;S0<=d0;S0++){const k0=E0*S0;if(k0>e0/2)break;const R0=goertzelMagnitude(m0,e0,k0);R0>w0*.1&&(v0+=R0*h0[S0-1])}g0+=v0*v0}a0[x0]+=g0}}const f0=Math.sqrt(a0.reduce((p0,A0)=>p0+A0*A0,0));if(f0>0)for(let p0=0;p0<12;p0++)a0[p0]/=f0;return a0}function goertzelMagnitude(r0,e0,n0){const a0=r0.length,i0=Math.round(a0*n0/e0),s0=2*Math.PI*i0/a0,o0=2*Math.cos(s0);let l0=0,c0=0,u0=0;for(let f0=0;f0<a0;f0++)l0=r0[f0]+o0*c0-u0,u0=c0,c0=l0;const d0=c0-u0*Math.cos(s0),h0=u0*Math.sin(s0);return Math.sqrt(d0*d0+h0*h0)/a0}function detectKeyKrumhanslSchmuckler(r0){const e0=[6.35,2.23,3.48,2.33,4.38,4.09,2.52,5.19,2.39,3.66,2.29,2.88],n0=[6.33,2.68,3.52,5.38,2.6,3.53,2.54,4.75,3.98,2.69,3.34,3.17],a0=[5,2,3.5,2,4.5,4,2,4.5,2,3.5,1.5,4],i0=[5,2,3.5,4.5,2,4,2,4.5,3.5,2,1.5,4];let s0="C",o0="Major",l0=-1/0;const c0=[];for(let d0=0;d0<12;d0++){const h0=new Float32Array(12);for(let y0=0;y0<12;y0++)h0[y0]=r0[(y0+d0)%12];const f0=pearsonCorrelation(h0,e0),p0=pearsonCorrelation(h0,a0),A0=Math.max(f0,p0),m0=pearsonCorrelation(h0,n0),x0=pearsonCorrelation(h0,i0),g0=Math.max(m0,x0);c0.push({key:NOTE_FREQUENCIES[d0].note,scale:"Major",corr:A0}),c0.push({key:NOTE_FREQUENCIES[d0].note,scale:"Minor",corr:g0}),A0>l0&&(l0=A0,s0=NOTE_FREQUENCIES[d0].note,o0="Major"),g0>l0&&(l0=g0,s0=NOTE_FREQUENCIES[d0].note,o0="Minor")}c0.sort((d0,h0)=>h0.corr-d0.corr);const u0=c0.length>1?Math.max(0,Math.min(1,(c0[0].corr-c0[1].corr)*2+.5)):.5;return{key:s0,scale:o0,confidence:u0}}function pearsonCorrelation(r0,e0){const n0=r0.length;let a0=0,i0=0,s0=0,o0=0,l0=0;for(let d0=0;d0<n0;d0++)a0+=r0[d0],i0+=e0[d0],s0+=r0[d0]*e0[d0],o0+=r0[d0]*r0[d0],l0+=e0[d0]*e0[d0];const c0=n0*s0-a0*i0,u0=Math.sqrt((n0*o0-a0*a0)*(n0*l0-i0*i0));return u0===0?0:c0/u0}function detectKeyTemplateMatching(r0){const e0=[1,0,.5,0,.8,.7,0,.9,0,.6,0,.5],n0=[1,0,.5,.8,0,.7,0,.9,.5,0,.5,0];let a0="C",i0="Major",s0=-1/0;for(let l0=0;l0<12;l0++){const c0=new Float32Array(12);for(let h0=0;h0<12;h0++)c0[h0]=r0[(h0+l0)%12];const u0=dotProduct(c0,e0),d0=dotProduct(c0,n0);u0>s0&&(s0=u0,a0=NOTE_FREQUENCIES[l0].note,i0="Major"),d0>s0&&(s0=d0,a0=NOTE_FREQUENCIES[l0].note,i0="Minor")}const o0=Math.max(0,Math.min(1,s0));return{key:a0,scale:i0,confidence:o0}}
646function dotProduct(r0,e0){let n0=0;for(let a0=0;a0<r0.length;a0++)n0+=r0[a0]*e0[a0];return n0}function detectKeyHarmonicAnalysis(r0){const e0=Array.from(r0).map((c0,u0)=>({val:c0,idx:u0}));e0.sort((c0,u0)=>u0.val-c0.val);const n0=e0.slice(0,3).map(c0=>c0.idx),a0=e0.slice(0,5).map(c0=>c0.idx);let i0="C",s0="Major",o0=0;for(let c0=0;c0<12;c0++){const u0=(c0+4)%12,d0=(c0+7)%12;a0.includes(c0)&&a0.includes(u0)&&a0.includes(d0);const h0=(n0.includes(c0)?3:0)+(a0.includes(u0)?2:0)+(a0.includes(d0)?2:0),f0=(c0+3)%12;a0.includes(c0)&&a0.includes(f0)&&a0.includes(d0);const p0=(n0.includes(c0)?3:0)+(a0.includes(f0)?2:0)+(a0.includes(d0)?2:0),A0=(c0+5)%12,m0=(c0+11)%12,x0=(c0+10)%12,g0=(a0.includes(A0)?1:0)+(a0.includes(m0)?1:0),y0=(a0.includes(A0)?1:0)+(a0.includes(x0)?1:0);h0+g0>o0&&(o0=h0+g0,i0=NOTE_FREQUENCIES[c0].note,s0="Major"),p0+y0>o0&&(o0=p0+y0,i0=NOTE_FREQUENCIES[c0].note,s0="Minor")}const l0=Math.min(1,o0/9);return{key:i0,scale:s0,confidence:l0}}function getRelativeKey(r0,e0){const n0=NOTE_FREQUENCIES.findIndex(a0=>a0.note===r0);if(n0===-1)return null;if(e0==="Major"){const a0=(n0+9)%12;return{key:NOTE_FREQUENCIES[a0].note,scale:"Minor"}}else{const a0=(n0+3)%12;return{key:NOTE_FREQUENCIES[a0].note,scale:"Major"}}}function goertzel(r0,e0,n0,a0){const i0=Math.round(a0*n0/e0),s0=2*Math.PI*i0/a0,o0=2*Math.cos(s0);let l0=0,c0=0,u0=0;const d0=Math.min(a0,4096);for(let f0=0;f0<d0;f0++)l0=r0[f0]+o0*c0-u0,u0=c0,c0=l0;const h0=c0*c0+u0*u0-o0*c0*u0;return Math.sqrt(Math.abs(h0))}function analyzeSpectrum(r0){const e0=r0.getChannelData(0),n0=r0.sampleRate,a0=Math.min(e0.length,n0*15);let i0=0,s0=0,o0=0,l0=0,c0=0,u0=0;for(let C0=25;C0<=60;C0+=8)i0+=goertzel(e0,n0,C0,a0);for(let C0=60;C0<=250;C0+=30)s0+=goertzel(e0,n0,C0,a0);for(let C0=300;C0<=2e3;C0+=200)o0+=goertzel(e0,n0,C0,a0);for(let C0=2500;C0<=8e3;C0+=800)l0+=goertzel(e0,n0,C0,a0);for(let C0=8500;C0<=16e3;C0+=1e3)c0+=goertzel(e0,n0,C0,a0);for(let C0=300;C0<=3400;C0+=400)u0+=goertzel(e0,n0,C0,a0);const d0=i0+s0+o0+l0+c0||1;let h0=0,f0=0;const p0=Math.floor(n0*.02),A0=Math.floor(n0*.01);let m0=0,x0=0,g0=0;for(let C0=0;C0<Math.min(a0,n0*8);C0+=A0){let $0=0;for(let T0=C0;T0<Math.min(C0+p0,a0);T0++)$0+=e0[T0]**2;if(m0>0){const T0=$0/m0;T0>1.5&&(x0++,T0>3&&g0++)}m0=$0}h0=Math.min(1,x0/80),f0=x0>0?g0/x0:0;let y0=0;const b0=Math.floor(n0*.015);let E0=0,w0=0;for(let C0=0;C0<Math.min(a0,n0*5);C0+=b0){let $0=0;for(let T0=C0;T0<Math.min(C0+b0,a0);T0++)$0+=e0[T0]**2;$0>E0*1.8&&E0>0&&w0++,E0=$0}y0=Math.min(1,w0/60);const v0=i0/d0,S0=s0/d0,k0=o0/d0,R0=l0/d0,j0=c0/d0;return{subBassEnergy:v0,bassEnergy:S0,midEnergy:k0,highEnergy:R0,trebleActivity:j0+y0*.5,vocalPresence:u0/(o0||1),rhythmStrength:h0,beatSharpness:f0}}function detectTimeSignature(r0,e0){const n0=r0.getChannelData(0),a0=r0.sampleRate,i0=1024,s0=512,o0=[],l0=i0,c0=Math.floor((Math.min(n0.length,a0*20)-l0)/s0);for(let m0=0;m0<c0;m0++){const x0=m0*s0;let g0=0;for(let y0=0;y0<l0;y0++)g0+=n0[x0+y0]**2;o0.push(g0)}const u0=Math.max(...o0),d0=o0.map(m0=>m0/(u0||1)),h0=Math.round(60/e0*a0/s0),f0={};f0["4/4"]=calculateMeterCorrelation(d0,h0*4,h0),f0["3/4"]=calculateMeterCorrelation(d0,h0*3,h0),f0["6/8"]=calculateMeterCorrelation(d0,h0*2,Math.round(h0*.67)),f0["2/4"]=calculateMeterCorrelation(d0,h0*2,h0);let p0="4/4",A0=f0["4/4"];return f0["3/4"]>A0*1.15&&(p0="3/4",A0=f0["3/4"]),f0["6/8"]>A0*1.1&&(p0="6/8",A0=f0["6/8"]),console.log("Time signature correlations:",f0,"selected:",p0),p0}function calculateMeterCorrelation(r0,e0,n0){if(e0<=0||r0.length<e0*2)return 0;let a0=0,i0=0;for(let o0=0;o0<r0.length-e0;o0++)a0+=r0[o0]*r0[o0+e0],i0++;let s0=0;for(let o0=0;o0<r0.length-n0;o0++)s0+=Math.abs(r0[o0]-r0[o0+n0])<.3?1:0;return a0/i0+s0/r0.length*.5}function detectGenre(r0,e0,n0,a0){const s0=[{name:"Hip-Hop",bpmRange:[65,105],bpmWeight:2.5,energyRange:[45,85],energyWeight:1,subBassRange:[.08,.5],subBassWeight:4,bassRange:[.25,.65],bassWeight:2,midRange:[.2,.55],midWeight:1,highRange:[.1,.4],highWeight:.5,trebleRange:[.05,.35],trebleWeight:1.5,rhythmRange:[.35,.8],rhythmWeight:2,beatSharpnessRange:[.15,.6],beatSharpnessWeight:2,vocalRange:[.4,1.2],vocalWeight:2.5,preferredScale:"Minor",scaleWeight:1}
646,{name:"Trap",bpmRange:[125,175],bpmWeight:2,energyRange:[50,90],energyWeight:1,subBassRange:[.12,.6],subBassWeight:4.5,bassRange:[.3,.7],bassWeight:2,midRange:[.12,.45],midWeight:.5,highRange:[.15,.5],highWeight:1,trebleRange:[.15,.6],trebleWeight:3.5,rhythmRange:[.3,.75],rhythmWeight:1.5,beatSharpnessRange:[.2,.7],beatSharpnessWeight:2,vocalRange:[.25,.95],vocalWeight:1.5,preferredScale:"Minor",scaleWeight:1.5},{name:"Blues",bpmRange:[55,95],bpmWeight:1.5,energyRange:[25,60],energyWeight:2,subBassRange:[0,.06],subBassWeight:3,bassRange:[.2,.48],bassWeight:1.5,midRange:[.42,.78],midWeight:3,highRange:[.12,.4],highWeight:1,trebleRange:[0,.15],trebleWeight:2,rhythmRange:[.2,.5],rhythmWeight:1.5,beatSharpnessRange:[0,.2],beatSharpnessWeight:2.5,vocalRange:[.35,.9],vocalWeight:1.5,preferredScale:"Minor",scaleWeight:1.5},{name:"Electronic",bpmRange:[118,145],bpmWeight:2,energyRange:[60,100],energyWeight:1.5,subBassRange:[.05,.25],subBassWeight:1.5,bassRange:[.35,.75],bassWeight:2,midRange:[.2,.55],midWeight:.5,highRange:[.25,.65],highWeight:1,trebleRange:[.1,.45],trebleWeight:1.5,rhythmRange:[.55,1],rhythmWeight:2.5,beatSharpnessRange:[.25,.7],beatSharpnessWeight:1.5,vocalRange:[0,.5],vocalWeight:.5,preferredScale:"Any",scaleWeight:0},{name:"House",bpmRange:[118,132],bpmWeight:2.5,energyRange:[50,85],energyWeight:1,subBassRange:[.04,.2],subBassWeight:1,bassRange:[.38,.7],bassWeight:2,midRange:[.25,.55],midWeight:1,highRange:[.28,.58],highWeight:1,trebleRange:[.12,.4],trebleWeight:1.5,rhythmRange:[.6,1],rhythmWeight:2.5,beatSharpnessRange:[.2,.55],beatSharpnessWeight:1,vocalRange:[.2,.6],vocalWeight:.5,preferredScale:"Any",scaleWeight:0},{name:"Techno",bpmRange:[128,155],bpmWeight:2,energyRange:[65,95],energyWeight:1.5,subBassRange:[.03,.18],subBassWeight:1,bassRange:[.35,.68],bassWeight:2,midRange:[.15,.45],midWeight:1,highRange:[.2,.52],highWeight:1.5,trebleRange:[.15,.45],trebleWeight:1.5,rhythmRange:[.65,1],rhythmWeight:2.5,beatSharpnessRange:[.25,.65],beatSharpnessWeight:1.5,vocalRange:[0,.3],vocalWeight:1.5,preferredScale:"Minor",scaleWeight:1},{name:"Rock",bpmRange:[95,145],bpmWeight:1,energyRange:[60,95],energyWeight:2,subBassRange:[0,.08],subBassWeight:1.5,bassRange:[.22,.52],bassWeight:1.5,midRange:[.38,.72],midWeight:2.5,highRange:[.18,.48],highWeight:1,trebleRange:[.08,.35],trebleWeight:1,rhythmRange:[.4,.78],rhythmWeight:1.5,beatSharpnessRange:[.15,.5],beatSharpnessWeight:1,vocalRange:[.3,.85],vocalWeight:1,preferredScale:"Any",scaleWeight:0},{name:"Metal",bpmRange:[115,220],bpmWeight:1,energyRange:[75,100],energyWeight:2.5,subBassRange:[.02,.12],subBassWeight:1,bassRange:[.28,.62],bassWeight:1.5,midRange:[.42,.82],midWeight:2.5,highRange:[.22,.58],highWeight:1.5,trebleRange:[.1,.4],trebleWeight:1,rhythmRange:[.5,.92],rhythmWeight:1.5,beatSharpnessRange:[.25,.7],beatSharpnessWeight:1.5,vocalRange:[.2,.7],vocalWeight:.5,preferredScale:"Minor",scaleWeight:2},{name:"Pop",bpmRange:[95,135],bpmWeight:1.5,energyRange:[45,80],energyWeight:1,subBassRange:[.02,.12],subBassWeight:1,bassRange:[.22,.5],bassWeight:1,midRange:[.32,.62],midWeight:1.5,highRange:[.22,.52],highWeight:1,trebleRange:[.08,.32],trebleWeight:1,rhythmRange:[.35,.68],rhythmWeight:1,beatSharpnessRange:[.1,.4],beatSharpnessWeight:.5,vocalRange:[.45,1],vocalWeight:2.5,preferredScale:"Major",scaleWeight:1.5},{name:"R&B",bpmRange:[55,105],bpmWeight:1.5,energyRange:[35,70],energyWeight:1.5,subBassRange:[.03,.15],subBassWeight:1.5,bassRange:[.28,.58],bassWeight:1.5,midRange:[.35,.65],midWeight:2,highRange:[.18,.48],highWeight:1,trebleRange:[.05,.25],trebleWeight:1,rhythmRange:[.25,.55],rhythmWeight:1,beatSharpnessRange:[.05,.3],beatSharpnessWeight:1.5,vocalRange:[.5,1.1],vocalWeight:3,preferredScale:"Any",scaleWeight:0},{name:"Jazz",bpmRange:[75,200],bpmWeight:.5,energyRange:[25,65],energyWeight:1.5,subBassRange:[0,.05],subBassWeight:2,bassRange:[.18,.48],bassWeight:1,midRange:[.42,.78],midWeight:2.5,highRange:[.22,.58],highWeight:2,trebleRange:[.08,.35],trebleWeight:1,rhythmRange:[.15,.5],rhythmWeight:2,beatSharpnessRange:[.05,.35],beatSharpnessWeight:1.5,vocalRange:[0,.6],vocalWeight:.5,preferredScale:"Any",scaleWeight:0},{name:"Classical",bpmRange:[40,180],bpmWeight:.2,energyRange:[15,60],energyWeight:2,subBassRange:[0,.04],subBassWeight:2.5,bassRange:[.12,.42],bassWeight:1.5,midRange:[.38,.78],midWeight:2.5,highRange:[.22,.62],highWeight:2,trebleRange:[.05,.25],trebleWeight:1.5,rhythmRange:[.05,.35],rhythmWeight:3,beatSharpnessRange:[0,.2],beatSharpnessWeight:2.5,vocalRange:[0,.4],vocalWeight:2,preferredScale:"Any",scaleWeight:0},{name:"Reggae",bpmRange:[55,95],bpmWeight:2.5,energyRange:[40,70],energyWeight:1.5,subBassRange:[.02,.12],subBassWeight:1,bassRange:[.38,.72],bassWeight:2.5,midRange:[.25,.55],midWeight:1,highRange:[.12,.42],highWeight:1,trebleRange:[.05,.25],trebleWeight:1,rhythmRange:[.35,.68],rhythmWeight:1.5,beatSharpnessRange:[.1,.4],beatSharpnessWeight:1,vocalRange:[.35,.85],vocalWeight:1.5,preferredScale:"Any",scaleWeight:0},{name:"Country",bpmRange:[85,145],bpmWeight:1,energyRange:[35,70],energyWeight:1.5,subBassRange:[0,.05],subBassWeight:2,bassRange:[.18,.45],bassWeight:1.5,midRange:[.38,.68],midWeight:2,highRange:[.22,.52],highWeight:1.5,trebleRange:[.08,.3],trebleWeight:1,rhythmRange:[.3,.62],rhythmWeight:1,beatSharpnessRange:[.08,.35],beatSharpnessWeight:1,vocalRange:[.42,.9],vocalWeight:2,preferredScale:"Major",scaleWeight:2},{name:"Folk",bpmRange:[55,135],bpmWeight:.5,energyRange:[20,55],energyWeight:2,subBassRange:[0,.04],subBassWeight:2,bassRange:[.12,.4],bassWeight:1.5,midRange:[.42,.78],midWeight:2.5,highRange:[.18,.5],highWeight:1.5,trebleRange:[.05,.25],trebleWeight:1,rhythmRange:[.15,.48],rhythmWeight:2,beatSharpnessRange:[0,.25],beatSharpnessWeight:2,vocalRange:[.35,.9],vocalWeight:1.5,preferredScale:"Any",scaleWeight:0},{name:"Ambient",bpmRange:[40,100],bpmWeight:.5,energyRange:[5,40],energyWeight:3,subBassRange:[0,.08],subBassWeight:1.5,bassRange:[.08,.38],bassWeight:1,midRange:[.25,.62],midWeight:1.5,highRange:[.18,.55],highWeight:1.5,trebleRange:[.05,.3],trebleWeight:1,rhythmRange:[0,.25],rhythmWeight:3.5,beatSharpnessRange:[0,.12],beatSharpnessWeight:3,vocalRange:[0,.25],vocalWeight:2.5,preferredScale:"Any",scaleWeight:0},{name:"Drum & Bass",bpmRange:[155,190],bpmWeight:3,energyRange:[60,95],energyWeight:1.5,subBassRange:[.06,.3],subBassWeight:2,bassRange:[.42,.82],bassWeight:2.5,midRange:[.18,.5],midWeight:1,highRange:[.28,.62],highWeight:1.5,trebleRange:[.12,.45],trebleWeight:1.5,rhythmRange:[.55,.92],rhythmWeight:2,beatSharpnessRange:[.3,.75],beatSharpnessWeight:2,vocalRange:[0,.5],vocalWeight:.5,preferredScale:"Any",scaleWeight:0},{name:"Dubstep",bpmRange:[135,150],bpmWeight:2,energyRange:[65,100],energyWeight:2,subBassRange:[.1,.4],subBassWeight:3,bassRange:[.48,.92],bassWeight:3,midRange:[.28,.62],midWeight:1.5,highRange:[.22,.58],highWeight:1,trebleRange:[.1,.4],trebleWeight:1,rhythmRange:[.4,.78],rhythmWeight:1.5,beatSharpnessRange:[.2,.6],beatSharpnessWeight:1.5,vocalRange:[.1,.5],vocalWeight:1,preferredScale:"Minor",scaleWeight:1.5},{name:"Indie",bpmRange:[95,145],bpmWeight:1,energyRange:[40,75],energyWeight:1.5,subBassRange:[0,.06],subBassWeight:1.5,bassRange:[.18,.48],bassWeight:1,midRange:[.38,.72],midWeight:2,highRange:[.22,.55],highWeight:1.5,trebleRange:[.08,.32],trebleWeight:1,rhythmRange:[.3,.62],rhythmWeight:1,beatSharpnessRange:[.1,.4],beatSharpnessWeight:1,vocalRange:[.35,.85],vocalWeight:1.5,preferredScale:"Any",scaleWeight:0},{name:"Funk",bpmRange:[85,125],bpmWeight:1.5,energyRange:[50,80],energyWeight:1.5,subBassRange:[.02,.12],subBassWeight:1,bassRange:[.38,.7],bassWeight:2.5,midRange:[.35,.65],midWeight:2,highRange:[.18,.48],highWeight:1,trebleRange:[.08,.32],trebleWeight:1,rhythmRange:[.48,.82],rhythmWeight:2.5,beatSharpnessRange:[.15,.5],beatSharpnessWeight:1.5,vocalRange:[.3,.78],vocalWeight:1,preferredScale:"Any",scaleWeight:0},{name:"Soul",bpmRange:[55,105],bpmWeight:1.5,energyRange:[35,70],energyWeight:1.5,subBassRange:[0,.08],subBassWeight:1.5,bassRange:[.28,.58],bassWeight:1.5,midRange:[.38,.72],midWeight:2,highRange:[.18,.5],highWeight:1,trebleRange:[.05,.25],trebleWeight:1,rhythmRange:[.3,.62],rhythmWeight:1.5,beatSharpnessRange:[.05,.3],beatSharpnessWeight:1.5,vocalRange:[.52,1],vocalWeight:3,preferredScale:"Any",scaleWeight:0}].map(o0=>{let l0=0,c0=0;const u0=(w0,v0,S0)=>{if(S0===0)return{score:0,max:0};const k0=v0[1]-v0[0],R0=(v0[0]+v0[1])/2;if(w0>=v0[0]&&w0<=v0[1]){const j0=Math.abs(w0-R0)/(k0/2);return{score:S0*(1-j0*.2),max:S0}}else{const C0=(w0<v0[0]?v0[0]-w0:w0-v0[1])/Math.max(k0,.1),$0=Math.exp(-C0*2);return{score:S0*$0*.3,max:S0}}};let d0=u0(r0,o0.bpmRange,o0.bpmWeight);l0+=d0.score,c0+=d0.max;let h0=u0(n0,o0.energyRange,o0.energyWeight);l0+=h0.score,c0+=h0.max;let f0=u0(a0.subBassEnergy,o0.subBassRange,o0.subBassWeight);l0+=f0.score,c0+=f0.max;let p0=u0(a0.bassEnergy,o0.bassRange,o0.bassWeight);l0+=p0.score,c0+=p0.max;let A0=u0(a0.midEnergy,o0.midRange,o0.midWeight);l0+=A0.score,c0+=A0.max;let m0=u0(a0.highEnergy,o0.highRange,o0.highWeight);l0+=m0.score,c0+=m0.max;let x0=u0(a0.trebleActivity,o0.trebleRange,o0.trebleWeight);l0+=x0.score,c0+=x0.max;let g0=u0(a0.rhythmStrength,o0.rhythmRange,o0.rhythmWeight);l0+=g0.score,c0+=g0.max;let y0=u0(a0.beatSharpness,o0.beatSharpnessRange,o0.beatSharpnessWeight);l0+=y0.score,c0+=y0.max;let b0=u0(a0.vocalPresence,o0.vocalRange,o0.vocalWeight);l0+=b0.score,c0+=b0.max,o0.preferredScale!=="Any"&&o0.scaleWeight>
6460&&(e0===o0.preferredScale&&(l0+=o0.scaleWeight),c0+=o0.scaleWeight);const E0=c0>0?l0/c0*100:0;return{genre:o0.name,score:E0}});return s0.sort((o0,l0)=>l0.score-o0.score),console.log("Genre analysis - Top matches:",s0.slice(0,5).map(o0=>`${o0.genre}: ${o0.score.toFixed(1)}%`)),console.log("Audio features:",{bpm:r0.toFixed(1),energy:n0.toFixed(1),scale:e0,subBass:a0.subBassEnergy.toFixed(3),bass:a0.bassEnergy.toFixed(3),mid:a0.midEnergy.toFixed(3),high:a0.highEnergy.toFixed(3),treble:a0.trebleActivity.toFixed(3),rhythm:a0.rhythmStrength.toFixed(3),sharpness:a0.beatSharpness.toFixed(3),vocal:a0.vocalPresence.toFixed(3)}),s0[0].genre}function detectVocalistGender(r0){const e0=r0.getChannelData(0),n0=r0.sampleRate,a0=Math.min(r0.duration,20),i0=Math.floor(a0*n0),s0=Math.floor(i0/4);let o0=[],l0=[],c0=!1;for(let A0=0;A0<4;A0++){const m0=A0*s0,x0=e0.slice(m0,m0+s0);let g0=0,y0=0,b0=0,E0=0;for(let v0=100;v0<=170;v0+=10)g0+=goertzelSection(x0,n0,v0);for(let v0=180;v0<=280;v0+=10)y0+=goertzelSection(x0,n0,v0);for(let v0=800;v0<=3500;v0+=300)b0+=goertzelSection(x0,n0,v0);for(let v0 of[30,50,12e3,14e3])E0+=goertzelSection(x0,n0,v0);b0/(E0+.001)>2&&(c0=!0,o0.push(g0),l0.push(y0))}if(!c0||o0.length===0)return"Instrumental";const u0=o0.reduce((A0,m0)=>A0+m0,0)/o0.length,d0=l0.reduce((A0,m0)=>A0+m0,0)/l0.length,h0=u0+d0;if(h0===0)return"Instrumental";const f0=u0/h0,p0=d0/h0;return console.log("Vocalist analysis - Male ratio:",f0.toFixed(3),"Female ratio:",p0.toFixed(3)),f0>.58?"Male":p0>.58?"Female":"Mixed"}function goertzelSection(r0,e0,n0){const a0=r0.length,i0=Math.round(a0*n0/e0),s0=2*Math.PI*i0/a0,o0=2*Math.cos(s0);let l0=0,c0=0,u0=0;const d0=Math.min(a0,8192);for(let f0=0;f0<d0;f0++)l0=r0[f0]+o0*c0-u0,u0=c0,c0=l0;const h0=c0*c0+u0*u0-o0*c0*u0;return Math.sqrt(Math.abs(h0))}const DetailRow$1=React__default.memo(function r0({icon:e0,label:n0,children:a0}){return jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3 py-2.5 max-w-full",children:[jsxRuntimeExports.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-muted-foreground shrink-0 mt-0.5",children:e0}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-1",children:n0}),jsxRuntimeExports.jsx("div",{className:"text-sm text-foreground overflow-hidden break-words",children:a0})]})]})});function SongDetailPanel({song:r0,onClose:e0,onUpdate:n0,onPlay:a0,isPlaying:i0,isCurrentSong:s0,folders:o0,allWriters:l0=[],onConfirmWriters:c0,readOnly:u0=!1,songwriters:d0=[],onTagSongwriter:h0,onUntagSongwriter:f0,getSongWriters:p0,includeArKeywords:A0,onIncludeArKeywordsChange:m0}){const{role:x0,ownerId:g0}=useAuth(),{analyzeFromUrl:y0}=useAudioAnalysis();u0=u0||x0==="a_and_r";const[b0,E0]=reactExports.useState(!1),[w0,v0]=reactExports.useState(r0.name),[S0,k0]=reactExports.useState(!1),[R0,j0]=reactExports.useState(r0.writers||""),[C0,$0]=reactExports.useState(!1),[T0,I0]=reactExports.useState(r0.lyrics||""),[M0,N0]=reactExports.useState(!1),[D0,O0]=reactExports.useState(""),[B0,z0]=reactExports.useState(""),[G0,F0]=reactExports.useState(!1),[Q0,U0]=reactExports.useState([]),[q0,Rw]=reactExports.useState(!1),_w=reactExports.useMemo(()=>r0.genres||(r0.genre?[r0.genre]:[]),[r0.genres,r0.genre]),J0=reactExports.useMemo(()=>o0.find(Pw=>Pw.id===r0.folderId),[o0,r0.folderId]),Cw=reactExports.useCallback(async()=>{if(!(!p0||!r0.id)){Rw(!0);try{const Pw=await p0(r0.id);U0(Pw)}finally{Rw(!1)}}},[p0,r0.id]);reactExports.useEffect(()=>{Cw()},[Cw]),reactExports.useEffect(()=>{v0(r0.name),j0(r0.writers||""),I0(r0.lyrics||""),E0(!1),k0(!1),$0(!1),O0("")},[r0.id,r0.name,r0.writers,r0.lyrics]);const Ow=reactExports.useCallback(Pw=>Pw<1024?`${Pw} B`:Pw<1024*1024?`${(Pw/1024).toFixed(1)} KB`:`${(Pw/(1024*1024)).toFixed(1)} MB`,[]),jw=reactExports.useCallback(()=>{w0.trim()&&w0!==r0.name&&n0(r0.id,{name:w0.trim()}),E0(!1)},[w0,r0.name,r0.id,n0]),Nw=reactExports.useCallback(()=>{if(R0!==r0.writers&&(n0(r0.id,{writers:R0}),c0&&R0)){const Pw=R0.split(",").map(Qw=>Qw.trim()).filter(Qw=>Qw.length>1);Pw.length>0&&c0(Pw)}k0(!1)},[R0,r0.writers,r0.id,n0,c0]),xw=reactExports.useCallback(()=>{T0!==(r0.lyrics||"")&&n0(r0.id,{lyrics:T0}),$0(!1)},[T0,r0.lyrics,r0.id,n0]),X0=reactExports.useCallback(()=>{var Qw;const Pw=D0.trim();if(Pw&&!((Qw=r0.keywords)!=null&&Qw.includes(Pw))){const Xw=[...r0.keywords||[],Pw];n0(r0.id,{keywords:Xw})}O0("")},[D0,r0.keywords,r0.id,n0]),Lw=reactExports.useCallback(Pw=>{const Qw=(r0.keywords||[]).filter(Xw=>Xw!==Pw);n0(r0.id,{keywords:Qw})},[r0.keywords,r0.id,n0]),Hw=reactExports.useCallback(()=>{const Pw=B0.trim();if(Pw&&!(r0.arKeywords||[]).includes(Pw)){const Qw=[...r0.arKeywords||[],Pw];n0(r0.id,{arKeywords:Qw})}z0("")},[B0,r0.arKeywords,r0.id,n0]),Ww=reactExports.useCallback(Pw=>{const Qw=(r0.arKeywords||[]).filter(Xw=>Xw!==Pw);n0(r0.id,{arKeywords:Qw})},[r0.arKeywords,r0.id,n0]),r1=reactExports.useCallback(async()=>
646{if(g0){F0(!0);try{const Pw=r0.dropboxUrl?await y0(r0.dropboxUrl):null,{data:Qw,error:Xw}=await supabase.functions.invoke("analyze-song",{body:{song_id:r0.id,owner_id:g0,dropbox_url:r0.dropboxUrl||null,song_name:r0.name,existing_bpm:r0.bpm,existing_key:r0.key,existing_scale:r0.scale,existing_genres:r0.genres||[],existing_vocalist_gender:r0.vocalistGender||"",existing_lyrics:r0.lyrics||null,lyrics:r0.lyrics||null,audio_quality:(Pw==null?void 0:Pw.audioQuality)||null,spectral_mood:(Pw==null?void 0:Pw.mood)||null,spectral_energy_descriptor:(Pw==null?void 0:Pw.energyDescriptor)||null}});if(Xw)throw Xw;ue$2.success("AI analysis complete"),Qw&&n0(r0.id,{})}catch(Pw){console.error("[AI Analysis]",Pw);let Qw="AI analysis failed â please try again";try{const Xw=Pw==null?void 0:Pw.context,f1=Xw?await Xw.clone().json():null;(f1==null?void 0:f1.code)==="AI_CREDITS_EXHAUSTED"&&(Qw=f1.error)}catch{}ue$2.error(Qw)}finally{F0(!1)}}},[r0,g0,n0,y0]),Yw=reactExports.useMemo(()=>({owner_only:"Only Uploader",tagged_writers:"Tagged Writers",all_writers:"All Writers"}),[]),l1=reactExports.useMemo(()=>({available:"bg-green-500/20 text-green-400",cut:"bg-purple-500/20 text-purple-400","on-hold":"bg-orange-500/20 text-orange-400"}),[]),p1=reactExports.useMemo(()=>({available:"Available",cut:"Cut / Sold","on-hold":"On Hold"}),[]);return jsxRuntimeExports.jsxs("aside",{className:"absolute inset-y-0 right-0 z-30 flex h-full w-[min(22rem,calc(100%-1rem))] max-w-full shrink-0 flex-col overflow-hidden border-l border-border bg-background shadow-2xl xl:relative xl:inset-auto xl:z-auto xl:w-80 xl:max-w-80 xl:bg-muted/30 xl:shadow-none","aria-label":"Song information",children:[jsxRuntimeExports.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[jsxRuntimeExports.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Song Info"}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-7 w-7 hover:bg-muted/40",onClick:e0,children:jsxRuntimeExports.jsx(X$2,{className:"w-4 h-4"})})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1 w-full",children:jsxRuntimeExports.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden p-4 sm:p-5",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center text-center pb-5",children:[jsxRuntimeExports.jsx("img",{src:songIcon,alt:"Song",className:"w-24 h-24 object-contain mb-4"}),b0&&!u0?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 w-full",children:[jsxRuntimeExports.jsx(Input,{value:w0,onChange:Pw=>v0(Pw.target.value),onKeyDown:Pw=>{Pw.key==="Enter"&&jw(),Pw.key==="Escape"&&(v0(r0.name),E0(!1))},className:"h-8 text-sm text-center bg-background/50 border-border/50",autoFocus:!0}),jsxRuntimeExports.jsx(Button,{size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0 hover:bg-muted/40",onClick:jw,children:jsxRuntimeExports.jsx(Check,{className:"w-4 h-4"})})]}):u0?jsxRuntimeExports.jsx("h3",{className:"font-semibold text-foreground truncate max-w-full text-base px-2 py-1",children:r0.name}):jsxRuntimeExports.jsxs("button",{onClick:()=>E0(!0),className:"group flex max-w-full min-w-0 items-center gap-1.5 rounded px-2 py-1 transition-colors duration-150 hover:bg-muted/40",children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-foreground truncate max-w-full text-base",children:r0.name}),jsxRuntimeExports.jsx(Pencil,{className:"w-3.5 h-3.5 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-full break-words px-2",children:r0.writers||jsxRuntimeExports.jsx("span",{className:"italic",children:"No writers"})}),jsxRuntimeExports.jsxs("div",{className:"mt-4 flex w-full flex-wrap items-center justify-center gap-2",children:[a0&&jsxRuntimeExports.jsxs(Button,{size:"sm",variant:"ghost",className:"gap-1.5 h-8 px-4 hover:bg-muted/40",onClick:()=>a0(r0),children:[jsxRuntimeExports.jsx(Play,{className:cn$1("w-4 h-4",s0&&i0&&"text-primary")}),jsxRuntimeExports.jsx("span",{className:"text-sm",children:s0&&i0?"Playing":"Play"})]}),r0.dropboxUrl&&jsxRuntimeExports.jsxs(Button,{size:"sm",variant:"ghost",className:"gap-1.5 h-8 px-4 hover:bg-muted/40",onClick:()=>{navigator.clipboard.writeText(r0.dropboxUrl),ue$2.success("Dropbox link copied!")},children:[jsxRuntimeExports.jsx(Link,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{className:"text-sm",children:"Copy Link"})]}),(x0==="admin"||x0==="songwriter")&&jsxRuntimeExports.jsxs(Button,{size:"sm",variant:"ghost",className:"gap-1.5 h-8 px-4 hover:bg-muted/40",onClick:r1,disabled:G0,children:[G0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4 animate-spin"}):jsxRuntimeExports.jsx(Sparkles,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{className:"text-sm",children:G0?"Analyzing...":"Analyze with AI"})]})]})]}),jsxRuntimeExports.jsx(Separator,{className:"border-border/50"}),jsxRuntimeExports.jsxs(Collapsible,{defaultOpen:!1,children:[jsxRuntimeExports.jsxs(CollapsibleTrigger,{className:"flex items-center gap-2 w-full py-2.5 hover:bg-muted/40 rounded px-1 transition-colors",children:[jsxRuntimeExports.jsx(Sparkles,{className:"w-4 h-4 text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground flex-1 text-left",children:"AI Insights"}),jsxRuntimeExports.jsx(ChevronDown,{className:"w-3.5 h-3.5 text-muted-foreground"})]}),jsxRuntimeExports.jsxs(CollapsibleContent,{className:"space-y-3 pb-2",children:[(!r0.aiAnalysisStatus||r0.aiAnalysisStatus==="pending")&&jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground italic px-1",children:"No AI analysis yet â click Analyze with AI to generate tags."}),r0.aiAnalysisStatus==="processing"&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 px-1",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3.5 h-3.5 animate-spin text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"Analyzing..."})]}),r0.aiAnalysisStatus==="completed"&&jsxRuntimeExports.jsxs("div",{className:"space-y-3 px-1",children:[r0.aiGeneratedDescription&&jsxRuntimeExports.jsx("p",{className:"text-xs italic text-muted-foreground leading-relaxed",children:r0.aiGeneratedDescription}),r0.aiReferenceArtists&&r0.aiReferenceArtists.length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Artist fit"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:r0.aiReferenceArtists.map((Pw,Qw)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:Pw},Qw))})]}),r0.aiPitchKeywords&&r0.aiPitchKeywords.length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Pitch keywords"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:r0.aiPitchKeywords.map((Pw,Qw)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:Pw},Qw))})]}),r0.aiPitchReadinessScore!=null&&jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-2 border-t border-border/50 pt-3",children:[jsxRuntimeExports.jsx("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:r0.aiPitchReadinessScore}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Pitch readiness"}),r0.aiPitchReadinessReasoning&&jsxRuntimeExports.jsx("p",{className:"text-xs leading-relaxed text-foreground
646/90",children:r0.aiPitchReadinessReasoning})]})]}),r0.aiMoodTags&&r0.aiMoodTags.length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Mood"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:r0.aiMoodTags.map((Pw,Qw)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:Pw},Qw))})]}),r0.aiInstrumentation&&r0.aiInstrumentation.length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Instrumentation"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:r0.aiInstrumentation.map((Pw,Qw)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:Pw},Qw))})]}),r0.aiEnergyLevel&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Energy"}),jsxRuntimeExports.jsx("div",{className:"mt-1",children:jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("text-xs border-0",{"bg-green-500/20 text-green-400":r0.aiEnergyLevel==="low","bg-yellow-500/20 text-yellow-400":r0.aiEnergyLevel==="mid","bg-orange-500/20 text-orange-400":r0.aiEnergyLevel==="high"}),children:r0.aiEnergyLevel.charAt(0).toUpperCase()+r0.aiEnergyLevel.slice(1)})})]}),r0.aiPitchedAt&&jsxRuntimeExports.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Last analyzed: ",format$4(r0.aiPitchedAt,"MMM d, yyyy")]})]}),r0.aiAnalysisStatus==="failed"&&jsxRuntimeExports.jsx("p",{className:"text-xs text-destructive italic px-1",children:'Analysis failed â try again with "Analyze with AI".'})]})]}),jsxRuntimeExports.jsx(Separator,{className:"border-border/50"}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Tag,{className:"w-4 h-4"}),label:"Status",children:u0?jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("text-xs border-0",l1[r0.status]),children:p1[r0.status]}):jsxRuntimeExports.jsxs(Select,{value:r0.status,onValueChange:Pw=>n0(r0.id,{status:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-fit border-0 bg-transparent p-0 hover:bg-transparent focus:ring-0",children:jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("text-xs border-0",l1[r0.status]),children:p1[r0.status]})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-popover",children:[jsxRuntimeExports.jsx(SelectItem,{value:"available",children:"Available"}),jsxRuntimeExports.jsx(SelectItem,{value:"cut",children:"Cut / Sold"}),jsxRuntimeExports.jsx(SelectItem,{value:"on-hold",children:"On Hold"})]})]})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Hash$2,{className:"w-4 h-4"}),label:"Keywords",children:(()=>{const Pw=r0.keywords||[];return u0?jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 max-w-full",children:Pw.length>0?Pw.map((Qw,Xw)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs max-w-full truncate",children:Qw},Xw)):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs",children:"No keywords"})}):jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 max-w-full",children:Pw.length>0?Pw.map((Qw,Xw)=>jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"text-xs max-w-full truncate pr-1 group/chip",children:[Qw,jsxRuntimeExports.jsx("button",{onClick:f1=>{f1.stopPropagation(),Lw(Qw)},className:"ml-1 hover:text-destructive transition-colors",children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},Xw)):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs",children:"No keywords"})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(Input,{value:D0,onChange:Qw=>O0(Qw.target.value),placeholder:"Add keyword...",className:"h-7 text-xs bg-background/50 border-border/50 flex-1",onKeyDown:Qw=>{Qw.key==="Enter"&&(Qw.preventDefault(),X0())}}),jsxRuntimeExports.jsx(Button,{size:"icon",variant:"ghost",className:"h-7 w-7 shrink-0 hover:bg-muted/40",onClick:X0,disabled:!D0.trim(),children:jsxRuntimeExports.jsx(Check,{className:"w-3.5 h-3.5"})})]})]})})()}),(r0.arKeywords&&r0.arKeywords.length>0||x0==="a_and_r")&&jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Hash$2,{className:"w-4 h-4"}),label:"A&R Keywords",children:(()=>{const Pw=r0.arKeywords||[];return x0==="a_and_r"?jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 max-w-full",children:Pw.length>0?Pw.map((Xw,f1)=>jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs max-w-full truncate pr-1 group/chip bg-purple-500/10 text-purple-400 border-purple-500/30",children:[Xw,jsxRuntimeExports.jsx("button",{onClick:u1=>{u1.stopPropagation(),Ww(Xw)},className:"ml-1 hover:text-destructive transition-colors",children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},f1)):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs",children:"No A&R keywords"})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(Input,{value:B0,onChange:Xw=>z0(Xw.target.value),placeholder:"Add A&R keyword...",className:"h-7 text-xs bg-background/50 border-purple-500/30 flex-1",onKeyDown:Xw=>{Xw.key==="Enter"&&(Xw.preventDefault(),Hw())}}),jsxRuntimeExports.jsx(Button,{size:"icon",variant:"ghost",className:"h-7 w-7 shrink-0 hover:bg-muted/40",onClick:Hw,disabled:!B0.trim(),children:jsxRuntimeExports.jsx(Check,{className:"w-3.5 h-3.5"})})]})]}):jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 max-w-full",children:Pw.map((Xw,f1)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs max-w-full truncate bg-purple-500/10 text-purple-400 border-purple-500/30",children:Xw},f1))})})()}),(x0==="songwriter"||x0==="a_and_r"||x0==="admin")&&m0&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between px-1 py-1",children:[jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"Include A&R keywords in search"}),jsxRuntimeExports.jsx(Switch,{checked:A0??!1,onCheckedChange:m0,className:"scale-75"})]}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(User,{className:"w-4 h-4"}),label:"Writers",children:(()=>{const Pw=(r0.writers||"").split(",").map(Xw=>Xw.trim()).filter(Xw=>Xw.length>0),Qw=Xw=>{const f1=Pw.filter(u1=>u1!==Xw);n0(r0.id,{writers:f1.join(", ")})};return u0?Pw.length===0?jsxRuntimeExports.jsx("span",{className:"text-sm text-muted-foreground italic",children:"No writers"}):jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5",children:Pw.map((Xw,f1)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs bg-muted/50 text-muted-foreground border-border",children:Xw},`${Xw}-${f1}`))}):S0?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(WriterAutocomplete,{value:R0,onChange:j0,allWriters:l0,placeholder:"Enter writers...",className:"h-7 text-sm bg-background/50 border-border/50"}),jsxRuntimeExports.jsx(Button,{size:"icon",variant:"ghost",className:"h-7 w-7 shrink-0 hover:bg-muted/40",onClick:Nw,children:jsxRuntimeExports.jsx(Check,{className:"w-3.5 h-3.5"})})]}):jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[Pw.map((Xw,f1)=>jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs bg-muted/50 text-muted-foreground border-border pr-1 group/chip",children:[Xw,jsxRuntimeExports.jsx("button",{onClick:u1=>{u1.stopPropagation(),Qw(Xw)},className:"ml-1 hover:text-destructive transition-colors",children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},`${Xw}-${f1}`)),jsxRuntimeExports.jsx("button",{onClick:()=>k0(!0),className:"text-xs text-muted-foreground hover:text-foreground hover:bg-muted/40 px-1.5 py-0.5 rounded transition-colors",children:Pw.length===0?"Add writers...":"+"})]})})()}),r0.publisher&&jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(FileText,{className:"w-4 h-4"}),label:"Publisher",children:jsxRuntimeExports.jsx("span",{className:"text-sm",children:r0.publisher})}),jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsxs("div",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-2 px-0.5 flex items-center justify-between",children:[jsxRuntimeExports.jsx("span",{children:"Lyrics"}),!u0&&!C0&&jsxRuntimeExports.jsx("button",{onClick:()=>$0(!0),className:"text-muted-foreground hover:text-foreground transition-colors",children:jsxRuntimeExports.jsx(Pencil,{className:"w-3.5 h-3.5"})})]}),C0&&!u0?jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Textarea,{value:T0,onChange:Pw=>I0(Pw.target.value),placeholder:"Enter lyrics here...",className:"min-h-[200px] text-sm bg-background/50 border-border/50 resize-none",autoFocus:!0}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsxs(Button,{size:"sm",variant:"ghost",className:"h-7 px-3 text-xs hover:bg-muted/40",onClick:xw,children:[jsxRuntimeExports.jsx(Check,{className:"w-3.5 h-3.5 mr-1"}),"Save"]}),jsxRuntimeExports.jsx(Button,{size:"sm",variant:"ghost",className:"h-7 px-3 text-xs hover:bg-muted/40",onClick:()=>{I0(r0.lyrics||""),$0(!1)},children:"Cancel"})]})]}):jsxRuntimeExports.jsx("div",{className:"relative",children:r0.lyrics?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cn$1("text-sm text-muted-foreground whitespace-pre-wrap overflow-hidden transition-all duration-200",M0?"max-h-none":"max-h-[100px]"),children:r0.lyrics}),r0.lyrics.length>200&&jsxRuntimeExports.jsx("button",{onClick:()=>N0(!M0),className:"flex items-center gap-1 text-xs text-primary hover:text-primary/80 mt-1.5 transition-colors",children:M0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ChevronUp,{className:"w-3 h-3"}),"Show less"]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3"}),"Show more"]})})]}):jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground
646/50 italic",children:"No lyrics added"})}),jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Folder,{className:"w-4 h-4"}),label:"Folder",children:u0?jsxRuntimeExports.jsx("span",{className:"text-sm",children:J0?jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:J0.color}}),J0.name]}):"No folder"}):jsxRuntimeExports.jsxs(Select,{value:r0.folderId||"none",onValueChange:Pw=>n0(r0.id,{folderId:Pw==="none"?void 0:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-full max-w-[180px] text-sm bg-background/50 border-border/50",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"No folder"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-popover max-w-[200px]",align:"start",children:[jsxRuntimeExports.jsx(SelectItem,{value:"none",children:"No folder"}),o0.map(Pw=>jsxRuntimeExports.jsx(SelectItem,{value:Pw.id,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:Pw.color}}),jsxRuntimeExports.jsx("span",{className:"truncate",children:Pw.name})]})},Pw.id))]})]})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Gauge,{className:"w-4 h-4"}),label:"BPM",children:u0?jsxRuntimeExports.jsx("span",{className:"text-sm",children:r0.bpm}):jsxRuntimeExports.jsx(Input,{type:"number",value:r0.bpm,onChange:Pw=>n0(r0.id,{bpm:parseInt(Pw.target.value)||0}),className:"h-7 w-20 text-sm bg-background/50 border-border/50"})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Piano,{className:"w-4 h-4"}),label:"Key / Scale",children:u0?jsxRuntimeExports.jsxs("span",{className:"text-sm",children:[r0.key," ",r0.scale]}):jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsxs(Select,{value:r0.key,onValueChange:Pw=>n0(r0.id,{key:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-16 text-sm bg-background/50 border-border/50",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-popover",children:KEYS.map(Pw=>jsxRuntimeExports.jsx(SelectItem,{value:Pw,children:Pw},Pw))})]}),jsxRuntimeExports.jsxs(Select,{value:r0.scale,onValueChange:Pw=>n0(r0.id,{scale:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-20 text-sm bg-background/50 border-border/50",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-popover",children:SCALES.map(Pw=>jsxRuntimeExports.jsx(SelectItem,{value:Pw,children:Pw},Pw))})]})]})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(MicVocal,{className:"w-4 h-4"}),label:"Vocalist",children:u0?jsxRuntimeExports.jsx("span",{className:"text-sm",children:r0.vocalistGender}):jsxRuntimeExports.jsxs(Select,{value:r0.vocalistGender,onValueChange:Pw=>n0(r0.id,{vocalistGender:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-28 text-sm bg-background/50 border-border/50",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-popover",children:VOCALIST_OPTIONS.map(Pw=>jsxRuntimeExports.jsx(SelectItem,{value:Pw,children:Pw},Pw))})]})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Tag,{className:"w-4 h-4"}),label:"Genres",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1.5 max-w-full",children:_w.length>0?_w.map((Pw,Qw)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs border-border/50 bg-muted/30 max-w-full truncate",children:Pw},Qw)):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs",children:"No genres"})})}),jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Shield,{className:"w-4 h-4"}),label:"Edit Permission",children:u0?jsxRuntimeExports.jsx("span",{className:"text-sm",children:Yw[r0.editPermission]}):jsxRuntimeExports.jsxs(Select,{value:r0.editPermission,onValueChange:Pw=>n0(r0.id,{editPermission:Pw}),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"h-7 w-full max-w-[160px] text-sm bg-background/50 border-border/50",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-popover",children:[jsxRuntimeExports.jsx(SelectItem,{value:"owner_only",children:"Only Uploader"}),jsxRuntimeExports.jsx(SelectItem,{value:"tagged_writers",children:"Tagged Writers"}),jsxRuntimeExports.jsx(SelectItem,{value:"all_writers",children:"All Writers"})]})]})}),h0&&f0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsx(SongwriterTagging,{songId:r0.id,songwriters:d0,taggedSongwriters:Q0,onTagSongwriter
646:h0,onUntagSongwriter:f0,onRefreshTagged:Cw,isLoading:q0})]}),!u0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsx(SongEditHistory,{songId:r0.id})]}),jsxRuntimeExports.jsx(Separator,{className:"my-3 border-border/50"}),jsxRuntimeExports.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-2 px-0.5",children:"File Information"}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(FileAudio,{className:"w-4 h-4"}),label:"Source",children:r0.source==="dropbox"&&r0.dropboxUrl?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 max-w-full",children:[jsxRuntimeExports.jsx("a",{href:r0.dropboxUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline truncate text-sm",children:"Dropbox"}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:()=>{navigator.clipboard.writeText(r0.dropboxUrl||""),ue$2.success("Link copied")},children:jsxRuntimeExports.jsx(Copy,{className:"w-3 h-3"})})]}):jsxRuntimeExports.jsx("span",{className:"capitalize truncate block max-w-full",children:r0.source})}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(HardDrive,{className:"w-4 h-4"}),label:"Size",children:Ow(r0.fileSize)}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"Date Added",children:format$4(new Date(r0.uploadedAt),"MMM d, yyyy")}),jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"Year",children:formatSongYear(getSongYear(r0))}),r0.originalDate&&jsxRuntimeExports.jsx(DetailRow$1,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"File Created",children:format$4(new Date(r0.originalDate),"MMM d, yyyy")})]})}),jsxRuntimeExports.jsx("div",{className:"flex h-8 shrink-0 items-center justify-center border-t border-border/50",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:r0.source==="file"?"Local file":"Dropbox"})})]})}
646function BulkEditDialog({open:r0,onOpenChange:e0,selectedCount:n0,onApply:a0,folders:i0,allWriters:s0,songwriters:o0=[],selectedSongIds:l0=[],onBulkTagSongwriter:c0}){const[u0,d0]=reactExports.useState({writers:{enabled:!1,value:""},bpm:{enabled:!1,value:120},key:{enabled:!1,value:"C"},scale:{enabled:!1,value:"Major"},vocalistGender:{enabled:!1,value:"Male"},genres:{enabled:!1,value:[]},keywords:{enabled:!1,value:[]},status:{enabled:!1,value:"available"},folderId:{enabled:!1,value:void 0},sharedWith:{enabled:!1,value:[]}}),[h0,f0]=reactExports.useState(""),[p0,A0]=reactExports.useState(""),[m0,x0]=reactExports.useState(!1),g0=C0=>{d0($0=>({...$0,[C0]:{...$0[C0],enabled:!$0[C0].enabled}}))},y0=(C0,$0)=>{d0(T0=>({...T0,[C0]:{...T0[C0],value:$0}}))},b0=C0=>{const $0=u0.genres.value,T0=$0.includes(C0)?$0.filter(I0=>I0!==C0):[...$0,C0];y0("genres",T0)},E0=()=>{const C0=h0.trim(),$0=u0.genres.value;C0&&!$0.includes(C0)&&(y0("genres",[...$0,C0]),f0(""))},w0=()=>{const C0=p0.trim(),$0=u0.keywords.value;C0&&!$0.includes(C0)&&(y0("keywords",[...$0,C0]),A0(""))},v0=C0=>{const $0=u0.keywords.value;y0("keywords",$0.filter(T0=>T0!==C0))},S0=C0=>{const $0=u0.sharedWith.value,T0=$0.includes(C0)?$0.filter(I0=>I0!==C0):[...$0,C0];y0("sharedWith",T0)},k0=async()=>{x0(!0);try{const C0={},$0=[];if(Object.entries(u0).forEach(([T0,I0])=>{I0.enabled&&T0!=="sharedWith"&&(C0[T0]=I0.value,$0.push(T0))}),$0.length>0&&a0(C0,$0),u0.sharedWith.enabled&&c0&&l0.length>0){const T0=u0.sharedWith.value;for(const I0 of T0)await c0(l0,I0)}}finally{x0(!1),e0(!1)}},R0=Object.entries(u0).filter(([C0,$0])=>C0==="sharedWith"?$0.enabled&&$0.value.length>0:$0.enabled).length,j0=()=>{d0({writers:{enabled:!1,value:""},bpm:{enabled:!1,value:120},key:{enabled:!1,value:"C"},scale:{enabled:!1,value:"Major"},vocalistGender:{enabled:!1,value:"Male"},genres:{enabled:!1,value:[]},keywords:{enabled:!1,value:[]},status:{enabled:!1,value:"available"},folderId:{enabled:!1,value:void 0},sharedWith:{enabled:!1,value:[]}}),f0(""),A0("")};return jsxRuntimeExports.jsx(Dialog,{open:r0,onOpenChange:C0=>{C0||j0(),e0(C0)},children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[520px] bg-card border-border max-h-[85vh] overflow-y-auto",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsxs(DialogTitle,{children:["Edit ",n0," Songs"]}),jsxRuntimeExports.jsx(DialogDescription,{children:"Select fields to update. Only checked fields will be applied to all selected songs."})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-4 py-4",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-writers",checked:u0.writers.enabled,onCheckedChange:()=>g0("writers")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-writers",className:"cursor-pointer",children:"Writers"})]}),u0.writers.enabled&&jsxRuntimeExports.jsx(WriterAutocomplete,{value:u0.writers.value,onChange:C0=>y0("writers",C0),allWriters:s0,placeholder:"Set writers...",className:"bg-background"})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-bpm",checked:u0.bpm.enabled,onCheckedChange:()=>g0("bpm")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-bpm",className:"cursor-pointer",children:"BPM"})]}),u0.bpm.enabled&&jsxRuntimeExports.jsx(Input,{type:"number",min:1,max:300,value:u0.bpm.value,onChange:C0=>y0("bpm",parseInt(C0.target.value)||120),className:"bg-background"})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-key",checked:u0.key.enabled,onCheckedChange:()=>g0("key")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-key",className:"cursor-pointer",children:"Key"})]}),u0.key.enabled&&jsxRuntimeExports.jsxs(Select,{value:u0.key.value,onValueChange:C0=>y0("key",C0),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:KEYS.map(C0=>jsxRuntimeExports.jsx(SelectItem,{value:C0,children:C0},C0))})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-scale",checked:u0.scale.enabled,onCheckedChange:()=>g0("scale")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-scale",className:"cursor-pointer",children:"Scale"})]}),u0.scale.enabled&&jsxRuntimeExports.jsxs(Select,{value:u0.scale.value,onValueChange:C0=>y0("scale",C0),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:SCALES.map(C0=>jsxRuntimeExports.jsx(SelectItem,{value:C0,children:C0},C0))})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-vocalist",checked:u0.vocalistGender.enabled,onCheckedChange:()=>g0("vocalistGender")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-vocalist",className:"cursor-pointer",children:"Vocalist"})]}),u0.vocalistGender.enabled&&jsxRuntimeExports.jsxs(Select,{value:u0.vocalistGender.value,onValueChange:C0=>y0("vocalistGender",C0),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-card border-border",children:VOCALIST_OPTIONS.map(C0=>jsxRuntimeExports.jsx(SelectItem,{value:C0,children:C0},C0))})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-status",checked:u0.status.enabled,onCheckedChange:()=>g0("status")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-status",className:"cursor-pointer",children:"Status"})]}),u0.status.enabled&&jsxRuntimeExports.jsxs(Select,{value:u0.status.value,onValueChange:C0=>y0("status",C0),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(SelectItem,{value:"available",children:"Available"}),jsxRuntimeExports.jsx(SelectItem,{value:"cut",children:"Cut / Sold"}),jsxRuntimeExports.jsx(SelectItem,{value:"on-hold",children:"On Hold"})]})]})]})]}),i0.length>0&&jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-folder",checked:u0.folderId.enabled,onCheckedChange:()=>g0("folderId")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-folder",className:"cursor-pointer",children:"Folder"})]}),u0.folderId.enabled&&jsxRuntimeExports.jsxs(Select,{value:u0.folderId.value||"none",onValueChange:C0=>y0("folderId",C0==="none"?void 0:C0),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"bg-background",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"No folder"})}),jsxRuntimeExports.jsxs(SelectContent,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(SelectItem,{value:"none",children:"No folder"}),i0.map(C0=>jsxRuntimeExports.jsx(SelectItem,{value:C0.id,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:C0.color}}),C0.name]})},C0.id))]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-genres",checked:u0.genres.enabled,onCheckedChange:()=>g0("genres")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-genres",className:"cursor-pointer",children:"Genres"}),u0.genres.enabled&&jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(replaces existing genres)"})]}),u0.genres.enabled&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1.5 p-2 bg-background rounded-md border border-border min-h-[60
646px]",children:[GENRES.map(C0=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("cursor-pointer transition-colors",u0.genres.value.includes(C0)?"bg-primary text-primary-foreground border-primary":"hover:bg-muted"),onClick:()=>b0(C0),children:C0},C0)),u0.genres.value.filter(C0=>!GENRES.includes(C0)).map(C0=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"cursor-pointer transition-colors bg-primary text-primary-foreground border-primary",onClick:()=>b0(C0),children:C0},C0))]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Input,{value:h0,onChange:C0=>f0(C0.target.value),placeholder:"Add custom genre...",className:"bg-background h-8 text-sm",onKeyDown:C0=>{C0.key==="Enter"&&(C0.preventDefault(),E0())}}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",size:"sm",onClick:E0,disabled:!h0.trim(),children:"Add"})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-keywords",checked:u0.keywords.enabled,onCheckedChange:()=>g0("keywords")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-keywords",className:"cursor-pointer",children:"Keywords"}),u0.keywords.enabled&&jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(adds to existing keywords)"})]}),u0.keywords.enabled&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1.5 p-2 bg-background rounded-md border border-border min-h-[40px]",children:[u0.keywords.value.map(C0=>jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"cursor-pointer hover:bg-destructive hover:text-destructive-foreground transition-colors",onClick:()=>v0(C0),children:[C0," Ã"]},C0)),u0.keywords.value.length===0&&jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"No keywords added yet"})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Input,{value:p0,onChange:C0=>A0(C0.target.value),placeholder:"Add keyword...",className:"bg-background h-8 text-sm",onKeyDown:C0=>{C0.key==="Enter"&&(C0.preventDefault(),w0())}}),jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",size:"sm",onClick:w0,disabled:!p0.trim(),children:"Add"})]})]})]}),o0.length>0&&c0&&jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Checkbox,{id:"toggle-sharedWith",checked:u0.sharedWith.enabled,onCheckedChange:()=>g0("sharedWith")}),jsxRuntimeExports.jsx(Label$2,{htmlFor:"toggle-sharedWith",className:"cursor-pointer",children:"Shared With"}),u0.sharedWith.enabled&&jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(adds to existing shares)"})]}),u0.sharedWith.enabled&&jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(ScrollArea,{className:"h-[120px] p-2 bg-background rounded-md border border-border",children:jsxRuntimeExports.jsx("div",{className:"space-y-1",children:o0.filter(C0=>C0.is_active).map(C0=>jsxRuntimeExports.jsxs("div",{className:cn$1("flex items-center gap-2 p-2 rounded cursor-pointer transition-colors",u0.sharedWith.value.includes(C0.id)?"bg-primary/10 text-primary":"hover:bg-muted"),onClick:()=>S0(C0.id),children:[jsxRuntimeExports.jsx(Checkbox,{checked:u0.sharedWith.value.includes(C0.id),onCheckedChange:()=>S0(C0.id)}),jsxRuntimeExports.jsx("span",{className:"text-sm",children:C0.display_name}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:C0.email})]},C0.id))})}),u0.sharedWith.value.length>0&&jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground",children:[u0.sharedWith.value.length," songwriter(s) will be shared with all ",n0," songs"]})]})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{className:"flex items-center justify-between sm:justify-between",children:[jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground",children:[R0," field",R0!==1?"s":""," selected"]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>e0(!1),disabled:m0,children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:k0,disabled:R0===0||m0,children:m0?"Applying...":`Apply to ${n0} Songs`})]})]})]})})}var PAGE_KEYS=["PageUp","PageDown"],ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],BACK_KEYS={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},SLIDER_NAME="Slider",[Collection,useCollection,createCollectionScope]=createCollection(SLIDER_NAME),[createSliderContext,createSliderScope]=createContextScope(SLIDER_NAME,[createCollectionScope]),[SliderProvider,useSliderContext]=createSliderContext(SLIDER_NAME),Slider$1=reactExports.forwardRef((r0,e0)=>{const{name:n0,min:a0=0,max:i0=100,step:s0=1,orientation:o0="horizontal",disabled:l0=!1,minStepsBetweenThumbs:c0=0,defaultValue:u0=[a0],value:d0,onValueChange:h0=()=>{},onValueCommit:f0=()=>{},inverted:p0=!1,form:A0,...m0}=r0,x0=reactExports.useRef(new Set),g0=reactExports.useRef(0),b0=o0==="horizontal"?SliderHorizontal:SliderVertical,[E0=[],w0
646]=useControllableState$1({prop:d0,defaultProp:u0,onChange:C0=>{var T0;(T0=[...x0.current][g0.current])==null||T0.focus(),h0(C0)}}),v0=reactExports.useRef(E0);function S0(C0){const $0=getClosestValueIndex(E0,C0);j0(C0,$0)}function k0(C0){j0(C0,g0.current)}function R0(){const C0=v0.current[g0.current];E0[g0.current]!==C0&&f0(E0)}function j0(C0,$0,{commit:T0}={commit:!1}){const I0=getDecimalCount(s0),M0=roundValue(Math.round((C0-a0)/s0)*s0+a0,I0),N0=clamp(M0,[a0,i0]);w0((D0=[])=>{const O0=getNextSortedValues(D0,N0,$0);if(hasMinStepsBetweenValues(O0,c0*s0)){g0.current=O0.indexOf(N0);const B0=String(O0)!==String(D0);return B0&&T0&&f0(O0),B0?O0:D0}else return D0})}return jsxRuntimeExports.jsx(SliderProvider,{scope:r0.__scopeSlider,name:n0,disabled:l0,min:a0,max:i0,valueIndexToChangeRef:g0,thumbs:x0.current,values:E0,orientation:o0,form:A0,children:jsxRuntimeExports.jsx(Collection.Provider,{scope:r0.__scopeSlider,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:r0.__scopeSlider,children:jsxRuntimeExports.jsx(b0,{"aria-disabled":l0,"data-disabled":l0?"":void 0,...m0,ref:e0,onPointerDown:composeEventHandlers(m0.onPointerDown,()=>{l0||(v0.current=E0)}),min:a0,max:i0,inverted:p0,onSlideStart:l0?void 0:S0,onSlideMove:l0?void 0:k0,onSlideEnd:l0?void 0:R0,onHomeKeyDown:()=>!l0&&j0(a0,0,{commit:!0}),onEndKeyDown:()=>!l0&&j0(i0,E0.length-1,{commit:!0}),onStepKeyDown:({event:C0,direction:$0})=>{if(!l0){const M0=PAGE_KEYS.includes(C0.key)||C0.shiftKey&&ARROW_KEYS.includes(C0.key)?10:1,N0=g0.current,D0=E0[N0],O0=s0*M0*$0;j0(D0+O0,N0,{commit:!0})}}})})})})});Slider$1.displayName=SLIDER_NAME;var[SliderOrientationProvider,useSliderOrientationContext]=createSliderContext(SLIDER_NAME,{startEdge:"left",endEdge:"right",size:"width",direction:1}),SliderHorizontal=reactExports.forwardRef((r0,e0)=>{const{min:n0,max:a0,dir:i0,inverted:s0,onSlideStart:o0,onSlideMove:l0,onSlideEnd:c0,onStepKeyDown:u0,...d0}=r0,[h0,f0]=reactExports.useState(null),p0=useComposedRefs$1(e0,b0=>f0(b0)),A0=reactExports.useRef(void 0),m0=useDirection(i0),x0=m0==="ltr",g0=x0&&!s0||!x0&&s0;function y0(b0){const E0=A0.current||h0.getBoundingClientRect(),w0=[0,E0.width],S0=linearScale(w0,g0?[n0,a0]:[a0,n0]);return A0.current=E0,S0(b0-E0.left)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:r0.__scopeSlider,startEdge:g0?"left":"right",endEdge:g0?"right":"left",direction:g0?1:-1,size:"width",children:jsxRuntimeExports.jsx(SliderImpl,{dir:m0,"data-orientation":"horizontal",...d0,ref:p0,style:{...d0.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b0=>{const E0=y0(b0.clientX);o0==null||o0(E0)},onSlideMove:b0=>{const E0=y0(b0.clientX);l0==null||l0(E0)},onSlideEnd:()=>{A0.current=void 0,c0==null||c0()},onStepKeyDown:b0=>{const w0=BACK_KEYS[g0?"from-left":"from-right"].includes(b0.key);u0==null||u0({event:b0,direction:w0?-1:1})}})})}),SliderVertical=reactExports.forwardRef((r0,e0)=>{const{min:n0,max:a0,inverted:i0,onSlideStart:s0,onSlideMove:o0,onSlideEnd:l0,onStepKeyDown:c0,...u0}=r0,d0=reactExports.useRef(null),h0=useComposedRefs$1(e0,d0),f0=reactExports.useRef(void 0),p0=!i0;function A0(m0){const x0=f0.current||d0.current.getBoundingClientRect(),g0=[0,x0.height],b0=linearScale(g0,p0?[a0,n0]:[n0,a0]);return f0.current=x0,b0(m0-x0.top)}return jsxRuntimeExports.jsx(SliderOrientationProvider,{scope:r0.__scopeSlider,startEdge:p0?"bottom":"top",endEdge:p0?"top":"bottom",size:"height",direction:p0?1:-1,children:jsxRuntimeExports.jsx(SliderImpl,{"data-orientation":"vertical",...u0,ref:h0,style:{...u0.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m0=>{const x0=A0(m0.clientY);s0==null||s0(x0)},onSlideMove:m0=>{const x0=A0(m0.clientY);o0==null||o0(x0)},onSlideEnd:()=>{f0.current=void 0,l0==null||l0()},onStepKeyDown:m0=>{const g0=BACK_KEYS[p0?"from-bottom":"from-top"].includes(m0.key);c0==null||c0({event:m0,direction:g0?-1:1})}})})}),SliderImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeSlider:n0,onSlideStart:a0,onSlideMove:i0,onSlideEnd:s0,onHomeKeyDown:o0,onEndKeyDown:l0,onStepKeyDown:c0,...u0}=r0,d0=useSliderContext(SLIDER_NAME,n0);return jsxRuntimeExports.jsx(Primitive.span,{...u0,ref:e0,onKeyDown:composeEventHandlers(r0.onKeyDown,h0=>{h0.key==="Home"?(o0(h0),h0.preventDefault()):h0.key==="End"?(l0(h0),h0.preventDefault()):PAGE_
vendor: 2,020 bytes, line 646
646KEYS.concat(ARROW_KEYS).includes(h0.key)&&(c0(h0),h0.preventDefault())}),onPointerDown:composeEventHandlers(r0.onPointerDown,h0=>{const f0=h0.target;f0.setPointerCapture(h0.pointerId),h0.preventDefault(),d0.thumbs.has(f0)?f0.focus():a0(h0)}),onPointerMove:composeEventHandlers(r0.onPointerMove,h0=>{h0.target.hasPointerCapture(h0.pointerId)&&i0(h0)}),onPointerUp:composeEventHandlers(r0.onPointerUp,h0=>{const f0=h0.target;f0.hasPointerCapture(h0.pointerId)&&(f0.releasePointerCapture(h0.pointerId),s0(h0))})})}),TRACK_NAME="SliderTrack",SliderTrack=reactExports.forwardRef((r0,e0)=>{const{__scopeSlider:n0,...a0}=r0,i0=useSliderContext(TRACK_NAME,n0);return jsxRuntimeExports.jsx(Primitive.span,{"data-disabled":i0.disabled?"":void 0,"data-orientation":i0.orientation,...a0,ref:e0})});SliderTrack.displayName=TRACK_NAME;var RANGE_NAME="SliderRange",SliderRange=reactExports.forwardRef((r0,e0)=>{const{__scopeSlider:n0,...a0}=r0,i0=useSliderContext(RANGE_NAME,n0),s0=useSliderOrientationContext(RANGE_NAME,n0),o0=reactExports.useRef(null),l0=useComposedRefs$1(e0,o0),c0=i0.values.length,u0=i0.values.map(f0=>convertValueToPercentage(f0,i0.min,i0.max)),d0=c0>1?Math.min(...u0):0,h0=100-Math.max(...u0);return jsxRuntimeExports.jsx(Primitive.span,{"data-orientation":i0.orientation,"data-disabled":i0.disabled?"":void 0,...a0,ref:l0,style:{...r0.style,[s0.startEdge]:d0+"%",[s0.endEdge]:h0+"%"}})});SliderRange.displayName=RANGE_NAME;var THUMB_NAME="SliderThumb",SliderThumb=reactExports.forwardRef((r0,e0)=>{const n0=useCollection(r0.__scopeSlider),[a0,i0]=reactExports.useState(null),s0=useComposedRefs$1(e0,l0=>i0(l0)),o0=reactExports.useMemo(()=>a0?n0().findIndex(l0=>l0.ref.current===a0):-1,[n0,a0]);return jsxRuntimeExports.jsx(SliderThumbImpl,{...r0,ref:s0,index:o0})}),SliderThumbImpl=reactExports.forwardRef((r0,e0)=>{const{__scopeSlider:n0,index:a0,name:i0,...s0}=r0,o0=useSliderContext(THUMB_NAME,n0),l0=useSliderOrientationContext(THUMB_NAME,n0),[c0,u0]=reactExports.useState(null),d0=useComposedRefs$1(e0,y0=>
646u0(y0)),h0=c0?o0.form||!!c0.closest("form"):!0,f0=useSize(c0),p0=o0.values[a0],A0=p0===void 0?0:convertValueToPercentage(p0,o0.min,o0.max),m0=getLabel$1(a0,o0.values.length),x0=f0==null?void 0:f0[l0.size],g0=x0?getThumbInBoundsOffset(x0,A0,l0.direction):0;return reactExports.useEffect(()=>{if(c0)return o0.thumbs.add(c0),()=>{o0.thumbs.delete(c0)}},[c0,o0.thumbs]),jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l0.startEdge]:`calc(${A0}% + ${g0}px)`},children:[jsxRuntimeExports.jsx(Collection.ItemSlot,{scope:r0.__scopeSlider,children:jsxRuntimeExports.jsx(Primitive.span,{role:"slider","aria-label":r0["aria-label"]||m0,"aria-valuemin":o0.min,"aria-valuenow":p0,"aria-valuemax":o0.max,"aria-orientation":o0.orientation,"data-orientation":o0.orientation,"data-disabled":o0.disabled?"":void 0,tabIndex:o0.disabled?void 0:0,...s0,ref:d0,style:p0===void 0?{display:"none"}:r0.style,onFocus:composeEventHandlers(r0.onFocus,()=>{o0.valueIndexToChangeRef.current=a0})})}),h0&&jsxRuntimeExports.jsx(SliderBubbleInput,{name:i0??(o0.name?o0.name+(o0.values.length>1?"[]":""):void 0),form:o0.form,value:p0},a0)]})});SliderThumb.displayName=THUMB_NAME;var BUBBLE_INPUT_NAME="RadioBubbleInput",SliderBubbleInput=reactExports.forwardRef(({__scopeSlider:r0,value:e0,...n0},a0)=>{const i0=reactExports.useRef(null),s0=useComposedRefs$1(i0,a0),o0=usePrevious(e0);return reactExports.useEffect(()=>{const l0=i0.current;if(!l0)return;const c0=window.HTMLInputElement.prototype,d0=Object.getOwnPropertyDescriptor(c0,"value").set;if(o0!==e0&&d0){const h0=new Event("input",{bubbles:!0});d0.call(l0,e0),l0.dispatchEvent(h0)}},[o0,e0]),jsxRuntimeExports.jsx(Primitive.input,{style:{display:"none"},...n0,ref:s0,defaultValue:e0})});SliderBubbleInput.displayName=BUBBLE_INPUT_NAME;function getNextSortedValues(r0=[],e0,n0){const a0=[...r0];return a0[n0]=e0,a0.sort((i0,s0)=>i0-s0)}function convertValueToPercentage(r0,e0,n0){const s0=100/(n0-e0)*(r0-e0);return clamp(s0,[0,100])}function getLabel$1(r0,e0){return e0>2?`Value ${r0+1} of ${e0}`:e0===2?["Minimum","Maximum"][r0]:void 0}function getClosestValueIndex(r0,e0){if(r0.length===1)return 0;const n0=r0.map(i0=>Math.abs(i0-e0)),a0=Math.min(...n0);return n0.indexOf(a0)}function getThumbInBoundsOffset(r0,e0,n0){const a0=r0/2,s0=linearScale([0,50],[0,a0]);return(a0-s0(e0)*n0)*n0}function getStepsBetweenValues(r0){return r0.slice(0,-1).map((e0,n0)=>r0[n0+1]-e0)}function hasMinStepsBetweenValues(r0,e0){if(e0>0){const n0=getStepsBetweenValues(r0);return Math.min(...n0)>=e0}return!0}function linearScale(r0,e0){return n0=>{if(r0[0]===r0[1]||e0[0]===e0[1])return e0[0];const a0=(e0[1]-e0[0])/(r0[1]-r0[0]);return e0[0]+a0*(n0-r0[0])}}function getDecimalCount(r0){return(String(r0).split(".")[1]||"").length}function roundValue(r0,e0){const n0=Math.pow(10,e0);return Math.round(r0*n0)/n0}var Root$2=Slider$1,Track=SliderTrack,Range$1=SliderRange,Thumb=SliderThumb;const Slider=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsxs(Root$2,{ref:n0,className:cn$1("relative flex w-full touch-none select-none items-center",r0),...e0,children:[jsxRuntimeExports.jsx(Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsxRuntimeExports.jsx(Range$1,{className:"absolute h-full bg-primary"})}),jsxRuntimeExports.jsx(Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Slider.displayName=Root$2.displayName;function FilterDropdown({label:r0,activeCount:e0,children:n0}){const[a0,i0]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(Popover,{open:a0,onOpenChange:i0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:cn$1("h-8 md:h-9 text-xs md:text-sm gap-1 rounded-full border-border/60 px-3 md:px-4",e0>0&&"bg-primary/10 border-primary/40 text-primary"),children:[r0,e0>0&&jsxRuntimeExports.jsx("span",{className:"ml-0.5 bg-primary text-primary-foreground rounded-full w-4 h-4 md:w-5 md:h-5 text-[10px] md:text-xs flex items-center justify-center font-medium",children:e0}),jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 opacity-60"})]})}),jsxRuntimeExports.jsx(PopoverContent,{className:"p-2 w-auto min-w-[180px] bg-popover border-border z-50",align:"start",sideOffset:6,children:n0})]})}function FilterOption({label:r0,isActive:e0,onClick:n0}){return jsxRuntimeExports.jsxs("button",{onClick:n0,className:cn$1("flex items-center gap-2 w-full px-2.5 py-1.5 md:px-3 md:py-2 text-xs md:text-sm rounded-md transition-colors text-left",e0?"bg-primary/10 text-primary font-medium":"hover:bg-muted/60 text-foreground"),children:[jsxRuntimeExports.jsx("div",{className:cn$1("w-3.5 h-3.5 md:w-4 md:h-4 roun
646ded-sm border flex items-center justify-center shrink-0",e0?"bg-primary border-primary":"border-muted-foreground/40"),children:e0&&jsxRuntimeExports.jsx(Check,{className:"w-2.5 h-2.5 text-primary-foreground"})}),r0]})}const SpliceSearchBar=reactExports.forwardRef(({filters:r0,onFiltersChange:e0,filterOptions:n0,songs:a0,resultCount:i0,totalCount:s0},o0)=>{const[l0,c0]=reactExports.useState(""),[u0,d0]=reactExports.useState(""),[h0,f0]=reactExports.useState(r0.bpmRange||[40,240]),p0=reactExports.useRef(null),A0=reactExports.useRef(r0);A0.current=r0,reactExports.useEffect(()=>{const O0=l0.trim();if((A0.current.liveSearch||"")===O0)return;const B0=setTimeout(()=>{e0({...A0.current,liveSearch:O0})},200);return()=>clearTimeout(B0)},[l0,e0]),reactExports.useImperativeHandle(o0,()=>({focus:()=>{var O0;return(O0=p0.current)==null?void 0:O0.focus()}}));const m0=O0=>{const B0=O0.trim().toLowerCase();B0&&!r0.searchKeywords.includes(B0)?e0({...r0,searchKeywords:[...r0.searchKeywords,B0],liveSearch:""}):e0({...r0,liveSearch:""}),c0("")},x0=O0=>
646{e0({...r0,searchKeywords:r0.searchKeywords.filter(B0=>B0!==O0)})},g0=O0=>{var B0;O0.key==="Enter"&&l0.trim()?(O0.preventDefault(),m0(l0)):O0.key==="Backspace"&&!l0&&r0.searchKeywords.length>0?x0(r0.searchKeywords[r0.searchKeywords.length-1]):O0.key==="Escape"&&(l0?c0(""):r0.searchKeywords.length>0?e0({...r0,searchKeywords:[]}):(B0=p0.current)==null||B0.blur())},y0=O0=>{const B0=r0.genres.includes(O0)?r0.genres.filter(z0=>z0!==O0):[...r0.genres,O0];e0({...r0,genres:B0})},b0=O0=>{const B0=r0.vocalistGenders.includes(O0)?r0.vocalistGenders.filter(z0=>z0!==O0):[...r0.vocalistGenders,O0];e0({...r0,vocalistGenders:B0})},E0=n0.years||[],w0=r0.years===void 0||r0.years===null?E0:r0.years,v0=w0.length===E0.length;w0.length;const S0=O0=>{const B0=r0.years===void 0||r0.years===null?E0:r0.years,z0=B0.includes(O0)?B0.filter(G0=>G0!==O0):[...B0,O0];e0({...r0,years:z0.length===E0.length?void 0:z0})},k0=()=>e0({...r0,years:void 0}),R0=()=>e0({...r0,years:[]}),j0=()=>{const O0=h0[0]<=40&&h0[1]>=240;e0({...r0,bpmRange:O0?null:h0})},C0=()=>{f0([40,240]),e0({...r0,bpmRange:null})},$0=reactExports.useMemo(()=>{const O0={};for(const B0 of a0)for(const z0 of B0.keywords||[]){const G0=z0.toLowerCase().trim();G0&&(O0[G0]=(O0[G0]||0)+1)}return Object.entries(O0).sort((B0,z0)=>z0[1]-B0[1]).slice(0,30).map(([B0])=>B0)},[a0]),T0=new Set(GENRES),I0=reactExports.useMemo(()=>n0.genres.filter(O0=>!T0.has(O0)),[n0.genres]),M0=reactExports.useMemo(()=>{if(!u0)return 1/0;const O0=u0.toLowerCase();return[...GENRES,...I0].filter(B0=>B0.toLowerCase().includes(O0)).length},[u0,I0]),N0=r0.genres.length>0||r0.keys.length>0||r0.scale!==null||r0.vocalistGenders.length>0||r0.bpmRange!==null||r0.searchKeywords.length>0||!!r0.liveSearch||r0.years!==void 0||r0.recentlyAdded,D0=()=>{e0({...r0,genres:[],keys:[],scale:null,vocalistGenders:[],bpmRange:null,searchKeywords:[],liveSearch:"",years:void 0,recentlyAdded:!1}),f0([40,240]),c0("")};return jsxRuntimeExports.jsxs("div",{className:"flex flex-col border-b border-border",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 md:px-4 md:py-3",children:[jsxRuntimeExports.jsxs("div",{onClick:()=>{var O0;return(O0=p0.current)==null?void 0:O0.focus()},className:cn$1("flex items-center gap-1.5 flex-1 min-h-8 md:min-h-[44px] px-2.5 py-1 md:px-4 md:py-2 rounded-md border border-input bg-background/50 cursor-text","focus-within:ring-1 focus-within:ring-ring"),children:[jsxRuntimeExports.jsx(Search,{className:"w-4 h-4 md:w-5 md:h-5 text-muted-foreground shrink-0"}),r0.searchKeywords.map(O0=>jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"gap-1 text-xs font-normal py-0 px-1.5 h-5 md:h-6 md:px-2 shrink-0",children:[O0,jsxRuntimeExports.jsx("button",{onClick:B0=>{B0.stopPropagation(),x0(O0)},className:"hover:text-foreground",children:jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"})})]},O0)),jsxRuntimeExports.jsx("input",{ref:p0,type:"text",value:l0,onChange:O0=>c0(O0.target.value),onKeyDown:g0,onBlur:()=>{l0.trim()&&m0(l0)},placeholder:r0.searchKeywords.length===0?"Search songs, writers, keywords... (Enter to pin a tag)":"",className:"flex-1 min-w-[80px] bg-transparent border-none outline-none text-sm md:text-base placeholder:text-muted-foreground"})]}),jsxRuntimeExports.jsxs("span",{className:"text-xs md:text-sm text-muted-foreground whitespace-nowrap",children:[i0.toLocaleString()," ",i0===1?"result":"results"]}),N0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 text-xs gap-1 text-muted-foreground hover:text-foreground px-2",onClick:D0,children:[jsxRuntimeExports.jsx(X$2,{className:"w-3 h-3"}),"Clear"]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2 px-3 pb-2 md:px-4 md:pb-3 flex-wrap",children:[jsxRuntimeExports.jsx(FilterDropdown,{label:"Genres",activeCount:r0.genres.length,children:jsxRuntimeExports.jsxs("div",{className:"w-56 space-y-2",children:[jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx(Search,{className:"w-3 h-3 absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),jsxRuntimeExports.jsx("input",{type:"text",value:u0,onChange:O0=>d0(O0.target.value),placeholder:"Search genres...",className:"w-full h-7 pl-7 pr-2 text-xs rounded-md border border-input bg-background/50 outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground"})]}),r0.genres.length>0&&jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.genres.map(O0=>jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"gap-1 text-[10px] font-normal py-0 px-1.5 h-5 cursor-pointer hover:bg-destructive/10 hover:text-destructive",onClick:()=>y0(O0),children:[O0,jsxRuntimeExports.jsx(X$2,{className:"w-2.5 h-2.5"})]},O0))}),jsxRuntimeExports.jsx("div",{className:"max-h-56 overflow-y-auto",children:jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider px-1 mb-1",children:"Presets"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:GENRES.filter(O0=>!u0||O0.toLowerCase().includes(u0.toLowerCase())).map(O0=>jsxRuntimeExports.jsx(FilterOption,{label:O0,isActive:r0.genres.includes(O0),onClick:()=>y0(O0)},O0))})]}),I0.length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider px-1 mb-1",children:"From Library"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:I0.filter(O0=>!u0||O0.toLowerCase().includes(u0.toLowerCase())).map(O0=>jsxRuntimeExports.jsx(FilterOption,{label:O0,isActive:r0.genres.includes(O0),onClick:()=>y0(O0)},O0))})]}),u0&&M0===0&&jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground text-center py-2",children:['No genres match "',u0,'"']})]})}),r0.genres.length>0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"w-full h-7 text-xs text-muted-foreground",onClick:()=>e0({...r0,genres:[]}),children:"Clear genres"})]})}),jsxRuntimeExports.jsx(FilterDropdown,{label:"BPM",activeCount:r0.bpmRange?1:0,children:jsxRuntimeExports.jsxs("div",{className:"w-48 space-y-3 p-1",children:[jsxRuntimeExports.jsx(Slider,{value:h0,onValueChange:O0=>f0(O0),min:40,max:240,step:5}),jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[jsxRuntimeExports.jsx("span",{children:h0[0]}),jsxRuntimeExports.jsx("span",{children:h0[1]})]}),jsxRuntimeExports.jsx("div",{className:"flex gap-1",children:BPM_PRESETS.map(O0=>{var B0,z0;return jsxRuntimeExports.jsx("button",{onClick:()=>{f0([O0.range[0],O0.range[1]]),e0({...r0,bpmRange:[O0.range[0],O0.range[1]]})},className:cn$1("text-[10px] px-1.5 py-0.5 rounded-full border transition-colors",((B0=r0.bpmRange)==null?void 0:B0[0])===O0.range[0]&&((z0=r
6460.bpmRange)==null?void 0:z0[1])===O0.range[1]?"bg-primary/10 border-primary/40 text-primary":"border-border hover:bg-muted/60"),children:O0.label.split(" ")[0]},O0.label)})}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1.5",children:[jsxRuntimeExports.jsx(Button,{size:"sm",className:"flex-1 h-7 text-xs",onClick:j0,children:"Apply"}),jsxRuntimeExports.jsx(Button,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:C0,children:"Reset"})]})]})}),jsxRuntimeExports.jsx(FilterDropdown,{label:"Vocalist",activeCount:r0.vocalistGenders.length,children:jsxRuntimeExports.jsx("div",{className:"space-y-0.5",children:VOCALIST_OPTIONS.map(O0=>jsxRuntimeExports.jsx(FilterOption,{label:O0,isActive:r0.vocalistGenders.includes(O0),onClick:()=>b0(O0)},O0))})}),E0.length>0&&jsxRuntimeExports.jsx(FilterDropdown,{label:"Year",activeCount:v0?0:w0.length,children:jsxRuntimeExports.jsxs("div",{className:"w-44 space-y-1",children:[jsxRuntimeExports.jsx("div",{className:"max-h-56 overflow-y-auto space-y-0.5",children:E0.map(O0=>jsxRuntimeExports.jsx(FilterOption,{label:formatSongYear(O0),isActive:w0.includes(O0),onClick:()=>S0(O0)},String(O0)))}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"flex-1 h-7 text-xs text-muted-foreground",onClick:k0,children:"Select all"}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"flex-1 h-7 text-xs text-muted-foreground",onClick:R0,children:"Remove all"})]})]})})]}),$0.length>0&&jsxRuntimeExports.jsx("div",{className:"flex items-center gap-1 md:gap-2 px-3 pb-2 md:px-4 md:pb-3 overflow-x-auto flex-nowrap",children:$0.map(O0=>{const B0=r0.searchKeywords.includes(O0);return jsxRuntimeExports.jsx("button",{onClick:()=>B0?x0(O0):m0(O0),className:cn$1("whitespace-nowrap rounded-full border text-[11px] px-2.5 py-1 md:text-sm md:px-3 md:py-1.5 transition-colors shrink-0",B0?"bg-primary text-primary-foreground border-primary":"border-border/60 text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:O0},O0)})})]})});SpliceSearchBar.displayName="SpliceSearchBar";function useKeyboardNavigation({songs:r0,selectedSongId:e0,onSelectSong:n0,onPlaySong:a0,onTogglePlay:i0,isPlaying:s0,currentSongId:o0,searchInputRef:l0,enabled:c0=!0}){const u0=reactExports.useCallback(()=>{const h0=document.activeElement;if(!h0)return!1;const f0=h0.tagName.toLowerCase(),p0=h0.hasAttribute("contenteditable");return f0==="input"||f0==="textarea"||p0},[]),d0=reactExports.useCallback(h0=>{var f0,p0;if(c0&&!(u0()&&h0.key!=="Escape"))switch(h0.key){case" ":if(h0.preventDefault(),o0)i0();else if(e0){const A0=r0.find(m0=>m0.id===e0);A0&&a0(A0)}else r0.length>0&&a0(r0[0]);break;case"ArrowUp":if(h0.preventDefault(),r0.length===0)return;if(!e0)n0(r0[r0.length-1]);else{const A0=r0.findIndex(m0=>m0.id===e0);A0>0&&n0(r0[A0-1])}break;case"ArrowDown":if(h0.preventDefault(),r0.length===0)return;if(!e0)n0(r0[0]);else{const A0=r0.findIndex(m0=>m0.id===e0);A0<r0.length-1&&n0(r0[A0+1])}break;case"Enter":if(h0.preventDefault(),e0){const A0=r0.find(m0=>m0.id===e0);A0&&a0(A0)}break;case"Escape":h0.preventDefault(),u0()?(f0=document.activeElement)==null||f0.blur():n0(null);break;case"/":u0()||(h0.preventDefault(),(p0=l0==null?void 0:l0.current)==null||p0.focus());break}},[c0,r0,e0,o0,n0,a0,i0,l0,u0]);return reactExports.useEffect(()=>{if(c0)return window.addEventListener("keydown",d0),()=>window.removeEventListener("keydown",d0)},[d0,c0]),{isInputFocused:u0}}function PitchComposer({open:r0,onOpenChange:e0,ownerId:n0,songs:a0,onCreated:i0}){const[s0,o0]=reactExports.useState([]),[l0,c0]=reactExports.useState(""),[u0,d0]=reactExports.useState(""),[h0,f0]=reactExports.useState(""),[p0,A0]=reactExports.useState(""),[m0,x0]=reactExports.useState(!1),[g0,y0]=reactExports.useState(null),[b0,E0]=reactExports.useState(null),w0=reactExports.useRef(a0);w0.current=a0;const v0=reactExports.useRef(!1);reactExports.useEffect(()=>{if(r0&&!v0.current){const T0=new Set;o0(w0.current.filter(I0=>!T0.has(I0.id)&&T0.add(I0.id))),y0(null),E0(null)}v0.current=r0},[r0]);const S0=reactExports.useMemo(()=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(h0.trim()),[h0]),k0=!!(n0&&l0.trim()&&u0.trim()&&S0&&s0.length&&g0===null),R0=!!(n0&&l0.trim()&&s0.length&&g0===null),j0=T0=>{const I0=b0;E0(null),!(!I0||I0===T0)&&o0(M0=>{const N0=[...M0],D0=N0.findIndex(z0=>z0.id===I0),O0=N0.findIndex(z0=>z0.id===T0);if(D0<0||O0<0)return M0;const[B0]=N0.splice(D0,1);return B0?(N0.splice(O0,0,B0),N0):M0})},C0=T0=>{const I0=encodeURIComponent(l0.trim()),M0=encodeURIComponent(`${p0.trim()}${p0.trim()?` 647 648`:""}${T0}`),N0=`mailto:${encodeURIComponent(h0.trim())}?subject=${I0}
648&body=${M0}`,D0=document.createElement("a");D0.href=N0,D0.rel="noopener",document.body.appendChild(D0),D0.click(),D0.remove()},$0=async T0=>{var O0;if(g0)return;if(!n0){ue$2.error("Still loading your archive â try again in a moment");return}if(!l0.trim()){ue$2.error("Give this pitch a title");return}if(s0.length===0){ue$2.error("Add at least one song");return}if(T0==="sent"&&(!u0.trim()||!S0)){ue$2.error("Add the A&R name and a valid email before sending");return}y0(T0);const{data:I0,error:M0}=await supabase.functions.invoke("pitch-links",{body:{action:"create",ownerId:n0,name:l0.trim(),songIds:s0.map(B0=>B0.id),recipientName:u0.trim(),recipientEmail:h0.trim(),message:p0.trim(),allowDownloads:m0,deliveryStatus:T0}});if(y0(null),M0||!((O0=I0==null?void 0:I0.pitch)!=null&&O0.slug)){ue$2.error((I0==null?void 0:I0.error)||"Could not create this pitch");return}const N0=`${window.location.origin}/pitch/${I0.pitch.slug}`;let D0=!0;try{await navigator.clipboard.writeText(N0)}catch{D0=!1}ue$2.success(T0==="draft"?"Draft playlist saved":"Pitch created",{description:D0?"Link copied to your clipboard":N0}),i0==null||i0(T0),e0(!1),c0(""),d0(""),f0(""),A0(""),x0(!1),o0([]),T0==="sent"&&C0(N0)};return jsxRuntimeExports.jsx(Dialog,{open:r0,onOpenChange:T0=>{g0||e0(T0)},children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-xl",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Create A&R pitch"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Arrange the songs, add the recipient, and create their private player."})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx(Input,{value:l0,onChange:T0=>c0(T0.target.value),placeholder:"Pitch title",autoFocus:!0}),jsxRuntimeExports.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[jsxRuntimeExports.jsx(Input,{value:u0,onChange:T0=>d0(T0.target.value),placeholder:"A&R name"}),jsxRuntimeExports.jsx(Input,{type:"email",value:h0,onChange:T0=>f0(T0.target.value),placeholder:"A&R email"})]}),jsxRuntimeExports.jsx(Textarea,{value:p0,onChange:T0=>A0(T0.target.value),placeholder:"Short message (optional)",className:"min-h-20 resize-none"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md border px-3 py-2.5",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-sm font-medium",children:"Allow downloads"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Otherwise this link is stream-only."})]}),jsxRuntimeExports.jsx(Switch,{checked:m0,onCheckedChange:x0})]}),jsxRuntimeExports.jsxs("div",{className:"overflow-hidden rounded-md border",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between border-b bg-muted/30 px-3 py-2",children:[jsxRuntimeExports.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[s0.length," ",s0.length===1?"track":"tracks"]}),jsxRuntimeExports.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:"Drag to reorder"})]}),s0.map((T0,I0)=>jsxRuntimeExports.jsxs("div",{draggable:!0,onDragStart:()=>E0(T0.id),onDragEnd:()=>E0(null),onDragOver:M0=>M0.preventDefault(),onDrop:M0=>{M0.preventDefault(),j0(T0.id)},className:`flex min-h-11 items-center gap-2 border-b px-3 last:border-b-0 ${b0===T0.id?"opacity-50":""}`,children:[jsxRuntimeExports.jsx(GripVertical,{className:"h-4 w-4 shrink-0 cursor-grab text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"w-5 text-xs tabular-nums text-muted-foreground",children:I0+1}),jsxRuntimeExports.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:T0.name}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>o0(M0=>M0.filter(N0=>N0.id!==T0.id)),"aria-label":`Remove ${T0.name}`,children:jsxRuntimeExports.jsx(Trash2,{className:"h-4 w-4"})})]},T0.id)),s0.length===0&&jsxRuntimeExports.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No songs left â close this and pick some tracks."})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{className:"gap-2 sm:gap-0",children:[jsxRuntimeExports.jsxs(Button,{variant:"outline",disabled:!R0,onClick:()=>void $0("draft"),children:[g0==="draft"&&jsxRuntimeExports.jsx(LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Save draft"]}),jsxRuntimeExports.jsxs(Button,{disabled:!k0,onClick:()=>void $0("sent"),children:[g0==="sent"?jsxRuntimeExports.jsx(LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}):jsxRuntimeExports.jsx(Send,{className:"mr-2 h-4 w-4"}),"Create & email"]})]})]})})}function SidebarItem({icon:r0,label:e0,count:n0,isActive:a0,onClick:i0,onContextMenu:s0,indent:o0=!1}){return jsxRuntimeExports.jsxs("button",{onClick:i0,onContextMenu:l0=>{s0&&(l0.preventDefault(),s0())},className:cn$1("w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-sm transition-colors duration-150",o0&&"ml-4",a0?"bg-muted/80 text-foreground":"text-foreground
648/80 hover:bg-muted/40"),children:[r0,jsxRuntimeExports.jsx("span",{className:"flex-1 text-left truncate",children:e0}),n0!==void 0&&jsxRuntimeExports.jsx("span",{className:cn$1("text-xs tabular-nums",a0?"text-primary-foreground/70":"text-muted-foreground"),children:n0})]})}function ColumnHeader({label:r0,sortKey:e0,currentSort:n0,direction:a0,onSort:i0,className:s0}){const o0=n0===e0;return jsxRuntimeExports.jsxs("button",{onClick:()=>i0(e0),className:cn$1("flex items-center gap-1 text-[11px] font-medium text-muted-foreground/80 hover:text-foreground transition-colors duration-150 select-none",o0&&"text-foreground",s0),children:[r0,o0&&(a0==="asc"?jsxRuntimeExports.jsx(ChevronUp,{className:"w-3 h-3"}):jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3"}))]})}function LibraryView({songs:r0,allSongsForVersioning:e0,filters:n0,onFiltersChange:a0,onDeleteSong:i0,onUpdateSong:s0,onDuplicateSong:o0,onPlaySong:l0,onTogglePlay:c0,currentPlayingSongId:u0,isPlaying:d0,currentTime:h0=0,duration:f0=0,onSeek:p0,filterOptions:A0,folders:m0,onAddFolder:x0,onUpdateFolder:g0,onRemoveFolder:y0,allWriters:b0=[],onConfirmWriters:E0,readOnly:w0=!1,canEditSong:v0,totalCount:S0=0,songwriters:k0=[],onTagSongwriter:R0,onUntagSongwriter:j0,getSongWriters:C0,onBulkTagSongwriter:$0,songToEditAfterUpload:T0,onClearEditAfterUpload:I0,isLoading:M0=!1,includeArKeywords:N0,onIncludeArKeywordsChange:D0,ownerId:O0,onNavigateToPitches:B0}){const{role:z0}=useAuth(),G0=reactExports.useRef(null),[F0,Q0]=reactExports.useState("name"),[U0,q0]=reactExports.useState("asc"),[Rw,_w]=reactExports.useState(!1),[J0,Cw]=reactExports.useState(""),[Ow,jw]=reactExports.useState(null),[Nw,xw]=reactExports.useState(null),[X0,Lw]=reactExports.useState(null),[Hw,Ww]=reactExports.useState(null),[r1,Yw]=reactExports.useState(""),[l1,p1]=reactExports.useState(null),[Pw,Qw]=reactExports.useState(null),[Xw,f1]=reactExports.useState(!1),[u1,W0]=reactExports.useState(new Set),[P0,L0]=reactExports.useState(!1),[Z0,$w]=reactExports.useState(!1),[Bw,Vw]=reactExports.useState(!1),{playlists:Dw,isLoading:Kw,createPlaylist:i1,addSongs:m1,deletePlaylist:qw,renamePlaylist:y1,refetch:S1}=usePitchPlaylists(),[_1,g1]=reactExports.useState(new Set),[C1,M1]=reactExports.useState(null),[a1,h1]=reactExports.useState([]),[Y0,Tw]=reactExports.useState(!1);reactExports.useEffect(()=>{if(T0&&T0.id){const zw=r0.find(c1=>c1.id===T0.id);zw&&(M1(zw),I0==null||I0())}},[T0,r0,I0]),reactExports.useEffect(()=>{C1&&C0?(Tw(!0),C0(C1.id).then(h1).finally(()=>Tw(!1))):h1([])},[C1,C0]);const Mw=zw=>{g1(c1=>{const R1=new Set(c1);return R1.has(zw)?R1.delete(zw):R1.add(zw),R1})},{primarySongs:Uw,childVersionsMap:Fw,versionCounts:Jw,autoExpandIds:s1}=reactExports.useMemo(()=>{const zw=new Map,c1=new Map,R1=new Set;r0.forEach(w1=>{if(w1.parentSongId){const wL=zw.get(w1.parentSongId)||[];wL.push(w1),zw.set(w1.parentSongId,wL)}}),zw.forEach((w1,wL)=>{c1.set(wL,w1.length)}),n0.searchKeywords.length>
6480&&r0.forEach(w1=>{w1.parentSongId&&R1.add(w1.parentSongId)});let f_=r0.filter(w1=>!w1.parentSongId);if(Nw){const w1=Dw.find(u3=>u3.id===Nw),wL=new Set((w1==null?void 0:w1.song_ids)??[]);f_=f_.filter(u3=>wL.has(u3.id))}return{primarySongs:f_,childVersionsMap:zw,versionCounts:c1,autoExpandIds:R1}},[r0,n0.searchKeywords,Nw,Dw]),A1=()=>{f1(!Xw),W0(new Set)},T1=zw=>{const c1=new Set(u1);c1.has(zw)?c1.delete(zw):c1.add(zw),W0(c1)},yR=()=>{u1.size===E1.length?W0(new Set):W0(new Set(E1.map(zw=>zw.id)))},V1=()=>{u1.forEach(zw=>i0(zw)),W0(new Set),f1(!1),L0(!1)},I_=zw=>{u1.forEach(c1=>s0(c1,{status:zw}))},j1=(zw,c1)=>{u1.forEach(R1=>s0(R1,zw)),W0(new Set),f1(!1)},O_=r0,o1={all:O_.length,available:O_.filter(zw=>zw.status==="available").length,cut:O_.filter(zw=>zw.status==="cut").length,"on-hold":O_.filter(zw=>zw.status==="on-hold").length},q1=zw=>{F0===zw?q0(c1=>c1==="asc"?"desc":"asc"):(Q0(zw),q0("asc"))},E1=[...Uw].sort((zw,c1)=>{let R1=0;switch(F0){case"name":R1=zw.name.localeCompare(c1.name);break;case"bpm":R1=zw.bpm-c1.bpm;break;case"key":R1=zw.key.localeCompare(c1.key);break;case"vocalistGender":R1=zw.vocalistGender.localeCompare(c1.vocalistGender);break;case"genre":const f_=(zw.genres||(zw.genre?[zw.genre]:[])).join(","),w1=(c1.genres||(c1.genre?[c1.genre]:[])).join(",");R1=f_.localeCompare(w1);break;case"uploadedAt":R1=new Date(zw.uploadedAt).getTime()-new Date(c1.uploadedAt).getTime();break}return U0==="asc"?R1:-R1});useKeyboardNavigation({songs:E1,selectedSongId:(Pw==null?void 0:Pw.id)||null,onSelectSong:Qw,onPlaySong:l0||(()=>{}),onTogglePlay:c0||(()=>{}),isPlaying:d0||!1,currentSongId:u0||null,searchInputRef:G0,enabled:!Xw});const B1=async()=>{const zw=await i1(J0);zw&&(Ow&&(await m1({...zw,song_ids:zw.song_ids||[]},[Ow]),jw(null)),xw(zw.id),Cw(""),_w(!1))},U1=reactExports.useMemo(()=>Dw.filter(zw=>zw.delivery_status==="draft"),[Dw]),e_=async(zw,c1)=>{const R1=Dw.find(f_=>f_.id===zw);R1&&await m1(R1,[c1])},X1=async zw=>{const c1=new Map((e0||r0).map(f_=>[f_.id,f_])),R1=zw.song_ids.map(f_=>{var w1;return(w1=c1.get(f_))==null?void 0:w1.dropboxUrl}).filter(f_=>!!f_);if(!R1.length){ue$2.error("No Dropbox links on these songs yet");return}await navigator.clipboard.writeText(R1.join(` 649`)),ue$2.success(`${R1.length} Dropbox ${R1.length===1?"link":"links"} copied`)},t_=async(zw,c1)=>{zw.preventDefault(),p1(null);const R1=zw.dataTransfer.getData("application/x-bangerbank-song")||zw.dataTransfer.getData("text/plain");R1&&await m1(c1,[R1])},tP=async zw=>{await navigator.clipboard.writeText(`${window.location.origin}/pitch/${zw.slug}`),ue$2.success("Playlist link copied")},bR=async()=>{if(!X0)return;const zw=X0.id;await qw(X0)&&(Nw===zw&&xw(null),Lw(null))},L1=()=>{var zw;return Nw?((zw=Dw.find(c1=>c1.id===Nw))==null?void 0:zw.name)||"A&R Playlist":n0.status===null?"All Songs":n0.status==="available"?"Available":n0.status==="cut"?"Cut / Sold":"On Hold"};return jsxRuntimeExports.jsxs("div",{className:"relative flex-1 flex h-full overflow-hidden bg-background",children:[jsxRuntimeExports.jsxs("div",{className:"w-52 border-r border-border bg-muted/30 flex flex-col",children:[jsxRuntimeExports.jsx("div",{className:"p-3 border-b border-border/50",children:jsxRuntimeExports.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Library"})}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:jsxRuntimeExports.jsxs("div",{className:"p-2 space-y-1",children:[jsxRuntimeExports.jsx(SidebarItem,{icon:jsxRuntimeExports.jsx(Music,{className:"w-4 h-4 text-blue-500"}),label:"All Songs",count:o1.all,isActive:n0.status===null&&n0.folderId===null,onClick:()=>a0({...n0,status:null,folderId:null})}),jsxRuntimeExports.jsx("div",{className:"pt-3 pb-1",children:jsxRuntimeExports.jsx("span",{className:"px-3 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Status"})}),jsxRuntimeExports.jsx(SidebarItem,{icon:jsxRuntimeExports.jsx(TrendingUp,{className:"w-4 h-4 text-green-500"}),label:"Available",count:o1.available,isActive:n0.status==="available"&&n0.folderId===null,onClick:()=>a0({...n0,status:"available",folderId:null})}),jsxRuntimeExports.jsx(SidebarItem,{icon:jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-4 h-4 text-purple-500"}),label:"Cut / Sold",count:o1.cut,isActive:n0.status==="cut"&&n0.folderId===null,onClick:()=>a0({...n0,status:"cut",folderId:null})}),jsxRuntimeExports.jsx(SidebarItem,{icon:jsxRuntimeExports.jsx(Clock,{className:"w-4 h-4 text-orange-500"}),label:"On Hold",count:o1["on-hold"],isActive:n0.status==="on-hold"&&n0.folderId===null,onClick:()=>a0({...n0,status:"on-hold",folderId:null})}),jsxRuntimeExports.jsxs("div",{className:"pt-3 pb-1 flex items-center justify-between",children:[jsxRuntimeExports.jsx("span",{className:"px-3 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Pitch playlists"}),!w0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-5 w-5 mr-1",onClick:()=>_w(!0),"aria-label":"New A&R playlist",children:jsxRuntimeExports.jsx(Plus,{className:"w-3 h-3"})})]}),Kw?jsxRuntimeExports.jsx("div",{className:"flex justify-center py-3",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):Dw.length===0&&!w0?jsxRuntimeExports.jsxs("button",{onClick:()=>_w(!0),className:"w-full flex items-center gap-2 px-3 py-2 rounded-md text-xs text-muted-foreground hover:bg-muted/40 transition-colors duration-150",children:[jsxRuntimeExports.jsx(ListMusic,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{children:"New playlist"})]}):Dw.map(zw=>jsxRuntimeExports.jsxs("div",{onDragOver:c1=>{c1.preventDefault(),zw.delivery_status==="draft"&&p1(zw.id)},onDragLeave:()=>p1(c1=>c1===zw.id?null:c1),onDrop:c1=>void t_(c1,zw),className:cn$1("group relative rounded-md border border-transparent",l1===zw.id&&"border-primary bg-primary/10"),children:[jsxRuntimeExports.jsxs("button",{onClick:()=>xw(c1=>c1===zw.id?null:zw.id),className:cn$1("flex w-full items-center gap-2 rounded-md px-3 py-1.5 pr-28 text-sm transition-colors",Nw===zw.id?"bg-muted/80 text-foreground":"text-foreground
649/80 hover:bg-muted/40"),children:[zw.delivery_status==="draft"?jsxRuntimeExports.jsx(ListMusic,{className:"h-4 w-4 shrink-0 text-primary"}):jsxRuntimeExports.jsx(Lock,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:zw.name}),jsxRuntimeExports.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:zw.song_ids.length})]}),jsxRuntimeExports.jsxs("div",{className:"absolute right-1 top-1/2 flex -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>void tP(zw),"aria-label":`Copy ${zw.name} link`,children:jsxRuntimeExports.jsx(Copy,{className:"h-3 w-3"})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6",disabled:zw.song_ids.length===0,onClick:()=>zw.song_ids.length?openPitchPlayer(zw.slug):void 0,title:zw.song_ids.length?"Open player":"Drag songs in first","aria-label":`Open ${zw.name} in the player`,children:jsxRuntimeExports.jsx(ExternalLink,{className:"h-3 w-3"})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6",disabled:zw.song_ids.length===0,onClick:()=>void X1(zw),title:"Copy all Dropbox links","aria-label":`Copy all Dropbox links in ${zw.name}`,children:jsxRuntimeExports.jsx(Link2,{className:"h-3 w-3"})}),!w0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{Ww(zw),Yw(zw.name)},"aria-label":`Rename ${zw.name}`,children:jsxRuntimeExports.jsx(SquarePen,{className:"h-3 w-3"})}),!w0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:()=>Lw(zw),"aria-label":`Delete ${zw.name}`,children:jsxRuntimeExports.jsx(Trash2,{className:"h-3 w-3"})})]})]},zw.id)),jsxRuntimeExports.jsx("p",{className:"px-3 pt-2 text-[10px] leading-4 text-muted-foreground",children:"Drag songs onto draft playlists, or use âAdd to playlistâ on a
649song row"})]})}),jsxRuntimeExports.jsx("div",{className:"p-2 border-t border-border/50",children:jsxRuntimeExports.jsxs("div",{className:"text-[10px] text-muted-foreground text-center",children:[o1.all," items"]})})]}),jsxRuntimeExports.jsx(AlertDialog,{open:!!X0,onOpenChange:zw=>{zw||Lw(null)},children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Delete this playlist?"}),jsxRuntimeExports.jsx(AlertDialogDescription,{children:(X0==null?void 0:X0.delivery_status)==="sent"?"Its shared link and engagement history will be permanently removed.":"This draft playlist will be permanently removed."})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:()=>void bR(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:"h-10 border-b border-border bg-muted/20 flex items-center px-3 gap-3",children:Xw?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{className:"text-sm text-muted-foreground",children:[u1.size," selected"]}),jsxRuntimeExports.jsx("div",{className:"flex-1"}),jsxRuntimeExports.jsxs(Button,{size:"sm",className:"h-7 gap-1.5 text-xs",disabled:u1.size===0,onClick:()=>Vw(!0),children:[jsxRuntimeExports.jsx(Send,{className:"w-3.5 h-3.5"}),"Create pitch"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",disabled:u1.size===0,onClick:()=>$w(!0),children:[jsxRuntimeExports.jsx(SquarePen,{className:"w-3.5 h-3.5"}),"Edit All"]}),jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",disabled:u1.size===0,children:["Set Status",jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3"})]})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",children:[jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>I_("available"),children:"Available"}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>I_("cut"),children:"Cut / Sold"}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>I_("on-hold"),children:"On Hold"})]})]}),jsxRuntimeExports.jsxs(Button,{variant:"destructive",size:"sm",className:"h-7 gap-1.5 text-xs",disabled:u1.size===0,onClick:()=>L0(!0),children:[jsxRuntimeExports.jsx(Trash2,{className:"w-3.5 h-3.5"}),"Delete"]}),jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:A1,children:[jsxRuntimeExports.jsx(X$2,{className:"w-3.5 h-3.5 mr-1"}),"Cancel"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(z0==="songwriter"||z0==="a_and_r"||z0==="admin")&&D0&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(Switch,{id:"ar-keywords-library",checked:N0??!1,onCheckedChange:D0,className:"scale-75"}),jsxRuntimeExports.jsx("label",{htmlFor:"ar-keywords-library",className:"text-[11px] text-muted-foreground cursor-pointer whitespace-nowrap",children:"A&R keywords"})]}),jsxRuntimeExports.jsx("div",{className:"flex-1"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:L1()}),!w0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:A1,children:[jsxRuntimeExports.jsx(Send,{className:"w-3.5 h-3.5"}),"New pitch"]})]})}),jsxRuntimeExports.jsx(SpliceSearchBar,{ref:G0,filters:n0,onFiltersChange:a0,filterOptions:A0,songs:r0,resultCount:r0.length,totalCount:S0}),jsxRuntimeExports.jsxs("div",{className:"h-8 border-b border-border bg-muted/10 flex items-center px-4 gap-4",children:[Xw&&jsxRuntimeExports.jsx(Checkbox,{checked:u1.size===E1.length&&E1.length>0,onCheckedChange:yR,className:"mr-2"}),jsxRuntimeExports.jsx("div",{className:"w-10"})," ",jsxRuntimeExports.jsx("div",{className:"flex-1",children:jsxRuntimeExports.jsx(ColumnHeader,{label:"TITLE",sortKey:"name",currentSort:F0,direction:U0,onSort:q1})}),jsxRuntimeExports.jsx("div",{className:"w-[180px] hidden xl:block"}),jsxRuntimeExports.jsx("div",{className:"w-16 text-center",children:jsxRuntimeExports.jsx(ColumnHeader,{label:"BPM",sortKey:"bpm",currentSort:F0,direction:U0,onSort:q1})}),jsxRuntimeExports.jsx("div",{className:"w-16 text-center hidden lg:block",children:jsxRuntimeExports.jsx("span",{className:"text-[11px] font-medium text-muted-foreground
649/80",children:"YEAR"})}),jsxRuntimeExports.jsx("div",{className:"w-24 hidden md:block",children:jsxRuntimeExports.jsx(ColumnHeader,{label:"VOCALIST",sortKey:"vocalistGender",currentSort:F0,direction:U0,onSort:q1})}),jsxRuntimeExports.jsx("div",{className:"w-16 hidden xl:block",children:jsxRuntimeExports.jsx("span",{className:"text-[11px] font-medium text-muted-foreground/80",children:"ENERGY"})}),jsxRuntimeExports.jsx("div",{className:"w-32 hidden lg:block",children:jsxRuntimeExports.jsx(ColumnHeader,{label:"GENRE",sortKey:"genre",currentSort:F0,direction:U0,onSort:q1})}),jsxRuntimeExports.jsx("div",{className:"w-20",children:jsxRuntimeExports.jsx(ColumnHeader,{label:"KEY",sortKey:"key",currentSort:F0,direction:U0,onSort:q1})}),jsxRuntimeExports.jsx("div",{className:"w-20",children:jsxRuntimeExports.jsx("span",{className:"text-[11px] font-medium text-muted-foreground/80",children:"STATUS"})})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:M0?jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-8 h-8 mb-4 animate-spin"}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Loading library..."})]}):E1.length===0?jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground",children:[jsxRuntimeExports.jsx(Music,{className:"w-12 h-12 mb-4 opacity-30"}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"No songs found"}),jsxRuntimeExports.jsx("p",{className:"text-xs mt-1",children:"Try adjusting your filters or upload some tracks"})]}):jsxRuntimeExports.jsx("div",{className:"divide-y divide-border/50",children:E1.map(zw=>{const c1=Fw.get(zw.id)||[],R1=c1.length>0,f_=_1.has(zw.id)||s1.has(zw.id);return jsxRuntimeExports.jsxs("div",{draggable:!Xw,onDragStart:w1=>{w1.dataTransfer.effectAllowed="copy",w1.dataTransfer.setData("application/x-bangerbank-song",zw.id),w1.dataTransfer.setData("text/plain",zw.id)},className:Xw?void 0:"cursor-grab active:cursor-grabbing",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[R1&&!Xw?jsxRuntimeExports.jsx("button",{onClick:()=>Mw(zw.id),className:"pl-2 pr-1 py-2 hover:bg-muted/40 transition-colors",title:`${c1.length} alternate version${c1.length>1?"s":""}`,children:f_?jsxRuntimeExports.jsx(ChevronDown,{className:"w-4 h-4 text-muted-foreground"}):jsxRuntimeExports.jsx(ChevronRight,{className:"w-4 h-4 text-muted-foreground"})}):jsxRuntimeExports.jsx("div",{className:"w-7"}),Xw&&jsxRuntimeExports.jsx("div",{className:"pl-2",children:jsxRuntimeExports.jsx(Checkbox,{checked:u1.has(zw.id),onCheckedChange:()=>T1(zw.id)})}),jsxRuntimeExports.jsx("div",{className:"flex-1",children:jsxRuntimeExports.jsx(SongListItem,{song:zw,onDelete:i0,onUpdate:s0,onDuplicate:o0,onPlay:l0,onSelect:Qw,isPlaying:d0,isCurrentSong:zw.id===u0,isSelected:(Pw==null?void 0:Pw.id)===zw.id,folders:m0,allWriters:b0,onConfirmWriters:E0,readOnly:w0,canEdit:v0?v0(zw):!w0,songwriters:k0,onTagSongwriter:R0,onUntagSongwriter:j0,getSongWriters:C0,versionCount:R1?c1.length:void 0,allSongs:e0||r0,userRole:z0,includeArKeywords:N0,onIncludeArKeywordsChange:D0,playbackProgress:zw.id===u0&&f0>0?h0/f0:0,onSeek:zw.id===u0&&p0?w1=>p0(w1*f0):void 0,playlists:U1.map(w1=>({id:w1.id,name:w1.name})),onAddToPlaylist:w1=>void e_(w1,zw.id),onNewPlaylistWithSong:()=>{jw(zw.id),_w(!0)}})})]}),f_&&c1.map(w1=>jsxRuntimeExports.jsx(SongVersionRow,{song:w1,onPlay:l0,onSelect:Qw,onDelete:i0,onUpdate:s0,onDuplicate:o0,isPlaying:d0,isCurrentSong:w1.id===u0,isSelected:(Pw==null?void 0:Pw.id)===w1.id,folders:m0,allWriters:b0,onConfirmWriters:E0,readOnly:w0,canEdit:v0?v0(w1):!w0,allSongs:e0||r0,songwriters:k0,onTagSongwriter:R0,onUntagSongwriter:j0,getSongWriters:C0,userRole:z0,includeArKeywords:N0,onIncludeArKeywordsChange:D0},w1.id))]},zw.id)})})})]}),Pw&&jsxRuntimeExports.jsx(SongDetailPanel,{song:Pw,onClose:()=>Qw(null),onUpdate:(zw,c1)=>{s0(zw,c1),Qw({...Pw,...c1})},onPlay:l0,isPlaying:d0&&Pw.id===u0,folders:m0,allWriters:b0,onConfirmWriters:E0,readOnly:w0,songwriters:k0,onTagSongwriter
649:R0,onUntagSongwriter:j0,getSongWriters:C0,includeArKeywords:N0,onIncludeArKeywordsChange:D0}),jsxRuntimeExports.jsx(Dialog,{open:Rw,onOpenChange:zw=>{_w(zw),zw||jw(null)},children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[400px]",children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(DialogTitle,{children:"New A&R playlist"})}),jsxRuntimeExports.jsx("div",{className:"py-4",children:jsxRuntimeExports.jsx(Input,{value:J0,onChange:zw=>Cw(zw.target.value),placeholder:"Playlist or A&R name",onKeyDown:zw=>zw.key==="Enter"&&void B1(),autoFocus:!0})}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",onClick:()=>_w(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:()=>void B1(),disabled:!J0.trim(),children:"Create playlist"})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:!!Hw,onOpenChange:zw=>{zw||Ww(null)},children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[400px]",children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(DialogTitle,{children:"Rename playlist"})}),jsxRuntimeExports.jsx("div",{className:"py-4",children:jsxRuntimeExports.jsx(Input,{value:r1,onChange:zw=>Yw(zw.target.value),placeholder:"Playlist or A&R name",onKeyDown:zw=>{zw.key==="Enter"&&Hw&&r1.trim()&&y1(Hw,r1).then(c1=>{c1&&Ww(null)})},autoFocus:!0})}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",onClick:()=>Ww(null),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{disabled:!r1.trim()||r1.trim()===(Hw==null?void 0:Hw.name),onClick:()=>{Hw&&y1(Hw,r1).then(zw=>{zw&&Ww(null)})},children:"Save name"})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:P0,onOpenChange:L0,children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsxs(AlertDialogTitle,{children:["Delete ",u1.size," songs?"]}),jsxRuntimeExports.jsx(AlertDialogDescription,{children:"This action cannot be undone. The selected songs will be permanently removed from your library."})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:V1,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),jsxRuntimeExports.jsx(BulkEditDialog,{open:Z0,onOpenChange:$w,selectedCount:u1.size,onApply:j1,folders:m0,allWriters:b0,songwriters:k0,selectedSongIds:Array.from(u1),onBulkTagSongwriter:$0}),jsxRuntimeExports.jsx(EditSongDialog,{song:C1,open:!!C1,onOpenChange:zw=>!zw&&M1(null),onSave:(zw,c1)=>{s0(zw,c1),M1(null)},folders:m0,allWriters:b0,onConfirmWriters:E0,allSongs:e0||r0,songwriters:k0,taggedSongwriters:a1,onTagSongwriter:R0,onUntagSongwriter:j0,onRefreshTagged:()=>{C1&&C0&&(Tw(!0),C0(C1.id).then(h1).finally(()=>Tw(!1)))},isLoadingTagged:Y0,onPlay:l0,isPlaying:d0,currentPlayingSongId:u0,userRole:z0}),jsxRuntimeExports.jsx(PitchComposer,{open:Bw,onOpenChange:Vw,ownerId:O0,songs:(e0||r0).filter(zw=>u1.has(zw.id)),onCreated:()=>{W0(new Set),f1(!1),S1()}})]})}var isArray$f=Array.isArray,isArray_1=isArray$f,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$9=freeGlobal||freeSelf||Function("return this")(),_root=root$9,root$8=_root,Symbol$7=root$8.Symbol,_Symbol=Symbol$7,Symbol$6=_Symbol,objectProto$c=Object.prototype,hasOwnProperty$a=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$6?Symbol$6.toStringTag:void 0;function getRawTag$1(r0){var e0=hasOwnProperty$a.call(r0,symToStringTag$1),n0=r0[symToStringTag$1];try{r0[symToStringTag$1]=void 0;var a0=!0}catch{}var i0=nativeObjectToString$1.call(r0);return a0&&(e0?r0[symToStringTag$1]=n0:delete r0[symToStringTag$1]),i0}var _getRawTag=getRawTag$1,objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$1(r0){return nativeObjectToString.call(r0)}var _objectToString=objectToString$1,Symbol$5=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undef
649ined]",symToStringTag=Symbol$5?Symbol$5.toStringTag:void 0;function baseGetTag$9(r0){return r0==null?r0===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(r0)?getRawTag(r0):objectToString(r0)}var _baseGetTag=baseGetTag$9;function isObjectLike$9(r0){return r0!=null&&typeof r0=="object"}var isObjectLike_1=isObjectLike$9,baseGetTag$8=_baseGetTag,isObjectLike$8=isObjectLike_1,symbolTag$1="[object Symbol]";function isSymbol$6(r0){return typeof r0=="symbol"||isObjectLike$8(r0)&&baseGetTag$8(r0)==symbolTag$1}var isSymbol_1=isSymbol$6,isArray$e=isArray_1,isSymbol$5=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(r0,e0){if(isArray$e(r0))return!1;var n0=typeof r0;return n0=="number"||n0=="symbol"||n0=="boolean"||r0==null||isSymbol$5(r0)?!0:reIsPlainProp.test(r0)||!reIsDeepProp.test(r0)||e0!=null&&r0 in Object(e0)}var _isKey=isKey$3;function isObject$7(r0){var e0=typeof r0;return r0!=null&&(e0=="object"||e0=="function")}var isObject_1=isObject$7;const isObject$8=getDefaultExportFromCjs(isObject_1);var baseGetTag$7=_baseGetTag,isObject$6=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(r0){if(!isObject$6(r0))return!1;var e0=baseGetTag$7(r0);return e0==funcTag$1||e0==genTag||e0==asyncTag||e0==proxyTag}var isFunction_1=isFunction$2;const isFunction$3=getDefaultExportFromCjs(isFunction_1);var root$7=_root,coreJsData$1=root$7["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var r0=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return r0?"Symbol(src)_1."+r0:""}();function isMasked$1(r0){return!!maskSrcKey&&maskSrcKey in r0}var _isMasked=isMasked$1,funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource$2(r0){if(r0!=null){try{return funcToString$2.call(r0)}catch{}try{return r0+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$5=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(r0){if(!isObject$5(r0)||isMasked(r0))return!1;var e0=isFunction$1(r0)?reIsNative:reIsHostCtor;return e0.test(toSource$1(r0))}var _baseIsNative=baseIsNative$1;function getValue$1(r0,e0){return r0==null?void 0:r0[e0]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$7(r0,e0){var n0=getValue(r0,e0);return baseIsNative(n0)?n0:void 0}var _getNative=getNative$7,getNative$6=_getNative,nativeCreate$4=getNative$6(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(r0){var e0=this.has(r0)&&delete this.__data__[r0];return this.size-=e0?1:0,e0}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function hashGet$1(r0){var e0=this.__data__;if(nativeCreate$2){var n0=e0[r0];return n0===HASH_UNDEFINED$2?void 0:n0}return hasOwnProperty$8.call(e0,r0)?e0[r0]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function hashHas$1(r0){var e0=this.__data__;return nativeCreate$1?e0[r0]!==void 0:hasOwnProperty$7.call(e0,r0)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(r0,e0){var n0=this.__data__;return this.size+=this.has(r0)?0:1,n0[r0]=nativeCreate&&e0===void 0?HASH_UNDEFINED$1:e0,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(r0){var e0=-1,n0=r0==null?0:r0.length;for(this.clear();++e0<n0;){var a0=r0[e0];this.set(a0[0],a0[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype.delete=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;
vendor: 4,085 bytes, line 649
649function eq$3(r0,e0){return r0===e0||r0!==r0&&e0!==e0}var eq_1=eq$3,eq$2=eq_1;function assocIndexOf$4(r0,e0){for(var n0=r0.length;n0--;)if(eq$2(r0[n0][0],e0))return n0;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(r0){var e0=this.__data__,n0=assocIndexOf$3(e0,r0);if(n0<0)return!1;var a0=e0.length-1;return n0==a0?e0.pop():splice.call(e0,n0,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(r0){var e0=this.__data__,n0=assocIndexOf$2(e0,r0);return n0<0?void 0:e0[n0][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(r0){return assocIndexOf$1(this.__data__,r0)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(r0,e0){var n0=this.__data__,a0=assocIndexOf(n0,r0);return a0<0?(++this.size,n0.push([r0,e0])):n0[a0][1]=e0,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(r0){var e0=-1,n0=r0==null?0:r0.length;for(this.clear();++e0<n0;){var a0=r0[e0];this.set(a0[0],a0[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype.delete=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,getNative$5=_getNative,root$6=_root,Map$4=getNative$5(root$6,"Map"),_Map=Map$4,Hash=_Hash,ListCache$3=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$3),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(r0){var e0=typeof r0;return e0=="string"||e0=="number"||e0=="symbol"||e0=="boolean"?r0!=="__proto__":r0===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(r0,e0){var n0=r0.__data__;return isKeyable(e0)?n0[typeof e0=="string"?"string":"hash"]:n0.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(r0){var e0=getMapData$3(this,r0).delete(r0);return this.size-=e0?1:0,e0}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(r0){return getMapData$2(this,r0).get(r0)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(r0){return getMapData$1(this,r0).has(r0)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(r0,e0){var n0=getMapData(this,r0),a0=n0.size;return n0.set(r0,e0),this.size+=n0.size==a0?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(r0){var e0=-1,n0=r0==null?0:r0.length;for(this.clear();++e0<n0;){var a0=r0[e0];this.set(a0[0],a0[1])}}MapCache$3.prototype.clear=mapCacheClear;MapCache$3.prototype.delete=mapCacheDelete;MapCache$3.prototype.get=mapCacheGet;MapCache$3.prototype.has=mapCacheHas;MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,MapCache$2=_MapCache,FUNC_ERROR_TEXT$2="Expected a function";function memoize$2(r0,e0){if(typeof r0!="function"||e0!=null&&typeof e0!="function")throw new TypeError(FUNC_ERROR_TEXT$2);var n0=function(){var a0=arguments,i0=e0?e0.apply(this,a0):a0[0],s0=n0.cache;if(s0.has(i0))return s0.get(i0);var o0=r0.apply(this,a0);return n0.cache=s0.set(i0,o0)||s0,o0};return n0.cache=new(memoize$2.Cache||MapCache$2),n0}memoize$2.Cache=MapCache$2;var memoize_1=memoize$2;const memoize$3=getDefaultExportFromCjs(memoize_1);var memoize$1=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(r0){var e0=memoize$1(r0,function(a0){return n0.size===MAX_MEMOIZE_SIZE&&n0.clear(),a0}),n0=e0.cache;return e0}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(r0){var e0=[];
649return r0.charCodeAt(0)===46&&e0.push(""),r0.replace(rePropName,function(n0,a0,i0,s0){e0.push(i0?s0.replace(reEscapeChar,"$1"):a0||n0)}),e0}),_stringToPath=stringToPath$1;function arrayMap$3(r0,e0){for(var n0=-1,a0=r0==null?0:r0.length,i0=Array(a0);++n0<a0;)i0[n0]=e0(r0[n0],n0,r0);return i0}var _arrayMap=arrayMap$3,Symbol$4=_Symbol,arrayMap$2=_arrayMap,isArray$d=isArray_1,isSymbol$4=isSymbol_1,INFINITY$3=1/0,symbolProto$1=Symbol$4?Symbol$4.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$1(r0){if(typeof r0=="string")return r0;if(isArray$d(r0))return arrayMap$2(r0,baseToString$1)+"";if(isSymbol$4(r0))return symbolToString?symbolToString.call(r0):"";var e0=r0+"";return e0=="0"&&1/r0==-INFINITY$3?"-0":e0}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$3(r0){return r0==null?"":baseToString(r0)}var toString_1=toString$3,isArray$c=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString$2=toString_1;function castPath$2(r0,e0){return isArray$c(r0)?r0:isKey$2(r0,e0)?[r0]:stringToPath(toString$2(r0))}var _castPath=castPath$2,isSymbol$3=isSymbol_1,INFINITY$2=1/0;function toKey$4(r0){if(typeof r0=="string"||isSymbol$3(r0))return r0;var e0=r0+"";return e0=="0"&&1/r0==-INFINITY$2?"-0":e0}var _toKey=toKey$4,castPath$1=_castPath,toKey$3=_toKey;function baseGet$3(r0,e0){e0=castPath$1(e0,r0);for(var n0=0,a0=e0.length;r0!=null&&n0<a0;)r0=r0[toKey$3(e0[n0++])];return n0&&n0==a0?r0:void 0}var _baseGet=baseGet$3,baseGet$2=_baseGet;function get$1(r0,e0,n0){var a0=r0==null?void 0:baseGet$2(r0,e0);return a0===void 0?n0:a0}var get_1=get$1;const get$2=getDefaultExportFromCjs(get_1);function isNil(r0){return r0==null}var isNil_1=isNil;const isNil$1=getDefaultExportFromCjs(isNil_1);var baseGetTag$6=_baseGetTag,isArray$b=isArray_1,isObjectLike$7=isObjectLike_1,stringTag$2="[object String]";function isString(r0){return typeof r0=="string"||!isArray$b(r0)&&isObjectLike$7(r0)&&baseGetTag$6(r0)==stringTag$2}var isString_1=isString;const isString$1=getDefaultExportFromCjs(isString_1);var reactIs={exports:{}},reactIs_production_min={};/** 650 * @license React 651 * react-is.production.min.js 652 * 653 * Copyright (c) Facebook, Inc. and its affiliates. 654 * 655 * This source code is licensed under the MIT license found in the 656 * LICENSE file in the root directory of this source tree. 657 */var b$1=Symbol.for("react.element"),c$2=Symbol.for("react.portal"),d$1=Symbol.for("react.fragment"),e$1=Symbol.for("react.strict_mode"),f$1=Symbol.for("react.profiler"),g$1=Symbol.for("react.provider"),h$1=Symbol.for("react.context"),k$2=Symbol.for("react.server_context"),l$1=Symbol.for("react.forward_ref"),m$1=Symbol.for("react.suspense"),n$1=Symbol.for("react.suspense_list"),p$1=Symbol.for("react.memo"),q$1=Symbol.for("react.lazy"),t$1=Symbol.for("react.offscreen"),u$1;u$1=Symbol.for("react.module.reference");function v$1(r0){if(typeof r0=="object"&&r0!==null){var e0=r0.$$typeof;switch(e0){case b$1:switch(r0=r0.type,r0){case d$1:case f$1:case e$1:case m$1:case n$1:return r0;default:switch(r0=r0&&r0.$$typeof,r0){case k$2:case h$1:case l$1:case q$1:case p$1:case g$1:return r0;default:return e0}}case c$2:return e0}}}reactIs_production_min.ContextConsumer=h$1;reactIs_production_min.ContextProvider=g$1;reactIs_production_min.Element=b$1;reactIs_production_min.ForwardRef=l$1;reactIs_production_min.Fragment=d$1;reactIs_production_min.Lazy=q$1;reactIs_production_min.Memo=p$1;reactIs_production_min.Portal=c$2;reactIs_production_min.Profiler=f$1;reactIs_production_min.StrictMode=e$1;reactIs_production_min.Suspense=m$1;reactIs_production_min.SuspenseList=n$1;reactIs_production_min.isAsyncMode=function(){return!1};reactIs_production_min.isConcurrentMode=function(){return!1};reactIs_production_min.isContextConsumer=function(r0){return v$1(r0)===h$1};reactIs_production_min.isContextProvider=function(r0){return v$1(r0)===g$1};reactIs_production_min.isElement=function(r0){return typeof r0=="object"&&r0!==null&&r0.$$typeof===b$1};reactIs_production_min.isForwardRef=function(r0){return v$1(r0)===l$1};reactIs_production_min.isFragment=function(r0){return v$1(r0)===d$1};reactIs_production_min.isLazy=function(r0){return v$1(r0)===q$1};reactIs_production_min.isMemo=function(r0){return v$1(r0)===p$1};reactIs_production_min.isPortal=function(r0){return v$1(r0)===c$2};reactIs_production_min.isProfiler=function(r0){return v$1(r0)===f$1};reactIs_production_min.isStrictMode=function(r0){return v$1(r0)===e$1};reactIs_production_min.isSuspense=function(r0){return v$1(r0)===m$1};reactIs_production_min.isSuspenseList=function(r0){return v$1(r0)===n$1};reactIs_production_min.isValidElementType=function(r0){return typeof r0=="string"||typeof r0=="function"||r0===d$1||r0===f$1||r0===e$1||r0===m$1||r0===n$1||r0===t$1||typeof r0=="object"&&r0!==null&&(r0.$$typeof===q$1||r0.$$typeof===p$1||r0.$$typeof===g$1||r0.$$typeof===h$1||r0.$$typeof===l$1||r0.$$typeof===u$1||r0.getModuleId!==void 0)};reactIs_production_min.typeOf=v$1;reactIs.exports=reactIs_production_min;var reactIsExports=reactIs.exports,baseGetTag$5=_baseGetTag,isObjectLike$6=isObjectLike_1,numberTag$2="[object Number]";function isNumber$3(r0){return typeof r0=="number"||isObjectLike$6(r0)&&baseGetTag$5(r0)==numberTag$2}var isNumber_1=isNumber$3;const isNumber$4=getDefaultExportFromCjs(isNumber_1);var isNumber$2=isNumber_1;
vendor: 6,211 bytes, line 657
657function isNaN$1(r0){return isNumber$2(r0)&&r0!=+r0}var _isNaN=isNaN$1;const isNan=getDefaultExportFromCjs(_isNaN);var mathSign=function r0(e0){return e0===0?0:e0>0?1:-1},isPercent=function r0(e0){return isString$1(e0)&&e0.indexOf("%")===e0.length-1},isNumber$1=function r0(e0){return isNumber$4(e0)&&!isNan(e0)},isNumOrStr=function r0(e0){return isNumber$1(e0)||isString$1(e0)},idCounter=0,uniqueId=function r0(e0){var n0=++idCounter;return"".concat(e0||"").concat(n0)},getPercentValue=function r0(e0,n0){var a0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i0=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!isNumber$1(e0)&&!isString$1(e0))return a0;var s0;if(isPercent(e0)){var o0=e0.indexOf("%");s0=n0*parseFloat(e0.slice(0,o0))/100}else s0=+e0;return isNan(s0)&&(s0=a0),i0&&s0>n0&&(s0=n0),s0},getAnyElementOfObject=function r0(e0){if(!e0)return null;var n0=Object.keys(e0);return n0&&n0.length?e0[n0[0]]:null},hasDuplicate=function r0(e0){if(!Array.isArray(e0))return!1;for(var n0=e0.length,a0={},i0=0;i0<n0;i0++)if(!a0[e0[i0]])a0[e0[i0]]=!0;else return!0;return!1},interpolateNumber$2=function r0(e0,n0){return isNumber$1(e0)&&isNumber$1(n0)?function(a0){return e0+a0*(n0-e0)}:function(){return n0}};function findEntryInArray(r0,e0,n0){return!r0||!r0.length?null:r0.find(function(a0){return a0&&(typeof e0=="function"?e0(a0):get$2(a0,e0))===n0})}function shallowEqual(r0,e0){for(var n0 in r0)if({}.hasOwnProperty.call(r0,n0)&&(!{}.hasOwnProperty.call(e0,n0)||r0[n0]!==e0[n0]))return!1;for(var a0 in e0)if({}.hasOwnProperty.call(e0,a0)&&!{}.hasOwnProperty.call(r0,a0))return!1;return!0}function _typeof$C(r0){"@babel/helpers - typeof";return _typeof$C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$C(r0)}var SVGContainerPropKeys=["viewBox","children"],SVGElementPropKeys=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],PolyElementKeys=["points","pathLength"],FilteredElementKeyMap={svg:SVGContainerPropKeys,polygon:PolyElementKeys,polyline:PolyElementKeys},EventKeys=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
657ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],adaptEventHandlers=function r0(e0,n0){if(!e0||typeof e0=="function"||typeof e0=="boolean")return null;var a0=e0;if(reactExports.isValidElement(e0)&&(a0=e0.props),!isObject$8(a0))return null;var i0={};
vendor: 8,261 bytes, line 657
657return Object.keys(a0).forEach(function(s0){EventKeys.includes(s0)&&(i0[s0]=n0||function(o0){return a0[s0](a0,o0)})}),i0},getEventHandlerOfChild=function r0(e0,n0,a0){return function(i0){return e0(n0,a0,i0),null}},adaptEventsOfChild=function r0(e0,n0,a0){if(!isObject$8(e0)||_typeof$C(e0)!=="object")return null;var i0=null;return Object.keys(e0).forEach(function(s0){var o0=e0[s0];EventKeys.includes(s0)&&typeof o0=="function"&&(i0||(i0={}),i0[s0]=getEventHandlerOfChild(o0,n0,a0))}),i0},_excluded$e=["children"],_excluded2$4=["children"];function _objectWithoutProperties$e(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$e(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$e(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}var REACT_BROWSER_EVENT_MAP={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},getDisplayName=function r0(e0){return typeof e0=="string"?e0:e0?e0.displayName||e0.name||"Component":""},lastChildren=null,lastResult=null,toArray=function r0(e0){if(e0===lastChildren&&Array.isArray(lastResult))return lastResult;var n0=[];return reactExports.Children.forEach(e0,function(a0){isNil$1(a0)||(reactIsExports.isFragment(a0)?n0=n0.concat(r0(a0.props.children)):n0.push(a0))}),lastResult=n0,lastChildren=e0,n0};function findAllByType(r0,e0){var n0=[],a0=[];return Array.isArray(e0)?a0=e0.map(function(i0){return getDisplayName(i0)}):a0=[getDisplayName(e0)],toArray(r0).forEach(function(i0){var s0=get$2(i0,"type.displayName")||get$2(i0,"type.name");a0.indexOf(s0)!==-1&&n0.push(i0)}),n0}function findChildByType(r0,e0){var n0=findAllByType(r0,e0);return n0&&n0[0]}var validateWidthHeight=function r0(e0){if(!e0||!e0.props)return!1;var n0=e0.props,a0=n0.width,i0=n0.height;return!(!isNumber$1(a0)||a0<=0||!isNumber$1(i0)||i0<=0)},SVG_TAGS=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],isSvgElement=function r0(e0){return e0&&e0.type&&isString$1(e0.type)&&SVG_TAGS.indexOf(e0.type)>=0},isValidSpreadableProp=function r0(e0,n0,a0,i0){var s0,o0=(s0=FilteredElementKeyMap==null?void 0:FilteredElementKeyMap[i0])!==null&&s0!==void 0?s0:[];return n0.startsWith("data-")||!isFunction$3(e0)&&(i0&&o0.includes(n0)||SVGElementPropKeys.includes(n0))||a0&&EventKeys.includes(n0)},filterProps=function r0(e0,n0,a0){if(!e0||typeof e0=="function"||typeof e0=="boolean")return null;var i0=e0;if(reactExports.isValidElement(e0)&&(i0=e0.props),!isObject$8(i0))return null;var s0={};return Object.keys(i0).forEach(function(o0){var l0;isValidSpreadableProp((l0=i0)===null||l0===void 0?void 0:l0[o0],o0,n0,a0)&&(s0[o0]=i0[o0])}),s0},isChildrenEqual=function r0(e0,n0){if(e0===n0)return!0;var a0=reactExports.Children.count(e0);if(a0!==reactExports.Children.count(n0))return!1;if(a0===0)return!0;if(a0===1)return isSingleChildEqual(Array.isArray(e0)?e0[0]:e0,Array.isArray(n0)?n0[0]:n0);for(var i0=0;i0<a0;i0++){var s0=e0[i0],o0=n0[i0];if(Array.isArray(s0)||Array.isArray(o0)){if(!r0(s0,o0))return!1}else if(!isSingleChildEqual(s0,o0))return!1}return!0},isSingleChildEqual=function r0(e0,n0){if(isNil$1(e0)&&isNil$1(n0))return!0;if(!isNil$1(e0)&&!isNil$1(n0)){var a0=e0.props||{},i0=a0.children,s0=_objectWithoutProperties$e(a0,_excluded$e),o0=n0.props||{},l0=o0.children,c0=_objectWithoutProperties$e(o0,_excluded2$4);return i0&&l0?shallowEqual(s0,c0)&&isChildrenEqual(i0,l0):!i0&&!l0?shallowEqual(s0,c0):!1}return!1},renderByOrder=function r0(e0,n0){var a0=[],i0={};return toArray(e0).forEach(function(s0,o0){if(isSvgElement(s0))a0.push(s0);else if(s0){var l0=getDisplayName(s0.type),c0=n0[l0]||{},u0=c0.handler,d0=c0.once;if(u0&&(!d0||!i0[l0])){var h0=u0(s0,l0,o0);a0.push(h0),i0[l0]=!0}}}),a0},getReactEventByType=function r0(e0){var n0=e0&&e0.type;return n0&&REACT_BROWSER_EVENT_MAP[n0]?REACT_BROWSER_EVENT_MAP[n0]:null},parseChildIndex=function r0(e0,n0){return toArray(n0).indexOf(e0)},_excluded$d=["children","width","height","viewBox","className","style","title","desc"];function _extends$n(){return _extends$n=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$n.apply(this,arguments)}function _objectWithoutProperties$d(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$d(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$d(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function Surface(r0){var e0=r0.children,n0=r0.width,a0=r0.height,i0=r0.viewBox,s0=r0.className,o0=r0.style,l0=r0.title,c0=r0.desc,u0=_objectWithoutProperties$d(r0,_excluded$d),d0=i0||{width:n0,height:a0,x:0,y:0},h0=clsx("recharts-surface",s0);return React__default.createElement("svg",_extends$n({},filterProps(u0,!0,"svg"),{className:h0,width:n0,height:a0,style:o0,viewBox:"".concat(d0.x," ").concat(d0.y," ").concat(d0.width," ").concat(d0.height)}),React__default.createElement("title",null,l0),React__default.createElement("desc",null,c0),e0)}var _excluded$c=["children","className"];function _extends$m(){return _extends$m=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$m.apply(this,arguments)}function _objectWithoutProperties$c(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$c(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$c(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}var Layer=React__default.forwardRef(function(r0,e0){var n0=r0.children,a0=r0.className,i0=_objectWithoutProperties$c(r0,_excluded$c),s0=clsx("recharts-layer",a0);return React__default.createElement("g",_extends$m({className:s0},filterProps(i0,!0),{ref:e0}),n0)}),warn$1=function r0(e0,n0){for(var a0=arguments.length,i0=new Array(a0>2?a0-2:0),s0=2;s0<a0;s0++)i0[s0-2]=arguments[s0]};function baseSlice$1(r0,e0,n0){var a0=-1,i0=r0.length;e0<0&&(e0=-e0>i0?0:i0+e0),n0=n0>i0?i0:n0,n0<0&&(n0+=i0),i0=e0>n0?0:n0-e0>>>0,e0>>>=0;for(var s0=Array(i0);++a0<i0;)s0[a0]=r0[a0+e0];return s0}var _baseSlice=baseSlice$1,baseSlice=_baseSlice;function castSlice$1(r0,e0,n0){var a0=r0.length;return n0=n0===void 0?a0:n0,!e0&&n0>=a0?r0:baseSlice(r0,e0,n0)}
657var _castSlice=castSlice$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode$2(r0){return reHasUnicode.test(r0)}var _hasUnicode=hasUnicode$2;function asciiToArray$1(r0){return r0.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(r0){return r0.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(r0){return hasUnicode$1(r0)?unicodeToArray(r0):asciiToArray(r0)}var _stringToArray=stringToArray$1,castSlice=_castSlice,hasUnicode=_hasUnicode,stringToArray=_stringToArray,toString$1=toString_1;function createCaseFirst$1(r0){return function(e0){e0=toString$1(e0);var n0=hasUnicode(e0)?stringToArray(e0):void 0,a0=n0?n0[0]:e0.charAt(0),i0=n0?castSlice(n0,1).join(""):e0.slice(1);return a0[r0]()+i0}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst;const upperFirst$1=getDefaultExportFromCjs(upperFirst_1);function constant$3(r0){return function(){return r0}}const cos=Math.cos,sin=Math.sin,sqrt$1=Math.sqrt,pi$2=Math.PI,tau$1=2*pi$2,pi$1=Math.PI,tau=2*pi$1,epsilon=1e-6,tauEpsilon=tau-epsilon;function append(r0){this._+=r0[0];for(let e0=1,n0=r0.length;e0<n0;++e0)this._+=arguments[e0]+r0[e0]}
657function appendRound(r0){let e0=Math.floor(r0);if(!(e0>=0))throw new Error(`invalid digits: ${r0}`);if(e0>15)return append;const n0=10**e0;return function(a0){this._+=a0[0];for(let i0=1,s0=a0.length;i0<s0;++i0)this._+=Math.round(arguments[i0]*n0)/n0+a0[i0]}}class Path{constructor(e0){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e0==null?append:appendRound(e0)}moveTo(e0,n0){this._append`M${this._x0=this._x1=+e0},${this._y0=this._y1=+n0}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e0,n0){this._append`L${this._x1=+e0},${this._y1=+n0}`}quadraticCurveTo(e0,n0,a0,i0){this._append`Q${+e0},${+n0},${this._x1=+a0},${this._y1=+i0}`}bezierCurveTo(e0,n0,a0,i0,s0,o0){this._append`C${+e0},${+n0},${+a0},${+i0},${this._x1=+s0},${this._y1=+o0}`}arcTo(e0,n0,a0,i0,s0){if(e0=+e0,n0=+n0,a0=+a0,i0=+i0,s0=+s0,s0<0)throw new Error(`negative radius: ${s0}`);let o0=this._x1,l0=this._y1,c0=a0-e0,u0=i0-n0,d0=o0-e0,h0=l0-n0,f0=d0*d0+h0*h0;if(this._x1===null)this._append`M${this._x1=e0},${this._y1=n0}`;else if(f0>epsilon)if(!(Math.abs(h0*c0-u0*d0)>epsilon)||!s0)this._append`L${this._x1=e0},${this._y1=n0}`;else{let p0=a0-o0,A0=i0-l0,m0=c0*c0+u0*u0,x0=p0*p0+A0*A0,g0=Math.sqrt(m0),y0=Math.sqrt(f0),b0=s0*Math.tan((pi$1-Math.acos((m0+f0-x0)/(2*g0*y0)))/2),E0=b0/y0,w0=b0/g0;Math.abs(E0-1)>epsilon&&this._append`L${e0+E0*d0},${n0+E0*h0}`,this._append`A${s0},${s0},0,0,${+(h0*p0>d0*A0)},${this._x1=e0+w0*c0},${this._y1=n0+w0*u0}`}}arc(e0,n0,a0,i0,s0,o0){if(e0=+e0,n0=+n0,a0=+a0,o0=!!o0,a0<0)throw new Error(`negative radius: ${a0}`);let l0=a0*Math.cos(i0),c0=a0*Math.sin(i0),u0=e0+l0,d0=n0+c0,h0=1^o0,f0=o0?i0-s0:s0-i0;this._x1===null?this._append`M${u0},${d0}`:(Math.abs(this._x1-u0)>epsilon||Math.abs(this._y1-d0)>epsilon)&&this._append`L${u0},${d0}`,a0&&(f0<0&&(f0=f0%tau+tau),f0>tauEpsilon?this._append`A${a0},${a0},0,1,${h0},${e0-l0},${n0-c0}A${a0},${a0},0,1,${h0},${this._x1=u0},${this._y1=d0}`:f0>epsilon&&this._append`A${a0},${a0},0,${+(f0>=pi$1)},${h0},${this._x1=e0+a0*Math.cos(s0)},${this._y1=n0+a0*Math.sin(s0)}`)}rect(e0,n0,a0,i0){this._append`M${this._x0=this._x1=+e0},${this._y0=this._y1=+n0}h${a0=+a0}v${+i0}h${-a0}Z`}toString(){return this._}}function withPath(r0){let e0=3;return r0.digits=function(n0){if(!arguments.length)return e0;if(n0==null)e0=null;else{const a0=Math.floor(n0);if(!(a0>=0))throw new RangeError(`invalid digits: ${n0}`);e0=a0}return r0},()=>new Path(e0)}function array(r0){return typeof r0=="object"&&"length"in r0?r0:Array.from(r0)}function Linear(r0){this._context=r0}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r0,e0){switch(r0=+r0,e0=+e0,this._point){case 0:this._point=1,this._line?this._context.lineTo(r0,e0):this._context.moveTo(r0,e0);break;case 1:this._point=2;default:this._context.lineTo(r0,e0);break}}};function curveLinear(r0){return new Linear(r0)}function x$1(r0){return r0[0]}function y$1(r0){return r0[1]}function shapeLine(r0,e0){var n0=constant$3(!0),a0=null,i0=curveLinear,s0=null,o0=withPath(l0);r0=typeof r0=="function"?r0:r0===void 0?x$1:constant$3(r0),e0=typeof e0=="function"?e0:e0===void 0?y$1:constant$3(e0);function l0(c0){var u0,d0=(c0=array(c0)).length,h0,f0=!1,p0;for(a0==null&&(s0=i0(p0=o0())),u0=0;u0<=d0;++u0)!(u0<d0&&n0(h0=c0[u0],u0,c0))===f0&&((f0=!f0)?s0.lineStart():s0.lineEnd()),f0&&s0.point(+r0(h0,u0,c0),+e0(h0,u0,c0));if(p0)return s0=null,p0+""||null}return l0.x=function(c0){return arguments.length?(r0=typeof c0=="function"?c0:constant$3(+c0),l0):r0},l0.y=function(c0){return arguments.length?(e0=typeof c0=="function"?c0:constant$3(+c0),l0):e0},l0.defined=function(c0){return arguments.length?(n0=typeof c0=="function"?c0:constant$3(!!c0),l0):n0},l0.curve=function(c0){return arguments.length?(i0=c0,a0!=null&&(s0=i0(a0)),l0):i0},l0.context=function(c0){return arguments.length?(c0==null?a0=s0=null:s0=i0(a0=c0),l0):a0},l0}function shapeArea(r0,e0,n0){var a0=null,i0=constant$3(!0),s0=null,o0=curveLinear,l0=null,c0=withPath(u0);r0=typeof r0=="function"?r0:r0===void 0?x$1:constant$3(+r0),e0=typeof e0=="function"?e0:constant$3(e0===void 0?0:+e0),n0=typeof n0=="function"?n0:n0===void 0?y$1:constant$3(+n0);function u0(h0){var f0,p0,A0,m0=(h0=array(h0)).length,x0,g0=!1,y0,b0=new Array(m0),E0=new Array(m0);for(s0==null&&(l0=o0(y0=c0())),f0=0;f0<=m0;++f0){if(!(f0<m0&&i0(x0=h0[f0],f0,h0))===g0)if(g0=!g0)p0=f0,l0.areaStart(),l0.lineStart();else{for(l0.lineEnd(),l0.lineStart(),A0=f0-1;A0>=p0;--A0)l0.point(b0[A0],E0[A0]);l0.lineEnd(),l0.areaEnd()}g0&&(b0[f0]=+r0(x0,f0,h0),E0[f0]=+e0(x0,f0,h0),l0.point(a0?+a0(x0,f0,h0):b0[f0],n0?+n0(x0,f0,h0):E0[f0]))}if(y0)return l0=null,y0+""||null}function d0(){return shapeLine().defined(i0).curve(o0).context(s0)}return u0.x=function(h0){return arguments.length?(r0=typeof h0=="function"?h0:constant$3(+h0),a0=null,u0):r0},u0.x0=function(h0){return arguments.length?(r0=typeof h0=="function"?h0:constant$3(+h0),u0):r0},u0.x1=function(h0){return arguments.length?(a0=h0==null?null:typeof h0=="function"?h0:constant$3(+h0),u0):a0},u0.y=function(h0){return arguments.length?(e0=typeof h0=="function"?h0:constant$3(+h0),n0=null,u0):e0},u0.y0=function(h0){return arguments.length?(e0=typeof h0=="function"?h0:constant$3(+h0),u0):e0},u0.y1=function(h0){return arguments.length?(n0=h0==null?null:typeof h0=="function"?h0:constant$3(+h0),u0):n0},u0.lineX0=u0.lineY0=function(){return d0().x(r0).y(e0)},u0.lineY1=function(){return d0().x(r0).y(n0)},u0.lineX1=function(){return d0().x(a0).y(e0)},u0.defined=function(h0){return arguments.length?(i0=typeof h0=="function"?h0:constant$3(!!h0),u0):i0},u0.curve=function(h0){return arguments.length?(o0=h0,s0!=null&&(l0=o0(s0)),u0):o0},u0.context=function(h0){return arguments.length?(h0==null?s0=l0=null:l0=o0(s0=h0),u0):s0},u0}class Bump{constructor(e0,n0){this._context=e0,this._x=n0}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e0,n0){switch(e0=+e0,n0=+n0,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e0,n0):this._context.moveTo(e0,n0);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e0)/2,this._y0,this._x0,n0,e0,n0):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n0)/2,e0,this._y0,e0,n0);break}}this._x0=e0,this._y0=n0}}function bumpX(r0){return new Bump(r0,!0)}function bumpY(r0){return new Bump(r0,!1)}const symbolCircle={draw(r0,e0){const n0=sqrt$1(e0/pi$2);r0.moveTo(n0,0),r0.arc(0,0,n0,0,tau$1)}},symbolCross={draw(r0,e0){const n0=sqrt$1(e0/5)/2;r0.moveTo(-3*n0,-n0),r0.lineTo(-n0,-n0),r0.lineTo(-n0,-3*n0),r0.lineTo(n0,-3*n0),r0.lineTo(n0,-n0),r0.lineTo(3*n0,-n0),r0.lineTo(3*n0,n0),r0.lineTo(n0,n0),r0.lineTo(n0,3*n0),r0.lineTo(-n0,3*n0),r0.lineTo(-n0,n0),r0.lineTo(-3*n0,n0),r0.closePath()}},tan30=sqrt$1(1/3),tan30_2=tan30*2,symbolDiamond={draw(r0,e0){const n0=sqrt$1(e0/tan30_2),a0=n0*tan30;r0.moveTo(0,-n0),r0.lineTo(a0,0),r0.lineTo(0,n0),r0.lineTo(-a0,0),r0.closePath()}},symbolSquare={draw(r0,e0){const n0=sqrt$1(e0),a0=-n0/2;r0.rect(a0,a0,n0,n0)}},ka$1=.8908130915292852,kr$1=sin(pi$2/10)/sin(7*pi$2/10),kx$1=sin(tau$1/10)*kr$1,ky$1=-cos(tau$1/10)*kr$1,symbolStar={draw(r0,e0){const n0=sqrt$1(e0*ka$1),a0=kx$1*n0,i0=ky$1*n0;r0.moveTo(0,-n0),r0.lineTo(a0,i0);for(let s0=1;s0<5;++s0){const o0=tau$1*s0/5,l0=cos(o0),c0=sin(o0);r0.lineTo(c0*n0,-l0*n0),r0.lineTo(l0*a0-c0*i0,c0*a0+l0*i0)}r0.closePath()}},sqrt3=sqrt$1(3),symbolTriangle={draw(r0,e0){const n0=-sqrt$1(e0/(sqrt3*3));r0.moveTo(0,n0*2),r0.lineTo(-sqrt3*n0,-n0),r0.lineTo(sqrt3*n0,-n0),r0.closePath()}},c$1=-.5,s$1=sqrt$1(3)/2,k$1=1/sqrt$1(12),a$1=(k$1/2+1)*3,symbolWye={draw(r0,e0){const n0=sqrt$1(e0/a$1),a0=n0/2,i0=n0*k$1,s0=a0,o0=n0*k$1+n0,l0=-s0,c0=o0;r0.moveTo(a0,i0),r0.lineTo(s0,o0),r0.lineTo(l0,c0),r0.lineTo(c$1*a0-s$1*i0,s$1*a0+c$1*i0),r0.lineTo(c$1*s0-s$1*o0,s$1*s0+c$1*o0),r0.lineTo(c$1*l0-s$1*c0,s$1*l0+c$1*c0),r0.lineTo(c$1*a0+s$1*i0,c$1*i0-s$1*a0),r0.lineTo(c$1*s0+s$1*o0,c$1*o0-s$1*s0),r0.lineTo(c$1*l0+s$1*c0,c$1*c0-s$1*l0),r0.closePath()}};
vendor: 6,908 bytes, line 657
657function Symbol$3(r0,e0){let n0=null,a0=withPath(i0);r0=typeof r0=="function"?r0:constant$3(r0||symbolCircle),e0=typeof e0=="function"?e0:constant$3(e0===void 0?64:+e0);function i0(){let s0;if(n0||(n0=s0=a0()),r0.apply(this,arguments).draw(n0,+e0.apply(this,arguments)),s0)return n0=null,s0+""||null}return i0.type=function(s0){return arguments.length?(r0=typeof s0=="function"?s0:constant$3(s0),i0):r0},i0.size=function(s0){return arguments.length?(e0=typeof s0=="function"?s0:constant$3(+s0),i0):e0},i0.context=function(s0){return arguments.length?(n0=s0??null,i0):n0},i0}function noop$3(){}function point$2(r0,e0,n0){r0._context.bezierCurveTo((2*r0._x0+r0._x1)/3,(2*r0._y0+r0._y1)/3,(r0._x0+2*r0._x1)/3,(r0._y0+2*r0._y1)/3,(r0._x0+4*r0._x1+e0)/6,(r0._y0+4*r0._y1+n0)/6)}function Basis(r0){this._context=r0}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r0,e0){switch(r0=+r0,e0=+e0,this._point){case 0:this._point=1,this._line?this._context.lineTo(r0,e0):this._context.moveTo(r0,e0);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,r0,e0);break}this._x0=this._x1,this._x1=r0,this._y0=this._y1,this._y1=e0}};function curveBasis(r0){return new Basis(r0)}function BasisClosed(r0){this._context=r0}BasisClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(r0,e0){switch(r0=+r0,e0=+e0,this._point){case 0:this._point=1,this._x2=r0,this._y2=e0;break;case 1:this._point=2,this._x3=r0,this._y3=e0;break;case 2:this._point=3,this._x4=r0,this._y4=e0,this._context.moveTo((this._x0+4*this._x1+r0)/6,(this._y0+4*this._y1+e0)/6);break;default:point$2(this,r0,e0);break}this._x0=this._x1,this._x1=r0,this._y0=this._y1,this._y1=e0}};function curveBasisClosed(r0){return new BasisClosed(r0)}function BasisOpen(r0){this._context=r0}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(r0,e0){switch(r0=+r0,e0=+e0,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n0=(this._x0+4*this._x1+r0)/6,a0=(this._y0+4*this._y1+e0)/6;this._line?this._context.lineTo(n0,a0):this._context.moveTo(n0,a0);break;case 3:this._point=4;default:point$2(this,r0,e0);break}this._x0=this._x1,this._x1=r0,this._y0=this._y1,this._y1=e0}};function curveBasisOpen(r0){return new BasisOpen(r0)}function LinearClosed(r0){this._context=r0}LinearClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(r0,e0){r0=+r0,e0=+e0,this._point?this._context.lineTo(r0,e0):(this._point=1,this._context.moveTo(r0,e0))}};function curveLinearClosed(r0){return new LinearClosed(r0)}function sign(r0){return r0<0?-1:1}function slope3(r0,e0,n0){var a0=r0._x1-r0._x0,i0=e0-r0._x1,s0=(r0._y1-r0._y0)/(a0||i0<0&&-0),o0=(n0-r0._y1)/(i0||a0<0&&-0),l0=(s0*i0+o0*a0)/(a0+i0);return(sign(s0)+sign(o0))*Math.min(Math.abs(s0),Math.abs(o0),.5*Math.abs(l0))||0}function slope2(r0,e0){var n0=r0._x1-r0._x0;return n0?(3*(r0._y1-r0._y0)/n0-e0)/2:e0}function point$1(r0,e0,n0){var a0=r0._x0,i0=r0._y0,s0=r0._x1,o0=r0._y1,l0=(s0-a0)/3;r0._context.bezierCurveTo(a0+l0,i0+l0*e0,s0-l0,o0-l0*n0,s0,o0)}function MonotoneX(r0){this._context=r0}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r0,e0){var n0=NaN;if(r0=+r0,e0=+e0,!(r0===this._x1&&e0===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r0,e0):this._context.moveTo(r0,e0);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,n0=slope3(this,r0,e0)),n0);break;default:point$1(this,this._t0,n0=slope3(this,r0,e0));break}this._x0=this._x1,this._x1=r0,this._y0=this._y1,this._y1=e0,this._t0=n0}}};function MonotoneY(r0){this._context=new ReflectContext(r0)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(r0,e0){MonotoneX.prototype.point.call(this,e0,r0)};function ReflectContext(r0){this._context=r0}ReflectContext.prototype={moveTo:function(r0,e0){this._context.moveTo(e0,r0)},closePath:function(){this._context.closePath()},lineTo:function(r0,e0){this._context.lineTo(e0,r0)},bezierCurveTo:function(r0,e0,n0,a0,i0,s0){this._context.bezierCurveTo(e0,r0,a0,n0,s0,i0)}};function monotoneX(r0){return new MonotoneX(r0)}function monotoneY(r0){return new MonotoneY(r0)}function Natural(r0){this._context=r0}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r0=this._x,e0=this._y,n0=r0.length;if(n0)if(this._line?this._context.lineTo(r0[0],e0[0]):this._context.moveTo(r0[0],e0[0]),n0===2)this._context.lineTo(r0[1],e0[1]);else for(var a0=controlPoints(r0),i0=controlPoints(e0),s0=0,o0=1;o0<n0;++s0,++o0)this._context.bezierCurveTo(a0[0][s0],i0[0][s0],a0[1][s0],i0[1][s0],r0[o0],e0[o0]);(this._line||this._line!==0&&n0===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(r0,e0){this._x.push(+r0),this._y.push(+e0)}};function controlPoints(r0){var e0,n0=r0.length-1,a0,i0=new Array(n0),s0=new Array(n0),o0=new Array(n0);for(i0[0]=0,s0[0]=2,o0[0]=r0[0]+2*r0[1],e0=1;e0<n0-1;++e0)i0[e0]=1,s0[e0]=4,o0[e0]=4*r0[e0]+2*r0[e0+1];for(i0[n0-1]=2,s0[n0-1]=7,o0[n0-1]=8*r0[n0-1]+r0[n0],e0=1;e0<n0;++e0)a0=i0[e0]/s0[e0-1],s0[e0]-=a0,o0[e0]-=a0*o0[e0-1];for(i0[n0-1]=o0[n0-1]/s0[n0-1],e0=n0-2;e0>=0;--e0)i0[e0]=(o0[e0]-i0[e0+1])/s0[e0];
657for(s0[n0-1]=(r0[n0]+i0[n0-1])/2,e0=0;e0<n0-1;++e0)s0[e0]=2*r0[e0+1]-i0[e0+1];return[i0,s0]}function curveNatural(r0){return new Natural(r0)}function Step(r0,e0){this._context=r0,this._t=e0}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(r0,e0){switch(r0=+r0,e0=+e0,this._point){case 0:this._point=1,this._line?this._context.lineTo(r0,e0):this._context.moveTo(r0,e0);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e0),this._context.lineTo(r0,e0);else{var n0=this._x*(1-this._t)+r0*this._t;this._context.lineTo(n0,this._y),this._context.lineTo(n0,e0)}break}}this._x=r0,this._y=e0}};function curveStep(r0){return new Step(r0,.5)}function stepBefore(r0){return new Step(r0,0)}function stepAfter(r0){return new Step(r0,1)}function stackOffsetNone(r0,e0){if((o0=r0.length)>1)for(var n0=1,a0,i0,s0=r0[e0[0]],o0,l0=s0.length;n0<o0;++n0)for(i0=s0,s0=r0[e0[n0]],a0=0;a0<l0;++a0)s0[a0][1]+=s0[a0][0]=isNaN(i0[a0][1])?i0[a0][0]:i0[a0][1]}function stackOrderNone(r0){for(var e0=r0.length,n0=new Array(e0);--e0>=0;)n0[e0]=e0;return n0}function stackValue(r0,e0){return r0[e0]}function stackSeries(r0){const e0=[];return e0.key=r0,e0}function shapeStack(){var r0=constant$3([]),e0=stackOrderNone,n0=stackOffsetNone,a0=stackValue;function i0(s0){var o0=Array.from(r0.apply(this,arguments),stackSeries),l0,c0=o0.length,u0=-1,d0;for(const h0 of s0)for(l0=0,++u0;l0<c0;++l0)(o0[l0][u0]=[0,+a0(h0,o0[l0].key,u0,s0)]).data=h0;for(l0=0,d0=array(e0(o0));l0<c0;++l0)o0[d0[l0]].index=l0;return n0(o0,d0),o0}return i0.keys=function(s0){return arguments.length?(r0=typeof s0=="function"?s0:constant$3(Array.from(s0)),i0):r0},i0.value=function(s0){return arguments.length?(a0=typeof s0=="function"?s0:constant$3(+s0),i0):a0},i0.order=function(s0){return arguments.length?(e0=s0==null?stackOrderNone:typeof s0=="function"?s0:constant$3(Array.from(s0)),i0):e0},i0.offset=function(s0){return arguments.length?(n0=s0??stackOffsetNone,i0):n0},i0}function stackOffsetExpand(r0,e0){if((a0=r0.length)>0){for(var n0,a0,i0=0,s0=r0[0].length,o0;i0<s0;++i0){for(o0=n0=0;n0<a0;++n0)o0+=r0[n0][i0][1]||0;if(o0)for(n0=0;n0<a0;++n0)r0[n0][i0][1]/=o0}stackOffsetNone(r0,e0)}}function stackOffsetSilhouette(r0,e0){if((i0=r0.length)>0){for(var n0=0,a0=r0[e0[0]],i0,s0=a0.length;n0<s0;++n0){for(var o0=0,l0=0;o0<i0;++o0)l0+=r0[o0][n0][1]||0;a0[n0][1]+=a0[n0][0]=-l0/2}stackOffsetNone(r0,e0)}}function stackOffsetWiggle(r0,e0){if(!(!((o0=r0.length)>0)||!((s0=(i0=r0[e0[0]]).length)>0))){for(var n0=0,a0=1,i0,s0,o0;a0<s0;++a0){for(var l0=0,c0=0,u0=0;l0<o0;++l0){for(var d0=r0[e0[l0]],h0=d0[a0][1]||0,f0=d0[a0-1][1]||0,p0=(h0-f0)/2,A0=0;A0<l0;++A0){var m0=r0[e0[A0]],x0=m0[a0][1]||0,g0=m0[a0-1][1]||0;p0+=x0-g0}c0+=h0,u0+=p0*h0}i0[a0-1][1]+=i0[a0-1][0]=n0,c0&&(n0-=u0/c0)}
vendor: 8,807 bytes, lines 657-660
657i0[a0-1][1]+=i0[a0-1][0]=n0,stackOffsetNone(r0,e0)}}function _typeof$B(r0){"@babel/helpers - typeof";return _typeof$B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$B(r0)}var _excluded$b=["type","size","sizeType"];function _extends$l(){return _extends$l=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$l.apply(this,arguments)}function ownKeys$w(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$w(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$w(Object(n0),!0).forEach(function(a0){_defineProperty$A(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$w(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$A(r0,e0,n0){return e0=_toPropertyKey$A(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$A(r0){var e0=_toPrimitive$A(r0,"string");return _typeof$B(e0)=="symbol"?e0:e0+""}function _toPrimitive$A(r0,e0){if(_typeof$B(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$B(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _objectWithoutProperties$b(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$b(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$b(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}var symbolFactories={symbolCircle,symbolCross,symbolDiamond,symbolSquare,symbolStar,symbolTriangle,symbolWye},RADIAN$2=Math.PI/180,getSymbolFactory=function r0(e0){var n0="symbol".concat(upperFirst$1(e0));return symbolFactories[n0]||symbolCircle},calculateAreaSize=function r0(e0,n0,a0){if(n0==="area")return e0;switch(a0){case"cross":return 5*e0*e0/9;case"diamond":return .5*e0*e0/Math.sqrt(3);case"square":return e0*e0;case"star":{var i0=18*RADIAN$2;return 1.25*e0*e0*(Math.tan(i0)-Math.tan(i0*2)*Math.pow(Math.tan(i0),2))}case"triangle":return Math.sqrt(3)*e0*e0/4;case"wye":return(21-10*Math.sqrt(3))*e0*e0/8;default:return Math.PI*e0*e0/4}},registerSymbol=function r0(e0,n0){symbolFactories["symbol".concat(upperFirst$1(e0))]=n0},Symbols=function r0(e0){var n0=e0.type,a0=n0===void 0?"circle":n0,i0=e0.size,s0=i0===void 0?64:i0,o0=e0.sizeType,l0=o0===void 0?"area":o0,c0=_objectWithoutProperties$b(e0,_excluded$b),u0=_objectSpread$w(_objectSpread$w({},c0),{},{type:a0,size:s0,sizeType:l0}),d0=function(){var x0=getSymbolFactory(a0),g0=Symbol$3().type(x0).size(calculateAreaSize(s0,l0,a0));return g0()},h0=u0.className,f0=u0.cx,p0=u0.cy,A0=filterProps(u0,!0);return f0===+f0&&p0===+p0&&s0===+s0?React__default.createElement("path",_extends$l({},A0,{className:clsx("recharts-symbols",h0),transform:"translate(".concat(f0,", ").concat(p0,")"),d:d0()})):null};Symbols.registerSymbol=registerSymbol;function _typeof$A(r0){"@babel/helpers - typeof";return _typeof$A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$A(r0)}function _extends$k(){return _extends$k=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$k.apply(this,arguments)}function ownKeys$v(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$v(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$v(Object(n0),!0).forEach(function(a0){_defineProperty$z(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$v(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$g(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$z(a0.key),a0)}}function _createClass$g(r0,e0,n0){return e0&&_defineProperties$g(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$c(r0,e0,n0){return e0=_getPrototypeOf$d(e0),_possibleConstructorReturn$d(r0,_isNativeReflectConstruct$d()?Reflect.construct(e0,n0||[],_getPrototypeOf$d(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$d(r0,e0){if(e0&&(_typeof$A(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$d(r0)}function _assertThisInitialized$d(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$d(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$d=function(){return!!r0})()}function _getPrototypeOf$d(r0){return _getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$d(r0)}function _inherits$d(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$d(r0,e0)}function _setPrototypeOf$d(r0,e0){return _setPrototypeOf$d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$d(r0,e0)}function _defineProperty$z(r0,e0,n0){return e0=_toPropertyKey$z(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$z(r0){var e0=_toPrimitive$z(r0,"string");return _typeof$A(e0)=="symbol"?e0:e0+""}function _toPrimitive$z(r0,e0){if(_typeof$A(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$A(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var SIZE=32,DefaultLegendContent=function(r0){function e0(){return _classCallCheck$g(this,e0),_callSuper$c(this,e0,arguments)}return _inherits$d(e0,r0),_createClass$g(e0,[{key:"renderIcon",value:function(a0){var i0=this.props.inactiveColor,s0=SIZE/2,o0=SIZE/6,l0=SIZE/3,c0=a0.inactive?i0:a0.color;if(a0.type==="plainline")return React__default.createElement("line",{strokeWidth:4,fill:"none",stroke:c0,strokeDasharray:a0.payload.strokeDasharray,x1:0,y1:s0,x2:SIZE,y2:s0,className:"recharts-legend-icon"});if(a0.type==="line")return React__default.createElement("path",{strokeWidth:4,fill:"none",stroke:c0,d:"M0,".concat(s0,"h").concat(l0,` 658 A`).concat(o0,",").concat(o0,",0,1,1,").concat(2*l0,",").concat(s0,` 659 H`).concat(SIZE,"M").concat(2*l0,",").concat(s0,` 660 A`).concat(o0,",").concat(o0,",0,1,1,").concat(l0,",").concat(s0),className:"recharts-legend-icon"});if(a0.type==="rect")return React__default.createElement("path",{stroke:"none",fill:c0,d:"M0,".concat(SIZE/8,"h").concat(SIZE,"v").concat(SIZE*3/4,"h").concat(-SIZE,"z"),className:"recharts-legend-icon"});if(React__default.isValidElement(a0.legendIcon)){var u0=_objectSpread$v({},a0);return delete u0.legendIcon,React__default.cloneElement(a0.legendIcon,u0)}
660return React__default.createElement(Symbols,{fill:c0,cx:s0,cy:s0,size:SIZE,sizeType:"diameter",type:a0.type})}},{key:"renderItems",value:function(){var a0=this,i0=this.props,s0=i0.payload,o0=i0.iconSize,l0=i0.layout,c0=i0.formatter,u0=i0.inactiveColor,d0={x:0,y:0,width:SIZE,height:SIZE},h0={display:l0==="horizontal"?"inline-block":"block",marginRight:10},f0={display:"inline-block",verticalAlign:"middle",marginRight:4};return s0.map(function(p0,A0){var m0=p0.formatter||c0,x0=clsx(_defineProperty$z(_defineProperty$z({"recharts-legend-item":!0},"legend-item-".concat(A0),!0),"inactive",p0.inactive));if(p0.type==="none")return null;var g0=isFunction$3(p0.value)?null:p0.value;warn$1(!isFunction$3(p0.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var y0=p0.inactive?u0:p0.color;return React__default.createElement("li",_extends$k({className:x0,style:h0,key:"legend-item-".concat(A0)},adaptEventsOfChild(a0.props,p0,A0)),React__default.createElement(Surface,{width:o0,height:o0,viewBox:d0,style:f0},a0.renderIcon(p0)),React__default.createElement("span",{className:"recharts-legend-item-text",style:{color:y0}},m0?m0(g0,p0,A0):g0))})}},{key:"render",value:function(){var a0=this.props,i0=a0.payload,s0=a0.layout,o0=a0.align;if(!i0||!i0.length)return null;var l0={padding:0,margin:0,textAlign:s0==="horizontal"?o0:"left"};return React__default.createElement("ul",{className:"recharts-default-legend",style:l0},this.renderItems())}}])}(reactExports.PureComponent);_defineProperty$z(DefaultLegendContent,"displayName","Legend");_defineProperty$z(DefaultLegendContent,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(r0){var e0=this.__data__,n0=e0.delete(r0);return this.size=e0.size,n0}var _stackDelete=stackDelete$1;function stackGet$1(r0){return this.__data__.get(r0)}var _stackGet=stackGet$1;function stackHas$1(r0){return this.__data__.has(r0)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE$1=200;function stackSet$1(r0,e0){var n0=this.__data__;if(n0 instanceof ListCache$1){var a0=n0.__data__;if(!Map$2||a0.length<LARGE_ARRAY_SIZE$1-1)return a0.push([r0,e0]),this.size=++n0.size,this;n0=this.__data__=new MapCache$1(a0)}return n0.set(r0,e0),this.size=n0.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(r0){var e0=this.__data__=new ListCache(r0);this.size=e0.size}Stack$2.prototype.clear=stackClear;Stack$2.prototype.delete=stackDelete;Stack$2.prototype.get=stackGet;Stack$2.prototype.has=stackHas;Stack$2.prototype.set=stackSet;var _Stack=Stack$2,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(r0){return this.__data__.set(r0,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(r0){return this.__data__.has(r0)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCac
vendor: 6,083 bytes, line 660
660heHas;function SetCache$2(r0){var e0=-1,n0=r0==null?0:r0.length;for(this.__data__=new MapCache;++e0<n0;)this.add(r0[e0])}SetCache$2.prototype.add=SetCache$2.prototype.push=setCacheAdd;SetCache$2.prototype.has=setCacheHas;var _SetCache=SetCache$2;function arraySome$2(r0,e0){for(var n0=-1,a0=r0==null?0:r0.length;++n0<a0;)if(e0(r0[n0],n0,r0))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$2(r0,e0){return r0.has(e0)}var _cacheHas=cacheHas$2,SetCache$1=_SetCache,arraySome$1=_arraySome,cacheHas$1=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(r0,e0,n0,a0,i0,s0){var o0=n0&COMPARE_PARTIAL_FLAG$5,l0=r0.length,c0=e0.length;if(l0!=c0&&!(o0&&c0>l0))return!1;var u0=s0.get(r0),d0=s0.get(e0);if(u0&&d0)return u0==e0&&d0==r0;var h0=-1,f0=!0,p0=n0&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(s0.set(r0,e0),s0.set(e0,r0);++h0<l0;){var A0=r0[h0],m0=e0[h0];if(a0)var x0=o0?a0(m0,A0,h0,e0,r0,s0):a0(A0,m0,h0,r0,e0,s0);if(x0!==void 0){if(x0)continue;f0=!1;break}if(p0){if(!arraySome$1(e0,function(g0,y0){if(!cacheHas$1(p0,y0)&&(A0===g0||i0(A0,g0,n0,a0,s0)))return p0.push(y0)})){f0=!1;break}}else if(!(A0===m0||i0(A0,m0,n0,a0,s0))){f0=!1;break}}return s0.delete(r0),s0.delete(e0),f0}var _equalArrays=equalArrays$2,root$5=_root,Uint8Array$2=root$5.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(r0){var e0=-1,n0=Array(r0.size);return r0.forEach(function(a0,i0){n0[++e0]=[i0,a0]}),n0}var _mapToArray=mapToArray$1;function setToArray$3(r0){var e0=-1,n0=Array(r0.size);return r0.forEach(function(a0){n0[++e0]=a0}),n0}var _setToArray=setToArray$3,Symbol$2=_Symbol,Uint8Array$1=_Uint8Array,eq$1=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$2="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(r0,e0,n0,a0,i0,s0,o0){switch(n0){case dataViewTag$2:if(r0.byteLength!=e0.byteLength||r0.byteOffset!=e0.byteOffset)return!1;r0=r0.buffer,e0=e0.buffer;case arrayBufferTag$1:return!(r0.byteLength!=e0.byteLength||!s0(new Uint8Array$1(r0),new Uint8Array$1(e0)));case boolTag$2:case dateTag$1:case numberTag$1:return eq$1(+r0,+e0);case errorTag$1:return r0.name==e0.name&&r0.message==e0.message;case regexpTag$1:case stringTag$1:return r0==e0+"";case mapTag$2:var l0=mapToArray;case setTag$2:var c0=a0&COMPARE_PARTIAL_FLAG$4;if(l0||(l0=setToArray$2),r0.size!=e0.size&&!c0)return!1;var u0=o0.get(r0);if(u0)return u0==e0;a0|=COMPARE_UNORDERED_FLAG$2,o0.set(r0,e0);var d0=equalArrays$1(l0(r0),l0(e0),a0,i0,s0,o0);return o0.delete(r0),d0;case symbolTag:if(symbolValueOf)return symbolValueOf.call(r0)==symbolValueOf.call(e0)}return!1}var _equalByTag=equalByTag$1;function arrayPush$2(r0,e0){for(var n0=-1,a0=e0.length,i0=r0.length;++n0<a0;)r0[i0+n0]=e0[n0];return r0}var _arrayPush=arrayPush$2,arrayPush$1=_arrayPush,isArray$a=isArray_1;function baseGetAllKeys$1(r0,e0,n0){var a0=e0(r0);return isArray$a(r0)?a0:arrayPush$1(a0,n0(r0))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(r0,e0){for(var n0=-1,a0=r0==null?0:r0.length,i0=0,s0=[];++n0<a0;){var o0=r0[n0];e0(o0,n0,r0)&&(s0[i0++]=o0)}return s0}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$7=Object.prototype,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(r0){return r0==null?[]:(r0=Object(r0),arrayFilter(nativeGetSymbols(r0),function(e0){return propertyIsEnumerable$1.call(r0,e0)}))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(r0,e0){for(var n0=-1,a0=Array(r0);++n0<r0;)a0[n0]=e0(n0);return a0}var _baseTimes=baseTimes$1,baseGetTag$4=_baseGetTag,isObjectLike$5=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(r0){return isObjectLike$5(r0)&&baseGetTag$4(r0)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$4=isObjectLike_1,objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty,propertyIsEnumerable=objectProto$6.propertyIsEnumerable,isArguments$3=baseIsArguments(function(){return arguments}())?baseIsArguments:function(r0){return isObjectLike$4(r0)&&hasOwnProperty$6.call(r0,"callee")&&!propertyIsEnumerable.call(r0,"callee")},isArguments_1=isArguments$3,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$2.exports;(function(r0,e0){var n0=_root,a0=stubFalse_1,i0=e0&&!e0.nodeType&&e0,s0=i0&&!0&&r0&&!r0.nodeType&&r0,o0=s0&&s0.exports===i0,l0=o0?n0.Buffer:void 0,c0=l0?l0.isBuffer:void 0,u0=c0||a0;r0.exports=u0})(isBuffer$2,isBuffer$2.exports);var isBufferExports=isBuffer$2.exports,MAX_SAFE_INTEGER$2=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$3(r0,e0){var n0=typeof r0;return e0=e0??MAX_SAFE_INTEGER$2,!!e0&&(n0=="number"||n0!="symbol"&&reIsUint.test(r0))&&r0>-1&&r0%1==0&&r0<e0}var _isIndex=isIndex$3,MAX_SAFE_INTEGER$1=9007199254740991;function isLength$3(r0){return typeof r0=="number"&&r0>-1&&r0%1==0&&r0<=MAX_SAFE_INTEGER$1}var isLength_1=isLength$3,baseGetTag$3=_baseGetTag,isLength$2=isLength_1,isObjectLike$3=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$3="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array
660]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag$1]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(r0){return isObjectLike$3(r0)&&isLength$2(r0.length)&&!!typedArrayTags[baseGetTag$3(r0)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$2(r0){return function(e0){return r0(e0)}}var _baseUnary=baseUnary$2,_nodeUtil={exports:{}};_nodeUtil.exports;(function(r0,e0){var n0=_freeGlobal,a0=e0&&!e0.nodeType&&e0,i0=a0&&!0&&r0&&!r0.nodeType&&r0,s0=i0&&i0.exports===a0,o0=s0&&n0.process,l0=function(){try{var c0=i0&&i0.require&&i0.require("util").types;return c0||o0&&o0.binding&&o0.binding("util")}catch{}}();r0.exports=l0})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$1=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$3=nodeIsTypedArray?baseUnary$1(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$3,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$9=isArray_1,isBuffer$1=isBufferExports,isIndex$2=_isIndex,isTypedArray$2=isTypedArray_1,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function arrayLikeKeys$1(r0,e0){var n0=isArray$9(r0),a0=!n0&&isArguments$2(r0),i0=!n0&&!a0&&isBuffer$1(r0),s0=!n0&&!a0&&!i0&&isTypedArray$2(r0),o0=n0||a0||i0||s0,l0=o0?baseTimes(r0.length,String):[],c0=l0.length;for(var u0 in r0)(e0||hasOwnProperty$5.call(r0,u0))&&!(o0&&(u0=="length"||i0&&(u0=="offset"||u0=="parent")||s0&&(u0=="buffer"||u0=="byteLength"||u0=="byteOffset")||isIndex$2(u0,c0)))&&l0.push(u0);return l0}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$4=Object.prototype;function isPrototype$1(r0){var e0=r0&&r0.constructor,n0=typeof e0=="function"&&e0.prototype||objectProto$4;return r0===n0}var _isPrototype=isPrototype$1;function overArg$2(r0,e0){return function(n0){return r0(e0(n0))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype=_isPrototype,nativeKeys=_nativeKeys,objectProto$3=Object.prototype,hasOwnProperty$4=objectProto$3.hasOwnProperty;function baseKeys$1(r0){if(!isPrototype(r0))return nativeKeys(r0);var e0=[];for(var n0 in Object(r0))hasOwnProperty$4.call(r0,n0)&&n0!="constructor"&&e0.push(n0);return e0}var _baseKeys=baseKeys$1,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$4(r0){return r0!=null&&isLength$1(r0.length)&&!isFunction(r0)}var isArrayLike_1=isArrayLike$4,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$3=isArrayLike_1;function keys$4(r0){return isArrayLike$3(r0)?arrayLikeKeys(r0):baseKeys(r0)}var keys_1=keys$4,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$3=keys_1;function getAllKeys$1(r0){return baseGetAllKeys(r0,keys$3,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty;function equalObjects$1(r0,e0,n0,a0,i0,s0){var o0=n0&COMPARE_PARTIAL_FLAG$3,l0=getAllKeys(r0),c0=l0.length,u0=getAllKeys(e0),d0=u0.length;if(c0!=d0&&!o0)return!1;for(var h0=c0;h0--;){var f0=l0[h0];if(!(o0?f0 in e0:hasOwnProperty$3.call(e0,f0)))return!1}var p0=s0.get(r0),A0=s0.get(e0);if(p0&&A0)return p0==e0&&A0==r0;var m0=!0;s0.set(r0,e0),s0.set(e0,r0);for(var x0=o0;++h0<c0;){f0=l0[h0];var g0=r0[f0],y0=e0[f0];if(a0)var b0=o0?a0(y0,g0,f0,e0,r0,s0):a0(g0,y0,f0,r0,e0,s0);if(!(b0===void 0?g0===y0||i0(g0,y0,n0,a0,s0):b0)){m0=!1;break}x0||(x0=f0=="constructor")}if(m0&&!x0){var E0=r0.constructor,w0=e0.constructor;E0!=w0&&"constructor"in r0&&"constructor"in e0&&!(typeof E0=="function"&&E0 instanceof E0&&typeof w0=="function"&&w0 instanceof w0)&&(m0=!1)}return s0.delete(r0),s0.delete(e0),m0}var _equalObjects=equalObjects$1,getNative$4=_getNative,root$4=_root,DataView$2=getNative$4(root$4,"DataView"),_DataView=DataView$2,getNative$3=_getNative,root$3=_root,Promise$2=getNative$3(root$3,"Promise"),_Promise=Promise$2,getNative$2=_getNative,root$2=_root,Set$3=getNative$2(root$2,"Set"),_Set=Set$3,getNative$1=_getNative,root$1=_root,WeakMap$2=getNative$1(root$1,"WeakMap"),_WeakMap=WeakMap$2,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$2=_Set,WeakMap$1=_WeakMap,baseGetTag$2=_baseGetTag,toSource=_toSource,mapTag="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",
vendor: 6,863 bytes, line 660
660setTag="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$1),getTag$2=baseGetTag$2;(DataView$1&&getTag$2(new DataView$1(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$2(new Map$1)!=mapTag||Promise$1&&getTag$2(Promise$1.resolve())!=promiseTag||Set$2&&getTag$2(new Set$2)!=setTag||WeakMap$1&&getTag$2(new WeakMap$1)!=weakMapTag)&&(getTag$2=function(r0){var e0=baseGetTag$2(r0),n0=e0==objectTag$2?r0.constructor:void 0,a0=n0?toSource(n0):"";if(a0)switch(a0){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return e0});var _getTag=getTag$2,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag$1=_getTag,isArray$8=isArray_1,isBuffer=isBufferExports,isTypedArray$1=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag$1="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty;function baseIsEqualDeep$1(r0,e0,n0,a0,i0,s0){var o0=isArray$8(r0),l0=isArray$8(e0),c0=o0?arrayTag:getTag$1(r0),u0=l0?arrayTag:getTag$1(e0);c0=c0==argsTag?objectTag$1:c0,u0=u0==argsTag?objectTag$1:u0;var d0=c0==objectTag$1,h0=u0==objectTag$1,f0=c0==u0;if(f0&&isBuffer(r0)){if(!isBuffer(e0))return!1;o0=!0,d0=!1}if(f0&&!d0)return s0||(s0=new Stack$1),o0||isTypedArray$1(r0)?equalArrays(r0,e0,n0,a0,i0,s0):equalByTag(r0,e0,c0,n0,a0,i0,s0);if(!(n0&COMPARE_PARTIAL_FLAG$2)){var p0=d0&&hasOwnProperty$2.call(r0,"__wrapped__"),A0=h0&&hasOwnProperty$2.call(e0,"__wrapped__");if(p0||A0){var m0=p0?r0.value():r0,x0=A0?e0.value():e0;return s0||(s0=new Stack$1),i0(m0,x0,n0,a0,s0)}}return f0?(s0||(s0=new Stack$1),equalObjects(r0,e0,n0,a0,i0,s0)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$2=isObjectLike_1;function baseIsEqual$3(r0,e0,n0,a0,i0){return r0===e0?!0:r0==null||e0==null||!isObjectLike$2(r0)&&!isObjectLike$2(e0)?r0!==r0&&e0!==e0:baseIsEqualDeep(r0,e0,n0,a0,baseIsEqual$3,i0)}var _baseIsEqual=baseIsEqual$3,Stack=_Stack,baseIsEqual$2=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(r0,e0,n0,a0){var i0=n0.length,s0=i0,o0=!a0;if(r0==null)return!s0;for(r0=Object(r0);i0--;){var l0=n0[i0];if(o0&&l0[2]?l0[1]!==r0[l0[0]]:!(l0[0]in r0))return!1}for(;++i0<s0;){l0=n0[i0];var c0=l0[0],u0=r0[c0],d0=l0[1];if(o0&&l0[2]){if(u0===void 0&&!(c0 in r0))return!1}else{var h0=new Stack;if(a0)var f0=a0(u0,d0,c0,r0,e0,h0);if(!(f0===void 0?baseIsEqual$2(d0,u0,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,a0,h0):f0))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$4=isObject_1;function isStrictComparable$2(r0){return r0===r0&&!isObject$4(r0)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$2=keys_1;function getMatchData$1(r0){for(var e0=keys$2(r0),n0=e0.length;n0--;){var a0=e0[n0],i0=r0[a0];e0[n0]=[a0,i0,isStrictComparable$1(i0)]}return e0}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(r0,e0){return function(n0){return n0==null?!1:n0[r0]===e0&&(e0!==void 0||r0 in Object(n0))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(r0){var e0=getMatchData(r0);return e0.length==1&&e0[0][2]?matchesStrictComparable$1(e0[0][0],e0[0][1]):function(n0){return n0===r0||baseIsMatch(n0,r0,e0)}}var _baseMatches=baseMatches$1;function baseHasIn$1(r0,e0){return r0!=null&&e0 in Object(r0)}var _baseHasIn=baseHasIn$1,castPath=_castPath,isArguments$1=isArguments_1,isArray$7=isArray_1,isIndex$1=_isIndex,isLength=isLength_1,toKey$2=_toKey;function hasPath$1(r0,e0,n0){e0=castPath(e0,r0);for(var a0=-1,i0=e0.length,s0=!1;++a0<i0;){var o0=toKey$2(e0[a0]);if(!(s0=r0!=null&&n0(r0,o0)))break;r0=r0[o0]}return s0||++a0!=i0?s0:(i0=r0==null?0:r0.length,!!i0&&isLength(i0)&&isIndex$1(o0,i0)&&(isArray$7(r0)||isArguments$1(r0)))}var _hasPath=hasPath$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(r0,e0){return r0!=null&&hasPath(r0,e0,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual$1=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(r0,e0){return isKey$1(r0)&&isStrictComparable(e0)?matchesStrictComparable(toKey$1(r0),e0):function(n0){var a0=get(n0,r0);return a0===void 0&&a0===e0?hasIn(n0,r0):baseIsEqual$1(e0,a0,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$b(r0){return r0}var identity_1=identity$b;function baseProperty$1(r0){return function(e0){return e0==null?void 0:e0[r0]}}var _baseProperty=baseProperty$1,baseGet$1=_baseGet;function basePropertyDeep$1(r0){return function(e0){return baseGet$1(e0,r0)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(r0){return isKey(r0)?baseProperty(toKey(r0)):basePropertyDeep(r0)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$a=identity_1,isArray$6=isArray_1,property=property_1;function baseIteratee$8(r0){return typeof r0=="function"?r0:r0==null?identity$a:typeof r0=="object"?isArray$6(r0)?baseMatchesProperty(r0[0],r0[1]):baseMatches(r0):property(r0)}var _baseIteratee=baseIteratee$8;function baseFindIndex$1(r0,e0,n0,a0){for(var i0=r0.length,s0=n0+(a0?1:-1);a0?s0--:++s0<i0;)if(e0(r0[s0],s0,r0))return s0;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(r0){return r0!==r0}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(r0,e0,n0){for(var a0=n0-1,i0=r0.length;++a0<i0;)if(r0[a0]===e0)return a0;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$1(r0,e0,n0){return e0===e0?strictIndexOf(r0,e0,n0):baseFindIndex(r0,baseIsNaN,n0)}var _baseIndexOf=baseIndexOf$1,baseIndexOf=_baseIndexOf;function arrayIncludes$1(r0,e0){var n0=r0==null?0:r0.length;return!!n0&&baseIndexOf(r0,e0,0)>-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(r0,e0,n0){for(var a0=-1,i0=r0==null?0:r0.length;++a0<i0;)if(n0(e0,r0[a0]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$1;function noop$2(){}var noop_1=noop$2,Set$1=_Set,noop$1=noop_1,setToArray$1=_setToArray,INFINITY$1=1/0,createSet$1=Set$1&&1/setToArray$1(new Set$1([,-0]))[1]==INFINITY$1?function(r0){return new Set$1(r0)}
vendor: 11,809 bytes, line 660
660:noop$1,_createSet=createSet$1,SetCache=_SetCache,arrayIncludes=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,cacheHas=_cacheHas,createSet=_createSet,setToArray=_setToArray,LARGE_ARRAY_SIZE=200;function baseUniq$1(r0,e0,n0){var a0=-1,i0=arrayIncludes,s0=r0.length,o0=!0,l0=[],c0=l0;if(n0)o0=!1,i0=arrayIncludesWith;else if(s0>=LARGE_ARRAY_SIZE){var u0=e0?null:createSet(r0);if(u0)return setToArray(u0);o0=!1,i0=cacheHas,c0=new SetCache}else c0=e0?[]:l0;e:for(;++a0<s0;){var d0=r0[a0],h0=e0?e0(d0):d0;if(d0=n0||d0!==0?d0:0,o0&&h0===h0){for(var f0=c0.length;f0--;)if(c0[f0]===h0)continue e;e0&&c0.push(h0),l0.push(d0)}else i0(c0,h0,n0)||(c0!==l0&&c0.push(h0),l0.push(d0))}return l0}var _baseUniq=baseUniq$1,baseIteratee$7=_baseIteratee,baseUniq=_baseUniq;function uniqBy(r0,e0){return r0&&r0.length?baseUniq(r0,baseIteratee$7(e0)):[]}var uniqBy_1=uniqBy;const uniqBy$1=getDefaultExportFromCjs(uniqBy_1);function getUniqPayload(r0,e0,n0){return e0===!0?uniqBy$1(r0,n0):isFunction$3(e0)?uniqBy$1(r0,e0):r0}function _typeof$z(r0){"@babel/helpers - typeof";return _typeof$z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$z(r0)}var _excluded$a=["ref"];function ownKeys$u(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$u(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$u(Object(n0),!0).forEach(function(a0){_defineProperty$y(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$u(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$f(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$y(a0.key),a0)}}function _createClass$f(r0,e0,n0){return e0&&_defineProperties$f(r0.prototype,e0),n0&&_defineProperties$f(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$b(r0,e0,n0){return e0=_getPrototypeOf$c(e0),_possibleConstructorReturn$c(r0,_isNativeReflectConstruct$c()?Reflect.construct(e0,n0||[],_getPrototypeOf$c(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$c(r0,e0){if(e0&&(_typeof$z(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$c(r0)}function _assertThisInitialized$c(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$c(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$c=function(){return!!r0})()}function _getPrototypeOf$c(r0){return _getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$c(r0)}function _inherits$c(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$c(r0,e0)}function _setPrototypeOf$c(r0,e0){return _setPrototypeOf$c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$c(r0,e0)}function _defineProperty$y(r0,e0,n0){return e0=_toPropertyKey$y(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$y(r0){var e0=_toPrimitive$y(r0,"string");return _typeof$z(e0)=="symbol"?e0:e0+""}function _toPrimitive$y(r0,e0){if(_typeof$z(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$z(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _objectWithoutProperties$a(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$a(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$a(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function defaultUniqBy$1(r0){return r0.value}function renderContent$1(r0,e0){if(React__default.isValidElement(r0))return React__default.cloneElement(r0,e0);if(typeof r0=="function")return React__default.createElement(r0,e0);e0.ref;var n0=_objectWithoutProperties$a(e0,_excluded$a);return React__default.createElement(DefaultLegendContent,n0)}var EPS$1=1,Legend=function(r0){function e0(){var n0;_classCallCheck$f(this,e0);for(var a0=arguments.length,i0=new Array(a0),s0=0;s0<a0;s0++)i0[s0]=arguments[s0];return n0=_callSuper$b(this,e0,[].concat(i0)),_defineProperty$y(n0,"lastBoundingBox",{width:-1,height:-1}),n0}return _inherits$c(e0,r0),_createClass$f(e0,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a0=this.wrapperNode.getBoundingClientRect();return a0.height=this.wrapperNode.offsetHeight,a0.width=this.wrapperNode.offsetWidth,a0}return null}},{key:"updateBBox",value:function(){var a0=this.props.onBBoxUpdate,i0=this.getBBox();i0?(Math.abs(i0.width-this.lastBoundingBox.width)>EPS$1||Math.abs(i0.height-this.lastBoundingBox.height)>EPS$1)&&(this.lastBoundingBox.width=i0.width,this.lastBoundingBox.height=i0.height,a0&&a0(i0)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,a0&&a0(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_objectSpread$u({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(a0){var i0=this.props,s0=i0.layout,o0=i0.align,l0=i0.verticalAlign,c0=i0.margin,u0=i0.chartWidth,d0=i0.chartHeight,h0,f0;if(!a0||(a0.left===void 0||a0.left===null)&&(a0.right===void 0||a0.right===null))if(o0==="center"&&s0==="vertical"){var p0=this.getBBoxSnapshot();h0={left:((u0||0)-p0.width)/2}}else h0=o0==="right"?{right:c0&&c0.right||0}:{left:c0&&c0.left||0};if(!a0||(a0.top===void 0||a0.top===null)&&(a0.bottom===void 0||a0.bottom===null))if(l0==="middle"){var A0=this.getBBoxSnapshot();f0={top:((d0||0)-A0.height)/2}}else f0=l0==="bottom"?{bottom:c0&&c0.bottom||0}:{top:c0&&c0.top||0};return _objectSpread$u(_objectSpread$u({},h0),f0)}},{key:"render",value:function(){var a0=this,i0=this.props,s0=i0.content,o0=i0.width,l0=i0.height,c0=i0.wrapperStyle,u0=i0.payloadUniqBy,d0=i0.payload,h0=_objectSpread$u(_objectSpread$u({position:"absolute",width:o0||"auto",height:l0||"auto"},this.getDefaultPosition(c0)),c0);return React__default.createElement("div",{className:"recharts-legend-wrapper",style:h0,ref:function(p0){a0.wrapperNode=p0}},renderContent$1(s0,_objectSpread$u(_objectSpread$u({},this.props),{},{payload:getUniqPayload(d0,u0,defaultUniqBy$1)})))}}],[{key:"getWithHeight",value:function(a0,i0){var s0=_objectSpread$u(_objectSpread$u({},this.defaultProps),a0.props),o0=s0.layout;return o0==="vertical"&&isNumber$1(a0.props.height)?{height:a0.props.height}:o0==="horizontal"?{width:a0.props.width||i0}:null}}])}(reactExports.PureComponent);_defineProperty$y(Legend,"displayName","Legend");_defineProperty$y(Legend,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Symbol$1=_Symbol,isArguments=isArguments_1,isArray$5=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(r0){return isArray$5(r0)||isArguments(r0)||!!(spreadableSymbol&&r0&&r0[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$2(r0,e0,n0,a0,i0){var s0=-1,o0=r0.length;for(n0||(n0=isFlattenable),i0||(i0=[]);++s0<o0;){var l0=r0[s0];e0>0&&n0(l0)?e0>1?baseFlatten$2(l0,e0-1,n0,a0,i0):arrayPush(i0,l0):a0||(i0[i0.length]=l0)}return i0}var _baseFlatten=baseFlatten$2;function createBaseFor$1(r0){return function(e0,n0,a0){for(var i0=-1,s0=Object(e0),o0=a0(e0),l0=o0.length;l0--;){var c0=o0[r0?l0:++i0];if(n0(s0[c0],c0,s0)===!1)break}return e0}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys$1=keys_1;function baseForOwn$2(r0,e0){return r0&&baseFor(r0,e0,keys$1)}var _baseForOwn=baseForOwn$2,isArrayLike$2=isArrayLike_1;function createBaseEach$1(r0,e0){return function(n0,a0){if(n0==null)return n0;if(!isArrayLike$2(n0))return r0(n0,a0);for(var i0=n0.length,s0=e0?i0:-1,o0=Object(n0);(e0?s0--:++s0<i0)&&a0(o0[s0],s0,o0)!==!1;);return n0}}var _createBaseEach=createBaseEach$1,baseForOwn$1=_baseForOwn,createBaseEach=_createBaseEach,baseEach$3=createBaseEach(baseForOwn$1),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$2(r0,e0){var n0=-1,a0=isArrayLike$1(r0)?Array(r0.length):[];return baseEach$2(r0,function(i0,s0,o0){a0[++n0]=e0(i0,s0,o0)}),a0}var _baseMap=baseMap$2;function baseSortBy$1(r0,e0){var n0=r0.length;for(r0.sort(e0);n0--;)r0[n0]=r0[n0].value;return r0}var _baseSortBy=baseSortBy$1,isSymbol$2=isSymbol_1;function compareAscending$1(r0,e0){if(r0!==e0){var n0=r0!==void 0,a0=r0===null,i0=r0===r0,s0=isSymbol$2(r0),o0=e0!==void 0,l0=e0===null,c0=e0===e0,u0=isSymbol$2(e0);if(!l0&&!u0&&!s0&&r0>e0||s0&&o0&&c0&&!l0&&!u0||a0&&o0&&c0||!n0&&c0||!i0)return 1;if(!a0&&!s0&&!u0&&r0<e0||u0&&n0&&i0&&!a0&&!s0||l0&&n0&&i0||!o0&&i0||!c0)return-1}return 0}var _compareAscending=compareAscending$1,compareAscending=_compareAscending;function compareMultiple$1(r0,e0,n0){for(var a0=-1,i0=r0.criteria,s0=e0.criteria,o0=i0.length,l0=n0.length;++a0<o0;){var c0=compareAscending(i0[a0],s0[a0]);if(c0){if(a0>=l0)return c0;var u0=n0[a0];return c0*(u0=="desc"?-1:1)}}return r0.index-e0.index}var _compareMultiple=compareMultiple$1,arrayMap$1=_arrayMap,baseGet=_baseGet,baseIteratee$6=_baseIteratee,baseMap$1=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$9=identity_1,isArray$4=isArray_1;function baseOrderBy$1(r0,e0,n0){e0.length?e0=arrayMap$1(e0,function(s0){return isArray$4(s0)?function(o0){return baseGet(o0,s0.length===1?s0[0]:s0)}:s0}):e0=[identity$9];var a0=-1;e0=arrayMap$1(e0,baseUnary(baseIteratee$6));var i0=baseMap$1(r0,function(s0,o0,l0){var c0=arrayMap$1(e0,function(u0){return u0(s0)});return{criteria:c0,index:++a0,value:s0}});return baseSortBy(i0,function(s0,o0){return compareMultiple(s0,o0,n0)})}var _baseOrderBy=baseOrderBy$1;function apply$1(r0,e0,n0){switch(n0.length){case 0:return r0.call(e0);case 1:return r0.call(e0,n0[0]);case 2:return r0.call(e0,n0[0],n0[1]);case 3:return r0.call(e0,n0[0],n0[1],n0[2])}return r0.apply(e0,n0)}var _apply=apply$1,apply=_apply,nativeMax$2=Math.max;function overRest$1(r0,e0,n0){return e0=nativeMax$2(e0===void 0?r0.length-1:e0,0
660),function(){for(var a0=arguments,i0=-1,s0=nativeMax$2(a0.length-e0,0),o0=Array(s0);++i0<s0;)o0[i0]=a0[e0+i0];i0=-1;for(var l0=Array(e0+1);++i0<e0;)l0[i0]=a0[i0];return l0[e0]=n0(o0),apply(r0,this,l0)}}var _overRest=overRest$1;function constant$2(r0){return function(){return r0}}var constant_1=constant$2,getNative=_getNative,defineProperty$2=function(){try{var r0=getNative(Object,"defineProperty");return r0({},"",{}),r0}catch{}}(),_defineProperty$x=defineProperty$2,constant$1=constant_1,defineProperty$1=_defineProperty$x,identity$8=identity_1,baseSetToString$1=defineProperty$1?function(r0,e0){return defineProperty$1(r0,"toString",{configurable:!0,enumerable:!1,value:constant$1(e0),writable:!0})}:identity$8,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$1(r0){var e0=0,n0=0;return function(){var a0=nativeNow(),i0=HOT_SPAN-(a0-n0);if(n0=a0,i0>0){if(++e0>=HOT_COUNT)return arguments[0]}else e0=0;return r0.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,identity$7=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(r0,e0){return setToString(overRest(r0,e0,identity$7),r0+"")}var _baseRest=baseRest$1,eq=eq_1,isArrayLike=isArrayLike_1,isIndex=_isIndex,isObject$3=isObject_1;function isIterateeCall$4(r0,e0,n0){if(!isObject$3(n0))return!1;var a0=typeof e0;return(a0=="number"?isArrayLike(n0)&&isIndex(e0,n0.length):a0=="string"&&e0 in n0)?eq(n0[e0],r0):!1}var _isIterateeCall=isIterateeCall$4,baseFlatten$1=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall$3=_isIterateeCall,sortBy=baseRest(function(r0,e0){if(r0==null)return[];var n0=e0.length;return n0>1&&isIterateeCall$3(r0,e0[0],e0[1])?e0=[]:n0>2&&isIterateeCall$3(e0[0],e0[1],e0[2])&&(e0=[e0[0]]),baseOrderBy(r0,baseFlatten$1(e0,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs(sortBy_1);function _typeof$y(r0){"@babel/helpers - typeof";return _typeof$y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$y(r0)}function _extends$j(){return _extends$j=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$j.apply(this,arguments)}function _slicedToArray$c(r0,e0){return _arrayWithHoles$d(r0)||_iterableToArrayLimit$c(r0,e0)||_unsupportedIterableToArray$k(r0,e0)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 661In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$k(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$k(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$k(r0,e0)}}function _arrayLikeToArray$k(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$c(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$d(r0){if(Array.isArray(r0))return r0}function ownKeys$t(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$t(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};
vendor: 18,232 bytes, line 661
661e0%2?ownKeys$t(Object(n0),!0).forEach(function(a0){_defineProperty$w(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$t(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$w(r0,e0,n0){return e0=_toPropertyKey$x(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$x(r0){var e0=_toPrimitive$x(r0,"string");return _typeof$y(e0)=="symbol"?e0:e0+""}function _toPrimitive$x(r0,e0){if(_typeof$y(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$y(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function defaultFormatter(r0){return Array.isArray(r0)&&isNumOrStr(r0[0])&&isNumOrStr(r0[1])?r0.join(" ~ "):r0}var DefaultTooltipContent=function r0(e0){var n0=e0.separator,a0=n0===void 0?" : ":n0,i0=e0.contentStyle,s0=i0===void 0?{}:i0,o0=e0.itemStyle,l0=o0===void 0?{}:o0,c0=e0.labelStyle,u0=c0===void 0?{}:c0,d0=e0.payload,h0=e0.formatter,f0=e0.itemSorter,p0=e0.wrapperClassName,A0=e0.labelClassName,m0=e0.label,x0=e0.labelFormatter,g0=e0.accessibilityLayer,y0=g0===void 0?!1:g0,b0=function(){if(d0&&d0.length){var $0={padding:0,margin:0},T0=(f0?sortBy$1(d0,f0):d0).map(function(I0,M0){if(I0.type==="none")return null;var N0=_objectSpread$t({display:"block",paddingTop:4,paddingBottom:4,color:I0.color||"#000"},l0),D0=I0.formatter||h0||defaultFormatter,O0=I0.value,B0=I0.name,z0=O0,G0=B0;if(D0&&z0!=null&&G0!=null){var F0=D0(O0,B0,I0,M0,d0);if(Array.isArray(F0)){var Q0=_slicedToArray$c(F0,2);z0=Q0[0],G0=Q0[1]}else z0=F0}return React__default.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M0),style:N0},isNumOrStr(G0)?React__default.createElement("span",{className:"recharts-tooltip-item-name"},G0):null,isNumOrStr(G0)?React__default.createElement("span",{className:"recharts-tooltip-item-separator"},a0):null,React__default.createElement("span",{className:"recharts-tooltip-item-value"},z0),React__default.createElement("span",{className:"recharts-tooltip-item-unit"},I0.unit||""))});return React__default.createElement("ul",{className:"recharts-tooltip-item-list",style:$0},T0)}return null},E0=_objectSpread$t({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s0),w0=_objectSpread$t({margin:0},u0),v0=!isNil$1(m0),S0=v0?m0:"",k0=clsx("recharts-default-tooltip",p0),R0=clsx("recharts-tooltip-label",A0);v0&&x0&&d0!==void 0&&d0!==null&&(S0=x0(m0,d0));var j0=y0?{role:"status","aria-live":"assertive"}:{};return React__default.createElement("div",_extends$j({className:k0,style:E0},j0),React__default.createElement("p",{className:R0,style:w0},React__default.isValidElement(S0)?S0:"".concat(S0)),b0())};function _typeof$x(r0){"@babel/helpers - typeof";return _typeof$x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$x(r0)}function _defineProperty$v(r0,e0,n0){return e0=_toPropertyKey$w(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$w(r0){var e0=_toPrimitive$w(r0,"string");return _typeof$x(e0)=="symbol"?e0:e0+""}function _toPrimitive$w(r0,e0){if(_typeof$x(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$x(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var CSS_CLASS_PREFIX="recharts-tooltip-wrapper",TOOLTIP_HIDDEN={visibility:"hidden"};function getTooltipCSSClassName(r0){var e0=r0.coordinate,n0=r0.translateX,a0=r0.translateY;return clsx(CSS_CLASS_PREFIX,_defineProperty$v(_defineProperty$v(_defineProperty$v(_defineProperty$v({},"".concat(CSS_CLASS_PREFIX,"-right"),isNumber$1(n0)&&e0&&isNumber$1(e0.x)&&n0>=e0.x),"".concat(CSS_CLASS_PREFIX,"-left"),isNumber$1(n0)&&e0&&isNumber$1(e0.x)&&n0<e0.x),"".concat(CSS_CLASS_PREFIX,"-bottom"),isNumber$1(a0)&&e0&&isNumber$1(e0.y)&&a0>=e0.y),"".concat(CSS_CLASS_PREFIX,"-top"),isNumber$1(a0)&&e0&&isNumber$1(e0.y)&&a0<e0.y))}function getTooltipTranslateXY(r0){var e0=r0.allowEscapeViewBox,n0=r0.coordinate,a0=r0.key,i0=r0.offsetTopLeft,s0=r0.position,o0=r0.reverseDirection,l0=r0.tooltipDimension,c0=r0.viewBox,u0=r0.viewBoxDimension;if(s0&&isNumber$1(s0[a0]))return s0[a0];var d0=n0[a0]-l0-i0,h0=n0[a0]+i0;if(e0[a0])return o0[a0]?d0:h0;if(o0[a0]){var f0=d0,p0=c0[a0];return f0<p0?Math.max(h0,c0[a0]):Math.max(d0,c0[a0])}var A0=h0+l0,m0=c0[a0]+u0;return A0>m0?Math.max(d0,c0[a0]):Math.max(h0,c0[a0])}function getTransformStyle(r0){var e0=r0.translateX,n0=r0.translateY,a0=r0.useTranslate3d;return{transform:a0?"translate3d(".concat(e0,"px, ").concat(n0,"px, 0)"):"translate(".concat(e0,"px, ").concat(n0,"px)")}}function getTooltipTranslate(r0){var e0=r0.allowEscapeViewBox,n0=r0.coordinate,a0=r0.offsetTopLeft,i0=r0.position,s0=r0.reverseDirection,o0=r0.tooltipBox,l0=r0.useTranslate3d,c0=r0.viewBox,u0,d0,h0;return o0.height>0&&o0.width>0&&n0?(d0=getTooltipTranslateXY({allowEscapeViewBox:e0,coordinate:n0,key:"x",offsetTopLeft:a0,position:i0,reverseDirection:s0,tooltipDimension:o0.width,viewBox:c0,viewBoxDimension:c0.width}),h0=getTooltipTranslateXY({allowEscapeViewBox:e0,coordinate:n0,key:"y",offsetTopLeft:a0,position:i0,reverseDirection:s0,tooltipDimension:o0.height,viewBox:c0,viewBoxDimension:c0.height}),u0=getTransformStyle({translateX:d0,translateY:h0,useTranslate3d:l0})):u0=TOOLTIP_HIDDEN,{cssProperties:u0,cssClasses:getTooltipCSSClassName({translateX:d0,translateY:h0,coordinate:n0})}}function _typeof$w(r0){"@babel/helpers - typeof";return _typeof$w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$w(r0)}function ownKeys$s(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$s(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$s(Object(n0),!0).forEach(function(a0){_defineProperty$u(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$s(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$e(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$v(a0.key),a0)}}function _createClass$e(r0,e0,n0){return e0&&_defineProperties$e(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$a(r0,e0,n0){return e0=_getPrototypeOf$b(e0),_possibleConstructorReturn$b(r0,_isNativeReflectConstruct$b()?Reflect.construct(e0,n0||[],_getPrototypeOf$b(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$b(r0,e0){if(e0&&(_typeof$w(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$b(r0)}function _assertThisInitialized$b(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$b(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$b=function(){return!!r0})()}function _getPrototypeOf$b(r0){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$b(r0)}function _inherits$b(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$b(r0,e0)}function _setPrototypeOf$b(r0,e0){return _setPrototypeOf$b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$b(r0,e0)}function _defineProperty$u(r0,e0,n0){return e0=_toPropertyKey$v(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$v(r0){var e0=_toPrimitive$v(r0,"string");return _typeof$w(e0)=="symbol"?e0:e0+""}function _toPrimitive$v(r0,e0){if(_typeof$w(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$w(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var EPSILON=1,TooltipBoundingBox=function(r0){function e0(){var n0;_classCallCheck$e(this,e0);for(var a0=arguments.length,i0=new Array(a0),s0=0;s0<a0;s0++)i0[s0]=arguments[s0];return n0=_callSuper$a(this,e0,[].concat(i0)),_defineProperty$u(n0,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),_defineProperty$u(n0,"handleKeyDown",function(o0){if(o0.key==="Escape"){var l0,c0,u0,d0;n0.setState({dismissed:!0,dismissedAtCoordinate:{x:(l0=(c0=n0.props.coordinate)===null||c0===void 0?void 0:c0.x)!==null&&l0!==void 0?l0:0,y:(u0=(d0=n0.props.coordinate)===null||d0===void 0?void 0:d0.y)!==null&&u0!==void 0?u0:0}})}}),n0}return _inherits$b(e0,r0),_createClass$e(e0,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a0=this.wrapperNode.getBoundingClientRect();(Math.abs(a0.width-this.state.lastBoundingBox.width)>EPSILON||Math.abs(a0.height-this.state.lastBoundingBox.height)>EPSILON)&&this.setState({lastBoundingBox:{width:a0.width,height:a0.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var a0,i0;this.props.active&&this.updateBBox(),this.state.dismissed&&(((a0=this.props.coordinate)===null||a0===void 0?void 0:a0.x)!==this.state.dismissedAtCoordinate.x||((i0=this.props.coordinate)===null||i0===void 0?void 0:i0.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var a0=this,i0=this.props,s0=i0.active,o0=i0.allowEscapeViewBox,l0=i0.animationDuration,c0=i0.animationEasing,u0=i0.children,d0=i0.coordinate,h0=i0.hasPayload,f0=i0.isAnimationActive,p0=i0.offset,A0=i0.position,m0=i0.reverseDirection,x0=i0.useTranslate3d,g0=i0.viewBox,y0=i0.wrapperStyle,b0=getTooltipTranslate({allowEscapeViewBox:o0,coordinate:d0,offsetTopLeft:p0,position:A0,reverseDirection:m0,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x0,viewBox:g0}),E0=b0.cssClasses,w0=b0.cssProperties,v0=_objectSpread$s(_objectSpread$s({transition:f0&&s0?"transform ".concat(l0,"ms ").concat(c0):void 0},w0),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s0&&h0?"visible":"hidden",position:"absolute",top:0,left:0},y0);return React__default.createElement("div",{tabIndex:-1,className:E0,style:v0,ref:function(k0){a0.wrapperNode=k0}},u0)}}])}(reactExports.PureComponent),parseIsSsrByDefault=function r0(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Global={isSsr:parseIsSsrByDefault(),get:function r0(e0){return Global[e0]},set:function r0(e0,n0){if(typeof e0=="string")Global[e0]=n0;else{var a0=Object.keys(e0);a0&&a0.length&&a0.forEach(function(i0){Global[i0]=e0[i0]})}}};function _typeof$v(r0){"@babel/helpers - typeof";return _typeof$v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$v(r0)}function ownKeys$r(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$r(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$r(Object(n0),!0).forEach(function(a0){_defineProperty$t(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$r(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$d(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$u(a0.key),a0)}}function _createClass$d(r0,e0,n0){return e0&&_defineProperties$d(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$9(r0,e0,n0){return e0=_getPrototypeOf$a(e0),_possibleConstructorReturn$a(r0,_isNativeReflectConstruct$a()?Reflect.construct(e0,n0||[],_getPrototypeOf$a(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$a(r0,e0){if(e0&&(_typeof$v(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$a(r0)}function _assertThisInitialized$a(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$a(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$a=function(){return!!r0})()}function _getPrototypeOf$a(r0){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$a(r0)}function _inherits$a(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$a(r0,e0)}function _setPrototypeOf$a(r0,e0){return _setPrototypeOf$a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$a(r0,e0)}function _defineProperty$t(r0,e0,n0){return e0=_toPropertyKey$u(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$u(r0){var e0=_toPrimitive$u(r0,"string");return _typeof$v(e0)=="symbol"?e0:e0+""}function _toPrimitive$u(r0,e0){if(_typeof$v(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$v(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function defaultUniqBy(r0){return r0.dataKey}function renderContent(r0,e0){return React__default.isValidElement(r0)?React__default.cloneElement(r0,e0):typeof r0=="function"?React__default.createElement(r0,e0):React__default.createElement(DefaultTooltipContent,e0)}var Tooltip=function(r0){function e0(){return _classCallCheck$d(this,e0),_callSuper$9(this,e0,arguments)}return _inherits$a(e0,r0),_createClass$d(e0,[{key:"render",value:function(){var a0=this,i0=this.props,s0=i0.active,o0=i0.allowEscapeViewBox,l0=i0.animationDuration,c0=i0.animationEasing,u0=i0.content,d0=i0.coordinate,h0=i0.filterNull,f0=i0.isAnimationActive,p0=i0.offset,A0=i0.payload,m0=i0.payloadUniqBy,x0=i0.position,g0=i0.reverseDirection,y0=i0.useTranslate3d,b0=i0.viewBox,E0=i0.wrapperStyle,w0=A0??[];h0&&w0.length&&(w0=getUniqPayload(A0.filter(function(S0){return S0.value!=null&&(S0.hide!==!0||a0.props.includeHidden)}),m0,defaultUniqBy));var v0=w0.length>0;return React__default.createElement(TooltipBoundingBox,{allowEscapeViewBox:o0,animationDuration:l0,animationEasing:c0,isAnimationActive:f0,active:s0,coordinate:d0,hasPayload:v0,offset:p0,position:x0,reverseDirection:g0,useTranslate3d:y0,viewBox:b0,wrapperStyle:E0},renderContent(u0,_objectSpread$r(_objectSpread$r({},this.props),{},{payload:w0})))}}])}(reactExports.PureComponent);_defineProperty$t(Tooltip,"displayName","Tooltip");_defineProperty$t(Tooltip,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Global.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var root=_root,now$1=function(){return root.Date.now()},now_1=now$1,reWhitespace=/\s/;function trimmedEndIndex$1(r0){for(var e0=r0.length;e0--&&reWhitespace.test(r0.charAt(e0)););return e0}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(r0){return r0&&r0.slice(0,trimmedEndIndex(r0)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$2=isObject_1,isSymbol$1=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;
vendor: 4,412 bytes, lines 661-662
661function toNumber$2(r0){if(typeof r0=="number")return r0;if(isSymbol$1(r0))return NAN;if(isObject$2(r0)){var e0=typeof r0.valueOf=="function"?r0.valueOf():r0;r0=isObject$2(e0)?e0+"":e0}if(typeof r0!="string")return r0===0?r0:+r0;r0=baseTrim(r0);var n0=reIsBinary.test(r0);return n0||reIsOctal.test(r0)?freeParseInt(r0.slice(2),n0?2:8):reIsBadHex.test(r0)?NAN:+r0}var toNumber_1=toNumber$2,isObject$1=isObject_1,now=now_1,toNumber$1=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax$1=Math.max,nativeMin=Math.min;function debounce$1(r0,e0,n0){var a0,i0,s0,o0,l0,c0,u0=0,d0=!1,h0=!1,f0=!0;if(typeof r0!="function")throw new TypeError(FUNC_ERROR_TEXT$1);e0=toNumber$1(e0)||0,isObject$1(n0)&&(d0=!!n0.leading,h0="maxWait"in n0,s0=h0?nativeMax$1(toNumber$1(n0.maxWait)||0,e0):s0,f0="trailing"in n0?!!n0.trailing:f0);function p0(v0){var S0=a0,k0=i0;return a0=i0=void 0,u0=v0,o0=r0.apply(k0,S0),o0}function A0(v0){return u0=v0,l0=setTimeout(g0,e0),d0?p0(v0):o0}function m0(v0){var S0=v0-c0,k0=v0-u0,R0=e0-S0;return h0?nativeMin(R0,s0-k0):R0}function x0(v0){var S0=v0-c0,k0=v0-u0;return c0===void 0||S0>=e0||S0<0||h0&&k0>=s0}function g0(){var v0=now();if(x0(v0))return y0(v0);l0=setTimeout(g0,m0(v0))}function y0(v0){return l0=void 0,f0&&a0?p0(v0):(a0=i0=void 0,o0)}function b0(){l0!==void 0&&clearTimeout(l0),u0=0,a0=c0=i0=l0=void 0}function E0(){return l0===void 0?o0:y0(now())}function w0(){var v0=now(),S0=x0(v0);if(a0=arguments,i0=this,c0=v0,S0){if(l0===void 0)return A0(c0);if(h0)return clearTimeout(l0),l0=setTimeout(g0,e0),p0(c0)}return l0===void 0&&(l0=setTimeout(g0,e0)),o0}return w0.cancel=b0,w0.flush=E0,w0}var debounce_1=debounce$1,debounce=debounce_1,isObject=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle(r0,e0,n0){var a0=!0,i0=!0;if(typeof r0!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject(n0)&&(a0="leading"in n0?!!n0.leading:a0,i0="trailing"in n0?!!n0.trailing:i0),debounce(r0,e0,{leading:a0,maxWait:e0,trailing:i0})}var throttle_1=throttle;const throttle$1=getDefaultExportFromCjs(throttle_1);function _typeof$u(r0){"@babel/helpers - typeof";return _typeof$u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$u(r0)}function ownKeys$q(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$q(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$q(Object(n0),!0).forEach(function(a0){_defineProperty$s(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$q(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$s(r0,e0,n0){return e0=_toPropertyKey$t(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$t(r0){var e0=_toPrimitive$t(r0,"string");return _typeof$u(e0)=="symbol"?e0:e0+""}function _toPrimitive$t(r0,e0){if(_typeof$u(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$u(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _slicedToArray$b(r0,e0){return _arrayWithHoles$c(r0)||_iterableToArrayLimit$b(r0,e0)||_unsupportedIterableToArray$j(r0,e0)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 662In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$j(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$j(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$j(r0,e0)}}function _arrayLikeToArray$j(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;
vendor: 12,713 bytes, lines 662-667
662n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$b(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$c(r0){if(Array.isArray(r0))return r0}var ResponsiveContainer=reactExports.forwardRef(function(r0,e0){var n0=r0.aspect,a0=r0.initialDimension,i0=a0===void 0?{width:-1,height:-1}:a0,s0=r0.width,o0=s0===void 0?"100%":s0,l0=r0.height,c0=l0===void 0?"100%":l0,u0=r0.minWidth,d0=u0===void 0?0:u0,h0=r0.minHeight,f0=r0.maxHeight,p0=r0.children,A0=r0.debounce,m0=A0===void 0?0:A0,x0=r0.id,g0=r0.className,y0=r0.onResize,b0=r0.style,E0=b0===void 0?{}:b0,w0=reactExports.useRef(null),v0=reactExports.useRef();v0.current=y0,reactExports.useImperativeHandle(e0,function(){return Object.defineProperty(w0.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w0.current},configurable:!0})});var S0=reactExports.useState({containerWidth:i0.width,containerHeight:i0.height}),k0=_slicedToArray$b(S0,2),R0=k0[0],j0=k0[1],C0=reactExports.useCallback(function(T0,I0){j0(function(M0){var N0=Math.round(T0),D0=Math.round(I0);return M0.containerWidth===N0&&M0.containerHeight===D0?M0:{containerWidth:N0,containerHeight:D0}})},[]);reactExports.useEffect(function(){var T0=function(B0){var z0,G0=B0[0].contentRect,F0=G0.width,Q0=G0.height;C0(F0,Q0),(z0=v0.current)===null||z0===void 0||z0.call(v0,F0,Q0)};m0>0&&(T0=throttle$1(T0,m0,{trailing:!0,leading:!1}));var I0=new ResizeObserver(T0),M0=w0.current.getBoundingClientRect(),N0=M0.width,D0=M0.height;return C0(N0,D0),I0.observe(w0.current),function(){I0.disconnect()}},[C0,m0]);var $0=reactExports.useMemo(function(){var T0=R0.containerWidth,I0=R0.containerHeight;if(T0<0||I0<0)return null;warn$1(isPercent(o0)||isPercent(c0),`The width(%s) and height(%s) are both fixed numbers, 663 maybe you don't need to use a ResponsiveContainer.`,o0,c0),warn$1(!n0||n0>0,"The aspect(%s) must be greater than zero.",n0);var M0=isPercent(o0)?T0:o0,N0=isPercent(c0)?I0:c0;n0&&n0>0&&(M0?N0=M0/n0:N0&&(M0=N0*n0),f0&&N0>f0&&(N0=f0)),warn$1(M0>0||N0>0,`The width(%s) and height(%s) of chart should be greater than 0, 664 please check the style of container, or the props width(%s) and height(%s), 665 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 666 height and width.`,M0,N0,o0,c0,d0,h0,n0);var D0=!Array.isArray(p0)&&getDisplayName(p0.type).endsWith("Chart");return React__default.Children.map(p0,function(O0){return React__default.isValidElement(O0)?reactExports.cloneElement(O0,_objectSpread$q({width:M0,height:N0},D0?{style:_objectSpread$q({height:"100%",width:"100%",maxHeight:N0,maxWidth:M0},O0.props.style)}:{})):O0})},[n0,p0,c0,f0,h0,d0,R0,o0]);return React__default.createElement("div",{id:x0?"".concat(x0):void 0,className:clsx("recharts-responsive-container",g0),style:_objectSpread$q(_objectSpread$q({},E0),{},{width:o0,height:c0,minWidth:d0,minHeight:h0,maxHeight:f0}),ref:w0},$0)}),Cell=function r0(e0){return null};Cell.displayName="Cell";function _typeof$t(r0){"@babel/helpers - typeof";return _typeof$t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$t(r0)}function ownKeys$p(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$p(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$p(Object(n0),!0).forEach(function(a0){_defineProperty$r(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$p(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$r(r0,e0,n0){return e0=_toPropertyKey$s(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$s(r0){var e0=_toPrimitive$s(r0,"string");return _typeof$t(e0)=="symbol"?e0:e0+""}function _toPrimitive$s(r0,e0){if(_typeof$t(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$t(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var stringCache={widthCache:{},cacheCount:0},MAX_CACHE_NUM=2e3,SPAN_STYLE={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},MEASUREMENT_SPAN_ID="recharts_measurement_span";function removeInvalidKeys(r0){var e0=_objectSpread$p({},r0);return Object.keys(e0).forEach(function(n0){e0[n0]||delete e0[n0]}),e0}var getStringSize=function r0(e0){var n0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e0==null||Global.isSsr)return{width:0,height:0};var a0=removeInvalidKeys(n0),i0=JSON.stringify({text:e0,copyStyle:a0});if(stringCache.widthCache[i0])return stringCache.widthCache[i0];try{var s0=document.getElementById(MEASUREMENT_SPAN_ID);s0||(s0=document.createElement("span"),s0.setAttribute("id",MEASUREMENT_SPAN_ID),s0.setAttribute("aria-hidden","true"),document.body.appendChild(s0));var o0=_objectSpread$p(_objectSpread$p({},SPAN_STYLE),a0);Object.assign(s0.style,o0),s0.textContent="".concat(e0);var l0=s0.getBoundingClientRect(),c0={width:l0.width,height:l0.height};return stringCache.widthCache[i0]=c0,++stringCache.cacheCount>MAX_CACHE_NUM&&(stringCache.cacheCount=0,stringCache.widthCache={}),c0}catch{return{width:0,height:0}}},getOffset=function r0(e0){return{top:e0.top+window.scrollY-document.documentElement.clientTop,left:e0.left+window.scrollX-document.documentElement.clientLeft}};function _typeof$s(r0){"@babel/helpers - typeof";return _typeof$s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$s(r0)}function _slicedToArray$a(r0,e0){return _arrayWithHoles$b(r0)||_iterableToArrayLimit$a(r0,e0)||_unsupportedIterableToArray$i(r0,e0)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 667In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$i(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$i(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$i(r0,e0)}}function _arrayLikeToArray$i(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$a(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0===0){if(Object(n0)!==n0)return;c0=!1}else for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$b(r0){if(Array.isArray(r0))return r0}function _classCallCheck$c(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$r(a0.key),a0)}}function _createClass$c(r0,e0,n0){return e0&&_defineProperties$c(r0.prototype,e0),n0&&_defineProperties$c(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _toPropertyKey$r(r0){var e0=_toPrimitive$r(r0,"string");return _typeof$s(e0)=="symbol"?e0:e0+""}function _toPrimitive$r(r0,e0){if(_typeof$s(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0);if(_typeof$s(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r0)}var MULTIPLY_OR_DIVIDE_REGEX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ADD_OR_SUBTRACT_REGEX=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,CSS_LENGTH_UNIT_REGEX=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,NUM_SPLIT_REGEX=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,CONVERSION_RATES={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},FIXED_CSS_LENGTH_UNITS=Object.keys(CONVERSION_RATES),STR_NAN="NaN";function convertToPx(r0,e0){return r0*CONVERSION_RATES[e0]}var DecimalCSS=function(){function r0(e0,n0){_classCallCheck$c(this,r0),this.num=e0,this.unit=n0,this.num=e0,this.unit=n0,Number.isNaN(e0)&&(this.unit=""),n0!==""&&!CSS_LENGTH_UNIT_REGEX.test(n0)&&(this.num=NaN,this.unit=""),FIXED_CSS_LENGTH_UNITS.includes(n0)&&(this.num=convertToPx(e0,n0),this.unit="px")}return _createClass$c(r0,[{key:"add",value:function(n0){return this.unit!==n0.unit?new r0(NaN,""):new r0(this.num+n0.num,this.unit)}},{key:"subtract",value:function(n0){return this.unit!==n0.unit?new r0(NaN,""):new r0(this.num-n0.num,this.unit)}},{key:"multiply",value:function(n0){return this.unit!==""&&n0.unit!==""&&this.unit!==n0.unit?new r0(NaN,""):new r0(this.num*n0.num,this.unit||n0.unit)}},{key:"divide",value:function(n0){return this.unit!==""&&n0.unit!==""&&this.unit!==n0.unit?new r0(NaN,""):new r0(this.num/n0.num,this.unit||n0.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n0){var a0,i0=(a0=NUM_SPLIT_REGEX.exec(n0))!==null&&a0!==void 0?a0:[],s0=_slicedToArray$a(i0,3),o0=s0[1],l0=s0[2];return new r0(parseFloat(o0),l0??"")}}])}();function calculateArithmetic(r0){if(r0.includes(STR_NAN))return STR_NAN;for(var e0=r0;e0.includes("*")||e0.includes("/");){var n0,a0=(n0=MULTIPLY_OR_DIVIDE_REGEX.exec(e0))!==null&&n0!==void 0?n0:[],i0=_slicedToArray$a(a0,4),s0=i0[1],o0=i0[2],l0=i0[3],c0=DecimalCSS.parse(s0??""),u0=DecimalCSS.parse(l0??""),d0=o0==="*"?c0.multiply(u0):c0.divide(u0);if(d0.isNaN())return STR_NAN;e0=e0.replace(MULTIPLY_OR_DIVIDE_REGEX,d0.toString())}for(;e0.includes("+")||/.-\d+(?:\.\d+)?/.test(e0);){var h0,f0=(h0=ADD_OR_SUBTRACT_REGEX.exec(e0))!==null&&h0!==void 0?h0:[],p0=_slicedToArray$a(f0,4),A0=p0[1],m0=p0[2],x0=p0[3],g0=DecimalCSS.parse(A0??""),y0=DecimalCSS.parse(x0??""),b0=m0==="+"?g0.add(y0):g0.subtract(y0);if(b0.isNaN())return STR_NAN;e0=e0.replace(ADD_OR_SUBTRACT_REGEX,b0.toString())}return e0}var PARENTHESES_REGEX=/\(([^()]*)\)/;function calculateParentheses(r0){for(var e0=r0;e0.includes("(");){var n0=PARENTHESES_REGEX.exec(e0),a0=_slicedToArray$a(n0,2),i0=a0[1];e0=e0.replace(PARENTHESES_REGEX,calculateArithmetic(i0))}return e0}function evaluateExpression(r0){var e0=r0.replace(/\s+/g,"");return e0=calculateParentheses(e0),e0=calculateArithmetic(e0),e0}function safeEvaluateExpression(r0){try{return evaluateExpression(r0)}catch{return STR_NAN}}function reduceCSSCalc(r0){var e0=safeEvaluateExpression(r0.slice(5,-1));return e0===STR_NAN?"":e0}var _excluded$9=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_excluded2$3=["dx","dy","angle","className","breakAll"];function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$i.apply(this,arguments)}function _objectWithoutProperties$9(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$9(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$9(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if
667(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function _slicedToArray$9(r0,e0){return _arrayWithHoles$a(r0)||_iterableToArrayLimit$9(r0,e0)||_unsupportedIterableToArray$h(r0,e0)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 668In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$h(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$h(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$h(r0,e0)}}function _arrayLikeToArray$h(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$9(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0===0){if(Object(n0)!==n0)return;c0=!1}else for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$a(r0){if(Array.isArray(r0))return r0}var BREAKING_SPACES=/[ \f\n\r\t\v\u2028\u2029]+/,calculateWordWidths=function r0(e0){var n0=e0.children,a0=e0.breakAll,i0=e0.style;try{var s0=[];isNil$1(n0)||(a0?s0=n0.toString().split(""):s0=n0.toString().split(BREAKING_SPACES));var o0=s0.map(function(c0){return{word:c0,width:getStringSize(c0,i0).width}}),l0=a0?0:getStringSize(" ",i0).width;return{wordsWithComputedWidth:o0,spaceWidth:l0}}catch{return null}},calculateWordsByLines=function r0(e0,n0,a0,i0,s0){var o0=e0.maxLines,l0=e0.children,c0=e0.style,u0=e0.breakAll,d0=isNumber$1(o0),h0=l0,f0=function(){var M0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M0.reduce(function(N0,D0){var O0=D0.word,B0=D0.width,z0=N0[N0.length-1];if(z0&&(i0==null||s0||z0.width+B0+a0<Number(i0)))z0.words.push(O0),z0.width+=B0+a0;else{var G0={words:[O0],width:B0};N0.push(G0)}return N0},[])},p0=f0(n0),A0=function(M0){return M0.reduce(function(N0,D0){return N0.width>D0.width?N0:D0})};if(!d0)return p0;for(var m0="â¦",x0=function(M0){var N0=h0.slice(0,M0),D0=calculateWordWidths({breakAll:u0,style:c0,children:N0+m0}).wordsWithComputedWidth,O0=f0(D0),B0=O0.length>o0||A0(O0).width>Number(i0);return[B0,O0]},g0=0,y0=h0.length-1,b0=0,E0;g0<=y0&&b0<=h0.length-1;){var w0=Math.floor((g0+y0)/2),v0=w0-1,S0=x0(v0),k0=_slicedToArray$9(S0,2),R0=k0[0],j0=k0[1],C0=x0(w0),$0=_slicedToArray$9(C0,1),T0=$0[0];if(!R0&&!T0&&(g0=w0+1),R0&&T0&&(y0=w0-1),!R0&&T0){E0=j0;break}b0++}return E0||p0},getWordsWithoutCalculate=function r0(e0){var n0=isNil$1(e0)?[]:e0.toString().split(BREAKING_SPACES);return[{words:n0}]},getWordsByLines=function r0(e0){var n0=e0.width,a0=e0.scaleToFit,i0=e0.children,s0=e0.style,o0=e0.breakAll,l0=e0.maxLines;if((n0||a0)&&!Global.isSsr){var c0,u0,d0=calculateWordWidths({breakAll:o0,children:i0,style:s0});if(d0){var h0=d0.wordsWithComputedWidth,f0=d0.spaceWidth;c0=h0,u0=f0}else return getWordsWithoutCalculate(i0);return calculateWordsByLines({breakAll:o0,children:i0,maxLines:l0,style:s0},c0,u0,n0,a0)}return getWordsWithoutCalculate(i0)},DEFAULT_FILL="#808080",Text=function r0(e0){var n0=e0.x,a0=n0===void 0?0:n0,i0=e0.y,s0=i0===void 0?0:i0,o0=e0.lineHeight,l0=o0===void 0?"1em":o0,c0=e0.capHeight,u0=c0===void 0?"0.71em":c0,d0=e0.scaleToFit,h0=d0===void 0?!1:d0,f0=e0.textAnchor,p0=f0===void 0?"start":f0,A0=e0.verticalAnchor,m0=A0===void 0?"end":A0,x0=e0.fill,g0=x0===void 0?DEFAULT_FILL:x0,y0=_objectWithoutProperties$9(e0,_excluded$9),b0=reactExports.useMemo(function(){return getWordsByLines({breakAll:y0.breakAll,children:y0.children,maxLines:y0.maxLines,scaleToFit:h0,style:y0.style,width:y0.width})},[y0.breakAll,y0.children,y0.maxLines,h0,y0.style,y0.width]),E0=y0.dx,w0=y0.dy,v0=y0.angle,S0=y0.className,k0=y0.breakAll,R0=_objectWithoutProperties$9(y0,_excluded2$3);if(!isNumOrStr(a0)||!isNumOrStr(s0))return null;var j0=a0+(isNumber$1(E0)?E0:0),C0=s0+(isNumber$1(w0)?w0:0),$0;switch(m0){case"start":$0=reduceCSSCalc("calc(".concat(u0,")"));break;case"middle":$0=reduceCSSCalc("calc(".concat((b0.length-1)/2," * -").concat(l0," + (").concat(u0," / 2))"));break;default:$0=reduceCSSCalc("calc(".concat(b0.length-1," * -").concat(l0,")"));break}var T0=[];if(h0){var I0=b0[0].width,M0=y0.width;T0.push("scale(".concat((isNumber$1(M0)?M0/I0:1)/I0,")"))}return v0&&T0.push("rotate(".concat(v0,", ").concat(j0,", ").concat(C0,")")),T0.length&&(R0.transform=T0.join(" ")),React__default.createElement("text",_extends$i({},filterProps(R0,!0),{x:j0,y:C0,className:clsx("recharts-text",S0),textAnchor:p0,fill:g0.includes("url")?DEFAULT_FILL:g0}),b0.map(function(N0,D0){var O0=N0.words.join(k0?"":" ");return React__default.createElement("tspan",{x:j0,dy:D0===0?$0:l0,key:"".concat(O0,"-").concat(D0)},O0)}))};function ascending(r0,e0){return r0==null||e0==null?NaN:r0<e0?-1:r0>e0?1:r0>=e0?0:NaN}function descending(r0,e0){return r0==null||e0==null?NaN:e0<r0?-1:e0>r0?1:e0>=r0?0:NaN}function bisector(r0){let e0,n0,a0;r0.length!==2?(e0=ascending,n0=(l0,c0)=>ascending(r0(l0),c0),a0=(l0,c0)=>r0(l0)-c0):(e0=r0===ascending||r0===descending?r0:zero$1,n0=r0,a0=r0);function i0(l0,c0,u0=0,d0=l0.length){if(u0<d0){if(e0(c0,c0)!==0)return d0;do{const h0=u0+d0>>>1;n0(l0[h0],c0)<0?u0=h0+1:d0=h0}while(u0<d0)}return u0}function s0(l0,c0,u0=0,d0=l0.length){if(u0<d0){if(e0(c0,c0)!==0)return d0;do{const h0=u0+d0>>>1;n0(l0[h0],c0)<=0?u0=h0+1:d0=h0}while(u0<d0)}return u0}function o0(l0,c0,u0=0,d0=l0.length){const h0=i0(l0,c0,u0,d0-1);return h0>u0&&a0(l0[h0-1],c0)>-a0(l0[h0],c0)?h0-1:h0}return{left:i0,center:o0,right:s0}}function zero$1(){return 0}
668function number$2(r0){return r0===null?NaN:+r0}function*numbers(r0,e0){for(let n0 of r0)n0!=null&&(n0=+n0)>=n0&&(yield n0)}const ascendingBisect=bisector(ascending),bisectRight=ascendingBisect.right;bisector(number$2).center;class InternMap extends Map{constructor(e0,n0=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n0}}),e0!=null)for(const[a0,i0]of e0)this.set(a0,i0)}get(e0){return super.get(intern_get(this,e0))}has(e0){return super.has(intern_get(this,e0))}set(e0,n0){return super.set(intern_set(this,e0),n0)}delete(e0){return super.delete(intern_delete(this,e0))}}function intern_get({_intern:r0,_key:e0},n0){const a0=e0(n0);return r0.has(a0)?r0.get(a0):n0}function intern_set({_intern:r0,_key:e0},n0){const a0=e0(n0);return r0.has(a0)?r0.get(a0):(r0.set(a0,n0),n0)}function intern_delete({_intern:r0,_key:e0},n0){const a0=e0(n0);return r0.has(a0)&&(n0=r0.get(a0),r0.delete(a0)),n0}function keyof(r0){return r0!==null&&typeof r0=="object"?r0.valueOf():r0}function compareDefined(r0=ascending){if(r0===ascending)return ascendingDefined;if(typeof r0!="function")throw new TypeError("compare is not a function");return(e0,n0)=>{const a0=r0(e0,n0);return a0||a0===0?a0:(r0(n0,n0)===0)-(r0(e0,e0)===0)}}function ascendingDefined(r0,e0){return(r0==null||!(r0>=r0))-(e0==null||!(e0>=e0))||(r0<e0?-1:r0>e0?1:0)}const e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function tickSpec(r0,e0,n0){const a0=(e0-r0)/Math.max(0,n0),i0=Math.floor(Math.log10(a0)),s0=a0/Math.pow(10,i0),o0=s0>=e10?10:s0>=e5?5:s0>=e2?2:1;let l0,c0,u0;return i0<0?(u0=Math.pow(10,-i0)/o0,l0=Math.round(r0*u0),c0=Math.round(e0*u0),l0/u0<r0&&++l0,c0/u0>e0&&--c0,u0=-u0):(u0=Math.pow(10,i0)*o0,l0=Math.round(r0/u0),c0=Math.round(e0/u0),l0*u0<r0&&++l0,c0*u0>e0&&--c0),c0<l0&&.5<=n0&&n0<2?tickSpec(r0,e0,n0*2):[l0,c0,u0]}function ticks(r0,e0,n0){if(e0=+e0,r0=+r0,n0=+n0,!(n0>0))return[];if(r0===e0)return[r0];const a0=e0<r0,[i0,s0,o0]=a0?tickSpec(e0,r0,n0):tickSpec(r0,e0,n0);if(!(s0>=i0))return[];const l0=s0-i0+1,c0=new Array(l0);if(a0)if(o0<0)for(let u0=0;u0<l0;++u0)c0[u0]=(s0-u0)/-o0;else for(let u0=0;u0<l0;++u0)c0[u0]=(s0-u0)*o0;else if(o0<0)for(let u0=0;u0<l0;++u0)c0[u0]=(i0+u0)/-o0;else for(let u0=0;u0<l0;++u0)c0[u0]=(i0+u0)*o0;return c0}function tickIncrement(r0,e0,n0){return e0=+e0,r0=+r0,n0=+n0,tickSpec(r0,e0,n0)[2]}function tickStep(r0,e0,n0){e0=+e0,r0=+r0,n0=+n0;const a0=e0<r0,i0=a0?tickIncrement(e0,r0,n0):tickIncrement(r0,e0,n0);return(a0?-1:1)*(i0<0?1/-i0:i0)}function max$2(r0,e0){let n0;for(const a0 of r0)a0!=null&&(n0<a0||n0===void 0&&a0>=a0)&&(n0=a0);return n0}function min$2(r0,e0){let n0;for(const a0 of r0)a0!=null&&(n0>a0||n0===void 0&&a0>=a0)&&(n0=a0);return n0}function quickselect(r0,e0,n0=0,a0=1/0,i0){if(e0=Math.floor(e0),n0=Math.floor(Math.max(0,n0)),a0=Math.floor(Math.min(r0.length-1,a0)),!(n0<=e0&&e0<=a0))return r0;for(i0=i0===void 0?ascendingDefined:compareDefined(i0);a0>n0;){if(a0-n0>600){const c0=a0-n0+1,u0=e0-n0+1,d0=Math.log(c0),h0=.5*Math.exp(2*d0/3),f0=.5*Math.sqrt(d0*h0*(c0-h0)/c0)*(u0-c0/2<0?-1:1),p0=Math.max(n0,Math.floor(e0-u0*h0/c0+f0)),A0=Math.min(a0,Math.floor(e0+(c0-u0)*h0/c0+f0));quickselect(r0,e0,p0,A0,i0)}const s0=r0[e0];let o0=n0,l0=a0;for(swap(r0,n0,e0),i0(r0[a0],s0)>0&&swap(r0,n0,a0);o0<l0;){for(swap(r0,o0,l0),++o0,--l0;i0(r0[o0],s0)<0;)++o0;for(;i0(r0[l0],s0)>0;)--l0}i0(r0[n0],s0)===0?swap(r0,n0,l0):(++l0,swap(r0,l0,a0)),l0<=e0&&(n0=l0+1),e0<=l0&&(a0=l0-1)}return r0}function swap(r0,e0,n0){const a0=r0[e0];r0[e0]=r0[n0],r0[n0]=a0}function quantile$1(r0,e0,n0){if(r0=Float64Array.from(numbers(r0)),!(!(a0=r0.length)||isNaN(e0=+e0))){if(e0<=0||a0<2)return min$2(r0);if(e0>=1)return max$2(r0);var a0,i0=(a0-1)*e0,s0=Math.floor(i0),o0=max$2(quickselect(r0,s0).subarray(0,s0+1)),l0=min$2(r0.subarray(s0+1));return o0+(l0-o0)*(i0-s0)}}function quantileSorted(r0,e0,n0=number$2){if(!(!(a0=r0.length)||isNaN(e0=+e0))){if(e0<=0||a0<2)return+n0(r0[0],0,r0);if(e0>=1)return+n0(r0[a0-1],a0-1,r0);var a0,i0=(a0-1)*e0,s0=Math.floor(i0),o0=+n0(r0[s0],s0,r0),l0=+n0(r0[s0+1],s0+1,r0);return o0+(l0-o0)*(i0-s0)}}function range$3(r0,e0,n0){r0=+r0,e0=+e0,n0=(i0=arguments.length)<2?(e0=r0,r0=0,1):i0<3?1:+n0;for(var a0=-1,i0=Math.max(0,Math.ceil((e0-r0)/n0))|0,s0=new Array(i0);++a0<i0;)s0[a0]=r0+a0*n0;return s0}function initRange(r0,e0){switch(arguments.length){case 0:break;case 1:this.range(r0);break;default:this.range(e0).domain(r0);break}return this}
vendor: 7,400 bytes, line 668
668function initInterpolator(r0,e0){switch(arguments.length){case 0:break;case 1:{typeof r0=="function"?this.interpolator(r0):this.range(r0);break}default:{this.domain(r0),typeof e0=="function"?this.interpolator(e0):this.range(e0);break}}return this}const implicit=Symbol("implicit");function ordinal(){var r0=new InternMap,e0=[],n0=[],a0=implicit;function i0(s0){let o0=r0.get(s0);if(o0===void 0){if(a0!==implicit)return a0;r0.set(s0,o0=e0.push(s0)-1)}return n0[o0%n0.length]}return i0.domain=function(s0){if(!arguments.length)return e0.slice();e0=[],r0=new InternMap;for(const o0 of s0)r0.has(o0)||r0.set(o0,e0.push(o0)-1);return i0},i0.range=function(s0){return arguments.length?(n0=Array.from(s0),i0):n0.slice()},i0.unknown=function(s0){return arguments.length?(a0=s0,i0):a0},i0.copy=function(){return ordinal(e0,n0).unknown(a0)},initRange.apply(i0,arguments),i0}function band(){var r0=ordinal().unknown(void 0),e0=r0.domain,n0=r0.range,a0=0,i0=1,s0,o0,l0=!1,c0=0,u0=0,d0=.5;delete r0.unknown;function h0(){var f0=e0().length,p0=i0<a0,A0=p0?i0:a0,m0=p0?a0:i0;s0=(m0-A0)/Math.max(1,f0-c0+u0*2),l0&&(s0=Math.floor(s0)),A0+=(m0-A0-s0*(f0-c0))*d0,o0=s0*(1-c0),l0&&(A0=Math.round(A0),o0=Math.round(o0));var x0=range$3(f0).map(function(g0){return A0+s0*g0});return n0(p0?x0.reverse():x0)}return r0.domain=function(f0){return arguments.length?(e0(f0),h0()):e0()},r0.range=function(f0){return arguments.length?([a0,i0]=f0,a0=+a0,i0=+i0,h0()):[a0,i0]},r0.rangeRound=function(f0){return[a0,i0]=f0,a0=+a0,i0=+i0,l0=!0,h0()},r0.bandwidth=function(){return o0},r0.step=function(){return s0},r0.round=function(f0){return arguments.length?(l0=!!f0,h0()):l0},r0.padding=function(f0){return arguments.length?(c0=Math.min(1,u0=+f0),h0()):c0},r0.paddingInner=function(f0){return arguments.length?(c0=Math.min(1,f0),h0()):c0},r0.paddingOuter=function(f0){return arguments.length?(u0=+f0,h0()):u0},r0.align=function(f0){return arguments.length?(d0=Math.max(0,Math.min(1,f0)),h0()):d0},r0.copy=function(){return band(e0(),[a0,i0]).round(l0).paddingInner(c0).paddingOuter(u0).align(d0)},initRange.apply(h0(),arguments)}function pointish(r0){var e0=r0.copy;return r0.padding=r0.paddingOuter,delete r0.paddingInner,delete r0.paddingOuter,r0.copy=function(){return pointish(e0())},r0}function point(){return pointish(band.apply(null,arguments).paddingInner(1))}function define(r0,e0,n0){r0.prototype=e0.prototype=n0,n0.constructor=r0}function extend(r0,e0){var n0=Object.create(r0.prototype);for(var a0 in e0)n0[a0]=e0[a0];return n0}function Color(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),reRgbPercent=new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),reRgbaInteger=new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),reRgbaPercent=new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),reHslPercent=new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),reHslaPercent=new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define(Color,color,{copy(r0){return Object.assign(new this.constructor,this,r0)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(r0){var e0,n0;return r0=(r0+"").trim().toLowerCase(),(e0=reHex.exec(r0))?(n0=e0[1].length,e0=parseInt(e0[1],16),n0===6?rgbn(e0):n0===3?new Rgb(e0>>8&15|e0>>4&240,e0>>4&15|e0&240,(e0&15)<<4|e0&15,1):n0===8?rgba(e0>>24&255,e0>>16&255,e0>>8&255,(e0&255)/255):n0===4?rgba(e0>>12&15|e0>>8&240,e0>>8&15|e0>>4&240,e0>>4&15|e0&240,((e0&15)<<4|e0&15)/255):null):(e0=reRgbInteger.exec(r0))?new Rgb(e0[1],e0[2],e0[3],1):(e0=reRgbPercent.exec(r0))?new Rgb(e0[1]*255/100,e0[2]*255/100,e0[3]*255/100,1):(e0=reRgbaInteger.exec(r0))?rgba(e0[1],e0[2],e0[3],e0[4]):(e0=reRgbaPercent.exec(r0))?rgba(e0[1]*255/100,e0[2]*255/100,e0[3]*255/100,e0[4]):(e0=reHslPercent.exec(r0))?hsla(e0[1],e0[2]/100,e0[3]/100,1):(e0=reHslaPercent.exec(r0))?hsla(e0[1],e0[2]/100,e0[3]/100,e0[4]):named.hasOwnProperty(r0)?rgbn(named[r0]):r0==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(r0){return new Rgb(r0>>16&255,r0>>8&255,r0&255,1)}function rgba(r0,e0,n0,a0){return a0<=0&&(r0=e0=n0=NaN),new Rgb(r0,e0,n0,a0)}function rgbConvert(r0){return r0 instanceof Color||(r0=color(r0)),r0?(r0=r
vendor: 4,706 bytes, line 668
6680.rgb(),new Rgb(r0.r,r0.g,r0.b,r0.opacity)):new Rgb}function rgb$1(r0,e0,n0,a0){return arguments.length===1?rgbConvert(r0):new Rgb(r0,e0,n0,a0??1)}function Rgb(r0,e0,n0,a0){this.r=+r0,this.g=+e0,this.b=+n0,this.opacity=+a0}define(Rgb,rgb$1,extend(Color,{brighter(r0){return r0=r0==null?brighter:Math.pow(brighter,r0),new Rgb(this.r*r0,this.g*r0,this.b*r0,this.opacity)},darker(r0){return r0=r0==null?darker:Math.pow(darker,r0),new Rgb(this.r*r0,this.g*r0,this.b*r0,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const r0=clampa(this.opacity);return`${r0===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${r0===1?")":`, ${r0})`}`}function clampa(r0){return isNaN(r0)?1:Math.max(0,Math.min(1,r0))}function clampi(r0){return Math.max(0,Math.min(255,Math.round(r0)||0))}function hex(r0){return r0=clampi(r0),(r0<16?"0":"")+r0.toString(16)}function hsla(r0,e0,n0,a0){return a0<=0?r0=e0=n0=NaN:n0<=0||n0>=1?r0=e0=NaN:e0<=0&&(r0=NaN),new Hsl(r0,e0,n0,a0)}function hslConvert(r0){if(r0 instanceof Hsl)return new Hsl(r0.h,r0.s,r0.l,r0.opacity);if(r0 instanceof Color||(r0=color(r0)),!r0)return new Hsl;if(r0 instanceof Hsl)return r0;r0=r0.rgb();var e0=r0.r/255,n0=r0.g/255,a0=r0.b/255,i0=Math.min(e0,n0,a0),s0=Math.max(e0,n0,a0),o0=NaN,l0=s0-i0,c0=(s0+i0)/2;return l0?(e0===s0?o0=(n0-a0)/l0+(n0<a0)*6:n0===s0?o0=(a0-e0)/l0+2:o0=(e0-n0)/l0+4,l0/=c0<.5?s0+i0:2-s0-i0,o0*=60):l0=c0>0&&c0<1?0:o0,new Hsl(o0,l0,c0,r0.opacity)}function hsl(r0,e0,n0,a0){return arguments.length===1?hslConvert(r0):new Hsl(r0,e0,n0,a0??1)}function Hsl(r0,e0,n0,a0){this.h=+r0,this.s=+e0,this.l=+n0,this.opacity=+a0}define(Hsl,hsl,extend(Color,{brighter(r0){return r0=r0==null?brighter:Math.pow(brighter,r0),new Hsl(this.h,this.s,this.l*r0,this.opacity)},darker(r0){return r0=r0==null?darker:Math.pow(darker,r0),new Hsl(this.h,this.s,this.l*r0,this.opacity)},rgb(){var r0=this.h%360+(this.h<0)*360,e0=isNaN(r0)||isNaN(this.s)?0:this.s,n0=this.l,a0=n0+(n0<.5?n0:1-n0)*e0,i0=2*n0-a0;return new Rgb(hsl2rgb(r0>=240?r0-240:r0+120,i0,a0),hsl2rgb(r0,i0,a0),hsl2rgb(r0<120?r0+240:r0-120,i0,a0),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r0=clampa(this.opacity);return`${r0===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${r0===1?")":`, ${r0})`}`}}));function clamph(r0){return r0=(r0||0)%360,r0<0?r0+360:r0}function clampt(r0){return Math.max(0,Math.min(1,r0||0))}function hsl2rgb(r0,e0,n0){return(r0<60?e0+(n0-e0)*r0/60:r0<180?n0:r0<240?e0+(n0-e0)*(240-r0)/60:e0)*255}const constant=r0=>()=>r0;function linear$1(r0,e0){return function(n0){return r0+n0*e0}}function exponential(r0,e0,n0){return r0=Math.pow(r0,n0),e0=Math.pow(e0,n0)-r0,n0=1/n0,function(a0){return Math.pow(r0+a0*e0,n0)}}function gamma(r0){return(r0=+r0)==1?nogamma:function(e0,n0){return n0-e0?exponential(e0,n0,r0):constant(isNaN(e0)?n0:e0)}}function nogamma(r0,e0){var n0=e0-r0;return n0?linear$1(r0,n0):constant(isNaN(r0)?e0:r0)}const rgb=function r0(e0){var n0=gamma(e0);function a0(i0,s0){var o0=n0((i0=rgb$1(i0)).r,(s0=rgb$1(s0)).r),l0=n0(i0.g,s0.g),c0=n0(i0.b,s0.b),u0=nogamma(i0.opacity,s0.opacity);return function(d0){return i0.r=o0(d0),i0.g=l0(d0),i0.b=c0(d0),i0.opacity=u0(d0),i0+""}}return a0.gamma=r0,a0}(1);function numberArray(r0,e0){e0||(e0=[]);var n0=r0?Math.min(e0.length,r0.length):0,a0=e0.slice(),i0;return function(s0){for(i0=0;i0<n0;++i0)a0[i0]=r0[i0]*(1-s0)+e0[i0]*s0;return a0}}function isNumberArray(r0){return ArrayBuffer.isView(r0)&&!(r0 instanceof DataView)}function genericArray(r0,e0){var n0=e0?e0.length:0,a0=r0?Math.min(n0,r0.length):0,i0=new Array(a0),s0=new Array(n0),o0;for(o0=0;o0<a0;++o0)i0[o0]=interpolate(r0[o0],e0[o0]);for(;o0<n0;++o0)s0[o0]=e0[o0];return function(l0){for(o0=0;o0<a0;++o0)s0[o0]=i0[o0](l0);return s0}}function date$1(r0,e0){var n0=new Date;return r0=+r0,e0=+e0,function(a0){return n0.setTime(r0*(1-a0)+e0*a0),n0}}function interpolateNumber$1(r0,e0){return r0=+r0,e0=+e0,function(n0){return r0*(1-n0)+e0*n0}}
vendor: 10,327 bytes, line 668
668function object(r0,e0){var n0={},a0={},i0;(r0===null||typeof r0!="object")&&(r0={}),(e0===null||typeof e0!="object")&&(e0={});for(i0 in e0)i0 in r0?n0[i0]=interpolate(r0[i0],e0[i0]):a0[i0]=e0[i0];return function(s0){for(i0 in n0)a0[i0]=n0[i0](s0);return a0}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(r0){return function(){return r0}}function one(r0){return function(e0){return r0(e0)+""}}function string(r0,e0){var n0=reA.lastIndex=reB.lastIndex=0,a0,i0,s0,o0=-1,l0=[],c0=[];for(r0=r0+"",e0=e0+"";(a0=reA.exec(r0))&&(i0=reB.exec(e0));)(s0=i0.index)>n0&&(s0=e0.slice(n0,s0),l0[o0]?l0[o0]+=s0:l0[++o0]=s0),(a0=a0[0])===(i0=i0[0])?l0[o0]?l0[o0]+=i0:l0[++o0]=i0:(l0[++o0]=null,c0.push({i:o0,x:interpolateNumber$1(a0,i0)})),n0=reB.lastIndex;return n0<e0.length&&(s0=e0.slice(n0),l0[o0]?l0[o0]+=s0:l0[++o0]=s0),l0.length<2?c0[0]?one(c0[0].x):zero(e0):(e0=c0.length,function(u0){for(var d0=0,h0;d0<e0;++d0)l0[(h0=c0[d0]).i]=h0.x(u0);return l0.join("")})}function interpolate(r0,e0){var n0=typeof e0,a0;return e0==null||n0==="boolean"?constant(e0):(n0==="number"?interpolateNumber$1:n0==="string"?(a0=color(e0))?(e0=a0,rgb):string:e0 instanceof color?rgb:e0 instanceof Date?date$1:isNumberArray(e0)?numberArray:Array.isArray(e0)?genericArray:typeof e0.valueOf!="function"&&typeof e0.toString!="function"||isNaN(e0)?object:interpolateNumber$1)(r0,e0)}function interpolateRound(r0,e0){return r0=+r0,e0=+e0,function(n0){return Math.round(r0*(1-n0)+e0*n0)}}function piecewise(r0,e0){e0===void 0&&(e0=r0,r0=interpolate);for(var n0=0,a0=e0.length-1,i0=e0[0],s0=new Array(a0<0?0:a0);n0<a0;)s0[n0]=r0(i0,i0=e0[++n0]);return function(o0){var l0=Math.max(0,Math.min(a0-1,Math.floor(o0*=a0)));return s0[l0](o0-l0)}}function constants(r0){return function(){return r0}}function number$1(r0){return+r0}var unit=[0,1];function identity$6(r0){return r0}function normalize(r0,e0){return(e0-=r0=+r0)?function(n0){return(n0-r0)/e0}:constants(isNaN(e0)?NaN:.5)}function clamper(r0,e0){var n0;return r0>e0&&(n0=r0,r0=e0,e0=n0),function(a0){return Math.max(r0,Math.min(e0,a0))}}function bimap(r0,e0,n0){var a0=r0[0],i0=r0[1],s0=e0[0],o0=e0[1];return i0<a0?(a0=normalize(i0,a0),s0=n0(o0,s0)):(a0=normalize(a0,i0),s0=n0(s0,o0)),function(l0){return s0(a0(l0))}}function polymap(r0,e0,n0){var a0=Math.min(r0.length,e0.length)-1,i0=new Array(a0),s0=new Array(a0),o0=-1;for(r0[a0]<r0[0]&&(r0=r0.slice().reverse(),e0=e0.slice().reverse());++o0<a0;)i0[o0]=normalize(r0[o0],r0[o0+1]),s0[o0]=n0(e0[o0],e0[o0+1]);return function(l0){var c0=bisectRight(r0,l0,1,a0)-1;return s0[c0](i0[c0](l0))}}function copy$1(r0,e0){return e0.domain(r0.domain()).range(r0.range()).interpolate(r0.interpolate()).clamp(r0.clamp()).unknown(r0.unknown())}function transformer$2(){var r0=unit,e0=unit,n0=interpolate,a0,i0,s0,o0=identity$6,l0,c0,u0;function d0(){var f0=Math.min(r0.length,e0.length);return o0!==identity$6&&(o0=clamper(r0[0],r0[f0-1])),l0=f0>2?polymap:bimap,c0=u0=null,h0}function h0(f0){return f0==null||isNaN(f0=+f0)?s0:(c0||(c0=l0(r0.map(a0),e0,n0)))(a0(o0(f0)))}return h0.invert=function(f0){return o0(i0((u0||(u0=l0(e0,r0.map(a0),interpolateNumber$1)))(f0)))},h0.domain=function(f0){return arguments.length?(r0=Array.from(f0,number$1),d0()):r0.slice()},h0.range=function(f0){return arguments.length?(e0=Array.from(f0),d0()):e0.slice()},h0.rangeRound=function(f0){return e0=Array.from(f0),n0=interpolateRound,d0()},h0.clamp=function(f0){return arguments.length?(o0=f0?!0:identity$6,d0()):o0!==identity$6},h0.interpolate=function(f0){return arguments.length?(n0=f0,d0()):n0},h0.unknown=function(f0){return arguments.length?(s0=f0,h0):s0},function(f0,p0){return a0=f0,i0=p0,d0()}}function continuous(){return transformer$2()(identity$6,identity$6)}function formatDecimal(r0){return Math.abs(r0=Math.round(r0))>=1e21?r0.toLocaleString("en").replace(/,/g,""):r0.toString(10)}function formatDecimalParts(r0,e0){if((n0=(r0=e0?r0.toExponential(e0-1):r0.toExponential()).indexOf("e"))<0)return null;var n0,a0=r0.slice(0,n0);return[a0.length>1?a0[0]+a0.slice(2):a0,+r0.slice(n0+1)]}function exponent(r0){return r0=formatDecimalParts(Math.abs(r0)),r0?r0[1]:NaN}function formatGroup(r0,e0){return function(n0,a0){for(var i0=n0.length,s0=[],o0=0,l0=r0[0],c0=0;i0>0&&l0>0&&(c0+l0+1>a0&&(l0=Math.max(1,a0-c0)),s0.push(n0.substring(i0-=l0,i0+l0)),!((c0+=l0+1)>a0));)l0=r0[o0=(o0+1)%r0.length];return s0.reverse().join(e0)}}function formatNumerals(r0){return function(e0){return e0.replace(/[0-9]/g,function(n0){return r0[+n0]})}}var re$1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(r0){if(!(e0=re$1.exec(r0)))throw new Error("invalid format: "+r0);var e0;return new FormatSpecifier({fill:e0[1],align:e0[2],sign:e0[3],symbol:e0[4],zero:e0[5],width:e0[6],comma:e0[7],precision:e0[8]&&e0[8].slice(1),trim:e0[9],type:e0[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(r0){this.fill=r0.fill===void 0?" ":r0.fill+"",this.align=r0.align===void 0?">":r0.align+"",this.sign=r0.sign===void 0?"-":r0.sign+"",this.symbol=r0.symbol===void 0?"":r0.symbol+"",this.zero=!!r0.zero,this.width=r0.width===void 0?void 0:+r0.width,this.comma=!!r0.comma,this.precision=r0.precision===void 0?void 0:+r0.precision,this.trim=!!r0.trim,this.type=r0.type===void 0?"":r0.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(r0){e:for(var e0=r0.length,n0=1,a0=-1,i0;n0<e0;++n0)switch(r0[n0]){case".":a0=i0=n0;break;case"0":a0===0&&(a0=n0),i0=n0;break;default:if(!+r0[n0])break e;a0>0&&(a0=0);break}return a0>0?r0.slice(0,a0)+r0.slice(i0+1):r0}var prefixExponent;function formatPrefixAuto(r0,e0){var n0=formatDecimalParts(r0,e0);if(!n0)return r0+"";var a0=n0[0],i0=n0[1],s0=i0-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(i0/3)))*3)+1,o0=a0.length;return s0===o0?a0:s0>o0?a0+new Array(s0-o0+1).join("0"):s0>0?a0.slice(0,s0)+"."+a0.slice(s0):"0."+new Array(1-s0).join("0")+formatDecimalParts(r0,Math.max(0,e0+s0-1))[0]}function formatRounded(r0,e0){var n0=formatDecimalParts(r0,e0);if(!n0)return r0+"";var a0=n0[0],i0=n0[1];return i0<0?"0."+new Array(-i0).join("0")+a0:a0.length>i0+1?a0.slice(0,i0+1)+"."+a0.slice(i0+1):a0+new Array(i0-a0.length+2).join("0")}const formatTypes={"%":(r0,e0)=>(r0*100).toFixed(e0),b:r0=>Math.round(r0).toString(2),c:r0=>r0+"",d:formatDecimal,e:(r0,e0)=>r0.toExponential(e0),f:(r0,e0)=>r0.toFixed(e0),g:(r0,e0)=>r0.toPrecision(e0),o:r0=>Math.round(r0).toString(8),p:(r0,e0)=>formatRounded(r0*100,e0),r:formatRounded,s:formatPrefixAuto,X:r0=>Math.round(r0).toString(16).toUpperCase(),x:r0=>Math.round(r0).toString(16)};function identity$5(r0){return r0}var map$3=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(r0){var e0=r0.grouping===void 0||r0.thousands===void 0?identity$5:formatGroup(map$3.call(r0.grouping,Number),r0.thousands+""),n0=r0.currency===void 0?"":r0.currency[0]+"",a0=r0.currency===void 0?"":r0.currency[1]+"",i0=r0.decimal===void 0?".":r0.decimal+"",s0=r0.numerals===void 0?identity$5:formatNumerals(map$3.call(r0.numerals,String)),o0=r0.percent===void 0?"%":r0.percent+"",l0=r0.minus===void 0?"â":r0.minus+"",c0=r0.nan===void 0?"NaN":r0.nan+"";function u0(h0){h0=formatSpecifier(h0);var f0=h0.fill,p0=h0.align,A0=h0.sign,m0=h0.symbol,x0=h0.zero,g0=h0.width,y0=h0.comma,b0=h0.precision,E0=h0.trim,w0=h0.type;w0==="n"?(y0=!0,w0="g"):formatTypes[w0]||(b0===void 0&&(b0=12),E0=!0,w0="g"),(x0||f0==="0"&&p0==="=")&&(x0=!0,f0="0",p0="=");var v0=m0==="$"?n0:m0==="#"&&/[boxX]/.test(w0)?"0"+w0.toLowerCase():"",S0=m0==="$"?a0:/[%p]/.test(w0)?o0:"",k0=formatTypes[w0],R0=/[defgprs%]/.test(w0);b0=b0===void 0?6:/[gprs]/.test(w0)?Math.max(1,Math.min(21,b0)):Math.max(0,Math.min(20,b0));function j0(C0){var $0=v0,T0=S0,I0,M0,N0;if(w0==="c")T0=k0(C0)+T0,C0="";else{C0=+C0;var D0=C0<0||1/C0<0;if(C0=isNaN(C0)?c0:k0(Math.abs(C0),b0),E0&&(C0=formatTrim(C0)),D0&&+C0==0&&A0!=="+"&&(D0=!1),$0=(D0?A0==="("?A0:l0:A0==="-"||A0==="("?"":A0)+$0,T0=(w0==="s"?prefixes[8+prefixExponent/3]:"")+T0+(D0&&A0==="("?")":""),R0){for(I0=-1,M0=C0.length;++I0<M0;)if(N0=C0.charCodeAt(I0),48>N0||N0>57){T0=(N0===46?i0+C0.slice(I0+1):C0.slice(I0))+T0,C0=C0.slice(0,I0);break}}}y0&&!x0&&(C0=e0(C0,1/0));var O0=$0.length+C0.length+T0.length,B0=O0<g0?new Array(g0-O0+1).join(f0):"";switch(y0&&x0&&(C0=e0(B0+C0,B0.length?g0-T0.length:1/0),B0=""),p0){case"<":C0=$0+C0+T0+B0;break;case"=":C0=$0+B0+C0+T0;break;case"^":C0=B0.slice(0,O0=B0.length>>1)+$0+C0+T0+B0.slice(O0);break;default:C0=B0+$0+C0+T0;break}return s0(C0)}return j0.toString=function(){return h0+""},j0}function d0(h0,f0){var p0=u0((h0=formatSpecifier(h0),h0.type="f",h0)),A0=Math.max(-8,Math.min(8,Math.floor(exponent(f0)/3)))*3,m0=Math.pow(10,-A0),x0=prefixes[8+A0/3];return function(g0){return p0(m0*g0)+x0}}return{format:u0,formatPrefix:d0}}var locale$1,format,formatPrefix;defaultLocale$1({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale$1(r0){return locale$1=formatLocale$1(r0),format=locale$1.format,formatPrefix=locale$1.formatPrefix,locale$1}function precisionFixed(r0){return Math.max(0,-exponent(Math.abs(r0)))}function precisionPrefix(r0,e0){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(e0)/3)))*3-exponent(Math.abs(r0)))}function precisionRound(r0,e0){return r0=Math.abs(r0),e0=Math.abs(e0)-r0,Math.max(0,exponent(e0)-exponent(r0))+1}function tickFormat(r0,e0,n0,a0){var i0=tickStep(r0,e0,n0),s0;switch(a0=formatSpecifier(a0??",f"),a0.type){case"s":{var o0=Math.max(Math.abs(r0),Math.abs(e0));return a0.precision==null&&!isNaN(s0=precisionPrefix(i0,o0))&&(a0.precision=s0),formatPrefix(a0,o0)}case"":case"e":case"g":case"p":case"r":{a0.precision==null&&!isNaN(s0=precisionRound(i0,Math.max(Math.abs(r0),Math.abs(e0))))&&(a0.precision=s0-(a0.type==="e"));break}case"f":case"%":{a0.precision==null&&!isNaN(s0=precisionFixed(i0))&&(a0.precision=s0-(a0.type==="%")*2);break}}return format(a0)}function linearish(r0){var e0=r0.domain;return r0.ticks=function(n0){var a0=e0();return ticks(a0[0],a0[a0.length-1],n0??10)}
vendor: 4,968 bytes, line 668
668,r0.tickFormat=function(n0,a0){var i0=e0();return tickFormat(i0[0],i0[i0.length-1],n0??10,a0)},r0.nice=function(n0){n0==null&&(n0=10);var a0=e0(),i0=0,s0=a0.length-1,o0=a0[i0],l0=a0[s0],c0,u0,d0=10;for(l0<o0&&(u0=o0,o0=l0,l0=u0,u0=i0,i0=s0,s0=u0);d0-- >0;){if(u0=tickIncrement(o0,l0,n0),u0===c0)return a0[i0]=o0,a0[s0]=l0,e0(a0);if(u0>0)o0=Math.floor(o0/u0)*u0,l0=Math.ceil(l0/u0)*u0;else if(u0<0)o0=Math.ceil(o0*u0)/u0,l0=Math.floor(l0*u0)/u0;else break;c0=u0}return r0},r0}function linear(){var r0=continuous();return r0.copy=function(){return copy$1(r0,linear())},initRange.apply(r0,arguments),linearish(r0)}function identity$4(r0){var e0;function n0(a0){return a0==null||isNaN(a0=+a0)?e0:a0}return n0.invert=n0,n0.domain=n0.range=function(a0){return arguments.length?(r0=Array.from(a0,number$1),n0):r0.slice()},n0.unknown=function(a0){return arguments.length?(e0=a0,n0):e0},n0.copy=function(){return identity$4(r0).unknown(e0)},r0=arguments.length?Array.from(r0,number$1):[0,1],linearish(n0)}function nice(r0,e0){r0=r0.slice();var n0=0,a0=r0.length-1,i0=r0[n0],s0=r0[a0],o0;return s0<i0&&(o0=n0,n0=a0,a0=o0,o0=i0,i0=s0,s0=o0),r0[n0]=e0.floor(i0),r0[a0]=e0.ceil(s0),r0}function transformLog(r0){return Math.log(r0)}function transformExp(r0){return Math.exp(r0)}function transformLogn(r0){return-Math.log(-r0)}function transformExpn(r0){return-Math.exp(-r0)}function pow10(r0){return isFinite(r0)?+("1e"+r0):r0<0?0:r0}function powp(r0){return r0===10?pow10:r0===Math.E?Math.exp:e0=>Math.pow(r0,e0)}function logp(r0){return r0===Math.E?Math.log:r0===10&&Math.log10||r0===2&&Math.log2||(r0=Math.log(r0),e0=>Math.log(e0)/r0)}function reflect(r0){return(e0,n0)=>-r0(-e0,n0)}function loggish(r0){const e0=r0(transformLog,transformExp),n0=e0.domain;let a0=10,i0,s0;function o0(){return i0=logp(a0),s0=powp(a0),n0()[0]<0?(i0=reflect(i0),s0=reflect(s0),r0(transformLogn,transformExpn)):r0(transformLog,transformExp),e0}return e0.base=function(l0){return arguments.length?(a0=+l0,o0()):a0},e0.domain=function(l0){return arguments.length?(n0(l0),o0()):n0()},e0.ticks=l0=>{const c0=n0();let u0=c0[0],d0=c0[c0.length-1];const h0=d0<u0;h0&&([u0,d0]=[d0,u0]);let f0=i0(u0),p0=i0(d0),A0,m0;const x0=l0==null?10:+l0;let g0=[];if(!(a0%1)&&p0-f0<x0){if(f0=Math.floor(f0),p0=Math.ceil(p0),u0>0){for(;f0<=p0;++f0)for(A0=1;A0<a0;++A0)if(m0=f0<0?A0/s0(-f0):A0*s0(f0),!(m0<u0)){if(m0>d0)break;g0.push(m0)}}else for(;f0<=p0;++f0)for(A0=a0-1;A0>=1;--A0)if(m0=f0>0?A0/s0(-f0):A0*s0(f0),!(m0<u0)){if(m0>d0)break;g0.push(m0)}g0.length*2<x0&&(g0=ticks(u0,d0,x0))}else g0=ticks(f0,p0,Math.min(p0-f0,x0)).map(s0);return h0?g0.reverse():g0},e0.tickFormat=(l0,c0)=>{if(l0==null&&(l0=10),c0==null&&(c0=a0===10?"s":","),typeof c0!="function"&&(!(a0%1)&&(c0=formatSpecifier(c0)).precision==null&&(c0.trim=!0),c0=format(c0)),l0===1/0)return c0;const u0=Math.max(1,a0*l0/e0.ticks().length);return d0=>{let h0=d0/s0(Math.round(i0(d0)));return h0*a0<a0-.5&&(h0*=a0),h0<=u0?c0(d0):""}},e0.nice=()=>n0(nice(n0(),{floor:l0=>s0(Math.floor(i0(l0))),ceil:l0=>s0(Math.ceil(i0(l0)))})),e0}function log(){const r0=loggish(transformer$2()).domain([1,10]);return r0.copy=()=>copy$1(r0,log()).base(r0.base()),initRange.apply(r0,arguments),r0}function transformSymlog(r0){return function(e0){return Math.sign(e0)*Math.log1p(Math.abs(e0/r0))}}function transformSymexp(r0){return function(e0){return Math.sign(e0)*Math.expm1(Math.abs(e0))*r0}}function symlogish(r0){var e0=1,n0=r0(transformSymlog(e0),transformSymexp(e0));return n0.constant=function(a0){return arguments.length?r0(transformSymlog(e0=+a0),transformSymexp(e0)):e0},linearish(n0)}function symlog(){var r0=symlogish(transformer$2());return r0.copy=function(){return copy$1(r0,symlog()).constant(r0.constant())},initRange.apply(r0,arguments)}function transformPow(r0){return function(e0){return e0<0?-Math.pow(-e0,r0):Math.pow(e0,r0)}}function transformSqrt(r0){return r0<0?-Math.sqrt(-r0):Math.sqrt(r0)}function transformSquare(r0){return r0<0?-r0*r0:r0*r0}function powish(r0){var e0=r0(identity$6,identity$6),n0=1;function a0(){return n0===1?r0(identity$6,identity$6):n0===.5?r0(transformSqrt,transformSquare):r0(transformPow(n0),transformPow(1/n0))}return e0.exponent=function(i0){return arguments.length?(n0=+i0,a0()):n0},linearish(e0)}function pow(){var r0=powish(transformer$2());return r0.copy=function(){return copy$1(r0,pow()).exponent(r0.exponent())},initRange.apply(r0,arguments),r0}function sqrt(){return pow.apply(null,arguments).exponent(.5)}function square(r0){return Math.sign(r0)*r0*r0}function unsquare(r0){return Math.sign(r0)*Math.sqrt(Math.abs(r0))}function radial(){var r0=continuous(),e0=[0,1],n0=!1,a0;function i0(s0){var o0=unsquare(r0(s0));return isNaN(o0)?a0:n0?Math.round(o0):o0}return i0.invert=function(s0){return r0.invert(square(s0))},i0.domain=function(s0){return arguments.length?(r0.domain(s0),i0):r0.domain()},i0.range=function(s0){return arguments.length?(r0.range((e0=Array.from(s0,number$1)).map(square)),i0):e0.slice()}
668,i0.rangeRound=function(s0){return i0.range(s0).round(!0)},i0.round=function(s0){return arguments.length?(n0=!!s0,i0):n0},i0.clamp=function(s0){return arguments.length?(r0.clamp(s0),i0):r0.clamp()},i0.unknown=function(s0){return arguments.length?(a0=s0,i0):a0},i0.copy=function(){return radial(r0.domain(),e0).round(n0).clamp(r0.clamp()).unknown(a0)},initRange.apply(i0,arguments),linearish(i0)}function quantile(){var r0=[],e0=[],n0=[],a0;function i0(){var o0=0,l0=Math.max(1,e0.length);for(n0=new Array(l0-1);++o0<l0;)n0[o0-1]=quantileSorted(r0,o0/l0);return s0}function s0(o0){return o0==null||isNaN(o0=+o0)?a0:e0[bisectRight(n0,o0)]}return s0.invertExtent=function(o0){var l0=e0.indexOf(o0);return l0<0?[NaN,NaN]:[l0>0?n0[l0-1]:r0[0],l0<n0.length?n0[l0]:r0[r0.length-1]]},s0.domain=function(o0){if(!arguments.length)return r0.slice();r0=[];for(let l0 of o0)l0!=null&&!isNaN(l0=+l0)&&r0.push(l0);return r0.sort(ascending),i0()},s0.range=function(o0){return arguments.length?(e0=Array.from(o0),i0()):e0.slice()},s0.unknown=function(o0){return arguments.length?(a0=o0,s0):a0},s0.quantiles=function(){return n0.slice()},s0.copy=function(){return quantile().domain(r0).range(e0).unknown(a0)},initRange.apply(s0,arguments)}function quantize(){var r0=0,e0=1,n0=1,a0=[.5],i0=[0,1],s0;function o0(c0){return c0!=null&&c0<=c0?i0[bisectRight(a0,c0,0,n0)]:s0}function l0(){var c0=-1;for(a0=new Array(n0);++c0<n0;)a0[c0]=((c0+1)*e0-(c0-n0)*r0)/(n0+1);return o0}return o0.domain=function(c0){return arguments.length?([r0,e0]=c0,r0=+r0,e0=+e0,l0()):[r0,e0]},o0.range=function(c0){return arguments.length?(n0=(i0=Array.from(c0)).length-1,l0()):i0.slice()},o0.invertExtent=function(c0){var u0=i0.indexOf(c0);return u0<0?[NaN,NaN]:u0<1?[r0,a0[0]]:u0>=n0?[a0[n0-1],e0]:[a0[u0-1],a0[u0]]},o0.unknown=function(c0){return arguments.length&&(s0=c0),o0},o0.thresholds=function(){return a0.slice()},o0.copy=function(){return quantize().domain([r0,e0]).range(i0).unknown(s0)},initRange.apply(linearish(o0),arguments)}function threshold(){var r0=[.5],e0=[0,1],n0,a0=1;function i0(s0){return s0!=null&&s0<=s0?e0[bisectRight(r0,s0,0,a0)]:n0}return i0.domain=function(s0){return arguments.length?(r0=Array.from(s0),a0=Math.min(r0.length,e0.length-1),i0):r0.slice()},i0.range=function(s0){return arguments.length?(e0=Array.from(s0),a0=Math.min(r0.length,e0.length-1),i0):e0.slice()},i0.invertExtent=function(s0){var o0=e0.indexOf(s0);return[r0[o0-1],r0[o0]]},i0.unknown=function(s0){return arguments.length?(n0=s0,i0):n0},i0.copy=function(){return threshold().domain(r0).range(e0).unknown(n0)},initRange.apply(i0,arguments)}const t0=new Date,t1=new Date;function timeInterval(r0,e0,n0,a0){function i0(s0){return r0(s0=arguments.length===0?new Date:new Date(+s0)),s0}return i0.floor=s0=>(r0(s0=new Date(+s0)),s0),i0.ceil=s0=>(r0(s0=new Date(s0-1)),e0(s0,1),r0(s0),s0),i0.round=s0=>{const o0=i0(s0),l0=i0.ceil(s0);return s0-o0<l0-s0?o0:l0},i0.offset=(s0,o0)=>(e0(s0=new Date(+s0),o0==null?1:Math.floor(o0)),s0),i0.range=(s0,o0,l0)=>{const c0=[];if(s0=i0.ceil(s0),l0=l0==null?1:Math.floor(l0),!(s0<o0)||!(l0>0))return c0;let u0;do c0.push(u0=new Date(+s0)),e0(s0,l0),r0(s0);while(u0<s0&&s0<o0);return c0},i0.filter=s0=>timeInterval(o0=>{if(o0>=o0)for(;r0(o0),!s0(o0);)o0.setTime(o0-1)},(o0,l0)=>{if(o0>=o0)if(l0<0)for(;++l0<=0;)for(;e0(o0,-1),!s0(o0););else for(;--l0>=0;)for(;e0(o0,1),!s0(o0););}),n0&&(i0.count=(s0,o0)=>(t0.setTime(+s0),t1.setTime(+o0),r0(t0),r0(t1),Math.floor(n0(t0,t1))),i0.every=s0=>(s0=Math.floor(s0),!isFinite(s0)||!(s0>0)?null:s0>1?i0.filter(a0?o0=>a0(o0)%s0===0:o0=>i0.count(0,o0)%s0===0):i0)),i0}const millisecond=timeInterval(()=>{},(r0,e0)=>{r0.setTime(+r0+e0)},(r0,e0)=>e0-r0);millisecond.every=r0=>(r0=Math.floor(r0),!isFinite(r0)||!(r0>0)?null:r0>1?timeInterval(e0=>{e0.setTime(Math.floor(e0/r0)*r0)},(e0,n0)=>{e0.setTime(+e0+n0*r0)},(e0,n0)=>(n0-e0)/r0):millisecond);millisecond.range;const durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365,second=timeInterval(r0=>{r0.setTime(r0-r0.getMilliseconds())},(r0,e0)=>{r0.setTime(+r0+e0*durationSecond)},(r0,e0)=>(e0-r0)/durationSecond,r0=>r0.getUTCSeconds());second.range;const timeMinute=timeInterval(r0=>{r0.setTime(r0-r0.getMilliseconds()-r0.getSeconds()*durationSecond)},(r0,e0)=>{r0.setTime(+r0+e0*durationMinute)},(r0,e0)=>(e0-r0)/durationMinute,r0=>r0.getMinutes());timeMinute.range;const utcMinute=timeInterval(r0=>{r0.setUTCSeconds(0,0)},(r0,e0)=>{r0.setTime(+r0+e0*durationMinute)},(r0,e0)=>(e0-r0)/durationMinute,r0=>r0.getUTCMinutes());utcMinute.range;const timeHour=timeInterval(r0=>{r0.setTime(r0-r0.getMilliseconds()-r0.getSeconds()*durationSecond-r0.getMinutes()*durationMinute)},(r0,e0)=>{r0.setTime(+r0+e0*durationHour)},(r0,e0)=>(e0-r0)/durationHour,r0=>r0.getHours());timeHour.range;const utcHour=timeInterval(r0=>{r0.setUTCMinutes(0,0,0)},(r0,e0)=>{r0.setTime(+r0+e0*durationHour)},(r0,e0)=>(e0-r0)/durationHour,r0=>r0.getUTCHours());utcHour.range;const timeDay=timeInterval(r0=>r0.setHours(0,0,0,0),(r0,e0)=>r0.setDate(r0.getDate()+e0),(r0,e0)=>(e0-r0-(e0.getTimezoneOffset()-r0.getTimezoneOffset())*durationMinute)/durationDay,r0=>r0.getDate()-1);timeDay.range;
vendor: 7,232 bytes, line 668
668const utcDay=timeInterval(r0=>{r0.setUTCHours(0,0,0,0)},(r0,e0)=>{r0.setUTCDate(r0.getUTCDate()+e0)},(r0,e0)=>(e0-r0)/durationDay,r0=>r0.getUTCDate()-1);utcDay.range;const unixDay=timeInterval(r0=>{r0.setUTCHours(0,0,0,0)},(r0,e0)=>{r0.setUTCDate(r0.getUTCDate()+e0)},(r0,e0)=>(e0-r0)/durationDay,r0=>Math.floor(r0/durationDay));unixDay.range;function timeWeekday(r0){return timeInterval(e0=>{e0.setDate(e0.getDate()-(e0.getDay()+7-r0)%7),e0.setHours(0,0,0,0)},(e0,n0)=>{e0.setDate(e0.getDate()+n0*7)},(e0,n0)=>(n0-e0-(n0.getTimezoneOffset()-e0.getTimezoneOffset())*durationMinute)/durationWeek)}const timeSunday=timeWeekday(0),timeMonday=timeWeekday(1),timeTuesday=timeWeekday(2),timeWednesday=timeWeekday(3),timeThursday=timeWeekday(4),timeFriday=timeWeekday(5),timeSaturday=timeWeekday(6);timeSunday.range;timeMonday.range;timeTuesday.range;timeWednesday.range;timeThursday.range;timeFriday.range;timeSaturday.range;function utcWeekday(r0){return timeInterval(e0=>{e0.setUTCDate(e0.getUTCDate()-(e0.getUTCDay()+7-r0)%7),e0.setUTCHours(0,0,0,0)},(e0,n0)=>{e0.setUTCDate(e0.getUTCDate()+n0*7)},(e0,n0)=>(n0-e0)/durationWeek)}const utcSunday=utcWeekday(0),utcMonday=utcWeekday(1),utcTuesday=utcWeekday(2),utcWednesday=utcWeekday(3),utcThursday=utcWeekday(4),utcFriday=utcWeekday(5),utcSaturday=utcWeekday(6);utcSunday.range;utcMonday.range;utcTuesday.range;utcWednesday.range;utcThursday.range;utcFriday.range;utcSaturday.range;const timeMonth=timeInterval(r0=>{r0.setDate(1),r0.setHours(0,0,0,0)},(r0,e0)=>{r0.setMonth(r0.getMonth()+e0)},(r0,e0)=>e0.getMonth()-r0.getMonth()+(e0.getFullYear()-r0.getFullYear())*12,r0=>r0.getMonth());timeMonth.range;const utcMonth=timeInterval(r0=>{r0.setUTCDate(1),r0.setUTCHours(0,0,0,0)},(r0,e0)=>{r0.setUTCMonth(r0.getUTCMonth()+e0)},(r0,e0)=>e0.getUTCMonth()-r0.getUTCMonth()+(e0.getUTCFullYear()-r0.getUTCFullYear())*12,r0=>r0.getUTCMonth());utcMonth.range;const timeYear=timeInterval(r0=>{r0.setMonth(0,1),r0.setHours(0,0,0,0)},(r0,e0)=>{r0.setFullYear(r0.getFullYear()+e0)},(r0,e0)=>e0.getFullYear()-r0.getFullYear(),r0=>r0.getFullYear());timeYear.every=r0=>!isFinite(r0=Math.floor(r0))||!(r0>0)?null:timeInterval(e0=>{e0.setFullYear(Math.floor(e0.getFullYear()/r0)*r0),e0.setMonth(0,1),e0.setHours(0,0,0,0)},(e0,n0)=>{e0.setFullYear(e0.getFullYear()+n0*r0)});timeYear.range;const utcYear=timeInterval(r0=>{r0.setUTCMonth(0,1),r0.setUTCHours(0,0,0,0)},(r0,e0)=>{r0.setUTCFullYear(r0.getUTCFullYear()+e0)},(r0,e0)=>e0.getUTCFullYear()-r0.getUTCFullYear(),r0=>r0.getUTCFullYear());utcYear.every=r0=>!isFinite(r0=Math.floor(r0))||!(r0>0)?null:timeInterval(e0=>{e0.setUTCFullYear(Math.floor(e0.getUTCFullYear()/r0)*r0),e0.setUTCMonth(0,1),e0.setUTCHours(0,0,0,0)},(e0,n0)=>{e0.setUTCFullYear(e0.getUTCFullYear()+n0*r0)});utcYear.range;function ticker(r0,e0,n0,a0,i0,s0){const o0=[[second,1,durationSecond],[second,5,5*durationSecond],[second,15,15*durationSecond],[second,30,30*durationSecond],[s0,1,durationMinute],[s0,5,5*durationMinute],[s0,15,15*durationMinute],[s0,30,30*durationMinute],[i0,1,durationHour],[i0,3,3*durationHour],[i0,6,6*durationHour],[i0,12,12*durationHour],[a0,1,durationDay],[a0,2,2*durationDay],[n0,1,durationWeek],[e0,1,durationMonth],[e0,3,3*durationMonth],[r0,1,durationYear]];function l0(u0,d0,h0){const f0=d0<u0;f0&&([u0,d0]=[d0,u0]);const p0=h0&&typeof h0.range=="function"?h0:c0(u0,d0,h0),A0=p0?p0.range(u0,+d0+1):[];return f0?A0.reverse():A0}function c0(u0,d0,h0){const f0=Math.abs(d0-u0)/h0,p0=bisector(([,,x0])=>x0).right(o0,f0);if(p0===o0.length)return r0.every(tickStep(u0/durationYear,d0/durationYear,h0));if(p0===0)return millisecond.every(Math.max(tickStep(u0,d0,h0),1));const[A0,m0]=o0[f0/o0[p0-1][2]<o0[p0][2]/f0?p0-1:p0];return A0.every(m0)}return[l0,c0]}const[utcTicks,utcTickInterval]=ticker(utcYear,utcMonth,utcSunday,unixDay,utcHour,utcMinute),[timeTicks,timeTickInterval]=ticker(timeYear,timeMonth,timeSunday,timeDay,timeHour,timeMinute);function localDate(r0){if(0<=r0.y&&r0.y<100){var e0=new Date(-1,r0.m,r0.d,r0.H,r0.M,r0.S,r0.L);return e0.setFullYear(r0.y),e0}return new Date(r0.y,r0.m,r0.d,r0.H,r0.M,r0.S,r0.L)}function utcDate(r0){if(0<=r0.y&&r0.y<100){var e0=new Date(Date.UTC(-1,r0.m,r0.d,r0.H,r0.M,r0.S,r0.L));return e0.setUTCFullYear(r0.y),e0}return new Date(Date.UTC(r0.y,r0.m,r0.d,r0.H,r0.M,r0.S,r0.L))}function newDate(r0,e0,n0){return{y:r0,m:e0,d:n0,H:0,M:0,S:0,L:0}}function formatLocale(r0){var e0=r0.dateTime,n0=r0.date,a0=r0.time,i0=r0.periods,s0=r0.days,o0=r0.shortDays,l0=r0.months,c0=r0.shortMonths,u0=formatRe(i0),d0=formatLookup(i0),h0=formatRe(s0),f0=formatLookup(s0),p0=formatRe(o0),A0=formatLookup(o0),m0=formatRe(l0),x0=formatLookup(l0),g0=formatRe(c0),y0=formatLookup(c0),b0={a:D0,A:O0,b:B0,B:z0,c:null,d:formatDayOfMonth,e:formatDayOfMonth,f:formatMicroseconds,g:formatYearISO,G:formatFullYearISO,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:G0,q:F0,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},E0={a:Q0,A:U0,b:q0,B:Rw,c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,g:formatUTCYearISO,G:formatUTCFullYearISO,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:_w,q:J0,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},w0={a:j0,A:C0,b:$0,B:T0,c:I0,d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,g:parseYear,G:parseFullYear,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:R0,q:parseQuarter,Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:M0,X:N0,y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};b0.x=v0(n0,b0),b0.X=v0(a0,b0),b0.c=v0(e0,b0),E0.x=v0(n0,E0),E0.X=v0(a0,E0),E0.c=v0(e0,E0);function v0(Cw,Ow){return function(jw){var Nw=[],xw=-1,X0=0,Lw=Cw.length,Hw,Ww,r1;for(jw instanceof Date||(jw=new Date(+jw));++xw<Lw;)Cw.charCodeAt(xw)===37&&(Nw.push(Cw.slice(X0,xw)),(Ww=pads[Hw=Cw.charAt(++xw)])!=null?Hw=Cw.charAt(++xw):Ww=Hw==="e"?" ":"0",(r1=Ow[Hw])&&(Hw=r1(jw,Ww)),Nw.push(Hw),X0=xw+1);return Nw.push(Cw.slice(X0,xw)),Nw.join("")}}function S0(Cw,Ow){return function(jw){var Nw=newDate(1900,void 0,1),xw=k0(Nw,Cw,jw+="",0),X0,Lw;if(xw!=jw.length)return null;if("Q"in Nw)return new Date(Nw.Q);if("s"in Nw)return new Date(Nw.s*1e3+("L"in Nw?Nw.L:0));if(Ow&&!("Z"in Nw)&&(Nw.Z=0),"p"in Nw&&(Nw.H=Nw.H%12+Nw.p*12),Nw.m===void 0&&(Nw.m="q"in Nw?Nw.q:0),"V"in Nw){if(Nw.V<1||Nw.V>53)return null;"w"in Nw||(Nw.w=1),"Z"in Nw?(X0=utcDate(newDate(Nw.y,0,1)),Lw=X0.getUTCDay(),X0=Lw>4||Lw===0?utcMonday.ceil(X0):utcMonday(X0),X0=utcDay.offset(X0,(Nw.V-1)
vendor: 5,482 bytes, line 668
668*7),Nw.y=X0.getUTCFullYear(),Nw.m=X0.getUTCMonth(),Nw.d=X0.getUTCDate()+(Nw.w+6)%7):(X0=localDate(newDate(Nw.y,0,1)),Lw=X0.getDay(),X0=Lw>4||Lw===0?timeMonday.ceil(X0):timeMonday(X0),X0=timeDay.offset(X0,(Nw.V-1)*7),Nw.y=X0.getFullYear(),Nw.m=X0.getMonth(),Nw.d=X0.getDate()+(Nw.w+6)%7)}else("W"in Nw||"U"in Nw)&&("w"in Nw||(Nw.w="u"in Nw?Nw.u%7:"W"in Nw?1:0),Lw="Z"in Nw?utcDate(newDate(Nw.y,0,1)).getUTCDay():localDate(newDate(Nw.y,0,1)).getDay(),Nw.m=0,Nw.d="W"in Nw?(Nw.w+6)%7+Nw.W*7-(Lw+5)%7:Nw.w+Nw.U*7-(Lw+6)%7);return"Z"in Nw?(Nw.H+=Nw.Z/100|0,Nw.M+=Nw.Z%100,utcDate(Nw)):localDate(Nw)}}function k0(Cw,Ow,jw,Nw){for(var xw=0,X0=Ow.length,Lw=jw.length,Hw,Ww;xw<X0;){if(Nw>=Lw)return-1;if(Hw=Ow.charCodeAt(xw++),Hw===37){if(Hw=Ow.charAt(xw++),Ww=w0[Hw in pads?Ow.charAt(xw++):Hw],!Ww||(Nw=Ww(Cw,jw,Nw))<0)return-1}else if(Hw!=jw.charCodeAt(Nw++))return-1}return Nw}function R0(Cw,Ow,jw){var Nw=u0.exec(Ow.slice(jw));return Nw?(Cw.p=d0.get(Nw[0].toLowerCase()),jw+Nw[0].length):-1}function j0(Cw,Ow,jw){var Nw=p0.exec(Ow.slice(jw));return Nw?(Cw.w=A0.get(Nw[0].toLowerCase()),jw+Nw[0].length):-1}function C0(Cw,Ow,jw){var Nw=h0.exec(Ow.slice(jw));return Nw?(Cw.w=f0.get(Nw[0].toLowerCase()),jw+Nw[0].length):-1}function $0(Cw,Ow,jw){var Nw=g0.exec(Ow.slice(jw));return Nw?(Cw.m=y0.get(Nw[0].toLowerCase()),jw+Nw[0].length):-1}function T0(Cw,Ow,jw){var Nw=m0.exec(Ow.slice(jw));return Nw?(Cw.m=x0.get(Nw[0].toLowerCase()),jw+Nw[0].length):-1}function I0(Cw,Ow,jw){return k0(Cw,e0,Ow,jw)}function M0(Cw,Ow,jw){return k0(Cw,n0,Ow,jw)}function N0(Cw,Ow,jw){return k0(Cw,a0,Ow,jw)}function D0(Cw){return o0[Cw.getDay()]}function O0(Cw){return s0[Cw.getDay()]}function B0(Cw){return c0[Cw.getMonth()]}function z0(Cw){return l0[Cw.getMonth()]}function G0(Cw){return i0[+(Cw.getHours()>=12)]}function F0(Cw){return 1+~~(Cw.getMonth()/3)}function Q0(Cw){return o0[Cw.getUTCDay()]}function U0(Cw){return s0[Cw.getUTCDay()]}function q0(Cw){return c0[Cw.getUTCMonth()]}function Rw(Cw){return l0[Cw.getUTCMonth()]}function _w(Cw){return i0[+(Cw.getUTCHours()>=12)]}function J0(Cw){return 1+~~(Cw.getUTCMonth()/3)}return{format:function(Cw){var Ow=v0(Cw+="",b0);return Ow.toString=function(){return Cw},Ow},parse:function(Cw){var Ow=S0(Cw+="",!1);return Ow.toString=function(){return Cw},Ow},utcFormat:function(Cw){var Ow=v0(Cw+="",E0);return Ow.toString=function(){return Cw},Ow},utcParse:function(Cw){var Ow=S0(Cw+="",!0);return Ow.toString=function(){return Cw},Ow}}}var pads={"-":"",_:" ",0:"0"},numberRe=/^\s*\d+/,percentRe=/^%/,requoteRe=/[\\^$*+?|[\]().{}]/g;function pad(r0,e0,n0){var a0=r0<0?"-":"",i0=(a0?-r0:r0)+"",s0=i0.length;return a0+(s0<n0?new Array(n0-s0+1).join(e0)+i0:i0)}function requote(r0){return r0.replace(requoteRe,"\\$&")}function formatRe(r0){return new RegExp("^(?:"+r0.map(requote).join("|")+")","i")}function formatLookup(r0){return new Map(r0.map((e0,n0)=>[e0.toLowerCase(),n0]))}function parseWeekdayNumberSunday(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+1));return a0?(r0.w=+a0[0],n0+a0[0].length):-1}function parseWeekdayNumberMonday(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+1));return a0?(r0.u=+a0[0],n0+a0[0].length):-1}function parseWeekNumberSunday(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.U=+a0[0],n0+a0[0].length):-1}function parseWeekNumberISO(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.V=+a0[0],n0+a0[0].length):-1}function parseWeekNumberMonday(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.W=+a0[0],n0+a0[0].length):-1}function parseFullYear(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+4));return a0?(r0.y=+a0[0],n0+a0[0].length):-1}function parseYear(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.y=+a0[0]+(+a0[0]>68?1900:2e3),n0+a0[0].length):-1}function parseZone(r0,e0,n0){var a0=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e0.slice(n0,n0+6));return a0?(r0.Z=a0[1]?0:-(a0[2]+(a0[3]||"00")),n0+a0[0].length):-1}function parseQuarter(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+1));return a0?(r0.q=a0[0]*3-3,n0+a0[0].length):-1}function parseMonthNumber(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.m=a0[0]-1,n0+a0[0].length):-1}function parseDayOfMonth(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.d=+a0[0],n0+a0[0].length):-1}function parseDayOfYear(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+3));return a0?(r0.m=0,r0.d=+a0[0],n0+a0[0].length):-1}function parseHour24(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.H=+a0[0],n0+a0[0].length):-1}function parseMinutes(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.M=+a0[0],n0+a0[0].length):-1}function parseSeconds(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+2));return a0?(r0.S=+a0[0],n0+a0[0].length):-1}function parseMilliseconds(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+3));return a0?(r0.L=+a0[0],n0+a0[0].length):-1}function parseMicroseconds(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0,n0+6));return a0?(r0.L=Math.floor(a0[0]/1e3),n0+a0[0].length):-1}function parseLiteralPercent(r0,e0,n0){var a0=percentRe.exec(e0.slice(n0,n0+1));return a0?n0+a0[0].length:-1}function parseUnixTimestamp(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0));return a0?(r0.Q=+a0[0],n0+a0[0].length):-1}function parseUnixTimestampSeconds(r0,e0,n0){var a0=numberRe.exec(e0.slice(n0));return a0?(r0.s=+a0[0],n0+a0[0].length):-1}function formatDayOfMonth(r0,e0){return pad(r0.getDate(),e0,2)}function formatHour24(r0,e0){return pad(r0.getHours(),e0,2)}
668function formatHour12(r0,e0){return pad(r0.getHours()%12||12,e0,2)}function formatDayOfYear(r0,e0){return pad(1+timeDay.count(timeYear(r0),r0),e0,3)}function formatMilliseconds(r0,e0){return pad(r0.getMilliseconds(),e0,3)}function formatMicroseconds(r0,e0){return formatMilliseconds(r0,e0)+"000"}function formatMonthNumber(r0,e0){return pad(r0.getMonth()+1,e0,2)}function formatMinutes(r0,e0){return pad(r0.getMinutes(),e0,2)}function formatSeconds(r0,e0){return pad(r0.getSeconds(),e0,2)}function formatWeekdayNumberMonday(r0){var e0=r0.getDay();return e0===0?7:e0}function formatWeekNumberSunday(r0,e0){return pad(timeSunday.count(timeYear(r0)-1,r0),e0,2)}function dISO(r0){var e0=r0.getDay();return e0>=4||e0===0?timeThursday(r0):timeThursday.ceil(r0)}function formatWeekNumberISO(r0,e0){return r0=dISO(r0),pad(timeThursday.count(timeYear(r0),r0)+(timeYear(r0).getDay()===4),e0,2)}function formatWeekdayNumberSunday(r0){return r0.getDay()}function formatWeekNumberMonday(r0,e0){return pad(timeMonday.count(timeYear(r0)-1,r0),e0,2)}function formatYear(r0,e0){return pad(r0.getFullYear()%100,e0,2)}function formatYearISO(r0,e0){return r0=dISO(r0),pad(r0.getFullYear()%100,e0,2)}function formatFullYear(r0,e0){return pad(r0.getFullYear()%1e4,e0,4)}function formatFullYearISO(r0,e0){var n0=r0.getDay();return r0=n0>=4||n0===0?timeThursday(r0):timeThursday.ceil(r0),pad(r0.getFullYear()%1e4,e0,4)}function formatZone(r0){var e0=r0.getTimezoneOffset();return(e0>0?"-":(e0*=-1,"+"))+pad(e0/60|0,"0",2)+pad(e0%60,"0",2)}function formatUTCDayOfMonth(r0,e0){return pad(r0.getUTCDate(),e0,2)}function formatUTCHour24(r0,e0){return pad(r0.getUTCHours(),e0,2)}function formatUTCHour12(r0,e0){return pad(r0.getUTCHours()%12||12,e0,2)}function formatUTCDayOfYear(r0,e0){return pad(1+utcDay.count(utcYear(r0),r0),e0,3)}function formatUTCMilliseconds(r0,e0){return pad(r0.getUTCMilliseconds(),e0,3)}function formatUTCMicroseconds(r0,e0){return formatUTCMilliseconds(r0,e0)+"000"}function formatUTCMonthNumber(r0,e0){return pad(r0.getUTCMonth()+1,e0,2)}function formatUTCMinutes(r0,e0){return pad(r0.getUTCMinutes(),e0,2)}function formatUTCSeconds(r0,e0){return pad(r0.getUTCSeconds(),e0,2)}function formatUTCWeekdayNumberMonday(r0){var e0=r0.getUTCDay();return e0===0?7:e0}function formatUTCWeekNumberSunday(r0,e0){return pad(utcSunday.count(utcYear(r0)-1,r0),e0,2)}function UTCdISO(r0){var e0=r0.getUTCDay();return e0>=4||e0===0?utcThursday(r0):utcThursday.ceil(r0)}function formatUTCWeekNumberISO(r0,e0){return r0=UTCdISO(r0),pad(utcThursday.count(utcYear(r0),r0)+(utcYear(r0).getUTCDay()===4),e0,2)}function formatUTCWeekdayNumberSunday(r0){return r0.getUTCDay()}function formatUTCWeekNumberMonday(r0,e0){return pad(utcMonday.count(utcYear(r0)-1,r0),e0,2)}function formatUTCYear(r0,e0){return pad(r0.getUTCFullYear()%100,e0,2)}function formatUTCYearISO(r0,e0){return r0=UTCdISO(r0),pad(r0.getUTCFullYear()%100,e0,2)}function formatUTCFullYear(r0,e0){return pad(r0.getUTCFullYear()%1e4,e0,4)}function formatUTCFullYearISO(r0,e0){var n0=r0.getUTCDay();return r0=n0>=4||n0===0?utcThursday(r0):utcThursday.ceil(r0),pad(r0.getUTCFullYear()%1e4,e0,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(r0){return+r0}function formatUnixTimestampSeconds(r0){return Math.floor(+r0/1e3)}var locale,timeFormat,utcFormat;defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale(r0){return locale=formatLocale(r0),timeFormat=locale.format,locale.parse,utcFormat=locale.utcFormat,locale.utcParse,locale}function date(r0){return new Date(r0)}function number(r0){return r0 instanceof Date?+r0:+new Date(+r0)}function calendar(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0){var d0=continuous(),h0=d0.invert,f0=d0.domain,p0=u0(".%L"),A0=u0(":%S"),m0=u0("%I:%M"),x0=u0("%I %p"),g0=u0("%a %d"),y0=u0("%b %d"),b0=u0("%B"),E0=u0("%Y");function w0(v0){return(c0(v0)<v0?p0:l0(v0)<v0?A0:o0(v0)<v0?m0:s0(v0)<v0?x0:a0(v0)<v0?i0(v0)<v0?g0:y0:n0(v0)<v0?b0:E0)(v0)}return d0.invert=function(v0){return new Date(h0(v0))},d0.domain=function(v0){return arguments.length?f0(Array.from(v0,number)):f0().map(date)},d0.ticks=function(v0){var S0=f0();return r0(S0[0],S0[S0.length-1],v0??10)},d0.tickFormat=function(v0,S0){return S0==null?w0:u0(S0)},d0.nice=function(v0){var S0=f0();return(!v0||typeof v0.range!="function")&&(v0=e0(S0[0],S0[S0.length-1],v0??10)),v0?f0(nice(S0,v0)):d0},d0.copy=function(){return copy$1(d0,calendar(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0))},d0}function time(){return initRange.apply(calendar(timeTicks,timeTickInterval,timeYear,timeMonth,timeSunday,timeDay,timeHour,timeMinute,second,timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function utcTime(){return initRange.apply(calendar(utcTicks,utcTickInterval,utcYear,utcMonth,utcSunday,utcDay,utcHour,utcMinute,second,utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function transformer$1(){var r0=0,e0=1,n0,a0,i0,s0,o0=identity$6,l0=!1,c0;function u0(h0){return h0==null||isNaN(h0=+h0)?c0:o0(i0===0?.5:(h0=(s0(h0)-n0)*i0,l0?Math.max(0,Math.min(1,h0)):h0))}u0.domain=function(h0){return arguments.length?([r0,e0]=h0,n0=s0(r0=+r0),a0=s0(e0=+e0),i0=n0===a0?0:1/(a0-n0),u0):[r0,e0]},u0.clamp=function(h0){return arguments.length?(l0=!!h0,u0):l0},u0.interpolator=function(h0){return arguments.length?(o0=h0,u0):o0};function d0(h0){return function(f0){var p0,A0;return arguments.length?([p0,A0]=f0,o0=h0(p0,A0),u0):[o0(0),o0(1)]}}return u0.range=d0(interpolate),u0.rangeRound=d0(interpolateRound),u0.unknown=function(h0){return arguments.length?(c0=h0,u0
vendor: 84,240 bytes, lines 668-695
668):c0},function(h0){return s0=h0,n0=h0(r0),a0=h0(e0),i0=n0===a0?0:1/(a0-n0),u0}}function copy(r0,e0){return e0.domain(r0.domain()).interpolator(r0.interpolator()).clamp(r0.clamp()).unknown(r0.unknown())}function sequential(){var r0=linearish(transformer$1()(identity$6));return r0.copy=function(){return copy(r0,sequential())},initInterpolator.apply(r0,arguments)}function sequentialLog(){var r0=loggish(transformer$1()).domain([1,10]);return r0.copy=function(){return copy(r0,sequentialLog()).base(r0.base())},initInterpolator.apply(r0,arguments)}function sequentialSymlog(){var r0=symlogish(transformer$1());return r0.copy=function(){return copy(r0,sequentialSymlog()).constant(r0.constant())},initInterpolator.apply(r0,arguments)}function sequentialPow(){var r0=powish(transformer$1());return r0.copy=function(){return copy(r0,sequentialPow()).exponent(r0.exponent())},initInterpolator.apply(r0,arguments)}function sequentialSqrt(){return sequentialPow.apply(null,arguments).exponent(.5)}function sequentialQuantile(){var r0=[],e0=identity$6;function n0(a0){if(a0!=null&&!isNaN(a0=+a0))return e0((bisectRight(r0,a0,1)-1)/(r0.length-1))}return n0.domain=function(a0){if(!arguments.length)return r0.slice();r0=[];for(let i0 of a0)i0!=null&&!isNaN(i0=+i0)&&r0.push(i0);return r0.sort(ascending),n0},n0.interpolator=function(a0){return arguments.length?(e0=a0,n0):e0},n0.range=function(){return r0.map((a0,i0)=>e0(i0/(r0.length-1)))},n0.quantiles=function(a0){return Array.from({length:a0+1},(i0,s0)=>quantile$1(r0,s0/a0))},n0.copy=function(){return sequentialQuantile(e0).domain(r0)},initInterpolator.apply(n0,arguments)}function transformer(){var r0=0,e0=.5,n0=1,a0=1,i0,s0,o0,l0,c0,u0=identity$6,d0,h0=!1,f0;function p0(m0){return isNaN(m0=+m0)?f0:(m0=.5+((m0=+d0(m0))-s0)*(a0*m0<a0*s0?l0:c0),u0(h0?Math.max(0,Math.min(1,m0)):m0))}p0.domain=function(m0){return arguments.length?([r0,e0,n0]=m0,i0=d0(r0=+r0),s0=d0(e0=+e0),o0=d0(n0=+n0),l0=i0===s0?0:.5/(s0-i0),c0=s0===o0?0:.5/(o0-s0),a0=s0<i0?-1:1,p0):[r0,e0,n0]},p0.clamp=function(m0){return arguments.length?(h0=!!m0,p0):h0},p0.interpolator=function(m0){return arguments.length?(u0=m0,p0):u0};function A0(m0){return function(x0){var g0,y0,b0;return arguments.length?([g0,y0,b0]=x0,u0=piecewise(m0,[g0,y0,b0]),p0):[u0(0),u0(.5),u0(1)]}}return p0.range=A0(interpolate),p0.rangeRound=A0(interpolateRound),p0.unknown=function(m0){return arguments.length?(f0=m0,p0):f0},function(m0){return d0=m0,i0=m0(r0),s0=m0(e0),o0=m0(n0),l0=i0===s0?0:.5/(s0-i0),c0=s0===o0?0:.5/(o0-s0),a0=s0<i0?-1:1,p0}}function diverging(){var r0=linearish(transformer()(identity$6));return r0.copy=function(){return copy(r0,diverging())},initInterpolator.apply(r0,arguments)}function divergingLog(){var r0=loggish(transformer()).domain([.1,1,10]);return r0.copy=function(){return copy(r0,divergingLog()).base(r0.base())},initInterpolator.apply(r0,arguments)}function divergingSymlog(){var r0=symlogish(transformer());return r0.copy=function(){return copy(r0,divergingSymlog()).constant(r0.constant())},initInterpolator.apply(r0,arguments)}function divergingPow(){var r0=powish(transformer());return r0.copy=function(){return copy(r0,divergingPow()).exponent(r0.exponent())},initInterpolator.apply(r0,arguments)}function divergingSqrt(){return divergingPow.apply(null,arguments).exponent(.5)}const d3Scales=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:band,scaleDiverging:diverging,scaleDivergingLog:divergingLog,scaleDivergingPow:divergingPow,scaleDivergingSqrt:divergingSqrt,scaleDivergingSymlog:divergingSymlog,scaleIdentity:identity$4,scaleImplicit:implicit,scaleLinear:linear,scaleLog:log,scaleOrdinal:ordinal,scalePoint:point,scalePow:pow,scaleQuantile:quantile,scaleQuantize:quantize,scaleRadial:radial,scaleSequential:sequential,scaleSequentialLog:sequentialLog,scaleSequentialPow:sequentialPow,scaleSequentialQuantile:sequentialQuantile,scaleSequentialSqrt:sequentialSqrt,scaleSequentialSymlog:sequentialSymlog,scaleSqrt:sqrt,scaleSymlog:symlog,scaleThreshold:threshold,scaleTime:time,scaleUtc:utcTime,tickFormat},Symbol.toStringTag,{value:"Module"}));var isSymbol=isSymbol_1;function baseExtremum$4(r0,e0,n0){for(var a0=-1,i0=r0.length;++a0<i0;){var s0=r0[a0],o0=e0(s0);if(o0!=null&&(l0===void 0?o0===o0&&!isSymbol(o0):n0(o0,l0)))var l0=o0,c0=s0}return c0}var _baseExtremum=baseExtremum$4;function baseGt$2(r0,e0){return r0>e0}var _baseGt=baseGt$2,baseExtremum$3=_baseExtremum,baseGt$1=_baseGt,identity$3=identity_1;function max(r0){return r0&&r0.length?baseExtremum$3(r0,identity$3,baseGt$1):void 0}var max_1=max;const max$1=getDefaultExportFromCjs(max_1);function baseLt$2(r0,e0){return r0<e0}var _baseLt=baseLt$2,baseExtremum$2=_baseExtremum,baseLt$1=_baseLt,identity$2=identity_1;function min(r0){return r0&&r0.length?baseExtremum$2(r0,identity$2,baseLt$1):void 0}var min_1=min;const min$1=getDefaultExportFromCjs(min_1);var arrayMap=_arrayMap,baseIteratee$5=_baseIteratee,baseMap=_baseMap,isArray$3=isArray_1;function map$2(r0,e0){var n0=isArray$3(r0)?arrayMap:baseMap;return n0(r0,baseIteratee$5(e0))}var map_1=map$2,baseFlatten=_baseFlatten,map$1=map_1;function flatMap(r0,e0){return baseFlatten(map$1(r0,e0),1)}var flatMap_1=flatMap;const flatMap$1=getDefaultExportFromCjs(flatMap_1);var baseIsEqual=_baseIsEqual;function isEqual(r0,e0){return baseIsEqual(r0,e0)}var isEqual_1=isEqual;const isEqual$1=getDefaultExportFromCjs(isEqual_1);var MAX_DIGITS=1e9,defaults={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Decimal,external=!0,decimalError="[DecimalError] ",invalidArgument=decimalError+"Invalid argument: ",exponentOutOfRange=decimalError+"Exponent out of range: ",mathfloor=Math.floor,mathpow=Math.pow,isDecimal=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ONE,BASE=1e7,LOG_BASE=7,MAX_SAFE_INTEGER=9007199254740991,MAX_E=mathfloor(MAX_SAFE_INTEGER/LOG_BASE),P$1={};P$1.absoluteValue=P$1.abs=function(){var r0=new this.constructor(this);return r0.s&&(r0.s=1),r0};P$1.comparedTo=P$1.cmp=function(r0){var e0,n0,a0,i0,s0=this;if(r0=new s0.constructor(r0),s0.s!==r0.s)return s0.s||-r0.s;if(s0.e!==r0.e)return s0.e>r0.e^s0.s<0?1:-1;for(a0=s0.d.length,i0=r0.d.length,e0=0,n0=a0<i0?a0:i0;e0<n0;++e0)if(s0.d[e0]!==r0.d[e0])return s0.d[e0]>r0.d[e0]^s0.s<0?1:-1;return a0===i0?0:a0>i0^s0.s<0?1:-1};P$1.decimalPlaces=P$1.dp=function(){var r0=this,e0=r0.d.length-1,n0=(e0-r0.e)*LOG_BASE;if(e0=r0.d[e0],e0)for(;e0%10==0;e0/=10)n0--;return n0<0?0:n0};P$1.dividedBy=P$1.div=function(r0){return divide(this,new this.constructor(r0))};P$1.dividedToIntegerBy=P$1.idiv=function(r0){var e0=this,n0=e0.constructor;return round(divide(e0,new n0(r0),0,1),n0.precision)};P$1.equals=P$1.eq=function(r0){return!this.cmp(r0)};P$1.exponent=function(){return getBase10Exponent(this)};P$1.greaterThan=P$1.gt=function(r0){return this.cmp(r0)>0};P$1.greaterThanOrEqualTo=P$1.gte=function(r0){return this.cmp(r0)>=0};P$1.isInteger=P$1.isint=function(){return this.e>this.d.length-2};P$1.isNegative=P$1.isneg=function(){return this.s<0};P$1.isPositive=P$1.ispos=function(){return this.s>0};P$1.isZero=function(){return this.s===0};P$1.lessThan=P$1.lt=function(r0){return this.cmp(r0)<0};P$1.lessThanOrEqualTo=P$1.lte=function(r0){return this.cmp(r0)<1};P$1.logarithm=P$1.log=function(r0){var e0,n0=this,a0=n0.constructor,i0=a0.precision,s0=i0+5;if(r0===void 0)r0=new a0(10);else if(r0=new a0(r0),r0.s<1||r0.eq(ONE))throw Error(decimalError+"NaN");if(n0.s<1)throw Error(decimalError+(n0.s?"NaN":"-Infinity"));return n0.eq(ONE)?new a0(0):(external=!1,e0=divide(ln$1(n0,s0),ln$1(r0,s0),s0),external=!0,round(e0,i0))};P$1.minus=P$1.sub=function(r0){var e0=this;return r0=new e0.constructor(r0),e0.s==r0.s?subtract(e0,r0):add(e0,(r0.s=-r0.s,r0))};P$1.modulo=P$1.mod=function(r0){var e0,n0=this,a0=n0.constructor,i0=a0.precision;if(r0=new a0(r0),!r0.s)throw Error(decimalError+"NaN");return n0.s?(external=!1,e0=divide(n0,r0,0,1).times(r0),external=!0,n0.minus(e0)):round(new a0(n0),i0)};P$1.naturalExponential=P$1.exp=function(){return exp(this)};P$1.naturalLogarithm=P$1.ln=function(){return ln$1(this)};P$1.negated=P$1.neg=function(){var r0=new this.constructor(this);return r0.s=-r0.s||0,r0};P$1.plus=P$1.add=function(r0){var e0=this;return r0=new e0.constructor(r0),e0.s==r0.s?add(e0,r0):subtract(e0,(r0.s=-r0.s,r0))};P$1.precision=P$1.sd=function(r0){var e0,n0,a0,i0=this;if(r0!==void 0&&r0!==!!r0&&r0!==1&&r0!==0)throw Error(invalidArgument+r0);if(e0=getBase10Exponent(i0)+1,a0=i0.d.length-1,n0=a0*LOG_BASE+1,a0=i0.d[a0],a0){for(;a0%10==0;a0/=10)n0--;for(a0=i0.d[0];a0>=10;a0/=10)n0++}return r0&&e0>n0?e0:n0};P$1.squareRoot=P$1.sqrt=function(){var r0,e0,n0,a0,i0,s0,o0,l0=this,c0=l0.constructor;if(l0.s<1){if(!l0.s)return new c0(0);throw Error(decimalError+"NaN")}for(r0=getBase10Exponent(l0),external=!1,i0=Math.sqrt(+l0),i0==0||i0==1/0?(e0=digitsToString(l0.d),(e0.length+r0)%2==0&&(e0+="0"),i0=Math.sqrt(e0),r0=mathfloor((r0+1)/2)-(r0<0||r0%2),i0==1/0?e0="5e"+r0:(e0=i0.toExponential(),e0=e0.slice(0,e0.indexOf("e")+1)+r0),a0=new c0(e0)):a0=new c0(i0.toString()),n0=c0.precision,i0=o0=n0+3;;)if(s0=a0,a0=s0.plus(divide(l0,s0,o0+2)).times(.5),digitsToString(s0.d).slice(0,o0)===(e0=digitsToString(a0.d)).slice(0,o0)){if(e0=e0.slice(o0-3,o0+1),i0==o0&&e0=="4999"){if(round(s0,n0+1,0),s0.times(s0).eq(l0)){a0=s0;break}}else if(e0!="9999")break;o0+=4}return external=!0,round(a0,n0)};P$1.times=P$1.mul=function(r0){var e0,n0,a0,i0,s0,o0,l0,c0,u0,d0=this,h0=d0.constructor,f0=d0.d,p0=(r0=new h0(r0)).d;if(!d0.s||!r0.s)return new h0(0);for(r0.s*=d0.s,n0=d0.e+r0.e,c0=f0.length,u0=p0.length,c0<u0&&(s0=f0,f0=p0,p0=s0,o0=c0,c0=u0,u0=o0),s0=[],o0=c0+u0,a0=o0;a0--;)s0.push(0);for(a0=u0;--a0>=0;){for(e0=0,i0=c0+a0;i0>a0;)l0=s0[i0]+p0[a0]*f0[i0-a0-1]+e0,s0[i0--]=l0%BASE|0,e0=l0/BASE|0;s0[i0]=(s0[i0]+e0)%BASE|0}for(;!s0[--o0];)s0.pop();return e0?++n0:s0.shift(),r0.d=s0,r0.e=n0,external?round(r0,h0.precision):r0};P$1.toDecimalPlaces=P$1.todp=function(r0,e0){var n0=this,a0=n0.constructor;return n0=new a0(n0),r0===void 0?n0:(checkInt32(r0,0,MAX_DIGITS),e0===void 0?e0=a0.rounding:checkInt32(e0,0,8),round(n0,r0+getBase10Exponent(n0)+1,e0))};P$1.toExponential=function(r0,e0){var n0,a0=this,i0=a0.constructor;return r0===void 0?n0=toString(a0,!0):(checkInt32(r0,0,MAX_DIGITS),e0===void 0?e0=i0.rounding:checkInt32(e0,0,8),a0=round(new i0(a0),r0+1,e0),n0=toString(a0,!0,r0+1)),n0};P$1.toFixed=function(r0,e0){var n0,a0,i0=this,s0=i0.constructor;return r0===void 0?toString(i0):(checkInt32(r0,0,MAX_DIGITS),e0===void 0?e0=s0.rounding:checkInt32(e0,0,8),a0=round(new s0(i0),r0+getBase10Exponent(i0)+1,e0),n0=toString(a0.abs(),!1,r0+getBase10Exponent(a0)+1),i0.isneg()&&!i0.isZero()?"-"+n0:n0)};P$1.toInteger=P$1.toint=function(){var r0=this,e0=r0.constructor;return round(new e0(r0),getBase10Exponent(r0)+1,e0.rounding)};P$1.toNumber=function(){return+this};P$1.toPower=P$1.pow=function(r0){var e0,n0,a0,i0,s0,o0,l0=this,c0=l0.constructor,u0=12,d0=+(r0=new c0(r0));if(!r0.s)return new c0(ONE);if(l0=new c0(l0),!l0.s){if(r0.s<1)throw Error(decimalError+"Infinity");return l0}if(l0.eq(ONE))return l0;if(a0=c0.precision,r0.eq(ONE))return round(l0,a0);if(e0=r0.e,n0=r0.d.length-1,o0=e0>=n0,s0=l0.s,o0){if((n0=d0<0?-d0:d0)<=MAX_SAFE_INTEGER){for(i0=new c0(ONE),e0=Math.ceil(a0/LOG_BASE+4),external=!1;n0%2&&(i0=i0.times(l0),truncate(i0.d,e0)),n0=mathfloor(n0/2),n0!==0;)l0=l0.times(l0),truncate(l0.d,e0);return external=!0,r0.s<0?new c0(ONE).div(i0):round(i0,a0)}}else if(s0<0)throw Error(decimalError+"NaN");return s0=s0<0&&r0.d[Math.max(e0,n0)]&1?-1:1,l0.s=1,external=!1,i0=r0.times(ln$1(l0,a0+u0)),external=!0,i0=exp(i0),i0.s=s0,i0};P$1.toPrecision=function(r0,e0){var n0,a0,i0=this,s0=i0.constructor;return r0===void 0?(n0=getBase10Exponent(i0),a0=toString(i0,n0<=s0.toExpNeg||n0>=s0.toExpPos)):(checkInt32(r0,1,MAX_DIGITS),e0===void 0?e0=s0.rounding:checkInt32(e0,0,8),i0=round(new s0(i0),r0,e0),n0=getBase10Exponent(i0),a0=toString(i0,r0<=n0||n0<=s0.toExpNeg,r0)),a0};P$1.toSignificantDigits=P$1.tosd=function(r0,e0){var n0=this,a0=n0.constructor;return r0===void 0?(r0=a0.precision,e0=a0.rounding):(checkInt32(r0,1,MAX_DIGITS),e0===void 0?e0=a0.rounding:checkInt32(e0,0,8)),round(new a0(n0),r0,e0)};P$1.toString=P$1.valueOf=P$1.val=P$1.toJSON=P$1[Symbol.for("nodejs.util.inspect.custom")]=function(){var r0=this,e0=getBase10Exponent(r0),n0=r0.constructor;return toString(r0,e0<=n0.toExpNeg||e0>=n0.toExpPos)};function add(r0,e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0=r0.constructor,h0=d0.precision;if(!r0.s||!e0.s)return e0.s||(e0=new d0(r0)),external?round(e0,h0):e0;if(c0=r0.d,u0=e0.d,o0=r0.e,i0=e0.e,c0=c0.slice(),s0=o0-i0,s0){for(s0<0?(a0=c0,s0=-s0,l0=u0.length):(a0=u0,i0=o0,l0=c0.length),o0=Math.ceil(h0/LOG_BASE),l0=o0>l0?o0+1:l0+1,s0>l0&&(s0=l0,a0.length=1),a0.reverse();s0--;)a0.push(0);a0.reverse()}for(l0=c0.length,s0=u0.length,l0-s0<0&&(s0=l0,a0=u0,u0=c0,c0=a0),n0=0;s0;)n0=(c0[--s0]=c0[s0]+u0[s0]+n0)/BASE|0,c0[s0]%=BASE;for(n0&&(c0.unshift(n0),++i0),l0=c0.length;c0[--l0]==0;)c0.pop();return e0.d=c0,e0.e=i0,external?round(e0,h0):e0}function checkInt32(r0,e0,n0){if(r0!==~~r0||r0<e0||r0>n0)throw Error(invalidArgument+r0)}function digitsToString(r0){var e0,n0,a0,i0=r0.length-1,s0="",o0=r0[0];if(i0>0){for(s0+=o0,e0=1;e0<i0;e0++)a0=r0[e0]+"",n0=LOG_BASE-a0.length,n0&&(s0+=getZeroString(n0)),s0+=a0;o0=r0[e0],a0=o0+"",n0=LOG_BASE-a0.length,n0&&(s0+=getZeroString(n0))}else if(o0===0)return"0";for(;o0%10===0;)o0/=10;return s0+o0}var divide=function(){function r0(a0,i0){var s0,o0=0,l0=a0.length;for(a0=a0.slice();l0--;)s0=a0[l0]*i0+o0,a0[l0]=s0%BASE|0,o0=s0/BASE|0;return o0&&a0.unshift(o0),a0}function e0(a0,i0,s0,o0){var l0,c0;if(s0!=o0)c0=s0>o0?1:-1;else for(l0=c0=0;l0<s0;l0++)if(a0[l0]!=i0[l0]){c0=a0[l0]>i0[l0]?1:-1;break}return c0}function n0(a0,i0,s0){for(var o0=0;s0--;)a0[s0]-=o0,o0=a0[s0]<i0[s0]?1:0,a0[s0]=o0*BASE+a0[s0]-i0[s0];for(;!a0[0]&&a0.length>1;)a0.shift()}return function(a0,i0,s0,o0){var l0,c0,u0,d0,h0,f0,p0,A0,m0,x0,g0,y0,b0,E0,w0,v0,S0,k0,R0=a0.constructor,j0=a0.s==i0.s?1:-1,C0=a0.d,$0=i0.d;if(!a0.s)return new R0(a0);if(!i0.s)throw Error(decimalError+"Division by zero");for(c0=a0.e-i0.e,S0=$0.length,w0=C0.length,p0=new R0(j0),A0=p0.d=[],u0=0;$0[u0]==(C0[u0]||0);)++u0;if($0[u0]>(C0[u0]||0)&&--c0,s0==null?y0=s0=R0.precision:o0?y0=s0+(getBase10Exponent(a0)-getBase10Exponent(i0))+1:y0=s0,y0<0)return new R0(0);if(y0=y0/LOG_BASE+2|0,u0=0,S0==1)for(d0=0,$0=$0[0],y0++;(u0<w0||d0)&&y0--;u0++)b0=d0*BASE+(C0[u0]||0),A0[u0]=b0/$0|0,d0=b0%$0|0;else{for(d0=BASE/($0[0]+1)|0,d0>1&&($0=r0($0,d0),C0=r0(C0,d0),S0=$0.length,w0=C0.length),E0=S0,m0=C0.slice(0,S0),x0=m0.length;x0<S0;)m0[x0++]=0;k0=$0.slice(),k0.unshift(0),v0=$0[0],$0[1]>=BASE/2&&++v0;do d0=0,l0=e0($0,m0,S0,x0),l0<0?(g0=m0[0],S0!=x0&&(g0=g0*BASE+(m0[1]||0)),d0=g0/v0|0,d0>1?(d0>=BASE&&(d0=BASE-1),h0=r0($0,d0),f0=h0.length,x0=m0.length,l0=e0(h0,m0,f0,x0),l0==1&&(d0--,n0(h0,S0<f0?k0:$0,f0))):(d0==0&&(l0=d0=1),h0=$0.slice()),f0=h0.length,f0<x0&&h0.unshift(0),n0(m0,h0,x0),l0==-1&&(x0=m0.length,l0=e0($0,m0,S0,x0),l0<1&&(d0++,n0(m0,S0<x0?k0:$0,x0))),x0=m0.length):l0===0&&(d0++,m0=[0]),A0[u0++]=d0,l0&&m0[0]?m0[x0++]=C0[E0]||0:(m0=[C0[E0]],x0=1);while((E0++<w0||m0[0]!==void 0)&&y0--)}return A0[0]||A0.shift(),p0.e=c0,round(p0,o0?s0+getBase10Exponent(p0)+1:s0)}}();function exp(r0,e0){var n0,a0,i0,s0,o0,l0,c0=0,u0=0,d0=r0.constructor,h0=d0.precision;if(getBase10Exponent(r0)>16)throw Error(exponentOutOfRange+getBase10Exponent(r0));if(!r0.s)return new d0(ONE);for(e0==null?(external=!1,l0=h0):l0=e0,o0=new d0(.03125);r0.abs().gte(.1);)r0=r0.times(o0),u0+=5;for(a0=Math.log(mathpow(2,u0))/Math.LN10*2+5|0,l0+=a0,n0=i0=s0=new d0(ONE),d0.precision=l0;;){if(i0=round(i0.times(r0),l0),n0=n0.times(++c0),o0=s0.plus(divide(i0,n0,l0)),digitsToString(o0.d).slice(0,l0)===digitsToString(s0.d).slice(0,l0)){for(;u0--;)s0=round(s0.times(s0),l0);return d0.precision=h0,e0==null?(external=!0,round(s0,h0)):s0}s0=o0}}function getBase10Exponent(r0){for(var e0=r0.e*LOG_BASE,n0=r0.d[0];n0>=10;n0/=10)e0++;return e0}function getLn10(r0,e0,n0){if(e0>r0.LN10.sd())throw external=!0,n0&&(r0.precision=n0),Error(decimalError+"LN10 precision limit exceeded");return round(new r0(r0.LN10),e0)}function getZeroString(r0){for(var e0="";r0--;)e0+="0";return e0}function ln$1(r0,e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0,h0=1,f0=10,p0=r0,A0=p0.d,m0=p0.constructor,x0=m0.precision;if(p0.s<1)throw Error(decimalError+(p0.s?"NaN":"-Infinity"));if(p0.eq(ONE))return new m0(0);if(e0==null?(external=!1,u0=x0):u0=e0,p0.eq(10))return e0==null&&(external=!0),getLn10(m0,u0);if(u0+=f0,m0.precision=u0,n0=digitsToString(A0),a0=n0.charAt(0),s0=getBase10Exponent(p0),Math.abs(s0)<15e14){for(;a0<7&&a0!=1||a0==1&&n0.charAt(1)>3;)p0=p0.times(r0),n0=digitsToString(p0.d),a0=n0.charAt(0),h0++;s0=getBase10Exponent(p0),a0>1?(p0=new m0("0."+n0),s0++):p0=new m0(a0+"."+n0.slice(1))}else return c0=getLn10(m0,u0+2,x0).times(s0+""),p0=ln$1(new m0(a0+"."+n0.slice(1)),u0-f0).plus(c0),m0.precision=x0,e0==null?(external=!0,round(p0,x0)):p0;for(l0=o0=p0=divide(p0.minus(ONE),p0.plus(ONE),u0),d0=round(p0.times(p0),u0),i0=3;;){if(o0=round(o0.times(d0),u0),c0=l0.plus(divide(o0,new m0(i0),u0)),digitsToString(c0.d).slice(0,u0)===digitsToString(l0.d).slice(0,u0))return l0=l0.times(2),s0!==0&&(l0=l0.plus(getLn10(m0,u0+2,x0).times(s0+""))),l0=divide(l0,new m0(h0),u0),m0.precision=x0,e0==null?(external=!0,round(l0,x0)):l0;l0=c0,i0+=2}}function parseDecimal(r0,e0){var n0,a0,i0;for((n0=e0.indexOf("."))>-1&&(e0=e0.replace(".","")),(a0=e0.search(/e/i))>0?(n0<0&&(n0=a0),n0+=+e0.slice(a0+1),e0=e0.substring(0,a0)):n0<0&&(n0=e0.length),a0=0;e0.charCodeAt(a0)===48;)++a0;for(i0=e0.length;e0.charCodeAt(i0-1)===48;)--i0;if(e0=e0.slice(a0,i0),e0){if(i0-=a0,n0=n0-a0-1,r0.e=mathfloor(n0/LOG_BASE),r0.d=[],a0=(n0+1)%LOG_BASE,n0<0&&(a0+=LOG_BASE),a0<i0){for(a0&&r0.d.push(+e0.slice(0,a0)),i0-=LOG_BASE;a0<i0;)r0.d.push(+e0.slice(a0,a0+=LOG_BASE));e0=e0.slice(a0),a0=LOG_BASE-e0.length}else a0-=i0;for(;a0--;)e0+="0";if(r0.d.push(+e0),external&&(r0.e>MAX_E||r0.e<-MAX_E))throw Error(exponentOutOfRange+n0)}else r0.s=0,r0.e=0,r0.d=[0];return r0}function round(r0,e0,n0){var a0,i0,s0,o0,l0,c0,u0,d0,h0=r0.d;for(o0=1,s0=h0[0];s0>=10;s0/=10)o0++;if(a0=e0-o0,a0<0)a0+=LOG_BASE,i0=e0,u0=h0[d0=0];else{if(d0=Math.ceil((a0+1)/LOG_BASE),s0=h0.length,d0>=s0)return r0;for(u0=s0=h0[d0],o0=1;s0>=10;s0/=10)o0++;a0%=LOG_BASE,i0=a0-LOG_BASE+o0}if(n0!==void 0&&(s0=mathpow(10,o0-i0-1),l0=u0/s0%10|0,c0=e0<0||h0[d0+1]!==void 0||u0%s0,c0=n0<4?(l0||c0)&&(n0==0||n0==(r0.s<0?3:2)):l0>5||l0==5&&(n0==4||c0||n0==6&&(a0>0?i0>0?u0/mathpow(10,o0-i0):0:h0[d0-1])%10&1||n0==(r0.s<0?8:7))),e0<1||!h0[0])return c0?(s0=getBase10Exponent(r0),h0.length=1,e0=e0-s0-1,h0[0]=mathpow(10,(LOG_BASE-e0%LOG_BASE)%LOG_BASE),r0.e=mathfloor(-e0/LOG_BASE)||0):(h0.length=1,h0[0]=r0.e=r0.s=0),r0;if(a0==0?(h0.length=d0,s0=1,d0--):(h0.length=d0+1,s0=mathpow(10,LOG_BASE-a0),h0[d0]=i0>0?(u0/mathpow(10,o0-i0)%mathpow(10,i0)|0)*s0:0),c0)for(;;)if(d0==0){(h0[0]+=s0)==BASE&&(h0[0]=1,++r0.e);break}else{if(h0[d0]+=s0,h0[d0]!=BASE)break;h0[d0--]=0,s0=1}for(a0=h0.length;h0[--a0]===0;)h0.pop();if(external&&(r0.e>MAX_E||r0.e<-MAX_E))throw Error(exponentOutOfRange+getBase10Exponent(r0));return r0}function subtract(r0,e0){var n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0=r0.constructor,p0=f0.precision;if(!r0.s||!e0.s)return e0.s?e0.s=-e0.s:e0=new f0(r0),external?round(e0,p0):e0;if(c0=r0.d,h0=e0.d,a0=e0.e,u0=r0.e,c0=c0.slice(),o0=u0-a0,o0){for(d0=o0<0,d0?(n0=c0,o0=-o0,l0=h0.length):(n0=h0,a0=u0,l0=c0.length),i0=Math.max(Math.ceil(p0/LOG_BASE),l0)+2,o0>i0&&(o0=i0,n0.length=1),n0.reverse(),i0=o0;i0--;)n0.push(0);n0.reverse()}else{for(i0=c0.length,l0=h0.length,d0=i0<l0,d0&&(l0=i0),i0=0;i0<l0;i0++)if(c0[i0]!=h0[i0]){d0=c0[i0]<h0[i0];break}o0=0}for(d0&&(n0=c0,c0=h0,h0=n0,e0.s=-e0.s),l0=c0.length,i0=h0.length-l0;i0>0;--i0)c0[l0++]=0;for(i0=h0.length;i0>o0;){if(c0[--i0]<h0[i0]){for(s0=i0;s0&&c0[--s0]===0;)c0[s0]=BASE-1;--c0[s0],c0[i0]+=BASE}c0[i0]-=h0[i0]}for(;c0[--l0]===0;)c0.pop();for(;c0[0]===0;c0.shift())--a0;return c0[0]?(e0.d=c0,e0.e=a0,external?round(e0,p0):e0):new f0(0)}function toString(r0,e0,n0){var a0,i0=getBase10Exponent(r0),s0=digitsToString(r0.d),o0=s0.length;return e0?(n0&&(a0=n0-o0)>0?s0=s0.charAt(0)+"."+s0.slice(1)+getZeroString(a0):o0>1&&(s0=s0.charAt(0)+"."+s0.slice(1)),s0=s0+(i0<0?"e":"e+")+i0):i0<0?(s0="0."+getZeroString(-i0-1)+s0,n0&&(a0=n0-o0)>0&&(s0+=getZeroString(a0))):i0>=o0?(s0+=getZeroString(i0+1-o0),n0&&(a0=n0-i0-1)>0&&(s0=s0+"."+getZeroString(a0))):((a0=i0+1)<o0&&(s0=s0.slice(0,a0)+"."+s0.slice(a0)),n0&&(a0=n0-o0)>0&&(i0+1===o0&&(s0+="."),s0+=getZeroString(a0))),r0.s<0?"-"+s0:s0}function truncate(r0,e0){if(r0.length>e0)return r0.length=e0,!0}function clone(r0){var e0,n0,a0;function i0(s0){var o0=this;if(!(o0 instanceof i0))return new i0(s0);if(o0.constructor=i0,s0 instanceof i0){o0.s=s0.s,o0.e=s0.e,o0.d=(s0=s0.d)?s0.slice():s0;return}if(typeof s0=="number"){if(s0*0!==0)throw Error(invalidArgument+s0);if(s0>0)o0.s=1;else if(s0<0)s0=-s0,o0.s=-1;else{o0.s=0,o0.e=0,o0.d=[0];return}if(s0===~~s0&&s0<1e7){o0.e=0,o0.d=[s0];return}return parseDecimal(o0,s0.toString())}else if(typeof s0!="string")throw Error(invalidArgument+s0);if(s0.charCodeAt(0)===45?(s0=s0.slice(1),o0.s=-1):o0.s=1,isDecimal.test(s0))parseDecimal(o0,s0);else throw Error(invalidArgument+s0)}if(i0.prototype=P$1,i0.ROUND_UP=0,i0.ROUND_DOWN=1,i0.ROUND_CEIL=2,i0.ROUND_FLOOR=3,i0.ROUND_HALF_UP=4,i0.ROUND_HALF_DOWN=5,i0.ROUND_HALF_EVEN=6,i0.ROUND_HALF_CEIL=7,i0.ROUND_HALF_FLOOR=8,i0.clone=clone,i0.config=i0.set=config,r0===void 0&&(r0={}),r0)for(a0=["precision","rounding","toExpNeg","toExpPos","LN10"],e0=0;e0<a0.length;)r0.hasOwnProperty(n0=a0[e0++])||(r0[n0]=this[n0]);return i0.config(r0),i0}function config(r0){if(!r0||typeof r0!="object")throw Error(decimalError+"Object expected");var e0,n0,a0,i0=["precision",1,MAX_DIGITS,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e0=0;e0<i0.length;e0+=3)if((a0=r0[n0=i0[e0]])!==void 0)if(mathfloor(a0)===a0&&a0>=i0[e0+1]&&a0<=i0[e0+2])this[n0]=a0;else throw Error(invalidArgument+n0+": "+a0);if((a0=r0[n0="LN10"])!==void 0)if(a0==Math.LN10)this[n0]=new this(a0);else throw Error(invalidArgument+n0+": "+a0);return this}var Decimal=clone(defaults);ONE=new Decimal(1);const Decimal$1=Decimal;function _toConsumableArray$a(r0){return _arrayWithoutHoles$a(r0)||_iterableToArray$b(r0)||_unsupportedIterableToArray$g(r0)||_nonIterableSpread$a()}function _nonIterableSpread$a(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 669In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$g(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$g(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$g(r0,e0)}}function _iterableToArray$b(r0){if(typeof Symbol<"u"&&Symbol.iterator in Object(r0))return Array.from(r0)}function _arrayWithoutHoles$a(r0){if(Array.isArray(r0))return _arrayLikeToArray$g(r0)}function _arrayLikeToArray$g(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}var identity$1=function r0(e0){return e0},PLACE_HOLDER={"@@functional/placeholder":!0},isPlaceHolder=function r0(e0){return e0===PLACE_HOLDER},curry0=function r0(e0){return function n0(){return arguments.length===0||arguments.length===1&&isPlaceHolder(arguments.length<=0?void 0:arguments[0])?n0:e0.apply(void 0,arguments)}},curryN=function r0(e0,n0){return e0===1?n0:curry0(function(){for(var a0=arguments.length,i0=new Array(a0),s0=0;s0<a0;s0++)i0[s0]=arguments[s0];var o0=i0.filter(function(l0){return l0!==PLACE_HOLDER}).length;return o0>=e0?n0.apply(void 0,i0):r0(e0-o0,curry0(function(){for(var l0=arguments.length,c0=new Array(l0),u0=0;u0<l0;u0++)c0[u0]=arguments[u0];var d0=i0.map(function(h0){return isPlaceHolder(h0)?c0.shift():h0});return n0.apply(void 0,_toConsumableArray$a(d0).concat(c0))}))})},curry=function r0(e0){return curryN(e0.length,e0)},range$2=function r0(e0,n0){for(var a0=[],i0=e0;i0<n0;++i0)a0[i0-e0]=i0;return a0},map=curry(function(r0,e0){return Array.isArray(e0)?e0.map(r0):Object.keys(e0).map(function(n0){return e0[n0]}).map(r0)}),compose=function r0(){for(var e0=arguments.length,n0=new Array(e0),a0=0;a0<e0;a0++)n0[a0]=arguments[a0];if(!n0.length)return identity$1;var i0=n0.reverse(),s0=i0[0],o0=i0.slice(1);return function(){return o0.reduce(function(l0,c0){return c0(l0)},s0.apply(void 0,arguments))}},reverse=function r0(e0){return Array.isArray(e0)?e0.reverse():e0.split("").reverse.join("")},memoize=function r0(e0){var n0=null,a0=null;return function(){for(var i0=arguments.length,s0=new Array(i0),o0=0;o0<i0;o0++)s0[o0]=arguments[o0];return n0&&s0.every(function(l0,c0){return l0===n0[c0]})||(n0=s0,a0=e0.apply(void 0,s0)),a0}};function getDigitCount(r0){var e0;return r0===0?e0=1:e0=Math.floor(new Decimal$1(r0).abs().log(10).toNumber())+1,e0}function rangeStep(r0,e0,n0){for(var a0=new Decimal$1(r0),i0=0,s0=[];a0.lt(e0)&&i0<1e5;)s0.push(a0.toNumber()),a0=a0.add(n0),i0++;return s0}var interpolateNumber=curry(function(r0,e0,n0){var a0=+r0,i0=+e0;return a0+n0*(i0-a0)}),uninterpolateNumber=curry(function(r0,e0,n0){var a0=e0-+r0;return a0=a0||1/0,(n0-r0)/a0}),uninterpolateTruncation=curry(function(r0,e0,n0){var a0=e0-+r0;return a0=a0||1/0,Math.max(0,Math.min(1,(n0-r0)/a0))});const Arithmetic={rangeStep,getDigitCount,interpolateNumber,uninterpolateNumber,uninterpolateTruncation};function _toConsumableArray$9(r0){return _arrayWithoutHoles$9(r0)||_iterableToArray$a(r0)||_unsupportedIterableToArray$f(r0)||_nonIterableSpread$9()}function _nonIterableSpread$9(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 670In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$a(r0){if(typeof Symbol<"u"&&Symbol.iterator in Object(r0))return Array.from(r0)}function _arrayWithoutHoles$9(r0){if(Array.isArray(r0))return _arrayLikeToArray$f(r0)}function _slicedToArray$8(r0,e0){return _arrayWithHoles$9(r0)||_iterableToArrayLimit$8(r0,e0)||_unsupportedIterableToArray$f(r0,e0)||_nonIterableRest$9()}function _nonIterableRest$9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 671In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$f(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$f(r0,e0)}}function _arrayLikeToArray$f(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$8(r0,e0){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(r0)))){var n0=[],a0=!0,i0=!1,s0=void 0;try{for(var o0=r0[Symbol.iterator](),l0;!(a0=(l0=o0.next()).done)&&(n0.push(l0.value),!(e0&&n0.length===e0));a0=!0);}catch(c0){i0=!0,s0=c0}finally{try{!a0&&o0.return!=null&&o0.return()}finally{if(i0)throw s0}}return n0}}function _arrayWithHoles$9(r0){if(Array.isArray(r0))return r0}function getValidInterval(r0){var e0=_slicedToArray$8(r0,2),n0=e0[0],a0=e0[1],i0=n0,s0=a0;return n0>a0&&(i0=a0,s0=n0),[i0,s0]}function getFormatStep(r0,e0,n0){if(r0.lte(0))return new Decimal$1(0);var a0=Arithmetic.getDigitCount(r0.toNumber()),i0=new Decimal$1(10).pow(a0),s0=r0.div(i0),o0=a0!==1?.05:.1,l0=new Decimal$1(Math.ceil(s0.div(o0).toNumber())).add(n0).mul(o0),c0=l0.mul(i0);return e0?c0:new Decimal$1(Math.ceil(c0))}function getTickOfSingleValue(r0,e0,n0){var a0=1,i0=new Decimal$1(r0);if(!i0.isint()&&n0){var s0=Math.abs(r0);s0<1?(a0=new Decimal$1(10).pow(Arithmetic.getDigitCount(r0)-1),i0=new Decimal$1(Math.floor(i0.div(a0).toNumber())).mul(a0)):s0>1&&(i0=new Decimal$1(Math.floor(r0)))}else r0===0?i0=new Decimal$1(Math.floor((e0-1)/2)):n0||(i0=new Decimal$1(Math.floor(r0)));var o0=Math.floor((e0-1)/2),l0=compose(map(function(c0){return i0.add(new Decimal$1(c0-o0).mul(a0)).toNumber()}),range$2);return l0(0,e0)}function calculateStep(r0,e0,n0,a0){var i0=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e0-r0)/(n0-1)))return{step:new Decimal$1(0),tickMin:new Decimal$1(0),tickMax:new Decimal$1(0)};var s0=getFormatStep(new Decimal$1(e0).sub(r0).div(n0-1),a0,i0),o0;r0<=0&&e0>=0?o0=new Decimal$1(0):(o0=new Decimal$1(r0).add(e0).div(2),o0=o0.sub(new Decimal$1(o0).mod(s0)));var l0=Math.ceil(o0.sub(r0).div(s0).toNumber()),c0=Math.ceil(new Decimal$1(e0).sub(o0).div(s0).toNumber()),u0=l0+c0+1;return u0>n0?calculateStep(r0,e0,n0,a0,i0+1):(u0<n0&&(c0=e0>0?c0+(n0-u0):c0,l0=e0>0?l0:l0+(n0-u0)),{step:s0,tickMin:o0.sub(new Decimal$1(l0).mul(s0)),tickMax:o0.add(new Decimal$1(c0).mul(s0))})}function getNiceTickValuesFn(r0){var e0=_slicedToArray$8(r0,2),n0=e0[0],a0=e0[1],i0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o0=Math.max(i0,2),l0=getValidInterval([n0,a0]),c0=_slicedToArray$8(l0,2),u0=c0[0],d0=c0[1];if(u0===-1/0||d0===1/0){var h0=d0===1/0?[u0].concat(_toConsumableArray$9(range$2(0,i0-1).map(function(){return 1/0}))):[].concat(_toConsumableArray$9(range$2(0,i0-1).map(function(){return-1/0})),[d0]);return n0>a0?reverse(h0):h0}if(u0===d0)return getTickOfSingleValue(u0,i0,s0);var f0=calculateStep(u0,d0,o0,s0),p0=f0.step,A0=f0.tickMin,m0=f0.tickMax,x0=Arithmetic.rangeStep(A0,m0.add(new Decimal$1(.1).mul(p0)),p0);return n0>a0?reverse(x0):x0}function getTickValuesFixedDomainFn(r0,e0){var n0=_slicedToArray$8(r0,2),a0=n0[0],i0=n0[1],s0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o0=getValidInterval([a0,i0]),l0=_slicedToArray$8(o0,2),c0=l0[0],u0=l0[1];if(c0===-1/0||u0===1/0)return[a0,i0];if(c0===u0)return[c0];var d0=Math.max(e0,2),h0=getFormatStep(new Decimal$1(u0).sub(c0).div(d0-1),s0,0),f0=[].concat(_toConsumableArray$9(Arithmetic.rangeStep(new Decimal$1(c0),new Decimal$1(u0).sub(new Decimal$1(.99).mul(h0)),h0)),[u0]);return a0>i0?reverse(f0):f0}var getNiceTickValues=memoize(getNiceTickValuesFn),getTickValuesFixedDomain=memoize(getTickValuesFixedDomainFn),prefix="Invariant failed";function invariant(r0,e0){throw new Error(prefix)}var _excluded$8=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _typeof$r(r0){"@babel/helpers - typeof";return _typeof$r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$r(r0)}function _extends$h(){return _extends$h=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$h.apply(this,arguments)}function _slicedToArray$7(r0,e0){return _arrayWithHoles$8(r0)||_iterableToArrayLimit$7(r0,e0)||_unsupportedIterableToArray$e(r0,e0)||_nonIterableRest$8()}function _nonIterableRest$8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 672In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$e(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$e(r0,e0)}}function _arrayLikeToArray$e(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$7(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$8(r0){if(Array.isArray(r0))return r0}function _objectWithoutProperties$8(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$8(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$8(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function _classCallCheck$b(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$q(a0.key),a0)}}function _createClass$b(r0,e0,n0){return e0&&_defineProperties$b(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$8(r0,e0,n0){return e0=_getPrototypeOf$9(e0),_possibleConstructorReturn$9(r0,_isNativeReflectConstruct$9()?Reflect.construct(e0,n0||[],_getPrototypeOf$9(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$9(r0,e0){if(e0&&(_typeof$r(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$9(r0)}function _assertThisInitialized$9(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$9(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$9=function(){return!!r0})()}function _getPrototypeOf$9(r0){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$9(r0)}function _inherits$9(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$9(r0,e0)}function _setPrototypeOf$9(r0,e0){return _setPrototypeOf$9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$9(r0,e0)}function _defineProperty$q(r0,e0,n0){return e0=_toPropertyKey$q(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$q(r0){var e0=_toPrimitive$q(r0,"string");return _typeof$r(e0)=="symbol"?e0:e0+""}function _toPrimitive$q(r0,e0){if(_typeof$r(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$r(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var ErrorBar=function(r0){function e0(){return _classCallCheck$b(this,e0),_callSuper$8(this,e0,arguments)}return _inherits$9(e0,r0),_createClass$b(e0,[{key:"render",value:function(){var a0=this.props,i0=a0.offset,s0=a0.layout,o0=a0.width,l0=a0.dataKey,c0=a0.data,u0=a0.dataPointFormatter,d0=a0.xAxis,h0=a0.yAxis,f0=_objectWithoutProperties$8(a0,_excluded$8),p0=filterProps(f0,!1);this.props.direction==="x"&&d0.type!=="number"&&invariant();var A0=c0.map(function(m0){var x0=u0(m0,l0),g0=x0.x,y0=x0.y,b0=x0.value,E0=x0.errorVal;if(!E0)return null;var w0=[],v0,S0;if(Array.isArray(E0)){var k0=_slicedToArray$7(E0,2);v0=k0[0],S0=k0[1]}else v0=S0=E0;if(s0==="vertical"){var R0=d0.scale,j0=y0+i0,C0=j0+o0,$0=j0-o0,T0=R0(b0-v0),I0=R0(b0+S0);w0.push({x1:I0,y1:C0,x2:I0,y2:$0}),w0.push({x1:T0,y1:j0,x2:I0,y2:j0}),w0.push({x1:T0,y1:C0,x2:T0,y2:$0})}else if(s0==="horizontal"){var M0=h0.scale,N0=g0+i0,D0=N0-o0,O0=N0+o0,B0=M0(b0-v0),z0=M0(b0+S0);w0.push({x1:D0,y1:z0,x2:O0,y2:z0}),w0.push({x1:N0,y1:B0,x2:N0,y2:z0}),w0.push({x1:D0,y1:B0,x2:O0,y2:B0})}return React__default.createElement(Layer,_extends$h({className:"recharts-errorBar",key:"bar-".concat(w0.map(function(G0){return"".concat(G0.x1,"-").concat(G0.x2,"-").concat(G0.y1,"-").concat(G0.y2)}))},p0),w0.map(function(G0){return React__default.createElement("line",_extends$h({},G0,{key:"line-".concat(G0.x1,"-").concat(G0.x2,"-").concat(G0.y1,"-").concat(G0.y2)}))}))});return React__default.createElement(Layer,{className:"recharts-errorBars"},A0)}}])}(React__default.Component);_defineProperty$q(ErrorBar,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});_defineProperty$q(ErrorBar,"displayName","ErrorBar");function _typeof$q(r0){"@babel/helpers - typeof";return _typeof$q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$q(r0)}function ownKeys$o(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$o(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$o(Object(n0),!0).forEach(function(a0){_defineProperty$p(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$o(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$p(r0,e0,n0){return e0=_toPropertyKey$p(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$p(r0){var e0=_toPrimitive$p(r0,"string");return _typeof$q(e0)=="symbol"?e0:e0+""}function _toPrimitive$p(r0,e0){if(_typeof$q(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$q(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getLegendProps=function r0(e0){var n0=e0.children,a0=e0.formattedGraphicalItems,i0=e0.legendWidth,s0=e0.legendContent,o0=findChildByType(n0,Legend);if(!o0)return null;var l0=Legend.defaultProps,c0=l0!==void 0?_objectSpread$o(_objectSpread$o({},l0),o0.props):{},u0;return o0.props&&o0.props.payload?u0=o0.props&&o0.props.payload:s0==="children"?u0=(a0||[]).reduce(function(d0,h0){var f0=h0.item,p0=h0.props,A0=p0.sectors||p0.data||[];return d0.concat(A0.map(function(m0){return{type:o0.props.iconType||f0.props.legendType,value:m0.name,color:m0.fill,payload:m0}}))},[]):u0=(a0||[]).map(function(d0){var h0=d0.item,f0=h0.type.defaultProps,p0=f0!==void 0?_objectSpread$o(_objectSpread$o({},f0),h0.props):{},A0=p0.dataKey,m0=p0.name,x0=p0.legendType,g0=p0.hide;return{inactive:g0,dataKey:A0,type:c0.iconType||x0||"square",color:getMainColorOfGraphicItem(h0),value:m0||A0,payload:p0}}),_objectSpread$o(_objectSpread$o(_objectSpread$o({},c0),Legend.getWithHeight(o0,i0)),{},{payload:u0,item:o0})};function _typeof$p(r0){"@babel/helpers - typeof";return _typeof$p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$p(r0)}function _toConsumableArray$8(r0){return _arrayWithoutHoles$8(r0)||_iterableToArray$9(r0)||_unsupportedIterableToArray$d(r0)||_nonIterableSpread$8()}function _nonIterableSpread$8(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 673In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$d(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$d(r0,e0)}}function _iterableToArray$9(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$8(r0){if(Array.isArray(r0))return _arrayLikeToArray$d(r0)}function _arrayLikeToArray$d(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function ownKeys$n(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$n(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$n(Object(n0),!0).forEach(function(a0){_defineProperty$o(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$n(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$o(r0,e0,n0){return e0=_toPropertyKey$o(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$o(r0){var e0=_toPrimitive$o(r0,"string");return _typeof$p(e0)=="symbol"?e0:e0+""}function _toPrimitive$o(r0,e0){if(_typeof$p(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$p(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function getValueByDataKey(r0,e0,n0){return isNil$1(r0)||isNil$1(e0)?n0:isNumOrStr(e0)?get$2(r0,e0,n0):isFunction$3(e0)?e0(r0):n0}function getDomainOfDataByKey(r0,e0,n0,a0){var i0=flatMap$1(r0,function(l0){return getValueByDataKey(l0,e0)});if(n0==="number"){var s0=i0.filter(function(l0){return isNumber$1(l0)||parseFloat(l0)});return s0.length?[min$1(s0),max$1(s0)]:[1/0,-1/0]}var o0=a0?i0.filter(function(l0){return!isNil$1(l0)}):i0;return o0.map(function(l0){return isNumOrStr(l0)||l0 instanceof Date?l0:""})}var calculateActiveTickIndex=function r0(e0){var n0,a0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i0=arguments.length>2?arguments[2]:void 0,s0=arguments.length>3?arguments[3]:void 0,o0=-1,l0=(n0=a0==null?void 0:a0.length)!==null&&n0!==void 0?n0:0;if(l0<=1)return 0;if(s0&&s0.axisType==="angleAxis"&&Math.abs(Math.abs(s0.range[1]-s0.range[0])-360)<=1e-6)for(var c0=s0.range,u0=0;u0<l0;u0++){var d0=u0>0?i0[u0-1].coordinate:i0[l0-1].coordinate,h0=i0[u0].coordinate,f0=u0>=l0-1?i0[0].coordinate:i0[u0+1].coordinate,p0=void 0;if(mathSign(h0-d0)!==mathSign(f0-h0)){var A0=[];if(mathSign(f0-h0)===mathSign(c0[1]-c0[0])){p0=f0;var m0=h0+c0[1]-c0[0];A0[0]=Math.min(m0,(m0+d0)/2),A0[1]=Math.max(m0,(m0+d0)/2)}else{p0=d0;var x0=f0+c0[1]-c0[0];A0[0]=Math.min(h0,(x0+h0)/2),A0[1]=Math.max(h0,(x0+h0)/2)}var g0=[Math.min(h0,(p0+h0)/2),Math.max(h0,(p0+h0)/2)];if(e0>g0[0]&&e0<=g0[1]||e0>=A0[0]&&e0<=A0[1]){o0=i0[u0].index;break}}else{var y0=Math.min(d0,f0),b0=Math.max(d0,f0);if(e0>(y0+h0)/2&&e0<=(b0+h0)/2){o0=i0[u0].index;break}}}else for(var E0=0;E0<l0;E0++)if(E0===0&&e0<=(a0[E0].coordinate+a0[E0+1].coordinate)/2||E0>0&&E0<l0-1&&e0>(a0[E0].coordinate+a0[E0-1].coordinate)/2&&e0<=(a0[E0].coordinate+a0[E0+1].coordinate)/2||E0===l0-1&&e0>(a0[E0].coordinate+a0[E0-1].coordinate)/2){o0=a0[E0].index;break}return o0},getMainColorOfGraphicItem=function r0(e0){var n0,a0=e0,i0=a0.type.displayName,s0=(n0=e0.type)!==null&&n0!==void 0&&n0.defaultProps?_objectSpread$n(_objectSpread$n({},e0.type.defaultProps),e0.props):e0.props,o0=s0.stroke,l0=s0.fill,c0;switch(i0){case"Line":c0=o0;break;case"Area":case"Radar":c0=o0&&o0!=="none"?o0:l0;break;default:c0=l0;break}return c0},getBarSizeList=function r0(e0){var n0=e0.barSize,a0=e0.totalSize,i0=e0.stackGroups,s0=i0===void 0?{}:i0;if(!s0)return{};for(var o0={},l0=Object.keys(s0),c0=0,u0=l0.length;c0<u0;c0++)for(var d0=s0[l0[c0]].stackGroups,h0=Object.keys(d0),f0=0,p0=h0.length;f0<p0;f0++){var A0=d0[h0[f0]],m0=A0.items,x0=A0.cateAxisId,g0=m0.filter(function(S0){return getDisplayName(S0.type).indexOf("Bar")>=0});if(g0&&g0.length){var y0=g0[0].type.defaultProps,b0=y0!==void 0?_objectSpread$n(_objectSpread$n({},y0),g0[0].props):g0[0].props,E0=b0.barSize,w0=b0[x0];o0[w0]||(o0[w0]=[]);var v0=isNil$1(E0)?n0:E0;o0[w0].push({item:g0[0],stackList:g0.slice(1),barSize:isNil$1(v0)?void 0:getPercentValue(v0,a0,0)})}}return o0},getBarPosition=function r0(e0){var n0=e0.barGap,a0=e0.barCategoryGap,i0=e0.bandSize,s0=e0.sizeList,o0=s0===void 0?[]:s0,l0=e0.maxBarSize,c0=o0.length;if(c0<1)return null;var u0=getPercentValue(n0,i0,0,!0),d0,h0=[];if(o0[0].barSize===+o0[0].barSize){var f0=!1,p0=i0/c0,A0=o0.reduce(function(E0,w0){return E0+w0.barSize||0},0);A0+=(c0-1)*u0,A0>=i0&&(A0-=(c0-1)*u0,u0=0),A0>=i0&&p0>0&&(f0=!0,p0*=.9,A0=c0*p0);var m0=(i0-A0)/2>>0,x0={offset:m0-u0,size:0};d0=o0.reduce(function(E0,w0){var v0={item:w0.item,position:{offset:x0.offset+x0.size+u0,size:f0?p0:w0.barSize}},S0=[].concat(_toConsumableArray$8(E0),[v0]);return x0=S0[S0.length-1].position,w0.stackList&&w0.stackList.length&&w0.stackList.forEach(function(k0){S0.push({item:k0,position:x0})}),S0},h0)}else{var g0=getPercentValue(a0,i0,0,!0);i0-2*g0-(c0-1)*u0<=0&&(u0=0);var y0=(i0-2*g0-(c0-1)*u0)/c0;y0>1&&(y0>>=0);var b0=l0===+l0?Math.min(y0,l0):y0;d0=o0.reduce(function(E0,w0,v0){var S0=[].concat(_toConsumableArray$8(E0),[{item:w0.item,position:{offset:g0+(y0+u0)*v0+(y0-b0)/2,size:b0}}]);return w0.stackList&&w0.stackList.length&&w0.stackList.forEach(function(k0){S0.push({item:k0,position:S0[S0.length-1].position})}),S0},h0)}return d0},appendOffsetOfLegend=function r0(e0,n0,a0,i0){var s0=a0.children,o0=a0.width,l0=a0.margin,c0=o0-(l0.left||0)-(l0.right||0),u0=getLegendProps({children:s0,legendWidth:c0});if(u0){var d0=i0||{},h0=d0.width,f0=d0.height,p0=u0.align,A0=u0.verticalAlign,m0=u0.layout;if((m0==="vertical"||m0==="horizontal"&&A0==="middle")&&p0!=="center"&&isNumber$1(e0[p0]))return _objectSpread$n(_objectSpread$n({},e0),{},_defineProperty$o({},p0,e0[p0]+(h0||0)));if((m0==="horizontal"||m0==="vertical"&&p0==="center")&&A0!=="middle"&&isNumber$1(e0[A0]))return _objectSpread$n(_objectSpread$n({},e0),{},_defineProperty$o({},A0,e0[A0]+(f0||0)))}return e0},isErrorBarRelevantForAxis=function r0(e0,n0,a0){return isNil$1(n0)?!0:e0==="horizontal"?n0==="yAxis":e0==="vertical"||a0==="x"?n0==="xAxis":a0==="y"?n0==="yAxis":!0},getDomainOfErrorBars=function r0(e0,n0,a0,i0,s0){var o0=n0.props.children,l0=findAllByType(o0,ErrorBar).filter(function(u0){return isErrorBarRelevantForAxis(i0,s0,u0.props.direction)});if(l0&&l0.length){var c0=l0.map(function(u0){return u0.props.dataKey});return e0.reduce(function(u0,d0){var h0=getValueByDataKey(d0,a0);if(isNil$1(h0))return u0;var f0=Array.isArray(h0)?[min$1(h0),max$1(h0)]:[h0,h0],p0=c0.reduce(function(A0,m0){var x0=getValueByDataKey(d0,m0,0),g0=f0[0]-Math.abs(Array.isArray(x0)?x0[0]:x0),y0=f0[1]+Math.abs(Array.isArray(x0)?x0[1]:x0);return[Math.min(g0,A0[0]),Math.max(y0,A0[1])]},[1/0,-1/0]);return[Math.min(p0[0],u0[0]),Math.max(p0[1],u0[1])]},[1/0,-1/0])}return null},parseErrorBarsOfAxis=function r0(e0,n0,a0,i0,s0){var o0=n0.map(function(l0){return getDomainOfErrorBars(e0,l0,a0,s0,i0)}).filter(function(l0){return!isNil$1(l0)});return o0&&o0.length?o0.reduce(function(l0,c0){return[Math.min(l0[0],c0[0]),Math.max(l0[1],c0[1])]},[1/0,-1/0]):null},getDomainOfItemsWithSameAxis=function r0(e0,n0,a0,i0,s0){var o0=n0.map(function(c0){var u0=c0.props.dataKey;return a0==="number"&&u0&&getDomainOfErrorBars(e0,c0,u0,i0)||getDomainOfDataByKey(e0,u0,a0,s0)});if(a0==="number")return o0.reduce(function(c0,u0){return[Math.min(c0[0],u0[0]),Math.max(c0[1],u0[1])]},[1/0,-1/0]);var l0={};return o0.reduce(function(c0,u0){for(var d0=0,h0=u0.length;d0<h0;d0++)l0[u0[d0]]||(l0[u0[d0]]=!0,c0.push(u0[d0]));return c0},[])},isCategoricalAxis=function r0(e0,n0){return e0==="horizontal"&&n0==="xAxis"||e0==="vertical"&&n0==="yAxis"||e0==="centric"&&n0==="angleAxis"||e0==="radial"&&n0==="radiusAxis"},getTicksOfAxis=function r0(e0,n0,a0){if(!e0)return null;var i0=e0.scale,s0=e0.duplicateDomain,o0=e0.type,l0=e0.range,c0=e0.realScaleType==="scaleBand"?i0.bandwidth()/2:2,u0=(n0||a0)&&o0==="category"&&i0.bandwidth?i0.bandwidth()/c0:0;if(u0=e0.axisType==="angleAxis"&&(l0==null?void 0:l0.length)>=2?mathSign(l0[0]-l0[1])*2*u0:u0,n0&&(e0.ticks||e0.niceTicks)){var d0=(e0.ticks||e0.niceTicks).map(function(h0){var f0=s0?s0.indexOf(h0):h0;return{coordinate:i0(f0)+u0,value:h0,offset:u0}});return d0.filter(function(h0){return!isNan(h0.coordinate)})}return e0.isCategorical&&e0.categoricalDomain?e0.categoricalDomain.map(function(h0,f0){return{coordinate:i0(h0)+u0,value:h0,index:f0,offset:u0}}):i0.ticks&&!a0?i0.ticks(e0.tickCount).map(function(h0){return{coordinate:i0(h0)+u0,value:h0,offset:u0}}):i0.domain().map(function(h0,f0){return{coordinate:i0(h0)+u0,value:s0?s0[h0]:h0,index:f0,offset:u0}})},handlerWeakMap=new WeakMap,combineEventHandlers=function r0(e0,n0){if(typeof n0!="function")return e0;handlerWeakMap.has(e0)||handlerWeakMap.set(e0,new WeakMap);var a0=handlerWeakMap.get(e0);if(a0.has(n0))return a0.get(n0);var i0=function(){e0.apply(void 0,arguments),n0.apply(void 0,arguments)};return a0.set(n0,i0),i0},parseScale=function r0(e0,n0,a0){var i0=e0.scale,s0=e0.type,o0=e0.layout,l0=e0.axisType;if(i0==="auto")return o0==="radial"&&l0==="radiusAxis"?{scale:band(),realScaleType:"band"}:o0==="radial"&&l0==="angleAxis"?{scale:linear(),realScaleType:"linear"}:s0==="category"&&n0&&(n0.indexOf("LineChart")>=0||n0.indexOf("AreaChart")>=0||n0.indexOf("ComposedChart")>=0&&!a0)?{scale:point(),realScaleType:"point"}:s0==="category"?{scale:band(),realScaleType:"band"}:{scale:linear(),realScaleType:"linear"};if(isString$1(i0)){var c0="scale".concat(upperFirst$1(i0));return{scale:(d3Scales[c0]||point)(),realScaleType:d3Scales[c0]?c0:"point"}}return isFunction$3(i0)?{scale:i0}:{scale:point(),realScaleType:"point"}},EPS=1e-4,checkDomainOfScale=function r0(e0){var n0=e0.domain();if(!(!n0||n0.length<=2)){var a0=n0.length,i0=e0.range(),s0=Math.min(i0[0],i0[1])-EPS,o0=Math.max(i0[0],i0[1])+EPS,l0=e0(n0[0]),c0=e0(n0[a0-1]);(l0<s0||l0>o0||c0<s0||c0>o0)&&e0.domain([n0[0],n0[a0-1]])}},offsetSign=function r0(e0){var n0=e0.length;if(!(n0<=0))for(var a0=0,i0=e0[0].length;a0<i0;++a0)for(var s0=0,o0=0,l0=0;l0<n0;++l0){var c0=isNan(e0[l0][a0][1])?e0[l0][a0][0]:e0[l0][a0][1];c0>=0?(e0[l0][a0][0]=s0,e0[l0][a0][1]=s0+c0,s0=e0[l0][a0][1]):(e0[l0][a0][0]=o0,e0[l0][a0][1]=o0+c0,o0=e0[l0][a0][1])}},offsetPositive=function r0(e0){var n0=e0.length;if(!(n0<=0))for(var a0=0,i0=e0[0].length;a0<i0;++a0)for(var s0=0,o0=0;o0<n0;++o0){var l0=isNan(e0[o0][a0][1])?e0[o0][a0][0]:e0[o0][a0][1];l0>=0?(e0[o0][a0][0]=s0,e0[o0][a0][1]=s0+l0,s0=e0[o0][a0][1]):(e0[o0][a0][0]=0,e0[o0][a0][1]=0)}},STACK_OFFSET_MAP={sign:offsetSign,expand:stackOffsetExpand,none:stackOffsetNone,silhouette:stackOffsetSilhouette,wiggle:stackOffsetWiggle,positive:offsetPositive},getStackedData=function r0(e0,n0,a0){var i0=n0.map(function(l0){return l0.props.dataKey}),s0=STACK_OFFSET_MAP[a0],o0=shapeStack().keys(i0).value(function(l0,c0){return+getValueByDataKey(l0,c0,0)}).order(stackOrderNone).offset(s0);return o0(e0)},getStackGroupsByAxisId=function r0(e0,n0,a0,i0,s0,o0){if(!e0)return null;var l0=o0?n0.reverse():n0,c0={},u0=l0.reduce(function(h0,f0){var p0,A0=(p0=f0.type)!==null&&p0!==void 0&&p0.defaultProps?_objectSpread$n(_objectSpread$n({},f0.type.defaultProps),f0.props):f0.props,m0=A0.stackId,x0=A0.hide;if(x0)return h0;var g0=A0[a0],y0=h0[g0]||{hasStack:!1,stackGroups:{}};if(isNumOrStr(m0)){var b0=y0.stackGroups[m0]||{numericAxisId:a0,cateAxisId:i0,items:[]};b0.items.push(f0),y0.hasStack=!0,y0.stackGroups[m0]=b0}else y0.stackGroups[uniqueId("_stackId_")]={numericAxisId:a0,cateAxisId:i0,items:[f0]};return _objectSpread$n(_objectSpread$n({},h0),{},_defineProperty$o({},g0,y0))},c0),d0={};return Object.keys(u0).reduce(function(h0,f0){var p0=u0[f0];if(p0.hasStack){var A0={};p0.stackGroups=Object.keys(p0.stackGroups).reduce(function(m0,x0){var g0=p0.stackGroups[x0];return _objectSpread$n(_objectSpread$n({},m0),{},_defineProperty$o({},x0,{numericAxisId:a0,cateAxisId:i0,items:g0.items,stackedData:getStackedData(e0,g0.items,s0)}))},A0)}return _objectSpread$n(_objectSpread$n({},h0),{},_defineProperty$o({},f0,p0))},d0)},getTicksOfScale=function r0(e0,n0){var a0=n0.realScaleType,i0=n0.type,s0=n0.tickCount,o0=n0.originalDomain,l0=n0.allowDecimals,c0=a0||n0.scale;if(c0!=="auto"&&c0!=="linear")return null;if(s0&&i0==="number"&&o0&&(o0[0]==="auto"||o0[1]==="auto")){var u0=e0.domain();if(!u0.length)return null;var d0=getNiceTickValues(u0,s0,l0);return e0.domain([min$1(d0),max$1(d0)]),{niceTicks:d0}}if(s0&&i0==="number"){var h0=e0.domain(),f0=getTickValuesFixedDomain(h0,s0,l0);return{niceTicks:f0}}return null},getStackedDataOfItem=function r0(e0,n0){var a0,i0=(a0=e0.type)!==null&&a0!==void 0&&a0.defaultProps?_objectSpread$n(_objectSpread$n({},e0.type.defaultProps),e0.props):e0.props,s0=i0.stackId;if(isNumOrStr(s0)){var o0=n0[s0];if(o0){var l0=o0.items.indexOf(e0);return l0>=0?o0.stackedData[l0]:null}}return null},getDomainOfSingle=function r0(e0){return e0.reduce(function(n0,a0){return[min$1(a0.concat([n0[0]]).filter(isNumber$1)),max$1(a0.concat([n0[1]]).filter(isNumber$1))]},[1/0,-1/0])},getDomainOfStackGroups=function r0(e0,n0,a0){return Object.keys(e0).reduce(function(i0,s0){var o0=e0[s0],l0=o0.stackedData,c0=l0.reduce(function(u0,d0){var h0=getDomainOfSingle(d0.slice(n0,a0+1));return[Math.min(u0[0],h0[0]),Math.max(u0[1],h0[1])]},[1/0,-1/0]);return[Math.min(c0[0],i0[0]),Math.max(c0[1],i0[1])]},[1/0,-1/0]).map(function(i0){return i0===1/0||i0===-1/0?0:i0})},MIN_VALUE_REG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MAX_VALUE_REG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,parseSpecifiedDomain=function r0(e0,n0,a0){if(isFunction$3(e0))return e0(n0,a0);if(!Array.isArray(e0))return n0;var i0=[];if(isNumber$1(e0[0]))i0[0]=a0?e0[0]:Math.min(e0[0],n0[0]);else if(MIN_VALUE_REG.test(e0[0])){var s0=+MIN_VALUE_REG.exec(e0[0])[1];i0[0]=n0[0]-s0}else isFunction$3(e0[0])?i0[0]=e0[0](n0[0]):i0[0]=n0[0];if(isNumber$1(e0[1]))i0[1]=a0?e0[1]:Math.max(e0[1],n0[1]);else if(MAX_VALUE_REG.test(e0[1])){var o0=+MAX_VALUE_REG.exec(e0[1])[1];i0[1]=n0[1]+o0}else isFunction$3(e0[1])?i0[1]=e0[1](n0[1]):i0[1]=n0[1];return i0},getBandSizeOfAxis=function r0(e0,n0,a0){if(e0&&e0.scale&&e0.scale.bandwidth){var i0=e0.scale.bandwidth();if(!a0||i0>0)return i0}if(e0&&n0&&n0.length>=2){for(var s0=sortBy$1(n0,function(h0){return h0.coordinate}),o0=1/0,l0=1,c0=s0.length;l0<c0;l0++){var u0=s0[l0],d0=s0[l0-1];o0=Math.min((u0.coordinate||0)-(d0.coordinate||0),o0)}return o0===1/0?0:o0}return a0?void 0:0},parseDomainOfCategoryAxis=function r0(e0,n0,a0){return!e0||!e0.length||isEqual$1(e0,get$2(a0,"type.defaultProps.domain"))?n0:e0},getTooltipItem=function r0(e0,n0){var a0=e0.type.defaultProps?_objectSpread$n(_objectSpread$n({},e0.type.defaultProps),e0.props):e0.props,i0=a0.dataKey,s0=a0.name,o0=a0.unit,l0=a0.formatter,c0=a0.tooltipType,u0=a0.chartType,d0=a0.hide;return _objectSpread$n(_objectSpread$n({},filterProps(e0,!1)),{},{dataKey:i0,unit:o0,formatter:l0,name:s0||i0,color:getMainColorOfGraphicItem(e0),value:getValueByDataKey(n0,i0),type:c0,payload:n0,chartType:u0,hide:d0})};function _typeof$o(r0){"@babel/helpers - typeof";return _typeof$o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$o(r0)}function ownKeys$m(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$m(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$m(Object(n0),!0).forEach(function(a0){_defineProperty$n(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$m(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$n(r0,e0,n0){return e0=_toPropertyKey$n(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$n(r0){var e0=_toPrimitive$n(r0,"string");return _typeof$o(e0)=="symbol"?e0:e0+""}function _toPrimitive$n(r0,e0){if(_typeof$o(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$o(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _slicedToArray$6(r0,e0){return _arrayWithHoles$7(r0)||_iterableToArrayLimit$6(r0,e0)||_unsupportedIterableToArray$c(r0,e0)||_nonIterableRest$7()}function _nonIterableRest$7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 674In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$c(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$c(r0,e0)}}function _arrayLikeToArray$c(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$6(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$7(r0){if(Array.isArray(r0))return r0}var RADIAN$1=Math.PI/180,radianToDegree=function r0(e0){return e0*180/Math.PI},polarToCartesian=function r0(e0,n0,a0,i0){return{x:e0+Math.cos(-RADIAN$1*i0)*a0,y:n0+Math.sin(-RADIAN$1*i0)*a0}},getMaxRadius=function r0(e0,n0){var a0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e0-(a0.left||0)-(a0.right||0)),Math.abs(n0-(a0.top||0)-(a0.bottom||0)))/2},formatAxisMap=function r0(e0,n0,a0,i0,s0){var o0=e0.width,l0=e0.height,c0=e0.startAngle,u0=e0.endAngle,d0=getPercentValue(e0.cx,o0,o0/2),h0=getPercentValue(e0.cy,l0,l0/2),f0=getMaxRadius(o0,l0,a0),p0=getPercentValue(e0.innerRadius,f0,0),A0=getPercentValue(e0.outerRadius,f0,f0*.8),m0=Object.keys(n0);return m0.reduce(function(x0,g0){var y0=n0[g0],b0=y0.domain,E0=y0.reversed,w0;if(isNil$1(y0.range))i0==="angleAxis"?w0=[c0,u0]:i0==="radiusAxis"&&(w0=[p0,A0]),E0&&(w0=[w0[1],w0[0]]);else{w0=y0.range;var v0=w0,S0=_slicedToArray$6(v0,2);c0=S0[0],u0=S0[1]}var k0=parseScale(y0,s0),R0=k0.realScaleType,j0=k0.scale;j0.domain(b0).range(w0),checkDomainOfScale(j0);var C0=getTicksOfScale(j0,_objectSpread$m(_objectSpread$m({},y0),{},{realScaleType:R0})),$0=_objectSpread$m(_objectSpread$m(_objectSpread$m({},y0),C0),{},{range:w0,radius:A0,realScaleType:R0,scale:j0,cx:d0,cy:h0,innerRadius:p0,outerRadius:A0,startAngle:c0,endAngle:u0});return _objectSpread$m(_objectSpread$m({},x0),{},_defineProperty$n({},g0,$0))},{})},distanceBetweenPoints=function r0(e0,n0){var a0=e0.x,i0=e0.y,s0=n0.x,o0=n0.y;return Math.sqrt(Math.pow(a0-s0,2)+Math.pow(i0-o0,2))},getAngleOfPoint=function r0(e0,n0){var a0=e0.x,i0=e0.y,s0=n0.cx,o0=n0.cy,l0=distanceBetweenPoints({x:a0,y:i0},{x:s0,y:o0});if(l0<=0)return{radius:l0};var c0=(a0-s0)/l0,u0=Math.acos(c0);return i0>o0&&(u0=2*Math.PI-u0),{radius:l0,angle:radianToDegree(u0),angleInRadian:u0}},formatAngleOfSector=function r0(e0){var n0=e0.startAngle,a0=e0.endAngle,i0=Math.floor(n0/360),s0=Math.floor(a0/360),o0=Math.min(i0,s0);return{startAngle:n0-o0*360,endAngle:a0-o0*360}},reverseFormatAngleOfSetor=function r0(e0,n0){var a0=n0.startAngle,i0=n0.endAngle,s0=Math.floor(a0/360),o0=Math.floor(i0/360),l0=Math.min(s0,o0);return e0+l0*360},inRangeOfSector=function r0(e0,n0){var a0=e0.x,i0=e0.y,s0=getAngleOfPoint({x:a0,y:i0},n0),o0=s0.radius,l0=s0.angle,c0=n0.innerRadius,u0=n0.outerRadius;if(o0<c0||o0>u0)return!1;if(o0===0)return!0;var d0=formatAngleOfSector(n0),h0=d0.startAngle,f0=d0.endAngle,p0=l0,A0;if(h0<=f0){for(;p0>f0;)p0-=360;for(;p0<h0;)p0+=360;A0=p0>=h0&&p0<=f0}else{for(;p0>h0;)p0-=360;for(;p0<f0;)p0+=360;A0=p0>=f0&&p0<=h0}return A0?_objectSpread$m(_objectSpread$m({},n0),{},{radius:o0,angle:reverseFormatAngleOfSetor(p0,n0)}):null},getTickClassName=function r0(e0){return!reactExports.isValidElement(e0)&&!isFunction$3(e0)&&typeof e0!="boolean"?e0.className:""};function _typeof$n(r0){"@babel/helpers - typeof";return _typeof$n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$n(r0)}var _excluded$7=["offset"];function _toConsumableArray$7(r0){return _arrayWithoutHoles$7(r0)||_iterableToArray$8(r0)||_unsupportedIterableToArray$b(r0)||_nonIterableSpread$7()}function _nonIterableSpread$7(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 675In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$b(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$b(r0,e0)}}function _iterableToArray$8(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$7(r0){if(Array.isArray(r0))return _arrayLikeToArray$b(r0)}function _arrayLikeToArray$b(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _objectWithoutProperties$7(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$7(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$7(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function ownKeys$l(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$l(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$l(Object(n0),!0).forEach(function(a0){_defineProperty$m(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$l(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$m(r0,e0,n0){return e0=_toPropertyKey$m(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$m(r0){var e0=_toPrimitive$m(r0,"string");return _typeof$n(e0)=="symbol"?e0:e0+""}function _toPrimitive$m(r0,e0){if(_typeof$n(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$n(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$g.apply(this,arguments)}var getLabel=function r0(e0){var n0=e0.value,a0=e0.formatter,i0=isNil$1(e0.children)?n0:e0.children;return isFunction$3(a0)?a0(i0):i0},getDeltaAngle$1=function r0(e0,n0){var a0=mathSign(n0-e0),i0=Math.min(Math.abs(n0-e0),360);return a0*i0},renderRadialLabel=function r0(e0,n0,a0){var i0=e0.position,s0=e0.viewBox,o0=e0.offset,l0=e0.className,c0=s0,u0=c0.cx,d0=c0.cy,h0=c0.innerRadius,f0=c0.outerRadius,p0=c0.startAngle,A0=c0.endAngle,m0=c0.clockWise,x0=(h0+f0)/2,g0=getDeltaAngle$1(p0,A0),y0=g0>=0?1:-1,b0,E0;i0==="insideStart"?(b0=p0+y0*o0,E0=m0):i0==="insideEnd"?(b0=A0-y0*o0,E0=!m0):i0==="end"&&(b0=A0+y0*o0,E0=m0),E0=g0<=0?E0:!E0;var w0=polarToCartesian(u0,d0,x0,b0),v0=polarToCartesian(u0,d0,x0,b0+(E0?1:-1)*359),S0="M".concat(w0.x,",").concat(w0.y,` 676 A`).concat(x0,",").concat(x0,",0,1,").concat(E0?0:1,`, 677 `).concat(v0.x,",").concat(v0.y),k0=isNil$1(e0.id)?uniqueId("recharts-radial-line-"):e0.id;return React__default.createElement("text",_extends$g({},a0,{dominantBaseline:"central",className:clsx("recharts-radial-bar-label",l0)}),React__default.createElement("defs",null,React__default.createElement("path",{id:k0,d:S0})),React__default.createElement("textPath",{xlinkHref:"#".concat(k0)},n0))},getAttrsOfPolarLabel=function r0(e0){var n0=e0.viewBox,a0=e0.offset,i0=e0.position,s0=n0,o0=s0.cx,l0=s0.cy,c0=s0.innerRadius,u0=s0.outerRadius,d0=s0.startAngle,h0=s0.endAngle,f0=(d0+h0)/2;if(i0==="outside"){var p0=polarToCartesian(o0,l0,u0+a0,f0),A0=p0.x,m0=p0.y;return{x:A0,y:m0,textAnchor:A0>=o0?"start":"end",verticalAnchor:"middle"}}if(i0==="center")return{x:o0,y:l0,textAnchor:"middle",verticalAnchor:"middle"};if(i0==="centerTop")return{x:o0,y:l0,textAnchor:"middle",verticalAnchor:"start"};if(i0==="centerBottom")return{x:o0,y:l0,textAnchor:"middle",verticalAnchor:"end"};var x0=(c0+u0)/2,g0=polarToCartesian(o0,l0,x0,f0),y0=g0.x,b0=g0.y;return{x:y0,y:b0,textAnchor:"middle",verticalAnchor:"middle"}},getAttrsOfCartesianLabel=function r0(e0){var n0=e0.viewBox,a0=e0.parentViewBox,i0=e0.offset,s0=e0.position,o0=n0,l0=o0.x,c0=o0.y,u0=o0.width,d0=o0.height,h0=d0>=0?1:-1,f0=h0*i0,p0=h0>0?"end":"start",A0=h0>0?"start":"end",m0=u0>=0?1:-1,x0=m0*i0,g0=m0>0?"end":"start",y0=m0>0?"start":"end";if(s0==="top"){var b0={x:l0+u0/2,y:c0-h0*i0,textAnchor:"middle",verticalAnchor:p0};return _objectSpread$l(_objectSpread$l({},b0),a0?{height:Math.max(c0-a0.y,0),width:u0}:{})}if(s0==="bottom"){var E0={x:l0+u0/2,y:c0+d0+f0,textAnchor:"middle",verticalAnchor:A0};return _objectSpread$l(_objectSpread$l({},E0),a0?{height:Math.max(a0.y+a0.height-(c0+d0),0),width:u0}:{})}if(s0==="left"){var w0={x:l0-x0,y:c0+d0/2,textAnchor:g0,verticalAnchor:"middle"};return _objectSpread$l(_objectSpread$l({},w0),a0?{width:Math.max(w0.x-a0.x,0),height:d0}:{})}if(s0==="right"){var v0={x:l0+u0+x0,y:c0+d0/2,textAnchor:y0,verticalAnchor:"middle"};return _objectSpread$l(_objectSpread$l({},v0),a0?{width:Math.max(a0.x+a0.width-v0.x,0),height:d0}:{})}var S0=a0?{width:u0,height:d0}:{};return s0==="insideLeft"?_objectSpread$l({x:l0+x0,y:c0+d0/2,textAnchor:y0,verticalAnchor:"middle"},S0):s0==="insideRight"?_objectSpread$l({x:l0+u0-x0,y:c0+d0/2,textAnchor:g0,verticalAnchor:"middle"},S0):s0==="insideTop"?_objectSpread$l({x:l0+u0/2,y:c0+f0,textAnchor:"middle",verticalAnchor:A0},S0):s0==="insideBottom"?_objectSpread$l({x:l0+u0/2,y:c0+d0-f0,textAnchor:"middle",verticalAnchor:p0},S0):s0==="insideTopLeft"?_objectSpread$l({x:l0+x0,y:c0+f0,textAnchor:y0,verticalAnchor:A0},S0):s0==="insideTopRight"?_objectSpread$l({x:l0+u0-x0,y:c0+f0,textAnchor:g0,verticalAnchor:A0},S0):s0==="insideBottomLeft"?_objectSpread$l({x:l0+x0,y:c0+d0-f0,textAnchor:y0,verticalAnchor:p0},S0):s0==="insideBottomRight"?_objectSpread$l({x:l0+u0-x0,y:c0+d0-f0,textAnchor:g0,verticalAnchor:p0},S0):isObject$8(s0)&&(isNumber$1(s0.x)||isPercent(s0.x))&&(isNumber$1(s0.y)||isPercent(s0.y))?_objectSpread$l({x:l0+getPercentValue(s0.x,u0),y:c0+getPercentValue(s0.y,d0),textAnchor:"end",verticalAnchor:"end"},S0):_objectSpread$l({x:l0+u0/2,y:c0+d0/2,textAnchor:"middle",verticalAnchor:"middle"},S0)},isPolar=function r0(e0){return"cx"in e0&&isNumber$1(e0.cx)};function Label(r0){var e0=r0.offset,n0=e0===void 0?5:e0,a0=_objectWithoutProperties$7(r0,_excluded$7),i0=_objectSpread$l({offset:n0},a0),s0=i0.viewBox,o0=i0.position,l0=i0.value,c0=i0.children,u0=i0.content,d0=i0.className,h0=d0===void 0?"":d0,f0=i0.textBreakAll;if(!s0||isNil$1(l0)&&isNil$1(c0)&&!reactExports.isValidElement(u0)&&!isFunction$3(u0))return null;if(reactExports.isValidElement(u0))return reactExports.cloneElement(u0,i0);var p0;if(isFunction$3(u0)){if(p0=reactExports.createElement(u0,i0),reactExports.isValidElement(p0))return p0}else p0=getLabel(i0);var A0=isPolar(s0),m0=filterProps(i0,!0);if(A0&&(o0==="insideStart"||o0==="insideEnd"||o0==="end"))return renderRadialLabel(i0,p0,m0);var x0=A0?getAttrsOfPolarLabel(i0):getAttrsOfCartesianLabel(i0);return React__default.createElement(Text,_extends$g({className:clsx("recharts-label",h0)},m0,x0,{breakAll:f0}),p0)}Label.displayName="Label";var parseViewBox=function r0(e0){var n0=e0.cx,a0=e0.cy,i0=e0.angle,s0=e0.startAngle,o0=e0.endAngle,l0=e0.r,c0=e0.radius,u0=e0.innerRadius,d0=e0.outerRadius,h0=e0.x,f0=e0.y,p0=e0.top,A0=e0.left,m0=e0.width,x0=e0.height,g0=e0.clockWise,y0=e0.labelViewBox;if(y0)return y0;if(isNumber$1(m0)&&isNumber$1(x0)){if(isNumber$1(h0)&&isNumber$1(f0))return{x:h0,y:f0,width:m0,height:x0};if(isNumber$1(p0)&&isNumber$1(A0))return{x:p0,y:A0,width:m0,height:x0}}return isNumber$1(h0)&&isNumber$1(f0)?{x:h0,y:f0,width:0,height:0}:isNumber$1(n0)&&isNumber$1(a0)?{cx:n0,cy:a0,startAngle:s0||i0||0,endAngle:o0||i0||0,innerRadius:u0||0,outerRadius:d0||c0||l0||0,clockWise:g0}:e0.viewBox?e0.viewBox:{}},parseLabel=function r0(e0,n0){return e0?e0===!0?React__default.createElement(Label,{key:"label-implicit",viewBox:n0}):isNumOrStr(e0)?React__default.createElement(Label,{key:"label-implicit",viewBox:n0,value:e0}):reactExports.isValidElement(e0)?e0.type===Label?reactExports.cloneElement(e0,{key:"label-implicit",viewBox:n0}):React__default.createElement(Label,{key:"label-implicit",content:e0,viewBox:n0}):isFunction$3(e0)?React__default.createElement(Label,{key:"label-implicit",content:e0,viewBox:n0}):isObject$8(e0)?React__default.createElement(Label,_extends$g({viewBox:n0},e0,{key:"label-implicit"})):null:null},renderCallByParent$1=function r0(e0,n0){var a0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e0||!e0.children&&a0&&!e0.label)return null;var i0=e0.children,s0=parseViewBox(e0),o0=findAllByType(i0,Label).map(function(c0,u0){return reactExports.cloneElement(c0,{viewBox:n0||s0,key:"label-".concat(u0)})});if(!a0)return o0;var l0=parseLabel(e0.label,n0||s0);return[l0].concat(_toConsumableArray$7(o0))};Label.parseViewBox=parseViewBox;Label.renderCallByParent=renderCallByParent$1;function last(r0){var e0=r0==null?0:r0.length;return e0?r0[e0-1]:void 0}var last_1=last;const last$1=getDefaultExportFromCjs(last_1);function _typeof$m(r0){"@babel/helpers - typeof";return _typeof$m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$m(r0)}var _excluded$6=["valueAccessor"],_excluded2$2=["data","dataKey","clockWise","id","textBreakAll"];function _toConsumableArray$6(r0){return _arrayWithoutHoles$6(r0)||_iterableToArray$7(r0)||_unsupportedIterableToArray$a(r0)||_nonIterableSpread$6()}function _nonIterableSpread$6(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 678In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$a(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$a(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$a(r0,e0)}}function _iterableToArray$7(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$6(r0){if(Array.isArray(r0))return _arrayLikeToArray$a(r0)}function _arrayLikeToArray$a(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$f.apply(this,arguments)}function ownKeys$k(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$k(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$k(Object(n0),!0).forEach(function(a0){_defineProperty$l(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$k(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$l(r0,e0,n0){return e0=_toPropertyKey$l(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$l(r0){var e0=_toPrimitive$l(r0,"string");return _typeof$m(e0)=="symbol"?e0:e0+""}function _toPrimitive$l(r0,e0){if(_typeof$m(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$m(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _objectWithoutProperties$6(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$6(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$6(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}var defaultAccessor=function r0(e0){return Array.isArray(e0.value)?last$1(e0.value):e0.value};function LabelList(r0){var e0=r0.valueAccessor,n0=e0===void 0?defaultAccessor:e0,a0=_objectWithoutProperties$6(r0,_excluded$6),i0=a0.data,s0=a0.dataKey,o0=a0.clockWise,l0=a0.id,c0=a0.textBreakAll,u0=_objectWithoutProperties$6(a0,_excluded2$2);return!i0||!i0.length?null:React__default.createElement(Layer,{className:"recharts-label-list"},i0.map(function(d0,h0){var f0=isNil$1(s0)?n0(d0,h0):getValueByDataKey(d0&&d0.payload,s0),p0=isNil$1(l0)?{}:{id:"".concat(l0,"-").concat(h0)};return React__default.createElement(Label,_extends$f({},filterProps(d0,!0),u0,p0,{parentViewBox:d0.parentViewBox,value:f0,textBreakAll:c0,viewBox:Label.parseViewBox(isNil$1(o0)?d0:_objectSpread$k(_objectSpread$k({},d0),{},{clockWise:o0})),key:"label-".concat(h0),index:h0}))}))}LabelList.displayName="LabelList";function parseLabelList(r0,e0){return r0?r0===!0?React__default.createElement(LabelList,{key:"labelList-implicit",data:e0}):React__default.isValidElement(r0)||isFunction$3(r0)?React__default.createElement(LabelList,{key:"labelList-implicit",data:e0,content:r0}):isObject$8(r0)?React__default.createElement(LabelList,_extends$f({data:e0},r0,{key:"labelList-implicit"})):null:null}function renderCallByParent(r0,e0){var n0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!r0||!r0.children&&n0&&!r0.label)return null;var a0=r0.children,i0=findAllByType(a0,LabelList).map(function(o0,l0){return reactExports.cloneElement(o0,{data:e0,key:"labelList-".concat(l0)})});if(!n0)return i0;var s0=parseLabelList(r0.label,e0);return[s0].concat(_toConsumableArray$6(i0))}LabelList.renderCallByParent=renderCallByParent;function _typeof$l(r0){"@babel/helpers - typeof";return _typeof$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$l(r0)}function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$e.apply(this,arguments)}function ownKeys$j(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$j(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$j(Object(n0),!0).forEach(function(a0){_defineProperty$k(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$j(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$k(r0,e0,n0){return e0=_toPropertyKey$k(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$k(r0){var e0=_toPrimitive$k(r0,"string");return _typeof$l(e0)=="symbol"?e0:e0+""}function _toPrimitive$k(r0,e0){if(_typeof$l(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$l(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getDeltaAngle=function r0(e0,n0){var a0=mathSign(n0-e0),i0=Math.min(Math.abs(n0-e0),359.999);return a0*i0},getTangentCircle=function r0(e0){var n0=e0.cx,a0=e0.cy,i0=e0.radius,s0=e0.angle,o0=e0.sign,l0=e0.isExternal,c0=e0.cornerRadius,u0=e0.cornerIsExternal,d0=c0*(l0?1:-1)+i0,h0=Math.asin(c0/d0)/RADIAN$1,f0=u0?s0:s0+o0*h0,p0=polarToCartesian(n0,a0,d0,f0),A0=polarToCartesian(n0,a0,i0,f0),m0=u0?s0-o0*h0:s0,x0=polarToCartesian(n0,a0,d0*Math.cos(h0*RADIAN$1),m0);return{center:p0,circleTangency:A0,lineTangency:x0,theta:h0}},getSectorPath=function r0(e0){var n0=e0.cx,a0=e0.cy,i0=e0.innerRadius,s0=e0.outerRadius,o0=e0.startAngle,l0=e0.endAngle,c0=getDeltaAngle(o0,l0),u0=o0+c0,d0=polarToCartesian(n0,a0,s0,o0),h0=polarToCartesian(n0,a0,s0,u0),f0="M ".concat(d0.x,",").concat(d0.y,` 679 A `).concat(s0,",").concat(s0,`,0, 680 `).concat(+(Math.abs(c0)>180),",").concat(+(o0>u0),`, 681 `).concat(h0.x,",").concat(h0.y,` 682 `);if(i0>0){var p0=polarToCartesian(n0,a0,i0,o0),A0=polarToCartesian(n0,a0,i0,u0);f0+="L ".concat(A0.x,",").concat(A0.y,` 683 A `).concat(i0,",").concat(i0,`,0, 684 `).concat(+(Math.abs(c0)>180),",").concat(+(o0<=u0),`, 685 `).concat(p0.x,",").concat(p0.y," Z")}else f0+="L ".concat(n0,",").concat(a0," Z");return f0},getSectorWithCorner=function r0(e0){var n0=e0.cx,a0=e0.cy,i0=e0.innerRadius,s0=e0.outerRadius,o0=e0.cornerRadius,l0=e0.forceCornerRadius,c0=e0.cornerIsExternal,u0=e0.startAngle,d0=e0.endAngle,h0=mathSign(d0-u0),f0=getTangentCircle({cx:n0,cy:a0,radius:s0,angle:u0,sign:h0,cornerRadius:o0,cornerIsExternal:c0}),p0=f0.circleTangency,A0=f0.lineTangency,m0=f0.theta,x0=getTangentCircle({cx:n0,cy:a0,radius:s0,angle:d0,sign:-h0,cornerRadius:o0,cornerIsExternal:c0}),g0=x0.circleTangency,y0=x0.lineTangency,b0=x0.theta,E0=c0?Math.abs(u0-d0):Math.abs(u0-d0)-m0-b0;if(E0<0)return l0?"M ".concat(A0.x,",").concat(A0.y,` 686 a`).concat(o0,",").concat(o0,",0,0,1,").concat(o0*2,`,0 687 a`).concat(o0,",").concat(o0,",0,0,1,").concat(-o0*2,`,0 688 `):getSectorPath({cx:n0,cy:a0,innerRadius:i0,outerRadius:s0,startAngle:u0,endAngle:d0});var w0="M ".concat(A0.x,",").concat(A0.y,` 689 A`).concat(o0,",").concat(o0,",0,0,").concat(+(h0<0),",").concat(p0.x,",").concat(p0.y,` 690 A`).concat(s0,",").concat(s0,",0,").concat(+(E0>180),",").concat(+(h0<0),",").concat(g0.x,",").concat(g0.y,` 691 A`).concat(o0,",").concat(o0,",0,0,").concat(+(h0<0),",").concat(y0.x,",").concat(y0.y,` 692 `);if(i0>0){var v0=getTangentCircle({cx:n0,cy:a0,radius:i0,angle:u0,sign:h0,isExternal:!0,cornerRadius:o0,cornerIsExternal:c0}),S0=v0.circleTangency,k0=v0.lineTangency,R0=v0.theta,j0=getTangentCircle({cx:n0,cy:a0,radius:i0,angle:d0,sign:-h0,isExternal:!0,cornerRadius:o0,cornerIsExternal:c0}),C0=j0.circleTangency,$0=j0.lineTangency,T0=j0.theta,I0=c0?Math.abs(u0-d0):Math.abs(u0-d0)-R0-T0;if(I0<0&&o0===0)return"".concat(w0,"L").concat(n0,",").concat(a0,"Z");w0+="L".concat($0.x,",").concat($0.y,` 693 A`).concat(o0,",").concat(o0,",0,0,").concat(+(h0<0),",").concat(C0.x,",").concat(C0.y,` 694 A`).concat(i0,",").concat(i0,",0,").concat(+(I0>180),",").concat(+(h0>0),",").concat(S0.x,",").concat(S0.y,` 695 A`).concat(o0,",").concat(o0,",0,0,").concat(+(h0<0),",").concat(k0.x,",").concat(k0.y,"Z")}else w0+="L".concat(n0,",").concat(a0,"Z");return w0},defaultProps$2={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Sector=function r0(e0){var n0=_objectSpread$j(_objectSpread$j({},defaultProps$2),e0),a0=n0.cx,i0=n0.cy,s0=n0.innerRadius,o0=n0.outerRadius,l0=n0.cornerRadius,c0=n0.forceCornerRadius,u0=n0.cornerIsExternal,d0=n0.startAngle,h0=n0.endAngle,f0=n0.className;if(o0<s0||d0===h0)return null;var p0=clsx("recharts-sector",f0),A0=o0-s0,m0=getPercentValue(l0,A0,0,!0),x0;return m0>0&&Math.abs(d0-h0)<360?x0=getSectorWithCorner({cx:a0,cy:i0,innerRadius:s0,outerRadius:o0,cornerRadius:Math.min(m0,A0/2),forceCornerRadius:c0,cornerIsExternal:u0,startAngle:d0,endAngle:h0}):x0=getSectorPath({cx:a0,cy:i0,innerRadius:s0,outerRadius:o0,startAngle:d0,endAngle:h0}),React__default.createElement("path",_extends$e({},filterProps(n0,!0),{className:p0,d:x0,role:"img"}))};function _typeof$k(r0){"@babel/helpers - typeof";return _typeof$k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$k(r0)}function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$d.apply(this,arguments)}function ownKeys$i(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$i(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};
695e0%2?ownKeys$i(Object(n0),!0).forEach(function(a0){_defineProperty$j(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$i(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$j(r0,e0,n0){return e0=_toPropertyKey$j(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$j(r0){var e0=_toPrimitive$j(r0,"string");return _typeof$k(e0)=="symbol"?e0:e0+""}function _toPrimitive$j(r0,e0){if(_typeof$k(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$k(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var CURVE_FACTORIES={curveBasisClosed,curveBasisOpen,curveBasis,curveBumpX:bumpX,curveBumpY:bumpY,curveLinearClosed,curveLinear,curveMonotoneX:monotoneX,curveMonotoneY:monotoneY,curveNatural,curveStep,curveStepAfter:stepAfter,curveStepBefore:stepBefore},defined=function r0(e0){return e0.x===+e0.x&&e0.y===+e0.y},getX=function r0(e0){return e0.x},getY=function r0(e0){return e0.y},getCurveFactory=function r0(e0,n0){if(isFunction$3(e0))return e0;var a0="curve".concat(upperFirst$1(e0));return(a0==="curveMonotone"||a0==="curveBump")&&n0?CURVE_FACTORIES["".concat(a0).concat(n0==="vertical"?"Y":"X")]:CURVE_FACTORIES[a0]||curveLinear},getPath$1=function r0(e0){var n0=e0.type,a0=n0===void 0?"linear":n0,i0=e0.points,s0=i0===void 0?[]:i0,o0=e0.baseLine,l0=e0.layout,c0=e0.connectNulls,u0=c0===void 0?!1:c0,d0=getCurveFactory(a0,l0),h0=u0?s0.filter(function(m0){return defined(m0)}):s0,f0;if(Array.isArray(o0)){var p0=u0?o0.filter(function(m0){return defined(m0)}):o0,A0=h0.map(function(m0,x0){return _objectSpread$i(_objectSpread$i({},m0),{},{base:p0[x0]})});return l0==="vertical"?f0=shapeArea().y(getY).x1(getX).x0(function(m0){return m0.base.x}):f0=shapeArea().x(getX).y1(getY).y0(function(m0){return m0.base.y}),f0.defined(defined).curve(d0),f0(A0)}return l0==="vertical"&&isNumber$1(o0)?f0=shapeArea().y(getY).x1(getX).x0(o0):isNumber$1(o0)?f0=shapeArea().x(getX).y1(getY).y0(o0):f0=shapeLine().x(getX).y(getY),f0.defined(defined).curve(d0),f0(h0)},Curve=function r0(e0){var n0=e0.className,a0=e0.points,i0=e0.path,s0=e0.pathRef;if((!a0||!a0.length)&&!i0)return null;var o0=a0&&a0.length?getPath$1(e0):i0;return reactExports.createElement("path",_extends$d({},filterProps(e0,!1),adaptEventHandlers(e0),{className:clsx("recharts-curve",n0),d:o0,ref:s0}))},propTypes={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function r0(a0,i0,s0,o0,l0,c0){if(c0!==ReactPropTypesSecret){var u0=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u0.name="Invariant Violation",u0}}r0.isRequired=r0;function e0(){return r0}var n0={array:r0,bigint:r0,bool:r0,func:r0,number:r0,object:r0,string:r0,symbol:r0,any:r0,arrayOf:e0,element:r0,elementType:r0,instanceOf:e0,node:r0,objectOf:e0,oneOf:e0,oneOfType:e0,shape:e0,exact:e0,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n0.PropTypes=n0,n0};propTypes.exports=factoryWithThrowingShims();var propTypesExports=propTypes.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports);var getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty$1=Object.prototype.hasOwnProperty;function combineComparators(r0,e0){return function(a0,i0,s0){return r0(a0,i0,s0)&&e0(a0,i0,s0)}}function createIsCircular(r0){return function(n0,a0,i0){if(!n0||!a0||typeof n0!="object"||typeof a0!="object")return r0(n0,a0,i0);var s0=i0.cache,o0=s0.get(n0),l0=s0.get(a0);if(o0&&l0)return o0===a0&&l0===n0;s0.set(n0,a0),s0.set(a0,n0);var c0=r0(n0,a0,i0);return s0.delete(n0),s0.delete(a0),c0}}function getStrictProperties(r0){return getOwnPropertyNames(r0).concat(getOwnPropertySymbols(r0))}var hasOwn=Object.hasOwn||function(r0,e0){return hasOwnProperty$1.call(r0,e0
695)};function sameValueZeroEqual(r0,e0){return r0===e0||!r0&&!e0&&r0!==r0&&e0!==e0}var PREACT_VNODE="__v",PREACT_OWNER="__o",REACT_OWNER="_owner",getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,keys=Object.keys;function areArraysEqual(r0,e0,n0){var a0=r0.length;if(e0.length!==a0)return!1;for(;a0-- >0;)if(!n0.equals(r0[a0],e0[a0],a0,a0,r0,e0,n0))return!1;return!0}function areDatesEqual(r0,e0){return sameValueZeroEqual(r0.getTime(),e0.getTime())}function areErrorsEqual(r0,e0){return r0.name===e0.name&&r0.message===e0.message&&r0.cause===e0.cause&&r0.stack===e0.stack}function areFunctionsEqual(r0,e0){return r0===e0}function areMapsEqual(r0,e0,n0){var a0=r0.size;if(a0!==e0.size)return!1;if(!a0)return!0;for(var i0=new Array(a0),s0=r0.entries(),o0,l0,c0=0;(o0=s0.next())&&!o0.done;){for(var u0=e0.entries(),d0=!1,h0=0;(l0=u0.next())&&!l0.done;){if(i0[h0]){h0++;continue}var f0=o0.value,p0=l0.value;if(n0.equals(f0[0],p0[0],c0,h0,r0,e0,n0)&&n0.equals(f0[1],p0[1],f0[0],p0[0],r0,e0,n0)){d0=i0[h0]=!0;break}h0++}if(!d0)return!1;c0++}return!0}var areNumbersEqual=sameValueZeroEqual;function areObjectsEqual(r0,e0,n0){var a0=keys(r0),i0=a0.length;if(keys(e0).length!==i0)return!1;for(;i0-- >0;)if(!isPropertyEqual(r0,e0,n0,a0[i0]))return!1;return!0}function areObjectsEqualStrict(r0,e0,n0){var a0=getStrictProperties(r0),i0=a0.length;if(getStrictProperties(e0).length!==i0)return!1;for(var s0,o0,l0;i0-- >0;)if(s0=a0[i0],!isPropertyEqual(r0,e0,n0,s0)||(o0=getOwnPropertyDescriptor(r0,s0),l0=getOwnPropertyDescriptor(e0,s0),(o0||l0)&&(!o0||!l0||o0.configurable!==l0.configurable||o0.enumerable!==l0.enumerable||o0.writable!==l0.writable)))return!1;return!0}function arePrimitiveWrappersEqual(r0,e0){return sameValueZeroEqual(r0.valueOf(),e0.valueOf())}function areRegExpsEqual(r0,e0){return r0.source===e0.source&&r0.flags===e0.flags}function areSetsEqual(r0,e0,n0){var a0=r0.size;if(a0!==e0.size)return!1;if(!a0)return!0;for(var i0=new Array(a0),s0=r0.values(),o0,l0;(o0=s0.next())&&!o0.done;){for(var c0=e0.values(),u0=!1,d0=0;(l0=c0.next())&&!l0.done;){if(!i0[d0]&&n0.equals(o0.value,l0.value,o0.value,l0.value,r0,e0,n0)){u0=i0[d0]=!0;break}d0++}if(!u0)return!1}return!0}function areTypedArraysEqual(r0,e0){var n0=r0.length;if(e0.length!==n0)return!1;for(;n0-- >0;)if(r0[n0]!==e0[n0])return!1;return!0}function areUrlsEqual(r0,e0){return r0.hostname===e0.hostname&&r0.pathname===e0.pathname&&r0.protocol===e0.protocol&&r0.port===e0.port&&r0.hash===e0.hash&&r0.username===e0.username&&r0.password===e0.password}function isPropertyEqual(r0,e0,n0,a0){return(a0===REACT_OWNER||a0===PREACT_OWNER||a0===PREACT_VNODE)&&(r0.$$typeof||e0.$$typeof)?!0:hasOwn(e0,a0)&&n0.equals(r0[a0],e0[a0],a0,a0,r0,e0,n0)}var ARGUMENTS_TAG="[object Arguments]",BOOLEAN_TAG="[object Boolean]",DATE_TAG="[object Date]",ERROR_TAG="[object Error]",MAP_TAG="[object Map]",NUMBER_TAG="[object Number]",OBJECT_TAG="[object Object]",REG_EXP_TAG="[object RegExp]",SET_TAG="[object Set]",STRING_TAG="[object String]",URL_TAG="[object URL]",isArray$2=Array.isArray,isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,assign=Object.assign,getTag=Object.prototype.toString.call.bind(Object.prototype.toString);function createEqualityComparator(r0){var e0=r0.areArraysEqual,n0=r0.areDatesEqual,a0=r0.areErrorsEqual,i0=r0.areFunctionsEqual,s0=r0.areMapsEqual,o0=r0.areNumbersEqual,l0=r0.areObjectsEqual,c0=r0.arePrimitiveWrappersEqual,u0=r0.areRegExpsEqual,d0=r0.areSetsEqual,h0=r0.areTypedArraysEqual,f0=r0.areUrlsEqual;return function(A0,m0,x0){if(A0===m0)return!0;if(A0==null||m0==null)return!1;var g0=typeof A0;if(g0!==typeof m0)return!1;if(g0!=="object")return g0==="number"?o0(A0,m0,x0):g0==="function"?i0(A0,m0,x0):!1;var y0=A0.constructor;if(y0!==m0.constructor)return!1;if(y0===Object)return l0(A0,m0,x0);if(isArray$2(A0))return e0(A0,m0,x0);if(isTypedArray!=null&&isTypedArray(A0))return h0(A0,m0,x0);if(y0===Date)return n0(A0,m0,x0);if(y0===RegExp)return u0(A0,m0,x0);if(y0===Map)return s0(A0,m0,x0);if(y0===Set)return d0(A0,m0,x0);var b0=getTag(A0);return b0===DATE_TAG?n0(A0,m0,x0):b0===REG_EXP_TAG?u0(A0,m0,x0):b0===MAP_TAG?s0(A0,m0,x0):b0===SET_TAG?d0(A0,m0,x0):b0===OBJECT_TAG?typeof A0.then!="function"&&typeof m0.then!="function"&&l0(A0,m0,x0):b0===URL_TAG?f0(A0,m0,x0):b0===ERROR_TAG?a0(A0,m0,x0):b0===ARGUMENTS_TAG?l0(A0,m0,x0):b0===BOOLEAN_TAG||b0===NUMBER_TAG||b0===STRING_TAG?c0(A0,m0,x0):!1}}function createEqualityComparatorConfig(r0){var e0=r0.circular,n0=r0.createCustomConfig,a0=r0.strict,i0={areArraysEqual:a0?areObjectsEqualStrict:areArraysEqual,areDatesEqual,areErrorsEqual,areFunctionsEqual,areMapsEqual:a0?combineComparators(areMapsEqual,areObjectsEqualStrict):areMapsEqual,areNumbersEqual,areObjectsEqual:a0?areObjectsEqualStrict:areObjectsEqual,arePrimitiveWrappersEqual,areRegExpsEqual,areSetsEqual:a0?combineComparators(areSetsEqual,areObjectsEqualStrict):areSetsEqual,areTypedArraysEqual:a0?areObjectsEqualStrict:areTypedArraysEqual,areUrlsEqual};if(n0&&(i0=assign({},i0,n0(i0))),e0){var s0=createIsCircular(i0.areArraysEqual),o0=createIsCircular(i0.areMapsEqual),l0=createIsCircular(i0.areObjectsEqual),c0=createIsCircular(i0.areSetsEqual);i0=assign({},i0,{areArraysEqual:s0,areMapsEqual:o0,areObjectsEqual:l0,areSetsEqual:c0})}return i0}function createInternalEqualityComparator(r0){return function(e0,n0,a0,i0,s0,o0,l0){return r0(e0,n0,l0)}}
vendor: 38,005 bytes, lines 695-713
695function createIsEqual(r0){var e0=r0.circular,n0=r0.comparator,a0=r0.createState,i0=r0.equals,s0=r0.strict;if(a0)return function(c0,u0){var d0=a0(),h0=d0.cache,f0=h0===void 0?e0?new WeakMap:void 0:h0,p0=d0.meta;return n0(c0,u0,{cache:f0,equals:i0,meta:p0,strict:s0})};if(e0)return function(c0,u0){return n0(c0,u0,{cache:new WeakMap,equals:i0,meta:void 0,strict:s0})};var o0={cache:void 0,equals:i0,meta:void 0,strict:s0};return function(c0,u0){return n0(c0,u0,o0)}}var deepEqual=createCustomEqual();createCustomEqual({strict:!0});createCustomEqual({circular:!0});createCustomEqual({circular:!0,strict:!0});createCustomEqual({createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({strict:!0,createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual},strict:!0});function createCustomEqual(r0){r0===void 0&&(r0={});var e0=r0.circular,n0=e0===void 0?!1:e0,a0=r0.createInternalComparator,i0=r0.createState,s0=r0.strict,o0=s0===void 0?!1:s0,l0=createEqualityComparatorConfig(r0),c0=createEqualityComparator(l0),u0=a0?a0(c0):createInternalEqualityComparator(c0);return createIsEqual({circular:n0,comparator:c0,createState:i0,equals:u0,strict:o0})}function safeRequestAnimationFrame(r0){typeof requestAnimationFrame<"u"&&requestAnimationFrame(r0)}function setRafTimeout(r0){var e0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n0=-1,a0=function i0(s0){n0<0&&(n0=s0),s0-n0>e0?(r0(s0),n0=-1):safeRequestAnimationFrame(i0)};requestAnimationFrame(a0)}function _typeof$j(r0){"@babel/helpers - typeof";return _typeof$j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$j(r0)}function _toArray(r0){return _arrayWithHoles$6(r0)||_iterableToArray$6(r0)||_unsupportedIterableToArray$9(r0)||_nonIterableRest$6()}function _nonIterableRest$6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 696In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$9(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$9(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$9(r0,e0)}}function _arrayLikeToArray$9(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArray$6(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithHoles$6(r0){if(Array.isArray(r0))return r0}function createAnimateManager(){var r0={},e0=function(){return null},n0=!1,a0=function i0(s0){if(!n0){if(Array.isArray(s0)){if(!s0.length)return;var o0=s0,l0=_toArray(o0),c0=l0[0],u0=l0.slice(1);if(typeof c0=="number"){setRafTimeout(i0.bind(null,u0),c0);return}i0(c0),setRafTimeout(i0.bind(null,u0));return}_typeof$j(s0)==="object"&&(r0=s0,e0(r0)),typeof s0=="function"&&s0()}};return{stop:function(){n0=!0},start:function(s0){n0=!1,a0(s0)},subscribe:function(s0){return e0=s0,function(){e0=function(){return null}}}}}function _typeof$i(r0){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$i(r0)}function ownKeys$h(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$h(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$h(Object(n0),!0).forEach(function(a0){_defineProperty$i(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$h(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$i(r0,e0,n0){return e0=_toPropertyKey$i(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$i(r0){var e0=_toPrimitive$i(r0,"string");return _typeof$i(e0)==="symbol"?e0:String(e0)}function _toPrimitive$i(r0,e0){if(_typeof$i(r0)!=="object"||r0===null)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$i(a0)!=="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getIntersectionKeys=function r0(e0,n0){return[Object.keys(e0),Object.keys(n0)].reduce(function(a0,i0){return a0.filter(function(s0){return i0.includes(s0)})})},identity=function r0(e0){return e0},getDashCase=function r0(e0){return e0.replace(/([A-Z])/g,function(n0){return"-".concat(n0.toLowerCase())})},mapObject=function r0(e0,n0){return Object.keys(n0).reduce(function(a0,i0){return _objectSpread$h(_objectSpread$h({},a0),{},_defineProperty$i({},i0,e0(i0,n0[i0])))},{})},getTransitionVal=function r0(e0,n0,a0){return e0.map(function(i0){return"".concat(getDashCase(i0)," ").concat(n0,"ms ").concat(a0)}).join(",")};function _slicedToArray$5(r0,e0){return _arrayWithHoles$5(r0)||_iterableToArrayLimit$5(r0,e0)||_unsupportedIterableToArray$8(r0,e0)||_nonIterableRest$5()}function _nonIterableRest$5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 697In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit$5(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$5(r0){if(Array.isArray(r0))return r0}function _toConsumableArray$5(r0){return _arrayWithoutHoles$5(r0)||_iterableToArray$5(r0)||_unsupportedIterableToArray$8(r0)||_nonIterableSpread$5()}function _nonIterableSpread$5(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 698In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$8(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$8(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$8(r0,e0)}}function _iterableToArray$5(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$5(r0){if(Array.isArray(r0))return _arrayLikeToArray$8(r0)}function _arrayLikeToArray$8(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}var ACCURACY=1e-4,cubicBezierFactor=function r0(e0,n0){return[0,3*e0,3*n0-6*e0,3*e0-3*n0+1]},multyTime=function r0(e0,n0){return e0.map(function(a0,i0){return a0*Math.pow(n0,i0)}).reduce(function(a0,i0){return a0+i0})},cubicBezier=function r0(e0,n0){return function(a0){var i0=cubicBezierFactor(e0,n0);return multyTime(i0,a0)}},derivativeCubicBezier=function r0(e0,n0){return function(a0){var i0=cubicBezierFactor(e0,n0),s0=[].concat(_toConsumableArray$5(i0.map(function(o0,l0){return o0*l0}).slice(1)),[0]);return multyTime(s0,a0)}},configBezier=function r0(){for(var e0=arguments.length,n0=new Array(e0),a0=0;a0<e0;a0++)n0[a0]=arguments[a0];var i0=n0[0],s0=n0[1],o0=n0[2],l0=n0[3];if(n0.length===1)switch(n0[0]){case"linear":i0=0,s0=0,o0=1,l0=1;break;case"ease":i0=.25,s0=.1,o0=.25,l0=1;break;case"ease-in":i0=.42,s0=0,o0=1,l0=1;break;case"ease-out":i0=.42,s0=0,o0=.58,l0=1;break;case"ease-in-out":i0=0,s0=0,o0=.58,l0=1;break;default:{var c0=n0[0].split("(");if(c0[0]==="cubic-bezier"&&c0[1].split(")")[0].split(",").length===4){var u0=c0[1].split(")")[0].split(",").map(function(x0){return parseFloat(x0)}),d0=_slicedToArray$5(u0,4);i0=d0[0],s0=d0[1],o0=d0[2],l0=d0[3]}}}var h0=cubicBezier(i0,o0),f0=cubicBezier(s0,l0),p0=derivativeCubicBezier(i0,o0),A0=function(g0){return g0>1?1:g0<0?0:g0},m0=function(g0){for(var y0=g0>1?1:g0,b0=y0,E0=0;E0<8;++E0){var w0=h0(b0)-y0,v0=p0(b0);if(Math.abs(w0-y0)<ACCURACY||v0<ACCURACY)return f0(b0);b0=A0(b0-w0/v0)}return f0(b0)};return m0.isStepper=!1,m0},configSpring=function r0(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n0=e0.stiff,a0=n0===void 0?100:n0,i0=e0.damping,s0=i0===void 0?8:i0,o0=e0.dt,l0=o0===void 0?17:o0,c0=function(d0,h0,f0){var p0=-(d0-h0)*a0,A0=f0*s0,m0=f0+(p0-A0)*l0/1e3,x0=f0*l0/1e3+d0;return Math.abs(x0-h0)<ACCURACY&&Math.abs(m0)<ACCURACY?[h0,0]:[x0,m0]};return c0.isStepper=!0,c0.dt=l0,c0},configEasing=function r0(){for(var e0=arguments.length,n0=new Array(e0),a0=0;a0<e0;a0++)n0[a0]=arguments[a0];var i0=n0[0];if(typeof i0=="string")switch(i0){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return configBezier(i0);case"spring":return configSpring();default:if(i0.split("(")[0]==="cubic-bezier")return configBezier(i0)}return typeof i0=="function"?i0:null};function _typeof$h(r0){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$h(r0)}function _toConsumableArray$4(r0){return _arrayWithoutHoles$4(r0)||_iterableToArray$4(r0)||_unsupportedIterableToArray$7(r0)||_nonIterableSpread$4()}function _nonIterableSpread$4(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 699In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$4(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$4(r0){if(Array.isArray(r0))return _arrayLikeToArray$7(r0)}function ownKeys$g(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$g(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$g(Object(n0),!0).forEach(function(a0){_defineProperty$h(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$g(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$h(r0,e0,n0){return e0=_toPropertyKey$h(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$h(r0){var e0=_toPrimitive$h(r0,"string");return _typeof$h(e0)==="symbol"?e0:String(e0)}function _toPrimitive$h(r0,e0){if(_typeof$h(r0)!=="object"||r0===null)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$h(a0)!=="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _slicedToArray$4(r0,e0){return _arrayWithHoles$4(r0)||_iterableToArrayLimit$4(r0,e0)||_unsupportedIterableToArray$7(r0,e0)||_nonIterableRest$4()}function _nonIterableRest$4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 700In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$7(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$7(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$7(r0,e0)}}function _arrayLikeToArray$7(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$4(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$4(r0){if(Array.isArray(r0))return r0}var alpha=function r0(e0,n0,a0){return e0+(n0-e0)*a0},needContinue=function r0(e0){var n0=e0.from,a0=e0.to;return n0!==a0},calStepperVals=function r0(e0,n0,a0){var i0=mapObject(function(s0,o0){if(needContinue(o0)){var l0=e0(o0.from,o0.to,o0.velocity),c0=_slicedToArray$4(l0,2),u0=c0[0],d0=c0[1];return _objectSpread$g(_objectSpread$g({},o0),{},{from:u0,velocity:d0})}return o0},n0);return a0<1?mapObject(function(s0,o0){return needContinue(o0)?_objectSpread$g(_objectSpread$g({},o0),{},{velocity:alpha(o0.velocity,i0[s0].velocity,a0),from:alpha(o0.from,i0[s0].from,a0)}):o0},n0):r0(e0,i0,a0-1)};const configUpdate=function(r0,e0,n0,a0,i0){var s0=getIntersectionKeys(r0,e0),o0=s0.reduce(function(x0,g0){return _objectSpread$g(_objectSpread$g({},x0),{},_defineProperty$h({},g0,[r0[g0],e0[g0]]))},{}),l0=s0.reduce(function(x0,g0){return _objectSpread$g(_objectSpread$g({},x0),{},_defineProperty$h({},g0,{from:r0[g0],velocity:0,to:e0[g0]}))},{}),c0=-1,u0,d0,h0=function(){return null},f0=function(){return mapObject(function(g0,y0){return y0.from},l0)},p0=function(){return!Object.values(l0).filter(needContinue).length},A0=function(g0){u0||(u0=g0);var y0=g0-u0,b0=y0/n0.dt;l0=calStepperVals(n0,l0,b0),i0(_objectSpread$g(_objectSpread$g(_objectSpread$g({},r0),e0),f0())),u0=g0,p0()||(c0=requestAnimationFrame(h0))},m0=function(g0){d0||(d0=g0);var y0=(g0-d0)/a0,b0=mapObject(function(w0,v0){return alpha.apply(void 0,_toConsumableArray$4(v0).concat([n0(y0)]))},o0);if(i0(_objectSpread$g(_objectSpread$g(_objectSpread$g({},r0),e0),b0)),y0<1)c0=requestAnimationFrame(h0);else{var E0=mapObject(function(w0,v0){return alpha.apply(void 0,_toConsumableArray$4(v0).concat([n0(1)]))},o0);i0(_objectSpread$g(_objectSpread$g(_objectSpread$g({},r0),e0),E0))}};return h0=n0.isStepper?A0:m0,function(){return requestAnimationFrame(h0),function(){cancelAnimationFrame(c0)}}};function _typeof$g(r0){"@babel/helpers - typeof";return _typeof$g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$g(r0)}var _excluded$5=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function _objectWithoutProperties$5(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$5(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$5(r0,e0){if(r0==null)return{};var n0={},a0=Object.keys(r0),i0,s0;for(s0=0;s0<a0.length;s0++)i0=a0[s0],!(e0.indexOf(i0)>=0)&&(n0[i0]=r0[i0]);return n0}function _toConsumableArray$3(r0){return _arrayWithoutHoles$3(r0)||_iterableToArray$3(r0)||_unsupportedIterableToArray$6(r0)||_nonIterableSpread$3()}function _nonIterableSpread$3(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 701In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$6(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$6(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$6(r0,e0)}}function _iterableToArray$3(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$3(r0){if(Array.isArray(r0))return _arrayLikeToArray$6(r0)}function _arrayLikeToArray$6(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function ownKeys$f(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$f(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$f(Object(n0),!0).forEach(function(a0){_defineProperty$g(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$f(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$g(r0,e0,n0){return e0=_toPropertyKey$g(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _classCallCheck$a(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$g(a0.key),a0)}}function _createClass$a(r0,e0,n0){return e0&&_defineProperties$a(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _toPropertyKey$g(r0){var e0=_toPrimitive$g(r0,"string");return _typeof$g(e0)==="symbol"?e0:String(e0)}function _toPrimitive$g(r0,e0){if(_typeof$g(r0)!=="object"||r0===null)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$g(a0)!=="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _inherits$8(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$8(r0,e0)}function _setPrototypeOf$8(r0,e0){return _setPrototypeOf$8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$8(r0,e0)}function _createSuper(r0){var e0=_isNativeReflectConstruct$8();return function(){var a0=_getPrototypeOf$8(r0),i0;if(e0){var s0=_getPrototypeOf$8(this).constructor;i0=Reflect.construct(a0,arguments,s0)}else i0=a0.apply(this,arguments);return _possibleConstructorReturn$8(this,i0)}}function _possibleConstructorReturn$8(r0,e0){if(e0&&(_typeof$g(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$8(r0)}function _assertThisInitialized$8(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(r0){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$8(r0)}var Animate=function(r0){_inherits$8(n0,r0);var e0=_createSuper(n0);function n0(a0,i0){var s0;_classCallCheck$a(this,n0),s0=e0.call(this,a0,i0);var o0=s0.props,l0=o0.isActive,c0=o0.attributeName,u0=o0.from,d0=o0.to,h0=o0.steps,f0=o0.children,p0=o0.duration;if(s0.handleStyleChange=s0.handleStyleChange.bind(_assertThisInitialized$8(s0)),s0.changeStyle=s0.changeStyle.bind(_assertThisInitialized$8(s0)),!l0||p0<=0)return s0.state={style:{}},typeof f0=="function"&&(s0.state={style:d0}),_possibleConstructorReturn$8(s0);if(h0&&h0.length)s0.state={style:h0[0].style};else if(u0){if(typeof f0=="function")return s0.state={style:u0},_possibleConstructorReturn$8(s0);s0.state={style:c0?_defineProperty$g({},c0,u0):u0}}else s0.state={style:{}};return s0}return _createClass$a(n0,[{key:"componentDidMount",value:function(){var i0=this.props,s0=i0.isActive,o0=i0.canBegin;this.mounted=!0,!(!s0||!o0)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i0){var s0=this.props,o0=s0.isActive,l0=s0.canBegin,c0=s0.attributeName,u0=s0.shouldReAnimate,d0=s0.to,h0=s0.from,f0=this.state.style;if(l0){if(!o0){var p0={style:c0?_defineProperty$g({},c0,d0):d0};this.state&&f0&&(c0&&f0[c0]!==d0||!c0&&f0!==d0)&&this.setState(p0);return}if(!(deepEqual(i0.to,d0)&&i0.canBegin&&i0.isActive)){var A0=!i0.canBegin||!i0.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m0=A0||u0?h0:i0.to;if(this.state&&f0){var x0={style:c0?_defineProperty$g({},c0,m0):m0};(c0&&f0[c0]!==m0||!c0&&f0!==m0)&&this.setState(x0)}this.runAnimation(_objectSpread$f(_objectSpread$f({},this.props),{},{from:m0,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i0=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i0&&i0()}},{key:"handleStyleChange",value:function(i0){this.changeStyle(i0)}},{key:"changeStyle",value:function(i0){this.mounted&&this.setState({style:i0})}},{key:"runJSAnimation",value:function(i0){var s0=this,o0=i0.from,l0=i0.to,c0=i0.duration,u0=i0.easing,d0=i0.begin,h0=i0.onAnimationEnd,f0=i0.onAnimationStart,p0=configUpdate(o0,l0,configEasing(u0),c0,this.changeStyle),A0=function(){s0.stopJSAnimation=p0()};this.manager.start([f0,d0,A0,c0,h0])}},{key:"runStepAnimation",value:function(i0){var s0=this,o0=i0.steps,l0=i0.begin,c0=i0.onAnimationStart,u0=o0[0],d0=u0.style,h0=u0.duration,f0=h0===void 0?0:h0,p0=function(m0,x0,g0){if(g0===0)return m0;var y0=x0.duration,b0=x0.easing,E0=b0===void 0?"ease":b0,w0=x0.style,v0=x0.properties,S0=x0.onAnimationEnd,k0=g0>0?o0[g0-1]:x0,R0=v0||Object.keys(w0);if(typeof E0=="function"||E0==="spring")return[].concat(_toConsumableArray$3(m0),[s0.runJSAnimation.bind(s0,{from:k0.style,to:w0,duration:y0,easing:E0}),y0]);var j0=getTransitionVal(R0,y0,E0),C0=_objectSpread$f(_objectSpread$f(_objectSpread$f({},k0.style),w0),{},{transition:j0});return[].concat(_toConsumableArray$3(m0),[C0,y0,S0]).filter(identity)};return this.manager.start([c0].concat(_toConsumableArray$3(o0.reduce(p0,[d0,Math.max(f0,l0)])),[i0.onAnimationEnd]))}},{key:"runAnimation",value:function(i0){this.manager||(this.manager=createAnimateManager());var s0=i0.begin,o0=i0.duration,l0=i0.attributeName,c0=i0.to,u0=i0.easing,d0=i0.onAnimationStart,h0=i0.onAnimationEnd,f0=i0.steps,p0=i0.children,A0=this.manager;if(this.unSubscribe=A0.subscribe(this.handleStyleChange),typeof u0=="function"||typeof p0=="function"||u0==="spring"){this.runJSAnimation(i0);return}if(f0.length>1){this.runStepAnimation(i0);return}var m0=l0?_defineProperty$g({},l0,c0):c0,x0=getTransitionVal(Object.keys(m0),o0,u0);A0.start([d0,s0,_objectSpread$f(_objectSpread$f({},m0),{},{transition:x0}),o0,h0])}},{key:"render",value:function(){var i0=this.props,s0=i0.children;i0.begin;var o0=i0.duration;i0.attributeName,i0.easing;var l0=i0.isActive;i0.steps,i0.from,i0.to,i0.canBegin,i0.onAnimationEnd,i0.shouldReAnimate,i0.onAnimationReStart;var c0=_objectWithoutProperties$5(i0,_excluded$5),u0=reactExports.Children.count(s0),d0=this.state.style;if(typeof s0=="function")return s0(d0);if(!l0||u0===0||o0<=0)return s0;var h0=function(p0){var A0=p0.props,m0=A0.style,x0=m0===void 0?{}:m0,g0=A0.className,y0=reactExports.cloneElement(p0,_objectSpread$f(_objectSpread$f({},c0),{},{style:_objectSpread$f(_objectSpread$f({},x0),d0),className:g0}));return y0};return u0===1?h0(reactExports.Children.only(s0)):React__default.createElement("div",null,reactExports.Children.map(s0,function(f0){return h0(f0)}))}}]),n0}(reactExports.PureComponent);Animate.displayName="Animate";Animate.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function r0(){},onAnimationStart:function r0(){}};Animate.propTypes={from:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),to:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),attributeName:PropTypes.string,duration:PropTypes.number,begin:PropTypes.number,easing:PropTypes.oneOfType([PropTypes.string,PropTypes.func]),steps:PropTypes.arrayOf(PropTypes.shape({duration:PropTypes.number.isRequired,style:PropTypes.object.isRequired,easing:PropTypes.oneOfType([PropTypes.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),PropTypes.func]),properties:PropTypes.arrayOf("string"),onAnimationEnd:PropTypes.func})),children:PropTypes.oneOfType([PropTypes.node,PropTypes.func]),isActive:PropTypes.bool,canBegin:PropTypes.bool,onAnimationEnd:PropTypes.func,shouldReAnimate:PropTypes.bool,onAnimationStart:PropTypes.func,onAnimationReStart:PropTypes.func};function _typeof$f(r0){"@babel/helpers - typeof";return _typeof$f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$f(r0)}function _extends$c(){return _extends$c=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$c.apply(this,arguments)}function _slicedToArray$3(r0,e0){return _arrayWithHoles$3(r0)||_iterableToArrayLimit$3(r0,e0)||_unsupportedIterableToArray$5(r0,e0)||_nonIterableRest$3()}function _nonIterableRest$3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 702In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$5(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$5(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$5(r0,e0)}}function _arrayLikeToArray$5(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$3(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$3(r0){if(Array.isArray(r0))return r0}function ownKeys$e(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$e(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$e(Object(n0),!0).forEach(function(a0){_defineProperty$f(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$e(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$f(r0,e0,n0){return e0=_toPropertyKey$f(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$f(r0){var e0=_toPrimitive$f(r0,"string");return _typeof$f(e0)=="symbol"?e0:e0+""}function _toPrimitive$f(r0,e0){if(_typeof$f(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$f(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getRectanglePath=function r0(e0,n0,a0,i0,s0){var o0=Math.min(Math.abs(a0)/2,Math.abs(i0)/2),l0=i0>=0?1:-1,c0=a0>=0?1:-1,u0=i0>=0&&a0>=0||i0<0&&a0<0?1:0,d0;if(o0>0&&s0 instanceof Array){for(var h0=[0,0,0,0],f0=0,p0=4;f0<p0;f0++)h0[f0]=s0[f0]>o0?o0:s0[f0];d0="M".concat(e0,",").concat(n0+l0*h0[0]),h0[0]>0&&(d0+="A ".concat(h0[0],",").concat(h0[0],",0,0,").concat(u0,",").concat(e0+c0*h0[0],",").concat(n0)),d0+="L ".concat(e0+a0-c0*h0[1],",").concat(n0),h0[1]>0&&(d0+="A ".concat(h0[1],",").concat(h0[1],",0,0,").concat(u0,`, 703 `).concat(e0+a0,",").concat(n0+l0*h0[1])),d0+="L ".concat(e0+a0,",").concat(n0+i0-l0*h0[2]),h0[2]>0&&(d0+="A ".concat(h0[2],",").concat(h0[2],",0,0,").concat(u0,`, 704 `).concat(e0+a0-c0*h0[2],",").concat(n0+i0)),d0+="L ".concat(e0+c0*h0[3],",").concat(n0+i0),h0[3]>0&&(d0+="A ".concat(h0[3],",").concat(h0[3],",0,0,").concat(u0,`, 705 `).concat(e0,",").concat(n0+i0-l0*h0[3])),d0+="Z"}else if(o0>0&&s0===+s0&&s0>0){var A0=Math.min(o0,s0);d0="M ".concat(e0,",").concat(n0+l0*A0,` 706 A `).concat(A0,",").concat(A0,",0,0,").concat(u0,",").concat(e0+c0*A0,",").concat(n0,` 707 L `).concat(e0+a0-c0*A0,",").concat(n0,` 708 A `).concat(A0,",").concat(A0,",0,0,").concat(u0,",").concat(e0+a0,",").concat(n0+l0*A0,` 709 L `).concat(e0+a0,",").concat(n0+i0-l0*A0,` 710 A `).concat(A0,",").concat(A0,",0,0,").concat(u0,",").concat(e0+a0-c0*A0,",").concat(n0+i0,` 711 L `).concat(e0+c0*A0,",").concat(n0+i0,` 712 A `).concat(A0,",").concat(A0,",0,0,").concat(u0,",").concat(e0,",").concat(n0+i0-l0*A0," Z")}else d0="M ".concat(e0,",").concat(n0," h ").concat(a0," v ").concat(i0," h ").concat(-a0," Z");return d0},isInRectangle=function r0(e0,n0){if(!e0||!n0)return!1;var a0=e0.x,i0=e0.y,s0=n0.x,o0=n0.y,l0=n0.width,c0=n0.height;if(Math.abs(l0)>0&&Math.abs(c0)>0){var u0=Math.min(s0,s0+l0),d0=Math.max(s0,s0+l0),h0=Math.min(o0,o0+c0),f0=Math.max(o0,o0+c0);return a0>=u0&&a0<=d0&&i0>=h0&&i0<=f0}return!1},defaultProps$1={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rectangle=function r0(e0){var n0=_objectSpread$e(_objectSpread$e({},defaultProps$1),e0),a0=reactExports.useRef(),i0=reactExports.useState(-1),s0=_slicedToArray$3(i0,2),o0=s0[0],l0=s0[1];reactExports.useEffect(function(){if(a0.current&&a0.current.getTotalLength)try{var E0=a0.current.getTotalLength();E0&&l0(E0)}catch{}},[]);var c0=n0.x,u0=n0.y,d0=n0.width,h0=n0.height,f0=n0.radius,p0=n0.className,A0=n0.animationEasing,m0=n0.animationDuration,x0=n0.animationBegin,g0=n0.isAnimationActive,y0=n0.isUpdateAnimationActive;if(c0!==+c0||u0!==+u0||d0!==+d0||h0!==+h0||d0===0||h0===0)return null;var b0=clsx("recharts-rectangle",p0);return y0?React__default.createElement(Animate,{canBegin:o0>0,from:{width:d0,height:h0,x:c0,y:u0},to:{width:d0,height:h0,x:c0,y:u0},duration:m0,animationEasing:A0,isActive:y0},function(E0){var w0=E0.width,v0=E0.height,S0=E0.x,k0=E0.y;return React__default.createElement(Animate,{canBegin:o0>0,from:"0px ".concat(o0===-1?1:o0,"px"),to:"".concat(o0,"px 0px"),attributeName:"strokeDasharray",begin:x0,duration:m0,isActive:g0,easing:A0},React__default.createElement("path",_extends$c({},filterProps(n0,!0),{className:b0,d:getRectanglePath(S0,k0,w0,v0,f0),ref:a0})))}):React__default.createElement("path",_extends$c({},filterProps(n0,!0),{className:b0,d:getRectanglePath(c0,u0,d0,h0,f0)}))},_excluded$4=["points","className","baseLinePoints","connectNulls"];function _extends$b(){return _extends$b=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$b.apply(this,arguments)}function _objectWithoutProperties$4(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$4(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$4(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function _toConsumableArray$2(r0){return _arrayWithoutHoles$2(r0)||_iterableToArray$2(r0)||_unsupportedIterableToArray$4(r0)||_nonIterableSpread$2()}function _nonIterableSpread$2(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 713In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$4(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$4(r0,e0)}}function _iterableToArray$2(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$2(r0){if(Array.isArray(r0))return _arrayLikeToArray$4(r0)}function _arrayLikeToArray$4(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}var isValidatePoint=function r0(e0){return e0&&e0.x===+e0.x&&e0.y===+e0.y},getParsedPoints=function r0(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n0=[[]];return e0.forEach(function(a0){isValidatePoint(a0)?n0[n0.length-1].push(a0):n0[n0.length-1].length>0&&n0.push([])}),isValidatePoint(e0[0])&&n0[n0.length-1].push(e0[0]),n0[n0.length-1].length<=0&&(n0=n0.slice(0,-1)),n0},getSinglePolygonPath=function r0(e0,n0){var a0=getParsedPoints(e0);n0&&(a0=[a0.reduce(function(s0,o0){return[].concat(_toConsumableArray$2(s0),_toConsumableArray$2(o0))},[])]);var i0=a0.map(function(s0){return s0.reduce(function(o0,l0,c0){return"".concat(o0).concat(c0===0?"M":"L").concat(l0.x,",").concat(l0.y)},"")}).join("");return a0.length===1?"".concat(i0,"Z"):i0},getRanglePath=function r0(e0,n0,a0){var i0=getSinglePolygonPath(e0,a0);return"".concat(i0.slice(-1)==="Z"?i0.slice(0,-1):i0,"L").concat(getSinglePolygonPath(n0.reverse(),a0).slice(1))},Polygon=function r0(e0){var n0=e0.points,a0=e0.className,i0=e0.baseLinePoints,s0=e0.connectNulls,o0=_objectWithoutProperties$4(e0,_excluded$4);if(!n0||!n0.length)return null;var l0=clsx("recharts-polygon",a0);if(i0&&i0.length){var c0=o0.stroke&&o0.stroke!=="none",u0=getRanglePath(n0,i0,s0);return React__default.createElement("g",{className:l0},React__default.createElement("path",_extends$b({},filterProps(o0,!0),{fill:u0.slice(-1)==="Z"?o0.fill:"none",stroke:"none",d:u0})),c0?React__default.createElement("path",_extends$b({},filterProps(o0,!0),{fill:"none",d:getSinglePolygonPath(n0,s0)})):null,c0?React__default.createElement("path",_extends$b({},filterProps(o0,!0),{fill:"none",d:getSinglePolygonPath(i0,s0)})):null)}var d0=getSinglePolygonPath(n0,s0);return React__default.createElement("path",_extends$b({},filterProps(o0,!0),{fill:d0.slice(-1)==="Z"?o0.fill:"none",className:l0,d:d0}))};function _extends$a(){return _extends$a=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$a.apply(this,arguments)}var Dot=function r0(e0){var n0=e0.cx,a0=e0.cy,i0=e0.r,s0=e0.className,o0=clsx("recharts-dot",s0);return n0===+n0&&a0===+a0&&i0===+i0?reactExports.createElement("circle",_extends$a({},filterProps(e0,!1),adaptEventHandlers(e0),{className:o0,cx:n0,cy:a0,r:i0})):null};function _typeof$e(r0){"@babel/helpers - typeof";return _typeof$e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$e(r0)}var _excluded$3=["x","y","top","left","width","height","className"];function _extends$9(){return _extends$9=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$9.apply(this,arguments)}function ownKeys$d(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$d(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};
713e0%2?ownKeys$d(Object(n0),!0).forEach(function(a0){_defineProperty$e(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$d(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$e(r0,e0,n0){return e0=_toPropertyKey$e(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$e(r0){var e0=_toPrimitive$e(r0,"string");return _typeof$e(e0)=="symbol"?e0:e0+""}function _toPrimitive$e(r0,e0){if(_typeof$e(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$e(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _objectWithoutProperties$3(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$3(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$3(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}var getPath=function r0(e0,n0,a0,i0,s0,o0){return"M".concat(e0,",").concat(s0,"v").concat(i0,"M").concat(o0,",").concat(n0,"h").concat(a0)},Cross=function r0(e0){var n0=e0.x,a0=n0===void 0?0:n0,i0=e0.y,s0=i0===void 0?0:i0,o0=e0.top,l0=o0===void 0?0:o0,c0=e0.left,u0=c0===void 0?0:c0,d0=e0.width,h0=d0===void 0?0:d0,f0=e0.height,p0=f0===void 0?0:f0,A0=e0.className,m0=_objectWithoutProperties$3(e0,_excluded$3),x0=_objectSpread$d({x:a0,y:s0,top:l0,left:u0,width:h0,height:p0},m0);return!isNumber$1(a0)||!isNumber$1(s0)||!isNumber$1(h0)||!isNumber$1(p0)||!isNumber$1(l0)||!isNumber$1(u0)?null:React__default.createElement("path",_extends$9({},filterProps(x0,!0),{className:clsx("recharts-cross",A0),d:getPath(a0,s0,h0,p0,l0,u0)}))},baseExtremum$1=_baseExtremum,baseGt=_baseGt,baseIteratee$4=_baseIteratee;function maxBy(r0,e0){return r0&&r0.length?baseExtremum$1(r0,baseIteratee$4(e0),baseGt):void 0}var maxBy_1=maxBy;const maxBy$1=getDefaultExportFromCjs(maxBy_1);var baseExtremum=_baseExtremum,baseIteratee$3=_baseIteratee,baseLt=_base
vendor: 54,446 bytes, lines 713-716
713Lt;function minBy(r0,e0){return r0&&r0.length?baseExtremum(r0,baseIteratee$3(e0),baseLt):void 0}var minBy_1=minBy;const minBy$1=getDefaultExportFromCjs(minBy_1);var _excluded$2=["cx","cy","angle","ticks","axisLine"],_excluded2$1=["ticks","tick","angle","tickFormatter","stroke"];function _typeof$d(r0){"@babel/helpers - typeof";return _typeof$d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$d(r0)}function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$8.apply(this,arguments)}function ownKeys$c(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$c(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$c(Object(n0),!0).forEach(function(a0){_defineProperty$d(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$c(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _objectWithoutProperties$2(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$2(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$2(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function _classCallCheck$9(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$d(a0.key),a0)}}function _createClass$9(r0,e0,n0){return e0&&_defineProperties$9(r0.prototype,e0),n0&&_defineProperties$9(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$7(r0,e0,n0){return e0=_getPrototypeOf$7(e0),_possibleConstructorReturn$7(r0,_isNativeReflectConstruct$7()?Reflect.construct(e0,n0||[],_getPrototypeOf$7(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$7(r0,e0){if(e0&&(_typeof$d(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(r0)}function _assertThisInitialized$7(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$7(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$7=function(){return!!r0})()}function _getPrototypeOf$7(r0){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$7(r0)}function _inherits$7(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$7(r0,e0)}function _setPrototypeOf$7(r0,e0){return _setPrototypeOf$7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$7(r0,e0)}function _defineProperty$d(r0,e0,n0){return e0=_toPropertyKey$d(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$d(r0){var e0=_toPrimitive$d(r0,"string");return _typeof$d(e0)=="symbol"?e0:e0+""}function _toPrimitive$d(r0,e0){if(_typeof$d(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$d(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var PolarRadiusAxis=function(r0){function e0(){return _classCallCheck$9(this,e0),_callSuper$7(this,e0,arguments)}return _inherits$7(e0,r0),_createClass$9(e0,[{key:"getTickValueCoord",value:function(a0){var i0=a0.coordinate,s0=this.props,o0=s0.angle,l0=s0.cx,c0=s0.cy;return polarToCartesian(l0,c0,i0,o0)}},{key:"getTickTextAnchor",value:function(){var a0=this.props.orientation,i0;switch(a0){case"left":i0="end";break;case"right":i0="start";break;default:i0="middle";break}return i0}},{key:"getViewBox",value:function(){var a0=this.props,i0=a0.cx,s0=a0.cy,o0=a0.angle,l0=a0.ticks,c0=maxBy$1(l0,function(d0){return d0.coordinate||0}),u0=minBy$1(l0,function(d0){return d0.coordinate||0});return{cx:i0,cy:s0,startAngle:o0,endAngle:o0,innerRadius:u0.coordinate||0,outerRadius:c0.coordinate||0}}},{key:"renderAxisLine",value:function(){var a0=this.props,i0=a0.cx,s0=a0.cy,o0=a0.angle,l0=a0.ticks,c0=a0.axisLine,u0=_objectWithoutProperties$2(a0,_excluded$2),d0=l0.reduce(function(A0,m0){return[Math.min(A0[0],m0.coordinate),Math.max(A0[1],m0.coordinate)]},[1/0,-1/0]),h0=polarToCartesian(i0,s0,d0[0],o0),f0=polarToCartesian(i0,s0,d0[1],o0),p0=_objectSpread$c(_objectSpread$c(_objectSpread$c({},filterProps(u0,!1)),{},{fill:"none"},filterProps(c0,!1)),{},{x1:h0.x,y1:h0.y,x2:f0.x,y2:f0.y});return React__default.createElement("line",_extends$8({className:"recharts-polar-radius-axis-line"},p0))}},{key:"renderTicks",value:function(){var a0=this,i0=this.props,s0=i0.ticks,o0=i0.tick,l0=i0.angle,c0=i0.tickFormatter,u0=i0.stroke,d0=_objectWithoutProperties$2(i0,_excluded2$1),h0=this.getTickTextAnchor(),f0=filterProps(d0,!1),p0=filterProps(o0,!1),A0=s0.map(function(m0,x0){var g0=a0.getTickValueCoord(m0),y0=_objectSpread$c(_objectSpread$c(_objectSpread$c(_objectSpread$c({textAnchor:h0,transform:"rotate(".concat(90-l0,", ").concat(g0.x,", ").concat(g0.y,")")},f0),{},{stroke:"none",fill:u0},p0),{},{index:x0},g0),{},{payload:m0});return React__default.createElement(Layer,_extends$8({className:clsx("recharts-polar-radius-axis-tick",getTickClassName(o0)),key:"tick-".concat(m0.coordinate)},adaptEventsOfChild(a0.props,m0,x0)),e0.renderTickItem(o0,y0,c0?c0(m0.value,x0):m0.value))});return React__default.createElement(Layer,{className:"recharts-polar-radius-axis-ticks"},A0)}},{key:"render",value:function(){var a0=this.props,i0=a0.ticks,s0=a0.axisLine,o0=a0.tick;return!i0||!i0.length?null:React__default.createElement(Layer,{className:clsx("recharts-polar-radius-axis",this.props.className)},s0&&this.renderAxisLine(),o0&&this.renderTicks(),Label.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(a0,i0,s0){var o0;return React__default.isValidElement(a0)?o0=React__default.cloneElement(a0,i0):isFunction$3(a0)?o0=a0(i0):o0=React__default.createElement(Text,_extends$8({},i0,{className:"recharts-polar-radius-axis-tick-value"}),s0),o0}}])}(reactExports.PureComponent);_defineProperty$d(PolarRadiusAxis,"displayName","PolarRadiusAxis");_defineProperty$d(PolarRadiusAxis,"axisType","radiusAxis");_defineProperty$d(PolarRadiusAxis,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function _typeof$c(r0){"@babel/helpers - typeof";return _typeof$c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$c(r0)}function _extends$7(){return _extends$7=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$7.apply(this,arguments)}function ownKeys$b(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$b(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$b(Object(n0),!0).forEach(function(a0){_defineProperty$c(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$b(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$8(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$c(a0.key),a0)}}function _createClass$8(r0,e0,n0){return e0&&_defineProperties$8(r0.prototype,e0),n0&&_defineProperties$8(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$6(r0,e0,n0){return e0=_getPrototypeOf$6(e0),_possibleConstructorReturn$6(r0,_isNativeReflectConstruct$6()?Reflect.construct(e0,n0||[],_getPrototypeOf$6(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$6(r0,e0){if(e0&&(_typeof$c(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(r0)}function _assertThisInitialized$6(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$6(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$6=function(){return!!r0})()}function _getPrototypeOf$6(r0){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$6(r0)}function _inherits$6(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$6(r0,e0)}function _setPrototypeOf$6(r0,e0){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$6(r0,e0)}function _defineProperty$c(r0,e0,n0){return e0=_toPropertyKey$c(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$c(r0){var e0=_toPrimitive$c(r0,"string");return _typeof$c(e0)=="symbol"?e0:e0+""}function _toPrimitive$c(r0,e0){if(_typeof$c(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$c(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var RADIAN=Math.PI/180,eps=1e-5,PolarAngleAxis=function(r0){function e0(){return _classCallCheck$8(this,e0),_callSuper$6(this,e0,arguments)}return _inherits$6(e0,r0),_createClass$8(e0,[{key:"getTickLineCoord",value:function(a0){var i0=this.props,s0=i0.cx,o0=i0.cy,l0=i0.radius,c0=i0.orientation,u0=i0.tickSize,d0=u0||8,h0=polarToCartesian(s0,o0,l0,a0.coordinate),f0=polarToCartesian(s0,o0,l0+(c0==="inner"?-1:1)*d0,a0.coordinate);return{x1:h0.x,y1:h0.y,x2:f0.x,y2:f0.y}}},{key:"getTickTextAnchor",value:function(a0){var i0=this.props.orientation,s0=Math.cos(-a0.coordinate*RADIAN),o0;return s0>eps?o0=i0==="outer"?"start":"end":s0<-eps?o0=i0==="outer"?"end":"start":o0="middle",o0}},{key:"renderAxisLine",value:function(){var a0=this.props,i0=a0.cx,s0=a0.cy,o0=a0.radius,l0=a0.axisLine,c0=a0.axisLineType,u0=_objectSpread$b(_objectSpread$b({},filterProps(this.props,!1)),{},{fill:"none"},filterProps(l0,!1));if(c0==="circle")return React__default.createElement(Dot,_extends$7({className:"recharts-polar-angle-axis-line"},u0,{cx:i0,cy:s0,r:o0}));var d0=this.props.ticks,h0=d0.map(function(f0){return polarToCartesian(i0,s0,o0,f0.coordinate)});return React__default.createElement(Polygon,_extends$7({className:"recharts-polar-angle-axis-line"},u0,{points:h0}))}},{key:"renderTicks",value:function(){var a0=this,i0=this.props,s0=i0.ticks,o0=i0.tick,l0=i0.tickLine,c0=i0.tickFormatter,u0=i0.stroke,d0=filterProps(this.props,!1),h0=filterProps(o0,!1),f0=_objectSpread$b(_objectSpread$b({},d0),{},{fill:"none"},filterProps(l0,!1)),p0=s0.map(function(A0,m0){var x0=a0.getTickLineCoord(A0),g0=a0.getTickTextAnchor(A0),y0=_objectSpread$b(_objectSpread$b(_objectSpread$b({textAnchor:g0},d0),{},{stroke:"none",fill:u0},h0),{},{index:m0,payload:A0,x:x0.x2,y:x0.y2});return React__default.createElement(Layer,_extends$7({className:clsx("recharts-polar-angle-axis-tick",getTickClassName(o0)),key:"tick-".concat(A0.coordinate)},adaptEventsOfChild(a0.props,A0,m0)),l0&&React__default.createElement("line",_extends$7({className:"recharts-polar-angle-axis-tick-line"},f0,x0)),o0&&e0.renderTickItem(o0,y0,c0?c0(A0.value,m0):A0.value))});return React__default.createElement(Layer,{className:"recharts-polar-angle-axis-ticks"},p0)}},{key:"render",value:function(){var a0=this.props,i0=a0.ticks,s0=a0.radius,o0=a0.axisLine;return s0<=0||!i0||!i0.length?null:React__default.createElement(Layer,{className:clsx("recharts-polar-angle-axis",this.props.className)},o0&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(a0,i0,s0){var o0;return React__default.isValidElement(a0)?o0=React__default.cloneElement(a0,i0):isFunction$3(a0)?o0=a0(i0):o0=React__default.createElement(Text,_extends$7({},i0,{className:"recharts-polar-angle-axis-tick-value"}),s0),o0}}])}(reactExports.PureComponent);_defineProperty$c(PolarAngleAxis,"displayName","PolarAngleAxis");_defineProperty$c(PolarAngleAxis,"axisType","angleAxis");_defineProperty$c(PolarAngleAxis,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var overArg=_overArg,getPrototype$1=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$1,baseGetTag$1=_baseGetTag,getPrototype=_getPrototype,isObjectLike$1=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(r0){if(!isObjectLike$1(r0)||baseGetTag$1(r0)!=objectTag)return!1;var e0=getPrototype(r0);if(e0===null)return!0;var n0=hasOwnProperty.call(e0,"constructor")&&e0.constructor;return typeof n0=="function"&&n0 instanceof n0&&funcToString.call(n0)==objectCtorString}var isPlainObject_1=isPlainObject;const isPlainObject$1=getDefaultExportFromCjs(isPlainObject_1);var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,boolTag="[object Boolean]";function isBoolean(r0){return r0===!0||r0===!1||isObjectLike(r0)&&baseGetTag(r0)==boolTag}var isBoolean_1=isBoolean;const isBoolean$1=getDefaultExportFromCjs(isBoolean_1);function _typeof$b(r0){"@babel/helpers - typeof";return _typeof$b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$b(r0)}function _extends$6(){return _extends$6=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$6.apply(this,arguments)}function _slicedToArray$2(r0,e0){return _arrayWithHoles$2(r0)||_iterableToArrayLimit$2(r0,e0)||_unsupportedIterableToArray$3(r0,e0)||_nonIterableRest$2()}function _nonIterableRest$2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 714In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$3(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$3(r0,e0)}}function _arrayLikeToArray$3(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$2(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$2(r0){if(Array.isArray(r0))return r0}function ownKeys$a(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$a(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$a(Object(n0),!0).forEach(function(a0){_defineProperty$b(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$a(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$b(r0,e0,n0){return e0=_toPropertyKey$b(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$b(r0){var e0=_toPrimitive$b(r0,"string");return _typeof$b(e0)=="symbol"?e0:e0+""}function _toPrimitive$b(r0,e0){if(_typeof$b(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$b(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getTrapezoidPath=function r0(e0,n0,a0,i0,s0){var o0=a0-i0,l0;return l0="M ".concat(e0,",").concat(n0),l0+="L ".concat(e0+a0,",").concat(n0),l0+="L ".concat(e0+a0-o0/2,",").concat(n0+s0),l0+="L ".concat(e0+a0-o0/2-i0,",").concat(n0+s0),l0+="L ".concat(e0,",").concat(n0," Z"),l0},defaultProps={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Trapezoid=function r0(e0){var n0=_objectSpread$a(_objectSpread$a({},defaultProps),e0),a0=reactExports.useRef(),i0=reactExports.useState(-1),s0=_slicedToArray$2(i0,2),o0=s0[0],l0=s0[1];reactExports.useEffect(function(){if(a0.current&&a0.current.getTotalLength)try{var b0=a0.current.getTotalLength();b0&&l0(b0)}catch{}},[]);var c0=n0.x,u0=n0.y,d0=n0.upperWidth,h0=n0.lowerWidth,f0=n0.height,p0=n0.className,A0=n0.animationEasing,m0=n0.animationDuration,x0=n0.animationBegin,g0=n0.isUpdateAnimationActive;if(c0!==+c0||u0!==+u0||d0!==+d0||h0!==+h0||f0!==+f0||d0===0&&h0===0||f0===0)return null;var y0=clsx("recharts-trapezoid",p0);return g0?React__default.createElement(Animate,{canBegin:o0>0,from:{upperWidth:0,lowerWidth:0,height:f0,x:c0,y:u0},to:{upperWidth:d0,lowerWidth:h0,height:f0,x:c0,y:u0},duration:m0,animationEasing:A0,isActive:g0},function(b0){var E0=b0.upperWidth,w0=b0.lowerWidth,v0=b0.height,S0=b0.x,k0=b0.y;return React__default.createElement(Animate,{canBegin:o0>0,from:"0px ".concat(o0===-1?1:o0,"px"),to:"".concat(o0,"px 0px"),attributeName:"strokeDasharray",begin:x0,duration:m0,easing:A0},React__default.createElement("path",_extends$6({},filterProps(n0,!0),{className:y0,d:getTrapezoidPath(S0,k0,E0,w0,v0),ref:a0})))}):React__default.createElement("g",null,React__default.createElement("path",_extends$6({},filterProps(n0,!0),{className:y0,d:getTrapezoidPath(c0,u0,d0,h0,f0)})))},_excluded$1=["option","shapeType","propTransformer","activeClassName","isActive"];function _typeof$a(r0){"@babel/helpers - typeof";return _typeof$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$a(r0)}function _objectWithoutProperties$1(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose$1(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose$1(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function ownKeys$9(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$9(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$9(Object(n0),!0).forEach(function(a0){_defineProperty$a(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$9(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$a(r0,e0,n0){return e0=_toPropertyKey$a(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$a(r0){var e0=_toPrimitive$a(r0,"string");return _typeof$a(e0)=="symbol"?e0:e0+""}function _toPrimitive$a(r0,e0){if(_typeof$a(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$a(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function defaultPropTransformer(r0,e0){return _objectSpread$9(_objectSpread$9({},e0),r0)}function isSymbolsProps(r0,e0){return r0==="symbols"}function ShapeSelector(r0){var e0=r0.shapeType,n0=r0.elementProps;switch(e0){case"rectangle":return React__default.createElement(Rectangle,n0);case"trapezoid":return React__default.createElement(Trapezoid,n0);case"sector":return React__default.createElement(Sector,n0);case"symbols":if(isSymbolsProps(e0))return React__default.createElement(Symbols,n0);break;default:return null}}function getPropsFromShapeOption(r0){return reactExports.isValidElement(r0)?r0.props:r0}function Shape(r0){var e0=r0.option,n0=r0.shapeType,a0=r0.propTransformer,i0=a0===void 0?defaultPropTransformer:a0,s0=r0.activeClassName,o0=s0===void 0?"recharts-active-shape":s0,l0=r0.isActive,c0=_objectWithoutProperties$1(r0,_excluded$1),u0;if(reactExports.isValidElement(e0))u0=reactExports.cloneElement(e0,_objectSpread$9(_objectSpread$9({},c0),getPropsFromShapeOption(e0)));else if(isFunction$3(e0))u0=e0(c0);else if(isPlainObject$1(e0)&&!isBoolean$1(e0)){var d0=i0(e0,c0);u0=React__default.createElement(ShapeSelector,{shapeType:n0,elementProps:d0})}else{var h0=c0;u0=React__default.createElement(ShapeSelector,{shapeType:n0,elementProps:h0})}return l0?React__default.createElement(Layer,{className:o0},u0):u0}function isFunnel(r0,e0){return e0!=null&&"trapezoids"in r0.props}function isPie(r0,e0){return e0!=null&&"sectors"in r0.props}function isScatter(r0,e0){return e0!=null&&"points"in r0.props}function compareFunnel(r0,e0){var n0,a0,i0=r0.x===(e0==null||(n0=e0.labelViewBox)===null||n0===void 0?void 0:n0.x)||r0.x===e0.x,s0=r0.y===(e0==null||(a0=e0.labelViewBox)===null||a0===void 0?void 0:a0.y)||r0.y===e0.y;return i0&&s0}function comparePie(r0,e0){var n0=r0.endAngle===e0.endAngle,a0=r0.startAngle===e0.startAngle;return n0&&a0}function compareScatter(r0,e0){var n0=r0.x===e0.x,a0=r0.y===e0.y,i0=r0.z===e0.z;return n0&&a0&&i0}function getComparisonFn(r0,e0){var n0;return isFunnel(r0,e0)?n0=compareFunnel:isPie(r0,e0)?n0=comparePie:isScatter(r0,e0)&&(n0=compareScatter),n0}function getShapeDataKey(r0,e0){var n0;return isFunnel(r0,e0)?n0="trapezoids":isPie(r0,e0)?n0="sectors":isScatter(r0,e0)&&(n0="points"),n0}function getActiveShapeTooltipPayload(r0,e0){if(isFunnel(r0,e0)){var n0;return(n0=e0.tooltipPayload)===null||n0===void 0||(n0=n0[0])===null||n0===void 0||(n0=n0.payload)===null||n0===void 0?void 0:n0.payload}if(isPie(r0,e0)){var a0;return(a0=e0.tooltipPayload)===null||a0===void 0||(a0=a0[0])===null||a0===void 0||(a0=a0.payload)===null||a0===void 0?void 0:a0.payload}return isScatter(r0,e0)?e0.payload:{}}function getActiveShapeIndexForTooltip(r0){var e0=r0.activeTooltipItem,n0=r0.graphicalItem,a0=r0.itemData,i0=getShapeDataKey(n0,e0),s0=getActiveShapeTooltipPayload(n0,e0),o0=a0.filter(function(c0,u0){var d0=isEqual$1(s0,c0),h0=n0.props[i0].filter(function(A0){var m0=getComparisonFn(n0,e0);return m0(A0,e0)}),f0=n0.props[i0].indexOf(h0[h0.length-1]),p0=u0===f0;return d0&&p0}),l0=a0.indexOf(o0[o0.length-1]);return l0}var _Pie;function _typeof$9(r0){"@babel/helpers - typeof";return _typeof$9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$9(r0)}function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$5.apply(this,arguments)}function ownKeys$8(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$8(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$8(Object(n0),!0).forEach(function(a0){_defineProperty$9(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$8(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$7(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$9(a0.key),a0)}}function _createClass$7(r0,e0,n0){return e0&&_defineProperties$7(r0.prototype,e0),n0&&_defineProperties$7(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$5(r0,e0,n0){return e0=_getPrototypeOf$5(e0),_possibleConstructorReturn$5(r0,_isNativeReflectConstruct$5()?Reflect.construct(e0,n0||[],_getPrototypeOf$5(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$5(r0,e0){if(e0&&(_typeof$9(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$5(r0)}function _assertThisInitialized$5(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$5(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$5=function(){return!!r0})()}function _getPrototypeOf$5(r0){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$5(r0)}function _inherits$5(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$5(r0,e0)}function _setPrototypeOf$5(r0,e0){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$5(r0,e0)}function _defineProperty$9(r0,e0,n0){return e0=_toPropertyKey$9(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$9(r0){var e0=_toPrimitive$9(r0,"string");return _typeof$9(e0)=="symbol"?e0:e0+""}function _toPrimitive$9(r0,e0){if(_typeof$9(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$9(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var Pie=function(r0){function e0(n0){var a0;return _classCallCheck$7(this,e0),a0=_callSuper$5(this,e0,[n0]),_defineProperty$9(a0,"pieRef",null),_defineProperty$9(a0,"sectorRefs",[]),_defineProperty$9(a0,"id",uniqueId("recharts-pie-")),_defineProperty$9(a0,"handleAnimationEnd",function(){var i0=a0.props.onAnimationEnd;a0.setState({isAnimationFinished:!0}),isFunction$3(i0)&&i0()}),_defineProperty$9(a0,"handleAnimationStart",function(){var i0=a0.props.onAnimationStart;a0.setState({isAnimationFinished:!1}),isFunction$3(i0)&&i0()}),a0.state={isAnimationFinished:!n0.isAnimationActive,prevIsAnimationActive:n0.isAnimationActive,prevAnimationId:n0.animationId,sectorToFocus:0},a0}return _inherits$5(e0,r0),_createClass$7(e0,[{key:"isActiveIndex",value:function(a0){var i0=this.props.activeIndex;return Array.isArray(i0)?i0.indexOf(a0)!==-1:a0===i0}},{key:"hasActiveIndex",value:function(){var a0=this.props.activeIndex;return Array.isArray(a0)?a0.length!==0:a0||a0===0}},{key:"renderLabels",value:function(a0){var i0=this.props.isAnimationActive;if(i0&&!this.state.isAnimationFinished)return null;var s0=this.props,o0=s0.label,l0=s0.labelLine,c0=s0.dataKey,u0=s0.valueKey,d0=filterProps(this.props,!1),h0=filterProps(o0,!1),f0=filterProps(l0,!1),p0=o0&&o0.offsetRadius||20,A0=a0.map(function(m0,x0){var g0=(m0.startAngle+m0.endAngle)/2,y0=polarToCartesian(m0.cx,m0.cy,m0.outerRadius+p0,g0),b0=_objectSpread$8(_objectSpread$8(_objectSpread$8(_objectSpread$8({},d0),m0),{},{stroke:"none"},h0),{},{index:x0,textAnchor:e0.getTextAnchor(y0.x,m0.cx)},y0),E0=_objectSpread$8(_objectSpread$8(_objectSpread$8(_objectSpread$8({},d0),m0),{},{fill:"none",stroke:m0.fill},f0),{},{index:x0,points:[polarToCartesian(m0.cx,m0.cy,m0.outerRadius,g0),y0]}),w0=c0;return isNil$1(c0)&&isNil$1(u0)?w0="value":isNil$1(c0)&&(w0=u0),React__default.createElement(Layer,{key:"label-".concat(m0.startAngle,"-").concat(m0.endAngle,"-").concat(m0.midAngle,"-").concat(x0)},l0&&e0.renderLabelLineItem(l0,E0,"line"),e0.renderLabelItem(o0,b0,getValueByDataKey(m0,w0)))});return React__default.createElement(Layer,{className:"recharts-pie-labels"},A0)}},{key:"renderSectorsStatically",value:function(a0){var i0=this,s0=this.props,o0=s0.activeShape,l0=s0.blendStroke,c0=s0.inactiveShape;return a0.map(function(u0,d0){if((u0==null?void 0:u0.startAngle)===0&&(u0==null?void 0:u0.endAngle)===0&&a0.length!==1)return null;var h0=i0.isActiveIndex(d0),f0=c0&&i0.hasActiveIndex()?c0:null,p0=h0?o0:f0,A0=_objectSpread$8(_objectSpread$8({},u0),{},{stroke:l0?u0.fill:u0.stroke,tabIndex:-1});return React__default.createElement(Layer,_extends$5({ref:function(x0){x0&&!i0.sectorRefs.includes(x0)&&i0.sectorRefs.push(x0)},tabIndex:-1,className:"recharts-pie-sector"},adaptEventsOfChild(i0.props,u0,d0),{key:"sector-".concat(u0==null?void 0:u0.startAngle,"-").concat(u0==null?void 0:u0.endAngle,"-").concat(u0.midAngle,"-").concat(d0)}),React__default.createElement(Shape,_extends$5({option:p0,isActive:h0,shapeType:"sector"},A0)))})}},{key:"renderSectorsWithAnimation",value:function(){var a0=this,i0=this.props,s0=i0.sectors,o0=i0.isAnimationActive,l0=i0.animationBegin,c0=i0.animationDuration,u0=i0.animationEasing,d0=i0.animationId,h0=this.state,f0=h0.prevSectors,p0=h0.prevIsAnimationActive;return React__default.createElement(Animate,{begin:l0,duration:c0,isActive:o0,easing:u0,from:{t:0},to:{t:1},key:"pie-".concat(d0,"-").concat(p0),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(A0){var m0=A0.t,x0=[],g0=s0&&s0[0],y0=g0.startAngle;return s0.forEach(function(b0,E0){var w0=f0&&f0[E0],v0=E0>0?get$2(b0,"paddingAngle",0):0;if(w0){var S0=interpolateNumber$2(w0.endAngle-w0.startAngle,b0.endAngle-b0.startAngle),k0=_objectSpread$8(_objectSpread$8({},b0),{},{startAngle:y0+v0,endAngle:y0+S0(m0)+v0});x0.push(k0),y0=k0.endAngle}else{var R0=b0.endAngle,j0=b0.startAngle,C0=interpolateNumber$2(0,R0-j0),$0=C0(m0),T0=_objectSpread$8(_objectSpread$8({},b0),{},{startAngle:y0+v0,endAngle:y0+$0+v0});x0.push(T0),y0=T0.endAngle}}),React__default.createElement(Layer,null,a0.renderSectorsStatically(x0))})}},{key:"attachKeyboardHandlers",value:function(a0){var i0=this;a0.onkeydown=function(s0){if(!s0.altKey)switch(s0.key){case"ArrowLeft":{var o0=++i0.state.sectorToFocus%i0.sectorRefs.length;i0.sectorRefs[o0].focus(),i0.setState({sectorToFocus:o0});break}case"ArrowRight":{var l0=--i0.state.sectorToFocus<0?i0.sectorRefs.length-1:i0.state.sectorToFocus%i0.sectorRefs.length;i0.sectorRefs[l0].focus(),i0.setState({sectorToFocus:l0});break}case"Escape":{i0.sectorRefs[i0.state.sectorToFocus].blur(),i0.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var a0=this.props,i0=a0.sectors,s0=a0.isAnimationActive,o0=this.state.prevSectors;return s0&&i0&&i0.length&&(!o0||!isEqual$1(o0,i0))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i0)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var a0=this,i0=this.props,s0=i0.hide,o0=i0.sectors,l0=i0.className,c0=i0.label,u0=i0.cx,d0=i0.cy,h0=i0.innerRadius,f0=i0.outerRadius,p0=i0.isAnimationActive,A0=this.state.isAnimationFinished;if(s0||!o0||!o0.length||!isNumber$1(u0)||!isNumber$1(d0)||!isNumber$1(h0)||!isNumber$1(f0))return null;var m0=clsx("recharts-pie",l0);return React__default.createElement(Layer,{tabIndex:this.props.rootTabIndex,className:m0,ref:function(g0){a0.pieRef=g0}},this.renderSectors(),c0&&this.renderLabels(o0),Label.renderCallByParent(this.props,null,!1),(!p0||A0)&&LabelList.renderCallByParent(this.props,o0,!1))}}],[{key:"getDerivedStateFromProps",value:function(a0,i0){return i0.prevIsAnimationActive!==a0.isAnimationActive?{prevIsAnimationActive:a0.isAnimationActive,prevAnimationId:a0.animationId,curSectors:a0.sectors,prevSectors:[],isAnimationFinished:!0}:a0.isAnimationActive&&a0.animationId!==i0.prevAnimationId?{prevAnimationId:a0.animationId,curSectors:a0.sectors,prevSectors:i0.curSectors,isAnimationFinished:!0}:a0.sectors!==i0.curSectors?{curSectors:a0.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(a0,i0){return a0>i0?"start":a0<i0?"end":"middle"}},{key:"renderLabelLineItem",value:function(a0,i0,s0){if(React__default.isValidElement(a0))return React__default.cloneElement(a0,i0);if(isFunction$3(a0))return a0(i0);var o0=clsx("recharts-pie-label-line",typeof a0!="boolean"?a0.className:"");return React__default.createElement(Curve,_extends$5({},i0,{key:s0,type:"linear",className:o0}))}},{key:"renderLabelItem",value:function(a0,i0,s0){if(React__default.isValidElement(a0))return React__default.cloneElement(a0,i0);var o0=s0;if(isFunction$3(a0)&&(o0=a0(i0),React__default.isValidElement(o0)))return o0;var l0=clsx("recharts-pie-label-text",typeof a0!="boolean"&&!isFunction$3(a0)?a0.className:"");return React__default.createElement(Text,_extends$5({},i0,{alignmentBaseline:"middle",className:l0}),o0)}}])}(reactExports.PureComponent);_Pie=Pie;_defineProperty$9(Pie,"displayName","Pie");_defineProperty$9(Pie,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Global.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});_defineProperty$9(Pie,"parseDeltaAngle",function(r0,e0){var n0=mathSign(e0-r0),a0=Math.min(Math.abs(e0-r0),360);return n0*a0});_defineProperty$9(Pie,"getRealPieData",function(r0){var e0=r0.data,n0=r0.children,a0=filterProps(r0,!1),i0=findAllByType(n0,Cell);return e0&&e0.length?e0.map(function(s0,o0){return _objectSpread$8(_objectSpread$8(_objectSpread$8({payload:s0},a0),s0),i0&&i0[o0]&&i0[o0].props)}):i0&&i0.length?i0.map(function(s0){return _objectSpread$8(_objectSpread$8({},a0),s0.props)}):[]});_defineProperty$9(Pie,"parseCoordinateOfPie",function(r0,e0){var n0=e0.top,a0=e0.left,i0=e0.width,s0=e0.height,o0=getMaxRadius(i0,s0),l0=a0+getPercentValue(r0.cx,i0,i0/2),c0=n0+getPercentValue(r0.cy,s0,s0/2),u0=getPercentValue(r0.innerRadius,o0,0),d0=getPercentValue(r0.outerRadius,o0,o0*.8),h0=r0.maxRadius||Math.sqrt(i0*i0+s0*s0)/2;return{cx:l0,cy:c0,innerRadius:u0,outerRadius:d0,maxRadius:h0}});_defineProperty$9(Pie,"getComposedData",function(r0){var e0=r0.item,n0=r0.offset,a0=e0.type.defaultProps!==void 0?_objectSpread$8(_objectSpread$8({},e0.type.defaultProps),e0.props):e0.props,i0=_Pie.getRealPieData(a0);if(!i0||!i0.length)return null;var s0=a0.cornerRadius,o0=a0.startAngle,l0=a0.endAngle,c0=a0.paddingAngle,u0=a0.dataKey,d0=a0.nameKey,h0=a0.valueKey,f0=a0.tooltipType,p0=Math.abs(a0.minAngle),A0=_Pie.parseCoordinateOfPie(a0,n0),m0=_Pie.parseDeltaAngle(o0,l0),x0=Math.abs(m0),g0=u0;isNil$1(u0)&&isNil$1(h0)?(warn$1(!1,`Use "dataKey" to specify the value of pie, 715 the props "valueKey" will be deprecated in 1.1.0`),g0="value"):isNil$1(u0)&&(warn$1(!1,`Use "dataKey" to specify the value of pie, 716 the props "valueKey" will be deprecated in 1.1.0`),g0=h0);var y0=i0.filter(function(k0){return getValueByDataKey(k0,g0,0)!==0}).length,b0=(x0>=360?y0:y0-1)*c0,E0=x0-y0*p0-b0,w0=i0.reduce(function(k0,R0){var j0=getValueByDataKey(R0,g0,0);return k0+(isNumber$1(j0)?j0:0)},0),v0;if(w0>0){var S0;v0=i0.map(function(k0,R0){var j0=getValueByDataKey(k0,g0,0),C0=getValueByDataKey(k0,d0,R0),$0=(isNumber$1(j0)?j0:0)/w0,T0;R0?T0=S0.endAngle+mathSign(m0)*c0*(j0!==0?1:0):T0=o0;var I0=T0+mathSign(m0)*((j0!==0?p0:0)+$0*E0),M0=(T0+I0)/2,N0=(A0.innerRadius+A0.outerRadius)/2,D0=[{name:C0,value:j0,payload:k0,dataKey:g0,type:f0}],O0=polarToCartesian(A0.cx,A0.cy,N0,M0);return S0=_objectSpread$8(_objectSpread$8(_objectSpread$8({percent:$0,cornerRadius:s0,name:C0,tooltipPayload:D0,midAngle:M0,middleRadius:N0,tooltipPosition:O0},k0),A0),{},{value:getValueByDataKey(k0,g0),startAngle:T0,endAngle:I0,payload:k0,paddingAngle:mathSign(m0)*c0}),S0})}return _objectSpread$8(_objectSpread$8({},A0),{},{sectors:v0,data:i0})});var nativeCeil=Math.ceil,nativeMax=Math.max;function baseRange$1(r0,e0,n0,a0){for(var i0=-1,s0=nativeMax(nativeCeil((e0-r0)/(n0||1)),0),o0=Array(s0);s0--;)o0[a0?s0:++i0]=r0,r0+=n0;return o0}var _baseRange=baseRange$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(r0){if(!r0)return r0===0?r0:0;if(r0=toNumber(r0),r0===INFINITY||r0===-INFINITY){var e0=r0<0?-1:1;return e0*MAX_INTEGER}return r0===r0?r0:0}var toFinite_1=toFinite$1,baseRange=_baseRange,isIterateeCall$2=_isIterateeCall,toFinite=toFinite_1;function createRange$1(r0){return function(e0,n0,a0){return a0&&typeof a0!="number"&&isIterateeCall$2(e0,n0,a0)&&(n0=a0=void 0),e0=toFinite(e0),n0===void 0?(n0=e0,e0=0):n0=toFinite(n0),a0=a0===void 0?e0<n0?1:-1:toFinite(a0),baseRange(e0,n0,a0,r0)}}var _createRange=createRange$1,createRange=_createRange,range=createRange(),range_1=range;const range$1=getDefaultExportFromCjs(range_1);function _typeof$8(r0){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$8(r0)}function ownKeys$7(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$7(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$7(Object(n0),!0).forEach(function(a0){_defineProperty$8(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$7(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$8(r0,e0,n0){return e0=_toPropertyKey$8(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$8(r0){var e0=_toPrimitive$8(r0,"string");return _typeof$8(e0)=="symbol"?e0:e0+""}function _toPrimitive$8(r0,e0){if(_typeof$8(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$8(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var PREFIX_LIST=["Webkit","Moz","O","ms"],generatePrefixStyle=function r0(e0,n0){var a0=e0.replace(/(\w)/,function(s0){return s0.toUpperCase()}),i0=PREFIX_LIST.reduce(function(s0,o0){return _objectSpread$7(_objectSpread$7({},s0),{},_defineProperty$8({},o0+a0,n0))},{});return i0[e0]=n0,i0};function _typeof$7(r0){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$7(r0)}function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$4.apply(this,arguments)}function ownKeys$6(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$6(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$6(Object(n0),!0).forEach(function(a0){_defineProperty$7(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$6(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$6(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$7(a0.key),a0)}}function _createClass$6(r0,e0,n0){return e0&&_defineProperties$6(r0.prototype,e0),n0&&_defineProperties$6(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$4(r0,e0,n0){return e0=_getPrototypeOf$4(e0),_possibleConstructorReturn$4(r0,_isNativeReflectConstruct$4()?Reflect.construct(e0,n0||[],_getPrototypeOf$4(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$4(r0,e0){if(e0&&(_typeof$7(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$4(r0)}function _assertThisInitialized$4(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$4(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$4=function(){return!!r0})()}function _getPrototypeOf$4(r0){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$4(r0)}function _inherits$4(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$4(r0,e0)}function _setPrototypeOf$4(r0,e0){return _setPrototypeOf$4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$4(r0,e0)}function _defineProperty$7(r0,e0,n0){return e0=_toPropertyKey$7(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$7(r0){var e0=_toPrimitive$7(r0,"string");return _typeof$7(e0)=="symbol"?e0:e0+""}function _toPrimitive$7(r0,e0){if(_typeof$7(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$7(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var createScale=function r0(e0){var n0=e0.data,a0=e0.startIndex,i0=e0.endIndex,s0=e0.x,o0=e0.width,l0=e0.travellerWidth;if(!n0||!n0.length)return{};var c0=n0.length,u0=point().domain(range$1(0,c0)).range([s0,s0+o0-l0]),d0=u0.domain().map(function(h0){return u0(h0)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u0(a0),endX:u0(i0),scale:u0,scaleValues:d0}},isTouch=function r0(e0){return e0.changedTouches&&!!e0.changedTouches.length},Brush=function(r0){function e0(n0){var a0;return _classCallCheck$6(this,e0),a0=_callSuper$4(this,e0,[n0]),_defineProperty$7(a0,"handleDrag",function(i0){a0.leaveTimer&&(clearTimeout(a0.leaveTimer),a0.leaveTimer=null),a0.state.isTravellerMoving?a0.handleTravellerMove(i0):a0.state.isSlideMoving&&a0.handleSlideDrag(i0)}),_defineProperty$7(a0,"handleTouchMove",function(i0){i0.changedTouches!=null&&i0.changedTouches.length>0&&a0.handleDrag(i0.changedTouches[0])}),_defineProperty$7(a0,"handleDragEnd",function(){a0.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i0=a0.props,s0=i0.endIndex,o0=i0.onDragEnd,l0=i0.startIndex;o0==null||o0({endIndex:s0,startIndex:l0})}),a0.detachDragEndListener()}),_defineProperty$7(a0,"handleLeaveWrapper",function(){(a0.state.isTravellerMoving||a0.state.isSlideMoving)&&(a0.leaveTimer=window.setTimeout(a0.handleDragEnd,a0.props.leaveTimeOut))}),_defineProperty$7(a0,"handleEnterSlideOrTraveller",function(){a0.setState({isTextActive:!0})}),_defineProperty$7(a0,"handleLeaveSlideOrTraveller",function(){a0.setState({isTextActive:!1})}),_defineProperty$7(a0,"handleSlideDragStart",function(i0){var s0=isTouch(i0)?i0.changedTouches[0]:i0;a0.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s0.pageX}),a0.attachDragEndListener()}),a0.travellerDragStartHandlers={startX:a0.handleTravellerDragStart.bind(a0,"startX"),endX:a0.handleTravellerDragStart.bind(a0,"endX")},a0.state={},a0}return _inherits$4(e0,r0),_createClass$6(e0,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(a0){var i0=a0.startX,s0=a0.endX,o0=this.state.scaleValues,l0=this.props,c0=l0.gap,u0=l0.data,d0=u0.length-1,h0=Math.min(i0,s0),f0=Math.max(i0,s0),p0=e0.getIndexInRange(o0,h0),A0=e0.getIndexInRange(o0,f0);return{startIndex:p0-p0%c0,endIndex:A0===d0?d0:A0-A0%c0}}},{key:"getTextOfTick",value:function(a0){var i0=this.props,s0=i0.data,o0=i0.tickFormatter,l0=i0.dataKey,c0=getValueByDataKey(s0[a0],l0,a0);return isFunction$3(o0)?o0(c0,a0):c0}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(a0){var i0=this.state,s0=i0.slideMoveStartX,o0=i0.startX,l0=i0.endX,c0=this.props,u0=c0.x,d0=c0.width,h0=c0.travellerWidth,f0=c0.startIndex,p0=c0.endIndex,A0=c0.onChange,m0=a0.pageX-s0;m0>0?m0=Math.min(m0,u0+d0-h0-l0,u0+d0-h0-o0):m0<0&&(m0=Math.max(m0,u0-o0,u0-l0));var x0=this.getIndex({startX:o0+m0,endX:l0+m0});(x0.startIndex!==f0||x0.endIndex!==p0)&&A0&&A0(x0),this.setState({startX:o0+m0,endX:l0+m0,slideMoveStartX:a0.pageX})}},{key:"handleTravellerDragStart",value:function(a0,i0){var s0=isTouch(i0)?i0.changedTouches[0]:i0;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:a0,brushMoveStartX:s0.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(a0){var i0=this.state,s0=i0.brushMoveStartX,o0=i0.movingTravellerId,l0=i0.endX,c0=i0.startX,u0=this.state[o0],d0=this.props,h0=d0.x,f0=d0.width,p0=d0.travellerWidth,A0=d0.onChange,m0=d0.gap,x0=d0.data,g0={startX:this.state.startX,endX:this.state.endX},y0=a0.pageX-s0;y0>0?y0=Math.min(y0,h0+f0-p0-u0):y0<0&&(y0=Math.max(y0,h0-u0)),g0[o0]=u0+y0;var b0=this.getIndex(g0),E0=b0.startIndex,w0=b0.endIndex,v0=function(){var k0=x0.length-1;return o0==="startX"&&(l0>c0?E0%m0===0:w0%m0===0)||l0<c0&&w0===k0||o0==="endX"&&(l0>c0?w0%m0===0:E0%m0===0)||l0>c0&&w0===k0};this.setState(_defineProperty$7(_defineProperty$7({},o0,u0+y0),"brushMoveStartX",a0.pageX),function(){A0&&v0()&&A0(b0)})}},{key:"handleTravellerMoveKeyboard",value:function(a0,i0){var s0=this,o0=this.state,l0=o0.scaleValues,c0=o0.startX,u0=o0.endX,d0=this.state[i0],h0=l0.indexOf(d0);if(h0!==-1){var f0=h0+a0;if(!(f0===-1||f0>=l0.length)){var p0=l0[f0];i0==="startX"&&p0>=u0||i0==="endX"&&p0<=c0||this.setState(_defineProperty$7({},i0,p0),function(){s0.props.onChange(s0.getIndex({startX:s0.state.startX,endX:s0.state.endX}))})}}}},{key:"renderBackground",value:function(){var a0=this.props,i0=a0.x,s0=a0.y,o0=a0.width,l0=a0.height,c0=a0.fill,u0=a0.stroke;return React__default.createElement("rect",{stroke:u0,fill:c0,x:i0,y:s0,width:o0,height:l0})}},{key:"renderPanorama",value:function(){var a0=this.props,i0=a0.x,s0=a0.y,o0=a0.width,l0=a0.height,c0=a0.data,u0=a0.children,d0=a0.padding,h0=reactExports.Children.only(u0);return h0?React__default.cloneElement(h0,{x:i0,y:s0,width:o0,height:l0,margin:d0,compact:!0,data:c0}):null}},{key:"renderTravellerLayer",value:function(a0,i0){var s0,o0,l0=this,c0=this.props,u0=c0.y,d0=c0.travellerWidth,h0=c0.height,f0=c0.traveller,p0=c0.ariaLabel,A0=c0.data,m0=c0.startIndex,x0=c0.endIndex,g0=Math.max(a0,this.props.x),y0=_objectSpread$6(_objectSpread$6({},filterProps(this.props,!1)),{},{x:g0,y:u0,width:d0,height:h0}),b0=p0||"Min value: ".concat((s0=A0[m0])===null||s0===void 0?void 0:s0.name,", Max value: ").concat((o0=A0[x0])===null||o0===void 0?void 0:o0.name);return React__default.createElement(Layer,{tabIndex:0,role:"slider","aria-label":b0,"aria-valuenow":a0,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i0],onTouchStart:this.travellerDragStartHandlers[i0],onKeyDown:function(w0){["ArrowLeft","ArrowRight"].includes(w0.key)&&(w0.preventDefault(),w0.stopPropagation(),l0.handleTravellerMoveKeyboard(w0.key==="ArrowRight"?1:-1,i0))},onFocus:function(){l0.setState({isTravellerFocused:!0})},onBlur:function(){l0.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e0.renderTraveller(f0,y0))}},{key:"renderSlide",value:function(a0,i0){var s0=this.props,o0=s0.y,l0=s0.height,c0=s0.stroke,u0=s0.travellerWidth,d0=Math.min(a0,i0)+u0,h0=Math.max(Math.abs(i0-a0)-u0,0);return React__default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c0,fillOpacity:.2,x:d0,y:o0,width:h0,height:l0})}},{key:"renderText",value:function(){var a0=this.props,i0=a0.startIndex,s0=a0.endIndex,o0=a0.y,l0=a0.height,c0=a0.travellerWidth,u0=a0.stroke,d0=this.state,h0=d0.startX,f0=d0.endX,p0=5,A0={pointerEvents:"none",fill:u0};return React__default.createElement(Layer,{className:"recharts-brush-texts"},React__default.createElement(Text,_extends$4({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h0,f0)-p0,y:o0+l0/2},A0),this.getTextOfTick(i0)),React__default.createElement(Text,_extends$4({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h0,f0)+c0+p0,y:o0+l0/2},A0),this.getTextOfTick(s0)))}},{key:"render",value:function(){var a0=this.props,i0=a0.data,s0=a0.className,o0=a0.children,l0=a0.x,c0=a0.y,u0=a0.width,d0=a0.height,h0=a0.alwaysShowText,f0=this.state,p0=f0.startX,A0=f0.endX,m0=f0.isTextActive,x0=f0.isSlideMoving,g0=f0.isTravellerMoving,y0=f0.isTravellerFocused;if(!i0||!i0.length||!isNumber$1(l0)||!isNumber$1(c0)||!isNumber$1(u0)||!isNumber$1(d0)||u0<=0||d0<=0)return null;var b0=clsx("recharts-brush",s0),E0=React__default.Children.count(o0)===1,w0=generatePrefixStyle("userSelect","none");return React__default.createElement(Layer,{className:b0,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w0}
716,this.renderBackground(),E0&&this.renderPanorama(),this.renderSlide(p0,A0),this.renderTravellerLayer(p0,"startX"),this.renderTravellerLayer(A0,"endX"),(m0||x0||g0||y0||h0)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(a0){var i0=a0.x,s0=a0.y,o0=a0.width,l0=a0.height,c0=a0.stroke,u0=Math.floor(s0+l0/2)-1;return React__default.createElement(React__default.Fragment,null,React__default.createElement("rect",{x:i0,y:s0,width:o0,height:l0,fill:c0,stroke:"none"}),React__default.createElement("line",{x1:i0+1,y1:u0,x2:i0+o0-1,y2:u0,fill:"none",stroke:"#fff"}),React__default.createElement("line",{x1:i0+1,y1:u0+2,x2:i0+o0-1,y2:u0+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(a0,i0){var s0;return React__default.isValidElement(a0)?s0=React__default.cloneElement(a0,i0):isFunction$3(a0)?s0=a0(i0):s0=e0.renderDefaultTraveller(i0),s0}},{key:"getDerivedStateFromProps",value:function(a0,i0){var s0=a0.data,o0=a0.width,l0=a0.x,c0=a0.travellerWidth,u0=a0.updateId,d0=a0.startIndex,h0=a0.endIndex;if(s0!==i0.prevData||u0!==i0.prevUpdateId)return _objectSpread$6({prevData:s0,prevTravellerWidth:c0,prevUpdateId:u0,prevX:l0,prevWidth:o0},s0&&s0.length?createScale({data:s0,width:o0,x:l0,travellerWidth:c0,startIndex:d0,endIndex:h0}):{scale:null,scaleValues:null});if(i0.scale&&(o0!==i0.prevWidth||l0!==i0.prevX||c0!==i0.prevTravellerWidth)){i0.scale.range([l0,l0+o0-c0]);var f0=i0.scale.domain().map(function(p0){return i0.scale(p0)});return{prevData:s0,prevTravellerWidth:c0,prevUpdateId:u0,prevX:l0,prevWidth:o0,startX:i0.scale(a0.startIndex),endX:i0.scale(a0.endIndex),scaleValues:f0}}return null}},{key:"getIndexInRange",value:function(a0,i0){for(var s0=a0.length,o0=0,l0=s0-1;l0-o0>1;){var c0=Math.floor((o0+l0)/2);a0[c0]>i0?l0=c0:o0=c0}return i0>=a0[l0]?l0:o0}}])}(reactExports.PureComponent);_defineProperty$7(Brush,"displayName","Brush");_defineProperty$7(Brush,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var baseEach$1=_baseEach;function baseSome$1(r0,e0){var n0;return baseEach$1(r0,function(a0,i0,s0){return n0=e0(a0,i0,s0),!n0}),!!n0}var _baseSome=baseSome$1,arraySome=_arraySome,baseIteratee$2=_baseIteratee,baseSome=_baseSome,isArray$1=isArray_1,isIterateeCall$1=_isIterateeCall;function some(r0,e0,n0){var a0=isArray$1(r0)?arraySome:baseSome;return n0&&isIterateeCall$1(r0,e0,n0)&&(e0=void 0),a0(r0,baseIteratee$2(e0))}var some_1=some;const some$1=getDefaultExportFromCjs(some_1);var ifOverflowMatches=function r0(e0,n0){var a0=e0.alwaysShow,i0=e0.ifOverflow;return a0&&(i0="extendDomain"),i0===n0},defineProperty=_defineProperty$x;function baseAssignValue$1(r0,e0,n0){e0=="__proto__"&&defineProperty?defineProperty(r0,e0,{configurable:!0,enumerable:!0,value:n0,writable:!0}):r0[e0]=n0}var _baseAssignValue=baseAssignValue$1,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee$1=_baseIteratee;function mapValues(r0,e0){var n0={};return e0=baseIteratee$1(e0),baseForOwn(r0,function(a0,i0,s0){baseAssignValue(n0,i0,e0(a0,i0,s0))}),n0}var mapValues_1=mapValues;const mapValues$1=getDefaultExportFromCjs(mapValues_1);function arrayEvery$1(r0,e0){for(var n0=-1,a0=r0==null?0:r0.length;++n0<a0;)if(!e0(r0[n0],n0,r0))return!1;return!0}var _arrayEvery=arrayEvery$1,baseEach=_baseEach;function baseEvery$1(r0,e0){var n0=!0;return baseEach(r0,function(a0,i0,s0){return n0=!!e0(a0,i0,s0),n0}),n0}var _baseEvery=baseEvery$1,arrayEvery=_arrayEvery,baseEvery=_baseEvery,baseIteratee=_baseIteratee,isArray=isArray_1,isIterateeCall=_isIterateeCall;function every(r0,e0,n0){var a0=isArray(r0)?arrayEvery:baseEvery;return n0&&isIterateeCall(r0,e0,n0)&&(e0=void 0),a0(r0,baseIteratee(e0))}var every_1=every;const every$1=getDefaultExportFromCjs(every_1);function _typeof$6(r0){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$6(r0)}function _classCallCheck$5(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$6(a0.key),a0)}}function _createClass$5(r0,e0,n0){return e0&&_defineProperties$5(r0.prototype,e0),n0&&_defineProperties$5(r0,n0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function ownKeys$5(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$5(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};
vendor: 77,185 bytes, lines 716-720
716e0%2?ownKeys$5(Object(n0),!0).forEach(function(a0){_defineProperty$6(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$5(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$6(r0,e0,n0){return e0=_toPropertyKey$6(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$6(r0){var e0=_toPrimitive$6(r0,"string");return _typeof$6(e0)=="symbol"?e0:e0+""}function _toPrimitive$6(r0,e0){if(_typeof$6(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$6(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var rectWithPoints=function r0(e0,n0){var a0=e0.x,i0=e0.y,s0=n0.x,o0=n0.y;return{x:Math.min(a0,s0),y:Math.min(i0,o0),width:Math.abs(s0-a0),height:Math.abs(o0-i0)}},rectWithCoords=function r0(e0){var n0=e0.x1,a0=e0.y1,i0=e0.x2,s0=e0.y2;return rectWithPoints({x:n0,y:a0},{x:i0,y:s0})},ScaleHelper=function(){function r0(e0){_classCallCheck$5(this,r0),this.scale=e0}return _createClass$5(r0,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n0){var a0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i0=a0.bandAware,s0=a0.position;if(n0!==void 0){if(s0)switch(s0){case"start":return this.scale(n0);case"middle":{var o0=this.bandwidth?this.bandwidth()/2:0;return this.scale(n0)+o0}case"end":{var l0=this.bandwidth?this.bandwidth():0;return this.scale(n0)+l0}default:return this.scale(n0)}if(i0){var c0=this.bandwidth?this.bandwidth()/2:0;return this.scale(n0)+c0}return this.scale(n0)}}},{key:"isInRange",value:function(n0){var a0=this.range(),i0=a0[0],s0=a0[a0.length-1];return i0<=s0?n0>=i0&&n0<=s0:n0>=s0&&n0<=i0}}],[{key:"create",value:function(n0){return new r0(n0)}}])}();_defineProperty$6(ScaleHelper,"EPS",1e-4);var createLabeledScales=function r0(e0){var n0=Object.keys(e0).reduce(function(a0,i0){return _objectSpread$5(_objectSpread$5({},a0),{},_defineProperty$6({},i0,ScaleHelper.create(e0[i0])))},{});return _objectSpread$5(_objectSpread$5({},n0),{},{apply:function(i0){var s0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o0=s0.bandAware,l0=s0.position;return mapValues$1(i0,function(c0,u0){return n0[u0].apply(c0,{bandAware:o0,position:l0})})},isInRange:function(i0){return every$1(i0,function(s0,o0){return n0[o0].isInRange(s0)})}})},calculateViewBox=memoize$3(function(r0){return{x:r0.left,y:r0.top,width:r0.width,height:r0.height}},function(r0){return["l",r0.left,"t",r0.top,"w",r0.width,"h",r0.height].join("")}),XAxisContext=reactExports.createContext(void 0),YAxisContext=reactExports.createContext(void 0),ViewBoxContext=reactExports.createContext(void 0),OffsetContext=reactExports.createContext({}),ClipPathIdContext=reactExports.createContext(void 0),ChartHeightContext=reactExports.createContext(0),ChartWidthContext=reactExports.createContext(0),ChartLayoutContextProvider=function r0(e0){var n0=e0.state,a0=n0.xAxisMap,i0=n0.yAxisMap,s0=n0.offset,o0=e0.clipPathId,l0=e0.children,c0=e0.width,u0=e0.height,d0=calculateViewBox(s0);return React__default.createElement(XAxisContext.Provider,{value:a0},React__default.createElement(YAxisContext.Provider,{value:i0},React__default.createElement(OffsetContext.Provider,{value:s0},React__default.createElement(ViewBoxContext.Provider,{value:d0},React__default.createElement(ClipPathIdContext.Provider,{value:o0},React__default.createElement(ChartHeightContext.Provider,{value:u0},React__default.createElement(ChartWidthContext.Provider,{value:c0},l0)))))))},useClipPathId=function r0(){return reactExports.useContext(ClipPathIdContext)},useXAxisOrThrow=function r0(e0){var n0=reactExports.useContext(XAxisContext);n0==null&&invariant();var a0=n0[e0];return a0==null&&invariant(),a0},useYAxisOrThrow=function r0(e0){var n0=reactExports.useContext(YAxisContext);n0==null&&invariant();var a0=n0[e0];return a0==null&&invariant(),a0},useViewBox=function r0(){var e0=reactExports.useContext(ViewBoxContext);return e0};function _typeof$5(r0){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$5(r0)}function _classCallCheck$4(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$5(a0.key),a0)}}function _createClass$4(r0,e0,n0){return e0&&_defineProperties$4(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$3(r0,e0,n0){return e0=_getPrototypeOf$3(e0),_possibleConstructorReturn$3(r0,_isNativeReflectConstruct$3()?Reflect.construct(e0,n0||[],_getPrototypeOf$3(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$3(r0,e0){if(e0&&(_typeof$5(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(r0)}function _assertThisInitialized$3(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$3(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$3=function(){return!!r0})()}function _getPrototypeOf$3(r0){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$3(r0)}function _inherits$3(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$3(r0,e0)}function _setPrototypeOf$3(r0,e0){return _setPrototypeOf$3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$3(r0,e0)}function ownKeys$4(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$4(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$4(Object(n0),!0).forEach(function(a0){_defineProperty$5(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$4(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$5(r0,e0,n0){return e0=_toPropertyKey$5(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$5(r0){var e0=_toPrimitive$5(r0,"string");return _typeof$5(e0)=="symbol"?e0:e0+""}function _toPrimitive$5(r0,e0){if(_typeof$5(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$5(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function _slicedToArray$1(r0,e0){return _arrayWithHoles$1(r0)||_iterableToArrayLimit$1(r0,e0)||_unsupportedIterableToArray$2(r0,e0)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 717In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$2(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$2(r0,e0)}}function _arrayLikeToArray$2(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function _iterableToArrayLimit$1(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles$1(r0){if(Array.isArray(r0))return r0}function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$3.apply(this,arguments)}var renderLine=function r0(e0,n0){var a0;return React__default.isValidElement(e0)?a0=React__default.cloneElement(e0,n0):isFunction$3(e0)?a0=e0(n0):a0=React__default.createElement("line",_extends$3({},n0,{className:"recharts-reference-line-line"})),a0},getEndPoints=function r0(e0,n0,a0,i0,s0,o0,l0,c0,u0){var d0=s0.x,h0=s0.y,f0=s0.width,p0=s0.height;if(a0){var A0=u0.y,m0=e0.y.apply(A0,{position:o0});if(ifOverflowMatches(u0,"discard")&&!e0.y.isInRange(m0))return null;var x0=[{x:d0+f0,y:m0},{x:d0,y:m0}];return c0==="left"?x0.reverse():x0}if(n0){var g0=u0.x,y0=e0.x.apply(g0,{position:o0});if(ifOverflowMatches(u0,"discard")&&!e0.x.isInRange(y0))return null;var b0=[{x:y0,y:h0+p0},{x:y0,y:h0}];return l0==="top"?b0.reverse():b0}if(i0){var E0=u0.segment,w0=E0.map(function(v0){return e0.apply(v0,{position:o0})});return ifOverflowMatches(u0,"discard")&&some$1(w0,function(v0){return!e0.isInRange(v0)})?null:w0}return null};function ReferenceLineImpl(r0){var e0=r0.x,n0=r0.y,a0=r0.segment,i0=r0.xAxisId,s0=r0.yAxisId,o0=r0.shape,l0=r0.className,c0=r0.alwaysShow,u0=useClipPathId(),d0=useXAxisOrThrow(i0),h0=useYAxisOrThrow(s0),f0=useViewBox();if(!u0||!f0)return null;warn$1(c0===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p0=createLabeledScales({x:d0.scale,y:h0.scale}),A0=isNumOrStr(e0),m0=isNumOrStr(n0),x0=a0&&a0.length===2,g0=getEndPoints(p0,A0,m0,x0,f0,r0.position,d0.orientation,h0.orientation,r0);if(!g0)return null;var y0=_slicedToArray$1(g0,2),b0=y0[0],E0=b0.x,w0=b0.y,v0=y0[1],S0=v0.x,k0=v0.y,R0=ifOverflowMatches(r0,"hidden")?"url(#".concat(u0,")"):void 0,j0=_objectSpread$4(_objectSpread$4({clipPath:R0},filterProps(r0,!0)),{},{x1:E0,y1:w0,x2:S0,y2:k0});return React__default.createElement(Layer,{className:clsx("recharts-reference-line",l0)},renderLine(o0,j0),Label.renderCallByParent(r0,rectWithCoords({x1:E0,y1:w0,x2:S0,y2:k0})))}var ReferenceLine=function(r0){function e0(){return _classCallCheck$4(this,e0),_callSuper$3(this,e0,arguments)}return _inherits$3(e0,r0),_createClass$4(e0,[{key:"render",value:function(){return React__default.createElement(ReferenceLineImpl,this.props)}}])}(React__default.Component);_defineProperty$5(ReferenceLine,"displayName","ReferenceLine");_defineProperty$5(ReferenceLine,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$2.apply(this,arguments)}function _typeof$4(r0){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$4(r0)}function ownKeys$3(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$3(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$3(Object(n0),!0).forEach(function(a0){_defineProperty$4(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$3(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$3(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$4(a0.key),a0)}}function _createClass$3(r0,e0,n0){return e0&&_defineProperties$3(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$2(r0,e0,n0){return e0=_getPrototypeOf$2(e0),_possibleConstructorReturn$2(r0,_isNativeReflectConstruct$2()?Reflect.construct(e0,n0||[],_getPrototypeOf$2(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$2(r0,e0){if(e0&&(_typeof$4(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(r0)}function _assertThisInitialized$2(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$2(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$2=function(){return!!r0})()}function _getPrototypeOf$2(r0){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$2(r0)}function _inherits$2(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$2(r0,e0)}function _setPrototypeOf$2(r0,e0){return _setPrototypeOf$2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$2(r0,e0)}function _defineProperty$4(r0,e0,n0){return e0=_toPropertyKey$4(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$4(r0){var e0=_toPrimitive$4(r0,"string");return _typeof$4(e0)=="symbol"?e0:e0+""}function _toPrimitive$4(r0,e0){if(_typeof$4(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$4(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getCoordinate=function r0(e0){var n0=e0.x,a0=e0.y,i0=e0.xAxis,s0=e0.yAxis,o0=createLabeledScales({x:i0.scale,y:s0.scale}),l0=o0.apply({x:n0,y:a0},{bandAware:!0});return ifOverflowMatches(e0,"discard")&&!o0.isInRange(l0)?null:l0},ReferenceDot=function(r0){function e0(){return _classCallCheck$3(this,e0),_callSuper$2(this,e0,arguments)}return _inherits$2(e0,r0),_createClass$3(e0,[{key:"render",value:function(){var a0=this.props,i0=a0.x,s0=a0.y,o0=a0.r,l0=a0.alwaysShow,c0=a0.clipPathId,u0=isNumOrStr(i0),d0=isNumOrStr(s0);if(warn$1(l0===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u0||!d0)return null;var h0=getCoordinate(this.props);if(!h0)return null;var f0=h0.x,p0=h0.y,A0=this.props,m0=A0.shape,x0=A0.className,g0=ifOverflowMatches(this.props,"hidden")?"url(#".concat(c0,")"):void 0,y0=_objectSpread$3(_objectSpread$3({clipPath:g0},filterProps(this.props,!0)),{},{cx:f0,cy:p0});return React__default.createElement(Layer,{className:clsx("recharts-reference-dot",x0)},e0.renderDot(m0,y0),Label.renderCallByParent(this.props,{x:f0-o0,y:p0-o0,width:2*o0,height:2*o0}))}}])}(React__default.Component);_defineProperty$4(ReferenceDot,"displayName","ReferenceDot");_defineProperty$4(ReferenceDot,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});_defineProperty$4(ReferenceDot,"renderDot",function(r0,e0){var n0;return React__default.isValidElement(r0)?n0=React__default.cloneElement(r0,e0):isFunction$3(r0)?n0=r0(e0):n0=React__default.createElement(Dot,_extends$2({},e0,{cx:e0.cx,cy:e0.cy,className:"recharts-reference-dot-dot"})),n0});function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends$1.apply(this,arguments)}function _typeof$3(r0){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$3(r0)}function ownKeys$2(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$2(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$2(Object(n0),!0).forEach(function(a0){_defineProperty$3(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$2(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _classCallCheck$2(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$3(a0.key),a0)}}function _createClass$2(r0,e0,n0){return e0&&_defineProperties$2(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper$1(r0,e0,n0){return e0=_getPrototypeOf$1(e0),_possibleConstructorReturn$1(r0,_isNativeReflectConstruct$1()?Reflect.construct(e0,n0||[],_getPrototypeOf$1(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn$1(r0,e0){if(e0&&(_typeof$3(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(r0)}function _assertThisInitialized$1(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct$1(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$1=function(){return!!r0})()}function _getPrototypeOf$1(r0){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf$1(r0)}function _inherits$1(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf$1(r0,e0)}function _setPrototypeOf$1(r0,e0){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf$1(r0,e0)}function _defineProperty$3(r0,e0,n0){return e0=_toPropertyKey$3(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$3(r0){var e0=_toPrimitive$3(r0,"string");return _typeof$3(e0)=="symbol"?e0:e0+""}function _toPrimitive$3(r0,e0){if(_typeof$3(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$3(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var getRect=function r0(e0,n0,a0,i0,s0){var o0=s0.x1,l0=s0.x2,c0=s0.y1,u0=s0.y2,d0=s0.xAxis,h0=s0.yAxis;if(!d0||!h0)return null;var f0=createLabeledScales({x:d0.scale,y:h0.scale}),p0={x:e0?f0.x.apply(o0,{position:"start"}):f0.x.rangeMin,y:a0?f0.y.apply(c0,{position:"start"}):f0.y.rangeMin},A0={x:n0?f0.x.apply(l0,{position:"end"}):f0.x.rangeMax,y:i0?f0.y.apply(u0,{position:"end"}):f0.y.rangeMax};return ifOverflowMatches(s0,"discard")&&(!f0.isInRange(p0)||!f0.isInRange(A0))?null:rectWithPoints(p0,A0)},ReferenceArea=function(r0){function e0(){return _classCallCheck$2(this,e0),_callSuper$1(this,e0,arguments)}return _inherits$1(e0,r0),_createClass$2(e0,[{key:"render",value:function(){var a0=this.props,i0=a0.x1,s0=a0.x2,o0=a0.y1,l0=a0.y2,c0=a0.className,u0=a0.alwaysShow,d0=a0.clipPathId;warn$1(u0===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h0=isNumOrStr(i0),f0=isNumOrStr(s0),p0=isNumOrStr(o0),A0=isNumOrStr(l0),m0=this.props.shape;if(!h0&&!f0&&!p0&&!A0&&!m0)return null;var x0=getRect(h0,f0,p0,A0,this.props);if(!x0&&!m0)return null;var g0=ifOverflowMatches(this.props,"hidden")?"url(#".concat(d0,")"):void 0;return React__default.createElement(Layer,{className:clsx("recharts-reference-area",c0)},e0.renderRect(m0,_objectSpread$2(_objectSpread$2({clipPath:g0},filterProps(this.props,!0)),x0)),Label.renderCallByParent(this.props,x0))}}])}(React__default.Component);_defineProperty$3(ReferenceArea,"displayName","ReferenceArea");_defineProperty$3(ReferenceArea,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});_defineProperty$3(ReferenceArea,"renderRect",function(r0,e0){var n0;return React__default.isValidElement(r0)?n0=React__default.cloneElement(r0,e0):isFunction$3(r0)?n0=r0(e0):n0=React__default.createElement(Rectangle,_extends$1({},e0,{className:"recharts-reference-area-rect"})),n0});function _toConsumableArray$1(r0){return _arrayWithoutHoles$1(r0)||_iterableToArray$1(r0)||_unsupportedIterableToArray$1(r0)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 718In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray$1(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray$1(r0,e0)}}function _iterableToArray$1(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles$1(r0){if(Array.isArray(r0))return _arrayLikeToArray$1(r0)}function _arrayLikeToArray$1(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}var detectReferenceElementsDomain=function r0(e0,n0,a0,i0,s0){var o0=findAllByType(e0,ReferenceLine),l0=findAllByType(e0,ReferenceDot),c0=[].concat(_toConsumableArray$1(o0),_toConsumableArray$1(l0)),u0=findAllByType(e0,ReferenceArea),d0="".concat(i0,"Id"),h0=i0[0],f0=n0;if(c0.length&&(f0=c0.reduce(function(m0,x0){if(x0.props[d0]===a0&&ifOverflowMatches(x0.props,"extendDomain")&&isNumber$1(x0.props[h0])){var g0=x0.props[h0];return[Math.min(m0[0],g0),Math.max(m0[1],g0)]}return m0},f0)),u0.length){var p0="".concat(h0,"1"),A0="".concat(h0,"2");f0=u0.reduce(function(m0,x0){if(x0.props[d0]===a0&&ifOverflowMatches(x0.props,"extendDomain")&&isNumber$1(x0.props[p0])&&isNumber$1(x0.props[A0])){var g0=x0.props[p0],y0=x0.props[A0];return[Math.min(m0[0],g0,y0),Math.max(m0[1],g0,y0)]}return m0},f0)}return s0&&s0.length&&(f0=s0.reduce(function(m0,x0){return isNumber$1(x0)?[Math.min(m0[0],x0),Math.max(m0[1],x0)]:m0},f0)),f0},eventemitter3={exports:{}};(function(r0){var e0=Object.prototype.hasOwnProperty,n0="~";function a0(){}Object.create&&(a0.prototype=Object.create(null),new a0().__proto__||(n0=!1));function i0(c0,u0,d0){this.fn=c0,this.context=u0,this.once=d0||!1}function s0(c0,u0,d0,h0,f0){if(typeof d0!="function")throw new TypeError("The listener must be a function");var p0=new i0(d0,h0||c0,f0),A0=n0?n0+u0:u0;return c0._events[A0]?c0._events[A0].fn?c0._events[A0]=[c0._events[A0],p0]:c0._events[A0].push(p0):(c0._events[A0]=p0,c0._eventsCount++),c0}function o0(c0,u0){--c0._eventsCount===0?c0._events=new a0:delete c0._events[u0]}function l0(){this._events=new a0,this._eventsCount=0}l0.prototype.eventNames=function(){var u0=[],d0,h0;if(this._eventsCount===0)return u0;for(h0 in d0=this._events)e0.call(d0,h0)&&u0.push(n0?h0.slice(1):h0);return Object.getOwnPropertySymbols?u0.concat(Object.getOwnPropertySymbols(d0)):u0},l0.prototype.listeners=function(u0){var d0=n0?n0+u0:u0,h0=this._events[d0];if(!h0)return[];if(h0.fn)return[h0.fn];for(var f0=0,p0=h0.length,A0=new Array(p0);f0<p0;f0++)A0[f0]=h0[f0].fn;return A0},l0.prototype.listenerCount=function(u0){var d0=n0?n0+u0:u0,h0=this._events[d0];return h0?h0.fn?1:h0.length:0},l0.prototype.emit=function(u0,d0,h0,f0,p0,A0){var m0=n0?n0+u0:u0;if(!this._events[m0])return!1;var x0=this._events[m0],g0=arguments.length,y0,b0;if(x0.fn){switch(x0.once&&this.removeListener(u0,x0.fn,void 0,!0),g0){case 1:return x0.fn.call(x0.context),!0;case 2:return x0.fn.call(x0.context,d0),!0;case 3:return x0.fn.call(x0.context,d0,h0),!0;case 4:return x0.fn.call(x0.context,d0,h0,f0),!0;case 5:return x0.fn.call(x0.context,d0,h0,f0,p0),!0;case 6:return x0.fn.call(x0.context,d0,h0,f0,p0,A0),!0}for(b0=1,y0=new Array(g0-1);b0<g0;b0++)y0[b0-1]=arguments[b0];x0.fn.apply(x0.context,y0)}else{var E0=x0.length,w0;for(b0=0;b0<E0;b0++)switch(x0[b0].once&&this.removeListener(u0,x0[b0].fn,void 0,!0),g0){case 1:x0[b0].fn.call(x0[b0].context);break;case 2:x0[b0].fn.call(x0[b0].context,d0);break;case 3:x0[b0].fn.call(x0[b0].context,d0,h0);break;case 4:x0[b0].fn.call(x0[b0].context,d0,h0,f0);break;default:if(!y0)for(w0=1,y0=new Array(g0-1);w0<g0;w0++)y0[w0-1]=arguments[w0];x0[b0].fn.apply(x0[b0].context,y0)}}return!0},l0.prototype.on=function(u0,d0,h0){return s0(this,u0,d0,h0,!1)},l0.prototype.once=function(u0,d0,h0){return s0(this,u0,d0,h0,!0)},l0.prototype.removeListener=function(u0,d0,h0,f0){var p0=n0?n0+u0:u0;if(!this._events[p0])return this;if(!d0)return o0(this,p0),this;var A0=this._events[p0];if(A0.fn)A0.fn===d0&&(!f0||A0.once)&&(!h0||A0.context===h0)&&o0(this,p0);else{for(var m0=0,x0=[],g0=A0.length;m0<g0;m0++)(A0[m0].fn!==d0||f0&&!A0[m0].once||h0&&A0[m0].context!==h0)&&x0.push(A0[m0]);x0.length?this._events[p0]=x0.length===1?x0[0]:x0:o0(this,p0)}return this},l0.prototype.removeAllListeners=function(u0){var d0;return u0?(d0=n0?n0+u0:u0,this._events[d0]&&o0(this,d0)):(this._events=new a0,this._eventsCount=0),this},l0.prototype.off=l0.prototype.removeListener,l0.prototype.addListener=l0.prototype.on,l0.prefixed=n0,l0.EventEmitter=l0,r0.exports=l0})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);var eventCenter=new EventEmitter,SYNC_EVENT="recharts.syncMouseEvents";function _typeof$2(r0){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$2(r0)}function _classCallCheck$1(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey$2(a0.key),a0)}}function _createClass$1(r0,e0,n0){return e0&&_defineProperties$1(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _defineProperty$2(r0,e0,n0){return e0=_toPropertyKey$2(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$2(r0){var e0=_toPrimitive$2(r0,"string");return _typeof$2(e0)=="symbol"?e0:e0+""}function _toPrimitive$2(r0,e0){if(_typeof$2(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0);if(_typeof$2(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r0)}var AccessibilityManager=function(){function r0(){_classCallCheck$1(this,r0),_defineProperty$2(this,"activeIndex",0),_defineProperty$2(this,"coordinateList",[]),_defineProperty$2(this,"layout","horizontal")}return _createClass$1(r0,[{key:"setDetails",value:function(n0){var a0,i0=n0.coordinateList,s0=i0===void 0?null:i0,o0=n0.container,l0=o0===void 0?null:o0,c0=n0.layout,u0=c0===void 0?null:c0,d0=n0.offset,h0=d0===void 0?null:d0,f0=n0.mouseHandlerCallback,p0=f0===void 0?null:f0;this.coordinateList=(a0=s0??this.coordinateList)!==null&&a0!==void 0?a0:[],this.container=l0??this.container,this.layout=u0??this.layout,this.offset=h0??this.offset,this.mouseHandlerCallback=p0??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n0){if(this.coordinateList.length!==0)switch(n0.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n0){this.activeIndex=n0}},{key:"spoofMouse",value:function(){var n0,a0;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i0=this.container.getBoundingClientRect(),s0=i0.x,o0=i0.y,l0=i0.height,c0=this.coordinateList[this.activeIndex].coordinate,u0=((n0=window)===null||n0===void 0?void 0:n0.scrollX)||0,d0=((a0=window)===null||a0===void 0?void 0:a0.scrollY)||0,h0=s0+c0+u0,f0=o0+this.offset.top+l0/2+d0;this.mouseHandlerCallback({pageX:h0,pageY:f0})}}}])}();function isDomainSpecifiedByUser(r0,e0,n0){if(n0==="number"&&e0===!0&&Array.isArray(r0)){var a0=r0==null?void 0:r0[0],i0=r0==null?void 0:r0[1];if(a0&&i0&&isNumber$1(a0)&&isNumber$1(i0))return!0}return!1}function getCursorRectangle(r0,e0,n0,a0){var i0=a0/2;return{stroke:"none",fill:"#ccc",x:r0==="horizontal"?e0.x-i0:n0.left+.5,y:r0==="horizontal"?n0.top+.5:e0.y-i0,width:r0==="horizontal"?a0:n0.width-1,height:r0==="horizontal"?n0.height-1:a0}}function getRadialCursorPoints(r0){var e0=r0.cx,n0=r0.cy,a0=r0.radius,i0=r0.startAngle,s0=r0.endAngle,o0=polarToCartesian(e0,n0,a0,i0),l0=polarToCartesian(e0,n0,a0,s0);return{points:[o0,l0],cx:e0,cy:n0,radius:a0,startAngle:i0,endAngle:s0}}function getCursorPoints(r0,e0,n0){var a0,i0,s0,o0;if(r0==="horizontal")a0=e0.x,s0=a0,i0=n0.top,o0=n0.top+n0.height;else if(r0==="vertical")i0=e0.y,o0=i0,a0=n0.left,s0=n0.left+n0.width;else if(e0.cx!=null&&e0.cy!=null)if(r0==="centric"){var l0=e0.cx,c0=e0.cy,u0=e0.innerRadius,d0=e0.outerRadius,h0=e0.angle,f0=polarToCartesian(l0,c0,u0,h0),p0=polarToCartesian(l0,c0,d0,h0);a0=f0.x,i0=f0.y,s0=p0.x,o0=p0.y}else return getRadialCursorPoints(e0);return[{x:a0,y:i0},{x:s0,y:o0}]}function _typeof$1(r0){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof$1(r0)}function ownKeys$1(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread$1(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys$1(Object(n0),!0).forEach(function(a0){_defineProperty$1(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys$1(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty$1(r0,e0,n0){return e0=_toPropertyKey$1(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey$1(r0){var e0=_toPrimitive$1(r0,"string");return _typeof$1(e0)=="symbol"?e0:e0+""}function _toPrimitive$1(r0,e0){if(_typeof$1(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof$1(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}function Cursor(r0){var e0,n0,a0=r0.element,i0=r0.tooltipEventType,s0=r0.isActive,o0=r0.activeCoordinate,l0=r0.activePayload,c0=r0.offset,u0=r0.activeTooltipIndex,d0=r0.tooltipAxisBandSize,h0=r0.layout,f0=r0.chartName,p0=(e0=a0.props.cursor)!==null&&e0!==void 0?e0:(n0=a0.type.defaultProps)===null||n0===void 0?void 0:n0.cursor;if(!a0||!p0||!s0||!o0||f0!=="ScatterChart"&&i0!=="axis")return null;var A0,m0=Curve;if(f0==="ScatterChart")A0=o0,m0=Cross;else if(f0==="BarChart")A0=getCursorRectangle(h0,o0,c0,d0),m0=Rectangle;else if(h0==="radial"){var x0=getRadialCursorPoints(o0),g0=x0.cx,y0=x0.cy,b0=x0.radius,E0=x0.startAngle,w0=x0.endAngle;A0={cx:g0,cy:y0,startAngle:E0,endAngle:w0,innerRadius:b0,outerRadius:b0},m0=Sector}else A0={points:getCursorPoints(h0,o0,c0)},m0=Curve;var v0=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({stroke:"#ccc",pointerEvents:"none"},c0),A0),filterProps(p0,!1)),{},{payload:l0,payloadIndex:u0,className:clsx("recharts-tooltip-cursor",p0.className)});return reactExports.isValidElement(p0)?reactExports.cloneElement(p0,v0):reactExports.createElement(m0,v0)}var _excluded=["item"],_excluded2=["children","className","width","height","style","compact","title","desc"];function _typeof(r0){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e0){return typeof e0}:function(e0){return e0&&typeof Symbol=="function"&&e0.constructor===Symbol&&e0!==Symbol.prototype?"symbol":typeof e0},_typeof(r0)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0];for(var a0 in n0)Object.prototype.hasOwnProperty.call(n0,a0)&&(r0[a0]=n0[a0])}return r0},_extends.apply(this,arguments)}function _slicedToArray(r0,e0){return _arrayWithHoles(r0)||_iterableToArrayLimit(r0,e0)||_unsupportedIterableToArray(r0,e0)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 719In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit(r0,e0){var n0=r0==null?null:typeof Symbol<"u"&&r0[Symbol.iterator]||r0["@@iterator"];if(n0!=null){var a0,i0,s0,o0,l0=[],c0=!0,u0=!1;try{if(s0=(n0=n0.call(r0)).next,e0!==0)for(;!(c0=(a0=s0.call(n0)).done)&&(l0.push(a0.value),l0.length!==e0);c0=!0);}catch(d0){u0=!0,i0=d0}finally{try{if(!c0&&n0.return!=null&&(o0=n0.return(),Object(o0)!==o0))return}finally{if(u0)throw i0}}return l0}}function _arrayWithHoles(r0){if(Array.isArray(r0))return r0}function _objectWithoutProperties(r0,e0){if(r0==null)return{};var n0=_objectWithoutPropertiesLoose(r0,e0),a0,i0;if(Object.getOwnPropertySymbols){var s0=Object.getOwnPropertySymbols(r0);for(i0=0;i0<s0.length;i0++)a0=s0[i0],!(e0.indexOf(a0)>=0)&&Object.prototype.propertyIsEnumerable.call(r0,a0)&&(n0[a0]=r0[a0])}return n0}function _objectWithoutPropertiesLoose(r0,e0){if(r0==null)return{};var n0={};for(var a0 in r0)if(Object.prototype.hasOwnProperty.call(r0,a0)){if(e0.indexOf(a0)>=0)continue;n0[a0]=r0[a0]}return n0}function _classCallCheck(r0,e0){if(!(r0 instanceof e0))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r0,e0){for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];a0.enumerable=a0.enumerable||!1,a0.configurable=!0,"value"in a0&&(a0.writable=!0),Object.defineProperty(r0,_toPropertyKey(a0.key),a0)}}function _createClass(r0,e0,n0){return e0&&_defineProperties(r0.prototype,e0),Object.defineProperty(r0,"prototype",{writable:!1}),r0}function _callSuper(r0,e0,n0){return e0=_getPrototypeOf(e0),_possibleConstructorReturn(r0,_isNativeReflectConstruct()?Reflect.construct(e0,n0||[],_getPrototypeOf(r0).constructor):e0.apply(r0,n0))}function _possibleConstructorReturn(r0,e0){if(e0&&(_typeof(e0)==="object"||typeof e0=="function"))return e0;if(e0!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(r0)}function _assertThisInitialized(r0){if(r0===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r0}function _isNativeReflectConstruct(){try{var r0=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct=function(){return!!r0})()}function _getPrototypeOf(r0){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n0){return n0.__proto__||Object.getPrototypeOf(n0)},_getPrototypeOf(r0)}function _inherits(r0,e0){if(typeof e0!="function"&&e0!==null)throw new TypeError("Super expression must either be null or a function");r0.prototype=Object.create(e0&&e0.prototype,{constructor:{value:r0,writable:!0,configurable:!0}}),Object.defineProperty(r0,"prototype",{writable:!1}),e0&&_setPrototypeOf(r0,e0)}function _setPrototypeOf(r0,e0){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a0,i0){return a0.__proto__=i0,a0},_setPrototypeOf(r0,e0)}function _toConsumableArray(r0){return _arrayWithoutHoles(r0)||_iterableToArray(r0)||_unsupportedIterableToArray(r0)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 720In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(r0,e0){if(r0){if(typeof r0=="string")return _arrayLikeToArray(r0,e0);var n0=Object.prototype.toString.call(r0).slice(8,-1);if(n0==="Object"&&r0.constructor&&(n0=r0.constructor.name),n0==="Map"||n0==="Set")return Array.from(r0);if(n0==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n0))return _arrayLikeToArray(r0,e0)}}function _iterableToArray(r0){if(typeof Symbol<"u"&&r0[Symbol.iterator]!=null||r0["@@iterator"]!=null)return Array.from(r0)}function _arrayWithoutHoles(r0){if(Array.isArray(r0))return _arrayLikeToArray(r0)}function _arrayLikeToArray(r0,e0){(e0==null||e0>r0.length)&&(e0=r0.length);for(var n0=0,a0=new Array(e0);n0<e0;n0++)a0[n0]=r0[n0];return a0}function ownKeys(r0,e0){var n0=Object.keys(r0);if(Object.getOwnPropertySymbols){var a0=Object.getOwnPropertySymbols(r0);e0&&(a0=a0.filter(function(i0){return Object.getOwnPropertyDescriptor(r0,i0).enumerable})),n0.push.apply(n0,a0)}return n0}function _objectSpread(r0){for(var e0=1;e0<arguments.length;e0++){var n0=arguments[e0]!=null?arguments[e0]:{};e0%2?ownKeys(Object(n0),!0).forEach(function(a0){_defineProperty(r0,a0,n0[a0])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r0,Object.getOwnPropertyDescriptors(n0)):ownKeys(Object(n0)).forEach(function(a0){Object.defineProperty(r0,a0,Object.getOwnPropertyDescriptor(n0,a0))})}return r0}function _defineProperty(r0,e0,n0){return e0=_toPropertyKey(e0),e0 in r0?Object.defineProperty(r0,e0,{value:n0,enumerable:!0,configurable:!0,writable:!0}):r0[e0]=n0,r0}function _toPropertyKey(r0){var e0=_toPrimitive(r0,"string");return _typeof(e0)=="symbol"?e0:e0+""}function _toPrimitive(r0,e0){if(_typeof(r0)!="object"||!r0)return r0;var n0=r0[Symbol.toPrimitive];if(n0!==void 0){var a0=n0.call(r0,e0||"default");if(_typeof(a0)!="object")return a0;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e0==="string"?String:Number)(r0)}var ORIENT_MAP={xAxis:["bottom","top"],yAxis:["left","right"]},FULL_WIDTH_AND_HEIGHT={width:"100%",height:"100%"},originCoordinate={x:0,y:0};function renderAsIs(r0){return r0}var calculateTooltipPos=function r0(e0,n0){return n0==="horizontal"?e0.x:n0==="vertical"?e0.y:n0==="centric"?e0.angle:e0.radius},getActiveCoordinate=function r0(e0,n0,a0,i0){var s0=n0.find(function(d0){return d0&&d0.index===a0});if(s0){if(e0==="horizontal")return{x:s0.coordinate,y:i0.y};if(e0==="vertical")return{x:i0.x,y:s0.coordinate};if(e0==="centric"){var o0=s0.coordinate,l0=i0.radius;return _objectSpread(_objectSpread(_objectSpread({},i0),polarToCartesian(i0.cx,i0.cy,l0,o0)),{},{angle:o0,radius:l0})}var c0=s0.coordinate,u0=i0.angle;return _objectSpread(_objectSpread(_objectSpread({},i0),polarToCartesian(i0.cx,i0.cy,c0,u0)),{},{angle:u0,radius:c0})}return originCoordinate},getDisplayedData=function r0(e0,n0){var a0=n0.graphicalItems,i0=n0.dataStartIndex,s0=n0.dataEndIndex,o0=(a0??[]).reduce(function(l0,c0){var u0=c0.props.data;return u0&&u0.length?[].concat(_toConsumableArray(l0),_toConsumableArray(u0)):l0},[]);return o0.length>0?o0:e0&&e0.length&&isNumber$1(i0)&&isNumber$1(s0)?e0.slice(i0,s0+1):[]};function getDefaultDomainByAxisType(r0){return r0==="number"?[0,"auto"]:void 0}var getTooltipContent=function r0(e0,n0,a0,i0){var s0=e0.graphicalItems,o0=e0.tooltipAxis,l0=getDisplayedData(n0,e0);return a0<0||!s0||!s0.length||a0>=l0.length?null:s0.reduce(function(c0,u0){var d0,h0=(d0=u0.props.data)!==null&&d0!==void 0?d0:n0;h0&&e0.dataStartIndex+e0.dataEndIndex!==0&&e0.dataEndIndex-e0.dataStartIndex>=a0&&(h0=h0.slice(e0.dataStartIndex,e0.dataEndIndex+1));var f0;if(o0.dataKey&&!o0.allowDuplicatedCategory){var p0=h0===void 0?l0:h0;f0=findEntryInArray(p0,o0.dataKey,i0)}else f0=h0&&h0[a0]||l0[a0];return f0?[].concat(_toConsumableArray(c0),[getTooltipItem(u0,f0)]):c0},[])},getTooltipData=function r0(e0,n0,a0,i0){var s0=i0||{x:e0.chartX,y:e0.chartY},o0=calculateTooltipPos(s0,a0),l0=e0.orderedTooltipTicks,c0=e0.tooltipAxis,u0=e0.tooltipTicks,d0=calculateActiveTickIndex(o0,l0,u0,c0);if(d0>=0&&u0){var h0=u0[d0]&&u0[d0].value,f0=getTooltipContent(e0,n0,d0,h0),p0=getActiveCoordinate(a0,l0,d0,s0);return{activeTooltipIndex:d0,activeLabel:h0,activePayload:f0,activeCoordinate:p0}}return null},getAxisMapByAxes=function r0(e0,n0){var a0=n0.axes,i0=n0.graphicalItems,s0=n0.axisType,o0=n0.axisIdKey,l0=n0.stackGroups,c0=n0.dataStartIndex,u0=n0.dataEndIndex,d0=e0.layout,h0=e0.children,f0=e0.stackOffset,p0=isCategoricalAxis(d0,s0);return a0.reduce(function(A0,m0){var x0,g0=m0.type.defaultProps!==void 0?_objectSpread(_objectSpread({},m0.type.defaultProps),m0.props):m0.props,y0=g0.type,b0=g0.dataKey,E0=g0.allowDataOverflow,w0=g0.allowDuplicatedCategory,v0=g0.scale,S0=g0.ticks,k0=g0.includeHidden,R0=g0[o0];if(A0[R0])return A0;var j0=getDisplayedData(e0.data,{graphicalItems:i0.filter(function(F0){var Q0,U0=o0 in F0.props?F0.props[o0]:(Q0=F0.type.defaultProps)===null||Q0===void 0?void 0:Q0[o0];return U0===R0}),dataStartIndex:c0,dataEndIndex:u0}),C0=j0.length,$0,T0,I0;isDomainSpecifiedByUser(g0.domain,E0,y0)&&($0=parseSpecifiedDomain(g0.domain,null,E0),p0&&(y0==="number"||v0!=="auto")&&(I0=getDomainOfDataByKey(j0,b0,"category")));var M0=getDefaultDomainByAxisType(y0);if(!$0||$0.length===0){var N0,D0=(N0=g0.domain)!==null&&N0!==void 0?N0:M0;if(b0){if($0=getDomainOfDataByKey(j0,b0,y0),y0==="category"&&p0){var O0=hasDuplicate($0);w0&&O0?(T0=$0,$0=range$1(0,C0)):w0||($0=parseDomainOfCategoryAxis(D0,$0,m0).reduce(function(F0,Q0){return F0.indexOf(Q0)>=0?F0:[].concat(_toConsumableArray(F0),[Q0])},[]))}else if(y0==="category")w0?$0=$0.filter(function(F0){return F0!==""&&!isNil$1(F0)}):$0=parseDomainOfCategoryAxis(D0,$0,m0).reduce(function(F0,Q0){return F0.indexOf(Q0)>=0||Q0===""||isNil$1(Q0)?F0:[].concat(_toConsumableArray(F0),[Q0])},[]);else if(y0==="number"){var B0=parseErrorBarsOfAxis(j0,i0.filter(function(F0){var Q0,U0,q0=o0 in F0.props?F0.props[o0]:(Q0=F0.type.defaultProps)===null||Q0===void 0?void 0:Q0[o0],Rw="hide"in F0.props?F0.props.hide:(U0=F0.type.defaultProps)===null||U0===void 0?void 0:U0.hide;return q0===R0&&(k0||!Rw)}),b0,s0,d0);B0&&($0=B0)}p0&&(y0==="number"||v0!=="auto")&&(I0=getDomainOfDataByKey(j0,b0,"category"))}else p0?$0=range$1(0,C0):l0&&l0[R0]&&l0[R0].hasStack&&y0==="number"?$0=f0==="expand"?[0,1]:getDomainOfStackGroups(l0[R0].stackGroups,c0,u0):$0=getDomainOfItemsWithSameAxis(j0,i0.filter(function(F0){var Q0=o0 in F0.props?F0.props[o0]:F0.type.defaultProps[o0],U0="hide"in F0.props?F0.props.hide:F0.type.defaultProps.hide;return Q0===R0&&(k0||!U0)}),y0,d0,!0);if(y0==="number")$0=detectReferenceElementsDomain(h0,$0,R0,s0,S0),D0&&($0=parseSpecifiedDomain(D0,$0,E0));else if(y0==="category"&&D0){var z0=D0,G0=$0.every(function(F0){return z0.indexOf(F0)>=0});G0&&($0=z0)}}return _objectSpread(_objectSpread({},A0),{},_defineProperty({},R0,_objectSpread(_objectSpread({},g0),{},{axisType:s0,domain:$0,categoricalDomain:I0,duplicateDomain:T0,originalDomain:(x0=g0.domain)!==null&&x0!==void 0?x0:M0,isCategorical:p0,layout:d0})))},{})},getAxisMapByItems=function r0(e0,n0){var a0=n0.graphicalItems,i0=n0.Axis,s0=n0.axisType,o0=n0.axisIdKey,l0=n0.stackGroups,c0=n0.dataStartIndex,u0=n0.dataEndIndex,d0=e0.layout,h0=e0.children,f0=getDisplayedData(e0.data,{graphicalItems:a0,dataStartIndex:c0,dataEndIndex:u0}),p0=f0.length,A0=isCategoricalAxis(d0,s0),m0=-1;return a0.reduce(function(x0,g0){var y0=g0.type.defaultProps!==void 0?_objectSpread(_objectSpread({},g0.type.defaultProps),g0.props):g0.props,b0=y0[o0],E0=getDefaultDomainByAxisType("number");if(!x0[b0]){m0++;var w0;return A0?w0=range$1(0,p0):l0&&l0[b0]&&l0[b0].hasStack?(w0=getDomainOfStackGroups(l0[b0].stackGroups,c0,u0),w0=detectReferenceElementsDomain(h0,w0,b0,s0)):(w0=parseSpecifiedDomain(E0,getDomainOfItemsWithSameAxis(f0,a0.filter(function(v0){var S0,k0,R0=o0 in v0.props?v0.props[o0]:(S0=v0.type.defaultProps)===null||S0===void 0?void 0:S0[o0],j0="hide"in v0.props?v0.props.hide:(k0=v0.type.defaultProps)===null||k0===void 0?void 0:k0.hide;return R0===b0&&!j0}),"number",d0),i0.defaultProps.allowDataOverflow),w0=detectReferenceElementsDomain(h0,w0,b0,s0)),_objectSpread(_objectSpread({},x0),{},_defineProperty({},b0,_objectSpread(_objectSpread({axisType:s0},i0.defaultProps),{},{hide:!0,orientation:get$2(ORIENT_MAP,"".concat(s0,".").concat(m0%2),null),domain:w0,originalDomain:E0,isCategorical:A0,layout:d0})))}return x0},{})},getAxisMap=function r0(e0,n0){var a0=n0.axisType,i0=a0===void 0?"xAxis":a0,s0=n0.AxisComp,o0=n0.graphicalItems,l0=n0.stackGroups,c0=n0.dataStartIndex,u0=n0.dataEndIndex,d0=e0.children,h0="".concat(i0,"Id"),f0=findAllByType(d0,s0),p0={};return f0&&f0.length?p0=getAxisMapByAxes(e0,{axes:f0,graphicalItems:o0,axisType:i0,axisIdKey:h0,stackGroups:l0,dataStartIndex:c0,dataEndIndex:u0}):o0&&o0.length&&(p0=getAxisMapByItems(e0,{Axis:s0,graphicalItems:o0,axisType:i0,axisIdKey:h0,stackGroups:l0,dataStartIndex:c0,dataEndIndex:u0})),p0},tooltipTicksGenerator=function r0(e0){var n0=getAnyElementOfObject(e0),a0=getTicksOfAxis(n0,!1,!0);return{tooltipTicks:a0,orderedTooltipTicks:sortBy$1(a0,function(i0){return i0.coordinate}),tooltipAxis:n0,tooltipAxisBandSize:getBandSizeOfAxis(n0,a0)}},createDefaultState=function r0(e0){var n0=e0.children,a0=e0.defaultShowTooltip,i0=findChildByType(n0,Brush),s0=0,o0=0;return e0.data&&e0.data.length!==0&&(o0=e0.data.length-1),i0&&i0.props&&(i0.props.startIndex>=0&&(s0=i0.props.startIndex),i0.props.endIndex>=0&&(o0=i0.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s0,dataEndIndex:o0,activeTooltipIndex:-1,isTooltipActive:!!a0}},hasGraphicalBarItem=function r0(e0){return!e0||!e0.length?!1:e0.some(function(n0){var a0=getDisplayName(n0&&n0.type);return a0&&a0.indexOf("Bar")>=0})},getAxisNameByLayout=function r0(e0){return e0==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e0==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e0==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function r0(e0,n0){var a0=e0.props,i0=e0.graphicalItems,s0=e0.xAxisMap,o0=s0===void 0?{}:s0,l0=e0.yAxisMap,c0=l0===void 0?{}:l0,u0=a0.width,d0=a0.height,h0=a0.children,f0=a0.margin||{},p0=findChildByType(h0,Brush),A0=findChildByType(h0,Legend),m0=Object.keys(c0).reduce(function(w0,v0){var S0=c0[v0],k0=S0.orientation;return!S0.mirror&&!S0.hide?_objectSpread(_objectSpread({},w0),{},_defineProperty({},k0,w0[k0]+S0.width)):w0},{left:f0.left||0,right:f0.right||0}),x0=Object.keys(o0).reduce(function(w0,v0){var S0=o0[v0],k0=S0.orientation;return!S0.mirror&&!S0.hide?_objectSpread(_objectSpread({},w0),{},_defineProperty({},k0,get$2(w0,"".concat(k0))+S0.height)):w0},{top:f0.top||0,bottom:f0.bottom||0}),g0=_objectSpread(_objectSpread({},x0),m0),y0=g0.bottom;p0&&(g0.bottom+=p0.props.height||Brush.defaultProps.height),A0&&n0&&(g0=appendOffsetOfLegend(g0,i0,a0,n0));var b0=u0-g0.left-g0.right,E0=d0-g0.top-g0.bottom;return _objectSpread(_objectSpread({brushBottom:y0},g0),{},{width:Math.max(b0,0),height:Math.max(E0,0)})},getCartesianAxisSize=function r0(e0,n0){if(n0==="xAxis")return e0[n0].width;if(n0==="yAxis")return e0[n0].height},generateCategoricalChart=function r0(e0){var n0=e0.chartName,a0=e0.GraphicalChild,i0=e0.defaultTooltipEventType,s0=i0===void 0?"axis":i0,o0=e0.validateTooltipEventTypes,l0=o0===void 0?["axis"]:o0,c0=e0.axisComponents,u0=e0.legendContent,d0=e0.formatAxisMap,h0=e0.defaultProps,f0=function(g0,y0){var b0=y0.graphicalItems,E0=y0.stackGroups,w0=y0.offset,v0=y0.updateId,S0=y0.dataStartIndex,k0=y0.dataEndIndex,R0=g0.barSize,j0=g0.layout,C0=g0.barGap,$0=g0.barCategoryGap,T0=g0.maxBarSize,I0=getAxisNameByLayout(j0),M0=I0.numericAxisName,N0=I0.cateAxisName,D0=hasGraphicalBarItem(b0),O0=[];return b0.forEach(function(B0,z0){var G0=getDisplayedData(g0.data,{graphicalItems:[B0],dataStartIndex:S0,dataEndIndex:k0}),F0=B0.type.defaultProps!==void 0?_objectSpread(_objectSpread({},B0.type.defaultProps),B0.props):B0.props,Q0=F0.dataKey,U0=F0.maxBarSize,q0=F0["".concat(M0,"Id")],Rw=F0["".concat(N0,"Id")],_w={},J0=c0.reduce(function(p1,Pw){var Qw=y0["".concat(Pw.axisType,"Map")],Xw=F0["".concat(Pw.axisType,"Id")];Qw&&Qw[Xw]||Pw.axisType==="zAxis"||invariant();var f1=Qw[Xw];return _objectSpread(_objectSpread({},p1),{},_defineProperty(_defineProperty({},Pw.axisType,f1),"".concat(Pw.axisType,"Ticks"),getTicksOfAxis(f1)))},_w),Cw=J0[N0],Ow=J0["".concat(N0,"Ticks")],jw=E0&&E0[q0]&&E0[q0].hasStack&&getStackedDataOfItem(B0,E0[q0].stackGroups),Nw=getDisplayName(B0.type).indexOf("Bar")>=0,xw=getBandSizeOfAxis(Cw,Ow),X0=[],Lw=D0&&getBarSizeList({barSize:R0,stackGroups:E0,totalSize:getCartesianAxisSize(J0,N0)});if(Nw){var Hw,Ww,r1=isNil$1(U0)?T0:U0,Yw=(Hw=(Ww=getBandSizeOfAxis(Cw,Ow,!0))!==null&&Ww!==void 0?Ww:r1)!==null&&Hw!==void 0?Hw:0;X0=getBarPosition({barGap:C0,barCategoryGap:$0,bandSize:Yw!==xw?Yw:xw,sizeList:Lw[Rw],maxBarSize:r1}),Yw!==xw&&(X0=X0.map(function(p1){return _objectSpread(_objectSpread({},p1),{},{position:_objectSpread(_objectSpread({},p1.position),{},{offset:p1.position.offset-Yw/2})})}))}var l1=B0&&B0.type&&B0.type.getComposedData;l1&&O0.push({props:_objectSpread(_objectSpread({},l1(_objectSpread(_objectSpread({},J0),{},{displayedData:G0,props:g0,dataKey:Q0,item:B0,bandSize:xw,barPosition:X0,offset:w0,stackedData:jw,layout:j0,dataStartIndex:S0,dataEndIndex:k0}))),{},_defineProperty(_defineProperty(_defineProperty({key:B0.key||"item-".concat(z0)},M0,J0[M0]),N0,J0[N0]),"animationId",v0)),childIndex:parseChildIndex(B0,g0.children),item:B0})}),O0},p0=function(g0,y0){var b0=g0.props,E0=g0.dataStartIndex,w0=g0.dataEndIndex,v0=g0.updateId;if(!validateWidthHeight({props:b0}))return null;var S0=b0.children,k0=b0.layout,R0=b0.stackOffset,j0=b0.data,C0=b0.reverseStackOrder,$0=getAxisNameByLayout(k0),T0=$0.numericAxisName,I0=$0.cateAxisName,M0=findAllByType(S0,a0),N0=getStackGroupsByAxisId(j0,M0,"".concat(T0,"Id"),"".concat(I0,"Id"),R0,C0),D0=c0.reduce(function(F0,Q0){var U0="".concat(Q0.axisType,"Map");return _objectSpread(_objectSpread({},F0),{},_defineProperty({},U0,getAxisMap(b0,_objectSpread(_objectSpread({},Q0),{},{graphicalItems:M0,stackGroups:Q0.axisType===T0&&N0,dataStartIndex:E0,dataEndIndex:w0}))))},{}),O0=calculateOffset(_objectSpread(_objectSpread({},D0),{},{props:b0,graphicalItems:M0}),y0==null?void 0:y0.legendBBox);Object.keys(D0).forEach(function(F0){D0[F0]=d0(b0,D0[F0],O0,F0.replace("Map",""),n0)});var B0=D0["".concat(I0,"Map")],z0=tooltipTicksGenerator(B0),G0=f0(b0,_objectSpread(_objectSpread({},D0),{},{dataStartIndex:E0,dataEndIndex:w0,updateId:v0,graphicalItems:M0,stackGroups:N0,offset:O0}));return _objectSpread(_objectSpread({formattedGraphicalItems:G0,graphicalItems:M0,offset:O0,stackGroups:N0},z0),D0)},A0=function(x0){function g0(y0){var b0,E0,w0;return _classCallCheck(this,g0),w0=_callSuper(this,g0,[y0]),_defineProperty(w0,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_defineProperty(w0,"accessibilityManager",new AccessibilityManager),_defineProperty(w0,"handleLegendBBoxUpdate",function(v0){if(v0){var S0=w0.state,k0=S0.dataStartIndex,R0=S0.dataEndIndex,j0=S0.updateId;w0.setState(_objectSpread({legendBBox:v0},p0({props:w0.props,dataStartIndex:k0,dataEndIndex:R0,updateId:j0},_objectSpread(_objectSpread({},w0.state),{},{legendBBox:v0}))))}}),_defineProperty(w0,"handleReceiveSyncEvent",function(v0,S0,k0){if(w0.props.syncId===v0){if(k0===w0.eventEmitterSymbol&&typeof w0.props.syncMethod!="function")return;w0.applySyncEvent(S0)}}),_defineProperty(w0,"handleBrushChange",function(v0){var S0=v0.startIndex,k0=v0.endIndex;if(S0!==w0.state.dataStartIndex||k0!==w0.state.dataEndIndex){var R0=w0.state.updateId;w0.setState(function(){return _objectSpread({dataStartIndex:S0,dataEndIndex:k0},p0({props:w0.props,dataStartIndex:S0,dataEndIndex:k0,updateId:R0},w0.state))}),w0.triggerSyncEvent({dataStartIndex:S0,dataEndIndex:k0})}}),_defineProperty(w0,"handleMouseEnter",function(v0){var S0=w0.getMouseInfo(v0);if(S0){var k0=_objectSpread(_objectSpread({},S0),{},{isTooltipActive:!0});w0.setState(k0),w0.triggerSyncEvent(k0);var R0=w0.props.onMouseEnter;isFunction$3(R0)&&R0(k0,v0)}}),_defineProperty(w0,"triggeredAfterMouseMove",function(v0){var S0=w0.getMouseInfo(v0),k0=S0?_objectSpread(_objectSpread({},S0),{},{isTooltipActive:!0}):{isTooltipActive:!1};w0.setState(k0),w0.triggerSyncEvent(k0);var R0=w0.props.onMouseMove;isFunction$3(R0)&&R0(k0,v0)}),_defineProperty(w0,"handleItemMouseEnter",function(v0){w0.setState(function(){return{isTooltipActive:!0,activeItem:v0,activePayload:v0.tooltipPayload,activeCoordinate:v0.tooltipPosition||{x:v0.cx,y:v0.cy}}})}),_defineProperty(w0,"handleItemMouseLeave",function(){w0.setState(function(){return{isTooltipActive:!1}})}),_defineProperty(w0,"handleMouseMove",function(v0){v0.persist(),w0.throttleTriggeredAfterMouseMove(v0)}),_defineProperty(w0,"handleMouseLeave",function(v0){w0.throttleTriggeredAfterMouseMove.cancel();var S0={isTooltipActive:!1};w0.setState(S0),w0.triggerSyncEvent(S0);var k0=w0.props.onMouseLeave;isFunction$3(k0)&&k0(S0,v0)}),_defineProperty(w0,"handleOuterEvent",function(v0){var S0=getReactEventByType(v0),k0=get$2(w0.props,"".concat(S0));if(S0&&isFunction$3(k0)){var R0,j0;/.*touch.*/i.test(S0)?j0=w0.getMouseInfo(v0.changedTouches[0]):j0=w0.getMouseInfo(v0),k0((R0=j0)!==null&&R0!==void 0?R0:{},v0)}}),_defineProperty(w0,"handleClick",function(v0){var S0=w0.getMouseInfo(v0);if(S0){var k0=_objectSpread(_objectSpread({},S0),{},{isTooltipActive:!0});w0.setState(k0),w0.triggerSyncEvent(k0);var R0=w0.props.onClick;isFunction$3(R0)&&R0(k0,v0)}}),_defineProperty(w0,"handleMouseDown",function(v0){var S0=w0.props.onMouseDown;if(isFunction$3(S0)){var k0=w0.getMouseInfo(v0);S0(k0,v0)}}),_defineProperty(w0,"handleMouseUp",function(v0){var S0=w0.props.onMouseUp;if(isFunction$3(S0)){var k0=w0.getMouseInfo(v0);S0(k0,v0)}}),_defineProperty(w0,"handleTouchMove",function(v0){v0.changedTouches!=null&&v0.changedTouches.length>0&&w0.throttleTriggeredAfterMouseMove(v0.changedTouches[0])}),_defineProperty(w0,"handleTouchStart",function(v0){v0.changedTouches!=null&&v0.changedTouches.length>0&&w0.handleMouseDown(v0.changedTouches[0])}),_defineProperty(w0,"handleTouchEnd",function(v0){v0.changedTouches!=null&&v0.changedTouches.length>0&&w0.handleMouseUp(v0.changedTouches[0])}),_defineProperty(w0,"handleDoubleClick",function(v0){var S0=w0.props.onDoubleClick;if(isFunction$3(S0)){var k0=w0.getMouseInfo(v0);S0(k0,v0)}}),_defineProperty(w0,"handleContextMenu",function(v0){var S0=w0.props.onContextMenu;if(isFunction$3(S0)){var k0=w0.getMouseInfo(v0);S0(k0,v0)}}),_defineProperty(w0,"triggerSyncEvent",function(v0){w0.props.syncId!==void 0&&eventCenter.emit(SYNC_EVENT,w0.props.syncId,v0,w0.eventEmitterSymbol)}),_defineProperty(w0,"applySyncEvent",function(v0){var S0=w0.props,k0=S0.layout,R0=S0.syncMethod,j0=w0.state.updateId,C0=v0.dataStartIndex,$0=v0.dataEndIndex;if(v0.dataStartIndex!==void 0||v0.dataEndIndex!==void 0)w0.setState(_objectSpread({dataStartIndex:C0,dataEndIndex:$0},p0({props:w0.props,dataStartIndex:C0,dataEndIndex:$0,updateId:j0},w0.state)));else if(v0.activeTooltipIndex!==void 0){var T0=v0.chartX,I0=v0.chartY,M0=v0.activeTooltipIndex,N0=w0.state,D0=N0.offset,O0=N0.tooltipTicks;if(!D0)return;if(typeof R0=="function")M0=R0(O0,v0);else if(R0==="value"){M0=-1;for(var B0=0;B0<O0.length;B0++)if(O0[B0].value===v0.activeLabel){M0=B0;break}}var z0=_objectSpread(_objectSpread({},D0),{},{x:D0.left,y:D0.top}),G0=Math.min(T0,z0.x+z0.width),F0=Math.min(I0,z0.y+z0.height),Q0=O0[M0]&&O0[M0].value,U0=getTooltipContent(w0.state,w0.props.data,M0),q0=O0[M0]?{x:k0==="horizontal"?O0[M0].coordinate:G0,y:k0==="horizontal"?F0:O0[M0].coordinate}:originCoordinate;w0.setState(_objectSpread(_objectSpread({},v0),{},{activeLabel:Q0,activeCoordinate:q0,activePayload:U0,activeTooltipIndex:M0}))}else w0.setState(v0)}),_defineProperty(w0,"renderCursor",function(v0){var S0,k0=w0.state,R0=k0.isTooltipActive,j0=k0.activeCoordinate,C0=k0.activePayload,$0=k0.offset,T0=k0.activeTooltipIndex,I0=k0.tooltipAxisBandSize,M0=w0.getTooltipEventType(),N0=(S0=v0.props.active)!==null&&S0!==void 0?S0:R0,D0=w0.props.layout,O0=v0.key||"_recharts-cursor";return React__default.createElement(Cursor,{key:O0,activeCoordinate:j0,activePayload:C0,activeTooltipIndex:T0,chartName:n0,element:v0,isActive:N0,layout:D0,offset:$0,tooltipAxisBandSize:I0,tooltipEventType:M0})}),_defineProperty(w0,"renderPolarAxis",function(v0,S0,k0){var R0=get$2(v0,"type.axisType"),j0=get$2(w0.state,"".concat(R0,"Map")),C0=v0.type.defaultProps,$0=C0!==void 0?_objectSpread(_objectSpread({},C0),v0.props):v0.props,T0=j0&&j0[$0["".concat(R0,"Id")]];return reactExports.cloneElement(v0,_objectSpread(_objectSpread({},T0),{},{className:clsx(R0,T0.className),key:v0.key||"".concat(S0,"-").concat(k0),ticks:getTicksOfAxis(T0,!0)}))}),_defineProperty(w0,"renderPolarGrid",function(v0){var S0=v0.props,k0=S0.radialLines,R0=S0.polarAngles,j0=S0.polarRadius,C0=w0.state,$0=C0.radiusAxisMap,T0=C0.angleAxisMap,I0=getAnyElementOfObject($0),M0=getAnyElementOfObject(T0),N0=M0.cx,D0=M0.cy,O0=M0.innerRadius,B0=M0.outerRadius;return reactExports.cloneElement(v0,{polarAngles:Array.isArray(R0)?R0:getTicksOfAxis(M0,!0).map(function(z0){return z0.coordinate}),polarRadius:Array.isArray(j0)?j0:getTicksOfAxis(I0,!0).map(function(z0){return z0.coordinate}),cx:N0,cy:D0,innerRadius:O0,outerRadius:B0,key:v0.key||"polar-grid",radialLines:k0})}),_defineProperty(w0,"renderLegend",function(){var v0=w0.state.formattedGraphicalItems,S0=w0.props,k0=S0.children,R0=S0.width,j0=S0.height,C0=w0.props.margin||{},$0=R0-(C0.left||0)-(C0.right||0),T0=getLegendProps({children:k0,formattedGraphicalItems:v0,legendWidth:$0,legendContent:u0});if(!T0)return null;var I0=T0.item,M0=_objectWithoutProperties(T0,_excluded);return reactExports.cloneElement(I0,_objectSpread(_objectSpread({},M0),{},{chartWidth:R0,chartHeight:j0,margin:C0,onBBoxUpdate:w0.handleLegendBBoxUpdate}))}),_defineProperty(w0,"renderTooltip",function(){var v0,S0=w0.props,k0=S0.children,R0=S0.accessibilityLayer,j0=findChildByType(k0,Tooltip);if(!j0)return null;var C0=w0.state,$0=C0.isTooltipActive,T0=C0.activeCoordinate,I0=C0.activePayload,M0=C0.activeLabel,N0=C0.offset,D0=(v0=j0.props.active)!==null&&v0!==void 0?v0:$0;return reactExports.cloneElement(j0,{viewBox:_objectSpread(_objectSpread({},N0),{},{x:N0.left,y:N0.top}),active:D0,label:M0,payload:D0?I0:[],coordinate:T0,accessibilityLayer:R0})}),_defineProperty(w0,"renderBrush",function(v0){var S0=w0.props,k0=S0.margin,R0=S0.data,j0=w0.state,C0=j0.offset,$0=j0.dataStartIndex,T0=j0.dataEndIndex,I0=j0.updateId;return reactExports.cloneElement(v0,{key:v0.key||"_recharts-brush",onChange:combineEventHandlers(w0.handleBrushChange,v0.props.onChange),data:R0,x:isNumber$1(v0.props.x)?v0.props.x:C0.left,y:isNumber$1(v0.props.y)?v0.props.y:C0.top+C0.height+C0.brushBottom-(k0.bottom||0),width:isNumber$1(v0.props.width)?v0.props.width:C0.width,startIndex:$0,endIndex:T0,updateId:"brush-".concat(I0)})}),_defineProperty(w0,"renderReferenceElement",function(v0,S0,k0){if(!v0)return null;var R0=w0,j0=R0.clipPathId,C0=w0.state,$0=C0.xAxisMap,T0=C0.yAxisMap,I0=C0.offset,M0=v0.type.defaultProps||{},N0=v0.props,D0=N0.xAxisId,O0=D0===void 0?M0.xAxisId:D0,B0=N0.yAxisId,z0=B0===void 0?M0.yAxisId:B0;return reactExports.cloneElement(v0,{key:v0.key||"".concat(S0,"-").concat(k0),xAxis:$0[O0],yAxis:T0[z0],viewBox:{x:I0.left,y:I0.top,width:I0.width,height:I0.height},clipPathId:j0})}),_defineProperty(w0,"renderActivePoints",function(v0){var S0=v0.item,k0=v0.activePoint,R0=v0.basePoint,j0=v0.childIndex,C0=v0.isRange,$0=[],T0=S0.props.key,I0=S0.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},S0.item.type.defaultProps),S0.item.props):S0.item.props,M0=I0.activeDot,N0=I0.dataKey,D0=_objectSpread(_objectSpread({index:j0,dataKey:N0,cx:k0.x,cy:k0.y,r:4,fill:getMainColorOfGraphicItem(S0.item),strokeWidth:2,stroke:"#fff",payload:k0.payload,value:k0.value},filterProps(M0,!1)),adaptEventHandlers(M0));return $0.push(g0.renderActiveDot(M0,D0,"".concat(T0,"-activePoint-").concat(j0))),R0?$0.push(g0.renderActiveDot(M0,_objectSpread(_objectSpread({},D0),{},{cx:R0.x,cy:R0.y}),"".concat(T0,"-basePoint-").concat(j0))):C0&&$0.push(null),$0}),_defineProperty(w0,"renderGraphicChild",function(v0,S0,k0){var R0=w0.filterFormatItem(v0,S0,k0);if(!R0)return null;var j0=w0.getTooltipEventType(),C0=w0.state,$0=C0.isTooltipActive,T0=C0.tooltipAxis,I0=C0.activeTooltipIndex,M0=C0.activeLabel,N0=w0.props.children,D0=findChildByType(N0,Tooltip),O0=R0.props,B0=O0.points,z0=O0.isRange,G0=O0.baseLine,F0=R0.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},R0.item.type.defaultProps),R0.item.props):R0.item.props,Q0=F0.activeDot,U0=F0.hide,q0=F0.activeBar,Rw=F0.activeShape,_w=!!(!U0&&$0&&D0&&(Q0||q0||Rw)),J0={};j0!=="axis"&&D0&&D0.props.trigger==="click"?J0={onClick:combineEventHandlers(w0.handleItemMouseEnter,v0.props.onClick)}:j0!=="axis"&&(J0={onMouseLeave:combineEventHandlers(w0.handleItemMouseLeave,v0.props.onMouseLeave),onMouseEnter:combineEventHandlers(w0.handleItemMouseEnter,v0.props.onMouseEnter)});var Cw=reactExports.cloneElement(v0,_objectSpread(_objectSpread({},R0.props),J0));function Ow(Pw){return typeof T0.dataKey=="function"?T0.dataKey(Pw.payload):null}if(_w)if(I0>=0){var jw,Nw;if(T0.dataKey&&!T0.allowDuplicatedCategory){var xw=typeof T0.dataKey=="function"?Ow:"payload.".concat(T0.dataKey.toString());jw=findEntryInArray(B0,xw,M0),Nw=z0&&G0&&findEntryInArray(G0,xw,M0)}else jw=B0==null?void 0:B0[I0],Nw=z0&&G0&&G0[I0];if(Rw||q0){var X0=v0.props.activeIndex!==void 0?v0.props.activeIndex:I0;return[reactExports.cloneElement(v0,_objectSpread(_objectSpread(_objectSpread({},R0.props),J0),{},{activeIndex:X0})),null,null]}if(!isNil$1(jw))return[Cw].concat(_toConsumableArray(w0.renderActivePoints({item:R0,activePoint:jw,basePoint:Nw,childIndex:I0,isRange:z0})))}else{var Lw,Hw=(Lw=w0.getItemByXY(w0.state.activeCoordinate))!==null&&Lw!==void 0?Lw:{graphicalItem:Cw},Ww=Hw.graphicalItem,r1=Ww.item,Yw=r1===void 0?v0:r1,l1=Ww.childIndex,p1=_objectSpread(_objectSpread(_objectSpread({},R0.props),J0),{},{activeIndex:l1});return[reactExports.cloneElement(Yw,p1),null,null]}return z0?[Cw,null,null]:[Cw,null]}),_defineProperty(w0,"renderCustomized",function(v0,S0,k0){return reactExports.cloneElement(v0,_objectSpread(_objectSpread({key:"recharts-customized-".concat(k0)},w0.props),w0.state))}),_defineProperty(w0,"renderMap",{CartesianGrid:{handler:renderAsIs,once:!0},ReferenceArea:{handler:w0.renderReferenceElement},ReferenceLine:{handler:renderAsIs},ReferenceDot:{handler:w0.renderReferenceElement},XAxis:{handler:renderAsIs},YAxis:{handler:renderAsIs},Brush:{handler:w0.renderBrush,once:!0},Bar:{handler:w0.renderGraphicChild},Line:{handler:w0.renderGraphicChild},Area:{handler:w0.renderGraphicChild},Radar:{handler:w0.renderGraphicChild},RadialBar:{handler:w0.renderGraphicChild},Scatter:{handler:w0.renderGraphicChild},Pie:{handler:w0.renderGraphicChild},Funnel:{handler:w0.renderGraphicChild},Tooltip:{handler:w0.renderCursor,once:!0},PolarGrid:{handler:w0.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w0.renderPolarAxis},PolarRadiusAxis:{handler:w0.renderPolarAxis},Customized:{handler:w0.renderCustomized}}),w0.clipPathId="".concat((b0=y0.id)!==null&&b0!==void 0?b0:uniqueId("recharts"),"-clip"),w0.throttleTriggeredAfterMouseMove=throttle$1(w0.triggeredAfterMouseMove,(E0=y0.throttleDelay)!==null&&E0!==void 0?E0:1e3/60),w0.state={},w0}return _inherits(g0,x0),_createClass(g0,[{key:"componentDidMount",value:function(){var b0,E0;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b0=this.props.margin.left)!==null&&b0!==void 0?b0:0,top:(E0=this.props.margin.top)!==null&&E0!==void 0?E0:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b0=this.props,E0=b0.children,w0=b0.data,v0=b0.height,S0=b0.layout,k0=findChildByType(E0,Tooltip);if(k0){var R0=k0.props.defaultIndex;if(!(typeof R0!="number"||R0<0||R0>this.state.tooltipTicks.length-1)){var j0=this.state.tooltipTicks[R0]&&this.state.tooltipTicks[R0].value,C0=getTooltipContent(this.state,w0,R0,j0),$0=this.state.tooltipTicks[R0].coordinate,T0=(this.state.offset.top+v0)/2,I0=S0==="horizontal",M0=I0?{x:$0,y:T0}:{y:$0,x:T0},N0=this.state.formattedGraphicalItems.find(function(O0){var B0=O0.item;return B0.type.name==="Scatter"});N0&&(M0=_objectSpread(_objectSpread({},M0),N0.props.points[R0].tooltipPosition),C0=N0.props.points[R0].tooltipPayload);var D0={activeTooltipIndex:R0,isTooltipActive:!0,activeLabel:j0,activePayload:C0,activeCoordinate:M0};this.setState(D0),this.renderCursor(k0),this.accessibilityManager.setIndex(R0)}}}},{key:"getSnapshotBeforeUpdate",value:function(b0,E0){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E0.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b0.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b0.margin){var w0,v0;this.accessibilityManager.setDetails({offset:{left:(w0=this.props.margin.left)!==null&&w0!==void 0?w0:0,top:(v0=this.props.margin.top)!==null&&v0!==void 0?v0:0}})}return null}},{key:"componentDidUpdate",value:function(b0){isChildrenEqual([findChildByType(b0.children,Tooltip)],[findChildByType(this.props.children,Tooltip)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b0=findChildByType(this.props.children,Tooltip);if(b0&&typeof b0.props.shared=="boolean"){var E0=b0.props.shared?"axis":"item";return l0.indexOf(E0)>=0?E0:s0}return s0}},{key:"getMouseInfo",value:function(b0){if(!this.container)return null;var E0=this.container,w0=E0.getBoundingClientRect(),v0=getOffset(w0),S0={chartX:Math.round(b0.pageX-v0.left),chartY:Math.round(b0.pageY-v0.top)},k0=w0.width/E0.offsetWidth||1,R0=this.inRange(S0.chartX,S0.chartY,k0);if(!R0)return null;var j0=this.state,C0=j0.xAxisMap,$0=j0.yAxisMap,T0=this.getTooltipEventType(),I0=getTooltipData(this.state,this.props.data,this.props.layout,R0);if(T0!=="axis"&&C0&&$0){var M0=getAnyElementOfObject(C0).scale,N0=getAnyElementOfObject($0).scale,D0=M0&&M0.invert?M0.invert(S0.chartX):null,O0=N0&&N0.invert?N0.invert(S0.chartY):null;return _objectSpread(_objectSpread({},S0),{},{xValue:D0,yValue:O0},I0)}return I0?_objectSpread(_objectSpread({},S0),I0):null}},{key:"inRange",value:function(b0,E0){var w0=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v0=this.props.layout,S0=b0/w0,k0=E0/w0;if(v0==="horizontal"||v0==="vertical"){var R0=this.state.offset,j0=S0>=R0.left&&S0<=R0.left+R0.width&&k0>=R0.top&&k0<=R0.top+R0.height;return j0?{x:S0,y:k0}:null}var C0=this.state,$0=C0.angleAxisMap,T0=C0.radiusAxisMap;if($0&&T0){var I0=getAnyElementOfObject($0);return inRangeOfSector({x:S0,y:k0},I0)}return null}},{key:"parseEventsOfWrapper",value:function(){var b0=this.props.children,E0=this.getTooltipEventType(),w0=findChildByType(b0,Tooltip),v0={};w0&&E0==="axis"&&(w0.props.trigger==="click"?v0={onClick:this.handleClick}:v0={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S0=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread(_objectSpread({},S0),v0)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b0,E0,w0){for(var v0=this.state.formattedGraphicalItems,S0=0,k0=v0.length;S0<k0;S0++){var R0=v0[S0];if(R0.item===b0||R0.props.key===b0.key||E0===getDisplayName(R0.item.type)&&w0===R0.childIndex)return R0}return null}},{key:"renderClipPath",value:function(){var b0=this.clipPathId,E0=this.state.offset,w0=E0.left,v0=E0.top,S0=E0.height,k0=E0.width;return React__default.createElement("defs",null,React__default.createElement("clipPath",{id:b0},React__default.createElement("rect",{x:w0,y:v0,height:S0,width:k0})))}},{key:"getXScales",value:function(){var b0=this.state.xAxisMap;return b0?Object.entries(b0).reduce(function(E0,w0){var v0=_slicedToArray(w0,2),S0=v0[0],k0=v0[1];return _objectSpread(_objectSpread({},E0),{},_defineProperty({},S0,k0.scale))},{}):null}},{key:"getYScales",value:function(){var b0=this.state.yAxisMap;return b0?Object.entries(b0).reduce(function(E0,w0){var v0=_slicedToArray(w0,2),S0=v0[0],k0=v0[1];return _objectSpread(_objectSpread({},E0),{},_defineProperty({},S0,k0.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b0){var E0;return(E0=this.state.xAxisMap)===null||E0===void 0||(E0=E0[b0])===null||E0===void 0?void 0:E0.scale}},{key:"getYScaleByAxisId",value:function(b0){var E0;return(E0=this.state.yAxisMap)===null||E0===void 0||(E0=E0[b0])===null||E0===void 0?void 0:E0.scale}},{key:"getItemByXY",value:function(b0){var E0=this.state,w0=E0.formattedGraphicalItems,v0=E0.activeItem;if(w0&&w0.length)for(var S0=0,k0=w0.length;S0<k0;S0++){var R0=w0[S0],j0=R0.props,C0=R0.item,$0=C0.type.defaultProps!==void 0?_objectSpread(_objectSpread({},C0.type.defaultProps),C0.props):C0.props,T0=getDisplayName(C0.type);if(T0==="Bar"){var I0=(j0.data||[]).find(function(O0){return isInRectangle(b0,O0)});if(I0)return{graphicalItem:R0,payload:I0}}else if(T0==="RadialBar"){var M0=(j0.data||[]).find(function(O0){return inRangeOfSector(b0,O0)});if(M0)return{graphicalItem:R0,payload:M0}}else if(isFunnel(R0,v0)||isPie(R0,v0)||isScatter(R0,v0)){var N0=getActiveShapeIndexForTooltip({graphicalItem:R0,activeTooltipItem:v0,itemData:$0.data}),D0=$0.activeIndex===void 0?N0:$0.activeIndex;return{graphicalItem:_objectSpread(_objectSpread({},R0),{},{childIndex:D0}),payload:isScatter(R0,v0)?$0.data[N0]:R0.props.data[N0]}}}return null}},{key:"render",value:function(){var b0=this;if(!validateWidthHeight(this))return null;var E0=this.props,w0=E0.children,v0=E0.className,S0=E0.width,k0=E0.height,R0=E0.style,j0=E0.compact,C0=E0.title,$0=E0.desc,T0=_objectWithoutProperties(E0,_excluded2),I0=filterProps(T0,!1);if(j0)return React__default.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React__default.createElement(Surface,_extends({},I0,{width:S0,height:k0,title:C0,desc:$0}),this.renderClipPath(),renderByOrder(w0,this.renderMap)));if(this.props.accessibilityLayer){var M0,N0;I0.tabIndex=(M0=this.props.tabIndex)!==null&&M0!==void 0?M0:0,I0.role=(N0=this.props.role)!==null&&N0!==void 0?N0:"application",I0.onKeyDown=function(O0){b0.accessibilityManager.keyboardEvent(O0)},I0.onFocus=function(){b0.accessibilityManager.focus()}}var D0=this.parseEventsOfWrapper();return React__default.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React__default.createElement("div",_extends({className:clsx("recharts-wrapper",v0),style:_objectSpread({position:"relative",cursor:"default",width:S0,height:k0},R0)},D0,{ref:function(B0){b0.container=B0}}),React__default.createElement(Surface,_extends({},I0,{width:S0,height:k0,title:C0,desc:$0,style:FULL_WIDTH_AND_HEIGHT}),this.renderClipPath(),renderByOrder(w0,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(reactExports.Component);_defineProperty(A0,"displayName",n0),_defineProperty(A0,"defaultProps",_objectSpread({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h0)),_defineProperty(A0,"getDerivedStateFromProps",function(x0,g0){var y0=x0.dataKey,b0=x0.data,E0=x0.children,w0=x0.width,v0=x0.height,S0=x0.layout,k0=x0.stackOffset,R0=x0.margin,j0=g0.dataStartIndex,C0=g0.dataEndIndex;if(g0.updateId===void 0){var $0=createDefaultState(x0);return _objectSpread(_objectSpread(_objectSpread({},$0),{},{updateId:0},p0(_objectSpread(_objectSpread({props:x0},$0),{},{updateId:0}),g0)),{},{prevDataKey:y0,prevData:b0,prevWidth:w0,prevHeight:v0,prevLayout:S0,prevStackOffset:k0,prevMargin:R0,prevChildren:E0})}if(y0!==g0.prevDataKey||b0!==g0.prevData||w0!==g0.prevWidth||v0!==g0.prevHeight||S0!==g0.prevLayout||k0!==g0.prevStackOffset||!shallowEqual(R0,g0.prevMargin)){var T0=createDefaultState(x0),I0={chartX:g0.chartX,chartY:g0.chartY,isTooltipActive:g0.isTooltipActive},M0=_objectSpread(_objectSpread({},getTooltipData(g0,b0,S0)),{},{updateId:g0.updateId+1}),N0=_objectSpread(_objectSpread(_objectSpread({},T0),I0),M0);return _objectSpread(_objectSpread(_objectSpread({},N0),p0(_objectSpread({props:x0},N0),g0)),{},{prevDataKey:y0,prevData:b0,prevWidth:w0,prevHeight:v0,prevLayout:S0,prevStackOffset:k0,prevMargin:R0,prevChildren:E0})}if(!isChildrenEqual(E0,g0.prevChildren)){var D0,O0,B0,z0,G0=findChildByType(E0,Brush),F0=G0&&(D0=(O0=G0.props)===null||O0===void 0?void 0:O0.startIndex)!==null&&D0!==void 0?D0:j0,Q0=G0&&(B0=(z0=G0.props)===null||z0===void 0?void 0:z0.endIndex)!==null&&B0!==void 0?B0:C0,U0=F0!==j0||Q0!==C0,q0=!isNil$1(b0),Rw=q0&&!U0?g0.updateId:g0.updateId+1;return _objectSpread(_objectSpread({updateId:Rw},p0(_objectSpread(_objectSpread({props:x0},g0),{},{updateId:Rw,dataStartIndex:F0,dataEndIndex:Q0}),g0)),{},{prevChildren:E0,dataStartIndex:F0,dataEndIndex:Q0})}return null}),_defineProperty(A0,"renderActiveDot",function(x0,g0,y0){var b0;return reactExports.isValidElement(x0)?b0=reactExports.cloneElement(x0,g0):isFunction$3(x0)?b0=x0(g0):b0=React__default.createElement(Dot,g0),React__default.createElement(Layer,{className:"recharts-active-dot",ke
720y:y0},b0)});var m0=reactExports.forwardRef(function(g0,y0){return React__default.createElement(A0,_extends({},g0,{ref:y0}))});return m0.displayName=A0.displayName,m0},PieChart=generateCategoricalChart({chartName:"PieChart",GraphicalChild:Pie,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:PolarAngleAxis},{axisType:"radiusAxis",AxisComp:PolarRadiusAxis}],formatAxisMap,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function StatisticsView({songs:r0}){const e0=reactExports.useMemo(()=>{const i0=r0.length,s0=r0.filter(f0=>f0.status==="available").length,o0=r0.filter(f0=>f0.status==="cut").length,l0=r0.filter(f0=>f0.status==="on-hold").length,c0={};r0.forEach(f0=>{(f0.genres||(f0.genre?[f0.genre]:[])).forEach(A0=>{c0[A0]=(c0[A0]||0)+1})});const u0=Object.values(c0).reduce((f0,p0)=>f0+p0,0),d0=Object.entries(c0).map(([f0,p0])=>({genre:f0,count:p0,percentage:u0>0?p0/u0*100:0})).sort((f0,p0)=>p0.count-f0.count),h0=[{name:"Available",value:s0,color:"#22c55e"},{name:"Cut / Sold",value:o0,color:"#a855f7"},{name:"On Hold",value:l0,color:"#f97316"}].filter(f0=>f0.value>0);return{total:i0,available:s0,cut:o0,onHold:l0,genreBreakdown:d0,statusData:h0,totalGenreOccurrences:u0}},[r0]),n0=["#3b82f6","#ec4899","#eab308","#22c55e","#a855f7","#f97316","#06b6d4","#ef4444","#8b5cf6","#14b8a6"],a0=e0.genreBreakdown.slice(0,8).map((i0,s0)=>({name:i0.genre,value:i0.count,color:n0[s0%n0.length],percentage:i0.percentage}));return jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:"p-6 border-b border-border text-center",children:jsxRuntimeExports.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Insights"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-8",children:[jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-foreground mb-4 text-center",children:"Song Status"}),e0.total>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-64",children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntimeExports.jsxs(PieChart,{children:[jsxRuntimeExports.jsx(Pie,{data:e0.statusData,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:4,dataKey:"value",strokeWidth:0,children:e0.statusData.map((i0,s0)=>jsxRuntimeExports.jsx(Cell,{fill:i0.color},`cell-${s0}`))}),jsxRuntimeExports.jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",color:"hsl(var(--foreground))"},formatter:i0=>[i0,"Songs"]})]})})}),jsxRuntimeExports.jsx("div",{className:"flex justify-center gap-6 mt-4",children:e0.statusData.map(i0=>jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i0.color}}),jsxRuntimeExports.jsx("span",{className:"text-sm text-muted-foreground",children:i0.name}),jsxRuntimeExports.jsx("span",{className:"text-sm font-semibold text-foreground",children:i0.value})]},i0.name))}),jsxRuntimeExports.jsxs("div",{className:"text-center mt-4 pt-4 border-t border-border",children:[jsxRuntimeExports.jsx("p",{className:"text-3xl font-bold text-foreground",children:e0.total}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Total Songs"})]})]}):jsxRuntimeExports.jsx("div",{className:"h-64 flex items-center justify-center",children:jsxRuntimeExports.jsx("p",{className:"text-muted-foreground",children:"Upload songs to see statistics"})})]}),jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-foreground mb-4 text-center",children:"Genre Distribution"}),a0.length>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-64",children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntimeExports.jsxs(PieChart,{children:[jsxRuntimeExports.jsx(Pie,{data:a0,cx:"50%",cy:"50%",outerRadius:90,paddingAngle:2,dataKey:"value",strokeWidth:0,children:a0.map((i0,s0)=>jsxRuntimeExports.jsx(Cell,{fill:i0.color},`cell-${s0}`))}),jsxRuntimeExports.jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px",color:"hsl(var(--foreground))"},formatter:(i0,s0)=>[`${i0} (${(i0/e0.totalGenreOccurrences*100).toFixed(0)}%)`,s0]})]})})}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 gap-2 mt-4 pt-4 border-t border-border",children:a0.map(i0=>jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between py-1.5 px-2 rounded-lg hover:bg-muted/50 transition-colors",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:i0.color}}),jsxRuntimeExports.jsx("span",{className:"text-sm text-foreground",children:i0.name})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:i0.value}),jsxRuntimeExports.jsxs("span",{className:"text-xs font-medium text-foreground w-10 text-right",children:[i0.percentage.toFixed(0),"%"]})]})]},i0.name))})]}):jsxRuntimeExports.jsx("div",{className:"h-64 flex items-center justify-center",children:jsxRuntimeExports.jsx("p",{className:"text-muted-foreground",children:"Upload songs to see genre statistics"})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 text-center",children:[jsxRuntimeExports.jsx(Music,{className:"w-5 h-5 text-muted-foreground mx-auto mb-2"}),jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold text-foreground",children:e0.total}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Songs"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 text-center",children:[jsxRuntimeExports.jsx(TrendingUp,{className:"w-5 h-5 text-green-500 mx-auto mb-2"}),jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold text-foreground",children:e0.available}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Available"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 text-center",children:[jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 h-5 text-purple-500 mx-auto mb-2"}),jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold text-foreground",children:e0.cut}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Cut"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 text-center",children:[jsxRuntimeExports.jsx(Clock,{className:"w-5 h-5 text-orange-500 mx-auto mb-2"}),jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold text-foreground",children:e0.onHold}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"On Hold"})]})]})]})]})}function useSongwriters(){const{session:r0}=useAuth(),[e0,n0]=reactExports.useState([]),[a0,i0]=reactExports.useState([]),[s0,o0]=reactExports.useState(!1),l0=reactExports.useCallback(async()=>
720{if(r0){o0(!0);try{const{data:x0,error:g0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"list"}});if(g0)throw g0;if(x0.error)throw new Error(x0.error);n0(x0.data||[])}catch(x0){console.error("Failed to fetch songwriters:",x0),ue$2.error("Failed to load songwriters")}finally{o0(!1)}}},[r0]),c0=reactExports.useCallback(async()=>{if(r0)try{const{data:x0,error:g0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"list-invites"}});if(g0)throw g0;if(x0.error)throw new Error(x0.error);i0(x0.data||[])}catch(x0){console.error("Failed to fetch invites:",x0)}},[r0]),u0=reactExports.useCallback(async x0=>{if(!r0)return null;try{const{data:g0,error:y0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"invite",email:x0}});if(y0)throw y0;if(g0.error)throw new Error(g0.error);return ue$2.success("Invitation sent"),await c0(),g0.inviteLink}catch(g0){return console.error("Failed to invite songwriter:",g0),ue$2.error(g0.message||"Failed to send invitation"),null}},[r0,c0]),d0=reactExports.useCallback(async x0=>{if(r0)try{const{data:g0,error:y0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"revoke",inviteId:x0}});if(y0)throw y0;if(g0.error)throw new Error(g0.error);ue$2.success("Invitation revoked"),await c0()}catch(g0){console.error("Failed to revoke invite:",g0),ue$2.error(g0.message||"Failed to revoke invitation")}},[r0,c0]),h0=reactExports.useCallback(async x0=>{if(r0)try{const{data:g0,error:y0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"delete",songwriterId:x0}});if(y0)throw y0;if(g0.error)throw new Error(g0.error);ue$2.success("Songwriter removed"),await l0()}catch(g0){console.error("Failed to remove songwriter:",g0),ue$2.error(g0.message||"Failed to remove songwriter")}},[r0,l0]),f0=reactExports.useCallback(async(x0,g0,y0="writer")=>{if(r0)try{const{data:b0,error:E0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"tag-song",songId:x0,songwriterId:g0,role:y0}});if(E0)throw E0;if(b0.error)throw new Error(b0.error);ue$2.success("Songwriter tagged")}catch(b0){console.error("Failed to tag songwriter:",b0),ue$2.error(b0.message||"Failed to tag songwriter")}},[r0]),p0=reactExports.useCallback(async(x0,g0)=>{if(r0)try{const{data:y0,error:b0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"untag-song",songId:x0,songwriterId:g0}});if(b0)throw b0;if(y0.error)throw new Error(y0.error);ue$2.success("Songwriter untagged")}catch(y0){console.error("Failed to untag songwriter:",y0),ue$2.error(y0.message||"Failed to untag songwriter")}},[r0]),A0=reactExports.useCallback(async x0=>{if(!r0)return[];try{const{data:g0,error:y0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"get-song-writers",songId:x0}});if(y0)throw y0;if(g0.error)throw new Error(g0.error);return g0.data||[]}catch(g0){return console.error("Failed to get song writers:",g0),[]}},[r0]),m0=reactExports.useCallback(async(x0,g0,y0="writer")=>{if(!r0)return!1;try{const{data:b0,error:E0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"bulk-tag-songs",songIds:x0,songwriterId:g0,role:y0}});if(E0)throw E0;if(b0.error)throw new Error(b0.error);return ue$2.success(`Shared with songwriter (${b0.taggedCount} songs)`),!0}catch(b0){return console.error("Failed to bulk tag songwriter:",b0),ue$2.error(b0.message||"Failed to share songs with songwriter"),!1}},[r0]);return{songwriters:e0,invites:a0,isLoading:s0,fetchSongwriters:l0,fetchInvites:c0,inviteSongwriter:u0,revokeInvite:d0,removeSongwriter:h0,tagSongwriter:f0,untagSongwriter:p0,getSongWriters:A0,bulkTagSongwriter:m0}}const Table=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntimeExports.jsx("table",{ref:n0,className:cn$1("w-full caption-bottom text-sm",r0),...e0})}));Table.displayName="Table";const TableHeader=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("thead",{ref:n0,className:cn$1("[&_tr]:border-b",r0),...e0}));TableHeader.displayName="TableHeader";const TableBody=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("tbody",{ref:n0,className:cn$1("[&_tr:last-child]:border-0",r0),...e0}));TableBody.displayName="TableBody";const TableFooter=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("tfoot",{ref:n0,className:cn$1("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r0),...e0}));TableFooter.displayName="TableFooter";const TableRow=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("tr",{ref:n0,className:cn$1("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",r0),...e0}));TableRow.displayName="TableRow";const TableHead=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("th",{ref:n0,className:cn$1("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r0),...e0}));TableHead.displayName="TableHead";const TableCell=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("td",{ref:n0,className:cn$1("p-4 align-middle [&:has([role=checkbox])]:pr-0",r0),...e0}));TableCell.displayName="TableCell";const TableCaption=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("caption",{ref:n0,className:cn$1("mt-4 text-sm text-muted-foreground",r0),...e0}));TableCaption.displayName="TableCaption";const SUPABASE_URL$3="https://unfpdgrtnhbfxinuktue.supabase.co";function WriterDirectory({songwriters:r0,onRefresh:e0}){const{toast:n0}=useToast(),[a0,i0]=reactExports.useState([]),[s0,o0]=reactExports.useState(!0),[l0,c0]=reactExports.useState(""),[u0,d0]=reactExports.useState(!1),[h0,f0]=reactExports.useState(null),[p0,A0]=reactExports.useState(""),[m0,x0]=reactExports.useState(!1),[g0,y0]=reactExports.useState(null),b0=reactExports.useCallback(async()=>{o0(!0);try{const{data:{session:C0}}=await supabase.auth.getSession();if(!(C0!=null&&C0.access_token))return;const $0=await fetch(`${SUPABASE_URL$3}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${C0.access_token}`},body:JSON.stringify({action:"list-directory",table:"confirmed_writers"})}),T0=await $0.json();if($0.ok&&T0.success)i0(T0.data||[]);else throw new Error(T0.error||"Failed to load directory")}catch(C0){console.error("Failed to fetch writer directory:",C0),n0({title:"Error",description:"Failed to load writer directory",variant:"destructive"})}finally{o0(!1)}},[n0]);reactExports.useEffect(()=>{b0()},[b0]);const E0=C0=>{f0(C0),A0(""),d0(!0)},w0=async()=>
720{if(!(!h0||!p0)){x0(!0);try{const{data:{session:C0}}=await supabase.auth.getSession();if(!(C0!=null&&C0.access_token))return;const $0=await fetch(`${SUPABASE_URL$3}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${C0.access_token}`},body:JSON.stringify({action:"link-writer",table:"confirmed_writers",writerId:h0.id,songwriterId:p0})}),T0=await $0.json();if($0.ok&&T0.success)n0({title:"Writer linked",description:`Linked "${h0.name}" and synced ${T0.linkedSongsCount} songs`}),d0(!1),b0(),e0==null||e0();else throw new Error(T0.error||"Failed to link")}catch(C0){n0({title:"Error",description:C0.message||"Failed to link writer",variant:"destructive"})}finally{x0(!1)}}},v0=async C0=>{try{const{data:{session:$0}}=await supabase.auth.getSession();if(!($0!=null&&$0.access_token))return;const T0=await fetch(`${SUPABASE_URL$3}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${$0.access_token}`},body:JSON.stringify({action:"unlink-writer",table:"confirmed_writers",writerId:C0.id})}),I0=await T0.json();if(T0.ok&&I0.success)n0({title:"Writer unlinked",description:`"${C0.name}" is no longer linked to a profile`}),b0();else throw new Error(I0.error||"Failed to unlink")}catch($0){n0({title:"Error",description:$0.message||"Failed to unlink writer",variant:"destructive"})}},S0=async C0=>{y0(C0.id);try{const{data:{session:$0}}=await supabase.auth.getSession();if(!($0!=null&&$0.access_token))return;const T0=await fetch(`${SUPABASE_URL$3}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${$0.access_token}`},body:JSON.stringify({action:"sync-writer",table:"confirmed_writers",writerId:C0.id})}),I0=await T0.json();if(T0.ok&&I0.success)n0({title:"Songs synced",description:`Synced ${I0.syncedCount} songs for "${C0.name}"`}),e0==null||e0();else throw new Error(I0.error||"Failed to sync")}catch($0){n0({title:"Error",description:$0.message||"Failed to sync songs",variant:"destructive"})}finally{y0(null)}},k0=a0.filter(C0=>C0.name.toLowerCase().includes(l0.toLowerCase())),R0=new Set(a0.filter(C0=>C0.songwriterId).map(C0=>C0.songwriterId)),j0=r0.filter(C0=>C0.is_active);return jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),jsxRuntimeExports.jsx(Input,{placeholder:"Search writers...",value:l0,onChange:C0=>c0(C0.target.value),className:"pl-9"})]}),jsxRuntimeExports.jsxs(Badge,{variant:"secondary",children:[a0.length," writers"]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:b0,disabled:s0,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${s0?"animate-spin":""}`})})]}),jsxRuntimeExports.jsx("div",{className:"border rounded-lg",children:jsxRuntimeExports.jsx(ScrollArea,{className:"h-[400px]",children:jsxRuntimeExports.jsxs(Table,{children:[jsxRuntimeExports.jsx(TableHeader,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableHead,{children:"Writer Name"}),jsxRuntimeExports.jsx(TableHead,{children:"Linked Profile"}),jsxRuntimeExports.jsx(TableHead,{className:"text-center",children:"Songs"}),jsxRuntimeExports.jsx(TableHead,{className:"text-right",children:"Actions"})]})}),jsxRuntimeExports.jsx(TableBody,{children:k0.length===0?jsxRuntimeExports.jsx(TableRow,{children:jsxRuntimeExports.jsx(TableCell,{colSpan:4,className:"text-center py-8 text-muted-foreground",children:s0?"Loading...":l0?"No matching writers":"No writers in directory"})}):k0.map(C0=>jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{className:"font-medium",children:C0.name}),jsxRuntimeExports.jsx(TableCell,{children:C0.linkedProfile?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Check,{className:"w-4 h-4 text-green-500"}),jsxRuntimeExports.jsx("span",{children:C0.linkedProfile.display_name})]}):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"â"})}),jsxRuntimeExports.jsx(TableCell,{className:"text-center",children:jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:C0.songCount})}),jsxRuntimeExports.jsx(TableCell,{className:"text-right",children:C0.linkedProfile?jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-1",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:()=>S0(C0),disabled:g0===C0.id,title:"Resync songs",children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${g0===C0.id?"animate-spin":""}`})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:()=>v0(C0),className:"text-destructive hover:text-destructive",title:"Unlink",children:jsxRuntimeExports.jsx(Unlink,{className:"w-4 h-4"})})]}):jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>E0(C0),className:"gap-1",children:[jsxRuntimeExports.jsx(Link,{className:"w-4 h-4"}),"Link"]})})]},C0.id))})]})})}),jsxRuntimeExports.jsx(Dialog,{open:u0,onOpenChange:d0,children:jsxRuntimeExports.jsxs(DialogContent,{children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Link Writer to Profile"}),jsxRuntimeExports.jsxs(DialogDescription,{children:['Link "',h0==null?void 0:h0.name,`" to a registered songwriter's profile. This will automatically sync all songs with this writer name to their account.`]})]}),jsxRuntimeExports.jsx("div",{className:"py-4",children:jsxRuntimeExports.jsxs(Select,{value:p0,onValueChange:A0,children:[jsxRuntimeExports.jsx(SelectTrigger,{children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Select a songwriter..."})}),jsxRuntimeExports.jsx(SelectContent,{className:"bg-background border shadow-lg z-50",children:j0.length===0?jsxRuntimeExports.jsx(SelectItem,{value:"none",disabled:!0,children:"No songwriters available"}):j0.map(C0=>jsxRuntimeExports.jsx(SelectItem,{value:C0.id,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("span",{children:C0.display_name}),R0.has(C0.id)&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:"linked"})]})},C0.id))})]})}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>d0(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:w0,disabled:!p0||m0,children:m0?"Linking...":"Link & Sync"})]})]})})]})}const ROLE_OPTIONS=[{value:"admin",label:"Admin",description:"Full access"},{value:"viewer",label:"Viewer",description:"Read-only"},{value:"a_and_r",label:"A&R",description:"View-only"},{value:"manager",label:"Manager",description:"View-only"},{value:"songwriter",label:"Songwriter",description:"Upload & edit own"}];
720function QuickRoleEditor({platformUsers:r0}){const{ownerId:e0,user:n0,isSuperAdmin:a0}=useAuth(),{toast:i0}=useToast(),[s0,o0]=reactExports.useState([]),[l0,c0]=reactExports.useState(!1),[u0,d0]=reactExports.useState(null),h0=r0?r0.map(g0=>({...g0,role:g0.role})):s0,f0=async()=>{if(e0){c0(!0);try{const{data:g0,error:y0}=await supabase.from("user_roles").select("id, email, role, user_id").eq("archive_owner_id",e0).order("email");!y0&&g0&&o0(g0)}catch(g0){console.error("Failed to load users:",g0)}finally{c0(!1)}}};reactExports.useEffect(()=>{r0||f0()},[e0,r0]);const p0=async(g0,y0,b0)=>{var E0,w0;if((n0==null?void 0:n0.id)===((E0=h0.find(v0=>v0.id===g0))==null?void 0:E0.user_id)){i0({title:"Cannot change own role",description:"You cannot change your own role. Ask another admin to help.",variant:"destructive"});return}d0(g0);try{if(r0){const{data:v0,error:S0}=await supabase.functions.invoke("platform-stats",{body:{action:"update-role",userRoleId:g0,newRole:b0}});if(S0)throw new Error(S0.message);if(v0!=null&&v0.error)throw new Error(v0.error)}else{const{error:v0}=await supabase.from("user_roles").update({role:b0}).eq("id",g0);if(v0)throw v0}o0(v0=>v0.map(S0=>S0.id===g0?{...S0,role:b0}:S0)),i0({title:"Role updated",description:`${y0} is now ${(w0=ROLE_OPTIONS.find(v0=>v0.value===b0))==null?void 0:w0.label}`})}catch(v0){i0({title:"Error",description:v0.message||"Failed to update role",variant:"destructive"})}finally{d0(null)}},A0=g0=>{switch(g0){case"admin":return"default";case"songwriter":return"secondary";default:return"outline"}},m0=g0=>{var y0;return((y0=ROLE_OPTIONS.find(b0=>b0.value===g0))==null?void 0:y0.label)||g0},x0=a0&&r0;return jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Users,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Quick Role Editor"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:x0?"All users across all archives":"Quickly change user roles"})]}),h0.length>0&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:h0.length})]}),!r0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:f0,disabled:l0,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${l0?"animate-spin":""}`})})]}),h0.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[jsxRuntimeExports.jsx(Users,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),jsxRuntimeExports.jsx("p",{children:"No users found"})]}):jsxRuntimeExports.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:jsxRuntimeExports.jsxs(Table,{children:[jsxRuntimeExports.jsx(TableHeader,{children:jsxRuntimeExports.jsxs(TableRow,{className:"bg-muted/30",children:[jsxRuntimeExports.jsx(TableHead,{className:x0?"w-[35%]":"w-[45%]",children:"User"}),x0&&jsxRuntimeExports.jsx(TableHead,{className:"w-[20%]",children:"Archive"}),jsxRuntimeExports.jsx(TableHead,{className:"w-[20%]",children:"Current Role"}),jsxRuntimeExports.jsx(TableHead,{className:"w-[25%]",children:"Change To"})]})}),jsxRuntimeExports.jsx(TableBody,{children:h0.map(g0=>{const y0=(n0==null?void 0:n0.id)===g0.user_id;return jsxRuntimeExports.jsxs(TableRow,{className:y0?"bg-primary/5":"",children:[jsxRuntimeExports.jsx(TableCell,{className:"font-medium",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx("span",{className:"text-xs font-medium text-primary",children:g0.email.charAt(0).toUpperCase()})}),jsxRuntimeExports.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntimeExports.jsx("p",{className:"text-sm truncate",children:g0.email}),y0&&jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"(You)"})]})]})}),x0&&jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:g0.archive_name})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Badge,{variant:A0(g0.display_role||g0.role),children:m0(g0.display_role||g0.role)})}),jsxRuntimeExports.jsx(TableCell,{children:(()=>{const b0=g0.display_role==="songwriter",E0=g0.display_role||g0.role;return b0?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:m0(E0)}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"(Archive owner)"})]}):jsxRuntimeExports.jsxs(Select,{value:E0,onValueChange:w0=>p0(g0.id,g0.email,w0),disabled:u0===g0.id||y0,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-full h-9",children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsx(SelectContent,{children:ROLE_OPTIONS.map(w0=>jsxRuntimeExports.jsx(SelectItem,{value:w0.value,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("span",{children:w0.label}),jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",w0.description,")"]})]})},w0.value))})]})})()})]},g0.id)})})]})}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:"ð¡ Role changes take effect immediately. Users may need to refresh their browser."})]})}async function invoke$1(r0,e0={}){const{data:n0,error:a0}=await supabase.functions.invoke("scan-library",{body:{action:r0,...e0}});if(a0)throw a0;if(n0!=null&&n0.error)throw new Error(n0.error);return n0}function useLibraryScan(){const[r0,e0]=reactExports.useState([]),[n0,a0]=reactExports.useState(!1),[i0,s0]=reactExports.useState(!1),[o0,l0]=reactExports.useState(null),c0=reactExports.useCallback(async()=>{a0(!0);try{const p0=await invoke$1("list");e0(p0.data||[])}catch(p0){console.error("Failed to load library flags:",p0),toast({title:"Error",description:"Could not load the cleanup list",variant:"destructive"})}finally{a0(!1)}},[]),u0=reactExports.useCallback(async()=>{s0(!0);try{const p0=await invoke$1("scan"),A0={scanned:p0.scanned||0,certain:p0.certain||0,possible:p0.possible||0,needsAttention:p0.needsAttention||0,newFlags:p0.newFlags||0,alreadyHandled:p0.alreadyHandled||0};return l0(A0),await c0(),toast({title:"Scan complete",description:`${A0.scanned} songs checked · ${A0.certain} certain, ${A0.possible} possible duplicates · ${A0.needsAttention} need attention`}),A0}catch(p0){return console.error("Library scan failed:",p0),toast({title:"Scan failed",description:"Could not scan the library",variant:"destructive"}),null}finally{s0(!1)}},[c0]),d0=reactExports.useCallback(async(p0,A0)=>{try{return await invoke$1("update-status",{id:p0,status:A0}),e0(m0=>m0.filter(x0=>
720x0.id!==p0)),!0}catch(m0){return console.error("Failed to update flag:",m0),toast({title:"Error",description:"Could not update this item",variant:"destructive"}),!1}},[]),h0=reactExports.useCallback(async(p0,A0,m0,x0)=>{try{return await invoke$1("link-version",{id:p0,parent_song_id:A0,child_song_id:m0,version_label:x0}),e0(g0=>g0.filter(y0=>y0.id!==p0)),toast({title:"Linked as a version",description:"These two are now grouped together."}),!0}catch(g0){return console.error("Failed to link version:",g0),toast({title:"Error",description:"Could not link these songs",variant:"destructive"}),!1}},[]),f0=reactExports.useCallback(async(p0,A0)=>{try{return await invoke$1("delete-song",{id:p0,song_id:A0}),e0(m0=>m0.filter(x0=>x0.id!==p0)),toast({title:"Copy deleted"}),!0}catch(m0){return console.error("Failed to delete song:",m0),toast({title:"Error",description:"Could not delete this copy",variant:"destructive"}),!1}},[]);return{flags:r0,isLoading:n0,isScanning:i0,summary:o0,fetchFlags:c0,runScan:u0,setStatus:d0,linkAsVersion:h0,deleteSong:f0}}async function checkSongForDuplicates(r0){try{const e0=await invoke$1("scan-song",{song_id:r0});return(e0==null?void 0:e0.match)||null}catch(e0){return console.warn("Duplicate check failed:",e0),null}}function directAudioUrl(r0){return r0?r0.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("dl=0","dl=1"):null}function SongCard({song:r0,accent:e0,onDelete:n0,onOpen:a0}){const i0=directAudioUrl(r0.dropbox_url);return jsxRuntimeExports.jsxs("div",{className:cn$1("rounded-lg border p-3 space-y-2",e0?"border-primary/40 bg-primary/5":"border-border bg-muted/20"),children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate",children:r0.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r0.file_name||"â"})]}),a0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"h-7 px-2 shrink-0",onClick:a0,title:"Open in Library",children:jsxRuntimeExports.jsx(ExternalLink,{className:"w-3.5 h-3.5"})})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1 text-[11px]",children:[jsxRuntimeExports.jsxs(Badge,{variant:"secondary",children:[r0.bpm||"â"," BPM"]}),jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:[r0.key,r0.scale].filter(Boolean).join(" ")||"No key"}),r0.vocalist_gender&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:r0.vocalist_gender}),(r0.genres||[]).slice(0,2).map(s0=>jsxRuntimeExports.jsx(Badge,{variant:"outline",children:s0},s0))]}),i0?jsxRuntimeExports.jsx("audio",{controls:!0,preload:"none",src:i0,className:"w-full h-8"}):jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"No audio link stored"}),n0&&jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"w-full gap-1 text-destructive hover:text-destructive",onClick:n0,children:[jsxRuntimeExports.jsx(Trash2,{className:"w-3.5 h-3.5"}),"Delete this copy"]})]})}function LibraryCleanupView({onOpenSongInLibrary:r0}){var R0,j0;const{flags:e0,isLoading:n0,isScanning:a0,summary:i0,fetchFlags:s0,runScan:o0,setStatus:l0,linkAsVersion:c0,deleteSong:u0}=useLibraryScan(),[d0,h0]=reactExports.useState("duplicates"),[f0,p0]=reactExports.useState(null),[A0,m0]=reactExports.useState(null),[x0,g0]=reactExports.useState("alt version"),[y0,b0]=reactExports.useState(!1);reactExports.useEffect(()=>{s0()},[s0]);const E0=reactExports.useMemo(()=>e0.filter(C0=>C0.flag_type!=="needs_attention"),[e0]),w0=reactExports.useMemo(()=>e0.filter(C0=>C0.flag_type==="needs_attention"),[e0]),v0=d0==="duplicates"?E0:w0,S0=async()=>{f0&&(b0(!0),await u0(f0.flag.id,f0.song.id),b0(!1),p0(null))},k0=async()=>{!(A0!=null&&A0.song_a)||!A0.song_b||(b0(!0),await c0(A0.id,A0.song_a.id,A0.song_b.id,x0.trim()||"alt version"),b0(!1),m0(null))};return jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-border",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(ScanLine,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Library Cleanup"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Duplicate uploads and data-quality issues"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:s0,disabled:n0,children:jsxRuntimeExports.jsx(RefreshCw,{className:cn$1("w-4 h-4",n0&&"animate-spin")})}),jsxRuntimeExports.jsxs(Button,{size:"sm",onClick:o0,disabled:a0,className:"gap-2",children:[a0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4 animate-spin"}):jsxRuntimeExports.jsx(ScanLine,{className:"w-4 h-4"}),a0?"Scanningâ¦":"Scan Library"]})]})]}),i0&&jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-foreground",children:i0.scanned}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Songs checked"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-destructive",children:i0.certain}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Certain duplicates"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-primary",children:i0.possible}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Possible duplicates"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-foreground",children:i0.needsAttention}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Need attention"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 mb-4",children:[jsxRuntimeExports.jsxs(Button,{variant:d0==="duplicates"?"default":"outline",size:"sm",onClick:()=>h0("duplicates"),className:"gap-2",children:[jsxRuntimeExports.jsx(Copy,{className:"w-4 h-4"}),"Duplicates",jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:E0.length})]}),jsxRuntimeExports.jsxs(Button,{variant:d0==="attention"?"default":"outline",size:"sm",onClick:()=>h0("attention"),className:"gap-2",children:[jsxRuntimeExports.jsx(TriangleAlert,{className:"w-4 h-4"}),"Needs attention",jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:w0.length})]})]}),v0.length===0?jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:n0?"Loadingâ¦":"Nothing pending here. Run a scan to check the catalog."}):jsxRuntimeExports.jsx("div",{className:"space-y-3",children:v0.map(C0=>jsxRuntimeExports.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[C0.flag_type==="duplicate_certain"&&jsxRuntimeExports.jsx(Badge,{variant:"destructive",children:"Certain duplicate"}),C0.flag_type==="duplicate_possible"&&jsxRuntimeExports.jsxs(Badge,{className:"bg-primary/20 text-primary hover:bg-primary/20",children:["Possible duplicate · ",Math.round(C0.confidence*100),"%"]}),C0.flag_type==="needs_attention"&&jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"gap-1",children:[jsxRuntimeExports.jsx(TriangleAlert,{className:"w-3 h-3"})," Needs attention"]})]}),jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"gap-1",onClick:()=>l0(C0.id,"dismissed"),children:[jsxRuntimeExports.jsx(X$2,{className:"w-3.5 h-3.5"}),C0.flag_type==="needs_attention"?"Dismiss":"Not a duplicate"]})]}),jsxRuntimeExports.jsx("ul",{className:"text-xs text-muted-foreground list-disc pl-5 space-y-0.5",children:(C0.reasons||[]).map(($0,T0)=>jsxRuntimeExports.jsx("li",{children:$0},T0))}),C0.flag_type==="needs_attention"?C0.song_a&&jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/20 p-3",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate",children:C0.song_a.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:C0.song_a.file_name||"â"})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"gap-1 shrink-0",onClick:()=>r0==null?void 0:r0({id:C0.song_a.id,name:C0.song_a.name}),children:[jsxRuntimeExports.jsx(ExternalLink,{className:"w-3.5 h-3.5"}),"Fix in Library"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[C0.song_a&&jsxRuntimeExports.jsx(SongCard,{song:C0.song_a,accent:!0,onDelete:()=>p0({flag:C0,song:C0.song_a}),onOpen:()=>r0==null?void 0:r0({id:C0.song_a.id,name:C0.song_a.name})}),C0.song_b&&jsxRuntimeExports.jsx(SongCard,{song:C0.song_b,onDelete:()=>p0({flag:C0,song:C0.song_b}),onOpen:()=>r0==null?void 0:r0({id:C0.song_b.id,name:C0.song_b.name})})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>{m0(C0),g0("alt version")},children:[jsxRuntimeExports.jsx(Layers,{className:"w-4 h-4"}),"These are versions of the same song"]})]})]},C0.id))}),jsxRuntimeExports.jsx(AlertDialog,{open:!!f0,onOpenChange:C0=>!C0&&p0(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Delete this copy?"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:['"',f0==null?void 0:f0.song.name,`" will be removed from the library. The other copy stays. This can't be und
720one.`]})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{disabled:y0,children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{onClick:C0=>{C0.preventDefault(),S0()},disabled:y0,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:y0?"Deletingâ¦":"Delete"})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:!!A0,onOpenChange:C0=>!C0&&m0(null),children:jsxRuntimeExports.jsxs(DialogContent,{children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Mark as a version"}),jsxRuntimeExports.jsxs(DialogDescription,{children:['"',(R0=A0==null?void 0:A0.song_b)==null?void 0:R0.name,'" will be grouped under "',(j0=A0==null?void 0:A0.song_a)==null?void 0:j0.name,`" as an alternate version, and this pair won't be flagged again.`]})]}),jsxRuntimeExports.jsxs("div",{className:"py-2 space-y-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm text-muted-foreground",children:"Version label"}),jsxRuntimeExports.jsx(Input,{value:x0,onChange:C0=>g0(C0.target.value),placeholder:"e.g. stripped, male vocal, radio edit"})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>m0(null),disabled:y0,children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:k0,disabled:y0,children:y0?"Linkingâ¦":"Link as version"})]})]})})]})}const bangerbankLogo="/assets/bangerbank-logo-transparent-CvgxKAR0.png";function AdminView({onOpenSongInLibrary:r0}={}){const{role:e0,ownerId:n0,ownerName:a0,isSuperAdmin:i0,signOut:s0,session:o0}=useAuth(),{toast:l0}=useToast(),[c0,u0]=reactExports.useState(null),[d0,h0]=reactExports.useState(!0),[f0,p0]=reactExports.useState(null),[A0,m0]=reactExports.useState(!1),[x0,g0]=reactExports.useState(null),[y0,b0]=reactExports.useState(!1),[E0,w0]=reactExports.useState({done:0,total:0}),[v0,S0]=reactExports.useState(!1),[k0,R0]=reactExports.useState(""),[j0,C0]=reactExports.useState("viewer"),[$0,T0]=reactExports.useState(!1),[I0,M0]=reactExports.useState([]),[N0,D0]=reactExports.useState(!1),[O0,B0]=reactExports.useState(null),[z0,G0]=reactExports.useState(!1),[F0,Q0]=reactExports.useState(""),[U0,q0]=reactExports.useState(!1),[Rw,_w]=reactExports.useState(null),{songwriters:J0,invites:Cw,isLoading:Ow,fetchSongwriters:jw,fetchInvites:Nw,inviteSongwriter:xw,revokeInvite:X0,removeSongwriter:Lw}=useSongwriters(),[Hw,Ww]=reactExports.useState(!1),[r1,Yw]=reactExports.useState(""),[l1,p1]=reactExports.useState(null),[Pw,Qw]=reactExports.useState(!1),[Xw,f1]=reactExports.useState(null),[u1,W0]=reactExports.useState(null),[P0,L0]=reactExports.useState(!1),[Z0,$w]=reactExports.useState({}),Bw=async()=>{if(!(!i0||!o0)){m0(!0);try{const{data:Mw,error:Uw}=await supabase.functions.invoke("platform-stats");if(Uw)throw Uw;p0(Mw)}catch(Mw){console.error("Failed to load platform stats:",Mw)}finally{m0(!1)}}},Vw=async()=>{if(n0)try{const{data:Mw,error:Uw}=await supabase.functions.invoke("backfill-dates",{body:{countOnly:!0}});!Uw&&(Mw==null?void 0:Mw.remaining)!==void 0&&g0(Mw.remaining)}catch{}},Dw=async()=>{b0(!0);const Mw=x0||0;let Uw=0;w0({done:0,total:Mw});try{let Fw=Mw;for(;Fw>0;){const{data:Jw,error:s1}=await supabase.functions.invoke("backfill-dates");if(s1){l0({title:"Backfill error",description:s1.message||"Failed to process batch",variant:"destructive"});break}Uw+=Jw.processed,Fw=Jw.remaining,w0({done:Uw,total:Mw}),g0(Fw)}l0({title:"Backfill complete",description:`Processed ${Uw} songs. ${x0||0} remaining.`})}catch(Fw){l0({title:"Backfill failed",description:Fw.message||"An error occurred",variant:"destructive"})}finally{b0(!1),i1()}},Kw=async Mw=>{if(i0)try{const Fw=(Mw||(f0==null?void 0:f0.songwriterProfiles)||[]).map(A1=>A1.archive_owner_id).filter(Boolean);if(Fw.length===0)return;const{data:Jw,error:s1}=await supabase.from("user_roles").select("archive_owner_id").in("archive_owner_id",Fw).eq("role","a_and_r");if(!s1&&Jw){const A1={};Jw.forEach(T1=>{A1[T1.archive_owner_id]=(A1[T1.archive_owner_id]||0)+1}),$w(A1)}}catch{}};reactExports.useEffect(()=>{n0&&(i1(),m1(),Vw()),o0&&(jw(),Nw()),i0&&o0&&Bw()},[n0,o0,jw,Nw,i0]),reactExports.useEffect(()=>{i0&&(f0!=null&&f0.songwriterProfiles)&&Kw(f0.songwriterProfiles)},[i0,f0==null?void 0:f0.songwriterProfiles]);const i1=async()=>
720{if(n0){h0(!0);try{const{data:Mw,error:Uw}=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"songs"}}),{data:Fw,error:Jw}=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"folders"}});if(!Uw&&!Jw){const s1=(Mw==null?void 0:Mw.data)||[],A1=(Fw==null?void 0:Fw.data)||[],T1=s1.filter(V1=>V1.source==="dropbox").length,yR=s1.filter(V1=>V1.source==="file").length;u0({songCount:s1.length,folderCount:A1.length,dropboxSongCount:T1,localSongCount:yR})}}catch(Mw){console.error("Failed to load stats:",Mw)}finally{h0(!1)}}},m1=async()=>{if(n0){D0(!0);try{const{data:Mw,error:Uw}=await supabase.from("user_roles").select("id, email, role, user_id").eq("archive_owner_id",n0);Uw||M0(Mw||[])}catch(Mw){console.error("Failed to load users:",Mw)}finally{D0(!1)}}},qw=async()=>{if(!(!k0.trim()||!n0)){T0(!0);try{if(I0.find(Fw=>Fw.email.toLowerCase()===k0.toLowerCase())){l0({title:"User already has access",description:"This email already has access to this archive.",variant:"destructive"}),T0(!1);return}const{error:Uw}=await supabase.from("user_roles").insert({email:k0.toLowerCase().trim(),role:j0,archive_owner_id:n0,user_id:"00000000-0000-0000-0000-000000000000"});if(Uw)throw Uw;l0({title:"User added",description:`${k0} has been granted ${j0} access.`}),S0(!1),R0(""),C0("viewer"),m1()}catch(Mw){l0({title:"Error",description:Mw.message||"Failed to add user",variant:"destructive"})}finally{T0(!1)}}},y1=async()=>{if(O0)try{const{error:Mw}=await supabase.from("user_roles").delete().eq("id",O0.id);if(Mw)throw Mw;l0({title:"User removed",description:`${O0.email} no longer has access.`}),B0(null),m1()}catch(Mw){l0({title:"Error",description:Mw.message||"Failed to remove user",variant:"destructive"})}},S1=async()=>{if(!(!F0.trim()||!n0)){q0(!0);try{if(I0.find(Fw=>Fw.email.toLowerCase()===F0.toLowerCase()&&Fw.role==="a_and_r")){l0({title:"Already has A&R access",description:"This email already has A&R access to this archive.",variant:"destructive"}),q0(!1);return}const{error:Uw}=await supabase.from("user_roles").insert({email:F0.toLowerCase().trim(),role:"a_and_r",archive_owner_id:n0,user_id:"00000000-0000-0000-0000-000000000000"});if(Uw)throw Uw;l0({title:"A&R added",description:`${F0} has been granted A&R access.`}),G0(!1),Q0(""),m1()}catch(Mw){l0({title:"Error",description:Mw.message||"Failed to add A&R user",variant:"destructive"})}finally{q0(!1)}}},_1=async()=>{if(Rw)try{const{error:Mw}=await supabase.from("user_roles").delete().eq("id",Rw.id);if(Mw)throw Mw;l0({title:"A&R removed",description:`${Rw.email} no longer has A&R access.`}),_w(null),m1()}catch(Mw){l0({title:"Error",description:Mw.message||"Failed to remove A&R user",variant:"destructive"})}},g1=async()=>{if(n0)try{const{data:Mw,error:Uw}=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"songs"}});if(Uw)throw Uw;const Fw=(Mw==null?void 0:Mw.data)||[],Jw=new Blob([JSON.stringify(Fw,null,2)],{type:"application/json"}),s1=URL.createObjectURL(Jw),A1=document.createElement("a");A1.href=s1,A1.download=`bangerbank-${a0||"export"}-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(A1),A1.click(),document.body.removeChild(A1),URL.revokeObjectURL(s1),l0({title:"Export Complete",description:`Exported ${Fw.length} songs to JSON file.`})}catch{l0({title:"Export Failed",description:"Could not export library data.",variant:"destructive"})}},C1=async()=>{if(!r1.trim()){l0({title:"Error",description:"Please enter an email address",variant:"destructive"});return}L0(!0);const Mw=await xw(r1.trim());L0(!1),Mw&&(p1(Mw),Ww(!1),Qw(!0),Yw(""))},M1=()=>{l1&&(navigator.clipboard.writeText(l1),l0({title:"Copied",description:"Invite link copied to clipboard"}))},a1=async()=>{Xw&&(await Lw(Xw.id),f1(null))},h1=async()=>{u1&&(await X0(u1.id),W0(null))},Y0=async()=>{await s0(),window.location.href="/login"},Tw=J0.filter(Mw=>Mw.is_active);return e0!=="admin"?jsxRuntimeExports.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntimeExports.jsx("p",{className:"text-muted-foreground",children:"Admin access required"})}):jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"p-6 border-b border-border flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:i0?jsxRuntimeExports.jsx(Crown,{className:"w-5 h-5 text-primary"}):jsxRuntimeExports.jsx(Shield,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("h2",{className:"text-2xl font-bold text-foreground flex items-center gap-2",children:["Admin Panel",i0&&jsxRuntimeExports.jsx("span",{className:"text-xs bg-primary/20 text-primary px-2 py-0.5 rounded-full",children:"SUPER ADMIN"})]}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:a0?`Managing ${a0}'s Archive`:"System management & controls"})]})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:Y0,className:"gap-2",children:[jsxRuntimeExports.jsx(LogOut,{className:"w-4 h-4"}),"Logout"]})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:jsxRuntimeExports.jsx("div",{className:"p-6",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto
720space-y-6",children:[jsxRuntimeExports.jsx(LibraryCleanupView,{onOpenSongInLibrary:r0}),i0&&f0&&jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Globe,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Platform Overview"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Cross-archive statistics"})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:Bw,disabled:A0,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${A0?"animate-spin":""}`})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-foreground",children:f0.platformLibraries.length}),jsxRuntimeExports.jsxs("div",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[jsxRuntimeExports.jsx(Library,{className:"w-3 h-3"})," Libraries"]})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-primary",children:f0.totalPlatformSongs}),jsxRuntimeExports.jsxs("div",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[jsxRuntimeExports.jsx(Music,{className:"w-3 h-3"})," Songs"]})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-foreground",children:f0.totalSongwriters}),jsxRuntimeExports.jsxs("div",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[jsxRuntimeExports.jsx(Music,{className:"w-3 h-3"})," Songwriters"]})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-foreground",children:f0.totalUsers}),jsxRuntimeExports.jsxs("div",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[jsxRuntimeExports.jsx(Users,{className:"w-3 h-3"})," Total Users"]})]})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-3",children:[jsxRuntimeExports.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Platform Libraries"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:f0.platformLibraries.map(Mw=>jsxRuntimeExports.jsxs("div",{className:"bg-muted/20 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-foreground",children:Mw.displayName}),jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-primary",children:Mw.songCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:Mw.taggedCount>0?`${Mw.ownedCount} owned · ${Mw.taggedCount} tagged`:"songs"})]},Mw.id))}),f0.songwriterArchives&&f0.songwriterArchives.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mt-4",children:"Songwriter Archives"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:f0.songwriterArchives.map(Mw=>jsxRuntimeExports.jsxs("div",{className:"bg-muted/20 rounded-lg p-3 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-foreground",children:Mw.displayName}),jsxRuntimeExports.jsx("div",{className:"text-lg font-bold text-primary",children:Mw.songCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:Mw.taggedCount>0?`${Mw.ownedCount} owned · ${Mw.taggedCount} tagged`:"songs"})]},Mw.id))})]})]})]}),i0&&jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Users,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"User Acce
720ss"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Manage who can access this archive"})]}),I0.length>0&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:I0.length})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:m1,disabled:N0,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${N0?"animate-spin":""}`})}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>S0(!0),className:"gap-2",children:[jsxRuntimeExports.jsx(Plus,{className:"w-4 h-4"}),"Add User"]})]})]}),I0.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[jsxRuntimeExports.jsx(Users,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),jsxRuntimeExports.jsx("p",{children:"No users with access"}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Add users by email to grant them access"})]}):jsxRuntimeExports.jsx("div",{className:"space-y-2",children:I0.map(Mw=>jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between bg-muted/30 rounded-lg p-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-9 h-9 rounded-full bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-primary",children:Mw.email.charAt(0).toUpperCase()})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm",children:Mw.email}),jsxRuntimeExports.jsx(Badge,{variant:Mw.role==="admin"?"default":"secondary",className:"text-xs",children:Mw.role==="a_and_r"?"A&R":Mw.role==="manager"?"Manager":Mw.role})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>B0({id:Mw.id,email:Mw.email}),children:jsxRuntimeExports.jsx(UserMinus,{className:"w-4 h-4"})})]},Mw.id))})]}),jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Users,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"A&R Access"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Manage who can view your library as A&R"})]}),I0.filter(Mw=>Mw.role==="a_and_r").length>0&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:I0.filter(Mw=>Mw.role==="a_and_r").length})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>G0(!0),className:"gap-2",children:[jsxRuntimeExports.jsx(Plus,{className:"w-4 h-4"}),"Add A&R"]})]}),I0.filter(Mw=>Mw.role==="a_and_r").length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[jsxRuntimeExports.jsx(Users,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),jsxRuntimeExports.jsx("p",{children:"No A&R users"}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Grant A&R access to let users view your library"})]}):jsxRuntimeExports.jsx("div",{className:"space-y-2",children:I0.filter(Mw=>Mw.role==="a_and_r").map(Mw=>jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between bg-muted/30 rounded-lg p-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-9 h-9 rounded-full bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-primary",children:Mw.email.charAt(0).toUpperCase()})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm",children:Mw.email}),jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:"A&R"})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>_w({id:Mw.id,email:Mw.email}),children:jsxRuntimeExports.jsx(UserMinus,{className:"w-4 h-4"})})]},Mw.id))})]}),i0&&jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Users,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Songwriters"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Manage songwriter access"})]}),((f0==null?void 0:f0.songwriterProfiles)||Tw).length>0&&jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:((f0==null?void 0:f0.songwriterProfiles)||Tw).length})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:()=>{jw(),Nw()},disabled:Ow,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${Ow?"animate-spin":""}`})}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>Ww(!0),className:"gap-2",children:[jsxRuntimeExports.jsx(Plus,{className:"w-4 h-4"}),"Invite"]})]})]}),(()=>{const Mw=(f0==null?void 0:f0.songwriterProfiles)||Tw.map(Uw=>({id:Uw.id,email:Uw.email,display_name:Uw.display_name,avatar_url:Uw.avatar_url,is_active:Uw.is_active,created_at:Uw.created_at,archive_owner_id:""}));return Mw.length===0&&Cw.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[jsxRuntimeExports.jsx(Mail,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),jsxRuntimeExports.jsx("p",{children:"No songwriters yet"}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Invite songwriters to give them access to the platform"})]}):jsxRuntimeExports.jsxs("div",{className:"space-y-3",children:[Mw.map(Uw=>jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between bg-muted/30 rounded-lg p-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-9 h-9 rounded-full bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-primary",children:Uw.display_name.charAt(0).toUpperCase()})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm",children:Uw.display_name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:Uw.email})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[Uw.archive_owner_id&&Z0[Uw.archive_owner_id]?jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"text-xs",children:[Z0[Uw.archive_owner_id]," A&R",Z0[Uw.archive_owner_id]>1?"s":""]}):jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:"0 A&Rs"}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:format$4(ne
720w Date(Uw.created_at),"MMM d, yyyy")})]})]},Uw.id)),Cw.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mt-4 mb-2",children:"Pending Invites"}),Cw.map(Uw=>jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between bg-accent/30 rounded-lg p-3 border border-accent/50",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-9 h-9 rounded-full bg-accent/50 flex items-center justify-center",children:jsxRuntimeExports.jsx(Clock,{className:"w-4 h-4 text-accent-foreground"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm",children:Uw.display_name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:Uw.email})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground",children:["Expires ",format$4(new Date(Uw.expires_at),"MMM d")]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>W0(Uw),children:jsxRuntimeExports.jsx(Trash2,{className:"w-4 h-4"})})]})]},Uw.id))]})]})})()]}),i0&&jsxRuntimeExports.jsx(QuickRoleEditor,{platformUsers:(f0==null?void 0:f0.allUsers)||null}),i0&&jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 border border-primary/30",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(BookUser,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Writer Directory"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Link writer names to songwriter profiles"})]})]}),jsxRuntimeExports.jsx(WriterDirectory,{songwriters:J0,onRefresh:()=>{jw(),Nw()}})]}),jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Database,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Database Overview"})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:i1,disabled:d0,children:jsxRuntimeExports.jsx(RefreshCw,{className:`w-4 h-4 ${d0?"animate-spin":""}`})})]}),c0?jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-foreground",children:c0.songCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Songs"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-foreground",children:c0.folderCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Folders"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-primary",children:c0.dropboxSongCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Dropbox Songs"})]}),jsxRuntimeExports.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl font-bold text-primary",children:c0.localSongCount}),jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Local Uploads"})]})]}):jsxRuntimeExports.jsx("div",{className:"text-center text-muted-foreground py-4",children:"Loading stats..."})]}),jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:jsxRuntimeExports.jsx(Download,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:"Data Management"})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[jsxRuntimeExports.jsxs(Button,{variant:"outline",onClick:g1,className:"justify-start gap-2",children:[jsxRuntimeExports.jsx(Download,{className:"w-4 h-4"}),"Export Library (JSON)"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",onClick:i1,className:"justify-start gap-2",children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-4 h-4"}),"Refresh Statistics"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",onClick:Dw,disabled:y0||x0===0,className:"justify-start gap-2 md:col-span-2",children:[jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),y0?`Processing... ${E0.done}/${E0.total} done`:x0!==null?`Backfill File Dates (${x0} missing)`:"Backfill File Dates"]})]})]}),jsxRuntimeExports.jsxs("div",{className:"glass-card rounded-xl p-6 text-center",children:[jsxRuntimeExports.jsx("img",{src:bangerbankLogo,alt:"BangerBank Logo",className:"w-16 h-16 mx-auto mb-3 object-contain"}),jsxRuntimeExports.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-1",children:["Banger",jsxRuntimeExports.jsx("span",{className:"text-primary",children:"Bank"})]}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Song Library Management System"})]})]})})}),jsxRuntimeExports.jsx(Dialog,{open:v0,onOpenChange:S0,children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-md",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Add User Acce
720ss"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Grant a user access to this archive. They'll be able to sign in with Google using this email."})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-4 py-4",children:[jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"userEmail",children:"Email Address"}),jsxRuntimeExports.jsx(Input,{id:"userEmail",type:"email",value:k0,onChange:Mw=>R0(Mw.target.value),placeholder:"[email protected]"})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Label$2,{children:"Role"}),jsxRuntimeExports.jsxs(Select,{value:j0,onValueChange:Mw=>C0(Mw),children:[jsxRuntimeExports.jsx(SelectTrigger,{children:jsxRuntimeExports.jsx(SelectValue,{})}),jsxRuntimeExports.jsxs(SelectContent,{children:[jsxRuntimeExports.jsx(SelectItem,{value:"viewer",children:"Viewer (read-only)"}),jsxRuntimeExports.jsx(SelectItem,{value:"a_and_r",children:"A&R (view-only)"}),jsxRuntimeExports.jsx(SelectItem,{value:"manager",children:"Manager (view-only)"}),jsxRuntimeExports.jsx(SelectItem,{value:"admin",children:"Admin (full access)"})]})]})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>S0(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:qw,disabled:$0||!k0.trim(),children:$0?"Adding...":"Add User"})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:!!O0,onOpenChange:()=>B0(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Remove User Access"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:["Are you sure you want to remove ",O0==null?void 0:O0.email,"'s access to this archive?"]})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:y1,children:"Remove"})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:Hw,onOpenChange:Ww,children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-md",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Invite Songwriter"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Send an invitation to give someone songwriter access. They'll choose their display name when signing up."})]}),jsxRuntimeExports.jsx("div",{className:"space-y-4 py-4",children:jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"inviteEmail",children:"Email Address"}),jsxRuntimeExports.jsx(Input,{id:"inviteEmail",type:"email",value:r1,onChange:Mw=>Yw(Mw.target.value),placeholder:"[email protected]"})]})}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>Ww(!1),children:"Cancel"}),jsxRuntimeExports.jsxs(Button,{onClick:C1,disabled:P0||!r1.trim(),children:[jsxRuntimeExports.jsx(Send,{className:"w-4 h-4 mr-2"}),P0?"Sending...":"Send Invite"]})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:Pw,onOpenChange:Qw,children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-lg",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Invitation Created"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Share this link with the songwriter to let them create their account"})]}),jsxRuntimeExports.jsxs("div",{className:"py-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-lg",children:[jsxRuntimeExports.jsx(Link,{className:"w-4 h-4 text-muted-foreground shrink-0"}),jsxRuntimeExports.jsx("code",{className:"text-sm flex-1 break-all",children:l1}),jsxRuntimeExports.jsx(Button,{size:"sm",variant:"secondary",onClick:M1,children:jsxRuntimeExports.jsx(Copy,{className:"w-4 h-4"})})]}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"This link expires in 7 days"})]}),jsxRuntimeExports.jsx(DialogFooter,{children:jsxRuntimeExports.jsx(Button,{onClick:()=>Qw(!1),children:"Done"})})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:!!Xw,onOpenChange:()=>f1(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Remove Songwriter"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:["Are you sure you want to remove ",Xw==null?void 0:Xw.display_name,"? They will no longer have access to your archive."]})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:a1,children:"Remove"})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:!!u1,onOpenChange:()=>W0(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Revoke Invitation"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:["Are you sure you want to revoke the invitation for ",u1==null?void 0:u1.display_name,"?"]})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:h1,children:"Revoke"})]})]})}),jsxRuntimeExports.jsx(Dialog,{open:z0,onOpenChange:G0,children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-md",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Add A&R Access"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Grant A&R access to a user by email. They'll be able to view your library and add keywords."})]}),jsxRuntimeExports.jsx("div",{className:"space-y-4 py-4",children:jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"arEmail",children:"Email Address"}),jsxRuntimeExports.jsx(Input,{id:"arEmail",type:"email",value:F0,onChange:Mw=>Q0(Mw.target.value),placeholder:"[email protected]"})]})}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>G0(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:S1,disabled:U0||!F0.trim(),children:U0?"Adding...":"Grant A&R Access"})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:!!Rw,onOpenChange:()=>_w(null),children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Remove A&R Access"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:["Are you sure you want to remove ",Rw==null?void 0:Rw.email,"'s A&R access to this archive?"]})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:_1,children:"Remove"})]})]})})]})}const Card=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("rounded-lg border bg-card text-card-foreground shadow-sm",r0),...e0}));
720Card.displayName="Card";const CardHeader=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("flex flex-col space-y-1.5 p-6",r0),...e0}));CardHeader.displayName="CardHeader";const CardTitle=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("h3",{ref:n0,className:cn$1("text-2xl font-semibold leading-none tracking-tight",r0),...e0}));CardTitle.displayName="CardTitle";const CardDescription=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("p",{ref:n0,className:cn$1("text-sm text-muted-foreground",r0),...e0}));CardDescription.displayName="CardDescription";const CardContent=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("p-6 pt-0",r0),...e0}));CardContent.displayName="CardContent";const CardFooter=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx("div",{ref:n0,className:cn$1("flex items-center p-6 pt-0",r0),...e0}));CardFooter.displayName="CardFooter";function DashboardView({onNavigate:r0,onNavigateToSong:e0,songCount:n0}
720){const{role:a0,ownerName:i0,userName:s0,songwriterProfileId:o0}=useAuth(),l0=a0==="admin",c0=a0==="songwriter",{notifications:u0,unreadCount:d0,isLoading:h0,fetchNotifications:f0,markAsRead:p0,markAllAsRead:A0}=useNotifications(),[m0,x0]=reactExports.useState([]),[g0,y0]=reactExports.useState(!0),[b0,E0]=reactExports.useState(0),w0=reactExports.useCallback(async()=>{var k0;y0(!0);try{const R0=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"songs"}});if(R0.error)throw R0.error;const j0=((k0=R0.data)==null?void 0:k0.data)||[],C0=j0.slice(0,5).map($0=>({id:$0.id,name:$0.name,uploadedAt:$0.uploaded_at,writers:$0.writers}));if(x0(C0),c0&&o0){const $0=j0.filter(T0=>{var I0;return T0.uploaded_by_songwriter===o0||((I0=T0.tagged_songwriter_ids)==null?void 0:I0.includes(o0))});E0($0.length)}}catch(R0){console.error("Failed to fetch recent songs:",R0)}finally{y0(!1)}},[c0,o0]);reactExports.useEffect(()=>{f0(10),w0()},[f0,w0]);const v0=k0=>{k0.isRead||p0([k0.id]),k0.songId&&e0&&e0(k0.songId)},S0=()=>{switch(a0){case"admin":return"default";case"songwriter":return"secondary";default:return"outline"}};return jsxRuntimeExports.jsx("div",{className:"flex-1 p-6 overflow-auto",children:jsxRuntimeExports.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("h1",{className:"text-2xl font-bold text-foreground",children:["Welcome back",s0?`, ${s0}`:"","!"]}),jsxRuntimeExports.jsxs("p",{className:"text-muted-foreground mt-1",children:["Here's what's happening in ",i0?`${i0}'s`:"your"," library"]})]}),jsxRuntimeExports.jsxs(Badge,{variant:S0(),className:"self-start sm:self-auto capitalize",children:[jsxRuntimeExports.jsx(User,{className:"h-3 w-3 mr-1"}),a0]})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[jsxRuntimeExports.jsx(Card,{className:"bg-card border-border",children:jsxRuntimeExports.jsx(CardContent,{className:"p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:jsxRuntimeExports.jsx(Music,{className:"h-5 w-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold",children:n0}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Songs in Library"})]})]})})}),c0&&jsxRuntimeExports.jsx(Card,{className:"bg-card border-border",children:jsxRuntimeExports.jsx(CardContent,{className:"p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-lg bg-green-500/10",children:jsxRuntimeExports.jsx(CircleCheckBig,{className:"h-5 w-5 text-green-500"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold",children:b0}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Your Songs"})]})]})})}),jsxRuntimeExports.jsx(Card,{className:"bg-card border-border",children:jsxRuntimeExports.jsx(CardContent,{className:"p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-lg bg-orange-500/10",children:jsxRuntimeExports.jsx(Bell,{className:"h-5 w-5 text-orange-500"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold",children:d0}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Unread Updates"})]})]})})}),jsxRuntimeExports.jsx(Card,{className:"bg-card border-border cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>r0("library"),children:jsxRuntimeExports.jsx(CardContent,{className:"p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-lg bg-blue-500/10",children:jsxRuntimeExports.jsx(Library,{className:"h-5 w-5 text-blue-500"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm",children:"Go to Library"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Browse songs"})]})]}),jsxRuntimeExports.jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground"})]})})})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[jsxRuntimeExports.jsxs(Card,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(CardHeader,{className:"pb-3",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs(CardTitle,{className:"text-lg flex items-center gap-2",children:[jsxRuntimeExports.jsx(Bell,{className:"h-5 w-5 text-primary"}),"Recent Updates"]}),d0>0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:()=>A0(),className:"text-xs",children:"Mark all read"})]})}),jsxRuntimeExports.jsx(CardContent,{className:"pt-0",children:h0?jsxRuntimeExports.jsx("div",{className:"space-y-3",children:[1,2,3].map(k0=>jsxRuntimeExports.jsxs("div",{className:"flex gap-3",children:[jsxRuntimeExports.jsx(Skeleton,{className:"h-8 w-8 rounded-full"}),jsxRuntimeExports.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntimeExports.jsx(Skeleton,{className:"h-4 w-3/4"}),jsxRuntimeExports.jsx(Skeleton,{className:"h-3 w-1/2"})]})]},k0))}):u0.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8",children:[jsxRuntimeExports.jsx(Bell,{className:"h-10 w-10 mx-auto text-muted-foreground
720/30 mb-3"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"No updates yet"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"Activity will appear here"})]}):jsxRuntimeExports.jsx(ScrollArea,{className:"h-[280px] -mx-2",children:jsxRuntimeExports.jsx("div",{className:"px-2",children:u0.map(k0=>jsxRuntimeExports.jsx(NotificationItem,{notification:k0,onClick:()=>v0(k0)},k0.id))})})})]}),jsxRuntimeExports.jsxs(Card,{className:"bg-card border-border",children:[jsxRuntimeExports.jsx(CardHeader,{className:"pb-3",children:jsxRuntimeExports.jsxs(CardTitle,{className:"text-lg flex items-center gap-2",children:[jsxRuntimeExports.jsx(Clock,{className:"h-5 w-5 text-primary"}),"Recently Added"]})}),jsxRuntimeExports.jsx(CardContent,{className:"pt-0",children:g0?jsxRuntimeExports.jsx("div",{className:"space-y-3",children:[1,2,3,4,5].map(k0=>jsxRuntimeExports.jsxs("div",{className:"flex gap-3 items-center",children:[jsxRuntimeExports.jsx(Skeleton,{className:"h-10 w-10 rounded"}),jsxRuntimeExports.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntimeExports.jsx(Skeleton,{className:"h-4 w-3/4"}),jsxRuntimeExports.jsx(Skeleton,{className:"h-3 w-1/2"})]})]},k0))}):m0.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-8",children:[jsxRuntimeExports.jsx(Music,{className:"h-10 w-10 mx-auto text-muted-foreground/30 mb-3"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"No songs yet"}),l0&&jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>r0("upload"),children:[jsxRuntimeExports.jsx(Upload,{className:"h-4 w-4 mr-2"}),"Upload songs"]})]}):jsxRuntimeExports.jsx("div",{className:"space-y-1",children:m0.map(k0=>jsxRuntimeExports.jsxs("button",{onClick:()=>e0==null?void 0:e0(k0.id),className:"w-full flex items-center gap-3 p-2 rounded-md hover:bg-muted/50 transition-colors text-left",children:[jsxRuntimeExports.jsx("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center shrink-0",children:jsxRuntimeExports.jsx(Music,{className:"h-4 w-4 text-muted-foreground"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-sm truncate",children:k0.name}),jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[k0.writers||"No writers listed"," ⢠",formatDistanceToNow(new Date(k0.uploadedAt),{addSuffix:!0})]})]})]},k0.id))})})]})]}),l0&&jsxRuntimeExports.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"h-auto py-4 justify-start",onClick:()=>r0("upload"),children:[jsxRuntimeExports.jsx(Upload,{className:"h-5 w-5 mr-3 text-primary"}),jsxRuntimeExports.jsxs("div",{className:"text-left",children:[jsxRuntimeExports.jsx("p",{className:"font-medium",children:"Upload Songs"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Add new tracks to your library"})]})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"h-auto py-4 justify-start",onClick:()=>r0("statistics"),children:[jsxRuntimeExports.jsx(TrendingUp,{className:"h-5 w-5 mr-3 text-primary"}),jsxRuntimeExports.jsxs("div",{className:"text-left",children:[jsxRuntimeExports.jsx("p",{className:"font-medium",children:"View Statistics"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Analyze your library"})]})]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"h-auto py-4 justify-start",onClick:()=>r0("admin"),children:[jsxRuntimeExports.jsx(User,{className:"h-5 w-5 mr-3 text-primary"}),jsxRuntimeExports.jsxs("div",{className:"text-left",children:[jsxRuntimeExports.jsx("p",{className:"font-medium",children:"Manage Users"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"Invite songwriters & set access"})]})]})]})]})})}var TABS_NAME="Tabs",[createTabsContext,createTabsScope]=createContextScope(TABS_NAME,[createRovingFocusGroupScope]),useRovingFocusGroupScope=createRovingFocusGroupScope(),[TabsProvi
720der,useTabsContext]=createTabsContext(TABS_NAME),Tabs$1=reactExports.forwardRef((r0,e0)=>{const{__scopeTabs:n0,value:a0,onValueChange:i0,defaultValue:s0,orientation:o0="horizontal",dir:l0,activationMode:c0="automatic",...u0}=r0,d0=useDirection(l0),[h0,f0]=useControllableState$1({prop:a0,onChange:i0,defaultProp:s0??"",caller:TABS_NAME});return jsxRuntimeExports.jsx(TabsProvider,{scope:n0,baseId:useId(),value:h0,onValueChange:f0,orientation:o0,dir:d0,activationMode:c0,children:jsxRuntimeExports.jsx(Primitive.div,{dir:d0,"data-orientation":o0,...u0,ref:e0})})});Tabs$1.displayName=TABS_NAME;var TAB_LIST_NAME="TabsList",TabsList$1=reactExports.forwardRef((r0,e0)=>{const{__scopeTabs:n0,loop:a0=!0,...i0}=r0,s0=useTabsContext(TAB_LIST_NAME,n0),o0=useRovingFocusGroupScope(n0);return jsxRuntimeExports.jsx(Root$9,{asChild:!0,...o0,orientation:s0.orientation,dir:s0.dir,loop:a0,children:jsxRuntimeExports.jsx(Primitive.div,{role:"tablist","aria-orientation":s0.orientation,...i0,ref:e0})})});TabsList$1.displayName=TAB_LIST_NAME;var TRIGGER_NAME="TabsTrigger",TabsTrigger$1=reactExports.forwardRef((r0,e0)=>{const{__scopeTabs:n0,value:a0,disabled:i0=!1,...s0}=r0,o0=useTabsContext(TRIGGER_NAME,n0),l0=useRovingFocusGroupScope(n0),c0=makeTriggerId(o0.baseId,a0),u0=makeContentId(o0.baseId,a0),d0=a0===o0.value;return jsxRuntimeExports.jsx(Item$2,{asChild:!0,...l0,focusable:!i0,active:d0,children:jsxRuntimeExports.jsx(Primitive.button,{type:"button",role:"tab","aria-selected":d0,"aria-controls":u0,"data-state":d0?"active":"inactive","data-disabled":i0?"":void 0,disabled:i0,id:c0,...s0,ref:e0,onMouseDown:composeEventHandlers(r0.onMouseDown,h0=>{!i0&&h0.button===0&&h0.ctrlKey===!1?o0.onValueChange(a0):h0.preventDefault()}),onKeyDown:composeEventHandlers(r0.onKeyDown,h0=>{[" ","Enter"].includes(h0.key)&&o0.onValueChange(a0)}),onFocus:composeEventHandlers(r0.onFocus,()=>{const h0=o0.activationMode!=="manual";!d0&&!i0&&h0&&o0.onValueChange(a0)})})})});TabsTrigger$1.displayName=TRIGGER_NAME;var CONTENT_NAME="TabsContent",TabsContent$1=reactExports.forwardRef((r0,e0)=>{const{__scopeTabs:n0,value:a0,forceMount:i0,children:s0,...o0}=r0,l0=useTabsContext(CONTENT_NAME,n0),c0=makeTriggerId(l0.baseId,a0),u0=makeContentId(l0.baseId,a0),d0=a0===l0.value,h0=reactExports.useRef(d0);return reactExports.useEffect(()=>{const f0=requestAnimationFrame(()=>h0.current=!1);return()=>cancelAnimationFrame(f0)},[]),jsxRuntimeExports.jsx(Presence,{present:i0||d0,children:({present:f0})=>jsxRuntimeExports.jsx(Primitive.div,{"data-state":d0?"active":"inactive","data-orientation":l0.orientation,role:"tabpanel","aria-labelledby":c0,hidden:!f0,id:u0,tabIndex:0,...o0,ref:e0,style:{...r0.style,animationDuration:h0.current?"0s":void 0},children:f0&&s0})})});TabsContent$1.displayName=CONTENT_NAME;function makeTriggerId(r0,e0){return`${r0}-trigger-${e0}`}function makeContentId(r0,e0){return`${r0}-content-${e0}`}var Root2=Tabs$1,List=TabsList$1,Trigger=TabsTrigger$1,Content$1=TabsContent$1;const Tabs=Root2,TabsList=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(List,{ref:n0,className:cn$1("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",r0),...e0}));TabsList.displayName=List.displayName;const TabsTrigger=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Trigger,{ref:n0,className:cn$1("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",r0),...e0}));TabsTrigger.displayName=Trigger.displayName;const TabsContent=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Content$1,{ref:n0,className:cn$1("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r0),...e0}));TabsContent.displayName=Content$1.displayName;function BriefInput({onAnalyze:r0,onPdfUpload:e0,isAnalyzing:n0,onClear:a0}){const[i0,s0]=reactExports.useState(""),[o0,l0]=reactExports.useState(null),[c0,u0]=reactExports.useState(!1),[d0,h0]=reactExports.useState(null),f0=reactExports.useRef(null),p0=reactExports.useCallback(async()=>{h0(null);try{if(i0.trim())await r0(i0);else if(o0){const y0=await e0(o0);s0(y0),await r0(y0)}}catch(y0){h0(y0 instanceof Error?y0.message:"Analysis failed")}},[i0,o0,r0,e0]),A0=reactExports.useCallback(y0=>{y0.preventDefault(),u0(!1),h0(null);const b0=y0.dataTransfer.files[0];b0&&b0.type==="application/pdf"?l0(b0):h0("Please upload a PDF file")},[]),m0=reactExports.useCallback(y0=>{var E0;h0(null);const b0=(E0=y0.target.files)==null?void 0:E0[0];b0&&b0.type==="application/pdf"?l0(b0):b0&&h0("Please upload a PDF file")},[]),x0=reactExports.useCallback(()=>{s0(""),l0(null),h0(null),a0()},[a0]),g0=i0.trim().length>0||o0!==null;return jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs(Tabs,{defaultValue:"text",className:"w-full",children:[jsxRuntimeExports.jsxs(TabsList,{className:"grid w-full grid-cols-2",children:[jsxRuntimeExports.jsxs(TabsTrigger,{value:"text",className:"gap-2",children:[jsxRuntimeExports.jsx(FileText,{className:"h-4 w-4"}),"Paste Text"]}),jsxRuntimeExports.jsxs(TabsTrigger,{value:"pdf",className:"gap-2",children:[jsxRuntimeExports.jsx(Upload,{
720className:"h-4 w-4"}),"Upload PDF"]})]}),jsxRuntimeExports.jsx(TabsContent,{value:"text",className:"mt-4",children:jsxRuntimeExports.jsx(Textarea,{value:i0,onChange:y0=>s0(y0.target.value),placeholder:`Paste your brief here... 721 722Example: 723"Looking for funky disco-pop with high energy, similar to Justin Timberlake or Harry Styles. Male or female vocalist. Summer feel-good vibes. 724 725Direction: 726- Funky, disco-infused dance-pop 727- High-energy, catchy hooks 728- R&B vocals with pop production"`,className:"min-h-[200px] bg-background border-border resize-none"})}),jsxRuntimeExports.jsx(TabsContent,{value:"pdf",className:"mt-4",children:jsxRuntimeExports.jsxs("div",{onDragOver:y0=>{y0.preventDefault(),u0(!0)},onDragLeave:()=>u0(!1),onDrop:A0,className:cn$1("border-2 border-dashed rounded-lg p-8 text-center transition-colors",c0?"border-primary bg-primary/5":"border-border",o0&&"border-primary bg-primary/5"),children:[o0?jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(FileText,{className:"h-12 w-12 text-primary"}),jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground",children:o0.name}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-muted-foreground",children:[(o0.size/1024).toFixed(1)," KB"]}),jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",onClick:()=>l0(null),className:"mt-2",children:[jsxRuntimeExports.jsx(X$2,{className:"h-4 w-4 mr-1"}),"Remove"]})]}):jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(Upload,{className:"h-12 w-12 text-muted-foreground"}),jsxRuntimeExports.jsx("p",{className:"text-foreground font-medium",children:"Drag & drop a PDF file here"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"or"}),jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>{var y0;return(y0=f0.current)==null?void 0:y0.click()},children:"Browse Files"})]}),jsxRuntimeExports.jsx("input",{ref:f0,type:"file",accept:"application/pdf,.pdf",onChange:m0,className:"hidden"})]})})]}),d0&&jsxRuntimeExports.jsx("p",{className:"text-sm text-destructive",children:d0}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",onClick:x0,disabled:!g0,children:"Clear"}),jsxRuntimeExports.jsx(Button,{onClick:p0,disabled:!g0||n0,className:"gap-2",children:n0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}),"Analyzing..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Search,{className:"h-4 w-4"}),"Analyze Brief"]})})]})]})}function BriefEmailDraft({groups:r0,ownerId:e0,briefSummary:n0}){const[a0,i0]=reactExports.useState(!1),[s0,o0]=reactExports.useState(""),[l0,c0]=reactExports.useState({}),[u0,d0]=reactExports.useState(!1),[h0,f0]=reactExports.useState("preview"),p0=Object.keys(l0).length>0,A0=reactExports.useMemo(()=>{if(!r0.length)return"";const y0=["Hi,",""];n0&&y0.push(n0,""),y0.push("Here are songs from our catalog that match your brief:","");for(const b0 of r0){y0.push(`â ${b0.referenceName} â`);for(const E0 of b0.matches)y0.push(` ⢠${E0.song.name} (${E0.song.bpm} BPM, ${E0.song.key} ${E0.song.scale})`),E0.song.dropboxUrl&&isValidDropboxUrl(E0.song.dropboxUrl)&&y0.push(` ${E0.song.dropboxUrl}`);y0.push("")}return y0.push("Best,"),y0.join(` 729`)},[r0,n0]),m0=async()=>{var y0;
729if(!e0){ue$2.error("Sign in required to generate share links");return}if(r0.length){i0(!0);try{const b0={};for(const w0 of r0){const{data:v0,error:S0}=await supabase.functions.invoke("pitch-links",{body:{action:"create",name:`Brief match: ${w0.referenceName}`,ownerId:e0,songIds:w0.matches.map(k0=>k0.song.id)}});if(S0||!((y0=v0==null?void 0:v0.pitch)!=null&&y0.slug))throw S0??new Error("No pitch link returned");b0[w0.referenceName]=`${window.location.origin}/pitch/${v0.pitch.slug}`}c0(b0);const E0=["Hi,",""];n0&&E0.push(n0,""),E0.push("Here are songs from our catalog that match your brief:","");for(const w0 of r0){const v0=b0[w0.referenceName];E0.push(`â ${w0.referenceName} â`),E0.push(`Listen: ${v0}`);for(const S0 of w0.matches)E0.push(` ⢠${S0.song.name} (${S0.song.bpm} BPM, ${S0.song.key} ${S0.song.scale})`),S0.song.dropboxUrl&&isValidDropboxUrl(S0.song.dropboxUrl)&&E0.push(` ${S0.song.dropboxUrl}`);E0.push("")}E0.push("Let me know your thoughts.","","Best,"),o0(E0.join(` 730`)),ue$2.success(`Generated ${r0.length} shareable link${r0.length===1?"":"s"}`)}catch(b0){console.error("Email draft generation failed:",b0),ue$2.error("Failed to generate email draft")}finally{i0(!1)}}},x0=async()=>{const y0=s0||A0;y0&&(await navigator.clipboard.writeText(y0),d0(!0),ue$2.success("Copied to clipboard"),setTimeout(()=>d0(!1),2e3))},g0=async y0=>{await navigator.clipboard.writeText(y0),ue$2.success("Link copied")};return r0.length?jsxRuntimeExports.jsxs("section",{className:"rounded-[28px] bg-card/80 backdrop-blur-xl border border-border/60 shadow-[0_1px_0_hsl(var(--foreground)/0.04),0_20px_60px_-20px_hsl(var(--foreground)/0.15)] overflow-hidden",style:{WebkitBackdropFilter:"blur(20px)"},children:[jsxRuntimeExports.jsxs("header",{className:"px-5 pt-5 pb-4 flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"h-10 w-10 rounded-2xl bg-primary/15 flex items-center justify-center shrink-0",children:jsxRuntimeExports.jsx(Mail,{className:"h-5 w-5 text-primary",strokeWidth:2.25})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("h2",{className:"text-[17px] font-semibold text-foreground leading-tight tracking-tight",children:"Email Draft"}),jsxRuntimeExports.jsxs("p",{className:"text-[13px] text-muted-foreground leading-tight mt-0.5",children:[r0.length," ",r0.length===1?"act":"acts"," · ",r0.reduce((y0,b0)=>y0+b0.matches.length,0)," songs"]})]})]}),jsxRuntimeExports.jsx("div",{className:"px-5",children:jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 gap-1 p-1 bg-muted/60 rounded-xl",children:["preview","text"].map(y0=>jsxRuntimeExports.jsx("button",{onClick:()=>f0(y0),className:cn$1("h-8 rounded-lg text-[13px] font-medium transition-all active:scale-[0.98]",h0===y0?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:y0==="preview"?"Preview":"Plain text"},y0))})}),jsxRuntimeExports.jsx("div",{className:"px-5 pt-4 pb-3",children:h0==="preview"?jsxRuntimeExports.jsxs("div",{className:"space-y-5",children:[n0&&jsxRuntimeExports.jsx("p",{className:"text-[15px] leading-relaxed text-foreground/90 px-1",children:n0}),r0.map(y0=>{const b0=l0[y0.referenceName];return jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("h3",{className:"text-[13px] font-semibold text-muted-foreground uppercase tracking-wide px-3",children:y0.referenceName}),jsxRuntimeExports.jsxs("div",{className:"rounded-2xl bg-background/70 border border-border/60 overflow-hidden",children:[b0&&jsxRuntimeExports.jsxs("button",{onClick:()=>g0(b0),className:"w-full flex items-center gap-3 px-4 py-3 border-b border-border/50 hover:bg-accent/40 active:bg-accent/60 transition-colors text-left",children:[jsxRuntimeExports.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary/15 flex items-center justify-center shrink-0",children:jsxRuntimeExports.jsx(ExternalLink,{className:"h-3.5 w-3.5 text-primary",strokeWidth:2.5})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"text-[15px] text-foreground font-medium leading-tight",children:"Listen to pitch"}),jsxRuntimeExports.jsx("p",{className:"text-[12px] text-muted-foreground truncate mt-0.5",children:b0.replace(/^https?:\/\//,"")})]}),jsxRuntimeExports.jsx(Copy,{className:"h-4 w-4 text-muted-foreground
730/70 shrink-0"})]}),y0.matches.map((E0,w0)=>jsxRuntimeExports.jsxs("div",{className:cn$1("flex items-center gap-3 px-4 py-3",w0<y0.matches.length-1&&"border-b border-border/50"),children:[jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"text-[15px] text-foreground font-medium leading-tight truncate",children:E0.song.name}),jsxRuntimeExports.jsxs("p",{className:"text-[12px] text-muted-foreground mt-0.5",children:[E0.song.bpm," BPM · ",E0.song.key," ",E0.song.scale,E0.song.vocalistGender?` · ${E0.song.vocalistGender}`:""]}),E0.song.dropboxUrl&&isValidDropboxUrl(E0.song.dropboxUrl)&&jsxRuntimeExports.jsxs("a",{href:E0.song.dropboxUrl,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-[12px] text-primary hover:underline max-w-full",onClick:v0=>v0.stopPropagation(),children:[jsxRuntimeExports.jsx(ExternalLink,{className:"h-3 w-3 shrink-0",strokeWidth:2.5}),jsxRuntimeExports.jsx("span",{className:"truncate",children:"Dropbox link"})]})]}),jsxRuntimeExports.jsx("span",{className:"text-[13px] tabular-nums font-semibold text-primary shrink-0",children:E0.score})]},E0.song.id))]})]},y0.referenceName)}),!p0&&jsxRuntimeExports.jsx("p",{className:"text-[13px] text-muted-foreground text-center px-4 pt-1",children:"Tap Generate to create shareable pitch links for each act."})]}):jsxRuntimeExports.jsx(Textarea,{value:s0||A0,onChange:y0=>o0(y0.target.value),className:"font-mono text-[13px] leading-relaxed min-h-[320px] bg-background/70 rounded-2xl border-border/60 resize-none",placeholder:"Email draft will appear hereâ¦"})}),jsxRuntimeExports.jsxs("footer",{className:"px-5 pb-5 pt-2 flex gap-2",children:[jsxRuntimeExports.jsxs(Button,{onClick:m0,disabled:a0,className:"flex-1 h-12 rounded-2xl text-[15px] font-semibold gap-2 shadow-sm active:scale-[0.98] transition-transform",children:[a0?jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}):jsxRuntimeExports.jsx(Sparkles,{className:"h-4 w-4",strokeWidth:2.5}),p0?"Regenerate":"Generate links"]}),jsxRuntimeExports.jsxs(Button,{onClick:x0,variant:"secondary",className:"h-12 rounded-2xl text-[15px] font-semibold gap-2 px-5 active:scale-[0.98] transition-transform",disabled:!s0&&!A0,children:[u0?jsxRuntimeExports.jsx(Check,{className:"h-4 w-4",strokeWidth:2.5}):jsxRuntimeExports.jsx(Copy,{className:"h-4 w-4",strokeWidth:2.5}),u0?"Copied":"Copy"]})]})]}):null}function SongMatchCard({match:r0,currentPlayingSongId:e0,isPlaying:n0,onPlaySong:a0,onNavigateToSong:i0,onSongInteraction:s0}){const[o0,l0]=reactExports.useState(!1),c0=e0===r0.song.id,u0=c0&&n0,d0=r0.adaptationSuggestion&&r0.adaptationSuggestion.length>0,h0=r0.score<70&&d0;return jsxRuntimeExports.jsx("div",{className:cn$1("p-4 border rounded-lg transition-colors",c0&&"border-primary/50 bg-primary/5",h0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border bg-card hover:bg-accent/50"),children:jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full shrink-0",onClick:()=>{a0(r0.song),s0==null||s0(r0.song.id,"play")},children:u0?jsxRuntimeExports.jsx(Pause,{className:"h-5 w-5"}):jsxRuntimeExports.jsx(Play,{className:"h-5 w-5 ml-0.5"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("h4",{className:"font-medium text-foreground truncate",children:r0.song.name}),r0.song.writers&&jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground truncate",children:r0.song.writers})]}),jsxRuntimeExports.jsx("div",{className:"shrink-0",children:jsxRuntimeExports.jsxs(Badge,{className:cn$1("text-sm font-bold px-2.5 py-1",r0.score>=85?"bg-emerald-500/20 text-emerald-400 border-emerald-500/30":r0.score>=70?"bg-amber-500/20 text-amber-400 border-amber-500/30":"bg-muted text-muted-foreground border-border"),children:[r0.score,"%"]})})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 mt-1.5 text-xs text-muted-foreground",children:[jsxRuntimeExports.jsxs("span",{children:[r0.song.bpm," BPM"]}),jsxRuntimeExports.jsx("span",{children:"â¢"}),jsxRuntimeExports.jsxs("span",{children:[r0.song.key," ",r0.song.scale]}),r0.song.genres&&r0.song.genres.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"â¢"}),jsxRuntimeExports.jsx("span",{children:r0.song.genres.join(", ")})]}),r0.song.vocalistGender&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"â¢"}),jsxRuntimeExports.jsx("span",{children:r0.song.vocalistGender})]})]}),r0.reason&&jsxRuntimeExports.jsxs("p",{className:"text-sm text-muted-foreground mt-2 leading-relaxed italic",children:['"',r0.reason,'"']}
730),r0.matchedReferences&&r0.matchedReferences.length>0&&jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:r0.matchedReferences.map((f0,p0)=>jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs bg-primary/10 text-primary border-primary/30",children:[jsxRuntimeExports.jsx(Disc3,{className:"h-3 w-3 mr-1"}),f0]},p0))}),d0&&jsxRuntimeExports.jsxs(Collapsible,{open:o0,onOpenChange:l0,children:[jsxRuntimeExports.jsx(CollapsibleTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"mt-2 h-7 px-2 text-xs text-amber-400 hover:text-amber-300 hover:bg-amber-500/10",children:[jsxRuntimeExports.jsx(Wrench,{className:"h-3 w-3 mr-1"}),"How to adapt this song",o0?jsxRuntimeExports.jsx(ChevronUp,{className:"h-3 w-3 ml-1"}):jsxRuntimeExports.jsx(ChevronDown,{className:"h-3 w-3 ml-1"})]})}),jsxRuntimeExports.jsx(CollapsibleContent,{children:jsxRuntimeExports.jsx("div",{className:"mt-2 p-3 rounded-md bg-amber-500/10 border border-amber-500/20",children:jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntimeExports.jsx(Lightbulb,{className:"h-4 w-4 text-amber-400 mt-0.5 shrink-0"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-amber-200/90 leading-relaxed",children:r0.adaptationSuggestion})]})})})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:()=>{i0(r0.song.id),s0==null||s0(r0.song.id,"navigate")},title:"View in Library",children:jsxRuntimeExports.jsx(ChevronRight,{className:"h-4 w-4"})})]})})}function BriefResults({results:r0,extractedTerms:e0,briefSummary:n0,references:a0,targets:i0=[],referenceTrack:s0,onPlaySong:o0,onNavigateToSong:l0,currentPlayingSongId:c0,isPlaying:u0,onSongInteraction:d0,ownerId:h0,onDownloadResults:f0,isGeneratingDoc:p0}){const A0=n0||a0.length>0;if(r0.length===0&&e0.length===0)return null;if(r0.length===0&&e0.length>0)return jsxRuntimeExports.jsxs("div",{className:"mt-6 p-8 border border-border rounded-lg bg-muted/20 text-center",children:[jsxRuntimeExports.jsx(FileQuestion,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),jsxRuntimeExports.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:"No Matches Found"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"No songs in your library match the requirements from this brief."}),e0.length>0&&jsxRuntimeExports.jsxs("div",{className:"text-sm text-muted-foreground",children:[jsxRuntimeExports.jsx("p",{className:"mb-2",children:"References we looked for:"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1 justify-center",children:e0.slice(0,20).map((g0,y0)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:g0},y0))})]})]});const m0=A0?i0.length>0?groupMatchesByTarget(r0,i0):groupMatchesByReference(r0,a0):null;r0.filter(g0=>g0.score>=70);const x0=r0.filter(g0=>g0.score<70&&g0.adaptationSuggestion&&g0.adaptationSuggestion.length>0);return jsxRuntimeExports.jsxs("div",{className:"mt-6 space-y-6",children:[f0&&r0.length>0&&jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[jsxRuntimeExports.jsx("span",{className:"text-sm text-muted-foreground mr-1",children:"Download results:"}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>f0("pdf"),disabled:!!p0,children:[p0==="pdf"?jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 mr-1.5 animate-spin"}):jsxRuntimeExports.jsx(FileDown,{className:"h-4 w-4 mr-1.5"}),"PDF"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:()=>f0("docx"),disabled:!!p0,children:[p0==="docx"?jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 mr-1.5 animate-spin"}):jsxRuntimeExports.jsx(FileDown,{className:"h-4 w-4 mr-1.5"}),"Word"]})]}),m0&&m0.length>0&&jsxRuntimeExports.jsx(BriefEmailDraft,{groups:m0,ownerId:h0,briefSummary:n0}),s0&&jsxRuntimeExports.jsx(Card,{className:"border-border bg-muted/30",children:jsxRuntimeExports.jsx(CardContent,{className:"py-3 px-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[jsxRuntimeExports.jsx(Disc3,{className:"h-4 w-4 text-primary shrink-0"}),jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"Matched against:"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-foreground",children:s0.title&&s0.artist?`${s0.title} by ${s0.artist}`:s0.title||s0.youtube_url||"Reference track"}),(s0.bpm||s0.key||s0.energy)&&jsxRuntimeExports.jsxs("span",{className:"text-muted-foreground",children:["â",s0.bpm?` ${s0.bpm} BPM`:"",s0.key?`, ${s0.key}`:"",s0.energy?`, ${s0.energy} energy`:""]})]})})}),n0&&jsxRuntimeExports.jsxs(Card,{className:"border-primary/30 bg-primary/5",children:[jsxRuntimeExports.jsx(CardHeader,{className:"pb-3",children:jsxRuntimeExports.jsxs(CardTitle,{className:"text-base flex items-center gap-2",children:[jsxRuntimeExports.jsx(Lightbulb,{className:"h-5 w-5 text-primary"}),"Brief Analysis"]})}),jsxRuntimeExports.jsx(CardContent,{children:jsxRuntimeExports.jsx("p",{className:"text-sm text-foreground
730/90 leading-relaxed",children:n0})})]}),a0.length>0&&jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Reference Tracks Identified"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2",children:a0.map((g0,y0)=>jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-border bg-card",children:[jsxRuntimeExports.jsx(Disc3,{className:"h-3.5 w-3.5 text-primary"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-foreground",children:g0.name}),jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:["â ",g0.description]})]},y0))})]}),m0&&m0.length>0?jsxRuntimeExports.jsx("div",{className:"space-y-6",children:m0.map((g0,y0)=>jsxRuntimeExports.jsx(Collapsible,{defaultOpen:!0,children:jsxRuntimeExports.jsxs("div",{className:"space-y-3",children:[jsxRuntimeExports.jsxs(CollapsibleTrigger,{className:"flex items-center gap-2 w-full text-left group",children:[jsxRuntimeExports.jsx(Disc3,{className:"h-4 w-4 text-primary"}),jsxRuntimeExports.jsx("h3",{className:"text-base font-semibold text-foreground flex-1",children:g0.referenceName}),jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:g0.matches.length}),jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4 text-muted-foreground group-data-[state=open]:rotate-180 transition-transform"})]}),jsxRuntimeExports.jsx(CollapsibleContent,{children:jsxRuntimeExports.jsx("div",{className:"space-y-2 pl-6",children:g0.matches.map(b0=>jsxRuntimeExports.jsx(SongMatchCard,{match:b0,currentPlayingSongId:c0,isPlaying:u0,onPlaySong:o0,onNavigateToSong:l0,onSongInteraction:d0},`${y0}-${b0.song.id}`))})})]})},y0))}):jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:jsxRuntimeExports.jsxs("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[jsxRuntimeExports.jsx(Music,{className:"h-5 w-5 text-primary"}),"Matching Songs",jsxRuntimeExports.jsx(Badge,{variant:"secondary",children:r0.length})]})}),e0.length>0&&jsxRuntimeExports.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Matched keywords:"}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-1",children:[e0.slice(0,15).map((g0,y0)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:g0},y0)),e0.length>15&&jsxRuntimeExports.jsxs("span",{className:"text-xs text-muted-foreground self-center ml-1",children:["+",e0.length-15," more"]})]})]}),jsxRuntimeExports.jsx("div",{className:"space-y-2",children:r0.map(g0=>jsxRuntimeExports.jsx(SongMatchCard,{match:g0,currentPlayingSongId:c0,isPlaying:u0,onPlaySong:o0,onNavigateToSong:l0,onSongInteraction:d0},g0.song.id))})]}),A0&&x0.length>0&&jsxRuntimeExports.jsx(Collapsible,{defaultOpen:!0,children:jsxRuntimeExports.jsxs("div",{className:"space-y-3",children:[jsxRuntimeExports.jsxs(CollapsibleTrigger,{className:"flex items-center gap-2 w-full text-left group",children:[jsxRuntimeExports.jsx(Wrench,{className:"h-4 w-4 text-amber-400"}),jsxRuntimeExports.jsx("h3",{className:"text-base font-semibold text-amber-400 flex-1",children:"Could Be Adapted"}),jsxRuntimeExports.jsx(Badge,{className:"text-xs bg-amber-500/20 text-amber-400 border-amber-500/30",children:x0.length}),jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4 text-muted-foreground group-data-[state=open]:rotate-180 transition-transform"})]}),jsxRuntimeExports.jsxs(CollapsibleContent,{children:[jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground mb-3 pl-6",children:"These songs have the right musical foundations but could be reproduced to better fit the brief."}),jsxRuntimeExports.jsx("div",{className:"space-y-2 pl-6",children:x0.map(g0=>jsxRuntimeExports.jsx(SongMatchCard,{match:g0,currentPlayingSongId:c0,isPlaying:u0,onPlaySong:o0,onNavigateToSong:l0,onSongInteraction:d0},`adapt-${g0.song.id}`))})]})]})})]})}function groupMatchesByReference(r0,e0){const n0=[],a0=r0.filter(o0=>o0.score>=70);for(const o0 of e0){const l0=a0.filter(c0=>{var u0;return(u0=c0.matchedReferences)==null?void 0:u0.some(d0=>d0.toLowerCase().includes(o0.name.toLowerCase())||o0.name.toLowerCase().includes(d0.toLowerCase()))});l0.length>0&&n0.push({referenceName:o0.name,matches:l0.sort((c0,u0)=>u0.score-c0.score)})}const i0=new Set(n0.flatMap(o0=>o0.matches.map(l0=>l0.song.id))),s0=a0.filter(o0=>!i0.has(o0.song.id));return s0.length>0&&n0.push({referenceName:"General Matches",matches:s0.sort((o0,l0)=>l0.score-o0.score)}),n0}function groupMatchesByTarget(r0,e0){const n0=[],a0=r0.filter(o0=>o0.score>=70);for(const o0 of e0){const l0=a0.filter(c0=>{var d0,h0;return((d0=c0.matchedTargets)==null?void 0:d0.some(f0=>f0.toLowerCase()===o0.name.toLowerCase()||f0.toLowerCase().includes(o0.name.toLowerCase())))?!0:(h0=c0.matchedReferences)==null?void 0:h0.some(f0=>{var p0;return(p0=o0.references)==null?void 0:p0.some(A0=>f0.toLowerCase().includes(A0.toLowerCase())||A0.toLowerCase().includes(f0.toLowerCase()))})});if(l0.length>0){const c0=o0.label?`${o0.name} [${o0.label}
730]`:o0.name;n0.push({referenceName:c0,matches:l0.sort((u0,d0)=>d0.score-u0.score)})}}const i0=new Set(n0.flatMap(o0=>o0.matches.map(l0=>l0.song.id))),s0=a0.filter(o0=>!i0.has(o0.song.id));return s0.length>0&&n0.push({referenceName:"General Matches",matches:s0.sort((o0,l0)=>l0.score-o0.score)}),n0}var __webpack_require__={};__webpack_require__.d=(r0,e0)=>{for(var n0 in e0)__webpack_require__.o(e0,n0)&&!__webpack_require__.o(r0,n0)&&Object.defineProperty(r0,n0,{enumerable:!0,get:e0[n0]})};__webpack_require__.o=(r0,e0)=>Object.prototype.hasOwnProperty.call(r0,e0);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version});const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_editor_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(r0){Number.isInteger(r0)&&(verbosity=r0)}function getVerbosityLevel(){return verbosity}function info(r0){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${r0}`)}function warn(r0){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${r0}`)}function unreachable(r0){throw new Error(r0)}function assert(r0,e0){r0||unreachable(e0)}function _isValidProtocol(r0){switch(r0==null?void 0:r0.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(r0,e0=null,n0=null){if(!r0)return null;try{if(n0&&typeof r0=="string"){if(n0.addDefaultProtocol&&r0.startsWith("www.")){const i0=r0.match(/\./g);(i0==null?void 0:i0.length)>=2&&(r0=`http://${r0}`)}if(n0.tryConvertEncoding)try{r0=stringToUTF8String(r0)}catch{}}const a0=e0?new URL(r0,e0):new URL(r0);if(_isValidProtocol(a0))return a0}catch{}return null}function shadow(r0,e0,n0,a0=!1){return Object.defineProperty(r0,e0,{value:n0,enumerable:!a0,configurable:!0,writable:!1}),n0}const BaseException=function r0(){function e0(n0,a0){this.message=n0,this.name=a0}return e0.prototype=new Error,e0.constructor=e0,e0}();class PasswordException extends BaseException{constructor(e0,n0){super(e0,"PasswordException"),this.code=n0}}class UnknownErrorException extends BaseException{constructor(e0,n0){super(e0,"UnknownErrorException"),this.details=n0}}class InvalidPDFException extends BaseException{constructor(e0){super(e0,"InvalidPDFException")}}class MissingPDFException extends BaseException{constructor(e0){super(e0,"MissingPDFException")}}class UnexpectedResponseException extends BaseException{constructor(e0,n0){super(e0,"UnexpectedResponseException"),this.status=n0}}class FormatError extends BaseException{constructor(e0){super(e0,"FormatError")}}class AbortException extends BaseException{constructor(e0){super(e0,"AbortException")}}function bytesToString(r0){(typeof r0!="object"||(r0==null?void 0:r0.length)===void 0)&&unreachable("Invalid argument for bytesToString");
730const e0=r0.length,n0=8192;if(e0<n0)return String.fromCharCode.apply(null,r0);const a0=[];for(let i0=0;i0<e0;i0+=n0){const s0=Math.min(i0+n0,e0),o0=r0.subarray(i0,s0);a0.push(String.fromCharCode.apply(null,o0))}return a0.join("")}function stringToBytes(r0){typeof r0!="string"&&unreachable("Invalid argument for stringToBytes");const e0=r0.length,n0=new Uint8Array(e0);for(let a0=0;a0<e0;++a0)n0[a0]=r0.charCodeAt(a0)&255;return n0}function string32(r0){return String.fromCharCode(r0>>24&255,r0>>16&255,r0>>8&255,r0&255)}function objectFromMap(r0){const e0=Object.create(null);for(const[n0,a0]of r0)e0[n0]=a0;return e0}function isLittleEndian(){const r0=new Uint8Array(4);return r0[0]=1,new Uint32Array(r0.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?shadow(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):shadow(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var e0,n0;return shadow(this,"isCSSRoundSupported",(n0=(e0=globalThis.CSS)==null?void 0:e0.supports)==null?void 0:n0.call(e0,"width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),r0=>r0.toString(16).padStart(2,"0"));var p$,x2,f3;class Util{static makeHexColor(e0,n0,a0){return`#${hexNumbers[e0]}${hexNumbers[n0]}${hexNumbers[a0]}`}static scaleMinMax(e0,n0){let a0;e0[0]?(e0[0]<0&&(a0=n0[0],n0[0]=n0[2],n0[2]=a0),n0[0]*=e0[0],n0[2]*=e0[0],e0[3]<0&&(a0=n0[1],n0[1]=n0[3],n0[3]=a0),n0[1]*=e0[3],n0[3]*=e0[3]):(a0=n0[0],n0[0]=n0[1],n0[1]=a0,a0=n0[2],n0[2]=n0[3],n0[3]=a0,e0[1]<0&&(a0=n0[1],n0[1]=n0[3],n0[3]=a0),n0[1]*=e0[1],n0[3]*=e0[1],e0[2]<0&&(a0=n0[0],n0[0]=n0[2],n0[2]=a0),n0[0]*=e0[2],n0[2]*=e0[2]),n0[0]+=e0[4],n0[1]+=e0[5],n0[2]+=e0[4],n0[3]+=e0[5]}static transform(e0,n0){return[e0[0]*n0[0]+e0[2]*n0[1],e0[1]*n0[0]+e0[3]*n0[1],e0[0]*n0[2]+e0[2]*n0[3],e0[1]*n0[2]+e0[3]*n0[3],e0[0]*n0[4]+e0[2]*n0[5]+e0[4],e0[1]*n0[4]+e0[3]*n0[5]+e0[5]]}static applyTransform(e0,n0){const a0=e0[0]*n0[0]+e0[1]*n0[2]+n0[4],i0=e0[0]*n0[1]+e0[1]*n0[3]+n0[5];return[a0,i0]}static applyInverseTransform(e0,n0){const a0=n0[0]*n0[3]-n0[1]*n0[2],i0=(e0[0]*n0[3]-e0[1]*n0[2]+n0[2]*n0[5]-n0[4]*n0[3])/a0,s0=(-e0[0]*n0[1]+e0[1]*n0[0]+n0[4]*n0[1]-n0[5]*n0[0])/a0;return[i0,s0]}static getAxialAlignedBoundingBox(e0,n0){const a0=this.applyTransform(e0,n0),i0=this.applyTransform(e0.slice(2,4),n0),s0=this.applyTransform([e0[0],e0[3]],n0),o0=this.applyTransform([e0[2],e0[1]],n0);return[Math.min(a0[0],i0[0],s0[0],o0[0]),Math.min(a0[1],i0[1],s0[1],o0[1]),Math.max(a0[0],i0[0],s0[0],o0[0]),Math.max(a0[1],i0[1],s0[1],o0[1])]}static inverseTransform(e0){const n0=e0[0]*e0[3]-e0[1]*e0[2];return[e0[3]/n0,-e0[1]/n0,-e0[2]/n0,e0[0]/n0,(e0[2]*e0[5]-e0[4]*e0[3])/n0,(e0[4]*e0[1]-e0[5]*e0[0])/n0]}static singularValueDecompose2dScale(e0){const n0=[e0[0],e0[2],e0[1],e0[3]],a0=e0[0]*n0[0]+e0[1]*n0[2],i0=e0[0]*n0[1]+e0[1]*n0[3],s0=e0[2]*n0[0]+e0[3]*n0[2],o0=e0[2]*n0[1]+e0[3]*n0[3],l0=(a0+o0)/2,c0=Math.sqrt((a0+o0)**2-4*(a0*o0-s0*i0))/2,u0=l0+c0||1,d0=l0-c0||1;return[Math.sqrt(u0),Math.sqrt(d0)]}static normalizeRect(e0){const n0=e0.slice(0);return e0[0]>e0[2]&&(n0[0]=e0[2],n0[2]=e0[0]),e0[1]>e0[3]&&(n0[1]=e0[3],n0[3]=e0[1]),n0}static intersect(e0,n0){const a0=Math.max(Math.min(e0[0],e0[2]),Math.min(n0[0],n0[2])),i0=Math.min(Math.max(e0[0],e0[2]),Math.max(n0[0],n0[2]));if(a0>i0)return null;const s0=Math.max(Math.min(e0[1],e0[3]),Math.min(n0[1],n0[3])),o0=Math.min(Math.max(e0[1],e0[3]),Math.max(n0[1],n0[3]));return s0>o0?null:[a0,s0,i0,o0]}static bezierBoundingBox(e0,n0,a0,i0,s0,o0,l0,c0,u0){return u0?(u0[0]=Math.min(u0[0],e0,l0),u0[1]=Math.min(u0[1],n0,c0),u0[2]=Math.max(u0[2],e0,l0),u0[3]=Math.max(u0[3],n0,c0)):u0=[Math.min(e0,l0),Math.min(n0,
730c0),Math.max(e0,l0),Math.max(n0,c0)],H0(this,p$,f3).call(this,e0,a0,s0,l0,n0,i0,o0,c0,3*(-e0+3*(a0-s0)+l0),6*(e0-2*a0+s0),3*(a0-e0),u0),H0(this,p$,f3).call(this,e0,a0,s0,l0,n0,i0,o0,c0,3*(-n0+3*(i0-o0)+c0),6*(n0-2*i0+o0),3*(i0-n0),u0),u0}}p$=new WeakSet,x2=function(e0,n0,a0,i0,s0,o0,l0,c0,u0,d0){if(u0<=0||u0>=1)return;const h0=1-u0,f0=u0*u0,p0=f0*u0,A0=h0*(h0*(h0*e0+3*u0*n0)+3*f0*a0)+p0*i0,m0=h0*(h0*(h0*s0+3*u0*o0)+3*f0*l0)+p0*c0;d0[0]=Math.min(d0[0],A0),d0[1]=Math.min(d0[1],m0),d0[2]=Math.max(d0[2],A0),d0[3]=Math.max(d0[3],m0)},f3=function(e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0){if(Math.abs(u0)<1e-12){Math.abs(d0)>=1e-12&&H0(this,p$,x2).call(this,e0,n0,a0,i0,s0,o0,l0,c0,-h0/d0,f0);return}const p0=d0**2-4*h0*u0;if(p0<0)return;const A0=Math.sqrt(p0),m0=2*u0;H0(this,p$,x2).call(this,e0,n0,a0,i0,s0,o0,l0,c0,(-d0+A0)/m0,f0),H0(this,p$,x2).call(this,e0,n0,a0,i0,s0,o0,l0,c0,(-d0-A0)/m0,f0)},K0(Util,p$);function stringToUTF8String(r0){return decodeURIComponent(escape(r0))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(r0){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ï¬
","ſt"]])),r0.replaceAll(NormalizeRegex,(e0,n0,a0)=>n0?n0.normalize("NFKC"):NormalizationMap.get(a0))}function getUuid(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const r0=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(r0);else for(let e0=0;e0<32;e0++)r0[e0]=Math.floor(Math.random()*255);return bytesToString(r0)}const AnnotationPrefix="pdfjs_internal_id_",FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(r0){return Uint8Array.prototype.toBase64?r0.toBase64():btoa(bytesToString(r0))}const SVG_NS="http://www.w3.org/2000/svg",sP=class sP{};Gw(sP,"CSS",96),Gw(sP,"PDF",72),Gw(sP,"PDF_TO_CSS_UNITS",sP.CSS/sP.PDF);let PixelsPerInch=sP;async function fetchData(r0,e0="text"){if(isValidFetchUrl(r0,document.baseURI)){const n0=await fetch(r0);if(!n0.ok)throw new Error(n0.statusText);switch(e0){case"arraybuffer":return n0.arrayBuffer();case"blob":return n0.blob();case"json":return n0.json()}return n0.text()}return new Promise((n0,a0)=>{const i0=new XMLHttpRequest;i0.open("GET",r0,!0),i0.responseType=e0,i0.onreadystatechange=()=>{if(i0.readyState===XMLHttpRequest.DONE){if(i0.status===200||i0.status===0){switch(e0){case"arraybuffer":case"blob":case"json":n0(i0.response);return}n0(i0.responseText);return}a0(new Error(i0.statusText))}},i0.send(null)})}class PageViewport{constructor({viewBox:e0,scale:n0,rotation:a0,offsetX:i0=0,offsetY:s0=0,dontFlip:o0=!1}){this.viewBox=e0,this.scale=n0,this.rotation=a0,this.offsetX=i0,this.offsetY=s0;const l0=(e0[2]+e0[0])/2,c0=(e0[3]+e0[1])/2;let u0,d0,h0,f0;switch(a0%=360,a0<0&&(a0+=360),a0){case 180:u0=-1,d0=0,h0=0,f0=1;break;case 90:u0=0,d0=1,h0=1,f0=0;break;case 270:u0=0,d0=-1,h0=-1,f0=0;break;case 0:u0=1,d0=0,h0=0,f0=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o0&&(h0=-h0,f0=-f0);let p0,A0,m0,x0;u0===0?(p0=Math.abs(c0-e0[1])*n0+i0,A0=Math.abs(l0-e0[0])*n0+s0,m0=(e0[3]-e0[1])*n0,x0=(e0[2]-e0[0])*n0):(p0=Math.abs(l0-e0[0])*n0+i0,A0=Math.abs(c0-e0[1])*n0+s0,m0=(e0[2]-e0[0])*n0,x0=(e0[3]-e0[1])*n0),this.transform=[u0*n0,d0*n0,h0*n0,f0*n0,p0-u0*n0*l0-h0*n0*c0,A0-d0*n0*l0-f0*n0*c0],this.width=m0,this.height=x0}get rawDims(){const{viewBox:e0}=this;return shadow(this,"rawDims",{pageWidth:e0[2]-e0[0],pageHeight:e0[3]-e0[1],pageX:e0[0],pageY:e0[1]})}clone({scale:e0=this.scale,rotation:n0=this.rotation,offsetX:a0=this.offsetX,offsetY:i0=this.offsetY,dontFlip:s0=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:e0,rotation:n0,offsetX:a0,offsetY:i0,dontFlip:s0})}convertToViewportPoint(e0,n0){return Util.applyTransform([e0,n0],this.transform)}convertToViewportRectangle(e0){const n0=Util.applyTransform([e0[0],e0[1]],this.transform),a0=Util.applyTransform([e0[2],e0[3]],this.transform);return[n0[0],n0[1],a0[0],a0[1]]}convertToPdfPoint(e0,n0){return Util.applyInverseTransform([e0,n0],this.transform)}}class RenderingCancelledException extends BaseException{constructor(e0,n0=0){super(e0,"RenderingCancelledException"),this.extraDelay=n0}}
730function isDataScheme(r0){const e0=r0.length;let n0=0;for(;n0<e0&&r0[n0].trim()==="";)n0++;return r0.substring(n0,n0+5).toLowerCase()==="data:"}function isPdfFile(r0){return typeof r0=="string"&&/\.pdf$/i.test(r0)}function getFilenameFromUrl(r0){return[r0]=r0.split(/[#?]/,1),r0.substring(r0.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(r0,e0="document.pdf"){if(typeof r0!="string")return e0;if(isDataScheme(r0))return warn('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e0;const n0=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,a0=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i0=n0.exec(r0);let s0=a0.exec(i0[1])||a0.exec(i0[2])||a0.exec(i0[3]);if(s0&&(s0=s0[0],s0.includes("%")))try{s0=a0.exec(decodeURIComponent(s0))[0]}catch{}return s0||e0}class StatTimer{constructor(){Gw(this,"started",Object.create(null));Gw(this,"times",[])}time(e0){e0 in this.started&&warn(`Timer is already running for ${e0}`),this.started[e0]=Date.now()}timeEnd(e0){e0 in this.started||warn(`Timer has not been started for ${e0}`),this.times.push({name:e0,start:this.started[e0],end:Date.now()}),delete this.started[e0]}toString(){const e0=[];let n0=0;for(const{name:a0}of this.times)n0=Math.max(a0.length,n0);for(const{name:a0,start:i0,end:s0}of this.times)e0.push(`${a0.padEnd(n0)} ${s0-i0}ms 731`);return e0.join("")}}function isValidFetchUrl(r0,e0){try{const{protocol:n0}=e0?new URL(r0,e0):new URL(r0);return n0==="http:"||n0==="https:"}catch{return!1}}function noContextMenu(r0){r0.preventDefault()}function deprecated(r0){console.log("Deprecated API usage: "+r0)}var r4;class PDFDateString{static toDateObject(e0){if(!e0||typeof e0!="string")return null;_0(this,r4)||V0(this,r4,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const n0=_0(this,r4).exec(e0);if(!n0)return null;const a0=parseInt(n0[1],10);let i0=parseInt(n0[2],10);i0=i0>=1&&i0<=12?i0-1:0;let s0=parseInt(n0[3],10);s0=s0>=1&&s0<=31?s0:1;let o0=parseInt(n0[4],10);o0=o0>=0&&o0<=23?o0:0;let l0=parseInt(n0[5],10);l0=l0>=0&&l0<=59?l0:0;let c0=parseInt(n0[6],10);c0=c0>=0&&c0<=59?c0:0;const u0=n0[7]||"Z";let d0=parseInt(n0[8],10);d0=d0>=0&&d0<=23?d0:0;let h0=parseInt(n0[9],10)||0;return h0=h0>=0&&h0<=59?h0:0,u0==="-"?(o0+=d0,l0+=h0):u0==="+"&&(o0-=d0,l0-=h0),new Date(Date.UTC(a0,i0,s0,o0,l0,c0))}}r4=new WeakMap,K0(PDFDateString,r4);function getXfaPageViewport(r0,{scale:e0=1,rotation:n0=0}){const{width:a0,height:i0}=r0.attributes.style,s0=[0,0,parseInt(a0),parseInt(i0)];return new PageViewport({viewBox:s0,scale:e0,rotation:n0})}function getRGB(r0){if(r0.startsWith("#")){const e0=parseInt(r0.slice(1),16);return[(e0&16711680)>>16,(e0&65280)>>8,e0&255]}return r0.startsWith("rgb(")?r0.slice(4,-1).split(",").map(e0=>parseInt(e0)):r0.startsWith("rgba(")?r0.slice(5,-1).split(",").map(e0=>parseInt(e0)).slice(0,3):(warn(`Not a valid color format: "${r0}"`),[0,0,0])}function getColorValues(r0){const e0=document.createElement("span");e0.style.visibility="hidden",document.body.append(e0);for(const n0 of r0.keys()){e0.style.color=n0;const a0=window.getComputedStyle(e0).color;r0.set(n0,getRGB(a0))}e0.remove()}function getCurrentTransform(r0){const{a:e0,b:n0,c:a0,d:i0,e:s0,f:o0}=r0.getTransform();return[e0,n0,a0,i0,s0,o0]}function getCurrentTransformInverse(r0){const{a:e0,b:n0,c:a0,d:i0,e:s0,f:o0}=r0.getTransform().invertSelf();return[e0,n0,a0,i0,s0,o0]}function setLayerDimensions(r0,e0,n0=!1,a0=!0){if(e0 instanceof PageViewport){const{pageWidth:i0,pageHeight:s0}=e0.rawDims,{style:o0}=r0,l0=util_FeatureTest.isCSSRoundSupported,c0=`var(--scale-factor) * ${i0}px`,u0=`var(--scale-factor) * ${s0}px`,d0=l0?`round(down, ${c0}, var(--scale-round-x, 1px))`:`calc(${c0})`,h0=l0?`round(down, ${u0}, var(--scale-round-y, 1px))`:`calc(${u0})`;!n0||e0.rotation%180===0?(o0.width=d0,o0.height=h0):(o0.width=h0,o0.height=d0)}a0&&r0.setAttribute("data-main-rotation",e0.rotation)}class OutputScale{constructor(){const e0=window.devicePixelRatio||1;this.sx=e0,this.sy=e0}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}var T$,pP,iR,mP,n4,a4,K2,R5,C_,I5,N5,y2,j5,p3;const VR=class VR{constructor(e0){K0(this,C_);K0(this,T$,null);K0(this,pP,null);K0(this,iR);K0(this,mP,null);K0(this,n4,null);V0(this,iR,e0),_0(VR,a4)||V0(VR,a4,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const e0=V0(this,T$,document.createElement("div"));e0.classList.add("editToolbar","hidden"),e0.setAttribute("role","toolbar");const n0=_0(this,iR)._uiManager._signal;e0.addEventListener("contextmenu",noContextMenu,{signal:n0}),e0.addEventListener("pointerdown",H0(VR,K2,R5),{signal:n0});const a0=V0(this,mP,document.createElement("div"));a0.className="buttons",e0.append(a0);const i0=_0(this,iR).toolbarPosition;if(i0){const{style:s0}=e0,o0=_0(this,iR)._uiManager.direction==="ltr"?1-i0[0]:i0[0];s0.insetInlineEnd=`${100*o0}%`,s0.top=`calc(${100*i0[1]}% + var(--editor-toolbar-vert-offset))`}return H0(this,C_,j5).call(this),e0}get div(){return _0(this,T$)}hide(){var e0;_0(this,T$).classList.add("hidden"),(e0=_0(this,pP))==null||e0.hideDropdown()}show(){var e0;_0(this,T$).classList.remove("hidden"),(e0=_0(this,n4))==null||e0.shown()}async addAltText(e0){const n0=await e0.render();H0(this,C_,y2).call(this,n0),_0(this,mP).prepend(n0,_0(this,C_,p3)),V0(this,n4,e0)}addColorPicker(e0){V0(this,pP,e0);const n0=e0.renderButton();H0(this,C_,y2).call(this,n0),_0(this,mP).prepend(n0,_0(this,C_,p3))}remove(){var e0;_0(this,T$).remove(),(e0=_0(this,pP))==null||e0.destroy(),V0(this,pP,null)}};T$=new WeakMap,pP=new WeakMap,iR=new WeakMap,mP=new WeakMap,n4=new WeakMap,a4=new WeakMap,K2=new WeakSet,R5=function(e0){e0.stopPropagation()},C_=new WeakSet,I5=function(e0){_0(this,iR)._focusEventsAllowed=!1,e0.preventDefault(),e0.stopPropagation()},N5=function(e0){_0(this,iR)._focusEventsAllowed=!0,e0.preventDefault(),e0.stopPropagation()},y2=function(e0){const n0=_0(this,iR)._uiManager._signal;e0.addEventListener("focusin",H0(this,C_,I5).bind(this),{capture:!0,signal:n0}),e0.addEventListener("focusout",H0(this,C_,N5).bind(this),{capture:!0,signal:n0}),e0.addEventListener("contextmenu",noContextMenu,{signal:n0})},j5=function(){const{editorType:e0,_uiManager:n0}=_0(this,iR),a0=document.createElement("button");a0.className="delete",a0.tabIndex=0,a0.setAttribute("data-l10n-id",_0(VR,a4)[e0]),H0(this,C_,y2).call(this,a0),a0.addEventListener("click",i0=>{n0.delete()},{signal:n0._signal}),_0(this,mP).append(a0)},p3=function(){const e0=document.createElement("div");return e0.className="divider",e0},K0(VR,K2),K0(VR,a4,null);let EditorToolbar=VR;var i4,AP,gP,Z$,$5,P5,M5;class HighlightToolbar{constructor(e0){K0(this,Z$);K0(this,i4,null);K0(this,AP,null);K0(this,gP);V0(this,gP,e0)}show(e0,n0,a0){const[i0,s0]=H0(this,Z$,P5).call(this,n0,a0),{style:o0}=_0(this,AP)||V0(this,AP,H0(this,Z$,$5).call(this));e0.append(_0(this,AP)),o0.insetInlineEnd=`${100*i0}%`,o0.top=`calc(${100*s0}% + var(--editor-toolbar-vert-offset))`}hide(){_0(this,AP).remove()}}i4=new WeakMap,AP=new WeakMap,gP=new WeakMap,Z$=new WeakSet,$5=function(){const e0=V0(this,AP,document.createElement("div"));e0.className="editToolbar",e0.setAttribute("role","toolbar"),e0.addEventListener("contextmenu",noContextMenu,{signal:_0(this,gP)._signal});const n0=V0(this,i4,document.createElement("div"));return n0.className="buttons",e0.append(n0),H0(this,Z$,M5).call(this),e0},P5=function(e0,n0){let a0=0,i0=0;for(const s0 of e0){const o0=s0.y+s0.height;if(o0<a0)continue;const l0=s0.x+(n0?s0.width:0);if(o0>a0){i0=l0,a0=o0;continue}n0?l0>i0&&(i0=l0):l0<i0&&(i0=l0)}return[n0?1-i0:i0,a0]},M5=function(){const e0=document.createElement("button");e0.className="highlightButton",e0.tabIndex=0,e0.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const n0=document.createElement("span");e0.append(n0),n0.className="visuallyHidden",n0.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const a0=_0(this,gP)._signal;e0.addEventListener("contextmenu",noContextMenu,{signal:a0}),e0.addEventListener("click",()=>{_0(this,gP).highlightSelection("floating_button")},{signal:a0}),_0(this,i4).append(e0)};function bindEvents(r0,e0,n0){for(const a0 of n0)e0.addEventListener(a0,r0[a0].bind(r0))}function opacityToHex(r0){return Math.round(Math.min(255,Math.max(1,255*r0))).toString(16).padStart(2,"0")}var Q2;class IdManager{constructor(){K0(this,Q2,0)}get id(){return`${AnnotationEditorPrefix}${o_(this,Q2)._++}`}}Q2=new WeakMap;var UL,s4,v_,zL,b2;
731const d5=class d5{constructor(){K0(this,zL);K0(this,UL,getUuid());K0(this,s4,0);K0(this,v_,null)}static get _isSVGFittingCanvas(){const e0='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',a0=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i0=new Image;i0.src=e0;const s0=i0.decode().then(()=>(a0.drawImage(i0,0,0,1,1,0,0,1,3),new Uint32Array(a0.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,"_isSVGFittingCanvas",s0)}async getFromFile(e0){const{lastModified:n0,name:a0,size:i0,type:s0}=e0;return H0(this,zL,b2).call(this,`${n0}_${a0}_${i0}_${s0}`,e0)}async getFromUrl(e0){return H0(this,zL,b2).call(this,e0,e0)}async getFromBlob(e0,n0){const a0=await n0;return H0(this,zL,b2).call(this,e0,a0)}async getFromId(e0){_0(this,v_)||V0(this,v_,new Map);const n0=_0(this,v_).get(e0);if(!n0)return null;if(n0.bitmap)return n0.refCounter+=1,n0;if(n0.file)return this.getFromFile(n0.file);if(n0.blobPromise){const{blobPromise:a0}=n0;return delete n0.blobPromise,this.getFromBlob(n0.id,a0)}return this.getFromUrl(n0.url)}getFromCanvas(e0,n0){_0(this,v_)||V0(this,v_,new Map);let a0=_0(this,v_).get(e0);if(a0!=null&&a0.bitmap)return a0.refCounter+=1,a0;const i0=new OffscreenCanvas(n0.width,n0.height);return i0.getContext("2d").drawImage(n0,0,0),a0={bitmap:i0.transferToImageBitmap(),id:`image_${_0(this,UL)}_${o_(this,s4)._++}`,refCounter:1,isSvg:!1},_0(this,v_).set(e0,a0),_0(this,v_).set(a0.id,a0),a0}getSvgUrl(e0){const n0=_0(this,v_).get(e0);return n0!=null&&n0.isSvg?n0.svgUrl:null}deleteId(e0){var i0;_0(this,v_)||V0(this,v_,new Map);const n0=_0(this,v_).get(e0);if(!n0||(n0.refCounter-=1,n0.refCounter!==0))return;const{bitmap:a0}=n0;if(!n0.url&&!n0.file){const s0=new OffscreenCanvas(a0.width,a0.height);s0.getContext("bitmaprenderer").transferFromImageBitmap(a0),n0.blobPromise=s0.convertToBlob()}(i0=a0.close)==null||i0.call(a0),n0.bitmap=null}isValidId(e0){return e0.startsWith(`image_${_0(this,UL)}_`)}};UL=new WeakMap,s4=new WeakMap,v_=new WeakMap,zL=new WeakSet,b2=async function(e0,n0){_0(this,v_)||V0(this,v_,new Map);let a0=_0(this,v_).get(e0);if(a0===null)return null;if(a0!=null&&a0.bitmap)return a0.refCounter+=1,a0;try{a0||(a0={bitmap:null,id:`image_${_0(this,UL)}_${o_(this,s4)._++}`,refCounter:0,isSvg:!1});let i0;if(typeof n0=="string"?(a0.url=n0,i0=await fetchData(n0,"blob")):n0 instanceof File?i0=a0.file=n0:n0 instanceof Blob&&(i0=n0),i0.type==="image/svg+xml"){const s0=d5._isSVGFittingCanvas,o0=new FileReader,l0=new Image,c0=new Promise((u0,d0)=>{l0.onload=()=>{a0.bitmap=l0,a0.isSvg=!0,u0()},o0.onload=async()=>{const h0=a0.svgUrl=o0.result;l0.src=await s0?`${h0}#svgView(preserveAspectRatio(none))`:h0},l0.onerror=o0.onerror=d0});o0.readAsDataURL(i0),await c0}else a0.bitmap=await createImageBitmap(i0);a0.refCounter=1}catch(i0){console.error(i0),a0=null}return _0(this,v_).set(e0,a0),a0&&_0(this,v_).set(a0.id,a0),a0};let ImageManager=d5;var l_,k$,o4,c_;class CommandManager{constructor(e0=128){K0(this,l_,[]);K0(this,k$,!1);K0(this,o4);K0(this,c_,-1);V0(this,o4,e0)}add({cmd:e0,undo:n0,post:a0,mustExec:i0,type:s0=NaN,overwriteIfSameType:o0=!1,keepUndo:l0=!1}){if(i0&&e0(),_0(this,k$))return;const c0={cmd:e0,undo:n0,post:a0,type:s0};if(_0(this,c_)===-1){_0(this,l_).length>0&&(_0(this,l_).length=0),V0(this,c_,0),_0(this,l_).push(c0);return}if(o0&&_0(this,l_)[_0(this,c_)].type===s0){l0&&(c0.undo=_0(this,l_)[_0(this,c_)].undo),_0(this,l_)[_0(this,c_)]=c0;return}const u0=_0(this,c_)+1;u0===_0(this,o4)?_0(this,l_).splice(0,1):(V0(this,c_,u0),u0<_0(this,l_).length&&_0(this,l_).splice(u0)),_0(this,l_).push(c0)}undo(){if(_0(this,c_)===-1)return;V0(this,k$,!0);const{undo:e0,post:n0}=_0(this,l_)[_0(this,c_)];e0(),n0==null||n0(),V0(this,k$,!1),V0(this,c_,_0(this,c_)-1)}redo(){if(_0(this,c_)<_0(this,l_).length-1){V0(this,c_,_0(this,c_)+1),V0(this,k$,!0);const{cmd:e0,post:n0}=_0(this,l_)[_0(this,c_)];e0(),n0==null||n0(),V0(this,k$,!1)}}hasSomethingToUndo(){return _0(this,c_)!==-1}hasSomethingToRedo(){return _0(this,c_)<_0(this,l_).length-1}destroy(){V0(this,l_,null)}}l_=new WeakMap,k$=new WeakMap,o4=new WeakMap,c_=new WeakMap;var q2,O5;class KeyboardManager{constructor(e0){K0(this,q2);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:n0}=util_FeatureTest.platform;for(const[a0,i0,s0={}
731]of e0)for(const o0 of a0){const l0=o0.startsWith("mac+");n0&&l0?(this.callbacks.set(o0.slice(4),{callback:i0,options:s0}),this.allKeys.add(o0.split("+").at(-1))):!n0&&!l0&&(this.callbacks.set(o0,{callback:i0,options:s0}),this.allKeys.add(o0.split("+").at(-1)))}}exec(e0,n0){if(!this.allKeys.has(n0.key))return;const a0=this.callbacks.get(H0(this,q2,O5).call(this,n0));if(!a0)return;const{callback:i0,options:{bubbles:s0=!1,args:o0=[],checker:l0=null}}=a0;l0&&!l0(e0,n0)||(i0.bind(e0,...o0,n0)(),s0||(n0.stopPropagation(),n0.preventDefault()))}}q2=new WeakSet,O5=function(e0){e0.altKey&&this.buffer.push("alt"),e0.ctrlKey&&this.buffer.push("ctrl"),e0.metaKey&&this.buffer.push("meta"),e0.shiftKey&&this.buffer.push("shift"),this.buffer.push(e0.key);const n0=this.buffer.join("+");return this.buffer.length=0,n0};const Y2=class Y2{get _colors(){const e0=new Map([["CanvasText",null],["Canvas",null]]);return getColorValues(e0),shadow(this,"_colors",e0)}convert(e0){const n0=getRGB(e0);if(!window.matchMedia("(forced-colors: active)").matches)return n0;for(const[a0,i0]of this._colors)if(i0.every((s0,o0)=>s0===n0[o0]))return Y2._colorsMapping.get(a0);return n0}getHexCode(e0){const n0=this._colors.get(e0);return n0?Util.makeHexColor(...n0):e0}};Gw(Y2,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let ColorManager=Y2;var VL,D_,n_,m_,GL,WR,HL,sR,C$,WL,xP,SR,oR,yP,l4,c4,KL,u4,_R,R$,QL,I$,TR,X2,N$,d4,j$,bP,h4,f4,u_,$1,KR,vP,p4,m4,$$,kR,QR,A4,Q_,e1,v2,m3,D5,L5,E2,B5,F5,U5,A3,z5,g3,x3,V5,__,y$,G5,H5,y3,W5,BF,b3;const NL=class NL{constructor(e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0){K0(this,e1);K0(this,VL,new AbortController);K0(this,D_,null);K0(this,n_,new Map);K0(this,m_,new Map);K0(this,GL,null);K0(this,WR,null);K0(this,HL,null);K0(this,sR,new CommandManager);K0(this,C$,null);K0(this,WL,0);K0(this,xP,new Set);K0(this,SR,null);K0(this,oR,null);K0(this,yP,new Set);K0(this,l4,!1);K0(this,c4,!1);K0(this,KL,!1);K0(this,u4,null);K0(this,_R,null);K0(this,R$,null);K0(this,QL,null);K0(this,I$,!1);K0(this,TR,null);K0(this,X2,new IdManager);K0(this,N$,!1);K0(this,d4,!1);K0(this,j$,null);K0(this,bP,null);K0(this,h4,null);K0(this,f4,null);K0(this,u_,AnnotationEditorType.NONE);K0(this,$1,new Set);K0(this,KR,null);K0(this,vP,null);K0(this,p4,null);K0(this,m4,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});K0(this,$$,[0,0]);K0(this,kR,null);K0(this,QR,null);K0(this,A4,null);K0(this,Q_,null);const f0=this._signal=_0(this,VL).signal;V0(this,QR,e0),V0(this,A4,n0),V0(this,GL,a0),this._eventBus=i0,i0._on("editingaction",this.onEditingAction.bind(this),{signal:f0}),i0._on("pagechanging",this.onPageChanging.bind(this),{signal:f0}),i0._on("scalechanging",this.onScaleChanging.bind(this),{signal:f0}),i0._on("rotationchanging",this.onRotationChanging.bind(this),{signal:f0}),i0._on("setpreference",this.onSetPreference.bind(this),{signal:f0}),i0._on("switchannotationeditorparams",p0=>this.updateParams(p0.type,p0.value),{signal:f0}),H0(this,e1,B5).call(this),H0(this,e1,V5).call(this),H0(this,e1,A3).call(this),V0(this,WR,s0.annotationStorage),V0(this,u4,s0.filterFactory),V0(this,vP,o0),V0(this,QL,l0||null),V0(this,l4,c0),V0(this,c4,u0),V0(this,KL,d0),V0(this,f4,h0||null),this.viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const e0=NL.prototype,n0=o0=>_0(o0,QR).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&o0.hasSomethingToControl(),a0=(o0,{target:l0})=>{if(l0 instanceof HTMLInputElement){const{type:c0}=l0;return c0!=="text"&&c0!=="number"}return!0},i0=this.TRANSLATE_SMALL,s0=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],e0.selectAll,{checker:a0}],[["ctrl+z","mac+meta+z"],e0.undo,{checker:a0}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e0.redo,{checker:a0}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e0.delete,{checker:a0}],[["Enter","mac+Enter"],e0.addNewEditorFromKeyboard,{checker:(o0,{target:l0})=>!(l0 instanceof HTMLButtonElement)&&_0(o0,QR).contains(l0)&&!o0.isEnterHandled}],[[" ","mac+ "],e0.addNewEditorFromKeyboard,{checker:(o0,{target:l0})=>!(l0 instanceof HTMLButtonElement)&&_0(o0,QR).contains(document.activeElement)}],[["Escape","mac+Escape"],e0.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e0.translateSelectedEditors,{args:[-i0,0],checker:n0}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e0.translateSelectedEditors,{args:[-s0,0],checker:n0}],[["ArrowRight","mac+ArrowRight"],e0.translateSelectedEditors,{args:[i0,0],checker:n0}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e0.translateSelectedEditors,{args:[s0,0],checker:n0}],[["ArrowUp","mac+ArrowUp"],e0.translateSelectedEditors,{args:[0,-i0],checker:n0}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e0.translateSelectedEditors,{args:[0,-s0],checker:n0}],[["ArrowDown","mac+ArrowDown"],e0.translateSelectedEditors,{args:[0,i0],checker:n0}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e0.translateSelectedEditors,{args:[0,s0],checker:n0}]]))}destroy(){var e0,n0,a0,i0;(e0=_0(this,Q_))==null||e0.resolve(),V0(this,Q_,null),(n0=_0(this,VL))==null||n0.abort(),V0(this,VL,null),this._signal=null;for(const s0 of _0(this,m_).values())s0.destroy();_0(this,m_).clear(),_0(this,n_).clear(),_0(this,yP).clear(),V0(this,D_,null),_0(this,$1).clear(),_0(this,sR).destroy(),(a0=_0(this,GL))==null||a0.destroy(),(i0=_0(this,TR))==null||i0.hide(),V0(this,TR,null),_0(this,_R)&&(clearTimeout(_0(this,_R)),V0(this,_R,null)),_0(this,kR)&&(clearTimeout(_0(this,kR)),V0(this,kR,null))}combinedSignal(e0){return AbortSignal.any([this._signal,e0.signal])}get mlManager(){return _0(this,f4)}get useNewAltTextFlow(){return _0(this,c4)}get useNewAltTextWhenAddingImage(){return _0(this,KL)}get hcmFilter(){return shadow(this,"hcmFilter",_0(this,vP)?_0(this,u4).addHCMFilter(_0(this,vP).foreground,_0(this,vP).background):"none")}get direction(){return shadow(this,"direction",getComputedStyle(_0(this,QR)).direction)}get highlightColors(){return shadow(this,"highlightColors",_0(this,QL)?new Map(_0(this,QL).split(",").map(e0=>e0.split("=").map(n0=>n0.trim()))):null)}get highlightColorNames(){return shadow(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e0=>e0.reverse())):null)}setMainHighlightColorPicker(e0){V0(this,h4,e0)}editAltText(e0,n0=!1){var a0;(a0=_0(this,GL))==null||a0.editAltText(this,e0,n0)}switchToMode(e0,n0){this._eventBus.on("annotationeditormodechanged",n0,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e0})}setPreference(e0,n0){this._eventBus.dispatch("setpreference",{source:this,name:e0,value:n0})}onSetPreference({name:e0,value:n0}){switch(e0){case"enableNewAltTextWhenAddingImage":V0(this,KL,n0);break}}onPageChanging({pageNumber:e0}){V0(this,WL,e0-1)}focusMainContainer(){_0(this,QR).focus()}findParent(e0,n0){for(const a0 of _0(this,m_).values()){const{x:i0,y:s0,width:o0,height:l0}=a0.div.getBoundingClientRect();if(e0>=i0&&e0<=i0+o0&&n0>=s0&&n0<=s0+l0)return a0}return null}disableUserSelect(e0=!1){_0(this,A4).classList.toggle("noUserSelect",e0)}addShouldRescale(e0){_0(this,yP).add(e0)}removeShouldRescale(e0){_0(this,yP).delete(e0)}onScaleChanging({scale:e0}){this.commitOrRemove(),this.viewParameters.realScale=e0*PixelsPerInch.PDF_TO_CSS_UNITS;for(const n0 of _0(this,yP))n0.onScaleChanging()}
731onRotationChanging({pagesRotation:e0}){this.commitOrRemove(),this.viewParameters.rotation=e0}highlightSelection(e0=""){const n0=document.getSelection();if(!n0||n0.isCollapsed)return;const{anchorNode:a0,anchorOffset:i0,focusNode:s0,focusOffset:o0}=n0,l0=n0.toString(),u0=H0(this,e1,v2).call(this,n0).closest(".textLayer"),d0=this.getSelectionBoxes(u0);if(!d0)return;n0.empty();const h0=H0(this,e1,m3).call(this,u0),f0=_0(this,u_)===AnnotationEditorType.NONE,p0=()=>{h0==null||h0.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e0,boxes:d0,anchorNode:a0,anchorOffset:i0,focusNode:s0,focusOffset:o0,text:l0}),f0&&this.showAllEditors("highlight",!0,!0)};if(f0){this.switchToMode(AnnotationEditorType.HIGHLIGHT,p0);return}p0()}addToAnnotationStorage(e0){!e0.isEmpty()&&_0(this,WR)&&!_0(this,WR).has(e0.id)&&_0(this,WR).setValue(e0.id,e0)}blur(){if(this.isShiftKeyDown=!1,_0(this,I$)&&(V0(this,I$,!1),H0(this,e1,E2).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e0}=document;for(const n0 of _0(this,$1))if(n0.div.contains(e0)){V0(this,bP,[n0,e0]),n0._focusEventsAllowed=!1;break}}focus(){if(!_0(this,bP))return;const[e0,n0]=_0(this,bP);V0(this,bP,null),n0.addEventListener("focusin",()=>{e0._focusEventsAllowed=!0},{once:!0,signal:this._signal}),n0.focus()}addEditListeners(){H0(this,e1,A3).call(this),H0(this,e1,g3).call(this)}removeEditListeners(){H0(this,e1,z5).call(this),H0(this,e1,x3).call(this)}dragOver(e0){for(const{type:n0}of e0.dataTransfer.items)for(const a0 of _0(this,oR))if(a0.isHandlingMimeForPasting(n0)){e0.dataTransfer.dropEffect="copy",e0.preventDefault();return}}drop(e0){for(const n0 of e0.dataTransfer.items)for(const a0 of _0(this,oR))if(a0.isHandlingMimeForPasting(n0.type)){a0.paste(n0,this.currentLayer),e0.preventDefault();return}}copy(e0){var a0;if(e0.preventDefault(),(a0=_0(this,D_))==null||a0.commitOrRemove(),!this.hasSelection)return;const n0=[];for(const i0 of _0(this,$1)){const s0=i0.serialize(!0);s0&&n0.push(s0)}n0.length!==0&&e0.clipboardData.setData("application/pdfjs",JSON.stringify(n0))}cut(e0){this.copy(e0),this.delete()}async paste(e0){e0.preventDefault();const{clipboardData:n0}=e0;for(const s0 of n0.items)for(const o0 of _0(this,oR))if(o0.isHandlingMimeForPasting(s0.type)){o0.paste(s0,this.currentLayer);return}let a0=n0.getData("application/pdfjs");if(!a0)return;try{a0=JSON.parse(a0)}catch(s0){warn(`paste: "${s0.message}".`);return}if(!Array.isArray(a0))return;this.unselectAll();const i0=this.currentLayer;try{const s0=[];for(const c0 of a0){const u0=await i0.deserialize(c0);if(!u0)return;s0.push(u0)}const o0=()=>{for(const c0 of s0)H0(this,e1,y3).call(this,c0);H0(this,e1,b3).call(this,s0)},l0=()=>{for(const c0 of s0)c0.remove()};this.addCommands({cmd:o0,undo:l0,mustExec:!0})}catch(s0){warn(`paste: "${s0.message}".`)}}keydown(e0){!this.isShiftKeyDown&&e0.key==="Shift"&&(this.isShiftKeyDown=!0),_0(this,u_)!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&NL._keyboardManager.exec(this,e0)}keyup(e0){this.isShiftKeyDown&&e0.key==="Shift"&&(this.isShiftKeyDown=!1,_0(this,I$)&&(V0(this,I$,!1),H0(this,e1,E2).call(this,"main_toolbar")))}onEditingAction({name:e0}){switch(e0){case"undo":case"redo":case"delete":case"selectAll":this[e0]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(e0){e0?(H0(this,e1,F5).call(this),H0(this,e1,g3).call(this),H0(this,e1,__).call(this,{isEditing:_0(this,u_)!==AnnotationEditorType.NONE,isEmpty:H0(this,e1,BF).call(this),hasSomethingToUndo:_0(this,sR).hasSomethingToUndo(),hasSomethingToRedo:_0(this,sR).hasSomethingToRedo(),hasSelectedEditor:!1})):(H0(this,e1,U5).call(this),H0(this,e1,x3).call(this),H0(this,e1,__).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e0){if(!_0(this,oR)){V0(this,oR,e0);for(const n0 of _0(this,oR))H0(this,e1,y$).call(this,n0.defaultPropertiesToUpdate)}}getId(){return _0(this,X2).id}get currentLayer(){return _0(this,m_).get(_0(this,WL))}getLayer(e0){return _0(this,m_).get(e0)}get currentPageIndex(){return _0(this,WL)}addLayer(e0){_0(this,m_).set(e0.pageIndex,e0),_0(this,N$)?e0.enable():e0.disable()}removeLayer(e0){_0(this,m_).delete(e0.pageIndex)}async updateMode(e0,n0=null,a0=!1){if(_0(this,u_)!==e0&&!(_0(this,Q_)&&(await _0(this,Q_).promise,!_0(this,Q_)))){if(V0(this,Q_,Promise.withResolvers()),V0(this,u_,e0),e0===AnnotationEditorType.NONE){this.setEditingState(!1),H0(this,e1,H5).call(this),_0(this,Q_).resolve();return}this.setEditingState(!0),await H0(this,e1,G5).call(this),this.unselectAll();for(const i0 of _0(this,m_).values())i0.updateMode(e0);if(!n0){a0&&this.addNewEditorFromKeyboard(),_0(this,Q_).resolve();return}for(const i0 of _0(this,n_).values())i0.annotationElementId===n0?(this.setSelected(i0),i0.enterInEditMode()):i0.unselect();_0(this,Q_).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e0){e0!==_0(this,u_)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e0})}updateParams(e0,n0){var a0;if(_0(this,oR)){switch(e0){case AnnotationEditorParamsType.CREATE:this.currentLayer.addNewEditor();return;case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:(a0=_0(this,h4))==null||a0.updateColor(n0);break;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(_0(this,p4)||V0(this,p4,new Map)).set(e0,n0),this.showAllEditors("highlight",n0);break}for(const i0 of _0(this,$1))i0.updateParams(e0,n0);for(const i0 of _0(this,oR))i0.updateDefaultParams(e0,n0)}}showAllEditors(e0,n0,a0=!1){var s0;for(const o0 of _0(this,n_).values())o0.editorType===e0&&o0.show(n0);(((s0=_0(this,p4))==null?void 0:s0.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL))??!0)!==n0&&H0(this,e1,y$).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,n0]])}enableWaiting(e0=!1){if(_0(this,d4)!==e0){V0(this,d4,e0);for(const n0 of _0(this,m_).values())e0?n0.disableClick():n0.enableClick(),n0.div.classList.toggle("waiting",e0)}}getEditors(e0){const n0=[];for(const a0 of _0(this,n_).values())a0.pageIndex===e0&&n0.push(a0);return n0}getEditor(e0){return _0(this,n_).get(e0)}addEditor(e0){_0(this,n_).set(e0.id,e0)}removeEditor(e0){var n0;e0.div.contains(document.activeElement)&&(_0(this,_R)&&clearTimeout(_0(this,_R)),V0(this,_R,setTimeout(()=>{this.focusMainContainer(),V0(this,_R,null)},0))),_0(this,n_).delete(e0.id),this.unselect(e0),(!e0.annotationElementId||!_0(this,xP).has(e0.annotationElementId))&&((n0=_0(this,WR))==null||n0.remove(e0.id))}addDeletedAnnotationElement(e0){_0(this,xP).add(e0.annotationElementId),this.addChangedExistingAnnotation(e0),e0.deleted=!0}
731isDeletedAnnotationElement(e0){return _0(this,xP).has(e0)}removeDeletedAnnotationElement(e0){_0(this,xP).delete(e0.annotationElementId),this.removeChangedExistingAnnotation(e0),e0.deleted=!1}setActiveEditor(e0){_0(this,D_)!==e0&&(V0(this,D_,e0),e0&&H0(this,e1,y$).call(this,e0.propertiesToUpdate))}updateUI(e0){_0(this,e1,W5)===e0&&H0(this,e1,y$).call(this,e0.propertiesToUpdate)}toggleSelected(e0){if(_0(this,$1).has(e0)){_0(this,$1).delete(e0),e0.unselect(),H0(this,e1,__).call(this,{hasSelectedEditor:this.hasSelection});return}_0(this,$1).add(e0),e0.select(),H0(this,e1,y$).call(this,e0.propertiesToUpdate),H0(this,e1,__).call(this,{hasSelectedEditor:!0})}setSelected(e0){for(const n0 of _0(this,$1))n0!==e0&&n0.unselect();_0(this,$1).clear(),_0(this,$1).add(e0),e0.select(),H0(this,e1,y$).call(this,e0.propertiesToUpdate),H0(this,e1,__).call(this,{hasSelectedEditor:!0})}isSelected(e0){return _0(this,$1).has(e0)}get firstSelectedEditor(){return _0(this,$1).values().next().value}unselect(e0){e0.unselect(),_0(this,$1).delete(e0),H0(this,e1,__).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return _0(this,$1).size!==0}get isEnterHandled(){return _0(this,$1).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){_0(this,sR).undo(),H0(this,e1,__).call(this,{hasSomethingToUndo:_0(this,sR).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:H0(this,e1,BF).call(this)})}redo(){_0(this,sR).redo(),H0(this,e1,__).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_0(this,sR).hasSomethingToRedo(),isEmpty:H0(this,e1,BF).call(this)})}addCommands(e0){_0(this,sR).add(e0),H0(this,e1,__).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:H0(this,e1,BF).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e0=[..._0(this,$1)],n0=()=>{for(const i0 of e0)i0.remove()},a0=()=>{for(const i0 of e0)H0(this,e1,y3).call(this,i0)};this.addCommands({cmd:n0,undo:a0,mustExec:!0})}commitOrRemove(){var e0;(e0=_0(this,D_))==null||e0.commitOrRemove()}hasSomethingToControl(){return _0(this,D_)||this.hasSelection}selectAll(){for(const e0 of _0(this,$1))e0.commit();H0(this,e1,b3).call(this,_0(this,n_).values())}unselectAll(){if(!(_0(this,D_)&&(_0(this,D_).commitOrRemove(),_0(this,u_)!==AnnotationEditorType.NONE))&&this.hasSelection){for(const e0 of _0(this,$1))e0.unselect();_0(this,$1).clear(),H0(this,e1,__).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e0,n0,a0=!1){if(a0||this.commitOrRemove(),!this.hasSelection)return;_0(this,$$)[0]+=e0,_0(this,$$)[1]+=n0;const[i0,s0]=_0(this,$$),o0=[..._0(this,$1)],l0=1e3;_0(this,kR)&&clearTimeout(_0(this,kR)),V0(this,kR,setTimeout(()=>{V0(this,kR,null),_0(this,$$)[0]=_0(this,$$)[1]=0,this.addCommands({cmd:()=>{for(const c0 of o0)_0(this,n_).has(c0.id)&&c0.translateInPage(i0,s0)},undo:()=>{for(const c0 of o0)_0(this,n_).has(c0.id)&&c0.translateInPage(-i0,-s0)},mustExec:!1})},l0));for(const c0 of o0)c0.translateInPage(e0,n0)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),V0(this,SR,new Map);for(const e0 of _0(this,$1))_0(this,SR).set(e0,{savedX:e0.x,savedY:e0.y,savedPageIndex:e0.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!_0(this,SR))return!1;this.disableUserSelect(!1);const e0=_0(this,SR);V0(this,SR,null);let n0=!1;for(const[{x:i0,y:s0,pageIndex:o0},l0]of e0)l0.newX=i0,l0.newY=s0,l0.newPageIndex=o0,n0||(n0=i0!==l0.savedX||s0!==l0.savedY||o0!==l0.savedPageIndex);if(!n0)return!1;const a0=(i0,s0,o0,l0)=>{if(_0(this,n_).has(i0.id)){const c0=_0(this,m_).get(l0);c0?i0._setParentAndPosition(c0,s0,o0):(i0.pageIndex=l0,i0.x=s0,i0.y=o0)}};return this.addCommands({cmd:()=>{for(const[i0,{newX:s0,newY:o0,newPageIndex:l0}]of e0)a0(i0,s0,o0,l0)},undo:()=>{for(const[i0,{savedX:s0,savedY:o0,savedPageIndex:l0}]of e0)a0(i0,s0,o0,l0)},mustExec:!0}),!0}dragSelectedEditors(e0,n0){if(_0(this,SR))for(const a0 of _0(this,SR).keys())a0.drag(e0,n0)}rebuild(e0){if(e0.parent===null){const n0=this.getLayer(e0.pageIndex);n0?(n0.changeParent(e0),n0.addOrRebuild(e0)):(this.addEditor(e0),this.addToAnnotationStorage(e0),e0.rebuild())}else e0.parent.addOrRebuild(e0)}get isEditorHandlingKeyboard(){var e0;return((e0=this.getActive())==null?void 0:e0.shouldGetKeyboardEvents())||_0(this,$1).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e0){return _0(this,D_)===e0}getActive(){return _0(this,D_)}getMode(){return _0(this,u_)}get imageManager(){return shadow(this,"imageManager",new ImageManager)}getSelectionBoxes(e0){if(!e0)return null;const n0=document.getSelection();for(let u0=0,d0=n0.rangeCount;u0<d0;u0++)if(!e0.contains(n0.getRangeAt(u0).commonAncestorContainer))return null;const{x:a0,y:i0,width:s0,height:o0}=e0.getBoundingClientRect();let l0;switch(e0.getAttribute("data-main-rotation")){case"90":l0=(u0,d0,h0,f0)=>({x:(d0-i0)/o0,y:1-(u0+h0-a0)/s0,width:f0/o0,height:h0/s0});break;case"180":l0=(u0,d0,h0,f0)=>
731({x:1-(u0+h0-a0)/s0,y:1-(d0+f0-i0)/o0,width:h0/s0,height:f0/o0});break;case"270":l0=(u0,d0,h0,f0)=>({x:1-(d0+f0-i0)/o0,y:(u0-a0)/s0,width:f0/o0,height:h0/s0});break;default:l0=(u0,d0,h0,f0)=>({x:(u0-a0)/s0,y:(d0-i0)/o0,width:h0/s0,height:f0/o0});break}const c0=[];for(let u0=0,d0=n0.rangeCount;u0<d0;u0++){const h0=n0.getRangeAt(u0);if(!h0.collapsed)for(const{x:f0,y:p0,width:A0,height:m0}of h0.getClientRects())A0===0||m0===0||c0.push(l0(f0,p0,A0,m0))}return c0.length===0?null:c0}addChangedExistingAnnotation({annotationElementId:e0,id:n0}){(_0(this,HL)||V0(this,HL,new Map)).set(e0,n0)}removeChangedExistingAnnotation({annotationElementId:e0}){var n0;(n0=_0(this,HL))==null||n0.delete(e0)}renderAnnotationElement(e0){var i0;const n0=(i0=_0(this,HL))==null?void 0:i0.get(e0.data.id);if(!n0)return;const a0=_0(this,WR).getRawValue(n0);a0&&(_0(this,u_)===AnnotationEditorType.NONE&&!a0.hasBeenModified||a0.renderAnnotationElement(e0))}};VL=new WeakMap,D_=new WeakMap,n_=new WeakMap,m_=new WeakMap,GL=new WeakMap,WR=new WeakMap,HL=new WeakMap,sR=new WeakMap,C$=new WeakMap,WL=new WeakMap,xP=new WeakMap,SR=new WeakMap,oR=new WeakMap,yP=new WeakMap,l4=new WeakMap,c4=new WeakMap,KL=new WeakMap,u4=new WeakMap,_R=new WeakMap,R$=new WeakMap,QL=new WeakMap,I$=new WeakMap,TR=new WeakMap,X2=new WeakMap,N$=new WeakMap,d4=new WeakMap,j$=new WeakMap,bP=new WeakMap,h4=new WeakMap,f4=new WeakMap,u_=new WeakMap,$1=new WeakMap,KR=new WeakMap,vP=new WeakMap,p4=new WeakMap,m4=new WeakMap,$$=new WeakMap,kR=new WeakMap,QR=new WeakMap,A4=new WeakMap,Q_=new WeakMap,e1=new WeakSet,v2=function({anchorNode:e0}){return e0.nodeType===Node.TEXT_NODE?e0.parentElement:e0},m3=function(e0){const{currentLayer:n0}=this;if(n0.hasTextLayer(e0))return n0;for(const a0 of _0(this,m_).values())if(a0.hasTextLayer(e0))return a0;return null},D5=function(){const e0=document.getSelection();if(!e0||e0.isCollapsed)return;const a0=H0(this,e1,v2).call(this,e0).closest(".textLayer"),i0=this.getSelectionBoxes(a0);i0&&(_0(this,TR)||V0(this,TR,new HighlightToolbar(this)),_0(this,TR).show(a0,i0,this.direction==="ltr"))},L5=function(){var s0,o0,l0;const e0=document.getSelection();if(!e0||e0.isCollapsed){_0(this,KR)&&((s0=_0(this,TR))==null||s0.hide(),V0(this,KR,null),H0(this,e1,__).call(this,{hasSelectedText:!1}));return}const{anchorNode:n0}=e0;if(n0===_0(this,KR))return;const i0=H0(this,e1,v2).call(this,e0).closest(".textLayer");if(!i0){_0(this,KR)&&((o0=_0(this,TR))==null||o0.hide(),V0(this,KR,null),H0(this,e1,__).call(this,{hasSelectedText:!1}));return}if((l0=_0(this,TR))==null||l0.hide(),V0(this,KR,n0),H0(this,e1,__).call(this,{hasSelectedText:!0}),!(_0(this,u_)!==AnnotationEditorType.HIGHLIGHT&&_0(this,u_)!==AnnotationEditorType.NONE)&&(_0(this,u_)===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),V0(this,I$,this.isShiftKeyDown),!this.isShiftKeyDown)){const c0=_0(this,u_)===AnnotationEditorType.HIGHLIGHT?H0(this,e1,m3).call(this,i0):null;c0==null||c0.toggleDrawing();const u0=new AbortController,d0=this.combinedSignal(u0),h0=f0=>{f0.type==="pointerup"&&f0.button!==0||(u0.abort(),c0==null||c0.toggleDrawing(!0),f0.type==="pointerup"&&H0(this,e1,E2).call(this,"main_toolbar"))};window.addEventListener("pointerup",h0,{signal:d0}),window.addEventListener("blur",h0,{signal:d0})}},E2=function(e0=""){_0(this,u_)===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(e0):_0(this,l4)&&H0(this,e1,D5).call(this)},B5=function(){document.addEventListener("selectionchange",H0(this,e1,L5).bind(this),{signal:this._signal})},F5=function(){if(_0(this,R$))return;V0(this,R$,new AbortController);const e0=this.combinedSignal(_0(this,R$));window.addEventListener("focus",this.focus.bind(this),{signal:e0}),window.addEventListener("blur",this.blur.bind(this),{signal:e0})},U5=function(){var e0;(e0=_0(this,R$))==null||e0.abort(),V0(this,R$,null)},A3=function(){if(_0(this,j$))return;V0(this,j$,new AbortController);const e0=this.combinedSignal(_0(this,j$));window.addEventListener("keydown",this.keydown.bind(this),{signal:e0}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e0})},z5=function(){var e0;(e0=_0(this,j$))==null||e0.abort(),V0(this,j$,null)},g3=function(){if(_0(this,C$))return;V0(this,C$,new AbortController);const e0=this.combinedSignal(_0(this,C$));document.addEventListener("copy",this.copy.bind(this),{signal:e0}),document.addEventListener("cut",this.cut.bind(this),{signal:e0}),document.addEventListener("paste",this.paste.bind(this),{signal:e0})},x3=function(){var e0;(e0=_0(this,C$))==null||e0.abort(),V0(this,C$,null)},V5=function(){const e0=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e0}),document.addEventListener("drop",this.drop.bind(this),{signal:e0})},__=function(e0){Object.entries(e0).some(([a0,i0])=>_0(this,m4)[a0]!==i0)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(_0(this,m4),e0)}),_0(this,u_)===AnnotationEditorType.HIGHLIGHT&&e0.hasSelectedEditor===!1&&H0(this,e1,y$).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_FREE,!0]]))},y$=function(e0){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e0})},G5=async function(){if(!_0(this,N$)){V0(this,N$,!0);const e0=[];for(const n0 of _0(this,m_).values())e0.push(n0.enable());await Promise.all(e0);for(const n0 of _0(this,n_).values())n0.enable()}},H5=function(){if(this.unselectAll(),_0(this,N$)){V0(this,N$,!1);for(const e0 of _0(this,m_).values())e0.disable();for(const e0 of _0(this,n_).values())e0.disable()}},y3=function(e0){const n0=_0(this,m_).get(e0.pageIndex);n0?n0.addOrRebuild(e0):(this.addEditor(e0),this.addToAnnotationStorage(e0))},W5=function(){let e0=null;for(e0 of _0(this,$1));return e0},BF=function(){if(_0(this,n_).size===0)return!0;
731if(_0(this,n_).size===1)for(const e0 of _0(this,n_).values())return e0.isEmpty();return!1},b3=function(e0){for(const n0 of _0(this,$1))n0.unselect();_0(this,$1).clear();for(const n0 of e0)n0.isEmpty()||(_0(this,$1).add(n0),n0.select());H0(this,e1,__).call(this,{hasSelectedEditor:this.hasSelection})},Gw(NL,"TRANSLATE_SMALL",1),Gw(NL,"TRANSLATE_BIG",10);let AnnotationEditorUIManager=NL;var d_,CR,lR,qL,RR,L_,YL,IR,j_,qR,EP,NR,P$,xR,FF,w2;const T_=class T_{constructor(e0){K0(this,xR);K0(this,d_,null);K0(this,CR,!1);K0(this,lR,null);K0(this,qL,null);K0(this,RR,null);K0(this,L_,null);K0(this,YL,!1);K0(this,IR,null);K0(this,j_,null);K0(this,qR,null);K0(this,EP,null);K0(this,NR,!1);V0(this,j_,e0),V0(this,NR,e0._uiManager.useNewAltTextFlow),_0(T_,P$)||V0(T_,P$,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(e0){T_._l10n??(T_._l10n=e0)}async render(){const e0=V0(this,lR,document.createElement("button"));e0.className="altText",e0.tabIndex="0";const n0=V0(this,qL,document.createElement("span"));e0.append(n0),_0(this,NR)?(e0.classList.add("new"),e0.setAttribute("data-l10n-id",_0(T_,P$).missing),n0.setAttribute("data-l10n-id",_0(T_,P$)["missing-label"])):(e0.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),n0.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const a0=_0(this,j_)._uiManager._signal;e0.addEventListener("contextmenu",noContextMenu,{signal:a0}),e0.addEventListener("pointerdown",s0=>s0.stopPropagation(),{signal:a0});const i0=s0=>{s0.preventDefault(),_0(this,j_)._uiManager.editAltText(_0(this,j_)),_0(this,NR)&&_0(this,j_)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:_0(this,xR,FF)}})};return e0.addEventListener("click",i0,{capture:!0,signal:a0}),e0.addEventListener("keydown",s0=>{s0.target===e0&&s0.key==="Enter"&&(V0(this,YL,!0),i0(s0))},{signal:a0}),await H0(this,xR,w2).call(this),e0}finish(){_0(this,lR)&&(_0(this,lR).focus({focusVisible:_0(this,YL)}),V0(this,YL,!1))}isEmpty(){return _0(this,NR)?_0(this,d_)===null:!_0(this,d_)&&!_0(this,CR)}hasData(){return _0(this,NR)?_0(this,d_)!==null||!!_0(this,qR):this.isEmpty()}get guessedText(){return _0(this,qR)}async setGuessedText(e0){_0(this,d_)===null&&(V0(this,qR,e0),V0(this,EP,await T_._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e0})),H0(this,xR,w2).call(this))}toggleAltTextBadge(e0=!1){var n0;if(!_0(this,NR)||_0(this,d_)){(n0=_0(this,IR))==null||n0.remove(),V0(this,IR,null);return}if(!_0(this,IR)){const a0=V0(this,IR,document.createElement("div"));a0.className="noAltTextBadge",_0(this,j_).div.append(a0)}_0(this,IR).classList.toggle("hidden",!e0)}serialize(e0){let n0=_0(this,d_);return!e0&&_0(this,qR)===n0&&(n0=_0(this,EP)),{altText:n0,decorative:_0(this,CR),guessedText:_0(this,qR),textWithDisclaimer:_0(this,EP)}}get data(){return{altText:_0(this,d_),decorative:_0(this,CR)}}set data({altText:e0,decorative:n0,guessedText:a0,textWithDisclaimer:i0,cancel:s0=!1}){a0&&(V0(this,qR,a0),V0(this,EP,i0)),!(_0(this,d_)===e0&&_0(this,CR)===n0)&&(s0||(V0(this,d_,e0),V0(this,CR,n0)),H0(this,xR,w2).call(this))}toggle(e0=!1){_0(this,lR)&&(!e0&&_0(this,L_)&&(clearTimeout(_0(this,L_)),V0(this,L_,null)),_0(this,lR).disabled=!e0)}shown(){_0(this,j_)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:_0(this,xR,FF)}})}destroy(){var e0,n0;(e0=_0(this,lR))==null||e0.remove(),V0(this,lR,null),V0(this,qL,null),V0(this,RR,null),(n0=_0(this,IR))==null||n0.remove(),V0(this,IR,null)}};d_=new WeakMap,CR=new WeakMap,lR=new WeakMap,qL=new WeakMap,RR=new WeakMap,L_=new WeakMap,YL=new WeakMap,IR=new WeakMap,j_=new WeakMap,qR=new WeakMap,EP=new WeakMap,NR=new WeakMap,P$=new WeakMap,xR=new WeakSet,FF=function(){return _0(this,d_)&&"added"||_0(this,d_)===null&&this.guessedText&&"review"||"missing"},w2=async function(){var i0,s0,o0;const e0=_0(this,lR);if(!e0)return;if(_0(this,NR)){if(e0.classList.toggle("done",!!_0(this,d_)),e0.setAttribute("data-l10n-id",_0(T_,P$)[_0(this,xR,FF)]),(i0=_0(this,qL))==null||i0.setAttribute("data-l10n-id",_0(T_,P$)[`${_0(this,xR,FF)}-label`]),!_0(this,d_)){(s0=_0(this,RR))==null||s0.remove();return}}else{if(!_0(this,d_)&&!_0(this,CR)){e0.classList.remove("done"),(o0=_0(this,RR))==null||o0.remove();return}e0.classList.add("done"),e0.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let n0=_0(this,RR);if(!n0){V0(this,RR,n0=document.createElement("span")),n0.className="tooltip",n0.setAttribute("role","tooltip"),n0.id=`alt-text-tooltip-${_0(this,j_).id}`;const l0=100,c0=_0(this,j_)._uiManager._signal;c0.addEventListener("abort",()=>{clearTimeout(_0(this,L_)),V0(this,L_,null)},{once:!0}),e0.addEventListener("mouseenter",()=>{V0(this,L_,setTimeout(()=>{V0(this,L_,null),_0(this,RR).classList.add("show"),_0(this,j_)._reportTelemetry({action:"alt_text_tooltip"})},l0))},{signal:c0}),e0.addEventListener("mouseleave",()=>{var u0;_0(this,L_)&&(clearTimeout(_0(this,L_)),V0(this,L_,null)),(u0=_0(this,RR))==null||u0.classList.remove("show")},{signal:c0})}_0(this,CR)?n0.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(n0.removeAttribute("data-l10n-id"),n0.textContent=_0(this,d_)),n0.parentNode||e0.append(n0);const a0=_0(this,j_).getImageForAltText();a0==null||a0.setAttribute("aria-describedby",n0.id)},K0(T_,P$,null),Gw(T_,"_l10n",null);let AltText=T_;var wP,cR,H1,XL,SP,A_,_P,M$,g4,TP,O$,x4,kP,YR,jR,JL,ZL,q_,y4,J2,b1,v3,b4,E3,w3,K5,Q5,S3,_3,T3,q5,k3,Y5,X5,J5,C3,UF;const N1=class N1{constructor(e0){K0(this,b1);K0(this,wP,null);K0(this,cR,null);K0(this,H1,null);K0(this,XL,!1);K0(this,SP,!1);K0(this,A_,null);K0(this,_P,null);K0(this,M$,null);K0(this,g4,"");K0(this,TP,!1);K0(this,O$,null);K0(this,x4,!1);K0(this,kP,!1);K0(this,YR,!1);K0(this,jR,null);K0(this,JL,0);K0(this,ZL,0);K0(this,q_,null);Gw(this,"_editToolbar",null);Gw(this,"_initialOptions",Object.create(null));Gw(this,"_initialData",null);Gw(this,"_isVisible",!0);Gw(this,"_uiManager",null);Gw(this,"_focusEventsAllowed",!0);K0(this,y4,!1);K0(this,J2,N1._zIndex++);this.parent=e0.parent,this.id=e0.id,this.width=this.height=null,this.pageIndex=e0.parent.pageIndex,this.name=e0.name,this.div=null,this._uiManager=e0.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e0.isCentered,this._structTreeParentId=null;const{rotation:n0,rawDims:{pageWidth:a0,pageHeight:i0,pageX:s0,pageY:o0}}=this.parent.viewport;this.rotation=n0,this.pageRotation=(360+n0-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[a0,i0],this.pageTranslation=[s0,o0];const[l0,c0]=this.parentDimensions;this.x=e0.x/l0,this.y=e0.y/c0,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e0=N1.prototype._resizeWithKeyboard,n0=AnnotationEditorUIManager.TRANSLATE_SMALL,a0=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_resizerKeyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],e0,{args:[-n0,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e0,{args:[-a0,0]}],[["ArrowRight","mac+ArrowRight"],e0,{args:[n0,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e0,{args:[a0,0]}],[["ArrowUp","mac+ArrowUp"],e0,{args:[0,-n0]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e0,{args:[0,-a0]}],[["ArrowDown","mac+ArrowDown"],e0,{args:[0,n0]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e0,{args:[0,a0]}],[["Escape","mac+Escape"],N1.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e0){const n0=new FakeEditor({id:e0.parent.getNextId(),parent:e0.parent,uiManager:e0._uiManager});n0.annotationElementId=e0.annotationElementId,n0.deleted=!0,n0._uiManager.addToAnnotationStorage(n0)}static initialize(e0,n0){if(N1._l10n??(N1._l10n=e0),N1._l10nResizer||(N1._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),N1._borderLineWidth!==-1)return;const a0=getComputedStyle(document.documentElement);N1._borderLineWidth=parseFloat(a0.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e0,n0){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e0){return!1}static paste(e0,n0){unreachable("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return _0(this,y4)}set _isDraggable(e0){var n0;V0(this,y4,e0),(n0=this.div)==null||n0.classList.toggle("draggable",e
7310)}get isEnterHandled(){return!0}center(){const[e0,n0]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*n0/(e0*2),this.y+=this.width*e0/(n0*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*n0/(e0*2),this.y-=this.width*e0/(n0*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e0){this._uiManager.addCommands(e0)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=_0(this,J2)}setParent(e0){e0!==null?(this.pageIndex=e0.pageIndex,this.pageDimensions=e0.pageDimensions):H0(this,b1,UF).call(this),this.parent=e0}focusin(e0){this._focusEventsAllowed&&(_0(this,TP)?V0(this,TP,!1):this.parent.setSelected(this))}focusout(e0){var a0;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const n0=e0.relatedTarget;n0!=null&&n0.closest(`#${this.id}`)||(e0.preventDefault(),(a0=this.parent)!=null&&a0.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e0,n0,a0,i0){const[s0,o0]=this.parentDimensions;[a0,i0]=this.screenToPageTranslation(a0,i0),this.x=(e0+a0)/s0,this.y=(n0+i0)/o0,this.fixAndSetPosition()}translate(e0,n0){H0(this,b1,v3).call(this,this.parentDimensions,e0,n0)}translateInPage(e0,n0){_0(this,O$)||V0(this,O$,[this.x,this.y]),H0(this,b1,v3).call(this,this.pageDimensions,e0,n0),this.div.scrollIntoView({block:"nearest"})}drag(e0,n0){_0(this,O$)||V0(this,O$,[this.x,this.y]);const[a0,i0]=this.parentDimensions;if(this.x+=e0/a0,this.y+=n0/i0,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u0,y:d0}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u0,d0)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s0,y:o0}=this;const[l0,c0]=this.getBaseTranslation();s0+=l0,o0+=c0,this.div.style.left=`${(100*s0).toFixed(2)}%`,this.div.style.top=`${(100*o0).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!_0(this,O$)&&(_0(this,O$)[0]!==this.x||_0(this,O$)[1]!==this.y)}getBaseTranslation(){const[e0,n0]=this.parentDimensions,{_borderLineWidth:a0}=N1,i0=a0/e0,s0=a0/n0;switch(this.rotation){case 90:return[-i0,s0];case 180:return[i0,s0];case 270:return[i0,-s0];default:return[-i0,-s0]}}get _mustFixPosition(){return!0}fixAndSetPosition(e0=this.rotation){const[n0,a0]=this.pageDimensions;let{x:i0,y:s0,width:o0,height:l0}=this;if(o0*=n0,l0*=a0,i0*=n0,s0*=a0,this._mustFixPosition)switch(e0){case 0:i0=Math.max(0,Math.min(n0-o0,i0)),s0=Math.max(0,Math.min(a0-l0,s0));break;case 90:i0=Math.max(0,Math.min(n0-l0,i0)),s0=Math.min(a0,Math.max(o0,s0));break;case 180:i0=Math.min(n0,Math.max(o0,i0)),s0=Math.min(a0,Math.max(l0,s0));break;case 270:i0=Math.min(n0,Math.max(l0,i0)),s0=Math.max(0,Math.min(a0-o0,s0));break}this.x=i0/=n0,this.y=s0/=a0;const[c0,u0]=this.getBaseTranslation();i0+=c0,s0+=u0;const{style:d0}=this.div;d0.left=`${(100*i0).toFixed(2)}%`,d0.top=`${(100*s0).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e0,n0){var a0;return H0(a0=N1,b4,E3).call(a0,e0,n0,this.parentRotation)}pageTranslationToScreen(e0,n0){var a0;return H0(a0=N1,b4,E3).call(a0,e0,n0,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e0,pageDimensions:[n0,a0]}=this;return[n0*e0,a0*e0]}setDims(e0,n0){const[a0,i0]=this.parentDimensions;this.div.style.width=`${(100*e0/a0).toFixed(2)}%`,_0(this,SP)||(this.div.style.height=`${(100*n0/i0).toFixed(2)}%`)}fixDims(){const{style:e0}=this.div,{height:n0,width:a0}=e0,i0=a0.endsWith("%"),s0=!_0(this,SP)&&n0.endsWith("%");if(i0&&s0)return;const[o0,l0]=this.parentDimensions;i0||(e0.width=`${(100*parseFloat(a0)/o0).toFixed(2)}%`),!_0(this,SP)&&!s0&&(e0.height=`${(100*parseFloat(n0)/l0).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e0;(e0=_0(this,H1))==null||e0.finish()}async addEditToolbar(){return this._editToolbar||_0(this,kP)?this._editToolbar:(this._editToolbar=ne
731w EditorToolbar(this),this.div.append(this._editToolbar.render()),_0(this,H1)&&await this._editToolbar.addAltText(_0(this,H1)),this._editToolbar)}removeEditToolbar(){var e0;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(e0=_0(this,H1))==null||e0.destroy())}addContainer(e0){var a0;const n0=(a0=this._editToolbar)==null?void 0:a0.div;n0?n0.before(e0):this.div.append(e0)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){_0(this,H1)||(AltText.initialize(N1._l10n),V0(this,H1,new AltText(this)),_0(this,wP)&&(_0(this,H1).data=_0(this,wP),V0(this,wP,null)),await this.addEditToolbar())}get altTextData(){var e0;return(e0=_0(this,H1))==null?void 0:e0.data}set altTextData(e0){_0(this,H1)&&(_0(this,H1).data=e0)}get guessedAltText(){var e0;return(e0=_0(this,H1))==null?void 0:e0.guessedText}async setGuessedAltText(e0){var n0;await((n0=_0(this,H1))==null?void 0:n0.setGuessedText(e0))}serializeAltText(e0){var n0;return(n0=_0(this,H1))==null?void 0:n0.serialize(e0)}hasAltText(){return!!_0(this,H1)&&!_0(this,H1).isEmpty()}hasAltTextData(){var e0;return((e0=_0(this,H1))==null?void 0:e0.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=_0(this,XL)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),H0(this,b1,k3).call(this);const[e0,n0]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*n0/e0).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e0/n0).toFixed(2)}%`);const[a0,i0]=this.getInitialTranslation();return this.translate(a0,i0),bindEvents(this,this.div,["pointerdown"]),this.div}pointerdown(e0){const{isMac:n0}=util_FeatureTest.platform;if(e0.button!==0||e0.ctrlKey&&n0){e0.preventDefault();return}if(V0(this,TP,!0),this._isDraggable){H0(this,b1,q5).call(this,e0);return}H0(this,b1,T3).call(this,e0)}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){_0(this,jR)&&clearTimeout(_0(this,jR)),V0(this,jR,setTimeout(()=>{var e0;V0(this,jR,null),(e0=this.parent)==null||e0.moveEditorInDOM(this)},0))}_setParentAndPosition(e0,n0,a0){e0.changeParent(this),this.x=n0,this.y=a0,this.fixAndSetPosition()}getRect(e0,n0,a0=this.rotation){const i0=this.parentScale,[s0,o0]=this.pageDimensions,[l0,c0]=this.pageTranslation,u0=e0/i0,d0=n0/i0,h0=this.x*s0,f0=this.y*o0,p0=this.width*s0,A0=this.height*o0;switch(a0){case 0:return[h0+u0+l0,o0-f0-d0-A0+c0,h0+u0+p0+l0,o0-f0-d0+c0];case 90:return[h0+d0+l0,o0-f0+u0+c0,h0+d0+A0+l0,o0-f0+u0+p0+c0];case 180:return[h0-u0-p0+l0,o0-f0+d0+c0,h0-u0+l0,o0-f0+d0+A0+c0];case 270:return[h0-d0-A0+l0,o0-f0-u0-p0+c0,h0-d0+l0,o0-f0-u0+c0];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e0,n0){const[a0,i0,s0,o0]=e0,l0=s0-a0,c0=o0-i0;switch(this.rotation){case 0:return[a0,n0-o0,l0,c0];case 90:return[a0,n0-i0,c0,l0];case 180:return[s0,n0-i0,l0,c0];case 270:return[s0,n0-o0,c0,l0];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){V0(this,kP,!0)}disableEditMode(){V0(this,kP,!1)}isInEditMode(){return _0(this,kP)}shouldGetKeyboardEvents(){return _0(this,YR)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){H0(this,b1,k3).call(this)}rotate(e0){}serializeDeleted(){var e0;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((e0=this._initialData)==null?void 0:e0.popupRef)||""}}serialize(e0=!1,n0=null){unreachable("An editor must be serializable")}static async deserialize(e0,n0,a0){const i0=new this.prototype.constructor({parent:n0,id:n0.getNextId(),uiManager:a0});i0.rotation=e0.rotation,V0(i0,wP,e0.accessibilityData);const[s0,o0]=i0.pageDimensions,[l0,c0,u0,d0]=i0.getRectInCurrentCoords(e0.rect,o0);return i0.x=l0/s0,i0.y=c0/o0,i0.width=u0/s0,i0.height=d0/o0,i0}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e0;if((e0=_0(this,M$))==null||e0.abort(),V0(this,M$,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),_0(this,jR)&&(clearTimeout(_0(this,jR)),V0(this,jR,null)),H0(this,b1,UF).call(this),this.removeEditToolbar(),_0(this,q_)){for(const n0 of _0(this,q_).values())clearTimeout(n0);V0(this,q_,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(H0(this,b1,K5).call(this),_0(this,A_).classList.remove("hidden"),bindEvents(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e0){if(!this.isResizable||e0.target!==this.div||e0.key!=="Enter")return;this._uiManager.setSelected(this),V0(this,_P,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const n0=_0(this,A_).children;
vendor: 1,186 bytes, line 731
731if(!_0(this,cR)){V0(this,cR,Array.from(n0));const o0=H0(this,b1,Y5).bind(this),l0=H0(this,b1,X5).bind(this),c0=this._uiManager._signal;for(const u0 of _0(this,cR)){const d0=u0.getAttribute("data-resizer-name");u0.setAttribute("role","spinbutton"),u0.addEventListener("keydown",o0,{signal:c0}),u0.addEventListener("blur",l0,{signal:c0}),u0.addEventListener("focus",H0(this,b1,J5).bind(this,d0),{signal:c0}),u0.setAttribute("data-l10n-id",N1._l10nResizer[d0])}}const a0=_0(this,cR)[0];let i0=0;for(const o0 of n0){if(o0===a0)break;i0++}const s0=(360-this.rotation+this.parentRotation)%360/90*(_0(this,cR).length/4);if(s0!==i0){if(s0<i0)for(let l0=0;l0<i0-s0;l0++)_0(this,A_).append(_0(this,A_).firstChild);else if(s0>i0)for(let l0=0;l0<s0-i0;l0++)_0(this,A_).firstChild.before(_0(this,A_).lastChild);let o0=0;for(const l0 of n0){const u0=_0(this,cR)[o0++].getAttribute("data-resizer-name");l0.setAttribute("data-l10n-id",N1._l10nResizer[u0])}}H0(this,b1,C3).call(this,0),V0(this,YR,!0),_0(this,A_).firstChild.focus({focusVisible:!0}),e0.preventDefault(),e0.stopImmediatePropagation()}_resizeWithKeyboard(e0,n0){_0(this,YR)&&H0(this,b1,_3).call(this,_0(this,g4),{movementX:e0,movementY:n0}
731)}_stopResizingWithKeyboard(){H0(this,b1,UF).call(this),this.div.focus()}select(){var e0,n0,a0;if(this.makeResizable(),(e0=this.div)==null||e0.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var i0,s0;(i0=this.div)!=null&&i0.classList.contains("selectedEditor")&&((s0=this._editToolbar)==null||s0.show())});return}(n0=this._editToolbar)==null||n0.show(),(a0=_0(this,H1))==null||a0.toggleAltTextBadge(!1)}unselect(){var e0,n0,a0,i0,s0;(e0=_0(this,A_))==null||e0.classList.add("hidden"),(n0=this.div)==null||n0.classList.remove("selectedEditor"),(a0=this.div)!=null&&a0.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i0=this._editToolbar)==null||i0.hide(),(s0=_0(this,H1))==null||s0.toggleAltTextBadge(!0)}updateParams(e0,n0){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return _0(this,x4)}set isEditing(e0){V0(this,x4,e0),this.parent&&(e0?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e0,n0){V0(this,SP,!0);const a0=e0/n0,{style:i0}=this.div;i0.aspectRatio=a0,i0.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e0,n0=!1){if(n0){_0(this,q_)||V0(this,q_,new Map);const{action:a0}=e0;let i0=_0(this,q_).get(a0);i0&&clearTimeout(i0),i0=setTimeout(()=>{this._reportTelemetry(e0),_0(this,q_).delete(a0),_0(this,q_).size===0&&V0(this,q_,null)},N1._telemetryTimeout),_0(this,q_).set(a0,i0);return}e0.type||(e0.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e0}})}show(e0=this._isVisible){this.div.classList.toggle("hidden",!e0),this._isVisible=e0}enable(){this.div&&(this.div.tabIndex=0),V0(this,XL,!1)}disable(){this.div&&(this.div.tabIndex=-1),V0(this,XL,!0)}renderAnnotationElement(e0){let n0=e0.container.querySelector(".annotationContent");if(!n0)n0=document.createElement("div"),n0.classList.add("annotationContent",this.editorType),e0.container.prepend(n0);else if(n0.nodeName==="CANVAS"){const a0=n0;n0=document.createElement("div"),n0.classList.add("annotationContent",this.editorType),a0.before(n0)}return n0}resetAnnotationElement(e0){const{firstChild:n0}=e0.container;(n0==null?void 0:n0.nodeName)==="DIV"&&n0.classList.contains("annotationContent")&&n0.remove()}};wP=new WeakMap,cR=new WeakMap,H1=new WeakMap,XL=new WeakMap,SP=new WeakMap,A_=new WeakMap,_P=new WeakMap,M$=new WeakMap,g4=new WeakMap,TP=new WeakMap,O$=new WeakMap,x4=new WeakMap,kP=new WeakMap,YR=new WeakMap,jR=new WeakMap,JL=new WeakMap,ZL=new WeakMap,q_=new WeakMap,y4=new WeakMap,J2=new WeakMap,b1=new WeakSet,v3=function([e0,n0],a0,i0){[a0,i0]=this.screenToPageTranslation(a0,i0),this.x+=a0/e0,this.y+=i0/n0,this.fixAndSetPosition()},b4=new WeakSet,E3=function(e0,n0,a0){switch(a0){case 90:return[n0,-e0];case 180:return[-e0,-n0];case 270:return[-n0,e0];default:return[e0,n0]}},w3=function(e0){switch(e0){case 90:{const[n0,a0]=this.pageDimensions;return[0,-n0/a0,a0/n0,0]}case 180:return[-1,0,0,-1];case 270:{const[n0,a0]=this.pageDimensions;return[0,n0/a0,-a0/n0,0]}default:return[1,0,0,1]}},K5=function(){if(_0(this,A_))return;V0(this,A_,document.createElement("div")),_0(this,A_).classList.add("resizers");const e0=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],n0=this._uiManager._signal;for(const a0 of e0){const i0=document.createElement("div");_0(this,A_).append(i0),i0.classList.add("resizer",a0),i0.setAttribute("data-resizer-name",a0),i0.addEventListener("pointerdown",H0(this,b1,Q5).bind(this,a0),{signal:n0}),i0.addEventListener("contextmenu",noContextMenu,{signal:n0}),i0.tabIndex=-1}this.div.prepend(_0(this,A_))},Q5=function(e0,n0){var A0;n0.preventDefault();const{isMac:a0}=util_FeatureTest.platform;if(n0.button!==0||n0.ctrlKey&&a0)return;(A0=_0(this,H1))==null||A0.toggle(!1);const i0=this._isDraggable;this._isDraggable=!1;const s0=new AbortController,o0=this._uiManager.combinedSignal(s0);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",H0(this,b1,_3).bind(this,e0),{passive:!0,capture:!0,signal:o0}),window.addEventListener("contextmenu",noContextMenu,{signal:o0});const l0=this.x,c0=this.y,u0=this.width,d0=this.height,h0=this.parent.div.style.cursor,f0=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(n0.target).cursor;const p0=()=>{var m0;s0.abort(),this.parent.togglePointerEvents(!0),(m0=_0(this,H1))==null||m0.toggle(!0),this._isDraggable=i0,this.parent.div.style.cursor=h0,this.div.style.cursor=f0,H0(this,b1,S3).call(this,l0,c0,u0,d0)};window.addEventListener("pointerup",p0,{signal:o0}),window.addEventListener("blur",p0,{signal:o0})},S3=function(e0,n0,a0,i0){const s0=this.x,o0=this.y,l0=this.width,c0=this.height;s0===e0&&o0===n0&&l0===a0&&c0===i0||this.addCommands({cmd:()=>{this.width=l0,this.height=c0,this.x=s0,this.y=o0;const[u0,d0]=this.parentDimensions;this.setDims(u0*l0,d0*c0),this.fixAndSetPosition()},undo:()=>{this.width=a0,this.height=i0,this.x=e0,this.y=n0;const[u0,d0]=this.parentDimensions;this.setDims(u0*a0,d0*i0),this.fixAndSetPosition()},mustExec:!0})},_3=function(e0,n0){const[a0,i0]=this.parentDimensions,s0=this.x,o0=this.y,l0=this.width,c0=this.height,u0=N1.MIN_SIZE/a0,d0=N1.MIN_SIZE/i0,h0=D0=>Math.round(D0*1e4)/1e4,f0=H0(this,b1,w3).call(this,this.rotation),p0=(D0,O0)=>[f0[0]*D0+f0[2]*O0,f0[1]*D0+f0[3]*O0],A0=H0(this,b1,w3).call(this,360-this.rotation),m0=(D0,O0)=>[A0[0]*D0+A0[2]*O0,A0[1]*D0+A0[3]*O0];let x0,g0,y0=!1,b0=!1;switch(e0){case"topLeft":y0=!0,x0=(D0,O0)=>[0,0],g0=(D0,O0)=>[D0,O0];break;case"topMiddle":x0=(D0,O0)=>[D0/2,0],g0=(D0,O0)=>[D0/2,O0];break;case"topRight":y0=!0,x0=(D0,O0)=>[D0,0],g0=(D0,O0)=>[0,O0];break;case"middleRight":b0=!0,x0=(D0,O0)=>[D0,O0/2],g0=(D0,O0)=>[0,O0/2];break;case"bottomRight":y0=!0,x0=(D0,O0)=>[D0,O0],g0=(D0,O0)=>[0,0];break;case"bottomMiddle":x0=(D0,O0)=>[D0/2,O0],g0=(D0,O0)=>[D0/2,0];break;case"bottomLeft":y0=!0,x0=(D0,O0)=>[0,O0],g0=(D0,O0)=>[D0,0];break;case"middleLeft":b0=!0,x0=(D0,O0)=>[0,O0/2],g0=(D0,O0)=>[D0,O0/2];break}const E0=x0(l0,c0),w0=g0(l0,c0);let v0=p0(...w0);const S0=h0(s0+v0[0]),k0=h0(o0+v0[1]);let R0=1,j0=1,[C0,$0]=this.screenToPageTranslation(n0.movementX,n0.movementY);if([C0,$0]=m0(C0/a0,$0/i0),y0){const D0=Math.hypot(l0,c0);R0=j0=Math.max(Math.min(Math.hypot(w0[0]-E0[0]-C0,w0[1]-E0[1]-$0
731)/D0,1/l0,1/c0),u0/l0,d0/c0)}else b0?R0=Math.max(u0,Math.min(1,Math.abs(w0[0]-E0[0]-C0)))/l0:j0=Math.max(d0,Math.min(1,Math.abs(w0[1]-E0[1]-$0)))/c0;const T0=h0(l0*R0),I0=h0(c0*j0);v0=p0(...g0(T0,I0));const M0=S0-v0[0],N0=k0-v0[1];this.width=T0,this.height=I0,this.x=M0,this.y=N0,this.setDims(a0*T0,i0*I0),this.fixAndSetPosition()},T3=function(e0){const{isMac:n0}=util_FeatureTest.platform;e0.ctrlKey&&!n0||e0.shiftKey||e0.metaKey&&n0?this.parent.toggleSelected(this):this.parent.setSelected(this)},q5=function(e0){const{isSelected:n0}=this;this._uiManager.setUpDragSession();const a0=new AbortController,i0=this._uiManager.combinedSignal(a0);if(n0){this.div.classList.add("moving"),V0(this,JL,e0.clientX),V0(this,ZL,e0.clientY);const o0=l0=>{const{clientX:c0,clientY:u0}=l0,[d0,h0]=this.screenToPageTranslation(c0-_0(this,JL),u0-_0(this,ZL));V0(this,JL,c0),V0(this,ZL,u0),this._uiManager.dragSelectedEditors(d0,h0)};window.addEventListener("pointermove",o0,{passive:!0,capture:!0,signal:i0})}const s0=()=>{a0.abort(),n0&&this.div.classList.remove("moving"),V0(this,TP,!1),this._uiManager.endDragSession()||H0(this,b1,T3).call(this,e0)};window.addEventListener("pointerup",s0,{signal:i0}),window.addEventListener("blur",s0,{signal:i0})},k3=function(){if(_0(this,M$)||!this.div)return;V0(this,M$,new AbortController);const e0=this._uiManager.combinedSignal(_0(this,M$));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e0}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e0})},Y5=function(e0){N1._resizerKeyboardManager.exec(this,e0)},X5=function(e0){var n0;_0(this,YR)&&((n0=e0.relatedTarget)==null?void 0:n0.parentNode)!==_0(this,A_)&&H0(this,b1,UF).call(this)},J5=function(e0){V0(this,g4,_0(this,YR)?e0:"")},C3=function(e0){if(_0(this,cR))for(const n0 of _0(this,cR))n0.tabIndex=e0},UF=function(){if(V0(this,YR,!1),H0(this,b1,C3).call(this,-1),_0(this,_P)){const{savedX:e0,savedY:n0,savedWidth:a0,savedHeight:i0}=_0(this,_P);H0(this,b1,S3).call(this,e0,n0,a0,i0),V0(this,_P,null)}},K0(N1,b4),Gw(N1,"_l10n",null),Gw(N1,"_l10nResizer",null),Gw(N1,"_borderLineWidth",-1),Gw(N1,"_colorManager",new ColorManager),Gw(N1,"_zIndex",1),Gw(N1,"_telemetryTimeout",1e3);let AnnotationEditor=N1;class FakeEditor extends AnnotationEditor{constructor(e0){super(e0),this.annotationElementId=e0.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535;class MurmurHash3_64{constructor(e0){this.h1=e0?e0&4294967295:SEED,this.h2=e0?e0&4294967295:SEED}update(e0){let n0,a0;if(typeof e0=="string"){n0=new Uint8Array(e0.length*2),a0=0;for(let m0=0,x0=e0.length;m0<x0;m0++){const g0=e0.charCodeAt(m0);g0<=255?n0[a0++]=g0:(n0[a0++]=g0>>>8,n0[a0++]=g0&255)}}else if(ArrayBuffer.isView(e0))n0=e0.slice(),a0=n0.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i0=a0>>2,s0=a0-i0*4,o0=new Uint32Array(n0.buffer,0,i0);let l0=0,c0=0,u0=this.h1,d0=this.h2;const h0=3432918353,f0=461845907,p0=h0&MASK_LOW,A0=f0&MASK_LOW;for(let m0=0;m0<i0;m0++)m0&1?(l0=o0[m0],l0=l0*h0&MASK_HIGH|l0*p0&MASK_LOW,l0=l0<<15|l0>>>17,l0=l0*f0&MASK_HIGH|l0*A0&MASK_LOW,u0^=l0,u0=u0<<13|u0>>>19,u0=u0*5+3864292196):(c0=o0[m0],c0=c0*h0&MASK_HIGH|c0*p0&MASK_LOW,c0=c0<<15|c0>>>17,c0=c0*f0&MASK_HIGH|c0*A0&MASK_LOW,d0^=c0,d0=d0<<13|d0>>>19,d0=d0*5+3864292196);switch(l0=0,s0){case 3:l0^=n0[i0*4+2]<<16;case 2:l0^=n0[i0*4+1]<<8;case 1:l0^=n0[i0*4],l0=l0*h0&MASK_HIGH|l0*p0&MASK_LOW,l0=l0<<15|l0>>>17,l0=l0*f0&MASK_HIGH|l0*A0&MASK_LOW,i0&1?u0^=l0:d0^=l0}this.h1=u0,this.h2=d0}hexdigest(){let e0=this.h1,n0=this.h2;return e0^=n0>>>1,e0=e0*3981806797&MASK_HIGH|e0*36045&MASK_LOW,n0=n0*4283543511&MASK_HIGH|((n0<<16|e0>>>16)*2950163797&MASK_HIGH)>>>16,e0^=n0>>>1,e0=e0*444984403&MASK_HIGH|e0*60499&MASK_LOW,n0=n0*3301882366&MASK_HIGH|((n0<<16|e0>>>16)*3120437893&MASK_HIGH)>>>16,e0^=n0>>>1,(e0>>>0).toString(16).padStart(8,"0")+(n0>>>0).toString(16).padStart(8,"0")}}const SerializableEmpty=Object.freeze({map:null,hash:"",transfer:void 0});var CP,RP,h_,Z2,Z5;class AnnotationStorage{constructor(){K0(this,Z2);K0(this,CP,!1);K0(this,RP,null);K0(this,h_,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e0,n0){const a0=_0(this,h_).get(e0);return a0===void 0?n0:Object.assign(n0,a0)}getRawValue(e0){return _0(this,h_).get(e0)}
731remove(e0){if(_0(this,h_).delete(e0),_0(this,h_).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const n0 of _0(this,h_).values())if(n0 instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e0,n0){const a0=_0(this,h_).get(e0);let i0=!1;if(a0!==void 0)for(const[s0,o0]of Object.entries(n0))a0[s0]!==o0&&(i0=!0,a0[s0]=o0);else i0=!0,_0(this,h_).set(e0,n0);i0&&H0(this,Z2,Z5).call(this),n0 instanceof AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(n0.constructor._type)}has(e0){return _0(this,h_).has(e0)}getAll(){return _0(this,h_).size>0?objectFromMap(_0(this,h_)):null}setAll(e0){for(const[n0,a0]of Object.entries(e0))this.setValue(n0,a0)}get size(){return _0(this,h_).size}resetModified(){_0(this,CP)&&(V0(this,CP,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(_0(this,h_).size===0)return SerializableEmpty;const e0=new Map,n0=new MurmurHash3_64,a0=[],i0=Object.create(null);let s0=!1;for(const[o0,l0]of _0(this,h_)){const c0=l0 instanceof AnnotationEditor?l0.serialize(!1,i0):l0;c0&&(e0.set(o0,c0),n0.update(`${o0}:${JSON.stringify(c0)}`),s0||(s0=!!c0.bitmap))}if(s0)for(const o0 of e0.values())o0.bitmap&&a0.push(o0.bitmap);return e0.size>0?{map:e0,hash:n0.hexdigest(),transfer:a0}:SerializableEmpty}get editorStats(){let e0=null;const n0=new Map;for(const a0 of _0(this,h_).values()){if(!(a0 instanceof AnnotationEditor))continue;const i0=a0.telemetryFinalData;if(!i0)continue;const{type:s0}=i0;n0.has(s0)||n0.set(s0,Object.getPrototypeOf(a0).constructor),e0||(e0=Object.create(null));const o0=e0[s0]||(e0[s0]=new Map);for(const[l0,c0]of Object.entries(i0)){if(l0==="type")continue;let u0=o0.get(l0);u0||(u0=new Map,o0.set(l0,u0));const d0=u0.get(c0)??0;u0.set(c0,d0+1)}}for(const[a0,i0]of n0)e0[a0]=i0.computeTelemetryFinalData(e0[a0]);return e0}resetModifiedIds(){V0(this,RP,null)}get modifiedIds(){if(_0(this,RP))return _0(this,RP);const e0=[];for(const n0 of _0(this,h_).values())!(n0 instanceof AnnotationEditor)||!n0.annotationElementId||!n0.serialize()||e0.push(n0.annotationElementId);return V0(this,RP,{ids:new Set(e0),hash:e0.join(",")})}}CP=new WeakMap,RP=new WeakMap,h_=new WeakMap,Z2=new WeakSet,Z5=function(){_0(this,CP)||(V0(this,CP,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var v4;class PrintAnnotationStorage extends AnnotationStorage{constructor(n0){super();K0(this,v4);const{map:a0,hash:i0,transfer:s0}=n0.serializable,o0=structuredClone(a0,s0?{transfer:s0}:null);V0(this,v4,{map:o0,hash:i0,transfer:s0})}get print(){unreachable("Should not call PrintAnnotationStorage.print")}get serializable(){return _0(this,v4)}get modifiedIds(){return shadow(this,"modifiedIds",{ids:new Set,hash:""})}}v4=new WeakMap;var eF;class FontLoader{constructor({ownerDocument:e0=globalThis.document,styleElement:n0=null}){K0(this,eF,new Set);this._document=e0,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e0){this.nativeFontFaces.add(e0),this._document.fonts.add(e0)}removeNativeFontFace(e0){this.nativeFontFaces.delete(e0),this._document.fonts.delete(e0)}insertRule(e0){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const n0=this.styleElement.sheet;n0.insertRule(e0,n0.cssRules.length)}clear(){for(const e0 of this.nativeFontFaces)this._document.fonts.delete(e0);this.nativeFontFaces.clear(),_0(this,eF).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e0,_inspectFont:n0}){if(!(!e0||_0(this,eF).has(e0.loadedName))){if(assert(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:a0,src:i0,style:s0}=e0,o0=new FontFace(a0,i0,s0);this.addNativeFontFace(o0);try{await o0.load(),_0(this,eF).add(a0),n0==null||n0(e0)}catch{warn(`Cannot load system font: ${e0.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o0)}return}unreachable("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e0){if(e0.attached||e0.missingFile&&!e0.systemFontInfo)return;if(e0.attached=!0,e0.systemFontInfo){await this.loadSystemFont(e0);return}if(this.isFontLoadingAPISupported){const a0=e0.createNativeFontFace();if(a0){this.addNativeFontFace(a0);try{await a0.loaded}catch(i0){throw warn(`Failed to load font '${a0.family}': '${i0}'.`),e0.disableFontFace=!0,i0}}return}const n0=e0.createFontFaceRule();if(n0){if(this.insertRule(n0),this.isSyncFontLoadingSupported)return;await new Promise(a0=>{const i0=this._queueLoadingCallback(a0);this._prepareFontLoadEvent(e0,i0)})}}get isFontLoadingAPISupported(){var n0;const e0=!!((n0=this._document)!=null&&n0.fonts);return shadow(this,"isFontLoadingAPISupported",e0)}get isSyncFontLoadingSupported(){let e0=!1;return(isNodeJS||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="str
731ing"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e0=!0),shadow(this,"isSyncFontLoadingSupported",e0)}_queueLoadingCallback(e0){function n0(){for(assert(!i0.done,"completeRequest() cannot be called twice."),i0.done=!0;a0.length>0&&a0[0].done;){const s0=a0.shift();setTimeout(s0.callback,0)}}const{loadingRequests:a0}=this,i0={done:!1,complete:n0,callback:e0};return a0.push(i0),i0}get _loadTestFont(){const e0=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return shadow(this,"_loadTestFont",e0)}_prepareFontLoadEvent(e0,n0){function a0(E0,w0){return E0.charCodeAt(w0)<<24|E0.charCodeAt(w0+1)<<16|E0.charCodeAt(w0+2)<<8|E0.charCodeAt(w0+3)&255}function i0(E0,w0,v0,S0){const k0=E0.substring(0,w0),R0=E0.substring(w0+v0);return k0+S0+R0}let s0,o0;const l0=this._document.createElement("canvas");l0.width=1,l0.height=1;const c0=l0.getContext("2d");let u0=0;function d0(E0,w0){if(++u0>30){warn("Load test font never loaded."),w0();return}if(c0.font="30px "+E0,c0.fillText(".",0,20),c0.getImageData(0,0,1,1).data[3]>0){w0();return}setTimeout(d0.bind(null,E0,w0))}const h0=`lt${Date.now()}${this.loadTestFontId++}`;let f0=this._loadTestFont;f0=i0(f0,976,h0.length,h0);const A0=16,m0=1482184792;let x0=a0(f0,A0);for(s0=0,o0=h0.length-3;s0<o0;s0+=4)x0=x0-m0+a0(h0,s0)|0;s0<h0.length&&(x0=x0-m0+a0(h0+"XXX",s0)|0),f0=i0(f0,A0,4,string32(x0));const g0=`url(data:font/opentype;base64,${btoa(f0)});`,y0=`@font-face {font-family:"${h0}";src:${g0}}`;this.insertRule(y0);const b0=this._document.createElement("div");b0.style.visibility="hidden",b0.style.width=b0.style.height="10px",b0.style.position="absolute",b0.style.top=b0.style.left="0px";for(const E0 of[e0.loadedName,h0]){const w0=this._document.createElement("span");w0.textContent="Hi",w0.style.fontFamily=E0,b0.append(w0)}this._document.body.append(b0),d0(h0,()=>{b0.remove(),n0.complete()})}}eF=new WeakMap;class FontFaceObject{constructor(e0,{disableFontFace:n0=!1,inspectFont:a0=null}){this.compiledGlyphs=Object.create(null);for(const i0 in e0)this[i0]=e0[i0];this.disableFontFace=n0===!0,this._inspectFont=a0}createNativeFontFace(){var n0;if(!this.data||this.disableFontFace)return null;let e0;if(!this.cssFontInfo)e0=new FontFace(this.loadedName,this.data,{});else{const a0={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(a0.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e0=new FontFace(this.cssFontInfo.fontFamily,this.data,a0)}return(n0=this._inspectFont)==null||n0.call(this,this),e0}createFontFaceRule(){var a0;if(!this.data||this.disableFontFace)return null;const e0=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`;let n0;
731if(!this.cssFontInfo)n0=`@font-face {font-family:"${this.loadedName}";src:${e0}}`;else{let i0=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i0+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n0=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i0}src:${e0}}`}return(a0=this._inspectFont)==null||a0.call(this,this,e0),n0}getPathGenerator(e0,n0){if(this.compiledGlyphs[n0]!==void 0)return this.compiledGlyphs[n0];let a0;try{a0=e0.get(this.loadedName+"_path_"+n0)}catch(s0){warn(`getPathGenerator - ignoring character: "${s0}".`)}if(!Array.isArray(a0)||a0.length===0)return this.compiledGlyphs[n0]=function(s0,o0){};const i0=[];for(let s0=0,o0=a0.length;s0<o0;)switch(a0[s0++]){case FontRenderOps.BEZIER_CURVE_TO:{const[l0,c0,u0,d0,h0,f0]=a0.slice(s0,s0+6);i0.push(p0=>p0.bezierCurveTo(l0,c0,u0,d0,h0,f0)),s0+=6}break;case FontRenderOps.MOVE_TO:{const[l0,c0]=a0.slice(s0,s0+2);i0.push(u0=>u0.moveTo(l0,c0)),s0+=2}break;case FontRenderOps.LINE_TO:{const[l0,c0]=a0.slice(s0,s0+2);i0.push(u0=>u0.lineTo(l0,c0)),s0+=2}break;case FontRenderOps.QUADRATIC_CURVE_TO:{const[l0,c0,u0,d0]=a0.slice(s0,s0+4);i0.push(h0=>h0.quadraticCurveTo(l0,c0,u0,d0)),s0+=4}break;case FontRenderOps.RESTORE:i0.push(l0=>l0.restore());break;case FontRenderOps.SAVE:i0.push(l0=>l0.save());break;case FontRenderOps.SCALE:assert(i0.length===2,"Scale command is only valid at the third position.");break;case FontRenderOps.TRANSFORM:{const[l0,c0,u0,d0,h0,f0]=a0.slice(s0,s0+6);i0.push(p0=>p0.transform(l0,c0,u0,d0,h0,f0)),s0+=6}break;case FontRenderOps.TRANSLATE:{const[l0,c0]=a0.slice(s0,s0+2);i0.push(u0=>u0.translate(l0,c0)),s0+=2}break}return this.compiledGlyphs[n0]=function(o0,l0){i0[0](o0),i0[1](o0),o0.scale(l0,-l0);for(let c0=2,u0=i0.length;c0<u0;c0++)i0[c0](o0)}}}var E4;class BaseCanvasFactory{constructor({enableHWA:e0=!1}){K0(this,E4,!1);V0(this,E4,e0)}create(e0,n0){if(e0<=0||n0<=0)throw new Error("Invalid canvas size");const a0=this._createCanvas(e0,n0);return{canvas:a0,context:a0.getContext("2d",{willReadFrequently:!_0(this,E4)})}}reset(e0,n0,a0){if(!e0.canvas)throw new Error("Canvas is not specified");if(n0<=0||a0<=0)throw new Error("Invalid canvas size");e0.canvas.width=n0,e0.canvas.height=a0}destroy(e0){if(!e0.canvas)throw new Error("Canvas is not specified");e0.canvas.width=0,e0.canvas.height=0,e0.canvas=null,e0.context=null}_createCanvas(e0,n0){unreachable("Abstract method `_createCanvas` called.")}}E4=new WeakMap;class DOMCanvasFactory extends BaseCanvasFactory{constructor({ownerDocument:e0=globalThis.document,enableHWA:n0=!1}){super({enableHWA:n0}),this._document=e0}_createCanvas(e0,n0){const a0=this._document.createElement("canvas");return a0.width=e0,a0.height=n0,a0}}class BaseCMapReaderFactory{constructor({baseUrl:e0=null,isCompressed:n0=!0}){this.baseUrl=e0,this.isCompressed=n0}async fetch({name:e0}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e0)throw new Error("CMap name must be specified.");const n0=this.baseUrl+e0+(this.isCompressed?".bcmap":"");return this._fetch(n0).then(a0=>({cMapData:a0,isCompressed:this.isCompressed})).catch(a0=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n0}`)})}async _fetch(e0){unreachable("Abstract method `_fetch` called.")}}class DOMCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(e0){const n0=await fetchData(e0,this.isCompressed?"arraybuffer":"text");return n0 instanceof ArrayBuffer?new Uint8Array(n0):stringToBytes(n0)}}class BaseFilterFactory{addFilter(e0){return"none"}addHCMFilter(e0,n0){return"none"}addAlphaFilter(e0){return"none"}addLuminosityFilter(e0){return"none"}addHighlightHCMFilter(e0,n0,a0,i0,s0){return"none"}destroy(e0=!1){}}var IP,NP,$R,XR,E_,e3,jP,n1,y_,SL,_L,S2,TL,ez,R3,kL,zF,VF,I3,GF;class DOMFilterFactory extends BaseFilterFactory{constructor({docId:n0,ownerDocument:a0=globalThis.document}){super();K0(this,n1);K0(this,IP);K0(this,NP);K0(this,$R);K0(this,XR);K0(this,E_);K0(this,e3);K0(this,jP,0);V0(this,XR,n0),V0(this,E_,a0)}addFilter(n0){if(!n0)return"none";let a0=_0(this,n1,y_).get(n0);if(a0)return a0;const[i0,s0,o0]=H0(this,n1,S2).call(this,n0),l0=n0.length===1?i0:`${i0}${s0}${o0}`;if(a0=_0(this,n1,y_).get(l0),a0)return _0(this,n1,y_).set(n0,a0),a0;const c0=`g_${_0(this,XR)}_transfer_map_${o_(this,jP)._++}`,u0=H0(this,n1,TL).call(this,c0);_0(this,n1,y_).set(n0,u0),_0(this,n1,y_).set(l0,u0);const d0=H0(this,n1,kL).call(this,c0);return H0(this,n1,VF).call(this,i0,s0,o0,d0),u0}addHCMFilter(n0,a0){var A0;const i0=`${n0}-${a0}`,s0="base";let o0=_0(this,n1,SL).get(s0);if((o0==null?void 0:o0.key)===i0||(o0?((A0=o0.filter)==null||A0.remove(),o0.key=i0,o0.url="none",o0.filter=null):(o0={key:i0,url:"none",filter:null},_0(this,n1,SL).set(s0,o0)),!n0||!a0))return o0.url;const l0=H0(this,n1,GF).call(this,n0);n0=Util.makeHexColor(...l0);const c0=H0(this,n1,GF).call(this,a0);if(a0=Util.makeHexColor(...c0),_0(this,n1,_L).style.color="",n0==="#000000"&&a0==="#ffffff"||n0===a0)return o0.url;const u0=new Array(256);for(let m0=0;m0<=255;m0++){const x0=m0/255;u0[m0]=x0<=.03928?x0/12.92:((x0+.055)/1.055)**2.4}const d0=u0.join(","),h0=`g_${_0(this,XR)}_hcm_filter`,f0=o0.filter=H0(this,n1,kL).call(this,h0);H0(this,n1,VF).call(this,d0,d0,d0,f0),H0(this,n1,R3).call(this,f0);const p0=(m0,x0)=>{const g0=l0[m0]/255,y0=c0[m0]/255,b0=new Array(x0+1);for(let E0=0;E0<=x0;E0++)b0[E0]=g0+E0/x0*(y0-g0);return b0.join(",")};return H0(this,n1,VF).call(this,p0(0,5),p0(1,5),p0(2,5),f0),o0.url=H0(this,n1,TL).call(this,h0),o0.url}addAlphaFilter(n0){let a0=_0(this,n1,y_).get(n0);if(a0)return a0;const[i0]=H0(this,n1,S2).call(this,[n0]),s0=`alpha_${i0}`;if(a0=_0(this,n1,y_).get(s0),a0)return _0(this,n1,y_).set(n0,a0),a0;const o0=`g_${_0(this,XR)}_alpha_map_${o_(this,jP)._++}`,l0=H0(this,n1,TL).call(this,o0);_0(this,n1,y_).set(n0,l0),_0(this,n1,y_).set(s0,l0);const c0=H0(this,n1,kL).call(this,o0);return H0(this,n1,I3).call(this,i0,c0),l0}addLuminosityFilter(n0){let a0=_0(this,n1,y_).get(n0||"luminosity");if(a0)return a0;let i0,s0;if(n0?([i0]=H0(this,n1,S2).call(this,[n0]),s0=`luminosity_${i0}`):s0="luminosity",a0=_0(this,n1,y_).get(s0),a0)return _0(this,n1,y_).set(n0,a0),a0;const o0=`g_${_0(this,XR)}_luminosity_map_${o_(this,jP)._++}`,l0=H0(this,n1,TL).call(this,o0);_0(this,n1,y_).set(n0,l0),_0(this,n1,y_).set(s0,l0);const c0=H0(this,n1,kL).call(this,o0);
731return H0(this,n1,ez).call(this,c0),n0&&H0(this,n1,I3).call(this,i0,c0),l0}addHighlightHCMFilter(n0,a0,i0,s0,o0){var y0;const l0=`${a0}-${i0}-${s0}-${o0}`;let c0=_0(this,n1,SL).get(n0);if((c0==null?void 0:c0.key)===l0||(c0?((y0=c0.filter)==null||y0.remove(),c0.key=l0,c0.url="none",c0.filter=null):(c0={key:l0,url:"none",filter:null},_0(this,n1,SL).set(n0,c0)),!a0||!i0))return c0.url;const[u0,d0]=[a0,i0].map(H0(this,n1,GF).bind(this));let h0=Math.round(.2126*u0[0]+.7152*u0[1]+.0722*u0[2]),f0=Math.round(.2126*d0[0]+.7152*d0[1]+.0722*d0[2]),[p0,A0]=[s0,o0].map(H0(this,n1,GF).bind(this));f0<h0&&([h0,f0,p0,A0]=[f0,h0,A0,p0]),_0(this,n1,_L).style.color="";const m0=(b0,E0,w0)=>{const v0=new Array(256),S0=(f0-h0)/w0,k0=b0/255,R0=(E0-b0)/(255*w0);let j0=0;for(let C0=0;C0<=w0;C0++){const $0=Math.round(h0+C0*S0),T0=k0+C0*R0;for(let I0=j0;I0<=$0;I0++)v0[I0]=T0;j0=$0+1}for(let C0=j0;C0<256;C0++)v0[C0]=v0[j0-1];return v0.join(",")},x0=`g_${_0(this,XR)}_hcm_${n0}_filter`,g0=c0.filter=H0(this,n1,kL).call(this,x0);return H0(this,n1,R3).call(this,g0),H0(this,n1,VF).call(this,m0(p0[0],A0[0],5),m0(p0[1],A0[1],5),m0(p0[2],A0[2],5),g0),c0.url=H0(this,n1,TL).call(this,x0),c0.url}destroy(n0=!1){n0&&_0(this,n1,SL).size!==0||(_0(this,$R)&&(_0(this,$R).parentNode.parentNode.remove(),V0(this,$R,null)),_0(this,NP)&&(_0(this,NP).clear(),V0(this,NP,null)),V0(this,jP,0))}}IP=new WeakMap,NP=new WeakMap,$R=new WeakMap,XR=new WeakMap,E_=new WeakMap,e3=new WeakMap,jP=new WeakMap,n1=new WeakSet,y_=function(){return _0(this,NP)||V0(this,NP,new Map)},SL=function(){return _0(this,e3)||V0(this,e3,new Map)},_L=function(){if(!_0(this,$R)){const n0=_0(this,E_).createElement("div"),{style:a0}=n0;a0.visibility="hidden",a0.contain="strict",a0.width=a0.height=0,a0.position="absolute",a0.top=a0.left=0,a0.zIndex=-1;const i0=_0(this,E_).createElementNS(SVG_NS,"svg");i0.setAttribute("width",0),i0.setAttribute("height",0),V0(this,$R,_0(this,E_).createElementNS(SVG_NS,"defs")),n0.append(i0),i0.append(_0(this,$R)),_0(this,E_).body.append(n0)}return _0(this,$R)},S2=function(n0){if(n0.length===1){const u0=n0[0],d0=new Array(256);for(let f0=0;f0<256;f0++)d0[f0]=u0[f0]/255;const h0=d0.join(",");return[h0,h0,h0]}const[a0,i0,s0]=n0,o0=new Array(256),l0=new Array(256),c0=new Array(256);for(let u0=0;u0<256;u0++)o0[u0]=a0[u0]/255,l0[u0]=i0[u0]/255,c0[u0]=s0[u0]/255;return[o0.join(","),l0.join(","),c0.join(",")]},TL=function(n0){if(_0(this,IP)===void 0){V0(this,IP,"");const a0=_0(this,E_).URL;a0!==_0(this,E_).baseURI&&(isDataScheme(a0)?warn('#createUrl: ignore "data:"-URL for performance reasons.'):V0(this,IP,a0.split("#",1)[0]))}return`url(${_0(this,IP)}#${n0})`},ez=function(n0){const a0=_0(this,E_).createElementNS(SVG_NS,"feColorMatrix");a0.setAttribute("type","matrix"),a0.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),n0.append(a0)},R3=function(n0){const a0=_0(this,E_).createElementNS(SVG_NS,"feColorMatrix");a0.setAttribute("type","matrix"),a0.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),n0.append(a0)},kL=function(n0){const a0=_0(this,E_).createElementNS(SVG_NS,"filter");return a0.setAttribute("color-interpolation-filters","sRGB"),a0.setAttribute("id",n0),_0(this,n1,_L).append(a0),a0},zF=function(n0,a0,i0){const s0=_0(this,E_).createElementNS(SVG_NS,a0);s0.setAttribute("type","discrete"),s0.setAttribute("tableValues",i0),n0.append(s0)},VF=function(n0,a0,i0,s0){const o0=_0(this,E_).createElementNS(SVG_NS,"feComponentTransfer");
731s0.append(o0),H0(this,n1,zF).call(this,o0,"feFuncR",n0),H0(this,n1,zF).call(this,o0,"feFuncG",a0),H0(this,n1,zF).call(this,o0,"feFuncB",i0)},I3=function(n0,a0){const i0=_0(this,E_).createElementNS(SVG_NS,"feComponentTransfer");a0.append(i0),H0(this,n1,zF).call(this,i0,"feFuncA",n0)},GF=function(n0){return _0(this,n1,_L).style.color=n0,getRGB(getComputedStyle(_0(this,n1,_L)).getPropertyValue("color"))};class BaseStandardFontDataFactory{constructor({baseUrl:e0=null}){this.baseUrl=e0}async fetch({filename:e0}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e0)throw new Error("Font filename must be specified.");const n0=`${this.baseUrl}${e0}`;return this._fetch(n0).catch(a0=>{throw new Error(`Unable to load font data at: ${n0}`)})}async _fetch(e0){unreachable("Abstract method `_fetch` called.")}}class DOMStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(e0){const n0=await fetchData(e0,"arraybuffer");return new Uint8Array(n0)}}if(isNodeJS){var packageCapability=Promise.withResolvers(),packageMap=null;(async()=>{const e0=await __vitePreload(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]),n0=await __vitePreload(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]),a0=await __vitePreload(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]),i0=await __vitePreload(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]);let s0,o0;return new Map(Object.entries({fs:e0,http:n0,https:a0,url:i0,canvas:s0,path2d:o0}))})().then(e0=>{packageMap=e0,packageCapability.resolve()},e0=>{warn(`loadPackages: ${e0}`),packageMap=new Map,packageCapability.resolve()})}class NodePackages{static get promise(){return packageCapability.promise}static get(e0){return packageMap==null?void 0:packageMap.get(e0)}}async function node_utils_fetchData(r0){const n0=await NodePackages.get("fs").promises.readFile(r0);return new Uint8Array(n0)}class NodeFilterFactory extends BaseFilterFactory{}class NodeCanvasFactory extends BaseCanvasFactory{_createCanvas(e0,n0){return NodePackages.get("canvas").createCanvas(e0,n0)}}class NodeCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(e0){return node_utils_fetchData(e0)}}class NodeStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(e0){return node_utils_fetchData(e0)}}const PathType={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function applyBoundingBox(r0,e0){if(!e0)return;const n0=e0[2]-e0[0],a0=e0[3]-e0[1],i0=new Path2D;i0.rect(e0[0],e0[1],n0,a0),r0.clip(i0)}class BaseShadingPattern{getPattern(){unreachable("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(e0){super(),this._type=e0[1],this._bbox=e0[2],this._colorStops=e0[3],this._p0=e0[4],this._p1=e0[5],this._r0=e0[6],this._r1=e0[7],this.matrix=null}_createGradient(e0){let n0;this._type==="axial"?n0=e0.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(n0=e0.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const a0 of this._colorStops)n0.addColorStop(a0[0],a0[1]);return n0}getPattern(e0,n0,a0,i0){let s0;if(i0===PathType.STROKE||i0===PathType.FILL){const o0=n0.current.getClippedPathBoundingBox(i0,getCurrentTransform(e0))||[0,0,0,0],l0=Math.ceil(o0[2]-o0[0])||1,c0=Math.ceil(o0[3]-o0[1])||1,u0=n0.cachedCanvases.getCanvas("pattern",l0,c0),d0=u0.context;d0.clearRect(0,0,d0.canvas.width,d0.canvas.height),d0.beginPath(),d0.rect(0,0,d0.canvas.width,d0.canvas.height),d0.translate(-o0[0],-o0[1]),a0=Util.transform(a0,[1,0,0,1,o0[0],o0[1]]),d0.transform(...n0.baseTransform),this.matrix&&d0.transform(...this.matrix),applyBoundingBox(d0,this._bbox),d0.fillStyle=this._createGradient(d0),d0.fill(),s0=e0.createPattern(u0.canvas,"no-repeat");const h0=new DOMMatrix(a0);s0.setTransform(h0)}else applyBoundingBox(e0,this._bbox),s0=this._createGradient(e0);return s0}}function drawTriangle(r0,e0,n0,a0,i0,s0,o0,l0){const c0=e0.coords,u0=e0.colors,d0=r0.data,h0=r0.width*4;let f0;c0[n0+1]>c0[a0+1]&&(f0=n0,n0=a0,a0=f0,f0=s0,s0=o0,o0=f0),c0[a0+1]>c0[i0+1]&&(f0=a0,a0=i0,i0=f0,f0=o0,o0=l0,l0=f0),c0[n0+1]>c0[a0+1]&&(f0=n0,n0=a0,a0=f0,f0=s0,s0=o0,o0=f0);const p0=(c0[n0]+e0.offsetX)*e0.scaleX,A0=(c0[n0+1]+e0.offsetY)*e0.scaleY,m0=(c0[a0]+e0.offsetX)*e0.scaleX,x0=(c0[a0+1]+e0.offsetY)*e0.scaleY,g0=(c0[i0]+e0.offsetX)*e0.scaleX,y0=(c0[i0+1]+e0.offsetY)*e0.scaleY;if(A0>=y0)return;const b0=u0[s0],E0=u0[s0+1],w0=u0[s0+2],v0=u0[o0],S0=u0[o0+1],k0=u0[o0+2],R0=u0[l0],j0=u0[l0+1],C0=u0[l0+2],$0=Math.round(A0),T0=Math.round(y0);let I0,M0,N0,D0,O0,B0,z0,G0;for(let F0=$0;F0<=T0;F0++){if(F0<x0){const _w=F0<A0?0:(A0-F0)/(A0-x0);I0=p0-(p0-m0)*_w,M0=b0-(b0-v0)*_w,N0=E0-(E0-S0)*_w,D0=w0-(w0-k0)*_w}else{let _w;F0>y0?_w=1:x0===y0?_w=0:_w=(x0-F0)/(x0-y0),I0=m0-(m0-g0)*_w,M0=v0-(v0-R0)*_w,N0=S0-(S0-j0)*_w,D0=k0-(k0-C0)*_w}let Q0;F0<A0?Q0=0:F0>y0?Q0=1:Q0=(A0-F0)/(A0-y0),O0=p0-(p0-g0)*Q0,B0=b0-(b0-R0)*Q0,z0=E0-(E0-j0)*Q0,G0=w0-(w0-C0)*Q0;
vendor: 11,760 bytes, line 731
731const U0=Math.round(Math.min(I0,O0)),q0=Math.round(Math.max(I0,O0));let Rw=h0*F0+U0*4;for(let _w=U0;_w<=q0;_w++)Q0=(I0-_w)/(I0-O0),Q0<0?Q0=0:Q0>1&&(Q0=1),d0[Rw++]=M0-(M0-B0)*Q0|0,d0[Rw++]=N0-(N0-z0)*Q0|0,d0[Rw++]=D0-(D0-G0)*Q0|0,d0[Rw++]=255}}function drawFigure(r0,e0,n0){const a0=e0.coords,i0=e0.colors;let s0,o0;switch(e0.type){case"lattice":const l0=e0.verticesPerRow,c0=Math.floor(a0.length/l0)-1,u0=l0-1;for(s0=0;s0<c0;s0++){let d0=s0*l0;for(let h0=0;h0<u0;h0++,d0++)drawTriangle(r0,n0,a0[d0],a0[d0+1],a0[d0+l0],i0[d0],i0[d0+1],i0[d0+l0]),drawTriangle(r0,n0,a0[d0+l0+1],a0[d0+1],a0[d0+l0],i0[d0+l0+1],i0[d0+1],i0[d0+l0])}break;case"triangles":for(s0=0,o0=a0.length;s0<o0;s0+=3)drawTriangle(r0,n0,a0[s0],a0[s0+1],a0[s0+2],i0[s0],i0[s0+1],i0[s0+2]);break;default:throw new Error("illegal figure")}}class MeshShadingPattern extends BaseShadingPattern{constructor(e0){super(),this._coords=e0[2],this._colors=e0[3],this._figures=e0[4],this._bounds=e0[5],this._bbox=e0[7],this._background=e0[8],this.matrix=null}_createMeshCanvas(e0,n0,a0){const l0=Math.floor(this._bounds[0]),c0=Math.floor(this._bounds[1]),u0=Math.ceil(this._bounds[2])-l0,d0=Math.ceil(this._bounds[3])-c0,h0=Math.min(Math.ceil(Math.abs(u0*e0[0]*1.1)),3e3),f0=Math.min(Math.ceil(Math.abs(d0*e0[1]*1.1)),3e3),p0=u0/h0,A0=d0/f0,m0={coords:this._coords,colors:this._colors,offsetX:-l0,offsetY:-c0,scaleX:1/p0,scaleY:1/A0},x0=h0+2*2,g0=f0+2*2,y0=a0.getCanvas("mesh",x0,g0),b0=y0.context,E0=b0.createImageData(h0,f0);if(n0){const v0=E0.data;for(let S0=0,k0=v0.length;S0<k0;S0+=4)v0[S0]=n0[0],v0[S0+1]=n0[1],v0[S0+2]=n0[2],v0[S0+3]=255}for(const v0 of this._figures)drawFigure(E0,v0,m0);return b0.putImageData(E0,2,2),{canvas:y0.canvas,offsetX:l0-2*p0,offsetY:c0-2*A0,scaleX:p0,scaleY:A0}}getPattern(e0,n0,a0,i0){applyBoundingBox(e0,this._bbox);let s0;if(i0===PathType.SHADING)s0=Util.singularValueDecompose2dScale(getCurrentTransform(e0));else if(s0=Util.singularValueDecompose2dScale(n0.baseTransform),this.matrix){const l0=Util.singularValueDecompose2dScale(this.matrix);s0=[s0[0]*l0[0],s0[1]*l0[1]]}const o0=this._createMeshCanvas(s0,i0===PathType.SHADING?null:this._background,n0.cachedCanvases);return i0!==PathType.SHADING&&(e0.setTransform(...n0.baseTransform),this.matrix&&e0.transform(...this.matrix)),e0.translate(o0.offsetX,o0.offsetY),e0.scale(o0.scaleX,o0.scaleY),e0.createPattern(o0.canvas,"no-repeat")}}class DummyShadingPattern extends BaseShadingPattern{getPattern(){return"hotpink"}}function getShadingPattern(r0){switch(r0[0]){case"RadialAxial":return new RadialAxialShadingPattern(r0);case"Mesh":return new MeshShadingPattern(r0);case"Dummy":return new DummyShadingPattern}throw new Error(`Unknown IR type: ${r0[0]}`)}const PaintType={COLORED:1,UNCOLORED:2},t3=class t3{constructor(e0,n0,a0,i0,s0){this.operatorList=e0[2],this.matrix=e0[3],this.bbox=e0[4],this.xstep=e0[5],this.ystep=e0[6],this.paintType=e0[7],this.tilingType=e0[8],this.color=n0,this.ctx=a0,this.canvasGraphicsFactory=i0,this.baseTransform=s0}createPatternCanvas(e0){const{bbox:n0,operatorList:a0,paintType:i0,tilingType:s0,color:o0,canvasGraphicsFactory:l0}=this;let{xstep:c0,ystep:u0}=this;c0=Math.abs(c0),u0=Math.abs(u0),info("TilingType: "+s0);const d0=n0[0],h0=n0[1],f0=n0[2],p0=n0[3],A0=f0-d0,m0=p0-h0,x0=Util.singularValueDecompose2dScale(this.matrix),g0=Util.singularValueDecompose2dScale(this.baseTransform),y0=x0[0]*g0[0],b0=x0[1]*g0[1];let E0=A0,w0=m0,v0=!1,S0=!1;const k0=Math.ceil(c0*y0),R0=Math.ceil(u0*b0),j0=Math.ceil(A0*y0),C0=Math.ceil(m0*b0);k0>=j0?E0=c0:v0=!0,R0>=C0?w0=u0:S0=!0;const $0=this.getSizeAndScale(E0,this.ctx.canvas.width,y0),T0=this.getSizeAndScale(w0,this.ctx.canvas.height,b0),I0=e0.cachedCanvases.getCanvas("pattern",$0.size,T0.size),M0=I0.context,N0=l0.createCanvasGraphics(M0);if(N0.groupLevel=e0.groupLevel,this.setFillAndStrokeStyleToContext(N0,i0,o0),M0.translate(-$0.scale*d0,-T0.scale*h0),N0.transform($0.scale,0,0,T0.scale,0,0),M0.save(),this.clipBbox(N0,d0,h0,f0,p0),N0.baseTransform=getCurrentTransform(N0.ctx),N0.executeOperatorList(a0),N0.endDrawing(),M0.restore(),v0||S0){const D0=I0.canvas;v0&&(E0=c0),S0&&(w0=u0);const O0=this.getSizeAndScale(E0,this.ctx.canvas.width,y0),B0=this.getSizeAndScale(w0,this.ctx.canvas.height,b0),z0=O0.size,G0=B0.size,F0=e0.cachedCanvases.getCanvas("pattern-workaround",z0,G0),Q0=F0.context,U0=v0?Math.floor(A0/c0):0,q0=S0?Math.floor(m0/u0):0;for(let Rw=0;Rw<=U0;Rw++)for(let _w=0;_w<=q0;_w++)Q0.drawImage(D0,z0*Rw,G0*_w,z0,G0,0,0,z0,G0);return{canvas:F0.canvas,scaleX:O0.scale,scaleY:B0.scale,offsetX:d0,offsetY:h0}}return{canvas:I0.canvas,scaleX:$0.scale,scaleY:T0.scale,offsetX:d0,offsetY:h0}}getSizeAndScale(e0,n0,a0){const i0=Math.max(t3.MAX_PATTERN_SIZE,n0);let s0=Math.ceil(e0*a0);return s0>=i0?s0=i0:a0=s0/e0,{scale:a0,size:s0}}clipBbox(e0,n0,a0,i0,s0){const o0=i0-n0,l0=s0-a0;e0.ctx.rect(n0,a0,o0,l0),e0.current.updateRectMinMax(getCurrentTransform(e0.ctx),[n0,a0,i0,s0]),e0.clip(),e0.endPath()}setFillAndStrokeStyleToContext(e0,n0,a0){const i0=e0.ctx,s0=e0.current;switch(n0){case PaintType.COLORED:const o0=this.ctx;i0.fillStyle=o0.fillStyle,i0.strokeStyle=o0.strokeStyle,s0.fillColor=o0.fillStyle,s0.strokeColor=o0.strokeStyle;break;case PaintType.UNCOLORED:const l0=Util.makeHexColor(a0[0],a0[1],a0[2]);i0.fillStyle=l0,i0.strokeStyle=l0,s0.fillColor=l0,s0.strokeColor=l0;break;default:throw new FormatError(`Unsupported paint type: ${n0}`)}}getPattern(e0,n0,a0,i0){let s0=a0;i0!==PathType.SHADING&&(s0=Util.transform(s0,n0.baseTransform),this.matrix&&(s0=Util.transform(s0,this.matrix)));const o0=this.createPatternCanvas(n0);let l0=new DOMMatrix(s0);l0=l0.translate(o0.offsetX,o0.offsetY),l0=l0.scale(1/o0.scaleX,1/o0.scaleY);const c0=e0.createPattern(o0.canvas,"repeat");return c0.setTransform(l0),c0}};Gw(t3,"MAX_PATTERN_SIZE",3e3);let TilingPattern=t3;function convertBlackAndWhiteToRGBA({src:r0,srcPos:e0=0,dest:n0,width:a0,height:i0,nonBlackColor:s0=4294967295,inverseDecode:o0=!1}){const l0=util_FeatureTest.isLittleEndian?4278190080:255,[c0,u0]=o0?[s0,l0]:[l0,s0],d0=a0>>3,h0=a0&7,f0=r0.length;n0=new Uint32Array(n0.buffer);let p0=0;for(let A0=0;A0<i0;A0++){for(const x0=e0+d0;e0<x0;e0++){const g0=e0<f0?r0[e0]:255;n0[p0++]=g0&128?u0:c0,n0[p0++]=g0&64?u0:c0,n0[p0++]=g0&32?u0:c0,n0[p0++]=g0&16?u0:c0,n0[p0++]=g0&8?u0:c0,n0[p0++]=g0&4?u0:c0,n0[p0++]=g0&2?u0:c0,n0[p0++]=g0&1?u0:c0}if(h0===0)continue;const m0=e0<f0?r0[e0++]:255;for(let x0=0;x0<h0;x0++)n0[p0++]=m0&1<<7-x0?u0:c0}return{srcPos:e0,destPos:p0}}const MIN_FONT_SIZE=16,MAX_FONT_SIZE=100,EXECUTION_TIME=15,EXECUTION_STEPS=10,MAX_SIZE_TO_COMPILE=1e3,FULL_CHUNK_HEIGHT=16;function mirrorContextOperations(r0,e0){if(r0._removeMirroring)throw new Error("Context is already forwarding operations.");r0.__originalSave=r0.save,r0.__originalRestore=r0.restore,r0.__originalRotate=r0.rotate,r0.__originalScale=r0.scale,r0.__originalTranslate=r0.translate,r0.__originalTransform=r0.transform,r0.__originalSetTransform=r0.setTransform,r0.__originalResetTransform=r0.resetTransform,r0.__originalClip=r0.clip,r0.__originalMoveTo=r0.moveTo,r0.__originalLineTo=r0.lineTo,r0.__originalBezierCurveTo=r0.bezierCurveTo,r0.__originalRect=r0.rect,r0.__originalClosePath=r0.closePath,r0.__originalBeginPath=r0.beginPath,r0._removeMirroring=()=>{r0.save=r0.__originalSave,r0.restore=r0.__originalRestore,r0.rotate=r0.__originalRotate,r0.scale=r0.__originalScale,r0.translate=r0.__originalTranslate,r0.transform=r0.__originalTransform,r0.setTransform=r0.__originalSetTransform,r0.resetTransform=r0.__originalResetTransform,r0.clip=r0.__originalClip,r0.moveTo=r0.__originalMoveTo,r0.lineTo=r0.__originalLineTo,r0.bezierCurveTo=r0.__originalBezierCurveTo,r0.rect=r0.__originalRect,r0.closePath=r0.__originalClosePath,r0.beginPath=r0.__originalBeginPath,delete r0._removeMirroring},r0.save=function(){e0.save(),this.__originalSave()},r0.restore=function(){e0.restore(),this.__originalRestore()},r0.translate=function(a0,i0){e0.translate(a0,i0),this.__originalTranslate(a0,i0)},r0.scale=function(a0,i0){e0.scale(a0,i0),this.__originalScale(a0,i0)},r0.transform=function(a0,i0,s0,o0,l0,c0){e0.transform(a0,i0,s0,o0,l0,c0),this.__originalTransform(a0,i0,s0,o0,l0,c0)},r0.setTransform=function(a0,i0,s0,o0,l0,c0){e0.setTransform(a0,i0,s0,o0,l0,c0),this.__originalSetTransform(a0,i0,s0,o0,l0,c0)},r0.resetTransform=function(){e0.resetTransform(),this.__originalResetTransform()},r0.rotate=function(a0){e0.rotate(a0),this.__originalRotate(a0)},r0.clip=function(a0){e0.clip(a0),this.__originalClip(a0)},r0.moveTo=function(n0,a0){e0.moveTo(n0,a0),this.__originalMoveTo(n0,a0)},r0.lineTo=function(n0,a0){e0.lineTo(n0,a0),this.__originalLineTo(n0,a0)},r0.bezierCurveTo=function(n0,a0,i0,s0,o0,l0){e0.bezierCurveTo(n0,a0,i0,s0,o0,l0),this.__originalBezierCurveTo(n0,a0,i0,s0,o0,l0)},r0.rect=function(n0,a0,i0,s0){e0.rect(n0,a0,i0,s0),this.__originalRect(n0,a0,i0,s0)},r0.closePath=function(){e0.closePath(),this.__originalClosePath()},r0.beginPath=function(){e0.beginPath(),this.__originalBeginPath()}}class CachedCanvases{constructor(e0){this.canvasFactory=e0,this.cache=Object.create(null)}getCanvas(e0,n0,a0){let i0;return this.cache[e0]!==void 0?(i0=this.cache[e0],this.canvasFactory.reset(i0,n0,a0)):(i0=this.canvasFactory.create(n0,a0),this.cache[e0]=i0),i0}delete(e0){delete this.cache[e0]}clear(){for(const e0 in this.cache){const n0=this.cache[e0];this.canvasFactory.destroy(n0),delete this.cache[e0]}}}function drawImageAtIntegerCoords(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0){const[d0,h0,f0,p0,A0,m0]=getCurrentTransform(r0);if(h0===0&&f0===0){const y0=o0*d0+A0,b0=Math.round(y0),E0=l0*p0+m0,w0=Math.round(E0),v0=(o0+c0)*d0+A0,S0=Math.abs(Math.round(v0)-b0)||1,k0=(l0+u0)*p0+m0,R0=Math.abs(Math.round(k0)-w0)||1;return r0.setTransform(Math.sign(d0),0,0,Math.sign(p0),b0,w0),r0.drawImage(e0,n0,a0,i0,s0,0,0,S0,R0),r0.setTransform(d0,h0,f0,p0,A0,m0),[S0,R0]}if(d0===0&&p0===0){const y0=l0*f0+A0,b0=Math.round(y0),E0=o0*h0+m0,w0=Math.round(E0),v0=(l0+u0)*f0+A0,S0=Math.abs(Math.round(v0)-b0)||1,k0=(o0+c0)*h0+m0,R0=Math.abs(Math.round(k0)-w0)||1;return r0.setTransform(0,Math.sign(h0),Math.sign(f0),0,b0,w0),r0.drawImage(e0,n0,a0,i0,s0,0,0,R0,S0),r0.setTransform(d0,h0,f0,p0,A0,m0),[R0,S0]}r0.drawImage(e0,n0,a0,i0,s0,o0,l0,c0,u0);const x0=Math.hypot(d0,h0),g0=Math.hypot(f0,p0);return[x0*c0,g0*u0]}function compileType3Glyph(r0){const{width:e0,height:n0}=r0;if(e0>MAX_SIZE_TO_COMPILE||n0>MAX_SIZE_TO_COMPILE)return null;const a0=1e3,i0=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s0=e0+1;let o0=new Uint8Array(s0*(n0+1)),l0,c0,u0;const d0=e0+7&-8;let h0=new Uint8Array(d0*n0),f0=0;for(const g0 of r0.data){let y0=128;for(;y0>0;)h0[f0++]=g0&y0?0:255,y0>>=1}let p0=0;for(f0=0,h0[f0]!==0&&(o0[0]=1,++p0),c0=1;c0<e0;c0++)h0[f0]!==h0[f0+1]&&(o0[c0]=h0[f0]?2:1,++p0),f0++;for(h0[f0]!==0&&(o0[c0]=2,++p0),l0=1;l0<n0;l0++){f0=l0*d0,u0=l0*s0,h0[f0-d0]!==h0[f0]&&(o0[u0]=h0[f0]?1:8,++p0);let g0=(h0[f0]?4:0)+(h0[f0-d0]?8:0);for(c0=1;c0<e0;c0++)g0=(g0>>2)+(h0[f0+1]?4:0)+(h0[f0-d0+1]?8:0),i0[g0]&&(o0[u0+c0]=i0[g0],++p0),f0++;if(h0[f0-d0]!==h0[f0]&&(o0[u0+c0]=h0[f0]?2:4,++p0),p0>a0)return null}for(f0=d0*(n0-1),u0=l0*s0,h0[f0]!==0&&(o0[u0]=8,++p0),c0=1;c0<e0;c0++)h0[f0]!==h0[f0+1]&&(o0[u0+c0]=h0[f0]?4:8,++p0),f0++;if(h0[f0]!==0&&(o0[u0+c0]=4,++p0),p0>a0)return null;const A0=new Int32Array([0,s0,-1,0,-s0,0,0,0,1]),m0=new Path2D;for(l0=0;p0&&l0<=n0;l0++){let g0=l0*s0;const y0=g0+e0;for(;g0<y0&&!o0[g0];)g0++;if(g0===y0)continue;m0.moveTo(g0%s0,l0);const b0=g0;let E0=o0[g0];do{const w0=A0[E0];do g0+=w0;while(!o0[g0]);const v0=o0[g0];v0!==5&&v0!==10?(E0=v0,o0[g0]=0):(E0=v0&51*E0>>4,o0[g0]&=E0>>2|E0<<2),m0.lineTo(g0%s0,g0/s0|0),o0[g0]||--p0}while(b0!==g0);--l0}return h0=null,o0=null,function(g0){g0.save(),g0.scale(1/e0,-1/n0),g0.translate(0,-n0),g0.fill(m0),g0.beginPath(),g0.restore(
731)}}class CanvasExtraState{constructor(e0,n0){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e0,n0])}clone(){const e0=Object.create(this);return e0.clipBox=this.clipBox.slice(),e0}setCurrentPoint(e0,n0){this.x=e0,this.y=n0}updatePathMinMax(e0,n0,a0){[n0,a0]=Util.applyTransform([n0,a0],e0),this.minX=Math.min(this.minX,n0),this.minY=Math.min(this.minY,a0),this.maxX=Math.max(this.maxX,n0),this.maxY=Math.max(this.maxY,a0)}updateRectMinMax(e0,n0){const a0=Util.applyTransform(n0,e0),i0=Util.applyTransform(n0.slice(2),e0),s0=Util.applyTransform([n0[0],n0[3]],e0),o0=Util.applyTransform([n0[2],n0[1]],e0);this.minX=Math.min(this.minX,a0[0],i0[0],s0[0],o0[0]),this.minY=Math.min(this.minY,a0[1],i0[1],s0[1],o0[1]),this.maxX=Math.max(this.maxX,a0[0],i0[0],s0[0],o0[0]),this.maxY=Math.max(this.maxY,a0[1],i0[1],s0[1],o0[1])}updateScalingPathMinMax(e0,n0){Util.scaleMinMax(e0,n0),this.minX=Math.min(this.minX,n0[0]),this.minY=Math.min(this.minY,n0[1]),this.maxX=Math.max(this.maxX,n0[2]),this.maxY=Math.max(this.maxY,n0[3])}updateCurvePathMinMax(e0,n0,a0,i0,s0,o0,l0,c0,u0,d0){const h0=Util.bezierBoundingBox(n0,a0,i0,s0,o0,l0,c0,u0,d0);d0||this.updateRectMinMax(e0,h0)}getPathBoundingBox(e0=PathType.FILL,n0=null){const a0=[this.minX,this.minY,this.maxX,this.maxY];if(e0===PathType.STROKE){n0||unreachable("Stroke bounding box must include transform.");const i0=Util.singularValueDecompose2dScale(n0),s0=i0[0]*this.lineWidth/2,o0=i0[1]*this.lineWidth/2;a0[0]-=s0,a0[1]-=o0,a0[2]+=s0,a0[3]+=o0}return a0}updateClipFromPath(){const e0=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e0||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e0){this.clipBox=e0,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e0=PathType.FILL,n0=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(e0,n0))}}function putBinaryImageData(r0,e0){if(typeof ImageData<"u"&&e0 instanceof ImageData){r0.putImageData(e0,0,0);return}const n0=e0.height,a0=e0.width,i0=n0%FULL_CHUNK_HEIGHT,s0=(n0-i0)/FULL_CHUNK_HEIGHT,o0=i0===0?s0:s0+1,l0=r0.createImageData(a0,FULL_CHUNK_HEIGHT);let c0=0,u0;const d0=e0.data,h0=l0.data;let f0,p0,A0,m0;if(e0.kind===util_ImageKind.GRAYSCALE_1BPP){const x0=d0.byteLength,g0=new Uint32Array(h0.buffer,0,h0.byteLength>>2),y0=g0.length,b0=a0+7>>3,E0=4294967295,w0=util_FeatureTest.isLittleEndian?4278190080:255;for(f0=0;f0<o0;f0++){for(A0=f0<s0?FULL_CHUNK_HEIGHT:i0,u0=0,p0=0;p0<A0;p0++){const v0=x0-c0;let S0=0;const k0=v0>b0?a0:v0*8-7,R0=k0&-8;let j0=0,C0=0;for(;S0<R0;S0+=8)C0=d0[c0++],g0[u0++]=C0&128?E0:w0,g0[u0++]=C0&64?E0:w0,g0[u0++]=C0&32?E0:w0,g0[u0++]=C0&16?E0:w0,g0[u0++]=C0&8?E0:w0,g0[u0++]=C0&4?E0:w0,g0[u0++]=C0&2?E0:w0,g0[u0++]=C0&1?E0:w0;for(;S0<k0;S0++)j0===0&&(C0=d0[c0++],j0=128),g0[u0++]=C0&j0?E0:w0,j0>>=1}for(;u0<y0;)g0[u0++]=0;r0.putImageData(l0,0,f0*FULL_CHUNK_HEIGHT)}}else if(e0.kind===util_ImageKind.RGBA_32BPP){for(p0=0,m0=a0*FULL_CHUNK_HEIGHT*4,f0=0;f0<s0;f0++)h0.set(d0.subarray(c0,c0+m0)),c0+=m0,r0.putImageData(l0,0,p0),p0+=FULL_CHUNK_HEIGHT;f0<o0&&(m0=a0*i0*4,h0.set(d0.subarray(c0,c0+m0)),r0.putImageData(l0,0,p0))}else if(e0.kind===util_ImageKind.RGB_24BPP)for(A0=FULL_CHUNK_HEIGHT,m0=a0*A0,f0=0;f0<o0;f0++){for(f0>=s0&&(A0=i0,m0=a0*A0),u0=0,p0=m0;p0--;)h0[u0++]=d0[c0++],h0[u0++]=d0[c0++],h0[u0++]=d0[c0++],h0[u0++]=255;r0.putImageData(l0,0,f0*FULL_CHUNK_HEIGHT)}else throw new Error(`bad image kind: ${e0.kind}`)}function putBinaryImageMask(r0,e0){if(e0.bitmap){r0.drawImage(e0.bitmap,0,0);return}const n0=e0.height,a0=e0.width,i0=n0%FULL_CHUNK_HEIGHT,s0=(n0-i0)/FULL_CHUNK_HEIGHT,o0=i0===0?s0:s0+1,l0=r0.createImageData(a0,FULL_CHUNK_HEIGHT);let c0=0;const u0=e0.data,d0=l0.data;for(let h0=0;h0<o0;h0++){const f0=h0<s0?FULL_CHUNK_HEIGHT:i0;({srcPos:c0}=convertBlackAndWhiteToRGBA({src:u0,srcPos:c0,dest:d0,width:a0,height:f0,nonBlackColor:0})),r0.putImageData(l0,0,h0*FULL_CHUNK_HEIGHT)}}function copyCtxState(r0,e0){const n0=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const a0 of n0)r0[a0]!==void 0&&(e0[a0]=r0[a0]);r0.setLineDash!==void 0&&(e0.setLineDash(r0.getLineDash()),e0.lineDashOffset=r0.lineDashOffset)}function resetCtxToDefault(r0){if(r0.strokeStyle=r0.fillStyle="#000000",r0.fillRule="nonzero",r0.globalAlpha=1,r0.lineWidth=1,r0.lineCap="butt",r0.lineJoin="miter",r0.miterLimit=10,r0.globalCompositeOperation="source-over",r0.font="10px sans-serif",r0.setLineDash!==void 0&&(r0.set
vendor: 4,456 bytes, line 731
731LineDash([]),r0.lineDashOffset=0),!isNodeJS){const{filter:e0}=r0;e0!=="none"&&e0!==""&&(r0.filter="none")}}function getImageSmoothingEnabled(r0,e0){if(e0)return!0;const n0=Util.singularValueDecompose2dScale(r0);n0[0]=Math.fround(n0[0]),n0[1]=Math.fround(n0[1]);const a0=Math.fround((globalThis.devicePixelRatio||1)*PixelsPerInch.PDF_TO_CSS_UNITS);return n0[0]<=a0&&n0[1]<=a0}const LINE_CAP_STYLES=["butt","round","square"],LINE_JOIN_STYLES=["miter","round","bevel"],NORMAL_CLIP={},EO_CLIP={};var eP,N3,j3;const h5=class h5{constructor(e0,n0,a0,i0,s0,{optionalContentConfig:o0,markedContentStack:l0=null},c0,u0){K0(this,eP);this.ctx=e0,this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=n0,this.objs=a0,this.canvasFactory=i0,this.filterFactory=s0,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l0||[],this.optionalContentConfig=o0,this.cachedCanvases=new CachedCanvases(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c0,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=u0,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e0,n0=null){return typeof e0=="string"?e0.startsWith("g_")?this.commonObjs.get(e0):this.objs.get(e0):n0}beginDrawing({transform:e0,viewport:n0,transparency:a0=!1,background:i0=null}){const s0=this.ctx.canvas.width,o0=this.ctx.canvas.height,l0=this.ctx.fillStyle;if(this.ctx.fillStyle=i0||"#ffffff",this.ctx.fillRect(0,0,s0,o0),this.ctx.fillStyle=l0,a0){const c0=this.cachedCanvases.getCanvas("transparent",s0,o0);this.compositeCtx=this.ctx,this.transparentCanvas=c0.canvas,this.ctx=c0.context,this.ctx.save(),this.ctx.transform(...getCurrentTransform(this.compositeCtx))}this.ctx.save(),resetCtxToDefault(this.ctx),e0&&(this.ctx.transform(...e0),this.outputScaleX=e0[0],this.outputScaleY=e0[0]),this.ctx.transform(...n0.transform),this.viewportScale=n0.scale,this.baseTransform=getCurrentTransform(this.ctx)}executeOperatorList(e0,n0,a0,i0){const s0=e0.argsArray,o0=e0.fnArray;let l0=n0||0;const c0=s0.length;if(c0===l0)return l0;const u0=c0-l0>EXECUTION_STEPS&&typeof a0=="function",d0=u0?Date.now()+EXECUTION_TIME:0;let h0=0;const f0=this.commonObjs,p0=this.objs;let A0;for(;;){if(i0!==void 0&&l0===i0.nextBreakPoint)return i0.breakIt(l0,a0),l0;if(A0=o0[l0],A0!==OPS.dependency)this[A0].apply(this,s0[l0]);else for(const m0 of s0[l0]){const x0=m0.startsWith("g_")?f0:p0;if(!x0.has(m0))return x0.get(m0,a0),l0}if(l0++,l0===c0)return l0;if(u0&&++h0>EXECUTION_STEPS){if(Date.now()>d0)return a0(),l0;h0=0}}}endDrawing(){H0(this,eP,N3).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e0 of this._cachedBitmapsMap.values()){for(const n0 of e0.values())typeof HTMLCanvasElement<"u"&&n0 instanceof HTMLCanvasElement&&(n0.width=n0.height=0);e0.clear()}this._cachedBitmapsMap.clear(),H0(this,eP,j3).call(this)}_scaleImage(e0,n0){const a0=e0.width??e0.displayWidth,i0=e0.height??e0.displayHeight;let s0=Math.max(Math.hypot(n0[0],n0[1]),1),o0=Math.max(Math.hypot(n0[2],n0[3]),1),l0=a0,c0=i0,u0="prescale1",d0,h0;for(;s0>2&&l0>1||o0>2&&c0>1;){let f0=l0,p0=c0;s0>2&&l0>1&&(f0=l0>=16384?Math.floor(l0/2)-1||1:Math.ceil(l0/2),s0/=l0/f0),o0>2&&c0>1&&(p0=c0>=16384?Math.floor(c0/2)-1||1:Math.ceil(c0)/2,o0/=c0/p0),d0=this.cachedCanvases.getCanvas(u0,f0,p0),h0=d0.context,h0.clearRect(0,0,f0,p0),h0.drawImage(e0,0,0,l0,c0,0,0,f0,p0),e0=d0.canvas,l0=f0,c0=p0,u0=u0==="prescale1"?"prescale2":"prescale1"}return{img:e0,paintWidth:l0,paintHeight:c0}}_createMaskCanvas(e0){const n0=this.ctx,{width:a0,height:i0}=e0,s0=this.current.fillColor,o0=this.current.patternFill,l0=getCurrentTransform(n0);let c0,u0,d0,h0;if((e0.bitmap||e0.data)&&e0.count>1){const k0=e0.bitmap||e0.data.buffer;u0=JSON.stringify(o0?l0:[l0.slice(0,4),s0]),c0=this._cachedBitmapsMap.get(k0),c0||(c0=new Map,this._cachedBitmapsMap.set(k0,c0));const R0=c0.get(u0);if(R0&&!o0){const j0=Math.round(Math.min(l0[0],l0[2])+l0[4]),C0=Math.round(Math.min(l0[1],l0[3])+l0[5]);return{canvas:R0,offsetX:j0,offsetY:C0}}d0=R0}d0||(h0=this.cachedCanvases.getCanvas("maskCanvas",a0,i0),putBinaryImageMask(h0.context,e0));
vendor: 7,127 bytes, line 731
731let f0=Util.transform(l0,[1/a0,0,0,-1/i0,0,0]);f0=Util.transform(f0,[1,0,0,1,0,-i0]);const[p0,A0,m0,x0]=Util.getAxialAlignedBoundingBox([0,0,a0,i0],f0),g0=Math.round(m0-p0)||1,y0=Math.round(x0-A0)||1,b0=this.cachedCanvases.getCanvas("fillCanvas",g0,y0),E0=b0.context,w0=p0,v0=A0;E0.translate(-w0,-v0),E0.transform(...f0),d0||(d0=this._scaleImage(h0.canvas,getCurrentTransformInverse(E0)),d0=d0.img,c0&&o0&&c0.set(u0,d0)),E0.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(E0),e0.interpolate),drawImageAtIntegerCoords(E0,d0,0,0,d0.width,d0.height,0,0,a0,i0),E0.globalCompositeOperation="source-in";const S0=Util.transform(getCurrentTransformInverse(E0),[1,0,0,1,-w0,-v0]);return E0.fillStyle=o0?s0.getPattern(n0,this,S0,PathType.FILL):s0,E0.fillRect(0,0,a0,i0),c0&&!o0&&(this.cachedCanvases.delete("fillCanvas"),c0.set(u0,b0.canvas)),{canvas:b0.canvas,offsetX:Math.round(w0),offsetY:Math.round(v0)}}setLineWidth(e0){e0!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e0,this.ctx.lineWidth=e0}setLineCap(e0){this.ctx.lineCap=LINE_CAP_STYLES[e0]}setLineJoin(e0){this.ctx.lineJoin=LINE_JOIN_STYLES[e0]}setMiterLimit(e0){this.ctx.miterLimit=e0}setDash(e0,n0){const a0=this.ctx;a0.setLineDash!==void 0&&(a0.setLineDash(e0),a0.lineDashOffset=n0)}setRenderingIntent(e0){}setFlatness(e0){}setGState(e0){for(const[n0,a0]of e0)switch(n0){case"LW":this.setLineWidth(a0);break;case"LC":this.setLineCap(a0);break;case"LJ":this.setLineJoin(a0);break;case"ML":this.setMiterLimit(a0);break;case"D":this.setDash(a0[0],a0[1]);break;case"RI":this.setRenderingIntent(a0);break;case"FL":this.setFlatness(a0);break;case"Font":this.setFont(a0[0],a0[1]);break;case"CA":this.current.strokeAlpha=a0;break;case"ca":this.current.fillAlpha=a0,this.ctx.globalAlpha=a0;break;case"BM":this.ctx.globalCompositeOperation=a0;break;case"SMask":this.current.activeSMask=a0?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(a0);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e0=this.inSMaskMode;this.current.activeSMask&&!e0?this.beginSMaskMode():!this.current.activeSMask&&e0&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e0=this.ctx.canvas.width,n0=this.ctx.canvas.height,a0="smaskGroupAt"+this.groupLevel,i0=this.cachedCanvases.getCanvas(a0,e0,n0);this.suspendedCtx=this.ctx,this.ctx=i0.context;const s0=this.ctx;s0.setTransform(...getCurrentTransform(this.suspendedCtx)),copyCtxState(this.suspendedCtx,s0),mirrorContextOperations(s0,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e0){if(!this.current.activeSMask)return;e0?(e0[0]=Math.floor(e0[0]),e0[1]=Math.floor(e0[1]),e0[2]=Math.ceil(e0[2]),e0[3]=Math.ceil(e0[3])):e0=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const n0=this.current.activeSMask,a0=this.suspendedCtx;this.composeSMask(a0,n0,this.ctx,e0),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e0,n0,a0,i0){const s0=i0[0],o0=i0[1],l0=i0[2]-s0,c0=i0[3]-o0;l0===0||c0===0||(this.genericComposeSMask(n0.context,a0,l0,c0,n0.subtype,n0.backdrop,n0.transferMap,s0,o0,n0.offsetX,n0.offsetY),e0.save(),e0.globalAlpha=1,e0.globalCompositeOperation="source-over",e0.setTransform(1,0,0,1,0,0),e0.drawImage(a0.canvas,0,0),e0.restore())}genericComposeSMask(e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0){let f0=e0.canvas,p0=c0-d0,A0=u0-h0;if(o0){const x0=Util.makeHexColor(...o0);if(p0<0||A0<0||p0+a0>f0.width||A0+i0>f0.height){const g0=this.cachedCanvases.getCanvas("maskExtension",a0,i0),y0=g0.context;y0.drawImage(f0,-p0,-A0),y0.globalCompositeOperation="destination-atop",y0.fillStyle=x0,y0.fillRect(0,0,a0,i0),y0.globalCompositeOperation="source-over",f0=g0.canvas,p0=A0=0}else{e0.save(),e0.globalAlpha=1,e0.setTransform(1,0,0,1,0,0);const g0=new Path2D;g0.rect(p0,A0,a0,i0),e0.clip(g0),e0.globalCompositeOperation="destination-atop",e0.fillStyle=x0,e0.fillRect(p0,A0,a0,i0),e0.restore()}}n0.save(),n0.globalAlpha=1,n0.setTransform(1,0,0,1,0,0),s0==="Alpha"&&l0?n0.filter=this.filterFactory.addAlphaFilter(l0):s0==="Luminosity"&&(n0.filter=this.filterFactory.addLuminosityFilter(l0));const m0=new Path2D;m0.rect(c0,u0,a0,i0),n0.clip(m0),n0.globalCompositeOperation="destination-in",n0.drawImage(f0,p0,A0,a0,i0,c0,u0,a0,i0),n0.restore()}save(){this.inSMaskMode?(copyCtxState(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e0=this.current;this.stateStack.push(e0),this.current=e0.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),copyCtxState(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e0,n0,a0,i0,s0,o0){this.ctx.transform(e0,n0,a0,i0,s0,o0),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e0,n0,a0){const i0=this.ctx,s0=this.current;let o0=s0.x,l0=s0.y,c0,u0;const d0=getCurrentTransform(i0),h0=d0[0]===0&&d0[3]===0||d0[1]===0&&d0[2]===0,f0=h0?a0.slice(0):null;for(let p0=0,A0=0,m0=e0.length;p0<m0;p0++)switch(e0[p0]|0){case OPS.rectangle:o0=n0[A0++],l0=n0[A0++];const x0=n0[A0++],g0=n0[A0++],y0=o0+x0,b0=l0+g0;i0.moveTo(o0,l0),x0===0||g0===0?i0.lineTo(y0,b0):(i0.lineTo(y0,l0),i0.lineTo(y0,b0),i0.lineTo(o0,b0)),h0||s0.updateRectMinMax(d0,[o0,l0,y0,b0]),i0.closePath();break;case OPS.moveTo:o0=n0[A0++],l0=n0[A0++],i0.moveTo(o0,l0),h0||s0.updatePathMinMax(d0,o0,l0);break;case OPS.lineTo:o0=n0[A0++],l0=n0[A0++],i0.lineTo(o0,l0),h0||s0.updatePathMinMax(d0,o0,l0);break;case OPS.curveTo:c0=o0,u0=l0,o0=n0[A0+4],l0=n0[A0+5],i0.bezierCurveTo(n0[A0],n0[A0+1],n0[A0+2],n0[A0+3],o0,l0),s0.updateCurvePathMinMax(d0,c0,u0,n0[A0],n0[A0+1],n0[A0+2],n0[A0+3],o0,l0,f0),A0+=6;break;case OPS.curveTo2:c0=o0,u0=l0,i0.bezierCurveTo(o0,l0,n0[A0],n0[A0+1],n0[A0+2],n0[A0+3]),s0.updateCurvePathMinMax(d0,c0,u0,o0,l0,n0[A0],n0[A0+1],n0[A0+2],n0[A0+3],f0),o0=n0[A0+2],l0=n0[A0+3],A0+=4;break;case OPS.curveTo3:c0=o0,u0=l0,o0=n0[A0+2],l0=n0[A0+3],i0.bezierCurveTo(n0[A0],n0[A0+1],o0,l0,o0,l0),s0.updateCurvePathMinMax(d0,c0,u0,n0[A0],n0[A0+1],o0,l0,o0,l0,f0),A0+=4;break;case OPS.closePath:i0.closePath();break}h0&&s0.updateScalingPathMinMax(d0,f0),s0.setCurrentPoint(o0,l0)}closePath(){this.ctx.closePath()}stroke(e0=!0){const n0=this.ctx,a0=this.current.strokeColor;n0.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof a0=="object"&&(a0!=null&&a0.getPattern)?(n0.save(),n0.strokeStyle=a0.getPattern(n0,this,getCurrentTransformInverse(n0),PathType.STROKE),this.rescaleAndStroke(!1),n0.restore(
731)):this.rescaleAndStroke(!0)),e0&&this.consumePath(this.current.getClippedPathBoundingBox()),n0.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e0=!0){const n0=this.ctx,a0=this.current.fillColor,i0=this.current.patternFill;let s0=!1;i0&&(n0.save(),n0.fillStyle=a0.getPattern(n0,this,getCurrentTransformInverse(n0),PathType.FILL),s0=!0);const o0=this.current.getClippedPathBoundingBox();this.contentVisible&&o0!==null&&(this.pendingEOFill?(n0.fill("evenodd"),this.pendingEOFill=!1):n0.fill()),s0&&n0.restore(),e0&&this.consumePath(o0)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=NORMAL_CLIP}eoClip(){this.pendingClip=EO_CLIP}beginText(){this.current.textMatrix=IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e0=this.pendingTextPaths,n0=this.ctx;if(e0===void 0){n0.beginPath();return}n0.save(),n0.beginPath();for(const a0 of e0)n0.setTransform(...a0.transform),n0.translate(a0.x,a0.y),a0.addToPath(n0,a0.fontSize);n0.restore(),n0.clip(),n0.beginPath(),delete this.pendingTextPaths}setCharSpacing(e0){this.current.charSpacing=e0}setWordSpacing(e0){this.current.wordSpacing=e0}setHScale(e0){this.current.textHScale=e0/100}setLeading(e0){this.current.leading=-e0}setFont(e0,n0){var d0;const a0=this.commonObjs.get(e0),i0=this.current;if(!a0)throw new Error(`Can't find font for ${e0}`);if(i0.fontMatrix=a0.fontMatrix||FONT_IDENTITY_MATRIX,(i0.fontMatrix[0]===0||i0.fontMatrix[3]===0)&&warn("Invalid font matrix for font "+e0),n0<0?(n0=-n0,i0.fontDirection=-1):i0.fontDirection=1,this.current.font=a0,this.current.fontSize=n0,a0.isType3Font)return;const s0=a0.loadedName||"sans-serif",o0=((d0=a0.systemFontInfo)==null?void 0:d0.css)||`"${s0}", ${a0.fallbackName}`;let l0="normal";a0.black?l0="900":a0.bold&&(l0="bold");const c0=a0.italic?"italic":"normal";let u0=n0;n0<MIN_FONT_SIZE?u0=MIN_FONT_SIZE:n0>MAX_FONT_SIZE&&(u0=MAX_FONT_SIZE),this.current.fontSizeScale=n0/u0,this.ctx.font=`${c0} ${l0} ${u0}px ${o0}`}setTextRenderingMode(e0){this.current.textRenderingMode=e0}setTextRise(e0){this.current.textRise=e0}moveText(e0,n0){this.current.x=this.current.lineX+=e0,this.current.y=this.current.lineY+=n0}setLeadingMoveText(e0,n0){this.setLeading(-n0),this.moveText(e0,n0)}setTextMatrix(e0,n0,a0,i0,s0,o0){this.current.textMatrix=[e0,n0,a0,i0,s0,o0],this.current.textMatrixScale=Math.hypot(e0,n0),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e0,n0,a0,i0){const s0=this.ctx,o0=this.current,l0=o0.font,c0=o0.textRenderingMode,u0=o0.fontSize/o0.fontSizeScale,d0=c0&TextRenderingMode.FILL_STROKE_MASK,h0=!!(c0&TextRenderingMode.ADD_TO_PATH_FLAG),f0=o0.patternFill&&!l0.missingFile;let p0;(l0.disableFontFace||h0||f0)&&(p0=l0.getPathGenerator(this.commonObjs,e0)),l0.disableFontFace||f0?(s0.save(),s0.translate(n0,a0),s0.beginPath(),p0(s0,u0),i0&&s0.setTransform(...i0),(d0===TextRenderingMode.FILL||d0===TextRenderingMode.FILL_STROKE)&&s0.fill(),(d0===TextRenderingMode.STROKE||d0===TextRenderingMode.FILL_STROKE)&&s0.stroke(),s0.restore(
731)):((d0===TextRenderingMode.FILL||d0===TextRenderingMode.FILL_STROKE)&&s0.fillText(e0,n0,a0),(d0===TextRenderingMode.STROKE||d0===TextRenderingMode.FILL_STROKE)&&s0.strokeText(e0,n0,a0)),h0&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:getCurrentTransform(s0),x:n0,y:a0,fontSize:u0,addToPath:p0})}get isFontSubpixelAAEnabled(){const{context:e0}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e0.scale(1.5,1),e0.fillText("I",0,10);const n0=e0.getImageData(0,0,10,10).data;let a0=!1;for(let i0=3;i0<n0.length;i0+=4)if(n0[i0]>0&&n0[i0]<255){a0=!0;break}return shadow(this,"isFontSubpixelAAEnabled",a0)}showText(e0){const n0=this.current,a0=n0.font;if(a0.isType3Font)return this.showType3Text(e0);const i0=n0.fontSize;if(i0===0)return;const s0=this.ctx,o0=n0.fontSizeScale,l0=n0.charSpacing,c0=n0.wordSpacing,u0=n0.fontDirection,d0=n0.textHScale*u0,h0=e0.length,f0=a0.vertical,p0=f0?1:-1,A0=a0.defaultVMetrics,m0=i0*n0.fontMatrix[0],x0=n0.textRenderingMode===TextRenderingMode.FILL&&!a0.disableFontFace&&!n0.patternFill;s0.save(),s0.transform(...n0.textMatrix),s0.translate(n0.x,n0.y+n0.textRise),u0>0?s0.scale(d0,-1):s0.scale(d0,1);let g0;if(n0.patternFill){s0.save();const v0=n0.fillColor.getPattern(s0,this,getCurrentTransformInverse(s0),PathType.FILL);
731g0=getCurrentTransform(s0),s0.restore(),s0.fillStyle=v0}let y0=n0.lineWidth;const b0=n0.textMatrixScale;if(b0===0||y0===0){const v0=n0.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(v0===TextRenderingMode.STROKE||v0===TextRenderingMode.FILL_STROKE)&&(y0=this.getSinglePixelWidth())}else y0/=b0;if(o0!==1&&(s0.scale(o0,o0),y0/=o0),s0.lineWidth=y0,a0.isInvalidPDFjsFont){const v0=[];let S0=0;for(const k0 of e0)v0.push(k0.unicode),S0+=k0.width;s0.fillText(v0.join(""),0,0),n0.x+=S0*m0*d0,s0.restore(),this.compose();return}let E0=0,w0;for(w0=0;w0<h0;++w0){const v0=e0[w0];if(typeof v0=="number"){E0+=p0*v0*i0/1e3;continue}let S0=!1;const k0=(v0.isSpace?c0:0)+l0,R0=v0.fontChar,j0=v0.accent;let C0,$0,T0=v0.width;if(f0){const M0=v0.vmetric||A0,N0=-(v0.vmetric?M0[1]:T0*.5)*m0,D0=M0[2]*m0;T0=M0?-M0[0]:T0,C0=N0/o0,$0=(E0+D0)/o0}else C0=E0/o0,$0=0;if(a0.remeasure&&T0>0){const M0=s0.measureText(R0).width*1e3/i0*o0;if(T0<M0&&this.isFontSubpixelAAEnabled){const N0=T0/M0;S0=!0,s0.save(),s0.scale(N0,1),C0/=N0}else T0!==M0&&(C0+=(T0-M0)/2e3*i0/o0)}if(this.contentVisible&&(v0.isInFont||a0.missingFile)){if(x0&&!j0)s0.fillText(R0,C0,$0);else if(this.paintChar(R0,C0,$0,g0),j0){const M0=C0+i0*j0.offset.x/o0,N0=$0-i0*j0.offset.y/o0;this.paintChar(j0.fontChar,M0,N0,g0)}}const I0=f0?T0*m0-k0*u0:T0*m0+k0*u0;
731E0+=I0,S0&&s0.restore()}f0?n0.y-=E0:n0.x+=E0*d0,s0.restore(),this.compose()}showType3Text(e0){const n0=this.ctx,a0=this.current,i0=a0.font,s0=a0.fontSize,o0=a0.fontDirection,l0=i0.vertical?1:-1,c0=a0.charSpacing,u0=a0.wordSpacing,d0=a0.textHScale*o0,h0=a0.fontMatrix||FONT_IDENTITY_MATRIX,f0=e0.length,p0=a0.textRenderingMode===TextRenderingMode.INVISIBLE;let A0,m0,x0,g0;if(!(p0||s0===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,n0.save(),n0.transform(...a0.textMatrix),n0.translate(a0.x,a0.y),n0.scale(d0,o0),A0=0;A0<f0;++A0){if(m0=e0[A0],typeof m0=="number"){g0=l0*m0*s0/1e3,this.ctx.translate(g0,0),a0.x+=g0*d0;continue}const y0=(m0.isSpace?u0:0)+c0,b0=i0.charProcOperatorList[m0.operatorListId];if(!b0){warn(`Type3 character "${m0.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=m0,this.save(),n0.scale(s0,s0),n0.transform(...h0),this.executeOperatorList(b0),this.restore()),x0=Util.applyTransform([m0.width,0],h0)[0]*s0+y0,n0.translate(x0,0),a0.x+=x0*d0}n0.restore(),this.processingType3=null}}setCharWidth(e0,n0){}setCharWidthAndBounds(e0,n0,a0,i0,s0,o0){this.ctx.rect(a0,i0,s0-a0,o0-i0),this.ctx.clip(),this.endPath()}getColorN_Pattern(e0){let n0;if(e0[0]==="TilingPattern"){const a0=e0[1],i0=this.baseTransform||getCurrentTransform(this.ctx),s0={createCanvasGraphics:o0=>new h5(o0,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};n0=new TilingPattern(e0,a0,this.ctx,s0,i0)}else n0=this._getPattern(e0[1],e0[2]);return n0}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e0,n0,a0){this.ctx.strokeStyle=this.current.strokeColor=Util.makeHexColor(e0,n0,a0)}
731setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(e0,n0,a0){this.ctx.fillStyle=this.current.fillColor=Util.makeHexColor(e0,n0,a0),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e0,n0=null){let a0;return this.cachedPatterns.has(e0)?a0=this.cachedPatterns.get(e0):(a0=getShadingPattern(this.getObject(e0)),this.cachedPatterns.set(e0,a0)),n0&&(a0.matrix=n0),a0}shadingFill(e0){if(!this.contentVisible)return;const n0=this.ctx;this.save();const a0=this._getPattern(e0);n0.fillStyle=a0.getPattern(n0,this,getCurrentTransformInverse(n0),PathType.SHADING);const i0=getCurrentTransformInverse(n0);if(i0){const{width:s0,height:o0}=n0.canvas,[l0,c0,u0,d0]=Util.getAxialAlignedBoundingBox([0,0,s0,o0],i0);this.ctx.fillRect(l0,c0,u0-l0,d0-c0)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable("Should not call beginInlineImage")}beginImageData(){unreachable("Should not call beginImageData")}paintFormXObjectBegin(e0,n0){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e0&&this.transform(...e0),this.baseTransform=getCurrentTransform(this.ctx),n0)){const a0=n0[2]-n0[0],i0=n0[3]-n0[1];this.ctx.rect(n0[0],n0[1],a0,i0),this.current.updateRectMinMax(getCurrentTransform(this.ctx),n0),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e0){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const n0=this.ctx;e0.isolated||info("TODO: Support non-isolated groups."),e0.knockout&&warn("Knockout groups not supported.");const a0=getCurrentTransform(n0);if(e0.matrix&&n0.transform(...e0.matrix),!e0.bbox)throw new Error("Bounding box is required.");let i0=Util.getAxialAlignedBoundingBox(e0.bbox,getCurrentTransform(n0));const s0=[0,0,n0.canvas.width,n0.canvas.height];i0=Util.intersect(i0,s0)||[0,0,0,0];const o0=Math.floor(i0[0]),l0=Math.floor(i0[1]),c0=Math.max(Math.ceil(i0[2])-o0,1),u0=Math.max(Math.ceil(i0[3])-l0,1);this.current.startNewPathAndClipBox([0,0,c0,u0]);let d0="groupAt"+this.groupLevel;e0.smask&&(d0+="_smask_"+this.smaskCounter++%2);
vendor: 8,111 bytes, line 731
731const h0=this.cachedCanvases.getCanvas(d0,c0,u0),f0=h0.context;f0.translate(-o0,-l0),f0.transform(...a0),e0.smask?this.smaskStack.push({canvas:h0.canvas,context:f0,offsetX:o0,offsetY:l0,subtype:e0.smask.subtype,backdrop:e0.smask.backdrop,transferMap:e0.smask.transferMap||null,startTransformInverse:null}):(n0.setTransform(1,0,0,1,0,0),n0.translate(o0,l0),n0.save()),copyCtxState(n0,f0),this.ctx=f0,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n0),this.groupLevel++}endGroup(e0){if(!this.contentVisible)return;this.groupLevel--;const n0=this.ctx,a0=this.groupStack.pop();if(this.ctx=a0,this.ctx.imageSmoothingEnabled=!1,e0.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const i0=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...i0);const s0=Util.getAxialAlignedBoundingBox([0,0,n0.canvas.width,n0.canvas.height],i0);this.ctx.drawImage(n0.canvas,0,0),this.ctx.restore(),this.compose(s0)}}beginAnnotation(e0,n0,a0,i0,s0){if(H0(this,eP,N3).call(this),resetCtxToDefault(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),n0){const o0=n0[2]-n0[0],l0=n0[3]-n0[1];if(s0&&this.annotationCanvasMap){a0=a0.slice(),a0[4]-=n0[0],a0[5]-=n0[1],n0=n0.slice(),n0[0]=n0[1]=0,n0[2]=o0,n0[3]=l0;const[c0,u0]=Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx)),{viewportScale:d0}=this,h0=Math.ceil(o0*this.outputScaleX*d0),f0=Math.ceil(l0*this.outputScaleY*d0);this.annotationCanvas=this.canvasFactory.create(h0,f0);const{canvas:p0,context:A0}=this.annotationCanvas;this.annotationCanvasMap.set(e0,p0),this.annotationCanvas.savedCtx=this.ctx,this.ctx=A0,this.ctx.save(),this.ctx.setTransform(c0,0,0,-u0,0,l0*u0),resetCtxToDefault(this.ctx)}else resetCtxToDefault(this.ctx),this.endPath(),this.ctx.rect(n0[0],n0[1],o0,l0),this.ctx.clip(),this.ctx.beginPath()}this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...a0),this.transform(...i0)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),H0(this,eP,j3).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e0){if(!this.contentVisible)return;const n0=e0.count;e0=this.getObject(e0.data,e0),e0.count=n0;const a0=this.ctx,i0=this.processingType3;if(i0&&(i0.compiled===void 0&&(i0.compiled=compileType3Glyph(e0)),i0.compiled)){i0.compiled(a0);return}const s0=this._createMaskCanvas(e0),o0=s0.canvas;a0.save(),a0.setTransform(1,0,0,1,0,0),a0.drawImage(o0,s0.offsetX,s0.offsetY),a0.restore(),this.compose()}paintImageMaskXObjectRepeat(e0,n0,a0=0,i0=0,s0,o0){if(!this.contentVisible)return;e0=this.getObject(e0.data,e0);const l0=this.ctx;l0.save();const c0=getCurrentTransform(l0);l0.transform(n0,a0,i0,s0,0,0);const u0=this._createMaskCanvas(e0);l0.setTransform(1,0,0,1,u0.offsetX-c0[4],u0.offsetY-c0[5]);for(let d0=0,h0=o0.length;d0<h0;d0+=2){const f0=Util.transform(c0,[n0,a0,i0,s0,o0[d0],o0[d0+1]]),[p0,A0]=Util.applyTransform([0,0],f0);l0.drawImage(u0.canvas,p0,A0)}l0.restore(),this.compose()}paintImageMaskXObjectGroup(e0){if(!this.contentVisible)return;const n0=this.ctx,a0=this.current.fillColor,i0=this.current.patternFill;for(const s0 of e0){const{data:o0,width:l0,height:c0,transform:u0}=s0,d0=this.cachedCanvases.getCanvas("maskCanvas",l0,c0),h0=d0.context;h0.save();const f0=this.getObject(o0,s0);putBinaryImageMask(h0,f0),h0.globalCompositeOperation="source-in",h0.fillStyle=i0?a0.getPattern(h0,this,getCurrentTransformInverse(n0),PathType.FILL):a0,h0.fillRect(0,0,l0,c0),h0.restore(),n0.save(),n0.transform(...u0),n0.scale(1,-1),drawImageAtIntegerCoords(n0,d0.canvas,0,0,l0,c0,0,-1,1,1),n0.restore()}this.compose()}paintImageXObject(e0){if(!this.contentVisible)return;const n0=this.getObject(e0);if(!n0){warn("Dependent image isn't ready yet");return}this.paintInlineImageXObject(n0)}paintImageXObjectRepeat(e0,n0,a0,i0){if(!this.contentVisible)return;const s0=this.getObject(e0);if(!s0){warn("Dependent image isn't ready yet");return}const o0=s0.width,l0=s0.height,c0=[];for(let u0=0,d0=i0.length;u0<d0;u0+=2)c0.push({transform:[n0,0,0,a0,i0[u0],i0[u0+1]],x:0,y:0,w:o0,h:l0});this.paintInlineImageXObjectGroup(s0,c0)}applyTransferMapsToCanvas(e0){return this.current.transferMaps!=="none"&&(e0.filter=this.current.transferMaps,e0.drawImage(e0.canvas,0,0),e0.filter="none"),e0.canvas}applyTransferMapsToBitmap(e0){if(this.current.transferMaps==="none")return e0.bitmap;const{bitmap:n0,width:a0,height:i0}=e0,s0=this.cachedCanvases.getCanvas("inlineImage",a0,i0),o0=s0.context;return o0.filter=this.current.transferMaps,o0.drawImage(n0,0,0),o0.filter="none",s0.canvas}paintInlineImageXObject(e0){if(!this.contentVisible)return;const n0=e0.width,a0=e0.height,i0=this.ctx;if(this.save(),!isNodeJS){const{filter:l0}=i0;l0!=="none"&&l0!==""&&(i0.filter="none")}i0.scale(1/n0,-1/a0);let s0;if(e0.bitmap)s0=this.applyTransferMapsToBitmap(e0);else if(typeof HTMLElement=="function"&&e0 instanceof HTMLElement||!e0.data)s0=e0;else{const c0=this.cachedCanvases.getCanvas("inlineImage",n0,a0).context;putBinaryImageData(c0,e0),s0=this.applyTransferMapsToCanvas(c0)}const o0=this._scaleImage(s0,getCurrentTransformInverse(i0));i0.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(i0),e0.interpolate),drawImageAtIntegerCoords(i0,o0.img,0,0,o0.paintWidth,o0.paintHeight,0,-a0,n0,a0),this.compose(),this.restore()}paintInlineImageXObjectGroup(e0,n0){if(!this.contentVisible)return;const a0=this.ctx;let i0;if(e0.bitmap)i0=e0.bitmap;else{const s0=e0.width,o0=e0.height,c0=this.cachedCanvases.getCanvas("inlineImage",s0,o0).context;putBinaryImageData(c0,e0),i0=this.applyTransferMapsToCanvas(c0)}for(const s0 of n0)a0.save(),a0.transform(...s0.transform),a0.scale(1,-1),drawImageAtIntegerCoords(a0,i0,s0.x,s0.y,s0.w,s0.h,0,-1,1,1),a0.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e0){}markPointProps(e0,n0){}beginMarkedContent(e0){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e0,n0){e0==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(n0)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e0){const n0=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e0);const a0=this.ctx;this.pendingClip&&(n0||(this.pendingClip===EO_CLIP?a0.clip("evenodd"):a0.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),a0.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e0=getCurrentTransform(this.ctx);if(e0[1]===0&&e0[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e0[0]),Math.abs(e0[3]));else{const n0=Math.abs(e0[0]*e0[3]-e0[2]*e0[1]),a0=Math.hypot(e0[0],e0[2]),i0=Math.hypot(e0[1],e0[3]);this._cachedGetSinglePixelWidth=Math.max(a0,i0)/n0}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e0}=this.current,{a:n0,b:a0,c:i0,d:s0}=this.ctx.getTransform();let o0,l0;if(a0===0&&i0===0){const c0=Math.abs(n0),u0=Math.abs(s0);if(c0===u0)if(e0===0)o0=l0=1/c0;else{const d0=c0*e0;o0=l0=d0<1?1/d0:1}else if(e0===0)o0=1/c0,l0=1/u0;else{const d0=c0*e0,h0=u0*e0;o0=d0<1?1/d0:1,l0=h0<1?1/h0:1}}else{const c0=Math.abs(n0*s0-a0*i0),u0=Math.hypot(n0,a0),d0=Math.hypot(i0,s0);if(e0===0)o0=d0/c0,l0=u0/c0;else{const h0=e0*c0;o0=d0>h0?d0/h0:1,l0=u0>h0?u0/h0:1}}this._cachedScaleForStroking[0]=o0,this._cachedScaleForStroking[1]=l0}return this._cachedScaleForStroking}rescaleAndStroke(e0){const{ctx:n0}=this,{lineWidth:a0}=this.current,[i0,s0]=this.getScaleForStroking();if(n0.lineWidth=a0||1,i0===1&&s0===1){n0.stroke();return}const o0=n0.getLineDash();if(e0&&n0.save(),n0.scale(i0,s0),o0.length>0){const l0=Math.max(i0,s0);n0.setLineDash(o0.map(c0=>c0/l0)),n0.lineDashOffset/=l0}
731n0.stroke(),e0&&n0.restore()}isContentVisible(){for(let e0=this.markedContentStack.length-1;e0>=0;e0--)if(!this.markedContentStack[e0].visible)return!1;return!0}};eP=new WeakSet,N3=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},j3=function(){if(this.pageColors){const e0=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e0!=="none"){const n0=this.ctx.filter;this.ctx.filter=e0,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=n0}}};let CanvasGraphics=h5;for(const r0 in OPS)CanvasGraphics.prototype[r0]!==void 0&&(CanvasGraphics.prototype[OPS[r0]]=CanvasGraphics.prototype[r0]);var w4,S4;class GlobalWorkerOptions{static get workerPort(){return _0(this,w4)}static set workerPort(e0){if(!(typeof Worker<"u"&&e0 instanceof Worker)&&e0!==null)throw new Error("Invalid `workerPort` type.");V0(this,w4,e0)}static get workerSrc(){return _0(this,S4)}static set workerSrc(e0){if(typeof e0!="string")throw new Error("Invalid `workerSrc` type.");V0(this,S4,e0)}}w4=new WeakMap,S4=new WeakMap,K0(GlobalWorkerOptions,w4,null),K0(GlobalWorkerOptions,S4,"");const CallbackKind={UNKNOWN:0,DATA:1,ERROR:2},StreamKind={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function wrapReason(r0){switch(r0 instanceof Error||typeof r0=="object"&&r0!==null||unreachable('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),r0.name){case"AbortException":return new AbortException(r0.message);case"MissingPDFException":return new MissingPDFException(r0.message);case"PasswordException":return new PasswordException(r0.message,r0.code);case"UnexpectedResponseException":return new UnexpectedResponseException(r0.message,r0.status);case"UnknownErrorException":return new UnknownErrorException(r0.message,r0.details);default:return new UnknownErrorException(r0.message,r0.toString())}}var tF,tR,tz,rz,nz,_2;class MessageHandler{constructor(e0,n0,a0){K0(this,tR);K0(this,tF,new AbortController);this.sourceName=e0,this.targetName=n0,this.comObj=a0,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),a0.addEventListener("message",H0(this,tR,tz).bind(this),{signal:_0(this,tF).signal})}on(e0,n0){const a0=this.actionHandler;if(a0[e0])throw new Error(`There is already an actionName called "${e0}"`);a0[e0]=n0}send(e0,n0,a0){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e0,data:n0},a0)}sendWithPromise(e0,n0,a0){const i0=this.callbackId++,s0=Promise.withResolvers();this.callbackCapabilities[i0]=s0;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e0,callbackId:i0,data:n0},a0)}catch(o0){s0.reject(o0)}return s0.promise}sendWithStream(e0,n0,a0,i0){const s0=this.streamId++,o0=this.sourceName,l0=this.targetName,c0=this.comObj;return new ReadableStream({start:u0=>{const d0=Promise.withResolvers();return this.streamControllers[s0]={controller:u0,startCall:d0,pullCall:null,cancelCall:null,isClosed:!1},c0.postMessage({sourceName:o0,targetName:l0,action:e0,streamId:s0,data:n0,desiredSize:u0.desiredSize},i0),d0.promise},pull:u0=>{const d0=Promise.withResolvers();return this.streamControllers[s0].pullCall=d0,c0.postMessage({sourceName:o0,targetName:l0,stream:StreamKind.PULL,streamId:s0,desiredSize:u0.desiredSize}),d0.promise},cancel:u0=>{assert(u0 instanceof Error,"cancel must have a valid reason");const d0=Promise.withResolvers();return this.streamControllers[s0].cancelCall=d0,this.streamControllers[s0].isClosed=!0,c0.postMessage({sourceName:o0,targetName:l0,stream:StreamKind.CANCEL,streamId:s0,reason:wrapReason(u0)}),d0.promise}},a0)}destroy(){var e0;(e0=_0(this,tF))==null||e0.abort(),V0(this,tF,null)}}tF=new WeakMap,tR=new WeakSet,tz=function({data:e0}
731){if(e0.targetName!==this.sourceName)return;if(e0.stream){H0(this,tR,nz).call(this,e0);return}if(e0.callback){const a0=e0.callbackId,i0=this.callbackCapabilities[a0];if(!i0)throw new Error(`Cannot resolve callback ${a0}`);if(delete this.callbackCapabilities[a0],e0.callback===CallbackKind.DATA)i0.resolve(e0.data);else if(e0.callback===CallbackKind.ERROR)i0.reject(wrapReason(e0.reason));else throw new Error("Unexpected callback case");return}const n0=this.actionHandler[e0.action];if(!n0)throw new Error(`Unknown action from worker: ${e0.action}`);if(e0.callbackId){const a0=this.sourceName,i0=e0.sourceName,s0=this.comObj;new Promise(function(o0){o0(n0(e0.data))}).then(function(o0){s0.postMessage({sourceName:a0,targetName:i0,callback:CallbackKind.DATA,callbackId:e0.callbackId,data:o0})},function(o0){s0.postMessage({sourceName:a0,targetName:i0,callback:CallbackKind.ERROR,callbackId:e0.callbackId,reason:wrapReason(o0)})});return}if(e0.streamId){H0(this,tR,rz).call(this,e0);return}n0(e0.data)},rz=function(e0){const n0=e0.streamId,a0=this.sourceName,i0=e0.sourceName,s0=this.comObj,o0=this,l0=this.actionHandler[e0.action],c0={enqueue(u0,d0=1,h0){if(this.isCancelled)return;const f0=this.desiredSize;this.desiredSize-=d0,f0>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.ENQUEUE,streamId:n0,chunk:u0},h0)},close(){this.isCancelled||(this.isCancelled=!0,s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.CLOSE,streamId:n0}),delete o0.streamSinks[n0])},error(u0){assert(u0 instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.ERROR,streamId:n0,reason:wrapReason(u0)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e0.desiredSize,ready:null};c0.sinkCapability.resolve(),c0.ready=c0.sinkCapability.promise,this.streamSinks[n0]=c0,new Promise(function(u0){u0(l0(e0.data,c0))}).then(function(){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.START_COMPLETE,streamId:n0,success:!0})},function(u0){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.START_COMPLETE,streamId:n0,reason:wrapReason(u0)})})},nz=function(e0){const n0=e0.streamId,a0=this.sourceName,i0=e0.sourceName,s0=this.comObj,o0=this.streamControllers[n0],l0=this.streamSinks[n0];switch(e0.stream){case StreamKind.START_COMPLETE:e0.success?o0.startCall.resolve():o0.startCall.reject(wrapReason(e0.reason));break;case StreamKind.PULL_COMPLETE:e0.success?o0.pullCall.resolve():o0.pullCall.reject(wrapReason(e0.reason));break;case StreamKind.PULL:if(!l0){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.PULL_COMPLETE,streamId:n0,success:!0});break}l0.desiredSize<=0&&e0.desiredSize>0&&l0.sinkCapability.resolve(),l0.desiredSize=e0.desiredSize,new Promise(function(c0){var u0;c0((u0=l0.onPull)==null?void 0:u0.call(l0))}).then(function(){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.PULL_COMPLETE,streamId:n0,success:!0})},function(c0){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.PULL_COMPLETE,streamId:n0,reason:wrapReason(c0)})});break;case StreamKind.ENQUEUE:if(assert(o0,"enqueue should have stream controller"),o0.isClosed)break;o0.controller.enqueue(e0.chunk);break;case StreamKind.CLOSE:if(assert(o0,"close should have stream controller"),o0.isClosed)break;o0.isClosed=!0,o0.controller.close(),H0(this,tR,_2).call(this,o0,n0);break;case StreamKind.ERROR:assert(o0,"error should have stream controller"),o0.controller.error(wrapReason(e0.reason)),H0(this,tR,_2).call(this,o0,n0);break;case StreamKind.CANCEL_COMPLETE:e0.success?o0.cancelCall.resolve():o0.cancelCall.reject(wrapReason(e0.reason)),H0(this,tR,_2).call(this,o0,n0);break;case StreamKind.CANCEL:if(!l0)break;new Promise(function(c0){var u0;c0((u0=l0.onCancel)==null?void 0:u0.call(l0,wrapReason(e0.reason)))}).then(function(){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.CANCEL_COMPLETE,streamId:n0,success:!0})},function(c0){s0.postMessage({sourceName:a0,targetName:i0,stream:StreamKind.CANCEL_COMPLETE,streamId:n0,reason:wrapReason(c0)})}),l0.sinkCapability.reject(wrapReason(e0.reason)),l0.isCancelled=!0,delete this.streamSinks[n0];break;default:throw new Error("Unexpected stream case")}},_2=async function(e0,n0){var a0,i0,s0;await Promise.allSettled([(a0=e0.startCall)==null?void 0:a0.promise,(i0=e0.pullCall)==null?void 0:i0.promise,(s0=e0.cancelCall)==null?void 0:s0.promise]),delete this.streamControllers[n0
731]};var $P,_4;class Metadata{constructor({parsedData:e0,rawData:n0}){K0(this,$P);K0(this,_4);V0(this,$P,e0),V0(this,_4,n0)}getRaw(){return _0(this,_4)}get(e0){return _0(this,$P).get(e0)??null}getAll(){return objectFromMap(_0(this,$P))}has(e0){return _0(this,$P).has(e0)}}$P=new WeakMap,_4=new WeakMap;const INTERNAL=Symbol("INTERNAL");var T4,k4,C4,rF;class OptionalContentGroup{constructor(e0,{name:n0,intent:a0,usage:i0,rbGroups:s0}){K0(this,T4,!1);K0(this,k4,!1);K0(this,C4,!1);K0(this,rF,!0);V0(this,T4,!!(e0&RenderingIntentFlag.DISPLAY)),V0(this,k4,!!(e0&RenderingIntentFlag.PRINT)),this.name=n0,this.intent=a0,this.usage=i0,this.rbGroups=s0}get visible(){if(_0(this,C4))return _0(this,rF);if(!_0(this,rF))return!1;const{print:e0,view:n0}=this.usage;return _0(this,T4)?(n0==null?void 0:n0.viewState)!=="OFF":_0(this,k4)?(e0==null?void 0:e0.printState)!=="OFF":!0}_setVisible(e0,n0,a0=!1){e0!==INTERNAL&&unreachable("Internal method `_setVisible` called."),V0(this,C4,a0),V0(this,rF,n0)}}T4=new WeakMap,k4=new WeakMap,C4=new WeakMap,rF=new WeakMap;var D$,P1,nF,aF,R4,$3;class OptionalContentConfig{constructor(e0,n0=RenderingIntentFlag.DISPLAY){K0(this,R4);K0(this,D$,null);K0(this,P1,new Map);K0(this,nF,null);K0(this,aF,null);if(this.renderingIntent=n0,this.name=null,this.creator=null,e0!==null){this.name=e0.name,this.creator=e0.creator,V0(this,aF,e0.order);for(const a0 of e0.groups)_0(this,P1).set(a0.id,new OptionalContentGroup(n0,a0));if(e0.baseState==="OFF")for(const a0 of _0(this,P1).values())a0._setVisible(INTERNAL,!1);for(const a0 of e0.on)_0(this,P1).get(a0)._setVisible(INTERNAL,!0);for(const a0 of e0.off)_0(this,P1).get(a0)._setVisible(INTERNAL,!1);V0(this,nF,this.getHash())}}isVisible(e0){if(_0(this,P1).size===0)return!0;if(!e0)return info("Optional content group not defined."),!0;if(e0.type==="OCG")return _0(this,P1).has(e0.id)?_0(this,P1).get(e0.id).visible:(warn(`Optional content group not found: ${e0.id}`),!0);if(e0.type==="OCMD"){if(e0.expression)return H0(this,R4,$3).call(this,e0.expression);if(!e0.policy||e0.policy==="AnyOn"){for(const n0 of e0.ids){if(!_0(this,P1).has(n0))return warn(`Optional content group not found: ${n0}`),!0;if(_0(this,P1).get(n0).visible)return!0}return!1}else if(e0.policy==="AllOn"){for(const n0 of e0.ids){if(!_0(this,P1).has(n0))return warn(`Optional content group not found: ${n0}`),!0;if(!_0(this,P1).get(n0).visible)return!1}return!0}else if(e0.policy==="AnyOff"){for(const n0 of e0.ids){if(!_0(this,P1).has(n0))return warn(`Optional content group not found: ${n0}`),!0;if(!_0(this,P1).get(n0).visible)return!0}return!1}else if(e0.policy==="AllOff"){for(const n0 of e0.ids){if(!_0(this,P1).has(n0))return warn(`Optional content group not found: ${n0}`),!0;if(_0(this,P1).get(n0).visible)return!1}return!0}return warn(`Unknown optional content policy ${e0.policy}.`),!0}return warn(`Unknown group type ${e0.type}.`),!0}setVisibility(e0,n0=!0,a0=!0){var s0;const i0=_0(this,P1).get(e0);if(!i0){warn(`Optional content group not found: ${e0}`);return}if(a0&&n0&&i0.rbGroups.length)for(const o0 of i0.rbGroups)for(const l0 of o0)l0!==e0&&((s0=_0(this,P1).get(l0))==null||s0._setVisible(INTERNAL,!1,!0));i0._setVisible(INTERNAL,!!n0,!0),V0(this,D$,null)}setOCGState({state:e0,preserveRB:n0}){let a0;for(const i0 of e0){switch(i0){case"ON":case"OFF":case"Toggle":a0=i0;continue}const s0=_0(this,P1).get(i0);if(s0)switch(a0){case"ON":this.setVisibility(i0,!0,n0);break;case"OFF":this.setVisibility(i0,!1,n0);break;case"Toggle":this.setVisibility(i0,!s0.visible,n0);break}}V0(this,D$,null)}get hasInitialVisibility(){return _0(this,nF)===null||this.getHash()===_0(this,nF)}getOrder(){return _0(this,P1).size?_0(this,aF)?_0(this,aF).slice():[..._0(this,P1).keys()]:null}getGroups(){return _0(this,P1).size>0?objectFromMap(_0(this,P1)):null}getGroup(e0){return _0(this,P1).get(e0)||null}getHash(){if(_0(this,D$)!==null)return _0(this,D$);const e0=new MurmurHash3_64;for(const[n0,a0]of _0(this,P1))e0.update(`${n0}:${a0.visible}`);return V0(this,D$,e0.hexdigest())}}D$=new WeakMap,P1=new WeakMap,nF=new WeakMap,aF=new WeakMap,R4=new WeakSet,$3=function(e0){const n0=e0.length;if(n0<2)return!0;const a0=e0[0];for(let i0=1;i0<n0;i0++){const s0=e0[i0];let o0;if(Array.isArray(s0))o0=H0(this,R4,$3).call(this,s0);else if(_0(this,P1).has(s0))o0=_0(this,P1).get(s0).visible;else return warn(`Optional content group not found: ${s0}`),!0;switch(a0){case"And":if(!o0)return!1;break;case"Or":if(o0)return!0;break;case"Not":return!o0;default:return!0}}return a0==="And"};class PDFDataTransportStream{constructor(e0,{disableRange:n0=!1,disableStream:a0=!1}){assert(e0,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i0,initialData:s0,progressiveDone:o0,contentDispositionFilename:l0}=e0;if(this._queuedChunks=[],this._progressiveDone=o0,this._contentDispositionFilename=l0,(s0==null?void 0:s0.length)>0){const c0=s0 instanceof Uint8Array&&s0.byteLength===s0.buffer.byteLength?s0.buffer:new Uint8Array(s0).buffer;this._queuedChunks.push(c0)}this._pdfDataRangeTransport=e0,this._isStreamingSupported=!a0,this._isRangeSupported=!n0,this._contentLength=i0,this._fullRequestReader=null,this._rangeReaders=[],e0.addRangeListener((c0,u0)=>{this._onReceiveData({begin:c0,chunk:u0})}),e0.addProgressListener((c0,u0)=>{this._onProgress({loaded:c0,total:u0})}),e0.addProgressiveReadListener(c0=>{this._onReceiveData({chunk:c0})}),e0.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e0.transportReady()}_onReceiveData({begin:e0,chunk:n0}){const a0=n0 instanceof Uint8Array&&n0.byteLength===n0.buffer.byteLength?n0.buffer:new Uint8Array(n0).buffer;if(e0===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(a0):this._queuedChunks.push(a0);else{const i0=this._rangeReaders.some(function(s0){return s0._begin!==e0?!1:(s0._enqueue(a0),!0)});assert(i0,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e0;return((e0=this._fullRequestReader)==null?void 0:e0._loaded)??0}_onProgress(e0){var n0,a0,i0,s0;e0.total===void 0?(a0=(n0=this._rangeReaders[0])==null?void 0:n0.onProgress)==null||a0.call(n0,{loaded:e0.loaded}):(s0=(i0=this._fullRequestReader)==null?void 0:i0.onProgress)==null||s0.call(i0,{loaded:e0.loaded,total:e0.total})}_onProgressiveDone(){var e0;(e0=this._fullRequestReader)==null||e0.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e0){const n0=this._rangeReaders.indexOf(e0);n0>
731=0&&this._rangeReaders.splice(n0,1)}getFullReader(){assert(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e0=this._queuedChunks;return this._queuedChunks=null,new PDFDataTransportStreamReader(this,e0,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e0,n0){if(n0<=this._progressiveDataLength)return null;const a0=new PDFDataTransportStreamRangeReader(this,e0,n0);return this._pdfDataRangeTransport.requestDataRange(e0,n0),this._rangeReaders.push(a0),a0}cancelAllRequests(e0){var n0;(n0=this._fullRequestReader)==null||n0.cancel(e0);for(const a0 of this._rangeReaders.slice(0))a0.cancel(e0);this._pdfDataRangeTransport.abort()}}class PDFDataTransportStreamReader{constructor(e0,n0,a0=!1,i0=null){this._stream=e0,this._done=a0||!1,this._filename=isPdfFile(i0)?i0:null,this._queuedChunks=n0||[],this._loaded=0;for(const s0 of this._queuedChunks)this._loaded+=s0.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e0._fullRequestReader=this,this.onProgress=null}_enqueue(e0){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e0,done:!1}):this._queuedChunks.push(e0),this._loaded+=e0.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e0=Promise.withResolvers();return this._requests.push(e0),e0.promise}cancel(e0){this._done=!0;for(const n0 of this._requests)n0.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(e0,n0,a0){this._stream=e0,this._begin=n0,this._end=a0,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e0){if(!this._done){if(this._requests.length===0)this._queuedChunk=e0;else{this._requests.shift().resolve({value:e0,done:!1});for(const a0 of this._requests)a0.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const n0=this._queuedChunk;return this._queuedChunk=null,{value:n0,done:!1}}if(this._done)return{value:void 0,done:!0};const e0=Promise.withResolvers();return this._requests.push(e0),e0.promise}cancel(e0){this._done=!0;for(const n0 of this._requests)n0.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function getFilenameFromContentDispositionHeader(r0){let e0=!0,n0=a0("filename\\*","i").exec(r0);if(n0){n0=n0[1];let d0=l0(n0);return d0=unescape(d0),d0=c0(d0),d0=u0(d0),s0(d0)}if(n0=o0(r0),n0){const d0=u0(n0);return s0(d0)}if(n0=a0("filename","i").exec(r0),n0){n0=n0[1];let d0=l0(n0);return d0=u0(d0),s0(d0)}function a0(d0,h0){return new RegExp("(?:^|;)\\s*"+d0+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',h0)}function i0(d0,h0){if(d0){if(!/^[\x00-\xFF]+$/.test(h0))return h0;try{const f0=new TextDecoder(d0,{fatal:!0}),p0=stringToBytes(h0);h0=f0.decode(p0),e0=!1}catch{}}return h0}function s0(d0){return e0&&/[\x80-\xff]/.test(d0)&&(d0=i0("utf-8",d0),e0&&(d0=i0("iso-8859-1",d0))),d0}function o0(d0){const h0=[];let f0;const p0=a0("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(f0=p0.exec(d0))!==null;){let[,m0,x0,g0]=f0;if(m0=parseInt(m0,10),m0 in h0){if(m0===0)break;continue}h0[m0]=[x0,g0]}const A0=[];for(let m0=0;m0<h0.length&&m0 in h0;++m0){let[x0,g0]=h0[m0];g0=l0(g0),x0&&(g0=unescape(g0),m0===0&&(g0=c0(g0))),A0.push(g0)}return A0.join("")}function l0(d0){if(d0.startsWith('"')){const h0=d0.slice(1).split('\\"');for(let f0=0;f0<h0.length;++f0){const p0=h0[f0].indexOf('"');p0!==-1&&(h0[f0]=h0[f0].slice(0,p0),h0.length=f0+1),h0[f0]=h0[f0].replaceAll(/\\(.)/g,"$1")}d0=h0.join('"')}return d0}function c0(d0){const h0=d0.indexOf("'");if(h0===-1)return d0;const f0=d0.slice(0,h0),A0=d0.slice(h0+1).replace(/^[^']*'/,"");return i0(f0,A0)}function u0(d0){return!d0.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(d0)?d0:d0.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(h0,f0,p0,A0){if(p0==="q"||p0==="Q")return A0=A0.replaceAll("_"," "),A0=A0.replaceAll(/=([0-9a-fA-F]{2})/g,function(m0,x0){return String.fromCharCode(parseInt(x0,16))}),i0(f0,A0);try{A0=atob(A0)}catch{}return i0(f0,A0)})}return""}function createHeaders(r0,e0){const n0=new Headers;if(!r0||!e0||typeof e0!="object")return n0;for(const a0 in e0){const i0=e0[a0];i0!==void 0&&n0.append(a0,i0)}return n0}function validateRangeRequestCapabilities({responseHeaders:r0,isHttp:e0,rangeChunkSize:n0,disableRange:a0}){const i0={allowRangeRequests:!1,suggestedLength:void 0},s0=parseInt(r0.get("Content-Length"),10);return!Number.isInteger(s0)||(i0.suggestedLength=s0,s0<=2*n0)||a0||!e0||r0.get("Accept-Ranges")!=="bytes"||(r0.get("Content-Encoding")||"identity")!=="identity"||(i0.allowRangeRequests=!0),i0}
731function extractFilenameFromHeader(r0){const e0=r0.get("Content-Disposition");if(e0){let n0=getFilenameFromContentDispositionHeader(e0);if(n0.includes("%"))try{n0=decodeURIComponent(n0)}catch{}if(isPdfFile(n0))return n0}return null}function createResponseStatusError(r0,e0){return r0===404||r0===0&&e0.startsWith("file:")?new MissingPDFException('Missing PDF "'+e0+'".'):new UnexpectedResponseException(`Unexpected server response (${r0}) while retrieving PDF "${e0}".`,r0)}function validateResponseStatus(r0){return r0===200||r0===206}function createFetchOptions(r0,e0,n0){return{method:"GET",headers:r0,signal:n0.signal,mode:"cors",credentials:e0?"include":"same-origin",redirect:"follow"}}function getArrayBuffer(r0){return r0 instanceof Uint8Array?r0.buffer:r0 instanceof ArrayBuffer?r0:(warn(`getArrayBuffer - unexpected data format: ${r0}`),new Uint8Array(r0).buffer)}class PDFFetchStream{constructor(e0){this.source=e0,this.isHttp=/^https?:/i.test(e0.url),this.headers=createHeaders(this.isHttp,e0.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e0;return((e0=this._fullRequestReader)==null?void 0:e0._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new PDFFetchStreamReader(this),this._fullRequestReader}getRangeReader(e0,n0){if(n0<=this._progressiveDataLength)return null;const a0=new PDFFetchStreamRangeReader(this,e0,n0);return this._rangeRequestReaders.push(a0),a0}cancelAllRequests(e0){var n0;(n0=this._fullRequestReader)==null||n0.cancel(e0);for(const a0 of this._rangeRequestReaders.slice(0))a0.cancel(e0)}}class PDFFetchStreamReader{constructor(e0){this._stream=e0,this._reader=null,this._loaded=0,this._filename=null;const n0=e0.source;this._withCredentials=n0.withCredentials||!1,this._contentLength=n0.length,this._headersCapability=Promise.withResolvers(),this._disableRange=n0.disableRange||!1,this._rangeChunkSize=n0.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!n0.disableStream,this._isRangeSupported=!n0.disableRange;const a0=new Headers(e0.headers),i0=n0.url;fetch(i0,createFetchOptions(a0,this._withCredentials,this._abortController)).then(s0=>{if(!validateResponseStatus(s0.status))throw createResponseStatusError(s0.status,i0);this._reader=s0.body.getReader(),this._headersCapability.resolve();const o0=s0.headers,{allowRangeRequests:l0,suggestedLength:c0}=validateRangeRequestCapabilities({responseHeaders:o0,isHttp:e0.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=l0,this._contentLength=c0||this._contentLength,this._filename=extractFilenameFromHeader(o0),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a0;await this._headersCapability.promise;const{value:e0,done:n0}=await this._reader.read();return n0?{value:e0,done:n0}:(this._loaded+=e0.byteLength,(a0=this.onProgress)==null||a0.call(this,{loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(e0),done:!1})}cancel(e0){var n0;(n0=this._reader)==null||n0.cancel(e0),this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(e0,n0,a0){this._stream=e0,this._reader=null,this._loaded=0;const i0=e0.source;this._withCredentials=i0.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i0.disableStream,this._abortController=new AbortController;const s0=new Headers(e0.headers);s0.append("Range",`bytes=${n0}-${a0-1}`);const o0=i0.url;fetch(o0,createFetchOptions(s0,this._withCredentials,this._abortController)).then(l0=>{if(!validateResponseStatus(l0.status))throw createResponseStatusError(l0.status,o0);this._readCapability.resolve(),this._reader=l0.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a0;await this._readCapability.promise;const{value:e0,done:n0}=await this._reader.read();return n0?{value:e0,done:n0}:(this._loaded+=e0.byteLength,(a0=this.onProgress)==null||a0.call(this,{loaded:this._loaded}),{value:getArrayBuffer(e0),done:!1})}cancel(e0){var n0;(n0=this._reader)==null||n0.cancel(e0),this._abortController.abort()}}const OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;
731function network_getArrayBuffer(r0){const e0=r0.response;return typeof e0!="string"?e0:stringToBytes(e0).buffer}class NetworkManager{constructor({url:e0,httpHeaders:n0,withCredentials:a0}){this.url=e0,this.isHttp=/^https?:/i.test(e0),this.headers=createHeaders(this.isHttp,n0),this.withCredentials=a0||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e0,n0,a0){const i0={begin:e0,end:n0};for(const s0 in a0)i0[s0]=a0[s0];return this.request(i0)}requestFull(e0){return this.request(e0)}request(e0){const n0=new XMLHttpRequest,a0=this.currXhrId++,i0=this.pendingRequests[a0]={xhr:n0};n0.open("GET",this.url),n0.withCredentials=this.withCredentials;for(const[s0,o0]of this.headers)n0.setRequestHeader(s0,o0);return this.isHttp&&"begin"in e0&&"end"in e0?(n0.setRequestHeader("Range",`bytes=${e0.begin}-${e0.end-1}`),i0.expectedStatus=PARTIAL_CONTENT_RESPONSE):i0.expectedStatus=OK_RESPONSE,n0.responseType="arraybuffer",e0.onError&&(n0.onerror=function(s0){e0.onError(n0.status)}),n0.onreadystatechange=this.onStateChange.bind(this,a0),n0.onprogress=this.onProgress.bind(this,a0),i0.onHeadersReceived=e0.onHeadersReceived,i0.onDone=e0.onDone,i0.onError=e0.onError,i0.onProgress=e0.onProgress,n0.send(null),a0}onProgress(e0,n0){var i0;const a0=this.pendingRequests[e0];a0&&((i0=a0.onProgress)==null||i0.call(a0,n0))}onStateChange(e0,n0){var c0,u0,d0;const a0=this.pendingRequests[e0];if(!a0)return;const i0=a0.xhr;if(i0.readyState>=2&&a0.onHeadersReceived&&(a0.onHeadersReceived(),delete a0.onHeadersReceived),i0.readyState!==4||!(e0 in this.pendingRequests))return;if(delete this.pendingRequests[e0],i0.status===0&&this.isHttp){(c0=a0.onError)==null||c0.call(a0,i0.status);return}const s0=i0.status||OK_RESPONSE;if(!(s0===OK_RESPONSE&&a0.expectedStatus===PARTIAL_CONTENT_RESPONSE)&&s0!==a0.expectedStatus){(u0=a0.onError)==null||u0.call(a0,i0.status);return}const l0=network_getArrayBuffer(i0);if(s0===PARTIAL_CONTENT_RESPONSE){const h0=i0.getResponseHeader("Content-Range"),f0=/bytes (\d+)-(\d+)\/(\d+)/.exec(h0);a0.onDone({begin:parseInt(f0[1],10),chunk:l0})}else l0?a0.onDone({begin:0,chunk:l0}):(d0=a0.onError)==null||d0.call(a0,i0.status)}getRequestXhr(e0){return this.pendingRequests[e0].xhr}isPendingRequest(e0){return e0 in this.pendingRequests}abortRequest(e0){const n0=this.pendingRequests[e0].xhr;delete this.pendingRequests[e0],n0.abort()}}class PDFNetworkStream{constructor(e0){this._source=e0,this._manager=new NetworkManager(e0),this._rangeChunkSize=e0.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e0){const n0=this._rangeRequestReaders.indexOf(e0);n0>=0&&this._rangeRequestReaders.splice(n0,1)}getFullReader(){return assert(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(e0,n0){const a0=new PDFNetworkStreamRangeRequestReader(this._manager,e0,n0);return a0.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(a0),a0}cancelAllRequests(e0){var n0;(n0=this._fullRequestReader)==null||n0.cancel(e0);for(const a0 of this._rangeRequestReaders.slice(0))a0.cancel(e0)}}class PDFNetworkStreamFullRequestReader{constructor(e0,n0){this._manager=e0;const a0={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=n0.url,this._fullRequestId=e0.requestFull(a0),this._headersCapability=Promise.withResolvers(),this._disableRange=n0.disableRange||!1,this._contentLength=n0.length,this._rangeChunkSize=n0.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e0=this._fullRequestId,n0=this._manager.getRequestXhr(e0),a0=new Headers(n0.getAllResponseHeaders().trim().split(/[\r\n]+/).map(o0=>{const[l0,...c0]=o0.split(": ");return[l0,c0.join(": ")]})),{allowRangeRequests:i0,suggestedLength:s0}
731=validateRangeRequestCapabilities({responseHeaders:a0,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i0&&(this._isRangeSupported=!0),this._contentLength=s0||this._contentLength,this._filename=extractFilenameFromHeader(a0),this._isRangeSupported&&this._manager.abortRequest(e0),this._headersCapability.resolve()}_onDone(e0){if(e0&&(this._requests.length>0?this._requests.shift().resolve({value:e0.chunk,done:!1}):this._cachedChunks.push(e0.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const n0 of this._requests)n0.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e0){this._storedError=createResponseStatusError(e0,this._url),this._headersCapability.reject(this._storedError);for(const n0 of this._requests)n0.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e0){var n0;(n0=this.onProgress)==null||n0.call(this,{loaded:e0.loaded,total:e0.lengthComputable?e0.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e0=Promise.withResolvers();return this._requests.push(e0),e0.promise}cancel(e0){this._done=!0,this._headersCapability.reject(e0);for(const n0 of this._requests)n0.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(e0,n0,a0){this._manager=e0;const i0={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e0.url,this._requestId=e0.requestRange(n0,a0,i0),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e0;(e0=this.onClosed)==null||e0.call(this,this)}_onDone(e0){const n0=e0.chunk;this._requests.length>0?this._requests.shift().resolve({value:n0,done:!1}):this._queuedChunk=n0,this._done=!0;for(const a0 of this._requests)a0.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e0){this._storedError=createResponseStatusError(e0,this._url);for(const n0 of this._requests)n0.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e0){var n0;this.isStreamingSupported||(n0=this.onProgress)==null||n0.call(this,{loaded:e0.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const n0=this._queuedChunk;return this._queuedChunk=null,{value:n0,done:!1}}if(this._done)return{value:void 0,done:!0};const e0=Promise.withResolvers();return this._requests.push(e0),e0.promise}cancel(e0){this._done=!0;for(const n0 of this._requests)n0.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(r0){if(urlRegex.test(r0))return new URL(r0);const e0=NodePackages.get("url");return new URL(e0.pathToFileURL(r0))}function createRequest(r0,e0,n0){return r0.protocol==="http:"?NodePackages.get("http").request(r0,{headers:e0},n0):NodePackages.get("https").request(r0,{headers:e0},n0)}class PDFNodeStream{constructor(e0){this.source=e0,this.url=parseUrlOrPath(e0.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.headers=createHeaders(this.isHttp,e0.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e0;return((e0=this._fullRequestReader)==null?void 0:e0._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this),this._fullRequestReader}getRangeReader(e0,n0){if(n0<=this._progressiveDataLength)return null;const a0=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,e0,n0):new PDFNodeStreamRangeReader(this,e0,n0);return this._rangeRequestReaders.push(a0),a0}cancelAllRequests(e0){var n0;(n0=this._fullRequestReader)==null||n0.cancel(e0);for(const a0 of this._rangeRequestReaders.slice(0))a0.cancel(e0)}}class BaseFullReader{constructor(e0){this._url=e0.url,this._done=!1,this._storedError=null,this.onProgress=null;const n0=e0.source;this._contentLength=n0.length,this._loaded=0,this._filename=null,this._disableRange=n0.disableRange||!1,this._rangeChunkSize=n0.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!n0.disableStream,this._isRangeSupported=!n0.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a0;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e0=this._readableStream.read();return e0===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e0.length,(a0=this.onProgress)==null||a0.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e0).buffer,done:!1})}
731cancel(e0){if(!this._readableStream){this._error(e0);return}this._readableStream.destroy(e0)}_error(e0){this._storedError=e0,this._readCapability.resolve()}_setReadableStream(e0){this._readableStream=e0,e0.on("readable",()=>{this._readCapability.resolve()}),e0.on("end",()=>{e0.destroy(),this._done=!0,this._readCapability.resolve()}),e0.on("error",n0=>{this._error(n0)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BaseRangeReader{constructor(e0){this._url=e0.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const n0=e0.source;this._isStreamingSupported=!n0.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a0;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e0=this._readableStream.read();return e0===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e0.length,(a0=this.onProgress)==null||a0.call(this,{loaded:this._loaded}),{value:new Uint8Array(e0).buffer,done:!1})}cancel(e0){if(!this._readableStream){this._error(e0);return}this._readableStream.destroy(e0)}_error(e0){this._storedError=e0,this._readCapability.resolve()}_setReadableStream(e0){this._readableStream=e0,e0.on("readable",()=>{this._readCapability.resolve()}),e0.on("end",()=>{e0.destroy(),this._done=!0,this._readCapability.resolve()}),e0.on("error",n0=>{this._error(n0)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class PDFNodeStreamFullReader extends BaseFullReader{constructor(e0){super(e0);const n0=Object.fromEntries(e0.headers),a0=i0=>{if(i0.statusCode===404){const c0=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=c0,this._headersCapability.reject(c0);return}this._headersCapability.resolve(),this._setReadableStream(i0);const s0=new Headers(this._readableStream.headers),{allowRangeRequests:o0,suggestedLength:l0}=validateRangeRequestCapabilities({responseHeaders:s0,isHttp:e0.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o0,this._contentLength=l0||this._contentLength,this._filename=extractFilenameFromHeader(s0)};this._request=createRequest(this._url,n0,a0),this._request.on("error",i0=>{this._storedError=i0,this._headersCapability.reject(i0)}),this._request.end()}}class PDFNodeStreamRangeReader extends BaseRangeReader{constructor(e0,n0,a0){super(e0);const i0=Object.fromEntries(e0.headers);i0.Range=`bytes=${n0}-${a0-1}`;const s0=o0=>{if(o0.statusCode===404){const l0=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=l0;return}this._setReadableStream(o0)};this._request=createRequest(this._url,i0,s0),this._request.on("error",o0=>{this._storedError=o0}),this._request.end()}}class PDFNodeStreamFsFullReader extends BaseFullReader{constructor(e0){super(e0);const n0=NodePackages.get("fs");n0.promises.lstat(this._url).then(a0=>{this._contentLength=a0.size,this._setReadableStream(n0.createReadStream(this._url)),this._headersCapability.resolve()},a0=>{a0.code==="ENOENT"&&(a0=new MissingPDFException(`Missing PDF "${this._url}".`)),this._storedError=a0,this._headersCapability.reject(a0)})}}class PDFNodeStreamFsRangeReader extends BaseRangeReader{constructor(e0,n0,a0){super(e0);const i0=NodePackages.get("fs");this._setReadableStream(i0.createReadStream(this._url,{start:n0,end:a0-1}))}}const MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30,DEFAULT_FONT_ASCENT=.8;var w5,L$,$_,I4,N4,PP,JR,j4,$4,MP,iF,sF,B$,oF,P4,lF,OP,M4,O4,DP,LP,D4,F$,cF,A$,az,iz,P3,W_,T2,M3,sz,oz;const r_=class r_{constructor({textContentSource:e0,container:n0,viewport:a0}){K0(this,A$);K0(this,L$,Promise.withResolvers());K0(this,$_,null);K0(this,I4,!1);K0(this,N4,!!((w5=globalThis.FontInspector)!=null&&w5.enabled));K0(this,PP,null);K0(this,JR,null);K0(this,j4,0);K0(this,$4,0);K0(this,MP,null);K0(this,iF,null);K0(this,sF,0);K0(this,B$,0);K0(this,oF,Object.create(null));K0(this,P4,[]);K0(this,lF,null);K0(this,OP,[]);K0(this,M4,new WeakMap);K0(this,O4,null);var c0;if(e0 instanceof ReadableStream)V0(this,lF,e0);else if(typeof e0=="object")V0(this,lF,new ReadableStream({start(u0){u0.enqueue(e0),u0.close()}}));else throw new Error('No "textContentSource" parameter specified.');V0(this,$_,V0(this,iF,n0)),V0(this,B$,a0.scale*(globalThis.devicePixelRatio||1)),V0(this,sF,a0.rotation),V0(this,JR,{div:null,properties:null,ctx:null});const{pageWidth:i0,pageHeight:s0,pageX:o0,pageY:l0}=a0.rawDims;V0(this,O4,[1,0,0,-1,-o0,l0+s0]),V0(this,$4,i0),V0(this,j4,s0),H0(c0=r_,W_,sz).call(c0),setLayerDimensions(n0,a0),_0(this,L$).promise.finally(()=>{_0(r_,cF).delete(this),V0(this,JR,null),V0(this,oF,null)}
vendor: 8,860 bytes, line 731
731).catch(()=>{})}static get fontFamilyMap(){const{isWindows:e0,isFirefox:n0}=util_FeatureTest.platform;return shadow(this,"fontFamilyMap",new Map([["sans-serif",`${e0&&n0?"Calibri, ":""}sans-serif`],["monospace",`${e0&&n0?"Lucida Console, ":""}monospace`]]))}render(){const e0=()=>{_0(this,MP).read().then(({value:n0,done:a0})=>{if(a0){_0(this,L$).resolve();return}_0(this,PP)??V0(this,PP,n0.lang),Object.assign(_0(this,oF),n0.styles),H0(this,A$,az).call(this,n0.items),e0()},_0(this,L$).reject)};return V0(this,MP,_0(this,lF).getReader()),_0(r_,cF).add(this),e0(),_0(this,L$).promise}update({viewport:e0,onBefore:n0=null}){var s0;const a0=e0.scale*(globalThis.devicePixelRatio||1),i0=e0.rotation;if(i0!==_0(this,sF)&&(n0==null||n0(),V0(this,sF,i0),setLayerDimensions(_0(this,iF),{rotation:i0})),a0!==_0(this,B$)){n0==null||n0(),V0(this,B$,a0);const o0={div:null,properties:null,ctx:H0(s0=r_,W_,T2).call(s0,_0(this,PP))};for(const l0 of _0(this,OP))o0.properties=_0(this,M4).get(l0),o0.div=l0,H0(this,A$,P3).call(this,o0)}}cancel(){var n0;const e0=new AbortException("TextLayer task cancelled.");(n0=_0(this,MP))==null||n0.cancel(e0).catch(()=>{}),V0(this,MP,null),_0(this,L$).reject(e0)}get textDivs(){return _0(this,OP)}get textContentItemsStr(){return _0(this,P4)}static cleanup(){if(!(_0(this,cF).size>0)){_0(this,DP).clear();for(const{canvas:e0}of _0(this,LP).values())e0.remove();_0(this,LP).clear()}}};L$=new WeakMap,$_=new WeakMap,I4=new WeakMap,N4=new WeakMap,PP=new WeakMap,JR=new WeakMap,j4=new WeakMap,$4=new WeakMap,MP=new WeakMap,iF=new WeakMap,sF=new WeakMap,B$=new WeakMap,oF=new WeakMap,P4=new WeakMap,lF=new WeakMap,OP=new WeakMap,M4=new WeakMap,O4=new WeakMap,DP=new WeakMap,LP=new WeakMap,D4=new WeakMap,F$=new WeakMap,cF=new WeakMap,A$=new WeakSet,az=function(e0){var i0,s0;if(_0(this,I4))return;(s0=_0(this,JR)).ctx??(s0.ctx=H0(i0=r_,W_,T2).call(i0,_0(this,PP)));const n0=_0(this,OP),a0=_0(this,P4);for(const o0 of e0){if(n0.length>MAX_TEXT_DIVS_TO_RENDER){warn("Ignoring additional textDivs for performance reasons."),V0(this,I4,!0);return}if(o0.str===void 0){if(o0.type==="beginMarkedContentProps"||o0.type==="beginMarkedContent"){const l0=_0(this,$_);V0(this,$_,document.createElement("span")),_0(this,$_).classList.add("markedContent"),o0.id!==null&&_0(this,$_).setAttribute("id",`${o0.id}`),l0.append(_0(this,$_))}else o0.type==="endMarkedContent"&&V0(this,$_,_0(this,$_).parentNode);continue}a0.push(o0.str),H0(this,A$,iz).call(this,o0)}},iz=function(e0){var m0;const n0=document.createElement("span"),a0={angle:0,canvasWidth:0,hasText:e0.str!=="",hasEOL:e0.hasEOL,fontSize:0};_0(this,OP).push(n0);const i0=Util.transform(_0(this,O4),e0.transform);let s0=Math.atan2(i0[1],i0[0]);const o0=_0(this,oF)[e0.fontName];o0.vertical&&(s0+=Math.PI/2);let l0=_0(this,N4)&&o0.fontSubstitution||o0.fontFamily;l0=r_.fontFamilyMap.get(l0)||l0;const c0=Math.hypot(i0[2],i0[3]),u0=c0*H0(m0=r_,W_,oz).call(m0,l0,_0(this,PP));let d0,h0;s0===0?(d0=i0[4],h0=i0[5]-u0):(d0=i0[4]+u0*Math.sin(s0),h0=i0[5]-u0*Math.cos(s0));const f0="calc(var(--scale-factor)*",p0=n0.style;_0(this,$_)===_0(this,iF)?(p0.left=`${(100*d0/_0(this,$4)).toFixed(2)}%`,p0.top=`${(100*h0/_0(this,j4)).toFixed(2)}%`):(p0.left=`${f0}${d0.toFixed(2)}px)`,p0.top=`${f0}${h0.toFixed(2)}px)`),p0.fontSize=`${f0}${(_0(r_,F$)*c0).toFixed(2)}px)`,p0.fontFamily=l0,a0.fontSize=c0,n0.setAttribute("role","presentation"),n0.textContent=e0.str,n0.dir=e0.dir,_0(this,N4)&&(n0.dataset.fontName=o0.fontSubstitutionLoadedName||e0.fontName),s0!==0&&(a0.angle=s0*(180/Math.PI));let A0=!1;if(e0.str.length>1)A0=!0;else if(e0.str!==" "&&e0.transform[0]!==e0.transform[3]){const x0=Math.abs(e0.transform[0]),g0=Math.abs(e0.transform[3]);x0!==g0&&Math.max(x0,g0)/Math.min(x0,g0)>1.5&&(A0=!0)}if(A0&&(a0.canvasWidth=o0.vertical?e0.height:e0.width),_0(this,M4).set(n0,a0),_0(this,JR).div=n0,_0(this,JR).properties=a0,H0(this,A$,P3).call(this,_0(this,JR)),a0.hasText&&_0(this,$_).append(n0),a0.hasEOL){const x0=document.createElement("br");x0.setAttribute("role","presentation"),_0(this,$_).append(x0)}},P3=function(e0){var l0;const{div:n0,properties:a0,ctx:i0}=e0,{style:s0}=n0;let o0="";if(_0(r_,F$)>1&&(o0=`scale(${1/_0(r_,F$)})`),a0.canvasWidth!==0&&a0.hasText){const{fontFamily:c0}=s0,{canvasWidth:u0,fontSize:d0}=a0;H0(l0=r_,W_,M3).call(l0,i0,d0*_0(this,B$),c0);const{width:h0}=i0.measureText(n0.textContent);h0>0&&(o0=`scaleX(${u0*_0(this,B$)/h0}) ${o0}`)}a0.angle!==0&&(o0=`rotate(${a0.angle}deg) ${o0}`),o0.length>0&&(s0.transform=o0)},W_=new WeakSet,T2=function(e0=null){let n0=_0(this,LP).get(e0||(e0=""));if(!n0){const a0=document.createElement("canvas");a0.className="hiddenCanvasElement",a0.lang=e0,document.body.append(a0),n0=a0.getContext("2d",{alpha:!1,willReadFrequently:!0}),_0(this,LP).set(e0,n0),_0(this,D4).set(n0,{size:0,family:""})}return n0},M3=function(e0,n0,a0){const i0=_0(this,D4).get(e0);n0===i0.size&&a0===i0.family||(e0.font=`${n0}px ${a0}`,i0.size=n0,i0.family=a0)},sz=function(){if(_0(this,F$)!==null)return;const e0=document.createElement("div");e0.style.opacity=0,e0.style.lineHeight=1,e0.style.fontSize="1px",e0.style.position="absolute",e0.textContent="X",document.body.append(e0),V0(this,F$,e0.getBoundingClientRect().height),e0.remove()},oz=function(e0,n0){const a0=_0(this,DP).get(e0);if(a0)return a0;const i0=H0(this,W_,T2).call(this,n0);i0.canvas.width=i0.canvas.height=DEFAULT_FONT_SIZE,H0(this,W_,M3).call(this,i0,DEFAULT_FONT_SIZE,e0);const s0=i0.measureText("");let o0=s0.fontBoundingBoxAscent,l0=Math.abs(s0.fontBoundingBoxDescent);if(o0){const d0=o0/(o0+l0);return _0(this,DP).set(e0,d0),i0.canvas.width=i0.canvas.height=0,d0}i0.strokeStyle="red",i0.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),i0.strokeText("g",0,0);let c0=i0.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data;l0=0;for(let d0=c0.length-1-3;d0>=0;d0-=4)if(c0[d0]>0){l0=Math.ceil(d0/4/DEFAULT_FONT_SIZE);break}i0.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),i0.strokeText("A",0,DEFAULT_FONT_SIZE),c0=i0.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data,o0=0;for(let d0=0,h0=c0.length;d0<h0;d0+=4)if(c0[d0]>0){o0=DEFAULT_FONT_SIZE-Math.floor(d0/4/DEFAULT_FONT_SIZE);break}i0.canvas.width=i0.canvas.height=0;const u0=o0?o0/(o0+l0):DEFAULT_FONT_ASCENT;return _0(this,DP).set(e0,u0),u0},K0(r_,W_),K0(r_,DP,new Map),K0(r_,LP,new Map),K0(r_,D4,new WeakMap),K0(r_,F$,null),K0(r_,cF,new Set);let TextLayer=r_;class XfaText{static textContent(e0){const n0=[],a0={items:n0,styles:Object.create(null)};function i0(s0){var c0;if(!s0)return;let o0=null;const l0=s0.name;if(l0==="#text")o0=s0.value;else if(XfaText.shouldBuildText(l0))(c0=s0==null?void 0:s0.attributes)!=null&&c0.textContent?o0=s0.attributes.textContent:s0.value&&(o0=s0.value);else return;if(o0!==null&&n0.push({str:o0}),!!s0.children)for(const u0 of s0.children)i0(u0)}return i0(e0),a0}static shouldBuildText(e0){return!(e0==="textarea"||e0==="input"||e0==="option"||e0==="select")}}const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=isNodeJS?NodeCanvasFactory:DOMCanvasFactory,DefaultCMapReaderFactory=isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory,DefaultFilterFactory=isNodeJS?NodeFilterFactory:DOMFilterFactory,DefaultStandardFontDataFactory=isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory;function getDocument(r0={}){typeof r0=="string"||r0 instanceof URL?r0={url:r0}:(r0 instanceof ArrayBuffer||ArrayBuffer.isView(r0))&&(r0={data:r0});const e0=new PDFDocumentLoadingTask,{docId:n0}=e0,a0=r0.url?getUrlProp(r0.url):null,i0=r0.data?getDataProp(r0.data):null,s0=r0.httpHeaders||null,o0=r0.withCredentials===!0,l0=r0.password??null,c0=r0.range instanceof PDFDataRangeTransport?r0.range:null,u0=Number.isInteger(r0.rangeChunkSize)&&r0.rangeChunkSize>0?r0.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let d0=r0.worker instanceof PDFWorker?r0.worker:null;const h0=r0.verbosity,f0=typeof r0.docBaseUrl=="string"&&!isDataScheme(r0.docBaseUrl)?r0.docBaseUrl:null,p0=typeof r0.cMapUrl=="string"?r0.cMapUrl:null,A0=r0.cMapPacked!==!1,m0=r0.CMapReaderFactory||DefaultCMapReaderFactory,x0=typeof r0.standardFontDataUrl=="string"?r0.standardFontDataUrl:null,g0=r0.StandardFontDataFactory||DefaultStandardFontDataFactory,y0=r0.stopAtErrors!==!0,b0=Number.isInteger(r0.maxImageSize)&&r0.maxImageSize>-1?r0.maxImageSize:-1,E0=r0.isEvalSupported!==!1,w0=typeof r0.isOffscreenCanvasSupported=="boolean"?r0.isOffscreenCanvasSupported:!isNodeJS,v0=typeof r0.isChrome=="boolean"?r0.isChrome:!util_FeatureTest.platform.isFirefox&&typeof window<"u"&&!!(window!=null&&window.chrome),S0=Number.isInteger(r0.canvasMaxAreaInBytes)?r0.canvasMaxAreaInBytes:-1,k0=typeof r0.disableFontFace=="boolean"?r0.disableFontFace:isNodeJS,R0=r0.fontExtraProperties===!0,j0=r0.enableXfa===!0,C0=r0.ownerDocument||globalThis.document,$0=r0.disableRange===!0,T0=r
7310.disableStream===!0,I0=r0.disableAutoFetch===!0,M0=r0.pdfBug===!0,N0=r0.CanvasFactory||DefaultCanvasFactory,D0=r0.FilterFactory||DefaultFilterFactory,O0=r0.enableHWA===!0,B0=c0?c0.length:r0.length??NaN,z0=typeof r0.useSystemFonts=="boolean"?r0.useSystemFonts:!isNodeJS&&!k0,G0=typeof r0.useWorkerFetch=="boolean"?r0.useWorkerFetch:m0===DOMCMapReaderFactory&&g0===DOMStandardFontDataFactory&&p0&&x0&&isValidFetchUrl(p0,document.baseURI)&&isValidFetchUrl(x0,document.baseURI);r0.canvasFactory&&deprecated("`canvasFactory`-instance option, please use `CanvasFactory` instead."),r0.filterFactory&&deprecated("`filterFactory`-instance option, please use `FilterFactory` instead.");const F0=null;setVerbosityLevel(h0);const Q0={canvasFactory:new N0({ownerDocument:C0,enableHWA:O0}),filterFactory:new D0({docId:n0,ownerDocument:C0}),cMapReaderFactory:G0?null:new m0({baseUrl:p0,isCompressed:A0}),standardFontDataFactory:G0?null:new g0({baseUrl:x0})};if(!d0){const Rw={verbosity:h0,port:GlobalWorkerOptions.workerPort};d0=Rw.port?PDFWorker.fromPort(Rw):new PDFWorker(Rw),e0._worker=d0}const U0={docId:n0,apiVersion:"4.8.69",data:i0,password:l0,disableAutoFetch:I0,rangeChunkSize:u0,length:B0,docBaseUrl:f0,enableXfa:j0,evaluatorOptions:{maxImageSize:b0,disableFontFace:k0,ignoreErrors:y0,isEvalSupported:E0,isOffscreenCanvasSupported:w0,isChrome:v0,canvasMaxAreaInBytes:S0,fontExtraProperties:R0,useSystemFonts:z0,cMapUrl:G0?p0:null,standardFontDataUrl:G0?x0:null}},q0={disableFontFace:k0,fontExtraProperties:R0,ownerDocument:C0,pdfBug:M0,styleElement:F0,loadingParams:{disableAutoFetch:I0,enableXfa:j0}};return d0.promise.then(function(){if(e0.destroyed)throw new Error("Loading aborted");if(d0.destroyed)throw new Error("Worker was destroyed");const Rw=d0.messageHandler.sendWithPromise("GetDocRequest",U0,i0?[i0.buffer]:null);let _w;if(c0)_w=new PDFDataTransportStream(c0,{disableRange:$0,disableStream:T0});else if(!i0){if(!a0)throw new Error("getDocument - no `url` parameter provided.");let J0;isNodeJS?J0=typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&isValidFetchUrl(a0)?PDFFetchStream:PDFNodeStream:J0=isValidFetchUrl(a0)?PDFFetchStream:PDFNetworkStream,_w=new J0({url:a0,length:B0,httpHeaders:s0,withCredentials:o0,rangeChunkSize:u0,disableRange:$0,disableStream:T0})}return Rw.then(J0=>{if(e0.destroyed)throw new Error("Loading aborted");if(d0.destroyed)throw new Error("Worker was destroyed");const Cw=new MessageHandler(n0,J0,d0.port),Ow=new WorkerTransport(Cw,e0,_w,q0,Q0);e0._transport=Ow,Cw.send("Ready",null)})}).catch(e0._capability.reject),e0}function getUrlProp(r0){if(r0 instanceof URL)return r0.href;try{return new URL(r0,window.location).href}catch{if(isNodeJS&&typeof r0=="string")return r0}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(r0){if(isNodeJS&&typeof Buffer<"u"&&r0 instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r0 instanceof Uint8Array&&r0.byteLength===r0.buffer.byteLength)return r0;if(typeof r0=="string")return stringToBytes(r0);if(r0 instanceof ArrayBuffer||ArrayBuffer.isView(r0)||typeof r0=="object"&&!isNaN(r0==null?void 0:r0.length))return new Uint8Array(r0);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function isRefProxy(r0){return typeof r0=="object"&&Number.isInteger(r0==null?void 0:r0.num)&&r0.num>=0&&Number.isInteger(r0==null?void 0:r0.gen)&&r0.gen>=0}var r3;const n3=class n3{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${o_(n3,r3)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e0,n0,a0;this.destroyed=!0;try{(e0=this._worker)!=null&&e0.port&&(this._worker._pendingDestroy=!0),await((n0=this._transport)==null?void 0:n0.destroy())}catch(i0){throw(a0=this._worker)!=null&&a0.port&&delete this._worker._pendingDestroy,i0}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};r3=new WeakMap,K0(n3,r3,0);let PDFDocumentLoadingTask=n3;class PDFDataRangeTransport{constructor(e0,n0,a0=!1,i0=null){this.length=e0,this.initialData=n0,this.progressiveDone=a0,this.contentDispositionFilename=i0,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e0){this._rangeListeners.push(e0)}addProgressListener(e0){this._progressListeners.push(e0)}addProgressiveReadListener(e0){this._progressiveReadListeners.push(e0)}addProgressiveDoneListener(e0){this._progressiveDoneListeners.push(e0)}onDataRange(e0,n0){for(const a0 of this._rangeListeners)a0(e0,n0)}onDataProgress(e0,n0){this._readyCapability.promise.then(()=>{for(const a0 of this._progressListeners)a0(e0,n0)})}onDataProgressiveRead(e0){this._readyCapability.promise.then(()=>{for(const n0 of this._progressiveReadListeners)n0(e0)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e0 of this._progressiveDoneListeners)e0()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e0,n0){unreachable("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class PDFDocumentProxy{constructor(e0,n0){this._pdfInfo=e0,this._transport=n0}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e0){return this._transport.getPage(e0)}getPageIndex(e0){return this._transport.getPageIndex(e0)}getDestinations(){return this._transport.getDestinations()}getDestination(e0){return this._transport.getDestination(e0)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e0="display"}={}){const{renderingIntent:n0}
731=this._transport.getRenderingIntent(e0);return this._transport.getOptionalContentConfig(n0)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e0=!1){return this._transport.startCleanup(e0||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e0){return this._transport.cachedPageNumber(e0)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var U$,ZR,Z_,CL,k2;class PDFPageProxy{constructor(e0,n0,a0,i0=!1){K0(this,Z_);K0(this,U$,null);K0(this,ZR,!1);this._pageIndex=e0,this._pageInfo=n0,this._transport=a0,this._stats=i0?new StatTimer:null,this._pdfBug=i0,this.commonObjs=a0.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e0,rotation:n0=this.rotate,offsetX:a0=0,offsetY:i0=0,dontFlip:s0=!1}={}){return new PageViewport({viewBox:this.view,scale:e0,rotation:n0,offsetX:a0,offsetY:i0,dontFlip:s0})}getAnnotations({intent:e0="display"}={}){const{renderingIntent:n0}=this._transport.getRenderingIntent(e0);return this._transport.getAnnotations(this._pageIndex,n0)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e0;return((e0=this._transport._htmlForXfa)==null?void 0:e0.children[this._pageIndex])||null}render({canvasContext:e0,viewport:n0,intent:a0="display",annotationMode:i0=AnnotationMode.ENABLE,transform:s0=null,background:o0=null,optionalContentConfigPromise:l0=null,annotationCanvasMap:c0=null,pageColors:u0=null,printAnnotationStorage:d0=null,isEditing:h0=!1}){var E0,w0;(E0=this._stats)==null||E0.time("Overall");const f0=this._transport.getRenderingIntent(a0,i0,d0,h0),{renderingIntent:p0,cacheKey:A0}=f0;V0(this,ZR,!1),H0(this,Z_,k2).call(this),l0||(l0=this._transport.getOptionalContentConfig(p0));let m0=this._intentStates.get(A0);m0||(m0=Object.create(null),this._intentStates.set(A0,m0)),m0.streamReaderCancelTimeout&&(clearTimeout(m0.streamReaderCancelTimeout),m0.streamReaderCancelTimeout=null);const x0=!!(p0&RenderingIntentFlag.PRINT);m0.displayReadyCapability||(m0.displayReadyCapability=Promise.withResolvers(),m0.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(w0=this._stats)==null||w0.time("Page Request"),this._pumpOperatorList(f0));const g0=v0=>{var S0;m0.renderTasks.delete(y0),(this._maybeCleanupAfterRender||x0)&&V0(this,ZR,!0),H0(this,Z_,CL).call(this,!x0),v0?(y0.capability.reject(v0),this._abortOperatorList({intentState:m0,reason:v0 instanceof Error?v0:new Error(v0)})):y0.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(S0=globalThis.Stats)!=null&&S0.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},y0=new InternalRenderTask({callback:g0,params:{canvasContext:e0,viewport:n0,transform:s0,background:o0},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c0,operatorList:m0.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!x0,pdfBug:this._pdfBug,pageColors:u0});(m0.renderTasks||(m0.renderTasks=new Set)).add(y0);const b0=y0.task;return Promise.all([m0.displayReadyCapability.promise,l0]).then(([v0,S0])=>{var k0;if(this.destroyed){g0();return}
731if((k0=this._stats)==null||k0.time("Rendering"),!(S0.renderingIntent&p0))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");y0.initializeGraphics({transparency:v0,optionalContentConfig:S0}),y0.operatorListChanged()}).catch(g0),b0}getOperatorList({intent:e0="display",annotationMode:n0=AnnotationMode.ENABLE,printAnnotationStorage:a0=null,isEditing:i0=!1}={}){var u0;function s0(){l0.operatorList.lastChunk&&(l0.opListReadCapability.resolve(l0.operatorList),l0.renderTasks.delete(c0))}const o0=this._transport.getRenderingIntent(e0,n0,a0,i0,!0);let l0=this._intentStates.get(o0.cacheKey);l0||(l0=Object.create(null),this._intentStates.set(o0.cacheKey,l0));let c0;return l0.opListReadCapability||(c0=Object.create(null),c0.operatorListChanged=s0,l0.opListReadCapability=Promise.withResolvers(),(l0.renderTasks||(l0.renderTasks=new Set)).add(c0),l0.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(u0=this._stats)==null||u0.time("Page Request"),this._pumpOperatorList(o0)),l0.opListReadCapability.promise}streamTextContent({includeMarkedContent:e0=!1,disableNormalization:n0=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e0===!0,disableNormalization:n0===!0},{highWaterMark:100,size(i0){return i0.items.length}})}getTextContent(e0={}){if(this._transport._htmlForXfa)return this.getXfa().then(a0=>XfaText.textContent(a0));const n0=this.streamTextContent(e0);return new Promise(function(a0,i0){function s0(){o0.read().then(function({value:c0,done:u0}){if(u0){a0(l0);return}l0.lang??(l0.lang=c0.lang),Object.assign(l0.styles,c0.styles),l0.items.push(...c0.items),s0()},i0)}const o0=n0.getReader(),l0={items:[],styles:Object.create(null),lang:null};s0()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e0=[];for(const n0 of this._intentStates.values())if(this._abortOperatorList({intentState:n0,reason:new Error("Page was destroyed."),force:!0}),!n0.opListReadCapability)for(const a0 of n0.renderTasks)e0.push(a0.completed),a0.cancel();return this.objs.clear(),V0(this,ZR,!1),H0(this,Z_,k2).call(this),Promise.all(e0)}cleanup(e0=!1){V0(this,ZR,!0);const n0=H0(this,Z_,CL).call(this,!1);return e0&&n0&&this._stats&&(this._stats=new StatTimer),n0}_startRenderPage(e0,n0){var i0,s0;const a0=this._intentStates.get(n0);a0&&((i0=this._stats)==null||i0.timeEnd("Page Request"),(s0=a0.displayReadyCapability)==null||s0.resolve(e0))}_renderPageChunk(e0,n0){for(let a0=0,i0=e0.length;a0<i0;a0++)n0.operatorList.fnArray.push(e0.fnArray[a0]),n0.operatorList.argsArray.push(e0.argsArray[a0]);n0.operatorList.lastChunk=e0.lastChunk,n0.operatorList.separateAnnots=e0.separateAnnots;for(const a0 of n0.renderTasks)a0.operatorListChanged();e0.lastChunk&&H0(this,Z_,CL).call(this,!0)}_pumpOperatorList({renderingIntent:e0,cacheKey:n0,annotationStorageSerializable:a0,modifiedIds:i0}){const{map:s0,transfer:o0}=a0,c0=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e0,cacheKey:n0,annotationStorage:s0,modifiedIds:i0},o0).getReader(),u0=this._intentStates.get(n0);u0.streamReader=c0;const d0=()=>{c0.read().then(({value:h0,done:f0})=>{if(f0){u0.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(h0,u0),d0())},h0=>{if(u0.streamReader=null,!this._transport.destroyed){if(u0.operatorList){u0.operatorList.lastChunk=!0;for(const f0 of u0.renderTasks)f0.operatorListChanged();H0(this,Z_,CL).call(this,!0)}if(u0.displayReadyCapability)u0.displayReadyCapability.reject(h0);else if(u0.opListReadCapability)u0.opListReadCapability.reject(h0);else throw h0}})};d0()}_abortOperatorList({intentState:e0,reason:n0,force:a0=!1}){if(e0.streamReader){if(e0.streamReaderCancelTimeout&&(clearTimeout(e0.streamReaderCancelTimeout),e0.streamReaderCancelTimeout=null),!a0){if(e0.renderTasks.size>0)return;if(n0 instanceof RenderingCancelledException){let i0=RENDERING_CANCELLED_TIMEOUT;n0.extraDelay>0&&n0.extraDelay<1e3&&(i0+=n0.extraDelay),e0.streamReaderCancelTimeout=setTimeout(()=>{e0.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e0,reason:n0,force:!0})},i0);return}}if(e0.streamReader.cancel(new AbortException(n0.message)).catch(()=>{}),e0.streamReader=null,!this._transport.destroyed){for(const[i0,s0]of this._intentStates)if(s0===e0){this._intentStates.delete(i0);break}this.cleanup()}}}get stats(){return this._stats}}U$=new WeakMap,ZR=new WeakMap,Z_=new WeakSet,CL=function(e0=!1){if(H0(this,Z_,k2).call(this),!_0(this,ZR)||this.destroyed)return!1;if(e0)return V0(this,U$,setTimeout(()=>{V0(this,U$,null),H0(this,Z_,CL).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:n0,operatorList:a0}of this._intentStates.values())if(n0.size>0||!a0.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),V0(this,ZR,!1),!0},k2=function(){_0(this,U$)&&(clearTimeout(_0(this,U$)),V0(this,U$,null))};var _j,a3;class LoopbackPort{constructor(){K0(this,_j,new Map);K0(this,a3,Promise.resolve())}postMessage(e0,n0){const a0={data:structuredClone(e0,n0?{transfer:n0}:null)};_0(this,a3).then(()=>{for(const[i0]of _0(this,_j))i0.call(this,a0)})}addEventListener(e0,n0,a0=null){let i0=null;if((a0==null?void 0:a0.signal)instanceof AbortSignal){const{signal:s0}=a0;
731if(s0.aborted){warn("LoopbackPort - cannot use an `aborted` signal.");return}const o0=()=>this.removeEventListener(e0,n0);i0=()=>s0.removeEventListener("abort",o0),s0.addEventListener("abort",o0)}_0(this,_j).set(n0,i0)}removeEventListener(e0,n0){const a0=_0(this,_j).get(n0);a0==null||a0(),_0(this,_j).delete(n0)}terminate(){for(const[,e0]of _0(this,_j))e0==null||e0();_0(this,_j).clear()}}_j=new WeakMap,a3=new WeakMap;var i3,BP,FP,uF,C2,dF,R2;const z1=class z1{constructor({name:e0=null,port:n0=null,verbosity:a0=getVerbosityLevel()}={}){K0(this,uF);var i0;if(this.name=e0,this.destroyed=!1,this.verbosity=a0,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,n0){if((i0=_0(z1,FP))!=null&&i0.has(n0))throw new Error("Cannot use more than one PDFWorker per port.");(_0(z1,FP)||V0(z1,FP,new WeakMap)).set(n0,this),this._initializeFromPort(n0);return}this._initialize()}get promise(){return isNodeJS?Promise.all([NodePackages.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e0){this._port=e0,this._messageHandler=new MessageHandler("main","worker",e0),this._messageHandler.on("ready",function(){}),H0(this,uF,C2).call(this)}_initialize(){if(_0(z1,BP)||_0(z1,dF,R2)){this._setupFakeWorker();return}let{workerSrc:e0}=z1;try{z1._isSameOrigin(window.location.href,e0)||(e0=z1._createCDNWrapper(new URL(e0,window.location).href));const n0=new Worker(e0,{type:"module"}),a0=new MessageHandler("main","worker",n0),i0=()=>{s0.abort(),a0.destroy(),n0.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},s0=new AbortController;n0.addEventListener("error",()=>{this._webWorker||i0()},{signal:s0.signal}),a0.on("test",l0=>{if(s0.abort(),this.destroyed||!l0){i0();return}this._messageHandler=a0,this._port=n0,this._webWorker=n0,H0(this,uF,C2).call(this)}),a0.on("ready",l0=>{if(s0.abort(),this.destroyed){i0();return}try{o0()}catch{this._setupFakeWorker()}});const o0=()=>{const l0=new Uint8Array;a0.send("test",l0,[l0.buffer])};o0();return}catch{info("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){_0(z1,BP)||(warn("Setting up fake worker."),V0(z1,BP,!0)),z1._setupFakeWorkerGlobal.then(e0=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const n0=new LoopbackPort;this._port=n0;const a0=`fake${o_(z1,i3)._++}`,i0=new MessageHandler(a0+"_worker",a0,n0);e0.setup(i0,n0),this._messageHandler=new MessageHandler(a0,a0+"_worker",n0),H0(this,uF,C2).call(this)}).catch(e0=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e0.message}".`))})}destroy(){var e0;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(e0=_0(z1,FP))==null||e0.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e0){var a0;if(!(e0!=null&&e0.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const n0=(a0=_0(this,FP))==null?void 0:a0.get(e0.port);if(n0){if(n0._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return n0}return new z1(e0)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return shadow(this,"_setupFakeWorkerGlobal",(async()=>_0(this,dF,R2)?_0(this,dF,R2):(await import(this.workerSrc)).WorkerMessageHandler)())}};i3=new WeakMap,BP=new WeakMap,FP=new WeakMap,uF=new WeakSet,C2=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},dF=new WeakSet,R2=function(){var e0;try{return((e0=globalThis.pdfjsWorker)==null?void 0:e0.WorkerMessageHandler)||null}catch{return null}},K0(z1,dF),K0(z1,i3,0),K0(z1,BP,!1),K0(z1,FP),isNodeJS&&(V0(z1,BP,!0),GlobalWorkerOptions.workerSrc||
731(GlobalWorkerOptions.workerSrc="./pdf.worker.mjs")),z1._isSameOrigin=(e0,n0)=>{let a0;try{if(a0=new URL(e0),!a0.origin||a0.origin==="null")return!1}catch{return!1}const i0=new URL(n0,a0);return a0.origin===i0.origin},z1._createCDNWrapper=e0=>{const n0=`await import("${e0}");`;return URL.createObjectURL(new Blob([n0],{type:"text/javascript"}))};let PDFWorker=z1;var $j,PR,hF,fF,MR,UP,HF;class WorkerTransport{constructor(e0,n0,a0,i0,s0){K0(this,UP);K0(this,$j,new Map);K0(this,PR,new Map);K0(this,hF,new Map);K0(this,fF,new Map);K0(this,MR,null);this.messageHandler=e0,this.loadingTask=n0,this.commonObjs=new PDFObjects,this.fontLoader=new FontLoader({ownerDocument:i0.ownerDocument,styleElement:i0.styleElement}),this.loadingParams=i0.loadingParams,this._params=i0,this.canvasFactory=s0.canvasFactory,this.filterFactory=s0.filterFactory,this.cMapReaderFactory=s0.cMapReaderFactory,this.standardFontDataFactory=s0.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=a0,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(e0,n0=AnnotationMode.ENABLE,a0=null,i0=!1,s0=!1){let o0=RenderingIntentFlag.DISPLAY,l0=SerializableEmpty;switch(e0){case"any":o0=RenderingIntentFlag.ANY;break;case"display":break;case"print":o0=RenderingIntentFlag.PRINT;break;default:warn(`getRenderingIntent - invalid intent: ${e0}`)}const c0=o0&RenderingIntentFlag.PRINT&&a0 instanceof PrintAnnotationStorage?a0:this.annotationStorage;switch(n0){case AnnotationMode.DISABLE:o0+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:o0+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:o0+=RenderingIntentFlag.ANNOTATIONS_STORAGE,l0=c0.serializable;break;default:warn(`getRenderingIntent - invalid annotationMode: ${n0}`)}i0&&(o0+=RenderingIntentFlag.IS_EDITING),s0&&(o0+=RenderingIntentFlag.OPLIST);const{ids:u0,hash:d0}=c0.modifiedIds,h0=[o0,l0.hash,d0];return{renderingIntent:o0,cacheKey:h0.join("_"),annotationStorageSerializable:l0,modifiedIds:u0}}destroy(){var a0;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(a0=_0(this,MR))==null||a0.reject(new Error("Worker was destroyed during onPassword callback"));const e0=[];for(const i0 of _0(this,PR).values())e0.push(i0._destroy());_0(this,PR).clear(),_0(this,hF).clear(),_0(this,fF).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const n0=this.messageHandler.sendWithPromise("Terminate",null);return e0.push(n0),Promise.all(e0).then(()=>{var i0;this.commonObjs.clear(),this.fontLoader.clear(),_0(this,$j).clear(),this.filterFactory.destroy(),TextLayer.cleanup(),(i0=this._networkStream)==null||i0.cancelAllRequests(new AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e0,loadingTask:n0}=this;e0.on("GetReader",(a0,i0)=>{assert(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=s0=>{this._lastProgress={loaded:s0.loaded,total:s0.total}},i0.onPull=()=>{this._fullReader.read().then(function({value:s0,done:o0}){if(o0){i0.close();return}assert(s0 instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i0.enqueue(new Uint8Array(s0),1,[s0])}).catch(s0=>{i0.error(s0)})},i0.onCancel=s0=>{this._fullReader.cancel(s0),i0.ready.catch(o0=>{if(!this.destroyed)throw o0})}}),e0.on("ReaderHeadersReady",async a0=>{var l0;await this._fullReader.headersReady;const{isStreamingSupported:i0,isRangeSupported:s0,contentLength:o0}=this._fullReader;return(!i0||!s0)&&(this._lastProgress&&((l0=n0.onProgress)==null||l0.call(n0,this._lastProgress)),this._fullReader.onProgress=c0=>{var u0;(u0=n0.onProgress)==null||u0.call(n0,{loaded:c0.loaded,total:c0.total})}),{isStreamingSupported:i0,isRangeSupported:s0,contentLength:o0}}),e0.on("GetRangeReader",(a0,i0)=>{assert(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const s0=this._networkStream.getRangeReader(a0.begin,a0.end);if(!s0){i0.close();return}i0.onPull=()=>{s0.read().then(function({value:o0,done:l0}){if(l0){i0.close();return}assert(o0 instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i0.enqueue(new Uint8Array(o0),1,[o0])}).catch(o0=>{i0.error(o0)})},i0.onCancel=o0=>{s0.cancel(o0),i0.ready.catch(l0=>{if(!this.destroyed)throw l0})}}),e0.on("GetDoc",({pdfInfo:a0})=>{this._numPages=a0.numPages,this._htmlForXfa=a0.htmlForXfa,delete a0.htmlForXfa,n0._capability.resolve(new PDFDocumentProxy(a0,this))}),e0.on("DocException",function(a0){let i0;switch(a0.name){case"PasswordException":i0=new PasswordException(a0.message,a0.code);break;case"InvalidPDFException":i0=new InvalidPDFException(a0.message);break;case"MissingPDFException":i0=new MissingPDFException(a0.message);break;case"UnexpectedResponseException":i0=new UnexpectedResponseException(a0.message,a0.status);break;case"UnknownErrorException":i0=new UnknownErrorException(a0.message,a0.details);break;default:unreachable("DocException - expected a valid Error.")}n0._capability.reject(i0)}),e0.on("PasswordRequest",a0=>{if(V0(this,MR,Promise.withResolvers()),n0.onPassword){const i0=s0=>{s0 instanceof Error?_0(this,MR).reject(s0):_0(this,MR).resolve({password:s0})};try{n0.onPassword(i0,a0.code)}catch(s0){_0(this,MR).reject(s0)}}else _0(this,MR).reject(new PasswordException(a0.message,a0.code));return _0(this,MR).promise}),e0.on("DataLoaded",a0=>{var i0;(i0=n0.onProgress)==null||i0.call(n0,{loaded:a0.length,total:a0.length}),this.downloadInfoCapability.resolve(a0)}),e0.on("StartRenderPage",a0=>{if(this.destroyed)return;_0(this,PR).get(a0.pageIndex)._startRenderPage(a0.transparency,a0.cacheKey)}),e0.on("commonobj",([a0,i0,s0])=>{var o0;if(this.destroyed||this.commonObjs.has(a0))return null;switch(i0){case"Font":const{disableFontFace:l0,fontExtraProperties:c0,pdfBug:u0}=this._params;if("error"in s0){const p0=s0.error;warn(`Error during font loading: ${p0}`),this.commonObjs.resolve(a0,p0);break}const d0=u0&&((o0=globalThis.FontInspector)!=null&&o0.enabled)?(p0,A0)=>globalThis.FontInspector.fontAdded(p0,A0):null,h0=new FontFaceObject(s0,{disableFontFace:l0,inspectFont:d0});this.fontLoader.bind(h0).catch(()=>
731e0.sendWithPromise("FontFallback",{id:a0})).finally(()=>{!c0&&h0.data&&(h0.data=null),this.commonObjs.resolve(a0,h0)});break;case"CopyLocalImage":const{imageRef:f0}=s0;assert(f0,"The imageRef must be defined.");for(const p0 of _0(this,PR).values())for(const[,A0]of p0.objs)if((A0==null?void 0:A0.ref)===f0)return A0.dataLen?(this.commonObjs.resolve(a0,structuredClone(A0)),A0.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(a0,s0);break;default:throw new Error(`Got unknown common object type ${i0}`)}return null}),e0.on("obj",([a0,i0,s0,o0])=>{var c0;if(this.destroyed)return;const l0=_0(this,PR).get(i0);if(!l0.objs.has(a0)){if(l0._intentStates.size===0){(c0=o0==null?void 0:o0.bitmap)==null||c0.close();return}switch(s0){case"Image":l0.objs.resolve(a0,o0),(o0==null?void 0:o0.dataLen)>MAX_IMAGE_SIZE_TO_CACHE&&(l0._maybeCleanupAfterRender=!0);break;case"Pattern":l0.objs.resolve(a0,o0);break;default:throw new Error(`Got unknown object type ${s0}`)}}}),e0.on("DocProgress",a0=>{var i0;this.destroyed||(i0=n0.onProgress)==null||i0.call(n0,{loaded:a0.loaded,total:a0.total})}),e0.on("FetchBuiltInCMap",async a0=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(a0)}),e0.on("FetchStandardFontData",async a0=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(a0)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var a0;this.annotationStorage.size<=0&&warn("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e0,transfer:n0}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e0,filename:((a0=this._fullReader)==null?void 0:a0.filename)??null},n0).finally(()=>{this.annotationStorage.resetModified()})}getPage(e0){if(!Number.isInteger(e0)||e0<=0||e0>this._numPages)return Promise.reject(new Error("Invalid page request."));const n0=e0-1,a0=_0(this,hF).get(n0);if(a0)return a0;const i0=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n0}).then(s0=>{if(this.destroyed)throw new Error("Transport destroyed");s0.refStr&&_0(this,fF).set(s0.refStr,e0);const o0=new PDFPageProxy(n0,s0,this,this._params.pdfBug);return _0(this,PR).set(n0,o0),o0});return _0(this,hF).set(n0,i0),i0}getPageIndex(e0){return isRefProxy(e0)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e0.num,gen:e0.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e0,n0){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e0,intent:n0})}getFieldObjects(){return H0(this,UP,HF).call(this,"GetFieldObjects")}hasJSActions(){return H0(this,UP,HF).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e0){return typeof e0!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e0})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return H0(this,UP,HF).call(this,"GetDocJSActions")}getPageJSActions(e0){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e0})}
731getStructTree(e0){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e0})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e0){return H0(this,UP,HF).call(this,"GetOptionalContentConfig").then(n0=>new OptionalContentConfig(n0,e0))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e0="GetMetadata",n0=_0(this,$j).get(e0);if(n0)return n0;const a0=this.messageHandler.sendWithPromise(e0,null).then(i0=>{var s0,o0;return{info:i0[0],metadata:i0[1]?new Metadata(i0[1]):null,contentDispositionFilename:((s0=this._fullReader)==null?void 0:s0.filename)??null,contentLength:((o0=this._fullReader)==null?void 0:o0.contentLength)??null}});return _0(this,$j).set(e0,a0),a0}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e0=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const n0 of _0(this,PR).values())if(!n0.cleanup())throw new Error(`startCleanup: Page ${n0.pageNumber} is currently rendering.`);this.commonObjs.clear(),e0||this.fontLoader.clear(),_0(this,$j).clear(),this.filterFactory.destroy(!0),TextLayer.cleanup()}}cachedPageNumber(e0){if(!isRefProxy(e0))return null;const n0=e0.gen===0?`${e0.num}R`:`${e0.num}R${e0.gen}`;return _0(this,fF).get(n0)??null}}$j=new WeakMap,PR=new WeakMap,hF=new WeakMap,fF=new WeakMap,MR=new WeakMap,UP=new WeakSet,HF=function(e0,n0=null){const a0=_0(this,$j).get(e0);if(a0)return a0;const i0=this.messageHandler.sendWithPromise(e0,n0);return _0(this,$j).set(e0,i0),i0};const INITIAL_DATA=Symbol("INITIAL_DATA");var uR,L4,O3;class PDFObjects{constructor(){K0(this,L4);K0(this,uR,Object.create(null))}get(e0,n0=null){if(n0){const i0=H0(this,L4,O3).call(this,e0);return i0.promise.then(()=>n0(i0.data)),null}const a0=_0(this,uR)[e0];if(!a0||a0.data===INITIAL_DATA)throw new Error(`Requesting object that isn't resolved yet ${e0}.`);return a0.data}has(e0){const n0=_0(this,uR)[e0];return!!n0&&n0.data!==INITIAL_DATA}resolve(e0,n0=null){const a0=H0(this,L4,O3).call(this,e0);a0.data=n0,a0.resolve()}clear(){var e0;for(const n0 in _0(this,uR)){const{data:a0}=_0(this,uR)[n0];(e0=a0==null?void 0:a0.bitmap)==null||e0.close()}V0(this,uR,Object.create(null))}*[Symbol.iterator](){for(const e0 in _0(this,uR)){const{data:n0}=_0(this,uR)[e0];n0!==INITIAL_DATA&&(yield[e0,n0])}}}uR=new WeakMap,L4=new WeakSet,O3=function(e0){var n0;return(n0=_0(this,uR))[e0]||(n0[e0]={...Promise.withResolvers(),data:INITIAL_DATA})};var z$;class RenderTask{constructor(e0){K0(this,z$,null);V0(this,z$,e0),this.onContinue=null}get promise(){return _0(this,z$).capability.promise}cancel(e0=0){_0(this,z$).cancel(null,e0)}get separateAnnots(){const{separateAnnots:e0}=_0(this,z$).operatorList;if(!e0)return!1;const{annotationCanvasMap:n0}=_0(this,z$);return e0.form||e0.canvas&&(n0==null?void 0:n0.size)>0}}z$=new WeakMap;var V$,zP;const oP=class oP{constructor({callback:e0,params:n0,objs:a0,commonObjs:i0,annotationCanvasMap:s0,operatorList:o0,pageIndex:l0,canvasFactory:c0,filterFactory:u0,useRequestAnimationFrame:d0=!1,pdfBug:h0=!1,pageColors:f0=null}){K0(this,V$,null);this.callback=e0,this.params=n0,this.objs=a0,this.commonObjs=i0,this.annotationCanvasMap=s0,this.operatorListIdx=null,this.operatorList=o0,this._pageIndex=l0,this.canvasFactory=c0,this.filterFactory=u0,this._pdfBug=h0,this.pageColors=f0,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=d0===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n0.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e0=!1,optionalContentConfig:n0}){var l0,c0;if(this.cancelled)return;if(this._canvas){if(_0(oP,zP).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_0(oP,zP).add(this._canvas)}this._pdfBug&&((l0=globalThis.StepperManager)!=null&&l0.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:a0,viewport:i0,transform:s0,background:o0}=this.params;this.gfx=new CanvasGraphics(a0,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n0}
731,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s0,viewport:i0,transparency:e0,background:o0}),this.operatorListIdx=0,this.graphicsReady=!0,(c0=this.graphicsReadyCallback)==null||c0.call(this)}cancel(e0=null,n0=0){var a0;this.running=!1,this.cancelled=!0,(a0=this.gfx)==null||a0.endDrawing(),_0(this,V$)&&(window.cancelAnimationFrame(_0(this,V$)),V0(this,V$,null)),_0(oP,zP).delete(this._canvas),this.callback(e0||new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,n0))}operatorListChanged(){var e0;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(e0=this.stepper)==null||e0.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?V0(this,V$,window.requestAnimationFrame(()=>{V0(this,V$,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),_0(oP,zP).delete(this._canvas),this.callback())))}};V$=new WeakMap,zP=new WeakMap,K0(oP,zP,new WeakSet);let InternalRenderTask=oP;const version="4.8.69",build="3634dab10";function makeColorComp(r0){return Math.floor(Math.max(0,Math.min(1,r0))*255).toString(16).padStart(2,"0")}function scaleAndClamp(r0){return Math.max(0,Math.min(255,255*r0))}class ColorConverters{static CMYK_G([e0,n0,a0,i0]){return["G",1-Math.min(1,.3*e0+.59*a0+.11*n0+i0)]}static G_CMYK([e0]){return["CMYK",0,0,0,1-e0]}static G_RGB([e0]){return["RGB",e0,e0,e0]}static G_rgb([e0]){return e0=scaleAndClamp(e0),[e0,e0,e0]}static G_HTML([e0]){const n0=makeColorComp(e0);return`#${n0}${n0}${n0}`}static RGB_G([e0,n0,a0]){return["G",.3*e0+.59*n0+.11*a0]}static RGB_rgb(e0){return e0.map(scaleAndClamp)}static RGB_HTML(e0){return`#${e0.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e0,n0,a0,i0]){return["RGB",1-Math.min(1,e0+i0),1-Math.min(1,a0+i0),1-Math.min(1,n0+i0)]}static CMYK_rgb([e0,n0,a0,i0]){return[scaleAndClamp(1-Math.min(1,e0+i0)),scaleAndClamp(1-Math.min(1,a0+i0)),scaleAndClamp(1-Math.min(1,n0+i0))]}static CMYK_HTML(e0){const n0=this.CMYK_RGB(e0).slice(1);return this.RGB_HTML(n0)}static RGB_CMYK([e0,n0,a0]){const i0=1-e0,s0=1-n0,o0=1-a0,l0=Math.min(i0,s0,o0);return["CMYK",i0,s0,o0,l0]}}class BaseSVGFactory{create(e0,n0,a0=!1){if(e0<=0||n0<=0)throw new Error("Invalid SVG dimensions");const i0=this._createSVG("svg:svg");return i0.setAttribute("version","1.1"),a0||(i0.setAttribute("width",`${e0}px`),i0.setAttribute("height",`${n0}px`)),i0.setAttribute("preserveAspectRatio","none"),i0.setAttribute("viewBox",`0 0 ${e0} ${n0}`),i0}createElement(e0){if(typeof e0!="string")throw new Error("Invalid SVG element type");return this._createSVG(e0)}_createSVG(e0){unreachable("Abstract method `_createSVG` called.")}}class DOMSVGFactory extends BaseSVGFactory{_createSVG(e0){return document.createElementNS(SVG_NS,e0)}}class XfaLayer{static setupStorage(e0,n0,a0,i0,s0){const o0=i0.getValue(n0,{value:null});switch(a0.name){case"textarea":if(o0.value!==null&&(e0.textContent=o0.value),s0==="print")break;e0.addEventListener("input",l0=>{i0.setValue(n0,{value:l0.target.value})});break;case"input":if(a0.attributes.type==="radio"||a0.attributes.type==="checkbox"){if(o0.value===a0.attributes.xfaOn?e0.setAttribute("checked",!0):o0.value===a0.attributes.xfaOff&&e0.removeAttribute("checked"),s0==="print")break;e0.addEventListener("change",l0=>{i0.setValue(n0,{value:l0.target.checked?l0.target.getAttribute("xfaOn"):l0.target.getAttribute("xfaOff")})})}else{if(o0.value!==null&&e0.setAttribute("value",o0.value),s0==="print")break;e0.addEventListener("input",l0=>{i0.setValue(n0,{value:l0.target.value})})}break;case"select":if(o0.value!==null){e0.setAttribute("value",o0.value);for(const l0 of a0.children)l0.attributes.value===o0.value?l0.attributes.selected=!0:l0.attributes.hasOwnProperty("selected")&&delete l0.attributes.selected}e0.addEventListener("input",l0=>{const c0=l0.target.options,u0=c0.selectedIndex===-1?"":c0[c0.selectedIndex].value;i0.setValue(n0,{value:u0})});break}}static setAttributes({html:e0,element:n0,storage:a0=null,intent:i0,linkService:s0}){const{attributes:o0}=n0,l0=e0 instanceof HTMLAnchorElement;o0.type==="radio"&&(o0.name=`${o0.name}-${i0}`);for(const[c0,u0]of Object.entries(o0))if(u0!=null)switch(c0){case"class":u0.length&&e0.setAttribute(c0,u0.join(" "));break;case"dataId":break;case"id":e0.setAttribute("data-element-id",u0);break;case"style":Object.assign(e0.style,u0);break;case"textContent":e0.textContent=u0;break;default:(!l0||c0!=="href"&&c0!=="newWindow")&&e0.setAttribute(c0,u0)}l0&&s0.addLinkAttributes(e0,o0.href,o0.newWindow),a0&&o0.dataId&&this.setupStorage(e0,o0.dataId,n0,a0)}static render(e0){var h0,f0;const n0=e0.annotationStorage,a0=e0.linkService,i0=e0.xfaHtml,s0=e0.intent||"display",o0=document.createElement(i0.name);i0.attributes&&this.setAttributes({html:o0,element:i0,intent:s0,linkService:a0});const l0=s0!=="richText",c0=e0.div;if(c0.append(o0),e0.viewport){const p0=`matrix(${e0.viewport.transform.join(",")})`;c0.style.transform=p0}l0&&c0.setAttribute("class","xfaLayer xfaFont");const u0=[];if(i0.children.length===0){if(i0.value){const p0=document.createTextNode(i0.value);o0.append(p0),l0&&XfaText.shouldBuildText(i0.name)&&u0.push(p0)}return{textDivs:u0}}const d0=[[i0,-1,o0]];for(;d0.length>0;){const[p0,A0,m0]=d0.at(-1);if(A0+1===p0.children.length){d0.pop();continue}const x0=p0.children[++d0.at(-1)[1]];if(x0===null)continue;const{name:g0}=x0;if(g0==="#text"){const b0=document.createTextNode(x0.value);
731u0.push(b0),m0.append(b0);continue}const y0=(h0=x0==null?void 0:x0.attributes)!=null&&h0.xmlns?document.createElementNS(x0.attributes.xmlns,g0):document.createElement(g0);if(m0.append(y0),x0.attributes&&this.setAttributes({html:y0,element:x0,storage:n0,intent:s0,linkService:a0}),((f0=x0.children)==null?void 0:f0.length)>0)d0.push([x0,-1,y0]);else if(x0.value){const b0=document.createTextNode(x0.value);l0&&XfaText.shouldBuildText(g0)&&u0.push(b0),y0.append(b0)}}for(const p0 of c0.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))p0.setAttribute("readOnly",!0);return{textDivs:u0}}static update(e0){const n0=`matrix(${e0.viewport.transform.join(",")})`;e0.div.style.transform=n0,e0.div.hidden=!1}}const DEFAULT_TAB_INDEX=1e3,annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet;function getRectDims(r0){return{width:r0[2]-r0[0],height:r0[3]-r0[1]}}class AnnotationElementFactory{static create(e0){switch(e0.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(e0);case AnnotationType.TEXT:return new TextAnnotationElement(e0);case AnnotationType.WIDGET:switch(e0.data.fieldType){case"Tx":return new TextWidgetAnnotationElement(e0);case"Btn":return e0.data.radioButton?new RadioButtonWidgetAnnotationElement(e0):e0.data.checkBox?new CheckboxWidgetAnnotationElement(e0):new PushButtonWidgetAnnotationElement(e0);case"Ch":return new ChoiceWidgetAnnotationElement(e0);case"Sig":return new SignatureWidgetAnnotationElement(e0)}return new WidgetAnnotationElement(e0);case AnnotationType.POPUP:return new PopupAnnotationElement(e0);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(e0);case AnnotationType.LINE:return new LineAnnotationElement(e0);case AnnotationType.SQUARE:return new SquareAnnotationElement(e0);case AnnotationType.CIRCLE:return new CircleAnnotationElement(e0);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(e0);case AnnotationType.CARET:return new CaretAnnotationElement(e0);case AnnotationType.INK:return new InkAnnotationElement(e0);case AnnotationType.POLYGON:return new PolygonAnnotationElement(e0);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(e0);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(e0);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(e0);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(e0);case AnnotationType.STAMP:return new StampAnnotationElement(e0);case AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(e0);default:return new AnnotationElement(e0)}}}var VP,pF,mF,B4,D3;const f5=class f5{constructor(e0,{isRenderable:n0=!1,ignoreBorder:a0=!1,createQuadrilaterals:i0=!1}={}){K0(this,B4);K0(this,VP,null);K0(this,pF,!1);K0(this,mF,null);this.isRenderable=n0,this.data=e0.data,this.layer=e0.layer,this.linkService=e0.linkService,this.downloadManager=e0.downloadManager,this.imageResourcesPath=e0.imageResourcesPath,this.renderForms=e0.renderForms,this.svgFactory=e0.svgFactory,this.annotationStorage=e0.annotationStorage,this.enableScripting=e0.enableScripting,this.hasJSActions=e0.hasJSActions,this._fieldObjects=e0.fieldObjects,this.parent=e0.parent,n0&&(this.container=this._createContainer(a0)),i0&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e0,contentsObj:n0,richText:a0}){return!!(e0!=null&&e0.str||n0!=null&&n0.str||a0!=null&&a0.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return f5._hasPopupData(this.data)}updateEdited(e0){var a0;if(!this.container)return;_0(this,VP)||V0(this,VP,{rect:this.data.rect.slice(0)});const{rect:n0}=e0;n0&&H0(this,B4,D3).call(this,n0),(a0=_0(this,mF))==null||a0.popup.updateEdited(e0)}resetEdited(){var e0;_0(this,VP)&&(H0(this,B4,D3).call(this,_0(this,VP).rect),(e0=_0(this,mF))==null||e0.popup.resetEdited(),V0(this,VP,null))}_createContainer(e0){const{data:n0,parent:{page:a0,viewport:i0}}=this,s0=document.createElement("section");s0.setAttribute("data-annotation-id",n0.id),this instanceof WidgetAnnotationElement||(s0.tabIndex=DEFAULT_TAB_INDEX);const{style:o0}=s0;if(o0.zIndex=this.parent.zIndex++,n0.alternativeText&&(s0.title=n0.alternativeText),n0.noRotate&&s0.classList.add("norotate"),!n0.rect||this instanceof PopupAnnotationElement){const{rotation:m0}=n0;return!n0.hasOwnCanvas&&m0!==0&&this.setRotation(m0,s0),s0}const{width:l0,height:c0}=getRectDims(n0.rect);if(!e0&&n0.borderStyle.width>0){o0.borderWidth=`${n0.borderStyle.width}px`;const m0=n0.borderStyle.horizontalCornerRadius,x0=n0.borderStyle.verticalCornerRadius;if(m0>0||x0>0){const y0=`calc(${m0}px * var(--scale-factor)) / calc(${x0}px * var(--scale-factor))`;o0.borderRadius=y0}else if(this instanceof RadioButtonWidgetAnnotationElement){const y0=`calc(${l0}px * var(--scale-factor)) / calc(${c0}px * var(--scale-factor))`;o0.borderRadius=y0}switch(n0.borderStyle.style){case AnnotationBorderStyleType.SOLID:o0.borderStyle="solid";break;case AnnotationBorderStyleType.DASHED:o0.borderStyle="dashed";break;case AnnotationBorderStyleType.BEVELED:warn("Unimplemented border style: beveled");break;case AnnotationBorderStyleType.INSET:warn("Unimplemented border style: inset");break;case AnnotationBorderStyleType.UNDERLINE:o0.borderBottomStyle="solid";break}const g0=n0.borderColor||null;g0?(V0(this,pF,!0),o0.borderColor=Util.makeHexColor(g0[0]|0,g0[1]|0,g0[2]|0)):o0.borderWidth=0}const u0=Util.normalizeRect([n0.rect[0],a0.view[3]-n0.rect[1]+a0.view[1],n0.rect[2],a0.view[3]-n0.rect[3]+a0.view[1]]),{pageWidth:d0,pageHeight:h0,pageX:f0,pageY:p0}=i0.rawDims;o0.left=`${100*(u0[0]-f0)/d0}%`,o0.top=`${100*(u0[1]-p0)/h0}%`;const{rotation:A0}=n0;return n0.hasOwnCanvas||A0===0?(o0.width=`${100*l0/d0}%`,o0.height=`${100*c0/h0}%`):this.setRotation(A0,s0),s0}setRotation(e0,n0=this.container){if(!this.data.rect)return;const{pageWidth:a0,pageHeight:i0}=this.parent.viewport.rawDims,{width:s0,height:o0}=getRectDims(this.data.rect);let l0,c0;e0%180===0?(l0=100*s0/a0,c0=100*o0/i0):(l0=100*o0/a0,c0=100*s0/i0),n0.style.width=`${l0}%`,n0.style.height=`${c0}%`,n0.setAttribute("data-main-rotation",(360-e0)%360)}get _commonActions(){const e0=(n0,a0,i0)=>{const s0=i0.detail[n0],o0=s0[0],l0=s0.slice(1);i0.target.style[a0]=ColorConverters[`${o0}_HTML`](l0),this.annotationStorage.setValue(this.data.id,{[a0]:ColorConverters[`${o0}_rgb`](l0)})};return shadow(this,"_commonActions",{display:n0=>{const{display:a0}=n0.detail,i0=a0%2===1;this.container.style.visibility=i0?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i0,noPrint:a0===1||a0===2})},print:n0=>{this.annotationStorage.setValue(this.data.id,{noPrint:!n0.detail.print})},hidden:n0=>{const{hidden:a0}=n0.detail;this.container.style.visibility=a0?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:a0,noView:a0})},focus:n0=>{setTimeout(()=>
731n0.target.focus({preventScroll:!1}),0)},userName:n0=>{n0.target.title=n0.detail.userName},readonly:n0=>{n0.target.disabled=n0.detail.readonly},required:n0=>{this._setRequired(n0.target,n0.detail.required)},bgColor:n0=>{e0("bgColor","backgroundColor",n0)},fillColor:n0=>{e0("fillColor","backgroundColor",n0)},fgColor:n0=>{e0("fgColor","color",n0)},textColor:n0=>{e0("textColor","color",n0)},borderColor:n0=>{e0("borderColor","borderColor",n0)},strokeColor:n0=>{e0("strokeColor","borderColor",n0)},rotation:n0=>{const a0=n0.detail.rotation;this.setRotation(a0),this.annotationStorage.setValue(this.data.id,{rotation:a0})}})}_dispatchEventFromSandbox(e0,n0){const a0=this._commonActions;for(const i0 of Object.keys(n0.detail)){const s0=e0[i0]||a0[i0];s0==null||s0(n0)}}_setDefaultPropertiesFromJS(e0){if(!this.enableScripting)return;const n0=this.annotationStorage.getRawValue(this.data.id);if(!n0)return;const a0=this._commonActions;for(const[i0,s0]of Object.entries(n0)){const o0=a0[i0];if(o0){const l0={detail:{[i0]:s0},target:e0};o0(l0),delete n0[i0]}}}
731_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e0}=this.data;if(!e0)return;const[n0,a0,i0,s0]=this.data.rect.map(m0=>Math.fround(m0));if(e0.length===8){const[m0,x0,g0,y0]=e0.subarray(2,6);if(i0===m0&&s0===x0&&n0===g0&&a0===y0)return}const{style:o0}=this.container;let l0;if(_0(this,pF)){const{borderColor:m0,borderWidth:x0}=o0;o0.borderWidth=0,l0=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${m0}" stroke-width="${x0}">`],this.container.classList.add("hasBorder")}const c0=i0-n0,u0=s0-a0,{svgFactory:d0}=this,h0=d0.createElement("svg");h0.classList.add("quadrilateralsContainer"),h0.setAttribute("width",0),h0.setAttribute("height",0);const f0=d0.createElement("defs");h0.append(f0);const p0=d0.createElement("clipPath"),A0=`clippath_${this.data.id}`;p0.setAttribute("id",A0),p0.setAttribute("clipPathUnits","objectBoundingBox"),f0.append(p0);for(let m0=2,x0=e0.length;m0<x0;m0+=8){const g0=e0[m0],y0=e0[m0+1],b0=e0[m0+2],E0=e0[m0+3],w0=d0.createElement("rect"),v0=(b0-n0)/c0,S0=(s0-y0)/u0,k0=(g0-b0)/c0,R0=(y0-E0)/u0;w0.setAttribute("x",v0),w0.setAttribute("y",S0),w0.setAttribute("width",k0),w0.setAttribute("height",R0),p0.append(w0),l0==null||l0.push(`<rect vector-effect="non-scaling-stroke" x="${v0}" y="${S0}" width="${k0}" height="${R0}"/>`)}_0(this,pF)&&(l0.push("</g></svg>')"),o0.backgroundImage=l0.join("")),this.container.append(h0),this.container.style.clipPath=`url(#${A0})`}_createPopup(){const{data:e0}=this,n0=V0(this,mF,new PopupAnnotationElement({data:{color:e0.color,titleObj:e0.titleObj,modificationDate:e0.modificationDate,contentsObj:e0.contentsObj,richText:e0.richText,parentRect:e0.rect,borderStyle:0,id:`popup_${e0.id}`,rotation:e0.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(n0.render())}render(){unreachable("Abstract method `AnnotationElement.render` called")}_getElementsByName(e0,n0=null){const a0=[];if(this._fieldObjects){const i0=this._fieldObjects[e0];if(i0)for(const{page:s0,id:o0,exportValues:l0}of i0){if(s0===-1||o0===n0)continue;const c0=typeof l0=="string"?l0:null,u0=document.querySelector(`[data-element-id="${o0}"]`);if(u0&&!GetElementsByNameSet.has(u0)){warn(`_getElementsByName - element not allowed: ${o0}`);continue}a0.push({id:o0,exportValue:c0,domElement:u0})}return a0}for(const i0 of document.getElementsByName(e0)){const{exportValue:s0}=i0,o0=i0.getAttribute("data-element-id");o0!==n0&&GetElementsByNameSet.has(i0)&&a0.push({id:o0,exportValue:s0,domElement:i0})}return a0}show(){var e0;this.container&&(this.container.hidden=!1),(e0=this.popup)==null||e0.maybeShow()}hide(){var e0;this.container&&(this.container.hidden=!0),(e0=this.popup)==null||e0.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e0=this.getElementsToTriggerPopup();if(Array.isArray(e0))for(const n0 of e0)n0.classList.add("highlightArea");else e0.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e0,data:{id:n0}}=this;this.container.addEventListener("dblclick",()=>{var a0;(a0=this.linkService.eventBus)==null||a0.dispatch("switchannotationeditormode",{source:this,mode:e0,editId:n0})})}};VP=new WeakMap,pF=new WeakMap,mF=new WeakMap,B4=new WeakSet,D3=function(e0){const{container:{style:n0},data:{rect:a0,rotation:i0},parent:{viewport:{rawDims:{pageWidth:s0,pageHeight:o0,pageX:l0,pageY:c0}}}}=this;a0==null||a0.splice(0,4,...e0);const{width:u0,height:d0}=getRectDims(e0);n0.left=`${100*(e0[0]-l0)/s0}%`,n0.top=`${100*(o0-e0[3]+c0)/o0}%`,i0===0?(n0.width=`${100*u0/s0}%`,n0.height=`${100*d0/o0}%`):this.setRotation(i0)};let AnnotationElement=f5;var H_,rP,lz,cz;class LinkAnnotationElement extends AnnotationElement{constructor(n0,a0=null){super(n0,{isRenderable:!0,ignoreBorder:!!(a0!=null&&a0.ignoreBorder),createQuadrilaterals:!0});K0(this,H_);this.isTooltipOnly=n0.data.isTooltipOnly}render(){const{data:n0,linkService:a0}=this,i0=document.createElement("a");i0.setAttribute("data-element-id",n0.id);let s0=!1;return n0.url?(a0.addLinkAttributes(i0,n0.url,n0.newWindow),s0=!0):n0.action?(this._bindNamedAction(i0,n0.action),s0=!0):n0.attachment?(H0(this,H_,lz).call(this,i0,n0.attachment,n0.attachmentDest),s0=!0):n0.setOCGState?(H0(this,H_,cz).call(this,i0,n0.setOCGState),s0=!0):n0.dest?(this._bindLink(i0,n0.dest),s0=!0):(n0.actions&&(n0.actions.Action||n0.actions["Mouse Up"]||n0.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i0,n0),s0=!0),n0.resetForm?(this._bindResetFormAction(i0,n0.resetForm),s0=!0):this.isTooltipOnly&&!s0&&(this._bindLink(i0,""),s0=!0)),this.container.classList.add("linkA
731nnotation"),s0&&this.container.append(i0),this.container}_bindLink(n0,a0){n0.href=this.linkService.getDestinationHash(a0),n0.onclick=()=>(a0&&this.linkService.goToDestination(a0),!1),(a0||a0==="")&&H0(this,H_,rP).call(this)}_bindNamedAction(n0,a0){n0.href=this.linkService.getAnchorUrl(""),n0.onclick=()=>(this.linkService.executeNamedAction(a0),!1),H0(this,H_,rP).call(this)}_bindJSAction(n0,a0){n0.href=this.linkService.getAnchorUrl("");const i0=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const s0 of Object.keys(a0.actions)){const o0=i0.get(s0);o0&&(n0[o0]=()=>{var l0;return(l0=this.linkService.eventBus)==null||l0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:a0.id,name:s0}}),!1})}n0.onclick||(n0.onclick=()=>!1),H0(this,H_,rP).call(this)}_bindResetFormAction(n0,a0){const i0=n0.onclick;if(i0||(n0.href=this.linkService.getAnchorUrl("")),H0(this,H_,rP).call(this),!this._fieldObjects){warn('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i0||(n0.onclick=()=>!1);return}n0.onclick=()=>{var h0;i0==null||i0();const{fields:s0,refs:o0,include:l0}=a0,c0=[];if(s0.length!==0||o0.length!==0){const f0=new Set(o0);for(const p0 of s0){const A0=this._fieldObjects[p0]||[];for(const{id:m0}of A0)f0.add(m0)}for(const p0 of Object.values(this._fieldObjects))for(const A0 of p0)f0.has(A0.id)===l0&&c0.push(A0)}else for(const f0 of Object.values(this._fieldObjects))c0.push(...f0);const u0=this.annotationStorage,d0=[];for(const f0 of c0){const{id:p0}=f0;switch(d0.push(p0),f0.type){case"text":{const m0=f0.defaultValue||"";u0.setValue(p0,{value:m0});break}case"checkbox":case"radiobutton":{const m0=f0.defaultValue===f0.exportValues;u0.setValue(p0,{value:m0});break}case"combobox":case"listbox":{const m0=f0.defaultValue||"";u0.setValue(p0,{value:m0});break}default:continue}const A0=document.querySelector(`[data-element-id="${p0}"]`);if(A0){if(!GetElementsByNameSet.has(A0)){warn(`_bindResetFormAction - element not allowed: ${p0}`);continue}}else continue;A0.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((h0=this.linkService.eventBus)==null||h0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:d0,name:"ResetForm"}})),!1}}}H_=new WeakSet,rP=function(){this.container.setAttribute("data-internal-link","")},lz=function(n0,a0,i0=null){n0.href=this.linkService.getAnchorUrl(""),a0.description&&(n0.title=a0.description),n0.onclick=()=>{var s0;return(s0=this.downloadManager)==null||s0.openOrDownloadData(a0.content,a0.filename,i0),!1},H0(this,H_,rP).call(this)},cz=function(n0,a0){n0.href=this.linkService.getAnchorUrl(""),n0.onclick=()=>(this.linkService.executeSetOCGState(a0),!1),H0(this,H_,rP).call(this)};class TextAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e0=document.createElement("img");return e0.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e0.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e0.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e0),this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(e0){var n0;this.data.hasOwnCanvas&&(((n0=e0.previousSibling)==null?void 0:n0.nodeName)==="CANVAS"&&(e0.previousSibling.hidden=!0),e0.hidden=!1)}_getKeyModifier(e0){return util_FeatureTest.platform.isMac?e0.metaKey:e0.ctrlKey}_setEventListener(e0,n0,a0,i0,s0){a0.includes("mouse")?e0.addEventListener(a0,o0=>{var l0;(l0=this.linkService.eventBus)==null||l0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i0,value:s0(o0),shift:o0.shiftKey,modifier:this._getKeyModifier(o0)}})}):e0.addEventListener(a0,o0=>{var l0;if(a0==="blur"){if(!n0.focused||!o0.relatedTarget)return;n0.focused=!1}else if(a0==="focus"){if(n0.focused)return;n0.focused=!0}s0&&((l0=this.linkService.eventBus)==null||l0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i0,value:s0(o0)}}))})}_setEventListeners(e0,n0,a0,i0){var s0,o0,l0;for(const[c0,u0]of a0)(u0==="Action"||(s0=this.data.actions)!=null&&s0[u0])&&((u0==="Focus"||u0==="Blur")&&(n0||(n0={focused:!1})),this._setEventListener(e0,n0,c0,u0,i0),u0==="Focus"&&!((o0=this.data.actions)!=null&&o0.Blur)?this._setEventListener(e0,n0,"blur","Blur",null):u0==="Blur"&&!((l0=this.data.actions)!=null&&l0.Focus)&&this._setEventListener(e0,n0,"focus","Focus",null))}
731_setBackgroundColor(e0){const n0=this.data.backgroundColor||null;e0.style.backgroundColor=n0===null?"transparent":Util.makeHexColor(n0[0],n0[1],n0[2])}_setTextStyle(e0){const n0=["left","center","right"],{fontColor:a0}=this.data.defaultAppearanceData,i0=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,s0=e0.style;let o0;const l0=2,c0=u0=>Math.round(10*u0)/10;if(this.data.multiLine){const u0=Math.abs(this.data.rect[3]-this.data.rect[1]-l0),d0=Math.round(u0/(LINE_FACTOR*i0))||1,h0=u0/d0;o0=Math.min(i0,c0(h0/LINE_FACTOR))}else{const u0=Math.abs(this.data.rect[3]-this.data.rect[1]-l0);o0=Math.min(i0,c0(u0/LINE_FACTOR))}s0.fontSize=`calc(${o0}px * var(--scale-factor))`,s0.color=Util.makeHexColor(a0[0],a0[1],a0[2]),this.data.textAlignment!==null&&(s0.textAlign=n0[this.data.textAlignment])}_setRequired(e0,n0){n0?e0.setAttribute("required",!0):e0.removeAttribute("required"),e0.setAttribute("aria-required",n0)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e0){const n0=e0.renderForms||e0.data.hasOwnCanvas||!e0.data.hasAppearance&&!!e0.data.fieldValue;super(e0,{isRenderable:n0})}setPropertyOnSiblings(e0,n0,a0,i0){const s0=this.annotationStorage;
731for(const o0 of this._getElementsByName(e0.name,e0.id))o0.domElement&&(o0.domElement[n0]=a0),s0.setValue(o0.id,{[i0]:a0})}render(){var i0,s0;const e0=this.annotationStorage,n0=this.data.id;this.container.classList.add("textWidgetAnnotation");let a0=null;if(this.renderForms){const o0=e0.getValue(n0,{value:this.data.fieldValue});let l0=o0.value||"";const c0=e0.getValue(n0,{charLimit:this.data.maxLen}).charLimit;c0&&l0.length>c0&&(l0=l0.slice(0,c0));let u0=o0.formattedValue||((i0=this.data.textContent)==null?void 0:i0.join(` 732`))||null;u0&&this.data.comb&&(u0=u0.replaceAll(/\s+/g,""));const d0={userValue:l0,formattedValue:u0,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(a0=document.createElement("textarea"),a0.textContent=u0??l0,this.data.doNotScroll&&(a0.style.overflowY="hidden")):(a0=document.createElement("input"),a0.type="text",a0.setAttribute("value",u0??l0),this.data.doNotScroll&&(a0.style.overflowX="hidden")),this.data.hasOwnCanvas&&(a0.hidden=!0),GetElementsByNameSet.add(a0),a0.setAttribute("data-element-id",n0),a0.disabled=this.data.readOnly,a0.name=this.data.fieldName,a0.tabIndex=DEFAULT_TAB_INDEX,this._setRequired(a0,this.data.required),c0&&(a0.maxLength=c0),a0.addEventListener("input",f0=>{e0.setValue(n0,{value:f0.target.value}),this.setPropertyOnSiblings(a0,"value",f0.target.value,"value"),d0.formattedValue=null}),a0.addEventListener("resetform",f0=>{const p0=this.data.defaultFieldValue??"";a0.value=d0.userValue=p0,d0.formattedValue=null});let h0=f0=>{const{formattedValue:p0}=d0;p0!=null&&(f0.target.value=p0),f0.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){a0.addEventListener("focus",p0=>{var m0;if(d0.focused)return;const{target:A0}=p0;d0.userValue&&(A0.value=d0.userValue),d0.lastCommittedValue=A0.value,d0.commitKey=1,(m0=this.data.actions)!=null&&m0.Focus||(d0.focused=!0)}),a0.addEventListener("updatefromsandbox",p0=>{this.showElementAndHideCanvas(p0.target);const A0={value(m0){d0.userValue=m0.detail.value??"",e0.setValue(n0,{value:d0.userValue.toString()}),m0.target.value=d0.userValue},formattedValue(m0){const{formattedValue:x0}=m0.detail;d0.formattedValue=x0,x0!=null&&m0.target!==document.activeElement&&(m0.target.value=x0),e0.setValue(n0,{formattedValue:x0})},selRange(m0){m0.target.setSelectionRange(...m0.detail.selRange)},charLimit:m0=>{var b0;const{charLimit:x0}=m0.detail,{target:g0}=m0;if(x0===0){g0.removeAttribute("maxLength");return}g0.setAttribute("maxLength",x0);let y0=d0.userValue;!y0||y0.length<=x0||(y0=y0.slice(0,x0),g0.value=d0.userValue=y0,e0.setValue(n0,{value:y0}),(b0=this.linkService.eventBus)==null||b0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n0,name:"Keystroke",value:y0,willCommit:!0,commitKey:1,selStart:g0.selectionStart,selEnd:g0.selectionEnd}}))}};this._dispatchEventFromSandbox(A0,p0)}),a0.addEventListener("keydown",p0=>{var x0;d0.commitKey=1;let A0=-1;if(p0.key==="Escape"?A0=0:p0.key==="Enter"&&!this.data.multiLine?A0=2:p0.key==="Tab"&&(d0.commitKey=3),A0===-1)return;const{value:m0}=p0.target;d0.lastCommittedValue!==m0&&(d0.lastCommittedValue=m0,d0.userValue=m0,(x0=this.linkService.eventBus)==null||x0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n0,name:"Keystroke",value:m0,willCommit:!0,commitKey:A0,selStart:p0.target.selectionStart,selEnd:p0.target.selectionEnd}}))});const f0=h0;h0=null,a0.addEventListener("blur",p0=>{var m0,x0;if(!d0.focused||!p0.relatedTarget)return;(m0=this.data.actions)!=null&&m0.Blur||(d0.focused=!1);const{value:A0}=p0.target;d0.userValue=A0,d0.lastCommittedValue!==A0&&((x0=this.linkService.eventBus)==null||x0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n0,name:"Keystroke",value:A0,willCommit:!0,commitKey:d0.commitKey,selStart:p0.target.selectionStart,selEnd:p0.target.selectionEnd}})),f0(p0)}),(s0=this.data.actions)!=null&&s0.Keystroke&&a0.addEventListener("beforeinput",p0=>{var w0;d0.lastCommittedValue=null;const{data:A0,target:m0}=p0,{value:x0,selectionStart:g0,selectionEnd:y0}=m0;let b0=g0,E0=y0;switch(p0.inputType){case"deleteWordBackward":{const v0=x0.substring(0,g0).match(/\w*[^\
vendor: 4,619 bytes, line 732
732w]*$/);v0&&(b0-=v0[0].length);break}case"deleteWordForward":{const v0=x0.substring(g0).match(/^[^\w]*\w*/);v0&&(E0+=v0[0].length);break}case"deleteContentBackward":g0===y0&&(b0-=1);break;case"deleteContentForward":g0===y0&&(E0+=1);break}p0.preventDefault(),(w0=this.linkService.eventBus)==null||w0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n0,name:"Keystroke",value:x0,change:A0||"",willCommit:!1,selStart:b0,selEnd:E0}})}),this._setEventListeners(a0,d0,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],p0=>p0.target.value)}if(h0&&a0.addEventListener("blur",h0),this.data.comb){const p0=(this.data.rect[2]-this.data.rect[0])/c0;a0.classList.add("comb"),a0.style.letterSpacing=`calc(${p0}px * var(--scale-factor) - 1ch)`}}else a0=document.createElement("div"),a0.textContent=this.data.fieldValue,a0.style.verticalAlign="middle",a0.style.display="table-cell",this.data.hasOwnCanvas&&(a0.hidden=!0);return this._setTextStyle(a0),this._setBackgroundColor(a0),this._setDefaultPropertiesFromJS(a0),this.container.append(a0),this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e0){super(e0,{isRenderable:!!e0.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e0){super(e0,{isRenderable:e0.renderForms})}render(){const e0=this.annotationStorage,n0=this.data,a0=n0.id;let i0=e0.getValue(a0,{value:n0.exportValue===n0.fieldValue}).value;typeof i0=="string"&&(i0=i0!=="Off",e0.setValue(a0,{value:i0})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s0=document.createElement("input");return GetElementsByNameSet.add(s0),s0.setAttribute("data-element-id",a0),s0.disabled=n0.readOnly,this._setRequired(s0,this.data.required),s0.type="checkbox",s0.name=n0.fieldName,i0&&s0.setAttribute("checked",!0),s0.setAttribute("exportValue",n0.exportValue),s0.tabIndex=DEFAULT_TAB_INDEX,s0.addEventListener("change",o0=>{const{name:l0,checked:c0}=o0.target;for(const u0 of this._getElementsByName(l0,a0)){const d0=c0&&u0.exportValue===n0.exportValue;u0.domElement&&(u0.domElement.checked=d0),e0.setValue(u0.id,{value:d0})}e0.setValue(a0,{value:c0})}),s0.addEventListener("resetform",o0=>{const l0=n0.defaultFieldValue||"Off";o0.target.checked=l0===n0.exportValue}),this.enableScripting&&this.hasJSActions&&(s0.addEventListener("updatefromsandbox",o0=>{const l0={value(c0){c0.target.checked=c0.detail.value!=="Off",e0.setValue(a0,{value:c0.target.checked})}};this._dispatchEventFromSandbox(l0,o0)}),this._setEventListeners(s0,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o0=>o0.target.checked)),this._setBackgroundColor(s0),this._setDefaultPropertiesFromJS(s0),this.container.append(s0),this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e0){super(e0,{isRenderable:e0.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e0=this.annotationStorage,n0=this.data,a0=n0.id;let i0=e0.getValue(a0,{value:n0.fieldValue===n0.buttonValue}).value;if(typeof i0=="string"&&(i0=i0!==n0.buttonValue,e0.setValue(a0,{value:i0})),i0)for(const o0 of this._getElementsByName(n0.fieldName,a0))e0.setValue(o0.id,{value:!1});const s0=document.createElement("input");if(GetElementsByNameSet.add(s0),s0.setAttribute("data-element-id",a0),s0.disabled=n0.readOnly,this._setRequired(s0,this.data.required),s0.type="radio",s0.name=n0.fieldName,i0&&s0.setAttribute("checked",!0),s0.tabIndex=DEFAULT_TAB_INDEX,s0.addEventListener("change",o0=>{const{name:l0,checked:c0}=o0.target;for(const u0 of this._getElementsByName(l0,a0))e0.setValue(u0.id,{value:!1});e0.setValue(a0,{value:c0})}),s0.addEventListener("resetform",o0=>{const l0=n0.defaultFieldValue;o0.target.checked=l0!=null&&l0===n0.buttonValue}),this.enableScripting&&this.hasJSActions){const o0=n0.buttonValue;s0.addEventListener("updatefromsandbox",l0=>{const c0={value:u0=>{const d0=o0===u0.detail.value;for(const h0 of this._getElementsByName(u0.target.name)){const f0=d0&&h0.id===a0;h0.domElement&&(h0.domElement.checked=f0),e0.setValue(h0.id,{value:f0})}}};this._dispatchEventFromSandbox(c0,l0)}),this._setEventListeners(s0,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],l0=>l0.target.checked)}
732return this._setBackgroundColor(s0),this._setDefaultPropertiesFromJS(s0),this.container.append(s0),this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(e0){super(e0,{ignoreBorder:e0.data.hasAppearance})}render(){const e0=super.render();e0.classList.add("buttonWidgetAnnotation","pushButton");const n0=e0.lastChild;return this.enableScripting&&this.hasJSActions&&n0&&(this._setDefaultPropertiesFromJS(n0),n0.addEventListener("updatefromsandbox",a0=>{this._dispatchEventFromSandbox({},a0)})),e0}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(e0){super(e0,{isRenderable:e0.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e0=this.annotationStorage,n0=this.data.id,a0=e0.getValue(n0,{value:this.data.fieldValue}),i0=document.createElement("select");GetElementsByNameSet.add(i0),i0.setAttribute("data-element-id",n0),i0.disabled=this.data.readOnly,this._setRequired(i0,this.data.required),i0.name=this.data.fieldName,i0.tabIndex=DEFAULT_TAB_INDEX;let s0=this.data.combo&&this.data.options.length>0;this.data.combo||(i0.size=this.data.options.length,this.data.multiSelect&&(i0.multiple=!0)),i0.addEventListener("resetform",d0=>{const h0=this.data.defaultFieldValue;for(const f0 of i0.options)f0.selected=f0.value===h0});for(const d0 of this.data.options){const h0=document.createElement("option");h0.textContent=d0.displayValue,h0.value=d0.exportValue,a0.value.includes(d0.exportValue)&&(h0.setAttribute("selected",!0),s0=!1),i0.append(h0)}let o0=null;if(s0){const d0=document.createElement("option");d0.value=" ",d0.setAttribute("hidden",!0),d0.setAttribute("selected",!0),i0.prepend(d0),o0=()=>{d0.remove(),i0.removeEventListener("input",o0),o0=null},i0.addEventListener("input",o0)}const l0=d0=>{const h0=d0?"value":"textContent",{options:f0,multiple:p0}=i0;return p0?Array.prototype.filter.call(f0,A0=>A0.selected).map(A0=>A0[h0]):f0.selectedIndex===-1?null:f0[f0.selectedIndex][h0]};let c0=l0(!1);const u0=d0=>{const h0=d0.target.options;return Array.prototype.map.call(h0,f0=>({displayValue:f0.textContent,exportValue:f0.value}))};return this.enableScripting&&this.hasJSActions?(i0.addEventListener("updatefromsandbox",d0=>{const h0={value(f0){o0==null||o0();const p0=f0.detail.value,A0=new Set(Array.isArray(p0)?p0:[p0]);for(const m0 of i0.options)m0.selected=A0.has(m0.value);e0.setValue(n0,{value:l0(!0)}),c0=l0(!1)},multipleSelection(f0){i0.multiple=!0},remove(f0){const p0=i0.options,A0=f0.detail.remove;p0[A0].selected=!1,i0.remove(A0),p0.length>0&&Array.prototype.findIndex.call(p0,x0=>x0.selected)===-1&&(p0[0].selected=!0),e0.setValue(n0,{value:l0(!0),items:u0(f0)}),c0=l0(!1)},clear(f0){for(;i0.length!==0;)i0.remove(0);e0.setValue(n0,{value:null,items:[]}),c0=l0(!1)},insert(f0){const{index:p0,displayValue:A0,exportValue:m0}=f0.detail.insert,x0=i0.children[p0],g0=document.createElement("option");g0.textContent=A0,g0.value=m0,x0?x0.before(g0):i0.append(g0),e0.setValue(n0,{value:l0(!0),items:u0(f0)}),c0=l0(!1)},items(f0){const{items:p0}=f0.detail;for(;i0.length!==0;)i0.remove(0);for(const A0 of p0){const{displayValue:m0,exportValue:x0}=A0,g0=document.createElement("option");g0.textContent=m0,g0.value=x0,i0.append(g0)}i0.options.length>0&&(i0.options[0].selected=!0),e0.setValue(n0,{value:l0(!0),items:u0(f0)}),c0=l0(!1)},indices(f0){const p0=new Set(f0.detail.indices);for(const A0 of f0.target.options)A0.selected=p0.has(A0.index);e0.setValue(n0,{value:l0(!0)}),c0=l0(!1)},editable(f0){f0.target.disabled=!f0.detail.editable}};this._dispatchEventFromSandbox(h0,d0)}),i0.addEventListener("input",d0=>{var p0;const h0=l0(!0),f0=l0(!1);e0.setValue(n0,{value:h0}),d0.preventDefault(),(p0=this.linkService.eventBus)==null||p0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n0,name:"Keystroke",value:c0,change:f0,changeEx:h0,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i0,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],d0=>d0.target.value)):i0.addEventListener("input",function(d0){e0.setValue(n0,{value:l0(!0)})}
732),this.data.combo&&this._setTextStyle(i0),this._setBackgroundColor(i0),this._setDefaultPropertiesFromJS(i0),this.container.append(i0),this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(e0){const{data:n0,elements:a0}=e0;super(e0,{isRenderable:AnnotationElement._hasPopupData(n0)}),this.elements=a0,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e0=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),n0=[];for(const a0 of this.elements)a0.popup=e0,a0.container.ariaHasPopup="dialog",n0.push(a0.data.id),a0.addHighlightArea();return this.container.setAttribute("aria-controls",n0.map(a0=>`${AnnotationPrefix}${a0}`).join(",")),this.container}}var AF,s3,o3,gF,GP,Q1,e$,xF,F4,U4,yF,t$,dR,r$,z4,n$,V4,HP,WP,D1,I2,L3,uz,dz,hz,fz,N2,j2,B3;class PopupElement{constructor({container:e0,color:n0,elements:a0,titleObj:i0,modificationDate:s0,contentsObj:o0,richText:l0,parent:c0,rect:u0,parentRect:d0,open:h0}){K0(this,D1);K0(this,AF,H0(this,D1,hz).bind(this));K0(this,s3,H0(this,D1,B3).bind(this));K0(this,o3,H0(this,D1,j2).bind(this));K0(this,gF,H0(this,D1,N2).bind(this));K0(this,GP,null);K0(this,Q1,null);K0(this,e$,null);K0(this,xF,null);K0(this,F4,null);K0(this,U4,null);K0(this,yF,null);K0(this,t$,!1);K0(this,dR,null);K0(this,r$,null);K0(this,z4,null);K0(this,n$,null);K0(this,V4,null);K0(this,HP,null);K0(this,WP,!1);var f0;V0(this,Q1,e0),V0(this,V4,i0),V0(this,e$,o0),V0(this,n$,l0),V0(this,U4,c0),V0(this,GP,n0),V0(this,z4,u0),V0(this,yF,d0),V0(this,F4,a0),V0(this,xF,PDFDateString.toDateObject(s0)),this.trigger=a0.flatMap(p0=>p0.getElementsToTriggerPopup());for(const p0 of this.trigger)p0.addEventListener("click",_0(this,gF)),p0.addEventListener("mouseenter",_0(this,o3)),p0.addEventListener("mouseleave",_0(this,s3)),p0.classList.add("popupTriggerArea");for(const p0 of a0)(f0=p0.container)==null||f0.addEventListener("keydown",_0(this,AF));_0(this,Q1).hidden=!0,h0&&H0(this,D1,N2).call(this)}render(){if(_0(this,dR))return;const e0=V0(this,dR,document.createElement("div"));if(e0.className="popup",_0(this,GP)){const s0=e0.style.outlineColor=Util.makeHexColor(..._0(this,GP));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?e0.style.backgroundColor=`color-mix(in srgb, ${s0} 30%, white)`:e0.style.backgroundColor=Util.makeHexColor(..._0(this,GP).map(l0=>Math.floor(.7*(255-l0)+l0)))}const n0=document.createElement("span");n0.className="header";const a0=document.createElement("h1");if(n0.append(a0),{dir:a0.dir,str:a0.textContent}=_0(this,V4),e0.append(n0),_0(this,xF)){const s0=document.createElement("span");s0.classList.add("popupDate"),s0.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s0.setAttribute("data-l10n-args",JSON.stringify({dateObj:_0(this,xF).valueOf()})),n0.append(s0)}const i0=_0(this,D1,I2);if(i0)XfaLayer.render({xfaHtml:i0,intent:"richText",div:e0}),e0.lastChild.classList.add("richText","popupContent");else{const s0=this._formatContents(_0(this,e$));e0.append(s0)}_0(this,Q1).append(e0)}_formatContents({str:e0,dir:n0}){const a0=document.createElement("p");a0.classList.add("popupContent"),a0.dir=n0;const i0=e0.split(/(?:\r\n?|\n)/);for(let s0=0,o0=i0.length;s0<o0;++s0){const l0=i0[s0];a0.append(document.createTextNode(l0)),s0<o0-1&&a0.append(document.createElement("br"))}return a0}updateEdited({rect:e0,popupContent:n0}){var a0;_0(this,HP)||V0(this,HP,{contentsObj:_0(this,e$),richText:_0(this,n$)}),e0&&V0(this,r$,null),n0&&(V0(this,n$,H0(this,D1,dz).call(this,n0)),V0(this,e$,null)),(a0=_0(this,dR))==null||a0.remove(),V0(this,dR,null)}resetEdited(){var e0;_0(this,HP)&&({contentsObj:o_(this,e$)._,richText:o_(this,n$)._}=_0(this,HP),V0(this,HP,null),(e0=_0(this,dR))==null||e0.remove(),V0(this,dR,null),V0(this,r$,null))}forceHide(){V0(this,WP,this.isVisible),_0(this,WP)&&(_0(this,Q1).hidden=!0)}maybeShow(){_0(this,WP)&&(_0(this,dR)||H0(this,D1,j2).call(this),V0(this,WP,!1),_0(this,Q1).hidden=!1)}get isVisible(){return _0(this,Q1).hidden===!1}}AF=new WeakMap,s3=new WeakMap,o3=new WeakMap,gF=new WeakMap,GP=new WeakMap,Q1=new WeakMap,e$=new WeakMap,xF=new WeakMap,F4=new WeakMap,U4=new WeakMap,yF=new WeakMap,t$=new WeakMap,dR=new WeakMap,r$=new WeakMap,z4=new WeakMap,n$=new WeakMap,V4=new WeakMap,HP=new WeakMap,WP=new WeakMap,D1=new WeakSet,I2=function(){const e0=_0(this,n$),n0=_0(this,e$);return e0!=null&&e0.str&&(!(n0!=null&&n0.str)||n0.str===e0.str)&&_0(this,n$).html||null},L3=function(){var e0,n0,a0;return((a0=(n0=(e0=_0(this,D1,I2))==null?void 0:e0.attributes)==null?void 0:n0.style)==null?void 0:a0.fontSize)||0},uz=function(){var e0,n0,a0;return((a0=(n0=(e0=_0(this,D1,I2))==null?void 0:e0.attributes)==null?void 0:n0.style)==null?void 0:a0.color)||null},dz=function(e0){const n0=[],a0={str:e0,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:n0}]}},i0={style:{color:_0(this,D1,uz),fontSize:_0(this,D1,L3)?`calc(${_0(this,D1,L3)}px * var(--scale-factor))`:""}};for(const s0 of e0.split(` 733`))n0.push({name:"span",value:s0,attributes:i0});return a0}
733,hz=function(e0){e0.altKey||e0.shiftKey||e0.ctrlKey||e0.metaKey||(e0.key==="Enter"||e0.key==="Escape"&&_0(this,t$))&&H0(this,D1,N2).call(this)},fz=function(){if(_0(this,r$)!==null)return;const{page:{view:e0},viewport:{rawDims:{pageWidth:n0,pageHeight:a0,pageX:i0,pageY:s0}}}=_0(this,U4);let o0=!!_0(this,yF),l0=o0?_0(this,yF):_0(this,z4);for(const A0 of _0(this,F4))if(!l0||Util.intersect(A0.data.rect,l0)!==null){l0=A0.data.rect,o0=!0;break}const c0=Util.normalizeRect([l0[0],e0[3]-l0[1]+e0[1],l0[2],e0[3]-l0[3]+e0[1]]),d0=o0?l0[2]-l0[0]+5:0,h0=c0[0]+d0,f0=c0[1];V0(this,r$,[100*(h0-i0)/n0,100*(f0-s0)/a0]);const{style:p0}=_0(this,Q1);p0.left=`${_0(this,r$)[0]}%`,p0.top=`${_0(this,r$)[1]}%`},N2=function(){V0(this,t$,!_0(this,t$)),_0(this,t$)?(H0(this,D1,j2).call(this),_0(this,Q1).addEventListener("click",_0(this,gF)),_0(this,Q1).addEventListener("keydown",_0(this,AF))):(H0(this,D1,B3).call(this),_0(this,Q1).removeEventListener("click",_0(this,gF)),_0(this,Q1).removeEventListener("keydown",_0(this,AF)))},j2=function(){_0(this,dR)||this.render(),this.isVisible?_0(this,t$)&&_0(this,Q1).classList.add("focused"):(H0(this,D1,fz).call(this),_0(this,Q1).hidden=!1,_0(this,Q1).style.zIndex=parseInt(_0(this,Q1).style.zIndex)+1e3)},B3=function(){_0(this,Q1).classList.remove("focused"),!(_0(this,t$)||!this.isVisible)&&(_0(this,Q1).hidden=!0,_0(this,Q1).style.zIndex=parseInt(_0(this,Q1).style.zIndex)-1e3)};class FreeTextAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e0.data.textContent,this.textPosition=e0.data.textPosition,this.annotationEditorType=AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e0=document.createElement("div");e0.classList.add("annotationTextContent"),e0.setAttribute("role","comment");for(const n0 of this.textContent){const a0=document.createElement("span");a0.textContent=n0,e0.append(a0)}this.container.append(e0)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var G4;class LineAnnotationElement extends AnnotationElement{constructor(n0){super(n0,{isRenderable:!0,ignoreBorder:!0});K0(this,G4,null)}render(){this.container.classList.add("lineAnnotation");const n0=this.data,{width:a0,height:i0}=getRectDims(n0.rect),s0=this.svgFactory.create(a0,i0,!0),o0=V0(this,G4,this.svgFactory.createElement("svg:line"));return o0.setAttribute("x1",n0.rect[2]-n0.lineCoordinates[0]),o0.setAttribute("y1",n0.rect[3]-n0.lineCoordinates[1]),o0.setAttribute("x2",n0.rect[2]-n0.lineCoordinates[2]),o0.setAttribute("y2",n0.rect[3]-n0.lineCoordinates[3]),o0.setAttribute("stroke-width",n0.borderStyle.width||1),o0.setAttribute("stroke","transparent"),o0.setAttribute("fill","transparent"),s0.append(o0),this.container.append(s0),!n0.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _0(this,G4)}addHighlightArea(){this.container.classList.add("highlightArea")}}G4=new WeakMap;var H4;class SquareAnnotationElement extends AnnotationElement{constructor(n0){super(n0,{isRenderable:!0,ignoreBorder:!0});K0(this,H4,null)}render(){this.container.classList.add("squareAnnotation");const n0=this.data,{width:a0,height:i0}=getRectDims(n0.rect),s0=this.svgFactory.create(a0,i0,!0),o0=n0.borderStyle.width,l0=V0(this,H4,this.svgFactory.createElement("svg:rect"));return l0.setAttribute("x",o0/2),l0.setAttribute("y",o0/2),l0.setAttribute("width",a0-o0),l0.setAttribute("height",i0-o0),l0.setAttribute("stroke-width",o0||1),l0.setAttribute("stroke","transparent"),l0.setAttribute("fill","transparent"),s0.append(l0),this.container.append(s0),!n0.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _0(this,H4)}addHighlightArea(){this.container.classList.add("highlightArea")}}H4=new WeakMap;var W4;class CircleAnnotationElement extends AnnotationElement{constructor(n0){super(n0,{isRenderable:!0,ignoreBorder:!0});K0(this,W4,null)}render(){this.container.classList.add("circleAnnotation");const n0=this.data,{width:a0,height:i0}=getRectDims(n0.rect),s0=this.svgFactory.create(a0,i0,!0),o0=n0.borderStyle.width,l0=V0(this,W4,this.svgFactory.createElement("svg:ellipse"));return l0.setAttribute("cx",a0/2),l0.setAttribute("cy",i0/2),l0.setAttribute("rx",a0/2-o0/2),l0.setAttribute("ry",i0/2-o0/2),l0.setAttribute("stroke-width",o0||
7331),l0.setAttribute("stroke","transparent"),l0.setAttribute("fill","transparent"),s0.append(l0),this.container.append(s0),!n0.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _0(this,W4)}addHighlightArea(){this.container.classList.add("highlightArea")}}W4=new WeakMap;var K4;class PolylineAnnotationElement extends AnnotationElement{constructor(n0){super(n0,{isRenderable:!0,ignoreBorder:!0});K0(this,K4,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:n0,vertices:a0,borderStyle:i0,popupRef:s0}}=this;if(!a0)return this.container;const{width:o0,height:l0}=getRectDims(n0),c0=this.svgFactory.create(o0,l0,!0);let u0=[];for(let h0=0,f0=a0.length;h0<f0;h0+=2){const p0=a0[h0]-n0[0],A0=n0[3]-a0[h0+1];u0.push(`${p0},${A0}`)}u0=u0.join(" ");const d0=V0(this,K4,this.svgFactory.createElement(this.svgElementName));return d0.setAttribute("points",u0),d0.setAttribute("stroke-width",i0.width||1),d0.setAttribute("stroke","transparent"),d0.setAttribute("fill","transparent"),c0.append(d0),this.container.append(c0),!s0&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return _0(this,K4)}addHighlightArea(){this.container.classList.add("highlightArea")}}K4=new WeakMap;class PolygonAnnotationElement extends PolylineAnnotationElement{constructor(e0){super(e0),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class CaretAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}var Q4;class InkAnnotationElement extends AnnotationElement{constructor(n0){super(n0,{isRenderable:!0,ignoreBorder:!0});K0(this,Q4,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?AnnotationEditorType.HIGHLIGHT:AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:n0,inkLists:a0,borderStyle:i0,popupRef:s0}}=this,{width:o0,height:l0}=getRectDims(n0),c0=this.svgFactory.create(o0,l0,!0);for(const u0 of a0){let d0=[];for(let f0=0,p0=u0.length;f0<p0;f0+=2){const A0=u0[f0]-n0[0],m0=n0[3]-u0[f0+1];d0.push(`${A0},${m0}`)}d0=d0.join(" ");const h0=this.svgFactory.createElement(this.svgElementName);_0(this,Q4).push(h0),h0.setAttribute("points",d0),h0.setAttribute("stroke-width",i0.width||1),h0.setAttribute("stroke","transparent"),h0.setAttribute("fill","transparent"),c0.append(h0)}return!s0&&this.hasPopupData&&this._createPopup(),this.container.append(c0),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return _0(this,Q4)}addHighlightArea(){this.container.classList.add("highlightArea")}}Q4=new WeakMap;class HighlightAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=AnnotationEditorType.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class UnderlineAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class SquigglyAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class StrikeOutAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("str
733ikeoutAnnotation"),this.container}}class StampAnnotationElement extends AnnotationElement{constructor(e0){super(e0,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=AnnotationEditorType.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var q4,Y4,F3;class FileAttachmentAnnotationElement extends AnnotationElement{constructor(n0){var i0;super(n0,{isRenderable:!0});K0(this,Y4);K0(this,q4,null);const{file:a0}=this.data;this.filename=a0.filename,this.content=a0.content,(i0=this.linkService.eventBus)==null||i0.dispatch("fileattachmentannotation",{source:this,...a0})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:n0,data:a0}=this;let i0;a0.hasAppearance||a0.fillAlpha===0?i0=document.createElement("div"):(i0=document.createElement("img"),i0.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(a0.name)?"paperclip":"pushpin"}.svg`,a0.fillAlpha&&a0.fillAlpha<1&&(i0.style=`filter: opacity(${Math.round(a0.fillAlpha*100)}%);`)),i0.addEventListener("dblclick",H0(this,Y4,F3).bind(this)),V0(this,q4,i0);const{isMac:s0}=util_FeatureTest.platform;return n0.addEventListener("keydown",o0=>{o0.key==="Enter"&&(s0?o0.metaKey:o0.ctrlKey)&&H0(this,Y4,F3).call(this)}),!a0.popupRef&&this.hasPopupData?this._createPopup():i0.classList.add("popupTriggerArea"),n0.append(i0),n0}getElementsToTriggerPopup(){return _0(this,q4)}addHighlightArea(){this.container.classList.add("highlightArea")}}q4=new WeakMap,Y4=new WeakSet,F3=function(){var n0;(n0=this.downloadManager)==null||n0.openOrDownloadData(this.content,this.filename)};var X4,KP,QP,J4,vL,pz,U3;class AnnotationLayer{constructor({div:e0,accessibilityManager:n0,annotationCanvasMap:a0,annotationEditorUIManager:i0,page:s0,viewport:o0,structTreeLayer:l0}){K0(this,vL);K0(this,X4,null);K0(this,KP,null);K0(this,QP,new Map);K0(this,J4,null);this.div=e0,V0(this,X4,n0),V0(this,KP,a0),V0(this,J4,l0||null),this.page=s0,this.viewport=o0,this.zIndex=0,this._annotationEditorUIManager=i0}hasEditableAnnotations(){return _0(this,QP).size>0}async render(e0){var o0;const{annotations:n0}=e0,a0=this.div;setLayerDimensions(a0,this.viewport);const i0=new Map,s0={data:null,layer:a0,linkService:e0.linkService,downloadManager:e0.downloadManager,imageResourcesPath:e0.imageResourcesPath||"",renderForms:e0.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:e0.annotationStorage||new AnnotationStorage,enableScripting:e0.enableScripting===!0,hasJSActions:e0.hasJSActions,fieldObjects:e0.fieldObjects,parent:this,elements:null};for(const l0 of n0){if(l0.noHTML)continue;const c0=l0.annotationType===AnnotationType.POPUP;if(c0){const h0=i0.get(l0.id);if(!h0)continue;s0.elements=h0}else{const{width:h0,height:f0}=getRectDims(l0.rect);if(h0<=0||f0<=0)continue}s0.data=l0;const u0=AnnotationElementFactory.create(s0);if(!u0.isRenderable)continue;if(!c0&&l0.popupRef){const h0=i0.get(l0.popupRef);h0?h0.push(u0):i0.set(l0.popupRef,[u0])}const d0=u0.render();l0.hidden&&(d0.style.visibility="hidden"),await H0(this,vL,pz).call(this,d0,l0.id),u0._isEditable&&(_0(this,QP).set(u0.data.id,u0),(o0=this._annotationEditorUIManager)==null||o0.renderAnnotationElement(u0))}H0(this,vL,U3).call(this)}update({viewport:e0}){const n0=this.div;this.viewport=e0,setLayerDimensions(n0,{rotation:e0.rotation}),H0(this,vL,U3).call(this),n0.hidden=!1}getEditableAnnotations(){return Array.from(_0(this,QP).values())}getEditableAnnotation(e0){return _0(this,QP).get(e0)}}X4=new WeakMap,KP=new WeakMap,QP=new WeakMap,J4=new WeakMap,vL=new WeakSet,pz=async function(e0,n0){var o0,l0;const a0=e0.firstChild||e0,i0=a0.id=`${AnnotationPrefix}${n0}`,s0=await((o0=_0(this,J4))==null?void 0:o0.getAriaAttributes(i0));if(s0)for(const[c0,u0]of s0)a0.setAttribute(c0,u0);this.div.append(e0),(l0=_0(this,X4))==null||l0.moveElementInDOM(this.div,e0,a0,!1)},U3=function(){if(!_0(this,KP))return;const e0=this.div;for(const[n0,a0]of _0(this,KP)){const i0=e0.querySelector(`[data-annotation-id="${n0}"]`);if(!i0)continue;a0.className="annotationContent";const{firstChild:s0}=i0;s0?s0.nodeName==="CANVAS"?s0.replaceWith(a0):s0.classList.contains("annotationContent")?s0.after(a0):s0.before(a0):i0.append(a0)}_0(this,KP).clear()};const EOL_PATTERN=/\r\n?|\n/g;var hR,B_,Z4,qP,F_,Z1,mz,Az,gz,$2,m$,P2,M2,xz,z3,yz;const F1=class F1 extends AnnotationEditor{constructor(n0){super({...n0,name:"freeTextEditor"});K0(this,Z1);K0(this,hR);K0(this,B_,"");K0(this,Z4,`${this.id}-editor`);K0(this,qP,null);K0(this,F_);
733V0(this,hR,n0.color||F1._defaultColor||AnnotationEditor._defaultLineColor),V0(this,F_,n0.fontSize||F1._defaultFontSize)}static get _keyboardManager(){const n0=F1.prototype,a0=o0=>o0.isEmpty(),i0=AnnotationEditorUIManager.TRANSLATE_SMALL,s0=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],n0.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],n0.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],n0._translateEmpty,{args:[-i0,0],checker:a0}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],n0._translateEmpty,{args:[-s0,0],checker:a0}],[["ArrowRight","mac+ArrowRight"],n0._translateEmpty,{args:[i0,0],checker:a0}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],n0._translateEmpty,{args:[s0,0],checker:a0}],[["ArrowUp","mac+ArrowUp"],n0._translateEmpty,{args:[0,-i0],checker:a0}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],n0._translateEmpty,{args:[0,-s0],checker:a0}],[["ArrowDown","mac+ArrowDown"],n0._translateEmpty,{args:[0,i0],checker:a0}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],n0._translateEmpty,{args:[0,s0],checker:a0}]]))}static initialize(n0,a0){AnnotationEditor.initialize(n0,a0);const i0=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i0.getPropertyValue("--freetext-padding"))}static updateDefaultParams(n0,a0){switch(n0){case AnnotationEditorParamsType.FREETEXT_SIZE:F1._defaultFontSize=a0;break;case AnnotationEditorParamsType.FREETEXT_COLOR:F1._defaultColor=a0;break}}updateParams(n0,a0){switch(n0){case AnnotationEditorParamsType.FREETEXT_SIZE:H0(this,Z1,mz).call(this,a0);break;case AnnotationEditorParamsType.FREETEXT_COLOR:H0(this,Z1,Az).call(this,a0);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,F1._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,F1._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,_0(this,F_)],[AnnotationEditorParamsType.FREETEXT_COLOR,_0(this,hR)]]}_translateEmpty(n0,a0){this._uiManager.translateSelectedEditors(n0,a0,!0)}getInitialTranslation(){const n0=this.parentScale;return[-F1._internalPadding*n0,-(F1._internalPadding+_0(this,F_))*n0]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),V0(this,qP,new AbortController);const n0=this._uiManager.combinedSignal(_0(this,qP));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:n0}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:n0}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:n0}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:n0}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:n0})}disableEditMode(){var n0;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",_0(this,Z4)),this._isDraggable=!0,(n0=_0(this,qP))==null||n0.abort(),V0(this,qP,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(n0){this._focusEventsAllowed&&(super.focusin(n0),n0.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var n0;this.width||(this.enableEditMode(),this.editorDiv.focus(),(n0=this._initialOptions)!=null&&n0.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const n0=_0(this,B_),a0=V0(this,B_,H0(this,Z1,gz).call(this).trimEnd());if(n0===a0)return;const i0=s0=>{if(V0(this,B_,s0),!s0){this.remove();return}H0(this,Z1,M2).call(this),this._uiManager.rebuild(this),H0(this,Z1,$2).call(this)};this.addCommands({cmd:()=>{i0(a0)},undo:()=>{i0(n0)},mustExec:!1}),H0(this,Z1,$2).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(n0){this.enterInEditMode()}keydown(n0){n0.target===this.div&&n0.key==="Enter"&&(this.enterInEditMode(),n0.preventDefault())}editorDivKeydown(n0){F1._keyboardManager.exec(this,n0)}editorDivFocus(n0){this.isEditing=!0}editorDivBlur(n0){this.isEditing=!1}editorDivInput(n0){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}
vendor: 5,362 bytes, lines 733-739
733render(){if(this.div)return this.div;let n0,a0;this.width&&(n0=this.x,a0=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",_0(this,Z4)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i0}=this.editorDiv;if(i0.fontSize=`calc(${_0(this,F_)}px * var(--scale-factor))`,i0.color=_0(this,hR),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),bindEvents(this,this.div,["dblclick","keydown"]),this.width){const[s0,o0]=this.parentDimensions;if(this.annotationElementId){const{position:l0}=this._initialData;let[c0,u0]=this.getInitialTranslation();[c0,u0]=this.pageTranslationToScreen(c0,u0);const[d0,h0]=this.pageDimensions,[f0,p0]=this.pageTranslation;let A0,m0;switch(this.rotation){case 0:A0=n0+(l0[0]-f0)/d0,m0=a0+this.height-(l0[1]-p0)/h0;break;case 90:A0=n0+(l0[0]-f0)/d0,m0=a0-(l0[1]-p0)/h0,[c0,u0]=[u0,-c0];break;case 180:A0=n0-this.width+(l0[0]-f0)/d0,m0=a0-(l0[1]-p0)/h0,[c0,u0]=[-c0,-u0];break;case 270:A0=n0+(l0[0]-f0-this.height*h0)/d0,m0=a0+(l0[1]-p0-this.width*d0)/h0,[c0,u0]=[-u0,c0];break}this.setAt(A0*s0,m0*o0,c0,u0)}else this.setAt(n0*s0,a0*o0,this.width*s0,this.height*o0);H0(this,Z1,M2).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(n0){var A0,m0,x0;const a0=n0.clipboardData||window.clipboardData,{types:i0}=a0;if(i0.length===1&&i0[0]==="text/plain")return;n0.preventDefault();const s0=H0(A0=F1,m$,z3).call(A0,a0.getData("text")||"").replaceAll(EOL_PATTERN,` 734`);if(!s0)return;const o0=window.getSelection();if(!o0.rangeCount)return;this.editorDiv.normalize(),o0.deleteFromDocument();const l0=o0.getRangeAt(0);if(!s0.includes(` 735`)){l0.insertNode(document.createTextNode(s0)),this.editorDiv.normalize(),o0.collapseToStart();return}const{startContainer:c0,startOffset:u0}=l0,d0=[],h0=[];if(c0.nodeType===Node.TEXT_NODE){const g0=c0.parentElement;if(h0.push(c0.nodeValue.slice(u0).replaceAll(EOL_PATTERN,"")),g0!==this.editorDiv){let y0=d0;for(const b0 of this.editorDiv.childNodes){if(b0===g0){y0=h0;continue}y0.push(H0(m0=F1,m$,P2).call(m0,b0))}}d0.push(c0.nodeValue.slice(0,u0).replaceAll(EOL_PATTERN,""))}else if(c0===this.editorDiv){let g0=d0,y0=0;for(const b0 of this.editorDiv.childNodes)y0++===u0&&(g0=h0),g0.push(H0(x0=F1,m$,P2).call(x0,b0))}V0(this,B_,`${d0.join(` 736`)}${s0}${h0.join(` 737`)}`),H0(this,Z1,M2).call(this);const f0=new Range;let p0=d0.reduce((g0,y0)=>g0+y0.length,0);for(const{firstChild:g0}of this.editorDiv.childNodes)if(g0.nodeType===Node.TEXT_NODE){const y0=g0.nodeValue.length;if(p0<=y0){f0.setStart(g0,p0),f0.setEnd(g0,p0);break}p0-=y0}o0.removeAllRanges(),o0.addRange(f0)}get contentDiv(){return this.editorDiv}static async deserialize(n0,a0,i0){var l0;let s0=null;if(n0 instanceof FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:c0,fontColor:u0},rect:d0,rotation:h0,id:f0,popupRef:p0},textContent:A0,textPosition:m0,parent:{page:{pageNumber:x0}}}=n0;if(!A0||A0.length===0)return null;s0=n0={annotationType:AnnotationEditorType.FREETEXT,color:Array.from(u0),fontSize:c0,value:A0.join(` 738`),position:m0,pageIndex:x0-1,rect:d0.slice(0),rotation:h0,id:f0,deleted:!1,popupRef:p0}}const o0=await super.deserialize(n0,a0,i0);return V0(o0,F_,n0.fontSize),V0(o0,hR,Util.makeHexColor(...n0.color)),V0(o0,B_,H0(l0=F1,m$,z3).call(l0,n0.value)),o0.annotationElementId=n0.id||null,o0._initialData=s0,o0}serialize(n0=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const a0=F1._internalPadding*this.parentScale,i0=this.getRect(a0,a0),s0=AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_0(this,hR)),o0={annotationType:AnnotationEditorType.FREETEXT,color:s0,fontSize:_0(this,F_),value:H0(this,Z1,xz).call(this),pageIndex:this.pageIndex,rect:i0,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return n0?o0:this.annotationElementId&&!H0(this,Z1,yz).call(this,o0)?null:(o0.id=this.annotationElementId,o0)}renderAnnotationElement(n0){const a0=super.renderAnnotationElement(n0);if(this.deleted)return a0;const{style:i0}=a0;i0.fontSize=`calc(${_0(this,F_)}px * var(--scale-factor))`,i0.color=_0(this,hR),a0.replaceChildren();for(const o0 of _0(this,B_).split(` 739`)){const l0=document.createElement("div");l0.append(o0?document.createTextNode(o0):document.createElement("br")),a0.append(l0)}const s0=F1._internalPadding*this.parentScale;return n0.updateEdited({rect:this.getRect(s0,s0),popupContent:_0(this,B_)}),a0}resetAnnotationElement(n0){super.resetAnnotationElement(n0),n0.resetEdited()}};hR=new WeakMap,B_=new WeakMap,Z4=new WeakMap,qP=new WeakMap,F_=new WeakMap,Z1=new WeakSet,mz=function(n0){const a0=s0=>{this.editorDiv.style.fontSize=`calc(${s0}px * var(--scale-factor))`,this.translate(0,-(s0-_0(this,F_))*this.parentScale),V0(this,F_,s0),H0(this,Z1,$2).call(this)},i0=_0(this,F_);this.addCommands({cmd:a0.bind(this,n0),undo:a0.bind(this,i0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_S
739IZE,overwriteIfSameType:!0,keepUndo:!0})},Az=function(n0){const a0=s0=>{V0(this,hR,this.editorDiv.style.color=s0)},i0=_0(this,hR);this.addCommands({cmd:a0.bind(this,n0),undo:a0.bind(this,i0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},gz=function(){var i0;const n0=[];this.editorDiv.normalize();let a0=null;for(const s0 of this.editorDiv.childNodes)(a0==null?void 0:a0.nodeType)===Node.TEXT_NODE&&s0.nodeName==="BR"||(n0.push(H0(i0=F1,m$,P2).call(i0,s0)),a0=s0);return n0.join(` 740`)},$2=function(){const[n0,a0]=this.parentDimensions;let i0;if(this.isAttachedToDOM)i0=this.div.getBoundingClientRect();else{const{currentLayer:s0,div:o0}=this,l0=o0.style.display,c0=o0.classList.contains("hidden");o0.classList.remove("hidden"),o0.style.display="hidden",s0.div.append(this.div),i0=o0.getBoundingClientRect(),o0.remove(),o0.style.display=l0,o0.classList.toggle("hidden",c0)}this.rotation%180===this.parentRotation%180?(this.width=i0.width/n0,this.height=i0.height/a0):(this.width=i0.height/n0,this.height=i0.width/a0),this.fixAndSetPosition()},m$=new WeakSet,P2=function(n0){return(n0.nodeType===Node.TEXT_NODE?n0.nodeValue:n0.innerText).replaceAll(EOL_PATTERN,"")},M2=function(){if(this.editorDiv.replaceChildren(),!!_0(this,B_))for(const n0 of _0(this,B_).split(` 741`)){const a0=document.createElement("div");a0.append(n0?document.createTextNode(n0):document.createElement("br")),this.editorDiv.append(a0)}},xz=function(){return _0(this,B_).replaceAll("Â "," ")},z3=function(n0){return n0.replaceAll(" ","Â ")},yz=function(n0){const{value:a0,fontSize:i0,color:s0,pageIndex:o0}=this._initialData;return this._hasBeenMoved||n0.value!==a0||n0.fontSize!==i0||n0.color.some((l0,c0)=>l0!==s0[c0])||n0.pageIndex!==o0},K0(F1,m$),Gw(F1,"_freeTextDefaultContent",""),Gw(F1,"_internalPadding",0),Gw(F1,"_defaultColor",null),Gw(F1,"_defaultFontSize",10),Gw(F1,"_type","freetext"),Gw(F1,"_editorType",AnnotationEditorType.FREETEXT);let FreeTextEditor=F1;class Outline{toSVGPath(){unreachable("Abstract method `toSVGPath` must be implemented.")}get box(){unreachable("Abstract getter `box` must be implemented.")}serialize(e0,n0){unreachable("Abstract method `serialize` must be implemented.")}get classNamesForDrawing(){unreachable("Abstract getter `classNamesForDrawing` must be implemented.")}get classNamesForOutlining(){unreachable("Abstract getter `classNamesForOutlining` must be implemented.")}get mustRemoveSelfIntersections(){return!1}}var U_,fR,bF,vF,OR,v1,YP,XP,t2,r2,EF,wF,G$,n2,l3,c3,s_,WF,bz,vz,Ez,wz,Sz,_z;const GR=class GR{constructor({x:e0,y:n0},a0,i0,s0,o0,l0=0){K0(this,s_);K0(this,U_);K0(this,fR,[]);K0(this,bF);K0(this,vF);K0(this,OR,[]);K0(this,v1,new Float64Array(18));K0(this,YP);K0(this,XP);K0(this,t2);K0(this,r2);K0(this,EF);K0(this,wF);K0(this,G$,[]);V0(this,U_,a0),V0(this,wF,s0*i0),V0(this,vF,o0),_0(this,v1).set([NaN,NaN,NaN,NaN,e0,n0],6),V0(this,bF,l0),V0(this,r2,_0(GR,n2)*i0),V0(this,t2,_0(GR,c3)*i0),V0(this,EF,i0),_0(this,G$).push(e0,n0)}isEmpty(){return isNaN(_0(this,v1)[8])}add({x:e0,y:n0}){var R0;V0(this,YP,e0),V0(this,XP,n0);const[a0,i0,s0,o0]=_0(this,U_);let[l0,c0,u0,d0]=_0(this,v1).subarray(8,12);const h0=e0-u0,f0=n0-d0,p0=Math.hypot(h0,f0);if(p0<_0(this,t2))return!1;const A0=p0-_0(this,r2),m0=A0/p0,x0=m0*h0,g0=m0*f0;let y0=l0,b0=c0;l0=u0,c0=d0,u0+=x0,d0+=g0,(R0=_0(this,G$))==null||R0.push(e0,n0);const E0=-g0/A0,w0=x0/A0,v0=E0*_0(this,wF),S0=w0*_0(this,wF);return _0(this,v1).set(_0(this,v1).subarray(2,8),0),_0(this,v1).set([u0+v0,d0+S0],4),_0(this,v1).set(_0(this,v1).subarray(14,18),12),_0(this,v1).set([u0-v0,d0-S0],16),isNaN(_0(this,v1)[6])?(_0(this,OR).length===0&&(_0(this,v1).set([l0+v0,c0+S0],2),_0(this,OR).push(NaN,NaN,NaN,NaN,(l0+v0-a0)/s0,(c0+S0-i0)/o0),_0(this,v1).set([l0-v0,c0-S0],14),_0(this,fR).push(NaN,NaN,NaN,NaN,(l0-v0-a0)/s0,(c0-S0-i0)/o0)),_0(this,v1).set([y0,b0,l0,c0,u0,d0],6),!this.isEmpty()):(_0(this,v1).set([y0,b0,l0,c0,u0,d0],6),Math.abs(Math.atan2(b0-c0,y0-l0)-Math.atan2(g0,x0))<Math.PI/2?([l0,c0,u0,d0]=_0(this,v1).subarray(2,6),_0(this,OR).push(NaN,NaN,NaN,NaN,((l0+u0)/2-a0)/s0,((c0+d0)/2-i0)/o0),[l0,c0,y0,b0]=_0(this,v1).subarray(14,18),_0(this,fR).push(NaN,NaN,NaN,NaN,((y0+l0)/2-a0)/s0,((b0+c0)/2-i0)/o0),!0):([y0,b0,l0,c0,u0,d0]=_0(this,v1).subarray(0,6),_0(this,OR).push(((y0+5*l0)/6-a0)/s0,((b0+5*c0)/6-i0)/o0,((5*l0+u0)/6-a0)/s0,((5*c0+d0)/6-i0)/o0,((l0+u0)/2-a0)/s0,((c0+d0)/2-i0)/o0),[u0,d0,l0,c0,y0,b0]=_0(this,v1).subarray(12,18),_0(this,fR).push(((y0+5*l0)/6-a0)/s0,((b0+5*c0)/6-i0)/o0,((5*l0+u0)/6-a0)/s0,((5*c0+d0)/6-i0)/o0,((l0+u0)/2-a0)/s0,((c0+d0)/2-i0)/o0),!0))}toSVGPath(){if(this.isEmpty())return"";const e0=_0(this,OR),n0=_0(this,fR);if(isNaN(_0(this,v1)[6])&&!this.isEmpty())return H0(this,s_,bz).call(this);const a0=[];a0.push(`M${e0[4]} ${e0[5]}`);for(let i0=6;i0<e0.length;
741i0+=6)isNaN(e0[i0])?a0.push(`L${e0[i0+4]} ${e0[i0+5]}`):a0.push(`C${e0[i0]} ${e0[i0+1]} ${e0[i0+2]} ${e0[i0+3]} ${e0[i0+4]} ${e0[i0+5]}`);H0(this,s_,Ez).call(this,a0);for(let i0=n0.length-6;i0>=6;i0-=6)isNaN(n0[i0])?a0.push(`L${n0[i0+4]} ${n0[i0+5]}`):a0.push(`C${n0[i0]} ${n0[i0+1]} ${n0[i0+2]} ${n0[i0+3]} ${n0[i0+4]} ${n0[i0+5]}`);return H0(this,s_,vz).call(this,a0),a0.join(" ")}newFreeDrawOutline(e0,n0,a0,i0,s0,o0){return new FreeDrawOutline(e0,n0,a0,i0,s0,o0)}getOutlines(){var h0;const e0=_0(this,OR),n0=_0(this,fR),a0=_0(this,v1),[i0,s0,o0,l0]=_0(this,U_),c0=new Float64Array((((h0=_0(this,G$))==null?void 0:h0.length)??0)+2);for(let f0=0,p0=c0.length-2;f0<p0;f0+=2)c0[f0]=(_0(this,G$)[f0]-i0)/o0,c0[f0+1]=(_0(this,G$)[f0+1]-s0)/l0;if(c0[c0.length-2]=(_0(this,YP)-i0)/o0,c0[c0.length-1]=(_0(this,XP)-s0)/l0,isNaN(a0[6])&&!this.isEmpty())return H0(this,s_,wz).call(this,c0);const u0=new Float64Array(_0(this,OR).length+24+_0(this,fR).length);let d0=e0.length;for(let f0=0;f0<d0;f0+=2){if(isNaN(e0[f0])){u0[f0]=u0[f0+1]=NaN;continue}u0[f0]=e0[f0],u0[f0+1]=e0[f0+1]}d0=H0(this,s_,_z).call(this,u0,d0);for(let f0=n0.length-6;f0>=6;f0-=6)for(let p0=0;p0<6;p0+=2){if(isNaN(n0[f0+p0])){u0[d0]=u0[d0+1]=NaN,d0+=2;continue}u0[d0]=n0[f0+p0],u0[d0+1]=n0[f0+p0+1],d0+=2}return H0(this,s_,Sz).call(this,u0,d0),this.newFreeDrawOutline(u0,c0,_0(this,U_),_0(this,EF),_0(this,bF),_0(this,vF))}};U_=new WeakMap,fR=new WeakMap,bF=new WeakMap,vF=new WeakMap,OR=new WeakMap,v1=new WeakMap,YP=new WeakMap,XP=new WeakMap,t2=new WeakMap,r2=new WeakMap,EF=new WeakMap,wF=new WeakMap,G$=new WeakMap,n2=new WeakMap,l3=new WeakMap,c3=new WeakMap,s_=new WeakSet,WF=function(){const e0=_0(this,v1).subarray(4,6),n0=_0(this,v1).subarray(16,18),[a0,i0,s0,o0]=_0(this,U_);return[(_0(this,YP)+(e0[0]-n0[0])/2-a0)/s0,(_0(this,XP)+(e0[1]-n0[1])/2-i0)/o0,(_0(this,YP)+(n0[0]-e0[0])/2-a0)/s0,(_0(this,XP)+(n0[1]-e0[1])/2-i0)/o0]},bz=function(){const[e0,n0,a0,i0]=_0(this,U_),[s0,o0,l0,c0]=H0(this,s_,WF).call(this);return`M${(_0(this,v1)[2]-e0)/a0} ${(_0(this,v1)[3]-n0)/i0} L${(_0(this,v1)[4]-e0)/a0} ${(_0(this,v1)[5]-n0)/i0} L${s0} ${o0} L${l0} ${c0} L${(_0(this,v1)[16]-e0)/a0} ${(_0(this,v1)[17]-n0)/i0} L${(_0(this,v1)[14]-e0)/a0} ${(_0(this,v1)[15]-n0)/i0} Z`},vz=function(e0){const n0=_0(this,fR);e0.push(`L${n0[4]} ${n0[5]} Z`)},Ez=function(e0){const[n0,a0,i0,s0]=_0(this,U_),o0=_0(this,v1).subarray(4,6),l0=_0(this,v1).subarray(16,18),[c0,u0,d0,h0]=H0(this,s_,WF).call(this);e0.push(`L${(o0[0]-n0)/i0} ${(o0[1]-a0)/s0} L${c0} ${u0} L${d0} ${h0} L${(l0[0]-n0)/i0} ${(l0[1]-a0)/s0}`)},wz=function(e0){const n0=_0(this,v1),[a0,i0,s0,o0]=_0(this,U_),[l0,c0,u0,d0]=H0(this,s_,WF).call(this),h0=new Float64Array(36);return h0.set([NaN,NaN,NaN,NaN,(n0[2]-a0)/s0,(n0[3]-i0)/o0,NaN,NaN,NaN,NaN,(n0[4]-a0)/s0,(n0[5]-i0)/o0,NaN,NaN,NaN,NaN,l0,c0,NaN,NaN,NaN,NaN,u0,d0,NaN,NaN,NaN,NaN,(n0[16]-a0)/s0,(n0[17]-i0)/o0,NaN,NaN,NaN,NaN,(n0[14]-a0)/s0,(n0[15]-i0)/o0],0),this.newFreeDrawOutline(h0,e0,_0(this,U_),_0(this,EF),_0(this,bF),_0(this,vF))},Sz=function(e0,n0){const a0=_0(this,fR);return e0.set([NaN,NaN,NaN,NaN,a0[4],a0[5]],n0),n0+=6},_z=function(e0,n0){const a0=_0(this,v1).subarray(4,6),i0=_0(this,v1).subarray(16,18),[s0,o0,l0,c0]=_0(this,U_),[u0,d0,h0,f0]=H0(this,s_,WF).call(this);return e0.set([NaN,NaN,NaN,NaN,(a0[0]-s0)/l0,(a0[1]-o0)/c0,NaN,NaN,NaN,NaN,u0,d0,NaN,NaN,NaN,NaN,h0,f0,NaN,NaN,NaN,NaN,(i0[0]-s0)/l0,(i0[1]-o0)/c0],n0),n0+=24},K0(GR,n2,8),K0(GR,l3,2),K0(GR,c3,_0(GR,n2)+_0(GR,l3));let FreeDrawOutliner=GR;var SF,JP,a$,a2,z_,i2,Y1,M_,KF,QF,Tz;class FreeDrawOutline extends Outline{constructor(n0,a0,i0,s0,o0,l0){super();K0(this,M_);K0(this,SF);K0(this,JP,null);K0(this,a$);K0(this,a2);K0(this,z_);K0(this,i2);K0(this,Y1);V0(this,Y1,n0),V0(this,z_,a0),V0(this,SF,i0),V0(this,i2,s0),V0(this,a$,o0),V0(this,a2,l0),H0(this,M_,Tz).call(this,l0);const{x:c0,y:u0,width:d0,height:h0}=_0(this,JP);for(let f0=0,p0=n0.length;f0<p0;f0+=2)n0[f0]=(n0[f0]-c0)/d0,n0[f0+1]=(n0[f0+1]-u0)/h0;for(let f0=0,p0=a0.length;f0<p0;f0+=2)a0[f0]=(a0[f0]-c0)/d0,a0[f0+1]=(a0[f0+1]-u0)/h0}toSVGPath(){const n0=[`M${_0(this,Y1)[4]} ${_0(this,Y1)[5]}`];for(let a0=6,i0=_0(this,Y1).length;a0<i0;
741a0+=6){if(isNaN(_0(this,Y1)[a0])){n0.push(`L${_0(this,Y1)[a0+4]} ${_0(this,Y1)[a0+5]}`);continue}n0.push(`C${_0(this,Y1)[a0]} ${_0(this,Y1)[a0+1]} ${_0(this,Y1)[a0+2]} ${_0(this,Y1)[a0+3]} ${_0(this,Y1)[a0+4]} ${_0(this,Y1)[a0+5]}`)}return n0.push("Z"),n0.join(" ")}serialize([n0,a0,i0,s0],o0){const l0=i0-n0,c0=s0-a0;let u0,d0;switch(o0){case 0:u0=H0(this,M_,KF).call(this,_0(this,Y1),n0,s0,l0,-c0),d0=H0(this,M_,KF).call(this,_0(this,z_),n0,s0,l0,-c0);break;case 90:u0=H0(this,M_,QF).call(this,_0(this,Y1),n0,a0,l0,c0),d0=H0(this,M_,QF).call(this,_0(this,z_),n0,a0,l0,c0);break;case 180:u0=H0(this,M_,KF).call(this,_0(this,Y1),i0,a0,-l0,c0),d0=H0(this,M_,KF).call(this,_0(this,z_),i0,a0,-l0,c0);break;case 270:u0=H0(this,M_,QF).call(this,_0(this,Y1),i0,s0,-l0,-c0),d0=H0(this,M_,QF).call(this,_0(this,z_),i0,s0,-l0,-c0);break}return{outline:Array.from(u0),points:[Array.from(d0)]}}get box(){return _0(this,JP)}newOutliner(n0,a0,i0,s0,o0,l0=0){return new FreeDrawOutliner(n0,a0,i0,s0,o0,l0)}getNewOutline(n0,a0){const{x:i0,y:s0,width:o0,height:l0}=_0(this,JP),[c0,u0,d0,h0]=_0(this,SF),f0=o0*d0,p0=l0*h0,A0=i0*d0+c0,m0=s0*h0+u0,x0=this.newOutliner({x:_0(this,z_)[0]*f0+A0,y:_0(this,z_)[1]*p0+m0},_0(this,SF),_0(this,i2),n0,_0(this,a2),a0??_0(this,a$));for(let g0=2;g0<_0(this,z_).length;g0+=2)x0.add({x:_0(this,z_)[g0]*f0+A0,y:_0(this,z_)[g0+1]*p0+m0});return x0.getOutlines()}get mustRemoveSelfIntersections(){return!0}}SF=new WeakMap,JP=new WeakMap,a$=new WeakMap,a2=new WeakMap,z_=new WeakMap,i2=new WeakMap,Y1=new WeakMap,M_=new WeakSet,KF=function(n0,a0,i0,s0,o0){const l0=new Float64Array(n0.length);for(let c0=0,u0=n0.length;c0<u0;c0+=2)l0[c0]=a0+n0[c0]*s0,l0[c0+1]=i0+n0[c0+1]*o0;return l0},QF=function(n0,a0,i0,s0,o0){const l0=new Float64Array(n0.length);for(let c0=0,u0=n0.length;c0<u0;c0+=2)l0[c0]=a0+n0[c0+1]*s0,l0[c0+1]=i0+n0[c0]*o0;return l0},Tz=function(n0){const a0=_0(this,Y1);let i0=a0[4],s0=a0[5],o0=i0,l0=s0,c0=i0,u0=s0,d0=i0,h0=s0;const f0=n0?Math.max:Math.min;for(let g0=6,y0=a0.length;g0<y0;g0+=6){if(isNaN(a0[g0]))o0=Math.min(o0,a0[g0+4]),l0=Math.min(l0,a0[g0+5]),c0=Math.max(c0,a0[g0+4]),u0=Math.max(u0,a0[g0+5]),h0<a0[g0+5]?(d0=a0[g0+4],h0=a0[g0+5]):h0===a0[g0+5]&&(d0=f0(d0,a0[g0+4]));else{const b0=Util.bezierBoundingBox(i0,s0,...a0.slice(g0,g0+6));o0=Math.min(o0,b0[0]),l0=Math.min(l0,b0[1]),c0=Math.max(c0,b0[2]),u0=Math.max(u0,b0[3]),h0<b0[3]?(d0=b0[2],h0=b0[3]):h0===b0[3]&&(d0=f0(d0,b0[2]))}i0=a0[g0+4],s0=a0[g0+5]}const p0=o0-_0(this,a$),A0=l0-_0(this,a$),m0=c0-o0+2*_0(this,a$),x0=u0-l0+2*_0(this,a$);V0(this,JP,{x:p0,y:A0,width:m0,height:x0,lastPoint:[d0,h0]})};var s2,H$,pR,R_,kz,O2,Cz,Rz,V3;class HighlightOutliner{constructor(e0,n0=0,a0=0,i0=!0){K0(this,R_);K0(this,s2);K0(this,H$,[]);K0(this,pR,[]);let s0=1/0,o0=-1/0,l0=1/0,c0=-1/0;const d0=10**-4;for(const{x:g0,y:y0,width:b0,height:E0}of e0){const w0=Math.floor((g0-n0)/d0)*d0,v0=Math.ceil((g0+b0+n0)/d0)*d0,S0=Math.floor((y0-n0)/d0)*d0,k0=Math.ceil((y0+E0+n0)/d0)*d0,R0=[w0,S0,k0,!0],j0=[v0,S0,k0,!1];_0(this,H$).push(R0,j0),s0=Math.min(s0,w0),o0=Math.max(o0,v0),l0=Math.min(l0,S0),c0=Math.max(c0,k0)}const h0=o0-s0+2*a0,f0=c0-l0+2*a0,p0=s0-a0,A0=l0-a0,m0=_0(this,H$).at(i0?-1:-2),x0=[m0[0],m0[2]];for(const g0 of _0(this,H$)){const[y0,b0,E0]=g0;g0[0]=(y0-p0)/h0,g0[1]=(b0-A0)/f0,g0[2]=(E0-A0)/f0}V0(this,s2,{x:p0,y:A0,width:h0,height:f0,lastPoint:x0})}getOutlines(){_0(this,H$).sort((n0,a0)=>n0[0]-a0[0]||n0[1]-a0[1]||n0[2]-a0[2]);const e0=[];for(const n0 of _0(this,H$))n0[3]?(e0.push(...H0(this,R_,V3).call(this,n0)),H0(this,R_,Cz).call(this,n0)):(H0(this,R_,Rz).call(this,n0),e0.push(...H0(this,R_,V3).call(this,n0)));return H0(this,R_,kz).call(this,e0)}}s2=new WeakMap,H$=new WeakMap,pR=new WeakMap,R_=new WeakSet,kz=function(e0){const n0=[],a0=new Set;for(const o0 of e0){const[l0,c0,u0]=o0;n0.push([l0,c0,o0],[l0,u0,o0])}n0.sort((o0,l0)=>o0[1]-l0[1]||o0[0]-l0[0]);for(let o0=0,l0=n0.length;o0<l0;o0+=2){const c0=n0[o0][2],u0=n0[o0+1][2];c0.push(u0),u0.push(c0),a0.add(c0),a0.add(u0)}const i0=[];let s0;for(;a0.size>0;){const o0=a0.values().next().value;let[l0,c0,u0,d0,h0]=o0;a0.delete(o0);let f0=l0,p0=c0;for(s0=[l0,u0],i0.push(s0);;){let A0;if(a0.has(d0))A0=d0;else if(a0.has(h0))A0=h0;else break;a0.delete(A0),[l0,c0,u0,d0,h0]=A0,f0!==l0&&(s0.push(f0,p0,l0,p0===c0?c0:u0),f0=l0),p0=p0===c0?u0:c0}s0.push(f0,p0)}return new HighlightOutline(i0,_0(this,s2))},O2=function(e0){const n0=_0(this,pR);let a0=0,i0=n0.length-1;for(;a0<=i0;){const s0=a0+i0>>1,o0=n0[s0][0];if(o0===e0)return s0;o0<e0?a0=s0+1:i0=s0-1}return i0+1},Cz=function([,e0,n0]){const a0=H0(this,R_,O2).call(this,e0);_0(this,pR).splice(a0,0,[e0,n0])},Rz=function([,e0,n0]){const a0=H0(this,R_,O2).call(this,e0);for(let i0=a0;i0<_0(this,pR).length;i0++){const[s0,o0]=_0(this,pR)[i0];if(s0!==e0)break;if(s0===e0&&o0===n0){_0(this,pR).splice(i0,1);return}}for(let i0=a0-1;i0>=0;i0--){const[s0,o0]=_0(this,pR)[i0];if(s0!==e0)break;if(s0===e0&&o0===n0){_0(this,pR).splice(i0,1);return}}},V3=function(e0){const[n0,a0,i0]=e0,s0=[[n0,a0,i0]],o0=H0(this,R_,O2).call(this,i0);for(let l0=0;l0<o0;l0++){const[c0,u0]=_0(this,pR)[l0];for(let d0=0,h0=s0.length;d0<h0;d0++){const[,f0,p0]=s0[d0];
741if(!(u0<=f0||p0<=c0)){if(f0>=c0){if(p0>u0)s0[d0][1]=u0;else{if(h0===1)return[];s0.splice(d0,1),d0--,h0--}continue}s0[d0][2]=c0,p0>u0&&s0.push([n0,u0,p0])}}}return s0};var o2,_F;class HighlightOutline extends Outline{constructor(n0,a0){super();K0(this,o2);K0(this,_F);V0(this,_F,n0),V0(this,o2,a0)}toSVGPath(){const n0=[];for(const a0 of _0(this,_F)){let[i0,s0]=a0;n0.push(`M${i0} ${s0}`);for(let o0=2;o0<a0.length;o0+=2){const l0=a0[o0],c0=a0[o0+1];l0===i0?(n0.push(`V${c0}`),s0=c0):c0===s0&&(n0.push(`H${l0}`),i0=l0)}n0.push("Z")}return n0.join(" ")}serialize([n0,a0,i0,s0],o0){const l0=[],c0=i0-n0,u0=s0-a0;for(const d0 of _0(this,_F)){const h0=new Array(d0.length);for(let f0=0;f0<d0.length;f0+=2)h0[f0]=n0+d0[f0]*c0,h0[f0+1]=s0-d0[f0+1]*u0;l0.push(h0)}return l0}get box(){return _0(this,o2)}get classNamesForDrawing(){return["highlight"]}get classNamesForOutlining(){return["highlightOutline"]}}o2=new WeakMap,_F=new WeakMap;class FreeHighlightOutliner extends FreeDrawOutliner{newFreeDrawOutline(e0,n0,a0,i0,s0,o0){return new FreeHighlightOutline(e0,n0,a0,i0,s0,o0)}get classNamesForDrawing(){return["highlight","free"]}}class FreeHighlightOutline extends FreeDrawOutline{get classNamesForDrawing(){return["highlight","free"]}get classNamesForOutlining(){return["highlightOutline","free"]}newOutliner(e0,n0,a0,i0,s0,o0=0){return new FreeHighlightOutliner(e0,n0,a0,i0,s0,o0)}}var mR,ZP,TF,a_,l2,kF,c2,u2,W$,AR,CF,d2,O1,G3,H3,W3,nP,Iz,b$;const N_=class N_{constructor({editor:e0=null,uiManager:n0=null}){K0(this,O1);K0(this,mR,null);K0(this,ZP,null);K0(this,TF);K0(this,a_,null);K0(this,l2,!1);K0(this,kF,!1);K0(this,c2,null);K0(this,u2);K0(this,W$,null);K0(this,AR,null);K0(this,CF);var a0;e0?(V0(this,kF,!1),V0(this,CF,AnnotationEditorParamsType.HIGHLIGHT_COLOR),V0(this,c2,e0)):(V0(this,kF,!0),V0(this,CF,AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR)),V0(this,AR,(e0==null?void 0:e0._uiManager)||n0),V0(this,u2,_0(this,AR)._eventBus),V0(this,TF,(e0==null?void 0:e0.color)||((a0=_0(this,AR))==null?void 0:a0.highlightColors.values().next().value)||"#FFFF98"),_0(N_,d2)||V0(N_,d2,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return shadow(this,"_keyboardManager",new KeyboardManager([[["Escape","mac+Escape"],N_.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],N_.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],N_.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],N_.prototype._moveToPrevious],[["Home","mac+Home"],N_.prototype._moveToBeginning],[["End","mac+End"],N_.prototype._moveToEnd]]))}renderButton(){const e0=V0(this,mR,document.createElement("button"));e0.className="colorPicker",e0.tabIndex="0",e0.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e0.setAttribute("aria-haspopup",!0);const n0=_0(this,AR)._signal;e0.addEventListener("click",H0(this,O1,nP).bind(this),{signal:n0}),e0.addEventListener("keydown",H0(this,O1,W3).bind(this),{signal:n0});const a0=V0(this,ZP,document.createElement("span"));return a0.className="swatch",a0.setAttribute("aria-hidden",!0),a0.style.backgroundColor=_0(this,TF),e0.append(a0),e0}renderMainDropdown(){const e0=V0(this,a_,H0(this,O1,G3).call(this));return e0.setAttribute("aria-orientation","horizontal"),e0.setAttribute("aria-labelledby","highlightColorPickerLabel"),e0}_colorSelectFromKeyboard(e0){if(e0.target===_0(this,mR)){H0(this,O1,nP).call(this,e0);return}const n0=e0.target.getAttribute("data-color");n0&&H0(this,O1,H3).call(this,n0,e0)}_moveToNext(e0){var n0,a0;if(!_0(this,O1,b$)){H0(this,O1,nP).call(this,e0);return}if(e0.target===_0(this,mR)){(n0=_0(this,a_).firstChild)==null||n0.focus();return}(a0=e0.target.nextSibling)==null||a0.focus()}_moveToPrevious(e0){var n0,a0;if(e0.target===((n0=_0(this,a_))==null?void 0:n0.firstChild)||e0.target===_0(this,mR)){_0(this,O1,b$)&&this._hideDropdownFromKeyboard();return}_0(this,O1,b$)||H0(this,O1,nP).call(this,e0),(a0=e0.target.previousSibling)==null||a0.focus()}_moveToBeginning(e0){var n0;if(!_0(this,O1,b$)){H0(this,O1,nP).call(this,e0);return}(n0=_0(this,a_).firstChild)==null||n0.focus()}_moveToEnd(e0){var n0;if(!_0(this,O1,b$)){H0(this,O1,nP).call(this,e0);return}(n0=_0(this,a_).lastChild)==null||n0.focus()}hideDropdown(){var e0,n0;(e0=_0(this,a_))==null||e0.classList.add("hidden"),(n0=_0(this,W$))==null||n0.abort(),V0(this,W$,null)}_hideDropdownFromKeyboard(){var e0;if(!_0(this,kF)){if(!_0(this,O1,b$)){(e0=_0(this,c2))==null||e0.unselect();return}this.hideDropdown(),_0(this,mR).focus({preventScroll:!0,focusVisible:_0(this,l2)})}}
741updateColor(e0){if(_0(this,ZP)&&(_0(this,ZP).style.backgroundColor=e0),!_0(this,a_))return;const n0=_0(this,AR).highlightColors.values();for(const a0 of _0(this,a_).children)a0.setAttribute("aria-selected",n0.next().value===e0)}destroy(){var e0,n0;(e0=_0(this,mR))==null||e0.remove(),V0(this,mR,null),V0(this,ZP,null),(n0=_0(this,a_))==null||n0.remove(),V0(this,a_,null)}};mR=new WeakMap,ZP=new WeakMap,TF=new WeakMap,a_=new WeakMap,l2=new WeakMap,kF=new WeakMap,c2=new WeakMap,u2=new WeakMap,W$=new WeakMap,AR=new WeakMap,CF=new WeakMap,d2=new WeakMap,O1=new WeakSet,G3=function(){const e0=document.createElement("div"),n0=_0(this,AR)._signal;e0.addEventListener("contextmenu",noContextMenu,{signal:n0}),e0.className="dropdown",e0.role="listbox",e0.setAttribute("aria-multiselectable",!1),e0.setAttribute("aria-orientation","vertical"),e0.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[a0,i0]of _0(this,AR).highlightColors){const s0=document.createElement("button");s0.tabIndex="0",s0.role="option",s0.setAttribute("data-color",i0),s0.title=a0,s0.setAttribute("data-l10n-id",_0(N_,d2)[a0]);const o0=document.createElement("span");s0.append(o0),o0.className="swatch",o0.style.backgroundColor=i0,s0.setAttribute("aria-selected",i0===_0(this,TF)),s0.addEventListener("click",H0(this,O1,H3).bind(this,i0),{signal:n0}),e0.append(s0)}return e0.addEventListener("keydown",H0(this,O1,W3).bind(this),{signal:n0}),e0},H3=function(e0,n0){n0.stopPropagation(),_0(this,u2).dispatch("switchannotationeditorparams",{source:this,type:_0(this,CF),value:e0})},W3=function(e0){N_._keyboardManager.exec(this,e0)},nP=function(e0){if(_0(this,O1,b$)){this.hideDropdown();return}if(V0(this,l2,e0.detail===0),_0(this,W$)||(V0(this,W$,new AbortController),window.addEventListener("pointerdown",H0(this,O1,Iz).bind(this),{signal:_0(this,AR).combinedSignal(_0(this,W$))})),_0(this,a_)){_0(this,a_).classList.remove("hidden");return}const n0=V0(this,a_,H0(this,O1,G3).call(this));_0(this,mR).append(n0)},Iz=function(e0){var n0;(n0=_0(this,a_))!=null&&n0.contains(e0.target)||this.hideDropdown()},b$=function(){return _0(this,a_)&&!_0(this,a_).classList.contains("hidden")},K0(N_,d2,null);let ColorPicker=N_;var RF,h2,i$,uL,IF,Y_,f2,p2,dL,gR,w_,P_,NF,s$,i_,jF,X_,m2,x1,K3,D2,Nz,jz,$z,Q3,aP,eR,RL,Pz,L2,qF,Mz,Oz,Dz,Lz,Bz;const I1=class I1 extends AnnotationEditor{constructor(n0){super({...n0,name:"highlightEditor"});K0(this,x1);K0(this,RF,null);K0(this,h2,0);K0(this,i$);K0(this,uL,null);K0(this,IF,null);K0(this,Y_,null);K0(this,f2,null);K0(this,p2,0);K0(this,dL,null);K0(this,gR,null);K0(this,w_,null);K0(this,P_,!1);K0(this,NF,null);K0(this,s$);K0(this,i_,null);K0(this,jF,"");K0(this,X_);K0(this,m2,"");this.color=n0.color||I1._defaultColor,V0(this,X_,n0.thickness||I1._defaultThickness),V0(this,s$,n0.opacity||I1._defaultOpacity),V0(this,i$,n0.boxes||null),V0(this,m2,n0.methodOfCreation||""),V0(this,jF,n0.text||""),this._isDraggable=!1,n0.highlightId>-1?(V0(this,P_,!0),H0(this,x1,D2).call(this,n0),H0(this,x1,aP).call(this)):_0(this,i$)&&(V0(this,RF,n0.anchorNode),V0(this,h2,n0.anchorOffset),V0(this,f2,n0.focusNode),V0(this,p2,n0.focusOffset),H0(this,x1,K3).call(this),H0(this,x1,aP).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const n0=I1.prototype;return shadow(this,"_keyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],n0._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],n0._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],n0._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],n0._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:_0(this,P_)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:_0(this,X_),methodOfCreation:_0(this,m2)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(n0){return{numberOfColors:n0.get("color").size}}static initialize(n0,a0){var i0;AnnotationEditor.initialize(n0,a0),I1._defaultColor||(I1._defaultColor=((i0=a0.highlightColors)==null?void 0:i0.values().next().value)||"#fff066")}static updateDefaultParams(n0,a0){switch(n0){case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:I1._defaultColor=a0;break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:I1._defaultThickness=a0;break}}translateInPage(n0,a0){}get toolbarPosition(){return _0(this,NF)}updateParams(n0,a0){switch(n0){case AnnotationEditorParamsType.HIGHLIGHT_COLOR:H0(this,x1,Nz).call(this,a0);break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:H0(this,x1,jz).call(this,a0);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR,I1._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,I1._defaultThickness]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR,this.color||I1._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,_0(this,X_)||I1._defaultThickness],[AnnotationEditorParamsType.HIGHLIGHT_FREE,_0(this,P_)]]}async addEditToolbar(){const n0=await super.addEditToolbar();return n0?(this._uiManager.highlightColors&&(V0(this,IF,new ColorPicker({editor:this})),n0.addColorPicker(_0(this,IF))),n0):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(H0(this,x1,qF).call(this))}getBaseTranslation(){return[0,0]}getRect(n0,a0){return super.getRect(n0,a0,H0(this,x1,qF).call(this))}onceAdded(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}remove(){H0(this,x1,Q3).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(H0(this,x1,aP).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(n0){var i0;let a0=!1;this.parent&&!n0?H0(this,x1,Q3).call(this):n0&&(H0(this,x1,aP).call(this,n0),a0=!this.parent&&((i0=this.div)==null?void 0:i0.classList.contains("selectedEditor"))),super.setParent(n0),this.show(this._isVisible),a0&&this.select()}rotate(n0){var s0,o0,l0;const{drawLayer:a0}=this.parent;let i0;_0(this,P_)?(n0=(n0-this.rotation+360)%360,i0=H0(s0=I1,eR,RL).call(s0,_0(this,gR).box,n0)):i0=H0(o0=I1,eR,RL).call(o0,this,n0),a0.rotate(_0(this,w_),n0),a0.rotate(_0(this,i_),n0),a0.updateBox(_0(this,w_),i0),a0.updateBox(_0(this,i_),H0(l0=I1,eR,RL).call(l0,_0(this,Y_).box,n0))}
741render(){if(this.div)return this.div;const n0=super.render();_0(this,jF)&&(n0.setAttribute("aria-label",_0(this,jF)),n0.setAttribute("role","mark")),_0(this,P_)?n0.classList.add("free"):this.div.addEventListener("keydown",H0(this,x1,Pz).bind(this),{signal:this._uiManager._signal});const a0=V0(this,dL,document.createElement("div"));n0.append(a0),a0.setAttribute("aria-hidden","true"),a0.className="internal",a0.style.clipPath=_0(this,uL);const[i0,s0]=this.parentDimensions;return this.setDims(this.width*i0,this.height*s0),bindEvents(this,_0(this,dL),["pointerover","pointerleave"]),this.enableEditing(),n0}pointerover(){this.isSelected||this.parent.drawLayer.addClass(_0(this,i_),"hovered")}pointerleave(){this.isSelected||this.parent.drawLayer.removeClass(_0(this,i_),"hovered")}_moveCaret(n0){switch(this.parent.unselect(this),n0){case 0:case 2:H0(this,x1,L2).call(this,!0);break;case 1:case 3:H0(this,x1,L2).call(this,!1);break}}select(){var n0,a0;super.select(),_0(this,i_)&&((n0=this.parent)==null||n0.drawLayer.removeClass(_0(this,i_),"hovered"),(a0=this.parent)==null||a0.drawLayer.addClass(_0(this,i_),"selected"))}unselect(){var n0;super.unselect(),_0(this,i_)&&((n0=this.parent)==null||n0.drawLayer.removeClass(_0(this,i_),"selected"),_0(this,P_)||H0(this,x1,L2).call(this,!1))}get _mustFixPosition(){return!_0(this,P_)}show(n0=this._isVisible){super.show(n0),this.parent&&(this.parent.drawLayer.show(_0(this,w_),n0),this.parent.drawLayer.show(_0(this,i_),n0))}static startHighlighting(n0,a0,{target:i0,x:s0,y:o0}){const{x:l0,y:c0,width:u0,height:d0}=i0.getBoundingClientRect(),h0=new AbortController,f0=n0.combinedSignal(h0),p0=m0=>{m0.preventDefault(),m0.stopPropagation()},A0=m0=>{h0.abort(),H0(this,eR,Lz).call(this,n0,m0)};window.addEventListener("blur",A0,{signal:f0}),window.addEventListener("pointerup",A0,{signal:f0}),window.addEventListener("pointerdown",p0,{capture:!0,passive:!1,signal:f0}),window.addEventListener("contextmenu",noContextMenu,{signal:f0}),i0.addEventListener("pointermove",H0(this,eR,Dz).bind(this,n0),{signal:f0}),this._freeHighlight=new FreeHighlightOutliner({x:s0,y:o0},[l0,c0,u0,d0],n0.scale,this._defaultThickness/2,a0,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=n0.drawLayer.draw(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static async deserialize(n0,a0,i0){var m0,x0,g0,y0;let s0=null;if(n0 instanceof HighlightAnnotationElement){const{data:{quadPoints:b0,rect:E0,rotation:w0,id:v0,color:S0,opacity:k0,popupRef:R0},parent:{page:{pageNumber:j0}}}=n0;s0=n0={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(S0),opacity:k0,quadPoints:b0,boxes:null,pageIndex:j0-1,rect:E0.slice(0),rotation:w0,id:v0,deleted:!1,popupRef:R0}}else if(n0 instanceof InkAnnotationElement){const{data:{inkLists:b0,rect:E0,rotation:w0,id:v0,color:S0,borderStyle:{rawWidth:k0},popupRef:R0},parent:{page:{pageNumber:j0}}}=n0;s0=n0={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(S0),thickness:k0,inkLists:b0,boxes:null,pageIndex:j0-1,rect:E0.slice(0),rotation:w0,id:v0,deleted:!1,popupRef:R0}}const{color:o0,quadPoints:l0,inkLists:c0,opacity:u0}=n0,d0=await super.deserialize(n0,a0,i0);d0.color=Util.makeHexColor(...o0),V0(d0,s$,u0||1),c0&&V0(d0,X_,n0.thickness),d0.annotationElementId=n0.id||null,d0._initialData=s0;const[h0,f0]=d0.pageDimensions,[p0,A0]=d0.pageTranslation;if(l0){const b0=V0(d0,i$,[]);for(let E0=0;E0<l0.length;E0+=8)b0.push({x:(l0[E0]-p0)/h0,y:1-(l0[E0+1]-A0)/f0,width:(l0[E0+2]-l0[E0])/h0,height:(l0[E0+1]-l0[E0+5])/f0});H0(m0=d0,x1,K3).call(m0),H0(x0=d0,x1,aP).call(x0),d0.rotate(d0.rotation)}else if(c0){V0(d0,P_,!0);const b0=c0[0],E0={x:b0[0]-p0,y:f0-(b0[1]-A0)},w0=new FreeHighlightOutliner(E0,[0,0,h0,f0],1,_0(d0,X_)/2,!0,.001);for(let k0=0,R0=b0.length;k0<R0;k0+=2)E0.x=b0[k0]-p0,E0.y=f0-(b0[k0+1]-A0),w0.add(E0);const{id:v0,clipPathId:S0}=a0.drawLayer.draw(w0,d0.color,d0._defaultOpacity,!0);H0(g0=d0,x1,D2).call(g0,{highlightOutlines:w0.getOutlines(),highlightId:v0,clipPathId:S0}),H0(y0=d0,x1,aP).call(y0)}return d0}serialize(n0=!1){if(this.isEmpty()||n0)return null;if(this.deleted)return this.serializeDeleted();const a0=this.getRect(0,0),i0=AnnotationEditor._colorManager.convert(this.color),s0={annotationType:AnnotationEditorType.HIGHLIGHT,color:i0,opacity:_0(this,s$),thickness:_0(this,X_),quadPoints:H0(this,x1,Mz).call(this),outlines:H0(this,x1,Oz).call(this,a0),pageIndex:this.pageIndex,rect:a0,rotation:H0(this,x1,qF).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!H0(this,x1,Bz).call(this,s0)?null:(s0.id=this.annotationElementId,s0)}renderAnnotationElement(n0){return n0.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};RF=new WeakMap,h2=new WeakMap,i$=new WeakMap,uL=new WeakMap,IF=new WeakMap,Y_=new WeakMap,f2=new WeakMap,p2=new WeakMap,dL=new WeakMap,gR=new WeakMap,w_=new WeakMap,P_=new WeakMap,NF=new WeakMap,s$=new WeakMap,i_=new WeakMap,jF=new WeakMap,X_=new WeakMap,m2=new WeakMap,x1=new WeakSet,K3=function(){const n0=new HighlightOutliner(_0(this,i$),.001);V0(this,gR,n0.getOutlines()),{x:this.x,y:this.y,width:this.width,height:this.height}=_0(this,gR).box;const a0=new HighlightOutliner(_0(this,i$),.0025,.001,this._uiManager.direction==="ltr");V0(this,Y_,a0.getOutlines());const{lastPoint:i0}=_0(this,Y_).box;V0(this,NF,[(i0[0]-this.x)/this.width,(i0[1]-this.y)/this.height])},D2=function({highlightOutlines:n0,highlightId:a0,clipPathId:i0}){var h0,f0;if(V0(this,gR,n0),V0(this,Y_,n0.getNewOutline(_0(this,X_)/2+1.5,.0025)),a0>=0)V0(this,w_,a0),V0(this,uL,i0),this.parent.drawLayer.finalizeLine(a0,n0),V0(this,i_,this.parent.drawLayer.drawOutline(_0(this,Y_)));else if(this.parent){const p0=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(_0(this,w_),n0),this.parent.drawLayer.updateBox(_0(this,w_),H0(h0=I1,eR,RL).call(h0,_0(this,gR).box,(p0-this.rotation+360)%360)),this.parent.drawLayer.updateLine(_0(this,i_),_0(this,Y_)),this.parent.drawLayer.updateBox(_0(this,i_),H0(f0=I1,eR,RL).call(f0,_0(this,Y_).box,p0))}const{x:o0,y:l0,width:c0,height:u0}=n0.box;switch(this.rotation){case 0:this.x=o0,this.y=l0,this.width=c0,this.height=u0;break;case 90:{const[p0,A0]=this.parentDimensions;this.x=l0,this.y=1-o0,this.width=c0*A0/p0,this.height=u0*p0/A0;break}case 180:this.x=1-o0,this.y=1-l0,this.width=c0,this.height=u0;break;case 270:{const[p0,A0]=this.parentDimensions;this.x=1-l0,this.y=o0,this.width=c0*A0/p0,this.height=u0*p0/A0;break}}const{lastPoint:d0}=_0(this,Y_).box;V0(this,NF,[(d0[0]-o0)/c0,(d0[1]-l0)/u0])},Nz=function(n0){const a0=(o0,l0)=>{var c0,u0,d0;this.color=o0,(c0=this.parent)==null||c0.drawLayer.changeColor(_0(this,w_),o0),(u0=_0(this,IF))==null||u0.updateColor(o0),V0(this,s$,l0),(d0=this.parent)==null||d0.drawLayer.changeOpacity(_0(this,w_),l0)},i0=this.color,s0=_0(this,s$);this.addCommands({cmd:a0.bind(this,n0,I1._defaultOpacity),undo:a0.bind(this,i0,s0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(n0)},!0)},jz=function(n0){const a0=_0(this,X_),i0=s0=>{V0(this,X_,s0),H0(this,x1,$z).call(this,s0)};this.addCommands({cmd:i0.bind(this,n0),undo:i0.bind(this,a0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:n0},!0)},$z=function(n0){if(!_0(this,P_))return;H0(this,x1,D2).call(this,{highlightOutlines:_0(this,gR).getNewOutline(n0/2)}),this.fixAndSetPosition();const[a0,i0]=this.parentDimensions;this.setDims(this.width*a0,this.height*i0)},Q3=function(){_0(this,w_)===null||!this.parent||(this.parent.drawLayer.remove(_0(this,w_)),V0(this,w_,null),this.parent.drawLayer.remove(_0(this,i_)),V0(this,i_,null))},aP=function(n0=this.parent){_0(this,w_)===null&&({id:o_(this,w_)._,clipPathId:o_(this,uL)._}=n0.drawLayer.draw(_0(this,gR),this.color,_0(this,s$)),V0(this,i_,n0.drawLayer.drawOutline(_0(this,Y_))),_0(this,dL)&&(_0(this,dL).style.clipPath=_0(this,uL)))},eR=new WeakSet,RL=function({x:n0,y:a0,width:i0,height:s0},o0){switch(o0){case 90:return{x:1-a0-s0,y:n0,width:s0,height:i0};case 180:return{x:1-n0-i0,y:1-a0-s0,width:i0,height:s0};case 270:return{x:a0,y:1-n0-i0,width:s0,height:i0}}return{x:n0,y:a0,width:i0,height:s0}},Pz=function(n0){I1._keyboardManager.exec(this,n0)},L2=function(n0){if(!_0(this,RF))return;const a0=window.getSelection();n0?a0.setPosition(_0(this,RF),_0(this,h2)):a0.setPosition(_0(this,f2),_0(this,p2))},qF=function(){return _0(this,P_)?this.rotation:0},Mz=function(){if(_0(this,P_))return null;const[n0,a0]=this.pageDimensions,[i0,s0]=this.pageTranslation,o0=_0(this,i$),l0=new Float32Array(o0.length*8);let c0=0;for(const{x:u0,y:d0,width:h0,height:f0}of o0){const p0=u0*n0+i0,A0=(1-d0-f0)*a0+s0;l0[c0]=l0[c0+4]=p0,l0[c0+1]=l0[c0+3]=A0,l0[c0+2]=l0[c0+6]=p0+h0*n0,l0[
741c0+5]=l0[c0+7]=A0+f0*a0,c0+=8}return l0},Oz=function(n0){return _0(this,gR).serialize(n0,H0(this,x1,qF).call(this))},Dz=function(n0,a0){this._freeHighlight.add(a0)&&n0.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)},Lz=function(n0,a0){this._freeHighlight.isEmpty()?n0.drawLayer.remove(this._freeHighlightId):n0.createAndAddNewEditor(a0,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},Bz=function(n0){const{color:a0}=this._initialData;return n0.color.some((i0,s0)=>i0!==a0[s0])},K0(I1,eR),Gw(I1,"_defaultColor",null),Gw(I1,"_defaultOpacity",1),Gw(I1,"_defaultThickness",12),Gw(I1,"_type","highlight"),Gw(I1,"_editorType",AnnotationEditorType.HIGHLIGHT),Gw(I1,"_freeHighlightId",-1),Gw(I1,"_freeHighlight",null),Gw(I1,"_freeHighlightClipId","");let HighlightEditor=I1;var hL,fL,DR,o$,J_,pL,mL,gL,l$,$F,xL,yL,K$,Zw,Fz,Uz,zz,Vz,q3,Gz,Y3,Hz,Wz,Kz,Qz,qz,iP,X3,J3,Z3,B2,F2,IL,t5,U2,g$,Yz,r5,Xz,Jz,n5,z2,YF;const G1=class G1 extends AnnotationEditor{constructor(n0){super({...n0,name:"inkEditor"});K0(this,Zw);K0(this,hL,0);K0(this,fL,0);K0(this,DR,null);K0(this,o$,new Path2D);K0(this,J_,!1);K0(this,pL,null);K0(this,mL,!1);K0(this,gL,!1);K0(this,l$,null);K0(this,$F,null);K0(this,xL,0);K0(this,yL,0);K0(this,K$,null);this.color=n0.color||null,this.thickness=n0.thickness||null,this.opacity=n0.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(n0,a0){AnnotationEditor.initialize(n0,a0)}static updateDefaultParams(n0,a0){switch(n0){case AnnotationEditorParamsType.INK_THICKNESS:G1._defaultThickness=a0;break;case AnnotationEditorParamsType.INK_COLOR:G1._defaultColor=a0;break;case AnnotationEditorParamsType.INK_OPACITY:G1._defaultOpacity=a0/100;break}}updateParams(n0,a0){switch(n0){case AnnotationEditorParamsType.INK_THICKNESS:H0(this,Zw,Fz).call(this,a0);break;case AnnotationEditorParamsType.INK_COLOR:H0(this,Zw,Uz).call(this,a0);break;case AnnotationEditorParamsType.INK_OPACITY:H0(this,Zw,zz).call(this,a0);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.INK_THICKNESS,G1._defaultThickness],[AnnotationEditorParamsType.INK_COLOR,G1._defaultColor||AnnotationEditor._defaultLineColor],[AnnotationEditorParamsType.INK_OPACITY,Math.round(G1._defaultOpacity*100)]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.INK_THICKNESS,this.thickness||G1._defaultThickness],[AnnotationEditorParamsType.INK_COLOR,this.color||G1._defaultColor||AnnotationEditor._defaultLineColor],[AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??G1._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(H0(this,Zw,B2).call(this),H0(this,Zw,F2).call(this)),this.isAttachedToDOM||(this.parent.add(this),H0(this,Zw,IL).call(this)),H0(this,Zw,YF).call(this)))}remove(){var n0;this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_0(this,DR)&&(clearTimeout(_0(this,DR)),V0(this,DR,null)),(n0=_0(this,l$))==null||n0.disconnect(),V0(this,l$,null),super.remove())}setParent(n0){!this.parent&&n0?this._uiManager.removeShouldRescale(this):this.parent&&n0===null&&this._uiManager.addShouldRescale(this),super.setParent(n0)}onScaleChanging(){const[n0,a0]=this.parentDimensions,i0=this.width*n0,s0=this.height*a0;this.setDimensions(i0,s0)}enableEditMode(){_0(this,J_)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,H0(this,Zw,X3).call(this))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),H0(this,Zw,J3).call(this))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){_0(this,J_)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),V0(this,J_,!0),this.div.classList.add("disabled"),H0(this,Zw,YF).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(n0){this._focusEventsAllowed&&(super.focusin(n0),this.enableEditMode())}canvasPointerdown(n0){n0.button!==0||!this.isInEditMode()||_0(this,J_)||(this.setInForeground(),n0.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),H0(this,Zw,Gz).call(this,n0.offsetX,n0.offsetY))}canvasPointermove(n0){n0.preventDefault(),H0(this,Zw,Y3).call(this,n0.offsetX,n0.offsetY)}canvasPointerup(n0){n0.preventDefault(),H0(this,Zw,Z3).call(this,n0)}canvasPointerleave(n0){H0(this,Zw,Z3).call(this,n0)}get isResizable(){return!this.isEmpty()&&_0(this,J_)}
741render(){if(this.div)return this.div;let n0,a0;this.width&&(n0=this.x,a0=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");const[i0,s0,o0,l0]=H0(this,Zw,Vz).call(this);if(this.setAt(i0,s0,0,0),this.setDims(o0,l0),H0(this,Zw,B2).call(this),this.width){const[c0,u0]=this.parentDimensions;this.setAspectRatio(this.width*c0,this.height*u0),this.setAt(n0*c0,a0*u0,this.width*c0,this.height*u0),V0(this,gL,!0),H0(this,Zw,IL).call(this),this.setDims(this.width*c0,this.height*u0),H0(this,Zw,iP).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return H0(this,Zw,F2).call(this),this.div}setDimensions(n0,a0){const i0=Math.round(n0),s0=Math.round(a0);if(_0(this,xL)===i0&&_0(this,yL)===s0)return;V0(this,xL,i0),V0(this,yL,s0),this.canvas.style.visibility="hidden";const[o0,l0]=this.parentDimensions;this.width=n0/o0,this.height=a0/l0,this.fixAndSetPosition(),_0(this,J_)&&H0(this,Zw,t5).call(this,n0,a0),H0(this,Zw,IL).call(this),H0(this,Zw,iP).call(this),this.canvas.style.visibility="visible",this.fixDims()}static async deserialize(n0,a0,i0){var x0,g0,y0;if(n0 instanceof InkAnnotationElement)return null;const s0=await super.deserialize(n0,a0,i0);s0.thickness=n0.thickness,s0.color=Util.makeHexColor(...n0.color),s0.opacity=n0.opacity;const[o0,l0]=s0.pageDimensions,c0=s0.width*o0,u0=s0.height*l0,d0=s0.parentScale,h0=n0.thickness/2;V0(s0,J_,!0),V0(s0,xL,Math.round(c0)),V0(s0,yL,Math.round(u0));const{paths:f0,rect:p0,rotation:A0}=n0;for(let{bezier:b0}of f0){b0=H0(x0=G1,g$,Xz).call(x0,b0,p0,A0);const E0=[];s0.paths.push(E0);let w0=d0*(b0[0]-h0),v0=d0*(b0[1]-h0);for(let k0=2,R0=b0.length;k0<R0;k0+=6){const j0=d0*(b0[k0]-h0),C0=d0*(b0[k0+1]-h0),$0=d0*(b0[k0+2]-h0),T0=d0*(b0[k0+3]-h0),I0=d0*(b0[k0+4]-h0),M0=d0*(b0[k0+5]-h0);E0.push([[w0,v0],[j0,C0],[$0,T0],[I0,M0]]),w0=I0,v0=M0}const S0=H0(this,g$,Yz).call(this,E0);s0.bezierPath2D.push(S0)}const m0=H0(g0=s0,Zw,n5).call(g0);return V0(s0,fL,Math.max(AnnotationEditor.MIN_SIZE,m0[2]-m0[0])),V0(s0,hL,Math.max(AnnotationEditor.MIN_SIZE,m0[3]-m0[1])),H0(y0=s0,Zw,t5).call(y0,c0,u0),s0}serialize(){if(this.isEmpty())return null;const n0=this.getRect(0,0),a0=AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:AnnotationEditorType.INK,color:a0,thickness:this.thickness,opacity:this.opacity,paths:H0(this,Zw,Jz).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,n0),pageIndex:this.pageIndex,rect:n0,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};hL=new WeakMap,fL=new WeakMap,DR=new WeakMap,o$=new WeakMap,J_=new WeakMap,pL=new WeakMap,mL=new WeakMap,gL=new WeakMap,l$=new WeakMap,$F=new WeakMap,xL=new WeakMap,yL=new WeakMap,K$=new WeakMap,Zw=new WeakSet,Fz=function(n0){const a0=s0=>{this.thickness=s0,H0(this,Zw,YF).call(this)},i0=this.thickness;this.addCommands({cmd:a0.bind(this,n0),undo:a0.bind(this,i0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},Uz=function(n0){const a0=s0=>{this.color=s0,H0(this,Zw,iP).call(this)},i0=this.color;this.addCommands({cmd:a0.bind(this,n0),undo:a0.bind(this,i0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},zz=function(n0){const a0=s0=>{this.opacity=s0,H0(this,Zw,iP).call(this)};n0/=100;const i0=this.opacity;this.addCommands({cmd:a0.bind(this,n0),undo:a0.bind(this,i0),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Vz=function(){const{parentRotation:n0,parentDimensions:[a0,i0]}=this;switch(n0){case 90:return[0,i0,i0,a0];case 180:return[a0,i0,a0,i0];case 270:return[a0,0,i0,a0];default:return[0,0,a0,i0]}},q3=function(){const{ctx:n0,color:a0,opacity:i0,thickness:s0,parentScale:o0,scaleFactor:l0}=this;n0.lineWidth=s0*o0/l0,n0.lineCap="round",n0.lineJoin="round",n0.miterLimit=10,n0.strokeStyle=`${a0}${opacityToHex(i0)}`},Gz=function(n0,a0){this.canvas.addEventListener("contextmenu",noContextMenu,{signal:this._uiManager._signal}),H0(this,Zw,J3).call(this),V0(this,pL,new AbortController);const i0=this._uiManager.combinedSignal(_0(this,pL));this.canvas.addEventListener("pointerleave",this.canvasPointerleave.bind(this),{signal:i0}),this.canvas.addEventListener("pointermove",this.canvasPointermove.bind(this),{signal:i0}),this.canvas.addEventListener("pointerup",this.canvasPointerup.bind(this),{signal:i0}),this.isEditing=!0,_0(this,gL)||(V0(this,gL,!0),H0(this,Zw,IL).call(this),this.thickness||(this.thickness=G1._defaultThickness),this.color||(this.color=G1._defaultColor||AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=G1._defaultOpacity)),this.currentPath.push([n0,a0]),V0(this,mL,!1),H0(this,Zw,q3).call(this),V0(this,K$,()=>{H0(this,Zw,Kz).call(this),_0(this,K$)&&window.requestAnimationFrame(_0(this,K$))}),window.requestAnimationFrame(_0(this,K$))},Y3=function(n0,a0){const[i0,s0]=this.currentPath.at(-1);if(this.currentPath.length>1&&n0===i0&&a0===s0)return;const o0=this.currentPath;let l0=_0(this,o$);if(o0.push([n0,a0]),V0(this,mL,!0),o0.length<=2){l0.moveTo(...o0[0]),l0.lineTo(n0,a0);return}o0.length===3&&(V0(this,o$,l0=new Path2D),l0.moveTo(...o0[0])),H0(this,Zw,Qz).call(this,l0,...o0.at(-3),...o0.at(-2),n0,a0)},Hz=function(){if(this.currentPath.length===0)return;const n0=this.currentPath.at(-1);_0(this,o$).lineTo(...n0)},Wz=function(n0,a0){V0(this,K$,null),n0=Math.min(Math.max(n0,0),this.canvas.width),a0=Math.min(Math.max(a0,0),this.canvas.height),H0(this,Zw,Y3).call(this,n0,a0),H0(this,Zw,Hz).call(this);let i0;if(this.currentPath.length!==1)i0=H0(this,Zw,qz).call(this);else{const u0=[n0,a0];i0=[[u0,u0.slice(),u0.slice(),u0]]}const s0=_0(this,o$),o0=this.currentPath;this.currentPath=[],V0(this,o$,new Path2D);const l0=()=>{this.allRawPaths.push(o0),this.paths.push(i0),this.bezierPath2D.push(s0),this._uiManager.rebuild(this)},c0=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(H0(this,Zw,B2).call(this),H0(this,Zw,F2).call(this)),H0(this,Zw,YF).call(this))};this.addCommands({cmd:l0,undo:c0,mustExec:!0})},Kz=function(){if(!_0(this,mL))return;V0(this,mL,!1);const n0=Math.ceil(this.thickness*this.parentScale),a0=this.currentPath.slice(-3),i0=a0.map(l0=>l0[0]),s0=a0.map(l0=>l0[1]);Math.min(...i0)-n0,Math.max(...i0)+n0,Math.min(...s0)-n0,Math.max(...s0)+n0;const{ctx:o0}=this;o0.save(),o0.clearRect(0,0,this.canvas.width,this.canvas.height);for(const l0 of this.bezierPath2D)o0.stroke(l0);
741o0.stroke(_0(this,o$)),o0.restore()},Qz=function(n0,a0,i0,s0,o0,l0,c0){const u0=(a0+s0)/2,d0=(i0+o0)/2,h0=(s0+l0)/2,f0=(o0+c0)/2;n0.bezierCurveTo(u0+2*(s0-u0)/3,d0+2*(o0-d0)/3,h0+2*(s0-h0)/3,f0+2*(o0-f0)/3,h0,f0)},qz=function(){const n0=this.currentPath;if(n0.length<=2)return[[n0[0],n0[0],n0.at(-1),n0.at(-1)]];const a0=[];let i0,[s0,o0]=n0[0];for(i0=1;i0<n0.length-2;i0++){const[p0,A0]=n0[i0],[m0,x0]=n0[i0+1],g0=(p0+m0)/2,y0=(A0+x0)/2,b0=[s0+2*(p0-s0)/3,o0+2*(A0-o0)/3],E0=[g0+2*(p0-g0)/3,y0+2*(A0-y0)/3];a0.push([[s0,o0],b0,E0,[g0,y0]]),[s0,o0]=[g0,y0]}const[l0,c0]=n0[i0],[u0,d0]=n0[i0+1],h0=[s0+2*(l0-s0)/3,o0+2*(c0-o0)/3],f0=[u0+2*(l0-u0)/3,d0+2*(c0-d0)/3];return a0.push([[s0,o0],h0,f0,[u0,d0]]),a0},iP=function(){if(this.isEmpty()){H0(this,Zw,U2).call(this);return}H0(this,Zw,q3).call(this);const{canvas:n0,ctx:a0}=this;a0.setTransform(1,0,0,1,0,0),a0.clearRect(0,0,n0.width,n0.height),H0(this,Zw,U2).call(this);for(const i0 of this.bezierPath2D)a0.stroke(i0)},X3=function(){if(_0(this,$F))return;V0(this,$F,new AbortController);const n0=this._uiManager.combinedSignal(_0(this,$F));this.canvas.addEventListener("pointerdown",this.canvasPointerdown.bind(this),{signal:n0})},J3=function(){var n0;(n0=this.pointerdownAC)==null||n0.abort(),this.pointerdownAC=null},Z3=function(n0){var a0;(a0=_0(this,pL))==null||a0.abort(),V0(this,pL,null),H0(this,Zw,X3).call(this),_0(this,DR)&&clearTimeout(_0(this,DR)),V0(this,DR,setTimeout(()=>{V0(this,DR,null),this.canvas.removeEventListener("contextmenu",noContextMenu)},10)),H0(this,Zw,Wz).call(this,n0.offsetX,n0.offsetY),this.addToAnnotationStorage(),this.setInBackground()},B2=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},F2=function(){V0(this,l$,new ResizeObserver(n0=>{const a0=n0[0].contentRect;a0.width&&a0.height&&this.setDimensions(a0.width,a0.height)})),_0(this,l$).observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{var n0;(n0=_0(this,l$))==null||n0.disconnect(),V0(this,l$,null)},{once:!0})},IL=function(){if(!_0(this,gL))return;const[n0,a0]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*n0),this.canvas.height=Math.ceil(this.height*a0),H0(this,Zw,U2).call(this)},t5=function(n0,a0){const i0=H0(this,Zw,z2).call(this),s0=(n0-i0)/_0(this,fL),o0=(a0-i0)/_0(this,hL);this.scaleFactor=Math.min(s0,o0)},U2=function(){const n0=H0(this,Zw,z2).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+n0,this.translationY*this.scaleFactor+n0)},g$=new WeakSet,Yz=function(n0){const a0=new Path2D;for(let i0=0,s0=n0.length;i0<s0;i0++){const[o0,l0,c0,u0]=n0[i0];i0===0&&a0.moveTo(...o0),a0.bezierCurveTo(l0[0],l0[1],c0[0],c0[1],u0[0],u0[1])}return a0},r5=function(n0,a0,i0){const[s0,o0,l0,c0]=a0;switch(i0){case 0:for(let u0=0,d0=n0.length;u0<d0;u0+=2)n0[u0]+=s0,n0[u0+1]=c0-n0[u0+1];break;case 90:for(let u0=0,d0=n0.length;u0<d0;u0+=2){const h0=n0[u0];n0[u0]=n0[u0+1]+s0,n0[u0+1]=h0+o0}break;case 180:for(let u0=0,d0=n0.length;u0<d0;u0+=2)n0[u0]=l0-n0[u0],n0[u0+1]+=o0;break;case 270:for(let u0=0,d0=n0.length;u0<d0;u0+=2){const h0=n0[u0];n0[u0]=l0-n0[u0+1],n0[u0+1]=c0-h0}break;default:throw new Error("Invalid rotation")}return n0},Xz=function(n0,a0,i0){const[s0,o0,l0,c0]=a0;switch(i0){case 0:for(let u0=0,d0=n0.length;u0<d0;u0+=2)n0[u0]-=s0,n0[u0+1]=c0-n0[u0+1];break;case 90:for(let u0=0,d0=n0.length;u0<d0;u0+=2){const h0=n0[u0];n0[u0]=n0[u0+1]-o0,n0[u0+1]=h0-s0}break;case 180:for(let u0=0,d0=n0.length;u0<d0;u0+=2)n0[u0]=l0-n0[u0],n0[u0+1]-=o0;break;case 270:for(let u0=0,d0=n0.length;u0<d0;u0+=2){const h0=n0[u0];n0[u0]=c0-n0[u0+1],n0[u0+1]=l0-h0}break;default:throw new Error("Invalid rotation")}return n0},Jz=function(n0,a0,i0,s0){var d0,h0;const o0=[],l0=this.thickness/2,c0=n0*a0+l0,u0=n0*i0+l0;for(const f0 of this.paths){const p0=[],A0=[];for(let m0=0,x0=f0.length;m0<x0;m0++){const[g0,y0,b0,E0]=f0[m0];if(g0[0]===E0[0]&&g0[1]===E0[1]&&x0===1){const T0=n0*g0[0]+c0,I0=n0*g0[1]+u0;p0.push(T0,I0),A0.push(T0,I0);break}const w0=n0*g0[0]+c0,v0=n0*g0[1]+u0,S0=n0*y0[0]+c0,k0=n0*y0[1]+u0,R0=n0*b0[0]+c0,j0=n0*b0[1]+u0,C0=n0*E0[0]+c0,$0=n0*E0[1]+u0;m0===0&&(p0.push(w0,v0),A0.push(w0,v0)),p0.push(S0,k0,R0,j0,C0,$0),A0.push(S0,k0),m0===x0-1&&A0.push(C0,$0)}o0.push({bezier:H0(d0=G1,g$,r5).call(d0,p0,s0,this.rotation),points:H0(h0=G1,g$,r5).call(h0,A0,s0,this.rotation)})}return o0},n5=function(){let n0=1/0,a0=-1/0,i0=1/0,s0=-1/0;for(const o0 of this.paths)for(const[l0,c0,u0,d0]of o0){const h0=Util.bezierBoundingBox(...l0,...c0,...u0,...d0);n0=Math.min(n0,h0[0]),i0=Math.min(i0,h0[1]),a0=Math.max(a0,h0[2]),s0=Math.max(s0,h0[3])}
741return[n0,i0,a0,s0]},z2=function(){return _0(this,J_)?Math.ceil(this.thickness*this.parentScale):0},YF=function(n0=!1){if(this.isEmpty())return;if(!_0(this,J_)){H0(this,Zw,iP).call(this);return}const a0=H0(this,Zw,n5).call(this),i0=H0(this,Zw,z2).call(this);V0(this,fL,Math.max(AnnotationEditor.MIN_SIZE,a0[2]-a0[0])),V0(this,hL,Math.max(AnnotationEditor.MIN_SIZE,a0[3]-a0[1]));const s0=Math.ceil(i0+_0(this,fL)*this.scaleFactor),o0=Math.ceil(i0+_0(this,hL)*this.scaleFactor),[l0,c0]=this.parentDimensions;this.width=s0/l0,this.height=o0/c0,this.setAspectRatio(s0,o0);const u0=this.translationX,d0=this.translationY;this.translationX=-a0[0],this.translationY=-a0[1],H0(this,Zw,IL).call(this),H0(this,Zw,iP).call(this),V0(this,xL,s0),V0(this,yL,o0),this.setDims(s0,o0);const h0=n0?i0/this.scaleFactor/2:0;this.translate(u0-this.translationX-h0,d0-this.translationY-h0)},K0(G1,g$),Gw(G1,"_defaultColor",null),Gw(G1,"_defaultOpacity",1),Gw(G1,"_defaultThickness",1),Gw(G1,"_type","ink"),Gw(G1,"_editorType",AnnotationEditorType.INK);let InkEditor=G1;var W1,g_,Q$,c$,q$,PF,LR,u$,BR,V_,MF,k1,XF,JF,V2,a5,Zz,G2,i5,H2,eV,tV;const ZF=class ZF extends AnnotationEditor{constructor(n0){super({...n0,name:"stampEditor"});K0(this,k1);K0(this,W1,null);K0(this,g_,null);K0(this,Q$,null);K0(this,c$,null);K0(this,q$,null);K0(this,PF,"");K0(this,LR,null);K0(this,u$,null);K0(this,BR,null);K0(this,V_,!1);K0(this,MF,!1);V0(this,c$,n0.bitmapUrl),V0(this,q$,n0.bitmapFile)}static initialize(n0,a0){AnnotationEditor.initialize(n0,a0)}static get supportedTypes(){return shadow(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(a0=>`image/${a0}`))}static get supportedTypesStr(){return shadow(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(n0){return this.supportedTypes.includes(n0)}static paste(n0,a0){a0.pasteEditor(AnnotationEditorType.STAMP,{bitmapFile:n0.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var n0;return{type:"stamp",hasAltText:!!((n0=this.altTextData)!=null&&n0.altText)}}static computeTelemetryFinalData(n0){const a0=n0.get("hasAltText");return{hasAltText:a0.get(!0)??0,hasNoAltText:a0.get(!1)??0}}async mlGuessAltText(n0=null,a0=!0){if(this.hasAltTextData())return null;const{mlManager:i0}=this._uiManager;if(!i0)throw new Error("No ML.");if(!await i0.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:s0,width:o0,height:l0}=n0||this.copyCanvas(null,null,!0).imageData,c0=await i0.guess({name:"altText",request:{data:s0,width:o0,height:l0,channels:s0.length/(o0*l0)}});if(!c0)throw new Error("No response from the AI service.");if(c0.error)throw new Error("Error from the AI service.");if(c0.cancel)return null;if(!c0.output)throw new Error("No valid response from the AI service.");const u0=c0.output;return await this.setGuessedAltText(u0),a0&&!this.hasAltTextData()&&(this.altTextData={alt:u0,decorative:!1}),u0}remove(){var n0,a0;_0(this,g_)&&(V0(this,W1,null),this._uiManager.imageManager.deleteId(_0(this,g_)),(n0=_0(this,LR))==null||n0.remove(),V0(this,LR,null),(a0=_0(this,u$))==null||a0.disconnect(),V0(this,u$,null),_0(this,BR)&&(clearTimeout(_0(this,BR)),V0(this,BR,null))),super.remove()}rebuild(){if(!this.parent){_0(this,g_)&&H0(this,k1,V2).call(this);return}super.rebuild(),this.div!==null&&(_0(this,g_)&&_0(this,LR)===null&&H0(this,k1,V2).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(_0(this,Q$)||_0(this,W1)||_0(this,c$)||_0(this,q$)||_0(this,g_))}get isResizable(){return!0}render(){if(this.div)return this.div;let n0,a0;if(this.width&&(n0=this.x,a0=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),_0(this,W1)?H0(this,k1,a5).call(this):H0(this,k1,V2).call(this),this.width&&!this.annotationElementId){const[i0,s0]=this.parentDimensions;this.setAt(n0*i0,a0*s0,this.width*i0,this.height*s0)}return this.div}copyCanvas(n0,a0,i0=!1){var p0;n0||(n0=224);const{width:s0,height:o0}=_0(this,W1),l0=new OutputScale;let c0=_0(this,W1),u0=s0,d0=o0,h0=null;if(a0){if(s0>a0||o0>a0){const k0=Math.min(a0/s0,a0/o0);u0=Math.floor(s0*k0),d0=Math.floor(o0*k0)}h0=document.createElement("canvas");const A0=h0.width=Math.ceil(u0*l0.sx),m0=h0.height=Math.ceil(d0*l0.sy);
vendor: 5,175 bytes, line 741
741_0(this,V_)||(c0=H0(this,k1,G2).call(this,A0,m0));const x0=h0.getContext("2d");x0.filter=this._uiManager.hcmFilter;let g0="white",y0="#cfcfd8";this._uiManager.hcmFilter!=="none"?y0="black":(p0=window.matchMedia)!=null&&p0.call(window,"(prefers-color-scheme: dark)").matches&&(g0="#8f8f9d",y0="#42414d");const b0=15,E0=b0*l0.sx,w0=b0*l0.sy,v0=new OffscreenCanvas(E0*2,w0*2),S0=v0.getContext("2d");S0.fillStyle=g0,S0.fillRect(0,0,E0*2,w0*2),S0.fillStyle=y0,S0.fillRect(0,0,E0,w0),S0.fillRect(E0,w0,E0,w0),x0.fillStyle=x0.createPattern(v0,"repeat"),x0.fillRect(0,0,A0,m0),x0.drawImage(c0,0,0,c0.width,c0.height,0,0,A0,m0)}let f0=null;if(i0){let A0,m0;if(l0.symmetric&&c0.width<n0&&c0.height<n0)A0=c0.width,m0=c0.height;else if(c0=_0(this,W1),s0>n0||o0>n0){const y0=Math.min(n0/s0,n0/o0);A0=Math.floor(s0*y0),m0=Math.floor(o0*y0),_0(this,V_)||(c0=H0(this,k1,G2).call(this,A0,m0))}const g0=new OffscreenCanvas(A0,m0).getContext("2d",{willReadFrequently:!0});g0.drawImage(c0,0,0,c0.width,c0.height,0,0,A0,m0),f0={width:A0,height:m0,data:g0.getImageData(0,0,A0,m0).data}}return{canvas:h0,width:u0,height:d0,imageData:f0}}getImageForAltText(){return _0(this,LR)}static async deserialize(n0,a0,i0){var m0;let s0=null;if(n0 instanceof StampAnnotationElement){const{data:{rect:x0,rotation:g0,id:y0,structParent:b0,popupRef:E0},container:w0,parent:{page:{pageNumber:v0}}}=n0,S0=w0.querySelector("canvas"),k0=i0.imageManager.getFromCanvas(w0.id,S0);S0.remove();const R0=((m0=await a0._structTree.getAriaAttributes(`${AnnotationPrefix}${y0}`))==null?void 0:m0.get("aria-label"))||"";s0=n0={annotationType:AnnotationEditorType.STAMP,bitmapId:k0.id,bitmap:k0.bitmap,pageIndex:v0-1,rect:x0.slice(0),rotation:g0,id:y0,deleted:!1,accessibilityData:{decorative:!1,altText:R0},isSvg:!1,structParent:b0,popupRef:E0}}const o0=await super.deserialize(n0,a0,i0),{rect:l0,bitmap:c0,bitmapUrl:u0,bitmapId:d0,isSvg:h0,accessibilityData:f0}=n0;d0&&i0.imageManager.isValidId(d0)?(V0(o0,g_,d0),c0&&V0(o0,W1,c0)):V0(o0,c$,u0),V0(o0,V_,h0);const[p0,A0]=o0.pageDimensions;return o0.width=(l0[2]-l0[0])/p0,o0.height=(l0[3]-l0[1])/A0,o0.annotationElementId=n0.id||null,f0&&(o0.altTextData=f0),o0._initialData=s0,V0(o0,MF,!!s0),o0}serialize(n0=!1,a0=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i0={annotationType:AnnotationEditorType.STAMP,bitmapId:_0(this,g_),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:_0(this,V_),structTreeParentId:this._structTreeParentId};if(n0)return i0.bitmapUrl=H0(this,k1,H2).call(this,!0),i0.accessibilityData=this.serializeAltText(!0),i0;const{decorative:s0,altText:o0}=this.serializeAltText(!1);if(!s0&&o0&&(i0.accessibilityData={type:"Figure",alt:o0}),this.annotationElementId){const c0=H0(this,k1,tV).call(this,i0);if(c0.isSame)return null;c0.isSameAltText?delete i0.accessibilityData:i0.accessibilityData.structParent=this._initialData.structParent??-1}if(i0.id=this.annotationElementId,a0===null)return i0;a0.stamps||(a0.stamps=new Map);const l0=_0(this,V_)?(i0.rect[2]-i0.rect[0])*(i0.rect[3]-i0.rect[1]):null;if(!a0.stamps.has(_0(this,g_)))a0.stamps.set(_0(this,g_),{area:l0,serialized:i0}),i0.bitmap=H0(this,k1,H2).call(this,!1);else if(_0(this,V_)){const c0=a0.stamps.get(_0(this,g_));l0>c0.area&&(c0.area=l0,c0.serialized.bitmap.close(),c0.serialized.bitmap=H0(this,k1,H2).call(this,!1))}return i0}renderAnnotationElement(n0){return n0.updateEdited({rect:this.getRect(0,0)}),null}};W1=new WeakMap,g_=new WeakMap,Q$=new WeakMap,c$=new WeakMap,q$=new WeakMap,PF=new WeakMap,LR=new WeakMap,u$=new WeakMap,BR=new WeakMap,V_=new WeakMap,MF=new WeakMap,k1=new WeakSet,XF=function(n0,a0=!1){if(!n0){this.remove();return}V0(this,W1,n0.bitmap),a0||(V0(this,g_,n0.id),V0(this,V_,n0.isSvg)),n0.file&&V0(this,PF,n0.file.name),H0(this,k1,a5).call(this)},JF=function(){if(V0(this,Q$,null),this._uiManager.enableWaiting(!1),!!_0(this,LR)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&_0(this,W1)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&_0(this,W1)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},V2=function(){if(_0(this,g_)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(_0(this,g_)).then(i0=>H0(this,k1,XF).call(this,i0,!0)).finally(()=>H0(this,k1,JF).call(this));return}if(_0(this,c$)){const i0=_0(this,c$);V0(this,c$,null),this._uiManager.enableWaiting(!0),V0(this,Q$,this._uiManager.imageManager.getFromUrl(i0).then(s0=>H0(this,k1,XF).call(this,s0)).finally(()=>H0(this,k1,JF).call(this)));return}if(_0(this,q$)){const i0=_0(this,q$);V0(this,q$,null),this._uiManager.enableWaiting(!0),V0(this,Q$,this._uiManager.imageManager.getFromFile(i0).then(s0=>H0(this,k1,XF).call(this,s0)).finally(()=>H0(this,k1,JF).call(this)));return}const n0=document.createElement("input");n0.type="file",n0.accept=ZF.supportedTypesStr;const a0=this._uiManager._signal;V0(this,Q$,new Promise(i0=>{n0.addEventListener("change",async()=>
741{if(!n0.files||n0.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const s0=await this._uiManager.imageManager.getFromFile(n0.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),H0(this,k1,XF).call(this,s0)}i0()},{signal:a0}),n0.addEventListener("cancel",()=>{this.remove(),i0()},{signal:a0})}).finally(()=>H0(this,k1,JF).call(this))),n0.click()},a5=function(){const{div:n0}=this;let{width:a0,height:i0}=_0(this,W1);const[s0,o0]=this.pageDimensions,l0=.75;if(this.width)a0=this.width*s0,i0=this.height*o0;else if(a0>l0*s0||i0>l0*o0){const h0=Math.min(l0*s0/a0,l0*o0/i0);a0*=h0,i0*=h0}const[c0,u0]=this.parentDimensions;this.setDims(a0*c0/s0,i0*u0/o0),this._uiManager.enableWaiting(!1);const d0=V0(this,LR,document.createElement("canvas"));d0.setAttribute("role","img"),this.addContainer(d0),(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(n0.hidden=!1),H0(this,k1,i5).call(this,a0,i0),H0(this,k1,eV).call(this),_0(this,MF)||(this.parent.addUndoableEditor(this),V0(this,MF,!0)),this._reportTelemetry({action:"inserted_image"}),_0(this,PF)&&d0.setAttribute("aria-label",_0(this,PF))},Zz=function(n0,a0){var l0;const[i0,s0]=this.parentDimensions;this.width=n0/i0,this.height=a0/s0,(l0=this._initialOptions)!=null&&l0.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,_0(this,BR)!==null&&clearTimeout(_0(this,BR)),V0(this,BR,setTimeout(()=>{V0(this,BR,null),H0(this,k1,i5).call(this,n0,a0)},200))},G2=function(n0,a0){const{width:i0,height:s0}=_0(this,W1);let o0=i0,l0=s0,c0=_0(this,W1);for(;o0>2*n0||l0>2*a0;){const u0=o0,d0=l0;o0>2*n0&&(o0=o0>=16384?Math.floor(o0/2)-1:Math.ceil(o0/2)),l0>2*a0&&(l0=l0>=16384?Math.floor(l0/2)-1:Math.ceil(l0/2));const h0=new OffscreenCanvas(o0,l0);h0.getContext("2d").drawImage(c0,0,0,u0,d0,0,0,o0,l0),c0=h0.transferToImageBitmap()}return c0},i5=function(n0,a0){const i0=new OutputScale,s0=Math.ceil(n0*i0.sx),o0=Math.ceil(a0*i0.sy),l0=_0(this,LR);if(!l0||l0.width===s0&&l0.height===o0)return;l0.width=s0,l0.height=o0;const c0=_0(this,V_)?_0(this,W1):H0(this,k1,G2).call(this,s0,o0),u0=l0.getContext("2d");u0.filter=this._uiManager.hcmFilter,u0.drawImage(c0,0,0,c0.width,c0.height,0,0,s0,o0)},H2=function(n0){if(n0){if(_0(this,V_)){const s0=this._uiManager.imageManager.getSvgUrl(_0(this,g_));if(s0)return s0}const a0=document.createElement("canvas");return{width:a0.width,height:a0.height}=_0(this,W1),a0.getContext("2d").drawImage(_0(this,W1),0,0),a0.toDataURL()}if(_0(this,V_)){const[a0,i0]=this.pageDimensions,s0=Math.round(this.width*a0*PixelsPerInch.PDF_TO_CSS_UNITS),o0=Math.round(this.height*i0*PixelsPerInch.PDF_TO_CSS_UNITS),l0=new OffscreenCanvas(s0,o0);return l0.getContext("2d").drawImage(_0(this,W1),0,0,_0(this,W1).width,_0(this,W1).height,0,0,s0,o0),l0.transferToImageBitmap()}return structuredClone(_0(this,W1))},eV=function(){this._uiManager._signal&&(V0(this,u$,new ResizeObserver(n0=>{const a0=n0[0].contentRect;a0.width&&a0.height&&H0(this,k1,Zz).call(this,a0.width,a0.height)})),_0(this,u$).observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{var n0;(n0=_0(this,u$))==null||n0.disconnect(),V0(this,u$,null)},{once:!0}))},tV=function(n0){var u0;const{rect:a0,pageIndex:i0,accessibilityData:{altText:s0}}=this._initialData,o0=n0.rect.every((d0,h0)=>Math.abs(d0-a0[h0])<1),l0=n0.pageIndex===i0,c0=(((u0=n0.accessibilityData)==null?void 0:u0.alt)||"")===s0;return{isSame:o0&&l0&&c0,isSameAltText:c0}},Gw(ZF,"_type","stamp"),Gw(ZF,"_editorType",AnnotationEditorType.STAMP);let StampEditor=ZF;var bL,OF,FR,Y$,d$,G_,X$,DF,LF,S_,h$,d1,J$,x_,rV,s5,o5,l5,W2;const rR=class rR{constructor({uiManager:e0,pageIndex:n0,div:a0,structTreeLayer:i0,accessibilityManager:s0,annotationLayer:o0,drawLayer:l0,textLayer:c0,viewport:u0,l10n:d0}){K0(this,x_);K0(this,bL);K0(this,OF,!1);K0(this,FR,null);K0(this,Y$,null);K0(this,d$,null);K0(this,G_,new Map);K0(this,X$,!1);K0(this,DF,!1);K0(this,LF,!1);K0(this,S_,null);K0(this,h$,null);K0(this,d1);const h0=[..._0(rR,J$).values()];if(!rR._initialized){rR._initialized=!0;for(const f0 of h0)f0.initialize(d0,e0)}
741e0.registerEditorTypes(h0),V0(this,d1,e0),this.pageIndex=n0,this.div=a0,V0(this,bL,s0),V0(this,FR,o0),this.viewport=u0,V0(this,S_,c0),this.drawLayer=l0,this._structTree=i0,_0(this,d1).addLayer(this)}get isEmpty(){return _0(this,G_).size===0}get isInvisible(){return this.isEmpty&&_0(this,d1).getMode()===AnnotationEditorType.NONE}updateToolbar(e0){_0(this,d1).updateToolbar(e0)}updateMode(e0=_0(this,d1).getMode()){switch(H0(this,x_,W2).call(this),e0){case AnnotationEditorType.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case AnnotationEditorType.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case AnnotationEditorType.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:n0}=this.div;for(const a0 of _0(rR,J$).values())n0.toggle(`${a0._type}Editing`,e0===a0._editorType);this.div.hidden=!1}hasTextLayer(e0){var n0;return e0===((n0=_0(this,S_))==null?void 0:n0.div)}addInkEditorIfNeeded(e0){if(_0(this,d1).getMode()!==AnnotationEditorType.INK)return;if(!e0){for(const a0 of _0(this,G_).values())if(a0.isEmpty()){a0.setInBackground();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(e0){_0(this,d1).setEditingState(e0)}addCommands(e0){_0(this,d1).addCommands(e0)}toggleDrawing(e0=!1){this.div.classList.toggle("drawing",!e0)}togglePointerEvents(e0=!1){this.div.classList.toggle("disabled",!e0)}toggleAnnotationLayerPointerEvents(e0=!1){var n0;(n0=_0(this,FR))==null||n0.div.classList.toggle("disabled",!e0)}async enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);const e0=new Set;for(const a0 of _0(this,G_).values())a0.enableEditing(),a0.show(!0),a0.annotationElementId&&(_0(this,d1).removeChangedExistingAnnotation(a0),e0.add(a0.annotationElementId));if(!_0(this,FR))return;const n0=_0(this,FR).getEditableAnnotations();for(const a0 of n0){if(a0.hide(),_0(this,d1).isDeletedAnnotationElement(a0.data.id)||e0.has(a0.data.id))continue;const i0=await this.deserialize(a0);i0&&(this.addOrRebuild(i0),i0.enableEditing())}}disable(){var i0;V0(this,LF,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const e0=new Map,n0=new Map;for(const s0 of _0(this,G_).values())if(s0.disableEditing(),!!s0.annotationElementId){if(s0.serialize()!==null){e0.set(s0.annotationElementId,s0);continue}else n0.set(s0.annotationElementId,s0);(i0=this.getEditableAnnotation(s0.annotationElementId))==null||i0.show(),s0.remove()}if(_0(this,FR)){const s0=_0(this,FR).getEditableAnnotations();for(const o0 of s0){const{id:l0}=o0.data;if(_0(this,d1).isDeletedAnnotationElement(l0))continue;let c0=n0.get(l0);if(c0){c0.resetAnnotationElement(o0),c0.show(!1),o0.show();continue}c0=e0.get(l0),c0&&(_0(this,d1).addChangedExistingAnnotation(c0),c0.renderAnnotationElement(o0)&&c0.show(!1)),o0.show()}}H0(this,x_,W2).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:a0}=this.div;for(const s0 of _0(rR,J$).values())a0.remove(`${s0._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),V0(this,LF,!1)}getEditableAnnotation(e0){var n0;return((n0=_0(this,FR))==null?void 0:n0.getEditableAnnotation(e0))||null}setActiveEditor(e0){_0(this,d1).getActive()!==e0&&_0(this,d1).setActiveEditor(e0)}enableTextSelection(){var e0;if(this.div.tabIndex=-1,(e0=_0(this,S_))!=null&&e0.div&&!_0(this,h$)){V0(this,h$,new AbortController);const n0=_0(this,d1).combinedSignal(_0(this,h$));_0(this,S_).div.addEventListener("pointerdown",H0(this,x_,rV).bind(this),{signal:n0}),_0(this,S_).div.classList.add("highlighting")}}disableTextSelection(){var e0;this.div.tabIndex=0,(e0=_0(this,S_))!=null&&e0.div&&_0(this,h$)&&(_0(this,h$).abort(),V0(this,h$,null),_0(this,S_).div.classList.remove("highlighting"))}enableClick(){if(_0(this,Y$))return;V0(this,Y$,new AbortController);const e0=_0(this,d1).combinedSignal(_0(this,Y$));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e0}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:e0})}disableClick(){var e0;(e0=_0(this,Y$))==null||e0.abort(),V0(this,Y$,null)}attach(e0){_0(this,G_).set(e0.id,e0);const{annotationElementId:n0}=e0;n0&&_0(this,d1).isDeletedAnnotationElement(n0)&&_0(this,d1).removeDeletedAnnotationElement(e0)}detach(e0){var n0;_0(this,G_).delete(e0.id),(n0=_0(this,bL))==null||n0.removePointerInTextLayer(e0.contentDiv),!_0(this,LF)&&e0.annotationElementId&&_0(this,d1).addDeletedAnnotationElement(e0)}remove(e0){this.detach(e0),_0(this,d1).removeEditor(e0),e0.div.remove(),e0.isAttachedToDOM=!1,_0(this,DF)||this.addInkEditorIfNeeded(!1)}changeParent(e0){var n0;e0.parent!==this&&(e0.parent&&e0.annotationElementId&&(_0(this,d1).addDeletedAnnotationElement(e0.annotationElementId),AnnotationEditor.deleteAnnotationElement(e0),e0.annotationElementId=null),this.attach(e0),(n0=e0.parent)==null||n0.detach(e0),e0.setParent(this),e0.div&&e0.isAttachedToDOM&&(e0.div.remove(),this.div.append(e0.div)))}
741add(e0){if(!(e0.parent===this&&e0.isAttachedToDOM)){if(this.changeParent(e0),_0(this,d1).addEditor(e0),this.attach(e0),!e0.isAttachedToDOM){const n0=e0.render();this.div.append(n0),e0.isAttachedToDOM=!0}e0.fixAndSetPosition(),e0.onceAdded(),_0(this,d1).addToAnnotationStorage(e0),e0._reportTelemetry(e0.telemetryInitialData)}}moveEditorInDOM(e0){var a0;if(!e0.isAttachedToDOM)return;const{activeElement:n0}=document;e0.div.contains(n0)&&!_0(this,d$)&&(e0._focusEventsAllowed=!1,V0(this,d$,setTimeout(()=>{V0(this,d$,null),e0.div.contains(document.activeElement)?e0._focusEventsAllowed=!0:(e0.div.addEventListener("focusin",()=>{e0._focusEventsAllowed=!0},{once:!0,signal:_0(this,d1)._signal}),n0.focus())},0))),e0._structTreeParentId=(a0=_0(this,bL))==null?void 0:a0.moveElementInDOM(this.div,e0.div,e0.contentDiv,!0)}addOrRebuild(e0){e0.needsToBeRebuilt()?(e0.parent||(e0.parent=this),e0.rebuild(),e0.show()):this.add(e0)}addUndoableEditor(e0){const n0=()=>e0._uiManager.rebuild(e0),a0=()=>{e0.remove()};this.addCommands({cmd:n0,undo:a0,mustExec:!1})}getNextId(){return _0(this,d1).getId()}combinedSignal(e0){return _0(this,d1).combinedSignal(e0)}canCreateNewEmptyEditor(){var e0;return(e0=_0(this,x_,s5))==null?void 0:e0.canCreateNewEmptyEditor()}pasteEditor(e0,n0){_0(this,d1).updateToolbar(e0),_0(this,d1).updateMode(e0);const{offsetX:a0,offsetY:i0}=H0(this,x_,l5).call(this),s0=this.getNextId(),o0=H0(this,x_,o5).call(this,{parent:this,id:s0,x:a0,y:i0,uiManager:_0(this,d1),isCentered:!0,...n0});o0&&this.add(o0)}async deserialize(e0){var n0;return await((n0=_0(rR,J$).get(e0.annotationType??e0.annotationEditorType))==null?void 0:n0.deserialize(e0,this,_0(this,d1)))||null}createAndAddNewEditor(e0,n0,a0={}){const i0=this.getNextId(),s0=H0(this,x_,o5).call(this,{parent:this,id:i0,x:e0.offsetX,y:e0.offsetY,uiManager:_0(this,d1),isCentered:n0,...a0});return s0&&this.add(s0),s0}addNewEditor(){this.createAndAddNewEditor(H0(this,x_,l5).call(this),!0)}setSelected(e0){_0(this,d1).setSelected(e0)}toggleSelected(e0){_0(this,d1).toggleSelected(e0)}unselect(e0){_0(this,d1).unselect(e0)}pointerup(e0){const{isMac:n0}=util_FeatureTest.platform;if(!(e0.button!==0||e0.ctrlKey&&n0)&&e0.target===this.div&&_0(this,X$)){if(V0(this,X$,!1),!_0(this,OF)){V0(this,OF,!0);return}if(_0(this,d1).getMode()===AnnotationEditorType.STAMP){_0(this,d1).unselectAll();return}this.createAndAddNewEditor(e0,!1)}}pointerdown(e0){if(_0(this,d1).getMode()===AnnotationEditorType.HIGHLIGHT&&this.enableTextSelection(),_0(this,X$)){V0(this,X$,!1);return}const{isMac:n0}=util_FeatureTest.platform;if(e0.button!==0||e0.ctrlKey&&n0||e0.target!==this.div)return;V0(this,X$,!0);const a0=_0(this,d1).getActive();V0(this,OF,!a0||a0.isEmpty())}findNewParent(e0,n0,a0){const i0=_0(this,d1).findParent(n0,a0);return i0===null||i0===this?!1:(i0.changeParent(e0),!0)}destroy(){var e0,n0;((e0=_0(this,d1).getActive())==null?void 0:e0.parent)===this&&(_0(this,d1).commitOrRemove(),_0(this,d1).setActiveEditor(null)),_0(this,d$)&&(clearTimeout(_0(this,d$)),V0(this,d$,null));for(const a0 of _0(this,G_).values())(n0=_0(this,bL))==null||n0.removePointerInTextLayer(a0.contentDiv),a0.setParent(null),a0.isAttachedToDOM=!1,a0.div.remove();this.div=null,_0(this,G_).clear(),_0(this,d1).removeLayer(this)}render({viewport:e0}){this.viewport=e0,setLayerDimensions(this.div,e0);for(const n0 of _0(this,d1).getEditors(this.pageIndex))this.add(n0),n0.rebuild();this.updateMode()}update({viewport:e0}){_0(this,d1).commitOrRemove(),H0(this,x_,W2).call(this);const n0=this.viewport.rotation,a0=e0.rotation;if(this.viewport=e0,setLayerDimensions(this.div,{rotation:a0}),n0!==a0)for(const i0 of _0(this,G_).values())i0.rotate(a0);this.addInkEditorIfNeeded(!1)}get pageDimensions(){const{pageWidth:e0,pageHeight:n0}=this.viewport.rawDims;return[e0,n0]}get scale(){return _0(this,d1).viewParameters.realScale}};bL=new WeakMap,OF=new WeakMap,FR=new WeakMap,Y$=new WeakMap,d$=new WeakMap,G_=new WeakMap,X$=new WeakMap,DF=new WeakMap,LF=new WeakMap,S_=new WeakMap,h$=new WeakMap,d1=new WeakMap,J$=new WeakMap,x_=new WeakSet,rV=function(e0){_0(this,d1).unselectAll();const{target:n0}=e0;if(n0===_0(this,S_).div||(n0.getAttribute("role")==="img"||n0.classList.contains("endOfContent"))&&_0(this,S_).div.contains(n0)){const{isMac:a0}=util_FeatureTest.platform;if(e0.button!==0||e0.ctrlKey&&a0)return;_0(this,d1).showAllEditors("highlight",!0,!0),_0(this,S_).div.classList.add("free"),this.toggleDrawing(),HighlightEditor.startHighlighting(this,_0(this,d1).direction==="ltr",{target:_0(this,S_).div,x:e0.x,y:e0.y}),_0(this,S_).div.addEventListener("pointerup",()=>{_0(this,S_).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:_0(this,d1)._signal}),e0.preventDefault()}},s5=function(){return _0(rR,J$).get(_0(this,d1).getMode())},o5=function(e0){const n0=_0(this,x_,s5);return n0?new n0.prototype.constructor(e0):null},l5=function(){const{x:e0,y:n0,width:a0,height:i0}=this.div.getBoundingClientRect(),s0=Math.max(0,e0),o0=Math.max(0,n0),l0=Math.min(window.innerWidth,e0+a0),c0=Math.min(window.innerHeight,n0+i0),u0=(s0+l0)/2-e0,d0=(o0+c0)/2-n0,[h0,f0]=this.viewport.rotation%180===0?[u0,d0]:[d0,u0];return{offsetX:h0,offsetY:f0}},W2=function(){V0(this,DF,!0);for(const e0 of _0(this,G_).values())e0.isEmpty()&&e0.remove();V0(this,DF,!1)},Gw(rR,"_initialized",!1),K0(rR,J$,new Map([FreeTextEditor,InkEditor,StampEditor,HighlightEditor].map(e0=>[e0._editorType,e0])));let AnnotationEditorLayer=rR;var UR,A2,J1,f$,g2,c5,EL,u5,nV;
741const p_=class p_{constructor({pageIndex:e0}){K0(this,EL);K0(this,UR,null);K0(this,A2,0);K0(this,J1,new Map);K0(this,f$,new Map);this.pageIndex=e0}setParent(e0){if(!_0(this,UR)){V0(this,UR,e0);return}if(_0(this,UR)!==e0){if(_0(this,J1).size>0)for(const n0 of _0(this,J1).values())n0.remove(),e0.append(n0);V0(this,UR,e0)}}static get _svgFactory(){return shadow(this,"_svgFactory",new DOMSVGFactory)}draw(e0,n0,a0,i0=!1){const s0=o_(this,A2)._++,o0=H0(this,EL,u5).call(this,e0.box);o0.classList.add(...e0.classNamesForDrawing);const l0=p_._svgFactory.createElement("defs");o0.append(l0);const c0=p_._svgFactory.createElement("path");l0.append(c0);const u0=`path_p${this.pageIndex}_${s0}`;c0.setAttribute("id",u0),c0.setAttribute("d",e0.toSVGPath()),i0&&_0(this,f$).set(s0,c0);const d0=H0(this,EL,nV).call(this,l0,u0),h0=p_._svgFactory.createElement("use");return o0.append(h0),o0.setAttribute("fill",n0),o0.setAttribute("fill-opacity",a0),h0.setAttribute("href",`#${u0}`),_0(this,J1).set(s0,o0),{id:s0,clipPathId:`url(#${d0})`}}drawOutline(e0){const n0=o_(this,A2)._++,a0=H0(this,EL,u5).call(this,e0.box);a0.classList.add(...e0.classNamesForOutlining);const i0=p_._svgFactory.createElement("defs");a0.append(i0);const s0=p_._svgFactory.createElement("path");i0.append(s0);const o0=`path_p${this.pageIndex}_${n0}`;s0.setAttribute("id",o0),s0.setAttribute("d",e0.toSVGPath()),s0.setAttribute("vector-effect","non-scaling-stroke");let l0;if(e0.mustRemoveSelfIntersections){const d0=p_._svgFactory.createElement("mask");i0.append(d0),l0=`mask_p${this.pageIndex}_${n0}`,d0.setAttribute("id",l0),d0.setAttribute("maskUnits","objectBoundingBox");const h0=p_._svgFactory.createElement("rect");d0.append(h0),h0.setAttribute("width","1"),h0.setAttribute("height","1"),h0.setAttribute("fill","white");const f0=p_._svgFactory.createElement("use");d0.append(f0),f0.setAttribute("href",`#${o0}`),f0.setAttribute("stroke","none"),f0.setAttribute("fill","black"),f0.setAttribute("fill-rule","nonzero"),f0.classList.add("mask")}const c0=p_._svgFactory.createElement("use");a0.append(c0),c0.setAttribute("href",`#${o0}`),l0&&c0.setAttribute("mask",`url(#${l0})`);const u0=c0.cloneNode();return a0.append(u0),c0.classList.add("mainOutline"),u0.classList.add("secondaryOutline"),_0(this,J1).set(n0,a0),n0}finalizeLine(e0,n0){const a0=_0(this,f$).get(e0);_0(this,f$).delete(e0),this.updateBox(e0,n0.box),a0.setAttribute("d",n0.toSVGPath())}
741updateLine(e0,n0){_0(this,J1).get(e0).firstChild.firstChild.setAttribute("d",n0.toSVGPath())}updatePath(e0,n0){_0(this,f$).get(e0).setAttribute("d",n0.toSVGPath())}updateBox(e0,n0){var a0;H0(a0=p_,g2,c5).call(a0,_0(this,J1).get(e0),n0)}show(e0,n0){_0(this,J1).get(e0).classList.toggle("hidden",!n0)}rotate(e0,n0){_0(this,J1).get(e0).setAttribute("data-main-rotation",n0)}changeColor(e0,n0){_0(this,J1).get(e0).setAttribute("fill",n0)}changeOpacity(e0,n0){_0(this,J1).get(e0).setAttribute("fill-opacity",n0)}addClass(e0,n0){_0(this,J1).get(e0).classList.add(n0)}removeClass(e0,n0){_0(this,J1).get(e0).classList.remove(n0)}getSVGRoot(e0){return _0(this,J1).get(e0)}remove(e0){_0(this,f$).delete(e0),_0(this,UR)!==null&&(_0(this,J1).get(e0).remove(),_0(this,J1).delete(e0))}destroy(){V0(this,UR,null);for(const e0 of _0(this,J1).values())e0.remove();_0(this,J1).clear(),_0(this,f$).clear()}};UR=new WeakMap,A2=new WeakMap,J1=new WeakMap,f$=new WeakMap,g2=new WeakSet,c5=function(e0,{x:n0=0,y:a0=0,width:i0=1,height:s0=1}={}){const{style:o0}=e0;o0.top=`${100*a0}%`,o0.left=`${100*n0}%`,o0.width=`${100*i0}%`,o0.height=`${100*s0}%`},EL=new WeakSet,u5=function(e0){var a0;const n0=p_._svgFactory.create(1,1,!0);return _0(this,UR).append(n0),n0.setAttribute("aria-hidden",!0),H0(a0=p_,g2,c5).call(a0,n0,e0),n0},nV=function(e0,n0){const a0=p_._svgFactory.createElement("clipPath");e0.append(a0);const i0=`clip_${n0}`;a0.setAttribute("id",i0),a0.setAttribute("clipPathUnits","objectBoundingBox");const s0=p_._svgFactory.createElement("use");return a0.append(s0),s0.setAttribute("href",`#${n0}`),s0.classList.add("clip"),i0},K0(p_,g2);let DrawLayer=p_;__webpack_exports__.AbortException;__webpack_exports__.AnnotationEditorLayer;__webpack_exports__.AnnotationEditorParamsType;__webpack_exports__.AnnotationEditorType;__webpack_exports__.AnnotationEditorUIManager;__webpack_exports__.AnnotationLayer;__webpack_exports__.AnnotationMode;__webpack_exports__.ColorPicker;__webpack_exports__.DOMSVGFactory;__webpack_exports__.DrawLayer;__webpack_exports__.FeatureTest;var __webpack_exports__GlobalWorkerOptions=__webpack_exports__.GlobalWorkerOptions;__webpack_exports__.ImageKind;__webpack_exports__.InvalidPDFException;__webpack_exports__.MissingPDFException;__webpack_exports__.OPS;__webpack_exports__.OutputScale;__webpack_exports__.PDFDataRangeTransport;__webpack_exports__.PDFDateString;__webpack_exports__.PDFWorker;__webpack_exports__.PasswordResponses;__webpack_exports__.PermissionFlag;__webpack_exports__.PixelsPerInch;__webpack_exports__.RenderingCancelledException;__webpack_exports__.TextLayer;__webpack_exports__.UnexpectedResponseException;__webpack_exports__.Util;__webpack_exports__.VerbosityLevel;__webpack_exports__.XfaLayer;__webpack_exports__.build;__webpack_exports__.createValidAbsoluteUrl;__webpack_exports__.fetchData;var __webpack_exports__getDocument=__webpack_exports__.getDocument;__webpack_exports__.getFilenameFromUrl;__webpack_exports__.getPdfFilenameFromUrl;__webpack_exports__.getXfaPageViewport;__webpack_exports__.isDataScheme;__webpack_exports__.isPdfFile;__webpack_exports__.noContextMenu;__webpack_exports__.normalizeUnicode;__webpack_exports__.setLayerDimensions;__webpack_exports__.shadow;__webpack_exports__.version;const pdfWorkerUrl="/assets/pdf.worker.min-GB3t0DcA.mjs";function rgbToHex(r0,e0,n0){const a0=i0=>i0.toString(16).padStart(2,"0");return`#${a0(r0)}${a0(e0)}${a0(n0)}`}async function extractBriefStyle(r0,e0){var a0;const n0={primaryColor:"#111827",secondaryColor:"#6366f1",isSerif:!1,title:(e0==null?void 0:e0.replace(/\.pdf$/i,""))||"Brief"};try{const s0=await(await __webpack_exports__getDocument({data:r0.slice(0)}).promise).getPage(1);let o0=!1,l0=n0.title;try{const y0=(await s0.getTextContent()).items,b0=((a0=y0.find(w0=>w0.fontName))==null?void 0:a0.fontName)||"";o0=/serif|times|georgia|garamond|caslon|didot/i.test(b0);const E0=y0.find(w0=>w0.str&&w0.str.trim().length>3);E0&&(l0=E0.str.trim().slice(0,80))}catch{}const c0=s0.getViewport({scale:.4}),u0=document.createElement("canvas");u0.width=Math.min(400,Math.floor(c0.width)),u0.height=Math.min(520,Math.floor(c0.height));const d0=u0.getContext("2d");if(!d0)return{...n0,isSerif:o0,title:l0};await s0.render({canvasContext:d0,viewport:c0,canvas:u0}).promise;const{data:h0}=d0.getImageData(0,0,u0.width,u0.height),f0=new Map;for(let g0=0;g0<h0.length;g0+=4){const y0=h0[g0],b0=h0[g0+1],E0=h0[g0+2];if(h0[g0+3]<200)continue;const v0=Math.max(y0,b0,E0),S0=Math.min(y0,b0,E0);if(S0>235||v0<25||v0-S0<20&&v0>60&&v0<220)continue;
741const k0=y0>>3<<10|b0>>3<<5|E0>>3,R0=f0.get(k0);R0?(R0.count++,R0.r+=y0,R0.g+=b0,R0.b+=E0):f0.set(k0,{count:1,r:y0,g:b0,b:E0})}const p0=Array.from(f0.values()).sort((g0,y0)=>y0.count-g0.count);if(p0.length===0)return{...n0,isSerif:o0,title:l0};const A0=g0=>rgbToHex(Math.round(g0.r/g0.count),Math.round(g0.g/g0.count),Math.round(g0.b/g0.count)),m0=A0(p0[0]);let x0=p0[1]?A0(p0[1]):n0.secondaryColor;for(const g0 of p0.slice(1,20)){const y0=A0(g0),b0=parseInt(m0.slice(1,3),16)-parseInt(y0.slice(1,3),16),E0=parseInt(m0.slice(3,5),16)-parseInt(y0.slice(3,5),16),w0=parseInt(m0.slice(5,7),16)-parseInt(y0.slice(5,7),16);if(b0*b0+E0*E0+w0*w0>8e3){x0=y0;break}}return{primaryColor:m0,secondaryColor:x0,isSerif:o0,title:l0}}catch(i0){return console.warn("extractBriefStyle failed:",i0),n0}}__webpack_exports__GlobalWorkerOptions.workerSrc=pdfWorkerUrl;const SUPABASE_URL$2="https://unfpdgrtnhbfxinuktue.supabase.co";function arrayBufferToBase64(r0){const e0=new Uint8Array(r0);let n0="";const a0=32768;for(let i0=0;i0<e0.length;i0+=a0)n0+=String.fromCharCode.apply(null,Array.from(e0.subarray(i0,i0+a0)));return btoa(n0)}const GENRE_TERMS=new Set(["pop","disco","r&b","rnb","hip-hop","hiphop","rock","edm","folk","soul","jazz","latin","indie","alternative","dance-pop","dance pop","nu-disco","synth-pop","synthpop","alt-rock","pop-rock","digicore","country","ballad","funk","funky","electronic","acoustic","orchestral","k-pop","kpop"]),MOOD_STYLE_TERMS=new Set(["funky","dark","sexy","minimal","emotional","high-energy","upbeat","chill","raw","catchy","hook-driven","performance-driven","playful","satirical","dreamy","ethereal","aggressive","smooth","groovy","melodic","atmospheric","energetic","melancholic","happy","sad","romantic","nostalgic","epic","intimate","powerful","soft","hard","danceable","stripped","piano","guitar","summer","feel-good","addictive"]),VOCALIST_TERMS=new Map([["male","Male"],["female","Female"],["duet","Duet"],["instrumental","Instrumental"],["man","Male"],["woman","Female"],["guy","Male"],["girl","Female"]]),STOP_WORDS=new Set(["the","a","an","and","or","but","in","on","at","to","for","of","with","by","from","as","is","was","are","were","been","be","have","has","had","do","does","did","will","would","could","should","may","might","must","shall","can","this","that","these","those","i","you","he","she","it","we","they","who","what","which","when","where","why","how","all","each","every","both","few","more","most","other","some","such","no","nor","not","only","own","same","so","than","too","very","just","about","like","their","looking","new","track","single","album","project","description","direction","reference","style","similar"]);function useBriefAnalysis(r0,e0){const[n0,a0]=reactExports.useState(!1),[i0,s0]=reactExports.useState([]),[o0,l0]=reactExports.useState([]),[c0,u0]=reactExports.useState(null),[d0,h0]=reactExports.useState(null),[f0,p0]=reactExports.useState([]),[A0,m0]=reactExports.useState([]),[x0,g0]=reactExports.useState(null),[y0,b0]=reactExports.useState(null),[E0,w0]=reactExports.useState(""),[v0,S0]=reactExports.useState(null),[k0,R0]=reactExports.useState(null),j0=reactExports.useCallback(G0=>G0.map(F0=>({id:F0.id,name:F0.name,bpm:F0.bpm,key:F0.key,scale:F0.scale,genres:F0.genres||[],keywords:(F0.keywords||[]).slice(0,15),vocalistGender:F0.vocalistGender||"",writers:F0.writers||"",groove:F0.groove||"",lyrics:(F0.lyrics||"").slice(0,200),arKeywords:(F0.arKeywords||[]).slice(0,12),aiGeneratedDescription:(F0.aiGeneratedDescription||"").slice(0,500),aiReferenceArtists:(F0.aiReferenceArtists||[]).slice(0,12),aiSyncKeywords:(F0.aiPitchKeywords||[]).slice(0,12),aiMoodTags:(F0.aiMoodTags||[]).slice(0,12),aiInstrumentation:(F0.aiInstrumentation||[]).slice(0,12),aiEnergyLevel:F0.aiEnergyLevel||""})),[]),C0=reactExports.useCallback(async(G0,F0)=>{try{const{data:{session:Q0}}=await supabase.auth.getSession(),U0=await fetch(`${SUPABASE_URL$2}/functions/v1/analyze-brief`,{method:"POST",headers:{"Content-Type":"application/json",...Q0!=null&&Q0.access_token?{Authorization:`Bearer ${Q0.access_token}`}:{}},body:JSON.stringify({briefText:G0,songs:F0})});return U0.ok?await U0.json():(console.warn("AI brief analysis failed:",U0.status),null)}catch(Q0){return console.warn("AI brief analysis error:",Q0),null}},[]),$0=reactExports.useCallback(G0=>{const F0=G0.toLowerCase(),Q0=[],U0=F0.match(/\b[\w]+-[\w]+(?:-[\w]+)*\b/g)||[];Q0.push(...U0);const q0=F0.match(/"([^"]+)"/g)||[];Q0.push(...q0.map(J0=>J0.replace(/"/g,"")));const Rw=F0.replace(/[^\w\s-]/g," ").split(/\s+/).filter(J0=>J0.length>2).filter(J0=>!STOP_WORDS.has(J0));return[...new Set([...Q0,...Rw])].filter(J0=>{const Cw=J0.toLowerCase();return GENRE_TERMS.has(Cw)||MOOD_STYLE_TERMS.has(Cw)||VOCALIST_TERMS.has(Cw)||/^[A-Z][a-z]+/.test(J0)||/^\d{2,3}$/.test(J0)})},[]),T0=reactExports.useCallback((G0,F0)=>{const Q0=[];let U0=0;const q0=(G0.keywords||[]).map(X0=>X0.toLowerCase()),Rw=(G0.genres||[]).map(X0=>X0.toLowerCase()),_w=G0.name.toLowerCase(),J0=(G0.writers||"").toLowerCase(),Cw=(G0.groove||"").toLowerCase(),Ow=(G0.vocalistGender||"").toLowerCase(),jw=(G0.lyrics||"").toLowerCase();for(const X0 of F0){const Lw=X0.toLowerCase();if(q0.some(Ww=>Ww.includes(Lw)||Lw.includes(Ww))){U0+=10,Q0.includes(X0)||Q0.push(X0);continue}if(Rw.some(Ww=>Ww.includes(Lw)||Lw.includes(Ww))){U0+=8,Q0.includes(X0)||Q0.push(X0);continue}if(_w.includes(Lw)){U0+=5,Q0.includes(X0)||Q0.push(X0);continue}if(J0.includes(Lw)){U0+=5,Q0.includes(X0)||Q0.push(X0);continue}const Hw=VOCALIST_TERMS.get(Lw);if(Hw&&Ow.toLowerCase()===Hw.toLowerCase()){U0+=3,Q0.includes(X0)||Q0.push(X0);continue}if(Cw.includes(Lw)||Lw.includes(Cw)){U0+=3,Q0.includes(X0)||Q0.push(X0);continue}if(jw.includes(Lw)){U0+=2,Q0.includes(X0)||Q0.push(X0);continue}MOOD_STYLE_TERMS.has(Lw)&&`${q0.join(" ")} ${Rw.join(" ")} ${Cw} ${_w}`.includes(Lw)&&(U0+=4,Q0.includes(X0)||Q0.push(X0))}const Nw=F0.length*10;return{score:Nw>0?Math.min(100,Math.round(U0/Nw*100)):0,matchingTerms:Q0}},[]),I0=reactExports.useCallback(async(G0,F0,Q0,U0,q0,Rw,_w)=>{var J0;if(!e0)return null;try{const Cw=await supabase.from("brief_history").insert({owner_id:e0,source_type:G0,source_filename:_w||null,brief_text:F0.slice(0,1e4),extracted_keywords:Q0,ai_extracted_data:Rw,matched_song_count:U0,top_match_ids:q0.slice(0,10)}).select("id").single();return Cw.error?(console.error("Failed to save brief history:",Cw.error),null):((J0=Cw.data)==null?void 0:J0.id)||null}catch(Cw){return console.error("Brief history save error:",Cw),null}},[e0]),M0=reactExports.useCallback(async(G0,F0,Q0)=>{try{await supabase.from("brief_interactions").insert({brief_id:G0,song_id:F0,action:Q0})}catch(U0){console.error("Failed to track brief interaction:",U0)}},[]),N0=reactExports.useCallback(async(G0,F0="paste",Q0)=>{var U0;a0(!0),u0(null),h0(null),p0([]),m0([]),g0(null),w0(G0),S0(Q0||null);try{const q0=G0.slice(0,1e4),Rw=j0(r0);let _w=[],J0=null;try{if(J0=await C0(q0,Rw),J0&&J0.matches&&J0.matches.length>0){console.log("AI deep analysis successful:",J0.briefSummary),h0(J0.briefSummary||null),p0(J0.references||[]),m0(J0.targets||[]),J0.referenceTrack&&g0(J0.referenceTrack);const Ow=new Map(r0.map(Nw=>[Nw.id,Nw]));_w=J0.matches.filter(Nw=>Ow.has(Nw.songId)).map(Nw=>({song:Ow.get(Nw.songId),score:Nw.score,matchingTerms:Nw.matchedReferences,matchedReferences:Nw.matchedReferences,matchedTargets:Nw.matchedTargets||[],reason:Nw.reason,adaptationSuggestion:Nw.adaptationSuggestion||void 0})).sort((Nw,xw)=>xw.score-Nw.score);const jw=(J0.references||[]).map(Nw=>Nw.name);l0(jw)}}catch(Ow){console.warn("AI deep analysis failed, falling back:",Ow)}if(_w.length===0){const Ow=$0(q0);l0(Ow),Ow.length>0&&(_w=r0.map(jw=>{const{score:Nw,matchingTerms:xw}=T0(jw,Ow);return{song:jw,score:Nw,matchingTerms:xw,matchedReferences:[],matchedTargets:[],reason:"",adaptationSuggestion:void 0}}).filter(jw=>jw.score>=50&&jw.matchingTerms.length>=2).sort((jw,Nw)=>Nw.score-jw.score).slice(0,15))}s0(_w);
741const Cw=await I0(F0,q0,((U0=J0==null?void 0:J0.references)==null?void 0:U0.map(Ow=>Ow.name))||[],_w.length,_w.slice(0,10).map(Ow=>Ow.song.id),J0,Q0);return Cw&&u0(Cw),_w}finally{a0(!1)}},[r0,j0,C0,$0,T0,I0]),D0=reactExports.useCallback(async G0=>{const F0=await G0.arrayBuffer();extractBriefStyle(F0.slice(0),G0.name).then(b0).catch(()=>b0(null)),S0(G0.name);let Q0="";try{const U0=await __webpack_exports__getDocument({data:F0.slice(0)}).promise,q0=[];for(let Rw=1;Rw<=U0.numPages;Rw++){const J0=await(await U0.getPage(Rw)).getTextContent();q0.push(J0.items.map(Cw=>Cw.str).join(" "))}Q0=q0.join(` 742`).trim()}catch(U0){console.warn("Client-side PDF extraction failed, will try server fallback:",U0)}if(Q0.length>50)return Q0.slice(0,4e4);try{const U0=arrayBufferToBase64(F0),q0=await fetch(`${SUPABASE_URL$2}/functions/v1/extract-pdf-text`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pdfBase64:U0,filename:G0.name})});if(q0.ok){const _w=((await q0.json()).text||"").trim();if(_w.length>0)return _w.slice(0,4e4)}else console.warn("Server PDF extraction failed:",q0.status)}catch(U0){console.warn("Server PDF extraction error:",U0)}throw new Error("Could not read this PDF. It may be a scanned image. Please paste the text instead.")},[]),O0=reactExports.useCallback(()=>{s0([]),l0([]),u0(null),h0(null),p0([]),m0([]),g0(null),b0(null),w0(""),S0(null)},[]),B0=reactExports.useCallback((G0,F0)=>{c0&&M0(c0,G0,F0)},[c0,M0]),z0=reactExports.useCallback(async G0=>{if(i0.length!==0){R0(G0);try{const F0={format:G0,style:y0,title:(y0==null?void 0:y0.title)||(v0==null?void 0:v0.replace(/\.pdf$/i,""))||"Brief Matches",briefSummary:d0,briefText:E0.slice(0,4e3),targets:A0,references:f0,referenceTrack:x0,matches:i0.map(jw=>({songId:jw.song.id,name:jw.song.name,writers:jw.song.writers||"",bpm:jw.song.bpm,key:jw.song.key,scale:jw.song.scale,genres:jw.song.genres||[],vocalistGender:jw.song.vocalistGender||"",dropboxUrl:jw.song.dropboxUrl||"",score:jw.score,reason:jw.reason,matchedTargets:jw.matchedTargets||[],adaptationSuggestion:jw.adaptationSuggestion||""}))},{data:{session:Q0}}=await supabase.auth.getSession(),U0=await fetch(`${SUPABASE_URL$2}/functions/v1/generate-brief-results`,{method:"POST",headers:{"Content-Type":"application/json",...Q0!=null&&Q0.access_token?{Authorization:`Bearer ${Q0.access_token}`}:{}},body:JSON.stringify(F0)});if(!U0.ok)throw new Error(`Generation failed: ${U0.status}`);const q0=await U0.json(),Rw=atob(q0.base64),_w=new Uint8Array(Rw.length);for(let jw=0;jw<Rw.length;jw++)_w[jw]=Rw.charCodeAt(jw);const J0=new Blob([_w],{type:q0.mime}),Cw=URL.createObjectURL(J0),Ow=document.createElement("a");Ow.href=Cw,Ow.download=q0.filename,document.body.appendChild(Ow),Ow.click(),Ow.remove(),setTimeout(()=>URL.revokeObjectURL(Cw),1e3)}catch(F0){throw console.error("generateResultsDoc failed:",F0),F0}finally{R0(null)}}},[i0,y0,v0,d0,E0,A0,f0,x0]);return{analyzeBrief:N0,extractTextFromPdf:D0,isAnalyzing:n0,results:i0,extractedTerms:o0,briefSummary:d0,references:f0,targets:A0,referenceTrack:x0,currentBriefId:c0,clearResults:O0,onSongInteraction:B0,briefStyle:y0,generateResultsDoc:z0,isGeneratingDoc:k0}}function BriefView({songs:r0,onNavigateToSong:e0,onPlaySong:n0,currentPlayingSongId:a0,isPlaying:i0,ownerId:s0}
742){const{analyzeBrief:o0,extractTextFromPdf:l0,isAnalyzing:c0,results:u0,extractedTerms:d0,briefSummary:h0,references:f0,targets:p0,referenceTrack:A0,clearResults:m0,onSongInteraction:x0,generateResultsDoc:g0,isGeneratingDoc:y0}=useBriefAnalysis(r0,s0),b0=reactExports.useCallback(async w0=>{await o0(w0)},[o0]),E0=reactExports.useCallback(async w0=>await l0(w0),[l0]);return jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col min-h-0 bg-background overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:"p-4 md:p-6 border-b border-border shrink-0",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-primary/10 rounded-lg shrink-0",children:jsxRuntimeExports.jsx(FileSearch,{className:"h-5 w-5 md:h-6 md:w-6 text-primary"})}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("h1",{className:"text-lg md:text-2xl font-bold text-foreground",children:"Brief Matching"}),jsxRuntimeExports.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Paste a brief or upload a PDF to find matching songs"})]})]})}),jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain",children:jsxRuntimeExports.jsxs("div",{className:"p-4 md:p-6 max-w-4xl mx-auto space-y-4 md:space-y-6",children:[jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsxs(CardHeader,{className:"p-4 md:p-6",children:[jsxRuntimeExports.jsx(CardTitle,{className:"text-base md:text-lg",children:"Input Brief"}),jsxRuntimeExports.jsx(CardDescription,{className:"text-xs md:text-sm",children:"Paste your brief text or upload a PDF. The AI matches BPM, key, genre and vibe, grouped by reference track."})]}),jsxRuntimeExports.jsx(CardContent,{className:"p-4 pt-0 md:p-6 md:pt-0",children:jsxRuntimeExports.jsx(BriefInput,{onAnalyze:b0,onPdfUpload:E0,isAnalyzing:c0,onClear:m0})})]}),jsxRuntimeExports.jsx(BriefResults,{results:u0,extractedTerms:d0,briefSummary:h0,references:f0,targets:p0,referenceTrack:A0,onPlaySong:n0,onNavigateToSong:e0,currentPlayingSongId:a0,isPlaying:i0,onSongInteraction:x0,ownerId:s0,onDownloadResults:g0,isGeneratingDoc:y0})]})})]})}function timeAgo(r0){if(!r0)return"Never";const e0=Math.round((Date.now()-new Date(r0).getTime())/6e4);if(e0<1)return"Just now";if(e0<60)return`${e0}m ago`;const n0=Math.round(e0/60);return n0<24?`${n0}h ago`:`${Math.round(n0/24)}d ago`}function status(r0){return r0.download_count?"Downloaded":r0.play_count?"Played":r0.view_count?"Opened":r0.delivery_status==="draft"?"Draft":"Not opened"}function PitchesView({ownerId:r0,songs:e0}){const{playlists:n0,isLoading:a0,refetch:i0,deletePlaylist:s0,duplicatePlaylist:o0}=usePitchPlaylists(),[l0,c0]=reactExports.useState("sent"),[u0,d0]=reactExports.useState(null),[h0,f0]=reactExports.useState(null),[p0,A0]=reactExports.useState(!1),[m0,x0]=reactExports.useState(!1),[g0,y0]=reactExports.useState(new Set),[b0,E0]=reactExports.useState(""),[w0,v0]=reactExports.useState(null),[S0,k0]=reactExports.useState(!1);reactExports.useEffect(()=>{i0()},[i0]);const R0=reactExports.useMemo(()=>n0.filter(z0=>z0.delivery_status===l0),[n0,l0]),j0=async z0=>{d0(z0),f0(null);const{data:G0}=await supabase.functions.invoke("pitch-links",{body:{action:"detail",id:z0.id}});f0({songs:(G0==null?void 0:G0.songs)??[],views:(G0==null?void 0:G0.views)??[]})},C0=async z0=>{await navigator.clipboard.writeText(`${window.location.origin}/pitch/${z0}`),ue$2.success("Link copied")},$0=async z0=>{await o0(z0)&&c0("draft")},T0=async()=>{if(!w0)return;const z0=w0.id;k0(!0);const G0=await s0(w0);k0(!1),G0&&((u0==null?void 0:u0.id)===z0&&(d0(null),f0(null)),v0(null))},I0=reactExports.useMemo(()=>e0.filter(z0=>z0.isPrimaryVersion!==!1&&z0.name.toLowerCase().includes(b0.trim().toLowerCase())),[e0,b0]),M0=reactExports.useMemo(()=>{const z0=I0.filter(F0=>g0.has(F0.id)),G0=I0.filter(F0=>!g0.has(F0.id));return[...z0,...G0].slice(0,120)},[I0,g0]),N0=reactExports.useMemo(()=>e0.filter(z0=>g0.has(z0.id)),[e0,g0]),D0=z0=>y0(G0=>{const F0=new Set(G0);return F0.has(z0)?F0.delete(z0):F0.add(z0),F0}),O0=()=>{y0(new Set),E0(""),A0(!0)},B0=()=>{g0.size&&(A0(!1),x0(!0))};if(a0)return jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-20",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"h-5 w-5 animate-spin text-muted-foreground"})});if(u0){const z0=(G0,F0)=>(h0==null?void 0:h0.views.filter(Q0=>Q0.song_id===G0&&Q0.action===F0))??[];return jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full max-w-3xl flex-1 overflow-y-auto p-4 md:p-6",children:[jsxRuntimeExports.jsxs(Button,{variant:"ghost",className:"mb-3 px-0",onClick:()=>{d0(null),f0(null)},children:[jsxRuntimeExports.jsx(ArrowLeft,{className:"mr-2 h-4 w-4"}),"All pitches"]}),jsxRuntimeExports.jsxs("div",{className:"flex items-start justify-between gap-3",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-semibold",children:u0.name}),jsxRuntimeExports.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[u0.recipient_name||"No recipient",u0.recipient_email?` · ${u0.recipient_email}`:""]})]}),jsxRuntimeExports.jsxs("div",{className:"flex shrink-0 gap-2",children:[jsxRuntimeExports.jsxs(Button,{variant:"outline",disabled:!u0.song_ids.length,onClick:()=>openPitchPlayer(u0.slug),children:[jsxRuntimeExports.jsx(ExternalLink,{className:"mr-2 h-4 w-4"}),"Open player"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",onClick:()=>void C0(u0.slug),children:[jsxRuntimeExports.jsx(Copy,{className:"mr-2 h-4 w-4"}),"Copy link"]})]})]}),jsxRuntimeExports.jsxs("div",{className:"mt-5 overflow-hidden rounded-md border",children:[((h0==null?void 0:h0.songs)??[]).map((G0,F0)=>{const Q0=z0(G0.id,"play"),U0=z0(G0.id,"download");return jsxRuntimeExports.jsxs("div",{className:cn$1("flex items-center gap-3 px-4 py-3",F0>0&&"border-t"),children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntimeExports.jsx("p",{className:"truncate text-sm font-medium",children:G0.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:[G0.bpm?`${G0.bpm} BPM`:null,G0.key?`${G0.key} ${G0.scale??""}
742`.trim():null].filter(Boolean).join(" · ")})]}),jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[jsxRuntimeExports.jsx(Play,{className:"h-3 w-3"}),Q0.length]}),jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[jsxRuntimeExports.jsx(Download,{className:"h-3 w-3"}),U0.length]})]},G0.id)}),!h0&&jsxRuntimeExports.jsx("div",{className:"flex justify-center p-8",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"})})]}),jsxRuntimeExports.jsxs(Button,{variant:"destructive",className:"mt-5",onClick:()=>v0(u0),children:[jsxRuntimeExports.jsx(Trash2,{className:"mr-2 h-4 w-4"}),"Delete pitch"]}),jsxRuntimeExports.jsx(DeleteConfirmation,{pitch:w0,deleting:S0,onCancel:()=>v0(null),onConfirm:()=>void T0()})]})}return jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full max-w-4xl flex-1 overflow-y-auto p-4 md:p-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-end justify-between gap-4",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-semibold",children:"Pitches"}),jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Create A&R playlists, share open links, and see engagement."})]}),jsxRuntimeExports.jsxs(Button,{onClick:O0,className:"shrink-0",children:[jsxRuntimeExports.jsx(Plus,{className:"mr-2 h-4 w-4"}),"New pitch"]})]}),jsxRuntimeExports.jsx("div",{className:"mt-5 flex gap-1 border-b",children:["sent","draft"].map(z0=>jsxRuntimeExports.jsx(Button,{variant:"ghost",onClick:()=>c0(z0),className:cn$1("rounded-none border-b-2 capitalize",l0===z0?"border-primary":"border-transparent text-muted-foreground"),children:z0},z0))}),R0.length===0?jsxRuntimeExports.jsxs("div",{className:"py-16 text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:l0==="sent"?"No pitches sent yet.":"No reusable drafts yet."}),l0==="sent"&&jsxRuntimeExports.jsxs(Button,{variant:"outline",className:"mt-4",onClick:O0,children:[jsxRuntimeExports.jsx(Plus,{className:"mr-2 h-4 w-4"}),"Create your first pitch"]})]}):jsxRuntimeExports.jsx("div",{className:"mt-4 overflow-hidden rounded-md border",children:R0.map((z0,G0)=>jsxRuntimeExports.jsxs("div",{className:cn$1("flex items-center gap-3 p-4",G0>0&&"border-t"),children:[jsxRuntimeExports.jsxs("button",{className:"min-w-0 flex-1 text-left",onClick:()=>void j0(z0),children:[jsxRuntimeExports.jsx("p",{className:"truncate text-sm font-medium",children:z0.name}),jsxRuntimeExports.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[jsxRuntimeExports.jsx("span",{children:z0.recipient_name||"Reusable selection"}),jsxRuntimeExports.jsxs("span",{children:[z0.song_ids.length," tracks"]}),jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-1",children:[jsxRuntimeExports.jsx(Eye,{className:"h-3 w-3"}),z0.view_count??0]}),jsxRuntimeExports.jsx("span",{children:status(z0)}),jsxRuntimeExports.jsx("span",{children:timeAgo(z0.last_viewed_at||z0.created_at)})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",disabled:!z0.song_ids.length,title:z0.song_ids.length?"Open player":"Add songs first",onClick:()=>openPitchPlayer(z0.slug),"aria-label":`Open ${z0.name} in the player`,children:jsxRuntimeExports.jsx(ExternalLink,{className:"h-4 w-4"})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",onClick:()=>void $0(z0),"aria-label":"Duplicate pitch",children:jsxRuntimeExports.jsx(Files,{className:"h-4 w-4"})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",onClick:()=>void C0(z0.slug),"aria-label":"Copy pitch link",children:jsxRuntimeExports.jsx(Copy,{className:"h-4 w-4"})}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>v0(z0),"aria-label":`Delete ${z0.name}`,children:jsxRuntimeExports.jsx(Trash2,{className:"h-4 w-4"})})]},z0.id))}),jsxRuntimeExports.jsx(Dialog,{open:p0,onOpenChange:A0,children:jsxRuntimeExports.jsxs(DialogContent,{className:"flex max-h-[88vh] flex-col p-0 sm:max-w-xl",children:[jsxRuntimeExports.jsxs(DialogHeader,{className:"px-5 pt-5",children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Choose songs"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Select the tracks for this A&R pitch."})]}),jsxRuntimeExports.jsxs("div",{className:"relative px-5",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-8 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),jsxRuntimeExports.jsx(Input,{value:b0,onChange:z0=>E0(z0.target.value),placeholder:"Search your library",className:"pl-9"})]}),jsxRuntimeExports.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto border-y",children:[M0.map(z0=>jsxRuntimeExports.jsxs("label",{className:"flex min-h-12 cursor-pointer items-center gap-3 border-b px-5 last:border-b-0 hover:bg-muted/40",children:[jsxRuntimeExports.jsx(Checkbox,{checked:g0.has(z0.id),onCheckedChange:()=>D0(z0.id)}),jsxRuntimeExports.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:z0.name}),jsxRuntimeExports.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:z0.bpm?`${z0.bpm} BPM`:""})]},z0.id)),I0.length>M0.length&&jsxRuntimeExports.jsxs("p",{className:"px-5 py-3 text-center text-xs text-muted-foreground",children:["Showing ",M0.length," of ",I0.length," matches â keep typing to narrow it down."]}),!M0.length&&jsxRuntimeExports.jsx("p",{className:"px-5 py-12 text-center text-sm text-muted-foreground",children:"No songs found."})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between gap-3 px-5 pb-5",children:[jsxRuntimeExports.jsxs("span",{className:"text-sm text-muted-foreground",children:[g0.size," selected"]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsxs(Button,{variant:"ghost",onClick:()=>A0(!1),children:[jsxRuntimeExports.jsx(X$2,{className:"mr-2 h-4 w-4"}),"Cancel"]}),jsxRuntimeExports.jsx(Button,{disabled:!g0.size,onClick:B0,children:"Continue"})]})]})]})}),jsxRuntimeExports.jsx(PitchComposer,{open:m0,onOpenChange:x0,ownerId:r0,songs:N0,onCreated:z0=>{y0(new Set),c0(z0),i0()}}),jsxRuntimeExports.jsx(DeleteConfirmation,{pitch:w0,deleting:S0,onCancel:()=>v0(null),onConfirm:()=>void T0()})]})}function DeleteConfirmation({pitch:r0,deleting:e0,onCancel:n0,onConfirm:a0}){return jsxRuntimeExports.jsx(AlertDialog,{open:!!r0,onOpenChange:i0=>{!i0&&!e0&&n0()},children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsxs(AlertDialogTitle,{children:["Delete this ",(r0==null?void 0:r0.delivery_status)==="draft"?"playlist":"pitch","?"]}),jsxRuntimeExports.jsx(AlertDialogDescription,{children:(r0==null?void 0:r0.delivery_status)==="sent"?"Its shared link and engagement history will be permanently removed.":"This draft playlist will be permanently removed."})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{disabled:e0,children:"Cancel"}),jsxRuntimeExports.jsxs(AlertDialogAction,{disabled:e0,onClick:a0,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[e0&&jsxRuntimeExports.jsx(LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})})}const SONGWRITING_TIPS=[{id:"chorus-before-fifty",label:"Timing",tip:"Get to the chorus before 50 seconds.",detail:"Keep the intro short and let verse one earn its space.",tone:"sun",tilt:"soft-left"},{id:"three-four-parts",label:"Shape",tip:"Keep the song to 3â4 distinct melodic parts.",detail:"Repeat strong ideas instead of teaching the listener a new tune in every section.",tone:"mint",tilt:"right"},{id:"preview-chorus",label:"Familiarity",tip:"Preview a piece of the chorus melody in verse one.",detail:"Use the same small melodic shape with different words and lower energy.",tone:"sky",tilt:"left"},{id:"money-note",label:"Payoff",tip:"Save one high âmoney noteâ for the most important word.",detail:"If every note is a peak, none of them feels special.",tone:"rose",tilt:"soft-right"}
742,{id:"growing-choruses",label:"Energy",tip:"Make every chorus bigger than the one before.",detail:"Add one thing at a time: a harmony, an octave, a counter-line or extra rhythm.",tone:"sun",tilt:"right"},{id:"sing-ten-times",label:"Singability",tip:"Make the hook comfortable enough to sing ten times.",detail:"Catchy should feel easy in the voice, not like a vocal test.",tone:"mint",tilt:"soft-left"},{id:"title-glue",label:"Title",tip:"Let the title line glue the whole song together.",detail:"Bring it back in more than one section, but change the musical setting around it.",tone:"rose",tilt:"left"},{id:"pre-chorus-ramp",label:"Tension",tip:"Use the pre-chorus as a 4â8 bar ramp.",detail:"Climb, add tension and leave something unresolved so the chorus can release it.",tone:"sky",tilt:"soft-right"},{id:"short-hook",label:"Hook",tip:"Try three words on three notes.",detail:"Repeat the phrase until it starts to feel like part of the beat.",tone:"mint",tilt:"right"},{id:"concrete-concept",label:"Concept",tip:"Write one concrete line that explains the whole song.",detail:"Describe an event, not an abstract feeling. Let the idea carry the hook.",tone:"sun",tilt:"soft-left"},{id:"contrast-boundary",label:"Contrast",tip:"Change something at every section boundary.",detail:"Shift the register, rhythm, lyric density or productionâbut keep one anchor familiar.",tone:"sky",tilt:"left"},{id:"riff-hook",label:"Production",tip:"A riff can be the hook.",detail:"If the track is recognisable without the vocal, let production carry part of the memory.",tone:"rose",tilt:"soft-right"},{id:"same-melody-new-lift",label:"Reuse",tip:"Try the same melody in the verse and chorus.",detail:"Create the lift with new chords, words, register and production instead.",tone:"sun",tilt:"right"},{id:"pull-back",label:"Dynamics",tip:"Pull back before the final chorus.",detail:"A quieter bridge can make the last return feel larger without adding more notes.",tone:"mint",tilt:"soft-left"},{id:"simple-verse",label:"Restraint",tip:"Let a simple verse set up a dramatic chorus.",detail:"A narrow, conversational melody leaves room for the chorus to open up.",tone:"sky",tilt:"soft-right"}],toneClasses={sun:"bg-memo-sun text-memo-ink",mint:"bg-memo-mint text-memo-ink",rose:"bg-memo-rose text-memo-ink",sky:"bg-memo-sky text-memo-ink"},tiltClasses={left:"-rotate-[1.5deg]",right:"rotate-[1.5deg]","soft-left":"-rotate-[0.75deg]","soft-right":"rotate-[0.75deg]",none:"rotate-0"};function MemoNote({note:r0,index:e0}){return jsxRuntimeExports.jsxs("article",{className:cn$1("memo-note relative isolate flex min-h-[172px] break-inside-avoid flex-col justify-between overflow-hidden rounded-[3px] p-5 shadow-memo transition duration-300 ease-out hover:z-10 hover:rotate-0 hover:-translate-y-1 hover:shadow-memo-raised active:rotate-0 active:scale-[0.99]",toneClasses[r0.tone],tiltClasses[r0.tilt]),style:{"--memo-delay":`${Math.min(e0*55,650)}ms`},children:[jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:"absolute left-1/2 top-0 h-5 w-16 -translate-x-1/2 -translate-y-1/2 rotate-[-2deg] bg-memo-tape shadow-sm"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.14em] text-memo-ink-muted",children:r0.label}),jsxRuntimeExports.jsx("h2",{className:"mt-3 text-[19px] font-semibold leading-[1.18]",children:r0.tip})]}),jsxRuntimeExports.jsx("p",{className:"mt-5 text-[13px] leading-[1.4] text-memo-ink-muted",children:r0.detail})]})}function SongwritingView({ownerId:r0}){return jsxRuntimeExports.jsx("main",{className:"h-full min-h-0 overflow-y-auto bg-background overscroll-contain",children:jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full max-w-7xl px-4 pb-28 pt-7 sm:px-7 sm:pt-10 lg:px-10",children:[jsxRuntimeExports.jsxs("header",{className:"mb-8 px-1 sm:mb-10",children:[jsxRuntimeExports.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.16em] text-primary",children:"Melodic Math"}),jsxRuntimeExports.jsx("h1",{className:"mt-2 text-[32px] font-bold leading-none sm:text-[38px]",children:"Songwriting"}),jsxRuntimeExports.jsx("p",{className:"mt-3 max-w-md text-[14px] leading-relaxed text-muted-foreground",children:"Small reminders for when the room gets stuck."})]}),jsxRuntimeExports.jsx("section",{"aria-label":"Songwriting tips",className:"grid grid-cols-1 items-start gap-x-5 gap-y-7 min-[430px]:grid-cols-2 md:grid-cols-3 xl:grid-cols-4",children:SONGWRITING_TIPS.map((e0,n0)=>jsxRuntimeExports.jsx(MemoNote,{note:e0,index:n0},e0.id))})]})})}function ExploreView({onNavigateToLibrary:r0}){const[e0,n0]=reactExports.useState([]),[a0,i0]=reactExports.useState(!0),[s0,o0]=reactExports.useState(""),[l0,c0]=reactExports.useState(null),[u0,d0]=reactExports.useState(null),h0=reactExports.useRef(null),f0=reactExports.useRef(null),[p0,A0]=reactExports.useState({width:800,height:600});reactExports.useEffect(()=>{(async()=>{i0(!0);try{const{data:{session:y0}}=await supabase.auth.getSession();if(!y0)return;const{data:b0,error:E0}=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"songs"}});if(E0)throw E0;const w0=(b0==null?void 0:b0.data)||[],v0=new Map;for(const k0 of w0){const R0=k0.keywords||[],j0=k0.ar_keywords||[],C0=(k0.name||"").toLowerCase().trim();for(const $0 of R0){const T0=$0.toLowerCase().trim();if(!T0)continue;const I0=v0.get(T0);if(I0)I0.count+=1,C0&&I0.songTitles.add(C0);else{const M0=new Set;C0&&M0.add(C0),v0.set(T0,{count:1,isAr:!1,songTitles:M0})}}for(const $0 of j0){const T0=$0.toLowerCase().trim();if(!T0)continue;const I0=v0.get(T0);if(I0)I0.count+=1,I0.isAr=!0,C0&&I0.songTitles.add(C0);else{const M0=new Set;C0&&M0.add(C0),v0.set(T0,{count:1,isAr:!0,songTitles:M0})}}}const S0=Array.from(v0.entries()).map(([k0,{count:R0,isAr:j0,songTitles:C0}])=>({keyword:k0,count:R0,isAr:j0,songTitles:Array.from(C0)})).sort((k0,R0)=>R0.count-k0.count);n0(S0)}catch(y0){console.error("Failed to fetch keywords:",y0)}finally{i0(!1)}})()},[]),reactExports.useEffect(()=>{const g0=f0.current;if(!g0)return;const y0=new ResizeObserver(b0=>{const{width:E0,height:w0}
742=b0[0].contentRect;A0({width:Math.max(400,E0),height:Math.max(400,w0)})});return y0.observe(g0),()=>y0.disconnect()},[]),reactExports.useMemo(()=>{if(!s0.trim())return e0;const g0=s0.toLowerCase();return e0.map(y0=>({...y0,_highlighted:y0.keyword.includes(g0)}))},[e0,s0]);const m0=reactExports.useMemo(()=>{var k0;const g0=p0.width/2,y0=p0.height/2,b0=((k0=e0[0])==null?void 0:k0.count)||1,E0=Math.min(p0.width,p0.height)*.04,w0=Math.min(p0.width,p0.height)*.08,v0=Math.PI*(3-Math.sqrt(5)),S0=Math.min(p0.width,p0.height)*.042;return e0.map((R0,j0)=>{const C0=R0.count/b0,$0=E0+(w0-E0)*Math.sqrt(C0),T0=j0*v0,I0=S0*Math.sqrt(j0+1),M0=g0+Math.cos(T0)*I0,N0=y0+Math.sin(T0)*I0,D0=R0.isAr?280:45,O0=60+C0*30,B0=35+C0*25,z0=.4+C0*.6,G0=s0.trim()?R0.keyword.includes(s0.toLowerCase())||R0.songTitles.some(F0=>F0.includes(s0.toLowerCase())):!0;return{...R0,x:M0,y:N0,r:$0,color:`hsl(${D0}, ${O0}%, ${B0}%)`,opacity:G0?z0:.15,isMatch:G0}})},[e0,p0,s0]),x0=reactExports.useCallback(g0=>{d0(y0=>(y0==null?void 0:y0.keyword)===g0.keyword?null:g0)},[]);return a0?jsxRuntimeExports.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx(Compass,{className:"w-8 h-8 text-primary animate-spin"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading keyword mapâ¦"})]})}):e0.length===0?jsxRuntimeExports.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx(Compass,{className:"w-8 h-8 text-muted-foreground"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-sm",children:"No keywords found. Add keywords to songs to see the map."})]})}):jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-border shrink-0",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-lg md:text-xl font-bold text-foreground",children:"Explore Keywords"}),jsxRuntimeExports.jsxs("p",{className:"text-xs md:text-sm text-muted-foreground mt-0.5",children:[e0.length," unique keywords across your library"]})]}),jsxRuntimeExports.jsxs("div",{className:"relative w-48 md:w-64",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),jsxRuntimeExports.jsx(Input,{value:s0,onChange:g0=>o0(g0.target.value),placeholder:"Search keywordsâ¦",className:"pl-9 h-9 text-sm"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 px-4 md:px-6 py-2 text-xs text-muted-foreground shrink-0",children:[jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx("span",{className:"w-3 h-3 rounded-full",style:{background:"hsl(45, 80%, 50%)"}}),"Keywords"]}),jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx("span",{className:"w-3 h-3 rounded-full",style:{background:"hsl(280, 80%, 50%)"}}),"A&R Keywords"]}),jsxRuntimeExports.jsx("span",{className:"ml-auto",children:"Bubble size = song count"})]}),jsxRuntimeExports.jsxs("div",{ref:f0,className:"flex-1 relative overflow-hidden",children:[jsxRuntimeExports.jsxs("svg",{ref:h0,width:p0.width,height:p0.height,className:"w-full h-full",viewBox:`0 0 ${p0.width} ${p0.height}`,children:[jsxRuntimeExports.jsx("circle",{cx:p0.width/2,cy:p0.height/2,r:Math.min(p0.width,p0.height)*.03,className:"fill-primary/30"}),jsxRuntimeExports.jsx("text",{x:p0.width/2,y:p0.height/2,textAnchor:"middle",dominantBaseline:"central",className:"fill-primary text-[10px] md:text-xs font-bold pointer-events-none",children:"â
"}),m0.map(g0=>jsxRuntimeExports.jsx("line",{x1:p0.width/2,y1:p0.height/2,x2:g0.x,y2:g0.y,stroke:"currentColor",className:"text-border",strokeWidth:.5,opacity:g0.opacity*.3},`line-${g0.keyword}`)),m0.map(g0=>{const y0=l0===g0.keyword,b0=(u0==null?void 0:u0.keyword)===g0.keyword;return jsxRuntimeExports.jsxs("g",{className:"cursor-pointer transition-transform duration-200",style:{transform:`translate(${g0.x}px, ${g0.y}px)`},onMouseEnter:()=>
742c0(g0.keyword),onMouseLeave:()=>c0(null),onClick:()=>x0(g0),children:[jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:y0||b0?g0.r*1.2:g0.r,fill:g0.color,opacity:g0.opacity,stroke:b0?"hsl(var(--primary))":g0.isAr?"hsl(280, 60%, 70%)":"transparent",strokeWidth:b0?2.5:g0.isAr?1.5:0,className:"transition-all duration-200"}),jsxRuntimeExports.jsx("text",{x:0,y:0,textAnchor:"middle",dominantBaseline:"central",className:cn$1("pointer-events-none select-none transition-opacity duration-200",g0.isMatch?"fill-foreground":"fill-muted-foreground/40"),fontSize:Math.max(8,Math.min(13,g0.r*.9)),fontWeight:y0||b0?700:500,children:g0.keyword.length>12?g0.keyword.slice(0,10)+"â¦":g0.keyword}),y0&&!b0&&jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("rect",{x:-40,y:-g0.r-28,width:80,height:22,rx:4,className:"fill-popover stroke-border",strokeWidth:.5}),jsxRuntimeExports.jsxs("text",{x:0,y:-g0.r-15,textAnchor:"middle",dominantBaseline:"central",className:"fill-popover-foreground text-[10px] pointer-events-none",children:[g0.count," song",g0.count!==1?"s":""]})]})]},g0.keyword)})]}),u0&&(()=>{const g0=m0.find(y0=>y0.keyword===u0.keyword);return g0?jsxRuntimeExports.jsxs("div",{className:"absolute bg-popover border border-border rounded-lg shadow-lg p-3 z-10 min-w-[160px]",style:{left:Math.min(g0.x+16,p0.width-180),top:Math.max(g0.y-40,8)},children:[jsxRuntimeExports.jsx("p",{className:"font-semibold text-sm text-foreground",children:u0.keyword}),jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Used in ",u0.count," song",u0.count!==1?"s":""]}),u0.isAr&&jsxRuntimeExports.jsx("span",{className:"inline-block mt-1 text-[10px] px-1.5 py-0.5 rounded-full bg-accent text-accent-foreground",children:"A&R Keyword"}),jsxRuntimeExports.jsx("button",{onClick:()=>{r0(u0.keyword),d0(null)},className:"mt-2 w-full text-xs font-medium text-primary hover:underline text-left",children:"â View in Library"})]}):null})()]})]})}var PROGRESS_NAME="Progress",DEFAULT_MAX=100,[createProgressContext,createProgressScope]=createContextScope(PROGRESS_NAME),[ProgressProvider,useProgressContext]=createProgressContext(PROGRESS_NAME),Progress$1=reactExports.forwardRef((r0,e0)=>{const{__scopeProgress:n0,value:a0=null,max:i0,getValueLabel:s0=defaultGetValueLabel,...o0}=r0;(i0||i0===0)&&!isValidMaxNumber(i0)&&console.error(getInvalidMaxError(`${i0}`,"Progress"));const l0=isValidMaxNumber(i0)?i0:DEFAULT_MAX;a0!==null&&!isValidValueNumber(a0,l0)&&console.error(getInvalidValueError(`${a0}`,"Progress"));const c0=isValidValueNumber(a0,l0)?a0:null,u0=isNumber(c0)?s0(c0,l0):void 0;return jsxRuntimeExports.jsx(ProgressProvider,{scope:n0,value:c0,max:l0,children:jsxRuntimeExports.jsx(Primitive.div,{"aria-valuemax":l0,"aria-valuemin":0,"aria-valuenow":isNumber(c0)?c0:void 0,"aria-valuetext":u0,role:"progressbar","data-state":getProgressState(c0,l0),"data-value":c0??void 0,"data-max":l0,...o0,ref:e0})})});Progress$1.displayName=PROGRESS_NAME;var INDICATOR_NAME="ProgressIndicator",ProgressIndicator=reactExports.forwardRef((r0,e0)=>{const{__scopeProgress:n0,...a0}=r0,i0=useProgressContext(INDICATOR_NAME,n0);return jsxRuntimeExports.jsx(Primitive.div,{"data-state":getProgressState(i0.value,i0.max),"data-value":i0.value??void 0,"data-max":i0.max,...a0,ref:e0})});ProgressIndicator.displayName=INDICATOR_NAME;function defaultGetValueLabel(r0,e0){return`${Math.round(r0/e0*100)}%`}function getProgressState(r0,e0){return r0==null?"indeterminate":r0===e0?"complete":"loading"}function isNumber(r0){return typeof r0=="number"}function isValidMaxNumber(r0){return isNumber(r0)&&!isNaN(r0)&&r0>0}function isValidValueNumber(r0,e0){return isNumber(r0)&&!isNaN(r0)&&r0<=e0&&r0>=0}
742function getInvalidMaxError(r0,e0){return`Invalid prop \`max\` of value \`${r0}\` supplied to \`${e0}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`}function getInvalidValueError(r0,e0){return`Invalid prop \`value\` of value \`${r0}\` supplied to \`${e0}\`. The \`value\` prop must be: 743 - a positive number 744 - less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set) 745 - \`null\` or \`undefined\` if the progress is indeterminate. 746 747Defaulting to \`null\`.`}var Root$1=Progress$1,Indicator=ProgressIndicator;const Progress=reactExports.forwardRef(({className:r0,value:e0,...n0},a0)=>jsxRuntimeExports.jsx(Root$1,{ref:a0,className:cn$1("relative h-4 w-full overflow-hidden rounded-full bg-secondary",r0),...n0,children:jsxRuntimeExports.jsx(Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e0||0)}%)`}})}));Progress.displayName=Root$1.displayName;function AIBatchAnalyzeView(){const{analyzeFromUrl:r0}=useAudioAnalysis(),{ownerId:e0,role:n0}=useAuth(),[a0,i0]=reactExports.useState([]),[s0,o0]=reactExports.useState({}),[l0,c0]=reactExports.useState(!0),[u0,d0]=reactExports.useState(!1),[h0,f0]=reactExports.useState({done:0,total:0}),p0=reactExports.useCallback(async()=>{if(e0){c0(!0);try{const{data:b0,error:E0}=await supabase.functions.invoke("manage-library",{body:{action:"list",table:"songs"}});if(E0)throw E0;const v0=((b0==null?void 0:b0.data)||[]).filter(k0=>!k0.ai_analysis_status||k0.ai_analysis_status==="pending"||k0.ai_analysis_status==="failed");i0(v0.map(k0=>({id:k0.id,name:k0.name,bpm:k0.bpm,genres:k0.genres||[],vocalist_gender:k0.vocalist_gender||"",key:k0.key,scale:k0.scale,lyrics:k0.lyrics,dropbox_url:k0.dropbox_url,ai_analysis_status:k0.ai_analysis_status})));const S0={};v0.forEach(k0=>{S0[k0.id]=k0.ai_analysis_status==="failed"?"failed":"pending"}),o0(S0)}catch(b0){console.error("[AIBatch] fetch error:",b0),ue$2.error("Failed to load songs")}finally{c0(!1)}}},[e0]);reactExports.useEffect(()=>{p0()},[p0]);const A0=reactExports.useCallback(async b0=>{if(!e0)return!1;o0(E0=>({...E0,[b0.id]:"processing"}));try{const E0=b0.dropbox_url?await r0(b0.dropbox_url):null,{error:w0}=await supabase.functions.invoke("analyze-song",{body:{song_id:b0.id,owner_id:e0,dropbox_url:b0.dropbox_url,song_name:b0.name,existing_bpm:b0.bpm,existing_key:b0.key,existing_scale:b0.scale,existing_genres:b0.genres,existing_vocalist_gender:b0.vocalist_gender,existing_lyrics:b0.lyrics,lyrics:b0.lyrics,audio_quality:(E0==null?void 0:E0.audioQuality)||null,spectral_mood:(E0==null?void 0:E0.mood)||null,spectral_energy_descriptor:(E0==null?void 0:E0.energyDescriptor)||null}});if(w0)throw w0;return o0(v0=>({...v0,[b0.id]:"completed"})),!0}catch{return o0(E0=>({...E0,[b0.id]:"failed"})),!1}},[e0,r0]),m0=reactExports.useCallback(async b0=>{await A0(b0)?ue$2.success(`Analyzed: ${b0.name}`):ue$2.error(`Failed: ${b0.name}`)},[A0]),x0=reactExports.useCallback(async()=>{const b0=a0.filter(w0=>{const v0=s0[w0.id];return v0==="pending"||v0==="failed"});if(b0.length===0){ue$2.info("No songs to analyze");return}d0(!0),f0({done:0,total:b0.length});let E0=0;for(const w0 of b0)await A0(w0),E0++,f0({done:E0,total:b0.length}),E0<b0.length&&await new Promise(v0=>setTimeout(v0,1500));d0(!1),ue$2.success(`Batch complete: ${E0} songs processed`)},[a0,s0,A0]);if(n0!=="admin")return jsxRuntimeExports.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntimeExports.jsx("p",{className:"text-muted-foreground",children:"Admin access required."})});const g0=Object.values(s0).filter(b0=>b0==="pending"||b0==="failed").length,y0=Object.values(s0).filter(b0=>b0==="completed").length;return jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full bg-background",children:[jsxRuntimeExports.jsxs("div",{className:"p-6 border-b border-border",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:jsxRuntimeExports.jsx(Zap,{className:"h-6 w-6 text-primary"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"AI Batch Analyzer"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:l0?"Loading...":`${g0} songs awaiting analysis · ${y0} completed this session`})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",onClick:p0,disabled:u0,children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),jsxRuntimeExports.jsxs(Button,{size:"sm",onClick:x0,disabled:u0||g0===0,children:[u0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4 mr-1.5 animate-spin"}):jsxRuntimeExports.jsx(Sparkles,{className:"w-4 h-4 mr-1.5"}),u0?`Analyzing ${h0.done}/${h0.total}...`:"Analyze All"]})]})]}),u0&&jsxRuntimeExports.jsxs("div",{className:"mt-4 space-y-1.5",children:[jsxRuntimeExports.jsx(Progress,{value:h0.done/h0.total*100,className:"h-2"}),jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[h0.done," of ",h0.total," songs analyzed"]})]})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:jsxRuntimeExports.jsx("div",{className:"p-6",children:l0?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):a0.length===0?jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[jsxRuntimeExports.jsx(CircleCheck,{className:"w-12 h-12 text-green-500 mb-3"}),jsxRuntimeExports.jsx("h3",{className:"text-lg font-medium text-foreground",children:"All songs analyzed!"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Every song in y
747our library has been processed by AI."})]}):jsxRuntimeExports.jsxs(Table,{children:[jsxRuntimeExports.jsx(TableHeader,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableHead,{children:"Song Name"}),jsxRuntimeExports.jsx(TableHead,{className:"w-20",children:"BPM"}),jsxRuntimeExports.jsx(TableHead,{children:"Genres"}),jsxRuntimeExports.jsx(TableHead,{children:"Vocalist"}),jsxRuntimeExports.jsx(TableHead,{className:"w-28",children:"Status"}),jsxRuntimeExports.jsx(TableHead,{className:"w-28 text-right",children:"Action"})]})}),jsxRuntimeExports.jsx(TableBody,{children:a0.map(b0=>{const E0=s0[b0.id]||"pending";return jsxRuntimeExports.jsxs(TableRow,{className:cn$1("transition-colors",E0==="completed"&&"bg-green-500/5",E0==="failed"&&"bg-destructive/5"),children:[jsxRuntimeExports.jsx(TableCell,{className:"font-medium",children:b0.name}),jsxRuntimeExports.jsx(TableCell,{children:b0.bpm}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:b0.genres.slice(0,2).map((w0,v0)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:w0},v0))})}),jsxRuntimeExports.jsx(TableCell,{className:"text-sm",children:b0.vocalist_gender||"â"}),jsxRuntimeExports.jsxs(TableCell,{children:[E0==="pending"&&jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs text-muted-foreground",children:"Pending"}),E0==="processing"&&jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3 h-3 animate-spin mr-1"}),"Analyzing"]}),E0==="completed"&&jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs text-green-500 border-green-500/30",children:[jsxRuntimeExports.jsx(CircleCheck,{className:"w-3 h-3 mr-1"}),"Done"]}),E0==="failed"&&jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs text-destructive border-destructive/30",children:[jsxRuntimeExports.jsx(CircleX,{className:"w-3 h-3 mr-1"}),"Failed"]})]}),jsxRuntimeExports.jsx(TableCell,{className:"text-right",children:(E0==="pending"||E0==="failed")&&jsxRuntimeExports.jsx(Button,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>m0(b0),disabled:u0,children:E0==="failed"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-3 h-3 mr-1"}),"Retry"]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Sparkles,{className:"w-3 h-3 mr-1"}),"Analyze"]})})})]},b0.id)})})]})})})]})}function WaveformPlayer({audioUrl:r0,isPlaying:e0,currentTime:n0,duration:a0,onSeek:i0,onTogglePlay:s0,compact:o0=!1}){const l0=reactExports.useRef(null),c0=reactExports.useRef(null),[u0,d0]=reactExports.useState([]),[h0,f0]=reactExports.useState(!1);reactExports.useEffect(()=>{if(!r0)return;(async()=>{f0(!0);try{const x0=await(await fetch(r0)).arrayBuffer(),g0=new(window.AudioContext||window.webkitAudioContext),b0=(await g0.decodeAudioData(x0)).getChannelData(0),E0=o0?50:100,w0=Math.floor(b0.length/E0),v0=[];for(let R0=0;R0<E0;R0++){let j0=0;for(let C0=0;C0<w0;C0++)j0+=Math.abs(b0[R0*w0+C0]);v0.push(j0/w0)}const S0=Math.max(...v0),k0=v0.map(R0=>R0/S0);d0(k0),g0.close()}catch(m0){console.error("Failed to generate waveform:",m0);const x0=Array.from({length:o0?50:100},()=>Math.random()*.8+.2);d0(x0)}finally{f0(!1)}})()},[r0,o0]),reactExports.useEffect(()=>{const A0=l0.current,m0=c0.current;if(!A0||!m0||u0.length===0)return;const x0=A0.getContext("2d");if(!x0)return;const g0=window.devicePixelRatio||1,y0=m0.getBoundingClientRect();A0.width=y0.width*g0,A0.height=y0.height*g0,x0.scale(g0,g0);const b0=y0.width,E0=y0.height,w0=b0/u0.length,v0=o0?1:2,S0=a0>0?n0/a0:0;x0.clearRect(0,0,b0,E0),u0.forEach((k0,R0)=>{const j0=R0*w0,C0=k0*E0*.8,$0=(E0-C0)/2,T0=R0/u0.length<=S0;x0.fillStyle=T0?"hsl(var(--primary))":"hsl(var(--muted-foreground) / 0.3)",x0.beginPath(),x0.roundRect(j0+v0/2,$0,w0-v0,C0,1),x0.fill()})},[u0,n0,a0,o0]);const p0=A0=>{const m0=l0.current;if(!m0||a0===0)return;const x0=m0.getBoundingClientRect(),b0=(A0.clientX-x0.left)/x0.width*a0;i0(b0)};return h0?jsxRuntimeExports.jsx("div",{className:`flex items-center justify-center bg-muted/30 rounded-md ${o0?"h-8":"h-16"}`,children:jsxRuntimeExports.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading waveform..."})}):jsxRuntimeExports.jsxs("div",{className:`flex items-center gap-2 ${o0?"":"gap-3"}
747`,children:[!o0&&jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0",onClick:s0,children:e0?jsxRuntimeExports.jsx(Pause,{className:"w-5 h-5"}):jsxRuntimeExports.jsx(Play,{className:"w-5 h-5 ml-0.5"})}),jsxRuntimeExports.jsx("div",{ref:c0,className:`flex-1 cursor-pointer ${o0?"h-8":"h-12"}`,children:jsxRuntimeExports.jsx("canvas",{ref:l0,onClick:p0,className:"w-full h-full"})})]})}function formatTime$1(r0){if(!r0||isNaN(r0))return"0:00";const e0=Math.floor(r0/60),n0=Math.floor(r0%60);return`${e0}:${n0.toString().padStart(2,"0")}`}function AudioPlayer({currentSong:r0,isPlaying:e0,currentTime:n0,duration:a0,volume:i0,onTogglePlay:s0,onSeek:o0,onVolumeChange:l0,onStop:c0}){var d0;if(!r0)return null;const u0=r0.audioUrl||((d0=r0.dropboxUrl)==null?void 0:d0.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("dl=0","dl=1"))||null;return jsxRuntimeExports.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 bg-card/95 backdrop-blur-xl border-t border-border animate-slide-in-up",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 px-6 py-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 min-w-0 w-64",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/20 flex items-center justify-center shrink-0",children:jsxRuntimeExports.jsx("div",{className:cn$1("w-3 h-3 rounded-full bg-primary",e0&&"animate-pulse")})}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate",children:r0.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r0.writers||"Unknown Artist"})]})]}),jsxRuntimeExports.jsx("div",{className:"flex-1 flex flex-col items-center gap-1",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 w-full max-w-2xl",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90 shrink-0",onClick:s0,children:e0?jsxRuntimeExports.jsx(Pause,{className:"w-5 h-5"}):jsxRuntimeExports.jsx(Play,{className:"w-5 h-5 ml-0.5"})}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-mono w-10 text-right shrink-0",children:formatTime$1(n0)}),jsxRuntimeExports.jsx("div",{className:"flex-1 min-w-0",children:u0?jsxRuntimeExports.jsx(WaveformPlayer,{audioUrl:u0,isPlaying:e0,currentTime:n0,duration:a0,onSeek:o0,onTogglePlay:s0,compact:!0}):jsxRuntimeExports.jsx(Slider,{value:[n0],max:a0||100,step:.1,onValueChange:([h0])=>o0(h0),className:"flex-1"})}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground font-mono w-10 shrink-0",children:formatTime$1(a0)})]})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 w-48 justify-end",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>l0(i0===0?1:0),children:i0===0?jsxRuntimeExports.jsx(VolumeX,{className:"w-4 h-4 text-muted-foreground"}):jsxRuntimeExports.jsx(Volume2,{className:"w-4 h-4 text-muted-foreground"})}),jsxRuntimeExports.jsx(Slider,{value:[i0*100],max:100,step:1,onValueChange:([h0])=>l0(h0/100),className:"w-20"})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:c0,children:jsxRuntimeExports.jsx(X$2,{className:"w-4 h-4"})})]})]})})}function MobileHeader(){const{ownerName:r0,signOut:e0}=useAuth(),n0=useNavigate(),a0=async()=>{await e0(),n0("/login")};return jsxRuntimeExports.jsxs("header",{className:"sticky top-0 z-40 h-14 px-4 flex items-center gap-3 border-b border-border bg-card/95 backdrop-blur-xl shrink-0 safe-area-pt",children:[jsxRuntimeExports.jsx("img",{src:bangerbankLogo,alt:"BangerBank",className:"h-8 w-auto object-contain"}),jsxRuntimeExports.jsx("div",{className:"flex-1"}),jsxRuntimeExports.jsx(NotificationBell,{}),r0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-muted-foreground truncate max-w-32",children:r0}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",onClick:a0,className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:jsxRuntimeExports.jsx(LogOut,{className:"h-4 w-4"})})]})]})}const statusOptions=[{value:null,label:"All",icon:Music,color:"text-blue-500"},{value:"available",label:"Available",icon:TrendingUp,color:"text-green-500"},{value:"cut",label:"Cut",icon:CircleCheckBig,color:"text-purple-500"},{value:"on-hold",label:"Hold",icon:Clock,color:"text-orange-500"}],sortOptions=[{value:"date",label:"Date Added"},{value:"name",label:"Name"},{value:"bpm",label:"BPM"},{value:"key",label:"Key"}];function MobileFilterBar({filters:r0,onFiltersChange:e0,folders:n0,statusCounts:a0,folderCounts:i0,songCount:s0=0,songs:o0,filterOptions:l0,totalCount:c0,isSelectMode:u0=!1,selectedCount:d0=0,onToggleSelectMode:h0,onCreatePitch:f0}){const p0=statusOptions.find(y0=>y0.value===r0.status)||statusOptions[0],A0=n0.find(y0=>y0.id===r0.folderId),m0=p0.icon;sortOptions.find(y0=>y0.value===r0.sortBy)||sortOptions[1];const x0=r0.sortDirection||"asc",g0=y0=>{r0.sortBy===y0?e0({...r0,sortDirection:x0==="asc"?"desc":"asc"}):e0({...r0,sortBy:y0,sortDirection:y0==="name"?"asc":"desc"})};return jsxRuntimeExports.jsx("div",{className:"sticky top-0 z-30 flex flex-col bg-background/95 backdrop-blur-xl shrink-0 border-b border-border",children:u0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex h-12 items-center gap-2 px-3",children:[jsxRuntimeExports.jsxs("span",{className:"flex-1 text-sm font-medium",children:[d0," selected"]}),jsxRuntimeExports.jsxs(Button,{size:"sm",disabled:!d0,onClick:f0,className:"h-8 gap-1.5",children:[jsxRuntimeExports.jsx(Send,{className:"h-3.5 w-3.5"}),"Create pitch"]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",onClick:h0,className:"h-8 w-8","aria-label":"Cancel selection",children:jsxRuntimeExports.jsx(X$2,{className:"h-4 w-4"})})]}),jsxRuntimeExports.jsx(SpliceSearchBar,{filters:r0,onFiltersChange:e0,filterOptions:l0,songs:o0,resultCount:s0,totalCount:c0})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5 px-3 pt-2 pb-1",children:[jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"h-7 gap-1 flex-1 justify-between text-xs px-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(m0,{className:cn$1("w-3 h-3",p0.color)}),jsxRuntimeExports.jsx("span",{children:p0.label})]}),jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 opacity-50"})]})}),jsxRuntimeExports.jsx(DropdownMenuContent,{align:"start",className:"w-44",children:statusOptions.map(y0=>{const b0=y0.icon,E0=y0.value===null?a0.all:a0[y0.value];return jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>e0({...r0,status:y0.value,folderId:null}),className:cn$1(r0.status===y0.value&&!r0.folderId&&"bg-muted"),children:[jsxRuntimeExports.jsx(b0,{className:cn$1("w-4 h-4 mr-2",y0.color)}),jsxRuntimeExports.jsx("span",{className:"flex-1",children:y0.label}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:E0})]},y0.label)})})]}),n0.length>0&&jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"h-7 gap-1 flex-1 justify-between text-xs px-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx(Folder,{className:"w-3 h-3 text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"truncate",children:A0?A0.name:"Folders"})]}),jsxRuntimeExports.jsx(ChevronDown,{className:"w-3 h-3 opacity-50"})]})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{align:"end",className:"w-44",children:[jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>e0({...r0,folderId:null}),className:cn$1(!r0.folderId&&"bg-muted"),children:[jsxRuntimeExports.jsx(Folder,{className:"w-4 h-4 mr-2 text-muted-foreground"}),jsxRuntimeExports.jsx("span",{className:"flex-1",children:"All Folders"})]}),jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),n0.map(y0=>jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>e0({...r0,status:null,folderId:y0.id}),className:cn$1(r0.folderId===y0.id&&"bg-muted"),children:[jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full mr-2",style:{backgroundColor:y0.color}}),jsxRuntimeExports.jsx("span",{className:"flex-1 truncate",children:y0.name}),jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:i0[y0.id]||0})]},y0.id))]})]}),jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(Button,{variant:"outline",size:"sm",className:"h-7 w-7 p-0",children:jsxRuntimeExports.jsx(ArrowUpD
747own,{className:"w-3 h-3"})})}),jsxRuntimeExports.jsx(DropdownMenuContent,{align:"end",className:"w-36",children:sortOptions.map(y0=>{const b0=(r0.sortBy||"name")===y0.value;return jsxRuntimeExports.jsxs(DropdownMenuItem,{onClick:()=>g0(y0.value),className:cn$1(b0&&"bg-muted"),children:[jsxRuntimeExports.jsx("span",{className:"flex-1",children:y0.label}),b0&&jsxRuntimeExports.jsx("span",{className:"text-[10px] text-muted-foreground",children:x0==="asc"?"â":"â"})]},y0.value)})})]}),h0&&jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"h-7 gap-1 px-2 text-xs",onClick:h0,children:[jsxRuntimeExports.jsx(Send,{className:"h-3 w-3"}),"New pitch"]})]}),jsxRuntimeExports.jsx(SpliceSearchBar,{filters:r0,onFiltersChange:e0,filterOptions:l0,songs:o0,resultCount:s0,totalCount:c0})]})})}const statusIndicator={available:"bg-green-500",cut:"bg-purple-500","on-hold":"bg-orange-500"};function AudioWaveIndicator(){return jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center gap-0.5 h-4 w-4",children:[jsxRuntimeExports.jsx("div",{className:"w-0.5 h-full bg-primary animate-audio-wave",style:{animationDelay:"0ms"}}),jsxRuntimeExports.jsx("div",{className:"w-0.5 h-full bg-primary animate-audio-wave",style:{animationDelay:"150ms"}}),jsxRuntimeExports.jsx("div",{className:"w-0.5 h-full bg-primary animate-audio-wave",style:{animationDelay:"300ms"}})]})}function SongRowSkeleton(){return jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-full bg-muted animate-shimmer"}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[jsxRuntimeExports.jsx("div",{className:"h-4 w-3/4 bg-muted rounded animate-shimmer"}),jsxRuntimeExports.jsx("div",{className:"h-3 w-1/2 bg-muted rounded animate-shimmer"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1",children:[jsxRuntimeExports.jsx("div",{className:"h-4 w-12 bg-muted rounded animate-shimmer"}),jsxRuntimeExports.jsx("div",{className:"h-4 w-16 bg-muted rounded animate-shimmer"})]})]}),jsxRuntimeExports.jsxs("div",{className:"text-right shrink-0 space-y-1",children:[jsxRuntimeExports.jsx("div",{className:"h-4 w-8 bg-muted rounded animate-shimmer"}),jsxRuntimeExports.jsx("div",{className:"h-3 w-6 bg-muted rounded animate-shimmer"})]})]})}function MobileSongList({songs:r0,onPlaySong:e0,onSelectSong:n0,currentPlayingSongId:a0,isPlaying:i0,isLoading:s0=!1,currentSongWaveform:o0=null,currentTime:l0=0,duration:c0=0,onSeek:u0,bottomInset:d0=0,isSelectMode:h0=!1,selectedIds:f0=new Set,onToggleSelection:p0}){return s0?jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",style:{paddingBottom:d0},children:jsxRuntimeExports.jsx("div",{className:"divide-y divide-border/50",children:Array.from({length:8}).map((A0,m0)=>jsxRuntimeExports.jsx(SongRowSkeleton,{},m0))})}):r0.length===0?jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 flex items-center justify-center p-8",style:{paddingBottom:d0},children:jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-sm",children:"No songs found"})}):jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain",style:{WebkitOverflowScrolling:"touch",paddingBottom:d0},children:jsxRuntimeExports.jsx("div",{className:"divide-y divide-border/50",children:r0.map(A0=>{var E0;const m0=A0.id===a0,x0=!!(A0.audioUrl||A0.dropboxUrl),g0=((E0=A0.genres)==null?void 0:E0[0])||A0.genre,y0=m0&&c0>0?l0/c0:0,b0=m0&&(o0||A0.waveformData)||null;return jsxRuntimeExports.jsxs("div",{className:cn$1("px-4 py-3 active:bg-muted/60 transition-colors",m0&&"bg-muted/40"),onClick:()=>h0?p0==null?void 0:p0(A0.id):n0(A0),children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[h0&&jsxRuntimeExports.jsx(Checkbox,{checked:f0.has(A0.id),onCheckedChange:()=>p0==null?void 0:p0(A0.id),onClick:w0=>w0.stopPropagation(),"aria-label":`Select ${A0.name}`}),jsxRuntimeExports.jsx("button",{onClick:w0=>{w0.stopPropagation(),x0&&e0(A0)},disabled:!x0,className:cn$1("w-10 h-10 rounded-full flex items-center justify-center shrink-0 transition-all",x0?"active:scale-95":"opacity-40",m0&&i0?"bg-primary text-primary-foreground":m0?"bg-primary/80 text-primary-foreground":"bg-muted text-muted-foreground"),children:m0&&i0?jsxRuntimeExports.jsx(AudioWaveIndicator,{}):m0?jsxRuntimeExports.jsx(Pause,{className:"w-4 h-4"}):jsxRuntimeExports.jsx(Play,{className:"w-4 h-4 ml-0.5"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate text-sm",children:A0.name}),jsxRuntimeExports.jsx("div",{className:cn$1("w-2 h-2 rounded-full shrink-0",statusIndicator[A0.status||"available"])})]}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:A0.writers||"No writers"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[g0&&jsxRuntimeExports.jsx("span",{className:"text-[10px] px-1.5 py-0.5 bg-muted rounded text-muted-foreground",children:g0}),A0.key&&jsxRuntimeExports.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 bg-muted rounded text-muted-foreground",children:[A0.key," ",A0.scale]})]})]}),jsxRuntimeExports.jsxs("div",{className:"text-right shrink-0",children:[jsxRuntimeExports.jsx("p",{className:"font-mono text-sm font-semibold text-foreground",children:A0.bpm}),jsxRuntimeExports.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"BPM"})]})]}),m0&&jsxRuntimeExports.jsx("div",{className:"mt-2 pl-[52px] pr-1",onClick:w0=>w0.stopPropagation(),children:jsxRuntimeExports.jsx(InlineWaveform,{waveformData:b0,progress:y0,isCurrentSong:!0,isHovered:!1,onSeek:w0=>u0&&c0>0&&u0(w0*c0),className:"h-6"})})]},A0.id)})})})}function __insertCSS(r0){if(typeof document>"u")return;let e0=document.head||document.getElementsByTagName("head")[0],n0=document.createElement("style");n0.type="text/css",e0.appendChild(n0),n0.styleSheet?n0.styleSheet.cssText=r0:n0.appendChild(document.createTextNode(r0))}const DrawerContext=React__default.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{}
747,openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),useDrawerContext=()=>{const r0=React__default.useContext(DrawerContext);if(!r0)throw new Error("useDrawerContext must be used within a Drawer.Root");return r0};__insertCSS(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 748[data-state=closed] 749){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;
749left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const KEYBOARD_BUFFER=24,useIsomorphicLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function chain$1(...r0){return(...e0)=>{for(let n0 of r0)typeof n0=="function"&&n0(...e0)}}function isMac(){return testPlatform(/^Mac/)}function isIPhone(){return testPlatform(/^iPhone/)}function isSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function isIPad(){return testPlatform(/^iPad/)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function testPlatform(r0){return typeof window<"u"&&window.navigator!=null?r0.test(window.navigator.platform):void 0}const visualViewport=typeof document<"u"&&window.visualViewport;function isScrollable(r0){let e0=window.getComputedStyle(r0);return/(auto|scroll)/.test(e0.overflow+e0.overflowX+e0.overflowY)}function getScrollParent(r0){for(isScrollable(r0)&&(r0=r0.parentElement);r0&&!isScrollable(r0);)r0=r0.parentElement;return r0||document.scrollingElement||document.documentElement}const nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let preventScrollCount=0,restore;function usePreventScroll(r0={}){let{isDisabled:e0}=r0;useIsomorphicLayoutEffect(()=>{if(!e0)return preventScrollCount++,preventScrollCount===1&&isIOS()&&(restore=preventScrollMobileSafari()),()=>{preventScrollCount--,preventScrollCount===0&&(restore==null||restore())}},[e0])}function preventScrollMobileSafari(){let r0,e0=0,n0=h0=>{r0=getScrollParent(h0.target),!(r0===document.documentElement&&r0===document.body)&&(e0=h0.changedTouches[0].pageY)},a0=h0=>{if(!r0||r0===document.documentElement||r0===document.body){h0.preventDefault();return}let f0=h0.changedTouches[0].pageY,p0=r0.scrollTop,A0=r0.scrollHeight-r0.clientHeight;A0!==0&&((p0<=0&&f0>e0||p0>=A0&&f0<e0)&&h0.preventDefault(),e0=f0)},i0=h0=>{let f0=h0.target;isInput(f0)&&f0!==document.activeElement&&(h0.preventDefault(),f0.style.transform="translateY(-2000px)",f0.focus(),requestAnimationFrame(()=>{f0.style.transform=""}))},s0=h0=>{let f0=h0.target;isInput(f0)&&(f0.style.transform="translateY(-2000px)",requestAnimationFrame(()=>
749{f0.style.transform="",visualViewport&&(visualViewport.height<window.innerHeight?requestAnimationFrame(()=>{scrollIntoView(f0)}):visualViewport.addEventListener("resize",()=>scrollIntoView(f0),{once:!0}))}))},o0=()=>{window.scrollTo(0,0)},l0=window.pageXOffset,c0=window.pageYOffset,u0=chain$1(setStyle(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d0=chain$1(addEvent(document,"touchstart",n0,{passive:!1,capture:!0}),addEvent(document,"touchmove",a0,{passive:!1,capture:!0}),addEvent(document,"touchend",i0,{passive:!1,capture:!0}),addEvent(document,"focus",s0,!0),addEvent(window,"scroll",o0));return()=>{u0(),d0(),window.scrollTo(l0,c0)}}function setStyle(r0,e0,n0){let a0=r0.style[e0];return r0.style[e0]=n0,()=>{r0.style[e0]=a0}}function addEvent(r0,e0,n0,a0){return r0.addEventListener(e0,n0,a0),()=>{r0.removeEventListener(e0,n0,a0)}}function scrollIntoView(r0){let e0=document.scrollingElement||document.documentElement;for(;r0&&r0!==e0;){let n0=getScrollParent(r0);if(n0!==document.documentElement&&n0!==document.body&&n0!==r0){let a0=n0.getBoundingClientRect().top,i0=r0.getBoundingClientRect().top,s0=r0.getBoundingClientRect().bottom;const o0=n0.getBoundingClientRect().bottom+KEYBOARD_BUFFER;s0>o0&&(n0.scrollTop+=i0-a0)}r0=n0.parentElement}}function isInput(r0){return r0 instanceof HTMLInputElement&&!nonTextInputTypes.has(r0.type)||r0 instanceof HTMLTextAreaElement||r0 instanceof HTMLElement&&r0.isContentEditable}function setRef(r0,e0){typeof r0=="function"?r0(e0):r0!=null&&(r0.current=e0)}function composeRefs(...r0){return e0=>r0.forEach(n0=>setRef(n0,e0))}function useComposedRefs(...r0){return reactExports.useCallback(composeRefs(...r0),r0)}const cache=new WeakMap;function set(r0,e0,n0=!1){if(!r0||!(r0 instanceof HTMLElement))return;let a0={};Object.entries(e0).forEach(([i0,s0])=>{if(i0.startsWith("--")){r0.style.setProperty(i0,s0);return}a0[i0]=r0.style[i0],r0.style[i0]=s0}),!n0&&cache.set(r0,a0)}function reset(r0,e0){if(!r0||!(r0 instanceof HTMLElement))return;let n0=cache.get(r0);n0&&(r0.style[e0]=n0[e0])}const isVertical=r0=>{switch(r0){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return r0}};function getTranslate(r0,e0){if(!r0)return null;const n0=window.getComputedStyle(r0),a0=n0.transform||n0.webkitTransform||n0.mozTransform;let i0=a0.match(/^matrix3d\((.+)\)$/);return i0?parseFloat(i0[1].split(", ")[isVertical(e0)?13:12]):(i0=a0.match(/^matrix\((.+)\)$/),i0?parseFloat(i0[1].split(", ")[isVertical(e0)?5:4]):null)}function dampenValue(r0){return 8*(Math.log(r0+1)-2)}function assignStyle(r0,e0){if(!r0)return()=>{};const n0=r0.style.cssText;return Object.assign(r0.style,e0),()=>{r0.style.cssText=n0}}function chain(...r0){return(...e0)=>{for(const n0 of r0)typeof n0=="function"&&n0(...e0)}}const TRANSITIONS={DURATION:.5,EASE:[.32,.72,0,1]},VELOCITY_THRESHOLD=.4,CLOSE_THRESHOLD=.25,SCROLL_LOCK_TIMEOUT=100,BORDER_RADIUS=8,NESTED_DISPLACEMENT=16,WINDOW_TOP_OFFSET=26,DRAG_CLASS="vaul-dragging";function useCallbackRef(r0){const e0=React__default.useRef(r0);return React__default.useEffect(()=>{e0.current=r0}),React__default.useMemo(()=>(...n0)=>e0.current==null?void 0:e0.current.call(e0,...n0),[])}function useUncontrolledState({defaultProp:r0,onChange:e0}){const n0=React__default.useState(r0),[a0]=n0,i0=React__default.useRef(a0),s0=useCallbackRef(e0);return React__default.useEffect(()=>{i0.current!==a0&&(s0(a0),i0.current=a0)},[a0,i0,s0]),n0}function useControllableState({prop:r0,defaultProp:e0,onChange:n0=()=>{}}){const[a0,i0]=useUncontrolledState({defaultProp:e0,onChange:n0}),s0=r0!==void 0,o0=s0?r0:a0,l0=useCallbackRef(n0),c0=React__default.useCallback(u0=>{if(s0){const h0=typeof u0=="function"?u0(r0):u0;h0!==r0&&l0(h0)}else i0(u0)},[s0,r0,i0,l0]);return[o0,c0]}function useSnapPoints({activeSnapPointProp:r0,setActiveSnapPointProp:e0,snapPoints:n0,drawerRef:a0,overlayRef:i0,fadeFromIndex:s0,onSnapPointChange:o0,direction:l0="bottom",container:c0,snapToSequentialPoint:u0}){const[d0,h0]=useControllableState({prop:r0,defaultProp:n0==null?void 0:n0[0],onChange:e0}),[f0,p0]=React__default.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);React__default.useEffect(()=>{function S0(){p0({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",S0),()=>window.removeEventListener("resize",S0)},[]);const A0=React__default.useMemo(()=>d0===(n0==null?void 0:n0[n0.length-1])||null,[n0,d0]),m0=React__default.useMemo(()=>n0==null?void 0:n0.findIndex(S0=>S0===d0),[n0,d0]),x0=n0&&n0.length>0&&(s0||s0===0)&&!Number.isNaN(s0)&&n0[s0]===d0||!n0,g0=React__default.useMemo(()=>{const S0=c0?{width:c0.getBoundingClientRect().width,height:c0.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var k0;return(k0=n0==null?void 0:n0.map(R0=>
749{const j0=typeof R0=="string";let C0=0;if(j0&&(C0=parseInt(R0,10)),isVertical(l0)){const T0=j0?C0:f0?R0*S0.height:0;return f0?l0==="bottom"?S0.height-T0:-S0.height+T0:T0}const $0=j0?C0:f0?R0*S0.width:0;return f0?l0==="right"?S0.width-$0:-S0.width+$0:$0}))!=null?k0:[]},[n0,f0,c0]),y0=React__default.useMemo(()=>m0!==null?g0==null?void 0:g0[m0]:null,[g0,m0]),b0=React__default.useCallback(S0=>{var k0;const R0=(k0=g0==null?void 0:g0.findIndex(j0=>j0===S0))!=null?k0:null;o0(R0),set(a0.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(l0)?`translate3d(0, ${S0}px, 0)`:`translate3d(${S0}px, 0, 0)`}),g0&&R0!==g0.length-1&&R0!==s0&&R0<s0?set(i0.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"0"}):set(i0.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),h0(n0==null?void 0:n0[Math.max(R0,0)])},[a0.current,n0,g0,s0,i0,h0]);React__default.useEffect(()=>{if(d0||r0){var S0;const k0=(S0=n0==null?void 0:n0.findIndex(R0=>R0===r0||R0===d0))!=null?S0:-1;g0&&k0!==-1&&typeof g0[k0]=="number"&&b0(g0[k0])}},[d0,r0,n0,g0,b0]);function E0({draggedDistance:S0,closeDrawer:k0,velocity:R0,dismissible:j0}){if(s0===void 0)return;const C0=l0==="bottom"||l0==="right"?(y0??0)-S0:(y0??0)+S0,$0=m0===s0-1,T0=m0===0,I0=S0>0;if($0&&set(i0.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),!u0&&R0>2&&!I0){j0?k0():b0(g0[0]);return}if(!u0&&R0>2&&I0&&g0&&n0){b0(g0[n0.length-1]);return}const M0=g0==null?void 0:g0.reduce((D0,O0)=>typeof D0!="number"||typeof O0!="number"?D0:Math.abs(O0-C0)<Math.abs(D0-C0)?O0:D0),N0=isVertical(l0)?window.innerHeight:window.innerWidth;if(R0>VELOCITY_THRESHOLD&&Math.abs(S0)<N0*.4){const D0=I0?1:-1;if(D0>0&&A0){b0(g0[n0.length-1]);return}if(T0&&D0<0&&j0&&k0(),m0===null)return;b0(g0[m0+D0]);return}b0(M0)}function w0({draggedDistance:S0}){if(y0===null)return;const k0=l0==="bottom"||l0==="right"?y0-S0:y0+S0;(l0==="bottom"||l0==="right")&&k0<g0[g0.length-1]||(l0==="top"||l0==="left")&&k0>g0[g0.length-1]||set(a0.current,{transform:isVertical(l0)?`translate3d(0, ${k0}px, 0)`:`translate3d(${k0}px, 0, 0)`})}function v0(S0,k0){if(!n0||typeof m0!="number"||!g0||s0===void 0)return null;const R0=m0===s0-1;if(m0>=s0&&k0)return 0;if(R0&&!k0)return 1;if(!x0&&!R0)return null;const C0=R0?m0+1:m0-1,$0=R0?g0[C0]-g0[C0-1]:g0[C0+1]-g0[C0],T0=S0/Math.abs($0);return R0?1-T0:T0}return{isLastSnapPoint:A0,activeSnapPoint:d0,shouldFade:x0,getPercentageDragged:v0,setActiveSnapPoint:h0,activeSnapPointIndex:m0,onRelease:E0,onDrag:w0,snapPointsOffset:g0}}const noop=()=>()=>{};function useScaleBackground(){const{direction:r0,isOpen:e0,shouldScaleBackground:n0,setBackgroundColorOnScale:a0,noBodyStyles:i0}=useDrawerContext(),s0=React__default.useRef(null),o0=reactExports.useMemo(()=>document.body.style.backgroundColor,[]);function l0(){return(window.innerWidth-WINDOW_TOP_OFFSET)/window.innerWidth}React__default.useEffect(()=>{if(e0&&n0){s0.current&&clearTimeout(s0.current);const c0=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c0)return;chain(a0&&!i0?assignStyle(document.body,{background:"black"}):noop,assignStyle(c0,{transformOrigin:isVertical(r0)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`}));const u0=assignStyle(c0,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(r0)?{transform:`scale(${l0()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l0()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u0(),s0.current=window.setTimeout(()=>{o0?document.body.style.background=o0:document.body.style.removeProperty("background")},TRANSITIONS.DURATION*1e3)}}},[e0,n0,o0])}let previousBodyPosition=null;function usePositionFixed({isOpen:r0,modal:e0,nested:n0,hasBeenOpened:a0,preventScrollRestoration:i0,noBodyStyles:s0}){const[o0,l0]=React__default.useState(()=>typeof window<"u"?window.location.href:""),c0=React__default.useRef(0),u0=React__default.useCallback(()=>
749{if(isSafari()&&previousBodyPosition===null&&r0&&!s0){previousBodyPosition={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:h0,innerHeight:f0}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c0.current}px`,left:`${-h0}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p0=f0-window.innerHeight;p0&&c0.current>=f0&&(document.body.style.top=`${-(c0.current+p0)}px`)}),300)}},[r0]),d0=React__default.useCallback(()=>{if(isSafari()&&previousBodyPosition!==null&&!s0){const h0=-parseInt(document.body.style.top,10),f0=-parseInt(document.body.style.left,10);Object.assign(document.body.style,previousBodyPosition),window.requestAnimationFrame(()=>{if(i0&&o0!==window.location.href){l0(window.location.href);return}window.scrollTo(f0,h0)}),previousBodyPosition=null}},[o0]);return React__default.useEffect(()=>{function h0(){c0.current=window.scrollY}return h0(),window.addEventListener("scroll",h0),()=>{window.removeEventListener("scroll",h0)}},[]),React__default.useEffect(()=>{n0||!a0||(r0?(!window.matchMedia("(display-mode: standalone)").matches&&u0(),e0||window.setTimeout(()=>{d0()},500)):d0())},[r0,a0,o0,e0,n0,u0,d0]),{restorePositionSetting:d0}}function Root({open:r0,onOpenChange:e0,children:n0,onDrag:a0,onRelease:i0,snapPoints:s0,shouldScaleBackground:o0=!1,setBackgroundColorOnScale:l0=!0,closeThreshold:c0=CLOSE_THRESHOLD,scrollLockTimeout:u0=SCROLL_LOCK_TIMEOUT,dismissible:d0=!0,handleOnly:h0=!1,fadeFromIndex:f0=s0&&s0.length-1,activeSnapPoint:p0,setActiveSnapPoint:A0,fixed:m0,modal:x0=!0,onClose:g0,nested:y0,noBodyStyles:b0,direction:E0="bottom",defaultOpen:w0=!1,disablePreventScroll:v0=!0,snapToSequentialPoint:S0=!1,preventScrollRestoration:k0=!1,repositionInputs:R0=!0,onAnimationEnd:j0,container:C0,autoFocus:$0=!1}){var T0,I0;const[M0=!1,N0]=useControllableState({defaultProp:w0,prop:r0,onChange:qw=>{e0==null||e0(qw),!qw&&!y0&&u1(),setTimeout(()=>{j0==null||j0(qw)},TRANSITIONS.DURATION*1e3),qw&&!x0&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),qw||(document.body.style.pointerEvents="auto")}}),[D0,O0]=React__default.useState(!1),[B0,z0]=React__default.useState(!1),[G0,F0]=React__default.useState(!1),Q0=React__default.useRef(null),U0=React__default.useRef(null),q0=React__default.useRef(null),Rw=React__default.useRef(null),_w=React__default.useRef(null),J0=React__default.useRef(!1),Cw=React__default.useRef(null),Ow=React__default.useRef(0),jw=React__default.useRef(!1),Nw=React__default.useRef(0),xw=React__default.useRef(null),X0=React__default.useRef(((T0=xw.current)==null?void 0:T0.getBoundingClientRect().height)||0),Lw=React__default.useRef(((I0=xw.current)==null?void 0:I0.getBoundingClientRect().width)||0),Hw=React__default.useRef(0),Ww=React__default.useCallback(qw=>{s0&&qw===Pw.length-1&&(U0.current=new Date)},[]),{activeSnapPoint:r1,activeSnapPointIndex:Yw,setActiveSnapPoint:l1,onRelease:p1,snapPointsOffset:Pw,onDrag:Qw,shouldFade:Xw,getPercentageDragged:f1}=useSnapPoints({snapPoints:s0,activeSnapPointProp:p0,setActiveSnapPointProp:A0,drawerRef:xw,fadeFromIndex:f0,overlayRef:Q0,onSnapPointChange:Ww,direction:E0,container:C0,snapToSequentialPoint:S0});usePreventScroll({isDisabled:!M0||B0||!x0||G0||!D0||!R0||!v0});const{restorePositionSetting:u1}=usePositionFixed({isOpen:M0,modal:x0,nested:y0,hasBeenOpened:D0,preventScrollRestoration:k0,noBodyStyles:b0});function W0(){return(window.innerWidth-WINDOW_TOP_OFFSET)/window.innerWidth}function P0(qw){var y1,S1;!d0&&!s0||xw.current&&!xw.current.contains(qw.target)||(X0.current=((y1=xw.current)==null?void 0:y1.getBoundingClientRect().height)||0,Lw.current=((S1=xw.current)==null?void 0:S1.getBoundingClientRect().width)||0,z0(!0),q0.current=new Date,isIOS()&&window.addEventListener("touchend",()=>J0.current=!1,{once:!0}),qw.target.setPointerCapture(qw.pointerId),Ow.current=isVertical(E0)?qw.pageY:qw.pageX)}function L0(qw,y1){var S1,_1;let g1=qw;const C1=(S1=window.getSelection())==null?void 0:S1.toString(),M1=xw.current?getTranslate(xw.current,E0):null,a1=new Date;if(g1.hasAttribute("data-vaul-no-drag")||g1.closest("[data-vaul-no-drag]"))return!1;if(E0==="right"||E0==="left")return!0;
749if(U0.current&&a1.getTime()-U0.current.getTime()<500)return!1;if(M1!==null&&(E0==="bottom"?M1>0:M1<0))return!0;if(C1&&C1.length>0)return!1;if(a1.getTime()-((_1=_w.current)==null?void 0:_1.getTime())<u0&&M1===0||y1)return _w.current=a1,!1;for(;g1;){if(g1.scrollHeight>g1.clientHeight){if(g1.scrollTop!==0)return _w.current=new Date,!1;if(g1.getAttribute("role")==="dialog")return!0}g1=g1.parentNode}return!0}function Z0(qw){if(xw.current&&B0){const y1=E0==="bottom"||E0==="right"?1:-1,S1=(Ow.current-(isVertical(E0)?qw.pageY:qw.pageX))*y1,_1=S1>0,g1=s0&&!d0&&!_1;if(g1&&Yw===0)return;const C1=Math.abs(S1),M1=document.querySelector("[data-vaul-drawer-wrapper]"),a1=E0==="bottom"||E0==="top"?X0.current:Lw.current;let h1=C1/a1;const Y0=f1(C1,_1);if(Y0!==null&&(h1=Y0),g1&&h1>=1||!J0.current&&!L0(qw.target,_1))return;if(xw.current.classList.add(DRAG_CLASS),J0.current=!0,set(xw.current,{transition:"none"}),set(Q0.current,{transition:"none"}),s0&&Qw({draggedDistance:S1}),_1&&!s0){const Mw=dampenValue(S1),Uw=Math.min(Mw*-1,0)*y1;set(xw.current,{transform:isVertical(E0)?`translate3d(0, ${Uw}px, 0)`:`translate3d(${Uw}px, 0, 0)`});return}const Tw=1-h1;if((Xw||f0&&Yw===f0-1)&&(a0==null||a0(qw,h1),set(Q0.current,{opacity:`${Tw}`,transition:"none"},!0)),M1&&Q0.current&&o0){const Mw=Math.min(W0()+h1*(1-W0()),1),Uw=8-h1*8,Fw=Math.max(0,14-h1*14);set(M1,{borderRadius:`${Uw}px`,transform:isVertical(E0)?`scale(${Mw}) translate3d(0, ${Fw}px, 0)`:`scale(${Mw}) translate3d(${Fw}px, 0, 0)`,transition:"none"},!0)}if(!s0){const Mw=C1*y1;set(xw.current,{transform:isVertical(E0)?`translate3d(0, ${Mw}px, 0)`:`translate3d(${Mw}px, 0, 0)`})}}}React__default.useEffect(()=>{var qw;function y1(){if(!xw.current||!R0)return;const S1=document.activeElement;if(isInput(S1)||jw.current){var _1;const g1=((_1=window.visualViewport)==null?void 0:_1.height)||0,C1=window.innerHeight;let M1=C1-g1;const a1=xw.current.getBoundingClientRect().height||0,h1=a1>C1*.8;Hw.current||(Hw.current=a1);const Y0=xw.current.getBoundingClientRect().top;if(Math.abs(Nw.current-M1)>60&&(jw.current=!jw.current),s0&&s0.length>0&&Pw&&Yw){const Tw=Pw[Yw]||0;M1+=Tw}if(Nw.current=M1,a1>g1||jw.current){const Tw=xw.current.getBoundingClientRect().height;let Mw=Tw;Tw>g1&&(Mw=g1-(h1?Y0:WINDOW_TOP_OFFSET)),m0?xw.current.style.height=`${Tw-Math.max(M1,0)}px`:xw.current.style.height=`${Math.max(Mw,g1-Y0)}px`}else xw.current.style.height=`${Hw.current}px`;s0&&s0.length>0&&!jw.current?xw.current.style.bottom="0px":xw.current.style.bottom=`${Math.max(M1,0)}px`}}return(qw=window.visualViewport)==null||qw.addEventListener("resize",y1),()=>{var S1;return(S1=window.visualViewport)==null?void 0:S1.removeEventListener("resize",y1)}},[Yw,s0,Pw]);function $w(qw){Vw(),g0==null||g0(),qw||N0(!1),setTimeout(()=>{s0&&l1(s0[0])},TRANSITIONS.DURATION*1e3)}function Bw(){if(!xw.current)return;const qw=document.querySelector("[data-vaul-drawer-wrapper]"),y1=getTranslate(xw.current,E0);set(xw.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),set(Q0.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),o0&&y1&&y1>0&&M0&&set(qw,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(E0)?{transform:`scale(${W0()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${W0()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`},!0)}function Vw(){!B0||!xw.current||(xw.current.classList.remove(DRAG_CLASS),J0.current=!1,z0(!1),Rw.current=new Date)}function Dw(qw){if(!B0||!xw.current)return;xw.current.classList.remove(DRAG_CLASS),J0.current=!1,z0(!1),Rw.current=new Date;const y1=getTranslate(xw.current,E0);
749if(!L0(qw.target,!1)||!y1||Number.isNaN(y1)||q0.current===null)return;const S1=Rw.current.getTime()-q0.current.getTime(),_1=Ow.current-(isVertical(E0)?qw.pageY:qw.pageX),g1=Math.abs(_1)/S1;if(g1>.05&&(F0(!0),setTimeout(()=>{F0(!1)},200)),s0){p1({draggedDistance:_1*(E0==="bottom"||E0==="right"?1:-1),closeDrawer:$w,velocity:g1,dismissible:d0}),i0==null||i0(qw,!0);return}if(E0==="bottom"||E0==="right"?_1>0:_1<0){Bw(),i0==null||i0(qw,!0);return}if(g1>VELOCITY_THRESHOLD){$w(),i0==null||i0(qw,!1);return}var C1;const M1=Math.min((C1=xw.current.getBoundingClientRect().height)!=null?C1:0,window.innerHeight);var a1;const h1=Math.min((a1=xw.current.getBoundingClientRect().width)!=null?a1:0,window.innerWidth),Y0=E0==="left"||E0==="right";if(Math.abs(y1)>=(Y0?h1:M1)*c0){$w(),i0==null||i0(qw,!1);return}i0==null||i0(qw,!0),Bw()}React__default.useEffect(()=>(M0&&(set(document.documentElement,{scrollBehavior:"auto"}),U0.current=new Date),()=>{reset(document.documentElement,"scrollBehavior")}),[M0]);function Kw(qw){const y1=qw?(window.innerWidth-NESTED_DISPLACEMENT)/window.innerWidth:1,S1=qw?-NESTED_DISPLACEMENT:0;Cw.current&&window.clearTimeout(Cw.current),set(xw.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:`scale(${y1}) translate3d(0, ${S1}px, 0)`}),!qw&&xw.current&&(Cw.current=setTimeout(()=>{const _1=getTranslate(xw.current,E0);set(xw.current,{transition:"none",transform:isVertical(E0)?`translate3d(0, ${_1}px, 0)`:`translate3d(${_1}px, 0, 0)`})},500))}function i1(qw,y1){if(y1<0)return;const S1=(window.innerWidth-NESTED_DISPLACEMENT)/window.innerWidth,_1=S1+y1*(1-S1),g1=-NESTED_DISPLACEMENT+y1*NESTED_DISPLACEMENT;set(xw.current,{transform:isVertical(E0)?`scale(${_1}) translate3d(0, ${g1}px, 0)`:`scale(${_1}) translate3d(${g1}px, 0, 0)`,transition:"none"})}function m1(qw,y1){const S1=isVertical(E0)?window.innerHeight:window.innerWidth,_1=y1?(S1-NESTED_DISPLACEMENT)/S1:1,g1=y1?-NESTED_DISPLACEMENT:0;y1&&set(xw.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(E0)?`scale(${_1}) translate3d(0, ${g1}px, 0)`:`scale(${_1}) translate3d(${g1}px, 0, 0)`})}return React__default.createElement(Root$8,{defaultOpen:w0,onOpenChange:qw=>{!d0&&!qw||(qw?O0(!0):$w(!0),N0(qw))},open:M0},React__default.createElement(DrawerContext.Provider,{value:{activeSnapPoint:r1,snapPoints:s0,setActiveSnapPoint:l1,drawerRef:xw,overlayRef:Q0,onOpenChange:e0,onPress:P0,onRelease:Dw,onDrag:Z0,dismissible:d0,handleOnly:h0,isOpen:M0,isDragging:B0,shouldFade:Xw,closeDrawer:$w,onNestedDrag:i1,onNestedOpenChange:Kw,onNestedRelease:m1,keyboardIsOpen:jw,modal:x0,snapPointsOffset:Pw,direction:E0,shouldScaleBackground:o0,setBackgroundColorOnScale:l0,noBodyStyles:b0,container:C0,autoFocus:$0}},n0))}const Overlay=React__default.forwardRef(function({...r0},e0){const{overlayRef:n0,snapPoints:a0,onRelease:i0,shouldFade:s0,isOpen:o0,modal:l0}=useDrawerContext(),c0=useComposedRefs(e0,n0),u0=a0&&a0.length>0;return l0?React__default.createElement(Overlay$1,{onMouseUp:i0,ref:c0,"data-vaul-overlay":"","data-vaul-snap-points":o0&&u0?"true":"false","data-vaul-snap-points-overlay":o0&&s0?"true":"false",...r0}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});Overlay.displayName="Drawer.Overlay";const Content=React__default.forwardRef(function({onPointerDownOutside:r0,style:e0,onOpenAutoFocus:n0,...a0},i0){const{drawerRef:s0,onPress:o0,onRelease:l0,onDrag:c0,keyboardIsOpen:u0,snapPointsOffset:d0,modal:h0,isOpen:f0,direction:p0,snapPoints:A0,container:m0,handleOnly:x0,autoFocus:g0}=useDrawerContext(),[y0,b0]=React__default.useState(!1),E0=useComposedRefs(i0,s0),w0=React__default.useRef(null),v0=React__default.useRef(null),S0=React__default.useRef(!1),k0=A0&&A0.length>0;useScaleBackground();const R0=(C0,$0,T0=0)=>{if(S0.current)return!0;const I0=Math.abs(C0.y),M0=Math.abs(C0.x),N0=M0>I0,D0=["bottom","right"].includes($0)?1:-1;if($0==="left"||$0==="right"){if(!(C0.x*D0<0)&&M0>=0&&M0<=T0)return N0}else if(!(C0.y*D0<0)&&I0>=0&&I0<=T0)return!N0;return S0.current=!0,!0};React__default.useEffect(()=>{k0&&window.requestAnimationFrame(()=>{b0(!0)})},[]);function j0(C0){w0.current=null,S0.current=!1,l0(C0)}return React__default.createElement(Content$2,{"data-vaul-drawer-direction":p0,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y0?"true":"false","data-vaul-snap-points":f0&&k0?"true":"false","data-vaul-custom-container":m0?"true":"false",...a0,ref:E0,style:d0&&d0.length>0?{"--snap-point-height":`${d0[0]}px`,...e0}:e0,onPointerDown:C0=>{x0||(a0.onPointerDown==null||a0.onPointerDown.call(a0,C0),w0.current={x:C0.pageX,y:C0.pageY},o0(C0))},onOpenAutoFocus:C0=>{n0==null||n0(C0),g0||C0.preventDefault()},onPointerDownOutside:C0=>{if(r0==null||r0(C0),!h0||C0.defaultPrevented){C0.preventDefault();return}u0.current&&(u0.current=!1)},onFocusOutside:C0=>{if(!h0){C0.preventDefault();return}},onPointerMove:C0=>{if(v0.current=C0,x0||(a0.onPointerMove==null||a0.onPointerMove.call(a0,C0),!w0.current))return;const $0=C0.pageY-w0.current.y,T0=C0.pageX-w0.current.x,I0=C0.pointerType==="touch"?10:2;R0({x:T0,y:$0},p0,I0)?c0(C0):(Math.abs(T0)>I0||Math.abs($0)>I0)&&(w0.current=null)},onPointerUp:C0=>{a0.onPointerUp==null||a0.onPointerUp.call(a0,C0),w0.current=null,S0.current=!1,l0(C0)},onPointerOut:C0=>{a0.onPointerOut==null||a0.onPointerOut.call(a0,C0),j0(v0.current)},onContextMenu:C0=>{a0.onContextMenu==null||a0.onContextMenu.call(a0,C0),j0(v0.current)}})});Content.displayName="Drawer.Content";
749const LONG_HANDLE_PRESS_TIMEOUT=250,DOUBLE_TAP_TIMEOUT=120,Handle=React__default.forwardRef(function({preventCycle:r0=!1,children:e0,...n0},a0){const{closeDrawer:i0,isDragging:s0,snapPoints:o0,activeSnapPoint:l0,setActiveSnapPoint:c0,dismissible:u0,handleOnly:d0,isOpen:h0,onPress:f0,onDrag:p0}=useDrawerContext(),A0=React__default.useRef(null),m0=React__default.useRef(!1);function x0(){if(m0.current){b0();return}window.setTimeout(()=>{g0()},DOUBLE_TAP_TIMEOUT)}function g0(){if(s0||r0||m0.current){b0();return}if(b0(),(!o0||o0.length===0)&&u0){i0();return}if(l0===o0[o0.length-1]&&u0){i0();return}const w0=o0.findIndex(S0=>S0===l0);if(w0===-1)return;const v0=o0[w0+1];c0(v0)}function y0(){A0.current=window.setTimeout(()=>{m0.current=!0},LONG_HANDLE_PRESS_TIMEOUT)}function b0(){window.clearTimeout(A0.current),m0.current=!1}return React__default.createElement("div",{onClick:x0,onPointerCancel:b0,onPointerDown:E0=>{d0&&f0(E0),y0()},onPointerMove:E0=>{d0&&p0(E0)},ref:a0,"data-vaul-drawer-visible":h0?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n0},React__default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},e0))});Handle.displayName="Drawer.Handle";function NestedRoot({onDrag:r0,onOpenChange:e0,...n0}){const{onNestedDrag:a0,onNestedOpenChange:i0,onNestedRelease:s0}=useDrawerContext();if(!a0)throw new Error("Drawer.NestedRoot must be placed in another drawer");return React__default.createElement(Root,{nested:!0,onClose:()=>{i0(!1)},onDrag:(o0,l0)=>{a0(o0,l0),r0==null||r0(o0,l0)},onOpenChange:o0=>{o0&&i0(o0)},onRelease:s0,...n0})}function Portal(r0){const e0=useDrawerContext(),{container:n0=e0.container,...a0}=r0;return React__default.createElement(Portal$2,{container:n0,...a0})}const Drawer$1={Root,NestedRoot,Content,Overlay,Trigger:Trigger$2,Portal,Handle,Close,Title,Description},Drawer=({shouldScaleBackground:r0=!0,...e0})=>jsxRuntimeExports.jsx(Drawer$1.Root,{shouldScaleBackground:r0,...e0});Drawer.displayName="Drawer";const DrawerPortal=Drawer$1.Portal,DrawerOverlay=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Drawer$1.Overlay,{ref:n0,className:cn$1("fixed inset-0 z-50 bg-black/80",r0),...e0}));DrawerOverlay.displayName=Drawer$1.Overlay.displayName;const DrawerContent=reactExports.forwardRef(({className:r0,children:e0,...n0},a0)=>jsxRuntimeExports.jsxs(DrawerPortal,{children:[jsxRuntimeExports.jsx(DrawerOverlay,{}),jsxRuntimeExports.jsxs(Drawer$1.Content,{ref:a0,className:cn$1("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",r0),...n0,children:[jsxRuntimeExports.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e0]})]}));DrawerContent.displayName="DrawerContent";const DrawerTitle=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Drawer$1.Title,{ref:n0,className:cn$1("text-lg font-semibold leading-none tracking-tight",r0),...e0}));DrawerTitle.displayName=Drawer$1.Title.displayName;const DrawerDescription=reactExports.forwardRef(({className:r0,...e0},n0)=>jsxRuntimeExports.jsx(Drawer$1.Description,{ref:n0,className:cn$1("text-sm text-muted-foreground",r0),...e0}));DrawerDescription.displayName=Drawer$1.Description.displayName;function DetailRow({icon:r0,label:e0,children:n0}){return jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3 py-2.5",children:[jsxRuntimeExports.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-muted-foreground shrink-0",children:r0}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntimeExports.jsx("div",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground mb-0.5",children:e0}),jsxRuntimeExports.jsx("div",{className:"text-sm text-foreground",children:n0})]})]})}function MobileSongDetail({song:r0,isOpen:e0,onClose:n0,onPlay:a0,isPlaying:i0,isCurrentSong:s0,folders:o0,taggedSongwriters:l0=[],onEdit:c0,canEdit:u0=!1,currentTime:d0=0,duration:h0=0,onSeek:f0,waveformData:p0=null}){var $0,T0,I0,M0;const{ownerId:A0}=useAuth(),[m0,x0]=reactExports.useState(!1),[g0,y0]=reactExports.useState(!1);if(!r0)return null;const b0=s0?p0||r0.waveformData||null:r0.waveformData||null,E0=s0&&h0>0?d0/h0:0,w0=r0.genres||(r0.genre?[r0.genre]:[]),v0=o0.find(N0=>N0.id===r0.folderId),S0=(r0.writers||"").split(",").map(N0=>N0.trim()).filter(N0=>N0.length>
7490),k0=!!(r0.audioUrl||r0.dropboxUrl),R0={available:"bg-green-500/20 text-green-400",cut:"bg-purple-500/20 text-purple-400","on-hold":"bg-orange-500/20 text-orange-400"},j0={available:"Available",cut:"Cut / Sold","on-hold":"On Hold"},C0=async()=>{if(!A0){ue$2.error("Unable to create pitch link");return}x0(!0);try{const N0=`${r0.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,30)}-${Date.now().toString(36)}`,{data:D0,error:O0}=await supabase.from("pitch_links").insert({name:r0.name,slug:N0,song_ids:[r0.id],owner_id:A0,is_active:!0}).select().single();if(O0)throw O0;const B0=`${window.location.origin}/pitch/${N0}`;await navigator.clipboard.writeText(B0),y0(!0),ue$2.success("Pitch link created and copied!"),setTimeout(()=>y0(!1),3e3)}catch(N0){console.error("Failed to create pitch link:",N0),ue$2.error("Failed to create pitch link")}finally{x0(!1)}};return jsxRuntimeExports.jsx(Drawer,{open:e0,onOpenChange:N0=>!N0&&n0(),children:jsxRuntimeExports.jsx(DrawerContent,{className:"max-h-[85vh]",children:jsxRuntimeExports.jsxs("div",{className:"flex-1 px-4 pb-6 overflow-y-auto overscroll-contain",style:{WebkitOverflowScrolling:"touch"},children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center text-center pt-2 pb-4",children:[jsxRuntimeExports.jsx("img",{src:songIcon,alt:"Song",className:"w-24 h-24 object-contain mb-4"}),jsxRuntimeExports.jsx("h3",{className:"font-semibold text-lg text-foreground px-4",children:r0.name}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r0.writers||"No writers"}),k0&&jsxRuntimeExports.jsx("div",{className:"w-full mt-4 px-2",children:jsxRuntimeExports.jsx(InlineWaveform,{waveformData:b0,progress:E0,isCurrentSong:s0,isHovered:!1,onSeek:N0=>f0&&h0>0&&f0(N0*h0),className:"h-14"})}),jsxRuntimeExports.jsx(Button,{size:"lg",className:"mt-4 gap-2 rounded-full px-8",onClick:()=>k0&&a0(r0),disabled:!k0,children:s0&&i0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Pause,{className:"w-5 h-5"}),"Playing"]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Play,{className:"w-5 h-5 ml-0.5"}),"Play"]})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[u0&&c0&&jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>{n0(),setTimeout(()=>c0(r0),150)},children:[jsxRuntimeExports.jsx(Pencil,{className:"w-4 h-4"}),"Edit"]}),jsxRuntimeExports.jsxs(Button,{variant:"outline",size:"sm",className:"gap-1.5",onClick:C0,disabled:m0,children:[m0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4 animate-spin"}):g0?jsxRuntimeExports.jsx(Check,{className:"w-4 h-4 text-green-500"}):jsxRuntimeExports.jsx(Share2,{className:"w-4 h-4"}),g0?"Copied!":"Share"]})]}),r0.dropboxUrl&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"sm",className:"mt-2 gap-1.5 text-muted-foreground",onClick:()=>{navigator.clipboard.writeText(r0.dropboxUrl),ue$2.success("Dropbox link copied!")},children:[jsxRuntimeExports.jsx(Link,{className:"w-4 h-4"}),"Copy Dropbox Link"]})]}),jsxRuntimeExports.jsx(Separator,{className:"my-2"}),($0=r0.aiReferenceArtists)!=null&&$0.length||(T0=r0.aiPitchKeywords)!=null&&T0.length||r0.aiPitchReadinessScore!=null?jsxRuntimeExports.jsxs("section",{className:"space-y-3 border-y border-border/60 py-4","aria-labelledby":"mobile-artist-fit-heading",children:[jsxRuntimeExports.jsx("h3",{id:"mobile-artist-fit-heading",className:"text-xs font-semibold uppercase text-muted-foreground",children:"Artist pitch"}),(I0=r0.aiReferenceArtists)!=null&&I0.length?jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(MicVocal,{className:"w-4 h-4"}),label:"Artist Fit",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.aiReferenceArtists.map(N0=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:N0},N0))})}):null,(M0=r0.aiPitchKeywords)!=null&&M0.length?jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Hash$2,{className:"w-4 h-4"}),label:"Pitch Keywords",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.aiPitchKeywords.map(N0=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:N0},N0))})}):null,r0.aiPitchReadinessScore!=null?jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntimeExports.jsx("span",{className:"text-xl font-semibold tabular-nums",children:r0.aiPitchReadinessScore}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"text-xs font-medium uppercase text-muted-foreground",children:"Pitch Readiness"}),r0.aiPitchReadinessReasoning&&jsxRuntimeExports.jsx("p",{className:"text-sm leading-relaxed",children:r0.aiPitchReadinessReasoning})]})]}):null]}):null,jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Tag,{className:"w-4 h-4"}),label:"Status",children:jsxRuntimeExports.jsx(Badge,{variant:"outline",className:cn$1("text-xs border-0",R0[r0.status]),children:j0[r0.status]})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Gauge,{className:"w-4 h-4"}),label:"BPM",children:jsxRuntimeExports.jsx("span",{className:"font-mono font-semibold",children:r0.bpm})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Piano,{className:"w-4 h-4"}),label:"Key / Scale",children:jsxRuntimeExports.jsxs("span",{className:"font-mono",children:[r0.key," ",r0.scale]})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(MicVocal,{className:"w-4 h-4"}),label:"Vocalist",children:r0.vocalistGender}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Tag,{className:"w-4 h-4"}),label:"Genres",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:w0.length>0?w0.map((N0,D0)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs",children:N0},D0)):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs italic",children:"No genres"})})}),r0.keywords&&r0.keywords.length>0&&jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Hash$2,{className:"w-4 h-4"}),label:"Keywords",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.keywords.map((N0,D0)=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:N0},D0))})}),r0.arKeywords&&r0.arKeywords.length>0&&jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Hash$2,{className:"w-4 h-4"}),label:"A&R Keywords",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.arKeywords.map((N0,D0)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs bg-purple-500/10 text-purple-400 border-purple-500/30",children:N0},D0))})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(User,{className:"w-4 h-4"}),label:"Writers",children:S0.length>0?jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:S0.map((N0,D0)=>jsxRuntimeExports.jsx(Badge,{variant:"outline",className:"text-xs bg-muted/50",children:N0},`${N0}-${D0}`))}):jsxRuntimeExports.jsx("span",{className:"text-muted-foreground text-xs italic",children:"No writers"})}),v0&&jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Folder,{className:"w-4 h-4"}),label:"Folder",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:v0.color}}),v0.name]})}),l0.length>0&&jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Users,{className:"w-4 h-4"}),label:"Shared With",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:l0.map(N0=>jsxRuntimeExports.jsxs(Badge,{variant:"outline",className:"text-xs bg-primary/10 text-primary border-primary/20 pl-1 gap-1",children:[jsxRuntimeExports.jsx(Avatar,{className:"w-3.5 h-3.5",children:jsxRuntimeExports.jsx(AvatarFallback,{className:"text-[7px] bg-primary/20 text-primary",children:N0.songwriter.display_name.split(" ").map(D0=>D0[0]).join("").toUpperCase().slice(0,2)})}),N0.songwriter.display_name]},N0.id))})}),jsxRuntimeExports.jsx(Separator,{className:"my-2"}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(FileAudio,{className:"w-4 h-4"}),label:"File",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:r0.fileName})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"Date Added",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:format$4(ne
749w Date(r0.uploadedAt),"MMM d, yyyy")})}),jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"Year",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:formatSongYear(getSongYear(r0))})}),r0.originalDate&&jsxRuntimeExports.jsx(DetailRow,{icon:jsxRuntimeExports.jsx(Calendar,{className:"w-4 h-4"}),label:"File Created",children:jsxRuntimeExports.jsx("span",{className:"text-xs text-muted-foreground",children:format$4(new Date(r0.originalDate),"MMM d, yyyy")})})]})]})})})}function formatTime(r0){if(!r0||isNaN(r0))return"0:00";const e0=Math.floor(r0/60),n0=Math.floor(r0%60);return`${e0}:${n0.toString().padStart(2,"0")}`}function MobileAudioPlayer({currentSong:r0,isPlaying:e0,currentTime:n0,duration:a0,onTogglePlay:i0,onSeek:s0,onStop:o0,bottomOffset:l0=0,waveformData:c0=null}){var p0;const u0=a0>0?n0/a0:0,d0=((p0=r0==null?void 0:r0.genres)==null?void 0:p0[0])||(r0==null?void 0:r0.genre),h0=reactExports.useCallback(A0=>{const m0=Math.max(0,Math.min(a0,n0+A0));s0(m0)},[n0,a0,s0]),f0=reactExports.useCallback(A0=>{a0&&s0(A0*a0)},[a0,s0]);return r0?jsxRuntimeExports.jsxs("div",{className:"fixed left-0 right-0 z-50 bg-card/95 backdrop-blur-xl border-t border-border animate-slide-in-up",style:{bottom:l0},children:[jsxRuntimeExports.jsx("div",{className:"px-3 pt-2",children:jsxRuntimeExports.jsx(InlineWaveform,{waveformData:c0,progress:u0,isCurrentSong:!0,isHovered:!1,onSeek:f0,className:"h-10"})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground shrink-0",onClick:()=>h0(-15),children:[jsxRuntimeExports.jsx(RotateCcw,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Skip back 15 seconds"})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:cn$1("h-11 w-11 rounded-full shrink-0",e0?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted hover:bg-muted/80"),onClick:i0,children:e0?jsxRuntimeExports.jsx(Pause,{className:"w-5 h-5"}):jsxRuntimeExports.jsx(Play,{className:"w-5 h-5 ml-0.5"})}),jsxRuntimeExports.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground shrink-0",onClick:()=>h0(15),children:[jsxRuntimeExports.jsx(RotateCw,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Skip forward 15 seconds"})]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 px-1",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate text-sm",children:r0.name}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[jsxRuntimeExports.jsx("span",{children:formatTime(n0)}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("span",{children:formatTime(a0)}),d0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:"text-border",children:"â¢"}),jsxRuntimeExports.jsx("span",{className:"truncate",children:d0})]}),r0.key&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:"text-border",children:"â¢"}),jsxRuntimeExports.jsx("span",{children:r0.key})]})]})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground shrink-0",onClick:o0,children:jsxRuntimeExports.jsx(X$2,{className:"w-5 h-5"})})]})]}):null}function MobileBottomNav({currentPage:r0,onNavigate:e0,canUpload:n0,canManageContacts:a0=!1,bottomOffset:i0=0}){const s0=[{id:"library",label:"Library",icon:Library,show:!0},{id:"brief",label:"Brief",icon:FileSearch,show:!0},{id:"pitches",label:"Pitches",icon:Send,show:!0},{id:"upload",label:"Upload",icon:Upload,show:n0},{id:"songwriting",label:"Write",icon:Ruler,show:!0},{id:"contacts",label:"Contacts",icon:BookUser,show:a0}].filter(o0=>o0.show);return jsxRuntimeExports.jsx("nav",{className:"fixed left-0 right-0 z-40 bg-card/95 backdrop-blur-xl border-t border-border safe-area-pb",style:{bottom:i0},children:jsxRuntimeExports.jsx("ul",{className:"flex items-stretch justify-around",children:s0.map(o0=>{const l0=o0.icon,c0=r0===o0.id;return jsxRuntimeExports.jsx("li",{className:"flex-1",children:jsxRuntimeExports.jsxs("button",{onClick:()=>e0(o0.id),className:cn$1("w-full flex flex-col items-center justify-center gap-1 py-2 h-14 touch-target transition-all active:scale-95",c0?"text-primary":"text-muted-foreground hover:text-foreground"),"aria-label":o0.label,"aria-current":c0?"page":void 0,children:[jsxRuntimeExports.jsx("span",{className:cn$1("flex items-center justify-center rounded-full px-3 py-0.5 transition-colors",c0&&"bg-primary/15"),children:jsxRuntimeExports.jsx(l0,{className:cn$1("w-[22px] h-[22px] transition-transform",c0&&"scale-110")})}),jsxRuntimeExports.jsx("span",{className:"text-[11px] font-medium leading-none",children:o0.label})]})},o0.id)})})})}async function invoke(r0,e0={}){const{data:n0,error:a0}=await supabase.functions.invoke("manage-ar-contacts",{body:{action:r0,...e0}});if(a0)throw a0;if(n0!=null&&n0.error)throw new Error(n0.error);return n0}function useArContacts(){const{session:r0}=useAuth(),[e0,n0]=reactExports.useState([]),[a0,i0]=reactExports.useState(!1),[s0,o0]=reactExports.useState(null),[l0,c0]=reactExports.useState(!1),u0=reactExports.useCallback(async()=>{i0(!0);try{const A0=await invoke("list");n0(A0.data||[])}catch(A0){console.error("Failed to load contacts:",A0),toast({title:"Error",description:"Could not load contacts",variant:"destructive"})}finally{i0(!1)}},[]),d0=reactExports.useCallback(async A0=>{c0(!0);try{const m0=await invoke("get",{id:A0});o0(m0.data)}catch(m0){console.error("Failed to load contact:",m0),toast({title:"Error",description:"Could not load this contact",variant:"destructive"})}finally{c0(!1)}},[]),h0=reactExports.useCallback(async A0=>{try{return await invoke("create",A0),await u0(),toast({title:"Contact added"}),!0}catch(m0){return toast({title:"Error",description:(m0==null?void 0:m0.message)||"Could not add contact",variant:"destructive"}),!1}},[u0]),f0=reactExports.useCallback(async(A0,m0)=>{try{await invoke("update",{id:A0,...m0}),await u0();const x0=await invoke("get",{id:A0});return o0(x0.data),toast({title:"Contact updated"}),!0}catch(x0){return toast({title:"Error",description:(x0==null?void 0:x0.message)||"Could not update contact",variant:"destructive"}),!1}},[u0]),p0=reactExports.useCallback(async A0=>{try{return await invoke("delete",{id:A0}),n0(m0=>m0.filter(x0=>x0.id!==A0)),o0(m0=>(m0==null?void 0:m0.id)===A0?null:m0),toast({title:"Contact removed"}),!0}catch(m0){return toast({title:"Error",description:(m0==null?void 0:m0.message)||"Could not remove contact",variant:"destructive"}),!1}},[]);return reactExports.useEffect(()=>{r0&&u0()},[r0,u0]),{contacts:e0,isLoading:a0,selectedContact:s0,isDetailLoa
749ding:l0,fetchContacts:u0,fetchContactDetail:d0,createContact:h0,updateContact:f0,deleteContact:p0,setSelectedContact:o0}}function ContactDetailPanel({contact:r0,isLoading:e0,onClose:n0,onSave:a0,onDelete:i0}){const[s0,o0]=reactExports.useState(!1),[l0,c0]=reactExports.useState({name:""}),[u0,d0]=reactExports.useState(""),[h0,f0]=reactExports.useState(!1),[p0,A0]=reactExports.useState(!1);if(reactExports.useEffect(()=>{r0&&(c0({name:r0.name,title:r0.title,company:r0.company,instagram_handle:r0.instagram_handle,phone:r0.phone,email:r0.email,notes:r0.notes}),d0((r0.projects||[]).join(` 750`)),o0(!1))},[r0]),e0&&!r0)return jsxRuntimeExports.jsx("div",{className:"w-full md:w-96 shrink-0 border-l border-border flex items-center justify-center",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"w-5 h-5 animate-spin text-muted-foreground"})});if(!r0)return null;const m0=async()=>{f0(!0);const x0=await a0(r0.id,{...l0,projects:u0.split(` 751`).map(g0=>g0.trim()).filter(Boolean)});f0(!1),x0&&o0(!1)};return jsxRuntimeExports.jsxs("aside",{className:"w-full md:w-96 shrink-0 border-l border-border flex flex-col min-h-0 bg-card/40",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 border-b border-border flex items-start justify-between gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-foreground truncate",children:r0.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:[r0.title,r0.company].filter(Boolean).join(" · ")||"A&R contact"})]}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"sm",onClick:n0,"aria-label":"Close",children:jsxRuntimeExports.jsx(X$2,{className:"w-4 h-4"})})]}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:jsxRuntimeExports.jsxs("div",{className:"p-4 space-y-5",children:[jsxRuntimeExports.jsxs("div",{className:"rounded-lg border border-border bg-muted/20 p-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[jsxRuntimeExports.jsx(Send,{className:"w-4 h-4 text-primary"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-foreground",children:"Pitch history"})]}),r0.pitchCount===0?jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"No pitches linked yet. Pitches are matched by the recipient email on a pitch."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{className:"text-xs text-muted-foreground",children:[r0.pitchCount," pitch",r0.pitchCount===1?"":"es"," sent · ",r0.songsPitched," songs",r0.lastSentAt&&` · last on ${format$4(new Date(r0.lastSentAt),"d MMM yyyy")}`]}),jsxRuntimeExports.jsx("ul",{className:"mt-2 space-y-1",children:r0.pitches.slice(0,6).map(x0=>jsxRuntimeExports.jsxs("li",{className:"text-xs text-foreground flex justify-between gap-2",children:[jsxRuntimeExports.jsx("span",{className:"truncate",children:x0.name}),jsxRuntimeExports.jsxs("span",{className:"text-muted-foreground shrink-0",children:[x0.songCount," songs"]})]},x0.id))})]})]}),s0?jsxRuntimeExports.jsxs("div",{className:"space-y-3",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Name"}),jsxRuntimeExports.jsx(Input,{value:l0.name,onChange:x0=>c0({...l0,name:x0.target.value})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Title / role"}),jsxRuntimeExports.jsx(Input,{value:l0.title||"",onChange:x0=>c0({...l0,title:x0.target.value})})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Company / label"}),jsxRuntimeExports.jsx(Input,{value:l0.company||"",onChange:x0=>c0({...l0,company:x0.target.value})})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Email"}),jsxRuntimeExports.jsx(Input,{value:l0.email||"",onChange:x0=>c0({...l0,email:x0.target.value})})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Phone"}),jsxRuntimeExports.jsx(Input,{value:l0.phone||"",onChange:x0=>c0({...l0,phone:x0.target.value})})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Instagram"}),jsxRuntimeExports.jsx(Input,{value:l0.instagram_handle||"",onChange:x0=>c0({...l0,instagram_handle:x0.target.value}),placeholder:"handle"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Projects / credits (one per line)"}),jsxRuntimeExports.jsx(Textarea,{value:u0,onChange:x0=>d0(x0.target.value),placeholder:"Artist X â Album Y (2025)",className:"min-h-[80px]"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Notes"}),jsxRuntimeExports.jsx(Textarea,{value:l0.notes||"",onChange:x0=>c0({...l0,notes:x0.target.value}),className:"min-h-[120px]"})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{size:"sm",onClick:m0,disabled:h0||!l0.name.trim(),children:h0?"Savingâ¦":"Save"}),jsxRuntimeExports.jsx(Button,{size:"sm",variant:"outline",onClick:()=>o0(!1),disabled:h0,children:"Cancel"})]})]}):jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs("div",{className:"space-y-2 text-sm",children:[r0.email&&jsxRuntimeExports.jsxs("a",{href:`mailto:${r0.email}`,className:"flex items-center gap-2 text-foreground hover:text-primary",children:[jsxRuntimeExports.jsx(Mail,{className:"w-4 h-4 text-muted-foreground"})," ",jsxRuntimeExports.jsx("span",{className:"truncate",children:r0.email})]}),r0.phone&&jsxRuntimeExports.jsxs("a",{href:`tel:${r0.phone}`,className:"flex items-center gap-2 text-foreground hover:text-primary",children:[jsxRuntimeExports.jsx(Phone,{className:"w-4 h-4 text-muted-foreground"})," ",r0.phone]}),r0.instagram_handle&&jsxRuntimeExports.jsxs("a",{href:`https://instagram.com/${r0.instagram_handle}`,target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-foreground hover:text-primary",children:[jsxRuntimeExports.jsx(Instagram,{className:"w-4 h-4 text-muted-foreground"})," @",r0.instagram_handle]}),r0.company&&jsxRuntimeExports.jsxs("p",{className:"flex items-center gap-2 text-foreground",children:[jsxRuntimeExports.jsx(Building2,{className:"w-4 h-4 text-muted-foreground"})," ",r0.company]})]}),(r0.projects||[]).length>0&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Projects"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-1",children:r0.projects.map(x0=>jsxRuntimeExports.jsx(Badge,{variant:"secondary",className:"text-xs",children:x0},x0))})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Notes"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:r0.notes||jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"No notes yet."})})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{size:"sm",onClick:()=>o0(!0),children:"Edit"}),jsxRuntimeExports.jsxs(Button,{size:"sm",variant:"outline",className:"gap-1 text-destructive hover:text-destructive",onClick:()=>A0(!0),children:[jsxRuntimeExports.jsx(Trash2,{className:"w-3.5 h-3.5"}),"Remove"]})]})]})]})}),jsxRuntimeExports.jsx(AlertDialog,{open:p0,onOpenChange:A0,children:jsxRuntimeExports.jsxs(AlertDialogContent,{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:"Remove this contact?"}),jsxRuntimeExports.jsxs(AlertDialogDescription,{children:['"',r0.name,'" will be removed from your address book. Pitches you already sent are unaffected.']})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogCancel,{children:"Cancel"}),jsxRuntimeExports.jsx(AlertDialogAction,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{i0(r0.id),A0(!1)},children:"Remove"})]})]})})]})}
751const EMPTY_FORM={name:"",title:"",company:"",email:"",phone:"",instagram_handle:"",notes:""};function ContactsView(){const{contacts:r0,isLoading:e0,selectedContact:n0,isDetailLoading:a0,fetchContactDetail:i0,createContact:s0,updateContact:o0,deleteContact:l0,setSelectedContact:c0}=useArContacts(),[u0,d0]=reactExports.useState(""),[h0,f0]=reactExports.useState(!1),[p0,A0]=reactExports.useState(EMPTY_FORM),[m0,x0]=reactExports.useState(""),[g0,y0]=reactExports.useState(!1),b0=reactExports.useMemo(()=>{const w0=u0.trim().toLowerCase();return w0?r0.filter(v0=>[v0.name,v0.company,v0.title,v0.email,...v0.projects||[]].filter(Boolean).some(S0=>String(S0).toLowerCase().includes(w0))):r0},[r0,u0]),E0=async()=>{y0(!0);const w0=await s0({...p0,projects:m0.split(` 752`).map(v0=>v0.trim()).filter(Boolean)});y0(!1),w0&&(f0(!1),A0(EMPTY_FORM),x0(""))};return jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"p-4 md:p-6 border-b border-border flex items-center justify-between gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[jsxRuntimeExports.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center shrink-0",children:jsxRuntimeExports.jsx(BookUser,{className:"w-5 h-5 text-primary"})}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Contacts"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground truncate",children:"A&R, labels and industry contacts you pitch to"})]})]}),jsxRuntimeExports.jsxs(Button,{onClick:()=>f0(!0),className:"gap-2 shrink-0",children:[jsxRuntimeExports.jsx(Plus,{className:"w-4 h-4"}),jsxRuntimeExports.jsx("span",{className:"hidden sm:inline",children:"Add contact"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-h-0 flex",children:[jsxRuntimeExports.jsxs("div",{className:cn$1("flex-1 min-w-0 flex flex-col",n0&&"hidden md:flex"),children:[jsxRuntimeExports.jsx("div",{className:"p-4 border-b border-border",children:jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),jsxRuntimeExports.jsx(Input,{placeholder:"Search name, company or projectâ¦",value:u0,onChange:w0=>d0(w0.target.value),className:"pl-9"})]})}),jsxRuntimeExports.jsx(ScrollArea,{className:"flex-1",children:jsxRuntimeExports.jsx("div",{className:"p-4 space-y-2",children:b0.length===0?jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground text-center py-12",children:e0?"Loadingâ¦":u0?"No matching contacts":"No contacts yet. Add your first one."}):b0.map(w0=>jsxRuntimeExports.jsx("button",{onClick:()=>i0(w0.id),className:cn$1("w-full text-left rounded-xl border p-3 transition-colors",(n0==null?void 0:n0.id)===w0.id?"border-primary/50 bg-primary/5":"border-border hover:bg-muted/40"),children:jsxRuntimeExports.jsxs("div",{className:"flex items-start justify-between gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-foreground truncate",children:w0.name}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground truncate",children:[w0.title,w0.company].filter(Boolean).join(" · ")||"â"})]}),jsxRuntimeExports.jsx("div",{className:"text-right shrink-0",children:w0.pitchCount>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Badge,{variant:"secondary",className:"text-[11px]",children:[w0.pitchCount," pitches"]}),w0.lastSentAt&&jsxRuntimeExports.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:format$4(new Date(w0.lastSentAt),"d MMM yyyy")})]}):jsxRuntimeExports.jsx("span",{className:"text-[11px] text-muted-foreground",children:"No pitches yet"})})]})},w0.id))})})]}),(n0||a0)&&jsxRuntimeExports.jsx(ContactDetailPanel,{contact:n0,isLoading:a0,onClose:()=>c0(null),onSave:o0,onDelete:l0})]}),jsxRuntimeExports.jsx(Dialog,{open:h0,onOpenChange:f0,children:jsxRuntimeExports.jsxs(DialogContent,{className:"max-h-[90vh] overflow-y-auto",children:[jsxRuntimeExports.jsxs(DialogHeader,{children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Add contact"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Someone you pitch songs to â A&R, label, manager or supervisor."})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-3 py-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Name"}),jsxRuntimeExports.jsx(Input,{value:p0.name,onChange:w0=>A0({...p0,name:w0.target.value})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Title / role"}),jsxRuntimeExports.jsx(Input,{value:p0.title||"",onChange:w0=>A0({...p0,title:w0.target.value})})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Company / label"}
752),jsxRuntimeExports.jsx(Input,{value:p0.company||"",onChange:w0=>A0({...p0,company:w0.target.value})})]})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Email"}),jsxRuntimeExports.jsx(Input,{value:p0.email||"",onChange:w0=>A0({...p0,email:w0.target.value})})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Phone"}),jsxRuntimeExports.jsx(Input,{value:p0.phone||"",onChange:w0=>A0({...p0,phone:w0.target.value})})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Instagram"}),jsxRuntimeExports.jsx(Input,{value:p0.instagram_handle||"",onChange:w0=>A0({...p0,instagram_handle:w0.target.value}),placeholder:"handle"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Projects / credits (one per line)"}),jsxRuntimeExports.jsx(Textarea,{value:m0,onChange:w0=>x0(w0.target.value),placeholder:"Artist X â Album Y (2025)",className:"min-h-[70px]"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$2,{className:"text-xs",children:"Notes"}),jsxRuntimeExports.jsx(Textarea,{value:p0.notes||"",onChange:w0=>A0({...p0,notes:w0.target.value}),className:"min-h-[90px]"})]})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>f0(!1),disabled:g0,children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:E0,disabled:g0||!p0.name.trim(),children:g0?"Savingâ¦":"Add contact"})]})]})})]})}const SUPABASE_URL$1="https://unfpdgrtnhbfxinuktue.supabase.co";function mapRowToSong(r0){return{id:r0.id,name:r0.name,fileName:r0.file_name,fileSize:r0.file_size,uploadedAt:new Date(r0.uploaded_at),bpm:r0.bpm,key:r0.key,scale:r0.scale,groove:r0.groove||"",genres:r0.genres||[],vocalistGender:r0.vocalist_gender||"",writers:r0.writers||"",publisher:r0.publisher||void 0,keywords:r0.keywords||[],arKeywords:r0.ar_keywords||[],source:r0.source,dropboxUrl:r0.dropbox_url||void 0,status:r0.status,folderId:r0.folder_id||void 0,originalDate:r0.original_date?new Date(r0.original_date):void 0,lyrics:r0.lyrics||void 0,editPermission:r0.edit_permission||"tagged_writers",uploadedBySongwriterId:r0.uploaded_by_songwriter||void 0,parentSongId:r0.parent_song_id||void 0,versionLabel:r0.version_label||void 0,isPrimaryVersion:r0.is_primary_version??!0,waveformData:r0.waveform_data||void 0,taggedSongwriterIds:r0.tagged_songwriter_ids||void 0,aiAnalysisStatus:r0.ai_analysis_status||void 0,aiGeneratedDescription:r0.ai_generated_description||void 0,aiReferenceArtists:r0.ai_reference_artists||void 0,aiPitchKeywords:r0.ai_sync_keywords||void 0,aiMoodTags:r0.ai_mood_tags||void 0,aiInstrumentation:r0.ai_instrumentation||void 0,aiEnergyLevel:r0.ai_energy_level||void 0,aiPitchedAt:r0.ai_pitched_at?new Date(r0.ai_pitched_at):void 0,aiHookStrengthScore:r0.ai_hook_strength_score??void 0,aiHookReasoning:r0.ai_hook_reasoning||void 0,aiVocalFit:r0.ai_vocal_fit||void 0,aiLyricalTheme:r0.ai_lyrical_theme||void 0,aiPitchReadinessScore:r0.ai_pitch_readiness_score??void 0,aiPitchReadinessReasoning:r0.ai_pitch_readiness_reasoning||void 0,audioQualityScore:r0.audio_quality_score??void 0,audioQualityGrade:r0.audio_quality_grade||void 0,audioQualityIssues:r0.audio_quality_issues||void 0}}function mapSongToRow(r0){var n0;const e0={};return r0.name!==void 0&&(e0.name=r0.name),r0.fileName!==void 0&&(e0.file_name=r0.fileName),r0.fileSize!==void 0&&(e0.file_size=r0.fileSize),r0.bpm!==void 0&&(e0.bpm=r0.bpm),r0.key!==void 0&&(e0.key=r0.key),r0.scale!==void 0&&(e0.scale=r0.scale),r0.groove!==void 0&&(e0.groove=r0.groove||null),r0.genres!==void 0&&(e0.genres=r0.genres),r0.vocalistGender!==void 0&&(e0.vocalist_gender=r0.vocalistGender||null),r0.writers!==void 0&&(e0.writers=r0.writers||null),r0.publisher!==void 0&&(e0.publisher=r0.publisher||null),r0.keywords!==void 0&&(e0.keywords=r0.keywords||[]),r0.arKeywords!==void 0&&(e0.ar_keywords=r0.arKeywords||[]),r0.source!==void 0&&(e0.source=r0.source),r0.dropboxUrl!==void 0&&(e0.dropbox_url=r0.dropboxUrl||null),r0.status!==void 0&&(e0.status=r0.status),r0.folderId!==void 0&&(e0.folder_id=r0.folderId||null),r0.originalDate!==void 0&&(e0.original_date=((n0=r0.originalDate)==null?void 0:n0.toISOString())||null),r0.lyrics!==void 0&&(e0.lyrics=r0.lyrics||null),r0.editPermission!==void 0&&(e0.edit_permission=r0.editPermission),r0.uploadedBySongwriterId!==void 0&&(e0.uploaded_by_songwriter=r0.uploadedBySongwriterId||null),r0.parentSongId!==void 0&&(e0.parent_song_id=r0.parentSongId||null),r0.versionLabel!==void 0&&(e0.version_label=r0.versionLabel||null),r0.isPrimaryVersion!==void 0&&(e0.is_primary_version=r0.isPrimaryVersion),r0.waveformData!==void 0&&(e0.waveform_data=r0.waveformData),e0}async function callManageLibrary$1(r0,e0,n0){const{data:{session:a0}}=await supabase.auth.getSession();if(!(a0!=null&&a0.access_token))throw new Error("Not authenticated");const i0=await fetch(`${SUPABASE_URL$1}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a0.access_token}`},body:JSON.stringify({action:r0,table:e0,...n0})}),s0=await i0.json();if(!i0.ok)throw new Error(s0.error||"Operation failed");return s0}function useSongLibrary(){const{ownerId:r0,role:e0}=useAuth(),[n0,a0]=reactExports.useState([]),[i0,s0]=reactExports.useState(!0),[o0,l0]=reactExports.useState([]),[c0,u0]=reactExports.useState(!0),[d0,h0]=reactExports.useState({genres:[],vocalistGenders:[],bpmRange:null,keys:[],scale:null,status:null,folderId:null,searchKeywords:[]}),f0=reactExports.useCallback(async()=>{var v0;if(!r0){l0([]);return}try{const S0=await callManageLibrary$1("list","confirmed_writers",{});l0(S0.data||[]),console.log("[Library] Loaded",((v0=S0.data)==null?void 0:v0.length)||0,"confirmed writers")}catch(S0){console.error("[Library] Failed to load confirmed writers:",S0)}},[r0]),p0=reactExports.useCallback(async v0=>{if(!(!r0||v0.length===0))try{await callManageLibrary$1("add","confirmed_writers",{names:v0}),f0()}catch(S0){console.error("[Library] Failed to add confirmed writers:",S0)}},[r0,f0]),A0=reactExports.useCallback(async()=>{var v0;if(!r0){a0([]),s0(!1);return}try{const S0=await callManageLibrary$1("list","songs",{});console.log("[Library] Loaded",((v0=S0.data)==null?void 0:v0.length)||0,"songs for owner",r0),a0((S0.data||[]).map(mapRowToSong))}catch(S0){console.error("[Library] Failed to load:",S0),ue$2.error("Failed to load song library")}finally{s0(!1)}},[r0]);reactExports.useEffect(()=>{A0(),f0()},[A0,f0]);const m0=reactExports.useCallback(async v0=>{var S0;
752if(!r0)return ue$2.error("No archive selected"),null;if(e0!=="admin"&&e0!=="songwriter")return ue$2.error("Permission required to add songs"),null;try{const k0=await callManageLibrary$1("insert","songs",{data:{name:v0.name,file_name:v0.fileName,file_size:v0.fileSize,bpm:v0.bpm,key:v0.key,scale:v0.scale,groove:v0.groove||null,genres:v0.genres||[],vocalist_gender:v0.vocalistGender||null,writers:v0.writers||null,publisher:v0.publisher||null,keywords:v0.keywords||[],source:v0.source,dropbox_url:v0.dropboxUrl||null,status:v0.status,folder_id:v0.folderId||null,original_date:((S0=v0.originalDate)==null?void 0:S0.toISOString())||null}}),R0=mapRowToSong(k0.data);return a0(j0=>[R0,...j0]),console.log("[Library] Added song:",R0.name),R0}catch(k0){return console.error("[Library] Failed to add song:",k0),ue$2.error("Failed to save song"),null}},[r0,e0]),x0=reactExports.useCallback(async(v0,S0)=>{if(e0==="viewer"){ue$2.error("Read-only access");return}try{const k0=mapSongToRow(S0);await callManageLibrary$1("update","songs",{id:v0,data:k0}),a0(R0=>R0.map(j0=>j0.id===v0?{...j0,...S0}:j0))}catch(k0){console.error("[Library] Failed to update song:",k0);const R0=k0 instanceof Error?k0.message:"Failed to update song";ue$2.error(R0)}},[e0]),g0=reactExports.useCallback(async v0=>{if(e0!=="admin"){ue$2.error("Admin access required to delete songs");return}try{await callManageLibrary$1("delete","songs",{id:v0}),a0(S0=>S0.filter(k0=>k0.id!==v0))}catch(S0){console.error("[Library] Failed to remove song:",S0),ue$2.error("Failed to delete song")}},[e0]),y0=reactExports.useCallback(async v0=>{const S0={...v0,id:crypto.randomUUID(),name:`${v0.name} (Copy)`,uploadedAt:new Date};return await m0(S0)},[m0]),b0=reactExports.useMemo(()=>{const v0=(k0,R0=!1)=>{if(d0.genres.length>0){const C0=k0.genres||[];if(!d0.genres.some(T0=>C0.includes(T0)))return!1}if(d0.vocalistGenders.length>0&&!d0.vocalistGenders.includes(k0.vocalistGender)||d0.keys.length>0&&!d0.keys.includes(k0.key)||d0.scale&&k0.scale!==d0.scale||d0.status&&k0.status!==d0.status||d0.folderId&&k0.folderId!==d0.folderId||d0.bpmRange&&(k0.bpm<d0.bpmRange[0]||k0.bpm>d0.bpmRange[1])||d0.years!==void 0&&d0.years!==null&&(d0.years.length===0||!d0.years.includes(getSongYear(k0))))return!1;if(d0.recentlyAdded){const C0=new Date;if(C0.setDate(C0.getDate()-7),new Date(k0.uploadedAt)<C0)return!1}const j0=(d0.liveSearch||"").trim();if(!R0&&(d0.searchKeywords.length>0||j0)){const C0=[k0.name,k0.fileName,k0.writers||"",k0.vocalistGender||"",k0.versionLabel||"",...k0.keywords||[],...k0.genres||[],...e0==="admin"||e0==="a_and_r"||c0?k0.arKeywords||[]:[]].join(" ").toLowerCase(),$0=T0=>{const I0=T0.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`\\b${I0}`,"i").test(C0)};if(d0.searchKeywords.length>0&&!d0.searchKeywords.some($0)||j0&&!$0(j0))return!1}return!0},S0=n0.filter(k0=>v0(k0));if(d0.searchKeywords.length>0){const k0=new Set(S0.map(j0=>j0.id)),R0=new Set;if(S0.forEach(j0=>{j0.parentSongId&&!k0.has(j0.parentSongId)&&R0.add(j0.parentSongId)}),R0.size>0){const j0=n0.filter(C0=>R0.has(C0.id)&&v0(C0,!0));return[...S0,...j0]}}return S0},[n0,d0,e0,c0]),E0=reactExports.useMemo(()=>{const v0=n0.flatMap(I0=>I0.genres||[]),S0=[...new Set(v0)].filter(Boolean).sort(),k0=[...new Set(n0.map(I0=>I0.vocalistGender))].filter(Boolean).sort(),R0=[...new Set(n0.map(I0=>I0.key))].filter(Boolean).sort(),j0=[...new Set(n0.map(I0=>I0.scale))].filter(Boolean).sort(),C0=n0.length>0?Math.min(...n0.map(I0=>I0.bpm)):60,$0=n0.length>0?Math.max(...n0.map(I0=>I0.bpm)):200,T0=collectSongYears(n0);return{genres:S0,vocalists:k0,keys:R0,scales:j0,bpmMin:C0,bpmMax:$0,years:T0}},[n0]),w0=reactExports.useMemo(()=>[...o0].sort(),[o0]);return{songs:n0,isLoading:i0,filteredSongs:b0,filters:d0,setFilters:h0,addSong:m0,updateSong:x0,removeSong:g0,duplicateSong:y0,filterOptions:E0,allWriters:w0,addConfirmedWriters:p0,totalCount:n0.length,filteredCount:b0.length,refetch:A0,includeArKeywords:c0,setIncludeArKeywords:u0}}const waveformCache=new Map;async function generateWaveformData(r0){const n0=await(await fetch(r0)).arrayBuffer(),a0=new(window.AudioContext||window.webkitAudioContext);try{const s0=(await a0.decodeAudioData(n0)).getChannelData(0),o0=200,l0=Math.floor(s0.length/o0),c0=[];for(let d0=0;d0<o0;d0++){let h0=0;const f0=d0*l0;for(let p0=f0;p0<f0+l0&&p0<s0.length;p0++)h0+=Math.abs(s0[p0]);c0.push(h0/l0)}const u0=Math.max(...c0,.001);return c0.map(d0=>d0/u0)}finally{await a0.close()}}function useAudioPlayer(r0){var u0;const e0=reactExports.useRef(null),[n0,a0]=reactExports.useState({currentSong:null,isPlaying:!1,
752currentTime:0,duration:0,volume:1});reactExports.useEffect(()=>{e0.current=new Audio;const d0=e0.current,h0=()=>{a0(g0=>({...g0,currentTime:d0.currentTime}))},f0=()=>{a0(g0=>({...g0,duration:d0.duration}))},p0=()=>{a0(g0=>({...g0,isPlaying:!1,currentTime:0}))},A0=()=>{a0(g0=>({...g0,isPlaying:!0}))},m0=()=>{a0(g0=>({...g0,isPlaying:!1}))},x0=g0=>{var b0;const y0=g0.target;console.error("Audio playback error:",((b0=y0.error)==null?void 0:b0.message)||"Unknown error"),a0(E0=>({...E0,isPlaying:!1}))};return d0.addEventListener("timeupdate",h0),d0.addEventListener("loadedmetadata",f0),d0.addEventListener("ended",p0),d0.addEventListener("play",A0),d0.addEventListener("pause",m0),d0.addEventListener("error",x0),()=>{d0.removeEventListener("timeupdate",h0),d0.removeEventListener("loadedmetadata",f0),d0.removeEventListener("ended",p0),d0.removeEventListener("play",A0),d0.removeEventListener("pause",m0),d0.removeEventListener("error",x0),d0.pause(),d0.src=""}},[]);const i0=reactExports.useCallback((d0,h0)=>{var p0;const f0=e0.current;if(f0){if(((p0=n0.currentSong)==null?void 0:p0.id)===d0.id){n0.isPlaying?f0.pause():f0.play().catch(A0=>console.error("Failed to play:",A0));return}f0.pause(),f0.src=h0,f0.load(),a0(A0=>({...A0,currentSong:d0,currentTime:0,duration:0})),f0.play().catch(A0=>{console.error("Failed to play audio:",A0),a0(m0=>({...m0,isPlaying:!1}))}),!d0.waveformData&&!waveformCache.has(d0.id)&&generateWaveformData(h0).then(A0=>{var m0;waveformCache.set(d0.id,A0),(m0=r0==null?void 0:r0.onWaveformGenerated)==null||m0.call(r0,d0.id,A0)}).catch(A0=>console.error("Waveform generation failed:",A0))}},[(u0=n0.currentSong)==null?void 0:u0.id,n0.isPlaying,r0]),s0=reactExports.useCallback(()=>{const d0=e0.current;!d0||!n0.currentSong||(n0.isPlaying?d0.pause():d0.play().catch(h0=>console.error("Failed to toggle play:",h0)))},[n0.isPlaying,n0.currentSong]),o0=reactExports.useCallback(d0=>{const h0=e0.current;h0&&(h0.currentTime=d0)},[]),l0=reactExports.useCallback(d0=>{const h0=e0.current;h0&&(h0.volume=d0,a0(f0=>({...f0,volume:d0})))},[]),c0=reactExports.useCallback(()=>{const d0=e0.current;d0&&(d0.pause(),d0.currentTime=0,a0(h0=>({...h0,currentSong:null,isPlaying:!1,currentTime:0,duration:0})))},[]);return{...n0,playSong:i0,togglePlay:s0,seek:o0,setVolume:l0,stop:c0}}const SUPABASE_URL="https://unfpdgrtnhbfxinuktue.supabase.co";function mapRowToFolder(r0){return{id:r0.id,name:r0.name,color:r0.color,createdAt:new Date(r0.created_at)}}async function callManageLibrary(r0,e0,n0){const{data:{session:a0}}=await supabase.auth.getSession();if(!(a0!=null&&a0.access_token))throw new Error("Not authenticated");const i0=await fetch(`${SUPABASE_URL}/functions/v1/manage-library`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a0.access_token}`},body:JSON.stringify({action:r0,table:e0,...n0})}),s0=await i0.json();if(!i0.ok)throw new Error(s0.error||"Operation failed");return s0}function useFolders(){const{ownerId:r0,role:e0}=useAuth(),[n0,a0]=reactExports.useState([]),[i0,s0]=reactExports.useState(!0),o0=reactExports.useCallback(async()=>{if(!r0){a0([]),s0(!1);return}try{const d0=await callManageLibrary("list","folders",{});a0((d0.data||[]).map(mapRowToFolder))}catch(d0){console.error("[Folders] Failed to load:",d0),ue$2.error("Failed to load folders")}finally{s0(!1)}},[r0]);reactExports.useEffect(()=>{o0()},[o0]);const l0=reactExports.useCallback(async d0=>{if(!r0)return ue$2.error("No archive selected"),null;if(e0!=="admin")return ue$2.error("Admin access required to create folders"),null;const h0=n0.map(p0=>p0.color),f0=FOLDER_COLORS.find(p0=>!h0.includes(p0))||FOLDER_COLORS[0];try{const p0=await callManageLibrary("insert","folders",{data:{name:d0,color:f0}}),A0=mapRowToFolder(p0.data);return a0(m0=>[...m0,A0]),A0}catch(p0){return console.error("[Folders] Failed to add:",p0),ue$2.error("Failed to create folder"),null}},[n0,r0,e0]),c0=reactExports.useCallback(async(d0,h0)=>{if(e0!=="admin"){ue$2.error("Admin access required to update folders");return}try{const f0={};h0.name!==void 0&&(f0.name=h0.name),h0.color!==void 0&&(f0.color=h0.color),await callManageLibrary("update","folders",{id:d0,data:f0}),a0(p0=>p0.map(A0=>A0.id===d0?{...A0,...h0}
752:A0))}catch(f0){console.error("[Folders] Failed to update:",f0),ue$2.error("Failed to update folder")}},[e0]),u0=reactExports.useCallback(async d0=>{if(e0!=="admin"){ue$2.error("Admin access required to delete folders");return}try{await callManageLibrary("delete","folders",{id:d0}),a0(h0=>h0.filter(f0=>f0.id!==d0))}catch(h0){console.error("[Folders] Failed to remove:",h0),ue$2.error("Failed to delete folder")}},[e0]);return{folders:n0,isLoading:i0,addFolder:l0,updateFolder:c0,removeFolder:u0,refetch:o0}}const MOBILE_BREAKPOINT=768;function useIsMobile(){const[r0,e0]=reactExports.useState(void 0);return reactExports.useEffect(()=>{const n0=window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT-1}px)`),a0=()=>{e0(window.innerWidth<MOBILE_BREAKPOINT)};return n0.addEventListener("change",a0),e0(window.innerWidth<MOBILE_BREAKPOINT),()=>n0.removeEventListener("change",a0)},[]),!!r0}const DB_NAME="bangerbank-audio",DB_VERSION=1,STORE_NAME="audio-files";let dbPromise=null;function openDB(){return dbPromise||(dbPromise=new Promise((r0,e0)=>{const n0=indexedDB.open(DB_NAME,DB_VERSION);n0.onerror=()=>{console.error("Failed to open IndexedDB:",n0.error),e0(n0.error)},n0.onsuccess=()=>{r0(n0.result)},n0.onupgradeneeded=a0=>{const i0=a0.target.result;i0.objectStoreNames.contains(STORE_NAME)||i0.createObjectStore(STORE_NAME,{keyPath:"id"})}}),dbPromise)}async function storeAudioFile(r0,e0){try{const n0=await openDB(),a0=await e0.arrayBuffer();return new Promise((i0,s0)=>{const l0=n0.transaction(STORE_NAME,"readwrite").objectStore(STORE_NAME),c0={id:r0,data:a0,mimeType:e0.type||"audio/mpeg",fileName:e0.name},u0=l0.put(c0);u0.onsuccess=()=>{const d0=new Blob([a0],{type:c0.mimeType}),h0=URL.createObjectURL(d0);i0(h0)},u0.onerror=()=>{console.error("Failed to store audio:",u0.error),s0(u0.error)}})}catch(n0){throw console.error("Error storing audio file:",n0),n0}}async function getAudioUrl(r0){try{const e0=await openDB();return new Promise((n0,a0)=>{const o0=e0.transaction(STORE_NAME,"readonly").objectStore(STORE_NAME).get(r0);o0.onsuccess=()=>{const l0=o0.result;if(l0){const c0=new Blob([l0.data],{type:l0.mimeType}),u0=URL.createObjectURL(c0);n0(u0)}else n0(null)},o0.onerror=()=>{console.error("Failed to get audio:",o0.error),a0(o0.error)}})}catch(e0){return console.error("Error getting audio URL:",e0),null}}const blobUrlCache=new Map;async function getOrCreateAudioUrl(r0,e0){if(blobUrlCache.has(r0))return blobUrlCache.get(r0);const n0=await getAudioUrl(r0);return n0?(blobUrlCache.set(r0,n0),n0):e0?e0.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("dl=0","dl=1"):null}function cacheAudioUrl(r0,e0){blobUrlCache.set(r0,e0)}const CURRENT_PAGE_KEY="bangerbank_current_page",VALID_PAGES=["dashboard","upload","library","statistics","admin","brief","explore","ai-batch-analyze","pitches","songwriting","contacts"],Index=()=>{var a1,h1,Y0,Tw,Mw,Uw;const{role:r0,songwriterProfileId:e0,ownerId:n0}=useAuth(),a0=r0==="admin",{refetch:i0}=usePitchPlaylists(),s0=useIsMobile(),[o0,l0]=reactExports.useState(()=>{const Fw=localStorage.getItem(CURRENT_PAGE_KEY);return Fw&&VALID_PAGES.includes(Fw)?Fw:"library"}),[c0,u0]=reactExports.useState([]),[d0,h0]=reactExports.useState(0),[f0,p0]=reactExports.useState(!1),[A0,m0]=reactExports.useState(null),[x0,g0]=reactExports.useState(null),[y0,b0]=reactExports.useState(null),[E0,w0]=reactExports.useState(null),[v0,S0]=reactExports.useState([]),[k0,R0]=reactExports.useState(!1),[j0,C0]=reactExports.useState(!1),[$0,T0]=reactExports.useState(new Set),[I0,M0]=reactExports.useState(!1),{analyzeAudio:N0,analyzeFromUrl:D0}=useAudioAnalysis(),{songs:O0,isLoading:B0,filteredSongs:z0,filters:G0,setFilters:F0,addSong:Q0,updateSong:U0,removeSong:q0,duplicateSong:Rw,filterOptions:_w,allWriters:J0,addConfirmedWriters:Cw,totalCount:Ow,includeArKeywords:jw,setIncludeArKeywords:Nw}=useSongLibrary(),xw=reactExports.useCallback((Fw,Jw)=>{U0(Fw,{waveformData:Jw})},[U0]),X0=useAudioPlayer({onWaveformGenerated:xw}),{folders:Lw,addFolder:Hw,updateFolder:Ww,removeFolder:r1}=useFolders(),{songwriters:Yw,fetchSongwriters:l1,inviteSongwriter
752:p1,tagSongwriter:Pw,untagSongwriter:Qw,getSongWriters:Xw,bulkTagSongwriter:f1}=useSongwriters();reactExports.useEffect(()=>{l1()},[l1]),reactExports.useEffect(()=>{E0?(R0(!0),Xw(E0.id).then(S0).finally(()=>R0(!1))):S0([])},[E0,Xw]);const u1=reactExports.useCallback(()=>{E0&&Xw(E0.id).then(S0)},[E0,Xw]);reactExports.useEffect(()=>{localStorage.setItem(CURRENT_PAGE_KEY,o0)},[o0]);const W0=r0==="viewer"||r0==="a_and_r"||r0==="manager";reactExports.useEffect(()=>{!a0&&r0!=="songwriter"&&o0==="upload"&&l0("library"),W0&&o0==="admin"&&l0("dashboard")},[a0,r0,o0,W0]);const P0=reactExports.useCallback(Fw=>{o0==="library"&&Fw!=="library"&&F0(Jw=>({...Jw,searchKeywords:[]})),l0(Fw)},[o0,F0]),L0=reactExports.useCallback(Fw=>{var Jw;return r0==="admin"||r0==="a_and_r"?!0:r0!=="songwriter"||!e0?!1:Fw.uploadedBySongwriterId===e0||Fw.editPermission==="all_writers"?!0:Fw.editPermission==="tagged_writers"?((Jw=Fw.taggedSongwriterIds)==null?void 0:Jw.includes(e0))??!1:!1},[r0,e0]),Z0=reactExports.useCallback(async Fw=>{try{const Jw=await getOrCreateAudioUrl(Fw.id,Fw.dropboxUrl);Jw?X0.playSong(Fw,Jw):console.warn("No audio available for song:",Fw.name)}catch(Jw){console.error("Failed to get audio URL:",Jw)}},[X0]),$w=Fw=>Fw.replace(/-/g," ").replace(/_/g," ").replace(/\s+/g," ").trim().toUpperCase(),Bw=reactExports.useCallback(async(Fw,Jw,s1)=>{var yR,V1,I_;p0(!0);const A1=[],T1=[];for(let j1=0;j1<Fw.length;j1++){h0(j1);const O_=Fw[j1];u0(o1=>o1.map((q1,E1)=>E1===j1?{...q1,status:"processing"}:q1));try{let o1,q1=null;if(O_.type==="file"){const E1=Jw.find(B1=>B1.name===O_.name);if(E1&&(o1=await N0(E1),o1)){const B1=crypto.randomUUID(),U1=await storeAudioFile(B1,E1);cacheAudioUrl(B1,U1);const e_=E1.name.replace(/\.(mp3|wav)$/i,"");let X1=o1.extractedTitle,t_="";if(!X1){const L1=e_.match(/\(([^)]+)\)/);let zw=e_;if(L1)t_=L1[1].trim(),zw=e_.replace(/\s*\([^)]*\)\s*/g,"").trim();else if(e_.includes("_")){const c1=e_.split("_");zw=c1[0].trim(),t_=c1.slice(1).join("_").trim()}X1=zw||e_}if(X1=$w(X1),!t_){const L1=[...o1.extractedComposers||[],...o1.extractedArtists||[]];t_=[...new Set(L1)].join(", ")}t_&&t_.split(",").map(L1=>L1.trim()).filter(Boolean).forEach(L1=>{T1.includes(L1)||T1.push(L1)});const tP={id:"",name:X1,fileName:E1.name,fileSize:E1.size,uploadedAt:new Date,bpm:o1.bpm,key:o1.key,scale:o1.scale,groove:o1.groove,genres:(yR=o1.extractedGenres)!=null&&yR.length?o1.extractedGenres:[o1.vibe],vocalistGender:o1.vocalistGender,writers:t_,keywords:[],arKeywords:[],lyrics:o1.extractedLyrics||"",source:"file",audioUrl:U1,status:"available",originalDate:o1.originalDate?new Date(o1.originalDate):void 0,editPermission:"tagged_writers",isPrimaryVersion:!0},bR=await Q0(tP);bR&&(q1=bR.id,supabase.functions.invoke("analyze-song",{body:{song_id:bR.id,owner_id:n0||"",song_name:X1,existing_bpm:o1.bpm,existing_key:o1.key,existing_scale:o1.scale,existing_genres:tP.genres,existing_vocalist_gender:o1.vocalistGender,existing_lyrics:o1.extractedLyrics||null,lyrics:o1.extractedLyrics||null,audio_quality:o1.audioQuality||null,spectral_mood:o1.mood||null,spectral_energy_descriptor:o1.energyDescriptor||null}}).catch(L1=>console.warn("Background AI analysis failed:",L1)))}}else{const E1=s1.find(B1=>B1.includes(O_.name)||O_.name.includes("Dropbox"));if(E1&&(o1=await D0(E1),o1)){const B1=E1.replace("www.dropbox.com","dl.dropboxusercontent.com").replace("dl=0","dl=1"),U1=((V1=E1.split("/").pop())==null?void 0:V1.split("?")[0])||"audio.mp3",e_=U1.replace(/\.(mp3|wav)$/i,"");let X1=o1.extractedTitle,t_="";if(!X1){const L1=e_.match(/\(([^)]+)\)/);let zw=e_;if(L1)t_=L1[1].trim(),zw=e_.replace(/\s*\([^)]*\)\s*/g,"").trim();else if(e_.includes("_")){const c1=e_.split("_");zw=c1[0].trim(),t_=c1.slice(1).join("_").trim()}X1=zw||"Dropbox Track"}if(X1=$w(X1),!t_){const L1=[...o1.extractedComposers||[],...o1.extractedArtists||[]];t_=[...new Set(L1)].join(", ")}t_&&t_.split(",").map(L1=>L1.trim()).filter(Boolean).forEach(L1=>{T1.includes(L1)||T1.push(L1)});const tP={id:"",name:X1,fileName:U1,fileSize:0,uploadedAt:new Date,bpm:o1.bpm,key:o1.key,scale:o1.scale,groove:o1.groove,genres:(I_=o1.extractedGenres)!=null&&I_.length?o1.extractedGenres:[o1.vibe],vocalistGender:
752o1.vocalistGender,writers:t_,keywords:[],arKeywords:[],lyrics:o1.extractedLyrics||"",source:"dropbox",dropboxUrl:E1,audioUrl:B1,status:"available",originalDate:o1.originalDate?new Date(o1.originalDate):void 0,editPermission:"tagged_writers",isPrimaryVersion:!0},bR=await Q0(tP);bR&&(q1=bR.id,supabase.functions.invoke("dropbox-metadata",{body:{url:E1,songId:bR.id}}).catch(L1=>console.warn("Failed to fetch Dropbox file date:",L1)),supabase.functions.invoke("analyze-song",{body:{song_id:bR.id,owner_id:n0||"",dropbox_url:E1,song_name:X1,existing_bpm:o1.bpm,existing_key:o1.key,existing_scale:o1.scale,existing_genres:tP.genres,existing_vocalist_gender:o1.vocalistGender,existing_lyrics:o1.extractedLyrics||null,lyrics:o1.extractedLyrics||null,audio_quality:o1.audioQuality||null,spectral_mood:o1.mood||null,spectral_energy_descriptor:o1.energyDescriptor||null}}).catch(L1=>console.warn("Background AI analysis failed:",L1)))}}if(q1){A1.push(q1),u0(U1=>U1.map((e_,X1)=>X1===j1?{...e_,status:"complete",songId:q1}:e_));const E1=q1,B1=j1;checkSongForDuplicates(E1).then(U1=>{U1&&u0(e_=>e_.map((X1,t_)=>t_===B1?{...X1,duplicateMatch:U1}:X1))})}else u0(E1=>E1.map((B1,U1)=>U1===j1?{...B1,status:"error",error:"Analysis failed"}:B1))}catch{u0(q1=>q1.map((E1,B1)=>B1===j1?{...E1,status:"error",error:"Analysis failed"}:E1))}}p0(!1),T1.length>0&&Cw(T1).catch(j1=>console.warn("Failed to auto-register writers:",j1)),A1.length===1&&Fw.length===1&&setTimeout(()=>{const j1=A1[0];m0({id:j1}),l0("library"),u0([]),h0(0)},500)},[N0,D0,Q0,Cw,n0]),Vw=reactExports.useCallback(Fw=>{const Jw=Fw.map((s1,A1)=>{var T1;return{id:crypto.randomUUID(),name:((T1=s1.split("/").pop())==null?void 0:T1.split("?")[0])||`Link ${A1+1}`,type:"dropbox",status:"pending"}});u0(s1=>[...s1,...Jw]),f0||Bw([...c0,...Jw],[],Fw)},[c0,f0,Bw]),Dw=reactExports.useCallback(Fw=>{P0("library")},[P0]),Kw=reactExports.useCallback(Fw=>{const Jw=O0.find(s1=>s1.id===Fw);Jw&&g0(Jw)},[O0]),i1=reactExports.useCallback((Fw,Jw)=>{U0(Fw,Jw),Jw.name&&u0(s1=>s1.map(A1=>A1.songId===Fw?{...A1,name:Jw.name}:A1)),g0(s1=>s1?{...s1,...Jw}:null)},[U0]),m1=reactExports.useCallback(()=>{u0([]),h0(0)},[]),qw=reactExports.useCallback(Fw=>{const Jw=c0.find(s1=>s1.id===Fw);!Jw||Jw.type!=="dropbox"||(u0(s1=>s1.map(A1=>A1.id===Fw?{...A1,status:"pending",error:void 0}:A1)),f0||(Jw.name,c0.filter(s1=>s1.id===Fw).map(s1=>({...s1,status:"pending"}))))},[c0,f0]),y1=reactExports.useCallback(Fw=>{F0(Jw=>({...Jw,searchKeywords:[Fw.name]})),l0("library")},[F0]),S1=reactExports.useCallback(()=>{m0(null)},[]),_1=()=>{var Fw,Jw,s1;switch(o0){case"dashboard":return jsxRuntimeExports.jsx(DashboardView,{onNavigate:P0,onNavigateToSong:Dw,songCount:Ow});case"upload":return!a0&&r0!=="songwriter"?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UploadView,{onDropboxLinks:Vw,isAnalyzing:f0,uploadQueue:c0,currentUploadIndex:d0,onEditSong:Kw,onClearQueue:m1,onRetryItem:qw}),jsxRuntimeExports.jsx(EditSongDialog,{song:x0,open:!!x0,onOpenChange:A1=>!A1&&g0(null),onSave:i1,folders:Lw,allWriters:J0,onConfirmWriters:Cw,allSongs:O0,songwriters:Yw,onTagSongwriter:Pw,onUntagSongwriter:Qw,onPlay:Z0,isPlaying:X0.isPlaying,currentPlayingSongId:(Fw=X0.currentSong)==null?void 0:Fw.id,userRole:r0,includeArKeywords:jw,onIncludeArKeywordsChange:Nw})]});case"library":return jsxRuntimeExports.jsx(LibraryView,{songs:z0,allSongsForVersioning:O0,filters:G0,onFiltersChange:F0,onDeleteSong:q0,onUpdateSong:U0,onDuplicateSong:Rw,onPlaySong:Z0,onTogglePlay:X0.togglePlay,currentPlayingSongId:((Jw=X0.currentSong)==null?void 0:Jw.id)||null,isPlaying:X0.isPlaying,currentTime:X0.currentTime,duration:X0.duration,onSeek:X0.seek,filterOptions:_w,folders:Lw,onAddFolder:Hw,onUpdateFolder:Ww,onRemoveFolder:r1,allWriters:J0,onConfirmWriters:Cw,readOnly:r0==="viewer",canEditSong:L0,totalCount:Ow,songwriters:Yw,onTagSongwriter:Pw,onUntagSongwriter:Qw,getSongWriters:Xw,onBulkTagSongwriter:f1,songToEditAfterUpload:A0,onClearEditAfterUpload:S1,isLoading:B0,includeArKeywords:jw,onIncludeArKeywordsChange:Nw,ownerId:n0||void 0,onNavigateToPitches:()=>P0("pitches")});case"statistics":return jsxRuntimeExports.jsx(StatisticsView,{songs:O0});
752case"admin":return jsxRuntimeExports.jsx(AdminView,{onOpenSongInLibrary:y1});case"contacts":return a0?jsxRuntimeExports.jsx(ContactsView,{}):null;case"brief":return jsxRuntimeExports.jsx(BriefView,{songs:O0,onNavigateToSong:Dw,onPlaySong:Z0,currentPlayingSongId:((s1=X0.currentSong)==null?void 0:s1.id)||null,isPlaying:X0.isPlaying,ownerId:n0||void 0});case"pitches":return jsxRuntimeExports.jsx(PitchesView,{ownerId:n0||void 0,songs:O0});case"songwriting":return jsxRuntimeExports.jsx(SongwritingView,{ownerId:n0});case"explore":return jsxRuntimeExports.jsx(ExploreView,{onNavigateToLibrary:A1=>{F0(T1=>({...T1,searchKeywords:[A1]})),P0("library")}});case"ai-batch-analyze":return jsxRuntimeExports.jsx(AIBatchAnalyzeView,{});default:return null}},g1={all:O0.length,available:O0.filter(Fw=>Fw.status==="available").length,cut:O0.filter(Fw=>Fw.status==="cut").length,"on-hold":O0.filter(Fw=>Fw.status==="on-hold").length},C1=Lw.reduce((Fw,Jw)=>(Fw[Jw.id]=O0.filter(s1=>s1.folderId===Jw.id).length,Fw),{}),M1=reactExports.useMemo(()=>{const Fw=G0.sortBy||"name",Jw=G0.sortDirection||"asc";return[...z0].sort((s1,A1)=>{let T1=0;switch(Fw){case"name":T1=s1.name.localeCompare(A1.name);break;case"bpm":T1=s1.bpm-A1.bpm;break;case"key":T1=s1.key.localeCompare(A1.key);break;case"date":default:T1=new Date(s1.uploadedAt).getTime()-new Date(A1.uploadedAt).getTime();break}return Jw==="asc"?T1:-T1})},[z0,G0.sortBy,G0.sortDirection]);if(reactExports.useCallback(async()=>{const Fw={...G0};F0({...Fw,searchKeywords:[...Fw.searchKeywords,""]}),setTimeout(()=>F0(Fw),100)},[G0,F0]),s0){const Fw=a0||r0==="songwriter",Jw=o0==="library",T1=(X0.currentSong?104:0)+56;return jsxRuntimeExports.jsxs("div",{className:"min-h-screen h-screen bg-background flex flex-col overflow-hidden",children:[jsxRuntimeExports.jsx(MobileHeader,{}),Jw?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MobileFilterBar,{filters:G0,onFiltersChange:F0,folders:Lw,statusCounts:g1,folderCounts:C1,songCount:M1.length,songs:O0,filterOptions:_w,totalCount:O0.length,isSelectMode:j0,selectedCount:$0.size,onToggleSelectMode:()=>{C0(V1=>!V1),T0(new Set)},onCreatePitch:()=>M0(!0)}),jsxRuntimeExports.jsx(MobileSongList,{songs:M1,onPlaySong:Z0,onSelectSong:b0,currentPlayingSongId:((a1=X0.currentSong)==null?void 0:a1.id)||null,isPlaying:X0.isPlaying,isLoading:B0,currentSongWaveform:((h1=X0.currentSong)==null?void 0:h1.waveformData)||null,currentTime:X0.currentTime,duration:X0.duration,onSeek:X0.seek,bottomInset:T1,isSelectMode:j0,selectedIds:$0,onToggleSelection:V1=>T0(I_=>{const j1=new Set(I_);return j1.has(V1)?j1.delete(V1):j1.add(V1),j1})})]}):jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 flex flex-col",style:{marginBottom:T1},children:_1()}),jsxRuntimeExports.jsx(MobileSongDetail,{song:y0,isOpen:!!y0,onClose:()=>b0(null),onPlay:Z0,isPlaying:X0.isPlaying,isCurrentSong:(y0==null?void 0:y0.id)===((Y0=X0.currentSong)==null?void 0:Y0.id),folders:Lw,onEdit:w0,canEdit:y0?L0(y0):!1,currentTime:X0.currentTime,duration:X0.duration,onSeek:X0.seek,waveformData:((Tw=X0.currentSong)==null?void 0:Tw.waveformData)||null}),jsxRuntimeExports.jsx(EditSongDialog,{song:E0,open:!!E0,onOpenChange:V1=>!V1&&w0(null),onSave:(V1,I_)=>{U0(V1,I_),b0(j1=>(j1==null?void 0:j1.id)===V1?{...j1,...I_}:j1)},folders:Lw,allWriters:J0,onConfirmWriters:Cw,allSongs:O0,songwriters:Yw,taggedSongwriters:v0,onTagSongwriter:Pw,onUntagSongwriter:Qw,onRefreshTagged:u1,isLoadingTagged:k0,onPlay:Z0,isPlaying:X0.isPlaying,currentPlayingSongId:(Mw=X0.currentSong)==null?void 0:Mw.id,userRole:r0,includeArKeywords:jw,onIncludeArKeywordsChange:Nw}),jsxRuntimeExports.jsx(MobileAudioPlayer,{currentSong:X0.currentSong,isPlaying:X0.isPlaying,currentTime:X0.currentTime,duration:X0.duration,onTogglePlay:X0.togglePlay,onSeek:X0.seek,onStop:X0.stop,bottomOffset:"calc(56px + env(safe-area-inset-bottom, 0px))",waveformData:((Uw=X0.currentSong)==null?void 0:Uw.waveformData)||null}),jsxRuntimeExports.jsx(MobileBottomNav,{currentPage:o0,onNavigate:P0,canUpload:Fw,canManageContacts:a0}),jsxRuntimeExports.jsx(PitchComposer,{open:I0,onOpenChange:M0,ownerId:n0||void 0,songs:O0.filter(V1=>$0.has(V1.id)),onCreated:()=>{T0(new Set),C0(!1),i0()}})]})}return jsxRuntimeExports.jsxs("div",{className:"min-h-screen h-screen bg-black flex overflow-hidden",children:[jsxRuntimeExports.jsx(AppSidebar,{currentPage:o0,onNavigate:P0,songCount:Ow}),jsxRuntimeExports.jsx("main",{className:`flex-1 flex flex-col overflow-hidden ${X0.currentSong?"pb-20":""}`,children:_1()}),jsxRuntimeExports.jsx(AudioPlayer,{currentSong:X0.currentSong,isPlaying:X0.isPlaying,currentTime:X0.currentTime,duration:X0.duration,volume:X0.volume,onTogglePlay:X0.togglePlay,onSeek:X0.seek,onVolumeChange:X0.setVolume,onStop:X0.stop})]})},wilmaLogo="/assets/bangerbank-wilma-logo-DnBo7S7J.png";function Login(){const[r0,e0]=reactExports.useState(!1),[n0,a0]=reactExports.useState(""),{signInWithGoogle:i0}=useAuth(),s0=async()=>{e0(!0),a0("");const o0=await i0();o0.error&&(a0(o0.error),e0(!1))};return jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-5xl flex flex-col md:flex-row items-center gap-8 md:gap-16",children:[jsxRuntimeExports.jsx("div",{className:"flex-[1.5] flex justify-center md:justify-end",children:jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-2xl h-auto object-contain"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 w-full max-w-sm space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-border rounded-xl p-8 space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Welcome"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-sm",children:"Sign in to access your song library"})]}),n0&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 p-3 bg-destructive/10 border border-destructive/20 rounded-lg",children:[jsxRuntimeExports.jsx(CircleAlert,{className:"w-4 h-4 text-destructive flex-shrink-0"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-destructive",children:n0})]}),jsxRuntimeExports.jsxs(Button,{onClick:s0,disabled:r0,className:"w-full h-12 text-base font-medium gap-3",variant:"outline",children:[r0?jsxRuntimeExports.jsx(LoaderCircle,{className:"w-5 h-5 animate-spin"}):jsxRuntimeExports.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),r0?"Signing in...":"Sign in with Google"]}),jsxRuntimeExports.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"Contact your administrator if you need access"})]}),jsxRuntimeExports.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"BangerBank ⢠Song Library Management"})]})]})})}function AuthCallback(){const r0=useNavigate(),[e0,n0]=reactExports.useState(null);return reactExports.useEffect(()=>{(async()=>{try{const{data:i0,error:s0}=await supabase.auth.getSession();if(s0){console.error("Auth callback error:",s0),n0(s0.message);return}i0.session?r0("/",{replace:!0}):r0("/login",{replace:!0})}catch(i0){console.error("Auth callback error:",i0),n0("Authentication failed. Please try again.")}})()},[r0]),e0?jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-destructive mb-4",children:e0}),jsxRuntimeExports.jsx("button",{onClick:()=>
752r0("/login"),className:"text-primary hover:underline",children:"Return to login"})]})]}):jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-5 h-5 animate-spin"}),jsxRuntimeExports.jsx("span",{children:"Completing sign in..."})]})]})}function SongwriterSignup(){const[r0]=useSearchParams(),e0=useNavigate(),n0=r0.get("token"),[a0,i0]=reactExports.useState("loading"),[s0,o0]=reactExports.useState(null),[l0,c0]=reactExports.useState(""),[u0,d0]=reactExports.useState(""),h0=reactExports.useRef(!1),f0=async(x0,g0,y0)=>{if(!h0.current){h0.current=!0,i0("signing-in");try{console.log("Processing OAuth return for songwriter signup...");const{data:b0,error:E0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"accept-invite-oauth",inviteToken:n0,userId:x0,email:g0,displayName:y0}});if(sessionStorage.removeItem("songwriter_display_name"),sessionStorage.removeItem("songwriter_signup_pending"),E0){console.error("Edge function error:",E0),i0("error"),c0("Failed to complete registration");return}if(b0!=null&&b0.error){console.error("Registration error:",b0.error),i0("error"),c0(b0.error);return}if(b0!=null&&b0.success){console.log("Songwriter registration successful!"),i0("success");return}i0("error"),c0("Unexpected response from server")}catch(b0){console.error("Failed to accept invite:",b0),sessionStorage.removeItem("songwriter_display_name"),sessionStorage.removeItem("songwriter_signup_pending"),i0("error"),c0("Failed to complete registration")}}},p0=async()=>{if(!n0){i0("invalid"),c0("No invitation token provided");return}try{const{data:x0,error:g0}=await supabase.functions.invoke("manage-songwriters",{body:{action:"validate-invite",inviteToken:n0}});if(g0){i0("invalid"),c0("Failed to validate invitation");return}if(x0.error){x0.error.includes("expired")?i0("expired"):x0.error.includes("already been used")?i0("used"):i0("invalid"),c0(x0.error);return}x0.success&&x0.data?(o0(x0.data),i0("valid")):(i0("invalid"),c0("Invalid invitation"))}catch(x0){console.error("Token validation failed:",x0),i0("invalid"),c0("Failed to validate invitation")}};reactExports.useEffect(()=>{if(!n0){i0("invalid"),c0("No invitation token provided");return}const x0=sessionStorage.getItem("songwriter_signup_pending"),g0=sessionStorage.getItem("songwriter_display_name")||"";if(x0!=="true"){p0();return}console.log("Detected OAuth return, waiting for session..."),i0("signing-in");const{data:{subscription:y0}}=supabase.auth.onAuthStateChange(async(b0,E0)=>{var w0;if(console.log("Auth state change:",b0,!!E0),b0==="SIGNED_IN"&&E0&&!h0.current){const v0=g0||((w0=E0.user.user_metadata)==null?void 0:w0.full_name)||"";await f0(E0.user.id,E0.user.email||"",v0)}});return supabase.auth.getSession().then(({data:{session:b0}})=>{var E0;if(console.log("Initial session check:",!!b0),b0&&!h0.current){const w0=g0||((E0=b0.user.user_metadata)==null?void 0:E0.full_name)||"";f0(b0.user.id,b0.user.email||"",w0)}}),()=>{y0.unsubscribe()}},[n0]);const A0=async()=>{if(!u0.trim()){c0("Please enter your display name");return}sessionStorage.setItem("songwriter_display_name",u0.trim()),sessionStorage.setItem("songwriter_signup_pending","true"),i0("signing-in");try{const x0=`${window.location.origin}/songwriter-signup?token=${n0}`,{error:g0}=await supabase.auth.signInWithOAuth({provider:"google",options:{redirectTo:x0}});g0&&(sessionStorage.removeItem("songwriter_signup_pending"),i0("valid"),c0(g0.message))}catch(x0){console.error("Google sign up error:",x0),sessionStorage.removeItem("songwriter_signup_pending"),i0("valid"),c0("Failed to sign in with Google")}},m0=()=>{e0("/login")};return a0==="loading"?jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-5 h-5 animate-spin"}),jsxRuntimeExports.jsx("span",{children:"Validating invitation..."})]})]}):a0==="signing-in"?jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"w-5 h-5 animate-spin"}),jsxRuntimeExports.jsx("span",{children:"Completing registration..."})]})]}):a0==="invalid"||a0==="expired"||a0==="used"||a0==="error"?jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs(Card,{className:"w-full max-w-md",children:[jsxRuntimeExports.jsxs(CardHeader,{className:"text-center",children:[jsxRuntimeExports.jsx(CircleX,{className:"w-12 h-12 text-destructive mx-auto mb-2"}),jsxRuntimeExports.jsxs(CardTitle,{children:[a0==="expired"&&"Invitation Expired",a0==="used"&&"Invitation Already Used",a0==="invalid"&&"Invalid Invitation",a0==="error"&&"Registration Failed"]}),jsxRuntimeExports.jsx(CardDescription,{children:l0||"This invitation link is no longer valid."})]}),jsxRuntimeExports.jsx(CardContent,{children:jsxRuntimeExports.jsx(Button,{onClick:m0,className:"w-full",children:"Go to Login"})})]})]}):a0==="success"?jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs(Card,{className:"w-full max-w-md",children:[jsxRuntimeExports.jsxs(CardHeader,{className:"text-center",children:[jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-12 h-12 text-primary mx-auto mb-2"}),jsxRuntimeExports.jsx(CardTitle,{children:"Welcome to BangerBank!"}),jsxRuntimeExports.jsx(CardDescription,{children:"Your songwriter account has been created successfully. You can now access the library."})]}),jsxRuntimeExports.jsx(CardContent,{children:jsxRuntimeExports.jsx(Button,{onClick:m0,className:"w-full",children:"Continue to BangerBank"})})]})]}):jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4",children:[jsxRuntimeExports.jsx("img",{src:wilmaLogo,alt:"BangerBank",className:"w-full max-w-md h-auto mb-8"}),jsxRuntimeExports.jsxs(Card,{className:"w-full max-w-md",children:[jsxRuntimeExports.jsxs(CardHeader,{className:"text-center",children:[jsxRuntimeExports.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-2",children:jsxRuntimeExports.jsx(Music,{className:"w-6 h-6 text-primary"})}),jsxRuntimeExports.jsx(CardTitle,{children:"Welcome to BangerBank!"}),jsxRuntimeExports.jsxs(CardDescription,{children:["You've been invited to join ",jsxRuntimeExports.jsx("strong",{children:s0==null?void 0:s0.archiveName})," as a songwriter."]})]}),jsxRuntimeExports.jsxs(CardContent,{className:"space-y-6",children:[jsxRuntimeExports.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm",children:[jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:"Invited email"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:s0==null?void 0:s0.email})]})}),jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:"displayName",children:"Your Display Name"}),jsxRuntimeExports.jsx(Input,{id:"displayName",value:u0,onChange:x0=>d0(x0.target.value),placeholder:"Enter your name",className:"h-12"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-muted-foreground",children:"This is how your name will appear in the archive"})]}),l0&&jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 p-3 bg-destructive/10 border border-destructive/20 rounded-lg",children:[jsxRuntimeExports.jsx(CircleAlert,{className:"w-4 h-4 text-destructive flex-shrink-0"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-destructive",children:l0})]}),jsxRuntimeExports.jsxs(Button,{onClick:A0,className:"w-full h-12 text-base font-medium gap-3",variant:"outline",children:[jsxRuntimeExports.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign up with Google"]}),jsxRuntimeExports.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"Sign in with your Google account to complete registration"}),jsxRuntimeExports.jsx("div",{className:"text-center",children:jsxRuntimeExports.jsx("button",{onClick:m0,className:"text-sm text-muted-foreground hover:text-foreground underline",children:"Already have an account? Log in"})})]})]})]})}var define_process_env_default={},e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(r0){return r0&&r0.__esModule&&Object.prototype.hasOwnProperty.call(r0,"default")?r0.default:r0}function n(r0){if(r0.__esModule)return r0;var e0=r0.default;if(typeof e0=="function"){var n0=function a0(){return this instanceof a0?Reflect.construct(e0,arguments,this.constructor):e0.apply(this,arguments)};n0.prototype=e0.prototype}else n0={};return Object.defineProperty(n0,"__esModule",{value:!0}
vendor: 5,046 bytes, line 752
752),Object.keys(r0).forEach(function(a0){var i0=Object.getOwnPropertyDescriptor(r0,a0);Object.defineProperty(n0,a0,i0.get?i0:{enumerable:!0,get:function(){return r0[a0]}})}),n0}function a(r0){throw new Error('Could not dynamically require "'+r0+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var r={exports:{}};r.exports=function r0(e0,n0,a0){function i0(l0,c0){if(!n0[l0]){if(!e0[l0]){if(!c0&&a)return a(l0);if(s0)return s0(l0,!0);var u0=new Error("Cannot find module '"+l0+"'");throw u0.code="MODULE_NOT_FOUND",u0}var d0=n0[l0]={exports:{}};e0[l0][0].call(d0.exports,function(h0){return i0(e0[l0][1][h0]||h0)},d0,d0.exports,r0,e0,n0,a0)}return n0[l0].exports}for(var s0=a,o0=0;o0<a0.length;o0++)i0(a0[o0]);return i0}({1:[function(r0,e0,n0){var a0=r0("./utils"),i0=r0("./support"),s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n0.encode=function(o0){for(var l0,c0,u0,d0,h0,f0,p0,A0=[],m0=0,x0=o0.length,g0=x0,y0=a0.getTypeOf(o0)!=="string";m0<o0.length;)g0=x0-m0,u0=y0?(l0=o0[m0++],c0=m0<x0?o0[m0++]:0,m0<x0?o0[m0++]:0):(l0=o0.charCodeAt(m0++),c0=m0<x0?o0.charCodeAt(m0++):0,m0<x0?o0.charCodeAt(m0++):0),d0=l0>>2,h0=(3&l0)<<4|c0>>4,f0=1<g0?(15&c0)<<2|u0>>6:64,p0=2<g0?63&u0:64,A0.push(s0.charAt(d0)+s0.charAt(h0)+s0.charAt(f0)+s0.charAt(p0));return A0.join("")},n0.decode=function(o0){var l0,c0,u0,d0,h0,f0,p0=0,A0=0,m0="data:";if(o0.substr(0,5)===m0)throw new Error("Invalid base64 input, it looks like a data url.");var x0,g0=3*(o0=o0.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(o0.charAt(o0.length-1)===s0.charAt(64)&&g0--,o0.charAt(o0.length-2)===s0.charAt(64)&&g0--,g0%1!=0)throw new Error("Invalid base64 input, bad content length.");for(x0=i0.uint8array?new Uint8Array(0|g0):new Array(0|g0);p0<o0.length;)l0=s0.indexOf(o0.charAt(p0++))<<2|(d0=s0.indexOf(o0.charAt(p0++)))>>4,c0=(15&d0)<<4|(h0=s0.indexOf(o0.charAt(p0++)))>>2,u0=(3&h0)<<6|(f0=s0.indexOf(o0.charAt(p0++))),x0[A0++]=l0,h0!==64&&(x0[A0++]=c0),f0!==64&&(x0[A0++]=u0);return x0}},{"./support":30,"./utils":32}],2:[function(r0,e0,n0){var a0=r0("./external"),i0=r0("./stream/DataWorker"),s0=r0("./stream/Crc32Probe"),o0=r0("./stream/DataLengthProbe");function l0(c0,u0,d0,h0,f0){this.compressedSize=c0,this.uncompressedSize=u0,this.crc32=d0,this.compression=h0,this.compressedContent=f0}l0.prototype={getContentWorker:function(){var c0=new i0(a0.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o0("data_length")),u0=this;return c0.on("end",function(){if(this.streamInfo.data_length!==u0.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c0},getCompressedWorker:function(){return new i0(a0.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l0.createWorkerFrom=function(c0,u0,d0){return c0.pipe(new s0).pipe(new o0("uncompressedSize")).pipe(u0.compressWorker(d0)).pipe(new o0("compressedSize")).withStreamInfo("compression",u0)},e0.exports=l0},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r0,e0,n0){var a0=r0("./stream/GenericWorker");n0.STORE={magic:"\0\0",compressWorker:function(){return new a0("STORE compression")},uncompressWorker:function(){return new a0("STORE decompression")}},n0.DEFLATE=r0("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r0,e0,n0){var a0=r0("./utils"),i0=function(){for(var s0,o0=[],l0=0;l0<256;l0++){s0=l0;for(var c0=0;c0<8;c0++)s0=1&s0?3988292384^s0>>>1:s0>>>1;o0[l0]=s0}return o0}();e0.exports=function(s0,o0){return s0!==void 0&&s0.length?a0.getTypeOf(s0)!=="string"?function(l0,c0,u0){var d0=i0,h0=0+u0;l0^=-1;for(var f0=0;f0<h0;f0++)l0=l0>>>8^d0[255&(l0^c0[f0])];return-1^l0}(0|o0,s0,s0.length):function(l0,c0,u0){var d0=i0,h0=0+u0;l0^=-1;for(var f0=0;f0<h0;f0++)l0=l0>>>8^d0[255&(l0^c0.charCodeAt(f0))];return-1^l0}(0|o0,s0,s0.length):0}},{"./utils":32}],5:[function(r0,e0,n0){n0.base64=!1,n0.binary=!1,n0.dir=!1,n0.createFolders=!0,n0.date=null,n0.compression=null,n0.compressionOptions=null,n0.comment=null,n0.unixPermissions=null,n0.dosPermissions=null},{}],6:[function(r0,e0,n0){var a0;a0=typeof Promise<"u"?Promise:r0("lie"),e0.exports={Promise:a0}},{lie:37}],7:[function(r0,e0,n0){var a0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i0=r0("pako"),s0=r0("./utils"),o0=r0("./stream/GenericWorker"),l0=a0?"uint8array":"array";function c0(u0,d0){o0.call(this,"FlateWorker/"+u0),this._pako=null,this._pakoAction=u0,this._pakoOptions=d0,this.meta={}}n0.magic="\b\0",s0.inherits(c0,o0),c0.prototype.processChunk=function(u0){this.meta=u0.meta,this._pako===null&&this._createPako(),this._pako.push(s0.transformTo(l0,u0.data),!1)},c0.prototype.flush=function(){o0.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)}
vendor: 5,264 bytes, lines 752-753
752,c0.prototype.cleanUp=function(){o0.prototype.cleanUp.call(this),this._pako=null},c0.prototype._createPako=function(){this._pako=new i0[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u0=this;this._pako.onData=function(d0){u0.push({data:d0,meta:u0.meta})}},n0.compressWorker=function(u0){return new c0("Deflate",u0)},n0.uncompressWorker=function(){return new c0("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r0,e0,n0){function a0(h0,f0){var p0,A0="";for(p0=0;p0<f0;p0++)A0+=String.fromCharCode(255&h0),h0>>>=8;return A0}function i0(h0,f0,p0,A0,m0,x0){var g0,y0,b0=h0.file,E0=h0.compression,w0=x0!==l0.utf8encode,v0=s0.transformTo("string",x0(b0.name)),S0=s0.transformTo("string",l0.utf8encode(b0.name)),k0=b0.comment,R0=s0.transformTo("string",x0(k0)),j0=s0.transformTo("string",l0.utf8encode(k0)),C0=S0.length!==b0.name.length,$0=j0.length!==k0.length,T0="",I0="",M0="",N0=b0.dir,D0=b0.date,O0={crc32:0,compressedSize:0,uncompressedSize:0};f0&&!p0||(O0.crc32=h0.crc32,O0.compressedSize=h0.compressedSize,O0.uncompressedSize=h0.uncompressedSize);var B0=0;f0&&(B0|=8),w0||!C0&&!$0||(B0|=2048);var z0=0,G0=0;N0&&(z0|=16),m0==="UNIX"?(G0=798,z0|=function(Q0,U0){var q0=Q0;return Q0||(q0=U0?16893:33204),(65535&q0)<<16}(b0.unixPermissions,N0)):(G0=20,z0|=function(Q0){return 63&(Q0||0)}(b0.dosPermissions)),g0=D0.getUTCHours(),g0<<=6,g0|=D0.getUTCMinutes(),g0<<=5,g0|=D0.getUTCSeconds()/2,y0=D0.getUTCFullYear()-1980,y0<<=4,y0|=D0.getUTCMonth()+1,y0<<=5,y0|=D0.getUTCDate(),C0&&(I0=a0(1,1)+a0(c0(v0),4)+S0,T0+="up"+a0(I0.length,2)+I0),$0&&(M0=a0(1,1)+a0(c0(R0),4)+j0,T0+="uc"+a0(M0.length,2)+M0);var F0="";return F0+=` 753\0`,F0+=a0(B0,2),F0+=E0.magic,F0+=a0(g0,2),F0+=a0(y0,2),F0+=a0(O0.crc32,4),F0+=a0(O0.compressedSize,4),F0+=a0(O0.uncompressedSize,4),F0+=a0(v0.length,2),F0+=a0(T0.length,2),{fileRecord:u0.LOCAL_FILE_HEADER+F0+v0+T0,dirRecord:u0.CENTRAL_FILE_HEADER+a0(G0,2)+F0+a0(R0.length,2)+"\0\0\0\0"+a0(z0,4)+a0(A0,4)+v0+T0+R0}}var s0=r0("../utils"),o0=r0("../stream/GenericWorker"),l0=r0("../utf8"),c0=r0("../crc32"),u0=r0("../signature");function d0(h0,f0,p0,A0){o0.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f0,this.zipPlatform=p0,this.encodeFileName=A0,this.streamFiles=h0,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s0.inherits(d0,o0),d0.prototype.push=function(h0){var f0=h0.meta.percent||0,p0=this.entriesCount,A0=this._sources.length;this.accumulate?this.contentBuffer.push(h0):(this.bytesWritten+=h0.data.length,o0.prototype.push.call(this,{data:h0.data,meta:{currentFile:this.currentFile,percent:p0?(f0+100*(p0-A0-1))/p0:100}}))},d0.prototype.openedSource=function(h0){this.currentSourceOffset=this.bytesWritten,this.currentFile=h0.file.name;var f0=this.streamFiles&&!h0.file.dir;if(f0){var p0=i0(h0,f0,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p0.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d0.prototype.closedSource=function(h0){this.accumulate=!1;var f0=this.streamFiles&&!h0.file.dir,p0=i0(h0,f0,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p0.dirRecord),f0)this.push({data:function(A0){return u0.DATA_DESCRIPTOR+a0(A0.crc32,4)+a0(A0.compressedSize,4)+a0(A0.uncompressedSize,4)}(h0),meta:{percent:100}});else for(this.push({data:p0.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d0.prototype.flush=function(){for(var h0=this.bytesWritten,f0=0;f0<this.dirRecords.length;f0++)this.push({data:this.dirRecords[f0],meta:{percent:100}});var p0=this.bytesWritten-h0,A0=function(m0,x0,g0,y0,b0){var E0=s0.transformTo("string",b0(y0));return u0.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a0(m0,2)+a0(m0,2)+a0(x0,4)+a0(g0,4)+a0(E0.length,2)+E0}(this.dirRecords.length,p0,h0,this.zipComment,this.encodeFileName);this.push({data:A0,meta:{percent:100}})},d0.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d0.prototype.registerPrevious=function(h0){this._sources.push(h0);var f0=this;return h0.on("data",function(p0){f0.processChunk(p0)}),h0.on("end",function(){f0.closedSource(f0.previous.streamInfo),f0._sources.length?f0.prepareNextSource():f0.end()}),h0.on("error",function(p0){f0.error(p0)}),this},d0.prototype.resume=function(){return!!o0.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d0.prototype.error=function(h0){var f0=this._sources;if(!o0.prototype.error.call(this,h0))return!1;for(var p0=0;p0<f0.length;p0++)try{f0[p0].error(h0)}catch{}return!0},d0.prototype.lock=function(){o0.prototype.lock.call(this);for(var h0=this._sources,f0=0;f0<h0.length;f0++)h0[f0].lock()},e0.exports=d0},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r0,e0,n0){var a0=r0("../compressions"),i0=r0("./ZipFileWorker");n0.generateWorker=function(s0,o0,l0){var c0=new i0(o0.streamFiles,l0,o0.platform,o0.encodeFileName),u0=0;
vendor: 30,730 bytes, line 753
753try{s0.forEach(function(d0,h0){u0++;var f0=function(x0,g0){var y0=x0||g0,b0=a0[y0];if(!b0)throw new Error(y0+" is not a valid compression method !");return b0}(h0.options.compression,o0.compression),p0=h0.options.compressionOptions||o0.compressionOptions||{},A0=h0.dir,m0=h0.date;h0._compressWorker(f0,p0).withStreamInfo("file",{name:d0,dir:A0,date:m0,comment:h0.comment||"",unixPermissions:h0.unixPermissions,dosPermissions:h0.dosPermissions}).pipe(c0)}),c0.entriesCount=u0}catch(d0){c0.error(d0)}return c0}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r0,e0,n0){function a0(){if(!(this instanceof a0))return new a0;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i0=new a0;for(var s0 in this)typeof this[s0]!="function"&&(i0[s0]=this[s0]);return i0}}(a0.prototype=r0("./object")).loadAsync=r0("./load"),a0.support=r0("./support"),a0.defaults=r0("./defaults"),a0.version="3.10.1",a0.loadAsync=function(i0,s0){return new a0().loadAsync(i0,s0)},a0.external=r0("./external"),e0.exports=a0},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r0,e0,n0){var a0=r0("./utils"),i0=r0("./external"),s0=r0("./utf8"),o0=r0("./zipEntries"),l0=r0("./stream/Crc32Probe"),c0=r0("./nodejsUtils");function u0(d0){return new i0.Promise(function(h0,f0){var p0=d0.decompressed.getContentWorker().pipe(new l0);p0.on("error",function(A0){f0(A0)}).on("end",function(){p0.streamInfo.crc32!==d0.decompressed.crc32?f0(new Error("Corrupted zip : CRC32 mismatch")):h0()}).resume()})}e0.exports=function(d0,h0){var f0=this;return h0=a0.extend(h0||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s0.utf8decode}),c0.isNode&&c0.isStream(d0)?i0.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a0.prepareContent("the loaded zip file",d0,!0,h0.optimizedBinaryString,h0.base64).then(function(p0){var A0=new o0(h0);return A0.load(p0),A0}).then(function(p0){var A0=[i0.Promise.resolve(p0)],m0=p0.files;if(h0.checkCRC32)for(var x0=0;x0<m0.length;x0++)A0.push(u0(m0[x0]));return i0.Promise.all(A0)}).then(function(p0){for(var A0=p0.shift(),m0=A0.files,x0=0;x0<m0.length;x0++){var g0=m0[x0],y0=g0.fileNameStr,b0=a0.resolve(g0.fileNameStr);f0.file(b0,g0.decompressed,{binary:!0,optimizedBinaryString:!0,date:g0.date,dir:g0.dir,comment:g0.fileCommentStr.length?g0.fileCommentStr:null,unixPermissions:g0.unixPermissions,dosPermissions:g0.dosPermissions,createFolders:h0.createFolders}),g0.dir||(f0.file(b0).unsafeOriginalName=y0)}return A0.zipComment.length&&(f0.comment=A0.zipComment),f0})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r0,e0,n0){var a0=r0("../utils"),i0=r0("../stream/GenericWorker");function s0(o0,l0){i0.call(this,"Nodejs stream input adapter for "+o0),this._upstreamEnded=!1,this._bindStream(l0)}a0.inherits(s0,i0),s0.prototype._bindStream=function(o0){var l0=this;(this._stream=o0).pause(),o0.on("data",function(c0){l0.push({data:c0,meta:{percent:0}})}).on("error",function(c0){l0.isPaused?this.generatedError=c0:l0.error(c0)}).on("end",function(){l0.isPaused?l0._upstreamEnded=!0:l0.end()})},s0.prototype.pause=function(){return!!i0.prototype.pause.call(this)&&(this._stream.pause(),!0)},s0.prototype.resume=function(){return!!i0.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e0.exports=s0},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r0,e0,n0){var a0=r0("readable-stream").Readable;function i0(s0,o0,l0){a0.call(this,o0),this._helper=s0;var c0=this;s0.on("data",function(u0,d0){c0.push(u0)||c0._helper.pause(),l0&&l0(d0)}).on("error",function(u0){c0.emit("error",u0)}).on("end",function(){c0.push(null)})}r0("../utils").inherits(i0,a0),i0.prototype._read=function(){this._helper.resume()},e0.exports=i0},{"../utils":32,"readable-stream":16}],14:[function(r0,e0,n0){e0.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a0,i0){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a0,i0);if(typeof a0=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a0,i0)},allocBuffer:function(a0){if(Buffer.alloc)return Buffer.alloc(a0);var i0=new Buffer(a0);return i0.fill(0),i0},isBuffer:function(a0){return Buffer.isBuffer(a0)},isStream:function(a0){return a0&&typeof a0.on=="function"&&typeof a0.pause=="function"&&typeof a0.resume=="function"}}},{}],15:[function(r0,e0,n0){function a0(b0,E0,w0){var v0,S0=s0.getTypeOf(E0),k0=s0.extend(w0||{},c0);k0.date=k0.date||new Date,k0.compression!==null&&(k0.compression=k0.compression.toUpperCase()),typeof k0.unixPermissions=="string"&&(k0.unixPermissions=parseInt(k0.unixPermissions,8)),k0.unixPermissions&&16384&k0.unixPermissions&&(k0.dir=!0),k0.dosPermissions&&16&k0.dosPermissions&&(k0.dir=!0),k0.dir&&(b0=m0(b0)),k0.createFolders&&(v0=A0(b0))&&x0.call(this,v0,!0);var R0=S0==="string"&&k0.binary===!1&&k0.base64===!1;w0&&w0.binary!==void 0||(k0.binary=!R0),(E0 instanceof u0&&E0.uncompressedSize===0||k0.dir||!E0||E0.length===0)&&(k0.base64=!1,k0.binary=!0,E0="",k0.compression="STORE",S0="string");var j0;j0=E0 instanceof u0||E0 instanceof o0?E0:f0.isNode&&f0.isStream(E0)?new p0(b0,E0):s0.prepareContent(b0,E0,k0.binary,k0.optimizedBinaryString,k0.base64);var C0=new d0(b0,j0,k0);this.files[b0]=C0}var i0=r0("./utf8"),s0=r0("./utils"),o0=r0("./stream/GenericWorker"),l0=r0("./stream/StreamHelper"),c0=r0("./defaults"),u0=r0("./compressedObject"),d0=r0("./zipObject"),h0=r0("./generate"),f0=r0("./nodejsUtils"),p0=r0("./nodejs/NodejsStreamInputAdapter"),A0=function(b0){b0.slice(-1)==="/"&&(b0=b0.substring(0,b0.length-1));var E0=b0.lastIndexOf("/");return 0<E0?b0.substring(0,E0):""},m0=function(b0){return b0.slice(-1)!=="/"&&(b0+="/"),b0},x0=function(b0,E0){return E0=E0!==void 0?E0:c0.createFolders,b0=m0(b0),this.files[b0]||a0.call(this,b0,null,{dir:!0,createFolders:E0}),this.files[b0]};function g0(b0){return Object.prototype.toString.call(b0)==="[object RegExp]"}var y0={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b0){var E0,w0,v0;for(E0 in this.files)v0=this.files[E0],(w0=E0.slice(this.root.length,E0.length))&&E0.slice(0,this.root.length)===this.root&&b0(w0,v0)},filter:function(b0){var E0=[];return this.forEach(function(w0,v0){b0(w0,v0)&&E0.push(v0)}),E0},file:function(b0,E0,w0){if(arguments.length!==1)return b0=this.root+b0,a0.call(this,b0,E0,w0),this;if(g0(b0)){var v0=b0;return this.filter(function(k0,R0){return!R0.dir&&v0.test(k0)})}var S0=this.files[this.root+b0];return S0&&!S0.dir?S0:null},folder:function(b0){if(!b0)return this;if(g0(b0))return this.filter(function(S0,k0){return k0.dir&&b0.test(S0)});var E0=this.root+b0,w0=x0.call(this,E0),v0=this.clone();return v0.root=w0.name,v0},remove:function(b0){b0=this.root+b0;var E0=this.files[b0];if(E0||(b0.slice(-1)!=="/"&&(b0+="/"),E0=this.files[b0]),E0&&!E0.dir)delete this.files[b0];else for(var w0=this.filter(function(S0,k0){return k0.name.slice(0,b0.length)===b0}),v0=0;v0<w0.length;v0++)delete this.files[w0[v0].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b0){var E0,w0={};try{if((w0=s0.extend(b0||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i0.utf8encode})).type=w0.type.toLowerCase(),w0.compression=w0.compression.toUpperCase(),w0.type==="binarystring"&&(w0.type="string"),!w0.type)throw new Error("No output type specified.");s0.checkSupport(w0.type),w0.platform!=="darwin"&&w0.platform!=="freebsd"&&w0.platform!=="linux"&&w0.platform!=="sunos"||(w0.platform="UNIX"),w0.platform==="win32"&&(w0.platform="DOS");var v0=w0.comment||this.comment||"";E0=h0.generateWorker(this,w0,v0)}catch(S0){(E0=new o0("error")).error(S0)}return new l0(E0,w0.type||"string",w0.mimeType)},generateAsync:function(b0,E0){return this.generateInternalStream(b0).accumulate(E0)},generateNodeStream:function(b0,E0){return(b0=b0||{}).type||(b0.type="nodebuffer"),this.generateInternalStream(b0).toNodejsStream(E0)}};e0.exports=y0},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r0,e0,n0){e0.exports=r0("stream")},{stream:void 0}],17:[function(r0,e0,n0){var a0=r0("./DataReader");function i0(s0){a0.call(this,s0);for(var o0=0;o0<this.data.length;o0++)s0[o0]=255&s0[o0]}r0("../utils").inherits(i0,a0),i0.prototype.byteAt=function(s0){return this.data[this.zero+s0]},i0.prototype.lastIndexOfSignature=function(s0){for(var o0=s0.charCodeAt(0),l0=s0.charCodeAt(1),c0=s0.charCodeAt(2),u0=s0.charCodeAt(3),d0=this.length-4;0<=d0;--d0)if(this.data[d0]===o0&&this.data[d0+1]===l0&&this.data[d0+2]===c0&&this.data[d0+3]===u0)return d0-this.zero;return-1},i0.prototype.readAndCheckSignature=function(s0){var o0=s0.charCodeAt(0),l0=s0.charCodeAt(1),c0=s0.charCodeAt(2),u0=s0.charCodeAt(3),d0=this.readData(4);return o0===d0[0]&&l0===d0[1]&&c0===d0[2]&&u0===d0[3]},i0.prototype.readData=function(s0){if(this.checkOffset(s0),s0===0)return[];var o0=this.data.slice(this.zero+this.index,this.zero+this.index+s0);return this.index+=s0,o0},e0.exports=i0},{"../utils":32,"./DataReader":18}],18:[function(r0,e0,n0){var a0=r0("../utils");function i0(s0){this.data=s0,this.length=s0.length,this.index=0,this.zero=0}i0.prototype={checkOffset:function(s0){this.checkIndex(this.index+s0)},checkIndex:function(s0){if(this.length<this.zero+s0||s0<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s0+"). Corrupted zip ?")},setIndex:function(s0){this.checkIndex(s0),this.index=s0},skip:function(s0){this.setIndex(this.index+s0)},byteAt:function(){},readInt:function(s0){var o0,l0=0;for(this.checkOffset(s0),o0=this.index+s0-1;o0>=this.index;o0--)l0=(l0<<8)+this.byteAt(o0);return this.index+=s0,l0},readString:function(s0){return a0.transformTo("string",this.readData(s0))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s0=this.readInt(4);return new Date(Date.UTC(1980+(s0>>25&127),(s0>>21&15)-1,s0>>16&31,s0>>11&31,s0>>5&63,(31&s0)<<1))}},e0.exports=i0},{"../utils":32}],19:[function(r0,e0,n0){var a0=r0("./Uint8ArrayReader");function i0(s0){a0.call(this,s0)}r0("../utils").inherits(i0,a0),i0.prototype.readData=function(s0){this.checkOffset(s0);var o0=this.data.slice(this.zero+this.index,this.zero+this.index+s0);return this.index+=s0,o0},e0.exports=i0},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r0,e0,n0){var a0=r0("./DataReader");function i0(s0){a0.call(this,s0)}r0("../utils").inherits(i0,a0),i0.prototype.byteAt=function(s0){return this.data.charCodeAt(this.zero+s0)},i0.prototype.lastIndexOfSignature=function(s0){return this.data.lastIndexOf(s0)-this.zero},i0.prototype.readAndCheckSignature=function(s0){return s0===this.readData(4)},i0.prototype.readData=function(s0){this.checkOffset(s0);var o0=this.data.slice(this.zero+this.index,this.zero+this.index+s0);return this.index+=s0,o0},e0.exports=i0},{"../utils":32,"./DataReader":18}],21:[function(r0,e0,n0){var a0=r0("./ArrayReader");function i0(s0){a0.call(this,s0)}r0("../utils").inherits(i0,a0),i0.prototype.readData=function(s0){if(this.checkOffset(s0),s0===0)return new Uint8Array(0);var o0=this.data.subarray(this.zero+this.index,this.zero+this.index+s0);return this.index+=s0,o0},e0.exports=i0},{"../utils":32,"./ArrayReader":17}],22:[function(r0,e0,n0){var a0=r0("../utils"),i0=r0("../support"),s0=r0("./ArrayReader"),o0=r0("./StringReader"),l0=r0("./NodeBufferReader"),c0=r0("./Uint8ArrayReader");e0.exports=function(u0){var d0=a0.getTypeOf(u0);return a0.checkSupport(d0),d0!=="string"||i0.uint8array?d0==="nodebuffer"?new l0(u0):i0.uint8array?new c0(a0.transformTo("uint8array",u0)):new s0(a0.transformTo("array",u0)):new o0(u0)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r0,e0,n0){n0.LOCAL_FILE_HEADER="PK��",n0.CENTRAL_FILE_HEADER="PK��",n0.CENTRAL_DIRECTORY_END="PK��",n0.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",n0.ZIP64_CENTRAL_DIRECTORY_END="PK��",n0.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r0,e0,n0){var a0=r0("./GenericWorker"),i0=r0("../utils");function s0(o0){a0.call(this,"ConvertWorker to "+o0),this.destType=o0}i0.inherits(s0,a0),s0.prototype.processChunk=function(o0){this.push({data:i0.transformTo(this.destType,o0.data),meta:o0.meta})},e0.exports=s0},{"../utils":32,"./GenericWorker":28}],25:[function(r0,e0,n0){var a0=r0("./GenericWorker"),i0=r0("../crc32");function s0(){a0.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r0("../utils").inherits(s0,a0),s0.prototype.processChunk=function(o0){this.streamInfo.crc32=i0(o0.data,this.streamInfo.crc32||0),this.push(o0)},e0.exports=s0},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r0,e0,n0){var a0=r0("../utils"),i0=r0("./GenericWorker");function s0(o0){i0.call(this,"DataLengthProbe for "+o0),this.propName=o0,this.withStreamInfo(o0,0)}a0.inherits(s0,i0),s0.prototype.processChunk=function(o0){if(o0){var l0=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l0+o0.data.length}i0.prototype.processChunk.call(this,o0)},e0.exports=s0},{"../utils":32,"./GenericWorker":28}],27:[function(r0,e0,n0){var a0=r0("../utils"),i0=r0("./GenericWorker");function s0(o0){i0.call(this,"DataWorker");var l0=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o0.then(function(c0){l0.dataIsReady=!0,l0.data=c0,l0.max=c0&&c0.length||0,l0.type=a0.getTypeOf(c0),l0.isPaused||l0._tickAndRepeat()},function(c0){l0.error(c0)})}a0.inherits(s0,i0),s0.prototype.cleanUp=function(){i0.prototype.cleanUp.call(this),this.data=null},s0.prototype.resume=function(){return!!i0.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a0.delay(this._tickAndRepeat,[],this)),!0)},s0.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a0.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s0.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o0=null,l0=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o0=this.data.substring(this.index,l0);break;case"uint8array":o0=this.data.subarray(this.index,l0);break;case"array":case"nodebuffer":o0=this.data.slice(this.index,l0)}return this.index=l0,this.push({data:o0,meta:{percent:this.max?this.index/this.max*100:0}})},e0.exports=s0},{"../utils":32,"./GenericWorker":28}],28:[function(r0,e0,n0){function a0(i0){this.name=i0||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a0.prototype={push:function(i0){this.emit("data",i0)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i0){this.emit("error",i0)}return!0},error:function(i0){return!this.isFinished&&(this.isPaused?this.generatedError=i0:(this.isFinished=!0,this.emit("error",i0),this.previous&&this.previous.error(i0),this.cleanUp()),!0)},on:function(i0,s0){return this._listeners[i0].push(s0),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i0,s0){if(this._listeners[i0])for(var o0=0;o0<this._listeners[i0].length;o0++)this._listeners[i0][o0].call(this,s0)},pipe:function(i0){return i0.registerPrevious(this)},registerPrevious:function(i0){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i0.streamInfo,this.mergeStreamInfo(),this.previous=i0;var s0=this;return i0.on("data",function(o0){s0.processChunk(o0)}),i0.on("end",function(){s0.end()}),i0.on("error",function(o0){s0.error(o0)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i0=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i0=!0),this.previous&&this.previous.resume(),!i0},flush:function(){},processChunk:function(i0){this.push(i0)},withStreamInfo:function(i0,s0){return this.extraStreamInfo[i0]=s0,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i0 in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i0)&&(this.streamInfo[i0]=this.extraStreamInfo[i0])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i0="Worker "+this.name;return this.previous?this.previous+" -> "+i0:i0}},e0.exports=a0},{}],29:[function(r0,e0,n0){var a0=r0("../utils"),i0=r0("./ConvertWorker"),s0=r0("./GenericWorker"),o0=r0("../base64"),l0=r0("../support"),c0=r0("../external"),u0=null;if(l0.nodestream)try{u0=r0("../nodejs/NodejsStreamOutputAdapter")}catch{}function d0(h0,f0,p0){var A0=f0;switch(f0){case"blob":case"arraybuffer":A0="uint8array";break;case"base64":A0="string"}try{this._internalType=A0,this._outputType=f0,this._mimeType=p0,a0.checkSupport(A0),this._worker=h0.pipe(new i0(A0)),h0.lock()}catch(m0){this._worker=new s0("error"),this._worker.error(m0)}}d0.prototype={accumulate:function(h0){return function(f0,p0){return new c0.Promise(function(A0,m0){var x0=[],g0=f0._internalType,y0=f0._outputType,b0=f0._mimeType;f0.on("data",function(E0,w0){x0.push(E0),p0&&p0(w0)}).on("error",function(E0){x0=[],m0(E0)}).on("end",function(){try{var E0=function(w0,v0,S0){switch(w0){case"blob":return a0.newBlob(a0.transformTo("arraybuffer",v0),S0);case"base64":return o0.encode(v0);default:return a0.transformTo(w0,v0)}}(y0,function(w0,v0){var S0,k0=0,R0=null,j0=0;for(S0=0;S0<v0.length;S0++)j0+=v0[S0].length;switch(w0){case"string":return v0.join("");case"array":return Array.prototype.concat.apply([],v0);case"uint8array":for(R0=new Uint8Array(j0),S0=0;S0<v0.length;S0++)R0.set(v0[S0],k0),k0+=v0[S0].length;return R0;case"nodebuffer":return Buffer.concat(v0);default:throw new Error("concat : unsupported type '"+w0+"'")}}(g0,x0),b0);A0(E0)}catch(w0){m0(w0)}x0=[]}).resume()})}(this,h0)},on:function(h0,f0){var p0=this;return h0==="data"?this._worker.on(h0,function(A0){f0.call(p0,A0.data,A0.meta)}):this._worker.on(h0,function(){a0.delay(f0,arguments,p0)}),this},resume:function(){return a0.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(h0){if(a0.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u0(this,{objectMode:this._outputType!=="nodebuffer"},h0)}},e0.exports=d0},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r0,e0,n0){if(n0.base64=!0,n0.array=!0,n0.string=!0,n0.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n0.nodebuffer=typeof Buffer<"u",n0.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n0.blob=!1;else{var a0=new ArrayBuffer(0);try{n0.blob=new Blob([a0],{type:"application/zip"}).size===0}catch{try{var i0=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i0.append(a0),n0.blob=i0.getBlob("application/zip").size===0}catch{n0.blob=!1}}}try{n0.nodestream=!!r0("readable-stream").Readable}catch{n0.nodestream=!1}},{"readable-stream":16}],31:[function(r0,e0,n0){for(var a0=r0("./utils"),i0=r0("./support"),s0=r0("./nodejsUtils"),o0=r0("./stream/GenericWorker"),l0=new Array(256),c0=0;c0<256;c0++)l0[c0]=252<=c0?6:248<=c0?5:240<=c0?4:224<=c0?3:192<=c0?2:1;function u0(){o0.call(this,"utf-8 decode"),this.leftOver=null}function d0(){o0.call(this,"utf-8 encode")}l0[254]=l0[254]=1,n0.utf8encode=function(h0){return i0.nodebuffer?s0.newBufferFrom(h0,"utf-8"):function(f0){var p0,A0,m0,x0,g0,y0=f0.length,b0=0;for(x0=0;x0<y0;x0++)(64512&(A0=f0.charCodeAt(x0)))==55296&&x0+1<y0&&(64512&(m0=f0.charCodeAt(x0+1)))==56320&&(A0=65536+(A0-55296<<10)+(m0-56320),x0++),b0+=A0<128?1:A0<2048?2:A0<65536?3:4;for(p0=i0.uint8array?new Uint8Array(b0):new Array(b0),x0=g0=0;g0<b0;x0++)(64512&(A0=f0.charCodeAt(x0)))==55296&&x0+1<y0&&(64512&(m0=f0.charCodeAt(x0+1)))==56320&&(A0=65536+(A0-55296<<10)+(m0-56320),x0++),A0<128?p0[g0++]=A0:(A0<2048?p0[g0++]=192|A0>>>6:(A0<65536?p0[g0++]=224|A0>>>12:(p0[g0++]=240|A0>>>18,p0[g0++]=128|A0>>>12&63),p0[g0++]=128|A0>>>6&63),p0[g0++]=128|63&A0);return p0}(h0)},n0.utf8decode=function(h0){return i0.nodebuffer?a0.transformTo("nodebuffer",h0).toString("utf-8"):function(f0){var p0,A0,m0,x0,g0=f0.length,y0=new Array(2*g0);for(p0=A0=0;p0<g0;)if((m0=f0[p0++])<128)y0[A0++]=m0;else if(4<(x0=l0[m0]))y0[A0++]=65533,p0+=x0-1;else{for(m0&=x0===2?31:x0===3?15:7;1<x0&&p0<g0;)m0=m0<<6|63&f0[p0++],x0--;1<x0?y0[A0++]=65533:m0<65536?y0[A0++]=m0:(m0-=65536,y0[A0++]=55296|m0>>10&1023,y0[A0++]=56320|1023&m0)}return y0.length!==A0&&(y0.subarray?y0=y0.subarray(0,A0):y0.length=A0),a0.applyFromCharCode(y0)}(h0=a0.transformTo(i0.uint8array?"uint8array":"array",h0))},a0.inherits(u0,o0),u0.prototype.processChunk=function(h0){var f0=a0.transformTo(i0.uint8array?"uint8array":"array",h0.data);if(this.leftOver&&this.leftOver.length){if(i0.uint8array){var p0=f0;(f0=new Uint8Array(p0.length+this.leftOver.length)).set(this.leftOver,0),f0.set(p0,this.leftOver.length)}else f0=this.leftOver.concat(f0);this.leftOver=null}var A0=function(x0,g0){var y0;for((g0=g0||x0.length)>x0.length&&(g0=x0.length),y0=g0-1;0<=y0&&(192&x0[y0])==128;)y0--;return y0<0||y0===0?g0:y0+l0[x0[y0]]>g0?y0:g0}(f0),m0=f0;A0!==f0.length&&(i0.uint8array?(m0=f0.subarray(0,A0),this.leftOver=f0.subarray(A0,f0.length)):(m0=f0.slice(0,A0),this.leftOver=f0.slice(A0,f0.length))),this.push({data:n0.utf8decode(m0),meta:h0.meta})},u0.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n0.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n0.Utf8DecodeWorker=u0,a0.inherits(d0,o0),d0.prototype.processChunk=function(h0){this.push({data:n0.utf8encode(h0.data),meta:h0.meta})},n0.Utf8EncodeWorker=d0},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r0,e0,n0){var a0=r0("./support"),i0=r0("./base64"),s0=r0("./nodejsUtils"),o0=r0("./external");function l0(p0){return p0}function c0(p0,A0){for(var m0=0;m0<p0.length;++m0)A0[m0]=255&p0.charCodeAt(m0);return A0}r0("setimmediate"),n0.newBlob=function(p0,A0){n0.checkSupport("blob");try{return new Blob([p0],{type:A0})}catch{try{var m0=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m0.append(p0),m0.getBlob(A0)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u0={stringifyByChunk:function(p0,A0,m0){var x0=[],g0=0,y0=p0.length;if(y0<=m0)return String.fromCharCode.apply(null,p0);for(;g0<y0;)A0==="array"||A0==="nodebuffer"?x0.push(String.fromCharCode.apply(null,p0.slice(g0,Math.min(g0+m0,y0)))):x0.push(String.fromCharCode.apply(null,p0.subarray(g0,Math.min(g0+m0,y0)))),g0+=m0;return x0.join("")},stringifyByChar:function(p0){for(var A0="",m0=0;m0<p0.length;m0++)A0+=String.fromCharCode(p0[m0]);return A0},applyCanBeUsed:{uint8array:function(){try{return a0.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return a0.nodebuffer&&String.fromCharCode.apply(null,s0.allocBuffer(1)).length===1}catch{return!1}}()}};function d0(p0){var A0=65536,m0=n0.getTypeOf(p0),x0=!0;if(m0==="uint8array"?x0=u0.applyCanBeUsed.uint8array:m0==="nodebuffer"&&(x0=u0.applyCanBeUsed.nodebuffer),x0)for(;1<A0;)try{return u0.stringifyByChunk(p0,m0,A0)}catch{A0=Math.floor(A0/2)}return u0.stringifyByChar(p0)}function h0(p0,A0){for(var m0=0;m0<p0.length;m0++)A0[m0]=p0[m0];return A0}n0.applyFromCharCode=d0;var f0={};f0.string={string:l0,array:function(p0){return c0(p0,new Array(p0.length))},arraybuffer:function(p0){return f0.string.uint8array(p0).buffer},uint8array:function(p0){return c0(p0,new Uint8Array(p0.length))},nodebuffer:function(p0){return c0(p0,s0.allocBuffer(p0.length))}},f0.array={string:d0,array:l0,arraybuffer:function(p0){return new Uint8Array(p0).buffer},uint8array:function(p0){return new Uint8Array(p0)},nodebuffer:function(p0){return s0.newBufferFrom(p0)}},f0.arraybuffer={string:function(p0){return d0(new Uint8Array(p0))},array:function(p0){return h0(new Uint8Array(p0),new Array(p0.byteLength))},arraybuffer:l0,uint8array:function(p0){return new Uint8Array(p0)},nodebuffer:function(p0){return s0.newBufferFrom(new Uint8Array(p0))}},f0.uint8array={string:d0,array:function(p0){return h0(p0,new Array(p0.length))},arraybuffer:function(p0){return p0.buffer},uint8array:l0,nodebuffer:function(p0){return s0.newBufferFrom(p0)}},f0.nodebuffer={string:d0,array:function(p0){return h0(p0,new Array(p0.length))},arraybuffer:function(p0){return f0.nodebuffer.uint8array(p0).buffer},uint8array:function(p0){return h0(p0,new Uint8Array(p0.length))},nodebuffer:l0},n0.transformTo=function(p0,A0){if(A0=A0||"",!p0)return A0;n0.checkSupport(p0);var m0=n0.getTypeOf(A0);return f0[m0][p0](A0)},n0.resolve=function(p0){for(var A0=p0.split("/"),m0=[],x0=0;x0<A0.length;x0++){var g0=A0[x0];g0==="."||g0===""&&x0!==0&&x0!==A0.length-1||(g0===".."?m0.pop():m0.push(g0))}return m0.join("/")},n0.getTypeOf=function(p0){return typeof p0=="string"?"string":Object.prototype.toString.call(p0)==="[object Array]"?"array":a0.nodebuffer&&s0.isBuffer(p0)?"nodebuffer":a0.uint8array&&p0 instanceof Uint8Array?"uint8array":a0.arraybuffer&&p0 instanceof ArrayBuffer?"arraybuffer":void 0},n0.checkSupport=function(p0){if(!a0[p0.toLowerCase()])throw new Error(p0+" is not supported by this platform")},n0.MAX_VALUE_16BITS=65535,n0.MAX_VALUE_32BITS=-1,n0.pretty=function(p0){var A0,m0,x0="";for(m0=0;m0<(p0||"").length;m0++)x0+="\\x"+((A0=p0.charCodeAt(m0))<16?"0":"")+A0.toString(16).toUpperCase();return x0},n0.delay=function(p0,A0,m0){setImmediate(function(){p0.apply(m0||null,A0||[])})},n0.inherits=function(p0,A0){function m0(){}m0.prototype=A0.prototype,p0.prototype=new m0},n0.extend=function(){var p0,A0,m0={};for(p0=0;p0<arguments.length;p0++)for(A0 in arguments[p0])Object.prototype.hasOwnProperty.call(arguments[p0],A0)&&m0[A0]===void 0&&(m0[A0]=arguments[p0][A0]);return m0},n0.prepareContent=function(p0,A0,m0,x0,g0){return o0.Promise.resolve(A0).then(function(y0){return a0.blob&&(y0 instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(y0))!==-1)&&typeof FileReader<"u"?new o0.Promise(function(b0,E0){var w0=new FileReader;w0.onload=function(v0){b0(v0.target.result)},w0.onerror=function(v0){E0(v0.target.error)},w0.readAsArrayBuffer(y0)}):y0}).then(function(y0){var b0=n0.getTypeOf(y0);return b0?(b0==="arraybuffer"?y0=n0.transformTo("uint8array",y0):b0==="string"&&(g0?y0=i0.decode(y0):m0&&x0!==!0&&(y0=function(E0){return c0(E0,a0.uint8array?new Uint8Array(E0.length):new Array(E0.length))}(y0))),y0):o0.Promise.reject(new Error("Can't read the data of '"+p0+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r0,e0,n0){var a0=r0("./reader/readerFor"),i0=r0("./utils"),s0=r0("./signature"),o0=r0("./zipEntry"),l0=r0("./support");function c0(u0){this.files=[],this.loadOptions=u0}c0.prototype={checkSignature:function(u0){if(!this.reader.readAndCheckSignature(u0)){this.reader.index-=4;var d0=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i0.pretty(d0)+", expected "+i0.pretty(u0)+")")}},isSignature:function(u0,d0){var h0=this.reader.index;this.reader.setIndex(u0);var f0=this.reader.readString(4)===d0;return this.reader.setIndex(h0),f0},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u0=this.reader.readData(this.zipCommentLength),d0=l0.uint8array?"uint8array":"array",h0=i0.transformTo(d0,u0);this.zipComment=this.loadOptions.decodeFileName(h0)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u0,d0,h0,f0=this.zip64EndOfCentralSize-44;0<f0;)u0=this.reader.readInt(2),d0=this.reader.readInt(4),h0=this.reader.readData(d0),this.zip64ExtensibleData[u0]={id:u0,length:d0,value:h0}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u0,d0;for(u0=0;u0<this.files.length;u0++)d0=this.files[u0],this.reader.setIndex(d0.localHeaderOffset),this.checkSignature(s0.LOCAL_FILE_HEADER),d0.readLocalPart(this.reader),d0.handleUTF8(),d0.processAttributes()},readCentralDir:function(){var u0;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s0.CENTRAL_FILE_HEADER);)(u0=new o0({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u0);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u0=this.reader.lastIndexOfSignature(s0.CENTRAL_DIRECTORY_END);if(u0<0)throw this.isSignature(0,s0.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
753ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u0);var d0=u0;if(this.checkSignature(s0.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i0.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i0.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i0.MAX_VALUE_16BITS||this.centralDirRecords===i0.MAX_VALUE_16BITS||this.centralDirSize===i0.MAX_VALUE_32BITS||this.centralDirOffset===i0.MAX_VALUE_32BITS){if(this.zip64=!0,(u0=this.reader.lastIndexOfSignature(s0.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u0),this.checkSignature(s0.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s0.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s0.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s0.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h0=this.centralDirOffset+this.centralDirSize;this.zip64&&(h0+=20,h0+=12+this.zip64EndOfCentralSize);var f0=d0-h0;if(0<f0)this.isSignature(d0,s0.CENTRAL_FILE_HEADER)||(this.reader.zero=f0);else if(f0<0)throw new Error("Corrupted zip: missing "+Math.abs(f0)+" bytes.")},prepareReader:function(u0){this.reader=a0(u0)},load:function(u0){this.prepareReader(u0),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e0.exports=c0},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r0,e0,n0){var a0=r0("./reader/readerFor"),i0=r0("./utils"),s0=r0("./compressedObject"),o0=r0("./crc32"),l0=r0("./utf8"),c0=r0("./compressions"),u0=r0("./support");function d0(h0,f0){this.options=h0,this.loadOptions=f0}d0.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(h0){var f0,p0;if(h0.skip(22),this.fileNameLength=h0.readInt(2),p0=h0.readInt(2),this.fileName=h0.readData(this.fileNameLength),h0.skip(p0),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((f0=function(A0){for(var m0 in c0)if(Object.prototype.hasOwnProperty.call(c0,m0)&&c0[m0].magic===A0)return c0[m0];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i0.pretty(this.compressionMethod)+" unknown (inner file : "+i0.transformTo("string",this.fileName)+")");this.decompressed=new s0(this.compressedSize,this.uncompressedSize,this.crc32,f0,h0.readData(this.compressedSize))},readCentralPart:function(h0){this.versionMadeBy=h0.readInt(2),h0.skip(2),this.bitFlag=h0.readInt(2),this.compressionMethod=h0.readString(2),this.date=h0.readDate(),this.crc32=h0.readInt(4),this.compressedSize=h0.readInt(4),this.uncompressedSize=h0.readInt(4);var f0=h0.readInt(2);if(this.extraFieldsLength=h0.readInt(2),this.fileCommentLength=h0.readInt(2),this.diskNumberStart=h0.readInt(2),this.internalFileAttributes=h0.readInt(2),this.externalFileAttributes=h0.readInt(4),this.localHeaderOffset=h0.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h0.skip(f0),this.readExtraFields(h0),this.parseZIP64ExtraField(h0),this.fileComment=h0.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h0=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h0==0&&(this.dosPermissions=63&this.externalFileAttributes),h0==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h0=a0(this.extraFields[1].value);
vendor: 8,737 bytes, line 753
753this.uncompressedSize===i0.MAX_VALUE_32BITS&&(this.uncompressedSize=h0.readInt(8)),this.compressedSize===i0.MAX_VALUE_32BITS&&(this.compressedSize=h0.readInt(8)),this.localHeaderOffset===i0.MAX_VALUE_32BITS&&(this.localHeaderOffset=h0.readInt(8)),this.diskNumberStart===i0.MAX_VALUE_32BITS&&(this.diskNumberStart=h0.readInt(4))}},readExtraFields:function(h0){var f0,p0,A0,m0=h0.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h0.index+4<m0;)f0=h0.readInt(2),p0=h0.readInt(2),A0=h0.readData(p0),this.extraFields[f0]={id:f0,length:p0,value:A0};h0.setIndex(m0)},handleUTF8:function(){var h0=u0.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l0.utf8decode(this.fileName),this.fileCommentStr=l0.utf8decode(this.fileComment);else{var f0=this.findExtraFieldUnicodePath();if(f0!==null)this.fileNameStr=f0;else{var p0=i0.transformTo(h0,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p0)}var A0=this.findExtraFieldUnicodeComment();if(A0!==null)this.fileCommentStr=A0;else{var m0=i0.transformTo(h0,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m0)}}},findExtraFieldUnicodePath:function(){var h0=this.extraFields[28789];if(h0){var f0=a0(h0.value);return f0.readInt(1)!==1||o0(this.fileName)!==f0.readInt(4)?null:l0.utf8decode(f0.readData(h0.length-5))}return null},findExtraFieldUnicodeComment:function(){var h0=this.extraFields[25461];if(h0){var f0=a0(h0.value);return f0.readInt(1)!==1||o0(this.fileComment)!==f0.readInt(4)?null:l0.utf8decode(f0.readData(h0.length-5))}return null}},e0.exports=d0},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r0,e0,n0){function a0(f0,p0,A0){this.name=f0,this.dir=A0.dir,this.date=A0.date,this.comment=A0.comment,this.unixPermissions=A0.unixPermissions,this.dosPermissions=A0.dosPermissions,this._data=p0,this._dataBinary=A0.binary,this.options={compression:A0.compression,compressionOptions:A0.compressionOptions}}var i0=r0("./stream/StreamHelper"),s0=r0("./stream/DataWorker"),o0=r0("./utf8"),l0=r0("./compressedObject"),c0=r0("./stream/GenericWorker");a0.prototype={internalStream:function(f0){var p0=null,A0="string";try{if(!f0)throw new Error("No output type specified.");var m0=(A0=f0.toLowerCase())==="string"||A0==="text";A0!=="binarystring"&&A0!=="text"||(A0="string"),p0=this._decompressWorker();var x0=!this._dataBinary;x0&&!m0&&(p0=p0.pipe(new o0.Utf8EncodeWorker)),!x0&&m0&&(p0=p0.pipe(new o0.Utf8DecodeWorker))}catch(g0){(p0=new c0("error")).error(g0)}return new i0(p0,A0,"")},async:function(f0,p0){return this.internalStream(f0).accumulate(p0)},nodeStream:function(f0,p0){return this.internalStream(f0||"nodebuffer").toNodejsStream(p0)},_compressWorker:function(f0,p0){if(this._data instanceof l0&&this._data.compression.magic===f0.magic)return this._data.getCompressedWorker();var A0=this._decompressWorker();return this._dataBinary||(A0=A0.pipe(new o0.Utf8EncodeWorker)),l0.createWorkerFrom(A0,f0,p0)},_decompressWorker:function(){return this._data instanceof l0?this._data.getContentWorker():this._data instanceof c0?this._data:new s0(this._data)}};for(var u0=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d0=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h0=0;h0<u0.length;h0++)a0.prototype[u0[h0]]=d0;e0.exports=a0},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r0,e0,n0){(function(a0){var i0,s0,o0=a0.MutationObserver||a0.WebKitMutationObserver;if(o0){var l0=0,c0=new o0(f0),u0=a0.document.createTextNode("");c0.observe(u0,{characterData:!0}),i0=function(){u0.data=l0=++l0%2}}else if(a0.setImmediate||a0.MessageChannel===void 0)i0="document"in a0&&"onreadystatechange"in a0.document.createElement("script")?function(){var p0=a0.document.createElement("script");p0.onreadystatechange=function(){f0(),p0.onreadystatechange=null,p0.parentNode.removeChild(p0),p0=null},a0.document.documentElement.appendChild(p0)}:function(){setTimeout(f0,0)};else{var d0=new a0.MessageChannel;d0.port1.onmessage=f0,i0=function(){d0.port2.postMessage(0)}}var h0=[];function f0(){var p0,A0;s0=!0;for(var m0=h0.length;m0;){for(A0=h0,h0=[],p0=-1;++p0<m0;)A0[p0]();m0=h0.length}s0=!1}e0.exports=function(p0){h0.push(p0)!==1||s0||i0()}}).call(this,e!==void 0?e:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r0,e0,n0){var a0=r0("immediate");function i0(){}var s0={},o0=["REJECTED"],l0=["FULFILLED"],c0=["PENDING"];function u0(m0){if(typeof m0!="function")throw new TypeError("resolver must be a function");this.state=c0,this.queue=[],this.outcome=void 0,m0!==i0&&p0(this,m0)}function d0(m0,x0,g0){this.promise=m0,typeof x0=="function"&&(this.onFulfilled=x0,this.callFulfilled=this.otherCallFulfilled),typeof g0=="function"&&(this.onRejected=g0,this.callRejected=this.otherCallRejected)}function h0(m0,x0,g0){a0(function(){var y0;try{y0=x0(g0)}catch(b0){return s0.reject(m0,b0)}y0===m0?s0.reject(m0,new TypeError("Cannot resolve promise with itself")):s0.resolve(m0,y0)})}function f0(m0){var x0=m0&&m0.then;if(m0&&(typeof m0=="object"||typeof m0=="function")&&typeof x0=="function")return function(){x0.apply(m0,arguments)}}function p0(m0,x0){var g0=!1;function y0(w0){g0||(g0=!0,s0.reject(m0,w0))}function b0(w0){g0||(g0=!0,s0.resolve(m0,w0))}var E0=A0(function(){x0(b0,y0)});E0.status==="error"&&y0(E0.value)}function A0(m0,x0){var g0={};try{g0.value=m0(x0),g0.status="success"}catch(y0){g0.status="error",g0.value=y0}return g0}(e0.exports=u0).prototype.finally=function(m0){if(typeof m0!="function")return this;var x0=this.constructor;return this.then(function(g0){return x0.resolve(m0()).then(function(){return g0})},function(g0){return x0.resolve(m0()).then(function(){throw g0})})},u0.prototype.catch=function(m0){return this.then(null,m0)},u0.prototype.then=function(m0,x0){if(typeof m0!="function"&&this.state===l0||typeof x0!="function"&&this.state===o0)return this;var g0=new this.constructor(i0);return this.state!==c0?h0(g0,this.state===l0?m0:x0,this.outcome):this.queue.push(new d0(g0,m0,x0)),g0},d0.prototype.callFulfilled=function(m0){s0.resolve(this.promise,m0)},d0.prototype.otherCallFulfilled=function(m0){h0(this.promise,this.onFulfilled,m0)},d0.prototype.callRejected=function(m0){s0.reject(this.promise,m0)},d0.prototype.otherCallRejected=function(m0){h0(this.promise,this.onRejected,m0)},s0.resolve=function(m0,x0){var g0=A0(f0,x0);if(g0.status==="error")return s0.reject(m0,g0.value);var y0=g0.value;if(y0)p0(m0,y0);else{m0.state=l0,m0.outcome=x0;for(var b0=-1,E0=m0.queue.length;++b0<E0;)m0.queue[b0].callFulfilled(x0)}return m0},s0.reject=function(m0,x0){m0.state=o0,m0.outcome=x0;for(var g0=-1,y0=m0.queue.length;++g0<y0;)m0.queue[g0].callRejected(x0);return m0},u0.resolve=function(m0){return m0 instanceof this?m0:s0.resolve(new this(i0),m0)},u0.reject=function(m0){var x0=new this(i0);return s0.reject(x0,m0)},u0.all=function(m0){var x0=this;if(Object.prototype.toString.call(m0)!=="[object Array]")return this.reject(new TypeError("must be an array"));var g0=m0.length,y0=!1;if(!g0)return this.resolve([]);for(var b0=new Array(g0),E0=0,w0=-1,v0=new this(i0);++w0<g0;)S0(m0[w0],w0);return v0;function S0(k0,R0){x0.resolve(k0).then(function(j0){b0[R0]=j0,++E0!==g0||y0||(y0=!0,s0.resolve(v0,b0))},function(j0){y0||(y0=!0,s0.reject(v0,j0))})}},u0.race=function(m0){if(Object.prototype.toString.call(m0)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x0=m0.length,g0=!1;if(!x0)return this.resolve([]);for(var y0,b0=-1,E0=new this(i0);++b0<x0;)y0=m0[b0],this.resolve(y0).then(function(w0){g0||(g0=!0,s0.resolve(E0,w0))},function(w0){g0||(g0=!0,s0.reject(E0,w0))});return E0}},{immediate:36}],38:[function(r0,e0,n0){var a0={};(0,r0("./lib/utils/common").assign)(a0,r0("./lib/deflate"),r0("./lib/inflate"),r0("./lib/zlib/constants")),e0.exports=a0},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r0,e0,n0){var a0=r0("./zlib/deflate"),i0=r0("./utils/common"),s0=r0("./utils/strings"),o0=r0("./zlib/messages"),l0=r0("./zlib/zstream"),c0=Object.prototype.toString;function u0(h0){if(!(this instanceof u0))return new u0(h0);this.options=i0.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},h0||{});var f0=this.options;f0.raw&&0<f0.windowBits?f0.windowBits=-f0.windowBits:f0.gzip&&0<f0.windowBits&&f0.windowBits<16&&(f0.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l0,this.strm.avail_out=0;var p0=a0.deflateInit2(this.strm,f0.level,f0.method,f0.windowBits,f0.memLevel,f0.strategy);
vendor: 3,455 bytes, line 753
753if(p0!==0)throw new Error(o0[p0]);if(f0.header&&a0.deflateSetHeader(this.strm,f0.header),f0.dictionary){var A0;if(A0=typeof f0.dictionary=="string"?s0.string2buf(f0.dictionary):c0.call(f0.dictionary)==="[object ArrayBuffer]"?new Uint8Array(f0.dictionary):f0.dictionary,(p0=a0.deflateSetDictionary(this.strm,A0))!==0)throw new Error(o0[p0]);this._dict_set=!0}}function d0(h0,f0){var p0=new u0(f0);if(p0.push(h0,!0),p0.err)throw p0.msg||o0[p0.err];return p0.result}u0.prototype.push=function(h0,f0){var p0,A0,m0=this.strm,x0=this.options.chunkSize;if(this.ended)return!1;A0=f0===~~f0?f0:f0===!0?4:0,typeof h0=="string"?m0.input=s0.string2buf(h0):c0.call(h0)==="[object ArrayBuffer]"?m0.input=new Uint8Array(h0):m0.input=h0,m0.next_in=0,m0.avail_in=m0.input.length;do{if(m0.avail_out===0&&(m0.output=new i0.Buf8(x0),m0.next_out=0,m0.avail_out=x0),(p0=a0.deflate(m0,A0))!==1&&p0!==0)return this.onEnd(p0),!(this.ended=!0);m0.avail_out!==0&&(m0.avail_in!==0||A0!==4&&A0!==2)||(this.options.to==="string"?this.onData(s0.buf2binstring(i0.shrinkBuf(m0.output,m0.next_out))):this.onData(i0.shrinkBuf(m0.output,m0.next_out)))}while((0<m0.avail_in||m0.avail_out===0)&&p0!==1);return A0===4?(p0=a0.deflateEnd(this.strm),this.onEnd(p0),this.ended=!0,p0===0):A0!==2||(this.onEnd(0),!(m0.avail_out=0))},u0.prototype.onData=function(h0){this.chunks.push(h0)},u0.prototype.onEnd=function(h0){h0===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i0.flattenChunks(this.chunks)),this.chunks=[],this.err=h0,this.msg=this.strm.msg},n0.Deflate=u0,n0.deflate=d0,n0.deflateRaw=function(h0,f0){return(f0=f0||{}).raw=!0,d0(h0,f0)},n0.gzip=function(h0,f0){return(f0=f0||{}).gzip=!0,d0(h0,f0)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r0,e0,n0){var a0=r0("./zlib/inflate"),i0=r0("./utils/common"),s0=r0("./utils/strings"),o0=r0("./zlib/constants"),l0=r0("./zlib/messages"),c0=r0("./zlib/zstream"),u0=r0("./zlib/gzheader"),d0=Object.prototype.toString;function h0(p0){if(!(this instanceof h0))return new h0(p0);this.options=i0.assign({chunkSize:16384,windowBits:0,to:""},p0||{});var A0=this.options;A0.raw&&0<=A0.windowBits&&A0.windowBits<16&&(A0.windowBits=-A0.windowBits,A0.windowBits===0&&(A0.windowBits=-15)),!(0<=A0.windowBits&&A0.windowBits<16)||p0&&p0.windowBits||(A0.windowBits+=32),15<A0.windowBits&&A0.windowBits<48&&!(15&A0.windowBits)&&(A0.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c0,this.strm.avail_out=0;var m0=a0.inflateInit2(this.strm,A0.windowBits);if(m0!==o0.Z_OK)throw new Error(l0[m0]);this.header=new u0,a0.inflateGetHeader(this.strm,this.header)}function f0(p0,A0){var m0=new h0(A0);if(m0.push(p0,!0),m0.err)throw m0.msg||l0[m0.err];return m0.result}h0.prototype.push=function(p0,A0){var m0,x0,g0,y0,b0,E0,w0=this.strm,v0=this.options.chunkSize,S0=this.options.dictionary,k0=!1;if(this.ended)return!1;x0=A0===~~A0?A0:A0===!0?o0.Z_FINISH:o0.Z_NO_FLUSH,typeof p0=="string"?w0.input=s0.binstring2buf(p0):d0.call(p0)==="[object ArrayBuffer]"?w0.input=new Uint8Array(p0):w0.input=p0,w0.next_in=0,w0.avail_in=w0.input.length;do{if(w0.avail_out===0&&(w0.output=new i0.Buf8(v0),w0.next_out=0,w0.avail_out=v0),(m0=a0.inflate(w0,o0.Z_NO_FLUSH))===o0.Z_NEED_DICT&&S0&&(E0=typeof S0=="string"?s0.string2buf(S0):d0.call(S0)==="[object ArrayBuffer]"?new Uint8Array(S0):S0,m0=a0.inflateSetDictionary(this.strm,E0)),m0===o0.Z_BUF_ER
vendor: 4,722 bytes, line 753
753ROR&&k0===!0&&(m0=o0.Z_OK,k0=!1),m0!==o0.Z_STREAM_END&&m0!==o0.Z_OK)return this.onEnd(m0),!(this.ended=!0);w0.next_out&&(w0.avail_out!==0&&m0!==o0.Z_STREAM_END&&(w0.avail_in!==0||x0!==o0.Z_FINISH&&x0!==o0.Z_SYNC_FLUSH)||(this.options.to==="string"?(g0=s0.utf8border(w0.output,w0.next_out),y0=w0.next_out-g0,b0=s0.buf2string(w0.output,g0),w0.next_out=y0,w0.avail_out=v0-y0,y0&&i0.arraySet(w0.output,w0.output,g0,y0,0),this.onData(b0)):this.onData(i0.shrinkBuf(w0.output,w0.next_out)))),w0.avail_in===0&&w0.avail_out===0&&(k0=!0)}while((0<w0.avail_in||w0.avail_out===0)&&m0!==o0.Z_STREAM_END);return m0===o0.Z_STREAM_END&&(x0=o0.Z_FINISH),x0===o0.Z_FINISH?(m0=a0.inflateEnd(this.strm),this.onEnd(m0),this.ended=!0,m0===o0.Z_OK):x0!==o0.Z_SYNC_FLUSH||(this.onEnd(o0.Z_OK),!(w0.avail_out=0))},h0.prototype.onData=function(p0){this.chunks.push(p0)},h0.prototype.onEnd=function(p0){p0===o0.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i0.flattenChunks(this.chunks)),this.chunks=[],this.err=p0,this.msg=this.strm.msg},n0.Inflate=h0,n0.inflate=f0,n0.inflateRaw=function(p0,A0){return(A0=A0||{}).raw=!0,f0(p0,A0)},n0.ungzip=f0},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r0,e0,n0){var a0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n0.assign=function(o0){for(var l0=Array.prototype.slice.call(arguments,1);l0.length;){var c0=l0.shift();if(c0){if(typeof c0!="object")throw new TypeError(c0+"must be non-object");for(var u0 in c0)c0.hasOwnProperty(u0)&&(o0[u0]=c0[u0])}}return o0},n0.shrinkBuf=function(o0,l0){return o0.length===l0?o0:o0.subarray?o0.subarray(0,l0):(o0.length=l0,o0)};var i0={arraySet:function(o0,l0,c0,u0,d0){if(l0.subarray&&o0.subarray)o0.set(l0.subarray(c0,c0+u0),d0);else for(var h0=0;h0<u0;h0++)o0[d0+h0]=l0[c0+h0]},flattenChunks:function(o0){var l0,c0,u0,d0,h0,f0;for(l0=u0=0,c0=o0.length;l0<c0;l0++)u0+=o0[l0].length;for(f0=new Uint8Array(u0),l0=d0=0,c0=o0.length;l0<c0;l0++)h0=o0[l0],f0.set(h0,d0),d0+=h0.length;return f0}},s0={arraySet:function(o0,l0,c0,u0,d0){for(var h0=0;h0<u0;h0++)o0[d0+h0]=l0[c0+h0]},flattenChunks:function(o0){return[].concat.apply([],o0)}};n0.setTyped=function(o0){o0?(n0.Buf8=Uint8Array,n0.Buf16=Uint16Array,n0.Buf32=Int32Array,n0.assign(n0,i0)):(n0.Buf8=Array,n0.Buf16=Array,n0.Buf32=Array,n0.assign(n0,s0))},n0.setTyped(a0)},{}],42:[function(r0,e0,n0){var a0=r0("./common"),i0=!0,s0=!0;try{String.fromCharCode.apply(null,[0])}catch{i0=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s0=!1}for(var o0=new a0.Buf8(256),l0=0;l0<256;l0++)o0[l0]=252<=l0?6:248<=l0?5:240<=l0?4:224<=l0?3:192<=l0?2:1;function c0(u0,d0){if(d0<65537&&(u0.subarray&&s0||!u0.subarray&&i0))return String.fromCharCode.apply(null,a0.shrinkBuf(u0,d0));for(var h0="",f0=0;f0<d0;f0++)h0+=String.fromCharCode(u0[f0]);return h0}o0[254]=o0[254]=1,n0.string2buf=function(u0){var d0,h0,f0,p0,A0,m0=u0.length,x0=0;for(p0=0;p0<m0;p0++)(64512&(h0=u0.charCodeAt(p0)))==55296&&p0+1<m0&&(64512&(f0=u0.charCodeAt(p0+1)))==56320&&(h0=65536+(h0-55296<<10)+(f0-56320),p0++),x0+=h0<128?1:h0<2048?2:h0<65536?3:4;for(d0=new a0.Buf8(x0),p0=A0=0;A0<x0;p0++)(64512&(h0=u0.charCodeAt(p0)))==55296&&p0+1<m0&&(64512&(f0=u0.charCodeAt(p0+1)))==56320&&(h0=65536+(h0-55296<<10)+(f0-56320),p0++),h0<128?d0[A0++]=h0:(h0<2048?d0[A0++]=192|h0>>>6:(h0<65536?d0[A0++]=224|h0>>>12:(d0[A0++]=240|h0>>>18,d0[A0++]=128|h0>>>12&63),d0[A0++]=128|h0>>>6&63),d0[A0++]=128|63&h0);return d0},n0.buf2binstring=function(u0){return c0(u0,u0.length)},n0.binstring2buf=function(u0){for(var d0=new a0.Buf8(u0.length),h0=0,f0=d0.length;h0<f0;h0++)d0[h0]=u0.charCodeAt(h0);return d0},n0.buf2string=function(u0,d0){var h0,f0,p0,A0,m0=d0||u0.length,x0=new Array(2*m0);for(h0=f0=0;h0<m0;)if((p0=u0[h0++])<128)x0[f0++]=p0;else if(4<(A0=o0[p0]))x0[f0++]=65533,h0+=A0-1;else{for(p0&=A0===2?31:A0===3?15:7;1<A0&&h0<m0;)p0=p0<<6|63&u0[h0++],A0--;1<A0?x0[f0++]=65533:p0<65536?x0[f0++]=p0:(p0-=65536,x0[f0++]=55296|p0>>10&1023,x0[f0++]=56320|1023&p0)}return c0(x0,f0)},n0.utf8border=function(u0,d0){var h0;for((d0=d0||u0.length)>u0.length&&(d0=u0.length),h0=d0-1;0<=h0&&(192&u0[h0])==128;)h0--;return h0<0||h0===0?d0:h0+o0[u0[h0]]>d0?h0:d0}},{"./common":41}],43:[function(r0,e0,n0){e0.exports=function(a0,i0,s0,o0){for(var l0=65535&a0,c0=a0>>>16&65535,u0=0;s0!==0;){for(s0-=u0=2e3<s0?2e3:s0;c0=c0+(l0=l0+i0[o0++]|0)|0,--u0;);l0%=65521,c0%=65521}return l0|c0<<16}},{}],44:[function(r0,e0,n0){e0.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ER
vendor: 7,498 bytes, line 753
753ROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r0,e0,n0){var a0=function(){for(var i0,s0=[],o0=0;o0<256;o0++){i0=o0;for(var l0=0;l0<8;l0++)i0=1&i0?3988292384^i0>>>1:i0>>>1;s0[o0]=i0}return s0}();e0.exports=function(i0,s0,o0,l0){var c0=a0,u0=l0+o0;i0^=-1;for(var d0=l0;d0<u0;d0++)i0=i0>>>8^c0[255&(i0^s0[d0])];return-1^i0}},{}],46:[function(r0,e0,n0){var a0,i0=r0("../utils/common"),s0=r0("./trees"),o0=r0("./adler32"),l0=r0("./crc32"),c0=r0("./messages"),u0=-2,d0=258,h0=262,f0=113;function p0(T0,I0){return T0.msg=c0[I0],I0}function A0(T0){return(T0<<1)-(4<T0?9:0)}function m0(T0){for(var I0=T0.length;0<=--I0;)T0[I0]=0}function x0(T0){var I0=T0.state,M0=I0.pending;M0>T0.avail_out&&(M0=T0.avail_out),M0!==0&&(i0.arraySet(T0.output,I0.pending_buf,I0.pending_out,M0,T0.next_out),T0.next_out+=M0,I0.pending_out+=M0,T0.total_out+=M0,T0.avail_out-=M0,I0.pending-=M0,I0.pending===0&&(I0.pending_out=0))}function g0(T0,I0){s0._tr_flush_block(T0,0<=T0.block_start?T0.block_start:-1,T0.strstart-T0.block_start,I0),T0.block_start=T0.strstart,x0(T0.strm)}function y0(T0,I0){T0.pending_buf[T0.pending++]=I0}function b0(T0,I0){T0.pending_buf[T0.pending++]=I0>>>8&255,T0.pending_buf[T0.pending++]=255&I0}function E0(T0,I0){var M0,N0,D0=T0.max_chain_length,O0=T0.strstart,B0=T0.prev_length,z0=T0.nice_match,G0=T0.strstart>T0.w_size-h0?T0.strstart-(T0.w_size-h0):0,F0=T0.window,Q0=T0.w_mask,U0=T0.prev,q0=T0.strstart+d0,Rw=F0[O0+B0-1],_w=F0[O0+B0];T0.prev_length>=T0.good_match&&(D0>>=2),z0>T0.lookahead&&(z0=T0.lookahead);do if(F0[(M0=I0)+B0]===_w&&F0[M0+B0-1]===Rw&&F0[M0]===F0[O0]&&F0[++M0]===F0[O0+1]){O0+=2,M0++;do;while(F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&F0[++O0]===F0[++M0]&&O0<q0);if(N0=d0-(q0-O0),O0=q0-d0,B0<N0){if(T0.match_start=I0,z0<=(B0=N0))break;Rw=F0[O0+B0-1],_w=F0[O0+B0]}}while((I0=U0[I0&Q0])>G0&&--D0!=0);return B0<=T0.lookahead?B0:T0.lookahead}function w0(T0){var I0,M0,N0,D0,O0,B0,z0,G0,F0,Q0,U0=T0.w_size;do{if(D0=T0.window_size-T0.lookahead-T0.strstart,T0.strstart>=U0+(U0-h0)){for(i0.arraySet(T0.window,T0.window,U0,U0,0),T0.match_start-=U0,T0.strstart-=U0,T0.block_start-=U0,I0=M0=T0.hash_size;N0=T0.head[--I0],T0.head[I0]=U0<=N0?N0-U0:0,--M0;);for(I0=M0=U0;N0=T0.prev[--I0],T0.prev[I0]=U0<=N0?N0-U0:0,--M0;);D0+=U0}if(T0.strm.avail_in===0)break;if(B0=T0.strm,z0=T0.window,G0=T0.strstart+T0.lookahead,Q0=void 0,(F0=D0)<(Q0=B0.avail_in)&&(Q0=F0),M0=Q0===0?0:(B0.avail_in-=Q0,i0.arraySet(z0,B0.input,B0.next_in,Q0,G0),B0.state.wrap===1?B0.adler=o0(B0.adler,z0,Q0,G0):B0.state.wrap===2&&(B0.adler=l0(B0.adler,z0,Q0,G0)),B0.next_in+=Q0,B0.total_in+=Q0,Q0),T0.lookahead+=M0,T0.lookahead+T0.insert>=3)for(O0=T0.strstart-T0.insert,T0.ins_h=T0.window[O0],T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[O0+1])&T0.hash_mask;T0.insert&&(T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[O0+3-1])&T0.hash_mask,T0.prev[O0&T0.w_mask]=T0.head[T0.ins_h],T0.head[T0.ins_h]=O0,O0++,T0.insert--,!(T0.lookahead+T0.insert<3)););}while(T0.lookahead<h0&&T0.strm.avail_in!==0)}function v0(T0,I0){for(var M0,N0;;){if(T0.lookahead<h0){if(w0(T0),T0.lookahead<h0&&I0===0)return 1;if(T0.lookahead===0)break}if(M0=0,T0.lookahead>=3&&(T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[T0.strstart+3-1])&T0.hash_mask,M0=T0.prev[T0.strstart&T0.w_mask]=T0.head[T0.ins_h],T0.head[T0.ins_h]=T0.strstart),M0!==0&&T0.strstart-M0<=T0.w_size-h0&&(T0.match_length=E0(T0,M0)),T0.match_length>=3)if(N0=s0._tr_tally(T0,T0.strstart-T0.match_start,T0.match_length-3),T0.lookahead-=T0.match_length,T0.match_length<=T0.max_lazy_match&&T0.lookahead>=3){for(T0.match_length--;T0.strstart++,T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[T0.strstart+3-1])&T0.hash_mask,M0=T0.prev[T0.strstart&T0.w_mask]=T0.head[T0.ins_h],T0.head[T0.ins_h]=T0.strstart,--T0.match_length!=0;);T0.strstart++}else T0.strstart+=T0.match_length,T0.match_length=0,T0.ins_h=T0.window[T0.strstart],T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[T0.strstart+1])&T0.hash_mask;else N0=s0._tr_tally(T0,0,T0.window[T0.strstart]),T0.lookahead--,T0.strstart++;if(N0&&(g0(T0,!1),T0.strm.avail_out===0))return 1}return T0.insert=T0.strstart<2?T0.strstart:2,I0===4?(g0(T0,!0),T0.strm.avail_out===0?3:4):T0.last_lit&&(g0(T0,!1),T0.strm.avail_out===0)?1:2}function S0(T0,I0){for(var M0,N0,D0;;){if(T0.lookahead<h0){if(w0(T0),T0.lookahead<h0&&I0===0)return 1;if(T0.lookahead===0)break}if(M0=0,T0.lookahead>=3&&(T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[T0.strstart+3-1])&T0.hash_mask,M0=T0.prev[T0.strstart&T0.w_mask]=T0.head[T0.ins_h],T0.head[T0.ins_h]=T0.strstart),T0.prev_length=T0.match_length,T0.prev_match=T0.match_start,T0.match_length=2,M0!==0&&T0.prev_length<T0.max_lazy_match&&T0.strstart-M0<=T0.w_size-h0&&(T0.match_length=E0(T0,M0),T0.match_length<=5&&(T0.strategy===1||T0.match_length===3&&4096<T0.strstart-T0.match_start)&&(T0.match_length=2)),T0.prev_length>=3&&T0.match_length<=T0.prev_length){for(D0=T0.strstart+T0.lookahead-3,N0=s0._tr_tally(T0,T0.strstart-1-T0.prev_match,T0.prev_length-3),T0.lookahead-=T0.prev_length-1,T0.prev_length-=2;++T0.strstart<=D0&&(T0.ins_h=(T0.ins_h<<T0.hash_shift^T0.window[T0.strstart+3-1])&T0.hash_mask,M0=T0.prev[T0.strstart&T0.w_mask]=T0.head[T0.ins_h],T0.head[T0.ins_h]=T0.strstart),--T0.prev_length!=0;);if(T0.match_available=0,T0.match_length=2,T0.strstart++,N0&&(g0(T0,!1),T0.strm.avail_out===0))return 1}else if(T0.match_available){if((N0=s0._tr_tally(T0,0,T0.window[T0.strstart-1]))&&g0(T0,!1),T0.strstart++,T0.lookahead--,T0.strm.avail_out===0)return 1}else T0.match_available=1,T0.strstart++,T0.lookahead--}return T0.match_available&&(N0=s0._tr_tally(T0,0,T0.window[T0.strstart-1]),T0.match_available=0),T0.insert=T0.strstart<2?T0.strstart:2,I0===4?(g0(T0,!0),T0.strm.avail_out===0?3:4):T0.last_lit&&(g0(T0,!1),T0.strm.avail_out===0)?1:2}function k0(T0,I0,M0,N0,D0){this.good_length=T0,this.max_lazy=I0,this.nice_length=M0,this.max_chain=N0,this.func=D0}function R0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i0.Buf16(1146),this.dyn_dtree=new i0.Buf16(122),this.bl_tree=new i0.Buf16(78),m0(this.dyn_ltree),m0(this.dyn_dtree),m0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i0.Buf16(16),this.heap=new i0.Buf16(573),m0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i0.Buf16(573),m0(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j0(T0){var I0;return T0&&T0.state?(T0.total_in=T0.total_out=0,T0.data_type=2,(I0=T0.state).pending=0,I0.pending_out=0,I0.wrap<0&&(I0.wrap=-I0.wrap),I0.status=I0.wrap?42:f0,T0.adler=I0.wrap===2?0:1,I0.last_flush=0,s0._tr_init(I0),0
vendor: 9,795 bytes, line 753
753):p0(T0,u0)}function C0(T0){var I0=j0(T0);return I0===0&&function(M0){M0.window_size=2*M0.w_size,m0(M0.head),M0.max_lazy_match=a0[M0.level].max_lazy,M0.good_match=a0[M0.level].good_length,M0.nice_match=a0[M0.level].nice_length,M0.max_chain_length=a0[M0.level].max_chain,M0.strstart=0,M0.block_start=0,M0.lookahead=0,M0.insert=0,M0.match_length=M0.prev_length=2,M0.match_available=0,M0.ins_h=0}(T0.state),I0}function $0(T0,I0,M0,N0,D0,O0){if(!T0)return u0;var B0=1;if(I0===-1&&(I0=6),N0<0?(B0=0,N0=-N0):15<N0&&(B0=2,N0-=16),D0<1||9<D0||M0!==8||N0<8||15<N0||I0<0||9<I0||O0<0||4<O0)return p0(T0,u0);N0===8&&(N0=9);var z0=new R0;return(T0.state=z0).strm=T0,z0.wrap=B0,z0.gzhead=null,z0.w_bits=N0,z0.w_size=1<<z0.w_bits,z0.w_mask=z0.w_size-1,z0.hash_bits=D0+7,z0.hash_size=1<<z0.hash_bits,z0.hash_mask=z0.hash_size-1,z0.hash_shift=~~((z0.hash_bits+3-1)/3),z0.window=new i0.Buf8(2*z0.w_size),z0.head=new i0.Buf16(z0.hash_size),z0.prev=new i0.Buf16(z0.w_size),z0.lit_bufsize=1<<D0+6,z0.pending_buf_size=4*z0.lit_bufsize,z0.pending_buf=new i0.Buf8(z0.pending_buf_size),z0.d_buf=1*z0.lit_bufsize,z0.l_buf=3*z0.lit_bufsize,z0.level=I0,z0.strategy=O0,z0.method=M0,C0(T0)}a0=[new k0(0,0,0,0,function(T0,I0){var M0=65535;for(M0>T0.pending_buf_size-5&&(M0=T0.pending_buf_size-5);;){if(T0.lookahead<=1){if(w0(T0),T0.lookahead===0&&I0===0)return 1;if(T0.lookahead===0)break}T0.strstart+=T0.lookahead,T0.lookahead=0;var N0=T0.block_start+M0;if((T0.strstart===0||T0.strstart>=N0)&&(T0.lookahead=T0.strstart-N0,T0.strstart=N0,g0(T0,!1),T0.strm.avail_out===0)||T0.strstart-T0.block_start>=T0.w_size-h0&&(g0(T0,!1),T0.strm.avail_out===0))return 1}return T0.insert=0,I0===4?(g0(T0,!0),T0.strm.avail_out===0?3:4):(T0.strstart>T0.block_start&&(g0(T0,!1),T0.strm.avail_out),1)}),new k0(4,4,8,4,v0),new k0(4,5,16,8,v0),new k0(4,6,32,32,v0),new k0(4,4,16,16,S0),new k0(8,16,32,32,S0),new k0(8,16,128,128,S0),new k0(8,32,128,256,S0),new k0(32,128,258,1024,S0),new k0(32,258,258,4096,S0)],n0.deflateInit=function(T0,I0){return $0(T0,I0,8,15,8,0)},n0.deflateInit2=$0,n0.deflateReset=C0,n0.deflateResetKeep=j0,n0.deflateSetHeader=function(T0,I0){return T0&&T0.state?T0.state.wrap!==2?u0:(T0.state.gzhead=I0,0):u0},n0.deflate=function(T0,I0){var M0,N0,D0,O0;if(!T0||!T0.state||5<I0||I0<0)return T0?p0(T0,u0):u0;if(N0=T0.state,!T0.output||!T0.input&&T0.avail_in!==0||N0.status===666&&I0!==4)return p0(T0,T0.avail_out===0?-5:u0);if(N0.strm=T0,M0=N0.last_flush,N0.last_flush=I0,N0.status===42)if(N0.wrap===2)T0.adler=0,y0(N0,31),y0(N0,139),y0(N0,8),N0.gzhead?(y0(N0,(N0.gzhead.text?1:0)+(N0.gzhead.hcrc?2:0)+(N0.gzhead.extra?4:0)+(N0.gzhead.name?8:0)+(N0.gzhead.comment?16:0)),y0(N0,255&N0.gzhead.time),y0(N0,N0.gzhead.time>>8&255),y0(N0,N0.gzhead.time>>16&255),y0(N0,N0.gzhead.time>>24&255),y0(N0,N0.level===9?2:2<=N0.strategy||N0.level<2?4:0),y0(N0,255&N0.gzhead.os),N0.gzhead.extra&&N0.gzhead.extra.length&&(y0(N0,255&N0.gzhead.extra.length),y0(N0,N0.gzhead.extra.length>>8&255)),N0.gzhead.hcrc&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending,0)),N0.gzindex=0,N0.status=69):(y0(N0,0),y0(N0,0),y0(N0,0),y0(N0,0),y0(N0,0),y0(N0,N0.level===9?2:2<=N0.strategy||N0.level<2?4:0),y0(N0,3),N0.status=f0);else{var B0=8+(N0.w_bits-8<<4)<<8;B0|=(2<=N0.strategy||N0.level<2?0:N0.level<6?1:N0.level===6?2:3)<<6,N0.strstart!==0&&(B0|=32),B0+=31-B0%31,N0.status=f0,b0(N0,B0),N0.strstart!==0&&(b0(N0,T0.adler>>>16),b0(N0,65535&T0.adler)),T0.adler=1}if(N0.status===69)if(N0.gzhead.extra){for(D0=N0.pending;N0.gzindex<(65535&N0.gzhead.extra.length)&&(N0.pending!==N0.pending_buf_size||(N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),x0(T0),D0=N0.pending,N0.pending!==N0.pending_buf_size));)y0(N0,255&N0.gzhead.extra[N0.gzindex]),N0.gzindex++;N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),N0.gzindex===N0.gzhead.extra.length&&(N0.gzindex=0,N0.status=73)}else N0.status=73;if(N0.status===73)if(N0.gzhead.name){D0=N0.pending;do{if(N0.pending===N0.pending_buf_size&&(N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),x0(T0),D0=N0.pending,N0.pending===N0.pending_buf_size)){O0=1;break}O0=N0.gzindex<N0.gzhead.name.length?255&N0.gzhead.name.charCodeAt(N0.gzindex++):0,y0(N0,O0)}while(O0!==0);N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),O0===0&&(N0.gzindex=0,N0.status=91)}else N0.status=91;if(N0.status===91)if(N0.gzhead.comment){D0=N0.pending;do{if(N0.pending===N0.pending_buf_size&&(N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),x0(T0),D0=N0.pending,N0.pending===N0.pending_buf_size)){O0=1;break}O0=N0.gzindex<N0.gzhead.comment.length?255&N0.gzhead.comment.charCodeAt(N0.gzindex++):0,y0(N0,O0)}while(O0!==0);N0.gzhead.hcrc&&N0.pending>D0&&(T0.adler=l0(T0.adler,N0.pending_buf,N0.pending-D0,D0)),O0===0&&(N0.status=103)}else N0.status=103;if(N0.status===103&&(N0.gzhead.hcrc?(N0.pending+2>N0.pending_buf_size&&x0(T0),N0.pending+2<=N0.pending_buf_size&&(y0(N0,255&T0.adler),y0(N0,T0.adler>>8&255),T0.adler=0,N0.status=f0)):N0.status=f0),N0.pending!==0){if(x0(T0),T0.avail_out===0)return N0.last_flush=-1,0}else if(T0.avail_in===0&&A0(I0)<=A0(M0)&&I0!==4)return p0(T0,-5);if(N0.status===666&&T0.avail_in!==0)return p0(T0,-5);if(T0.avail_in!==0||N0.lookahead!==0||I0!==0&&N0.status!==666){var z0=N0.strategy===2?function(G0,F0){for(var Q0;;){if(G0.lookahead===0&&(w0(G0),G0.lookahead===0)){if(F0===0)return 1;break}if(G0.match_length=0,Q0=s0._tr_tally(G0,0,G0.window[G0.strstart]),G0.lookahead--,G0.strstart++,Q0&&(g0(G0,!1),G0.strm.avail_out===0))return 1}return G0.insert=0,F0===4?(g0(G0,!0),G0.strm.avail_out===0?3:4):G0.last_lit&&(g0(G0,!1),G0.strm.avail_out===0)?1:2}(N0,I0):N0.strategy===3?function(G0,F0){for(var Q0,U0,q0,Rw,_w=G0.window;;){if(G0.lookahead<=d0){if(w0(G0),G0.lookahead<=d0&&F0===0)return 1;if(G0.lookahead===0)break}if(G0.match_length=0,G0.lookahead>=3&&0<G0.strstart&&(U0=_w[q0=G0.strstart-1])===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]){Rw=G0.strstart+d0;do;while(U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&U0===_w[++q0]&&q0<Rw);G0.match_length=d0-(Rw-q0),G0.match_length>G0.lookahead&&(G0.match_length=G0.lookahead)}if(G0.match_length>=3?(Q0=s0._tr_tally(G0,1,G0.match_length-3),G0.lookahead-=G0.match_length,G0.strstart+=G0.match_length,G0.match_length=0):(Q0=s0._tr_tally(G0,0,G0.window[G0.strstart]),G0.lookahead--,G0.strstart++),Q0&&(g0(G0,!1),G0.strm.avail_out===0))return 1}return G0.insert=0,F0===4?(g0(G0,!0),G0.strm.avail_out===0?3:4):G0.last_lit&&(g0(G0,!1),G0.strm.avail_out===0)?1:2}(N0,I0):a0[N0.level].func(N0,I0);if(z0!==3&&z0!==4||(N0.status=666),z0===1||z0===3)return T0.avail_out===0&&(N0.last_flush=-1),0;if(z0===2&&(I0===1?s0._tr_align(N0):I0!==5&&(s0._tr_stored_block(N0,0,0,!1),I0===3&&(m0(N0.head),N0.lookahead===0&&(N0.strstart=0,N0.block_start=0,N0.insert=0))),x0(T0),T0.avail_out===0))return N0.last_flush=-1,0}return I0!==4?0:N0.wrap<=0?1:(N0.wrap===2?(y0(N0,255&T0.adler),y0(N0,T0.adler>>8&255),y0(N0,T0.adler>>16&255),y0(N0,T0.adler>>24&255),y0(N0,255&T0.total_in),y0(N0,T0.total_in>>8&255),y0(N0,T0.total_in>>16&255),y0(N0,T0.total_in>>24&255)):(b0(N0,T0.adler>>>16),b0(N0,65535&T0.adler)),x0(T0),0<N0.wrap&&(N0.wrap=-N0.wrap),N0.pending!==0?0:1)},n0.deflateEnd=function(T0){var I0;return T0&&T0.state?(I0=T0.state.status)!==42&&I0!==69&&I0!==73&&I0!==91&&I0!==103&&I0!==f0&&I0!==666?p0(T0,u0):(T0.state=null,I0===f0?p0(T0,-3):0):u0},n0.deflateSetDictionary=function(T0,I0){var M0,N0,D0,O0,B0,z0,G0,F0,Q0=I0.length;if(!T0||!T0.state||(O0=(M0=T0.state).wrap)===2||O0===1&&M0.status!==42||M0.lookahead)return u0;for(O0===1&&(T0.adler=o0(T0.adler,I0,Q0,0)),M0.wrap=0,Q0>=M0.w_size&&(O0===0&&(m0(M0.head),M0.strstart=0,M0.block_start=0,M0.insert=0),F0=new i0.Buf8(M0.w_size),i0.arraySet(F0,I0,Q0-M0.w_size,M0.w_size,0),I0=F0,Q0=M0.w_size),B0=T0.avail_in,z0=T0.next_in,G0=T0.input,T0.avail_in=Q0,T0.next_in=0,T0.input=I0,w0(M0);M0.lookahead>=3;){for(N0=M0.strstart,D0=M0.lookahead-2;M0.ins_h=(M0.ins_h<<M0.hash_shift^M0.window[N0+3-1])&M0.hash_mask,M0.prev[N0&M0.w_mask]=M0.head[M0.ins_h],M0.head[M0.ins_h]=N0,N0++,--D0;);M0.strstart=N0,M0.lookahead=2,w0(M0)}return M0.strstart+=M0.lookahead,M0.block_start=M0.strstart,M0.insert=M0.lookahead,M0.lookahead=0,M0.match_length=M0.prev_length=2,M0.match_available=0,T0.next_in=z0,T0.input=G0,T0.avail_in=B0,M0.wrap=O0,0},n0.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r0,e0,n0){e0.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r0,e0,n0){e0.exports=function(a0,i0){var s0,o0,l0,c0,u0,d0,h0,f0,p0,A0,m0,x0,g0,y0,b0,E0,w0,v0,S0,k0,R0,j0,C0,$0,T0;s0=a0.state,o0=a0.next_in,$0=a0.input,l0=o0+(a0.avail_in-5),c0=a0.next_out,T0=a0.output,u0=c0-(i0-a0.avail_out),d0=c0+(a0.avail_out-257),h0=s0.dmax,f0=s0.wsize,p0=s0.whave,A0=s0.wnext,m0=s0.window,x0=s0.hold,g0=s0.bits,y0=s0.lencode,b0=s0.distcode,E0=(1<<s0.lenbits)-1,w0=(1<<s0.distbits)-1;e:do{g0<15&&(x0+=$0[o0++]<<g0,g0+=8,x0+=$0[o0++]<<g0,g0+=8),v0=y0[x0&E0];t:for(;;){if(x0>>>=S0=v0>>>24,g0-=S0,(S0=v0>>>16&255)==0)T0[c0++]=65535&v0;else{if(!(16&S0)){if(!(64&S0)){v0=y0[(65535&v0)+(x0&(1<<S0)-1)];continue t}if(32&S0){s0.mode=12;break e}a0.msg="invalid literal/length code",s0.mode=30;break e}k0=65535&v0,(S0&=15)&&(g0<S0&&(x0+=$0[o0++]<<g0,g0+=8),k0+=x0&(1<<S0)-1,x0>>>=S0,g0-=S0),g0<15&&(x0+=$0[o0++]<<g0,g0+=8,x0+=$0[o0++]<<g0,g0+=8),v0=b0[x0&w0];r:for(;;){if(x0>>>=S0=v0>>>24,g0-=S0,!(16&(S0=v0>>>16&255))){if(!(64&S0)){v0=b0[(65535&v0)+(x0&(1<<S0)-1)];continue r}a0.msg="invalid distance code",s0.mode=30;break e}
vendor: 9,745 bytes, line 753
753if(R0=65535&v0,g0<(S0&=15)&&(x0+=$0[o0++]<<g0,(g0+=8)<S0&&(x0+=$0[o0++]<<g0,g0+=8)),h0<(R0+=x0&(1<<S0)-1)){a0.msg="invalid distance too far back",s0.mode=30;break e}if(x0>>>=S0,g0-=S0,(S0=c0-u0)<R0){if(p0<(S0=R0-S0)&&s0.sane){a0.msg="invalid distance too far back",s0.mode=30;break e}if(C0=m0,(j0=0)===A0){if(j0+=f0-S0,S0<k0){for(k0-=S0;T0[c0++]=m0[j0++],--S0;);j0=c0-R0,C0=T0}}else if(A0<S0){if(j0+=f0+A0-S0,(S0-=A0)<k0){for(k0-=S0;T0[c0++]=m0[j0++],--S0;);if(j0=0,A0<k0){for(k0-=S0=A0;T0[c0++]=m0[j0++],--S0;);j0=c0-R0,C0=T0}}}else if(j0+=A0-S0,S0<k0){for(k0-=S0;T0[c0++]=m0[j0++],--S0;);j0=c0-R0,C0=T0}for(;2<k0;)T0[c0++]=C0[j0++],T0[c0++]=C0[j0++],T0[c0++]=C0[j0++],k0-=3;k0&&(T0[c0++]=C0[j0++],1<k0&&(T0[c0++]=C0[j0++]))}else{for(j0=c0-R0;T0[c0++]=T0[j0++],T0[c0++]=T0[j0++],T0[c0++]=T0[j0++],2<(k0-=3););k0&&(T0[c0++]=T0[j0++],1<k0&&(T0[c0++]=T0[j0++]))}break}}break}}while(o0<l0&&c0<d0);o0-=k0=g0>>3,x0&=(1<<(g0-=k0<<3))-1,a0.next_in=o0,a0.next_out=c0,a0.avail_in=o0<l0?l0-o0+5:5-(o0-l0),a0.avail_out=c0<d0?d0-c0+257:257-(c0-d0),s0.hold=x0,s0.bits=g0}},{}],49:[function(r0,e0,n0){var a0=r0("../utils/common"),i0=r0("./adler32"),s0=r0("./crc32"),o0=r0("./inffast"),l0=r0("./inftrees"),c0=-2;function u0(E0){return(E0>>>24&255)+(E0>>>8&65280)+((65280&E0)<<8)+((255&E0)<<24)}function d0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a0.Buf16(320),this.work=new a0.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h0(E0){var w0;return E0&&E0.state?(w0=E0.state,E0.total_in=E0.total_out=w0.total=0,E0.msg="",w0.wrap&&(E0.adler=1&w0.wrap),w0.mode=1,w0.last=0,w0.havedict=0,w0.dmax=32768,w0.head=null,w0.hold=0,w0.bits=0,w0.lencode=w0.lendyn=new a0.Buf32(852),w0.distcode=w0.distdyn=new a0.Buf32(592),w0.sane=1,w0.back=-1,0):c0}function f0(E0){var w0;return E0&&E0.state?((w0=E0.state).wsize=0,w0.whave=0,w0.wnext=0,h0(E0)):c0}function p0(E0,w0){var v0,S0;return E0&&E0.state?(S0=E0.state,w0<0?(v0=0,w0=-w0):(v0=1+(w0>>4),w0<48&&(w0&=15)),w0&&(w0<8||15<w0)?c0:(S0.window!==null&&S0.wbits!==w0&&(S0.window=null),S0.wrap=v0,S0.wbits=w0,f0(E0))):c0}function A0(E0,w0){var v0,S0;return E0?(S0=new d0,(E0.state=S0).window=null,(v0=p0(E0,w0))!==0&&(E0.state=null),v0):c0}var m0,x0,g0=!0;function y0(E0){if(g0){var w0;for(m0=new a0.Buf32(512),x0=new a0.Buf32(32),w0=0;w0<144;)E0.lens[w0++]=8;for(;w0<256;)E0.lens[w0++]=9;for(;w0<280;)E0.lens[w0++]=7;for(;w0<288;)E0.lens[w0++]=8;for(l0(1,E0.lens,0,288,m0,0,E0.work,{bits:9}),w0=0;w0<32;)E0.lens[w0++]=5;l0(2,E0.lens,0,32,x0,0,E0.work,{bits:5}),g0=!1}E0.lencode=m0,E0.lenbits=9,E0.distcode=x0,E0.distbits=5}function b0(E0,w0,v0,S0){var k0,R0=E0.state;return R0.window===null&&(R0.wsize=1<<R0.wbits,R0.wnext=0,R0.whave=0,R0.window=new a0.Buf8(R0.wsize)),S0>=R0.wsize?(a0.arraySet(R0.window,w0,v0-R0.wsize,R0.wsize,0),R0.wnext=0,R0.whave=R0.wsize):(S0<(k0=R0.wsize-R0.wnext)&&(k0=S0),a0.arraySet(R0.window,w0,v0-S0,k0,R0.wnext),(S0-=k0)?(a0.arraySet(R0.window,w0,v0-S0,S0,0),R0.wnext=S0,R0.whave=R0.wsize):(R0.wnext+=k0,R0.wnext===R0.wsize&&(R0.wnext=0),R0.whave<R0.wsize&&(R0.whave+=k0))),0}n0.inflateReset=f0,n0.inflateReset2=p0,n0.inflateResetKeep=h0,n0.inflateInit=function(E0){return A0(E0,15)},n0.inflateInit2=A0,n0.inflate=function(E0,w0){var v0,S0,k0,R0,j0,C0,$0,T0,I0,M0,N0,D0,O0,B0,z0,G0,F0,Q0,U0,q0,Rw,_w,J0,Cw,Ow=0,jw=new a0.Buf8(4),Nw=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E0||!E0.state||!E0.output||!E0.input&&E0.avail_in!==0)return c0;(v0=E0.state).mode===12&&(v0.mode=13),j0=E0.next_out,k0=E0.output,$0=E0.avail_out,R0=E0.next_in,S0=E0.input,C0=E0.avail_in,T0=v0.hold,I0=v0.bits,M0=C0,N0=$0,_w=0;e:for(;;)switch(v0.mode){case 1:if(v0.wrap===0){v0.mode=13;break}for(;I0<16;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(2&v0.wrap&&T0===35615){jw[v0.check=0]=255&T0,jw[1]=T0>>>8&255,v0.check=s0(v0.check,jw,2,0),I0=T0=0,v0.mode=2;break}if(v0.flags=0,v0.head&&(v0.head.done=!1),!(1&v0.wrap)||(((255&T0)<<8)+(T0>>8))%31){E0.msg="incorrect header check",v0.mode=30;break}if((15&T0)!=8){E0.msg="unknown compression method",v0.mode=30;break}if(I0-=4,Rw=8+(15&(T0>>>=4)),v0.wbits===0)v0.wbits=Rw;else if(Rw>v0.wbits){E0.msg="invalid window size",v0.mode=30;break}v0.dmax=1<<Rw,E0.adler=v0.check=1,v0.mode=512&T0?10:12,I0=T0=0;break;case 2:for(;I0<16;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(v0.flags=T0,(255&v0.flags)!=8){E0.msg="unknown compression method",v0.mode=30;break}if(57344&v0.flags){E0.msg="unknown header flags set",v0.mode=30;break}v0.head&&(v0.head.text=T0>>8&1),512&v0.flags&&(jw[0]=255&T0,jw[1]=T0>>>8&255,v0.check=s0(v0.check,jw,2,0)),I0=T0=0,v0.mode=3;case 3:for(;I0<32;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.head&&(v0.head.time=T0),512&v0.flags&&(jw[0]=255&T0,jw[1]=T0>>>8&255,jw[2]=T0>>>16&255,jw[3]=T0>>>24&255,v0.check=s0(v0.check,jw,4,0)),I0=T0=0,v0.mode=4;case 4:for(;I0<16;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.head&&(v0.head.xflags=255&T0,v0.head.os=T0>>8),512&v0.flags&&(jw[0]=255&T0,jw[1]=T0>>>8&255,v0.check=s0(v0.check,jw,2,0)),I0=T0=0,v0.mode=5;case 5:if(1024&v0.flags){for(;I0<16;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.length=T0,v0.head&&(v0.head.extra_len=T0),512&v0.flags&&(jw[0]=255&T0,jw[1]=T0>>>8&255,v0.check=s0(v0.check,jw,2,0)),I0=T0=0}else v0.head&&(v0.head.extra=null);v0.mode=6;case 6:if(1024&v0.flags&&(C0<(D0=v0.length)&&(D0=C0),D0&&(v0.head&&(Rw=v0.head.extra_len-v0.length,v0.head.extra||(v0.head.extra=new Array(v0.head.extra_len)),a0.arraySet(v0.head.extra,S0,R0,D0,Rw)),512&v0.flags&&(v0.check=s0(v0.check,S0,D0,R0)),C0-=D0,R0+=D0,v0.length-=D0),v0.length))break e;v0.length=0,v0.mode=7;case 7:if(2048&v0.flags){if(C0===0)break e;for(D0=0;Rw=S0[R0+D0++],v0.head&&Rw&&v0.length<65536&&(v0.head.name+=String.fromCharCode(Rw)),Rw&&D0<C0;);if(512&v0.flags&&(v0.check=s0(v0.check,S0,D0,R0)),C0-=D0,R0+=D0,Rw)break e}else v0.head&&(v0.head.name=null);v0.length=0,v0.mode=8;case 8:if(4096&v0.flags){if(C0===0)break e;for(D0=0;Rw=S0[R0+D0++],v0.head&&Rw&&v0.length<65536&&(v0.head.comment+=String.fromCharCode(Rw)),Rw&&D0<C0;);if(512&v0.flags&&(v0.check=s0(v0.check,S0,D0,R0)),C0-=D0,R0+=D0,Rw)break e}else v0.head&&(v0.head.comment=null);v0.mode=9;case 9:if(512&v0.flags){for(;I0<16;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(T0!==(65535&v0.check)){E0.msg="header crc mismatch",v0.mode=30;break}I0=T0=0}v0.head&&(v0.head.hcrc=v0.flags>>9&1,v0.head.done=!0),E0.adler=v0.check=0,v0.mode=12;break;case 10:for(;I0<32;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}E0.adler=v0.check=u0(T0),I0=T0=0,v0.mode=11;case 11:if(v0.havedict===0)return E0.next_out=j0,E0.avail_out=$0,E0.next_in=R0,E0.avail_in=C0,v0.hold=T0,v0.bits=I0,2;E0.adler=v0.check=1,v0.mode=12;case 12:if(w0===5||w0===6)break e;case 13:if(v0.last){T0>>>=7&I0,I0-=7&I0,v0.mode=27;break}for(;I0<3;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}switch(v0.last=1&T0,I0-=1,3&(T0>>>=1)){case 0:v0.mode=14;break;case 1:if(y0(v0),v0.mode=20,w0!==6)break;T0>>>=2,I0-=2;break e;case 2:v0.mode=17;break;case 3:E0.msg="invalid block type",v0.mode=30}T0>>>=2,I0-=2;break;case 14:for(T0>>>=7&I0,I0-=7&I0;I0<32;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if((65535&T0)!=(T0>>>16^65535)){E0.msg="invalid stored block lengths",v0.mode=30;break}if(v0.length=65535&T0,I0=T0=0,v0.mode=15,w0===6)break e;case 15:v0.mode=16;case 16:if(D0=v0.length){if(C0<D0&&(D0=C0),$0<D0&&(D0=$0),D0===0)break e;a0.arraySet(k0,S0,R0,D0,j0),C0-=D0,R0+=D0,$0-=D0,j0+=D0,v0.length-=D0;break}v0.mode=12;break;case 17:for(;I0<14;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(v0.nlen=257+(31&T0),T0>>>=5,I0-=5,v0.ndist=1+(31&T0),T0>>>=5,I0-=5,v0.ncode=4+(15&T0),T0>>>=4,I0-=4,286<v0.nlen||30<v0.ndist){E0.msg="too many length or distance symbols",v0.mode=30;break}v0.have=0,v0.mode=18;case 18:for(;v0.have<v0.ncode;){for(;I0<3;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.lens[Nw[v0.have++]]=7&T0,T0>>>=3,I0-=3}for(;v0.have<19;)v0.lens[Nw[v0.have++]]=0;if(v0.lencode=v0.lendyn,v0.lenbits=7,J0={bits:v0.lenbits},_w=l0(0,v0.lens,0,19,v0.lencode,0,v0.work,J0),v0.lenbits=J0.bits,_w){E0.msg="invalid code lengths set",v0.mode=30;break}v0.have=0,v0.mode=19;case 19:for(;v0.have<v0.nlen+v0.ndist;){for(;G0=(Ow=v0.lencode[T0&(1<<v0.lenbits)-1])>>>16&255,F0=65535&Ow,!((z0=Ow>>>24)<=I0);){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(F0<16)T0>>>=z0,I0-=z0,v0.lens[v0.have++]=F0;else{if(F0===16){for(Cw=z0+2;I0<Cw;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(T0>>>=z0,I0-=z0,v0.have===0){E0.msg="invalid bit length repeat",v0.mode=30;break}Rw=v0.lens[v0.have-1],D0=3+(3&T0),T0>>>=2,I0-=2}else if(F0===17){for(Cw=z0+3;I0<Cw;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}I0-=z0,Rw=0,D0=3+(7&(T0>>>=z0)),T0>>>=3,I0-=3}else{for(Cw=z0+7;I0<Cw;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}I0-=z0,Rw=0,D0=11+(127&(T0>>>=z0)),T0>>>=7,I0-=7}if(v0.have+D0>v0.nlen+v0.ndist){E0.msg="invalid bit length repeat",v0.mode=30;break}for(;D0--;)v0.lens[v0.have++]=Rw}}if(v0.mode===30)break;if(v0.lens[256]===0){E0.msg="invalid code -- missing end-of-block",v0.mode=30;break}if(v0.lenbits=9,J0={bits:v0.lenbits},_w=l0(1,v0.lens,0,v0.nlen,v0.lencode,0,v0.work,J0),v0.lenbits=J0.bits,_w){E0.msg="invalid literal/lengths set",v0.mode=30;break}if(v0.distbits=6,v0.distcode=v0.distdyn,J0={bits:v0.distbits},_w=l0(2,v0.lens,v0.nlen,v0.ndist,v0.distcode,0,v0.work,J0),v0.distbits=J0.bits,_w){E0.msg="invalid distances set",v0.mode=30;break}if(v0.mode=20,w0===6)break e;
vendor: 5,244 bytes, line 753
753case 20:v0.mode=21;case 21:if(6<=C0&&258<=$0){E0.next_out=j0,E0.avail_out=$0,E0.next_in=R0,E0.avail_in=C0,v0.hold=T0,v0.bits=I0,o0(E0,N0),j0=E0.next_out,k0=E0.output,$0=E0.avail_out,R0=E0.next_in,S0=E0.input,C0=E0.avail_in,T0=v0.hold,I0=v0.bits,v0.mode===12&&(v0.back=-1);break}for(v0.back=0;G0=(Ow=v0.lencode[T0&(1<<v0.lenbits)-1])>>>16&255,F0=65535&Ow,!((z0=Ow>>>24)<=I0);){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(G0&&!(240&G0)){for(Q0=z0,U0=G0,q0=F0;G0=(Ow=v0.lencode[q0+((T0&(1<<Q0+U0)-1)>>Q0)])>>>16&255,F0=65535&Ow,!(Q0+(z0=Ow>>>24)<=I0);){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}T0>>>=Q0,I0-=Q0,v0.back+=Q0}if(T0>>>=z0,I0-=z0,v0.back+=z0,v0.length=F0,G0===0){v0.mode=26;break}if(32&G0){v0.back=-1,v0.mode=12;break}if(64&G0){E0.msg="invalid literal/length code",v0.mode=30;break}v0.extra=15&G0,v0.mode=22;case 22:if(v0.extra){for(Cw=v0.extra;I0<Cw;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.length+=T0&(1<<v0.extra)-1,T0>>>=v0.extra,I0-=v0.extra,v0.back+=v0.extra}v0.was=v0.length,v0.mode=23;case 23:for(;G0=(Ow=v0.distcode[T0&(1<<v0.distbits)-1])>>>16&255,F0=65535&Ow,!((z0=Ow>>>24)<=I0);){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(!(240&G0)){for(Q0=z0,U0=G0,q0=F0;G0=(Ow=v0.distcode[q0+((T0&(1<<Q0+U0)-1)>>Q0)])>>>16&255,F0=65535&Ow,!(Q0+(z0=Ow>>>24)<=I0);){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}T0>>>=Q0,I0-=Q0,v0.back+=Q0}if(T0>>>=z0,I0-=z0,v0.back+=z0,64&G0){E0.msg="invalid distance code",v0.mode=30;break}v0.offset=F0,v0.extra=15&G0,v0.mode=24;case 24:if(v0.extra){for(Cw=v0.extra;I0<Cw;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}v0.offset+=T0&(1<<v0.extra)-1,T0>>>=v0.extra,I0-=v0.extra,v0.back+=v0.extra}if(v0.offset>v0.dmax){E0.msg="invalid distance too far back",v0.mode=30;break}v0.mode=25;case 25:if($0===0)break e;if(D0=N0-$0,v0.offset>D0){if((D0=v0.offset-D0)>v0.whave&&v0.sane){E0.msg="invalid distance too far back",v0.mode=30;break}O0=D0>v0.wnext?(D0-=v0.wnext,v0.wsize-D0):v0.wnext-D0,D0>v0.length&&(D0=v0.length),B0=v0.window}else B0=k0,O0=j0-v0.offset,D0=v0.length;for($0<D0&&(D0=$0),$0-=D0,v0.length-=D0;k0[j0++]=B0[O0++],--D0;);v0.length===0&&(v0.mode=21);break;case 26:if($0===0)break e;k0[j0++]=v0.length,$0--,v0.mode=21;break;case 27:if(v0.wrap){for(;I0<32;){if(C0===0)break e;C0--,T0|=S0[R0++]<<I0,I0+=8}if(N0-=$0,E0.total_out+=N0,v0.total+=N0,N0&&(E0.adler=v0.check=v0.flags?s0(v0.check,k0,N0,j0-N0):i0(v0.check,k0,N0,j0-N0)),N0=$0,(v0.flags?T0:u0(T0))!==v0.check){E0.msg="incorrect data check",v0.mode=30;break}I0=T0=0}v0.mode=28;case 28:if(v0.wrap&&v0.flags){for(;I0<32;){if(C0===0)break e;C0--,T0+=S0[R0++]<<I0,I0+=8}if(T0!==(4294967295&v0.total)){E0.msg="incorrect length check",v0.mode=30;break}I0=T0=0}v0.mode=29;case 29:_w=1;break e;case 30:_w=-3;break e;case 31:return-4;default:return c0}return E0.next_out=j0,E0.avail_out=$0,E0.next_in=R0,E0.avail_in=C0,v0.hold=T0,v0.bits=I0,(v0.wsize||N0!==E0.avail_out&&v0.mode<30&&(v0.mode<27||w0!==4))&&b0(E0,E0.output,E0.next_out,N0-E0.avail_out)?(v0.mode=31,-4):(M0-=E0.avail_in,N0-=E0.avail_out,E0.total_in+=M0,E0.total_out+=N0,v0.total+=N0,v0.wrap&&N0&&(E0.adler=v0.check=v0.flags?s0(v0.check,k0,N0,E0.next_out-N0):i0(v0.check,k0,N0,E0.next_out-N0)),E0.data_type=v0.bits+(v0.last?64:0)+(v0.mode===12?128:0)+(v0.mode===20||v0.mode===15?256:0),(M0==0&&N0===0||w0===4)&&_w===0&&(_w=-5),_w)},n0.inflateEnd=function(E0){if(!E0||!E0.state)return c0;var w0=E0.state;return w0.window&&(w0.window=null),E0.state=null,0},n0.inflateGetHeader=function(E0,w0){var v0;return E0&&E0.state&&2&(v0=E0.state).wrap?((v0.head=w0).done=!1,0):c0},n0.inflateSetDictionary=function(E0,w0){var v0,S0=w0.length;return E0&&E0.state?(v0=E0.state).wrap!==0&&v0.mode!==11?c0:v0.mode===11&&i0(1,w0,S0,0)!==v0.check?-3:b0(E0,w0,S0,S0)?(v0.mode=31,-4):(v0.havedict=1,0):c0},n0.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r0,e0,n0){var a0=r0("../utils/common"),i0=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s0=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o0=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l0=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e0.exports=function(c0,u0,d0,h0,f0,p0,A0,m0){var x0,g0,y0,b0,E0,w0,v0,S0,k0,R0=m0.bits,j0=0,C0=0,$0=0,T0=0,I0=0,M0=0,N0=0,D0=0,O0=0,B0=0,z0=null,G0=0,F0=new a0.Buf16(16),Q0=new a0.Buf16(16),U0=null,q0=0;for(j0=0;j0<=15;j0++)F0[j0]=0;for(C0=0;C0<h0;C0++)F0[u0[d0+C0]]++;for(I0=R0,T0=15;1<=T0&&F0[T0]===0;T0--);if(T0<I0&&(I0=T0),T0===0)return f0[p0++]=20971520,f0[p0++]=20971520,m0.bits=1,0;for($0=1;$0<T0&&F0[$0]===0;$0++);for(I0<$0&&(I0=$0),j0=D0=1;j0<=15;j0++)if(D0<<=1,(D0-=F0[j0])<0)return-1;if(0<D0&&(c0===0||T0!==1))return-1;for(Q0[1]=0,j0=1;j0<15;j0++)Q0[j0+1]=Q0[j0]+F0[j0];for(C0=0;C0<h0;C0++)u0[d0+C0]!==0&&(A0[Q0[u0[d0+C0]]++]=C0);if(w0=c0===0?(z0=U0=A0,19):c0===1?(z0=i0,G0-=257,U0=s0,q0-=257,256):(z0=o0,U0=l0,-1),j0=$0,E0=p0,N0=C0=B0=0,y0=-1,b0=(O0=1<<(M0=I0))-1,c0===1&&852<O0||c0===2&&592<O0)return 1;for(;;){for(v0=j0-N0,k0=A0[C0]<w0?(S0=0,A0[C0]):A0[C0]>
vendor: 9,131 bytes, line 753
753w0?(S0=U0[q0+A0[C0]],z0[G0+A0[C0]]):(S0=96,0),x0=1<<j0-N0,$0=g0=1<<M0;f0[E0+(B0>>N0)+(g0-=x0)]=v0<<24|S0<<16|k0,g0!==0;);for(x0=1<<j0-1;B0&x0;)x0>>=1;if(x0!==0?(B0&=x0-1,B0+=x0):B0=0,C0++,--F0[j0]==0){if(j0===T0)break;j0=u0[d0+A0[C0]]}if(I0<j0&&(B0&b0)!==y0){for(N0===0&&(N0=I0),E0+=$0,D0=1<<(M0=j0-N0);M0+N0<T0&&!((D0-=F0[M0+N0])<=0);)M0++,D0<<=1;if(O0+=1<<M0,c0===1&&852<O0||c0===2&&592<O0)return 1;f0[y0=B0&b0]=I0<<24|M0<<16|E0-p0}}return B0!==0&&(f0[E0+B0]=j0-N0<<24|64<<16),m0.bits=I0,0}},{"../utils/common":41}],51:[function(r0,e0,n0){e0.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r0,e0,n0){var a0=r0("../utils/common");function i0(U0){for(var q0=U0.length;0<=--q0;)U0[q0]=0}var s0=256,o0=286,l0=30,c0=15,u0=[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],d0=[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],h0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p0=new Array(576);i0(p0);var A0=new Array(60);i0(A0);var m0=new Array(512);i0(m0);var x0=new Array(256);i0(x0);var g0=new Array(29);i0(g0);var y0,b0,E0,w0=new Array(l0);function v0(U0,q0,Rw,_w,J0){this.static_tree=U0,this.extra_bits=q0,this.extra_base=Rw,this.elems=_w,this.max_length=J0,this.has_stree=U0&&U0.length}function S0(U0,q0){this.dyn_tree=U0,this.max_code=0,this.stat_desc=q0}function k0(U0){return U0<256?m0[U0]:m0[256+(U0>>>7)]}function R0(U0,q0){U0.pending_buf[U0.pending++]=255&q0,U0.pending_buf[U0.pending++]=q0>>>8&255}function j0(U0,q0,Rw){U0.bi_valid>16-Rw?(U0.bi_buf|=q0<<U0.bi_valid&65535,R0(U0,U0.bi_buf),U0.bi_buf=q0>>16-U0.bi_valid,U0.bi_valid+=Rw-16):(U0.bi_buf|=q0<<U0.bi_valid&65535,U0.bi_valid+=Rw)}function C0(U0,q0,Rw){j0(U0,Rw[2*q0],Rw[2*q0+1])}function $0(U0,q0){for(var Rw=0;Rw|=1&U0,U0>>>=1,Rw<<=1,0<--q0;);return Rw>>>1}function T0(U0,q0,Rw){var _w,J0,Cw=new Array(16),Ow=0;for(_w=1;_w<=c0;_w++)Cw[_w]=Ow=Ow+Rw[_w-1]<<1;for(J0=0;J0<=q0;J0++){var jw=U0[2*J0+1];jw!==0&&(U0[2*J0]=$0(Cw[jw]++,jw))}}function I0(U0){var q0;for(q0=0;q0<o0;q0++)U0.dyn_ltree[2*q0]=0;for(q0=0;q0<l0;q0++)U0.dyn_dtree[2*q0]=0;for(q0=0;q0<19;q0++)U0.bl_tree[2*q0]=0;U0.dyn_ltree[512]=1,U0.opt_len=U0.static_len=0,U0.last_lit=U0.matches=0}function M0(U0){8<U0.bi_valid?R0(U0,U0.bi_buf):0<U0.bi_valid&&(U0.pending_buf[U0.pending++]=U0.bi_buf),U0.bi_buf=0,U0.bi_valid=0}function N0(U0,q0,Rw,_w){var J0=2*q0,Cw=2*Rw;return U0[J0]<U0[Cw]||U0[J0]===U0[Cw]&&_w[q0]<=_w[Rw]}function D0(U0,q0,Rw){for(var _w=U0.heap[Rw],J0=Rw<<1;J0<=U0.heap_len&&(J0<U0.heap_len&&N0(q0,U0.heap[J0+1],U0.heap[J0],U0.depth)&&J0++,!N0(q0,_w,U0.heap[J0],U0.depth));)U0.heap[Rw]=U0.heap[J0],Rw=J0,J0<<=1;U0.heap[Rw]=_w}function O0(U0,q0,Rw){var _w,J0,Cw,Ow,jw=0;if(U0.last_lit!==0)for(;_w=U0.pending_buf[U0.d_buf+2*jw]<<8|U0.pending_buf[U0.d_buf+2*jw+1],J0=U0.pending_buf[U0.l_buf+jw],jw++,_w===0?C0(U0,J0,q0):(C0(U0,(Cw=x0[J0])+s0+1,q0),(Ow=u0[Cw])!==0&&j0(U0,J0-=g0[Cw],Ow),C0(U0,Cw=k0(--_w),Rw),(Ow=d0[Cw])!==0&&j0(U0,_w-=w0[Cw],Ow)),jw<U0.last_lit;);C0(U0,256,q0)}function B0(U0,q0){var Rw,_w,J0,Cw=q0.dyn_tree,Ow=q0.stat_desc.static_tree,jw=q0.stat_desc.has_stree,Nw=q0.stat_desc.elems,xw=-1;for(U0.heap_len=0,U0.heap_max=573,Rw=0;Rw<Nw;Rw++)Cw[2*Rw]!==0?(U0.heap[++U0.heap_len]=xw=Rw,U0.depth[Rw]=0):Cw[2*Rw+1]=0;for(;U0.heap_len<2;)Cw[2*(J0=U0.heap[++U0.heap_len]=xw<2?++xw:0)]=1,U0.depth[J0]=0,U0.opt_len--,jw&&(U0.static_len-=Ow[2*J0+1]);for(q0.max_code=xw,Rw=U0.heap_len>>1;1<=Rw;Rw--)D0(U0,Cw,Rw);for(J0=Nw;Rw=U0.heap[1],U0.heap[1]=U0.heap[U0.heap_len--],D0(U0,Cw,1),_w=U0.heap[1],U0.heap[--U0.heap_max]=Rw,U0.heap[--U0.heap_max]=_w,Cw[2*J0]=Cw[2*Rw]+Cw[2*_w],U0.depth[J0]=(U0.depth[Rw]>=U0.depth[_w]?U0.depth[Rw]:U0.depth[_w])+1,Cw[2*Rw+1]=Cw[2*_w+1]=J0,U0.heap[1]=J0++,D0(U0,Cw,1),2<=U0.heap_len;);U0.heap[--U0.heap_max]=U0.heap[1],function(X0,Lw){var Hw,Ww,r1,Yw,l1,p1,Pw=Lw.dyn_tree,Qw=Lw.max_code,Xw=Lw.stat_desc.static_tree,f1=Lw.stat_desc.has_stree,u1=Lw.stat_desc.extra_bits,W0=Lw.stat_desc.extra_base,P0=Lw.stat_desc.max_length,L0=0;for(Yw=0;Yw<=c0;Yw++)X0.bl_count[Yw]=0;for(Pw[2*X0.heap[X0.heap_max]+1]=0,Hw=X0.heap_max+1;Hw<573;Hw++)P0<(Yw=Pw[2*Pw[2*(Ww=X0.heap[Hw])+1]+1]+1)&&(Yw=P0,L0++),Pw[2*Ww+1]=Yw,Qw<Ww||(X0.bl_count[Yw]++,l1=0,W0<=Ww&&(l1=u1[Ww-W0]),p1=Pw[2*Ww],X0.opt_len+=p1*(Yw+l1),f1&&(X0.static_len+=p1*(Xw[2*Ww+1]+l1)));if(L0!==0){do{for(Yw=P0-1;X0.bl_count[Yw]===0;)Yw--;X0.bl_count[Yw]--,X0.bl_count[Yw+1]+=2,X0.bl_count[P0]--,L0-=2}while(0<L0);for(Yw=P0;Yw!==0;Yw--)for(Ww=X0.bl_count[Yw];Ww!==0;)Qw<(r1=X0.heap[--Hw])||(Pw[2*r1+1]!==Yw&&(X0.opt_len+=(Yw-Pw[2*r1+1])*Pw[2*r1],Pw[2*r1+1]=Yw),Ww--)}}(U0,q0),T0(Cw,xw,U0.bl_count)}function z0(U0,q0,Rw){var _w,J0,Cw=-1,Ow=q0[1],jw=0,Nw=7,xw=4;for(Ow===0&&(Nw=138,xw=3),q0[2*(Rw+1)+1]=65535,_w=0;_w<=Rw;_w++)J0=Ow,Ow=q0[2*(_w+1)+1],++jw<Nw&&J0===Ow||(jw<xw?U0.bl_tree[2*J0]+=jw:J0!==0?(J0!==Cw&&U0.bl_tree[2*J0]++,U0.bl_tree[32]++):jw<=10?U0.bl_tree[34]++:U0.bl_tree[36]++,Cw=J0,xw=(jw=0)===Ow?(Nw=138,3):J0===Ow?(Nw=6,3):(Nw=7,4))}function G0(U0,q0,Rw){var _w,J0,Cw=-1,Ow=q0[1],jw=0,Nw=7,xw=4;for(Ow===0&&(Nw=138,xw=3),_w=0;_w<=Rw;_w++)if(J0=Ow,Ow=q0[2*(_w+1)+1],!(++jw<Nw&&J0===Ow)){if(jw<xw)for(;C0(U0,J0,U0.bl_tree),--jw!=0;);else J0!==0?(J0!==Cw&&(C0(U0,J0,U0.bl_tree),jw--),C0(U0,16,U0.bl_tree),j0(U0,jw-3,2)):jw<=10?(C0(U0,17,U0.bl_tree),j0(U0,jw-3,3)):(C0(U0,18,U0.bl_tree),j0(U0,jw-11,7));Cw=J0,xw=(jw=0)===Ow?(Nw=138,3):J0===Ow?(Nw=6,3):(Nw=7,4)}}i0(w0);var F0=!1;function Q0(U0,q0,Rw,_w){j0(U0,0+(_w?1:0),3),function(J0,Cw,Ow){M0(J0),R0(J0,Ow),R0(J0,~Ow),a0.arraySet(J0.pending_buf,J0.window,Cw,Ow,J0.pending),J0.pending+=Ow}(U0,q0,Rw)}n0._tr_init=function(U0){F0||(function(){var q0,Rw,_w,J0,Cw,Ow=new Array(16);for(J0=_w=0;J0<28;J0++)for(g0[J0]=_w,q0=0;q0<1<<u0[J0];q0++)x0[_w++]=J0;for(x0[_w-1]=J0,J0=Cw=0;J0<16;J0++)for(w0[J0]=Cw,q0=0;q0<1<<d0[J0];q0++)m0[Cw++]=J0;for(Cw>>=7;J0<l0;J0++)for(w0[J0]=Cw<<7,q0=0;q0<1<<d0[J0]-7;q0++)m0[256+Cw++]=J0;for(Rw=0;Rw<=c0;Rw++)Ow[Rw]=0;for(q0=0;q0<=143;)p0[2*q0+1]=8,q0++,Ow[8]++;for(;q0<=255;)p0[2*q0+1]=9,q0++,Ow[9]++;for(;q0<=279;)p0[2*q0+1]=7,q0++,Ow[7]++;for(;q0<=287;)p0[2*q0+1]=8,q0++,Ow[8]++;for(T0(p0,287,Ow),q0=0;q0<l0;q0++)A0[2*q0+1]=5,A0[2*q0]=$0(q0,5);y0=new v0(p0,u0,257,o0,c0),b0=new v0(A0,d0,0,l0,c0),E0=new v0(new Array(0),h0,0,19,7)}(),F0=!0),U0.l_desc=new S0(U0.dyn_ltree,y0),U0.d_desc=new S0(U0.dyn_dtree,b0),U0.bl_desc=new S0(U0.bl_tree,E0),U0.bi_buf=0,U0.bi_valid=0,I0(U0)},n0._tr_stored_block=Q0,n0._tr_flush_block=function(U0,q0,Rw,_w){var J0,Cw,Ow=0;0<U0.level?(U0.strm.data_type===2&&(U0.strm.data_type=function(jw){var Nw,xw=4093624447;for(Nw=0;Nw<=31;Nw++,xw>>>=1)if(1&xw&&jw.dyn_ltree[2*Nw]!==0)return 0;if(jw.dyn_ltree[18]!==0||jw.dyn_ltree[20]!==0||jw.dyn_ltree[26]!==0)return 1;for(Nw=32;Nw<s0;Nw++)if(jw.dyn_ltree[2*Nw]!==0)return 1;return 0}(U0)),B0(U0,U0.l_desc),B0(U0,U0.d_desc),Ow=function(jw){var Nw;for(z0(jw,jw.dyn_ltree,jw.l_desc.max_code),z0(jw,jw.dyn_dtree,jw.d_desc.max_code),B0(jw,jw.bl_desc),Nw=18;3<=Nw&&jw.bl_tree[2*f0[Nw]+1]===0;Nw--);return jw.opt_len+=3*(Nw+1)+5+5+4,Nw}(U0),J0=U0.opt_len+3+7>>>3,(Cw=U0.static_len+3+7>>>3)<=J0&&(J0=Cw)):J0=Cw=Rw+5,Rw+4<=J0&&q0!==-1?Q0(U0,q0,Rw,_w):U0.strategy===4||Cw===J0?(j0(U0,2+(_w?1:0),3),O0(U0,p0,A0)):(j0(U0,4+(_w?1:0),3),function(jw,Nw,xw,X0){var Lw;for(j0(jw,Nw-257,5),j0(jw,xw-1,5),j0(jw,X0-4,4),Lw=0;Lw<X0;Lw++)j0(jw,jw.bl_tree[2*f0[Lw]+1],3);G0(jw,jw.dyn_ltree,Nw-1),G0(jw,jw.dyn_dtree,xw-1)}(U0,U0.l_desc.max_code+1,U0.d_desc.max_code+1,Ow+1),O0(U0,U0.dyn_ltree,U0.dyn_dtree)),I0(U0),_w&&M0(U0)},n0._tr_tally=function(U0,q0,Rw){return U0.pending_buf[U0.d_buf+2*U0.last_lit]=q0>>>8&255,U0.pending_buf[U0.d_buf+2*U0.last_lit+1]=255&q0,U0.pending_buf[U0.l_buf+U0.last_lit]=255&Rw,U0.last_lit++,q0===0?U0.dyn_ltree[2*Rw]++:(U0.matches++,q0--,U0.dyn_ltree[2*(x0[Rw]+s0+1)]++,U0.dyn_dtree[2*k0(q0)]++),U0.last_lit===U0.lit_bufsize-1},n0._tr_align=function(U0){j0(U0,2,3),C0(U0,256,p0),function(q0){q0.bi_valid===16?(R0(q0,q0.bi_buf),q0.bi_buf=0,q0.bi_valid=0):8<=q0.bi_valid&&(q0.pending_buf[q0.pending++]=255&q0.bi_buf,q0.bi_buf>>=8,q0.bi_valid-=8)}(U0)}},{"../utils/common":41}],53:[function(r0,e0,n0){e0.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r0,e0,n0){(function(a0){(function(i0){if(!i0.setImmediate){var s0,o0,l0,c0,u0=1,d0={},h0=!1,f0=i0.document,p0=Object.getPrototypeOf&&Object.getPrototypeOf(i0);p0=p0&&p0.setTimeout?p0:i0,s0={}.toString.call(i0.process)==="[object process]"?function(g0){process.nextTick(function(){m0(g0)})}:function(){if(i0.postMessage&&!i0.importScripts){var g0=!0,y0=i0.onmessage;return i0.onmessage=function(){g0=!1},i0.postMessage("","*"),i0.onmessage=y0,g0}}()?(c0="setImmediate$"+Math.random()+"$",i0.addEventListener?i0.addEventListener("message",x0,!1):i0.attachEvent("onmessage",x0),function(g0){i0.postMessage(c0+g0,"*")}):i0.MessageChannel?((l0=new MessageChannel).port1.onmessage=function(g0){m
7530(g0.data)},function(g0){l0.port2.postMessage(g0)}):f0&&"onreadystatechange"in f0.createElement("script")?(o0=f0.documentElement,function(g0){var y0=f0.createElement("script");y0.onreadystatechange=function(){m0(g0),y0.onreadystatechange=null,o0.removeChild(y0),y0=null},o0.appendChild(y0)}):function(g0){setTimeout(m0,0,g0)},p0.setImmediate=function(g0){typeof g0!="function"&&(g0=new Function(""+g0));for(var y0=new Array(arguments.length-1),b0=0;b0<y0.length;b0++)y0[b0]=arguments[b0+1];var E0={callback:g0,args:y0};return d0[u0]=E0,s0(u0),u0++},p0.clearImmediate=A0}function A0(g0){delete d0[g0]}function m0(g0){if(h0)setTimeout(m0,0,g0);else{var y0=d0[g0];if(y0){h0=!0;try{(function(b0){var E0=b0.callback,w0=b0.args;switch(w0.length){case 0:E0();break;case 1:E0(w0[0]);break;case 2:E0(w0[0],w0[1]);break;case 3:E0(w0[0],w0[1],w0[2]);break;default:E0.apply(void 0,w0)}})(y0)}finally{A0(g0),h0=!1}}}}function x0(g0){g0.source===i0&&typeof g0.data=="string"&&g0.data.indexOf(c0)===0&&m0(+g0.data.slice(c0.length))}})(typeof self>"u"?a0===void 0?this:a0:self)}).call(this,e!==void 0?e:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10);var i=t(r.exports);class A extends Error{constructor(){super("End-Of-Stream"),this.name="EndOfStreamError"}}class s extends Error{constructor(e0="The operation was aborted"){super(e0),this.name="AbortError"}}class o{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e0,n0=!1){const a0=await this.read(e0,n0);return this.peekQueue.push(e0.subarray(0,a0)),a0}async read(e0,n0=!1){if(e0.length===0)return 0;let a0=this.readFromPeekBuffer(e0);if(this.endOfStream||(a0+=await this.readRemainderFromStream(e0.subarray(a0),n0)),a0===0&&!n0)throw new A;return a0}readFromPeekBuffer(e0){let n0=e0.length,a0=0;for(;this.peekQueue.length>0&&n0>0;){const i0=this.peekQueue.pop();if(!i0)throw new Error("peekData should be defined");const s0=Math.min(i0.length,n0);e0.set(i0.subarray(0,s0),a0),a0+=s0,n0-=s0,s0<i0.length&&this.peekQueue.push(i0.subarray(s0))}return a0}async readRemainderFromStream(e0,n0){let a0=0;for(;a0<e0.length&&!this.endOfStream;){if(this.interrupted)throw new s;const i0=await this.readFromStream(e0.subarray(a0),n0);if(i0===0)break;a0+=i0}if(!n0&&a0<e0.length)throw new A;return a0}}class l extends o{constructor(e0){super(),this.reader=e0}async abort(){return this.close()}async close(){this.reader.releaseLock()}}class c extends l{async readFromStream(e0,n0){if(e0.length===0)return 0;const a0=await this.reader.read(new Uint8Array(e0.length),{min:n0?void 0:e0.length});return a0.done&&(this.endOfStream=a0.done),a0.value?(e0.set(a0.value),a0.value.length):0}}class u extends o{constructor(e0){super(),this.reader=e0,this.buffer=null}writeChunk(e0,n0){const a0=Math.min(n0.length,e0.length);return e0.set(n0.subarray(0,a0)),a0<n0.length?this.buffer=n0.subarray(a0):this.buffer=null,a0}async readFromStream(e0,n0){if(e0.length===0)return 0;let a0=0;for(this.buffer&&(a0+=this.writeChunk(e0,this.buffer));a0<e0.length&&!this.endOfStream;){const i0=await this.reader.read();if(i0.done){this.endOfStream=!0;break}i0.value&&(a0+=this.writeChunk(e0.subarray(a0),i0.value))}if(!n0&&a0===0&&this.endOfStream)throw new A;return a0}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}class d{constructor(e0){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e0==null?void 0:e0.onClose,e0!=null&&e0.abortSignal&&e0.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e0,n0=this.position){const a0=new Uint8Array(e0.len);if(await this.readBuffer(a0,{position:n0})<e0.len)throw new A;return e0.get(a0,0)}async peekToken(e0,n0=this.position){const a0=new Uint8Array(e0.len);if(await this.peekBuffer(a0,{position:n0})<e0.len)throw new A;return e0.get(a0,0)}async readNumber(e0){if(await this.readBuffer(this.numBuffer,{length:e0.len})<e0.len)throw new A;return e0.get(this.numBuffer,0)}async peekNumber(e0){if(await this.peekBuffer(this.numBuffer,{length:e0.len})<e0.len)throw new A;return e0.get(this.numBuffer,0)}
753async ignore(e0){if(this.fileInfo.size!==void 0){const n0=this.fileInfo.size-this.position;if(e0>n0)return this.position+=n0,n0}return this.position+=e0,e0}async close(){var e0;await this.abort(),await((e0=this.onClose)==null?void 0:e0.call(this))}normalizeOptions(e0,n0){if(!this.supportsRandomAccess()&&n0&&n0.position!==void 0&&n0.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e0.length,position:this.position,...n0}}abort(){return Promise.resolve()}}class h extends d{constructor(e0,n0){super(n0),this.streamReader=e0,this.fileInfo=(n0==null?void 0:n0.fileInfo)??{}}async readBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0),i0=a0.position-this.position;if(i0>0)return await this.ignore(i0),this.readBuffer(e0,n0);if(i0<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(a0.length===0)return 0;const s0=await this.streamReader.read(e0.subarray(0,a0.length),a0.mayBeLess);if(this.position+=s0,(!n0||!n0.mayBeLess)&&s0<a0.length)throw new A;return s0}async peekBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0);let i0=0;if(a0.position){const s0=a0.position-this.position;if(s0>0){const o0=new Uint8Array(a0.length+s0);return i0=await this.peekBuffer(o0,{mayBeLess:a0.mayBeLess}),e0.set(o0.subarray(s0)),i0-s0}if(s0<0)throw new Error("Cannot peek from a negative offset in a stream")}if(a0.length>0){try{i0=await this.streamReader.peek(e0.subarray(0,a0.length),a0.mayBeLess)}catch(s0){if(n0!=null&&n0.mayBeLess&&s0 instanceof A)return 0;throw s0}if(!a0.mayBeLess&&i0<a0.length)throw new A}return i0}async ignore(e0){const n0=Math.min(256e3,e0),a0=new Uint8Array(n0);let i0=0;for(;i0<e0;){const s0=e0-i0,o0=await this.readBuffer(a0,{length:Math.min(n0,s0)});if(o0<0)return o0;i0+=o0}return i0}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}class p extends d{constructor(e0,n0){super(n0),this.uint8Array=e0,this.fileInfo={...(n0==null?void 0:n0.fileInfo)??{},size:e0.length}}async readBuffer(e0,n0){n0!=null&&n0.position&&(this.position=n0.position);const a0=await this.peekBuffer(e0,n0);return this.position+=a0,a0}async peekBuffer(e0,n0){const a0=this.normalizeOptions(e0,n0),i0=Math.min(this.uint8Array.length-a0.position,a0.length);if(!a0.mayBeLess&&i0<a0.length)throw new A;return e0.set(this.uint8Array.subarray(a0.position,a0.position+i0)),i0}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e0){this.position=e0}}function f(r0,e0){const n0=function(s0){try{const o0=s0.getReader({mode:"byob"});return o0 instanceof ReadableStreamDefaultReader?new u(o0):new c(o0)}catch(o0){if(o0 instanceof TypeError)return new u(s0.getReader());throw o0}}(r0),a0=e0??{},i0=a0.onClose;return a0.onClose=async()=>{if(await n0.close(),i0)return i0()},new h(n0,a0)}function g(r0,e0){return new p(r0,e0)}var m=function(r0,e0,n0,a0,i0){var s0,o0,l0=8*i0-a0-1,c0=(1<<l0)-1,u0=c0>>1,d0=-7,h0=n0?i0-1:0,f0=n0?-1:1,p0=r0[e0+h0];for(h0+=f0,s0=p0&(1<<-d0)-1,p0>>=-d0,d0+=l0;d0>0;s0=256*s0+r0[e0+h0],h0+=f0,d0-=8);for(o0=s0&(1<<-d0)-1,s0>>=-d0,d0+=a0;d0>0;o0=256*o0+r0[e0+h0],h0+=f0,d0-=8);if(s0===0)s0=1-u0;else{if(s0===c0)return o0?NaN:1/0*(p0?-1:1);o0+=Math.pow(2,a0),s0-=u0}return(p0?-1:1)*o0*Math.pow(2,s0-a0)},w=function(r0,e0,n0,a0,i0,s0){var o0,l0,c0,u0=8*s0-i0-1,d0=(1<<u0)-1,h0=d0>>1,f0=i0===23?Math.pow(2,-24)-Math.pow(2,-77):0,p0=a0?0:s0-1,A0=a0?1:-1,m0=e0<0||e0===0&&1/e0<0?1:0;for(e0=Math.abs(e0),isNaN(e0)||e0===1/0?(l0=isNaN(e0)?1:0,o0=d0):(o0=Math.floor(Math.log(e0)/Math.LN2),e0*(c0=Math.pow(2,-o0))<1&&(o0--,c0*=2),(e0+=o0+h0>=1?f0/c0:f0*Math.pow(2,1-h0))*c0>=2&&(o0++,c0/=2),o0+h0>=d0?(l0=0,o0=d0):o0+h0>=1?(l0=(e0*c0-1)*Math.pow(2,i0),o0+=h0):(l0=e0*Math.pow(2,h0-1)*Math.pow(2,i0),o0=0));i0>=8;r0[n0+p0]=255&l0,p0+=A0,l0/=256,i0-=8);for(o0=o0<<i0|l0,u0+=i0;u0>0;r0[n0+p0]=255&o0,p0+=A0,o0/=256,u0-=8);r0[n0+p0-A0]|=128*m0};function b(r0){return new DataView(r0.buffer,r0.byteOffset)}const E={len:1,get:(r0,e0)=>b(r0).getUint8(e0),put:(r0,e0,n0)=>(b(r0).setUint8(e0,n0),e0+1)},y={len:2,get:(r0,e0)=>b(r0).getUint16(e0,!0),put:(r0,e0,n0)=>(b(r0).setUint16(e0,n0,!0),e0+2)},k={len:2,get:(r0,e0)=>b(r0).getUint16(e0),put:(r0,e0,n0)=>(b(r0).setUint16(e0,n0),e0+2)},v={len:3,get(r0,e0){const n0=b(r0);return n0.getUint8(e0)+(n0.getUint16(e0+1,!0)<<8)},put(r0,e0,n0){const a0=b(r0);return a0.setUint8(e0,255&n0),a0.setUint16(e0+1,n0>>8,!0),e0+3}},S={len:3,get(r0,e0){const n0=b(r0);return(n0.getUint16(e0)<<8)+n0.getUint8(e0+2)},put(r0,e0,n0){const a0=b(r0);return a0.setUint16(e0,n0>>8),a0.setUint8(e0+2,255&n0),e0+3}},I={len:4,get:(r0,e0)=>b(r0).getUint32(e0,!0),put:(r0,e0,n0)=>(b(r0).setUint32(e0,n0,!0),e0+4)},C={len:4,get:(r0,e0)=>b(r0).getUint32(e0),put:(r0,e0,n0)=>(b(r0).setUint32(e0,n0),e0+4)},x={len:1,get:(r0,e0)=>b(r0).getInt8(e0),put:(r0,e0,n0)=>(b(r0).setInt8(e0,n0),e0+1)},T={len:2,get:(r0,e0)=>b(r0).getInt16(e0),put:(r0,e0,n0)=>(b(r0).setInt16(e0,n0),e0+2)},B={len:2,get:(r0,e0)=>b(r0).getInt16(e0,!0),put:(r0,e0,n0)=>(b(r0).setInt16(e0,n0,!0),e0+2)},U={len:3,get(r0,e0){const n0=v.get(r0,e0);return n0>8388607?n0-16777216:n0},put(r0,e0,n0){const a0=b(r0);return a0.setUint8(e0,255&n0),a0.setUint16(e0+1,n0>>8,!0),e0+3}},M={len:3,get(r0,e0){const n0=S.get(r0,e0);return n0>8388607?n0-16777216:n0},put(r0,e0,n0){const a0=b(r0);return a0.setUint16(e0,n0>>8),a0.setUint8(e0+2,255&n0),e0+3}},N={len:4,get:(r0,e0)=>b(r0).getInt32(e0),put:(r0,e0,n0)=>(b(r0).setInt32(e0,n0),e0+4)},D={len:4,get:(r0,e0)=>b(r0).getInt32(e0,!0),put:(r0,e0,n0)=>(b(r0).setInt32(e0,n0,!0),e0+4)},O={len:8,get:(r0,e0)=>b(r0).getBigUint64(e0,!0),put:(r0,e0,n0)=>(b(r0).setBigUint64(e0,n0,!0),e0+8)},L={len:8,get:(r0,e0)=>b(r0).getBigInt64(e0,!0),put:(r0,e0,n0)=>(b(r0).setBigInt64(e0,n0,!0),e0+8)},_={len:8,get:(r0,e0)=>b(r0).getBigUint64(e0),put:(r0,e0,n0)=>(b(r0).setBigUint64(e0,n0),e0+8)},R={len:8,get:(r0,e0)=>b(r0).getBigInt64(e0),put:(r0,e0,n0)=>(b(r0).setBigInt64(e0,n0),e0+8)},z={len:2,get(r0,e0){return m(r0,e0,!1,10,this.len)},put(r0,e0,n0){return w(r0,n0,e0,!1,10,this.len),e0+this.len}},F={len:2,get(r0,e0){return m(r0,e0,!0,10,this.len)},put(r0,e0,n0){return w(r0,n0,e0,!0,10,this.len),e0+this.len}},Q={len:4,get:(r0,e0)=>b(r0).getFloat32(e0),put:(r0,e0,n0)=>(b(r0).setFloat32(e0,n0),e0+4)},P={len:4,get:(r0,e0)=>b(r0).getFloat32(e0,!0),put:(r0,e0,n0)=>(b(r0).setFloat32(e0,n0,!0),e0+4)},V={len:8,get:(r0,e0)=>b(r0).getFloat64(e0),put:(r0,e0,n0)=>(b(r0).setFloat64(e0,n0),e0+8)},G={len:8,get:(r0,e0)=>b(r0).getFloat64(e0,!0),put:(r0,e0,n0)=>(b(r0).setFloat64(e0,n0,!0),e0+8)},j={len:10,get(r0,e0){return m(r0,e0,!1,63,this.len)},put(r0,e0,n0){return w(r0,n0,e0,!1,63,this.len),e0+this.len}},K={len:10,get(r0,e0){return m(r0,e0,!0,63,this.len)},put(r0,e0,n0){return w(r0,n0,e0,!0,63,this.len),e0+this.len}};class Y{constructor(e0){this.len=e0}get(e0,n0){return e0.subarray(n0,n0+this.len)}}class H{constructor(e0,n0){if(this.len=e0,n0&&n0.toLowerCase()==="windows-1252")this.decoder=H.decodeWindows1252;else{const a0=new TextDecoder(n0);this.decoder=i0=>a0.decode(i0)}}get(e0,n0=0){const a0=e0.subarray(n0,n0+this.len);return this.decoder(a0)}static decodeWindows1252(e0){let n0="";for(let a0=0;a0<e0.length;a0++){const i0=e0[a0];n0+=i0<128||i0>=160?String.fromCharCode(i0):H.win1252Map[i0-128]}return n0}}H.win1252Map="â¬ÂâÆââ¦â â¡Ëâ°Å â¹ÅÂŽÂÂâââââ¢ââËâ¢Å¡âºÅžŸ";var J=Object.freeze({__proto__:null,AnsiStringType:class extends H{constructor(r0){super(r0,"windows-1252")}},Float16_BE:z,Float16_LE:F,Float32_BE:Q,Float32_LE:P,Float64_BE:V,Float64_LE:G,Float80_BE:j,Float80_LE:K,INT16_BE:T,INT16_LE:B,INT24_BE:M,INT24_LE:U,INT32_BE:N,INT32_LE:D,INT64_BE:R,INT64_LE:L,INT8:x,IgnoreType:class{constructor(r0){this.len=r0}get(r0,e0){}},StringType:H,UINT16_BE:k,UINT16_LE:y,UINT24_BE:S,UINT24_LE:v,UINT32_BE:C,UINT32_LE:I,UINT64_BE:_,UINT64_LE:O,UINT8:E,Uint8ArrayType:Y}),W=Uint8Array,q=Uint16Array,Z=Int32Array,X=new W([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]),$=new W([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]),ee=new W([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),te=function(r0,e0){for(var n0=new q(31),a0=0;a0<31;++a0)n0[a0]=e0+=1<<r0[a0-1];var i0=new Z(n0[30]);for(a0=1;a0<30;++a0)for(var s0=n0[a0];s0<n0[a0+1];++s0)i0[s0]=s0-n0[a0]<<5|a0;return{b:n0,r:i0}},ne=te(X,2),ae=ne.b,re=ne.r;ae[28]=258,re[258]=28;for(var ie=te($,0).b,Ae=new q(32768),se=0;se<32768;++se){var oe=(43690&se)>>1|(21845&se)<<1;oe=(61680&(oe=(52428&oe)>>2|(13107&oe)<<2))>>4|(3855&oe)<<4,Ae[se]=((65280&oe)>>8|(255&oe)<<8)>>1}var le=function(r0,e0,n0){for(var a0=r0.length,i0=0,s0=new q(e0);i0<a0;
753++i0)r0[i0]&&++s0[r0[i0]-1];var o0,l0=new q(e0);for(i0=1;i0<e0;++i0)l0[i0]=l0[i0-1]+s0[i0-1]<<1;{o0=new q(1<<e0);var c0=15-e0;for(i0=0;i0<a0;++i0)if(r0[i0])for(var u0=i0<<4|r0[i0],d0=e0-r0[i0],h0=l0[r0[i0]-1]++<<d0,f0=h0|(1<<d0)-1;h0<=f0;++h0)o0[Ae[h0]>>c0]=u0}return o0},ce=new W(288);for(se=0;se<144;++se)ce[se]=8;for(se=144;se<256;++se)ce[se]=9;for(se=256;se<280;++se)ce[se]=7;for(se=280;se<288;++se)ce[se]=8;var ue=new W(32);for(se=0;se<32;++se)ue[se]=5;var de=le(ce,9),he=le(ue,5),pe=function(r0){for(var e0=r0[0],n0=1;n0<r0.length;++n0)r0[n0]>e0&&(e0=r0[n0]);return e0},fe=function(r0,e0,n0){var a0=e0/8|0;return(r0[a0]|r0[a0+1]<<8)>>(7&e0)&n0},ge=function(r0,e0){var n0=e0/8|0;return(r0[n0]|r0[n0+1]<<8|r0[n0+2]<<16)>>(7&e0)},me=function(r0){return(r0+7)/8|0},we=["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"],be=function(r0,e0,n0){var a0=new Error(e0||we[r0]);if(a0.code=r0,Error.captureStackTrace&&Error.captureStackTrace(a0,be),!n0)throw a0;return a0},Ee=function(r0,e0,n0,a0){var i0=r0.length;if(!i0||e0.f&&!e0.l)return n0||new W(0);var s0=!n0,o0=s0||e0.i!=2,l0=e0.i;s0&&(n0=new W(3*i0));var c0=function(Ow){var jw=n0.length;if(Ow>jw){var Nw=new W(Math.max(2*jw,Ow));Nw.set(n0),n0=Nw}},u0=e0.f||0,d0=e0.p||0,h0=e0.b||0,f0=e0.l,p0=e0.d,A0=e0.m,m0=e0.n,x0=8*i0;do{if(!f0){u0=fe(r0,d0,1);var g0=fe(r0,d0+1,3);if(d0+=3,!g0){var y0=r0[(T0=me(d0)+4)-4]|r0[T0-3]<<8,b0=T0+y0;if(b0>i0){l0&&be(0);break}o0&&c0(h0+y0),n0.set(r0.subarray(T0,b0),h0),e0.b=h0+=y0,e0.p=d0=8*b0,e0.f=u0;continue}if(g0==1)f0=de,p0=he,A0=9,m0=5;else if(g0==2){var E0=fe(r0,d0,31)+257,w0=fe(r0,d0+10,15)+4,v0=E0+fe(r0,d0+5,31)+1;d0+=14;for(var S0=new W(v0),k0=new W(19),R0=0;R0<w0;++R0)k0[ee[R0]]=fe(r0,d0+3*R0,7);d0+=3*w0;var j0=pe(k0),C0=(1<<j0)-1,$0=le(k0,j0);for(R0=0;R0<v0;){var T0,I0=$0[fe(r0,d0,C0)];if(d0+=15&I0,(T0=I0>>4)<16)S0[R0++]=T0;else{var M0=0,N0=0;for(T0==16?(N0=3+fe(r0,d0,3),d0+=2,M0=S0[R0-1]):T0==17?(N0=3+fe(r0,d0,7),d0+=3):T0==18&&(N0=11+fe(r0,d0,127),d0+=7);N0--;)S0[R0++]=M0}}var D0=S0.subarray(0,E0),O0=S0.subarray(E0);A0=pe(D0),m0=pe(O0),f0=le(D0,A0),p0=le(O0,m0)}else be(1);if(d0>x0){l0&&be(0);break}}o0&&c0(h0+131072);for(var B0=(1<<A0)-1,z0=(1<<m0)-1,G0=d0;;G0=d0){var F0=(M0=f0[ge(r0,d0)&B0])>>4;if((d0+=15&M0)>x0){l0&&be(0);break}if(M0||be(2),F0<256)n0[h0++]=F0;else{if(F0==256){G0=d0,f0=null;break}var Q0=F0-254;if(F0>264){var U0=X[R0=F0-257];Q0=fe(r0,d0,(1<<U0)-1)+ae[R0],d0+=U0}var q0=p0[ge(r0,d0)&z0],Rw=q0>>4;if(q0||be(3),d0+=15&q0,O0=ie[Rw],Rw>3&&(U0=$[Rw],O0+=ge(r0,d0)&(1<<U0)-1,d0+=U0),d0>x0){l0&&be(0);break}o0&&c0(h0+131072);var _w=h0+Q0;if(h0<O0){var J0=0-O0,Cw=Math.min(O0,_w);for(J0+h0<0&&be(3);h0<Cw;++h0)n0[h0]=a0[J0+h0]}for(;h0<_w;++h0)n0[h0]=n0[h0-O0]}}e0.l=f0,e0.p=G0,e0.b=h0,e0.f=u0,f0&&(u0=1,e0.m=A0,e0.d=p0,e0.n=m0)}while(!u0);return h0!=n0.length&&s0?function(Ow,jw,Nw){return(Nw==null||Nw>Ow.length)&&(Nw=Ow.length),new W(Ow.subarray(0,Nw))}(n0,0,h0):n0.subarray(0,h0)},ye=new W(0);function ke(r0,e0){return r0[0]==31&&r0[1]==139&&r0[2]==8?function(n0,a0){var i0=function(s0){s0[0]==31&&s0[1]==139&&s0[2]==8||be(6,"invalid gzip data");var o0=s0[3],l0=10;4&o0&&(l0+=2+(s0[10]|s0[11]<<8));for(var c0=(o0>>3&1)+(o0>>4&1);c0>0;c0-=!s0[l0++]);return l0+(2&o0)}(n0);return i0+8>n0.length&&be(6,"invalid gzip data"),Ee(n0.subarray(i0,-8),{i:2},new W(function(s0){var o0=s0.length;return(s0[o0-4]|s0[o0-3]<<8|s0[o0-2]<<16|s0[o0-1]<<24)>>>0}(n0)),a0)}(r0,e0):(15&r0[0])!=8||r0[0]>>4>7||(r0[0]<<8|r0[1])%31?function(n0,a0){return Ee(n0,{i:2},a0,a0)}(r0,e0):function(n0,a0){return Ee(n0.subarray(function(i0,s0){return((15&i0[0])!=8||i0[0]>>4>7||(i0[0]<<8|i0[1])%31)&&be(6,"invalid zlib data"),(i0[1]>>5&1)==+!s0&&be(6,"invalid zlib data: "+(32&i0[1]?"need":"unexpected")+" dictionary"),2+(i0[1]>>3&4)}(n0,a0),-4),{i:2},a0,a0)}(r0,e0)}var ve=typeof TextDecoder<"u"&&new TextDecoder;try{ve.decode(ye,{stream:!0})}catch(r0){}var Se,Ie,Ce={exports:{}},xe=function(r0){function e0(i0){let s0,o0,l0,c0=null;function u0(...d0){if(!u0.enabled)return;const h0=u0,f0=Number(new Date),p0=f0-(s0||f0);h0.diff=p0,h0.prev=s0,h0.curr=f0,s0=f0,d0[0]=e0.coerce(d0[0]),typeof d0[0]!="str
753ing"&&d0.unshift("%O");let A0=0;d0[0]=d0[0].replace(/%([a-zA-Z%])/g,(m0,x0)=>{if(m0==="%%")return"%";A0++;const g0=e0.formatters[x0];if(typeof g0=="function"){const y0=d0[A0];m0=g0.call(h0,y0),d0.splice(A0,1),A0--}return m0}),e0.formatArgs.call(h0,d0),(h0.log||e0.log).apply(h0,d0)}return u0.namespace=i0,u0.useColors=e0.useColors(),u0.color=e0.selectColor(i0),u0.extend=n0,u0.destroy=e0.destroy,Object.defineProperty(u0,"enabled",{enumerable:!0,configurable:!1,get:()=>c0!==null?c0:(o0!==e0.namespaces&&(o0=e0.namespaces,l0=e0.enabled(i0)),l0),set:d0=>{c0=d0}}),typeof e0.init=="function"&&e0.init(u0),u0}function n0(i0,s0){const o0=e0(this.namespace+(s0===void 0?":":s0)+i0);return o0.log=this.log,o0}function a0(i0,s0){let o0=0,l0=0,c0=-1,u0=0;for(;o0<i0.length;)if(l0<s0.length&&(s0[l0]===i0[o0]||s0[l0]==="*"))s0[l0]==="*"?(c0=l0,u0=o0,l0++):(o0++,l0++);else{if(c0===-1)return!1;l0=c0+1,u0++,o0=u0}for(;l0<s0.length&&s0[l0]==="*";)l0++;return l0===s0.length}return e0.debug=e0,e0.default=e0,e0.coerce=function(i0){return i0 instanceof Error?i0.stack||i0.message:i0},e0.disable=function(){const i0=[...e0.names,...e0.skips.map(s0=>"-"+s0)].join(",");return e0.enable(""),i0},e0.enable=function(i0){e0.save(i0),e0.namespaces=i0,e0.names=[],e0.skips=[];const s0=(typeof i0=="string"?i0:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const o0 of s0)o0[0]==="-"?e0.skips.push(o0.slice(1)):e0.names.push(o0)},e0.enabled=function(i0){for(const s0 of e0.skips)if(a0(i0,s0))return!1;for(const s0 of e0.names)if(a0(i0,s0))return!0;return!1},e0.humanize=function(){if(Ie)return Se;Ie=1;var i0=1e3,s0=60*i0,o0=60*s0,l0=24*o0,c0=7*l0;function u0(d0,h0,f0,p0){var A0=h0>=1.5*f0;return Math.round(d0/f0)+" "+p0+(A0?"s":"")}return Se=function(d0,h0){h0=h0||{};var f0=typeof d0;if(f0==="string"&&d0.length>0)return function(p0){if(!((p0=String(p0)).length>100)){var A0=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p0);if(A0){var m0=parseFloat(A0[1]);switch((A0[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*m0;case"weeks":case"week":case"w":return m0*c0;case"days":case"day":case"d":return m0*l0;case"hours":case"hour":case"hrs":case"hr":case"h":return m0*o0;case"minutes":case"minute":case"mins":case"min":case"m":return m0*s0;case"seconds":case"second":case"secs":case"sec":case"s":return m0*i0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m0;default:return}}}}(d0);if(f0==="number"&&isFinite(d0))return h0.long?function(p0){var A0=Math.abs(p0);return A0>=l0?u0(p0,A0,l0,"day"):A0>=o0?u0(p0,A0,o0,"hour"):A0>=s0?u0(p0,A0,s0,"minute"):A0>=i0?u0(p0,A0,i0,"second"):p0+" ms"}(d0):function(p0){var A0=Math.abs(p0);return A0>=l0?Math.round(p0/l0)+"d":A0>=o0?Math.round(p0/o0)+"h":A0>=s0?Math.round(p0/s0)+"m":A0>=i0?Math.round(p0/i0)+"s":p0+"ms"}(d0);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d0))},Se}(),e0.destroy=function(){},Object.keys(r0).forEach(i0=>{e0[i0]=r0[i0]}),e0.names=[],e0.skips=[],e0.formatters={},e0.selectColor=function(i0){let s0=0;for(let o0=0;o0<i0.length;o0++)s0=(s0<<5)-s0+i0.charCodeAt(o0),s0|=0;return e0.colors[Math.abs(s0)%e0.colors.length]},e0.enable(e0.load()),e0};(function(r0,e0){e0.formatArgs=function(a0){if(a0[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a0[0]+(this.useColors?"%c ":" ")+"+"+r0.exports.humanize(this.diff),!this.useColors)return;const i0="color: "+this.color;a0.splice(1,0,i0,"color: inherit");let s0=0,o0=0;a0[0].replace(/%[a-zA-Z%]/g,l0=>{l0!=="%%"&&(s0++,l0==="%c"&&(o0=s0))}),a0.splice(o0,0,i0)},e0.save=function(a0){try{a0?e0.storage.setItem("debug",a0):e0.storage.removeItem("debug")}catch{}},e0.load=function(){let a0;try{a0=e0.storage.getItem("debug")||e0.storage.getItem("DEBUG")}catch{}return!a0&&typeof process<"u"&&"env"in process&&(a0=define_process_env_default.DEBUG),a0},e0.useColors=function(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;
753if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let a0;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(a0=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a0[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e0.storage=function(){try{return localStorage}catch{}}(),e0.destroy=()=>{},e0.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e0.log=console.debug||console.log||(()=>{}),r0.exports=xe(e0);const{formatters:n0}=r0.exports;n0.j=function(a0){try{return JSON.stringify(a0)}catch(i0){return"[UnexpectedJSONParseError]: "+i0.message}}})(Ce,Ce.exports);var Te=t(Ce.exports);const Be=67324752,Ue=33639248,Me={get:r0=>(y.get(r0,6),{signature:I.get(r0,0),compressedSize:I.get(r0,8),uncompressedSize:I.get(r0,12)}),len:16},Ne={get(r0){const e0=y.get(r0,6);return{signature:I.get(r0,0),minVersion:y.get(r0,4),dataDescriptor:!!(8&e0),compressedMethod:y.get(r0,8),compressedSize:I.get(r0,18),uncompressedSize:I.get(r0,22),filenameLength:y.get(r0,26),extraFieldLength:y.get(r0,28),filename:null}},len:30},De={get:r0=>({signature:I.get(r0,0),nrOfThisDisk:y.get(r0,4),nrOfThisDiskWithTheStart:y.get(r0,6),nrOfEntriesOnThisDisk:y.get(r0,8),nrOfEntriesOfSize:y.get(r0,10),sizeOfCd:I.get(r0,12),offsetOfStartOfCd:I.get(r0,16),zipFileCommentLength:y.get(r0,20)}),len:22},Oe={get(r0){const e0=y.get(r0,8);return{signature:I.get(r0,0),minVersion:y.get(r0,6),dataDescriptor:!!(8&e0),compressedMethod:y.get(r0,10),compressedSize:I.get(r0,20),uncompressedSize:I.get(r0,24),filenameLength:y.get(r0,28),extraFieldLength:y.get(r0,30),fileCommentLength:y.get(r0,32),relativeOffsetOfLocalHeader:I.get(r0,42),filename:null}},len:46};function Le(r0){const e0=new Uint8Array(I.len);return I.put(e0,0,r0),e0}const _e=Te("tokenizer:inflate"),Re=262144,ze=Le(134695760),Fe=Le(101010256);class Qe{constructor(e0){this.tokenizer=e0,this.syncBuffer=new Uint8Array(Re)}async isZip(){return await this.peekSignature()===Be}peekSignature(){return this.tokenizer.peekToken(I)}async findEndOfCentralDirectoryLocator(){const e0=this.tokenizer,n0=Math.min(16384,e0.fileInfo.size),a0=this.syncBuffer.subarray(0,n0);await this.tokenizer.readBuffer(a0,{position:e0.fileInfo.size-n0});for(let i0=a0.length-4;i0>=0;i0--)if(a0[i0]===Fe[0]&&a0[i0+1]===Fe[1]&&a0[i0+2]===Fe[2]&&a0[i0+3]===Fe[3])return e0.fileInfo.size-n0+i0;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess())return void _e("Cannot reading central-directory without random-read support");_e("Reading central-directory...");const e0=this.tokenizer.position,n0=await this.findEndOfCentralDirectoryLocator();if(n0>0){_e("Central-directory 32-bit signature found");const a0=await this.tokenizer.readToken(De,n0),i0=[];this.tokenizer.setPosition(a0.offsetOfStartOfCd);for(let s0=0;s0<a0.nrOfEntriesOfSize;++s0){const o0=await this.tokenizer.readToken(Oe);if(o0.signature!==Ue)throw new Error("Expected Central-File-Header signature");o0.filename=await this.tokenizer.readToken(new H(o0.filenameLength,"utf-8")),await this.tokenizer.ignore(o0.extraFieldLength),await this.tokenizer.ignore(o0.fileCommentLength),i0.push(o0),_e(`Add central-directory file-entry: n=${s0+1}/${i0.length}: filename=${i0[s0].filename}`)}return this.tokenizer.setPosition(e0),i0}this.tokenizer.setPosition(e0)}async unzip(e0){const n0=await this.readCentralDirectory();if(n0)return this.iterateOverCentralDirectory(n0,e0);let a0=!1;do{const i0=await this.readLocalFileHeader();if(!i0)break;const s0=e0(i0);let o0;if(a0=!!s0.stop,await this.tokenizer.ignore(i0.extraFieldLength),i0.dataDescriptor&&i0.
753compressedSize===0){const l0=[];let c0=Re;_e("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let u0=-1;for(;u0<0&&c0===Re;){c0=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),u0=Pe(this.syncBuffer.subarray(0,c0),ze);const d0=u0>=0?u0:c0;if(s0.handler){const h0=new Uint8Array(d0);await this.tokenizer.readBuffer(h0),l0.push(h0)}else await this.tokenizer.ignore(d0)}_e(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),s0.handler&&await this.inflate(i0,Ve(l0),s0.handler)}else s0.handler?(_e(`Reading compressed-file-data: ${i0.compressedSize} bytes`),o0=new Uint8Array(i0.compressedSize),await this.tokenizer.readBuffer(o0),await this.inflate(i0,o0,s0.handler)):(_e(`Ignoring compressed-file-data: ${i0.compressedSize} bytes`),await this.tokenizer.ignore(i0.compressedSize));if(_e(`Reading data-descriptor at pos=${this.tokenizer.position}`),i0.dataDescriptor&&(await this.tokenizer.readToken(Me)).signature!==134695760)throw new Error("Expected data-descriptor-signature at position "+(this.tokenizer.position-Me.len))}while(!a0)}async iterateOverCentralDirectory(e0,n0){for(const a0 of e0){const i0=n0(a0);if(i0.handler){this.tokenizer.setPosition(a0.relativeOffsetOfLocalHeader);const s0=await this.readLocalFileHeader();if(s0){await this.tokenizer.ignore(s0.extraFieldLength);const o0=new Uint8Array(a0.compressedSize);await this.tokenizer.readBuffer(o0),await this.inflate(s0,o0,i0.handler)}}
753if(i0.stop)break}}inflate(e0,n0,a0){return e0.compressedMethod===0?a0(n0):(_e(`Decompress filename=${e0.filename}, compressed-size=${n0.length}`),a0(ke(n0)))}async readLocalFileHeader(){const e0=await this.tokenizer.peekToken(I);if(e0===Be){const n0=await this.tokenizer.readToken(Ne);return n0.filename=await this.tokenizer.readToken(new H(n0.filenameLength,"utf-8")),n0}if(e0===Ue)return!1;throw e0===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}function Pe(r0,e0){const n0=r0.length,a0=e0.length;if(a0>n0)return-1;for(let i0=0;i0<=n0-a0;i0++){let s0=!0;for(let o0=0;o0<a0;o0++)if(r0[i0+o0]!==e0[o0]){s0=!1;break}if(s0)return i0}return-1}function Ve(r0){const e0=r0.reduce((i0,s0)=>i0+s0.length,0),n0=new Uint8Array(e0);let a0=0;for(const i0 of r0)n0.set(i0,a0),a0+=i0.length;return n0}const Ge=Object.prototype.toString;function je(r0,e0,n0){return!!r0&&(r0.constructor===e0||Ge.call(r0)===n0)}function Ke(r0){return je(r0,Uint8Array,"[object Uint8Array]")}const Ye={utf8:new globalThis.TextDecoder("utf8")};function He(r0,e0="utf8"){return function(n0){if(!function(a0){return Ke(a0)||function(i0){return je(i0,ArrayBuffer,"[object ArrayBuffer]")}(a0)}(n0))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof n0}\``)}(r0),Ye[e0]??(Ye[e0]=new globalThis.TextDecoder(e0)),Ye[e0].decode(r0)}function Je(r0){if(typeof r0!="string")throw new TypeError(`Expected \`string\`, got \`${typeof r0}\``)}const We=new globalThis.TextEncoder,qe=Array.from({length:256},(r0,e0)=>e0.toString(16).padStart(2,"0"));function Ze(r0){(function(n0){if(!Ke(n0))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n0}\``)})(r0);let e0="";for(let n0=0;n0<r0.length;n0++)e0+=qe[r0[n0]];return e0}const Xe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function $e(r0){if(Je(r0),r0.length%2!=0)throw new Error("Invalid Hex string length.");const e0=r0.length/2,n0=new Uint8Array(e0);for(let a0=0;a0<e0;a0++){const i0=Xe[r0[2*a0]],s0=Xe[r0[2*a0+1]];if(i0===void 0||s0===void 0)throw new Error("Invalid Hex character encountered at position "+2*a0);n0[a0]=i0<<4|s0}return n0}function et(r0){const{byteLength:e0}=r0;return e0===6?r0.getUint16(0)*2**32+r0.getUint32(2):e0===5?r0.getUint8(0)*2**32+r0.getUint32(1):e0===4?r0.getUint32(0):e0===3?65536*r0.getUint8(0)+r0.getUint16(1):e0===2?r0.getUint16(0):e0===1?r0.getUint8(0):void 0}const tt={get:(r0,e0)=>127&r0[e0+3]|r0[e0+2]<<7|r0[e0+1]<<14|r0[e0]<<21,len:4},nt=4100;async function at(r0,e0){return new At(e0).fromBuffer(r0)}function rt(r0){switch(r0=r0.toLowerCase()){case"application/epub+zip":return{ext:"epub",mime:r0};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:r0};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:r0};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:r0};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:r0};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:r0};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:r0};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:r0};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:r0};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:r0};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:r0};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:r0};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:r0};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:r0};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:r0};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:r0};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"}}}function it(r0,e0,n0){n0={offset:0,...n0};for(const[a0,i0]of e0.entries())if(n0.mask){if(i0!==(n0.mask[a0]&r0[a0+n0.offset]))return!1}else if(i0!==r0[a0+n0.offset])return!1;return!0}class At{constructor(e0){Gw(this,"detectConfident",async e0=>{if(this.buffer=new Uint8Array(nt),e0.fileInfo.size===void 0&&(e0.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e0,await e0.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};
753if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e0.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e0);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e0.ignore(6);const n0=await e0.readToken(tt);return e0.position+n0>e0.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e0.ignore(n0),this.fromTokenizer(e0))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let n0;return await new Qe(e0).unzip(a0=>{switch(a0.filename){case"META-INF/mozilla.rsa":return n0={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return n0={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(i0){const s0=new TextDecoder("utf-8").decode(i0).trim();n0=rt(s0)},stop:!0};case"[Content_Types].xml":return{async handler(i0){let s0=new TextDecoder("utf-8").decode(i0);const o0=s0.indexOf('.main+xml"');if(o0===-1){const l0="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";s0.includes(`ContentType="${l0}"`)&&(n0=rt(l0))}else{s0=s0.slice(0,Math.max(0,o0));const l0=s0.lastIndexOf('"'),c0=s0.slice(Math.max(0,l0+1));n0=rt(c0)}},stop:!0};default:return/classes\d*\.dex/.test(a0.filename)?(n0={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}}),n0??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e0.ignore(28);const n0=new Uint8Array(8);return await e0.readBuffer(n0),it(n0,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:it(n0,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:it(n0,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:it(n0,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:it(n0,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:it(n0,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){const n0=await this.readTiffHeader(!1);if(n0)return n0}if(this.check([77,77])){const n0=await this.readTiffHeader(!0);if(n0)return n0}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function n0(){const o0=await e0.peekNumber(E);let l0=128,c0=0;for(;!(o0&l0)&&l0!==0;)++c0,l0>>=1;const u0=new Uint8Array(c0+1);return await e0.readBuffer(u0),u0}async function a0(){const o0=await n0(),l0=await n0();l0[0]^=128>>l0.length-1;const c0=Math.min(6,l0.length),u0=new DataView(o0.buffer),d0=new DataView(l0.buffer,l0.length-c0,c0);return{id:et(u0),len:et(d0)}}async function i0(o0){for(;o0>0;){const l0=await a0();if(l0.id===17026)return(await e0.readToken(new H(l0.len))).replaceAll(/\00.*$/g,"");await e0.ignore(l0.len),--o0}}const s0=await a0();switch(await i0(s0.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};
753if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){const n0=new H(4,"latin1").get(this.buffer,2);if(n0.match("^d*")&&n0>=1e3&&n0<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e0.ignore(8),await e0.readToken(new H(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` 754`,"\r"," "," ","\0"].some(n0=>this.checkString(n0,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){async function n0(){return{length:await e0.readToken(N),type:await e0.readToken(new H(4,"latin1"))}}await e0.ignore(8);do{const a0=await n0();if(a0.length<0)return;switch(a0.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e0.ignore(a0.length+4)}}while(e0.position+8<e0.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const n0=new H(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(n0){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return n0.startsWith("3g")?n0.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-p
754anasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function n0(){const a0=new Uint8Array(16);return await e0.readBuffer(a0),{id:a0,size:Number(await e0.readToken(O))}}for(await e0.ignore(30);e0.position+24<e0.fileInfo.size;){const a0=await n0();let i0=a0.size-24;if(it(a0.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const s0=new Uint8Array(16);if(i0-=await e0.readBuffer(s0),it(s0,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(it(s0,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e0.ignore(i0)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e0.ignore(20),await e0.readToken(new H(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e0.peekBuffer(this.buffer,{length:Math.min(256,e0.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){const n0=new DataView(this.buffer.buffer).getUint32(12,!0);if(n0>12&&this.buffer.length>=n0+16)try{const a0=new TextDecoder().decode(this.buffer.subarray(16,n0+16));if(JSON.parse(a0).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}return this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:this.checkString("SCRM",{offset:44})?{ext:"s3m",mime:"audio/x-s3m"}:this.check([71])&&this.check([71],{offset:188})||this.check([71],{offset:4})&&this.check([71],{offset:196})?{ext:"mts",mime:"video/mp2t"}:this.check([66,79,79,75,77,79,66,73],{offset:60})?{ext:"mobi",mime:"application/x-mobipocket-ebook"}:this.check([68,73,67,77],{offset:128})?{ext:"dcm",mime:"application/dicom"}:this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70])?{ext:"lnk",mime:"application/x.ms.shortcut"}:this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0])?{ext:"alias",mime:"application/x.apple.alias"}:this.checkString("Kaydara FBX Binary \0")?{ext:"fbx",mime:"application/x.autodesk.fbx"}:this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8}))?{ext:"eot",mime:"application/vnd.ms-fontobject"}:this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29])?{ext:"indd",mime:"application/x-indesign"}:(await e0.peekBuffer(this.buffer,{length:Math.min(512,e0.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&function(n0,a0=0){const i0=Number.parseInt(new H(6).get(n0,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(i0))return!1;let s0=256;for(let o0=a0;o0<a0+148;o0++)s0+=n0[o0];for(let o0=a0+156;o0<a0+512;o0++)s0+=n0[o0];return i0===s0}(this.buffer)?{ext:"tar",mime:"application/x-tar"}:this.check([255,254])?this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0:this.checkString("-----BEGIN PGP MESSAGE-----")?{ext:"pgp",mime:"application/pgp-encrypted"}:void 0)});Gw(this,"detectImprecise",async e0=>{if(this.buffer=new Uint8Array(nt),await e0.peekBuffer(this.buffer,{length:Math.min(8,e0.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e0.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,e0.fileInfo.size),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let n0=0;n0<=this.options.mpegOffsetTolerance;++n0){const a0=this.scanMpeg(n0);if(a0)return a0}});this.options={mpegOffsetTolerance:0,...e0},this.detectors=[...(e0==null?void 0:e0.customDetectors)??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e0==null?void 0:e0.signal}}async fromTokenizer(e0){const n0=e0.position;for(const a0 of this.detectors){const i0=await a0.detect(e0);if(i0)return i0;if(n0!==e0.position)return}}async fromBuffer(e0){if(!(e0 instanceof Uint8Array||e0 instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e0}\``);const n0=e0 instanceof Uint8Array?e0:new Uint8Array(e0);if((n0==null?void 0:n0.length)>1)return this.fromTokenizer(g(n0,this.tokenizerOptions))}async fromBlob(e0){return this.fromStream(e0.stream())}async fromStream(e0){const n0=await f(e0,this.tokenizerOptions);try{return await this.fromTokenizer(n0)}finally{await n0.close()}}async toDetectionStream(e0,n0){const{sampleSize:a0=nt}=n0;let i0,s0;const o0=e0.getReader({mode:"byob"});try{const{value:u0,done:d0}=await o0.read(new Uint8Array(a0));if(s0=u0,!d0&&u0)try{i0=await this.fromBuffer(u0.subarray(0,a0))}catch(h0){if(!(h0 instanceof A))throw h0;i0=void 0}s0=u0}finally{o0.releaseLock()}const l0=new TransformStream({async start(u0){u0.enqueue(s0)},transform(u0,d0){d0.enqueue(u0)}}),c0=e0.pipeThrough(l0);return c0.fileType=i0,c0}check(e0,n0){return it(this.buffer,e0,n0)}checkString(e0,n0){return this.check((a0=e0,[...a0].map(i0=>i0.charCodeAt(0))),n0);var a0}async readTiffTag(e0){const n0=await this.tokenizer.readToken(e0?k:y);switch(this.tokenizer.ignore(10),n0){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e0){const n0=await this.tokenizer.readToken(e0?k:y);for(let a0=0;a0<n0;++a0){const i0=await this.readTiffTag(e0);if(i0)return i0}}async readTiffHeader(e0){const n0=(e0?k:y).get(this.buffer,2),a0=(e0?C:I).get(this.buffer,4);if(n0===42){if(a0>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(a0>=8){const i0=(e0?k:y).get(this.buffer,8),s0=(e0?k:y).get(this.buffer,10);if(i0===28&&s0===254||i0===31&&s0===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(a0),await this.readTiffIFD(e0)??{ext:"tif",mime:"image/tiff"}}if(n0===43)return{ext:"tif",mime:"image/tiff"}}scanMpeg(e0){if(this.check([255,224],{offset:e0,mask:[255,224]})){if(this.check([16],{offset:e0+1,mask:[22]}))return this.check([8],{offset:e0+1,mask:[8]}),{ext:"aac",mime:"audio/aac"};
754if(this.check([2],{offset:e0+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e0+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e0+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}}var st={},ot=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,lt=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ct=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ut=/\\([\u000b\u0020-\u00ff])/g,dt=/([\\"])/g,ht=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function pt(r0){var e0=String(r0);if(ct.test(e0))return e0;if(e0.length>0&&!lt.test(e0))throw new TypeError("invalid parameter value");return'"'+e0.replace(dt,"\\$1")+'"'}function ft(r0){this.parameters=Object.create(null),this.type=r0}st.format=function(r0){if(!r0||typeof r0!="object")throw new TypeError("argument obj is required");var e0=r0.parameters,n0=r0.type;if(!n0||!ht.test(n0))throw new TypeError("invalid type");var a0=n0;if(e0&&typeof e0=="object")for(var i0,s0=Object.keys(e0).sort(),o0=0;o0<s0.length;o0++){if(i0=s0[o0],!ct.test(i0))throw new TypeError("invalid parameter name");a0+="; "+i0+"="+pt(e0[i0])}return a0},st.parse=function(r0){if(!r0)throw new TypeError("argument string is required");var e0=typeof r0=="object"?function(c0){var u0;if(typeof c0.getHeader=="function"?u0=c0.getHeader("content-type"):typeof c0.headers=="object"&&(u0=c0.headers&&c0.headers["content-type"]),typeof u0!="string")throw new TypeError("content-type header is missing from object");return u0}(r0):r0;if(typeof e0!="string")throw new TypeError("argument string is required to be a string");var n0=e0.indexOf(";"),a0=n0!==-1?e0.slice(0,n0).trim():e0.trim();if(!ht.test(a0))throw new TypeError("invalid media type");var i0=new ft(a0.toLowerCase());if(n0!==-1){var s0,o0,l0;for(ot.lastIndex=n0;o0=ot.exec(e0);){if(o0.index!==n0)throw new TypeError("invalid parameter format");n0+=o0[0].length,s0=o0[1].toLowerCase(),(l0=o0[2]).charCodeAt(0)===34&&(l0=l0.slice(1,-1)).indexOf("\\")!==-1&&(l0=l0.replace(ut,"$1")),i0.parameters[s0]=l0}if(n0!==e0.length)throw new TypeError("invalid parameter format")}return i0};var gt=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;function mt(r0,e0,n0){this.type=r0,this.subtype=e0,this.suffix=n0}const wt={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},bt=1,Et=2,yt=3,kt=4,vt=17,St=18,It=32,Ct={[bt]:"video",[Et]:"audio",[yt]:"complex",[kt]:"logo",[vt]:"subtitle",[St]:"button",[It]:"control"},xt=r0=>class extends Error{constructor(e0){super(e0),this.name=r0}};class Tt extends xt("CouldNotDetermineFileTypeError"){}class Bt extends xt("UnsupportedFileTypeError"){}class Ut extends xt("UnexpectedFileContentError"){constructor(e0,n0){super(n0),this.fileType=e0}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}}class Mt extends xt("FieldDecodingError"){}class Nt extends xt("InternalParserError"){}const Dt=r0=>class extends Ut{constructor(e0){super(r0,e0)}};function Ot(r0,e0,n0){return!!(r0[e0]&1<<n0)}function Lt(r0,e0,n0,a0){let i0=e0;if(a0==="utf-16le"){for(;r0[i0]!==0||r0[i0+1]!==0;){if(i0>=n0)return n0;i0+=2}return i0}for(;r0[i0]!==0;){if(i0>=n0)return n0;i0++}return i0}function _t(r0){const e0=r0.indexOf("\0");return e0===-1?r0:r0.substr(0,e0)}function Rt(r0,e0){if(r0[0]===255&&r0[1]===254)return Rt(r0.subarray(2),e0);if(e0==="utf-16le"&&r0[0]===254&&r0[1]===255){if(1&r0.length)throw new Mt("Expected even number of octets for 16-bit unicode string");return Rt(function(n0){const a0=n0.length;if(1&a0)throw new Mt("Buffer length must be even");for(let i0=0;i0<a0;i0+=2){const s0=n0[i0];n0[i0]=n0[i0+1],n0[i0+1]=s0}return n0}(r0),e0)}return new H(r0.length,e0).get(r0,0)}function zt(r0){return(r0=r0.replace(/^\x00+/g,"")).replace(/\x00+$/g,"")}function Ft(r0,e0,n0,a0){const i0=n0%8;let s0=r0[e0+~~(n0/8)];s0&=255>>i0;const o0=8-i0,l0=a0-o0;return l0<0?s0>>=8-i0-a0:l0>0&&(s0<<=l0,s0|=Ft(r0,e0,n0+o0,l0)),s0}function Qt(r0,e0,n0){return Ft(r0,e0,n0,1)===1}const Pt={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},Vt={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},Gt={notSynchronized0:0,mpegFrameNumber:1,milliseconds:2},jt={get:(r0,e0)=>127&r0[e0+3]|r0[e0+2]<<7|r0[e0+1]<<14|r0[e0]<<21,len:4},Kt={len:10,get:(r0,e0)=>({fileIdentifier:new H(3,"ascii").get(r0,e0),version:{major:x.get(r0,e0+3),revision:x.get(r0,e0+4)},flags:{unsynchronisation:Ot(r0,e0+5,7),isExtendedHeader:Ot(r0,e0+5,6),expIndicator:Ot(r0,e0+5,5),footer:Ot(r0,e0+5,4)},size:jt.get(r0,e0+6)})},Yt={len:10,get:(r0,e0)=>({size:C.get(r0,e0),extendedFlags:k.get(r0,e0+4),sizeOfPadding:C.get(r0,e0+6),crcDataPresent:Ot(r0,e0+4,31)})},Ht=(r0,e0)=>{switch(r0[e0]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16le",bom:!1};default:return{encoding:"utf8",bom:!1}}},Jt=(r0,e0)=>
754({encoding:Ht(r0,e0),language:new H(3,"latin1").get(r0,e0+1)}),Wt={multiple:!1},qt={year:Wt,track:Wt,disk:Wt,title:Wt,artist:Wt,artists:{multiple:!0,unique:!0},albumartist:Wt,album:Wt,date:Wt,originaldate:Wt,originalyear:Wt,releasedate:Wt,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:Wt,subtitle:{multiple:!0},discsubtitle:Wt,totaltracks:Wt,totaldiscs:Wt,compilation:Wt,rating:{multiple:!0},bpm:Wt,mood:Wt,media:Wt,catalognumber:{multiple:!0,unique:!0},tvShow:Wt,tvShowSort:Wt,tvSeason:Wt,tvEpisode:Wt,tvEpisodeId:Wt,tvNetwork:Wt,podcast:Wt,podcasturl:Wt,releasestatus:Wt,releasetype:{multiple:!0},releasecountry:Wt,script:Wt,language:Wt,copyright:Wt,license:Wt,encodedby:Wt,encodersettings:Wt,gapless:Wt,barcode:Wt,isrc:{multiple:!0},asin:Wt,musicbrainz_recordingid:Wt,musicbrainz_trackid:Wt,musicbrainz_albumid:Wt,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:Wt,musicbrainz_workid:Wt,musicbrainz_trmid:Wt,musicbrainz_discid:Wt,acoustid_id:Wt,acoustid_fingerprint:Wt,musicip_puid:Wt,musicip_fingerprint:Wt,website:Wt,"performer:instrument":{multiple:!0,unique:!0},averageLevel:Wt,peakLevel:Wt,notes:{multiple:!0,unique:!1},key:Wt,originalalbum:Wt,originalartist:Wt,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:Wt,discogs_label_id:Wt,discogs_master_release_id:Wt,discogs_votes:Wt,discogs_rating:Wt,replaygain_track_peak:Wt,replaygain_track_gain:Wt,replaygain_album_peak:Wt,replaygain_album_gain:Wt,replaygain_track_minmax:Wt,replaygain_album_minmax:Wt,replaygain_undo:Wt,description:{multiple:!0},longDescription:Wt,category:{multiple:!0},hdVideo:Wt,keywords:{multiple:!0},movement:Wt,movementIndex:Wt,movementTotal:Wt,podcastId:Wt,showMovement:Wt,stik:Wt};class Zt{static toIntOrNull(e0){const n0=Number.parseInt(e0,10);return Number.isNaN(n0)?null:n0}static normalizeTrack(e0){const n0=e0.toString().split("/");return{no:Number.parseInt(n0[0],10)||null,of:Number.parseInt(n0[1],10)||null}}constructor(e0,n0){this.tagTypes=e0,this.tagMap=n0}mapGenericTag(e0,n0){e0={id:e0.id,value:e0.value},this.postMap(e0,n0);const a0=this.getCommonName(e0.id);return a0?{id:a0,value:e0.value}:null}getCommonName(e0){return this.tagMap[e0]}postMap(e0,n0){}}Zt.maxRatingScore=1;const Xt={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"};class $t extends Zt{constructor(){super(["ID3v1"],Xt)}}class en extends Zt{constructor(e0,n0){const a0={};for(const i0 of Object.keys(n0))a0[i0.toUpperCase()]=n0[i0];super(e0,a0)}getCommonName(e0){return this.tagMap[e0.toUpperCase()]}}const tn={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"
754catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping"};class nn extends en{static toRating(e0){return{source:e0.email,rating:e0.rating>0?(e0.rating-1)/254*Zt.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],tn)}postMap(e0,n0){switch(e0.id){case"UFID":{const a0=e0.value;a0.owner_identifier==="http://musicbrainz.org"&&(e0.id+=`:${a0.owner_identifier}`,e0.value=Rt(a0.identifier,"latin1"))}break;case"PRIV":{const a0=e0.value;switch(a0.owner_identifier){case"AverageLevel":case"PeakValue":e0.id+=`:${a0.owner_identifier}`,e0.value=a0.data.length===4?I.get(a0.data,0):null,e0.value===null&&n0.addWarning("Failed to parse PRIV:PeakValue");break;default:n0.addWarning(`Unknown PRIV owner-identifier: ${a0.data}`)}}break;case"POPM":e0.value=nn.toRating(e0.value)}}}const an={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/
754Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"};class rn extends Zt{static toRating(e0){return{rating:Number.parseFloat(e0+1)/5}}constructor(){super(["asf"],an)}postMap(e0){switch(e0.id){case"WM/SharedUserRating":{const n0=e0.id.split(":");e0.value=rn.toRating(e0.value),e0.id=n0[0];break}}}}const An={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"c
754opyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm"};class sn extends en{constructor(){super(["ID3v2.2"],An)}}const on={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"};class ln extends en{constructor(){super(["APEv2"],on)}}const cn={"©nam":"title","©ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","©alb":"album","©day":"date","©cmt":"comment","©com":"comment",trkn:"track",disk:"disk","©gen":"genre",covr:"picture","©wrt":"composer","©lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","©grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","©cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","©too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","©mvn":"movement","©mvi":"movementIndex","©mvc":"movementTotal","©wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"};class un extends en{constructor(){super(["iTunes"],cn)}postMap(e0,n0){e0.id==="rate"&&(e0.value={source:void 0,rating:Number.parseFloat(e0.value)/100})}}
754const dn={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"};class hn extends Zt{static toRating(e0,n0,a0){return{source:e0?e0.toLowerCase():void 0,rating:Number.parseFloat(n0)/a0*Zt.maxRatingScore}}constructor(){super(["vorbis"],dn)}postMap(e0){if(e0.id==="RATING")e0.value=hn.toRating(void 0,e0.value,100);else if(e0.id.indexOf("RATING:")===0){const n0=e0.id.split(":");e0.value=hn.toRating(n0[1],e0.value,1),e0.id=n0[0]}}}const pn={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"};class fn extends Zt{constructor(){super(["exif"],pn)}}const gn={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"};class mn extends en{constructor(){super(["matroska"],gn)}}
754const wn={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"};class bn extends Zt{constructor(){super(["AIFF"],wn)}}class En{constructor(){this.tagMappers={},[new $t,new sn,new nn,new un,new un,new hn,new ln,new rn,new fn,new mn,new bn].forEach(e0=>{this.registerTagMapper(e0)})}mapTag(e0,n0,a0){if(this.tagMappers[e0])return this.tagMappers[e0].mapGenericTag(n0,a0);throw new Nt(`No generic tag mapper defined for tag-format: ${e0}`)}registerTagMapper(e0){for(const n0 of e0.tagTypes)this.tagMappers[n0]=e0}}const yn=Te("music-metadata:collector"),kn=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"];class vn{constructor(e0){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new En,this.opts=e0;let n0=1;for(const a0 of kn)this.originPriority[a0]=n0++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(e0){yn(`streamInfo: type=${e0.type?Ct[e0.type]:"?"}, codec=${e0.codecName}`),this.format.trackInfo.push(e0)}setFormat(e0,n0){var a0;yn(`format: ${e0} = ${n0}`),this.format[e0]=n0,(a0=this.opts)!=null&&a0.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:e0,value:n0}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(e0,n0,a0){yn(`tag ${e0}.${n0} = ${a0}
754`),this.native[e0]||(this.format.tagTypes.push(e0),this.native[e0]=[]),this.native[e0].push({id:n0,value:a0}),await this.toCommon(e0,n0,a0)}addWarning(e0){this.quality.warnings.push({message:e0})}async postMap(e0,n0){switch(n0.id){case"artist":if(this.commonOrigin.artist===this.originPriority[e0])return this.postMap("artificial",{id:"artists",value:n0.value});this.common.artists||this.setGenericTag("artificial",{id:"artists",value:n0.value});break;case"artists":if(!(this.common.artist&&this.commonOrigin.artist!==this.originPriority.artificial||this.common.artists&&this.common.artists.indexOf(n0.value)!==-1)){const i0={id:"artist",value:(a0=(this.common.artists||[]).concat([n0.value])).length>2?`${a0.slice(0,a0.length-1).join(", ")} & ${a0[a0.length-1]}`:a0.join(" & ")};this.setGenericTag("artificial",i0)}break;case"picture":return this.postFixPicture(n0.value).then(i0=>{i0!==null&&(n0.value=i0,this.setGenericTag(e0,n0))});case"totaltracks":return void(this.common.track.of=Zt.toIntOrNull(n0.value));case"totaldiscs":return void(this.common.disk.of=Zt.toIntOrNull(n0.value));case"movementTotal":return void(this.common.movementIndex.of=Zt.toIntOrNull(n0.value));case"track":case"disk":case"movementIndex":{const i0=this.common[n0.id].of;return this.common[n0.id]=Zt.normalizeTrack(n0.value),void(this.common[n0.id].of=i0??this.common[n0.id].of)}case"bpm":case"year":case"originalyear":n0.value=Number.parseInt(n0.value,10);break;case"date":{const i0=Number.parseInt(n0.value.substr(0,4),10);Number.isNaN(i0)||(this.common.year=i0);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":n0.value=typeof n0.value=="string"?Number.parseInt(n0.value,10):n0.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":n0.value=function(i0){const s0=i0.split(" ").map(c0=>c0.trim().toLowerCase());if(s0.length>=1){const c0=Number.parseFloat(s0[0]);return s0.length===2&&s0[1]==="db"?{dB:c0,ratio:(l0=c0,10**(l0/10))}:{dB:(o0=c0,10*Math.log10(o0)),ratio:c0}}var o0,l0}(n0.value);break;case"replaygain_track_minmax":n0.value=n0.value.split(",").map(i0=>Number.parseInt(i0,10));break;case"replaygain_undo":{const i0=n0.value.split(",").map(s0=>Number.parseInt(s0,10));n0.value={leftChannel:i0[0],rightChannel:i0[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":n0.value=n0.value==="1"||n0.value===1;break;case"isrc":{const i0=this.common[n0.id];if(i0&&i0.indexOf(n0.value)!==-1)return;break}case"comment":typeof n0.value=="string"&&(n0.value={text:n0.value}),n0.value.descriptor==="iTunPGAP"&&this.setGenericTag(e0,{id:"gapless",value:n0.value.text==="1"});break;case"lyrics":typeof n0.value=="string"&&(n0.value=function(i0){const s0=i0.split(` 755`),o0=[],l0=/\[(\d{2}):(\d{2})\.(\d{2,3})\]/;for(const c0 of s0){const u0=c0.match(l0);if(u0){const d0=Number.parseInt(u0[1],10),h0=Number.parseInt(u0[2],10),f0=u0[3];let p0;p0=f0.length===3?Number.parseInt(f0,10):10*Number.parseInt(f0,10);const A0=1e3*(60*d0+h0)+p0,m0=c0.replace(l0,"").trim();o0.push({timestamp:A0,text:m0})}}return{contentType:Vt.lyrics,timeStampFormat:Gt.milliseconds,syncText:o0}}(n0.value))}var a0;n0.value!==null&&this.setGenericTag(e0,n0)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}async postFixPicture(e0){if(e0.data&&e0.data.length>0){if(!e0.format){const n0=await at(Uint8Array.from(e0.data));if(!n0)return null;e0.format=n0.mime}return e0.format=e0.format.toLocaleLowerCase(),e0.format==="image/jpg"&&(e0.format="image/jpeg"),e0}return this.addWarning("Empty picture tag found"),null}async toCommon(e0,n0,a0){const i0={id:n0,value:a0},s0=this.tagMapper.mapTag(e0,i0,this);s0&&await this.postMap(e0,s0)}setGenericTag(e0,n0){var o0;yn(`common.${n0.id} = ${n0.value}`);const a0=this.commonOrigin[n0.id]||1e3,i0=this.originPriority[e0];if(s0=n0.id,qt[s0]&&!qt[s0].multiple){if(!(i0<=a0))return yn(`Ignore native tag (singleton): ${e0}.${n0.id} = ${n0.value}`);this.common[n0.id]=n0.value,this.commonOrigin[n0.id]=i0}else if(i0===a0)!function(l0){return!qt[l0].multiple||qt[l0].unique||!1}(n0.id)||this.common[n0.id].indexOf(n0.value)===-1?this.common[n0.id].push(n0.value):yn(`Ignore duplicate value: ${e0}.${n0.id} = ${n0.value}`);else{if(!(i0<a0))return yn(`Ignore native tag (list): ${e0}.${n0.id} = ${n0.value}`);this.common[n0.id]=[n0.value],this.commonOrigin[n0.id]=i0}var s0;(o0=this.opts)!=null&&o0.observer&&this.opts.observer({metadata:this,tag:{type:"common",id:n0.id,value:n0.value}})}}const Sn={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],load:async()=>(await Promise.resolve().then(function(){return gN})).MpegParser},In={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],load:async()=>(await Promise.resolve().then(function(){return ea})).APEv2Parser},Cn={parserType:"asf",extensions:[".asf"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],load:async()=>(await Promise.resolve().then(function(){return VN})).AsfParser},xn={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],load:async()=>(await Promise.resolve().then(function(){return YN})).DsdiffParser},Tn={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],load:async()=>(await Promise.resolve().then(function(){return XN})).AIFFParser},Bn={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],load:async()=>(await Promise.resolve().then(function(){return rD})).DsfParser},Un={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],load:async()=>(await Promise.resolve().then(function(){return fD})).FlacParser},Mn={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],load:async()=>(await Promise.resolve().then(function(){return SD})).MatroskaParser},Nn={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4"],load:async()=>(await Promise.resolve().then(function(){return sO})).MP4Parser},Dn={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],load:async()=>(await Promise.resolve().then(function(){return yO})).MusepackParser},On={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],load:async()=>(await Promise.resolve().then(function(){return OO})).OggParser},Ln={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],load:async()=>(await Promise.resolve().then(function(){return VO})).WavPackParser},_n={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],load:async()=>(await Promise.resolve().then(function(){return cL})).WaveParser},Rn=Te("music-metadata:parser:factory");class zn{constructor(){this.parsers=[],[Un,Sn,In,Nn,Mn,_n,On,Cn,Tn,Ln,Dn,Bn,xn].forEac
755h(e0=>this.registerParser(e0))}registerParser(e0){this.parsers.push(e0)}async parse(e0,n0,a0){if(e0.supportsRandomAccess()?(Rn("tokenizer supports random-access, scanning for appending headers"),await la(e0,a0)):Rn("tokenizer does not support random-access, cannot scan for appending headers"),!n0){const o0=new Uint8Array(4100);if(e0.fileInfo.mimeType&&(n0=this.findLoaderForContentType(e0.fileInfo.mimeType)),!n0&&e0.fileInfo.path&&(n0=this.findLoaderForExtension(e0.fileInfo.path)),!n0){Rn("Guess parser on content..."),await e0.peekBuffer(o0,{mayBeLess:!0});const l0=await at(o0,{mpegOffsetTolerance:10});if(!l0||!l0.mime)throw new Tt("Failed to determine audio format");if(Rn(`Guessed file type is mime=${l0.mime}, extension=${l0.ext}`),!(n0=this.findLoaderForContentType(l0.mime)))throw new Bt(`Guessed MIME-type not supported: ${l0.mime}`)}}Rn(`Loading ${n0.parserType} parser...`);const i0=new vn(a0),s0=new(await n0.load())(i0,e0,a0??{});return Rn(`Parser ${n0.parserType} loaded`),await s0.parse(),i0.format.trackInfo&&(i0.format.hasAudio===void 0&&i0.setFormat("hasAudio",!!i0.format.trackInfo.find(o0=>o0.type===2)),i0.format.hasVideo===void 0&&i0.setFormat("hasVideo",!!i0.format.trackInfo.find(o0=>o0.type===1))),i0.toCommonMetadata()}findLoaderForExtension(e0){if(!e0)return;const n0=function(a0){const i0=a0.lastIndexOf(".");return i0===-1?"":a0.slice(i0)}(e0).toLocaleLowerCase()||e0;return this.parsers.find(a0=>a0.extensions.indexOf(n0)!==-1)}findLoaderForContentType(e0){let n0;if(!e0)return;try{n0=function(i0){const s0=st.parse(i0),o0=function(l0){if(!l0)throw new TypeError("argument string is required");if(typeof l0!="string")throw new TypeError("argument string is required to be a string");var c0=gt.exec(l0.toLowerCase());if(!c0)throw new TypeError("invalid media type");var u0,d0=c0[1],h0=c0[2],f0=h0.lastIndexOf("+");return f0!==-1&&(u0=h0.substr(f0+1),h0=h0.substr(0,f0)),new mt(d0,h0,u0)}(s0.type);return{type:o0.type,subtype:o0.subtype,suffix:o0.suffix,parameters:s0.parameters}}(e0)}catch{return void Rn(`Invalid HTTP Content-Type header value: ${e0}`)}const a0=n0.subtype.indexOf("x-")===0?n0.subtype.substring(2):n0.subtype;return this.parsers.find(i0=>i0.mimeTypes.find(s0=>s0.indexOf(`${n0.type}/${a0}`)!==-1))}getSupportedMimeTypes(){const e0=new Set;return this.parsers.forEach(n0=>{n0.mimeTypes.forEach(a0=>{e0.add(a0),e0.add(a0.replace("/","/x-"))})}),Array.from(e0)}}class Fn{constructor(e0,n0,a0){this.metadata=e0,this.tokenizer=n0,this.options=a0}}const Qn=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,Pn={len:4,get:(r0,e0)=>{const n0=He(r0.slice(e0,e0+Pn.len),"latin1");if(!n0.match(Qn))throw new Mt(`FourCC contains invalid characters: ${function(a0){const i0=[];for(let s0=0,o0=a0.length;s0<o0;s0++){const l0=Number(a0.charCodeAt(s0)).toString(16);i0.push(l0.length===1?`0${l0}`:l0)}return i0.join(" ")}(n0)} "${n0}"`);return n0},put:(r0,e0,n0)=>{const a0=(Je(i0=n0),We.encode(i0));var i0;if(a0.length!==4)throw new Nt("Invalid length");return r0.set(a0,e0),e0+4}},Vn={len:52,get:(r0,e0)=>({ID:Pn.get(r0,e0),version:I.get(r0,e0+4)/1e3,descriptorBytes:I.get(r0,e0+8),headerBytes:I.get(r0,e0+12),seekTableBytes:I.get(r0,e0+16),headerDataBytes:I.get(r0,e0+20),apeFrameDataBytes:I.get(r0,e0+24),apeFrameDataBytesHigh:I.get(r0,e0+28),terminatingDataBytes:I.get(r0,e0+32),fileMD5:new Y(16).get(r0,e0+36)})},Gn={len:24,get:(r0,e0)=>({compressionLevel:y.get(r0,e0),formatFlags:y.get(r0,e0+2),blocksPerFrame:I.get(r0,e0+4),finalFrameBlocks:I.get(r0,e0+8),totalFrames:I.get(r0,e0+12),bitsPerSample:y.get(r0,e0+16),channel:y.get(r0,e0+18),sampleRate:I.get(r0,e0+20)})},jn={len:32,get:(r0,e0)=>({ID:new H(8,"ascii").get(r0,e0),version:I.get(r0,e0+8),size:I.get(r0,e0+12),fields:I.get(r0,e0+16),flags:Yn(I.get(r0,e0+20))})},Kn={len:8,get:(r0,e0)=>({size:I.get(r0,e0),flags:Yn(I.get(r0,e0+4))})};function Yn(r0){return{containsHeader:Hn(r0,31),containsFooter:Hn(r0,30),isHeader:Hn(r0,29),readOnly:Hn(r0,0),dataType:(6&r0)>>1}}function Hn(r0,e0){return!!(r0&1<<e0)}const Jn=Te("music-metadata:parser:APEv2"),Wn="APEv2",qn="APETAGEX";class Zn extends Dt("APEv2"){}function Xn(r0,e0,n0){return new $n(r0,e0,n0).tryParseApeHeader()}class $n extends Fn{constructor(){super(...arguments),this.ape={}}static calculateDuration(e0){let n0=e0.totalFrames>1?e0.blocksPerFrame*(e0.totalFrames-1):0;return n0+=e0.finalFrameBlocks,n0/e0.sampleRate}static async findApeFooterOffset(e0,n0){const a0=new Uint8Array(jn.len),i0=e0.position;if(n0<=jn.len)Jn(`Offset is too small to read APE footer: offset=${n0}`);else if(n0>jn.len){await e0.readBuffer(a0,{position:n0-jn.len}),e0.setPosition(i0);const s0=jn.get(a0,0);if(s0.ID==="APETAGEX")return s0.flags.isHeader?Jn("APE Header found at offset="+(n0-jn.len)):(Jn("APE Footer found at offset="+(n0-jn.len)),n0-=s0.size),{footer:s0,offset:n0}}}static parseTagFooter(e0,n0,a0){const i0=jn.get(n0,n0.length-jn.len);if(i0.ID!==qn)throw new Zn("Unexpected APEv2 Footer ID preamble value");return g(n0),new $n(e0,g(n0),a0).parseTags(i0)}
755async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position<jn.len)return void Jn("No APEv2 header found, end-of-file reached");const e0=await this.tokenizer.peekToken(jn);if(e0.ID===qn)return await this.tokenizer.ignore(jn.len),this.parseTags(e0);if(Jn(`APEv2 header not found at offset=${this.tokenizer.position}`),this.tokenizer.fileInfo.size){const n0=this.tokenizer.fileInfo.size-this.tokenizer.position,a0=new Uint8Array(n0);return await this.tokenizer.readBuffer(a0),$n.parseTagFooter(this.metadata,a0,this.options)}}async parse(){const e0=await this.tokenizer.readToken(Vn);if(e0.ID!=="MAC ")throw new Zn("Unexpected descriptor ID");this.ape.descriptor=e0;const n0=e0.descriptorBytes-Vn.len,a0=await(n0>0?this.parseDescriptorExpansion(n0):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(a0.forwardBytes),this.tryParseApeHeader()}async parseTags(e0){const n0=new Uint8Array(256);let a0=e0.size-jn.len;Jn(`Parse APE tags at offset=${this.tokenizer.position}, size=${a0}`);for(let i0=0;i0<e0.fields;i0++){if(a0<Kn.len){this.metadata.addWarning(`APEv2 Tag-header: ${e0.fields-i0} items remaining, but no more tag data to read.`);break}const s0=await this.tokenizer.readToken(Kn);a0-=Kn.len+s0.size,await this.tokenizer.peekBuffer(n0,{length:Math.min(n0.length,a0)});let o0=Lt(n0,0,n0.length);const l0=await this.tokenizer.readToken(new H(o0,"ascii"));switch(await this.tokenizer.ignore(1),a0-=l0.length+1,s0.flags.dataType){case 0:{const c0=(await this.tokenizer.readToken(new H(s0.size,"utf8"))).split(/\x00/g);await Promise.all(c0.map(u0=>this.metadata.addTag(Wn,l0,u0)));break}case 1:if(this.options.skipCovers)await this.tokenizer.ignore(s0.size);else{const c0=new Uint8Array(s0.size);await this.tokenizer.readBuffer(c0),o0=Lt(c0,0,c0.length);const u0=He(c0.slice(0,o0)),d0=c0.slice(o0+1);await this.metadata.addTag(Wn,l0,{description:u0,data:d0})}break;case 2:Jn(`Ignore external info ${l0}`),await this.tokenizer.ignore(s0.size);break;case 3:Jn(`Ignore external info ${l0}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${l0}"`),await this.tokenizer.ignore(s0.size)}}}async parseDescriptorExpansion(e0){return await this.tokenizer.ignore(e0),this.parseHeader()}async parseHeader(){const e0=await this.tokenizer.readToken(Gn);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",e0.bitsPerSample),this.metadata.setFormat("sampleRate",e0.sampleRate),this.metadata.setFormat("numberOfChannels",e0.channel),this.metadata.setFormat("duration",$n.calculateDuration(e0)),!this.ape.descriptor)throw new Zn("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}var ea=Object.freeze({__proto__:null,APEv2Parser:$n,ApeContentError:Zn,tryParseApeHeader:Xn});const ta=Te("music-metadata:parser:ID3v1"),na=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Po
755p-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],aa={len:128,get:(r0,e0)=>{const n0=new ra(3).get(r0,e0);return n0==="TAG"?{header:n0,title:new ra(30).get(r0,e0+3),artist:new ra(30).get(r0,e0+33),album:new ra(30).get(r0,e0+63),year:new ra(4).get(r0,e0+93),comment:new ra(28).get(r0,e0+97),zeroByte:E.get(r0,e0+127),track:E.get(r0,e0+126),genre:E.get(r0,e0+127)}:null}};class ra{constructor(e0){this.len=e0,this.stringType=new H(e0,"latin1")}get(e0,n0){let a0=this.stringType.get(e0,n0);return a0=_t(a0),a0=a0.trim(),a0.length>0?a0:void 0}}class ia extends Fn{constructor(e0,n0,a0){super(e0,n0,a0),this.apeHeader=a0.apeHeader}static getGenre(e0){if(e0<na.length)return na[e0]}async parse(){if(!this.tokenizer.fileInfo.size)return void ta("Skip checking for ID3v1 because the file-size is unknown");this.apeHeader&&(this.tokenizer.ignore(this.apeHeader.offset-this.tokenizer.position),await new $n(this.metadata,this.tokenizer,this.options).parseTags(this.apeHeader.footer));const e0=this.tokenizer.fileInfo.size-aa.len;if(this.tokenizer.position>e0)return void ta("Already consumed the last 128 bytes");const n0=await this.tokenizer.readToken(aa,e0);if(n0){ta("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-aa.len);const a0=["title","artist","album","comment","track","year"];for(const s0 of a0)n0[s0]&&n0[s0]!==""&&await this.addTag(s0,n0[s0]);const i0=ia.getGenre(n0.genre);i0&&await this.addTag("genre",i0)}else ta("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-aa.len)}async addTag(e0,n0){await this.metadata.addTag("ID3v1",e0,n0)}}const Aa="LYRICS200";async function sa(r0,e0,n0={}){const a0=f(r0,{fileInfo:typeof e0=="string"?{mimeType:e0}:e0});try{return await oa(a0,n0)}finally{await a0.close()}}function oa(r0,e0){return new zn().parse(r0,void 0,e0)}async function la(r0,e0={}){let n0=r0.fileInfo.size;if(await async function(a0){if(a0.fileInfo.size>=128){const i0=new Uint8Array(3),s0=a0.position;return await a0.readBuffer(i0,{position:a0.fileInfo.size-128}),a0.setPosition(s0),new TextDecoder("latin1").decode(i0)==="TAG"}return!1}(r0)){n0-=128;const a0=await async function(i0){const s0=i0.fileInfo.size;if(s0>=143){const o0=new Uint8Array(15),l0=i0.position;await i0.readBuffer(o0,{position:s0-143}),i0.setPosition(l0);const c0=new TextDecoder("latin1").decode(o0);if(c0.slice(6)===Aa)return Number.parseInt(c0.slice(0,6),10)+15}return 0}(r0);n0-=a0}e0.apeHeader=await $n.findApeFooterOffset(r0,n0)}var ca=Object.freeze({__proto__:null,CouldNotDetermineFileTypeError:Tt,FieldDecodingError:Mt,InternalParserError:Nt,LyricsContentType:Vt,TimestampFormat:Gt,UnsupportedFileTypeError:Bt,getSupp
755ortedMimeTypes:function(){return new zn().getSupportedMimeTypes()},makeParseError:xt,makeUnexpectedFileContentError:Dt,orderTags:function(r0){const e0={};for(const{id:n0,value:a0}of r0)(e0[n0]||(e0[n0]=[])).push(a0);return e0},parseBlob:async function(r0,e0={}){const n0={mimeType:r0.type,size:r0.size};return r0 instanceof File&&(n0.path=r0.name),sa(r0.stream(),n0,e0)},parseBuffer:async function(r0,e0,n0={}){return oa(g(r0,{fileInfo:typeof e0=="string"?{mimeType:e0}:e0}),n0)},parseFile:async function(r0,e0={}){throw new Error("This function require a Node engine. To load Web API File objects use parseBlob instead.")},parseFromTokenizer:oa,parseStream:async function(r0,e0,n0={}){throw new Error("This function require a Node engine.")},parseWebStream:sa,ratingToStars:function(r0){return r0===void 0?0:1+Math.round(4*r0)},scanAppendingHeaders:la,selectCover:function(r0){return r0?r0.reduce((e0,n0)=>n0.name&&n0.name.toLowerCase()in["front","cover","cover (front)"]?n0:e0):null}}),ua={exports:{}},da={},ha=Symbol.for("react.transitional.element"),pa=Symbol.for("react.fragment");function fa(r0,e0,n0){var a0=null;if(n0!==void 0&&(a0=""+n0),e0.key!==void 0&&(a0=""+e0.key),"key"in e0)for(var i0 in n0={},e0)i0!=="key"&&(n0[i0]=e0[i0]);else n0=e0;return e0=n0.ref,{$$typeof:ha,type:r0,key:a0,ref:e0!==void 0?e0:null,props:n0}}da.Fragment=pa,da.jsx=fa,da.jsxs=fa,ua.exports=da;var ga=ua.exports,ma={exports:{}},wa={},ba={exports:{}},Ea={};(function(r0){function e0(N0,D0){var O0=N0.length;N0.push(D0);e:for(;0<O0;){var B0=O0-1>>>1,z0=N0[B0];if(!(0<i0(z0,D0)))break e;N0[B0]=D0,N0[O0]=z0,O0=B0}}function n0(N0){return N0.length===0?null:N0[0]}function a0(N0){if(N0.length===0)return null;var D0=N0[0],O0=N0.pop();if(O0!==D0){N0[0]=O0;e:for(var B0=0,z0=N0.length,G0=z0>>>1;B0<G0;){var F0=2*(B0+1)-1,Q0=N0[F0],U0=F0+1,q0=N0[U0];if(0>i0(Q0,O0))U0<z0&&0>i0(q0,Q0)?(N0[B0]=q0,N0[U0]=O0,B0=U0):(N0[B0]=Q0,N0[F0]=O0,B0=F0);else{if(!(U0<z0&&0>i0(q0,O0)))break e;N0[B0]=q0,N0[U0]=O0,B0=U0}}}return D0}function i0(N0,D0){var O0=N0.sortIndex-D0.sortIndex;return O0!==0?O0:N0.id-D0.id}if(r0.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s0=performance;r0.unstable_now=function(){return s0.now()}}else{var o0=Date,l0=o0.now();r0.unstable_now=function(){return o0.now()-l0}}var c0=[],u0=[],d0=1,h0=null,f0=3,p0=!1,A0=!1,m0=!1,x0=!1,g0=typeof setTimeout=="function"?setTimeout:null,y0=typeof clearTimeout=="function"?clearTimeout:null,b0=typeof setImmediate<"u"?setImmediate:null;function E0(N0){for(var D0=n0(u0);D0!==null;){if(D0.callback===null)a0(u0);else{if(!(D0.startTime<=N0))break;a0(u0),D0.sortIndex=D0.expirationTime,e0(c0,D0)}D0=n0(u0)}}function w0(N0){if(m0=!1,E0(N0),!A0)if(n0(c0)!==null)A0=!0,S0||(S0=!0,v0());else{var D0=n0(u0);D0!==null&&M0(w0,D0.startTime-N0)}}var v0,S0=!1,k0=-1,R0=5,j0=-1;function C0(){return!(!x0&&r0.unstable_now()-j0<R0)}function $0(){if(x0=!1,S0){var N0=r0.unstable_now();j0=N0;var D0=!0;try{e:{A0=!1,m0&&(m0=!1,y0(k0),k0=-1),p0=!0;var O0=f0;try{t:{for(E0(N0),h0=n0(c0);h0!==null&&!(h0.expirationTime>N0&&C0());){var B0=h0.callback;if(typeof B0=="function"){h0.callback=null,f0=h0.priorityLevel;var z0=B0(h0.expirationTime<=N0);if(N0=r0.unstable_now(),typeof z0=="function"){h0.callback=z0,E0(N0),D0=!0;break t}h0===n0(c0)&&a0(c0),E0(N0)}else a0(c0);h0=n0(c0)}if(h0!==null)D0=!0;else{var G0=n0(u0);G0!==null&&M0(w0,G0.startTime-N0),D0=!1}}break e}finally{h0=null,f0=O0,p0=!1}D0=void 0}}finally{D0?v0():S0=!1}}}if(typeof b0=="function")v0=function(){b0($0)};else if(typeof MessageChannel<"u"){var T0=new MessageChannel,I0=T0.port2;T0.port1.onmessage=$0,v0=function(){I0.postMessage(null)}}else v0=function(){g0($0,0)};function M0(N0,D0){k0=g0(function(){N0(r0.unstable_now())},D0)}r0.unstable_IdlePriority=5,r0.unstable_ImmediatePriority=1,r0.unstable_LowPriority=4,r0.unstable_NormalPriority=3,r0.unstable_Profiling=null,r0.unstable_UserBlockingPriority=2,r0.unstable_cancelCallback=function(N0){N0.callback=null},r0.unstable_forceFrameRate=function(N0){0>N0||125<N0||(R0=0<N0?Math.floor(1e3/N0):5)},r0.unstable_getCurrentPriorityLevel=function(){return f0},r0.unstable_next=function(N0){switch(f0){case 1:case 2:case 3:var D0=3;break;default:D0=f0}var O0=f0;f0=D0;try{return N0()}finally{f0=O0}},r0.unstable_requestPaint=function(){x0=!0},r0.unstable_runWithPriority=function(N0,D0){switch(N0){case 1:case 2:case 3:case 4:case 5:break;default:N0=3}var O0=f0;f0=N0;try{return D0()}finally{f0=O0}},r0.unstable_scheduleCallback=function(N0,D0,O0){var B0=r0.unstable_now();switch(O0=typeof O0=="object"&&O0!==null&&typeof(O0=O0.delay)=="number"&&0<O0?B0+O0:B0,N0){case 1:var z0=-1;break;case 2:z0=250;break;case 5:z0=1073741823;break;case 4:z0=1e4;break;default:z0=5e3}return N0={id:d0++,callback:D0,priorityLevel:N0,startTime:O0,expirationTime:z0=O0+z0,sortIndex:-1},O0>B0?(N0.sortIndex=O0,e0(u0,N0),n0(c0)===null&&N0===n0(u0)&&(m0?(y0(k0),k0=-1):m0=!0,M0(w0,O0-B0))):(N0.sortIndex=z0,e0(c0,N0),A0||p0||(A0=!0,S0||(S0=!0,v0()))),N0},r0.unstable_shouldYield=C0,r0.unstable_wrapCallback=function(N0){var D0=f0;return function(){var O0=f0;f0=D0;try{return N0.apply(this,arguments)}finally{f0=O0}}}})(Ea),ba.exports=Ea;var ya=ba.exports,ka={exports:{}},va={},Sa=Symbol.for("react.transitional.element"),Ia=Symbol.for("react.portal"),Ca=Symbol.for("react.fragment"),xa=Symbol.for("react.strict_mode"),Ta=Symbol.for("react.profiler"),Ba=Symbol.for("react.consumer"),Ua=Symbol.for("react.context"),Ma=Symbol.for("react.forward_ref"),Na=Symbol.for("react.suspense"),Da=Symbol.for("react.memo"),Oa=Symbol.for("react.lazy"),La=Symbol.iterator,_a={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ra=Object.assign,za={};function Fa(r0,e0,n0){this.props=r0,this.context=e0,this.refs=za,this.updater=n0||_a}function Qa(){}function Pa(r0,e0,n0){this.props=r0,this.context=e0,this.refs=za,this.updater=n0||_a}Fa.prototype.isReactComponent={},Fa.prototype.setState=function(r0,e0){if(typeof r0!="object"&&typeof r0!="function"&&r0!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r0,e0,"setState")},Fa.prototype.forceUpdate=function(r0){this.updater.enqueueForceUpdate(this,r0,"forceUpdate")},Qa.prototype=Fa.prototype;var Va=Pa.prototype=new Qa;Va.constructor=Pa,Ra(Va,Fa.prototype),Va.isPureReactComponent=!0;var Ga=Array.isArray,ja={H:null,A:null,T:null,S:null,V:null},Ka=Object.prototype.hasOwnProperty;function Ya(r0,e0,n0,a0,i0,s0){return n0=s0.ref,{$$typeof:Sa,type:r0,key:e0,ref:n0!==void 0?n0:null,props:s0}}function Ha(r0){return typeof r0=="object"&&r0!==null&&r0.$$typeof===Sa}var Ja=/\/+/g;function Wa(r0,e0){return typeof r0=="object"&&r0!==null&&r0.key!=null?(n0=""+r0.key,a0={"=":"=0",":":"=2"},"$"+n0.replace(/[=:]/g,function(i0){return a0[i0]})):e0.toString(36);var n0,a0}function qa(){}function Za(r0,e0,n0,a0,i0){var s0=typeof r0;s0!=="undefined"&&s0!=="boolean"||(r0=null);var o0,l0,c0=!1;if(r0===null)c0=!0;else switch(s0){case"bigint":case"string":case"number":c0=!0;break;case"object":switch(r0.$$typeof){case Sa:case Ia:c0=!0;break;case Oa:return Za((c0=r0._init)(r0._payload),e0,n0,a0,i0)}}if(c0)return i0=i0(r0),c0=a0===""?"."+Wa(r0,0):a0,Ga(i0)?(n0="",c0!=null&&(n0=c0.replace(Ja,"$&/")+"/"),Za(i0,e0,n0,"",function(f0){return f0})):i0!=null&&(Ha(i0)&&(o0=i0,l0=n0+(i0.key==null||r0&&r0.key===i0.key?"":(""+i0.key).replace(Ja,"$&/")+"/")+c0,i0=Ya(o0.type,l0,void 0,0,0,o0.props)),e0.push(i0)),1;c0=0;var u0,d0=a0===""?".":a0+":";if(Ga(r0))for(var h0=0;h0<r0.length;h0++)c0+=Za(a0=r0[h0],e0,n0,s0=d0+Wa(a0,h0),i0);else if(typeof(h0=(u0=r0)===null||typeof u0!="object"?null:typeof(u0=La&&u0[La]||u0["@@iterator"])=="function"?u0:null)=="function")for(r0=h0.call(r0),h0=0;!(a0=r0.next()).done;)c0+=Za(a0=a0.value,e0,n0,s0=d0+Wa(a0,h0++),i0);else if(s0==="object"){if(typeof r0.then=="function")return Za(function(f0){switch(f0.status){case"fulfilled":return f0.value;case"rejected":throw f0.reason;default:switch(typeof f0.status=="string"?f0.then(qa,qa):(f0.status="pending",f0.then(function(p0){f0.status==="pending"&&(f0.status="fulfilled",f0.value=p0)},function(p0){f0.status==="pending"&&(f0.status="rejected",f0.reason=p0)})),f0.status){case"fulfilled":return f0.value;case"rejected":throw f0.reason}}throw f0}(r0),e0,n0,a0,i0);throw e0=String(r0),Error("Objects are not valid as a React child (found: "+(e0==="[object Object]"?"object with keys {"+Object.keys(r0).join(", ")+"}":e0)+"). If you meant to render a collection of children, use an array instead.")}return c0}function Xa(r0,e0,n0){if(r0==null)return r0;var a0=[],i0=0;return Za(r0,a0,"","",function(s0){return e0.call(n0,s0,i0++)}),a0}function $a(r0){if(r0._status===-1){var e0=r0._result;(e0=e0()).then(function(n0){r0._status!==0&&r0._status!==-1||(r0._status=1,r0._result=n0)},function(n0){r0._status!==0&&r0._status!==-1||(r0._status=2,r0._result=n0)}),r0._status===-1&&(r0._status=0,r0._result=e0)}if(r0._status===1)return r0._result.default;throw r0._result}var er=typeof reportError=="function"?reportError:function(r0){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e0=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r0=="object"&&r0!==null&&typeof r0.message=="string"?String(r0.message):String(r0),error:r0});if(!window.dispatchEvent(e0))return}else if(typeof process=="object"&&typeof process.emit=="function")return void process.emit("uncaughtException",r0)};function tr(){}
vendor: 4,177 bytes, line 755
755va.Children={map:Xa,forEach:function(r0,e0,n0){Xa(r0,function(){e0.apply(this,arguments)},n0)},count:function(r0){var e0=0;return Xa(r0,function(){e0++}),e0},toArray:function(r0){return Xa(r0,function(e0){return e0})||[]},only:function(r0){if(!Ha(r0))throw Error("React.Children.only expected to receive a single React element child.");return r0}},va.Component=Fa,va.Fragment=Ca,va.Profiler=Ta,va.PureComponent=Pa,va.StrictMode=xa,va.Suspense=Na,va.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ja,va.__COMPILER_RUNTIME={__proto__:null,c:function(r0){return ja.H.useMemoCache(r0)}},va.cache=function(r0){return function(){return r0.apply(null,arguments)}},va.cloneElement=function(r0,e0,n0){if(r0==null)throw Error("The argument must be a React element, but you passed "+r0+".");var a0=Ra({},r0.props),i0=r0.key;if(e0!=null)for(s0 in e0.ref,e0.key!==void 0&&(i0=""+e0.key),e0)!Ka.call(e0,s0)||s0==="key"||s0==="__self"||s0==="__source"||s0==="ref"&&e0.ref===void 0||(a0[s0]=e0[s0]);var s0=arguments.length-2;if(s0===1)a0.children=n0;else if(1<s0){for(var o0=Array(s0),l0=0;l0<s0;l0++)o0[l0]=arguments[l0+2];a0.children=o0}return Ya(r0.type,i0,void 0,0,0,a0)},va.createContext=function(r0){return(r0={$$typeof:Ua,_currentValue:r0,_currentValue2:r0,_threadCount:0,Provider:null,Consumer:null}).Provider=r0,r0.Consumer={$$typeof:Ba,_context:r0},r0},va.createElement=function(r0,e0,n0){var a0,i0={},s0=null;if(e0!=null)for(a0 in e0.key!==void 0&&(s0=""+e0.key),e0)Ka.call(e0,a0)&&a0!=="key"&&a0!=="__self"&&a0!=="__source"&&(i0[a0]=e0[a0]);var o0=arguments.length-2;if(o0===1)i0.children=n0;else if(1<o0){for(var l0=Array(o0),c0=0;c0<o0;c0++)l0[c0]=arguments[c0+2];i0.children=l0}if(r0&&r0.defaultProps)for(a0 in o0=r0.defaultProps)i0[a0]===void 0&&(i0[a0]=o0[a0]);return Ya(r0,s0,void 0,0,0,i0)},va.createRef=function(){return{current:null}},va.forwardRef=function(r0){return{$$typeof:Ma,render:r0}},va.isValidElement=Ha,va.lazy=function(r0){return{$$typeof:Oa,_payload:{_status:-1,_result:r0},_init:$a}},va.memo=function(r0,e0){return{$$typeof:Da,type:r0,compare:e0===void 0?null:e0}},va.startTransition=function(r0){var e0=ja.T,n0={};ja.T=n0;try{var a0=r0(),i0=ja.S;i0!==null&&i0(n0,a0),typeof a0=="object"&&a0!==null&&typeof a0.then=="function"&&a0.then(tr,er)}catch(s0){er(s0)}finally{ja.T=e0}},va.unstable_useCacheRefresh=function(){return ja.H.useCacheRefresh()},va.use=function(r0){return ja.H.use(r0)},va.useActionState=function(r0,e0,n0){return ja.H.useActionState(r0,e0,n0)},va.useCallback=function(r0,e0){return ja.H.useCallback(r0,e0)},va.useContext=function(r0){return ja.H.useContext(r0)},va.useDebugValue=function(){},va.useDeferredValue=function(r0,e0){return ja.H.useDeferredValue(r0,e0)},va.useEffect=function(r0,e0,n0){var a0=ja.H;if(typeof n0=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a0.useEffect(r0,e0)},va.useId=function(){return ja.H.useId()},va.useImperativeHandle=function(r0,e0,n0){return ja.H.useImperativeHandle(r0,e0,n0)},va.useInsertionEffect=function(r0,e0){return ja.H.useInsertionEffect(r0,e0)},va.useLayoutEffect=function(r0,e0){return ja.H.useLayoutEffect(r0,e0)},va.useMemo=function(r0,e0){return ja.H.useMemo(r0,e0)},va.useOptimistic=function(r0,e0){return ja.H.useOptimistic(r0,e0)},va.useReducer=function(r0,e0,n0){return ja.H.useReducer(r0,e0,n0)},va.useRef=function(r0){return ja.H.useRef(r0)},va.useState=function(r0){return ja.H.useState(r0)},va.useSyncExternalStore=function(r0,e0,n0){return ja.H.useSyncExternalStore(r0,e0,n0)},va.useTransition=function(){return ja.H.useTransition()},va.version="19.1.0",ka.exports=va;var nr=ka.exports,ar={exports:{}},rr={},ir=nr;function Ar(r0){var e0="https://react.dev/errors/"+r0;if(1<arguments.length){e0+="?args[]="+encodeURIComponent(arguments[1]);for(var n0=2;n0<arguments.length;n0++)e0+="&args[]="+encodeURIComponent(arguments[n0])}return"Minified React error #"+r0+"; visit "+e0+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function sr(){}var or={d:{f:sr,r:function(){throw Error(Ar(522))},D:sr,C:sr,L:sr,m:sr,X:sr,S:sr,M:sr},p:0,findDOMNode:null}
755,lr=Symbol.for("react.portal"),cr=ir.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ur(r0,e0){return r0==="font"?"":typeof e0=="string"?e0==="use-credentials"?e0:"":void 0}rr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=or,rr.createPortal=function(r0,e0){var n0=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e0||e0.nodeType!==1&&e0.nodeType!==9&&e0.nodeType!==11)throw Error(Ar(299));return function(a0,i0,s0){var o0=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lr,key:o0==null?null:""+o0,children:a0,containerInfo:i0,implementation:s0}}(r0,e0,null,n0)},rr.flushSync=function(r0){var e0=cr.T,n0=or.p;try{if(cr.T=null,or.p=2,r0)return r0()}finally{cr.T=e0,or.p=n0,or.d.f()}},rr.preconnect=function(r0,e0){typeof r0=="string"&&(e0=e0?typeof(e0=e0.crossOrigin)=="string"?e0==="use-credentials"?e0:"":void 0:null,or.d.C(r0,e0))},rr.prefetchDNS=function(r0){typeof r0=="string"&&or.d.D(r0)},rr.preinit=function(r0,e0){if(typeof r0=="string"&&e0&&typeof e0.as=="string"){var n0=e0.as,a0=ur(n0,e0.crossOrigin),i0=typeof e0.integrity=="string"?e0.integrity:void 0,s0=typeof e0.fetchPriority=="string"?e0.fetchPriority:void 0;n0==="style"?or.d.S(r0,typeof e0.precedence=="string"?e0.precedence:void 0,{crossOrigin:a0,integrity:i0,fetchPriority:s0}
vendor: 5,787 bytes, line 755
755):n0==="script"&&or.d.X(r0,{crossOrigin:a0,integrity:i0,fetchPriority:s0,nonce:typeof e0.nonce=="string"?e0.nonce:void 0})}},rr.preinitModule=function(r0,e0){if(typeof r0=="string")if(typeof e0=="object"&&e0!==null){if(e0.as==null||e0.as==="script"){var n0=ur(e0.as,e0.crossOrigin);or.d.M(r0,{crossOrigin:n0,integrity:typeof e0.integrity=="string"?e0.integrity:void 0,nonce:typeof e0.nonce=="string"?e0.nonce:void 0})}}else e0==null&&or.d.M(r0)},rr.preload=function(r0,e0){if(typeof r0=="string"&&typeof e0=="object"&&e0!==null&&typeof e0.as=="string"){var n0=e0.as,a0=ur(n0,e0.crossOrigin);or.d.L(r0,n0,{crossOrigin:a0,integrity:typeof e0.integrity=="string"?e0.integrity:void 0,nonce:typeof e0.nonce=="string"?e0.nonce:void 0,type:typeof e0.type=="string"?e0.type:void 0,fetchPriority:typeof e0.fetchPriority=="string"?e0.fetchPriority:void 0,referrerPolicy:typeof e0.referrerPolicy=="string"?e0.referrerPolicy:void 0,imageSrcSet:typeof e0.imageSrcSet=="string"?e0.imageSrcSet:void 0,imageSizes:typeof e0.imageSizes=="string"?e0.imageSizes:void 0,media:typeof e0.media=="string"?e0.media:void 0})}},rr.preloadModule=function(r0,e0){if(typeof r0=="string")if(e0){var n0=ur(e0.as,e0.crossOrigin);or.d.m(r0,{as:typeof e0.as=="string"&&e0.as!=="script"?e0.as:void 0,crossOrigin:n0,integrity:typeof e0.integrity=="string"?e0.integrity:void 0})}else or.d.m(r0)},rr.requestFormReset=function(r0){or.d.r(r0)},rr.unstable_batchedUpdates=function(r0,e0){return r0(e0)},rr.useFormState=function(r0,e0,n0){return cr.H.useFormState(r0,e0,n0)},rr.useFormStatus=function(){return cr.H.useHostTransitionStatus()},rr.version="19.1.0",function r0(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE=="function")try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch{}}(),ar.exports=rr;var dr=ar.exports,hr=t(dr),pr=ya,fr=nr,gr=dr;function mr(r0){var e0="https://react.dev/errors/"+r0;if(1<arguments.length){e0+="?args[]="+encodeURIComponent(arguments[1]);for(var n0=2;n0<arguments.length;n0++)e0+="&args[]="+encodeURIComponent(arguments[n0])}return"Minified React error #"+r0+"; visit "+e0+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function wr(r0){return!(!r0||r0.nodeType!==1&&r0.nodeType!==9&&r0.nodeType!==11)}function br(r0){var e0=r0,n0=r0;if(r0.alternate)for(;e0.return;)e0=e0.return;else{r0=e0;do 4098&(e0=r0).flags&&(n0=e0.return),r0=e0.return;while(r0)}return e0.tag===3?n0:null}function Er(r0){if(r0.tag===13){var e0=r0.memoizedState;if(e0===null&&(r0=r0.alternate)!==null&&(e0=r0.memoizedState),e0!==null)return e0.dehydrated}return null}function yr(r0){if(br(r0)!==r0)throw Error(mr(188))}function kr(r0){var e0=r0.tag;if(e0===5||e0===26||e0===27||e0===6)return r0;for(r0=r0.child;r0!==null;){if((e0=kr(r0))!==null)return e0;r0=r0.sibling}return null}var vr=Object.assign,Sr=Symbol.for("react.element"),Ir=Symbol.for("react.transitional.element"),Cr=Symbol.for("react.portal"),xr=Symbol.for("react.fragment"),Tr=Symbol.for("react.strict_mode"),Br=Symbol.for("react.profiler"),Ur=Symbol.for("react.provider"),Mr=Symbol.for("react.consumer"),Nr=Symbol.for("react.context"),Dr=Symbol.for("react.forward_ref"),Or=Symbol.for("react.suspense"),Lr=Symbol.for("react.suspense_list"),_r=Symbol.for("react.memo"),Rr=Symbol.for("react.lazy"),zr=Symbol.for("react.activity"),Fr=Symbol.for("react.memo_cache_sentinel"),Qr=Symbol.iterator;function Pr(r0){return r0===null||typeof r0!="object"?null:typeof(r0=Qr&&r0[Qr]||r0["@@iterator"])=="function"?r0:null}var Vr=Symbol.for("react.client.reference");function Gr(r0){if(r0==null)return null;if(typeof r0=="function")return r0.$$typeof===Vr?null:r0.displayName||r0.name||null;if(typeof r0=="string")return r0;switch(r0){case xr:return"Fragment";case Br:return"Profiler";case Tr:return"StrictMode";case Or:return"Suspense";case Lr:return"SuspenseList";case zr:return"Activity"}if(typeof r0=="object")switch(r0.$$typeof){case Cr:return"Portal";case Nr:return(r0.displayName||"Context")+".Provider";case Mr:return(r0._context.displayName||"Context")+".Consumer";case Dr:var e0=r0.render;return(r0=r0.displayName)||(r0=(r0=e0.displayName||e0.name||"")!==""?"ForwardRef("+r0+")":"ForwardRef"),r0;case _r:return(e0=r0.displayName||null)!==null?e0:Gr(r0.type)||"Memo";case Rr:e0=r0._payload,r0=r0._init;try{return Gr(r0(e0))}catch{}}return null}var jr=Array.isArray,Kr=fr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Yr=gr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Hr={pending:!1,data:null,method:null,action:null},Jr=[],Wr=-1;function qr(r0){return{current:r0}}function Zr(r0){0>Wr||(r0.current=Jr[Wr],Jr[Wr]=null,Wr--)}function Xr(r0,e0){Wr++,Jr[Wr]=r0.current,r0.current=e0}var $r=qr(null),ei=qr(null),ti=qr(null),ni=qr(null);function ai(r0,e0){switch(Xr(ti,e0),Xr(ei,r0),Xr($r,null),e0.nodeType){case 9:case 11:r0=(r0=e0.documentElement)&&(r0=r0.namespaceURI)?fg(r0):0;break;default:if(r0=e0.tagName,e0=e0.namespaceURI)r0=gg(e0=fg(e0),r0);else switch(r0){case"svg":r0=1;break;case"math":r0=2;break;default:r0=0}}Zr($r),Xr($r,r0)}function ri(){Zr($r),Zr(ei),Zr(ti)}function ii(r0){r0.memoizedState!==null&&Xr(ni,r0);var e0=$r.current,n0=gg(e0,r0.type);e0!==n0&&(Xr(ei,r0),Xr($r,n0))}function Ai(r0){ei.current===r0&&(Zr($r),Zr(ei)),ni.current===r0&&(Zr(ni),im._currentValue=Hr)}var si=Object.prototype.hasOwnProperty,oi=pr.unstable_scheduleCallback,li=pr.unstable_cancelCallback,ci=pr.unstable_shouldYield,ui=pr.unstable_requestPaint,di=pr.unstable_now,hi=pr.unstable_getCurrentPriorityLevel,pi=pr.unstable_ImmediatePriority,fi=pr.unstable_UserBlockingPriority,gi=pr.unstable_NormalPriority,mi=pr.unstable_LowPriority,wi=pr.unstable_IdlePriority,bi=pr.log,Ei=pr.unstable_setDisableYieldValue,yi=null,ki=null;
755function vi(r0){if(typeof bi=="function"&&Ei(r0),ki&&typeof ki.setStrictMode=="function")try{ki.setStrictMode(yi,r0)}catch{}}var Si=Math.clz32?Math.clz32:function(r0){return(r0>>>=0)===0?32:31-(Ii(r0)/Ci|0)|0},Ii=Math.log,Ci=Math.LN2,xi=256,Ti=4194304;function Bi(r0){var e0=42&r0;if(e0!==0)return e0;switch(r0&-r0){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194048&r0;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&r0;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r0}}function Ui(r0,e0,n0){var a0=r0.pendingLanes;if(a0===0)return 0;var i0=0,s0=r0.suspendedLanes,o0=r0.pingedLanes;r0=r0.warmLanes;var l0=134217727&a0;return l0!==0?(a0=l0&~s0)!==0?i0=Bi(a0):(o0&=l0)!==0?i0=Bi(o0):n0||(n0=l0&~r0)!==0&&(i0=Bi(n0)):(l0=a0&~s0)!==0?i0=Bi(l0):o0!==0?i0=Bi(o0):n0||(n0=a0&~r0)!==0&&(i0=Bi(n0)),i0===0?0:e0!==0&&e0!==i0&&!(e0&s0)&&((s0=i0&-i0)>=(n0=e0&-e0)||s0===32&&4194048&n0)?e0:i0}function Mi(r0,e0){return(r0.pendingLanes&~(r0.suspendedLanes&~r0.pingedLanes)&e0)===0}function Ni(r0,e0){switch(r0){case 1:case 2:case 4:case 8:case 64:return e0+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e0+5e3;default:return-1}}function Di(){var r0=xi;return!(4194048&(xi<<=1))&&(xi=256),r0}function Oi(){var r0=Ti;return!(62914560&(Ti<<=1))&&(Ti=4194304),r0}function Li(r0){for(var e0=[],n0=0;31>n0;n0++)e0.push(r0);return e0}function _i(r0,e0){r0.pendingLanes|=e0,e0!==268435456&&(r0.suspendedLanes=0,r0.pingedLanes=0,r0.warmLanes=0)}function Ri(r0,e0,n0){r0.pendingLanes|=e0,r0.suspendedLanes&=~e0;var a0=31-Si(e0);r0.entangledLanes|=e0,r0.entanglements[a0]=1073741824|r0.entanglements[a0]|4194090&n0}function zi(r0,e0){var n0=r0.entangledLanes|=e0;for(r0=r0.entanglements;n0;){var a0=31-Si(n0),i0=1<<a0;i0&e0|r0[a0]&e0&&(r0[a0]|=e0),n0&=~i0}}function Fi(r0){switch(r0){case 2:r0=1;break;case 8:r0=4;break;case 32:r0=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r0=128;break;case 268435456:r0=134217728;break;default:r0=0}return r0}function Qi(r0){return 2<(r0&=-r0)?8<r0?134217727&r0?32:268435456:8:2}function Pi(){var r0=Yr.p;return r0!==0?r0:(r0=window.event)===void 0?32:Em(r0.type)}var Vi=Math.random().toString(36).slice(2),Gi="__reactFiber$"+Vi,ji="__reactProps$"+Vi,Ki="__reactContainer$"+Vi,Yi="__reactEvents$"+Vi,Hi="__reactListeners$"+Vi,Ji="__reactHandles$"+Vi,Wi="__reactResources$"+Vi,qi="__reactMarker$"+Vi;function Zi(r0){delete r0[Gi],delete r0[ji],delete r0[Yi],delete r0[Hi],delete r0[Ji]}function Xi(r0){var e0=r0[Gi];if(e0)return e0;for(var n0=r0.parentNode;n0;){if(e0=n0[Ki]||n0[Gi]){if(n0=e0.alternate,e0.child!==null||n0!==null&&n0.child!==null)for(r0=Ug(r0);r0!==null;){if(n0=r0[Gi])return n0;r0=Ug(r0)}return e0}n0=(r0=n0).parentNode}return null}function $i(r0){if(r0=r0[Gi]||r0[Ki]){var e0=r0.tag;if(e0===5||e0===6||e0===13||e0===26||e0===27||e0===3)return r0}return null}function eA(r0){var e0=r0.tag;if(e0===5||e0===26||e0===27||e0===6)return r0.stateNode;throw Error(mr(33))}function tA(r0){var e0=r0[Wi];return e0||(e0=r0[Wi]={hoistableStyles:new Map,hoistableScripts:new Map}),e0}function nA(r0){r0[qi]=!0}var aA=new Set,rA={};function iA(r0,e0){AA(r0,e0),AA(r0+"Capture",e0)}function AA(r0,e0){for(rA[r0]=e0,r0=0;r0<e0.length;r0++)aA.add(e0[r0])}var sA,oA,lA=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
755037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),cA={},uA={};function dA(r0,e0,n0){if(i0=e0,si.call(uA,i0)||!si.call(cA,i0)&&(lA.test(i0)?uA[i0]=!0:(cA[i0]=!0,0)))if(n0===null)r0.removeAttribute(e0);else{switch(typeof n0){case"undefined":case"function":case"symbol":return void r0.removeAttribute(e0);case"boolean":var a0=e0.toLowerCase().slice(0,5);if(a0!=="data-"&&a0!=="aria-")return void r0.removeAttribute(e0)}r0.setAttribute(e0,""+n0)}var i0}function hA(r0,e0,n0){if(n0===null)r0.removeAttribute(e0);else{switch(typeof n0){case"undefined":case"function":case"symbol":case"boolean":return void r0.removeAttribute(e0)}r0.setAttribute(e0,""+n0)}}function pA(r0,e0,n0,a0){if(a0===null)r0.removeAttribute(n0);else{switch(typeof a0){case"undefined":case"function":case"symbol":case"boolean":return void r0.removeAttribute(n0)}r0.setAttributeNS(e0,n0,""+a0)}}function fA(r0){if(sA===void 0)try{throw Error()}catch(n0){var e0=n0.stack.trim().match(/\n( *(at )?)/);sA=e0&&e0[1]||"",oA=-1<n0.stack.indexOf(` 756 at`)?" (<anonymous>)":-1<n0.stack.indexOf("@")?"@unknown:0:0":""}return` 757`+sA+r0+oA}var gA=!1;function mA(r0,e0){if(!r0||gA)return"";gA=!0;var n0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a0={DetermineComponentFrameRoot:function(){try{if(e0){var h0=function(){throw Error()};if(Object.defineProperty(h0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h0,[])}catch(p0){var f0=p0}Reflect.construct(r0,[],h0)}else{try{h0.call()}catch(p0){f0=p0}r0.call(h0.prototype)}}else{try{throw Error()}catch(p0){f0=p0}(h0=r0())&&typeof h0.catch=="function"&&h0.catch(function(){})}}catch(p0){if(p0&&f0&&typeof p0.stack=="string")return[p0.stack,f0.stack]}return[null,null]}};a0.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i0=Object.getOwnPropertyDescriptor(a0.DetermineComponentFrameRoot,"name");i0&&i0.configurable&&Object.defineProperty(a0.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s0=a0.DetermineComponentFrameRoot(),o0=s0[0],l0=s0[1];if(o0&&l0){var c0=o0.split(` 758`),u0=l0.split(` 759`);for(i0=a0=0;a0<c0.length&&!c0[a0].includes("DetermineComponentFrameRoot");)a0++;for(;i0<u0.length&&!u0[i0].includes("DetermineComponentFrameRoot");)i0++;if(a0===c0.length||i0===u0.length)for(a0=c0.length-1,i0=u0.length-1;1<=a0&&0<=i0&&c0[a0]!==u0[i0];)i0--;for(;1<=a0&&0<=i0;a0--,i0--)if(c0[a0]!==u0[i0]){if(a0!==1||i0!==1)do if(a0--,0>--i0||c0[a0]!==u0[i0]){var d0=` 760`+c0[a0].replace(" at new "," at ");return r0.displayName&&d0.includes("<anonymous>")&&(d0=d0.replace("<anonymous>",r0.displayName)),d0}while(1<=a0&&0<=i0);break}}}finally{gA=!1,Error.prepareStackTrace=n0}return(n0=r0?r0.displayName||r0.name:"")?fA(n0):""}function wA(r0){switch(r0.tag){case 26:case 27:case 5:return fA(r0.type);case 16:return fA("Lazy");case 13:return fA("Suspense");case 19:return fA("SuspenseList");case 0:case 15:return mA(r0.type,!1);case 11:return mA(r0.type.render,!1);case 1:return mA(r0.type,!0);case 31:return fA("Activity");default:return""}}function bA(r0){try{var e0="";do e0+=wA(r0),r0=r0.return;while(r0);return e0}catch(n0){return` 761Error generating stack: `+n0.message+` 762`+n0.stack}}function EA(r0){switch(typeof r0){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return r0;default:return""}}function yA(r0){var e0=r0.type;return(r0=r0.nodeName)&&r0.toLowerCase()==="input"&&(e0==="checkbox"||e0==="radio")}function kA(r0){r0._valueTracker||(r0._valueTracker=function(e0){var n0=yA(e0)?"checked":"value",a0=Object.getOwnPropertyDescriptor(e0.constructor.prototype,n0),i0=""+e0[n0];if(!e0.hasOwnProperty(n0)&&a0!==void 0&&typeof a0.get=="function"&&typeof a0.set=="function"){var s0=a0.get,o0=a0.set;return Object.defineProperty(e0,n0,{configurable:!0,get:function(){return s0.call(this)},set:function(l0){i0=""+l0,o0.call(this,l0)}}),Object.defineProperty(e0,n0,{enumerable:a0.enumerable}),{getValue:function(){return i0},setValue:function(l0){i0=""+l0},stopTracking:function(){e0._valueTracker=null,delete e0[n0]}}}}(r0))}function vA(r0){if(!r0)return!1;var e0=r0._valueTracker;if(!e0)return!0;var n0=e0.getValue(),a0="";return r0&&(a0=yA(r0)?r0.checked?"true":"false":r0.value),(r0=a0)!==n0&&(e0.setValue(r0),!0)}function SA(r0){if((r0=r0||(typeof document<"u"?document:void 0))===void 0)return null;try{return r0.activeElement||r0.body}catch{return r0.body}}var IA=/[\n"\\]/g;function CA(r0){return r0.replace(IA,function(e0){return"\\"+e0.charCo
762deAt(0).toString(16)+" "})}function xA(r0,e0,n0,a0,i0,s0,o0,l0){r0.name="",o0!=null&&typeof o0!="function"&&typeof o0!="symbol"&&typeof o0!="boolean"?r0.type=o0:r0.removeAttribute("type"),e0!=null?o0==="number"?(e0===0&&r0.value===""||r0.value!=e0)&&(r0.value=""+EA(e0)):r0.value!==""+EA(e0)&&(r0.value=""+EA(e0)):o0!=="submit"&&o0!=="reset"||r0.removeAttribute("value"),e0!=null?BA(r0,o0,EA(e0)):n0!=null?BA(r0,o0,EA(n0)):a0!=null&&r0.removeAttribute("value"),i0==null&&s0!=null&&(r0.defaultChecked=!!s0),i0!=null&&(r0.checked=i0&&typeof i0!="function"&&typeof i0!="symbol"),l0!=null&&typeof l0!="function"&&typeof l0!="symbol"&&typeof l0!="boolean"?r0.name=""+EA(l0):r0.removeAttribute("name")}function TA(r0,e0,n0,a0,i0,s0,o0,l0){if(s0!=null&&typeof s0!="function"&&typeof s0!="symbol"&&typeof s0!="boolean"&&(r0.type=s0),e0!=null||n0!=null){if((s0==="submit"||s0==="reset")&&e0==null)return;n0=n0!=null?""+EA(n0):"",e0=e0!=null?""+EA(e0):n0,l0||e0===r0.value||(r0.value=e0),r0.defaultValue=e0}a0=typeof(a0=a0??i0)!="function"&&typeof a0!="symbol"&&!!a0,r0.checked=l0?r0.checked:!!a0,r0.defaultChecked=!!a0,o0!=null&&typeof o0!="function"&&typeof o0!="symbol"&&typeof o0!="boolean"&&(r0.name=o0)}function BA(r0,e0,n0){e0==="number"&&SA(r0.ownerDocument)===r0||r0.defaultValue===""+n0||(r0.defaultValue=""+n0)}function UA(r0,e0,n0,a0){if(r0=r0.options,e0){e0={};for(var i0=0;i0<n0.length;i0++)e0["$"+n0[i0]]=!0;for(n0=0;n0<r0.length;n0++)i0=e0.hasOwnProperty("$"+r0[n0].value),r0[n0].selected!==i0&&(r0[n0].selected=i0),i0&&a0&&(r0[n0].defaultSelected=!0)}else{for(n0=""+EA(n0),e0=null,i0=0;i0<r0.length;i0++){if(r0[i0].value===n0)return r0[i0].selected=!0,void(a0&&(r0[i0].defaultSelected=!0));e0!==null||r0[i0].disabled||(e0=r0[i0])}e0!==null&&(e0.selected=!0)}}function MA(r0,e0,n0){e0==null||((e0=""+EA(e0))!==r0.value&&(r0.value=e0),n0!=null)?r0.defaultValue=n0!=null?""+EA(n0):"":r0.defaultValue!==e0&&(r0.defaultValue=e0)}function NA(r0,e0,n0,a0){if(e0==null){if(a0!=null){if(n0!=null)throw Error(mr(92));if(jr(a0)){if(1<a0.length)throw Error(mr(93));a0=a0[0]}n0=a0}n0==null&&(n0=""),e0=n0}n0=EA(e0),r0.defaultValue=n0,(a0=r0.textContent)===n0&&a0!==""&&a0!==null&&(r0.value=a0)}function DA(r0,e0){if(e0){var n0=r0.firstChild;if(n0&&n0===r0.lastChild&&n0.nodeType===3)return void(n0.nodeValue=e0)}r0.textContent=e0}var OA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function LA(r0,e0,n0){var a0=e0.indexOf("--")===0;n0==null||typeof n0=="boolean"||n0===""?a0?r0.setProperty(e0,""):e0==="float"?r0.cssFloat="":r0[e0]="":a0?r0.setProperty(e0,n0):typeof n0!="number"||n0===0||OA.has(e0)?e0==="float"?r0.cssFloat=n0:r0[e0]=(""+n0).trim():r0[e0]=n0+"px"}function _A(r0,e0,n0){if(e0!=null&&typeof e0!="object")throw Error(mr(62));if(r0=r0.style,n0!=null){for(var a0 in n0)!n0.hasOwnProperty(a0)||e0!=null&&e0.hasOwnProperty(a0)||(a0.indexOf("--")===0?r0.setProperty(a0,""):a0==="float"?r0.cssFloat="":r0[a0]="");for(var i0 in e0)a0=e0[i0],e0.hasOwnProperty(i0)&&n0[i0]!==a0&&LA(r0,i0,a0)}else for(var s0 in e0)e0.hasOwnProperty(s0)&&LA(r0,s0,e0[s0])}function RA(r0){if(r0.indexOf("-")===-1)return!1;switch(r0){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 zA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
762dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),FA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function QA(r0){return FA.test(""+r0)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r0}var PA=null;function VA(r0){return(r0=r0.target||r0.srcElement||window).correspondingUseElement&&(r0=r0.correspondingUseElement),r0.nodeType===3?r0.parentNode:r0}var GA=null,jA=null;function KA(r0){var e0=$i(r0);if(e0&&(r0=e0.stateNode)){var n0=r0[ji]||null;e:switch(r0=e0.stateNode,e0.type){case"input":if(xA(r0,n0.value,n0.defaultValue,n0.defaultValue,n0.checked,n0.defaultChecked,n0.type,n0.name),e0=n0.name,n0.type==="radio"&&e0!=null){for(n0=r0;n0.parentNode;)n0=n0.parentNode;for(n0=n0.querySelectorAll('input[name="'+CA(""+e0)+'"][type="radio"]'),e0=0;e0<n0.length;e0++){var a0=n0[e0];if(a0!==r0&&a0.form===r0.form){var i0=a0[ji]||null;if(!i0)throw Error(mr(90));xA(a0,i0.value,i0.defaultValue,i0.defaultValue,i0.checked,i0.defaultChecked,i0.type,i0.name)}}for(e0=0;e0<n0.length;e0++)(a0=n0[e0]).form===r0.form&&vA(a0)}break e;case"textarea":MA(r0,n0.value,n0.defaultValue);break e;case"select":(e0=n0.value)!=null&&UA(r0,!!n0.multiple,e0,!1)}}}var YA=!1;function HA(r0,e0,n0){if(YA)return r0(e0,n0);YA=!0;try{return r0(e0)}finally{if(YA=!1,(GA!==null||jA!==null)&&(Zp(),GA&&(e0=GA,r0=jA,jA=GA=null,KA(e0),r0)))for(e0=0;e0<r0.length;e0++)KA(r0[e0])}}function JA(r0,e0){var n0=r0.stateNode;if(n0===null)return null;var a0=n0[ji]||null;if(a0===null)return null;n0=a0[e0];e:switch(e0){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a0=!a0.disabled)||(a0=!((r0=r0.type)==="button"||r0==="input"||r0==="select"||r0==="textarea")),r0=!a0;break e;default:r0=!1}if(r0)return null;if(n0&&typeof n0!="function")throw Error(mr(231,e0,typeof n0));return n0}var WA=!(typeof window>"u"||window.document===void 0||window.document.createElement===void 0),qA=!1;if(WA)try{var ZA={};Object.defineProperty(ZA,"passive",{get:function(){qA=!0}}),window.addEventListener("test",ZA,ZA),window.removeEventListener("test",ZA,ZA)}catch(r0){qA=!1}var XA=null,$A=null,es=null;function ts(){if(es)return es;var r0,e0,n0=$A,a0=n0.length,i0="value"in XA?XA.value:XA.textContent,s0=i0.length;for(r0=0;r0<a0&&n0[r0]===i0[r0];r0++);var o0=a0-r0;for(e0=1;e0<=o0&&n0[a0-e0]===i0[s0-e0];e0++);return es=i0.slice(r0,1<e0?1-e0:void 0)}function ns(r0){var e0=r0.keyCode;
vendor: 5,063 bytes, line 762
762return"charCode"in r0?(r0=r0.charCode)===0&&e0===13&&(r0=13):r0=e0,r0===10&&(r0=13),32<=r0||r0===13?r0:0}function as(){return!0}function rs(){return!1}function is(r0){function e0(n0,a0,i0,s0,o0){for(var l0 in this._reactName=n0,this._targetInst=i0,this.type=a0,this.nativeEvent=s0,this.target=o0,this.currentTarget=null,r0)r0.hasOwnProperty(l0)&&(n0=r0[l0],this[l0]=n0?n0(s0):s0[l0]);return this.isDefaultPrevented=(s0.defaultPrevented!=null?s0.defaultPrevented:s0.returnValue===!1)?as:rs,this.isPropagationStopped=rs,this}return vr(e0.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n0=this.nativeEvent;n0&&(n0.preventDefault?n0.preventDefault():typeof n0.returnValue!="unknown"&&(n0.returnValue=!1),this.isDefaultPrevented=as)},stopPropagation:function(){var n0=this.nativeEvent;n0&&(n0.stopPropagation?n0.stopPropagation():typeof n0.cancelBubble!="unknown"&&(n0.cancelBubble=!0),this.isPropagationStopped=as)},persist:function(){},isPersistent:as}),e0}var As,ss,os,ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r0){return r0.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=is(ls),us=vr({},ls,{view:0,detail:0}),ds=is(us),hs=vr({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ss,button:0,buttons:0,relatedTarget:function(r0){return r0.relatedTarget===void 0?r0.fromElement===r0.srcElement?r0.toElement:r0.fromElement:r0.relatedTarget},movementX:function(r0){return"movementX"in r0?r0.movementX:(r0!==os&&(os&&r0.type==="mousemove"?(As=r0.screenX-os.screenX,ss=r0.screenY-os.screenY):ss=As=0,os=r0),As)},movementY:function(r0){return"movementY"in r0?r0.movementY:ss}}),ps=is(hs),fs=is(vr({},hs,{dataTransfer:0})),gs=is(vr({},us,{relatedTarget:0})),ms=is(vr({},ls,{animationName:0,elapsedTime:0,pseudoElement:0})),ws=is(vr({},ls,{clipboardData:function(r0){return"clipboardData"in r0?r0.clipboardData:window.clipboardData}})),bs=is(vr({},ls,{data:0})),Es={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ys={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"},ks={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vs(r0){var e0=this.nativeEvent;return e0.getModifierState?e0.getModifierState(r0):!!(r0=ks[r0])&&!!e0[r0]}function Ss(){return vs}var Is=is(vr({},us,{key:function(r0){if(r0.key){var e0=Es[r0.key]||r0.key;if(e0!=="Unidentified")return e0}return r0.type==="keypress"?(r0=ns(r0))===13?"Enter":String.fromCharCode(r0):r0.type==="keydown"||r0.type==="keyup"?ys[r0.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ss,charCode:function(r0){return r0.type==="keypress"?ns(r0):0},keyCode:function(r0){return r0.type==="keydown"||r0.type==="keyup"?r0.keyCode:0},which:function(r0){return r0.type==="keypress"?ns(r0):r0.type==="keydown"||r0.type==="keyup"?r0.keyCode:0}})),Cs=is(vr({},hs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xs=is(vr({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ss})),Ts=is(vr({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bs=is(vr({},hs,{deltaX:function(r0){return"deltaX"in r0?r0.deltaX:"wheelDeltaX"in r0?-r0.wheelDeltaX:0},deltaY:function(r0){return"deltaY"in r0?r0.deltaY:"wheelDeltaY"in r0?-r0.wheelDeltaY:"wheelDelta"in r0?-r0.wheelDelta:0},deltaZ:0,deltaMode:0})),Us=is(vr({},ls,{newState:0,oldState:0})),Ms=[9,13,27,32],Ns=WA&&"CompositionEvent"in window,Ds=null;WA&&"documentMode"in document&&(Ds=document.documentMode);var Os=WA&&"TextEvent"in window&&!Ds,Ls=WA&&(!Ns||Ds&&8<Ds&&11>=Ds),_s=" ",Rs=!1;function zs(r0,e0){switch(r0){case"keyup":return Ms.indexOf(e0.keyCode)!==-1;case"keydown":return e0.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fs(r0){return typeof(r0=r0.detail)=="object"&&"data"in r0?r0.data:null}var Qs=!1,Ps={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 Vs(r0){var e0=r0&&r0.nodeName&&r0.nodeName.toLowerCase();return e0==="input"?!!Ps[r0.type]:e0==="textarea"}function Gs(r0,e0,n0,a0){GA?jA?jA.push(a0):jA=[a0]:GA=a0,0<(e0=tg(e0,"onChange")).length&&(n0=new cs("onChange","change",null,n0,a0),r0.push({event:n0,listeners:e0}))}var js=null,Ks=null;function Ys(r0){Hf(r0,0)}function Hs(r0){if(vA(eA(r0)))return r0}function Js(r0,e0){if(r0==="change")return e0}var Ws=!1;if(WA){var qs;
762if(WA){var Zs="oninput"in document;if(!Zs){var Xs=document.createElement("div");Xs.setAttribute("oninput","return;"),Zs=typeof Xs.oninput=="function"}qs=Zs}else qs=!1;Ws=qs&&(!document.documentMode||9<document.documentMode)}function $s(){js&&(js.detachEvent("onpropertychange",eo),Ks=js=null)}function eo(r0){if(r0.propertyName==="value"&&Hs(Ks)){var e0=[];Gs(e0,Ks,r0,VA(r0)),HA(Ys,e0)}}function to(r0,e0,n0){r0==="focusin"?($s(),Ks=n0,(js=e0).attachEvent("onpropertychange",eo)):r0==="focusout"&&$s()}function no(r0){if(r0==="selectionchange"||r0==="keyup"||r0==="keydown")return Hs(Ks)}function ao(r0,e0){if(r0==="click")return Hs(e0)}function ro(r0,e0){if(r0==="input"||r0==="change")return Hs(e0)}var io=typeof Object.is=="function"?Object.is:function(r0,e0){return r0===e0&&(r0!==0||1/r0==1/e0)||r0!=r0&&e0!=e0};function Ao(r0,e0){if(io(r0,e0))return!0;if(typeof r0!="object"||r0===null||typeof e0!="object"||e0===null)return!1;var n0=Object.keys(r0),a0=Object.keys(e0);if(n0.length!==a0.length)return!1;for(a0=0;a0<n0.length;a0++){var i0=n0[a0];if(!si.call(e0,i0)||!io(r0[i0],e0[i0]))return!1}return!0}function so(r0){for(;r0&&r0.firstChild;)r0=r0.firstChild;return r0}function oo(r0,e0){var n0,a0=so(r0);for(r0=0;a0;){if(a0.nodeType===3){if(n0=r0+a0.textContent.length,r0<=e0&&n0>=e0)return{node:a0,offset:e0-r0};r0=n0}e:{for(;a0;){if(a0.nextSibling){a0=a0.nextSibling;break e}a0=a0.parentNode}a0=void 0}a0=so(a0)}}function lo(r0,e0){return!(!r0||!e0)&&(r0===e0||(!r0||r0.nodeType!==3)&&(e0&&e0.nodeType===3?lo(r0,e0.parentNode):"contains"in r0?r0.contains(e0):!!r0.compareDocumentPosition&&!!(16&r0.compareDocumentPosition(e0))))}function co(r0){for(var e0=SA((r0=r0!=null&&r0.ownerDocument!=null&&r0.ownerDocument.defaultView!=null?r0.ownerDocument.defaultView:window).document);e0 instanceof r0.HTMLIFrameElement;){try{var n0=typeof e0.contentWindow.location.href=="string"}catch{n0=!1}if(!n0)break;e0=SA((r0=e0.contentWindow).document)}return e0}function uo(r0){var e0=r0&&r0.nodeName&&r0.nodeName.toLowerCase();return e0&&(e0==="input"&&(r0.type==="text"||r0.type==="search"||r0.type==="tel"||r0.type==="url"||r0.type==="password")||e0==="textarea"||r0.contentEditable==="true")}var ho=WA&&"documentMode"in document&&11>=document.documentMode,po=null,fo=null,go=null,mo=!1;function wo(r0,e0,n0){var a0=n0.window===n0?n0.document:n0.nodeType===9?n0:n0.ownerDocument;mo||po==null||po!==SA(a0)||(a0="selectionStart"in(a0=po)&&uo(a0)?{start:a0.selectionStart,end:a0.selectionEnd}:{anchorNode:(a0=(a0.ownerDocument&&a0.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:a0.anchorOffset,focusNode:a0.focusNode,focusOffset:a0.focusOffset},go&&Ao(go,a0)||(go=a0,0<(a0=tg(fo,"onSelect")).length&&(e0=new cs("onSelect","select",null,e0,n0),r0.push({event:e0,listeners:a0}),e0.target=po)))}function bo(r0,e0){var n0={};return n0[r0.toLowerCase()]=e0.toLowerCase(),n0["Webkit"+r0]="webkit"+e0,n0["Moz"+r0]="moz"+e0,n0}var Eo={animationend:bo("Animation","AnimationEnd"),animationiteration:bo("Animation","AnimationIteration"),animationstart:bo("Animation","AnimationStart"),transitionrun:bo("Transition","TransitionRun"),transitionstart:bo("Transition","TransitionStart"),transitioncancel:bo("Transition","TransitionCancel"),transitionend:bo("Transition","TransitionEnd")},yo={},ko={};function vo(r0){if(yo[r0])return yo[r0];if(!Eo[r0])return r0;var e0,n0=Eo[r0];for(e0 in n0)if(n0.hasOwnProperty(e0)&&e0 in ko)return yo[r0]=n0[e0];return r0}WA&&(ko=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);var So=vo("animationend"),Io=vo("animationiteration"),Co=vo("animationstart"),xo=vo("transitionrun"),To=vo("transitionstart"),Bo=vo("transitioncancel"),Uo=vo("transitionend"),Mo=new Map,No="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Do(r0,e0){Mo.set(r0,e0),iA(e0,[r0])}No.push("scrollEnd");var Oo=new WeakMap;function Lo(r0,e0){if(typeof r0=="object"&&r0!==null){var n0=Oo.get(r0);return n0!==void 0?n0:(e0={value:r0,source:e0,stack:bA(e0)},Oo.set(r0,e0),e0)}return{value:r0,source:e0,stack:bA(e0)}}var _o=[],Ro=0,zo=0;function Fo(){for(var r0=Ro,e0=zo=Ro=0;e0<r0;){var n0=_o[e0];_o[e0++]=null;var a0=_o[e0];_o[e0++]=null;var i0=_o[e0];_o[e0++]=null;var s0=_o[e0];if(_o[e0++]=null,a0!==null&&i0!==null){var o0=a0.pending;o0===null?i0.next=i0:(i0.next=o0.next,o0.next=i0),a0.pending=i0}s0!==0&&Go(n0,i0,s0)}}function Qo(r0,e0,n0,a0){_o[Ro++]=r0,_o[Ro++]=e0,_o[Ro++]=n0,_o[Ro++]=a0,zo|=a0,r0.lanes|=a0,(r0=r0.alternate)!==null&&(r0.lanes|=a0)}function Po(r0,e0,n0,a0){return Qo(r0,e0,n0,a0),jo(r0)}function Vo(r0,e0){return Qo(r0,null,null,e0),jo(r0)}function Go(r0,e0,n0){r0.lanes|=n0;var a0=r0.alternate;a0!==null&&(a0.lanes|=n0);for(var i0=!1,s0=r0.return;s0!==null;)s0.childLanes|=n0,(a0=s0.alternate)!==null&&(a0.childLanes|=n0),s0.tag===22&&((r0=s0.stateNode)===null||1&r0._visibility||(i0=!0)),r0=s0,s0=s0.return;return r0.tag===3?(s0=r0.stateNode,i0&&e0!==null&&(i0=31-Si(n0),(a0=(r0=s0.hiddenUpdates)[i0])===null?r0[i0
762]=[e0]:a0.push(e0),e0.lane=536870912|n0),s0):null}function jo(r0){if(50<Vp)throw Vp=0,Gp=null,Error(mr(185));for(var e0=r0.return;e0!==null;)e0=(r0=e0).return;return r0.tag===3?r0.stateNode:null}var Ko={};function Yo(r0,e0,n0,a0){this.tag=r0,this.key=n0,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e0,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a0,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ho(r0,e0,n0,a0){return new Yo(r0,e0,n0,a0)}function Jo(r0){return!(!(r0=r0.prototype)||!r0.isReactComponent)}function Wo(r0,e0){var n0=r0.alternate;return n0===null?((n0=Ho(r0.tag,e0,r0.key,r0.mode)).elementType=r0.elementType,n0.type=r0.type,n0.stateNode=r0.stateNode,n0.alternate=r0,r0.alternate=n0):(n0.pendingProps=e0,n0.type=r0.type,n0.flags=0,n0.subtreeFlags=0,n0.deletions=null),n0.flags=65011712&r0.flags,n0.childLanes=r0.childLanes,n0.lanes=r0.lanes,n0.child=r0.child,n0.memoizedProps=r0.memoizedProps,n0.memoizedState=r0.memoizedState,n0.updateQueue=r0.updateQueue,e0=r0.dependencies,n0.dependencies=e0===null?null:{lanes:e0.lanes,firstContext:e0.firstContext},n0.sibling=r0.sibling,n0.index=r0.index,n0.ref=r0.ref,n0.refCleanup=r0.refCleanup,n0}function qo(r0,e0){r0.flags&=65011714;var n0=r0.alternate;return n0===null?(r0.childLanes=0,r0.lanes=e0,r0.child=null,r0.subtreeFlags=0,r0.memoizedProps=null,r0.memoizedState=null,r0.updateQueue=null,r0.dependencies=null,r0.stateNode=null):(r0.childLanes=n0.childLanes,r0.lanes=n0.lanes,r0.child=n0.child,r0.subtreeFlags=0,r0.deletions=null,r0.memoizedProps=n0.memoizedProps,r0.memoizedState=n0.memoizedState,r0.updateQueue=n0.updateQueue,r0.type=n0.type,e0=n0.dependencies,r0.dependencies=e0===null?null:{lanes:e0.lanes,firstContext:e0.firstContext}),r0}function Zo(r0,e0,n0,a0,i0,s0){var o0=0;if(a0=r0,typeof r0=="function")Jo(r0)&&(o0=1);else if(typeof r0=="string")o0=function(l0,c0){if($r.current===1||c0.itemProp!=null)return!1;switch(l0){case"meta":case"title":return!0;case"style":if(typeof c0.precedence!="string"||typeof c0.href!="string"||c0.href==="")break;return!0;case"link":if(typeof c0.rel!="string"||typeof c0.href!="string"||c0.href===""||c0.onLoad||c0.onError)break;return c0.rel!=="stylesheet"||(l0=c0.disabled,typeof c0.precedence=="string"&&l0==null);case"script":if(c0.async&&typeof c0.async!="function"&&typeof c0.async!="symbol"&&!c0.onLoad&&!c0.onError&&c0.src&&typeof c0.src=="string")return!0}return!1}(r0,n0)?26:r0==="html"||r0==="head"||r0==="body"?27:5;else e:switch(r0){case zr:return(r0=Ho(31,n0,e0,i0)).elementType=zr,r0.lanes=s0,r0;case xr:return Xo(n0.children,i0,s0,e0);case Tr:o0=8,i0|=24;break;case Br:return(r0=Ho(12,n0,e0,2|i0)).elementType=Br,r0.lanes=s0,r0;case Or:return(r0=Ho(13,n0,e0,i0)).elementType=Or,r0.lanes=s0,r0;case Lr:return(r0=Ho(19,n0,e0,i0)).elementType=Lr,r0.lanes=s0,r0;default:if(typeof r0=="object"&&r0!==null)switch(r0.$$typeof){case Ur:case Nr:o0=10;break e;case Mr:o0=9;break e;case Dr:o0=11;break e;case _r:o0=14;break e;case Rr:o0=16,a0=null;break e}o0=29,n0=Error(mr(130,r0===null?"null":typeof r0,"")),a0=null}return(e0=Ho(o0,n0,e0,i0)).elementType=r0,e0.type=a0,e0.lanes=s0,e0}function Xo(r0,e0,n0,a0){return(r0=Ho(7,r0,a0,e0)).lanes=n0,r0}function $o(r0,e0,n0){return(r0=Ho(6,r0,null,e0)).lanes=n0,r0}function el(r0,e0,n0){return(e0=Ho(4,r0.children!==null?r0.children:[],r0.key,e0)).lanes=n0,e0.stateNode={containerInfo:r0.containerInfo,pendingChildren:null,implementation:r0.implementation},e0}var tl=[],nl=0,al=null,rl=0,il=[],Al=0,sl=null,ol=1,ll="";function cl(r0,e0){tl[nl++]=rl,tl[nl++]=al,al=r0,rl=e0}function ul(r0,e0,n0){il[Al++]=ol,il[Al++]=ll,il[Al++]=sl,sl=r0;var a0=ol;r0=ll;var i0=32-Si(a0)-1;a0&=~(1<<i0),n0+=1;var s0=32-Si(e0)+i0;if(30<s0){var o0=i0-i0%5;s0=(a0&(1<<o0)-1).toString(32),a0>>=o0,i0-=o0,ol=1<<32-Si(e0)+i0|n0<<i0|a0,ll=s0+r0}else ol=1<<s0|n0<<i0|a0,ll=r0}function dl(r0){r0.return!==null&&(cl(r0,1),ul(r0,1,0))}function hl(r0){for(;r0===al;)al=tl[--nl],tl[nl]=null,rl=tl[--nl],tl[nl]=null;for(;r0===sl;)sl=il[--Al],il[Al]=null,ll=il[--Al],il[Al]=null,ol=il[--Al],il[Al]=null}var pl=null,fl=null,gl=!1,ml=null,wl=!1,bl=Error(mr(519));function El(r0){throw Cl(Lo(Error(mr(418,"")),r0)),bl}function yl(r0){var e0=r0.stateNode,n0=r0.type,a0=r0.memoizedProps;switch(e0[Gi]=r0,e0[ji]=a0,n0){case"dialog":Jf("cancel",e0),Jf("
762close",e0);break;case"iframe":case"object":case"embed":Jf("load",e0);break;case"video":case"audio":for(n0=0;n0<Kf.length;n0++)Jf(Kf[n0],e0);break;case"source":Jf("error",e0);break;case"img":case"image":case"link":Jf("error",e0),Jf("load",e0);break;case"details":Jf("toggle",e0);break;case"input":Jf("invalid",e0),TA(e0,a0.value,a0.defaultValue,a0.checked,a0.defaultChecked,a0.type,a0.name,!0),kA(e0);break;case"select":Jf("invalid",e0);break;case"textarea":Jf("invalid",e0),NA(e0,a0.value,a0.defaultValue,a0.children),kA(e0)}typeof(n0=a0.children)!="string"&&typeof n0!="number"&&typeof n0!="bigint"||e0.textContent===""+n0||a0.suppressHydrationWarning===!0||sg(e0.textContent,n0)?(a0.popover!=null&&(Jf("beforetoggle",e0),Jf("toggle",e0)),a0.onScroll!=null&&Jf("scroll",e0),a0.onScrollEnd!=null&&Jf("scrollend",e0),a0.onClick!=null&&(e0.onclick=og),e0=!0):e0=!1,e0||El(r0)}function kl(r0){for(pl=r0.return;pl;)switch(pl.tag){case 5:case 13:return void(wl=!1);case 27:case 3:return void(wl=!0);default:pl=pl.return}}function vl(r0){if(r0!==pl)return!1;if(!gl)return kl(r0),gl=!0,!1;var e0,n0=r0.tag;if((e0=n0!==3&&n0!==27)&&((e0=n0===5)&&(e0=!((e0=r0.type)!=="form"&&e0!=="button")||mg(r0.type,r0.memoizedProps)),e0=!e0),e0&&fl&&El(r0),kl(r0),n0===13){if(!(r0=(r0=r0.memoizedState)!==null?r0.dehydrated:null))throw Error(mr(317));e:{for(r0=r0.nextSibling,n0=0;r0;){if(r0.nodeType===8)if((e0=r0.data)==="/$"){if(n0===0){fl=Tg(r0.nextSibling);break e}n0--}else e0!=="$"&&e0!=="$!"&&e0!=="$?"||n0++;r0=r0.nextSibling}fl=null}}else n0===27?(n0=fl,Sg(r0.type)?(r0=Bg,Bg=null,fl=r0):fl=n0):fl=pl?Tg(r0.stateNode.nextSibling):null;return!0}function Sl(){fl=pl=null,gl=!1}function Il(){var r0=ml;return r0!==null&&(Bp===null?Bp=r0:Bp.push.apply(Bp,r0),ml=null),r0}function Cl(r0){ml===null?ml=[r0]:ml.push(r0)}var xl=qr(null),Tl=null,Bl=null;function Ul(r0,e0,n0){Xr(xl,e0._currentValue),e0._currentValue=n0}function Ml(r0){r0._currentValue=xl.current,Zr(xl)}function Nl(r0,e0,n0){for(;r0!==null;){var a0=r0.alternate;if((r0.childLanes&e0)!==e0?(r0.childLanes|=e0,a0!==null&&(a0.childLanes|=e0)):a0!==null&&(a0.childLanes&e0)!==e0&&(a0.childLanes|=e0),r0===n0)break;r0=r0.return}}function Dl(r0,e0,n0,a0){var i0=r0.child;for(i0!==null&&(i0.return=r0);i0!==null;){var s0=i0.dependencies;if(s0!==null){var o0=i0.child;s0=s0.firstContext;e:for(;s0!==null;){var l0=s0;s0=i0;for(var c0=0;c0<e0.length;c0++)if(l0.context===e0[c0]){s0.lanes|=n0,(l0=s0.alternate)!==null&&(l0.lanes|=n0),Nl(s0.return,n0,r0),a0||(o0=null);break e}s0=l0.next}}else if(i0.tag===18){if((o0=i0.return)===null)throw Error(mr(341));o0.lanes|=n0,(s0=o0.alternate)!==null&&(s0.lanes|=n0),Nl(o0,n0,r0),o0=null}else o0=i0.child;if(o0!==null)o0.return=i0;else for(o0=i0;o0!==null;){if(o0===r0){o0=null;break}if((i0=o0.sibling)!==null){i0.return=o0.return,o0=i0;break}o0=o0.return}i0=o0}}function Ol(r0,e0,n0,a0){r0=null;for(var i0=e0,s0=!1;i0!==null;){if(!s0){if(524288&i0.flags)s0=!0;else if(262144&i0.flags)break}if(i0.tag===10){var o0=i0.alternate;if(o0===null)throw Error(mr(387));if((o0=o0.memoizedProps)!==null){var l0=i0.type;io(i0.pendingProps.value,o0.value)||(r0!==null?r0.push(l0):r0=[l0])}}else if(i0===ni.current){if((o0=i0.alternate)===null)throw Error(mr(387));o0.memoizedState.memoizedState!==i0.memoizedState.memoizedState&&(r0!==null?r0.push(im):r0=[im])}i0=i0.return}r0!==null&&Dl(e0,r0,n0,a0),e0.flags|=262144}function Ll(r0){for(r0=r0.firstContext;r0!==null;){if(!io(r0.context._currentValue,r0.memoizedValue))return!0;r0=r0.next}return!1}function _l(r0){Tl=r0,Bl=null,(r0=r0.dependencies)!==null&&(r0.firstContext=null)}function Rl(r0){return Fl(Tl,r0)}function zl(r0,e0){return Tl===null&&_l(r0),Fl(r0,e0)}function Fl(r0,e0){var n0=e0._currentValue;if(e0={context:e0,memoizedValue:n0,next:null},Bl===null){if(r0===null)throw Error(mr(308));Bl=e0,r0.dependencies={lanes:0,firstContext:e0},r0.flags|=524288}else Bl=Bl.next=e0;return n0}var Ql=typeof AbortController<"u"?AbortController:function(){var r0=[],e0=this.signal={aborted:!1,addEventListener:function(n0,a0){r0.push(a0)}};
762this.abort=function(){e0.aborted=!0,r0.forEach(function(n0){return n0()})}},Pl=pr.unstable_scheduleCallback,Vl=pr.unstable_NormalPriority,Gl={$$typeof:Nr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jl(){return{controller:new Ql,data:new Map,refCount:0}}function Kl(r0){r0.refCount--,r0.refCount===0&&Pl(Vl,function(){r0.controller.abort()})}var Yl=null,Hl=0,Jl=0,Wl=null;function ql(){if(--Hl===0&&Yl!==null){Wl!==null&&(Wl.status="fulfilled");var r0=Yl;Yl=null,Jl=0,Wl=null;for(var e0=0;e0<r0.length;e0++)(0,r0[e0])()}}var Zl=Kr.S;Kr.S=function(r0,e0){typeof e0=="object"&&e0!==null&&typeof e0.then=="function"&&function(n0,a0){if(Yl===null){var i0=Yl=[];Hl=0,Jl=Qf(),Wl={status:"pending",value:void 0,then:function(s0){i0.push(s0)}}}Hl++,a0.then(ql,ql)}(0,e0),Zl!==null&&Zl(r0,e0)};var Xl=qr(null);function $l(){var r0=Xl.current;return r0!==null?r0:hp.pooledCache}function ec(r0,e0){Xr(Xl,e0===null?Xl.current:e0.pool)}function tc(){var r0=$l();return r0===null?null:{parent:Gl._currentValue,pool:r0}}var nc=Error(mr(460)),ac=Error(mr(474)),rc=Error(mr(542)),ic={then:function(){}};function Ac(r0){return(r0=r0.status)==="fulfilled"||r0==="rejected"}function sc(){}function oc(r0,e0,n0){switch((n0=r0[n0])===void 0?r0.push(e0):n0!==e0&&(e0.then(sc,sc),e0=n0),e0.status){case"fulfilled":return e0.value;case"rejected":throw uc(r0=e0.reason),r0;default:if(typeof e0.status=="string")e0.then(sc,sc);else{if((r0=hp)!==null&&100<r0.shellSuspendCounter)throw Error(mr(482));(r0=e0).status="pending",r0.then(function(a0){if(e0.status==="pending"){var i0=e0;i0.status="fulfilled",i0.value=a0}},function(a0){if(e0.status==="pending"){var i0=e0;i0.status="rejected",i0.reason=a0}})}switch(e0.status){case"fulfilled":return e0.value;case"rejected":throw uc(r0=e0.reason),r0}throw lc=e0,nc}}var lc=null;function cc(){if(lc===null)throw Error(mr(459));var r0=lc;return lc=null,r0}function uc(r0){if(r0===nc||r0===rc)throw Error(mr(483))}var dc=!1;function hc(r0){r0.updateQueue={baseState:r0.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(r0,e0){r0=r0.updateQueue,e0.updateQueue===r0&&(e0.updateQueue={baseState:r0.baseState,firstBaseUpdate:r0.firstBaseUpdate,lastBaseUpdate:r0.lastBaseUpdate,shared:r0.shared,callbacks:null})}function fc(r0){return{lane:r0,tag:0,payload:null,callback:null,next:null}}function gc(r0,e0,n0){var a0=r0.updateQueue;if(a0===null)return null;if(a0=a0.shared,2&dp){var i0=a0.pending;return i0===null?e0.next=e0:(e0.next=i0.next,i0.next=e0),a0.pending=e0,e0=jo(r0),Go(r0,null,n0),e0}return Qo(r0,a0,e0,n0),jo(r0)}function mc(r0,e0,n0){if((e0=e0.updateQueue)!==null&&(e0=e0.shared,4194048&n0)){var a0=e0.lanes;n0|=a0&=r0.pendingLanes,e0.lanes=n0,zi(r0,n0)}}function wc(r0,e0){var n0=r0.updateQueue,a0=r0.alternate;if(a0!==null&&n0===(a0=a0.updateQueue)){var i0=null,s0=null;if((n0=n0.firstBaseUpdate)!==null){do{var o0={lane:n0.lane,tag:n0.tag,payload:n0.payload,callback:null,next:null};s0===null?i0=s0=o0:s0=s0.next=o0,n0=n0.next}while(n0!==null);s0===null?i0=s0=e0:s0=s0.next=e0}else i0=s0=e0;return n0={baseState:a0.baseState,firstBaseUpdate:i0,lastBaseUpdate:s0,shared:a0.shared,callbacks:a0.callbacks},void(r0.updateQueue=n0)}(r0=n0.lastBaseUpdate)===null?n0.firstBaseUpdate=e0:r0.next=e0,n0.lastBaseUpdate=e0}var bc=!1;function Ec(){if(bc&&Wl!==null)throw Wl}function yc(r0,e0,n0,a0){bc=!1;var i0=r0.updateQueue;dc=!1;var s0=i0.firstBaseUpdate,o0=i0.lastBaseUpdate,l0=i0.shared.pending;if(l0!==null){i0.shared.pending=null;var c0=l0,u0=c0.next;c0.next=null,o0===null?s0=u0:o0.next=u0,o0=c0;var d0=r0.alternate;d0!==null&&(l0=(d0=d0.updateQueue).lastBaseUpdate)!==o0&&(l0===null?d0.firstBaseUpdate=u0:l0.next=u0,d0.lastBaseUpdate=c0)}if(s0!==null){var h0=i0.baseState;for(o0=0,d0=u0=c0=null,l0=s0;;){var f0=-536870913&l0.lane,p0=f0!==l0.lane;if(p0?(fp&f0)===f0:(a0&f0)===f0){f0!==0&&f0===Jl&&(bc=!0),d0!==null&&(d0=d0.next={lane:0,tag:l0.tag,payload:l0.payload,callback:null,next:null});e:{var A0=r0,m0=l0;f0=e0;var x0=n0;switch(m0.tag){case 1:if(typeof(A0=m0.payload)=="function"){h0=A0.call(x0,h0,f0);break e}h0=A0;break e;case 3:A0.flags=-65537&A0.flags|128;case 0:if((f0=typeof(A0=m0.payload)=="function"?A0.call(x0,h0,f0):A0)==null)break e;h0=vr({},h0,f0);break e;case 2:dc=!0}}(f0=l0.callback)!==null&&(r0.flags|=64,p0&&(r0.flags|=8192),(p0=i0.callbacks)===null?i0.callbacks=[f0]:p0.push(f0))}else p0={lane:f0,tag:l0.tag,payload:l0.payload,callback:l0.callback,next:null}
vendor: 3,755 bytes, line 762
762,d0===null?(u0=d0=p0,c0=h0):d0=d0.next=p0,o0|=f0;if((l0=l0.next)===null){if((l0=i0.shared.pending)===null)break;l0=(p0=l0).next,p0.next=null,i0.lastBaseUpdate=p0,i0.shared.pending=null}}d0===null&&(c0=h0),i0.baseState=c0,i0.firstBaseUpdate=u0,i0.lastBaseUpdate=d0,s0===null&&(i0.shared.lanes=0),vp|=o0,r0.lanes=o0,r0.memoizedState=h0}}function kc(r0,e0){if(typeof r0!="function")throw Error(mr(191,r0));r0.call(e0)}function vc(r0,e0){var n0=r0.callbacks;if(n0!==null)for(r0.callbacks=null,r0=0;r0<n0.length;r0++)kc(n0[r0],e0)}var Sc=qr(null),Ic=qr(0);function Cc(r0,e0){Xr(Ic,r0=yp),Xr(Sc,e0),yp=r0|e0.baseLanes}function xc(){Xr(Ic,yp),Xr(Sc,Sc.current)}function Tc(){yp=Ic.current,Zr(Sc),Zr(Ic)}var Bc=0,Uc=null,Mc=null,Nc=null,Dc=!1,Oc=!1,Lc=!1,_c=0,Rc=0,zc=null,Fc=0;function Qc(){throw Error(mr(321))}function Pc(r0,e0){if(e0===null)return!1;for(var n0=0;n0<e0.length&&n0<r0.length;n0++)if(!io(r0[n0],e0[n0]))return!1;return!0}function Vc(r0,e0,n0,a0,i0,s0){return Bc=s0,Uc=e0,e0.memoizedState=null,e0.updateQueue=null,e0.lanes=0,Kr.H=r0===null||r0.memoizedState===null?nd:ad,Lc=!1,s0=n0(a0,i0),Lc=!1,Oc&&(s0=jc(e0,n0,a0,i0)),Gc(r0),s0}function Gc(r0){Kr.H=td;var e0=Mc!==null&&Mc.next!==null;if(Bc=0,Nc=Mc=Uc=null,Dc=!1,Rc=0,zc=null,e0)throw Error(mr(300));r0===null||Rd||(r0=r0.dependencies)!==null&&Ll(r0)&&(Rd=!0)}function jc(r0,e0,n0,a0){Uc=r0;var i0=0;do{if(Oc&&(zc=null),Rc=0,Oc=!1,25<=i0)throw Error(mr(301));if(i0+=1,Nc=Mc=null,r0.updateQueue!=null){var s0=r0.updateQueue;s0.lastEffect=null,s0.events=null,s0.stores=null,s0.memoCache!=null&&(s0.memoCache.index=0)}Kr.H=rd,s0=e0(n0,a0)}while(Oc);return s0}function Kc(){var r0=Kr.H,e0=r0.useState()[0];return e0=typeof e0.then=="function"?Zc(e0):e0,r0=r0.useState()[0],(Mc!==null?Mc.memoizedState:null)!==r0&&(Uc.flags|=1024),e0}function Yc(){var r0=_c!==0;return _c=0,r0}function Hc(r0,e0,n0){e0.updateQueue=r0.updateQueue,e0.flags&=-2053,r0.lanes&=~n0}function Jc(r0){if(Dc){for(r0=r0.memoizedState;r0!==null;){var e0=r0.queue;e0!==null&&(e0.pending=null),r0=r0.next}Dc=!1}Bc=0,Nc=Mc=Uc=null,Oc=!1,Rc=_c=0,zc=null}function Wc(){var r0={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nc===null?Uc.memoizedState=Nc=r0:Nc=Nc.next=r0,Nc}function qc(){if(Mc===null){var r0=Uc.alternate;r0=r0!==null?r0.memoizedState:null}else r0=Mc.next;var e0=Nc===null?Uc.memoizedState:Nc.next;if(e0!==null)Nc=e0,Mc=r0;else{if(r0===null)throw Uc.alternate===null?Error(mr(467)):Error(mr(310));r0={memoizedState:(Mc=r0).memoizedState,baseState:Mc.baseState,baseQueue:Mc.baseQueue,queue:Mc.queue,next:null},Nc===null?Uc.memoizedState=Nc=r0:Nc=Nc.next=r0}return Nc}function Zc(r0){var e0=Rc;return Rc+=1,zc===null&&(zc=[]),r0=oc(zc,r0,e0),e0=Uc,(Nc===null?e0.memoizedState:Nc.next)===null&&(e0=e0.alternate,Kr.H=e0===null||e0.memoizedState===null?nd:ad),r0}function Xc(r0){if(r0!==null&&typeof r0=="object"){if(typeof r0.then=="function")return Zc(r0);if(r0.$$typeof===Nr)return Rl(r0)}throw Error(mr(438,String(r0)))}function $c(r0){var e0=null,n0=Uc.updateQueue;if(n0!==null&&(e0=n0.memoCache),e0==null){var a0=Uc.alternate;a0!==null&&(a0=a0.updateQueue)!==null&&(a0=a0.memoCache)!=null&&(e0={data:a0.data.map(function(i0){return i0.slice()}),index:0})}if(e0==null&&(e0={data:[],index:0}),n0===null&&(n0={lastEffect:null,events:null,stores:null,memoCache:null},Uc.updateQueue=n0),n0.memoCache=e0,(n0=e0.data[e0.index])===void 0)for(n0=e0.data[e0.index]=Array(r0),a0=0;a0<r0;a0++)n0[a0]=Fr;return e0.index++,n0}function eu(r0,e0){return typeof e0=="function"?e0(r0):e0}function tu(r0){return nu(qc(),Mc,r0)}function nu(r0,e0,n0){var a0=r0.queue;if(a0===null)throw Error(mr(311));a0.lastRenderedReducer=n0;var i0=r0.baseQueue,s0=a0.pending;if(s0!==null){if(i0!==null){var o0=i0.next;
762i0.next=s0.next,s0.next=o0}e0.baseQueue=i0=s0,a0.pending=null}if(s0=r0.baseState,i0===null)r0.memoizedState=s0;else{var l0=o0=null,c0=null,u0=e0=i0.next,d0=!1;do{var h0=-536870913&u0.lane;if(h0!==u0.lane?(fp&h0)===h0:(Bc&h0)===h0){var f0=u0.revertLane;if(f0===0)c0!==null&&(c0=c0.next={lane:0,revertLane:0,action:u0.action,hasEagerState:u0.hasEagerState,eagerState:u0.eagerState,next:null}),h0===Jl&&(d0=!0);else{if((Bc&f0)===f0){u0=u0.next,f0===Jl&&(d0=!0);continue}h0={lane:0,revertLane:u0.revertLane,action:u0.action,hasEagerState:u0.hasEagerState,eagerState:u0.eagerState,next:null},c0===null?(l0=c0=h0,o0=s0):c0=c0.next=h0,Uc.lanes|=f0,vp|=f0}h0=u0.action,Lc&&n0(s0,h0),s0=u0.hasEagerState?u0.eagerState:n0(s0,h0)}else f0={lane:h0,revertLane:u0.revertLane,action:u0.action,hasEagerState:u0.hasEagerState,eagerState:u0.eagerState,next:null},c0===null?(l0=c0=f0,o0=s0):c0=c0.next=f0,Uc.lanes|=h0,vp|=h0;u0=u0.next}while(u0!==null&&u0!==e0);if(c0===null?o0=s0:c0.next=l0,!io(s0,r0.memoizedState)&&(Rd=!0,d0&&(n0=Wl)!==null))throw n0;r0.memoizedState=s0,r0.baseState=o0,r0.baseQueue=c0,a0.lastRenderedState=s0}return i0===null&&(a0.lanes=0),[r0.memoizedState,a0.dispatch]}function au(r0){var e0=qc(),n0=e0.queue;if(n0===null)throw Error(mr(311));n0.lastRenderedReducer=r0;var a0=n0.dispatch,i0=n0.pending,s0=e0.memoizedState;if(i0!==null){n0.pending=null;var o0=i0=i0.next;do s0=r0(s0,o0.action),o0=o0.next;while(o0!==i0);io(s0,e0.memoizedState)||(Rd=!0),e0.memoizedState=s0,e0.baseQueue===null&&(e0.baseState=s0),n0.lastRenderedState=s0}return[s0,a0]}function ru(r0,e0,n0){var a0=Uc,i0=qc(),s0=gl;if(s0){if(n0===void 0)throw Error(mr(407));n0=n0()}else n0=e0();var o0=!io((Mc||i0).memoizedState,n0);if(o0&&(i0.memoizedState=n0,Rd=!0),i0=i0.queue,xu(2048,8,su.bind(null,a0,i0,r0),[r0]),i0.getSnapshot!==e0||o0||Nc!==null&&1&Nc.memoizedState.tag){if(a0.flags|=2048,Su(9,{destroy:void 0,resource:void 0},Au.bind(null,a0,i0,n0,e0),null),hp===null)throw Error(mr(349));s0||124&Bc||iu(a0,e0,n0)}return n0}function iu(r0,e0,n0){r0.flags|=16384,r0={getSnapshot:e0,value:n0},(e0=Uc.updateQueue)===null?(e0={lastEffect:null,events:null,stores:null,memoCache:null},Uc.updateQueue=e0,e0.stores=[r0]):(n0=e0.stores)===null?e0.stores=[r0]:n0.push(r0)}function Au(r0,e0,n0,a0){e0.value=n0,e0.getSnapshot=a0,ou(e0)&&lu(r0)}function su(r0,e0,n0){return n0(function(){ou(e0)&&lu(r0)})}function ou(r0){var e0=r0.getSnapshot;r0=r0.value;try{var n0=e0();return!io(r0,n0)}catch{return!0}}function lu(r0){var e0=Vo(r0,2);e0!==null&&Yp(e0,0,2)}function cu(r0){var e0=Wc();if(typeof r0=="function"){var n0=r0;if(r0=n0(),Lc){vi(!0);try{n0()}finally{vi(!1)}}}return e0.memoizedState=e0.baseState=r0,e0.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eu,lastRenderedState:r0},e0}function uu(r0,e0,n0,a0){return r0.baseState=n0,nu(r0,Mc,typeof a0=="function"?a0:eu)}function du(r0,e0,n0,a0,i0){if(Xu(r0))throw Error(mr(485));if((r0=e0.action)!==null){var s0={payload:i0,action:r0,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o0){s0.listeners.push(o0)}};Kr.T!==null?n0(!0):s0.isTransition=!1,a0(s0),(n0=e0.pending)===null?(s0.next=e0.pending=s0,hu(e0,s0)):(s0.next=n0.next,e0.pending=n0.next=s0)}}function hu(r0,e0){var n0=e0.action,a0=e0.payload,i0=r0.state;if(e0.isTransition){var s0=Kr.T,o0={};Kr.T=o0;try{var l0=n0(i0,a0),c0=Kr.S;c0!==null&&c0(o0,l0),pu(r0,e0,l0)}catch(u0){gu(r0,e0,u0)}finally{Kr.T=s0}}else try{pu(r0,e0,s0=n0(i0,a0))}catch(u0){gu(r0,e0,u0)}}function pu(r0,e0,n0){n0!==null&&typeof n0=="object"&&typeof n0.then=="function"?n0.then(function(a0){fu(r0,e0,a0)},function(a0){return gu(r0,e0,a0)}):fu(r0,e0,n0)}function fu(r0,e0,n0){e0.status="fulfilled",e0.value=n0,mu(e0),r0.state=n0,(e0=r0.pending)!==null&&((n0=e0.next)===e0?r0.pending=null:(n0=n0.next,e0.next=n0,hu(r0,n0)))}function gu(r0,e0,n0){var a0=r0.pending;if(r0.pending=null,a0!==null){a0=a0.next;do e0.status="rejected",e0.reason=n0,mu(e0),e0=e0.next;while(e0!==a0)}r0.action=null}function mu(r0){r0=r0.listeners;for(var e0=0;e0<r0.length;e0++)(0,r0[e0])()}function wu(r0,e0){return e0}
762function bu(r0,e0){if(gl){var n0=hp.formState;if(n0!==null){e:{var a0=Uc;if(gl){if(fl){t:{for(var i0=fl,s0=wl;i0.nodeType!==8;){if(!s0){i0=null;break t}if((i0=Tg(i0.nextSibling))===null){i0=null;break t}}i0=(s0=i0.data)==="F!"||s0==="F"?i0:null}if(i0){fl=Tg(i0.nextSibling),a0=i0.data==="F!";break e}}El(a0)}a0=!1}a0&&(e0=n0[0])}}return(n0=Wc()).memoizedState=n0.baseState=e0,a0={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:e0},n0.queue=a0,n0=Wu.bind(null,Uc,a0),a0.dispatch=n0,a0=cu(!1),s0=Zu.bind(null,Uc,!1,a0.queue),i0={state:e0,dispatch:null,action:r0,pending:null},(a0=Wc()).queue=i0,n0=du.bind(null,Uc,i0,s0,n0),i0.dispatch=n0,a0.memoizedState=r0,[e0,n0,!1]}function Eu(r0){return yu(qc(),Mc,r0)}function yu(r0,e0,n0){if(e0=nu(r0,e0,wu)[0],r0=tu(eu)[0],typeof e0=="object"&&e0!==null&&typeof e0.then=="function")try{var a0=Zc(e0)}catch(o0){throw o0===nc?rc:o0}else a0=e0;var i0=(e0=qc()).queue,s0=i0.dispatch;return n0!==e0.memoizedState&&(Uc.flags|=2048,Su(9,{destroy:void 0,resource:void 0},ku.bind(null,i0,n0),null)),[a0,s0,r0]}function ku(r0,e0){r0.action=e0}function vu(r0){var e0=qc(),n0=Mc;if(n0!==null)return yu(e0,n0,r0);qc(),e0=e0.memoizedState;var a0=(n0=qc()).queue.dispatch;return n0.memoizedState=r0,[e0,a0,!1]}function Su(r0,e0,n0,a0){return r0={tag:r0,create:n0,deps:a0,inst:e0,next:null},(e0=Uc.updateQueue)===null&&(e0={lastEffect:null,events:null,stores:null,memoCache:null},Uc.updateQueue=e0),(n0=e0.lastEffect)===null?e0.lastEffect=r0.next=r0:(a0=n0.next,n0.next=r0,r0.next=a0,e0.lastEffect=r0),r0}function Iu(){return qc().memoizedState}function Cu(r0,e0,n0,a0){var i0=Wc();a0=a0===void 0?null:a0,Uc.flags|=r0,i0.memoizedState=Su(1|e0,{destroy:void 0,resource:void 0},n0,a0)}function xu(r0,e0,n0,a0){var i0=qc();a0=a0===void 0?null:a0;var s0=i0.memoizedState.inst;Mc!==null&&a0!==null&&Pc(a0,Mc.memoizedState.deps)?i0.memoizedState=Su(e0,s0,n0,a0):(Uc.flags|=r0,i0.memoizedState=Su(1|e0,s0,n0,a0))}function Tu(r0,e0){Cu(8390656,8,r0,e0)}function Bu(r0,e0){xu(2048,8,r0,e0)}function Uu(r0,e0){return xu(4,2,r0,e0)}function Mu(r0,e0){return xu(4,4,r0,e0)}function Nu(r0,e0){if(typeof e0=="function"){r0=r0();var n0=e0(r0);return function(){typeof n0=="function"?n0():e0(null)}}if(e0!=null)return r0=r0(),e0.current=r0,function(){e0.current=null}}function Du(r0,e0,n0){n0=n0!=null?n0.concat([r0]):null,xu(4,4,Nu.bind(null,e0,r0),n0)}function Ou(){}function Lu(r0,e0){var n0=qc();e0=e0===void 0?null:e0;var a0=n0.memoizedState;return e0!==null&&Pc(e0,a0[1])?a0[0]:(n0.memoizedState=[r0,e0],r0)}function _u(r0,e0){var n0=qc();e0=e0===void 0?null:e0;var a0=n0.memoizedState;if(e0!==null&&Pc(e0,a0[1]))return a0[0];if(a0=r0(),Lc){vi(!0);try{r0()}finally{vi(!1)}}return n0.memoizedState=[a0,e0],a0}function Ru(r0,e0,n0){return n0===void 0||1073741824&Bc?r0.memoizedState=e0:(r0.memoizedState=n0,r0=Kp(),Uc.lanes|=r0,vp|=r0,n0)}function zu(r0,e0,n0,a0){return io(n0,e0)?n0:Sc.current!==null?(r0=Ru(r0,n0,a0),io(r0,e0)||(Rd=!0),r0):42&Bc?(r0=Kp(),Uc.lanes|=r0,vp|=r0,e0):(Rd=!0,r0.memoizedState=n0)}function Fu(r0,e0,n0,a0,i0){var s0=Yr.p;Yr.p=s0!==0&&8>s0?s0:8;var o0,l0,c0,u0=Kr.T,d0={};Kr.T=d0,Zu(r0,!1,e0,n0);try{var h0=i0(),f0=Kr.S;if(f0!==null&&f0(d0,h0),h0!==null&&typeof h0=="object"&&typeof h0.then=="function"){var p0=(o0=a0,l0=[],c0={status:"pending",value:null,reason:null,then:function(A0){l0.push(A0)}},h0.then(function(){c0.status="fulfilled",c0.value=o0;for(var A0=0;A0<l0.length;A0++)(0,l0[A0])(o0)},function(A0){for(c0.status="rejected",c0.reason=A0,A0=0;A0<l0.length;A0++)(0,l0[A0])(void 0)}),c0);qu(r0,e0,p0,jp())}else qu(r0,e0,a0,jp())}catch(A0){qu(r0,e0,{then:function(){},status:"rejected",reason:A0},jp())}finally{Yr.p=s0,Kr.T=u0}}function Qu(){}function Pu(r0,e0,n0,a0){if(r0.tag!==5)throw Error(mr(476));var i0=Vu(r0).queue;Fu(r0,i0,e0,Hr,n0===null?Qu:function(){return Gu(r0),n0(a0)})}function Vu(r0){var e0=r0.memoizedState;if(e0!==null)return e0;var n0={};return(e0={memoizedState:Hr,baseState:Hr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eu,lastRenderedState:Hr},next:null}).next={memoizedState:n0,baseState:n0,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eu,lastRenderedState:n0},next:null},r0.memoizedState=e0,(r0=r0.alternate)!==null&&(r0.memoizedState=e0),e0}function Gu(r0){qu(r0,Vu(r0).next.queue,{},jp())}function ju(){return Rl(im)}function Ku(){return qc().memoizedState}function Yu(){return qc().memoizedState}function Hu(r0){for(var e0=r0.return;e0!==null;){switch(e0.tag){case 24:case 3:var n0=jp(),a0=gc(e0,r0=fc(n0),n0);return a0!==null&&(Yp(a0,0,n0),mc(a0,e0,n0)),e0={cache:jl()},void(r0.payload=e0)}e0=e0.return}}function Ju(r0,e0,n0){var a0=jp();n0={lane:a0,revertLane:0,action:n0,hasEagerState:!1,eagerState:null,next:null},Xu(r0)?$u(e0,n0):(n0=Po(r0,e0,n0,a0))!==null&&(Yp(n0,0,a0),ed(n0,e0,a0))}function Wu(r0,e0,n0){qu(r0,e0,n0,jp())}function qu(r0,e0,n0,a0){var i0={lane:a0,revertLane:0,action:n0,hasEagerState:!1,eagerState:null,next:null};
762if(Xu(r0))$u(e0,i0);else{var s0=r0.alternate;if(r0.lanes===0&&(s0===null||s0.lanes===0)&&(s0=e0.lastRenderedReducer)!==null)try{var o0=e0.lastRenderedState,l0=s0(o0,n0);if(i0.hasEagerState=!0,i0.eagerState=l0,io(l0,o0))return Qo(r0,e0,i0,0),hp===null&&Fo(),!1}catch{}if((n0=Po(r0,e0,i0,a0))!==null)return Yp(n0,0,a0),ed(n0,e0,a0),!0}return!1}function Zu(r0,e0,n0,a0){if(a0={lane:2,revertLane:Qf(),action:a0,hasEagerState:!1,eagerState:null,next:null},Xu(r0)){if(e0)throw Error(mr(479))}else(e0=Po(r0,n0,a0,2))!==null&&Yp(e0,0,2)}function Xu(r0){var e0=r0.alternate;return r0===Uc||e0!==null&&e0===Uc}function $u(r0,e0){Oc=Dc=!0;var n0=r0.pending;n0===null?e0.next=e0:(e0.next=n0.next,n0.next=e0),r0.pending=e0}function ed(r0,e0,n0){if(4194048&n0){var a0=e0.lanes;n0|=a0&=r0.pendingLanes,e0.lanes=n0,zi(r0,n0)}}var td={readContext:Rl,use:Xc,useCallback:Qc,useContext:Qc,useEffect:Qc,useImperativeHandle:Qc,useLayoutEffect:Qc,useInsertionEffect:Qc,useMemo:Qc,useReducer:Qc,useRef:Qc,useState:Qc,useDebugValue:Qc,useDeferredValue:Qc,useTransition:Qc,useSyncExternalStore:Qc,useId:Qc,useHostTransitionStatus:Qc,useFormState:Qc,useActionState:Qc,useOptimistic:Qc,useMemoCache:Qc,useCacheRefresh:Qc},nd={readContext:Rl,use:Xc,useCallback:function(r0,e0){return Wc().memoizedState=[r0,e0===void 0?null:e0],r0},useContext:Rl,useEffect:Tu,useImperativeHandle:function(r0,e0,n0){n0=n0!=null?n0.concat([r0]):null,Cu(4194308,4,Nu.bind(null,e0,r0),n0)},useLayoutEffect:function(r0,e0){return Cu(4194308,4,r0,e0)},useInsertionEffect:function(r0,e0){Cu(4,2,r0,e0)},useMemo:function(r0,e0){var n0=Wc();e0=e0===void 0?null:e0;var a0=r0();if(Lc){vi(!0);try{r0()}finally{vi(!1)}}return n0.memoizedState=[a0,e0],a0},useReducer:function(r0,e0,n0){var a0=Wc();if(n0!==void 0){var i0=n0(e0);if(Lc){vi(!0);try{n0(e0)}finally{vi(!1)}}}else i0=e0;return a0.memoizedState=a0.baseState=i0,r0={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r0,lastRenderedState:i0},a0.queue=r0,r0=r0.dispatch=Ju.bind(null,Uc,r0),[a0.memoizedState,r0]},useRef:function(r0){return r0={current:r0},Wc().memoizedState=r0},useState:function(r0){var e0=(r0=cu(r0)).queue,n0=Wu.bind(null,Uc,e0);return e0.dispatch=n0,[r0.memoizedState,n0]},useDebugValue:Ou,useDeferredValue:function(r0,e0){return Ru(Wc(),r0,e0)},useTransition:function(){var r0=cu(!1);return r0=Fu.bind(null,Uc,r0.queue,!0,!1),Wc().memoizedState=r0,[!1,r0]},useSyncExternalStore:function(r0,e0,n0){var a0=Uc,i0=Wc();if(gl){if(n0===void 0)throw Error(mr(407));n0=n0()}else{if(n0=e0(),hp===null)throw Error(mr(349));124&fp||iu(a0,e0,n0)}i0.memoizedState=n0;var s0={value:n0,getSnapshot:e0};return i0.queue=s0,Tu(su.bind(null,a0,s0,r0),[r0]),a0.flags|=2048,Su(9,{destroy:void 0,resource:void 0},Au.bind(null,a0,s0,n0,e0),null),n0},useId:function(){var r0=Wc(),e0=hp.identifierPrefix;if(gl){var n0=ll;e0="«"+e0+"R"+(n0=(ol&~(1<<32-Si(ol)-1)).toString(32)+n0),0<(n0=_c++)&&(e0+="H"+n0.toString(32)),e0+="»"}else e0="«"+e0+"r"+(n0=Fc++).toString(32)+"»";return r0.memoizedState=e0},useHostTransitionStatus:ju,useFormState:bu,useActionState:bu,useOptimistic:function(r0){var e0=Wc();e0.memoizedState=e0.baseState=r0;var n0={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e0.queue=n0,e0=Zu.bind(null,Uc,!0,n0),n0.dispatch=e0,[r0,e0]},useMemoCache:$c,useCacheRefresh:function(){return Wc().memoizedState=Hu.bind(null,Uc)}},ad={readContext:Rl,use:Xc,useCallback:Lu,useContext:Rl,useEffect:Bu,useImperativeHandle:Du,useInsertionEffect:Uu,useLayoutEffect:Mu,useMemo:_u,useReducer:tu,useRef:Iu,useState:function(){return tu(eu)},useDebugValue:Ou,useDeferredValue:function(r0,e0){return zu(qc(),Mc.memoizedState,r0,e0)},useTransition:function(){var r0=tu(eu)[0],e0=qc().memoizedState;return[typeof r0=="boolean"?r0:Zc(r0),e0]},useSyncExternalStore:ru,useId:Ku,useHostTransitionStatus:ju,useFormState:Eu,useActionState:Eu,useOptimistic:function(r0,e0){return uu(qc(),0,r0,e0)},useMemoCache:$c,useCacheRefresh:Yu},rd={readContext:Rl,use:Xc,useCallback:Lu,useContext:Rl,useEffect:Bu,useImperativeHandle:Du,useInsertionEffect:Uu,useLayoutEffect:Mu,useMemo:_u,useReducer:au,useRef:Iu,useState:function(){return au(eu)},useDebugValue:Ou,useDeferredValue:function(r0,e0){var n0=qc();return Mc===null?Ru(n0,r0,e0):zu(n0,Mc.memoizedState,r0,e0)},useTransition:function(){var r0=au(eu)[0],e0=qc().memoizedState;return[typeof r0=="boolean"?r0:Zc(r0),e0]},useSyncExternalStore:ru,useId:Ku,useHostTransitionStatus:ju,useFormState:vu,useActionState:vu,useOptimistic:function(r0,e0){var n0=qc();return Mc!==null?uu(n0,0,r0,e0):(n0.baseState=r0,[r0,n0.queue.dispatch])},useMemoCache:$c,useCacheRefresh:Yu},id=null,Ad=0;function sd(r0){var e0=Ad;return Ad+=1,id===null&&(id=[]),oc(id,r0,e0)}function od(r0,e0){e0=e0.props.ref,r0.ref=e0!==void 0?e0:null}function ld(r0,e0){throw e0.$$typeof===Sr?Error(mr(525)):(r0=Object.prototype.toString.call(e0),Error(mr(31,r0==="[object Object]"?"object with keys {"+Object.keys(e0).join(", ")+"}":r0)))}function cd(r0){return(0,r0._init)(r0._payload)}
762function ud(r0){function e0(m0,x0){if(r0){var g0=m0.deletions;g0===null?(m0.deletions=[x0],m0.flags|=16):g0.push(x0)}}function n0(m0,x0){if(!r0)return null;for(;x0!==null;)e0(m0,x0),x0=x0.sibling;return null}function a0(m0){for(var x0=new Map;m0!==null;)m0.key!==null?x0.set(m0.key,m0):x0.set(m0.index,m0),m0=m0.sibling;return x0}function i0(m0,x0){return(m0=Wo(m0,x0)).index=0,m0.sibling=null,m0}function s0(m0,x0,g0){return m0.index=g0,r0?(g0=m0.alternate)!==null?(g0=g0.index)<x0?(m0.flags|=67108866,x0):g0:(m0.flags|=67108866,x0):(m0.flags|=1048576,x0)}function o0(m0){return r0&&m0.alternate===null&&(m0.flags|=67108866),m0}function l0(m0,x0,g0,y0){return x0===null||x0.tag!==6?((x0=$o(g0,m0.mode,y0)).return=m0,x0):((x0=i0(x0,g0)).return=m0,x0)}function c0(m0,x0,g0,y0){var b0=g0.type;return b0===xr?d0(m0,x0,g0.props.children,y0,g0.key):x0!==null&&(x0.elementType===b0||typeof b0=="object"&&b0!==null&&b0.$$typeof===Rr&&cd(b0)===x0.type)?(od(x0=i0(x0,g0.props),g0),x0.return=m0,x0):(od(x0=Zo(g0.type,g0.key,g0.props,null,m0.mode,y0),g0),x0.return=m0,x0)}function u0(m0,x0,g0,y0){return x0===null||x0.tag!==4||x0.stateNode.containerInfo!==g0.containerInfo||x0.stateNode.implementation!==g0.implementation?((x0=el(g0,m0.mode,y0)).return=m0,x0):((x0=i0(x0,g0.children||[])).return=m0,x0)}function d0(m0,x0,g0,y0,b0){return x0===null||x0.tag!==7?((x0=Xo(g0,m0.mode,y0,b0)).return=m0,x0):((x0=i0(x0,g0)).return=m0,x0)}
762function h0(m0,x0,g0){if(typeof x0=="string"&&x0!==""||typeof x0=="number"||typeof x0=="bigint")return(x0=$o(""+x0,m0.mode,g0)).return=m0,x0;if(typeof x0=="object"&&x0!==null){switch(x0.$$typeof){case Ir:return od(g0=Zo(x0.type,x0.key,x0.props,null,m0.mode,g0),x0),g0.return=m0,g0;case Cr:return(x0=el(x0,m0.mode,g0)).return=m0,x0;case Rr:return h0(m0,x0=(0,x0._init)(x0._payload),g0)}if(jr(x0)||Pr(x0))return(x0=Xo(x0,m0.mode,g0,null)).return=m0,x0;if(typeof x0.then=="function")return h0(m0,sd(x0),g0);if(x0.$$typeof===Nr)return h0(m0,zl(m0,x0),g0);ld(m0,x0)}return null}function f0(m0,x0,g0,y0){var b0=x0!==null?x0.key:null;if(typeof g0=="string"&&g0!==""||typeof g0=="number"||typeof g0=="bigint")return b0!==null?null:l0(m0,x0,""+g0,y0);if(typeof g0=="object"&&g0!==null){switch(g0.$$typeof){case Ir:return g0.key===b0?c0(m0,x0,g0,y0):null;case Cr:return g0.key===b0?u0(m0,x0,g0,y0):null;case Rr:return f0(m0,x0,g0=(b0=g0._init)(g0._payload),y0)}if(jr(g0)||Pr(g0))return b0!==null?null:d0(m0,x0,g0,y0,null);if(typeof g0.then=="function")return f0(m0,x0,sd(g0),y0);if(g0.$$typeof===Nr)return f0(m0,x0,zl(m0,g0),y0);ld(m0,g0)}return null}function p0(m0,x0,g0,y0,b0){if(typeof y0=="string"&&y0!==""||typeof y0=="number"||typeof y0=="bigint")return l0(x0,m0=m0.get(g0)||null,""+y0,b0);if(typeof y0=="object"&&y0!==null){switch(y0.$$typeof){case Ir:return c0(x0,m0=m0.get(y0.key===null?g0:y0.key)||null,y0,b0);case Cr:return u0(x0,m0=m0.get(y0.key===null?g0:y0.key)||null,y0,b0);case Rr:return p0(m0,x0,g0,y0=(0,y0._init)(y0._payload),b0)}if(jr(y0)||Pr(y0))return d0(x0,m0=m0.get(g0)||null,y0,b0,null);if(typeof y0.then=="function")return p0(m0,x0,g0,sd(y0),b0);if(y0.$$typeof===Nr)return p0(m0,x0,g0,zl(x0,y0),b0);ld(x0,y0)}return null}function A0(m0,x0,g0,y0){if(typeof g0=="object"&&g0!==null&&g0.type===xr&&g0.key===null&&(g0=g0.props.children),typeof g0=="object"&&g0!==null){switch(g0.$$typeof){case Ir:e:{for(var b0=g0.key;x0!==null;){if(x0.key===b0){if((b0=g0.type)===xr){if(x0.tag===7){n0(m0,x0.sibling),(y0=i0(x0,g0.props.children)).return=m0,m0=y0;break e}}else if(x0.elementType===b0||typeof b0=="object"&&b0!==null&&b0.$$typeof===Rr&&cd(b0)===x0.type){n0(m0,x0.sibling),od(y0=i0(x0,g0.props),g0),y0.return=m0,m0=y0;break e}n0(m0,x0);break}e0(m0,x0),x0=x0.sibling}g0.type===xr?((y0=Xo(g0.props.children,m0.mode,y0,g0.key)).return=m0,m0=y0):(od(y0=Zo(g0.type,g0.key,g0.props,null,m0.mode,y0),g0),y0.return=m0,m0=y0)}return o0(m0);case Cr:e:{for(b0=g0.key;x0!==null;){if(x0.key===b0){if(x0.tag===4&&x0.stateNode.containerInfo===g0.containerInfo&&x0.stateNode.implementation===g0.implementation){n0(m0,x0.sibling),(y0=i0(x0,g0.children||[])).return=m0,m0=y0;break e}n0(m0,x0);break}e0(m0,x0),x0=x0.sibling}(y0=el(g0,m0.mode,y0)).return=m0,m0=y0}return o0(m0);case Rr:return A0(m0,x0,g0=(b0=g0._init)(g0._payload),y0)}if(jr(g0))return function(E0,w0,v0,S0){for(var k0=null,R0=null,j0=w0,C0=w0=0,$0=null;j0!==null&&C0<v0.length;C0++){j0.index>C0?($0=j0,j0=null):$0=j0.sibling;var T0=f0(E0,j0,v0[C0],S0);if(T0===null){j0===null&&(j0=$0);break}r0&&j0&&T0.alternate===null&&e0(E0,j0),w0=s0(T0,w0,C0),R0===null?k0=T0:R0.sibling=T0,R0=T0,j0=$0}if(C0===v0.length)return n0(E0,j0),gl&&cl(E0,C0),k0;if(j0===null){for(;C0<v0.length;C0++)(j0=h0(E0,v0[C0],S0))!==null&&(w0=s0(j0,w0,C0),R0===null?k0=j0:R0.sibling=j0,R0=j0);return gl&&cl(E0,C0),k0}for(j0=a0(j0);C0<v0.length;C0++)($0=p0(j0,E0,C0,v0[C0],S0))!==null&&(r0&&$0.alternate!==null&&j0.delete($0.key===null?C0:$0.key),w0=s0($0,w0,C0),R0===null?k0=$0:R0.sibling=$0,R0=$0);return r0&&j0.forEach(function(I0){return e0(E0,I0)}),gl&&cl(E0,C0),k0}(m0,x0,g0,y0);if(Pr(g0)){if(typeof(b0=Pr(g0))!="function")throw Error(mr(150));return function(E0,w0,v0,S0){if(v0==null)throw Error(mr(151));for(var k0=null,R0=null,j0=w0,C0=w0=0,$0=null,T0=v0.next();j0!==null&&!T0.done;C0++,T0=v0.next()){j0.index>C0?($0=j0,j0=null):$0=j0.sibling;var I0=f0(E0,j0,T0.value,S0);if(I0===null){j0===null&&(j0=$0);break}r0&&j0&&I0.alternate===null&&e0(E0,j0),w0=s0(I0,w0,C0),R0===null?k0=I0:R0.sibling=I0,R0=I0,j0=$0}if(T0.done)return n0(E0,j0),gl&&cl(E0,C0),k0;if(j0===null){for(;!T0.done;C0++,T0=v0.next())(T0=h0(E0,T0.value,S0))!==null&&(w0=s0(T0,w0,C0),R0===null?k0=T0:R0.sibling=T0,R0=T0);return gl&&cl(E0,C0),k0}for(j0=a0(j0);!T0.done;C0++,T0=v0.next())(T0=p0(j0,E0,C0,T0.value,S0))!==null&&(r0&&T0.alternate!==null&&j0.delete(T0.key===null?C0:T0.key),w0=s0(T0,w0,C0),R0===null?k0=T0:R0.sibling=T0,R0=T0);return r0&&j0.forEach(function(M0){return e0(E0,M0)}),gl&&cl(E0,C0),k0}(m0,x0,g0=b0.call(g0),y0)}if(typeof g0.then=="function")return A0(m0,x0,sd(g0),y0);if(g0.$$typeof===Nr)return A0(m0,x0,zl(m0,g0),y0);ld(m0,g0)}return typeof g0=="string"&&g0!==""||typeof g0=="number"||typeof g0=="bigint"?(g0=""+g0,x0!==null&&x0.tag===6?(n0(m0,x0.sibling),(y0=i0(x0,g0)).return=m0,m0=y0):(n0(m0,x0),(y0=$o(g0,m0.mode,y0)).return=m0,m0=y0),o0(m0)):n0(m0,x0)}return function(m0,x0,g0,y0){try{Ad=0;var b0=A0(m0,x0,g0,y0);return id=null,b0}catch(w0){if(w0===nc||w0===rc)throw w0;var E0=Ho(29,w0,null,m0.mode);return E0.lanes=y0,E0.return=m0,E0}}}var dd=ud(!0),hd=ud(!1),pd=qr(null),fd=null;function gd(r0){var e0=r0.alternate;Xr(Ed,1&Ed.current),Xr(pd,r0),fd===null&&(e0===null||Sc.current!==null||e0.memoizedState!==null)&&(fd=r0)}function md(r0){if(r0.tag===22){if(Xr(Ed,Ed.current),Xr(pd,r0),fd===null){var e0=r0.alternate;e0!==null&&e0.memoizedState!==null&&(fd=r0)}}else wd()}function wd(){Xr(Ed,Ed.current),Xr(pd,pd.current)}
762function bd(r0){Zr(pd),fd===r0&&(fd=null),Zr(Ed)}var Ed=qr(0);function yd(r0){for(var e0=r0;e0!==null;){if(e0.tag===13){var n0=e0.memoizedState;if(n0!==null&&((n0=n0.dehydrated)===null||n0.data==="$?"||xg(n0)))return e0}else if(e0.tag===19&&e0.memoizedProps.revealOrder!==void 0){if(128&e0.flags)return e0}else if(e0.child!==null){e0.child.return=e0,e0=e0.child;continue}if(e0===r0)break;for(;e0.sibling===null;){if(e0.return===null||e0.return===r0)return null;e0=e0.return}e0.sibling.return=e0.return,e0=e0.sibling}return null}function kd(r0,e0,n0,a0){n0=(n0=n0(a0,e0=r0.memoizedState))==null?e0:vr({},e0,n0),r0.memoizedState=n0,r0.lanes===0&&(r0.updateQueue.baseState=n0)}var vd={enqueueSetState:function(r0,e0,n0){r0=r0._reactInternals;var a0=jp(),i0=fc(a0);i0.payload=e0,n0!=null&&(i0.callback=n0),(e0=gc(r0,i0,a0))!==null&&(Yp(e0,0,a0),mc(e0,r0,a0))},enqueueReplaceState:function(r0,e0,n0){r0=r0._reactInternals;var a0=jp(),i0=fc(a0);i0.tag=1,i0.payload=e0,n0!=null&&(i0.callback=n0),(e0=gc(r0,i0,a0))!==null&&(Yp(e0,0,a0),mc(e0,r0,a0))},enqueueForceUpdate:function(r0,e0){r0=r0._reactInternals;var n0=jp(),a0=fc(n0);a0.tag=2,e0!=null&&(a0.callback=e0),(e0=gc(r0,a0,n0))!==null&&(Yp(e0,0,n0),mc(e0,r0,n0))}};function Sd(r0,e0,n0,a0,i0,s0,o0){return typeof(r0=r0.stateNode).shouldComponentUpdate=="function"?r0.shouldComponentUpdate(a0,s0,o0):!(e0.prototype&&e0.prototype.isPureReactComponent&&Ao(n0,a0)&&Ao(i0,s0))}function Id(r0,e0,n0,a0){r0=e0.state,typeof e0.componentWillReceiveProps=="function"&&e0.componentWillReceiveProps(n0,a0),typeof e0.UNSAFE_componentWillReceiveProps=="function"&&e0.UNSAFE_componentWillReceiveProps(n0,a0),e0.state!==r0&&vd.enqueueReplaceState(e0,e0.state,null)}function Cd(r0,e0){var n0=e0;if("ref"in e0)for(var a0 in n0={},e0)a0!=="ref"&&(n0[a0]=e0[a0]);if(r0=r0.defaultProps)for(var i0 in n0===e0&&(n0=vr({},n0)),r0)n0[i0]===void 0&&(n0[i0]=r0[i0]);return n0}var xd=typeof reportError=="function"?reportError:function(r0){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e0=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r0=="object"&&r0!==null&&typeof r0.message=="string"?String(r0.message):String(r0),error:r0});if(!window.dispatchEvent(e0))return}else if(typeof process=="object"&&typeof process.emit=="function")return void process.emit("uncaughtException",r0)};function Td(r0){xd(r0)}function Bd(r0){}function Ud(r0){xd(r0)}function Md(r0,e0){try{(0,r0.onUncaughtError)(e0.value,{componentStack:e0.stack})}catch(n0){setTimeout(function(){throw n0})}}function Nd(r0,e0,n0){try{(0,r0.onCaughtError)(n0.value,{componentStack:n0.stack,errorBoundary:e0.tag===1?e0.stateNode:null})}catch(a0){setTimeout(function(){throw a0})}}function Dd(r0,e0,n0){return(n0=fc(n0)).tag=3,n0.payload={element:null},n0.callback=function(){Md(r0,e0)},n0}function Od(r0){return(r0=fc(r0)).tag=3,r0}function Ld(r0,e0,n0,a0){var i0=n0.type.getDerivedStateFromError;if(typeof i0=="function"){var s0=a0.value;r0.payload=function(){return i0(s0)},r0.callback=function(){Nd(e0,n0,a0)}}var o0=n0.stateNode;o0!==null&&typeof o0.componentDidCatch=="function"&&(r0.callback=function(){Nd(e0,n0,a0),typeof i0!="function"&&(Op===null?Op=new Set([this]):Op.add(this));var l0=a0.stack;this.componentDidCatch(a0.value,{componentStack:l0!==null?l0:""})})}var _d=Error(mr(461)),Rd=!1;function zd(r0,e0,n0,a0){e0.child=r0===null?hd(e0,null,n0,a0):dd(e0,r0.child,n0,a0)}function Fd(r0,e0,n0,a0,i0){n0=n0.render;var s0=e0.ref;if("ref"in a0){var o0={};for(var l0 in a0)l0!=="ref"&&(o0[l0]=a0[l0])}else o0=a0;return _l(e0),a0=Vc(r0,e0,n0,o0,s0,i0),l0=Yc(),r0===null||Rd?(gl&&l0&&dl(e0),e0.flags|=1,zd(r0,e0,a0,i0),e0.child):(Hc(r0,e0,i0),ih(r0,e0,i0))}function Qd(r0,e0,n0,a0,i0){if(r0===null){var s0=n0.type;return typeof s0!="function"||Jo(s0)||s0.defaultProps!==void 0||n0.compare!==null?((r0=Zo(n0.type,null,a0,e0,e0.mode,i0)).ref=e0.ref,r0.return=e0,e0.child=r0):(e0.tag=15,e0.type=s0,Pd(r0,e0,s0,a0,i0))}if(s0=r0.child,!Ah(r0,i0)){var o0=s0.memoizedProps;if((n0=(n0=n0.compare)!==null?n0:Ao)(o0,a0)&&r0.ref===e0.ref)return ih(r0,e0,i0)}return e0.flags|=1,(r0=Wo(s0,a0)).ref=e0.ref,r0.return=e0,e0.child=r0}function Pd(r0,e0,n0,a0,i0){if(r0!==null){var s0=r0.memoizedProps;if(Ao(s0,a0)&&r0.ref===e0.ref){if(Rd=!1,e0.pendingProps=a0=s0,!Ah(r0,i0))return e0.lanes=r0.lanes,ih(r0,e0,i0);131072&r0.flags&&(Rd=!0)}}return Kd(r0,e0,n0,a0,i0)}
762function Vd(r0,e0,n0){var a0=e0.pendingProps,i0=a0.children,s0=r0!==null?r0.memoizedState:null;if(a0.mode==="hidden"){if(128&e0.flags){if(a0=s0!==null?s0.baseLanes|n0:n0,r0!==null){for(i0=e0.child=r0.child,s0=0;i0!==null;)s0=s0|i0.lanes|i0.childLanes,i0=i0.sibling;e0.childLanes=s0&~a0}else e0.childLanes=0,e0.child=null;return Gd(r0,e0,a0,n0)}if(!(536870912&n0))return e0.lanes=e0.childLanes=536870912,Gd(r0,e0,s0!==null?s0.baseLanes|n0:n0,n0);e0.memoizedState={baseLanes:0,cachePool:null},r0!==null&&ec(0,s0!==null?s0.cachePool:null),s0!==null?Cc(e0,s0):xc(),md(e0)}else s0!==null?(ec(0,s0.cachePool),Cc(e0,s0),wd(),e0.memoizedState=null):(r0!==null&&ec(0,null),xc(),wd());return zd(r0,e0,i0,n0),e0.child}function Gd(r0,e0,n0,a0){var i0=$l();return i0=i0===null?null:{parent:Gl._currentValue,pool:i0},e0.memoizedState={baseLanes:n0,cachePool:i0},r0!==null&&ec(0,null),xc(),md(e0),r0!==null&&Ol(r0,e0,a0,!0),null}function jd(r0,e0){var n0=e0.ref;if(n0===null)r0!==null&&r0.ref!==null&&(e0.flags|=4194816);else{if(typeof n0!="function"&&typeof n0!="object")throw Error(mr(284));r0!==null&&r0.ref===n0||(e0.flags|=4194816)}}function Kd(r0,e0,n0,a0,i0){return _l(e0),n0=Vc(r0,e0,n0,a0,void 0,i0),a0=Yc(),r0===null||Rd?(gl&&a0&&dl(e0),e0.flags|=1,zd(r0,e0,n0,i0),e0.child):(Hc(r0,e0,i0),ih(r0,e0,i0))}function Yd(r0,e0,n0,a0,i0,s0){return _l(e0),e0.updateQueue=null,n0=jc(e0,a0,n0,i0),Gc(r0),a0=Yc(),r0===null||Rd?(gl&&a0&&dl(e0),e0.flags|=1,zd(r0,e0,n0,s0),e0.child):(Hc(r0,e0,s0),ih(r0,e0,s0))}function Hd(r0,e0,n0,a0,i0){if(_l(e0),e0.stateNode===null){var s0=Ko,o0=n0.contextType;typeof o0=="object"&&o0!==null&&(s0=Rl(o0)),s0=new n0(a0,s0),e0.memoizedState=s0.state!==null&&s0.state!==void 0?s0.state:null,s0.updater=vd,e0.stateNode=s0,s0._reactInternals=e0,(s0=e0.stateNode).props=a0,s0.state=e0.memoizedState,s0.refs={},hc(e0),o0=n0.contextType,s0.context=typeof o0=="object"&&o0!==null?Rl(o0):Ko,s0.state=e0.memoizedState,typeof(o0=n0.getDerivedStateFromProps)=="function"&&(kd(e0,n0,o0,a0),s0.state=e0.memoizedState),typeof n0.getDerivedStateFromProps=="function"||typeof s0.getSnapshotBeforeUpdate=="function"||typeof s0.UNSAFE_componentWillMount!="function"&&typeof s0.componentWillMount!="function"||(o0=s0.state,typeof s0.componentWillMount=="function"&&s0.componentWillMount(),typeof s0.UNSAFE_componentWillMount=="function"&&s0.UNSAFE_componentWillMount(),o0!==s0.state&&vd.enqueueReplaceState(s0,s0.state,null),yc(e0,a0,s0,i0),Ec(),s0.state=e0.memoizedState),typeof s0.componentDidMount=="function"&&(e0.flags|=4194308),a0=!0}else if(r0===null){s0=e0.stateNode;var l0=e0.memoizedProps,c0=Cd(n0,l0);s0.props=c0;var u0=s0.context,d0=n0.contextType;o0=Ko,typeof d0=="object"&&d0!==null&&(o0=Rl(d0));var h0=n0.getDerivedStateFromProps;d0=typeof h0=="function"||typeof s0.getSnapshotBeforeUpdate=="function",l0=e0.pendingProps!==l0,d0||typeof s0.UNSAFE_componentWillReceiveProps!="function"&&typeof s0.componentWillReceiveProps!="function"||(l0||u0!==o0)&&Id(e0,s0,a0,o0),dc=!1;var f0=e0.memoizedState;s0.state=f0,yc(e0,a0,s0,i0),Ec(),u0=e0.memoizedState,l0||f0!==u0||dc?(typeof h0=="function"&&(kd(e0,n0,h0,a0),u0=e0.memoizedState),(c0=dc||Sd(e0,n0,c0,a0,f0,u0,o0))?(d0||typeof s0.UNSAFE_componentWillMount!="function"&&typeof s0.componentWillMount!="function"||(typeof s0.componentWillMount=="function"&&s0.componentWillMount(),typeof s0.UNSAFE_componentWillMount=="function"&&s0.UNSAFE_componentWillMount()),typeof s0.componentDidMount=="function"&&(e0.flags|=4194308)):(typeof s0.componentDidMount=="function"&&(e0.flags|=4194308),e0.memoizedProps=a0,e0.memoizedState=u0),s0.props=a0,s0.state=u0,s0.context=o0,a0=c0):(typeof s0.componentDidMount=="function"&&(e0.flags|=4194308),a0=!1)}else{s0=e0.stateNode,pc(r0,e0),d0=Cd(n0,o0=e0.memoizedProps),s0.props=d0,h0=e0.pe
762ndingProps,f0=s0.context,u0=n0.contextType,c0=Ko,typeof u0=="object"&&u0!==null&&(c0=Rl(u0)),(u0=typeof(l0=n0.getDerivedStateFromProps)=="function"||typeof s0.getSnapshotBeforeUpdate=="function")||typeof s0.UNSAFE_componentWillReceiveProps!="function"&&typeof s0.componentWillReceiveProps!="function"||(o0!==h0||f0!==c0)&&Id(e0,s0,a0,c0),dc=!1,f0=e0.memoizedState,s0.state=f0,yc(e0,a0,s0,i0),Ec();var p0=e0.memoizedState;o0!==h0||f0!==p0||dc||r0!==null&&r0.dependencies!==null&&Ll(r0.dependencies)?(typeof l0=="function"&&(kd(e0,n0,l0,a0),p0=e0.memoizedState),(d0=dc||Sd(e0,n0,d0,a0,f0,p0,c0)||r0!==null&&r0.dependencies!==null&&Ll(r0.dependencies))?(u0||typeof s0.UNSAFE_componentWillUpdate!="function"&&typeof s0.componentWillUpdate!="function"||(typeof s0.componentWillUpdate=="function"&&s0.componentWillUpdate(a0,p0,c0),typeof s0.UNSAFE_componentWillUpdate=="function"&&s0.UNSAFE_componentWillUpdate(a0,p0,c0)),typeof s0.componentDidUpdate=="function"&&(e0.flags|=4),typeof s0.getSnapshotBeforeUpdate=="function"&&(e0.flags|=1024)):(typeof s0.componentDidUpdate!="function"||o0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=4),typeof s0.getSnapshotBeforeUpdate!="function"||o0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=1024),e0.memoizedProps=a0,e0.memoizedState=p0),s0.props=a0,s0.state=p0,s0.context=c0,a0=d0):(typeof s0.componentDidUpdate!="function"||o0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=4),typeof s0.getSnapshotBeforeUpdate!="function"||o0===r0.memoizedProps&&f0===r0.memoizedState||(e0.flags|=1024),a0=!1)}return s0=a0,jd(r0,e0),a0=!!(128&e0.flags),s0||a0?(s0=e0.stateNode,n0=a0&&typeof n0.getDerivedStateFromError!="function"?null:s0.render(),e0.flags|=1,r0!==null&&a0?(e0.child=dd(e0,r0.child,null,i0),e0.child=dd(e0,null,n0,i0)):zd(r0,e0,n0,i0),e0.memoizedState=s0.state,r0=e0.child):r0=ih(r0,e0,i0),r0}function Jd(r0,e0,n0,a0){return Sl(),e0.flags|=256,zd(r0,e0,n0,a0),e0.child}var Wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qd(r0){return{baseLanes:r0,cachePool:tc()}}function Zd(r0,e0,n0){return r0=r0!==null?r0.childLanes&~n0:0,e0&&(r0|=Cp),r0}function Xd(r0,e0,n0){var a0,i0=e0.pendingProps,s0=!1,o0=!!(128&e0.flags);if((a0=o0)||(a0=(r0===null||r0.memoizedState!==null)&&!!(2&Ed.current)),a0&&(s0=!0,e0.flags&=-129),a0=!!(32&e0.flags),e0.flags&=-33,r0===null){if(gl){if(s0?gd(e0):wd(),gl){var l0,c0=fl;if(l0=c0){e:{for(l0=c0,c0=wl;l0.nodeType!==8;){if(!c0){c0=null;break e}if((l0=Tg(l0.nextSibling))===null){c0=null;break e}}c0=l0}c0!==null?(e0.memoizedState={dehydrated:c0,treeContext:sl!==null?{id:ol,overflow:ll}:null,retryLane:536870912,hydrationErrors:null},(l0=Ho(18,null,null,0)).stateNode=c0,l0.return=e0,e0.child=l0,pl=e0,fl=null,l0=!0):l0=!1}l0||El(e0)}if((c0=e0.memoizedState)!==null&&(c0=c0.dehydrated)!==null)return xg(c0)?e0.lanes=32:e0.lanes=536870912,null;bd(e0)}return c0=i0.children,i0=i0.fallback,s0?(wd(),c0=eh({mode:"hidden",children:c0},s0=e0.mode),i0=Xo(i0,s0,n0,null),c0.return=e0,i0.return=e0,c0.sibling=i0,e0.child=c0,(s0=e0.child).memoizedState=qd(n0),s0.childLanes=Zd(r0,a0,n0),e0.memoizedState=Wd,i0):(gd(e0),$d(e0,c0))}if((l0=r0.memoizedState)!==null&&(c0=l0.dehydrated)!==null){if(o0)256&e0.flags?(gd(e0),e0.flags&=-257,e0=th(r0,e0,n0)):e0.memoizedState!==null?(wd(),e0.child=r0.child,e0.flags|=128,e0=null):(wd(),s0=i0.fallback,c0=e0.mode,i0=eh({mode:"visible",children:i0.children},c0),(s0=Xo(s0,c0,n0,null)).flags|=2,i0.return=e0,s0.return=e0,i0.sibling=s0,e0.child=i0,dd(e0,r0.child,null,n0),(i0=e0.child).memoizedState=qd(n0),i0.childLanes=Zd(r0,a0,n0),e0.memoizedState=Wd,e0=s0);else if(gd(e0),xg(c0)){if(a0=c0.nextSibling&&c0.nextSibling.dataset)var u0=a0.dgst;a0=u0,(i0=Error(mr(419))).stack="",i0.digest=a0,Cl({value:i0,source:null,stack:null}),e0=th(r0,e0,n0)}else if(Rd||Ol(r0,e0,n0,!1),a0=(n0&r0.childLanes)!==0,Rd||a0){if((a0=hp)!==null&&(i0=(i0=42&(i0=n0&-n0)?1:Fi(i0))&(a0.suspendedLanes|n0)?0:i0)!==0&&i0!==l0.retryLane)throw l0.retryLane=i0,Vo(r0,i0),Yp(a0,0,i0),_d;c0.data==="$?"||af(),e0=th(r0,e0,n0)}else c0.data==="$?"?(e0.flags|=192,e0.child=r0.child,e0=null):(r0=l0.treeContext,fl=Tg(c0.nextSibling),pl=e0,gl=!0,ml=null,wl=!1,r0!==null&&(il[Al++]=ol,il[Al++]=ll,il[Al++]=sl,ol=r0.id,ll=r0.overflow,sl=e0),(e0=$d(e0,i0.children)).flags|=4096);return e0}
762return s0?(wd(),s0=i0.fallback,c0=e0.mode,u0=(l0=r0.child).sibling,(i0=Wo(l0,{mode:"hidden",children:i0.children})).subtreeFlags=65011712&l0.subtreeFlags,u0!==null?s0=Wo(u0,s0):(s0=Xo(s0,c0,n0,null)).flags|=2,s0.return=e0,i0.return=e0,i0.sibling=s0,e0.child=i0,i0=s0,s0=e0.child,(c0=r0.child.memoizedState)===null?c0=qd(n0):((l0=c0.cachePool)!==null?(u0=Gl._currentValue,l0=l0.parent!==u0?{parent:u0,pool:u0}:l0):l0=tc(),c0={baseLanes:c0.baseLanes|n0,cachePool:l0}),s0.memoizedState=c0,s0.childLanes=Zd(r0,a0,n0),e0.memoizedState=Wd,i0):(gd(e0),r0=(n0=r0.child).sibling,(n0=Wo(n0,{mode:"visible",children:i0.children})).return=e0,n0.sibling=null,r0!==null&&((a0=e0.deletions)===null?(e0.deletions=[r0],e0.flags|=16):a0.push(r0)),e0.child=n0,e0.memoizedState=null,n0)}function $d(r0,e0){return(e0=eh({mode:"visible",children:e0},r0.mode)).return=r0,r0.child=e0}function eh(r0,e0){return(r0=Ho(22,r0,null,e0)).lanes=0,r0.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},r0}function th(r0,e0,n0){return dd(e0,r0.child,null,n0),(r0=$d(e0,e0.pendingProps.children)).flags|=2,e0.memoizedState=null,r0}function nh(r0,e0,n0){r0.lanes|=e0;var a0=r0.alternate;a0!==null&&(a0.lanes|=e0),Nl(r0.return,e0,n0)}function ah(r0,e0,n0,a0,i0){var s0=r0.memoizedState;s0===null?r0.memoizedState={isBackwards:e0,rendering:null,renderingStartTime:0,last:a0,tail:n0,tailMode:i0}:(s0.isBackwards=e0,s0.rendering=null,s0.renderingStartTime=0,s0.last=a0,s0.tail=n0,s0.tailMode=i0)}function rh(r0,e0,n0){var a0=e0.pendingProps,i0=a0.revealOrder,s0=a0.tail;if(zd(r0,e0,a0.children,n0),2&(a0=Ed.current))a0=1&a0|2,e0.flags|=128;else{if(r0!==null&&128&r0.flags)e:for(r0=e0.child;r0!==null;){if(r0.tag===13)r0.memoizedState!==null&&nh(r0,n0,e0);else if(r0.tag===19)nh(r0,n0,e0);else if(r0.child!==null){r0.child.return=r0,r0=r0.child;continue}if(r0===e0)break e;for(;r0.sibling===null;){if(r0.return===null||r0.return===e0)break e;r0=r0.return}r0.sibling.return=r0.return,r0=r0.sibling}a0&=1}switch(Xr(Ed,a0),i0){case"forwards":for(n0=e0.child,i0=null;n0!==null;)(r0=n0.alternate)!==null&&yd(r0)===null&&(i0=n0),n0=n0.sibling;(n0=i0)===null?(i0=e0.child,e0.child=null):(i0=n0.sibling,n0.sibling=null),ah(e0,!1,i0,n0,s0);break;case"backwards":for(n0=null,i0=e0.child,e0.child=null;i0!==null;){if((r0=i0.alternate)!==null&&yd(r0)===null){e0.child=i0;break}r0=i0.sibling,i0.sibling=n0,n0=i0,i0=r0}ah(e0,!0,n0,null,s0);break;case"together":ah(e0,!1,null,null,void 0);break;default:e0.memoizedState=null}return e0.child}function ih(r0,e0,n0){if(r0!==null&&(e0.dependencies=r0.dependencies),vp|=e0.lanes,(n0&e0.childLanes)===0&&(r0===null||(Ol(r0,e0,n0,!1),(n0&e0.childLanes)===0)))return null;if(r0!==null&&e0.child!==r0.child)throw Error(mr(153));if(e0.child!==null){for(n0=Wo(r0=e0.child,r0.pendingProps),e0.child=n0,n0.return=e0;r0.sibling!==null;)r0=r0.sibling,(n0=n0.sibling=Wo(r0,r0.pendingProps)).return=e0;n0.sibling=null}return e0.child}function Ah(r0,e0){return(r0.lanes&e0)!==0||!((r0=r0.dependencies)===null||!Ll(r0))}function sh(r0,e0,n0){if(r0!==null)if(r0.memoizedProps!==e0.pendingProps)Rd=!0;else{if(!(Ah(r0,n0)||128&e0.flags))return Rd=!1,function(l0,c0,u0){switch(c0.tag){case 3:ai(c0,c0.stateNode.containerInfo),Ul(0,Gl,l0.memoizedState.cache),Sl();break;case 27:case 5:ii(c0);break;case 4:ai(c0,c0.stateNode.containerInfo);break;case 10:Ul(0,c0.type,c0.memoizedProps.value);break;case 13:var d0=c0.memoizedState;if(d0!==null)return d0.dehydrated!==null?(gd(c0),c0.flags|=128,null):u0&c0.child.childLanes?Xd(l0,c0,u0):(gd(c0),(l0=ih(l0,c0,u0))!==null?l0.sibling:null);gd(c0);break;case 19:var h0=!!(128&l0.flags);if((d0=(u0&c0.childLanes)!==0)||(Ol(l0,c0,u0,!1),d0=(u0&c0.childLanes)!==0),h0){if(d0)return rh(l0,c0,u0);c0.flags|=128}if((h0=c0.memoizedState)!==null&&(h0.rendering=null,h0.tail=null,h0.lastEffect=null),Xr(Ed,Ed.current),d0)break;return null;case 22:case 23:return c0.lanes=0,Vd(l0,c0,u0);case 24:Ul(0,Gl,l0.memoizedState.cache)}return ih(l0,c0,u0)}(r0,e0,n0);Rd=!!(131072&r0.flags)}else Rd=!1,gl&&1048576&e0.flags&&ul(e0,rl,e0.index);switch(e0.lanes=0,e0.tag){case 16:e:{r0=e0.pendingProps;var a0=e0.elementType,i0=a0._init;if(a0=i0(a0._payload),e0.type=a0,typeof a0!="function"){if(a0!=null){if((i0=a0.$$typeof)===Dr){e0.tag=11,e0=Fd(null,e0,a0,r0,n0);break e}if(i0===_r){e0.tag=14,e0=Qd(null,e0,a0,r0,n0);break e}}throw e0=Gr(a0)||a0,Error(mr(306,e0,""))}Jo(a0)?(r0=Cd(a0,r0),e0.tag=1,e0=Hd(null,e0,a0,r0,n0)):(e0.tag=0,e0=Kd(null,e0,a0,r0,n0))}return e0;case 0:return Kd(r0,e0,e0.type,e0.pendingProps,n0);case 1:return Hd(r0,e0,a0=e0.type,i0=Cd(a0,e0.pendingProps),n0);case 3:e:{if(ai(e0,e0.stateNode.containerInfo),r0===null)throw Error(mr(387));
762a0=e0.pendingProps;var s0=e0.memoizedState;i0=s0.element,pc(r0,e0),yc(e0,a0,null,n0);var o0=e0.memoizedState;if(a0=o0.cache,Ul(0,Gl,a0),a0!==s0.cache&&Dl(e0,[Gl],n0,!0),Ec(),a0=o0.element,s0.isDehydrated){if(s0={element:a0,isDehydrated:!1,cache:o0.cache},e0.updateQueue.baseState=s0,e0.memoizedState=s0,256&e0.flags){e0=Jd(r0,e0,a0,n0);break e}if(a0!==i0){Cl(i0=Lo(Error(mr(424)),e0)),e0=Jd(r0,e0,a0,n0);break e}for(r0=(r0=e0.stateNode.containerInfo).nodeType===9?r0.body:r0.nodeName==="HTML"?r0.ownerDocument.body:r0,fl=Tg(r0.firstChild),pl=e0,gl=!0,ml=null,wl=!0,n0=hd(e0,null,a0,n0),e0.child=n0;n0;)n0.flags=-3&n0.flags|4096,n0=n0.sibling}else{if(Sl(),a0===i0){e0=ih(r0,e0,n0);break e}zd(r0,e0,a0,n0)}e0=e0.child}return e0;case 26:return jd(r0,e0),r0===null?(n0=Fg(e0.type,null,e0.pendingProps,null))?e0.memoizedState=n0:gl||(n0=e0.type,r0=e0.pendingProps,(a0=pg(ti.current).createElement(n0))[Gi]=e0,a0[ji]=r0,ug(a0,n0,r0),nA(a0),e0.stateNode=a0):e0.memoizedState=Fg(e0.type,r0.memoizedProps,e0.pendingProps,r0.memoizedState),null;case 27:return ii(e0),r0===null&&gl&&(a0=e0.stateNode=Mg(e0.type,e0.pendingProps,ti.current),pl=e0,wl=!0,i0=fl,Sg(e0.type)?(Bg=i0,fl=Tg(a0.firstChild)):fl=i0),zd(r0,e0,e0.pendingProps.children,n0),jd(r0,e0),r0===null&&(e0.flags|=4194304),e0.child;case 5:return r0===null&&gl&&((i0=a0=fl)&&((a0=function(l0,c0,u0,d0){for(;l0.nodeType===1;){var h0=u0;if(l0.nodeName.toLowerCase()!==c0.toLowerCase()){if(!d0&&(l0.nodeName!=="INPUT"||l0.type!=="hidden"))break}else if(d0){if(!l0[qi])switch(c0){case"meta":if(!l0.hasAttribute("itemprop"))break;return l0;case"link":if((f0=l0.getAttribute("rel"))==="stylesheet"&&l0.hasAttribute("data-precedence")||f0!==h0.rel||l0.getAttribute("href")!==(h0.href==null||h0.href===""?null:h0.href)||l0.getAttribute("crossorigin")!==(h0.crossOrigin==null?null:h0.crossOrigin)||l0.getAttribute("title")!==(h0.title==null?null:h0.title))break;return l0;case"style":if(l0.hasAttribute("data-precedence"))break;return l0;case"script":if(((f0=l0.getAttribute("src"))!==(h0.src==null?null:h0.src)||l0.getAttribute("type")!==(h0.type==null?null:h0.type)||l0.getAttribute("crossorigin")!==(h0.crossOrigin==null?null:h0.crossOrigin))&&f0&&l0.hasAttribute("async")&&!l0.hasAttribute("itemprop"))break;return l0;default:return l0}}else{if(c0!=="input"||l0.type!=="hidden")return l0;var f0=h0.name==null?null:""+h0.name;if(h0.type==="hidden"&&l0.getAttribute("name")===f0)return l0}if((l0=Tg(l0.nextSibling))===null)break}return null}(a0,e0.type,e0.pendingProps,wl))!==null?(e0.stateNode=a0,pl=e0,fl=Tg(a0.firstChild),wl=!1,i0=!0):i0=!1),i0||El(e0)),ii(e0),i0=e0.type,s0=e0.pendingProps,o0=r0!==null?r0.memoizedProps:null,a0=s0.children,mg(i0,s0)?a0=null:o0!==null&&mg(i0,o0)&&(e0.flags|=32),e0.memoizedState!==null&&(i0=Vc(r0,e0,Kc,null,null,n0),im._currentValue=i0),jd(r0,e0),zd(r0,e0,a0,n0),e0.child;case 6:return r0===null&&gl&&((r0=n0=fl)&&((n0=function(l0,c0,u0){if(c0==="")return null;for(;l0.nodeType!==3;)if((l0.nodeType!==1||l0.nodeName!=="INPUT"||l0.type!=="hidden")&&!u0||(l0=Tg(l0.nextSibling))===null)return null;return l0}(n0,e0.pendingProps,wl))!==null?(e0.stateNode=n0,pl=e0,fl=null,r0=!0):r0=!1),r0||El(e0)),null;case 13:return Xd(r0,e0,n0);case 4:return ai(e0,e0.stateNode.containerInfo),a0=e0.pendingProps,r0===null?e0.child=dd(e0,null,a0,n0):zd(r0,e0,a0,n0),e0.child;case 11:return Fd(r0,e0,e0.type,e0.pendingProps,n0);case 7:return zd(r0,e0,e0.pendingProps,n0),e0.child;case 8:case 12:return zd(r0,e0,e0.pendingProps.children,n0),e0.child;case 10:return a0=e0.pendingProps,Ul(0,e0.type,a0.value),zd(r0,e0,a0.children,n0),e0.child;case 9:return i0=e0.type._context,a0=e0.pendingProps.children,_l(e0),a0=a0(i0=Rl(i0)),e0.flags|=1,zd(r0,e0,a0,n0),e0.child;case 14:return Qd(r0,e0,e0.type,e0.pendingProps,n0);case 15:return Pd(r0,e0,e0.type,e0.pendingProps,n0);case 19:return rh(r0,e0,n0);case 31:return a0=e0.pendingProps,n0=e0.mode,a0={mode:a0.mode,children:a0.children},r0===null?((n0=eh(a0,n0)).ref=e0.ref,e0.child=n0,n0.return=e0,e0=n0):((n0=Wo(r0.child,a0)).ref=e0.ref,e0.child=n0,n0.return=e0,e0=n0),e0;case 22:return Vd(r0,e0,n0);case 24:return _l(e0),a0=Rl(Gl),r0===null?((i0=$l())===null&&(i0=hp,s0=jl(),i0.pooledCache=s0,s0.refCount++,s0!==null&&(i0.pooledCacheLanes|=n0),i0=s0),e0.memoizedState={parent:a0,cache:i0},hc(e0),Ul(0,Gl,i0)):(r0.lanes&n0&&(pc(r0,e0),yc(e0,null,null,n0),Ec()),i0=r0.memoizedState,s0=e0.memoizedState,i0.parent!==a0?(i0={parent:a0,cache:a0},e0.memoizedState=i0,e0.lanes===0&&(e0.memoizedState=e0.updateQueue.baseState=i0),Ul(0,Gl,a0)):(a0=s0.cache,Ul(0,Gl,a0),a0!==i0.cache&&Dl(e0,[Gl],n0,!0))),zd(r0,e0,e0.pendingProps.children,n0),e0.child;case 29:throw e0.pendingProps}throw Error(mr(156,e0.tag))}function oh(r0){r0.flags|=4}function lh(r0,e0){if(e0.type!=="stylesheet"||4&e0.state.loading)r0.flags&=-16777217;else if(r0.flags|=16777216,!Xg(e0)){if((e0=pd.current)!==null&&((4194048&fp)===fp?fd!==null:(62914560&fp)!==fp&&!(536870912&fp)||e0!==fd))throw lc=ic,ac;r0.flags|=8192}}function ch(r0,e0){e0!==null&&(r0.flags|=4),16384&r0.flags&&(e0=r0.tag!==22?Oi():536870912,r0.lanes|=e0,xp|=e0)}function uh(r0,e0){if(!gl)switch(r0.tailMode){case"hidden":e0=r0.tail;for(var n0=null;e0!==null;)e0.alternate!==null&&(n0=e0),e0=e0.sibling;n0===null?r0.tail=null:n0.sibling=null;break;case"collapsed":n0=r0.tail;for(var a0=null;n0!==null;)n0.alternate!==null&&(a0=n0),n0=n0.sibling;a0===null?e0||r0.tail===null?r0.tail=null:r0.tail.sibling=null:a0.sibling=null}}function dh(r0){var e0=r0.alternate!==null&&r0.alternate.child===r0.child,n0=0,a0=0;if(e0)for(var i0=r0.child;i0!==null;)n0|=i0.lanes|i0.childLanes,a0|=65011712&i0.subtreeFlags,a0|=65011712&i0.flags,i0.return=r0,i0=i0.sibling;else for(i0=r0.child;i0!==null;)n0|=i0.lanes|i0.childLanes,a0|=i0.subtreeFlags,a0|=i0.flags,i0.return=r0,i0=i0.sibling;return r0.subtreeFlags|=a0,r0.childLanes=n0,e0}
762function hh(r0,e0,n0){var a0=e0.pendingProps;switch(hl(e0),e0.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return dh(e0),null;case 3:return n0=e0.stateNode,a0=null,r0!==null&&(a0=r0.memoizedState.cache),e0.memoizedState.cache!==a0&&(e0.flags|=2048),Ml(Gl),ri(),n0.pendingContext&&(n0.context=n0.pendingContext,n0.pendingContext=null),r0!==null&&r0.child!==null||(vl(e0)?oh(e0):r0===null||r0.memoizedState.isDehydrated&&!(256&e0.flags)||(e0.flags|=1024,Il())),dh(e0),null;case 26:return n0=e0.memoizedState,r0===null?(oh(e0),n0!==null?(dh(e0),lh(e0,n0)):(dh(e0),e0.flags&=-16777217)):n0?n0!==r0.memoizedState?(oh(e0),dh(e0),lh(e0,n0)):(dh(e0),e0.flags&=-16777217):(r0.memoizedProps!==a0&&oh(e0),dh(e0),e0.flags&=-16777217),null;case 27:Ai(e0),n0=ti.current;var i0=e0.type;if(r0!==null&&e0.stateNode!=null)r0.memoizedProps!==a0&&oh(e0);else{if(!a0){if(e0.stateNode===null)throw Error(mr(166));return dh(e0),null}r0=$r.current,vl(e0)?yl(e0):(r0=Mg(i0,a0,n0),e0.stateNode=r0,oh(e0))}return dh(e0),null;case 5:if(Ai(e0),n0=e0.type,r0!==null&&e0.stateNode!=null)r0.memoizedProps!==a0&&oh(e0);else{if(!a0){if(e0.stateNode===null)throw Error(mr(166));return dh(e0),null}if(r0=$r.current,vl(e0))yl(e0);else{switch(i0=pg(ti.current),r0){case 1:r0=i0.createElementNS("http://www.w3.org/2000/svg",n0);break;case 2:r0=i0.createElementNS("http://www.w3.org/1998/Math/MathML",n0);break;default:switch(n0){case"svg":r0=i0.createElementNS("http://www.w3.org/2000/svg",n0);break;case"math":r0=i0.createElementNS("http://www.w3.org/1998/Math/MathML",n0);break;case"script":(r0=i0.createElement("div")).innerHTML="<script><\/script>",r0=r0.removeChild(r0.firstChild);break;case"select":r0=typeof a0.is=="string"?i0.createElement("select",{is:a0.is}):i0.createElement("select"),a0.multiple?r0.multiple=!0:a0.size&&(r0.size=a0.size);break;default:r0=typeof a0.is=="string"?i0.createElement(n0,{is:a0.is}):i0.createElement(n0)}}r0[Gi]=e0,r0[ji]=a0;e:for(i0=e0.child;i0!==null;){if(i0.tag===5||i0.tag===6)r0.appendChild(i0.stateNode);else if(i0.tag!==4&&i0.tag!==27&&i0.child!==null){i0.child.return=i0,i0=i0.child;continue}if(i0===e0)break e;for(;i0.sibling===null;){if(i0.return===null||i0.return===e0)break e;i0=i0.return}i0.sibling.return=i0.return,i0=i0.sibling}e0.stateNode=r0;e:switch(ug(r0,n0,a0),n0){case"button":case"input":case"select":case"textarea":r0=!!a0.autoFocus;break e;case"img":r0=!0;break e;default:r0=!1}r0&&oh(e0)}}return dh(e0),e0.flags&=-16777217,null;case 6:if(r0&&e0.stateNode!=null)r0.memoizedProps!==a0&&oh(e0);else{if(typeof a0!="string"&&e0.stateNode===null)throw Error(mr(166));if(r0=ti.current,vl(e0)){if(r0=e0.stateNode,n0=e0.memoizedProps,a0=null,(i0=pl)!==null)switch(i0.tag){case 27:case 5:a0=i0.memoizedProps}r0[Gi]=e0,(r0=!!(r0.nodeValue===n0||a0!==null&&a0.suppressHydrationWarning===!0||sg(r0.nodeValue,n0)))||El(e0)}else(r0=pg(r0).createTextNode(a0))[Gi]=e0,e0.stateNode=r0}return dh(e0),null;case 13:if(a0=e0.memoizedState,r0===null||r0.memoizedState!==null&&r0.memoizedState.dehydrated!==null){if(i0=vl(e0),a0!==null&&a0.dehydrated!==null){if(r0===null){if(!i0)throw Error(mr(318));if(!(i0=(i0=e0.memoizedState)!==null?i0.dehydrated:null))throw Error(mr(317));i0[Gi]=e0}else Sl(),!(128&e0.flags)&&(e0.memoizedState=null),e0.flags|=4;dh(e0),i0=!1}else i0=Il(),r0!==null&&r0.memoizedState!==null&&(r0.memoizedState.hydrationErrors=i0),i0=!0;if(!i0)return 256&e0.flags?(bd(e0),e0):(bd(e0),null)}if(bd(e0),128&e0.flags)return e0.lanes=n0,e0;if(n0=a0!==null,r0=r0!==null&&r0.memoizedState!==null,n0){i0=null,(a0=e0.child).alternate!==null&&a0.alternate.memoizedState!==null&&a0.alternate.memoizedState.cachePool!==null&&(i0=a0.alternate.memoizedState.cachePool.pool);var s0=null;a0.memoizedState!==null&&a0.memoizedState.cachePool!==null&&(s0=a0.memoizedState.cachePool.pool),s0!==i0&&(a0.flags|=2048)}return n0!==r0&&n0&&(e0.child.flags|=8192),ch(e0,e0.updateQueue),dh(e0),null;case 4:return ri(),r0===null&&Zf(e0.stateNode.containerInfo),dh(e0),null;case 10:return Ml(e0.type),dh(e0),null;case 19:if(Zr(Ed),(i0=e0.memoizedState)===null)return dh(e0),null;if(a0=!!(128&e0.flags),(s0=i0.rendering)===null)if(a0)uh(i0,!1);else{if(kp!==0||r0!==null&&128&r0.flags)for(r0=e0.child;r0!==null;){if((s0=yd(r0))!==null){for(e0.flags|=128,uh(i0,!1),r0=s0.updateQueue,e0.updateQueue=r0,ch(e0,r0),e0.subtreeFlags=0,r0=n0,n0=e0.child;n0!==null;)qo(n0,r0),n0=n0.sibling;return Xr(Ed,1&Ed.current|2),e0.child}r0=r0.sibling}i0.tail!==null&&di()>Np&&(e0.flags|=128,a0=!0,uh(i0,!1),e0.lanes=4194304)}else{if(!a0)if((r0=yd(s0))!==null){if(e0.flags|=128,a0=!0,r0=r0.updateQueue,e0.updateQueue=r0,ch(e0,r0),uh(i0,!0),i0.tail===null&&i0.tailMode==="hidden"&&!s0.alternate&&!gl)return dh(e0),null}else 2*di()-i0.renderingStartTime>Np&&n0!==536870912&&(e0.flags|=128,a0=!0,uh(i0,!1),e0.lanes=4194304);i0.isBackwards?(s0.sibling=e0.child,e0.child=s0):((r0=i0.last)!==null?r0.sibling=s0:e0.child=s0,i0.last=s0)}return i0.tail!==null?(e0=i0.tail,i0.rendering=e0,i0.tail=e0.sibling,i0.renderingStartTime=di(),e0.sibling=null,r0=Ed.current,Xr(Ed,a0?1&r0|2:1&r0),e0):(dh(e0),null);case 22:case 23:return bd(e0),Tc(),a0=e0.memoizedState!==null,r0!==null?r0.memoizedState!==null!==a0&&(e0.flags|=8192):a0&&(e0.flags|=8192),a0?536870912&n0&&!(128&e0.flags)&&(dh(e0),6&e0.subtreeFlags&&(e0.flags|=8192)):dh(e0),(n0=e0.updateQueue)!==null&&ch(e0,n0.retryQueue),n0=null,r0!==null&&r0.memoizedState!==null&&r0.memoizedState.cachePool!==null&&(n0=r0.memoizedState.cachePool.pool),a0=null,e0.memoizedState!==null&&e0.memoizedState.cachePool!==null&&(a0=e0.memoizedState.cachePool.pool),a0!==n0&&(e0.flags|=2048),r0!==null&&Zr(Xl),null;case 24:return n0=null,r0!==null&&(n0=r0.memoizedState.cache),e0.memoizedState.cache!==n0&&(e0.flags|=2048),Ml(Gl),dh(e0),null;case 25:case 30:return null}throw Error(mr(156,e0.tag))}function ph(r0,e0){switch(hl(e0),e0.tag){case 1:return 65536&(r0=e0.flags)?(e0.flags=-65537&r0|128,e0):null;case 3:return Ml(Gl),ri(),65536&(r0=e0.flags)&&!(128&r0)?(e0.flags=-65537&r0|128,e0):null;case 26:case 27:case 5:return Ai(e0),null;case 13:if(bd(e0),(r0=e0.memoizedState)!==null&&r0.dehydrated!==null){if(e0.alternate===null)throw Error(mr(340));Sl()}return 65536&(r0=e0.flags)?(e0.flags=-65537&r0|128,e0):null;case 19:return Zr(Ed),null;case 4:return ri(),null;case 10:return Ml(e0.type),null;
vendor: 6,975 bytes, line 762
762case 22:case 23:return bd(e0),Tc(),r0!==null&&Zr(Xl),65536&(r0=e0.flags)?(e0.flags=-65537&r0|128,e0):null;case 24:return Ml(Gl),null;default:return null}}function fh(r0,e0){switch(hl(e0),e0.tag){case 3:Ml(Gl),ri();break;case 26:case 27:case 5:Ai(e0);break;case 4:ri();break;case 13:bd(e0);break;case 19:Zr(Ed);break;case 10:Ml(e0.type);break;case 22:case 23:bd(e0),Tc(),r0!==null&&Zr(Xl);break;case 24:Ml(Gl)}}function gh(r0,e0){try{var n0=e0.updateQueue,a0=n0!==null?n0.lastEffect:null;if(a0!==null){var i0=a0.next;n0=i0;do{if((n0.tag&r0)===r0){a0=void 0;var s0=n0.create,o0=n0.inst;a0=s0(),o0.destroy=a0}n0=n0.next}while(n0!==i0)}}catch(l0){yf(e0,e0.return,l0)}}function mh(r0,e0,n0){try{var a0=e0.updateQueue,i0=a0!==null?a0.lastEffect:null;if(i0!==null){var s0=i0.next;a0=s0;do{if((a0.tag&r0)===r0){var o0=a0.inst,l0=o0.destroy;if(l0!==void 0){o0.destroy=void 0,i0=e0;var c0=n0,u0=l0;try{u0()}catch(d0){yf(i0,c0,d0)}}}a0=a0.next}while(a0!==s0)}}catch(d0){yf(e0,e0.return,d0)}}function wh(r0){var e0=r0.updateQueue;if(e0!==null){var n0=r0.stateNode;try{vc(e0,n0)}catch(a0){yf(r0,r0.return,a0)}}}function bh(r0,e0,n0){n0.props=Cd(r0.type,r0.memoizedProps),n0.state=r0.memoizedState;try{n0.componentWillUnmount()}catch(a0){yf(r0,e0,a0)}}function Eh(r0,e0){try{var n0=r0.ref;if(n0!==null){switch(r0.tag){case 26:case 27:case 5:var a0=r0.stateNode;break;default:a0=r0.stateNode}typeof n0=="function"?r0.refCleanup=n0(a0):n0.current=a0}}catch(i0){yf(r0,e0,i0)}}function yh(r0,e0){var n0=r0.ref,a0=r0.refCleanup;if(n0!==null)if(typeof a0=="function")try{a0()}catch(i0){yf(r0,e0,i0)}finally{r0.refCleanup=null,(r0=r0.alternate)!=null&&(r0.refCleanup=null)}else if(typeof n0=="function")try{n0(null)}catch(i0){yf(r0,e0,i0)}else n0.current=null}function kh(r0){var e0=r0.type,n0=r0.memoizedProps,a0=r0.stateNode;try{e:switch(e0){case"button":case"input":case"select":case"textarea":n0.autoFocus&&a0.focus();break e;case"img":n0.src?a0.src=n0.src:n0.srcSet&&(a0.srcset=n0.srcSet)}}catch(i0){yf(r0,r0.return,i0)}}function vh(r0,e0,n0){try{var a0=r0.stateNode;(function(i0,s0,o0,l0){switch(s0){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c0=null,u0=null,d0=null,h0=null,f0=null,p0=null,A0=null;for(g0 in o0){var m0=o0[g0];if(o0.hasOwnProperty(g0)&&m0!=null)switch(g0){case"checked":case"value":break;case"defaultValue":f0=m0;default:l0.hasOwnProperty(g0)||lg(i0,s0,g0,null,l0,m0)}}for(var x0 in l0){var g0=l0[x0];if(m0=o0[x0],l0.hasOwnProperty(x0)&&(g0!=null||m0!=null))switch(x0){case"type":u0=g0;break;case"name":c0=g0;break;case"checked":p0=g0;break;case"defaultChecked":A0=g0;break;case"value":d0=g0;break;case"defaultValue":h0=g0;break;case"children":case"dangerouslySetInnerHTML":if(g0!=null)throw Error(mr(137,s0));break;default:g0!==m0&&lg(i0,s0,x0,g0,l0,m0)}}return void xA(i0,d0,h0,f0,p0,A0,u0,c0);case"select":for(u0 in g0=d0=h0=x0=null,o0)if(f0=o0[u0],o0.hasOwnProperty(u0)&&f0!=null)switch(u0){case"value":break;case"multiple":g0=f0;default:l0.hasOwnProperty(u0)||lg(i0,s0,u0,null,l0,f0)}for(c0 in l0)if(u0=l0[c0],f0=o0[c0],l0.hasOwnProperty(c0)&&(u0!=null||f0!=null))switch(c0){case"value":x0=u0;break;case"defaultValue":h0=u0;break;case"multiple":d0=u0;default:u0!==f0&&lg(i0,s0,c0,u0,l0,f0)}return s0=h0,o0=d0,l0=g0,void(x0!=null?UA(i0,!!o0,x0,!1):!!l0!=!!o0&&(s0!=null?UA(i0,!!o0,s0,!0):UA(i0,!!o0,o0?[]:"",!1)));case"textarea":for(h0 in g0=x0=null,o0)if(c0=o0[h0],o0.hasOwnProperty(h0)&&c0!=null&&!l0.hasOwnProperty(h0))switch(h0){case"value":case"children":break;default:lg(i0,s0,h0,null,l0,c0)}for(d0 in l0)if(c0=l0[d0],u0=o0[d0],l0.hasOwnProperty(d0)&&(c0!=null||u0!=null))switch(d0){case"value":x0=c0;break;case"defaultValue":g0=c0;break;case"children":break;case"dangerouslySetInnerHTML":if(c0!=null)throw Error(mr(91));break;default:c0!==u0&&lg(i0,s0,d0,c0,l0,u0)}return void MA(i0,x0,g0);case"option":for(var y0 in o0)x0=o0[y0],o0.hasOwnProperty(y0)&&x0!=null&&!l0.hasOwnProperty(y0)&&(y0==="selected"?i0.selected=!1:lg(i0,s0,y0,null,l0,x0));for(f0 in l0)x0=l0[f0],g0=o0[f0],!l0.hasOwnProperty(f0)||x0===g0||x0==null&&g0==null||(f0==="selected"?i0.selected=x0&&typeof x0!="function"&&typeof x0!="symbol":lg(i0,s0,f0,x0,l0,g0));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b0 in o0)x0=o0[b0],o0.hasOwnProperty(b0)&&x0!=null&&!l0.hasOwnProperty(b0)&&lg(i0,s0,b0,null,l0,x0);for(p0 in l0)if(x0=l0[p0],g0=o0[p0],l0.hasOwnProperty(p0)&&x0!==g0&&(x0!=null||g0!=null))switch(p0){case"children":case"dangerouslySetInnerHTML":if(x0!=null)throw Error(mr(137,s0));break;default:lg(i0,s0,p0,x0,l0,g0)}return;default:if(RA(s0)){for(var E0 in o0)x0=o0[E0],o0.hasOwnProperty(E0)&&x0!==void 0&&!l0.hasOwnProperty(E0)&&cg(i0,s0,E0,void 0,l0,x0);for(A0 in l0)x0=l0[A0],g0=o0[A0],!l0.hasOwnProperty(A0)||x0===g0||x0===void 0&&g0===void 0||cg(i0,s0,A0,x0,l0,g0);return}}for(var w0 in o0)x0=o0[w0],o0.hasOwnProperty(w0)&&x0!=null&&!l0.hasOwnProperty(w0)&&lg(i0,s0,w0,null,l0,x0);for(m0 in l0)x0=l0[m0],g0=o0[m0],!l0.hasOwnProperty(m0)||x0===g0||x0==null&&g0==null||lg(i0,s0,m0,x0,l0,g0)})(a0,r0.type,n0,e0),a0[ji]=e0}catch(i0){yf(r0,r0.return,i0)}}function Sh(r0){return r0.tag===5||r0.tag===3||r0.tag===26||r0.tag===27&&Sg(r0.type)||r0.tag===4}function Ih(r0){e:for(;;){for(;r0.sibling===null;){if(r0.return===null||Sh(r0.return))return null;r0=r0.return}for(r0.sibling.return=r0.return,r0=r0.sibling;r0.tag!==5&&r0.tag!==6&&r0.tag!==18;){if(r0.tag===27&&Sg(r0.type)||2&r0.flags||r0.child===null||r0.tag===4)continue e;r0.child.return=r0,r0=r0.child}if(!(2&r0.flags))return r0.stateNode}}function Ch(r0,e0,n0){var a0=r0.tag;if(a0===5||a0===6)r0=r0.stateNode,e0?(n0.nodeType===9?n0.body:n0.nodeName==="HTML"?n0.ownerDocument.body:n0).insertBefore(r0,e0):((e0=n0.nodeType===9?n0.body:n0.nodeName==="HTML"?n0.ownerDocument.body:n0).appendChild(r0),(n0=n0._reactRootContainer)!=null||e0.onclick!==null||(e0.onclick=og));else if(a0!==4&&(a0===27&&Sg(r0.type)&&(n0=r0.stateNode,e0=null),(r0=r0.child)!==null))for(Ch(r0,e0,n0),r0=r0.sibling;r0!==null;)Ch(r0,e0,n0),r0=r0.sibling}function xh(r0,e0,n0){var a0=r0.tag;if(a0===5||a0===6)r0=r0.stateNode,e0?n0.insertBefore(r0,e0):n0.appendChild(r0);else if(a0!==4&&(a0===27&&Sg(r0.type)&&(n0=r0.stateNode),(r0=r0.child)!==null))for(xh(r0,e0,n0),r0=r0.sibling;r0!==null;)xh(r0,e0,n0),r0=r0.sibling}function Th(r0){var e0=r0.stateNode,n0=r0.memoizedProps;try{for(var a0=r0.type,i0=e0.attributes;i0.length;)e0.removeAttributeNode(i0[0]);ug(e0,a0,n0),e0[Gi]=r0,e0[ji]=n0}catch(s0){yf(r0,r0.return,s0)}}var Bh=!1,Uh=!1,Mh=!1,Nh=typeof WeakSet=="function"?WeakSet:Set,Dh=null;function Oh(r0,e0,n0){var a0=n0.flags;switch(n0.tag){case 0:case 11:case 15:Hh(r0,n0),4&a0&&gh(5,n0);break;case 1:if(Hh(r0,n0),4&a0)if(r0=n0.stateNode,e0===null)try{r0.componentDidMount()}catch(o0){yf(n0,n0.return,o0)}else{var i0=Cd(n0.type,e0.memoizedProps);e0=e0.memoizedState;
762try{r0.componentDidUpdate(i0,e0,r0.__reactInternalSnapshotBeforeUpdate)}catch(o0){yf(n0,n0.return,o0)}}64&a0&&wh(n0),512&a0&&Eh(n0,n0.return);break;case 3:if(Hh(r0,n0),64&a0&&(r0=n0.updateQueue)!==null){if(e0=null,n0.child!==null)switch(n0.child.tag){case 27:case 5:case 1:e0=n0.child.stateNode}try{vc(r0,e0)}catch(o0){yf(n0,n0.return,o0)}}break;case 27:e0===null&&4&a0&&Th(n0);case 26:case 5:Hh(r0,n0),e0===null&&4&a0&&kh(n0),512&a0&&Eh(n0,n0.return);break;case 12:Hh(r0,n0);break;case 13:Hh(r0,n0),4&a0&&Qh(r0,n0),64&a0&&(r0=n0.memoizedState)!==null&&(r0=r0.dehydrated)!==null&&function(o0,l0){var c0=o0.ownerDocument;if(o0.data!=="$?"||c0.readyState==="complete")l0();else{var u0=function(){l0(),c0.removeEventListener("DOMContentLoaded",u0)};c0.addEventListener("DOMContentLoaded",u0),o0._reactRetry=u0}}(r0,n0=If.bind(null,n0));break;case 22:if(!(a0=n0.memoizedState!==null||Bh)){e0=e0!==null&&e0.memoizedState!==null||Uh,i0=Bh;var s0=Uh;Bh=a0,(Uh=e0)&&!s0?Wh(r0,n0,!!(8772&n0.subtreeFlags)):Hh(r0,n0),Bh=i0,Uh=s0}break;case 30:break;default:Hh(r0,n0)}}function Lh(r0){var e0=r0.alternate;e0!==null&&(r0.alternate=null,Lh(e0)),r0.child=null,r0.deletions=null,r0.sibling=null,r0.tag===5&&(e0=r0.stateNode)!==null&&Zi(e0),r0.stateNode=null,r0.return=null,r0.dependencies=null,r0.memoizedProps=null,r0.memoizedState=null,r0.pendingProps=null,r0.stateNode=null,r0.updateQueue=null}var _h=null,Rh=!1;function zh(r0,e0,n0){for(n0=n0.child;n0!==null;)Fh(r0,e0,n0),n0=n0.sibling}function Fh(r0,e0,n0){if(ki&&typeof ki.onCommitFiberUnmount=="function")try{ki.onCommitFiberUnmount(yi,n0)}catch{}switch(n0.tag){case 26:Uh||yh(n0,e0),zh(r0,e0,n0),n0.memoizedState?n0.memoizedState.count--:n0.stateNode&&(n0=n0.stateNode).parentNode.removeChild(n0);break;case 27:Uh||yh(n0,e0);var a0=_h,i0=Rh;Sg(n0.type)&&(_h=n0.stateNode,Rh=!1),zh(r0,e0,n0),Ng(n0.stateNode),_h=a0,Rh=i0;break;case 5:Uh||yh(n0,e0);case 6:if(a0=_h,i0=Rh,_h=null,zh(r0,e0,n0),Rh=i0,(_h=a0)!==null)if(Rh)try{(_h.nodeType===9?_h.body:_h.nodeName==="HTML"?_h.ownerDocument.body:_h).removeChild(n0.stateNode)}catch(s0){yf(n0,e0,s0)}else try{_h.removeChild(n0.stateNode)}catch(s0){yf(n0,e0,s0)}break;case 18:_h!==null&&(Rh?(Ig((r0=_h).nodeType===9?r0.body:r0.nodeName==="HTML"?r0.ownerDocument.body:r0,n0.stateNode),zm(r0)):Ig(_h,n0.stateNode));break;case 4:a0=_h,i0=Rh,_h=n0.stateNode.containerInfo,Rh=!0,zh(r0,e0,n0),_h=a0,Rh=i0;break;case 0:case 11:case 14:case 15:Uh||mh(2,n0,e0),Uh||mh(4,n0,e0),zh(r0,e0,n0);break;case 1:Uh||(yh(n0,e0),typeof(a0=n0.stateNode).componentWillUnmount=="function"&&bh(n0,e0,a0)),zh(r0,e0,n0);break;case 21:zh(r0,e0,n0);break;case 22:Uh=(a0=Uh)||n0.memoizedState!==null,zh(r0,e0,n0),Uh=a0;break;default:zh(r0,e0,n0)}}function Qh(r0,e0){if(e0.memoizedState===null&&(r0=e0.alternate)!==null&&(r0=r0.memoizedState)!==null&&(r0=r0.dehydrated)!==null)try{zm(r0)}catch(n0){yf(e0,e0.return,n0)}}function Ph(r0,e0){var n0=function(a0){switch(a0.tag){case 13:case 19:var i0=a0.stateNode;return i0===null&&(i0=a0.stateNode=new Nh),i0;case 22:return(i0=(a0=a0.stateNode)._retryCache)===null&&(i0=a0._retryCache=new Nh),i0;default:throw Error(mr(435,a0.tag))}}(r0);e0.forEach(function(a0){var i0=Cf.bind(null,r0,a0);n0.has(a0)||(n0.add(a0),a0.then(i0,i0))})}function Vh(r0,e0){var n0=e0.deletions;if(n0!==null)for(var a0=0;a0<n0.length;a0++){var i0=n0[a0],s0=r0,o0=e0,l0=o0;e:for(;l0!==null;){switch(l0.tag){case 27:if(Sg(l0.type)){_h=l0.stateNode,Rh=!1;break e}break;case 5:_h=l0.stateNode,Rh=!1;break e;case 3:case 4:_h=l0.stateNode.containerInfo,Rh=!0;break e}l0=l0.return}if(_h===null)throw Error(mr(160));Fh(s0,o0,i0),_h=null,Rh=!1,(s0=i0.alternate)!==null&&(s0.return=null),i0.return=null}if(13878&e0.subtreeFlags)for(e0=e0.child;e0!==null;)jh(e0,r0),e0=e0.sibling}var Gh=null;function jh(r0,e0){var n0=r0.alternate,a0=r0.flags;switch(r0.tag){case 0:case 11:case 14:case 15:Vh(e0,r0),Kh(r0),4&a0&&(mh(3,r0,r0.return),gh(3,r0),mh(5,r0,r0.return));break;case 1:Vh(e0,r0),Kh(r0),512&a0&&(Uh||n0===null||yh(n0,n0.return)),64&a0&&Bh&&(r0=r0.updateQueue)!==null&&(a0=r0.callbacks)!==null&&(n0=r0.shared.hiddenCallbacks,r0.shared.hiddenCallbacks=n0===null?a0:n0.concat(a0));break;case 26:var i0=Gh;if(Vh(e0,r0),Kh(r0),512&a0&&(Uh||n0===null||yh(n0,n0.return)),4&a0){var s0=n0!==null?n0.memoizedState:null;if(a0=r0.memoizedState,n0===null)if(a0===null)if(r0.stateNode===null){e:{a0=r0.type,n0=r0.memoizedProps,i0=i0.ownerDocument||i0;t:switch(a0){case"title":(!(s0=i0.getElementsByTagName("title")[0])||s0[qi]||s0[Gi]||s0.namespaceURI==="http://www.w3.org/2000/svg"||s0.hasAttribute("itemprop"))&&(s0=i0.createElement(a0),i0.head.insertBefore(s0,i0.querySelector("head > title"))),ug(s0,a0,n0),s0[Gi]=r0,nA(s0),a0=s0;break e;case"link":var o0=qg("link","href",i0).get(a0+(n0.href||""));if(o0){for(var l0=0;l0<o0.length;l0++)if((s0=o0[l0]).getAttribute("href")===(n0.href==null||n0.href===""?null:n0.href)&&s0.getAttribute("rel")===(n0.rel==null?null:n0.rel)&&s0.getAttribute("title")===(n0.title==null?null:n0.title)&&s0.getAttribute("crossorigin")===(n0.crossOrigin==null?null:n0.crossOrigin)){o0.splice(l0,1
762);break t}}ug(s0=i0.createElement(a0),a0,n0),i0.head.appendChild(s0);break;case"meta":if(o0=qg("meta","content",i0).get(a0+(n0.content||""))){for(l0=0;l0<o0.length;l0++)if((s0=o0[l0]).getAttribute("content")===(n0.content==null?null:""+n0.content)&&s0.getAttribute("name")===(n0.name==null?null:n0.name)&&s0.getAttribute("property")===(n0.property==null?null:n0.property)&&s0.getAttribute("http-equiv")===(n0.httpEquiv==null?null:n0.httpEquiv)&&s0.getAttribute("charset")===(n0.charSet==null?null:n0.charSet)){o0.splice(l0,1);break t}}ug(s0=i0.createElement(a0),a0,n0),i0.head.appendChild(s0);break;default:throw Error(mr(468,a0))}s0[Gi]=r0,nA(s0),a0=s0}r0.stateNode=a0}else Zg(i0,r0.type,r0.stateNode);else r0.stateNode=Kg(i0,a0,r0.memoizedProps);else s0!==a0?(s0===null?n0.stateNode!==null&&(n0=n0.stateNode).parentNode.removeChild(n0):s0.count--,a0===null?Zg(i0,r0.type,r0.stateNode):Kg(i0,a0,r0.memoizedProps)):a0===null&&r0.stateNode!==null&&vh(r0,r0.memoizedProps,n0.memoizedProps)}break;case 27:Vh(e0,r0),Kh(r0),512&a0&&(Uh||n0===null||yh(n0,n0.return)),n0!==null&&4&a0&&vh(r0,r0.memoizedProps,n0.memoizedProps);break;case 5:if(Vh(e0,r0),Kh(r0),512&a0&&(Uh||n0===null||yh(n0,n0.return)),32&r0.flags){i0=r0.stateNode;try{DA(i0,"")}catch(p0){yf(r0,r0.return,p0)}}4&a0&&r0.stateNode!=null&&vh(r0,i0=r0.memoizedProps,n0!==null?n0.memoizedProps:i0),1024&a0&&(Mh=!0);break;case 6:if(Vh(e0,r0),Kh(r0),4&a0){if(r0.stateNode===null)throw Error(mr(162));a0=r0.memoizedProps,n0=r0.stateNode;try{n0.nodeValue=a0}catch(p0){yf(r0,r0.return,p0)}}break;case 3:if(Wg=null,i0=Gh,Gh=Lg(e0.containerInfo),Vh(e0,r0),Gh=i0,Kh(r0),4&a0&&n0!==null&&n0.memoizedState.isDehydrated)try{zm(e0.containerInfo)}catch(p0){yf(r0,r0.return,p0)}Mh&&(Mh=!1,Yh(r0));break;case 4:a0=Gh,Gh=Lg(r0.stateNode.containerInfo),Vh(e0,r0),Kh(r0),Gh=a0;break;case 12:default:Vh(e0,r0),Kh(r0);break;case 13:Vh(e0,r0),Kh(r0),8192&r0.child.flags&&r0.memoizedState!==null!=(n0!==null&&n0.memoizedState!==null)&&(Mp=di()),4&a0&&(a0=r0.updateQueue)!==null&&(r0.updateQueue=null,Ph(r0,a0));break;case 22:i0=r0.memoizedState!==null;var c0=n0!==null&&n0.memoizedState!==null,u0=Bh,d0=Uh;if(Bh=u0||i0,Uh=d0||c0,Vh(e0,r0),Uh=d0,Bh=u0,Kh(r0),8192&a0)e:for(e0=r0.stateNode,e0._visibility=i0?-2&e0._visibility:1|e0._visibility,i0&&(n0===null||c0||Bh||Uh||Jh(r0)),n0=null,e0=r0;;){if(e0.tag===5||e0.tag===26){if(n0===null){c0=n0=e0;try{if(s0=c0.stateNode,i0)typeof(o0=s0.style).setProperty=="function"?o0.setProperty("display","none","important"):o0.display="none";else{l0=c0.stateNode;var h0=c0.memoizedProps.style,f0=h0!=null&&h0.hasOwnProperty("display")?h0.display:null;l0.style.display=f0==null||typeof f0=="boolean"?"":(""+f0).trim()}}catch(p0){yf(c0,c0.return,p0)}}}else if(e0.tag===6){if(n0===null){c0=e0;try{c0.stateNode.nodeValue=i0?"":c0.memoizedProps}catch(p0){yf(c0,c0.return,p0)}}}else if((e0.tag!==22&&e0.tag!==23||e0.memoizedState===null||e0===r0)&&e0.child!==null){e0.child.return=e0,e0=e0.child;continue}if(e0===r0)break e;for(;e0.sibling===null;){if(e0.return===null||e0.return===r0)break e;n0===e0&&(n0=null),e0=e0.return}n0===e0&&(n0=null),e0.sibling.return=e0.return,e0=e0.sibling}4&a0&&(a0=r0.updateQueue)!==null&&(n0=a0.retryQueue)!==null&&(a0.retryQueue=null,Ph(r0,n0));break;case 19:Vh(e0,r0),Kh(r0),4&a0&&(a0=r0.updateQueue)!==null&&(r0.updateQueue=null,Ph(r0,a0));case 30:case 21:}}function Kh(r0){var e0=r0.flags;if(2&e0){try{for(var n0,a0=r0.return;a0!==null;){if(Sh(a0)){n0=a0;break}a0=a0.return}if(n0==null)throw Error(mr(160));switch(n0.tag){case 27:var i0=n0.stateNode;xh(r0,Ih(r0),i0);break;case 5:var s0=n0.stateNode;32&n0.flags&&(DA(s0,""),n0.flags&=-33),xh(r0,Ih(r0),s0);break;case 3:case 4:var o0=n0.stateNode.containerInfo;Ch(r0,Ih(r0),o0);break;default:throw Error(mr(161))}}catch(l0){yf(r0,r0.return,l0)}r0.flags&=-3}4096&e0&&(r0.flags&=-4097)}function Yh(r0){if(1024&r0.subtreeFlags)for(r0=r0.child;r0!==null;){var e0=r0;Yh(e0),e0.tag===5&&1024&e0.flags&&e0.stateNode.reset(),r0=r0.sibling}}function Hh(r0,e0){if(8772&e0.subtreeFlags)for(e0=e0.child;e0!==null;)Oh(r0,e0.alternate,e0),e0=e0.sibling}function Jh(r0){for(r0=r0.child;r0!==null;){var e0=r0;switch(e0.tag){case 0:case 11:case 14:case 15:mh(4,e0,e0.return),Jh(e0);break;case 1:yh(e0,e0.return);var n0=e0.stateNode;typeof n0.componentWillUnmount=="function"&&bh(e0,e0.return,n0),Jh(e0);break;case 27:Ng(e0.stateNode);case 26:case 5:yh(e0,e0.return),Jh(e0);break;case 22:e0.memoizedState===null&&Jh(e0);break;default:Jh(e0)}r0=r0.sibling}}function Wh(r0,e0,n0){for(n0=n0&&!!(8772&e0.subtreeFlags),e0=e0.child;e0!==null;){var a0=e0.alternate,i0=r0,s0=e0,o0=s0.flags;switch(s0.tag){case 0:case 11:case 15:Wh(i0,s0,n0),gh(4,s0);break;case 1:if(Wh(i0,s0,n0),typeof(i0=(a0=s0).stateNode).componentDidMount=="function")try{i0.componentDidMount()}catch(u0){yf(a0,a0.return,u0)}if((i0=(a0=s0).updateQueue)!==null){var l0=a0.stateNode;try{var c0=i0.shared.hiddenCallbacks;
762if(c0!==null)for(i0.shared.hiddenCallbacks=null,i0=0;i0<c0.length;i0++)kc(c0[i0],l0)}catch(u0){yf(a0,a0.return,u0)}}n0&&64&o0&&wh(s0),Eh(s0,s0.return);break;case 27:Th(s0);case 26:case 5:Wh(i0,s0,n0),n0&&a0===null&&4&o0&&kh(s0),Eh(s0,s0.return);break;case 12:Wh(i0,s0,n0);break;case 13:Wh(i0,s0,n0),n0&&4&o0&&Qh(i0,s0);break;case 22:s0.memoizedState===null&&Wh(i0,s0,n0),Eh(s0,s0.return);break;case 30:break;default:Wh(i0,s0,n0)}e0=e0.sibling}}function qh(r0,e0){var n0=null;r0!==null&&r0.memoizedState!==null&&r0.memoizedState.cachePool!==null&&(n0=r0.memoizedState.cachePool.pool),r0=null,e0.memoizedState!==null&&e0.memoizedState.cachePool!==null&&(r0=e0.memoizedState.cachePool.pool),r0!==n0&&(r0!=null&&r0.refCount++,n0!=null&&Kl(n0))}function Zh(r0,e0){r0=null,e0.alternate!==null&&(r0=e0.alternate.memoizedState.cache),(e0=e0.memoizedState.cache)!==r0&&(e0.refCount++,r0!=null&&Kl(r0))}function Xh(r0,e0,n0,a0){if(10256&e0.subtreeFlags)for(e0=e0.child;e0!==null;)$h(r0,e0,n0,a0),e0=e0.sibling}function $h(r0,e0,n0,a0){var i0=e0.flags;switch(e0.tag){case 0:case 11:case 15:Xh(r0,e0,n0,a0),2048&i0&&gh(9,e0);break;case 1:case 13:default:Xh(r0,e0,n0,a0);break;case 3:Xh(r0,e0,n0,a0),2048&i0&&(r0=null,e0.alternate!==null&&(r0=e0.alternate.memoizedState.cache),(e0=e0.memoizedState.cache)!==r0&&(e0.refCount++,r0!=null&&Kl(r0)));break;case 12:if(2048&i0){Xh(r0,e0,n0,a0),r0=e0.stateNode;try{var s0=e0.memoizedProps,o0=s0.id,l0=s0.onPostCommit;typeof l0=="function"&&l0(o0,e0.alternate===null?"mount":"update",r0.passiveEffectDuration,-0)}catch(c0){yf(e0,e0.return,c0)}}else Xh(r0,e0,n0,a0);break;case 23:break;case 22:s0=e0.stateNode,o0=e0.alternate,e0.memoizedState!==null?2&s0._visibility?Xh(r0,e0,n0,a0):tp(r0,e0):2&s0._visibility?Xh(r0,e0,n0,a0):(s0._visibility|=2,ep(r0,e0,n0,a0,!!(10256&e0.subtreeFlags))),2048&i0&&qh(o0,e0);break;case 24:Xh(r0,e0,n0,a0),2048&i0&&Zh(e0.alternate,e0)}}function ep(r0,e0,n0,a0,i0){for(i0=i0&&!!(10256&e0.subtreeFlags),e0=e0.child;e0!==null;){var s0=r0,o0=e0,l0=n0,c0=a0,u0=o0.flags;switch(o0.tag){case 0:case 11:case 15:ep(s0,o0,l0,c0,i0),gh(8,o0);break;case 23:break;case 22:var d0=o0.stateNode;o0.memoizedState!==null?2&d0._visibility?ep(s0,o0,l0,c0,i0):tp(s0,o0):(d0._visibility|=2,ep(s0,o0,l0,c0,i0)),i0&&2048&u0&&qh(o0.alternate,o0);break;case 24:ep(s0,o0,l0,c0,i0),i0&&2048&u0&&Zh(o0.alternate,o0);break;default:ep(s0,o0,l0,c0,i0)}e0=e0.sibling}}function tp(r0,e0){if(10256&e0.subtreeFlags)for(e0=e0.child;e0!==null;){var n0=r0,a0=e0,i0=a0.flags;switch(a0.tag){case 22:tp(n0,a0),2048&i0&&qh(a0.alternate,a0);break;case 24:tp(n0,a0),2048&i0&&Zh(a0.alternate,a0);break;default:tp(n0,a0)}e0=e0.sibling}}var np=8192;function ap(r0){if(r0.subtreeFlags&np)for(r0=r0.child;r0!==null;)rp(r0),r0=r0.sibling}function rp(r0){switch(r0.tag){case 26:ap(r0),r0.flags&np&&r0.memoizedState!==null&&function(n0,a0,i0){if($g===null)throw Error(mr(475));var s0=$g;if(!(a0.type!=="stylesheet"||typeof i0.media=="string"&&matchMedia(i0.media).matches===!1||4&a0.state.loading)){if(a0.instance===null){var o0=Qg(i0.href),l0=n0.querySelector(Pg(o0));if(l0)return(n0=l0._p)!==null&&typeof n0=="object"&&typeof n0.then=="function"&&(s0.count++,s0=tm.bind(s0),n0.then(s0,s0)),a0.state.loading|=4,a0.instance=l0,void nA(l0);l0=n0.ownerDocument||n0,i0=Vg(i0),(o0=Dg.get(o0))&&Hg(i0,o0),nA(l0=l0.createElement("link"));var c0=l0;c0._p=new Promise(function(u0,d0){c0.onload=u0,c0.onerror=d0}),ug(l0,"link",i0),a0.instance=l0}s0.stylesheets===null&&(s0.stylesheets=new Map),s0.stylesheets.set(a0,n0),(n0=a0.state.preload)&&!(3&a0.state.loading)&&(s0.count++,a0=tm.bind(s0),n0.addEventListener("load",a0),n0.addEventListener("error",a0))}}(Gh,r0.memoizedState,r0.memoizedProps);break;case 5:default:ap(r0);break;case 3:case 4:var e0=Gh;Gh=Lg(r0.stateNode.containerInfo),ap(r0),Gh=e0;break;case 22:r0.memoizedState===null&&((e0=r0.alternate)!==null&&e0.memoizedState!==null?(e0=np,np=16777216,ap(r0),np=e0):ap(r0))}}function ip(r0){var e0=r0.alternate;if(e0!==null&&(r0=e0.child)!==null){e0.child=null;do e0=r0.sibling,r0.sibling=null,r0=e0;while(r0!==null)}}
762function Ap(r0){var e0=r0.deletions;if(16&r0.flags){if(e0!==null)for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];Dh=a0,lp(a0,r0)}ip(r0)}if(10256&r0.subtreeFlags)for(r0=r0.child;r0!==null;)sp(r0),r0=r0.sibling}function sp(r0){switch(r0.tag){case 0:case 11:case 15:Ap(r0),2048&r0.flags&&mh(9,r0,r0.return);break;case 3:case 12:default:Ap(r0);break;case 22:var e0=r0.stateNode;r0.memoizedState!==null&&2&e0._visibility&&(r0.return===null||r0.return.tag!==13)?(e0._visibility&=-3,op(r0)):Ap(r0)}}function op(r0){var e0=r0.deletions;if(16&r0.flags){if(e0!==null)for(var n0=0;n0<e0.length;n0++){var a0=e0[n0];Dh=a0,lp(a0,r0)}ip(r0)}for(r0=r0.child;r0!==null;){switch((e0=r0).tag){case 0:case 11:case 15:mh(8,e0,e0.return),op(e0);break;case 22:2&(n0=e0.stateNode)._visibility&&(n0._visibility&=-3,op(e0));break;default:op(e0)}r0=r0.sibling}}function lp(r0,e0){for(;Dh!==null;){var n0=Dh;switch(n0.tag){case 0:case 11:case 15:mh(8,n0,e0);break;case 23:case 22:if(n0.memoizedState!==null&&n0.memoizedState.cachePool!==null){var a0=n0.memoizedState.cachePool.pool;a0!=null&&a0.refCount++}break;case 24:Kl(n0.memoizedState.cache)}if((a0=n0.child)!==null)a0.return=n0,Dh=a0;else e:for(n0=r0;Dh!==null;){var i0=(a0=Dh).sibling,s0=a0.return;if(Lh(a0),a0===n0){Dh=null;break e}if(i0!==null){i0.return=s0,Dh=i0;break e}Dh=s0}}}var cp={getCacheForType:function(r0){var e0=Rl(Gl),n0=e0.data.get(r0);return n0===void 0&&(n0=r0(),e0.data.set(r0,n0)),n0}},up=typeof WeakMap=="function"?WeakMap:Map,dp=0,hp=null,pp=null,fp=0,gp=0,mp=null,wp=!1,bp=!1,Ep=!1,yp=0,kp=0,vp=0,Sp=0,Ip=0,Cp=0,xp=0,Tp=null,Bp=null,Up=!1,Mp=0,Np=1/0,Dp=null,Op=null,Lp=0,_p=null,Rp=null,zp=0,Fp=0,Qp=null,Pp=null,Vp=0,Gp=null;function jp(){return 2&dp&&fp!==0?fp&-fp:Kr.T!==null?Jl!==0?Jl:Qf():Pi()}function Kp(){Cp===0&&(Cp=536870912&fp&&!gl?536870912:Di());var r0=pd.current;return r0!==null&&(r0.flags|=32),Cp}function Yp(r0,e0,n0){(r0!==hp||gp!==2&&gp!==9)&&r0.cancelPendingCommit===null||($p(r0,0),qp(r0,fp,Cp,!1)),_i(r0,n0),2&dp&&r0===hp||(r0===hp&&(!(2&dp)&&(Sp|=n0),kp===4&&qp(r0,fp,Cp,!1)),Df(r0))}function Hp(r0,e0,n0){if(6&dp)throw Error(mr(327));for(var a0=!n0&&!(124&e0)&&(e0&r0.expiredLanes)===0||Mi(r0,e0),i0=a0?function(u0,d0){var h0=dp;dp|=2;var f0=tf(),p0=nf();hp!==u0||fp!==d0?(Dp=null,Np=di()+500,$p(u0,d0)):bp=Mi(u0,d0);e:for(;;)try{if(gp!==0&&pp!==null){d0=pp;var A0=mp;t:switch(gp){case 1:gp=0,mp=null,cf(u0,d0,A0,1);break;case 2:case 9:if(Ac(A0)){gp=0,mp=null,lf(d0);break}d0=function(){gp!==2&&gp!==9||hp!==u0||(gp=7),Df(u0)},A0.then(d0,d0);break e;case 3:gp=7;break e;case 4:gp=5;break e;case 7:Ac(A0)?(gp=0,mp=null,lf(d0)):(gp=0,mp=null,cf(u0,d0,A0,7));break;case 5:var m0=null;switch(pp.tag){case 26:m0=pp.memoizedState;case 5:case 27:var x0=pp;if(!m0||Xg(m0)){gp=0,mp=null;var g0=x0.sibling;if(g0!==null)pp=g0;else{var y0=x0.return;y0!==null?(pp=y0,uf(y0)):pp=null}break t}}gp=0,mp=null,cf(u0,d0,A0,5);break;case 6:gp=0,mp=null,cf(u0,d0,A0,6);break;case 8:Xp(),kp=6;break e;default:throw Error(mr(462))}}sf();break}catch(b0){ef(u0,b0)}return Bl=Tl=null,Kr.H=f0,Kr.A=p0,dp=h0,pp!==null?0:(hp=null,fp=0,Fo(),kp)}(r0,e0):rf(r0,e0,!0),s0=a0;;){if(i0===0){bp&&!a0&&qp(r0,e0,0,!1);break}if(n0=r0.current.alternate,!s0||Wp(n0)){if(i0===2){if(s0=e0,r0.errorRecoveryDisabledLanes&s0)var o0=0;else o0=(o0=-536870913&r0.pendingLanes)!=0?o0:536870912&o0?536870912:0;if(o0!==0){e0=o0;e:{var l0=r0;i0=Tp;var c0=l0.current.memoizedState.isDehydrated;if(c0&&($p(l0,o0).flags|=256),(o0=rf(l0,o0,!1))!==2){if(Ep&&!c0){l0.errorRecoveryDisabledLanes|=s0,Sp|=s0,i0=4;break e}s0=Bp,Bp=i0,s0!==null&&(Bp===null?Bp=s0:Bp.push.apply(Bp,s0))}i0=o0}if(s0=!1,i0!==2)continue}}if(i0===1){$p(r0,0),qp(r0,e0,0,!0);break}e:{switch(a0=r0,s0=i0){case 0:case 1:throw Error(mr(345));case 4:if((4194048&e0)!==e0)break;case 6:qp(a0,e0,Cp,!wp);break e;case 2:Bp=null;break;case 3:case 5:break;default:throw Error(mr(329))}if((62914560&e0)===e0&&10<(i0=Mp+300-di())){if(qp(a0,e0,Cp,!wp),Ui(a0,0,!0)!==0)break e;a0.timeoutHandle=bg(Jp.bind(null,a0,n0,Bp,Dp,Up,e0,Cp,Sp,xp,wp,s0,2,-0,0),i0)}else Jp(a0,n0,Bp,Dp,Up,e0,Cp,Sp,xp,wp,s0,0,-0,0)}break}i0=rf(r0,e0,!1),s0=!1}Df(r0)}function Jp(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0,f0,p0){if(r0.timeoutHandle=-1,(8192&(h0=e0.subtreeFlags)||!(16785408&~h0))&&($g={stylesheets:null,count:0,unsuspend:em},rp(e0),(h0=function(){if($g===null)throw Error(mr(475));var A0=$g;return A0.stylesheets&&A0.count===0&&am(A0,A0.stylesheets),0<A0.count?function(m0){var x0=setTimeout(function(){if(A0.stylesheets&&am(A0,A0.stylesheets),A0.unsuspend){var g0=A0.unsuspend;A0.unsuspend=null,g0()}},6e4);return A0.unsuspend=m0,function(){A0.unsuspend=null,clearTimeout(x0)}}:null}())!==null))return r0.cancelPendingCommit=h0(hf.bind(null,r0,e0,s0,n0,a0,i0,o0,l0,c0,d0,1,f0,p0)),void qp(r0,s0,o0,!u0);hf(r0,e0,s0,n0,a0,i0,o0,l0,c0)}function Wp(r0){for(var e0=r0;;){var n0=e0.tag;if((n0===0||n0===11||n0===15)&&16384&e0.flags&&(n0=e0.updateQueue)!==null&&(n0=n0.stores)!==null)for(var a0=0;a0<n0.length;a0++){var i0=n0[a0],s0=i0.getSnapshot;i0=i0.value;try{if(!io(s0(),i0))return!1}catch{return!1}}if(n0=e0.child,16384&e0.subtreeFlags&&n0!==null)n0.return=e0,e0=n0;else{if(e0===r0)break;for(;e0.sibling===null;){if(e0.return===null||e0.return===r0)return!0;e0=e0.return}e0.sibling.return=e0.return,e0=e0.sibling}}return!0}function qp(r0,e0,n0,a0){e0&=~Ip,e0&=~Sp,r0.suspendedLanes|=e0,r0.pingedLanes&=~e0,a0&&(r0.warmLanes|=e0),a0=r0.expirationTimes;for(var i0=e0;0<i0;){var s0=31-Si(i0),o0=1<<s0;a0[s0]=-1,i0&=~o0}n0!==0&&Ri(r0,n0,e0)}function Zp(){return!!(6&dp)||(Of(0),!1)}function Xp(){if(pp!==null){if(gp===0)var r0=pp.return;else Bl=Tl=null,Jc(r0=pp),id=null,Ad=0,r0=pp;for(;r0!==null;)fh(r0.alternate,r0),r0=r0.return;pp=null}}function $p(r0,e0){var n0=r0.timeoutHandle;n0!==-1&&(r0.timeoutHandle=-1,Eg(n0)),(n0=r0.cancelPendingCommit)!==null&&(r0.cancelPendingCommit=null,n0()),Xp(),hp=r0,pp=n0=Wo(r0.current,null),fp=e0,gp=0,mp=null,wp=!1,bp=Mi(r0,e0),Ep=!1,xp=Cp=Ip=S
762p=vp=kp=0,Bp=Tp=null,Up=!1,8&e0&&(e0|=32&e0);var a0=r0.entangledLanes;if(a0!==0)for(r0=r0.entanglements,a0&=e0;0<a0;){var i0=31-Si(a0),s0=1<<i0;e0|=r0[i0],a0&=~s0}return yp=e0,Fo(),n0}function ef(r0,e0){Uc=null,Kr.H=td,e0===nc||e0===rc?(e0=cc(),gp=3):e0===ac?(e0=cc(),gp=4):gp=e0===_d?8:e0!==null&&typeof e0=="object"&&typeof e0.then=="function"?6:1,mp=e0,pp===null&&(kp=1,Md(r0,Lo(e0,r0.current)))}function tf(){var r0=Kr.H;return Kr.H=td,r0===null?td:r0}function nf(){var r0=Kr.A;return Kr.A=cp,r0}function af(){kp=4,wp||(4194048&fp)!==fp&&pd.current!==null||(bp=!0),!(134217727&vp)&&!(134217727&Sp)||hp===null||qp(hp,fp,Cp,!1)}function rf(r0,e0,n0){var a0=dp;dp|=2;var i0=tf(),s0=nf();hp===r0&&fp===e0||(Dp=null,$p(r0,e0)),e0=!1;var o0=kp;e:for(;;)try{if(gp!==0&&pp!==null){var l0=pp,c0=mp;switch(gp){case 8:Xp(),o0=6;break e;case 3:case 2:case 9:case 6:pd.current===null&&(e0=!0);var u0=gp;if(gp=0,mp=null,cf(r0,l0,c0,u0),n0&&bp){o0=0;break e}break;default:u0=gp,gp=0,mp=null,cf(r0,l0,c0,u0)}}Af(),o0=kp;break}catch(d0){ef(r0,d0)}return e0&&r0.shellSuspendCounter++,Bl=Tl=null,dp=a0,Kr.H=i0,Kr.A=s0,pp===null&&(hp=null,fp=0,Fo()),o0}function Af(){for(;pp!==null;)of(pp)}function sf(){for(;pp!==null&&!ci();)of(pp)}function of(r0){var e0=sh(r0.alternate,r0,yp);r0.memoizedProps=r0.pendingProps,e0===null?uf(r0):pp=e0}function lf(r0){var e0=r0,n0=e0.alternate;switch(e0.tag){case 15:case 0:e0=Yd(n0,e0,e0.pendingProps,e0.type,void 0,fp);break;case 11:e0=Yd(n0,e0,e0.pendingProps,e0.type.render,e0.ref,fp);break;case 5:Jc(e0);default:fh(n0,e0),e0=sh(n0,e0=pp=qo(e0,yp),yp)}r0.memoizedProps=r0.pendingProps,e0===null?uf(r0):pp=e0}function cf(r0,e0,n0,a0){Bl=Tl=null,Jc(e0),id=null,Ad=0;var i0=e0.return;try{if(function(s0,o0,l0,c0,u0){if(l0.flags|=32768,c0!==null&&typeof c0=="object"&&typeof c0.then=="function"){if((o0=l0.alternate)!==null&&Ol(o0,l0,u0,!0),(l0=pd.current)!==null){switch(l0.tag){case 13:return fd===null?af():l0.alternate===null&&kp===0&&(kp=3),l0.flags&=-257,l0.flags|=65536,l0.lanes=u0,c0===ic?l0.flags|=16384:((o0=l0.updateQueue)===null?l0.updateQueue=new Set([c0]):o0.add(c0),kf(s0,c0,u0)),!1;case 22:return l0.flags|=65536,c0===ic?l0.flags|=16384:((o0=l0.updateQueue)===null?(o0={transitions:null,markerInstances:null,retryQueue:new Set([c0])},l0.updateQueue=o0):(l0=o0.retryQueue)===null?o0.retryQueue=new Set([c0]):l0.add(c0),kf(s0,c0,u0)),!1}throw Error(mr(435,l0.tag))}return kf(s0,c0,u0),af(),!1}if(gl)return(o0=pd.current)!==null?(!(65536&o0.flags)&&(o0.flags|=256),o0.flags|=65536,o0.lanes=u0,c0!==bl&&Cl(Lo(s0=Error(mr(422),{cause:c0}),l0))):(c0!==bl&&Cl(Lo(o0=Error(mr(423),{cause:c0}),l0)),(s0=s0.current.alternate).flags|=65536,u0&=-u0,s0.lanes|=u0,c0=Lo(c0,l0),wc(s0,u0=Dd(s0.stateNode,c0,u0)),kp!==4&&(kp=2)),!1;var d0=Error(mr(520),{cause:c0});if(d0=Lo(d0,l0),Tp===null?Tp=[d0]:Tp.push(d0),kp!==4&&(kp=2),o0===null)return!0;c0=Lo(c0,l0),l0=o0;do{switch(l0.tag){case 3:return l0.flags|=65536,s0=u0&-u0,l0.lanes|=s0,wc(l0,s0=Dd(l0.stateNode,c0,s0)),!1;case 1:if(o0=l0.type,d0=l0.stateNode,!(128&l0.flags||typeof o0.getDerivedStateFromError!="function"&&(d0===null||typeof d0.componentDidCatch!="function"||Op!==null&&Op.has(d0))))return l0.flags|=65536,u0&=-u0,l0.lanes|=u0,Ld(u0=Od(u0),s0,l0,c0),wc(l0,u0),!1}l0=l0.return}while(l0!==null);return!1}(r0,i0,e0,n0,fp))return kp=1,Md(r0,Lo(n0,r0.current)),void(pp=null)}catch(s0){if(i0!==null)throw pp=i0,s0;return kp=1,Md(r0,Lo(n0,r0.current)),void(pp=null)}32768&e0.flags?(gl||a0===1?r0=!0:bp||536870912&fp?r0=!1:(wp=r0=!0,(a0===2||a0===9||a0===3||a0===6)&&(a0=pd.current)!==null&&a0.tag===13&&(a0.flags|=16384)),df(e0,r0)):uf(e0)}function uf(r0){var e0=r0;do{if(32768&e0.flags)return void df(e0,wp);r0=e0.return;var n0=hh(e0.alternate,e0,yp);if(n0!==null)return void(pp=n0);if((e0=e0.sibling)!==null)return void(pp=e0);pp=e0=r0}while(e0!==null);kp===0&&(kp=5)}function df(r0,e0){do{var n0=ph(r0.alternate,r0);if(n0!==null)return n0.flags&=32767,void(pp=n0);if((n0=r0.return)!==null&&(n0.flags|=32768,n0.subtreeFlags=0,n0.deletions=null),!e0&&(r0=r0.sibling)!==null)return void(pp=r0);pp=r0=n0}while(r0!==null);kp=6,pp=null}function hf(r0,e0,n0,a0,i0,s0,o0,l0,c0){r0.cancelPendingCommit=null;do wf();while(Lp!==0);if(6&dp)throw Error(mr(327));if(e0!==null){if(e0===r0.current)throw Error(mr(177));if(s0=e0.lanes|e0.childLanes,function(u0,d0,h0,f0,p0,A0){var m0=u0.pe
762ndingLanes;u0.pendingLanes=h0,u0.suspendedLanes=0,u0.pingedLanes=0,u0.warmLanes=0,u0.expiredLanes&=h0,u0.entangledLanes&=h0,u0.errorRecoveryDisabledLanes&=h0,u0.shellSuspendCounter=0;var x0=u0.entanglements,g0=u0.expirationTimes,y0=u0.hiddenUpdates;for(h0=m0&~h0;0<h0;){var b0=31-Si(h0),E0=1<<b0;x0[b0]=0,g0[b0]=-1;var w0=y0[b0];if(w0!==null)for(y0[b0]=null,b0=0;b0<w0.length;b0++){var v0=w0[b0];v0!==null&&(v0.lane&=-536870913)}h0&=~E0}f0!==0&&Ri(u0,f0,0),A0!==0&&p0===0&&u0.tag!==0&&(u0.suspendedLanes|=A0&~(m0&~d0))}(r0,n0,s0|=zo,o0,l0,c0),r0===hp&&(pp=hp=null,fp=0),Rp=e0,_p=r0,zp=n0,Fp=s0,Qp=i0,Pp=a0,10256&e0.subtreeFlags||10256&e0.flags?(r0.callbackNode=null,r0.callbackPriority=0,oi(gi,function(){return bf(),null})):(r0.callbackNode=null,r0.callbackPriority=0),a0=!!(13878&e0.flags),13878&e0.subtreeFlags||a0){a0=Kr.T,Kr.T=null,i0=Yr.p,Yr.p=2,o0=dp,dp|=4;try{(function(u0,d0){if(u0=u0.containerInfo,dg=hm,uo(u0=co(u0))){if("selectionStart"in u0)var h0={start:u0.selectionStart,end:u0.selectionEnd};else{var f0=(h0=(h0=u0.ownerDocument)&&h0.defaultView||window).getSelection&&h0.getSelection();if(f0&&f0.rangeCount!==0){h0=f0.anchorNode;var p0=f0.anchorOffset,A0=f0.focusNode;f0=f0.focusOffset;var m0=0,x0=-1,g0=-1,y0=0,b0=0,E0=u0,w0=null;e:for(;;){for(var v0;E0!==h0||p0!==0&&E0.nodeType!==3||(x0=m0+p0),E0!==A0||f0!==0&&E0.nodeType!==3||(g0=m0+f0),E0.nodeType===3&&(m0+=E0.nodeValue.length),(v0=E0.firstChild)!==null;)w0=E0,E0=v0;for(;;){if(E0===u0)break e;if(w0===h0&&++y0===p0&&(x0=m0),w0===A0&&++b0===f0&&(g0=m0),(v0=E0.nextSibling)!==null)break;w0=(E0=w0).parentNode}E0=v0}h0=x0===-1||g0===-1?null:{start:x0,end:g0}}else h0=null}h0=h0||{start:0,end:0}}else h0=null;for(hg={focusedElem:u0,selectionRange:h0},hm=!1,Dh=d0;Dh!==null;)if(u0=(d0=Dh).child,1024&d0.subtreeFlags&&u0!==null)u0.return=d0,Dh=u0;else for(;Dh!==null;){switch(A0=(d0=Dh).alternate,u0=d0.flags,d0.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&u0&&A0!==null){u0=void 0,h0=d0,p0=A0.memoizedProps,A0=A0.memoizedState,f0=h0.stateNode;try{var S0=Cd(h0.type,p0);u0=f0.getSnapshotBeforeUpdate(S0,A0),f0.__reactInternalSnapshotBeforeUpdate=u0}catch(k0){yf(h0,h0.return,k0)}}break;case 3:if(1024&u0){if((h0=(u0=d0.stateNode.containerInfo).nodeType)===9)Cg(u0);else if(h0===1)switch(u0.nodeName){case"HEAD":case"HTML":case"BODY":Cg(u0);break;default:u0.textContent=""}}break;default:if(1024&u0)throw Error(mr(163))}if((u0=d0.sibling)!==null){u0.return=d0.return,Dh=u0;break}Dh=d0.return}})(r0,e0)}finally{dp=o0,Yr.p=i0,Kr.T=a0}}Lp=1,pf(),ff(),gf()}}function pf(){if(Lp===1){Lp=0;var r0=_p,e0=Rp,n0=!!(13878&e0.flags);if(13878&e0.subtreeFlags||n0){n0=Kr.T,Kr.T=null;var a0=Yr.p;Yr.p=2;var i0=dp;dp|=4;try{jh(e0,r0);var s0=hg,o0=co(r0.containerInfo),l0=s0.focusedElem,c0=s0.selectionRange;if(o0!==l0&&l0&&l0.ownerDocument&&lo(l0.ownerDocument.documentElement,l0)){if(c0!==null&&uo(l0)){var u0=c0.start,d0=c0.end;if(d0===void 0&&(d0=u0),"selectionStart"in l0)l0.selectionStart=u0,l0.selectionEnd=Math.min(d0,l0.value.length);else{var h0=l0.ownerDocument||document,f0=h0&&h0.defaultView||window;if(f0.getSelection){var p0=f0.getSelection(),A0=l0.textContent.length,m0=Math.min(c0.start,A0),x0=c0.end===void 0?m0:Math.min(c0.end,A0);!p0.extend&&m0>x0&&(o0=x0,x0=m0,m0=o0);var g0=oo(l0,m0),y0=oo(l0,x0);if(g0&&y0&&(p0.rangeCount!==1||p0.anchorNode!==g0.node||p0.anchorOffset!==g0.offset||p0.focusNode!==y0.node||p0.focusOffset!==y0.offset)){var b0=h0.createRange();b0.setStart(g0.node,g0.offset),p0.removeAllRanges(),m0>x0?(p0.addRange(b0),p0.extend(y0.node,y0.offset)):(b0.setEnd(y0.node,y0.offset),p0.addRange(b0))}}}}for(h0=[],p0=l0;p0=p0.parentNode;)p0.nodeType===1&&h0.push({element:p0,left:p0.scrollLeft,top:p0.scrollTop});for(typeof l0.focus=="function"&&l0.focus(),l0=0;l0<h0.length;l0++){var E0=h0[l0];E0.element.scrollLeft=E0.left,E0.element.scrollTop=E0.top}}hm=!!dg,hg=dg=null}finally{dp=i0,Yr.p=a0,Kr.T=n0}}r0.current=e0,Lp=2}}function ff(){if(Lp===2){Lp=0;var r0=_p,e0=Rp,n0=!!(8772&e0.flags);if(8772&e0.subtreeFlags||n0){n0=Kr.T,Kr.T=null;var a0=Yr.p;Yr.p=2;var i0=dp;dp|=4;
762try{Oh(r0,e0.alternate,e0)}finally{dp=i0,Yr.p=a0,Kr.T=n0}}Lp=3}}function gf(){if(Lp===4||Lp===3){Lp=0,ui();var r0=_p,e0=Rp,n0=zp,a0=Pp;10256&e0.subtreeFlags||10256&e0.flags?Lp=5:(Lp=0,Rp=_p=null,mf(r0,r0.pendingLanes));var i0=r0.pendingLanes;if(i0===0&&(Op=null),Qi(n0),e0=e0.stateNode,ki&&typeof ki.onCommitFiberRoot=="function")try{ki.onCommitFiberRoot(yi,e0,void 0,!(128&~e0.current.flags))}catch{}if(a0!==null){e0=Kr.T,i0=Yr.p,Yr.p=2,Kr.T=null;try{for(var s0=r0.onRecoverableError,o0=0;o0<a0.length;o0++){var l0=a0[o0];s0(l0.value,{componentStack:l0.stack})}}finally{Kr.T=e0,Yr.p=i0}}3&zp&&wf(),Df(r0),i0=r0.pendingLanes,4194090&n0&&42&i0?r0===Gp?Vp++:(Vp=0,Gp=r0):Vp=0,Of(0)}}function mf(r0,e0){(r0.pooledCacheLanes&=e0)===0&&(e0=r0.pooledCache)!=null&&(r0.pooledCache=null,Kl(e0))}function wf(r0){return pf(),ff(),gf(),bf()}function bf(){if(Lp!==5)return!1;var r0=_p,e0=Fp;Fp=0;var n0=Qi(zp),a0=Kr.T,i0=Yr.p;try{Yr.p=32>n0?32:n0,Kr.T=null,n0=Qp,Qp=null;var s0=_p,o0=zp;if(Lp=0,Rp=_p=null,zp=0,6&dp)throw Error(mr(331));var l0=dp;if(dp|=4,sp(s0.current),$h(s0,s0.current,o0,n0),dp=l0,Of(0),ki&&typeof ki.onPostCommitFiberRoot=="function")try{ki.onPostCommitFiberRoot(yi,s0)}catch{}return!0}finally{Yr.p=i0,Kr.T=a0,mf(r0,e0)}}function Ef(r0,e0,n0){e0=Lo(n0,e0),(r0=gc(r0,e0=Dd(r0.stateNode,e0,2),2))!==null&&(_i(r0,2),Df(r0))}function yf(r0,e0,n0){if(r0.tag===3)Ef(r0,r0,n0);else for(;e0!==null;){if(e0.tag===3){Ef(e0,r0,n0);break}if(e0.tag===1){var a0=e0.stateNode;if(typeof e0.type.getDerivedStateFromError=="function"||typeof a0.componentDidCatch=="function"&&(Op===null||!Op.has(a0))){r0=Lo(n0,r0),(a0=gc(e0,n0=Od(2),2))!==null&&(Ld(n0,a0,e0,r0),_i(a0,2),Df(a0));break}}e0=e0.return}}function kf(r0,e0,n0){var a0=r0.pingCache;if(a0===null){a0=r0.pingCache=new up;var i0=new Set;a0.set(e0,i0)}else(i0=a0.get(e0))===void 0&&(i0=new Set,a0.set(e0,i0));i0.has(n0)||(Ep=!0,i0.add(n0),r0=vf.bind(null,r0,e0,n0),e0.then(r0,r0))}function vf(r0,e0,n0){var a0=r0.pingCache;a0!==null&&a0.delete(e0),r0.pingedLanes|=r0.suspendedLanes&n0,r0.warmLanes&=~n0,hp===r0&&(fp&n0)===n0&&(kp===4||kp===3&&(62914560&fp)===fp&&300>di()-Mp?!(2&dp)&&$p(r0,0):Ip|=n0,xp===fp&&(xp=0)),Df(r0)}function Sf(r0,e0){e0===0&&(e0=Oi()),(r0=Vo(r0,e0))!==null&&(_i(r0,e0),Df(r0))}function If(r0){var e0=r0.memoizedState,n0=0;e0!==null&&(n0=e0.retryLane),Sf(r0,n0)}function Cf(r0,e0){var n0=0;switch(r0.tag){case 13:var a0=r0.stateNode,i0=r0.memoizedState;i0!==null&&(n0=i0.retryLane);break;case 19:a0=r0.stateNode;break;case 22:a0=r0.stateNode._retryCache;break;default:throw Error(mr(314))}a0!==null&&a0.delete(e0),Sf(r0,n0)}var xf=null,Tf=null,Bf=!1,Uf=!1,Mf=!1,Nf=0;function Df(r0){r0!==Tf&&r0.next===null&&(Tf===null?xf=Tf=r0:Tf=Tf.next=r0),Uf=!0,Bf||(Bf=!0,kg(function(){6&dp?oi(pi,Lf):_f()}))}function Of(r0,e0){if(!Mf&&Uf){Mf=!0;do for(var n0=!1,a0=xf;a0!==null;){if(r0!==0){var i0=a0.pendingLanes;if(i0===0)var s0=0;else{var o0=a0.suspendedLanes,l0=a0.pingedLanes;s0=(1<<31-Si(42|r0)+1)-1,s0=201326741&(s0&=i0&~(o0&~l0))?201326741&s0|1:s0?2|s0:0}s0!==0&&(n0=!0,Ff(a0,s0))}else s0=fp,!(3&(s0=Ui(a0,a0===hp?s0:0,a0.cancelPendingCommit!==null||a0.timeoutHandle!==-1)))||Mi(a0,s0)||(n0=!0,Ff(a0,s0));a0=a0.next}while(n0);Mf=!1}}function Lf(){_f()}function _f(){Uf=Bf=!1;var r0,e0=0;Nf!==0&&(((r0=window.event)&&r0.type==="popstate"?r0!==wg&&(wg=r0,!0):(wg=null,!1))&&(e0=Nf),Nf=0);for(var n0=di(),a0=null,i0=xf;i0!==null;){var s0=i0.next,o0=Rf(i0,n0);o0===0?(i0.next=null,a0===null?xf=s0:a0.next=s0,s0===null&&(Tf=a0)):(a0=i0,(e0!==0||3&o0)&&(Uf=!0)),i0=s0}Of(e0)}function Rf(r0,e0){for(var n0=r0.suspendedLanes,a0=r0.pingedLanes,i0=r0.expirationTimes,s0=-62914561&r0.pendingLanes;0<s0;){var o0=31-Si(s0),l0=1<<o0,c0=i0[o0];c0===-1?l0&n0&&!(l0&a0)||(i0[o0]=Ni(l0,e0)):c0<=e0&&(r0.expiredLanes|=l0),s0&=~l0}if(n0=fp,n0=Ui(r0,r0===(e0=hp)?n0:0,r0.cancelPendingCommit!==null||r0.timeoutHandle!==-1),a0=r0.callbackNode,n0===0||r0===e0&&(gp===2||gp===9)||r0.cancelPendingCommit!==null)return a0!==null&&a0!==null&&li(a0),r0.callbackNode=null,r0.callbackPriority=0;if(!(3&n0)||Mi(r0,n0)){if((e0=n0&-n0)===r0.callbackPriority)return e0;switch(a0!==null&&li(a0),Qi(n0)){case 2:case 8:n0=fi;break;case 32:default:n0=gi;break;case 268435456:n0=wi}return a0=zf.bind(null,r0),n0=oi(n0,a0),r0.callbackPriority=e0,r0.callbackNode=n0,e0}return a0!==null&&a0!==null&&li(a0),r0.callbackPriority=2,r0.callbackNode=null,2}function zf(r0,e0){if(Lp!==0&&Lp!==5)return r0.callbackNode=null,r0.callbackPriority=0,null;var n0=r0.callbackNode;if(wf()&&r0.callbackNode!==n0)return null;var a0=fp;return(a0=Ui(r0,r0===hp?a0:0,r0.cancelPendingCommit!==null||r0.timeoutHandle!==-1))===0?null:(Hp(r0,a0,e0),Rf(r0,di()),r0.callbackNode!=null&&r0.callbackNode===n0?zf.bind(null,r0):null)}function Ff(r0,e0){if(wf())return null;Hp(r0,e0,!0)}function Qf(){return Nf===0&&(Nf=Di()),Nf}function Pf(r0){return r0==null||typeof r0=="symbol"||typeof r0=="boolean"?null:typeof r0=="function"?r0:QA(""+r0)}
762function Vf(r0,e0){var n0=e0.ownerDocument.createElement("input");return n0.name=e0.name,n0.value=e0.value,r0.id&&n0.setAttribute("form",r0.id),e0.parentNode.insertBefore(n0,e0),r0=new FormData(r0),n0.parentNode.removeChild(n0),r0}for(var Gf=0;Gf<No.length;Gf++){var jf=No[Gf];Do(jf.toLowerCase(),"on"+(jf[0].toUpperCase()+jf.slice(1)))}Do(So,"onAnimationEnd"),Do(Io,"onAnimationIteration"),Do(Co,"onAnimationStart"),Do("dblclick","onDoubleClick"),Do("focusin","onFocus"),Do("focusout","onBlur"),Do(xo,"onTransitionRun"),Do(To,"onTransitionStart"),Do(Bo,"onTransitionCancel"),Do(Uo,"onTransitionEnd"),AA("onMouseEnter",["mouseout","mouseover"]),AA("onMouseLeave",["mouseout","mouseover"]),AA("onPointerEnter",["pointerout","pointerover"]),AA("onPointerLeave",["pointerout","pointerover"]),iA("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),iA("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),iA("onBeforeInput",["compositionend","keypress","textInput","paste"]),iA("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),iA("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),iA("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kf="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(" "),Yf=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kf));function Hf(r0,e0){e0=!!(4&e0);for(var n0=0;n0<r0.length;n0++){var a0=r0[n0],i0=a0.event;a0=a0.listeners;e:{var s0=void 0;if(e0)for(var o0=a0.length-1;0<=o0;o0--){var l0=a0[o0],c0=l0.instance,u0=l0.currentTarget;if(l0=l0.listener,c0!==s0&&i0.isPropagationStopped())break e;s0=l0,i0.currentTarget=u0;try{s0(i0)}catch(d0){xd(d0)}i0.currentTarget=null,s0=c0}else for(o0=0;o0<a0.length;o0++){if(c0=(l0=a0[o0]).instance,u0=l0.currentTarget,l0=l0.listener,c0!==s0&&i0.isPropagationStopped())break e;s0=l0,i0.currentTarget=u0;try{s0(i0)}catch(d0){xd(d0)}i0.currentTarget=null,s0=c0}}}}function Jf(r0,e0){var n0=e0[Yi];n0===void 0&&(n0=e0[Yi]=new Set);var a0=r0+"__bubble";n0.has(a0)||(Xf(e0,r0,2,!1),n0.add(a0))}function Wf(r0,e0,n0){var a0=0;e0&&(a0|=4),Xf(n0,r0,a0,e0)}var qf="_reactListening"+Math.random().toString(36).slice(2);function Zf(r0){if(!r0[qf]){r0[qf]=!0,aA.forEach(function(n0){n0!=="selectionchange"&&(Yf.has(n0)||Wf(n0,!1,r0),Wf(n0,!0,r0))});var e0=r0.nodeType===9?r0:r0.ownerDocument;e0===null||e0[qf]||(e0[qf]=!0,Wf("selectionchange",!1,e0))}}function Xf(r0,e0,n0,a0){switch(Em(e0)){case 2:var i0=pm;break;case 8:i0=fm;break;default:i0=gm}n0=i0.bind(null,e0,n0,r0),i0=void 0,!qA||e0!=="touchstart"&&e0!=="touchmove"&&e0!=="wheel"||(i0=!0),a0?i0!==void 0?r0.addEventListener(e0,n0,{capture:!0,passive:i0}):r0.addEventListener(e0,n0,!0):i0!==void 0?r0.addEventListener(e0,n0,{passive:i0}):r0.addEventListener(e0,n0,!1)}function $f(r0,e0,n0,a0,i0){var s0=a0;if(!(1&e0||2&e0||a0===null))e:for(;;){if(a0===null)return;var o0=a0.tag;if(o0===3||o0===4){var l0=a0.stateNode.containerInfo;if(l0===i0)break;if(o0===4)for(o0=a0.return;o0!==null;){var c0=o0.tag;if((c0===3||c0===4)&&o0.stateNode.containerInfo===i0)return;o0=o0.return}for(;l0!==null;){if((o0=Xi(l0))===null)return;if((c0=o0.tag)===5||c0===6||c0===26||c0===27){a0=s0=o0;continue e}l0=l0.parentNode}}a0=a0.return}HA(function(){var u0=s0,d0=VA(n0),h0=[];e:{var f0=Mo.get(r0);if(f0!==void 0){var p0=cs,A0=r0;switch(r0){case"keypress":if(ns(n0)===0)break e;case"keydown":case"keyup":p0=Is;break;case"focusin":A0="focus",p0=gs;break;case"focusout":A0="blur",p0=gs;break;case"beforeblur":case"afterblur":p0=gs;break;case"click":if(n0.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p0=ps;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p0=fs;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p0=xs;break;case So:case Io:case Co:p0=ms;break;case Uo:p0=Ts;break;case"scroll":case"scrollend":p0=ds;break;case"wheel":p0=Bs;break;case"copy":case"cut":case"paste":p0=ws;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p0=Cs;break;case"toggle":case"beforetoggle":p0=Us}var m0=!!(4&e0),x0=!m0&&(r0==="scroll"||r0==="scrollend"),g0=m0?f0!==null?f0+"Capture":null:f0;m0=[];for(var y0,b0=u0;b0!==null;){var E0=b0;if(y0=E0.stateNode,(E0=E0.tag)!==5&&E0!==26&&E0!==27||y0===null||g0===null||(E0=JA(b0,g0))!=null&&m0.push(eg(b0,E0,y0)),x0)break;b0=b0.return}0<m0.length&&(f0=new p0(f0,A0,null,n0,d0),h0.push({event:f0,listeners:m0}))}}if(!(7&e0)){if(p0=r0==="mouseout"||r0==="pointerout",(!(f0=r0==="mouseover"||r0==="pointerover")||n0===PA||!(A0=n0.relatedTarget||n0.fromElement)||!Xi(A0)&&!A0[Ki])&&(p0||f0)&&(f0=d0.window===d0?d0:(f0=d0.ownerDocument)?f0.defaultView||f0.parentWindow:window,p0?(p0=u0,(A0=(A0=n0.relatedTarget||n0.toElement)?Xi(A0):null)!==null&&(x0=br(A0),m0=A0.tag,A0!==x0||m0!==5&&m0!==27&&m0!==6)&&(A0=null)):(p0=null,A0=u0),p0!==A0)
762){if(m0=ps,E0="onMouseLeave",g0="onMouseEnter",b0="mouse",r0!=="pointerout"&&r0!=="pointerover"||(m0=Cs,E0="onPointerLeave",g0="onPointerEnter",b0="pointer"),x0=p0==null?f0:eA(p0),y0=A0==null?f0:eA(A0),(f0=new m0(E0,b0+"leave",p0,n0,d0)).target=x0,f0.relatedTarget=y0,E0=null,Xi(d0)===u0&&((m0=new m0(g0,b0+"enter",A0,n0,d0)).target=y0,m0.relatedTarget=x0,E0=m0),x0=E0,p0&&A0)e:{for(g0=A0,b0=0,y0=m0=p0;y0;y0=ng(y0))b0++;for(y0=0,E0=g0;E0;E0=ng(E0))y0++;for(;0<b0-y0;)m0=ng(m0),b0--;for(;0<y0-b0;)g0=ng(g0),y0--;for(;b0--;){if(m0===g0||g0!==null&&m0===g0.alternate)break e;m0=ng(m0),g0=ng(g0)}m0=null}else m0=null;p0!==null&&ag(h0,f0,p0,m0,!1),A0!==null&&x0!==null&&ag(h0,x0,A0,m0,!0)}if((p0=(f0=u0?eA(u0):window).nodeName&&f0.nodeName.toLowerCase())==="select"||p0==="input"&&f0.type==="file")var w0=Js;else if(Vs(f0))if(Ws)w0=ro;else{w0=no;var v0=to}else!(p0=f0.nodeName)||p0.toLowerCase()!=="input"||f0.type!=="checkbox"&&f0.type!=="radio"?u0&&RA(u0.elementType)&&(w0=Js):w0=ao;switch(w0&&(w0=w0(r0,u0))?Gs(h0,w0,n0,d0):(v0&&v0(r0,f0,u0),r0==="focusout"&&u0&&f0.type==="number"&&u0.memoizedProps.value!=null&&BA(f0,"number",f0.value)),v0=u0?eA(u0):window,r0){case"focusin":(Vs(v0)||v0.contentEditable==="true")&&(po=v0,fo=u0,go=null);break;case"focusout":go=fo=po=null;break;case"mousedown":mo=!0;break;case"contextmenu":case"mouseup":case"dragend":mo=!1,wo(h0,n0,d0);break;case"selectionchange":if(ho)break;case"keydown":case"keyup":wo(h0,n0,d0)}var S0;if(Ns)e:{switch(r0){case"compositionstart":var k0="onCompositionStart";break e;case"compositionend":k0="onCompositionEnd";break e;case"compositionupdate":k0="onCompositionUpdate";break e}k0=void 0}else Qs?zs(r0,n0)&&(k0="onCompositionEnd"):r0==="keydown"&&n0.keyCode===229&&(k0="onCompositionStart");k0&&(Ls&&n0.locale!=="ko"&&(Qs||k0!=="onCompositionStart"?k0==="onCompositionEnd"&&Qs&&(S0=ts()):($A="value"in(XA=d0)?XA.value:XA.textContent,Qs=!0)),0<(v0=tg(u0,k0)).length&&(k0=new bs(k0,r0,null,n0,d0),h0.push({event:k0,listeners:v0}),(S0||(S0=Fs(n0))!==null)&&(k0.data=S0))),(S0=Os?function(R0,j0){switch(R0){case"compositionend":return Fs(j0);case"keypress":return j0.which!==32?null:(Rs=!0,_s);case"textInput":return(R0=j0.data)===_s&&Rs?null:R0;default:return null}}(r0,n0):function(R0,j0){if(Qs)return R0==="compositionend"||!Ns&&zs(R0,j0)?(R0=ts(),es=$A=XA=null,Qs=!1,R0):null;switch(R0){case"paste":default:return null;case"keypress":if(!(j0.ctrlKey||j0.altKey||j0.metaKey)||j0.ctrlKey&&j0.altKey){if(j0.char&&1<j0.char.length)return j0.char;if(j0.which)return String.fromCharCode(j0.which)}return null;case"compositionend":return Ls&&j0.locale!=="ko"?null:j0.data}}(r0,n0))&&0<(k0=tg(u0,"onBeforeInput")).length&&(v0=new bs("onBeforeInput","beforeinput",null,n0,d0),h0.push({event:v0,listeners:k0}),v0.data=S0),function(R0,j0,C0,$0,T0){if(j0==="submit"&&C0&&C0.stateNode===T0){var I0=Pf((T0[ji]||null).action),M0=$0.submitter;M0&&(j0=(j0=M0[ji]||null)?Pf(j0.formAction):M0.getAttribute("formAction"))!==null&&(I0=j0,M0=null);var N0=new cs("action","action",null,$0,T0);R0.push({event:N0,listeners:[{instance:null,listener:function(){if($0.defaultPrevented){if(Nf!==0){var D0=M0?Vf(T0,M0):new FormData(T0);Pu(C0,{pending:!0,data:D0,method:T0.method,action:I0},null,D0)}}else typeof I0=="function"&&(N0.preventDefault(),D0=M0?Vf(T0,M0):new FormData(T0),Pu(C0,{pending:!0,data:D0,method:T0.method,action:I0},I0,D0))},currentTarget:T0}]})}}(h0,r0,u0,n0,d0)}Hf(h0,e0)})}function eg(r0,e0,n0){return{instance:r0,listener:e0,currentTarget:n0}}function tg(r0,e0){for(var n0=e0+"Capture",a0=[];r0!==null;){var i0=r0,s0=i0.stateNode;if((i0=i0.tag)!==5&&i0!==26&&i0!==27||s0===null||((i0=JA(r0,n0))!=null&&a0.unshift(eg(r0,i0,s0)),(i0=JA(r0,e0))!=null&&a0.push(eg(r0,i0,s0))),r0.tag===3)return a0;r0=r0.return}return[]}function ng(r0){if(r0===null)return null;do r0=r0.return;while(r0&&r0.tag!==5&&r0.tag!==27);return r0||null}function ag(r0,e0,n0,a0,i0){for(var s0=e0._reactName,o0=[];n0!==null&&n0!==a0;){var l0=n0,c0=l0.alternate,u0=l0.stateNode;if(l0=l0.tag,c0!==null&&c0===a0)break;l0!==5&&l0!==26&&l0!==27||u0===null||(c0=u0,i0?(u0=JA(n0,s0))!=null&&o0.unshift(eg(n0,u0,c0)):i0||(u0=JA(n0,s0))!=null&&o0.push(eg(n0,u0,c0))),n0=n0.return}o0.length!==0&&r0.push({event:e0,listeners:o0})}var rg=/\r\n?/g,ig=/\u0000|\uFFFD/g;function Ag(r0){return(typeof r0=="string"?r0:""+r0).replace(rg,` 763`).replace(ig,"")}
vendor: 4,893 bytes, line 763
763function sg(r0,e0){return e0=Ag(e0),Ag(r0)===e0}function og(){}function lg(r0,e0,n0,a0,i0,s0){switch(n0){case"children":typeof a0=="string"?e0==="body"||e0==="textarea"&&a0===""||DA(r0,a0):(typeof a0=="number"||typeof a0=="bigint")&&e0!=="body"&&DA(r0,""+a0);break;case"className":hA(r0,"class",a0);break;case"tabIndex":hA(r0,"tabindex",a0);break;case"dir":case"role":case"viewBox":case"width":case"height":hA(r0,n0,a0);break;case"style":_A(r0,a0,s0);break;case"data":if(e0!=="object"){hA(r0,"data",a0);break}case"src":case"href":if(a0===""&&(e0!=="a"||n0!=="href")){r0.removeAttribute(n0);break}if(a0==null||typeof a0=="function"||typeof a0=="symbol"||typeof a0=="boolean"){r0.removeAttribute(n0);break}a0=QA(""+a0),r0.setAttribute(n0,a0);break;case"action":case"formAction":if(typeof a0=="function"){r0.setAttribute(n0,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if(typeof s0=="function"&&(n0==="formAction"?(e0!=="input"&&lg(r0,e0,"name",i0.name,i0,null),lg(r0,e0,"formEncType",i0.formEncType,i0,null),lg(r0,e0,"formMethod",i0.formMethod,i0,null),lg(r0,e0,"formTarget",i0.formTarget,i0,null)):(lg(r0,e0,"encType",i0.encType,i0,null),lg(r0,e0,"method",i0.method,i0,null),lg(r0,e0,"target",i0.target,i0,null))),a0==null||typeof a0=="symbol"||typeof a0=="boolean"){r0.removeAttribute(n0);break}a0=QA(""+a0),r0.setAttribute(n0,a0);break;case"onClick":a0!=null&&(r0.onclick=og);break;case"onScroll":a0!=null&&Jf("scroll",r0);break;case"onScrollEnd":a0!=null&&Jf("scrollend",r0);break;case"dangerouslySetInnerHTML":if(a0!=null){if(typeof a0!="object"||!("__html"in a0))throw Error(mr(61));if((n0=a0.__html)!=null){if(i0.children!=null)throw Error(mr(60));r0.innerHTML=n0}}break;case"multiple":r0.multiple=a0&&typeof a0!="function"&&typeof a0!="symbol";break;case"muted":r0.muted=a0&&typeof a0!="function"&&typeof a0!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(a0==null||typeof a0=="function"||typeof a0=="boolean"||typeof a0=="symbol"){r0.removeAttribute("xlink:href");break}n0=QA(""+a0),r0.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n0);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a0!=null&&typeof a0!="function"&&typeof a0!="symbol"?r0.setAttribute(n0,""+a0):r0.removeAttribute(n0);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a0&&typeof a0!="function"&&typeof a0!="symbol"?r0.setAttribute(n0,""):r0.removeAttribute(n0);break;case"capture":case"download":a0===!0?r0.setAttribute(n0,""):a0!==!1&&a0!=null&&typeof a0!="function"&&typeof a0!="symbol"?r0.setAttribute(n0,a0):r0.removeAttribute(n0);break;case"cols":case"rows":case"size":case"span":a0!=null&&typeof a0!="function"&&typeof a0!="symbol"&&!isNaN(a0)&&1<=a0?r0.setAttribute(n0,a0):r0.removeAttribute(n0);break;case"rowSpan":case"start":a0==null||typeof a0=="function"||typeof a0=="symbol"||isNaN(a0)?r0.removeAttribute(n0):r0.setAttribute(n0,a0);break;case"popover":Jf("beforetoggle",r0),Jf("toggle",r0),dA(r0,"popover",a0);break;case"xlinkActuate":pA(r0,"http://www.w3.org/1999/xlink","xlink:actuate",a0);break;case"xlinkArcrole":pA(r0,"http://www.w3.org/1999/xlink","xlink:arcrole",a0);break;case"xlinkRole":pA(r0,"http://www.w3.org/1999/xlink","xlink:role",a0);break;case"xlinkShow":pA(r0,"http://www.w3.org/1999/xlink","xlink:show",a0);break;case"xlinkTitle":pA(r0,"http://www.w3.org/1999/xlink","xlink:title",a0);break;case"xlinkType":pA(r0,"http://www.w3.org/1999/xlink","xlink:type",a0);break;case"xmlBase":pA(r0,"http://www.w3.org/XML/1998/namespace","xml:base",a0);break;case"xmlLang":pA(r0,"http://www.w3.org/XML/1998/namespace","xml:lang",a0);break;case"xmlSpace":pA(r0,"http://www.w3.org/XML/1998/namespace","xml:space",a0);break;case"is":dA(r0,"is",a0);break;case"innerText":case"textContent":break;default:(!(2<n0.length)||n0[0]!=="o"&&n0[0]!=="O"||n0[1]!=="n"&&n0[1]!=="N")&&dA(r0,n0=zA.get(n0)||n0,a0)}}function cg(r0,e0,n0,a0,i0,s0){switch(n0){case"style":_A(r0,a0,s0);break;case"dangerouslySetInnerHTML":if(a0!=null){if(typeof a0!="object"||!("__html"in a0))throw Error(mr(61));if((n0=a0.__html)!=null){if(i0.children!=null)throw Error(mr(60));r0.innerHTML=n0}}break;
763case"children":typeof a0=="string"?DA(r0,a0):(typeof a0=="number"||typeof a0=="bigint")&&DA(r0,""+a0);break;case"onScroll":a0!=null&&Jf("scroll",r0);break;case"onScrollEnd":a0!=null&&Jf("scrollend",r0);break;case"onClick":a0!=null&&(r0.onclick=og);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:rA.hasOwnProperty(n0)||(n0[0]!=="o"||n0[1]!=="n"||(i0=n0.endsWith("Capture"),e0=n0.slice(2,i0?n0.length-7:void 0),typeof(s0=(s0=r0[ji]||null)!=null?s0[n0]:null)=="function"&&r0.removeEventListener(e0,s0,i0),typeof a0!="function")?n0 in r0?r0[n0]=a0:a0===!0?r0.setAttribute(n0,""):dA(r0,n0,a0):(typeof s0!="function"&&s0!==null&&(n0 in r0?r0[n0]=null:r0.hasAttribute(n0)&&r0.removeAttribute(n0)),r0.addEventListener(e0,a0,i0)))}}function ug(r0,e0,n0){switch(e0){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Jf("error",r0),Jf("load",r0);var a0,i0=!1,s0=!1;for(a0 in n0)if(n0.hasOwnProperty(a0)){var o0=n0[a0];if(o0!=null)switch(a0){case"src":i0=!0;break;case"srcSet":s0=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(mr(137,e0));default:lg(r0,e0,a0,o0,n0,null)}}return s0&&lg(r0,e0,"srcSet",n0.srcSet,n0,null),void(i0&&lg(r0,e0,"src",n0.src,n0,null));case"input":Jf("invalid",r0);var l0=a0=o0=s0=null,c0=null,u0=null;for(i0 in n0)if(n0.hasOwnProperty(i0)){var d0=n0[i0];if(d0!=null)switch(i0){case"name":s0=d0;break;case"type":o0=d0;break;case"checked":c0=d0;break;case"defaultChecked":u0=d0;break;case"value":a0=d0;break;case"defaultValue":l0=d0;break;case"children":case"dangerouslySetInnerHTML":if(d0!=null)throw Error(mr(137,e0));break;default:lg(r0,e0,i0,d0,n0,null)}}return TA(r0,a0,l0,c0,u0,o0,s0,!1),void kA(r0);case"select":for(s0 in Jf("invalid",r0),i0=o0=a0=null,n0)if(n0.hasOwnProperty(s0)&&(l0=n0[s0])!=null)switch(s0){case"value":a0=l0;break;case"defaultValue":o0=l0;break;case"multiple":i0=l0;default:lg(r0,e0,s0,l0,n0,null)}return e0=a0,n0=o0,r0.multiple=!!i0,void(e0!=null?UA(r0,!!i0,e0,!1):n0!=null&&UA(r0,!!i0,n0,!0));case"textarea":for(o0 in Jf("invalid",r0),a0=s0=i0=null,n0)if(n0.hasOwnProperty(o0)&&(l0=n0[o0])!=null)switch(o0){case"value":i0=l0;break;case"defaultValue":s0=l0;break;case"children":a0=l0;break;case"dangerouslySetInnerHTML":if(l0!=null)throw Error(mr(91));break;default:lg(r0,e0,o0,l0,n0,null)}return NA(r0,i0,s0,a0),void kA(r0);case"option":for(c0 in n0)n0.hasOwnProperty(c0)&&(i0=n0[c0])!=null&&(c0==="selected"?r0.selected=i0&&typeof i0!="function"&&typeof i0!="symbol":lg(r0,e0,c0,i0,n0,null));return;case"dialog":Jf("beforetoggle",r0),Jf("toggle",r0),Jf("cancel",r0),Jf("close",r0);break;case"iframe":case"object":Jf("load",r0);break;case"video":case"audio":for(i0=0;i0<Kf.length;i0++)Jf(Kf[i0],r0);break;case"image":Jf("error",r0),Jf("load",r0);break;case"details":Jf("toggle",r0);break;case"embed":case"source":case"link":Jf("error",r0),Jf("load",r0);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u0 in n0)if(n0.hasOwnProperty(u0)&&(i0=n0[u0])!=null)switch(u0){case"children":case"dangerouslySetInnerHTML":throw Error(mr(137,e0));default:lg(r0,e0,u0,i0,n0,null)}return;default:if(RA(e0)){for(d0 in n0)n0.hasOwnProperty(d0)&&(i0=n0[d0])!==void 0&&cg(r0,e0,d0,i0,n0,void 0);return}}for(l0 in n0)n0.hasOwnProperty(l0)&&(i0=n0[l0])!=null&&lg(r0,e0,l0,i0,n0,null)}var dg=null,hg=null;function pg(r0){return r0.nodeType===9?r0:r0.ownerDocument}function fg(r0){switch(r0){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gg(r0,e0){if(r0===0)switch(e0){case"svg":return 1;case"math":return 2;default:return 0}return r0===1&&e0==="foreignObject"?0:r0}function mg(r0,e0){return r0==="textarea"||r0==="noscript"||typeof e0.children=="string"||typeof e0.children=="number"||typeof e0.children=="bigint"||typeof e0.dangerouslySetInnerHTML=="object"&&e0.dangerouslySetInnerHTML!==null&&e0.dangerouslySetInnerHTML.__html!=null}var wg=null,bg=typeof setTimeout=="function"?setTimeout:void 0,Eg=typeof clearTimeout=="function"?clearTimeout:void 0,yg=typeof Promise=="function"?Promise:void 0,kg=typeof queueMicrotask=="function"?queueMicrotask:yg!==void 0?function(r0){return yg.resolve(null).then(r0).c
763atch(vg)}:bg;function vg(r0){setTimeout(function(){throw r0})}function Sg(r0){return r0==="head"}function Ig(r0,e0){var n0=e0,a0=0,i0=0;do{var s0=n0.nextSibling;if(r0.removeChild(n0),s0&&s0.nodeType===8)if((n0=s0.data)==="/$"){if(0<a0&&8>a0){n0=a0;var o0=r0.ownerDocument;if(1&n0&&Ng(o0.documentElement),2&n0&&Ng(o0.body),4&n0)for(Ng(n0=o0.head),o0=n0.firstChild;o0;){var l0=o0.nextSibling,c0=o0.nodeName;o0[qi]||c0==="SCRIPT"||c0==="STYLE"||c0==="LINK"&&o0.rel.toLowerCase()==="stylesheet"||n0.removeChild(o0),o0=l0}}if(i0===0)return r0.removeChild(s0),void zm(e0);i0--}else n0==="$"||n0==="$?"||n0==="$!"?i0++:a0=n0.charCodeAt(0)-48;else a0=0;n0=s0}while(n0);zm(e0)}function Cg(r0){var e0=r0.firstChild;for(e0&&e0.nodeType===10&&(e0=e0.nextSibling);e0;){var n0=e0;switch(e0=e0.nextSibling,n0.nodeName){case"HTML":case"HEAD":case"BODY":Cg(n0),Zi(n0);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n0.rel.toLowerCase()==="stylesheet")continue}r0.removeChild(n0)}}function xg(r0){return r0.data==="$!"||r0.data==="$?"&&r0.ownerDocument.readyState==="complete"}function Tg(r0){for(;r0!=null;r0=r0.nextSibling){var e0=r0.nodeType;if(e0===1||e0===3)break;if(e0===8){if((e0=r0.data)==="$"||e0==="$!"||e0==="$?"||e0==="F!"||e0==="F")break;if(e0==="/$")return null}}return r0}var Bg=null;function Ug(r0){r0=r0.previousSibling;for(var e0=0;r0;){if(r0.nodeType===8){var n0=r0.data;if(n0==="$"||n0==="$!"||n0==="$?"){if(e0===0)return r0;e0--}else n0==="/$"&&e0++}r0=r0.previousSibling}return null}function Mg(r0,e0,n0){switch(e0=pg(n0),r0){case"html":if(!(r0=e0.documentElement))throw Error(mr(452));return r0;case"head":if(!(r0=e0.head))throw Error(mr(453));return r0;case"body":if(!(r0=e0.body))throw Error(mr(454));return r0;default:throw Error(mr(451))}}function Ng(r0){for(var e0=r0.attributes;e0.length;)r0.removeAttributeNode(e0[0]);Zi(r0)}var Dg=new Map,Og=new Set;function Lg(r0){return typeof r0.getRootNode=="function"?r0.getRootNode():r0.nodeType===9?r0:r0.ownerDocument}var _g=Yr.d;Yr.d={f:function(){var r0=_g.f(),e0=Zp();return r0||e0},r:function(r0){var e0=$i(r0);e0!==null&&e0.tag===5&&e0.type==="form"?Gu(e0):_g.r(r0)},D:function(r0){_g.D(r0),zg("dns-prefetch",r0,null)},C:function(r0,e0){_g.C(r0,e0),zg("preconnect",r0,e0)},L:function(r0,e0,n0){_g.L(r0,e0,n0);var a0=Rg;if(a0&&r0&&e0){var i0='link[rel="preload"][as="'+CA(e0)+'"]';e0==="image"&&n0&&n0.imageSrcSet?(i0+='[imagesrcset="'+CA(n0.imageSrcSet)+'"]',typeof n0.imageSizes=="string"&&(i0+='[imagesizes="'+CA(n0.imageSizes)+'"]')):i0+='[href="'+CA(r0)+'"]';var s0=i0;switch(e0){case"style":s0=Qg(r0);break;case"script":s0=Gg(r0)}Dg.has(s0)||(r0=vr({rel:"preload",href:e0==="image"&&n0&&n0.imageSrcSet?void 0:r0,as:e0},n0),Dg.set(s0,r0),a0.querySelector(i0)!==null||e0==="style"&&a0.querySelector(Pg(s0))||e0==="script"&&a0.querySelector(jg(s0))||(ug(e0=a0.createElement("link"),"link",r0),nA(e0),a0.head.appendChild(e0)))}},m:function(r0,e0){_g.m(r0,e0);var n0=Rg;if(n0&&r0){var a0=e0&&typeof e0.as=="string"?e0.as:"script",i0='link[rel="modulepreload"][as="'+CA(a0)+'"][href="'+CA(r0)+'"]',s0=i0;switch(a0){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s0=Gg(r0)}if(!Dg.has(s0)&&(r0=vr({rel:"modulepreload",href:r0},e0),Dg.set(s0,r0),n0.querySelector(i0)===null)){switch(a0){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n0.querySelector(jg(s0)))return}ug(a0=n0.createElement("link"),"link",r0),nA(a0),n0.head.appendChild(a0)}}},X:function(r0,e0){_g.X(r0,e0);var n0=Rg;if(n0&&r0){var a0=tA(n0).hoistableScripts,i0=Gg(r0),s0=a0.get(i0);s0||((s0=n0.querySelector(jg(i0)))||(r0=vr({src:r0,async:!0},e0),(e0=Dg.get(i0))&&Jg(r0,e0),nA(s0=n0.createElement("script")),ug(s0,"link",r0),n0.head.appendChild(s0)),s0={type:"script",instance:s0,count:1,state:null},a0.set(i0,s0))}},S:function(r0,e0,n0){_g.S(r0,e0,n0);var a0=Rg;if(a0&&r0){var i0=tA(a0).hoistableStyles,s0=Qg(r0);e0=e0||"default";var o0=i0.get(s0);if(!o0){var l0={loading:0,preload:null};if(o0=a0.querySelector(Pg(s0)))l0.loading=5;else{r0=vr({rel:"stylesheet",href:r0,"data-precedence":e0},n0),(n0=Dg.get(s0))&&Hg(r0,n0);var c0=o0=a0.createElement("link");nA(c0),ug(c0,"link",r0),c0._p=new Promise(function(u0,d0){c0.onload=u0,c0.onerror=d0}),c0.addEventListener("load",function(){l0.loading|=1}),c0.addEventListener("error",function(){l0.loading|=2}),l0.loading|=4,Yg(o0,e0,a0)}o0={type:"stylesheet",instance:o0,count:1,state:l0},i0.set(s0,o0)}}},M:function(r0,e0){_g.M(r0,e0);var n0=Rg;if(n0&&r0){var a0=tA(n0).hoistableScripts,i0=Gg(r0),s0=a0.get(i0);s0||((s0=n0.querySelector(jg(i0)))||(r0=vr({src:r0,async:!0,type:"module"},e0),(e0=Dg.get(i0))&&Jg(r0,e0),nA(s0=n0.createElement("script")),ug(s0,"link",r0),n0.head.appendChild(s0)),s0={type:"script",instance:s0,count:1,state:null},a0.set(i0,s0))}}};var Rg=typeof document>"u"?null:document;function zg(r0,e0,n0){var a0=Rg;if(a0&&typeof e0=="string"&&e0){var i0=CA(e0);i0='link[rel="'+r0+'"][href="'+i0+'"]',typeof n0=="string"&&(i0+='[crossorigin="'+n0+'"]'),Og.has(i0)||(Og.add(i0),r0={rel:r0,crossOrigin:n0,href:e0},a0.querySelector(i0)===null&&(ug(e0=a0.createElement("link"),"link",r0),nA(e0),a0.head.appendChild(e0)))}}function Fg(r0,e0,n0,a0){var i0,s0,o0,l0,c0=(c0=ti.current)?Lg(c0):null;if(!c0)throw Error(mr(446));switch(r0){case"meta":case"title":return null;case"style":return typeof n0.precedence=="string"&&typeof n0.href=="string"?(e0=Qg(n0.href),(a0=(n0=tA(c0).hoistableStyles).get(e0))||(a0={type:"style",instance:null,count:0,state:null},n0.set(e0,a0)),a0):{type:"void",instance:null,count:0,state:null};case"link":if(n0.rel==="stylesheet"&&typeof n0.href=="string"&&typeof n0.precedence=="string"){r0=Qg(n0.href);var u0=tA(c0).hoistableStyles,d0=u0.get(r0);if(d0||(c0=c0.ownerDocument||c0,d0={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u0.set(r0,d0),(u0=c0.querySelector(Pg(r0)))&&!u0._p&&(d0.instance=u0,d0.state.loading=5),Dg.has(r0)||(n0={rel:"preload",as:"style",href:n0.href,crossOrigin:n0.crossOrigin,integrity:n0.integrity,media:n0.media,hrefLang:n0.hrefLang,referrerPolicy:n0.referrerPolicy},Dg.set(r0,n0),u0||(i0=c0,s0=r0,o0=n0,l0=d0.state,i0.querySelector('link[rel="preload"][as="style"]['+s0+"]")?l0.loading=1:(s0=i0.createElement("link"),l0.preload=s0,s0.addEventListener("load",function(){return l0.loading|=1}),s0.addEventListener("error",function(){return l0.loading|=2}),ug(s0,"link",o0),nA(s0),i0.head.appendChild(s0))))),e0&&a0===null)throw Error(mr(528,""));return d0}if(e0&&a0!==null)throw Error(mr(529,""));return null;case"script":return e0=n0.async,typeof(n0=n0.src)=="string"&&e0&&typeof e0!="function"&&typeof e0!="symbol"?
763(e0=Gg(n0),(a0=(n0=tA(c0).hoistableScripts).get(e0))||(a0={type:"script",instance:null,count:0,state:null},n0.set(e0,a0)),a0):{type:"void",instance:null,count:0,state:null};default:throw Error(mr(444,r0))}}function Qg(r0){return'href="'+CA(r0)+'"'}function Pg(r0){return'link[rel="stylesheet"]['+r0+"]"}function Vg(r0){return vr({},r0,{"data-precedence":r0.precedence,precedence:null})}function Gg(r0){return'[src="'+CA(r0)+'"]'}function jg(r0){return"script[async]"+r0}function Kg(r0,e0,n0){if(e0.count++,e0.instance===null)switch(e0.type){case"style":var a0=r0.querySelector('style[data-href~="'+CA(n0.href)+'"]');if(a0)return e0.instance=a0,nA(a0),a0;var i0=vr({},n0,{"data-href":n0.href,"data-precedence":n0.precedence,href:null,precedence:null});return nA(a0=(r0.ownerDocument||r0).createElement("style")),ug(a0,"style",i0),Yg(a0,n0.precedence,r0),e0.instance=a0;case"stylesheet":i0=Qg(n0.href);var s0=r0.querySelector(Pg(i0));if(s0)return e0.state.loading|=4,e0.instance=s0,nA(s0),s0;a0=Vg(n0),(i0=Dg.get(i0))&&Hg(a0,i0),nA(s0=(r0.ownerDocument||r0).createElement("link"));var o0=s0;return o0._p=new Promise(function(l0,c0){o0.onload=l0,o0.onerror=c0}),ug(s0,"link",a0),e0.state.loading|=4,Yg(s0,n0.precedence,r0),e0.instance=s0;case"script":return s0=Gg(n0.src),(i0=r0.querySelector(jg(s0)))?(e0.instance=i0,nA(i0),i0):(a0=n0,(i0=Dg.get(s0))&&Jg(a0=vr({},n0),i0),nA(i0=(r0=r0.ownerDocument||r0).createElement("script")),ug(i0,"link",a0),r0.head.appendChild(i0),e0.instance=i0);case"void":return null;default:throw Error(mr(443,e0.type))}else e0.type==="stylesheet"&&!(4&e0.state.loading)&&(a0=e0.instance,e0.state.loading|=4,Yg(a0,n0.precedence,r0));return e0.instance}function Yg(r0,e0,n0){for(var a0=n0.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i0=a0.length?a0[a0.length-1]:null,s0=i0,o0=0;o0<a0.length;o0++){var l0=a0[o0];if(l0.dataset.precedence===e0)s0=l0;else if(s0!==i0)break}s0?s0.parentNode.insertBefore(r0,s0.nextSibling):(e0=n0.nodeType===9?n0.head:n0).insertBefore(r0,e0.firstChild)}function Hg(r0,e0){r0.crossOrigin==null&&(r0.crossOrigin=e0.crossOrigin),r0.referrerPolicy==null&&(r0.referrerPolicy=e0.referrerPolicy),r0.title==null&&(r0.title=e0.title)}function Jg(r0,e0){r0.crossOrigin==null&&(r0.crossOrigin=e0.crossOrigin),r0.referrerPolicy==null&&(r0.referrerPolicy=e0.referrerPolicy),r0.integrity==null&&(r0.integrity=e0.integrity)}var Wg=null;function qg(r0,e0,n0){if(Wg===null){var a0=new Map,i0=Wg=new Map;i0.set(n0,a0)}else(a0=(i0=Wg).get(n0))||(a0=new Map,i0.set(n0,a0));if(a0.has(r0))return a0;for(a0.set(r0,null),n0=n0.getElementsByTagName(r0),i0=0;i0<n0.length;i0++){var s0=n0[i0];if(!(s0[qi]||s0[Gi]||r0==="link"&&s0.getAttribute("rel")==="stylesheet")&&s0.namespaceURI!=="http://www.w3.org/2000/svg"){var o0=s0.getAttribute(e0)||"";o0=r0+o0;var l0=a0.get(o0);l0?l0.push(s0):a0.set(o0,[s0])}}return a0}function Zg(r0,e0,n0){(r0=r0.ownerDocument||r0).head.insertBefore(n0,e0==="title"?r0.querySelector("head > title"):null)}function Xg(r0){return!!(r0.type!=="stylesheet"||3&r0.state.loading)}var $g=null;function em(){}function tm(){if(this.count--,this.count===0){if(this.stylesheets)am(this,this.stylesheets);else if(this.unsuspend){var r0=this.unsuspend;this.unsuspend=null,r0()}}}var nm=null;function am(r0,e0){r0.stylesheets=null,r0.unsuspend!==null&&(r0.count++,nm=new Map,e0.forEach(rm,r0),nm=null,tm.call(r0))}function rm(r0,e0){if(!(4&e0.state.loading)){var n0=nm.get(r0);if(n0)var a0=n0.get(null);else{n0=new Map,nm.set(r0,n0);for(var i0=r0.querySelectorAll("link[data-precedence],style[data-precedence]"),s0=0;s0<i0.length;s0++){var o0=i0[s0];o0.nodeName!=="LINK"&&o0.getAttribute("media")==="not all"||(n0.set(o0.dataset.precedence,o0),a0=o0)}a0&&n0.set(null,a0)}o0=(i0=e0.instance).getAttribute("data-precedence"),(s0=n0.get(o0)||a0)===a0&&n0.set(null,i0),n0.set(o0,i0),this.count++,a0=tm.bind(this),i0.addEventListener("load",a0),i0.addEventListener("error",a0),s0?s0.parentNode.insertBefore(i0,s0.nextSibling):(r0=r0.nodeType===9?r0.head:r0).insertBefore(i0,r0.firstChild),e0.state.loading|=4}}var im={$$typeof:Nr,Provider:null,Consumer:null,_currentValue:Hr,_currentValue2:Hr,_threadCount:0};function Am(r0,e0,n0,a0,i0,s0,o0,l0){this.tag=1,this.containerInfo=r0,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Li(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Li(0),this.hiddenUpdates=Li(null),this.identifierPrefix=a0,this.onUncaughtError=i0,this.onCaughtError=s0,this.onRecoverableError=o0,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l0,this.incompleteTransitions=new Map}function sm(r0,e0,n0,a0,i0,s0,o0,l0,c0,u0,d0,h0){return r0=new Am(r0,e0,n0,o0,l0,c0,u0,h0),e0=1,s0===!0&&(e0|=24),s0=Ho(3,null,null,e0),r0.current=s0,s0.stateNode=r0,(e0=jl()).refCount++,r0.pooledCache=e0,e0.refCount++,s0.memoizedState={element:a0,isDehydrated:n0,cache:e0},hc(s0),r0}function om(r0){return r0?r0=Ko:Ko}function lm(r0,e0,n0,a0,i0,s0){i0=om(i0),a0.context===null?a0.context=i0:a0.pendingContext=i0,(a0=fc(e0)).payload={element:n0},(s0=s0===void 0?null:s0)!==null&&(a0.callback=s0),(n0=gc(r0,a0,e0))!==null&&(Yp(n0,0,e0),mc(n0,r0,e0))}function cm(r0,e0){if((r0=r0.memoizedState)!==null&&r0.dehydrated!==null){var n0=r0.retryLane;r0.retryLane=n0!==0&&n0<e0?n0:e0}}function um(r0,e0){cm(r0,e0),(r0=r0.alternate)&&cm(r0,e0)}function dm(r0){if(r0.tag===13){var e0=Vo(r0,67108864);e0!==null&&Yp(e0,0,67108864),um(r0,67108864)}}var hm=!0;function pm(r0,e0,n0,a0){var i0=Kr.T;Kr.T=null;var s0=Yr.p;try{Yr.p=2,gm(r0,e0,n0,a0)}finally{Yr.p=s0,Kr.T=i0}}function fm(r0,e0,n0,a0){var i0=Kr.T;Kr.T=null;var s0=Yr.p;try{Yr.p=8,gm(r0,e0,n0,a0)}finally{Yr.p=s0,Kr.T=i0}}function gm(r0,e0,n0,a0){if(hm){var i0=mm(a0);if(i0===null)$f(r0,e0,a0,wm,n0),Bm(r0,a0);else if(function(u0,d0,h0,f0,p0){switch(d0){case"focusin":return km=Um(km,u0,d0,h0,f0,p0),!0;case"dragenter":return vm=Um(vm,u0,d0,h0,f0,p0),!0;case"mouseover":return Sm=Um(Sm,u0,d0,h0,f0,p0),!0;case"pointerover":var A0=p0.pointerId;return Im.set(A0,Um(Im.get(A0)||null,u0,d0,h0,f0,p0)),!0;case"gotpointercapture":return A0=p0.pointerId,Cm.set(A0,Um(Cm.get(A0)||null,u0,d0,h0,f0,p0)),!0}return!1}(i0,r0,e0,n0,a0))a0.stopPropagation();else if(Bm(r0,a0),4&e0&&-1<Tm.indexOf(r0)){for(;i0!==null;){var s0=$i(i0);if(s0!==null)switch(s0.tag){case 3:if((s0=s0.stateNode).current.memoizedState.isDehydrated){var o0=Bi(s0.pendingLanes);if(o0!==0){var l0=s0;for(l0.pendingLanes|=2,l0.entangledLanes|=2;o0;){var c0=1<<31-Si(o0);l0.entanglements[1]|=c0,o0&=~c0}
763Df(s0),!(6&dp)&&(Np=di()+500,Of(0))}}break;case 13:(l0=Vo(s0,2))!==null&&Yp(l0,0,2),Zp(),um(s0,2)}if((s0=mm(a0))===null&&$f(r0,e0,a0,wm,n0),s0===i0)break;i0=s0}i0!==null&&a0.stopPropagation()}else $f(r0,e0,a0,null,n0)}}function mm(r0){return bm(r0=VA(r0))}var wm=null;function bm(r0){if(wm=null,(r0=Xi(r0))!==null){var e0=br(r0);if(e0===null)r0=null;else{var n0=e0.tag;if(n0===13){if((r0=Er(e0))!==null)return r0;r0=null}else if(n0===3){if(e0.stateNode.current.memoizedState.isDehydrated)return e0.tag===3?e0.stateNode.containerInfo:null;r0=null}else e0!==r0&&(r0=null)}}return wm=r0,null}function Em(r0){switch(r0){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(hi()){case pi:return 2;case fi:return 8;case gi:case mi:return 32;case wi:return 268435456;default:return 32}default:return 32}}var ym=!1,km=null,vm=null,Sm=null,Im=new Map,Cm=new Map,xm=[],Tm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Bm(r0,e0){switch(r0){case"focusin":case"focusout":km=null;break;case"dragenter":case"dragleave":vm=null;break;case"mouseover":case"mouseout":Sm=null;break;case"pointerover":case"pointerout":Im.delete(e0.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cm.delete(e0.pointerId)}}function Um(r0,e0,n0,a0,i0,s0){return r0===null||r0.nativeEvent!==s0?(r0={blockedOn:e0,domEventName:n0,eventSystemFlags:a0,nativeEvent:s0,targetContainers:[i0]},e0!==null&&(e0=$i(e0))!==null&&dm(e0),r0):(r0.eventSystemFlags|=a0,e0=r0.targetContainers,i0!==null&&e0.indexOf(i0)===-1&&e0.push(i0),r0)}function Mm(r0){var e0=Xi(r0.target);if(e0!==null){var n0=br(e0);if(n0!==null){if((e0=n0.tag)===13){if((e0=Er(n0))!==null)return r0.blockedOn=e0,void function(a0){var i0=Yr.p;try{return Yr.p=a0,function(){if(n0.tag===13){var s0=jp();s0=Fi(s0);var o0=Vo(n0,s0);o0!==null&&Yp(o0,0,s0),um(n0,s0)}}()}finally{Yr.p=i0}}(r0.priority)}else if(e0===3&&n0.stateNode.current.memoizedState.isDehydrated)return void(r0.blockedOn=n0.tag===3?n0.stateNode.containerInfo:null)}}r0.blockedOn=null}function Nm(r0){if(r0.blockedOn!==null)return!1;for(var e0=r0.targetContainers;0<e0.length;){var n0=mm(r0.nativeEvent);if(n0!==null)return(e0=$i(n0))!==null&&dm(e0),r0.blockedOn=n0,!1;var a0=new(n0=r0.nativeEvent).constructor(n0.type,n0);PA=a0,n0.target.dispatchEvent(a0),PA=null,e0.shift()}return!0}function Dm(r0,e0,n0){Nm(r0)&&n0.delete(e0)}function Om(){ym=!1,km!==null&&Nm(km)&&(km=null),vm!==null&&Nm(vm)&&(vm=null),Sm!==null&&Nm(Sm)&&(Sm=null),Im.forEach(Dm),Cm.forEach(Dm)}function Lm(r0,e0){r0.blockedOn===e0&&(r0.blockedOn=null,ym||(ym=!0,pr.unstable_scheduleCallback(pr.unstable_NormalPriority,Om)))}var _m=null;function Rm(r0){_m!==r0&&(_m=r0,pr.unstable_scheduleCallback(pr.unstable_NormalPriority,function(){_m===r0&&(_m=null);for(var e0=0;e0<r0.length;e0+=3){var n0=r0[e0],a0=r0[e0+1],i0=r0[e0+2];if(typeof a0!="function"){if(bm(a0||n0)===null)continue;break}var s0=$i(n0);s0!==null&&(r0.splice(e0,3),e0-=3,Pu(s0,{pending:!0,data:i0,method:n0.method,action:a0},a0,i0))}}))}function zm(r0){function e0(c0){return Lm(c0,r0)}km!==null&&Lm(km,r0),vm!==null&&Lm(vm,r0),Sm!==null&&Lm(Sm,r0),Im.forEach(e0),Cm.forEach(e0);for(var n0=0;n0<xm.length;n0++){var a0=xm[n0];a0.blockedOn===r0&&(a0.blockedOn=null)}for(;0<xm.length&&(n0=xm[0]).blockedOn===null;)Mm(n0),n0.blockedOn===null&&xm.shift();if((n0=(r0.ownerDocument||r0).$$reactFormReplay)!=null)for(a0=0;a0<n0.length;a0+=3){var i0=n0[a0],s0=n0[a0+1],o0=i0[ji]||null;if(typeof s0=="function")o0||Rm(n0);else if(o0){var l0=null;if(s0&&s0.hasAttribute("formAction")){if(i0=s0,o0=s0[ji]||null)l0=o0.formAction;else if(bm(i0)!==null)continue}else l0=o0.action;typeof l0=="function"?n0[a0+1]=l0:(n0.splice(a0,3),a0-=3),Rm(n0)}}}function Fm(r0){this._internalRoot=r0}function Qm(r0){this._internalRoot=r0}Qm.prototype.render=Fm.prototype.render=function(r0){var e0=this._internalRoot;if(e0===null)throw Error(mr(409));lm(e0.current,jp(),r0,e0,null,null)},Qm.prototype.unmount=Fm.prototype.unmount=function(){var r0=this._internalRoot;if(r0!==null){this._internalRoot=null;var e0=r0.containerInfo;lm(r0.current,2,null,r0,null,null),Zp(),e0[Ki]=null}},Qm.prototype.unstable_scheduleHydration=function(r0){if(r0){var e0=Pi();r0={blockedOn:null,target:r0,priority:e0};for(var n0=0;n0<xm.length&&e0!==0&&e0<xm[n0].priority;n0++);xm.splice(n0,0,r0),n0===0&&Mm(r0)}};var Pm=fr.version;if(Pm!=="19.1.0")throw Error(mr(527,Pm,"19.1.0"));Yr.findDOMNode=function(r0){var e0=r0._reactInternals;if(e0===void 0)throw typeof r0.render=="function"?Error(mr(188)):(r0=Object.keys(r0).join(","),Error(mr(268,r0)));return r0=function(n0){var a0=n0.alternate;if(!a0){if((a0=br(n0))===null)throw Error(mr(188));return a0!==n0?null:n0}for(var i0=n0,s0=a0;;){var o0=i0.return;if(o0===null)break;var l0=o0.alternate;if(l0===null){if((s0=o0.return)!==null){i0=s0;continue}break}if(o0.child===l0.child){for(l0=o0.child;l0;){if(l0===i0)return yr(o0),n0;if(l0===s0)return yr(o0),a0;l0=l0.sibling}throw Error(mr(188))}if(i0.return!==s0.return)i0=o0,s0=l0;else{for(var c0=!1,u0=o0.child;u0;){if(u0===i0){c0=!0,i0=o0,s0=l0;break}if(u0===s0){c0=!0,s0=o0,i0=l0;break}u0=u0.sibling}if(!c0){for(u0=l0.child;u0;){if(u0===i0){c0=!0,i0=l0,s0=o0;break}if(u0===s0){c0=!0,s0=l0,i0=o0;break}u0=u0.sibling}if(!c0)throw Error(mr(189))}}if(i0.alternate!==s0)throw Error(mr(190))}if(i0.tag!==3)throw Error(mr(188));return i0.stateNode.current===i0?n0:a0}(e0),(r0=r0!==null?kr(r0):null)===null?null:r0.stateNode};var Vm={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Kr,reconcilerVersion:"19.1.0"};
763if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gm.isDisabled&&Gm.supportsFiber)try{yi=Gm.inject(Vm),ki=Gm}catch{}}wa.createRoot=function(r0,e0){if(!wr(r0))throw Error(mr(299));var n0=!1,a0="",i0=Td,s0=Bd,o0=Ud;return e0!=null&&(e0.unstable_strictMode===!0&&(n0=!0),e0.identifierPrefix!==void 0&&(a0=e0.identifierPrefix),e0.onUncaughtError!==void 0&&(i0=e0.onUncaughtError),e0.onCaughtError!==void 0&&(s0=e0.onCaughtError),e0.onRecoverableError!==void 0&&(o0=e0.onRecoverableError),e0.unstable_transitionCallbacks!==void 0&&e0.unstable_transitionCallbacks),e0=sm(r0,1,!1,null,0,n0,a0,i0,s0,o0,0,null),r0[Ki]=e0.current,Zf(r0),new Fm(e0)},wa.hydrateRoot=function(r0,e0,n0){if(!wr(r0))throw Error(mr(299));var a0=!1,i0="",s0=Td,o0=Bd,l0=Ud,c0=null;return n0!=null&&(n0.unstable_strictMode===!0&&(a0=!0),n0.identifierPrefix!==void 0&&(i0=n0.identifierPrefix),n0.onUncaughtError!==void 0&&(s0=n0.onUncaughtError),n0.onCaughtError!==void 0&&(o0=n0.onCaughtError),n0.onRecoverableError!==void 0&&(l0=n0.onRecoverableError),n0.unstable_transitionCallbacks!==void 0&&n0.unstable_transitionCallbacks,n0.formState!==void 0&&(c0=n0.formState)),(e0=sm(r0,1,!0,e0,0,a0,i0,s0,o0,l0,0,c0)).context=om(null),n0=e0.current,(i0=fc(a0=Fi(a0=jp()))).callback=null,gc(n0,i0,a0),n0=a0,e0.current.lanes=n0,_i(e0,n0),Df(e0),r0[Ki]=e0.current,Zf(r0),new Qm(e0)},wa.version="19.1.0",function r0(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE=="function")try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch{}}(),ma.exports=wa;var jm=ma.exports,Km=t(jm),Ym={exports:{}},Hm={},Jm=nr,Wm=typeof Object.is=="function"?Object.is:function(r0,e0){return r0===e0&&(r0!==0||1/r0==1/e0)||r0!=r0&&e0!=e0},qm=Jm.useState,Zm=Jm.useEffect,Xm=Jm.useLayoutEffect,$m=Jm.useDebugValue;function ew(r0){var e0=r0.getSnapshot;r0=r0.value;try{var n0=e0();return!Wm(r0,n0)}catch{return!0}}var tw=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(r0,e0){return e0()}:function(r0,e0){var n0=e0(),a0=qm({inst:{value:n0,getSnapshot:e0}}),i0=a0[0].inst,s0=a0[1];return Xm(function(){i0.value=n0,i0.getSnapshot=e0,ew(i0)&&s0({inst:i0})},[r0,n0,e0]),Zm(function(){return ew(i0)&&s0({inst:i0}),r0(function(){ew(i0)&&s0({inst:i0})})},[r0]),$m(n0),n0};Hm.useSyncExternalStore=Jm.useSyncExternalStore!==void 0?Jm.useSyncExternalStore:tw,Ym.exports=Hm;var nw=Ym.exports,aw={exports:{}},rw={},iw=nr,Aw=nw,sw=typeof Object.is=="function"?Object.is:function(r0,e0){return r0===e0&&(r0!==0||1/r0==1/e0)||r0!=r0&&e0!=e0},ow=Aw.useSyncExternalStore,lw=iw.useRef,cw=iw.useEffect,uw=iw.useMemo,dw=iw.useDebugValue;rw.useSyncExternalStoreWithSelector=function(r0,e0,n0,a0,i0){var s0=lw(null);if(s0.current===null){var o0={hasValue:!1,value:null};s0.current=o0}else o0=s0.current;s0=uw(function(){function c0(p0){if(!h0){if(h0=!0,u0=p0,p0=a0(p0),i0!==void 0&&o0.hasValue){var A0=o0.value;if(i0(A0,p0))return d0=A0}return d0=p0}if(A0=d0,sw(u0,p0))return A0;var m0=a0(p0);return i0!==void 0&&i0(A0,m0)?A0:(u0=p0,d0=m0)}var u0,d0,h0=!1,f0=n0===void 0?null:n0;return[function(){return c0(e0())},f0===null?void 0:function(){return c0(f0())}]},[e0,n0,a0,i0]);var l0=ow(r0,s0[0],s0[1]);return cw(function(){o0.hasValue=!0,o0.value=l0},[l0]),dw(l0),l0},aw.exports=rw;var hw=aw.exports;let pw=function(r0){r0()};const fw=()=>pw,gw=Symbol.for("react-redux-context"),mw=typeof globalThis<"u"?globalThis:{};function ww(){var r0;if(!nr.createContext)return{};const e0=(r0=mw[gw])!=null?r0:mw[gw]=new Map;let n0=e0.get(nr.createContext);return n0||(n0=nr.createContext(null),e0.set(nr.createContext,n0)),n0}const bw=ww();function Ew(r0=bw){return function(){return nr.useContext(r0)}}const yw=Ew();let kw=()=>{throw new Error("uSES not initialized!")};const vw=(r0,e0)=>r0===e0;function Sw(r0=bw){const e0=r0===bw?yw:Ew(r0);return function(n0,a0={}){const{equalityFn:i0=vw,stabilityCheck:s0,noopCheck:o0}=typeof a0=="function"?{equalityFn:a0}:a0,{store:l0,subscription:c0,getServerState:u0,stabilityCheck:d0,noopCheck:h0}=e0();nr.useRef(!0);const f0=nr.useCallback({[n0.name]:A0=>n0(A0)}[n0.name],[n0,d0,s0]),p0=kw(c0.addNestedSub,l0.getState,u0||l0.getState,f0,i0);return nr.useDebugValue(p0),p0}}const Iw=Sw(),ub={notify(){},get:()=>[]},db=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?nr.useLayoutEffect:nr.useEffect;
763function hb({store:r0,context:e0,children:n0,serverState:a0,stabilityCheck:i0="once",noopCheck:s0="once"}){const o0=nr.useMemo(()=>({store:r0,subscription:function(d0){let h0,f0=ub,p0=0,A0=!1;function m0(){y0.onStateChange&&y0.onStateChange()}function x0(){p0++,h0||(h0=d0.subscribe(m0),f0=function(){const b0=fw();let E0=null,w0=null;return{clear(){E0=null,w0=null},notify(){b0(()=>{let v0=E0;for(;v0;)v0.callback(),v0=v0.next})},get(){let v0=[],S0=E0;for(;S0;)v0.push(S0),S0=S0.next;return v0},subscribe(v0){let S0=!0,k0=w0={callback:v0,next:null,prev:w0};return k0.prev?k0.prev.next=k0:E0=k0,function(){S0&&E0!==null&&(S0=!1,k0.next?k0.next.prev=k0.prev:w0=k0.prev,k0.prev?k0.prev.next=k0.next:E0=k0.next)}}}}())}function g0(){p0--,h0&&p0===0&&(h0(),h0=void 0,f0.clear(),f0=ub)}const y0={addNestedSub:function(b0){x0();const E0=f0.subscribe(b0);let w0=!1;return()=>{w0||(w0=!0,E0(),g0())}},notifyNestedSubs:function(){f0.notify()},handleChangeWrapper:m0,isSubscribed:function(){return A0},trySubscribe:function(){A0||(A0=!0,x0())},tryUnsubscribe:function(){A0&&(A0=!1,g0())},getListeners:()=>f0};return y0}(r0),getServerState:a0?()=>
763a0:void 0,stabilityCheck:i0,noopCheck:s0}),[r0,a0,i0,s0]),l0=nr.useMemo(()=>r0.getState(),[r0]);db(()=>{const{subscription:u0}=o0;return u0.onStateChange=u0.notifyNestedSubs,u0.trySubscribe(),l0!==r0.getState()&&u0.notifyNestedSubs(),()=>{u0.tryUnsubscribe(),u0.onStateChange=void 0}},[o0,l0]);const c0=e0||bw;return nr.createElement(c0.Provider,{value:o0},n0)}function pb(r0=bw){const e0=r0===bw?yw:Ew(r0);return function(){const{store:n0}=e0();return n0}}const fb=pb();function gb(r0=bw){const e0=r0===bw?fb:pb(r0);return function(){return e0().dispatch}}const mb=gb();var wb,bb;function Eb(r0){return`Minified Redux error #${r0}; visit https://redux.js.org/Errors?code=${r0} for the full message or use the non-minified dev environment for full errors. `}wb=hw.useSyncExternalStoreWithSelector,kw=wb,bb=dr.unstable_batchedUpdates,pw=bb;var yb=typeof Symbol=="function"&&Symbol.observable||"@@observable",kb=()=>Math.random().toString(36).substring(7).split("").join("."),vb={INIT:`@@redux/INIT${kb()}`,REPLACE:`@@redux/REPLACE${kb()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${kb()}`};function Sb(r0,e0,n0){if(typeof r0!="function")throw new Error(Eb(2));if(typeof e0=="function"&&typeof n0=="function"||typeof n0=="function"&&typeof arguments[3]=="function")throw new Error(Eb(0));if(typeof e0=="function"&&n0===void 0&&(n0=e0,e0=void 0),n0!==void 0){if(typeof n0!="function")throw new Error(Eb(1));return n0(Sb)(r0,e0)}let a0=r0,i0=e0,s0=new Map,o0=s0,l0=0,c0=!1;function u0(){o0===s0&&(o0=new Map,s0.forEach((p0,A0)=>{o0.set(A0,p0)}))}function d0(){if(c0)throw new Error(Eb(3));return i0}function h0(p0){if(typeof p0!="function")throw new Error(Eb(4));if(c0)throw new Error(Eb(5));let A0=!0;u0();const m0=l0++;return o0.set(m0,p0),function(){if(A0){if(c0)throw new Error(Eb(6));A0=!1,u0(),o0.delete(m0),s0=null}}}function f0(p0){if(!function(A0){if(typeof A0!="object"||A0===null)return!1;let m0=A0;for(;Object.getPrototypeOf(m0)!==null;)m0=Object.getPrototypeOf(m0);return Object.getPrototypeOf(A0)===m0||Object.getPrototypeOf(A0)===null}(p0))throw new Error(Eb(7));if(p0.type===void 0)throw new Error(Eb(8));if(typeof p0.type!="string")throw new Error(Eb(17));if(c0)throw new Error(Eb(9));try{c0=!0,i0=a0(i0,p0)}finally{c0=!1}return(s0=o0).forEach(A0=>{A0()}),p0}return f0({type:vb.INIT}),{dispatch:f0,subscribe:h0,getState:d0,replaceReducer:function(p0){if(typeof p0!="function")throw new Error(Eb(10));a0=p0,f0({type:vb.REPLACE})},[yb]:function(){const p0=h0;return{subscribe(A0){if(typeof A0!="object"||A0===null)throw new Error(Eb(11));function m0(){const x0=A0;x0.next&&x0.next(d0())}return m0(),{unsubscribe:p0(m0)}},[yb](){return this}}}}}function Ib(...r0){return r0.length===0?e0=>e0:r0.length===1?r0[0]:r0.reduce((e0,n0)=>(...a0)=>e0(n0(...a0)))}const Cb=[60,170,310,600,1e3,3e3,6e3,12e3,14e3,16e3],xb="main",Tb="playlist",Bb="equalizer",Ub="milkdrop",Mb="BUFFER",Nb="PLAY",Db="NONE",Ob="INITIALIZED",Lb="â¦",_b="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),Rb={images:{EQ_PREAMP_LINE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHEAAAABCAYAAADpXEERAAAAE0lEQVQoU2Pcdfruf4ZRMKRDAAD1lwNjTqcaUQAAAABJRU5ErkJggg==",EQ_GRAPH_LINE_COLORS:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAATCAYAAABRC2cZAAAAR0lEQVQYV2O4rCT9n+F9kOJ/hvfViv8ZHkzSQCE2afxneH/HEJm49Nr0PwOYWPLIAkp0PjL4z1B41uQ/Q9QGnf8MWrPEIAQANWYwvnlToNIAAAAASUVORK5CYII="},colors:["rgb(0,0,0)","rgb(24,33,41)","rgb(239,49,16)","rgb(206,41,16)","rgb(214,90,0)","rgb(214,102,0)","rgb(214,115,0)","rgb(198,123,8)","rgb(222,165,24)","rgb(214,181,33)","rgb(189,222,41)","rgb(148,222,33)","rgb(41,206,16)","rgb(50,190,16)","rgb(57,181,16)","rgb(49,156,8)","rgb(41,148,0)","rgb(24,132,8)","rgb(255,255,255)","rgb(214,214,222)","rgb(181,189,189)","rgb(160,170,175)","rgb(148,156,165)","rgb(150,150,150)"],playlistStyle:{normal:"#00FF00",current:"#FFFFFF",normalbg:"#000000",selectedbg:"#0000FF",font:"Arial"}},zb="OSCILLOSCOPE",Fb="NONE",Qb="MILKDROP",Pb=["BAR",zb,Fb],Vb="ELAPSED",Gb="REMAINING",jb="PLAYING",Kb="STOPPED",Yb="PAUSED",Hb="STOPPED";function Jb(r0){return new Promise((e0,n0)=>{const a0=new Image;a0.onload=()=>{e0(a0)},a0.onerror=n0,a0.src=r0})}const Wb=r0=>{if(r0==null)return{minutesFirstDigit:" ",minutesSecondDigit:" ",secondsFirstDigit:" ",secondsSecondDigit:" "};const e0=Math.floor(r0/60),n0=r0%60,a0=r0==null?[" "," "," "," "]:[String(Math.floor(e0/10)),String(Math.floor(e0%10)),String(Math.floor(n0/10)),String(Math.floor(n0%10))],[i0,s0,o0,l0]=a0;return{minutesFirstDigit:i0,minutesSecondDigit:s0,secondsFirstDigit:o0,secondsSecondDigit:l0}},qb=(r0,e0=!0)=>
763{if(r0==null)return"";const{minutesFirstDigit:n0,minutesSecondDigit:a0,secondsFirstDigit:i0,secondsSecondDigit:s0}=Wb(r0);return[e0&&n0==="0"?"":n0,a0,":",i0,s0].join("")},Zb=/^\s*\[(.+?)\]\s*$/,Xb=/^\s*([^;][^=]*)\s*=\s*(.*)\s*$/,$b=r0=>{let e0,n0;return r0.split(/[\r\n]+/g).reduce((a0,i0)=>{if((n0=i0.match(Xb))&&e0!=null){const s0=n0[1].trim().toLowerCase(),o0=n0[2].replace(/\=.*$/g,"").trim().replace(/(^")|("$)|(^')|('$)/g,"");a0[e0][s0]=o0}else(n0=i0.match(Zb))&&(e0=n0[1].trim().toLowerCase(),a0[e0]={});return a0},{})},eE=(r0,e0,n0)=>Math.min(Math.max(r0,e0),n0);function tE(r0){return window.btoa(Array.from(r0).map(e0=>String.fromCharCode(e0)).join(""))}function nE(r0,e0){const n0=document.createElement("a");n0.download=e0,n0.href=r0,window.document.body.appendChild(n0),n0.click(),window.document.body.removeChild(n0)}const aE=(r0,e0,n0)=>(n0-r0)/(e0-r0),rE=(r0,e0,n0)=>e0+Math.round(r0*(n0-e0)),iE=(r0,e0)=>rE(r0,0,e0-1),AE=(r0,e0,n0,a0)=>i0=>rE(aE(r0,e0,i0),n0,a0),sE=AE(1,64,0,100),oE=AE(0,100,1,64);function lE(r0,e0){const n0=e0,a0=r0;for(const i0 of Object.keys(n0))n0[i0]instanceof Object&&Object.assign(n0[i0],lE(a0[i0],n0[i0]));return Object.assign(r0||{},e0),r0}function cE(r0,e0,n0,a0){const i0=aE(r0,e0,n0);return a0[iE(i0,a0.length)]}function uE(r0){const e0=[...r0];let n0=e0.length;for(;n0;){const a0=Math.floor(Math.random()*n0--),i0=e0[n0];e0[n0]=e0[a0],e0[a0]=i0}return e0}function dE(r0,e0,n0){const a0=new Array(r0.length);let i0=0;for(let s0=0;s0<a0.length;s0++){const o0=s0-n0;if(o0>=0&&o0<r0.length&&e0(o0))a0[s0]=r0[o0];else{for(;i0<r0.length&&e0(i0);)i0++;a0[s0]=r0[i0],i0++}}return a0}function hE(r0,e0,n0){return[...r0.slice(0,e0),n0,...r0.slice(e0+1)]}let pE=0;function fE(r0,e0){const n0={};return Object.keys(r0).forEach(a0=>n0[a0]=e0(r0[a0],a0)),n0}const gE=r0=>r0.length===0?null:r0.map(n0=>({left:n0.x,top:n0.y,bottom:n0.y+n0.height,right:n0.x+n0.width})).reduce((n0,a0)=>({left:Math.min(n0.left,a0.left),top:Math.min(n0.top,a0.top),bottom:Math.max(n0.bottom,a0.bottom),right:Math.max(n0.right,a0.right)}));function mE(r0){return{width:Math.max(r0.scrollWidth,r0.offsetWidth),height:Math.max(r0.scrollHeight,r0.offsetHeight)}}function wE(){return{width:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),height:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}}function bE(r0){switch(r0.type){case"touchstart":case"touchmove":{const e0=r0.targetTouches[0]??r0.touches[0];if(e0==null)throw new Error("Unexpected touch event with zero touch targets.");return e0}case"mousedown":case"mousemove":case"pointerdown":return r0;default:throw new Error(`Unexpected event type: ${r0.type}`)}}function EE(r0){return bE(r0).clientX}function yE(r0){return bE(r0).clientY}const kE={trackOrder:[],currentTrack:null,lastSelectedIndex:null,selectedTracks:[]},vE={focused:xb,positionsAreRelative:!0,genWindows:{[xb]:{title:"Main Window",size:[0,0],open:!0,shade:!1,canResize:!1,canShade:!0,canDouble:!0,hotkey:"Alt+W",position:{x:0,y:0}},[Bb]:{title:"Equalizer",size:[0,0],open:!0,shade:!1,canResize:!1,canShade:!0,canDouble:!0,hotkey:"Alt+G",position:{x:0,y:0}},[Tb]:{title:"Playlist Editor",size:[0,0],open:!0,shade:!1,canResize:!0,canShade:!0,canDouble:!1,hotkey:"Alt+E",position:{x:0,y:0}},[Ub]:{title:"Milkdrop",size:[0,0],open:!1,shade:!1,canResize:!0,canShade:!1,canDouble:!1,position:{x:0,y:0}}},browserWindowSize:{width:0,height:0},windowOrder:[Tb,Bb,Ub,xb],milkdropEnabled:!1},SE={timeMode:Vb,timeElapsed:0,volume:Math.round(200/255*100),balance:0,shuffle:!1,repeat:!1,status:Hb};var IE;function CE(r0,e0){return r0===e0}function xE(r0){var e0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CE,n0=null,a0=null;return function(){return function(i0,s0,o0){if(s0===null||o0===null||s0.length!==o0.length)return!1;for(var l0=s0.length,c0=0;c0<l0;c0++)if(!i0(s0[c0],o0[c0]))return!1;return!0}(e0,n0,arguments)||(a0=r0.apply(null,arguments)),n0=arguments,a0}}IE=function(r0){for(var e0=arguments.length,n0=Array(e0>1?e0-1:0),a0=1;a0<e0;a0++)n0[a0-1]=arguments[a0];return function(){for(var i0=arguments.length,s0=Array(i0),o0=0;o0<i0;o0++)s0[o0]=arguments[o0];var l0=0,c0=s0.pop(),u0=function(f0){var p0=Array.isArray(f0[0])?f0[0]:f0;if(!p0.every(function(m0){return typeof m0=="function"})){var A0=p0.map(function(m0){return typeof m0}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+A0+"]")}return p0}(s0),d0=r0.apply(void 0,[function(){return l0++,c0.apply(null,arguments)}].concat(n0)),h0=xE(function(){for(var f0=[],p0=u0.length,A0=0;A0<p0;A0++)f0.push(u0[A0].apply(null,arguments));return d0.apply(null,f0)});return h0.resultFunc=c0,h0.recomputations=function(){return l0},h0.resetRecomputations=function(){return l0=0},h0}}(xE);
763const TE={itemBackground:"rgb(0,0,0)",itemForeground:"rgb(0,255,0)",windowBackground:"rgb(56,55,87)",buttonText:"rgb(57,57,66)",windowText:"rgb(255,255,255)",divider:"rgb(117,116,139)",playlistSelection:"rgb(0,0,198)",listHeaderBackground:"rgb(72,72,120)",listHeaderText:"rgb(255,255,255)",listHeaderFrameTopAndLeft:"rgb(108,108,180)",listHeaderFrameBottomAndRight:"rgb(36,36,60)",listHeaderFramePressed:"rgb(18,18,30)",listHeaderDeadArea:"rgb(36,36,60)",scrollbarOne:"rgb(36,36,60)",scrollbarTwo:"rgb(36,36,60)",pressedScrollbarOne:"rgb(121,130,150)",pressedScrollbarTwo:"rgb(78,88,110)",scrollbarDeadArea:"rgb(36,36,60)",listTextHighlighted:"rgb(0,198,255)",listTextHighlightedBackground:"rgb(0,198,255)",listTextSelected:"rgb(0,198,255)",listTextSelectedBackground:"rgb(0,198,255)"},BE={doubled:!1,marqueeStep:0,disableMarquee:!1,loading:!0,llama:!1,closed:!1,working:!1,skinImages:Rb.images,skinColors:Rb.colors,skinCursors:null,skinPlaylistStyle:null,skinRegion:{},visualizerStyle:0,dummyVizData:null,playlistScrollPosition:0,skinGenLetterWidths:null,skinGenExColors:TE,additionalVisualizers:[],zIndex:0},UE=IE(r0=>r0.visualizerStyle,r0=>Pb[r0]),ME={focus:null,bandFocused:null,scrubPosition:0,userMessage:null},NE={on:!0,auto:!1,sliders:{preamp:50,60:50,170:50,310:50,600:50,1e3:50,3e3:50,6e3:50,12e3:50,14e3:50,16e3:50}},DE={availableSkins:[]};var OE=function(r0,e0,n0,a0,i0,s0,o0,l0){if(!r0){var c0;if(e0===void 0)c0=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u0=[n0,a0,i0,s0,o0,l0],d0=0;(c0=new Error(e0.replace(/%s/g,function(){return u0[d0++]}))).name="Invariant Violation"}throw c0.framesToPop=1,c0}},LE=t(OE);async function _E(r0){return new Promise((e0,n0)=>{const a0=new FileReader;a0.onload=()=>{e0(a0.result)},a0.onerror=n0,a0.readAsText(r0)})}async function RE({accept:r0,directory:e0=!1}={accept:null,directory:!1}){return new Promise(n0=>{const a0=document.createElement("input");r0&&a0.setAttribute("accept",r0),a0.type="file",a0.multiple=!0,a0.webkitdirectory=e0,a0.directory=e0,a0.mozdirectory=e0,a0.value=null,a0.addEventListener("change",i0=>{const s0=i0.target.files;n0(s0)}),a0.click()})}function zE(r0){return`data:image/x-win-bitmap;base64,${tE(r0)}`}const FE=function(){const r0=new WeakMap;return e0=>(r0.has(e0)||r0.set(e0,(n0=>{const{artist:a0,title:i0,defaultName:s0,url:o0}=n0;if(a0&&i0)return`${a0} - ${i0}`;if(i0)return i0;if(s0)return s0;if(o0){const l0=function(c0){if(function(d0){return/^blob:/.test(d0)}(c0))return null;const u0=c0.split("/").pop();return u0==null?null:u0.split("#")[0].split("?")[0]}(o0);if(l0)return l0}return"???"})(e0)),r0.get(e0))}();function QE(r0){let e0;const n0=Math.round(r0/1e3);return e0=String(n0),n0<=10&&(e0=String(n0).slice(0,1).padStart(2," ")),n0>=100&&(e0=String(n0).slice(1,3)),e0}function PE(r0){let e0;const n0=Math.round(r0/1e3);return e0=String(n0),n0<=100&&(e0=String(n0).padStart(3," ")),n0<=10&&(e0=String(n0).padStart(3," ")),n0>=1e3&&(e0=`${String(n0).slice(0,2)}H`),n0>=1e4&&(e0=`${String(n0).slice(0,1).padStart(2," ")}C`),e0}const VE={};var GE;(function(r0){r0[r0.IMMEDIATE=0]="IMMEDIATE",r0[r0.DEFAULT=1]="DEFAULT",r0[r0.USER_PRESET=2]="USER_PRESET"})(GE||(GE={}));const jE={display:"WINDOW",overlay:!1,presetHistory:[],presets:[],currentPresetIndex:null,butterchurn:null,transitionType:GE.DEFAULT,randomize:!0,cycling:!0,message:null},KE=function(r0){const e0=Object.keys(r0),n0={};for(let s0=0;s0<e0.length;s0++){const o0=e0[s0];typeof r0[o0]=="function"&&(n0[o0]=r0[o0])}const a0=Object.keys(n0);let i0;try{(function(s0){Object.keys(s0).forEach(o0=>{const l0=s0[o0];if(l0(void 0,{type:vb.INIT})===void 0)throw new Error(Eb(12));if(l0(void 0,{type:vb.PROBE_UNKNOWN_ACTION()})===void 0)throw new Error(Eb(13))})})(n0)}catch(s0){i0=s0}return function(s0={},o0){if(i0)throw i0;let l0=!1;const c0={};for(let u0=0;u0<a0.length;u0++){const d0=a0[u0],h0=n0[d0],f0=s0[d0],p0=h0(f0,o0);if(p0===void 0)throw new Error(Eb(14));c0[d0]=p0,l0=l0||p0!==f0}return l0=l0||a0.length!==Object.keys(s0).length,l0?c0:s0}}({userInput:(r0=ME,e0)=>{switch(e0.type){case"SET_FOCUS":return{...r0,focus:e0.input,bandFocused:null};case"SET_BAND_FOCUS":return{...r0,focus:e0.input,bandFocused:e0.bandFocused};case"UNSET_FOCUS":return{...r0,focus:null,bandFocused:null};case"SET_SCRUB_POSITION":return{...r0,scrubPosition:e0.position};case"SET_USER_MESSAGE":return{...r0,userMessage:e0.message};case"UNSET_USER_MESSAGE":return{...r0,userMessage:null};default:return r0}},windows:(r0=vE,e0)=>{switch(e0.type){case"ENABLE_MILKDROP":return{...r0,milkdropEnabled:!0,genWindows:{...r0.genWindows,[Ub]:{...r0.genWindows[Ub],open:e0.open}}};case"SET_FOCUSED_WINDOW":let n0=r0.windowOrder;return e0.window!=null&&(n0=[...r0.windowOrder.filter(o0=>o0!==e0.window),e0.window]),{...r0,focused:e0.window,windowOrder:n0};case"TOGGLE_WINDOW_SHADE_MODE":const{canShade:a0}=r0.genWindows[e0.windowId];if(!a0)throw new Error(`Tried to shade/unshade a window that cannot be shaded: ${e0.windowId}`);return{...r0,genWindows:{...r0.genWindows,[e0.windowId]:{...r0.genWindows[e0.windowId],shade:!r0.genWindows[e0.windowId].shade}}};case"TOGGLE_WINDOW":const i0=r0.genWindows[e0.windowId];return{...r0,genWindows:{...r0.genWindows,[e0.windowId]:{...i0,open:!i0.open}}};case"CLOSE_WINDOW":return{...r0,genWindows:{...r0.genWindows,[e0.windowId]:{...r0.genWindows[e0.windowId],open:!1}}};case"WINDOW_SIZE_CHANGED":const{canResize:s0}=r0.genWindows[e0.windowId];if(!s0)throw new Error(`Tried to resize a window that cannot be resized: ${e0.windowId}`);return{...r0,genWindows:{...r0.genWindows,[e0.windowId]:{...r0.genWindows[e0.windowId],size:e0.size}}};
763case"UPDATE_WINDOW_POSITIONS":return{...r0,positionsAreRelative:e0.absolute!==!0&&r0.positionsAreRelative,genWindows:fE(r0.genWindows,(o0,l0)=>{const c0=e0.positions[l0];return c0==null?o0:{...o0,position:c0}})};case"RESET_WINDOW_SIZES":return{...r0,genWindows:fE(r0.genWindows,o0=>({...o0,size:[0,0]}))};case"BROWSER_WINDOW_SIZE_CHANGED":return{...r0,browserWindowSize:{height:e0.height,width:e0.width}};default:return r0}},display:(r0=BE,e0)=>{switch(e0.type){case"LOAD_DEFAULT_SKIN":{const{skinImages:a0,skinColors:i0,skinCursors:s0,skinPlaylistStyle:o0,skinRegion:l0,skinGenLetterWidths:c0,skinGenExColors:u0}=BE;return{...r0,skinImages:a0,skinColors:i0,skinCursors:s0,skinPlaylistStyle:o0,skinRegion:l0,skinGenLetterWidths:c0,skinGenExColors:u0}}case"TOGGLE_DOUBLESIZE_MODE":return{...r0,doubled:!r0.doubled};case"TOGGLE_LLAMA_MODE":return{...r0,llama:!r0.llama};case"STEP_MARQUEE":return r0.disableMarquee?r0:{...r0,marqueeStep:r0.marqueeStep+1};case"DISABLE_MARQUEE":return{...r0,disableMarquee:!0};case"STOP_WORKING":return{...r0,working:!1};case"START_WORKING":return{...r0,working:!0};case"CLOSE_WINAMP":return{...r0,closed:!0};case"OPEN_WINAMP":return{...r0,closed:!1};case"LOADING":return{...r0,loading:!0};case"LOADED":return{...r0,loading:!1};case"SET_SKIN_DATA":const{data:n0}=e0;return{...r0,loading:!1,skinImages:n0.skinImages,skinColors:n0.skinColors,skinPlaylistStyle:n0.skinPlaylistStyle,skinCursors:n0.skinCursors,skinRegion:n0.skinRegion,skinGenLetterWidths:n0.skinGenLetterWidths,skinGenExColors:n0.skinGenExColors||TE};case"TOGGLE_VISUALIZER_STYLE":return{...r0,visualizerStyle:(r0.visualizerStyle+1)%Pb.length};case"SET_PLAYLIST_SCROLL_POSITION":return{...r0,playlistScrollPosition:e0.position};case"SET_Z_INDEX":return{...r0,zIndex:e0.zIndex};case"SET_DUMMY_VIZ_DATA":return{...r0,dummyVizData:e0.data};default:return r0}},settings:(r0=DE,e0)=>e0.type==="SET_AVAILABLE_SKINS"?{...r0,availableSkins:e0.skins}:r0,equalizer:(r0=NE,e0)=>{switch(e0.type){case"SET_BAND_VALUE":const n0={...r0.sliders,[e0.band]:e0.value};return{...r0,sliders:n0};case"SET_EQ_ON":return{...r0,on:!0};case"SET_EQ_OFF":return{...r0,on:!1};case"SET_EQ_AUTO":return{...r0,auto:e0.value};default:return r0}},playlist:(r0=kE,e0)=>{switch(e0.type){case"CLICKED_TRACK":return{...r0,selectedTracks:[r0.trackOrder[e0.index]],lastSelectedIndex:e0.index};case"CTRL_CLICKED_TRACK":{const d0=r0.trackOrder[e0.index],h0=r0.selectedTracks.indexOf(d0),f0=[...r0.selectedTracks];return h0===-1?f0.push(d0):f0.splice(h0,1),{...r0,selectedTracks:f0,lastSelectedIndex:e0.index}}case"SHIFT_CLICKED_TRACK":if(r0.lastSelectedIndex==null)return r0;const n0=e0.index,a0=Math.min(n0,r0.lastSelectedIndex),i0=Math.max(n0,r0.lastSelectedIndex),s0=r0.trackOrder.slice(a0,i0+1);return{...r0,selectedTracks:s0};case"SELECT_ALL":return{...r0,selectedTracks:[...r0.trackOrder]};case"SELECT_ZERO":return{...r0,selectedTracks:[]};case"INVERT_SELECTION":return{...r0,selectedTracks:r0.trackOrder.filter(d0=>!r0.selectedTracks.includes(d0))};case"REMOVE_ALL_TRACKS":return{...r0,trackOrder:[],currentTrack:null,selectedTracks:[],lastSelectedIndex:null};case"REMOVE_TRACKS":const o0=new Set(e0.ids.map(Number)),{currentTrack:l0}=r0;return{...r0,trackOrder:r0.trackOrder.filter(d0=>!o0.has(d0)),currentTrack:o0.has(Number(l0))?null:l0,selectedTracks:Array.from(r0.selectedTracks).filter(d0=>o0.has(d0)),lastSelectedIndex:null};case"REVERSE_LIST":return{...r0,trackOrder:[...r0.trackOrder].reverse(),lastSelectedIndex:null};case"RANDOMIZE_LIST":return{...r0,trackOrder:uE(r0.trackOrder)};case"SET_TRACK_ORDER":const{trackOrder:c0}=e0;return{...r0,trackOrder:c0};case"ADD_TRACK_FROM_URL":const u0=e0.atIndex==null?r0.trackOrder.length:e0.atIndex;return{...r0,trackOrder:[...r0.trackOrder.slice(0,u0),Number(e0.id),...r0.trackOrder.slice(u0)],lastSelectedIndex:null};case"PLAY_TRACK":case"BUFFER_TRACK":return{...r0,currentTrack:e0.id};case"DRAG_SELECTED":return{...r0,trackOrder:dE(r0.trackOrder,d0=>r0.selectedTracks.includes(r0.trackOrder[d0]),e0.offset),lastSelectedIndex:null};default:return r0}},media:(r0=SE,e0)=>{switch(e0.type){case"PLAY":case"IS_PLAYING":return{...r0,status:"PLAYING"};case"PAUSE":return{...r0,status:"PAUSED"};case"STOP":case"OPEN_WINAMP":return{...r0,status:Hb};case"IS_STOPPED":return{...r0,status:"ENDED"};case"CLOSE_WINAMP":return{...r0,status:"CLOSED"};case"TOGGLE_TIME_MODE":const n0=r0.timeMode===Gb?Vb:Gb;return{...r0,timeMode:n0};case"UPDATE_TIME_ELAPSED":return{...r0,timeElapsed:e0.elapsed};case"SET_MEDIA":return{...r0};case"SET_VOLUME":return{...r0,volume:e0.volume};case"SET_BALANCE":return{...r0,balance:e0.balance};case"TOGGLE_REPEAT":return{...r0,repeat:!r0.repeat};case"TOGGLE_SHUFFLE":return{...r0,shuffle:!r0.shuffle};default:return r0}},network:(r0={connected:!0},e0)=>{switch(e0.type){case"NETWORK_CONNECTED":return{...r0,connected:!0};case"NETWORK_DISCONNECTED":return{...r0,connected:!1};default:return r0}},tracks:(r0=VE,e0)=>{switch(e0.type){case"ADD_TRACK_FROM_URL":return{...r0,[e0.id]:{id:e0.id,defaultName:e0.defaultName||null,duration:e0.duration??null,url:e0.url,mediaTagsRequestStatus:Ob}};case"SET_MEDIA":{const p0={...r0[e0.id],duration:e0.length};return{...r0,[e0.id]:p0}}case"MEDIA_TAG_REQUEST_INITIALIZED":return{...r0,[e0.id]:{...r0[e0.id],mediaTagsRequestStatus:Ob}};case"MEDIA_TAG_REQUEST_FAILED":return{...r0,[e0.id]:{...r0[e0.id],mediaTagsRequestStatus:"FAILED"}};case"SET_MEDIA_DURATION":return{...r0,[e0.id]:{...r0[e0.id],duration:e0.duration}};case"SET_MEDIA_TAGS":const n0=r0[e0.id],{sampleRate:a0,bitrate:i0,numberOfChannels:s0,title:o0,artist:l0,album:c0,albumArtUrl:u0}=e0,{kbps:d0,khz:h0,channels:f0}=n0;return{...r0,[e0.id]:{...n0,mediaTagsRequestStatus:"COMPLETE",title:o0,artist:l0,album:c0,albumArtUrl:u0,kbps:i0!=null?PE(i0):d0,khz:a0!=null?QE(a0):h0,channels:s0??f0}};default:return r0}},milkdrop:(r0=jE,e0)=>{switch(e0.type){case"SET_MILKDROP_DESKTOP":return{...r0,display:e0.enabled?"DESKTOP":"WINDOW"};case"SET_MILKDROP_FULLSCREEN":return{...r0,display:e0.enabled?"FULLSCREEN":"WINDOW"};case"GOT_BUTTERCHURN":return{...r0,butterchurn:e0.butterchurn};case"GOT_BUTTERCHURN_PRESETS":return{...r0,presets:r0.presets.concat(e0.presets)};case"PRESET_REQUESTED":return e0.addToHistory?{...r0,presetHistory:[...r0.presetHistory,e0.index]}:{...r0,presetHistory:r0.presetHistory.slice(0,-1)};case"RESOLVE_PRESET_AT_INDEX":const n0=r0.presets[e0.index];return{...r0,presets:hE(r0.presets,e0.index,{type:"RESOLVED",name:n0.name,preset:e0.json})};case"SELECT_PRESET_AT_INDEX":return{...r0,currentPresetIndex:e0.index,transitionType:e0.transitionType};case"TOGGLE_PRESET_OVERLAY":return{...r0,overlay:!r0.overlay};case"TOGGLE_RANDOMIZE_PRESETS":return{...r0,randomize:!r0.randomize};case"TOGGLE_PRESET_CYCLING":return{...r0,cycling:!r0.cycling};case"SCHEDULE_MILKDROP_MESSAGE":return{...r0,message:{text:e0.message,time:Date.now()}};default:return r0}}}),YE={height:"2px",borderWidth:0,color:"gray",backgroundColor:"gray"},HE=r0=>ga.jsx("font",{...r0}),JE=r0=>ga.jsx("hr",{...r0}),WE=r0=>ga.jsx("div",{...r0}),qE=r0=>ga.jsx("table",{...r0}),ZE=r0=>ga.jsxs(ga.Fragment,{children:[ga.jsxs(WE,{align:"center",children:[ga.jsx(WE,{className:"para2",align:"center",children:ga.jsx("p",{children:"WINAMP"})}),ga.jsx(WE,{className:"para1",align:"center",children:ga.jsx("p",{children:"playlist"})})]}),ga.jsx(JE,{align:"left",width:"90%",size:"1",color:"#FFBF00",style:YE}),ga.jsx(WE,{align:"right",children:ga.jsx(qE,{border:"0",cellSpacing:"0",cellPadding:"0",width:"98%",children:ga.jsx("tbody",{children:ga.jsx("tr",{children:ga.jsxs("td",{children:[ga.jsx("small",{children:ga.jsxs("small",{children:[ga.jsx(HE,{face:"Arial",color:"#FFBF00",children:r0.numberOfTracks}),ga.jsx(HE,{color:"#409FFF",face:"Arial",children:" track in playlist, average track length: "}),ga.jsx(HE,{face:"Arial",color:"#FFBF00",children:r0.averageTrackLength})]})}),ga.jsx("br",{}),ga.jsx("small",{children:ga.jsxs("small",{children:[ga.jsx(HE,{color:"#409FFF",face:"Arial",children:"Playlist length: "}),ga.jsx(HE,{face:"Arial",color:"#FFBF00",children:r0.playlistLengthMinutes}),ga.jsx(HE,{color:"#409FFF",face:"Arial",children:" minutes "}),ga.jsx(HE,{face:"Arial",color:"#FFBF00",children:r0.playlistLengthSeconds}),ga.jsx(HE,{color:"#409FFF",face:"Arial",children:" second "}),ga.jsx("br",{}),ga.jsxs(HE,{color:"#409FFF",face:"Arial",children:["Right-click ",ga.jsx("a",{href:"./",children:"here"})," to save this HTML file."]})]})})]})})})})}),ga.jsxs("blockquote",{children:[ga.jsx("p",{children:ga.jsx(HE,{color:"#FFBF00",face:"Arial",children:ga.jsx("big",{children:"Playlist files:"})})}),ga.jsx("ul",{children:ga.jsx(HE,{face:"Arial",color:"#FFFFFF",children:ga.jsx("small",{children:r0.tracks.map(e0=>ga.jsxs("span",{children:[e0,ga.jsx("br",{})]},e0))})})})]}),ga.jsx(JE,{align:"left",width:"90%",size:"1",color:"#FFBF00",style:YE})]}),XE=r0=>r0.equalizer.sliders,$E=IE(XE,r0=>({presets:[{name:"Entry1",preamp:oE(r0.preamp),hz60:oE(r0[60]),hz170:oE(r
7630[170]),hz310:oE(r0[310]),hz600:oE(r0[600]),hz1000:oE(r0[1e3]),hz3000:oE(r0[3e3]),hz6000:oE(r0[6e3]),hz12000:oE(r0[12e3]),hz14000:oE(r0[14e3]),hz16000:oE(r0[16e3])}],type:"Winamp EQ library file v1.1"})),ey=r0=>r0.tracks,ty=r0=>e0=>{var n0;return(n0=r0.tracks[e0])==null?void 0:n0.url},ny=r0=>r0.playlist.trackOrder,ay=IE(ny,r0=>r0.length),ry=IE(ey,ny,(r0,e0)=>e0.filter(n0=>r0[n0])),iy=IE(ey,ny,(r0,e0)=>e0.map(n0=>r0[n0]).filter(Boolean)),Ay=IE(ey,ny,(r0,e0)=>e0.map(n0=>{const a0=r0[n0];return{url:a0.url,metaData:{artist:a0.artist||"",title:a0.title||"",album:a0.album,albumArtUrl:a0.albumArtUrl||""}}})),sy=IE(ey,ry,(r0,e0)=>e0.map(n0=>r0[n0])),oy=r0=>r0.playlist.selectedTracks,ly=IE(oy,r0=>new Set(r0)),cy=IE(sy,ly,(r0,e0)=>r0.filter(n0=>e0.has(n0.id))),uy=r0=>r0.reduce((e0,n0)=>e0+Number(n0.duration),0),dy=IE(sy,uy),hy=IE(cy,uy),py=IE(dy,hy,(r0,e0)=>`${qb(e0)}/${qb(r0)}`),fy=r0=>{const{playlist:e0}=r0;return e0.currentTrack==null?-1:e0.trackOrder.indexOf(e0.currentTrack)},gy=IE(fy,r0=>r0+1),my=r0=>r0.playlist.currentTrack,wy=r0=>r0.windows.genWindows,by=IE(wy,r0=>e0=>r0[e0].open),Ey=IE(function(r0){return r0.milkdrop.display==="WINDOW"},r0=>e0=>e0===Ub&&!r0),yy=IE(wy,r0=>e0=>r0[e0].shade),ky=IE(wy,r0=>e0=>r0[e0].size),vy=IE(wy,r0=>fE(r0,e0=>e0.position)),Sy=IE(ky,r0=>{const e0=r0("playlist");return Math.floor((58+29*e0[1])/13)}),Iy=IE(ay,Sy,(r0,e0)=>Math.max(0,r0-e0)),Cy=r0=>r0.display.playlistScrollPosition,xy=IE(Iy,Cy,(r0,e0)=>r0===0?0:Math.round(Math.round(r0*e0/100)/r0*100)),Ty=IE(Cy,ay,Sy,(r0,e0,n0)=>{const a0=Math.max(0,e0-n0);return iE(r0/100,a0+1)}),By=IE(Ty,ny,Sy,(r0,e0,n0)=>e0.slice(r0,r0+n0));function Uy(r0){return By(r0).length===r0.playlist.trackOrder.length}const My=IE(By,r0=>e0=>r0.includes(e0));IE(By,ey,(r0,e0)=>r0.map(n0=>e0[n0]));const Ny=r0=>{const{playlist:e0,tracks:n0}=r0;if(e0.currentTrack==null)return null;const a0=n0[e0.currentTrack];return a0&&a0.duration},Dy=IE(ey,r0=>{let e0,n0;return a0=>(a0!==e0&&(e0=a0,n0=((i0,s0=null)=>{if(s0==null)return null;const o0=i0[s0];return o0==null?null:FE(o0)})(r0,a0)),n0)}),Oy=IE(my,Dy,(r0,e0)=>e0(r0)),Ly=r0=>r0.media.status,_y=IE(Ly,r0=>{switch(r0){case"PLAYING":case"PAUSED":return r0;case"STOPPED":case"ENDED":case"CLOSED":return"STOPPED";default:throw new Error(`Unknown media status: ${r0}`)}}),Ry=r0=>r0.media.status===jb,zy=IE(my,ey,(r0,e0)=>r0==null?null:e0[r0]),Fy=IE(Ry,zy,(r0,e0)=>r0&&e0&&e0.mediaTagsRequestStatus!==Ob?e0.id:null),Qy=IE(zy,r0=>r0==null?null:{url:r0.url,metaData:{title:r0.title||null,artist:r0.artist||null,album:r0.album||null,albumArtUrl:r0.albumArtUrl||null}}),Py=IE(gy,Oy,(r0,e0)=>e0==null?null:`${r0}. ${e0}`),Vy=IE(Py,Ny,(r0,e0)=>r0==null?null:`${r0} (${qb(e0)})`),Gy=r0=>ny(r0).length,jy=IE(ey,r0=>Object.values(r0).reduce((e0,n0)=>e0+(n0.duration||0),0)),Ky=IE(Gy,jy,ny,ey,Dy,(r0,e0,n0,a0,i0)=>{return s0={numberOfTracks:r0,averageTrackLength:qb(e0/r0),playlistLengthMinutes:Math.floor(e0/60),playlistLengthSeconds:Math.floor(e0%60),tracks:n0.map((l0,c0)=>`${c0+1}. ${i0(l0)} (${qb(a0[l0].duration)})`)},o0=(l0=>{const c0=document.createElement("div"),u0=jm.createRoot(c0);return dr.flushSync(()=>{u0.render(ga.jsx(ZE,{...l0}))}),` 764 <html> 765 <head> 766 <link rel="stylesheet" href="null" /> 767 <style type="text/css"> 768 body { background: #000040; } 769 .para1 { margin-top: -42px; margin-left: 145px; margin-right: 10px; font-family: "font2, Arial"; font-size: 30px; line-height: 35px; text-align: left; color: #E1E1E1; } 770 .para2 { margin-top: 15px; margin-left: 15px; margin-right: 50px; font-family: "font1, Arial Black"; font-size: 50px; line-height: 40px; text-align: left; color: #004080; } 771 </style> 772 <title>Winamp Generated PlayList</title> 773 </head> 774 <body bgcolor="#000080" topmargin="0" leftmargin="0" text="#FFFFFF"> 775 ${c0.innerHTML} 776 </body 777 </html>`})(s0),`data:text/html;base64,${window.btoa(o0)}`;var s0,o0});function Yy(r0,e0){const[n0,a0]=r0.size,i0=e0&&r0.canDouble?2:1,s0=116+29*a0,o0=275+25*n0;return{height:(r0.shade?14:s0)*i0,width:o0*i0}}function Hy(r0){return r0.windows.focused}function Jy(r0){return r0.display.doubled}function Wy(r0){return r0.display.llama}function qy(r0){return r0.display.zIndex}const Zy=IE(wy,Jy,(r0,e0)=>fE(r0,n0=>Yy(n0,e0))),Xy=IE(Zy,r0=>e0=>
777r0[e0]),$y=IE(r0=>r0.windows.windowOrder,wy,(r0,e0)=>[xb,...r0.filter(n0=>n0!==xb&&e0[n0]!=null)]),ek=IE(Zy,vy,$y,(r0,e0,n0)=>n0.map(a0=>({key:a0,...r0[a0],...e0[a0]}))),tk=IE(ek,function(r0){const e0={},n0={};for(const i0 of r0){const s0=i0.y+i0.height;e0[s0]?e0[s0].push(i0):e0[s0]=[i0];const o0=i0.x+i0.width;n0[o0]?n0[o0].push(i0):n0[o0]=[i0]}const a0={};for(const i0 of r0){const s0={},o0=i0.y,l0=i0.x,c0=e0[o0],u0=n0[l0];if(c0)for(const d0 of c0){const h0=d0.x+d0.width<i0.x,f0=d0.x>i0.x+i0.width;if(!h0&&!f0){s0.below=d0.key;break}}if(u0)for(const d0 of u0){const h0=d0.y+d0.height<i0.y,f0=d0.y>i0.y+i0.height;if(!h0&&!f0){s0.right=d0.key;break}}a0[i0.key]=s0}return a0}),nk={normal:"#00FF00",current:"#FFFFFF",normalbg:"#000000",selectedbg:"#0000C6",font:"Arial"};function ak(r0){return r0.display.skinColors}const rk=r0=>r0.display.skinPlaylistStyle||nk,ik=r0=>{const e0=r0.windows.genWindows[Ub];return e0!=null&&e0.open?Qb:UE(r0.display)},Ak=r0=>r0.media.volume,sk=r0=>r0.media.balance,ok=r0=>r0.media.shuffle,lk=r0=>r0.media.repeat,ck=IE(zy,r0=>r0!=null&&r0.channels||null),uk=r0=>r0.media.timeElapsed;function dk(r0){return r0.equalizer.on}function hk(r0){return r0.windows.browserWindowSize}const pk=IE(wy,r0=>{return e0=r0,n0=a0=>a0.open,Object.keys(e0).reduce((a0,i0)=>(n0(e0[i0])&&(a0[i0]=e0[i0]),a0),{});var e0,n0}),fk=IE(pk,Jy,(r0,e0)=>{let n0=0;return fE(r0,a0=>{const i0={x:0,y:n0};return n0+=Yy(a0,e0).height,i0})}),gk=r0=>r0.userInput.focus,mk=r0=>r0.userInput.scrubPosition,wk=r0=>{const e0="Winamp 2.91";if(r0.userInput.userMessage!=null)return r0.userInput.userMessage;switch(gk(r0)){case"balance":return(i0=>{if(i0===0)return"Balance: Center";const s0=i0>0?"Right":"Left";return`Balance: ${Math.abs(i0)}% ${s0}`})(r0.media.balance);case"volume":return`Volume: ${r0.media.volume}%`;case"position":const n0=Ny(r0);return n0==null?e0:((i0,s0)=>`Seek to: ${qb(i0*s0/100,!1)}/${qb(i0,!1)} (${s0}%)`)(n0,mk(r0));case"double":return(r0.display.doubled?"Disable":"Enable")+" doublesize mode";case"eq":const a0=r0.userInput.bandFocused;return a0==null?e0:((i0,s0)=>{const o0=(l0=(s0-50)/50*12,(Math.round(10*l0)/10).toFixed(1));var l0,c0;return`EQ: ${i0==="preamp"?"Preamp":(c0=i0)<1e3?`${c0}HZ`:c0/1e3+"KHZ"} ${(u0=>u0>0?`+${u0}`:u0.toString())(Number(o0))} DB`})(a0,r0.equalizer.sliders[a0])}if(r0.playlist.currentTrack!=null){const n0=Vy(r0);return n0??e0}return e0},bk=IE(zy,r0=>r0!=null?r0.kbps||"0".padStart(3," "):null),Ek=IE(zy,r0=>r0!=null?r0.khz||"0".padStart(2," "):null);function yk(r0){return r0.milkdrop.message}function kk(r0){return r0.windows.milkdropEnabled}function vk(r0){return r0.milkdrop.display==="DESKTOP"}function Sk(r0){return r0.milkdrop.display==="FULLSCREEN"}function Ik(r0){return r0.milkdrop.butterchurn}function Ck(r0){return r0.milkdrop.transitionType}function xk(r0){return r0.milkdrop.currentPresetIndex}function Tk(r0){const e0=xk(r0);if(e0==null)return null;const n0=r0.milkdrop.presets[e0];return n0==null||n0.type==="UNRESOLVED"?null:n0.preset}function Bk(r0){return r0.milkdrop.presets.map(e0=>e0.name)}function Uk(r0){return r0.milkdrop.overlay}function Mk(r0){return r0.milkdrop.cycling}function Nk(r0){return r0.milkdrop.randomize}function Dk(r0){return r0.display.closed}function Ok(r0){return r0.display.skinRegion}const Lk=IE(function(r0){return r0.display.skinImages.EQ_PREAMP_LINE},async r0=>r0==null?null:Jb(r0)),_k=IE(function(r0){return r0.display.skinImages.EQ_GRAPH_LINE_COLORS},async r0=>r0==null?null:Jb(r0));function Rk(r0){return r0.display.marqueeStep}function zk(r0){return r0.network.connected}function Fk(r0){return r0.media.timeMode}function Qk(r0){return r0.display.loading}function Pk(r0){return r0.display.working}function Vk(r0){return r0.settings.availableSkins}const Gk=15,jk=r0=>r0.y,Kk=r0=>r0.y+r0.height,Yk=r0=>r0.x,Hk=r0=>r0.x+r0.width,Jk=(r0,e0)=>Math.abs(r0-e0)<Gk,Wk=(r0,e0)=>{let n0,a0;return((i0,s0)=>jk(i0)<=Kk(s0)+Gk&&jk(s0)<=Kk(i0)+Gk)(r0,e0)&&(Jk(Yk(r0),Hk(e0))?n0=Hk(e0):Jk(Hk(r0),Yk(e0))?n0=Yk(e0)-r0.width:Jk(Yk(r0),Yk(e0))?n0=Yk(e0):Jk(Hk(r0),Hk(e0))&&(n0=Hk(e0)-r0.width)),((i0,s0)=>Yk(i0)<=Hk(s0)+Gk&&Yk(s0)<=Hk(i0)+Gk)(r0,e0)&&(Jk(jk(r0),Kk(e0))?a0=Kk(e0):Jk(Kk(r0),jk(e0))?a0=jk(e0)-r0.height:Jk(jk(r0),jk(e0))?a0=jk(e0):Jk(Kk(r0),Kk(e0))&&(a0=Kk(e0)-r0.height)),{x:n0,y:a0}},qk=(r0,e0)=>{const n0=Wk(r0,e0);return{x:n0.x===void 0?0:n0.x-r0.x,y:n0.y===void 0?0:n0.y-r0.y}},Zk=(r0,e0)=>{let n0=0,a0=0;for(const i0 of r0)for(const s0 of e0){const o0=qk(i0,s0);if(n0=n0||o0.x,a0=a0||o0.y,n0!==void 0&&n0>0&&a0!==void 0&&a0>0)break}return{x:n0,y:a0}},Xk=(r0,e0)=>({x:r0.x+e0.x,y:r0.y+e0.y});function $k(r0){return(e0,n0)=>{const a0=n0(),i0=tk(a0),s0=Zy(a0);e0(r0);const o0=Zy(n0()),l0={};for(const u0 of Object.keys(o0)){const d0=s0[u0],h0=o0[u0];l0[u0]={height:h0.height-d0.height,width:h0.width-d0.width}}const c0=function(u0,d0){const h0={},f0={};for(const m0 of Object.keys(u0))h0[m0]={above:[],left:[]},f0[m0]={x:0,y:0};
777for(const[m0,x0]of Object.entries(u0)){const{below:g0,right:y0}=x0;y0!=null&&h0[y0].left.push(m0),g0!=null&&h0[g0].above.push(m0)}function p0(m0){const x0=h0[m0],g0=d0[m0];x0.left.forEach(y0=>{f0[y0].x+=g0.width+f0[m0].x,p0(y0)})}function A0(m0){const x0=h0[m0],g0=d0[m0];x0.above.forEach(y0=>{f0[y0].y+=g0.height+f0[m0].y,A0(y0)})}for(const[m0,x0]of Object.entries(u0))x0.below==null&&A0(m0),x0.right==null&&p0(m0);return f0}(i0,l0);e0(ov(fE(vy(a0),(u0,d0)=>Xk(u0,c0[d0]))))}}function ev(){return $k({type:"TOGGLE_DOUBLESIZE_MODE"})}function tv(){return $k({type:"TOGGLE_WINDOW_SHADE_MODE",windowId:"equalizer"})}function nv(){return $k({type:"TOGGLE_WINDOW_SHADE_MODE",windowId:"main"})}function av(){return $k({type:"TOGGLE_WINDOW_SHADE_MODE",windowId:"playlist"})}function rv(r0){return{type:"CLOSE_WINDOW",windowId:r0}}function iv(r0){return{type:"SET_FOCUSED_WINDOW",window:r0}}function Av(r0,e0){return{type:"WINDOW_SIZE_CHANGED",windowId:r0,size:e0}}function sv(r0){return{type:"TOGGLE_WINDOW",windowId:r0}}function ov(r0,e0){return{type:"UPDATE_WINDOW_POSITIONS",positions:r0,absolute:e0}}function lv({left:r0,top:e0,width:n0,height:a0}){return(i0,s0)=>{const o0=s0(),l0=ek(o0),c0=by(o0),u0=gE(l0.filter(m0=>c0(m0.key)));if(u0==null)return;const d0=u0.bottom-u0.top,h0=u0.right-u0.left,f0=Math.ceil(r0-u0.left+(n0-h0)/2),p0=Math.ceil(e0-u0.top+(a0-d0)/2),A0=l0.reduce((m0,x0)=>({...m0,[x0.key]:{x:f0+x0.x,y:p0+x0.y}}),{});i0(ov(A0,!0))}}function cv(r0,e0){return n0=>{n0({type:"BROWSER_WINDOW_SIZE_CHANGED",...r0}),n0(function(a0){return(i0,s0)=>{const o0=s0(),l0=ek(o0),c0=by(o0),{height:u0,width:d0}=a0===document.body?wE():mE(a0),h0=gE(l0.filter(A0=>c0(A0.key)));if(h0==null)return;const f0=vy(o0);if(h0.left>=0&&h0.top>=0&&h0.right<=d0&&h0.bottom<=u0)return;const p0=h0.bottom-h0.top;if(h0.right-h0.left<=d0&&p0<=u0){let A0=0,m0=0;h0.top<=0?A0=h0.top:h0.bottom>u0&&(A0=h0.bottom-u0),h0.left<=0?m0=h0.left:h0.right>d0&&(m0=h0.right-d0),i0(ov(fE(f0,x0=>({x:x0.x-m0,y:x0.y-A0}))))}else i0({type:"RESET_WINDOW_SIZES"}),i0(uv()),i0(function(A0){const m0=A0===document.body,{width:x0,height:g0}=m0?{width:window.innerWidth,height:window.innerHeight}:mE(A0);return lv({left:m0?window.scrollX:0,top:m0?window.scrollY:0,width:x0,height:g0})}(a0))}}(e0))}}function uv(){return(r0,e0)=>{r0(ov(fk(e0())))}}const dv=["hz60","hz170","hz310","hz600","hz1000","hz3000","hz6000","hz12000","hz14000","hz16000","preamp"],hv="Winamp EQ library file v1.1",pv={a:[0,0],b:[0,1],c:[0,2],d:[0,3],e:[0,4],f:[0,5],g:[0,6],h:[0,7],i:[0,8],j:[0,9],k:[0,10],l:[0,11],m:[0,12],n:[0,13],o:[0,14],p:[0,15],q:[0,16],r:[0,17],s:[0,18],t:[0,19],u:[0,20],v:[0,21],w:[0,22],x:[0,23],y:[0,24],z:[0,25],'"':[0,26],"@":[0,27]," ":[0,30],0:[1,0],1:[1,1],2:[1,2],3:[1,3],4:[1,4],5:[1,5],6:[1,6],7:[1,7],8:[1,8],9:[1,9],[Lb]:[1,10],".":[1,11],":":[1,12],"(":[1,13],")":[1,14],"-":[1,15],"'":[1,16],"!":[1,17],_:[1,18],"+":[1,19],"\\":[1,20],"/":[1,21],"[":[1,22],"]":[1,23],"^":[1,24],"&":[1,25],"%":[1,26],",":[1,27],"=":[1,28],$:[1,29],"#":[1,30],Ã
:[2,0],Ã:[2,1],Ã:[2,2],"?":[2,3],"*":[2,4],"<":[1,22],">":[1,23],"{":[1,22],"}":[1,23]},fv=r0=>`CHARACTER_${r0.charCodeAt(0)}`,gv=[];for(const r0 in pv)if(pv.hasOwnProperty(r0)){const e0=pv[r0];gv.push({name:fv(r0),y:6*e0[0],x:5*e0[1],width:5,height:6})}const mv={BALANCE:[{name:"MAIN_BALANCE_BACKGROUND",x:9,y:0,width:38,height:420},{name:"MAIN_BALANCE_THUMB",x:15,y:422,width:14,height:11},{name:"MAIN_BALANCE_THUMB_ACTIVE",x:0,y:422,width:14,height:11}],CBUTTONS:[{name:"MAIN_PREVIOUS_BUTTON",x:0,y:0,width:23,height:18},{name:"MAIN_PREVIOUS_BUTTON_ACTIVE",x:0,y:18,width:23,height:18},{name:"MAIN_PLAY_BUTTON",x:23,y:0,width:23,height:18},{name:"MAIN_PLAY_BUTTON_ACTIVE",x:23,y:18,width:23,height:18},{name:"MAIN_PAUSE_BUTTON",x:46,y:0,width:23,height:18},{name:"MAIN_PAUSE_BUTTON_ACTIVE",x:46,y:18,width:23,height:18},{name:"MAIN_STOP_BUTTON",x:69,y:0,width:23,height:18},{name:"MAIN_STOP_BUTTON_ACTIVE",x:69,y:18,width:23,height:18},{name:"MAIN_NEXT_BUTTON",x:92,y:0,width:23,height:18},{name:"MAIN_NEXT_BUTTON_ACTIVE",x:92,y:18,width:22,height:18},{name:"MAIN_EJECT_BUTTON",x:114,y:0,width:22,height:16},{name:"MAIN_EJECT_BUTTON_ACTIVE",x:114,y:16,width:22,height:16}],MAIN:[{name:"MAIN_WINDOW_BACKGROUND",x:0,y:0,width:275,height:116}],MONOSTER:[{name:"MAIN_STEREO",x:0,y:12,width:29,height:12},{name:"MAIN_STEREO_SELECTED",x:0,y:0,width:29,height:12},{name:"MAIN_MONO",x:29,y:12,width:27,height:12},{name:"MAIN_MONO_SELECTED",x:29,y:0,width:27,height:12}],NUMBERS:[{name:"NO_MINUS_SIGN",x:9,y:6,width:5,height:1},{name:"MINUS_SIGN",x:20,y:6,width:5,height:1},{name:"DIGIT_0",x:0,y:0,width:9,height:13},{name:"DIGIT_1",x:9,y:0,width:9,height:13},{name:"DIGIT_2",x:18,y:0,width:9,height:13},{name:"DIGIT_3",x:27,y:0,width:9,height:13},{name:"DIGIT_4",x:36,y:0,width:9,height:13},{name:"DIGIT_5",x:45,y:0,width:9,height:13},{name:"DIGIT_6",x:54,y:0,width:9,height:13},{name:"DIGIT_7",x:63,y:0,width:9,height:13},{name:"DIGIT_8",x:72,y:0,width:9,height:13},{name:"DIGIT_9",x:81,y:0,width:9,height:13}],NUMS_EX:[{name:"NO_MINUS_SIGN_EX",x:90,y:0,width:9,height:13},{name:"MINUS_SIGN_EX",x:99,y:0,width:9,height:13},{name:"DIGIT_0_EX",x:0,y:0,width:9,height:13}
777,{name:"DIGIT_1_EX",x:9,y:0,width:9,height:13},{name:"DIGIT_2_EX",x:18,y:0,width:9,height:13},{name:"DIGIT_3_EX",x:27,y:0,width:9,height:13},{name:"DIGIT_4_EX",x:36,y:0,width:9,height:13},{name:"DIGIT_5_EX",x:45,y:0,width:9,height:13},{name:"DIGIT_6_EX",x:54,y:0,width:9,height:13},{name:"DIGIT_7_EX",x:63,y:0,width:9,height:13},{name:"DIGIT_8_EX",x:72,y:0,width:9,height:13},{name:"DIGIT_9_EX",x:81,y:0,width:9,height:13}],PLAYPAUS:[{name:"MAIN_PLAYING_INDICATOR",x:0,y:0,width:9,height:9},{name:"MAIN_PAUSED_INDICATOR",x:9,y:0,width:9,height:9},{name:"MAIN_STOPPED_INDICATOR",x:18,y:0,width:9,height:9},{name:"MAIN_NOT_WORKING_INDICATOR",x:36,y:0,width:9,height:9},{name:"MAIN_WORKING_INDICATOR",x:39,y:0,width:9,height:9}],PLEDIT:[{name:"PLAYLIST_TOP_TILE",x:127,y:21,width:25,height:20},{name:"PLAYLIST_TOP_LEFT_CORNER",x:0,y:21,width:25,height:20},{name:"PLAYLIST_TITLE_BAR",x:26,y:21,width:100,height:20},{name:"PLAYLIST_TOP_RIGHT_CORNER",x:153,y:21,width:25,height:20},{name:"PLAYLIST_TOP_TILE_SELECTED",x:127,y:0,width:25,height:20},{name:"PLAYLIST_TOP_LEFT_SELECTED",x:0,y:0,width:25,height:20},{name:"PLAYLIST_TITLE_BAR_SELECTED",x:26,y:0,width:100,height:20},{name:"PLAYLIST_TOP_RIGHT_CORNER_SELECTED",x:153,y:0,width:25,height:20},{name:"PLAYLIST_LEFT_TILE",x:0,y:42,width:12,height:29},{name:"PLAYLIST_RIGHT_TILE",x:31,y:42,width:20,height:29},{name:"PLAYLIST_BOTTOM_TILE",x:179,y:0,width:25,height:38},{name:"PLAYLIST_BOTTOM_LEFT_CORNER",x:0,y:72,width:125,height:38},{name:"PLAYLIST_BOTTOM_RIGHT_CORNER",x:126,y:72,width:150,height:38},{name:"PLAYLIST_VISUALIZER_BACKGROUND",x:205,y:0,width:75,height:38},{name:"PLAYLIST_SHADE_BACKGROUND",x:72,y:57,width:25,height:14},{name:"PLAYLIST_SHADE_BACKGROUND_LEFT",x:72,y:42,width:25,height:14},{name:"PLAYLIST_SHADE_BACKGROUND_RIGHT",x:99,y:57,width:50,height:14},{name:"PLAYLIST_SHADE_BACKGROUND_RIGHT_SELECTED",x:99,y:42,width:50,height:14},{name:"PLAYLIST_SCROLL_HANDLE_SELECTED",x:61,y:53,width:8,height:18},{name:"PLAYLIST_SCROLL_HANDLE",x:52,y:53,width:8,height:18},{name:"PLAYLIST_ADD_URL",x:0,y:111,width:22,height:18},{name:"PLAYLIST_ADD_URL_SELECTED",x:23,y:111,width:22,height:18},{name:"PLAYLIST_ADD_DIR",x:0,y:130,width:22,height:18},{name:"PLAYLIST_ADD_DIR_SELECTED",x:23,y:130,width:22,height:18},{name:"PLAYLIST_ADD_FILE",x:0,y:149,width:22,height:18},{name:"PLAYLIST_ADD_FILE_SELECTED",x:23,y:149,width:22,height:18},{name:"PLAYLIST_REMOVE_ALL",x:54,y:111,width:22,height:18},{name:"PLAYLIST_REMOVE_ALL_SELECTED",x:77,y:111,width:22,height:18},{name:"PLAYLIST_CROP",x:54,y:130,width:22,height:18},{name:"PLAYLIST_CROP_SELECTED",x:77,y:130,width:22,height:18},{name:"PLAYLIST_REMOVE_SELECTED",x:54,y:149,width:22,height:18},{name:"PLAYLIST_REMOVE_SELECTED_SELECTED",x:77,y:149,width:22,height:18},{name:"PLAYLIST_REMOVE_MISC",x:54,y:168,width:22,height:18},{name:"PLAYLIST_REMOVE_MISC_SELECTED",x:77,y:168,width:22,height:18},{name:"PLAYLIST_INVERT_SELECTION",x:104,y:111,width:22,height:18},{name:"PLAYLIST_INVERT_SELECTION_SELECTED",x:127,y:111,width:22,height:18},{name:"PLAYLIST_SELECT_ZERO",x:104,y:130,width:22,height:18},{name:"PLAYLIST_SELECT_ZERO_SELECTED",x:127,y:130,width:22,height:18},{name:"PLAYLIST_SELECT_ALL",x:104,y:149,width:22,height:18},{name:"PLAYLIST_SELECT_ALL_SELECTED",x:127,y:149,width:22,height:18},{name:"PLAYLIST_SORT_LIST",x:154,y:111,width:22,height:18},{name:"PLAYLIST_SORT_LIST_SELECTED",x:177,y:111,width:22,height:18},{name:"PLAYLIST_FILE_INFO",x:154,y:130,width:22,height:18},{name:"PLAYLIST_FILE_INFO_SELECTED",x:177,y:130,width:22,height:18},{name:"PLAYLIST_MISC_OPTIONS",x:154,y:149,width:22,height:18},{name:"PLAYLIST_MISC_OPTIONS_SELECTED",x:177,y:149,width:22,height:18},{name:"PLAYLIST_NEW_LIST",x:204,y:111,width:22,height:18},{name:"PLAYLIST_NEW_LIST_SELECTED",x:227,y:111,width:22,height:18},{name:"PLAYLIST_SAVE_LIST",x:204,y:130,width:22,height:18},{name:"PLAYLIST_SAVE_LIST_SELECTED",x:227,y:130,width:22,height:18},{name:"PLAYLIST_LOAD_LIST",x:204,y:149,width:22,height:18},{name:"PLAYLIST_LOAD_LIST_SELECTED",x:227,y:149,width:22,height:18},{name:"PLAYLIST_ADD_MENU_BAR",x:48,y:111,width:3,height:54},{name:"PLAYLIST_REMOVE_MENU_BAR",x:100,y:111,width:3,height:72},{name:"PLAYLIST_SELECT_MENU_BAR",x:150,y:111,width:3,height:54},{name:"PLAYLIST_MISC_MENU_BAR",x:200,y:111,width:3,height:54},{name:"PLAYLIST_LIST_BAR",x:250,y:111,width:3,height:54},{name:"PLAYLIST_CLOSE_SELECTED",x:52,y:42,width:9,height:9},{name:"PLAYLIST_COLLAPSE_SELECTED",x:62,y:42,width:9,height:9},{name:"PLAYLIST_EXPAND_SELECTED",x:150,y:42,width:9,height:9}],EQ_EX:[{name:"EQ_SHADE_BACKGROUND_SELECTED",x:0,y:0,width:275,height:14},{name:"EQ_SHADE_BACKGROUND",x:0,y:15,width:275,height:14},{name:"EQ_SHADE_VOLUME_SLIDER_LEFT",x:1,y:30,width:3,height:7},{name:"EQ_SHADE_VOLUME_SLIDER_CENTER",x:4,y:30,width:3,height:7},{name:"EQ_SHADE_VOLUME_SLIDER_RIGHT",x:7,y:30,width:3,height:7},{name:"EQ_SHADE_BALANCE_SLIDER_LEFT",x:11,y:30,width:3,height:7},{name:"EQ_SHADE_BALANCE_SLIDER_CENTER",x:14,y:30,width:3,height:7},{name:"EQ_SHADE_BALANCE_SLIDER_RIGHT",x:17,y:30,width:3,height:7},{name:"EQ_MAXIMIZE_BUTTON_ACTIVE",x:1,y:38,width:9,height:9},{name:"EQ_MINIMIZE_BUTTON_ACTIVE",x:1,y:47,width:9,height:9},{name:"EQ_SHADE_CLOSE_BUTTON",x:11,y:38,width:9,height:9},{name:"EQ_SHADE_CLOSE_BUTTON_ACTIVE",x:11,y:47,width:9,height:9}],EQMAIN:[{name:"EQ_WINDOW_BACKGROUND",x:0,y:0,width:275,height:116},{name:"EQ_TITLE_BAR",x:0,y:149,width:275,height:14},{name:"EQ_TITLE_BAR_SELECTED",x:0,y:134,width:275,height:14},{name:"EQ_SLIDER_BACKGROUND",x:13,y:164,width:209,height:129},{name:"EQ_SLIDER_THUMB",x:0,y:164,width:11,height:11},{name:"EQ_SLIDER_THUMB_SELECTED",x:0,y:176,width:11,height:11},{name:"EQ_CLOSE_BUTTON",x:0,y:116,width:9,height:9},{name:"EQ_CLOSE_BUTTON_ACTIVE",x:0,y:125,width:9,height:9},{name:"EQ_MAXIMIZE_BUTTON_ACTIVE_FALLBACK",x:254,y:152,width:9,height:9},{name:"EQ_ON_BUTTON",x:10,y:119,width:26,height:12},{name:"EQ_ON_BUTTON_DEPRESSED",x:128,y:119,width:26,height:12},{name:"EQ_ON_BUTTON_SELECTED",x:69,y:119,width:26,height:12},{name:"EQ_ON_BUTTON_SELECTED_DEPRESSED",x:187,y:119,width:26,height:12},{name:"EQ_AUTO_BUTTON",x:36,y:119,width:32,height:12},{name:"EQ_AUTO_BUTTON_DEPRESSED",x:154,y:119,width:32,height:12},{name:"EQ_AUTO_BUTTON_SELECTED",x:95,y:119,width:32,height:12},{name:"EQ_AUTO_BUTTON_SELECTED_DEPRESSED",x:213,y:119,width:32,height:12},{name:"EQ_GRAPH_BACKGROUND",x:0,y:294,width:113,height:19},{name:"EQ_GRAPH_LINE_COLORS",x:115,y:294,width:1,height:19},{name:"EQ_PRESETS_BUTTON",x:224,y:164,width:44,height:12},{name:"EQ_PRESETS_BUTTON_SELECTED",x:224,y:176,width:44,height:12},{name:"EQ_PREAMP_LINE",x:0,y:314,width:113,height:1}],POSBAR:[{name:"MAIN_POSITION_SLIDER_BACKGROUND",x:0,y:0,width:248,height:10},{name:"MAIN_POSITION_SLIDER_THUMB",x:248,y:0,width:29,height:10},{name:"MAIN_POSITION_SLIDER_THUMB_SELECTED",x:278,y:0,width:29,height:10}],SHUFREP:[{name:"MAIN_SHUFFLE_BUTTON",x:28,y:0,width:47,height:15},{name:"MAIN_SHUFFLE_BUTTON_DEPRESSED",x:28,y:15,width:47,height:15},{name:"MAIN_SHUFFLE_BUTTON_SELECTED",x:28,y:30,width:47,height:15},{name:"MAIN_SHUFFLE_BUTTON_SELECTED_DEPRESSED",x:28,y:45,width:47,height:15},{name:"MAIN_REPEAT_BUTTON",x:0,y:0,width:28,height:15},{name:"MAIN_REPEAT_BUTTON_DEPRESSED",x:0,y:15,width:28,height:15},{name:"MAIN_REPEAT_BUTTON_SELECTED",x:0,y:30,width:28,height:15},{name:"MAIN_REPEAT_BUTTON_SELECTED_DEPRESSED",x:0,y:45,width:28,height:15},{name:"MAIN_EQ_BUTTON",x:0,y:61,width:23,height:12},{name:"MAIN_EQ_BUTTON_SELECTED",x:0,y:73,width:23,height:12},{name:"MAIN_EQ_BUTTON_DEPRESSED",x:46,y:61,width:23,height:12},{name:"MAIN_EQ_BUTTON_DEPRESSED_SELECTED",x:46,y:73,width:23,height:12},{name:"MAIN_PLAYLIST_BUTTON",x:23,y:61,width:23,height:12},{name:"MAIN_PLAYLIST_BUTTON_SELECTED",x:23,y:73,width:23,height:12},{name:"MAIN_PLAYLIST_BUTTON_DEPRESSED",x:69,y:61,width:23,height:12},{name:"MAIN_PLAYLIST_BUTTON_DEPRESSED_SELECTED",x:69,y:73,width:23,height:12}],TEXT:gv,TITLEBAR:[{name:"MAIN_TITLE_BAR",x:27,y:15,width:275,height:14},{name:"MAIN_TITLE_BAR_SELECTED",x:27,y:0,width:275,height:14},{name:"MAIN_EASTER_EGG_TITLE_BAR",x:27,y:72,width:275,height:14},{name:"MAIN_EASTER_EGG_TITLE_BAR_SELECTED",x:27,y:57,width:275,height:14},{name:"MAIN_OPTIONS_BUTTON",x:0,y:0,width:9,height:9},{name:"MAIN_OPTIONS_BUTTON_DEPRESSED",x:0,y:9,width:9,height:9},{name:"MAIN_MINIMIZE_BUTTON",x:9,y:0,width:9,height:9},{name:"MAIN_MINIMIZE_BUTTON_DEPRESSED",x:9,y:9,width:9,height:9},{name:"MAIN_SHADE_BUTTON",x:0,y:18,width:9,height:9},{name:"MAIN_SHADE_BUTTON_DEPRESSED",x:9,y:18,width:9,height:9},{name:"MAIN_CLOSE_BUTTON",x:18,y:0,width:9,height:9},{name:"MAIN_CLOSE_BUTTON_DEPRESSED",x:18,y:9,width:9,height:9},{name:"MAIN_CLUTTER_BAR_BACKGROUND",x:304,y:0,width:8,height:43},{name:"MAIN_CLUTTER_BAR_BACKGROUND_DISABLED",x:312,y:0,width:8,height:43},{name:"MAIN_CLUTTER_BAR_BUTTON_O_SELECTED",x:304,y:47,width:8,height:8},{name:"MAIN_CLUTTER_BAR_BUTTON_A_SELECTED",x:312,y:55,width:8,height:7},{name:"MAIN_CLUTTER_BAR_BUTTON_I_SELECTED",x:320,y:62,width:8,height:7},{name:"MAIN_CLUTTER_BAR_BUTTON_D_SELECTED",x:328,y:69,width:8,height:8},{name:"MAIN_CLUTTER_BAR_BUTTON_V_SELECTED",x:336,y:77,width:8,height:7},{name:"MAIN_SHADE_BACKGROUND",x:27,y:42,width:275,height:14},{name:"MAIN_SHADE_BACKGROUND_SELECTED",x:27,y:29,width:275,height:14},{name:"MAIN_SHADE_BUTTON_SELECTED",x:0,y:27,width:9,height:9},{name:"MAIN_SHADE_BUTTON_SELECTED_DEPRESSED",x:9,y:27,width:9,height:9},{name:"MAIN_SHADE_POSITION_BACKGROUND",x:0,y:36,width:17,height:7},{name:"MAIN_SHADE_POSITION_THUMB",x:20,y:36,width:3,height:7},{name:"MAIN_SHADE_POSITION_THUMB_LEFT",x:17,y:36,width:3,height:7},{name:"MAIN_SHADE_POSITION_THUMB_RIGHT",x:23,y:36,width:3,height:7}],VOLUME:[{name:"MAIN_VOLUME_BACKGROUND",x:0,y:0,width:68,height:420},{name:"MAIN_VOLUME_THUMB",x:15,y:422,width:14,height:11},{name:"MAIN_VOLUME_THUMB_SELECTED",x:0,y:422,width:14,height:11}],GEN:[{name:"GEN_TOP_LEFT_SELECTED",x:0,y:0,width:25,height:20},{name:"GEN_TOP_LEFT_END_SELECTED",x:26,y:0,width:25,height:20},{name:"GEN_TOP_CENTER_FILL_SELECTED",x:52,y:0,width:25,height:20},{name:"GEN_TOP_RIGHT_END_SELECTED",x:78,y:0,width:25,height:20},{name:"GEN_TOP_LEFT_RIGHT_FILL_SELECTED",x:104,y:0,width:25,height:20},{name:"GEN_TOP_RIGHT_SELECTED",x:130,y:0,width:25,height:20},{name:"GEN_TOP_LEFT",x:0,y:21,width:25,height:20},{name:"GEN_TOP_LEFT_END",x:26,y:21,width:25,height:20},{name:"GEN_TOP_CENTER_FILL",x:52,y:21,width:25,height:20},{name:"GEN_TOP_RIGHT_END",x:78,y:21,width:25,height:20},{name:"GEN_TOP_LEFT_RIGHT_FILL",x:104,y:21,width:25,height:20},{name:"GEN_TOP_RIGHT",x:130,y:21,width:25,height:20},{name:"GEN_BOTTOM_LEFT",x:0,y:42,width:125,height:14},{name:"GEN_BOTTOM_RIGHT",x:0,y:57,width:125,height:14},{name:"GEN_BOTTOM_FILL",x:127,y:72,width:25,height:14},{name:"GEN_MIDDLE_LEFT",x:127,y:42,width:11,height:29},{name:"GEN_MIDDLE_LEFT_BOTTOM",x:158,y:42,width:11,height:24},{name:"GEN_MIDDLE_RIGHT",x:139,y:42,width:8,height:29},{name:"GEN_MIDDLE_RIGHT_BOTTOM",x:170,y:42,width:8,height:24},{name:"GEN_CLOSE_SELECTED",x:148,y:42,width:9,height:9}]};function wv(r0,e0){return new RegExp(`^(.*[/\\\\])?${r0}.(${e0})$`,"i")}async function bv(r0,e0,n0,a0){const i0=r0.file(wv(e0,n0));if(!i0.length)return null;const s0=i0[i0.length-1];try{return{contents:await s0.async(a0),name:s0.name}}catch{return null}}function Ev(r0,e0){const n0=document.createElement("canvas"),a0=n0.getContext("2d",{willReadFrequently:!0});if(a0==null)throw new Error("Failed to get canvas context");const i0={};
777return e0.forEach(s0=>{n0.height=s0.height,n0.width=s0.width,a0.drawImage(r0,-s0.x,-s0.y);const o0=n0.toDataURL();i0[s0.name]=o0}),i0}async function yv(r0,e0){const n0=await bv(r0,e0,"(png|bmp)","blob");if(!n0)return null;const a0=`image/${(i0=>{const s0=/\.([a-z]{3,4})$/i.exec(i0);return s0?s0[1].toLowerCase():null})(n0.name)||"*"}`;return async function(i0){try{return await window.createImageBitmap(i0)}catch{try{return await function(o0){return Jb(URL.createObjectURL(o0))}(i0)}catch{return null}}}(new Blob([n0.contents],{type:a0}))}const kv="RIFF".split("").map(r0=>r0.charCodeAt(0));async function vv(r0,e0){const n0=await bv(r0,e0,"CUR","uint8array");if(n0==null)return null;const a0=n0.contents;return i0=a0,kv.every((s0,o0)=>i0[o0]===s0)?{type:"ani",aniData:a0}:{type:"cur",url:zE(a0)};var i0}async function Sv(r0){const e0=r0.file(wv("PLEDIT","txt"))[0];if(e0==null)return Rb.playlistStyle;const n0=await e0.async("text");if(n0==null)return Rb.playlistStyle;const a0=n0&&$b(n0).text;return a0?(["normal","current","normalbg","selectedbg","mbFG","mbBG"].forEach(i0=>{let s0=a0[i0];s0&&(s0[0]!=="#"&&(s0=`#${s0}`),a0[i0]=s0.slice(0,7))}),{...Rb.playlistStyle,...a0}):Rb.playlistStyle}async function Iv(r0){const e0=await yv(r0,"GENEX");if(e0==null)return null;const n0=document.createElement("canvas"),a0=n0.getContext("2d",{willReadFrequently:!0});if(a0==null)return null;n0.width=e0.width,n0.height=e0.height,a0.drawImage(e0,0,0);const i0=s0=>`rgb(${a0.getImageData(s0,0,1,1).data.slice(0,3).join(",")})`;
777return{itemBackground:i0(48),itemForeground:i0(50),windowBackground:i0(52),buttonText:i0(54),windowText:i0(56),divider:i0(58),playlistSelection:i0(60),listHeaderBackground:i0(62),listHeaderText:i0(64),listHeaderFrameTopAndLeft:i0(66),listHeaderFrameBottomAndRight:i0(68),listHeaderFramePressed:i0(70),listHeaderDeadArea:i0(72),scrollbarOne:i0(74),scrollbarTwo:i0(76),pressedScrollbarOne:i0(78),pressedScrollbarTwo:i0(80),scrollbarDeadArea:i0(82),listTextHighlighted:i0(84),listTextHighlightedBackground:i0(86),listTextSelected:i0(88),listTextSelectedBackground:i0(90)}}const Cv=r0=>r0.reduce((e0,n0)=>Object.assign(e0,n0),{}),xv=["CLOSE","EQCLOSE","EQNORMAL","EQSLID","EQTITLE","MAINMENU","MMENU","MIN","NORMAL","PCLOSE","PNORMAL","POSBAR","PSIZE","PTBAR","PVSCROLL","PWINBUT","PWSNORM","PWSSIZE","SONGNAME","TITLEBAR","VOLBAL","WINBUT","WSNORMAL","WSPOSBAR"];async function Tv(r0){const e0=await bv(r0,"VISCOLOR","txt","text");return e0?(n0=>{const a0=n0.split(` 778`),i0=/^\s*(\d+)\s*,?\s*(\d+)\s*,?\s*(\d+)/,s0=[...Rb.colors];return a0.map(o0=>i0.exec(o0)).filter(Boolean).map(o0=>o0.slice(1,4).join(",")).forEach((o0,l0)=>{s0[l0]=`rgb(${o0})`}),s0})(e0.contents):Rb.colors}async function Bv(r0){const e0=await Promise.all(Object.keys(mv).map(n0=>async function(a0,i0){const s0=await yv(a0,i0);return s0==null?{}:Ev(s0,mv[i0])}(r0,n0)));return Cv(e0)}async function Uv(r0){const e0=await Promise.all(xv.map(async n0=>({[n0]:await vv(r0,n0)})));return Cv(e0)}async function Mv(r0){const e0=await bv(r0,"REGION","txt","text");return e0?function(n0){const a0=$b(n0),i0={};
778return Object.keys(a0).forEach(s0=>{const{numpoints:o0,pointlist:l0}=a0[s0];if(!o0||!l0)return;const c0=o0.split(/\s*,\s*/).filter(f0=>f0!==""),u0=function(f0){const p0=[];for(let A0=0;A0<f0.length;A0+=2)p0.push(`${f0[A0]},${f0[A0+1]}`);return p0}(l0.split(/\s*[, ]\s*/).filter(f0=>f0!==""));let d0=0;const h0=c0.map(f0=>{const p0=Number(f0);if(p0<3)return d0+=p0,null;const A0=u0.slice(d0,d0+p0).join(" ");return A0.length?(d0+=p0,A0):null}).filter(f0=>f0!=null);h0.length&&(i0[s0]=h0)}),i0}(e0.contents):{}}async function Nv(r0){const e0=await yv(r0,"GEN");if(e0==null)return null;const n0=document.createElement("canvas"),a0=n0.getContext("2d",{willReadFrequently:!0});n0.width=e0.width,n0.height=e0.height,a0.drawImage(e0,0,0);const i0=(l0,c0)=>{const u0=f0=>a0.getImageData(f0,l0,1,1).data.join(",");let d0=1;const h0=u0(0);return _b.map(f0=>{let p0=d0;for(;u0(p0)!==h0&&p0<n0.width;)p0++;const A0={x:d0,y:l0,height:7,width:p0-d0,name:`${c0}_${f0}`};return d0=p0+1,A0})},s0={},o0=[...i0(88,"GEN_TEXT_SELECTED"),...i0(96,"GEN_TEXT")];return o0.forEach(l0=>{s0[l0.name]=l0.width}),[s0,Ev(e0,o0)]}class Dv{constructor(e0=[],n0=(a0,i0)=>a0<i0?-1:a0>i0?1:0){if(this.data=e0,this.length=this.data.length,this.compare=n0,this.length>0)for(let a0=(this.length>>1)-1;a0>=0;a0--)this._down(a0)}push(e0){this.data.push(e0),this._up(this.length++)}pop(){if(this.length===0)return;const e0=this.data[0],n0=this.data.pop();return--this.length>0&&(this.data[0]=n0,this._down(0)),e0}peek(){return this.data[0]}_up(e0){const{data:n0,compare:a0}=this,i0=n0[e0];for(;e0>0;){const s0=e0-1>>1,o0=n0[s0];if(a0(i0,o0)>=0)break;n0[e0]=o0,e0=s0}n0[e0]=i0}_down(e0){const{data:n0,compare:a0}=this,i0=this.length>>1,s0=n0[e0];for(;e0<i0;){let o0=1+(e0<<1);const l0=o0+1;if(l0<this.length&&a0(n0[l0],n0[o0])<0&&(o0=l0),a0(n0[o0],s0)>=0)break;n0[e0]=n0[o0],e0=o0}n0[e0]=s0}}function Ov(){return(r0,e0)=>{const n0=e0();if(cy(n0).length===0)return;const a0=oy(n0),{playlist:{trackOrder:i0}}=n0;r0({type:"REMOVE_TRACKS",ids:i0.filter(s0=>!a0.has(s0))})}}function Lv(){return(r0,e0)=>{r0({type:"REMOVE_TRACKS",ids:Array.from(oy(e0()))})}}function _v(){return r0=>{r0({type:"STOP"}),r0({type:"REMOVE_ALL_TRACKS"})}}function Rv(){return{type:"REVERSE_LIST"}}function zv(){return{type:"RANDOMIZE_LIST"}}function Fv(){return(r0,e0)=>{const n0=e0(),a0=ey(n0),i0=(s0=ny(n0),o0=l0=>`${a0[l0].title}`.toLowerCase(),[...s0].sort((l0,c0)=>{const u0=o0(l0),d0=o0(c0);return u0<d0?-1:u0>d0?1:0}));var s0,o0;return r0({type:"SET_TRACK_ORDER",trackOrder:i0})}}function Qv(r0){return{type:"SET_PLAYLIST_SCROLL_POSITION",position:r0}}function Pv(r0){return(e0,n0)=>{const a0=n0(),i0=Iy(a0),s0=Ty(a0);return e0({type:"SET_PLAYLIST_SCROLL_POSITION",position:100*(i0?eE((s0+r0)/i0,0,1):0)})}}function Vv(r0){return r0.preventDefault(),(e0,n0)=>{const a0=n0();Iy(a0)&&r0.stopPropagation();const i0=13*a0.playlist.trackOrder.length,s0=r0.deltaY/i0*100;e0({type:"SET_PLAYLIST_SCROLL_POSITION",position:eE(a0.display.playlistScrollPosition+s0,0,100)})}}function Gv(){return Pv(-4)}function jv(){return Pv(4)}function Kv(r0){return(e0,n0)=>{const a0=n0(),i0=ey(a0),s0=ny(a0),o0=ly(a0),l0=s0.findIndex(f0=>i0[f0]&&o0.has(f0));if(l0===-1)return;const c0=function(f0,p0){for(let A0=f0.length-1;A0>=0;A0--)if(p0(f0[A0]))return A0;return-1}(s0,f0=>i0[f0]&&o0.has(f0));if(c0===-1)throw new Error("We found a first selected, but not a last selected.");const u0=-l0,d0=s0.length-1-c0,h0=eE(r0,u0,d0);h0!==0&&e0({type:"DRAG_SELECTED",offset:h0})}}function Yv(){return{type:"INVERT_SELECTION"}}function Hv(){return{type:"SELECT_ZERO"}}function Jv(){return{type:"SELECT_ALL"}}function Wv(r0){return r0<55&&r0>45?50:r0}function qv(r0,e0){return{type:"SET_BAND_VALUE",band:r0,value:Wv(e0)}}function Zv(r0){return e0=>{Object.values(Cb).forEach(n0=>{e0({type:"SET_BAND_VALUE",value:r0,band:n0})})}}function Xv(){return Zv(100)}function $v(){return Zv(50)}function eS(){return Zv(0)}function tS(r0){return{type:"SET_BAND_VALUE",band:"preamp",value:Wv(r0)}}function nS(){return(r0,e0)=>{e0().equalizer.on?r0({type:"SET_EQ_OFF"}):r0({type:"SET_EQ_ON"})}}function aS(){return r0=>{r0({type:"SET_EQ_AUTO",value:!1})}}const rS=new class{constructor({threads:r0}){this._queue=new Dv([],(e0,n0)=>e0.priority()-n0.priority()),this._availableThreads=r0}push(r0,e0){const n0={task:r0,priority:e0};return this._queue.push(n0),setTimeout(()=>{this._run()},0),()=>{this._queue=this._queue.filter(a0=>a0!==n0)}}_run(){for(;this._availableThreads>0;){if(this._queue.length===0)return;this._availableThreads--;const r0=this._queue.pop().task();LE(typeof r0.then=="function",`LoadQueue only supports loading Promises. Got ${r0}`),r0.then(()=>{this._availableThreads++,this._run()})}}}({threads:4});function iS(r0,e0,n0){return gS(Array.from(r0).map(a0=>({blob:a0,defaultName:a0.name})),e0,n0)}const AS=new RegExp("(wsz|zip)$","i"),sS=new RegExp("eqf$","i");function oS(r0,e0=Nb,n0=void 0){return a0=>
778{if(!(r0.length<1)){if(r0.length===1){const i0=r0[0];if(AS.test(i0.name))return void a0(lS(i0));if(sS.test(i0.name))return void a0(function(s0){return async o0=>{const l0=await async function(u0){return LE(u0!=null,"Attempt to get an ArrayBuffer without assigning a fileReference"),new Promise((d0,h0)=>{const f0=new FileReader;f0.onload=()=>{d0(f0.result)},f0.onerror=h0,f0.readAsArrayBuffer(u0)})}(s0),c0=function(u0){const d0={type:"",presets:[]};let h0=0;const f0=new Int8Array(u0);if(d0.type=String.fromCharCode.apply(null,Array.from(f0.slice(h0,27))),d0.type!==hv)throw new Error("Invalid .eqf file.");for(h0+=27,h0+=4;h0<f0.length;){const p0={},A0=h0,m0=A0+257;for(;f0[h0]!==0&&h0<=m0;)h0++;p0.name=String.fromCharCode.apply(null,Array.from(f0.slice(A0,h0))),h0=m0,dv.forEach(x0=>{p0[x0]=64-f0[h0++]}),d0.presets.push(p0)}return d0}(l0);o0(wS(c0.presets[0]))}}(i0))}a0(iS(r0,e0,n0))}}}function lS(r0){return async(e0,n0,{requireJSZip:a0})=>{if(!a0)return void alert("Webamp has not been configured to support custom skins.");let i0;e0({type:"LOADING"});try{i0=await a0()}catch{return e0({type:"LOADED"}),void alert("Failed to load the skin parser.")}try{const s0=await async function(o0,l0){const c0=await l0.loadAsync(o0),[u0,d0,h0,f0,p0,A0,m0]=await Promise.all([Tv(c0),Sv(c0),Bv(c0),Uv(c0),Mv(c0),Nv(c0),Iv(c0)]),[x0,g0]=A0||[null,{}];return{colors:u0,playlistStyle:d0,images:{...h0,...g0},genLetterWidths:x0,cursors:f0,region:p0,genExColors:m0}}(r0,i0);e0({type:"SET_SKIN_DATA",data:{skinImages:s0.images,skinColors:s0.colors,skinPlaylistStyle:s0.playlistStyle,skinCursors:s0.cursors,skinRegion:s0.region,skinGenLetterWidths:s0.genLetterWidths,skinGenExColors:s0.genExColors}})}catch{e0({type:"LOADED"}),alert("Failed to parse skin")}}}function cS(r0){return async e0=>{e0({type:"LOADING"});try{const n0=await fetch(r0);if(!n0.ok)throw new Error(n0.statusText);e0(lS(n0.blob()))}catch{e0({type:"LOADED"}),alert(`Failed to download skin from ${r0}`)}}}function uS(r0,e0){return async n0=>{var i0;const a0=await RE({accept:r0});n0({type:"OPENED_FILES",expectedType:e0,count:a0.length,firstFileName:(i0=a0[0])==null?void 0:i0.name}),n0(oS(a0))}}function dS(){return uS(".eqf","EQ")}function hS(){return uS(null,"MEDIA")}function pS(){return uS(".zip, .wsz","SKIN")}function fS(r0,e0=Db,n0=0){const{files:a0}=r0.dataTransfer;return async(i0,s0,{handleTrackDropEvent:o0})=>{if(o0){const l0=await o0(r0);if(l0!=null)return void i0(gS(l0,e0,n0))}i0(oS(a0,e0,n0))}}function gS(r0,e0=Db,n0=0){return a0=>{e0===Nb&&a0(i0=>{i0({type:"STOP"}),i0({type:"REMOVE_ALL_TRACKS"})}),r0.forEach((i0,s0)=>{a0(function(o0,l0=Db,c0=0){return u0=>{const d0=pE++,{defaultName:h0,metaData:f0,duration:p0}=o0;let A0;if("url"in o0)A0=o0.url.toString();else{if(!("blob"in o0))throw new Error("Expected track to have either a blob or a url");A0=URL.createObjectURL(o0.blob)}switch(u0({type:"ADD_TRACK_FROM_URL",url:A0,duration:o0.duration,defaultName:h0,id:d0,atIndex:c0}),l0){case Mb:u0({type:"BUFFER_TRACK",id:d0});break;case Nb:u0({type:"PLAY_TRACK",id:d0});break;default:u0(p0!=null?{type:"SET_MEDIA_DURATION",duration:p0,id:d0}:function(m0,x0){return(g0,y0)=>{rS.push(async()=>{try{const b0=await function(E0){return LE(typeof E0=="string","Attempted to get the duration of media file without passing a url"),new Promise((w0,v0)=>{const S0=document.createElement("audio");S0.crossOrigin="anonymous";const k0=()=>{w0(S0.duration),S0.removeEventListener("durationchange",k0),S0.removeEventListener("error",R0),S0.src=""},R0=j0=>{S0.removeEventListener("durationchange",k0),S0.removeEventListener("error",R0),v0(j0)};S0.addEventListener("durationchange",k0),S0.addEventListener("error",R0),S0.src=E0})}(m0);g0({type:"SET_MEDIA_DURATION",duration:b0,id:x0})}catch{}},()=>My(y0())(x0)?5:15)}}(A0,d0))}if(f0!=null){const{artist:m0,title:x0,album:g0}=f0;u0({type:"SET_MEDIA_TAGS",artist:m0,title:x0,album:g0,sampleRate:44e3,bitrate:192e3,numberOfChannels:2,id:d0})}else u0("blob"in o0?mS(o0.blob,d0):function(m0){return(x0,g0)=>{const y0=ey(g0())[m0];rS.push(()=>x0(mS(y0.url,m0)),()=>My(g0())(m0)?10:20)}}(d0))}}(i0,s0===0?e0:Db,n0+s0))})}}function mS(r0,e0){return async(n0,a0,{requireMusicMetadata:i0})=>{n0({type:"MEDIA_TAG_REQUEST_INITIALIZED",id:e0});try{const s0=await async function(A0,m0){LE(A0!=null,"Attempted to get the tags of media file without passing a file");const x0={duration:!0,skipPostHeaders:!0};if(typeof A0=="string"){if("parseWebStream"in m0&&typeof m0.parseWebStream=="function"){const g0=await fetch(A0);if(!g0.ok)throw new Error(`Failed to fetch URL: ${A0}, status: ${g0.status}`);const y0=g0.body;if(y0==null)throw new Error("Response body is null, cannot parse metadata.");return m0.parseWebStream(y0,void 0,x0)}if("fetchFromUrl"in m0&&typeof m0.fetchFromUrl=="function")return m0.fetchFromUrl(A0,x0);throw new Error("No suitable method available to parse URL")}return m0.parseBlob(A0,x0)}(r0,await i0()),{artist:o0,title:l0,album:c0,picture:u0}=s0.common,{numberOfChannels:d0,bitrate:h0,sampleRate:f0}=s0.format;let p0=null;if(u0&&u0.length>=1){const A0=new Uint8Array(u0[0].data),m0=new Blob([A0],{type:u0[0].format});p0=URL.createObjectURL(m0)}n0({type:"SET_MEDIA_TAGS",artist:o0||"",title:l0||"",album:c0,albumArtUrl:p0,numberOfChannels:d0,bitrate:h0,sampleRate:f0,id:e0})}catch{n0({type:"MEDIA_TAG_REQUEST_FAILED",id:e0})}}}function wS(r0){return e0=>{e0(tS(sE(r0.preamp))),Cb.forEach(n0=>{e0(qv(n0,sE(r0[`hz${n0}`])))})}}function bS(){return(r0,e0)=>{const n0=e0(),a0=function(s0){const o0=[];for(let l0=0;l0<27;l0++)o0.push(hv.charCodeAt(l0));o0.push(26);for(let l0=0;l0<3;l0++)o0.push("!--".charCodeAt(l0));if(!s0.presets)throw new Error("Eqf data is missing presets");
778return s0.presets.forEach(l0=>{let c0=0;for(;c0<l0.name.length;c0++)o0.push(l0.name.charCodeAt(c0));for(;c0<257;c0++)o0.push(0);dv.forEach(u0=>{o0.push(64-l0[u0])})}),new Uint8Array(o0).buffer}($E(n0)),i0=(s0=>tE(new Uint8Array(s0)))(a0);nE(`data:application/zip;base64,${i0}`,"entry.eqf")}}function ES(){return(r0,e0)=>{nE(Ky(e0()),"Winamp Playlist.html")}}let yS=document.createElement("input");yS.type="file";const kS=yS.webkitdirectory!==void 0||yS.mozdirectory!==void 0||yS.directory!==void 0;function vS(r0){return async e0=>{e0(iS(await RE(),Db,r0))}}function SS(r0){return async e0=>{kS?e0(iS(await RE({directory:!0}),Db,r0)):alert("Not supported in your browser")}}function IS(r0=0){return async(e0,n0,{handleAddUrlEvent:a0})=>{if(a0){const i0=await a0();if(i0!=null)return void e0(gS(i0,Db,r0))}else alert("Not supported in Webamp")}}function CS(){return async(r0,e0,{handleLoadListEvent:n0})=>{if(n0){const a0=await n0();if(a0!=null)return r0(i0=>{i0({type:"STOP"}),i0({type:"REMOVE_ALL_TRACKS"})}),void r0(gS(a0,Db,0))}else alert("Not supported in Webamp")}}function xS(){return(r0,e0,{handleSaveListEvent:n0})=>{n0?n0(Ay(e0())):alert("Not supported in Webamp")}}function TS(r0,e0){return n0=>{var a0;return n0({type:"DROPPED_FILES",count:r0.dataTransfer.files.length,firstFileName:(a0=r0.dataTransfer.files[0])==null?void 0:a0.name,windowId:e0})}}function BS(r0){return(e0,n0)=>{const a0=n0();e0(_y(a0)===Kb?{type:"BUFFER_TRACK",id:r0}:{type:"PLAY_TRACK",id:r0})}}function US(r0){return{type:"PLAY_TRACK",id:r0}}function MS(){return(r0,e0)=>{const n0=e0();n0.media.status===Kb&&n0.playlist.currentTrack==null&&n0.playlist.trackOrder.length===0?r0(hS()):r0({type:"PLAY"})}}function NS(){return(r0,e0)=>{const{status:n0}=e0().media;r0(n0===jb?{type:"PAUSE"}:{type:"PLAY"})}}function DS(){return{type:"STOP"}}function OS(r0){return(e0,n0)=>{const a0=((i0,s0=1)=>{const{playlist:{trackOrder:o0},media:{repeat:l0,shuffle:c0}}=i0;if(c0)return(f0=>{const{playlist:{trackOrder:p0,currentTrack:A0}}=f0;if(p0.length===0)return null;let m0;do m0=p0[Math.floor(p0.length*Math.random())];while(m0===A0&&p0.length>1);return m0})(i0);const u0=ay(i0);if(u0===0)return null;const d0=fy(i0);let h0=d0+s0;return l0?(h0%=u0,h0<0&&(h0+=u0),o0[h0]):d0===u0-1&&s0>0||d0===0&&s0<0?null:(h0=eE(h0,0,u0-1),o0[h0])})(n0(),r0);e0(a0!=null?BS(a0):{type:"IS_STOPPED"})}}function LS(){return OS(1)}function _S(){return OS(-1)}function RS(r0){return function(e0,n0){const a0=n0(),i0=Ny(a0);i0!=null&&e0({type:"SEEK_TO_PERCENT_COMPLETE",percent:r0/i0*100})}}function zS(r0){return function(e0,n0){e0(RS(uk(n0())+r0))}}function FS(r0){return zS(-r0)}function QS(r0){return{type:"SET_VOLUME",volume:eE(r0,0,100)}}function PS(r0){return(e0,n0)=>e0(QS(n0().media.volume+r0))}function VS(r0){return r0.preventDefault(),(e0,n0)=>e0(QS(n0().media.volume+r0.deltaY))}function GS(r0){return r0=eE(r0,-100,100),Math.abs(r0)<25&&(r0=0),{type:"SET_BALANCE",balance:r0}}function jS(){return{type:"TOGGLE_REPEAT"}}function KS(){return{type:"TOGGLE_SHUFFLE"}}function YS(){return{type:"TOGGLE_TIME_MODE"}}function HS(r0){const{name:e0}=r0;if("butterchurnPresetObject"in r0)return{type:"RESOLVED",name:e0,preset:r0.butterchurnPresetObject};if("getButterchrunPresetObject"in r0)return{type:"UNRESOLVED",name:e0,getPreset:r0.getButterchrunPresetObject};if("butterchurnPresetUrl"in r0)return{type:"UNRESOLVED",name:e0,getPreset:async()=>(await fetch(r0.butterchurnPresetUrl)).json()};throw new Error("Invalid preset object")}function JS(r0){return(e0,n0)=>{const a0=n0(),i0=a0.milkdrop.presets.length;e0({type:"GOT_BUTTERCHURN_PRESETS",presets:r0}),i0===0&&Nk(a0)?e0(XS()):e0($S(i0,GE.IMMEDIATE,!0))}}function WS(r0){return async(e0,n0,{convertPreset:a0})=>{e0(JS(Array.from(r0).map(i0=>{const s0=i0.name.toLowerCase();if(s0.endsWith(".milk")){if(a0==null)throw new Error("Invalid type");return{type:"UNRESOLVED",name:i0.name.slice(0,i0.name.length-5),getPreset:()=>a0(i0)}}return s0.endsWith(".json")?{type:"UNRESOLVED",name:i0.name.slice(0,i0.name.length-5),getPreset:async()=>{const o0=await _E(i0);return JSON.parse(o0)}}:null}
778).filter(Boolean)))}}function qS(r0=GE.DEFAULT){return(e0,n0)=>{const a0=n0();if(Nk(a0))return e0(XS(r0));const i0=xk(a0);i0!=null&&e0($S(i0+1,r0,!0))}}function ZS(r0=GE.DEFAULT){return(e0,n0)=>{const a0=n0(),{presetHistory:i0}=a0.milkdrop;i0.length<1||e0($S(i0[i0.length-2],r0,!1))}}function XS(r0=GE.DEFAULT){return(e0,n0)=>{const a0=n0();e0($S(Math.floor(Math.random()*a0.milkdrop.presets.length),r0,!0))}}function $S(r0,e0,n0){return async(a0,i0)=>{const s0=i0().milkdrop.presets[r0];if(s0!=null)switch(a0({type:"PRESET_REQUESTED",index:r0,addToHistory:n0}),s0.type){case"RESOLVED":return void a0({type:"SELECT_PRESET_AT_INDEX",index:r0,transitionType:e0});case"UNRESOLVED":const o0=await s0.getPreset();return a0({type:"RESOLVE_PRESET_AT_INDEX",index:r0,json:o0}),void a0({type:"SELECT_PRESET_AT_INDEX",index:r0,transitionType:e0})}}}function eI(r0){return WS(r0.dataTransfer.files)}function tI(){return{type:"TOGGLE_RANDOMIZE_PRESETS"}}function nI(){return{type:"TOGGLE_PRESET_CYCLING"}}function aI(r0){return{type:"SCHEDULE_MILKDROP_MESSAGE",message:r0}}function rI(){return r0=>{let e0=!1;r0({type:"CLOSE_REQUESTED",cancel:()=>{e0=!0}}),e0||(r0({type:"STOP"}),r0({type:"CLOSE_WINAMP"}))}}function iI(){return{type:"TOGGLE_VISUALIZER_STYLE"}}function AI(){return{type:"MINIMIZE_WINAMP"}}function sI(r0){return{type:"SET_FOCUS",input:r0}}function oI(){return{type:"UNSET_FOCUS"}}function lI(r0){return{type:"SET_BAND_FOCUS",input:"eq",bandFocused:r0}}function cI(){return{type:"LOAD_DEFAULT_SKIN"}}function uI(){return(r0,e0)=>{vk(e0())?r0({type:"SET_MILKDROP_DESKTOP",enabled:!1}):r0({type:"SET_MILKDROP_DESKTOP",enabled:!0})}}function dI(r0){return{type:"SET_MILKDROP_FULLSCREEN",enabled:r0}}function hI(){return(r0,e0)=>{r0(dI(!Sk(e0())))}}function pI(){return(r0,e0)=>{Uk(e0())&&r0(iv(Ub)),r0({type:"TOGGLE_PRESET_OVERLAY"})}}function fI(){return{type:"STEP_MARQUEE"}}yS=null;var gI=r0=>e0=>{const{media:{volume:n0,balance:a0},equalizer:{sliders:i0}}=e0.getState();return r0.setVolume(n0),r0.setBalance(a0),r0.setPreamp(i0.preamp),r0.on("timeupdate",()=>{e0.dispatch({type:"UPDATE_TIME_ELAPSED",elapsed:r0.timeElapsed()})}),r0.on("ended",()=>{e0.dispatch(LS())}),r0.on("playing",()=>{e0.dispatch({type:"IS_PLAYING"})}),r0.on("waiting",()=>{e0.dispatch({type:"START_WORKING"})}),r0.on("stopWaiting",()=>{e0.dispatch({type:"STOP_WORKING"})}),r0.on("fileLoaded",()=>{const s0=my(e0.getState());s0!=null&&e0.dispatch({id:s0,type:"SET_MEDIA",kbps:"128",khz:"44",channels:2,length:r0.duration()})}),s0=>o0=>{const l0=s0(o0),c0=e0.getState();switch(o0.type){case"PLAY":r0.play();break;case"PAUSE":r0.pause();break;case"STOP":r0.stop();break;case"SET_VOLUME":r0.setVolume(Ak(c0));break;case"SET_BALANCE":r0.setBalance(sk(c0));break;case"SEEK_TO_PERCENT_COMPLETE":r0.seekToPercentComplete(o0.percent);break;case"PLAY_TRACK":{const u0=ty(e0.getState())(o0.id);u0!=null&&r0.loadFromUrl(u0,!0);break}case"BUFFER_TRACK":{const u0=ty(e0.getState())(o0.id);u0!=null&&r0.loadFromUrl(u0,!1);break}case"SET_BAND_VALUE":o0.band==="preamp"?r0.setPreamp(o0.value):r0.setEqBand(o0.band,o0.value);break;case"SET_EQ_OFF":r0.disableEq();break;case"SET_EQ_ON":r0.enableEq()}return l0}},S5;const mI=typeof window<"u"&&((S5=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__)==null?void 0:S5.call(window,{actionsDenylist:["UPDATE_TIME_ELAPSED","STEP_MARQUEE"]}))||Ib;function wI(r0,e0,n0=[],a0,i0){let s0;a0&&(s0=lE(KE(void 0,{type:"@@init"}),a0));const o0=[(c0=i0,({dispatch:u0,getState:d0})=>h0=>f0=>typeof f0=="function"?f0(u0,d0,c0):h0(f0)),gI(r0),()=>u0=>d0=>(e0.trigger(d0.type,d0),u0(d0)),...n0],l0=mI(function(...u0){return d0=>(h0,f0)=>{const p0=d0(h0,f0);let A0=()=>{throw new Error(Eb(15))};const m0={getState:p0.getState,dispatch:(g0,...y0)=>A0(g0,...y0)},x0=u0.map(g0=>g0(m0));return A0=Ib(...x0)(p0.dispatch),{...p0,dispatch:A0}}}(...o0));var c0;return function(u0,d0,h0){return Sb(u0,d0,h0)}(KE,s0,l0)}function bI(r0){const{onChange:e0,enabled:n0}=r0,a0=nr.useRef(null);return nr.useEffect(()=>{function i0(){e0&&e0(document.fullscreenElement===a0.current)}return document.addEventListener("fullscreenchange",i0),()=>{document.removeEventListener("fullscreenchange",i0)}},[e0]),nr.useLayoutEffect(()=>
778{const i0=document.fullscreenElement===a0.current;var s0;i0&&!n0?document.fullscreenEnabled&&document.exitFullscreen():!i0&&n0&&a0.current!=null&&(s0=a0.current,document.fullscreenEnabled&&s0.requestFullscreen())},[n0]),ga.jsx("div",{ref:a0,style:r0.enabled?{height:"100%",width:"100%"}:void 0,children:r0.children})}function EI(r0){const[e0,n0]=nr.useState(null);return nr.useEffect(()=>{let a0=!1;return r0.then(i0=>{a0||n0(i0)}),()=>{a0=!0}},[r0]),e0}const yI={current:{pageX:0,pageY:0}};let kI=0;const vI=({pageX:r0,pageY:e0})=>{yI.current={pageX:r0,pageY:e0}};function SI(r0){return Iw(r0)}function II(r0){const e0=CI();return nr.useCallback((...n0)=>e0(r0(...n0)),[e0,r0])}function CI(){return mb()}var xI,TI={exports:{}};xI=TI,function(){var r0={}.hasOwnProperty;function e0(){for(var i0="",s0=0;s0<arguments.length;s0++){var o0=arguments[s0];o0&&(i0=a0(i0,n0(o0)))}return i0}function n0(i0){if(typeof i0=="string"||typeof i0=="number")return i0;if(typeof i0!="object")return"";if(Array.isArray(i0))return e0.apply(null,i0);if(i0.toString!==Object.prototype.toString&&!i0.toString.toString().includes("[native code]"))return i0.toString();var s0="";for(var o0 in i0)r0.call(i0,o0)&&i0[o0]&&(s0=a0(s0,o0));return s0}function a0(i0,s0){return s0?i0?i0+" "+s0:i0+s0:i0}xI.exports?(e0.default=e0,xI.exports=e0):window.classNames=e0}();var BI=t(TI.exports),UI=nr.memo(function(r0){const{currentSize:e0,setWindowSize:n0,widthOnly:a0,...i0}=r0,[s0,o0]=nr.useState(!1),[l0,c0]=nr.useState(null);nr.useEffect(()=>{if(s0===!1||l0==null)return;const[d0,h0]=e0,f0=A0=>{const m0=EE(A0)-l0.x,x0=yE(A0)-l0.y,g0=[Math.max(0,d0+Math.round(m0/25)),a0?d0:Math.max(0,h0+Math.round(x0/29))];r0.setWindowSize(g0)};window.addEventListener("mousemove",f0),window.addEventListener("touchmove",f0);const p0=()=>o0(!1);return window.addEventListener("mouseup",p0),window.addEventListener("touchend",p0),()=>{window.removeEventListener("mousemove",f0),window.removeEventListener("touchmove",f0),window.removeEventListener("mouseup",p0),window.removeEventListener("touchend",p0)}},[l0,s0]);const u0=d0=>{c0({x:EE(d0),y:yE(d0)}),o0(!0)};return ga.jsx("div",{onMouseDown:u0,onTouchStart:u0,...i0})});function MI({onKeyDown:r0,windowId:e0,children:n0}){const a0=SI(Hy),i0=II(iv),s0=nr.useCallback(()=>{e0!==a0&&i0(e0)},[e0,a0,i0]),[o0,l0]=nr.useState(null);return nr.useEffect(()=>{if(o0!=null&&r0!=null)return o0.addEventListener("keydown",r0),()=>o0.removeEventListener("keydown",r0)},[r0,e0,a0,o0]),nr.useEffect(()=>{if(o0==null||e0!==a0)return;const c0=new MutationObserver(u0=>{document.activeElement===document.body&&u0.some(d0=>d0.removedNodes.length>0)&&o0.focus()});return c0.observe(o0,{subtree:!0,attributes:!1,childList:!0}),()=>c0.disconnect()},[e0,a0,o0]),ga.jsx("div",{ref:l0,onPointerDown:s0,onFocus:s0,tabIndex:-1,style:{height:"100%",width:"100%"},children:n0})}const NI="winamp-active";function DI({requireClicksOriginateLocally:r0=!0,onPointerDown:e0,className:n0,...a0}){const[i0,s0]=nr.useState(!1),o0=nr.useCallback(l0=>{e0!=null&&e0(l0),r0||l0.target.releasePointerCapture(l0.pointerId),l0.nativeEvent.button!==-1&&l0.nativeEvent.button!==0||(s0(!0),document.addEventListener("pointerup",function c0(u0){s0(!1),document.removeEventListener("pointerup",c0)}))},[e0,r0]);return ga.jsx("div",{...a0,className:BI(n0,{[NI]:i0}),onPointerDown:o0,onPointerEnter:r0?void 0:l0=>{l0.buttons===1&&(document.dispatchEvent(new CustomEvent("pointerup",{detail:-42})),o0(l0))}})}const OI=({children:r0})=>{const e0=r0.split("");return ga.jsx(nr.Fragment,{children:e0.map((n0,a0)=>ga.jsx("div",{className:`draggable gen-text-letter gen-text-${n0===" "?"space":n0.toLowerCase()}`},a0))})},LI=({children:r0,title:e0,windowId:n0,onKeyDown:a0})=>{const i0=II(Av),s0=II(rv),o0=SI(Xy),l0=SI(Hy),c0=SI(ky)(n0),u0=l0===n0,{width:d0,height:h0}=o0(n0);return ga.jsx(MI,{windowId:n0,onKeyDown:a0,children:ga.jsxs("div",{className:BI("gen-window","window",{selected:u0}),style:{width:d0,height:h0},children:[ga.jsxs("div",{className:"gen-top draggable",children:[ga.jsx("div",{className:"gen-top-left draggable"}),ga.jsx("div",{className:"gen-top-left-fill draggable"}),ga.jsx("div",{className:"gen-top-left-end draggable"}),ga.jsx("div",{className:"gen-top-title draggable",children:ga.jsx(OI,{children:e0})}),ga.jsx("div",{className:"gen-top-right-end draggable"}),ga.jsx("div",{className:"gen-top-right-fill draggable"}),ga.jsx("div",{className:"gen-top-right draggable",children:ga.jsx(DI,{className:"gen-close selected",onClick:()=>s0(n0)})})]}),ga.jsxs("div",{className:"gen-middle",children:[ga.jsx("div",{className:"gen-middle-left draggable",children:ga.jsx("div",{className:"gen-middle-left-bottom draggable"})}),ga.jsx("div",{className:"gen-middle-center",children:r0({width:d0-19,height:h0-34})}),ga.jsx("div",{className:"gen-middle-right draggable",children:ga.jsx("div",{className:"gen-middle-right-bottom draggable"})})]}),ga.jsxs("div",{className:"gen-bottom draggable",children:[ga.jsx("div",{className:"gen-bottom-left draggable"}),ga.jsx("div",{className:"gen-bottom-right draggable",children:ga.jsx(UI,{currentSize:c0,setWindowSize:f
7780=>i0(n0,f0),id:"gen-resize-target"})})]})]})})},_I={[GE.DEFAULT]:2.7,[GE.IMMEDIATE]:0,[GE.USER_PRESET]:5.7};function RI({analyser:r0,width:e0,height:n0}){const a0=SI(ik),i0=SI(Ry),s0=SI(Ik),o0=SI(Oy),l0=SI(Tk),c0=SI(Ck),u0=SI(yk),d0=a0===Qb,h0=nr.useRef(null),[f0,p0]=nr.useState(null);nr.useEffect(()=>{if(h0.current==null||s0==null||f0!=null)return;const g0=s0.createVisualizer(r0.context,h0.current,{width:e0,height:n0,meshWidth:32,meshHeight:24,pixelRatio:window.devicePixelRatio||1,onlyUseWASM:!0});g0.connectAudio(r0),p0(g0)},[s0,r0,n0,e0,f0]),nr.useEffect(()=>{f0!=null&&f0.setRendererSize(e0,n0)},[f0,e0,n0]);const A0=nr.useRef(!1);nr.useEffect(()=>{f0!=null&&l0!=null&&(A0.current?f0.loadPreset(l0,_I[c0]):(f0.loadPreset(l0,_I[GE.IMMEDIATE]),A0.current=!0))},[f0,l0]),nr.useEffect(()=>{f0!=null&&o0&&f0.launchSongTitleAnim(o0)},[f0,o0]);const m0=nr.useRef(null);nr.useEffect(()=>{f0!=null&&u0!=null&&(m0.current==null||u0.time>m0.current)&&(m0.current=Date.now(),f0.launchSongTitleAnim(u0.text))},[f0,u0]);const x0=i0&&d0;return nr.useEffect(()=>{if(!x0||f0==null)return;let g0=null;const y0=()=>{f0.render(),g0=window.requestAnimationFrame(y0)};return y0(),()=>{g0!=null&&window.cancelAnimationFrame(g0)}},[f0,x0]),ga.jsx("canvas",{height:n0,width:e0,style:{height:"100%",width:"100%",display:d0?"block":"none"},ref:h0})}const zI=r0=>{const{innerRef:e0}=r0;return ga.jsx("div",{ref:e0,className:"draggable",style:{backgroundColor:"#000",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%"},tabIndex:0,children:r0.children})},FI={position:"absolute",top:0,left:0,color:"white",background:"rgba(0.33, 0.33, 0.33, 0.33)"},QI={position:"absolute",top:0,left:0,padding:"15px 10px 0 10px"},PI={display:"inline-block",whiteSpace:"nowrap",overflow:"hidden",background:"rgba(0, 0, 0, 0.815)",fontSize:"12px"};function VI(r0){return r0-1}function GI({height:r0,width:e0}){const n0=SI(Bk),a0=SI(xk),i0=II($S),s0=II(pI),o0=II(WS),l0=function(){const m0=nr.useRef(!1);return nr.useEffect(()=>()=>{m0.current=!0},[]),m0}(),[c0,u0]=nr.useState(()=>a0!=null?a0+1:0),d0=n0.length,h0=nr.useCallback(()=>{const m0=Math.floor((r0-15)/14),x0=Math.floor(.75*m0),[g0,y0]=function(E0,w0,v0){const S0=Math.min(E0,w0),k0=Math.floor(S0/2),R0=eE(v0-k0,0,E0-S0);return[R0,R0+S0-1]}(d0+1,x0,c0),b0=[];for(let E0=g0;E0<=y0;E0++){const w0=VI(E0),v0=w0===a0;let S0;S0=E0===c0?v0?"#FFCC22":"#FF5050":v0?"#CCFF03":"#CCCCCC",b0.push(ga.jsx("li",{style:{color:S0,lineHeight:"14px"},children:E0===0?"Load Local Directory":n0[w0]},E0))}return b0},[a0,r0,d0,n0,c0]),f0=nr.useCallback(async()=>{const m0=await RE({directory:!0});l0.current||o0(m0)},[o0,l0]),p0=nr.useCallback(m0=>{switch(m0.keyCode){case 38:u0(x0=>Math.max(x0-1,0)),m0.stopPropagation();break;case 40:u0(x0=>Math.min(x0+1,d0)),m0.stopPropagation();break;case 13:c0===0?f0():i0(VI(c0),GE.DEFAULT,!0),m0.stopPropagation();break;case 27:s0(),m0.stopPropagation()}},[f0,d0,i0,c0,s0]),A0=nr.useCallback(m0=>{m0!=null&&document.activeElement!==m0&&m0.focus()},[]);return n0==null?ga.jsx("div",{style:FI,children:ga.jsx("span",{children:"Loading presets"})}):ga.jsx("div",{ref:A0,tabIndex:-1,style:QI,onKeyDown:p0,children:ga.jsx("div",{style:{...PI,width:e0-20-20,maxHeight:r0-15},children:ga.jsx("ul",{style:{listStyleType:"none",padding:0,margin:0},children:h0()})})})}function jI(r0){r0.stopPropagation(),r0.preventDefault(),r0.dataTransfer.dropEffect="link",r0.dataTransfer.effectAllowed="link"}function KI(r0){const{handleDrop:e0,windowId:n0,onWheelActive:a0,...i0}=r0,s0=nr.useRef(null),o0=II(TS);nr.useEffect(()=>{const c0=s0.current;if(!c0||!a0)return;const u0=d0=>{a0(d0)};return c0.addEventListener("wheel",u0,{passive:!1}),()=>{c0.removeEventListener("wheel",u0)}},[a0]);const l0=nr.useCallback(c0=>{jI(c0),o0(c0,n0);const{currentTarget:u0}=c0;if(!(u0 instanceof Element))return;const{left:d0,top:h0}=u0.getBoundingClientRect();e0(c0,{x:d0,y:h0})},[e0,o0,n0]);return ga.jsx("div",{ref:s0,...i0,onDragStart:jI,onDragEnter:jI,onDragOver:jI,onDrop:l0})}const YI=r0=>{const e0=nr.useMemo(()=>{const a0=document.createElement("div");return a0.id="webamp-context-menu",a0.style.position="absolute",a0.style.top="0",a0.style.left="0",a0.style.zIndex=String(r0.zIndex+1),a0},[r0.zIndex]);nr.useEffect(()=>(document.body.appendChild(e0),()=>{document.body.removeChild(e0)}),[e0]);
778const n0={top:r0.top,left:r0.left,position:"absolute"};return dr.createPortal(ga.jsx("div",{style:n0,children:r0.children}),e0)},HI=()=>ga.jsx("li",{className:"hr",children:ga.jsx("hr",{})}),JI=({children:r0,label:e0})=>ga.jsxs("li",{className:"parent",children:[ga.jsx("ul",{children:r0}),e0]}),WI=r0=>ga.jsx("li",{children:ga.jsx("a",{...r0,children:r0.label})}),qI=r0=>{const{label:e0,checked:n0,className:a0="",...i0}=r0;return ga.jsx("li",{className:BI(a0,{checked:n0}),...i0,children:e0})};function ZI({children:r0,offsetTop:e0,offsetLeft:n0,top:a0,bottom:i0,selected:s0}){const o0=SI(qy);return s0?ga.jsx(YI,{top:e0,left:n0,zIndex:o0,children:ga.jsx("ul",{className:BI("context-menu",{top:a0,bottom:i0}),children:r0})}):null}function XI({children:r0,renderContents:e0,...n0}){const[a0,i0]=nr.useState(null),s0=nr.useCallback(()=>{i0(null)},[]),o0=nr.useCallback(c0=>{c0.button!==2&&s0()},[s0]),l0=nr.useCallback(c0=>{const{pageX:u0,pageY:d0}=c0;i0({x:u0,y:d0}),c0.preventDefault(),c0.stopPropagation()},[]);return nr.useEffect(()=>{if(a0!=null)return document.addEventListener("click",o0),document.body.addEventListener("contextmenu",s0),()=>{document.removeEventListener("click",o0),document.body.removeEventListener("contextmenu",s0)}},[a0,s0,o0]),ga.jsxs("div",{onContextMenu:l0,style:{width:"100%",height:"100%"},...n0,children:[ga.jsx(ZI,{selected:a0!=null,offsetTop:(a0==null?void 0:a0.y)??0,offsetLeft:(a0==null?void 0:a0.x)??0,children:e0()}),r0]})}const $I=r0=>{const e0=SI(vk),n0=II(rv),a0=II(uI),i0=II(hI);return ga.jsx(XI,{renderContents:()=>ga.jsxs(ga.Fragment,{children:[document.fullscreenEnabled&&ga.jsx(qI,{onClick:i0,label:"Fullscreen",hotkey:"Alt+Enter"}),ga.jsx(qI,{onClick:a0,checked:e0,label:"Desktop Mode",hotkey:"Alt+D"}),ga.jsx(HI,{}),ga.jsx(qI,{onClick:()=>n0(Ub),label:"Quit"})]}),children:r0.children})},eC=nr.memo(({children:r0})=>{const[e0]=nr.useState(()=>document.createElement("div"));return nr.useEffect(()=>(e0.classList.add("webamp-desktop"),document.body.appendChild(e0),()=>{document.body.removeChild(e0)}),[e0]),hr.createPortal(r0,e0)});function tC({analyser:r0}){const e0=SI(vk),n0=SI(Sk),a0=SI(Uk),i0=SI(Mk),s0=SI(xk),o0=SI(Ry),l0=II(hI),c0=II(qS),u0=II(eI),d0=II(dI),h0=function(){const m0=SI(Oy),x0=II(qS),g0=II(ZS),y0=II(tI),b0=II(pI),E0=II(aI),w0=II(nI);return nr.useCallback(v0=>{switch(v0.keyCode){case 32:x0();break;case 8:g0(GE.IMMEDIATE);break;case 72:x0(GE.IMMEDIATE);break;case 82:y0();break;case 76:b0(),v0.stopPropagation();break;case 84:m0!=null&&E0(m0),v0.stopPropagation();break;case 145:case 125:w0()}},[E0,x0,g0,w0,b0,y0,m0])}();nr.useEffect(()=>{if(!i0||!o0)return;const m0=setInterval(c0,15e3);return()=>clearInterval(m0)},[i0,s0,o0,c0]);const f0=function(){const[m0]=nr.useState({width:window.screen.width,height:window.screen.height});return m0}(),p0=function(){const[m0,x0]=nr.useState(wE()),g0=nr.useCallback(()=>{},[]);return nr.useEffect(()=>(window.addEventListener("resize",g0),()=>{window.removeEventListener("resize",g0)}),[g0]),m0}(),A0=nr.useCallback(()=>{document.fullscreenEnabled&&l0()},[l0]);return e0?ga.jsx(eC,{children:ga.jsx($I,{children:ga.jsx(RI,{...p0,analyser:r0})})}):ga.jsx(LI,{title:"Milkdrop",windowId:Ub,onKeyDown:h0,children:m0=>{const x0=n0?f0:m0;return ga.jsx($I,{children:ga.jsx(zI,{children:ga.jsxs(KI,{windowId:Ub,handleDrop:u0,children:[a0&&ga.jsx(GI,{...x0}),ga.jsx(bI,{enabled:n0,onChange:d0,children:ga.jsx("div",{onDoubleClick:A0,children:ga.jsx(RI,{...x0,analyser:r0})})})]})})})}})}const nC=()=>{const r0=II(_S),e0=II(MS),n0=II(NS),a0=II(DS),i0=II(LS),s0=II(zS),o0=II(FS),l0=II(OS);return ga.jsxs(nr.Fragment,{children:[ga.jsx(qI,{label:"Previous",hotkey:"Z",onClick:r0}),ga.jsx(qI,{label:"Play",hotkey:"X",onClick:e0}),ga.jsx(qI,{label:"Pause",hotkey:"C",onClick:n0}),ga.jsx(qI,{label:"Stop",hotkey:"V",onClick:a0}),ga.jsx(qI,{label:"Next",hotkey:"B",onClick:i0}),ga.jsx(HI,{}),ga.jsx(qI,{label:"Back 5 seconds",hotkey:"Left",onClick:()=>o0(5)}),ga.jsx(qI,{label:"Fwd 5 seconds",hotkey:"Right",onClick:()=>s0(5)}),ga.jsx(qI,{label:"10 tracks back",hotkey:"Num. 1",onClick:()=>l0(-10)}),ga.jsx(qI,{label:"10 tracks fwd",hotkey:"Num. 3",onClick:()=>l0(10)})]})},aC=()=>{const r0=II(cI),e0=II(pS),n0=II(cS),a0=SI(Vk);return ga.jsxs(JI,{label:"Skins",children:[ga.jsx(qI,{onClick:e0,label:"Load Skin..."}),ga.jsx(HI,{}),ga.jsx(qI,{onClick:r0,label:"<Base Skin>"}),a0.map(i0=>ga.jsx(qI,{onClick:()=>n0(i0.url),label:i0.name},i0.url))]})},rC=()=>{const r0=II(YS),e0=II(ev),n0=II(jS),a0=II(KS),i0=SI(Jy),s0=SI(Fk),o0=SI(lk),l0=SI(ok);return ga.jsxs(ga.Fragment,{children:[ga.jsx(aC,{}),ga.jsx(HI,{}),ga.jsx(qI,{label:"Time elapsed",hotkey:"(Ctrl+T toggles)",onClick:r0,checked:s0===Vb}),ga.jsx(qI,{label:"Time remaining",hotkey:"(Ctrl+T toggles)",onClick:r0,checked:s0===Gb}),ga.jsx(qI,{label:"Double Size",hotkey:"Ctrl+D",onClick:e0,checked:i0}),ga.jsx(HI,{}),ga.jsx(qI,{label:"Repeat",hotkey:"R",onClick:n0,checked:o0}),ga.jsx(qI,{label:"Shuffle",hotkey:"S",onClick:a0,checked:l0})]})},iC=nr.memo(({filePickers:r0})=>{const e0=SI(zk),n0=SI(wy),a0=II(rI),i0=II(hS),s0=II(gS),o0=II(sv),l0=II(()=>({type:"MAIN_CONTEXT_MENU_OPENED"})),c0=SI(kk);return nr.useEffect(()=>{l0()},[l0]),ga.jsxs(nr.Fragment,{children:[ga.jsx(WI,{href:"https://webamp.org/about",target:"_blank",label:"Webamp..."}),ga.jsx(HI,{}),ga.jsxs(JI,{label:"Play",children:[ga.jsx(qI,{onClick:i0,label:"File...",hotkey:"L"}),r0!=null&&r0.map((u0,d0)=>(e0||!u0.requiresNetwork)&&ga.jsx(qI,{onClick:async()=>{let h0;try{h0=await u0.filePicker()}catch{}s0(h0||[],Nb)},label:u0.contextMenuName},d0))]}),ga.jsx(HI,{}),Object.keys(n0).map(u0=>u0!==Ub||c0?ga.jsx(qI,{label:n0[u0].title,checked:n0[u0].open,onClick:()=>o0(u0),hotkey:n0[u0].hotkey},u0):null),ga.jsx(HI,{}),ga.jsx(aC,{}),ga.jsx(HI,{}),ga.jsx(JI,{label:"Options",children:ga.jsx(rC,{})}),ga.jsx(JI,{label:"Playback",children:ga.jsx(nC,{})}),ga.jsx(HI,{}),ga.jsx(qI,{onClick:a0,label:"Exit"})]})}),AC=(r0,e0)=>{const n0=Wk(r0,e0);return n0.x!==void 0||n0.y!==void 0};function sC(r0,e0){const n0=SI(ek),a0=SI(Ey),i0=SI(hk),s0=II(ov),[o0,l0]=nr.useState(null);return nr.useEffect(()=>{if(o0==null)return;const{boundingBox:c0,moving:u0,stationary:d0,mouseStart:h0}=o0,f0=A0=>{const m0={x:EE(A0)-h0.x,y:yE(A0)-h0.y},x0=u0.map(v0=>({...v0,...Xk(v0,m0)}
778)),g0={...c0,...Xk(c0,m0)},y0=Zk(x0,d0),b0=((v0,S0)=>{const k0=((R0,j0)=>{let C0,$0;return R0.x-Gk<0?C0=0:R0.x+R0.width+Gk>j0.width&&(C0=j0.width-R0.width),R0.y-Gk<0?$0=0:R0.y+R0.height+Gk>j0.height&&($0=j0.height-R0.height),{x:C0,y:$0}})(v0,S0);return{x:k0.x===void 0?0:k0.x-v0.x,y:k0.y===void 0?0:k0.y-v0.y}})(g0,e0!==document.body&&e0?mE(e0):i0),E0=((v0,...S0)=>{const k0=S0.reduce((R0,j0)=>({x:R0.x===0||j0.x===0?R0.x+j0.x:Math.min(R0.x,j0.x),y:R0.y===0||j0.y===0?R0.y+j0.y:Math.min(R0.y,j0.y)}));return Xk(v0,k0)})(m0,y0,b0),w0={};u0.forEach(v0=>{w0[v0.key]=Xk(v0,E0)}),s0(w0,!1)};function p0(){l0(null)}return window.addEventListener("mouseup",p0),window.addEventListener("touchend",p0),window.addEventListener("mousemove",f0,{passive:!1}),window.addEventListener("touchmove",f0,{passive:!1}),()=>{window.removeEventListener("mousemove",f0),window.removeEventListener("touchmove",f0),window.removeEventListener("mouseup",p0),window.removeEventListener("touchend",p0)}},[e0,i0,o0,s0]),nr.useCallback((c0,u0)=>{if(!u0.target.classList.contains("draggable"))return;const d0=EE(u0),h0=yE(u0);if(a0(c0))return;const f0=n0.filter(E0=>r0[E0.key]!=null&&!a0(E0.key)),p0=f0.find(E0=>E0.key===c0);if(p0==null)throw new Error(`Tried to move a node that does not exist: ${c0}`);let A0=new Set([p0]);c0==="main"&&(A0=(m0=AC,(w0,v0)=>{const S0=new Set,k0=R0=>{for(const j0 of w0)!S0.has(j0)&&m0(j0,R0)&&(S0.add(j0),k0(j0))};return k0(v0),S0})(f0,p0));var m0;const x0=f0.filter(E0=>!A0.has(E0)),g0=Array.from(A0),y0={x:d0,y:h0},b0=(E0=>{const w0=E0.slice(),v0=w0.pop();if(v0==null)throw new Error("boundingBox must be called with at least one node");const S0={top:jk(v0),right:Hk(v0),bottom:Kk(v0),left:Yk(v0)};return w0.forEach(k0=>{S0.top=Math.min(S0.top,jk(k0)),S0.right=Math.max(S0.right,Hk(k0)),S0.bottom=Math.max(S0.bottom,Kk(k0)),S0.left=Math.min(S0.left,Yk(k0))}),{x:S0.left,y:S0.top,width:S0.right-S0.left,height:S0.bottom-S0.top}})(g0);l0({boundingBox:b0,moving:g0,stationary:x0,mouseStart:y0})},[a0,r0,n0])}function oC({windows:r0,parentDomNode:e0}){const n0=SI(ek),a0=II(iv),i0=sC(r0,e0),s0=n0.filter(l0=>r0[l0.key]),o0=nr.useCallback(l0=>{const{currentTarget:c0,relatedTarget:u0}=l0;c0===u0||c0.contains(u0)||a0(null)},[a0]);return ga.jsx(ga.Fragment,{children:s0.map(l0=>ga.jsx("div",{onBlur:o0,onMouseDown:c0=>{i0(l0.key,c0)},onTouchStart:c0=>{i0(l0.key,c0)},style:{position:"absolute",top:0,left:0,transform:`translate(${l0.x}px, ${l0.y}px)`,touchAction:"none"},children:r0[l0.key]},l0.key))})}var lC,cC=(lC={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},function(r0){return lC==null?void 0:lC[r0]}),uC=typeof e=="object"&&e&&e.Object===Object&&e,dC=typeof self=="object"&&self&&self.Object===Object&&self,hC=(uC||dC||Function("return this")()).Symbol,pC=Array.isArray,fC=hC,gC=Object.prototype,mC=gC.hasOwnProperty,wC=gC.toString,bC=fC?fC.toStringTag:void 0,EC=Object.prototype.toString,yC=function(r0){var e0=mC.call(r0,bC),n0=r0[bC];try{r0[bC]=void 0;var a0=!0}catch{}var i0=wC.call(r0);return a0&&(e0?r0[bC]=n0:delete r0[bC]),i0},kC=hC?hC.toStringTag:void 0,vC=function(r0){return r0==null?r0===void 0?"[object Undef
778ined]":"[object Null]":kC&&kC in Object(r0)?yC(r0):function(e0){return EC.call(e0)}(r0)},SC=function(r0,e0){for(var n0=-1,a0=r0==null?0:r0.length,i0=Array(a0);++n0<a0;)i0[n0]=e0(r0[n0],n0,r0);return i0},IC=pC,CC=hC?hC.prototype:void 0,xC=CC?CC.toString:void 0,TC=function r0(e0){if(typeof e0=="string")return e0;if(IC(e0))return SC(e0,r0)+"";if(function(a0){return typeof a0=="symbol"||function(i0){return i0!=null&&typeof i0=="object"}(a0)&&vC(a0)=="[object Symbol]"}(e0))return xC?xC.call(e0):"";var n0=e0+"";return n0=="0"&&1/e0==-1/0?"-0":n0},BC=cC,UC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,MC=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),NC=t(function(r0){return(r0=(e0=r0)==null?"":TC(e0))&&r0.replace(UC,BC).replace(MC,"");var e0});const DC=r0=>`character-${NC(r0.toString()).toLowerCase().charCodeAt(0)}`,OC=nr.memo(({children:r0,className:e0,...n0})=>ga.jsx("span",{...n0,className:`${e0||""} character ${DC(r0)}`,children:r0})),LC=()=>ga.jsx(nr.Fragment,{children:[1,7,12,20,25].map((r0,e0)=>ga.jsx(OC,{style:{left:r0},className:"background-character",children:" "},e0))}),_C=()=>{const r0=SI(_y),e0=SI(Ny),n0=SI(uk),a0=SI(Fk),i0=II(YS);let s0=null;r0!==Kb&&e0!=null&&(s0=a0===Vb?n0:e0-n0);const o0=Wb(s0),l0=a0===Gb&&r0!==Kb;return ga.jsxs("div",{onClick:i0,className:BI("mini-time","countdown",{blinking:r0===Yb}),children:[ga.jsx(LC,{}),ga.jsx(OC,{style:{left:1},children:l0?"-":" "}),ga.jsx(OC,{style:{left:7},children:o0.minutesFirstDigit}),ga.jsx(OC,{style:{left:12},children:o0.minutesSecondDigit}),ga.jsx(OC,{style:{left:20},children:o0.secondsFirstDigit}),ga.jsx(OC,{style:{left:25},children:o0.secondsSecondDigit})]})};function RC(r0){const[e0,n0]=nr.useState(!1);return ga.jsx(DI,{...r0,className:BI(r0.className,{clicked:e0}),onPointerDown:function(a0){n0(!0),r0.onPointerDown&&r0.onPointerDown(a0)}})}function zC(r0){const e0=nr.useRef(null),[n0,a0]=nr.useState(!1);nr.useEffect(()=>{if(n0)return document.addEventListener("click",d0),()=>{document.removeEventListener("click",d0)};function d0(h0){n0&&h0.target instanceof Element&&n0&&e0.current&&!e0.current.contains(h0.target)&&a0(!1)}},[n0]);const i0=nr.useMemo(()=>n0?function(d0){if(d0==null)return{top:0,left:0};const h0=d0.getBoundingClientRect(),f0=window.pageXOffset||document.documentElement.scrollLeft,p0=window.pageYOffset||document.documentElement.scrollTop;return{top:h0.top+p0,left:h0.left+f0}}(e0.current):{top:0,left:0},[n0]),{renderMenu:s0,children:o0,top:l0,bottom:c0,...u0}=r0;return ga.jsxs("div",{...u0,children:[ga.jsx("div",{className:"handle",style:{width:"100%",height:"100%"},ref:e0,onClick:()=>a0(!n0),children:o0}),ga.jsx(ZI,{selected:n0,offsetTop:i0.top,offsetLeft:i0.left,top:l0,bottom:c0,children:s0()})]})}const jL=class jL{constructor(){Gw(this,"bitrevtable");Gw(this,"envelope");Gw(this,"equalize");Gw(this,"temp1");Gw(this,"temp2");Gw(this,"cossintable");this.bitrevtable=this.initBitRevTable(1024),this.cossintable=this.initCosSinTable(1024),this.envelope=this.initEnvelopeTable(1024,1),this.equalize=this.initEqualizeTable(1024,!1),this.temp1=new Float32Array(1024),this.temp2=new Float32Array(1024)}initEqualizeTable(e0,n0){const a0=new Float32Array(e0/2);let i0=.04;for(let s0=0;s0<e0/2;s0++){const o0=(9-i0)/(e0/2);a0[s0]=Math.log10(1+i0+(s0+1)*o0),i0/=1.0025}return a0}initEnvelopeTable(e0,n0){const a0=1/e0*jL.TWO_PI,i0=new Float32Array(e0);for(let s0=0;s0<e0;s0++)i0[s0]=Math.pow(.5+.5*Math.sin(s0*a0-jL.HALF_PI),n0);return i0}initBitRevTable(e0){const n0=new Array(e0);for(let a0=0;a0<e0;a0++)n0[a0]=a0;for(let a0=0,i0=0;a0<e0;a0++){if(i0>a0){const o0=n0[a0];n0[a0]=n0[i0],n0[i0]=o0}let s0=e0>>1;for(;s0>=1&&i0>=s0;)i0-=s0,s0>>=1;i0+=s0}return n0}initCosSinTable(e0){const n0=[];let a0=2;for(;a0<=e0;){const i0=-2*Math.PI/a0;n0.push(new Float32Array([Math.cos(i0),Math.sin(i0)])),a0<<=1}return n0}timeToFrequencyDomain(e0,n0){if(!this.temp1||!this.temp2||!this.cossintable)return;for(let l0=0;l0<this.temp1.length;l0++){const c0=this.bitrevtable[l0];c0<e0.length?this.temp1[l0]=e0[c0]*(this.envelope?this.envelope[c0]:1):this.temp1[l0]=0}this.temp2.fill(0);const a0=this.temp1,i0=this.temp2;let s0=2,o0=0;for(;s0<=this.temp1.length;){const l0=this.cossintable[o0][0],c0=this.cossintable[o0][1];let u0=1,d0=0;const h0=s0>>1;for(let f0=0;f0<h0;f0+=1){for(let A0=f0;A0<this.temp1.length;A0+=s0){const m0=A0+h0,x0=u0*a0[m0]-d0*i0[m0],g0=u0*i0[m0]+d0*a0[m0];a0[m0]=a0[A0]-x0,i0[m0]=i0[A0]-g0,a0[A0]+=x0,i0[A0]+=g0}const p0=u0;u0=u0*l0-d0*c0,d0=d0*l0+p0*c0}s0<<=1,++o0}for(let l0=0;l0<n0.length;l0++)n0[l0]=Math.sqrt(a0[l0]*a0[l0]+i0[l0]*i0[l0])*(this.equalize?this.equalize[l0]:1)}};Gw(jL,"TWO_PI",6.2831853),Gw(jL,"HALF_PI",1.5707963268);let FC=jL;class QC{constructor(e0){Gw(this,"_vis");Gw(this,"_ctx");this._vis=e0,this._ctx=e0.canvas.getContext("2d")}prepare(){}paintFrame(){}dispose(){}}class PC extends QC{constructor(n0){super(n0);Gw(this,"saPeaks");Gw(this,"saData2");Gw(this,"saData");Gw(this,"saFalloff");Gw(this,"sample");Gw(this,"barPeak");Gw(this,"chunk");Gw(this,"uVar12");Gw(this,"falloff");Gw(this,"peakFalloff");Gw(this,"pushDown");Gw(this,"inWaveData",new Float32Array(1024));Gw(this,"outSpectralData",new Float32Array(512));Gw(this,"_analyser");Gw(this,"_fft");Gw(this,"_color","rgb(255,255,255)");Gw(this,"_colorPeak","rgb(255,255,255)");Gw(this,"_bar",document.createElement("canvas"));Gw(this,"_peak",document.createElement("canvas"));
778Gw(this,"_16h",document.createElement("canvas"));Gw(this,"_bufferLength");Gw(this,"_dataArray");Gw(this,"colorssmall");Gw(this,"colorssmall2");Gw(this,"_renderHeight");Gw(this,"_smallVis");Gw(this,"_pixelDensity");Gw(this,"_doubled");Gw(this,"_isMWOpen");Gw(this,"paintBar");Gw(this,"paintFrame");switch(this._analyser=this._vis.analyser,this._fft=new FC,this._bufferLength=this._analyser.frequencyBinCount,this._dataArray=new Uint8Array(this._bufferLength),this._renderHeight=n0.renderHeight,this._smallVis=n0.smallVis,this._pixelDensity=n0.pixelDensity,this._doubled=n0.doubled,this._isMWOpen=n0.isMWOpen,this.colorssmall=[n0.colors[17],n0.colors[14],n0.colors[11],n0.colors[8],n0.colors[4]],this.colorssmall2=[n0.colors[17],n0.colors[16],n0.colors[14],n0.colors[13],n0.colors[11],n0.colors[10],n0.colors[8],n0.colors[7],n0.colors[5],n0.colors[4]],this._16h.width=1,this._16h.height=16,this._16h.setAttribute("width","75"),this._16h.setAttribute("height","16"),this.paintFrame=this.paintAnalyzer.bind(this),this.saPeaks=new Int16Array(76).fill(0),this.saData2=new Float32Array(76).fill(0),this.saData=new Int16Array(76).fill(0),this.saFalloff=new Float32Array(76).fill(0),this.sample=new Float32Array(76).fill(0),this.barPeak=new Int16Array(76).fill(0),this.chunk=0,this.uVar12=0,this.pushDown=0,this._vis.coloring){case"fire":this.paintBar=this.paintBarFire.bind(this);break;case"line":this.paintBar=this.paintBarLine.bind(this);break;default:this.paintBar=this.paintBarNormal.bind(this)}switch(this._vis.saFalloff){case"slower":this.falloff=3;break;case"slow":this.falloff=6;break;case"moderate":default:this.falloff=12;break;case"fast":this.falloff=16;break;case"faster":this.falloff=32}switch(this._vis.saPeakFalloff){case"slower":this.peakFalloff=1.05;break;case"slow":default:this.peakFalloff=1.1;break;case"moderate":this.peakFalloff=1.2;break;case"fast":this.peakFalloff=1.4;break;case"faster":this.peakFalloff=1.6}}prepare(){const n0=this._vis;this._peak.height=1,this._peak.width=1;let a0=this._peak.getContext("2d");a0.fillStyle=n0.colors[23],a0.fillRect(0,0,1,1),this._vis.smallVis?this.pushDown=0:this._vis.doubled&&!this._vis.isMWOpen?this.pushDown=2:this._vis.doubled?this.pushDown=0:this.pushDown=2,this._bar.height=16,this._bar.width=1,this._bar.setAttribute("width","1"),this._bar.setAttribute("height","16"),a0=this._bar.getContext("2d");for(let i0=0;i0<16;i0++)this._vis.pixelDensity===2&&this._vis.smallVis?a0.fillStyle=this.colorssmall2[9-i0]:a0.fillStyle=this._vis.smallVis?this.colorssmall[4-i0]:n0.colors[2-this.pushDown- -i0],a0.fillRect(0,i0,1,i0+1)}paintAnalyzer(){if(!this._ctx)return;const n0=this._ctx;n0.fillStyle=this._color;const a0=Math.log10(512);let i0,s0,o0;this._vis.pixelDensity===2?(i0=75,s0=10):(i0=this._vis.smallVis?40:75,s0=this._vis.smallVis?5:15),function(l0,c0,u0,d0){const h0=new Uint8Array(1024);l0.getByteTimeDomainData(h0);for(let f0=0;f0<h0.length;f0++)u0[f0]=(h0[f0]-128)/24;c0.timeToFrequencyDomain(u0,d0)}(this._analyser,this._fft,this.inWaveData,this.outSpectralData),o0=this._vis.smallVis?this._vis.pixelDensity===2?75:37:75;for(let l0=0;l0<i0;l0++){const c0=0+(a0-0)*l0/(i0-1),u0=l0/(i0-1)*511*(1-.91)+.91*Math.pow(10,c0);let d0=Math.floor(u0),h0=Math.ceil(u0);if(d0>=512&&(d0=511),h0>=512&&(h0=511),d0===h0)this.sample[l0]=this.outSpectralData[d0];else{const f0=u0-d0,p0=1-f0;this.sample[l0]=p0*this.outSpectralData[d0]+f0*this.outSpectralData[h0]}}for(let l0=0;l0<o0;l0++)this._vis.bandwidth==="wide"?(this.chunk=this.chunk=4294967292&l0,this.uVar12=(this.sample[this.chunk+3]+this.sample[this.chunk+2]+this.sample[this.chunk+1]+this.sample[this.chunk])/4,this.saData[l0]=this.uVar12):(this.chunk=0,this.saData[l0]=this.sample[l0]),this.saData[l0]>=s0&&(this.saData[l0]=s0),this.saPeaks[l0]>=256*s0&&(this.saPeaks[l0]=256*s0),this.saFalloff[l0]-=this.falloff/16,this.saFalloff[l0]<=this.saData[l0]&&(this.saFalloff[l0]=this.saData[l0]),this.saPeaks[l0]<=Math.round(256*this.saFalloff[l0])&&(this.saPeaks[l0]=256*this.saFalloff[l0],this.saData2[l0]=3),this.barPeak[l0]=this.saPeaks[l0]/256,this.saPeaks[l0]-=Math.round(this.saData2[l0]),this.saData2[l0]*=this.peakFalloff,this.saPeaks[l0]<=0&&(this.saPeaks[l0]=0),this._vis.smallVis||Math.round(this.barPeak[l0])<1&&(this.barPeak[l0]=-3),l0===this.chunk+3&&this._vis.bandwidth==="wide"||this.paintBar(n0,l0,l0,Math.round(this.saFalloff[l0])-this.pushDown,this.barPeak[l0]+1-this.pushDown)}paintBarNormal(n0,a0,i0,s0,o0){const l0=n0.canvas.height,c0=l0-s0;if(n0.drawImage(this._bar,0,c0,1,l0-c0,a0,c0,i0-a0+1,l0-c0),this._vis.peaks){const u0=l0-o0;n0.drawImage(this._peak,0,0,1,1,a0,u0,i0-a0+1,1)}}paintBarFire(n0,a0,i0,s0,o0){const l0=n0.canvas.height,c0=l0-s0;if(n0.drawImage(this._bar,0,0,this._bar.width,l0-c0,a0,c0,i0-a0+1,l0-c0),this._vis.peaks){const u0=l0-o0;n0.drawImage(this._peak,0,0,1,1,a0,u0,i0-a0+1,1)}}paintBarLine(n0,a0,i0,s0,o0){const l0=n0.canvas.height,c0=l0-s0;if(n0.drawImage(this._bar,0,0,this._bar.width,l0-c0,a0,c0,i0-a0+1,l0-c0),this._vis.peaks){const u0=l0-o0;n0.drawImage(this._peak,0,0,1,1,a0,u0,i0-a0+1,1)}}}function VC(r0,e0,n0){return r0[e0*n0]}class GC extends QC{constructor(n0){super(n0);Gw(this,"pushDown");Gw(this,"_analyser");Gw(this,"_bufferLength");Gw(this,"_lastX",0);Gw(this,"_lastY",0);Gw(this,"_dataArray");Gw(this,"_pixelRatio");Gw(this,"_bar",document.createElement("canvas"));
778Gw(this,"_16h",document.createElement("canvas"));Gw(this,"paintWav");this._analyser=this._vis.analyser,this._bufferLength=this._analyser.fftSize,this._dataArray=new Uint8Array(this._bufferLength),this._16h.width=1,this._16h.height=16,this._16h.setAttribute("width","75"),this._16h.setAttribute("height","16"),this._pixelRatio=window.devicePixelRatio||1,this.paintWav=this.paintOscilloscope.bind(this),this.pushDown=0}prepare(){const n0=this._vis;this._bar.width=1,this._bar.height=5,this._bar.setAttribute("width","1"),this._bar.setAttribute("height","5");const a0=this._bar.getContext("2d");if(a0)for(let i0=0;i0<5;i0++)a0.fillStyle=n0.colors[18+i0],a0.fillRect(0,i0,1,i0+1);this._ctx.imageSmoothingEnabled=!1,this._ctx.mozImageSmoothingEnabled=!1,this._ctx.webkitImageSmoothingEnabled=!1,this._ctx.msImageSmoothingEnabled=!1}paintFrame(){if(!this._ctx)return;this._analyser.getByteTimeDomainData(this._dataArray),this._dataArray=this._dataArray.slice(0,576);const n0=this._dataArray.length,a0=Math.floor(n0/75);for(let i0=0;i0<=75;i0++){const s0=VC(this._dataArray,a0,i0);this.paintWav(i0,s0)}}colorIndex(n0){return this._vis.smallVis?0:n0>=14?4:n0>=12?3:n0>=10?2:n0>=8?1:n0>=6?0:n0>=4?1:n0>=2?2:3}paintOscilloscope(n0,a0){if(this._vis.smallVis&&this._vis.doubled){if(n0>=75)return}else if(n0>=(this._vis.smallVis?38:75))return;let i0;this._vis.smallVis?this.pushDown=0:this._vis.doubled&&!this._vis.isMWOpen?this.pushDown=2:this._vis.doubled?this.pushDown=0:this.pushDown=2,a0=Math.round(a0/16*2)-9,i0=this._vis.pixelDensity===2?3:5,a0=this._vis.smallVis?a0-i0:a0,this._vis.smallVis&&this._vis.pixelDensity===2?a0=Math.round((a0+11)/16*10)-5:this._vis.smallVis&&(a0=Math.round((a0+11)/16*5)-2);const s0=a0=this._vis.smallVis&&this._vis.pixelDensity===2?Math.max(0,Math.min(9,a0)):Math.max(0,Math.min(this._vis.renderHeight-1,a0));n0===0&&(this._lastY=a0);let o0=a0,l0=this._lastY;for(this._lastY=a0,this._vis.oscStyle==="solid"?this._vis.pixelDensity===2?(a0>=(this._vis.smallVis?5:8)?(o0=this._vis.smallVis?5:8,l0=a0):(o0=a0,l0=this._vis.smallVis?5:7),n0===0&&this._vis.smallVis&&(o0=a0,l0=a0)):(a0>=(this._vis.smallVis?2:8)?(o0=this._vis.smallVis?2:8,l0=a0):(o0=a0,l0=this._vis.smallVis?2:7),n0===0&&this._vis.smallVis&&(o0=a0,l0=a0)):this._vis.oscStyle==="dots"?(o0=a0,l0=a0):l0<o0&&([l0,o0]=[o0,l0],this._vis.smallVis||o0++),a0=o0;a0<=l0;a0++)this._ctx.drawImage(this._bar,0,this.colorIndex(s0),1,1,n0,a0+this.pushDown,1,1)}}class jC extends QC{constructor(){super(...arguments);Gw(this,"cleared",!1)}prepare(){this.cleared=!1}paintFrame(){this._ctx&&(this.cleared=!0)}}function KC({analyser:r0}){nr.useLayoutEffect(()=>{r0.fftSize=1024},[r0,r0.fftSize]);const e0=SI(ak),n0=SI(ik),a0=SI(_y),i0=SI(yy),s0=SI(by)("main"),o0=SI(Jy),l0=II(iI),c0=i0("main"),u0=c0&&s0,d0=u0?5:16,h0=o0&&u0?2:1;let f0;f0=s0?c0?o0?76:38:76*h0:76;const p0=76*h0,A0=d0*h0,m0=nr.useMemo(()=>function(b0){const{width:E0,height:w0,bgColor:v0,fgColor:S0,windowShade:k0,pixelDensity:R0}=b0,j0=document.createElement("canvas");j0.width=E0,j0.height=w0;const C0=2*R0,$0=j0.getContext("2d");if($0==null)throw new Error("Could not construct canvas context");if($0.fillStyle=v0,$0.fillRect(0,0,E0,w0),!k0){$0.fillStyle=S0;for(let T0=0;T0<E0;T0+=C0)for(let I0=R0;I0<w0;I0+=C0)$0.fillRect(T0,I0,R0,R0)}return j0}({width:f0,height:A0,bgColor:e0[0],fgColor:e0[1],windowShade:!!c0,pixelDensity:h0}),[e0,A0,f0,c0,h0]),[x0,g0]=nr.useState(null),y0=nr.useMemo(()=>{if(!x0)return null;const b0={canvas:x0,colors:e0,analyser:r0,oscStyle:"lines",bandwidth:"wide",coloring:"normal",peaks:!0,saFalloff:"moderate",saPeakFalloff:"slow",sa:"analyzer",renderHeight:d0,smallVis:u0,pixelDensity:h0,doubled:o0,isMWOpen:s0};switch(n0){case zb:return new GC(b0);case"BAR":return new PC(b0);default:return new jC(b0)}},[r0,x0,n0,e0,d0,u0,h0,o0,s0]);return nr.useEffect(()=>{if(x0&&y0){const b0=x0.getContext("2d");b0&&(y0.prepare(),a0===Yb&&b0.clearRect(0,0,x0.width,x0.height))}},[o0,x0,y0]),nr.useEffect(()=>{if(x0==null||y0==null)return;const b0=x0.getContext("2d");if(b0==null)return;b0.imageSmoothingEnabled=!1;let E0=null;const w0=()=>{b0.drawImage(m0,0,0),y0.paintFrame(),E0=window.requestAnimationFrame(w0)};return a0===jb&&(n0===Fb?b0.clearRect(0,0,f0,A0):w0()),()=>{E0!==null&&window.cancelAnimationFrame(E0)}},[a0,x0,y0,m0,f0,A0,n0]),a0===Kb?null:ga.jsx("canvas",{id:"visualizer",ref:g0,style:{width:76,height:d0},width:p0,height:A0,onClick:l0})}const YC=nr.memo(()=>{const r0=II(_S),e0=II(MS),n0=II(NS),a0=II(LS),i0=II(DS);return ga.jsxs("div",{className:"actions",children:[ga.jsx(DI,{id:"previous",onClick:r0,title:"Previous Track"}),ga.jsx(DI,{id:"play",onClick:e0,title:"Play"}),ga.jsx(DI,{id:"pause",onClick:n0,title:"Pause"}),ga.jsx(DI,{id:"stop",onClick:i0,title:"Stop"}),ga.jsx(DI,{id:"next",onClick:a0,title:"Next Track"})]})});function HC({style:r0,className:e0,id:n0}){const a0=SI(sk),i0=II(GS),s0=II(sI),o0=II(oI);
778return ga.jsx("input",{id:n0,className:e0,type:"range",min:"-100",max:"100",step:"1",value:a0,style:{...r0,touchAction:"none"},onChange:l0=>i0(Number(l0.target.value)),onPointerDown:()=>s0("balance"),onPointerUp:o0,title:"Balance"})}const JC=r0=>{const e0=Math.abs(r0)/100;return 15*Math.floor(27*e0)},WC=nr.memo(()=>{const r0=SI(sk);return ga.jsx(HC,{id:"balance",style:{backgroundPosition:`0 -${JC(r0)}px`}})}),qC=nr.memo(()=>{const r0=II(rI);return ga.jsx(RC,{id:"close",onClick:r0,title:"Close"})});function ZC(){return sI("double")}function XC(){return r0=>{r0(ev()),r0({type:"UNSET_FOCUS"})}}const $C=nr.memo(()=>{const r0=II(ZC),e0=II(XC),n0=SI(Jy);return ga.jsxs("div",{id:"clutter-bar",children:[ga.jsx(zC,{bottom:!0,renderMenu:()=>ga.jsx(rC,{}),children:ga.jsx("div",{id:"button-o"})}),ga.jsx("div",{id:"button-a"}),ga.jsx("div",{id:"button-i"}),ga.jsx("div",{title:"Toggle Doublesize Mode",id:"button-d",className:BI({selected:n0}),onPointerUp:e0,onPointerDown:a0=>{a0.preventDefault(),r0()}}),ga.jsx("div",{id:"button-v"})]})}),ex=nr.memo(()=>{const r0=II(hS);return ga.jsx(DI,{id:"eject",onClick:r0,title:"Open File(s)"})});function tx(){return sv("equalizer")}const nx=nr.memo(()=>{const r0=II(tx),e0=SI(by)("equalizer");return ga.jsx(DI,{id:"equalizer-button",className:BI({selected:e0}),onClick:r0,title:"Toggle Graphical Equalizer"})});function ax(){return sv("playlist")}const rx=nr.memo(()=>{const r0=SI(by)("playlist"),e0=II(ax);return ga.jsx(DI,{id:"playlist-button",className:BI({selected:r0}),onClick:e0,title:"Toggle Playlist Editor"})}),ix=nr.memo(r0=>{const e0=(`${r0.children}`||"").split("");return ga.jsx(nr.Fragment,{children:e0.map((n0,a0)=>ga.jsx(OC,{children:n0},a0+n0))})}),Ax=nr.memo(()=>{const r0=SI(bk);return ga.jsx("div",{id:"kbps",children:ga.jsx(ix,{children:r0||""})})}),sx=nr.memo(()=>{const r0=SI(Ek);return ga.jsx("div",{id:"khz",children:ga.jsx(ix,{children:r0||""})})}),ox=r0=>r0.length>=31,lx=r0=>ox(r0)?`${r0} *** ${r0}`:r0.padEnd(31," "),cx=nr.memo(()=>{const r0=SI(wk),e0=SI(Jy),n0=SI(Rk),a0=II(fI),{handleMouseDown:i0,dragOffset:s0,dragging:o0}=function(){const[u0,d0]=nr.useState(null),[h0,f0]=nr.useState(0);return nr.useEffect(()=>{if(u0==null)return;const A0=u0,m0=y0=>{const b0=EE(y0)-A0;f0(-b0)};let x0=!1;const g0=()=>{x0||(document.removeEventListener("mousemove",m0),document.removeEventListener("touchmove",m0),document.removeEventListener("mouseup",g0),document.removeEventListener("touchend",g0),d0(null),x0=!0)};return document.addEventListener("mousemove",m0),document.addEventListener("touchmove",m0),document.addEventListener("mouseup",g0),document.addEventListener("touchend",g0),g0},[u0]),{handleMouseDown:nr.useCallback(A0=>{d0(EE(A0))},[]),dragOffset:h0,dragging:u0!=null}}(),l0=((u0,d0,h0)=>ox(u0)?((f0,p0)=>(f0%p0+p0)%p0)(5*d0+h0,5*(u0.length+7)):0)(r0,n0,s0),c0=-l0+"px";return function({step:u0,dragging:d0}){const[h0,f0]=nr.useState(!0);nr.useEffect(()=>{if(h0===!1)return;const p0=setInterval(u0,220);return()=>clearInterval(p0)},[u0,h0]),nr.useEffect(()=>{if(d0)return void f0(!1);const p0=window.setTimeout(()=>{f0(!0)},1e3);return()=>{window.clearTimeout(p0)}},[d0])}({step:a0,dragging:o0}),ga.jsx("div",{id:"marquee",className:"text",onPointerDown:i0,title:"Song Title",children:ga.jsx("div",{style:{whiteSpace:"nowrap",willChange:"transform",transform:`translateX(${c0})`},children:ga.jsx(ix,{children:lx(r0)})},e0?"doubled":"not-doubled")})}),ux=nr.memo(()=>{const r0=SI(ck);return ga.jsxs("div",{className:"mono-stereo",children:[ga.jsx("div",{id:"stereo",className:BI({selected:r0===2})}),ga.jsx("div",{id:"mono",className:BI({selected:r0===1})})]})}),dx=nr.memo(()=>{const[r0,e0]=function(){const o0=SI(Ny),l0=SI(uk),c0=o0?Math.floor(l0)/o0*100:0,u0=SI(mk);return[c0,SI(gk)==="position"?u0:c0]}(),n0=CI(),a0=nr.useCallback(o0=>{n0({type:"SEEK_TO_PERCENT_COMPLETE",percent:Number(o0.target.value)}),n0({type:"UNSET_FOCUS"})},[n0]),i0=nr.useCallback(o0=>{n0({type:"SET_FOCUS",input:"position"}),n0({type:"SET_SCRUB_POSITION",position:Number(o0.target.value)})},[n0]);let s0="";return r0<=33?s0="left":r0>=66&&(s0="right"),ga.jsx("input",{id:"position",className:s0,type:"range",min:"0",max:"100",step:"1",style:{touchAction:"none"},value:e0,onInput:i0,onChange:()=>{},onPointerUp:a0,onPointerDown:i0,title:"Seeking Bar"})}),hx=nr.memo(()=>{const r0=SI(lk),e0=II(jS);return ga.jsx(XI,{renderContents:()=>ga.jsx(qI,{checked:r0,label:"Repeat",onClick:e0,hotkey:"(R)"}),children:ga.jsx(DI,{id:"repeat",className:BI({selected:r0}),onClick:e0,title:"Toggle Repeat"})})}),px=nr.memo(()=>{const r0=II(nv);return ga.jsx(RC,{id:"shade",onClick:r0,onDoubleClick:e0=>e0.stopPropagation(),title:"Toggle Windowshade Mode"})}),fx=nr.memo(()=>{const r0=II(AI);return ga.jsx(RC,{id:"minimize",title:"Minimize",onClick:r0})}),gx=nr.memo(()=>{const r0=SI(ok),e0=II(KS);return ga.jsx(XI,{renderContents:()=>ga.jsx(qI,{checked:r0,label:"Shuffle",onClick:e0,hotkey:"(S)"}),children:ga.jsx(DI,{id:"shuffle",className:BI({selected:r0}),onClick:e0,title:"Toggle Shuffle"})})}),mx=nr.memo(()=>{const r0=II(YS),e0=SI(uk),n0=SI(Ny)||0,a0=SI(Fk),i0=Wb(a0===Vb?e0:n0-e0);return ga.jsxs("div",{id:"time",onClick:r0,className:"countdown",children:[a0===Gb&&ga.jsx("div",{id:"minus-sign"}),ga.jsx("div",{id:"minute-first-digit",className:`digit digit-${i0.minutesFirstDigit}`}),ga.jsx("div",{id:"minute-second-digit",className:`digit digit-${i0.minutesSecondDigit}`}),ga.jsx("div",{id:"second-first-digit",className:`digit digit-${i0.secondsFirstDigit}`}),ga.jsx("div",{id:"second-second-digit",className:`digit digit-${i0.secondsSecondDigit}`})]})});function wx({id:r0,style:e0,className:n0}){const a0=SI(Ak),i0=II(sI),s0=II(oI),o0=II(QS);return ga.jsx("input",{id:r0,type:"range",min:"0",max:"100",step:"1",value:a0,style:{...e0,touchAction:"none"},className:n0,onChange:l0=>o0(Number(l0.target.value)),onPointerDown:()=>i0("volume"),onPointerUp:s0,title:"Volume Bar"})}const bx=nr.memo(()=>{const r0=SI(Ak)/100,e0={backgroundPosition:`0 -${15*(Math.round(28*r0)-1)}px`};return ga.jsx("div",{id:"volume",style:e0,children:ga.jsx(wx,{})})});function Ex(r0){return fS(r0,Nb)}const yx=nr.memo(({analyser:r0,filePickers:e0})=>
778{const n0=SI(yy)("main"),a0=SI(_y),i0=SI(Hy),s0=SI(Qk),o0=SI(Jy),l0=SI(Wy),c0=SI(Pk),u0=BI({window:!0,play:a0===jb,stop:a0===Kb,pause:a0===Yb,selected:i0===xb,shade:n0,draggable:!0,loading:s0,doubled:o0,llama:l0}),d0=II(nv),h0=II(VS),f0=II(Ex);return ga.jsx(KI,{id:"main-window",windowId:xb,className:u0,handleDrop:f0,onWheelActive:h0,children:ga.jsxs(MI,{windowId:xb,children:[ga.jsxs("div",{id:"title-bar",className:"selected draggable",onDoubleClick:d0,children:[ga.jsx(zC,{id:"option-context",bottom:!0,renderMenu:()=>ga.jsx(iC,{filePickers:e0}),children:ga.jsx(RC,{id:"option",title:"Winamp Menu"})}),n0&&ga.jsx(_C,{}),ga.jsx(fx,{}),ga.jsx(px,{}),ga.jsx(qC,{})]}),ga.jsxs("div",{className:"webamp-status",children:[ga.jsx($C,{}),!c0&&ga.jsx("div",{id:"play-pause"}),ga.jsx("div",{id:"work-indicator",className:BI({selected:c0})}),ga.jsx(mx,{})]}),ga.jsx(KC,{analyser:r0}),ga.jsxs("div",{className:"media-info",children:[ga.jsx(cx,{}),ga.jsx(Ax,{}),ga.jsx(sx,{}),ga.jsx(ux,{})]}),ga.jsx(bx,{}),ga.jsx(WC,{}),ga.jsxs("div",{className:"windows",children:[ga.jsx(nx,{}),ga.jsx(rx,{})]}),ga.jsx(dx,{}),ga.jsx(YC,{}),ga.jsx(ex,{}),ga.jsxs("div",{className:"shuffle-repeat",children:[ga.jsx(gx,{}),ga.jsx(hx,{})]}),ga.jsx("a",{id:"about",target:"_blank",href:"https://webamp.org/about",title:"About"})]})})});function kx({widthOnly:r0}){const e0=SI(ky),n0=II(Av),a0=e0("playlist");return ga.jsx(UI,{currentSize:a0,id:"playlist-resize-target",setWindowSize:i0=>{n0("playlist",i0)},widthOnly:r0})}function vx(){const r0=SI(Hy),e0=SI(ky)("playlist"),n0=SI(Ny),a0=SI(Py),i0=II(rv),s0=II(av),o0=II(iv),l0=25*e0[0],c0=nr.useMemo(()=>{if(a0==null)return"[No file]";const d0=(205+l0)/5;return a0.length>d0?a0.slice(0,d0-1)+"â¦":a0},[l0,a0]),u0=nr.useMemo(()=>a0==null?"":qb(n0),[n0,a0]);return ga.jsx("div",{id:"playlist-window-shade",className:BI("window","draggable",{selected:r0===Tb}),style:{width:`${275+l0}px`},onPointerDown:()=>o0("playlist"),onDoubleClick:s0,children:ga.jsx("div",{className:"left",children:ga.jsxs("div",{className:"right draggable",children:[ga.jsx("div",{id:"playlist-shade-track-title",children:ga.jsx(ix,{children:c0})}),ga.jsx("div",{id:"playlist-shade-time",children:ga.jsx(ix,{children:u0})}),ga.jsx(kx,{widthOnly:!0}),ga.jsx(DI,{id:"playlist-shade-button",onClick:s0}),ga.jsx(DI,{id:"playlist-close-button",onClick:()=>i0("playlist")})]})})})}var Sx=nr.memo(function({children:r0}){const{ref:e0,hover:n0}=function(){const a0=(nr.useEffect(()=>(kI===0&&window.document.addEventListener("mousemove",vI),kI++,()=>{kI--,kI===0&&window.document.removeEventListener("mousemove",vI)}),[]),yI),[i0,s0]=nr.useState(!1),[o0,l0]=nr.useState(null);return nr.useLayoutEffect(()=>{if(o0==null)return void s0(!1);const c0=o0.getBoundingClientRect(),{pageX:u0,pageY:d0}=a0.current;s0(u0>=c0.left&&u0<=c0.right&&d0>=c0.top&&d0<=c0.bottom);const h0=()=>s0(!0),f0=()=>s0(!1);return o0.addEventListener("mouseenter",h0),o0.addEventListener("mouseleave",f0),()=>{o0.removeEventListener("mouseenter",h0),o0.removeEventListener("mouseleave",f0)}},[o0,a0]),{ref:l0,hover:i0}}();return ga.jsx("li",{ref:e0,className:BI({hover:n0}),children:r0})}),Ix=nr.memo(function(r0){const[e0,n0]=nr.useState(!1),[a0,i0]=nr.useState(null),s0=nr.useCallback(()=>{setTimeout(()=>{n0(!1)},0)},[]);return function(o0,l0){nr.useEffect(()=>{if(o0==null||l0==null)return;const c0=u0=>{const d0=u0.target;d0 instanceof Element&&(o0.contains(d0)||(l0(),window.document.removeEventListener("click",c0,{capture:!0})))};return window.document.addEventListener("click",c0,{capture:!0}),()=>{window.document.removeEventListener("click",c0,{capture:!0})}},[o0,l0])}(a0,e0?s0:null),ga.jsxs("div",{id:r0.id,className:BI("playlist-menu",{selected:e0}),ref:i0,onClick:()=>n0(o0=>!o0),children:[ga.jsx("div",{className:"bar"}),e0&&ga.jsx("ul",{children:nr.Children.map(r0.children,(o0,l0)=>ga.jsx(Sx,{children:o0},l0))})]})});const Cx=()=>{const r0=SI(ay),e0=II(SS),n0=II(vS),a0=II(IS);return ga.jsxs(Ix,{id:"playlist-add-menu",children:[ga.jsx("div",{className:"add-url",onClick:()=>a0(r0)}),ga.jsx("div",{className:"add-dir",onClick:()=>e0(r0)}),ga.jsx("div",{className:"add-file",onClick:()=>n0(r0)})]})},xx=()=>{const r0=II(Lv),e0=II(_v),n0=II(Ov);return ga.jsxs(Ix,{id:"playlist-remove-menu",children:[ga.jsx("div",{className:"remove-misc",onClick:()=>alert("Not supported in Webamp")}),ga.jsx("div",{className:"remove-all",onClick:e0}),ga.jsx("div",{className:"crop",onClick:n0}),ga.jsx("div",{className:"remove-selected",onClick:r0})]})};function Tx(){const r0=II(Yv),e0=II(Hv),n0=II(Jv);return ga.jsxs(Ix,{id:"playlist-selection-menu",children:[ga.jsx("div",{className:"invert-selection",onClick:r0}),ga.jsx("div",{className:"select-zero",onClick:e0}),ga.jsx("div",{className:"select-all",onClick:n0})]})}function Bx(){const r0=II(Rv),e0=II(zv),n0=II(Fv);return ga.jsx(zC,{style:{width:"100%",height:"100%"},top:!0,renderMenu:()=>ga.jsxs(ga.Fragment,{children:[ga.jsx(qI,{label:"Sort list by title",onClick:n0}),ga.jsx(HI,{}),ga.jsx(qI,{label:"Reverse list",onClick:r0}),ga.jsx(qI,{label:"Randomize list",onClick:e0})]}),children:ga.jsx("div",{})})}const Ux=()=>{const r0=II(ES);return ga.jsx(zC,{style:{width:"100%",height:"100%"},top:!0,renderMenu:()=>ga.jsx(qI,{onClick:r0,label:"Generate HTML playlist"}),children:ga.jsx("div",{})})},Mx=()=>ga.jsxs(Ix,{id:"playlist-misc-menu",children:[ga.jsx("div",{className:"sort-list",onClick:r0=>r0.stopPropagation(),children:ga.jsx(Bx,{})}),ga.jsx("div",{className:"file-info",onClick:()=>alert("Not supported in Webamp")}),ga.jsx("div",{className:"misc-options",onClick:r0=>r0.stopPropagation(),children:ga.jsx(Ux,{})})]});function Nx(){const r0=II(_v),e0=II(CS),n0=II(xS);return ga.jsxs(Ix,{id:"playlist-list-menu",children:[ga.jsx("div",{className:"new-list",onClick:r0}),ga.jsx("div",{className:"save-list",onClick:n0}),ga.jsx("div",{className:"load-list",onClick:e0})]})}const Dx=()=>{const r0=SI(py),e0=nr.useMemo(()=>function(n0){for(;n0.length<18;)n0+=" ";return n0}(r0),[r0]);return ga.jsx("div",{className:"playlist-running-time-display draggable",children:ga.jsx("div",{children:ga.jsx(ix,{children:e0})})})},Ox=()=>{const r0=II(MS),e0=II(NS),n0=II(DS),a0=II(hS),i0=II(LS),s0=II(_S);return ga.jsxs(nr.Fragment,{children:[ga.jsx(Dx,{}),ga.jsxs("div",{className:"playlist-action-buttons",children:[ga.jsx("div",{className:"playlist-previous-button",onClick:s0}),ga.jsx("div",{className:"playlist-play-button",onClick:r0}),ga.jsx("div",{className:"playlist-pause-button",onClick:e0}),ga.jsx("div",{className:"playlist-stop-button",onClick:n0}),ga.jsx("div",{className:"playlist-next-button",onClick:i0}),ga.jsx("div",{className:"playlist-eject-button",onClick:a0})]}),ga.jsx(_C,{})]})};function Lx({children:r0,handleMoveClick:e0,index:n0,id:a0}){const i0=SI(rk),s0=SI(ly),o0=SI(my),l0=s0.has(a0),c0=o0===a0,u0=CI(),d0=II(US),h0=nr.useCallback(A0=>A0.shiftKey?(A0.preventDefault(),void u0({type:"SHIFT_CLICKED_TRACK",index:n0})):A0.metaKey||A0.ctrlKey?(A0.preventDefault(),void u0({type:"CTRL_CLICKED_TRACK",index:n0})):(l0||u0({type:"CLICKED_TRACK",index:n0}),void e0(A0)),[u0,e0,n0,l0]),f0=nr.useCallback(A0=>{function m0(){d0(a0)}l0||u0({type:"CLICKED_TRACK",index:n0}),e0(A0),A0.target.addEventListener("touchstart",m0),setTimeout(()=>{A0.target.removeEventListener("touchstart",m0)},250)},[u0,e0,a0,n0,d0,l0]),p0={backgroundColor:l0?i0.selectedbg:void 0,color:c0?
778i0.current:void 0};return ga.jsx("div",{className:BI("track-cell",{selected:l0,current:c0}),style:p0,onClick:A0=>A0.stopPropagation(),onMouseDown:h0,onTouchStart:f0,onContextMenu:A0=>A0.preventDefault(),onDoubleClick:()=>d0(a0),children:r0})}const _x=({id:r0,paddedTrackNumber:e0})=>{const n0=SI(Dy)(r0);return ga.jsxs("span",{children:[e0,". ",n0]})};function Rx(){const r0=SI(Ty),e0=SI(By),n0=SI(ey),a0=SI(Gy),i0=II(Hv),s0=II(Kv),o0=II(Vv),[l0,c0]=nr.useState(null),[u0,d0]=nr.useState(!1),[h0,f0]=nr.useState(null),p0=g0=>{d0(!0),f0(yE(g0))};function A0(g0){return e0.map((y0,b0)=>ga.jsx(Lx,{id:y0,index:r0+b0,handleMoveClick:p0,children:g0(y0,b0)},y0))}nr.useEffect(()=>{if(l0==null||h0==null||u0===!1)return;const{top:g0,bottom:y0,left:b0,right:E0}=l0.getBoundingClientRect();let w0=0;const v0=k0=>{const R0=EE(k0),j0=yE(k0);if(j0<g0||j0>y0||R0<b0||R0>E0)return;const C0=Math.floor((j0-h0)/13);C0!==w0&&(s0(C0-w0),w0=C0)},S0=()=>d0(!1);return window.addEventListener("mouseup",S0),window.addEventListener("mousemove",v0),window.addEventListener("touchend",S0),window.addEventListener("touchmove",v0),()=>{window.removeEventListener("mousemove",v0),window.removeEventListener("touchmove",v0),window.removeEventListener("mouseup",S0),window.removeEventListener("touchend",S0)}},[u0]);const m0=a0.toString().length,x0=g0=>(g0+1+r0).toString().padStart(m0,"Â ");return nr.useEffect(()=>{if(l0!=null)return l0.addEventListener("wheel",o0,{passive:!1}),()=>{l0.removeEventListener("wheel",o0)}},[l0,o0]),ga.jsxs("div",{ref:c0,className:"playlist-tracks",style:{height:"100%",userSelect:"none"},onClick:i0,children:[ga.jsx("div",{className:"playlist-track-titles",children:A0((g0,y0)=>ga.jsx(_x,{id:g0,paddedTrackNumber:x0(y0)}))}),ga.jsx("div",{className:"playlist-track-durations",children:A0(g0=>qb(n0[g0].duration))})]})}function zx({value:r0,height:e0,width:n0,handle:a0,handleHeight:i0,onBeforeChange:s0,onChange:o0,onAfterChange:l0,requireClicksOriginateLocally:c0=!0,disabled:u0}){const d0=nr.useRef(null),h0=nr.useRef(null);function f0(A0){A0.preventDefault(),function({target:m0,clientY:x0}){const g0=d0.current,y0=h0.current;if(g0==null||y0==null)return null;const b0=g0.getBoundingClientRect(),E0=y0.getBoundingClientRect(),{top:w0,height:v0}=b0,{top:S0,height:k0}=E0,R0=w0+(y0.contains(m0)?x0-S0:k0/2),j0=v0-k0;function C0(I0){o0(eE((I0-R0)/j0,0,1))}const $0=I0=>{I0.preventDefault(),C0(I0.clientY)},T0=()=>{l0!=null&&l0(),document.removeEventListener("pointermove",$0),document.removeEventListener("pointerup",T0)};document.addEventListener("pointermove",$0),document.addEventListener("pointerup",T0),s0!=null&&s0(),C0(x0)}({target:A0.target,clientY:A0.clientY})}const p0=Math.floor((e0-i0)*r0);return ga.jsx("div",{style:{height:e0,width:n0},onPointerDown:u0?void 0:f0,onPointerEnter:u0||c0?void 0:function(A0){A0.buttons===1&&f0(A0)},ref:d0,children:ga.jsx("div",{style:{transform:`translateY(${p0}px)`},ref:h0,children:a0})})}const Fx=()=>ga.jsx("div",{className:"playlist-scrollbar-handle",style:{height:18}});function Qx(){const r0=SI(Xy)(Tb).height,e0=SI(xy),n0=SI(Uy),a0=II(Qv);return ga.jsx("div",{className:"playlist-scrollbar",style:{marginLeft:5},children:ga.jsx(zx,{height:r0-58,handleHeight:18,width:8,value:e0/100,onChange:i0=>a0(100*i0),handle:ga.jsx(Fx,{}),disabled:n0})})}function Px(r0){return r0.playlist.trackOrder.length-1}function Vx({analyser:r0}){const e0=SI(Ty),n0=SI(ky),a0=SI(Hy),i0=SI(yy),s0=SI(by),o0=SI(Px),l0=SI(rk),c0=SI(Xy),u0=a0===Tb,d0=!!i0(Tb),h0=n0(Tb),f0=c0(Tb),p0=II(rv),A0=II(av),m0=II(Gv),x0=II(jv),g0=II(Vv),y0=II(fS),b0=h0[0]>2,E0=!s0(xb),w0=nr.useCallback((R0,j0)=>{const C0=R0.clientY-j0.y,$0=eE(e0+Math.round((C0-23)/13),0,o0+1);y0(R0,Db,$0)},[y0,o0,e0]);if(d0)return ga.jsx(vx,{});const v0={color:l0.normal,backgroundColor:l0.normalbg,fontFamily:`${l0.font}, Arial, sans-serif`,height:`${f0.height}px`,width:`${f0.width}px`},S0=BI("window","draggable",{selected:u0}),k0=h0[0]%2==0;return ga.jsx(MI,{windowId:Tb,children:ga.jsxs(KI,{id:"playlist-window",windowId:Tb,className:S0,style:v0,handleDrop:w0,onWheelActive:g0,children:[ga.jsxs("div",{className:"playlist-top draggable",onDoubleClick:A0,children:[ga.jsx("div",{className:"playlist-top-left draggable"}),k0&&ga.jsx("div",{className:"playlist-top-left-spacer draggable"}),ga.jsx("div",{className:"playlist-top-left-fill draggable"}),ga.jsx("div",{className:"playlist-top-title draggable"}),k0&&ga.jsx("div",{className:"playlist-top-right-spacer draggable"}),ga.jsx("div",{className:"playlist-top-right-fill draggable"}),ga.jsxs("div",{className:"playlist-top-right draggable",children:[ga.jsx(DI,{id:"playlist-shade-button",onClick:A0}),ga.jsx(DI,{id:"playlist-close-button",onClick:()=>p0(Tb)})]})]}),ga.jsxs("div",{className:"playlist-middle draggable",children:[ga.jsx("div",{className:"playlist-middle-left draggable"}),ga.jsx("div",{className:"playlist-middle-center",children:ga.jsx(Rx,{})}),ga.jsx(DI,{className:"playlist-middle-right draggable",children:ga.jsx(Qx,{})})]}),ga.jsxs("div",{className:"playlist-bottom draggable",children:[ga.jsxs("div",{className:"playlist-bottom-left draggable",children:[ga.jsx(Cx,{}),ga.jsx(xx,{}),ga.jsx(Tx,{}),ga.jsx(Mx,{})]}),ga.jsx("div",{className:"playlist-bottom-center draggable"}),ga.jsxs("div",{className:"playlist-bottom-right draggable",children:[b0&&ga.jsx("div",{className:"playlist-visualizer",children:E0&&ga.jsx("div",{className:"visualizer-wrapper",children:ga.jsx(KC,{analyser:r0})})}),ga.jsx(Ox,{}),ga.jsx(Nx,{}),ga.jsx("div",{id:"playlist-scroll-up-button",onClick:m0}),ga.jsx("div",{id:"playlist-scroll-down-button",onClick:x0}),ga.jsx(kx,{})]})]})]})})}const Gx=()=>ga.jsx("div",{style:{width:11,height:11,marginLeft:1},className:"slider-handle"});function jx({id:r0,onChange:e0,band:n0,clickOriginatedInEq:a0}){const i0=SI(XE)[n0],s0=nr.useMemo(()=>{const{x:c0,y:u0}=(d0=(h0=>{const f0=h0/100;return Math.round(27*f0)})(i0),{x:d0%14,y:Math.floor(d0/14)});var d0;return`-${15*c0}px -${65*u0}px`},[i0]),o0=II(lI),l0=II(oI);return ga.jsx(DI,{id:r0,className:"band",style:{backgroundPosition:s0,height:63},requireClicksOriginateLocally:!(n0!=="preamp"&&a0),children:ga.jsx(zx,{height:62,width:14,handleHeight:11,value:1-i0/100,onBeforeChange:()=>o0(n0),onChange:c0=>e0(100*(1-c0)),onAfterChange:l0,requireClicksOriginateLocally:!(n0!=="preamp"&&a0),handle:ga.jsx(Gx,{})})})}const Kx=()=>{const r0=II(nS),e0=SI(dk);return ga.jsx(DI,{id:"on",className:BI({selected:e0}),onClick:r0})},Yx=nr.memo(()=>{const r0=SI(n0=>n0.equalizer.auto),e0=II(aS);return ga.jsx(DI,{id:"auto",className:BI({selected:r0}),onClick:e0})});function Hx(r0,e0,n0){const a0=r0[e0];r0[e0]=r0[n0],r0[n0]=a0}function Jx(){const r0=SI(XE),e0=EI(SI(Lk)),[n0,a0]=nr.useState(null),i0=nr.useMemo(()=>(n0==null?void 0:n0.getContext("2d"))??null,[n0]),s0=function(o0){const l0=EI(SI(_k));return nr.useMemo(()=>o0==null||l0==null?null:o0.createPattern(l0,"repeat-x"),[o0,l0])}(i0);return nr.useLayoutEffect(()=>{if(i0==null||n0==null||e0==null||s0==null)return;const o0=Number(n0.width),l0=Number(n0.height);i0.clearRect(0,0,o0,l0),function({colorPattern:c0,sliders:u0,canvasCtx:d0,preampLineImage:h0}){const f0=rE(u0.preamp/100,0,18);d0.drawImage(h0,0,f0,h0.width,h0.height);const p0=Cb.map(b0=>u0[b0]);d0.fillStyle=c0;const A0=[],m0=[];p0.forEach((b0,E0)=>{const w0=(100-b0)/100;A0.push(12*E0),m0.push(rE(w0,0,18))});const x0=function(b0,E0){const w0=function(R0,j0){const C0=R0.map(()=>0),$0=R0.length-1,T0=function(I0,M0){const N0=[];for(let D0=0;D0<I0;D0++){N0.push([]);for(let O0=0;O0<M0;O0++)N0[D0].push(0)}return N0}($0+1,$0+2);for(let I0=1;I0<$0;I0++)T0[I0][I0-1]=1/(R0[I0]-R0[I0-1]),T0[I0][I0]=2*(1/(R0[I0]-R0[I0-1])+1/(R0[I0+1]-R0[I0])),T0[I0][I0+1]=1/(R0[I0+1]-R0[I0]),T0[I0][$0+1]=3*((j0[I0]-j0[I0-1])/((R0[I0]-R0[I0-1])*(R0[I0]-R0[I0-1]))+(j0[I0+1]-j0[I0])/((R0[I0+1]-R0[I0])*(R0[I0+1]-R0[I0])));return T0[0][0]=2/(R0[1]-R0[0]),T0[0][1]=1/(R0[1]-R0[0]),T0[0][$0+1]=3*(j0[1]-j0[0])/((R0[1]-R0[0])*(R0[1]-R0[0])),T0[$0][$0-1]=1/(R0[$0]-R0[$0-1]),T0[$0][$0]=2/(R0[$0]-R0[$0-1]),T0[$0][$0+1]=3*(j0[$0]-j0[$0-1])/((R0[$0]-R0[$0-1])*(R0[$0]-R0[$0-1])),function(I0,M0){const N0=I0.length;for(let D0=0;D0<N0;D0++){let O0=0,B0=Number.NEGATIVE_INFINITY;for(let z0=D0;z0<N0;z0++)I0[z0][D0]>B0&&(O0=z0,B0=I0[z0][D0]);Hx(I0,D0,O0);for(let z0=D0+1;z0<N0;z0++){for(let G0=D0+1;G0<N0+1;G0++)I0[z0][G0]=I0[z0][G0]-I0[D0][G0]*(I0[z0][D0]/I0[D0][D0]);I0[z0][D0]=0}}for(let D0=N0-1;D0>=0;D0--){const O0=I0[D0][N0]/I0[D0][D0];M0[D0]=O0;for(let B0=D0-1;B0>=0;B0--)I0[B0][N0]-=I0[B0][D0]*O0,I0[B0][D0]=0}return M0}(T0,C0)}(b0,E0),v0=b0[b0.length-1],S0=[];let k0=1;for(let R0=0;R0<=v0;R0++){for(;b0[k0]<R0;)k0++;const j0=(R0-b0[k0-1])/(b0[k0]-b0[k0-1]),C0=w0[k0-1]*(b0[k0]-b0[k0-1])-(E0[k0]-E0[k0-1]),$0=-w0[k0]*(b0[k0]-b0[k0-1])+(E0[k0]-E0[k0-1]),T0=(1-j0)*E0[k0-1]+j0*E0[k0]+j0*(1-j0)*(C0*(1-j0)+$0*j0);S0.push(T0)}return S0}(A0,m0),g0=A0[A0.length-1];let y0=m0[0];for(let b0=0;b0<=g0;b0++){const E0=eE(Math.round(x0[b0]),0,18),w0=Math.min(E0,y0),v0=1+Math.abs(y0-E0);d0.fillRect(2+b0,w0,1,v0),y0=E0}}({colorPattern:s0,sliders:r0,canvasCtx:i0,preampLineImage:e0})},[i0,n0,s0,e0,r0]),ga.jsx("canvas",{id:"eqGraph",ref:a0,width:113,height:19})}var Wx={type:"Winamp EQ library file v1.1",presets:[{name:"Classical",hz60:33,hz170:33,hz310:33,hz600:33,hz1000:33,hz3000:33,hz6000:20,hz12000:20,hz14000:20,hz16000:16,preamp:33},{name:"Club",hz60:33,hz170:33,hz310:38,hz600:42,hz1000:42,hz3000:42,hz6000:38,hz12000:33,hz14000:33,hz16000:33,preamp:33},{name:"Dance",hz60:48,hz170:44,hz310:36,hz600:32,hz1000:32,hz3000:22,hz6000:20,hz12000:20,hz14000:32,hz16000:32,preamp:33},{name:"Laptop speakers/headphones",hz60:40,hz170:50,hz310:41,hz600:26,hz1000:28,hz3000:35,hz6000:40,hz12000:48,hz14000:53,hz16000:56,preamp:33},{name:"Large hall",hz60:49,hz170:49,hz310:42,hz600:42,hz1000:33,hz3000:24,hz6000:24,hz12000:24,hz14000:33,hz16000:33,preamp:33},{name:"Party",hz60:44,hz170:44,hz310:33,hz600:33,hz1000:33,hz3000:33,hz6000:33,hz12000:33,hz14000:44,hz16000:44,preamp:33},{name:"Pop",hz60:29,hz170:40,hz310:44,hz600:45,hz1000:41,hz3000:30,hz6000:28,hz12000:28,hz14000:29,hz16000:29,preamp:33},{name:"Reggae",hz60:33,hz170:33,hz310:31,hz600:22,hz1000:33,hz3000:43,hz6000:43,hz12000:33,hz14000:33,hz16000:33,preamp:33},{name:"Rock",hz60:45,hz170:40,hz310:23,hz600:19,hz1000:26,hz3000:39,hz6000:47,hz12000:50,hz14000:50,hz16000:50,preamp:33},{name:"Soft",hz60:40,hz170:35,hz310:30,hz600:28,hz1000:30,hz3000:39,hz6000:46,hz12000:48,hz14000:50,hz16000:52,preamp:33},{name:"Ska",hz60:28,hz170:24,hz310:25,hz600:31,hz1000:39,hz3000:42,hz6000:47,hz12000:48,hz14000:50,hz16000:48,preamp:33},{name:"Full Bass",hz60:48,hz170:48,hz310:48,hz600:42,hz1000:35,hz3000:25,hz6000:18,hz12000:15,hz14000:14,hz16000:14,preamp:33},{name:"Soft Rock",hz60:39,hz170:39,hz310:36,hz600:31,hz1000:25,hz3000:23,hz6000:26,hz12000:31,hz14000:37,hz16000:47,preamp:33},{name:"Full Treble",hz60:16,hz170:16,hz310:16,hz600:25,hz1000:37,hz3000:50,hz6000:58,hz12000:58,hz14000:58,hz16000:60,preamp:33},{name:"Full Bass & Treble",hz60:44,hz170:42,hz310:33,hz600:20,hz1000:24,hz3000:35,hz6000:46,hz12000:50,hz14000:52,hz16000:52,preamp:33},{name:"Live",hz60:24,hz170:33,hz310:39,hz600:41,hz1000:42,hz3000:42,hz6000:39,hz12000:37,hz14000:37,hz16000:36,preamp:33},{name:"Techno",hz60:45,hz170:42,hz310:33,hz600:23,hz1000:24,hz3000:33,hz6000:45,hz12000:48,hz14000:48,hz16000:47,preamp:33}]};const qx=()=>{const r0=II(dS),e0=II(bS),n0=II(wS);return ga.jsx(zC,{top:!0,id:"presets-context",renderMenu:()=>ga.jsxs(ga.Fragment,{children:[ga.jsxs(JI,{label:"Load",children:[Wx.presets.map(a0=>ga.jsx(qI,{onClick:()=>n0(a0),label:a0.name},a0.name)),ga.jsx(HI,{}),ga.jsx(qI,{onClick:r0,label:"From Eqf..."})]}),ga.jsx(qI,{onClick:e0,label:"Save"})]}),children:ga.jsx(DI,{id:"presets"})})};function Zx(){const r0=SI(Hy)===Bb,e0=II(rv),n0=II(tv);return ga.jsxs(RC,{id:"eq-buttons",children:[ga.jsx(DI,{id:"equalizer-shade",onClick:n0}),ga.jsx(DI,{id:"equalizer-close",onClick:()=>e0(Bb)})]},r0?"selected":"unselected")}const Xx=()=>{const r0=SI(Ak),e0=SI(sk),n0=II(tv),a0=["left","center","right"],i0=cE(0,100,r0,a0),s0=cE(-100,100,e0,a0);return ga.jsxs("div",{className:"draggable",onDoubleClick:n0,style:{width:"100%",height:"100%"},children:[ga.jsx(Zx,{}),ga.jsx(wx,{id:"equalizer-volume",className:i0}),ga.jsx(HC,{id:"equalizer-balance",className:s0})]})},$x=()=>{const r0=SI(Jy),e0=SI(Hy),n0=SI(yy),a0=e0===Bb,i0=n0(Bb),s0=II(tS),o0=II(eS),l0=II($v),c0=II(Xv),u0=II(qv),d0=II(tv),h0=BI({selected:a0,doubled:r0,shade:i0,window:!0,draggable:!0}),[f0,p0]=nr.useState(!1);return ga.jsx("div",{id:"equalizer-window",className:h0,children:ga.jsx(MI,{windowId:Bb,children:i0?ga.jsx(Xx,{}):ga.jsxs("div",{children:[ga.jsx("div",{className:"equalizer-top title-bar draggable",onDoubleClick:d0,children:ga.jsx(Zx,{})}),ga.jsx(Kx,{}),ga.jsx(Yx,{}),ga.jsx(Jx,{}),ga.jsx(qx,{}),ga.jsx(jx,{id:"preamp",band:"preamp",onChange:s0}),ga.jsx("div",{id:"plus12db",onClick:c0}),ga.jsx("div",{id:"zerodb",onClick:l0}),ga.jsx("div",{id:"minus12db",onClick:o0}),ga.jsx("div",{onPointerDown:A0=>{A0.stopPropagation(),A0.target.releasePointerCapture(A0.pointerId),p0(!0),document.addEventListener("pointerup",function m0(x0){x0.detail===0&&(p0(!1),document.removeEventListener("pointerup",m0))})},children:Cb.map(A0=>{return ga.jsx(jx,{id:(m0=A0,`band-${m0}`),band:A0,onChange:x0=>u0(A0,x0),clickOriginatedInEq:f0},A0);var m0})})]})})})},eT={MAIN_BALANCE_BACKGROUND:["#balance"],MAIN_BALANCE_THUMB:["#balance::-webkit-slider-thumb","#balance::-moz-range-thumb"],MAIN_BALANCE_THUMB_ACTIVE:["#balance:active::-webkit-slider-thumb","#balance:active::-moz-range-thumb"],MAIN_PREVIOUS_BUTTON:[".actions #previous"],MAIN_PREVIOUS_BUTTON_ACTIVE:[".actions #previous.winamp-active"],MAIN_PLAY_BUTTON:[".actions #play"],MAIN_PLAY_BUTTON_ACTIVE:[".actions #play.winamp-active"],MAIN_PAUSE_BUTTON:[".actions #pause"],MAIN_PAUSE_BUTTON_ACTIVE:[".actions #pause.winamp-active"],MAIN_STOP_BUTTON:[".actions #stop"],MAIN_STOP_BUTTON_ACTIVE:[".actions #stop.winamp-active"],MAIN_NEXT_BUTTON:[".actions #next"],MAIN_NEXT_BUTTON_ACTIVE:[".actions #next.winamp-active"],MAIN_EJECT_BUTTON:["#eject"],MAIN_EJECT_BUTTON_ACTIVE:["#eject.winamp-active"],MAIN_WINDOW_BACKGROUND:["#main-window"],MAIN_STEREO:[".media-info #stereo",".stop .media-info #stereo.selected"],MAIN_STEREO_SELECTED:[".media-info #stereo.selected"],MAIN_MONO:[".media-info #mono",".stop .media-info #mono.selected"],MAIN_MONO_SELECTED:[".media-info #mono.selected"],NO_MINUS_SIGN:["#time #minus-sign"],MINUS_SIGN:["#time.countdown #minus-sign"],DIGIT_0:[".digit-0"],DIGIT_1:[".digit-1"],DIGIT_2:[".digit-2"],DIGIT_3:[".digit-3"],DIGIT_4:[".digit-4"],DIGIT_5:[".digit-5"],DIGIT_6:[".digit-6"],DIGIT_7:[".digit-7"],DIGIT_8:[".digit-8"],DIGIT_9:[".digit-9"],NO_MINUS_SIGN_EX:["#time #minus-sign"],MINUS_SIGN_EX:["#time.countdown #minus-sign"],DIGIT_0_EX:[".digit-0"],DIGIT_1_EX:[".digit-1"],DIGIT_2_EX:[".digit-2"],DIGIT_3_EX:[".digit-3"],DIGIT_4_EX:[".digit-4"],DIGIT_5_EX:[".digit-5"],DIGIT_6_EX:[".digit-6"],DIGIT_7_EX:[".digit-7"],DIGIT_8_EX:[".digit-8"],DIGIT_9_EX:[".digit-9"],MAIN_PLAYING_INDICATOR:[".play #play-pause"],MAIN_PAUSED_INDICATOR:[".pause #play-pause"],MAIN_STOPPED_INDICATOR:[".stop #play-pause"],MAIN_NOT_WORKING_INDICATOR:["#work-indicator"],MAIN_WORKING_INDICATOR:["#work-indicator.selected"],PLAYLIST_TOP_TILE:[".playlist-top-left-fill",".playlist-top-left-spacer",".playlist-top-right-fill",".playlist-top-right-spacer"],PLAYLIST_TOP_LEFT_CORNER:[".playlist-top-left"],PLAYLIST_TITLE_BAR:[".playlist-top-title"],PLAYLIST_TOP_RIGHT_CORNER:[".playlist-top-right"],PLAYLIST_TOP_TILE_SELECTED:[".selected .playlist-top-left-fill",".selected .playlist-top-left-spacer",".selected .playlist-top-right-fill",".selected .playlist-top-right-spacer"],PLAYLIST_TOP_LEFT_SELECTED:[".selected .playlist-top-left"],PLAYLIST_TITLE_BAR_SELECTED:[".selected .playlist-top-title"],PLAYLIST_TOP_RIGHT_CORNER_SELECTED:[".selected .playlist-top-right"],PLAYLIST_LEFT_TILE:[".playlist-middle-left"],PLAYLIST_RIGHT_TILE:[".playlist-middle-right"],PLAYLIST_SCROLL_HANDLE:[".playlist-scrollbar-handle"],PLAYLIST_SCROLL_HANDLE_SELECTED:[".playlist-middle-right.winamp-active .playlist-scrollbar-handle"],PLAYLIST_BOTTOM_TILE:[".playlist-bottom"],PLAYLIST_BOTTOM_LEFT_CORNER:[".playlist-bottom-left"],PLAYLIST_BOTTOM_RIGHT_CORNER:[".playlist-bottom-right"],PLAYLIST_VISUALIZER_BACKGROUND:[".pla
778ylist-visualizer"],PLAYLIST_SHADE_BACKGROUND:["#playlist-window-shade"],PLAYLIST_SHADE_BACKGROUND_LEFT:["#playlist-window-shade .left"],PLAYLIST_SHADE_BACKGROUND_RIGHT:["#playlist-window-shade .right"],PLAYLIST_SHADE_BACKGROUND_RIGHT_SELECTED:["#playlist-window-shade.selected .right"],PLAYLIST_ADD_MENU_BAR:["#playlist-add-menu.selected .bar"],PLAYLIST_ADD_URL:["#playlist-add-menu .add-url"],PLAYLIST_ADD_URL_SELECTED:["#playlist-add-menu .hover .add-url"],PLAYLIST_ADD_DIR:["#playlist-add-menu .add-dir"],PLAYLIST_ADD_DIR_SELECTED:["#playlist-add-menu .hover .add-dir"],PLAYLIST_ADD_FILE:["#playlist-add-menu .add-file"],PLAYLIST_ADD_FILE_SELECTED:["#playlist-add-menu .hover .add-file"],PLAYLIST_REMOVE_MENU_BAR:["#playlist-remove-menu.selected .bar"],PLAYLIST_REMOVE_ALL:["#playlist-remove-menu .remove-all"],PLAYLIST_REMOVE_ALL_SELECTED:["#playlist-remove-menu .hover .remove-all"],PLAYLIST_CROP:["#playlist-remove-menu .crop"],PLAYLIST_CROP_SELECTED:["#playlist-remove-menu .hover .crop"],PLAYLIST_REMOVE_SELECTED:["#playlist-remove-menu .remove-selected"],PLAYLIST_REMOVE_SELECTED_SELECTED:["#playlist-remove-menu .hover .remove-selected"],PLAYLIST_REMOVE_MISC:["#playlist-remove-menu .remove-misc"],PLAYLIST_REMOVE_MISC_SELECTED:["#playlist-remove-menu .hover .remove-misc"],PLAYLIST_SELECT_MENU_BAR:["#playlist-selection-menu.selected .bar"],PLAYLIST_INVERT_SELECTION:["#playlist-selection-menu .invert-selection"],PLAYLIST_INVERT_SELECTION_SELECTED:["#playlist-selection-menu .hover .invert-selection"],PLAYLIST_SELECT_ZERO:["#playlist-selection-menu .select-zero"],PLAYLIST_SELECT_ZERO_SELECTED:["#playlist-selection-menu .hover .select-zero"],PLAYLIST_SELECT_ALL:["#playlist-selection-menu .select-all"],PLAYLIST_SELECT_ALL_SELECTED:["#playlist-selection-menu .hover .select-all"],PLAYLIST_CLOSE_SELECTED:["#playlist-close-button.winamp-active"],PLAYLIST_COLLAPSE_SELECTED:["#playlist-window #playlist-shade-button.winamp-active"],PLAYLIST_EXPAND_SELECTED:["#playlist-window-shade #playlist-shade-button.winamp-active"],PLAYLIST_MISC_MENU_BAR:["#playlist-misc-menu.selected .bar"],PLAYLIST_MISC_OPTIONS:["#playlist-misc-menu .misc-options"],PLAYLIST_MISC_OPTIONS_SELECTED:["#playlist-misc-menu .hover .misc-options"],PLAYLIST_FILE_INFO:["#playlist-misc-menu .file-info"],PLAYLIST_FILE_INFO_SELECTED:["#playlist-misc-menu .hover .file-info"],PLAYLIST_SORT_LIST:["#playlist-misc-menu .sort-list"],PLAYLIST_SORT_LIST_SELECTED:["#playlist-misc-menu .hover .sort-list"],PLAYLIST_LIST_BAR:["#playlist-list-menu.selected .bar"],PLAYLIST_NEW_LIST:["#playlist-list-menu .new-list"],PLAYLIST_NEW_LIST_SELECTED:["#playlist-list-menu .hover .new-list"],PLAYLIST_LOAD_LIST:["#playlist-list-menu .load-list"],PLAYLIST_LOAD_LIST_SELECTED:["#playlist-list-menu .hover .load-list"],PLAYLIST_SAVE_LIST:["#playlist-list-menu .save-list"],PLAYLIST_SAVE_LIST_SELECTED:["#playlist-list-menu .hover .save-list"],EQ_WINDOW_BACKGROUND:["#equalizer-window:not(.shade)"],EQ_TITLE_BAR:[".equalizer-top"],EQ_TITLE_BAR_SELECTED:[".selected .equalizer-top"],EQ_SLIDER_BACKGROUND:[".band"],EQ_SLIDER_THUMB:[".band .slider-handle"],EQ_SLIDER_THUMB_SELECTED:[".band.winamp-active .slider-handle"],EQ_ON_BUTTON:["#on"],EQ_ON_BUTTON_DEPRESSED:["#on.winamp-active"],EQ_ON_BUTTON_SELECTED:["#on.selected"],EQ_ON_BUTTON_SELECTED_DEPRESSED:["#on.selected.winamp-active"],EQ_AUTO_BUTTON:["#auto"],EQ_AUTO_BUTTON_DEPRESSED:["#auto.winamp-active"],EQ_AUTO_BUTTON_SELECTED:["#auto.selected"],EQ_AUTO_BUTTON_SELECTED_DEPRESSED:["#auto.selected.winamp-active"],EQ_GRAPH_BACKGROUND:["#eqGraph"],EQ_PRESETS_BUTTON:["#presets"],EQ_PRESETS_BUTTON_SELECTED:["#presets.winamp-active"],EQ_PREAMP_LINE:["#preamp-line"],EQ_SHADE_BACKGROUND:["#equalizer-window.shade"],EQ_SHADE_BACKGROUND_SELECTED:["#equalizer-window.shade.selected"],EQ_SHADE_VOLUME_SLIDER_LEFT:["#equalizer-volume.left::-webkit-slider-thumb","#equalizer-volume.left::-moz-range-thumb"],EQ_SHADE_VOLUME_SLIDER_CENTER:["#equalizer-volume.center::-webkit-slider-thumb","#equalizer-volume.center::-moz-range-thumb"],EQ_SHADE_VOLUME_SLIDER_RIGHT:["#equalizer-volume.right::-webkit-slider-thumb","#equalizer-volume.right::-moz-range-thumb"],EQ_SHADE_BALANCE_SLIDER_LEFT:["#equal
778izer-balance.left::-webkit-slider-thumb","#equalizer-balance.left::-moz-range-thumb"],EQ_SHADE_BALANCE_SLIDER_CENTER:["#equalizer-balance.center::-webkit-slider-thumb","#equalizer-balance.center::-moz-range-thumb"],EQ_SHADE_BALANCE_SLIDER_RIGHT:["#equalizer-balance.right::-webkit-slider-thumb","#equalizer-balance.right::-moz-range-thumb"],EQ_MAXIMIZE_BUTTON_ACTIVE:["#equalizer-shade.winamp-active"],EQ_MINIMIZE_BUTTON_ACTIVE:["#equalizer-window.shade #equalizer-shade.winamp-active"],EQ_CLOSE_BUTTON:["#equalizer-window.selected #eq-buttons.clicked #equalizer-close"],EQ_CLOSE_BUTTON_ACTIVE:["#equalizer-window.selected #eq-buttons.clicked #equalizer-close.winamp-active"],EQ_SHADE_CLOSE_BUTTON:["#equalizer-window.shade.selected #eq-buttons.clicked #equalizer-close"],EQ_SHADE_CLOSE_BUTTON_ACTIVE:["#equalizer-window.shade.selected #eq-buttons.clicked #equalizer-close.winamp-active"],MAIN_POSITION_SLIDER_BACKGROUND:["#position"],MAIN_POSITION_SLIDER_THUMB:["#position::-webkit-slider-thumb","#position::-moz-range-thumb"],MAIN_POSITION_SLIDER_THUMB_SELECTED:["#position:active::-webkit-slider-thumb","#position:active::-moz-range-thumb"],MAIN_SHUFFLE_BUTTON:["#shuffle"],MAIN_SHUFFLE_BUTTON_DEPRESSED:["#shuffle.winamp-active"],MAIN_SHUFFLE_BUTTON_SELECTED:["#shuffle.selected"],MAIN_SHUFFLE_BUTTON_SELECTED_DEPRESSED:["#shuffle.selected.winamp-active"],MAIN_REPEAT_BUTTON:["#repeat"],MAIN_REPEAT_BUTTON_DEPRESSED:["#repeat.winamp-active"],MAIN_REPEAT_BUTTON_SELECTED:["#repeat.selected"],MAIN_REPEAT_BUTTON_SELECTED_DEPRESSED:["#repeat.selected.winamp-active"],MAIN_EQ_BUTTON:["#equalizer-button"],MAIN_EQ_BUTTON_SELECTED:["#equalizer-button.selected"],MAIN_EQ_BUTTON_DEPRESSED:["#equal
778izer-button.winamp-active"],MAIN_EQ_BUTTON_DEPRESSED_SELECTED:["#equalizer-button.selected.winamp-button"],MAIN_PLAYLIST_BUTTON:["#playlist-button"],MAIN_PLAYLIST_BUTTON_SELECTED:["#playlist-button.selected"],MAIN_PLAYLIST_BUTTON_DEPRESSED:["#playlist-button.winamp-active"],MAIN_PLAYLIST_BUTTON_DEPRESSED_SELECTED:["#playlist-button.selected.winamp-active"],MAIN_TITLE_BAR:["#title-bar"],MAIN_TITLE_BAR_SELECTED:[".selected #title-bar"],MAIN_EASTER_EGG_TITLE_BAR:[".llama #title-bar"],MAIN_EASTER_EGG_TITLE_BAR_SELECTED:[".llama.selected #title-bar"],MAIN_OPTIONS_BUTTON:[".selected #title-bar #option.clicked"],MAIN_OPTIONS_BUTTON_DEPRESSED:[".selected #title-bar #option:active",".selected #title-bar #option.selected"],MAIN_MINIMIZE_BUTTON:[".selected #title-bar #minimize.clicked"],MAIN_MINIMIZE_BUTTON_DEPRESSED:[".selected #title-bar #minimize.winamp-active"],MAIN_SHADE_BUTTON:[".selected #title-bar #shade.clicked"],MAIN_SHADE_BUTTON_DEPRESSED:[".selected #title-bar #shade.winamp-active"],MAIN_CLOSE_BUTTON:[".selected #title-bar #close.clicked"],MAIN_CLOSE_BUTTON_DEPRESSED:[".selected #title-bar #close.winamp-active"],MAIN_CLUTTER_BAR_BACKGROUND:["#clutter-bar"],MAIN_CLUTTER_BAR_BACKGROUND_DISABLED:["#clutter-bar.disabled"],MAIN_CLUTTER_BAR_BUTTON_O_SELECTED:["#button-o:active","#button-0.selected"],MAIN_CLUTTER_BAR_BUTTON_A_SELECTED:["#button-a:active","#button-a.selected"],MAIN_CLUTTER_BAR_BUTTON_I_SELECTED:["#button-i:active","#button-i.selected"],MAIN_CLUTTER_BAR_BUTTON_D_SELECTED:["#button-d:active","#button-d.selected"],MAIN_CLUTTER_BAR_BUTTON_V_SELECTED:["#button-v:active","#button-v.selected"],MAIN_SHADE_BACKGROUND:[".shade #title-bar"],MAIN_SHADE_BACKGROUND_SELECTED:[".shade.selected #title-bar"],MAIN_SHADE_BUTTON_SELECTED:[".shade.selected #title-bar #shade"],MAIN_SHADE_BUTTON_SELECTED_DEPRESSED:[".shade #title-bar #shade.winamp-active"],MAIN_SHADE_POSITION_BACKGROUND:[".shade #position"],MAIN_SHADE_POSITION_THUMB:[".shade #position::-moz-range-thumb",".shade #position::-webkit-slider-thumb"],MAIN_SHADE_POSITION_THUMB_LEFT:[".shade #position.left::-moz-range-thumb",".shade #position.left::-webkit-slider-thumb"],MAIN_SHADE_POSITION_THUMB_RIGHT:[".shade #position.right::-moz-range-thumb",".shade #position.right::-webkit-slider-thumb"],MAIN_VOLUME_BACKGROUND:["#volume"],MAIN_VOLUME_THUMB:["#volume input::-webkit-slider-thumb","#volume input::-moz-range-thumb"],MAIN_VOLUME_THUMB_SELECTED:["#volume input:active::-webkit-slider-thumb","#volume input:active::-moz-range-thumb"],GEN_TOP_CENTER_FILL:[".gen-window .gen-top"],GEN_TOP_LEFT:[".gen-window .gen-top-left"],GEN_TOP_LEFT_END:[".gen-window .gen-top-left-end"],GEN_TOP_RIGHT:[".gen-window .gen-top-right"],GEN_TOP_RIGHT_END:[".gen-window .gen-top-right-end"],GEN_TOP_LEFT_RIGHT_FILL:[".gen-window .gen-top-left-fill",".gen-window .gen-top-right-fill"],GEN_TOP_CENTER_FILL_SELECTED:[".gen-window.selected .gen-top"],GEN_TOP_LEFT_SELECTED:[".gen-window.selected .gen-top-left"],GEN_TOP_LEFT_END_SELECTED:[".gen-window.selected .gen-top-left-end"],GEN_TOP_RIGHT_SELECTED:[".gen-window.selected .gen-top-right"],GEN_TOP_RIGHT_END_SELECTED:[".gen-window.selected .gen-top-right-end"],GEN_TOP_LEFT_RIGHT_FILL_SELECTED:[".gen-window.selected .gen-top-left-fill",".gen-window.selected .gen-top-right-fill"],GEN_BOTTOM_LEFT:[".gen-window .gen-bottom-left"],GEN_BOTTOM_RIGHT:[".gen-window .gen-bottom-right"],GEN_BOTTOM_FILL:[".gen-window .gen-bottom"],GEN_MIDDLE_LEFT:[".gen-window .gen-middle-left"],GEN_MIDDLE_LEFT_BOTTOM:[".gen-window .gen-middle-left-bottom"],GEN_MIDDLE_RIGHT:[".gen-window .gen-middle-right"],GEN_MIDDLE_RIGHT_BOTTOM:[".gen-window .gen-middle-right-bottom"],GEN_CLOSE_SELECTED:[".gen-window .gen-close.winamp-active"]};Object.keys(pv).forEach(r0=>{const e0=fv(r0),n0=r0.charCodeAt(0);eT[e0]=[`.character-${n0}`]}),_b.forEach(r0=>{eT[`GEN_TEXT_${r0}`]=[`.gen-text-${r0.toLowerCase()}`],eT[`GEN_TEXT_SELECTED_${r0}`]=[`.gen-window.selected .gen-text-${r0.toLowerCase()}`]});const tT={CLOSE:["#title-bar #close"],EQSLID:["#equalizer-window .band"],EQNORMAL:["#equalizer-window"],EQCLOSE:["#equal
778izer-window #equalizer-close"],EQTITLE:["#equalizer-window .title-bar","#equalizer-window.shade","#equalizer-window.shade input"],MAINMENU:["#main-window #option","#webamp-context-menu .context-menu"],MIN:["#main-window #minimize"],NORMAL:[".window",".window input","#main-window","#main-window.shade #title-bar"],MMENU:["#main-window.shade #option"],PNORMAL:["#playlist-window"],PTBAR:["#playlist-window .playlist-top"],PCLOSE:["#playlist-window #playlist-close-button","#playlist-window-shade #playlist-close-button"],PWINBUT:["#playlist-window #playlist-shade-button","#playlist-window-shade #playlist-shade-button"],POSBAR:["#main-window #position"],PSIZE:["#playlist-window #playlist-resize-target"],PWSSIZE:["#playlist-window-shade #playlist-resize-target"],PWSNORM:["#playlist-window-shade"],PVSCROLL:["#playlist-window .playlist-scrollbar"],SONGNAME:["#main-window #marquee"],TITLEBAR:["#main-window #title-bar"],VOLBAL:["#volume","#volume input","#balance"],WINBUT:["#main-window #shade"],WSNORMAL:["#main-window.shade #title-bar"],WSPOSBAR:["#main-window.shade #position"]};function nT({children:r0,id:e0}){const n0=nr.useMemo(()=>{const a0=document.createElement("style");return a0.type="text/css",e0!=null&&(a0.id=e0),a0},[e0]);return nr.useLayoutEffect(()=>(document.head.appendChild(n0),()=>n0.remove()),[n0]),dr.createPortal(r0,n0)}function aT({children:r0}){const e0=nr.useMemo(()=>document.createElement("div"),[]);return nr.useLayoutEffect(()=>(document.body.appendChild(e0),()=>e0.remove()),[e0]),dr.createPortal(ga.jsx("svg",{height:0,width:0,children:ga.jsx("defs",{children:Object.keys(r0).map(n0=>ga.jsx("clipPath",{id:n0,children:r0[n0].map((a0,i0)=>ga.jsx("polygon",{points:a0},i0))},n0))})}),e0)}function rT(r0,e0,n0=0,a0=r0.length){if(a0%e0)throw new Error("Bad buffer length.");for(let i0=n0;i0<a0;i0+=e0)iT(r0,e0,i0)}function iT(r0,e0,n0){e0--;for(let a0=0;a0<e0;a0++){let i0=r0[n0+a0];r0[n0+a0]=r0[n0+e0],r0[n0+e0]=i0,e0--}}class AT{constructor(e0,n0=!1,a0=!1){this.bits=e0,this.bytes=e0<8?1:Math.ceil(e0/8),this.max=Math.pow(2,e0)-1,this.min=0;let i0=8-(1+(e0-1|7)-e0);this.lastByteMask_=Math.pow(2,i0>0?i0:8)-1,this.unpack=this.unpackUnsigned_,n0&&(this.max=Math.pow(2,e0)/2-1,this.min=-this.max-1,this.unpack=this.unpackSigned_),a0&&(this.overflow_=this.overflowClamp_)}pack(e0,n0,a0=0){if(n0!=n0||n0.constructor!=Number)throw new TypeError;n0=this.overflow_(n0),e0[a0]=255&(n0<0?n0+Math.pow(2,this.bits):n0),a0++;for(let i0=2,s0=this.bytes;i0<s0;i0++)e0[a0]=255&Math.floor(n0/Math.pow(2,8*(i0-1))),a0++;return this.bits>8&&(e0[a0]=Math.floor(n0/Math.pow(2,8*(this.bytes-1)))&this.lastByteMask_,a0++),a0}unpack_(e0,n0=0){let a0=0;for(let i0=0;i0<this.bytes;i0++)a0+=e0[n0+i0]*Math.pow(256,i0);return a0}unpackUnsigned_(e0,n0=0){return this.overflow_(this.unpack_(e0,n0))}unpackSigned_(e0,n0=0){return this.overflow_(this.sign_(this.unpack_(e0,n0)))}overflow_(e0){if(e0>this.max||e0<this.min)throw new RangeError;return e0}overflowClamp_(e0){return e0>this.max?this.max:e0<this.min?this.min:e0}sign_(e0){return e0>this.max&&(e0-=2*this.max+2),e0}}class sT{constructor(e0,n0){this.ebits=e0,this.fbits=n0,this.bias=(1<<e0-1)-1,this.numBytes=Math.ceil((e0+n0)/8),this.biasP2=Math.pow(2,this.bias+1),this.ebitsFbits=e0+n0,this.fbias=Math.pow(2,-(8*this.numBytes-1-e0))}pack(e0,n0,a0){if(typeof n0!="number")throw new TypeError;Math.abs(n0)>this.biasP2-2*this.ebitsFbits&&(n0=n0<0?-1/0:1/0);let i0=((n0=+n0)||1/n0)<0||n0<0?1:0;n0=Math.abs(n0);let s0=Math.min(Math.floor(Math.log(n0)/Math.LN2),1023),o0=oT(n0/Math.pow(2,s0)*Math.pow(2,this.fbits));return n0!=n0?(o0=Math.pow(2,this.fbits-1),s0=(1<<this.ebits)-1):n0!==0&&(n0>=Math.pow(2,1-this.bias)?(o0/Math.pow(2,this.fbits)>=2&&(s0+=1,o0=1),s0>this.bias?(s0=(1<<this.ebits)-1,o0=0):(s0+=this.bias,o0=oT(o0)-Math.pow(2,this.fbits))):(o0=oT(n0/Math.pow(2,1-this.bias-this.fbits)),s0=0)),this.packFloatBits_(e0,a0,i0,s0,o0)}unpack(e0,n0){let a0,i0=(1<<this.ebits)-1,s0="";for(let c0=this.numBytes-1;c0>=0;c0--){let u0=e0[c0+n0].toString(2);s0+="00000000".substring(u0.length)+u0}let o0=s0.charAt(0)=="1"?-1:1;s0=s0.substring(1);let l0=parseInt(s0.substring(0,this.ebits),2);return s0=s0.substring(this.ebits),l0==i0?parseInt(s0,2)!==0?NaN:o0*(1/0):(l0===0?(l0+=1,a0=parseInt(s0,2)):a0=parseInt("1"+s0,2),o0*a0*this.fbias*Math.pow(2,l0-this.bias))}packFloatBits_(e0,n0,a0,i0,s0){let o0=[];o0.push(a0);for(let h0=this.ebits;h0>0;h0-=1)o0[h0]=i0%2?1:0,i0=Math.floor(i0/2);let l0=o0.length;for(let h0=this.fbits;h0>0;h0-=1)o0[l0+h0]=s0%2?1:0,s0=Math.floor(s0/2);let c0=o0.join(""),u0=this.numBytes+n0-1,d0=n0;for(;u0>=n0;)e0[u0]=parseInt(c0.substring(0,8),2),c0=c0.substring(8),u0--,d0++;return d0}}function oT(r0){let e0=Math.floor(r0),n0=r0-e0;return n0<.5?e0:n0>.5||e0%2?e0+1:e0}function lT(r0,e0=0,n0=r0.length){return function(a0,i0=0,s0=a0.length){let o0="";for(let l0=i0;l0<s0;){let c0=128,u0=191,d0=!1,h0=a0[l0++];if(h0>=0&&h0<=127)o0+=String.fromCharCode(h0);else{let f0=0;h0>=194&&h0<=223?f0=1:h0>=224&&h0<=239?(f0=2,a0[l0]===224&&(c0=160),a0[l0]===237&&(u0=159)):h0>=240&&h0<=244?(f0=3,a0[l0]===240&&(c0=144),a0[l0]===244&&(u0=143)):d0=!0,h0&=(1<<8-f0-1)-1;for(let p0=0;p0<f0;p0++)(a0[l0]<c0||a0[l0]>u0)&&(d0=!0),h0=h0<<6|63&a0[l0],l0++;d0?o0+="�":h0<=65535?o0+=String.fromCharCode(h0):(h0-=65536,o0+=String.fromCharCode(55296+(h0>>10&1023),56320+(1023&h0)))}}return o0}(r0,e0,n0)}function cT(r0,e0,n0=0,a0=r0.length,i0=!1,s0=!1){let o0=[];return function(l0,c0,u0,d0=0,h0=l0.length,f0=!1,p0=!1){let A0=function(y0,b0,E0,w0){return b0?function(v0){if(!v0||v0!==16&&v0!==32&&v0!==64)throw new Error(dT+": float, bits: "+v0)}(y0):function(v0){if(!v0||v0<1||v0>53)throw new Error(dT+": int, bits: "+v0)}(y0),b0&&y0===16?new sT(5,11):b0&&y0==32?new sT(8,23):b0&&y0==64?new sT(11,52):new AT(y0,E0,w0)}((c0=c0||{}).bits,c0.fp,c0.signed,p0),m0=Math.ceil(c0.bits/8);h0=function(y0,b0,E0,w0,v0){let S0=(E0-b0)%w0;if(v0&&(S0||y0.length<w0))throw new Error("Bad buffer length");return E0-S0}(l0,d0,h0,m0,f0);let x0=0,g0=d0;try{for(c0.be&&rT(l0,m0,d0,h0);g0<h0;g0+=m0,x0++)u0[x0]=A0.unpack(l0,g0);c0.be&&rT(l0,m0,d0,h0)}catch(y0){(function(b0,E0,w0){throw b0.message=b0.constructor.name+" at index "+w0+": "+E0,b0})(y0,l0.slice(g0,g0+m0),g0)}}(r0,e0,o0,n0,a0,i0,s0),o0}function uT(r0,e0,n0=0,a0=!1){return cT(r0,e0,n0,n0+Math.ceil(e0.bits/8),!0,a0)[0]}const dT="Unsupported type";class hT{constructor(){this.container="",this.chunkSize=0,this.format="",this.signature=null,this.head=0,this.uInt32={bits:32,be:!1,signed:!1,fp:!1},this.supported_containers=["RIFF","RIFX"]}
778setSignature(e0){if(this.head=0,this.container=this.readString(e0,4),this.supported_containers.indexOf(this.container)===-1)throw Error("Not a supported format.");this.uInt32.be=this.container==="RIFX",this.chunkSize=this.readUInt32(e0),this.format=this.readString(e0,4),this.signature={chunkId:this.container,chunkSize:this.chunkSize,format:this.format,subChunks:this.getSubChunksIndex_(e0),chunkData:{start:0,end:this.chunkSize}}}findChunk(e0,n0=!1){let a0=this.signature.subChunks,i0=[];for(let s0=0;s0<a0.length;s0++)if(a0[s0].chunkId==e0){if(!n0)return a0[s0];i0.push(a0[s0])}return e0=="LIST"&&i0.length?i0:null}readString(e0,n0){let a0="";return a0=lT(e0,this.head,this.head+n0),this.head+=n0,a0}readUInt32(e0){let n0=uT(e0,this.uInt32,this.head);return this.head+=4,n0}getSubChunksIndex_(e0){let n0=[],a0=this.head;for(;a0<=e0.length-8;)n0.push(this.getSubChunkIndex_(e0,a0)),a0+=8+n0[n0.length-1].chunkSize,a0=a0%2?a0+1:a0;return n0}getSubChunkIndex_(e0,n0){let a0={chunkId:this.getChunkId_(e0,n0),chunkSize:this.getChunkSize_(e0,n0)};if(a0.chunkId=="LIST")a0.format=lT(e0,n0+8,n0+12),this.head+=4,a0.subChunks=this.getSubChunksIndex_(e0);
778else{let i0=a0.chunkSize%2?a0.chunkSize+1:a0.chunkSize;this.head=n0+8+i0,a0.chunkData={start:n0+8,end:this.head}}return a0}getChunkId_(e0,n0){return this.head+=4,lT(e0,n0,n0+4)}getChunkSize_(e0,n0){return this.head+=4,uT(e0,this.uInt32,n0+4)}}const pT={bits:32,be:!1,signed:!1,fp:!1},fT=1e3/60;let gT=0;const mT=()=>gT++,wT="#webamp",bT={normal:"mainWindowClipPath",windowshade:"shadeMainWindowClipPath",equalizer:"equalizerWindowClipPath",equalizerws:"shadeEqualizerWindowClipPath"},ET={normal:"#main-window:not(.shade)",windowshade:"#main-window.shade",equalizer:"#equalizer-window:not(.shade)",equalizerws:"#equalizer-window.shade"},yT={MAIN_BALANCE_BACKGROUND:"MAIN_VOLUME_BACKGROUND",MAIN_BALANCE_THUMB:"MAIN_VOLUME_THUMB",MAIN_BALANCE_THUMB_ACTIVE:"MAIN_VOLUME_THUMB_SELECTED",EQ_MAXIMIZE_BUTTON_ACTIVE:"EQ_MAXIMIZE_BUTTON_ACTIVE_FALLBACK"};function kT(r0){return`${r0.startsWith("#webamp-context-menu")?"":wT} ${r0}`}const vT=IE(function(r0){return r0.display.skinImages},function(r0){return r0.display.skinCursors},function(r0){return r0.display.skinGenLetterWidths},Ok,(r0,e0,n0,a0)=>{if(!r0||!e0)return null;const i0=[];Object.keys(eT).forEach(s0=>{const o0=r0[s0]||r0[yT[s0]];o0&&eT[s0].forEach(l0=>{const c0=l0;i0.push(`${wT} ${c0} {background-image: url(${o0})}`)})}),n0!=null&&_b.forEach(s0=>{const o0=n0[`GEN_TEXT_${s0}`],l0=n0[`GEN_TEXT_SELECTED_${s0}`];i0.push(`${wT} .gen-text-${s0.toLowerCase()} {width: ${o0}px;}`),i0.push(`${wT} .selected .gen-text-${s0.toLowerCase()} {width: ${l0}px;}`)}),Object.entries(tT).forEach(([s0,o0])=>{const l0=e0[s0];if(l0==null)return;const c0=o0.map(kT).map(u0=>{switch(l0.type){case"cur":return`${u0} {cursor: url(${l0.url}), auto}`;case"ani":try{return function(d0,h0){const f0=function(A0){var m0;const x0=function(w0){const v0=new hT;v0.setSignature(w0);const S0=v0.signature;if(S0.format!=="ACON")throw new Error(`Expected format. Expected "ACON", got "${S0.format}"`);function k0(B0,z0){const G0=v0.findChunk(B0);return G0==null?null:z0(G0)}function R0(B0,z0){return B0.subChunks.slice(0,z0).map(G0=>{if(G0.chunkId!=="icon")throw new Error(`Unexpected chunk type in fram: ${G0.chunkId}`);return w0.slice(G0.chunkData.start,G0.chunkData.end)})}const j0=k0("anih",B0=>{const z0=cT(w0,pT,B0.chunkData.start,B0.chunkData.end);return{cbSize:z0[0],nFrames:z0[1],nSteps:z0[2],iWidth:z0[3],iHeight:z0[4],iBitCount:z0[5],nPlanes:z0[6],iDispRate:z0[7],bfAttributes:z0[8]}});if(j0==null)throw new Error("Did not find anih");const C0=k0("rate",B0=>cT(w0,pT,B0.chunkData.start,B0.chunkData.end)),$0=k0("seq ",B0=>cT(w0,pT,B0.chunkData.start,B0.chunkData.end)),T0=v0.findChunk("LIST",!0),I0=T0==null?void 0:T0.find(B0=>B0.format==="fram");if(I0==null)throw new Error("Did not find fram LIST");let M0=R0(I0,j0.nFrames),N0=null,D0=null;const O0=T0==null?void 0:T0.find(B0=>B0.format==="INFO");return O0!=null&&O0.subChunks.forEach(B0=>{switch(B0.chunkId){case"INAM":N0=lT(w0,B0.chunkData.start,B0.chunkData.end);break;case"IART":D0=lT(w0,B0.chunkData.start,B0.chunkData.end);break;case"LIST":B0.format==="fram"&&(M0=R0(B0,j0.nFrames))}}),{images:M0,rate:C0,seq:$0,metadata:j0,artist:D0,title:N0}}(A0),g0=(m0=x0.rate)!==null&&m0!==void 0?m0:x0.images.map(()=>x0.metadata.iDispRate),y0=g0.reduce((w0,v0)=>w0+v0,0),b0=x0.images.map(w0=>{return{url:(v0=w0,`data:image/x-win-bitmap;base64,${S0=v0,window.btoa(Array.from(S0).map(k0=>String.fromCharCode(k0)).join(""))}`),percents:[]};var v0,S0});let E0=0;
778return g0.forEach((w0,v0)=>{const S0=x0.seq?x0.seq[v0]:v0;b0[S0].percents.push(E0/y0*100),E0+=w0}),{duration:y0*fT,frames:b0}}(h0),p0=`ani-cursor-${mT()}`;return` 779 @keyframes ${p0} { 780 ${f0.frames.map(({url:A0,percents:m0})=>`${m0.map(x0=>`${x0}%`).join(", ")} { cursor: url(${A0}), auto; }`).join(` 781`)} 782 } 783 ${d0}:hover { 784 animation: ${p0} ${f0.duration}ms step-end infinite; 785 } 786 `}(u0,l0.aniData)}catch{return null}default:return null}}).filter(Boolean);i0.push(...c0)}),(s0=>!!s0.DIGIT_0_EX)(r0)&&i0.push(`${wT} .webamp-status #time #minus-sign { top: 0px; left: -1px; width: 9px; height: 13px; }`);for(const[s0,o0]of Object.entries(a0))if(o0){const l0=ET[s0],c0=bT[s0];i0.push(`${wT} ${l0} { clip-path: url(#${c0}); }`)}return i0.join(` 787`)}),ST=IE(Ok,r0=>{const e0={};for(const[n0,a0]of Object.entries(r0))a0&&(e0[bT[n0]]=a0);return e0});function IT(){const r0=SI(vT),e0=SI(ST);return r0==null?null:ga.jsxs(ga.Fragment,{children:[ga.jsx(nT,{id:"webamp-skin",children:r0}),ga.jsx(aT,{children:e0})]})}function CT({media:r0,filePickers:e0,onMount:n0,parentDomNode:a0}){const i0=SI(Dk),s0=SI(wy),o0=SI(qy),l0=II(cv),c0=II(iv),[u0]=nr.useState(()=>{const h0=document.createElement("div");return h0.id="webamp",h0.role="application",h0});nr.useLayoutEffect(()=>{u0.style.zIndex=String(o0)},[u0,o0]),nr.useLayoutEffect(()=>(a0.appendChild(u0),()=>{a0.removeChild(u0)}),[u0,a0]),nr.useEffect(()=>{const h0=()=>{u0!=null&&(u0.style.right="0",u0.style.bottom="0",u0.style.overflow="hidden",l0(wE(),a0),u0.style.right="auto",u0.style.bottom="auto",u0.style.overflow="visible")};return h0(),window.addEventListener("resize",h0),()=>{window.removeEventListener("resize",h0)}},[a0,l0,u0]),nr.useEffect(()=>{n0!=null&&n0()},[n0]);const d0=nr.useCallback(()=>fE(s0,(h0,f0)=>{if(!h0.open)return null;switch(f0){case xb:return ga.jsx(yx,{analyser:r0.getAnalyser(),filePickers:e0});case Bb:return ga.jsx($x,{});case Tb:return ga.jsx(Vx,{analyser:r0.getAnalyser()});case Ub:return ga.jsx(tC,{analyser:r0.getAnalyser()});default:throw new Error(`Tried to render an unknown window: ${f0}`)}}),[r0,e0,s0]);return i0?null:hr.createPortal(ga.jsxs(nr.StrictMode,{children:[ga.jsx(nT,{children:`#webamp #balance {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAGkCAMAAABq7Kf7AAACvlBMVEUVfwoWFiMXFyQXGCUYFyUYGCYYkgsZLhwbGyschRIeaRYfHzIjIzgomRwpOCEujhYunBIvL0QvL0kvgBwxMU0xMU4yMU4yMk8zM1AzNFEzNFI0M1E0M1I0NFE0NFM0shU1NVQ1NlM1NlQ2NVM2NVQ2NlU2NlY2NyE3N1c3OFc3OFg4Jh04N1c4N1g4OFc4OFk5Gh05LSA5OVo7TkFCtiZHhidIcy1JSWNMi0BMlSVPU0RPpCNRQkBRmyxSMT5TUm9WqypauihbgTZcmyxcwCpixDFlvjdnoCxnsStp2TBrpU1rwCpuboRuj0Nw1T5xci5yxypz3D50QiR0xzF3JSJ3VCl3oDF3tCt30zB62jB7epB8e458fJB9fZB9fZJ+fpJ/1T6BxyqC3D6Eq1WEtDGEwF2F4jeGi0KGoYiHh5iIoDGJVi6KKSiKRC2KYzaKxDCLfjiLi5yLmCyMjJyNmiyOWxeOjp6OmyyQxzGRODmRTT2RWj2RbkKS4TCTk6KUyjiXXCGXrI+XtDGawmCa4z6bXSGbaSebfieb2jmeYhKeayaeriufFhufKhufPiGfSSGfVyGfbCefgSefkCyfmyygaTqho1Cj4Tik20Wk4jimNDemxzGpfEqprI+p40atkouuV0auag2uwCqwYh+xv16yERayKBayRx6ydiWynCqyriuyxDG3RUu94Ti/bRu/dRC/uyq/0zDAhFPB4kbCb1PCk1fCs1zDciPD1T7FDBLFJxLFQxvFURvFZRvFgCPFnCPFsSrFwCrF2TDGeA/G2jDIxdPI2z7JVyLJgSDJhSnJoCnJtDHJxDHJ3D7Zbx7ZfB/ZjifZlDfZrCfZsTfZwzDZxj7bhC/b1jXfsSjgDhXgHybgLBXgPCbgTB7gWC7gXB7gZy7gch7gfC7gkijgsijgyTDg2zfhmTfhtjfhzD7A/9hgAAAEC0lEQVRo3u3U+VeUZRTA8VeyQtQgKd6XZnGEmXEcmxkLG8YlBdTUCaRGSFFTA02zFBPTssUFF1zac4UKQkXUUrNUIHBLzX0PK3et9L/ouc8z2g+ec2/HX/I93u+ZMz/d877n3Ps5rxYI+J4O+AI+n88Dud0ut8vldDpSUlPtVrvdarNZDEPXAiIx4/V7/Z5Ocs7tcrqcDpGYs1qTYczQ5JDI740+DR7nTEnpYE+1i4dZbRaLoRvaY60fbCl6AP5axoifqEVMi9vFxLZpZ9O11g/HUT2abmixcRpVMFvX2sS1egivVWiarrVLS2yLFxpfomvuQO/sYaNUI0eNhEbcarjo5dc+KEnXNR+s1uv3dZL7cLlgt05HqgO2a7Ulwzp0PUmD1Xr9fo/nSbk0OAGs1gFLs1mSxWoNPUmMyRvAkJjyiCmXw5HSAcasVssTcAFdjkXv6Zc3UC8VQ/KVNptxawyO5fdFXymnHE71SnFPiwXunvR4krbvP6Xd45AS8eLSJKT4BLx4CSkxoT1egoIU6ooXZkhmg/RI8Bm8oIQU7NYDr1sIIAUzMvEywgrSc3jh2QzJdJCexYtCysjsi5WZISGF+g3E66cghQe9iDVoLEMyH6Q+eFFIA57HG5ADkLIGDy3AGjq4SEEaXYg1miGZEVJ/rH8hvYB1G1LBq1gFClL3cCE6VsiQTANJSjIAUn+irLR0LTZryCtEQ3KyBaTi94mKi6YBpLK5aGWls0tISCDpzXSGdI9AynqJSEEaU/w2WvEYgJQzs2z5SqTlZTMlpKIVX6GtKP2SITEkhnQfQuqYO4Eot7uAlDunnGjOOIBU/i1R+TKAtGwr0WqGZDpIU6ZOR5o6RUFa/A3RYoA0bsOWPT8j7dmyQUHasf8o0v4dDIkhMSSGxJAYEkNiSP8zpC+IFKT1m3ejbV4PkCYfaW7+C6m5+YiChE6JuW0MyXSQPifK7QmQancR1UpIh8/8iXbmsIJ09ibaWYbEkBgSQ2JIDOluIT2Vv+AztAVRSDuJaicDpEOnzl1HOnfqkIRUcfoG2mmGZD5I8xd9irRofj5Ayl/XRLTuPQFp0sET19BOHKwQkHpWnPwb7eSPXzMkhsSQ7kNInSOz5qHNUpCqvyOqniQgvb79ONF2CWnpr0TfMyTTQXqLKAKQIguriBYCpPyqTXvRNlUpSE2/oDVVMCTTQfqESH6RItWNRNXvwhep8dgVtGONCtJVIv4imQ/Sx0SRXgCp5ieiGoA08cAlogMSUuVloh8Ykskgdcn7iCgKqYGoZgZAarhA1FApIPWqvEjEkMwH6UOiPICUt7aeaO07AtIb9X8Q1UtIq84TVTIk00FaQqQgrakjWiMh1f1GVLdRQvqdaCNDuqN/AItpcu8L5wnUAAAAAElFTkSuQmCC)} 788#webamp #balance::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYvL0RKWmt7hJStvMTa5+opTTwbAAAAMUlEQVQI12NQFAQBIQaxNBBIZGALBYIQAyAtKiqKlwapM2RgcwEBQwZhYxAwZICaBwCdgQ6Jd297uQAAAABJRU5ErkJggg==)} 789#webamp #balance::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYvL0RKWmt7hJStvMTa5+opTTwbAAAAMUlEQVQI12NQFAQBIQaxNBBIZGALBYIQAyAtKiqKlwapM2RgcwEBQwZhYxAwZICaBwCdgQ6Jd297uQAAAABJRU5ErkJggg==)} 790#webamp #balance:active::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYZICovL0RKWmva5+r///+U4Y9MAAAAMUlEQVQI12MwFAQBYQbRUBAQZGBlAAIWBiQ6ISEBKw2SV4TTIi4gIMhgJKQopCgoDAB2aAh/NddRQgAAAABJRU5ErkJggg==)} 791#webamp #balance:active::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYZICovL0RKWmva5+r///+U4Y9MAAAAMUlEQVQI12MwFAQBYQbRUBAQZGBlAAIWBiQ6ISEBKw2SV4TTIi4gIMhgJKQopCgoDAB2aAh/NddRQgAAAABJRU5ErkJggg==)} 792#webamp .actions #previous {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAASFBMVEUfHzEgHzIgIDMhITQiITMiITQiIjUjIzYjJDgkIzckIzgkJDklJTolJjsmJTsmJjtKWmtSY3N7hJSElKWXqLmttca9ztbv//8qmLzOAAAAcklEQVQY022QMQ7DMAwDj7KQvqD/f2UXD2YGN43cWAuNo0wI1JvNjE8SGzwiwf/Ywwr2k1M6HFMPwDgvvxnoU2DN6fl7xh7X/YJx4a/yte67FaPmV2O5pxi5ZN/Gt5+rI998DD/ridxiLAQiHBKEJYGaT1TOJE+BDpf2AAAAAElFTkSuQmCC)} 793#webamp .actions #previous.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASBAMAAABCyVggAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAAS0lEQVQI12NgwA1MXKDACMhxDYWCEBAHJuOChcPAAsQwDmOIi4MoEocRieMgiMRhROYEInNckTkugcgcVzgnNASIwRxTZOcoIHwDAI4lI4lOrG7eAAAAAElFTkSuQmCC)} 794#webamp .actions #play {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAARVBMVEUmJTsmJTwnJz0nKD4oJz4oKD8pKUAqKUEqKUIqKkMrK0QrLEQsK0MsK0QsK0ZKWmtSY3N7hJSElKWXqLmttca9ztbv//93JWkaAAAAcElEQVQY022Q
794QQ7FIAhEHzJpL/Dvf8y/MBG70VZbYEPeAIGxH0nEX5QEB4L+xj26CnkMXus2QJv92hXXrETluHnT07MqrnV6UbSfcY6rY+N+/1KUUTBl9Nl/vtxow5+PRyKif+1xpZhmmIEZMxFh+AXgtiNLLYv6agAAAABJRU5ErkJggg==)} 795#webamp .actions #play.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASBAMAAABCyVggAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAARUlEQVQI12NgwA1MXKDACMhxDYWCEBAHJuOChcOAzGFkQOYIMiBzwDw4B8RDcEKROKFIykKRDAhFMjoUbqkpsnMUEL4BAGRUIvLymjxCAAAAAElFTkSuQmCC)} 796#webamp .actions #pause {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAARVBMVEUsLEUsLEYtLUctLkguLUguLkkvL0ovMEswL0swL0wwMEsxMU0xMU4xMk0yMU5KWmtSY3N7hJSElKWXqLmttca9ztbv//90IK75AAAAY0lEQVQYGW3BwQ3DQAwDwRVPsBtI/3UGfpCBDfiT00x9GPjbiI2dhvAnjsSsuV3AARdwAMHNo1kBmhVuEjMxEyOLkcRMzMRIze3kcfJyQyA8wqsaO2zSdtitogqqqEoJIgTLP/lyHlITiB2JAAAAAElFTkSuQmCC)} 797#webamp .actions #pause.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASBAMAAABCyVggAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAAOUlEQVQI12NgwA1MXKDACMhxDYWCEBAHJuOCyXFgYAEyYBzBEBdGUdpzXENDXEJDwRxTZOcoIHwDAEquItl9JSARAAAAAElFTkSuQmCC)} 798#webamp .actions #stop {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAAP1BMVEUyMU4yMk8zM1AzNFE0M1E0M1I0NFE0NFM1NVQ1NlQ2NVM2NVQ2NlVKWmtSY3N7hJSElKWXqLmttca9ztbv//8mgTHJAAAAXElEQVQYGW3BQQ7DMAwDwRUttPf+/6FFD2SBBLnYmqkPA38bcbBpCJs4ErPm8uPxAgLNrbmtcBGjiFHETIyWGFmMIkarubzZNAQIm8YOB7cdTqsooERWkEXJheoPfCIcRKB1vkQAAAAASUVORK5CYII=)} 799#webamp .actions #stop.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASBAMAAABCyVggAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAAMklEQVQI12NgwA1MXKDACMhxDYWCEBAHJuOChQPWC+MwCgoKitKBA3YamGOK7BwFhG8A34IfFkPmwnYAAAAASUVORK5CYII=)} 800#webamp .actions #next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASBAMAAABCyVggAAAALVBMVEUICBA2NlU2NlY3N1c4N1g4OFk4OFpKWmtSY3N7hJSElKWXqLmttca9ztbv//8TuYuxAAAAaUlEQVQI12M4AwenDjCcewcDJ4Ccu1BwZzkmp/zu3evld+9MB3Oqa+9e3wfnbEfm7K5F5mxH5uxD5rxF4uxDNuAtEufd3bv33kE4cFcDOWdWzoSC6QkMK8rhgIFB0MjY2NjFxSU0NJQBAK7vnSRnYMknAAAAAElFTkSuQmCC)} 801#webamp .actions #next.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAATElEQVQI12NgwAVMXCDAWYGBwTUUChyAbKi4CyabAcSAshlZXBxEYWwBJLYgCxJbAIktisQOQbBFkfSGINihLi6uoSC2KZIbFOCuBwDE5iIH3QcLbQAAAABJRU5ErkJggg==)} 802#webamp #eject {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQBAMAAADgw5IVAAAAIVBMVEU4OFk4OFo5OVpKWmtSY3N7hJSElKWXqLmttca9ztbv//8Mnk1wAAAAVUlEQVQI12PogIM2hq5VMNDC0DUTCmYEQ9iWCPbkYgTbvNwSxp5cXl4MY5uXlwMlwOxZYBPh5sDNnGwMAlA2UHl5FYZ6uNuCGTpSQ6EgmEGISQkKmAB+iFckwoyJQwAAAABJRU5ErkJggg==)} 803#webamp #eject.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQBAMAAADgw5IVAAAAElBMVEUICBBKWmtSa3Nje4R7jJytvcYAUCbCAAAATUlEQVQI12NgwAVMXCDAWYGBwTUUChyAbJAgCxBD2Q4CCDajIAuM7SAoKABjMwoKAiXAbIhJMPVgAGY7gO2EsoHKBUXR1ZsiqVeAuxIAu8seNVNafDwAAAAASUVORK5CYII=)} 804#webamp #main-window {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAB0CAMAAACR8SbcAAACEFBMVEUAAAAAUoQAarID9gUNDRQPDxcQEBkRERsTEh0TFB0UEx4UFBQUFBsUFB8VFSAVFSIVFiEVFiIWFSEWFSIWFiEWFiIXFyIXFyQXGCQYFyQYGCUYGCkZGSYZGicZGigaGScaGSgaGicaGikbGyobHCsbHCwcGyscGywcHCscHCwdHS0dHS4dHi0dHi4eHS0eHS4eHi0eHi8fHzAfHzIfIDEgHzEgIDEgIDMhITQhIjMhIjQiITMiITQiIjMiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklHAolJTolJTwlJjslJjwmJTsmJTwmJjsmJz0nJz4nKD4oJz0oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0MsK0QsLEUsLUUtLUYtLUgtLkctLkguLUcuLUguLkcuLkkvL0ovMCUvMEswL0swMEswMEwxMU0xMU4xMk0xMk4yMU0yMU4yMk0yMk8zM1AzM1IzNFE0M1E0NFE0NFM1NVQ1NlQ2LRE2NVM2NVQ2NlU2NlY3N1c3N1g3OFg4N1c4N1g4OFc4OFk4OFo5OVpCQThISEhORj1ZQxxcXGNelepfX2hiYm1lW0JlZXJmZnVoaHZpaXhra3ttbX9vb4NxcYZzc4hzc4p0c4p0dIt1dYx3d3d6h4mHd02PkJKhoK2jlGumhTGnZB+njlatr7X////Zgun4AAAl/ElEQVR42tWdz6+ta1LXP/Xj3VGjA6IRELykww/p7gQJhgkOhLED/wETHRtmRjstbRva295E06djggNDQhwQ0BjEaIJOHECHCFFQsH/Rl+4b7m0aaAINGgPu9VSVg6rnXWufs8/tNs1Orvvk3n32WWuvtd7nrafqW9/6Vj3izJfAc3+V2x8U6x/rmL+hoPPoISWACgapKv1rAq5S868oeOCpOg+KIaDzah51l5ooIP3NwiARFMKpBx8TKCnIskBJysI
804IIDUFWJ4sSACSAlZJAcnyZQtYIgEUrH5G4XyUx770hX+Rt3nO7SLKS9f40ZeRx344v5fM/4WSQqBe/BwlfaHULNK5WlAPnsjLfrr5ez1z+LtCeRgCTjpaImgpisWRWgrCASJwoAgm4fgScEXLEUVT76gj8DYB7goFS0wUHEQFDOk/FuogbXTpAOKBhcvVONukFJRUSH3k9iWa/Z3Si+ZcYhUsg20pUVIkGRRFSlBkpnEPoZkWSS2o0n6B2LfemdvR725LeklkcTVzSIPl5oCUF6CoLsAsou90ColhLmQ6Iv05o++LrHmxAFUHcFYhLrXvm9FLkpCpj1pvPTA1LdLoCwDwiLUgUwgokkoKpIj+1b6mQixy3nXp2KoB+FopogJS2Z9Xk0QwVaRQnd0p8zlc56dMUC0NUk0AvBKsn65KRmoyhoJgx3gyE0nAcXzvG5lH9HnbqOdNRCgkx5SIZQTSdhJrLTMAleoL1IxCqOqPtUKUlWCRJMnyKrxfy8ZrOoqkACYomKaq9uKAUAtVgaLACVXB51ZDimChMrZvwpGYXE3QtkW23c3FZ6+/R8xl770jGYBmKqpK5gveSClEE1hk5hKvvpIqxA5s4Q4IEUBmClVI9dNU17pPpZK2Ixa3N0GkbVj6n2YzpbaZkCICdYCASQkecpcUy8N74VwqsaIQ3LUOQs+7XpK3/rHvVPvBdGAtWC5+NQcpvOMRZGapPuJKzhVPUNfMoKo3T1w8hLVog23T69+o2VxqqGQJWnRwg0qFWTTgPkNKAZG5vSqo7EVEj1QKquMkCxDHJElcKZSssd3kopbj8e7YO8VF2pB0KQiEnfvX49w9hSF13Sqq8vzGGf+S28EClW2EFIj7sprb3c4i1wQkrSgyaWPNkNzrSjsIIWa57/R8kd5SVD/xmM2fEylKYEkHhUWUprJ0O8Z5IzDQRPpNVOdiBwVw10+3NkzHItrO22+GlG1koZoJ/ckfmEk/CCgZSRw2Owfqsix6M1S1C1EPkJJqq0i0n1toZpvqTSBZAvjavvNq5JoKXLIjtSZSs2Y+ocnj6JdRkcPQ6MfF0YBUKt1z4oNvV6G0d7AiE5ww4ML1nkjleM5bs8jnzUSFbA9vimbMK1DhhOGwqt9LV4ZCVQ2A075HhSR6gENR0ZgRHPDlY54lp5mkSmGHAixDKTFQ3JGlIK5H+567XvK0Xtf+/Gp9H2NMZA0SU3NHKIuOXcsNKN+fE0ywiSdK5nYm+tBKZr+oZpISG691cMXw1Y7YKFAqbqJXMpunSiMvlVRR2LxH+7o7EUFB5o1jY/CcWLGd2lycJ+JcUvWE5whRhbsKx2FZfZF55JilCJRUzK2KWUFfROB9F0XAKg1tb5F8WaidqmSJBUghwqWWyewGhXgIWtualkBCCGEgLGlg4wCXCw/A9HMgW6Tzjs5ezquffXbMHpTxJSoTa+7WxqmJM7B3X4r4cmG5Xi9vHqt9sRYWRja2kCJVbvd1SUlleYUUCmEBqQlSstDM1NwrVlxOJJiZ/dcFaC/P/Ti6+tv/kQkgb5vbiFRDnsLzcr2GrAfurtr9pGxkfb+dR3+yNe6yX9KXC3mzJO6ZV4swjDCMpISIDDbSuX42KVEiTEQbMU8yUIKqquuJNDJS/BrC2HhVNQDy/ooGk5hnPnvb/E/ezmzlxRz6JTnf26R/p33WTf43qLsffTH363+ZTE8e5H985enfg031DErMwQL4gbvsiJnaMdRAq/fE0b4EuQMxCWt84cCBhqLqCh7Wu0ScsjqgVLQQT+sX8lQBQXyTBVbaLj4s6xgCAbC+WxvaP5r+JXqmf6mUZvSWKkouvqydSFZSUiy9AFWpFVDcH8lKotAg28EVCKF0FPT78RCqqqAZEIKKcKzB5p4IUQbuhoMIUop30oAhGIIvrAiygqw22vEyWQhiq6OjQbVXWoT5NY0ixFiQ13D8IohV3dsgcUQuzYP0hcksSeZONXT1R1ACKtMbwand7KhKdsiF8XY1IGZCfynVzo9CRbUjhwCxkWMHJ9eqS9AmtCBVDRED9esmSVGhqPTsfNxokBjSXFBVW6SChr4Yd5+3lF4zlBW15Dj3Y13mViNak54tbehWi6pEQptFKA3L9LVOwkqvPMFN4gNY58BCh1HpDKVMKHyhrgiOTDhP4bDcGQGSubHPIuc5PpzTURPcg0YMXqT7qg0KKJGSnX+SiuajxMkZq1WTuoyTEdax3UQggdRmaK67syqdcRwB6/RlcdqJnu+ag09ykF7qxvraXkxYVOc6S4XMxFU7JvdH8YLDQAXB4TKpOSLItkkBE8Sb/yvqGPgKYJW34DXRRwGKnpRSzSaQhFpy8Q5066SY9BKMmXRaZGtlboNQh+F2cuNYMk0GdF1BtO7EqQrLMaEARFOhzPOiqoou/EL7S9wx1cgM6aTWvS+pfTN3xRoIWDvLay6rZHvewYvayYVqPpIAjtvVTEC14sym3CT6Vls1h5u5pINYeaev0i5BB0jk5i4vV5L5bhLeMRKzKzhVREQUpDApBzehrUc9AU8tDiSG4ViVZgqdy+zrtmry4v7gTqkqIzueisUA5c7h4wgj89wYGxI+smk6/YPV9tXkT03aT4kSVKGN2xk4X1ALIHIi4LqBBT7Wmmn6ew845oeEvTTftN2v7KSmPYg20tV17BTPd0zNDhz+nYSHilCdCAtWiIEvj7TFMZhDsLjo0PxnwEl9PvdrbiebqL1JXqVYEIYvJMdjgN8jTaz0VipvbJhCY8WCJKDEN/ZxQe55sq8f+QUL/ptufOaNfa4oFjS1pAYfhfW+rs7o0x5AthIKKSnCCgiLvvJOx6aEMXaUKbAa1SVkYos10aWAXIPr392+tfxmb9Y3/PqT/SlQ0Z/hHfz1wz81+0SOZz/AH/DsH4jy+09qJ2r84jt8TeqT8b5/Lx/f29QE5Rue8A9ZxTv8a4LwtpMfFJ7aTlTe6XYiH4/3/Vv9+Di4DhdPaSeu73QraWCtetrJh0C/9JR28t+13ul28h/4Jd737/SXt53w1dqJmb3t4/VI8fud9hXAusfPpFPg17+KP8Hb/76+85eEbGZYTzORr85OvpfvfdvH80qOvFO/Nistx7MfzP/Fsw+B/85T+pNfEuQX3uH+JD7O+/4Nn1a47/RS60n9yf8HX1Fd83DQxYgwntKfvPO/zmLHxiYlKE+Y7zTJ/SMv0vfyOIWvqfWoYGx/fKlCqsmBekDCn/T9Seh/GcJ+s/12aeJIjmc/KL/Hs1eBJ8Unvywl4l2ERzVrK3B8NY8q1eU/PwkCqeep6dRUSkjtelaSaNRkylRJhTbDVpsBSIavl86DM5R7zcrSIImEqhDhInw83/+TfEph5dZVPGm+UyLeLEgZJU3nu0hsnYHAEWlXgqRQ8gE9rc0E3hK0KtXL1+nUMmI9kAEscSikibjMYSSlJLjWgTcpO3byofp9+cirWvK7/+dJ7QQ5JBUpsdiFaifx0tEmWXg1sZKo0jbxOIw4/xJGaLSNdDg1FoTWDT1SU+MuuFdhkRRRCcWiilAii0/F+3+CT/pZYhGe1J+A8HO+C2lbxuH8Jb8cNUW1kFbCpKL8jG3mSAC+58rz9LbRhNRlTTS347j48tV14BrPsuZvXSHIqSRAlpKSJ+l4OUqaozY5nn2I3+cjr6LyO09pJ/8D5L++iE/+xVvrGGmRAEemeFOw//knbp/3o1+89Sm7Op5AZbU7KS7HaqXdIre08R7JNpMKQrOmqhMUKUsXRYUVF1l8kvf/RL5+1bNxi0/kj96f7PrO86DgFMYAXMp0ahTxNiRHW0q2gqSDUBX4KnCnl6QpVu8lyVpBaa4ujYzyBj0LzqGk927UHYwEuUETXx1W+X/BJ+a8F+U9NZq7XWC8Zqbn17seVvAVqDjmjop06c9GZ0OsJmC7kqbSirMjp0RjwZZrtbqjlt6ju5YkMhqw6139oSewk+ORy7zBG42SzvLaS+zkXfCuJDsMJ9RKo06NgfVVchaJm50WqqIkcnIa2Uvi16iN916U9M3tU7c49PufwE4u9jiRA/KeT/FuPmXfxqft2/gsu6rz4oq8AaDvAj6LpmJBRUdioTwKX7uuNC616zqyEJS05Tvyau7iDh11uqJ4rTmWPMiLn8CfyPFSM3nPp+CTn3p38OlvT17fup3Hl+Rd7yI/9wafnVLDVERPj9R6h2rJAiN4kJpSa6b6yiS6j8PWaokkYS09lr2TdBdFn9if5NulGtIlKH39W6fYGY8jkzfeQOtdn81RPp1Fd4paxd4781Cani9fkUkulJp62qW1s5XkZc2nE9tUT2+pJ/Un+uhuoIBPvqd497s/Bd/6Ot8KmqjmIzvtjW/ushV887fOfl9BTdV
8045BWZNkpW00jE1kqKIxm+q86gSuf2oioI4SYaQIMezV/kSH/lHAk+KTz7u6f/lP72ITz5/ohOVb/sVnaYU4Gd/8jF8klPen+/rRr516S2zqNRuRSEvQkq74yJZtkjNfk6N2C+ESEIX+Zn6e//yxCf6HB/7R+9PfL2MuFeRQjDJ14VTrKX6EnQyXSvJFjoMCMaZsCMyMXhxVMnofLp8LmiyVNEshTGyFJmukHKQ49mH9Et89MOgv/2UdvJJhV/46y+yBL9eMsnFUdceHU1+7q898LNfZAP60ZxoZtk6zaSWFLZ8jZAhqMwckdKCkqCNgcmCl66t9bog3EN+kr//Y7yusoUtT+xPFPS7P/OZz3z2c5/73BtvvPXWW2+98cbn3/r8588lkQjjKq7Q7/mt3/7tL16/2kqmOaPzZbWwM+iEGywfyXwElTodACM5IEcwHlZxAV+TS0fMkmz4eveRV/mSPPuwwtPaSbNXNr0z3gp/kdpKx6rqpiE0X7bN5oGlja5YtRODWoyZLHbX472vU8zW7qRIJRca5JLOdSo7Yi9Yr/P+f71eV66Sqyf1J3lCVd0xT3xde9eibCPKfGnU1gEZsziXQScyipvV8nqwtoC9JLX6VQ9HMxHCUqQFjJF6iYJFLgjWGXc++mH0ae3k09qqLAH1hROOXA5oD4vYOkJvFbHPxWwhtWq8q5Jha4MTClbtVIcYO8lLb49uIsrUYpG1OwNP5uQidWm66dP5wR+vX1Vp0ZE+tT+ZlEpBWRABi5Y1iYCxvFpq6dNn8UIOoJSqJunanVstYk+KqpKd/ZV0r1emRhWC9lN1bdXO2RXamsMWSU50r/Yn+rs8+7Biv/m0diIlNlvHlxMc1VqvlvIKqZpo6iNE7Aljz7bZtLDLpttLagG2gBidNGtHnQYrSyfqZJ1mQmgBa7UtXX6FD/54/apybVx9Un+iglgN/7kc3C9yICVSDeVTSbybZR5HJyp9N1uTybkkIhUiHZlpkTCZWsegl4BMFe1WiQLbPKy2PNZ7pftdS+4+8mH5XZ69xhPbyWd2QlOtr0esM/pO8w8q7JYbeVns2XayXC7Y2gTbBWw5a1lTCCRk9CZpdyLZLSkNcOXeN097oTTvIbN+hQ/+GK/rpprM5IE/EX4I/SP7b+qAvSStUJ3O6Al5WTftfqqP7J1uZTnt5KiLWEw15yiH8LWw1OyUOFcgVE6vd5Zyr9pZYcpwOZMvr6WadLPmSrn76D/U3+HZa4b+xh8+oZ283msybV0h13KbgKVXjYvVlxhJDrhMlCS0ru6EivJazmr4xm7Cl6JSomiP4veEplwYvp6q6ShdSVL5K3zwx9ZnlanuRD6tTqnq7Ery3vV1BhSLLVZO3d4/n2cXdAMXJaFCLlP067kEu3ErdpDKDecCac0sC4wKRdAWgAo29nljm3L30Vfld3j2j1PlN5/STj4zvSkGeMAxQnIpadFHFyn08Yhz/VqekEjV7nouKoaRprrW08M8Lmeu090DiyQ0yi7d0NhAL4pcZJLCp/jgj/L65r7CRPhnj/Jbt1D7tk9Qbsq7zz38SFlYwChNfFNBtSsvUIacXCD50mXpYJyp2RilZJvbTDMpxQIpMutSUFUW1U1g3bUUcKFknWXilFzcVA7X2fBLSfy5jyCWHEgJd9WTOcrAs7wnE5Si2l0MasOW3y1DsRwx9DnAYz+OKTqTTMa1WeyJJr114gjZTkRnqMdzJcBrbx/aLvbMSgpbXdU5S+qp6EVKQrT7MGbJ0qI69AELgyWrt2tq7y/b3CMm0WMnyqFE5XL2iw+rULtAB7rK1WQaDLYy3gHuutelwKbAKId2I7rFzEFxsksxcztiQkm2HcxHkhf7q7cdZVpfUPVbrEWwejdE0F3YC6RsW8OBk61szFy9c6aPqgcisM0lT5lZzh0MA5Gt3NTCcB8kRfowiEYYJSqIdA/7LgAv1+kei9JCipr3krBKYS0PjJrGldmEcq13dpWinst5JhJPIV3jYgQzGuFsn6dy9xiEVVURE4QqWd2cce2OEkzjAqyVHWSGntzv6z284aBnJWS6inQb7boOJCpS4Y7AosfeFHonre2v4cZ6YopYz2qQu+5nQW2nxBVxTAvPLstkN/elzofqTu2HZtIWlNPpEcd0+YJ7NQHRTdezO3cTXUe0Xuzph/PcntlOZcGaj5KB1n7+fBub3hJfF3dqKSIHAp6Q6lyse4QEDTjOcThnU3VN63dd2HNLtHtmlpiVHGzHP01AOxDfNuY8WJTJ1HRGy1w2OT2vCkiWWUsJYorIARIgumaluu432pe4COseyLPJ2izH0runTtAuwkzVw6qKta5TDZZmzxc4IHZHdU/HiTghRj+9nQii01kd4w9ciBVXBgArRONs23oUxJLZDkazFST99s0ySFA+xbuIKtQnQx6XmCw8i0jVgCDnzmevT0KlepNuqE4rvEHKOe5CtZn+HoNiu1s9HRRd1binDamEbYIlaM4LbmlUk6wFWuEKPS2HSy+YdNdT95ADKrs49Twg0J2i3dbXRYpLWU1JNGboxvW3R6MmxlJBKyPpHqHuJ0NSp4+fBZHYOmv9Uj2yIj9X8iIU2XfOttzKSfErcrHzOX7NLwejAhLH8ttJZXcPwHurtmazf0Vi51s5Wi4fXNb3+TrnZ48nUKjY/HZstmHJ7LgCoj764y9E/dIUgfSXSMCzwyvXmv8NG6Yb/jzsQZVZkplDUhtP6MMi6V6Sr2xF4mTWrp9t3VQ0ejRUnG2IE262y95Jg+5CYz9mcu3EwCGP6+oo1Nci+DTSWrqUCC66oVhZu+68kxIc6fg84j0DCQfBExWOwEidUG8WGJoCylT6jEIpLdmVzkfuyh5LV0KlLhtYT062EuX3UwHTZgfkYlOqSI1k+YhxBogU3BusdfbADbxe3OQX3SopCOa9JKM3kFle6dUYDKh3lJSrXIueEzDC244VhUv2AKHZ8JjRw1syx7pCVHJShLeRf8qeO1WUDoq6mYOR9zfQLukJclXEtMt6beve4/0WxDppJDiBVKOr89pvtk5j0Wy29sgzH4g93QVA1h744VQMypwBbIkVehDj8nxHTKqsk+Tuzm/zFUoQEXnJotTwICU6/Z11K5Lv1t3dpqrnDjeKSFi51gJdbSbCfY9v6I0mMzjrxAC9r0zgaEcY63QH3gMMylHE9sJ0M4cMXJltiyeqkeNKXae611HL7fyYPZJKO5CGykK7PDqqtJe0yM0aSKXYucPWOKxRN8WN91vRlqk9lUZ9Inq1X71r48+bnDWvA296sl7N91lz5TrJTkTWjr1l7SAbc3heNWq1lMRsZMyrEcklIME6AdAAzEN7Zxagy6dqtWOHPKrcmSl2WZJnoSvxTc7FdSkvCSldOlqaEXDTKVMnA230PLQudFCsVefe2S3xMW3haO31y+4OFx/fimancbrlTZ0fuJ+m2kMu3Zsxm+mG2xYbm/THmr5tHyXM5D9Sj+kxtrRRrbCZFEUoXDSJAZBxnYEzw27Ks8xuRvRlyokB18PgTnYFrR4gxnFcoicyGuuo4Cw4Kh4nsF1am+zYDHMPZmG1rerMKXNjhsGCHA90v4nsGSV1OyfnoZXUZoCkRAykJMk9fYBdDDj3mc6ELzQ2jUuiGO2MdeHdjn0ijPaNNSGyNqeuBbz/uVrk870CUi+OCPrKJgRdhwtdX2IM5CqJeNzB7nGwhTxsOSh52SDYL9dycNO1MLSUkDkceg/0sXQK+Rb756iAp0HDDzl/wDVtJntKHVlHcfRoEcXR8NQpUgh45R1IiZVIeJOOTpicYy459h58Met70Hqwg31gaZd9QSUVZQtfRdXwuK0brv55dDiwNPsfmvSpgKxBLLUomlWZsY+6RbOrE9+Z6SjRxKlSLdVQcO0pqpkiJaoSaKRG9VAPFBUh5tYtvSOlhMiaJTGW+HrQR1SjcVS9FvleLJ3vEgaWemmWoAauBL6QEJkl0fFMM+KxJahLqtC+4B6VmiP8yyWz68x7FbeQWLAeKr1cT8Fdjx6E8jhQkpVoHaA2cv52onse6hBzvoearMyunKu0nVnApSdYSDEOeNLyzcY+ZiznpDUsewxSCVJVlFsD1JEtKhXV0zOts912pt6kyIxmK7AOJJlI9l1yrvlRnuUohLse7GoTl0NVER8uAbT27BERdxS14TGvnSRWM5nTvD2ATRa9CMG9B/VNsDsaBGrXzfVFK8mHPmILv3cnkzTtEEVGj1vWVl7URKeBEBVFanUhvVkdWTd6bFg1pIBcsX2H8GWuHdYEPHZi1A/qXXJs4SVoJBaaM1MpK1v6P5fbgUjEwnqEri9KYrWUQAqktNJ6z8g54PMFAVvtYeaZWNlVMSPBaoH9FiRles1It00Nrug9Ynu6dcfDaGIPCEaFfoqJrzekpBOephb0pj6bO5FAuSiihgidLEiZCemOlqMl2Ay8mbzTwqrKwRcm1DH6iJ5Ndpb9quuU+agQJ6+fIQbWl9QqW1a1Fu4nOXAZ45RoBxJu55ww4b7bMCSiRx9qptiJiXvpLidvr93KMHMuTQocX2qCI01pzuyonmTlHqhOwVbXYBtphNoXrEqX4QadSWBOhzIBqknQ4YpEH5sllVPVS7RHOdkpePK1iNYr5gw308Wl25sCIRNRVk9MK7JwihITS5Vce2cWZJp724npbpdKLxUO74HT0vXc5S2kkcoZv8vNwOODtNC2NlfZ+u2uZSHl7dGsZiM2nrxQcjPXMXfmlY9q7FPJmrmfGLG2+YnUcjdbLCo7W22GsvHMhpB7nF709LopnMdplfpzP/9c2WSI8q0KY7X/tlXCYruT7Elpdz1mtGeIzRaz7BF9K1N61s9g9rs6UlVEjNIdx9xjteakUZJJj81Ke
804ElVVK+7pyn3M76VWMTJ6k4lZ8/urasuQ6SKSFOF+wVEFiYzEZifffXVn6+6/8xvjCqdUhVSQEyREvcpI5iDx4zePkd2KWimXecxHGTn/M4ecbdnwy1jTxCT0ygEjvNDm44gTa9j7HmZnmA+gOyOyFaA1sCsPdZWOwmozkSSLFb12OUgIx2kRJRAGu787GuvvPLqL771V//p38TPzqFqYU9YN+XtKlw73OxA3LSEk4rZuXW0NCzbRpcTpggMXyai604nAqTia4lxOW6m6QUe4usqSdLHQH2zGppJKuu4nDkhCyzw1QFhxs3VFazX7lHOLB0KfpO2e5N87LVX4M/+na/5hrpOI1suPZTUSgRn3SEzB9BXG+pyKTv7xC6HUEKJSykG4UjeTQHxrK4LsTFQoQGrT5+4yEl7Wkp6XfnsR92JjLvJ1NRoR7QzHN8nP9QmgZL07Cl1a3PIZFdKLHc1VQu7yD1+nx977RXuf1Pfo/WJf/Wn9obzMYn2BbmmrpGIL9kcyYynTgo9suuD7dECk5jTD5ql36qb49Bz0ywbhUvZYejQf1Eq67ZYoY+ptHQLTpLcqKTdUS2f4xtk19e04aNcWfxuTWkU4ppUg7wL3LH42GuvXH79i9/49Vqf+CdfM85o97E0kyNdyCnKRcBt3SvSgv0ZCaKNzqQcSThM0jQ1ax9tEchUmjadYKU+wLlcLvscAhANtbxdCX3EvY4yqccX7h1fYwvrxLaDdi/VErU4z/+YwYdEsjib/1RI+Nhrr/zBb3391xf1iW959ZdAZWZETtlWSprbFGmV3CL0jplAvRLImunxlCxPQYOwah/USSm2O/ouJFKYRi//AkPqaN/Y4j5bcZanNOsx+XTebqtYhwwb1bpyY+FblCGZuPRpGA05VrKULCIxcueeOYnPT7/2yq/9z68vlHrvF1959RNUDE152xXlrk1RWUedhkvVxXH1xpApLX1C6fl6qq5TOO/ZhEhP8i8hppSOD59PzaoZ4LZrBiPVfBGd1HWeIiKXjq5Z03LfSZQ2NaBMsVvmtJgNMhKNy8k5iXIB9KdfewX7M7NH/hivvPqJPiEpb6Zt77mutjvrtF95jjtgdVqiBrjeKZhpBCRLRzPYfl+g1PeA8qvIJELO9Nmic2vtCaNdJtMXAZtkaxkystSPaS4XymvDN8uNvxnhfXRs3PqAATmTQEjE7UzLshKafMtx1QocZ81GkZ4VDJFr14xzH65xWEWfC7G6h17cQdu8WtY0DlT2IShNkLmDSVmd9aE41j7aIdkNRi8Ak+rd36ccSLY2qaBYFx/d9ClsU1bte1CVibA2kQdS43661Jbrr7z/TeILJVV84a2v5c0PfHtGQUYpcJn46QNOSnA38abbah9aAoFYdvVvHxjQvqImzYl2TnqsMTJbje9Wa7vkSszXHOs1pUp5FMJKZZOpmVE5PYK7WLi7cXZhdnpAz5m0AU4RK4k8weQMDM7kL7//Tf06FeQT/k13b37gPdqC/Y473co9MWWEs0RT87uWf9fP6IqwpxdEECXa0qeumY3Dy9iThLEzt7GZTdyGYtFHZuijYfi6efSUFdQuiWaXjVadtdDZhTFMbxMdqwc0FFZhIyyqCoiSXGjqd//qN2rxhbf+wtfx5gfeXZPKNm9/sXOoiPTAh+nJLiFzSuJeGKVTaoi53EFpW563Bu3UNRtTP4s9HLKZjwNrGdW1G+IFniDJMxnqDqTrYJOqJTPUo2TnwMO/9dbRGUguEnARz24WMiKrJXV/+B3fV8gn/vQ33fHmB96rFTFnmWiLjDjRSnQNZtI/p3Ufvk69x4QRneOdkppTUvD05opKnmOdXYKQqJIbXd+pGLyZ+PxY+jcNgktG5duFv2k5SJGuruoWXEyltdtDkyozdM35ATnhdkF++vuSL/yNb//j8OYH3ltL5oSn1YRAME0sLY4oIbSH9BM66XwdsE+iSi2xCIk5+2rcyVBg45ik6aVUX76cKG+fWwJcRJadmd3LBbHdvJKE+Sqpm7CFhe8azpC70QOWptkpdPn9DD7poR571EtP11VKfvjX5Dde4c0PvLdLZnXdqGBwadRlPQbY9DwBo03A5TJ0Qmd/hIm4SborqSolJ3o8+wCMKvXlENHnau2S1lFlyaYU+yY+lhbXGItNhbCnNVygKqxxfEVLGzvJbrFjzcl0MAcbWWvJQ+AibTbJJ/7W//7a7/rAm7Mk11E6jtg6myF2JF7emk6qb+ZddvVuBpO3RhRCSxc+E6ZtxzmZcf3NnCwWYhEYlA51Us7tCQc5p9w8LxFOvXYH7sE3JeW1x+FcDWr5ZQizObWutjpUw+qq7b80zk34jp96N/BdH+AvrvMAPCbD61H0xmoQUeJLcKXE+z71ZCOgqzQsBw3TND1PmUEIb5kFl6OHnA+p6wsLbsJoo6xTS57PTSV/mOzME08NSCGsQ5btzH+qwdrdCDlEWlbpNO5Y5oY/mqJULdCV8iejivzOSQWiZAQV+2blugb75cicP+ab8ikup9DACzXLFKnEddAptkdndEp8CrKWe7isae/slHhNoNWXtqaQuQ87ShRZslPiQi6j6gvJHmiRulYhUj0xXSftG4ghXT6uxUz5GkXQboIbgf0chXHeInNNEaxE/KZQ10IVvaFGOhYRqEwuLBuyTqHk2EPtt5xtOlQpEZXW4fjsidwHO7xY5L1FLZGbeioozImF+1RpG+3edTmgJwWxyLnouGTNG2gfXZB3J5ztetiKyhhWtjYy4319hNmWHu9tr9a5iA2rssfX+7pDejx9h+qhkPasdj+zpBMD7zOYspVR1nE0LexR/VoDmaBJ8JnVvhMbzeXrbIPLvNIlsBrxLz1FKWs/HppdHYOUsLaj3BvufvxqoXvkBT7dTXml5g+6irE11X7exB5hZnF73FZeyRji9Fmpc5roHLimW5cRSYnlllzXbeE/5FT7jUw0bkSa0/ByTq2zs3NGt1Z6PSIhIFeHxpZ5xW56OhVbPrOXXIE///0vI3au2oq3P4LpK1FY3CajcqO4ePQMJuQWjlwVyI9qKr78SMfb1XnhFKd87pM3XP0hLwexUgFH1l0DNlemhnE0eEFQL8X2cAFPv7TgRrIftkmR+3xIXx7gzBS2lsNV6fUk5x7imC+vnPeZLJ3r9AJN0CFLRsapa9qMm4ZclqtThiKy9H4PsOAi3LeqoLFIrsJX9RCm6n5CvZZCZYt/Y3nDej8FXEdQ2uNkNDVtXIk7XndaQ+r3vR/C1YiC5T2n5bj2Q8qSHFGe7mD7SC/+hiiLXIH0rD4Eak1hZ805oPhWx03h/D4TTyEIgtW0bwVwkbx2vtSojVcTlussIv2JAeQu1wzlPNvb5yDvfcpdX5efXGtuMYHFNGQMk/Ag4XHy6onUYuulqrDUMKTC6zwctesCS1qQQOom5edUHFKXr7OJMtAYA1rT+tgutoHL/Xn8dYw4cLT1ucm0fqXL/GrA/wXAZHzoHrq/wAAAAABJRU5ErkJggg==)} 805#webamp .media-info #stereo {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAMCAMAAACpx0YDAAAAk1BMVEUlJTklJTolJjsmJTsmJjsnJz0nJz4oJz4oKD8pKUApKkEqKUEqKUIqKkEqKkIrK0MrK0QsK0QsLEUtLUYtLUguLUcuLUguLkcvL0U8PFNDQ1hJSWFQUGNaWm9lZXZpaXpvcH5wcX9xcYF3d4Z5eYh8e4x+fpCBgY+Dg5KKipaLi5mMi5mRkZ2bmqaioqypqbKqqrTexa8FAAAAvUlEQVQYGQXBQW4aURAFwOrPIJCjEY5Hytq73P9giCj2YBTy+7mqfkUTiURmtUiqRY8eJBJRFAGULIemEipBQySka0xQL+9Bz4FEwbBUj9PP+ffF22P1cXbc1+fnsv7br5ExRr9mz911M99Op+d2P1+22/yRitHttr9eUPP5cH+w/3ftQ4cFx9VX93a7nD+ObufVn/nbdSRqk4qWSCfERHS1USq6ggwkKTCMLBERpCuoVAQdYyAl4dASNJjKN1/Kh0LDHtt2AAAAAElFTkSuQmCC)} 806#webamp .stop .media-info #stereo.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAMCAMAAACpx0YDAAAAk1BMVEUlJTklJTolJjsmJTsmJjsnJz0nJz4oJz4oKD8pKUApKkEqKUEqKUIqKkEqKkIrK0MrK0QsK0QsLEUtLUYtLUguLUcuLUguLkcvL0U8PFNDQ1hJSWFQUGNaWm9lZXZpaXpvcH5wcX9xcYF3d4Z5eYh8e4x+fpCBgY+Dg5KKipaLi5mMi5mRkZ2bmqaioqypqbKqqrTexa8FAAAAvUlEQVQYGQXBQW4aURAFwOrPIJCjEY5Hytq73P9giCj2YBTy+7mqfkUTiURmtUiqRY8eJBJRFAGULIemEipBQySka0xQL+9Bz4FEwbBUj9PP+ffF22P1cXbc1+fnsv7br5ExRr9mz911M99Op+d2P1+22/yRitHttr9eUPP5cH+w/3ftQ4cFx9VX93a7nD+ObufVn/nbdSRqk4qWSCfERHS1USq6ggwkKTCMLBERpCuoVAQdYyAl4dASNJjKN1/Kh0LDHtt2AAAAAElFTkSuQmCC)} 807#webamp .media-info #stereo.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAMCAMAAACpx0YDAAABXFBMVEUA/wAD+AQG7gkG8QkH4wwI6A0K2g8K3xAL2xIL4hIM2RMN2BUN3RUOxRYO1RUQ0xkSxh0SzBwS0RwTuR0VvCEVxSEapCkbnyscrSwfczAgpzIhkzQinDUlJTklJTolJjslJzklKDolLjslkzomJjsmKTsmKzsmLDomMjsmMjwmNjsmOjsmRjsmWjwmdzsmiDwnJz0nKT0nLT0nNT0nOj0nQjwnTj0nYj0oKz4oLT8oND4oOT8oRz4oSz4oZT8pL0ApO0ApTEApTkApZkApZ0EqMEIqMkMqPEEqTEMqT0IqUEIqZUIqZkMqa0IrLkIrL0UrNEQrPEQrPUQrQEMrSkUrYkQrfUQsMUQsNkUsQkQsS0MsTkY
807sVEQsWEUsYEYsZ0UtLkUtLkctL0gtMEYtM0YtM0gtNEgtNUctNkctOUYtP0YtQkctR0YtS0Yti0cuLUguLkcuMUcuM0cuN0c2LFEQAAABDklEQVQYGQXBvVHDQBCA0W/3TrJkBBhmPAQkBATUQA+0QEROT9RBwtADCQQkDMaBLIOk8+nnlvfkUfYq0HKgtzIMMIBBxNpR/+Qsy+pcxLnj46iFiKrquJeuw/xp51QvayeuxkSikk+YHuFmxLdetRH//HXnCIuoxiSxpzS1hFfRlw+/DrxWO1YdqdgXV9vd4mrZmWgl9UdaUnD/LX4bo9ue9O8/N/lnkFG0g+tquwGSy5dUR1BlABio2fmmoVzL00XfZMluV027WL3tK8DkIWtUJRBMJGCMQKQve5vT4C2tRDd5LSaS2wEDcjqz2cbZM0l7Nh/KHiPCCERIKfjR8EmnEApqAGMASDD9uiHBP3bmjPqWVRjwAAAAAElFTkSuQmCC)} 808#webamp .media-info #mono {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAMCAMAAACk2TZEAAAAclBMVEUtLUguLkcuLkgvL0ovMEswL0swMEsxMU0xMU4xMk0xMk4yMU4yMk8zM1AzNFE0M1E0M1I0NFE0NFI0NVM3N1E8PFNJSWFQUGdSUmtaWm9gYHZuboJ2dol8e4x+fpCGhpeOjp2VlaOdnaqlpbKsrLetrbnuzsEEAAAAp0lEQVQYGQXBQU4bURQEwOrvkcA4iRS4/+VYwI6VEyTPzGuq8ppyrjHKIVPQsSnnGpReZkQnQzfImKJUU8saWUEWQZyV0g7dqs6X349tf7qfN3uf6t/N/imLDL7WY1/Xx8d1m/+X6+P9+U1XSADNH8Xkr9aqmTW7fY5+r9v9OHp859f9i7z2vJwZpUdUjWpqSZQytlYJUrOpWaR1FhhgbcLQRiEFTH4AmtR0pKKbMGAAAAAASUVORK5CYII=)} 809#webamp .stop .media-info #mono.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAMCAMAAACk2TZEAAAAclBMVEUtLUguLkcuLkgvL0ovMEswL0swMEsxMU0xMU4xMk0xMk4yMU4yMk8zM1AzNFE0M1E0M1I0NFE0NFI0NVM3N1E8PFNJSWFQUGdSUmtaWm9gYHZuboJ2dol8e4x+fpCGhpeOjp2VlaOdnaqlpbKsrLetrbnuzsEEAAAAp0lEQVQYGQXBQU4bURQEwOrvkcA4iRS4/+VYwI6VEyTPzGuq8ppyrjHKIVPQsSnnGpReZkQnQzfImKJUU8saWUEWQZyV0g7dqs6X349tf7qfN3uf6t/N/imLDL7WY1/Xx8d1m/+X6+P9+U1XSADNH8Xkr9aqmTW7fY5+r9v9OHp859f9i7z2vJwZpUdUjWpqSZQytlYJUrOpWaR1FhhgbcLQRiEFTH4AmtR0pKKbMGAAAAAASUVORK5CYII=)} 810#webamp .media-info #mono.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAMCAMAAACk2TZEAAABJlBMVEUA/wAD9wUG8QkI6A0J5g4L4hIM2RMM3xMN2BUN3RUP2hgQ0xkSzBwS0RwVvCEVxSEWySIZwicZwigcrSwgpzIhkzQkpzkmdzsmiDwnmD0olD8qa0IrfUQtL0gtMUgtQkcti0cuLkcuMEguMUcuNkguOkkuR0ovL0ovMEsvM0ovNEkvNEovNkovOkovPUovUUkvXEovZkswMEswM0swNUswNkwwP0swQkowTEswT0swUEwwVkswZkswaksxNU0xN04xP04xRE0xZk4xbk0yNU8yNk4yNlAyOE8yQ00yTk4yU04yVk4yY04yaU8ybE8yek4zNFEzOVEzPVAzQ1EzRlEzTFEzU1AzXlE0M1E0NFE0NFI0NVM0NlE0NlI0OlE0PlI0QVI0RlJbMtAUAAAA50lEQVQYGQXBTW7CMBCA0W9mrJKEAKr4WXXTu3TXG3Dc7nuOIiohKLHjGJzpe3IUreZ6BxJkIIHjnlxxbDBVs7EXaVV1u1UtpehDAdloNB3Xo6p1XbF7CN2kj0YFEYmasmUz05yb3KjmfW5LcBnEvk7L1N8P4UwvN+HwS/c+iqIrAT68XTyvq7frZNt6W33+nUAFHADAHAyw+ZsA6tXx0AxtaHTz/Nm9dGGxqef9bkKOntdRUh8BIFGIOD42KSBLn6WtFQAWN7zBL68plYDXQVwYASABGTy6h4DMOHEOyATMOHWmJh7hH8HfcsJFco7ZAAAAAElFTkSuQmCC)} 811#webamp #time #minus-sign {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAABCAYAAAAW/mTzAAAAF0lEQVQYV2OUUNT8/+L+dQYJRU0GGA0AVz4HY4h207oAAAAASUVORK5CYII=)} 812#webamp #time.countdown #minus-sign {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAABCAYAAAAW/mTzAAAAEElEQVQYV2Nk+MHwnwENAAAjgQH5sdp7TQAAAABJRU5ErkJggg==)} 813#webamp .digit-0 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAFklEQVQI12OYGtrA4ACEHh0ORNFA9QAiPQsl393R7gAAAABJRU5ErkJggg==)} 814#webamp .digit-1 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAE0lEQVQI12PsYNjBwMDgwEgCDQAItwpIh/66WgAAAABJRU5ErkJggg==)} 815#webamp .digit-2 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAH0lEQVQI12OYGtrAwMDgwNDR4YBCg8RBLI8OVBooDgAebgr//9NFIgAAAABJRU5ErkJggg==)} 816#webamp .digit-3 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAGElEQVQI12OYGtrAwMDgwNDR4YBC4xEHAB3uCv9NUBWtAAAAAElFTkSuQmCC)} 817#webamp .digit-4 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAGklEQVQI12Pw6HBgAEF0emqoAwMDkO7owKABD8wKi451feQAAAAASUVORK5CYII=)} 818#webamp .digit-5 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAIElEQVQI12OYGtrA4MDAwODRgUqDxBmArI4OBxQaKA4AHm4K/5vyk78AAAAASUVORK5CYII=)} 819#webamp .digit-6 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAH0lEQVQI12OYGtrA4MDAwODRgUqHgsUdgHwHFBqoHgAbbgr/DdfRzgAAAABJRU5ErkJggg==)} 820#webamp .digit-7 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAFklEQVQI12MMZdBmYGBwYOxg2EEsDQDjggmI1L+I9wAAAABJRU5ErkJggg==)} 821#webamp .digit-8 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAFklEQVQI12OYGtrA4ACEHh0OKDQecQArbgt/wD0r9gAAAABJRU5ErkJggg==)} 822#webamp .digit-9 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAgMAAAAGbqyVAAAACVBMVEUAAAAA+AAYISknP40bAAAAIUlEQVQI12OYGtrA4ACEHh0OKPTUUAcGBiDd0YFKA9UDACFuCv9mR03UAAAAAElFTkSuQmCC)} 823#webamp .play #play-pause {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAgMAAACd/+6DAAAACVBMVEUAAAAA6AAYISlH3xqZAAAAH0lEQVQI12Po8GhgYAhgYOgIAdKhQDrUAUKHQMU9GgCL+gfA1jUO8AAAAABJRU5ErkJggg==)} 824#webamp .pause #play-pause {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAgMAAACd/+6DAAAACVBMVEUAAAAA6AAYISlH3xqZAAAAGklEQVQI12Po6GhgAIGQVgeGEFYHFBoEgPIAiaIHnsCfw8kAAAAASUVORK5CYII=)} 825#webamp .stop #play-pause {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAgMAAACd/+6DAAAACVBMVEUAAAAA6AAYISlH3xqZAAAAGUlEQVQI12Po6GhgAIHWkAYG1hBUGgSA8gCN1wfe41RVhgAAAABJRU5ErkJggg==)} 826#webamp #work-indicator {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAFVBMVEUAAAAAAAAA6AARQDMYISlODwD/KDN/MQZsAAAAAXRSTlMAQObYZgAAAB9JREFUCNdjUFI2ZmBgQCYFBQWBpKOLCJwdGpaGSgIAfI8Fm6vX5/8AAAAASUVORK5CYII=)} 827#webamp #work-indicator.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEUAAAAAAAARQDMYISn/KDPWqFE6AAAAAXRSTlMAQObYZgAAABpJREFUCNdjUFJgAAJkUlAARBoaINguDmgkAEabAvbVxDW5AAAAAElFTkSuQmCC)} 828#webamp .playlist-top-left-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWUlEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TllWjvk7ZyX9pb0jeRDhFvYqBDe5+kxzjR3hK6xImKqibtfUKXzEiXsosulowWkKRUQYx0SV10sYQeqQsAf0Ul/5LwY0QAAAAASUVORK5CYII=)} 829#webamp .playlist-top-left-spacer {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWUlEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TllWjvk7ZyX9pb0jeRDhFvYqBDe5+kxzjR3hK6xImKqibtfUKXzEiXsosulowWkKRUQYx0SV10sYQeqQsAf0Ul/5LwY0QAAAAASUVORK5CYII=)} 830#webamp .playlist-top-right-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWUlEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TllWjvk7ZyX9pb0jeRDhFvYqBDe5+kxzjR3hK6xImKqibtfUKXzEiXsosulowWkKRUQYx0SV10sYQeqQsAf0Ul/5LwY0QAAAAASUVORK5CYII=)} 831#webamp .playlist-top-right-spacer {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWUlEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TllWjvk7ZyX9pb0jeRDhFvYqBDe5+kxzjR3hK6xImKqibtfUKXzEiXsosulowWkKRUQYx0SV10sYQeqQsAf0Ul/5LwY0QAAAAASUVORK5CYII=)} 832#webamp .playlist-top-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAAA/FBMVEUdHS0dHS4eHi8fHyIfHzAfHzIgHzIgITMhITQiITQiIjUjIzYkIzckIzgkJDckJDkkJSklJTomJTsmJjsmJjwnJz0oJz4oKD8pKUApKUEqKUEqKkEqKkIrKUIrKkMrK0QsK0MsK0QsLEMsLEUtLUYuLUcuLUguLkcu
832LkkvL0owMEsxMEwyMU0yMU4yMk8zM1A0MCw0MlA0NFE1NFM2NVM2NVQ2NlU3NVY3N1Y4N1c4N1g4OFg5OFk6OVo7Olw8O109O149PF9FQTtnXEJqanpra3xsbHxsbH1tbX9uboFwb4NxcYZzcoh0c4p0dIp1dYx4do54d5CGd02OkZDLe86vAAAAvUlEQVQYGQXBMUodUBQFwDnnXdMq2LuWQFy/nYVFQAIu47+bmSDSpFFtmyRp452oiIhIIjJ8Nr/2nD1Nc5ppJS3idhVqIRii93wDABiC79/PAACDdbwAABju8fAXAMBg7/EKAGBYu/YFAGAg9+0DAMDgNo/XSdLm5JxW0sH+JE2TJm1a9aQI2NiSYD0Mlj9JEiKSkAzY/XrKnPQkpydJUoDrXnvFQlIAu67aLVDAfbAgu4k1gHX/pZ2cJKme/xmiNhnfUYYUAAAAAElFTkSuQmCC)} 833#webamp .playlist-top-title {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAUCAMAAABMHminAAABd1BMVEUdHS0dHS4eHS4eHi8fHyIfHzAfHzIgHzIgITMhITQiITQiIjUjIzYkIzckIzgkJDkkJSklJTomJTsmJjsmJjwnJz0oJz4oKD8pJ0ApKUApKUEpKkEqKUEqKkEqKkIrKUIrKkMrK0QrLEQsK0MsK0QsLEUtLUYtLkctLkguLUcuLUguLkcuLkkvL0ovMEsvMSUwL0swMEsxMEwyMU0yMU4yMk8zM1A0MCw0MlA0M1E0NFE1NFM2NVM2NVQ2Nk82NlU3NVY3N1Y4N1c4N1g4OFg5OFM5OFk6OVo7Olo7Olw8O109O149O2A9PFs9PF89PGA+PGBAQFhCQV9FQTtIR2ZMTGFVVG1WVmNbWnZfYGpgX3dlZXdlZnRnXEJnaHZoaHhpaXtqanpraoBra3xsbHxsbH1tbX9uboFwb4NxcYZzcohzc4p0c4p0dIp1dYZ1dYx4do54d5B5eIl9fY6FhJSGd02LjJqOkZCQj6CXlqeioq+srbettMQFH6KtAAADiklEQVQYGQXBTa8VVhkG0PW8+1zuRYuN4gfgpV4q3PpRNTFGw8Q4MlaJsUPjr/D3OHJgjANnNR2hxA6MNW00mKJAC0YSSZu2SkmBnrP361o5gsY09UL3Ymrd3bq7073obgAQSoUYJJKoqIgoY0DYvAgaaFbr1tA0mrawAABKQghBEIkBQXTY3AG7mrpZbfYylzVr123ZrWx199TLWsBYo6vYJEYqoySxFzV6qEqhGIUCGmKJXlqoKRoaWbozWwKzDYvVDYDRmFmAAGTDFVZtdbN69WQuvey6Lbu1stOzrc4uC1ClspkjGTGGSmKjkhpJRUnsbfdeYvNz9399xXze354/8dqFT7z+rfGnb9fNunTr3/393H3Djzz53Qsn/ea7h6x//Hnxs32eXL14fPeVTD8++ejlH+7fvPXC9vc/2P5Bff7SuzeOT5tv1UXsro+XfnpGVZ1DPqqTJzz99AOQI8zz6bPB/pcOSLv5cj1rwC9v738F9Djog/VqX7ycN8PQ+Nzp7Y23//f+a++5fV2cq9pc85iu/1w44my9B+yfpc6s7f7pd8xxyXavpxMXbWvC5T0LJd/MvcNv/P3uhU/d/1dYo8Hel7cPPwDaNer4+OvEEwe7+XHvB+aTp3Dqow99Ju733mMW559555UZ+MKZu3/E0odz69Bfp9ehFN6+M+0dLcHg+Ph4c8Zb8GiOD058bAuLf34tzmc85dwNHp+8d6R481WrFvyKcPo7/nKwDvsgWYMYz3iAz5697Tk05p4Pn7X5hYdXiAeffNcXH2qK/9694OyTa763/2nuXbx+JBu6uxZgcOqU+G0uH371DWh1yS08Gs+ZtwtYV65elZ8AW61ZbfYyl6V3utc0s9U9Wy89QWpupMgoNoY9STKSUpWNFAmbLnIENHNaTbduk2XRemltsRoARFEiBokkKpJEijEgFOgGQNC0poGGBQBIWokINAgJLABsXgQ0DaZumoamad1YAEChCCEIIWFAkA6bO2CZui169uq1dPeu25q92k6bbWXtohlzswbJJjJkZCTJiCqjYkRJ2IMC5gTFAugpFhB2pa01emCOXVplQ0iNClAMelDAahTYjQHoDkEIMaJmM2Z3d7cFU2CubtoEWExMAAkKbOYEizRTLLSYbQ0SCd0WkvRCNVitgVAI0OwgR9CYJqvp7ja17tZtac3S3QCQiJJIIpLEEBWkjAHh/7B25tuthDwsAAAAAElFTkSuQmCC)} 834#webamp .playlist-top-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAABNVBMVEULDxYMDAwOFQsUFBQdHS0dHS4eHS4eHi8fEQofHyIfHzAfHzIgHzIhITQhIjQiITQiIjUjIzYkIzckIzgkJDklJTomJjsmJjwnJz0oJz4oKD8pKUApKUEpKkEqKUEqKkEqKkIrKUIrKkMrK0QsK0QsLEUtLUYtLkguLUcuLUguLkcuLkkvL0ovMSUwL0swMEsxMEwyMU0yMU4yMk0yMk8zM1A0LhA0MlA0NFE1NFM2NVM2NVQ2NlU3NVY3N1Y4N1c4OFg5OFk5OVc6OVo7Olo7Olw8O109O149PFs9PF89PGA+PGBFQTtGQh9ORDBQPx5YVjxnXEJqanpra3xsbHxsbH1tbX9uboFwTyxwb4NxcYZzcohzk5p0c4p0dIp1dYx4do54d5B4h4yGd02LjJqNcTiOkZC/uXdbAAABJElEQVQYGQXBsWpTYRyH4ff7cig5a8FCKAge2slNqFvoBai4e5d26h0UrCnYpaCSrbV2cA0k5/97fZ42WYVR1ZCgZWC4REGDSEAVuRpeUoayyiqddU6IdIGeDkCHBQFgpo2s1dXR/mj/66BvHm/h4vSunocv/67XrpYsWb69L5yAadsaw+IV8hMAAl8/Tbtxe/tahhtAAKAXuBt30KCfnUEHAAL8HXcnQKcfH2huAPje4fO0/fNjujC0kbXMNwds75ydHr/B+9NNntuHlJZWYpWpOcb4NDxYpUTVSAzzx03RoQECIAQomGG4RESDSFCuABheUv2AVTFV2ScamnRCNYiYKAsUhA5g0pqNRpgVADq01gCaxNIgAMODVZJz+F2WWisA+A8o2vB09xIFIgAAAABJRU5ErkJggg==)} 835#webamp .selected .playlist-top-left-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TkVWnvkzfnqmhvyf///2lviaujNe0tWTcplfaW0CVOVFQ1ae8TumRGupRddLFktIAkpQpipEvqoosl9EhdAAvFKfTd8tQbAAAAAElFTkSuQmCC)} 836#webamp .selected .playlist-top-left-spacer {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TkVWnvkzfnqmhvyf///2lviaujNe0tWTcplfaW0CVOVFQ1ae8TumRGupRddLFktIAkpQpipEvqoosl9EhdAAvFKfTd8tQbAAAAAElFTkSuQmCC)} 837#webamp .selected .playlist-top-right-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TkVWnvkzfnqmhvyf///2lviaujNe0tWTcplfaW0CVOVFQ1ae8TumRGupRddLFktIAkpQpipEvqoosl9EhdAAvFKfTd8tQbAAAAAElFTkSuQmCC)} 838#webamp .selected .playlist-top-right-spacer {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU1nL+z0BjwFhRPoH2ltjZJAwTS+TkVWnvkzfnqmhvyf///2lviaujNe0tWTcplfaW0CVOVFQ1ae8TumRGupRddLFktIAkpQpipEvqoosl9EhdAAvFKfTd8tQbAAAAAElFTkSuQmCC)} 839#webamp .selected .playlist-top-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAAA/FBMVEUdHS0dHS4eHi8eHyUfHzAfHzIgHzIgITMhITQiITQiIjUjIzYkIzckIzgkJDckJDkkJSklJTomJTsmJjsmJjwnJz0oJz4oKD8pKUApKUEqKUEqKkEqKkIrKUIrKkMrK0QsK0MsK0QsLEMsLEUtLUYuLUcuLUguLkcu
839LkkvL0owMEsxMEwyMU0yMU4yMk8zM1A0MlA0NFE1NFM2NVM2NVQ2NlU3NVY3N1Y4N1c4N1g4OFg5OFk6OVo7Olw8O109O149PF9FQTtqanpra3xsbHxsbH1tbX9uboFwb4NxcYZzbFJzcoh0c4p0dIp1dYx4do54d5CukmXsznr///9ua7yBAAAAvklEQVQYGQXBsU0dQBAFwHnvFsshErl7MQVQtlsgIEGWSMkd/FvPBJEmjWrbJEkbr0RFRFQSkeG9+bHn7GmaNtNKWsTtKsRCMETv+QQAMASfbwEAGKyjAACGezx8AwAY7D2eAQAMa9e/nwAAA7m//gAAGNzm8TJJ2jTntJIO9itpmjRp06onRcDGlgTrYbD8TpIQlYRkwO7HU+akTU5PkqQA1712xUJSALuu2C1QwH2wILuJNYB1/6adnCSpnv/+0TYBQOmyqAAAAABJRU5ErkJggg==)} 840#webamp .selected .playlist-top-title {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAUCAMAAABMHminAAABd1BMVEUdHS0dHS4eHS4eHi8eHyUfHzAfHzIgHzIgITMhITQiITQiIjUjIzYkIzckIzgkJDkkJSklJTomJTsmJjsmJjwnJz0oJz4oKD8pJ0ApKUApKUEpKkEqKUEqKkEqKkIrKUIrKkMrK0QrLEQsK0MsK0QsLEUtLUYtLkctLkguLUcuLUguLkcuLkkvL0ovMEswL0swMEsxMEwyMU0yMU4yMk8zM1A0MlA0M1E0NFE1NFM2NVM2NVQ2NlU3NVY3N1Y4N1c4N1g4OE44OFg5OFM5OFk6OVo7Olw8O109O149O2A9PF89PGA+PGA/QitAQFhCQV9FQTtIR2ZMTGFVVG1WVmNbWnZgX3djY3BlZXdlZnRqanpraoBra3xsbHxsbH1tbX9uboFwb4NxcYZzbFJzcohzc4p0c4p0dIp1dYZ1dYx4do54d5B9fY6FhJSLjJqQj6CXlqeioq+srbettMSukmW8u8XHx83KydLW1tzk5Ojsznry8vT////NCpc8AAADfklEQVQYGQXBS6tfBxUH0PXb5+Q+Y2oFI5ZoknpLiU8cCELopANJG+M38Ds48nM4ciw4cVJ0INhBK5T6KPVRChVFIzHUB4IQvYbEe+//7O1auQGDzWYaM81mzMyYmclMMzMAIJQKsZBIoqIioiwLhPUuGGDoMaNhGAyj0QAAJSGEICiJBYKYsD4EW9oMM3bTunVnm9G2zoWZ2UzrBpZepoo1saRSJYk1qmaxVIKiCgUMxIhpI6TFwCBtJttIYBuLpmcAUINOAwKQlTt07cww073Rbdo2o23d2Zlt9GSXBlSprNuSLLGUSmJRSZZURSTW3fo667edf+eO/pL3vrj/7mf3f/OVS29/df3Dwc0H9+dry3/eds/Zj1858oN7V9j+9Ivmm3uc/+rqC6c/yuYbR09+cnf//u9f3b3x6sWb6vmbj3/95eNcPLj8HC7er9e/taeqDpDz5XjftYMzkOfR15c5CPZvHRLu/3y5aYHv/XXvC2CWwzns387Nl+vPoQyeu3z+u6ePPnz3sb+/Lw6q1g9sTM4Ob/DMegpm/yq5ttv2P/XQbj1xvjdcPbTVBrevaJS8lNMrt985feb4vw/CZMD+586e/TcwPqBOTl4k/ubwYnc8HwZ2Z8c4ON+5Hk9n7ynN0ccfv7cFrh+c/hBtnt21j3pz5y2Iwj8eXdi/PqA4OTlZ9/wTnu7Ws6zn0Pzx83F9ucQBnh49uaL4yy91NXyflPX2vHO4Hc1h0oi84DE+uX/fLUCvHn3C+l2P7xD/u3zq+MJQ/OvRx1w7+6mX9z/Nk8O37glmphqwtKPPOPRaXvnISz+Dsd70AGfLLRf3A/Sd18jXgZ0xzNhN69ZmM9Nty4WZbUybDaS2VYosxWqxSpJKSiqXJCQsU+QGMGybHmbM2GjNmDZG0wMAoigRC4kkKpJEimWBUGAGAMEwhgEGGgCQjBIRGBASaACsdwHDgM0MzcAwjBk0AFAoQghCkbBAkAnrQ9DajGF20zNtZrYZ3dNjZ2yj07sYlm3thWSNLLKkkqSiSlWsEQkrFNANQgNMiwbCrozuZRZsyy6jshJSlQBFMSsBelBgqwJMF0EIUVHbsGwzMzMaNoGtZxgN0DR2ABIUWLrBUE2LxogevZBImNFIMo0a0GOAEBQwbJAbMNhs9DAzYzNmxow2hjYzAJCIkkgiksQiKkhZFgj/B6KI5O4cXV8dAAAAAElFTkSuQmCC)} 841#webamp .selected .playlist-top-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAABI1BMVEUdHS0dHS4eHS4eHi8eHyUfHzAfHzIgHzIhITQhIjQiITQiIjUjIzYkIzckIzgkJDklJTomJjsmJjwnJz0oJz4oKD8pKUApKUEpKkEqKUEqKkEqKkIrKUIrKkMrK0QsK0QsLEUtLUYtLkguLUcuLUguLkcuLkkvL0owL0swMEsxMEwyMU0yMU4yMk0yMk8zM1A0LhA0MlA0NFE1NFM2NVM2NVQ2NlU3NVY3N1Y4N1c4OFg4QlY5OFk5OVc6OVo7Olo7Olw8O109O149PFs9PF89PGA+PGA/QitFQTtYVjxnXEJqanpra3xsbHxsbH1tbX9uboFwb4NxcYZzbFJzcoh0c4p0dIp1dYx4do54d5CNcTisrbeukmWwmV7O4tDsznr////5EmU+AAABC0lEQVQYGQXBMUpcYRiG0ef7708qu4mgxYCFVdbgtIGsIesLZAOuQ0GIlfXFMEMgTOXc7308p/Z2Y1Q1JGgMzAcUVIIIqsjjPKUNm912a+uWEBkCIwsAAwYBYKMmB3UP8Oeid65wW8/9Pn/274P7BeDbS+PXsnbHKmZN5B8ABNba9XJalbkCWgCOBvvLhxTMa2BggQSo5WMpGMzlTMUS+D+a293J2vk3zF8crPMVwBmt4wqWUN/T2rETu022GOM6X+1Womokhv7x1AwoQACEAIEN5gMiKkFEeQRgntLjglvHdOeSaCgZhC6ImCgLCsIAMF1lUcimADCgqgBKYmsQgPlqt8R73tpWcwMAn2oG882E0Lr4AAAAAElFTkSuQmCC)} 842#webamp .playlist-middle-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAdAgMAAADjkWVKAAAADFBMVEUAAAAdHS0pKUBqano8VvpZAAAAD0lEQVQI12OoilvCQGcMALzxKw1EtyFgAAAAAElFTkSuQmCC)} 843#webamp .playlist-middle-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAdAgMAAADX6KRWAAAADFBMVEUAAAAdHS0pKUBqano8VvpZAAAAEklEQVQI12OwmrXq1UuGIUICAIEjYC7HaOXEAAAAAElFTkSuQmCC)} 844#webamp .playlist-scrollbar-handle {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAASBAMAAACUbIJFAAAAG1BMVEUJAgJ1XCKNcTibgkmwmV6+sX3aypzy8vT06sbDyd/kAAAAKElEQVQI12NIAwKGJCWlAoakiHYHhqRGD/KJimYHhnQXFwEGBQYGBgB4dhfwKIryTQAAAABJRU5ErkJggg==)} 845#webamp .playlist-middle-right.winamp-active .playlist-scrollbar-handle {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAASBAMAAACUbIJFAAAAGFBMVEUgDABsURh1XCKNcTihhkuwmV7DrnXaypzxKekLAAAAKklEQVQI12MIDQ0NYAgUFCxgCHRLN2AITDQjnyhLMmAINzYWYFBgYGAAAIGKEsehmtv8AAAAAElFTkSuQmCC)} 846#webamp .playlist-bottom {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAmAgMAAABMq9iIAAAACVBMVEUnJz04OFh0dIo98+79AAAAGUlEQVQY02NYBQYNDKFg4DDiaHSAKzygAADHT1L3iexI4AAAAABJRU5ErkJggg==)} 847#webamp .playlist-bottom-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAAmCAMAAADeF2QjAAABpFBMVEUODhYPDxgQERkREhsTFB4UFB8UFSAVFSIVFiEVFiIWFiEWFyMXFyQXGCQYGCUYGSYZGigaGykbGyobHCsbHCwcHCscHSwdHS0dHS4dHi0dHi4eHS4eHi8fHzAfHzIfIDEgHzIgITMhITQhIjQhIzYiITQiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklJTolJjsmJTsmJjsmJjwnJz0nJz4nKD0nKD4oJz4oKD8pKUApKUEpKkEqKkEqKkIrKUIrKkMrK0QrLEMrLEQsK0QsLEUtLUYtLUgtLkctLkguLUcuLUguLkcu
847LkkvL0ovMEsvMEwvN00wL0swMEsxMEwxMU4xMk0xMk4yMU0yMU4yMk8zM1AzNFE0MlA0M1E0NFE1NFM1NVQ1NlQ2NVQ2NlU3NVY3N1Y3N1g3OFc3OFg4N1c4N1g4OFg4OFk5OFk5OVdGUF1OWG5XZHZbXGRfYGpjY3BlZnRnaHZoaHhpaXlpaXtqanlqanpra3xsbH1tbX9uboFwb4NxcYZzcohzc4p0dIp1dYx5gpaBkqWttMS/zdPt//+lzFndAAAFVklEQVRYw4WYPa4sSRGFvxOZvYQnYBc4gGoVSGgkVjBiLFgBDj5IYKGxsdBI7GDcksCADWCOhB4G5n39OjMORmZV/9zqnpRu3e4+lRkZJ34yIvWDL7/l33z5bTu//dyAAcTj0NEXzU8q26/zT7eviaf/6/jkdn77/JdzZhpQbEsIoRAqAUIKRIUoeUKgQkFBcVAGpHozo4JKotILkuQAogLRKoohvZ/fzudzpg2K8KBgVw5y58QCTE1AYRIghRLK1DyhYmppTWQQFCRvyzZIJBjSL347fzpn9majvOHZEFjI89uckS23/UnbewiYKlnQUDXOsXdDxtgxGZQ2mOCSPn+6ZMvU2JEZ8sZWU95JAhtUcUwXsW5MDfTsDUPrVGJQEwONkHGGW4DLWLRl+u1zNjflpqI9VhUkKXKoGoMEN06BUOJo4LBJ1AyleqOtdVOu+5JtBWFqZkd24M/nbL649w4bi1MXY4gQY5shD7OPDUCCUkKpBFSFSQjR6wmKEwyis5GPrRYUkhL0y1u7kC374JhbsyNICzx0n5hEB6BAODEUYERMDnMayBE9w1p4urJqJZDkevHb28X0bEK/+hEHw38A4Itj8BtA/OQY/CcGPhyD32VNv31K3DLgd98R79/Kj4D4zTMwwL94AiYU/fgJaNX0pwtJkvHVRtj9Fm0s//IpKPGzZ2DNwodnYK/R3DLBgX/I4TAInoPp56BfgcVxoXcPX+TZSI6o20a8wLZIPx6KpF+4zxeHGvJqby+wl1PDvvh+l+sK6/6YUH8AV2C9Jj+u8IYO7LoqsLJuKwy0mtSdCuvCunB9ANaVwGVdWIB12UQU7+C6AMutcu10xVbmimNV5NjSonfzrev7w/3K7rpMpdcDJpf1AcgbnxjYcoW9Hx5SbhKW5b3d407A0HA5qDw2dBvlZuIEbsRTmYcncec9K8t8ACj1DjwSvs/aZoperuK3V5YBy/UdScu+zeWAo2WCNwa+mvYRgWuoLjeTJ+6I7wmnecDvPn8wyouZzlfxnrHVSy/F+7WIV9L9Mtsc1awHCev7CTqW/irXaXdmE/mfmf3vx8SfgrJ4Dqafg7MAnJn2z0A6H8fQ/q/PQIf992dgVvHx6bJ3Pp+//coffWw+Tn/84hlI+G8/PQYF6F8fjsFU3WOKDL4elaSsvSmRrAgp4xsRBFKBKCiQ5gEn/qEgFIFUHCHECUQW4L//6wVBjP4gKllb7UWzCGeW9gnWNIqQtrNvFGZjsjvyrNhinP7GwSyxy8haLoYyw30m9FEByq3RTME38Z65p3ONatbGeJSypOdxppLjbROZGlVuJEYJtIgAKm3LNS6zWGZ0aKJGKfTbqiF2J3woq8mhhTDq4B4mnIiMQmxNlqGCqzMx6qdR8I+6uHvfQWaFFpciYvuRjJjHbM4CGDzshMpsbFTwrJJjK7hj+k2AkdqwZqvG3WEcnVJk7EwPOcSlmodMO8I/uNp7rtyHsMhhftc5qwMywtNs3mh0AxWlGJ6HwDGSTxvForeI+/1tutN97z07aUsabhh7dzt2qem7dfgqkUWuvQwN6hZYIvCNl8s1rnnaB/cDnv5uD4+56bGuDfY0ErsRZ68/j/A6zm4RvisfTa8Ap1+/uql494t4R0w83Fvo6LLi7kpD1rhcMH+axLC5obQ3bChcYpAbLnKERJSsQiGhiEF7FAJVZQVx6lWlR0GUaTmXabg6CYotzYutvBQSZnd8CNNzc7jR10cPPNNHzFAcrWYnEiFXTA3jgI61JaJUpQ8n1QG5erzxGa417ikcN6x4JImRl8sehwVBma+V1EzHgcMbqRbS/wFHTmME7id3UQAAAABJRU5ErkJggg==)} 848#webamp .playlist-bottom-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAmCAMAAAARFZKlAAAByFBMVEUAAAAA+AAODhYPDxgQERkREhsTFB4UFB8UFSAVFSIVFiEVFiIWFiEWFyMXFyQXGCQYGCUYGCkYGSYZGigaGykbGyobHCsbHCwcHCscHSwdHS0dHS4dHi0dHi4eHS4eHi8fHzAfHzIfIDEgHzIgITMhITQhIjQhIzYiITQiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklJTolJjsmJTsmJjsmJjwnJz0nJz4nKD0nKD4oJz4oKD8pKUApKUEpKkEqKUEqKkEqKkIrKkMrK0QrLEQsK0QsLEUtLUYtLUgtLkctLkguLUcuLUguLkkvL0ovMDkvMEsvN00wL0swMEsxMEwxMU4xMk0xMk4yMU0yMU4yMk8zMz0zM1AzNFE0MlA0M1E0NFE1NFM1NVQ1NlQ2NVQ2NkE2NlU3NVY3N1Y3N1g3OFc3OFg4N1c4N1g4OEY4OFg4OFk5OFk5OVc5OVo7PEtGUF1OWG5QUFlTU11WVmNXZHZbXGRfYGpjY3BlZnRnaHZoaHhpaXlqanlqanpra3xsbH1tbX9uboFwb4NxcYZzbFJzcohzc4p0c4p0dIp1dYx5gpaBkqWttMS/zdPsznrt///////YTLulAAAHJklEQVQYGbXBTaim91kH4Ov+P8/p4tD90ERFpaCouBGxCxX7QpmCOxHBj40LP1ra0JLUTbeCO+lON/YDk6B12RYyLl4REVyK0DpCa2tTJwxmVzokeZ///fN5zzkzySQjdjPXVZ/zRKkkqCDO2rW4EgRBCFoQxJV4gkIpiiq7O9x25Y5v+fgd31q/M1KjBz1c6yw6Qnd1S7AJSW2NWZs4iXQ6zIiT2GTXobOJLelKTKoXRtWSCxejailrKdfueMwoRtOGG6medm3UMlaFzZW2jMFQKhQZhcIsQhRlm1NMVUNk6GkmnZ455ZT0FlvEI7dve2RQbRjtoRKpGK3fMmOwCmHOJj0jCGnMiIGMKjIYI9pSEmel2yk9s9vyVmSLLeLGbW57aFQMu+FtS0kx+mKlus0e5Wwso7GsFFJDM0rZ1bCb1fRcsUnJwFRpp9mzu7et3zx1trZFXLltd9uNkdLDNN3oMZoouqfYlY4r01AmlZVK9QUdtLOwBGv1OlSoijKKTs3OW53K3ObszLZFgtuu3HZtLcJicWN0FlOlTmNbrNtooxHGpE1j0m1X68ayiWUTHVTYxlRZtkqlGq3SVdtSpwtd62b0mMa2KtzxmDWV+hcpN1KiMuMsztJUp0JvS3cqwhSTELZgNiJII5FPv5gKxoyusa11WoZt2dTFmL1uC8rj1krJP3uaqlG/86OeIF9a56LyUdfuuDJSUZ6qrmqfZXkv97OZiVdcuePasIunKaR+267fbWab2cwZr9jdcWMkJZ62+hFnRxyPR45Hx+ORmDNTZrzCHQ+tVVk8XaO9w+F4cDxwOB7spt2SudQr5ZGBHp6minc7HD20zTl7JjPikUGN9jQl3uNwdCPbzOxOZsRDg3R5mmp45Hh0dHQ8HtyYvZ0yuzsz4sYqlKcqHjrggIPdwVmnNhczS4+5VMqVtSKbpyloV44cjg6OHBwdcLrY1k29rxlzqbiy2o3PeVxK0BVnsWvX4lrsQgiCFkQqrsSuwnDtcORwPByOB8eDs5wW67b0djGNuVQPuzX4pe/1cNaDNloELU7VdBLCjCaxRTaJbDJFbElmJJ3obdnEFtO7HA/ODseD3WmobXhrnC6mMT/yzbYbRZUbA2PMEVVsA2U3lFIsdqe2rTU3VBPDrpEhGGUUMatUxWMOrh2OdunTNnvO7lNmf+QNGislc/EO1SVBd6nYZVQwh926LTa7+LoWYhPatEuIRiKffnG0h44eOTrYhS3CvDhdfPSNl+YiZVWouXioGbOUrG9V6YtTGI1gSbNuFaNV+tv
848+f+2hAw52Bw6u9NDJBeN08etv/PUf/OUk1h7DHLdeM265zy2vMRn9jP9+37O+W1s+aHeXn/H1ufzcv3X1Youz4Yf0vR9HvFenFrNXxm+8+YWPvUFSPcrs6svxgZ+4xK3Lyw98IEslz1y+/9lnL9//Y2s+eHn207j8xZ932U56/ppa/R+qvMdLmOl3I52ZTp/mb33/83/8xhebLVbK4NblaLvh0jPuiRtbMWjCuPxZrOpXx4f/gWhPEI8bzfjT38v9zXs1Zemsv/v633zi+y9+7C86NmvJMsvlcGO49MxrHlo3NwrjkrRfGcaH/17FDyGxqxdlihDRomsO1S1Z/P7rLz/3gy994s2UHnMkNYsH7Ub3gwf3Ejc279QPqPELutsvY3iCKu9UzkrPQYgrRYZu6fT8w1e/+MnX/+rj3/98J7MNNSrcf9DOuh88uHevPFIr3Y3QD77u7MGZXXuCxGPKLmrpKLFrpOghXVt/7NW/ff7VLz33+hf+qNuc1mg8cN8t3L/lvhrNvWf81/qs78zlP3/S7j+UB9+YeYDLYdfih1JhmM6iInaRSnWp9sm7X33h1S8///rLz/0gbep1kKVfG9y3e40xpHrcm07fft+oLd+ku/iGxL/iHxeb3lQvf0YIQROCuBJnTRIypko8NJpqfOruVz5z92svvPrl519/mTRrKovhoWFOS6VitOU0LmwhY9p1Zd1Sa1Con/qnsYWNbCLJ1B3pOmlbJTFaxa4rro1WulJNPnX3K5+5+9UX/v1rL7z6d8//+ep0MetDi5JCypUwR3WCOEuqM6Zddy9Odlsl5mghmYKZ2LUujUZCptgFcS3iRpyVKlX1Jy+N/xmLoohylmA1K3Zll66my9lYbM6KMlAo7xAGA4OgU87ibfFIXIlEErN7/c3yBLFLVOziSjuLa7ELQRCaEOJKPBLvkoonKDJl/a6yG942l1khPbZi03SHmGNq6Y44kcQmuiWb6E7MiK2czESnOt1jmokIqTk6tCR6NLGrZYylxiqjJIamXZvLXFJS/VY4xa6dzdEMelmZq+go17rsQgqdOZuiCmO0VJVSyGiEKkZLRJLZc6a3basPWZSUs1RQPbZlCuIsXbTYdWxBTBItgi0kLUREIxGJaBG7uBbiWrytVKn6X7ReQxYUKuw2AAAAAElFTkSuQmCC)} 849#webamp .playlist-visualizer {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAAmBAMAAAB+CntdAAAAIVBMVEUAAAAAAAwAABAACCEAa7UYGCkZGSMnJz04OFhjnPd0dIrCNSsmAAAAW0lEQVQ4y2NYRQxYwNBBDGgYDsrKiQELGIgCCxhYiQFEm8aiSpRpTMSZxkmcaYxEus2MmqaNum0Yuk1FU0VTRFPF0sQSOwZBovNCFXEFF1HZuYBYZQNSWhLnNgDqVFE4O/Zo0wAAAABJRU5ErkJggg==)} 850#webamp #playlist-window-shade {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAOAgMAAACnVF/TAAAADFBMVEUAAAAdHS0pKUBqano8VvpZAAAAHUlEQVQI12MIBQMHhv9gcIBhFRg0MFALwMyD2gMAcRoULw29bBMAAAAASUVORK5CYII=)} 851#webamp #playlist-window-shade .left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAOAgMAAACnVF/TAAAADFBMVEUAAAAdHS0pKUBqano8VvpZAAAAIklEQVQI12MIBQMHhvr/IHCAoWoVCDQwVDFAAMU01DyoPQAU7xeZEgCs6QAAAABJRU5ErkJggg==)} 852#webamp #playlist-window-shade .right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAOCAMAAABaWb9VAAAANlBMVEUAAAALDxYMDAwdHS0fEQopKUA0LhBGQh9ORDBQPx5YVjxnXEJqanpwTyxzk5p5ip6NcTiOkZBJ6prXAAAAbUlEQVQoz6XSORaAIAxFUQjyFTEO+9+sBI82ajT6KgpukYAL5txgLbhoLbjLfpFGkkMGESHfk2kXGEtiegbA0MiGUEm5GKnjxCCdCMJykDZxekdKqASc5idSZ6nk5SznjXnvtY2p7/Lh9e3fcgVRHAwq+Kdj5gAAAABJRU5ErkJggg==)} 853#webamp #playlist-window-shade.selected .right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAOCAMAAABaWb9VAAAAM1BMVEUAAAAdHS0pKUA0LhBFQTtPSThYVjxnXEJqanpzk5p5ip6NcTiOkZCsrbewmV7O4tD///+ogWxMAAAAbElEQVQoz52SSQ7AIAgAsQjU3f+/tpIup9ZI58SBCSs4M7BbcbBZcfDKHyXeCV7RQBgRWb6VfkmeQilBHa7CUnmmnBJRGdCIUGqqgnNFJWqPwqknXlIGtFxFG/O5tUyLs0TrxuLsLj+ub3/LA63jB8yJpQTsAAAAAElFTkSuQmCC)} 854#webamp #playlist-add-menu.selected .bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAA2AgMAAAB/8csyAAAADFBMVEUvL0RGUF2BkqXt//98VqXeAAAAFklEQVQI12NgYTBhKGHYQmNYArSFBQBn5SMZFZ1KogAAAABJRU5ErkJggg==)} 855#webamp #playlist-add-menu .add-url {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAWElEQVQI14WOsQ2AMAwEv3LPKBYTABsgorTfxCtkfRyUOIiGq04v62Sk4EKugxPZOmVzpxAGKeoupInwcWD6e3eP+9FpTnppOvm3g6307cTPinSsHcW+BDd3RTueo3YTtwAAAABJRU5ErkJggg==)} 856#webamp #playlist-add-menu .hover .add-url {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAV0lEQVQI14WOyQ2AMAwE9+MCEEkDdEAnGwmXACWQ9skFmx/zGq2skbEJLALBB8eOmF8S4n11zupOIxzW3Eg3Y3NAPu/Fv/tB77CU5OTfDtZSQpg6q/5/AGMtMU3PzLN0AAAAAElFTkSuQmCC)} 857#webamp #playlist-add-menu .add-dir {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAWUlEQVQI122OsQ2AMAwEv/qeUSwmADZARG6/iVdgfRrHScFVp5d1MlrxwN/BDY+kH/AQhQC7wYNSkOoGD2D6ulPzfnQsO2K6gtLifzuF4Uunfja0a08M51Z82fg51vPZ5kgAAAAASUVORK5CYII=)} 858#webamp #playlist-add-menu .hover .add-dir {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAV0lEQVQI12NQQgAGQQRgEAmFghBDBtFyGAhkEC1Lg4BUEDs0gDWAIZSBFcxmDQgIZWUNALMZGBBsZHEgG64eCuDmBLBC2QFgLQg2NnGQehBbBMkcYYT7AQVAL9EsAFyYAAAAAElFTkSuQmCC)} 859#webamp #playlist-add-menu .add-file {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAXklEQVQI12WOsQ2AMAwEv3LPKBYTABsgorTfxCuwPpZJDIJzc3q9LaMkB+o52FGt0xZ3CmGQpu5CmgjDgcffuXv2xx13wseIcPOW8c4lXH65xQa+d/JnRdnmjmKdkguiDDkEOAftpAAAAABJRU5ErkJggg==)} 860#webamp #playlist-add-menu .hover .add-file {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXUlEQVQI12WOwQ2AMAwD/ckAiHYBNmATI+ERYARYnzQttBKXz8lyomDpYOogqbGvyPfLhnydlaO4aIRg4UbKjOFA9zF3//qN4oSPiHB5S6y5hdsvV2x4Pw135v7/A+euLyJ1PQpNAAAAAElFTkSuQmCC)} 861#webamp #playlist-remove-menu.selected .bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAABIAgMAAABO2aeDAAAADFBMVEUvL0RGUF2BkqXt//98VqXeAAAAFklEQVQI12NgYTBhKGHYMghgCdAlLABvUy/BqCAQTQAAAABJRU5ErkJggg==)} 862#webamp #playlist-remove-menu .remove-all {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAWklEQVQI13WOMQqAQBADp0rvUw5foP5AlG23MV/w+xbenSI41RBCCHtnI87GSrhyTIQxknUUwpJM3o4xPLnU/Om3nULYSmf1zJfzk2eS+LvTPxf2ZawU5qFzAa7rOIxN5zmHAAAAAElFTkSuQmCC)} 863#webamp #playlist-remove-menu .hover .remove-all {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAWElEQVQI13WO0QmAMAxE7ycDiO0CbuAmJ3gj6Ai6vtGmpD8+CDwuIRyWBFOComBfUe/OhnqdjeN1QTCTfW5uoPVcQOY+4XkfNDeK4eTg+MnpG7iX4c+c/R8m4y6+oJDkfgAAAABJRU5ErkJggg==)} 864#webamp #playlist-remove-menu .crop {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAR0lEQVQI12MIhYMQhvByGAhiCE+DglRHJLYhHjZDAlsCEIPYCWkJYABlswGZyOIw9QlA9fjNxMGGu9mQIdTZGAoMGZwE4QAAjAZBLD2pp6oAAAAASUVORK5CYII=)} 865#webamp #playlist-remove-menu .hover .crop {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAASElEQVQI12NQQgAGQQRgEAmFghBDBtFyGAhkEC1Lg4BUEBumCC+bIYA1AIhB7IDQADCAslmBTGRxmPoAoPpQ4swXQWILI9wPAIC4Ne4ZKh5qAAAAAElFTkSuQmCC)} 866#webamp #playlist-remove-menu .remove-selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAXUlEQVQI112OvQnDUBgDr1KfUR6ZIMkGxuZr1VgreP0Ufj/gqw4hhDgmO3UNNiqd80OFIEVnoyIp+HZCYOXS8NUfO41KMO7uOMMja7pXbhmT58783Dh+707j+5r8AVpzN34SgZTJAAAAAElFTkSuQmCC)} 867#webamp #playlist-remove-menu .hover .remove-selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAWklEQVQI102O0QmAMAwF388bQGwXcAM3iWBG0BF0fWOb+rxSOI40FIvAJFA82VfUe7ChXmfneN3hIJ3NGQbj6A6ox03XfNIdBku3drLT+LmpR40X4eW3Z9b/H/ZpLd3ACl8TAAAAAElFTkSuQmCC)} 868#webamp #playlist-remove-menu .remove-misc {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAYUlEQVQI102Ouw0CQRQDJ3JOKSsqADpAd3qpk3ULtE+wn7uJLGtkmXNzUL/Fl8qkv6gQpKg3KpKCRyYErl5a+fLXTqMcO4TeKIs4Hj04mtl27O1bw7/v7M+N8/OcNN6PzR8ABzaO5fDK/gAAAABJRU5ErkJggg==)} 869#webamp #playlist-remove-menu .hover .remove-misc {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXklEQVQI102O7QmAMAxE788NILYLuIGbRPBG0BF0fZN+EB8UXo9LCLYES4KiwbmjvpMD9bk7V7ggkGJzusE4cwGZ+xue/UG4ySwmmhPyf88BE4c7UZt9Y/TLb8+a93++ly0VHemPIgAAAABJRU5ErkJggg==)} 870#webamp #playlist-selection-menu.selected .bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAA2AgMAAAB/8csyAAAADFBMVEUvL0RGUF2BkqXt//98VqXeAAAAFklEQVQI12NgYTBhKGHYQmNYArSFBQBn5SMZFZ1KogAAAABJRU5ErkJggg==)} 871#webamp #playlist-selection-menu .invert-selection {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAXUlEQVQI113OsQ3DQAwEwY0udymEK7DdgSCBKZO/FtS+k39K0EYDgiDI0e3kudpIz8aHNFKVNYJ0mbu5LIxHzP3ldSdIu4Q0LcvLZdrWNccIPe/0z8Hxe8+C76v7A5OQN+oVjwHMAAAAAElFTkSuQmCC)} 872#webamp #playlist-selection-menu .hover .invert-selection {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXUlEQVQI103OwQ2AMAxDUV88AIIswAZs4kh4BBihrM+BhvafnqooKfYRlhE2984D8VSJaPfXlYgmyKSciGaKkzFZFP3Pd9eBRDSLgrppuSyLZXO8w4LgxDbtWcf/X0qvMI9I7cp+AAAAAElFTkSuQmCC)} 873#webamp #playlist-selection-menu .select-zero {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAYElEQVQI102OwQ2AMAwD/cqfUSomADZAVHz9oSuwPm4aAtfPyXKtoCYHzvtlx9mCa+kOgvIip7/hzWjp/HKl+hF57Mh7SGs2OqoL9z5jw30+cu8z+r+dvLmgbnNQsE7JAyOvPXLeVffRAAAAAElFTkSuQmCC)} 874#webamp #playlist-selection-menu .hover .select-zero {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAX0lEQVQI102Oyw2AMAxDc8kAiHYBNmATI+ERYARYn3wK4fXyZLlWZClkKqRxsK/S75dN+nUmhzspEJDhiJdOhX6Oyi21HyNP3D2EUrNjdSPcZzQ95kcefXi//Xbmuv8BohAy09WnmqwAAAAASUVORK5CYII=)} 875#webamp #playlist-selection-menu .select-all {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAUklEQVQI12MIhYMQhvByGAhiCE+DglRHEJshgSEByDYEshPAEMJOY0tgg7MTEOJAUaAOqDjUHKh6hBpk9Qw4xBOwmgN3syFDqLMxFBgyOAnCAQD0WT/cwFbKdgAAAABJRU5ErkJggg==)} 876#webamp #playlist-selection-menu .hover .select-all {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAVElEQVQI12NQQgAGQQRgEAmFghBDBtFyGAhkEC1Lg4BUEDs0lCGAISA0FMwOAEMIO5Q1gBXODkCIA0WBOqDiEABTj1CDrJ4Bh3gA1BwRJHOEEe4HAB23NNar7KHYAAAAAElFTkSuQmCC)} 877#webamp #playlist-close-button.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEU0MCxnXEKGd02ukmX///8tdlhEAAAAKElEQVQI12MwBgIDBkMBBkEgySjIaMBgIKAgACSFnARgbIg4RA1YPQCfwgXpyvsxsgAAAABJRU5ErkJggg==)} 878#webamp #playlist-window #playlist-shade-button.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAFVBMVEVFQTtPSThYVjxnXEKukmW0r4e+sX1mGpZYAAAANklEQVQI12NwAQIHBpe0tBQHBrfUtDAHBmdjY2MHBidjYyMgqWys5MDgqKSkCFQjKCACJEHqAT9eCss1JzHfAAAAAElFTkSuQmCC)} 879#webamp #playlist-window-shade #playlist-shade-button.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAFVBMVEVFQTtPSThYVjyukmW0r4e+sX3BsGNteY1yAAAAMUlEQVQI12MwBgIDBmMBAWEDBkORkEADBiPV0CAgmQom09KUgOJpaYogNYLMQBKkHgD8fwlqtoGUgQAAAABJRU5ErkJggg==)} 880#webamp #playlist-misc-menu.selected .bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAA2AgMAAAB/8csyAAAADFBMVEUvL0RGUF2BkqXt//98VqXeAAAAFklEQVQI12NgYTBhKGHYQmNYArSFBQBn5SMZFZ1KogAAAABJRU5ErkJggg==)} 881#webamp #playlist-misc-menu .misc-options {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAYElEQVQI112OsQ0CQQwEN9qcUiwqADpAvJxOctsC7RPgPyEmmmA9so7NS/0+eaozrJuaQBStUmOFkFVqJOJxIIwH8He/O6VGmLMDv7eO4/HEYfaJ8X9n/1w6HtehdL9sPlWoO+DkW3+GAAAAAElFTkSuQmCC)} 882#webamp #playlist-misc-menu .hover .misc-options {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAYElEQVQI102O2xGAIAwE7ycFOEIDdmAn54xXgpag7Rsembj8LMwSwJZgSVA0OXfUNzhQn3twNadIQehukO/VHaBsutOy6GmjjwdGT2PMaX3eNfmaLnfO3p1+Xn5z1vz/BxcjMYQLzDa1AAAAAElFTkSuQmCC)} 883#webamp #playlist-misc-menu .file-info {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAX0lEQVQI12WOsQ2AMAwEv/qeUSwmADZARGndxCuwPomJTcGlOb0+L6MkF+odnKg2aRuqoj9TNOluxu7mTnf+cvMf3s+d4WOG4JtTSVo4iHSN3PvR+XbyZkE51olgX5IHU8k5In6uSFkAAAAASUVORK5CYII=)} 884#webamp #playlist-misc-menu .hover .file-info {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXUlEQVQI12WOyw2AMAxDffEAiHYBNmCTIJERYAS6Pq
8841LKBIvlycrPywDTAMkf9hX5BJsyNfZOZobarlB7s7qLqecv9w1of44IG9rCPacRtLDQbxukau/efrsmcf/N3ldLzugWMN5AAAAAElFTkSuQmCC)} 885#webamp #playlist-misc-menu .sort-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAXklEQVQI102OsQ2AQAwDXaVnlIgJgA0Qr7Ru3iuwPgVJ4Corsk/BaC7EXZwIJXNDCASNmI6gSFI2HSEjaZn53WlEd8rzbiGUR0ZlXzLZL5cHRPt/nv7ZMY41cexL8wCXGToqpM1dFQAAAABJRU5ErkJggg==)} 886#webamp #playlist-misc-menu .hover .sort-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXUlEQVQI102O0Q2AMAhE74cBjO0CbuAmZyIj6Ai6vtBS6fvpCzmOYkuwJCganDvqOzhQn7tzuSsICuFOpaHS5mIq4cy5Z/9MELvwru62rZG3V2Xy0dPuupepZ83/f5v5MBfSedE0AAAAAElFTkSuQmCC)} 887#webamp #playlist-list-menu.selected .bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAA2AgMAAAB/8csyAAAADFBMVEUvL0RGUF2BkqXt//98VqXeAAAAFklEQVQI12NgYTBhKGHYQmNYArSFBQBn5SMZFZ1KogAAAABJRU5ErkJggg==)} 888#webamp #playlist-list-menu .new-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAYElEQVQI123OsQ2DQBBE0R9NTiknKgB3YIE2nYRpgfYd3PlEwI9esBot5+yg7n9fKqNroxwhRVejLClSNyLQbSm4+3E/dxrlmGC6I2dsJooe9jDGLzvz58b5WUeNfZn9AKbQNSZ12uygAAAAAElFTkSuQmCC)} 889#webamp #playlist-list-menu .hover .new-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAXklEQVQI112O0QmAMAxE7+cGENsF3MBNIngj6Ai6vk3T0uKDwCM5kmAbYBkgqXHuyG/nQH7u4HI3EaRYnW4MByEgvAwE4z/fD0TfSt4QLnp1Fye35iVrtZ+mPev4/wORlyvp1GfF2gAAAABJRU5ErkJggg==)} 890#webamp #playlist-list-menu .load-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAWklEQVQI12MIhYMQhvByGAhiCE+DglRHhvCEtAQGIGRLNQSzwQDOZkBiw8RBqhMg6uHmQNQwpAHlIOw0NhCGsUEQzk6AssG2pmGYA3ezIUOoszEUGDI4CcIBAJZqO86fMyFaAAAAAElFTkSuQmCC)} 891#webamp #playlist-list-menu .hover .load-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAV0lEQVQI12NQQgAGQQRgEAmFghBDBtFyGAhkEC1Lg4BUEDsgNIABCFmhbDCAsxmQ2DBxkOoAiHqYBTBzQoFyEHYoKwjD2CAIZwdA2WBbQWwRJHOEEe4HAE6RMXWXqbP6AAAAAElFTkSuQmCC)} 892#webamp #playlist-list-menu .save-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUvN01OWG5XZHZ5gpaBkqWttMS/zdPt//9STElyAAAAYklEQVQI102OuQ3EQAwDGSl3KYIrsK+Dwy2UTrJswe1fsA880YCgCKltfqpn8VV50i+VhQD1VGEA3FPlQED0VBlAIyfAMfp7Z9zKWjsO7FjueDnThZj5e2f/nGqfc5K6j80fAQw6zDOWMCAAAAAASUVORK5CYII=)} 893#webamp #playlist-list-menu .hover .save-list {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAASBAMAAACtCzMeAAAAGFBMVEUAAAALDxYZICpXZHZneYZ5ip6Jmq2tvMRwzsuHAAAAYElEQVQI102O0Q2AIAxE76cDGHEBN3CTM7Ej6Ai6vlwL4iMkL5ejBesA0wDFG8eG5ensWO4rOeUOgiTkdAqP3CK3cKXInFYLlv2+oL2FZqXXRr3ddT5nc+2NvPzmzOP/L+cIMJ5Oo2aQAAAAAElFTkSuQmCC)} 894#webamp #equalizer-window:not(.shade) {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAB0CAMAAACR8SbcAAAByFBMVEUNDRQPDxYQEBgRERoRERsREhsSEhsSEh0TEx4TFB0UEx4UFB8VFSEWFiIXFyQXGCQYGCUYGCYZGScZGigaGScaGigbGyobHCsbHCwcGyscGywcHCscHCwdHS0dHS4dHi0dHi4eHS0eHS4eHi0eHi8fHzAfIDEgHzEgIDIhITQhITUhIjQhIjYiITQiITYiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklJTklJTolJTwlJjklJjslJjwmJTsmJTwmJjsnJz0nJz4nKD4oJz4oKD0oKD8pKT8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEMrLEQsK0MsK0QsLEMsLEUtLUYtLUgtLkctLkguLUcuLUguLkcuLkgvL0ovL0swL0owMEsxMU0xMU4xMk0xMk4yMU0yMU4yMk0yMk8yMlAzM1AzM1IzNFE0M1E0NFE0NFM1NVQ1NVY1NlM1NlQ2NVM2NVQ2NlM2NlQ2NlU3N1Y3N1c3N1g3OFc3OFg4N1c4N1g4OFc4OFg4OFk4OFo5OFk5OVk5OVpcXGRgX2pkZHFoaHhsbH5vb4JxcYZzc4hzc4p0c4p0dIt1dYzUqAzU1NnX192pRLExAAAnOklEQVQYGQTBP8+20ZoX5ON3rrXu+5m992QGDcRCDbEwRk0oJCEUJnZ8AkJDSIgyBXEKvgEJjXYUU4z/YkOHH0ALC8sJlSFSQGECGQviVicO2e/73Os6T44jAAIIEAgVhOoFMhEgFIJQQSy6KgJhVyYKhLC7ylBkCQXKufPuaoWBAiJCb00BgK5mptqI0aWB4O72oUEb3K4W7e5roNMYbhuM+K8BAAACAAAEAAAEAAACACAAQAAAAQSQCTIRkxEmAAAmk4FhMsBkYACAAQADAJgM/v7m78bUhEAgJBTVlcAh4ShRgpCdWbOlZOptikVRXqPYj11hs4SaImQ9tSkLekNO2/cgBGtSxeoKYQIwwQTuyoXhqe/1mIxh+LnxofGM0fph6LTJ3F4+3Opn3zaXnmK6ZxAkEBIydMUgl1CAGcFGzR5ErQu6ETratl9lZluLYYYMuYrMPFRtOD6PHBIJtWUXefAwEzNAAA+rx1q1U
894FPPnhkgzr2fD93xMNq0GUZjJISWfduAW6AEmCHIDIEhrCoZVTQkwA4keqJqikwVsafZHkj05wIFrLMxsZLGcbwBGKqyd7spZZZhngTAyMzyTI1HnvA85Soj3B8/P3tDZSxD9TOCGSb3s8od9n20dne3XZRKMBCZoKJQCjyKmKsqjDGhktk8VOgEs4rCitdjF6BIGCJyQURPw7m3gQyh09/KnieShGQNACF5rJqsus/M/ZkzW8gM+8v+OAfxPEN3B4wis+v7fia6uQwfdNFAIgkTaGaiCyydhDmEykTstM7dz65K2Jm2aDV717zcFYBZGwBGowZ64/Phc9bBRJBxEFvTT4IAgFYzw5OM3u+6c80YuD/Ojc/HNEtgNfRkGGqJ6bKGKOgukiDDDIJMSVAID4M6XYYREGRbaeMso3SUDu279tPAyyaoFRB1y4RnFYh9+iDB2NIDrBpVnpkBAGqS4VkzaHnaZATO+eyBxNMz9AWqZgwu6JsHqkWrIgaQAJmCqAScs0FvokzE7qqJ65nq+NTQFNAPm2oSUsA0MLwQa3XBsW8fYIiu2d2U50k9nVmSAYBhJuLpuLd9vzbDYH5+9vVBz2jTaj8YGtwuBm11cy+KwjCEAQgGDfi0sFXLkDBuYeznUKGSKtNUka0uXczePQQlgpQmrNHNcTd+AAXTT+0SiqkIDABE6Dxm2K9tdQ/Afbnb4Y6WqNtPMUzGxA5o9agX27RuhSIggBlkCAnrFNylTIoQ+5bUrvOAtxkqVYGiWbslPKsNOgyptbdk1sMuPmfjOcBE7fK6LXrHI0EoAGaQTK+VzHXne3QwUNd2PpSxpinzAAjdLnSv29/TerRSgAyBkCoSqhg0RGjBCOyebJ+uUqBo3WPvitdrP6Ogz60ESYR5aCPPSuB83OurQFDz7N5lZp6xhAEAA2aImUl5UusSwU+fvXw+SHEHADPNjBuGW+4mbgmPDb8BZAICoUQmSiYEAUJCECoIFipBeN1NFITAphhq3x13Fyg4FAZUK5CMotqkoAvo6uqZ3Z0xoKshk6v66Wqga3yGJszTDAba4JthzN/5nykEQAAiGGqkugWDAYEGYAio7hjM+N4EQAZaMar23dG7QOGcbg1QCoiJ7nlYBQpAdcXTlYyABhNVVae6AP10NkAKAA39zQAezwb+KwBAAABAAACAAABAAACZAIAAgExARgAZxQiZmAAATGBgZJgMMGAAAAMAAwAw8PfJrE0Gf49AJhSFCsERQV6kZELUZl7qKVWnCGJT26x5MVUZ2X0QVhchu5CwpoTj7nm+IGSy9dEV60Yp8+wJEwBm8iye5Zm7PdXXpDOZyc/92Xegp3XMrQ9GZwbzfdodt62rH3pmG
894E8xAYBQZDADzgW1d4s2JGxSMmWVT4OlxL7WuJ6+RjZaMGnIuppYTAIftw5kZOKm+iczT0oZtiAATCo7UfOMY9b3NSaMqM++g+7ElFE3gcpg7L7o2kAVpqEIAELSTFRVgI1RqQqRgAHzVIVTM01XSV26/rOtapPNX1SBSfmPmd5d0v78sgZu9r/bBWLyZ1epuxbW7zB04FcGwK/C7Sbtd32+88lLAjw/uBtSwxhuzcA8GPOUS5t1d/e+tyOgGCCADGqAcBqJ0UzFCLUjtiwZdJRUgZJ2FbiaDCrAmcYUzIMzxvk5xEBPpvYk65H1VDIDAjDGrE4/j9F7XfNtAPfrATzySNMbhgCZ3tgXl0taQBGQAbSKCT2gS4JSJkNQLnIresapUoxm2INNldgwQQPuLhQiG5/UY76CiQyvadAl3BYzABCRZz0xK1Oms8mY4VM/Dx/cagzq8zB4MPS6d8YFajM8aAUwQYgiUBH0ZcZqEkRGddFr96cqpa40S5G9rSrPc0tsNhkkhNe4ZMLMAHUEmSCZvrWxJDe1a3QCAHB3PHIHe/U1A5xdbcMaQ6X7BpiF+I6NLmjThkZTIUhgGEyiBKiSJEVGZZigpKjdOF2j6KFwp7dFm2HChALyfbzKmKUnkH2ByQTzurvuNQ9TirIAMJjhsmpi+CSFgImASXmme8oMQ3sw5MLtBXEBRGEwgwQlGSuRrLVUxTg20WOE3qX3dVXiUwWrAKWuZ++SUA10NcxqqKyRHccx+wOoYbtVd5/sKgo0AIRJeu1xk0n0pJv0BD9/PHc7pMcS2EAGdD0bdg2tMYyHUQABBFlFtrWqTgJNDZUK7GcUFjiGXo8FKva2G8JzBUUlqNaKJ2b4HHtyIBA367Fj7hOZ6R4AYMiozNh3zPTz+hSZGHyxPx8Qj+HezzYwGJ2+l763fdNX66ct2AgATKqEqMqEGNnRBSZh3yP77qhwulSXVZIdz/ZgE8NBEGDfTVgPG1xOYGJg7pth3yfj2UZhAGLE0J4MOt/qiUnGZNbjfD48GTJU+ci0wWSk6gPWlU8AEEUAoKpqRl7nlWQlxXulrqJKgjK0F0x8turyDLXD167NxeyNRJIpgbtVzcyzRoO9V/+EkCiZuYSsSpYOCACBwcINa25MIO6zwR3uDN/Xx0hVEKofh8tlTqOJBzYThCCKyqriFDJd1+t7I10mUV2buptKJqYaC1MG+cv8pwDiLwDgPyIAfx4I/DkBMvNnJRMwv5oA+BUAfilmwsz8G/6fajD4wQesplq85zsy08SgyiP2tb919qXaIGYTwIRJV3Jynlck6OWMF2AKXQVMTGKlFXqdMkXyR/7SH8VmCX/hf18E4j/8J7tia/x7/xzn8/oc68/9S5QJ+8/83y/sZ02e3/0Tlek14Vd/Chh++0+nZnrI/M6vRxsjzPeqTwZdoeqma17tQ+ma6Ax1qdf3rdGtdQ/csgGAUoup9UqwfZaOR0bUlLBN0tmquibvllhPrRgvzwJsFYFFsNaUV2LfvQIyzsfnQIx4fS7EUxolUgJAJxMxo5481VqMGOT9szMZ6lYXUa3z2HfUoxp8ZLrWZX1ryuOhygYgUEveZ1XtJYv1dGZWC2QycWvzunp1JbpMCLvmFS+xSSqfgzCJTEKroZecD8fNTd6IAj5TXnfP6l4UQUYAlMFMVx5ThtfPYRh4m/w4PraMB1Hsi6k8iHn5OdWpzmdfeWYANgAo5H3WeueVenf9Zn1Pf6iZar0IO58zd/eewioDWzqvZ9/XAae+6whKeT3P6smIqIjP+aA6E1CA0W5Jm2cJIEyAicwzUk1Gr5lvMSNpGM/mfAhLt8lTl0x6Kj1wX33re3WXMfXU0/iwAYBaWWet97vetar7F1P95BtpZWLi7jNiDYnqUqqrtqJ+SQrlPbAy7M/esLDypCDJcwgESKW+k82w+hEmQAAxsUyv9Ri6ZJBMOow8NfMNM/XUrEwXmaEyI/XERjz7+xn0NDgfG0CosPZa79cv8soh3535Id+TKSaE3VVZJgVFMTtE3ixBYqJ6mchaEpNhzOZwufs6BHa5+9Oe9/dAJtazTHR1AWAiYj2zn3Am1QwRZCz5cT5Ietm6sd31mJEaazqWz+v7vvIZJtPAbMhgQlbWWtm/rNdZL5zvevzm7rkmU0CVLrm7a7K6ZkpJrZ3yFlKjNBNyvCKYhIijpmZ7ZQ0m0Pfk5Xt7BZFZ1tVZpQCgy0OrfkDsb5gMk4HHBVPu7llPNR4yMTFZ0+p89v3OmpFW8GEjEyLBqpNf/qJ+sd97ZXrW6189v+Xn7GsyCdvnJGp2ZeqIIrLf388rL7EQ6aVVnErC8pxnxQ58nxxCCMI9NfGiBdZMsmzMJACjZM9YAMNrvskQA8q+g7BV3dOq9x3CuWIi34s1091mGIPeGIRJrexXvdf6xXu/s/CsH7/0/Vv9QQTuPtBpq9TddKm462UnK0BKFpbYmaTPZCKcu74gACJrEWRWoPQyQAJARjqypgGC90/7jpGMka8fjg/AxlDrM07n3H1Zz/umurV6GjBqI2GigKqv93t/rZzqm/v1492fNe65w0SVid2r1nj9fE+pVSzbWVlxqvknArHl/6yEks0/51wH/MsMIZz/975AJv6E9eTxVPlTAPwpCCb//wPA/8eovjJhMvj59bkbxyebT07fqpZt8/Lqj8y67uvH67tVMzBdBAJyXuv1Oq/1tfZvvV/vr/fO1/vrfGUfkrD/9u9N/a2/ZTF/I3/tDVrZqUxWznvVXvVKNvaraq3XOefgQK4vSVIzCRO4L0lkAp71rL0LAAAeup7UgrXK5rvYCCLF+2M751xxrxN2qderKlWnUifFjru+Xa0nQ6IYgFoqdb5Wfa3X69SrznnvnFR2PJjfr/sHMv/9f/c3RwWtms2+2z6xq/Zau/LazzmnzCruzSTn45zwJZGoEDW85iWsDLDMCtAwAFjumnU9xSKeeN2nC2xBOOfee6/7fn993RxFoZK1a5+qlaRmb3uAixmbAEFWfh/+KPucu646PfNXwH9z2+/7239Y4r8g/gbHX/M/kS75KxD/OKvA4z8B/qncd6z9078P/AsEMv828MdvqGfN828Cv96A8jvAnwCo3wV+XTyruh7/FvDHuTlux/w7wD87wZcf5/MfAP/HKmLZz18a/K9z7YuujDEbwESO+sNf/vZv/3K/99nblx+1P/nf7r/6+Zuf2bf+4L/8wy4T/0OFf/DXP/7hX1Wysut/eeedVe8Tx6dG/WMix5kD+Xr+GW+RCdZD/hh4E+Kxfw2VDcCfAADUr1VjobTm/2Kw7+nc2Vf+hfn5/mkt4P3TP53LZJXjo3LPP3rm5zxkdCUGnQJQVZx6fb1WUq8ria+z3uv9VPJG+4Ou3/N7/Od/E38df5U26GNn5bVzcm9k75Bs5x5JwnojTMnrvdebAm+Cx6pnQQIAAAD2slgZk7HwUnh3quzXI8j7p68jEfI+skxWnHuTE5XYQke1ew1sgJCElZx19v1KSE8leT/76zf7e82k93+bfv2PU+ofcP6hUfactWWIuF/8yP70fljhCzEx+foRRF7Y/f7uat4E6/GsZV8VAAAAQOapmBrPWo+M18PrMy+F10/w8yyQMD8xS8TNKz+uajWsu78fap63wWyAoE69ar+Wylfy5mdOOhSvp0x10wWl63RNtaib52XLrpyLr89Vz6KcuyVk4AtigbLTB7BYac+aPQEAAABQxYxnh/XAWj7rAs4nw5dnIWR8/WCNKfHm68fR59v
8946XEU9c9dPpVsBjMqq5F0rOUfeeMet13rnRb1musqU24X41FB2bOwstdwvOGLFIBIhAkQtBPVxIQCzEAAAAACMkTEJBLQXgnoJLBIIDvOU44v4uhZuVrXCpocoQA0ke16cuiEJeUu8Kkkn9amEvaZSOadSTc9WlVDlHEniC6nl3DfsNwESIRG81kZYMBUCAAAAAEPIjmERPKcQwTcBgRDvS23HFwEq9izKo/uRoVWA2ckKqTmrfDngnZzIya48hhp7S3oGKEvULsUoKxI4wFuSd3mTBNgCwb3ASJLBAAAAAEBiwoxkMBiAEAYI71dEHPhcIvE+gQO2apMZoxAQjtdar6WOVBDcdWLjtUuRe5+pClUGT3HUlryWS0i4B+dGFLwhSQAIe4MKSMgAAAAAYDAiiCX61kUgXhIIFgjgQEhuWHE9+mo8ZCmApqxJPQkAUFXyWgfKsDcm5xrUCd8PQiyALzgWbEBgvAUAhAgQMgAAAAAGGBjzoPQLAAGG2rzgfXEuCYGKueVMcx+Dpgik5KFOvWRdWGvxzpusKlI7hR3EeAa6J1UiUc5JBHC4JQABAiwAAQAZAQAAABBkBKILegPAAInAGxyHLwBs2RgB6KsALLvyWjt2yQmIRImpRfZW6oGkVhSror2UmFy8X2/h697jLLxJeG0kNtQsJQiWAEwAAAAAIGOSCViBFwRgEQk2kMQ9HwjEG6hNjX0GNsUQWImrpHwpAM4iLzLthluYnLsHHtnRYk4AjoALCLgSPJDQJAwACAAAAABmBgQwAGARW2QGAOPNuQRvfFsogG+Mb4ow1JB9zC6EJRYQ+ynvKltqpxY+m8KCXQgIlLDcUwQIG3iJhbUwmQCAAQAAAEAwAKIBALgGoRA2uNcxBHkfRdwPRgaYgoRUJU/W61EHRMBl2Zsabdxr1DoUFrtespVaDgE4yyeiAB5QAB5EAIAAAAAAQDAGAAAsUDKIEER8wxJe3jDisY9uJS02hYxs8Ep5BQCIvKxbazrsXdmUKtNtBTweAx9eEOF8fcEIxAtsAAsAAAAAAADAxIQBMEAAFJmgIApvgAMYPO5TJdfDuBQm9MPO8OACIFawqaqnGRhtStFVhjkpyfkK8AIDNoB3yhkgAFgCwAAAAAAgpkkASwQGAAQKAAAXuJu8WB69MRiFoIpKXnYsBJCXAzX6WEenqCi6RPp1kWACJEgIogCwtwIRlgUAQAAAAAAwLAYABsJiAREQAG/nTbwgCLKH8hMYCkFHMjtVQt5WkEWoRK0qeZ4dK7yLYlr16z57IwUAAMAC3FsEQzweAAAAAAAAwAQABmAAgAGAYH0iQGAMSZfR9SAUBiwTswEAANmDWnrMOBctq9TtlwubKwQAggBBv8GCsQAAAAAAAAAYACQAASAmAGDwYABQQqtxjy6gSFCeQ1XFLgDAAUXJnqkUZTCj+qW9pIBZwAbCvy4IDlv3b++7sL8+n+9x/v6XZXBFc41tNpcQWNPCKBuYtgFhjRUUx7oaNMKg+Az2GGR7BqPPQHtHE6euWJng1sDAahQGXUfX3siNJMVhYvO/5e88v8fxee/1gssF1gOgKFwAAAAAAAAABYAcAABEBYCieBEAoFpmtL7NIKZB4ToltmofCgBQFgrdS+hW3Up7m+pFVEMBDhAKaOhGAdCBCwAAAAAAQEWUAC4KAKChACh8+ORDKQ94A01hrLgatgahPPqNazUFALgY68qjyoDZMnSN06V1FQCUN0B5w6EAQAFVQAEAAAAAAExKFCAAgEYBAKLIhk0BzkgMT2aAJiCNBgAo2LoU1WWa8rgvWsElmOCCBWwKFXBxAECAcy4QAAAAAAAAEwAMAQAYCgCABwBA4+BD0QJdGqrElAYAwEp3NNM03Jc0Tbe0EfCoosBSEABNsQEF5boCVQAAAAAAAFejArgoACgg+AAA6oY3ACqsS+YZKNM6hRJVJRcaAGDDhH50U0Xr4Wj0aFWgETBQCkABAIBTEAAAAAAAAKoIoAAADiKwAYADAFBsUxhg6wJwNCsAAGjW0jwZ5frQNc1FOavLI8AjAA0pBQAsAMDlcgEAAAAAAAAUIAGgAT6oKi4AcH8CFEAOpUPYYtNCUdLRrQAAoLVSwYX//psprr+Rb8hcLxyUogCghAIAwAUgAAAAAAAAQBwCUANAAbwIBqAA2AKgiVHYoLVSAIAHAADQ+oO/lfbrf+/v/03tKLpVqWsBUABUEQVcAARAhQIAAAAAAKA0FUCuC8CBC4ANEDgA4IEZS6Ak9FgAusFfKPwQAPwM4p+OqV/3t34TB3+D9mt+Kw8n+AXghwB8CfhR6oLDZ8CPqwC+AHwE4FPgIwCfAh8B+BT4GMDxReDHQPBngR8C8CXgBxbg/grxHa7aAxgWAswF/+cnP/X4Uw0A/ijP9/2uO/nNX/87Tbdp//Ab47d+1eyl6O/2h7fHqgLgh0HVG+cCfgRKFOAnnAUAPgIA+AgA4CeVlHMB8OOAAgZ/HFEA8IN4/4RCgccf3v9h38EBQBYa6CrOAgAAaGMev8njW9/0bXxD+1V6ncZcBAAAWrkAoJgLAA0AAAAAAICYywUAAOA6AAAAKZCCG4a9DQmDWjQUA5fyAAAAmB6l99/X7duX/sdtHQCpvQAAGJwL1wFSACqYqhQAAAAAAFABAAAADgAAgP3ANAAez63PTaUG0QwltHkgbgAAYFruR0ENrQvzxjhQswCAwMKlACgugIJKAQAAAAAAFAAAAAARAgCw4AaAmEzILiBNEXWlAAAAAHQ97jwsaaql1+qXa1GoAYCSohxxBBRwAQTn2gUAAAAAAJAcBwBgIxwAKACId08AYMio1ENEkdIFOEXfAwAAgCbULdplBpulLYpcAAAADQBxFFDocwEAAAAAAAAJAMICmgMgAAAAAYAR0qUQHaWLS9BeAAAIMLofHx4pnKtaz+rq7NZYAABAUHAIFAIIdQEAAAAAAKBQEwHAa4Oh8UIACAER4AZscA/ZQ9EwjcBoA4AAMNNOzIBSTO+JCaF2FQCUAlEAAACCOAAAAAAAABGcLiAo3hoAQPACAJ4EhBVkCtgFoQtCF9gNAIAM9OiamzTQrDEWnVgBAoyIIA4AAKCo0gAAAAAAAIA6gAAABgsIAhAACILHzEDPdIGGKgaMAACwQGvbfFgFTU+vWcW2G7sQAFCBAgACAMJsAAAAAAAAByBQxGxPkMARhADwBAAB2fQ8x8veAU1XoyEFEgCAMMtc1qjm0j1N6zeLFEsAAFEQAAAAQF8AAAAAAADAQQHo67aFGRgCQGxYawkATLgMZWkQDQBRDAAAduFOowPQ7M6ASSE3AIACAKAAAAoAAAAAAKAAAkGYVwOaAABYAjzxBO4zsCHbNBLNCIpwsjOeOABgMmpA4RpqrEVvXRaEAAARBQAAAJwDAAAAAABAAEqiwNzGgAJAAngBFgGgycvUI0cZoTS6YFUJCC8XAI4Mc6GnoClrDrOwdrFTig1sFATiHIAAgOsCAAAAAAAAAEgOeuGNcEAARkLiLPcN8JR3bhtxz+UGaDpgZ6ZgRyIA3IJCl8qQdE9319HbZC8Fj5tLiAUFUC4AxQGEEAAAAAAAQBwSHFDw2ngCeBHADXDvm3tFPIE4NTuiBCHRKLB0HxOBTJDjmcDeMWZ02lWX4dXVLF0LwX14AVskEYOAAC4AiAIAAAAAAIACIWAu8AIIAGDDAhuegmBX1IxaQDQB7spt+hVnARB5msiVai3DNaF6La3XISAdgDBAIAYAcS5AYQAAAAAAAAACODAbhCCIvJ8IgyPcwn0EWCFbw5gbFN0aqMic1wIAAIoMNCkj9BlrX9RhqgcCCICtOAcACEilGgEAAAAAAABw4joiABCEuiBuBs8l4oEAIyXGu94lwdABMPpasyU3iACHBAbTui7d9nRTWVxHZQAEAETQAHAAFaoAAAAAAAAEKWFUAiQJCOB+P/cTvNwimORegeTcNZK1Z94AaOkAV2kzI0cIRxxYNdj7pNFk9Fjr6GZ6nKAAgCQoGgwBcClITomqAgAAAJAAiIEAZwYzCJ4IT7GsJRIZcE/mhKck3M49IPfsDDB0AecAM3B7BsBtZ6OMQingYda+7F5X6wqWGHgpkBiAwsxLEOCiBQAAAABVAgCBAIJQCQDluTDglljqcHKDgJx5DYoNoKNKAfad2TNzguPIK5xMvUZfLQZXaYS9jra7Hea4VW6IFCgAMLPflEMiBQkBAAAAEACBAACiBPGCpwT3nfudgEMMsd4lrEzYmWPGAERforhajZhLbgscJO8GixlQbdLAm2O1NaODedwpL14ISLwEEuQNOEoloBQAAABACgEcsJEAeycRyADe141FROK+zxnjnFvwfmdkX7rvAQJ0lHB4So1JnBtBIGJvZEY33aD1XhZ2d4xOOUYmAYALKEwBWpIaRQEAAACgZESSAKwXCqIViLjPfkq4wSISlsrMjLKevC9n7NhJ7BCALlJcschr9ktG8hQ8WRmRGpoRw1iVtthNFbFe5aa4XyS4wdmCsCcIp6jKlagAAAAAQKpMCg6B60WSxOuWgGAfyCLjvt9JeHdO3GZObu/v686c02SPjQgYjUKzuasmx5xnvCRjcp97x
894Bi6u65u3ZSZbfUu11bVewkSAAaRRYLX9XZBQORAAQAAABDCJUDg7AugCCCBxPOWOHiHrLvG7d6viazFHjLPM2JmkyBtAZRF5tmz172WeL29wtNIzNbnOjR63nZNeVOzJnUezMXolYoSkecnnVI8PyCsM/FoxbGyr0vZLAAAAICji5RzHeBJ7/MG9gT38eH5CUG8I841ncf7o5+S4ymYo29m7mRH9/s8clCAhqJSkohK5H5P8oyxjuT5KjsK9Y1fM7/2V9eU/hV/cU1LQPbI/cRE8Mn7eSHxAq/pqLklyLnOkd2uAQAAAAxzGK6D8MTI8/Uih/BY6/kgibCW2TvnjHvdz7VkXkLsOZOZM47zuu/kvICB0VBNDWpOXic5Z0mS8X7PE9dMj435X+jf+id/leaYVrUOlDY8RWDeyTNR6onXo25yiqJxXY5pdQAAAMAMHNc5B+EJkPV6vojned9W3iG83/ccMhF3ct+zJ5kzktfsfe59J69dMVlzdkTDWDCF2h+S2t+Ef7NuF7xnxlfBP2D+Jv+w8au0v8zlL/pOahe+WuB7+34Q3v0M8H01nXplz08D//ahp5vMF4GfFIBPgY8A9heBH63LITx/GvghNwz/OfC99+uRus+65+eA3+uryji5vyrwr67no82d47+GvzvpJ6QEFh5VINz/0d/9Uz/1U5+s9+u2Pzyt1/3M776/7rNV+tudHvitt4r//VfKd35ZLRf+1eVx1arHfuA+1h8trrlEzavS44csmbdUXacZP9bTyrkAPgIA4sdAnR7w8kOjoIjgjxY3j9Q7a91nfn9m5zEt5Tr27btHFOe6kZPnPzv3c2JnbUmCOWnchaKo12S/zsl93znJa++cIzU9wXS+4df41b8SfgW/jM3QsY/kXu/3eT/WDvueoyA9aHvnjRxXObRRQwcAAJADCNMJgi6QBLyv+77D7V4r933K7Ir77Fdm7tm3HJF9kp1kn5z7nO2lhlAtoi08QPe5nIfsc1/n+eG+ntxzJvdrdm1Qrn+sHv+ki39mnf+jqyzm6mlp5ypLWDcs+yFgJD1WV5ScFAyXq6JIAQBMAVDicK8bCCrAXrfdc01XbqR2Xg7COcstRzyl1r3qEOeus0+cmFsAoou7KNPteL2e536+T973fd/P52vPeeWeM3Xh6qE4WHU0it0mct3jzJe/fN/rZ77M477v27vPfelLX6r89Jda7Nccn33GZ3zxi1zOKV/4QvjCp/j0U4D96fxpX9AA8dln/Kev/6wlSSE+/5zP379MLp3K/KyvfGXunzs/nySJ+K9yv76aX/BLc0TuM1/b55e+9ry/fv+3M5PahcoMnMviMQpSnboy3/Tbr6/77usX+Nf56u+ev/DP/9L/+td8K3eTaFgaC6m4SFHnIfVz/2/x5T/0lT+88dje+b7P5/Mf+NIPitoPP/LZj/nij33xT7gqX/hIvvAxX/j46UeffgS5EOY6xOut8iOf/X9iIsTzQ/7c998fLLcaTor79/0Xv2fDiB6ZX8xJ3LHH2uxf/h0TL1Ovk7lJVQ1ka3YnPBanZju+9d8c3/mFk3/5u/urv/u1218y/sE3V6vSjelYtr1VaWeoxi3xs1+x4eAhPuDz7wNI7vuzz34c4BwHn35aRQFAMf70T85FvLztuz777N8dP/2DUBIfvHz+M3378vdkzjlqIjPGn//XOUeY5Pziv8TXvhPnXFeu4+nrX79v/92385zaFsYI0C0Ud0axXnzzW7df/p13v3ievuaF8de/taky0Gl7Vb8tWatNq0R4Kb//B1+5iMZ9P96eoKCCij/+0RcLYl1tx8effAoAkHKBqCxmnn/87/7jC4Kq3O/xve/9ucVr9sQMR+bn/6+bk0iSwC/Z5PXa83q97pfjn/72X3mRmC2bQiA01wa9hDvb39kvv/31p995jX9u/CPlW6A0lo6FTe0tDwBmAzPg8bCX+/PvC6QQMY7AyVyrnQIARBE/+YIzySAVL9sPv0SC0Yvb7f/5WdeYmf3i+V/+m813f2nA2eP5L77j9jtfv7LlzkTc2/b3vvncMyEUAGt4FH3Zy1wlstvL+Lr/zcvLCNMkC/ai97rO6qLVdGGaxe/9vP97/cHP+YOKuj36AvX9z32/k05Z/4kftfrRZ37c06f7T/6Mj/n4qY8+fuojgHL0pDJ9yvizfsgInrHq9Pe+7A/BzvQYN/687xridel5yQuO19RtduL1j/6abx/HOGaTMqkjUJ/8T/9z/Ym//Ru1muqq1Y/rw+XqtmxjpobRF01b6V6OXtRy3lCUrlVaV65KqZmF4hNQQRXaA9VznSvlLEgBgCmkTk8YJwEGTyEe9+OWyBhDeSFMpJ64doozc/Gq2cyAjMy93Y4dSU34t/nbv+HfL8DVPRdkf9ie/eHurtltwmkDaJZmrytLQe2l0Di52rRziVIpqKcPzw9CVVi7L/bKJJdZuVIowLlAQxi8OtVbKoGsWzz27WZUAbkhTKipWXtztrfdvNc9zORKbyPuiWmbqURlkMpqwv+oUKhKl7qU61wOcB2X8VBQa7+pqEalKBaKXj0dDdBDP9AI0KZRVdPTGgCA0YbR02fa9ACK6bkfNwPwunhBMdiCYBCvt5eQGByQyhEyBAKINQoAREvlqN51AA4spMAipacJCqZbzIu3w9JgmgcIoGe6UVIdTKqNBpg+l2lU5OjRANDjcTMAr2b3FFF7GRBMKlhbgJ4DIo5IDQEVQo3V+DP/AwoAUAAAABQAoAAABQAoUAAlBZWCkgIAiEoFBAIIQABAAEAqAAABAEAAAALKQvmNlUV1qhRvykPTD22aNO2i9Upbk9WKNet+K3RNK/qiS13najzux+ZxvX+iUigeSevS03OpVNQ0AKmUwCEVzL02EfC+uDGpYypb7xBkiH3NFkZsI/aYgynjns5R87KvLWSIyRbRCKcpCuGOVabK8zljVNNV9NLTs/RC1rLyJnSmq6JS3YLLCffD4s4nBMWq+zp7i1GOHBWNAEoxhau57eera0dQnPe1N+w06bK6gmIGXjNW2Lbt5ezNDKbGfY/J7NddihDENkD9VKFQgKIpFF3TBRe6FGppFA2qUiya9LRF0UDzMIsAemjQ0alpPbNGYxrTpndFTx8VA1AY0/fjTmA4+sQUtt4EwRBehFScCcTUBCKBQBCE/x8RUYSGZ4cLTgAAAABJRU5ErkJggg==)} 895#webamp .equalizer-top {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACBFBMVEUICBALFRINDRQOFQsPDxYQEBgRERoRERsREhsSEhsSEh0TEx4TFB0UEx4UFB8VFSEWFiIXFyQXGCQYFBIYGCUYGCYZGScaGScaGigbGyobHCscGyscHCscHCwdHS0dHS4dHi0dHi4eHS4eHi8fHyIfHzAfIDEgHzEgIDIhITQhITUhIjQiITQiITYiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDkkJSklJTklJTolJTwlJjsmJTsmJTwmJjsnJz0nJz4nKD4oJz4oKD8pKT8pKUApKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0MsK0QsLEUtLUYtLUgtLkctLkguLUcuLUguLkcuLkgvL0ovL0svMiQwL0owMEsxMC0xMU0xMU4xMk0xMk4yMU0yMU4yMk8yMlAzM1AzM1IzNFE0M1E0NEs0NFE0NFM1LxI1NVQ1NVY1NlQ2NVM2NVQ2NlM2NlQ2NlU3N1Y3N1c3N1g3OFc3OFg4N1c4N1g4OFc4OFg4OFk4OFo5OFk5OVk5OVo6Plg+PldBQipCQl1EQTxISGRNTWZYWHJZVjxcXGRgX2pkW0RkZHFoaHhsbH5vb4JxcYZzc4hzc4p0c4p0dIt1dYx2kZ13Qyh3d4t4eIh4h4x7e4+Dg5WHd0yNjp2QkJCSkqKTk6OVlaaZmaidnamfn62pqbWvr7tT7jRLAAAFcklEQVQYGa3Bz49WdxnG4c/9fM+ZH7wglAGGgVZGQmKiAWuj3TQu1Gi0uujamPQPqOx0rSs37a7WvYk2ujCNCauauOmOmCaFdGGsMEwgIzD8ahyGd97zfW7PeWeo0KBSwnUp2BFsE1OiJwgBgsjCQBZiSlAAAQIJEAGWhOgJiiKDYCAQFCswBKggCAaFkm4zkgBML5gSQpAFg3iQZbAjMcJkkEwJqCWpUBkkBrqMRCS1VEwvlUBCJgZMw+v8F+KRgkcRjyA+TTxEPExsE9tkAbIQlhFYfJplmZ7BMlOW6ZmHmAeZh1kG3mjg58JhgeiJnkABAbIkegUkaBBBIECgIhc3KIgsLQ4oIAgaE1CSIkEDBUHJAgEqNQoEhV629KJJmq4FBAKKFQElQyCw2GEBFr2uqKNnqLFVKpYxGLYKMIEKVGNMVkioUbHcZWECNTJLTZyQDnCmDQiQ6AkUIIMlDChBEGyzEVCAcGMgKFEZZAKCFEmhNMJuKAUMaYgEdQTIrlBKS6+lS9SChATRoCZAFahgC5spsa1CSVNKFCActbHNlGhqnUygZlDBGCeZYCpgJBAYlZqYQTYMgkUen6lsm/A/HE9RyAIIMtUwKEyVQs/hEtQC7aRlZov7LCJUyOjaqIELBmfhE5ZM4Tc8sa+45btN13RnKvGdC2/C6eNniAYiQ4de289TdvOtE7T5Y37/yuh339x75pW5P/xg9qN2eeU
895DfliuvK/vsfHeS7v588klyEur0H51Hjbff/ZwTC6vf318/rnFD3LPcS5s+Evjf4j9iyvzi8DKMnCVRchLY1F/+9p+ntDNt57f+v4cDc0rf6TWU6fh1DlwA0nvAE/bAdpJLXf3vDjipYUbQIOOXgNOFu/DMDoxYrAy/uKhVSbAe00eOfLP1ZPH1knAjKzRXUMWerdu7V0a32N8EZ5hpTtx5GJGcIAndYDgPFNR+ekvT10/eO7Nb9sNCMG7fCaVxzCJkjf3HIb5mTED79oF2r01GR1bZWvmKJvzwBwYCPja1t/muaePFw8yUF34+HML14GwgDp72Fdg5gs378CzMCEs3uXxVR7WBduS3vWD18GoAdniBZ66sxS4eGzP3WbRfxW9cR4CFjbvjhYucePw/L8KvYXuxjq0Fa6agYEA/Exzb2521wZIHVCO6upY1LUEbhzMyxbmBZ7Y2WBHTGDt1PWja8g0gAXjJZ6yNaIWVu/N3YnFzQQE518UJ0vZw76Ajd3rixS4cqHQTmoBdGiTOfa688yBhawj7yuMNijzdMDcvDfnOyBmYXNzNLOFzHiJJ7QGvP0jer9+Ocobe8+xdur0h0kDBFx7h8/kBv/fiQwibi2N4U6dAcOV1WPs3vgL3xo9B+ujvy9SgQKTlt4ynJ09fJiN25c+v5yrMwvXrunLCzdpllkBltAyKzTLjG/DndGhy6BX3+Hx3eAhz9N94224ve/lmlnO/Qp+cvzDQPH6L0DIQvQECkCyJECgAAkVUBA4ZFFA0VCLggItDkCEIgjcQqpYosmmNqKnAkGvBRFWIQS0k7bCrAXo6NKl9ca1JRgosiCweIBlhFFXcEU1xrNd2QKMYWtmPNNpQs/UtAFnGhKnwbDVuDN0sssEnKSS+lFDb5NtshiIniAQsghkgQAxJVCAAIEECAhAEiBoMiAIegLRKxBgiKZrRNcEg0KvQABmEEkwkEyAjCV6FlOWZbs4ZcwgI+nJqshZS2Uqw0wMCQJnggHTSxLowGD8sz9BAOI+sUMIMIRRZCLAgBmIXuUTBjGQLQzYdAHBfTI9E2Aimq4R2QSDApRik+wIgilhkemEEANxnyyRGZIRg2RgIYVKqYVtWVMNOyT+I+m5A7Otkv8GlLRudA0dHtMAAAAASUVORK5CYII=)} 896#webamp .selected .equalizer-top {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACAVBMVEUNDRQPDxYQEBgRERoRERsREhsSEhsSEh0TEx4TFB0UEx4UFB8VFSEWFiIXFyQXGCQYGCUYGCYZGScaGScaGigbGyobHCscGyscHCscHCwdHS0dHS4dHi0dHi4eHS4eHi8eHyUfHzAfIDEgHzEgIDIhITQhITUhIjQiITQiITYiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDkkJSklJTklJTolJTwlJjsmJTsmJTwmJjsnJz0nJz4nKD4oJz4oKD8pKT8pKUApKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0MsK0QsLEUtLUYtLUgtLkctLkguLUcuLUguLkcuLkgvL0ovL0swL0owMEsxMU0xMU4xMk0xMk4yMU0yMU4yMk8yMlAzM1AzM1IzNFE0M1E0NFE0NFM1LxI1NVQ1NVY1NlQ2NVM2NVQ2NlQ2NlU3N1Y3N1c3N1g3OFc3OFg4N1c4N1g4OFc4OFg4OFk4OFo5OFk5OVE5OVk5OVo6Plg+PldBQipCQl1EQTxISGRNTWZYWHJZVjxcXGRgX2pkW0RkZHFoaHhsbH5vb4JxcYZzbFJzc4hzc4p0c4p0dIt1dYx3d4t7e4+Dg5WHd0yNjp2SkqKTk6OTk6WVlaadnamfn62pmGWpqbWvr7u6usTHx87JydLO4tHU1NnX193d5unsznr5/v/0rKtaAAAFXklEQVQYGbXBT4udZx3G8e/1u+9ncmYm/5OaYWImqYQQJcWKSKFUBHUlChaUbtz4FnwDpSjd+hpEI7pwJ3UhbhRBTFAQtCHGkknS1rSGmJM/MznPuX+XzzmTqZkSNQ3x8xHbxBYxJwaCECCILMzIQswJAhAgkAARYEmIgaAoMghmBIJiBYYAFQTBTKGku4wkADMI5oQQZMEgHmYZ7EiMMBkkcwJaSRo0ZhID04xEJK00zCCVQEImBox4nf9APFLwKOIRxIeJHcROwRaxRRYgC2EZgcWHWZYZGCwzZ5lBsoN5mNnJMvD9Ct8VDgvEQAwEEgTIkhgUkKAigkCAQEUuriiILB0OKCAIqgkoSZGgQkEQDhCotCgQFAZZGURNSquAQECxIqBkBAgsHrAAi0Ff1TMwtJiUhmUMhr4APSTQjDHZwJBKLE+z0EOLzNISJ6QDnGkDAiQGAglksIQBJQiCLTYCChCuBoISjZlMQJAiKZQq7EopYLBBBk0JkN0gojLomCaqICFBVFQD1IAp2MJmTmyZQm2m1qhAOFq1zZyorfU9ZIoGxjixwSRgJBAYlZaYmazMBB/j8ZnGlp7/4hMpClkAQaYqM8FcKQwcLiIDur6j69lmEaFCxrSLFmTF4Fb5gCVT+RFP7NPueJnBTxvxxbYOx8sviAqRoWdeXeIpu/faSbr8Nj98ZfSDry7/7Ju7zn5914XRicvneTn+8Wt9jc1ffmmRN148AHlpHboXF2Dy208ejPa3916anDuz7/e5/xQXx/7M5M/Bs3uv7N8LXD0GjNkLeWUspj95dYkndO+15yffqAxe+TGtrZZWjrwDrpAMlnnalun6VjaXXhjxhb1joMKJvwPPBbsxjE4tMrN+91Nr6/TAr2oePXzrTy+cfI8ZswIrtw0ZgC7z8YOTm8cmF+AEV++eXh23UljmSS0TvMtcNNbLkc3R9XXsCkLwJh9J8hj6KHljaQ0O1TFzo8Og1daPTv2VVp5lsgDsW8RAwOcnfzzCP7Wxbw0Qast3di8ziAxgunSQy7Bw+s41WIUJxeJNHl+y0zRaYdASaJuHbjSMKsgWa/wfFLhxbOl+2cPvxOC+dwNL9xsrFxkfWNgoDPa0O1ega/DufUBs8+GSk4U9Ywj14HqC8YZo1zeAu7vzLQuzxpMLaAUa0UMZ3RgVZCpgwc2jPGVvE63whzP1brdnMwHBpTPwXESwO2Bj8fZ+Cly7EHR9K8Cutev79rHIHRZOLWdbYVRYGVMOcA/YP+LWgXvA4gLc6hZHm8jcPMoTehuY1gZsEuX4keutHGkXkgoEvH+Wj+QG/9vJDCLGB8fsudcWwPCXA0dZ3XyDr4xOwu3F81+mAQF9x+A4/ObgwZfYuPn+oWfy2sLy+KI+u9xR1rgCrMAxrlKOMdmEO4urb4G+dZbHd4Mdnmd67nMMzrfM8s46tEIgXv8eCFmIgUACJEsCBAqQUAEFgUMWBRSVVhQU6HAAIhRB4A5SxRI1a6tioAAx6ECEVZCAru8aLFiATh++crW6dQQziqwILB5iGWHUV7KhFvd3TcsEMIa+m3RNPQOTaQPONBjbYJhUTw1T2aUHJ6mkXaoMNtgiixkxEARCFoEsECDmBBIIEEiAgAAkAYKaAUEwEIhBgQBD1GkV0xrMFAYFAjDngEiCGckEyFhiYDFnWbaLU8bMZCQDWQ05W2nMZZjekCBwJhgwgySBKRiMv/NzCEBsEw8IAYYwikwEGDAzYpB8wCBmZAsDNtOAYJvMwASYiDqtImswU4BSbJIHgmBOWGQ6IcSM2CZLZIZkxEwyYyGFSmmFLdlSlQck/i0ZeApmSyP/BQLQYu4DqTgYAAAAAElFTkSuQmCC)} 897#webamp .band {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANEAAACBCAMAAABpaq8qAAABEVBMVEUAxv8SEh0SWwQTEx4XFyQaGigcGysdMBwfIDEhITQqKUIqKkEqmhYsK0MuLUcuLkgvL0ovL0svMiQwMEsxMC0xMU0xMU4yMU4yMk8yMlAzM1AzNFE0M1E0NFE0NFM1NVQ1NlQ2IRs2NVM2NlQ2NlU3N1Y3N1c3N1g4N1g4OFg4OFk5OFk5OVk9dCpCQl1EQTxNTWZYWHJZVjxasCxlmUVoaHhrcC1xzTR3QyiDg5WHd0yJ4jCNjp2QkJCQxz2
897SkqKTk6OTk6WWrI+ZmaidpDWfn62k4jipmGWrrZCtLSOvk4yvwziwcR3DcCrE2zLFVCrFhzDGeA/GszXOxtbTIhvTSR/cdx/gVB7gkijgsijgzTBk+3VYAAADm0lEQVR42u3bX09bNxjH8a8fP/lTombrhEC01TSkSuNik/Ym9q73XnKxqVs6VnUbNIFzbPcikNiIk4ZCIY4eXyB98OGIn+JjB4Wf+0aZN0l1KL5p4q+/VU91wqW0YXR0qsEnnHApPyJpUz5/dRe+4eJrU70nBjgaeG2jw3viyYTjYUaIOfs4t+KrtXwTSo75cBd+bO5OFSH+NAHtBfEREeIEJj+v2KeY7UPqZVTabjoFWXF4yV7TyfGAb88L8gVU8TCByS+hl5wgHgB8N5U2o4Lm1OLiQcDH7GeHzH0nB57B/N4U59zid+459Y7PU0E3vvgJqKpcDRdEqJ8iIVwJxVE/ld51QInaUj9l9Yo5glA/ZRlv+aVySlh+A6dQPxV3lfJqH6+esnyqHJDtE9VScRSjekoxFaifslOvz+qRupajfkqRTqmf4rxfPlIO6me5M+zC2MFEu3Yc2aqzRJbIElkiS2SJLJElskSWyBJZIktUT6JUun7u9KqL5UytFGIswlVPTalYjvVTs+crpET9LHaG1FI/7YTd/qHF+eSpn7JchiFBS/3UlJbHVFrshJXz+l8CiZAaqJ/Slu/56qcsT9wU8In6qeH6E7LkUhupn5r84kxypJZI/ZTUtg7AN8kHqJ8SQ9BjOBFPmwK38BJcxgCDjfkR2JgX0N6fGhMix4Nns1ZjhJgQOWGc0xVs2NNuxou1nLN31sn3eDe7NzW2DKZHvXYW274/Y8HhbB2bpptvP8Phv2uYhtyfGgQNfwBeIFA/Nfv7opXEDnDnhtvNRtUDNpteHzJ7Wuo9uksLHvA+4+H+3XgaunnINOcL2IQqQnwN4z+zdtK4LCut5UvhYLrivvLdP910JWG/nM15CIfvMvbpZ3wxgg+3UW9pNo2HMN+UDJjljaryVjfonhUX06NZM3ujfsW6ntcIRv9/YaPqBgXkcTpTIjlHMLJGlTWqrFH1lWiNqu2nNaq2n9ao2n5ao2r7aY0qa1TZJ8sPkMgaVbbqLJElskSWyBJZIktkiSyRJbJElsgSPVUia1TVtOqsUYU1qh6H1qjaftoJu/3DGlXbT2tUbT+tUWWNqsenNaq2hg5cd6PqPzjP2kl34l8l38GsmwkuM55C0z07LZtclzHGjGflxefLW+mijjQo2kmezTn/u2g2zeczf97J30fPc86mB8Xs976YnceQ3fntDyVf9ptbqQ9XZdqA06NUclpQhg9Aa1RtPz8But0Pz3B64+AAAAAASUVORK5CYII=)} 898#webamp .band .slider-handle {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALBAMAAABbgmoVAAAAGFBMVEUAAAAICBApKUJKWmt7hJSLm6etvcbd5ukLNggsAAAAMElEQVQI12NQZGBgYFRgEC8vLy8WYBBPS0tzRqIExXDyQlxcQJQxEAgwAE1hFFQAAB9KDSykox1vAAAAAElFTkSuQmCC)} 899#webamp .band.winamp-active .slider-handle {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALBAMAAABbgmoVAAAAD1BMVEUAAAApKUJKWmvd5un5/v8UiEZ+AAAAJ0lEQVQI12MQYAACAQZmY2NjIwYGZiCHCYlyccDNg1BKQAAyAGQKAHJPAsUS1KniAAAAAElFTkSuQmCC)} 900#webamp #on {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMBAMAAACO67B7AAAAIVBMVEUAAAASWwQvN01KWmtSZnN7hJSLm6ettca9ztbV3vL5/v8M+RL1AAAATklEQVQI12MoRwIJDFWr4GC5A0NVBxyUGjBUNRsbdzRpNHVoQHiCkh0aTU0aKDwlKG/mTBCvCcID6UfoQzUTYTmQV54aCgcGDCnGCGAAAPUyQLvRdOj2AAAAAElFTkSuQmCC)} 901#webamp #on.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMBAMAAACO67B7AAAAFVBMVEUICBASWwRSZnNje4R7jJyLm6etvcYvdU+XAAAAQElEQVQI12NgwAdMXODAgYHBLQ0OEoA8VDkgdnFgcXBhgfAERV1YHBxYUHgMUF5oKIjnAOGB9cP0maGYqYDkEgAFZxmn+1/+wgAAAABJRU5ErkJggg==)} 902#webamp #on.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMBAMAAACO67B7AAAAIVBMVEUAAAAA1gAvN01KWmtSZnN7hJSLm6ettca9ztbV3vL5/v911B9qAAAATklEQVQI12MoRwIJDFWr4GC5A0NVBxyUGjBUNRsbdzRpNHVoQHiCkh0aTU0aKDwlKG/mTBCvCcID6UfoQzUTYTmQV54aCgcGDCnGCGAAAPUyQLvRdOj2AAAAAElFTkSuQmCC)} 903#webamp #on.selected.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAMBAMAAACO67B7AAAAFVBMVEUA1gAICBBSZnNje4R7jJyLm6etvcapTzEQAAAARElEQVQI12MQRAYMaDwTFzhwZBB0S4ODRCAPVc5RUNDFUcTRRQTCY2B1EXF0FEHhCUJ5oaEgniOEB9YP02eGYqYiklsAdNMdgDKFw2kAAAAASUVORK5CYII=)} 904#webamp #auto {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAMBAMAAADxOqKKAAAAHlBMVEUSWwQvN01KWmtSZnN7hJSLm6ettca9ztbV3vL5/v/WADVeAAAAV0lEQVQI12NIQwWpDJkzUUAyQ2Y5MihzYsgsUlIqLxQvLBcXFC8UBwswcJSLFwIFQAgmICiILNDRgaoCZBaQI1heWA4xA8MWVIc5MaSFuCADJ4ZgJVQAABsNRRhxaDvQAAAAAElFTkSuQmCC)} 905#webamp #auto.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAMBAMAAADxOqKKAAAAFVBMVEUICBASWwRSZnNje4R7jJyLm6etvcYvdU+XAAAAS0lEQVQI14WOsQ2AQBDDAh8GYKMUHgF6ihP7j0CFxF+DS8tSIv0ymIh8T1xy9aIkI5wIEbmW/Qh2cPAr9BXb2QogOMaIaPSVtR19ACp1H3+cU6+ZAAAAAElFTkSuQmCC)} 906#webamp #auto.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAMBAMAAADxOqKKAAAAHlBMVEUA1gAvN01KWmtSZnN7hJSLm6ettca9ztbV3vL5/v+vLTjBAAAAV0lEQVQI12NIQwWpDJkzUUAyQ2Y5MihzYsgsUlIqLxQvLBcXFC8UBwswcJSLFwIFQAgmICiILNDRgaoCZBaQI1heWA4xA8MWVIc5MaSFuCADJ4ZgJVQAABsNRRhxaDvQAAAAAElFTkSuQmCC)} 907#webamp #auto.selected.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAMBAMAAADxOqKKAAAAFVBMVEUA1gAICBBSZnNje4R7jJyLm6etvcapTzEQAAAATElEQVQI12WOwQmAQBADtwSjsaDAlKAFCIf9l+BL8NZ5DgNJqVE/sTGR8j1xlUcvhmSEEyFSHksdwQ4OfoW+Yj9bAQTHGJHa+sranj59DSTnUdDwigAAAABJRU5ErkJggg==)} 908#webamp #eqGraph {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHEAAAATCAMAAACQnBKzAAAAw1BMVEUqKUEqKUIqKkMrK0QrLEQsK0MsK0QsLEUtLUYtLUgtLkctLkguLUcuLUguLkcu
908LkgvL0ovL0swL0owMEsxMU0xMU4xMk0xMk4yMU0yMU4yMk0yMk8yMlAzM1AzM1IzNFE0M1E0NFE0NFM1NVQ1NVY1NlM1NlQ2NVM2NVQ2NlQ2NlU3N1Y3N1c3N1g3OFc3OFg4N1c4N1g4OFc4OFg4OFk4OFo5OFk5OVk5OVpsbH5vb4JxcYZzc4hzc4p0c4p0dIt1dYwbWqB2AAAC2klEQVQYGQXBIQ9lSRkFwDpf930zCQqBxaLQ/H+PRuDXrCQkbObd7kNVzD/+qSay+fu/BDL87d/MMtL5628iiP2X31cQ5M//6cp3nrJ//u+upgM//2gAfv7BO6aOP/33ndQx4HVJMQGeXnSgB0/V/lWicJvObrKOrDNJCwJQ1XVzz1F3DxYTsaHBBbx7MIhsfDNHfwSNlE8vuCO8V7QAEJGzTnSlYxL3nojNJkVC+NRLGtoC8wjSIOl9Z2NJ3syeugkAwLvjyFtMl6FaGhoGyK/HZ1SX20D2CzQN+nn3vK8eOoaxAFC0vKxplMlx14qEucCdC10XJquy4/Ho/gKmbO/Mu5/sGQZcAAhN7tr1Jk3cWcu6EM4rGCbBXNdwouX72M0DgXizjh19T6S9twBASU1a+632nn2wiPIgCLDfTViHDV52oFHo+4Oy35M6Ww0KEBXlOilu9uKs6AMCHYH3McpZdQe29gshzE17tlSWZLkDAkCKhnV4wxwW8t4ZCqUAZC8xeL5yLihY6Xx3NGfclqEAgLg30dPcW3dcNzBCigBAigvI95kPSMp36Udti+be6kkBoK0knVTXJzKLwnYgzBAea8Y0hwGery9I2vjkheSMe5iJjABwG5G0Rm6v27ksCXNfEMDXoLHSAq/nM0grfDs+r46LIUgLwKRoj1wd5TOzSG2ZLUgFmCu1dALPd7sFSVDXO3L1rDWARAElTmXuEe5qf8290uDdUqZDyHJnJAfwePrc7wtVsz+SPdou5xwKCCDK0pNFuehkkaI0dC7YXDe6kzP4ft/j+bGJ4J5fH4WIZSnXBYBGxDrvgt2MPRW2hhB30nDHIHTw4OXXD9BBn3yCNF3W62aNAYA7Dtfc4867j2sOxBkCiWIGUsrw5bXyA9FRJj0SzVJZ9qK3ANqRvWql7crWMitq27OBlNAro0E6+OKeF6Sy7XOPNhk3CmQCIORWVk/inPcO/g8Gk8tpHAw47gAAAABJRU5ErkJggg==)} 909#webamp #presets {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAMBAMAAADrBkIEAAAAGFBMVEUvN01KWmtSZnN7hJSLm6ettca9ztb5/v8/TtPPAAAAXUlEQVQY022PsQ2AQAwDXblnlBcbwAYI9K0bbgXWpwAEErnSuii2topV/ShY1PmzN3UiZOQIWY7uGDsBEwj+2pHjyCF+bJwACdfBGyNfD9Bt102qOU3bPP5pmoaKE9BgTHfswQ68AAAAAElFTkSuQmCC)} 910#webamp #presets.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAMBAMAAADrBkIEAAAAElBMVEUAAAAICBBSZnNje4R7jJytvcYlh7IyAAAAW0lEQVQY03WPsQ2AMAwEv/gFMgI7QP+RLgNQsP8qFAGBlOTK01m2VaZopXdGqkq7Rk6VtqiJkJEjZDl6NHYCJhD8ryPHkUP81jgBEvrAp5H7AmSqyjG/ZJt9eQMWOi9EkrQa+gAAAABJRU5ErkJggg==)} 911#webamp #preamp-line {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHEAAAABCAYAAADpXEERAAAAE0lEQVQoU2Pcdfruf4ZRMKRDAAD1lwNjTqcaUQAAAABJRU5ErkJggg==)} 912#webamp #equalizer-window.shade {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAAChVBMVEULFRIMDAwNDRQNDhQODRQODhUPDxYPDxgPEBgQDxgQEBgRERsREhsSERsSEhwTEx0TEx4TFB0TFB4UEx0UEx4UFB0UFB8VFSAVFSIVFiEVFiIWFSAWFiEWFiIXFyMXFyQXGCQYFyUYGCUZGCYZGSgZGicaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eEQoeHS8eHi8fHyIfHzAfHzIfIDEfIDIgHzEgHzIgIDEgIDMhITQhIjQiITQiIjUiIyYjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklJTolJjsmJTsmJjsmJj0nJz4nKD0nKD4oJz0oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0QsLEUtLUctLUgtLkctLkguLUcuLUguLkcuLkkvJwgvL0ovMEsvMSUwL0swL0wwMEsxKQgxMC0xMUwxMU4xMk0xMk4yMU0yMU4yMk8zM1AzNFEzNFI0M1E0M1I0NFE0NFI1NVM1NVQ1NlQ2NVU2Nhg2NlU3KxA3N1Y3N1g3OFc3OFg4N1c4N1g4OFc4OFk5OVpGQh9JRjlORDBQPx5aWmFbW2JbXGNcW2NcXGNcXWVdVztdXWddXmZeXWVeXWZeXmdeXmhgX2phYGphYWxiWkViYm5jY29jY3BkZHFlZXJlZnRmZXRmZnNmZnVoZ3VoaHdoaHhpaXlpanlpanpqaXpqanlqanprXUFra3xrbH1sa3xsbH1sbH9tbYBtbn9ubYBuboFvb4NvcINwTyxwb4Nwb4RwcINxcIRxcYZxcodycYdycodyk5lzc4lzc4pzdIp0c4p0dIt1dYyCmI+Gd02QkJCZc0K7v3F3AAAEz0lEQVQYGQXBsesvVBkH4OfznvO9FdGfULQGEvfiLHdwb2ksWiKizbmQSIlWqSECXYOGwD9ABxGiRbpra85OQpi/c96350lBEgiBBQIqCI/zDGTKAygWglCFKCYhEHaqy+ZuVKhJoMgSCkS1NRlBALYTpTgPQwDAZOjex3LNPgAGXaMZ0AanqzG62jQ9ddDcOgO2PxIK6ULYpGcLCGQKKAQhYgKlEEEQqYKiuhIgSiDwMFgANaoAEJIJMhGTESYAACaTgaGrMUBXMxqYJp5gYDSD4YKG8+vN25X76BIiS02ipkRm35XAIniGsuuWEirWbCmZLNnHgxDPRhEqgZ0qljJ7u+vWIhbMJlJj3YViYyaFIiZMAAAwMtBM9cTZR4MzGHq4kzE6vhKnrtbdY+hMZ9ocRtH3pAF7yWCmQLpikAYFOEuJQs0eRNLY+xyEjha1YsZ+hG4u+xyhwGWtDfSwqLI3TQrVzAQBADAAoKbj9AFaJSZul8sY075i2tW4IYzJtAG9Qfk+AAAAAADGk8s3+Y8IRBVBEYJMdihst9hdoQQKu6umgGCNqZgAvPMRvf0jdMF5ADBxK542x+62nN99xN8BAAAAADyfx9Mr+GHzk8/e5t3XP1CbfXd9763nAAAAAAAAr977lnyv+tnZd6uQNdlnJ4RdY1FBqFqqi1XLdm0irK7ZQlTLorpspBvV7stgBACACYOu1pHJ3956DgAAAAB49d6L8+rlT/GL18znL9+tfvkpU1x4kSRJkiRJkiRJkiRJkiRJkiRJkhdq0c6+uyqoCbuN2LumjAKYtC6AszQyMJsZdGWhy8YdhbKYmUkAAIwAqqnUDC+SJEmSJEmSJEmSJEmSJEleqHkJXhq//NfL77z89DdmNg/hfQAAAAAAeAI0alvpmtQILjGh0xUT8OzrDawy2FedB+E+u5CYNQuFY5MLKIIJAEAwoMFM8T4AAAAAnoDDz/8H0K+ev/rcyGbS5XUAAAAAAAD+OYGzb6qXroAN9GwhE8FDUegC63qA5S4yTGYBXbau2QOmY0QmAMCEEUN1d9UpvA4AAAAA4J/VfIMPaP77xqs3v5SxK27xxZsAAAAAAAAfC9j3MQoZ2dbZgiw1MWHi6x2KR5uNG72E1TVdJIOzu/DsbGbsUAAIEwAEGaOVKpZuX7wJAAAAAPjY8cnP4ZPXyl9+8OnnX77x+8+O3aP4/MMPAQAAAADwJfh2rz9g6ZQIBNm9oLrILEEmSSCQEkUAFihAJDM1FJV3CAAAEzBgJpOOqh9/+CEAAAAAX4IXx/OfwWvTvvvXP/OrH322pf70W9aEnSBYIlQFIUXIA2XrVb0Uqe2ulLDE5trJVqZCahJq3ypFttk2ITJZKgihCorNJECBAAAAGOhqk16No2m9bxuMMwbTvc7+Ku1q+uwnw81MLnNM2vy7CjVwzx1IgmEMIREoFGyWSDh2iLWwj9gJZmQgGXqqCqvahiuE1foSTFVD2eimNQUJBgCAmQG0m+5znKNR8nQNxpklZmRdx/SF5gnUjOEeoyErIQhkKgioSULV2CDJPKAmMpUglBKotAqQHYrtshUhCZR9dnQVCMqIENgHG5dqSgkAMDGZU71n4i4cwBgZPRnQOl1HA9NM6zrLoY1jYMyk/w9e+WXwreroJgAAAABJRU5ErkJggg==)} 913#webamp #equalizer-window.shade.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACdlBMVEUAAAAAAAgNDRQNDhQODRQODhUPDxYPDxgQEBgRERsSERsSEhwTEx0TEx4TFB0TFB4UEx0UEx4UFB0UFB8VFSAVFSIVFiEVFiIWFSAWFiEWFiIXFyMXFyQXGCQYFyUYGCUZGCYZGSgZGicaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eHS8eHi8eHyUfHzAfHzIfIDEfIDIgHzEgHzIgIDEgIDMhITQhIjQiITQiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDckJDklJTolJiwlJjsmJTsmJjsmJj0nJz4nKD0nKD4oJz0oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0QsLEUtLUctLUgtLkctLkguLUcuLUguLkcu
913LkkvL0ovMEswL0swL0wwMEsxMUwxMU4xMk0xMk4yMU0yMU4yMk8zM1AzNFEzNFI0M1E0M1I0NFE0NFI1NVM1NVQ1NlQ2NVU2Nhg2NlU3N1Y3N1g3OFc3OFg4N1c4N1g4OFc4OFk5OVo/QitCQTtKQT5SSj1aWmFbW2JbXGNcW2NcXGNcXWVdVztdXWddXmZeXWVeXWZeXmdeXmhgX2phYGphYWxiYm5jY29jY3BkZHFlZXJlZnRmZXRmZnNmZnVoZ3VoaHdoaHhpaXlpanlpanpqaXpqanlqanprXUFra3xrbH1sa3xsbH1sbH9tbYBtbn9ubYBuboFvb4NvcINwb4Nwb4RwcINxcIRxcYZxcodycYdycodyk5lzbFJzc4lzc4pzdIp0c4p0dIt1dYyCmI+Zc0KjlGqqurGxnVm2nF7O4s/sznr///8TArHKAAAEcUlEQVQYGd3BMc9m6xgG0HXdz/N+yEl0ujlx9AoqiehEq/MT/AoKgoK/oFRpFBqF6HQaEZXqJL7KdBIRM3vft/1+MxzORMxEZ62USxKXEJe4i7sE4XY8uMuUmyfFQhCqEMUkxCWsVJfNuVGhJnEJWUK5i3XakxHEa9sRpThuhvhXk6F7H5bT7MM/DLrGybhrg2MyGF1tmp460HTOcbf9kFBIF8ImPVvcxSVTngRBiJi4lEIEQaTKpaiuxJMocYnLNlheq1HLR0IyQSZiMsLEx00m4zJ0NcaTc52M9mSaOFzGZTSD4XTXLsd3N9+rnLcuIbLUJGpKZPa5EpdFcEPZdZYSKmq2lEy27MONEA+jCJW47FQoZWo711mLWC6zidRY50LYmEmhiAkTbxoZl2aqJ459GHfHYOjhnIzR8UKcaaO7x9CZzrQ5GEWfR9ore8lgptylKwZpd+WVYylRyOxBpBp7HwdCR4taMWPfwgxN9SGUu5O1tic9LBJ706RQzUwQHzf+VU3HMYcnrRITZ5eTMaa9YFobnCGMybRx19td+ay3N146+SR/FHGJKoIiBJmsUNjOYneFEpdgd9WUJ8EeUzHx2rd/RW+/CV0ux80/TZwVLzeH3W05vvUrfu5tfWFuLz/v8rvmG4/P+cyzn6jNPne9/+Obd/Tym5+S9zO3Y59bhVqTfeyEsGssKghVSyZUxXbaRFhds4WolkUmNtKNaueXgxFvmDDoah2Z/OzHN2/n5Te/eHw+X3rPX/zWPH7lw8dnH/ya2ZwuD97Vgwrj2OcuQU3YvSax1VRPymuTronXjn12kQlmM0LXLExsnEuhejGIN0zilWpKZuLBW3pQR7zHezGef/jB++vD52Y2N+EX3sF4pZFtpWuyRnASEzpdMXH38GJ7UmXCPtVxI5wPp0ti1iwEh01OrxTBxMcE467dzRS/8N+NJwdfO732+P4n/vZoZDPp8lXv7KcTl2OfqV7OFXfbk54tZCK4KYIud+t0c7eciwyTWZ5MbF2zx910jMjEv5kwYqjurjoKX/W2flrN4pc0z9bf9rPnGbviLP76ae/oz+Jun7dRyMi2ji3IUhMTJl7sEHabwhm9hNU1XSSDY3fhdmxm7FA+EiY+EmSMVqpYuv31097Onx3mxYMXRvnMBx8+Pvvc4xx2j+Lx+97Bn9y91+s7WDol4hJk93KpLjJLkMnFJS6JKOK15W55JZKZGorKt4k3TNyNu5lMOqq+/n3/3Z/cffHwe3e/nfbs1889f3xmS/3oB6wJO0GwRKgKQoqQjbL1ql6KZDtXSthic9rJVqZCahJqn1VClimbEJksFYRQ5RI2k3hS7uI/GZeuNunVOAyt99kG4xiD6V7HfpHWhj72S8OZmZzMYdLmD1WocTmPc1ySYBhDSMSlUC6bJRIOO8Te2IfYCWZkXJKhpyqotHI5hbBanwRT1S6x0U1ryiXBeMPMeKWd6T4Ox2FQ8vI0GMcsMSPrdJhpl+alu5oxnIfRLvG/iv8b4y5/B72CM+yl6NhDAAAAAElFTkSuQmCC)} 914#webamp #equalizer-volume.left::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 915#webamp #equalizer-volume.left::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 916#webamp #equalizer-volume.center::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 917#webamp #equalizer-volume.center::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 918#webamp #equalizer-volume.right::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 919#webamp #equalizer-volume.right::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 920#webamp #equalizer-balance.left::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 921#webamp #equalizer-balance.left::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 922#webamp #equalizer-balance.center::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 923#webamp #equalizer-balance.center::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 924#webamp #equalizer-balance.right::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 925#webamp #equalizer-balance.right::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU5QE1jXjujlGrsznokh70QAAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 926#webamp #equalizer-shade.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEVKQT5SSj1sXUO0kWO/uX6z+JYEAAAAM0lEQVQIHQXBwRGAIAwAsLT07Z2zsP8qbuDBAliTmDjl1m8Gob6HK5uWti27V6uxDDFxfn1PDx8P0VYSAAAAAElFTkSuQmCC)} 927#webamp #equalizer-window.shade #equalizer-shade.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEVKQT5SSj20kWO/uX7CsWHebnl7AAAALUlEQVQI12NQAgIFBiUGBiYFBgVhYwMFBkVhY0Mg6QwmXVwEgeIuLgIwNWD1AJzCBeFqt4OOAAAAAElFTkSuQmCC)} 928#webamp #equalizer-window.selected #eq-buttons.clicked #equalizer-close {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAFVBMVEUpKUI1LxJZVjxkW0SHd0ypmGX5/v9OYEDlAAAAJ0lEQVQI12NgAANmRUFlBgamYOUgBgZGU1dDIKmSoghjQ8QhasAAAHO7BEc0qEt/AAAAAElFTkSuQmCC)} 929#webamp #equalizer-window.selected #eq-buttons.clicked #equalizer-close.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAElBMVEUxMC1ZVjxkW0SHd0ypmGX5/v/v3/6CAAAAKUlEQVQI12NwAQIHBicBBiEHBkcmIUYHBgcFAwUgKRwsAGNDxCFqwOoB1gEH67W94+0AAAAASUVORK5CYII=)} 930#webamp #equalizer-window.shade.selected #eq-buttons.clicked #equalizer-close {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAALVBMVEUoJz4oKD8pKUAqKUEqKUIqKkMrK0Q6MSljXjtsXUORbkq0h2O0kWPCsWH///8vo79mAAAAO0lEQVQI12NIdTFWUmDIbC/vFGCI2Nl5QoAhfM6a6UCy61U7A4P7nLVAdsTJzhsMDJ5ANQwMLkaKCgwA6D4RaTQt0CAAAAAASUVORK5CYII=)} 931#webamp #equalizer-window.shade.selected #eq-buttons.clicked #equalizer-close.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAElBMVEU6MSljXjtsXUORbkq0kWP////9IyyfAAAAKUlEQVQI12NwAQIHBicBBiEHBkcmIUYHBgcFAwUgKRwsAGNDxCFqwOoB1gEH67W94+0AAAAASUVORK5CYII=)} 932#webamp #position {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAAAKCAMAAACuVWMrAAAByFBMVEUPDxgPEBkQDxgQEBkRERoREhsSERsSEhsTEx0TEx4TFB4UEx8UFB8VFSEVFSIVFiEVFiIWFSEWFiIXFyMXFyQXGCUYFyUYGCUZGSYZGSgZGicZGigaGSYaGSgaGicaGikbGyobGywbHCsbHCwcGyscGywcHCsdHSwdHS4dHi0dHi4eHS0eHS4eHi0eHi8fHzAfHzEfHzIfIDEfIDIgHzEgHzIgIDEgIDMhITQhIjUiITUiIjUiIzYjIzcjJDgkIzckIzgkJDckJTklJTolJTwlJjslJjwmJTsmJTwmJjwnJz0nJz4nKD4oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkErK0IrK0QrK0YrLEUrLEYsK0UsK0YsLEUtLUctLUgtLkctLkguLUcuLUguLkcu
932LkkvL0ovMEswL0swL0wwMEswMEwxMUwxMU1hYm1iYW1jY29jY3BjZHFkY3FlZHFlZXNmZXRmZnNnZnVnZ3ZoZ3VoaHVoaHdpaXhpaXppanlpanpqanlqanpra3xrbHxsbH1sbH9tbYBuboBvboFvb4NvcINwcINwcYVxcYZxcoZycYdycodzc4hzc4pzdIp0c4p0dIt1dYwExkcuAAACuklEQVQYGQXBAWEANxADMPmSFsOAjT+QNX+eFEYgZicIBCMQMBlphNGBIJgZQLjId3bmPtcHfncAkIZoAAAAAECBAuy7Hsfb2dnuwEPB7qKawjer1OYBhR0jAFMAFQIAQRJsAjSBnQUJF74aHp+DuQAgDVEAAAAA0EIVAPvgy7BSeLTgWUChFhr5QAsS/jFumXD3NrlkiGDOkNnJbGJigksiOHuIuyYmFdzxMmaH3/9+GHvAqKPTkMKgAQCbziLV77xZCiv/AZY+qB2bv/Oofmn5+1mPWnm0fPieUjVG5pZJMZJ9aqXB75nFTm3qxgAsxZ5SxrBNcN/uGQz256vdKdg5+aRBMSAAAFlorc0OCQtg11sXYnbtobUU7nJJ1FA+1D3QmNQZjHKXmptFA3+LmAzGK3D1OyAjxDo1swV0Abc95UQZY4toTBKjAAqgE1qdo5YW/HFh/OSBMuBiBLx97+GTtxrf0NVHpSbxHki4w65eI8GECWoGluBxP0gg7iQwgTdmAF9nx6iwmeecpNK0aVdQEKWKLch+MxB4zvVgAbCr3vewCp+5QKpU6FKASaQM7oWZ3y9vBPTMgtCMeyjoOzBN4fGZ3YDfmWVA7zcmpTjvWpVSVkYRQAiTgXxfp4uqrJt92KUPAJun+FJwAkpHFAsvoLuD81MLrLqSSwOHCRM2jBnhXi7iGxH3rmEGWH8H4P4NKglchgoTkwUA0M3aqJ67pgt8w9+MNcjlgcV3oaelLA/7bSgahUfBrBkMnlHoR1LMM0Ew7HQFfDcgi3pzQYB1i+HKDxbg+8yXENasqQAASbNa5c1OhjRr/d3HWNiF2tHOg1ShO6hxPCld4S8IuOPfCIjpIJiaHdMDaXL2QJAQEAYEGCKAEQRpgLGGaBoBAABomkIrWkAVbIFSNkVhU4raFMWbLYV2WcX/K67c097eK2wAAAAASUVORK5CYII=)} 933#webamp #position::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAKBAMAAAC6bkgfAAAAJ1BMVEUJAgJlZXNlZnN1WyKDaTCNdTqcgkqvmGHFsn7by57u4rv06sf19fW6wGFFAAAARElEQVQI12PQnIkMAhgkXZDAUQYGSY/dcLCnFMj3PgMHp8F8YziwBvPL4aAaxPdB6N8G4p9CyJebAvmhyICBQYABBQAALnc7YhsUgeUAAAAASUVORK5CYII=)} 934#webamp #position::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAKBAMAAAC6bkgfAAAAJ1BMVEUJAgJlZXNlZnN1WyKDaTCNdTqcgkqvmGHFsn7by57u4rv06sf19fW6wGFFAAAARElEQVQI12PQnIkMAhgkXZDAUQYGSY/dcLCnFMj3PgMHp8F8YziwBvPL4aAaxPdB6N8G4p9CyJebAvmhyICBQYABBQAALnc7YhsUgeUAAAAASUVORK5CYII=)} 935#webamp #position:active::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAKBAMAAAC6bkgfAAAAJ1BMVEUgDABhRhBmSxNsUBdwVRt4XSGBZyqPdTmhhkuwmF6+qG/DrnXYxZOv4MtwAAAAR0lEQVQI12PwnIkMAhg8XZDAUQYGT4/dcLCnlIHB0vsMHJwG85XgQBvML4eDaiBf0wehfxuIfwohX67KwCAZigwYGAQYUAAAXWI7mESGeYIAAAAASUVORK5CYII=)} 936#webamp #position:active::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAKBAMAAAC6bkgfAAAAJ1BMVEUgDABhRhBmSxNsUBdwVRt4XSGBZyqPdTmhhkuwmF6+qG/DrnXYxZOv4MtwAAAAR0lEQVQI12PwnIkMAhg8XZDAUQYGT4/dcLCnlIHB0vsMHJwG85XgQBvML4eDaiBf0wehfxuIfwohX67KwCAZigwYGAQYUAAAXWI7mESGeYIAAAAASUVORK5CYII=)} 937#webamp #shuffle {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAPCAMAAABDVWaoAAAAilBMVEUQWgAqKUIqKkEqKkMrK0QsK0MsK0QsLEUsLEYtLUcuLUcuLUguLkkvL0ovN00wL0swL0wwMEsxMU0xMU4yMU4yMk8zM1A0M1E0M1I0NFE0NFM1NVQ1NlQ2NVM2NlU2NlY3N1c3N1g3OFc4N1g4OFk5OVpKWmtSY3N7hJSElKWttca9ztbV3vLv///LbncEAAAAqklEQVQoz5WSsQ7CMBBD37WpGPgDpJtY+/8fAxLLfUbVM0OiNgKG4CGKL45jRbYbiSUIkBAiMZJEqI2EMjGYynVhHHoWmIfle1IEOeqeogCwAQwFq3oesIoADyfaAt4mBHivb/Av5h8nRQCslQVOHPrK/Nif/ouaSdDd+OlvXYDD2qOP1r9j98s8/p/5KlarMIoCu/SPXvmf/yb2SQJkotZD087Z2VrcBIM3KB9V4lGQbMMAAAAASUVORK5CYII=)} 938#webamp #shuffle.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAPBAMAAACGpYupAAAAGFBMVEUAAAAICBAQWgBSa3Nje4R7jJyPn6itvca8iDuFAAAAY0lEQVQY02MQxA4EGHBLuIZighBDoER4ORYQCJLAoiMUIiEoKIpdQkgpNYAhIJSVNQBIARkBDEgSoRCJUAiESoilgXQwYOoAgQBsOkDiIDsCWMHCDCg6sLoKh4Q7LglD7IEIAKjwVurEkbm9AAAAAElFTkSuQmCC)} 939#webamp #shuffle.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAPCAMAAABDVWaoAAAAilBMVEUA1gAqKUIqKkEqKkMrK0QsK0MsK0QsLEUsLEYtLUcuLUcuLUguLkkvL0ovN00wL0swL0wwMEsxMU0xMU4yMU4yMk8zM1A0M1E0M1I0NFE0NFM1NVQ1NlQ2NVM2NlU2NlY3N1c3N1g3OFc4N1g4OFk5OVpKWmtSY3N7hJSElKWttca9ztbV3vLv//8gEwg9AAAAqklEQVQoz5WSsQ7CMBBD37WpGPgDpJtY+/8fAxLLfUbVM0OiNgKG4CGKL45jRbYbiSUIkBAiMZJEqI2EMjGYynVhHHoWmIfle1IEOeqeogCwAQwFq3oesIoADyfaAt4mBHivb/Av5h8nRQCslQVOHPrK/Nif/ouaSdDd+OlvXYDD2qOP1r9j98s8/p/5KlarMIoCu/SPXvmf/yb2SQJkotZD087Z2VrcBIM3KB9V4lGQbMMAAAAASUVORK5CYII=)} 940#webamp #shuffle.selected.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAPBAMAAACGpYupAAAAGFBMVEUAAAAA1gAICBBSa3Nje4R7jJyPn6itvcZs8alFAAAAY0lEQVQY02NQwg4UGHBLuIZighAjoER4ORYQBJLAoiMUIqGkpIpdQlEwNYAhIJSVNQBIARkBDEgSoRCJUAiESqilgXQwYOoAgQBsOkDiIDsCWMHCDCg6sLoKh4Q7Lgkj7IEIAGMfXXXsp3orAAAAAElFTkSuQmCC)} 941#webamp #repeat {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAPCAMAAADAkV+TAAAAeFBMVEUQWgAoKD8pKUApKkEqKUEqKkEqKkMrK0QsK0MsK0QsLEUsLEYtLUcuLUcuLUguLkkvL0ovN00wL0swL0wwMEsxMU01NlQ2NVM2NVQ2NlU2NlY3N1c3N1g3OFg4N1g4OFlKWmtSY3N7hJSElKWttca9ztbV3vLv//8ki4GoAAAAgUlEQVQYGQXBMQ7CUAwFMP+SzkgoO1vvfyQOgJBYWKB52OsOQpIVSJaZTdTnCgAAIDUuAACAcwoDAAAyKfCFHQBAAQ+OyO8NGlAAkL3Bs4Fa4AAvGgAqsAfQAKAWAPQTNKACgNYAoBYBAAAozgQAAFAyAQAAWLeRNSQRmS3j3GTCH4ZgNtlEi15VAAAAAElFTkSuQmCC)} 942#webamp #repeat.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAPBAMAAAAFYbKSAAAAFVBMVEUICBAQWgBSa3Nje4R7jJyPn6itvcb4vicLAAAASElEQVQI12NgwA9MXODAWYGBwS0NARyAXISsC5jLwMCCzGUUDAHpYkFwnUBSUC5raIgDA4ILkmFB5Tog9KJZhMI1Q+UqIHsAAPs1JqMDCtK2AAAAAElFTkSuQmCC)} 943#webamp #repeat.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAPCAMAAADAkV+TAAAAeFBMVEUA1gAoKD8pKUApKkEqKUEqKkEqKkMrK0QsK0MsK0QsLEUsLEYtLUcuLUcuLUguLkkvL0ovN00wL0swL0wwMEsxMU01NlQ2NVM2NVQ2NlU2NlY3N1c3N1g3OFg4N1g4OFlKWmtSY3N7hJSElKWttca9ztbV3vLv///lInoXAAAAgUlEQVQYGQXBMQ7CUAwFMP+SzkgoO1vvfyQOgJBYWKB52OsOQpIVSJaZTdTnCgAAIDUuAACAcwoDAAAyKfCFHQBAAQ+OyO8NGlAAkL3Bs4Fa4AAvGgAqsAfQAKAWAPQTNKACgNYAoBYBAAAozgQAAFAyAQAAWLeRNSQRmS3j3GTCH4ZgNtlEi15VAAAAAElFTkSuQmCC)} 944#webamp #repeat.selected.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAPBAMAAAAFYbKSAAAAFVBMVEUA1gAICBBSa3Nje4R7jJyPn6itvcYox7XLAAAATElEQVQI12MQRAEM6FwTFzhwVmQQdEtDAEcgFyHrAuYKCoogcwUYQpwVwWIwrhNICsoVDQ1xFERwQTIiqFxHhF40i1C4ZqhcRWQvAAA51isA/VWazgAAAABJRU5ErkJggg==)} 945#webamp #equalizer-button {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMCAMAAAC+5dbKAAAAUVBMVEUQWgAqKUIqKkMrK0QrLEQsK0MsK0QsK0YsLEUsLEYtLUcuLUcuLUguLkkvL0ovN00wL0wwMEsxMU1KWmtSY3N7hJSElKWttca9ztbV3vLv//9O4LHRAAAAaUlEQVQYGQXBwQ2DUAwFMEODRCao2H++HnrKofBf7e0NAAD5lhcAAM+6iwUAkJVXwQ8Ho42GVeDjimmmTSM7AGYAKHCBhmmww5GEntHTAykCcIozZ6A8CQAAqawAAEDda/NgbZFErMfuD041NCuZPULmAAAAAElFTkSuQmCC)} 946#webamp #equalizer-button.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAIVBMVEUA1gArK0QvN01KWmtSY3N7hJSElKWttca9ztbV3vLv//9R/wqlAAAAT0lEQVQI12Moh4MyAYaqVTBQAuR0QEF7MIhjbNzRpNGkAeEYcHZodGg0wTlKGjCO5UyQDFQZEAD1QGTg9gA55amhUADkpBjDgQCDIAIIAAAWsDNHmvvPEQAAAABJRU5ErkJggg==)} 947#webamp #equalizer-button.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAGFBMVEUAAAAICBAQWgBSa3Nje4R7jJyPn6itvca8iDuFAAAASElEQVQI12MQRAABBhSOgGsoFAQDOeHlUFAK4sBkQsEcQcHQANYAVghHSC2UNZQ1AM5hYIVxxNJAMlBlQADUA5ZxRzbNEOECAM5YHW8MP5O/AAAAAElFTkSuQmCC)} 948#webamp #equalizer-button.selected.winamp-button {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAGFBMVEUAAAAA1gAICBBSa3Nje4R7jJyPn6itvcZs8alFAAAAR0lEQVQI12NQUIIDBQZUjmsoFAQDOeHlUFAK4sBkQsEcJaXQANYAVghHUSyUNZQ1AM5hYIVx1NJAMlBlQADUA5ZxRzYNyQUAEUAg+7nvOG8AAAAASUVORK5CYII=)} 949#webamp #playlist-button {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMCAMAAAC+5dbKAAAAUVBMVEUQWgAjIzgk
949IzckIzgkJDklJTolJjsmJTwmJjsnJz0nKD4oJz0oJz4oKD8pKUAqKUEqKUIqKkEvN01KWmtSY3N7hJSElKWttca9ztbV3vLv//+EzjHeAAAAXklEQVQYGQXBgRHCMAwEMLk4WYFj//nKAOHqR6o3AADk214AADyjGQCATKrhh+WwzwZygfve2ADUBYADwDT4gA2AhhUAxwZNACssAtqTAACgMwEAwPRRI5GpmTIhUX81UygSftVjhQAAAABJRU5ErkJggg==)} 950#webamp #playlist-button.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAIVBMVEUA1gArK0QvN01KWmtSY3N7hJSElKWttca9ztbV3vLv//9R/wqlAAAASklEQVQI12Moh4MyAYaqVTBQAuR0QEF7MIhjbNyhpKEB5RhwdmggcxAyljM7NDpgHCDQAMqBOXB7gJzy1FAoAHJSjOFAgEEQAQQAwMcyRToQk0kAAAAASUVORK5CYII=)} 951#webamp #playlist-button.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAGFBMVEUAAAAICBAQWgBSa3Nje4R7jJyPn6itvca8iDuFAAAARElEQVQI12MQRAABBhQOo2soFDgDOeHlUFAK4sBkQsEcQcFQBlZWKEdILZQVmYOQEUsLZQ2FcYCAFSgH4rgjm2aIcAEAbLsb8tZoQy8AAAAASUVORK5CYII=)} 952#webamp #playlist-button.selected.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMBAMAAAB7FTvLAAAAGFBMVEUAAAAA1gAICBBSa3Nje4R7jJyPn6itvcZs8alFAAAARElEQVQI12NgUoIDBQZUjmsoFDgDOeHlUFAK4sBkQsEcJaVQBlZWKEdRLJQVmYOQUUsLZQ2FcYCAFSgH4rgjm2aEcAEAZCcevKaFFFgAAAAASUVORK5CYII=)} 953#webamp #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACH1BMVEULFRIMDAwNDRQOFQsPDxcQEBkRERsTEh0TEx4TFB4UFBQUFB0UFB8VFSAVFSIVFiEWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eEQoeHS8eHi8fHyIfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUiIyYjIzYjIzgjJDcjJDgkGwkkIzckIzgkJDklJTolJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUAqKUEqKUIqKkEqKkMrK0QrLEQsIx8sK0QsLEUtLUctLUgtLkctLkguLUcuLUguLkcuLkkvL0ovMEsvMSUwL0swMEswMEwxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2NlU3N1Y3N1g3OFc3OFg4N1c4N1g4OFk5OVo7O1U+PlpAQF5CNhtDQ2BFQTxGQh9HR2RPTmdRPhtRUWxSSj1VVW9ZWXNaVzpbW2JdUCldXWdgYGpgYHliWkViYm5kZHJmZnVnZ3xoWTVpaHdqanpqaoBqe3trXUNra3xsbH5uboFuboZwcINwgY9xcYZzc4hzc4pzk5p0dIt1dYx4eIt6eo9+fo+AgJSBl42Gd02IiJeJlZqPj5+QkJCUlJ6VlaaZc0KdnaiggTSgoK+oqLOtrbivr7y2nFTBZ8mPAAAErElEQVQYGbX
953B36vfdR0H8Mfz/fl8p86Zx6Gz1YKDgaNp0vIiSLqoRLuokO66SGgJdtk/EARCXXZpEhjojVcKSoyUbroQssBdKKZWVjgkFZ24lut8P+9Xn885Z2uzHxc5H480u5rzYlssYluMFqlmtC0MdgypNESjEmIWxrTexGIgtErMGhmFWETrhkoJYldUROiDIi5UKapat6iUcwq9lU5ZlMJWbx2lt64wpQqdqa3LYnSfizUXi/MG/xIXiB2DXbFjtIhzYltzXnOB2BE7Wm92RKWEiverVMqit966bZUyKxfodnU7yq6yWFv8eOSHUkGINCFaNdH62FtiNhDsQZPWB4QWQ60kUhkEAyGG0ghDYjamhUFEjJU+EINZH2nSSusNYURVGkJUqPh3JWVWFBXrca0spkKnY6qU0rtSpjYpvfdSTK33VFdFaayndbdraEKoZtGmRCHdotlRDdHQatURSUfSO0KPLoYxqoyrUMVkVqZJs5hobbStF43EONJJQ4qqIN6vXCQ91rW2rbREb3qPiVKqKVImhSmEUqmuLPpoMfDwt0j1NKnr/E+l/P+OCjHYNURvNAyTc9aj3hK0J1xan9pbfmv2mXWttu5aj+vx0YmvPvcA9978mDYyTiOP3P/w3USkDhw75EPz6oOfJd/w+O0fefTo9b+484onvnz5ry8/+uxr7hxe/r2vOP3056721JGPM514e+SJY4dcSq8+eGue2W924pZa37XX7OuPqVOH7+Xwc9TIhEfu/wMGs4pNH55Ni9MbH/2IzY+9Xmb59Mv064d+8I/Fvo2rGDnxt9sO/8Zs0yW1if1HzZ7V1s/YUb7/g8OnNl584EtVI4PZbbd56E9sfkd40qV02sUS/rxxhEN7Xg+T2vcJ2g1nt/ZdecbZy252Zu+a6/aYYvakD+i0i1WOXrOHfxx9Y+0CW6c2TlEyMg18s+KhBz55zzHBjT5EJ1S8a+Pvw4H6Cwbv9Wux8e607/pXvHlw7zsrs2uveeuF3nCjS+tE6uAVh3j1yjdat6vz5uFTtzwlZUQfVMzuEYt3bvKhed7i9bOX/XXvgTN2nPh8c92wh4Ov8O7VJzeNvPCmsRHv3ORSel7Zv7+41oktD91t9tM7mvuufNFTh+99qRsZEXz7Z8cI3jh+3CV0xkVulVr11zbfeuvA2zVanPrdETec/lW+sG8vJ686uWnb2Jv42vHjPpgzLnJEPf3FET8vbv/lSWcvu6O6jed+wndvfqlJu+9HpMKQICQiGIOQRsgKzdDTiEbaynpMhEHErCXRVAsZKqGNU2tCBiGMRCqDBI3QYhZGKrEtFvHflFmlVHrM1orSh951FGuF6m1NVZkUfT1uKdapykSVStdfGc3ec04qFrEjZq1GizAkFiHNtoE0BA2JWVhNA03MBlKhEYu22lrF1ioWMWsEcYGQ0kipxKxiW6VSVUP1lFml7KhUl6pK2Vbp1kW3qCoKk1npqLUyq+89TvOfxAXGlsmipCaLmE3lnE4sUmVblRpoziuzErPWVlurmFaxCFqrUnbFLAkqeq9Oi0Wck0r03hKziB0pmbVU7KguK7sS2yazMqtaK7Oi9H8CJR/yJg+gKVcAAAAASUVORK5CYII=)} 954#webamp .selected #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACClBMVEUNDRQPDxcQEBkRERsTEh0TEx4TFB4UFB0UFB8VFSAVFSIVFiEWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eHS8eHi8eHyUfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDklJTolJiwlJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUAqKUEqKUIqKkEqKkMrK0QrLEQsK0QsLEUtLUctLUgtLkctLkguLUcuLUguLkcuLkkvL0ovMEswL0swMEswMEwxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2NlU3N1Y3N1g3OFc3OFg4N1c4N1g4OFk5OVo6QFU+Plo/QitDQ2BFQTxPTmdRUWxSSj1aVzpbW2JdXWdgYGpgYHliYm5kZHJmZnVnZ3xoWTVpaHdqanpqaoBrXUNra3xsbH5uboFuboZwcINxcYZzbFJzc4hzc4p0dIt1dYh1dYx4eIt6eo+Id0mIiJePj5+UlJ6VlaaZc0Kah12ckXWgoK+jlGqqurGtrbivr7yztri2nFS71tm/uX7AwcbE3+HJydDO4c7O4tHV1drj4+fsznrvvmbx8fP////AbX/CAAAEhklEQVQYGbXBz6tndR0H4Of1Oec2M7eud5ipKbHBKaJSoaZlJISrQhdCEEiQkPU/6J/gstYtgibazKJEFIpoEYm7omAsRFBRgi7OyPg1Z+R+z+fdOffHNNd+LPLO88ShuCX2xCL2xGCRakZ7wmDfkEpDNCohZmFI600sBkKrxCxkEGIRw2SslCAOREWEPijidpWiqnWLSjlU6K1MlEUprCuF0ltXmFKFTs9UFvGko+KouKX5l7hN7BsciH2DRRyKPc0tcZtmX+xLxb6mt67Rmw/qrbduUamUPZUy625TDnT7yoGymCx+PPJDqSBEmhCtmmh97C0xGwg20KT1AaFFq1EilVEwEGIojdASszEtNBExVvpADGZ9pEkrrTeEEVVpCFGh4t+VlFlRVKzHtbKYCp2OqVJK70rp6UrvvRQ91VNdFaUx9akcGJoQqlm0KVFIt2j2VUM0pMZCpHUkvSP06KINUWXcCFV0szJNmsVEa6M9vWgkxpFOGlJUBfFB5Yj0WNfantISvek9JkqppkjpClMIpVJdWfTRonHpu6R6mtTH/U+l/P++JMTgwBC90TBMDq1HvSVozzteXzhVPmP2yro2dh8z+3nnodUO57Z+rY0MfeDSM5ceJyL1iae23THXn/4y+bZfPLJ5+cHTzz1y8pffOPHi9gNXXvXN8W9/9LD3fvfVbb+6+EnWf7o68vxT247T9acv5t7B7HMv1/qxk2bf+Zla3b+12jr/EjXScekZs8Gs4ow754zFu6fv2fT5s1fLLBdfpd8z1ulWbG7fxcjLOw/e96LZGcfqDMZTI+sb2vpN+8rO1vkbp97YUTXSzB7kp1c5+33hBcepOyrh+un7+fTG1TCpzU/RLuzubm69a3fjK26eXLO9aTdmL/iQuqMqWydOcnO0ttoyW5mtbpzbWSkZ6Y3HK376e48+IbjPHfSsitfvPX1zOFt/xeD9fhbb/1hvfvbPrp07ef2E2Znp6l96w32O17Opc05xg9attljR2Tq1c2prJ2VERcXsUbF4+4I75jWLv+9uvP2Rszfs+8PX4u7xxAmn8c726oSRV18zNuLtC47Ta8qwiY9O2bUeV7ipOXf+jdXW+dUr3ciA4Hs/eYLgrcuO0zVHXJTa6G/dfc3Zd2q0uPbmeRfe+20e2vwYq7uufN2esTfx8GUf0jVHfFE9962Oy8WVB8yuVLf10o6d1ZYmnvwRqTAkCIkIxiCkETKiGXoa0UhG05AIo4hZS6KpFtIqoY1Ta0KaEEYilUGCRmgxCyOV2BOL+G/KrFIqPWZrRelD7zqKtUL1tqaqdEVfj7uKKVWZqFLp+uuj2fsOpWIR+2LWarAIQ2IR0uwZSEPQkJiFsTeamA2kQiMWGddjrMdYxGwgiNuElEZKJWYVeyqVqhqqp8wqZV+lulSvlD2VbirKoqooTGaloyZlVj/4Dc1/ErcZkm5RUpNFzKZyqBOLVNlTpRrNLWVWYpaM6zH6GItgGKqUAzFLgoreq9NiEYdSid5bYhaxLyWzIRX7qmR0ILFnMiuzqkmZFaX/E7gg7x1c8BJqAAAAAElFTkSuQmCC)} 955#webamp .llama #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACW1BMVEULFRIMDAwNDRQOFQsPDxcQEBkRERsTEh0TEx4TFB4UFBQUFB0UFB8VFSAVFSIVFiEWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eEQoeHS0eHS8eHi8fHyIfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUiIyYjIzYjIzgjJDcjJDgkGwkkIzckIzgkJDklJTclJTolJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEQsIx8sK0QsLEUtLD0tLUctLUgtLkctLkguLUcuLUguLkcu
955LkkvL0ovMEsvMSUwL0swMEswMEwwMUAxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2Nkk2Nk82NlU3N1Y3N1g3OFc3OFg4N1c4N1g4OEw4OFk5OUc5OVo7O1U9P0w+PlpAQF5CNhtDQ1NDQ2BFQTxGQh9HR2RJSVlOTl9PTmdRPhtRUWxSSj1VVW9ZWXNaVzpbW2JdUCldXWdgYGpgYHliWkViYm5kZHJmZnVnZ3xoWTVpaHdqanpqaoBqe3trXUNra3xsbH5uboFuboZwcINwgY9xcYZzc31zc4hzc4pzk5p0dIt1dYh1dYx3d4F4eIt6eo9+fo+AgJSBl42EhI2Gd02IiJeJlZqPj5+QkJCUlJ6VlaaZc0KdnaiggTSgoK+lpauoqLOtrbivr7y2nFRq7ap0AAAHC0lEQVQYGQXBbayehVkA4Ou+n+ct7U7LaUGggOfs4FpwdKUZ/eDDoJjRLCtm0x9+TX9pTPxhkDDnTPzh/GGyRKPYGGPUmAwzk63JEhHIMkYmiFgOlYrYoptCoaOUMvpJ21PO+9631xUJkAAEECCAMILoNALBABiiIxGSjiAgmERWCjAQZEdAEqMgQMoydLRAAIQOIahBEwCgo+nOAh0NoFHZigKtsVpZaJWlMYtuFNNhtcFoPwAgAQABwACAAIAADAABGEEACCABSABIQACyEpAqS1IJAKCyskBlZQEdDQUABVCABmgwBV8e+ZLoQBAiBSE7hayxMgIGAlchRdaAIMPQExGychAYCMKalgRDJIyRwSCENHbUQBigRlJkG6cjghHdkUhSJZUAAChZUDQdpuNUg9VGUZh1tFaltFnOtKpqxSyroktPacl0Ni2AIQVBJ8hZhEYUSEAnQiJ7UkgZhYgqBBVKGMZQZZwE3cygzGYSzMgcgWpGIowjRSSyqEokAIACAKLCtKfATEaoVBVmtNapiDbTmAVJ6+jSoEYw8NQ+oitS9PUAAGCFHAARQAZk6EohQAaMXSGApMRYGQyCNAAMoZLEZBXAdFQZgRoBUAkAKlPJIkuWrsRk2hE96y5NlnwGAPdmtRdgz7Qnq59fnaxO/n7GLxzaz0O7HpMj42zkO1956kFCiL7h4SUAABx7dEX/ye9+4av7fvI/f2w9nvu6+M1tXHn+nx7F0cd2/5xv/etn7j36Db4494d+a+O/PfeFD/427Nj7/lcfvvR3v3b87D2vffdX1v/1/VtfvGYrqy++fvuOyeor3+/Kz85hedvcNz6655glPEH+9Nw/jq7ffexIyltunT7t40sOrt7n+FF7Np1Z9unjR29bzIuvnsH06vv8y7lY3DZOj7yxeftcvXX45j3HTu1Z3vPGQU8/vATg2KN3i+evheVdPf38Bvilr+mzOx5ixyF6ZIbvfOV/MECHLQAAsAW/s/YXP3Yrvth/9cGXZDTP/vsje77lwh/htum4+Dw6gjEP/PrOm/IQXrn/6nty/cL6swDw4vm9n3h95/TpHz2jRo/75YtP2ibA8okRMwYwlrqxxk3nBrZeAvM1z0XzSxeWF85BLlQunO/t9cyNP7Rt7oVxOjvv1KXpdIW2BYAtcO1d8KKcPgtoD/3ZjrMbX9n/QPfIAHv3evJ/2fKzgm/CBQAA0keuWrMFlaCCXbu809b9/utf71uOL9wSCI1677/u+OhrLyfeWbyVnV6+05aFjwhwzaCY7L1y8f0ENPsGuGPb00YIgDUbji9sXWZlfv7CBjbn8YXNJz88Om/Dpy6cPoPafGbT5iNh/NTK6nnunf7g3QtMTx/fflD4JlwA5Czuun4dl+86NQWAK2c3nqXFyGxgb4cn//i2Rz4ncAcAAHiJPx09lr9KBD10hD625cpfTlx59d26a93lyxt+AqB6fGLruseHGuS7i9e+tbh4FleOb0lgcXbiiIPb567a+b0kiw7em1+Lk6eMKqmEkgtO3jyfMyeXvLOBxZXLFk8u17lXtsxt2PZCcfXak2vnrj69vG1u7fbXl+/cMC6dOHHh/OnveoJyBwBequhb1i1x7OpTWQDFiR1n73xTtBE16IBHBDjzSQAAHDaZDWShEZWIH2666adewA2fuW66MFo864ZP+zYPuHioqKR+sNvb1699Jzj13MIE+I+jgxt//LXv//xYkgQO37wH3Hz+cjebrTD/I07fOL29xvnB8aWVc5j/8OaaJ+cXX3afUhbqusHCh7f999s/kz527p/v3+SG98eG6eDMJwEc1lxzXXGdWPU3vwF/8WDaP/eKN3c8dKSMjAh89vHPETh14AAuAQCsWBNUYoCsAZM3b/rEC+budWH83j/48i2HXXuPb3OP15YxzAb5xgfrD238+OnmCgCDOLm6a/fqwRGVALC05KXLWex27D2bdntmw8Fz83dvveTSynvY7Fm3L2w+6eJ4n4vLpM1vHakHN78627l7uuzSrUt19MTi0imK9MCBA7gE3N36mX0THGj2PfW2K1c92GXjoT/nt3cdSZH7f4/oYIhAECEExkAQSRBrkIaKJCSRE9MxQjIIARkxSp1BDB1JjrNMQQyCZCRExyACSZADBCMdASRIAAAABZWlowKmmpmaTEuhmWp05ZTqNtPUdFxVTKM7ZvRUR6n/G2EFQHSAAARkjyAYIkAQCQxEIpCIgGDNdCQFDEQHSYCcrE7C6iRAQhIIAAiiJdE6AjqAjo7uHrqioaMBHV2iu7KAjjJtCnQ3jRm0Qq9q6D/4GgkAAAIAxowZaNEzEDBrAEWA6Aa69UgC0NACMierkzCbBEhkdmuAgIhAh6ouMkAAiI5QlREQAhAtIiKzEtAlJgARwAwaulc1NK3+HwQZGF3RS6s/AAAAAElFTkSuQmCC)} 956#webamp .llama.selected #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACSVBMVEUNDRQPDxcQEBkRERsTEh0TEx4TFB4UFB0UFB8VFSAVFSIVFiEWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eHS0eHS8eHi8eHyUfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUjIzYjIzgjJDcjJDgkIzckIzgkJDklJTolJiwlJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUApKUIpKkEpKkIqKUEqKUIqKkEqKkMrK0QrLEQsK0QsLEUtLD0tLUctLUgtLkctLkguLUcuLUguLkcuLkkvL0ovMEswL0swMEswMEwxMUIxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2Nk82NlU3N1Y3N1g3OFc3OFg4N1c4N1g4OFk5OVo6QFU7O1U9P0w+Plo/QitAQF5DQ1NDQ2BFQTxHR2RJSVlOTl9RUWxSSj1VVW9ZWXNaVzpbW2JdXWdgYGpgYHliYm5kZHJmZnVnZ3xoWTVpaHdqanpqaoBrXUNra3xsbH5uboFuboZub3pwcINxcYZzbFJzc4hzc4p0dIt1dYh1dYx4eIt6eo9+fo9/f4eEhI2Id0mIiJePj5+UlJ6VlaaZc0Kah12ckXWdnaigoK+jlGqoqLOqurGtrbivr7yztri2nFS71tm/uX7AwcbE3+HJydDO4c7O4tHV1drj4+fsznrvvmbx8fP///8QuCFEAAAG4ElEQVQYGQXBX6zfd10H4Of1+X4POz3lrH/P2rMOGZaWdmsZnSsbatIRCDDcILuQG5ULQgzqhQazGBK4UOO8wMSLOWMEEzOiNwN2wUw7WTJnWUdTks7NgFA3LHQ9dadlbc5a253v7/P2eQIgAAQICBADSDUjEAbAkEpDNCohEMa03gQMhFYJhAxCQAwzY6UEAYiKCH1QBABUiqrWQaUAFHorMwqUwlQplN66wixV6MzaVCAeBQAEABAAGgACAAEMAAEMIAACDAAEABoggFQATW9dozcAAL311kGlUkCloANAAcwABVBgBv5q5E+lghBpQrRqovWxtwQGgnegSesDQotWo0Qqo2AgxDtKI7Q0GNNCE9GMlT4QA/SRJq0MswFhRFUaQlSoAACgpKAoKqZxUmAqdDpmlVJ615WervTeS6eneqqridKY9VkB
956DE0I1UCbJQrpoAGqIRpSYyHSOpLeEXp00Ybo3TgXqujQzWYamNHaCPRiIDGOdNKQoioIAIACANJjqgnoWqI3vceMUqrppHSFWWiUSnUF+ggaxz5BqqdJLQEAgBu0BkiAFkiUiIAWGKtHgEaXsbfQhGYAGKI3GsYJwDTqLUEfAFABAJUoKVJSqjfMTZVUr+qK1rXnAfDB1sv74IdTza1/AR7vPLh2lncvflMbGfrAsSeOPUBE6pavbgYAwOVHbqjH/vAvvvHrv3Zu6wJe+IZ86Tamf3/qMZz764983DP/9un7zv0dX57/ii/efPLZP7n2eBz+yOW/f+TG3/7+pfOHX//W5+cf//SuU7fuYjpx5sO/NE4/+1719pvzOL1//p/3HVqxjKdoD8x/c/TeAysnI3ffNv2LDy578e0jVk45sunK8z61curwzlw//Qb6liOeu5xD7xqnn//gtkPzdeH4/oMrFw6dPrTyrOe+uhnA5UfukT1zcMd/1vSFefiDx9TaBxbXFne/RI10HHsCBqjYBgAA2/Doht++5QD+qL527YtaihP/8Xv3fce1r+DOyp3PoRLGdvQzv/LLwymcOvLO+zO/d/48AJxa/eQ9Z94zO3bgJ/roSb9z/dv2ywiv/NeIGQNopbbWeMsq9qyDm+tmrltavnZi3ypkb2Xfybp99q93nHHX/IvvfKuvHLxwebq+TtkGwDaY3zAy/Z82vQYoZxd3X9346llVIw0e4OgqS58SvgsTAADN3E3jZvQGejh82JWy4c9XH68dF7fvCKLQf3z29qXXTwZvLu3lXid+1Y7fvUnArVu8zfiJ9bdXG6B4eIB9e75jhABsXFhZ3vMG65tdW+BgVpYPvnLj1JKFj15begO1/dK27WL82Pr6KT40rf78MuuXX7vrWfFdmABtlsX5jVwdTdYWYQ3Wru68sKZkpDceqDh61GcfEtwNAACe5MuDf2ifI6GGSvjfndOjo+nlK7OPzd24MX8/QK/xiS/N/WOraBeXNq8uLV3DdGnHCNwyu/gDx+/ZMPee443WqfDmwiZcvGjUG71ByT6Xdm4OF5ddWGDr+sxWz9fqT5fnF+56ttgyt35jfsvq9+/aMHf7qe/du3FcftfZa6sXn/EtursB8GRP3WojN9G6tUXW6CxuvLBxUcqIigp8VsDqHgAAnDH2RusopDf42cLWB49h02/sre2DO89ZeMjTfNJbL87mVOiv7vfTzXNvhktPfX4EXjo92PX+H7/8W0PXaMDxPYfA/vNXq9jrEgu7vbZ1eu9sXOIny+uXb+PmaXvdTJa2nnREKXtry2DvjTte+9HDg4PXnvn4JjuuzBVMg9U9AM4o5hawOMu66/NruKx59+5X1xZ3r/2oGxkQPPj0QwSrX4dfAADcMBd6wwCtD7Cy9f3HzN3n+vD63/jLHedsvdfT3Ov1F9B6tB9+dP6FXbv+uwDAIOenDxyajo/oDTDC8
956jJnWueAlUs2bXJh4cXVpQ/tWXdl/SIOOurw8sFXXJ074voJYvuFk/3h7W+t33lg+r7Zzs/UubPvW75wXqe5/+vwC+CeUv/0uY6vFacPwcvVLb50lrVFTTz6Z6TCkCAkIhiDkEbIHJqhpxGNZDQbEmEUgZaMmmohrdJo46w1IU1ojEQqgwSN0BqEkUqAgAAAACiolEoPTIquj7Ouo5gUqreJXqUr+jSu68xSlRk1qXT9f0a4ASAVEECg1QDCkICQBgykIWhIIMzNBprAQCo0AjJOY0xjQGAgCACElEZKJVABKpWqGqqnoFKASnWpXimg0s2KAlVFYQaloyYF9cffpgEAgADAkHRQUjMQmBWATkCqgCo10AAoKIFknMboY0AwDFUKIJAEFb1XpwUEQCrRe0sgAkhJkiEVQJWMAAkwg4KqSUFR+v8DYP8M63Qn0TQAAAAASUVORK5CYII=)} 957#webamp .selected #title-bar #option.clicked {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAHlBMVEUUFB8VFSAVFSIVFiEWFSAWFiEWFiI0MCyah13sznoaG8L5AAAAPElEQVQI12NgYBAUCmBgmCCoaMDAWSmoZMAwvVIwNIBhRueMjgkMAoLTKwMYGAWnz0xgEBT0DAWxXdMSACxMDDJsyBoOAAAAAElFTkSuQmCC)} 958#webamp .selected #title-bar #option:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEUhKDU0MCyah12jlGrsznoe/O3VAAAAMklEQVQI12MwBgIDBgMHBgYDBhMRASDpKCIIJJ1UnJQcGAwEHUWAsoyOLkCSgQWIweoBtzQG0TH1VqcAAAAASUVORK5CYII=)} 959#webamp .selected #title-bar #option.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEUhKDU0MCyah12jlGrsznoe/O3VAAAAMklEQVQI12MwBgIDBgMHBgYDBhMRASDpKCIIJJ1UnJQcGAwEHUWAsoyOLkCSgQWIweoBtzQG0TH1VqcAAAAASUVORK5CYII=)} 960#webamp .selected #title-bar #minimize.clicked {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAASFBMVEUqKUIqKkMrK0QrLEQsK0QsLEUtLUctLUgtLkcuLUhFQTxSSj1aVzpoWTVrXUNzbFKId0mckXWqurG71tm/uX7AwcbE3+HO4c5KSa+JAAAAPElEQVQIHQXBwQHAMAjEMJvQfLv/lJ0ArpK3FsLQZxogW9uqXjqlkKQphYTmcGBI4wPU6OVd4FtvYEzyA+cLGDTjuSw1AAAAAElFTkSuQmCC)} 961#webamp .selected #title-bar #minimize.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAIVBMVEVFQTxSSj1aVzpoWTVrXUNzbFKId0mRbkqckXWjlGq/uX4Hs2WWAAAAOUlEQVQI12OYCQQTGKYzMLBPYJggKCgwgWGSiYvRBIYpYWkhExhmdK3qAJKrVq0AqunoaJ/AAFYPAAQVFS+2qihdAAAAAElFTkSuQmCC)} 962#webamp .selected #title-bar #shade.clicked {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAMFBMVEUtLUgtLkguLUcuLUguLkcuLkkvL0ovMEswL0swMEswMExFQTxSSj1rXUOqurHO4c6W/ePHAAAAQUlEQVQIHQE2AMn/AKqHZlVQAJnu7uUQAK7///4wAK3d3d0wAKzd3dwwAJzN3cwwAJvMzMNAAIi7u7MgAIZlVTAwDDgbUKzozR4AAAAASUVORK5CYII=)} 963#webamp .selected #title-bar #shade.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEVFQTxSSj1rXUOjlGq/uX5Idn/CAAAAM0lEQVQIHQXBwRGAIAwAsLT07Z2zsP8qbuDBAliTmDjl1m8Gob6HK5uWti27V6uxDDFxfn1PDx8P0VYSAAAAAElFTkSuQmCC)} 964#webamp .selected #title-bar #close.clicked {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAALVBMVEUoJz4oKD8pKUAqKUEqKUIqKkMrK0Q0MCxoWTVrXUORbkqjlGq0h2PCsWH///9ex0i3AAAAO0lEQVQI12NIdTFWUmDIbC/vFGCIONm5Q4AhfPbq6UCy61U7A4P77LVAdsTOzhsMDJ5ANQwMLkaKCgwA5wURVkMAFf0AAAAASUVORK5CYII=)} 965#webamp .selected #title-bar #close.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAElBMVEU0MCxoWTVrXUORbkqjlGr///+HjTObAAAAKUlEQVQI12NwAQIHBicBBiEHBkcmIUYHBgcFAwUgKRwsAGNDxCFqwOoB1gEH67W94+0AAAAASUVORK5CYII=)} 966#webamp #clutter-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAArBAMAAAC3GdQgAAAAElBMVEUAAAAAAAgQECEYGCkzPElgYGraVCJcAAAAVElEQVQI132NsQ2AQAwDr8gCv0FGMNLTu8gKv/8qFCAgQqI7WWebbYyBACQJEUbyRDgaTf95Va3xeGWkKUTQqPz12m9eyyYB8s7eVEUSJs8VIPe1DmVJGRTmaMgdAAAAAElFTkSuQmCC)} 967#webamp #clutter-bar.disabled {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAArBAMAAAC3GdQgAAAAD1BMVEUAAAAAAAgQECEYGClgYGoHCnLLAAAAIklEQVQI12MwFBQUZDBgAAIDIBhULAVUlgJhFlivgomLCwA8qROh1kJ8awAAAABJRU5ErkJggg==)} 968#webamp #button-o:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAGUlEQVQI12Nw0GBwaWNwaIKRGQwODAwuLgA+SAT1jbNsAAAAAABJRU5ErkJggg==)} 969#webamp #button-0.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAGUlEQVQI12Nw0GBwaWNwaIKRGQwODAwuLgA+SAT1jbNsAAAAAABJRU5ErkJggg==)} 970#webamp #button-a:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAGElEQVQI12Nw0GBwaWNwaGJwWQUmgWwGADIVBK9/og4OAAAAAElFTkSuQmCC)} 971#webamp #button-a.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAGElEQVQI12Nw0GBwaWNwaGJwWQUmgWwGADIVBK9/og4OAAAAAElFTkSuQmCC)} 972#webamp #button-i:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAF0lEQVQI12NwcWFwWMHgksLgoAAjVwAALckEbUwsrjEAAAAASUVORK5CYII=)} 973#webamp #button-i.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAACVBMVEUAAAAYGClwgY/qIgoqAAAAF0lEQVQI12NwcWFwWMHgksLgoAAjVwAALckEbUwsrjEAAAAASUVORK5CYII=)} 974#webamp #button-d:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAADFBMVEUAAAAQECEYGClwgY/lGZUOAAAAHElEQVQI12NoYGDo6GBo+MPQcZqh4TCIdACSfwBnkgl9KMHv2wAAAABJRU5ErkJggg==)} 975#webamp #button-d.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAADFBMVEUAAAAQECEYGClwgY/lGZUOAAAAHElEQVQI12NoYGDo6GBo+MPQcZqh4TCIdACSfwBnkgl9KMHv2wAAAABJRU5ErkJggg==)} 976#webamp #button-v:active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAADFBMVEUAAAAQECEYGClwgY/lGZUOAAAAF0lEQVQI12NwYGDwOM3gcBhG/mdwsAEAPG8GMJvxEOEAAAAASUVORK5CYII=)} 977#webamp #button-v.selected {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHAgMAAABIN+TNAAAADFBMVEUAAAAQECEYGClwgY/lGZUOAAAAF0lEQVQI12NwYGDwOM3gcBhG/mdwsAEAPG8GMJvxEOEAAAAASUVORK5CYII=)} 978#webamp .shade #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACJVBMVEUAAAAA+AAKDRYKDhYLFRIMDAwNDRQPDxcQEBkRERsTEh0TEx4TFB4UFB0UFB8VFSAVFSIVFiEVFiIWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicZGigaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eEQoeHS0eHS8eHi8fHyIfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUiIyYjIzYjIzgjJDcjJDgkGwkkIzckIzgkJDklJTclJTolJjIlJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUApKjUpKkEqKUEqKUIqKjoqKkEqKkMrKzwrK0QrLEQsIx8sK0QsLDssLEUtLUctLUgtLkctLkguLUcuLUguLkcu
978LkkvL0ovMEsvMSUwL0swMEswMEwwMUAxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2NlU3N0Q3N1Y3N1g3OFc3OFg4N1c4N1g4OFk5OVo9P0xCNhtDQ1NFQTxGQh9JSVlOTl9RPhtSSj1YWGJaVzpbW2JdUCldXWdgYGpiWkViYm5kZHJmZnVoWTVpaHdqanpqe3trXUNra3xsbH5uboFub3pwcINwgY9xcYZzc31zc4hzc4pzk5p0dIt1ZDd1dYx3d4F/f4eBl42EhI2Gd02IiJeQkJCUlJ6Zc0KdnaiggTSlpau2nFTZBQIoAAAFhklEQVQYGQXBQailB3kG4Of9/v9MohPDTUZT4umU5FKjNaIEtHGCu65asgpYq4LaKhZ0YaQFaUGDLS6C1KYbEUWwi0gWBbvIpnRlETS4CFaNGMW2CZc2QydzqUkmzTn/9/k8uQAQAAIEBIgFZMoOCAtgzaQQxSQEwi7VJWAh1CRQZBUCyrJZJyMIQExE6MUQADAZZqrBZAAMusZGgzE4dDVGVxtsmUFzXA4DVo8CAAoAEAAKAAGAAAoggAUEQIACoACgAAFUF6B0taILAEBXV4OurgYmAw0ADdCAARiwgS+vfEEmCJFFiJoSy7brSmAhuAkl1QtCxTI7iepaBQshLrSFYqnAmgqLiLJOeiEW6JWSGtWFYsVMCiEmTAAAMDIwDBPH9ajBNmga22SMbm1stRndPYZj9Va9mY1RbL0NwLoIYQosx8QgDQowhSjU7BqlqpF0I2xlU5ZdmbHuwgwbtG1TYKNqBXooqqwrTQoZZoIAABgAIB3HPgKjEl26Y2OMKU3GZrCFMKZ6M6BXUHz7Q2S2KhkyXdiW6hIKoRZAAlRuAIBnAAAAAABvB54BAABgAm+H94OTc06cc+IccOI8J65n3AYvmkuucecLXdUzw1BPATM4NJ/6/vgevPc4u8PT8M6NP3z2MR6+5ztqZemFJ7717Q8TkcnX/fnf3f6Jv/ydz/zD6z/52M2Pv+O+p79ZX1l/+g1f8fLf/MUd/urPfpfjj78jbnxyDwAPAQAAAAC+CDwEAAAA8EWcff39wv76bXtnnOxxDif7Yl+uu20PrsV+f3Zt/0I1ybufGrA3cECD/Nsl+MHvz/HpB+/D396rf336MKfPMkXjiW/9DOu6MPE/u/fc7tN3PYdSD8GfrH0XXHzfG1n40TfWe2oZLldVVVVVVRUAAAAAQFVVVQEAIAGAqqrLmBm37QtU7fcnbwEAVBVB7S/RmHfX/QnNAABcunLlypUrl9Q8CB7UPvfy6R2nv3rMzErBAw94/Hku/6nw4uUHObn5BqIvnuDNrx0u7v/baxf+wKs3D7c84P91+C4AAAAAAAD4Lvg1AAAGADwJEPYFUPbe8gsAAAS1p5r3lLr/BxoZHJZNg8mVkwu8duXqkftfAzi+dMtLjKx08cGJx7/6ex/5mOCJd11+pe4+fnWhvDp3s/z2i69c/KNveu709Vdvhcv9/L9OwikAAAAAAAA4BQAAEAOAd8FTYjjbF6CdvekXAGQAjuizveZOjcvPg4xDNqoh81s37Tl73dVqLvAUG9dOX3rrVRkrJibwEQEvvHrzczfd/X+Ar322fGC95RZ34X/vuHqriZ/9UxS89FYAAAAAAADYAwAAGACwx88B5/ZMtDPn5wAYNFjosxf24AyAwe6Arrb1uPX25pJ/P3jyfnjy3
978sWjr/uVq6cP/6StLAg++o8fIzD/+bYbN1xdgP945h3e/PJf50sX7+TqGx9/RCGqFy7+MwAoAAAIAACPglcAAAAAPAJ/PCPOnJ+fiHPOwZxzjutcB9e2cnbt6KyxL+j/4uOgAbT54ft2+Jfhvs/Dvb15w7N/z2fv+UnJhUcfIRPWBCERwS4IKUIuoCydIorUznFNFKsIVLJY9FJk7Qq1blVCFqFYiUwWCYpQgWJlEiAgAAAABiZj0oGjZvTSrTEcDabrSM/YDH1cD4ZDpuvAbCatf1lgYDtuAyYYFkNIBAoFISLhYBfKusIolaBbNVSGnqpgqQFWISwxTWGqGsqKbloTSDAAAMwMYGzp7qPjUSNyPGoMx0XM6CNteoPmAJZpTW9GQy4QADKBAASLUSDJ7CDIVGAlSqDSKkB2oQgsEJJA2R12sS0BhcWIEMggQIaIAAATk+lMmQEGMEbG1tVgbLUtBw1MM2wwtHEwMGbSvwGhZ2YZd3bCBAAAAABJRU5ErkJggg==)} 979#webamp .shade.selected #title-bar {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAAOCAMAAAA7SAh7AAACFlBMVEUAAAAA+AAKDRYNDRQPDxcQEBkRERsTEh0TEx4TFB4UFB0UFB8VFSAVFSIVFiEVFiIWFSAWFiEWFiIXFyQXGCQYFyUYGCUZGSYZGicZGigaGScaGSgaGicaGigbGyobHCscGyscHCsdHS0dHS4dHi0dHi4eHS0eHS8eHi8eHyUfHzAfHzIfIDEgIDEgIDMhITQhIjQiITQiIjUjIzYjIzgjJDgkIzckIzgkJDklJTolJiwlJjIlJjsmJTsmJjsmJj0nJz4nKD4oJz4oKD8pKUApKkEqKUEqKUIqKjoqKkEqKkMrK0QrLEQsK0QsLDssLEUtLD0tLUctLUgtLkctLkguLUcuLUguLkcuLkkvL0EvL0ovMEswL0swMEswMEwxMUIxMU0xMk0xMk4yMU0yMU4yMk8zM1AzNFI0MCw0M1E0NFE0NFI1LRA1NVM1NVQ1NlQ2NVU2NlU3N0Q3N1Y3N1g3OFc3OFg4N1c4N1g4OFk5OUc5OVo9P0w/QitFQTxJSVlOTl9SSj1YWGJaVzpbW2JdXWdgYGpiYm5kZHJmZnVoWTVpaHdqanprXUNra3xsbH5uboFwcINxcYZzbFJzc4hzc4pzk5p0dIt1dYx3d4GBl42EhI2Id0mIiJeUlJ6Zc0Kah12ckXWjlGqlpauqurGztri2nFS71tm/uX7AwcbE3+HO4c7V1drj4+fsznrvvmbx8fP////Kv08RAAAFRklEQVRIx+2XTYiVVRjHf89z3jszXq4zmJozvpJhfoQp4a5NIrRwEYFIi4hUKsIW0aKdGISISZCLBDcRuFCIVm4icpXtohoilEEFwcXc8UrkoNnVYd7zPC3Oee/MnQ8cXHcY5p6P55z3Of/n638kkJvAgq70D5KkuNLorde7C3FRQFBwkbxNoBA1zYcEEFCXelEUmftOUdFwcWS+NoILgoAFvE9NwMXBXW1uVK8Apk6VuuA4EJOMY2ppQtwBg6hVkiw4QX+T5ceynFg90KUnZGm0F5+jC7ebzoPGEfCF+oFLDYapZXhqfKxPcGFnwUQSPlfA54hn0wgS0q+6IoTYME1WTTZmAFBELaQdKqgHRBCXBtKTFBpWO4Zq8iVVUARBKVws9NzPinSsZxgUCsBr70MxhR5E85uRcPD0J1RFla8XswtY7SGOGYZjYhhm5hhEcROPuIGjEC328CoyJHj6eqhEcECsz5DeCxTEg5PgNEDELF0jKhFBC8WMoiFgWT+MGPNhEVSLfD0HBVWKAgwSJA5WQ7UIkH6nNqGyqja+imCKmRBT9LhiII4loAQUHBePtbcU9VUvvgPiURVxEDcFYsjJoLZWz5WzB6s86tPpBitrO1YovgPgAACjHRil/pem6OgoU2psBGjjm5iELbdN1dyT4+hvGSHPjnNk3NkCcLPyxuxugD8MXuvehQ3NH9ACggW4ePniIRAEcfmao2dbH5wa/vjs0NGvBn8devnPb/RM0fmCMzw8eXyYY5+sg+rqJYRHx1rz73BwhZicWqH4KeDh6QMolFMbS9owWkJCZbQMUAam2FgCMCmUZXuyvK0GIq9eSYYfS95U9fKGPB8Atl/3andYP8yDPeN494Vmtzl2Czy5KBcvp4QLuNAdPtziozXTKXe8dAs4UngLoPXmaghw7dpb21RcGOFpWlh2ReYSX5YbySGysQwxzfVQ6ROMiEMos7jvDfuu4HU66WuNwQBxBq0CwzD8F87d5tjM4J27uBc5SF+BC/dh5H0EJnfugU2NO0nF1iZg8+xMa9cEs43dPB5yGB3AMIHxp8JkvD/tL1UbAPh9XkUqwxwA5SJQevUqlKAGewNh308YaUiViy+4NAdWwaNABTtn6s3dmWfudXGkSMn8kAsXfmH/ewjw/c7hx2GtnwugzFRrIYx0Z1uvTzC9fujBAMBI6++fXQS2PhUmW1foJ9tqRAzaPVAi7fmQaM8PKiC2Swy2EIHtN2uJSlJuBcTXMQiNtHMQJiBCc/DeYBPxVPEkV/39mRjcmG08CGv/zR+68KFwuBgYoAX8M9x5Docb36Wqw/3yaTBpLbvii+Taud+hBNOFiORK24ug9u2kUbtfoKgyaYnuhEFgVZRZ4vQapokENozd6TbHuhNGkWJWgHfPv5fZkk8/e4e13WyWiRsvsvnhp3KytQs6q89/lquQWoDmtyxFup7UvgRg+olyxwEOmqG06XRGUTp12FjuTcFUSrFRaU9WtI060uJ1eHsB1o7/+IYBlxyuMgmMe6R56y50mygSTpwmkbZCauaWyTQN6VFwBKQBKMHSWEEkYCqCQCNvQkWUgAUBCaYKWkRVtCbziZEJ4hJSWdeaAPb4mksf510ebKtZq4tJCiADx4IlDuJQ4YCbVmCeyYlVxSwGlbhLBW64GHZb50CMVaxzUJqq3xdSX7bWTXLVFoiERFobmSWReK9ZDl5VA/PEZbV+kBSZGgbBLZ3qmvKCUlCzO8uQqLJE9QAz6xk/iplVVInDCpJ7DlVAcMcqMNwzbWQ2we2Og1kqUiD/vwEXvQH/A3+xY8OlLccKAAAAAElFTkSuQmCC)} 980#webamp .shade.selected #title-bar #shade {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAM1BMVEUtLUgtLkguLUcuLUguLkcuLkkvL0ovMEswL0swMEswMExFQTxSSj1zk5qBl42qurHO4c7FV37rAAAAOklEQVQIHQXBwQ2EQAwEMCdEPK7/YhFiM2fXzybCxAXvN1VVbe9tpenSDDCh+GhZVmpyHDwZu2HP9QfI+BkLtDdVPQAAAABJRU5ErkJggg==)} 981#webamp .shade #title-bar #shade.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAD1BMVEVFQTxSSj2jlGq/uX7CsWH/Y2uiAAAALUlEQVQI12NQAgIFBiUGBiYFBgVhYwMFBkVhY0Mg6QwmXVwEgeIuLgIwNWD1AJzCBeFqt4OOAAAAAElFTkSuQmCC)} 982#webamp .shade #position {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAHAgMAAACTjE7vAAAADFBMVEUAABAwMEsxMUJaa3u9OGBkAAAAIklEQVQI12NgAIIDDFqrVq06wCAaBiZDQ8PAZCiM/A8EBwAZeBBhq+F40QAAAABJRU5ErkJggg==)} 983#webamp .shade #position::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 984#webamp .shade #position::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAQMAAAD3d2XqAAAABlBMVEWjlGrsznoPowceAAAADklEQVQI12NwYHgAhw4AIi4E4a+iLsYAAAAASUVORK5CYII=)} 985#webamp .shade #position.left::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU9P0xoWTWjlGrsznp9Nqf9AAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 986#webamp .shade #position.left::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU9P0xoWTWjlGrsznp9Nqf9AAAAE0lEQVQI12PYwPCF4QcYfmHYAAArXgYxq2vCDQAAAABJRU5ErkJggg==)} 987#webamp .shade #position.right::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU9P0xoWTWjlGrsznp9Nqf9AAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 988#webamp .shade #position.right::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAHAgMAAACw1x86AAAADFBMVEU9P0xoWTWjlGrsznp9Nqf9AAAAEklEQVQI12OwYKhh2AOGNQwWABlSA52dOQTnAAAAAElFTkSuQmCC)} 989#webamp #volume {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAGkCAMAAAC//nO2AAAC5VBMVEUVFSEVFSIVgAoWFiMXFyQYFyUYGCUYGCYYkgsZGSgZdhAcHC0cbBQchRIeHi8fHzEfMh0fVR0omRwpKUArYyIsLEYujhYunBIvfhsvgRswSD4xMUoxMU0yMk8zM1AzM1IzNFEzNh80M1E0M1I0NFE0NFM0shU1NVQ1NlQ2NVM2NVQ2NlU3Ihw3N1c3N1g3OFc3OFg4N1c4N1g4OFc4OFk5OVo5bSw6OltAUkRCtiZHhidKSmhMlSVOeC9PpCNQT2lQUkRRmyxTO0BTU29WqypXjEFauihcmyxcwCphoCxixDFkritlvjdpdy9p2jBquCtrwCpsa4FtoCxvRB9woEtw1T5xcYlyxypz3D50xzF1TSd3iDd3oDF3tCt30zB4bi14eIx6IiN62jB7OCd7fI98e498fI59Vyp9fJB9fZJ+fpJ/f5R/1T6BxyqB4jCC3D6EtDGEwF6FnDGGYzmIoDGJQyyJYjGJrVqKxDCK4z6LfjiLjkiLmCyMpI2NmiyOWxeOjqGOmyyQxzGSRz2SVj+SkqSS4jCUyjiWlqiXXCGXaECaaSma4z6bXSGbfiebjSybw2Gb2jmdryydsJOeYhKeayafFhufKhufMzefPiGfSSGfVyGfbCefgSefkCyfmyyhok6j4Tik20Wk4jimxzGndkip40atrZKuV0auag2uwCqvlI6wYh+yERayKBayRx6ydiWynCqyriuywF+yxDG1hVK3RUy94ji/bRu/dRC/uyq/0zDB40bCcFTClFnCsV3Cv17DciPD1T7
989FDBLFJxLFQxvFURvFZRvFgCPFnCPFsSrFwCrF2TDGeA/G2jDIxdPI2z7JVyLJgSDJhSnJoCnJtDHJxDHJ3D7ZSh7ZWh7Zbx7ZfB/ZjifZlDfZrCfZsTfZwzDZxj7Z1DfbhC/fsSjgDhXgLBXgTB7gXB7gch7gkijgsijgyTDg2jDhHybhPCbhWC7hZy7hfC7hmTfhtjfhzD7h3D7eIOpxAAAEo0lEQVR42u3WeVRUZRjH8VuKpWZFkpjlWLN0uTMNMNOdycwpM0ZLIyjHSkoJyLBSMdvITGk1pVRMyzZTw4JSEVNLbVMgqCw1l9RcyfZ9/bv3vfd971jgP7/6o3Pe58vM4cA585z3zn3mc0brzXK5vW6Px+Pz+XRd9+sBqyArK5SZFQ6HTf4TMc2I9Wyb1tvFZrjPtIYYPsPQ9YAYw6dkhsLhbDaCT7Fqb4apuVwuNkIcxDAMvzOCTwkF2QxW5GgD7JOc2rWDdkyHZB3tUjqm8Dp1sn6lHNdunU/s7j6PD+l6cuoJeKm9LmBvltY5tcuxeF2iV7Or1E5K63Y8Xrf4w/wk3XtFT8GL31fB35MzXBddecNNN44eM3oM72b2sLpFdit7HK2KRysu4UPYHXa7vR6PwW+wnhEIOKsWCgbP5fdXLAi/w6b1+NuOWLfY5XZ5PV6PwRctQw9k+JP7aq2JvbDmES822y5bH34Sj4+tq274dT+fERTbmsU2LVtMiVhz2iyc/V+NrbzXWlfDxy7GWlf7FMGsYMi+Gv785xUc8YcZYUO87j585X3sJH75jvBB2eHM7HDyU2O2cyHiMNrpm/99GlHQHgVpPU9D65kmKEjrkY7XI2ZTEE0/Gy9dUtDvfLwEUUAUKExBtB9etK9NQbT/hXj94zYFsZxBeDkJm4K+8cvxiAKiQGkKLsaLCQrYp/hStEE5goL4kCvwhkgKEsOvRRt+2xNEAVGgLgWxwXgOBUPz8tHyhkoKRowqRhs14m5JwdgytLFEAVGgNgWXoSUpyMu/Bi0/LyEpKB6PVpykoOwetDKigChQmIKzYlfhORSMHIc3UlJQ/gheuUNB1WNoVbOJAqJAZQqux8sVFOROKH8ArXyCoOC6aVWLXsRaVDVNUDAgsfgltMVEAVFAFBAFRAFRoDgFuRPvQJuYO0BQMKcab869goLq1/GqJQUL38R77WWigChQmILJU+7HmjI5ScEreA4Fq9Zv+hhr0/pVCyUFG7d8irVlI1FAFBAFRAFRQBQQBUQBUUAUEAVEAVFAFBAFjILCF/AKBQWFK9d9iLZupaBg0s7WH9BadzoUtP6J1vouUUAUqEzBrAVosxwK6j/Aq5cU7Dj4PdrBHQ4Fh/5AO/QOUUAUEAVEAVFAFBAFRAFRQBQoT0HpzOfRZiYpeB+vfpKgYPv+w99hHd6/XVKw4MDvaAeIAqJAYQrOKaic9xzWvMrSgTYFpSta8FbMsCm4a9veb9H2blttUzBwyb7f0Pa9/SpRQBQQBUQBUUAUKE3BsOmPo00vEBQULH0Db6mgoHTDZ3gblggKZnyOt5ooIApUpmAqnqRg2NxavLm3Cwpq136EtrZWUlDZ8glaC1FAFChNwbN4yW8FzXjOt4LmPd+g7Wl2vhX8ikcUEAUqU1DyDF6JoKCk7j28uodsCu7cuvtrtN1bJQU1v+C9RRQQBSpT8DRekoImvLoHBQVNu75C29VUIyn4GY8oIApUpqDoKbwiQUHR8ka85YKCksYv8RolBfN/wqshCogClSl4Es+hYFkD3rL5NgVFDV/gNayRFPyIt4Yo+P9T8B9IsPkvQxJ1ta+jwcEAAAAASUVORK5CYII=)} 990#webamp #volume input::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYvL0RKWmt7hJStvMTa5+opTTwbAAAAMUlEQVQI12NQFAQBIQaxNBBIZGALBYIQAyAtKiqKlwapM2RgcwEBQwZhYxAwZICaBwCdgQ6Jd297uQAAAABJRU5ErkJggg==)} 991#webamp #volume input::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYvL0RKWmt7hJStvMTa5+opTTwbAAAAMUlEQVQI12NQFAQBIQaxNBBIZGALBYIQAyAtKiqKlwapM2RgcwEBQwZhYxAwZICaBwCdgQ6Jd297uQAAAABJRU5ErkJggg==)} 992#webamp #volume input:active::-webkit-slider-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYZICovL0RKWmva5+r///+U4Y9MAAAAMUlEQVQI12MwFAQBYQbRUBAQZGBlAAIWBiQ6ISEBKw2SV4TTIi4gIMhgJKQopCgoDAB2aAh/NddRQgAAAABJRU5ErkJggg==)} 993#webamp #volume input:active::-moz-range-thumb {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAALBAMAAAC9q6FRAAAAFVBMVEUAAAALDxYZICovL0RKWmva5+r///+U4Y9MAAAAMUlEQVQI12MwFAQBYQbRUBAQZGBlAAIWBiQ6ISEBKw2SV4TTIi4gIMhgJKQopCgoDAB2aAh/NddRQgAAAABJRU5ErkJggg==)} 994#webamp .gen-window .gen-top {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUAgMAAAAFGX4uAAAACVBMVEUeHi8rK0Rra3zjkZV/AAAAG0lEQVQI12NggIJVYNDAEAoGDlSj0QGx9kABAFXxKF3wQT+3AAAAAElFTkSuQmCC)} 995#webamp .gen-window .gen-top-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAB4ElEQVRIS61Vu04DMRDc3WuQqEBIVKlAQkKioEZU1PkVpHzhXZX8RUCiTpUjojs04/XrcjyUxFF09p3t8c7OjnU2exikaiqqmt6wryY6iLCrxg5+aGp4Wh77WszjDMwFyHw+r2GwEb9jmm+GycXmEYhgFjaM8/fWRZCuXYaj8kweTbExI4gbqYpxnIFThFxj+UBlJG27DFQ4DE9anb4Y+yYJhNSoqMWD/ATSrSIxKZJtv67TdeAo5SREoqJD4Ljv1/LydCO3s7MDt87LEsg4J/3nmywWr0cDkP6U+G4l0LKnXQByeXF+YhCoC1lxmQIEdJ2iTdAlzEu/e5f7u2t5frw6GqcG8QrFA3Ww+/o4GqDOCeny5iqD7vkP9ZzrZqJOyDTs5bdipLpEZNtv9guSi8MBcuXnwvMP2SmSE4y8awwyrnzaSGmMlc2MDTLazR8gMM1sM7Rb5im4cuHCUZFuQdlQs9ftJT7SBZCOVuNUaSNmOGEjhnfsF5R5Tho1GSpjLax+TBdB2pWXTsPUmzXBYV0M6JvfN3R8CZTGdxRM6cLTIMH+UTe8nCJl1jh1iDJSmNVVglBt1X1SqCtE4rIeSdpIHaIK9FF4BmKjOAA88Nv/InHgcJXmeyJTN3X91ur6BrqJo0MRJOhhAAAAAElFTkSuQmCC)} 996#webamp .gen-window .gen-top-left-end {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAABxklEQVRIS7WVvUoDQRDHZ/r4DIEThCiCtn4UCpa+gIiF76DmCWwv+D5WYm0nCFpZCSKWKZIdmY//Zu/CxSaXQPZuM7v/md2Z3/DO6FSEhESE9COSbCSbjUdKpC9qY7Nmu7wGa5MQsVn6Djy+qWMpRHwD1+nazIXwdVGTtfkU7+EZ8dHBpVnoD5tBcglsoqNGZ2Nsi7nCGbWx/+EYIhUhPj68Et/EpVTCDIsNTVznUyJhIUouZh7H8apzcIQ4HApRHg4rHH3cwHqHwaAivr87703k/XNKj88fxJPJpDcRPZO6fiDe39vtTSTxlH5/5sTXF2e9iWgkdlx93snTyze9vn0RV5tbvUUyn81osFGVdeJalu9R7VbBKVmN2JzWSVQ1UASUoBiBJq96rxdeF7u8lt3BJXZtj06CIisA2Y6uzbQcnQs5uhYI4vFtLZmuK6CIYyi5lsFYOBGYzAxTmwKQosjpZlcAEPfWuAtEUrQL3ImJAJDGOu0bIPAShb3XLHqP09lhGmgFqdVbPDdE0LDQrAoROwLNrPZcRn5k5X+o7+4nqXGMubdEerZT2BxpR+Ip7BlRpiHaL5pQo3aK7MpNOqLKTbHIrj9doofFD8vqAQAAAABJRU5ErkJggg==)} 997#webamp .gen-window .gen-top-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAABYlBMVEULFRIMDAweHS4eHi8fHyIfHzAfHzIgHzEgHzIhIDIhITMhITQiITQiIjUiIyYjIjYkIzckIzgkJDklJDomJTkmJTsmJTwmJjsnJj0oJj0oJz4oKD8oKEApKEApKUApKkEqKUAqKUEqKkEqKkIrKUIrKkMrK0QsK0QsLEMsLEUsLEYtLUYuLUcuLUguLkcvJwgvLkkvL0ovMSUwL0kwL0owMEsxL0wxMC0xMEwxMU4yMU0yMU4zMk8zMlA0MlA0M1E1M1I1NFM2NFM2NVQ2Nhg3KxA3NlU3NlY4NVU4NlU4N1c5N1g5OFo6OFk6OVo7OVw7Ols7Olw8OVs8Olw8O11GQh9JRjlORDBQPx5dVztiWkVqanprXUFra3xsa3xsbH5tbX9tboBubX9vboFvb4JwTyxwb4Nxb4RxcIVxcYZycYZzcodzcoh0c4l0c4p1dIt1dIx2dY13dY6Gd02QkJCZc0LWhhB9AAABJUlEQVQYGT3BvWqUYRRG0X2++bRSGxsVhBls0oidP3W8gYCFXoW3JV6DVgmxslBbIQELJRAQA0Kc9zzbmcBkrVrZrTEaYuylEXs+EK/EEKNo4HA+SVf0n2mTMTqJcc00TTeBoGwUBZMINXPteTL2fn2E/XvHg/ktOz/fP4Ve7ZerU2Cqaw/YePdndXd1+qEWzIfsrKGbXNy+OCPN/IhrX1nI7+XFw3OqnO+z8wOa17dOz86XL79L3WHn7zMz9r59gSePP62pgxrG0bG1L23TraRWI24kRGNilv3iqJiaAgQRtEAomF+JIYRotPGIrfkki3UcncTkcqQHsjEtGEBRVeRymIBsTBYb3lCaqTqJbE0lG5WqVHrEyJX586A12omj45tj2foP9wDyBsXxPvcAAAAASUVORK5CYII=)} 998#webamp .gen-window .gen-top-right-end {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAByUlEQVRIS7VVPUsDQRCdWRvBShGszoAKYg4C1mJj8m8Cgr2/1cLfENBu5b352D1NY7GXhLvszc57MzvzRqdpU1VV8MOlolJFpeCvFuEq3uMDGyxU3Ls1mrit22MvfWDffv9e7dGccfGXg3CYd5o6KS1GrtsbPoK0zuttNXtjh3thZG0zWaYTY8z3ngGVIlosMiMS0cNGhCBprCq1ihTEWVW0mPNMlRNAKrC5SAAZoRLA/uzsRed5Vw+HDxqNunS1uqnbp1u5m05HYQhB3t5ehwHweABycX42HgTpGnkxkvX9lTw/Xg7DYXV9fX8OA+CZzA8vVbwfotYhK9Zw3iuhAtmgaEhvvGhIykqoABq6UJ74vZ422YwhAyYLTbOsgTv5iOdOz9j1qVve/a5UekwgE2ThfAnSVMCpdXLS5MlOIQWyZ2tpa/q1EMbQOAV3k5c/kaYqe/r+L5AOvtAuW4voeKY8DmhfJ5BkXzwlfOksUBR5oFhvotkLa4BYVKHGATLvcp5AdS3DHYinrZ8XrQgccDEa4MMjCQVnCZ+oaEy7fkZ0g2kBQp1
998HfA3E5lArDpawF0OWcIaJ4/TDzPF7tMpatNYOffX5hPUW/wFZNjaZ4b4luAAAAABJRU5ErkJggg==)} 999#webamp .gen-window .gen-top-left-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU0nT8z0BjwFhe1kd7S2ysY4eJJfLySrT3SVu5L+0tmTBhAu0tMTTQpb0lSVGutLeELnGipKxGe5/QJTPSpeyiiyWjBSQpVRAjXVIXXSyhR+oCAGL8JbEqBdscAAAAAElFTkSuQmCC)} 1000#webamp .gen-window .gen-top-right-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU0nT8z0BjwFhe1kd7S2ysY4eJJfLySrT3SVu5L+0tmTBhAu0tMTTQpb0lSVGutLeELnGipKxGe5/QJTPSpeyiiyWjBSQpVRAjXVIXXSyhR+oCAGL8JbEqBdscAAAAAElFTkSuQmCC)} 1001#webamp .gen-window.selected .gen-top {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUAgMAAAAFGX4uAAAACVBMVEUeHi8rK0Rra3zjkZV/AAAAG0lEQVQI12NggIJVYNDAEAoGDlSj0QGx9kABAFXxKF3wQT+3AAAAAElFTkSuQmCC)} 1002#webamp .gen-window.selected .gen-top-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAABHVBMVEUdHS0dHS4dHi4eHS4eHi8eHyUfHzAfHzIfIDIgHzEgHzIhIDIhITMiITQiIjUjIjYkIzckIzgkJDckJDklJDolJiwmJTsmJTwnJj0oJj0oJz4pKUApKkEqKUAqKUEqKkEqKkIrKUIrKkMrK0QsK0MsK0QsLEUsLEYtLUYuLUcuLUgvLkkvL0owL0owMEsxL0wxMEwyMU0yMU4zMk8zMlA0Mk80MlA0M1E0NFE1M1I1NFM2NFM2NVQ3NVY3NlY4NVU4NlU4N1c5N1g5OFk6OFlCQTtqanpra3xrbHxsa3xsbH1sbH5tbX9ubYBuboBvboFvb4Jwb4Nxb4RxcIVxcYZycYZzbFJzcodzcoh0c4l0c4p1dIujlGrsznr///9wBmqFAAAAvklEQVQYGQXBwQlVSQBFwTq33+DWnUuj0RQmXMNwMzAKgjkI/7dVQYdtrZwyq3xFTlqqtUoP39dOa9apc9pOjXe8cRky8NDN/gcA8HDVj38DAHiYew0AwMNeD78BADy8hk8AAB4W/nwAAHh4nXz+BgDgoejjqXaqp22nHs79lZ0yM2tVgze8BHcBD68zX0yt1Jbp4XrPf6fqbJ72zz1tsN7e6N47eo07eFvBcrnQIPdyXbjyuu7DdOlnZk5Z1V/Roy8hK3ODtwAAAABJRU5ErkJggg==)} 1003#webamp .gen-window.selected .gen-top-left-end {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAByUlEQVRIS7WVPU4DQQyF7Z5cgaVJpAAnIFAk50AcgB4UwQEoKNJQp6GkpKCgp6ShoUFcgCJtkBgj/7zZ2Y0WmmwiZXcnXj97xv7MB+OZCAmJCOlHJNmVbDVuKZE+qI2tmu3mO3g3CRGbpXvg+cUiXoWIO3CdLmcuhK+Lmqytp3iOyIiPj07NQn/YDJJLwIleNTu7hlusFcGojf2PwJCpCPHJ5EzciUuphBkWDk1c11MiYSFKLmYRx/ZqcAiEOAIKUd6thtj6OIHtXgY7FfHX61VvIk8vK7q+fdZjyKe03RTCW7U3Ip5NJ71l8sMr+vz4Jr6/O+9NRJOx7erzTG6W7/Tw+EY8HB32lsl6vabBoCr7xLWs3qPbrYNTsh6xNe2T6GqgCChBMwJN3vXeL7wtdnkve4Ab7NofT4MifwCynV2baTk7F/KmqBHE88uFtQqI2QVFbEPJtQzGIojAZGaY2hSAFEVON7sCgDi3xlkgk2Jc4ExMBIA01uncAIE3KOyzpp49TmeHaaAVpNZocd8QwcDCsCpEbAu0stprGflRlf+hvnuepMY25tkS5dkuYQuknYmXsFdEWYYYvyiERu8U1ZWHdGRV47aurl8JSofPjXVkWwAAAABJRU5ErkJggg==)} 1004#webamp .gen-window.selected .gen-top-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAMAAABPqWaPAAABO1BMVEUeHyUfHzAfHzIgHzEgHzIhIDIhITMhITQiITQiIjUjIjYkIzckIzgkJDklJDolJiwmJTsmJTwmJjsnJj0oJj0oJz4oKD8oKEApKEApKUApKkEqKUAqKUEqKkEqKkIrKUIrKkMrK0QsK0QsLEUsLEYtLUYuLUcuLUguLkcvLkkvL0owL0owMEsxMEwyMU0yMU4zMk8zMlA0MlA0M1E1M1I1NFM2NFM2NVQ2Nhg3NlU3NlY4NVU4NlU4N1c5N1g5OFo6OFk6OVo7OVw7Ols7Olw8OVs8Olw8O10/QitCQTtdVztqanprXUFra3xsa3xsbH5tbX9tboBubYBvboFvb4Jwb4Nxb4RxcIVxcYZycYZzbFJzcodzcoh0c4l0c4p1dIt1dIx2dY13dY6Zc0KjlGqxnVm2nF7sznr///+ZhXPBAAABBUlEQVQYGQXBwYmUURBG0Vv1P90KvWtnQCcBxyBEEAMxKWMSWjQAB2V2DeKyX33Xc+reGY3RoHHeGHHWR1HVMWgUDXxbT5mK3swYkyQab3T3SyAoQFFQIhQAAPA+5iFXOPVls74AADBf30HuOn3+A6wCAGABXPucfr7WMesXAICAkry4hQzrDgAAoIru29FUuQ4AAP6BnM7P6df5LfUKAOAvj5qHXOHU32/Uh9rGnTiaMSapza77HdWEqCbm7Txetj0UIIigJRBkfRJDGKJq5EID6ynHLe4kMTpxAKEPNlBUFRiQAhZtAbgUqgqqJDV0CVCpEqHAojesn5vRyBh0/PyD5tj8B5vM5TGngJW4AAAAAElFTkSuQmCC)} 1005#webamp .gen-window.selected .gen-top-right-end {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAABzUlEQVRIS7VVu04DQQy0lx+gokuQEEjAiXwAJYSCgpIfoE1NgUTLT1KRjh4qKBbN+LF7kIZiL4nusuf1jL32WBeLVVVVwQ+XikoVlYK/WoSreI8PbLBQce/WaOK2bo+99IF9m81ztUdzxsVfDsJh3mnqpLQYuW5v+AjSOp1fV7M3drgXRtY2k2U6McZ87xlQKaLFIjMiET1sRAiSxqpSq0hBnFVFiznPVDkBpAKbiwSQESoB7M/OXnSa1vXjc0ujUZcuD0/qy+ON3F7uj8IQgmzfXocB8HgAcnx0MB4E6Rp5MZL7uwt5ejgdhsPq+vp+HwbAM5nOrqp4P0StQ1as4bxXQgWyQdGQ3njRkJSVUAE0dKE88btcrLIZQwZMFppmWQN38hHPnZ6x61O3vPtdqXSXQCbIzPkcpKmAU+vkpMmTnUIKZM/W0tb0ayaMoXEK7iYvfyJNVfb0/V8gHXymXbYW0fFMeRzQvk4gyb54SvjSWaAo8kCx3kSzF9YAsahCjQNkWuc8gepahjsQT1s/L1oROOBsNMCHRxIKzhLeU9GYdv2M6AbTDIQ6j/gaiM2hVhwsYS+GLOEME8fph5njd2eVtWitHfrq8wnrLf4D9zg6mAHJo5AAAAAASUVORK5CYII=)} 1006#webamp .gen-window.selected .gen-top-left-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU0nT8z0BjwFhe1kd7S2ysY4eJJXLyqrT3yZtzVbS35P///7S3xMnRmvaWLJ6SRXtL6BInqmo6tPcJXTIjXcouulgyWkCSUgUx0iV10cUSeqQuABQNKbDZQyxmAAAAAElFTkSuQmCC)} 1007#webamp .gen-window.selected .gen-top-right-fill {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAAWklEQVRIS2PU0nT8z0BjwFhe1kd7S2ysY4eJJXLyqrT3yZtzVbS35P///7S3xMnRmvaWLJ6SRXtL6BInqmo6tPcJXTIjXcouulgyWkCSUgUx0iV10cUSeqQuABQNKbDZQyxmAAAAAElFTkSuQmCC)} 1008#webamp .gen-window .gen-bottom-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAAOCAMAAAA16ON4AAABfVBMVEUdHS0dHS4dHi4eHS4eHi8fHzAfHzIgHzEgHzIhIDIhITMhITQiITQiIjUjIjYkIzckIzgkJDckJDklJDomJTsmJTwmJjsnJj0oJj0oJz4oKD8oKEApKEApKUApKkEqKUAqKUEqKkEqKkIrKUIrKkMrK0QrLEQsK0MsK0QsLEUsLEYtLUYtLUgtLkctLkguLUcuLUguLkcvLkkvL0ovMEowL0kwL0owMEsxL0wxMEwxMU4yMU0yMU4zMk8zMlA0MlA0M1E0NFE1M1I1NFM1NFQ2NFM2NFQ2NVQ3
1008NlU3NlY4NVU4NlU4N1c5N1g5OFk5OFo6N1k6OFk6OVo7OVw7Ols7Olw8OVs8OVw8Olw8O109O149O2A9PF89PGA+O18+O2A+PF8+PGBqanpra3xsa3xsbH1sbH5tbX9ubX9ubYBuboBvboFvb4Jwb4Nxb4RxcIVxcYZycYZzcYhzcodzcoh0c4l0c4p1dIt1dIx2dY13dY53do54dY94do94d5Ap3ahhAAACBUlEQVQYGQXBAQEYNRAEwNlLig3E4KTCcFK81AZ8bpmJn7/89vOX3z+BgBAEgQyBNARCIEHS2YEICIEAIR0BUsEF8OcvxhhwKxiXKQNxZDCBMGJ0mL3OmhpJwxHBfacmzA4u333+gAGAMQk6PqlkL7tYrnOSWca2CaCb1g5vqESDReG8+koHcOdcHwYAI6SVPWcL+RgMvmA6kEQLdOrMDHYAOHaFxxl3Hxafz6Y9ywAQEZWKTEgVwQB9igVJqkbtpkA84Jl56tjNiaM78F1mtsMAaLSrxWjKTgIB4DQs1Wg13U5p0W3nALrS7TPd/x4MYHZzggGIBmlEvUrYizwLfWvBCAVNNB3zhMYDTo5xfpzPMQ4Bxk7+/f77GEDfiYyXYh3RrO+z3xgcqmWsgkjaRuweNSbn0VIv+rmM82jB4vtxzuUCf5OKQUBgEAiSgATSIBiCwGww0hAkHRyEA0BgAFSwAsDA7iaQAECRYUYCMDvMUBJoAp51AARw4c+/AASIRgTSmEYCIkAIIQ1iEAQEIg0CqVMBBBfrn67rHZEBmWCa+913YcLhwAghaSJx1umI2RwBZ08a15c5zyGBS3NoDGtekTFMmXNm26i6TsyMOk+2BkAlgjUZTM+8tiV7FJ9rzXlPAZv0CQGAMDUNBIaOkCbSEAIiMAEERo1UCCSB67vOOwBR8T8KSRhI0bzb7AAAAABJRU5ErkJggg==)} 1009#webamp .gen-window .gen-bottom-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAAOCAMAAAA16ON4AAABfVBMVEUdHS0dHS4dHi4eHS4eHi8fHzAfHzIgHzEgHzIhIDIhITMhITQiITQiIjUjIjYkIzckIzgkJDklJDomJTkmJTsmJTwmJjsnJj0oJj0oJz4oKD8oKEApKEApKUApKkEqKUAqKUEqKkEqKkIrKUIrKkMrK0QrLEQsK0MsK0QsLEMsLEUsLEYtLUYuLUcuLUguLkcvLkkvL0ovMEowL0owMEsxL0wxMEwyMU0yMU4zMk8zMlA0Mk80MlA0M1E0NFE1M1I1NFM1NFQ2NFM2NFQ2NVQ3NlU3NlY4NVU4NlU4N1c5N1g5OFk5OFo6N1k6OFk6OVo7OVw7Ols7Olw8OVs8OVw8Olw8O109O149O2A9PF89PGA+O18+O2A+PF8+PGBAP1BAQFFAQFJfX3Fqanpra3xrbHxsa3xsbH1sbH5tbX9ubYBuboBvboFvb4Jwb4Nxb4RxcIVxcYZycYZzcYhzcodzcoh0c4l0c4p1dIt1dIx2dY13dY54dY94do94d5CUuEDKAAACKUlEQVQYGQXBwZFdRRAEwKyev3ZwwQ8gFisgdMIPzFlhhLhih2THvukiM3+jqRRolgIKpUAV2KZoU6WgaQGrKQoK3VQBvvH7Nz9e39nZ7ezsPJoFrni8PvOgNNUV91y7s21xqaaqWM2dy5qVLS12Ps3q1sL7v2Awd/u6Y56XmHB7N4960mOKVDO1uSwlSgsKjNQeZuhKStg9lkwM3i8wcPblwIOGfbzdFy6bfQFbaXtqZg+ROxEqBJ0ai91AUTvjhZox3u8HMKg8l31AlrfxibfXMHPQclzJubnWbTasVChFsFPQQXTgU6GM9/vxBRikk6zxAuHOcfAElAjS7dUTkxjOGBBgl1nAYjMLbxYhftt/vlxgIIfBA8rJTXa9WstC3UwS4s6dAl2ECjS7xI6Kxk6wDcT+0q9/7gcwwNnxvEAHV9t5PkPbCeFYHfSsG6gUGEV0UGMiomkhCeLXfvzZr1+A/ExTAFw8xwVdKIU1XdhZilIKFKWxpdGdsqBA2Ub565sfgzQAwHMu0AIKTAErSAMAKNJt0AoMAHsVLeD1B1QKaNEoqIJCUWiVpkpTTaEFbKooFLUACsDrO2zhARaXDg+3zNWUS+fiZnVn6ZaiTVk2FyzZplqWO4srzTaes2NgZ7AvUNyj1kOHc0mDmTjIIo2aCTQpRrOCDSvbbcApbaapcd2s13/QFMDlOXmgNtqURq1Ys3aWRosWUAW1qaZZDQuF7qkt+Gke/wNCVMxEPwTsWgAAAABJRU5ErkJggg==)} 1010#webamp .gen-window .gen-bottom {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAOAgMAAACnVF/TAAAACVBMVEUrKkM+PGB4d5A1hmUAAAAAGElEQVQI12NYBQYNDKFg4EAyjQ5wmQcFAFaEHSfLt0cNAAAAAElFTkSuQmCC)} 1011#webamp .gen-window .gen-middle-left {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAdAgMAAAABTX4zAAAACVBMVEUdHS0qKUBqanoMSFahAAAAD0lEQVQI12NQ5QxhoDMGAFFyDru7vcmtAAAAAElFTkSuQmCC)} 1012#webamp .gen-window .gen-middle-left-bottom {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAYAgMAAABRgO+AAAAACVBMVEUdHS0qKUBqanoMSFahAAAAD0lEQVQI12NQ5QxhoCEGAEUWDDHkAu/CAAAAAElFTkSuQmCC)} 1013#webamp .gen-window .gen-middle-right {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAdAgMAAADqesUwAAAACVBMVEUdHS0qKUBqanoMSFahAAAADklEQVQI12OYOoWBBggAuDohplXr188AAAAASUVORK5CYII=)} 1014#webamp .gen-window .gen-middle-right-bottom {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAYAgMAAAC6t1SDAAAACVBMVEUdHS0qKUBqanoMSFahAAAADklEQVQI12OYOoWBGggA6uEb2fBejlkAAAAASUVORK5CYII=)} 1015#webamp .gen-window .gen-close.winamp-active {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJBAMAAAASvxsjAAAAElBMVEU6MSljXjtsXUORbkq0kWP////9IyyfAAAAKUlEQVQI12NwAQIHBicBBiEHBkcmIUYHBgcFAwUgKRwsAGNDxCFqwOoB1gEH67W94+0AAAAASUVORK5CYII=)} 1016#webamp .character-48 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12NIYJjAsIHhApBMAAAULANhy/alSwAAAABJRU5ErkJggg==)} 1017#webamp .character-49 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAD0lEQVQI12NQYEhgUIBAAAbMAQE/4OmzAAAAAElFTkSuQmCC)} 1018#webamp .character-50 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12N4wCAAhAkMDQwfAA78AtFOxm3MAAAAAElFTkSuQmCC)} 1019#webamp .character-51 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWP4wKDAkMAgwDCBIQEAEHwCcej/ubUAAAAASUVORK5CYII=)} 1020#webamp .character-52 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWNQYEhgWMDwgUGBQQEADlwCUbptSVYAAAAASUVORK5CYII=)} 1021#webamp .character-53 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12P4wNDA8IBBAAgfAAAWXANRkouswAAAAABJRU5ErkJggg==)} 1022#webamp .character-54 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NIYGhgeMAwAQgTABOsA0E/JWQ/AAAAAElFTkSuQmCC)} 1023#webamp .character-55 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12P4wCDAoMDgAIIADgwB4bVklkQAAAAASUVORK5CYII=)} 1024#webamp .character-56 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQI12NIYJjAAMJAEgAQvALRax9yugAAAABJRU5ErkJggg==)} 1025#webamp .character-57 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NIYJgAhAUMAgwJAA/sAmFIDiRPAAAAAElFTkSuQmCC)} 1026#webamp .character-97 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12NIYJjA8AGIgRAAFNwDkUdAkdwAAAAASUVORK5CYII=)} 1027#webamp .character-98 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQI12N4wDCBAYSBJAAaPARRW/xs+gAAAABJRU5ErkJggg==)} 1028#webamp .character-99 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NIYJjA0ACEExgSABFMAuEl/r42AAAAAElFTkSuQmCC)} 1029#webamp .character-100 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIUlEQVQYV2NkeMTwnwEG5CAMRrAglMPwiIEBxKaKIJpFADZCEAGAIkAWAAAAAElFTkSuQmCC)} 1030#webamp .character-101 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12P4wNDA8ACIGxg+AAAZ7ARBle8LfgAAAABJRU5ErkJggg==)} 1031#webamp .character-102 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12P4wNDA8ACIgRAAGXwD0QArRQgAAAAASUVORK5CYII=)} 1032#webamp .character-103 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12MoYGhg2MAwAQgTABMMAyEYrKesAAAAAElFTkSuQmCC)} 1033#webamp .character-104 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIklEQVQYV2NkeMTwn0GOAQIeMTCA2Iy4BaEKwRR+lcSYCQBnQhEB2omL+AAAAABJRU5ErkJggg==)} 1034#webamp .character-105 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADklEQVQI12MoYFCAwgIACEwBYXIvChIAAAAASUVORK5CYII=)} 1035#webamp .character-106 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQI12MQYADBCUCYAAAGnAGx9K9L/wAAAABJRU5ErkJggg==)} 1036#webamp .character-107 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12OYwLCA4QAQLmCYAAAXTAPhR2cHZQAAAABJRU5ErkJggg==)} 1037#webamp .character-108 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAGUlEQVQYV2NkeMTwn0GOAQUw0kwQ2RqgpQBKiwwB5wSvgwAAAABJRU5ErkJggg==)} 1038#webamp .character-109 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIUlEQVQYV2NkeMTwn0GOAQIeMTCA2IxgQWSAXxCrdmIEAQtSEAH0ktA/AAAAAElFTkSuQmCC)} 1039#webamp .character-110 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12OYwMTAcIHpARAyAAATGAMpx84ilAAAAABJRU5ErkJggg==)} 1040#webamp .character-111 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADklEQVQI12NIYJgAhQkAEgw
1040DAakOOnUAAAAASUVORK5CYII=)} 1041#webamp .character-112 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12N4wDCB4QFDAwgCABlcA9Fh/HqiAAAAAElFTkSuQmCC)} 1042#webamp .character-113 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAE0lEQVQI12NIYJgAhBcYNjAUAAATvANxqBzBZwAAAABJRU5ErkJggg==)} 1043#webamp .character-114 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12N4wKzA8IAJBD8AABkSBJqXbNZ9AAAAAElFTkSuQmCC)} 1044#webamp .character-115 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12MoYGhgSGAQAMIHAA1cAlFD9hA9AAAAAElFTkSuQmCC)} 1045#webamp .character-116 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADUlEQVQI12MoYFCAQQAH/AERspkQDgAAAABJRU5ErkJggg==)} 1046#webamp .character-117 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADUlEQVQI12OYwACDCQAUHAMxvRgSGgAAAABJRU5ErkJggg==)} 1047#webamp .character-118 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAD0lEQVQI12OYwACBCQwJABOMAwEw9lTJAAAAAElFTkSuQmCC)} 1048#webamp .character-119 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQI12OYwACCH4BwAgAXTAQhMxLiQgAAAABJRU5ErkJggg==)} 1049#webamp .character-120 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12OYwDCBIQEIgTQAEgwDAb4oAK0AAAAASUVORK5CYII=)} 1050#webamp .character-121 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12OYwDCBIYFBAQQBDwwB4W/sEnMAAAAASUVORK5CYII=)} 1051#webamp .character-122 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWP4wCDAoMDgwNDA8AEAD3wC0QyxJxkAAAAASUVORK5CYII=)} 1052#webamp .character-34 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADUlEQVQIHWMIYGKAAQADkABTwIHJLQAAAABJRU5ErkJggg==)} 1053#webamp .character-64 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12OQYFBgiABCBQYJAAbMASFkTTvgAAAAAElFTkSuQmCC)} 1054#webamp .character-32 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAE0lEQVQYV2NkYGD4z4AGGOklCAChpQYBD5K5XgAAAABJRU5ErkJggg==)} 1055#webamp .character-8230 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAC0lEQVQIHWNAgBUAALQAqf6ZnokAAAAASUVORK5CYII=)} 1056#webamp .character-46 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAGUlEQVQYV2NkYGD4z4AGGGki+AhqkRzCNgCztQcBQ/F5qwAAAABJRU5ErkJggg==)} 1057#webamp .character-58 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAG0lEQVQYV2NkYGD4z4AGGHELPoIqlYPQFKoEABHUCAEa7xBFAAAAAElFTkSuQmCC)} 1058#webamp .character-40 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NgYBBgUABCAQYGAAJMAGFQC8mLAAAAAElFTkSuQmCC)} 1059#webamp .character-41 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NgYGhgcADCBgYGAAkMAYFEejkbAAAAAElFTkSuQmCC)} 1060#webamp .character-45 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAG0lEQVQYV2NkYGD4z4AGGEkQfISmXY6BgXjtANzFBwGYHC/oAAAAAElFTkSuQmCC)} 1061#webamp .character-39 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAADUlEQVQIHWNQYGKAAQABgAAjjGgVVgAAAABJRU5ErkJggg==)} 1062#webamp .character-33 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAH0lEQVQYV2NkYGD4z/CIgYFBjgEOGKkhiDAOzMJqJgAQawsBnvEUjAAAAABJRU5ErkJggg==)} 1063#webamp .character-95 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAFklEQVQYV2NkYGD4z4AGGGki+AjTIgCyawbjsVUKxAAAAABJRU5ErkJggg==)} 1064#webamp .character-43 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEUlEQVQI12NQYGJg+MEAIhkACPABPfEgkLEAAAAASUVORK5CYII=)} 1065#webamp .character-92 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAD0lEQVQI12NgYGhgZoBAAATIAI13IxiAAAAAAElFTkSuQmCC)} 1066#webamp .character-47 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWNgYOBgEGBQYHBgaAAAAqQA+cACQKYAAAAASUVORK5CYII=)} 1067#webamp .character-91 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAHUlEQVQYV2NkYGD4z/CIAQLkIBQjXBAqQFVBJIsAMwMMAVy4DMAAAAAASUVORK5CYII=)} 1068#webamp .character-93 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIElEQVQYV2NkYGD4zwACj8AkA4McAwMjXBAmQU1BJIsACwMMAZBptUcAAAAASUVORK5CYII=)} 1069#webamp .character-94 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQIHWNQYAhg6GAAAwAH9AD5R+QUOwAAAABJRU5ErkJggg==)} 1070#webamp .character-38 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NQYAhgUGCIAJIaAAfsAWHaIpwJAAAAAElFTkSuQmCC)} 1071#webamp .character-37 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWNIYMhgEGBQYIhgkAAACgQBacCa
1071DW0AAAAASUVORK5CYII=)} 1072#webamp .character-44 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAHklEQVQYV2NkYGD4z4AGGKkl+IiBgUEOYjjCTCRBAMu1CAHlOP+DAAAAAElFTkSuQmCC)} 1073#webamp .character-61 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAH0lEQVQYV2NkYGD4z4AGGMGCj5BE5RgYIIIUqkTTDgA65AgBoymWoAAAAABJRU5ErkJggg==)} 1074#webamp .character-36 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NQYChgSGAwAJIKAApcAbE85GZ1AAAAAElFTkSuQmCC)} 1075#webamp .character-35 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAD0lEQVQI12NIYPjAAMEMABUMAwFxUzDLAAAAAElFTkSuQmCC)} 1076#webamp .character-197 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEklEQVQI12NIYJjAAMIfGCYAABIMA2Fjj6V0AAAAAElFTkSuQmCC)} 1077#webamp .character-214 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAEElEQVQI12OYwJDAMAEMEwASbAMBKm1nAQAAAABJRU5ErkJggg==)} 1078#webamp .character-196 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWOYwMDAkMAwgeEDwwQADwwDAcWvnbkAAAAASUVORK5CYII=)} 1079#webamp .character-63 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWNIYJjAIMCQwMDAkAAAC+wBwX8tiscAAAAASUVORK5CYII=)} 1080#webamp .character-42 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGAQMAAAAxNcYIAAAABlBMVEUAAAAA4gDJLyihAAAAFElEQVQIHWNgYFBgeMBQwODAwAAACjwBsYRIp8kAAAAASUVORK5CYII=)} 1081#webamp .character-60 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAHUlEQVQYV2NkYGD4z/CIAQLkIBQjXBAqQFVBJIsAMwMMAVy4DMAAAAAASUVORK5CYII=)} 1082#webamp .character-62 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIElEQVQYV2NkYGD4zwACj8AkA4McAwMjXBAmQU1BJIsACwMMAZBptUcAAAAASUVORK5CYII=)} 1083#webamp .character-123 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAHUlEQVQYV2NkYGD4z/CIAQLkIBQjXBAqQFVBJIsAMwMMAVy4DMAAAAAASUVORK5CYII=)} 1084#webamp .character-125 {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAGCAYAAAAL+1RLAAAAIElEQVQYV2NkYGD4zwACj8AkA4McAwMjXBAmQU1BJIsACwMMAZBptUcAAAAASUVORK5CYII=)} 1085#webamp .gen-text-a {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAGFBMVEUpKUA3N01bW21iYnN4eIZ/f4yNjZmUlKDQ9WnQAAAAIUlEQVQIHWMAAcZyAQamdAUGVrMABnGVQgY11yKGIIZUACkrA92ildtqAAAAAElFTkSuQmCC)} 1086#webamp .gen-window.selected .gen-text-a {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAGFBMVEUpKUBGRlmNjZmbm6bGxszU1Nnx8fL///8iRh7bAAAAIUlEQVQIHWMAAcZyAQamdAUGVrMABnGVQgY11yKGIIZUACkrA92ildtqAAAAAElFTkSuQmCC)} 1087#webamp .gen-text-b {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAHlBMVEUpKUAxMUdGRlliYnNqanpwcIB4eIZ/f4yNjZmUlKBMQpI+AAAAIUlEQVQI12NgAAHOmVOARIKlAgNnWyuQVRQuAOXOnMoAAFkvBehWf7S3AAAAAElFTkSuQmCC)} 1088#webamp .gen-window.selected .gen-text-b {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAHlBMVEUpKUA3N01iYnObm6apqbO4uL/GxszU1Nnx8fL////s2d+PAAAAIUlEQVQI12NgAAHOmVOARIKlAgNnWyuQVRQuAOXOnMoAAFkvBehWf7S3AAAAAElFTkSuQmCC)} 1089#webamp .gen-text-c {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJ1BMVEUpKUAxMUc3N00/P1NGRllUVGZbW21qanpwcIB4eIaGhpONjZmUlKBrx3tvAAAAJUlEQVQI12NgAAHWNZMZGHQSdzAw5DgwgAgFBgabgk6gxJ7JDABjoQaLYu6ObAAAAABJRU5ErkJggg==)} 1090#webamp .gen-window.selected .gen-text-c {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJ1BMVEUpKUA3N01GRllUVGZiYnN/f4yNjZmpqbO4uL/Gxszi4ubx8fL///9AK9zxAAAAJUlEQVQI12NgAAHWNZMZGHQSdzAw5DgwgAgFBgabgk6gxJ7JDABjoQaLYu6ObAAAAABJRU5ErkJggg==)} 1091#webamp .gen-text-d {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAElBMVEUpKUBUVGZbW214eIaNjZmUlKBPxwelAAAAG0lEQVQI12NgAALTEAUGU6ZABlOGYAgGsUMUACkqA3OelxceAAAAAElFTkSuQmCC)} 1092#webamp .gen-window.selected .gen-text-d {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAElBMVEUpKUB/f4yNjZnGxszx8fL///90u0SbAAAAG0lEQVQI12NgAALTEAUGU6ZABlOGYAgGsUMUACkqA3OelxceAAAAAElFTkSuQmCC)} 1093#webamp .gen-text-e {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUA3N00/P1NGRllUVGZbW214eIZ/f4yNjZmUlKBpF6uKAAAAH0lEQVQI12NgAALOmVMZOBOAdJsDA2exABAbAcWmAQA4DwTidXJmqwAAAABJRU5ErkJggg==)} 1094#webamp .gen-window.selected .gen-text-e {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUBGRllUVGZiYnN/f4yNjZnGxszU1Nnx8fL//
1094/+DgC81AAAAH0lEQVQI12NgAALOmVMZOBOAdJsDA2exABAbAcWmAQA4DwTidXJmqwAAAABJRU5ErkJggg==)} 1095#webamp .gen-text-f {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAElBMVEUpKUA3N01GRllbW21qanqUlKC2H8YaAAAAGklEQVQI12NgAALT0CAGUwUg7SwAwSC2AgMAKTIC7Ms0rr0AAAAASUVORK5CYII=)} 1096#webamp .gen-window.selected .gen-text-f {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAElBMVEUpKUBGRlliYnONjZmpqbP///9D5gpdAAAAGklEQVQI12NgAALT0CAGUwUg7SwAwSC2AgMAKTIC7Ms0rr0AAAAASUVORK5CYII=)} 1097#webamp .gen-text-g {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAIVBMVEUpKUA/P1NGRllUVGZbW21wcIB4eIZ/f4yGhpONjZmUlKCnwN9hAAAAJ0lEQVQIHWMAA8aqZgYGzoQoAQYtBwYGBi2XVQoMnAVeCgyMXa0KAE4GBYcb4B3nAAAAAElFTkSuQmCC)} 1098#webamp .gen-window.selected .gen-text-g {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAIVBMVEUpKUBUVGZiYnN/f4yNjZm4uL/GxszU1Nni4ubx8fL///+LwSrlAAAAJ0lEQVQIHWMAA8aqZgYGzoQoAQYtBwYGBi2XVQoMnAVeCgyMXa0KAE4GBYcb4B3nAAAAAElFTkSuQmCC)} 1099#webamp .gen-text-h {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJFBMVEUpKUBwcIBycoGCgo+hoauqqrO3t767u8O8vMPDw8nGxszKytD26YaTAAAAGElEQVQI12NgAAJphQoITl3BIO08A8YHADj6BOvV9DaxAAAAAElFTkSuQmCC)} 1100#webamp .gen-window.selected .gen-text-h {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAFVBMVEUpKUCrq7TDw8no6Ovw8PH5+fr///9e3zXEAAAAFklEQVQI12NgAAIxgTQIDgFiozQYHwAqqAOv6ufnjgAAAABJRU5ErkJggg==)} 1101#webamp .gen-text-i {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAFVBMVEUhITkkJDxra3xwcIBycoF6eoiCgo8pCsaXAAAAFUlEQVQI12MQEGQQCoQi4UQGERACABeTAqlm5PZ5AAAAAElFTkSuQmCC)} 1102#webamp .gen-window.selected .gen-text-i {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAFVBMVEUkJDwxMULAwMfDw8ne3uHh4eXl5ehBk9l/AAAAFUlEQVQI12NgFGBgcgCjAAZmCEoAABAKAfHk6DTHAAAAAElFTkSuQmCC)} 1103#webamp .gen-text-j {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAGFBMVEUpKUAxMUdGRllNTWBUVGZ4eIaNjZmUlKAAywzwAAAAE0lEQVQI12NgAIFSVCwCxOrJDAAh4QLodMJ9awAAAABJRU5ErkJggg==)} 1104#webamp .gen-window.selected .gen-text-j {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAGFBMVEUpKUA3N01iYnNwcIB/f4zGxszx8fL///+/0FlwAAAAE0lEQVQI12NgAIFSVCwCxOrJDAAh4QLodMJ9awAAAABJRU5ErkJggg==)} 1105#webamp .gen-text-k {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAHlBMVEUpKUAxMUc/P1NGRllNTWBUVGZbW22GhpONjZmUlKC0yuawAAAAIklEQVQI12NgAIFM00lAIiMBSHQGAImKAiDhNhVIGLYzAABxtgda2evVPQAAAABJRU5ErkJggg==)} 1106#webamp .gen-window.selected .gen-text-k {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAHlBMVEUpKUA3N01UVGZiYnNwcIB/f4yNjZni4ubx8fL////1B4EGAAAAIklEQVQI12NgAIFM00lAIiMBSHQGAImKAiDhNhVIGLYzAABxtgda2evVPQAAAABJRU5ErkJggg==)} 1107#webamp .gen-text-l {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHBAMAAAAyiZrdAAAAElBMVEUpKUAxMUdGRll4eIZ/f4yUlKDDTNTnAAAAFUlEQVQI12NgAIJgNByiJMAQGqoAABtZAp1Ff+GZAAAAAElFTkSuQmCC)} 1108#webamp .gen-window.selected .gen-text-l {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAMklEQVQYV2PU1HT4z4AGGP//////+PGzDMnJJXApaghevXqLoa9vFthMEBtsJrLlIAsBN0svzTt3mzcAAAAASUVORK5CYII=)} 1109#webamp .gen-text-m {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHBAMAAADHdxFtAAAAIVBMVEUpKUAxMUdGRllUVGZbW21iYnNwcIB4eIZ/f4yGhpOUlKBZcblpAAAAI0lEQVQI12NgAAGtJZzLGbRWaAGJrjIg4bUYSGguBBKqCcsBjp0JorkYhMsAAAAASUVORK5CYII=)} 1110#webamp .gen-window.selected .gen-text-m {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHBAMAAADHdxFtAAAAIVBMVEUpKUA3N01iYnN/f4yNjZmbm6a4uL/GxszU1Nni4ub////cS6NmAAAAI0lEQVQI12NgAAGtJZzLGbRWaAGJrjIg4bUYSGguBBKqCcsBjp0JorkYhMsAAAAASUVORK5CYII=)} 1111#webamp .gen-text-n {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUAxMUc3N01GRllNTWBiYnNwcIB4eIaNjZmUlKCfa5y8AAAAIElEQVQI12NgAIIK5clMjA4MTP+NgPgKAxPDeiB+wwAASdwGGeDXGZQAAAAASUVORK5CYII=)} 1112#webamp .gen-window.selected .gen-text-n {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUA3N01GRlliYnNwcICbm6a4uL/Gxszx8fL///8Fv7lnAAAAIElEQVQI12NgAIIK5clMjA4MTP+NgPgKAxPDeiB+wwAASdwGGeDXGZQAAAAASUVORK5CYII=)} 1113#webamp .gen-text-o {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUA/P1NGRllUVGZbW214eIZ/f4yGhpONjZmUlKDmamWaAAAAHElEQVQI12NgAAKx6QYMrSwTGaYwTQFjEBsoBgBK6AZDMgIWOQAAAABJRU5ErkJggg==)} 1114#webamp .gen-window.selected .gen-text-o {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAHlBMVEUpKUBUVGZiYnN/f4yNjZnGxszU1Nni4ubx8fL////xzWRAAAAAHElEQVQI12NgAAKx6QYMrSwTGaYwTQFjEBsoBgBK6AZDMgIWOQAAAABJRU5ErkJggg==)} 1115#webamp .gen-text-p {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJ1BMVEUpKUAxMUc/P1NGRllNTWBbW21iYnNqanpwcIB4eIZ/f4yGhpOUlKBLTaK7AAAAIElEQVQI12NgAIKYM5sYYgxPMMSEHGeIWZnIEGPAAMIAZzYHJUki1qIAAAAASUVORK5CYII=)} 1116#webamp .gen-window.selected .gen-text-p {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJ1BMVEUpKUA3N01UVGZiYnNwcICNjZmbm6apqbO4uL/GxszU1Nni4ub////2OqNjAAAAIElEQVQI12NgAIKYM5sYYgxPMMSEHGeIWZnIEGPAAMIAZzYHJUki1qIAAAAASUVORK5CYII=)} 1117#webamp .gen-text-q {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJFBMVEUpKUA3N00/P1NGRllUVGZbW214eIZ/f4yGhpONjZmSkp6UlKAHPYNOAAAAI0l
1117EQVQI12NgAAGm6hYGBs6EaAEG6wDrAAjBmdBtAJTY1QAAWmwG3UPBF3oAAAAASUVORK5CYII=)} 1118#webamp .gen-window.selected .gen-text-q {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJ1BMVEUpKUBGRllUVGZiYnN/f4yNjZm4uMDGxszU1Nni4ubx8fL7+/v////Rx7x8AAAAI0lEQVQI12NgAAGmnikMDFwFMQIMNgE2ARCCq2COAVDidAIAYQkHOMhnyMoAAAAASUVORK5CYII=)} 1119#webamp .gen-text-r {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJ1BMVEUpKUAxMUc3N01GRllUVGZbW21qanpwcIB4eIZ/f4yGhpONjZmUlKDditvQAAAAIklEQVQI12NgAAGbM1uARMAcILHiJJBIPwQkQo4AicCTDACHOAih1LnoFgAAAABJRU5ErkJggg==)} 1120#webamp .gen-window.selected .gen-text-r {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJ1BMVEUpKUA3N01GRlliYnN/f4yNjZmpqbO4uL/GxszU1Nni4ubx8fL///9vCc2uAAAAIklEQVQI12NgAAGbM1uARMAcILHiJJBIPwQkQo4AicCTDACHOAih1LnoFgAAAABJRU5ErkJggg==)} 1121#webamp .gen-text-s {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJFBMVEUpKUAxMUc/P1NGRllUVGZbW21qanpwcIB4eIaGhpONjZmUlKCHjnJIAAAAIklEQVQIHWMAAY1dAQzVygoM1TsDGMRmb2IIZdvE4LnLAQBTHAco/pVKOwAAAABJRU5ErkJggg==)} 1122#webamp .gen-window.selected .gen-text-s {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJFBMVEUpKUA3N01UVGZiYnN/f4yNjZmpqbO4uL/Gxszi4ubx8fL///+qJyS0AAAAIklEQVQIHWMAAY1dAQzVygoM1TsDGMRmb2IIZdvE4LnLAQBTHAco/pVKOwAAAABJRU5ErkJggg==)} 1123#webamp .gen-text-t {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAALklEQVQYV2PU0XH+z4AGGCdMmIMpqKZq819FVZHBzc2eYfXqLQyvX71hYKSBIACnryn7i49aBgAAAABJRU5ErkJggg==)} 1124#webamp .gen-window.selected .gen-text-t {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHAgMAAAC9yW99AAAADFBMVEUpKUBUVGZycoH///9VDRy9AAAAE0lEQVQI12NgYGD4f4BBlwEZAQAkDAKhcYNEwQAAAABJRU5ErkJggg==)} 1125#webamp .gen-text-u {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAFVBMVEUpKUAxMUdGRllUVGZbW21qanqUlKDA77WeAAAAFklEQVQI12NgAAI3hRRUHJLMIJoWAAA5UATxAlDxBQAAAABJRU5ErkJggg==)} 1126#webamp .gen-window.selected .gen-text-u {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAFVBMVEUpKUA3N01iYnN/f4yNjZmpqbP///8SF7O4AAAAFklEQVQI12NgAAI3hRRUHJLMIJoWAAA5UATxAlDxBQAAAABJRU5ErkJggg==)} 1127#webamp .gen-text-v {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAKlBMVEUpKUAxMUc/P1NGRllNTWBUVGZbW21iYnNqanpwcIB4eIaGhpONjZmUlKDthvA2AAAAIklEQVQIHWMAAd8EWQaeDTEMHJeWMzDfvMTAsHcDA0NtAgBSrAdcNQnv8gAAAABJRU5ErkJggg==)} 1128#webamp .gen-window.selected .gen-text-v {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAKlBMVEUpKUA3N01UVGZiYnNwcIB/f4yNjZmbm6apqbO4uL/Gxszi4ubx8fL///81zHafAAAAIklEQVQIHWMAAd8EWQaeDTEMHJeWMzDfvMTAsHcDA0NtAgBSrAdcNQnv8gAAAABJRU5ErkJggg==)} 1129#webamp .gen-text-w {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHBAMAAADHdxFtAAAALVBMVEUpKUAxMUc3N00/P1NGRllNTWBUVGZbW21iYnNqanpwcIB4eIZ/f4yNjZmUlKD3PA89AAAAKUlEQVQIHWMAg3nqT/wY8rKfdzPIzXt9nIHnXd9jBo7XcRcYWJ7zLQAAwo4M1uKKXVEAAAAASUVORK5CYII=)} 1130#webamp .gen-window.selected .gen-text-w {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHBAMAAADHdxFtAAAALVBMVEUpKUA3N01GRllUVGZiYnNwcIB/f4yNjZmbm6apqbO4uL/GxszU1Nnx8fL///+8HCoLAAAAKUlEQVQIHWMAg3nqT/wY8rKfdzPIzXt9nIHnXd9jBo7XcRcYWJ7zLQAAwo4M1uKKXVEAAAAASUVORK5CYII=)} 1131#webamp .gen-text-x {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJFBMVEUpKUAxMUc3N01GRllNTWBbW21iYnNwcIB4eIaGhpONjZmUlKDqWCJLAAAAJElEQVQI12NgAAHJiVECDMzbtwCZ2Q0gYhEDA/PWHUCJhOwAAGilBx+T4WwNAAAAAElFTkSuQmCC)} 1132#webamp .gen-window.selected .gen-text-x {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHBAMAAAA2fErgAAAAJFBMVEUpKUA3N01GRlliYnNwcICNjZmbm6a4uL/Gxszi4ubx8fL///+x/boCAAAAJElEQVQI12NgAAHJiVECDMzbtwCZ2Q0gYhEDA/PWHUCJhOwAAGilBx+T4WwNAAAAAElFTkSuQmCC)} 1133#webamp .gen-text-y {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJFBMVEUpKUAxMUc/P1NGRllNTWBUVGZbW21iYnN4eIaGhpONjZmUlKAsqFJVAAAAHklEQVQI12NgAIIdrJsYsrMKGDh3CTCwbGNgYIZgAE8aBbSrMTxDAAAAAElFTkSuQmCC)} 1134#webamp .gen-window.selected .gen-text-y {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHBAMAAADZviHeAAAAJFBMVEUpKUA3N01UVGZiYnNwcIB/f4yNjZmbm6bGxszi4ubx8fL///+UuWJCAAAAHklEQVQI12NgAIIdrJsYsrMKGDh3CTCwbGNgYIZgAE8aBbSrMTxDAAAAAElFTkSuQmCC)} 1135#webamp .gen-text-z {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAHBAMAAAAsQKpuAAAAIVBMVEUAAAApKUAxMUc/P1NGRllbW21qanp4eIZ/f4yGhpOUlKAeeVtyAAAAAXRSTlMAQObYZgAAACdJREFUCNdjEBQUYACCqlULQJRgVgCIElkBFtRcDKaiShxA1CqwEgClfwdsfnJFGQAAAABJRU5ErkJggg==)} 1136#webamp .gen-window.selected .gen-text-z {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAHBAMAAAAsQKpuAAAAIVBMVEUAAAApKUA3N01UVGZiYnONjZmpqbPGxszU1Nni4ub///8EpbEBAAAAAXRSTlMAQObYZgAAACdJREFUCNdjEBQUYACCqlULQJRgVgCIElkBFtRcDKaiShxA1CqwEgClfwdsfnJFGQAAAABJRU5ErkJggg==)} 1137#webamp .gen-text-a {width: 6px;} 1138#webamp .selected .gen-text-a {width: 6px;} 1139#webamp .gen-text-b {width: 7px;} 1140#webamp .selected .gen-text-b {width: 7px;} 1141#webamp .gen-text-c {width: 7px;} 1142#webamp .selected .gen-text-c {width: 7px;} 1143#webamp .gen-text-d {width: 6px;} 1144#webamp .selected .gen-text-d {width: 6px;} 1145#webamp .gen-text-e {width: 6px;} 1146#webamp .selected .gen-text-e {width: 6px;} 1147#webamp .gen-text-f {width: 6px;} 1148#webamp .selected .gen-text-f {width: 6px;} 1149#webamp .gen-text-g {width: 7px;} 1150#webamp .selected .gen-text-g {width: 7px;} 1151#webamp .gen-text-h {width: 6px;} 1152#webamp .selected .gen-text-h {width: 6px;} 1153#webamp .gen-text-i {width: 4px;} 1154#webamp .selected .gen-text-i {width: 4px;} 1155#webamp .gen-text-j {width: 6px;} 1156#webamp .selected .gen-text-j {width: 6px;} 1157#webamp .gen-text-k {width: 7px;} 1158#webamp .selected .gen-text-k {width: 7px;} 1159#webamp .gen-text-l {width: 5px;} 1160#webamp .selected .gen-text-l {width: 5px;} 1161#webamp .gen-text-m {width: 8px;} 1162#webamp .selected .gen-text-m {width: 8px;} 1163#webamp .gen-text-n {width: 6px;} 1164#webamp .selected .gen-text-n {width: 6px;} 1165#webamp .gen-text-o {width: 6px;} 1166#webamp .selected .gen-text-o {width: 6px;} 1167#webamp .gen-text-p {width: 6px;} 1168#webamp .selected .gen-text-p {width: 6px;} 1169#webamp .gen-text-q {width: 7px;} 1170#webamp .selected .gen-text-q {width: 7px;} 1171#webamp .gen-text-r {width: 7px;} 1172#webamp .selected .gen-text-r {width: 7px;} 1173#webamp .gen-text-s {width: 6px;} 1174#webamp .selected .gen-text-s {width: 6px;} 1175#webamp .gen-text-t {width: 5px;} 1176#webamp .selected .gen-text-t {width: 5px;} 1177#webamp .gen-text-u {width: 6px;} 1178#webamp .selected .gen-text-u {width: 6px;} 1179#webamp .gen-text-v {width: 6px;} 1180#webamp .selected .gen-text-v {width: 6px;} 1181#webamp .gen-text-w {width: 8px;} 1182#webamp .selected .gen-text-w {width: 8px;} 1183#webamp .gen-text-x {width: 7px;} 1184#webamp .selected .gen-text-x {width: 7px;} 1185#webamp .gen-text-y {width: 6px;} 1186#webamp .selected .gen-text-y {width: 6px;} 1187#webamp .gen-text-z {width: 11px;} 1188#webamp .selected .gen-text-z {width: 11px;} 1189#webamp #title-bar #close {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAIgAAAAAAAAAAAAAAAf4AACAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAADwAAAAAAAAAAAAf/gAAAAA8AAAAAAAAAAAAH//iIiAAPAAAAAAAAAAAAB//4iIAADwAAAAAAAAAAAAf/iIgAAA8AAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+HP//3hz//8w8///EP///wHz//8AE///ADP//wBz//8A8///AfP//wP///8H////D////x////8/////f////w==), auto} 1190#webamp #equalizer-window .band {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPcAAAAAAAAAAAAAAAAAAA/3cAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAAAAAAAAAAAAAAAAAAj3AAAA9wAAAAAAAAAAgACPcAAAAPcAAAAAAAAAAIcAj3AAAAAAAAAAAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAA/3cAAAAAAAAACP/3d3AAAA9wAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////////////////////8////+H///jA///wwP//8P///+Hz//3h4f/8w+H//EPz//wH///8AED
1190//ADA//wB4f/8A/P//Af///wP///8H////D////x////8/////f////w==), auto} 1191#webamp #equalizer-window .title-bar {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAAAAAAP93AAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAP93AAAAAAAACP/3d3AAAAAPcAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////P////h///jwP//w8D//8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AHA//ADwP/wB+H/8A/z//Af///wP///8H////D////x////8/////f////w==), auto} 1192#webamp #equalizer-window.shade {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAAAAAAP93AAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAP93AAAAAAAACP/3d3AAAAAPcAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////P////h///jwP//w8D//8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AHA//ADwP/wB+H/8A/z//Af///wP///8H////D////x////8/////f////w==), auto} 1193#webamp #equalizer-window.shade input {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAAAAAAP93AAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAP93AAAAAAAACP/3d3AAAAAPcAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////P////h///jwP//w8D//8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AHA//ADwP/wB+H/8A/z//Af///wP///8H////D////x////8/////f////w==), auto} 1194#webamp .window {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAAAAAAAAAAAAAAAAf/gAAAAAAAAAAAAAAAAAAH//iIiAAAAAAAAAAAAAAAB//4iIAAAAAAAAAAAAAAAAf/iIgAAAAAAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+H///3h///8w////EP///wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1195#webamp .window input {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAAAAAAAAAAAAAAAAf/gAAAAAAAAAAAAAAAAAAH//iIiAAAAAAAAAAAAAAAB//4iIAAAAAAAAAAAAAAAAf/iIgAAAAAAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+H///3h///8w////EP///wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1196#webamp #main-window {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAAAAAAAAAAAAAAAAf/gAAAAAAAAAAAAAAAAAAH//iIiAAAAAAAAAAAAAAAB//4iIAAAAAAAAAAAAAAAAf/iIgAAAAAAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+H///3h///8w////EP///wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1197#webamp #main-window.shade #title-bar {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAAAAAAAAAAAAAAAAf/gAAAAAAAAAAAAAAAAAAH//iIiAAAAAAAAAAAAAAAB//4iIAAAAAAAAAAAAAAAAf/iIgAAAAAAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+H///3h///8w////EP///wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1198#webamp #playlist-window {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAAAB/gAAAAAAAAAAAAAAAAAAAf4AAAAAAAAAAAAAAAAcAB/gAAAAAAAAAAAAAAAAHgAf4AAAAAAAAAAAAAAAAB/gPgAAAAAAAAAAAAAAAAAf/gAAAAAAAAAAAAAAAAAAH//iIiAAAAAAAAAAAAAAAB//4iIAAAAAAAAAAAAAAAAf/iIgAAAAAAAAAAAAAAAAH/4iAAAAAAAAAAAAAAAAAB/iIAAAAAAAAAAAAAAAAAAf4gAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8P///+H///3h///8w////EP///wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1199#webamp #playlist-window .playlist-top {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAAAAAAP93AAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAP93AAAAAAAACP/3d3AAAAAPcAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////P////h///jwP//w8D//8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AHA//ADwP/wB+H/8A/z//Af///wP///8H////D////x////8/////f////w==), auto} 1200#webamp #main-window #position {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAAAAAAAAAAAACP/3d3AAAAAAAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1201#webamp #playlist-window #playlist-resize-target {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPcAAAAAAAAAAAAAAAAAAA/3cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAcAAAAAAAAAAACPcAAAdwAHcAAAAAAAAAAAj3AAAP8AD/AAAAAAAAgACPcAAAAAAA8AAAAAAAAIcAj3AAAAAAAAAAAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAAAAAAAAAAAACP/3d3AAAAAAAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////n////w////4H///iB///w/n//8OY//+HCH/3hwh/8w+Y//EP+f/wH///8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1202#webamp #playlist-window .playlist-scrollbar {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPcAAAAAAAAAAAAAAAAAAA/3cAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAAAAAAAAAAAAAAAAAAj3AAAA9wAAAAAAAAAAgACPcAAAAPcAAAAAAAAAAIcAj3AAAAAAAAAAAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAA/3cAAAAAAAAACP/3d3AAAA9wAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////////////////////8////+H///jA///wwP//8P///+Hz//3h4f/8w+H//EPz//wH///8AED
1202//ADA//wB4f/8A/P//Af///wP///8H////D////x////8/////f////w==), auto} 1203#webamp #main-window #title-bar {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAAAAAAP93AAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAP93AAAAAAAACP/3d3AAAAAPcAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////P////h///jwP//w8D//8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AHA//ADwP/wB+H/8A/z//Af///wP///8H////D////x////8/////f////w==), auto} 1204#webamp #volume {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAAAAAAAAAAAACP/3d3AAAAAAAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1205#webamp #volume input {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAAAAAAAAAAAACP/3d3AAAAAAAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1206#webamp #balance {cursor: url(data:image/x-win-bitmap;base64,AAACAAEAICAAAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACHcAAAAAAAAAAAAAAAAAAAj3AAAAAAAAAAAAAAAAAACPcAAHAAAAAHAAAAAAAAAAj3AAdwAHcAB3AAAAAAgACPcAAP8AD/AA/wAAAAAIcAj3AAAPAAAAAPAAAAAACPcPcAAAAAAAAAAAAAAAAAj/cAAAAAAAAAAAAAAAAAAI//d3dwAAAAAAAAAAAAAACP/3d3AAAAAAAAAAAAAAAAj/d3cAAAAAAAAAAAAAAAAI/3dwAAAAAAAAAAAAAAAACPd3AAAAAAAAAAAAAAAAAAj3cAAAAAAAAAAAAAAAAAAIdwAAAAAAAAAAAAAAAAAACHAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////////////////////////////j////w////8M/P/+GMx/3hCEP8wwhD/EOMx/wHz8/8AH///AD///wB///8A////Af///wP///8H////D////x////8/////f////w==), auto} 1207#webamp-context-menu .context-menu { 1208 left: 0px; 1209 -webkit-user-select: none; 1210 -moz-user-select: none; 1211 user-select: none; 1212 cursor: default; 1213} 1214#webamp-context-menu .context-menu.bottom { 1215 top: 12px; 1216} 1217#webamp-context-menu .context-menu.top { 1218 top: 0px; 1219} 1220#webamp-context-menu .context-menu, 1221#webamp-context-menu .context-menu ul { 1222 z-index: 50; /* Gross */ 1223 background-color: #ffffff; 1224 position: absolute; 1225 list-style: none; 1226 padding: 0; 1227 margin: 0; 1228 border: 1px solid #a7a394; 1229 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); 1230} 1231#webamp-context-menu .context-menu li { 1232 position: relative; 1233 font-family: "Tahoma"; 1234 font-size: 11px; 1235 color: black; 1236 white-space: nowrap; 1237 margin: 2px; 1238 padding: 1px 18px 3px 18px; 1239 display: block; 1240} 1241#webamp-context-menu .context-menu li.checked:before { 1242 float: left; 1243 /* TODO: Use an image */ 1244 content: "\\2713"; 1245 margin-left: -12px; 1246} 1247#webamp-context-menu .context-menu li.parent:after { 1248 float: right; 1249 content: "\\25b8"; 1250 margin-right: -12px; 1251} 1252#webamp-context-menu .context-menu li a { 1253 text-decoration: none; 1254 color: black; 1255 cursor: default; 1256}
1257#webamp-context-menu .context-menu li:hover, 1258#webamp-context-menu .context-menu li:hover a { 1259 background-color: #224eb7; 1260 color: #ffffff; 1261} 1262#webamp-context-menu .context-menu li.hr { 1263 padding: 2px 0; 1264} 1265#webamp-context-menu .context-menu li.hr:hover { 1266 background-color: #ffffff; 1267} 1268#webamp-context-menu .context-menu li.hr hr { 1269 border: none; 1270 height: 1px; 1271 background-color: #a7a394; 1272 margin: 0; 1273 padding: 0; 1274} 1275#webamp-context-menu .context-menu ul { 1276 display: none; 1277 left: 100%; 1278 margin-left: -3px; 1279} 1280#webamp-context-menu .context-menu li:hover > ul { 1281 display: block; 1282} 1283/* Styles */ 1284#webamp #equalizer-window { 1285 height: 116px; 1286 width: 275px; 1287} 1288#webamp #equalizer-window.shade { 1289 height: 14px; 1290} 1291#webamp #equalizer-volume { 1292 position: absolute; 1293 left: 61px; 1294 top: 4px; 1295 height: 6px; 1296 width: 97px; 1297 background-position: 0 0; 1298} 1299#webamp #equalizer-volume::-webkit-slider-thumb { 1300 height: 7px; 1301 width: 3px; 1302} 1303#webamp #equalizer-volume::-moz-range-thumb { 1304 height: 7px; 1305 width: 3px; 1306} 1307#webamp #equalizer-balance { 1308 position: absolute; 1309 left: 164px; 1310 top: 4px; 1311 height: 6px; 1312 width: 43px; 1313 background-position: 0 0; 1314} 1315#webamp #equalizer-balance::-webkit-slider-thumb { 1316 height: 7px; 1317 width: 3px; 1318} 1319#webamp #equalizer-balance::-moz-range-thumb { 1320 height: 7px; 1321 width: 3px; 1322} 1323#webamp .equalizer-top { 1324 height: 14px; 1325 width: 275px; 1326 position: relative; 1327} 1328#webamp #equalizer-close { 1329 position: absolute; 1330 height: 9px; 1331 width: 9px; 1332 left: 264px; 1333 top: 3px; 1334} 1335#webamp #equalizer-shade { 1336 position: absolute; 1337 height: 9px; 1338 width: 9px; 1339 left: 254px; 1340 top: 3px; 1341} 1342#webamp #on { 1343 position: absolute; 1344 width: 26px; 1345 height: 12px; 1346 top: 18px; 1347 left: 14px; 1348} 1349#webamp #auto { 1350 position: absolute; 1351 width: 32px; 1352 height: 12px; 1353 top: 18px; 1354 left: 40px; 1355} 1356#webamp #presets-context { 1357 position: absolute; 1358 width: 44px; 1359 height: 12px; 1360 top: 18px; 1361 left: 217px; 1362} 1363#webamp #presets { 1364 width: 100%; 1365 height: 100%; 1366} 1367#webamp #eqGraph { 1368 position: absolute; 1369 width: 113px; 1370 height: 19px;
1371 top: 17px; 1372 left: 86px; 1373} 1374#webamp #preamp { 1375 position: absolute; 1376 left: 21px; 1377 top: 38px; 1378} 1379#webamp #plus12db { 1380 position: absolute; 1381 left: 45px; 1382 top: 36px; 1383 width: 22px; 1384 height: 8px; 1385} 1386#webamp #zerodb { 1387 position: absolute; 1388 left: 45px; 1389 top: 64px; 1390 width: 22px; 1391 height: 8px; 1392} 1393#webamp #minus12db { 1394 position: absolute; 1395 left: 45px; 1396 top: 95px; 1397 width: 22px; 1398 height: 8px; 1399} 1400#webamp #band-60 { 1401 position: absolute; 1402 left: 78px; 1403 top: 38px; 1404} 1405#webamp #band-170 { 1406 position: absolute; 1407 left: 96px; 1408 top: 38px; 1409} 1410#webamp #band-310 { 1411 position: absolute; 1412 left: 114px; 1413 top: 38px; 1414} 1415#webamp #band-600 { 1416 position: absolute; 1417 left: 132px; 1418 top: 38px; 1419} 1420#webamp #band-1000 { 1421 position: absolute; 1422 left: 150px; 1423 top: 38px; 1424} 1425#webamp #band-3000 { 1426 position: absolute; 1427 left: 168px; 1428 top: 38px; 1429} 1430#webamp #band-6000 { 1431 position: absolute; 1432 left: 186px; 1433 top: 38px; 1434} 1435#webamp #band-12000 { 1436 position: absolute; 1437 left: 204px; 1438 top: 38px; 1439} 1440#webamp #band-14000 { 1441 position: absolute; 1442 left: 222px; 1443 top: 38px; 1444} 1445#webamp #band-16000 { 1446 position: absolute; 1447 left: 240px; 1448 top: 38px; 1449} 1450#webamp .gen-text-space { 1451 width: 5px; 1452} 1453#webamp .gen-text-letter { 1454 height: 7px; 1455 display: inline-block; 1456} 1457#webamp .gen-window { 1458 /* Default size */ 1459 width: 275px; 1460 height: 116px; 1461 display: flex; 1462 flex-direction: column; 1463} 1464#webamp .gen-top { 1465 height: 20px; 1466 display: flex; 1467 flex-direction: row; 1468} 1469#webamp .gen-top-left { 1470 width: 25px; 1471 height: 20px; 1472} 1473#webamp .gen-top-title { 1474 line-height: 7px; 1475 margin-top: 2px; 1476 /* TODO: This should be a conciquence of the repeating tiles, not hard coded */ 1477 padding: 0 3px 0 4px; 1478} 1479#webamp .gen-top-left-fill { 1480 flex-grow: 1; 1481 height: 20px; 1482 background-position: left; 1483} 1484#webamp .gen-top-right-fill { 1485 flex-grow: 1; 1486 height: 20px; 1487 background-position: right; 1488} 1489#webamp .gen-top-left-end { 1490 width: 25px; 1491 height: 20px; 1492} 1493#webamp .gen-top-right { 1494 width: 25px; 1495 height: 20px; 1496} 1497#webamp .gen-top-right-end { 1498 width: 25px; 1499 height: 20px; 1500} 1501#webamp .gen-close { 1502 width: 9px; 1503 height: 9px; 1504 position: absolute; 1505 right: 2px; 1506 top: 3px; 1507} 1508#webamp .gen-middle { 1509 flex-grow: 1; 1510 display: flex; 1511 flex-direction: row; 1512 position: relative; 1513} 1514#webamp .gen-middle-left { 1515 width: 11px; 1516} 1517#webamp .gen-middle-left-bottom { 1518 width: 11px; 1519 height: 24px; 1520 bottom: 0; 1521 position: absolute; 1522} 1523#webamp .gen-middle-center { 1524 flex-grow: 1; 1525 position: relative; 1526} 1527#webamp .gen-middle-right { 1528 width: 8px; 1529} 1530#webamp .gen-middle-right-bottom { 1531 width: 8px; 1532 height: 24px; 1533 bottom: 0; 1534 position: absolute; 1535} 1536#webamp .gen-bottom { 1537 height: 14px; 1538 background-repeat: repeat-x; 1539} 1540#webamp .gen-bottom-left { 1541 position: absolute; 1542 left: 0; 1543 width: 125px; 1544 height: 14px; 1545} 1546#webamp .gen-bottom-right { 1547 position: absolute; 1548 right: 0; 1549 width: 125px; 1550 height: 14px; 1551} 1552#webamp .gen-bottom-right #gen-resize-target { 1553 position: absolute; 1554 right: 0; 1555 bottom: 0; 1556 height: 20px; 1557 width: 20px; 1558} 1559/* Styles */ 1560#webamp #main-window { 1561 position: absolute; 1562 height: 116px; 1563 width: 275px; 1564 /* Ask the browser to scale showing large pixels if possible */ 1565 image-rendering: -moz-crisp-edges; /* Firefox */ 1566 image-rendering: -o-crisp-edges; /* Opera */ 1567 image-rendering: -webkit-optimize-contrast; /* Safari */ 1568 image-rendering: pixelated; /* Only in Chrome > 40 */ 1569 -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ 1570} 1571#webamp #title-bar { 1572 position: absolute; 1573 top: 0; 1574 left: 0; 1575 height: 14px; 1576 width: 275px; 1577} 1578#webamp #option-context, 1579#webamp #minimize, 1580#webamp #shade, 1581#webamp #close { 1582 position: absolute; 1583 height: 9px; 1584 width: 9px; 1585 top: 3px; 1586} 1587#webamp #title-bar #option { 1588 width: 100%; 1589 height: 100%; 1590} 1591#webamp #title-bar #option-context { 1592 left: 6px; 1593} 1594#webamp #title-bar #minimize { 1595 left: 244px; 1596} 1597#webamp #title-bar #shade { 1598 left: 254px; 1599} 1600#webamp #title-bar #close { 1601 left: 264px; 1602} 1603#webamp #clutter-bar { 1604 position: absolute; 1605 top: 22px; 1606 left: 10px; 1607 height: 43px; 1608 width: 8px; 1609} 1610#webamp #clutter-bar div { 1611 position: absolute; 1612 height: 7px; 1613 width: 8px; 1614 left: 0px; 1615} 1616#webamp #clutter-bar #button-o { 1617 top: 3px; 1618 height: 8px; 1619} 1620#webamp #clutter-bar #button-a { 1621 top: 11px; 1622} 1623#webamp #clutter-bar #button-i { 1624 top: 18px; 1625} 1626#webamp #clutter-bar #button-d { 1627 top: 25px; 1628 height: 8px; 1629} 1630#webamp #clutter-bar #button-v { 1631 top: 33px; 1632} 1633#webamp #play-pause { 1634 position: absolute; 1635 top: 28px; 1636 left: 26px; 1637 height: 9px; 1638 width: 9px; 1639 background-repeat: no-repeat; 1640} 1641#webamp .play #work-indicator, 1642#webamp #work-indicator.selected { 1643 position: absolute; 1644 top: 28px; 1645 left: 24px; 1646 height: 9px; 1647 width: 3px; 1648} 1649#webamp .webamp-status #time { 1650 position: absolute; 1651 left: 39px; 1652 top: 26px; 1653 /* Just to make it clickable */ 1654 height: 13px; 1655 width: 59px; 1656} 1657#webamp .stop .webamp-status #time { 1658 display: none; 1659} 1660#webamp .pause .webamp-status #time { 1661 animation: blink 2s step-start 1s infinite; 1662 -webkit-animation: blink 2s step-start 1s infinite; 1663} 1664#webamp .webamp-status #time #minus-sign { 1665 /* Note that this get's augmented by the skin CSS if NUM_EX.BMP is present */ 1666 position: absolute; 1667 top: 6px; 1668 left: -1px; 1669 width: 5px; 1670 height: 1px; 1671} 1672#webamp .webamp-status #time #minute-first-digit { 1673 position: absolute; 1674 pointer-events: none; 1675 left: 9px; 1676 height: 13px; 1677 width: 9px; 1678} 1679#webamp .webamp-status #time #minute-second-digit { 1680 position: absolute; 1681 pointer-events: none; 1682 left: 21px; 1683 height: 13px; 1684 width: 9px; 1685} 1686#webamp .webamp-status #time #second-first-digit { 1687 position: absolute; 1688 pointer-events: none; 1689 left: 39px; 1690 height: 13px; 1691 width: 9px; 1692} 1693#webamp .webamp-status #time #second-second-digit { 1694 position: absolute; 1695 pointer-events: none; 1696 left: 51px; 1697 height: 13px; 1698 width: 9px; 1699} 1700#webamp #main-window #visualizer { 1701 position: absolute; 1702 top: 43px; 1703 left: 24px; 1704} 1705#webamp #main-window.shade #visualizer { 1706 top: 5px; 1707 left: 79px; 1708} 1709#webamp .text { 1710 display: none; 1711} 1712#webamp #marquee { 1713 position: absolute; 1714 left: 111px; 1715 top: 24px; 1716 width: 154px; 1717 height: 6px; 1718 overflow: hidden; 1719 display: block; 1720 padding: 3px 0px; /* Ensure the target is correct for the cursor */ 1721} 1722#webamp .media-info #kbps { 1723 position: absolute; 1724 left: 111px; 1725 top: 43px; 1726 width: 15px; 1727 height: 6px; 1728 overflow: hidden; 1729} 1730#webamp .stop .media-info #kbps { 1731 display: none; 1732} 1733#webamp .media-info #khz { 1734 position: absolute; 1735 left: 156px; 1736 top: 43px; 1737 width: 10px; 1738 height: 6px; 1739 overflow: hidden; 1740} 1741#webamp .stop .media-info #khz { 1742 display: none; 1743} 1744#webamp .media-info .mono-stereo { 1745 position: absolute; 1746 left: 212px; 1747 top: 41px; 1748 width: 57px; 1749 height: 12px; 1750} 1751#webamp .media-info .mono-stereo div { 1752 position: absolute; 1753 height: 12px; 1754} 1755#webamp .media-info .mono-stereo #mono { 1756 width: 27px; 1757} 1758#webamp .media-info .mono-stereo #stereo { 1759 left: 27px; 1760 width: 29px; 1761} 1762#webamp #volume { 1763 position: absolute; 1764 left: 107px; 1765 top: 57px; 1766 height: 13px; 1767 width: 68px; 1768 background-position: 0 0; 1769} 1770#webamp #volume input { 1771 height: 13px; 1772 /* The input itself, is actually 3px shorter than the background 1773 * https://twitter.com/LuigiHann/status/959275940688867328 1774 */ 1775 width: 65px; 1776 display: block; 1777} 1778#webamp #volume input::-webkit-slider-thumb { 1779 top: 1px; 1780 height: 11px; 1781 width: 14px; 1782} 1783#webamp #volume input::-moz-range-thumb { 1784 top: 1px; 1785 height: 11px; 1786 width: 14px; 1787} 1788#webamp #balance { 1789 position: absolute; 1790 left: 177px; 1791 top: 57px; 1792 height: 13px; 1793 width: 38px; 1794 background-position: 0 0; 1795} 1796#webamp #balance::-webkit-slider-thumb { 1797 top: 1px; 1798 height: 11px; 1799 width: 14px; 1800} 1801#webamp #balance::-moz-range-thumb { 1802 top: 1px; 1803 height: 11px; 1804 width: 14px; 1805} 1806#webamp .windows { 1807 position: absolute; 1808 left: 219px; 1809 top: 58px; 1810 width: 46px; 1811 height: 12px; 1812} 1813#webamp .windows div { 1814 position: absolute; 1815 width: 23px; 1816 height: 12px; 1817} 1818#webamp .windows #equalizer-button { 1819 left: 0; 1820} 1821#webamp .windows #playlist-button { 1822 left: 23px; 1823} 1824#webamp #position { 1825 position: absolute; 1826 left: 16px; 1827 top: 72px; 1828 width: 248px; 1829 height: 10px; 1830} 1831#webamp #position::-webkit-slider-thumb { 1832 height: 10px; 1833 width: 29px; 1834 /* 1835 * Fix the strange bug in Safair/mobile-chrome 1836 * http://stackoverflow.com/questions/26727769/rendering-glitch-when-manipulating-range-input-value-via-javascript-in-webkit 1837 */ 1838 -webkit-box-sizing: border-box; 1839 position: relative; 1840} 1841#webamp #position::-moz-range-thumb { 1842 height: 10px; 1843 width: 29px; 1844} 1845/* For some reason, we can't use display: none here */ 1846#webamp .stop #position::-webkit-slider-thumb { 1847 visibility: hidden; 1848} 1849#webamp .stop #position::-moz-range-thumb { 1850 visibility: hidden; 1851} 1852/* For some reason this is needed for the position slider to show up now that 1853 * we are using React. 1854 */ 1855#webamp .play #position::-webkit-slider-thumb { 1856 visibility: visible; 1857} 1858#webamp .actions div { 1859 height: 18px; 1860 width: 23px; 1861 position: absolute; 1862} 1863#webamp .actions #previous { 1864 top: 88px; 1865 left: 16px; 1866} 1867#webamp .actions #play { 1868 top: 88px; 1869 left: 39px; 1870} 1871#webamp .actions #pause { 1872 top: 88px; 1873 left: 62px; 1874} 1875#webamp .actions #stop { 1876 top: 88px; 1877 left: 85px; 1878} 1879#webamp .actions #next { 1880 top: 88px; 1881 left: 108px; 1882 width: 22px; 1883} 1884#webamp #eject { 1885 position: absolute; 1886 top: 89px; 1887 left: 136px; 1888 height: 16px; 1889 width: 22px; 1890} 1891#webamp .shuffle-repeat { 1892 position: absolute; 1893 top: 89px; 1894 left: 164px; 1895 width: 74px; 1896} 1897#webamp .shuffle-repeat div { 1898 position: absolute; 1899 height: 15px; 1900} 1901#webamp .shuffle-repeat #shuffle { 1902 width: 47px; 1903} 1904#webamp .shuffle-repeat #repeat { 1905 left: 46px; 1906 width: 28px; 1907} 1908#webamp #about { 1909 position: absolute; 1910 top: 91px; 1911 left: 253px; 1912 height: 15px; 1913 width: 13px; 1914} 1915#webamp .digit {
1916 position: absolute; 1917 display: inline-block; 1918 width: 9px; 1919 height: 13px; 1920 background-repeat: no-repeat; 1921 text-indent: -9999px; 1922} 1923/* Shade View */ 1924#webamp #main-window.shade { 1925 height: 14px; 1926} 1927#webamp .shade .media-info, 1928#webamp .shade .windows, 1929#webamp .shade #volume, 1930#webamp .shade #balance, 1931#webamp .shade .shuffle-repeat, 1932#webamp .shade .webamp-status { 1933 display: none; 1934} 1935#webamp .shade #title-bar { 1936} 1937#webamp .shade .actions div { 1938 position: absolute; 1939} 1940#webamp .shade .actions #previous, 1941#webamp .shade .actions #previous.winamp-active { 1942 background: none; 1943 height: 10px; 1944 width: 7px; 1945 top: 2px; 1946 left: 169px; 1947} 1948#webamp .shade .actions #play, 1949#webamp .shade .actions #play.winamp-active { 1950 background: none; 1951 height: 10px; 1952 width: 10px; 1953 top: 2px; 1954 left: 176px; 1955} 1956#webamp .shade .actions #pause, 1957#webamp .shade .actions #pause.winamp-active { 1958 background: none; 1959 height: 10px; 1960 width: 9px; 1961 top: 2px; 1962 left: 186px; 1963} 1964#webamp .shade .actions #stop, 1965#webamp .shade .actions #stop.winamp-active { 1966 background: none; 1967 height: 10px; 1968 width: 9px; 1969 top: 2px; 1970 left: 195px; 1971} 1972#webamp .shade .actions #next, 1973#webamp .shade .actions #next.winamp-active { 1974 background: none; 1975 height: 10px; 1976 width: 10px; 1977 top: 2px; 1978 left: 204px; 1979} 1980#webamp .shade #eject, 1981#webamp .shade #eject.winamp-active { 1982 height: 10px; 1983 width: 10px; 1984 top: 2px; 1985 left: 215px; 1986 background: none; 1987} 1988#webamp .shade #position { 1989 position: absolute; 1990 left: 226px; 1991 top: 4px; 1992 width: 17px; 1993 height: 7px; 1994} 1995#webamp .shade #position::-webkit-slider-thumb { 1996 height: 7px; 1997 width: 3px; 1998 /* This make it appear. Not sure why */ 1999 background: none; 2000} 2001#webamp .shade #position::-moz-range-thumb { 2002 height: 7px; 2003 width: 3px; 2004 /* This make it appear. Not sure why */ 2005 background: none; 2006} 2007#webamp #main-window .mini-time { 2008 position: absolute; 2009 top: 4px; 2010 left: 127px; 2011} 2012.webamp-desktop { 2013 position: absolute; 2014 top: 0; 2015 left: 0; 2016 right: 0; 2017 bottom: 0; 2018 z-index: -1; 2019} 2020#webamp .mini-time { 2021 display: block; 2022 height: 6px; 2023 width: 25px; 2024} 2025#webamp .mini-time.blinking .character:not(.background-character) { 2026 animation: blink 2s step-start 1s infinite; 2027 -webkit-animation: blink 2s step-start 1s infinite; 2028} 2029#webamp .mini-time .background-character { 2030 z-index: 1; 2031} 2032#webamp .mini-time .character { 2033 position: absolute; 2034 top: 0; 2035 z-index: 2; 2036} 2037/* Styles */ 2038#webamp #playlist-window { 2039 display: flex; 2040 flex-direction: column; 2041} 2042#webamp .playlist-top { 2043 width: 100%; 2044 min-height: 20px; 2045 max-height: 20px; 2046 position: relative; 2047 display: flex; 2048} 2049#webamp .playlist-top-left { 2050 width: 25px; 2051} 2052#webamp .playlist-top-left-spacer { 2053 width: 12px; 2054} 2055#webamp .playlist-top-left-fill { 2056 flex-grow: 1; 2057 background-position: right; 2058} 2059#webamp .playlist-top-right-spacer { 2060 /* This goes to the right of the center */ 2061 width: 13px; 2062} 2063#webamp .playlist-top-right-fill { 2064 flex-grow: 1; 2065 background-position: right; 2066} 2067#webamp .playlist-top-title { 2068 width: 100px; 2069} 2070#webamp .playlist-top-right { 2071 width: 25px; 2072} 2073#webamp .playlist-middle { 2074 flex-grow: 1; 2075 display: flex; 2076 flex-direction: row; 2077 overflow: hidden; 2078} 2079#webamp .playlist-middle-left { 2080 background-repeat: repeat-y; 2081 width: 12px; 2082 min-width: 12px; 2083} 2084#webamp .playlist-middle-center { 2085 flex-grow: 1; 2086 padding: 3px 0; 2087 min-width: 0; /* Not sure why this is needed */ 2088} 2089#webamp .playlist-tracks { 2090 display: flex; 2091 flex: 1 0 auto; 2092} 2093#webamp .playlist-tracks .track-cell { 2094 height: 13px; 2095 line-height: 13px; 2096 font-size: 9px; 2097 letter-spacing: 0.5px; 2098 -webkit-user-select: none; 2099 -moz-user-select: none; 2100 user-select: none; 2101} 2102#webamp .playlist-track-durations > div { 2103 padding-right: 3px; 2104 text-align: right; 2105} 2106#webamp .playlist-track-titles { 2107 flex: 1 1 auto; 2108 overflow: hidden; 2109} 2110#webamp .playlist-track-titles > div { 2111 text-overflow: ellipsis; 2112 white-space: nowrap; 2113 overflow: hidden; 2114} 2115#webamp .playlist-middle-right { 2116 background-repeat: repeat-y; 2117 background-position: top right; 2118 width: 20px; 2119 min-width: 20px; 2120 position: relative; 2121 padding-bottom: 18px; 2122} 2123#webamp .playlist-bottom { 2124 width: 100%; 2125 height: 38px; 2126 min-height: 38px; 2127 max-height: 38px; 2128 position: relative; 2129} 2130#webamp .playlist-bottom-left { 2131 width: 125px; 2132 height: 100%; 2133 position: absolute; 2134} 2135#webamp .playlist-menu li { 2136 list-style: none; 2137 display: none; 2138 width: 22px; 2139 height: 18px; 2140 padding: 0; 2141 margin: 0; 2142} 2143#webamp .playlist-menu li > div { 2144 height: 100%; 2145} 2146#webamp .playlist-menu ul { 2147 padding: 0; 2148 margin: 0; 2149 position: absolute; 2150 bottom: 0; 2151} 2152#webamp .playlist-menu.selected li { 2153 display: block; 2154} 2155#webamp .playlist-menu .bar { 2156 position: absolute; 2157 bottom: 0; 2158 left: -3px; 2159 width: 3px; 2160 height: 54px; 2161} 2162#webamp #playlist-add-menu { 2163 position: absolute; 2164 bottom: 12px; 2165 left: 14px; 2166 width: 22px; 2167 height: 18px; 2168} 2169#webamp #playlist-remove-menu.playlist-menu .bar { 2170 height: 72px; 2171} 2172#webamp #playlist-remove-menu { 2173 position: absolute; 2174 bottom: 12px; 2175 left: 43px; 2176 width: 22px; 2177 height: 18px; 2178} 2179#webamp #playlist-selection-menu { 2180 position: absolute; 2181 bottom: 12px; 2182 left: 72px; 2183 width: 22px; 2184 height: 18px; 2185} 2186#webamp #playlist-misc-menu { 2187 position: absolute; 2188 bottom: 12px; 2189 left: 101px; 2190 width: 22px; 2191 height: 18px; 2192} 2193#webamp #playlist-list-menu { 2194 position: absolute; 2195 bottom: 12px; 2196 right: 22px; 2197 width: 22px; 2198 height: 18px; 2199} 2200#webamp .playlist-bottom-right { 2201 width: 150px; 2202 height: 100%; 2203 position: absolute; 2204 right: 0; 2205} 2206#webamp .playlist-running-time-display { 2207 position: absolute; 2208 top: 10px; 2209 left: 7px; 2210 height: 10px; 2211} 2212#webamp .playlist-action-buttons { 2213 position: absolute; 2214 top: 22px; 2215 left: 3px; 2216 display: flex; 2217} 2218#webamp .playlist-action-buttons > div { 2219 height: 10px; 2220 width: 10px; 2221} 2222#webamp #playlist-window .playlist-visualizer { 2223 width: 75px; 2224 height: 100%; 2225 position: absolute; 2226 right: 150px; 2227} 2228#webamp #playlist-window .mini-time { 2229 position: absolute; 2230 top: 23px; 2231 left: 66px; 2232} 2233#webamp #playlist-window #playlist-resize-target { 2234 position: absolute; 2235 right: 0; 2236 bottom: 0; 2237 height: 20px;
2238 width: 20px; 2239} 2240#webamp #playlist-close-button { 2241 position: absolute; 2242 right: 2px; 2243 height: 9px; 2244 width: 9px; 2245 top: 3px; 2246} 2247#webamp #playlist-shade-button { 2248 position: absolute; 2249 right: 12px; 2250 height: 9px; 2251 width: 9px; 2252 top: 3px; 2253} 2254#webamp #playlist-window-shade { 2255 height: 14px; 2256} 2257#webamp #playlist-window-shade .left { 2258 height: 14px; 2259 background-repeat: no-repeat; 2260} 2261#webamp #playlist-window-shade .right { 2262 height: 14px; 2263 background-repeat: no-repeat; 2264 background-position-x: right; 2265} 2266#webamp #playlist-window #playlist-scroll-up-button, 2267#webamp #playlist-window #playlist-scroll-down-button { 2268 position: absolute; 2269 width: 8px; 2270 height: 5px; 2271 right: 7px; 2272} 2273#webamp #playlist-window #playlist-scroll-up-button { 2274 top: 2px; 2275} 2276#webamp #playlist-window #playlist-scroll-down-button { 2277 top: 8px; 2278} 2279#webamp #playlist-window-shade #playlist-resize-target { 2280 position: absolute; 2281 right: 20px; 2282 top: 3px; 2283 height: 9px; 2284 width: 9px; 2285} 2286#webamp #playlist-shade-track-title { 2287 position: absolute; 2288 top: 4px; 2289 left: 5px; 2290} 2291#webamp #playlist-shade-time { 2292 position: absolute; 2293 top: 4px; 2294 right: 30px; 2295} 2296#webamp #playlist-window .visualizer-wrapper { 2297 position: absolute; 2298 top: 12px; 2299 left: 2px; 2300 width: 72px; 2301 overflow: hidden; 2302} 2303/* Rules used by all windows */ 2304#webamp { 2305 position: absolute; 2306 top: 0; 2307 left: 0; 2308} 2309/* Prevent accidental highlighting */ 2310#webamp canvas { 2311 -webkit-user-select: none; 2312 -moz-user-select: none; 2313 user-select: none; 2314} 2315#webamp * { 2316 /* Some environments globably change the box-sizing */ 2317 box-sizing: content-box; 2318 -webkit-box-sizing: content-box; 2319} 2320#webamp *:focus { 2321 outline: 0; 2322} 2323/* Range input css reset */ 2324#webamp input[type="range"] { 2325 -webkit-appearance: none; 2326 margin: 0; 2327 padding: 0; 2328 background: none; 2329 border: none; 2330} 2331#webamp input[type="range"]::-webkit-slider-thumb { 2332 -webkit-appearance: none; 2333 border: none; 2334 border-radius: 0; 2335 background: none; 2336} 2337#webamp input[type="range"]::-moz-range-thumb { 2338 border: none; 2339 border-radius: 0; 2340 background: none; 2341} 2342#webamp input[type="range"]::-moz-range-track { 2343 border: none; 2344 background: none; 2345} 2346#webamp input[type="range"]:focus { 2347 outline: none; 2348} 2349#webamp input[type="range"]::-moz-focus-outer { 2350 border: 0; 2351} 2352#webamp a:focus { 2353 outline: none; 2354} 2355/* Animation */ 2356@keyframes blink { 2357 0% { 2358 opacity: 1; 2359 } 2360 50% { 2361 opacity: 0; 2362 } 2363 100% { 2364 opacity: 1; 2365 } 2366} 2367@-webkit-keyframes blink { 2368 0% { 2369 opacity: 1; 2370 } 2371 50% { 2372 opacity: 0; 2373 } 2374 100% { 2375 opacity: 1; 2376 } 2377} 2378#webamp .character { 2379 display: inline-block; 2380 vertical-align: top; 2381 width: 5px; 2382 height: 6px; 2383 /* background-image: TEXT.BMP via Javascript */ 2384 text-indent: -9999px; 2385} 2386#webamp .window { 2387 position: absolute; 2388 /* Ask the browser to scale showing large pixels if possible */ 2389 image-rendering: -moz-crisp-edges; /* Firefox */ 2390 image-rendering: -o-crisp-edges; /* Opera */ 2391 image-rendering: -webkit-optimize-contrast; /* Safari */ 2392 image-rendering: pixelated; /* Only in Chrome > 40 */ 2393 -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ 2394} 2395#webamp .window { 2396 /* Work around rendering bug with clip-path */ 2397 -webkit-transform: translateZ(0); 2398} 2399#webamp .window.doubled { 2400 -moz-transform: translateZ(0) scale(2); 2401 -moz-transform-origin: top left; 2402 -webkit-transform: translateZ(0) scale(2); 2403 -webkit-transform-origin: top left; 2404} 2405`}),ga.jsxs("div",{onBlur:h0=>{h0.currentTarget.contains(h0.relatedTarget)||c0(null)},children:[ga.jsx(IT,{}),ga.jsx(XI,{renderContents:()=>ga.jsx(iC,{filePickers:e0}),children:ga.jsx(oC,{windows:d0(),parentDomNode:a0})})]})]}),u0)}const xT=new Set(["input","textarea","select"]);class TT{constructor(){Gw(this,"_listeners");this._listeners={}}on(e0,n0){const a0=this._listeners[e0]||[];return a0.push(n0),this._listeners[e0]=a0,()=>{this._listeners[e0]=a0.filter(i0=>i0!==n0)}}trigger(e0,...n0){const a0=this._listeners[e0];a0&&a0.forEach(i0=>i0(...n0))}dispose(){this._listeners={}}}class BT{constructor(){Gw(this,"_teardowns",[]);Gw(this,"disposed");this.disposed=!1}add(...e0){if(this.disposed)throw new Error("Attempted to add a new teardown to a disposed disposable.");this._teardowns.push(...e0)}dispose(){if(this.disposed)throw new Error("Attempted to dispose disposable which is already disposed.");this._teardowns.forEach(e0=>{typeof e0=="function"?e0():typeof e0.dispose=="function"&&e0.dispose()}),this._teardowns=[],this.disposed=!0}}function UT(r0,e0={balance:0}){let n0=0;const a0=r0.createGain();a0.channelCount=2,a0.channelCountMode="explicit",a0.channelInterpretation="speakers";
2405const i0=r0.createChannelSplitter(2),s0=r0.createGain(),o0=r0.createGain(),l0=r0.createChannelMerger(2);function c0(d0){const h0=Number(d0);s0.gain.value=h0>0?1-h0:1,o0.gain.value=h0>0?1:1+h0,n0=h0}a0.connect(i0),i0.connect(s0,0),i0.connect(o0,1),s0.connect(l0,0,0),o0.connect(l0,0,1);const u0={};return Object.defineProperties(u0,{value:{get:function(){return n0},set:c0,enumerable:!0,configurable:!0}}),Object.defineProperties(a0,{balance:{value:u0,enumerable:!0,writable:!1,configurable:!0},connect:{value:AudioNode.prototype.connect.bind(l0),enumerable:!1,writable:!1,configurable:!0},disconnect:{value:AudioNode.prototype.disconnect.bind(l0),enumerable:!1,writable:!1,configurable:!0}}),n0!==e0.balance&&c0(e0.balance),a0}class MT{constructor(e0,n0){Gw(this,"_emitter");Gw(this,"_context");Gw(this,"_source");Gw(this,"_destination");Gw(this,"_audio");Gw(this,"_stalled");Gw(this,"_status");Gw(this,"_disposable");this._emitter=new TT,this._context=e0,this._destination=n0,this._audio=document.createElement("audio"),this._audio.crossOrigin="anonymous",this._stalled=!1,this._status=Kb,this._disposable=new BT;const a0=()=>{this._setStalled(!0)};this._audio.addEventListener("suspend",a0),this._disposable.add(()=>this._audio.removeEventListener("suspend",a0));const i0=()=>{this._emitter.trigger("loaded"),this._setStalled(!1)};this._audio.addEventListener("durationchange",i0),this._disposable.add(()=>this._audio.removeEventListener("durationchange",i0));const s0=()=>{this._emitter.trigger("ended"),this._setStatus(Kb)};this._audio.addEventListener("ended",s0),this._disposable.add(()=>this._audio.removeEventListener("ended",s0));const o0=()=>{this._emitter.trigger("positionChange")};this._audio.addEventListener("timeupdate",o0),this._disposable.add(()=>this._audio.removeEventListener("timeupdate",o0));const l0=c0=>{this._audio.error.code,this._emitter.trigger("ended"),this._setStatus(Kb)};this._audio.addEventListener("error",l0),this._disposable.add(()=>this._audio.removeEventListener("error",l0)),this._source=this._context.createMediaElementSource(this._audio),this._source.connect(n0)}on(e0,n0){return this._emitter.on(e0,n0)}_setStalled(e0){this._stalled=e0,this._emitter.trigger("stallChanged")}disconnect(){this._source.disconnect()}async loadUrl(e0){this._audio.src=e0}async play(){this._status!==Yb&&this.seekToTime(0);try{await this._audio.play()}catch{}this._setStatus(jb)}pause(){this._audio.pause(),this._setStatus(Yb)}stop(){this._audio.pause(),this._audio.currentTime=0,this._setStatus(Kb)}seekToTime(e0){this._audio.currentTime=eE(e0,0,this.getDuration()),this._emitter.trigger("positionChange")}getStalled(){return this._stalled}getStatus(){return this._status}getDuration(){const{duration:e0}=this._audio;return isNaN(e0)||e0===1/0?0:e0}getTimeElapsed(){return this._audio.currentTime}_setStatus(e0){this._status=e0,this._emitter.trigger("statusChange")}dispose(){this._disposable.dispose(),this.stop(),this._emitter.dispose()}}class NT{constructor(){Gw(this,"_emitter");Gw(this,"_context");Gw(this,"_balance");Gw(this,"_staticSource");Gw(this,"_preamp");Gw(this,"_analyser");Gw(this,"_gainNode");Gw(this,"_source");Gw(this,"_bands");Gw(this,"_disposable");if(this._emitter=new TT,this._disposable=new BT,this._context=new(window.AudioContext||window.webkitAudioContext),this._context.state==="suspended"){const n0=async()=>{await this._context.resume(),this._context.state==="running"&&(document.body.removeEventListener("touchend",n0,!1),document.body.removeEventListener("click",n0,!1),document.body.removeEventListener("keydown",n0,!1))};document.body.addEventListener("touchend",n0,!1),document.body.addEventListener("click",n0,!1),document.body.addEventListener("keydown",n0,!1),this._disposable.add(()=>{document.body.removeEventListener("touchend",n0,!1),document.body.removeEventListener("click",n0,!1),document.body.removeEventListener("keydown",n0,!1)})}this._staticSource=this._context.createGain(),this._balance=new UT(this._context),this._preamp=this._context.createGain(),this._analyser=this._context.createAnalyser(),this._analyser.fftSize=2048,this._analyser.smoothingTimeConstant=0,this._gainNode=this._context.createGain(),this._source=new MT(this._context,this._staticSource),this._source.on("positionChange",()=>{this._emitter.trigger("timeupdate")}),this._source.on("ended",()=>{this._emitter.trigger("ended")}),this._source.on("statusChange",()=>{this._source.getStatus()===jb&&this._emitter.trigger("playing"),this._emitter.trigger("timeupdate")}),this._source.on("loaded",()=>{this._emitter.trigger("fileLoaded")}),this._staticSource.connect(this._preamp);let e0=this._preamp;this._bands={},Cb.forEach((n0,a0)=>{const i0=this._context.createBiquadFilter();this._bands[n0]=i0,a0===0?i0.type="lowshelf":a0===Cb.length-1?i0.type="highshelf":i0.type="peaking",i0.frequency.value=n0,i0.gain.value=0,e0.connect(i0),e0=i0}),e0.connect(this._balance),this._balance.connect(this._gainNode),this._balance.connect(this._analyser),this._gainNode.connect(this._context.destination)}getAnalyser(){return this._analyser}duration(){return this._source.getDuration()}timeElapsed(){return this._source.getTimeElapsed()}timeRemaining(){return this.duration()-this.timeElapsed()}percentComplete(){return this.timeElapsed()/this.duration()*100}
2405async play(){await this._source.play()}pause(){this._source.pause()}stop(){this._source.stop()}seekToPercentComplete(e0){const n0=this.duration()*(e0/100);this.seekToTime(n0)}setVolume(e0){this._gainNode.gain.value=e0/100}setPreamp(e0){const n0=e0/100*24-12;this._preamp.gain.value=Math.pow(10,n0/20)}setBalance(e0){this._balance.balance.value=e0/100}setEqBand(e0,n0){const a0=n0/100*24-12;this._bands[e0].gain.value=a0}disableEq(){this._staticSource.disconnect(),this._staticSource.connect(this._balance)}enableEq(){this._staticSource.disconnect(),this._staticSource.connect(this._preamp)}on(e0,n0){this._emitter.on(e0,n0)}seekToTime(e0){this._source.seekToTime(e0)}async loadFromUrl(e0,n0){this._emitter.trigger("waiting"),await this._source.loadUrl(e0),this._emitter.trigger("stopWaiting"),n0&&this.play()}dispose(){this._disposable.dispose(),this._source.dispose(),this._emitter.dispose()}}var h3;let DT=(h3=class{constructor(r0){Gw(this,"_actionEmitter");Gw(this,"_root");Gw(this,"_disposable");Gw(this,"options");Gw(this,"media");Gw(this,"store");this._root=null,this._disposable=new BT,this._actionEmitter=new TT,this.options=r0;const{initialTracks:e0,initialSkin:n0,availableSkins:a0,enableHotkeys:i0=!1,zIndex:s0,requireJSZip:o0,requireMusicMetadata:l0,requireButterchurnPresets:c0,handleTrackDropEvent:u0,handleAddUrlEvent:d0,handleLoadListEvent:h0,handleSaveListEvent:f0,enableDoubleSizeMode:p0,__butterchurnOptions:A0,__customMediaClass:m0}=this.options,x0=A0;if(c0!=null){if(x0==null)throw new Error("You must pass `__butterchurnOptions` if you are using `requireButterchurnPresets`.");x0.getPresets=c0}let g0=null;if(x0!=null){const{importConvertPreset:S0,presetConverterEndpoint:k0}=x0;S0!=null&&k0!=null&&(g0=async R0=>{const{convertPreset:j0}=await S0();return j0(await _E(R0),k0)})}var y0,b0;this.media=new(m0||NT),this.store=wI(this.media,this._actionEmitter,this.options.__customMiddlewares,this.options.__initialState,{requireJSZip:o0,requireMusicMetadata:l0,convertPreset:g0,handleTrackDropEvent:u0,handleAddUrlEvent:d0,handleLoadListEvent:h0,handleSaveListEvent:f0}),r0.enableMediaSession&&(y0=this,"mediaSession"in navigator&&(y0.onTrackDidChange(S0=>{if(S0==null)return;const{metaData:{title:k0,artist:R0,album:j0,albumArtUrl:C0}}=S0;navigator.mediaSession.metadata=new MediaMetadata({title:k0??void 0,artist:R0??void 0,album:j0??void 0,artwork:C0?[{src:C0}]:[]})}),navigator.mediaSession.setActionHandler("play",()=>{y0.play()}),navigator.mediaSession.setActionHandler("pause",()=>{y0.pause()}),navigator.mediaSession.setActionHandler("seekbackward",()=>{y0.seekBackward(10)}),navigator.mediaSession.setActionHandler("seekforward",()=>{y0.seekForward(10)}),navigator.mediaSession.setActionHandler("previoustrack",()=>{y0.previousTrack()}),navigator.mediaSession.setActionHandler("nexttrack",()=>{y0.nextTrack()}))),p0&&this.store.dispatch(ev()),navigator.onLine?this.store.dispatch({type:"NETWORK_CONNECTED"}):this.store.dispatch({type:"NETWORK_DISCONNECTED"}),s0!=null&&this.store.dispatch({type:"SET_Z_INDEX",zIndex:s0}),x0&&(this.store.dispatch({type:"ENABLE_MILKDROP",open:x0.butterchurnOpen}),this.store.dispatch((b0=x0,async S0=>{const{getPresets:k0,importButterchurn:R0}=b0;R0().then(C0=>{const $0=C0.default??C0;S0({type:"GOT_BUTTERCHURN",butterchurn:$0})});const j0=(await k0()).map(HS);S0(JS(j0))})));const E0=()=>this.store.dispatch({type:"NETWORK_CONNECTED"}),w0=()=>this.store.dispatch({type:"NETWORK_DISCONNECTED"});var v0;window.addEventListener("online",E0),window.addEventListener("offline",w0),this._disposable.add(()=>{window.removeEventListener("online",E0),window.removeEventListener("offline",w0)}),n0?this.store.dispatch(cS(n0.url)):this.store.dispatch({type:"LOADED"}),e0&&this._bufferTracks(e0),r0.avaliableSkins!=null?this.store.dispatch({type:"SET_AVAILABLE_SKINS",skins:r0.avaliableSkins}):a0!=null&&this.store.dispatch({type:"SET_AVAILABLE_SKINS",skins:a0}),this.store.dispatch((v0=r0.windowLayout,S0=>{var k0;if(v0!=null){for(const R0 of["playlist","milkdrop"]){const j0=v0[R0];if(j0!=null&&j0.size!=null){const{extraHeight:C0,extraWidth:$0}=j0.size;S0(Av(R0,[$0,C0]))}}for(const R0 of["main","playlist","equalizer","milkdrop"]){const j0=v0[R0];(j0==null||j0.closed)&&S0(rv(R0))}for(const R0 of["main","playlist","equalizer"])(k0=v0[R0])!=null&&k0.shadeMode&&S0({type:"TOGGLE_WINDOW_SHADE_MODE",windowId:R0});S0(ov(fE(v0,R0=>{if(R0==null)throw new Error("w is null");return{x:R0.position.left,y:R0.position.top}}),!1))}else S0(uv())}
2405)),i0&&this._disposable.add(function(S0){let k0=0;const R0=[78,85,76,76,83,79,70,84],j0=C0=>{if(!(C0.target instanceof Element&&xT.has(C0.target.tagName.toLowerCase()))){if(C0.ctrlKey)switch(C0.keyCode){case 68:S0(ev()),C0.preventDefault();break;case 76:break;case 82:S0({type:"REVERSE_LIST"});break;case 84:S0({type:"TOGGLE_TIME_MODE"})}else if(C0.altKey)switch(C0.keyCode){case 87:S0(sv("main"));break;case 69:S0(sv("playlist"));break;case 71:S0(sv("equalizer"))}else switch(C0.keyCode){case 37:case 103:S0(FS(5));break;case 38:case 104:S0(PS(1));break;case 39:case 105:S0(zS(5));break;case 40:case 98:S0(PS(-1));break;case 66:case 102:S0(LS());break;case 67:S0(NS());break;case 76:case 96:S0(hS());break;case 82:S0({type:"TOGGLE_REPEAT"});break;case 83:S0({type:"TOGGLE_SHUFFLE"});break;case 86:S0({type:"STOP"});break;case 88:case 101:S0(MS());break;case 90:case 100:S0(_S());break;case 97:S0(OS(-10));break;case 99:S0(OS(10))}C0.keyCode!==27&&(k0=C0.keyCode===R0[k0]?k0+1:0,k0===R0.length&&S0({type:"TOGGLE_LLAMA_MODE"}))}};return document.addEventListener("keydown",j0),()=>{document.removeEventListener("keydown",j0)}}(this.store.dispatch))}static browserIsSupported(){const r0=!(!window.AudioContext&&!window.webkitAudioContext),e0=!!window.document.createElement("canvas").getContext;return r0&&e0&&typeof Promise<"u"}play(){this.store.dispatch(MS())}pause(){this.store.dispatch(NS())}stop(){this.store.dispatch({type:"STOP"})}setVolume(r0){this.store.dispatch(QS(r0))}seekBackward(r0){this.store.dispatch(FS(r0))}seekForward(r0){this.store.dispatch(zS(r0))}seekToTime(r0){this.store.dispatch(RS(r0))}isShuffleEnabled(){return ok(this.store.getState())}toggleShuffle(){this.store.dispatch({type:"TOGGLE_SHUFFLE"})}isRepeatEnabled(){return lk(this.store.getState())}toggleRepeat(){this.store.dispatch({type:"TOGGLE_REPEAT"})}nextTrack(){this.store.dispatch(LS())}previousTrack(){this.store.dispatch(_S())}setCurrentTrack(r0){this.store.dispatch(BS(r0))}appendTracks(r0){const e0=ay(this.store.getState());this.store.dispatch(gS(r0,Db,e0))}setTracksToPlay(r0){this.store.dispatch(gS(r0,Nb))}getPlaylistTracks(){return iy(this.store.getState())}getMediaStatus(){return _y(this.store.getState())}getPlayerMediaStatus(){return Ly(this.store.getState())}onWillClose(r0){return this._actionEmitter.on("CLOSE_REQUESTED",e0=>{r0(e0.cancel)})}onClose(r0){return this._actionEmitter.on("CLOSE_WINAMP",r0)}close(){this.store.dispatch(r0=>{let e0=!1;r0({type:"CLOSE_REQUESTED",cancel:()=>{e0=!0}}),e0||(r0({type:"STOP"}),r0({type:"CLOSE_WINAMP"}))})}reopen(){this.store.dispatch({type:"OPEN_WINAMP"})}onTrackDidChange(r0){let e0=null;const n0=this.store.subscribe(()=>{const a0=this.store.getState(),i0=Fy(a0);i0!==e0&&(e0=i0,r0(i0==null?null:Qy(a0)))});return this._disposable.add(n0),n0}onMinimize(r0){return this._actionEmitter.on("MINIMIZE_WINAMP",r0)}setSkinFromUrl(r0){this.store.dispatch(cS(r0))}async skinIsLoaded(){await this.storeHas(r0=>!r0.display.loading),await Promise.all([Lk(this.store.getState()),_k(this.store.getState())])}async renderWhenReady(r0){return this._render(r0,!1)}async renderInto(r0){var e0;if(((e0=getComputedStyle(r0))==null?void 0:e0.position)==="static")throw new Error("Webamp Error: The DOM node passed to renderInto must have a non-static position.");return this._render(r0,!0)}async _render(r0,e0){if(this.store.dispatch(function(i0,s0){return(o0,l0)=>{if(!l0().windows.positionsAreRelative)return;let c0=0,u0=0;if(!s0){const f0=i0.getBoundingClientRect();c0=f0.left+window.scrollX,u0=f0.top+window.scrollY}const{scrollWidth:d0,scrollHeight:h0}=i0;o0(lv({left:c0,top:u0,width:d0,height:h0}))}}(r0,e0)),await this.skinIsLoaded(),this._disposable.disposed)return;if(this._root!=null)throw new Error("Cannot render a Webamp instance twice");let n0;this._root=Km.createRoot(r0),this._disposable.add(()=>{this._root!=null&&(this._root.unmount(),this._root=null)});const a0=new Promise(i0=>{n0=i0});this._root.render(ga.jsx(hb,{store:this.store,children:ga.jsx(CT,{media:this.media,filePickers:this.options.filePickers||[],onMount:n0,parentDomNode:e0?r0:document.body})})),await a0}dispose(){this.media.dispose(),this._actionEmitter.dispose(),this._disposable.dispose()}__onStateChange(r0){const e0=this.store.subscribe(r0);return this._disposable.add(e0),e0}storeHas(r0){let e0=!1;return new Promise((n0,a0)=>
2405{if(r0(this.store.getState()))return void n0();const i0=this.store.subscribe(()=>{r0(this.store.getState())&&(e0=!0,i0(),n0())});this._disposable.add(()=>{e0||(i0(),a0(new Error("Store was disposed before condition was met.")))})})}_bufferTracks(r0){const e0=ay(this.store.getState());this.store.dispatch(gS(r0,Mb,e0))}},Gw(h3,"VERSION","2.3.1"),h3);window.Webamp=DT;let OT=1;const LT={};let _T,RT=!1;function zT(r0){if(RT)setTimeout(zT,0,r0);else{const e0=LT[r0];if(e0){RT=!0;try{(function(n0){const a0=n0.callback,i0=n0.args;switch(i0.length){case 0:a0();break;case 1:a0(i0[0]);break;case 2:a0(i0[0],i0[1]);break;case 3:a0(i0[0],i0[1],i0[2]);break;default:a0.apply(void 0,i0)}})(e0)}finally{(function(n0){delete LT[n0]})(r0),RT=!1}}}}(function(){if(!window.importScripts){let r0=!0;const e0=window.onmessage;return window.onmessage=function(){r0=!1},window.postMessage("","*"),window.onmessage=e0,r0}})()?function(){const r0=`setImmediate$${Math.random()}$`;window.addEventListener("message",e0=>{e0.source===window&&typeof e0.data=="str
2405ing"&&e0.data.indexOf(r0)===0&&zT(+e0.data.slice(r0.length))},!1),_T=function(e0){window.postMessage(r0+e0,"*")}}():_T=function(r0){setTimeout(zT,0,r0)};var FT={},QT={};function PT(){}function VT(){VT.init.call(this)}function GT(r0){return r0._maxListeners===void 0?VT.defaultMaxListeners:r0._maxListeners}function jT(r0,e0,n0,a0){var i0,s0,o0;if(typeof n0!="function")throw new TypeError('"listener" argument must be a function');if((s0=r0._events)?(s0.newListener&&(r0.emit("newListener",e0,n0.listener?n0.listener:n0),s0=r0._events),o0=s0[e0]):(s0=r0._events=new PT,r0._eventsCount=0),o0){if(typeof o0=="function"?o0=s0[e0]=a0?[n0,o0]:[o0,n0]:a0?o0.unshift(n0):o0.push(n0),!o0.warned&&(i0=GT(r0))&&i0>0&&o0.length>i0){o0.warned=!0;var l0=new Error("Possible EventEmitter memory leak detected. "+o0.length+" "+e0+" listeners added. Use emitter.setMaxListeners() to increase limit");l0.name="MaxListenersExceededWarning",l0.emitter=r0,l0.type=e0,l0.count=o0.length}}else o0=s0[e0]=n0,++r0._eventsCount;return r0}function KT(r0,e0,n0){var a0=!1;function i0(){r0.removeListener(e0,i0),a0||(a0=!0,n0.apply(r0,arguments))}return i0.listener=n0,i0}function YT(r0){var e0=this._events;if(e0){var n0=e0[r0];if(typeof n0=="function")return 1;if(n0)return n0.length}return 0}function HT(r0,e0){for(var n0=new Array(e0);e0--;)n0[e0]=r0[e0];return n0}PT.prototype=Object.create(null),VT.EventEmitter=VT,VT.usingDomains=!1,VT.prototype.domain=void 0,VT.prototype._events=void 0,VT.prototype._maxListeners=void 0,VT.defaultMaxListeners=10,VT.init=function(){this.domain=null,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new PT,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},VT.prototype.setMaxListeners=function(r0){if(typeof r0!="number"||r0<0||isNaN(r0))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=r0,this},VT.prototype.getMaxListeners=function(){return GT(this)},VT.prototype.emit=function(r0){var e0,n0,a0,i0,s0,o0,l0,c0=r0==="error";if(o0=this._events)c0=c0&&o0.error==null;else if(!c0)return!1;
2405if(l0=this.domain,c0){if(e0=arguments[1],!l0){if(e0 instanceof Error)throw e0;var u0=new Error('Uncaught, unspecified "error" event. ('+e0+")");throw u0.context=e0,u0}return e0||(e0=new Error('Uncaught, unspecified "error" event')),e0.domainEmitter=this,e0.domain=l0,e0.domainThrown=!1,l0.emit("error",e0),!1}if(!(n0=o0[r0]))return!1;var d0=typeof n0=="function";switch(a0=arguments.length){case 1:(function(h0,f0,p0){if(f0)h0.call(p0);else for(var A0=h0.length,m0=HT(h0,A0),x0=0;x0<A0;++x0)m0[x0].call(p0)})(n0,d0,this);break;case 2:(function(h0,f0,p0,A0){if(f0)h0.call(p0,A0);else for(var m0=h0.length,x0=HT(h0,m0),g0=0;g0<m0;++g0)x0[g0].call(p0,A0)})(n0,d0,this,arguments[1]);break;case 3:(function(h0,f0,p0,A0,m0){if(f0)h0.call(p0,A0,m0);else for(var x0=h0.length,g0=HT(h0,x0),y0=0;y0<x0;++y0)g0[y0].call(p0,A0,m0)})(n0,d0,this,arguments[1],arguments[2]);break;case 4:(function(h0,f0,p0,A0,m0,x0){if(f0)h0.call(p0,A0,m0,x0);else for(var g0=h0.length,y0=HT(h0,g0),b0=0;b0<g0;++b0)y0[b0].call(p0,A0,m0,x0)})(n0,d0,this,arguments[1],arguments[2],arguments[3]);break;default:for(i0=new Array(a0-1),s0=1;s0<a0;s0++)i0[s0-1]=arguments[s0];(function(h0,f0,p0,A0){if(f0)h0.apply(p0,A0);else for(var m0=h0.length,x0=HT(h0,m0),g0=0;g0<m0;++g0)x0[g0].apply(p0,A0)})(n0,d0,this,i0)}return!0},VT.prototype.addListener=function(r0,e0){return jT(this,r0,e0,!1)},VT.prototype.on=VT.prototype.addListener,VT.prototype.prependListener=function(r0,e0){return jT(this,r0,e0,!0)},VT.prototype.once=function(r0,e0){if(typeof e0!="function")throw new TypeError('"listener" argument must be a function');return this.on(r0,KT(this,r0,e0)),this},VT.prototype.prependOnceListener=function(r0,e0){if(typeof e0!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(r0,KT(this,r0,e0)),this},VT.prototype.removeListener=function(r0,e0){var n0,a0,i0,s0,o0;if(typeof e0!="function")throw new TypeError('"listener" argument must be a function');if(!(a0=this._events))return this;if(!(n0=a0[r0]))return this;if(n0===e0||n0.listener&&n0.listener===e0)--this._eventsCount===0?this._events=new PT:(delete a0[r0],a0.removeListener&&this.emit("removeListener",r0,n0.listener||e0));else if(typeof n0!="function"){for(i0=-1,s0=n0.length;s0-- >0;)if(n0[s0]===e0||n0[s0].listener&&n0[s0].listener===e0){o0=n0[s0].listener,i0=s0;break}if(i0<0)return this;if(n0.length===1){if(n0[0]=void 0,--this._eventsCount===0)return this._events=new PT,this;delete a0[r0]}else(function(l0,c0){for(var u0=c0,d0=u0+1,h0=l0.length;d0<h0;u0+=1,d0+=1)l0[u0]=l0[d0];l0.pop()})(n0,i0);a0.removeListener&&this.emit("removeListener",r0,o0||e0)}return this},VT.prototype.off=function(r0,e0){return this.removeListener(r0,e0)},VT.prototype.removeAllListeners=function(r0){var e0,n0;if(!(n0=this._events))return this;if(!n0.removeListener)return arguments.length===0?(this._events=new PT,this._eventsCount=0):n0[r0]&&(--this._eventsCount===0?this._events=new PT:delete n0[r0]),this;if(arguments.length===0){for(var a0,i0=Object.keys(n0),s0=0;s0<i0.length;++s0)(a0=i0[s0])!=="removeListener"&&this.removeAllListeners(a0);return this.removeAllListeners("removeListener"),this._events=new PT,this._eventsCount=0,this}if(typeof(e0=n0[r0])=="function")this.removeListener(r0,e0);else if(e0)do this.removeListener(r0,e0[e0.length-1]);while(e0[0]);return this},VT.prototype.listeners=function(r0){var e0,n0,a0=this._events;return n0=a0&&(e0=a0[r0])?typeof e0=="function"?[e0.listener||e0]:function(i0){for(var s0=new Array(i0.length),o0=0;o0<s0.length;++o0)s0[o0]=i0[o0].listener||i0[o0];return s0}(e0):[],n0},VT.listenerCount=function(r0,e0){return typeof r0.listenerCount=="function"?r0.listenerCount(e0):YT.call(r0,e0)},VT.prototype.listenerCount=YT,VT.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var JT=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},WT=[],qT=[],ZT=typeof Uint8Array<"u"?Uint8Array:Array,XT=!1;function $T(){XT=!0;for(var r0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e0=0;e0<64;
2405++e0)WT[e0]=r0[e0],qT[r0.charCodeAt(e0)]=e0;qT[45]=62,qT[95]=63}function eB(r0){return WT[r0>>18&63]+WT[r0>>12&63]+WT[r0>>6&63]+WT[63&r0]}function tB(r0,e0,n0){for(var a0,i0=[],s0=e0;s0<n0;s0+=3)a0=(r0[s0]<<16)+(r0[s0+1]<<8)+r0[s0+2],i0.push(eB(a0));return i0.join("")}function nB(r0){var e0;XT||$T();for(var n0=r0.length,a0=n0%3,i0="",s0=[],o0=16383,l0=0,c0=n0-a0;l0<c0;l0+=o0)s0.push(tB(r0,l0,l0+o0>c0?c0:l0+o0));return a0===1?(e0=r0[n0-1],i0+=WT[e0>>2],i0+=WT[e0<<4&63],i0+="=="):a0===2&&(e0=(r0[n0-2]<<8)+r0[n0-1],i0+=WT[e0>>10],i0+=WT[e0>>4&63],i0+=WT[e0<<2&63],i0+="="),s0.push(i0),s0.join("")}function aB(r0,e0,n0,a0,i0){var s0,o0,l0=8*i0-a0-1,c0=(1<<l0)-1,u0=c0>>1,d0=-7,h0=n0?i0-1:0,f0=n0?-1:1,p0=r0[e0+h0];for(h0+=f0,s0=p0&(1<<-d0)-1,p0>>=-d0,d0+=l0;d0>0;s0=256*s0+r0[e0+h0],h0+=f0,d0-=8);for(o0=s0&(1<<-d0)-1,s0>>=-d0,d0+=a0;d0>0;o0=256*o0+r0[e0+h0],h0+=f0,d0-=8);if(s0===0)s0=1-u0;else{if(s0===c0)return o0?NaN:1/0*(p0?-1:1);o0+=Math.pow(2,a0),s0-=u0}return(p0?-1:1)*o0*Math.pow(2,s0-a0)}function rB(r0,e0,n0,a0,i0,s0){var o0,l0,c0,u0=8*s0-i0-1,d0=(1<<u0)-1,h0=d0>>1,f0=i0===23?Math.pow(2,-24)-Math.pow(2,-77):0,p0=a0?0:s0-1,A0=a0?1:-1,m0=e0<0||e0===0&&1/e0<0?1:0;for(e0=Math.abs(e0),isNaN(e0)||e0===1/0?(l0=isNaN(e0)?1:0,o0=d0):(o0=Math.floor(Math.log(e0)/Math.LN2),e0*(c0=Math.pow(2,-o0))<1&&(o0--,c0*=2),(e0+=o0+h0>=1?f0/c0:f0*Math.pow(2,1-h0))*c0>=2&&(o0++,c0/=2),o0+h0>=d0?(l0=0,o0=d0):o0+h0>=1?(l0=(e0*c0-1)*Math.pow(2,i0),o0+=h0):(l0=e0*Math.pow(2,h0-1)*Math.pow(2,i0),o0=0));i0>=8;r0[n0+p0]=255&l0,p0+=A0,l0/=256,i0-=8);for(o0=o0<<i0|l0,u0+=i0;u0>0;r0[n0+p0]=255&o0,p0+=A0,o0/=256,u0-=8);r0[n0+p0-A0]|=128*m0}var iB={}.toString,AB=Array.isArray||function(r0){return iB.call(r0)=="[object Array]"};function sB(){return lB.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function oB(r0,e0){if(sB()<e0)throw new RangeError("Invalid typed array length");return lB.TYPED_ARRAY_SUPPORT?(r0=new Uint8Array(e0)).__proto__=lB.prototype:(r0===null&&(r0=new lB(e0)),r0.length=e0),r0}function lB(r0,e0,n0){if(!(lB.TYPED_ARRAY_SUPPORT||this instanceof lB))return new lB(r0,e0,n0);if(typeof r0=="number"){if(typeof e0=="string")throw new Error("If encoding is specified then the first argument must be a string");return dB(this,r0)}return cB(this,r0,e0,n0)}function cB(r0,e0,n0,a0){if(typeof e0=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e0 instanceof ArrayBuffer?function(i0,s0,o0,l0){if(o0<0||s0.byteLength<o0)throw new RangeError("'offset' is out of bounds");if(s0.byteLength<o0+(l0||0))throw new RangeError("'length' is out of bounds");return s0=o0===void 0&&l0===void 0?new Uint8Array(s0):l0===void 0?new Uint8Array(s0,o0):new Uint8Array(s0,o0,l0),lB.TYPED_ARRAY_SUPPORT?(i0=s0).__proto__=lB.prototype:i0=hB(i0,s0),i0}(r0,e0,n0,a0):typeof e0=="string"?function(i0,s0,o0){if(typeof o0=="string"&&o0!==""||(o0="utf8"),!lB.isEncoding(o0))throw new TypeError('"encoding" must be a valid string encoding');var l0=0|gB(s0,o0),c0=(i0=oB(i0,l0)).write(s0,o0);return c0!==l0&&(i0=i0.slice(0,c0)),i0}(r0,e0,n0):function(i0,s0){if(fB(s0)){var o0=0|pB(s0.length);return(i0=oB(i0,o0)).length===0||s0.copy(i0,0,0,o0),i0}if(s0){if(typeof ArrayBuffer<"u"&&s0.buffer instanceof ArrayBuffer||"length"in s0)return typeof s0.length!="number"||(l0=s0.length)!=l0?oB(i0,0):hB(i0,s0);if(s0.type==="Buffer"&&AB(s0.data))return hB(i0,s0.data)}var l0;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(r0,e0)}function uB(r0){if(typeof r0!="number")throw new TypeError('"size" argument must be a number');if(r0<0)throw new RangeError('"size" argument must not be negative')}function dB(r0,e0){if(uB(e0),r0=oB(r0,e0<0?0:0|pB(e0)),!lB.TYPED_ARRAY_SUPPORT)for(var n0=0;n0<e0;++n0)r0[n0]=0;return r0}function hB(r0,e0){var n0=e0.length<0?0:0|pB(e0.length);r0=oB(r0,n0);for(var a0=0;a0<n0;a0+=1)r0[a0]=255&e0[a0];return r0}function pB(r0){if(r0>=sB())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+sB().toString(16)+" bytes");return 0|r0}function fB(r0){return!(r0==null||!r0._isBuffer)}function gB(r0,e0){if(fB(r0))return r0.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r0)||r0 instanceof ArrayBuffer))return r0.byteLength;
vendor: 4,456 bytes, line 2405
2405typeof r0!="string"&&(r0=""+r0);var n0=r0.length;if(n0===0)return 0;for(var a0=!1;;)switch(e0){case"ascii":case"latin1":case"binary":return n0;case"utf8":case"utf-8":case void 0:return GB(r0).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n0;case"hex":return n0>>>1;case"base64":return jB(r0).length;default:if(a0)return GB(r0).length;e0=(""+e0).toLowerCase(),a0=!0}}function mB(r0,e0,n0){var a0=!1;if((e0===void 0||e0<0)&&(e0=0),e0>this.length||((n0===void 0||n0>this.length)&&(n0=this.length),n0<=0)||(n0>>>=0)<=(e0>>>=0))return"";for(r0||(r0="utf8");;)switch(r0){case"hex":return NB(this,e0,n0);case"utf8":case"utf-8":return TB(this,e0,n0);case"ascii":return UB(this,e0,n0);case"latin1":case"binary":return MB(this,e0,n0);case"base64":return xB(this,e0,n0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return DB(this,e0,n0);default:if(a0)throw new TypeError("Unknown encoding: "+r0);r0=(r0+"").toLowerCase(),a0=!0}}function wB(r0,e0,n0){var a0=r0[e0];r0[e0]=r0[n0],r0[n0]=a0}function bB(r0,e0,n0,a0,i0){if(r0.length===0)return-1;if(typeof n0=="string"?(a0=n0,n0=0):n0>2147483647?n0=2147483647:n0<-2147483648&&(n0=-2147483648),n0=+n0,isNaN(n0)&&(n0=i0?0:r0.length-1),n0<0&&(n0=r0.length+n0),n0>=r0.length){if(i0)return-1;n0=r0.length-1}else if(n0<0){if(!i0)return-1;n0=0}if(typeof e0=="string"&&(e0=lB.from(e0,a0)),fB(e0))return e0.length===0?-1:EB(r0,e0,n0,a0,i0);if(typeof e0=="number")return e0&=255,lB.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i0?Uint8Array.prototype.indexOf.call(r0,e0,n0):Uint8Array.prototype.lastIndexOf.call(r0,e0,n0):EB(r0,[e0],n0,a0,i0);throw new TypeError("val must be string, number or Buffer")}function EB(r0,e0,n0,a0,i0){var s0,o0=1,l0=r0.length,c0=e0.length;if(a0!==void 0&&((a0=String(a0).toLowerCase())==="ucs2"||a0==="ucs-2"||a0==="utf16le"||a0==="utf-16le")){if(r0.length<2||e0.length<2)return-1;o0=2,l0/=2,c0/=2,n0/=2}function u0(p0,A0){return o0===1?p0[A0]:p0.readUInt16BE(A0*o0)}if(i0){var d0=-1;for(s0=n0;s0<l0;s0++)if(u0(r0,s0)===u0(e0,d0===-1?0:s0-d0)){if(d0===-1&&(d0=s0),s0-d0+1===c0)return d0*o0}else d0!==-1&&(s0-=s0-d0),d0=-1}else for(n0+c0>l0&&(n0=l0-c0),s0=n0;s0>=0;s0--){for(var h0=!0,f0=0;f0<c0;f0++)if(u0(r0,s0+f0)!==u0(e0,f0)){h0=!1;break}if(h0)return s0}return-1}function yB(r0,e0,n0,a0){n0=Number(n0)||0;var i0=r0.length-n0;a0?(a0=Number(a0))>i0&&(a0=i0):a0=i0;var s0=e0.length;if(s0%2!=0)throw new TypeError("Invalid hex string");a0>s0/2&&(a0=s0/2);for(var o0=0;o0<a0;++o0){var l0=parseInt(e0.substr(2*o0,2),16);if(isNaN(l0))return o0;r0[n0+o0]=l0}return o0}function kB(r0,e0,n0,a0){return KB(GB(e0,r0.length-n0),r0,n0,a0)}function vB(r0,e0,n0,a0){return KB(function(i0){for(var s0=[],o0=0;o0<i0.length;++o0)s0.push(255&i0.charCodeAt(o0));return s0}(e0),r0,n0,a0)}function SB(r0,e0,n0,a0){return vB(r0,e0,n0,a0)}function IB(r0,e0,n0,a0){return KB(jB(e0),r0,n0,a0)}function CB(r0,e0,n0,a0){return KB(function(i0,s0){for(var o0,l0,c0,u0=[],d0=0;d0<i0.length&&!((s0-=2)<0);++d0)l0=(o0=i0.charCodeAt(d0))>>8,c0=o0%256,u0.push(c0),u0.push(l0);return u0}(e0,r0.length-n0),r0,n0,a0)}function xB(r0,e0,n0){return e0===0&&n0===r0.length?nB(r0):nB(r0.slice(e0,n0))}function TB(r0,e0,n0){n0=Math.min(r0.length,n0);for(var a0=[],i0=e0;i0<n0;){var s0,o0,l0,c0,u0=r0[i0],d0=null,h0=u0>239?4:u0>223?3:u0>191?2:1;if(i0+h0<=n0)switch(h0){case 1:u0<128&&(d0=u0);break;case 2:(192&(s0=r0[i0+1]))==128&&(c0=(31&u0)<<6|63&s0)>127&&(d0=c0);break;case 3:s0=r0[i0+1],o0=r0[i0+2],(192&s0)==128&&(192&o0)==128&&(c0=(15&u0)<<12|(63&s0)<<6|63&o0)>2047&&(c0<55296||c0>57343)&&(d0=c0);break;case 4:s0=r0[i0+1],o0=r0[i0+2],l0=r0[i0+3],(192&s0)==128&&(192&o0)==128&&(192&l0)==128&&(c0=(15&u0)<<18|(63&s0)<<12|(63&o0)<<6|63&l0)>65535&&c0<1114112&&(d0=c0)}d0===null?(d0=65533,h0=1):d0>65535&&(d0-=65536,a0.push(d0>>>10&1023|55296),d0=56320|1023&d0),a0.push(d0),i0+=h0}return function(f0){var p0=f0.length;if(p0<=BB)return String.fromCharCode.apply(String,f0);for(var A0="",m0=0;m0<p0;)A0+=String.fromCharCode.apply(String,f0.slice(m0,m0+=BB));return A0}(a0)}lB.TYPED_ARRAY_SUPPORT=JT.TYPED_ARRAY_SUPPORT===void 0||JT.TYPED_ARRAY_SUPPORT,lB.poolSize=8192,lB._augment=function(r0){return r0.__proto__=lB.prototype,r0},lB.from=function(r0,e0,n0){return cB(null,r0,e0,n0)},lB.TYPED_ARRAY_SUPPORT&&(lB.prototype.__proto__=Uint8Array.prototype,lB.__proto__=Uint8Array),lB.alloc=function(r0,e0,n0){return function(a0,i0,s0,o0){return uB(i0),i0<=0?oB(a0,i0):s0!==void 0?typeof o0=="str
2405ing"?oB(a0,i0).fill(s0,o0):oB(a0,i0).fill(s0):oB(a0,i0)}(null,r0,e0,n0)},lB.allocUnsafe=function(r0){return dB(null,r0)},lB.allocUnsafeSlow=function(r0){return dB(null,r0)},lB.isBuffer=function(r0){return r0!=null&&(!!r0._isBuffer||YB(r0)||function(e0){return typeof e0.readFloatLE=="function"&&typeof e0.slice=="function"&&YB(e0.slice(0,0))}(r0))},lB.compare=function(r0,e0){if(!fB(r0)||!fB(e0))throw new TypeError("Arguments must be Buffers");if(r0===e0)return 0;for(var n0=r0.length,a0=e0.length,i0=0,s0=Math.min(n0,a0);i0<s0;++i0)if(r0[i0]!==e0[i0]){n0=r0[i0],a0=e0[i0];break}return n0<a0?-1:a0<n0?1:0},lB.isEncoding=function(r0){switch(String(r0).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},lB.concat=function(r0,e0){if(!AB(r0))throw new TypeError('"list" argument must be an Array of Buffers');if(r0.length===0)return lB.alloc(0);var n0;if(e0===void 0)for(e0=0,n0=0;n0<r0.length;++n0)e0+=r0[n0].length;var a0=lB.allocUnsafe(e0),i0=0;for(n0=0;n0<r0.length;++n0){var s0=r0[n0];if(!fB(s0))throw new TypeError('"list" argument must be an Array of Buffers');s0.copy(a0,i0),i0+=s0.length}return a0},lB.byteLength=gB,lB.prototype._isBuffer=!0,lB.prototype.swap16=function(){var r0=this.length;if(r0%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e0=0;e0<r0;e0+=2)wB(this,e0,e0+1);return this},lB.prototype.swap32=function(){var r0=this.length;if(r0%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e0=0;e0<r0;e0+=4)wB(this,e0,e0+3),wB(this,e0+1,e0+2);return this},lB.prototype.swap64=function(){var r0=this.length;if(r0%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e0=0;e0<r0;e0+=8)wB(this,e0,e0+7),wB(this,e0+1,e0+6),wB(this,e0+2,e0+5),wB(this,e0+3,e0+4);return this},lB.prototype.toString=function(){var r0=0|this.length;return r0===0?"":arguments.length===0?TB(this,0,r0):mB.apply(this,arguments)},lB.prototype.equals=function(r0){if(!fB(r0))throw new TypeError("Argument must be a Buffer");return this===r0||lB.compare(this,r0)===0},lB.prototype.inspect=function(){var r0="";return this.length>0&&(r0=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(r0+=" ... ")),"<Buffer "+r0+">"},lB.prototype.compare=function(r0,e0,n0,a0,i0){if(!fB(r0))throw new TypeError("Argument must be a Buffer");if(e0===void 0&&(e0=0),n0===void 0&&(n0=r0?r0.length:0),a0===void 0&&(a0=0),i0===void 0&&(i0=this.length),e0<0||n0>r0.length||a0<0||i0>this.length)throw new RangeError("out of range index");if(a0>=i0&&e0>=n0)return 0;if(a0>=i0)return-1;if(e0>=n0)return 1;if(this===r0)return 0;for(var s0=(i0>>>=0)-(a0>>>=0),o0=(n0>>>=0)-(e0>>>=0),l0=Math.min(s0,o0),c0=this.slice(a0,i0),u0=r0.slice(e0,n0),d0=0;d0<l0;++d0)if(c0[d0]!==u0[d0]){s0=c0[d0],o0=u0[d0];break}return s0<o0?-1:o0<s0?1:0},lB.prototype.includes=function(r0,e0,n0){return this.indexOf(r0,e0,n0)!==-1},lB.prototype.indexOf=function(r0,e0,n0){return bB(this,r0,e0,n0,!0)},lB.prototype.lastIndexOf=function(r0,e0,n0){return bB(this,r0,e0,n0,!1)},lB.prototype.write=function(r0,e0,n0,a0){if(e0===void 0)a0="utf8",n0=this.length,e0=0;else if(n0===void 0&&typeof e0=="string")a0=e0,n0=this.length,e0=0;else{if(!isFinite(e0))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e0|=0,isFinite(n0)?(n0|=0,a0===void 0&&(a0="utf8")):(a0=n0,n0=void 0)}var i0=this.length-e0;if((n0===void 0||n0>i0)&&(n0=i0),r0.length>0&&(n0<0||e0<0)||e0>this.length)throw new RangeError("Attempt to write outside buffer bounds");a0||(a0="utf8");for(var s0=!1;;)switch(a0){case"hex":return yB(this,r0,e0,n0);case"utf8":case"utf-8":return kB(this,r0,e0,n0);case"ascii":return vB(this,r0,e0,n0);case"latin1":case"binary":return SB(this,r0,e0,n0);case"base64":return IB(this,r0,e0,n0);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return CB(this,r0,e0,n0);default:if(s0)throw new TypeError("Unknown encoding: "+a0);a0=(""+a0).toLowerCase(),s0=!0}},lB.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var BB=4096;function UB(r0,e0,n0){var a0="";n0=Math.min(r0.length,n0);for(var i0=e0;i0<n0;++i0)a0+=String.fromCharCode(127&r0[i0]);return a0}function MB(r0,e0,n0){var a0="";n0=Math.min(r0.length,n0);for(var i0=e0;i0<n0;++i0)a0+=String.fromCharCode(r0[i0]);return a0}function NB(r0,e0,n0){var a0=r0.length;(!e0||e0<0)&&(e0=0),(!n0||n0<0||n0>a0)&&(n0=a0);for(var i0="",s0=e0;s0<n0;
vendor: 7,886 bytes, line 2405
2405++s0)i0+=VB(r0[s0]);return i0}function DB(r0,e0,n0){for(var a0=r0.slice(e0,n0),i0="",s0=0;s0<a0.length;s0+=2)i0+=String.fromCharCode(a0[s0]+256*a0[s0+1]);return i0}function OB(r0,e0,n0){if(r0%1!=0||r0<0)throw new RangeError("offset is not uint");if(r0+e0>n0)throw new RangeError("Trying to access beyond buffer length")}function LB(r0,e0,n0,a0,i0,s0){if(!fB(r0))throw new TypeError('"buffer" argument must be a Buffer instance');if(e0>i0||e0<s0)throw new RangeError('"value" argument is out of bounds');if(n0+a0>r0.length)throw new RangeError("Index out of range")}function _B(r0,e0,n0,a0){e0<0&&(e0=65535+e0+1);for(var i0=0,s0=Math.min(r0.length-n0,2);i0<s0;++i0)r0[n0+i0]=(e0&255<<8*(a0?i0:1-i0))>>>8*(a0?i0:1-i0)}function RB(r0,e0,n0,a0){e0<0&&(e0=4294967295+e0+1);for(var i0=0,s0=Math.min(r0.length-n0,4);i0<s0;++i0)r0[n0+i0]=e0>>>8*(a0?i0:3-i0)&255}function zB(r0,e0,n0,a0,i0,s0){if(n0+a0>r0.length)throw new RangeError("Index out of range");if(n0<0)throw new RangeError("Index out of range")}function FB(r0,e0,n0,a0,i0){return i0||zB(r0,0,n0,4),rB(r0,e0,n0,a0,23,4),n0+4}function QB(r0,e0,n0,a0,i0){return i0||zB(r0,0,n0,8),rB(r0,e0,n0,a0,52,8),n0+8}lB.prototype.slice=function(r0,e0){var n0,a0=this.length;if((r0=~~r0)<0?(r0+=a0)<0&&(r0=0):r0>a0&&(r0=a0),(e0=e0===void 0?a0:~~e0)<0?(e0+=a0)<0&&(e0=0):e0>a0&&(e0=a0),e0<r0&&(e0=r0),lB.TYPED_ARRAY_SUPPORT)(n0=this.subarray(r0,e0)).__proto__=lB.prototype;else{var i0=e0-r0;n0=new lB(i0,void 0);for(var s0=0;s0<i0;++s0)n0[s0]=this[s0+r0]}return n0},lB.prototype.readUIntLE=function(r0,e0,n0){r0|=0,e0|=0,n0||OB(r0,e0,this.length);for(var a0=this[r0],i0=1,s0=0;++s0<e0&&(i0*=256);)a0+=this[r0+s0]*i0;return a0},lB.prototype.readUIntBE=function(r0,e0,n0){r0|=0,e0|=0,n0||OB(r0,e0,this.length);for(var a0=this[r0+--e0],i0=1;e0>0&&(i0*=256);)a0+=this[r0+--e0]*i0;return a0},lB.prototype.readUInt8=function(r0,e0){return e0||OB(r0,1,this.length),this[r0]},lB.prototype.readUInt16LE=function(r0,e0){return e0||OB(r0,2,this.length),this[r0]|this[r0+1]<<8},lB.prototype.readUInt16BE=function(r0,e0){return e0||OB(r0,2,this.length),this[r0]<<8|this[r0+1]},lB.prototype.readUInt32LE=function(r0,e0){return e0||OB(r0,4,this.length),(this[r0]|this[r0+1]<<8|this[r0+2]<<16)+16777216*this[r0+3]},lB.prototype.readUInt32BE=function(r0,e0){return e0||OB(r0,4,this.length),16777216*this[r0]+(this[r0+1]<<16|this[r0+2]<<8|this[r0+3])},lB.prototype.readIntLE=function(r0,e0,n0){r0|=0,e0|=0,n0||OB(r0,e0,this.length);for(var a0=this[r0],i0=1,s0=0;++s0<e0&&(i0*=256);)a0+=this[r0+s0]*i0;return a0>=(i0*=128)&&(a0-=Math.pow(2,8*e0)),a0},lB.prototype.readIntBE=function(r0,e0,n0){r0|=0,e0|=0,n0||OB(r0,e0,this.length);for(var a0=e0,i0=1,s0=this[r0+--a0];a0>0&&(i0*=256);)s0+=this[r0+--a0]*i0;return s0>=(i0*=128)&&(s0-=Math.pow(2,8*e0)),s0},lB.prototype.readInt8=function(r0,e0){return e0||OB(r0,1,this.length),128&this[r0]?-1*(255-this[r0]+1):this[r0]},lB.prototype.readInt16LE=function(r0,e0){e0||OB(r0,2,this.length);var n0=this[r0]|this[r0+1]<<8;return 32768&n0?4294901760|n0:n0},lB.prototype.readInt16BE=function(r0,e0){e0||OB(r0,2,this.length);var n0=this[r0+1]|this[r0]<<8;return 32768&n0?4294901760|n0:n0},lB.prototype.readInt32LE=function(r0,e0){return e0||OB(r0,4,this.length),this[r0]|this[r0+1]<<8|this[r0+2]<<16|this[r0+3]<<24},lB.prototype.readInt32BE=function(r0,e0){return e0||OB(r0,4,this.length),this[r0]<<24|this[r0+1]<<16|this[r0+2]<<8|this[r0+3]},lB.prototype.readFloatLE=function(r0,e0){return e0||OB(r0,4,this.length),aB(this,r0,!0,23,4)},lB.prototype.readFloatBE=function(r0,e0){return e0||OB(r0,4,this.length),aB(this,r0,!1,23,4)},lB.prototype.readDoubleLE=function(r0,e0){return e0||OB(r0,8,this.length),aB(this,r0,!0,52,8)},lB.prototype.readDoubleBE=function(r0,e0){return e0||OB(r0,8,this.length),aB(this,r0,!1,52,8)},lB.prototype.writeUIntLE=function(r0,e0,n0,a0){r0=+r0,e0|=0,n0|=0,a0||LB(this,r0,e0,n0,Math.pow(2,8*n0)-1,0);var i0=1,s0=0;for(this[e0]=255&r0;++s0<n0&&(i0*=256);)this[e0+s0]=r0/i0&255;return e0+n0},lB.prototype.writeUIntBE=function(r0,e0,n0,a0){r0=+r0,e0|=0,n0|=0,a0||LB(this,r0,e0,n0,Math.pow(2,8*n0)-1,0);var i0=n0-1,s0=1;for(this[e0+i0]=255&r0;--i0>=0&&(s0*=256);)this[e0+i0]=r0/s0&255;return e0+n0},lB.prototype.writeUInt8=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,1,255,0),lB.TYPED_ARRAY_SUPPORT||(r0=Math.floor(r0)),this[e0]=255&r0,e0+1},lB.prototype.writeUInt16LE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,2,65535,0),lB.TYPED_ARRAY_SUPPORT?(this[e0]=255&r0,this[e0+1]=r0>>>8):_B(this,r0,e0,!0),e0+2},lB.prototype.writeUInt16BE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,2,65535,0),lB.TYPED_ARRAY_SUPPORT?(this[e0]=r0>>>8,this[e0+1]=255&r0):_B(this,r0,e0,!1),e0+2},lB.prototype.writeUInt32LE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,4,4294967295,0),lB.TYPED_ARRAY_SUPPORT?(this[e0+3]=r0>>>24,this[e0+2]=r0>>>16,this[e0+1]=r0>>>8,this[e0]=255&r0):RB(this,r0,e0,!0),e0+4},lB.prototype.writeUInt32BE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,4,4294967295,0),lB.TYPED_ARRAY_SUPPORT?(this[e0]=r0>>>24,this[e0+1]=r0>>>16,this[e0+2]=r0>>>8,this[e0+3]=255&r0):RB(this,r0,e0,!1),e0+4},lB.prototype.writeIntLE=function(r0,e0,n0,a0){if(r0=+r0,e0|=0,!a0){var i0=Math.pow(2,8*n0-1);LB(this,r0,e0,n0,i0-1,-i0)}var s0=0,o0=1,l0=0;for(this[e0]=255&r0;++s0<n0&&(o0*=256);)r0<0&&l0===0&&this[e0+s0-1]!==0&&(l0=1),this[e0+s0]=(r0/o0|0)-l0&255;return e0+n0},lB.prototype.writeIntBE=function(r0,e0,n0,a0){if(r0=+r0,e0|=0,!a0){var i0=Math.pow(2,8*n0-1);LB(this,r0,e0,n0,i0-1,-i0)}var s0=n0-1,o0=1,l0=0;for(this[e0+s0]=255&r0;--s0>=0&&(o0*=256);)r0<0&&l0===0&&this[e0+s0+1]!==0&&(l0=1),this[e0+s0]=(r0/o0|0)-l0&255;return e0+n0},lB.prototype.writeInt8=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,1,127,-128),lB.TYPED_ARRAY_SUPPORT||(r0=Math.floor(r0)),r0<0&&(r0=255+r0+1),this[e0]=255&r0,e0+1},lB.prototype.writeInt16LE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,2,32767,-32768),lB.TYPED_ARRAY_SUPPORT?(this[e0]=255&r0,this[e0+1]=r0>>>8):_B(this,r0,e0,!0),e0+2},lB.prototype.writeInt16BE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,2,32767,-32768),lB.TYPED_ARRAY_SUPPORT?(this[e0]=r0>>>8,this[e0+1]=255&r0):_B(this,r0,e0,!1),e0+2},lB.prototype.writeInt32LE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,4,2147483647,-2147483648),lB.TYPED_ARRAY_SUPPORT?(this[e0]=255&r0,this[e0+1]=r0>>>8,this[e0+2]=r0>>>16,this[e0+3]=r0>>>24):RB(this,r0,e0,!0),e0+4},lB.prototype.writeInt32BE=function(r0,e0,n0){return r0=+r0,e0|=0,n0||LB(this,r0,e0,4,2147483647,-2147483648),r0<0&&(r0=4294967295+r0+1),lB.TYPED_ARRAY_SUPPORT?(this[e0]=r0>>>24,this[e0+1]=r0>>>16,this[e0+2]=r0>>>8,this[e0+3]=255&r0):RB(this,r0,e0,!1),e0+4},lB.prototype.writeFloatLE=function(r0,e0,n0){return FB(this,r0,e0,!0,n0)},lB.prototype.writeFloatBE=function(r0,e0,n0){return FB(this,r0,e0,!1,n0)},lB.prototype.writeDoubleLE=function(r0,e0,n0){return QB(this,r0,e0,!0,n0)},lB.prototype.writeDoubleBE=function(r0,e0,n0){return QB(this,r0,e0,!1,n0)},lB.prototype.copy=function(r0,e0,n0,a0){if(n0||(n0=0),a0||a0===0||(a0=this.length),e0>=r0.length&&(e0=r0.length),e0||(e0=0),a0>0&&a0<n0&&(a0=n0),a0===n0||r0.length===0||this.length===0)return 0;if(e0<0)throw new RangeError("targetStart out of bounds");if(n0<0||n0>=this.length)throw new RangeError("sourceStart out of bounds");if(a0<0)throw new RangeError("sourceEnd out of bounds");a0>this.length&&(a0=this.length),r0.length-e0<a0-n0&&(a0=r0.length-e0+n0);var i0,s0=a0-n0;if(this===r0&&n0<e0&&e0<a0)for(i0=s0-1;i0>=0;--i0)r0[i0+e0]=this[i0+n0];else if(s0<1e3||!lB.TYPED_ARRAY_SUPPORT)for(i0=0;i0<s0;++i0)r0[i0+e0]=this[i0+n0];else Uint8Array.prototype.set.call(r0,this.subarray(n0,n0+s0),e0);return s0},lB.prototype.fill=function(r0,e0,n0,a0){if(typeof r0=="string"){if(typeof e0=="string"?(a0=e0,e0=0,n0=this.length):typeof n0=="string"&&(a0=n0,n0=this.length),r0.length===1){var i0=r0.charCo
2405deAt(0);i0<256&&(r0=i0)}if(a0!==void 0&&typeof a0!="string")throw new TypeError("encoding must be a string");if(typeof a0=="string"&&!lB.isEncoding(a0))throw new TypeError("Unknown encoding: "+a0)}else typeof r0=="number"&&(r0&=255);if(e0<0||this.length<e0||this.length<n0)throw new RangeError("Out of range index");if(n0<=e0)return this;var s0;if(e0>>>=0,n0=n0===void 0?this.length:n0>>>0,r0||(r0=0),typeof r0=="number")for(s0=e0;s0<n0;++s0)this[s0]=r0;else{var o0=fB(r0)?r0:GB(new lB(r0,a0).toString()),l0=o0.length;for(s0=0;s0<n0-e0;++s0)this[s0+e0]=o0[s0%l0]}return this};var PB=/[^+\/0-9A-Za-z-_]/g;function VB(r0){return r0<16?"0"+r0.toString(16):r0.toString(16)}function GB(r0,e0){var n0;e0=e0||1/0;for(var a0=r0.length,i0=null,s0=[],o0=0;o0<a0;++o0){if((n0=r0.charCodeAt(o0))>55295&&n0<57344){if(!i0){if(n0>56319){(e0-=3)>-1&&s0.push(239,191,189);continue}if(o0+1===a0){(e0-=3)>-1&&s0.push(239,191,189);continue}i0=n0;continue}if(n0<56320){(e0-=3)>-1&&s0.push(239,191,189),i0=n0;continue}n0=65536+(i0-55296<<10|n0-56320)}else i0&&(e0-=3)>-1&&s0.push(239,191,189);if(i0=null,n0<128){if((e0-=1)<0)break;s0.push(n0)}else if(n0<2048){if((e0-=2)<0)break;s0.push(n0>>6|192,63&n0|128)}else if(n0<65536){if((e0-=3)<0)break;s0.push(n0>>12|224,n0>>6&63|128,63&n0|128)}else{if(!(n0<1114112))throw new Error("Invalid code point");if((e0-=4)<0)break;s0.push(n0>>18|240,n0>>12&63|128,n0>>6&63|128,63&n0|128)}}return s0}function jB(r0){return function(e0){var n0,a0,i0,s0,o0,l0;XT||$T();var c0=e0.length;if(c0%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o0=e0[c0-2]==="="?2:e0[c0-1]==="="?1:0,l0=new ZT(3*c0/4-o0),i0=o0>0?c0-4:c0;var u0=0;for(n0=0,a0=0;n0<i0;n0+=4,a0+=3)s0=qT[e0.charCodeAt(n0)]<<18|qT[e0.charCodeAt(n0+1)]<<12|qT[e0.charCodeAt(n0+2)]<<6|qT[e0.charCodeAt(n0+3)],l0[u0++]=s0>>16&255,l0[u0++]=s0>>8&255,l0[u0++]=255&s0;return o0===2?(s0=qT[e0.charCodeAt(n0)]<<2|qT[e0.charCodeAt(n0+1)]>>4,l0[u0++]=255&s0):o0===1&&(s0=qT[e0.charCodeAt(n0)]<<10|qT[e0.charCodeAt(n0+1)]<<4|qT[e0.charCodeAt(n0+2)]>>2,l0[u0++]=s0>>8&255,l0[u0++]=255&s0),l0}(function(e0){if((e0=function(n0){return n0.trim?n0.trim():n0.replace(/^\s+|\s+$/g,"")}(e0).replace(PB,"")).length<2)return"";for(;e0.length%4!=0;)e0+="=";return e0}(r0))}function KB(r0,e0,n0,a0){for(var i0=0;i0<a0&&!(i0+n0>=e0.length||i0>=r0.length);++i0)e0[i0+n0]=r0[i0];return i0}function YB(r0){return!!r0.constructor&&typeof r0.constructor.isBuffer=="function"&&r0.constructor.isBuffer(r0)}function HB(){throw new Error("setTimeout has not been defined")}function JB(){throw new Error("clearTimeout has not been defined")}var WB=HB,qB=JB;function ZB(r0){if(WB===setTimeout)return setTimeout(r0,0);if((WB===HB||!WB)&&setTimeout)return WB=setTimeout,setTimeout(r0,0);try{return WB(r0,0)}catch{try{return WB.call(null,r0,0)}catch{return WB.call(this,r0,0)}}}typeof JT.setTimeout=="function"&&(WB=setTimeout),typeof JT.clearTimeout=="function"&&(qB=clearTimeout);var XB,$B=[],eU=!1,tU=-1;function nU(){eU&&XB&&(eU=!1,XB.length?$B=XB.concat($B):tU=-1,$B.length&&aU())}function aU(){if(!eU){var r0=ZB(nU);eU=!0;for(var e0=$B.length;e0;){for(XB=$B,$B=[];++tU<e0;)XB&&XB[tU].run();tU=-1,e0=$B.length}XB=null,eU=!1,function(n0){if(qB===clearTimeout)return clearTimeout(n0);if((qB===JB||!qB)&&clearTimeout)return qB=clearTimeout,clearTimeout(n0);try{return qB(n0)}catch{try{return qB.call(null,n0)}catch{return qB.call(this,n0)}}}(r0)}}function rU(r0){var e0=new Array(arguments.length-1);if(arguments.length>1)for(var n0=1;n0<arguments.length;n0++)e0[n0-1]=arguments[n0];$B.push(new iU(r0,e0)),$B.length!==1||eU||ZB(aU)}function iU(r0,e0){this.fun=r0,this.array=e0}function AU(){}iU.prototype.run=function(){this.fun.apply(null,this.array)};var sU,oU=AU,lU=AU,cU=AU,uU=AU,dU=AU,hU=AU,pU=AU,fU=JT.performance||{},gU=fU.now||fU.mozNow||fU.msNow||fU.oNow||fU.webkitNow||function(){return new Date().getTime()},mU=new Date,wU={nextTick:rU,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:oU,addListener:lU,once:cU,off:uU,removeListener:dU,removeAllListeners:hU,emit:pU,binding:function(r0){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(r0){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(r0){var e0=.001*gU.call(fU),n0=Math.floor(e0),a0=Math.floor(e0%1*1e9);return r0&&(n0-=r0[0],(a0-=r0[1])<0&&(n0--,a0+=1e9)),[n0,a0]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-mU)/1e3}};sU=typeof Object.create=="function"?function(r0,e0){r0.super_=e0,r0.prototype=Object.create(e0.prototype,{constructor:{value:r0,enumerable:!1,writable:!0,configurable:!0}})}:function(r0,e0){r0.super_=e0;var n0=function(){};n0.prototype=e0.prototype,r0.prototype=new n0,r0.prototype.constructor=r0};var bU=/%[sdj%]/g;function EU(r0){if(!NU(r0)){for(var e0=[],n0=0;n0<arguments.length;n0++)e0.push(SU(arguments[n0]));return e0.join(" ")}n0=1;for(var a0=arguments,i0=a0.length,s0=String(r0).replace(bU,function(l0){if(l0==="%%")return"%";if(n0>=i0)return l0;switch(l0){case"%s":return String(a0[n0++]);case"%d":return Number(a0[n0++]);case"%j":try{return JSON.stringify(a0[n0++])}catch{return"[Circular]"}default:return l0}}),o0=a0[n0];n0<i0;o0=a0[++n0])MU(o0)||!LU(o0)?s0+=" "+o0:s0+=" "+SU(o0);return s0}function yU(r0,e0){if(DU(JT.process))return function(){return yU(r0,e0).apply(this,arguments)};if(wU.noDeprecation===!0)return r0;var n0=!1;return function(){if(!n0){if(wU.throwDeprecation)throw new Error(e0);n0=!0}return r0.apply(this,arguments)}}var kU,vU={};function SU(r0,e0){var n0={seen:[],stylize:CU};return arguments.length>=3&&(n0.depth=arguments[2]),arguments.length>=4&&(n0.colors=arguments[3]),UU(e0)?n0.showHidden=e0:e0&&function(a0,i0){if(!i0||!LU(i0))return a0;for(var s0=Object.keys(i0),o0=s0.length;o0--;)a0[s0[o0]]=i0[s0[o0]]}(n0,e0),DU(n0.showHidden)&&(n0.showHidden=!1),DU(n0.depth)&&(n0.depth=2),DU(n0.colors)&&(n0.colors=!1),DU(n0.customInspect)&&(n0.customInspect=!0),n0.colors&&(n0.stylize=IU),xU(n0,r0,n0.depth)}function IU(r0,e0){var n0=SU.styles[e0];return n0?"\x1B["+SU.colors[n0][0]+"m"+r0+"\x1B["+SU.colors[n0][1]+"m":r0}function CU(r0,e0){return r0}function xU(r0,e0,n0){if(r0.customInspect&&e0&&zU(e0.inspect)&&e0.inspect!==SU&&(!e0.constructor||e0.constructor.prototype!==e0)){var a0=e0.inspect(n0,r0);return NU(a0)||(a0=xU(r0,a0,n0)),a0}var i0=function(p0,A0){if(DU(A0))return p0.stylize("undefined","undefined");if(NU(A0)){var m0="'"+JSON.stringify(A0).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return p0.stylize(m0,"string")}return typeof A0=="number"?p0.stylize(""+A0,"number"):UU(A0)?p0.stylize(""+A0,"boolean"):MU(A0)?p0.stylize("null","null"):void 0}(r0,e0);if(i0)return i0;var s0=Object.keys(e0),o0=function(p0){var A0={};return p0.forEach(function(m0,x0){A0[m0]=!0}),A0}(s0);if(r0.showHidden&&(s0=Object.getOwnPropertyNames(e0)),RU(e0)&&(s0.indexOf("message")>=0||s0.indexOf("description")>=0))return TU(e0);if(s0.length===0){if(zU(e0)){var l0=e0.name?": "+e0.name:"";return r0.stylize("[Function"+l0+"]","special")}if(OU(e0))return r0.stylize(RegExp.prototype.toString.call(e0),"regexp");if(_U(e0))return r0.stylize(Date.prototype.toString.call(e0),"date");if(RU(e0))return TU(e0)}var c0,u0,d0="",h0=!1,f0=["{","}"];return c0=e0,Array.isArray(c0)&&(h0=!0,f0=["[","]"]),zU(e0)&&(d0=" [Function"+(e0.name?": "+e0.name:"")+"]"),OU(e0)&&(d0=" "+RegExp.prototype.toString.call(e0)),_U(e0)&&(d0=" "+Date.prototype.toUTCString.call(e0)),RU(e0)&&(d0=" "+TU(e0)),s0.length!==0||h0&&e0.length!=0?n0<0?OU(e0)?r0.stylize(RegExp.prototype.toString.call(e0),"regexp"):r0.stylize("[Object]","special"):(r0.seen.push(e0),u0=h0?function(p0,A0,m0,x0,g0){for(var y0=[],b0=0,E0=A0.length;b0<E0;++b0)QU(A0,String(b0))?y0.push(BU(p0,A0,m0,x0,String(b0),!0)):y0.push("");
vendor: 4,408 bytes, lines 2405-2414
2405return g0.forEach(function(w0){w0.match(/^\d+$/)||y0.push(BU(p0,A0,m0,x0,w0,!0))}),y0}(r0,e0,n0,o0,s0):s0.map(function(p0){return BU(r0,e0,n0,o0,p0,h0)}),r0.seen.pop(),function(p0,A0,m0){return p0.reduce(function(x0,g0){return g0.indexOf(` 2406`),x0+g0.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?m0[0]+(A0===""?"":A0+` 2407 `)+" "+p0.join(`, 2408 `)+" "+m0[1]:m0[0]+A0+" "+p0.join(", ")+" "+m0[1]}(u0,d0,f0)):f0[0]+d0+f0[1]}function TU(r0){return"["+Error.prototype.toString.call(r0)+"]"}function BU(r0,e0,n0,a0,i0,s0){var o0,l0,c0;if((c0=Object.getOwnPropertyDescriptor(e0,i0)||{value:e0[i0]}).get?l0=c0.set?r0.stylize("[Getter/Setter]","special"):r0.stylize("[Getter]","special"):c0.set&&(l0=r0.stylize("[Setter]","special")),QU(a0,i0)||(o0="["+i0+"]"),l0||(r0.seen.indexOf(c0.value)<0?(l0=MU(n0)?xU(r0,c0.value,null):xU(r0,c0.value,n0-1)).indexOf(` 2409`)>-1&&(l0=s0?l0.split(` 2410`).map(function(u0){return" "+u0}).join(` 2411`).substr(2):` 2412`+l0.split(` 2413`).map(function(u0){return" "+u0}).join(` 2414`)):l0=r0.stylize("[Circular]","special")),DU(o0)){if(s0&&i0.match(/^\d+$/))return l0;(o0=JSON.stringify(""+i0)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o0=o0.substr(1,o0.length-2),o0=r0.stylize(o0,"name")):(o0=o0.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o0=r0.stylize(o0,"string"))}return o0+": "+l0}function UU(r0){return typeof r0=="boolean"}function MU(r0){return r0===null}function NU(r0){return typeof r0=="string"}function DU(r0){return r0===void 0}function OU(r0){return LU(r0)&&FU(r0)==="[object RegExp]"}function LU(r0){return typeof r0=="object"&&r0!==null}function _U(r0){return LU(r0)&&FU(r0)==="[object Date]"}function RU(r0){return LU(r0)&&(FU(r0)==="[object Error]"||r0 instanceof Error)}function zU(r0){return typeof r0=="function"}function FU(r0){return Object.prototype.toString.call(r0)}function QU(r0,e0){return Object.prototype.hasOwnProperty.call(r0,e0)}function PU(){this.head=null,this.tail=null,this.length=0}SU.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},SU.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},PU.prototype.push=function(r0){var e0={data:r0,next:null};this.length>0?this.tail.next=e0:this.head=e0,this.tail=e0,++this.length},PU.prototype.unshift=function(r0){var e0={data:r0,next:this.head};this.length===0&&(this.tail=e0),this.head=e0,++this.length},PU.prototype.shift=function(){if(this.length!==0){var r0=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r0}},PU.prototype.clear=function(){this.head=this.tail=null,this.length=0},PU.prototype.join=function(r0){if(this.length===0)return"";for(var e0=this.head,n0=""+e0.data;e0=e0.next;)n0+=r0+e0.data;return n0},PU.prototype.concat=function(r0){if(this.length===0)return lB.alloc(0);if(this.length===1)return this.head.data;for(var e0=lB.allocUnsafe(r0>>>0),n0=this.head,a0=0;n0;)n0.data.copy(e0,a0),a0+=n0.data.length,n0=n0.next;return e0};var VU=lB.isEncoding||function(r0){switch(r0&&r0.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function GU(r0){switch(this.encoding=(r0||"utf8").toLowerCase().replace(/[-_]/,""),function(e0){if(e0&&!VU(e0))throw new Error("Unknown encoding: "+e0)}(r0),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=KU;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=YU;break;default:return void(this.write=jU)}this.charBuffer=new lB(6),this.charReceived=0,this.charLength=0}function jU(r0){return r0.toString(this.encoding)}function KU(r0){this.charReceived=r0.length%2,this.charLength=this.charReceived?2:0}function YU(r0){this.charReceived=r0.length%3,this.charLength=this.charReceived?3:0}GU.prototype.write=function(r0){for(var e0="";this.charLength;){var n0=r0.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:r0.length;if(r0.copy(this.charBuffer,this.charReceived,0,n0),this.charReceived+=n0,this.charReceived<this.charLength)return"";if(r0=r0.slice(n0,r0.length),!((a0=(e0=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCo
vendor: 6,251 bytes, line 2414
2414deAt(e0.length-1))>=55296&&a0<=56319)){if(this.charReceived=this.charLength=0,r0.length===0)return e0;break}this.charLength+=this.surrogateSize,e0=""}this.detectIncompleteChar(r0);var a0,i0=r0.length;if(this.charLength&&(r0.copy(this.charBuffer,0,r0.length-this.charReceived,i0),i0-=this.charReceived),i0=(e0+=r0.toString(this.encoding,0,i0)).length-1,(a0=e0.charCodeAt(i0))>=55296&&a0<=56319){var s0=this.surrogateSize;return this.charLength+=s0,this.charReceived+=s0,this.charBuffer.copy(this.charBuffer,s0,0,s0),r0.copy(this.charBuffer,0,0,s0),e0.substring(0,i0)}return e0},GU.prototype.detectIncompleteChar=function(r0){for(var e0=r0.length>=3?3:r0.length;e0>0;e0--){var n0=r0[r0.length-e0];if(e0==1&&n0>>5==6){this.charLength=2;break}if(e0<=2&&n0>>4==14){this.charLength=3;break}if(e0<=3&&n0>>3==30){this.charLength=4;break}}this.charReceived=e0},GU.prototype.end=function(r0){var e0="";if(r0&&r0.length&&(e0=this.write(r0)),this.charReceived){var n0=this.charReceived,a0=this.charBuffer,i0=this.encoding;e0+=a0.slice(0,n0).toString(i0)}return e0},qU.ReadableState=WU;var HU,JU=(HU="stream",DU(kU)&&(kU=wU.env.NODE_DEBUG||""),HU=HU.toUpperCase(),vU[HU]||(new RegExp("\\b"+HU+"\\b","i").test(kU)?vU[HU]=function(){EU.apply(null,arguments)}:vU[HU]=function(){}),vU[HU]);function WU(r0,e0){r0=r0||{},this.objectMode=!!r0.objectMode,e0 instanceof SM&&(this.objectMode=this.objectMode||!!r0.readableObjectMode);var n0=r0.highWaterMark,a0=this.objectMode?16:16384;this.highWaterMark=n0||n0===0?n0:a0,this.highWaterMark=~~this.highWaterMark,this.buffer=new PU,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=r0.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r0.encoding&&(this.decoder=new GU(r0.encoding),this.encoding=r0.encoding)}function qU(r0){if(!(this instanceof qU))return new qU(r0);this._readableState=new WU(r0,this),this.readable=!0,r0&&typeof r0.read=="function"&&(this._read=r0.read),VT.call(this)}function ZU(r0,e0,n0,a0,i0){var s0=function(u0,d0){var h0=null;return lB.isBuffer(d0)||typeof d0=="string"||d0==null||u0.objectMode||(h0=new TypeError("Invalid non-string/buffer chunk")),h0}(e0,n0);if(s0)r0.emit("error",s0);else if(n0===null)e0.reading=!1,function(u0,d0){if(!d0.ended){if(d0.decoder){var h0=d0.decoder.end();h0&&h0.length&&(d0.buffer.push(h0),d0.length+=d0.objectMode?1:h0.length)}d0.ended=!0,eM(u0)}}(r0,e0);else if(e0.objectMode||n0&&n0.length>0)if(e0.ended&&!i0){var o0=new Error("stream.push() after EOF");r0.emit("error",o0)}else if(e0.endEmitted&&i0){var l0=new Error("stream.unshift() after end event");r0.emit("error",l0)}else{var c0;!e0.decoder||i0||a0||(n0=e0.decoder.write(n0),c0=!e0.objectMode&&n0.length===0),i0||(e0.reading=!1),c0||(e0.flowing&&e0.length===0&&!e0.sync?(r0.emit("data",n0),r0.read(0)):(e0.length+=e0.objectMode?1:n0.length,i0?e0.buffer.unshift(n0):e0.buffer.push(n0),e0.needReadable&&eM(r0))),function(u0,d0){d0.readingMore||(d0.readingMore=!0,rU(nM,u0,d0))}(r0,e0)}else i0||(e0.reading=!1);return function(u0){return!u0.ended&&(u0.needReadable||u0.length<u0.highWaterMark||u0.length===0)}(e0)}sU(qU,VT),qU.prototype.push=function(r0,e0){var n0=this._readableState;return n0.objectMode||typeof r0!="string"||(e0=e0||n0.defaultEncoding)!==n0.encoding&&(r0=lB.from(r0,e0),e0=""),ZU(this,n0,r0,e0,!1)},qU.prototype.unshift=function(r0){return ZU(this,this._readableState,r0,"",!0)},qU.prototype.isPaused=function(){return this._readableState.flowing===!1},qU.prototype.setEncoding=function(r0){return this._readableState.decoder=new GU(r0),this._readableState.encoding=r0,this};var XU=8388608;function $U(r0,e0){return r0<=0||e0.length===0&&e0.ended?0:e0.objectMode?1:r0!=r0?e0.flowing&&e0.length?e0.buffer.head.data.length:e0.length:(r0>e0.highWaterMark&&(e0.highWaterMark=function(n0){return n0>=XU?n0=XU:(n0--,n0|=n0>>>1,n0|=n0>>>2,n0|=n0>>>4,n0|=n0>>>8,n0|=n0>>>16,n0++),n0}(r0)),r0<=e0.length?r0:e0.ended?e0.length:(e0.needReadable=!0,0))}function eM(r0){var e0=r0._readableState;e0.needReadable=!1,e0.emittedReadable||(JU("emitReadable",e0.flowing),e0.emittedReadable=!0,e0.sync?rU(tM,r0):tM(r0))}function tM(r0){JU("emit readable"),r0.emit("readable"),iM(r0)}function nM(r0,e0){for(var n0=e0.length;!e0.reading&&!e0.flowing&&!e0.ended&&e0.length<e0.highWaterMark&&(JU("maybeReadMore read 0"),r0.read(0),n0!==e0.length);)n0=e0.length;e0.readingMore=!1}function aM(r0){JU("readable nexttick read 0"),r0.read(0)}function rM(r0,e0){e0.reading||(JU("resume read 0"),r0.read(0)),e0.resumeScheduled=!1,e0.awaitDrain=0,r0.emit("resume"),iM(r0),e0.flowing&&!e0.reading&&r0.read(0)}function iM(r0){var e0=r0._readableState;for(JU("flow",e0.flowing);e0.flowing&&r0.read()!==null;);}function AM(r0,e0){return e0.length===0?null:(e0.objectMode?n0=e0.buffer.shift():!r0||r0>=e0.length?(n0=e0.decoder?e0.buffer.join(""):e0.buffer.length===1?e0.buffer.head.data:e0.buffer.concat(e0.length),e0.buffer.clear()):n0=function(a0,i0,s0){var o0;return a0<i0.head.data.length?(o0=i0.head.data.slice(0,a0),i0.head.data=i0.head.data.slice(a0)):o0=a0===i0.head.data.length?i0.shift():s0?function(l0,c0){var u0=c0.head,d0=1,h0=u0.data;for(l0-=h0.length;u0=u0.next;){var f0=u0.data,p0=l0>f0.length?f0.length:l0;if(p0===f0.length?h0+=f0:h0+=f0.slice(0,l0),(l0-=p0)===0){p0===f0.length?(++d0,u0.next?c0.head=u0.next:c0.head=c0.tail=null):(c0.head=u0,u0.data=f0.slice(p0));break}++d0}return c0.length-=d0,h0}(a0,i0):function(l0,c0){var u0=lB.allocUnsafe(l0),d0=c0.head,h0=1;for(d0.data.copy(u0),l0-=d0.data.length;d0=d0.next;){var f0=d0.data,p0=l0>f0.length?f0.length:l0;if(f0.copy(u0,u0.length-l0,0,p0),(l0-=p0)===0){p0===f0.length?(++h0,d0.next?c0.head=d0.next:c0.head=c0.tail=null):(c0.head=d0,d0.data=f0.slice(p0));break}++h0}return c0.length-=h0,u0}(a0,i0),o0}(r0,e0.buffer,e0.decoder),n0);var n0}function sM(r0){var e0=r0._readableState;if(e0.length>0)throw new Error('"endReadable()" called on non-empty stream');e0.endEmitted||(e0.ended=!0,rU(oM,e0,r0))}function oM(r0,e0){r0.endEmitted||r0.length!==0||(r0.endEmitted=!0,e0.readable=!1,e0.emit("end"))}
2414function lM(r0,e0){for(var n0=0,a0=r0.length;n0<a0;n0++)if(r0[n0]===e0)return n0;return-1}function cM(){}function uM(r0,e0,n0){this.chunk=r0,this.encoding=e0,this.callback=n0,this.next=null}function dM(r0,e0){Object.defineProperty(this,"buffer",{get:yU(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),r0=r0||{},this.objectMode=!!r0.objectMode,e0 instanceof SM&&(this.objectMode=this.objectMode||!!r0.writableObjectMode);var n0=r0.highWaterMark,a0=this.objectMode?16:16384;this.highWaterMark=n0||n0===0?n0:a0,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i0=r0.decodeStrings===!1;this.decodeStrings=!i0,this.defaultEncoding=r0.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s0){(function(o0,l0){var c0=o0._writableState,u0=c0.sync,d0=c0.writecb;if(function(f0){f0.writing=!1,f0.writecb=null,f0.length-=f0.writelen,f0.writelen=0}(c0),l0)(function(f0,p0,A0,m0,x0){--p0.pendingcb,A0?rU(x0,m0):x0(m0),f0._writableState.errorEmitted=!0,f0.emit("error",m0)})(o0,c0,u0,l0,d0);else{var h0=mM(c0);h0||c0.corked||c0.bufferProcessing||!c0.bufferedRequest||gM(o0,c0),u0?rU(fM,o0,c0,h0,d0):fM(o0,c0,h0,d0)}})(e0,s0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new EM(this)}function hM(r0){if(!(this instanceof hM||this instanceof SM))return new hM(r0);this._writableState=new dM(r0,this),this.writable=!0,r0&&(typeof r0.write=="function"&&(this._write=r0.write),typeof r0.writev=="function"&&(this._writev=r0.writev)),VT.call(this)}function pM(r0,e0,n0,a0,i0,s0,o0){e0.writelen=a0,e0.writecb=o0,e0.writing=!0,e0.sync=!0,n0?r0._writev(i0,e0.onwrite):r0._write(i0,s0,e0.onwrite),e0.sync=!1}function fM(r0,e0,n0,a0){n0||function(i0,s0){s0.length===0&&s0.needDrain&&(s0.needDrain=!1,i0.emit("drain"))}(r0,e0),e0.pendingcb--,a0(),bM(r0,e0)}function gM(r0,e0){e0.bufferProcessing=!0;var n0=e0.bufferedRequest;if(r0._writev&&n0&&n0.next){var a0=e0.bufferedRequestCount,i0=new Array(a0),s0=e0.corkedRequestsFree;s0.entry=n0;for(var o0=0;n0;)i0[o0]=n0,n0=n0.next,o0+=1;pM(r0,e0,!0,e0.length,i0,"",s0.finish),e0.pendingcb++,e0.lastBufferedRequest=null,s0.next?(e0.corkedRequestsFree=s0.next,s0.next=null):e0.corkedRequestsFree=new EM(e0)}else{for(;n0;){var l0=n0.chunk,c0=n0.encoding,u0=n0.callback;if(pM(r0,e0,!1,e0.objectMode?1:l0.length,l0,c0,u0),n0=n0.next,e0.writing)break}n0===null&&(e0.lastBufferedRequest=null)}e0.bufferedRequestCount=0,e0.bufferedRequest=n0,e0.bufferProcessing=!1}function mM(r0){return r0.ending&&r0.length===0&&r0.bufferedRequest===null&&!r0.finished&&!r0.writing}function wM(r0,e0){e0.prefinished||(e0.prefinished=!0,r0.emit("prefinish"))}function bM(r0,e0){var n0=mM(e0);return n0&&(e0.pendingcb===0?(wM(r0,e0),e0.finished=!0,r0.emit("finish")):wM(r0,e0)),n0}function EM(r0){var e0=this;this.next=null,this.entry=null,this.finish=function(n0){var a0=e0.entry;for(e0.entry=null;a0;){var i0=a0.callback;r0.pendingcb--,i0(n0),a0=a0.next}r0.corkedRequestsFree?r0.corkedRequestsFree.next=e0:r0.corkedRequestsFree=e0}}qU.prototype.read=function(r0){JU("read",r0),r0=parseInt(r0,10);var e0=this._readableState,n0=r0;if(r0!==0&&(e0.emittedReadable=!1),r0===0&&e0.needReadable&&(e0.length>=e0.highWaterMark||e0.ended))return JU("read: emitReadable",e0.length,e0.ended),e0.length===0&&e0.ended?sM(this):eM(this),null;if((r0=$U(r0,e0))===0&&e0.ended)return e0.length===0&&sM(this),null;var a0,i0=e0.needReadable;return JU("need readable",i0),(e0.length===0||e0.length-r0<e0.highWaterMark)&&JU("length less than watermark",i0=!0),e0.ended||e0.reading?JU("reading or ended",i0=!1):i0&&(JU("do read"),e0.reading=!0,e0.sync=!0,e0.length===0&&(e0.needReadable=!0),this._read(e0.highWaterMark),e0.sync=!1,e0.reading||(r0=$U(n0,e0))),(a0=r0>0?AM(r0,e0):null)===null?(e0.needReadable=!0,r0=0):e0.length-=r0,e0.length===0&&(e0.ended||(e0.needReadable=!0),n0!==r0&&e0.ended&&sM(this)),a0!==null&&this.emit
2414("data",a0),a0},qU.prototype._read=function(r0){this.emit("error",new Error("not implemented"))},qU.prototype.pipe=function(r0,e0){var n0=this,a0=this._readableState;switch(a0.pipesCount){case 0:a0.pipes=r0;break;case 1:a0.pipes=[a0.pipes,r0];break;default:a0.pipes.push(r0)}a0.pipesCount+=1,JU("pipe count=%d opts=%j",a0.pipesCount,e0);var i0=e0&&e0.end===!1?u0:o0;function s0(x0){JU("onunpipe"),x0===n0&&u0()}function o0(){JU("onend"),r0.end()}a0.endEmitted?rU(i0):n0.once("end",i0),r0.on("unpipe",s0);var l0=function(x0){return function(){var g0=x0._readableState;JU("pipeOnDrain",g0.awaitDrain),g0.awaitDrain&&g0.awaitDrain--,g0.awaitDrain===0&&x0.listeners("data").length&&(g0.flowing=!0,iM(x0))}}(n0);r0.on("drain",l0);var c0=!1;function u0(){JU("cleanup"),r0.removeListener("close",p0),r0.removeListener("finish",A0),r0.removeListener("drain",l0),r0.removeListener("error",f0),r0.removeListener("unpipe",s0),n0.removeListener("end",o0),n0.removeListener("end",u0),n0.removeListener("data",h0),c0=!0,!a0.awaitDrain||r0._writableState&&!r0._writableState.needDrain||l0()}var d0=!1;function h0(x0){JU("ondata"),d0=!1,r0.write(x0)!==!1||d0||((a0.pipesCount===1&&a0.pipes===r0||a0.pipesCount>1&&lM(a0.pipes,r0)!==-1)&&!c0&&(JU("false write response, pause",n0._readableState.awaitDrain),n0._readableState.awaitDrain++,d0=!0),n0.pause())}function f0(x0){JU("onerror",x0),m0(),r0.removeListener("error",f0),r0.listeners("error").length===0&&r0.emit("error",x0)}function p0(){r0.removeListener("finish",A0),m0()}function A0(){JU("onfinish"),r0.removeListener("close",p0),m0()}function m0(){JU("unpipe"),n0.unpipe(r0)}return n0.on("data",h0),function(x0,g0,y0){if(typeof x0.prependListener=="function")return x0.prependListener(g0,y0);x0._events&&x0._events[g0]?Array.isArray(x0._events[g0])?x0._events[g0].unshift(y0):x0._events[g0]=[y0,x0._events[g0]]:x0.on(g0,y0)}(r0,"error",f0),r0.once("close",p0),r0.once("finish",A0),r0.emit("pipe",n0),a0.flowing||(JU("pipe resume"),n0.resume()),r0},qU.prototype.unpipe=function(r0){var e0=this._readableState;if(e0.pipesCount===0)return this;if(e0.pipesCount===1)return r0&&r0!==e0.pipes||(r0||(r0=e0.pipes),e0.pipes=null,e0.pipesCount=0,e0.flowing=!1,r0&&r0.emit("unpipe",this)),this;if(!r0){var n0=e0.pipes,a0=e0.pipesCount;e0.pipes=null,e0.pipesCount=0,e0.flowing=!1;for(var i0=0;i0<a0;i0++)n0[i0].emit("unpipe",this);return this}var s0=lM(e0.pipes,r0);return s0===-1||(e0.pipes.splice(s0,1),e0.pipesCount-=1,e0.pipesCount===1&&(e0.pipes=e0.pipes[0]),r0.emit("unpipe",this)),this},qU.prototype.on=function(r0,e0){var n0=VT.prototype.on.call(this,r0,e0);if(r0==="data")this._readableState.flowing!==!1&&this.resume();else if(r0==="readable"){var a0=this._readableState;a0.endEmitted||a0.readableListening||(a0.readableListening=a0.needReadable=!0,a0.emittedReadable=!1,a0.reading?a0.length&&eM(this):rU(aM,this))}return n0},qU.prototype.addListener=qU.prototype.on,qU.prototype.resume=function(){var r0=this._readableState;return r0.flowing||(JU("resume"),r0.flowing=!0,function(e0,n0){n0.resumeScheduled||(n0.resumeScheduled=!0,rU(rM,e0,n0))}(this,r0)),this},qU.prototype.pause=function(){return JU("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(JU("pause"),this._readableState.flowing=!1,this.emit("pause")),this},qU.prototype.wrap=function(r0){var e0=this._readableState,n0=!1,a0=this;for(var i0 in r0.on("end",function(){if(JU("wrapped end"),e0.decoder&&!e0.ended){var s0=e0.decoder.end();s0&&s0.length&&a0.push(s0)}a0.push(null)}),r0.on("data",function(s0){JU("wrapped data"),e0.decoder&&(s0=e0.decoder.write(s0)),e0.objectMode&&s0==null||(e0.objectMode||s0&&s0.length)&&(a0.push(s0)||(n0=!0,r0.pause()))}),r0)this[i0]===void 0&&typeof r0[i0]=="function"&&(this[i0]=function(s0){return function(){return r0[s0].apply(r0,arguments)}}(i0));return function(s0,o0){for(var l0=0,c0=s0.length;l0<c0;l0++)o0(s0[l0])}(["error","close","destroy","pause","resume"],function(s0){r0.on(s0,a0.emit.bind(a0,s0))}),a0._read=function(s0){JU("wrapped _read",s0),n0&&(n0=!1,r0.resume())},a0},qU._fromList=AM,hM.WritableState=dM,sU(hM,VT),dM.prototype.getBuffer=function(){for(var r0=this.bufferedRequest,e0=[];r0;)e0.push(r0),r0=r0.next;return e0}
2414,hM.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},hM.prototype.write=function(r0,e0,n0){var a0=this._writableState,i0=!1;return typeof e0=="function"&&(n0=e0,e0=null),lB.isBuffer(r0)?e0="buffer":e0||(e0=a0.defaultEncoding),typeof n0!="function"&&(n0=cM),a0.ended?function(s0,o0){var l0=new Error("write after end");s0.emit("error",l0),rU(o0,l0)}(this,n0):function(s0,o0,l0,c0){var u0=!0,d0=!1;return l0===null?d0=new TypeError("May not write null values to stream"):lB.isBuffer(l0)||typeof l0=="string"||l0===void 0||o0.objectMode||(d0=new TypeError("Invalid non-string/buffer chunk")),d0&&(s0.emit("error",d0),rU(c0,d0),u0=!1),u0}(this,a0,r0,n0)&&(a0.pendingcb++,i0=function(s0,o0,l0,c0,u0){l0=function(p0,A0,m0){return p0.objectMode||p0.decodeStrings===!1||typeof A0!="string"||(A0=lB.from(A0,m0)),A0}(o0,l0,c0),lB.isBuffer(l0)&&(c0="buffer");var d0=o0.objectMode?1:l0.length;o0.length+=d0;var h0=o0.length<o0.highWaterMark;if(h0||(o0.needDrain=!0),o0.writing||o0.corked){var f0=o0.lastBufferedRequest;o0.lastBufferedRequest=new uM(l0,c0,u0),f0?f0.next=o0.lastBufferedRequest:o0.bufferedRequest=o0.lastBufferedRequest,o0.bufferedRequestCount+=1}else pM(s0,o0,!1,d0,l0,c0,u0);return h0}(this,a0,r0,e0,n0)),i0},hM.prototype.cork=function(){this._writableState.corked++},hM.prototype.uncork=function(){var r0=this._writableState;r0.corked&&(r0.corked--,r0.writing||r0.corked||r0.finished||r0.bufferProcessing||!r0.bufferedRequest||gM(this,r0))},hM.prototype.setDefaultEncoding=function(r0){if(typeof r0=="string"&&(r0=r0.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r0+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+r0);return this._writableState.defaultEncoding=r0,this},hM.prototype._write=function(r0,e0,n0){n0(new Error("not implemented"))},hM.prototype._writev=null,hM.prototype.end=function(r0,e0,n0){var a0=this._writableState;typeof r0=="function"?(n0=r0,r0=null,e0=null):typeof e0=="function"&&(n0=e0,e0=null),r0!=null&&this.write(r0,e0),a0.corked&&(a0.corked=1,this.uncork()),a0.ending||a0.finished||function(i0,s0,o0){s0.ending=!0,bM(i0,s0),o0&&(s0.finished?rU(o0):i0.once("finish",o0)),s0.ended=!0,i0.writable=!1}(this,a0,n0)},sU(SM,qU);for(var yM=Object.keys(hM.prototype),kM=0;kM<yM.length;kM++){var vM=yM[kM];SM.prototype[vM]||(SM.prototype[vM]=hM.prototype[vM])}function SM(r0){if(!(this instanceof SM))return new SM(r0);qU.call(this,r0),hM.call(this,r0),r0&&r0.readable===!1&&(this.readable=!1),r0&&r0.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,r0&&r0.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",IM)}function IM(){this.allowHalfOpen||this._writableState.ended||rU(CM,this)}function CM(r0){r0.end()}function xM(r0){this.afterTransform=function(e0,n0){return function(a0,i0,s0){var o0=a0._transformState;o0.transforming=!1;var l0=o0.writecb;if(!l0)return a0.emit("error",new Error("no writecb in Transform class"));o0.writechunk=null,o0.writecb=null,s0!=null&&a0.push(s0),l0(i0);var c0=a0._readableState;c0.reading=!1,(c0.needReadable||c0.length<c0.highWaterMark)&&a0._read(c0.highWaterMark)}(r0,e0,n0)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function TM(r0){if(!(this instanceof TM))return new TM(r0);SM.call(this,r0),this._transformState=new xM(this);var e0=this;this._readableState.needReadable=!0,this._readableState.sync=!1,r0&&(typeof r0.transform=="function"&&(this._transform=r0.transform),typeof r0.flush=="function"&&(this._flush=r0.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(n0){BM(e0,n0)}):BM(e0)})}function BM(r0,e0){if(e0)return r0.emit("error",e0);var n0=r0._writableState,a0=r0._transformState;if(n0.length)throw new Error("Calling transform done when ws.length != 0");if(a0.transforming)throw new Error("Calling transform done when still transforming");return r0.push(null)}function UM(r0){if(!(this instanceof UM))return new UM(r0);TM.call(this,r0)}function MM(){VT.call(this)}sU(TM,SM),TM.prototype.push=function(r0,e0){return this._transformState.needTransform=!1,SM.prototype.push.call(this,r0,e0)},TM.prototype._transform=function(r0,e0,n0){throw new Error("Not implemented")},TM.prototype._write=function(r0,e0,n0){var a0=this._transformState;if(a0.writecb=n0,a0.writechunk=r0,a0.writeencoding=e0,!a0.transforming){var i0=this._readableState;(a0.needTransform||i0.needReadable||i0.length<i0.highWaterMark)&&this._read(i0.highWaterMark)}},TM.prototype._read=function(r0){var e0=this._transformState;e0.writechunk!==null&&e0.writecb&&!e0.transforming?(e0.transforming=!0,this._transform(e0.writechunk,e0.writeencoding,e0.afterTransform)):e0.needTransform=!0},sU(UM,TM),UM.prototype._transform=function(r0,e0,n0){n0(null,r0)},sU(MM,VT),MM.Readable=qU,MM.Writable=hM,MM.Duplex=SM,MM.Transform=TM,MM.PassThrough=UM,MM.Stream=MM,MM.prototype.pipe=function(r0,e0){var n0=this;function a0(d0){r0.writable&&r0.write(d0)===!1&&n0.pause&&n0.pause()}function i0(){n0.readable&&n0.resume&&n0.resume()}n0.on("data",a0),r0.on("drain",i0),r0._isStdio||e0&&e0.end===!1||(n0.on("end",o0),n0.on("close",l0));var s0=!1;function o0(){s0||(s0=!0,r0.end())}function l0(){s0||(s0=!0,typeof r0.destroy=="function"&&r0.destroy())}function c0(d0){if(u0(),VT.listenerCount(this,"error")===0)throw d0}function u0(){n0.removeListener("data",a0),r0.removeListener("drain",i0),n0.removeListener("end",o0),n0.removeListener("close",l0),n0.removeListener("error",c0),r0.removeListener("error",c0),n0.removeListener("end",u
24140),n0.removeListener("close",u0),r0.removeListener("close",u0)}return n0.on("error",c0),r0.on("error",c0),n0.on("end",u0),n0.on("close",u0),r0.on("close",u0),r0.emit("pipe",n0),r0};var NM,DM,OM=n(Object.freeze({__proto__:null,Duplex:SM,PassThrough:UM,Readable:qU,Stream:MM,Transform:TM,Writable:hM,default:MM}));if(QT.base64=!0,QT.array=!0,QT.string=!0,QT.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",QT.nodebuffer=typeof Buffer<"u",QT.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")QT.blob=!1;else{var LM=new ArrayBuffer(0);try{QT.blob=new Blob([LM],{type:"application/zip"}).size===0}catch{try{var _M=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);_M.append(LM),QT.blob=_M.getBlob("application/zip").size===0}catch{QT.blob=!1}}}try{QT.nodestream=!!(DM?NM:(DM=1,NM=OM)).Readable}catch(r0){QT.nodestream=!1}var RM,zM={};function FM(){if(RM)return zM;RM=1;var r0=JM(),e0=QT,n0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return zM.encode=function(a0){for(var i0,s0,o0,l0,c0,u0,d0,h0=[],f0=0,p0=a0.length,A0=p0,m0=r0.getTypeOf(a0)!=="string";f0<a0.length;)A0=p0-f0,m0?(i0=a0[f0++],s0=f0<p0?a0[f0++]:0,o0=f0<p0?a0[f0++]:0):(i0=a0.charCodeAt(f0++),s0=f0<p0?a0.charCodeAt(f0++):0,o0=f0<p0?a0.charCodeAt(f0++):0),l0=i0>>2,c0=(3&i0)<<4|s0>>4,u0=A0>1?(15&s0)<<2|o0>>6:64,d0=A0>2?63&o0:64,h0.push(n0.charAt(l0)+n0.charAt(c0)+n0.charAt(u0)+n0.charAt(d0));return h0.join("")},zM.decode=function(a0){var i0,s0,o0,l0,c0,u0,d0=0,h0=0;if(a0.substr(0,5)==="data:")throw new Error("Invalid base64 input, it looks like a data url.");var f0,p0=3*(a0=a0.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(a0.charAt(a0.length-1)===n0.charAt(64)&&p0--,a0.charAt(a0.length-2)===n0.charAt(64)&&p0--,p0%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f0=e0.uint8array?new Uint8Array(0|p0):new Array(0|p0);d0<a0.length;)i0=n0.indexOf(a0.charAt(d0++))<<2|(l0=n0.indexOf(a0.charAt(d0++)))>>
vendor: 9,557 bytes, line 2414
24144,s0=(15&l0)<<4|(c0=n0.indexOf(a0.charAt(d0++)))>>2,o0=(3&c0)<<6|(u0=n0.indexOf(a0.charAt(d0++))),f0[h0++]=i0,c0!==64&&(f0[h0++]=s0),u0!==64&&(f0[h0++]=o0);return f0},zM}var QM,PM,VM,GM,jM,KM={isNode:typeof Buffer<"u",newBufferFrom:function(r0,e0){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r0,e0);if(typeof r0=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r0,e0)},allocBuffer:function(r0){if(Buffer.alloc)return Buffer.alloc(r0);var e0=new Buffer(r0);return e0.fill(0),e0},isBuffer:function(r0){return Buffer.isBuffer(r0)},isStream:function(r0){return r0&&typeof r0.on=="function"&&typeof r0.pause=="function"&&typeof r0.resume=="function"}};jM=typeof Promise<"u"?Promise:function(){if(GM)return VM;GM=1;var r0=function(){if(PM)return QM;PM=1;var f0,p0,A0=e.MutationObserver||e.WebKitMutationObserver;if(A0){var m0=0,x0=new A0(E0),g0=e.document.createTextNode("");x0.observe(g0,{characterData:!0}),f0=function(){g0.data=m0=++m0%2}}else if(e.setImmediate||e.MessageChannel===void 0)f0="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var w0=e.document.createElement("script");w0.onreadystatechange=function(){E0(),w0.onreadystatechange=null,w0.parentNode.removeChild(w0),w0=null},e.document.documentElement.appendChild(w0)}:function(){setTimeout(E0,0)};else{var y0=new e.MessageChannel;y0.port1.onmessage=E0,f0=function(){y0.port2.postMessage(0)}}var b0=[];function E0(){var w0,v0;p0=!0;for(var S0=b0.length;S0;){for(v0=b0,b0=[],w0=-1;++w0<S0;)v0[w0]();S0=b0.length}p0=!1}return QM=function(w0){b0.push(w0)!==1||p0||f0()}}();function e0(){}var n0={},a0=["REJECTED"],i0=["FULFILLED"],s0=["PENDING"];function o0(f0){if(typeof f0!="function")throw new TypeError("resolver must be a function");this.state=s0,this.queue=[],this.outcome=void 0,f0!==e0&&d0(this,f0)}function l0(f0,p0,A0){this.promise=f0,typeof p0=="function"&&(this.onFulfilled=p0,this.callFulfilled=this.otherCallFulfilled),typeof A0=="function"&&(this.onRejected=A0,this.callRejected=this.otherCallRejected)}function c0(f0,p0,A0){r0(function(){var m0;try{m0=p0(A0)}catch(x0){return n0.reject(f0,x0)}m0===f0?n0.reject(f0,new TypeError("Cannot resolve promise with itself")):n0.resolve(f0,m0)})}function u0(f0){var p0=f0&&f0.then;if(f0&&(typeof f0=="object"||typeof f0=="function")&&typeof p0=="function")return function(){p0.apply(f0,arguments)}}function d0(f0,p0){var A0=!1;function m0(y0){A0||(A0=!0,n0.reject(f0,y0))}function x0(y0){A0||(A0=!0,n0.resolve(f0,y0))}var g0=h0(function(){p0(x0,m0)});g0.status==="error"&&m0(g0.value)}function h0(f0,p0){var A0={};try{A0.value=f0(p0),A0.status="success"}catch(m0){A0.status="error",A0.value=m0}return A0}return VM=o0,o0.prototype.finally=function(f0){if(typeof f0!="function")return this;var p0=this.constructor;return this.then(function(A0){return p0.resolve(f0()).then(function(){return A0})},function(A0){return p0.resolve(f0()).then(function(){throw A0})})},o0.prototype.catch=function(f0){return this.then(null,f0)},o0.prototype.then=function(f0,p0){if(typeof f0!="function"&&this.state===i0||typeof p0!="function"&&this.state===a0)return this;var A0=new this.constructor(e0);return this.state!==s0?c0(A0,this.state===i0?f0:p0,this.outcome):this.queue.push(new l0(A0,f0,p0)),A0},l0.prototype.callFulfilled=function(f0){n0.resolve(this.promise,f0)},l0.prototype.otherCallFulfilled=function(f0){c0(this.promise,this.onFulfilled,f0)},l0.prototype.callRejected=function(f0){n0.reject(this.promise,f0)},l0.prototype.otherCallRejected=function(f0){c0(this.promise,this.onRejected,f0)},n0.resolve=function(f0,p0){var A0=h0(u0,p0);if(A0.status==="error")return n0.reject(f0,A0.value);var m0=A0.value;if(m0)d0(f0,m0);else{f0.state=i0,f0.outcome=p0;for(var x0=-1,g0=f0.queue.length;++x0<g0;)f0.queue[x0].callFulfilled(p0)}return f0},n0.reject=function(f0,p0){f0.state=a0,f0.outcome=p0;for(var A0=-1,m0=f0.queue.length;++A0<m0;)f0.queue[A0].callRejected(p0);return f0},o0.resolve=function(f0){return f0 instanceof this?f0:n0.resolve(new this(e0),f0)},o0.reject=function(f0){var p0=new this(e0);return n0.reject(p0,f0)},o0.all=function(f0){var p0=this;if(Object.prototype.toString.call(f0)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A0=f0.length,m0=!1;if(!A0)return this.resolve([]);for(var x0=new Array(A0),g0=0,y0=-1,b0=new this(e0);++y0<A0;)E0(f0[y0],y0);return b0;function E0(w0,v0){p0.resolve(w0).then(function(S0){x0[v0]=S0,++g0!==A0||m0||(m0=!0,n0.resolve(b0,x0))},function(S0){m0||(m0=!0,n0.reject(b0,S0))})}},o0.race=function(f0){var p0=this;if(Object.prototype.toString.call(f0)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A0=f0.length,m0=!1;if(!A0)return this.resolve([]);for(var x0=-1,g0=new this(e0);++x0<A0;)y0(f0[x0]);return g0;function y0(b0){p0.resolve(b0).then(function(E0){m0||(m0=!0,n0.resolve(g0,E0))},function(E0){m0||(m0=!0,n0.reject(g0,E0))})}},VM}();var YM,HM={Promise:jM};function JM(){return YM||(YM=1,function(r0){var e0=QT,n0=FM(),a0=KM,i0=HM;function s0(h0){return h0}function o0(h0,f0){for(var p0=0;p0<h0.length;++p0)f0[p0]=255&h0.charCodeAt(p0);return f0}r0.newBlob=function(h0,f0){r0.checkSupport("blob");try{return new Blob([h0],{type:f0})}catch{try{var p0=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p0.append(h0),p0.getBlob(f0)}catch{throw new Error("Bug : can't construct the Blob.")}}};var l0={stringifyByChunk:function(h0,f0,p0){var A0=[],m0=0,x0=h0.length;if(x0<=p0)return String.fromCharCode.apply(null,h0);for(;m0<x0;)f0==="array"||f0==="nodebuffer"?A0.push(String.fromCharCode.apply(null,h0.slice(m0,Math.min(m0+p0,x0)))):A0.push(String.fromCharCode.apply(null,h0.subarray(m0,Math.min(m0+p0,x0)))),m0+=p0;return A0.join("")},stringifyByChar:function(h0){for(var f0="",p0=0;p0<h0.length;p0++)f0+=String.fromCharCode(h0[p0]);return f0},applyCanBeUsed:{uint8array:function(){try{return e0.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return e0.nodebuffer&&String.fromCharCode.apply(null,a0.allocBuffer(1)).length===1}catch{return!1}}()}};function c0(h0){var f0=65536,p0=r0.getTypeOf(h0),A0=!0;if(p0==="uint8array"?A0=l0.applyCanBeUsed.uint8array:p0==="nodebuffer"&&(A0=l0.applyCanBeUsed.nodebuffer),A0)for(;f0>1;)try{return l0.stringifyByChunk(h0,p0,f0)}catch{f0=Math.floor(f0/2)}return l0.stringifyByChar(h0)}function u0(h0,f0){for(var p0=0;p0<h0.length;p0++)f0[p0]=h0[p0];return f0}r0.applyFromCharCode=c0;var d0={};d0.string={string:s0,array:function(h0){return o0(h0,new Array(h0.length))},arraybuffer:function(h0){return d0.string.uint8array(h0).buffer},uint8array:function(h0){return o0(h0,new Uint8Array(h0.length))},nodebuffer:function(h0){return o0(h0,a0.allocBuffer(h0.length))}},d0.array={string:c0,array:s0,arraybuffer:function(h0){return new Uint8Array(h0).buffer},uint8array:function(h0){return new Uint8Array(h0)},nodebuffer:function(h0){return a0.newBufferFrom(h0)}},d0.arraybuffer={string:function(h0){return c0(new Uint8Array(h0))},array:function(h0){return u0(new Uint8Array(h0),new Array(h0.byteLength))},arraybuffer:s0,uint8array:function(h0){return new Uint8Array(h0)},nodebuffer:function(h0){return a0.newBufferFrom(new Uint8Array(h0))}},d0.uint8array={string:c0,array:function(h0){return u0(h0,new Array(h0.length))},arraybuffer:function(h0){return h0.buffer},uint8array:s0,nodebuffer:function(h0){return a0.newBufferFrom(h0)}},d0.nodebuffer={string:c0,array:function(h0){return u0(h0,new Array(h0.length))},arraybuffer:function(h0){return d0.nodebuffer.uint8array(h0).buffer},uint8array:function(h0){return u0(h0,new Uint8Array(h0.length))},nodebuffer:s0},r0.transformTo=function(h0,f0){if(f0||(f0=""),!h0)return f0;r0.checkSupport(h0);var p0=r0.getTypeOf(f0);return d0[p0][h0](f0)},r0.resolve=function(h0){for(var f0=h0.split("/"),p0=[],A0=0;A0<f0.length;A0++){var m0=f0[A0];m0==="."||m0===""&&A0!==0&&A0!==f0.length-1||(m0===".."?p0.pop():p0.push(m0))}return p0.join("/")},r0.getTypeOf=function(h0){return typeof h0=="string"?"string":Object.prototype.toString.call(h0)==="[object Array]"?"array":e0.nodebuffer&&a0.isBuffer(h0)?"nodebuffer":e0.uint8array&&h0 instanceof Uint8Array?"uint8array":e0.arraybuffer&&h0 instanceof ArrayBuffer?"arraybuffer":void 0},r0.checkSupport=function(h0){if(!e0[h0.toLowerCase()])throw new Error(h0+" is not supported by this platform")},r0.MAX_VALUE_16BITS=65535,r0.MAX_VALUE_32BITS=-1,r0.pretty=function(h0){var f0,p0,A0="";for(p0=0;p0<(h0||"").length;p0++)A0+="\\x"+((f0=h0.charCodeAt(p0))<16?"0":"")+f0.toString(16).toUpperCase();return A0},r0.delay=function(h0,f0,p0){setImmediate(function(){h0.apply(p0||null,f0||[])})},r0.inherits=function(h0,f0){var p0=function(){};p0.prototype=f0.prototype,h0.prototype=new p0},r0.extend=function(){var h0,f0,p0={};for(h0=0;h0<arguments.length;h0++)for(f0 in arguments[h0])Object.prototype.hasOwnProperty.call(arguments[h0],f0)&&p0[f0]===void 0&&(p0[f0]=arguments[h0][f0]);return p0},r0.prepareContent=function(h0,f0,p0,A0,m0){var x0=i0.Promise.resolve(f0).then(function(g0){return e0.blob&&(g0 instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(g0))!==-1)&&typeof FileReader<"u"?new i0.Promise(function(y0,b0){var E0=new FileReader;E0.onload=function(w0){y0(w0.target.result)},E0.onerror=function(w0){b0(w0.target.error)},E0.readAsArrayBuffer(g0)}):g0});return x0.then(function(g0){var y0,b0=r0.getTypeOf(g0);return b0?(b0==="arraybuffer"?g0=r0.transformTo("uint8array",g0):b0==="str
2414ing"&&(m0?g0=n0.decode(g0):p0&&A0!==!0&&(g0=o0(y0=g0,e0.uint8array?new Uint8Array(y0.length):new Array(y0.length)))),g0):i0.Promise.reject(new Error("Can't read the data of '"+h0+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}}(FT)),FT}t(JM()).delay=function(r0,e0,n0){(function(a0){const i0=new Array(arguments.length-1);for(let o0=0;o0<i0.length;o0++)i0[o0]=arguments[o0+1];const s0={callback:a0,args:i0};LT[OT]=s0,_T(OT),OT++})(()=>{r0.apply(n0||null,e0||[])})};class WM extends DT{constructor(e0){super({...e0,requireJSZip:async()=>i,requireMusicMetadata:async()=>ca})}}window.Webamp=WM;const qM=Te("music-metadata:id3v2:frame-parser"),ZM="latin1";function XM(r0){return r0==="RX"?"Remix":r0==="CR"?"Cover":r0.match(/^\d*$/)?na[Number.parseInt(r0)]:void 0}class $M{constructor(e0,n0){this.major=e0,this.warningCollector=n0}readData(e0,n0,a0){if(e0.length===0)return void this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${n0}`);const{encoding:i0,bom:s0}=Ht(e0,0),o0=e0.length;let l0=0,c0=[];const u0=$M.getNullTerminatorLength(i0);let d0;switch(qM(`Parsing tag type=${n0}, encoding=${i0}, bom=${s0}`),n0!=="TXXX"&&n0[0]==="T"?"T*":n0){case"T*":case"GRP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let h0;try{h0=Rt(e0.slice(1),i0).replace(/\x00+$/,"")}catch(f0){if(f0 instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${n0} header has invalid string value: ${f0.message}`);break}throw f0}switch(n0){case"TMCL":case"TIPL":case"IPLS":c0=$M.functionList(this.splitValue(n0,h0));break;case"TRK":case"TRCK":case"TPOS":c0=h0;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":c0=this.splitValue(n0,h0);break;case"TCO":case"TCON":c0=this.splitValue(n0,h0).map(f0=>function(p0){const A0=[];let m0,x0="";for(const g0 of p0)if(typeof m0=="string")if(g0==="("&&m0==="")x0+="(",m0=void 0;else if(g0===")"){x0!==""&&(A0.push(x0),x0="");const y0=XM(m0);y0&&A0.push(y0),m0=void 0}else m0+=g0;else g0==="("?m0="":x0+=g0;return x0&&(A0.length===0&&x0.match(/^\d*$/)&&(x0=XM(x0)),x0&&A0.push(x0)),A0}(f0)).reduce((f0,p0)=>f0.concat(p0),[]);break;case"PCS":case"PCST":c0=this.major>=4?this.splitValue(n0,h0):[h0],c0=Array.isArray(c0)&&c0[0]===""?1:0;break;default:c0=this.major>=4?this.splitValue(n0,h0):[h0]}break}case"TXXX":{const h0=$M.readIdentifierAndData(e0,l0+1,o0,i0);c0={description:h0.id,text:this.splitValue(n0,Rt(h0.data,i0).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(a0){const h0={};switch(l0+=1,this.major){case 2:h0.format=Rt(e0.slice(l0,l0+3),"latin1"),l0+=3;break;case 3:case 4:d0=Lt(e0,l0,o0,ZM),h0.format=Rt(e0.slice(l0,d0),ZM),l0=d0+1;break;default:throw function(f0){throw new eN(`Unexpected majorVer: ${f0}`)}(this.major)}h0.format=$M.fixPictureMimeType(h0.format),h0.type=Pt[e0[l0]],l0+=1,d0=Lt(e0,l0,o0,i0),h0.description=Rt(e0.slice(l0,d0),i0),l0=d0+u0,h0.data=e0.slice(l0,o0),c0=h0}break;case"CNT":case"PCNT":c0=C.get(e0,0);break;case"SYLT":{const h0=((A0,m0)=>{const x0=Jt(A0,m0);return{encoding:x0.encoding,language:x0.language,timeStampFormat:E.get(A0,m0+4),contentType:E.get(A0,m0+5)}})(e0,0);l0+=6;const f0={descriptor:"",language:h0.language,contentType:h0.contentType,timeStampFormat:h0.timeStampFormat,syncText:[]};let p0=!1;for(;l0<o0;){const A0=$M.readNullTerminatedString(e0.subarray(l0),h0.encoding);if(l0+=A0.len,p0){const m0=C.get(e0,l0);l0+=C.len,f0.syncText.push({text:A0.text,timestamp:m0})}else f0.descriptor=A0.text,p0=!0}c0=f0;break}case"ULT":case"USLT":case"COM":case"COMM":{const h0=Jt(e0,l0);l0+=4;const f0=$M.readNullTerminatedString(e0.subarray(l0),h0.encoding);l0+=f0.len;const p0=$M.readNullTerminatedString(e0.subarray(l0),h0.encoding);c0={language:h0.language,descriptor:f0.text,text:p0.text};break}case"UFID":{const h0=$M.readIdentifierAndData(e0,l0,o0,ZM);c0={owner_identifier:h0.id,identifier:h0.data};break}case"PRIV":{const h0=$M.readIdentifierAndData(e0,l0,o0,ZM);c0={owner_identifier:h0.id,data:h0.data};break}case"POPM":{d0=Lt(e0,l0,o0,ZM);const h0=Rt(e0.slice(l0,d0),ZM);l0=d0+1;const f0=o0-l0;c0={email:h0,rating:E.get(e0,l0),counter:f0>=5?C.get(e0,l0+1):void 0};break}case"GEOB":{d0=Lt(e0,l0+1,o0,i0);const h0=Rt(e0.slice(l0+1,d0),ZM);l0=d0+1,d0=Lt(e0,l0,o0,i0);const f0=Rt(e0.slice(l0,d0),ZM);l0=d0+1,d0=Lt(e0,l0,o0,i0);const p0=Rt(e0.slice(l0,d0),ZM);l0=d0+1,c0={type:h0,filename:f0,description:p0,data:e0.slice(l0,o0)};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":d0=Lt(e0,l0+1,o0,i0),c0=Rt(e0.slice(l0,d0),ZM);break;case"WXXX":{d0=Lt(e0,l0+1,o0,i0);const h0=Rt(e0.slice(l0+1,d0),i0);l0=d0+(i0==="utf-16le"?2:1),c0={description:h0,url:Rt(e0.slice(l0,o0),ZM)};break}case"WFD":case"WFED":c0=Rt(e0.slice(l0+1,Lt(e0,l0+1,o0,i0)),i0);break;case"MCDI":c0=e0.slice(0,o0);break;default:qM(`Warning: unsupported id3v2-tag-type: ${n0}`)}return c0}static readNullTerminatedString(e0,n0){let a0=n0.bom?2:0;const i0=Lt(e0,a0,e0.length,n0.encoding),s0=e0.slice(a0,i0);return a0=n0.encoding==="utf-16le"?i0+2:i0+1,{text:Rt(s0,n0.encoding),len:a0}}static fixPictureMimeType(e0){switch(e0=e0.toLocaleLowerCase()){case"jpg":return"image/jpeg";case"png":return"image/png"}return e0}static functionList(e0){const n0={};for(let a0=0;a0+1<e0.length;a0+=2){const i0=e0[a0+1].split(",");n0[e0[a0]]=n0[e0[a0]]?n0[e0[a0]].concat(i0):i0}return n0}splitValue(e0,n0){let a0;return this.major<4?(a0=n0.split(/\x00/g),a0.length>1?this.warningCollector.addWarning(`ID3v2.${this.major} ${e0} uses non standard null-separator.`):a0=n0.split(/\//g)):a0=n0.split(/\x00/g),$M.trimArray(a0)}static trimArray(e0){return e0.map(n0=>n0.replace(/\x00+$/,"").trim())}
2414static readIdentifierAndData(e0,n0,a0,i0){const s0=Lt(e0,n0,a0,i0),o0=Rt(e0.slice(n0,s0),i0);return n0=s0+$M.getNullTerminatorLength(i0),{id:o0,data:e0.slice(n0,a0)}}static getNullTerminatorLength(e0){return e0==="utf-16le"?2:1}}class eN extends Dt("id3v2"){}const tN=new TextDecoder("ascii");class nN{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(e0){let n0=0,a0=0;for(;n0<e0.length-1;)n0!==a0&&(e0[a0]=e0[n0]),n0+=e0[n0]===255&&e0[n0+1]===0?2:1,a0++;return n0<e0.length&&(e0[a0++]=e0[n0]),e0.slice(0,a0)}static getFrameHeaderLength(e0){switch(e0){case 2:return 6;case 3:case 4:return 10;default:throw aN(e0)}}static readFrameFlags(e0){return{status:{tag_alter_preservation:Ot(e0,0,6),file_alter_preservation:Ot(e0,0,5),read_only:Ot(e0,0,4)},format:{grouping_identity:Ot(e0,1,7),compression:Ot(e0,1,3),encryption:Ot(e0,1,2),unsynchronisation:Ot(e0,1,1),data_length_indicator:Ot(e0,1,0)}}}static readFrameData(e0,n0,a0,i0,s0){var l0,c0;const o0=new $M(a0,s0);switch(a0){case 2:return o0.readData(e0,n0.id,i0);case 3:case 4:return(l0=n0.flags)!=null&&l0.format.unsynchronisation&&(e0=nN.removeUnsyncBytes(e0)),(c0=n0.flags)!=null&&c0.format.data_length_indicator&&(e0=e0.slice(4,e0.length)),o0.readData(e0,n0.id,i0);default:throw aN(a0)}}static makeDescriptionTagName(e0,n0){return e0+(n0?`:${n0}`:"")}async parse(e0,n0,a0){this.tokenizer=n0,this.metadata=e0,this.options=a0;const i0=await this.tokenizer.readToken(Kt);if(i0.fileIdentifier!=="ID3")throw new eN("expected ID3-header file-identifier 'ID3' was not found");return this.id3Header=i0,this.headerType=`ID3v2.${i0.version.major}`,i0.flags.isExtendedHeader?this.parseExtendedHeader():this.parseId3Data(i0.size)}async parseExtendedHeader(){const e0=await this.tokenizer.readToken(Yt),n0=e0.size-Yt.len;return n0>0?this.parseExtendedHeaderData(n0,e0.size):this.parseId3Data(this.id3Header.size-e0.size)}async parseExtendedHeaderData(e0,n0){return await this.tokenizer.ignore(e0),this.parseId3Data(this.id3Header.size-n0)}async parseId3Data(e0){const n0=await this.tokenizer.readToken(new Y(e0));for(const a0 of this.parseMetadata(n0))a0.id==="TXXX"?a0.value&&await this.handleTag(a0,a0.value.text,()=>a0.value.description):await(Array.isArray(a0.value)?Promise.all(a0.value.map(i0=>this.addTag(a0.id,i0))):this.addTag(a0.id,a0.value))}async handleTag(e0,n0,a0,i0=s0=>s0){await Promise.all(n0.map(s0=>this.addTag(nN.makeDescriptionTagName(e0.id,a0(s0)),i0(s0))))}async addTag(e0,n0){await this.metadata.addTag(this.headerType,e0,n0)}parseMetadata(e0){let n0=0;const a0=[];for(;n0!==e0.length;){const i0=nN.getFrameHeaderLength(this.id3Header.version.major);if(n0+i0>e0.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}const s0=e0.slice(n0,n0+i0);n0+=i0;const o0=this.readFrameHeader(s0,this.id3Header.version.major),l0=e0.slice(n0,n0+o0.length);n0+=o0.length;const c0=nN.readFrameData(l0,o0,this.id3Header.version.major,!this.options.skipCovers,this.metadata);c0&&a0.push({id:o0.id,value:c0})}return a0}readFrameHeader(e0,n0){let a0;switch(n0){case 2:a0={id:tN.decode(e0.slice(0,3)),length:S.get(e0,3)},a0.id.match(/[A-Z0-9]{3}/g)||this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${a0.id}`);break;case 3:case 4:a0={id:tN.decode(e0.slice(0,4)),length:(n0===4?jt:C).get(e0,4),flags:nN.readFrameFlags(e0.slice(8,10))},a0.id.match(/[A-Z0-9]{4}/g)||this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${a0.id}`);break;default:throw aN(n0)}return a0}}function aN(r0){throw new eN(`Unexpected majorVer: ${r0}`)}const rN=Te("music-metadata:parser:ID3");class iN extends Fn{constructor(){super(...arguments),this.id3parser=new nN}static async startsWithID3v2Header(e0){return(await e0.peekToken(Kt)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(e0){if(!(e0 instanceof A))throw e0;rN("End-of-stream")}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),rN("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new ia(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(Kt)).fileIdentifier==="ID3")return rN("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}
2414const AN=(r0,e0)=>{const n0=Ft(r0,e0,0,3),a0=Ft(r0,e0,6,1),i0=Ft(r0,e0,7,9)/10;if(n0>0)return{type:Ft(r0,e0,0,3),origin:Ft(r0,e0,3,3),adjustment:a0?-i0:i0}},sN={len:27,get:(r0,e0)=>{const n0=C.get(r0,e0+2);return{revision:Ft(r0,e0,0,4),vbr_method:Ft(r0,e0,4,4),lowpass_filter:100*E.get(r0,e0+1),track_peak:n0===0?null:n0/2**23,track_gain:AN(r0,6),album_gain:AN(r0,8),music_length:C.get(r0,e0+20),music_crc:E.get(r0,e0+24),header_crc:k.get(r0,e0+24)}}},oN=new H(4,"ascii"),lN=new H(6,"ascii"),cN={len:4,get:(r0,e0)=>({frames:Qt(r0,e0,31),bytes:Qt(r0,e0,30),toc:Qt(r0,e0,29),vbrScale:Qt(r0,e0,28)})},uN=Te("music-metadata:parser:mpeg");class dN extends Dt("MPEG"){}const hN={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,-1]},pN=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]];class fN{constructor(e0,n0){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=Ft(e0,n0+1,3,2),this.layer=fN.LayerDescription[Ft(e0,n0+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(e0,n0):this.parseMpegHeader(e0,n0),this.isProtectedByCRC=!Qt(e0,n0+1,7)}calcDuration(e0){return this.samplingRate==null?null:e0*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return fN.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(e0,n0){this.container="MPEG",this.bitrateIndex=Ft(e0,n0+2,0,4),this.sampRateFreqIndex=Ft(e0,n0+2,4,2),this.padding=Qt(e0,n0+2,6),this.privateBit=Qt(e0,n0+2,7),this.channelModeIndex=Ft(e0,n0+3,0,2),this.modeExtension=Ft(e0,n0+3,2,2),this.isCopyrighted=Qt(e0,n0+3,4),this.isOriginalMedia=Qt(e0,n0+3,5),this.emphasis=Ft(e0,n0+3,7,2),this.version=fN.VersionID[this.versionIndex],this.channelMode=fN.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;const a0=this.calcBitrate();if(!a0)throw new dN("Cannot determine bit-rate");if(this.bitrate=1e3*a0,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new dN("Cannot determine sampling-rate")}parseAdtsHeader(e0,n0){uN("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;const a0=Ft(e0,n0+2,0,2);this.codec="AAC",this.codecProfile=hN.AudioObjectTypes[a0],uN(`MPEG-4 audio-codec=${this.codec}`);const i0=Ft(e0,n0+2,2,4);this.samplingRate=hN.SamplingFrequencies[i0],uN(`sampling-rate=${this.samplingRate}`);const s0=Ft(e0,n0+2,7,3);this.mp4ChannelConfig=pN[s0],uN(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=Ft(e0,n0+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){const e0=10*Math.floor(this.version)+this.layer;return fN.bitrate_index[this.bitrateIndex][e0]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:fN.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}}fN.SyncByte1=255,fN.SyncByte2=224,fN.VersionID=[2.5,null,2,1],fN.LayerDescription=[0,3,2,1],fN.ChannelMode=["stereo","joint_stereo","dual_channel","mono"],fN.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}},fN.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}},fN.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];var gN=Object.freeze({__proto__:null,MpegContentError:dN,MpegParser:class extends iN{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.countSkipFrameData=0,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.crc=null,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(1024),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let r0=!1;for(;!r0;)await this.sync(),r0=await this.parseCommonMpegHeader()}catch(r0){if(!(r0 instanceof A))throw r0;if(uN("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){const e0=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e0),this.metadata.format.sampleRate){const n0=e0/this.metadata.format.sampleRate;uN(`Calculate duration at EOF: ${n0} sec.`,n0),this.metadata.setFormat("duration",n0)}}}}finalize(){const r0=this.metadata.format,e0=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(r0.duration&&this.tokenizer.fileInfo.size){const n0=this.tokenizer.fileInfo.size-this.mpegOffset-(e0?128:0);r0.codecProfile&&r0.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",8*n0/r0.duration)}if(this.tokenizer.fileInfo.size&&r0.codecProfile==="CBR"){const n0=this.tokenizer.fileInfo.size-this.mpegOffset-(e0?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){const a0=Math.round(n0/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",a0),r0.sampleRate&&!r0.duration){const i0=a0/r0.sampleRate;uN("Calculate CBR duration based on file size: %s",i0),this.metadata.setFormat("duration",i0)}}}}}async sync(){let r0=!1;for(;;){let e0=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:1024,mayBeLess:!0}),this.syncPeek.len<=163)throw new A;for(;;){if(r0&&!(224&~this.syncPeek.buf[e0]))return this.buf_frame_header[0]=fN.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[e0],await this.tokenizer.ignore(e0),uN(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(uN(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),void(this.syncFrameCount=this.frameCount);if(r0=!1,e0=this.syncPeek.buf.indexOf(fN.SyncByte1,e0),e0===-1){if(this.syncPeek.len<this.syncPeek.buf.length)throw new A;await this.tokenizer.ignore(this.syncPeek.len);break}++e0,r0=!0}}}async parseCommonMpegHeader(){let r0;this.frameCount===0&&(this.mpegOffset=this.tokenizer.position-1),await this.tokenizer.peekBuffer(this.buf_frame_header.subarray(1),{length:3});try{r0=((e0,n0)=>new fN(e0,n0))(this.buf_frame_header,0)}catch(e0){if(await this.tokenizer.ignore(1),e0 instanceof Error)return this.metadata.addWarning(`Parse error: ${e0.message}`),!1;throw e0}return await this.tokenizer.ignore(3),this.metadata.setFormat("container",r0.container),this.metadata.setFormat("codec",r0.c
2414odec),this.metadata.setFormat("lossless",!1),this.metadata.setFormat("sampleRate",r0.samplingRate),this.frameCount++,r0.version!==null&&r0.version>=2&&r0.layer===0?this.parseAdts(r0):this.parseAudioFrameHeader(r0)}async parseAudioFrameHeader(r0){this.metadata.setFormat("numberOfChannels",r0.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",r0.bitrate),this.frameCount<2e5&&uN("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,r0.layer,r0.bitrate,r0.samplingRate);const e0=r0.calcSlotSize();if(e0===null)throw new dN("invalid slot_size");const n0=r0.calcSamplesPerFrame();uN(`samples_per_frame=${n0}`);const a0=n0/8;if(r0.bitrate!==null&&r0.samplingRate!=null){const i0=a0*r0.bitrate/r0.samplingRate+(r0.padding?e0:0);this.frame_size=Math.floor(i0)}if(this.audioFrameHeader=r0,r0.bitrate!==null&&this.bitrates.push(r0.bitrate),this.frameCount===1)return this.offset=4,await this.skipSideInformation(),!1;if(this.frameCount===3){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=n0,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=n0,this.calculateEofDuration=!0),this.offset=4,r0.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(r0){const e0=new Uint8Array(3);if(await this.tokenizer.readBuffer(e0),r0.frameLength+=Ft(e0,0,0,11),this.totalDataLength+=r0.frameLength,this.samplesPerFrame=1024,r0.samplingRate!==null){const n0=r0.samplingRate/this.samplesPerFrame,a0=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*n0+.5;this.metadata.setFormat("bitrate",a0),uN(`frame-count=${this.frameCount}, size=${r0.frameLength} bytes, bit-rate=${a0}`)}if(await this.tokenizer.ignore(r0.frameLength>7?r0.frameLength-7:1),this.frameCount===3){if(this.metadata.setFormat("codecProfile",r0.codecProfile),r0.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",r0.mp4ChannelConfig.length),!this.options.duration)return!0;this.calculateEofDuration=!0}return!1}async parseCrc(){return this.crc=await this.tokenizer.readNumber(T),this.offset+=2,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){const r0=this.audioFrameHeader.calculateSideInfoLength();if(r0!==null)return await this.tokenizer.readToken(new Y(r0)),this.offset+=r0,void await this.readXtraInfoHeader()}}async readXtraInfoHeader(){const r0=await this.tokenizer.readToken(oN);switch(this.offset+=oN.len,r0){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{const a0=await this.readXingInfoHeader();if(a0.vbrScale!==null){const i0=(e0=a0.vbrScale,`V${Math.floor((100-e0)/10)}`);this.metadata.setFormat("codecProfile",i0)}return null}case"Xtra":break;case"LAME":{const a0=await this.tokenizer.readToken(lN);if(this.frame_size!==null&&this.frame_size>=this.offset+lN.len)return this.offset+=lN.len,this.metadata.setFormat("tool",`LAME ${a0}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}var e0;const n0=this.frame_size-this.offset;return n0<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(n0),null}async readXingInfoHeader(){const r0=this.tokenizer.position,e0=await async function(a0){const i0=await a0.readToken(cN),s0={numFrames:null,streamSize:null,vbrScale:null};if(i0.frames&&(s0.numFrames=await a0.readToken(C)),i0.bytes&&(s0.streamSize=await a0.readToken(C)),i0.toc&&(s0.toc=new Uint8Array(100),await a0.readBuffer(s0.toc)),i0.vbrScale&&(s0.vbrScale=await a0.readToken(C)),await a0.peekToken(new H(4,"ascii"))==="LAME"){await a0.ignore(4),s0.lame={version:await a0.readToken(new H(5,"ascii"))};const o0=s0.lame.version.match(/\d+.\d+/g);if(o0!==null){const l0=o0[0].split(".").map(c0=>Number.parseInt(c0,10));l0[0]>=3&&l0[1]>=90&&(s0.lame.extended=await a0.readToken(sN))}}return s0}(this.tokenizer);if(this.offset+=this.tokenizer.position-r0,e0.lame&&(this.metadata.setFormat("tool",`LAME ${zt(e0.lame.version)}`),e0.lame.extended&&(this.metadata.setFormat("trackPeakLevel",e0.lame.extended.track_peak),e0.lame.extended.track_gain&&this.metadata.setFormat("trackGain",e0.lame.extended.track_gain.adjustment),e0.lame.extended.album_gain&&this.metadata.setFormat("albumGain",e0.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",e0.lame.extended.music_length/1e3))),e0.streamSize&&this.audioFrameHeader&&e0.numFrames!==null){const a0=this.audioFrameHeader.calcDuration(e0.numFrames);return this.metadata.setFormat("duration",a0),uN("Get duration from Xing header: %s",this.metadata.format.duration),e0}const n0=this.frame_size-this.offset;return await this.skipFrameData(n0),e0}async skipFrameData(r0){if(r0<0)throw new dN("frame-data-left cannot be negative");await this.tokenizer.ignore(r0),this.countSkipFrameData+=r0}
2414areAllSame(r0){const e0=r0[0];return r0.every(n0=>n0===e0)}}});class mN{static fromBin(e0,n0=0){return new mN(mN.decode(e0,n0))}static decode(e0,n0=0){const a0=new DataView(e0.buffer,n0);return`${a0.getUint32(0,!0).toString(16)}-${a0.getUint16(4,!0).toString(16)}-${a0.getUint16(6,!0).toString(16)}-${a0.getUint16(8).toString(16)}-${Ze(e0.slice(n0+10,n0+16))}`.toUpperCase()}static decodeMediaType(e0){switch(e0.str){case mN.AudioMedia.str:return"audio";case mN.VideoMedia.str:return"video";case mN.CommandMedia.str:return"command";case mN.Degradable_JPEG_Media.str:return"degradable-jpeg";case mN.FileTransferMedia.str:return"file-transfer";case mN.BinaryMedia.str:return"binary"}}static encode(e0){const n0=new Uint8Array(16),a0=new DataView(n0.buffer);return a0.setUint32(0,Number.parseInt(e0.slice(0,8),16),!0),a0.setUint16(4,Number.parseInt(e0.slice(9,13),16),!0),a0.setUint16(6,Number.parseInt(e0.slice(14,18),16),!0),n0.set($e(e0.slice(19,23)),8),n0.set($e(e0.slice(24)),10),n0}constructor(e0){this.str=e0}equals(e0){return this.str===e0.str}toBin(){return mN.encode(this.str)}}function wN(r0){return zt(Rt(r0,"utf-16le"))}mN.HeaderObject=new mN("75B22630-668E-11CF-A6D9-00AA0062CE6C"),mN.DataObject=new mN("75B22636-668E-11CF-A6D9-00AA0062CE6C"),mN.SimpleIndexObject=new mN("33000890-E5B1-11CF-89F4-00A0C90349CB"),mN.IndexObject=new mN("D6E229D3-35DA-11D1-9034-00A0C90349BE"),mN.MediaObjectIndexObject=new mN("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C"),mN.TimecodeIndexObject=new mN("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C"),mN.FilePropertiesObject=new mN("8CABDCA1-A947-11CF-8EE4-00C00C205365"),mN.StreamPropertiesObject=new mN("B7DC0791-A9B7-11CF-8EE6-00C00C205365"),mN.HeaderExtensionObject=new mN("5FBF03B5-A92E-11CF-8EE3-00C00C205365"),mN.CodecListObject=new mN("86D15240-311D-11D0-A3A4-00A0C90348F6"),mN.ScriptCommandObject=new mN("1EFB1A30-0B62-11D0-A39B-00A0C90348F6"),mN.MarkerObject=new mN("F487CD01-A951-11CF-8EE6-00C00C205365"),mN.BitrateMutualExclusionObject=new mN("D6E229DC-35DA-11D1-9034-00A0C90349BE"),mN.ErrorCorrectionObject=new mN("75B22635-668E-11CF-A6D9-00AA0062CE6C"),mN.ContentDescriptionObject=new mN("75B22633-668E-11CF-A6D9-00AA0062CE6C"),mN.ExtendedContentDescriptionObject=new mN("D2D0A440-E307-11D2-97F0-00A0C95EA850"),mN.ContentBrandingObject=new mN("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E"),mN.StreamBitratePropertiesObject=new mN("7BF875CE-468D-11D1-8D82-006097C9A2B2"),mN.ContentEncryptionObject=new mN("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E"),mN.ExtendedContentEncryptionObject=new mN("298AE614-2622-4C17-B935-DAE07EE9289C"),mN.DigitalSignatureObject=ne
2414w mN("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E"),mN.PaddingObject=new mN("1806D474-CADF-4509-A4BA-9AABCB96AAE8"),mN.ExtendedStreamPropertiesObject=new mN("14E6A5CB-C672-4332-8399-A96952065B5A"),mN.AdvancedMutualExclusionObject=new mN("A08649CF-4775-4670-8A16-6E35357566CD"),mN.GroupMutualExclusionObject=new mN("D1465A40-5A79-4338-B71B-E36B8FD6C249"),mN.StreamPrioritizationObject=new mN("D4FED15B-88D3-454F-81F0-ED5C45999E24"),mN.BandwidthSharingObject=new mN("A69609E6-517B-11D2-B6AF-00C04FD908E9"),mN.LanguageListObject=new mN("7C4346A9-EFE0-4BFC-B229-393EDE415C85"),mN.MetadataObject=new mN("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA"),mN.MetadataLibraryObject=new mN("44231C94-9498-49D1-A141-1D134E457054"),mN.IndexParametersObject=new mN("D6E229DF-35DA-11D1-9034-00A0C90349BE"),mN.MediaObjectIndexParametersObject=new mN("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7"),mN.TimecodeIndexParametersObject=new mN("F55E496D-9797-4B5D-8C8B-604DFE9BFB24"),mN.CompatibilityObject=new mN("26F18B5D-4584-47EC-9F5F-0E651F0452C9"),mN.AdvancedContentEncryptionObject=new mN("43058533-6981-49E6-9B74-AD12CB86D58C"),mN.AudioMedia=new mN("F8699E40-5B4D-11CF-A8FD-00805F5C442B"),mN.VideoMedia=new mN("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B"),mN.CommandMedia=new mN("59DACFC0-59E6-11D0-A3AC-00A0C90348F6"),mN.JFIF_Media=new mN("B61BE100-5B4E-11CF-A8FD-00805F5C442B"),mN.Degradable_JPEG_Media=new mN("35907DE0-E415-11CF-A917-00805F5C442B"),mN.FileTransferMedia=new mN("91BD222C-F21C-497A-8B6D-5AA86BFC0185"),mN.BinaryMedia=new mN("3AFB65E2-47EF-40F2-AC2C-70A90D71D343"),mN.ASF_Index_Placeholder_Object=new mN("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");const bN=[wN,EN,function(r0,e0=0){return yN(r0,e0)===1},function(r0,e0=0){return I.get(r0,e0)},function(r0,e0=0){return O.get(r0,e0)},yN,EN];function EN(r0){return new Uint8Array(r0)}function yN(r0,e0=0){return y.get(r0,e0)}class kN extends Dt("ASF"){}const vN={len:30,get:(r0,e0)=>({objectId:mN.fromBin(r0,e0),objectSize:Number(O.get(r0,e0+16)),numberOfHeaderObjects:I.get(r0,e0+24)})},SN={len:24,get:(r0,e0)=>({objectId:mN.fromBin(r0,e0),objectSize:Number(O.get(r0,e0+16))})};class IN{constructor(e0){this.len=Number(e0.objectSize)-SN.len}postProcessTag(e0,n0,a0,i0){if(n0==="WM/Picture")e0.push({id:n0,value:QN.fromBuffer(i0)});else{const s0=function(o0){return bN[o0]}(a0);if(!s0)throw new kN(`unexpected value headerType: ${a0}`);e0.push({id:n0,value:s0(i0)})}}}class CN extends IN{get(e0,n0){return null}}class xN extends IN{get(e0,n0){return{fileId:mN.fromBin(e0,n0),fileSize:O.get(e0,n0+16),creationDate:O.get(e0,n0+24),dataPacketsCount:O.get(e0,n0+32),playDuration:O.get(e0,n0+40),sendDuration:O.get(e0,n0+48),preroll:O.get(e0,n0+56),flags:{broadcast:Ot(e0,n0+64,24),seekable:Ot(e0,n0+64,25)},minimumDataPacketSize:I.get(e0,n0+68),maximumDataPacketSize:I.get(e0,n0+72),maximumBitrate:I.get(e0,n0+76)}}}xN.guid=mN.FilePropertiesObject;class TN extends IN{get(e0,n0){return{streamType:mN.decodeMediaType(mN.fromBin(e0,n0)),errorCorrectionType:mN.fromBin(e0,n0+8)}}}TN.guid=mN.StreamPropertiesObject;class BN{constructor(){this.len=22}get(e0,n0){const a0=new DataView(e0.buffer,n0);return{reserved1:mN.fromBin(e0,n0),reserved2:a0.getUint16(16,!0),extensionDataSize:a0.getUint16(18,!0)}}}BN.guid=mN.HeaderExtensionObject;const UN={len:20,get:(r0,e0)=>({entryCount:new DataView(r0.buffer,e0).getUint16(16,!0)})};async function MN(r0){const e0=await r0.readNumber(y);return(await r0.readToken(new H(2*e0,"utf-16le"))).replace("\0","")}async function NN(r0){const e0=await r0.readToken(UN),n0=[];for(let a0=0;a0<e0.entryCount;++a0)n0.push(await ON(r0));return n0}async function DN(r0){const e0=await r0.readNumber(y),n0=new Uint8Array(e0);return await r0.readBuffer(n0),n0}async function ON(r0){const e0=await r0.readNumber(y);return{type:{videoCodec:!(1&~e0),audioCodec:!(2&~e0)},codecName:await MN(r0),description:await MN(r0),information:await DN(r0)}}class LN extends IN{get(e0,n0){const a0=[],i0=new DataView(e0.buffer,n0);let s0=10;for(let o0=0;o0<LN.contentDescTags.length;++o0){const l0=i0.getUint16(2*o0,!0);if(l0>0){const c0=LN.contentDescTags[o0],u0=s0+l0;a0.push({id:c0,value:wN(e0.slice(n0+s0,n0+u0))}),s0=u0}}return a0}}LN.guid=mN.ContentDescriptionObject,LN.contentDescTags=["Title","Author","Copyright","Description","Rating"];class _N extends IN{get(e0,n0){const a0=[],i0=new DataView(e0.buffer,n0),s0=i0.getUint16(0,!0);let o0=2;for(let l0=0;l0<s0;l0+=1){const c0=i0.getUint16(o0,!0);o0+=2;const u0=wN(e0.slice(n0+o0,n0+o0+c0));o0+=c0;const d0=i0.getUint16(o0,!0);o0+=2;const h0=i0.getUint16(o0,!0);o0+=2;const f0=e0.slice(n0+o0,n0+o0+h0);o0+=h0,this.postProcessTag(a0,u0,d0,f0)}return a0}}_N.guid=mN.ExtendedContentDescriptionObject;class RN extends IN{get(e0,n0){const a0=new DataView(e0.buffer,n0);return{startTime:O.get(e0,n0),endTime:O.get(e0,n0+8),dataBitrate:a0.getInt32(12,!0),bufferSize:a0.getInt32(16,!0),initialBufferFullness:a0.getInt32(20,!0),alternateDataBitrate:a0.getInt32(24,!0),alternateBufferSize:a0.getInt32(28,!0),alternateInitialBufferFullness:a0.getInt32(32,!0),maximumObjectSize:a0.getInt32(36,!0),flags:{reliableFlag:Ot(e0,n0+40,0),seekableFlag:Ot(e0,n0+40,1),resendLiveCleanpointsFlag:Ot(e0,n0+40,2)},streamNumber:a0.getInt16(42,!0),streamLanguageId:a0.getInt16(44,!0),averageTimePerFrame:a0.getInt32(52,!0),streamNameCount:a0.getInt32(54,!0),payloadExtensionSystems:a0.getInt32(56,!0),streamNames:[],streamPropertiesObject:null}}}RN.guid=mN.ExtendedStreamPropertiesObject;class zN extends IN{get(e0,n0){const a0=[],i0=new DataView(e0.buffer,n0),s0=i0.getUint16(0,!0);let o0=2;for(let l0=0;l0<s0;l0+=1){o0+=4;const c0=i0.getUint16(o0,!0);o0+=2;const u0=i0.getUint16(o0,!0);o0+=2;const d0=i0.getUint32(o0,!0);o0+=4;const h0=wN(e0.slice(n0+o0,n0+o0+c0));o0+=c0;const f0=e0.slice(n0+o0,n0+o0+d0);o0+=d0,this.postProcessTag(a0,h0,u0,f0)}return a0}}zN.guid=mN.MetadataObject;class FN extends zN{}FN.guid=mN.MetadataLibraryObject;class QN{static fromBuffer(e0){return new QN(e0.length).get(e0,0)}constructor(e0){this.len=e0}get(e0,n0){const a0=new DataView(e0.buffer,n0),i0=a0.getUint8(0),s0=a0.getInt32(1,!0);let o0=5;for(;a0.getUint16(o0)!==0;)o0+=2;const l0=new H(o0-5,"utf-16le").get(e0,5);for(;a0.getUint16(o0)!==0;)o0+=2;const c0=new H(o0-5,"utf-16le").get(e0,5);return{type:Pt[i0],format:l0,description:c0,size:s0,data:e0.slice(o0+4)}}}const PN=Te("music-metadata:parser:ASF");var VN=Object.freeze({__proto__:null,AsfParser:class extends Fn{async parse(){const r0=await this.tokenizer.readToken(vN);if(!r0.objectId.equals(mN.HeaderObject))throw new kN(`expected asf header; but was not found; got: ${r0.objectId.str}`);try{await this.parseObjectHeader(r0.numberOfHeaderObjects)}catch(e0){PN("Error while parsing ASF: %s",e0)}}async parseObjectHeader(r0){let e0;do{const n0=await this.tokenizer.readToken(SN);switch(PN("header GUID=%s",n0.objectId.str),n0.objectId.str){case xN.guid.str:{const a0=await this.tokenizer.readToken(new xN(n0));this.metadata.setFormat("duration",Number(a0.playDuration/BigInt(1e3))/1e4-Number(a0.preroll)/1e3),this.metadata.setFormat("bitrate",a0.maximumBitrate);break}case TN.guid.str:{const a0=await this.tokenizer.readToken(new TN(n0));this.metadata.setFormat("container",`ASF/${a0.streamType}`);break}case BN.guid.str:{const a0=await this.tokenizer.readToken(new BN);await this.parseExtensionObject(a0.extensionDataSize);break}case LN.guid.str:e0=await this.tokenizer.readToken(new LN(n0)),await this.addTags(e0);break;case _N.guid.str:e0=await this.tokenizer.readToken(new _N(n0)),await this.addTags(e0);break;case mN.CodecListObject.str:{const a0=await NN(this.tokenizer);a0.forEach(s0=>{this.metadata.addStreamInfo({type:s0.type.videoCodec?1:2,codecName:s0.codecName})});const i0=a0.filter(s0=>s0.type.audioCodec).map(s0=>s0.codecName).join("/");this.metadata.setFormat("codec",i0);break}case mN.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(n0.objectSize-SN.len);break;
2414case mN.PaddingObject.str:PN("Padding: %s bytes",n0.objectSize-SN.len),await this.tokenizer.ignore(n0.objectSize-SN.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${n0.objectId.str}`),PN("Ignore ASF-Object-GUID: %s",n0.objectId.str),await this.tokenizer.readToken(new CN(n0))}}while(--r0)}async addTags(r0){await Promise.all(r0.map(({id:e0,value:n0})=>this.metadata.addTag("asf",e0,n0)))}async parseExtensionObject(r0){do{const e0=await this.tokenizer.readToken(SN),n0=e0.objectSize-SN.len;switch(e0.objectId.str){case RN.guid.str:await this.tokenizer.readToken(new RN(e0));break;case zN.guid.str:{const a0=await this.tokenizer.readToken(new zN(e0));await this.addTags(a0);break}case FN.guid.str:{const a0=await this.tokenizer.readToken(new FN(e0));await this.addTags(a0);break}case mN.PaddingObject.str:case mN.CompatibilityObject.str:case mN.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(n0);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${e0.objectId.str}`),await this.tokenizer.readToken(new CN(e0))}r0-=e0.objectSize}while(r0>0)}}});const GN={len:12,get:(r0,e0)=>({chunkID:Pn.get(r0,e0),chunkSize:R.get(r0,e0+4)})},jN=Te("music-metadata:parser:aiff");class KN extends Dt("DSDIFF"){}var YN=Object.freeze({__proto__:null,DsdiffContentParseError:KN,DsdiffParser:class extends Fn{async parse(){const r0=await this.tokenizer.readToken(GN);if(r0.chunkID!=="FRM8")throw new KN("Unexpected chunk-ID");this.metadata.setAudioOnly();const e0=(await this.tokenizer.readToken(Pn)).trim();if(e0==="DSD")return this.metadata.setFormat("container",`DSDIFF/${e0}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(r0.chunkSize-BigInt(Pn.len));throw new KN(`Unsupported DSDIFF type: ${e0}`)}async readFmt8Chunks(r0){for(;r0>=GN.len;){const e0=await this.tokenizer.readToken(GN);jN(`Chunk id=${e0.chunkID}`),await this.readData(e0),r0-=BigInt(GN.len)+e0.chunkSize}}async readData(r0){jN(`Reading data of chunk[ID=${r0.chunkID}, size=${r0.chunkSize}]`);const e0=this.tokenizer.position;switch(r0.chunkID.trim()){case"FVER":{const a0=await this.tokenizer.readToken(I);jN(`DSDIFF version=${a0}`);break}case"PROP":if(await this.tokenizer.readToken(Pn)!=="SND ")throw new KN("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(r0.chunkSize-BigInt(Pn.len));break;case"ID3":{const a0=g(await this.tokenizer.readToken(new Y(Number(r0.chunkSize))));await new nN().parse(this.metadata,a0,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(r0.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:jN(`Ignore chunk[ID=${r0.chunkID}, size=${r0.chunkSize}]`)}const n0=r0.chunkSize-BigInt(this.tokenizer.position-e0);n0>0&&(jN(`After Parsing chunk, remaining ${n0} bytes`),await this.tokenizer.ignore(Number(n0)))}async handleSoundPropertyChunks(r0){for(jN(`Parsing sound-property-chunks, remainingSize=${r0}`);r0>0;){const e0=await this.tokenizer.readToken(GN);jN(`Sound-property-chunk[ID=${e0.chunkID}, size=${e0.chunkSize}]`);const n0=this.tokenizer.position;switch(e0.chunkID.trim()){case"FS":{const i0=await this.tokenizer.readToken(C);this.metadata.setFormat("sampleRate",i0);break}case"CHNL":{const i0=await this.tokenizer.readToken(k);this.metadata.setFormat("numberOfChannels",i0),await this.handleChannelChunks(e0.chunkSize-BigInt(k.len));break}case"CMPR":{const i0=(await this.tokenizer.readToken(Pn)).trim(),s0=await this.tokenizer.readToken(E),o0=await this.tokenizer.readToken(new H(s0,"ascii"));i0==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${i0} (${o0})`);break}case"ABSS":{const i0=await this.tokenizer.readToken(k),s0=await this.tokenizer.readToken(E),o0=await this.tokenizer.readToken(E),l0=await this.tokenizer.readToken(C);jN(`ABSS ${i0}:${s0}:${o0}.${l0}`);break}case"LSCO":{const i0=await this.tokenizer.readToken(k);jN(`LSCO lsConfig=${i0}`);break}default:jN(`Unknown sound-property-chunk[ID=${e0.chunkID}, size=${e0.chunkSize}]`),await this.tokenizer.ignore(Number(e0.chunkSize))}const a0=e0.chunkSize-BigInt(this.tokenizer.position-n0);a0>0&&(jN(`After Parsing sound-property-chunk ${e0.chunkSize}, remaining ${a0} bytes`),await this.tokenizer.ignore(Number(a0))),r0-=BigInt(GN.len)+e0.chunkSize,jN(`Parsing sound-property-chunks, remainingSize=${r0}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){const e0=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",e0)}}async handleChannelChunks(r0){jN(`Parsing channel-chunks, remainingSize=${r0}`);const e0=[];for(;r0>=Pn.len;){const n0=await this.tokenizer.readToken(Pn);jN(`Channel[ID=${n0}]`),e0.push(n0),r0-=BigInt(Pn.len)}return jN(`Channels: ${e0.join(", ")}`),e0}}});const HN={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl
241464:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"µLaw 2:1 8-bit ITU-T G.711 µ-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 µ-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "};class JN extends Dt("AIFF"){}class WN{constructor(e0,n0){this.isAifc=n0;const a0=n0?22:18;if(e0.chunkSize<a0)throw new JN(`COMMON CHUNK size should always be at least ${a0}`);this.len=e0.chunkSize}get(e0,n0){const a0=k.get(e0,n0+8)-16398,i0=k.get(e0,n0+8+2),s0={numChannels:k.get(e0,n0),numSampleFrames:C.get(e0,n0+2),sampleSize:k.get(e0,n0+6),sampleRate:a0<0?i0>>Math.abs(a0):i0<<a0};if(this.isAifc){if(s0.compressionType=Pn.get(e0,n0+18),this.len>22){const o0=E.get(e0,n0+22);if(o0>0){if(23+o0+(o0+1)%2!==this.len)throw new JN("Illegal pstring length");s0.compressionName=new H(o0,"latin1").get(e0,n0+23)}else s0.compressionName=void 0}}else s0.compressionName="PCM";return s0}}const qN={len:8,get:(r0,e0)=>({chunkID:Pn.get(r0,e0),chunkSize:Number(BigInt(C.get(r0,e0+4)))})},ZN=Te("music-metadata:parser:aiff");var XN=Object.freeze({__proto__:null,AIFFParser:class extends Fn{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(qN)).chunkID!=="FORM")throw new JN("Invalid Chunk-ID, expected 'FORM'");const r0=await this.tokenizer.readToken(Pn);switch(r0){case"AIFF":this.metadata.setFormat("container",r0),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new JN(`Unsupported AIFF type: ${r0}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=qN.len;){ZN(`Reading AIFF chunk at offset=${this.tokenizer.position}`);const e0=await this.tokenizer.readToken(qN),n0=2*Math.round(e0.chunkSize/2),a0=await this.readData(e0);await this.tokenizer.ignore(n0-a0)}}catch(e0){if(!(e0 instanceof A))throw e0;ZN("End-of-stream")}}async readData(r0){switch(r0.chunkID){case"COMM":{if(this.isCompressed===null)throw new JN("Failed to parse AIFF.COMM chunk when compression type is unknown");const e0=await this.tokenizer.readToken(new WN(r0,this.isCompressed));return this.metadata.setFormat("bitsPerSample",e0.sampleSize),this.metadata.setFormat("sampleRate",e0.sampleRate),this.metadata.setFormat("numberOfChannels",e0.numChannels),this.metadata.setFormat("numberOfSamples",e0.numSampleFrames),this.metadata.setFormat("duration",e0.numSampleFrames/e0.sampleRate),(e0.compressionName||e0.compressionType)&&this.metadata.setFormat("codec",e0.compressionName??HN[e0.compressionType]),r0.chunkSize}case"ID3 ":{const e0=g(await this.tokenizer.readToken(new Y(r0.chunkSize)));return await new nN().parse(this.metadata,e0,this.options),r0.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*r0.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(r0);default:return ZN(`Ignore chunk id=${r0.chunkID}, size=${r0.chunkSize}`),0}}async readTextChunk(r0){const e0=(await this.tokenizer.readToken(new H(r0.chunkSize,"ascii"))).split("\0").map(n0=>n0.trim()).filter(n0=>n0==null?void 0:n0.length);return await Promise.all(e0.map(n0=>this.metadata.addTag("AIFF",r0.chunkID,n0))),r0.chunkSize}}});const $N={len:12,get:(r0,e0)=>({id:Pn.get(r0,e0),size:O.get(r0,e0+4)})},eD={len:16,get:(r0,e0)=>({fileSize:L.get(r0,e0),metadataPointer:L.get(r0,e0+8)})},tD={len:40,get:(r0,e0)=>({formatVersion:D.get(r0,e0),formatID:D.get(r0,e0+4),channelType:D.get(r0,e0+8),channelNum:D.get(r0,e0+12),samplingFrequency:D.get(r0,e0+16),bitsPerSample:D.get(r0,e0+20),sampleCount:L.get(r0,e0+24),blockSizePerChannel:D.get(r0,e0+32)})},nD=Te("music-metadata:parser:DSF");class aD extends Dt("DSD"){}var rD=Object.freeze({__proto__:null,DsdContentParseError:aD,DsfParser:class extends iN{async postId3v2Parse(){const r0=this.tokenizer.position,e0=await this.tokenizer.readToken($N);if(e0.id!=="DSD ")throw new aD("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();const n0=await this.tokenizer.readToken(eD);if(n0.metadataPointer!==BigInt(0))return nD(`expect ID3v2 at offset=${n0.metadataPointer}`),await this.parseChunks(n0.fileSize-e0.size),await this.tokenizer.ignore(Number(n0.metadataPointer)-this.tokenizer.position-r0),new nN().parse(this.metadata,this.tokenizer,this.options);nD("No ID3v2 tag present")}async parseChunks(r0){for(;r0>=$N.len;){const e0=await this.tokenizer.readToken($N);if(nD(`Parsing chunk name=${e0.id} size=${e0.size}`),e0.id==="fmt "){const n0=await this.tokenizer.readToken(tD);this.metadata.setFormat("numberOfChannels",n0.channelNum),this.metadata.setFormat("sampleRate",n0.samplingFrequency),this.metadata.setFormat("bitsPerSample",n0.bitsPerSample),this.metadata.setFormat("numberOfSamples",n0.sampleCount),this.metadata.setFormat("duration",Number(n0.sampleCount)/n0.samplingFrequency);const a0=n0.bitsPerSample*n0.samplingFrequency*n0.channelNum;return void this.metadata.setFormat("bitrate",a0)}this.tokenizer.ignore(Number(e0.size)-$N.len),r0-=e0.size}}}});class iD{static fromBase64(e0){return iD.fromBuffer(Uint8Array.from(atob(e0),n0=>n0.charCodeAt(0)))}static fromBuffer(e0){return new iD(e0.length).get(e0,0)}constructor(e0){this.len=e0}get(e0,n0){const a0=Pt[C.get(e0,n0)],i0=C.get(e0,n0+=4);n0+=4;const s0=new H(i0,"utf-8").get(e0,n0),o0=C.get(e0,n0+=i0);n0+=4;const l0=new H(o0,"utf-8").get(e0,n0),c0=C.get(e0,n0+=o0),u0=C.get(e0,n0+=4),d0=C.get(e0,n0+=4),h0=C.get(e0,n0+=4),f0=C.get(e0,n0+=4);return n0+=4,{type:a0,format:s0,description:l0,width:c0,height:u0,colour_depth:d0,indexed_color:h0,data:Uint8Array.from(e0.slice(n0,n0+f0))}}}const AD=(r0,e0)=>({packetType:E.get(r0,e0),vorbis:new H(6,"ascii").get(r0,e0+1)});class sD{constructor(e0,n0){this.data=e0,this.offset=n0}readInt32(){const e0=I.get(this.data,this.offset);return this.offset+=4,e0}readStringUtf8(){const e0=this.readInt32(),n0=new TextDecoder("utf-8").decode(this.data.subarray(this.offset,this.offset+e0));return this.offset+=e0,n0}parseUserComment(){const e0=this.offset,n0=this.readStringUtf8(),a0=n0.indexOf("=");return{key:n0.slice(0,a0).toUpperCase(),value:n0.slice(a0+1),len:this.offset-e0}}}const oD=Te("music-metadata:parser:ogg:vorbis1");class lD extends Dt("Vorbis"){}class cD{constructor(e0,n0){this.pageSegments=[],this.metadata=e0,this.options=n0}async parsePage(e0,n0){if(this.lastPageHeader=e0,e0.headerType.firstPage)this.parseFirstPage(e0,n0);else{if(e0.headerType.continued){if(this.pageSegments.length===0)throw new lD("Cannot continue on previous page");this.pageSegments.push(n0)}if(e0.headerType.lastPage||!e0.headerType.continued){if(this.pageSegments.length>0){const a0=cD.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(a0)}this.pageSegments=e0.headerType.lastPage?[]:[n0]}}}static mergeUint8Arrays(e0){const n0=e0.reduce((i0,s0)=>i0+s0.length,0),a0=new Uint8Array(n0);
2414return e0.forEach((i0,s0,o0)=>{const l0=o0.slice(0,s0).reduce((c0,u0)=>c0+u0.length,0);a0.set(i0,l0)}),a0}async flush(){await this.parseFullPage(cD.mergeUint8Arrays(this.pageSegments))}async parseUserComment(e0,n0){const a0=new sD(e0,n0).parseUserComment();return await this.addTag(a0.key,a0.value),a0.len}async addTag(e0,n0){if(e0==="METADATA_BLOCK_PICTURE"&&typeof n0=="string"){if(this.options.skipCovers)return void oD("Ignore picture");n0=iD.fromBase64(n0),oD(`Push picture: id=${e0}, format=${n0.format}`)}else oD(`Push tag: id=${e0}, value=${n0}`);await this.metadata.addTag("vorbis",e0,n0)}calculateDuration(){this.lastPageHeader&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(e0,n0){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),oD("Parse first page");const a0=AD(n0,0);if(a0.vorbis!=="vorbis")throw new lD("Metadata does not look like Vorbis");if(a0.packetType!==1)throw new lD("First Ogg page should be type 1: the identification header");{const i0=((s0,o0)=>({version:I.get(s0,o0+0),channelMode:E.get(s0,o0+4),sampleRate:I.get(s0,o0+5),bitrateMax:I.get(s0,o0+9),bitrateNominal:I.get(s0,o0+13),bitrateMin:I.get(s0,o0+17)}))(n0,7);this.metadata.setFormat("sampleRate",i0.sampleRate),this.metadata.setFormat("bitrate",i0.bitrateNominal),this.metadata.setFormat("numberOfChannels",i0.channelMode),oD("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",i0.sampleRate,i0.bitrateNominal,i0.channelMode)}}async parseFullPage(e0){const n0=AD(e0,0);if(oD("Parse full page: type=%s, byteLength=%s",n0.packetType,e0.byteLength),n0.packetType===3)return this.parseUserCommentList(e0,7)}async parseUserCommentList(e0,n0){const a0=I.get(e0,n0);n0+=4;let i0=I.get(e0,n0+=a0);for(n0+=4;i0-- >0;)n0+=await this.parseUserComment(e0,n0)}}const uD=Te("music-metadata:parser:FLAC");class dD extends Dt("FLAC"){}const hD={len:4,get:(r0,e0)=>({lastBlock:Ot(r0,e0,7),type:Ft(r0,e0,1,7),length:S.get(r0,e0+1)})},pD={len:34,get:(r0,e0)=>({minimumBlockSize:k.get(r0,e0),maximumBlockSize:k.get(r0,e0+2)/1e3,minimumFrameSize:S.get(r0,e0+4),maximumFrameSize:S.get(r0,e0+7),sampleRate:S.get(r0,e0+10)>>4,channels:Ft(r0,e0+12,4,3)+1,bitsPerSample:Ft(r0,e0+12,7,5)+1,totalSamples:Ft(r0,e0+13,4,36),fileMD5:new Y(16).get(r0,e0+18)})};var fD=Object.freeze({__proto__:null,FlacParser:class extends iN{constructor(){super(...arguments),this.vorbisParser=new cD(this.metadata,this.options),this.padding=0}async postId3v2Parse(){if((await this.tokenizer.readToken(Pn)).toString()!=="fLaC")throw new dD("Invalid FLAC preamble");let r0;this.metadata.setAudioOnly();do r0=await this.tokenizer.readToken(hD),await this.parseDataBlock(r0);while(!r0.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){const e0=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*e0/this.metadata.format.duration)}}async parseDataBlock(r0){switch(uD(`blockHeader type=${r0.type}, length=${r0.length}`),r0.type){case 0:return this.parseBlockStreamInfo(r0.length);case 1:this.padding+=r0.length;break;case 2:case 3:case 5:break;case 4:return this.parseComment(r0.length);case 6:return void await this.parsePicture(r0.length);default:this.metadata.addWarning(`Unknown block type: ${r0.type}`)}return this.tokenizer.ignore(r0.length).then()}async parseBlockStreamInfo(r0){if(r0!==pD.len)throw new dD("Unexpected block-stream-info length");const e0=await this.tokenizer.readToken(pD);this.metadata.setFormat("container","FLAC"),this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",e0.channels),this.metadata.setFormat("bitsPerSample",e0.bitsPerSample),this.metadata.setFormat("sampleRate",e0.sampleRate),e0.totalSamples>0&&this.metadata.setFormat("duration",e0.totalSamples/e0.sampleRate)}async parseComment(r0){const e0=await this.tokenizer.readToken(new Y(r0)),n0=new sD(e0,0);n0.readStringUtf8();const a0=n0.readInt32(),i0=new Array(a0);for(let s0=0;s0<a0;s0++)i0[s0]=n0.parseUserComment();await Promise.all(i0.map(s0=>this.vorbisParser.addTag(s0.key,s0.value)))}
2414async parsePicture(r0){if(this.options.skipCovers)return this.tokenizer.ignore(r0);const e0=await this.tokenizer.readToken(new iD(r0));this.vorbisParser.addTag("METADATA_BLOCK_PICTURE",e0)}}});const gD={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:1},17143:{name:"ebmlReadVersion",value:1},17138:{name:"ebmlMaxIDWidth",value:1},17139:{name:"ebmlMaxSizeWidth",value:1},17026:{name:"docType",value:0},17031:{name:"docTypeVersion",value:1},17029:{name:"docTypeReadVersion",value:1}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:4},21420:{name:"position",value:1}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:2},29572:{name:"filename",value:0},3979555:{name:"prevUID",value:2},3965867:{name:"prevFilename",value:0},4110627:{name:"nextUID",value:2},4096955:{name:"nextFilename",value:0},2807729:{name:"timecodeScale",value:1},17545:{name:"duration",value:5},17505:{name:"dateUTC",value:1},31657:{name:"title",value:0},19840:{name:"muxingApp",value:0},22337:{name:"writingApp",value:0}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:2},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:2},171:{name:"prevSize",value:2},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:1},29637:{name:"uid",value:2},131:{name:"trackType",value:1},185:{name:"flagEnabled",value:3},136:{name:"flagDefault",value:3},21930:{name:"flagForced",value:3},156:{name:"flagLacing",value:3},28135:{name:"minCache",value:1},28136:{name:"maxCache",value:1},2352003:{name:"defaultDuration",value:1},2306383:{name:"timecodeScale",value:5},21358:{name:"name",value:0},2274716:{name:"language",value:0},134:{name:"codecID",value:0},25506:{name:"codecPrivate",value:4},2459272:{name:"codecName",value:0},3839639:{name:"codecSettings",value:0},3883072:{name:"codecInfoUrl",value:0},2536e3:{name:"codecDownloadUrl",value:0},170:{name:"codecDecodeAll",value:3},28587:{name:"trackOverlay",value:1},224:{name:"video",container:{154:{name:"flagInterlaced",value:3},21432:{name:"stereoMode",value:1},176:{name:"pixelWidth",value:1},186:{name:"pixelHeight",value:1},21680:{name:"displayWidth",value:1},21690:{name:"displayHeight",value:1},21683:{name:"aspectRatioType",value:1},3061028:{name:"colourSpace",value:1},3126563:{name:"gammaValue",value:5}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:5},30901:{name:"outputSamplingFrequency",value:5},159:{name:"channels",value:1},148:{name:"channels",value:1},32123:{name:"channelPositions",value:4},25188:{name:"bitDepth",value:1}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:1},20530:{name:"scope",value:3},20531:{name:"type",value:1},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:1},16981:{name:"contentCompSettings",value:4}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:1},18402:{name:"contentEncKeyID",value:4},18403:{name:"contentSignature ",value:4},18404:{name:"ContentSigKeyID ",value:4},18405:{name:"contentSigAlgo ",value:1},18406:{name:"contentSigHashAlgo ",value:1}}},25188:{name:"bitDepth",value:1}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:2},183:{name:"positions",container:{247:{name:"track",value:1},241:{name:"clusterPosition",value:1},21368:{name:"blockNumber",value:1},234:{name:"codecState",value:1},219:{name:"reference",container:{150:{name:"time",value:1},151:{name:"cluster",value:1},21343:{name:"number",value:1},235:{name:"codecState",value:1}}},240:{name:"relativePosition",value:1}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:0},18030:{name:"name",value:0},18016:{name:"mimeType",value:0},18012:{name:"data",value:4},18094:{name:"uid",value:2}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:2},145:{name:"timeStart",value:1},146:{name:"timeEnd",value:2},152:{name:"hidden",value:3},17816:{name:"enabled",value:2},143:{name:"track",container:{137:{name:"trackNumber",value:2},128:{name:"display",container:{133:{name:"string",value:0},17276:{name:"language ",value:0},17278:{name:"country ",value:0}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{n
2414ame:"target",container:{25541:{name:"tagTrackUID",value:2},25540:{name:"tagChapterUID",value:1},25542:{name:"tagAttachmentUID",value:2},25546:{name:"targetType",value:0},26826:{name:"targetTypeValue",value:1},25545:{name:"tagEditionUID",value:2}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:0},17543:{name:"string",value:0},17541:{name:"binary",value:4},17530:{name:"language",value:0},17531:{name:"languageIETF",value:0},17540:{name:"default",value:3}}}}}}}}}}},mD=Te("music-metadata:parser:ebml");class wD extends Dt("EBML"){}class bD{constructor(e0){this.padding=0,this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=e0,this.parserMap.set(1,n0=>this.readUint(n0)),this.parserMap.set(0,n0=>this.readString(n0)),this.parserMap.set(4,n0=>this.readBuffer(n0)),this.parserMap.set(2,async n0=>this.readBuffer(n0)),this.parserMap.set(3,n0=>this.readFlag(n0)),this.parserMap.set(5,n0=>this.readFloat(n0))}async iterate(e0,n0,a0){return this.parseContainer(yD(e0),n0,a0)}async parseContainer(e0,n0,a0){const i0={};for(;this.tokenizer.position<n0;){let s0;const o0=this.tokenizer.position;try{s0=await this.readElement()}catch(c0){if(c0 instanceof A)break;throw c0}const l0=e0.container[s0.id];if(l0)switch(a0.startNext(l0)){case 0:if(mD(`Read element: name=${kD(l0)}{id=0x${s0.id.toString(16)}, container=${!!l0.container}} at position=${o0}`),l0.container){const c0=await this.parseContainer(l0,s0.len>=0?this.tokenizer.position+s0.len:-1,a0);l0.multiple?(i0[l0.name]||(i0[l0.name]=[]),i0[l0.name].push(c0)):i0[l0.name]=c0,await a0.elementValue(l0,c0,o0)}else{const c0=this.parserMap.get(l0.value);if(typeof c0=="function"){const u0=await c0(s0);i0[l0.name]=u0,await a0.elementValue(l0,u0,o0)}}break;case 5:mD(`Go to next element: name=${kD(l0)}, element.id=0x${s0.id}, container=${!!l0.container} at position=${o0}`);break;case 2:mD(`Ignore element: name=${kD(l0)}, element.id=0x${s0.id}, container=${!!l0.container} at position=${o0}`),await this.tokenizer.ignore(s0.len);break;case 3:mD(`Ignore remaining container, at: name=${kD(l0)}, element.id=0x${s0.id}, container=${!!l0.container} at position=${o0}`),await this.tokenizer.ignore(n0-this.tokenizer.position);break;case 4:return mD(`Terminate parsing at element: name=${kD(l0)}, element.id=0x${s0.id}, container=${!!l0.container} at position=${o0}`),i0}else s0.id===236?(this.padding+=s0.len,await this.tokenizer.ignore(s0.len)):(mD(`parseEbml: parent=${kD(e0)}, unknown child: id=${s0.id.toString(16)} at position=${o0}`),this.padding+=s0.len,await this.tokenizer.ignore(s0.len))}return i0}async readVintData(e0){const n0=await this.tokenizer.peekNumber(E);let a0=128,i0=1;for(;!(n0&a0);){if(i0>e0)throw new wD("VINT value exceeding maximum size");++i0,a0>>=1}const s0=new Uint8Array(i0);return await this.tokenizer.readBuffer(s0),s0}async readElement(){const e0=await this.readVintData(this.ebmlMaxIDLength),n0=await this.readVintData(this.ebmlMaxSizeLength);return n0[0]^=128>>n0.length-1,{id:ED(e0,e0.length),len:ED(n0,n0.length)}}async readFloat(e0){switch(e0.len){case 0:return 0;case 4:return this.tokenizer.readNumber(Q);case 8:case 10:return this.tokenizer.readNumber(V);default:throw new wD(`Invalid IEEE-754 float length: ${e0.len}`)}}async readFlag(e0){return await this.readUint(e0)===1}async readUint(e0){return ED(await this.readBuffer(e0),e0.len)}async readString(e0){return(await this.tokenizer.readToken(new H(e0.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(e0){const n0=new Uint8Array(e0.len);return await this.tokenizer.readBuffer(n0),n0}}function ED(r0,e0){return Number(function(n0,a0){const i0=new Uint8Array(8),s0=n0.subarray(0,a0);try{return i0.set(s0,8-a0),_.get(i0,0)}catch{return BigInt(-1)}}(r0,e0))}function yD(r0){return r0.container&&Object.keys(r0.container).map(e0=>{const n0=r0.container[e0];return n0.id=Number.parseInt(e0),n0}).forEach(e0=>{e0.parent=r0,yD(e0)}),r0}function kD(r0){let e0="";return r0.parent&&r0.parent.name!=="dtd"&&(e0+=`${kD(r0.parent)}/`),e0+r0.name}const vD=Te("music-metadata:parser:matroska");var SD=Object.freeze({__proto__:null,MatroskaParser:class extends Fn{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){const r0=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,e0=new bD(this.tokenizer);vD("Initializing DTD end MatroskaIterator"),await e0.iterate(gD,r0,{startNext:n0=>{switch(n0.id){case 475249515:return vD(`Skip element: name=${n0.name}, id=0x${n0.id.toString(16)}`),2;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){const a0=this.seekHead.seek.find(i0=>i0.position+this.seekHeadOffset>this.tokenizer.position);if(a0){const i0=a0.position+this.seekHeadOffset-this.tokenizer.position;return vD(`Use index to go to next position, ignoring ${i0} bytes`),this.tokenizer.ignore(i0),5}}return 2;default:return 0}},elementValue:async(n0,a0,i0)=>{switch(vD(`Received: name=${n0.name}, value=${a0}`),n0.id){case 17026:this.metadata.setFormat("container",`EBML/${a0}`);break;case 290298740:this.seekHead=a0,this.seekHeadOffset=i0;break;case 357149030:{const s0=a0,o0=s0.timecodeScale?s0.timecodeScale:1e6;if(typeof s0.duration=="number"){const l0=s0.duration*o0/1e9;await this.addTag("segment:title",s0.title),this.metadata.setFormat("duration",Number(l0))}}break;case 374648427:{const s0=a0;
2414if(s0!=null&&s0.entries){s0.entries.forEach(l0=>{const c0={codecName:l0.codecID.replace("A_","").replace("V_",""),codecSettings:l0.codecSettings,flagDefault:l0.flagDefault,flagLacing:l0.flagLacing,flagEnabled:l0.flagEnabled,language:l0.language,name:l0.name,type:l0.trackType,audio:l0.audio,video:l0.video};this.metadata.addStreamInfo(c0)});const o0=s0.entries.filter(l0=>l0.trackType===2).reduce((l0,c0)=>l0?c0.flagDefault&&!l0.flagDefault||c0.trackNumber<l0.trackNumber?c0:l0:c0,null);o0&&(this.metadata.setFormat("codec",o0.codecID.replace("A_","")),this.metadata.setFormat("sampleRate",o0.audio.samplingFrequency),this.metadata.setFormat("numberOfChannels",o0.audio.channels))}}break;case 307544935:{const s0=a0;await Promise.all(s0.tag.map(async o0=>{const l0=o0.target,c0=l0!=null&&l0.targetTypeValue?wt[l0.targetTypeValue]:l0!=null&&l0.targetType?l0.targetType:"track";await Promise.all(o0.simpleTags.map(async u0=>{const d0=u0.string?u0.string:u0.binary;await this.addTag(`${c0}:${u0.name}`,d0)}))}))}break;case 423732329:{const s0=a0;await Promise.all(s0.attachedFiles.filter(o0=>o0.mimeType.startsWith("image/")).map(o0=>this.addTag("picture",{data:o0.data,format:o0.mimeType,description:o0.description,name:o0.name})))}}}})}async addTag(r0,e0){await this.metadata.addTag("matroska",r0,e0)}}});const ID=Te("music-metadata:parser:MP4:atom");class CD extends Dt("MP4"){}const xD={len:8,get:(r0,e0)=>{const n0=C.get(r0,e0);if(n0<0)throw new CD("Invalid atom header length");return{length:BigInt(n0),name:new H(4,"latin1").get(r0,e0+4)}},put:(r0,e0,n0)=>(C.put(r0,e0,Number(n0.length)),Pn.put(r0,e0+4,n0.name))},TD=_,BD={len:4,get:(r0,e0)=>({type:new H(4,"ascii").get(r0,e0)})};class UD{constructor(e0,n0,a0){if(e0<n0)throw new CD(`Atom ${a0} expected to be ${n0}, but specifies ${e0} bytes long.`);e0>n0&&ID(`Warning: atom ${a0} expected to be ${n0}, but was actually ${e0} bytes long.`),this.len=e0}}const MD=(r0,e0)=>{const n0=C.get(r0,e0)-2082844800;return new Date(1e3*n0)};class ND extends UD{constructor(e0){super(e0,24,"mdhd")}get(e0,n0){return{version:E.get(e0,n0+0),flags:S.get(e0,n0+1),creationTime:MD(e0,n0+4),modificationTime:MD(e0,n0+8),timeScale:C.get(e0,n0+12),duration:C.get(e0,n0+16),language:k.get(e0,n0+20),quality:k.get(e0,n0+22)}}}class DD extends UD{constructor(e0){super(e0,100,"mvhd")}get(e0,n0){return{version:E.get(e0,n0),flags:S.get(e0,n0+1),creationTime:MD(e0,n0+4),modificationTime:MD(e0,n0+8),timeScale:C.get(e0,n0+12),duration:C.get(e0,n0+16),preferredRate:C.get(e0,n0+20),preferredVolume:k.get(e0,n0+24),previewTime:C.get(e0,n0+72),previewDuration:C.get(e0,n0+76),posterTime:C.get(e0,n0+80),selectionTime:C.get(e0,n0+84),selectionDuration:C.get(e0,n0+88),currentTime:C.get(e0,n0+92),nextTrackID:C.get(e0,n0+96)}}}class OD{constructor(e0){this.len=e0}get(e0,n0){return{type:{set:E.get(e0,n0+0),type:S.get(e0,n0+1)},locale:S.get(e0,n0+4),value:new Y(this.len-8).get(e0,n0+8)}}}class LD{constructor(e0){this.len=e0}get(e0,n0){return{version:E.get(e0,n0),flags:S.get(e0,n0+1),name:new H(this.len-4,"utf-8").get(e0,n0+4)}}}class _D{constructor(e0){this.len=e0}get(e0,n0){return{version:E.get(e0,n0),flags:S.get(e0,n0+1),creationTime:MD(e0,n0+4),modificationTime:MD(e0,n0+8),trackId:C.get(e0,n0+12),duration:C.get(e0,n0+20),layer:k.get(e0,n0+24),alternateGroup:k.get(e0,n0+26),volume:k.get(e0,n0+28)}}}class RD{constructor(e0){this.len=e0}get(e0,n0){const a0=this.len-12;return{dataFormat:Pn.get(e0,n0),dataReferenceIndex:k.get(e0,n0+10),description:a0>0?new Y(a0).get(e0,n0+12):void 0}}}class zD{constructor(e0){this.len=e0}get(e0,n0){const a0=((s0,o0)=>({version:E.get(s0,o0),flags:S.get(s0,o0+1),numberOfEntries:C.get(s0,o0+4)}))(e0,n0);n0+=8;const i0=[];for(let s0=0;s0<a0.numberOfEntries;++s0){const o0=C.get(e0,n0);n0+=C.len,i0.push(new RD(o0-C.len).get(e0,n0)),n0+=o0}return{header:a0,table:i0}}}const FD=8,QD=(r0,e0)=>({version:T.get(r0,e0),revision:T.get(r0,e0+2),vendor:N.get(r0,e0+4)}),PD=(r0,e0)=>({numAudioChannels:T.get(r0,e0+0),sampleSize:T.get(r0,e0+2),compressionId:T.get(r0,e0+4),packetSize:T.get(r0,e0+6),sampleRate:k.get(r0,e0+8)+k.get(r0,e0+10)/1e4});class VD{constructor(e0,n0){this.len=e0,this.token=n0}get(e0,n0){const a0=N.get(e0,n0+4);return{version:x.get(e0,n0+0),flags:M.get(e0,n0+1),numberOfEntries:a0,entries:qD(e0,this.token,n0+8,this.len-8,a0)}}}const GD={len:8,get:(r0,e0)=>({count:N.get(r0,e0+0),duration:N.get(r0,e0+4)})};
2414class jD extends VD{constructor(e0){super(e0,GD)}}const KD={len:12,get:(r0,e0)=>({firstChunk:N.get(r0,e0),samplesPerChunk:N.get(r0,e0+4),sampleDescriptionId:N.get(r0,e0+8)})};class YD extends VD{constructor(e0){super(e0,KD)}}class HD{constructor(e0){this.len=e0}get(e0,n0){const a0=N.get(e0,n0+8);return{version:x.get(e0,n0),flags:M.get(e0,n0+1),sampleSize:N.get(e0,n0+4),numberOfEntries:a0,entries:qD(e0,N,n0+12,this.len-12,a0)}}}class JD extends VD{constructor(e0){super(e0,N),this.len=e0}}class WD{constructor(e0){this.len=e0}get(e0,n0){const a0=T.get(e0,n0+0);return new H(a0,"utf-8").get(e0,n0+2)}}function qD(r0,e0,n0,a0,i0){if(ID(`remainingLen=${a0}, numberOfEntries=${i0} * token-len=${e0.len}`),a0===0)return[];if(a0!==i0*e0.len)throw new CD("mismatch number-of-entries with remaining atom-length");const s0=[];for(let o0=0;o0<i0;++o0)s0.push(e0.get(r0,n0)),n0+=e0.len;return s0}class ZD{constructor(e0){this.len=e0}get(e0,n0){const a0=n0+1,i0={version:x.get(e0,n0),flags:{baseDataOffsetPresent:Ot(e0,a0+2,0),sampleDescriptionIndexPresent:Ot(e0,a0+2,1),defaultSampleDurationPresent:Ot(e0,a0+2,3),defaultSampleSizePresent:Ot(e0,a0+2,4),defaultSampleFlagsPresent:Ot(e0,a0+2,5),defaultDurationIsEmpty:Ot(e0,a0,0),defaultBaseIsMoof:Ot(e0,a0,1)},trackId:C.get(e0,4)};let s0=8;return i0.flags.baseDataOffsetPresent&&(i0.baseDataOffset=_.get(e0,s0),s0+=8),i0.flags.sampleDescriptionIndexPresent&&(i0.sampleDescriptionIndex=C.get(e0,s0),s0+=4),i0.flags.defaultSampleDurationPresent&&(i0.defaultSampleDuration=C.get(e0,s0),s0+=4),i0.flags.defaultSampleSizePresent&&(i0.defaultSampleSize=C.get(e0,s0),s0+=4),i0.flags.defaultSampleFlagsPresent&&(i0.defaultSampleFlags=C.get(e0,s0)),i0}}class XD{constructor(e0){this.len=e0}get(e0,n0){const a0=n0+1,i0={version:x.get(e0,n0),flags:{dataOffsetPresent:Ot(e0,a0+2,0),firstSampleFlagsPresent:Ot(e0,a0+2,2),sampleDurationPresent:Ot(e0,a0+1,0),sampleSizePresent:Ot(e0,a0+1,1),sampleFlagsPresent:Ot(e0,a0+1,2),sampleCompositionTimeOffsetsPresent:Ot(e0,a0+1,3)},sampleCount:C.get(e0,n0+4),samples:[]};let s0=n0+8;i0.flags.dataOffsetPresent&&(i0.dataOffset=C.get(e0,s0),s0+=4),i0.flags.firstSampleFlagsPresent&&(i0.firstSampleFlags=C.get(e0,s0),s0+=4);for(let o0=0;o0<i0.sampleCount;++o0){if(s0>=this.len){ID("TrackRunBox size mismatch");break}const l0={};i0.flags.sampleDurationPresent&&(l0.sampleDuration=C.get(e0,s0),s0+=4),i0.flags.sampleSizePresent&&(l0.sampleSize=C.get(e0,s0),s0+=4),i0.flags.sampleFlagsPresent&&(l0.sampleFlags=C.get(e0,s0),s0+=4),i0.flags.sampleCompositionTimeOffsetsPresent&&(l0.sampleCompositionTimeOffset=C.get(e0,s0),s0+=4),i0.samples.push(l0)}return i0}}class $D{constructor(e0){this.len=e0}get(e0,n0){const a0=new H(4,"utf-8");return{version:x.get(e0,n0),flags:S.get(e0,n0+1),componentType:a0.get(e0,n0+4),handlerType:a0.get(e0,n0+8),componentName:new H(this.len-28,"utf-8").get(e0,n0+28)}}}class eO{constructor(e0){this.len=e0}get(e0,n0){let a0=0;const i0=[];for(;a0<this.len;)i0.push(C.get(e0,n0+a0)),a0+=4;return i0}}const tO=Te("music-metadata:parser:MP4:Atom");class nO{static async readAtom(e0,n0,a0,i0){const s0=e0.position;tO(`Reading next token on offset=${s0}...`);const o0=await e0.readToken(xD),l0=o0.length===1n;l0&&(o0.length=await e0.readToken(TD));const c0=new nO(o0,l0,a0),u0=c0.getPayloadLength(i0);return tO(`parse atom name=${c0.atomPath}, extended=${c0.extended}, offset=${s0}, len=${c0.header.length}`),await c0.readData(e0,n0,u0),c0}constructor(e0,n0,a0){this.header=e0,this.extended=n0,this.parent=a0,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(e0){return(this.header.length===0n?e0:Number(this.header.length))-this.getHeaderLength()}async readAtoms(e0,n0,a0){for(;a0>0;){const i0=await nO.readAtom(e0,n0,this,a0);this.children.push(i0),a0-=i0.header.length===0n?a0:Number(i0.header.length)}}async readData(e0,n0,a0){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"<id>":case"ilst":case"tref":case"moof":return this.readAtoms(e0,n0,this.getPayloadLength(a0));case"meta":{const i0=(await e0.peekToken(xD)).name==="hdlr"?0:4;return await e0.ignore(i0),this.readAtoms(e0,n0,this.getPayloadLength(a0)-i0)}default:return n0(this,a0)}}}const aO=Te("music-metadata:parser:MP4"),rO={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};function iO(r0,e0,n0){return n0.indexOf(r0)===e0}class AO extends Fn{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async e0=>{const n0=await this.tokenizer.readToken(new DD(e0));this.metadata.setFormat("creationTime",n0.creationTime),this.metadata.setFormat("modificationTime",n0.modificationTime)},chap:async e0=>{const n0=this.getTrackDescription(),a0=[];for(;e0>=C.len;)a0.push(await this.tokenizer.readNumber(C)),e0-=C.len;
2414n0.chapterList=a0},mdat:async e0=>{if(this.audioLengthInBytes=e0,this.calculateBitRate(),this.options.includeChapters){const n0=[...this.tracks.values()].filter(a0=>a0.chapterList);if(n0.length===1){const a0=n0[0].chapterList,i0=[...this.tracks.values()].filter(s0=>a0.indexOf(s0.header.trackId)!==-1);if(i0.length===1)return this.parseChapterTrack(i0[0],n0[0],e0)}}await this.tokenizer.ignore(e0)},ftyp:async e0=>{const n0=[];for(;e0>0;){const i0=await this.tokenizer.readToken(BD);e0-=BD.len;const s0=i0.type.replace(/\W/g,"");s0.length>0&&n0.push(s0)}aO(`ftyp: ${n0.join("/")}`);const a0=n0.filter(iO).join("/");this.metadata.setFormat("container",a0)},stsd:async e0=>{const n0=await this.tokenizer.readToken(new zD(e0));this.getTrackDescription().soundSampleDescription=n0.table.map(a0=>this.parseSoundSampleDescription(a0))},stsz:async e0=>{const n0=await this.tokenizer.readToken(new HD(e0)),a0=this.getTrackDescription();a0.sampleSize=n0.sampleSize,a0.sampleSizeTable=n0.entries},date:async e0=>{const n0=await this.tokenizer.readToken(new H(e0,"utf-8"));await this.addTag("date",n0)}}}static read_BE_Integer(e0,n0){const a0=(n0?"INT":"UINT")+8*e0.length+(e0.length>1?"_BE":""),i0=J[a0];if(!i0)throw new CD(`Token for integer type not found: "${a0}"`);return Number(i0.get(e0,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let e0=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||e0>0;){try{if((await this.tokenizer.peekToken(xD)).name==="\0\0\0\0"){const s0=`Error at offset=${this.tokenizer.position}: box.id=0`;aO(s0),this.addWarning(s0);break}}catch(s0){if(!(s0 instanceof Error))throw s0;{const o0=`Error at offset=${this.tokenizer.position}: ${s0.message}`;aO(o0),this.addWarning(o0)}break}const i0=await nO.readAtom(this.tokenizer,(s0,o0)=>this.handleAtom(s0,o0),null,e0);e0-=i0.header.length===BigInt(0)?e0:Number(i0.header.length)}const n0=[];this.tracks.forEach(i0=>{const s0=[];i0.soundSampleDescription.forEach(o0=>{const l0={},c0=rO[o0.dataFormat];if(c0?(s0.push(c0.format),l0.codecName=c0.format):l0.codecName=`<${o0.dataFormat}>`,o0.description){const{description:u0}=o0;u0.sampleRate>0&&(l0.type=2,l0.audio={samplingFrequency:u0.sampleRate,bitDepth:u0.sampleSize,channels:u0.numAudioChannels})}this.metadata.addStreamInfo(l0)}),s0.length>=1&&n0.push(s0.join("/"))}),n0.length>0&&this.metadata.setFormat("codec",n0.filter(iO).join("+"));const a0=[...this.tracks.values()].filter(i0=>i0.soundSampleDescription.length>=1&&i0.soundSampleDescription[0].description&&i0.soundSampleDescription[0].description.numAudioChannels>0);if(a0.length>=1){const i0=a0[0];if(i0.media.header&&i0.media.header.timeScale>0){if(i0.media.header.duration>0){aO("Using duration defined on audio track");const l0=i0.media.header.duration/i0.media.header.timeScale;this.metadata.setFormat("duration",l0)}else if(i0.fragments.length>0){aO("Calculate duration defined in track fragments");let l0=0;for(const c0 of i0.fragments){const u0=c0.header.defaultSampleDuration;for(const d0 of c0.trackRun.samples){const h0=d0.sampleDuration??u0;if(h0==null)throw new Error("Missing sampleDuration and no default_sample_duration in tfhd");l0+=h0}}this.metadata.setFormat("duration",l0/i0.media.header.timeScale)}}const s0=i0.soundSampleDescription[0];if(s0.description&&i0.media.header&&(this.metadata.setFormat("sampleRate",s0.description.sampleRate),this.metadata.setFormat("bitsPerSample",s0.description.sampleSize),this.metadata.setFormat("numberOfChannels",s0.description.numAudioChannels),i0.media.header.timeScale===0&&i0.timeToSampleTable.length>0)){const l0=i0.timeToSampleTable.map(c0=>c0.count*c0.duration).reduce((c0,u0)=>c0+u0)/s0.description.sampleRate;this.metadata.setFormat("duration",l0)}const o0=rO[s0.dataFormat];o0&&this.metadata.setFormat("lossless",!o0.lossy),this.calculateBitRate()}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(e0,n0){if(e0.parent)switch(e0.parent.header.name){case"ilst":case"<id>":return this.parseMetadataItemData(e0);
2414case"moov":if(e0.header.name==="trak")return this.parseTrackBox(e0);break;case"moof":if(e0.header.name==="traf")return this.parseTrackFragmentBox(e0)}if(this.atomParsers[e0.header.name])return this.atomParsers[e0.header.name](n0);aO(`No parser for atom path=${e0.atomPath}, payload-len=${n0}, ignoring atom`),await this.tokenizer.ignore(n0)}getTrackDescription(){const e0=[...this.tracks.values()];return e0[e0.length-1]}calculateBitRate(){this.audioLengthInBytes&&this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*this.audioLengthInBytes/this.metadata.format.duration)}async addTag(e0,n0){await this.metadata.addTag("iTunes",e0,n0)}addWarning(e0){aO(`Warning: ${e0}`),this.metadata.addWarning(e0)}parseMetadataItemData(e0){let n0=e0.header.name;return e0.readAtoms(this.tokenizer,async(a0,i0)=>{const s0=a0.getPayloadLength(i0);switch(a0.header.name){case"data":return this.parseValueAtom(n0,a0);case"name":case"mean":case"rate":{const o0=await this.tokenizer.readToken(new LD(s0));n0+=`:${o0.name}`;break}default:{const o0=await this.tokenizer.readToken(new Y(s0));this.addWarning(`Unsupported meta-item: ${n0}[${a0.header.name}] => value=${Ze(o0)} ascii=${He(o0,"ascii")}`)}}},e0.getPayloadLength(0))}async parseValueAtom(e0,n0){const a0=await this.tokenizer.readToken(new OD(Number(n0.header.length)-xD.len));if(a0.type.set!==0)throw new CD(`Unsupported type-set != 0: ${a0.type.set}`);switch(a0.type.type){case 0:switch(e0){case"trkn":case"disk":{const i0=E.get(a0.value,3),s0=E.get(a0.value,5);await this.addTag(e0,`${i0}/${s0}`);break}case"gnre":{const i0=E.get(a0.value,1),s0=na[i0-1];await this.addTag(e0,s0);break}case"rate":{const i0=new TextDecoder("ascii").decode(a0.value);await this.addTag(e0,i0);break}default:aO(`unknown proprietary value type for: ${n0.atomPath}`)}break;case 1:case 18:await this.addTag(e0,new TextDecoder("utf-8").decode(a0.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(e0,{format:"image/jpeg",data:Uint8Array.from(a0.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(e0,{format:"image/png",data:Uint8Array.from(a0.value)});break;case 21:await this.addTag(e0,AO.read_BE_Integer(a0.value,!0));break;case 22:await this.addTag(e0,AO.read_BE_Integer(a0.value,!1));break;case 65:await this.addTag(e0,E.get(a0.value,0));break;case 66:await this.addTag(e0,k.get(a0.value,0));break;case 67:await this.addTag(e0,C.get(a0.value,0));break;default:this.addWarning(`atom key=${e0}, has unknown well-known-type (data-type): ${a0.type.type}`)}}async parseTrackBox(e0){const n0={media:{},fragments:[]};await e0.readAtoms(this.tokenizer,async(a0,i0)=>{const s0=a0.getPayloadLength(i0);switch(a0.header.name){case"chap":{const o0=await this.tokenizer.readToken(new eO(i0));n0.chapterList=o0;break}case"tkhd":n0.header=await this.tokenizer.readToken(new _D(s0));break;case"hdlr":switch(n0.handler=await this.tokenizer.readToken(new $D(s0)),n0.handler.handlerType){case"audi":aO("Contains audio track"),this.hasAudioTrack=!0;break;case"vide":aO("Contains video track"),this.hasVideoTrack=!0}break;case"mdhd":{const o0=await this.tokenizer.readToken(new ND(s0));n0.media.header=o0;break}case"stco":{const o0=await this.tokenizer.readToken(new JD(s0));n0.chunkOffsetTable=o0.entries;break}case"stsc":{const o0=await this.tokenizer.readToken(new YD(s0));n0.sampleToChunkTable=o0.entries;break}case"stsd":{const o0=await this.tokenizer.readToken(new zD(s0));n0.soundSampleDescription=o0.table.map(l0=>this.parseSoundSampleDescription(l0));break}case"stts":{const o0=await this.tokenizer.readToken(new jD(s0));n0.timeToSampleTable=o0.entries;break}case"stsz":{const o0=await this.tokenizer.readToken(new HD(s0));n0.sampleSize=o0.sampleSize,n0.sampleSizeTable=o0.entries;break}case"dinf":case"vmhd":case"smhd":aO(`Ignoring: ${a0.header.name}`),await this.tokenizer.ignore(s0);break;default:aO(`Unexpected track box: ${a0.header.name}`),await this.tokenizer.ignore(s0)}},e0.getPayloadLength(0)),this.tracks.set(n0.header.trackId,n0)}parseTrackFragmentBox(e0){let n0;return e0.readAtoms(this.tokenizer,async(a0,i0)=>{const s0=a0.getPayloadLength(i0);
2414switch(a0.header.name){case"tfhd":{const o0=new ZD(a0.getPayloadLength(i0));n0=await this.tokenizer.readToken(o0);break}case"tfdt":await this.tokenizer.ignore(s0);break;case"trun":{const o0=new XD(s0),l0=await this.tokenizer.readToken(o0);if(n0){const c0=this.tracks.get(n0.trackId);c0==null||c0.fragments.push({header:n0,trackRun:l0})}break}default:aO(`Unexpected box: ${a0.header.name}`),await this.tokenizer.ignore(s0)}},e0.getPayloadLength(0))}parseSoundSampleDescription(e0){const n0={dataFormat:e0.dataFormat,dataReferenceIndex:e0.dataReferenceIndex};let a0=0;if(e0.description){const i0=QD(e0.description,a0);a0+=FD,i0.version===0||i0.version===1?n0.description=PD(e0.description,a0):aO(`Warning: sound-sample-description ${i0} not implemented`)}return n0}async parseChapterTrack(e0,n0,a0){if(!e0.sampleSize&&e0.chunkOffsetTable.length!==e0.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");const i0=[];for(let s0=0;s0<e0.chunkOffsetTable.length&&a0>0;++s0){const o0=e0.timeToSampleTable.slice(0,s0).reduce((h0,f0)=>h0+f0.duration,0),l0=e0.chunkOffsetTable[s0]-this.tokenizer.position,c0=e0.sampleSize>0?e0.sampleSize:e0.sampleSizeTable[s0];if((a0-=l0+c0)<0)throw new CD("Chapter chunk exceeding token length");await this.tokenizer.ignore(l0);const u0=await this.tokenizer.readToken(new WD(c0));aO(`Chapter ${s0+1}: ${u0}`);const d0={title:u0,timeScale:e0.media.header?e0.media.header.timeScale:0,start:o0,sampleOffset:this.findSampleOffset(n0,this.tokenizer.position)};aO(`Chapter title=${d0.title}, offset=${d0.sampleOffset}/${n0.header.duration}`),i0.push(d0)}this.metadata.setFormat("chapters",i0),await this.tokenizer.ignore(a0)}findSampleOffset(e0,n0){let a0=0;for(;a0<e0.chunkOffsetTable.length&&e0.chunkOffsetTable[a0]<n0;)++a0;return this.getChunkDuration(a0+1,e0)}getChunkDuration(e0,n0){let a0=0,i0=n0.timeToSampleTable[a0].count,s0=n0.timeToSampleTable[a0].duration,o0=1,l0=this.getSamplesPerChunk(o0,n0.sampleToChunkTable),c0=0;for(;o0<e0;){const u0=Math.min(i0,l0);c0+=u0*s0,i0-=u0,l0-=u0,l0===0?(++o0,l0=this.getSamplesPerChunk(o0,n0.sampleToChunkTable)):(++a0,i0=n0.timeToSampleTable[a0].count,s0=n0.timeToSampleTable[a0].duration)}return c0}getSamplesPerChunk(e0,n0){for(let a0=0;a0<n0.length-1;++a0)if(e0>=n0[a0].firstChunk&&e0<n0[a0+1].firstChunk)return n0[a0].samplesPerChunk;return n0[n0.length-1].samplesPerChunk}}var sO=Object.freeze({__proto__:null,MP4Parser:AO});const oO=Te("music-metadata:parser:musepack:sv8"),lO=new H(2,"latin1"),cO={len:5,get:(r0,e0)=>({crc:I.get(r0,e0),streamVersion:E.get(r0,e0+4)})},uO={len:2,get:(r0,e0)=>({sampleFrequency:[44100,48e3,37800,32e3][Ft(r0,e0,0,3)],maxUsedBands:Ft(r0,e0,3,5),channelCount:Ft(r0,e0+1,0,4)+1,msUsed:Qt(r0,e0+1,4),audioBlockFrames:Ft(r0,e0+1,5,3)})};class dO{get tokenizer(){return this._tokenizer}set tokenizer(e0){this._tokenizer=e0}constructor(e0){this._tokenizer=e0}async readPacketHeader(){const e0=await this.tokenizer.readToken(lO),n0=await this.readVariableSizeField();return{key:e0,payloadLength:n0.value-2-n0.len}}async readStreamHeader(e0){const n0={};oO(`Reading SH at offset=${this.tokenizer.position}`);const a0=await this.tokenizer.readToken(cO);e0-=cO.len,Object.assign(n0,a0),oO(`SH.streamVersion = ${a0.streamVersion}`);const i0=await this.readVariableSizeField();e0-=i0.len,n0.sampleCount=i0.value;const s0=await this.readVariableSizeField();e0-=s0.len,n0.beginningOfSilence=s0.value;const o0=await this.tokenizer.readToken(uO);return e0-=uO.len,Object.assign(n0,o0),await this.tokenizer.ignore(e0),n0}async readVariableSizeField(e0=1,n0=0){let a0=await this.tokenizer.readNumber(E);return 128&a0?(a0&=127,a0+=n0,this.readVariableSizeField(e0+1,a0<<7)):{len:e0,value:n0+a0}}}class hO extends Dt("Musepack"){}const pO=Te("music-metadata:parser:musepack");class fO extends Fn{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(Pn)!=="MPCK")throw new hO("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){const e0=new dO(this.tokenizer);for(;;){const n0=await e0.readPacketHeader();switch(pO(`packet-header key=${n0.key}, payloadLength=${n0.payloadLength}`),n0.key){case"SH":{const a0=await e0.readStreamHeader(n0.payloadLength);this.metadata.setFormat("numberOfSamples",a0.sampleCount),this.metadata.setFormat("sampleRate",a0.sampleFrequency),this.metadata.setFormat("duration",a0.sampleCount/a0.sampleFrequency),this.metadata.setFormat("numberOfChannels",a0.channelCount);break}case"AP":this.audioLength+=n0.payloadLength,await this.tokenizer.ignore(n0.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(n0.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*this.audioLength/this.metadata.format.duration),Xn(this.metadata,this.tokenizer,this.options);default:throw new hO(`Unexpected header: ${n0.key}`)}}}}class gO{constructor(e0){this.pos=0,this.dword=null,this.tokenizer=e0}async read(e0){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(I);let n0=this.dword;return this.pos+=e0,this.pos<32?(n0>>>=32-this.pos,n0&(1<<e0)-1):(this.pos-=32,this.pos===0?(this.dword=null,n0&(1<<e0)-1):(this.dword=await this.tokenizer.readToken(I),this.pos&&(n0<<=this.pos,n0|=this.dword>>>32-this.pos),n0&(1<<e0)-1))}
2414async ignore(e0){if(this.pos>0){const i0=32-this.pos;this.dword=null,e0-=i0,this.pos=0}const n0=e0%32,a0=(e0-n0)/32;return await this.tokenizer.ignore(4*a0),this.read(n0)}}const mO={len:24,get:(r0,e0)=>{const n0={signature:new TextDecoder("latin1").decode(r0.subarray(e0,e0+3)),streamMinorVersion:Ft(r0,e0+3,0,4),streamMajorVersion:Ft(r0,e0+3,4,4),frameCount:I.get(r0,e0+4),maxLevel:y.get(r0,e0+8),sampleFrequency:[44100,48e3,37800,32e3][Ft(r0,e0+10,0,2)],link:Ft(r0,e0+10,2,2),profile:Ft(r0,e0+10,4,4),maxBand:Ft(r0,e0+11,0,6),intensityStereo:Qt(r0,e0+11,6),midSideStereo:Qt(r0,e0+11,7),titlePeak:y.get(r0,e0+12),titleGain:y.get(r0,e0+14),albumPeak:y.get(r0,e0+16),albumGain:y.get(r0,e0+18),lastFrameLength:I.get(r0,e0+20)>>>20&2047,trueGapless:Qt(r0,e0+23,0)};return n0.lastFrameLength=n0.trueGapless?I.get(r0,20)>>>20&2047:0,n0}},wO=Te("music-metadata:parser:musepack");class bO extends Fn{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){const e0=await this.tokenizer.readToken(mO);if(e0.signature!=="MP+")throw new hO("Unexpected magic number");wO(`stream-version=${e0.streamMajorVersion}.${e0.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",e0.sampleFrequency);const n0=1152*(e0.frameCount-1)+e0.lastFrameLength;this.metadata.setFormat("numberOfSamples",n0),this.duration=n0/e0.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new gO(this.tokenizer),this.metadata.setFormat("numberOfChannels",e0.midSideStereo||e0.intensityStereo?2:1);const a0=await this.bitreader.read(8);return this.metadata.setFormat("codec",(a0/100).toFixed(2)),await this.skipAudioData(e0.frameCount),wO(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),Xn(this.metadata,this.tokenizer,this.options)}async skipAudioData(e0){for(;e0-- >0;){const a0=await this.bitreader.read(20);this.audioLength+=20+a0,await this.bitreader.ignore(a0)}const n0=await this.bitreader.read(11);this.audioLength+=n0,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}const EO=Te("music-metadata:parser:musepack");var yO=Object.freeze({__proto__:null,MusepackParser:class extends iN{async postId3v2Parse(){let r0;switch(await this.tokenizer.peekToken(new H(3,"latin1"))){case"MP+":EO("Stream-version 7"),r0=new bO(this.metadata,this.tokenizer,this.options);break;case"MPC":EO("Stream-version 8"),r0=new fO(this.metadata,this.tokenizer,this.options);break;default:throw new hO("Invalid signature prefix")}return this.metadata.setAudioOnly(),r0.parse()}}});class kO extends Dt("Opus"){}class vO{constructor(e0){if(e0<19)throw new kO("ID-header-page 0 should be at least 19 bytes long");this.len=e0}get(e0,n0){return{magicSignature:new H(8,"ascii").get(e0,n0+0),version:E.get(e0,n0+8),channelCount:E.get(e0,n0+9),preSkip:y.get(e0,n0+10),inputSampleRate:I.get(e0,n0+12),outputGain:y.get(e0,n0+16),channelMapping:E.get(e0,n0+18)}}}class SO extends cD{constructor(e0,n0,a0){super(e0,n0),this.idHeader=null,this.lastPos=-1,this.tokenizer=a0}parseFirstPage(e0,n0){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new vO(n0.length).get(n0,0),this.idHeader.magicSignature!=="OpusHead")throw new kO("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(e0){new H(8,"ascii").get(e0,0)==="OpusTags"&&(await this.parseUserCommentList(e0,8),this.lastPos=this.tokenizer.position-e0.length)}calculateDuration(){if(this.lastPageHeader&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){const e0=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",e0),this.metadata.setFormat("duration",e0/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){const n0=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*n0/this.metadata.format.duration)}}}}const IO=Te("music-metadata:parser:ogg:speex");class CO extends cD{constructor(e0,n0,a0){super(e0,n0),this.tokenizer=a0}parseFirstPage(e0,n0){IO("First Ogg/Speex page");const a0=((i0,s0)=>({speex:new H(8,"ascii").get(i0,s0+0),version:_t(new H(20,"ascii").get(i0,s0+8)),version_id:D.get(i0,s0+28),header_size:D.get(i0,s0+32),rate:D.get(i0,s0+36),mode:D.get(i0,s0+40),mode_bitstream_version:D.get(i0,s0+44),nb_channels:D.get(i0,s0+48),bitrate:D.get(i0,s0+52),frame_size:D.get(i0,s0+56),vbr:D.get(i0,s0+60),frames_per_packet:D.get(i0,s0+64),extra_headers:D.get(i0,s0+68),reserved1:D.get(i0,s0+72),reserved2:D.get(i0,s0+76)}))(n0,0);this.metadata.setFormat("codec",`Speex ${a0.version}`),this.metadata.setFormat("numberOfChannels",a0.nb_channels),this.metadata.setFormat("sampleRate",a0.rate),a0.bitrate!==-1&&this.metadata.setFormat("bitrate",a0.bitrate),this.metadata.setAudioOnly()}}const xO=Te("music-metadata:parser:ogg:theora");class TO{constructor(e0,n0,a0){this.metadata=e0,this.tokenizer=a0}async parsePage(e0,n0){e0.headerType.firstPage&&await this.parseFirstPage(e0,n0)}calculateDuration(){xO("duration calculation not implemented")}async parseFirstPage(e0,n0){xO("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");const a0=((i0,s0)=>
2414({id:new H(7,"ascii").get(i0,s0),vmaj:E.get(i0,s0+7),vmin:E.get(i0,s0+8),vrev:E.get(i0,s0+9),vmbw:k.get(i0,s0+10),vmbh:k.get(i0,s0+17),nombr:S.get(i0,s0+37),nqual:E.get(i0,s0+40)}))(n0,0);this.metadata.setFormat("bitrate",a0.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}const BO={len:27,get:(r0,e0)=>({capturePattern:new H(4,"latin1").get(r0,e0),version:E.get(r0,e0+4),headerType:{continued:Ot(r0,e0+5,0),firstPage:Ot(r0,e0+5,1),lastPage:Ot(r0,e0+5,2)},absoluteGranulePosition:Number(O.get(r0,e0+6)),streamSerialNumber:I.get(r0,e0+14),pageSequenceNo:I.get(r0,e0+18),pageChecksum:I.get(r0,e0+22),page_segments:E.get(r0,e0+26)})};class UO{static sum(e0,n0,a0){const i0=new DataView(e0.buffer,0);let s0=0;for(let o0=n0;o0<n0+a0;++o0)s0+=i0.getUint8(o0);return s0}constructor(e0){this.len=e0.page_segments}get(e0,n0){return{totalPageSize:UO.sum(e0,n0,this.len)}}}class MO extends Dt("Ogg"){}const NO=Te("music-metadata:parser:ogg");class DO{constructor(e0,n0,a0){this.pageNumber=0,this.closed=!1,this.metadata=e0,this.streamSerial=n0,this.options=a0}async parsePage(e0,n0){this.pageNumber=n0.pageSequenceNo,NO("serial=%s page#=%s, Ogg.id=%s",n0.streamSerialNumber,n0.pageSequenceNo,n0.capturePattern);const a0=await e0.readToken(new UO(n0));NO("totalPageSize=%s",a0.totalPageSize);const i0=await e0.readToken(new Y(a0.totalPageSize));if(NO("firstPage=%s, lastPage=%s, continued=%s",n0.headerType.firstPage,n0.headerType.lastPage,n0.headerType.continued),n0.headerType.firstPage){const s0=i0.slice(0,7);switch(s0[0]){case 1:case 128:s0[0]=95}const o0=new TextDecoder("latin1").decode(s0);switch(o0){case"_vorbis":NO(`Set Ogg stream serial ${n0.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new cD(this.metadata,this.options);break;case"OpusHea":NO("Set page consumer to Ogg/Opus"),this.pageConsumer=new SO(this.metadata,this.options,e0);break;case"Speex ":NO("Set page consumer to Ogg/Speex"),this.pageConsumer=new CO(this.metadata,this.options,e0);break;case"fishead":case"_theora":NO("Set page consumer to Ogg/Theora"),this.pageConsumer=new TO(this.metadata,this.options,e0);break;default:throw new MO(`Ogg codec not recognized (id=${o0})`)}}if(n0.headerType.lastPage&&(this.closed=!0),!this.pageConsumer)throw new Error("pageConsumer should be initialized");await this.pageConsumer.parsePage(n0,i0)}}var OO=Object.freeze({__proto__:null,OggContentError:MO,OggParser:class extends Fn{constructor(){super(...arguments),this.streams=new Map}async parse(){var e0,n0;let r0;this.streams=new Map,NO("pos=%s, parsePage()",this.tokenizer.position);try{do{if(r0=await this.tokenizer.readToken(BO),r0.capturePattern!=="OggS")throw new MO("Invalid Ogg capture pattern");this.metadata.setFormat("container","Ogg");let a0=this.streams.get(r0.streamSerialNumber);a0||(a0=new DO(this.metadata,r0.streamSerialNumber,this.options),this.streams.set(r0.streamSerialNumber,a0)),await a0.parsePage(this.tokenizer,r0)}while(![...this.streams.values()].every(a0=>a0.closed))}catch(a0){if(a0 instanceof A)NO("Reached end-of-stream");else{if(!(a0 instanceof MO))throw a0;this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`)}}for(const a0 of this.streams.values())a0.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${a0.streamSerial}`),await((e0=a0.pageConsumer)==null?void 0:e0.flush())),(n0=a0.pageConsumer)==null||n0.calculateDuration()}}});const LO=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],_O={len:32,get:(r0,e0)=>{const n0=I.get(r0,e0+24),a0={BlockID:Pn.get(r0,e0),blockSize:I.get(r0,e0+4),version:y.get(r0,e0+8),totalSamples:I.get(r0,e0+12),blockIndex:I.get(r0,e0+16),blockSamples:I.get(r0,e0+20),flags:{bitsPerSample:8*(1+FO(n0,0,2)),isMono:zO(n0,2),isHybrid:zO(n0,3),isJointStereo:zO(n0,4),crossChannel:zO(n0,5),hybridNoiseShaping:zO(n0,6),floatingPoint:zO(n0,7),samplingRate:LO[FO(n0,23,4)],isDSD:zO(n0,31)},crc:new Y(4).get(r0,e0+28)};return a0.flags.isDSD&&(a0.totalSamples*=8),a0}},RO={len:1,get:(r0,e0)=>({functionId:FO(r0[e0],0,6),isOptional:zO(r0[e0],5),isOddSize:zO(r0[e0],6),largeBlock:zO(r0[e0],7)})};function zO(r0,e0){return FO(r0,e0,1)===1}function FO(r0,e0,n0){return r0>>>e0&4294967295>>>32-n0}const QO=Te("music-metadata:parser:WavPack");class PO extends Dt("WavPack"){}var VO=Object.freeze({__proto__:null,WavPackContentError:PO,WavPackParser:class extends Fn{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),Xn(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(Pn)!=="wvpk")break;const r0=await this.tokenizer.readToken(_O);
2414if(r0.BlockID!=="wvpk")throw new PO("Invalid WavPack Block-ID");QO(`WavPack header blockIndex=${r0.blockIndex}, len=${_O.len}`),r0.blockIndex!==0||this.metadata.format.container||(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!r0.flags.isHybrid),this.metadata.setFormat("bitsPerSample",r0.flags.bitsPerSample),r0.flags.isDSD||(this.metadata.setFormat("sampleRate",r0.flags.samplingRate),this.metadata.setFormat("duration",r0.totalSamples/r0.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",r0.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",r0.totalSamples),this.metadata.setFormat("codec",r0.flags.isDSD?"DSD":"PCM"));const e0=r0.blockSize-(_O.len-8);await(r0.blockIndex===0?this.parseMetadataSubBlock(r0,e0):this.tokenizer.ignore(e0)),r0.blockSamples>0&&(this.audioDataSize+=r0.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=_O.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*this.audioDataSize/this.metadata.format.duration)}async parseMetadataSubBlock(r0,e0){let n0=e0;for(;n0>RO.len;){const a0=await this.tokenizer.readToken(RO),i0=await this.tokenizer.readNumber(a0.largeBlock?v:E),s0=new Uint8Array(2*i0-(a0.isOddSize?1:0));switch(await this.tokenizer.readBuffer(s0),QO(`Metadata Sub-Blocks functionId=0x${a0.functionId.toString(16)}, id.largeBlock=${a0.largeBlock},data-size=${s0.length}`),a0.functionId){case 0:break;case 14:{QO("ID_DSD_BLOCK");const o0=1<<E.get(s0,0),l0=r0.flags.samplingRate*o0*8;if(!r0.flags.isDSD)throw new PO("Only expect DSD block if DSD-flag is set");this.metadata.setFormat("sampleRate",l0),this.metadata.setFormat("duration",r0.totalSamples/l0);break}case 36:QO("ID_ALT_TRAILER: trailer for non-wav files");break;case 38:this.metadata.setFormat("audioMD5",s0);break;case 47:QO(`ID_BLOCK_CHECKSUM: checksum=${Ze(s0)}`);break;default:QO(`Ignore unsupported meta-sub-block-id functionId=0x${a0.functionId.toString(16)}`)}n0-=RO.len+(a0.largeBlock?v.len:E.len)+2*i0,QO(`remainingLength=${n0}`),a0.isOddSize&&this.tokenizer.ignore(1)}if(n0!==0)throw new PO("metadata-sub-block should fit it remaining length")}}});const GO={len:8,get:(r0,e0)=>({chunkID:new H(4,"latin1").get(r0,e0),chunkSize:I.get(r0,e0+4)})};class jO{constructor(e0){this.tagHeader=e0,this.len=e0.chunkSize,this.len+=1&this.len}get(e0,n0){return new H(this.tagHeader.chunkSize,"ascii").get(e0,n0)}}class KO extends Dt("Wave"){}const YO=1,HO=2,JO=3,WO=5632,qO=5634,ZO=255,XO=146,$O=8192,eL=576,tL=577,nL=9,aL=8193,rL=80,iL={[YO]:"PCM",[HO]:"ADPCM",[JO]:"IEEE_FLOAT",[WO]:"MPEG_ADTS_AAC",[qO]:"MPEG_LOAS",[ZO]:"RAW_AAC1",[XO]:"DOLBY_AC3_SPDIF",[$O]:"DVM",[eL]:"RAW_SPORT",[tL]:"ESST_AC3",[nL]:"DRM",[aL]:"DTS2",[rL]:"MPEG"};class AL{constructor(e0){if(e0.chunkSize<16)throw new KO("Invalid chunk size");this.len=e0.chunkSize}get(e0,n0){return{wFormatTag:y.get(e0,n0),nChannels:y.get(e0,n0+2),nSamplesPerSec:I.get(e0,n0+4),nAvgBytesPerSec:I.get(e0,n0+8),nBlockAlign:y.get(e0,n0+12),wBitsPerSample:y.get(e0,n0+14)}}}class sL{constructor(e0){if(e0.chunkSize<4)throw new KO("Invalid fact chunk size.");this.len=e0.chunkSize}get(e0,n0){return{dwSampleLength:I.get(e0,n0)}}}const oL={len:420,get:(r0,e0)=>({description:zt(new H(256,"ascii").get(r0,e0)).trim(),originator:zt(new H(32,"ascii").get(r0,e0+256)).trim(),originatorReference:zt(new H(32,"ascii").get(r0,e0+288)).trim(),originationDate:zt(new H(10,"ascii").get(r0,e0+320)).trim(),originationTime:zt(new H(8,"ascii").get(r0,e0+330)).trim(),timeReferenceLow:I.get(r0,e0+338),timeReferenceHigh:I.get(r0,e0+342),version:y.get(r0,e0+346),umid:new Y(64).get(r0,e0+348),loudnessValue:y.get(r0,e0+412),maxTruePeakLevel:y.get(r0,e0+414),maxMomentaryLoudness:y.get(r0,e0+416),maxShortTermLoudness:y.get(r0,e0+418)})},lL=Te("music-metadata:parser:RIFF");var cL=Object.freeze({__proto__:null,WaveParser:class extends Fn{constructor(){super(...arguments),this.blockAlign=0}
2414async parse(){const r0=await this.tokenizer.readToken(GO);if(lL(`pos=${this.tokenizer.position}, parse: chunkID=${r0.chunkID}`),r0.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(r0.chunkSize).catch(e0=>{if(!(e0 instanceof A))throw e0})}async parseRiffChunk(r0){const e0=await this.tokenizer.readToken(Pn);if(this.metadata.setFormat("container",e0),e0==="WAVE")return this.readWaveChunk(r0-Pn.len);throw new KO(`Unsupported RIFF format: RIFF/${e0}`)}async readWaveChunk(r0){for(;r0>=GO.len;){const e0=await this.tokenizer.readToken(GO);switch(r0-=GO.len+e0.chunkSize,e0.chunkSize>r0&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=e0,lL(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${e0.chunkID}`),e0.chunkID){case"LIST":await this.parseListTag(e0);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new sL(e0));break;case"fmt ":{const n0=await this.tokenizer.readToken(new AL(e0));let a0=iL[n0.wFormatTag];a0||(lL(`WAVE/non-PCM format=${n0.wFormatTag}`),a0=`non-PCM (${n0.wFormatTag})`),this.metadata.setFormat("codec",a0),this.metadata.setFormat("bitsPerSample",n0.wBitsPerSample),this.metadata.setFormat("sampleRate",n0.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",n0.nChannels),this.metadata.setFormat("bitrate",n0.nBlockAlign*n0.nSamplesPerSec*8),this.blockAlign=n0.nBlockAlign;break}case"id3 ":case"ID3 ":{const n0=g(await this.tokenizer.readToken(new Y(e0.chunkSize)));await new nN().parse(this.metadata,n0,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let n0=e0.chunkSize;if(this.tokenizer.fileInfo.size){const i0=this.tokenizer.fileInfo.size-this.tokenizer.position;i0<n0&&(this.metadata.addWarning("data chunk length exceeding file length"),n0=i0)}const a0=this.fact?this.fact.dwSampleLength:n0===4294967295?void 0:n0/this.blockAlign;a0&&(this.metadata.setFormat("numberOfSamples",a0),this.metadata.format.sampleRate&&this.metadata.setFormat("duration",a0/this.metadata.format.sampleRate)),this.metadata.format.codec==="ADPCM"?this.metadata.setFormat("bitrate",352e3):this.metadata.format.sampleRate&&this.metadata.setFormat("bitrate",this.blockAlign*this.metadata.format.sampleRate*8),await this.tokenizer.ignore(e0.chunkSize);break}case"bext":{const n0=await this.tokenizer.readToken(oL);Object.keys(n0).forEach(i0=>{this.metadata.addTag("exif",`bext.${i0}`,n0[i0])});const a0=e0.chunkSize-oL.len;await this.tokenizer.ignore(a0);break}case"\0\0\0\0":lL(`Ignore padding chunk: RIFF/${e0.chunkID} of ${e0.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${e0.chunkID}`),await this.tokenizer.ignore(e0.chunkSize);break;default:lL(`Ignore chunk: RIFF/${e0.chunkID} of ${e0.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${e0.chunkID}`),await this.tokenizer.ignore(e0.chunkSize)}this.header.chunkSize%2==1&&(lL("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(r0){const e0=await this.tokenizer.readToken(new H(4,"latin1"));return lL("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,e0),e0==="INFO"?this.parseRiffInfoTags(r0.chunkSize-4):(this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${e0}`),lL(`Ignoring chunkID=RIFF/WAVE/LIST/${e0}`),this.tokenizer.ignore(r0.chunkSize-4).then())}async parseRiffInfoTags(r0){for(;r0>=8;){const e0=await this.tokenizer.readToken(GO),n0=new jO(e0),a0=await this.tokenizer.readToken(n0);this.addTag(e0.chunkID,zt(a0)),r0-=8+n0.len}if(r0!==0)throw new KO(`Illegal remaining size: ${r0}`)}addTag(r0,e0){this.metadata.addTag("exif",r0,e0)}}});function WinampPitchPlayer({songs:r0,allowDownloads:e0,onPlay:n0,onDownload:a0}){const i0=reactExports.useRef(null),s0=reactExports.useRef(n0);s0.current=n0;const o0=reactExports.useMemo(()=>new Map(r0.map(l0=>[l0.stream_url,l0.id])),[r0]);return reactExports.useEffect(()=>{const l0=i0.current;if(!l0||!r0.length||!WM.browserIsSupported())return;const c0=l0.clientWidth<560,u0=new WM({initialTracks:r0.map(f0=>({url:f0.stream_url,defaultName:f0.name,metaData:{artist:f0.writers||"Bangerbank",title:f0.name}})),windowLayout:{main:{position:{left:0,top:0}}
2414,equalizer:{position:{left:c0?0:275,top:c0?116:0}},playlist:{position:{left:0,top:c0?232:116},size:{extraWidth:c0?0:1,extraHeight:3}}}}),d0=u0.onTrackDidChange(f0=>{if(!f0)return;const p0=o0.get(f0.url);p0&&s0.current(p0)}),h0=u0.onWillClose(f0=>f0());return u0.renderInto(l0),()=>{d0(),h0(),u0.dispose()}},[r0,o0]),jsxRuntimeExports.jsxs("div",{className:"winamp-pitch-shell",children:[jsxRuntimeExports.jsx("div",{ref:i0,className:"winamp-pitch-host","aria-label":"Winamp playlist player"}),e0&&jsxRuntimeExports.jsxs("div",{className:"mt-4 border border-border/60 bg-card p-3",children:[jsxRuntimeExports.jsx("p",{className:"mb-2 text-xs font-medium uppercase text-muted-foreground",children:"Downloads"}),jsxRuntimeExports.jsx("div",{className:"space-y-1",children:r0.map(l0=>jsxRuntimeExports.jsxs("div",{className:"flex min-h-10 items-center gap-3 border-b border-border/50 last:border-0",children:[jsxRuntimeExports.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:l0.name}),jsxRuntimeExports.jsx(Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>a0(l0.id),"aria-label":`Download ${l0.name}`,children:jsxRuntimeExports.jsx(Download,{className:"h-4 w-4"})})]},l0.id))})]})]})}function Pitch(){const{slug:r0}=useParams(),[e0,n0]=reactExports.useState("loading"),[a0,i0]=reactExports.useState("not_found"),[s0,o0]=reactExports.useState(null),[l0,c0]=reactExports.useState(null),[u0,d0]=reactExports.useState([]),h0=reactExports.useState(()=>new Set)[0];reactExports.useEffect(()=>{let m0=!1;return(async()=>{var y0;
2414if(!r0)return;const{data:x0,error:g0}=await supabase.functions.invoke("pitch-links",{body:{action:"resolve",slug:r0}});if(!m0){if(g0||!(x0!=null&&x0.pitch)){let b0="not_found";try{const E0=g0==null?void 0:g0.context;E0&&(b0=((y0=await E0.json())==null?void 0:y0.error)??b0)}catch{}i0(b0),n0("error");return}o0(x0.pitch),c0(x0.sender??null),d0(x0.songs??[]),n0("ready")}})(),()=>{m0=!0}},[r0]);const f0=reactExports.useCallback(m0=>{!s0||h0.has(m0)||(h0.add(m0),supabase.functions.invoke("pitch-links",{body:{action:"track",pitchId:s0.id,songId:m0,kind:"play"}}))},[s0,h0]),p0=reactExports.useCallback(m0=>{r0&&window.open(`https://unfpdgrtnhbfxinuktue.supabase.co/functions/v1/pitch-links?slug=${encodeURIComponent(r0)}&song=${encodeURIComponent(m0)}&mode=download`,"_blank","noopener,noreferrer")},[r0]),A0=async()=>{if(navigator.share)try{await navigator.share({title:(s0==null?void 0:s0.name)??"Pitch",url:window.location.href});return}catch{}await navigator.clipboard.writeText(window.location.href),ue$2.success("Link copied")};if(e0==="loading")return jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"h-6 w-6 animate-spin text-muted-foreground"})});if(e0==="error"){const m0=a0==="expired"?"This pitch link has expired.":a0==="inactive"?"This pitch link has been turned off.":"We could not find this pitch link.";return jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:jsxRuntimeExports.jsxs("div",{className:"text-center max-w-sm",children:[jsxRuntimeExports.jsx(Music2,{className:"mx-auto mb-4 h-8 w-8 text-muted-foreground"}),jsxRuntimeExports.jsx("h1",{className:"text-xl font-semibold",children:"Link unavailable"}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:m0})]})})}return jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-background px-4 py-7 sm:px-6",children:[jsxRuntimeExports.jsxs("header",{className:"mx-auto mb-5 flex max-w-3xl items-start gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntimeExports.jsxs("p",{className:"text-xs font-medium uppercase text-muted-foreground",children:[l0??"Bangerbank",s0!=null&&s0.recipient_name?` · For ${s0.recipient_name}`:""]}),jsxRuntimeExports.jsx("h1",{className:"mt-1 truncate text-2xl font-semibold",children:s0==null?void 0:s0.name}),(s0==null?void 0:s0.message)&&jsxRuntimeExports.jsx("p",{className:"mt-2 max-w-2xl text-sm text-muted-foreground",children:s0.message})]}),jsxRuntimeExports.jsx(Button,{variant:"secondary",size:"icon",onClick:()=>void A0(),"aria-label":"Share pitch",children:jsxRuntimeExports.jsx(Share2,{className:"h-4 w-4"})})]}),jsxRuntimeExports.jsxs("main",{className:"mx-auto max-w-3xl",children:[jsxRuntimeExports.jsx(WinampPitchPlayer,{songs:u0,allowDownloads:(s0==null?void 0:s0.allow_downloads)??!1,onPlay:f0,onDownload:p0}),jsxRuntimeExports.jsx("p",{className:"mt-5 text-center text-xs text-muted-foreground",children:"Shared privately with Bangerbank"})]})]})}const NotFound=()=>{const r0=useLocation();return reactExports.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",r0.pathname)},[r0.pathname]),jsxRuntimeExports.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),jsxRuntimeExports.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),jsxRuntimeExports.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},queryClient=new QueryClient;function ProtectedRoute({children:r0}){const{isAuthenticated:e0,isLoading:n0}=useAuth();return n0?jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}):e0?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:r0}):jsxRuntimeExports.jsx(Navigate,{to:"/login",replace:!0})}function PublicRoute({children:r0}){const{isAuthenticated:e0,isLoading:n0}=useAuth();return n0?jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}):e0?jsxRuntimeExports.jsx(Navigate,{to:"/",replace:!0}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:r0})}function IndexWithPlaylists(){const{ownerId:r0}=useAuth();
2414return jsxRuntimeExports.jsx(PitchPlaylistsProvider,{ownerId:r0||void 0,children:jsxRuntimeExports.jsx(Index,{})})}const AppRoutes=()=>jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(PublicRoute,{children:jsxRuntimeExports.jsx(Login,{})})}),jsxRuntimeExports.jsx(Route,{path:"/auth/callback",element:jsxRuntimeExports.jsx(AuthCallback,{})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(ProtectedRoute,{children:jsxRuntimeExports.jsx(IndexWithPlaylists,{})})}),jsxRuntimeExports.jsx(Route,{path:"/songwriter-signup",element:jsxRuntimeExports.jsx(SongwriterSignup,{})}),jsxRuntimeExports.jsx(Route,{path:"/pitch/:slug",element:jsxRuntimeExports.jsx(Pitch,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFound,{})})]}),App=()=>jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsxs(TooltipProvider,{children:[jsxRuntimeExports.jsx(Toaster$1,{}),jsxRuntimeExports.jsx(Toaster,{}),jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AuthProvider,{children:jsxRuntimeExports.jsx(AppRoutes,{})})})]})});window.Buffer=buffer.Buffer;localStorage.getItem("melodic-math:theme")==="light"&&document.documentElement.classList.add("light");createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(App,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.