@sheetxl/studio-mui 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/B7qLzxylqOaybl3H.cjs +7 -0
- package/browser/cjs/BNGixOiIsu8jZlvn.cjs +7 -0
- package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +7 -0
- package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +7 -0
- package/browser/cjs/BpiMMYip132x0r1O.cjs +7 -0
- package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +7 -0
- package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +7 -0
- package/browser/cjs/C6_zcNM0Efa11KEE.cjs +7 -0
- package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +7 -0
- package/browser/cjs/CITvaW7L_iZfIyAN.cjs +7 -0
- package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +7 -0
- package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +7 -0
- package/browser/cjs/C_SgucbRn-v9IkNO.cjs +7 -0
- package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +7 -0
- package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +7 -0
- package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +7 -0
- package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +7 -0
- package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +7 -0
- package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +7 -0
- package/browser/cjs/DqAlQQIZIyF7HMib.cjs +7 -0
- package/browser/cjs/DuwawlAm4aRBNTBm.cjs +7 -0
- package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +7 -0
- package/browser/cjs/IC19hB4Ntvw1158j.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +7 -0
- package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +7 -0
- package/browser/esm/B8dJHVZJta8QbNKG.mjs +7 -0
- package/browser/esm/BThbC01mtb7qq8_A.mjs +7 -0
- package/browser/esm/Bnt1M91BRyMvXrc4.mjs +7 -0
- package/browser/esm/BqN0SYrEO0RZQtv-.mjs +7 -0
- package/browser/esm/CHPXsEre3jry2-jF.mjs +7 -0
- package/browser/esm/CMCOU0nDlymDFS9l.mjs +7 -0
- package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +7 -0
- package/browser/esm/CesL-3BNbMB1f_if.mjs +7 -0
- package/browser/esm/CfvNSnuQLa1SPbNL.mjs +7 -0
- package/browser/esm/CloqVDbJmTL4oFek.mjs +7 -0
- package/browser/esm/Cta0yn5UIrP2UoT4.mjs +7 -0
- package/browser/esm/CwRyQHiDoBLx5_1g.mjs +7 -0
- package/browser/esm/DI-ZGstUJFwkx4H6.mjs +7 -0
- package/browser/esm/DQTfmweCXjuIlITn.mjs +7 -0
- package/browser/esm/DUIfOO25d1fqtJzn.mjs +7 -0
- package/browser/esm/DhOXsRr8c7bDS1jM.mjs +7 -0
- package/browser/esm/JPwh2m5-pXkdPVzF.mjs +7 -0
- package/browser/esm/UkNAvQj0NVgeMpUl.mjs +7 -0
- package/browser/esm/ZUfck_LDsQb9gpvU.mjs +7 -0
- package/browser/esm/gHhqkr52cxXkga0T.mjs +7 -0
- package/browser/esm/index.mjs +8 -83
- package/browser/esm/obM68UOvA5HV7Lt1.mjs +7 -0
- package/browser/esm/x9MyDRdLE47dI9dF.mjs +7 -0
- package/browser/esm/yW9jxnamUqAhVQkJ.mjs +7 -0
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{DxbGK6Zl1UgjOa4-.mjs → B3M2CzPvK2oKOfg5.mjs} +2 -2
- package/node/esm/{D9XxEDOFeim_xxQE.mjs → BIRLX0-9t62Lqats.mjs} +2 -2
- package/node/esm/{BmkBQUrL_kkRhzTh.mjs → BJY8yNMmN_yyRtIG.mjs} +1 -1
- package/node/esm/{bMROCCq764fn-xgi.mjs → Bj8uU2shfkvN4LnE.mjs} +6 -6
- package/node/esm/{sAnM1xQCuHDSOmip.mjs → Bt5y5wVaVAVjwHBl.mjs} +1 -1
- package/node/esm/{BPqOHRFTv--y9umX.mjs → C2P_M1JNT_WZZN3H.mjs} +8 -8
- package/node/esm/{CcretMZPKGn3lnR4.mjs → CBGAl2mih9mHDt5w.mjs} +1 -1
- package/node/esm/{Clurk3ikkAHRiukp.mjs → CKtVB9hMCfabQMxC.mjs} +2 -2
- package/node/esm/{Dc--wbPxmu3D8pbK.mjs → CVGxETc4rIE1gNAH.mjs} +38 -38
- package/node/esm/{BGArlD6RNgEObMgD.mjs → CryVonGjJnmo2dE_.mjs} +5 -5
- package/node/esm/{FBYT_1wWMsovwFUH.mjs → D1C8ifsmXsypL6pp.mjs} +13 -13
- package/node/esm/{DAGXTtxswgRevXcg.mjs → D1xD8cOQDGcbjIlG.mjs} +1 -1
- package/node/esm/{tOKSFYpLW-UAq6Gt.mjs → DUfB1ollhqU-JIk5.mjs} +4 -4
- package/node/esm/{M1FpuPZr9_2AafMV.mjs → Dx2vq1Hdt4pqmOF-.mjs} +2 -2
- package/node/esm/{wsJBzsqfI7PB1hMT.mjs → M3UB6IrhVERZziiJ.mjs} +2 -2
- package/node/esm/{BvRJoxdFTieQ7fmr.mjs → PF5CCBvapZxEzc7k.mjs} +1 -1
- package/node/esm/{p6vc6u8VPkFyCsYx.mjs → bv_GA6NGCT0sJaXy.mjs} +2 -2
- package/node/esm/{DhG888jHVhaxSY8F.mjs → h1y2hBFecTqRgUa-.mjs} +25 -25
- package/node/esm/index.mjs +5265 -4998
- package/node/esm/{BCPBJsft-CxWAdC2.mjs → kHsChOtl8GUkzj5Q.mjs} +2 -2
- package/node/esm/{CvPEjDQ6QhtpTabY.mjs → kIQFLB3nmEJdn_OT.mjs} +1 -1
- package/node/esm/{BBg45DshIWHYXywC.mjs → m8fyd2BoYkTOJlc1.mjs} +1 -1
- package/node/esm/{usxl4NgDVOQ7LrDb.mjs → wdtYNTNCynMMS4_P.mjs} +1 -1
- package/package.json +8 -8
- package/types/index.d.ts +11 -0
- package/browser/cjs/BKTBvSy7O4Xw2cgz.cjs +0 -12
- package/browser/cjs/BpePzZJYiqMlY5Tv.cjs +0 -6
- package/browser/cjs/C1kdA0ggDPxfA1rZ.cjs +0 -7
- package/browser/cjs/C3Ou4UjGdLm76uIO.cjs +0 -6
- package/browser/cjs/CFxDNxEIdtHFQI9Y.cjs +0 -7
- package/browser/cjs/CYBKL0vexMAhOhAv.cjs +0 -15
- package/browser/cjs/CdVTdaOLyLtwVswE.cjs +0 -6
- package/browser/cjs/ClsxZKYLxWzS4vf3.cjs +0 -12
- package/browser/cjs/Co1amcDxMGmeSblk.cjs +0 -161
- package/browser/cjs/CoKAO1N3hI6MCu8D.cjs +0 -6
- package/browser/cjs/CtsmtdeQOqFBoICs.cjs +0 -6
- package/browser/cjs/CuB7GbiZyoeSvc0Z.cjs +0 -6
- package/browser/cjs/D-N-VqvFR1gHQx1f.cjs +0 -11
- package/browser/cjs/DDFf-jFPulia8BBq.cjs +0 -11
- package/browser/cjs/Db8DWa6iDZSqedMi.cjs +0 -90
- package/browser/cjs/DeGIeKT9CooiCmKo.cjs +0 -6
- package/browser/cjs/LWz4eqzOyIvcl3ew.cjs +0 -6
- package/browser/cjs/bzV_pbhf0GMpQZ5j.cjs +0 -16
- package/browser/cjs/fCiaIJ9GEGrJHKcW.cjs +0 -18
- package/browser/cjs/g_d3i2WIzavP1fkJ.cjs +0 -6
- package/browser/cjs/jtJTqrtVCIIZdMGs.cjs +0 -6
- package/browser/cjs/lKYJYMC7FrPq5kHP.cjs +0 -42
- package/browser/cjs/niDPoiECJADuYx3e.cjs +0 -145
- package/browser/cjs/olo9IZBG5nwaup_7.cjs +0 -6
- package/browser/cjs/zKQuLycAjgd_X11q.cjs +0 -6
- package/browser/esm/3hWSR1m3EU7D5hi-.mjs +0 -1352
- package/browser/esm/536uCif-OpzkPpDe.mjs +0 -84
- package/browser/esm/BAKeXjQwj8pB6HZf.mjs +0 -3803
- package/browser/esm/BCEAVoasUKP7howp.mjs +0 -25
- package/browser/esm/BKPv5CXZmlt0Bt9q.mjs +0 -52
- package/browser/esm/BpaKIplfXogRA7Dy.mjs +0 -424
- package/browser/esm/C7S8lmNi8dvBvaaL.mjs +0 -13391
- package/browser/esm/C8g1cXW8UUjZ5aXU.mjs +0 -43
- package/browser/esm/CDg8_cQCaixUeVW5.mjs +0 -59
- package/browser/esm/COdRj-kRolpDnJJt.mjs +0 -153
- package/browser/esm/C_SmA3bhMniSBiJM.mjs +0 -2251
- package/browser/esm/CfhFPyNuH7O_8Ma5.mjs +0 -46
- package/browser/esm/Cq7Bvqjn_f2hb4Yu.mjs +0 -1703
- package/browser/esm/Cu4sFU_zvi2DcKL0.mjs +0 -864
- package/browser/esm/DRlIFEu_74fHh0Nd.mjs +0 -44
- package/browser/esm/DW_hf-cH6FfKvA2U.mjs +0 -1366
- package/browser/esm/D_9FRFbybIoGcpk5.mjs +0 -640
- package/browser/esm/DssrQc6563EzuV2p.mjs +0 -1467
- package/browser/esm/TCkOSlTdkEa2IszR.mjs +0 -392
- package/browser/esm/XunxgPz4pxTyfYZa.mjs +0 -19979
- package/browser/esm/YJTooL6WwG9eY3LG.mjs +0 -48
- package/browser/esm/ej-oxHSoVFxjTvis.mjs +0 -2410
- package/browser/esm/fbwdS1S_4A9RYV7u.mjs +0 -1672
- package/browser/esm/tZtCH_zqvCEW6mXy.mjs +0 -23
- package/browser/esm/tbB-JzXGTPYVXdKc.mjs +0 -52
- package/node/esm/BmYPa_c9Yu9hUbtH.mjs +0 -312
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
function e(){}function t(e){return"object"==typeof e&&null!==e||"function"==typeof e}const r=e;function o(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}const n=Promise,i=Promise.resolve.bind(n),a=Promise.prototype.then,s=Promise.reject.bind(n),l=i;function u(e){return new n(e)}function c(e){return u(t=>t(e))}function d(e){return s(e)}function f(e,t,r){return a.call(e,t,r)}function b(e,t,o){f(f(e,t,o),void 0,r)}function h(e,t){b(e,t)}function _(e,t){b(e,void 0,t)}function p(e,t,r){return f(e,t,r)}function m(e){f(e,void 0,r)}let y=e=>{if("function"==typeof queueMicrotask)y=queueMicrotask;else{const e=c(void 0);y=t=>f(e,t)}return y(e)};function v(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function w(e,t,r){try{return c(v(e,t,r))}catch(e){return d(e)}}class g{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let o=r+1;const n=e._elements,i=n[r];return 16384===o&&(t=e._next,o=0),--this._size,this._cursor=o,e!==t&&(this._front=t),n[r]=void 0,i}forEach(e){let t=this._cursor,r=this._front,o=r._elements;for(;!(t===o.length&&void 0===r._next||t===o.length&&(r=r._next,o=r._elements,t=0,0===o.length));)e(o[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}const S=Symbol("[[AbortSteps]]"),R=Symbol("[[ErrorSteps]]"),T=Symbol("[[CancelSteps]]"),q=Symbol("[[PullSteps]]"),E=Symbol("[[ReleaseSteps]]");function P(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?j(e):"closed"===t._state?function(e){j(e),z(e)}(e):k(e,t._storedError)}function C(e,t){return zr(e._ownerReadableStream,t)}function O(e){const t=e._ownerReadableStream;"readable"===t._state?W(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e){k(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[E](),t._reader=void 0,e._ownerReadableStream=void 0}function A(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function j(e){e._closedPromise=u((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function k(e,t){j(e),W(e,t)}function W(e,t){void 0!==e._closedPromise_reject&&(m(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function z(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const B=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},F=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function I(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(`${t} is not an object.`);var r}function L(e,t){if("function"!=typeof e)throw new TypeError(`${t} is not a function.`)}function $(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(`${t} is not an object.`)}function x(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function D(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function M(e){return Number(e)}function N(e){return 0===e?0:e}function Y(e,t){const r=Number.MAX_SAFE_INTEGER;let o=Number(e);if(o=N(o),!B(o))throw new TypeError(`${t} is not a finite number`);if(o=function(e){return N(F(e))}(o),o<0||o>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return B(o)&&0!==o?o:0}function V(e,t){if(!kr(e))throw new TypeError(`${t} is not a ReadableStream.`)}function U(e){return new K(e)}function H(e,t){e._reader._readRequests.push(t)}function G(e,t,r){const o=e._reader._readRequests.shift();r?o._closeSteps():o._chunkSteps(t)}function X(e){return e._reader._readRequests.length}function J(e){const t=e._reader;return void 0!==t&&!!Q(t)}class K{constructor(e){if(x(e,1,"ReadableStreamDefaultReader"),V(e,"First parameter"),Wr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");P(this,e),this._readRequests=new g}get closed(){return Q(this)?this._closedPromise:d(te("closed"))}cancel(e=void 0){return Q(this)?void 0===this._ownerReadableStream?d(A("cancel")):C(this,e):d(te("cancel"))}read(){if(!Q(this))return d(te("read"));if(void 0===this._ownerReadableStream)return d(A("read from"));let e,t;const r=u((r,o)=>{e=r,t=o});return Z(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!Q(this))throw te("releaseLock");void 0!==this._ownerReadableStream&&function(e){O(e),ee(e,new TypeError("Reader was released"))}(this)}}function Q(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof K}function Z(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[q](t)}function ee(e,t){const r=e._readRequests;e._readRequests=new g,r.forEach(e=>{e._errorSteps(t)})}function te(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}var re,oe,ne;function ie(e){return e.slice()}function ae(e,t,r,o,n){new Uint8Array(e).set(new Uint8Array(r,o,n),t)}Object.defineProperties(K.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),o(K.prototype.cancel,"cancel"),o(K.prototype.read,"read"),o(K.prototype.releaseLock,"releaseLock"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(K.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});let se=e=>(se="function"==typeof e.transfer?e=>e.transfer():"function"==typeof structuredClone?e=>structuredClone(e,{transfer:[e]}):e=>e,se(e)),le=e=>(le="boolean"==typeof e.detached?e=>e.detached:e=>0===e.byteLength,le(e));function ue(e,t,r){if(e.slice)return e.slice(t,r);const o=r-t,n=new ArrayBuffer(o);return ae(n,0,e,t,o),n}function ce(e,t){const r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(`${String(t)} is not a function`);return r}}function de(e){try{const t=e.done,r=e.value;return f(l(r),e=>({done:t,value:e}))}catch(e){return d(e)}}const fe=null!==(ne=null!==(re=Symbol.asyncIterator)&&void 0!==re?re:null===(oe=Symbol.for)||void 0===oe?void 0:oe.call(Symbol,"Symbol.asyncIterator"))&&void 0!==ne?ne:"@@asyncIterator";function be(e,r="sync",o){if(void 0===o)if("async"===r){if(void 0===(o=ce(e,fe)))return function(e){const r={next(){let t;try{t=he(e)}catch(e){return d(e)}return de(t)},return(r){let o;try{const t=ce(e.iterator,"return");if(void 0===t)return c({done:!0,value:r});o=v(t,e.iterator,[r])}catch(e){return d(e)}return t(o)?de(o):d(new TypeError("The iterator.return() method must return an object"))}};return{iterator:r,nextMethod:r.next,done:!1}}(be(e,"sync",ce(e,Symbol.iterator)))}else o=ce(e,Symbol.iterator);if(void 0===o)throw new TypeError("The object is not iterable");const n=v(o,e,[]);if(!t(n))throw new TypeError("The iterator method must return an object");return{iterator:n,nextMethod:n.next,done:!1}}function he(e){const r=v(e.nextMethod,e.iterator,[]);if(!t(r))throw new TypeError("The iterator.next() method must return an object");return r}class _e{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?p(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise=this._ongoingPromise?p(this._ongoingPromise,t,t):t(),this._ongoingPromise}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;let t,r;const o=u((e,o)=>{t=e,r=o});return Z(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,y(()=>t({value:e,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,O(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,O(e),r(t)}}),o}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(!this._preventCancel){const r=C(t,e);return O(t),p(r,()=>({value:e,done:!0}))}return O(t),c({value:e,done:!0})}}const pe={next(){return me(this)?this._asyncIteratorImpl.next():d(ye("next"))},return(e){return me(this)?this._asyncIteratorImpl.return(e):d(ye("return"))},[fe](){return this}};function me(e){if(!t(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof _e}catch(e){return!1}}function ye(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}Object.defineProperty(pe,fe,{enumerable:!1});const ve=Number.isNaN||function(e){return e!=e};function we(e){const t=ue(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function ge(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Se(e,t,r){if("number"!=typeof(o=r)||ve(o)||o<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var o;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Re(e){e._queue=new g,e._queueTotalSize=0}function Te(e){return e===DataView}class qe{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ce(this))throw et("view");return this._view}respond(e){if(!Ce(this))throw et("respond");if(x(e,1,"respond"),e=Y(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(le(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Ke(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Ce(this))throw et("respondWithNewView");if(x(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(le(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Qe(this._associatedReadableByteStreamController,e)}}Object.defineProperties(qe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),o(qe.prototype.respond,"respond"),o(qe.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(qe.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Ee{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Pe(this))throw tt("byobRequest");return Xe(this)}get desiredSize(){if(!Pe(this))throw tt("desiredSize");return Je(this)}close(){if(!Pe(this))throw tt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);Ve(this)}enqueue(e){if(!Pe(this))throw tt("enqueue");if(x(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);Ue(this,e)}error(e=void 0){if(!Pe(this))throw tt("error");He(this,e)}[T](e){Ae(this),Re(this);const t=this._cancelAlgorithm(e);return Ye(this),t}[q](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0)return void Ge(this,e);const r=this._autoAllocateChunkSize;if(void 0!==r){let o;try{o=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const n={buffer:o,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(n)}H(t,e),Oe(this)}[E](){if(this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new g,this._pendingPullIntos.push(e)}}}function Pe(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Ee}function Ce(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof qe}function Oe(e){const t=function(e){const t=e._controlledReadableByteStream;return"readable"===t._state&&(!e._closeRequested&&(!!e._started&&(!!(J(t)&&X(t)>0)||(!!(at(t)&&it(t)>0)||Je(e)>0))))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,b(e._pullAlgorithm(),()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Oe(e)),null),t=>(He(e,t),null))))}function Ae(e){xe(e),e._pendingPullIntos=new g}function je(e,t){let r=!1;"closed"===e._state&&(r=!0);const o=We(t);"default"===t.readerType?G(e,o,r):function(e,t,r){const o=e._reader._readIntoRequests.shift();r?o._closeSteps(t):o._chunkSteps(t)}(e,o,r)}function ke(e,t){for(let r=0;r<t.length;++r)je(e,t[r])}function We(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function ze(e,t,r,o){e._queue.push({buffer:t,byteOffset:r,byteLength:o}),e._queueTotalSize+=o}function Be(e,t,r,o){let n;try{n=ue(t,r,r+o)}catch(t){throw He(e,t),t}ze(e,n,0,o)}function Fe(e,t){t.bytesFilled>0&&Be(e,t.buffer,t.byteOffset,t.bytesFilled),Ne(e)}function Ie(e,t){const r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+r;let n=r,i=!1;const a=o-o%t.elementSize;a>=t.minimumFill&&(n=a-t.bytesFilled,i=!0);const s=e._queue;for(;n>0;){const r=s.peek(),o=Math.min(n,r.byteLength),i=t.byteOffset+t.bytesFilled;ae(t.buffer,i,r.buffer,r.byteOffset,o),r.byteLength===o?s.shift():(r.byteOffset+=o,r.byteLength-=o),e._queueTotalSize-=o,Le(e,o,t),n-=o}return i}function Le(e,t,r){r.bytesFilled+=t}function $e(e){0===e._queueTotalSize&&e._closeRequested?(Ye(e),Br(e._controlledReadableByteStream)):Oe(e)}function xe(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function De(e){const t=[];for(;e._pendingPullIntos.length>0&&0!==e._queueTotalSize;){const r=e._pendingPullIntos.peek();Ie(e,r)&&(Ne(e),t.push(r))}return t}function Me(e,t){const r=e._pendingPullIntos.peek();xe(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&Ne(e);const r=e._controlledReadableByteStream;if(at(r)){const t=[];for(let o=0;o<it(r);++o)t.push(Ne(e));ke(r,t)}}(e,r):function(e,t,r){if(Le(0,t,r),"none"===r.readerType){Fe(e,r);const t=De(e);return void ke(e._controlledReadableByteStream,t)}if(r.bytesFilled<r.minimumFill)return;Ne(e);const o=r.bytesFilled%r.elementSize;if(o>0){const t=r.byteOffset+r.bytesFilled;Be(e,r.buffer,t-o,o)}r.bytesFilled-=o;const n=De(e);je(e._controlledReadableByteStream,r),ke(e._controlledReadableByteStream,n)}(e,t,r),Oe(e)}function Ne(e){return e._pendingPullIntos.shift()}function Ye(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ve(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();if(t.bytesFilled%t.elementSize!=0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw He(e,t),t}}Ye(e),Br(t)}}function Ue(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const{buffer:o,byteOffset:n,byteLength:i}=t;if(le(o))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const a=se(o);if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();if(le(t.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");xe(e),t.buffer=se(t.buffer),"none"===t.readerType&&Fe(e,t)}if(J(r))(function(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(0===e._queueTotalSize)return;Ge(e,t._readRequests.shift())}})(e),0===X(r)?ze(e,a,n,i):(e._pendingPullIntos.length>0&&Ne(e),G(r,new Uint8Array(a,n,i),!1));else if(at(r)){ze(e,a,n,i);const t=De(e);ke(e._controlledReadableByteStream,t)}else ze(e,a,n,i);Oe(e)}function He(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(Ae(e),Re(e),Ye(e),Fr(r,t))}function Ge(e,t){const r=e._queue.shift();e._queueTotalSize-=r.byteLength,$e(e);const o=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(o)}function Xe(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),o=Object.create(qe.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(o,e,r),e._byobRequest=o}return e._byobRequest}function Je(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Ke(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=se(r.buffer),Me(e,t)}function Qe(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const o=t.byteLength;r.buffer=se(t.buffer),Me(e,o)}function Ze(e,t,r,o,n,i,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Re(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=i,t._pullAlgorithm=o,t._cancelAlgorithm=n,t._autoAllocateChunkSize=a,t._pendingPullIntos=new g,e._readableStreamController=t,b(c(r()),()=>(t._started=!0,Oe(t),null),e=>(He(t,e),null))}function et(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function tt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function rt(e,t){if("byob"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function ot(e){return new st(e)}function nt(e,t){e._reader._readIntoRequests.push(t)}function it(e){return e._reader._readIntoRequests.length}function at(e){const t=e._reader;return void 0!==t&&!!lt(t)}Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),o(Ee.prototype.close,"close"),o(Ee.prototype.enqueue,"enqueue"),o(Ee.prototype.error,"error"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class st{constructor(e){if(x(e,1,"ReadableStreamBYOBReader"),V(e,"First parameter"),Wr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Pe(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");P(this,e),this._readIntoRequests=new g}get closed(){return lt(this)?this._closedPromise:d(dt("closed"))}cancel(e=void 0){return lt(this)?void 0===this._ownerReadableStream?d(A("cancel")):C(this,e):d(dt("cancel"))}read(e,t={}){if(!lt(this))return d(dt("read"));if(!ArrayBuffer.isView(e))return d(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return d(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return d(new TypeError("view's buffer must have non-zero byteLength"));if(le(e.buffer))return d(new TypeError("view's buffer has been detached"));let r;try{r=function(e,t){var r;return I(e,t),{min:Y(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,`${t} has member 'min' that`)}}(t,"options")}catch(e){return d(e)}const o=r.min;if(0===o)return d(new TypeError("options.min must be greater than 0"));if(function(e){return Te(e.constructor)}(e)){if(o>e.byteLength)return d(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(o>e.length)return d(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return d(A("read from"));let n,i;const a=u((e,t)=>{n=e,i=t});return ut(this,e,o,{_chunkSteps:e=>n({value:e,done:!1}),_closeSteps:e=>n({value:e,done:!0}),_errorSteps:e=>i(e)}),a}releaseLock(){if(!lt(this))throw dt("releaseLock");void 0!==this._ownerReadableStream&&function(e){O(e),ct(e,new TypeError("Reader was released"))}(this)}}function lt(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof st}function ut(e,t,r,o){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?o._errorSteps(n._storedError):function(e,t,r,o){const n=e._controlledReadableByteStream,i=t.constructor,a=function(e){return Te(e)?1:e.BYTES_PER_ELEMENT}(i),{byteOffset:s,byteLength:l}=t,u=r*a;let c;try{c=se(t.buffer)}catch(e){return void o._errorSteps(e)}const d={buffer:c,bufferByteLength:c.byteLength,byteOffset:s,byteLength:l,bytesFilled:0,minimumFill:u,elementSize:a,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(d),void nt(n,o);if("closed"!==n._state){if(e._queueTotalSize>0){if(Ie(e,d)){const t=We(d);return $e(e),void o._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return He(e,t),void o._errorSteps(t)}}e._pendingPullIntos.push(d),nt(n,o),Oe(e)}else{const e=new i(d.buffer,d.byteOffset,0);o._closeSteps(e)}}(n._readableStreamController,t,r,o)}function ct(e,t){const r=e._readIntoRequests;e._readIntoRequests=new g,r.forEach(e=>{e._errorSteps(t)})}function dt(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function ft(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(ve(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function bt(e){const{size:t}=e;return t||(()=>1)}function ht(e,t){I(e,t);const r=null==e?void 0:e.highWaterMark,o=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:M(r),size:void 0===o?void 0:_t(o,`${t} has member 'size' that`)}}function _t(e,t){return L(e,t),t=>M(e(t))}function pt(e,t,r){return L(e,r),r=>w(e,t,[r])}function mt(e,t,r){return L(e,r),()=>w(e,t,[])}function yt(e,t,r){return L(e,r),r=>v(e,t,[r])}function vt(e,t,r){return L(e,r),(r,o)=>w(e,t,[r,o])}function wt(e,t){if(!Rt(e))throw new TypeError(`${t} is not a WritableStream.`)}Object.defineProperties(st.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),o(st.prototype.cancel,"cancel"),o(st.prototype.read,"read"),o(st.prototype.releaseLock,"releaseLock"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(st.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});class gt{constructor(e={},t={}){void 0===e?e=null:$(e,"First parameter");const r=ht(t,"Second parameter"),o=function(e,t){I(e,t);const r=null==e?void 0:e.abort,o=null==e?void 0:e.close,n=null==e?void 0:e.start,i=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===r?void 0:pt(r,e,`${t} has member 'abort' that`),close:void 0===o?void 0:mt(o,e,`${t} has member 'close' that`),start:void 0===n?void 0:yt(n,e,`${t} has member 'start' that`),write:void 0===a?void 0:vt(a,e,`${t} has member 'write' that`),type:i}}(e,"First parameter");if(function(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new g,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}(this),void 0!==o.type)throw new RangeError("Invalid type is specified");const n=bt(r);!function(e,t,r,o){const n=Object.create(xt.prototype);let i,a,s,l;i=void 0!==t.start?()=>t.start(n):()=>{},a=void 0!==t.write?e=>t.write(e,n):()=>c(void 0),s=void 0!==t.close?()=>t.close():()=>c(void 0),l=void 0!==t.abort?e=>t.abort(e):()=>c(void 0),function(e,t,r,o,n,i,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Re(t),t._abortReason=void 0,t._abortController=function(){if("function"==typeof AbortController)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=o,t._closeAlgorithm=n,t._abortAlgorithm=i;const l=Ut(t);kt(e,l),b(c(r()),()=>(t._started=!0,Yt(t),null),r=>(t._started=!0,Pt(e,r),null))}(e,n,i,a,s,l,r,o)}(this,o,ft(r,1),n)}get locked(){if(!Rt(this))throw Gt("locked");return Tt(this)}abort(e=void 0){return Rt(this)?Tt(this)?d(new TypeError("Cannot abort a stream that already has a writer")):qt(this,e):d(Gt("abort"))}close(){return Rt(this)?Tt(this)?d(new TypeError("Cannot close a stream that already has a writer")):At(this)?d(new TypeError("Cannot close an already-closing stream")):Et(this):d(Gt("close"))}getWriter(){if(!Rt(this))throw Gt("getWriter");return St(this)}}function St(e){return new Wt(e)}function Rt(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof gt}function Tt(e){return void 0!==e._writer}function qt(e,t){var r;if("closed"===e._state||"errored"===e._state)return c(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);const o=e._state;if("closed"===o||"errored"===o)return c(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===o&&(n=!0,t=void 0);const i=u((r,o)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:o,_reason:t,_wasAlreadyErroring:n}});return e._pendingAbortRequest._promise=i,n||Ct(e,t),i}function Et(e){const t=e._state;if("closed"===t||"errored"===t)return d(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=u((t,r)=>{const o={_resolve:t,_reject:r};e._closeRequest=o}),o=e._writer;var n;return void 0!==o&&e._backpressure&&"writable"===t&&ar(o),Se(n=e._writableStreamController,$t,0),Yt(n),r}function Pt(e,t){"writable"!==e._state?Ot(e):Ct(e,t)}function Ct(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const o=e._writer;void 0!==o&&Ft(o,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&Ot(e)}function Ot(e){e._state="errored",e._writableStreamController[R]();const t=e._storedError;if(e._writeRequests.forEach(e=>{e._reject(t)}),e._writeRequests=new g,void 0===e._pendingAbortRequest)return void jt(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void jt(e);b(e._writableStreamController[S](r._reason),()=>(r._resolve(),jt(e),null),t=>(r._reject(t),jt(e),null))}function At(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function jt(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&er(t,e._storedError)}function kt(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){rr(e)}(r):ar(r)),e._backpressure=t}Object.defineProperties(gt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),o(gt.prototype.abort,"abort"),o(gt.prototype.close,"close"),o(gt.prototype.getWriter,"getWriter"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(gt.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});class Wt{constructor(e){if(x(e,1,"WritableStreamDefaultWriter"),wt(e,"First parameter"),Tt(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!At(e)&&e._backpressure?rr(this):nr(this),Qt(this);else if("erroring"===t)or(this,e._storedError),Qt(this);else if("closed"===t)nr(this),Qt(this),tr(this);else{const t=e._storedError;or(this,t),Zt(this,t)}}get closed(){return zt(this)?this._closedPromise:d(Jt("closed"))}get desiredSize(){if(!zt(this))throw Jt("desiredSize");if(void 0===this._ownerWritableStream)throw Kt("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Nt(t._writableStreamController)}(this)}get ready(){return zt(this)?this._readyPromise:d(Jt("ready"))}abort(e=void 0){return zt(this)?void 0===this._ownerWritableStream?d(Kt("abort")):function(e,t){return qt(e._ownerWritableStream,t)}(this,e):d(Jt("abort"))}close(){if(!zt(this))return d(Jt("close"));const e=this._ownerWritableStream;return void 0===e?d(Kt("close")):At(e)?d(new TypeError("Cannot close an already-closing stream")):Bt(this)}releaseLock(){if(!zt(this))throw Jt("releaseLock");void 0!==this._ownerWritableStream&&It(this)}write(e=void 0){return zt(this)?void 0===this._ownerWritableStream?d(Kt("write to")):Lt(this,e):d(Jt("write"))}}function zt(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Wt}function Bt(e){return Et(e._ownerWritableStream)}function Ft(e,t){"pending"===e._readyPromiseState?ir(e,t):function(e,t){or(e,t)}(e,t)}function It(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ft(e,r),function(e,t){"pending"===e._closedPromiseState?er(e,t):function(e,t){Zt(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Lt(e,t){const r=e._ownerWritableStream,o=r._writableStreamController,n=function(e,t){if(void 0===e._strategySizeAlgorithm)return 1;try{return e._strategySizeAlgorithm(t)}catch(t){return Vt(e,t),1}}(o,t);if(r!==e._ownerWritableStream)return d(Kt("write to"));const i=r._state;if("errored"===i)return d(r._storedError);if(At(r)||"closed"===i)return d(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return d(r._storedError);const a=function(e){return u((t,r)=>{const o={_resolve:t,_reject:r};e._writeRequests.push(o)})}(r);return function(e,t,r){try{Se(e,t,r)}catch(t){return void Vt(e,t)}const o=e._controlledWritableStream;At(o)||"writable"!==o._state||kt(o,Ut(e)),Yt(e)}(o,t,n),a}Object.defineProperties(Wt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),o(Wt.prototype.abort,"abort"),o(Wt.prototype.close,"close"),o(Wt.prototype.releaseLock,"releaseLock"),o(Wt.prototype.write,"write"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Wt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const $t={};class xt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Dt(this))throw Xt("abortReason");return this._abortReason}get signal(){if(!Dt(this))throw Xt("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e=void 0){if(!Dt(this))throw Xt("error");"writable"===this._controlledWritableStream._state&&Ht(this,e)}[S](e){const t=this._abortAlgorithm(e);return Mt(this),t}[R](){Re(this)}}function Dt(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof xt}function Mt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Nt(e){return e._strategyHWM-e._queueTotalSize}function Yt(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void Ot(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===$t?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),ge(e);const r=e._closeAlgorithm();Mt(e),b(r,()=>(function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&tr(t)}(t),null),e=>(function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pt(e,t)}(t,e),null))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r),b(e._writeAlgorithm(t),()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(ge(e),!At(r)&&"writable"===t){const t=Ut(e);kt(r,t)}return Yt(e),null},t=>("writable"===r._state&&Mt(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pt(e,t)}(r,t),null))}(e,r)}function Vt(e,t){"writable"===e._controlledWritableStream._state&&Ht(e,t)}function Ut(e){return Nt(e)<=0}function Ht(e,t){const r=e._controlledWritableStream;Mt(e),Ct(r,t)}function Gt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Xt(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function Jt(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Kt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Qt(e){e._closedPromise=u((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function Zt(e,t){Qt(e),er(e,t)}function er(e,t){void 0!==e._closedPromise_reject&&(m(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function tr(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function rr(e){e._readyPromise=u((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function or(e,t){rr(e),ir(e,t)}function nr(e){rr(e),ar(e)}function ir(e,t){void 0!==e._readyPromise_reject&&(m(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ar(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(xt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(xt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const sr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0,lr=function(){const e=null==sr?void 0:sr.DOMException;return function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}(e)?e:void 0}()||function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return o(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function ur(t,r,o,n,i,a){const s=U(t),l=St(r);t._disturbed=!0;let p=!1,y=c(void 0);return u((v,w)=>{let g;if(void 0!==a){if(g=()=>{const e=void 0!==a.reason?a.reason:new lr("Aborted","AbortError"),o=[];n||o.push(()=>"writable"===r._state?qt(r,e):c(void 0)),i||o.push(()=>"readable"===t._state?zr(t,e):c(void 0)),P(()=>Promise.all(o.map(e=>e())),!0,e)},a.aborted)return void g();a.addEventListener("abort",g)}var S,R,T;if(E(t,s._closedPromise,e=>(n?C(!0,e):P(()=>qt(r,e),!0,e),null)),E(r,l._closedPromise,e=>(i?C(!0,e):P(()=>zr(t,e),!0,e),null)),S=t,R=s._closedPromise,T=()=>(o?C():P(()=>function(e){const t=e._ownerWritableStream,r=t._state;return At(t)||"closed"===r?c(void 0):"errored"===r?d(t._storedError):Bt(e)}(l)),null),"closed"===S._state?T():h(R,T),At(r)||"closed"===r._state){const e=new TypeError("the destination writable stream closed before all data could be piped to it");i?C(!0,e):P(()=>zr(t,e),!0,e)}function q(){const e=y;return f(y,()=>e!==y?q():void 0)}function E(e,t,r){"errored"===e._state?r(e._storedError):_(t,r)}function P(e,t,o){function n(){return b(e(),()=>A(t,o),e=>A(!0,e)),null}p||(p=!0,"writable"!==r._state||At(r)?n():h(q(),n))}function C(e,t){p||(p=!0,"writable"!==r._state||At(r)?A(e,t):h(q(),()=>A(e,t)))}function A(e,t){return It(l),O(s),void 0!==a&&a.removeEventListener("abort",g),e?w(t):v(void 0),null}m(u((t,r)=>{!function o(n){n?t():f(p?c(!0):f(l._readyPromise,()=>u((t,r)=>{Z(s,{_chunkSteps:r=>{y=f(Lt(l,r),void 0,e),t(!1)},_closeSteps:()=>t(!0),_errorSteps:r})})),o,r)}(!1)}))})}class cr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!dr(this))throw gr("desiredSize");return yr(this)}close(){if(!dr(this))throw gr("close");if(!vr(this))throw new TypeError("The stream is not in a state that permits close");_r(this)}enqueue(e=void 0){if(!dr(this))throw gr("enqueue");if(!vr(this))throw new TypeError("The stream is not in a state that permits enqueue");return pr(this,e)}error(e=void 0){if(!dr(this))throw gr("error");mr(this,e)}[T](e){Re(this);const t=this._cancelAlgorithm(e);return hr(this),t}[q](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=ge(this);this._closeRequested&&0===this._queue.length?(hr(this),Br(t)):fr(this),e._chunkSteps(r)}else H(t,e),fr(this)}[E](){}}function dr(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof cr}function fr(e){br(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,b(e._pullAlgorithm(),()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,fr(e)),null),t=>(mr(e,t),null))))}function br(e){const t=e._controlledReadableStream;return!!vr(e)&&!!e._started&&(!!(Wr(t)&&X(t)>0)||yr(e)>0)}function hr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function _r(e){if(!vr(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(hr(e),Br(t))}function pr(e,t){if(!vr(e))return;const r=e._controlledReadableStream;if(Wr(r)&&X(r)>0)G(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw mr(e,t),t}try{Se(e,t,r)}catch(t){throw mr(e,t),t}}fr(e)}function mr(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(Re(e),hr(e),Fr(r,t))}function yr(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function vr(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function wr(e,t,r,o,n,i,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Re(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=i,t._pullAlgorithm=o,t._cancelAlgorithm=n,e._readableStreamController=t,b(c(r()),()=>(t._started=!0,fr(t),null),e=>(mr(t,e),null))}function gr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function Sr(r){return t(o=r)&&void 0!==o.getReader?function(r){let o;return o=Or(e,function(){let e;try{e=r.read()}catch(e){return d(e)}return p(e,e=>{if(!t(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(e.done)_r(o._readableStreamController);else{const t=e.value;pr(o._readableStreamController,t)}})},function(e){try{return c(r.cancel(e))}catch(e){return d(e)}},0),o}(r.getReader()):function(r){let o;const n=be(r,"async");return o=Or(e,function(){let e;try{e=he(n)}catch(e){return d(e)}return p(c(e),e=>{if(!t(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(e.done)_r(o._readableStreamController);else{const t=e.value;pr(o._readableStreamController,t)}})},function(e){const r=n.iterator;let o;try{o=ce(r,"return")}catch(e){return d(e)}return void 0===o?c(void 0):p(w(o,r,[e]),e=>{if(!t(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})},0),o}(r);var o}function Rr(e,t,r){return L(e,r),r=>w(e,t,[r])}function Tr(e,t,r){return L(e,r),r=>w(e,t,[r])}function qr(e,t,r){return L(e,r),r=>v(e,t,[r])}function Er(e,t){if("bytes"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Pr(e,t){I(e,t);const r=null==e?void 0:e.preventAbort,o=null==e?void 0:e.preventCancel,n=null==e?void 0:e.preventClose,i=null==e?void 0:e.signal;return void 0!==i&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(`${t} is not an AbortSignal.`)}(i,`${t} has member 'signal' that`),{preventAbort:Boolean(r),preventCancel:Boolean(o),preventClose:Boolean(n),signal:i}}Object.defineProperties(cr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),o(cr.prototype.close,"close"),o(cr.prototype.enqueue,"enqueue"),o(cr.prototype.error,"error"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(cr.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class Cr{constructor(e={},t={}){void 0===e?e=null:$(e,"First parameter");const r=ht(t,"Second parameter"),o=function(e,t){I(e,t);const r=e,o=null==r?void 0:r.autoAllocateChunkSize,n=null==r?void 0:r.cancel,i=null==r?void 0:r.pull,a=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===o?void 0:Y(o,`${t} has member 'autoAllocateChunkSize' that`),cancel:void 0===n?void 0:Rr(n,r,`${t} has member 'cancel' that`),pull:void 0===i?void 0:Tr(i,r,`${t} has member 'pull' that`),start:void 0===a?void 0:qr(a,r,`${t} has member 'start' that`),type:void 0===s?void 0:Er(s,`${t} has member 'type' that`)}}(e,"First parameter");if(jr(this),"bytes"===o.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const o=Object.create(Ee.prototype);let n,i,a;n=void 0!==t.start?()=>t.start(o):()=>{},i=void 0!==t.pull?()=>t.pull(o):()=>c(void 0),a=void 0!==t.cancel?e=>t.cancel(e):()=>c(void 0);const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ze(e,o,n,i,a,r,s)}(this,o,ft(r,0))}else{const e=bt(r);!function(e,t,r,o){const n=Object.create(cr.prototype);let i,a,s;i=void 0!==t.start?()=>t.start(n):()=>{},a=void 0!==t.pull?()=>t.pull(n):()=>c(void 0),s=void 0!==t.cancel?e=>t.cancel(e):()=>c(void 0),wr(e,n,i,a,s,r,o)}(this,o,ft(r,1),e)}}get locked(){if(!kr(this))throw Ir("locked");return Wr(this)}cancel(e=void 0){return kr(this)?Wr(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):zr(this,e):d(Ir("cancel"))}getReader(e=void 0){if(!kr(this))throw Ir("getReader");return void 0===function(e,t){I(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:rt(r,`${t} has member 'mode' that`)}}(e,"First parameter").mode?U(this):ot(this)}pipeThrough(e,t={}){if(!kr(this))throw Ir("pipeThrough");x(e,1,"pipeThrough");const r=function(e,t){I(e,t);const r=null==e?void 0:e.readable;D(r,"readable","ReadableWritablePair"),V(r,`${t} has member 'readable' that`);const o=null==e?void 0:e.writable;return D(o,"writable","ReadableWritablePair"),wt(o,`${t} has member 'writable' that`),{readable:r,writable:o}}(e,"First parameter"),o=Pr(t,"Second parameter");if(Wr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Tt(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return m(ur(this,r.writable,o.preventClose,o.preventAbort,o.preventCancel,o.signal)),r.readable}pipeTo(e,t={}){if(!kr(this))return d(Ir("pipeTo"));if(void 0===e)return d("Parameter 1 is required in 'pipeTo'.");if(!Rt(e))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=Pr(t,"Second parameter")}catch(e){return d(e)}return Wr(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Tt(e)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ur(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!kr(this))throw Ir("tee");return ie(function(e){return Pe(e._readableStreamController)?function(e){let t,r,o,n,i,a=U(e),s=!1,l=!1,d=!1,f=!1,b=!1;const h=u(e=>{i=e});function p(e){_(e._closedPromise,t=>(e!==a||(He(o._readableStreamController,t),He(n._readableStreamController,t),f&&b||i(void 0)),null))}function m(){lt(a)&&(O(a),a=U(e),p(a)),Z(a,{_chunkSteps:t=>{y(()=>{l=!1,d=!1;const r=t;let a=t;if(!f&&!b)try{a=we(t)}catch(t){return He(o._readableStreamController,t),He(n._readableStreamController,t),void i(zr(e,t))}f||Ue(o._readableStreamController,r),b||Ue(n._readableStreamController,a),s=!1,l?w():d&&g()})},_closeSteps:()=>{s=!1,f||Ve(o._readableStreamController),b||Ve(n._readableStreamController),o._readableStreamController._pendingPullIntos.length>0&&Ke(o._readableStreamController,0),n._readableStreamController._pendingPullIntos.length>0&&Ke(n._readableStreamController,0),f&&b||i(void 0)},_errorSteps:()=>{s=!1}})}function v(t,r){Q(a)&&(O(a),a=ot(e),p(a));const u=r?n:o,c=r?o:n;ut(a,t,1,{_chunkSteps:t=>{y(()=>{l=!1,d=!1;const o=r?b:f;if(r?f:b)o||Qe(u._readableStreamController,t);else{let r;try{r=we(t)}catch(t){return He(u._readableStreamController,t),He(c._readableStreamController,t),void i(zr(e,t))}o||Qe(u._readableStreamController,t),Ue(c._readableStreamController,r)}s=!1,l?w():d&&g()})},_closeSteps:e=>{s=!1;const t=r?b:f,o=r?f:b;t||Ve(u._readableStreamController),o||Ve(c._readableStreamController),void 0!==e&&(t||Qe(u._readableStreamController,e),!o&&c._readableStreamController._pendingPullIntos.length>0&&Ke(c._readableStreamController,0)),t&&o||i(void 0)},_errorSteps:()=>{s=!1}})}function w(){if(s)return l=!0,c(void 0);s=!0;const e=Xe(o._readableStreamController);return null===e?m():v(e._view,!1),c(void 0)}function g(){if(s)return d=!0,c(void 0);s=!0;const e=Xe(n._readableStreamController);return null===e?m():v(e._view,!0),c(void 0)}function S(){}return o=Ar(S,w,function(o){if(f=!0,t=o,b){const o=ie([t,r]),n=zr(e,o);i(n)}return h}),n=Ar(S,g,function(o){if(b=!0,r=o,f){const o=ie([t,r]),n=zr(e,o);i(n)}return h}),p(a),[o,n]}(e):function(e){const t=U(e);let r,o,n,i,a,s=!1,l=!1,d=!1,f=!1;const b=u(e=>{a=e});function h(){return s?(l=!0,c(void 0)):(s=!0,Z(t,{_chunkSteps:e=>{y(()=>{l=!1;const t=e,r=e;d||pr(n._readableStreamController,t),f||pr(i._readableStreamController,r),s=!1,l&&h()})},_closeSteps:()=>{s=!1,d||_r(n._readableStreamController),f||_r(i._readableStreamController),d&&f||a(void 0)},_errorSteps:()=>{s=!1}}),c(void 0))}function p(){}return n=Or(p,h,function(t){if(d=!0,r=t,f){const t=ie([r,o]),n=zr(e,t);a(n)}return b}),i=Or(p,h,function(t){if(f=!0,o=t,d){const t=ie([r,o]),n=zr(e,t);a(n)}return b}),_(t._closedPromise,e=>(mr(n._readableStreamController,e),mr(i._readableStreamController,e),d&&f||a(void 0),null)),[n,i]}(e)}(this))}values(e=void 0){if(!kr(this))throw Ir("values");return function(e,t){const r=U(e),o=new _e(r,t),n=Object.create(pe);return n._asyncIteratorImpl=o,n}(this,function(e){I(e,"First parameter");const t=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(t)}}(e).preventCancel)}[fe](e){return this.values(e)}static from(e){return Sr(e)}}function Or(e,t,r,o=1,n=()=>1){const i=Object.create(Cr.prototype);return jr(i),wr(i,Object.create(cr.prototype),e,t,r,o,n),i}function Ar(e,t,r){const o=Object.create(Cr.prototype);return jr(o),Ze(o,Object.create(Ee.prototype),e,t,r,0,void 0),o}function jr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function kr(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Cr}function Wr(e){return void 0!==e._reader}function zr(t,r){if(t._disturbed=!0,"closed"===t._state)return c(void 0);if("errored"===t._state)return d(t._storedError);Br(t);const o=t._reader;if(void 0!==o&<(o)){const e=o._readIntoRequests;o._readIntoRequests=new g,e.forEach(e=>{e._closeSteps(void 0)})}return p(t._readableStreamController[T](r),e)}function Br(e){e._state="closed";const t=e._reader;if(void 0!==t&&(z(t),Q(t))){const e=t._readRequests;t._readRequests=new g,e.forEach(e=>{e._closeSteps()})}}function Fr(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(W(r,t),Q(r)?ee(r,t):ct(r,t))}function Ir(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Lr(e,t){(function(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0})(e._transformStreamController),Vt(e._writable._writableStreamController,t),function(e){e._backpressure&&$r(e,!1)}(e)}function $r(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=u(t=>{e._backpressureChangePromise_resolve=t}),e._backpressure=t}Object.defineProperties(Cr,{from:{enumerable:!0}}),Object.defineProperties(Cr.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),o(Cr.from,"from"),o(Cr.prototype.cancel,"cancel"),o(Cr.prototype.getReader,"getReader"),o(Cr.prototype.pipeThrough,"pipeThrough"),o(Cr.prototype.pipeTo,"pipeTo"),o(Cr.prototype.tee,"tee"),o(Cr.prototype.values,"values"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Cr.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Cr.prototype,fe,{value:Cr.prototype.values,writable:!0,configurable:!0}),o(e=>e.byteLength,"size"),o(()=>1,"size");class xr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Dr(this))throw Mr("desiredSize");return yr(this._controlledTransformStream._readable._readableStreamController)}enqueue(e=void 0){if(!Dr(this))throw Mr("enqueue");!function(e,t){const r=e._controlledTransformStream,o=r._readable._readableStreamController;if(!vr(o))throw new TypeError("Readable side is not in a state that permits enqueue");try{pr(o,t)}catch(e){throw Lr(r,e),r._readable._storedError}const n=function(e){return!br(e)}(o);n!==r._backpressure&&$r(r,!0)}(this,e)}error(e=void 0){if(!Dr(this))throw Mr("error");var t;t=e,function(e,t){mr(e._readable._readableStreamController,t),Lr(e,t)}(this._controlledTransformStream,t)}terminate(){if(!Dr(this))throw Mr("terminate");!function(e){const t=e._controlledTransformStream;_r(t._readable._readableStreamController),Lr(t,new TypeError("TransformStream terminated"))}(this)}}function Dr(e){return!!t(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof xr}function Mr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}Object.defineProperties(xr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),o(xr.prototype.enqueue,"enqueue"),o(xr.prototype.error,"error"),o(xr.prototype.terminate,"terminate"),"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(xr.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});export{Ee as ReadableByteStreamController,Cr as ReadableStream,st as ReadableStreamBYOBReader,qe as ReadableStreamBYOBRequest,cr as ReadableStreamDefaultController,K as ReadableStreamDefaultReader,xr as TransformStreamDefaultController,gt as WritableStream,xt as WritableStreamDefaultController,Wt as WritableStreamDefaultWriter};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
var e,t={exports:{}};const i=function(e,t){for(var i=0;i<t.length;i++){const r=t[i];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const i=Object.getOwnPropertyDescriptor(r,t);i&&Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[(e||(e=1,t.exports=function e(){var t,i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,s={},a=0,o={};function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new c(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(s=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,s)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&v(this._config.beforeFirstChunk)&&void 0!==(s=this._config.beforeFirstChunk(e))&&(e=s),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var s=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=s.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),s&&s.data&&(this._rowCount+=s.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,n)i.postMessage({results:s,workerId:o.WORKER_ID,finished:r});else if(v(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!v(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){v(this._config.error)?this._config.error(e):n&&this._config.error&&i.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),h.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,i=this._config.downloadRequestHeaders;for(e in i)t.setRequestHeader(e,i[e])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(new Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),h.call(this,e);var t,i,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,n=(this._config.chunkSize&&(n=Math.min(this._start+this._config.chunkSize,this._input.size),e=i.call(e,this._start,n)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;h.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,i;if(!this._finished)return e=this._config.chunkSize,t=e?(i=t.substring(0,e),t.substring(e)):(i=t,""),this._finished=!t,this.parseChunk(i)}}function l(e){h.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=b(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=b(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=b(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=b(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t,i,r,n,s=Math.pow(2,53),a=-s,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,l=0,c=!1,_=!1,m=[],y={data:[],errors:[],meta:{}};function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){if(y&&r&&(R("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!b(e)})),E()){if(y)if(Array.isArray(y.data[0])){for(var t=0;E()&&t<y.data.length;t++)y.data[t].forEach(d);y.data.splice(0,1)}else y.data.forEach(d);function d(t,i){v(e.transformHeader)&&(t=e.transformHeader(t,i)),m.push(t)}}function i(t,i){for(var r=e.header?{}:[],n=0;n<t.length;n++){var o=n,d=t[n];d=((t,i)=>(t=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&((e=>{if(h.test(e)&&(e=parseFloat(e),a<e&&e<s))return 1})(i)?parseFloat(i):u.test(i)?new Date(i):""===i?null:i):i)(o=e.header?n>=m.length?"__parsed_extra":m[n]:o,d=e.transform?e.transform(d,o):d),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(d)):r[o]=d}return e.header&&(n>m.length?R("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,l+i):n<m.length&&R("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,l+i)),r}var n;y&&(e.header||e.dynamicTyping||e.transform)&&(n=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),n=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=m),l+=n)}function E(){return e.header&&0===m.length}function R(e,t,i,r){e={type:e,code:t,message:i},void 0!==r&&(e.row=r),y.errors.push(e)}v(e.step)&&(n=e.step,e.step=function(t){y=t,E()?w():(w(),0!==y.data.length&&(f+=t.data.length,e.preview&&f>e.preview?i.abort():(y.data=y.data[0],n(y,d))))}),this.parse=function(n,s,a){var h=e.quoteChar||'"';return e.newline||(e.newline=this.guessLineEndings(n,h)),r=!1,e.delimiter?v(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter):((h=((t,i,r,n,s)=>{var a,h,u,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<s.length;f++){for(var l,c=s[f],p=0,_=0,m=0,y=(u=void 0,new g({comments:n,delimiter:c,newline:i,preview:10}).parse(t)),k=0;k<y.data.length;k++)r&&b(y.data[k])?m++:(_+=l=y.data[k].length,void 0===u?u=l:0<l&&(p+=Math.abs(l-u),u=l));0<y.data.length&&(_/=y.data.length-m),(void 0===h||p<=h)&&(void 0===d||d<_)&&1.99<_&&(h=p,a=c,d=_)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=h.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),h=k(e),e.preview&&e.header&&h.preview++,t=n,i=new g(h),y=i.parse(t,s,a),w(),c?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,i.abort(),t=v(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(c=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,i.abort(),y.meta.aborted=!0,v(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=new RegExp(p(t)+"([^]*?)"+p(t),"gm");var i=(e=e.replace(t,"")).split("\r");if(e=1<(t=e.split("\n")).length&&t[0].length<i[0].length,1===i.length||e)return"\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,i=e.newline,r=e.comments,n=e.step,s=e.preview,a=e.fastMode,h=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<o.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var l=0,c=!1;this.parse=function(o,g,_){if("string"!=typeof o)throw new Error("Input must be a string");var m=o.length,y=t.length,k=i.length,b=r.length,w=v(n),E=[],R=[],C=[],O=l=0;if(!o)return P();if(a||!1!==a&&-1===o.indexOf(d)){for(var S=o.split(i),x=0;x<S.length;x++){if(C=S[x],l+=C.length,x!==S.length-1)l+=i.length;else if(_)return P();if(!r||C.substring(0,b)!==r){if(w){if(E=[],F(C.split(t)),U(),c)return P()}else F(C.split(t));if(s&&s<=x)return E=E.slice(0,s),P(!0)}}return P()}for(var A=o.indexOf(t,l),I=o.indexOf(i,l),T=new RegExp(p(f)+p(d),"g"),D=o.indexOf(d,l);;)if(o[l]===d)for(D=l,l++;;){if(-1===(D=o.indexOf(d,D+1)))return _||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:l}),z();if(D===m-1)return z(o.substring(l,D).replace(T,d));if(d===f&&o[D+1]===f)D++;else if(d===f||0===D||o[D-1]!==f){-1!==A&&A<D+1&&(A=o.indexOf(t,D+1));var L=j(-1===(I=-1!==I&&I<D+1?o.indexOf(i,D+1):I)?A:Math.min(A,I));if(o.substr(D+1+L,y)===t){C.push(o.substring(l,D).replace(T,d)),o[l=D+1+L+y]!==d&&(D=o.indexOf(d,l)),A=o.indexOf(t,l),I=o.indexOf(i,l);break}if(L=j(I),o.substring(D+1+L,D+1+L+k)===i){if(C.push(o.substring(l,D).replace(T,d)),M(D+1+L+k),A=o.indexOf(t,l),D=o.indexOf(d,l),w&&(U(),c))return P();if(s&&E.length>=s)return P(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:l}),D++}}else if(r&&0===C.length&&o.substring(l,l+b)===r){if(-1===I)return P();l=I+k,I=o.indexOf(i,l),A=o.indexOf(t,l)}else if(-1!==A&&(A<I||-1===I))C.push(o.substring(l,A)),l=A+y,A=o.indexOf(t,l);else{if(-1===I)break;if(C.push(o.substring(l,I)),M(I+k),w&&(U(),c))return P();if(s&&E.length>=s)return P(!0)}return z();function F(e){E.push(e),O=l}function j(e){return-1!==e&&(e=o.substring(D+1,e))&&""===e.trim()?e.length:0}function z(e){return _||(void 0===e&&(e=o.substring(l)),C.push(e),l=m,F(C),w&&U()),P()}function M(e){l=e,F(C),C=[],I=o.indexOf(i,l)}function P(r){if(e.header&&!g&&E.length&&!u){var n=E[0],s=Object.create(null),a=new Set(n);let t=!1;for(let i=0;i<n.length;i++){let r=n[i];if(s[r=v(e.transformHeader)?e.transformHeader(r,i):r]){let e,o=s[r];for(;e=r+"_"+o,o++,a.has(e););a.add(e),n[i]=e,s[r]++,t=!0,(h=null===h?{}:h)[e]=r}else s[r]=1,n[i]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:E,errors:R,meta:{delimiter:t,linebreak:i,aborted:c,truncated:!!r,cursor:O+(g||0),renamedHeaders:h}}}function U(){n(P()),E=[],R=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function _(e){var t=e.data,i=s[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(v(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!r);a++);delete t.results}else v(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=s[e];v(i.userComplete)&&i.userComplete(t),i.terminate(),delete s[e]}function y(){throw new Error("Not implemented.")}function k(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=k(e[t]);return i}function b(e,t){return function(){e.apply(t,arguments)}}function v(e){return"function"==typeof e}return o.parse=function(t,r){var n=(r=r||{}).dynamicTyping||!1;if(v(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!v(r.transform)&&r.transform,!r.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(t),n=new(r.download?u:f)(r)):!0===t.readable&&v(t.read)&&v(t.on)?n=new l(r):(i.File&&t instanceof File||t instanceof Object)&&(n=new d(r)),n.stream(t);(n=(()=>{var t;return!!o.WORKERS_SUPPORTED&&(t=(()=>{var t=i.URL||i.webkitURL||null,r=e.toString();return o.BLOB_URL||(o.BLOB_URL=t.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))})(),(t=new i.Worker(t)).onmessage=_,t.id=a++,s[t.id]=t)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=v(r.step),r.chunk=v(r.chunk),r.complete=v(r.complete),r.error=v(r.error),delete r.worker,n.postMessage({input:t,config:r,workerId:n.id})},o.unparse=function(e,t){var i=!1,r=!0,n=",",s="\r\n",a='"',h=a+a,u=!1,d=null,f=!1,l=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(h=t.escapeChar+a),t.escapeFormulae instanceof RegExp?f=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(f=/^[=+\-@\t\r].*$/)}})(),new RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return c(null,e,u);if("object"==typeof e[0])return c(d||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),c(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function c(e,t,i){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),h=!Array.isArray(t[0]);if(o&&r){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var f=(o?e:t[d]).length,l=!1,c=o?0===Object.keys(t[d]).length:0===t[d].length;if(i&&!o&&(l="greedy"===i?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===i&&o){for(var p=[],_=0;_<f;_++){var m=h?e[_]:_;p.push(t[d][m])}l=""===p.join("").trim()}if(!l){for(var y=0;y<f;y++){0<y&&!c&&(a+=n);var k=o&&h?e[y]:y;a+=g(t[d][k],y)}d<t.length-1&&(!i||0<f&&!c)&&(a+=s)}}return a}function g(e,t){var r,s;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(s=!1,f&&"string"==typeof e&&f.test(e)&&(e="'"+e,s=!0),r=e.toString().replace(l,h),(s=s||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1})(r,o.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!r&&!!i.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=c,o.NetworkStreamer=u,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=l,i.jQuery&&((t=i.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(e){if("INPUT"!==t(this).prop("tagName").toUpperCase()||"file"!==t(this).attr("type").toLowerCase()||!i.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)n.push({file:this.files[s],inputElem:this,instanceConfig:t.extend({},r)})}),s(),this;function s(){if(0===n.length)v(e.complete)&&e.complete();else{var i,r,s,h=n[0];if(v(e.before)){var u=e.before(h.file,h.inputElem);if("object"==typeof u){if("abort"===u.action)return i=h.file,r=h.inputElem,s=u.reason,void(v(e.error)&&e.error({name:"AbortError"},i,r,s));if("skip"===u.action)return void a();"object"==typeof u.config&&(h.instanceConfig=t.extend(h.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=h.instanceConfig.complete;h.instanceConfig.complete=function(e){v(d)&&d(e,h.file,h.inputElem),a()},o.parse(h.file,h.instanceConfig)}}function a(){n.splice(0,1),s()}}),n&&(i.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?i.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(i.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&i.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(h.prototype)).constructor=u,(d.prototype=Object.create(h.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(l.prototype=Object.create(h.prototype)).constructor=l,o}()),t.exports)]);export{i as p};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import{Workbook as e,IRange as t}from"@sheetxl/sdk";const n=async(e,t)=>{const{trimLeadingBlankRow:n=!0,trimLeadingBlankColumn:r=!0,excludeHidden:o=!1,sheetKey:s=null,papaParseConfig:a={}}=t||{},l=await import("./UkNAvQj0NVgeMpUl.mjs").then(e=>e.p);if(!e)throw new Error("workbook must be specified");let i=null;if(null===s?i=e.getSelectedSheet():"number"==typeof s?i=e.getSheets().search()[s]:"string"==typeof s&&(i=e.getSheets().getByName(s)),!i)throw new Error("invalid sheetKey specified");let d=null;const c=[];let p=null,f=i.getUsedRange({excludeHidden:o});if(!f)throw new Error("Nothing to export");if(!n||!r){const e=n?f.getRowStart():0,t=r?f.getColumnStart():0;f=f.getOffsetTo(e,t)}f.forEach((e,t)=>{const n=t.getCoords(),r=t.getCell();d!==n.rowIndex&&(p&&c.push(p),p=[],d=n.rowIndex);const o=r.toTextUnformatted()??"";p.push(o)},{includeEmpty:!0,address:null}),p&&c.push(p);const u={...a},g=l.unparse(c,u);return(new TextEncoder).encode(g).buffer},r=async(n,r)=>{const{papaParseConfig:o,setValuesOptions:s,createWorkbookOptions:a}=r??{},l=await import("./UkNAvQj0NVgeMpUl.mjs").then(e=>e.p),i=(new TextDecoder).decode(n);let d=-1;const c=new e(a),p=c.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:t.Orientation.Row}),f=r?.onProgress;let u=0;const g={...o,transform:(e,t)=>{o?.transform&&(e=o.transform(e,t));const n=t;0===n&&d++;let r=e??"";return p.pushAt(d,n,r),u++,u%1e5==0&&f?.(u),e}};return l.parse(i,g).data,p.apply({textParser:!0,...s}),c};export{r as fromBufferCSV,n as toBufferCSV};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{memo as n,useState as o,useRef as a,useReducer as i,useMemo as s}from"react";import{DialogContent as l,Box as r}from"@mui/material";import{T as c,b as d,x as g,j as m,B as p,O as h,N as u,R as x,n as f,k as y,l as b,m as w,f as S,o as C,Z as N}from"./Cc7y1nMDr5J8jWx-.mjs";const v=n(n=>{const{title:v,onHide:R,autoFocusSel:T=".range-input input",context:F,notifier:D=c,command:H,commands:j,...B}=n,[I,P]=o(!1),[z,L]=o(!1),O=a(null),[E,A]=i(e=>e+1,0),[M,{width:k}]=d();g(H);const V=F??H.context(),W=V.table(),[Z,q]=o(()=>W?V.getNames().getRanges(W.getRange()):null),G=s(()=>W?.getName()??"",[W]);m(V.table(),{onAnchorCoordsChange(e){q(V.getNames().getRanges(e.getRange()))},onProtectedChange(e){A()}});const J=p(e=>{V?.table().setName(e)},[V]),K=p(e=>{V?.table().resize(e.at(0))},[V]);let Q=null;return V.table()||(Q=e("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:1,display:"flex",alignItems:"center",justifyItems:"center",justifyContent:"center",boxSizing:"border-box"},children:e("div",{children:"No table selected"})})),e(h,{ref:O,title:v??"Table Details",initialPosition:{y:"35"},autoFocusSel:T,onHide:R,onFocus:()=>P(!0),onBlur:e=>{O?.current?.contains(e.relatedTarget)||P(!1)},PaperProps:{elevation:I?3:1},...B,children:t(l,{dividers:!0,ref:M,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[t(r,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:V.table()?1:0},children:[e(r,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:e(r,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:t(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[e(u,{formName:"name",defaultInput:G,value:W?.getName()??"No table",onChangeInput:J,onValidate:e=>{W&&W.getName().toLowerCase()===e.toLowerCase()||V?.getNames().validateName(e)},disabled:W?.isProtected()??!0,onFocus:e=>{z||e.target?.select(),L(!0)}}),e(x,{formName:"range",value:Z,onChangeInput:K,resolvedAddress:V.getNames().getRanges.bind(V.getNames()),disabled:W?.isProtected()??!0,onFocus:e=>{z||e.target?.select(),L(!0)}})]})})}),t(r,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[e(f,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),e(y,{disabled:W?.isProtected(),styleOptions:W?.getStyleOptions()??null,onStyleOptionsChange:e=>{W.updateStyleOptions(e)},showHeaderRow:W?.getShowHeaders(),onShowHeaderRowChange:e=>{try{W.setShowHeaders(e)}catch(e){D.showError(e)}},showTotalRow:W?.getShowTotals(),onShowTotalRowChange:e=>{try{W.setShowTotals(e)}catch(e){D.showError(e)}},showFilterButton:W?.getFilter()?W.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{W.setShowFilterButton(e)}catch(e){D.showError(e)}}}),e(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:e(b,{table:W,styles:V.styles(),bodyStyle:V.bodyStyle(),cellHeight:30,isLive:!0})}),e(f,{orientation:"horizontal"}),t(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[e(w,{variant:C.Menuitem,command:j.getCommand("convertTableToRange"),commandState:W,icon:S(e(N,{}))}),e(w,{variant:C.Menuitem,commandState:W,command:j.getCommand("deleteTable"),icon:S(e(N,{}))})]})]})]}),Q]})})});export{v as TableDetailsWindow,v as default};
|
package/browser/esm/index.mjs
CHANGED
|
@@ -1,88 +1,13 @@
|
|
|
1
|
-
(function
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
try{if(typeof document != 'undefined'){var elementStyle = document.createElement('style');elementStyle.appendChild(document.createTextNode("._sheetxl-reset_ods65_1 {\n display: block;\n margin: 0;\n padding: 0;\n line-height: normal;\n}\n\n._sheetxl-reset_ods65_1 table,\n._sheetxl-reset_ods65_1 thead,\n._sheetxl-reset_ods65_1 tbody,\n._sheetxl-reset_ods65_1 tfoot,\n._sheetxl-reset_ods65_1 tr,\n._sheetxl-reset_ods65_1 th,\n._sheetxl-reset_ods65_1 td {\n display: block;\n width: auto;\n height: auto;\n margin: 0;\n padding: 0;\n border: none;\n border-collapse: inherit;\n border-spacing: 0;\n border-color: inherit;\n vertical-align: inherit;\n text-align: left;\n font-weight: inherit;\n -webkit-border-horizontal-spacing: 0;\n -webkit-border-vertical-spacing: 0;\n}\n\n._sheetxl-reset_ods65_1 th,\n._sheetxl-reset_ods65_1 td {\n display: inline;\n}\n\n._sheetxl-reset_ods65_1 button {\n /* Add button resets here if needed */\n}\n\nhtml {\n color: initial;\n}\n/* should we make all svg have a default fill of currentColor? */\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 {\n fill: currentColor;\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor {\n fill: var(--sxl-color-active);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background {\n fill: var(--sxl-app-color-background);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey {\n fill: var(--sxl-app-color-grey);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast {\n fill: var(--sxl-app-color-high);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info {\n fill: var(--sxl-app-color-info);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light {\n fill: var(--sxl-app-color-info-light);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark {\n fill: var(--sxl-app-color-info-dark);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary {\n fill: var(--sxl-app-color-secondary);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light {\n fill: var(--sxl-app-color-secondary-light);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark {\n fill: var(--sxl-app-color-secondary-dark);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success {\n fill: var(--sxl-app-color-success);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light {\n fill: var(--sxl-app-color-success-light);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark {\n fill: var(--sxl-app-color-success-dark);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning {\n fill: var(--sxl-app-color-warning);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light {\n fill: var(--sxl-app-color-warning-light);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark {\n fill: var(--sxl-app-color-warning-dark);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error {\n fill: var(--sxl-app-color-error);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light {\n fill: var(--sxl-app-color-error-light);\n }\n ._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark {\n fill: var(--sxl-app-color-error-dark);\n }\n\n/*\n\n '--sxl-app-color-high-contrast': appTheme.palette.primary.main, // style_HighContrast // TODO - make this nicer\n '--sxl-app-color-background': appTheme.palette.background.paper, // style_m20\n '--sxl-app-color-grey': ((appTheme.palette.text as any).icon ?? appTheme.palette.action.active), // style_m26\n *//**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n ._sheetxl-workbook_1j3lu_5 {\n display: flex;\n position: relative;\n overflow: hidden;\n flex-direction: column;\n width: 100%;\n height: 100%;\n outline: none;\n}\n ._sheetxl-workbook_1j3lu_5 .splitPane .styled-resizer {\n background-color: var(--sxl-app-color-grey, grey);\n }\n ._sheetxl-workbook_1j3lu_5 .splitPane .styled-resizer:hover {\n background-color: var(--sxl-app-color-primary, blue);\n }\n ._sheetxl-workbook_1j3lu_5 .splitPane.dragging .styled-resizer {\n background-color: var(--sxl-app-color-primary, blue);\n }/* CustomError CSS Module */\n\n/* :global(.notistack-SnackbarContainer) {\n max-width: calc(100% - 32px) !important;\n} */\n\n._card_1a398_7 {\n width: 100%;\n}\n\n._actionRoot_1a398_11 {\n padding: 8px 8px 8px 16px;\n justify-content: space-between;\n}\n\n._icons_1a398_16 {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n._expand_1a398_22 {\n padding: 8px;\n transform: rotate(0deg);\n color: #d32f2f; /* MUI error.main for icons */\n transition: all 0.2s ease-in-out;\n}\n\n._expandOpen_1a398_29 {\n transform: rotate(180deg);\n}\n\n._stackTraceContainer_1a398_33 {\n padding: 16px;\n}\n\n._paper_1a398_37 {\n background-color: #fff;\n padding: 16px;\n}\n\n._checkIcon_1a398_42 {\n font-size: 20px;\n padding-right: 4px;\n}\n\n._button_1a398_47 {\n padding: 0;\n text-transform: none;\n}"));document.head.appendChild(elementStyle);}}catch(e){console.error('vite-plugin-css-injected-by-js', e);}
|
|
5
|
+
|
|
6
|
+
})();
|
|
4
7
|
/**
|
|
5
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
6
9
|
*
|
|
7
10
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
11
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
12
|
*/
|
|
10
|
-
export
|
|
11
|
-
n as AppearanceCommandButton,
|
|
12
|
-
s as AutoColorPosition,
|
|
13
|
-
m as BorderCommandButton,
|
|
14
|
-
r as BorderPopupButton,
|
|
15
|
-
l as BorderStyleButton,
|
|
16
|
-
u as ClearCommandButton,
|
|
17
|
-
d as ColorButton,
|
|
18
|
-
b as ColorCommandButton,
|
|
19
|
-
C as ColorPanel,
|
|
20
|
-
B as ColorPanelType,
|
|
21
|
-
i as ColorPopupButton,
|
|
22
|
-
S as DeleteCellsCommandButton,
|
|
23
|
-
p as DocThemeCommandButton,
|
|
24
|
-
k as FillCommandButton,
|
|
25
|
-
T as FilterColumnMenu,
|
|
26
|
-
c as FilterCommandButton,
|
|
27
|
-
P as Filters,
|
|
28
|
-
F as FindCommandButton,
|
|
29
|
-
W as FontFamilyCommandButton,
|
|
30
|
-
h as FontSizeCommandButton,
|
|
31
|
-
y as FormulaBar,
|
|
32
|
-
I as FreezeCommandButton,
|
|
33
|
-
g as HelpCommandButton,
|
|
34
|
-
M as HorizontalAlignCommandButton,
|
|
35
|
-
w as InsertCellsCommandButton,
|
|
36
|
-
x as InsertImageCommandButton,
|
|
37
|
-
f as InsertScriptCommandButton,
|
|
38
|
-
t as LicenseManager,
|
|
39
|
-
A as MergeCommandButton,
|
|
40
|
-
v as NamedCollectionEditor,
|
|
41
|
-
E as NamedInput,
|
|
42
|
-
O as NumberFormatCommandButton,
|
|
43
|
-
R as PasteCommandButton,
|
|
44
|
-
L as PresetCellStylesCommandButton,
|
|
45
|
-
N as PresetTableStylesCommandButton,
|
|
46
|
-
V as QuickFormulaSumCommandPopupButton,
|
|
47
|
-
z as RangeInput,
|
|
48
|
-
H as RunScriptCommandButton,
|
|
49
|
-
U as ScriptEditorToolbar,
|
|
50
|
-
D as ScriptWorkspace,
|
|
51
|
-
G as SheetTab,
|
|
52
|
-
j as SheetTabMenu,
|
|
53
|
-
q as SheetZoomScale,
|
|
54
|
-
J as SheetsAllMenu,
|
|
55
|
-
Q as SortFilterCommandButton,
|
|
56
|
-
Z as StatusBar,
|
|
57
|
-
_ as Studio,
|
|
58
|
-
K as StyledStrokeIcon,
|
|
59
|
-
X as TableStyleCanvasPreview,
|
|
60
|
-
Y as TableStyleOptionsPanel,
|
|
61
|
-
$ as TableStylePreview,
|
|
62
|
-
aa as TextEffectsCommandButton,
|
|
63
|
-
oa as TextOverflowCommandButton,
|
|
64
|
-
ta as TextRotateCommandButton,
|
|
65
|
-
ea as ThemeMode,
|
|
66
|
-
na as ThemeSelectButton,
|
|
67
|
-
sa as ThemeSelectPanel,
|
|
68
|
-
ma as ThemeSelectPopupButton,
|
|
69
|
-
ra as UnderlineCommandButton,
|
|
70
|
-
la as UndoRedoCommandButton,
|
|
71
|
-
ua as VerticalAlignCommandButton,
|
|
72
|
-
da as ViewGridLinesCommandButton,
|
|
73
|
-
ba as ViewHeadingsCommandButton,
|
|
74
|
-
Ca as WalkingCopyCommandButton,
|
|
75
|
-
Ba as WorkbookContextMenu,
|
|
76
|
-
ia as WorkbookElement,
|
|
77
|
-
Sa as WorkbookIO,
|
|
78
|
-
pa as WorkbookStrip,
|
|
79
|
-
ka as WorkbookTitle,
|
|
80
|
-
Ta as WorkbookViewCommandButton,
|
|
81
|
-
ca as _WorkbookIO,
|
|
82
|
-
Pa as createGridStyleFromMUITheme,
|
|
83
|
-
Fa as defaultNewWorkbook,
|
|
84
|
-
Wa as renderWorkbookLoadingPanel,
|
|
85
|
-
ha as setPrintExamplesOnLoad,
|
|
86
|
-
ya as useResolvedThemeMode,
|
|
87
|
-
Ia as useWorkbookCommands
|
|
88
|
-
};
|
|
13
|
+
export{LicenseManager}from"@sheetxl/sdk";export{an as AppearanceCommandButton,aw as AutoColorPosition,$ as BorderCommandButton,as as BorderPopupButton,au as BorderStyleButton,a5 as ClearCommandButton,ay as ColorButton,ad as ColorCommandButton,ax as ColorPanel,av as ColorPanelType,az as ColorPopupButton,a8 as DeleteCellsCommandButton,am as DocThemeCommandButton,aZ as EagerStudio,a6 as FillCommandButton,aH as FilterColumnMenu,ab as FilterCommandButton,aI as Filters,a2 as FindCommandButton,ae as FontFamilyCommandButton,a3 as FontSizeCommandButton,aF as FormulaBar,a1 as FreezeCommandButton,ao as HelpCommandButton,P as HorizontalAlignCommandButton,a7 as InsertCellsCommandButton,ap as InsertImageCommandButton,b2 as InsertScriptCommandButton,a0 as MergeCommandButton,aG as NamedCollectionEditor,N as NamedInput,a4 as NumberFormatCommandButton,ah as PasteCommandButton,ak as PresetCellStylesCommandButton,al as PresetTableStylesCommandButton,ar as QuickFormulaSumCommandPopupButton,R as RangeInput,b1 as RunScriptCommandButton,b3 as ScriptEditorToolbar,b0 as ScriptWorkspace,aK as SheetTab,aL as SheetTabMenu,aE as SheetZoomScale,aM as SheetsAllMenu,aa as SortFilterCommandButton,aD as StatusBar,aY as Studio,at as StyledStrokeIcon,aJ as TableStyleCanvasPreview,k as TableStyleOptionsPanel,l as TableStylePreview,af as TextEffectsCommandButton,W as TextOverflowCommandButton,Y as TextRotateCommandButton,aV as ThemeMode,aA as ThemeSelectButton,aB as ThemeSelectPanel,aC as ThemeSelectPopupButton,ag as UnderlineCommandButton,ac as UndoRedoCommandButton,V as VerticalAlignCommandButton,a9 as ViewGridLinesCommandButton,ai as ViewHeadingsCommandButton,aq as WalkingCopyCommandButton,aR as WorkbookContextMenu,aP as WorkbookElement,a$ as WorkbookIO,aS as WorkbookStrip,aQ as WorkbookTitle,aj as WorkbookViewCommandButton,a_ as _WorkbookIO,aW as createGridStyleFromMUITheme,aU as defaultNewWorkbook,aO as renderWorkbookLoadingPanel,aN as setPrintExamplesOnLoad,aX as useResolvedThemeMode,aT as useWorkbookCommands}from"./Cc7y1nMDr5J8jWx-.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import r,{isValidElement as n,PureComponent as o,Component as i,memo as a,useState as u,useCallback as s,useLayoutEffect as f}from"react";import{Box as c}from"@mui/material";import{g as l,r as h,c as p,y as d,u as b,C as v}from"./Cc7y1nMDr5J8jWx-.mjs";const g=l(h());function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}var m=/^\s+/,w=/\s+$/;function _(t,e){if(e=e||{},(t=t||"")instanceof _)return t;if(!(this instanceof _))return new _(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,n=null,o=null,i=null,a=!1,u=!1;"string"==typeof t&&(t=function(t){t=t.replace(m,"").replace(w,"").toLowerCase();var e,r=!1;if(z[t])t=z[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=J.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=J.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=J.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=J.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=J.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=J.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=J.hex8.exec(t))return{r:N(e[1]),g:N(e[2]),b:N(e[3]),a:Y(e[4]),format:r?"name":"hex8"};if(e=J.hex6.exec(t))return{r:N(e[1]),g:N(e[2]),b:N(e[3]),format:r?"name":"hex"};if(e=J.hex4.exec(t))return{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),a:Y(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=J.hex3.exec(t))return{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==y(t)&&(Q(t.r)&&Q(t.g)&&Q(t.b)?(s=t.r,f=t.g,c=t.b,e={r:255*W(s,255),g:255*W(f,255),b:255*W(c,255)},a=!0,u="%"===String(t.r).substr(-1)?"prgb":"rgb"):Q(t.h)&&Q(t.s)&&Q(t.v)?(n=V(t.s),o=V(t.v),e=function(t,e,r){t=6*W(t,360),e=W(e,100),r=W(r,100);var n=Math.floor(t),o=t-n,i=r*(1-e),a=r*(1-o*e),u=r*(1-(1-o)*e),s=n%6,f=[r,a,i,i,u,r][s],c=[u,r,r,a,i,i][s],l=[i,i,u,r,r,a][s];return{r:255*f,g:255*c,b:255*l}}(t.h,n,o),a=!0,u="hsv"):Q(t.h)&&Q(t.s)&&Q(t.l)&&(n=V(t.s),i=V(t.l),e=function(t,e,r){var n,o,i;function a(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=W(t,360),e=W(e,100),r=W(r,100),0===e)n=o=i=r;else{var u=r<.5?r*(1+e):r+e-r*e,s=2*r-u;n=a(s,u,t+1/3),o=a(s,u,t),i=a(s,u,t-1/3)}return{r:255*n,g:255*o,b:255*i}}(t.h,n,i),a=!0,u="hsl"),t.hasOwnProperty("a")&&(r=t.a));var s,f,c;return r=H(r),{ok:a,format:t.format||u,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function x(t,e,r){t=W(t,255),e=W(e,255),r=W(r,255);var n,o,i=Math.max(t,e,r),a=Math.min(t,e,r),u=(i+a)/2;if(i==a)n=o=0;else{var s=i-a;switch(o=u>.5?s/(2-i-a):s/(i+a),i){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:o,l:u}}function j(t,e,r){t=W(t,255),e=W(e,255),r=W(r,255);var n,o,i=Math.max(t,e,r),a=Math.min(t,e,r),u=i,s=i-a;if(o=0===i?0:s/i,i==a)n=0;else{switch(i){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:o,v:u}}function O(t,e,r,n){var o=[I(Math.round(t).toString(16)),I(Math.round(e).toString(16)),I(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function M(t,e,r,n){return[I(X(n)),I(Math.round(t).toString(16)),I(Math.round(e).toString(16)),I(Math.round(r).toString(16))].join("")}function S(t,e){e=0===e?0:e||10;var r=_(t).toHsl();return r.s-=e/100,r.s=$(r.s),_(r)}function k(t,e){e=0===e?0:e||10;var r=_(t).toHsl();return r.s+=e/100,r.s=$(r.s),_(r)}function A(t){return _(t).desaturate(100)}function E(t,e){e=0===e?0:e||10;var r=_(t).toHsl();return r.l+=e/100,r.l=$(r.l),_(r)}function C(t,e){e=0===e?0:e||10;var r=_(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),_(r)}function R(t,e){e=0===e?0:e||10;var r=_(t).toHsl();return r.l-=e/100,r.l=$(r.l),_(r)}function P(t,e){var r=_(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,_(r)}function T(t){var e=_(t).toHsl();return e.h=(e.h+180)%360,_(e)}function L(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=_(t).toHsl(),n=[_(t)],o=360/e,i=1;i<e;i++)n.push(_({h:(r.h+i*o)%360,s:r.s,l:r.l}));return n}function U(t){var e=_(t).toHsl(),r=e.h;return[_(t),_({h:(r+72)%360,s:e.s,l:e.l}),_({h:(r+216)%360,s:e.s,l:e.l})]}function F(t,e,r){e=e||6,r=r||30;var n=_(t).toHsl(),o=360/r,i=[_(t)];for(n.h=(n.h-(o*e>>1)+720)%360;--e;)n.h=(n.h+o)%360,i.push(_(n));return i}function D(t,e){e=e||6;for(var r=_(t).toHsv(),n=r.h,o=r.s,i=r.v,a=[],u=1/e;e--;)a.push(_({h:n,s:o,v:i})),i=(i+u)%1;return a}_.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=H(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=j(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=x(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=x(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return O(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,o){var i=[I(Math.round(t).toString(16)),I(Math.round(e).toString(16)),I(Math.round(r).toString(16)),I(X(n))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*W(this._r,255))+"%",g:Math.round(100*W(this._g,255))+"%",b:Math.round(100*W(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*W(this._r,255))+"%, "+Math.round(100*W(this._g,255))+"%, "+Math.round(100*W(this._b,255))+"%)":"rgba("+Math.round(100*W(this._r,255))+"%, "+Math.round(100*W(this._g,255))+"%, "+Math.round(100*W(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[O(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+M(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var o=_(t);r="#"+M(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return _(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(S,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(F,arguments)},complement:function(){return this._applyCombination(T,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(U,arguments)},triad:function(){return this._applyCombination(L,[3])},tetrad:function(){return this._applyCombination(L,[4])}},_.fromRatio=function(t,e){if("object"==y(t)){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:V(t[n]));t=r}return _(t,e)},_.equals=function(t,e){return!(!t||!e)&&_(t).toRgbString()==_(e).toRgbString()},_.random=function(){return _.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},_.mix=function(t,e,r){r=0===r?0:r||50;var n=_(t).toRgb(),o=_(e).toRgb(),i=r/100;return _({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},_.readability=function(t,e){var r=_(t),n=_(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},_.isReadable=function(t,e,r){var n,o,i=_.readability(t,e);switch(o=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},_.mostReadable=function(t,e,r){var n,o,i,a,u=null,s=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var f=0;f<e.length;f++)(n=_.readability(t,e[f]))>s&&(s=n,u=_(e[f]));return _.isReadable(t,u,{level:i,size:a})||!o?u:(r.includeFallbackColors=!1,_.mostReadable(t,["#fff","#000"],r))};var z=_.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=_.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(z);function H(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function W(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function $(t){return Math.min(1,Math.max(0,t))}function N(t){return parseInt(t,16)}function I(t){return 1==t.length?"0"+t:""+t}function V(t){return t<=1&&(t=100*t+"%"),t}function X(t){return Math.round(255*parseFloat(t)).toString(16)}function Y(t){return N(t)/255}var q,K,G,J=(K="[\\s|\\(]+("+(q="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",G="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+K),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+K),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+K),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Q(t){return!!J.CSS_UNIT.exec(t)}var Z,tt,et,rt,nt,ot,it,at,ut,st,ft,ct,lt,ht,pt,dt,bt,vt,gt,yt,mt,wt,_t,xt,jt,Ot,Mt,St,kt={},At={};function Et(){if(tt)return Z;tt=1;var t="object"==typeof p&&p&&p.Object===Object&&p;return Z=t}function Ct(){if(rt)return et;rt=1;var t=Et(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return et=r}function Rt(){if(ot)return nt;ot=1;var t=Ct().Symbol;return nt=t}function Pt(){if(ct)return ft;ct=1;var t=Rt(),e=function(){if(at)return it;at=1;var t=Rt(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,o=t?t.toStringTag:void 0;return it=function(t){var e=r.call(t,o),i=t[o];try{t[o]=void 0;var a=!0}catch(t){}var u=n.call(t);return a&&(e?t[o]=i:delete t[o]),u}}(),r=function(){if(st)return ut;st=1;var t=Object.prototype.toString;return ut=function(e){return t.call(e)}}(),n=t?t.toStringTag:void 0;return ft=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?e(t):r(t)}}function Tt(){if(ht)return lt;ht=1;var t=Array.isArray;return lt=t}function Lt(){if(dt)return pt;return dt=1,pt=function(t){return null!=t&&"object"==typeof t}}function Ut(){if(wt)return mt;wt=1;var t=(yt?gt:(yt=1,gt=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===r(i[s],s,i))break}return e}}))();return mt=t}function Ft(){if(St)return Mt;St=1;var t=function(){if(Ot)return jt;Ot=1;var t=Pt(),e=Lt();return jt=function(r){return e(r)&&"[object Arguments]"==t(r)}}(),e=Lt(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&n.call(t,"callee")&&!o.call(t,"callee")};return Mt=i}var Dt,zt,Bt,Ht,Wt,$t,Nt,It,Vt,Xt,Yt,qt={exports:{}};function Kt(){return Bt||(Bt=1,function(t,e){var r=Ct(),n=zt?Dt:(zt=1,Dt=function(){return!1}),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||n;t.exports=u}(qt,qt.exports)),qt.exports}function Gt(){if(Wt)return Ht;Wt=1;var t=/^(?:0|[1-9]\d*)$/;return Ht=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}}function Jt(){if(Nt)return $t;Nt=1;return $t=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Qt(){if(Yt)return Xt;return Yt=1,Xt=function(t){return function(e){return t(e)}}}var Zt,te,ee,re,ne,oe,ie,ae,ue,se,fe,ce,le,he,pe,de,be,ve,ge,ye,me,we,_e,xe,je,Oe,Me,Se,ke,Ae,Ee,Ce,Re,Pe,Te,Le,Ue,Fe,De,ze,Be,He,We,$e,Ne,Ie,Ve,Xe,Ye,qe,Ke,Ge,Je,Qe,Ze,tr,er,rr,nr,or,ir,ar,ur,sr,fr,cr,lr,hr,pr,dr,br,vr,gr,yr,mr,wr,_r,xr,jr,Or,Mr,Sr,kr,Ar,Er,Cr,Rr,Pr,Tr,Lr,Ur,Fr,Dr,zr,Br,Hr,Wr,$r,Nr,Ir,Vr,Xr,Yr,qr,Kr,Gr,Jr,Qr,Zr,tn,en,rn,nn,on,an,un,sn,fn,cn,ln,hn,pn,dn,bn,vn,gn,yn,mn,wn,_n,xn,jn,On,Mn,Sn,kn,An,En,Cn,Rn,Pn,Tn,Ln,Un,Fn,Dn,zn,Bn,Hn,Wn,$n,Nn,In,Vn,Xn,Yn,qn,Kn,Gn,Jn,Qn,Zn,to,eo,ro,no,oo,io,ao,uo,so,fo,co,lo,ho,po,bo,vo,go,yo,mo,wo,_o,xo,jo,Oo,Mo,So,ko,Ao,Eo,Co,Ro,Po,To,Lo,Uo,Fo,Do,zo,Bo,Ho,Wo,$o,No,Io,Vo,Xo,Yo,qo,Ko,Go,Jo={exports:{}};function Qo(){return Zt||(Zt=1,function(t,e){var r=Et(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a}(Jo,Jo.exports)),Jo.exports}function Zo(){if(ee)return te;ee=1;var t=function(){if(Vt)return It;Vt=1;var t=Pt(),e=Jt(),r=Lt(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,It=function(o){return r(o)&&e(o.length)&&!!n[t(o)]}}(),e=Qt(),r=Qo(),n=r&&r.isTypedArray,o=n?e(n):t;return te=o}function ti(){if(ne)return re;ne=1;var t=xt?_t:(xt=1,_t=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}),e=Ft(),r=Tt(),n=Kt(),o=Gt(),i=Zo(),a=Object.prototype.hasOwnProperty;return re=function(u,s){var f=r(u),c=!f&&e(u),l=!f&&!c&&n(u),h=!f&&!c&&!l&&i(u),p=f||c||l||h,d=p?t(u.length,String):[],b=d.length;for(var v in u)!s&&!a.call(u,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,b))||d.push(v);return d}}function ei(){if(ie)return oe;ie=1;var t=Object.prototype;return oe=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}}function ri(){if(ue)return ae;return ue=1,ae=function(t,e){return function(r){return t(e(r))}}}function ni(){if(le)return ce;le=1;var t=ei(),e=function(){if(fe)return se;fe=1;var t=ri()(Object.keys,Object);return se=t}(),r=Object.prototype.hasOwnProperty;return ce=function(n){if(!t(n))return e(n);var o=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&o.push(i);return o}}function oi(){if(pe)return he;return pe=1,he=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function ii(){if(be)return de;be=1;var t=Pt(),e=oi();return de=function(r){if(!e(r))return!1;var n=t(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function ai(){if(ge)return ve;ge=1;var t=ii(),e=Jt();return ve=function(r){return null!=r&&e(r.length)&&!t(r)}}function ui(){if(me)return ye;me=1;var t=ti(),e=ni(),r=ai();return ye=function(n){return r(n)?t(n):e(n)}}function si(){if(_e)return we;_e=1;var t=Ut(),e=ui();return we=function(r,n){return r&&t(r,n,e)}}function fi(){if(je)return xe;return je=1,xe=function(t){return t}}function ci(){if(ke)return Se;ke=1;var t=si(),e=function(){if(Me)return Oe;Me=1;var t=fi();return Oe=function(e){return"function"==typeof e?e:t}}();return Se=function(r,n){return r&&t(r,e(n))}}function li(){if(Ee)return Ae;Ee=1;var t=ri()(Object.getPrototypeOf,Object);return Ae=t}function hi(){if(Te)return Pe;return Te=1,Pe=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}}function pi(){if(De)return Fe;return De=1,Fe=function(t,e){return t===e||t!=t&&e!=e}}function di(){if(Be)return ze;Be=1;var t=pi();return ze=function(e,r){for(var n=e.length;n--;)if(t(e[n][0],r))return n;return-1}}function bi(){if(Ke)return qe;Ke=1;var t=Ue?Le:(Ue=1,Le=function(){this.__data__=[],this.size=0}),e=function(){if(We)return He;We=1;var t=di(),e=Array.prototype.splice;return He=function(r){var n=this.__data__,o=t(n,r);return!(o<0||(o==n.length-1?n.pop():e.call(n,o,1),--this.size,0))}}(),r=function(){if(Ne)return $e;Ne=1;var t=di();return $e=function(e){var r=this.__data__,n=t(r,e);return n<0?void 0:r[n][1]}}(),n=function(){if(Ve)return Ie;Ve=1;var t=di();return Ie=function(e){return t(this.__data__,e)>-1}}(),o=function(){if(Ye)return Xe;Ye=1;var t=di();return Xe=function(e,r){var n=this.__data__,o=t(n,e);return o<0?(++this.size,n.push([e,r])):n[o][1]=r,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,qe=i}function vi(){if(ur)return ar;ur=1;var t,e=function(){if(ir)return or;ir=1;var t=Ct()["__core-js_shared__"];return or=t}(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return ar=function(t){return!!r&&r in t}}function gi(){if(fr)return sr;fr=1;var t=Function.prototype.toString;return sr=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}function yi(){if(br)return dr;br=1;var t=function(){if(lr)return cr;lr=1;var t=ii(),e=vi(),r=oi(),n=gi(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,u=i.toString,s=a.hasOwnProperty,f=RegExp("^"+u.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return cr=function(i){return!(!r(i)||e(i))&&(t(i)?f:o).test(n(i))}}(),e=pr?hr:(pr=1,hr=function(t,e){return null==t?void 0:t[e]});return dr=function(r,n){var o=e(r,n);return t(o)?o:void 0}}function mi(){if(gr)return vr;gr=1;var t=yi()(Ct(),"Map");return vr=t}function wi(){if(mr)return yr;mr=1;var t=yi()(Object,"create");return yr=t}function _i(){if(Rr)return Cr;Rr=1;var t=function(){if(_r)return wr;_r=1;var t=wi();return wr=function(){this.__data__=t?t(null):{},this.size=0}}(),e=jr?xr:(jr=1,xr=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(Mr)return Or;Mr=1;var t=wi(),e=Object.prototype.hasOwnProperty;return Or=function(r){var n=this.__data__;if(t){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(n,r)?n[r]:void 0}}(),n=function(){if(kr)return Sr;kr=1;var t=wi(),e=Object.prototype.hasOwnProperty;return Sr=function(r){var n=this.__data__;return t?void 0!==n[r]:e.call(n,r)}}(),o=function(){if(Er)return Ar;Er=1;var t=wi();return Ar=function(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Cr=i}function xi(){if(Dr)return Fr;Dr=1;var t=Ur?Lr:(Ur=1,Lr=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return Fr=function(e,r){var n=e.__data__;return t(r)?n["string"==typeof r?"string":"hash"]:n.map}}function ji(){if(Yr)return Xr;Yr=1;var t=function(){if(Tr)return Pr;Tr=1;var t=_i(),e=bi(),r=mi();return Pr=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}(),e=function(){if(Br)return zr;Br=1;var t=xi();return zr=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(Wr)return Hr;Wr=1;var t=xi();return Hr=function(e){return t(this,e).get(e)}}(),n=function(){if(Nr)return $r;Nr=1;var t=xi();return $r=function(e){return t(this,e).has(e)}}(),o=function(){if(Vr)return Ir;Vr=1;var t=xi();return Ir=function(e,r){var n=t(this,e),o=n.size;return n.set(e,r),this.size+=n.size==o?0:1,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Xr=i}function Oi(){if(Jr)return Gr;Jr=1;var t=bi(),e=function(){if(Je)return Ge;Je=1;var t=bi();return Ge=function(){this.__data__=new t,this.size=0}}(),r=Ze?Qe:(Ze=1,Qe=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}),n=er?tr:(er=1,tr=function(t){return this.__data__.get(t)}),o=nr?rr:(nr=1,rr=function(t){return this.__data__.has(t)}),i=function(){if(Kr)return qr;Kr=1;var t=bi(),e=mi(),r=ji();return qr=function(n,o){var i=this.__data__;if(i instanceof t){var a=i.__data__;if(!e||a.length<199)return a.push([n,o]),this.size=++i.size,this;i=this.__data__=new r(a)}return i.set(n,o),this.size=i.size,this}}();function a(e){var r=this.__data__=new t(e);this.size=r.size}return a.prototype.clear=e,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Gr=a}function Mi(){if(nn)return rn;nn=1;var t=ji(),e=Zr?Qr:(Zr=1,Qr=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),r=en?tn:(en=1,tn=function(t){return this.__data__.has(t)});function n(e){var r=-1,n=null==e?0:e.length;for(this.__data__=new t;++r<n;)this.add(e[r])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,rn=n}function Si(){if(cn)return fn;cn=1;var t=Mi(),e=an?on:(an=1,on=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}),r=sn?un:(sn=1,un=function(t,e){return t.has(e)});return fn=function(n,o,i,a,u,s){var f=1&i,c=n.length,l=o.length;if(c!=l&&!(f&&l>c))return!1;var h=s.get(n),p=s.get(o);if(h&&p)return h==o&&p==n;var d=-1,b=!0,v=2&i?new t:void 0;for(s.set(n,o),s.set(o,n);++d<c;){var g=n[d],y=o[d];if(a)var m=f?a(y,g,d,o,n,s):a(g,y,d,n,o,s);if(void 0!==m){if(m)continue;b=!1;break}if(v){if(!e(o,function(t,e){if(!r(v,e)&&(g===t||u(g,t,i,a,s)))return v.push(e)})){b=!1;break}}else if(g!==y&&!u(g,y,i,a,s)){b=!1;break}}return s.delete(n),s.delete(o),b}}function ki(){if(hn)return ln;hn=1;var t=Ct().Uint8Array;return ln=t}function Ai(){if(yn)return gn;yn=1;var t=Rt(),e=ki(),r=pi(),n=Si(),o=dn?pn:(dn=1,pn=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}),i=vn?bn:(vn=1,bn=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}),a=t?t.prototype:void 0,u=a?a.valueOf:void 0;return gn=function(t,a,s,f,c,l,h){switch(s){case"[object DataView]":if(t.byteLength!=a.byteLength||t.byteOffset!=a.byteOffset)return!1;t=t.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=a.byteLength||!l(new e(t),new e(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+a);case"[object Error]":return t.name==a.name&&t.message==a.message;case"[object RegExp]":case"[object String]":return t==a+"";case"[object Map]":var p=o;case"[object Set]":var d=1&f;if(p||(p=i),t.size!=a.size&&!d)return!1;var b=h.get(t);if(b)return b==a;f|=2,h.set(t,a);var v=n(p(t),p(a),f,c,l,h);return h.delete(t),v;case"[object Symbol]":if(u)return u.call(t)==u.call(a)}return!1}}function Ei(){if(wn)return mn;return wn=1,mn=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}}function Ci(){if(xn)return _n;xn=1;var t=Ei(),e=Tt();return _n=function(r,n,o){var i=n(r);return e(r)?i:t(i,o(r))}}function Ri(){if(Sn)return Mn;return Sn=1,Mn=function(){return[]}}function Pi(){if(An)return kn;An=1;var t=On?jn:(On=1,jn=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}),e=Ri(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return kn=n?function(e){return null==e?[]:(e=Object(e),t(n(e),function(t){return r.call(e,t)}))}:e}function Ti(){if(Cn)return En;Cn=1;var t=Ci(),e=Pi(),r=ui();return En=function(n){return t(n,r,e)}}function Li(){if($n)return Wn;$n=1;var t=function(){if(Ln)return Tn;Ln=1;var t=yi()(Ct(),"DataView");return Tn=t}(),e=mi(),r=function(){if(Fn)return Un;Fn=1;var t=yi()(Ct(),"Promise");return Un=t}(),n=function(){if(zn)return Dn;zn=1;var t=yi()(Ct(),"Set");return Dn=t}(),o=function(){if(Hn)return Bn;Hn=1;var t=yi()(Ct(),"WeakMap");return Bn=t}(),i=Pt(),a=gi(),u="[object Map]",s="[object Promise]",f="[object Set]",c="[object WeakMap]",l="[object DataView]",h=a(t),p=a(e),d=a(r),b=a(n),v=a(o),g=i;return(t&&g(new t(new ArrayBuffer(1)))!=l||e&&g(new e)!=u||r&&g(r.resolve())!=s||n&&g(new n)!=f||o&&g(new o)!=c)&&(g=function(t){var e=i(t),r="[object Object]"==e?t.constructor:void 0,n=r?a(r):"";if(n)switch(n){case h:return l;case p:return u;case d:return s;case b:return f;case v:return c}return e}),Wn=g}function Ui(){if(In)return Nn;In=1;var t=Oi(),e=Si(),r=Ai(),n=function(){if(Pn)return Rn;Pn=1;var t=Ti(),e=Object.prototype.hasOwnProperty;return Rn=function(r,n,o,i,a,u){var s=1&o,f=t(r),c=f.length;if(c!=t(n).length&&!s)return!1;for(var l=c;l--;){var h=f[l];if(!(s?h in n:e.call(n,h)))return!1}var p=u.get(r),d=u.get(n);if(p&&d)return p==n&&d==r;var b=!0;u.set(r,n),u.set(n,r);for(var v=s;++l<c;){var g=r[h=f[l]],y=n[h];if(i)var m=s?i(y,g,h,n,r,u):i(g,y,h,r,n,u);if(!(void 0===m?g===y||a(g,y,o,i,u):m)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var w=r.constructor,_=n.constructor;w==_||!("constructor"in r)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(b=!1)}return u.delete(r),u.delete(n),b}}(),o=Li(),i=Tt(),a=Kt(),u=Zo(),s="[object Arguments]",f="[object Array]",c="[object Object]",l=Object.prototype.hasOwnProperty;return Nn=function(h,p,d,b,v,g){var y=i(h),m=i(p),w=y?f:o(h),_=m?f:o(p),x=(w=w==s?c:w)==c,j=(_=_==s?c:_)==c,O=w==_;if(O&&a(h)){if(!a(p))return!1;y=!0,x=!1}if(O&&!x)return g||(g=new t),y||u(h)?e(h,p,d,b,v,g):r(h,p,w,d,b,v,g);if(!(1&d)){var M=x&&l.call(h,"__wrapped__"),S=j&&l.call(p,"__wrapped__");if(M||S){var k=M?h.value():h,A=S?p.value():p;return g||(g=new t),v(k,A,d,b,g)}}return!!O&&(g||(g=new t),n(h,p,d,b,v,g))}}function Fi(){if(Xn)return Vn;Xn=1;var t=Ui(),e=Lt();return Vn=function r(n,o,i,a,u){return n===o||(null==n||null==o||!e(n)&&!e(o)?n!=n&&o!=o:t(n,o,i,a,r,u))},Vn}function Di(){if(Gn)return Kn;Gn=1;var t=oi();return Kn=function(e){return e==e&&!t(e)}}function zi(){if(to)return Zn;return to=1,Zn=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}}function Bi(){if(ro)return eo;ro=1;var t=function(){if(qn)return Yn;qn=1;var t=Oi(),e=Fi();return Yn=function(r,n,o,i){var a=o.length,u=a,s=!i;if(null==r)return!u;for(r=Object(r);a--;){var f=o[a];if(s&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++a<u;){var c=(f=o[a])[0],l=r[c],h=f[1];if(s&&f[2]){if(void 0===l&&!(c in r))return!1}else{var p=new t;if(i)var d=i(l,h,c,r,n,p);if(!(void 0===d?e(h,l,3,i,p):d))return!1}}return!0}}(),e=function(){if(Qn)return Jn;Qn=1;var t=Di(),e=ui();return Jn=function(r){for(var n=e(r),o=n.length;o--;){var i=n[o],a=r[i];n[o]=[i,a,t(a)]}return n}}(),r=zi();return eo=function(n){var o=e(n);return 1==o.length&&o[0][2]?r(o[0][0],o[0][1]):function(e){return e===n||t(e,n,o)}}}function Hi(){if(oo)return no;oo=1;var t=Pt(),e=Lt();return no=function(r){return"symbol"==typeof r||e(r)&&"[object Symbol]"==t(r)}}function Wi(){if(ao)return io;ao=1;var t=Tt(),e=Hi(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return io=function(o,i){if(t(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!e(o))||(n.test(o)||!r.test(o)||null!=i&&o in Object(i))}}function $i(){if(co)return fo;co=1;var t=function(){if(so)return uo;so=1;var t=ji();function e(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var t=arguments,e=n?n.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var a=r.apply(this,t);return o.cache=i.set(e,a)||i,a};return o.cache=new(e.Cache||t),o}return e.Cache=t,uo=e}();return fo=function(e){var r=t(e,function(t){return 500===n.size&&n.clear(),t}),n=r.cache;return r}}function Ni(){if(go)return vo;go=1;var t=function(){if(bo)return po;bo=1;var t=Rt(),e=hi(),r=Tt(),n=Hi(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return po=function t(o){if("string"==typeof o)return o;if(r(o))return e(o,t)+"";if(n(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},po}();return vo=function(e){return null==e?"":t(e)}}function Ii(){if(mo)return yo;mo=1;var t=Tt(),e=Wi(),r=function(){if(ho)return lo;ho=1;var t=$i(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(e,function(t,e,o,i){n.push(o?i.replace(r,"$1"):e||t)}),n});return lo=n}(),n=Ni();return yo=function(o,i){return t(o)?o:e(o,i)?[o]:r(n(o))}}function Vi(){if(_o)return wo;_o=1;var t=Hi();return wo=function(e){if("string"==typeof e||t(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}function Xi(){if(jo)return xo;jo=1;var t=Ii(),e=Vi();return xo=function(r,n){for(var o=0,i=(n=t(n,r)).length;null!=r&&o<i;)r=r[e(n[o++])];return o&&o==i?r:void 0}}function Yi(){if(Ro)return Co;Ro=1;var t=ko?So:(ko=1,So=function(t,e){return null!=t&&e in Object(t)}),e=function(){if(Eo)return Ao;Eo=1;var t=Ii(),e=Ft(),r=Tt(),n=Gt(),o=Jt(),i=Vi();return Ao=function(a,u,s){for(var f=-1,c=(u=t(u,a)).length,l=!1;++f<c;){var h=i(u[f]);if(!(l=null!=a&&s(a,h)))break;a=a[h]}return l||++f!=c?l:!!(c=null==a?0:a.length)&&o(c)&&n(h,c)&&(r(a)||e(a))}}();return Co=function(r,n){return null!=r&&e(r,n,t)}}function qi(){if(To)return Po;To=1;var t=Fi(),e=function(){if(Mo)return Oo;Mo=1;var t=Xi();return Oo=function(e,r,n){var o=null==e?void 0:t(e,r);return void 0===o?n:o}}(),r=Yi(),n=Wi(),o=Di(),i=zi(),a=Vi();return Po=function(u,s){return n(u)&&o(s)?i(a(u),s):function(n){var o=e(n,u);return void 0===o&&o===s?r(n,u):t(s,o,3)}}}function Ki(){if(Bo)return zo;Bo=1;var t=Uo?Lo:(Uo=1,Lo=function(t){return function(e){return null==e?void 0:e[t]}}),e=function(){if(Do)return Fo;Do=1;var t=Xi();return Fo=function(e){return function(r){return t(r,e)}}}(),r=Wi(),n=Vi();return zo=function(o){return r(o)?t(n(o)):e(o)}}function Gi(){if(Vo)return Io;Vo=1;var t=si(),e=function(){if(No)return $o;No=1;var t=ai();return $o=function(e,r){return function(n,o){if(null==n)return n;if(!t(n))return e(n,o);for(var i=n.length,a=r?i:-1,u=Object(n);(r?a--:++a<i)&&!1!==o(u[a],a,u););return n}}}()(t);return Io=e}function Ji(){if(Ko)return qo;Ko=1;var t=hi(),e=function(){if(Wo)return Ho;Wo=1;var t=Bi(),e=qi(),r=fi(),n=Tt(),o=Ki();return Ho=function(i){return"function"==typeof i?i:null==i?r:"object"==typeof i?n(i)?e(i[0],i[1]):t(i):o(i)}}(),r=function(){if(Yo)return Xo;Yo=1;var t=Gi(),e=ai();return Xo=function(r,n){var o=-1,i=e(r)?Array(r.length):[];return t(r,function(t,e,r){i[++o]=n(t,e,r)}),i}}(),n=Tt();return qo=function(o,i){return(n(o)?t:r)(o,e(i,3))}}function Qi(){if(Go)return At;Go=1,Object.defineProperty(At,"__esModule",{value:!0}),At.flattenNames=void 0;var t=function(){if(vt)return bt;vt=1;var t=Pt(),e=Tt(),r=Lt();return bt=function(n){return"string"==typeof n||!e(n)&&r(n)&&"[object String]"==t(n)}}(),e=a(t),r=a(ci()),n=function(){if(Re)return Ce;Re=1;var t=Pt(),e=li(),r=Lt(),n=Function.prototype,o=Object.prototype,i=n.toString,a=o.hasOwnProperty,u=i.call(Object);return Ce=function(n){if(!r(n)||"[object Object]"!=t(n))return!1;var o=e(n);if(null===o)return!0;var s=a.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&i.call(s)==u}}(),o=a(n),i=a(Ji());function a(t){return t&&t.__esModule?t:{default:t}}var u=At.flattenNames=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=[];return(0,i.default)(n,function(n){Array.isArray(n)?t(n).map(function(t){return a.push(t)}):(0,o.default)(n)?(0,r.default)(n,function(t,e){!0===t&&a.push(e),a.push(e+"-"+t)}):(0,e.default)(n)&&a.push(n)}),a};return At.default=u,At}var Zi,ta,ea,ra,na,oa,ia,aa,ua,sa,fa,ca,la,ha,pa,da,ba,va,ga,ya,ma={};function wa(){if(oa)return na;oa=1;var t=function(){if(ra)return ea;ra=1;var t=yi(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return ea=e}();return na=function(e,r,n){"__proto__"==r&&t?t(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n}}function _a(){if(aa)return ia;aa=1;var t=wa(),e=pi(),r=Object.prototype.hasOwnProperty;return ia=function(n,o,i){var a=n[o];r.call(n,o)&&e(a,i)&&(void 0!==i||o in n)||t(n,o,i)}}function xa(){if(sa)return ua;sa=1;var t=_a(),e=wa();return ua=function(r,n,o,i){var a=!o;o||(o={});for(var u=-1,s=n.length;++u<s;){var f=n[u],c=i?i(o[f],r[f],f,o,r):void 0;void 0===c&&(c=r[f]),a?e(o,f,c):t(o,f,c)}return o}}function ja(){if(da)return pa;da=1;var t=oi(),e=ei(),r=ha?la:(ha=1,la=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}),n=Object.prototype.hasOwnProperty;return pa=function(o){if(!t(o))return r(o);var i=e(o),a=[];for(var u in o)("constructor"!=u||!i&&n.call(o,u))&&a.push(u);return a}}function Oa(){if(va)return ba;va=1;var t=ti(),e=ja(),r=ai();return ba=function(n){return r(n)?t(n,!0):e(n)}}var Ma,Sa,ka,Aa,Ea,Ca,Ra,Pa,Ta,La,Ua,Fa,Da,za,Ba,Ha,Wa,$a,Na,Ia,Va,Xa,Ya,qa,Ka,Ga,Ja,Qa,Za,tu,eu,ru,nu,ou,iu,au,uu,su,fu,cu,lu,hu,pu={exports:{}};function du(){if(Ra)return Ca;Ra=1;var t=Ei(),e=li(),r=Pi(),n=Ri(),o=Object.getOwnPropertySymbols;return Ca=o?function(n){for(var o=[];n;)t(o,r(n)),n=e(n);return o}:n}function bu(){if(Ba)return za;Ba=1;var t=ki();return za=function(e){var r=new e.constructor(e.byteLength);return new t(r).set(new t(e)),r}}function vu(){if(Ka)return qa;Ka=1;var t=bu(),e=function(){if(Wa)return Ha;Wa=1;var t=bu();return Ha=function(e,r){var n=r?t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}}(),r=function(){if(Na)return $a;Na=1;var t=/\w*$/;return $a=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}}(),n=function(){if(Va)return Ia;Va=1;var t=Rt(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;return Ia=function(t){return r?Object(r.call(t)):{}}}(),o=function(){if(Ya)return Xa;Ya=1;var t=bu();return Xa=function(e,r){var n=r?t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}}();return qa=function(i,a,u){var s=i.constructor;switch(a){case"[object ArrayBuffer]":return t(i);case"[object Boolean]":case"[object Date]":return new s(+i);case"[object DataView]":return e(i,u);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,u);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(i);case"[object RegExp]":return r(i);case"[object Symbol]":return n(i)}}}function gu(){if(Za)return Qa;Za=1;var t=function(){if(Ja)return Ga;Ja=1;var t=oi(),e=Object.create,r=function(){function r(){}return function(n){if(!t(n))return{};if(e)return e(n);r.prototype=n;var o=new r;return r.prototype=void 0,o}}();return Ga=r}(),e=li(),r=ei();return Qa=function(n){return"function"!=typeof n.constructor||r(n)?{}:t(e(n))}}function yu(){if(nu)return ru;nu=1;var t=function(){if(eu)return tu;eu=1;var t=Li(),e=Lt();return tu=function(r){return e(r)&&"[object Map]"==t(r)}}(),e=Qt(),r=Qo(),n=r&&r.isMap,o=n?e(n):t;return ru=o}function mu(){if(uu)return au;uu=1;var t=function(){if(iu)return ou;iu=1;var t=Li(),e=Lt();return ou=function(r){return e(r)&&"[object Set]"==t(r)}}(),e=Qt(),r=Qo(),n=r&&r.isSet,o=n?e(n):t;return au=o}function wu(){if(fu)return su;fu=1;var t=Oi(),e=ta?Zi:(ta=1,Zi=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}),r=_a(),n=function(){if(ca)return fa;ca=1;var t=xa(),e=ui();return fa=function(r,n){return r&&t(n,e(n),r)}}(),o=function(){if(ya)return ga;ya=1;var t=xa(),e=Oa();return ga=function(r,n){return r&&t(n,e(n),r)}}(),i=(Ma||(Ma=1,function(t,e){var r=Ct(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}(pu,pu.exports)),pu.exports),a=ka?Sa:(ka=1,Sa=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}),u=function(){if(Ea)return Aa;Ea=1;var t=xa(),e=Pi();return Aa=function(r,n){return t(r,e(r),n)}}(),s=function(){if(Ta)return Pa;Ta=1;var t=xa(),e=du();return Pa=function(r,n){return t(r,e(r),n)}}(),f=Ti(),c=function(){if(Ua)return La;Ua=1;var t=Ci(),e=du(),r=Oa();return La=function(n){return t(n,r,e)}}(),l=Li(),h=function(){if(Da)return Fa;Da=1;var t=Object.prototype.hasOwnProperty;return Fa=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}}(),p=vu(),d=gu(),b=Tt(),v=Kt(),g=yu(),y=oi(),m=mu(),w=ui(),_=Oa(),x="[object Arguments]",j="[object Function]",O="[object Object]",M={};return M[x]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[O]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[j]=M["[object WeakMap]"]=!1,su=function S(k,A,E,C,R,P){var T,L=1&A,U=2&A,F=4&A;if(E&&(T=R?E(k,C,R,P):E(k)),void 0!==T)return T;if(!y(k))return k;var D=b(k);if(D){if(T=h(k),!L)return a(k,T)}else{var z=l(k),B=z==j||"[object GeneratorFunction]"==z;if(v(k))return i(k,L);if(z==O||z==x||B&&!R){if(T=U||B?{}:d(k),!L)return U?s(k,o(T,k)):u(k,n(T,k))}else{if(!M[z])return R?k:{};T=p(k,z,L)}}P||(P=new t);var H=P.get(k);if(H)return H;P.set(k,T),m(k)?k.forEach(function(t){T.add(S(t,A,E,t,k,P))}):g(k)&&k.forEach(function(t,e){T.set(e,S(t,A,E,e,k,P))});var W=D?void 0:(F?U?c:f:U?_:w)(k);return e(W||k,function(t,e){W&&(t=k[e=t]),r(T,e,S(t,A,E,e,k,P))}),T},su}function _u(){if(hu)return ma;hu=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.mergeClasses=void 0;var t=n(ci()),e=n(function(){if(lu)return cu;lu=1;var t=wu();return cu=function(e){return t(e,5)}}()),r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function n(t){return t&&t.__esModule?t:{default:t}}var o=ma.mergeClasses=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=n.default&&(0,e.default)(n.default)||{};return o.map(function(e){var o=n[e];return o&&(0,t.default)(o,function(t,e){i[e]||(i[e]={}),i[e]=r({},i[e],o[e])}),e}),i};return ma.default=o,ma}var xu,ju={};var Ou,Mu={};function Su(){if(Ou)return Mu;Ou=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.hover=void 0;var t,e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=(t=r)&&t.__esModule?t:{default:t};function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=Mu.hover=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(i){function a(){var i,u,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var f=arguments.length,c=Array(f),l=0;l<f;l++)c[l]=arguments[l];return u=s=o(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return n.default.createElement(r,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},n.default.createElement(t,e({},s.props,s.state)))},o(s,u)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,i),a}(n.default.Component)};return Mu.default=i,Mu}var ku,Au={};function Eu(){if(ku)return Au;ku=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.active=void 0;var t,e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=(t=r)&&t.__esModule?t:{default:t};function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=Au.active=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(i){function a(){var i,u,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var f=arguments.length,c=Array(f),l=0;l<f;l++)c[l]=arguments[l];return u=s=o(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return n.default.createElement(r,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},n.default.createElement(t,e({},s.props,s.state)))},o(s,u)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,i),a}(n.default.Component)};return Au.default=i,Au}var Cu,Ru,Pu={};var Tu=function(){if(Ru)return kt;Ru=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.ReactCSS=kt.loop=kt.handleActive=kt.handleHover=kt.hover=void 0;var t=u(Qi()),e=u(_u()),r=function(){if(xu)return ju;xu=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.autoprefix=void 0;var t,e=ci(),r=(t=e)&&t.__esModule?t:{default:t},n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var e=t&&t.split(" ");return{position:"absolute",top:e&&e[0],right:e&&e[1],bottom:e&&e[2],left:e&&e[3]}},extend:function(t,e){return e[t]||{extend:t}}},i=ju.autoprefix=function(t){var e={};return(0,r.default)(t,function(t,i){var a={};(0,r.default)(t,function(t,e){var r=o[e];r?a=n({},a,r(t)):a[e]=t}),e[i]=a}),e};return ju.default=i,ju}(),n=u(r),o=u(Su()),i=u(Eu()),a=u((Cu||(Cu=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=function(t,e){var r={},n=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r[t]=e};return 0===t&&n("first-child"),t===e-1&&n("last-child"),(0===t||t%2==0)&&n("even"),1===Math.abs(t%2)&&n("odd"),n("nth-child",t),r}),Pu));function u(t){return t&&t.__esModule?t:{default:t}}kt.hover=o.default,kt.handleHover=o.default,kt.handleActive=i.default,kt.loop=a.default;var s=kt.ReactCSS=function(r){for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var u=(0,t.default)(i),s=(0,e.default)(r,u);return(0,n.default)(s)};return kt.default=s,kt}();const Lu=l(Tu);var Uu={},Fu=function(t,e,r,n){var o=t+"-"+e+"-"+r+(n?"-server":"");if(Uu[o])return Uu[o];var i=function(t,e,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var i=o.getContext("2d");return i?(i.fillStyle=t,i.fillRect(0,0,o.width,o.height),i.fillStyle=e,i.fillRect(0,0,r,r),i.translate(r,r),i.fillRect(0,0,r,r),o.toDataURL()):null}(t,e,r,n);return Uu[o]=i,i},Du=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zu=function(t){var e=t.white,o=t.grey,i=t.size,a=t.renderers,u=t.borderRadius,s=t.boxShadow,f=t.children,c=Lu({default:{grid:{borderRadius:u,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+Fu(e,o,i,a.canvas)+") center left"}}});return n(f)?r.cloneElement(f,Du({},f.props,{style:Du({},f.props.style,c.grid)})):r.createElement("div",{style:c.grid})};zu.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var Bu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hu=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Wu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var $u=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=Wu(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleChange=function(t){var e=function(t,e,r,n,o){var i=o.clientWidth,a=o.clientHeight,u="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,s="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,f=u-(o.getBoundingClientRect().left+window.pageXOffset),c=s-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var l=void 0;if(l=c<0?0:c>a?1:Math.round(100*c/a)/100,e.a!==l)return{h:e.h,s:e.s,l:e.l,a:l,source:"rgb"}}else{var h=void 0;if(n!==(h=f<0?0:f>i?1:Math.round(100*f/i)/100))return{h:e.h,s:e.s,l:e.l,a:h,source:"rgb"}}return null}(t,n.props.hsl,n.props.direction,n.props.a,n.container);e&&"function"==typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},Wu(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,o||i),Hu(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,e=this.props.rgb,n=Lu({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+e.r+","+e.g+","+e.b+", 0) 0%,\n rgba("+e.r+","+e.g+","+e.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*e.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+e.r+","+e.g+","+e.b+", 0) 0%,\n rgba("+e.r+","+e.g+","+e.b+", 1) 100%)"},pointer:{left:0,top:100*e.a+"%"}},overwrite:Bu({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return r.createElement("div",{style:n.alpha},r.createElement("div",{style:n.checkboard},r.createElement(zu,{renderers:this.props.renderers})),r.createElement("div",{style:n.gradient}),r.createElement("div",{style:n.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("div",{style:n.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:n.slider}))))}}]),t}(),Nu=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var Iu=[38,40],Vu=1,Xu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(t){r.setUpdatedValue(t.target.value,t)},r.handleKeyDown=function(t){var e,n=function(t){return Number(String(t).replace(/%/g,""))}(t.target.value);if(!isNaN(n)&&(e=t.keyCode,Iu.indexOf(e)>-1)){var o=r.getArrowOffset(),i=38===t.keyCode?n+o:n-o;r.setUpdatedValue(i,t)}},r.handleDrag=function(t){if(r.props.dragLabel){var e=Math.round(r.props.value+t.movementX);e>=0&&e<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(e),t)}},r.handleMouseDown=function(t){r.props.dragLabel&&(t.preventDefault(),r.handleDrag(t),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+Vu++,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,o||i),Nu(t,[{key:"componentDidUpdate",value:function(t,e){this.props.value===this.state.value||t.value===this.props.value&&e.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(t){return function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},this.props.label,t)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(t,e){var r=this.props.label?this.getValueObjectWithLabel(t):t;this.props.onChange&&this.props.onChange(r,e),this.setState({value:t})}},{key:"render",value:function(){var t=this,e=Lu({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return r.createElement("div",{style:e.wrap},r.createElement("input",{id:this.inputId,style:e.input,ref:function(e){return t.input=e},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?r.createElement("label",{htmlFor:this.inputId,style:e.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(),Yu=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function qu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Ku=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=qu(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleChange=function(t){var e=function(t,e,r,n){var o=n.clientWidth,i=n.clientHeight,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(n.getBoundingClientRect().left+window.pageXOffset),f=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===e){var c=void 0;if(c=f<0?359:f>i?0:360*(-100*f/i+100)/100,r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var l=void 0;if(l=s<0?0:s>o?359:100*s/o*360/100,r.h!==l)return{h:l,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}(t,n.props.direction,n.props.hsl,n.container);e&&"function"==typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},qu(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,o||i),Yu(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,e=this.props.direction,n=void 0===e?"horizontal":e,o=Lu({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return r.createElement("div",{style:o.hue},r.createElement("div",{className:"hue-"+n,style:o.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),r.createElement("div",{style:o.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:o.slider}))))}}]),t}(),Gu="object"==typeof global&&global&&global.Object===Object&&global,Ju="object"==typeof self&&self&&self.Object===Object&&self,Qu=Gu||Ju||Function("return this")(),Zu=Qu.Symbol,ts=Object.prototype,es=ts.hasOwnProperty,rs=ts.toString,ns=Zu?Zu.toStringTag:void 0;var os=Object.prototype.toString;var is=Zu?Zu.toStringTag:void 0;function as(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":is&&is in Object(t)?function(t){var e=es.call(t,ns),r=t[ns];try{t[ns]=void 0;var n=!0}catch(t){}var o=rs.call(t);return n&&(e?t[ns]=r:delete t[ns]),o}(t):function(t){return os.call(t)}(t)}function us(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}g.string,g.oneOf([0,1,2,3,4,5]),g.number,g.object;var ss=function(){return Qu.Date.now()},fs=/\s/;var cs=/^\s+/;function ls(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&fs.test(t.charAt(e)););return e}(t)+1).replace(cs,""):t}var hs=/^[-+]0x[0-9a-f]+$/i,ps=/^0b[01]+$/i,ds=/^0o[0-7]+$/i,bs=parseInt;function vs(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==as(t)}(t))return NaN;if(us(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=us(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ls(t);var r=ps.test(t);return r||ds.test(t)?bs(t.slice(2),r?2:8):hs.test(t)?NaN:+t}var gs=Math.max,ys=Math.min;function ms(t,e,r){var n,o,i,a,u,s,f=0,c=!1,l=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,f=e,a=t.apply(i,r)}function d(t){var r=t-s;return void 0===s||r>=e||r<0||l&&t-f>=i}function b(){var t=ss();if(d(t))return v(t);u=setTimeout(b,function(t){var r=e-(t-s);return l?ys(r,i-(t-f)):r}(t))}function v(t){return u=void 0,h&&n?p(t):(n=o=void 0,a)}function g(){var t=ss(),r=d(t);if(n=arguments,o=this,s=t,r){if(void 0===u)return function(t){return f=t,u=setTimeout(b,e),c?p(t):a}(s);if(l)return clearTimeout(u),u=setTimeout(b,e),p(s)}return void 0===u&&(u=setTimeout(b,e)),a}return e=vs(e)||0,us(r)&&(c=!!r.leading,i=(l="maxWait"in r)?gs(vs(r.maxWait)||0,e):i,h="trailing"in r?!!r.trailing:h),g.cancel=function(){void 0!==u&&clearTimeout(u),f=0,n=s=o=u=void 0},g.flush=function(){return void 0===u?a:v(ss())},g}var ws=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();!function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.handleChange=function(t){"function"==typeof r.props.onChange&&r.throttle(r.props.onChange,function(t,e,r){var n=r.getBoundingClientRect(),o=n.width,i=n.height,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),f=u-(r.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>o&&(s=o),f<0?f=0:f>i&&(f=i);var c=s/o,l=1-f/i;return{h:e.h,s:c,v:l,a:e.a,source:"hsv"}}(t,r.props.hsl,r.container),t)},r.handleMouseDown=function(t){r.handleChange(t);var e=r.getContainerRenderWindow();e.addEventListener("mousemove",r.handleChange),e.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return us(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),ms(t,e,{leading:n,maxWait:e,trailing:o})}(function(t,e,r){t(e,r)},50),r}(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)})(t,o||i),ws(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var t=this.container,e=window;!e.document.contains(t)&&e.parent!==e;)e=e.parent;return e}},{key:"unbindEventListeners",value:function(){var t=this.getContainerRenderWindow();t.removeEventListener("mousemove",this.handleChange),t.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,e=this.props.style||{},n=e.color,o=e.white,i=e.black,a=e.pointer,u=e.circle,s=Lu({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:o,black:i,pointer:a,circle:u}},{custom:!!this.props.style});return r.createElement("div",{style:s.color,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),r.createElement("div",{style:s.white,className:"saturation-white"},r.createElement("div",{style:s.black,className:"saturation-black"}),r.createElement("div",{style:s.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:s.circle}))))}}])}();var _s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xs=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function js(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Os=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";(function(){function n(){var t,e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=js(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(i))),r.state={focus:!1},r.handleFocus=function(){return r.setState({focus:!0})},r.handleBlur=function(){return r.setState({focus:!1})},js(r,e)}(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)})(n,r.Component),xs(n,[{key:"render",value:function(){return r.createElement(e,{onFocus:this.handleFocus,onBlur:this.handleBlur},r.createElement(t,_s({},this.props,this.state)))}}])})()}(function(t){var e=t.color,n=t.style,o=t.onClick,i=void 0===o?function(){}:o,a=t.onHover,u=t.title,s=void 0===u?e:u,f=t.children,c=t.focus,l=t.focusStyle,h="transparent"===e,p=Lu({default:{swatch:Os({background:e,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,c?void 0===l?{}:l:{})}}),d={};return a&&(d.onMouseOver=function(t){return a(e,t)}),r.createElement("div",Os({style:p.swatch,onClick:function(t){return i(e,t)},title:s,tabIndex:0,onKeyDown:function(t){return 13===t.keyCode&&i(e,t)}},d),f,h&&r.createElement(zu,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))});var Ms=function(t){var e=t.onChange,n=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,u=Lu({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),s=function(t,r){t.hex?function(t){if("transparent"===t)return!0;var e="#"===String(t).charAt(0)?1:0;return t.length!==4+e&&t.length<7+e&&_(t).isValid()}(t.hex)&&e({hex:t.hex,source:"hex"},r):t.r||t.g||t.b?e({r:t.r||n.r,g:t.g||n.g,b:t.b||n.b,a:n.a,source:"rgb"},r):t.a&&(t.a<0?t.a=0:t.a>100&&(t.a=100),t.a/=100,e({h:o.h,s:o.s,l:o.l,a:t.a,source:"rgb"},r))};return r.createElement("div",{style:u.fields,className:"flexbox-fix"},r.createElement("div",{style:u.double},r.createElement(Xu,{style:{input:u.input,label:u.label},label:"hex",value:i.replace("#",""),onChange:s})),r.createElement("div",{style:u.single},r.createElement(Xu,{style:{input:u.input,label:u.label},label:"r",value:n.r,onChange:s,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:u.single},r.createElement(Xu,{style:{input:u.input,label:u.label},label:"g",value:n.g,onChange:s,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:u.single},r.createElement(Xu,{style:{input:u.input,label:u.label},label:"b",value:n.b,onChange:s,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:u.alpha},r.createElement(Xu,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*n.a),onChange:s,dragLabel:"true",dragMax:"100"})))};class Ss extends(o||i){constructor(t){super(t),this.handleChange=t=>{"function"==typeof this.props.onChange&&this.throttle(this.props.onChange,((t,e,r)=>{var n=r.getBoundingClientRect(),o=n.width,i=n.height,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),f=u-(r.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>o&&(s=o),f<0?f=0:f>i&&(f=i);var c=s/o,l=1-f/i;return{h:e.h,s:c,v:l,a:e.a,source:"hsv"}})(t,this.props.hsl,this.container),t),t.preventDefault()},this.handleMouseDown=t=>{this.handleChange(t);const e=this.getContainerRenderWindow();e.addEventListener("mousemove",this.handleChange),e.addEventListener("mouseup",this.handleMouseUp)},this.handleMouseUp=t=>{t.preventDefault(),this.unbindEventListeners()},this.throttle=function(t,e,r){let n,o,i,a;var u=0;r||(r={});let s=function(){u=!1===r.leading?0:Date.now(),n=null,a=t.apply(o,i),n||(o=i=null)},f=function(){var f=Date.now();u||!1!==r.leading||(u=f);var c=e-(f-u);return o=this,i=arguments,c<=0||c>e?(n&&(clearTimeout(n),n=null),u=f,a=t.apply(o,i),n||(o=i=null)):n||!1===r.trailing||(n=setTimeout(s,c)),a};return f.cancel=function(){clearTimeout(n),u=0,n=o=i=null},f}((t,e,r)=>{t(e,r)},50)}componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}getContainerRenderWindow(){const{container:t}=this;let e=window;for(;!e.document.contains(t)&&e.parent!==e;)e=e.parent;return e}unbindEventListeners(){const t=this.getContainerRenderWindow();t.removeEventListener("mousemove",this.handleChange),t.removeEventListener("mouseup",this.handleMouseUp)}render(){const{color:r,white:n,black:o,pointer:i,circle:a}=this.props||{},u={position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},s={color:{...u,backgroundColor:`hsl(${this.props.hsl?.h},100%, 50%)`,borderRadius:this.props.style?.borderRadius},white:{...u,borderRadius:this.props.style?.borderRadius},black:{...u,boxShadow:this.props.style?.boxShadow,borderRadius:this.props.style?.borderRadius},pointer:{...u,top:-100*this.props.hsv?.v+100+"%",left:100*this.props.hsv?.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}};return t("div",{style:s.color,ref:t=>this.container=t,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[e("style",{children:"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "}),t("div",{style:s.white,className:"saturation-white",children:[e("div",{style:s.black,className:"saturation-black"}),e("div",{style:s.pointer,children:this.props.pointer?e(this.props.pointer,{...this.props}):e("div",{style:s.circle})})]})]})}}const ks=(t,e=null)=>{const r=t.hex?_(t.hex):_(t||"transparent"),n=r.toHsl(),o=r.toHsv(),i=r.toRgb(),a=r.toHex();return 0===n.s&&(n.h=e??0,o.h=e??0),{hsl:n,hex:"#"+a,rgb:i,hsv:o,source:t.source}},As=a(r=>{const{selectedColor:n,onColorChange:o,renderers:i,disableAlpha:a=!1,style:l=d.EmptyCssProperties,...h}=r,p=b(),[g,y]=u(()=>ks(n)),[m,w]=u(g.hsl.h??0),_=s(t=>{let e=ks(t,m);return w(e.hsl.h??0),y(e),e},[m]),x=s(t=>{const e=_(t),r=`rgba(${e.rgb.r},${e.rgb.g},${e.rgb.b},${a?1:e.rgb.a})`;o?.(r)},[o,_,a]);f(()=>{_(n)},[n,_]);const j=e("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:e($u,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},rgb:g.rgb,hsl:g.hsl,renderers:i,onChange:x})});return t("div",{style:{display:"flex",flexDirection:"column",...l},...h,children:[e("div",{style:{width:"100%",flex:"1 1 100%",position:"relative",overflow:"hidden"},children:e(Ss,{style:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:g.hsl,hsv:g.hsv,onChange:x})}),t("div",{style:{marginTop:"4px",display:"flex",gap:"4px"},children:[t("div",{style:{flex:"1",display:"flex",flexDirection:a?"row":"column",justifyContent:"space-between",alignItems:"center"},children:[e("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:e(Ku,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:g.hsl,onChange:x})}),a?null:j]}),t("div",{style:{minWidth:"24px",maxWidth:"24px",minHeight:"24px",maxHeight:"24px",position:"relative",borderRadius:"1px",overflow:"hidden"},children:[e(v,{grey:p.palette.text.icon??p.palette.action.active}),e("div",{style:{position:"absolute",height:"100%",width:"100%",background:`rgba(${g.rgb.r},${g.rgb.g},${g.rgb.b},${a?1:g.rgb.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}})]})]}),e(c,{sx:{marginBottom:"4px","& label":{fontFamily:t=>`${t.typography.fontFamily} !important`,color:t=>`${t.palette.text.secondary} !important`},"& *":{fontFamily:t=>`${t.typography.fontFamily} !important`,userSelect:"none"},"& input":{paddingLeft:t=>`${t.spacing(.5)} !important`,paddingRight:t=>`${t.spacing(.5)} !important`,outline:"none",boxSizing:"border-box",width:"100% !important",textAlign:"center"}},children:e(Ms,{rgb:g.rgb,hsl:g.hsl,hex:g.hex,disableAlpha:a,onChange:x})})]})});export{As as CustomColorPanel,As as default,ks as toState};
|