(e,r)
| 195 | `])}else{return n.template.expression.ast` |
| 196 | function () { throw new ReferenceError("'delete super.prop' is invalid"); }() |
| 197 | `}}};const v=Object.assign({},b,{prop(e){const{property:r}=e.node;if(this.memoiser.has(r)){return c(this.memoiser.get(r))}return c(r)},get(e){const{isStatic:r,getSuperRef:t}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(r){var o;n=(o=t())!=null?o:u(d("Function"),d("prototype"))}else{var i;n=u((i=t())!=null?i:d("Object"),d("prototype"))}return u(n,a,s)},set(e,r){const{computed:t}=e.node;const s=this.prop(e);return i("=",u(y(),s,t),r)},destructureSet(e){const{computed:r}=e.node;const t=this.prop(e);return u(y(),t,r)},call(e,r){return(0,a.default)(this.get(e),y(),r,false)},optionalCall(e,r){return(0,a.default)(this.get(e),y(),r,true)}});class ReplaceSupers{constructor(e){var r;const t=e.methodPath;this.methodPath=t;this.isDerivedConstructor=t.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=t.isObjectMethod()||t.node.static||(t.isStaticBlock==null?void 0:t.isStaticBlock());this.isPrivateMethod=t.isPrivate()&&t.isMethod();this.file=e.file;this.constantSuper=(r=e.constantSuper)!=null?r:e.isLoose;this.opts=e}getObjectRef(){return c(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return c(this.opts.superRef);if(this.opts.getSuperRef){return c(this.opts.getSuperRef())}}replace(){const{methodPath:e}=this;if(this.opts.refToPreserve){e.traverse(h,{refName:this.opts.refToPreserve.name})}const r=this.constantSuper?v:this.file.availableHelper("superPropSet")?b:x;g.shouldSkip=r=>{if(r.parentPath===e){if(r.parentKey==="decorators"||r.parentKey==="key"){return true}}};(0,s.default)(e,g,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:r.get},r))}}r["default"]=ReplaceSupers},9102:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isTransparentExprWrapper=isTransparentExprWrapper;r.skipTransparentExprWrapperNodes=skipTransparentExprWrapperNodes;r.skipTransparentExprWrappers=skipTransparentExprWrappers;var s=t(8622);const{isParenthesizedExpression:a,isTSAsExpression:n,isTSNonNullExpression:o,isTSSatisfiesExpression:i,isTSTypeAssertion:l,isTypeCastExpression:c}=s;function isTransparentExprWrapper(e){return n(e)||i(e)||l(e)||o(e)||c(e)||a(e)}function skipTransparentExprWrappers(e){while(isTransparentExprWrapper(e.node)){e=e.get("expression")}return e}function skipTransparentExprWrapperNodes(e){while(isTransparentExprWrapper(e)){e=e.expression}return e}},7008:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isIdentifierChar=isIdentifierChar;r.isIdentifierName=isIdentifierName;r.isIdentifierStart=isIdentifierStart;let t="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let s="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const a=new RegExp("["+t+"]");const n=new RegExp("["+t+s+"]");t=s=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];const i=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,r){let t=65536;for(let s=0,a=r.length;s<a;s+=2){t+=r[s];if(t>e)return false;t+=r[s+1];if(t>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&a.test(String.fromCharCode(e))}return isInAstralSet(e,o)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&n.test(String.fromCharCode(e))}return isInAstralSet(e,o)||isInAstralSet(e,i)}function isIdentifierName(e){let r=true;for(let t=0;t<e.length;t++){let s=e.charCodeAt(t);if((s&64512)===55296&&t+1<e.length){const r=e.charCodeAt(++t);if((r&64512)===56320){s=65536+((s&1023)<<10)+(r&1023)}}if(r){r=false;if(!isIdentifierStart(s)){return false}}else if(!isIdentifierChar(s)){return false}}return!r}},974:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});Object.defineProperty(r,"isIdentifierChar",{enumerable:true,get:function(){return s.isIdentifierChar}});Object.defineProperty(r,"isIdentifierName",{enumerable:true,get:function(){return s.isIdentifierName}});Object.defineProperty(r,"isIdentifierStart",{enumerable:true,get:function(){return s.isIdentifierStart}});Object.defineProperty(r,"isKeyword",{enumerable:true,get:function(){return a.isKeyword}});Object.defineProperty(r,"isReservedWord",{enumerable:true,get:function(){return a.isReservedWord}});Object.defineProperty(r,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return a.isStrictBindOnlyReservedWord}});Object.defineProperty(r,"isStrictBindReservedWord",{enumerable:true,get:function(){return a.isStrictBindReservedWord}});Object.defineProperty(r,"isStrictReservedWord",{enumerable:true,get:function(){return a.isStrictReservedWord}});var s=t(7008);var a=t(1444)},1444:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isKeyword=isKeyword;r.isReservedWord=isReservedWord;r.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;r.isStrictBindReservedWord=isStrictBindReservedWord;r.isStrictReservedWord=isStrictReservedWord;const t={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const s=new Set(t.keyword);const a=new Set(t.strict);const n=new Set(t.strictBind);function isReservedWord(e,r){return r&&e==="await"||e==="enum"}function isStrictReservedWord(e,r){return isReservedWord(e,r)||a.has(e)}function isStrictBindOnlyReservedWord(e){return n.has(e)}function isStrictBindReservedWord(e,r){return isStrictReservedWord(e,r)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return s.has(e)}},3648:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.findSuggestion=findSuggestion;const{min:t}=Math;function levenshtein(e,r){let s=[],a=[],n,o;const i=e.length,l=r.length;if(!i){return l}if(!l){return i}for(o=0;o<=l;o++){s[o]=o}for(n=1;n<=i;n++){for(a=[n],o=1;o<=l;o++){a[o]=e[n-1]===r[o-1]?s[o-1]:t(s[o-1],s[o],a[o-1])+1}s=a}return a[l]}function findSuggestion(e,r){const s=r.map((r=>levenshtein(r,e)));return r[s.indexOf(t(...s))]}},3146:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});Object.defineProperty(r,"OptionValidator",{enumerable:true,get:function(){return s.OptionValidator}});Object.defineProperty(r,"findSuggestion",{enumerable:true,get:function(){return a.findSuggestion}});var s=t(2020);var a=t(3648)},2020:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.OptionValidator=void 0;var s=t(3648);class OptionValidator{constructor(e){this.descriptor=e}validateTopLevelOptions(e,r){const t=Object.keys(r);for(const r of Object.keys(e)){if(!t.includes(r)){throw new Error(this.formatMessage(`'${r}' is not a valid top-level option.\n- Did you mean '${(0,s.findSuggestion)(r,t)}'?`))}}}validateBooleanOption(e,r,t){if(r===undefined){return t}else{this.invariant(typeof r==="boolean",`'${e}' option must be a boolean.`)}return r}validateStringOption(e,r,t){if(r===undefined){return t}else{this.invariant(typeof r==="string",`'${e}' option must be a string.`)}return r}invariant(e,r){if(!e){throw new Error(this.formatMessage(r))}}formatMessage(e){return`${this.descriptor}: ${e}`}}r.OptionValidator=OptionValidator},6583:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=wrapFunction;var s=t(5326);var a=t(8622);const{blockStatement:n,callExpression:o,functionExpression:i,isAssignmentPattern:l,isFunctionDeclaration:c,isRestElement:d,returnStatement:u,isCallExpression:p}=a;const f=s.default.expression(`\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n`);const y=s.default.expression(`\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n`);const g=s.default.statements(`\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n`);function classOrObjectMethod(e,r){const t=e.node;const s=t.body;const a=i(null,[],n(s.body),true);s.body=[u(o(o(r,[a]),[]))];t.async=false;t.generator=false;e.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment()}function plainFunction(e,r,t,s,a){let n=e;let i;let u=null;const h=e.node.params;if(n.isArrowFunctionExpression()){{var b;n=(b=n.arrowFunctionToExpression({noNewArrows:t}))!=null?b:n}i=n.node}else{i=n.node}const x=c(i);let v=i;if(!p(i)){u=i.id;i.id=null;i.type="FunctionExpression";v=o(r,[i])}const j=[];for(const e of h){if(l(e)||d(e)){break}j.push(n.scope.generateUidIdentifier("x"))}const w={NAME:u||null,REF:n.scope.generateUidIdentifier(a?u.name:"ref"),FUNCTION:v,PARAMS:j};if(x){const e=g(w);n.replaceWith(e[0]);n.insertAfter(e[1])}else{let e;if(a){e=y(w)}else{e=f(w)}if(u||!s&&j.length){n.replaceWith(e)}else{n.replaceWith(v)}}}function wrapFunction(e,r,s=true,a=false){if(e.isMethod()){classOrObjectMethod(e,r)}else{const i="id"in e.node&&!!e.node.id;{var n,o;(o=(n=e).ensureFunctionName)!=null?o:n.ensureFunctionName=t(7369).NodePath.prototype.ensureFunctionName}e=e.ensureFunctionName(false);plainFunction(e,r,s,a,i)}}},6797:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(7369);var a=t(9045);var n=r["default"]=(0,a.declare)((({types:e,assertVersion:r})=>{r(7);const t={ClassExpression(e,r){r.found=true;e.stop()},Function(e){e.skip()}};const a=s.visitors.environmentVisitor({YieldExpression(e,r){r.yield=true;if(r.await)e.stop()},AwaitExpression(e,r){r.await=true;if(r.yield)e.stop()}});function containsClassExpression(r){if(e.isClassExpression(r.node))return true;if(e.isFunction(r.node))return false;const s={found:false};r.traverse(t,s);return s.found}function wrap(r){const t={yield:e.isYieldExpression(r.node),await:e.isAwaitExpression(r.node)};r.traverse(a,t);let s;if(t.yield){const a=e.functionExpression(null,[],e.blockStatement([e.returnStatement(r.node)]),true,t.await);s=e.yieldExpression(e.callExpression(e.memberExpression(a,e.identifier("call")),[e.thisExpression(),e.identifier("arguments")]),true)}else{const a=e.arrowFunctionExpression([],r.node,t.await);s=e.callExpression(a,[]);if(t.await)s=e.awaitExpression(s)}r.replaceWith(s)}return{name:"bugfix-firefox-class-in-computed-class-key",visitor:{Class(r){const t=r.node.body.body.some((r=>e.isPrivate(r)));if(!t)return;for(const e of r.get("body.body")){if("computed"in e.node&&e.node.computed&&containsClassExpression(e.get("key"))){wrap(e.get("key"))}}}}}}))},7085:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(9045);var a=t(8304);function needsWrapping(e){if(a.types.isLiteral(e)&&!a.types.isTemplateLiteral(e)){return false}if(a.types.isCallExpression(e)||a.types.isOptionalCallExpression(e)||a.types.isNewExpression(e)){return needsWrapping(e.callee)||e.arguments.some(needsWrapping)}if(a.types.isTemplateLiteral(e)){return e.expressions.some(needsWrapping)}if(a.types.isTaggedTemplateExpression(e)){return needsWrapping(e.tag)||needsWrapping(e.quasi)}if(a.types.isArrayExpression(e)){return e.elements.some(needsWrapping)}if(a.types.isObjectExpression(e)){return e.properties.some((e=>{if(a.types.isObjectProperty(e)){return needsWrapping(e.value)||e.computed&&needsWrapping(e.key)}if(a.types.isObjectMethod(e)){return false}return false}))}if(a.types.isMemberExpression(e)||a.types.isOptionalMemberExpression(e)){return needsWrapping(e.object)||e.computed&&needsWrapping(e.property)}if(a.types.isFunctionExpression(e)||a.types.isArrowFunctionExpression(e)||a.types.isClassExpression(e)){return false}if(a.types.isThisExpression(e)){return false}if(a.types.isSequenceExpression(e)){return e.expressions.some(needsWrapping)}return true}function wrapInitializer(e){const{value:r}=e.node;if(r&&needsWrapping(r)){e.node.value=a.types.callExpression(a.types.arrowFunctionExpression([],r),[])}}var n=s.declare((e=>{e.assertVersion("^7.16.0");return{name:"plugin-bugfix-safari-class-field-initializer-scope",visitor:{ClassProperty(e){wrapInitializer(e)},ClassPrivateProperty(e){wrapInitializer(e)}}}}));r["default"]=n},8194:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(9045);function shouldTransform(e){const{node:r}=e;const t=r.id;if(!t)return false;const s=t.name;const a=e.scope.getOwnBinding(s);if(a===undefined){return false}if(a.kind!=="param"){return false}if(a.identifier===a.path.node){return false}return s}var a=s.declare((e=>{e.assertVersion("^7.16.0");return{name:"plugin-bugfix-safari-id-destructuring-collision-in-function-expression",visitor:{FunctionExpression(e){const r=shouldTransform(e);if(r){const{scope:t}=e;const s=t.generateUid(r);t.rename(r,s)}}}}}));r["default"]=a},2047:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(9045);var a=t(9076);var n=t(9102);var o=t(8304);function matchAffectedArguments(e){const r=e.findIndex((e=>o.types.isSpreadElement(e)));return r>=0&&r!==e.length-1}function shouldTransform(e){let r=e;const t=[];for(;;){if(r.isOptionalMemberExpression()){t.push(r.node);r=n.skipTransparentExprWrappers(r.get("object"))}else if(r.isOptionalCallExpression()){t.push(r.node);r=n.skipTransparentExprWrappers(r.get("callee"))}else{break}}for(let e=0;e<t.length;e++){const r=t[e];if(o.types.isOptionalCallExpression(r)&&matchAffectedArguments(r.arguments)){if(r.optional){return true}const s=t[e+1];if(o.types.isOptionalMemberExpression(s,{optional:true})){return true}}}return false}var i=s.declare((e=>{var r,t;e.assertVersion(7);const s=(r=e.assumption("noDocumentAll"))!=null?r:false;const n=(t=e.assumption("pureGetters"))!=null?t:false;return{name:"bugfix-v8-spread-parameters-in-optional-chaining",visitor:{"OptionalCallExpression|OptionalMemberExpression"(e){if(shouldTransform(e)){a.transform(e,{noDocumentAll:s,pureGetters:n})}}}}}));r["default"]=i},9814:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(8304);var a=t(9045);function isNameOrLength(e){if(s.types.isIdentifier(e)){return e.name==="name"||e.name==="length"}if(s.types.isStringLiteral(e)){return e.value==="name"||e.value==="length"}return false}function isStaticFieldWithValue(e){return(s.types.isClassProperty(e)||s.types.isClassPrivateProperty(e))&&e.static&&!!e.value}const n={ReferencedIdentifier(e,r){if(e.node.name===r.name){r.ref();e.stop()}},Scope(e,{name:r}){if(e.scope.hasOwnBinding(r)){e.skip()}}};function isReferenceOrThis(e,r){return s.types.isThisExpression(e)||r&&s.types.isIdentifier(e,{name:r})}const o={"ThisExpression|ReferencedIdentifier"(e,r){if(isReferenceOrThis(e.node,r.name)){r.ref();e.stop()}},FunctionParent(e,r){if(e.isArrowFunctionExpression())return;if(r.name&&!e.scope.hasOwnBinding(r.name)){e.traverse(n,r)}e.skip();if(e.isMethod()){if(e.requeueComputedKeyAndDecorators){e.requeueComputedKeyAndDecorators()}else{t(7369).NodePath.prototype.requeueComputedKeyAndDecorators.call(e)}}}};function getPotentiallyBuggyFieldsIndexes(e){var r;const t=[];let a=false;const i=(r=e.node.id)==null?void 0:r.name;const l={name:i,ref:()=>a=true};if(i){for(const r of e.get("body.body")){if(r.node.computed){r.get("key").traverse(n,l);if(a)break}}}let c=false;const{body:d}=e.node.body;for(let r=0;r<d.length;r++){const n=d[r];if(!c){if(s.types.isStaticBlock(n)){a=true;c=true}else if(isStaticFieldWithValue(n)){if(!a){if(isReferenceOrThis(n.value,i)){a=true}else{e.get(`body.body.${r}.value`).traverse(o,l)}}if(a){c=!e.scope.isPure(n.value)}}}if(s.types.isClassProperty(n,{static:true})&&(c||n.computed||isNameOrLength(n.key))){t.push(r)}}return t}function getNameOrLengthStaticFieldsIndexes(e){const r=[];const{body:t}=e.node.body;for(let e=0;e<t.length;e++){const a=t[e];if(s.types.isClassProperty(a,{static:true,computed:false})&&isNameOrLength(a.key)){r.push(e)}}return r}function toRanges(e){const r=[];if(e.length===0)return r;let t=e[0];let s=t+1;for(let a=1;a<e.length;a++){if(e[a]<=e[a-1]){throw new Error("Internal Babel error: nums must be in ascending order")}if(e[a]===s){s++}else{r.push([t,s]);t=e[a];s=t+1}}r.push([t,s]);return r}function buildFieldsReplacement(e,r,t){return s.types.staticBlock(e.map((e=>{const a=e.computed||!s.types.isIdentifier(e.key)?e.key:s.types.stringLiteral(e.key.name);return s.types.expressionStatement(s.types.callExpression(t.addHelper("defineProperty"),[s.types.thisExpression(),a,e.value||r.buildUndefinedNode()]))})))}var i=a.declare((e=>{e.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta");const r=e.assumption("setPublicClassFields");return{name:"bugfix-v8-static-class-fields-redefine-readonly",visitor:{Class(e){const t=toRanges(r?getNameOrLengthStaticFieldsIndexes(e):getPotentiallyBuggyFieldsIndexes(e));for(let r=t.length-1;r>=0;r--){const[s,a]=t[r];const n=e.get("body.body")[s];n.replaceWith(buildFieldsReplacement(e.node.body.body.slice(s,a),e.scope,this.file));for(let r=a-1;r>s;r--){e.get("body.body")[r].remove()}}}}}}));r["default"]=i},4431:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=r["default"]=(0,s.declare)((e=>{e.assertVersion(7);const isPlugin=(e,r)=>r==="plugin"||Array.isArray(e)&&e[0]==="plugin";const options=e=>Array.isArray(e)&&e.length>1?e[1]:{};return{name:"syntax-import-assertions",manipulateOptions(e,{plugins:r}){for(let e=0;e<r.length;e++){const t=r[e];if(isPlugin(t,"deprecatedImportAssert"))return;if(isPlugin(t,"importAttributes")){r.splice(e,1,"deprecatedImportAssert",["importAttributes",Object.assign({},options(t),{deprecatedAssertSyntax:true})]);return}}r.push("importAssertions")}}}))},8558:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=r["default"]=(0,s.declare)(((e,{deprecatedAssertSyntax:r})=>{e.assertVersion("^7.22.0 || >8.0.0-alpha <8.0.0-beta");if(r!=null&&typeof r!=="boolean"){throw new Error("'deprecatedAssertSyntax' must be a boolean, if specified.")}return{name:"syntax-import-attributes",manipulateOptions({parserOpts:e,generatorOpts:t}){var s;(s=t.importAttributesKeyword)!=null?s:t.importAttributesKeyword="with";const a=e.plugins.indexOf("importAssertions");if(a!==-1){e.plugins.splice(a,1);r=true}if(r){e.plugins.push("deprecatedImportAssert",["importAttributes",{deprecatedAssertSyntax:true}])}else{e.plugins.push("importAttributes")}}}}))},2698:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=r["default"]=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-jsx",manipulateOptions(e,r){{if(r.plugins.some((e=>(Array.isArray(e)?e[0]:e)==="typescript"))){return}}r.plugins.push("jsx")}}}))},8118:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);{var removePlugin=function(e,r){const t=[];e.forEach(((e,s)=>{const a=Array.isArray(e)?e[0]:e;if(a===r){t.unshift(s)}}));for(const r of t){e.splice(r,1)}}}var a=r["default"]=(0,s.declare)(((e,r)=>{e.assertVersion(7);const{disallowAmbiguousJSXLike:t,dts:s}=r;{var{isTSX:a}=r}return{name:"syntax-typescript",manipulateOptions(e,r){{const{plugins:e}=r;removePlugin(e,"flow");removePlugin(e,"jsx");{e.push("objectRestSpread","classProperties")}if(a){e.push("jsx")}}r.plugins.push(["typescript",{disallowAmbiguousJSXLike:t,dts:s}])}}}))},8184:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);{var removePlugin=function(e,r){const t=[];e.forEach(((e,s)=>{const a=Array.isArray(e)?e[0]:e;if(a===r){t.unshift(s)}}));for(const r of t){e.splice(r,1)}}}var a=r["default"]=(0,s.declare)(((e,r)=>{e.assertVersion(7);const{disallowAmbiguousJSXLike:t,dts:s}=r;{var{isTSX:a}=r}return{name:"syntax-typescript",manipulateOptions(e,r){{const{plugins:e}=r;removePlugin(e,"flow");removePlugin(e,"jsx");{e.push("objectRestSpread","classProperties")}if(a){e.push("jsx")}}r.plugins.push(["typescript",{disallowAmbiguousJSXLike:t,dts:s}])}}}))},8153:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5436);var a=t(9045);var n=(0,a.declare)((e=>{e.assertVersion(7);return(0,s.createRegExpFeaturePlugin)({name:"syntax-unicode-sets-regex",feature:"unicodeSetsFlag_syntax",manipulateOptions(e,r){r.plugins.push("regexpUnicodeSets")}})}));r["default"]=n},3412:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=r["default"]=(0,s.declare)(((e,r)=>{var t;e.assertVersion(7);const s=(t=e.assumption("noNewArrows"))!=null?t:!r.spec;return{name:"transform-arrow-functions",visitor:{ArrowFunctionExpression(e){if(!e.isArrowFunctionExpression())return;{e.arrowFunctionToExpression({allowInsertArrow:false,noNewArrows:s,specCompliant:!s})}}}}}))},5992:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=_default;var s=t(8304);const a=(0,s.template)(`\n async function wrapper() {\n var ITERATOR_ABRUPT_COMPLETION = false;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY;\n ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done;\n ITERATOR_ABRUPT_COMPLETION = false\n ) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n`);function _default(e,{getAsyncIterator:r}){const{node:t,scope:n,parent:o}=e;const i=n.generateUidIdentifier("step");const l=s.types.memberExpression(i,s.types.identifier("value"));const c=t.left;let d;if(s.types.isIdentifier(c)||s.types.isPattern(c)||s.types.isMemberExpression(c)){d=s.types.expressionStatement(s.types.assignmentExpression("=",c,l))}else if(s.types.isVariableDeclaration(c)){d=s.types.variableDeclaration(c.kind,[s.types.variableDeclarator(c.declarations[0].id,l)])}let u=a({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_ABRUPT_COMPLETION:n.generateUidIdentifier("iteratorAbruptCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:n.generateUidIdentifier("iterator"),GET_ITERATOR:r,OBJECT:t.right,STEP_KEY:s.types.cloneNode(i)});u=u.body.body;const p=s.types.isLabeledStatement(o);const f=u[3].block.body;const y=f[0];if(p){f[0]=s.types.labeledStatement(o.label,y)}return{replaceParent:p,node:u,declar:d,loop:y}}},1802:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=t(9255);var n=t(8304);var o=t(7369);var i=t(5992);var l=r["default"]=(0,s.declare)((e=>{e.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta");const r=o.visitors.environmentVisitor({ArrowFunctionExpression(e){e.skip()},YieldExpression({node:e},r){if(!e.delegate)return;const t=n.types.callExpression(r.addHelper("asyncIterator"),[e.argument]);e.argument=n.types.callExpression(r.addHelper("asyncGeneratorDelegate"),[t,r.addHelper("awaitAsyncGenerator")])}});const t=o.visitors.environmentVisitor({ArrowFunctionExpression(e){e.skip()},ForOfStatement(e,{file:r}){const{node:t}=e;if(!t.await)return;const s=(0,i.default)(e,{getAsyncIterator:r.addHelper("asyncIterator")});const{declar:a,loop:o}=s;const l=o.body;e.ensureBlock();if(a){l.body.push(a);if(e.node.body.body.length){l.body.push(n.types.blockStatement(e.node.body.body))}}else{l.body.push(...e.node.body.body)}n.types.inherits(o,t);n.types.inherits(o.body,t.body);const c=s.replaceParent?e.parentPath:e;c.replaceWithMultiple(s.node);c.scope.parent.crawl()}});const s={Function(e,s){if(!e.node.async)return;e.traverse(t,s);if(!e.node.generator)return;e.traverse(r,s);e.setData("@babel/plugin-transform-async-generator-functions/async_generator_function",true);(0,a.default)(e,{wrapAsync:s.addHelper("wrapAsyncGenerator"),wrapAwait:s.addHelper("awaitAsyncGenerator")})}};return{name:"transform-async-generator-functions",manipulateOptions:(e,r)=>r.plugins.push("asyncGenerators"),visitor:{Program(e,r){e.traverse(s,r)}}}}))},3957:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=t(9255);var n=t(4414);var o=t(8304);var i=r["default"]=(0,s.declare)(((e,r)=>{var t,s;e.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta");const{method:i,module:l}=r;const c=(t=e.assumption("noNewArrows"))!=null?t:true;const d=(s=e.assumption("ignoreFunctionLength"))!=null?s:false;if(i&&l){return{name:"transform-async-to-generator",visitor:{Function(e,r){if(!e.node.async||e.node.generator)return;let t=r.methodWrapper;if(t){t=o.types.cloneNode(t)}else{t=r.methodWrapper=(0,n.addNamed)(e,i,l)}(0,a.default)(e,{wrapAsync:t},c,d)}}}}return{name:"transform-async-to-generator",visitor:{Function(e,r){if(!e.node.async||e.node.generator)return;(0,a.default)(e,{wrapAsync:r.addHelper("asyncToGenerator")},c,d)}}}}))},9857:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=t(8304);var n=r["default"]=(0,s.declare)((e=>{e.assertVersion(7);function transformStatementList(e,r){for(const e of r){if(!e.isFunctionDeclaration())continue;const r=e.node;const t=a.types.variableDeclaration("let",[a.types.variableDeclarator(r.id,a.types.toExpression(r))]);t._blockHoist=2;r.id=null;e.replaceWith(t)}}return{name:"transform-block-scoped-functions",visitor:{BlockStatement(e){const{node:r,parent:t}=e;if(a.types.isFunction(t,{body:r})||a.types.isExportDeclaration(t)){return}transformStatementList(e,e.get("body"))},SwitchCase(e){transformStatementList(e,e.get("consequent"))}}}}))},5719:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.annexB33FunctionsVisitor=void 0;r.isVarScope=isVarScope;var s=t(8304);const a=r.annexB33FunctionsVisitor=Object.assign({VariableDeclaration(e){if(isStrict(e))return;if(e.node.kind!=="var")return;const r=e.scope.getFunctionParent()||e.scope.getProgramParent();r.path.traverse(n,{names:Object.keys(e.getBindingIdentifiers())})}},{BlockStatement(e){if(isStrict(e))return;if(s.types.isFunction(e.parent,{body:e.node}))return;transformStatementList(e.get("body"))},SwitchCase(e){if(isStrict(e))return;transformStatementList(e.get("consequent"))}});function transformStatementList(e){e:for(const r of e){if(!r.isFunctionDeclaration())continue;if(r.node.async||r.node.generator)return;const{scope:e}=r.parentPath;if(isVarScope(e))return;const{name:t}=r.node.id;let s=e;do{if(s.parent.hasOwnBinding(t))continue e;s=s.parent}while(!isVarScope(s));maybeTransformBlockScopedFunction(r)}}function maybeTransformBlockScopedFunction(e){const{node:r,parentPath:{scope:t}}=e;const{id:a}=r;t.removeOwnBinding(a.name);r.id=null;const n=s.types.variableDeclaration("var",[s.types.variableDeclarator(a,s.types.toExpression(r))]);n._blockHoist=2;const[o]=e.replaceWith(n);t.registerDeclaration(o)}const n={Scope(e,{names:r}){for(const t of r){const r=e.scope.getOwnBinding(t);if(r&&r.kind==="hoisted"){maybeTransformBlockScopedFunction(r.path)}}},"Expression|Declaration"(e){e.skip()}};function isVarScope(e){return e.path.isFunctionParent()||e.path.isProgram()}function isStrict(e){return!!e.find((({node:e})=>{var r;if(s.types.isProgram(e)){if(e.sourceType==="module")return true}else if(s.types.isClass(e)){return true}else if(!s.types.isBlockStatement(e)){return false}return(r=e.directives)==null?void 0:r.some((e=>e.value.value==="use strict"))}))}},7309:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9045);var a=t(8304);var n=t(3041);var o=t(3287);var i=t(5719);var l=r["default"]=(0,s.declare)(((e,r)=>{e.assertVersion(7);const{throwIfClosureRequired:t=false,tdz:s=false}=r;if(typeof t!=="boolean"){throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`)}if(typeof s!=="boolean"){throw new Error(`.tdz must be a boolean, or undefined`)}return{name:"transform-block-scoping",visitor:a.traverse.visitors.merge([i.annexB33FunctionsVisitor,{Loop(e,r){const a=e.isForStatement();const o=a?e.get("init"):e.isForXStatement()?e.get("left"):null;let i=false;const markNeedsBodyWrap=()=>{if(t){throw e.buildCodeFrameError("Compiling let/const in this block would add a closure "+"(throwIfClosureRequired).")}i=true};const l=e.get("body");let c;if(l.isBlockStatement()){c=l.scope}const d=(0,n.getLoopBodyBindings)(e);for(const r of d){const{capturedInClosure:t}=(0,n.getUsageInBody)(r,e);if(t)markNeedsBodyWrap()}const u=[];const p=new Map;if(o&&isBlockScoped(o.node)){const r=Object.keys(o.getBindingIdentifiers());const t=o.scope;for(let s of r){var f;if((f=c)!=null&&f.hasOwnBinding(s))continue;let r=t.getOwnBinding(s);if(!r){t.crawl();r=t.getOwnBinding(s)}const{usages:o,capturedInClosure:i,hasConstantViolations:l}=(0,n.getUsageInBody)(r,e);if(t.parent.hasBinding(s)||t.parent.hasGlobal(s)){const e=t.generateUid(s);t.rename(s,e);s=e}if(i){markNeedsBodyWrap();u.push(s)}if(a&&l){p.set(s,o)}}}if(i){const t=(0,n.wrapLoopBody)(e,u,p);if(o!=null&&o.isVariableDeclaration()){transformBlockScopedVariable(o,r,s)}t.get("declarations.0.init").unwrapFunctionEnvironment()}},VariableDeclaration(e,r){transformBlockScopedVariable(e,r,s)},ClassDeclaration(e){const{id:r}=e.node;if(!r)return;const{scope:t}=e.parentPath;if(!(0,i.isVarScope)(t)&&t.parent.hasBinding(r.name,{noUids:true})){e.scope.rename(r.name)}}}])}}));const c={Scope(e,{names:r}){for(const t of r){const r=e.scope.getOwnBinding(t);if(r&&r.kind==="hoisted"){e.scope.rename(t)}}},"Expression|Declaration"(e){e.skip()}};function transformBlockScopedVariable(e,r,t){if(!isBlockScoped(e.node))return;const s=(0,o.validateUsage)(e,r,t);e.node.kind="var";const i=Object.keys(e.getBindingIdentifiers());for(const r of i){const t=e.scope.getOwnBinding(r);if(!t)continue;t.kind="var"}if(isInLoop(e)&&!(0,n.isVarInLoopHead)(e)||s.length>0){for(const r of e.node.declarations){var l;(l=r.init)!=null?l:r.init=e.scope.buildUndefinedNode()}}const d=e.scope;const u=d.getFunctionParent()||d.getProgramParent();if(u!==d){for(const e of i){let r=e;if(d.parent.hasBinding(e,{noUids:true})||d.parent.hasGlobal(e)){r=d.generateUid(e);d.rename(e,r)}d.moveBindingTo(r,u)}}d.path.traverse(c,{names:i});for(const t of s){e.scope.push({id:a.types.identifier(t),init:r.addHelper("temporalUndefined")})}}function isLetOrConst(e){return e==="let"||e==="const"}function isInLoop(e){if(!e.parentPath)return false;if(e.parentPath.isLoop())return true;if(e.parentPath.isFunctionParent())return false;return isInLoop(e.parentPath)}function isBlockScoped(e){if(!a.types.isVariableDeclaration(e))return false;if(!isLetOrConst(e.kind)&&e.kind!=="using"){return false}return true}},3041:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getLoopBodyBindings=getLoopBodyBindings;r.getUsageInBody=getUsageInBody;r.isVarInLoopHead=isVarInLoopHead;r.wrapLoopBody=wrapLoopBody;var s=t(8304);const a={"Expression|Declaration|Loop"(e){e.skip()},Scope(e,r){if(e.isFunctionParent())e.skip();const{bindings:t}=e.scope;for(const e of Object.keys(t)){const s=t[e];if(s.kind==="let"||s.kind==="const"||s.kind==="hoisted"){r.blockScoped.push(s)}}}};function getLoopBodyBindings(e){const r={blockScoped:[]};e.traverse(a,r);return r.blockScoped}function getUsageInBody(e,r){const t=new WeakSet;let s=false;const a=filterMap(e.constantViolations,(e=>{const{inBody:a,inClosure:n}=relativeLoopLocation(e,r);if(!a)return null;s||(s=n);const o=e.isUpdateExpression()?e.get("argument"):e.isAssignmentExpression()?e.get("left"):null;if(o)t.add(o.node);return o}));const n=filterMap(e.referencePaths,(e=>{if(t.has(e.node))return null;const{inBody:a,inClosure:n}=relativeLoopLocation(e,r);if(!a)return null;s||(s=n);return e}));return{capturedInClosure:s,hasConstantViolations:a.length>0,usages:n.concat(a)}}function relativeLoopLocation(e,r){const t=r.get("body");let s=false;for(let a=e;a;a=a.parentPath){if(a.isFunction()||a.isClass()||a.isMethod()){s=true}if(a===t){return{inBody:true,inClosure:s}}else if(a===r){return{inBody:false,inClosure:s}}}throw new Error("Internal Babel error: path is not in loop. Please report this as a bug.")}const n={Function(e){e.skip()},LabeledStatement:{enter({node:e},r){r.labelsStack.push(e.label.name)},exit({node:e},r){const t=r.labelsStack.pop();if(t!==e.label.name){throw new Error("Assertion failure. Please report this bug to Babel.")}}},Loop:{enter(e,r){r.labellessContinueTargets++;r.labellessBreakTargets++},exit(e,r){r.labellessContinueTargets--;r.labellessBreakTargets--}},SwitchStatement:{enter(e,r){r.labellessBreakTargets++},exit(e,r){r.labellessBreakTargets--}},"BreakStatement|ContinueStatement"(e,r){const{label:t}=e.node;if(t){if(r.labelsStack.includes(t.name))return}else if(e.isBreakStatement()?r.labellessBreakTargets>0:r.labellessContinueTargets>0){return}r.breaksContinues.push(e)},ReturnStatement(e,r){r.returns.push(e)},VariableDeclaration(e,r){if(e.parent===r.loopNode&&isVarInLoopHead(e))return;if(e.node.kind==="var")r.vars.push(e)}};function wrapLoopBody(e,r,t){const a=e.node;const o={breaksContinues:[],returns:[],labelsStack:[],labellessBreakTargets:0,labellessContinueTargets:0,vars:[],loopNode:a};e.traverse(n,o);const i=[];const l=[];const c=[];for(const[r,a]of t){i.push(s.types.identifier(r));const t=e.scope.generateUid(r);l.push(s.types.identifier(t));c.push(s.types.assignmentExpression("=",s.types.identifier(r),s.types.identifier(t)));for(const e of a)e.replaceWith(s.types.identifier(t))}for(const e of r){if(t.has(e))continue;i.push(s.types.identifier(e));l.push(s.types.identifier(e))}const d=e.scope.generateUid("loop");const u=s.types.functionExpression(null,l,s.types.toBlock(a.body));let p=s.types.callExpression(s.types.identifier(d),i);const f=e.findParent((e=>e.isFunction()));if(f){const{async:e,generator:r}=f.node;u.async=e;u.generator=r;if(r)p=s.types.yieldExpression(p,true);else if(e)p=s.types.awaitExpression(p)}const y=c.length>0?s.types.expressionStatement(s.types.sequenceExpression(c)):null;if(y)u.body.body.push(y);const[g]=e.insertBefore(s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.identifier(d),u)]));const h=[];const b=[];for(const e of o.vars){const r=[];for(const t of e.node.declarations){b.push(...Object.keys(s.types.getBindingIdentifiers(t.id)));if(t.init){r.push(s.types.assignmentExpression("=",t.id,t.init))}else if(s.types.isForXStatement(e.parent,{left:e.node})){r.push(t.id)}}if(r.length>0){const t=r.length===1?r[0]:s.types.sequenceExpression(r);e.replaceWith(t)}else{e.remove()}}if(b.length){g.pushContainer("declarations",b.map((e=>s.types.variableDeclarator(s.types.identifier(e)))))}const x=o.breaksContinues.length;const v=o.returns.length;if(x+v===0){h.push(s.types.expressionStatement(p))}else if(x===1&&v===0){for(const e of o.breaksContinues){const{node:r}=e;const{type:t,label:a}=r;let n=t==="BreakStatement"?"break":"continue";if(a)n+=" "+a.name;e.replaceWith(s.types.addComment(s.types.returnStatement(s.types.numericLiteral(1)),"trailing"," "+n,true));if(y)e.insertBefore(s.types.cloneNode(y));h.push(s.template.statement.ast` |
| 198 | if (${p}) ${r} |
| 199 | `)}}else{const r=e.scope.generateUid("ret");if(g.isVariableDeclaration()){g.pushContainer("declarations",[s.types.variableDeclarator(s.types.identifier(r))]);h.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.identifier(r),p)))}else{h.push(s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.identifier(r),p)]))}const t=[];for(const e of o.breaksContinues){const{node:a}=e;const{type:n,label:o}=a;let i=n==="BreakStatement"?"break":"continue";if(o)i+=" "+o.name;let l=t.indexOf(i);const c=l!==-1;if(!c){t.push(i);l=t.length-1}e.replaceWith(s.types.addComment(s.types.returnStatement(s.types.numericLiteral(l)),"trailing"," "+i,true));if(y)e.insertBefore(s.types.cloneNode(y));if(c)continue;h.push(s.template.statement.ast` |
| 200 | if (${s.types.identifier(r)} === ${s.types.numericLiteral(l)}) ${a} |
nothing calls this directly
no test coverage detected