diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7242a44f..eaeeaca0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,36 +1,112 @@ +/* eslint-env node */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - "env": { - "browser": true, - "es6": true + parser: "@typescript-eslint/parser", + env: { + browser: true, + commonjs: true, + es2017: true, + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "prettier", + ], + plugins: ["@typescript-eslint"], + parserOptions: { + project: ["./tsconfig.eslint.json"], + tsconfigRootDir: __dirname, + }, + root: true, + rules: { + /* start stylistic rules */ + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/consistent-type-imports": [ + "error", + { + fixStyle: "inline-type-imports", + }, + ], + "@typescript-eslint/consistent-type-exports": "error", + "@typescript-eslint/prefer-readonly": "warn", + "@typescript-eslint/class-literal-property-style": ["warn", "getters"], + "@typescript-eslint/consistent-generic-constructors": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "warn", + "@typescript-eslint/no-inferrable-types": "warn", + "@typescript-eslint/non-nullable-type-assertion-style": "warn", + "@typescript-eslint/prefer-for-of": "warn", + // "@typescript-eslint/prefer-nullish-coalescing": "warn", + "@typescript-eslint/prefer-optional-chain": "warn", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "@typescript-eslint/no-meaningless-void-operator": "error", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn", + "@typescript-eslint/no-unnecessary-condition": "warn", + "@typescript-eslint/no-unnecessary-qualifier": "warn", + "@typescript-eslint/no-unnecessary-type-arguments": "warn", + "@typescript-eslint/prefer-reduce-type-parameter": "warn", + "@typescript-eslint/promise-function-async": "warn", + /* end stylistic rules */ + + /* start recommended rules */ + "no-restricted-globals": [2, "event", "error"], + "@typescript-eslint/no-base-to-string": "warn", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-duplicate-type-constituents": "warn", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-floating-promises": "warn", + "@typescript-eslint/no-for-in-array": "warn", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + }, + ], + "no-implied-eval": "off", + "@typescript-eslint/no-implied-eval": "error", + "no-loss-of-precision": "off", + "@typescript-eslint/no-loss-of-precision": "warn", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": [ + "error", + { checksVoidReturn: false }, + ], + "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "warn", + "@typescript-eslint/no-redundant-type-constituents": "warn", + "@typescript-eslint/no-this-alias": "warn", + "@typescript-eslint/no-unnecessary-type-assertion": "warn", + "@typescript-eslint/no-unnecessary-type-constraint": "warn", + /* TODO eventually turn all these on */ + "@typescript-eslint/no-unsafe-argument": "warn", + // "@typescript-eslint/no-unsafe-assignment": "warn", + // "@typescript-eslint/no-unsafe-call": "warn", + "@typescript-eslint/no-unsafe-declaration-merging": "warn", + "@typescript-eslint/no-unsafe-enum-comparison": "warn", + // "@typescript-eslint/no-unsafe-member-access": "warn", + "@typescript-eslint/no-unsafe-return": "warn", + "@typescript-eslint/prefer-as-const": "warn", + "require-await": "off", + // "@typescript-eslint/require-await": "warn", + "@typescript-eslint/restrict-template-expressions": "warn", + "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/method-signature-style": "error", + }, + reportUnusedDisableDirectives: true, + ignorePatterns: ["__generated__", "__mocks__", "dist", "static"], + overrides: [ + { + extends: ["plugin:@typescript-eslint/disable-type-checked"], + files: ["webpack.*.js", ".*.cjs"], + rules: { + "@typescript-eslint/no-var-requires": "off", + }, }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 2021, - "sourceType": "module" - }, - "globals": { - "globalThis": false, //not writable - }, - "rules": { - "no-restricted-globals": [ - 2, - "event", "window" - ], - "indent": [ - "error", - 2 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ] - } + ], }; diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3ccebd97..06dc6939 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,11 +5,12 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Node.js, NPM and Yarn - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 + cache: yarn - name: install run: yarn install @@ -21,4 +22,7 @@ jobs: run: yarn test - name: lint - run: yarn lint + run: yarn lint:check + + - name: format + run: yarn format:check diff --git a/.github/workflows/npm-release.yaml b/.github/workflows/npm-release.yaml index ef8eff10..4275b9d5 100644 --- a/.github/workflows/npm-release.yaml +++ b/.github/workflows/npm-release.yaml @@ -10,9 +10,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - cache: 'yarn' + node-version: "18.x" + registry-url: "https://registry.npmjs.org" + cache: "yarn" - name: Yarn Install run: yarn install --frozen-lockfile diff --git a/.gitignore b/.gitignore index 7ef20cb6..71a18b11 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ **/*.wacz **/adblock.gz **/node_modules +**/dist +.tsimp +coverage +dist-wombat diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..dad47e77 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +static/wombat*.js diff --git a/LICENSE.md b/LICENSE.md index 0ad25db4..162676cb 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,178 +1,178 @@ GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Copyright (C) 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. Preamble - The GNU Affero General Public License is a free, copyleft license for +The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - Developers that use our General Public Licenses protect your rights +Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. - A secondary benefit of defending all users' freedom is that +A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. - The GNU Affero General Public License is designed specifically to +The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to +to the community. It requires the operator of a network server to provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on +users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. - The precise terms and conditions for copying, distribution and +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS - 0. Definitions. +0. Definitions. - "This License" refers to version 3 of the GNU Affero General Public License. +"This License" refers to version 3 of the GNU Affero General Public License. - "Copyright" also means copyright-like laws that apply to other kinds of +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. - To "modify" a work means to copy from or adapt all or part of the work +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the +exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. - A "covered work" means either the unmodified Program or a work based +A "covered work" means either the unmodified Program or a work based on the Program. - To "propagate" a work means to do anything with it that, without +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, +computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - An interactive user interface displays "Appropriate Legal Notices" +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If +work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - 1. Source Code. +1. Source Code. - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source +The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source form of a work. - A "Standard Interface" means an interface that either is an official +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - The "System Libraries" of an executable work include anything, other +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A +implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - The "Corresponding Source" for a work in object code form means all +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's +control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source +which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - The Corresponding Source need not include anything that users +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - The Corresponding Source for a work in source code form is that +The Corresponding Source for a work in source code form is that same work. - 2. Basic Permissions. +2. Basic Permissions. - All rights granted under this License are granted for the term of +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your +content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - You may make, run and propagate covered works that you do not +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose +in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works +not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 +Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. +3. Protecting Users' Legal Rights From Anti-Circumvention Law. - No covered work shall be deemed part of an effective technological +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - When you convey a covered work, you waive any legal power to forbid +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or @@ -180,9 +180,9 @@ modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - 4. Conveying Verbatim Copies. +4. Conveying Verbatim Copies. - You may convey verbatim copies of the Program's source code as you +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any @@ -190,12 +190,12 @@ non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - You may charge any price or no price for each copy that you convey, +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - 5. Conveying Modified Source Versions. +5. Conveying Modified Source Versions. - You may convey a work based on the Program, or the modifications to +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: @@ -220,19 +220,19 @@ terms of section 4, provided that you also meet all of these conditions: interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - A compilation of a covered work with other separate and independent +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - 6. Conveying Non-Source Forms. +6. Conveying Non-Source Forms. - You may convey a covered work in object code form under the terms +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: @@ -278,75 +278,75 @@ in one of these ways: Source of the work are being offered to the general public at no charge under subsection 6d. - A separable portion of the object code, whose source code is excluded +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - A "User Product" is either (1) a "consumer product", which means any +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product +actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - "Installation Information" for a User Product means any methods, +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must +a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - If you convey an object code work under this section in, or with, or +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply +by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - The requirement to provide Installation Information does not include a +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a +the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - Corresponding Source conveyed, and Installation Information provided, +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - 7. Additional Terms. +7. Additional Terms. - "Additional permissions" are terms that supplement the terms of this +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions +that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - When you convey a copy of a covered work, you may at your option +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - Notwithstanding any other provision of this License, for material you +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: @@ -373,74 +373,74 @@ that material) supplement the terms of this License with terms: any liability that these contractual assumptions directly impose on those licensors and authors. - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains +restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - If you add terms to a covered work in accord with this section, you +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - Additional terms, permissive or non-permissive, may be stated in the +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - 8. Termination. +8. Termination. - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - However, if you cease all violation of this License, then your +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - Moreover, your license from a particular copyright holder is +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - Termination of your rights under this section does not terminate the +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently +this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - 9. Acceptance Not Required for Having Copies. +9. Acceptance Not Required for Having Copies. - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work +You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, +to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - 10. Automatic Licensing of Downstream Recipients. +10. Automatic Licensing of Downstream Recipients. - Each time you convey a covered work, the recipient automatically +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible +propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - An "entity transaction" is a transaction transferring control of an +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could @@ -448,43 +448,43 @@ give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - 11. Patents. +11. Patents. - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". - A contributor's "essential patent claims" are all patent claims +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For +consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - Each contributor grants you a non-exclusive, worldwide, royalty-free +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - In the following three paragraphs, a "patent license" is any express +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a +sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - If you convey a covered work, knowingly relying on a patent license, +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, @@ -492,13 +492,13 @@ then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have +license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - If, pursuant to or in connection with a single transaction or +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify @@ -506,10 +506,10 @@ or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - A patent license is "discriminatory" if it does not include within +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered +specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying @@ -521,83 +521,83 @@ for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - Nothing in this License shall be construed as excluding or limiting +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - 12. No Surrender of Others' Freedom. +12. No Surrender of Others' Freedom. - If conditions are imposed on you (whether by court order, agreement or +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a +excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Remote Network Interaction; Use with the GNU General Public License. +13. Remote Network Interaction; Use with the GNU General Public License. - Notwithstanding any other provision of this License, if you modify the +Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source +means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. - Notwithstanding any other provision of this License, you have +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this +combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. - 14. Revised Versions of this License. +14. Revised Versions of this License. - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions +The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - Each version is given a distinguishing version number. If the +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the +Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. - If the Program specifies that a proxy can decide which future +If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - 15. Disclaimer of Warranty. +15. Disclaimer of Warranty. - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 16. Limitation of Liability. +16. Limitation of Liability. - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE @@ -607,9 +607,9 @@ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 17. Interpretation of Sections 15 and 16. +17. Interpretation of Sections 15 and 16. - If the disclaimer of warranty and limitation of liability provided +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the @@ -620,11 +620,11 @@ copy of the Program in return for a fee. How to Apply These Terms to Your New Programs - If you develop a new program, and you want it to be of the greatest +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - To do so, attach the following notices to the program. It is safest +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. @@ -647,15 +647,15 @@ the "copyright" line and a pointer to where the full notice is found. Also add information on how to contact you by electronic and paper mail. - If your software can interact with users remotely through a computer +If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its +get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different +of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. - You should also get your employer (if you work as a programmer) or school, +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . diff --git a/README.md b/README.md index 8d74e06c..b9c81c3b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # wabac.js -*service worker based web archive replay* - +_service worker based web archive replay_ + **wabac.js** provides a full web archive replay system, or 'wayback machine', using [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers) @@ -26,12 +26,11 @@ Using the ReplayWeb.page is only one way to use wabac.js. Additional ways to use The API provides all functionality for loading web archives and getting information about a web archive collections. -*Documentation coming soon!* +_Documentation coming soon!_ ## Old Version -[wabac.js 1.0](https://github.com/webrecorder/wabac.js-1.0) also included a built-in UI component. This version is still available at [https://wab.ac/](https://wab.ac/)* - +[wabac.js 1.0](https://github.com/webrecorder/wabac.js-1.0) also included a built-in UI component. This version is still available at [https://wab.ac/](https://wab.ac/) ## Contributing diff --git a/ava.config.js b/ava.config.js new file mode 100644 index 00000000..c60c1fe5 --- /dev/null +++ b/ava.config.js @@ -0,0 +1,13 @@ +export default { + environmentVariables: { + SWC_NODE_PROJECT: "./tsconfig.ava.json", + }, + concurrency: 1, + verbose: true, + serial: true, + files: ["test/*.ts"], + extensions: { + ts: "module", + }, + nodeArguments: ["--import=@swc-node/register/esm-register"], +}; diff --git a/dist/sw.js b/dist/sw.js deleted file mode 100644 index fd00cb7f..00000000 --- a/dist/sw.js +++ /dev/null @@ -1,121 +0,0 @@ -/*! sw.js (wabac.js 2.19.9) is part of Webrecorder project. Copyright (C) 2020-2024, Webrecorder Software. Licensed under the Affero General Public License v3. */(()=>{var t={9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,s=c(t),o=s[0],a=s[1],l=new n(function(t,e,r){return 3*(e+r)/4-r}(0,o,a)),h=0,u=a>0?o-4:o;for(r=0;r>16&255,l[h++]=e>>8&255,l[h++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[h++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e);return l},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=16383,a=0,c=i-n;ac?c:a+o));1===n?(e=t[i-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return s.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,i){for(var n,s,o=[],a=e;a>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},4181:t=>{var e=4096,r=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function i(t){this.buf_=new Uint8Array(8224),this.input_=t,this.reset()}i.READ_SIZE=e,i.IBUF_MASK=8191,i.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var t=0;t<4;t++)this.val_|=this.buf_[this.pos_]<<8*t,++this.pos_;return this.bit_end_pos_>0},i.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var t=this.buf_ptr_,r=this.input_.read(this.buf_,t,e);if(r<0)throw new Error("Unexpected end of input");if(r=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},i.prototype.readBits=function(t){32-this.bit_pos_>>this.bit_pos_&r[t];return this.bit_pos_+=t,e},t.exports=i},7080:(t,e)=>{e.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2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,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),e.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},6450:(t,e,r)=>{var i=r(6154).g,n=r(6154).j,s=r(4181),o=r(5139),a=r(966).h,c=r(966).g,l=r(7080),h=r(8435),u=r(2973),p=1080,d=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),f=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),g=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),m=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function w(t){var e;return 0===t.readBits(1)?16:(e=t.readBits(3))>0?17+e:(e=t.readBits(3))>0?8+e:17}function y(t){if(t.readBits(1)){var e=t.readBits(3);return 0===e?1:t.readBits(e)+(1<1&&0===s)throw new Error("Invalid size byte");n.meta_block_length|=s<<8*i}}else for(i=0;i4&&0===o)throw new Error("Invalid size nibble");n.meta_block_length|=o<<4*i}return++n.meta_block_length,n.input_end||n.is_metadata||(n.is_uncompressed=t.readBits(1)),n}function v(t,e,r){var i;return r.fillBitWindow(),(i=t[e+=r.val_>>>r.bit_pos_&255].bits-8)>0&&(r.bit_pos_+=8,e+=t[e].value,e+=r.val_>>>r.bit_pos_&(1<>=1,++h;for(f=0;f0;++f){var b,A=d[f],v=0;i.fillBitWindow(),v+=i.val_>>>i.bit_pos_&15,i.bit_pos_+=y[v].bits,b=y[v].value,g[A]=b,0!==b&&(m-=32>>b,++w)}if(1!==w&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function(t,e,r,i){for(var n=0,s=8,o=0,l=0,h=32768,u=[],p=0;p<32;p++)u.push(new a(0,0));for(c(u,0,5,t,18);n0;){var d,f=0;if(i.readMoreInput(),i.fillBitWindow(),f+=i.val_>>>i.bit_pos_&31,i.bit_pos_+=u[f].bits,(d=255&u[f].value)<16)o=0,r[n++]=d,0!==d&&(s=d,h-=32768>>d);else{var g,m,w=d-14,y=0;if(16===d&&(y=s),l!==y&&(o=0,l=y),g=o,o>0&&(o-=2,o<<=w),n+(m=(o+=i.readBits(w)+3)-g)>e)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var b=0;b>>5]),this.htrees=new Uint32Array(e)}function C(t,e){var r,i,n={num_htrees:null,context_map:null},s=0;e.readMoreInput();var o=n.num_htrees=y(e)+1,c=n.context_map=new Uint8Array(t);if(o<=1)return n;for(e.readBits(1)&&(s=e.readBits(4)+1),r=[],i=0;i=t)throw new Error("[DecodeContextMap] i >= context_map_size");c[i]=0,++i}else c[i]=l-s,++i}return e.readBits(1)&&function(t,e){var r,i=new Uint8Array(256);for(r=0;r<256;++r)i[r]=r;for(r=0;r=t&&(a-=t),i[r]=a,n[c+(1&s[l])]=a,++s[l]}function R(t,e,r,i,n,o){var a,c=n+1,l=r&n,h=o.pos_&s.IBUF_MASK;if(e<8||o.bit_pos_+(e<<3)0;)o.readMoreInput(),i[l++]=o.readBits(8),l===c&&(t.write(i,c),l=0);else{if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)i[l]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,++l,--e;if(h+(a=o.bit_end_pos_-o.bit_pos_>>3)>s.IBUF_MASK){for(var u=s.IBUF_MASK+1-h,p=0;p=c){t.write(i,c),l-=c;for(p=0;p=c;){if(a=c-l,o.input_.read(i,l,a)e.buffer.length){var pt=new Uint8Array(N+Z);pt.set(e.buffer),e.buffer=pt}if(O=ut.input_end,W=ut.is_uncompressed,ut.is_metadata)for(k(T);Z>0;--Z)T.readMoreInput(),T.readBits(8);else if(0!==Z)if(W)T.bit_pos_=T.bit_pos_+7&-8,R(e,Z,N,f,d,T),N+=Z;else{for(r=0;r<3;++r)et[r]=y(T)+1,et[r]>=2&&(_(et[r]+2,m,r*p,T),_(26,b,r*p,T),$[r]=E(b,r*p,T),it[r]=1);for(T.readMoreInput(),G=(1<<(j=T.readBits(2)))-1,z=(V=16+(T.readBits(4)<0;){var gt,mt,wt,yt,bt,At,vt,_t,Et,St,Tt,xt;for(T.readMoreInput(),0===$[1]&&(I(et[1],m,1,tt,rt,it,T),$[1]=E(b,p,T),X=M[1].htrees[tt[1]]),--$[1],(mt=(gt=v(M[1].codes,X,T))>>6)>=2?(mt-=2,vt=-1):vt=0,wt=h.kInsertRangeLut[mt]+(gt>>3&7),yt=h.kCopyRangeLut[mt]+(7>),bt=h.kInsertLengthPrefixCode[wt].offset+T.readBits(h.kInsertLengthPrefixCode[wt].nbits),At=h.kCopyLengthPrefixCode[yt].offset+T.readBits(h.kCopyLengthPrefixCode[yt].nbits),D=f[N-1&d],U=f[N-2&d],Et=0;Et4?3:At-2))],(vt=v(M[2].codes,M[2].htrees[ct],T))>=V)xt=(vt-=V)&G,vt=V+((Ct=(2+(1&(vt>>=j))<<(Tt=1+(vt>>1)))-4)+T.readBits(Tt)<(B=N=o.minDictionaryWordLength&&At<=o.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+N+" distance: "+_t+" len: "+At+" bytes left: "+Z);var Ct=o.offsetsByLength[At],It=_t-B-1,Rt=o.sizeBitsByLength[At],kt=It>>Rt;if(Ct+=(It&(1<=g){e.write(f,c);for(var Ot=0;Ot0&&(P[3&L]=_t,++L),At>Z)throw new Error("Invalid backward reference. pos: "+N+" distance: "+_t+" len: "+At+" bytes left: "+Z);for(Et=0;Et{var i=r(4789);e.init=function(){return(0,r(6450).BrotliDecompressBuffer)(i.toByteArray(r(2722)))}},2722:t=>{t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYM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hEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},5139:(t,e,r)=>{var i=r(5340);e.init=function(){e.dictionary=i.init()},e.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),e.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),e.minDictionaryWordLength=4,e.maxDictionaryWordLength=24},966:(t,e)=>{function r(t,e){this.bits=t,this.value=e}e.h=r;var i=15;function n(t,e){for(var r=1<>=1;return(t&r-1)+r}function s(t,e,i,n,s){do{t[e+(n-=i)]=new r(s.bits,s.value)}while(n>0)}function o(t,e,r){for(var n=1<0;--v[h])s(t,e+p,d,w,new r(255&h,65535&b[u++])),p=n(p,h);for(g=y-1,f=-1,h=a+1,d=2;h<=i;++h,d<<=1)for(;v[h]>0;--v[h])(p&g)!==f&&(e+=w,y+=w=1<<(m=o(v,h,a)),t[A+(f=p&g)]=new r(m+a&255,e-A-f&65535)),s(t,e+(p>>a),d,w,new r(h-a&255,65535&b[u++])),p=n(p,h);return y}},8435:(t,e)=>{function r(t,e){this.offset=t,this.nbits=e}e.kBlockLengthPrefixCode=[new r(1,2),new r(5,2),new r(9,2),new r(13,2),new r(17,3),new r(25,3),new r(33,3),new r(41,3),new r(49,4),new r(65,4),new r(81,4),new r(97,4),new r(113,5),new r(145,5),new r(177,5),new r(209,5),new r(241,6),new r(305,6),new r(369,7),new r(497,8),new r(753,9),new r(1265,10),new r(2289,11),new r(4337,12),new r(8433,13),new r(16625,24)],e.kInsertLengthPrefixCode=[new r(0,0),new r(1,0),new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,1),new r(8,1),new r(10,2),new r(14,2),new r(18,3),new r(26,3),new r(34,4),new r(50,4),new r(66,5),new r(98,5),new r(130,6),new r(194,7),new r(322,8),new r(578,9),new r(1090,10),new r(2114,12),new r(6210,14),new r(22594,24)],e.kCopyLengthPrefixCode=[new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,0),new r(7,0),new r(8,0),new r(9,0),new r(10,1),new r(12,1),new r(14,2),new r(18,2),new r(22,3),new r(30,3),new r(38,4),new r(54,4),new r(70,5),new r(102,5),new r(134,6),new r(198,7),new r(326,8),new r(582,9),new r(1094,10),new r(2118,24)],e.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],e.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},6154:(t,e)=>{function r(t){this.buffer=t,this.pos=0}function i(t){this.buffer=t,this.pos=0}r.prototype.read=function(t,e,r){this.pos+r>this.buffer.length&&(r=this.buffer.length-this.pos);for(var i=0;ithis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(t.subarray(0,e),this.pos),this.pos+=e,e},e.j=i},2973:(t,e,r)=>{var i=r(5139),n=10,s=11;function o(t,e,r){this.prefix=new Uint8Array(t.length),this.transform=e,this.suffix=new Uint8Array(r.length);for(var i=0;i'),new o("",0,"\n"),new o("",3,""),new o("",0,"]"),new o("",0," for "),new o("",14,""),new o("",2,""),new o("",0," a "),new o("",0," that "),new o(" ",n,""),new o("",0,". "),new o(".",0,""),new o(" ",0,", "),new o("",15,""),new o("",0," with "),new o("",0,"'"),new o("",0," from "),new o("",0," by "),new o("",16,""),new o("",17,""),new o(" the ",0,""),new o("",4,""),new o("",0,". The "),new o("",s,""),new o("",0," on "),new o("",0," as "),new o("",0," is "),new o("",7,""),new o("",1,"ing "),new o("",0,"\n\t"),new o("",0,":"),new o(" ",0,". "),new o("",0,"ed "),new o("",20,""),new o("",18,""),new o("",6,""),new o("",0,"("),new o("",n,", "),new o("",8,""),new o("",0," at "),new o("",0,"ly "),new o(" the ",0," of "),new o("",5,""),new o("",9,""),new o(" ",n,", "),new o("",n,'"'),new o(".",0,"("),new o("",s," "),new o("",n,'">'),new o("",0,'="'),new o(" ",0,"."),new o(".com/",0,""),new o(" the ",0," of the "),new o("",n,"'"),new o("",0,". This "),new o("",0,","),new o(".",0," "),new o("",n,"("),new o("",n,"."),new o("",0," not "),new o(" ",0,'="'),new o("",0,"er "),new o(" ",s," "),new o("",0,"al "),new o(" ",s,""),new o("",0,"='"),new o("",s,'"'),new o("",n,". "),new o(" ",0,"("),new o("",0,"ful "),new o(" ",n,". "),new o("",0,"ive "),new o("",0,"less "),new o("",s,"'"),new o("",0,"est "),new o(" ",n,"."),new o("",s,'">'),new o(" ",0,"='"),new o("",n,","),new o("",0,"ize "),new o("",s,"."),new o(" ",0,""),new o(" ",0,","),new o("",n,'="'),new o("",s,'="'),new o("",0,"ous "),new o("",s,", "),new o("",n,"='"),new o(" ",n,","),new o(" ",s,'="'),new o(" ",s,", "),new o("",s,","),new o("",s,"("),new o("",s,". "),new o(" ",s,"."),new o("",s,"='"),new o(" ",s,". "),new o(" ",n,'="'),new o(" ",s,"='"),new o(" ",n,"='")];function c(t,e){return t[e]<192?(t[e]>=97&&t[e]<=122&&(t[e]^=32),1):t[e]<224?(t[e+1]^=32,2):(t[e+2]^=5,3)}e.kTransforms=a,e.kNumTransforms=a.length,e.transformDictionaryWord=function(t,e,r,o,l){var h,u=a[l].prefix,p=a[l].suffix,d=a[l].transform,f=d<12?0:d-11,g=0,m=e;f>o&&(f=o);for(var w=0;w0;){var y=c(t,h);h+=y,o-=y}for(var b=0;b{t.exports=r(6450).BrotliDecompressBuffer},4789:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){for(var e,r=c(t),s=r[0],o=r[1],a=new n(function(t,e,r){return 3*(e+r)/4-r}(0,s,o)),l=0,h=o>0?s-4:s,u=0;u>16&255,a[l++]=e>>8&255,a[l++]=255&e;2===o&&(e=i[t.charCodeAt(u)]<<2|i[t.charCodeAt(u+1)]>>4,a[l++]=255&e);1===o&&(e=i[t.charCodeAt(u)]<<10|i[t.charCodeAt(u+1)]<<4|i[t.charCodeAt(u+2)]>>2,a[l++]=e>>8&255,a[l++]=255&e);return a},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=16383,a=0,c=i-n;ac?c:a+o));1===n?(e=t[i-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return s.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,i){for(var n,s,o=[],a=e;a>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict"; -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */const i=r(9742),n=r(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let i=a(r);const n=i.write(t,e);n!==r&&(i=i.slice(0,n));return i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Y(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(t,SharedArrayBuffer)||t&&Y(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return c.from(i,e,r);const n=function(t){if(c.isBuffer(t)){const e=0|f(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||J(t.length)?a(0):p(t);if("Buffer"===t.type&&Array.isArray(t.data))return p(t.data)}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return h(t),a(t<0?0:0|f(t))}function p(t){const e=t.length<0?0:0|f(t.length),r=a(e);for(let i=0;i=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function g(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(n)return i?-1:q(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function w(t,e,r){const i=t[e];t[e]=t[r],t[r]=i}function y(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=c.from(e,i)),c.isBuffer(e))return 0===e.length?-1:b(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){let s,o=1,a=t.length,c=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,c/=2,r/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){let i=-1;for(s=r;sa&&(r=a-c),s=r;s>=0;s--){let r=!0;for(let i=0;in&&(i=n):i=n;const s=e.length;let o;for(i>s/2&&(i=s/2),o=0;o>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function T(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const i=[];let n=e;for(;n239?4:e>223?3:e>191?2:1;if(n+o<=r){let r,i,a,c;switch(o){case 1:e<128&&(s=e);break;case 2:r=t[n+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(s=c));break;case 3:r=t[n+1],i=t[n+2],128==(192&r)&&128==(192&i)&&(c=(15&e)<<12|(63&r)<<6|63&i,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=t[n+1],i=t[n+2],a=t[n+3],128==(192&r)&&128==(192&i)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&i)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),n+=o}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",i=0;for(;ii.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(i,n)):Uint8Array.prototype.set.call(i,e,n);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,n)}n+=e.length}return i},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(t,e,r,i,n){if(Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;let s=(n>>>=0)-(i>>>=0),o=(r>>>=0)-(e>>>=0);const a=Math.min(s,o),l=this.slice(i,n),h=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return A(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function I(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;ni)&&(r=i);let n="";for(let i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,i,n,s){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function P(t,e,r,i,n){j(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function L(t,e,r,i,n){j(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s>>=8,t[r+6]=s,s>>=8,t[r+5]=s,s>>=8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function D(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,i,s){return e=+e,r>>>=0,s||D(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function M(t,e,r,i,s){return e=+e,r>>>=0,s||D(t,0,r,8),n.write(t,e,r,i,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||O(t,e,this.length);let i=this[t],n=1,s=0;for(;++s>>=0,e>>>=0,r||O(t,e,this.length);let i=this[t+--e],n=1;for(;e>0&&(n*=256);)i+=this[t+--e]*n;return i},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=Z((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,n=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(i)+(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],n=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(i)<>>=0,e>>>=0,r||O(t,e,this.length);let i=this[t],n=1,s=0;for(;++s=n&&(i-=Math.pow(2,8*e)),i},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let i=e,n=1,s=this[t+--i];for(;i>0&&(n*=256);)s+=this[t+--i]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*e)),s},c.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=Z((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<>>=0,e||O(t,4,this.length),n.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),n.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),n.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),n.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e>>>=0,r>>>=0,!i){B(this,t,e,r,Math.pow(2,8*r)-1,0)}let n=1,s=0;for(this[e]=255&t;++s>>=0,r>>>=0,!i){B(this,t,e,r,Math.pow(2,8*r)-1,0)}let n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=Z((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}let n=0,s=1,o=0;for(this[e]=255&t;++n>0)-o&255;return e+r},c.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}let n=r-1,s=1,o=0;for(this[e+n]=255&t;--n>=0&&(s*=256);)t<0&&0===o&&0!==this[e+n+1]&&(o=1),this[e+n]=(t/s>>0)-o&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=Z((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,i){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(n=e;n=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function j(t,e,r,i,n,s){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(s+1)}${i}`:`>= -(2${i} ** ${8*(s+1)-1}${i}) and < 2 ** ${8*(s+1)-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new F.ERR_OUT_OF_RANGE("value",n,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||G(e,t.length-(r+1))}(i,n,s)}function V(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function G(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}H("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),H("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),H("ERR_OUT_OF_RANGE",(function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=W(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=W(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const i=t.length;let n=null;const s=[];for(let o=0;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function Q(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,i){let n;for(n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e}();function Z(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},7187:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,i){function n(r){t.removeListener(e,s),i(r)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}g(t,e,s,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,n,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r,i){var n,s,o,l;if(a(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),void 0===o)o=s[e]=r,++t._eventsCount;else if("function"==typeof o?o=s[e]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=c(t))>0&&o.length>n&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,l=h,console&&console.warn&&console.warn(l)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function p(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var l=c.length,h=f(c,l);for(r=0;r=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},6932:(t,e,r)=>{"use strict";const i=r(8501),n=r(8844),s=r(1192);t.exports={XMLParser:n,XMLValidator:i,XMLBuilder:s}},7849:(t,e)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,r){if(e){const i=Object.keys(e),n=i.length;for(let s=0;s{"use strict";const i=r(7849),n={allowBooleanAttributes:!1,unpairedTags:[]};function s(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function o(t,e){const r=e;for(;e5&&"xml"===i)return p("InvalidXml","XML declaration allowed only at the start of the document.",f(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let r=1;for(e+=8;e"===t[e]&&(r--,0===r))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},n,e);const r=[];let l=!1,d=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let n=0;n"!==t[n]&&" "!==t[n]&&"\t"!==t[n]&&"\n"!==t[n]&&"\r"!==t[n];n++)y+=t[n];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),n--),g=y,!i.isName(g)){let e;return e=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",p("InvalidTag",e,f(t,n))}const b=c(t,n);if(!1===b)return p("InvalidAttr","Attributes for '"+y+"' have open quote.",f(t,n));let A=b.value;if(n=b.index,"/"===A[A.length-1]){const r=n-A.length;A=A.substring(0,A.length-1);const i=h(A,e);if(!0!==i)return p(i.err.code,i.err.msg,f(t,r+i.err.line));l=!0}else if(w){if(!b.tagClosed)return p("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",f(t,n));if(A.trim().length>0)return p("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",f(t,m));if(0===r.length)return p("InvalidTag","Closing tag '"+y+"' has not been opened.",f(t,m));{const e=r.pop();if(y!==e.tagName){let r=f(t,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+y+"'.",f(t,m))}0==r.length&&(d=!0)}}else{const i=h(A,e);if(!0!==i)return p(i.err.code,i.err.msg,f(t,n-A.length+i.err.line));if(!0===d)return p("InvalidXml","Multiple possible root nodes found.",f(t,n));-1!==e.unpairedTags.indexOf(y)||r.push({tagName:y,tagStartPos:m}),l=!0}for(n++;n0)||p("InvalidXml","Invalid '"+JSON.stringify(r.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};function c(t,e){let r="",i="",n=!1;for(;e"===t[e]&&""===i){n=!0;break}r+=t[e]}return""===i&&{value:r,index:e,tagClosed:n}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function h(t,e){const r=i.getAllMatches(t,l),n={};for(let t=0;t{"use strict";const i=r(2592),n={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(t){this.options=Object.assign({},n,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(t,e,r){const i=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function a(t){return this.options.indentBy.repeat(t)}function c(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}s.prototype.build=function(t){return this.options.preserveOrder?i(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},s.prototype.j2x=function(t,e){let r="",i="";for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n))if(void 0===t[n])this.isAttribute(n)&&(i+="");else if(null===t[n])this.isAttribute(n)?i+="":"?"===n[0]?i+=this.indentate(e)+"<"+n+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+n+"/"+this.tagEndChar;else if(t[n]instanceof Date)i+=this.buildTextValNode(t[n],n,"",e);else if("object"!=typeof t[n]){const s=this.isAttribute(n);if(s)r+=this.buildAttrPairStr(s,""+t[n]);else if(n===this.options.textNodeName){let e=this.options.tagValueProcessor(n,""+t[n]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[n],n,"",e)}else if(Array.isArray(t[n])){const r=t[n].length;let s="",o="";for(let a=0;a"+t+n}},s.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+r+">"+n+"0&&this.options.processEntities)for(let e=0;e{function e(t,o,a,c){let l="",h=!1;for(let u=0;u`,h=!1;continue}if(d===o.commentPropName){l+=c+`\x3c!--${p[d][0][o.textNodeName]}--\x3e`,h=!0;continue}if("?"===d[0]){const t=i(p[":@"],o),e="?xml"===d?"":c;let r=p[d][0][o.textNodeName];r=0!==r.length?" "+r:"",l+=e+`<${d}${r}${t}?>`,h=!0;continue}let g=c;""!==g&&(g+=o.indentBy);const m=c+`<${d}${i(p[":@"],o)}`,w=e(p[d],o,f,g);-1!==o.unpairedTags.indexOf(d)?o.suppressUnpairedNode?l+=m+">":l+=m+"/>":w&&0!==w.length||!o.suppressEmptyNode?w&&w.endsWith(">")?l+=m+`>${w}${c}`:(l+=m+">",w&&""!==c&&(w.includes("/>")||w.includes("`):l+=m+"/>",h=!0}return l}function r(t){const e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r0&&(i="\n"),e(t,r,"",i)}},4780:(t,e,r)=>{const i=r(7849);function n(t,e){let r="";for(;e"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,i--):i--,0===i)break}else"["===t[e]?u=!0:d+=t[e];else{if(u&&o(t,e))e+=7,[entityName,val,e]=n(t,e+1),-1===val.indexOf("&")&&(r[h(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(u&&a(t,e))e+=8;else if(u&&c(t,e))e+=8;else if(u&&l(t,e))e+=9;else{if(!s)throw new Error("Invalid DOCTYPE");p=!0}i++,d=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}}},6745:(t,e)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};e.buildOptions=function(t){return Object.assign({},r,t)},e.defaultOptions=r},1078:(t,e,r)=>{"use strict";const i=r(7849),n=r(6311),s=r(4780),o=r(4153);function a(t){const e=Object.keys(t);for(let r=0;r0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,r,n,s);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return A(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?A(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function l(t){if(this.options.removeNSPrefix){const e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}const h=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function u(t,e,r){if(!this.options.ignoreAttributes&&"string"==typeof t){const r=i.getAllMatches(t,h),n=r.length,s={};for(let t=0;t",a,"Closing Tag is not closed.");let n=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=n.indexOf(":");-1!==t&&(n=n.substr(t+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(i=this.saveTextToParentTag(i,r,o));const s=o.substring(o.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),i="",a=e}else if("?"===t[a+1]){let e=y(t,a,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,o),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new n(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(r,t,o)}a=e.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=w(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=t.substring(a+4,e-2);i=this.saveTextToParentTag(i,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=e}else if("!D"===t.substr(a+1,2)){const e=s(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=w(t,"]]>",a,"CDATA is not closed.")-2,n=t.substring(a+9,e);i=this.saveTextToParentTag(i,r,o);let s=this.parseTextData(n,r.tagname,o,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,s),a=e+2}else{let s=y(t,a,this.options.removeNSPrefix),c=s.tagName;const l=s.rawTagName;let h=s.tagExp,u=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,o,!1));const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==e.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let e="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),h=c):h=h.substr(0,h.length-1),a=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=s.closeIndex;else{const r=this.readStopNodeData(t,l,p+1);if(!r)throw new Error(`Unexpected end of ${l}`);a=r.i,e=r.tagContent}const i=new n(c);c!==h&&u&&(i[":@"]=this.buildAttributesMap(h,o,c)),e&&(e=this.parseTextData(e,c,o,!0,u,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(r,i,o)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),h=c):h=h.substr(0,h.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const t=new n(c);c!==h&&u&&(t[":@"]=this.buildAttributesMap(h,o,c)),this.addChild(r,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new n(c);this.tagsNodeStack.push(r),c!==h&&u&&(t[":@"]=this.buildAttributesMap(h,o,c)),this.addChild(r,t,o),r=t}i="",a=p}}else i+=t[a]}return e.child};function d(t,e,r){const i=this.options.updateTag(e.tagname,r,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const f=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,r,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function m(t,e,r){const i="*."+r;for(const r in t){const n=t[r];if(i===n||e===n)return!0}return!1}function w(t,e,r,i){const n=t.indexOf(e,r);if(-1===n)throw new Error(i);return n+e.length-1}function y(t,e,r,i=">"){const n=function(t,e,r=">"){let i,n="";for(let s=e;s",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(n--,0===n))return{tagContent:t.substring(i,r),i:s};r=s}else if("?"===t[r+1]){r=w(t,"?>",r+1,"StopNode is not closed.")}else if("!--"===t.substr(r+1,3)){r=w(t,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===t.substr(r+1,2)){r=w(t,"]]>",r,"StopNode is not closed.")-2}else{const i=y(t,r,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&n++,r=i.closeIndex}}}function A(t,e,r){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&o(t,r)}return i.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=l,this.buildAttributesMap=u,this.isItStopNode=m,this.replaceEntitiesValue=f,this.readStopNodeData=b,this.saveTextToParentTag=g,this.addChild=d}}},8844:(t,e,r)=>{const{buildOptions:i}=r(6745),n=r(1078),{prettify:s}=r(6997),o=r(8501);t.exports=class{constructor(t){this.externalEntities={},this.options=i(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const r=o.validate(t,e);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new n(this.options);r.addExternalEntities(this.externalEntities);const i=r.parseXml(t);return this.options.preserveOrder||void 0===i?i:s(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},6997:(t,e)=>{"use strict";function r(t,e,o){let a;const c={};for(let l=0;l0&&(c[e.textNodeName]=a):void 0!==a&&(c[e.textNodeName]=a),c}function i(t){const e=Object.keys(t);for(let t=0;t{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},2475:t=>{"use strict";var e=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,i=/\s|\uFEFF|\xA0/,n=/\r?\n[\x20\x09]+/g,s=/[;,"]/,o=/[;,"]|\s/,a=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,c=1,l=2,h=4;function u(t){return t.replace(r,"")}function p(t){return i.test(t)}function d(t,e){for(;p(t[e]);)e++;return e}function f(t){return o.test(t)||!a.test(t)}class g{constructor(t){this.refs=[],t&&this.parse(t)}rel(t){for(var e=[],r=t.toLowerCase(),i=0;i{return r=e,i=t,Object.keys(r).length===Object.keys(i).length&&Object.keys(r).every((t=>t in i&&r[t]===i[t]));var r,i}))||this.refs.push(t),this}has(t,e){t=t.toLowerCase(),e=e.toLowerCase();for(var r=0;r",e)))throw new Error("Expected end of URI delimiter at offset "+e);o={uri:t.slice(e+1,m)},e=m,r=l,e++}else if(r===l){if(p(t[e])){e++;continue}if(";"===t[e])r=h,e++;else{if(","!==t[e])throw new Error('Unexpected character "'+t[e]+'" at offset '+e);r=c,e++}}else{if(r!==h)throw new Error('Unknown parser state "'+r+'"');if(";"===t[e]||p(t[e])){e++;continue}-1===(m=t.indexOf("=",e))&&(m=t.indexOf(";",e)),-1===m&&(m=t.length);var a=u(t.slice(e,m)).toLowerCase(),f="";if('"'===t[e=d(t,e=m+1)])for(e++;e"),t.push(e);return t.join(", ")}}g.isCompatibleEncoding=function(t){return e.test(t)},g.parse=function(t,e){return(new g).parse(t,e)},g.isSingleOccurenceAttr=function(t){return"rel"===t||"type"===t||"media"===t||"title"===t||"title*"===t},g.isTokenAttr=function(t){return"rel"===t||"type"===t||"anchor"===t},g.escapeQuotes=function(t){return t.replace(/"/g,'\\"')},g.expandRelations=function(t){return t.rel.split(" ").map((function(e){var r=Object.assign({},t);return r.rel=e,r}))},g.parseExtendedValue=function(t){var e=/([^']+)?(?:'([^']*)')?(.+)/.exec(t);return{language:e[2].toLowerCase(),encoding:g.isCompatibleEncoding(e[1])?null:e[1].toLowerCase(),value:g.isCompatibleEncoding(e[1])?decodeURIComponent(e[3]):e[3]}},g.formatExtendedAttribute=function(t,e){var r=(e.encoding||"utf-8").toUpperCase();return t+"="+r+"'"+(e.language||"en")+"'"+(Buffer.isBuffer(e.value)&&g.isCompatibleEncoding(r)?e.value.toString(r):Buffer.isBuffer(e.value)?e.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(e.value))},g.formatAttribute=function(t,e){return Array.isArray(e)?e.map((e=>g.formatAttribute(t,e))).join("; "):"*"===t[t.length-1]||"string"!=typeof e?g.formatExtendedAttribute(t,e):(g.isTokenAttr(t)?e=f(e)?'"'+g.escapeQuotes(e)+'"':g.escapeQuotes(e):f(e)&&(e='"'+(e=(e=encodeURIComponent(e)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),t+"="+e)},t.exports=g},645:(t,e)=>{ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -e.read=function(t,e,r,i,n){var s,o,a=8*n-i-1,c=(1<>1,h=-7,u=r?n-1:0,p=r?-1:1,d=t[e+u];for(u+=p,s=d&(1<<-h)-1,d>>=-h,h+=a;h>0;s=256*s+t[e+u],u+=p,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=i;h>0;o=256*o+t[e+u],u+=p,h-=8);if(0===s)s=1-l;else{if(s===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),s-=l}return(d?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var o,a,c,l=8*s-n-1,h=(1<>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,f=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),(e+=o+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(o++,c/=2),o+u>=h?(a=0,o=h):o+u>=1?(a=(e*c-1)*Math.pow(2,n),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;t[r+d]=255&a,d+=f,a/=256,n-=8);for(o=o<0;t[r+d]=255&o,d+=f,o/=256,l-=8);t[r+d-f]|=128*g}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6512:function(t){!function(e){"use strict";const r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},n=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),o="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${r}\\.${r}\\.${r}\\.${r}(${o})?$`,"i")};function l(t,e){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let r,i,n=0,s=-1,o=(t.match(c.zoneIndex)||[])[0];for(o&&(o=o.substring(1),t=t.replace(/%.+$/,""));(s=t.indexOf(":",s+1))>=0;)n++;if("::"===t.substr(0,2)&&n--,"::"===t.substr(-2,2)&&n--,n>e)return null;for(i=e-n,r=":";i--;)r+="0:";return":"===(t=t.replace("::",r))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:e=function(){const e=t.split(":"),r=[];for(let t=0;t0;){if(n=r-i,n<0&&(n=0),t[s]>>n!=e[s]>>n)return!1;i-=r,s+=1}return!0}function u(t){if(s.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(n.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function p(t,e){for(;t.length=0;i-=1){if(n=this.octets[i],!(n in r))return null;if(s=r[n],e&&0!==s)return null;8!==s&&(e=!0),t+=s}return 32-t},t.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return d.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),d.IPv4.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),r=e[0].toByteArray(),i=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[];let s=0;for(;s<4;)n.push(parseInt(r[s],10)|255^parseInt(i[s],10)),s++;return new this(n)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.isIPv4=function(t){return null!==this.parser(t)},d.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},d.IPv4.isValidFourPartDecimal=function(t){return!(!d.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},d.IPv4.networkAddressFromCIDR=function(t){let e,r,i,n,s;try{for(e=this.parseCIDR(t),i=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[],r=0;r<4;)n.push(parseInt(i[r],10)&parseInt(s[r],10)),r++;return new this(n)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.parse=function(t){const e=this.parser(t);if(null===e)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(e)},d.IPv4.parseCIDR=function(t){let e;if(e=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(e[2]);if(t>=0&&t<=32){const r=[this.parse(e[1]),t];return Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},d.IPv4.parser=function(t){let e,r,n;if(e=t.match(i.fourOctet))return function(){const t=e.slice(1,6),i=[];for(let e=0;e4294967295||n<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let e;for(e=0;e<=24;e+=8)t.push(n>>e&255);return t}().reverse()}return(e=t.match(i.twoOctet))?function(){const t=e.slice(1,4),r=[];if(n=u(t[1]),n>16777215||n<0)throw new Error("ipaddr: address outside defined range");return r.push(u(t[0])),r.push(n>>16&255),r.push(n>>8&255),r.push(255&n),r}():(e=t.match(i.threeOctet))?function(){const t=e.slice(1,5),r=[];if(n=u(t[2]),n>65535||n<0)throw new Error("ipaddr: address outside defined range");return r.push(u(t[0])),r.push(u(t[1])),r.push(n>>8&255),r.push(255&n),r}():null},d.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const e=[0,0,0,0];let r=0;const i=Math.floor(t/8);for(;r=0;s-=1){if(i=this.parts[s],!(i in r))return null;if(n=r[i],e&&0!==n)return null;16!==n&&(e=!0),t+=n}return 128-t},t.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const e=[],r=this.parts;for(let i=0;i>8),e.push(255&t);return e},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let e=0;e>8,255&e,r>>8,255&r])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let e=0;en&&(i=r.index,n=r[0].length);return n<0?e:`${e.substring(0,i)}::${e.substring(i+n)}`},t.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},t}(),d.IPv6.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),r=e[0].toByteArray(),i=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[];let s=0;for(;s<16;)n.push(parseInt(r[s],10)|255^parseInt(i[s],10)),s++;return new this(n)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},d.IPv6.isIPv6=function(t){return null!==this.parser(t)},d.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const e=this.parser(t);return new this(e.parts,e.zoneId),!0}catch(t){return!1}},d.IPv6.networkAddressFromCIDR=function(t){let e,r,i,n,s;try{for(e=this.parseCIDR(t),i=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),n=[],r=0;r<16;)n.push(parseInt(i[r],10)&parseInt(s[r],10)),r++;return new this(n)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},d.IPv6.parse=function(t){const e=this.parser(t);if(null===e.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(e.parts,e.zoneId)},d.IPv6.parseCIDR=function(t){let e,r,i;if((r=t.match(/^(.+)\/(\d+)$/))&&(e=parseInt(r[2]),e>=0&&e<=128))return i=[this.parse(r[1]),e],Object.defineProperty(i,"toString",{value:function(){return this.join("/")}}),i;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},d.IPv6.parser=function(t){let e,r,i,n,s,o;if(i=t.match(c.deprecatedTransitional))return this.parser(`::ffff:${i[1]}`);if(c.native.test(t))return l(t,8);if((i=t.match(c.transitional))&&(o=i[6]||"",e=l(i[1].slice(0,-1)+o,6),e.parts)){for(s=[parseInt(i[2]),parseInt(i[3]),parseInt(i[4]),parseInt(i[5])],r=0;r128)throw new Error("ipaddr: invalid IPv6 prefix length");const e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let r=0;const i=Math.floor(t/8);for(;r{"use strict";t.exports=function(){function t(t,e,r,i,n){return tr?r+1:t+1:i===n?e:e+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var i=e;e=r,r=i}for(var n=e.length,s=r.length;n>0&&e.charCodeAt(n-1)===r.charCodeAt(s-1);)n--,s--;for(var o=0;o{"use strict";var i={};(0,r(4236).assign)(i,r(4555),r(8843),r(1619)),t.exports=i},4555:(t,e,r)=>{"use strict";var i=r(405),n=r(4236),s=r(9373),o=r(8898),a=r(2292),c=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=n.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(o[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var h;if(h="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=i.deflateSetDictionary(this.strm,h)))throw new Error(o[r]);this._dict_set=!0}}function h(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}l.prototype.push=function(t,e){var r,o,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===c.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new n.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=i.deflate(a,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===o?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),a.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=l,e.deflate=h,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,h(t,e)}},8843:(t,e,r)=>{"use strict";var i=r(7948),n=r(4236),s=r(9373),o=r(1619),a=r(8898),c=r(2292),l=r(2401),h=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new l,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=i.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(a[r])}function p(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(t,e){var r,a,c,l,u,p=this.strm,d=this.options.chunkSize,f=this.options.dictionary,g=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?p.input=s.binstring2buf(t):"[object ArrayBuffer]"===h.call(t)?p.input=new Uint8Array(t):p.input=t,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new n.Buf8(d),p.next_out=0,p.avail_out=d),(r=i.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(r=i.inflateSetDictionary(this.strm,f)),r===o.Z_BUF_ERROR&&!0===g&&(r=o.Z_OK,g=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&r!==o.Z_STREAM_END&&(0!==p.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=s.utf8border(p.output,p.next_out),l=p.next_out-c,u=s.buf2string(p.output,c),p.next_out=l,p.avail_out=d-l,l&&n.arraySet(p.output,p.output,c,l,0),this.onData(u)):this.onData(n.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((p.avail_in>0||0===p.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),p.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=u,e.inflate=p,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.ungzip=p},4236:(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s{"use strict";var i=r(4236),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function c(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",o=0;o>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},e.buf2binstring=function(t){return c(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r4)l[i++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;s>1&&r1?l[i++]=65533:n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|1023&n)}return c(l,i)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},6069:t=>{"use strict";t.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{s=s+(n=n+e[i++]|0)|0}while(--o);n%=65521,s%=65521}return n|s<<16|0}},1619:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,i,n){var s=e,o=n+i;t^=-1;for(var a=n;a>>8^s[255&(t^r[a])];return-1^t}},405:(t,e,r)=>{"use strict";var i,n=r(4236),s=r(342),o=r(6069),a=r(2869),c=r(8898),l=-2,h=258,u=262,p=103,d=113,f=666;function g(t,e){return t.msg=c[e],e}function m(t){return(t<<1)-(t>4?9:0)}function w(t){for(var e=t.length;--e>=0;)t[e]=0}function y(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function b(t,e){s._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,y(t.strm)}function A(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e){var r,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,c=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,l=t.window,p=t.w_mask,d=t.prev,f=t.strstart+h,g=l[s+o-1],m=l[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(l[(r=e)+o]===m&&l[r+o-1]===g&&l[r]===l[s]&&l[++r]===l[s+1]){s+=2,r++;do{}while(l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&so){if(t.match_start=e,o=i,i>=a)break;g=l[s+o-1],m=l[s+o]}}}while((e=d[e&p])>c&&0!=--n);return o<=t.lookahead?o:t.lookahead}function E(t){var e,r,i,s,c,l,h,p,d,f,g=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-u)){n.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=g?i-g:0}while(--r);e=r=g;do{i=t.prev[--e],t.prev[e]=i>=g?i-g:0}while(--r);s+=g}if(0===t.strm.avail_in)break;if(l=t.strm,h=t.window,p=t.strstart+t.lookahead,d=s,f=void 0,(f=l.avail_in)>d&&(f=d),r=0===f?0:(l.avail_in-=f,n.arraySet(h,l.input,l.next_in,f,p),1===l.state.wrap?l.adler=o(l.adler,h,f,p):2===l.state.wrap&&(l.adler=a(l.adler,h,f,p)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=r,t.lookahead+t.insert>=3)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<15&&(a=2,i-=16),s<1||s>9||8!==r||i<8||i>15||e<0||e>9||o<0||o>4)return g(t,l);8===i&&(i=9);var c=new C;return t.state=c,c.strm=t,c.wrap=a,c.gzhead=null,c.w_bits=i,c.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(E(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,b(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(b(t,!1),t.strm.avail_out),1)})),new x(4,4,8,4,S),new x(4,5,16,8,S),new x(4,6,32,32,S),new x(4,4,16,16,T),new x(8,16,32,32,T),new x(8,16,128,128,T),new x(8,32,128,256,T),new x(32,128,258,1024,T),new x(32,258,258,4096,T)],e.deflateInit=function(t,e){return k(t,e,8,15,8,0)},e.deflateInit2=k,e.deflateReset=R,e.deflateResetKeep=I,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,0):l},e.deflate=function(t,e){var r,n,o,c;if(!t||!t.state||e>5||e<0)return t?g(t,l):l;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===f&&4!==e)return g(t,0===t.avail_out?-5:l);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,A(n,31),A(n,139),A(n,8),n.gzhead?(A(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),A(n,255&n.gzhead.time),A(n,n.gzhead.time>>8&255),A(n,n.gzhead.time>>16&255),A(n,n.gzhead.time>>24&255),A(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),A(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(A(n,255&n.gzhead.extra.length),A(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(A(n,0),A(n,0),A(n,0),A(n,0),A(n,0),A(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),A(n,3),n.status=d);else{var u=8+(n.w_bits-8<<4)<<8;u|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(u|=32),u+=31-u%31,n.status=d,v(n,u),0!==n.strstart&&(v(n,t.adler>>>16),v(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending!==n.pending_buf_size));)A(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===c&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===c&&(n.status=p)}else n.status=p;if(n.status===p&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&y(t),n.pending+2<=n.pending_buf_size&&(A(n,255&t.adler),A(n,t.adler>>8&255),t.adler=0,n.status=d)):n.status=d),0!==n.pending){if(y(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&m(e)<=m(r)&&4!==e)return g(t,-5);if(n.status===f&&0!==t.avail_in)return g(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==f){var _=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(E(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(b(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,i,n,o,a=t.window;;){if(t.lookahead<=h){if(E(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){o=t.strstart+h;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(b(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if(3!==_&&4!==_||(n.status=f),1===_||3===_)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===_&&(1===e?s._tr_align(n):5!==e&&(s._tr_stored_block(n,0,0,!1),3===e&&(w(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),y(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(A(n,255&t.adler),A(n,t.adler>>8&255),A(n,t.adler>>16&255),A(n,t.adler>>24&255),A(n,255&t.total_in),A(n,t.total_in>>8&255),A(n,t.total_in>>16&255),A(n,t.total_in>>24&255)):(v(n,t.adler>>>16),v(n,65535&t.adler)),y(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==p&&e!==d&&e!==f?g(t,l):(t.state=null,e===d?g(t,-3):0):l},e.deflateSetDictionary=function(t,e){var r,i,s,a,c,h,u,p,d=e.length;if(!t||!t.state)return l;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return l;for(1===a&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(w(r.head),r.strstart=0,r.block_start=0,r.insert=0),p=new n.Buf8(r.w_size),n.arraySet(p,e,d-r.w_size,r.w_size,0),e=p,d=r.w_size),c=t.avail_in,h=t.next_in,u=t.input,t.avail_in=d,t.next_in=0,t.input=e,E(r);r.lookahead>=3;){i=r.strstart,s=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:t=>{"use strict";t.exports=function(t,e){var r,i,n,s,o,a,c,l,h,u,p,d,f,g,m,w,y,b,A,v,_,E,S,T,x;r=t.state,i=t.next_in,T=t.input,n=i+(t.avail_in-5),s=t.next_out,x=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),c=r.dmax,l=r.wsize,h=r.whave,u=r.wnext,p=r.window,d=r.hold,f=r.bits,g=r.lencode,m=r.distcode,w=(1<>>=A=b>>>24,f-=A,0===(A=b>>>16&255))x[s++]=65535&b;else{if(!(16&A)){if(0==(64&A)){b=g[(65535&b)+(d&(1<>>=A,f-=A),f<15&&(d+=T[i++]<>>=A=b>>>24,f-=A,!(16&(A=b>>>16&255))){if(0==(64&A)){b=m[(65535&b)+(d&(1<c){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=A,f-=A,_>(A=s-o)){if((A=_-A)>h&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,S=p,0===u){if(E+=l-A,A2;)x[s++]=S[E++],x[s++]=S[E++],x[s++]=S[E++],v-=3;v&&(x[s++]=S[E++],v>1&&(x[s++]=S[E++]))}else{E=s-_;do{x[s++]=x[E++],x[s++]=x[E++],x[s++]=x[E++],v-=3}while(v>2);v&&(x[s++]=x[E++],v>1&&(x[s++]=x[E++]))}break}}break}}while(i>3,d&=(1<<(f-=v<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i{"use strict";var i=r(4236),n=r(6069),s=r(2869),o=r(4264),a=r(9241),c=-2,l=12,h=30;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):c}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):c}function g(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?c:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,f(t))):c}function m(t,e){var r,i;return t?(i=new p,t.state=i,i.window=null,0!==(r=g(t,e))&&(t.state=null),r):c}var w,y,b=!0;function A(t){if(b){var e;for(w=new i.Buf32(512),y=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,w,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,y,0,t.work,{bits:5}),b=!1}t.lencode=w,t.lenbits=9,t.distcode=y,t.distbits=5}function v(t,e,r,n){var s,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((s=o.wsize-o.wnext)>n&&(s=n),i.arraySet(o.window,e,r-n,s,o.wnext),(n-=s)?(i.arraySet(o.window,e,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=s(r.check,M,2,0),y=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=h;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=h;break}if(b-=4,B=8+(15&(y>>>=4)),0===r.wbits)r.wbits=B;else if(B>r.wbits){t.msg="invalid window size",r.mode=h;break}r.dmax=1<>8&1),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=s(r.check,M,2,0)),y=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===m)break t;m--,y+=p[f++]<>>8&255,M[2]=y>>>16&255,M[3]=y>>>24&255,r.check=s(r.check,M,4,0)),y=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===m)break t;m--,y+=p[f++]<>8),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=s(r.check,M,2,0)),y=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===m)break t;m--,y+=p[f++]<>>8&255,r.check=s(r.check,M,2,0)),y=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>m&&(S=m),S&&(r.head&&(B=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,p,f,S,B)),512&r.flags&&(r.check=s(r.check,p,S,f)),m-=S,f+=S,r.length-=S),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break t;S=0;do{B=p[f+S++],r.head&&B&&r.length<65536&&(r.head.name+=String.fromCharCode(B))}while(B&&S>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=l;break;case 10:for(;b<32;){if(0===m)break t;m--,y+=p[f++]<>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===m)break t;m--,y+=p[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(A(r),r.mode=20,6===e){y>>>=2,b-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=h}y>>>=2,b-=2;break;case 14:for(y>>>=7&b,b-=7&b;b<32;){if(0===m)break t;m--,y+=p[f++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=h;break}if(r.length=65535&y,y=0,b=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(S=r.length){if(S>m&&(S=m),S>w&&(S=w),0===S)break t;i.arraySet(d,p,f,S,g),m-=S,f+=S,w-=S,g+=S,r.length-=S;break}r.mode=l;break;case 17:for(;b<14;){if(0===m)break t;m--,y+=p[f++]<>>=5,b-=5,r.ndist=1+(31&y),y>>>=5,b-=5,r.ncode=4+(15&y),y>>>=4,b-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=h;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,b-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},P=a(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,P){t.msg="invalid code lengths set",r.mode=h;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&U,!((C=U>>>24)<=b);){if(0===m)break t;m--,y+=p[f++]<>>=C,b-=C,r.lens[r.have++]=R;else{if(16===R){for(D=C+2;b>>=C,b-=C,0===r.have){t.msg="invalid bit length repeat",r.mode=h;break}B=r.lens[r.have-1],S=3+(3&y),y>>>=2,b-=2}else if(17===R){for(D=C+3;b>>=C)),y>>>=3,b-=3}else{for(D=C+7;b>>=C)),y>>>=7,b-=7}if(r.have+S>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=h;break}for(;S--;)r.lens[r.have++]=B}}if(r.mode===h)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=h;break}if(r.lenbits=9,L={bits:r.lenbits},P=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,P){t.msg="invalid literal/lengths set",r.mode=h;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},P=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,P){t.msg="invalid distances set",r.mode=h;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(m>=6&&w>=258){t.next_out=g,t.avail_out=w,t.next_in=f,t.avail_in=m,r.hold=y,r.bits=b,o(t,E),g=t.next_out,d=t.output,w=t.avail_out,f=t.next_in,p=t.input,m=t.avail_in,y=r.hold,b=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;I=(U=r.lencode[y&(1<>>16&255,R=65535&U,!((C=U>>>24)<=b);){if(0===m)break t;m--,y+=p[f++]<>k)])>>>16&255,R=65535&U,!(k+(C=U>>>24)<=b);){if(0===m)break t;m--,y+=p[f++]<>>=k,b-=k,r.back+=k}if(y>>>=C,b-=C,r.back+=C,r.length=R,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=l;break}if(64&I){t.msg="invalid literal/length code",r.mode=h;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(D=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;I=(U=r.distcode[y&(1<>>16&255,R=65535&U,!((C=U>>>24)<=b);){if(0===m)break t;m--,y+=p[f++]<>k)])>>>16&255,R=65535&U,!(k+(C=U>>>24)<=b);){if(0===m)break t;m--,y+=p[f++]<>>=k,b-=k,r.back+=k}if(y>>>=C,b-=C,r.back+=C,64&I){t.msg="invalid distance code",r.mode=h;break}r.offset=R,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(D=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=h;break}r.mode=25;case 25:if(0===w)break t;if(S=E-w,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=h;break}S>r.wnext?(S-=r.wnext,T=r.wsize-S):T=r.wnext-S,S>r.length&&(S=r.length),x=r.window}else x=d,T=g-r.offset,S=r.length;S>w&&(S=w),w-=S,r.length-=S;do{d[g++]=x[T++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===w)break t;d[g++]=r.length,w--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===m)break t;m--,y|=p[f++]<{"use strict";var i=r(4236),n=15,s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,h,u,p,d){var f,g,m,w,y,b,A,v,_,E=d.bits,S=0,T=0,x=0,C=0,I=0,R=0,k=0,N=0,O=0,B=0,P=null,L=0,D=new i.Buf16(16),U=new i.Buf16(16),M=null,F=0;for(S=0;S<=n;S++)D[S]=0;for(T=0;T=1&&0===D[C];C--);if(I>C&&(I=C),0===C)return h[u++]=20971520,h[u++]=20971520,d.bits=1,0;for(x=1;x0&&(0===t||1!==C))return-1;for(U[1]=0,S=1;S852||2===t&&O>592)return 1;for(;;){A=S-k,p[T]b?(v=M[F+p[T]],_=P[L+p[T]]):(v=96,_=0),f=1<>k)+(g-=f)]=A<<24|v<<16|_|0}while(0!==g);for(f=1<>=1;if(0!==f?(B&=f-1,B+=f):B=0,T++,0==--D[S]){if(S===C)break;S=e[r+p[T]]}if(S>I&&(B&w)!==m){for(0===k&&(k=I),y+=x,N=1<<(R=S-k);R+k852||2===t&&O>592)return 1;h[m=B&w]=I<<24|R<<16|y-u|0}}return 0!==B&&(h[y+B]=S-k<<24|64<<16|0),d.bits=I,0}},8898:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(t,e,r)=>{"use strict";var i=r(4236);function n(t){for(var e=t.length;--e>=0;)t[e]=0}var s=256,o=286,a=30,c=15,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);n(d);var f=new Array(60);n(f);var g=new Array(512);n(g);var m=new Array(256);n(m);var w=new Array(29);n(w);var y,b,A,v=new Array(a);function _(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function E(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?g[t]:g[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function x(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function R(t,e,r){var i,n,s=new Array(16),o=0;for(i=1;i<=c;i++)s[i]=o=o+r[i-1]<<1;for(n=0;n<=e;n++){var a=t[2*n+1];0!==a&&(t[2*n]=I(s[a]++,a))}}function k(t){var e;for(e=0;e8?T(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function O(t,e,r,i){var n=2*e,s=2*r;return t[n]>1;r>=1;r--)B(t,s,r);n=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],B(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,B(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,o,a,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,p=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(s=0;s<=c;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(s=l[2*l[2*(i=t.heap[r])+1]+1]+1)>g&&(s=g,m++),l[2*i+1]=s,i>h||(t.bl_count[s]++,o=0,i>=f&&(o=d[i-f]),a=l[2*i],t.opt_len+=a*(s+o),p&&(t.static_len+=a*(u[2*i+1]+o)));if(0!==m){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,m-=2}while(m>0);for(s=g;0!==s;s--)for(i=t.bl_count[s];0!==i;)(n=t.heap[--r])>h||(l[2*n+1]!==s&&(t.opt_len+=(s-l[2*n+1])*l[2*n],l[2*n+1]=s),i--)}}(t,e),R(s,h,t.bl_count)}function D(t,e,r){var i,n,s=-1,o=e[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++a>=7;i0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*p[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=r+5,r+4<=n&&-1!==e?F(t,e,r,i):4===t.strategy||o===n?(x(t,2+(i?1:0),3),P(t,d,f)):(x(t,4+(i?1:0),3),function(t,e,r,i){var n;for(x(t,e-257,5),x(t,r-1,5),x(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(m[r]+s+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),C(t,256,d),function(t){16===t.bi_valid?(T(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},2292:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4155:t=>{var e,r,i=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,c=[],l=!1,h=-1;function u(){l&&a&&(l=!1,a.length?c=a.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=o(u);l=!0;for(var e=c.length;e;){for(a=c,c=[];++h1)for(var r=1;r{"use strict";class r{static isArrayBuffer(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t).slice().buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,e){if(t.constructor===e)return t;if(this.isArrayBuffer(t))return new e(t);if(this.isArrayBufferView(t))return new e(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,e){const i=r.toUint8Array(t),n=r.toUint8Array(e);if(i.length!==n.byteLength)return!1;for(let t=0;tt.byteLength)).reduce(((t,e)=>t+e)),r=new Uint8Array(e);let i=0;return t.map((t=>new Uint8Array(t))).forEach((t=>{for(const e of t)r[i++]=e})),r.buffer},e.Xy=function(t,e){if(!t||!e)return!1;if(t.byteLength!==e.byteLength)return!1;const r=new Uint8Array(t),i=new Uint8Array(e);for(let e=0;e{"use strict";r.d(e,{Z:()=>i});const i="/**\n * Mini wombat for performing URL rewriting within the\n * Web/Shared/Service Worker context\n * @param {Object} info\n * @return {WBWombat}\n */\nfunction WBWombat(info) {\n if (!(this instanceof WBWombat)) return new WBWombat(info);\n /** @type {Object} */\n this.info = info;\n this.initImportScriptsRewrite();\n this.initHTTPOverrides();\n this.initClientApisOverride();\n this.initCacheApisOverride();\n}\n\n/**\n * Returns T/F indicating if the supplied URL is not to be rewritten\n * @param {string} url\n * @return {boolean}\n */\nWBWombat.prototype.noRewrite = function(url) {\n return (\n !url ||\n url.indexOf('blob:') === 0 ||\n url.indexOf('javascript:') === 0 ||\n url.indexOf('data:') === 0 ||\n url.indexOf(this.info.prefix) === 0\n );\n};\n\n/**\n * Returns T/F indicating if the supplied URL is an relative URL\n * @param {string} url\n * @return {boolean}\n */\nWBWombat.prototype.isRelURL = function(url) {\n return url.indexOf('/') === 0 || url.indexOf('http:') !== 0;\n};\n\n/**\n * Attempts to resolve the supplied relative URL against\n * the origin this worker was created on\n * @param {string} maybeRelURL\n * @param {string} against\n * @return {string}\n */\nWBWombat.prototype.maybeResolveURL = function(maybeRelURL, against) {\n if (!against) return maybeRelURL;\n try {\n var resolved = new URL(maybeRelURL, against);\n return resolved.href;\n } catch (e) {}\n return maybeRelURL;\n};\n\n/**\n * Returns null to indicate that the supplied URL is not to be rewritten.\n * Otherwise returns a URL that can be rewritten\n * @param {*} url\n * @param {string} resolveAgainst\n * @return {?string}\n */\nWBWombat.prototype.ensureURL = function(url, resolveAgainst) {\n if (!url) return url;\n var newURL;\n switch (typeof url) {\n case 'string':\n newURL = url;\n break;\n case 'object':\n newURL = url.toString();\n break;\n default:\n return null;\n }\n if (this.noRewrite(newURL)) return null;\n if (this.isRelURL(newURL)) {\n return this.maybeResolveURL(newURL, resolveAgainst);\n }\n\n // if url starts with current origin, but not properly rewritten, rewrite against current baseUr\n if (newURL.indexOf(self.location.origin) === 0) {\n return this.maybeResolveURL(newURL.slice(self.location.origin.length), resolveAgainst);\n }\n return newURL;\n};\n\n/**\n * Rewrites the supplied URL\n * @param {string} url\n * @return {string}\n */\nWBWombat.prototype.rewriteURL = function(url) {\n var rwURL = this.ensureURL(url, this.info.originalURL);\n if (!rwURL) return url;\n if (this.info.prefixMod) {\n return this.info.prefixMod + rwURL;\n }\n return rwURL;\n};\n\n/**\n * Rewrites the supplied URL of an controlled page using the mp\\_ modifier\n * @param {string} url\n * @param {WindowClient} [client]\n * @return {string}\n */\nWBWombat.prototype.rewriteClientWindowURL = function(url, client) {\n var rwURL = this.ensureURL(url, client ? client.url : this.info.originalURL);\n if (!rwURL) return url;\n if (this.info.prefix) {\n return this.info.prefix + 'mp_/' + rwURL;\n }\n return rwURL;\n};\n\n/**\n * Mini url rewriter specifically for rewriting web sockets\n * @param {?string} originalURL\n * @return {string}\n */\nWBWombat.prototype.rewriteWSURL = function(originalURL) {\n // If undefined, just return it\n if (!originalURL) return originalURL;\n\n var urltype_ = typeof originalURL;\n var url = originalURL;\n\n // If object, use toString\n if (urltype_ === 'object') {\n url = originalURL.toString();\n } else if (urltype_ !== 'string') {\n return originalURL;\n }\n\n // empty string check\n if (!url) return url;\n\n var wsScheme = 'ws://';\n var wssScheme = 'wss://';\n var https = 'https://';\n\n var wbSecure = this.info.prefix.indexOf(https) === 0;\n var wbPrefix =\n this.info.prefix.replace(\n wbSecure ? https : 'http://',\n wbSecure ? wssScheme : wsScheme\n ) + 'ws_/';\n return wbPrefix + url;\n};\n\n/**\n * Rewrites all URLs in the supplied arguments object\n * @param {Object} argsObj\n * @return {Array}\n */\nWBWombat.prototype.rewriteArgs = function(argsObj) {\n // recreate the original arguments object just with URLs rewritten\n var newArgObj = new Array(argsObj.length);\n for (var i = 0; i < newArgObj.length; i++) {\n newArgObj[i] = this.rewriteURL(argsObj[i]);\n }\n return newArgObj;\n};\n\n/**\n * Rewrites the input to one of the Fetch APIs\n * @param {*|string|Request} input\n * @return {*|string|Request}\n */\nWBWombat.prototype.rewriteFetchApi = function(input) {\n var rwInput = input;\n switch (typeof input) {\n case 'string':\n rwInput = this.rewriteURL(input);\n break;\n case 'object':\n if (input.url) {\n var new_url = this.rewriteURL(input.url);\n if (new_url !== input.url) {\n // not much we can do here Request.url is read only\n // https://developer.mozilla.org/en-US/docs/Web/API/Request/url\n rwInput = new Request(new_url, input);\n }\n } else if (input.href) {\n // it is likely that input is either self.location or self.URL\n // we cant do anything here so just let it go\n rwInput = input.href;\n }\n break;\n }\n return rwInput;\n};\n\n/**\n * Rewrites the input to one of the Cache APIs\n * @param {*|string|Request} request\n * @return {*|string|Request}\n */\nWBWombat.prototype.rewriteCacheApi = function(request) {\n var rwRequest = request;\n if (typeof request === 'string') {\n rwRequest = this.rewriteURL(request);\n }\n return rwRequest;\n};\n\n/**\n * Applies an override to the importScripts function\n * @see https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts\n */\nWBWombat.prototype.initImportScriptsRewrite = function() {\n if (!self.importScripts) return;\n var wombat = this;\n var origImportScripts = self.importScripts;\n self.importScripts = function importScripts() {\n // rewrite the arguments object and call original function via fn.apply\n var rwArgs = wombat.rewriteArgs(arguments);\n return origImportScripts.apply(this, rwArgs);\n };\n};\n\n/**\n * Applies overrides to the XMLHttpRequest.open and XMLHttpRequest.responseURL\n * in order to ensure URLs are rewritten.\n *\n * Applies an override to window.fetch in order to rewrite URLs and URLs of\n * the supplied Request objects used as arguments to fetch.\n *\n * Applies overrides to window.Request, window.Response, window.EventSource,\n * and window.WebSocket in order to ensure URLs they operate on are rewritten.\n *\n * @see https://xhr.spec.whatwg.org/\n * @see https://fetch.spec.whatwg.org/\n * @see https://html.spec.whatwg.org/multipage/web-sockets.html#websocket\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\nWBWombat.prototype.initHTTPOverrides = function() {\n var wombat = this;\n if (\n self.XMLHttpRequest &&\n self.XMLHttpRequest.prototype &&\n self.XMLHttpRequest.prototype.open\n ) {\n var oXHROpen = self.XMLHttpRequest.prototype.open;\n self.XMLHttpRequest.prototype.open = function open(\n method,\n url,\n async,\n user,\n password\n ) {\n var rwURL = wombat.rewriteURL(url);\n var openAsync = true;\n if (async != null && !async) openAsync = false;\n oXHROpen.call(this, method, rwURL, openAsync, user, password);\n if (rwURL.indexOf('data:') === -1) {\n this.setRequestHeader('X-Pywb-Requested-With', 'XMLHttpRequest');\n }\n };\n }\n\n if (self.fetch != null) {\n // this fetch is Worker.fetch\n var orig_fetch = self.fetch;\n self.fetch = function fetch(input, init_opts) {\n var rwInput = wombat.rewriteFetchApi(input);\n var newInitOpts = init_opts || {};\n newInitOpts['credentials'] = 'include';\n return orig_fetch.call(this, rwInput, newInitOpts);\n };\n }\n\n if (self.Request && self.Request.prototype) {\n var orig_request = self.Request;\n self.Request = (function(Request_) {\n return function Request(input, init_opts) {\n var newInitOpts = init_opts || {};\n var newInput = wombat.rewriteFetchApi(input);\n newInitOpts['credentials'] = 'include';\n return new Request_(newInput, newInitOpts);\n };\n })(self.Request);\n self.Request.prototype = orig_request.prototype;\n }\n\n if (self.Response && self.Response.prototype) {\n var originalRedirect = self.Response.prototype.redirect;\n self.Response.prototype.redirect = function redirect(url, status) {\n var rwURL = wombat.rewriteUrl(url);\n return originalRedirect.call(this, rwURL, status);\n };\n }\n\n if (self.EventSource && self.EventSource.prototype) {\n var origEventSource = self.EventSource;\n self.EventSource = (function(EventSource_) {\n return function EventSource(url, configuration) {\n var rwURL = url;\n if (url != null) {\n rwURL = wombat.rewriteUrl(url);\n }\n return new EventSource_(rwURL, configuration);\n };\n })(self.EventSource);\n self.EventSource.prototype = origEventSource.prototype;\n Object.defineProperty(self.EventSource.prototype, 'constructor', {\n value: self.EventSource\n });\n }\n\n if (self.WebSocket && self.WebSocket.prototype) {\n var origWebSocket = self.WebSocket;\n self.WebSocket = (function(WebSocket_) {\n return function WebSocket(url, configuration) {\n var rwURL = url;\n if (url != null) {\n rwURL = wombat.rewriteWSURL(url);\n }\n return new WebSocket_(rwURL, configuration);\n };\n })(self.WebSocket);\n self.WebSocket.prototype = origWebSocket.prototype;\n Object.defineProperty(self.WebSocket.prototype, 'constructor', {\n value: self.WebSocket\n });\n }\n};\n\n/**\n * Applies an override to Clients.openWindow and WindowClient.navigate that rewrites\n * the supplied URL that represents a controlled window\n * @see https://w3c.github.io/ServiceWorker/#window-client-interface\n * @see https://w3c.github.io/ServiceWorker/#clients-interface\n */\nWBWombat.prototype.initClientApisOverride = function() {\n var wombat = this;\n if (\n self.Clients &&\n self.Clients.prototype &&\n self.Clients.prototype.openWindow\n ) {\n var oClientsOpenWindow = self.Clients.prototype.openWindow;\n self.Clients.prototype.openWindow = function openWindow(url) {\n var rwURL = wombat.rewriteClientWindowURL(url);\n return oClientsOpenWindow.call(this, rwURL);\n };\n }\n\n if (\n self.WindowClient &&\n self.WindowClient.prototype &&\n self.WindowClient.prototype.navigate\n ) {\n var oWinClientNavigate = self.WindowClient.prototype.navigate;\n self.WindowClient.prototype.navigate = function navigate(url) {\n var rwURL = wombat.rewriteClientWindowURL(url, this);\n return oWinClientNavigate.call(this, rwURL);\n };\n }\n};\n\n/**\n * Applies overrides to the CacheStorage and Cache interfaces in order\n * to rewrite the URLs they operate on\n * @see https://w3c.github.io/ServiceWorker/#cachestorage\n * @see https://w3c.github.io/ServiceWorker/#cache-interface\n */\nWBWombat.prototype.initCacheApisOverride = function() {\n var wombat = this;\n if (\n self.CacheStorage &&\n self.CacheStorage.prototype &&\n self.CacheStorage.prototype.match\n ) {\n var oCacheStorageMatch = self.CacheStorage.prototype.match;\n self.CacheStorage.prototype.match = function match(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheStorageMatch.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache && self.Cache.prototype) {\n if (self.Cache.prototype.match) {\n var oCacheMatch = self.Cache.prototype.match;\n self.Cache.prototype.match = function match(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheMatch.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.matchAll) {\n var oCacheMatchAll = self.Cache.prototype.matchAll;\n self.Cache.prototype.matchAll = function matchAll(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheMatchAll.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.add) {\n var oCacheAdd = self.Cache.prototype.add;\n self.Cache.prototype.add = function add(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheAdd.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.addAll) {\n var oCacheAddAll = self.Cache.prototype.addAll;\n self.Cache.prototype.addAll = function addAll(requests) {\n var rwRequests = requests;\n if (Array.isArray(requests)) {\n rwRequests = new Array(requests.length);\n for (var i = 0; i < requests.length; i++) {\n rwRequests[i] = wombat.rewriteCacheApi(requests[i]);\n }\n }\n return oCacheAddAll.call(this, rwRequests);\n };\n }\n\n if (self.Cache.prototype.put) {\n var oCachePut = self.Cache.prototype.put;\n self.Cache.prototype.put = function put(request, response) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCachePut.call(this, rwRequest, response);\n };\n }\n\n if (self.Cache.prototype.delete) {\n var oCacheDelete = self.Cache.prototype.delete;\n self.Cache.prototype.delete = function newCacheDelete(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheDelete.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.keys) {\n var oCacheKeys = self.Cache.prototype.keys;\n self.Cache.prototype.keys = function keys(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheKeys.call(this, rwRequest, options);\n };\n }\n }\n};\n\nself.WBWombat = WBWombat;\n"},4281:t=>{"use strict";var e={};function r(t,r,i){i||(i=Error);var n=function(t){var e,i;function n(e,i,n){return t.call(this,function(t,e,i){return"string"==typeof r?r:r(t,e,i)}(e,i,n))||this}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n}(i);n.prototype.name=i.name,n.prototype.code=t,e[t]=n}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,s,o,a;if("string"==typeof e&&(s="not ",e.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var c=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(c," ").concat(n," ").concat(i(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,r)=>{"use strict";var i=r(4155),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var s=r(9481),o=r(4229);r(5717)(h,s);for(var a=n(o.prototype),c=0;c{"use strict";t.exports=n;var i=r(4605);function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}r(5717)(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},9481:(t,e,r)=>{"use strict";var i,n=r(4155);t.exports=T,T.ReadableState=S;r(7187).EventEmitter;var s=function(t,e){return t.listeners(e).length},o=r(2503),a=r(8764).Buffer,c=r.g.Uint8Array||function(){};var l,h=r(4616);l=h&&h.debuglog?h.debuglog("stream"):function(){};var u,p,d,f=r(7327),g=r(1195),m=r(2457).getHighWaterMark,w=r(4281).q,y=w.ERR_INVALID_ARG_TYPE,b=w.ERR_STREAM_PUSH_AFTER_EOF,A=w.ERR_METHOD_NOT_IMPLEMENTED,v=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(T,o);var _=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(6753),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",n),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=r(2553).s),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(6753),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function x(t,e,r,i,n){l("readableAddChunk",e);var s,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(l("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,N(t)))}(t,o);else if(n||(s=function(t,e){var r;i=e,a.isBuffer(i)||i instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var i;return r}(o,e)),s)_(t,s);else if(o.objectMode||e&&e.length>0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),i)o.endEmitted?_(t,new v):C(t,o,e,!0);else if(o.ended)_(t,new b);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?C(t,o,e,!1):O(t,o)):C(t,o,e,!1)}else i||(o.reading=!1,O(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=I?t=I:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(N,t))}function N(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,U(t)}function O(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(B,t,e))}function B(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){l("readable nexttick read 0"),t.read(0)}function D(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),U(t),e.flowing&&!e.reading&&t.read(0)}function U(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(H,e,t))}function H(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function W(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):k(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&F(this),null;var i,n=e.needReadable;return l("need readable",n),(0===e.length||e.length-t0?M(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==i&&this.emit("data",i),i},T.prototype._read=function(t){_(this,new A("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:m;function a(e,n){l("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",f),t.removeListener("finish",g),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",p),u=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){l("onend"),t.end()}i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",a);var h=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,U(t))}}(r);t.on("drain",h);var u=!1;function p(e){l("ondata");var n=t.write(e);l("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==W(i.pipes,t))&&!u&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){l("onerror",e),m(),t.removeListener("error",d),0===s(t,"error")&&_(t,e)}function f(){t.removeListener("finish",g),m()}function g(){l("onfinish"),t.removeListener("close",f),m()}function m(){l("unpipe"),r.unpipe(t)}return r.on("data",p),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",f),t.once("finish",g),t.emit("pipe",r),i.flowing||(l("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(L,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(P,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(D,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(l("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s{"use strict";t.exports=h;var i=r(4281).q,n=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,o=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,c=r(6753);function l(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";var i,n=r(4155);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=T,T.WritableState=S;var o={deprecate:r(4927)},a=r(2503),c=r(8764).Buffer,l=r.g.Uint8Array||function(){};var h,u=r(1195),p=r(2457).getHighWaterMark,d=r(4281).q,f=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,w=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,A=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;function E(){}function S(t,e,o){i=i||r(6753),t=t||{},"boolean"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,s=r.writecb;if("function"!=typeof s)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,s){--e.pendingcb,r?(n.nextTick(s,i),n.nextTick(N,t,e),t._writableState.errorEmitted=!0,_(t,i)):(s(i),t._writableState.errorEmitted=!0,_(t,i),N(t,e))}(t,r,i,e,s);else{var o=R(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||I(t,r),i?n.nextTick(C,t,r,o,s):C(t,r,o,s)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function T(t){var e=this instanceof(i=i||r(6753));if(!e&&!h.call(T,this))return new T(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function x(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function C(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),N(t,e)}function I(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)n[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;n.allBuffers=c,x(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,u=r.callback;if(x(t,e,!1,e.objectMode?1:l.length,l,h,u),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),N(t,e)}))}function N(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5717)(T,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===T&&(t&&t._writableState instanceof S)}})):h=function(t){return t instanceof this},T.prototype.pipe=function(){_(this,new w)},T.prototype.write=function(t,e,r){var i,s=this._writableState,o=!1,a=!s.objectMode&&(i=t,c.isBuffer(i)||i instanceof l);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof r&&(r=E),s.ending?function(t,e){var r=new A;_(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var s;return null===r?s=new b:"string"==typeof r||e.objectMode||(s=new f("chunk",["string","Buffer"],r)),!s||(_(t,s),n.nextTick(i,s),!1)}(this,s,t,r))&&(s.pendingcb++,o=function(t,e,r,i,n,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,N(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=u.destroy,T.prototype._undestroy=u.undestroy,T.prototype._destroy=function(t,e){e(t)}},5850:(t,e,r)=>{"use strict";var i,n=r(4155);function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(8610),a=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),u=Symbol("lastPromise"),p=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function g(t){var e=t[a];if(null!==e){var r=t[d].read();null!==r&&(t[u]=null,t[a]=null,t[c]=null,e(f(r,!1)))}}function m(t){n.nextTick(g,t)}var w=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((s(i={get stream(){return this[d]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){n.nextTick((function(){t[l]?r(t[l]):e(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(function(t,e){return function(r,i){t.then((function(){e[h]?r(f(void 0,!0)):e[p](r,i)}),i)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));r=new Promise(this[p])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),s(i,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(f(void 0,!0))}))}))})),i),w);t.exports=function(t){var e,r=Object.create(y,(s(e={},d,{value:t,writable:!0}),s(e,a,{value:null,writable:!0}),s(e,c,{value:null,writable:!0}),s(e,l,{value:null,writable:!0}),s(e,h,{value:t._readableState.endEmitted,writable:!0}),s(e,p,{value:function(t,e){var i=r[d].read();i?(r[u]=null,r[a]=null,r[c]=null,t(f(i,!1))):(r[a]=t,r[c]=e)},writable:!0}),e));return r[u]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[c];return null!==e&&(r[u]=null,r[a]=null,r[c]=null,e(t)),void(r[l]=t)}var i=r[a];null!==i&&(r[u]=null,r[a]=null,r[c]=null,i(f(void 0,!0))),r[h]=!0})),t.on("readable",m.bind(null,r)),r}},7327:(t,e,r)=>{"use strict";function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,i,n=o.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=n,i=a,o.prototype.copy.call(e,r,i),a+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(s===n.length?i+=n:i+=n.slice(0,t),0==(t-=s)){s===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,e}},{key:c,value:function(t,e){return a(this,function(t){for(var e=1;e{"use strict";var i=r(4155);function n(t,e){o(t,e),s(t)}function s(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(o,this,t)):i.nextTick(o,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?i.nextTick(s,r):(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e?(i.nextTick(s,r),e(t)):i.nextTick(s,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,r)=>{"use strict";var i=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,r,s){if("function"==typeof r)return t(e,null,r);r||(r={}),s=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,r)=>{"use strict";var i;var n=r(4281).q,s=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function c(t,e,n,s){s=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),void 0===i&&(i=r(8610)),i(t,{readable:e,writable:n},(function(t){if(t)return s(t);a=!0,s()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}function l(t){t()}function h(t,e){return t.pipe(e)}function u(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r0,(function(t){i||(i=t),t&&o.forEach(l),s||(o.forEach(l),n(i))}))}));return e.reduce(h)}},2457:(t,e,r)=>{"use strict";var i=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,n){var s=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,n,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new i(n?r:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}},2503:(t,e,r)=>{t.exports=r(7187).EventEmitter},8660:(t,e,r)=>{var i,n=r(4155); -/*! ***************************************************************************** -Copyright (C) Microsoft. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */!function(t){!function(e){var i="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=o(t);function o(t,e){return function(r,i){"function"!=typeof t[r]&&Object.defineProperty(t,r,{configurable:!0,writable:!0,value:i}),e&&e(r,i)}}void 0===i.Reflect?i.Reflect=t:s=o(i.Reflect,s),function(t){var e=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,l={create:o?function(){return nt(Object.create(null))}:a?function(){return nt({__proto__:null})}:function(){return nt({})},has:c?function(t,r){return e.call(t,r)}:function(t,e){return e in t},get:c?function(t,r){return e.call(t,r)?t[r]:void 0}:function(t,e){return t[e]}},h=Object.getPrototypeOf(Function),u="object"==typeof n&&n.env&&"true"===n.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=u||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?et():Map,d=u||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?rt():Set,f=new(u||"function"!=typeof WeakMap?it():WeakMap);function g(t,e,r,i){if(D(r)){if(!z(t))throw new TypeError;if(!Q(e))throw new TypeError;return T(t,e)}if(!z(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(i)&&!D(i)&&!U(i))throw new TypeError;return U(i)&&(i=void 0),x(t,e,r=G(r),i)}function m(t,e){function r(r,i){if(!F(r))throw new TypeError;if(!D(i)&&!K(i))throw new TypeError;O(t,e,r,i)}return r}function w(t,e,r,i){if(!F(r))throw new TypeError;return D(i)||(i=G(i)),O(t,e,r,i)}function y(t,e,r){if(!F(e))throw new TypeError;return D(r)||(r=G(r)),I(t,e,r)}function b(t,e,r){if(!F(e))throw new TypeError;return D(r)||(r=G(r)),R(t,e,r)}function A(t,e,r){if(!F(e))throw new TypeError;return D(r)||(r=G(r)),k(t,e,r)}function v(t,e,r){if(!F(e))throw new TypeError;return D(r)||(r=G(r)),N(t,e,r)}function _(t,e){if(!F(t))throw new TypeError;return D(e)||(e=G(e)),B(t,e)}function E(t,e){if(!F(t))throw new TypeError;return D(e)||(e=G(e)),P(t,e)}function S(t,e,r){if(!F(e))throw new TypeError;D(r)||(r=G(r));var i=C(e,r,!1);if(D(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var n=f.get(e);return n.delete(r),n.size>0||f.delete(e),!0}function T(t,e){for(var r=t.length-1;r>=0;--r){var i=(0,t[r])(e);if(!D(i)&&!U(i)){if(!Q(i))throw new TypeError;e=i}}return e}function x(t,e,r,i){for(var n=t.length-1;n>=0;--n){var s=(0,t[n])(e,r,i);if(!D(s)&&!U(s)){if(!F(s))throw new TypeError;i=s}}return i}function C(t,e,r){var i=f.get(t);if(D(i)){if(!r)return;i=new p,f.set(t,i)}var n=i.get(e);if(D(n)){if(!r)return;n=new p,i.set(e,n)}return n}function I(t,e,r){if(R(t,e,r))return!0;var i=tt(e);return!U(i)&&I(t,i,r)}function R(t,e,r){var i=C(e,r,!1);return!D(i)&&j(i.has(t))}function k(t,e,r){if(R(t,e,r))return N(t,e,r);var i=tt(e);return U(i)?void 0:k(t,i,r)}function N(t,e,r){var i=C(e,r,!1);if(!D(i))return i.get(t)}function O(t,e,r,i){C(r,i,!0).set(t,e)}function B(t,e){var r=P(t,e),i=tt(t);if(null===i)return r;var n=B(i,e);if(n.length<=0)return r;if(r.length<=0)return n;for(var s=new d,o=[],a=0,c=r;a=0&&t=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n{ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var i=r(8764),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=o),o.prototype=Object.create(n.prototype),s(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2830:(t,e,r)=>{t.exports=n;var i=r(7187).EventEmitter;function n(){i.call(this)}r(5717)(n,i),n.Readable=r(9481),n.Writable=r(4229),n.Duplex=r(6753),n.Transform=r(4605),n.PassThrough=r(2725),n.finished=r(8610),n.pipeline=r(9946),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",s),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",c));var o=!1;function a(){o||(o=!0,t.end())}function c(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(h(),0===i.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",n),t.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",l),t.on("error",l),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},2553:(t,e,r)=>{"use strict";var i=r(9509).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=u,e=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function u(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},4153:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,n={}){if(n=Object.assign({},i,n),!t||"string"!=typeof t)return t;let s=t.trim();if(void 0!==n.skipLike&&n.skipLike.test(s))return t;if(n.hex&&e.test(s))return Number.parseInt(s,16);{const e=r.exec(s);if(e){const r=e[1],i=e[2];let o=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t;return t}(e[3]);const a=e[4]||e[6];if(!n.leadingZeros&&i.length>0&&r&&"."!==s[2])return t;if(!n.leadingZeros&&i.length>0&&!r&&"."!==s[1])return t;{const e=Number(s),c=""+e;return-1!==c.search(/[eE]/)||a?n.eNotation?e:t:-1!==s.indexOf(".")?"0"===c&&""===o||c===o||r&&c==="-"+o?e:t:i?o===c||r+o===c?e:t:s===c||s===r+c?e:t}}return t}}},4927:(t,e,r)=>{function i(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},2043:(t,e,r)=>{"use strict";!function(){var e,i,n,s=0,o=[];for(i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);function a(){var t,r=(t=16,(!e||s+t>c.BUFFER_SIZE)&&(s=0,e=c.randomBytes(c.BUFFER_SIZE)),e.slice(s,s+=t));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,r}function c(){var t=a();return o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){e=null,s=0},c.test=function(t){return"string"==typeof t&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},"undefined"!=typeof crypto?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||r(9061),t.exports=c,c.randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){var e=new Uint8Array(t);return n.getRandomValues(e),Array.from(e)}:function(t){var e=new Uint8Array(t);return n.getRandomValues(e),e}}return function(t){var e,r=[];for(e=0;e{},4616:()=>{},9061:()=>{}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,r),s.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};r.r(t),r.d(t,{Any:()=>qh,BaseBlock:()=>cl,BaseStringBlock:()=>hl,BitString:()=>oh,BmpString:()=>Ch,Boolean:()=>rh,CharacterString:()=>Mh,Choice:()=>Qh,Constructed:()=>Xl,DATE:()=>Wh,DateTime:()=>Vh,Duration:()=>Gh,EndOfContent:()=>$l,Enumerated:()=>ph,GeneralString:()=>Uh,GeneralizedTime:()=>Hh,GraphicString:()=>Lh,HexBlock:()=>rl,IA5String:()=>Ph,Integer:()=>uh,Null:()=>th,NumericString:()=>kh,ObjectIdentifier:()=>gh,OctetString:()=>nh,Primitive:()=>Ql,PrintableString:()=>Nh,RawData:()=>Yh,RelativeObjectIdentifier:()=>yh,Repeated:()=>Kh,Sequence:()=>bh,Set:()=>Ah,TIME:()=>zh,TeletexString:()=>Oh,TimeOfDay:()=>jh,UTCTime:()=>Fh,UniversalString:()=>Rh,Utf8String:()=>Th,ValueBlock:()=>nl,VideotexString:()=>Bh,ViewWriter:()=>zc,VisibleString:()=>Dh,compareSchema:()=>Jh,fromBER:()=>Yl,verifySchema:()=>Xh});var e=r(2475),i={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy"};function n(t){var e=i[t.toString()];if(!e)throw new Error("Status code does not exist: "+t);return e}const s=25e6,o=262144,a="___wb_replay_top_frame",c=/Expires=\w{3},\s\d[^;,]+(?:;\s*)?/gi;function l(t,e){for(const r of e)if(t.startsWith(r))return!0;return!1}function h(t){return t.replace(/[-:T]/g,"").slice(0,14)}function u(t){if(!t)return new Date;t.length<17&&(t+="00000101000000000".substr(t.length));const e=t.substring(0,4)+"-"+t.substring(4,6)+"-"+t.substring(6,8)+"T"+t.substring(8,10)+":"+t.substring(10,12)+":"+t.substring(12,14)+"."+t.substring(14)+"Z";return new Date(e)}function p(t){return Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")}async function d(t,e,r=null){const i="string"==typeof t?(new TextEncoder).encode(t):t,n=await crypto.subtle.digest(e,i);return""===r?p(n):(r||e)+":"+p(n)}function f(t){let e="";for(let r=0;rsetTimeout(e,t)))}var k,N=r(7709),O=r(8843),B=r(9591),P=r(2043); -/*! - * hash-wasm (https://www.npmjs.com/package/hash-wasm) - * (c) Dani Biro - * @license MIT - */ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -function L(t,e,r,i){return new(r||(r=Promise))((function(n,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))}class D{constructor(){this.mutex=Promise.resolve()}lock(){let t=()=>{};return this.mutex=this.mutex.then((()=>new Promise(t))),new Promise((e=>{t=e}))}dispatch(t){return L(this,void 0,void 0,(function*(){const e=yield this.lock();try{return yield Promise.resolve(t())}finally{e()}}))}}const U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,M=null!==(k=U.Buffer)&&void 0!==k?k:null,F=U.TextEncoder?new U.TextEncoder:null;function H(t,e){return(15&t)+(t>>6|t>>3&8)<<4|(15&e)+(e>>6|e>>3&8)}function W(t,e){const r=e.length>>1;for(let i=0;i>>4;t[i++]=r>9?r+j:r+V,r=15&e[n],t[i++]=r>9?r+j:r+V}return String.fromCharCode.apply(null,t)}const z=null!==M?t=>{if("string"==typeof t){const e=M.from(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.length)}if(M.isBuffer(t))return new Uint8Array(t.buffer,t.byteOffset,t.length);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Invalid data type!")}:t=>{if("string"==typeof t)return F.encode(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Invalid data type!")},q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q=new Uint8Array(256);for(let t=0;t>4,n+=1,i[n]=(15&s)<<4|o>>2,n+=1,i[n]=(3&o)<<6|63&a,n+=1}return i}const J=16384,X=new D,Z=new Map;function $(t,e){return L(this,void 0,void 0,(function*(){let r=null,i=null,n=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const s=()=>new DataView(r.exports.memory.buffer).getUint32(r.exports.STATE_SIZE,!0),o=X.dispatch((()=>L(this,void 0,void 0,(function*(){if(!Z.has(t.name)){const e=Y(t.data),r=WebAssembly.compile(e);Z.set(t.name,r)}const e=yield Z.get(t.name);r=yield WebAssembly.instantiate(e,{})})))),a=(t=null)=>{n=!0,r.exports.Hash_Init(t)},c=t=>{if(!n)throw new Error("update() called before init()");(t=>{let e=0;for(;e{if(!n)throw new Error("digest() called before init()");return n=!1,r.exports.Hash_Final(s),"binary"===t?i.slice(0,e):G(l,i,e)},u=t=>"string"==typeof t?t.length<4096:t.byteLength!0;break;case"blake2b":case"blake2s":p=(t,e)=>e<=512&&u(t);break;case"blake3":p=(t,e)=>0===e&&u(t);break;case"xxhash64":case"xxhash3":case"xxhash128":p=()=>!1}return yield(()=>L(this,void 0,void 0,(function*(){r||(yield o);const t=r.exports.Hash_GetBuffer(),e=r.exports.memory.buffer;i=new Uint8Array(e,t,J)})))(),{getMemory:()=>i,writeMemory:(t,e=0)=>{i.set(t,e)},getExports:()=>r.exports,setMemorySize:t=>{r.exports.Hash_SetMemorySize(t);const e=r.exports.Hash_GetBuffer(),n=r.exports.memory.buffer;i=new Uint8Array(n,e,t)},init:a,update:c,digest:h,save:()=>{if(!n)throw new Error("save() can only be called after init() and before digest()");const e=r.exports.Hash_GetState(),i=s(),o=r.exports.memory.buffer,a=new Uint8Array(o,e,i),c=new Uint8Array(4+i);return W(c,t.hash),c.set(a,4),c},load:e=>{if(!(e instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const i=r.exports.Hash_GetState(),o=s(),a=4+o,c=r.exports.memory.buffer;if(e.length!==a)throw new Error(`Bad state length (expected ${a} bytes, got ${e.length})`);if(!function(t,e){if(t.length!==2*e.length)return!1;for(let r=0;r{if(!p(t,n))return a(n),c(t),h("hex",s);const o=z(t);return i.set(o),r.exports.Hash_Calculate(o.length,n,s),G(l,i,e)},hashLength:e}}))}new D;new D;new DataView(new ArrayBuffer(4));new D;new D;new D;new D;new D;new D;new D;new D;new D;var tt={name:"sha256",data:"AGFzbQEAAAABEQRgAAF/YAF/AGACf38AYAAAAwgHAAEBAgMAAgQFAXABAQEFBAEBAgIGDgJ/AUHwiQULfwBBgAgLB3AIBm1lbW9yeQIADkhhc2hfR2V0QnVmZmVyAAAJSGFzaF9Jbml0AAELSGFzaF9VcGRhdGUAAgpIYXNoX0ZpbmFsAAQNSGFzaF9HZXRTdGF0ZQAFDkhhc2hfQ2FsY3VsYXRlAAYKU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kGA/gNxIAFBGHZycjYCzIkBQQBBACgCyIkBIgFBGHQgAUEIdEGAgPwHcXIgAUEIdkGA/gNxIAFBGHZyciIBNgLIiQECQEEAKALoiQEiBEUNAEEAIAE6AIAJIARBAUYNACABQQh2IQNBASEBQQEhAgNAIAFBgAlqIAM6AAAgBCACQQFqIgJB/wFxIgFNDQEgAUHIiQFqLQAAIQMMAAsLCwYAQYCJAQujAQBBAEIANwPAiQFBAEEcQSAgAUHgAUYiARs2AuiJAUEAQqef5qfG9JP9vn9Cq7OP/JGjs/DbACABGzcD4IkBQQBCsZaA/p+ihazoAEL/pLmIxZHagpt/IAEbNwPYiQFBAEKXusODk6eWh3dC8ua746On/aelfyABGzcD0IkBQQBC2L2WiPygtb42QufMp9DW0Ouzu38gARs3A8iJASAAEAIQBAsLCwEAQYAICwRwAAAA",hash:"817d957e"};new D;new D;function et(){return $(tt,32).then((t=>{t.init(256);const e={init:()=>(t.init(256),e),update:r=>(t.update(r),e),digest:e=>t.digest(e),save:()=>t.save(),load:r=>(t.load(r),e),blockSize:64,digestSize:32};return e}))}new D;new D;new D;new D;new ArrayBuffer(8);new D;new ArrayBuffer(8);new D;new ArrayBuffer(8);new D;new D;new D;function rt(t){let e;e="string"==typeof t?t:t?.length?t.reduce(((t,e)=>t+=String.fromCharCode(e)),""):t?t.toString():"";try{return"__wb_post_data="+btoa(e)}catch{return"__wb_post_data="}}function it(t){try{if(!t.startsWith("https:")&&!t.startsWith("http:"))return t;let e=(t=t.replace(/^(https?:\/\/)www\d*\./,"$1")).toLowerCase(),r=new URL(e),i=r.hostname.split(".").reverse().join(",");if(r.port&&(i+=":"+r.port),i+=")",i+=r.pathname,r.search){let t=r.search.slice(1).split("&");t.sort(),i+="?"+t.join("&")}return i}catch{return t}}function nt(t){let{method:e,headers:r,postData:i=""}=t;if("GET"===e)return!1;function n(t){return t instanceof Uint8Array&&(t=(new TextDecoder).decode(t)),t}let s="";switch((r.get("content-type")||"").split(";")[0]){case"application/x-www-form-urlencoded":s=n(i);break;case"application/json":s=at(n(i));break;case"text/plain":try{s=at(n(i),!1)}catch{s=rt(i)}break;case"multipart/form-data":{let t=r.get("content-type");if(!t)throw new Error("utils cannot call postToGetURL when missing content-type header");s=function(t,e){return function(t="",e){let r=new URLSearchParams;t instanceof Uint8Array&&(t=(new TextDecoder).decode(t));try{let i=e.split("boundary=")[1],n=t.split(new RegExp("-*"+i+"-*","mi"));for(let t of n){let e=t.trim().match(/name="([^"]+)"\r\n\r\n(.*)/im);e&&r.set(e[1],e[2])}}catch{}return r}(t,e).toString()}(n(i),t);break}default:s=rt(i)}return null!=s&&(t.url=st(t.url,decodeURI(s),t.method),t.method="GET",t.requestBody=s,!0)}function st(t,e,r){if(!r)return t;let i=t.indexOf("?")>0?"&":"?";return`${t}${i}__wb_method=${r}&${e}`}function ot(t,e=!0){if("string"==typeof t)try{t=JSON.parse(t)}catch{t={}}let r=new URLSearchParams,i={},n=(t,e="")=>{let s="";if("object"!=typeof t||t instanceof Array){if(t instanceof Array)for(let r=0;rr.has(t)?(t in i||(i[t]=1),t+"."+ ++i[t]+"_"):t)(e),s)};try{n(t)}catch(t){if(!e)throw t}return r}function at(t="",e=!0){return ot(t,e).toString()}function ct(t,e){if(1===t.length)return t[0];let r=new Uint8Array(e),i=0;for(let e of t)r.set(e,i),i+=e.byteLength;return r}function lt(t,e){return[t.slice(0,e),t.slice(e)]}var ht=new TextDecoder("utf-8"),ut=class extends B.Inflate{constructor(t,e){super(t),this.ended=!1,this.chunks=[],this.reader=e}onEnd(t){this.err=t,this.err||(this.reader._rawOffset+=this.strm.total_in)}},pt=class t{static async readFully(t){let e=[],r=0;for await(let i of t)e.push(i),r+=i.byteLength;return ct(e,r)}getReadableStream(){let t=this[Symbol.asyncIterator]();return new ReadableStream({pull:async e=>t.next().then((t=>{t.done||!t.value?e.close():e.enqueue(t.value)}))})}async readFully(){return await t.readFully(this)}async readline(t=0){let e=await this.readlineRaw(t);return e?ht.decode(e):""}async*iterLines(t=0){let e=null;for(;e=await this.readline(t);)yield e}};var dt=class t extends pt{constructor(e,r="gzip",i=!1){let n;if(super(),this.compressed=r,this.opts={raw:"deflateRaw"===r},this.inflator=r?new ut(this.opts,this):null,function(t){return!(!t||!(Symbol.asyncIterator in Object(t)))}(e))n=e;else if("object"==typeof e&&"read"in e&&"function"==typeof e.read)n=t.fromReadable(e);else if(e instanceof ReadableStream)n=t.fromReadable(e.getReader());else{if(!function(t){return!(!t||!(Symbol.iterator in Object(t)))}(e))throw new TypeError("Invalid Stream Source");n=t.fromIter(e)}this._sourceIter=i?this.dechunk(n):n[Symbol.asyncIterator](),this.lastValue=null,this.errored=!1,this._savedChunk=null,this._rawOffset=0,this._readOffset=0,this.numChunks=0}async _loadNext(){let t=await this._sourceIter.next();return t.done?null:t.value}async*dechunk(e){let r=e instanceof t?e:new t(e,null),i=-1,n=!0;for(;0!=i;){let t=await r.readlineRaw(64),e=new Uint8Array;if(i=t?parseInt(ht.decode(t),16):0,!i||i>2**32){if(Number.isNaN(i)||i>2**32){n||(this.errored=!0),yield t;break}}else if(e=await r.readSize(i),e.length!=i){n?yield t:this.errored=!0,yield e;break}let s=await r.readSize(2);if(13!=s[0]||10!=s[1]){n?yield t:this.errored=!0,yield e,yield s;break}if(n=!1,!e||0===i)return;yield e}yield*r}unread(t){t.length&&(this._readOffset-=t.length,this._savedChunk&&console.log("Already have chunk!"),this._savedChunk=t)}async _next(){if(this._savedChunk){let t=this._savedChunk;return this._savedChunk=null,t}if(this.compressed){let t=this._getNextChunk();if(t)return t}let t=await this._loadNext();for(;this.compressed&&t;){this._push(t);let e=this._getNextChunk(t);if(e)return e;t=await this._loadNext()}return t}_push(t){if(!this.inflator)throw new Error("AsyncIterReader cannot call _push when this.compressed is null");this.lastValue=t,this.inflator.ended&&(this.inflator=new ut(this.opts,this)),this.inflator.push(t),this.inflator.err&&this.inflator.ended&&"deflate"===this.compressed&&!this.opts.raw&&0===this.numChunks&&(this.opts.raw=!0,this.compressed="deflateRaw",this.inflator=new ut(this.opts,this),this.inflator.push(t))}_getNextChunk(t){if(!this.inflator)throw new Error("AsyncIterReader cannot call _getNextChunk when this.compressed is null");for(;;){if(this.inflator.chunks.length>0)return this.numChunks++,this.inflator.chunks.shift();if(this.inflator.ended){if(0!==this.inflator.err)return this.compressed=null,t;let e=this.inflator.strm.avail_in;if(e&&this.lastValue){this._push(this.lastValue.slice(-e));continue}}return null}}async*[Symbol.asyncIterator](){let t=null;for(;t=await this._next();)this._readOffset+=t.length,yield t}async readlineRaw(t){let e=[],r=0,i=-1,n=null;for await(let s of this){if(t&&r+s.byteLength>t){n=s,i=t-r-1;let e=s.slice(0,i+1).indexOf(10);e>=0&&(i=e);break}if(i=s.indexOf(10),i>=0){n=s;break}e.push(s),r+=s.byteLength}if(n){let[t,s]=lt(n,i+1);e.push(t),r+=t.byteLength,this.unread(s)}else if(!e.length)return null;return ct(e,r)}async readFully(){return(await this._readOrSkip())[1]}async readSize(t){return(await this._readOrSkip(t))[1]}async skipSize(t){return(await this._readOrSkip(t,!0))[0]}async _readOrSkip(t=-1,e=!1){let r=[],i=0;for await(let n of this){if(t>=0){if(n.length>t){let[s,o]=lt(n,t);e||r.push(s),i+=s.byteLength,this.unread(o);break}if(n.length===t){e||r.push(n),i+=n.byteLength,t=0;break}t-=n.length}e||r.push(n),i+=n.byteLength}return e?[i,new Uint8Array]:[i,ct(r,i)]}getReadOffset(){return this._readOffset}getRawOffset(){return this.compressed?this._rawOffset:this._readOffset}getRawLength(t){return this.compressed?this.inflator.strm.total_in:this._readOffset-t}static fromReadable(t){return{async*[Symbol.asyncIterator](){let e=null;for(;(e=await t.read())&&!e.done;)yield e.value}}}static fromIter(t){return{async*[Symbol.asyncIterator](){for(let e of t)yield e}}}},ft=class extends pt{constructor(t,e,r=0){super(),this.sourceIter=t,this.length=e,this.limit=e,this.skip=r}setLimitSkip(t,e=0){this.limit=t,this.skip=e}async*[Symbol.asyncIterator](){if(!(this.limit<=0))for await(let t of this.sourceIter){if(this.skip>0){if(!(t.length>=this.skip)){this.skip-=t.length;continue}{let[,e]=lt(t,this.skip);t=e,this.skip=0}}if(t.length>this.limit){let[e,r]=lt(t,this.limit);t=e,this.sourceIter.unread&&this.sourceIter.unread(r)}if(t.length&&(this.limit-=t.length,yield t),this.limit<=0)break}}async readlineRaw(t){if(this.limit<=0)return null;let e=await this.sourceIter.readlineRaw(t?Math.min(t,this.limit):this.limit);return this.limit-=e?.length||0,e}async skipFully(){let t=this.limit;for(;this.limit>0;)this.limit-=await this.sourceIter.skipSize(this.limit);return t}},gt=new Uint8Array([13,10]),mt=new Uint8Array([13,10,13,10]),wt=new TextDecoder("utf-8"),yt=class{constructor({statusline:t,headers:e}){this.statusline=t,this.headers=e}toString(){let t=[this.statusline];for(let[e,r]of this.headers)t.push(`${e}: ${r}`);return t.join("\r\n")+"\r\n"}async*iterSerialize(t){yield t.encode(this.statusline),yield gt;for(let[e,r]of this.headers)yield t.encode(`${e}: ${r}\r\n`)}_parseResponseStatusLine(){let t=function(t,e,r){let i=t.split(e),n=i.slice(0,r);return i.slice(r).length>0&&n.push(i.slice(r).join(e)),n}(this.statusline," ",2);this._protocol=t[0]??"",this._statusCode=t.length>1?Number(t[1]):"",this._statusText=t.length>2?t[2]:""}get statusCode(){return void 0===this._statusCode&&this._parseResponseStatusLine(),this._statusCode}get protocol(){return void 0===this._protocol&&this._parseResponseStatusLine(),this._protocol}get statusText(){return void 0===this._statusText&&this._parseResponseStatusLine(),this._statusText}_parseRequestStatusLine(){let t=this.statusline.split(" ",2);this._method=t[0]??"",this._requestPath=t.length>1?t[1]:""}get method(){return void 0===this._method&&this._parseRequestStatusLine(),this._method}get requestPath(){return void 0===this._requestPath&&this._parseRequestStatusLine(),this._requestPath}};async function bt(t,e){let r=0;for(let i=0;i=t.length){let{value:r}=await e.next();if(!r)break;let i=new Uint8Array(r.length+t.length);i.set(t,0),i.set(r,t.length),t=i}if(10===t[i+1]&&13===t[i+2]&&10===t[i+3])return[i+3,t];r=i+1}return[-1,t]}var At=new TextDecoder("utf-8"),vt=new TextEncoder,_t="WARC/1.0",Et={warcinfo:"application/warc-fields",response:"application/http; msgtype=response",revisit:"application/http; msgtype=response",request:"application/http; msgtype=request",metadata:"application/warc-fields"},St=class t extends pt{constructor({warcHeaders:t,reader:e}){super(),this._offset=0,this._length=0,this.method="",this.requestBody="",this._urlkey="",this.warcHeaders=t,this._reader=e,this._contentReader=null,this.payload=null,this.httpHeaders=null,this.consumed="",this.fixUp()}static create({url:e,date:r,type:i,warcHeaders:n={},filename:s="",httpHeaders:o={},statusline:a="HTTP/1.1 200 OK",warcVersion:c=_t,keepHeadersCase:l=!0,refersToUrl:h,refersToDate:u}={},p){function d(t){let e=t;return c===_t&&("Z"!=(t=t.split(".")[0]).charAt(e.length-1)&&(t+="Z")),t}if(r=d(r||(new Date).toISOString()),n={...n},"warcinfo"===i)s&&(n["WARC-Filename"]=s);else if(e)try{n["WARC-Target-URI"]=new URL(e).href}catch{n["WARC-Target-URI"]=e}n["WARC-Date"]=r,i&&(n["WARC-Type"]=i),"revisit"===i&&(n["WARC-Profile"]="WARC/1.1"===c?"http://netpreserve.org/warc/1.1/revisit/identical-payload-digest":"http://netpreserve.org/warc/1.0/revisit/identical-payload-digest",h&&(n["WARC-Refers-To-Target-URI"]=h,n["WARC-Refers-To-Date"]=d(u||(new Date).toISOString())));let f=new yt({statusline:c,headers:new Map(Object.entries(n))});f.headers.get("WARC-Record-ID")||f.headers.set("WARC-Record-ID",``),f.headers.get("Content-Type")||f.headers.set("Content-Type",i&&Et[i]||"application/octet-stream"),p||(p=Tt());let g=new t({warcHeaders:f,reader:p}),m=null,w=[];switch(i){case"response":case"request":case"revisit":w=Object.entries(o),m=l?new Map(w):new Headers(o),(w.length>0||"revisit"!==i)&&(g.httpHeaders=new yt({statusline:a,headers:m}))}return g}static createWARCInfo(e={},r){return e.type="warcinfo",t.create(e,async function*(){for(let[t,e]of Object.entries(r))yield vt.encode(`${t}: ${e}\r\n`)}())}getResponseInfo(){let t=this.httpHeaders;return t?{headers:t.headers,status:t.statusCode,statusText:t.statusText}:null}fixUp(){let t=this.warcHeaders.headers.get("WARC-Target-URI");t&&t.startsWith("<")&&t.endsWith(">")&&this.warcHeaders.headers.set("WARC-Target-URI",t.slice(1,-1))}async readFully(t=!1){if(this.httpHeaders){if(this.payload&&!this.payload.length)return this.payload;if(this._contentReader&&!t)throw new TypeError("WARC Record decoding already started, but requesting raw payload");if(t&&"raw"===this.consumed&&this.payload)return await this._createDecodingReader([this.payload]).readFully()}return this.payload||(t?(this.payload=await super.readFully(),this.consumed="content"):(this.payload=await pt.readFully(this._reader),this.consumed="raw")),this.payload}get reader(){if(this.payload&&!this.payload.length)return Tt();if(this._contentReader)throw new TypeError("WARC Record decoding already started, but requesting raw payload");return this._reader}get contentReader(){return this.httpHeaders?(this._contentReader||(this._contentReader=this._createDecodingReader(this._reader)),this._contentReader):this._reader}_createDecodingReader(t){if(!this.httpHeaders)throw new Error("WARCRecord cannot call _createDecodingReader when this.httpHeaders === null");let e=this.httpHeaders.headers.get("Content-Encoding"),r=this.httpHeaders.headers.get("Transfer-Encoding"),i="chunked"===r;return!e&&!i&&(e=r),new dt(t,e,i)}async readlineRaw(t){if(this.consumed)throw new Error("Record already consumed.. Perhaps a promise was not awaited?");if(this.contentReader instanceof pt)return this.contentReader.readlineRaw(t);throw new Error("WARCRecord cannot call readlineRaw on this.contentReader if it does not extend BaseAsyncIterReader")}async contentText(){let t=await this.readFully(!0);return At.decode(t)}async*[Symbol.asyncIterator](){for await(let t of this.contentReader)if(yield t,this.consumed)throw new Error("Record already consumed.. Perhaps a promise was not awaited?");this.consumed="content"}async skipFully(){if(!this.consumed){if(this._reader instanceof ft){let t=await this._reader.skipFully();return this.consumed="skipped",t}throw new Error("WARCRecord cannot call skipFully on this._reader if it is not a LimitReader")}}warcHeader(t){return this.warcHeaders.headers.get(t)}get warcType(){return this.warcHeaders.headers.get("WARC-Type")}get warcTargetURI(){return this.warcHeaders.headers.get("WARC-Target-URI")}get warcDate(){return this.warcHeaders.headers.get("WARC-Date")}get warcRefersToTargetURI(){return this.warcHeaders.headers.get("WARC-Refers-To-Target-URI")}get warcRefersToDate(){return this.warcHeaders.headers.get("WARC-Refers-To-Date")}get warcPayloadDigest(){return this.warcHeaders.headers.get("WARC-Payload-Digest")}get warcBlockDigest(){return this.warcHeaders.headers.get("WARC-Block-Digest")}get warcContentType(){return this.warcHeaders.headers.get("Content-Type")}get warcContentLength(){return Number(this.warcHeaders.headers.get("Content-Length"))}};async function*Tt(){}var xt=new TextDecoder,Ct=new Uint8Array([]),It=class t{static async parse(e,r){return new t(e,r).parse()}static iterRecords(e,r){return new t(e,r)[Symbol.asyncIterator]()}constructor(t,{keepHeadersCase:e=!1,parseHttp:r=!0}={}){this._offset=0,this._warcHeadersLength=0,this._headersClass=e?Map:Headers,this._parseHttp=r,this._reader=t instanceof dt?t:new dt(t),this._record=null}async readToNextRecord(){if(!this._reader||!this._record)return Ct;await this._record.skipFully(),this._reader.compressed&&(this._offset=this._reader.getRawOffset());let t=await this._reader.readlineRaw(),e=0;if(t){if(e=t.byteLength-1,9===e&&xt.decode(t).startsWith("WARC/"))return t;for(;e>0;){let r=t[e-1];if(10!==r&&13!==r)break;e--}e&&console.warn(`Content-Length Too Small: Record not followed by newline, Remainder Length: ${e}, Offset: ${this._reader.getRawOffset()-t.byteLength}`)}else t=Ct;if(this._reader.compressed)await this._reader.skipSize(2),t=Ct;else{for(t=await this._reader.readlineRaw();t&&2===t.byteLength;)t=await this._reader.readlineRaw();this._offset=this._reader.getRawOffset(),t&&(this._offset-=t.length)}return t}_initRecordReader(t){return new ft(this._reader,Number(t.headers.get("Content-Length")||0))}async parse(){let t=await this.readToNextRecord(),e=t?xt.decode(t):"",r=new class{async parse(t,{headersClass:e,firstLine:r}={headersClass:Map}){let i=r||await t.readline();if(!i)return null;let n=i.trimEnd();if(!n)return null;let s,o,a,c,l=new e,h=l instanceof Headers,u=await async function(t){let e=[],r=0,i=0,n=null,s=t[Symbol.asyncIterator]();for await(let t of s){if([i,t]=await bt(t,s),i>=0){n=t;break}e.push(t),r+=t.byteLength}if(n){let[s,o]=lt(n,i+1);e.push(s),r+=s.byteLength,t.unread(o)}else if(!e.length)return"";return wt.decode(ct(e,r))}(t),p=0,d="";for(;p=0&&s0&&await this._addHttpHeaders(n,r)}return n}get offset(){return this._offset}get recordLength(){return this._reader.getRawLength(this._offset)}async*[Symbol.asyncIterator](){let t=null;for(;null!==(t=await this.parse());)yield t;this._record=null}async _addHttpHeaders(t,e){let r=await e.parse(this._reader,{headersClass:this._headersClass});t.httpHeaders=r;let i=this._reader.getReadOffset()-this._warcHeadersLength;t.reader instanceof ft&&t.reader.setLimitSkip(t.warcContentLength-i)}};function Rt(t,e,r){let i,n;switch(r||{},e){case"RFC3548":case"RFC4648":"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",!0;break;case"RFC4648-HEX":"0123456789ABCDEFGHIJKLMNOPQRSTUV",!0;break;case"Crockford":"0123456789ABCDEFGHJKMNPQRSTVWXYZ",!1;break;default:throw new Error("Unknown base32 variant: "+e)}let s=void 0!==r.padding?r.padding:n,o=function(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}(t),a=0,c=0,l="";for(let t=0;t=5;)i[c>>>a-5&31],5;if(a>0&&i[c<<5-a&31],s)for(;l.length%8!=0;)"=";return l}var kt=new TextEncoder,Nt=class extends(null){constructor(){super(...arguments),this.buffers=[]}write(t){this.buffers.push(t)}async*readAll(){for(let t of this.buffers)yield t}},Ot=(Symbol.asyncIterator,["offset","warc-type","warc-target-uri"]),Bt="urlkey,timestamp,url,mime,status,digest,length,offset,filename".split(","),Pt="urlkey,timestamp,url,mime,status,digest,redirect,meta,length,offset,filename".split(","),Lt=class extends class extends class{constructor(t={}){this.opts=t,this.fields=t.fields?t.fields.split(","):Ot,this.parseHttp=!1}serialize(t){return JSON.stringify(t)+"\n"}write(t,e){e.write(this.serialize(t))}async writeAll(t,e){for await(let r of this.iterIndex(t))this.write(r,e)}async*iterIndex(t){let e={strictHeaders:!0,parseHttp:this.parseHttp};for(let{filename:r,reader:i}of t){let t=new It(i,e);yield*this.iterRecords(t,r)}}async*iterRecords(t,e){for await(let r of t){await r.skipFully();let i=this.indexRecord(r,t,e);i&&(yield i)}}indexRecord(t,e,r){if(this.filterRecord&&!this.filterRecord(t))return null;let i={},{offset:n,recordLength:s}=e,o={offset:n,length:s,filename:r};for(let e of this.fields)e in o?i[e]=o[e]:this.setField(e,t,i);return i}setField(t,e,r){let i=this.getField(t,e);null!==i&&(r[t]=i)}getField(t,e){if("http:status"===t)return!e.httpHeaders||"response"!==e.warcType&&"revisit"!==e.warcType?null:e.httpHeaders.statusCode;if(t.startsWith("http:")){if(e.httpHeaders){let r=e.httpHeaders.headers;return r instanceof Map&&(r=new Headers(Object.fromEntries(r))),r.get(t.slice(5))}return null}return e.warcHeaders.headers.get(t)||null}}{constructor(t){super(t);for(let t of this.fields)if(t.startsWith("http:")){this.parseHttp=!0;break}}}{constructor(t){switch(super(t),this.includeAll=!!t?.all,this.overrideIndexForAll=!!t?.all,this.fields=Bt,this.parseHttp=!0,this.noSurt=!!t?.noSurt,this._lastRecord=null,t?.format){case"cdxj":this.serialize=this.serializeCDXJ;break;case"cdx":this.serialize=this.serializeCDX11}}async*iterRecords(t,e){this._lastRecord=null;for await(let r of t){await r.readFully();let i=this.indexRecord(r,t,e);i&&(yield i)}let r=this.indexRecord(null,t,e);r&&(yield r)}filterRecord(t){if(this.includeAll)return!0;let e=t.warcType;return!("request"===e||"warcinfo"===e||("metadata"===e||"resource"===e)&&"application/warc-fields"===t.warcContentType)}indexRecord(t,e,r){if(this.overrideIndexForAll)return t?super.indexRecord(t,e,r):null;let i=this._lastRecord;if(this._lastRecord=t,t&&(t._offset=e.offset,t._length=e.recordLength),!i)return null;if(!t||i.warcTargetURI!=t.warcTargetURI)return this.indexRecordPair(i,null,e,r);let n=t.warcType,s=i.warcType;return"request"!==n||"response"!==s&&"revisit"!==s?"response"!==n&&"revisit"!==n||"request"!==s?this.indexRecordPair(i,null,e,r):(this._lastRecord=null,this.indexRecordPair(t,i,e,r)):(this._lastRecord=null,this.indexRecordPair(i,t,e,r))}indexRecordPair(t,e,r,i){let n,s,o=t.warcTargetURI||"";if(e?.httpHeaders&&"GET"!==e.httpHeaders.method){let r={url:o,method:e.httpHeaders.method,headers:e.httpHeaders.headers,postData:e.payload};n=r.method,nt(r)&&(s=r.requestBody,t.method=n,t.requestBody=s,o=r.url)}t._urlkey=o;let a=super.indexRecord(t,r,i);return a&&(void 0!==t._offset&&(a.offset=t._offset,a.length=t._length),n&&(a.method=n),s&&(a.requestBody=s)),a}serializeCDXJ(t){let{urlkey:e,timestamp:r}=t;return delete t.urlkey,delete t.timestamp,`${e} ${r} ${JSON.stringify(t,((t,e)=>["offset","length","status"].includes(t)?null==e?"":""+e:e))}\n`}serializeCDX11(t){let e=[];for(let r of Pt)e.push(null!=t[r]?t[r]:"-");return e.join(" ")+"\n"}getField(t,e){let r=null;switch(t){case"urlkey":return r=e._urlkey||e.warcTargetURI||null,this.noSurt||null===r?r:it(r);case"timestamp":return r=e.warcDate??"",r.replace(/[-:T]/g,"").slice(0,14);case"url":return e.warcTargetURI;case"mime":switch(e.warcType){case"revisit":return"warc/revisit";case"response":case"request":t="http:content-type";break;default:return e.warcContentType}return r=super.getField(t,e),r?r.toString().split(";",1)[0]?.trim():null;case"status":return super.getField("http:status",e);case"digest":return r=e.warcPayloadDigest,r?r.split(":",2)[1]:null;default:return null}}};async function Dt(t,e,r){const i=t;try{"chunked"===r&&(t=function(t){let e=0,r=0;const i=new TextDecoder("utf-8");for(;e=48&&t[s]<=57||t[s]>=65&&t[s]<=70||t[s]>=97&&t[s]<=102;)s++;if(0===s)return t;if(13!=t[s]||10!=t[s+1])return t;s+=2;var n=parseInt(i.decode(t.subarray(e,s)),16);if(0==n)break;t.set(t.subarray(s,s+n),r),s+=n,r+=n,13==t[s]&&10==t[s+1]&&(s+=2),e=s}return t.subarray(0,r)}(t))}catch(t){console.log("Chunk-Encoding Ignored: "+t)}try{if("br"===e)0===(t=N(t)).length&&(t=i);else if("gzip"===e||"gzip"===r){const e=new O.Inflate;e.push(t,!0),e.result&&!e.err&&(t=e.result)}}catch(t){console.log("Content-Encoding Ignored: "+t)}return t}var Ut=r(6932);function Mt(t={}){let e,r;const i=t&&t.response&&t.response.extraOpts;if(i&&(e=i.adaptive_max_resolution||i.maxRes,r=i.adaptive_max_bandwidth||i.maxBand,e&&r))return{maxRes:e,maxBand:r};let n;return n=t&&t.response&&!t.response.isLive?{maxRes:921600,maxBand:2e6}:{maxRes:412800,maxBand:1e6},t&&t.save&&(t.save.maxRes=n.maxRes,t.save.maxBand=n.maxBand),n}function Ft(t,e){const r=/#EXT-X-STREAM-INF:(?:.*[,])?BANDWIDTH=([\d]+)/,i=/RESOLUTION=([\d]+)x([\d]+)/,{maxRes:n,maxBand:s}=Mt(e);let o=[],a=0,c=null,l=0,h=0,u=t.trimEnd().split("\n");for(const t of u){const p=t.match(r);if(!p){e&&e.rewriteUrl&&!t.startsWith("#")&&(u[a]=e.rewriteUrl(t)),a+=1;continue}o.push(a);const d=Number(p[1]),f=t.match(i),g=f?Number(f[1])*Number(f[2]):0;g&&n?g<=n&&g>h&&(h=g,l=d,c=a):d<=s&&d>l&&(h=g,l=d,c=a),a+=1}o.reverse();for(const t of o)t!==c&&u.splice(t,2);return u.join("\n")}const Ht={ignoreAttributes:!1,removeNSPrefix:!1,format:!1,suppressEmptyNode:!0,suppressBooleanAttributes:!1};function Wt(t,e,r){try{return function(t,e,r){const i=new Ut.XMLParser(Ht).parse(t),{maxRes:n,maxBand:s}=Mt(e);let o=null,a=0,c=0,l=null;l=Array.isArray(i.MPD.Period.AdaptationSet)?i.MPD.Period.AdaptationSet:[i.MPD.Period.AdaptationSet];for(const t of l){o=null,a=0,c=0;let e=null;e=Array.isArray(t.Representation)?t.Representation:[t.Representation];for(const t of e){const e=Number(t["@_width"]||"0")*Number(t["@_height"]||"0"),r=Number(t["@_bandwidth"]||"0");e&&n&&e<=n?e>a&&(a=e,c=r,o=t):r<=s&&r>c&&(a=e,c=r,o=t)}o&&Array.isArray(r)&&r.push(o["@_id"]),o&&(t.Representation=[o])}const h=new Ut.XMLBuilder(Ht),u=h.build(i).trim();return u.slice(0,5).toLowerCase().startsWith("\n"+u}(t,e,r)}catch(e){return console.log(e),t}}const jt=[{contains:["youtube.com","youtube-nocookie.com"],rxRules:[[/ytplayer.load\(\);/,Gt('ytplayer.config.args.dash = "0"; ytplayer.config.args.dashmpd = ""; {0}')],[/yt\.setConfig.*PLAYER_CONFIG.*args":\s*{/,Gt('{0} "dash": "0", dashmpd: "", ')],[/(?:"player":|ytplayer\.config).*"args":\s*{/,Gt('{0}"dash":"0","dashmpd":"",')],[/yt\.setConfig.*PLAYER_VARS.*?{/,Gt('{0}"dash":"0","dashmpd":"",')],[/ytplayer.config={args:\s*{/,Gt('{0}"dash":"0","dashmpd":"",')],[/"0"\s*?==\s*?\w+\.dash&&/m,Gt("1&&")]]},{contains:["player.vimeo.com/video/"],rxRules:[[/^\{.+\}$/,function(t){let e;try{e=JSON.parse(t)}catch(e){return t}if(e&&e.request&&e.request.files){const t=e.request.files;if("object"==typeof t.progressive&&t.progressive.length)return t.dash&&(t.__dash=t.dash,delete t.dash),t.hls&&(t.__hls=t.hls,delete t.hls),JSON.stringify(e)}return t.replace(/query_string_ranges=1/g,"query_string_ranges=0")}]]},{contains:["master.json?query_string_ranges=0","master.json?base64"],rxRules:[[/^\{.+\}$/,function(t,e){if(!e)return t;let r=null;const i=zt(e);try{r=JSON.parse(t),console.log("manifest",r)}catch(e){return t}function n(t,e,r){if(!t)return null;let i=0,n=null;for(const s of t)s.mime_type==r&&s.bitrate>n&&s.bitrate<=e&&(n=s.bitrate,i=s);return i?[i]:t}return r.video=n(r.video,i,"video/mp4"),r.audio=n(r.audio,i,"audio/mp4"),JSON.stringify(r)}]]},{contains:["facebook.com/","fbsbx.com/"],rxRules:[[/"dash_/,Gt('"__nodash__')],[/_dash"/,Gt('__nodash__"')],[/_dash_/,Gt("__nodash__")],[/"playlist/,Gt('"__playlist__')],[/"debugNoBatching\s?":(?:false|0)/,Gt('"debugNoBatching":true')],[/"bulkRouteFetchBatchSize\s?":(?:[^{},]+)/,Gt('"bulkRouteFetchBatchSize":1')],[/"maxBatchSize\s?":(?:[^{},]+)/,Gt('"maxBatchSize":1')]]},{contains:["instagram.com/","fbcdn.net/"],rxRules:[[/"is_dash_eligible":(?:true|1)/,Gt('"is_dash_eligible":false')],[/"debugNoBatching\s?":(?:false|0)/,Gt('"debugNoBatching":true')],[/"bulkRouteFetchBatchSize\s?":(?:[^{},]+)/,Gt('"bulkRouteFetchBatchSize":1')],[/"maxBatchSize\s?":(?:[^{},]+)/,Gt('"maxBatchSize":1')]]},{contains:["api.twitter.com/2/","twitter.com/i/api/2/","twitter.com/i/api/graphql/","api.x.com/2/","x.com/i/api/2/","x.com/i/api/graphql/"],rxRules:[[/"video_info":.*?}]}/,qt('"video_info":')]]},{contains:["cdn.syndication.twimg.com/tweet-result"],rxRules:[[/"video":.*?viewCount":\d+}/,qt('"video":')]]},{contains:["/vqlweb.js"],rxRules:[[/\b\w+\.updatePortSize\(\);this\.updateApplicationSize\(\)(?![*])/gim,Gt("/*{0}*/")]]}],Vt=[{contains:["youtube.com","youtube-nocookie.com"],rxRules:[[/[^"]/,t=>`\n ${t} - - - - - + + + + + + + + diff --git a/examples/live-proxy/index.html b/examples/live-proxy/index.html index b0a2f7cb..c66b4435 100644 --- a/examples/live-proxy/index.html +++ b/examples/live-proxy/index.html @@ -1,26 +1,29 @@ - - - - - - - - + + + + + + + + diff --git a/examples/live-proxy/loadwabac.js b/examples/live-proxy/loadwabac.js index 5ac5802e..489ff614 100644 --- a/examples/live-proxy/loadwabac.js +++ b/examples/live-proxy/loadwabac.js @@ -1,34 +1,39 @@ const proxyPrefix = "https://wabac-cors-proxy.webrecorder.workers.dev/proxy/"; - -class WabacLiveProxy -{ - constructor({collName = "liveproxy", adblockUrl = undefined} = {}) { +// [TODO] +// eslint-disable-next-line @typescript-eslint/no-unused-vars +class WabacLiveProxy { + constructor({ collName = "liveproxy", adblockUrl = undefined } = {}) { this.url = ""; this.ts = ""; this.collName = collName; this.matchRx = new RegExp(`${collName}\\/([\\d]+)?\\w\\w_\\/(.*)`); this.adblockUrl = adblockUrl; - this.queryParams = {"injectScripts": "./custom.js"}; + this.queryParams = { injectScripts: "./custom.js" }; } async init() { window.addEventListener("load", () => { const iframe = document.querySelector("#content"); if (iframe) { - iframe.addEventListener("load", () => this.onIframeLoad(iframe.contentWindow.location.href)); + iframe.addEventListener("load", () => + this.onIframeLoad(iframe.contentWindow.location.href), + ); } }); const scope = "./"; // also add inject of custom.js as a script into each replayed page - await navigator.serviceWorker.register("./sw.js?" + new URLSearchParams(this.queryParams).toString(), {scope}); + await navigator.serviceWorker.register( + "./sw.js?" + new URLSearchParams(this.queryParams).toString(), + { scope }, + ); let initedResolve = null; - const inited = new Promise((resolve) => initedResolve = resolve); + const inited = new Promise((resolve) => (initedResolve = resolve)); navigator.serviceWorker.addEventListener("message", (event) => { if (event.data.msg_type === "collAdded") { @@ -44,7 +49,7 @@ class WabacLiveProxy msg_type: "addColl", name: this.collName, type: "live", - file: {"sourceUrl": `proxy:${proxyPrefix}`}, + file: { sourceUrl: `proxy:${proxyPrefix}` }, skipExisting: false, extraConfig: { prefix: proxyPrefix, @@ -53,7 +58,7 @@ class WabacLiveProxy baseUrlHashReplay: true, noPostToGet: true, archivePrefix: "https://web.archive.org/web/", - adblockUrl: this.adblockUrl + adblockUrl: this.adblockUrl, }, }; @@ -65,6 +70,8 @@ class WabacLiveProxy navigator.serviceWorker.controller.postMessage(msg); } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-misused-promises, @typescript-eslint/no-unnecessary-condition if (inited) { await inited; } @@ -80,18 +87,20 @@ class WabacLiveProxy this.onHashChange(); } - onHashChange () { + onHashChange() { const m = window.location.hash.slice(1).match(/\/?(?:([\d]+)\/)?(.*)/); - const url = m && m[2] || "https://example.com/"; - const ts = m && m[1] || ""; - + const url = m?.[2] || "https://example.com/"; + const ts = m?.[1] || ""; + // don't change if same url if (url === this.url && ts === this.ts) { return; } - let iframeUrl = ts ? `/w/${this.collName}/${ts}mp_/${url}` : `/w/${this.collName}/mp_/${url}`; + let iframeUrl = ts + ? `/w/${this.collName}/${ts}mp_/${url}` + : `/w/${this.collName}/mp_/${url}`; const iframe = document.querySelector("#content"); iframe.src = iframeUrl; diff --git a/index.js b/index.js index f7512804..d34f0d57 100644 --- a/index.js +++ b/index.js @@ -11,5 +11,10 @@ export { LiveProxy } from "./src/liveproxy.js"; export { API } from "./src/api.js"; -export { getStatusText, getCollData, getTSMillis, tsToDate, randomId } from "./src/utils.js"; - +export { + getStatusText, + getCollData, + getTSMillis, + tsToDate, + randomId, +} from "./src/utils.js"; diff --git a/package.json b/package.json index 1b17cfae..e44d6b9a 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,24 @@ { "name": "@webrecorder/wabac", - "version": "2.19.9", + "version": "2.20.0", "main": "index.js", "type": "module", + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "default": "./dist/index.js" + }, + "./swlib": { + "types": "./dist/types/swlib.d.ts", + "default": "./dist/swlib.js" + } + }, "license": "AGPL-3.0-or-later", "dependencies": { "@peculiar/asn1-ecc": "^2.3.4", "@peculiar/asn1-schema": "^2.3.3", "@peculiar/x509": "^1.9.2", + "@types/js-levenshtein": "^1.1.3", "@webrecorder/wombat": "^3.8.2", "acorn": "^8.10.0", "auto-js-ipfs": "^2.1.1", @@ -27,17 +38,37 @@ "path-parser": "^6.1.0", "process": "^0.11.10", "stream-browserify": "^3.0.0", - "warcio": "^2.3.0" + "warcio": "^2.3.1" }, "devDependencies": { - "ava": "^5.3.1", + "@swc-node/register": "^1.10.9", + "@swc/core": "^1.7.23", + "@types/brotli": "^1.3.4", + "@types/http-link-header": "^1.0.5", + "@types/js-yaml": "^4.0.9", + "@types/node": "^20.12.5", + "@types/pako": "1.0.1", + "@types/serve-static": "^1.15.7", + "@types/test-listen": "^1.1.2", + "@types/web": "^0.0.142", + "@types/wicg-file-system-access": "^2023.10.5", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", + "ava": "^6.1.3", "c8": "^7.12.0", - "eslint": "^8.25.0", + "copy-webpack-plugin": "^12.0.2", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "fake-indexeddb": "^4.0.0", "globals": "^13.17.0", + "prettier": "^3.3.3", "raw-loader": "^4.0.2", "serve-static": "^1.15.0", "test-listen": "^1.1.0", + "ts-loader": "^9.5.1", + "tsconfig-paths-webpack-plugin": "^4.1.0", + "tsimp": "^2.0.11", + "typescript": "^5.5.4", "webpack": "^5.76.0", "webpack-cli": "^4.8.0" }, @@ -51,14 +82,9 @@ "start-dev": "webpack-dev-server --mode development", "start-live-proxy": "cp dist/sw.js ./examples/live-proxy/sw.js && cd ./examples/live-proxy && ./fetch-adblock.sh && http-server -p 10001", "test": "c8 ava", - "lint": "eslint ./src/ ./test/ webpack.config.cjs" - }, - "ava": { - "concurrency": 1, - "verbose": true, - "serial": true, - "files": [ - "test/*.js" - ] + "lint:check": "eslint ./src/ ./test/", + "lint": "eslint --fix ./src/ ./test/", + "format:check": "prettier --check ./src/ ./test/", + "format": "prettier --write ./src/ ./test/" } } diff --git a/src/adblockcss.js b/src/adblockcss.ts similarity index 68% rename from src/adblockcss.js rename to src/adblockcss.ts index 0ce6896e..e33f86e4 100644 --- a/src/adblockcss.js +++ b/src/adblockcss.ts @@ -1,8 +1,9 @@ -import { AsyncIterReader } from "warcio"; - -export async function getAdBlockCSSResponse(fullDomain, adblockUrl) { +export async function getAdBlockCSSResponse( + fullDomain: string, + adblockUrl: string, +) { const domainParts = fullDomain.split("."); - const allDomains = []; + const allDomains: string[] = []; for (let i = 0; i < domainParts.length - 1; i++) { if (domainParts[i] !== "www") { @@ -13,30 +14,47 @@ export async function getAdBlockCSSResponse(fullDomain, adblockUrl) { // Note: this may actually be a TLD (eg. co.uk) domains but that shouldn't matter too much // unless a list has rules for a TLD, which it generally does not. // this may result in checking more lines for exact matches than is necessary - const possibleDomain = allDomains.length ? allDomains[allDomains.length - 1] : ""; + const possibleDomain = allDomains.length + ? allDomains[allDomains.length - 1] + : ""; const resp = await fetch(adblockUrl); let body = resp.body; + const headers = new Headers({ "Content-Type": "text/css" }); + + if (!body) { + return new Response("", { status: 400, headers, statusText: "Not Found" }); + } + if (adblockUrl.endsWith(".gz")) { body = body.pipeThrough(new self.DecompressionStream("gzip")); } - const linestream = body.pipeThrough(new ByLineStream()); + const linestream: ReadableStream = body.pipeThrough( + new ByLineStream(), + ); - async function* yieldRules(linestream) { + async function* yieldRules(linestream: ReadableStream) { try { - for await (const line of AsyncIterReader.fromReadable(linestream.getReader())) { + let res; + const reader = linestream.getReader(); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + while ((res = await reader.read()) && !res.done) { + const line = res.value; if (possibleDomain && line.indexOf(possibleDomain) >= 0) { const parts = line.split("##"); if (parts.length < 2) { continue; } // exception rule + // @ts-expect-error [TODO] - TS2532 - Object is possibly 'undefined'. if (parts[0].endsWith("#@")) { continue; } + // @ts-expect-error [TODO] - TS2532 - Object is possibly 'undefined'. const matches = parts[0].split(","); // match all subdomains exactly @@ -46,7 +64,6 @@ export async function getAdBlockCSSResponse(fullDomain, adblockUrl) { break; } } - } else if (!possibleDomain && line.startsWith("##")) { yield line.slice(2); } @@ -71,9 +88,11 @@ export async function getAdBlockCSSResponse(fullDomain, adblockUrl) { const streamIter = yieldSelectors(); const rs = new ReadableStream({ - pull(controller) { + async pull(controller) { return streamIter.next().then((result) => { // all done; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (result.done || !result.value) { controller.close(); } else { @@ -85,11 +104,9 @@ export async function getAdBlockCSSResponse(fullDomain, adblockUrl) { const status = 200; const statusText = "OK"; - const headers = new Headers({"Content-Type": "text/css"}); - return new Response(rs, {status, statusText, headers}); + return new Response(rs, { status, statusText, headers }); } - // Line TransformStream // from: https://github.com/jimmywarting/web-byline /* @@ -116,58 +133,60 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ export class ByLineTransform { - constructor() { - this._buffer = []; - this._lastChunkEndedWithCR = false; - this.decoder = new TextDecoder(); - } - - transform(chunkArray, controller) { + _buffer: string[] = []; + _lastChunkEndedWithCR = false; + decoder = new TextDecoder(); + + transform( + chunkArray: Uint8Array, + controller: TransformStreamDefaultController, + ) { const chunk = this.decoder.decode(chunkArray); // see: http://www.unicode.org/reports/tr18/#Line_Boundaries const lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); const buffer = this._buffer; // don't split CRLF which spans chunks - if (this._lastChunkEndedWithCR && chunk[0] == "\n") { + if (this._lastChunkEndedWithCR && chunk.startsWith("\n")) { lines.shift(); } if (buffer.length > 0) { + // @ts-expect-error [TODO] - TS2532 - Object is possibly 'undefined'. buffer[buffer.length - 1] += lines[0]; lines.shift(); } - this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; + this._lastChunkEndedWithCR = chunk.endsWith("\r"); //buffer.push(...lines); // always buffer the last (possibly partial) line while (buffer.length > 1) { const line = buffer.shift(); // skip empty lines - if (line.length) controller.enqueue(line); + if (line?.length) controller.enqueue(line); } while (lines.length > 1) { const line = lines.shift(); // skip empty lines - if (line.length) controller.enqueue(line); + if (line?.length) controller.enqueue(line); } } - flush(controller) { + flush(controller: TransformStreamDefaultController) { const buffer = this._buffer; while (buffer.length) { const line = buffer.shift(); // skip empty lines - if (line.length) controller.enqueue(line); + if (line?.length) controller.enqueue(line); } } } -export class ByLineStream extends TransformStream { +export class ByLineStream extends TransformStream { constructor() { - super(new ByLineTransform); + super(new ByLineTransform()); } } diff --git a/src/api.js b/src/api.js deleted file mode 100644 index 5c4153fb..00000000 --- a/src/api.js +++ /dev/null @@ -1,257 +0,0 @@ -import { Path } from "path-parser"; -import { getCollData } from "./utils.js"; - -// =========================================================================== -class APIRouter { - constructor(paths) { - this.routes = {}; - - for (const [name, value] of Object.entries(paths)) { - let route, method; - - if (value instanceof Array) { - route = value[0]; - method = value[1] || "GET"; - } else { - route = value; - method = "GET"; - } - - this.routes[method] = this.routes[method] || {}; - this.routes[method][name] = new Path(route); - } - } - - match(url, method = "GET") { - for (const [name, route] of Object.entries(this.routes[method] || [])) { - const parts = url.split("?", 2); - const matchUrl = parts[0]; - - const res = route.test(matchUrl); - if (res) { - res._route = name; - res._query = new URLSearchParams(parts.length === 2 ? parts[1] : ""); - return res; - } - } - - return {_route: null}; - } -} - - -// =========================================================================== -class API { - constructor(collections) { - this.router = new APIRouter(this.routes); - - this.collections = collections; - } - - get routes() { - return { - "index": "coll-index", - "coll": "c/:coll", - "urls": "c/:coll/urls", - "urlsTs": "c/:coll/ts/", - "createColl": ["c/create", "POST"], - "deleteColl": ["c/:coll", "DELETE"], - "updateAuth": ["c/:coll/updateAuth", "POST"], - "updateMetadata": ["c/:coll/metadata", "POST"], - "curated": "c/:coll/curated/:list", - "pages": "c/:coll/pages", - "textIndex": "c/:coll/textIndex", - "deletePage": ["c/:coll/page/:page", "DELETE"], - }; - } - - async apiResponse(url, request, event) { - const params = this.router.match(url, request.method); - const response = await this.handleApi(request, params, event); - if (response instanceof Response) { - return response; - } - const status = response.error ? 404 : 200; - return this.makeResponse(response, status); - } - - async handleApi(request, params/*, event*/) { - switch (params._route) { - case "index": - return await this.listAll(params._query.get("filter")); - - case "createColl": { - const requestJSON = await request.json(); - const coll = await this.collections.initNewColl(requestJSON.metadata || {}, requestJSON.extraConfig || {}); - return getCollData(coll); - } - - case "coll": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const data = getCollData(coll); - - if (params._query.get("all") === "1") { - if (coll.store.db) { - data.pages = await coll.store.getAllPages(); - data.lists = await coll.store.db.getAll("pageLists"); - data.curatedPages = await coll.store.db.getAll("curatedPages"); - } else { - data.pages = []; - data.lists = []; - data.curatedPages = []; - } - - data.verify = await coll.store.getVerifyInfo(); - - } else { - data.numLists = await coll.store.db.count("pageLists"); - data.numPages = await coll.store.db.count("pages"); - } - - if (coll.config.metadata.ipfsPins) { - data.ipfsPins = coll.config.metadata.ipfsPins; - } - - return data; - } - - case "deleteColl": { - const keepFileHandle = params._query.get("reload") === "1"; - - if (!await this.collections.deleteColl(params.coll, keepFileHandle)) { - return {error: "collection_not_found"}; - } - return await this.listAll(); - } - - case "updateAuth": { - const requestJSON = await request.json(); - return {"success": await this.collections.updateAuth(params.coll, requestJSON.headers)}; - } - - case "updateMetadata": { - const requestJSON = await request.json(); - const metadata = await this.collections.updateMetadata(params.coll, requestJSON); - return {metadata}; - } - - case "urls": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const url = params._query.get("url"); - const count = Number(params._query.get("count") || 100); - const mime = params._query.get("mime"); - const prefix = (params._query.get("prefix") === "1"); - - const fromUrl = params._query.get("fromUrl"); - const fromTs = params._query.get("fromTs"); - const fromMime = params._query.get("fromMime"); - const fromStatus = Number(params._query.get("fromStatus") || 0); - - if (!coll.store.resourcesByMime) { - return {urls: []}; - } - - let urls; - - if (url) { - urls = await coll.store.resourcesByUrlAndMime(url, mime, count, prefix, fromUrl, fromTs); - } else { - urls = await coll.store.resourcesByMime(mime, count, fromMime, fromUrl, fromStatus); - } - - urls = urls || []; - - return {urls}; - } - - case "urlsTs": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const url = params._query.get("url"); - const timestamps = await coll.store.getTimestampsByURL(url); - - return {"timestamps": timestamps}; - } - - case "pages": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const pages = await coll.store.getAllPages(); - return {pages}; - } - - case "textIndex": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - if (coll.store.getTextIndex) { - return await coll.store.getTextIndex(); - } else { - return {}; - } - } - - case "curated": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const list = Number(params.list); - const curated = await coll.store.db.getAllFromIndex("curatedPages", "listPages", - IDBKeyRange.bound([list], [list + 1])); - return {curated}; - } - - case "deletePage": { - const coll = await this.collections.getColl(params.coll); - if (!coll) { - return {error: "collection_not_found"}; - } - const {pageSize, deleteSize} = coll.store.deletePage(params.page); - - this.collections.updateSize(params.coll, pageSize, deleteSize); - - return {pageSize, deleteSize}; - } - - default: - return {"error": "not_found"}; - } - } - - async listAll(filter) { - const response = await this.collections.listAll(); - const collections = []; - - response.forEach((coll) => { - if (coll.type === "live" || coll.type === "remoteproxy") { - return; - } - - if (filter && coll.type.indexOf(filter) !== 0) { - return; - } - - collections.push(getCollData(coll)); - }); - - return {"colls": collections}; - } - - makeResponse(response, status = 200) { - return new Response(JSON.stringify(response), {status, headers: {"Content-Type": "application/json"}}); - } -} - -export { API }; diff --git a/src/api.ts b/src/api.ts new file mode 100644 index 00000000..4bcd718b --- /dev/null +++ b/src/api.ts @@ -0,0 +1,397 @@ +import { Path } from "path-parser"; +import { getCollData } from "./utils"; +import { type SWCollections } from "./swmain"; + +// [TODO] +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type RouteMatch = Record; + +// =========================================================================== +class APIRouter { + routes: Record> = {}; + + constructor(paths: Record) { + for (const [name, value] of Object.entries(paths)) { + let route, method; + + if (value instanceof Array) { + route = value[0]; + method = value[1] || "GET"; + } else { + route = value; + method = "GET"; + } + + this.routes[method] = this.routes[method] || {}; + // @ts-expect-error [TODO] - TS2532 - Object is possibly 'undefined'. + this.routes[method][name] = new Path(route); + } + } + + match(url: string, method = "GET"): RouteMatch | { _route: null } { + for (const [name, route] of Object.entries(this.routes[method] || [])) { + const parts = url.split("?", 2); + const matchUrl = parts[0]; + + // @ts-expect-error [TODO] - TS2345 - Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string' + const res = route.test(matchUrl); + if (res) { + res["_route"] = name; + res["_query"] = new URLSearchParams(parts.length === 2 ? parts[1] : ""); + return res; + } + } + + return { _route: null }; + } +} + +// =========================================================================== +class API { + router: APIRouter; + collections: SWCollections; + + constructor(collections: SWCollections) { + this.router = new APIRouter(this.routes); + + this.collections = collections; + } + + get routes(): Record { + return { + index: "coll-index", + coll: "c/:coll", + urls: "c/:coll/urls", + urlsTs: "c/:coll/ts/", + createColl: ["c/create", "POST"], + deleteColl: ["c/:coll", "DELETE"], + updateAuth: ["c/:coll/updateAuth", "POST"], + updateMetadata: ["c/:coll/metadata", "POST"], + curated: "c/:coll/curated/:list", + pages: "c/:coll/pages", + textIndex: "c/:coll/textIndex", + deletePage: ["c/:coll/page/:page", "DELETE"], + }; + } + + async apiResponse(url: string, request: Request, event: FetchEvent) { + const params = this.router.match(url, request.method); + const response = await this.handleApi(request, params, event); + if (response instanceof Response) { + return response; + } + const status = response.error ? 404 : 200; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + return this.makeResponse(response, status); + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async handleApi(request: Request, params: RouteMatch, event: FetchEvent) { + // @ts-expect-error [TODO] - TS4111 - Property '_route' comes from an index signature, so it must be accessed with ['_route']. + switch (params._route) { + case "index": + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + return await this.listAll(params._query.get("filter")); + + case "createColl": { + const requestJSON = await request.json(); + const coll = await this.collections.initNewColl( + requestJSON.metadata || {}, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + requestJSON.extraConfig || {}, + ); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return getCollData(coll); + } + + case "coll": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + const data = getCollData(coll); + + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + if (params._query.get("all") === "1") { + if (coll.store.db) { + data.pages = await coll.store.getAllPages(); + data.lists = await coll.store.db.getAll("pageLists"); + data.curatedPages = await coll.store.db.getAll("curatedPages"); + } else { + data.pages = []; + data.lists = []; + data.curatedPages = []; + } + + data.verify = await coll.store.getVerifyInfo(); + } else if (coll.store.db) { + data.numLists = await coll.store.db.count("pageLists"); + data.numPages = await coll.store.db.count("pages"); + } else { + data.numLists = 0; + data.numPages = 0; + } + + // @ts-expect-error [TODO] - TS4111 - Property 'metadata' comes from an index signature, so it must be accessed with ['metadata']. + if (coll.config.metadata.ipfsPins) { + // @ts-expect-error [TODO] - TS4111 - Property 'metadata' comes from an index signature, so it must be accessed with ['metadata']. + data.ipfsPins = coll.config.metadata.ipfsPins; + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return data; + } + + case "deleteColl": { + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const keepFileHandle = params._query.get("reload") === "1"; + + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + if (!(await this.collections.deleteColl(params.coll, keepFileHandle))) { + return { error: "collection_not_found" }; + } + return await this.listAll(); + } + + case "updateAuth": { + const requestJSON = await request.json(); + return { + success: await this.collections.updateAuth( + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + params.coll, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + requestJSON.headers, + ), + }; + } + + case "updateMetadata": { + const requestJSON = await request.json(); + const metadata = await this.collections.updateMetadata( + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + params.coll, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + requestJSON, + ); + return { metadata }; + } + + case "urls": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const url = params._query.get("url"); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const count = Number(params._query.get("count") || 100); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const mime = params._query.get("mime"); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const prefix = params._query.get("prefix") === "1"; + + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const fromUrl = params._query.get("fromUrl"); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const fromTs = params._query.get("fromTs"); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const fromMime = params._query.get("fromMime"); + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const fromStatus = Number(params._query.get("fromStatus") || 0); + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!coll.store.resourcesByMime) { + return { urls: [] }; + } + + let urls; + + if (url) { + urls = await coll.store.resourcesByUrlAndMime( + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + url, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + mime, + count, + prefix, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + fromUrl, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + fromTs, + ); + } else { + urls = await coll.store.resourcesByMime( + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + mime, + count, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + fromMime, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + fromUrl, + fromStatus, + ); + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + urls = urls || []; + + return { urls }; + } + + case "urlsTs": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + // @ts-expect-error [TODO] - TS4111 - Property '_query' comes from an index signature, so it must be accessed with ['_query']. + const url = params._query.get("url"); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const timestamps = await coll.store.getTimestampsByURL(url); + + return { timestamps: timestamps }; + } + + case "pages": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + const pages = await coll.store.getAllPages(); + return { pages }; + } + + case "textIndex": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if ((coll.store as any).getTextIndex) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return + return await (coll.store as any).getTextIndex(); + } else { + return {}; + } + } + + case "curated": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + // @ts-expect-error [TODO] - TS4111 - Property 'list' comes from an index signature, so it must be accessed with ['list']. + const list = Number(params.list); + if (!coll.store.db) { + return { curated: [] }; + } + const curated = await coll.store.db.getAllFromIndex( + "curatedPages", + "listPages", + IDBKeyRange.bound([list], [list + 1]), + ); + return { curated }; + } + + case "deletePage": { + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const coll = await this.collections.getColl(params.coll); + if (!coll) { + return { error: "collection_not_found" }; + } + const { pageSize, dedupSize } = await coll.store.deletePage( + // @ts-expect-error [TODO] - TS4111 - Property 'page' comes from an index signature, so it must be accessed with ['page']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + params.page, + ); + + // @ts-expect-error [TODO] - TS4111 - Property 'coll' comes from an index signature, so it must be accessed with ['coll']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/no-unsafe-argument + this.collections.updateSize(params.coll, pageSize, dedupSize); + + return { pageSize, dedupSize }; + } + + default: + return { error: "not_found" }; + } + } + + async listAll(filter?: string | null) { + const response = await this.collections.listAll(); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const collections: any[] = []; + + response.forEach((coll) => { + if (coll.type === "live" || coll.type === "remoteproxy") { + return; + } + + if (filter && !coll.type.startsWith(filter)) { + return; + } + + collections.push(getCollData(coll)); + }); + + return { colls: collections }; + } + + makeResponse(response: Response, status = 200) { + return new Response(JSON.stringify(response), { + status, + headers: { "Content-Type": "application/json" }, + }); + } +} + +export { API }; diff --git a/src/archivedb.js b/src/archivedb.ts similarity index 52% rename from src/archivedb.js rename to src/archivedb.ts index befaa2cf..5754542b 100644 --- a/src/archivedb.js +++ b/src/archivedb.ts @@ -1,11 +1,30 @@ -"use strict"; - -import { openDB, deleteDB } from "idb/with-async-ittr"; -import { tsToDate, isNullBodyStatus, makeHeaders, digestMessage, - getTS, getStatusText, randomId, PAGE_STATE_SYNCED } from "./utils.js"; -import { fuzzyMatcher } from "./fuzzymatcher.js"; -import { ArchiveResponse } from "./response.js"; - +import { + openDB, + deleteDB, + type IDBPDatabase, + type IDBPTransaction, +} from "idb/with-async-ittr"; +import { + tsToDate, + isNullBodyStatus, + makeHeaders, + digestMessage, + getTS, + getStatusText, + randomId, + PAGE_STATE_SYNCED, +} from "./utils"; +import { fuzzyMatcher } from "./fuzzymatcher"; +import { ArchiveResponse } from "./response"; +import { + type DBStore, + type DigestRefCount, + type PageEntry, + type ResAPIResponse, + type ResourceEntry, +} from "./types"; +import { type ArchiveRequest } from "./request"; +import { type BaseAsyncIterReader } from "warcio"; const MAX_FUZZY_MATCH = 128000; const MAX_RESULTS = 16; @@ -13,21 +32,79 @@ const MAX_DATE_TS = new Date("9999-01-01").getTime(); const REVISIT = "warc/revisit"; -const EMPTY_PAYLOAD_SHA256 = "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; +const EMPTY_PAYLOAD_SHA256 = + "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; // sha-1 digests often base32 encoded const EMPTY_PAYLOAD_SHA1 = "sha1:3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ"; const DB_VERSION = 4; +export type ADBOpts = { + minDedupSize?: number | undefined; + noRefCounts?: unknown; + noFuzzyCheck?: boolean; + noRevisits?: boolean; + pageId?: string; +}; + +export type ADBType = { + pages: { + key: string; + value: PageEntry & { size?: number }; + indexes: { url: string; ts: string; state: number }; + }; + pageLists: { + key: string; + value: { + pages?: unknown[]; + show?: boolean; + title?: string | undefined; + desc?: string | undefined; + slug?: string | undefined; + }; + }; + curatedPages: { + key: string; + value: PageEntry; + indexes: { listPages: [string, string] }; + }; + resources: { + key: [string, string]; + value: ResourceEntry; + indexes: { pageId: string; mimeStatusUrl: [string, string, string] }; + }; + payload: { + key: string; + value: { digest: string; payload: Uint8Array | null }; + indexes: { digest: string }; + }; + digestRef: { + key: string; + value: DigestRefCount | null; + indexes: { digest: string }; + }; +}; // =========================================================================== -class ArchiveDB { - constructor(name, opts = {}) { +// TODO @emma-sg make this generic so that it can be extended with other DB schemas +export class ArchiveDB implements DBStore { + name: string; + minDedupSize: number; + version: number; + autoHttpsCheck = true; + useRefCounts = false; + allowRepeats = true; + repeatTracker: RepeatTracker | null = null; + fuzzyPrefixSearch = true; + initing: Promise; + db: IDBPDatabase | null = null; + + constructor(name: string, opts: ADBOpts | undefined = {}) { this.name = name; this.db = null; const { minDedupSize, noRefCounts } = opts; - this.minDedupSize = Number.isInteger(minDedupSize) ? minDedupSize : 1024; + this.minDedupSize = Number.isInteger(minDedupSize) ? minDedupSize! : 1024; this.version = DB_VERSION; @@ -35,7 +112,7 @@ class ArchiveDB { this.useRefCounts = !noRefCounts; this.allowRepeats = true; - this.repeatTracker = this.allowRepeats ? new RepeatTracker() : null; + this.repeatTracker = new RepeatTracker(); this.fuzzyPrefixSearch = true; this.initing = this.init(); @@ -53,7 +130,7 @@ class ArchiveDB { if (!oldV) { this.close(); } - } + }, }); if (oldVersion === 1) { @@ -61,31 +138,56 @@ class ArchiveDB { } } - _initDB(db, oldV/*, newV, tx*/) { + _initDB( + db: IDBPDatabase, + oldV: number, + _newV: number | null, + _tx?: IDBPTransaction< + ADBType, + (keyof ADBType)[], + "readwrite" | "versionchange" + >, + ) { if (!oldV) { const pageStore = db.createObjectStore("pages", { keyPath: "id" }); pageStore.createIndex("url", "url"); pageStore.createIndex("ts", "ts"); pageStore.createIndex("state", "state"); - db.createObjectStore("pageLists", { keyPath: "id", autoIncrement: true}); + db.createObjectStore("pageLists", { keyPath: "id", autoIncrement: true }); - const curatedPages = db.createObjectStore("curatedPages", { keyPath: "id", autoIncrement: true}); + const curatedPages = db.createObjectStore("curatedPages", { + keyPath: "id", + autoIncrement: true, + }); curatedPages.createIndex("listPages", ["list", "pos"]); - const urlStore = db.createObjectStore("resources", { keyPath: ["url", "ts"] }); + const urlStore = db.createObjectStore("resources", { + keyPath: ["url", "ts"], + }); urlStore.createIndex("pageId", "pageId"); //urlStore.createIndex("pageUrlTs", ["pageId", "url", "ts"]); //urlStore.createIndex("ts", "ts"); urlStore.createIndex("mimeStatusUrl", ["mime", "status", "url"]); - db.createObjectStore("payload", { keyPath: "digest", unique: true}); - db.createObjectStore("digestRef", { keyPath: "digest", unique: true}); + const payloadStore = db.createObjectStore("payload", { + keyPath: "digest", + }); + payloadStore.createIndex("digest", "digest", { unique: true }); + + const digestRef = db.createObjectStore("digestRef", { + keyPath: "digest", + }); + digestRef.createIndex("digest", "digest", { unique: true }); } } async clearAll() { - const stores = ["pages", "resources", "payload", "digestRef"]; + const stores = ["pages", "resources", "payload", "digestRef"] as const; + + if (!this.db) { + return; + } for (const store of stores) { await this.db.clear(store); @@ -103,20 +205,23 @@ class ArchiveDB { this.close(); await deleteDB(this.name, { blocked(_, e) { + // eslint-disable-next-line @typescript-eslint/no-base-to-string console.log("Unable to delete: " + e); - } + }, }); } - async addPage(page, tx) { + async addPage( + page: PageEntry, + tx?: IDBPTransaction | null, + ) { const url = page.url; const title = page.title || page.url; const id = page.id || this.newPageId(); const state = page.state || PAGE_STATE_SYNCED; let ts = page.ts; - - if (typeof(ts) !== "number") { + if (typeof ts !== "number") { if (page.timestamp) { ts = tsToDate(page.timestamp).getTime(); } else { @@ -127,44 +232,57 @@ class ArchiveDB { } } - const p = {...page, url, ts, title, id, state}; + const p = { ...page, url, ts, title, id, state }; if (tx) { - tx.store.put(p); + void tx.store.put(p); return p.id; } else { - return await this.db.put("pages", p); + return await this.db!.put("pages", p); } } - async addPages(pages, pagesTable = "pages", update = false) { - const tx = this.db.transaction(pagesTable, "readwrite"); + async addPages( + pages: PageEntry[], + pagesTable: keyof ADBType = "pages", + update = false, + ) { + const tx = this.db!.transaction(pagesTable, "readwrite"); for (const page of pages) { if (update) { - tx.store.put(page); + void tx.store.put(page); } else { - this.addPage(page, tx); + void this.addPage(page, tx); } } try { await tx.done; - } catch(e) { - console.warn("addPages tx", e.toString()); + } catch (e) { + console.warn("addPages tx", String(e)); } } - async createPageList(data) { - const listData = {}; - listData.title = data.title; - listData.desc = data.desc || data.description; - listData.slug = data.id || data.slug; - - return await this.db.put("pageLists", listData); + async createPageList(data: { + title?: string; + desc?: string; + description?: string; + id?: string; + slug?: string; + }) { + const listData = { + title: data.title, + desc: data.desc || data.description, + slug: data.id || data.slug, + }; + return await this.db!.put("pageLists", listData); } - async addCuratedPageList(listInfo, pages) { + async addCuratedPageList( + listInfo: Record, + pages: PageEntry[], + ) { const listId = await this.createPageList(listInfo); let pos = 0; @@ -177,7 +295,11 @@ class ArchiveDB { await this.addPages(pages, "curatedPages"); } - async addCuratedPageLists(pageLists, pageKey = "pages", filter = "public") { + async addCuratedPageLists( + pageLists: { [k: string]: PageEntry[] | undefined }[], + pageKey = "pages", + filter = "public", + ) { for (const list of pageLists) { if (filter && !list[filter]) { continue; @@ -189,10 +311,21 @@ class ArchiveDB { } } - async convertCuratedPagesToV2(db) { - const curatedPages = await db.getAll("curatedPages"); - - if (!curatedPages || !curatedPages.length) { + async convertCuratedPagesToV2( + db: IDBPDatabase< + ADBType & { + pages: { key: string; value: { page?: PageEntry } & PageEntry }; + curatedPages: { key: string; value: { page?: PageEntry } & PageEntry }; + } + >, + ) { + const curatedPages = (await db.getAll("curatedPages")) as + | (PageEntry & { + page?: PageEntry; + })[] + | null; + + if (!curatedPages?.length) { return; } @@ -223,7 +356,7 @@ class ArchiveDB { const tx = db.transaction("curatedPages", "readwrite"); for (const cpage of curatedPages) { - tx.store.put(cpage); + void tx.store.put(cpage); } try { @@ -234,12 +367,14 @@ class ArchiveDB { } async getCuratedPagesByList() { - const allLists = await this.db.getAll("pageLists"); + const allLists = await this.db!.getAll("pageLists"); - const tx = this.db.transaction("curatedPages", "readonly"); + const tx = this.db!.transaction("curatedPages", "readonly"); for await (const cursor of tx.store.index("listPages").iterate()) { - const list = allLists[cursor.value.list - 1]; + const list = allLists[cursor.value.list - 1] as + | (typeof allLists)[number] + | undefined; if (!list) { continue; } @@ -258,11 +393,11 @@ class ArchiveDB { } async getAllPages() { - return await this.db.getAll("pages"); + return await this.db!.getAll("pages"); } - async getPages(pages) { - const results = []; + async getPages(pages: string[]) { + const results: PageEntry[] = []; pages.sort(); for await (const result of this.matchAny("pages", null, pages)) { @@ -272,48 +407,58 @@ class ArchiveDB { return results; } - async getTimestampsByURL(url) { - const tx = this.db.transaction("resources"); + async getTimestampsByURL(url: string) { + const tx = this.db!.transaction("resources"); const range = IDBKeyRange.bound([url], [url, MAX_DATE_TS]); - const results=[]; + const results: string[] = []; for await (const cursor of tx.store.iterate(range)) { - results.push(cursor.key[1]); + results.push((cursor.key as string[])[1]!); } return results; } - async getPagesWithState(state) { - return await this.db.getAllFromIndex("pages", "state", state); + async getPagesWithState(state: number) { + return await this.db!.getAllFromIndex("pages", "state", state); } async getVerifyInfo() { return {}; } - async addVerifyData() { + async addVerifyData( + _prefix = "", + _id: string, + _expected: string, + _actual: string | null = null, + _log = false, + ) { return; } - async addVerifyDataList() { + async addVerifyDataList(_prefix: string, _datalist: unknown[]) { return; } - async dedupResource(digest, payload, tx, count = 1) { + async dedupResource( + digest: string, + payload: Uint8Array | null | undefined, + tx: IDBPTransaction, + count = 1, + ): Promise { const digestRefStore = tx.objectStore("digestRef"); const ref = await digestRefStore.get(digest); if (ref) { - ++ref.count; + ++ref.count!; return ref; //digestRefStore.put(ref); //return ref.count; - } else if (payload) { try { - tx.objectStore("payload").put({digest, payload}); + void tx.objectStore("payload").put({ digest, payload }); const size = payload.length; //digestRefStore.put({digest, count, size}); - return {digest, count, size}; + return { digest, count, size }; } catch (e) { console.log(e); } @@ -322,22 +467,27 @@ class ArchiveDB { return null; } - async addResources(datas) { - const revisits = []; - const redirectsAndErrors = []; - const regulars = []; + async addResources(datas: ResourceEntry[]) { + const revisits: ResourceEntry[] = []; + const redirectsAndErrors: ResourceEntry[] = []; + const regulars: ResourceEntry[] = []; - const digestRefCount = {}; - const changedDigests = new Set(); + const digestRefCount: Record = {}; + const changedDigests = new Set(); - const dtx = this.db.transaction(["digestRef", "payload"], "readwrite"); + const dtx = this.db!.transaction(["digestRef", "payload"], "readwrite"); for (const data of datas) { let refCount = 1; const status = data.status || 200; - const array = data.mime === REVISIT ? revisits : status >= 300 ? redirectsAndErrors : regulars; + const array = + data.mime === REVISIT + ? revisits + : status >= 300 + ? redirectsAndErrors + : regulars; array.push(data); @@ -349,10 +499,16 @@ class ArchiveDB { } if (this.useRefCounts && data.digest) { - if (!digestRefCount[data.digest]) { - digestRefCount[data.digest] = await this.dedupResource(data.digest, data.payload, dtx, refCount); + const currDigest = digestRefCount[data.digest]; + if (!currDigest) { + digestRefCount[data.digest] = await this.dedupResource( + data.digest, + data.payload, + dtx, + refCount, + ); } else { - digestRefCount[data.digest].count += refCount; + currDigest.count! += refCount; changedDigests.add(data.digest); } delete data.payload; @@ -363,32 +519,32 @@ class ArchiveDB { const digestRefStore = dtx.objectStore("digestRef"); for (const digest of changedDigests) { - digestRefStore.put(digestRefCount[digest]); + void digestRefStore.put(digestRefCount[digest]!); } } try { await dtx.done; - } catch(e) { + } catch (e) { console.error("Payload and Ref Count Bulk Add Failed: ", e); } // Add resources - const tx = this.db.transaction("resources", "readwrite"); + const tx = this.db!.transaction("resources", "readwrite"); // First, add revisits for (const data of revisits) { - tx.store.put(data); + void tx.store.put(data); } // Then, add non-revisit errors and redirects, overriding any revisits for (const data of redirectsAndErrors) { - tx.store.put(data); + void tx.store.put(data); } // Then, add non-revisits success entries, overriding any previous entries for (const data of regulars) { - tx.store.put(data); + void tx.store.put(data); } try { @@ -398,9 +554,15 @@ class ArchiveDB { } } - getFuzzyUrl(result) { - if (result.status >= 200 && result.status < 400 && result.status !== 304 && result.status !== 204) { - const {fuzzyCanonUrl} = fuzzyMatcher.getRuleFor(result.url); + getFuzzyUrl(result: ResourceEntry): ResourceEntry | null { + if ( + result.status && + result.status >= 200 && + result.status < 400 && + result.status !== 304 && + result.status !== 204 + ) { + const { fuzzyCanonUrl } = fuzzyMatcher.getRuleFor(result.url); if (!fuzzyCanonUrl || fuzzyCanonUrl === result.url) { return null; @@ -412,7 +574,7 @@ class ArchiveDB { origURL: result.url, origTS: result.ts, pageId: result.pageId, - digest: result.digest + digest: result.digest, }; return fuzzyRes; @@ -421,44 +583,51 @@ class ArchiveDB { return null; } - async addResource(data) { + async addResource(data: ResourceEntry): Promise { if (data.payload && data.payload.length > this.minDedupSize) { if (!data.digest) { data.digest = await digestMessage(data.payload, "sha-256"); } } - let digestRefCount = null; + let digestRefCount: DigestRefCount | null = null; let isNew = false; - const tx = this.db.transaction(["resources", "digestRef", "payload"], "readwrite"); + const tx = this.db!.transaction( + ["resources", "digestRef", "payload"], + "readwrite", + ); if (data.payload && data.payload.length > this.minDedupSize) { - digestRefCount = await this.dedupResource(data.digest, data.payload, tx); - isNew = (digestRefCount && digestRefCount.count === 1); + digestRefCount = await this.dedupResource( + data.digest || "", + data.payload, + tx, + ); + isNew = !!digestRefCount && digestRefCount.count === 1; delete data.payload; } else if (data.payload) { isNew = true; } if (data.mime !== REVISIT) { - tx.objectStore("resources").put(data); + void tx.objectStore("resources").put(data); const fuzzyUrlData = this.getFuzzyUrl(data); if (fuzzyUrlData) { - tx.objectStore("resources").put(fuzzyUrlData); + void tx.objectStore("resources").put(fuzzyUrlData); if (digestRefCount) { - digestRefCount.count++; + digestRefCount.count!++; } } } else { // using add() to allow failing if non-revisit already exists - tx.objectStore("resources").add(data); + void tx.objectStore("resources").add(data); } if (digestRefCount) { - tx.objectStore("digestRef").put(digestRefCount); + void tx.objectStore("digestRef").put(digestRefCount); } try { @@ -475,14 +644,21 @@ class ArchiveDB { return isNew; } - async getResource(request, rwPrefix, event, opts = {}) { + async getResource( + request: ArchiveRequest, + _prefix: string, + event: FetchEvent, + opts: ADBOpts = {}, + ): Promise { const ts = tsToDate(request.timestamp).getTime(); - let url = request.url; + let url: string = request.url; - let result = null; + let result: ResourceEntry | null = null; - const skip = this.repeatTracker ? this.repeatTracker.getSkipCount(event, url, request.request.method) : 0; - const newOpts = {...opts, skip}; + const skip = this.repeatTracker + ? this.repeatTracker.getSkipCount(event, url, request.request.method) + : 0; + const newOpts = { ...opts, skip }; if (url.startsWith("//")) { let useHttp = false; @@ -512,8 +688,12 @@ class ArchiveDB { } // check if redirect - if (result && result.origURL) { - const origResult = await this.lookupUrl(result.origURL, result.origTS || result.ts, opts); + if (result?.origURL) { + const origResult = await this.lookupUrl( + result.origURL, + result.origTS || result.ts, + opts, + ); if (origResult) { url = origResult.url; result = origResult; @@ -524,19 +704,21 @@ class ArchiveDB { return null; } - const status = result.status; - const statusText = result.statusText || getStatusText(status); + const status = result.status || 0; + const statusText: string = result.statusText || getStatusText(status); let payload = null; - if (!isNullBodyStatus()) { + if (!isNullBodyStatus(status)) { payload = await this.loadPayload(result, opts); if (!payload) { return null; } } - const headers = makeHeaders(result.respHeaders); + const headers = result.respHeaders + ? makeHeaders(result.respHeaders) + : new Headers(); const date = new Date(result.ts); @@ -548,15 +730,29 @@ class ArchiveDB { headers.set("Content-Location", url); } - return new ArchiveResponse({url, payload, status, statusText, headers, date, extraOpts}); + return new ArchiveResponse({ + url, + payload: payload as Uint8Array | null, + status, + statusText, + headers, + date, + extraOpts, + }); } - async loadPayload(result/*, opts*/) { + async loadPayload( + result: ResourceEntry, + _opts: ADBOpts, + ): Promise { if (result.digest && !result.payload) { - if (result.digest === EMPTY_PAYLOAD_SHA256 || result.digest === EMPTY_PAYLOAD_SHA1) { + if ( + result.digest === EMPTY_PAYLOAD_SHA256 || + result.digest === EMPTY_PAYLOAD_SHA1 + ) { return new Uint8Array([]); } - const payloadRes = await this.db.get("payload", result.digest); + const payloadRes = await this.db!.get("payload", result.digest); if (!payloadRes) { return null; } @@ -564,26 +760,35 @@ class ArchiveDB { return payload; } - return result.payload; + return result.payload || null; } - isSelfRedirect(url, result) { + isSelfRedirect(url: string, result: ResourceEntry | undefined) { try { - if (result && result.respHeaders && result.status >= 300 && result.status < 400) { - const location = new Headers(result.respHeaders).get("location"); + if ( + result?.respHeaders && + result.status && + result.status >= 300 && + result.status < 400 + ) { + const location = new Headers(result.respHeaders).get("location") || ""; if (new URL(location, url).href === url) { return true; } } - } catch (e) { + } catch (_e) { // just in case, ignore errors here, assume not self-redirect } return false; } - async lookupUrl(url, ts, opts = {}) { - const tx = this.db.transaction("resources", "readonly"); + async lookupUrl( + url: string, + ts?: number, + opts: ADBOpts = {}, + ): Promise { + const tx = this.db!.transaction("resources", "readonly"); if (ts) { const range = IDBKeyRange.bound([url, ts], [url, MAX_DATE_TS]); @@ -599,11 +804,13 @@ class ArchiveDB { return result; } } else { - let results = await tx.store.getAll(range, MAX_RESULTS); + let results = (await tx.store.getAll(range, MAX_RESULTS)) as + | ResourceEntry[] + | undefined; results = results || []; for (const result of results) { - if (opts.pageId && result.pageId && (result.pageId !== opts.pageId)) { + if (opts.pageId && result.pageId && result.pageId !== opts.pageId) { continue; } @@ -626,7 +833,7 @@ class ArchiveDB { for await (const cursor of tx.store.iterate(range, "prev")) { const result = cursor.value; - if (opts.pageId && result.pageId && (result.pageId !== opts.pageId)) { + if (opts.pageId && result.pageId && result.pageId !== opts.pageId) { continue; } @@ -644,8 +851,12 @@ class ArchiveDB { return null; } - async lookupQueryPrefix(url, opts) { - const {rule, prefix, fuzzyCanonUrl/*, fuzzyPrefix*/} = fuzzyMatcher.getRuleFor(url); + async lookupQueryPrefix( + url: string, + opts: ADBOpts, + ): Promise { + const { rule, prefix, fuzzyCanonUrl /*, fuzzyPrefix*/ } = + fuzzyMatcher.getRuleFor(url); if (fuzzyCanonUrl !== url) { const result = await this.lookupUrl(fuzzyCanonUrl, 0, opts); @@ -658,53 +869,72 @@ class ArchiveDB { } // only do fuzzy prefix match for custom rules that have a query - if (!rule && prefix === url && prefix === fuzzyCanonUrl && !url.endsWith("?")) { + if ( + !rule && + prefix === url && + prefix === fuzzyCanonUrl && + !url.endsWith("?") + ) { return null; } //todo: explore optimizing with incremental loading? - const results = await this.db.getAll("resources", this.getLookupRange(prefix, "prefix"), MAX_FUZZY_MATCH); + const results = await this.db!.getAll( + "resources", + this.getLookupRange(prefix, "prefix"), + MAX_FUZZY_MATCH, + ); - return fuzzyMatcher.fuzzyCompareUrls(url, results, rule); + return fuzzyMatcher.fuzzyCompareUrls(url, results, rule) as ResourceEntry; } - resJson(res) { + resJson(res: ResourceEntry): ResAPIResponse { const date = new Date(res.ts).toISOString(); return { url: res.url, date: date, ts: getTS(date), - mime: res.mime, - status: res.status + mime: res.mime || "", + status: res.status || 0, }; } - async resourcesByPage(pageId) { - return this.db.getAllFromIndex("resources", "pageId", pageId); + async resourcesByPage(pageId: string) { + return this.db!.getAllFromIndex("resources", "pageId", pageId); } - async* resourcesByPages2(pageIds) { + async *resourcesByPages2(pageIds: string[]) { pageIds.sort(); yield* this.matchAny("resources", "pageId", pageIds); } - async* resourcesByPages(pageIds) { - const tx = this.db.transaction("resources", "readonly"); + async *resourcesByPages(pageIds: string[]) { + const tx = this.db!.transaction("resources", "readonly"); for await (const cursor of tx.store.iterate()) { - if (pageIds.includes(cursor.value.pageId)) { + if (pageIds.includes(cursor.value.pageId!)) { yield cursor.value; } } } - async* matchAny(storeName, indexName, sortedKeys, subKey, openBound = false) { - const tx = this.db.transaction(storeName, "readonly"); + async *matchAny( + storeName: S, + indexName: ADBType[S] extends { indexes: {} } + ? keyof ADBType[S]["indexes"] | null + : null, + sortedKeys: string[], + subKey?: number, + openBound = false, + ) { + const tx = this.db!.transaction(storeName, "readonly"); const range = IDBKeyRange.lowerBound(sortedKeys[0], openBound); - let cursor = indexName ? await tx.store.index(indexName).openCursor(range) : await tx.store.openCursor(range); + let cursor = indexName + ? await tx.store.index(indexName).openCursor(range) + : await tx.store.openCursor(range); let i = 0; @@ -712,12 +942,12 @@ class ArchiveDB { let currKey, matchKey, matches; if (subKey !== undefined) { - currKey = cursor.key[subKey]; - matchKey = sortedKeys[i][subKey]; + currKey = (cursor.key as string[])[subKey]!; + matchKey = sortedKeys[i]![subKey]!; matches = currKey.startsWith(matchKey); } else { currKey = cursor.key; - matchKey = sortedKeys[i]; + matchKey = sortedKeys[i]!; matches = currKey === matchKey; } @@ -730,24 +960,36 @@ class ArchiveDB { yield cursor.value; cursor = await cursor.continue(); } else { + // TODO @emma-sg figure this out later + // @ts-expect-error cursor = await cursor.continue(sortedKeys[i]); } } } - async resourcesByUrlAndMime(url, mimes, count = 1000, prefix = true, fromUrl = "", fromTs = "") { + async resourcesByUrlAndMime( + url: string, + mimes: string, + count = 1000, + prefix = true, + fromUrl = "", + fromTs = "", + ): Promise { // if doing local mime filtering, need to remove count - const queryCount = mimes ? null : count; + const queryCount = mimes ? 0 : count; - const fullResults = await this.db.getAll("resources", - this.getLookupRange(url, prefix ? "prefix" : "exact", fromUrl, fromTs), queryCount); + const fullResults = await this.db!.getAll( + "resources", + this.getLookupRange(url, prefix ? "prefix" : "exact", fromUrl, fromTs), + queryCount, + ); - mimes = mimes.split(","); - const results = []; + const mimesArray = mimes.split(","); + const results: ResAPIResponse[] = []; for (const res of fullResults) { - for (const mime of mimes) { - if (!mime || (res.mime && res.mime.startsWith(mime))) { + for (const mime of mimesArray) { + if (!mime || res.mime?.startsWith(mime)) { results.push(this.resJson(res)); if (results.length === count) { return results; @@ -760,13 +1002,19 @@ class ArchiveDB { return results; } - async resourcesByMime(mimes, count = 100, fromMime = "", fromUrl = "", fromStatus = 0) { - mimes = mimes.split(","); - const results = []; + async resourcesByMime( + mimesStr: string, + count = 100, + fromMime = "", + fromUrl = "", + fromStatus = 0, + ): Promise { + const mimes = mimesStr.split(","); + const results: ResAPIResponse[] = []; mimes.sort(); - let startKey = []; + const startKey: [string, number, string][] = []; if (fromMime) { startKey.push([fromMime, fromStatus, fromUrl]); @@ -778,7 +1026,13 @@ class ArchiveDB { } } - for await (const result of this.matchAny("resources", "mimeStatusUrl", startKey, 0, true)) { + for await (const result of this.matchAny( + "resources", + "mimeStatusUrl", + startKey as unknown as string[], + 0, + true, + )) { results.push(this.resJson(result)); if (results.length === count) { @@ -811,20 +1065,21 @@ class ArchiveDB { */ } - async deletePage(id) { - const tx = this.db.transaction("pages", "readwrite"); + async deletePage( + id: string, + ): Promise<{ pageSize: number; dedupSize: number }> { + const tx = this.db!.transaction("pages", "readwrite"); const page = await tx.store.get(id); await tx.store.delete(id); const size = await this.deletePageResources(id); - return {pageSize: page && page.size || 0, - dedupSize: size}; + return { pageSize: page?.size || 0, dedupSize: size }; } - async deletePageResources(pageId) { - const digestSet = {}; + async deletePageResources(pageId: string): Promise { + const digestSet: Record = {}; - const tx = this.db.transaction("resources", "readwrite"); + const tx = this.db!.transaction("resources", "readwrite"); let cursor = await tx.store.index("pageId").openCursor(pageId); @@ -838,7 +1093,7 @@ class ArchiveDB { size += cursor.value.payload.length; } - tx.store.delete(cursor.primaryKey); + void tx.store.delete(cursor.primaryKey); cursor = await cursor.continue(); } @@ -846,22 +1101,22 @@ class ArchiveDB { await tx.done; // delete payloads - const tx2 = this.db.transaction(["payload", "digestRef"], "readwrite"); + const tx2 = this.db!.transaction(["payload", "digestRef"], "readwrite"); const digestRefStore = tx2.objectStore("digestRef"); for (const digest of Object.keys(digestSet)) { const ref = await digestRefStore.get(digest); if (ref) { - ref.count -= digestSet[digest]; + ref.count! -= digestSet[digest]!; } - if (ref && ref.count >= 1) { - digestRefStore.put(ref); + if (ref && ref.count! >= 1) { + void digestRefStore.put(ref); } else { size += ref ? ref.size : 0; - digestRefStore.delete(digest); - tx2.objectStore("payload").delete(digest); + void digestRefStore.delete(digest); + void tx2.objectStore("payload").delete(digest); } } @@ -869,32 +1124,39 @@ class ArchiveDB { return size; } - prefixUpperBound(url) { - return url.slice(0, -1) + String.fromCharCode(url.charCodeAt(url.length - 1) + 1); + prefixUpperBound(url: string) { + return ( + url.slice(0, -1) + String.fromCharCode(url.charCodeAt(url.length - 1) + 1) + ); } - getLookupRange(url, type, fromUrl, fromTs) { + getLookupRange( + url: string, + type: string, + fromUrl?: string, + fromTs?: string, + ): IDBKeyRange { let lower; let upper; switch (type) { - case "prefix": - lower = [url]; - upper = [this.prefixUpperBound(url)]; - break; + case "prefix": + lower = [url]; + upper = [this.prefixUpperBound(url)]; + break; - case "host": { - const origin = new URL(url).origin; - lower = [origin + "/"]; - upper = [origin + "0"]; - break; - } + case "host": { + const origin = new URL(url).origin; + lower = [origin + "/"]; + upper = [origin + "0"]; + break; + } - case "exact": - default: - lower = [url]; - //upper = [url + "!"]; - upper = [url, Number.MAX_SAFE_INTEGER]; + case "exact": + default: + lower = [url]; + //upper = [url + "!"]; + upper = [url, Number.MAX_SAFE_INTEGER]; } let exclusive; @@ -912,11 +1174,9 @@ class ArchiveDB { // =========================================================================== class RepeatTracker { - constructor() { - this.repeats = {}; - } + repeats: Record> = {}; - getSkipCount(event, url, method) { + getSkipCount(event: FetchEvent, url: string, method: string) { if (method !== "POST" && !url.endsWith(".m3u8")) { return 0; } @@ -943,8 +1203,3 @@ class RepeatTracker { return this.repeats[id][url]; } } - - -export { ArchiveDB }; - - diff --git a/src/baseparser.js b/src/baseparser.js deleted file mode 100644 index 0030963c..00000000 --- a/src/baseparser.js +++ /dev/null @@ -1,77 +0,0 @@ -const DEFAULT_BATCH_SIZE = 1000; - - -// =========================================================================== -class BaseParser -{ - constructor(batchSize = DEFAULT_BATCH_SIZE) { - this.batchSize = batchSize; - - this.promises = []; - - this.batch = []; - this.count = 0; - - this.dupeSet = new Set(); - } - - addPage(page) { - this.promises.push(this.db.addPage(page)); - } - - isBatchFull() { - return this.batch.length >= this.batchSize; - } - - addResource(res) { - if (this.isBatchFull()) { - this.flush(); - } - - if (Number.isNaN(res.ts)) { - console.warn("Skipping resource with missing/invalid ts: " + res.url); - return; - } - - const key = res.url + " " + res.ts; - - if (res.mime === "warc/revisit") { - if (this.dupeSet.has(key)) { - console.warn("Skipping duplicate revisit, prevent overriding non-revisit"); - return; - } - } else { - this.dupeSet.add(key); - } - - this.batch.push(res); - } - - flush() { - if (this.batch.length > 0) { - this.promises.push(this.db.addResources(this.batch)); - } - console.log(`Read ${this.count += this.batch.length} records`); - this.batch = []; - } - - async finishIndexing() { - this.flush(); - - this._finishLoad(); - - try { - await Promise.all(this.promises); - } catch (e) { - console.warn(e); - } - - this.promises = []; - } - - _finishLoad() { - - } -} - -export { BaseParser }; \ No newline at end of file diff --git a/src/baseparser.ts b/src/baseparser.ts new file mode 100644 index 00000000..5ee8d809 --- /dev/null +++ b/src/baseparser.ts @@ -0,0 +1,124 @@ +import { + type CollMetadata, + type ArchiveLoader, + type DBStore, + type PageEntry, +} from "./types"; + +const DEFAULT_BATCH_SIZE = 1000; + +export type ResourceEntry = { + url: string; + ts: number; + + digest?: string | null; + status?: number; + mime?: string; + + respHeaders?: Record | null; + reqHeaders?: Record | null; + recordDigest?: string | null; + payload?: Uint8Array | null; + reader?: AsyncIterable | Iterable | null; + referrer?: string | null; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + extraOpts?: Record | null; + pageId?: string | null; + origURL?: string | null; + origTS?: number | null; + source?: object; + requestUrl?: string | null; + method?: string | null; + requestBody?: Uint8Array; + loaded?: boolean; +}; + +// =========================================================================== +abstract class BaseParser implements ArchiveLoader { + batchSize: number; + promises: Promise[] = []; + batch: ResourceEntry[] = []; + count = 0; + dupeSet = new Set(); + //TODO + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + db: any; + + constructor(batchSize = DEFAULT_BATCH_SIZE) { + this.batchSize = batchSize; + } + + addPage(page: PageEntry) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + this.promises.push(this.db.addPage(page)); + } + + isBatchFull() { + return this.batch.length >= this.batchSize; + } + + addResource(res: ResourceEntry) { + if (this.isBatchFull()) { + this.flush(); + } + + if (Number.isNaN(res.ts)) { + console.warn("Skipping resource with missing/invalid ts: " + res.url); + return; + } + + const key = res.url + " " + res.ts; + + if (res.mime === "warc/revisit") { + if (this.dupeSet.has(key)) { + console.warn( + "Skipping duplicate revisit, prevent overriding non-revisit", + ); + return; + } + } else { + this.dupeSet.add(key); + } + + this.batch.push(res); + } + + flush() { + if (this.batch.length > 0) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + this.promises.push(this.db.addResources(this.batch)); + } + console.log(`Read ${(this.count += this.batch.length)} records`); + this.batch = []; + } + + async finishIndexing() { + this.flush(); + + this._finishLoad(); + + try { + await Promise.all(this.promises); + } catch (e) { + console.warn(e); + } + + this.promises = []; + } + + _finishLoad() {} + + abstract load( + db: DBStore, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + progressUpdateCallback?: any, + totalLength?: number, + ): Promise; +} + +export { BaseParser }; diff --git a/src/blockloaders.js b/src/blockloaders.js deleted file mode 100644 index ce5ec34f..00000000 --- a/src/blockloaders.js +++ /dev/null @@ -1,619 +0,0 @@ -import { AuthNeededError, AccessDeniedError, RangeError, sleep } from "./utils.js"; - -import { initAutoIPFS } from "./ipfs.js"; - -import { concatChunks } from "warcio"; - -// todo: make configurable -const HELPER_PROXY = "https://helper-proxy.webrecorder.workers.dev"; - - -// =========================================================================== -async function createLoader(opts) { - const { url } = opts; - - if (opts.extra && opts.extra.arrayBuffer) { - return new ArrayBufferLoader(opts.extra.arrayBuffer); - } - - const scheme = url.split(":", 1)[0]; - - // built-in loaders - switch (scheme) { - case "blob": - return new BlobCacheLoader(opts); - - case "http": - case "https": - return new FetchRangeLoader(opts); - - case "file": - return new FileHandleLoader(opts); - - case "googledrive": - return new GoogleDriveLoader(opts); - - case "ipfs": - return new IPFSRangeLoader(opts); - } - - // if URL has same scheme as current origin, use regular http fetch - try { - if (self.location && scheme === self.location.protocol.split(":")[0]) { - return new FetchRangeLoader(opts); - } - } catch (e) { - // likely no self and self.location, so ignore - } - - // see if the specified scheme is generally fetchable - try { - await fetch(`${scheme}://localhost`, {method: "HEAD"}); - // if reached here, scheme is supported, so use fetch loader - return new FetchRangeLoader(opts); - } catch (e) { - // if raised exception, scheme not supported, don't use fetch loader - } - - // custom provided loaders - throw new Error("Invalid URL: " + url); -} - -// =========================================================================== -class FetchRangeLoader -{ - constructor({url, headers, length = null, canLoadOnDemand = false}) { - this.url = url; - this.headers = headers || {}; - this.length = length; - this.canLoadOnDemand = canLoadOnDemand; - this.isValid = false; - this.ipfsAPI = null; - this.loadingIPFS = null; - } - - async doInitialFetch(tryHead, skipRange = false) { - const headers = new Headers(this.headers); - if (!skipRange) { - headers.set("Range", "bytes=0-"); - } - - this.isValid = false; - let abort = null; - let response = null; - - if (tryHead) { - try { - response = await this.retryFetch(this.url, {headers, method: "HEAD", cache: "no-store"}); - if (response.status === 200 || response.status == 206) { - this.canLoadOnDemand = ((response.status === 206) || response.headers.get("Accept-Ranges") === "bytes"); - this.isValid = true; - } - } catch (e) { - // ignore fetch failure, considered invalid - } - } - - if (!this.isValid || !this.canLoadOnDemand) { - abort = new AbortController(); - const signal = abort.signal; - response = await this.retryFetch(this.url, {headers, signal, cache: "no-store"}); - this.canLoadOnDemand = ((response.status === 206) || response.headers.get("Accept-Ranges") === "bytes"); - this.isValid = (response.status === 206 || response.status === 200); - - // if emulating HEAD, abort here - if (tryHead) { - abort.abort(); - abort = null; - } - } - - if (this.length === null) { - this.length = Number(response.headers.get("Content-Length")); - if (!this.length && response.status === 206) { - let range = response.headers.get("Content-Range"); - if (range) { - range = range.split("/"); - if (range.length === 2){ - this.length = range[1]; - } - } - } - } - - if (this.length === null) { - // attempt to get length via proxy - try { - const resp = await fetch(`${HELPER_PROXY}/c/${this.url}`); - const json = await resp.json(); - if (json.size) { - this.length = json.size; - } - } catch (e) { - console.log("Error fetching from helper: " + e.toString()); - } - } - - this.length = Number(this.length || 0); - - return {response, abort}; - } - - async getLength() { - if (this.length === null) { - const {abort} = await this.doInitialFetch(true); - if (abort) { - abort.abort(); - } - } - return this.length; - } - - async getRange(offset, length, streaming = false, signal = null) { - const headers = new Headers(this.headers); - headers.set("Range", `bytes=${offset}-${offset + length - 1}`); - - const cache = "no-store"; - - const options = {signal, headers, cache}; - - let resp = null; - - try { - resp = await this.retryFetch(this.url, options); - } catch(e) { - console.log(e); - throw new RangeError(this.url); - } - - if (resp.status != 206) { - const info = {url: this.url, status: resp.status, resp}; - - if (resp.status === 401) { - throw new AuthNeededError(info); - } else if (resp.status == 403) { - throw new AccessDeniedError(info); - } else { - throw new RangeError(info); - } - } - - if (streaming) { - return resp.body; - } else { - return new Uint8Array(await resp.arrayBuffer()); - } - } - - async retryFetch(url, options) { - let resp = null; - let backoff = 1000; - for (let count = 0; count < 20; count++) { - resp = await fetch(url, options); - if (resp.status !== 429) { - break; - } - await sleep(backoff); - backoff += 2000; - } - return resp; - } -} - -// =========================================================================== -class GoogleDriveLoader -{ - constructor({url, headers, size, extra}) { - this.fileId = url.slice("googledrive://".length); - this.apiUrl = `https://www.googleapis.com/drive/v3/files/${this.fileId}?alt=media`; - this.canLoadOnDemand = true; - - this.headers = headers; - if (extra && extra.publicUrl) { - this.publicUrl = extra.publicUrl; - } else { - this.publicUrl = null; - } - this.length = size; - this.isValid = false; - } - - async getLength() { - return this.length; - } - - async doInitialFetch(tryHead) { - let loader = null; - let result = null; - - if (this.publicUrl) { - loader = new FetchRangeLoader({url: this.publicUrl, length: this.length}); - try { - result = await loader.doInitialFetch(tryHead); - } catch(e) { - // catch and ignore, considered invalid - } - - if (!loader.isValid) { - if (result && result.abort) { - result.abort.abort(); - } - - if (await this.refreshPublicUrl()) { - loader = new FetchRangeLoader({url: this.publicUrl, length: this.length}); - try { - result = await loader.doInitialFetch(tryHead); - } catch(e) { - // catch and ignore, considered invalid - } - - if (!loader.isValid && result && result.abort) { - result.abort.abort(); - } - } - } - } - - if (!loader || !loader.isValid) { - this.publicUrl = null; - loader = new FetchRangeLoader({url: this.apiUrl, headers: this.headers, length: this.length}); - result = await loader.doInitialFetch(tryHead); - } - - this.isValid = loader.isValid; - if (!this.length) { - this.length = loader.length; - } - return result; - } - - async getRange(offset, length, streaming = false, signal) { - let loader = null; - - if (this.publicUrl) { - loader = new FetchRangeLoader({url: this.publicUrl, length: this.length}); - - try { - return await loader.getRange(offset, length, streaming, signal); - } catch (e) { - if (await this.refreshPublicUrl()) { - loader = new FetchRangeLoader({url: this.publicUrl, length: this.length}); - try { - return await loader.getRange(offset, length, streaming, signal); - } catch (e) { - // ignore fetch failure, considered invalid - } - } - } - - //disable public mode? - this.publicUrl = null; - } - - loader = new FetchRangeLoader({url: this.apiUrl, headers: this.headers, length: this.length}); - - let backoff = 50; - - while (backoff < 2000) { - try { - return await loader.getRange(offset, length, streaming, signal); - } catch(e) { - if ((e instanceof AccessDeniedError) && - e.info && e.info.resp && e.info.resp.headers.get("content-type"). - startsWith("application/json")) { - const err = await e.info.resp.json(); - if (err.error && err.error.errors && err.error.errors[0].reason === "userRateLimitExceeded") { - console.log(`Exponential backoff, waiting for: ${backoff}`); - await sleep(backoff); - backoff *= 2; - continue; - } - } - throw e; - } - } - } - - async refreshPublicUrl() { - try { - const resp = await fetch(`${HELPER_PROXY}/g/${this.fileId}`); - const json = await resp.json(); - if (json.url) { - this.publicUrl = json.url; - return true; - } - } catch (e) { - // ignore, return false - } - - return false; - } -} - -// =========================================================================== -class ArrayBufferLoader -{ - constructor(arrayBuffer) { - this.arrayBuffer = arrayBuffer; - this.size = arrayBuffer.length; - - this.canLoadOnDemand = true; - } - - get length() { - return this.size; - } - - get isValid() { - return !!this.arrayBuffer; - } - - async getLength() { - return this.size; - } - - async doInitialFetch(tryHead = false) { - const stream = tryHead ? null : getReadableStreamFromArray(this.arrayBuffer); - - const response = new Response(stream); - - return {response}; - } - - async getRange(offset, length, streaming = false/*, signal*/) { - const range = this.arrayBuffer.slice(offset, offset + length); - - return streaming ? getReadableStreamFromArray(range) : range; - } -} - - -// =========================================================================== -class BlobCacheLoader -{ - constructor({url, blob = null, size = null}) { - this.url = url; - this.blob = blob; - this.size = this.blob ? this.blob.size : size; - - this.canLoadOnDemand = true; - } - - get length() { - return this.size; - } - - get isValid() { - return !!this.blob; - } - - async getLength() { - if (!this.blob || !this.blob.size) { - let response = await fetch(this.url); - this.blob = await response.blob(); - this.size = this.blob.size; - } - return this.size; - } - - async doInitialFetch(tryHead = false) { - if (!this.blob) { - try { - const response = await fetch(this.url); - this.blob = await response.blob(); - this.size = this.blob.size; - } catch (e) { - console.warn(e); - throw e; - } - } - - this.arrayBuffer = this.blob.arrayBuffer ? await this.blob.arrayBuffer() : await this._getArrayBuffer(); - this.arrayBuffer = new Uint8Array(this.arrayBuffer); - - const stream = tryHead ? null : getReadableStreamFromArray(this.arrayBuffer); - - const response = new Response(stream); - - return {response}; - } - - async getRange(offset, length, streaming = false/*, signal*/) { - if (!this.arrayBuffer) { - await this.doInitialFetch(true); - } - - const range = this.arrayBuffer.slice(offset, offset + length); - - return streaming ? getReadableStreamFromArray(range) : range; - } - - _getArrayBuffer() { - return new Promise((resolve) => { - const fr = new FileReader(); - fr.onloadend = () => { - resolve(fr.result); - }; - fr.readAsArrayBuffer(this.blob); - }); - } -} - -// =========================================================================== -class FileHandleLoader -{ - constructor({blob, size, extra, url}) - { - this.url = url; - this.file = blob; - this.size = this.blob ? this.blob.size : size; - - this.fileHandle = extra.fileHandle; - - this.canLoadOnDemand = true; - } - - get length() { - return this.size; - } - - get isValid() { - return !!this.file; - } - - async getLength() { - if (this.size === undefined) { - await this.initFileObject(); - } - return this.size; - } - - async initFileObject() { - const options = {mode: "read"}; - - const curr = await this.fileHandle.queryPermission(options); - - if (curr !== "granted") { - const requested = await this.fileHandle.requestPermission(options); - - if (requested !== "granted") { - throw new AuthNeededError({fileHandle: this.fileHandle}); - } - } - - this.file = await this.fileHandle.getFile(); - this.size = this.file.size; - } - - async doInitialFetch(tryHead = false) { - if (!this.file) { - await this.initFileObject(); - } - - const stream = tryHead ? null : this.file.stream(); - - const response = new Response(stream); - - return {response}; - } - - async getRange(offset, length, streaming = false/*, signal*/) { - if (!this.file) { - await this.initFileObject(); - } - - const fileSlice = this.file.slice(offset, offset + length); - - return streaming ? fileSlice.stream() : new Uint8Array(await fileSlice.arrayBuffer()); - } -} - -// =========================================================================== -class IPFSRangeLoader -{ - constructor({url, headers, ...opts}) { - this.url = url; - this.opts = opts; - - let inx = url.lastIndexOf("#"); - if (inx < 0) { - inx = undefined; - } - - this.headers = headers; - this.length = null; - this.canLoadOnDemand = true; - } - - async getLength() { - if (this.length === null) { - await this.doInitialFetch(true); - } - - return this.length; - } - - async doInitialFetch(tryHead) { - const autoipfsClient = await initAutoIPFS(this.opts); - - try { - this.length = await autoipfsClient.getSize(this.url); - this.isValid = (this.length !== null); - } catch (e) { - console.warn(e); - this.length = null; - this.isValid = false; - } - - let status = 206; - - if (!this.isValid) { - status = 404; - } - - const abort = new AbortController(); - const signal = abort.signal; - let body; - - if (tryHead || !this.isValid) { - body = new Uint8Array([]); - } else { - const iter = autoipfsClient.get(this.url, {signal}); - body = getReadableStreamFromIter(iter); - } - - const response = new Response(body, {status}); - - return {response, abort}; - } - - async getRange(offset, length, streaming = false, signal = null) { - const autoipfsClient = await initAutoIPFS(this.opts); - - const iter = autoipfsClient.get(this.url, { - start: offset, - end: offset + length - 1, - signal - }); - - if (streaming) { - return getReadableStreamFromIter(iter); - } else { - const chunks = []; - let size = 0; - - for await (const chunk of iter) { - chunks.push(chunk); - size += chunk.byteLength; - } - - return concatChunks(chunks, size); - } - } -} - -export function getReadableStreamFromIter(stream) { - return new ReadableStream({ - start: async (controller) => { - try { - for await (const chunk of stream) { - controller.enqueue(chunk); - } - } catch (e) { - console.log(e); - } - controller.close(); - } - }); -} - -export function getReadableStreamFromArray(array) { - return new ReadableStream({ - start(controller) { - controller.enqueue(array); - controller.close(); - } - }); -} - -export { createLoader }; diff --git a/src/blockloaders.ts b/src/blockloaders.ts new file mode 100644 index 00000000..86d9a663 --- /dev/null +++ b/src/blockloaders.ts @@ -0,0 +1,850 @@ +import { AuthNeededError, AccessDeniedError, RangeError, sleep } from "./utils"; + +import { initAutoIPFS } from "./ipfs"; + +import { concatChunks } from "warcio"; + +// todo: make configurable +const HELPER_PROXY = "https://helper-proxy.webrecorder.workers.dev"; + +export type ResponseAbort = { + response: Response; + abort: AbortController | null; +}; + +export type BlockLoaderExtra = { + arrayBuffer?: Uint8Array; + publicUrl?: string; + fileHandle?: FileSystemFileHandle; +}; + +export type BlockLoaderOpts = { + url: string; + headers?: Record | Headers; + extra?: BlockLoaderExtra; + size?: number; + blob?: Blob; +}; + +// =========================================================================== +export async function createLoader(opts: BlockLoaderOpts): Promise { + const { url } = opts; + + if (opts.extra?.arrayBuffer) { + return new ArrayBufferLoader(opts.extra.arrayBuffer); + } + + const scheme = url.split(":", 1)[0]; + + // built-in loaders + switch (scheme) { + case "blob": + return new BlobCacheLoader(opts); + + case "http": + case "https": + return new FetchRangeLoader(opts); + + case "file": + return new FileHandleLoader(opts); + + case "googledrive": + return new GoogleDriveLoader(opts); + + case "ipfs": + return new IPFSRangeLoader(opts); + } + + // if URL has same scheme as current origin, use regular http fetch + try { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (self.location && scheme === self.location.protocol.split(":")[0]) { + return new FetchRangeLoader(opts); + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // likely no self and self.location, so ignore + } + + // see if the specified scheme is generally fetchable + try { + await fetch(`${scheme}://localhost`, { method: "HEAD" }); + // if reached here, scheme is supported, so use fetch loader + return new FetchRangeLoader(opts); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // if raised exception, scheme not supported, don't use fetch loader + } + + // custom provided loaders + throw new Error("Invalid URL: " + url); +} + +// =========================================================================== +export abstract class BaseLoader { + canLoadOnDemand = true; + headers: Record | Headers = {}; + length: number | null = null; + + constructor(canLoadOnDemand: boolean) { + this.canLoadOnDemand = canLoadOnDemand; + } + + abstract doInitialFetch( + tryHead: boolean, + skipRange: boolean, + ): Promise; + + abstract getLength(): Promise; + + abstract getRange( + offset: number, + length: number, + streaming: boolean, + signal?: AbortSignal | null, + ): Promise>; + + abstract get isValid(): boolean; +} + +// =========================================================================== +class FetchRangeLoader extends BaseLoader { + url: string; + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'BaseLoader'. + length: number | null; + isValid = false; + ipfsAPI = null; + loadingIPFS = null; + + constructor({ + url, + headers, + length = null, + canLoadOnDemand = false, + }: { + url: string; + headers?: Record | Headers; + length?: number | null; + canLoadOnDemand?: boolean; + }) { + super(canLoadOnDemand); + + this.url = url; + this.headers = headers || {}; + this.length = length; + this.canLoadOnDemand = canLoadOnDemand; + } + + override async doInitialFetch( + tryHead: boolean, + skipRange = false, + ): Promise { + const headers = new Headers(this.headers); + if (!skipRange) { + headers.set("Range", "bytes=0-"); + } + + this.isValid = false; + let abort: AbortController | null = null; + let response: Response | null = null; + + if (tryHead) { + try { + response = await this.retryFetch(this.url, { + headers, + method: "HEAD", + cache: "no-store", + }); + if (response.status === 200 || response.status == 206) { + this.canLoadOnDemand = + response.status === 206 || + response.headers.get("Accept-Ranges") === "bytes"; + this.isValid = true; + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // ignore fetch failure, considered invalid + } + } + + if (!this.isValid || !this.canLoadOnDemand) { + abort = new AbortController(); + const signal = abort.signal; + response = await this.retryFetch(this.url, { + headers, + signal, + cache: "no-store", + }); + this.canLoadOnDemand = + response.status === 206 || + response.headers.get("Accept-Ranges") === "bytes"; + this.isValid = response.status === 206 || response.status === 200; + + // if emulating HEAD, abort here + if (tryHead) { + abort.abort(); + abort = null; + } + } + + if (this.length === null && response) { + this.length = Number(response.headers.get("Content-Length")); + if (!this.length && response.status === 206) { + const range = response.headers.get("Content-Range"); + if (range) { + const rangeParts = range.split("/"); + if (rangeParts.length === 2) { + // @ts-expect-error [TODO] - TS2345 - Argument of type 'string | undefined' is not assignable to parameter of type 'string'. + this.length = parseInt(rangeParts[1]); + } + } + } + } + + if (this.length === null) { + // attempt to get length via proxy + try { + const resp = await fetch(`${HELPER_PROXY}/c/${this.url}`); + const json = await resp.json(); + if (json.size) { + this.length = json.size; + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e: any) { + console.log("Error fetching from helper: " + e.toString()); + } + } + + this.length = Number(this.length || 0); + + return { response: response!, abort }; + } + + async getLength() { + if (this.length === null) { + const { abort } = await this.doInitialFetch(true); + if (abort) { + abort.abort(); + } + } + return this.length || 0; + } + + async getRange( + offset: number, + length: number, + streaming = false, + signal: AbortSignal | null = null, + ) { + const headers = new Headers(this.headers); + headers.set("Range", `bytes=${offset}-${offset + length - 1}`); + + const cache: RequestCache = "no-store"; + + const options = { signal, headers, cache }; + + let resp: Response; + + try { + resp = await this.retryFetch(this.url, options); + } catch (e) { + console.log(e); + throw new RangeError(this.url); + } + + if (resp.status != 206) { + const info = { url: this.url, status: resp.status, resp }; + + if (resp.status === 401) { + throw new AuthNeededError(info); + } else if (resp.status == 403) { + throw new AccessDeniedError(info); + } else { + throw new RangeError(info); + } + } + + if (streaming) { + return resp.body || new Uint8Array(); + } else { + return new Uint8Array(await resp.arrayBuffer()); + } + } + + async retryFetch(url: string, options: RequestInit): Promise { + let backoff = 1000; + for (let count = 0; count < 20; count++) { + const resp = await fetch(url, options); + if (resp.status !== 429) { + return resp; + } + await sleep(backoff); + backoff += 2000; + } + throw new Error("retryFetch failed"); + } +} + +// =========================================================================== +class GoogleDriveLoader extends BaseLoader { + fileId: string; + apiUrl: string; + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'BaseLoader'. + length: number; + + publicUrl: string | null = null; + isValid = false; + + constructor({ + url, + headers, + size, + extra, + }: { + url: string; + headers?: Record | Headers; + size?: number; + extra?: BlockLoaderExtra; + }) { + super(true); + + this.fileId = url.slice("googledrive://".length); + this.apiUrl = `https://www.googleapis.com/drive/v3/files/${this.fileId}?alt=media`; + + this.headers = headers || {}; + if (extra?.publicUrl) { + this.publicUrl = extra.publicUrl; + } + this.length = size || 0; + } + + override async getLength(): Promise { + return this.length; + } + + override async doInitialFetch(tryHead: boolean): Promise { + let loader: FetchRangeLoader | null = null; + let result: ResponseAbort | null = null; + + if (this.publicUrl) { + loader = new FetchRangeLoader({ + url: this.publicUrl, + length: this.length, + }); + try { + result = await loader.doInitialFetch(tryHead); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // catch and ignore, considered invalid + } + + if (!loader.isValid) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/prefer-optional-chain + if (result && result.abort) { + result.abort.abort(); + } + + if (await this.refreshPublicUrl()) { + loader = new FetchRangeLoader({ + url: this.publicUrl, + length: this.length, + }); + try { + result = await loader.doInitialFetch(tryHead); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // catch and ignore, considered invalid + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/prefer-optional-chain + if (!loader.isValid && result && result.abort) { + result.abort.abort(); + } + } + } + } + + if (!loader?.isValid) { + this.publicUrl = null; + loader = new FetchRangeLoader({ + url: this.apiUrl, + headers: this.headers, + length: this.length, + }); + result = await loader.doInitialFetch(tryHead); + } + + this.isValid = loader.isValid; + if (!this.length && loader.length) { + this.length = loader.length; + } + return result!; + } + + async getRange( + offset: number, + length: number, + streaming = false, + signal: AbortSignal, + ) { + let loader: FetchRangeLoader | null = null; + + if (this.publicUrl) { + loader = new FetchRangeLoader({ + url: this.publicUrl, + length: this.length, + }); + + try { + return await loader.getRange(offset, length, streaming, signal); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + if (await this.refreshPublicUrl()) { + loader = new FetchRangeLoader({ + url: this.publicUrl, + length: this.length, + }); + try { + return await loader.getRange(offset, length, streaming, signal); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // ignore fetch failure, considered invalid + } + } + } + + //disable public mode? + this.publicUrl = null; + } + + loader = new FetchRangeLoader({ + url: this.apiUrl, + headers: this.headers, + length: this.length, + }); + + let backoff = 50; + + while (backoff < 2000) { + try { + return await loader.getRange(offset, length, streaming, signal); + } catch (e) { + if ( + e instanceof AccessDeniedError && + // @ts-expect-error [TODO] - TS4111 - Property 'resp' comes from an index signature, so it must be accessed with ['resp']. + e.info.resp?.headers + .get("content-type") + .startsWith("application/json") + ) { + // @ts-expect-error [TODO] - TS4111 - Property 'resp' comes from an index signature, so it must be accessed with ['resp']. + const err = await e.info.resp.json(); + if ( + err.error?.errors && + err.error.errors[0].reason === "userRateLimitExceeded" + ) { + console.log(`Exponential backoff, waiting for: ${backoff}`); + await sleep(backoff); + backoff *= 2; + continue; + } + } + throw e; + } + } + + throw new RangeError("not found"); + } + + async refreshPublicUrl() { + try { + const resp = await fetch(`${HELPER_PROXY}/g/${this.fileId}`); + const json = await resp.json(); + if (json.url) { + this.publicUrl = json.url; + return true; + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + // ignore, return false + } + + return false; + } +} + +// =========================================================================== +class ArrayBufferLoader extends BaseLoader { + arrayBuffer: Uint8Array; + size: number; + + constructor(arrayBuffer: Uint8Array) { + super(true); + + this.arrayBuffer = arrayBuffer; + this.size = arrayBuffer.length; + this.length = this.size; + } + + get isValid() { + return !!this.arrayBuffer; + } + + override async getLength() { + return this.size; + } + + override async doInitialFetch(tryHead = false): Promise { + const stream = tryHead + ? null + : getReadableStreamFromArray(this.arrayBuffer); + + const response = new Response(stream); + + return { response, abort: null }; + } + + async getRange( + offset: number, + length: number, + streaming = false /*, signal*/, + ) { + const range = this.arrayBuffer.slice(offset, offset + length); + + return streaming ? getReadableStreamFromArray(range) : range; + } +} + +// =========================================================================== +class BlobCacheLoader extends BaseLoader { + url: string; + blob: Blob | null; + size: number; + arrayBuffer: Uint8Array | null = null; + + constructor({ + url, + blob = null, + size = null, + }: { + url: string; + blob?: Blob | null; + size?: number | null; + }) { + super(true); + this.url = url; + this.blob = blob; + this.size = this.blob ? this.blob.size : size || 0; + this.length = this.size; + } + + get isValid() { + return !!this.blob; + } + + override async getLength() { + if (!this.blob?.size) { + const response = await fetch(this.url); + this.blob = await response.blob(); + this.size = this.blob.size; + this.length = this.size; + } + return this.size; + } + + override async doInitialFetch(tryHead = false): Promise { + if (!this.blob) { + try { + const response = await fetch(this.url); + this.blob = await response.blob(); + this.size = this.blob.size; + this.length = this.size; + } catch (e) { + console.warn(e); + throw e; + } + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + const arrayBuffer = this.blob.arrayBuffer + ? await this.blob.arrayBuffer() + : await this._getArrayBuffer(); + this.arrayBuffer = new Uint8Array(arrayBuffer); + + const stream = tryHead + ? null + : getReadableStreamFromArray(this.arrayBuffer); + + const response = new Response(stream); + + return { response, abort: null }; + } + + async getRange( + offset: number, + length: number, + streaming = false /*, signal*/, + ) { + if (!this.arrayBuffer) { + await this.doInitialFetch(true); + } + + const range = this.arrayBuffer!.slice(offset, offset + length); + + return streaming ? getReadableStreamFromArray(range) : range; + } + + async _getArrayBuffer(): Promise { + return new Promise((resolve, reject) => { + const fr = new FileReader(); + fr.onloadend = () => { + if (fr.result instanceof ArrayBuffer) { + resolve(fr.result); + } else { + reject(fr.result); + } + }; + if (this.blob) { + fr.readAsArrayBuffer(this.blob); + } + }); + } +} + +// =========================================================================== +class FileHandleLoader extends BaseLoader { + url: string; + file: Blob | null; + size: number; + fileHandle: FileSystemFileHandle; + + constructor({ + blob, + size, + extra, + url, + }: { + blob?: Blob | null; + size?: number; + extra?: BlockLoaderExtra; + url: string; + }) { + super(true); + + this.url = url; + this.file = null; + this.size = blob ? blob.size : size || 0; + this.length = this.size; + + this.fileHandle = extra!.fileHandle!; + } + + get isValid() { + return !!this.file; + } + + override async getLength(): Promise { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (this.size === undefined) { + await this.initFileObject(); + } + return this.size; + } + + async initFileObject() { + const options: FileSystemHandlePermissionDescriptor = { mode: "read" }; + + const curr = await this.fileHandle.queryPermission(options); + + if (curr !== "granted") { + const requested = await this.fileHandle.requestPermission(options); + + if (requested !== "granted") { + throw new AuthNeededError({ fileHandle: this.fileHandle }); + } + } + + this.file = await this.fileHandle.getFile(); + this.size = this.file.size; + this.length = this.size; + } + + override async doInitialFetch(tryHead = false): Promise { + if (!this.file) { + await this.initFileObject(); + } + + const stream = tryHead ? null : this.file!.stream(); + + const response = new Response(stream); + + return { response, abort: null }; + } + + async getRange( + offset: number, + length: number, + streaming = false /*, signal*/, + ) { + if (!this.file) { + await this.initFileObject(); + } + + const fileSlice = this.file!.slice(offset, offset + length); + + return streaming + ? fileSlice.stream() + : new Uint8Array(await fileSlice.arrayBuffer()); + } +} + +// =========================================================================== +class IPFSRangeLoader extends BaseLoader { + url: string; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + opts: Record; + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'BaseLoader'. + length: number | null; + isValid = false; + + constructor({ + url, + headers, + ...opts + }: { + url: string; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + headers?: Record; + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + opts?: Record; + }) { + super(true); + + this.url = url; + this.opts = opts; + + // let inx = url.lastIndexOf("#"); + // if (inx < 0) { + // inx = undefined; + // } + + this.headers = headers || {}; + this.length = null; + } + + override async getLength(): Promise { + if (this.length === null) { + await this.doInitialFetch(true); + } + + return this.length!; + } + + override async doInitialFetch(tryHead: boolean): Promise { + const autoipfsClient = await initAutoIPFS(this.opts); + + try { + this.length = await autoipfsClient.getSize(this.url); + this.isValid = this.length !== null; + } catch (e) { + console.warn(e); + this.length = null; + this.isValid = false; + } + + let status = 206; + + if (!this.isValid) { + status = 404; + } + + const abort = new AbortController(); + const signal = abort.signal; + let body; + + if (tryHead || !this.isValid) { + body = new Uint8Array([]); + } else { + const iter = autoipfsClient.get(this.url, { signal }); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + body = getReadableStreamFromIter(iter); + } + + const response = new Response(body, { status }); + + return { response, abort }; + } + + async getRange( + offset: number, + length: number, + streaming = false, + signal: AbortSignal | null = null, + ) { + const autoipfsClient = await initAutoIPFS(this.opts); + + const iter = autoipfsClient.get(this.url, { + start: offset, + end: offset + length - 1, + signal, + }); + + if (streaming) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + return getReadableStreamFromIter(iter); + } else { + const chunks: Uint8Array[] = []; + let size = 0; + + for await (const chunk of iter) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + chunks.push(chunk); + size += chunk.byteLength; + } + + return concatChunks(chunks, size); + } + } +} + +export function getReadableStreamFromIter(stream: AsyncIterable) { + return new ReadableStream({ + start: async (controller) => { + try { + for await (const chunk of stream) { + controller.enqueue(chunk); + } + } catch (e) { + console.log(e); + } + controller.close(); + }, + }); +} + +export function getReadableStreamFromArray(array: Uint8Array) { + return new ReadableStream({ + start(controller) { + controller.enqueue(array); + controller.close(); + }, + }); +} diff --git a/src/cdxloader.js b/src/cdxloader.js deleted file mode 100644 index 1f9c0183..00000000 --- a/src/cdxloader.js +++ /dev/null @@ -1,191 +0,0 @@ -import { tsToDate } from "./utils.js"; -import { WARCLoader } from "./warcloader.js"; - -import { CDXIndexer, AsyncIterReader, appendRequestQuery } from "warcio"; - - -export const CDX_COOKIE = "req.http:cookie"; - - -// =========================================================================== -class CDXFromWARCLoader extends WARCLoader -{ - constructor(reader, abort, id, sourceExtra = {}, shaPrefix = "sha256:") { - super(reader, abort, id); - this.cdxindexer = null; - this.sourceExtra = sourceExtra; - this.shaPrefix = shaPrefix; - } - - filterRecord(record) { - switch (record.warcType) { - case "warcinfo": - case "revisit": - case "request": - return null; - - case "metadata": - return this.shouldIndexMetadataRecord(record) ? null : "skip"; - } - - const url = record.warcTargetURI; - const ts = new Date(record.warcDate).getTime(); - - if (this.pageMap[ts + "/" + url]) { - record._isPage = true; - return null; - } - } - - index(record, parser) { - if (record) { - record._offset = parser.offset; - record._length = parser.recordLength; - } - return super.index(record, parser); - } - - indexReqResponse(record, reqRecord, parser) { - if (record._isPage) { - return super.indexReqResponse(record, reqRecord, parser); - } - - if (record.warcType === "warcinfo") { - this.parseWarcInfo(record); - return; - } - - if (!this.cdxindexer) { - this.cdxindexer = new CDXIndexer({noSurt: true}, null); - } - - const cdx = this.cdxindexer.indexRecordPair(record, reqRecord, parser, ""); - - if (!cdx) { - return; - } - - if (cdx.status === 206 && !this.isFullRangeRequest(record.httpHeaders.headers)) { - return; - } - - if (reqRecord && reqRecord.httpHeaders) { - let cookie = reqRecord.httpHeaders.headers.get("cookie"); - if (cookie) { - cdx[CDX_COOKIE] = cookie; - } - } - - this.addCdx(cdx); - } - - getSource(cdx) { - return { - ...this.sourceExtra, - path: cdx.filename, - start: Number(cdx.offset), - length: Number(cdx.length) - }; - } - - addCdx(cdx) { - const { url, mime } = cdx; - - const status = Number(cdx.status) || 200; - - const date = tsToDate(cdx.timestamp); - const ts = date.getTime(); - - //if (this.detectPages && isPage(url, status, mime)) { - // const title = url; - // promises.push(this.db.addPage({url, date: date.toISOString(), title})); - //} - - const source = this.getSource(cdx); - - let { digest, recordDigest } = cdx; - if (digest && digest.indexOf(":") === -1) { - digest = this.shaPrefix + digest; - } - - const entry = {url, ts, status, digest, recordDigest, mime, loaded: false, source}; - - if (cdx.method) { - if (cdx.method === "HEAD" || cdx.method === "OPTIONS") { - return; - } - entry.method = cdx.method; - } - - if (cdx[CDX_COOKIE]) { - entry[CDX_COOKIE] = cdx[CDX_COOKIE]; - } - - // url with post query appended - if (cdx.method && cdx.method !== "GET") { - entry.url = appendRequestQuery(cdx.url, cdx.requestBody || "", cdx.method); - } - - this.addResource(entry); - } -} - -// =========================================================================== -class CDXLoader extends CDXFromWARCLoader -{ - async load(db, progressUpdate, totalSize) { - this.db = db; - - let reader = this.reader; - - if (!reader.iterLines) { - reader = new AsyncIterReader(this.reader); - } - - let numRead = 0; - - for await (const origLine of reader.iterLines()) { - let cdx; - let urlkey; - let timestamp; - numRead += origLine.length; - let line = origLine.trimEnd(); - - if (!line.startsWith("{")) { - const inx = line.indexOf(" {"); - if (inx < 0) { - continue; - } - [urlkey, timestamp] = line.split(" ", 2); - line = line.slice(inx); - } - - try { - cdx = JSON.parse(line); - } catch (e) { - console.log("JSON Parser error on: " + line); - continue; - } - - cdx.timestamp = timestamp; - if (!cdx.url) { - cdx.url = urlkey; - console.warn(`URL missing, using urlkey ${urlkey}`); - } - if (progressUpdate && this.isBatchFull()) { - progressUpdate(Math.round((numRead / totalSize) * 100), null, numRead, totalSize); - } - this.addCdx(cdx); - } - - await this.finishIndexing(); - - if (progressUpdate) { - progressUpdate(100, null, totalSize, totalSize); - } - } -} - - -export { CDXLoader, CDXFromWARCLoader }; - diff --git a/src/cdxloader.ts b/src/cdxloader.ts new file mode 100644 index 00000000..be1b302f --- /dev/null +++ b/src/cdxloader.ts @@ -0,0 +1,285 @@ +import { type ResourceEntry } from "./types"; +import { tsToDate } from "./utils"; +import { WARCLoader } from "./warcloader"; + +import { + CDXIndexer, + AsyncIterReader, + appendRequestQuery, + type WARCRecord, + type WARCParser, + type Source, +} from "warcio"; + +export const CDX_COOKIE = "req.http:cookie"; + +type WARCRecordWithPage = WARCRecord & { + _isPage: boolean; +}; + +// =========================================================================== +class CDXFromWARCLoader extends WARCLoader { + cdxindexer: CDXIndexer | null = null; + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'WARCLoader'. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sourceExtra: any; + shaPrefix: string; + + constructor( + reader: Source, + abort: AbortController | null, + id: string, + sourceExtra = {}, + shaPrefix = "sha256:", + ) { + super(reader, abort, id); + this.sourceExtra = sourceExtra; + this.shaPrefix = shaPrefix; + } + + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'WARCLoader'. + filterRecord(record: WARCRecordWithPage) { + switch (record.warcType) { + case "warcinfo": + case "revisit": + case "request": + return null; + + case "metadata": + return this.shouldIndexMetadataRecord(record) ? null : "skip"; + } + + const url = record.warcTargetURI; + const ts = record.warcDate + ? new Date(record.warcDate).getTime() + : Date.now(); + + if (this.pageMap[ts + "/" + url]) { + record._isPage = true; + return null; + } + + return null; + } + + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'WARCLoader'. + index(record: WARCRecord, parser: WARCParser) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (record) { + record._offset = parser.offset; + record._length = parser.recordLength; + } + return super.index(record, parser); + } + + // @ts-expect-error [TODO] - TS4114 - This member must have an 'override' modifier because it overrides a member in the base class 'WARCLoader'. + indexReqResponse( + record: WARCRecordWithPage, + reqRecord: WARCRecord, + parser: WARCParser, + ) { + if (record._isPage) { + return super.indexReqResponse(record, reqRecord, parser); + } + + if (record.warcType === "warcinfo") { + this.parseWarcInfo(record); + return; + } + + if (!this.cdxindexer) { + this.cdxindexer = new CDXIndexer({ noSurt: true }); + } + + const cdx = this.cdxindexer.indexRecordPair(record, reqRecord, parser, ""); + + if (!cdx) { + return; + } + + if (cdx["status"] === 206) { + const headers = record.httpHeaders?.headers; + if (headers && !this.isFullRangeRequest(headers)) { + return; + } + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, @typescript-eslint/prefer-optional-chain + if (reqRecord && reqRecord.httpHeaders) { + const cookie = reqRecord.httpHeaders.headers.get("cookie"); + if (cookie) { + cdx[CDX_COOKIE] = cookie; + } + } + + this.addCdx(cdx); + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getSource(cdx: Record) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return { + ...this.sourceExtra, + // @ts-expect-error [TODO] - TS4111 - Property 'filename' comes from an index signature, so it must be accessed with ['filename']. + path: cdx.filename, + // @ts-expect-error [TODO] - TS4111 - Property 'offset' comes from an index signature, so it must be accessed with ['offset']. + start: Number(cdx.offset), + // @ts-expect-error [TODO] - TS4111 - Property 'length' comes from an index signature, so it must be accessed with ['length']. + length: Number(cdx.length), + }; + } + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + addCdx(cdx: Record) { + const { url, mime } = cdx; + + // @ts-expect-error [TODO] - TS4111 - Property 'status' comes from an index signature, so it must be accessed with ['status']. + const status = Number(cdx.status) || 200; + + // @ts-expect-error [TODO] - TS4111 - Property 'timestamp' comes from an index signature, so it must be accessed with ['timestamp']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const date = tsToDate(cdx.timestamp); + const ts = date.getTime(); + + //if (this.detectPages && isPage(url, status, mime)) { + // const title = url; + // promises.push(this.db.addPage({url, date: date.toISOString(), title})); + //} + + const source = this.getSource(cdx); + + // [TODO] + // eslint-disable-next-line prefer-const + let { digest, recordDigest } = cdx; + if (digest && digest.indexOf(":") === -1) { + digest = this.shaPrefix + digest; + } + + const entry: ResourceEntry = { + url, + ts, + status, + digest, + recordDigest, + mime, + loaded: false, + source, + }; + + // @ts-expect-error [TODO] - TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. + if (cdx.method) { + // @ts-expect-error [TODO] - TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. | TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. + if (cdx.method === "HEAD" || cdx.method === "OPTIONS") { + return; + } + // @ts-expect-error [TODO] - TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. + entry.method = cdx.method; + } + + if (cdx[CDX_COOKIE]) { + entry[CDX_COOKIE] = cdx[CDX_COOKIE]; + } + + // url with post query appended + // @ts-expect-error [TODO] - TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. | TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. + if (cdx.method && cdx.method !== "GET") { + entry.url = appendRequestQuery( + // @ts-expect-error [TODO] - TS4111 - Property 'url' comes from an index signature, so it must be accessed with ['url']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + cdx.url, + // @ts-expect-error [TODO] - TS4111 - Property 'requestBody' comes from an index signature, so it must be accessed with ['requestBody']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + cdx.requestBody || "", + // @ts-expect-error [TODO] - TS4111 - Property 'method' comes from an index signature, so it must be accessed with ['method']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + cdx.method, + ); + } + + this.addResource(entry); + } +} + +// =========================================================================== +class CDXLoader extends CDXFromWARCLoader { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + override async load(db: any, progressUpdate?: any, totalSize?: number) { + this.db = db; + + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let reader = this.reader as any; + + if (!reader.iterLines) { + reader = new AsyncIterReader(this.reader); + } + + let numRead = 0; + + for await (const origLine of reader.iterLines()) { + let cdx; + let urlkey; + let timestamp; + numRead += origLine.length; + let line = origLine.trimEnd(); + + if (!line.startsWith("{")) { + const inx = line.indexOf(" {"); + if (inx < 0) { + continue; + } + [urlkey, timestamp] = line.split(" ", 2); + line = line.slice(inx); + } + + try { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + cdx = JSON.parse(line); + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + console.log("JSON Parser error on: " + line); + continue; + } + + cdx.timestamp = timestamp; + if (!cdx.url) { + cdx.url = urlkey; + console.warn(`URL missing, using urlkey ${urlkey}`); + } + if (progressUpdate && totalSize && this.isBatchFull()) { + progressUpdate( + Math.round((numRead / totalSize) * 100), + null, + numRead, + totalSize, + ); + } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + this.addCdx(cdx); + } + + await this.finishIndexing(); + + if (progressUpdate) { + progressUpdate(100, null, totalSize, totalSize); + } + + return {}; + } +} + +export { CDXLoader, CDXFromWARCLoader }; diff --git a/src/collection.js b/src/collection.ts similarity index 60% rename from src/collection.js rename to src/collection.ts index aad562a0..6ceb8d78 100644 --- a/src/collection.js +++ b/src/collection.ts @@ -1,18 +1,72 @@ -import { Rewriter } from "./rewrite/index.js"; +import { Rewriter } from "./rewrite/index"; + +import { + getTS, + getSecondsStr, + notFound, + parseSetCookie, + handleAuthNeeded, + REPLAY_TOP_FRAME_NAME, +} from "./utils"; + +import { ArchiveResponse } from "./response"; + +import { getAdBlockCSSResponse } from "./adblockcss"; +import { notFoundByTypeResponse } from "./notfound"; +import { type ArchiveDB } from "./archivedb"; +import { type ArchiveRequest } from "./request"; +import { type CollMetadata, type CollConfig, type ExtraConfig } from "./types"; + +const DEFAULT_CSP = + "default-src 'unsafe-eval' 'unsafe-inline' 'self' data: blob: mediastream: ws: wss: ; form-action 'self'"; + +export type Prefixes = { + static: string; + root: string; + main: string; +}; -import { getTS, getSecondsStr, notFound, parseSetCookie, handleAuthNeeded, REPLAY_TOP_FRAME_NAME } from "./utils.js"; +// =========================================================================== +export class Collection { + name: string; + store: ArchiveDB; -import { ArchiveResponse } from "./response.js"; + config: CollConfig; + metadata: CollMetadata; -import { getAdBlockCSSResponse } from "./adblockcss.js"; -import { notFoundByTypeResponse } from "./notfound.js"; + injectScripts: string[]; -const DEFAULT_CSP = "default-src 'unsafe-eval' 'unsafe-inline' 'self' data: blob: mediastream: ws: wss: ; form-action 'self'"; + noRewritePrefixes: string[] | null; + noPostToGet: boolean; + convertPostToGet: boolean; -// =========================================================================== -class Collection { - constructor(opts, prefixes, defaultConfig = {}) { + coHeaders: boolean; + csp: string; + injectRelCanon: boolean; + + baseFramePrefix: string; + baseFrameUrl: string; + baseFrameHashReplay = false; + + liveRedirectOnNotFound = false; + + rootPrefix: string; + isRoot: boolean; + + prefix: string; + + adblockUrl?: string; + + staticPrefix: string; + + constructor( + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + opts: Record, + prefixes: Prefixes, + defaultConfig = {}, + ) { const { name, store, config } = opts; this.name = name; @@ -20,7 +74,10 @@ class Collection { this.config = config; this.metadata = this.config.metadata ? this.config.metadata : {}; - const extraConfig = {...defaultConfig, ...this.config.extraConfig}; + const extraConfig: ExtraConfig = { + ...defaultConfig, + ...this.config.extraConfig, + }; this.injectScripts = extraConfig.injectScripts || []; this.noRewritePrefixes = extraConfig.noRewritePrefixes || null; @@ -35,8 +92,8 @@ class Collection { this.injectRelCanon = extraConfig.injectRelCanon || false; - this.baseFramePrefix = extraConfig.baseUrlSourcePrefix; - this.baseFrameUrl = extraConfig.baseUrl; + this.baseFramePrefix = extraConfig.baseUrlSourcePrefix!; + this.baseFrameUrl = extraConfig.baseUrl!; this.baseFrameHashReplay = extraConfig.baseUrlHashReplay || false; this.liveRedirectOnNotFound = extraConfig.liveRedirectOnNotFound || false; @@ -58,7 +115,7 @@ class Collection { this.staticPrefix = prefixes.static; } - async handleRequest(request, event) { + async handleRequest(request: ArchiveRequest, event: FetchEvent) { // force timestamp for root coll //if (!requestTS && this.isRoot) { //requestTS = "2"; @@ -75,13 +132,16 @@ class Collection { } // exact or fuzzy match - let response = null; + let response: ArchiveResponse | Response | null = null; let baseUrl = requestURL; - + try { if (requestURL.startsWith("srcdoc:")) { - response = this.getSrcDocResponse(requestURL, requestURL.slice("srcdoc:".length)); + response = this.getSrcDocResponse( + requestURL, + requestURL.slice("srcdoc:".length), + ); } else if (requestURL.startsWith("blob:")) { // the form of this url is now blob:/ // split on / to separate and @@ -95,19 +155,30 @@ class Collection { } else if (requestURL === "about:blank") { response = await this.getSrcDocResponse(requestURL); } else if (requestURL === "__wb_module_decl.js") { - response = await this.getWrappedModuleDecl(requestURL); + response = await this.getWrappedModuleDecl(); } else if (this.adblockUrl && requestURL.startsWith("adblock:")) { - response = await getAdBlockCSSResponse(requestURL.slice("adblock:".length), this.adblockUrl); + response = await getAdBlockCSSResponse( + requestURL.slice("adblock:".length), + this.adblockUrl, + ); } else { response = await this.getReplayResponse(request, event); requestURL = request.url; - if (response && response.updateTS) { + if ( + response && + response instanceof ArchiveResponse && + response.updateTS + ) { requestTS = response.updateTS; } } - } catch (e) { + } catch (e) { if (await handleAuthNeeded(e, this.config)) { - return notFound(request, "

