diff --git a/app/__init__.py b/app/__init__.py index e69de29b..28cde377 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -0,0 +1,31 @@ +"""StemDeck. + +The vendored path insert below runs before anything else in the package, which +is the only place it can work: yt-dlp resolves its optional dependencies at +import time, and `app.pipeline.download` imports yt_dlp at module level. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +# yt-dlp's YouTube challenge solver (#432, #438). +# +# Vendored rather than declared as a dependency, and the reason is the desktop +# updater, not preference. runtimeId is sha256(uv.lock), and the updater stands +# down when it changes because it can replace `backend/` but never `python/`. +# A new dependency would therefore have sent every existing desktop install to +# a full manual reinstall to get this. +# +# This package is not one StemDeck imports. It is a 53 KB pure-Python payload +# with no dependencies that yt-dlp discovers at runtime, so it belongs in the +# app layer that the updater does replace. Existing installs get the solver +# through the ordinary in-app update instead. +# +# Refresh with: python scripts/update_vendored_ejs.py +_VENDOR = Path(__file__).resolve().parent / "_vendor" +if _VENDOR.is_dir(): + _path = str(_VENDOR) + if _path not in sys.path: + sys.path.insert(0, _path) diff --git a/app/_vendor/LICENSE.yt-dlp-ejs b/app/_vendor/LICENSE.yt-dlp-ejs new file mode 100644 index 00000000..efb98088 --- /dev/null +++ b/app/_vendor/LICENSE.yt-dlp-ejs @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/app/_vendor/yt_dlp_ejs/__init__.py b/app/_vendor/yt_dlp_ejs/__init__.py new file mode 100644 index 00000000..9d7217e1 --- /dev/null +++ b/app/_vendor/yt_dlp_ejs/__init__.py @@ -0,0 +1,3 @@ +from yt_dlp_ejs._version import version + +__all__ = ["version"] diff --git a/app/_vendor/yt_dlp_ejs/_version.py b/app/_vendor/yt_dlp_ejs/_version.py new file mode 100644 index 00000000..c8a54217 --- /dev/null +++ b/app/_vendor/yt_dlp_ejs/_version.py @@ -0,0 +1,33 @@ +# file generated by setuptools-scm +# don't change, don't track in version control + +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Union + + VERSION_TUPLE = tuple[int | str, ...] + COMMIT_ID = Union[str, None] +else: + VERSION_TUPLE = object + COMMIT_ID = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE +commit_id: COMMIT_ID +__commit_id__: COMMIT_ID + +__version__ = version = "0.8.0" +__version_tuple__ = version_tuple = (0, 8, 0) + +__commit_id__ = commit_id = None diff --git a/app/_vendor/yt_dlp_ejs/yt/__init__.py b/app/_vendor/yt_dlp_ejs/yt/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/_vendor/yt_dlp_ejs/yt/solver/__init__.py b/app/_vendor/yt_dlp_ejs/yt/solver/__init__.py new file mode 100644 index 00000000..8f71c47d --- /dev/null +++ b/app/_vendor/yt_dlp_ejs/yt/solver/__init__.py @@ -0,0 +1,21 @@ +import importlib.resources + +import yt_dlp_ejs.yt.solver + + +def core() -> str: + """ + Read the contents of the JavaScript core solver bundle as string. + """ + return (importlib.resources.files(yt_dlp_ejs.yt.solver) / "core.min.js").read_text( + encoding="utf-8" + ) + + +def lib() -> str: + """ + Read the contents of the JavaScript library solver bundle as string. + """ + return (importlib.resources.files(yt_dlp_ejs.yt.solver) / "lib.min.js").read_text( + encoding="utf-8" + ) diff --git a/app/_vendor/yt_dlp_ejs/yt/solver/core.min.js b/app/_vendor/yt_dlp_ejs/yt/solver/core.min.js new file mode 100644 index 00000000..66f7978d --- /dev/null +++ b/app/_vendor/yt_dlp_ejs/yt/solver/core.min.js @@ -0,0 +1,5 @@ +/*! + * SPDX-License-Identifier: Unlicense + * This file was automatically generated by https://github.com/yt-dlp/ejs + */ +var jsc=function(e,n){"use strict";function t(e,n){if(Array.isArray(n))return!!Array.isArray(e)&&(n.length===e.length&&n.every((n,o)=>t(e[o],n)));if("object"==typeof n){if(!e)return!n;if("or"in n)return n.or.some(n=>t(e,n));if("anykey"in n&&Array.isArray(n.anykey)){const o=Array.isArray(e)?e:Object.values(e);return n.anykey.every(e=>o.some(n=>t(n,e)))}for(const[o,s]of Object.entries(n))if(!t(e[o],s))return!1;return!0}return n===e}function o(n){return e.parse(n).body[0].expression}function s(e){let n,t=e[0],o=1;for(;ot.call(n,...e)),n=void 0)}return t}const r={or:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{or:[{type:"Identifier"},{type:"MemberExpression"}]},right:{type:"FunctionExpression",async:!1}}},{type:"FunctionDeclaration",async:!1,id:{type:"Identifier"}},{type:"VariableDeclaration",declarations:{anykey:[{type:"VariableDeclarator",init:{type:"FunctionExpression",async:!1}}]}}]},i={type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier"},property:{},optional:!1},arguments:[{type:"Literal",value:"alr"},{type:"Literal",value:"yes"}],optional:!1}};function p(e){if(!t(e,r))return null;const n=[];if("FunctionDeclaration"===e.type)e.id&&s([e,"access",e=>e.body,"optionalAccess",e=>e.body])&&n.push({name:e.id,statements:s([e,"access",e=>e.body,"optionalAccess",e=>e.body])});else if("ExpressionStatement"===e.type){if("AssignmentExpression"!==e.expression.type)return null;const t=e.expression.left,o=s([e.expression.right,"optionalAccess",e=>e.body,"optionalAccess",e=>e.body]);t&&o&&n.push({name:t,statements:o})}else if("VariableDeclaration"===e.type)for(const t of e.declarations){const e=t.id,o=s([t.init,"optionalAccess",e=>e.body,"optionalAccess",e=>e.body]);e&&o&&n.push({name:e,statements:o})}for(const{name:e,statements:o}of n)if(t(o,{anykey:[i]}))return a(e);return null}function a(e){return o(`\n({sig, n}) => {\n const url = (${n.generate(e)})("https://youtube.com/watch?v=yt-dlp-wins", "s", sig ? encodeURIComponent(sig) : undefined);\n url.set("n", n);\n const proto = Object.getPrototypeOf(url);\n const keys = Object.keys(proto).concat(Object.getOwnPropertyNames(proto));\n for (const key of keys) {\n if (!["constructor", "set", "get", "clone"].includes(key)) {\n url[key]();\n break;\n }\n }\n const s = url.get("s");\n return {\n sig: s ? decodeURIComponent(s) : null,\n n: url.get("n") ?? null,\n };\n}\n`)}const l=e.parse('\nif (typeof globalThis.XMLHttpRequest === "undefined") {\n globalThis.XMLHttpRequest = { prototype: {} };\n}\nif (typeof URL === "undefined") {\n globalThis.location = {\n hash: "",\n host: "www.youtube.com",\n hostname: "www.youtube.com",\n href: "https://www.youtube.com/watch?v=yt-dlp-wins",\n origin: "https://www.youtube.com",\n password: "",\n pathname: "/watch",\n port: "",\n protocol: "https:",\n search: "?v=yt-dlp-wins",\n username: "",\n };\n} else {\n globalThis.location = new URL("https://www.youtube.com/watch?v=yt-dlp-wins");\n}\nif (typeof globalThis.document === "undefined") {\n globalThis.document = Object.create(null);\n}\nif (typeof globalThis.navigator === "undefined") {\n globalThis.navigator = Object.create(null);\n}\nif (typeof globalThis.self === "undefined") {\n globalThis.self = globalThis;\n}\nif (typeof globalThis.window === "undefined") {\n globalThis.window = globalThis;\n}\n').body;function c(e){let n,t=e[0],o=1;for(;ot.call(n,...e)),n=void 0)}return t}function u(t){const o=e.parse(t),s=function(e){const n=e.body,t=(()=>{switch(n.length){case 1:{const e=n[0];if("ExpressionStatement"===c([e,"optionalAccess",e=>e.type])&&"CallExpression"===e.expression.type&&"MemberExpression"===e.expression.callee.type&&"FunctionExpression"===e.expression.callee.object.type)return e.expression.callee.object.body;break}case 2:{const e=n[1];if("ExpressionStatement"===c([e,"optionalAccess",e=>e.type])&&"CallExpression"===e.expression.type&&"FunctionExpression"===e.expression.callee.type){const n=e.expression.callee.body;return n.body.splice(0,1),n}break}}throw"unexpected structure"})();return t.body=t.body.filter(e=>"ExpressionStatement"!==e.type||("AssignmentExpression"===e.expression.type||"Literal"===e.expression.type)),t.body}(o),r=function(e){const n={n:[],sig:[]};for(const t of e){const e=p(t);e&&(n.n.push(y(e,{type:"Identifier",name:"n"})),n.sig.push(y(e,{type:"Identifier",name:"sig"})))}return n}(s);for(const[e,n]of Object.entries(r))s.push({type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",computed:!1,object:{type:"Identifier",name:"_result"},property:{type:"Identifier",name:e},optional:!1},right:f(n)}});return o.body.splice(0,0,...l),n.generate(o)}function y(e,n){return{type:"ArrowFunctionExpression",params:[n],body:{type:"MemberExpression",object:{type:"CallExpression",callee:e,arguments:[{type:"ObjectExpression",properties:[{type:"Property",key:n,value:n,kind:"init",computed:!1,method:!1,shorthand:!0}]}],optional:!1},computed:!1,property:n,optional:!1},async:!1,expression:!0,generator:!1}}function f(e){return o(`\n(_input) => {\n const _results = new Set();\n const errors = [];\n for (const _generator of ${n.generate({type:"ArrayExpression",elements:e})}) {\n try {\n _results.add(_generator(_input));\n } catch (e) {\n errors.push(e);\n }\n }\n if (!_results.size) {\n throw \`no solutions: \${errors.join(", ")}\`;\n }\n if (_results.size !== 1) {\n throw \`invalid solutions: \${[..._results].map(x => JSON.stringify(x)).join(", ")}\`;\n }\n return _results.values().next().value;\n}\n`)}return function(e){const n="player"===e.type?u(e.player):e.preprocessed_player,t=function(e){const n={n:null,sig:null};return Function("_result",e)(n),n}(n),o={type:"result",responses:e.requests.map(e=>{if(!function(e,...n){return n.includes(e)}(e.type,"n","sig"))return{type:"error",error:`Unknown request type: ${e.type}`};const n=t[e.type];if(!n)return{type:"error",error:`Failed to extract ${e.type} function`};try{return{type:"result",data:Object.fromEntries(e.challenges.map(e=>[e,n(e)]))}}catch(e){return{type:"error",error:e instanceof Error?`${e.message}\n${e.stack}`:`${e}`}}})};return"player"===e.type&&e.output_preprocessed&&(o.preprocessed_player=n),o}}(meriyah,astring); \ No newline at end of file diff --git a/app/_vendor/yt_dlp_ejs/yt/solver/lib.min.js b/app/_vendor/yt_dlp_ejs/yt/solver/lib.min.js new file mode 100644 index 00000000..7fbd0887 --- /dev/null +++ b/app/_vendor/yt_dlp_ejs/yt/solver/lib.min.js @@ -0,0 +1,52 @@ +/*! + * SPDX-License-Identifier: Unlicense + * This file was automatically generated by https://github.com/yt-dlp/ejs + * + * Bundled Dependencies: + * + * --- + * Name: meriyah + * Version: 6.1.4 + * License: ISC + * Repository: git+https://github.com/meriyah/meriyah.git + * Author: Kenny F. (https://github.com/KFlash) + * + * ISC License + * + * Copyright (c) 2019 and later, KFlash and others. + * + * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + * + * 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. + * + * --- + * + * --- + * Name: astring + * Version: 1.9.0 + * License: MIT + * Repository: https://github.com/davidbonnet/astring.git + * Author: David Bonnet + * + * Copyright (c) 2015, David Bonnet + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * --- + */ +var lib=function(e){"use strict";const t=((e,t)=>{const r=new Uint32Array(69632);let n=0,o=0;for(;n<2571;){const i=e[n++];if(i<0)o-=i;else{let a=e[n++];2&i&&(a=t[a]),1&i?r.fill(a,o,o+=e[n++]):r[o++]=a}}return r})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,63,2,64,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,65,2,0,0,4294836735,0,3221225471,0,4294901942,2,66,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,18,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,60,2,7,2,6,0,4286611199,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,660618719,0,65487,0,4294828015,0,4092591615,0,1616920031,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,71,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,72,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,10,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2151677951,2,29,2,9,0,909311,3,0,2,0,814743551,2,49,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,110,2,51,2,0,2,81,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,17,-1,3,0,2,2,53,0,1046528,3,0,3,2,9,2,0,2,54,0,4294960127,2,10,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,0,12288,2,55,0,1048577,2,86,2,14,-1,2,14,0,131042,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,90,2,2,0,-16,2,91,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,2,133,2,0,0,3220242431,3,0,3,2,19,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,2,0,0,4351,2,0,2,9,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,9,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,101,2,102,2,22,2,23,3,0,3,0,67057663,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,2,25,0,1638399,0,57344,2,109,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,67,2,6,2,12,2,10,2,0,2,115,-1,3,0,4,2,10,2,23,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,48,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,57,0,4026531840,2,20,2,43,2,36,2,18,2,37,2,18,2,126,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,144,2,0,2,58,2,56,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,61,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,134,0,4190109695,2,52,-2,2,135,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,68,2,18,2,0,2,42,-6,2,0,2,45,2,59,2,44,2,45,2,46,2,47,0,8388351,-2,2,136,0,3028287487,2,48,2,138,0,33259519,2,49,-9,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,0,15360,-4,2,57,-13,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,0,4294954999,2,0,-16,2,0,2,92,2,0,0,2105343,0,4160749584,0,65534,-34,2,8,2,154,-6,0,4194303871,0,4294903771,2,0,2,60,2,100,-3,2,0,0,1073684479,0,17407,-9,2,18,2,17,2,0,2,32,-14,2,18,2,32,-6,2,18,2,12,-15,2,155,3,0,6,0,8323103,-1,3,0,2,2,61,-37,2,62,2,156,2,157,2,158,2,159,2,160,-105,2,26,-32,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-22250,3,0,7,2,25,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,63,2,64,-3,0,3168731136,0,4294956864,2,1,2,0,2,41,3,0,4,0,4294966275,3,0,4,2,16,2,65,2,0,2,34,-1,2,18,2,66,-1,2,0,0,2047,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,25,2,67,3,0,2,0,131135,2,98,0,70256639,0,71303167,0,272,2,42,2,6,0,32511,2,0,2,49,-1,2,99,2,68,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,70,2,69,0,33554435,2,131,2,70,0,2952790016,0,131075,0,3594373096,0,67094296,2,69,-1,0,4294828e3,0,603979263,0,654311424,0,3,0,4294828001,0,602930687,0,1610612736,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,71,2,38,-1,2,4,0,917503,2,38,-1,2,72,0,537788335,0,4026531935,-1,0,1,-1,2,33,2,73,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,15,2,22,3,0,10,2,74,2,0,2,75,2,76,2,77,2,0,2,78,2,0,2,12,-1,2,25,3,0,2,2,13,2,4,3,0,18,2,79,2,5,3,0,2,2,80,0,2147745791,3,19,2,0,122879,2,0,2,9,0,276824064,-2,3,0,2,2,42,2,0,0,4294903295,2,0,2,30,2,8,-1,2,18,2,51,2,0,2,81,2,49,-1,2,21,2,0,2,29,-2,0,128,-2,2,28,2,9,0,8160,-1,2,127,0,4227907585,2,0,2,37,2,0,2,50,0,4227915776,2,10,2,6,2,11,-1,0,74440192,3,0,6,-2,3,0,8,2,13,2,0,2,82,2,10,2,0,2,83,2,84,2,85,-3,2,86,2,14,-3,2,87,2,88,2,89,2,0,2,34,-83,3,0,7,0,817183,2,0,2,15,2,0,0,33023,2,21,3,90,2,-17,2,91,0,524157950,2,4,2,0,2,92,2,4,2,0,2,22,2,28,2,16,3,0,2,2,17,2,0,-1,2,18,-16,3,0,206,-2,3,0,692,2,73,-1,2,18,2,10,3,0,8,2,93,0,3072,2,0,0,2147516415,2,10,3,0,2,2,25,2,94,2,95,3,0,2,2,96,2,0,2,97,2,46,0,4294965179,0,7,2,0,2,9,2,95,2,9,-1,0,1761345536,2,98,0,4294901823,2,38,2,20,2,99,2,35,2,100,0,2080440287,2,0,2,34,2,153,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,101,2,102,2,22,2,23,3,0,3,0,7,3,0,349,2,103,2,104,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,2700607615,2,105,2,106,3,0,2,2,19,2,107,3,0,10,2,10,2,18,2,0,2,47,2,0,2,31,2,108,-3,2,109,3,0,3,2,20,-1,3,5,2,2,110,2,0,2,8,2,111,-1,2,112,2,113,2,114,-1,3,0,3,2,12,-2,2,0,2,29,-8,2,20,2,0,2,36,-1,2,0,2,67,2,6,2,30,2,10,2,0,2,115,-1,3,0,4,2,10,2,18,2,116,2,7,2,0,2,117,2,0,2,118,2,119,2,120,2,0,2,9,3,0,9,2,21,2,30,2,31,2,121,2,122,-2,2,123,2,124,2,30,2,21,2,8,-2,2,125,2,30,2,32,-2,2,0,2,39,-2,0,4277075969,2,30,-1,3,20,2,-1,2,33,2,126,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,50,2,98,0,4294934591,2,37,-7,2,0,0,197631,2,57,-1,2,20,2,43,2,37,2,18,0,3,2,18,2,126,2,21,2,127,2,54,-1,0,2490368,2,127,2,25,2,18,2,34,2,127,2,38,0,4294901904,0,4718591,2,127,2,35,0,335544350,-1,2,128,0,2147487743,0,1,-1,2,129,2,130,2,8,-1,2,131,2,70,0,3758161920,0,3,2,132,0,12582911,0,655360,-1,2,0,2,29,0,2147485568,0,3,2,0,2,25,0,176,-5,2,0,2,17,0,251658240,-1,2,0,2,25,0,16,-1,2,0,0,16779263,-2,2,12,-1,2,38,-5,2,0,2,133,-3,3,0,2,2,55,2,134,0,2147549183,0,2,-2,2,135,2,36,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,2,18,2,0,2,42,-6,2,0,0,1,2,59,2,17,0,1,2,46,2,25,-3,2,136,2,36,2,137,2,138,0,16778239,-10,2,35,0,4294836212,2,9,-3,2,69,-2,3,0,28,2,32,-3,3,0,3,2,17,3,0,6,2,50,-81,2,18,3,0,2,2,36,3,0,33,2,25,0,126,3,0,124,2,12,3,0,18,2,38,-213,2,10,-55,3,0,17,2,42,2,8,2,18,2,0,2,8,2,18,2,60,2,0,2,25,2,50,2,139,2,25,-13,2,0,2,73,-6,3,0,2,-4,3,0,2,0,67583,-1,2,107,-2,0,11,3,0,191,2,54,3,0,38,2,30,2,55,2,34,-278,2,140,3,0,9,2,141,2,142,2,56,3,0,11,2,7,-72,3,0,3,2,143,2,144,-187,3,0,2,2,58,2,0,2,145,2,146,2,62,2,0,2,147,2,148,2,149,3,0,10,2,150,2,151,2,22,3,58,2,3,152,2,3,59,2,2,153,-57,2,8,2,154,-7,2,18,2,0,2,60,-4,2,0,0,1065361407,0,16384,-9,2,18,2,60,2,0,2,133,-14,2,18,2,133,-6,2,18,0,81919,-15,2,155,3,0,6,2,126,-1,3,0,2,0,2063,-37,2,62,2,156,2,157,2,158,2,159,2,160,-138,3,0,1335,-1,3,0,129,2,32,3,0,6,2,10,3,0,180,2,161,3,0,233,2,162,3,0,18,2,10,-77,3,0,16,2,10,-47,3,0,154,2,6,3,0,130,2,25,-28386],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,4294903807,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4294901759,32767,4294901760,262143,536870911,8388607,4160749567,4294902783,4294918143,65535,67043328,2281701374,4294967264,2097151,4194303,255,67108863,4294967039,511,524287,131071,63,127,3238002687,4294549487,4290772991,33554431,4294901888,4286578687,67043329,4294705152,4294770687,67043583,1023,15,2047999,67043343,67051519,16777215,2147483648,4294902e3,28,4292870143,4294966783,16383,67047423,4294967279,262083,20511,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,535511039,4294966272,4294967280,32768,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,4294967232,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4160684047,4290246655,469499899,4294967231,134086655,4294966591,2445279231,3670015,31,4294967288,4294705151,3221208447,4294902271,4294549472,4294921215,4095,4285526655,4294966527,4294966143,64,4294966719,3774873592,1877934080,262151,2555904,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4294934527,4087,2016,2147446655,184024726,2862017156,1593309078,268434431,268434414,4294901763,4294901761]),r=e=>!!(1&t[(e>>>5)+34816]>>>e);function n(e){return e.column++,e.currentChar=e.source.charCodeAt(++e.index)}function o(e){const t=e.currentChar;if(55296!=(64512&t))return 0;const r=e.source.charCodeAt(e.index+1);return 56320!=(64512&r)?0:65536+((1023&t)<<10)+(1023&r)}function i(e,t){e.currentChar=e.source.charCodeAt(++e.index),e.flags|=1,4&t||(e.column=0,e.line++)}function a(e){e.flags|=1,e.currentChar=e.source.charCodeAt(++e.index),e.column=0,e.line++}function s(e){return 160===e||65279===e||133===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||8201===e||65519===e}function c(e){return e<65?e-48:e-65+10&15}function l(e){switch(e){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 131:return"TemplateLiteral";default:return 143360&~e?4096&~e?"Punctuator":"Keyword":"Identifier"}}const u=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],p=[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,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],d=[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,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function g(e){return e<=127?p[e]>0:r(e)}function f(e){return e<=127?d[e]>0:(e=>!!(1&t[(e>>>5)+0]>>>e))(e)||8204===e||8205===e}const h=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function k(e,t,r,n,o,i){return 2&n&&e.report(0),m(e,t,r,o,i)}function m(e,t,r,o,i){const{index:s}=e;for(e.tokenIndex=e.index,e.tokenLine=e.line,e.tokenColumn=e.column;e.index=e.source.length)return e.report(34)}const o=e.index-1;let i=y.Empty,a=e.currentChar;const{index:s}=e;for(;f(a);){switch(a){case 103:i&y.Global&&e.report(36,"g"),i|=y.Global;break;case 105:i&y.IgnoreCase&&e.report(36,"i"),i|=y.IgnoreCase;break;case 109:i&y.Multiline&&e.report(36,"m"),i|=y.Multiline;break;case 117:i&y.Unicode&&e.report(36,"u"),i&y.UnicodeSets&&e.report(36,"vu"),i|=y.Unicode;break;case 118:i&y.Unicode&&e.report(36,"uv"),i&y.UnicodeSets&&e.report(36,"v"),i|=y.UnicodeSets;break;case 121:i&y.Sticky&&e.report(36,"y"),i|=y.Sticky;break;case 115:i&y.DotAll&&e.report(36,"s"),i|=y.DotAll;break;case 100:i&y.Indices&&e.report(36,"d"),i|=y.Indices;break;default:e.report(35)}a=n(e)}const c=e.source.slice(s,e.index),l=e.source.slice(t,o);return e.tokenRegExp={pattern:l,flags:c},e.options.raw&&(e.tokenRaw=e.source.slice(e.tokenIndex,e.index)),e.tokenValue=function(e,t,r){try{return new RegExp(t,r)}catch{try{return new RegExp(t,r),null}catch{e.report(34)}}}(e,l,c),65540}function x(e,t,r){const{index:o}=e;let i="",a=n(e),s=e.index;for(;!(8&u[a]);){if(a===r)return i+=e.source.slice(s,e.index),n(e),e.options.raw&&(e.tokenRaw=e.source.slice(o,e.index)),e.tokenValue=i,134283267;if(8&~a||92!==a)8232!==a&&8233!==a||(e.column=-1,e.line++);else{if(i+=e.source.slice(s,e.index),a=n(e),a<127||8232===a||8233===a){const r=S(e,t,a);r>=0?i+=String.fromCodePoint(r):v(e,r,0)}else i+=String.fromCodePoint(a);s=e.index+1}e.index>=e.end&&e.report(16),a=n(e)}e.report(16)}function S(e,t,r,o=0){switch(r){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(e.index1114111)return-5;return e.currentChar<1||125!==e.currentChar?-4:t}{if(!(64&u[t]))return-4;const r=e.source.charCodeAt(e.index+1);if(!(64&u[r]))return-4;const n=e.source.charCodeAt(e.index+2);if(!(64&u[n]))return-4;const o=e.source.charCodeAt(e.index+3);return 64&u[o]?(e.index+=3,e.column+=3,e.currentChar=e.source.charCodeAt(e.index),c(t)<<12|c(r)<<8|c(n)<<4|c(o)):-4}}case 56:case 57:if(o||!e.options.webcompat||1&t)return-3;e.flags|=4096;default:return r}}function v(e,t,r){switch(t){case-1:return;case-2:e.report(r?2:1);case-3:e.report(r?3:14);case-4:e.report(7);case-5:e.report(104)}}function C(e,t){const{index:r}=e;let o=67174409,i="",a=n(e);for(;96!==a;){if(36===a&&123===e.source.charCodeAt(e.index+1)){n(e),o=67174408;break}if(92===a)if(a=n(e),a>126)i+=String.fromCodePoint(a);else{const{index:r,line:n,column:s}=e,c=S(e,1|t,a,1);if(c>=0)i+=String.fromCodePoint(c);else{if(-1!==c&&64&t){e.index=r,e.line=n,e.column=s,i=null,a=E(e,a),a<0&&(o=67174408);break}v(e,c,1)}}else e.index=e.end&&e.report(17),a=n(e)}return n(e),e.tokenValue=i,e.tokenRaw=e.source.slice(r+1,e.index-(67174409===o?1:2)),o}function E(e,t){for(;96!==t;){switch(t){case 36:{const r=e.index+1;if(r=e.end&&e.report(17),t=n(e)}return t}function q(e,t){return e.index>=e.end&&e.report(0),e.index--,e.column--,C(e,t)}!function(e){e[e.Empty=0]="Empty",e[e.Escape=1]="Escape",e[e.Class=2]="Class"}(w||(w={})),function(e){e[e.Empty=0]="Empty",e[e.IgnoreCase=1]="IgnoreCase",e[e.Global=2]="Global",e[e.Multiline=4]="Multiline",e[e.Unicode=16]="Unicode",e[e.Sticky=8]="Sticky",e[e.DotAll=32]="DotAll",e[e.Indices=64]="Indices",e[e.UnicodeSets=128]="UnicodeSets"}(y||(y={}));const N={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must the be last parameter",74:"Invalid rest argument",76:"In strict mode code, functions can only be declared at top level or inside a block",77:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",78:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",79:"Class declaration can't appear in single-statement context",80:"Invalid left-hand side in for-%0",81:"Invalid assignment in for-%0",82:"for await (... of ...) is only valid in async functions and async generators",83:"The first token after the template expression should be a continuation of the template",85:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",84:"`let \n [` is a restricted production at the start of a statement",86:"Catch clause requires exactly one parameter, not more (and no trailing comma)",87:"Catch clause parameter does not support default values",88:"Missing catch or finally after try",89:"More than one default clause in switch statement",90:"Illegal newline after throw",91:"Strict mode code may not include a with statement",92:"Illegal return statement",93:"The left hand side of the for-header binding declaration is not destructible",94:"new.target only allowed within functions or static blocks",96:"'#' not followed by identifier",102:"Invalid keyword",101:"Can not use 'let' as a class name",100:"'A lexical declaration can't define a 'let' binding",99:"Can not use `let` as variable name in strict mode",97:"'%0' may not be used as an identifier in this context",98:"Await is only valid in async functions",103:"The %0 keyword can only be used with the module goal",104:"Unicode codepoint must not be greater than 0x10FFFF",105:"%0 source must be string",106:"Only a identifier or string can be used to indicate alias",107:"Only '*' or '{...}' can be imported after default",108:"Trailing decorator may be followed by method",109:"Decorators can't be used with a constructor",110:"Can not use `await` as identifier in module or async func",111:"Can not use `await` as identifier in module",112:"HTML comments are only allowed with web compatibility (Annex B)",113:"The identifier 'let' must not be in expression position in strict mode",114:"Cannot assign to `eval` and `arguments` in strict mode",115:"The left-hand side of a for-of loop may not start with 'let'",116:"Block body arrows can not be immediately invoked without a group",117:"Block body arrows can not be immediately accessed without a group",118:"Unexpected strict mode reserved word",119:"Unexpected eval or arguments in strict mode",120:"Decorators must not be followed by a semicolon",121:"Calling delete on expression not allowed in strict mode",122:"Pattern can not have a tail",124:"Can not have a `yield` expression on the left side of a ternary",125:"An arrow function can not have a postfix update operator",126:"Invalid object literal key character after generator star",127:"Private fields can not be deleted",129:"Classes may not have a field called constructor",128:"Classes may not have a private element named constructor",130:"A class field initializer or static block may not contain arguments",131:"Generators can only be declared at the top level or inside a block",132:"Async methods are a restricted production and cannot have a newline following it",133:"Unexpected character after object literal property name",135:"Invalid key token",136:"Label '%0' has already been declared",137:"continue statement must be nested within an iteration statement",138:"Undefined label '%0'",139:"Trailing comma is disallowed inside import(...) arguments",140:"Invalid binding in JSON import",141:"import() requires exactly one argument",142:"Cannot use new with import(...)",143:"... is not allowed in import()",144:"Expected '=>'",145:"Duplicate binding '%0'",146:"Duplicate private identifier #%0",147:"Cannot export a duplicate name '%0'",150:"Duplicate %0 for-binding",148:"Exported binding '%0' needs to refer to a top-level declared variable",149:"Unexpected private field",153:"Numeric separators are not allowed at the end of numeric literals",152:"Only one underscore is allowed as numeric separator",154:"JSX value should be either an expression or a quoted JSX text",155:"Expected corresponding JSX closing tag for %0",156:"Adjacent JSX elements must be wrapped in an enclosing tag",157:"JSX attributes must only be assigned a non-empty 'expression'",158:"'%0' has already been declared",159:"'%0' shadowed a catch clause binding",160:"Dot property must be an identifier",161:"Encountered invalid input after spread/rest argument",162:"Catch without try",163:"Finally without try",164:"Expected corresponding closing tag for JSX fragment",165:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",166:"Invalid tagged template on optional chain",167:"Invalid optional chain from super property",168:"Invalid optional chain from new expression",169:'Cannot use "import.meta" outside a module',170:"Leading decorators must be attached to a class declaration",171:"An export name cannot include a lone surrogate, found %0",172:"A string literal cannot be used as an exported binding without `from`",173:"Private fields can't be accessed on super",174:"The only valid meta property for import is 'import.meta'",175:"'import.meta' must not contain escaped characters",176:'cannot use "await" as identifier inside an async function',177:'cannot use "await" in static blocks'};class L extends SyntaxError{start;end;range;loc;description;constructor(e,t,r,...n){const o=N[r].replace(/%(\d+)/g,(e,t)=>n[t]);super("["+e.line+":"+e.column+"-"+t.line+":"+t.column+"]: "+o),this.start=e.index,this.end=t.index,this.range=[e.index,t.index],this.loc={start:{line:e.line,column:e.column},end:{line:t.line,column:t.column}},this.description=o}}function A(e,t,r){let o=e.currentChar,i=0,a=9,s=64&r?0:1,l=0,p=0;if(64&r)i="."+I(e,o),o=e.currentChar,110===o&&e.report(12);else{if(48===o)if(o=n(e),120==(32|o)){for(r=136,o=n(e);4160&u[o];)95!==o?(p=1,i=16*i+c(o),l++,o=n(e)):(p||e.report(152),p=0,o=n(e));0!==l&&p||e.report(0===l?21:153)}else if(111==(32|o)){for(r=132,o=n(e);4128&u[o];)95!==o?(p=1,i=8*i+(o-48),l++,o=n(e)):(p||e.report(152),p=0,o=n(e));0!==l&&p||e.report(0===l?0:153)}else if(98==(32|o)){for(r=130,o=n(e);4224&u[o];)95!==o?(p=1,i=2*i+(o-48),l++,o=n(e)):(p||e.report(152),p=0,o=n(e));0!==l&&p||e.report(0===l?0:153)}else if(32&u[o])for(1&t&&e.report(1),r=1;16&u[o];){if(512&u[o]){r=32,s=0;break}i=8*i+(o-48),o=n(e)}else 512&u[o]?(1&t&&e.report(1),e.flags|=64,r=32):95===o&&e.report(0);if(48&r){if(s){for(;a>=0&&4112&u[o];)if(95!==o)p=0,i=10*i+(o-48),o=n(e),--a;else{if(o=n(e),95===o||32&r)throw new L(e.currentLocation,{index:e.index+1,line:e.line,column:e.column},152);p=1}if(p)throw new L(e.currentLocation,{index:e.index+1,line:e.line,column:e.column},153);if(a>=0&&!g(o)&&46!==o)return e.tokenValue=i,e.options.raw&&(e.tokenRaw=e.source.slice(e.tokenIndex,e.index)),134283266}i+=I(e,o),o=e.currentChar,46===o&&(95===n(e)&&e.report(0),r=64,i+="."+I(e,e.currentChar),o=e.currentChar)}}const d=e.index;let f=0;if(110===o&&128&r)f=1,o=n(e);else if(101==(32|o)){o=n(e),256&u[o]&&(o=n(e));const{index:t}=e;16&u[o]||e.report(11),i+=e.source.substring(d,t)+I(e,o),o=e.currentChar}return(e.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","accessor","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],V={this:86111,function:86104,if:20569,return:20572,var:86088,else:20563,for:20567,new:86107,in:8673330,typeof:16863275,while:20578,case:20556,break:20555,try:20577,catch:20557,delete:16863276,throw:86112,switch:86110,continue:20559,default:20561,instanceof:8411187,do:20562,void:16863277,finally:20566,async:209005,await:209006,class:86094,const:86090,constructor:12399,debugger:20560,export:20564,extends:20565,false:86021,from:209011,get:209008,implements:36964,import:86106,interface:36965,let:241737,null:86023,of:471156,package:36966,private:36967,protected:36968,public:36969,set:209009,static:36970,super:86109,true:86022,with:20579,yield:241771,enum:86133,eval:537079926,as:77932,arguments:537079927,target:209029,meta:209030,accessor:12402};function P(e,t){!(1&e.flags)&&1048576&~e.getToken()&&e.report(30,D[255&e.getToken()]),U(e,t,1074790417)||e.options.onInsertedSemicolon?.(e.startIndex)}function R(e,t,r,n){return t-r<13&&"use strict"===n&&(!(1048576&~e.getToken())||1&e.flags)?1:0}function B(e,t,r){return e.getToken()!==r?0:(ee(e,t),1)}function U(e,t,r){return e.getToken()===r&&(ee(e,t),!0)}function O(e,t,r){e.getToken()!==r&&e.report(25,D[255&r]),ee(e,t)}function M(e,t){switch(t.type){case"ArrayExpression":{t.type="ArrayPattern";const{elements:r}=t;for(let t=0,n=r.length;t0)f(t)||e.report(20,String.fromCodePoint(t)),e.currentChar=t,e.index++,e.column++;else if(!f(e.currentChar))break;n(e)}e.index<=e.end&&(e.tokenValue+=e.source.slice(a,e.index));const{length:s}=e.tokenValue;if(i&&s>=2&&s<=11){const n=$(V,e.tokenValue);return void 0===n?208897|(r?-2147483648:0):r?209006===n?2050&t?-2147483528:-2147483648|n:1&t?36970===n?-2147483527:36864&~n?20480&~n?-2147274630:262144&t&&!(8&t)?-2147483648|n:-2147483528:-2147483527:!(262144&t)||8&t||20480&~n?241771===n?262144&t?-2147274630:1024&t?-2147483528:-2147483648|n:209005===n?-2147274630:36864&~n?-2147483528:12288|n|-2147483648:-2147483648|n:n}return 208897|(r?-2147483648:0)}function Z(e){let t=n(e);if(92===t)return 130;const r=o(e);return r&&(t=r),g(t)||e.report(96),130}function K(e){return 117!==e.source.charCodeAt(e.index+1)&&e.report(5),e.currentChar=e.source.charCodeAt(e.index+=2),e.column+=2,function(e){let t=0;const r=e.currentChar;if(123===r){const r=e.index-2;for(;64&u[n(e)];)if(t=t<<4|c(e.currentChar),t>1114111)throw new L({index:r,line:e.line,column:e.column},e.currentLocation,104);if(125!==e.currentChar)throw new L({index:r,line:e.line,column:e.column},e.currentLocation,7);return n(e),t}64&u[r]||e.report(7);const o=e.source.charCodeAt(e.index+1);64&u[o]||e.report(7);const i=e.source.charCodeAt(e.index+2);64&u[i]||e.report(7);const a=e.source.charCodeAt(e.index+3);64&u[a]||e.report(7);return t=c(r)<<12|c(o)<<8|c(i)<<4|c(a),e.currentChar=e.source.charCodeAt(e.index+=4),e.column+=4,t}(e)}const Q=[128,128,128,128,128,128,128,128,128,127,135,127,127,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,16842798,134283267,130,208897,8391477,8390213,134283267,67174411,16,8391476,25233968,18,25233969,67108877,8457014,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456256,1077936155,8390721,22,132,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,136,20,8389959,208897,131,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8389702,1074790415,16842799,128];function ee(e,t){e.flags=1^(1|e.flags),e.startIndex=e.index,e.startColumn=e.column,e.startLine=e.line,e.setToken(te(e,t,0))}function te(e,t,c){const l=0===e.index,{source:u}=e;let p=e.currentLocation;for(;e.index=e.end)return 8391476;const t=e.currentChar;return 61===t?(n(e),4194338):42!==t?8391476:61!==n(e)?8391735:(n(e),4194335)}case 8389959:return 61!==n(e)?8389959:(n(e),4194341);case 25233968:{n(e);const t=e.currentChar;return 43===t?(n(e),33619993):61===t?(n(e),4194336):25233968}case 25233969:{n(e);const r=e.currentChar;if(45===r){if(n(e),(1&c||l)&&62===e.currentChar){e.options.webcompat||e.report(112),n(e),c=k(e,u,c,t,3,p),p=e.tokenStart;continue}return 33619994}return 61===r?(n(e),4194337):25233969}case 8457014:if(n(e),e.index=48&&r<=57)return A(e,t,80);if(46===r){const t=e.index+1;if(t=48&&t<=57)))return n(e),67108990}return 22}}}else{if((8232^d)<=1){c=-5&c|1,a(e);continue}const i=o(e);if(i>0&&(d=i),r(d))return e.tokenValue="",Y(e,t,0,0);if(s(d)){n(e);continue}e.report(20,String.fromCodePoint(d))}}return 1048576}const re={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},ne={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};function oe(e){return e.replace(/&(?:[a-zA-Z]+|#[xX][\da-fA-F]+|#\d+);/g,e=>{if("#"===e.charAt(1)){const t=e.charAt(2);return function(e){if(e>=55296&&e<=57343||e>1114111)return"�";return String.fromCodePoint($(ne,e)??e)}("X"===t||"x"===t?parseInt(e.slice(3),16):parseInt(e.slice(2),10))}return $(re,e.slice(1,-1))??e})}function ie(e,t){return e.startIndex=e.tokenIndex=e.index,e.startColumn=e.tokenColumn=e.column,e.startLine=e.tokenLine=e.line,e.setToken(8192&u[e.currentChar]?function(e){const t=e.currentChar;let r=n(e);const o=e.index;for(;r!==t;)e.index>=e.end&&e.report(16),r=n(e);r!==t&&e.report(16);e.tokenValue=e.source.slice(o,e.index),n(e),e.options.raw&&(e.tokenRaw=e.source.slice(e.tokenIndex,e.index));return 134283267}(e):te(e,t,0)),e.getToken()}function ae(e){if(e.startIndex=e.tokenIndex=e.index,e.startColumn=e.tokenColumn=e.column,e.startLine=e.tokenLine=e.line,e.index>=e.end)return void e.setToken(1048576);if(60===e.currentChar)return n(e),void e.setToken(8456256);if(123===e.currentChar)return n(e),void e.setToken(2162700);let t=0;for(;e.indexe.declareUnboundVariable(t))):(c&&e.report(172),r&&(n.forEach(t=>e.declareUnboundVariable(t)),i.forEach(t=>e.addBindingToExports(t)))),P(e,32|t);break}case 132:case 86094:i=yt(e,t,r,void 0,2);break;case 86104:i=ot(e,t,r,void 0,4,1,2,0,e.tokenStart);break;case 241737:i=Se(e,t,r,void 0,8,64);break;case 86090:i=Se(e,t,r,void 0,16,64);break;case 86088:i=ve(e,t,r,void 0,64);break;case 209005:{const{tokenStart:n}=e;if(ee(e,t),!(1&e.flags)&&86104===e.getToken()){i=ot(e,t,r,void 0,4,1,2,1,n);break}}default:e.report(30,D[255&e.getToken()])}const c={type:"ExportNamedDeclaration",declaration:i,specifiers:o,source:a,attributes:s};return e.finishNode(c,n)}(e,t,r);break;case 86106:n=function(e,t,r){const n=e.tokenStart;ee(e,t);let o=null;const{tokenStart:i}=e;let a=[];if(134283267===e.getToken())o=nt(e,t);else{if(143360&e.getToken()){const n=qe(e,t,r);if(a=[e.finishNode({type:"ImportDefaultSpecifier",local:n},i)],U(e,t,18))switch(e.getToken()){case 8391476:a.push(Ne(e,t,r));break;case 2162700:Le(e,t,r,a);break;default:e.report(107)}}else switch(e.getToken()){case 8391476:a=[Ne(e,t,r)];break;case 2162700:Le(e,t,r,a);break;case 67174411:return Ie(e,t,void 0,n);case 67108877:return Ae(e,t,n);default:e.report(30,D[255&e.getToken()])}o=function(e,t){O(e,t,209011),134283267!==e.getToken()&&e.report(105,"Import");return nt(e,t)}(e,t)}const s=Xe(e,t),c={type:"ImportDeclaration",specifiers:a,source:o,attributes:s};return P(e,32|t),e.finishNode(c,n)}(e,t,r);break;default:n=fe(e,t,r,void 0,4,{})}return e.leadingDecorators?.decorators.length&&e.report(170),n}function fe(e,t,r,n,o,i){const a=e.tokenStart;switch(e.getToken()){case 86104:return ot(e,t,r,n,o,1,0,0,a);case 132:case 86094:return yt(e,t,r,n,0);case 86090:return Se(e,t,r,n,16,0);case 241737:return function(e,t,r,n,o){const{tokenValue:i,tokenStart:a}=e,s=e.getToken();let c=rt(e,t);if(2240512&e.getToken()){const o=Ce(e,t,r,n,8,0);return P(e,32|t),e.finishNode({type:"VariableDeclaration",kind:"let",declarations:o},a)}e.assignable=1,1&t&&e.report(85);if(21===e.getToken())return be(e,t,r,n,o,{},i,c,s,0,a);if(10===e.getToken()){let r;e.options.lexical&&(r=le(e,t,i)),e.flags=128^(128|e.flags),c=ht(e,t,r,n,[c],0,a)}else c=Fe(e,t,n,c,0,0,a),c=Re(e,t,n,0,0,a,c);18===e.getToken()&&(c=Ve(e,t,n,0,a,c));return me(e,t,c,a)}(e,t,r,n,o);case 20564:e.report(103,"export");case 86106:switch(ee(e,t),e.getToken()){case 67174411:return Ie(e,t,n,a);case 67108877:return Ae(e,t,a);default:e.report(103,"import")}case 209005:return we(e,t,r,n,o,i,1);default:return he(e,t,r,n,o,i,1)}}function he(e,t,r,n,o,i,a){switch(e.getToken()){case 86088:return ve(e,t,r,n,0);case 20572:return function(e,t,r){4096&t||e.report(92);const n=e.tokenStart;ee(e,32|t);const o=1&e.flags||1048576&e.getToken()?null:Pe(e,t,r,0,1,e.tokenStart);return P(e,32|t),e.finishNode({type:"ReturnStatement",argument:o},n)}(e,t,n);case 20569:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,t),O(e,32|t,67174411),e.assignable=1;const a=Pe(e,t,n,0,1,e.tokenStart);O(e,32|t,16);const s=Te(e,t,r,n,o);let c=null;20563===e.getToken()&&(ee(e,32|t),c=Te(e,t,r,n,o));return e.finishNode({type:"IfStatement",test:a,consequent:s,alternate:c},i)}(e,t,r,n,i);case 20567:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,t);const a=((2048&t)>0||(2&t)>0&&(8&t)>0)&&U(e,t,209006);O(e,32|t,67174411),r=r?.createChildScope(1);let s,c=null,l=null,u=0,p=null,d=86088===e.getToken()||241737===e.getToken()||86090===e.getToken();const{tokenStart:g}=e,f=e.getToken();if(d)241737===f?(p=rt(e,t),2240512&e.getToken()?(8673330===e.getToken()?1&t&&e.report(67):p=e.finishNode({type:"VariableDeclaration",kind:"let",declarations:Ce(e,131072|t,r,n,8,32)},g),e.assignable=1):1&t?e.report(67):(d=!1,e.assignable=1,p=Fe(e,t,n,p,0,0,g),471156===e.getToken()&&e.report(115))):(ee(e,t),p=e.finishNode(86088===f?{type:"VariableDeclaration",kind:"var",declarations:Ce(e,131072|t,r,n,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:Ce(e,131072|t,r,n,16,32)},g),e.assignable=1);else if(1074790417===f)a&&e.report(82);else if(2097152&~f)p=je(e,131072|t,n,1,0,1);else{const r=e.tokenStart;p=2162700===f?ut(e,t,void 0,n,1,0,0,2,32):at(e,t,void 0,n,1,0,0,2,32),u=e.destructible,64&u&&e.report(63),e.assignable=16&u?2:1,p=Fe(e,131072|t,n,p,0,0,r)}if(!(262144&~e.getToken())){if(471156===e.getToken()){2&e.assignable&&e.report(80,a?"await":"of"),M(e,p),ee(e,32|t),s=De(e,t,n,1,0,e.tokenStart),O(e,32|t,16);const c=xe(e,t,r,n,o);return e.finishNode({type:"ForOfStatement",left:p,right:s,body:c,await:a},i)}2&e.assignable&&e.report(80,"in"),M(e,p),ee(e,32|t),a&&e.report(82),s=Pe(e,t,n,0,1,e.tokenStart),O(e,32|t,16);const c=xe(e,t,r,n,o);return e.finishNode({type:"ForInStatement",body:c,left:p,right:s},i)}a&&e.report(82);d||(8&u&&1077936155!==e.getToken()&&e.report(80,"loop"),p=Re(e,131072|t,n,0,0,g,p));18===e.getToken()&&(p=Ve(e,t,n,0,g,p));O(e,32|t,1074790417),1074790417!==e.getToken()&&(c=Pe(e,t,n,0,1,e.tokenStart));O(e,32|t,1074790417),16!==e.getToken()&&(l=Pe(e,t,n,0,1,e.tokenStart));O(e,32|t,16);const h=xe(e,t,r,n,o);return e.finishNode({type:"ForStatement",init:p,test:c,update:l,body:h},i)}(e,t,r,n,i);case 20562:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,32|t);const a=xe(e,t,r,n,o);O(e,t,20578),O(e,32|t,67174411);const s=Pe(e,t,n,0,1,e.tokenStart);return O(e,32|t,16),U(e,32|t,1074790417),e.finishNode({type:"DoWhileStatement",body:a,test:s},i)}(e,t,r,n,i);case 20578:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,t),O(e,32|t,67174411);const a=Pe(e,t,n,0,1,e.tokenStart);O(e,32|t,16);const s=xe(e,t,r,n,o);return e.finishNode({type:"WhileStatement",test:a,body:s},i)}(e,t,r,n,i);case 86110:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,t),O(e,32|t,67174411);const a=Pe(e,t,n,0,1,e.tokenStart);O(e,t,16),O(e,t,2162700);const s=[];let c=0;r=r?.createChildScope(8);for(;1074790415!==e.getToken();){const{tokenStart:i}=e;let a=null;const l=[];for(U(e,32|t,20556)?a=Pe(e,t,n,0,1,e.tokenStart):(O(e,32|t,20561),c&&e.report(89),c=1),O(e,32|t,21);20556!==e.getToken()&&1074790415!==e.getToken()&&20561!==e.getToken();)l.push(fe(e,4|t,r,n,2,{$:o}));s.push(e.finishNode({type:"SwitchCase",test:a,consequent:l},i))}return O(e,32|t,1074790415),e.finishNode({type:"SwitchStatement",discriminant:a,cases:s},i)}(e,t,r,n,i);case 1074790417:return function(e,t){const r=e.tokenStart;return ee(e,32|t),e.finishNode({type:"EmptyStatement"},r)}(e,t);case 2162700:return ke(e,t,r?.createChildScope(),n,i,e.tokenStart);case 86112:return function(e,t,r){const n=e.tokenStart;ee(e,32|t),1&e.flags&&e.report(90);const o=Pe(e,t,r,0,1,e.tokenStart);return P(e,32|t),e.finishNode({type:"ThrowStatement",argument:o},n)}(e,t,n);case 20555:return function(e,t,r){const n=e.tokenStart;ee(e,32|t);let o=null;if(!(1&e.flags)&&143360&e.getToken()){const{tokenValue:n}=e;o=rt(e,32|t),J(e,r,n,0)||e.report(138,n)}else 132&t||e.report(69);return P(e,32|t),e.finishNode({type:"BreakStatement",label:o},n)}(e,t,i);case 20559:return function(e,t,r){128&t||e.report(68);const n=e.tokenStart;ee(e,t);let o=null;if(!(1&e.flags)&&143360&e.getToken()){const{tokenValue:n}=e;o=rt(e,32|t),J(e,r,n,1)||e.report(138,n)}return P(e,32|t),e.finishNode({type:"ContinueStatement",label:o},n)}(e,t,i);case 20577:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,32|t);const a=r?.createChildScope(16),s=ke(e,t,a,n,{$:o}),{tokenStart:c}=e,l=U(e,32|t,20557)?function(e,t,r,n,o,i){let a=null,s=r;U(e,t,67174411)&&(r=r?.createChildScope(4),a=qt(e,t,r,n,2097152&~e.getToken()?512:256,0),18===e.getToken()?e.report(86):1077936155===e.getToken()&&e.report(87),O(e,32|t,16));s=r?.createChildScope(32);const c=ke(e,t,s,n,{$:o});return e.finishNode({type:"CatchClause",param:a,body:c},i)}(e,t,r,n,o,c):null;let u=null;if(20566===e.getToken()){ee(e,32|t);const i=r?.createChildScope(4);u=ke(e,t,i,n,{$:o})}l||u||e.report(88);return e.finishNode({type:"TryStatement",block:s,handler:l,finalizer:u},i)}(e,t,r,n,i);case 20579:return function(e,t,r,n,o){const i=e.tokenStart;ee(e,t),1&t&&e.report(91);O(e,32|t,67174411);const a=Pe(e,t,n,0,1,e.tokenStart);O(e,32|t,16);const s=he(e,t,r,n,2,o,0);return e.finishNode({type:"WithStatement",object:a,body:s},i)}(e,t,r,n,i);case 20560:return function(e,t){const r=e.tokenStart;return ee(e,32|t),P(e,32|t),e.finishNode({type:"DebuggerStatement"},r)}(e,t);case 209005:return we(e,t,r,n,o,i,0);case 20557:e.report(162);case 20566:e.report(163);case 86104:e.report(1&t?76:e.options.webcompat?77:78);case 86094:e.report(79);default:return function(e,t,r,n,o,i,a){const{tokenValue:s,tokenStart:c}=e,l=e.getToken();let u;if(241737===l)u=rt(e,t),1&t&&e.report(85),69271571===e.getToken()&&e.report(84);else u=Je(e,t,n,2,0,1,0,1,e.tokenStart);if(143360&l&&21===e.getToken())return be(e,t,r,n,o,i,s,u,l,a,c);u=Fe(e,t,n,u,0,0,c),u=Re(e,t,n,0,0,c,u),18===e.getToken()&&(u=Ve(e,t,n,0,c,u));return me(e,t,u,c)}(e,t,r,n,o,i,a)}}function ke(e,t,r,n,o,i=e.tokenStart,a="BlockStatement"){const s=[];for(O(e,32|t,2162700);1074790415!==e.getToken();)s.push(fe(e,t,r,n,2,{$:o}));return O(e,32|t,1074790415),e.finishNode({type:a,body:s},i)}function me(e,t,r,n){return P(e,32|t),e.finishNode({type:"ExpressionStatement",expression:r},n)}function be(e,t,r,n,o,i,a,s,c,l,u){j(e,t,0,c,1),function(e,t,r){let n=t;for(;n;)n["$"+r]&&e.report(136,r),n=n.$;t["$"+r]=1}(e,i,a),ee(e,32|t);const p=!l||1&t||!e.options.webcompat||86104!==e.getToken()?he(e,t,r,n,o,i,l):ot(e,t,r?.createChildScope(),n,o,0,0,0,e.tokenStart);return e.finishNode({type:"LabeledStatement",label:s,body:p},u)}function we(e,t,r,n,o,i,a){const{tokenValue:s,tokenStart:c}=e,l=e.getToken();let u=rt(e,t);if(21===e.getToken())return be(e,t,r,n,o,i,s,u,l,1,c);const p=1&e.flags;if(!p){if(86104===e.getToken())return a||e.report(123),ot(e,t,r,n,o,1,0,1,c);if(H(t,e.getToken()))return u=bt(e,t,n,1,c),18===e.getToken()&&(u=Ve(e,t,n,0,c,u)),me(e,t,u,c)}return 67174411===e.getToken()?u=wt(e,t,n,u,1,1,0,p,c):(10===e.getToken()&&(X(e,t,l),36864&~l||(e.flags|=256),u=gt(e,2048|t,n,e.tokenValue,u,0,1,0,c)),e.assignable=1),u=Fe(e,t,n,u,0,0,c),u=Re(e,t,n,0,0,c,u),e.assignable=1,18===e.getToken()&&(u=Ve(e,t,n,0,c,u)),me(e,t,u,c)}function ye(e,t,r,n,o){const i=e.startIndex;1074790417!==n&&(e.assignable=2,r=Fe(e,t,void 0,r,0,0,o),1074790417!==e.getToken()&&(r=Re(e,t,void 0,0,0,o,r),18===e.getToken()&&(r=Ve(e,t,void 0,0,o,r))),P(e,32|t));const a={type:"ExpressionStatement",expression:r};return"Literal"===r.type&&"string"==typeof r.value&&(a.directive=e.source.slice(o.index+1,i-1)),e.finishNode(a,o)}function Te(e,t,r,n,o){const{tokenStart:i}=e;return 1&t||!e.options.webcompat||86104!==e.getToken()?he(e,t,r,n,0,{$:o},0):ot(e,t,r?.createChildScope(),n,0,0,0,0,i)}function xe(e,t,r,n,o){return he(e,131072^(131072|t)|128,r,n,0,{loop:1,$:o},0)}function Se(e,t,r,n,o,i){const a=e.tokenStart;ee(e,t);const s=Ce(e,t,r,n,o,i);return P(e,32|t),e.finishNode({type:"VariableDeclaration",kind:8&o?"let":"const",declarations:s},a)}function ve(e,t,r,n,o){const i=e.tokenStart;ee(e,t);const a=Ce(e,t,r,n,4,o);return P(e,32|t),e.finishNode({type:"VariableDeclaration",kind:"var",declarations:a},i)}function Ce(e,t,r,n,o,i){let a=1;const s=[Ee(e,t,r,n,o,i)];for(;U(e,t,18);)a++,s.push(Ee(e,t,r,n,o,i));return a>1&&32&i&&262144&e.getToken()&&e.report(61,D[255&e.getToken()]),s}function Ee(e,t,r,n,o,i){const{tokenStart:a}=e,s=e.getToken();let c=null;const l=qt(e,t,r,n,o,i);if(1077936155===e.getToken()){if(ee(e,32|t),c=De(e,t,n,1,0,e.tokenStart),(32&i||!(2097152&s))&&(471156===e.getToken()||8673330===e.getToken()&&(2097152&s||!(4&o)||1&t)))throw new L(a,e.currentLocation,60,471156===e.getToken()?"of":"in")}else(16&o||(2097152&s)>0)&&262144&~e.getToken()&&e.report(59,16&o?"const":"destructuring");return e.finishNode({type:"VariableDeclarator",id:l,init:c},a)}function qe(e,t,r){return H(t,e.getToken())||e.report(118),537079808&~e.getToken()||e.report(119),r?.addBlockName(t,e.tokenValue,8,0),rt(e,t)}function Ne(e,t,r){const{tokenStart:n}=e;if(ee(e,t),O(e,t,77932),!(134217728&~e.getToken()))throw new L(n,e.currentLocation,30,D[255&e.getToken()]);return e.finishNode({type:"ImportNamespaceSpecifier",local:qe(e,t,r)},n)}function Le(e,t,r,n){for(ee(e,t);143360&e.getToken()||134283267===e.getToken();){let{tokenValue:o,tokenStart:i}=e;const a=e.getToken(),s=_e(e,t);let c;U(e,t,77932)?(134217728&~e.getToken()&&18!==e.getToken()?j(e,t,16,e.getToken(),0):e.report(106),o=e.tokenValue,c=rt(e,t)):"Identifier"===s.type?(j(e,t,16,a,0),c=s):e.report(25,D[108]),r?.addBlockName(t,o,8,0),n.push(e.finishNode({type:"ImportSpecifier",local:c,imported:s},i)),1074790415!==e.getToken()&&O(e,t,18)}return O(e,t,1074790415),n}function Ae(e,t,r){let n=ze(e,t,e.finishNode({type:"Identifier",name:"import"},r),r);return n=Fe(e,t,void 0,n,0,0,r),n=Re(e,t,void 0,0,0,r,n),18===e.getToken()&&(n=Ve(e,t,void 0,0,r,n)),me(e,t,n,r)}function Ie(e,t,r,n){let o=He(e,t,r,0,n);return o=Fe(e,t,r,o,0,0,n),18===e.getToken()&&(o=Ve(e,t,r,0,n,o)),me(e,t,o,n)}function De(e,t,r,n,o,i){let a=Je(e,t,r,2,0,n,o,1,i);return a=Fe(e,t,r,a,o,0,i),Re(e,t,r,o,0,i,a)}function Ve(e,t,r,n,o,i){const a=[i];for(;U(e,32|t,18);)a.push(De(e,t,r,1,n,e.tokenStart));return e.finishNode({type:"SequenceExpression",expressions:a},o)}function Pe(e,t,r,n,o,i){const a=De(e,t,r,o,n,i);return 18===e.getToken()?Ve(e,t,r,n,i,a):a}function Re(e,t,r,n,o,i,a){const s=e.getToken();if(!(4194304&~s)){2&e.assignable&&e.report(26),(!o&&1077936155===s&&"ArrayExpression"===a.type||"ObjectExpression"===a.type)&&M(e,a),ee(e,32|t);const c=De(e,t,r,1,n,e.tokenStart);return e.assignable=2,e.finishNode(o?{type:"AssignmentPattern",left:a,right:c}:{type:"AssignmentExpression",left:a,operator:D[255&s],right:c},i)}return 8388608&~s||(a=Oe(e,t,r,n,i,4,s,a)),U(e,32|t,22)&&(a=Ue(e,t,r,a,i)),a}function Be(e,t,r,n,o,i,a){const s=e.getToken();ee(e,32|t);const c=De(e,t,r,1,n,e.tokenStart);return a=e.finishNode(o?{type:"AssignmentPattern",left:a,right:c}:{type:"AssignmentExpression",left:a,operator:D[255&s],right:c},i),e.assignable=2,a}function Ue(e,t,r,n,o){const i=De(e,131072^(131072|t),r,1,0,e.tokenStart);O(e,32|t,21),e.assignable=1;const a=De(e,t,r,1,0,e.tokenStart);return e.assignable=2,e.finishNode({type:"ConditionalExpression",test:n,consequent:i,alternate:a},o)}function Oe(e,t,r,n,o,i,a,s){const c=8673330&-((131072&t)>0);let l,u;for(e.assignable=2;8388608&e.getToken()&&(l=e.getToken(),u=3840&l,(524288&l&&268435456&a||524288&a&&268435456&l)&&e.report(165),!(u+((8391735===l)<<8)-((c===l)<<12)<=i));)ee(e,32|t),s=e.finishNode({type:524288&l||268435456&l?"LogicalExpression":"BinaryExpression",left:s,right:Oe(e,t,r,n,e.tokenStart,u,l,je(e,t,r,0,n,1)),operator:D[255&l]},o);return 1077936155===e.getToken()&&e.report(26),s}function Me(e,t,r,n,o,i,a){const{tokenStart:s}=e;O(e,32|t,2162700);const c=[];if(1074790415!==e.getToken()){for(;134283267===e.getToken();){const{index:r,tokenStart:n,tokenIndex:o,tokenValue:i}=e,s=e.getToken(),l=nt(e,t);if(R(e,r,o,i)){if(t|=1,128&e.flags)throw new L(n,e.currentLocation,66);if(64&e.flags)throw new L(n,e.currentLocation,9);if(4096&e.flags)throw new L(n,e.currentLocation,15);a?.reportScopeError()}c.push(ye(e,t,l,s,n))}1&t&&(i&&(537079808&~i||e.report(119),36864&~i||e.report(40)),512&e.flags&&e.report(119),256&e.flags&&e.report(118))}for(e.flags=4928^(4928|e.flags),e.destructible=256^(256|e.destructible);1074790415!==e.getToken();)c.push(fe(e,t,r,n,4,{}));return O(e,24&o?32|t:t,1074790415),e.flags&=-4289,1077936155===e.getToken()&&e.report(26),e.finishNode({type:"BlockStatement",body:c},s)}function je(e,t,r,n,o,i){const a=e.tokenStart;return Fe(e,t,r,Je(e,t,r,2,0,n,o,i,a),o,0,a)}function Fe(e,t,r,n,o,i,a){if(33619968&~e.getToken()||1&e.flags){if(!(67108864&~e.getToken())){switch(t=131072^(131072|t),e.getToken()){case 67108877:{ee(e,8^(262152|t)),16&t&&130===e.getToken()&&"super"===e.tokenValue&&e.report(173),e.assignable=1;const o=Ge(e,64|t,r);n=e.finishNode({type:"MemberExpression",object:n,computed:!1,property:o,optional:!1},a);break}case 69271571:{let i=!1;2048&~e.flags||(i=!0,e.flags=2048^(2048|e.flags)),ee(e,32|t);const{tokenStart:s}=e,c=Pe(e,t,r,o,1,s);O(e,t,20),e.assignable=1,n=e.finishNode({type:"MemberExpression",object:n,computed:!0,property:c,optional:!1},a),i&&(e.flags|=2048);break}case 67174411:{if(!(1024&~e.flags))return e.flags=1024^(1024|e.flags),n;let i=!1;2048&~e.flags||(i=!0,e.flags=2048^(2048|e.flags));const s=tt(e,t,r,o);e.assignable=2,n=e.finishNode({type:"CallExpression",callee:n,arguments:s,optional:!1},a),i&&(e.flags|=2048);break}case 67108990:ee(e,8^(262152|t)),e.flags|=2048,e.assignable=2,n=function(e,t,r,n,o){let i,a=!1;69271571!==e.getToken()&&67174411!==e.getToken()||2048&~e.flags||(a=!0,e.flags=2048^(2048|e.flags));if(69271571===e.getToken()){ee(e,32|t);const{tokenStart:a}=e,s=Pe(e,t,r,0,1,a);O(e,t,20),e.assignable=2,i=e.finishNode({type:"MemberExpression",object:n,computed:!0,optional:!0,property:s},o)}else if(67174411===e.getToken()){const a=tt(e,t,r,0);e.assignable=2,i=e.finishNode({type:"CallExpression",callee:n,arguments:a,optional:!0},o)}else{const a=Ge(e,t,r);e.assignable=2,i=e.finishNode({type:"MemberExpression",object:n,computed:!1,optional:!0,property:a},o)}a&&(e.flags|=2048);return i}(e,t,r,n,a);break;default:2048&~e.flags||e.report(166),e.assignable=2,n=e.finishNode({type:"TaggedTemplateExpression",tag:n,quasi:67174408===e.getToken()?Ke(e,64|t,r):Ze(e,t)},a)}n=Fe(e,t,r,n,0,1,a)}}else n=function(e,t,r,n){2&e.assignable&&e.report(55);const o=e.getToken();return ee(e,t),e.assignable=2,e.finishNode({type:"UpdateExpression",argument:r,operator:D[255&o],prefix:!1},n)}(e,t,n,a);return 0!==i||2048&~e.flags||(e.flags=2048^(2048|e.flags),n=e.finishNode({type:"ChainExpression",expression:n},a)),n}function Ge(e,t,r){return 143360&e.getToken()||-2147483528===e.getToken()||-2147483527===e.getToken()||130===e.getToken()||e.report(160),130===e.getToken()?Ct(e,t,r,0):rt(e,t)}function Je(e,t,r,n,o,i,a,s,c){if(!(143360&~e.getToken())){switch(e.getToken()){case 209006:return function(e,t,r,n,o,i){o&&(e.destructible|=128),524288&t&&e.report(177);const a=dt(e,t,r);if("ArrowFunctionExpression"===a.type||!(65536&e.getToken())){if(2048&t)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},176);if(2&t)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},110);if(8192&t&&2048&t)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},110);return a}if(8192&t)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},31);if(2048&t||2&t&&8&t){if(n)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},0);const o=je(e,t,r,0,0,1);return 8391735===e.getToken()&&e.report(33),e.assignable=2,e.finishNode({type:"AwaitExpression",argument:o},i)}if(2&t)throw new L(i,{index:e.startIndex,line:e.startLine,column:e.startColumn},98);return a}(e,t,r,o,a,c);case 241771:return function(e,t,r,n,o,i){if(n&&(e.destructible|=256),1024&t){ee(e,32|t),8192&t&&e.report(32),o||e.report(26),22===e.getToken()&&e.report(124);let n=null,a=!1;return 1&e.flags?8391476===e.getToken()&&e.report(30,D[255&e.getToken()]):(a=U(e,32|t,8391476),(77824&e.getToken()||a)&&(n=De(e,t,r,1,0,e.tokenStart))),e.assignable=2,e.finishNode({type:"YieldExpression",argument:n,delegate:a},i)}return 1&t&&e.report(97,"yield"),dt(e,t,r)}(e,t,r,a,i,c);case 209005:return function(e,t,r,n,o,i,a,s){const c=e.getToken(),l=rt(e,t),{flags:u}=e;if(!(1&u)){if(86104===e.getToken())return it(e,t,r,1,n,s);if(H(t,e.getToken()))return o||e.report(0),36864&~e.getToken()||(e.flags|=256),bt(e,t,r,i,s)}return a||67174411!==e.getToken()?10===e.getToken()?(X(e,t,c),a&&e.report(51),36864&~c||(e.flags|=256),gt(e,t,r,e.tokenValue,l,a,i,0,s)):(e.assignable=1,l):wt(e,t,r,l,i,1,0,u,s)}(e,t,r,a,s,i,o,c)}const{tokenValue:l}=e,u=e.getToken(),p=rt(e,64|t);return 10===e.getToken()?(s||e.report(0),X(e,t,u),36864&~u||(e.flags|=256),gt(e,t,r,l,p,o,i,0,c)):(!(16&t)||32768&t||8192&t||"arguments"!==e.tokenValue||e.report(130),73==(255&u)&&(1&t&&e.report(113),24&n&&e.report(100)),e.assignable=1&t&&!(537079808&~u)?2:1,p)}if(!(134217728&~e.getToken()))return nt(e,t);switch(e.getToken()){case 33619993:case 33619994:return function(e,t,r,n,o,i){n&&e.report(56),o||e.report(0);const a=e.getToken();ee(e,32|t);const s=je(e,t,r,0,0,1);return 2&e.assignable&&e.report(55),e.assignable=2,e.finishNode({type:"UpdateExpression",argument:s,operator:D[255&a],prefix:!0},i)}(e,t,r,o,s,c);case 16863276:case 16842798:case 16842799:case 25233968:case 25233969:case 16863275:case 16863277:return function(e,t,r,n,o){n||e.report(0);const{tokenStart:i}=e,a=e.getToken();ee(e,32|t);const s=je(e,t,r,0,o,1);var c;return 8391735===e.getToken()&&e.report(33),1&t&&16863276===a&&("Identifier"===s.type?e.report(121):(c=s).property&&"PrivateIdentifier"===c.property.type&&e.report(127)),e.assignable=2,e.finishNode({type:"UnaryExpression",operator:D[255&a],argument:s,prefix:!0},i)}(e,t,r,s,a);case 86104:return it(e,t,r,0,a,c);case 2162700:return function(e,t,r,n,o){const i=ut(e,t,void 0,r,n,o,0,2,0);64&e.destructible&&e.report(63);8&e.destructible&&e.report(62);return i}(e,t,r,i?0:1,a);case 69271571:return function(e,t,r,n,o){const i=at(e,t,void 0,r,n,o,0,2,0);64&e.destructible&&e.report(63);8&e.destructible&&e.report(62);return i}(e,t,r,i?0:1,a);case 67174411:return function(e,t,r,n,o,i,a){e.flags=128^(128|e.flags);const s=e.tokenStart;ee(e,262176|t);const c=e.createScopeIfLexical()?.createChildScope(512);if(t=131072^(131072|t),U(e,t,16))return ft(e,t,c,r,[],n,0,a);let l,u=0;e.destructible&=-385;let p=[],d=0,g=0,f=0;const h=e.tokenStart;e.assignable=1;for(;16!==e.getToken();){const{tokenStart:n}=e,a=e.getToken();if(143360&a)c?.addBlockName(t,e.tokenValue,1,0),537079808&~a?36864&~a||(f=1):g=1,l=Je(e,t,r,o,0,1,1,1,n),16===e.getToken()||18===e.getToken()?2&e.assignable&&(u|=16,g=1):(1077936155===e.getToken()?g=1:u|=16,l=Fe(e,t,r,l,1,0,n),16!==e.getToken()&&18!==e.getToken()&&(l=Re(e,t,r,1,0,n,l)));else{if(2097152&~a){if(14===a){l=ct(e,t,c,r,16,o,i,0,1,0),16&e.destructible&&e.report(74),g=1,!d||16!==e.getToken()&&18!==e.getToken()||p.push(l),u|=8;break}if(u|=16,l=De(e,t,r,1,1,n),!d||16!==e.getToken()&&18!==e.getToken()||p.push(l),18===e.getToken()&&(d||(d=1,p=[l])),d){for(;U(e,32|t,18);)p.push(De(e,t,r,1,1,e.tokenStart));e.assignable=2,l=e.finishNode({type:"SequenceExpression",expressions:p},h)}return O(e,t,16),e.destructible=u,e.options.preserveParens?e.finishNode({type:"ParenthesizedExpression",expression:l},s):l}l=2162700===a?ut(e,262144|t,c,r,0,1,0,o,i):at(e,262144|t,c,r,0,1,0,o,i),u|=e.destructible,g=1,e.assignable=2,16!==e.getToken()&&18!==e.getToken()&&(8&u&&e.report(122),l=Fe(e,t,r,l,0,0,n),u|=16,16!==e.getToken()&&18!==e.getToken()&&(l=Re(e,t,r,0,0,n,l)))}if(!d||16!==e.getToken()&&18!==e.getToken()||p.push(l),!U(e,32|t,18))break;if(d||(d=1,p=[l]),16===e.getToken()){u|=8;break}}d&&(e.assignable=2,l=e.finishNode({type:"SequenceExpression",expressions:p},h));O(e,t,16),16&u&&8&u&&e.report(151);if(u|=256&e.destructible?256:128&e.destructible?128:0,10===e.getToken())return 48&u&&e.report(49),2050&t&&128&u&&e.report(31),1025&t&&256&u&&e.report(32),g&&(e.flags|=128),f&&(e.flags|=256),ft(e,t,c,r,d?p:[l],n,0,a);64&u&&e.report(63);8&u&&e.report(144);return e.destructible=256^(256|e.destructible)|u,e.options.preserveParens?e.finishNode({type:"ParenthesizedExpression",expression:l},s):l}(e,64|t,r,i,1,0,c);case 86021:case 86022:case 86023:return function(e,t){const r=e.tokenStart,n=D[255&e.getToken()],o=86023===e.getToken()?null:"true"===n;return ee(e,t),e.assignable=2,e.finishNode(e.options.raw?{type:"Literal",value:o,raw:n}:{type:"Literal",value:o},r)}(e,t);case 86111:return function(e,t){const{tokenStart:r}=e;return ee(e,t),e.assignable=2,e.finishNode({type:"ThisExpression"},r)}(e,t);case 65540:return function(e,t){const{tokenRaw:r,tokenRegExp:n,tokenValue:o,tokenStart:i}=e;ee(e,t),e.assignable=2;const a={type:"Literal",value:o,regex:n};e.options.raw&&(a.raw=r);return e.finishNode(a,i)}(e,t);case 132:case 86094:return function(e,t,r,n,o){let i=null,a=null;const s=Tt(e,t,r);t=16384^(16385|t),ee(e,t),4096&e.getToken()&&20565!==e.getToken()&&(G(e,t,e.getToken())&&e.report(118),537079808&~e.getToken()||e.report(119),i=rt(e,t));let c=t;U(e,32|t,20565)?(a=je(e,t,r,0,n,0),c|=512):c=512^(512|c);const l=St(e,c,t,void 0,r,2,0,n);return e.assignable=2,e.finishNode({type:"ClassExpression",id:i,superClass:a,body:l,...e.options.next?{decorators:s}:null},o)}(e,t,r,a,c);case 86109:return function(e,t){const{tokenStart:r}=e;switch(ee(e,t),e.getToken()){case 67108990:e.report(167);case 67174411:512&t||e.report(28),e.assignable=2;break;case 69271571:case 67108877:256&t||e.report(29),e.assignable=1;break;default:e.report(30,"super")}return e.finishNode({type:"Super"},r)}(e,t);case 67174409:return Ze(e,t);case 67174408:return Ke(e,t,r);case 86107:return function(e,t,r,n){const{tokenStart:o}=e,i=rt(e,32|t),{tokenStart:a}=e;if(U(e,t,67108877)){if(65536&t&&209029===e.getToken())return e.assignable=2,function(e,t,r,n){const o=rt(e,t);return e.finishNode({type:"MetaProperty",meta:r,property:o},n)}(e,t,i,o);e.report(94)}e.assignable=2,16842752&~e.getToken()||e.report(65,D[255&e.getToken()]);const s=Je(e,t,r,2,1,0,n,1,a);t=131072^(131072|t),67108990===e.getToken()&&e.report(168);const c=mt(e,t,r,s,n,a);return e.assignable=2,e.finishNode({type:"NewExpression",callee:c,arguments:67174411===e.getToken()?tt(e,t,r,n):[]},o)}(e,t,r,a);case 134283388:return Ye(e,t);case 130:return Ct(e,t,r,0);case 86106:return function(e,t,r,n,o,i){let a=rt(e,t);if(67108877===e.getToken())return ze(e,t,a,i);n&&e.report(142);return a=He(e,t,r,o,i),e.assignable=2,Fe(e,t,r,a,o,0,i)}(e,t,r,o,a,c);case 8456256:if(e.options.jsx)return Lt(e,t,r,0,e.tokenStart);default:if(H(t,e.getToken()))return dt(e,t,r);e.report(30,D[255&e.getToken()])}}function ze(e,t,r,n){2&t||e.report(169),ee(e,t);const o=e.getToken();return 209030!==o&&"meta"!==e.tokenValue?e.report(174):-2147483648&o&&e.report(175),e.assignable=2,e.finishNode({type:"MetaProperty",meta:r,property:rt(e,t)},n)}function He(e,t,r,n,o){O(e,32|t,67174411),14===e.getToken()&&e.report(143);const i=De(e,t,r,1,n,e.tokenStart);let a=null;if(18===e.getToken()){if(O(e,t,18),16!==e.getToken()){a=De(e,131072^(131072|t),r,1,n,e.tokenStart)}U(e,t,18)}const s={type:"ImportExpression",source:i,options:a};return O(e,t,16),e.finishNode(s,o)}function Xe(e,t){if(!U(e,t,20579))return[];O(e,t,2162700);const r=[],n=new Set;for(;1074790415!==e.getToken();){const o=e.tokenStart,i=We(e,t);O(e,t,21);const a=$e(e,t),s="Literal"===i.type?i.value:i.name;n.has(s)&&e.report(145,`${s}`),n.add(s),r.push(e.finishNode({type:"ImportAttribute",key:i,value:a},o)),1074790415!==e.getToken()&&O(e,t,18)}return O(e,t,1074790415),r}function $e(e,t){if(134283267===e.getToken())return nt(e,t);e.report(30,D[255&e.getToken()])}function We(e,t){return 134283267===e.getToken()?nt(e,t):143360&e.getToken()?rt(e,t):void e.report(30,D[255&e.getToken()])}function _e(e,t){return 134283267===e.getToken()?(function(e,t){const r=t.length;for(let n=0;n56319||++n>=r||56320!=(64512&t.charCodeAt(n)))&&e.report(171,JSON.stringify(t.charAt(n--)))}}(e,e.tokenValue),nt(e,t)):143360&e.getToken()?rt(e,t):void e.report(30,D[255&e.getToken()])}function Ye(e,t){const{tokenRaw:r,tokenValue:n,tokenStart:o}=e;ee(e,t),e.assignable=2;const i={type:"Literal",value:n,bigint:String(n)};return e.options.raw&&(i.raw=r),e.finishNode(i,o)}function Ze(e,t){e.assignable=2;const{tokenValue:r,tokenRaw:n,tokenStart:o}=e;O(e,t,67174409);const i=[Qe(e,r,n,o,!0)];return e.finishNode({type:"TemplateLiteral",expressions:[],quasis:i},o)}function Ke(e,t,r){t=131072^(131072|t);const{tokenValue:n,tokenRaw:o,tokenStart:i}=e;O(e,-65&t|32,67174408);const a=[Qe(e,n,o,i,!1)],s=[Pe(e,-65&t,r,0,1,e.tokenStart)];for(1074790415!==e.getToken()&&e.report(83);67174409!==e.setToken(q(e,t),!0);){const{tokenValue:n,tokenRaw:o,tokenStart:i}=e;O(e,-65&t|32,67174408),a.push(Qe(e,n,o,i,!1)),s.push(Pe(e,t,r,0,1,e.tokenStart)),1074790415!==e.getToken()&&e.report(83)}{const{tokenValue:r,tokenRaw:n,tokenStart:o}=e;O(e,t,67174409),a.push(Qe(e,r,n,o,!0))}return e.finishNode({type:"TemplateLiteral",expressions:s,quasis:a},i)}function Qe(e,t,r,n,o){const i=e.finishNode({type:"TemplateElement",value:{cooked:t,raw:r},tail:o},n),a=o?1:2;return e.options.ranges&&(i.start+=1,i.range[0]+=1,i.end-=a,i.range[1]-=a),e.options.loc&&(i.loc.start.column+=1,i.loc.end.column-=a),i}function et(e,t,r){const n=e.tokenStart;O(e,32|(t=131072^(131072|t)),14);const o=De(e,t,r,1,0,e.tokenStart);return e.assignable=1,e.finishNode({type:"SpreadElement",argument:o},n)}function tt(e,t,r,n){ee(e,32|t);const o=[];if(16===e.getToken())return ee(e,64|t),o;for(;16!==e.getToken()&&(14===e.getToken()?o.push(et(e,t,r)):o.push(De(e,t,r,1,n,e.tokenStart)),18===e.getToken())&&(ee(e,32|t),16!==e.getToken()););return O(e,64|t,16),o}function rt(e,t){const{tokenValue:r,tokenStart:n}=e,o="await"===r&&!(-2147483648&e.getToken());return ee(e,t|(o?32:0)),e.finishNode({type:"Identifier",name:r},n)}function nt(e,t){const{tokenValue:r,tokenRaw:n,tokenStart:o}=e;return 134283388===e.getToken()?Ye(e,t):(ee(e,t),e.assignable=2,e.finishNode(e.options.raw?{type:"Literal",value:r,raw:n}:{type:"Literal",value:r},o))}function ot(e,t,r,n,o,i,a,s,c){ee(e,32|t);const l=i?B(e,t,8391476):0;let u,p=null,d=r?e.createScope():void 0;if(67174411===e.getToken())1&a||e.report(39,"Function");else{const n=!(4&o)||8&t&&2&t?64|(s?1024:0)|(l?1024:0):4;F(e,t,e.getToken()),r&&(4&n?r.addVarName(t,e.tokenValue,n):r.addBlockName(t,e.tokenValue,n,o),d=d?.createChildScope(128),a&&2&a&&e.declareUnboundVariable(e.tokenValue)),u=e.getToken(),143360&e.getToken()?p=rt(e,t):e.report(30,D[255&e.getToken()])}{const e=28416;t=(t|e)^e|65536|(s?2048:0)|(l?1024:0)|(l?0:262144)}d=d?.createChildScope(256);const g=kt(e,-524289&t|8192,d,n,0,1),f=524428,h=Me(e,36864|(t|f)^f,d?.createChildScope(64),n,8,u,d);return e.finishNode({type:"FunctionDeclaration",id:p,params:g,body:h,async:1===s,generator:1===l},c)}function it(e,t,r,n,o,i){ee(e,32|t);const a=B(e,t,8391476),s=(n?2048:0)|(a?1024:0);let c,l=null,u=e.createScopeIfLexical();const p=552704;143360&e.getToken()&&(F(e,(t|p)^p|s,e.getToken()),u=u?.createChildScope(128),c=e.getToken(),l=rt(e,t)),t=(t|p)^p|65536|s|(a?0:262144),u=u?.createChildScope(256);const d=kt(e,-524289&t|8192,u,r,o,1),g=Me(e,36864|-131229&t,u?.createChildScope(64),r,0,c,u);return e.assignable=2,e.finishNode({type:"FunctionExpression",id:l,params:d,body:g,async:1===n,generator:1===a},i)}function at(e,t,r,n,o,i,a,s,c){const{tokenStart:l}=e;ee(e,32|t);const u=[];let p=0;for(t=131072^(131072|t);20!==e.getToken();)if(U(e,32|t,18))u.push(null);else{let o;const{tokenStart:l,tokenValue:d}=e,g=e.getToken();if(143360&g)if(o=Je(e,t,n,s,0,1,i,1,l),1077936155===e.getToken()){2&e.assignable&&e.report(26),ee(e,32|t),r?.addVarOrBlock(t,d,s,c);const u=De(e,t,n,1,i,e.tokenStart);o=e.finishNode(a?{type:"AssignmentPattern",left:o,right:u}:{type:"AssignmentExpression",operator:"=",left:o,right:u},l),p|=256&e.destructible?256:128&e.destructible?128:0}else 18===e.getToken()||20===e.getToken()?(2&e.assignable?p|=16:r?.addVarOrBlock(t,d,s,c),p|=256&e.destructible?256:128&e.destructible?128:0):(p|=1&s?32:2&s?0:16,o=Fe(e,t,n,o,i,0,l),18!==e.getToken()&&20!==e.getToken()?(1077936155!==e.getToken()&&(p|=16),o=Re(e,t,n,i,a,l,o)):1077936155!==e.getToken()&&(p|=2&e.assignable?16:32));else 2097152&g?(o=2162700===e.getToken()?ut(e,t,r,n,0,i,a,s,c):at(e,t,r,n,0,i,a,s,c),p|=e.destructible,e.assignable=16&e.destructible?2:1,18===e.getToken()||20===e.getToken()?2&e.assignable&&(p|=16):8&e.destructible?e.report(71):(o=Fe(e,t,n,o,i,0,l),p=2&e.assignable?16:0,18!==e.getToken()&&20!==e.getToken()?o=Re(e,t,n,i,a,l,o):1077936155!==e.getToken()&&(p|=2&e.assignable?16:32))):14===g?(o=ct(e,t,r,n,20,s,c,0,i,a),p|=e.destructible,18!==e.getToken()&&20!==e.getToken()&&e.report(30,D[255&e.getToken()])):(o=je(e,t,n,1,0,1),18!==e.getToken()&&20!==e.getToken()?(o=Re(e,t,n,i,a,l,o),3&s||67174411!==g||(p|=16)):2&e.assignable?p|=16:67174411===g&&(p|=1&e.assignable&&3&s?32:16));if(u.push(o),!U(e,32|t,18))break;if(20===e.getToken())break}O(e,t,20);const d=e.finishNode({type:a?"ArrayPattern":"ArrayExpression",elements:u},l);return!o&&4194304&e.getToken()?st(e,t,n,p,i,a,l,d):(e.destructible=p,d)}function st(e,t,r,n,o,i,a,s){1077936155!==e.getToken()&&e.report(26),ee(e,32|t),16&n&&e.report(26),i||M(e,s);const{tokenStart:c}=e,l=De(e,t,r,1,o,c);return e.destructible=72^(72|n)|(128&e.destructible?128:0)|(256&e.destructible?256:0),e.finishNode(i?{type:"AssignmentPattern",left:s,right:l}:{type:"AssignmentExpression",left:s,operator:"=",right:l},a)}function ct(e,t,r,n,o,i,a,s,c,l){const{tokenStart:u}=e;ee(e,32|t);let p=null,d=0;const{tokenValue:g,tokenStart:f}=e;let h=e.getToken();if(143360&h)e.assignable=1,p=Je(e,t,n,i,0,1,c,1,f),h=e.getToken(),p=Fe(e,t,n,p,c,0,f),18!==e.getToken()&&e.getToken()!==o&&(2&e.assignable&&1077936155===e.getToken()&&e.report(71),d|=16,p=Re(e,t,n,c,l,f,p)),2&e.assignable?d|=16:h===o||18===h?r?.addVarOrBlock(t,g,i,a):d|=32,d|=128&e.destructible?128:0;else if(h===o)e.report(41);else{if(!(2097152&h)){d|=32,p=je(e,t,n,1,c,1);const{tokenStart:r}=e,i=e.getToken();return 1077936155===i?(2&e.assignable&&e.report(26),p=Re(e,t,n,c,l,r,p),d|=16):(18===i?d|=16:i!==o&&(p=Re(e,t,n,c,l,r,p)),d|=1&e.assignable?32:16),e.destructible=d,e.getToken()!==o&&18!==e.getToken()&&e.report(161),e.finishNode({type:l?"RestElement":"SpreadElement",argument:p},u)}p=2162700===e.getToken()?ut(e,t,r,n,1,c,l,i,a):at(e,t,r,n,1,c,l,i,a),h=e.getToken(),1077936155!==h&&h!==o&&18!==h?(8&e.destructible&&e.report(71),p=Fe(e,t,n,p,c,0,f),d|=2&e.assignable?16:0,4194304&~e.getToken()?(8388608&~e.getToken()||(p=Oe(e,t,n,1,f,4,h,p)),U(e,32|t,22)&&(p=Ue(e,t,n,p,f)),d|=2&e.assignable?16:32):(1077936155!==e.getToken()&&(d|=16),p=Re(e,t,n,c,l,f,p))):d|=1074790415===o&&1077936155!==h?16:e.destructible}if(e.getToken()!==o)if(1&i&&(d|=s?16:32),U(e,32|t,1077936155)){16&d&&e.report(26),M(e,p);const r=De(e,t,n,1,c,e.tokenStart);p=e.finishNode(l?{type:"AssignmentPattern",left:p,right:r}:{type:"AssignmentExpression",left:p,operator:"=",right:r},f),d=16}else d|=16;return e.destructible=d,e.finishNode({type:l?"RestElement":"SpreadElement",argument:p},u)}function lt(e,t,r,n,o,i){const a=11264|(64&n?0:16896);t=98560|((t|a)^a|(8&n?1024:0)|(16&n?2048:0)|(64&n?16384:0));let s=e.createScopeIfLexical(256);const c=function(e,t,r,n,o,i,a){O(e,t,67174411);const s=[];if(e.flags=128^(128|e.flags),16===e.getToken())return 512&o&&e.report(37,"Setter","one",""),ee(e,t),s;256&o&&e.report(37,"Getter","no","s");512&o&&14===e.getToken()&&e.report(38);t=131072^(131072|t);let c=0,l=0;for(;18!==e.getToken();){let u=null;const{tokenStart:p}=e;if(143360&e.getToken()?(1&t||(36864&~e.getToken()||(e.flags|=256),537079808&~e.getToken()||(e.flags|=512)),u=Nt(e,t,r,1|o,0)):(2162700===e.getToken()?u=ut(e,t,r,n,1,a,1,i,0):69271571===e.getToken()?u=at(e,t,r,n,1,a,1,i,0):14===e.getToken()&&(u=ct(e,t,r,n,16,i,0,0,a,1)),l=1,48&e.destructible&&e.report(50)),1077936155===e.getToken()){ee(e,32|t),l=1;const r=De(e,t,n,1,0,e.tokenStart);u=e.finishNode({type:"AssignmentPattern",left:u,right:r},p)}if(c++,s.push(u),!U(e,t,18))break;if(16===e.getToken())break}512&o&&1!==c&&e.report(37,"Setter","one","");r?.reportScopeError(),l&&(e.flags|=128);return O(e,t,16),s}(e,-524289&t|8192,s,r,n,1,o);s=s?.createChildScope(64);const l=Me(e,36864|-655373&t,s,r,0,void 0,s?.parent);return e.finishNode({type:"FunctionExpression",params:c,body:l,async:(16&n)>0,generator:(8&n)>0,id:null},i)}function ut(e,t,r,n,o,i,a,s,c){const{tokenStart:l}=e;ee(e,t);const u=[];let p=0,d=0;for(t=131072^(131072|t);1074790415!==e.getToken();){const{tokenValue:o,tokenStart:l}=e,g=e.getToken();if(14===g)u.push(ct(e,t,r,n,1074790415,s,c,0,i,a));else{let f,h=0,k=null;if(143360&e.getToken()||-2147483528===e.getToken()||-2147483527===e.getToken())if(-2147483527===e.getToken()&&(p|=16),k=rt(e,t),18===e.getToken()||1074790415===e.getToken()||1077936155===e.getToken())if(h|=4,1&t&&!(537079808&~g)?p|=16:j(e,t,s,g,0),r?.addVarOrBlock(t,o,s,c),U(e,32|t,1077936155)){p|=8;const r=De(e,t,n,1,i,e.tokenStart);p|=256&e.destructible?256:128&e.destructible?128:0,f=e.finishNode({type:"AssignmentPattern",left:e.options.uniqueKeyInPattern?Object.assign({},k):k,right:r},l)}else p|=(209006===g?128:0)|(-2147483528===g?16:0),f=e.options.uniqueKeyInPattern?Object.assign({},k):k;else if(U(e,32|t,21)){const{tokenStart:l}=e;if("__proto__"===o&&d++,143360&e.getToken()){const o=e.getToken(),u=e.tokenValue;f=Je(e,t,n,s,0,1,i,1,l);const d=e.getToken();f=Fe(e,t,n,f,i,0,l),18===e.getToken()||1074790415===e.getToken()?1077936155===d||1074790415===d||18===d?(p|=128&e.destructible?128:0,2&e.assignable?p|=16:143360&~o||r?.addVarOrBlock(t,u,s,c)):p|=1&e.assignable?32:16:4194304&~e.getToken()?(p|=16,8388608&~e.getToken()||(f=Oe(e,t,n,1,l,4,d,f)),U(e,32|t,22)&&(f=Ue(e,t,n,f,l))):(2&e.assignable?p|=16:1077936155!==d?p|=32:r?.addVarOrBlock(t,u,s,c),f=Re(e,t,n,i,a,l,f))}else 2097152&~e.getToken()?(f=je(e,t,n,1,i,1),p|=1&e.assignable?32:16,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):(f=Fe(e,t,n,f,i,0,l),p=2&e.assignable?16:0,18!==e.getToken()&&1074790415!==g&&(1077936155!==e.getToken()&&(p|=16),f=Re(e,t,n,i,a,l,f)))):(f=69271571===e.getToken()?at(e,t,r,n,0,i,a,s,c):ut(e,t,r,n,0,i,a,s,c),p=e.destructible,e.assignable=16&p?2:1,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):8&e.destructible?e.report(71):(f=Fe(e,t,n,f,i,0,l),p=2&e.assignable?16:0,4194304&~e.getToken()?(8388608&~e.getToken()||(f=Oe(e,t,n,1,l,4,g,f)),U(e,32|t,22)&&(f=Ue(e,t,n,f,l)),p|=2&e.assignable?16:32):f=Be(e,t,n,i,a,l,f)))}else 69271571===e.getToken()?(p|=16,209005===g&&(h|=16),h|=2|(209008===g?256:209009===g?512:1),k=pt(e,t,n,i),p|=e.assignable,f=lt(e,t,n,h,i,e.tokenStart)):143360&e.getToken()?(p|=16,-2147483528===g&&e.report(95),209005===g?(1&e.flags&&e.report(132),h|=17):209008===g?h|=256:209009===g?h|=512:e.report(0),k=rt(e,t),f=lt(e,t,n,h,i,e.tokenStart)):67174411===e.getToken()?(p|=16,h|=1,f=lt(e,t,n,h,i,e.tokenStart)):8391476===e.getToken()?(p|=16,209008===g?e.report(42):209009===g?e.report(43):209005!==g&&e.report(30,D[52]),ee(e,t),h|=9|(209005===g?16:0),143360&e.getToken()?k=rt(e,t):134217728&~e.getToken()?69271571===e.getToken()?(h|=2,k=pt(e,t,n,i),p|=e.assignable):e.report(30,D[255&e.getToken()]):k=nt(e,t),f=lt(e,t,n,h,i,e.tokenStart)):134217728&~e.getToken()?e.report(133):(209005===g&&(h|=16),h|=209008===g?256:209009===g?512:1,p|=16,k=nt(e,t),f=lt(e,t,n,h,i,e.tokenStart));else if(134217728&~e.getToken())if(69271571===e.getToken())if(k=pt(e,t,n,i),p|=256&e.destructible?256:0,h|=2,21===e.getToken()){ee(e,32|t);const{tokenStart:o,tokenValue:l}=e,u=e.getToken();if(143360&e.getToken()){f=Je(e,t,n,s,0,1,i,1,o);const d=e.getToken();f=Fe(e,t,n,f,i,0,o),4194304&~e.getToken()?18===e.getToken()||1074790415===e.getToken()?1077936155===d||1074790415===d||18===d?2&e.assignable?p|=16:143360&~u||r?.addVarOrBlock(t,l,s,c):p|=1&e.assignable?32:16:(p|=16,f=Re(e,t,n,i,a,o,f)):(p|=2&e.assignable?16:1077936155===d?0:32,f=Be(e,t,n,i,a,o,f))}else 2097152&~e.getToken()?(f=je(e,t,n,1,0,1),p|=1&e.assignable?32:16,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):(f=Fe(e,t,n,f,i,0,o),p=1&e.assignable?0:16,18!==e.getToken()&&1074790415!==e.getToken()&&(1077936155!==e.getToken()&&(p|=16),f=Re(e,t,n,i,a,o,f)))):(f=69271571===e.getToken()?at(e,t,r,n,0,i,a,s,c):ut(e,t,r,n,0,i,a,s,c),p=e.destructible,e.assignable=16&p?2:1,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):8&p?e.report(62):(f=Fe(e,t,n,f,i,0,o),p=2&e.assignable?16|p:0,4194304&~e.getToken()?(8388608&~e.getToken()||(f=Oe(e,t,n,1,o,4,g,f)),U(e,32|t,22)&&(f=Ue(e,t,n,f,o)),p|=2&e.assignable?16:32):(1077936155!==e.getToken()&&(p|=16),f=Be(e,t,n,i,a,o,f))))}else 67174411===e.getToken()?(h|=1,f=lt(e,t,n,h,i,e.tokenStart),p=16):e.report(44);else if(8391476===g)if(O(e,32|t,8391476),h|=8,143360&e.getToken()){const r=e.getToken();if(k=rt(e,t),h|=1,67174411!==e.getToken())throw new L(e.tokenStart,e.currentLocation,209005===r?46:209008===r||209009===e.getToken()?45:47,D[255&r]);p|=16,f=lt(e,t,n,h,i,e.tokenStart)}else 134217728&~e.getToken()?69271571===e.getToken()?(p|=16,h|=3,k=pt(e,t,n,i),f=lt(e,t,n,h,i,e.tokenStart)):e.report(126):(p|=16,k=nt(e,t),h|=1,f=lt(e,t,n,h,i,e.tokenStart));else e.report(30,D[255&g]);else if(k=nt(e,t),21===e.getToken()){O(e,32|t,21);const{tokenStart:l}=e;if("__proto__"===o&&d++,143360&e.getToken()){f=Je(e,t,n,s,0,1,i,1,l);const{tokenValue:o}=e,u=e.getToken();f=Fe(e,t,n,f,i,0,l),18===e.getToken()||1074790415===e.getToken()?1077936155===u||1074790415===u||18===u?2&e.assignable?p|=16:r?.addVarOrBlock(t,o,s,c):p|=1&e.assignable?32:16:1077936155===e.getToken()?(2&e.assignable&&(p|=16),f=Re(e,t,n,i,a,l,f)):(p|=16,f=Re(e,t,n,i,a,l,f))}else 2097152&~e.getToken()?(f=je(e,t,n,1,0,1),p|=1&e.assignable?32:16,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):(f=Fe(e,t,n,f,i,0,l),p=1&e.assignable?0:16,18!==e.getToken()&&1074790415!==e.getToken()&&(1077936155!==e.getToken()&&(p|=16),f=Re(e,t,n,i,a,l,f)))):(f=69271571===e.getToken()?at(e,t,r,n,0,i,a,s,c):ut(e,t,r,n,0,i,a,s,c),p=e.destructible,e.assignable=16&p?2:1,18===e.getToken()||1074790415===e.getToken()?2&e.assignable&&(p|=16):8&~e.destructible&&(f=Fe(e,t,n,f,i,0,l),p=2&e.assignable?16:0,4194304&~e.getToken()?(8388608&~e.getToken()||(f=Oe(e,t,n,1,l,4,g,f)),U(e,32|t,22)&&(f=Ue(e,t,n,f,l)),p|=2&e.assignable?16:32):f=Be(e,t,n,i,a,l,f)))}else 67174411===e.getToken()?(h|=1,f=lt(e,t,n,h,i,e.tokenStart),p=16|e.assignable):e.report(134);p|=128&e.destructible?128:0,e.destructible=p,u.push(e.finishNode({type:"Property",key:k,value:f,kind:768&h?512&h?"set":"get":"init",computed:(2&h)>0,method:(1&h)>0,shorthand:(4&h)>0},l))}if(p|=e.destructible,18!==e.getToken())break;ee(e,t)}O(e,t,1074790415),d>1&&(p|=64);const g=e.finishNode({type:a?"ObjectPattern":"ObjectExpression",properties:u},l);return!o&&4194304&e.getToken()?st(e,t,n,p,i,a,l,g):(e.destructible=p,g)}function pt(e,t,r,n){ee(e,32|t);const o=De(e,131072^(131072|t),r,1,n,e.tokenStart);return O(e,t,20),o}function dt(e,t,r){const{tokenStart:n}=e,{tokenValue:o}=e;let i=0,a=0;537079808&~e.getToken()?36864&~e.getToken()||(a=1):i=1;const s=rt(e,t);if(e.assignable=1,10===e.getToken()){const c=e.options.lexical?le(e,t,o):void 0;return i&&(e.flags|=128),a&&(e.flags|=256),ht(e,t,c,r,[s],0,n)}return s}function gt(e,t,r,n,o,i,a,s,c){a||e.report(57),i&&e.report(51),e.flags&=-129;return ht(e,t,e.options.lexical?le(e,t,n):void 0,r,[o],s,c)}function ft(e,t,r,n,o,i,a,s){i||e.report(57);for(let t=0;t0&&"constructor"===e.tokenValue&&e.report(109),1074790415===e.getToken()&&e.report(108),U(e,t,1074790417)?a.length>0&&e.report(120):d.push(vt(e,t,n,l,r,i,a,0,s,a.length>0?o:e.tokenStart))}return O(e,8&a?32|t:t,1074790415),l?.validatePrivateIdentifierRefs(),e.flags=-33&e.flags|p,e.finishNode({type:"ClassBody",body:d},c)}function vt(e,t,r,n,o,i,a,s,c,l){let u=s?32:0,p=null;const d=e.getToken();if(176128&d||-2147483528===d)switch(p=rt(e,t),d){case 36970:if(!s&&67174411!==e.getToken()&&1048576&~e.getToken()&&1077936155!==e.getToken())return vt(e,t,r,n,o,i,a,1,c,l);break;case 209005:if(67174411!==e.getToken()&&!(1&e.flags)){if(!(1073741824&~e.getToken()))return Et(e,t,n,p,u,a,l);u|=16|(B(e,t,8391476)?8:0)}break;case 209008:if(67174411!==e.getToken()){if(!(1073741824&~e.getToken()))return Et(e,t,n,p,u,a,l);u|=256}break;case 209009:if(67174411!==e.getToken()){if(!(1073741824&~e.getToken()))return Et(e,t,n,p,u,a,l);u|=512}break;case 12402:if(67174411!==e.getToken()&&!(1&e.flags)){if(!(1073741824&~e.getToken()))return Et(e,t,n,p,u,a,l);e.options.next&&(u|=1024)}}else if(69271571===d)u|=2,p=pt(e,o,n,c);else if(134217728&~d)if(8391476===d)u|=8,ee(e,t);else if(130===e.getToken())u|=8192,p=Ct(e,16|t,n,768);else if(1073741824&~e.getToken()){if(s&&2162700===d)return function(e,t,r,n,o){return r=r?.createChildScope(),ke(e,t=592128|5764^(5764|t),r,n,{},o,"StaticBlock")}(e,16|t,r,n,l);-2147483527===d?(p=rt(e,t),67174411!==e.getToken()&&e.report(30,D[255&e.getToken()])):e.report(30,D[255&e.getToken()])}else u|=128;else p=nt(e,t);if(1816&u&&(143360&e.getToken()||-2147483528===e.getToken()||-2147483527===e.getToken()?p=rt(e,t):134217728&~e.getToken()?69271571===e.getToken()?(u|=2,p=pt(e,t,n,0)):130===e.getToken()?(u|=8192,p=Ct(e,t,n,u)):e.report(135):p=nt(e,t)),2&u||("constructor"===e.tokenValue?(1073741824&~e.getToken()?32&u||67174411!==e.getToken()||(920&u?e.report(53,"accessor"):512&t||(32&e.flags?e.report(54):e.flags|=32)):e.report(129),u|=64):!(8192&u)&&32&u&&"prototype"===e.tokenValue&&e.report(52)),1024&u||67174411!==e.getToken()&&!(768&u))return Et(e,t,n,p,u,a,l);const g=lt(e,16|t,n,u,c,e.tokenStart);return e.finishNode({type:"MethodDefinition",kind:!(32&u)&&64&u?"constructor":256&u?"get":512&u?"set":"method",static:(32&u)>0,computed:(2&u)>0,key:p,value:g,...e.options.next?{decorators:a}:null},l)}function Ct(e,t,r,n){const{tokenStart:o}=e;ee(e,t);const{tokenValue:i}=e;return"constructor"===i&&e.report(128),e.options.lexical&&(r||e.report(4,i),n?r.addPrivateIdentifier(i,n):r.addPrivateIdentifierRef(i)),ee(e,t),e.finishNode({type:"PrivateIdentifier",name:i},o)}function Et(e,t,r,n,o,i,a){let s=null;if(8&o&&e.report(0),1077936155===e.getToken()){ee(e,32|t);const{tokenStart:n}=e;537079927===e.getToken()&&e.report(119);const i=11264|(64&o?0:16896);s=Je(e,16|(t=65792|((t|i)^i|(8&o?1024:0)|(16&o?2048:0)|(64&o?16384:0))),r,2,0,1,0,1,n),!(1073741824&~e.getToken())&&4194304&~e.getToken()||(s=Fe(e,16|t,r,s,0,0,n),s=Re(e,16|t,r,0,0,n,s))}return P(e,t),e.finishNode({type:1024&o?"AccessorProperty":"PropertyDefinition",key:n,value:s,static:(32&o)>0,computed:(2&o)>0,...e.options.next?{decorators:i}:null},a)}function qt(e,t,r,n,o,i){if(143360&e.getToken()||!(1&t)&&-2147483527===e.getToken())return Nt(e,t,r,o,i);2097152&~e.getToken()&&e.report(30,D[255&e.getToken()]);const a=69271571===e.getToken()?at(e,t,r,n,1,0,1,o,i):ut(e,t,r,n,1,0,1,o,i);return 16&e.destructible&&e.report(50),32&e.destructible&&e.report(50),a}function Nt(e,t,r,n,o){const i=e.getToken();1&t&&(537079808&~i?36864&~i&&-2147483527!==i||e.report(118):e.report(119)),20480&~i||e.report(102),241771===i&&(1024&t&&e.report(32),2&t&&e.report(111)),73==(255&i)&&24&n&&e.report(100),209006===i&&(2048&t&&e.report(176),2&t&&e.report(110));const{tokenValue:a,tokenStart:s}=e;return ee(e,t),r?.addVarOrBlock(t,a,n,o),e.finishNode({type:"Identifier",name:a},s)}function Lt(e,t,r,n,o){if(n||O(e,t,8456256),8390721===e.getToken()){const i=function(e,t){return ae(e),e.finishNode({type:"JSXOpeningFragment"},t)}(e,o),[a,s]=function(e,t,r,n){const o=[];for(;;){const i=It(e,t,r,n);if("JSXClosingFragment"===i.type)return[o,i];o.push(i)}}(e,t,r,n);return e.finishNode({type:"JSXFragment",openingFragment:i,children:a,closingFragment:s},o)}8457014===e.getToken()&&e.report(30,D[255&e.getToken()]);let i=null,a=[];const s=function(e,t,r,n,o){143360&~e.getToken()&&4096&~e.getToken()&&e.report(0);const i=Vt(e,t),a=function(e,t,r){const n=[];for(;8457014!==e.getToken()&&8390721!==e.getToken()&&1048576!==e.getToken();)n.push(Rt(e,t,r));return n}(e,t,r),s=8457014===e.getToken();s&&O(e,t,8457014);8390721!==e.getToken()&&e.report(25,D[65]);n||!s?ae(e):ee(e,t);return e.finishNode({type:"JSXOpeningElement",name:i,attributes:a,selfClosing:s},o)}(e,t,r,n,o);if(!s.selfClosing){[a,i]=function(e,t,r,n){const o=[];for(;;){const i=At(e,t,r,n);if("JSXClosingElement"===i.type)return[o,i];o.push(i)}}(e,t,r,n);const o=z(i.name);z(s.name)!==o&&e.report(155,o)}return e.finishNode({type:"JSXElement",children:a,openingElement:s,closingElement:i},o)}function At(e,t,r,n){if(137===e.getToken())return Dt(e,t);if(2162700===e.getToken())return Ut(e,t,r,1,0);if(8456256===e.getToken()){const{tokenStart:o}=e;return ee(e,t),8457014===e.getToken()?function(e,t,r,n){O(e,t,8457014);const o=Vt(e,t);return 8390721!==e.getToken()&&e.report(25,D[65]),r?ae(e):ee(e,t),e.finishNode({type:"JSXClosingElement",name:o},n)}(e,t,n,o):Lt(e,t,r,1,o)}e.report(0)}function It(e,t,r,n){if(137===e.getToken())return Dt(e,t);if(2162700===e.getToken())return Ut(e,t,r,1,0);if(8456256===e.getToken()){const{tokenStart:o}=e;return ee(e,t),8457014===e.getToken()?function(e,t,r,n){return O(e,t,8457014),8390721!==e.getToken()&&e.report(25,D[65]),r?ae(e):ee(e,t),e.finishNode({type:"JSXClosingFragment"},n)}(e,t,n,o):Lt(e,t,r,1,o)}e.report(0)}function Dt(e,t){const r=e.tokenStart;ee(e,t);const n={type:"JSXText",value:e.tokenValue};return e.options.raw&&(n.raw=e.tokenRaw),e.finishNode(n,r)}function Vt(e,t){const{tokenStart:r}=e;se(e);let n=Ot(e,t);if(21===e.getToken())return Bt(e,t,n,r);for(;U(e,t,67108877);)se(e),n=Pt(e,t,n,r);return n}function Pt(e,t,r,n){const o=Ot(e,t);return e.finishNode({type:"JSXMemberExpression",object:r,property:o},n)}function Rt(e,t,r){const{tokenStart:n}=e;if(2162700===e.getToken())return function(e,t,r){const n=e.tokenStart;ee(e,t),O(e,t,14);const o=De(e,t,r,1,0,e.tokenStart);return O(e,t,1074790415),e.finishNode({type:"JSXSpreadAttribute",argument:o},n)}(e,t,r);se(e);let o=null,i=Ot(e,t);if(21===e.getToken()&&(i=Bt(e,t,i,n)),1077936155===e.getToken()){switch(ie(e,t)){case 134283267:o=nt(e,t);break;case 8456256:o=Lt(e,t,r,0,e.tokenStart);break;case 2162700:o=Ut(e,t,r,0,1);break;default:e.report(154)}}return e.finishNode({type:"JSXAttribute",value:o,name:i},n)}function Bt(e,t,r,n){O(e,t,21);const o=Ot(e,t);return e.finishNode({type:"JSXNamespacedName",namespace:r,name:o},n)}function Ut(e,t,r,n,o){const{tokenStart:i}=e;ee(e,32|t);const{tokenStart:a}=e;if(14===e.getToken())return function(e,t,r,n){O(e,t,14);const o=De(e,t,r,1,0,e.tokenStart);return O(e,t,1074790415),e.finishNode({type:"JSXSpreadChild",expression:o},n)}(e,t,r,i);let s=null;return 1074790415===e.getToken()?(o&&e.report(157),s=function(e,t){return e.finishNode({type:"JSXEmptyExpression"},t,e.tokenStart)}(e,{index:e.startIndex,line:e.startLine,column:e.startColumn})):s=De(e,t,r,1,0,a),1074790415!==e.getToken()&&e.report(25,D[15]),n?ae(e):ee(e,t),e.finishNode({type:"JSXExpressionContainer",expression:s},i)}function Ot(e,t){const r=e.tokenStart;143360&e.getToken()||e.report(30,D[255&e.getToken()]);const{tokenValue:n}=e;return ee(e,t),e.finishNode({type:"JSXIdentifier",name:n},r)}const{stringify:Mt}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const jt={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Ft=17,Gt={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Ft,ClassExpression:Ft,FunctionExpression:Ft,ObjectExpression:Ft,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Jt(e,t){const{generator:r}=e;if(e.write("("),null!=t&&t.length>0){r[t[0].type](t[0],e);const{length:n}=t;for(let o=1;o0){e.write(n);for(let t=1;t0){r.VariableDeclarator(n[0],e);for(let t=1;t0){t.write(n),o&&null!=e.comments&&$t(t,e.comments,i,n);const{length:s}=a;for(let e=0;e0){for(;i0&&t.write(", ");const e=r[i],n=e.type[6];if("D"===n)t.write(e.local.name,e),i++;else{if("N"!==n)break;t.write("* as "+e.local.name,e),i++}}if(i0){t.write(" with { ");for(let e=0;e0)for(let e=0;;){const o=r[e],{name:i}=o.local;if(t.write(i,o),i!==o.exported.name&&t.write(" as "+o.exported.name),!(++e0){t.write(" with { ");for(let r=0;r0){t.write(" with { ");for(let r=0;r "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:Zt=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:Zt,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),Ht(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:r,expressions:n}=e;t.write("`");const{length:o}=n;for(let e=0;e0){const{elements:r}=e,{length:n}=r;for(let e=0;;){const o=r[e];if(null!=o&&this[o.type](o,t),!(++e0){t.write(n),o&&null!=e.comments&&$t(t,e.comments,i,n);const a=","+n,{properties:s}=e,{length:c}=s;for(let e=0;;){const r=s[e];if(o&&null!=r.comments&&$t(t,r.comments,i,n),t.write(i),this[r.type](r,t),!(++e0){const{properties:r}=e,{length:n}=r;for(let e=0;this[r[e].type](r[e],t),++e1)&&("U"!==o[0]||"n"!==o[1]&&"p"!==o[1]||!n.prefix||n.operator[0]!==r||"+"!==r&&"-"!==r)||t.write(" "),i?(t.write(r.length>1?" (":"("),this[o](n,t),t.write(")")):this[o](n,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:Kt=function(e,t){const r="in"===e.operator;r&&t.write("("),Ht(t,e.left,e,!1),t.write(" "+e.operator+" "),Ht(t,e.right,e,!0),r&&t.write(")")},LogicalExpression:Kt,ConditionalExpression(e,t){const{test:r}=e,n=t.expressionsPrecedence[r.type];n===Ft||n<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[r.type](r,t),t.write(")")):this[r.type](r,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const r=t.expressionsPrecedence[e.callee.type];r===Ft||r0&&(this.lineEndSize>0&&(1===n.length?e[r-1]===n:e.endsWith(n))?(this.line+=this.lineEndSize,this.column=0):this.column+=r)}toString(){return this.output}}const or={parse:function(e,t){return de(e,t)}},ir={generate:function(e,t){const r=new nr(t);return r.generator[e.type](e,r),r.output}};return e.astring=ir,e.meriyah=or,e}({}); \ No newline at end of file diff --git a/app/core/config.py b/app/core/config.py index 43102938..39d197ea 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -140,23 +140,47 @@ def _stored_jobs_dir() -> Path | None: _JS_RUNTIME_BINARIES = (("deno", "deno"), ("node", "node"), ("quickjs", "qjs")) +def _js_runtime_dirs() -> tuple[Path, ...]: + """Where a bundled JS runtime can live, in priority order. + + Two layouts, because the packages are not built the same way. Windows and + Linux stage a whole tree and put the binary in `data/jsruntime`, which is + JS_RUNTIME_DIR's default. macOS downloads a runtime pack and keeps its own + data directory in ~/Library/Application Support, so the binary rides in the + pack next to `backend/` instead. + + Checking both here rather than setting an env var from the desktop shell + keeps this a Python-side fact that can be tested, instead of a contract + split across two languages that only breaks on one platform. + """ + dirs = [JS_RUNTIME_DIR] + # app/core/config.py -> app/core -> app -> backend/ (or the repo root). + backend_root = Path(__file__).resolve().parents[2] + dirs.append(backend_root / "jsruntime") + dirs.append(backend_root.parent / "jsruntime") + seen: set[Path] = set() + return tuple(d for d in dirs if not (d in seen or seen.add(d))) # type: ignore[func-returns-value] + + def bundled_js_runtime() -> tuple[str, Path] | None: """The JS runtime shipped with this install, as (yt-dlp name, path). - None when nothing is bundled, which is the normal case outside a portable - build -- yt-dlp then falls back to its own PATH lookup. Never raises: a - missing or unreadable directory just means "not bundled". + None when nothing is bundled, which is the normal case outside a packaged + build -- yt-dlp then falls back to its own PATH lookup, which is how Docker + finds the deno it ships. Never raises: a missing or unreadable directory + just means "not bundled". """ - try: - if not JS_RUNTIME_DIR.is_dir(): - return None - suffix = ".exe" if sys.platform.startswith("win") else "" - for name, stem in _JS_RUNTIME_BINARIES: - exe = JS_RUNTIME_DIR / f"{stem}{suffix}" - if exe.is_file(): - return name, exe - except OSError: - return None + suffix = ".exe" if sys.platform.startswith("win") else "" + for directory in _js_runtime_dirs(): + try: + if not directory.is_dir(): + continue + for name, stem in _JS_RUNTIME_BINARIES: + exe = directory / f"{stem}{suffix}" + if exe.is_file(): + return name, exe + except OSError: + continue return None diff --git a/pyproject.toml b/pyproject.toml index 5b822eed..30b8ee1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,7 +115,10 @@ packages = ["app"] target-version = "py310" line-length = 100 # app/_version.py is generated by hatch-vcs at build/sync time — don't lint it. -exclude = ["jobs", ".run", "static/vendor", "app/_version.py"] +# app/_vendor is a third-party payload copied verbatim from PyPI. Linting or +# reformatting it would create a diff against upstream that the refresh script +# would then fight every time it runs. +exclude = ["jobs", ".run", "static/vendor", "app/_version.py", "app/_vendor"] [tool.ruff.lint] select = ["E", "F", "W", "I", "UP", "B", "SIM"] diff --git a/scripts/linux/make-portable.sh b/scripts/linux/make-portable.sh index 550db226..1e4d254d 100755 --- a/scripts/linux/make-portable.sh +++ b/scripts/linux/make-portable.sh @@ -80,6 +80,36 @@ echo "==> Cleaning stage" rm -rf "$STAGE" "$ARCHIVE_PATH" "$CHECKSUM_PATH" mkdir -p "$STAGE" "$BACKEND_DIR" "$PYTHON_DIR" +# QuickJS, for YouTube's signature/n-challenge solver (#438). yt-dlp ships the +# solver script (the yt-dlp-ejs dependency) but needs a JavaScript engine to +# run it, and a portable install has nothing on PATH. +# +# quickjs-ng rather than deno: 2.6 MB against deno's ~110 MB, times two +# bundles, against a 2 GiB release asset cap this project has already hit once +# (#222, #225). +# +# It lives in backend/, not data/. The in-app updater replaces the executable +# and backend/ and leaves data/ alone, so a binary in data/ would only ever +# reach a fresh install. Here it arrives through an ordinary update, which is +# the whole point: shipping this must not cost existing users a reinstall. +# +# Pinned by version and SHA256, the same rule as the macOS FFmpeg download +# (#172). An unverified binary fetched at package time is a supply-chain hole +# whether or not it is small. +QJS_VERSION="v0.16.2" +QJS_SHA256="c5e1b16adfa36def7ac523d6ba54edc77ef66a4dfd65d73e6eae19025f9b7b0a" +QJS_URL="https://github.com/quickjs-ng/quickjs/releases/download/${QJS_VERSION}/qjs-linux-x86_64" +QJS_DIR="${BACKEND_DIR}/jsruntime" +mkdir -p "$QJS_DIR" +echo "==> Fetching QuickJS ${QJS_VERSION}" +curl -fsSL --retry 3 -o "${QJS_DIR}/qjs" "$QJS_URL" +echo "${QJS_SHA256} ${QJS_DIR}/qjs" | sha256sum -c - >/dev/null || { + rm -f "${QJS_DIR}/qjs" + echo "QuickJS checksum mismatch" >&2 + exit 1 +} +chmod +x "${QJS_DIR}/qjs" + # Copy the entire PBS install into python/ (-a preserves symlinks/permissions). echo "==> Bundling Python runtime from ${PBS_BASE_PREFIX}" cp -a "$PBS_BASE_PREFIX/." "$PYTHON_DIR/" diff --git a/scripts/macos/make-runtime-pack.sh b/scripts/macos/make-runtime-pack.sh index 009f304f..b9967bf2 100755 --- a/scripts/macos/make-runtime-pack.sh +++ b/scripts/macos/make-runtime-pack.sh @@ -166,6 +166,35 @@ cat > "$BACKEND_DIR/static/version.json" <&2; exit 1 ;; +esac +QJS_DIR="${BACKEND_DIR}/jsruntime" +mkdir -p "$QJS_DIR" +echo "==> Fetching QuickJS ${QJS_VERSION} (${QJS_ASSET})" +curl -fsSL --retry 3 -o "${QJS_DIR}/qjs" "https://github.com/quickjs-ng/quickjs/releases/download/${QJS_VERSION}/${QJS_ASSET}" +echo "${QJS_SHA256} ${QJS_DIR}/qjs" | shasum -a 256 -c - >/dev/null || { + rm -f "${QJS_DIR}/qjs" + echo "QuickJS checksum mismatch" >&2 + exit 1 +} +chmod +x "${QJS_DIR}/qjs" + echo "==> Capturing dependency inventory" mkdir -p "$RUNTIME_DIR/licenses" uv pip list --system --python "$PYTHON_DIR/bin/python" --format=json > "$RUNTIME_DIR/licenses/pip-list.json" diff --git a/scripts/update_vendored_ejs.py b/scripts/update_vendored_ejs.py new file mode 100644 index 00000000..0370bbf4 --- /dev/null +++ b/scripts/update_vendored_ejs.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +"""Refresh the vendored yt-dlp-ejs payload in app/_vendor. + +Vendoring normally means remembering to update something, which is a bad trade. +This exists so it does not: run with no arguments to check whether PyPI has a +newer release, and with --apply to take it. + + python scripts/update_vendored_ejs.py # check only, exit 1 if stale + python scripts/update_vendored_ejs.py --apply # fetch and replace + +Why the package is vendored at all rather than declared as a dependency: the +desktop updater derives runtimeId from sha256(uv.lock) and stands down when it +changes, because it can replace backend/ but never python/. Adding a dependency +would have sent every existing desktop install to a manual reinstall. This is a +53 KB pure-Python payload that StemDeck never imports and yt-dlp discovers at +runtime, so it belongs in the app layer the updater does replace. +""" + +from __future__ import annotations + +import argparse +import hashlib +import io +import json +import re +import shutil +import sys +import urllib.request +import zipfile +from pathlib import Path + +PACKAGE = "yt-dlp-ejs" +VENDOR = Path(__file__).resolve().parents[1] / "app" / "_vendor" +PKG_DIR = VENDOR / "yt_dlp_ejs" +LICENSE_DEST = VENDOR / "LICENSE.yt-dlp-ejs" + + +def installed_version() -> str | None: + version_file = PKG_DIR / "_version.py" + if not version_file.is_file(): + return None + # setuptools-scm's _version.py lists "__version__" in __all__ before it + # assigns it, so match the assignment specifically rather than the name. + match = re.search( + r"""^__version__(?:\s*:\s*str)?\s*=.*?["']([^"']+)["']""", + version_file.read_text(encoding="utf-8"), + re.M, + ) + return match.group(1) if match else None + + +def latest_release() -> tuple[str, str, str]: + """(version, wheel url, sha256) for the newest release on PyPI.""" + with urllib.request.urlopen(f"https://pypi.org/pypi/{PACKAGE}/json", timeout=30) as fh: + data = json.load(fh) + version = data["info"]["version"] + for entry in data["urls"]: + if entry["filename"].endswith(".whl"): + return version, entry["url"], entry["digests"]["sha256"] + raise SystemExit(f"{PACKAGE} {version} publishes no wheel") + + +def apply(url: str, sha256: str) -> None: + with urllib.request.urlopen(url, timeout=60) as fh: + blob = fh.read() + got = hashlib.sha256(blob).hexdigest() + if got != sha256: + raise SystemExit(f"checksum mismatch: expected {sha256}, got {got}") + + archive = zipfile.ZipFile(io.BytesIO(blob)) + if PKG_DIR.exists(): + shutil.rmtree(PKG_DIR) + VENDOR.mkdir(parents=True, exist_ok=True) + + for name in archive.namelist(): + if name.startswith("yt_dlp_ejs/") and not name.endswith("/"): + dest = VENDOR / name + dest.parent.mkdir(parents=True, exist_ok=True) + dest.write_bytes(archive.read(name)) + elif name.lower().endswith("licenses/license"): + LICENSE_DEST.write_bytes(archive.read(name)) + + # Bytecode from whoever ran this has no business in the repo or the package. + for cache in PKG_DIR.rglob("__pycache__"): + shutil.rmtree(cache, ignore_errors=True) + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--apply", action="store_true", help="fetch and replace the payload") + args = parser.parse_args() + + have = installed_version() + version, url, sha256 = latest_release() + + if have == version: + print(f"{PACKAGE} {version} vendored, up to date") + return 0 + + if not args.apply: + print(f"{PACKAGE}: vendored {have or '(none)'}, latest {version}") + print("run with --apply to update") + return 1 + + apply(url, sha256) + print(f"{PACKAGE}: {have or '(none)'} -> {version}") + print(f" sha256 {sha256}") + print(" review the diff and commit app/_vendor") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/windows/make-portable.ps1 b/scripts/windows/make-portable.ps1 index 4a071035..4288810c 100644 --- a/scripts/windows/make-portable.ps1 +++ b/scripts/windows/make-portable.ps1 @@ -168,6 +168,36 @@ New-Item -ItemType Directory -Force (Join-Path $Stage "data") | Out-Null foreach ($Dir in @("cache", "downloads", "ffmpeg", "jobs", "logs", "models")) { New-Item -ItemType Directory -Force (Join-Path $Stage "data\$Dir") | Out-Null } +# QuickJS, for YouTube's signature/n-challenge solver (#438). yt-dlp ships the +# solver script (the yt-dlp-ejs dependency) but needs a JavaScript engine to run +# it, and a portable install has nothing on PATH. +# +# quickjs-ng rather than deno: 2 MB against deno's ~110 MB, times two bundles, +# against a 2 GiB release asset cap this project has already hit once (#318). +# +# It lives in backend/, not data/. The in-app updater replaces the executable +# and backend/ and leaves data/ alone, so a binary in data/ would only ever +# reach a fresh install. Here it arrives through an ordinary update, which is +# the whole point: shipping this must not cost existing users a reinstall. +# +# Pinned by version and SHA256, the same rule as the macOS FFmpeg download +# (#172). An unverified binary fetched at package time is a supply-chain hole +# whether or not it is small. +$QjsVersion = "v0.16.2" +$QjsSha256 = "7b27412de844403545bd151fbe49191b4d5b91a9e15b5db7c863fea54639a82b" +$QjsUrl = "https://github.com/quickjs-ng/quickjs/releases/download/$QjsVersion/qjs-windows-x86_64.exe" +$QjsDir = Join-Path $BackendDir "jsruntime" +New-Item -ItemType Directory -Force $QjsDir | Out-Null +$QjsExe = Join-Path $QjsDir "qjs.exe" +Write-Host "Fetching QuickJS $QjsVersion ..." +Invoke-WebRequest -Uri $QjsUrl -OutFile $QjsExe -UseBasicParsing +$QjsActual = (Get-FileHash -Path $QjsExe -Algorithm SHA256).Hash.ToLower() +if ($QjsActual -ne $QjsSha256) { + Remove-Item -Force $QjsExe + throw "QuickJS checksum mismatch: expected $QjsSha256, got $QjsActual" +} +Write-Host "QuickJS verified." + # Portable marker: present in every zip (CPU and NVIDIA alike) so double- # clicking StemDeck.exe uses .\data next to the exe for ffmpeg/models/config/ # logs instead of AppData (#399). Root-only trust, mirroring cpu-only below. diff --git a/tests/test_js_runtime.py b/tests/test_js_runtime.py new file mode 100644 index 00000000..d45d5b09 --- /dev/null +++ b/tests/test_js_runtime.py @@ -0,0 +1,185 @@ +"""Finding the bundled JS runtime, on every packaging layout (#438). + +yt-dlp ships the challenge solver as a Python package (the yt-dlp-ejs +dependency) but needs a JavaScript engine to execute it. The three packages do +not put that engine in the same place: + + Windows / Linux a staged tree, binary in data/jsruntime + macOS a downloaded runtime pack, binary next to backend/ + Docker deno on PATH, nothing bundled + +Getting this wrong is silent. bundled_js_runtime() returns None, yt-dlp falls +back to the client that skips the challenge, and imports keep working until +that client goes away. +""" + +from __future__ import annotations + +import sys + +import pytest + +from app.core import config as cfg + + +def _touch(directory, stem): + directory.mkdir(parents=True, exist_ok=True) + exe = directory / (f"{stem}.exe" if sys.platform.startswith("win") else stem) + exe.write_bytes(b"#!/bin/sh\n") + return exe + + +def test_nothing_bundled_is_not_an_error(tmp_path, monkeypatch): + """Docker and source checkouts bundle nothing and resolve deno from PATH. + None is the correct answer, not a failure.""" + monkeypatch.setattr(cfg, "JS_RUNTIME_DIR", tmp_path / "absent") + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (tmp_path / "absent",)) + assert cfg.bundled_js_runtime() is None + + +def test_the_staged_layout_is_found(tmp_path, monkeypatch): + """Windows and Linux: data/jsruntime, which is JS_RUNTIME_DIR's default.""" + exe = _touch(tmp_path / "data" / "jsruntime", "qjs") + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (tmp_path / "data" / "jsruntime",)) + assert cfg.bundled_js_runtime() == ("quickjs", exe) + + +def test_the_runtime_pack_layout_is_found(tmp_path, monkeypatch): + """macOS: beside backend/, because the app's data directory is user-owned + and a binary there would have to be installed rather than shipped.""" + exe = _touch(tmp_path / "runtime" / "jsruntime", "qjs") + monkeypatch.setattr( + cfg, "_js_runtime_dirs", lambda: (tmp_path / "absent", tmp_path / "runtime" / "jsruntime") + ) + assert cfg.bundled_js_runtime() == ("quickjs", exe) + + +def test_the_real_search_path_covers_the_packaged_layout(): + """The list itself, not a monkeypatched stand-in. + + In a package this file is backend/app/core/config.py, so parents[2] is + backend/ and backend/jsruntime is where all three build scripts put the + binary. A refactor that changes that index leaves every desktop package + silently without an engine, and silently is the whole problem: yt-dlp just + falls back to the client that skips the challenge. + """ + from pathlib import Path + + dirs = cfg._js_runtime_dirs() + assert cfg.JS_RUNTIME_DIR in dirs, "the env-var override must still win" + package_root = Path(cfg.__file__).resolve().parents[2] + assert package_root / "jsruntime" in dirs, ( + "backend/jsruntime is not searched; the build scripts put the engine there" + ) + assert len(set(dirs)) == len(dirs), "duplicate directories mean a wasted stat per lookup" + + +def test_the_build_scripts_agree_with_the_lookup(): + """A cross-language contract: three shell/PowerShell scripts choose where + the engine lands, and Python decides where to look. Nothing else checks + that those two facts still match, and a mismatch only shows up as YouTube + imports quietly degrading on one platform. + """ + from pathlib import Path + + repo = Path(cfg.__file__).resolve().parents[2] + scripts = { + "windows": repo / "scripts" / "windows" / "make-portable.ps1", + "linux": repo / "scripts" / "linux" / "make-portable.sh", + "macos": repo / "scripts" / "macos" / "make-runtime-pack.sh", + } + for name, path in scripts.items(): + if not path.is_file(): + continue # running from an installed package, not the repo + text = path.read_text(encoding="utf-8") + assert "jsruntime" in text, f"{name} no longer installs a JS runtime" + assert "BackendDir" in text or "BACKEND_DIR" in text, ( + f"{name} puts the engine outside backend/, where the updater cannot reach it" + ) + assert "sha256" in text.lower(), f"{name} fetches a binary without verifying it" + + +def test_ytdlp_preference_order_is_honoured(tmp_path, monkeypatch): + """deno 1000 > node 900 > quickjs 850 in yt-dlp's own provider ranking. A + build shipping more than one should get the solver yt-dlp would pick.""" + directory = tmp_path / "jsruntime" + _touch(directory, "qjs") + deno = _touch(directory, "deno") + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (directory,)) + assert cfg.bundled_js_runtime() == ("deno", deno) + + +def test_an_unreadable_directory_does_not_raise(tmp_path, monkeypatch): + """Never raises: this runs inside every YoutubeDL construction, and a + permissions problem must degrade to 'not bundled', not fail an import.""" + + class Boom: + def is_dir(self): + raise OSError("permission denied") + + good = _touch(tmp_path / "ok", "qjs") + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (Boom(), tmp_path / "ok")) + assert cfg.bundled_js_runtime() == ("quickjs", good) + + +def test_solver_availability_reports_a_bundled_runtime(tmp_path, monkeypatch): + directory = tmp_path / "jsruntime" + _touch(directory, "qjs") + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (directory,)) + assert cfg.js_solver_available() is True + + +def test_the_ejs_solver_resolves_from_the_vendored_copy(): + """The engine is useless without the script. yt-dlp resolves this package + before any remote source, which is what keeps --remote-components off, and + it must come from app/_vendor rather than site-packages: a dependency would + change uv.lock, shift runtimeId, and stand the desktop updater down.""" + import yt_dlp.dependencies + import yt_dlp_ejs + + assert yt_dlp.dependencies.yt_dlp_ejs is not None, ( + "the solver is missing; yt-dlp would fall back to fetching it at runtime" + ) + assert "_vendor" in yt_dlp_ejs.__file__.replace("\\", "/"), ( + f"resolved from {yt_dlp_ejs.__file__}, not the vendored copy" + ) + + +def test_the_vendored_payload_is_complete(): + """The Python shim alone is not the solver. Without the .js files yt-dlp + finds the package, believes it has a solver, and fails at solve time.""" + from pathlib import Path + + import app + + vendor = Path(app.__file__).resolve().parent / "_vendor" / "yt_dlp_ejs" + scripts = list((vendor / "yt" / "solver").glob("*.js")) + assert scripts, "no solver scripts vendored" + assert all(p.stat().st_size > 0 for p in scripts) + + +def test_the_vendor_path_insert_is_idempotent(): + """app/__init__ runs on every import of the package. Re-importing must not + keep growing sys.path.""" + import importlib + import sys + + import app + + before = sys.path.count( + str(__import__("pathlib").Path(app.__file__).resolve().parent / "_vendor") + ) + importlib.reload(app) + after = sys.path.count( + str(__import__("pathlib").Path(app.__file__).resolve().parent / "_vendor") + ) + assert after == before == 1 + + +@pytest.mark.parametrize("stem", ["deno", "node", "qjs"]) +def test_every_supported_runtime_is_recognised(tmp_path, monkeypatch, stem): + directory = tmp_path / stem + exe = _touch(directory, stem) + monkeypatch.setattr(cfg, "_js_runtime_dirs", lambda: (directory,)) + found = cfg.bundled_js_runtime() + assert found is not None and found[1] == exe