From fbf32ffb0af62267de7ac356faac85aec1e30d03 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sat, 2 Sep 2023 05:26:57 -0400 Subject: [PATCH] content-type --- _headers | 2 +- docz/docs/03-demos/08-local/05-clipboard.md | 82 ++++++++++--------- .../{11-bigdata => 37-bigdata}/01-stream.md | 26 +++--- .../{11-bigdata => 37-bigdata}/02-worker.md | 17 ++-- .../{11-bigdata => 37-bigdata}/03-ml.mdx | 24 ++++-- .../_category_.json | 2 +- .../{11-bigdata => 37-bigdata}/index.md | 2 +- docz/docs/03-demos/42-engines/_category_.json | 2 +- docz/static/tfjs/tf.min.js | 2 +- 9 files changed, 89 insertions(+), 70 deletions(-) rename docz/docs/03-demos/{11-bigdata => 37-bigdata}/01-stream.md (95%) rename docz/docs/03-demos/{11-bigdata => 37-bigdata}/02-worker.md (97%) rename docz/docs/03-demos/{11-bigdata => 37-bigdata}/03-ml.mdx (94%) rename docz/docs/03-demos/{11-bigdata => 37-bigdata}/_category_.json (58%) rename docz/docs/03-demos/{11-bigdata => 37-bigdata}/index.md (94%) diff --git a/_headers b/_headers index 1e9ae80..73f32e9 100644 --- a/_headers +++ b/_headers @@ -1,3 +1,3 @@ /*.ts - Content-Type: text/javascript + Content-Type: application/typescript diff --git a/docz/docs/03-demos/08-local/05-clipboard.md b/docz/docs/03-demos/08-local/05-clipboard.md index 8b6c695..807048b 100644 --- a/docz/docs/03-demos/08-local/05-clipboard.md +++ b/docz/docs/03-demos/08-local/05-clipboard.md @@ -16,10 +16,27 @@ XLS (both '97-2004 and '95), and SpreadsheetML 2003. Not all Clipboard APIs offer access to all clipboard types. +:::note + +Each browser demo was tested in the following environments: + +| Browser | Date | +|:------------|:-----------| +| Chrome 116 | 2023-09-01 | +| Safari 16.6 | 2023-09-01 | +| Brave 1.57 | 2023-09-01 | + +::: + ## Browser Reading (paste) -Clipboard data can be read from a `paste` event, accessible from the event -`clipboardData` property: +Clipboard data can be read from a `paste` event. + +The event `clipboardData` property has a `getData` method which returns a string +compatible with the `"string"` type in the SheetJS `read` method[^1]. + +The following example reads from the HTML clipboard and generates a XLSX file +using the SheetJS `writeFile` method[^2]: ```js document.onpaste = function(e) { @@ -31,7 +48,7 @@ document.onpaste = function(e) { }; ``` -`getData` accepts one argument: the desired MIME type. Chrome 103 supports: +`getData` accepts one argument: the desired MIME type. Tested browsers support: | MIME type | Data format | |:-------------|:---------------------------| @@ -39,8 +56,6 @@ document.onpaste = function(e) { | `text/html` | HTML | | `text/rtf` | RTF (rich text format) | -`getData` returns a string compatible with the `string` type for `XLSX.read`. - ### Live Demo Open a file in Excel, copy some cells, then come back to this window. Click on @@ -78,10 +93,10 @@ function ClipboardRead() { Modern browsers support reading files that users have copied into the clipboard. -:::caution +:::caution pass -Excel does not copy data into files! Use your system file browser to select and -copy spreadsheets into the clipboard. +Due to browser API limitations, the system file browser should be used to select +and copy spreadsheets into the clipboard. ::: @@ -121,11 +136,15 @@ function ClipboardReadFiles() { } ``` - ## Browser Writing (copy) -Clipboard data can be written from a `copy` event, accessible from the event -`clipboardData` property: +Clipboard data can be written from a `copy` event. + +The event `clipboardData` property has a `setData` method which accepts a string +that can be generated using `type: "string"` in the SheetJS `write` method[^3]. + +The following example generates a HTML string from the first sheet of a workbook +object and loads the string into the HTML clipboard: ```js document.oncopy = function(e) { @@ -139,12 +158,15 @@ document.oncopy = function(e) { }; ``` -`setData` accepts two arguments: MIME type and new data. Chrome 103 supports: +`setData` accepts two arguments: MIME type and new data. -| MIME type | Data format | -|:-------------|:---------------------------| -| `text/plain` | TSV (tab separated values) | -| `text/html` | HTML | +The following table lists the supported MIME types and the `bookType`[^4] value +that must be passed to the SheetJS `write` method: + +| MIME type | Data format | `bookType` | +|:-------------|:---------------------------|:-----------| +| `text/plain` | TSV (tab separated values) | `txt` | +| `text/html` | HTML | `html` | Browsers do not currently support assigning to the `text/rtf` clipboard type. @@ -160,7 +182,7 @@ This demo creates a simple workbook from the following HTML table: Create a new file in Excel then come back to this window. Select the text below and copy (Control+C for Windows, Command+C for Mac). Go back to the -excel +Excel file, select cell A1, and paste. ```jsx live function ClipboardWrite() { @@ -190,9 +212,9 @@ There are special methods for specific clipboard types: | File Type | Read Clipboard Data | Write Clipboard Data | |:----------|:---------------------|:----------------------| -| RTF | `clipboard.readRTF` | `clipboard.writeRTF` | | TSV | `clipboard.readText` | `clipboard.writeText` | | HTML | `clipboard.readHTML` | `clipboard.writeHTML` | +| RTF | `clipboard.readRTF` | `clipboard.writeRTF` | Each method operates on JS strings. @@ -211,23 +233,7 @@ function copy_first_sheet_to_clipboard(workbook) { } ``` -:::caution Experimental Buffer Clipboard Support - -Electron additionally supports binary operations using `Buffer` objects. This -support is considered "experimental" and is not guaranteed to work on any -platform. Issues should be raised with the Electron project - -On the `MacOS` platform, some versions of Excel store a packaged file with key -`dyn.ah62d4qmxhk4d425try1g44pdsm11g55gsu1en5pcqzwc4y5tsz3gg3k`. The package is -a simple CFB file that can be parsed: - -```js -const { clipboard } = require('electron'); -const XLSX = require("xlsx"); -const buf = clipboard.readBuffer('dyn.ah62d4qmxhk4d425try1g44pdsm11g55gsu1en5pcqzwc4y5tsz3gg3k'); -const cfb = XLSX.CFB.read(buf, {type: "buffer"}); -const pkg = XLSX.CFB.find(cfb, "Package").content; -const wb = XLSX.read(pkg); -``` - -::: \ No newline at end of file +[^1]: See [`read` in "Reading Files"](/docs/api/parse-options) +[^2]: See [`writeFile` in "Writing Files"](/docs/api/write-options) +[^3]: See [`write` in "Writing Files"](/docs/api/write-options) +[^4]: See ["Supported Output Formats" in "Writing Files"](/docs/api/write-options#supported-output-formats) for details on `bookType` \ No newline at end of file diff --git a/docz/docs/03-demos/11-bigdata/01-stream.md b/docz/docs/03-demos/37-bigdata/01-stream.md similarity index 95% rename from docz/docs/03-demos/11-bigdata/01-stream.md rename to docz/docs/03-demos/37-bigdata/01-stream.md index 9e6b492..017a396 100644 --- a/docz/docs/03-demos/11-bigdata/01-stream.md +++ b/docz/docs/03-demos/37-bigdata/01-stream.md @@ -143,16 +143,16 @@ This demo was last tested in the following deployments: | Node Version | Date | Node Status when tested | |:-------------|:-----------|:------------------------| -| `0.12.18` | 2023-05-30 | End-of-Life | -| `4.9.1` | 2023-05-30 | End-of-Life | -| `6.17.1` | 2023-05-30 | End-of-Life | -| `8.17.0` | 2023-05-30 | End-of-Life | -| `10.24.1` | 2023-05-30 | End-of-Life | -| `12.22.12` | 2023-05-30 | End-of-Life | -| `14.21.3` | 2023-05-30 | End-of-Life | -| `16.20.0` | 2023-05-30 | Maintenance LTS | -| `18.16.0` | 2023-05-30 | Active LTS | -| `20.2.0` | 2023-05-30 | Current | +| `0.12.18` | 2023-09-02 | End-of-Life | +| `4.9.1` | 2023-09-02 | End-of-Life | +| `6.17.1` | 2023-09-02 | End-of-Life | +| `8.17.0` | 2023-09-02 | End-of-Life | +| `10.24.1` | 2023-09-02 | End-of-Life | +| `12.22.12` | 2023-09-02 | End-of-Life | +| `14.21.3` | 2023-09-02 | End-of-Life | +| `16.20.0` | 2023-09-02 | Maintenance LTS | +| `18.17.1` | 2023-09-02 | Active LTS | +| `20.5.1` | 2023-09-02 | Current | While streaming methods work in End-of-Life versions of NodeJS, production deployments should upgrade to a Current or LTS version of NodeJS. @@ -212,7 +212,7 @@ Joseph Biden,46 :::note -The live demo was last tested on 2023 May 30 in Chromium 113. +The live demo was last tested on 2023-09-02 in Chromium 116. ::: @@ -313,7 +313,7 @@ The following live demo fetches and parses a file in a Web Worker. The `to_csv` streaming function is used to generate CSV rows and pass back to the main thread for further processing. -:::note +:::note pass For Chromium browsers, the File System Access API provides a modern worker-only approach. [The Web Workers demo](/docs/demos/bigdata/worker#streaming-write) @@ -443,7 +443,7 @@ stream.to_csv(wb.Sheets[wb.SheetNames[0]]).resume();`} :::note -This demo was last tested on 2023 May 30 +This demo was last tested on 2023-09-02 against Deno `1.36.4` ::: diff --git a/docz/docs/03-demos/11-bigdata/02-worker.md b/docz/docs/03-demos/37-bigdata/02-worker.md similarity index 97% rename from docz/docs/03-demos/11-bigdata/02-worker.md rename to docz/docs/03-demos/37-bigdata/02-worker.md index 0f4fc8d..00b6c2b 100644 --- a/docz/docs/03-demos/11-bigdata/02-worker.md +++ b/docz/docs/03-demos/37-bigdata/02-worker.md @@ -13,7 +13,7 @@ Parsing and writing large spreadsheets takes time. During the process, if the SheetJS library is running in the web browser, the website may freeze. Workers provide a way to off-load the hard work so that the website does not -freeze during processing. The work is still performed locally. No data is sent +freeze during processing. The work is still performed locally. No data is sent to a remote server. The following diagrams show the normal and Web Worker flows when exporting a @@ -71,7 +71,7 @@ sequenceDiagram :::note Browser Compatibility IE10+ and modern browsers support basic Web Workers. Some APIs like `fetch` were -added later. Feature testing is highly recommended. +added later. Feature testing is strongly recommended. ::: @@ -138,7 +138,7 @@ For production use, it is highly encouraged to download and host the script. ESM is supported in Web Workers in the Chromium family of browsers (including Chrome and Edge) as well as in browsers powered by WebKit (including Safari). -For legacy browsers like Firefox and IE, `importScripts` should be used. +For legacy browsers including Firefox and IE, `importScripts` should be used. ::: @@ -189,10 +189,10 @@ Each browser demo was tested in the following environments: | Browser | Date | Comments | |:------------|:-----------|:----------------------------------------| -| Chrome 113 | 2023-05-22 | | -| Edge 113 | 2023-05-22 | | -| Safari 16.4 | 2023-05-22 | File System Access API is not supported | -| Brave 1.51 | 2023-05-22 | File System Access API is not supported | +| Chrome 116 | 2023-09-02 | | +| Edge 116 | 2023-09-02 | | +| Safari 16.6 | 2023-09-02 | File System Access API is not supported | +| Brave 1.57 | 2023-09-02 | File System Access API is not supported | | Firefox 113 | 2023-05-22 | File System Access API is not supported | ::: @@ -658,7 +658,8 @@ self.addEventListener('message', async(e) => { } else if(e.data.time) log(e.data.time, e.data.ts); }; setCnt(0); setHz(0); setState(""); setHTML(""); - try { + if(!window.showSaveFilePicker) setState("Browser missing API support!"); + else try { /* Show picker and get handle to file */ const wFile = await window.showSaveFilePicker({ suggestedName: "SheetJSStream.csv", diff --git a/docz/docs/03-demos/11-bigdata/03-ml.mdx b/docz/docs/03-demos/37-bigdata/03-ml.mdx similarity index 94% rename from docz/docs/03-demos/11-bigdata/03-ml.mdx rename to docz/docs/03-demos/37-bigdata/03-ml.mdx index f0eb5d4..ea67544 100644 --- a/docz/docs/03-demos/11-bigdata/03-ml.mdx +++ b/docz/docs/03-demos/37-bigdata/03-ml.mdx @@ -17,9 +17,9 @@ and typed arrays is straightforward. This demo covers conversions between worksheets and Typed Arrays for use with TensorFlow.js and other ML libraries. -:::note +:::info pass -Live code blocks in this page load the standalone build from version `4.6.0`. +Live code blocks in this page load the standalone build from version `4.10.0`. For use in web frameworks, the `@tensorflow/tfjs` module should be used. @@ -27,6 +27,18 @@ For use in NodeJS, the native bindings module is `@tensorflow/tfjs-node`. ::: +:::note pass + +Each browser demo was tested in the following environments: + +| Browser | Date | TF.js version | +|:------------|:-----------|:--------------| +| Chrome 116 | 2023-09-02 | `4.10.0` | +| Safari 16.6 | 2023-09-02 | `4.10.0` | +| Brave 1.57 | 2023-09-02 | `4.10.0` | + +::: + ## CSV Data Interchange `tf.data.csv` generates a Dataset from CSV data. The function expects a URL. @@ -55,7 +67,7 @@ The demo first fetches the XLSX file and generates CSV text. A blob URL is generated and fed to `tf.data.csv`. The rest of the demo follows the official example in the TensorFlow documentation. -:::caution +:::caution pass If the live demo shows a message @@ -181,7 +193,7 @@ async function getData() { ## Low-Level Operations -:::caution +:::caution pass While it is more efficient to use low-level operations, JS or CSV interchange is strongly recommended when possible. @@ -191,7 +203,7 @@ is strongly recommended when possible. ### Data Transposition A typical dataset in a spreadsheet will start with one header row and represent -each data record in its own row. For example, the Iris dataset might look like +each data record in its own row. For example, the Iris dataset might look like ![Iris dataset](pathname:///files/iris.png) @@ -260,7 +272,7 @@ var ws = XLSX.utils.aoa_to_sheet(aoa); ### Importing Data from a Spreadsheet `sheet_to_json` with the option `header:1` will generate a row-major array of -arrays that can be transposed. However, it is more efficient to walk the sheet +arrays that can be transposed. However, it is more efficient to walk the sheet manually: ```js diff --git a/docz/docs/03-demos/11-bigdata/_category_.json b/docz/docs/03-demos/37-bigdata/_category_.json similarity index 58% rename from docz/docs/03-demos/11-bigdata/_category_.json rename to docz/docs/03-demos/37-bigdata/_category_.json index 6852b07..d561080 100644 --- a/docz/docs/03-demos/11-bigdata/_category_.json +++ b/docz/docs/03-demos/37-bigdata/_category_.json @@ -1,4 +1,4 @@ { "label": "Big Data", - "position": 11 + "position": 37 } \ No newline at end of file diff --git a/docz/docs/03-demos/11-bigdata/index.md b/docz/docs/03-demos/37-bigdata/index.md similarity index 94% rename from docz/docs/03-demos/11-bigdata/index.md rename to docz/docs/03-demos/37-bigdata/index.md index b5884cf..1579e98 100644 --- a/docz/docs/03-demos/11-bigdata/index.md +++ b/docz/docs/03-demos/37-bigdata/index.md @@ -13,7 +13,7 @@ data processing in the web browser, and some innovations and discoveries have been integrated into the ReactJS framework and other foundational JS libraries. JS Engines have improved over the years, but there are some hard limits to -browser support using traditional methods of data processing. Vendors have +browser support using traditional methods of data processing. Vendors have introduced APIs and techniques for representing and processing very large binary and textual files. diff --git a/docz/docs/03-demos/42-engines/_category_.json b/docz/docs/03-demos/42-engines/_category_.json index f837a62..2e99738 100644 --- a/docz/docs/03-demos/42-engines/_category_.json +++ b/docz/docs/03-demos/42-engines/_category_.json @@ -1,4 +1,4 @@ { "label": "Other Languages", - "position": 12 + "position": 42 } \ No newline at end of file diff --git a/docz/static/tfjs/tf.min.js b/docz/static/tfjs/tf.min.js index 971f4c8..ce8fe7c 100644 --- a/docz/static/tfjs/tf.min.js +++ b/docz/static/tfjs/tf.min.js @@ -14,5 +14,5 @@ * limitations under the License. * ============================================================================= */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).tf=e.tf||{})}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),e}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,u=s instanceof i;Promise.resolve(u?s.v:s).then((function(n){if(u){var i="return"===t?"return":"next";if(!s.k||n.done)return r(i,n);n=e[i](n).value}a(o.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,a){return new Promise((function(i,o){var s={key:e,arg:a,resolve:i,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,a))}))},"function"!=typeof e.return&&(this.return=void 0)}function i(e,t){this.v=e,this.k=t}function o(){o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,a){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),s=new T(a||[]);return r(o,"_invoke",{value:w(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var p={};function f(){}function d(){}function v(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(E([])));y&&y!==t&&n.call(y,i)&&(m=y);var b=v.prototype=f.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function a(r,i,o,s){var u=h(e[r],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){a("next",e,o,s)}),(function(e){a("throw",e,o,s)})):t.resolve(l).then((function(e){c.value=e,o(c)}),(function(e){return a("throw",e,o,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return C()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=I(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=h(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function I(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var a=h(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;S(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t,n,r,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){u(i,r,a,o,s,"next",e)}function s(e){u(i,r,a,o,s,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function F(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}a.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},a.prototype.next=function(e){return this._invoke("next",e)},a.prototype.throw=function(e){return this._invoke("throw",e)},a.prototype.return=function(e){return this._invoke("return",e)};var D,M,L=function(e){return e&&e.Math==Math&&e},z=L("object"==("undefined"==typeof globalThis?"undefined":s(globalThis))&&globalThis)||L("object"==("undefined"==typeof window?"undefined":s(window))&&window)||L("object"==("undefined"==typeof self?"undefined":s(self))&&self)||L("object"==s(n)&&n)||function(){return this}()||Function("return this")(),P={},B=function(e){try{return!!e()}catch(e){return!0}},W=!B((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),V=!B((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),U=V,G=Function.prototype.call,j=U?G.bind(G):function(){return G.apply(G,arguments)},H={},q={}.propertyIsEnumerable,K=Object.getOwnPropertyDescriptor,X=K&&!q.call({1:2},1),Y=(H.f=X?function(e){var t=K(this,e);return!!t&&t.enumerable}:q,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),J=V,Z=Function.prototype,Q=Z.call,$=J&&Z.bind.bind(Q,Q),ee=J?$:function(e){return function(){return Q.apply(e,arguments)}},te=ee,ne=te({}.toString),re=te("".slice),ae=function(e){return re(ne(e),8,-1)},ie=B,oe=ae,se=Object,ue=ee("".split),ce=ie((function(){return!se("z").propertyIsEnumerable(0)}))?function(e){return"String"==oe(e)?ue(e,""):se(e)}:se,le=function(e){return null==e},he=le,pe=TypeError,fe=function(e){if(he(e))throw pe("Can't call method on "+e);return e},de=ce,ve=fe,me=function(e){return de(ve(e))},ge="object"==("undefined"==typeof document?"undefined":s(document))&&document.all,ye={all:ge,IS_HTMLDDA:void 0===ge&&void 0!==ge},be=ye.all,xe=ye.IS_HTMLDDA?function(e){return"function"==typeof e||e===be}:function(e){return"function"==typeof e},ke=xe,we=ye.all,Ie=ye.IS_HTMLDDA?function(e){return"object"==s(e)?null!==e:ke(e)||e===we}:function(e){return"object"==s(e)?null!==e:ke(e)},Ne=z,Se=xe,Te=function(e){return Se(e)?e:void 0},Ee=function(e,t){return arguments.length<2?Te(Ne[e]):Ne[e]&&Ne[e][t]},Ce=ee({}.isPrototypeOf),Ae="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Re=z,_e=Ae,Oe=Re.process,Fe=Re.Deno,De=Oe&&Oe.versions||Fe&&Fe.version,Me=De&&De.v8;Me&&(M=(D=Me.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!M&&_e&&(!(D=_e.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=_e.match(/Chrome\/(\d+)/))&&(M=+D[1]);var Le=M,ze=Le,Pe=B,Be=!!Object.getOwnPropertySymbols&&!Pe((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ze&&ze<41})),We=Be&&!Symbol.sham&&"symbol"==s(Symbol.iterator),Ve=Ee,Ue=xe,Ge=Ce,je=Object,He=We?function(e){return"symbol"==s(e)}:function(e){var t=Ve("Symbol");return Ue(t)&&Ge(t.prototype,je(e))},qe=String,Ke=function(e){try{return qe(e)}catch(e){return"Object"}},Xe=xe,Ye=Ke,Je=TypeError,Ze=function(e){if(Xe(e))return e;throw Je(Ye(e)+" is not a function")},Qe=Ze,$e=le,et=function(e,t){var n=e[t];return $e(n)?void 0:Qe(n)},tt=j,nt=xe,rt=Ie,at=TypeError,it=function(e,t){var n,r;if("string"===t&&nt(n=e.toString)&&!rt(r=tt(n,e)))return r;if(nt(n=e.valueOf)&&!rt(r=tt(n,e)))return r;if("string"!==t&&nt(n=e.toString)&&!rt(r=tt(n,e)))return r;throw at("Can't convert object to primitive value")},ot={exports:{}},st=!1,ut=z,ct=Object.defineProperty,lt=function(e,t){try{ct(ut,e,{value:t,configurable:!0,writable:!0})}catch(n){ut[e]=t}return t},ht=lt,pt="__core-js_shared__",ft=z[pt]||ht(pt,{}),dt=(ot.exports,ft);(ot.exports=function(e,t){return dt[e]||(dt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"});var vt=ot.exports,mt=fe,gt=Object,yt=function(e){return gt(mt(e))},bt=yt,xt=ee({}.hasOwnProperty),kt=Object.hasOwn||function(e,t){return xt(bt(e),t)},wt=ee,It=0,Nt=Math.random(),St=wt(1..toString),Tt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+St(++It+Nt,36)},Et=vt,Ct=kt,At=Tt,Rt=Be,_t=We,Ot=z.Symbol,Ft=Et("wks"),Dt=_t?Ot.for||Ot:Ot&&Ot.withoutSetter||At,Mt=function(e){return Ct(Ft,e)||(Ft[e]=Rt&&Ct(Ot,e)?Ot[e]:Dt("Symbol."+e)),Ft[e]},Lt=j,zt=Ie,Pt=He,Bt=et,Wt=it,Vt=TypeError,Ut=Mt("toPrimitive"),Gt=function(e,t){if(!zt(e)||Pt(e))return e;var n,r=Bt(e,Ut);if(r){if(void 0===t&&(t="default"),n=Lt(r,e,t),!zt(n)||Pt(n))return n;throw Vt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Wt(e,t)},jt=Gt,Ht=He,qt=function(e){var t=jt(e,"string");return Ht(t)?t:t+""},Kt=Ie,Xt=z.document,Yt=Kt(Xt)&&Kt(Xt.createElement),Jt=function(e){return Yt?Xt.createElement(e):{}},Zt=Jt,Qt=!W&&!B((function(){return 7!=Object.defineProperty(Zt("div"),"a",{get:function(){return 7}}).a})),$t=W,en=j,tn=H,nn=Y,rn=me,an=qt,on=kt,sn=Qt,un=Object.getOwnPropertyDescriptor,cn=(P.f=$t?un:function(e,t){if(e=rn(e),t=an(t),sn)try{return un(e,t)}catch(e){}if(on(e,t))return nn(!en(tn.f,e,t),e[t])},{}),ln=W&&B((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),hn=Ie,pn=String,fn=TypeError,dn=function(e){if(hn(e))return e;throw fn(pn(e)+" is not an object")},vn=W,mn=Qt,gn=ln,yn=dn,bn=qt,xn=TypeError,kn=Object.defineProperty,wn=Object.getOwnPropertyDescriptor,In="enumerable",Nn="configurable",Sn="writable",Tn=(cn.f=vn?gn?function(e,t,n){if(yn(e),t=bn(t),yn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Sn in n&&!n.writable){var r=wn(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Nn in n?n.configurable:r.configurable,enumerable:In in n?n.enumerable:r.enumerable,writable:!1})}return kn(e,t,n)}:kn:function(e,t,n){if(yn(e),t=bn(t),yn(n),mn)try{return kn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw xn("Accessors not supported");return"value"in n&&(e[t]=n.value),e},cn),En=Y,Cn=W?function(e,t,n){return Tn.f(e,t,En(1,n))}:function(e,t,n){return e[t]=n,e},An={exports:{}},Rn=W,_n=kt,On=Function.prototype,Fn=Rn&&Object.getOwnPropertyDescriptor,Dn=_n(On,"name"),Mn={EXISTS:Dn,PROPER:Dn&&"something"===function(){}.name,CONFIGURABLE:Dn&&(!Rn||Rn&&Fn(On,"name").configurable)},Ln=xe,zn=ft,Pn=ee(Function.toString);Ln(zn.inspectSource)||(zn.inspectSource=function(e){return Pn(e)});var Bn,Wn,Vn,Un=zn.inspectSource,Gn=xe,jn=z.WeakMap,Hn=Gn(jn)&&/native code/.test(String(jn)),qn=Tt,Kn=vt("keys"),Xn=function(e){return Kn[e]||(Kn[e]=qn(e))},Yn={},Jn=Hn,Zn=z,Qn=Ie,$n=Cn,er=kt,tr=ft,nr=Xn,rr=Yn,ar="Object already initialized",ir=Zn.TypeError,or=Zn.WeakMap;if(Jn||tr.state){var sr=tr.state||(tr.state=new or);sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,Bn=function(e,t){if(sr.has(e))throw ir(ar);return t.facade=e,sr.set(e,t),t},Wn=function(e){return sr.get(e)||{}},Vn=function(e){return sr.has(e)}}else{var ur=nr("state");rr[ur]=!0,Bn=function(e,t){if(er(e,ur))throw ir(ar);return t.facade=e,$n(e,ur,t),t},Wn=function(e){return er(e,ur)?e[ur]:{}},Vn=function(e){return er(e,ur)}}var cr={set:Bn,get:Wn,has:Vn,enforce:function(e){return Vn(e)?Wn(e):Bn(e,{})},getterFor:function(e){return function(t){var n;if(!Qn(t)||(n=Wn(t)).type!==e)throw ir("Incompatible receiver, "+e+" required");return n}}},lr=(An.exports,ee),hr=B,pr=xe,fr=kt,dr=W,vr=Mn.CONFIGURABLE,mr=Un,gr=cr.enforce,yr=cr.get,br=String,xr=Object.defineProperty,kr=lr("".slice),wr=lr("".replace),Ir=lr([].join),Nr=dr&&!hr((function(){return 8!==xr((function(){}),"length",{value:8}).length})),Sr=String(String).split("String"),Tr=An.exports=function(e,t,n){"Symbol("===kr(br(t),0,7)&&(t="["+wr(br(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!fr(e,"name")||vr&&e.name!==t)&&(dr?xr(e,"name",{value:t,configurable:!0}):e.name=t),Nr&&n&&fr(n,"arity")&&e.length!==n.arity&&xr(e,"length",{value:n.arity});try{n&&fr(n,"constructor")&&n.constructor?dr&&xr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=gr(e);return fr(r,"source")||(r.source=Ir(Sr,"string"==typeof t?t:"")),e};Function.prototype.toString=Tr((function(){return pr(this)&&yr(this).source||mr(this)}),"toString");var Er=An.exports,Cr=xe,Ar=cn,Rr=Er,_r=lt,Or=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(Cr(n)&&Rr(n,i,r),r.global)a?e[t]=n:_r(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:Ar.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Fr={},Dr=Math.ceil,Mr=Math.floor,Lr=Math.trunc||function(e){var t=+e;return(t>0?Mr:Dr)(t)},zr=Lr,Pr=function(e){var t=+e;return t!=t||0===t?0:zr(t)},Br=Pr,Wr=Math.max,Vr=Math.min,Ur=function(e,t){var n=Br(e);return n<0?Wr(n+t,0):Vr(n,t)},Gr=Pr,jr=Math.min,Hr=function(e){return e>0?jr(Gr(e),9007199254740991):0},qr=Hr,Kr=function(e){return qr(e.length)},Xr=me,Yr=Ur,Jr=Kr,Zr=function(e){return function(t,n,r){var a,i=Xr(t),o=Jr(i),s=Yr(r,o);if(e&&n!=n){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},Qr={includes:Zr(!0),indexOf:Zr(!1)},$r=kt,ea=me,ta=Qr.indexOf,na=Yn,ra=ee([].push),aa=function(e,t){var n,r=ea(e),a=0,i=[];for(n in r)!$r(na,n)&&$r(r,n)&&ra(i,n);for(;t.length>a;)$r(r,n=t[a++])&&(~ta(i,n)||ra(i,n));return i},ia=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oa=aa,sa=ia.concat("length","prototype"),ua=(Fr.f=Object.getOwnPropertyNames||function(e){return oa(e,sa)},{}),ca=(ua.f=Object.getOwnPropertySymbols,Ee),la=Fr,ha=ua,pa=dn,fa=ee([].concat),da=ca("Reflect","ownKeys")||function(e){var t=la.f(pa(e)),n=ha.f;return n?fa(t,n(e)):t},va=kt,ma=da,ga=P,ya=cn,ba=function(e,t,n){for(var r=ma(t),a=ya.f,i=ga.f,o=0;oo;)ni.f(e,n=a[o++],r[n]);return e},Ee("document","documentElement")),si=dn,ui=Ja,ci=ia,li=Yn,hi=oi,pi=Jt,fi=Xn("IE_PROTO"),di=function(){},vi=function(e){return"