Please wait, this page will reload after authentication...

", 401); + return notFound( + request.request, + '

Please wait, this page will reload after authentication...

', + 401, + ); } } @@ -115,33 +186,55 @@ class Collection { try { requestURL = decodeURIComponent(requestURL); requestURL += request.hash; - } catch(e) { + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { // ignore invalid URL } - return notFoundByTypeResponse(request, requestURL, requestTS, this.liveRedirectOnNotFound); - + return notFoundByTypeResponse( + request, + requestURL, + requestTS, + this.liveRedirectOnNotFound, + ); } else if (response instanceof Response) { // custom Response, not an ArchiveResponse, just return return response; } if (!response.noRW) { - const basePrefix = this.prefix + (request.pageId ? `:${request.pageId}/` : ""); + const basePrefix = + this.prefix + (request.pageId ? `:${request.pageId}/` : ""); const basePrefixTS = basePrefix + requestTS; + const arResponse = response; - const headInsertFunc = (url) => { - let presetCookie = response.headers.get("x-wabac-preset-cookie") || ""; - const setCookie = response.headers.get("Set-Cookie"); + const headInsertFunc = (url: string) => { + const presetCookie = + arResponse.headers.get("x-wabac-preset-cookie") || ""; + const setCookie = arResponse.headers.get("Set-Cookie"); const topUrl = basePrefixTS + (requestTS ? "/" : "") + url; - return this.makeHeadInsert(url, requestTS, response.date, topUrl, basePrefix, presetCookie, setCookie, response.isLive, request.referrer, response.extraOpts); + return this.makeHeadInsert( + url, + requestTS, + arResponse.date, + topUrl, + basePrefix, + presetCookie, + setCookie, + arResponse.isLive, + request.referrer, + arResponse.extraOpts, + ); }; - const workerInsertFunc = (text) => { - return ` + const workerInsertFunc = (text: string) => { + return ( + ` (function() { self.importScripts('${this.staticPrefix}wombatWorkers.js');\ new WBWombat({'prefix': '${basePrefixTS}/', 'prefixMod': '${basePrefixTS}wkrf_/', 'originalURL': '${requestURL}'});\ - })();` + text; + })();` + text + ); }; const mod = request.mod; @@ -158,7 +251,7 @@ class Collection { workerInsertFunc, urlRewrite: !noRewrite, contentRewrite: !noRewrite, - decode: this.config.decode + decode: this.config.decode, }; const rewriter = new Rewriter(rewriteOpts); @@ -176,16 +269,20 @@ class Collection { response.setRange(range); } - const deleteDisposition = (request.destination === "iframe" || request.destination === "document"); + const deleteDisposition = + request.destination === "iframe" || request.destination === "document"; return response.makeResponse(this.coHeaders, deleteDisposition); } - getCanonRedirect(query) { - let {url, timestamp, mod, referrer} = query; + getCanonRedirect(query: ArchiveRequest) { + // [TODO] + // eslint-disable-next-line prefer-const + let { url, timestamp, mod, referrer } = query; const schemeRel = url.startsWith("//"); if (schemeRel) { - let scheme = (referrer && referrer.indexOf("/http://") > 0) ? "http:" : "https:"; + const scheme = + referrer && referrer.indexOf("/http://") > 0 ? "http:" : "https:"; url = scheme + url; } @@ -199,11 +296,13 @@ class Collection { } redirectUrl += parsed.href; return Response.redirect(redirectUrl, 301); - // if different due to canonical URL included, just update the URL - } else if (!schemeRel && url.indexOf(":443") || url.indexOf(":80")) { + // if different due to canonical URL included, just update the URL + } else if ((!schemeRel && url.indexOf(":443")) || url.indexOf(":80")) { query.url = parsed.href; } } + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { // ignore invalid URLs, no redirect } @@ -233,22 +332,31 @@ class Collection { const status = 200; const statusText = "OK"; - const headers = new Headers({"Content-Type": "application/javascript"}); - return new Response(payload, {headers, status, statusText}); + const headers = new Headers({ "Content-Type": "application/javascript" }); + return new Response(payload, { headers, status, statusText }); } - getSrcDocResponse(url, base64str) { - const string = base64str ? decodeURIComponent(atob(base64str)) : ""; + getSrcDocResponse(url: string, base64str?: string) { + const string = base64str + ? decodeURIComponent(atob(base64str)) + : ""; const payload = new TextEncoder().encode(string); const status = 200; const statusText = "OK"; - const headers = new Headers({"Content-Type": "text/html"}); + const headers = new Headers({ "Content-Type": "text/html" }); const date = new Date(); - return new ArchiveResponse({payload, status, statusText, headers, url, date}); + return new ArchiveResponse({ + payload, + status, + statusText, + headers, + url, + date, + }); } - async getBlobResponse(url) { + async getBlobResponse(url: string) { const resp = await fetch(url); const status = resp.status; @@ -260,25 +368,36 @@ class Collection { const date = new Date(); const payload = new Uint8Array(await resp.arrayBuffer()); - return new ArchiveResponse({payload, status, statusText, headers, url, date}); + return new ArchiveResponse({ + payload, + status, + statusText, + headers, + url, + date, + }); } - async getReplayResponse(query, event) { - let response = this.getCanonRedirect(query); + async getReplayResponse( + query: ArchiveRequest, + event: FetchEvent, + ): Promise { + let response: Response | ArchiveResponse | null = + this.getCanonRedirect(query); if (response) { return response; } - const opts = {pageId: query.pageId}; + const opts = { pageId: query.pageId }; response = await this.store.getResource(query, this.prefix, event, opts); return response; } - async makeTopFrame(url, requestTS) { - let baseUrl = null; + async makeTopFrame(url: string, requestTS: string) { + let baseUrl = ""; if (this.baseFrameUrl && !this.baseFramePrefix) { baseUrl = this.baseFrameUrl; @@ -291,19 +410,26 @@ class Collection { if (this.baseFrameHashReplay) { baseUrl += `#${requestTS}/${url}`; } else { - const locParams = new URLSearchParams({url, ts: requestTS, view: "replay"}); + const locParams = new URLSearchParams({ + url, + ts: requestTS, + view: "replay", + }); baseUrl += "#" + locParams.toString(); } return Response.redirect(baseUrl); } - let content = null; + let content = ""; if (this.config.topTemplateUrl) { const resp = await fetch(this.config.topTemplateUrl); const topTemplate = await resp.text(); - content = topTemplate.replace("$URL", url).replace("$TS", requestTS).replace("$PREFIX", this.prefix); + content = topTemplate + .replace("$URL", url) + .replace("$TS", requestTS) + .replace("$PREFIX", this.prefix); } else { content = ` @@ -347,16 +473,32 @@ window.home = "${this.rootPrefix}"; `; } - let responseData = { - "status": 200, - "statusText": "OK", - "headers": { "Content-Type": "text/html", "Content-Security-Policy": this.csp } + const responseData = { + status: 200, + statusText: "OK", + headers: { + "Content-Type": "text/html", + "Content-Security-Policy": this.csp, + }, }; return new Response(content, responseData); } - makeHeadInsert(url, requestTS, date, topUrl, prefix, presetCookie, setCookie, isLive, referrer, extraOpts) { + makeHeadInsert( + url: string, + requestTS: string, + date: Date, + topUrl: string, + prefix: string, + presetCookie: string, + setCookie: string | null, + isLive: boolean, + referrer: string, + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + extraOpts: Record | null, + ) { const coll = this.name; const seconds = getSecondsStr(date); @@ -369,7 +511,7 @@ window.home = "${this.rootPrefix}"; // protocol scheme (for relative urls): if not http/https, try to get actual protocol from referrer if (urlParsed.protocol !== "https:" && urlParsed.protocol !== "http:") { - scheme = (referrer && referrer.indexOf("/http://") > 0) ? "http" : "https"; + scheme = referrer && referrer.indexOf("/http://") > 0 ? "http" : "https"; } else { scheme = urlParsed.protocol.slice(0, -1); } @@ -378,15 +520,24 @@ window.home = "${this.rootPrefix}"; presetCookie = parseSetCookie(setCookie, scheme) + ";" + presetCookie; } - const pixelRatio = extraOpts && Number(extraOpts.pixelRatio) ? extraOpts.pixelRatio : 1; - const storage = extraOpts && extraOpts.storage ? btoa(extraOpts.storage) : ""; - const presetCookieStr = presetCookie ? JSON.stringify(presetCookie) : "\"\""; + const pixelRatio = + // @ts-expect-error [TODO] - TS4111 - Property 'pixelRatio' comes from an index signature, so it must be accessed with ['pixelRatio']. | TS4111 - Property 'pixelRatio' comes from an index signature, so it must be accessed with ['pixelRatio']. + extraOpts && Number(extraOpts.pixelRatio) ? extraOpts.pixelRatio : 1; + // @ts-expect-error [TODO] - TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. | TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. + // [TODO] + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + const storage = extraOpts?.storage ? btoa(extraOpts.storage) : ""; + const presetCookieStr = presetCookie ? JSON.stringify(presetCookie) : '""'; return ` -${this.adblockUrl ? ` +${ + this.adblockUrl + ? ` -` : ""} +` + : "" +}