@feathery/react 2.15.0 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Form/logic.d.ts.map +1 -1
- package/cjs/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/cjs/{fthry_FormControl.C8oeoDk3.js → fthry_FormControl.DhxdiYw6.js} +1 -1
- package/cjs/{fthry_InlineTooltip.CRRFOiO4.js → fthry_InlineTooltip.BgAXRUIt.js} +2 -2
- package/cjs/{fthry_Overlay.CMYptYVH.js → fthry_Overlay.D7IM1ywp.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.C_yV3aay.js → fthry_PaymentMethodField.NEoloWMI.js} +4 -4
- package/cjs/{fthry_Placeholder.xDn0I29f.js → fthry_Placeholder.D5C0aH2S.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.COZczYEG.js → fthry_ShowEyeIcon.CmLMyaN5.js} +1 -1
- package/cjs/{fthry_index.CQ3OgNZu.js → fthry_index.BFpcCw2o.js} +1 -1
- package/cjs/{fthry_index.Dm94Mor0.js → fthry_index.BJYH_2P6.js} +1 -1
- package/cjs/{fthry_index.Dzq-7u_A.js → fthry_index.BK_jaGHn.js} +5 -5
- package/cjs/{fthry_index.Db8Zj-xl.js → fthry_index.Bb1R5GZK.js} +2 -2
- package/cjs/{fthry_index.BV9FIqI3.js → fthry_index.Bd1HfYvE.js} +5 -5
- package/cjs/{fthry_index.CgatqFlS.js → fthry_index.BgeTdwT5.js} +2 -2
- package/cjs/{fthry_index.CFl7Tra-.js → fthry_index.Bq3nU0FH.js} +6 -6
- package/cjs/{fthry_index.Ct-olYcX.js → fthry_index.BqS0kCfh.js} +1 -1
- package/cjs/{fthry_index.ByYAaIPz.js → fthry_index.By8RWuUY.js} +6 -6
- package/cjs/{fthry_index.C97Bm277.js → fthry_index.CbfDILWu.js} +4 -4
- package/cjs/{fthry_index.CfGx505W.js → fthry_index.CgMWWz7f.js} +1 -1
- package/cjs/{fthry_index.BvXec6y1.js → fthry_index.Ci8dMyBp.js} +1 -1
- package/cjs/{fthry_index.B9CITASf.js → fthry_index.CkmA933O.js} +1 -1
- package/cjs/{fthry_index.BAis6iAm.js → fthry_index.CrFjXWLg.js} +3 -3
- package/cjs/{fthry_index.B5Nc9EIn.js → fthry_index.CzzIM_Es.js} +1831 -41
- package/cjs/{fthry_index.CPkoG8dL.js → fthry_index.D4rjZ-iU.js} +4 -4
- package/cjs/{fthry_index.BdfASO2V.js → fthry_index.DDjTLR_C.js} +6 -6
- package/cjs/{fthry_index.B5aSeoEj.js → fthry_index.DLnigFf3.js} +4 -4
- package/cjs/{fthry_index.Be_wKtBW.js → fthry_index.DXm31Dvn.js} +3 -3
- package/cjs/{fthry_index.BokP8_1j.js → fthry_index.DzpGyyn4.js} +5 -5
- package/cjs/{fthry_index.CoR2X1u6.js → fthry_index.E_vLB-7s.js} +8 -8
- package/cjs/{fthry_index.D35rnGh5.js → fthry_index.GeYRayLh.js} +1 -1
- package/cjs/{fthry_index.BZzFi9o3.js → fthry_index.JRP5lBfp.js} +7 -6
- package/cjs/{fthry_index.Iw93ZIvk.js → fthry_index.WDI9ExUl.js} +1 -1
- package/cjs/{fthry_input.DjhEftHE.js → fthry_input.kxr0lkUP.js} +1 -1
- package/cjs/{fthry_script.CEXFQk2h.js → fthry_script.CpqGoZRW.js} +1 -1
- package/cjs/{fthry_styles.twMOjtIt.js → fthry_styles.UURZE2St.js} +1 -1
- package/cjs/{fthry_useElementSize.CMss2qLc.js → fthry_useElementSize.B7mqB2ri.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.GHaAu-dd.js → fthry_useSalesforceSync.DFHAEpBn.js} +1 -1
- package/cjs/{fthry_webfontloader.CZxQtgFm.js → fthry_webfontloader.COsYlNwD.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/eventQueue.d.ts +26 -0
- package/cjs/utils/eventQueue.d.ts.map +1 -0
- package/cjs/utils/featheryClient/index.d.ts +6 -0
- package/cjs/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/Form/logic.d.ts.map +1 -1
- package/dist/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/dist/{fthry_FormControl.BdmdMzA3.js → fthry_FormControl.CikgGb3C.js} +1 -1
- package/dist/{fthry_InlineTooltip.DRPooJGa.js → fthry_InlineTooltip.BpfxcSEn.js} +2 -2
- package/dist/{fthry_Overlay.DSfIRMWh.js → fthry_Overlay.CJVfag7c.js} +1 -1
- package/dist/{fthry_PaymentMethodField.C2kDTnuL.js → fthry_PaymentMethodField.BpA_xhqt.js} +4 -4
- package/dist/{fthry_Placeholder.BYxBlfxe.js → fthry_Placeholder.DwCFN6a9.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.DcuxGpJk.js → fthry_ShowEyeIcon.D6nQhesH.js} +1 -1
- package/dist/{fthry_index.BF_Plcr0.js → fthry_index.B-oHlMGi.js} +2 -2
- package/dist/{fthry_index.DwzU97uW.js → fthry_index.B7VWXvgC.js} +4 -4
- package/dist/{fthry_index.BuGMpxqA.js → fthry_index.B84L3MVC.js} +1 -1
- package/dist/{fthry_index.IjpiaOO-.js → fthry_index.BAhh3Pz6.js} +1 -1
- package/dist/{fthry_index.BIkZtQJH.js → fthry_index.BEZmvsoo.js} +7 -6
- package/dist/{fthry_index.BXiUUqma.js → fthry_index.BSEfDQAc.js} +2 -2
- package/dist/{fthry_index.COrbe5-R.js → fthry_index.BsEfTy-x.js} +8 -8
- package/dist/{fthry_index.CCtbaItI.js → fthry_index.BsNCOSBE.js} +5 -5
- package/dist/{fthry_index.B-bHDKSO.js → fthry_index.Bz07r-AM.js} +1 -1
- package/dist/{fthry_index.CxYSZnO_.js → fthry_index.BzrcCLzO.js} +4 -4
- package/dist/{fthry_index.D9VkJYNy.js → fthry_index.CJKGRCG-.js} +3 -3
- package/dist/{fthry_index.Cocw39qz.js → fthry_index.D9AKkBzu.js} +1 -1
- package/dist/{fthry_index.DkSTwhvF.js → fthry_index.D9VjMJ_U.js} +1 -1
- package/dist/{fthry_index.DCKiab_1.js → fthry_index.DH2fsNWG.js} +3 -3
- package/dist/{fthry_index.DvV-_9rQ.js → fthry_index.Dgmpm9wy.js} +6 -6
- package/dist/{fthry_index.BD6daAle.js → fthry_index.DhU16s57.js} +5 -5
- package/dist/{fthry_index.C0TSdYY1.js → fthry_index.DoP7RwIP.js} +1 -1
- package/dist/{fthry_index.uw0MJJ4F.js → fthry_index.Dy4nSWZa.js} +1 -1
- package/dist/{fthry_index.D6uzSPi5.js → fthry_index.Fs86Fy9Y.js} +5 -5
- package/dist/{fthry_index.CkEibXDT.js → fthry_index.NOuMR_hq.js} +6 -6
- package/dist/{fthry_index.Ox88biXC.js → fthry_index.OHN-Iv2R.js} +1 -1
- package/dist/{fthry_index.4fMPrW44.js → fthry_index.m7CZv4YY.js} +4 -4
- package/dist/{fthry_index.Cz1sN7j0.js → fthry_index.t4v0qqgv.js} +6 -6
- package/dist/{fthry_index.DSkVpyvV.js → fthry_index.y4j9reIZ.js} +1831 -41
- package/dist/{fthry_input.BJLJlGVj.js → fthry_input.Cb2u4VEf.js} +1 -1
- package/dist/{fthry_script.BL_LvOsU.js → fthry_script.C5O1ZNQQ.js} +1 -1
- package/dist/{fthry_styles.Bgjx59v5.js → fthry_styles.DGB23xLr.js} +1 -1
- package/dist/{fthry_useElementSize.COmxJss_.js → fthry_useElementSize.CBdpS9aW.js} +1 -1
- package/dist/{fthry_useSalesforceSync.BZM69NNS.js → fthry_useSalesforceSync.Cae_lMG1.js} +1 -1
- package/dist/{fthry_webfontloader.BonjOYue.js → fthry_webfontloader.DAANkO2-.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/eventQueue.d.ts +26 -0
- package/dist/utils/eventQueue.d.ts.map +1 -0
- package/dist/utils/featheryClient/index.d.ts +6 -0
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/umd/{277.94ae8bf6190836d1dceb.js → 277.d9907ecd5dc2117c9171.js} +1 -1
- package/umd/{509.4236d4d76d2fa2ccd971.js → 509.341a4196aad912adb28d.js} +2 -2
- package/umd/{AddressField.3523efd23175117d47a5.js → AddressField.ec97334fe233830bc05b.js} +1 -1
- package/umd/index.js +1 -1
- /package/umd/{509.4236d4d76d2fa2ccd971.js.LICENSE.txt → 509.341a4196aad912adb28d.js.LICENSE.txt} +0 -0
|
@@ -655,7 +655,7 @@ function identifier (index) {
|
|
|
655
655
|
* @return {object[]}
|
|
656
656
|
*/
|
|
657
657
|
function compile (value) {
|
|
658
|
-
return dealloc(parse$
|
|
658
|
+
return dealloc(parse$2('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
/**
|
|
@@ -670,7 +670,7 @@ function compile (value) {
|
|
|
670
670
|
* @param {string[]} declarations
|
|
671
671
|
* @return {object}
|
|
672
672
|
*/
|
|
673
|
-
function parse$
|
|
673
|
+
function parse$2 (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
674
674
|
var index = 0;
|
|
675
675
|
var offset = 0;
|
|
676
676
|
var length = pseudo;
|
|
@@ -739,15 +739,15 @@ function parse$1 (value, root, parent, rule, rules, rulesets, pseudo, points, de
|
|
|
739
739
|
|
|
740
740
|
if (character === 123)
|
|
741
741
|
if (offset === 0)
|
|
742
|
-
parse$
|
|
742
|
+
parse$2(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
743
743
|
else
|
|
744
744
|
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
745
745
|
// d l m s
|
|
746
746
|
case 100: case 108: case 109: case 115:
|
|
747
|
-
parse$
|
|
747
|
+
parse$2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
748
748
|
break
|
|
749
749
|
default:
|
|
750
|
-
parse$
|
|
750
|
+
parse$2(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
|
|
@@ -35631,10 +35631,1637 @@ Parser.acorn = {
|
|
|
35631
35631
|
//
|
|
35632
35632
|
// [estree]: https://github.com/estree/estree
|
|
35633
35633
|
|
|
35634
|
-
function parse(input, options) {
|
|
35634
|
+
function parse$1(input, options) {
|
|
35635
35635
|
return Parser.parse(input, options)
|
|
35636
35636
|
}
|
|
35637
35637
|
|
|
35638
|
+
var dummyValue = "✖";
|
|
35639
|
+
|
|
35640
|
+
function isDummy(node) { return node.name === dummyValue }
|
|
35641
|
+
|
|
35642
|
+
function noop() {}
|
|
35643
|
+
|
|
35644
|
+
var LooseParser = function LooseParser(input, options) {
|
|
35645
|
+
if ( options === void 0 ) options = {};
|
|
35646
|
+
|
|
35647
|
+
this.toks = this.constructor.BaseParser.tokenizer(input, options);
|
|
35648
|
+
this.options = this.toks.options;
|
|
35649
|
+
this.input = this.toks.input;
|
|
35650
|
+
this.tok = this.last = {type: types$1.eof, start: 0, end: 0};
|
|
35651
|
+
this.tok.validateRegExpFlags = noop;
|
|
35652
|
+
this.tok.validateRegExpPattern = noop;
|
|
35653
|
+
if (this.options.locations) {
|
|
35654
|
+
var here = this.toks.curPosition();
|
|
35655
|
+
this.tok.loc = new SourceLocation(this.toks, here, here);
|
|
35656
|
+
}
|
|
35657
|
+
this.ahead = []; // Tokens ahead
|
|
35658
|
+
this.context = []; // Indentation contexted
|
|
35659
|
+
this.curIndent = 0;
|
|
35660
|
+
this.curLineStart = 0;
|
|
35661
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
35662
|
+
this.inAsync = false;
|
|
35663
|
+
this.inGenerator = false;
|
|
35664
|
+
this.inFunction = false;
|
|
35665
|
+
};
|
|
35666
|
+
|
|
35667
|
+
LooseParser.prototype.startNode = function startNode () {
|
|
35668
|
+
return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
|
|
35669
|
+
};
|
|
35670
|
+
|
|
35671
|
+
LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
|
|
35672
|
+
return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
|
|
35673
|
+
};
|
|
35674
|
+
|
|
35675
|
+
LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
|
|
35676
|
+
if (this.options.locations) {
|
|
35677
|
+
return new Node(this.toks, pos[0], pos[1])
|
|
35678
|
+
} else {
|
|
35679
|
+
return new Node(this.toks, pos)
|
|
35680
|
+
}
|
|
35681
|
+
};
|
|
35682
|
+
|
|
35683
|
+
LooseParser.prototype.finishNode = function finishNode (node, type) {
|
|
35684
|
+
node.type = type;
|
|
35685
|
+
node.end = this.last.end;
|
|
35686
|
+
if (this.options.locations)
|
|
35687
|
+
{ node.loc.end = this.last.loc.end; }
|
|
35688
|
+
if (this.options.ranges)
|
|
35689
|
+
{ node.range[1] = this.last.end; }
|
|
35690
|
+
return node
|
|
35691
|
+
};
|
|
35692
|
+
|
|
35693
|
+
LooseParser.prototype.dummyNode = function dummyNode (type) {
|
|
35694
|
+
var dummy = this.startNode();
|
|
35695
|
+
dummy.type = type;
|
|
35696
|
+
dummy.end = dummy.start;
|
|
35697
|
+
if (this.options.locations)
|
|
35698
|
+
{ dummy.loc.end = dummy.loc.start; }
|
|
35699
|
+
if (this.options.ranges)
|
|
35700
|
+
{ dummy.range[1] = dummy.start; }
|
|
35701
|
+
this.last = {type: types$1.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
|
|
35702
|
+
return dummy
|
|
35703
|
+
};
|
|
35704
|
+
|
|
35705
|
+
LooseParser.prototype.dummyIdent = function dummyIdent () {
|
|
35706
|
+
var dummy = this.dummyNode("Identifier");
|
|
35707
|
+
dummy.name = dummyValue;
|
|
35708
|
+
return dummy
|
|
35709
|
+
};
|
|
35710
|
+
|
|
35711
|
+
LooseParser.prototype.dummyString = function dummyString () {
|
|
35712
|
+
var dummy = this.dummyNode("Literal");
|
|
35713
|
+
dummy.value = dummy.raw = dummyValue;
|
|
35714
|
+
return dummy
|
|
35715
|
+
};
|
|
35716
|
+
|
|
35717
|
+
LooseParser.prototype.eat = function eat (type) {
|
|
35718
|
+
if (this.tok.type === type) {
|
|
35719
|
+
this.next();
|
|
35720
|
+
return true
|
|
35721
|
+
} else {
|
|
35722
|
+
return false
|
|
35723
|
+
}
|
|
35724
|
+
};
|
|
35725
|
+
|
|
35726
|
+
LooseParser.prototype.isContextual = function isContextual (name) {
|
|
35727
|
+
return this.tok.type === types$1.name && this.tok.value === name
|
|
35728
|
+
};
|
|
35729
|
+
|
|
35730
|
+
LooseParser.prototype.eatContextual = function eatContextual (name) {
|
|
35731
|
+
return this.tok.value === name && this.eat(types$1.name)
|
|
35732
|
+
};
|
|
35733
|
+
|
|
35734
|
+
LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
|
|
35735
|
+
return this.tok.type === types$1.eof || this.tok.type === types$1.braceR ||
|
|
35736
|
+
lineBreak.test(this.input.slice(this.last.end, this.tok.start))
|
|
35737
|
+
};
|
|
35738
|
+
|
|
35739
|
+
LooseParser.prototype.semicolon = function semicolon () {
|
|
35740
|
+
return this.eat(types$1.semi)
|
|
35741
|
+
};
|
|
35742
|
+
|
|
35743
|
+
LooseParser.prototype.expect = function expect (type) {
|
|
35744
|
+
if (this.eat(type)) { return true }
|
|
35745
|
+
for (var i = 1; i <= 2; i++) {
|
|
35746
|
+
if (this.lookAhead(i).type === type) {
|
|
35747
|
+
for (var j = 0; j < i; j++) { this.next(); }
|
|
35748
|
+
return true
|
|
35749
|
+
}
|
|
35750
|
+
}
|
|
35751
|
+
};
|
|
35752
|
+
|
|
35753
|
+
LooseParser.prototype.pushCx = function pushCx () {
|
|
35754
|
+
this.context.push(this.curIndent);
|
|
35755
|
+
};
|
|
35756
|
+
|
|
35757
|
+
LooseParser.prototype.popCx = function popCx () {
|
|
35758
|
+
this.curIndent = this.context.pop();
|
|
35759
|
+
};
|
|
35760
|
+
|
|
35761
|
+
LooseParser.prototype.lineEnd = function lineEnd (pos) {
|
|
35762
|
+
while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) { ++pos; }
|
|
35763
|
+
return pos
|
|
35764
|
+
};
|
|
35765
|
+
|
|
35766
|
+
LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
|
|
35767
|
+
for (var count = 0;; ++pos) {
|
|
35768
|
+
var ch = this.input.charCodeAt(pos);
|
|
35769
|
+
if (ch === 32) { ++count; }
|
|
35770
|
+
else if (ch === 9) { count += this.options.tabSize; }
|
|
35771
|
+
else { return count }
|
|
35772
|
+
}
|
|
35773
|
+
};
|
|
35774
|
+
|
|
35775
|
+
LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
|
|
35776
|
+
if (this.tok.type === closeTok || this.tok.type === types$1.eof) { return true }
|
|
35777
|
+
return line !== this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
|
|
35778
|
+
(!blockHeuristic || this.nextLineStart >= this.input.length ||
|
|
35779
|
+
this.indentationAfter(this.nextLineStart) < indent)
|
|
35780
|
+
};
|
|
35781
|
+
|
|
35782
|
+
LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
|
|
35783
|
+
for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
|
|
35784
|
+
var ch = this.input.charCodeAt(p);
|
|
35785
|
+
if (ch !== 9 && ch !== 32) { return false }
|
|
35786
|
+
}
|
|
35787
|
+
return true
|
|
35788
|
+
};
|
|
35789
|
+
|
|
35790
|
+
LooseParser.prototype.extend = function extend (name, f) {
|
|
35791
|
+
this[name] = f(this[name]);
|
|
35792
|
+
};
|
|
35793
|
+
|
|
35794
|
+
LooseParser.prototype.parse = function parse () {
|
|
35795
|
+
this.next();
|
|
35796
|
+
return this.parseTopLevel()
|
|
35797
|
+
};
|
|
35798
|
+
|
|
35799
|
+
LooseParser.extend = function extend () {
|
|
35800
|
+
var plugins = [], len = arguments.length;
|
|
35801
|
+
while ( len-- ) plugins[ len ] = arguments[ len ];
|
|
35802
|
+
|
|
35803
|
+
var cls = this;
|
|
35804
|
+
for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
|
|
35805
|
+
return cls
|
|
35806
|
+
};
|
|
35807
|
+
|
|
35808
|
+
LooseParser.parse = function parse (input, options) {
|
|
35809
|
+
return new this(input, options).parse()
|
|
35810
|
+
};
|
|
35811
|
+
|
|
35812
|
+
// Allows plugins to extend the base parser / tokenizer used
|
|
35813
|
+
LooseParser.BaseParser = Parser;
|
|
35814
|
+
|
|
35815
|
+
var lp$2 = LooseParser.prototype;
|
|
35816
|
+
|
|
35817
|
+
function isSpace(ch) {
|
|
35818
|
+
return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
|
|
35819
|
+
}
|
|
35820
|
+
|
|
35821
|
+
lp$2.next = function() {
|
|
35822
|
+
this.last = this.tok;
|
|
35823
|
+
if (this.ahead.length)
|
|
35824
|
+
{ this.tok = this.ahead.shift(); }
|
|
35825
|
+
else
|
|
35826
|
+
{ this.tok = this.readToken(); }
|
|
35827
|
+
|
|
35828
|
+
if (this.tok.start >= this.nextLineStart) {
|
|
35829
|
+
while (this.tok.start >= this.nextLineStart) {
|
|
35830
|
+
this.curLineStart = this.nextLineStart;
|
|
35831
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
35832
|
+
}
|
|
35833
|
+
this.curIndent = this.indentationAfter(this.curLineStart);
|
|
35834
|
+
}
|
|
35835
|
+
};
|
|
35836
|
+
|
|
35837
|
+
lp$2.readToken = function() {
|
|
35838
|
+
for (;;) {
|
|
35839
|
+
try {
|
|
35840
|
+
this.toks.next();
|
|
35841
|
+
if (this.toks.type === types$1.dot &&
|
|
35842
|
+
this.input.substr(this.toks.end, 1) === "." &&
|
|
35843
|
+
this.options.ecmaVersion >= 6) {
|
|
35844
|
+
this.toks.end++;
|
|
35845
|
+
this.toks.type = types$1.ellipsis;
|
|
35846
|
+
}
|
|
35847
|
+
return new Token(this.toks)
|
|
35848
|
+
} catch (e) {
|
|
35849
|
+
if (!(e instanceof SyntaxError)) { throw e }
|
|
35850
|
+
|
|
35851
|
+
// Try to skip some text, based on the error message, and then continue
|
|
35852
|
+
var msg = e.message, pos = e.raisedAt, replace = true;
|
|
35853
|
+
if (/unterminated/i.test(msg)) {
|
|
35854
|
+
pos = this.lineEnd(e.pos + 1);
|
|
35855
|
+
if (/string/.test(msg)) {
|
|
35856
|
+
replace = {start: e.pos, end: pos, type: types$1.string, value: this.input.slice(e.pos + 1, pos)};
|
|
35857
|
+
} else if (/regular expr/i.test(msg)) {
|
|
35858
|
+
var re = this.input.slice(e.pos, pos);
|
|
35859
|
+
try { re = new RegExp(re); } catch (e$1) { /* ignore compilation error due to new syntax */ }
|
|
35860
|
+
replace = {start: e.pos, end: pos, type: types$1.regexp, value: re};
|
|
35861
|
+
} else if (/template/.test(msg)) {
|
|
35862
|
+
replace = {
|
|
35863
|
+
start: e.pos,
|
|
35864
|
+
end: pos,
|
|
35865
|
+
type: types$1.template,
|
|
35866
|
+
value: this.input.slice(e.pos, pos)
|
|
35867
|
+
};
|
|
35868
|
+
} else {
|
|
35869
|
+
replace = false;
|
|
35870
|
+
}
|
|
35871
|
+
} else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix|numeric separator/i.test(msg)) {
|
|
35872
|
+
while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
|
|
35873
|
+
} else if (/character escape|expected hexadecimal/i.test(msg)) {
|
|
35874
|
+
while (pos < this.input.length) {
|
|
35875
|
+
var ch = this.input.charCodeAt(pos++);
|
|
35876
|
+
if (ch === 34 || ch === 39 || isNewLine(ch)) { break }
|
|
35877
|
+
}
|
|
35878
|
+
} else if (/unexpected character/i.test(msg)) {
|
|
35879
|
+
pos++;
|
|
35880
|
+
replace = false;
|
|
35881
|
+
} else if (/regular expression/i.test(msg)) {
|
|
35882
|
+
replace = true;
|
|
35883
|
+
} else {
|
|
35884
|
+
throw e
|
|
35885
|
+
}
|
|
35886
|
+
this.resetTo(pos);
|
|
35887
|
+
if (replace === true) { replace = {start: pos, end: pos, type: types$1.name, value: dummyValue}; }
|
|
35888
|
+
if (replace) {
|
|
35889
|
+
if (this.options.locations)
|
|
35890
|
+
{ replace.loc = new SourceLocation(
|
|
35891
|
+
this.toks,
|
|
35892
|
+
getLineInfo(this.input, replace.start),
|
|
35893
|
+
getLineInfo(this.input, replace.end)); }
|
|
35894
|
+
return replace
|
|
35895
|
+
}
|
|
35896
|
+
}
|
|
35897
|
+
}
|
|
35898
|
+
};
|
|
35899
|
+
|
|
35900
|
+
lp$2.resetTo = function(pos) {
|
|
35901
|
+
this.toks.pos = pos;
|
|
35902
|
+
this.toks.containsEsc = false;
|
|
35903
|
+
var ch = this.input.charAt(pos - 1);
|
|
35904
|
+
this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
|
|
35905
|
+
/[enwfd]/.test(ch) &&
|
|
35906
|
+
/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(pos - 10, pos));
|
|
35907
|
+
|
|
35908
|
+
if (this.options.locations) {
|
|
35909
|
+
this.toks.curLine = 1;
|
|
35910
|
+
this.toks.lineStart = lineBreakG.lastIndex = 0;
|
|
35911
|
+
var match;
|
|
35912
|
+
while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
|
|
35913
|
+
++this.toks.curLine;
|
|
35914
|
+
this.toks.lineStart = match.index + match[0].length;
|
|
35915
|
+
}
|
|
35916
|
+
}
|
|
35917
|
+
};
|
|
35918
|
+
|
|
35919
|
+
lp$2.lookAhead = function(n) {
|
|
35920
|
+
while (n > this.ahead.length)
|
|
35921
|
+
{ this.ahead.push(this.readToken()); }
|
|
35922
|
+
return this.ahead[n - 1]
|
|
35923
|
+
};
|
|
35924
|
+
|
|
35925
|
+
var lp$1 = LooseParser.prototype;
|
|
35926
|
+
|
|
35927
|
+
lp$1.parseTopLevel = function() {
|
|
35928
|
+
var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
|
|
35929
|
+
node.body = [];
|
|
35930
|
+
while (this.tok.type !== types$1.eof) { node.body.push(this.parseStatement()); }
|
|
35931
|
+
this.toks.adaptDirectivePrologue(node.body);
|
|
35932
|
+
this.last = this.tok;
|
|
35933
|
+
node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
|
|
35934
|
+
return this.finishNode(node, "Program")
|
|
35935
|
+
};
|
|
35936
|
+
|
|
35937
|
+
lp$1.parseStatement = function() {
|
|
35938
|
+
var starttype = this.tok.type, node = this.startNode(), kind;
|
|
35939
|
+
|
|
35940
|
+
if (this.toks.isLet()) {
|
|
35941
|
+
starttype = types$1._var;
|
|
35942
|
+
kind = "let";
|
|
35943
|
+
}
|
|
35944
|
+
|
|
35945
|
+
switch (starttype) {
|
|
35946
|
+
case types$1._break: case types$1._continue:
|
|
35947
|
+
this.next();
|
|
35948
|
+
var isBreak = starttype === types$1._break;
|
|
35949
|
+
if (this.semicolon() || this.canInsertSemicolon()) {
|
|
35950
|
+
node.label = null;
|
|
35951
|
+
} else {
|
|
35952
|
+
node.label = this.tok.type === types$1.name ? this.parseIdent() : null;
|
|
35953
|
+
this.semicolon();
|
|
35954
|
+
}
|
|
35955
|
+
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
|
|
35956
|
+
|
|
35957
|
+
case types$1._debugger:
|
|
35958
|
+
this.next();
|
|
35959
|
+
this.semicolon();
|
|
35960
|
+
return this.finishNode(node, "DebuggerStatement")
|
|
35961
|
+
|
|
35962
|
+
case types$1._do:
|
|
35963
|
+
this.next();
|
|
35964
|
+
node.body = this.parseStatement();
|
|
35965
|
+
node.test = this.eat(types$1._while) ? this.parseParenExpression() : this.dummyIdent();
|
|
35966
|
+
this.semicolon();
|
|
35967
|
+
return this.finishNode(node, "DoWhileStatement")
|
|
35968
|
+
|
|
35969
|
+
case types$1._for:
|
|
35970
|
+
this.next(); // `for` keyword
|
|
35971
|
+
var isAwait = this.options.ecmaVersion >= 9 && this.eatContextual("await");
|
|
35972
|
+
|
|
35973
|
+
this.pushCx();
|
|
35974
|
+
this.expect(types$1.parenL);
|
|
35975
|
+
if (this.tok.type === types$1.semi) { return this.parseFor(node, null) }
|
|
35976
|
+
var isLet = this.toks.isLet();
|
|
35977
|
+
var isAwaitUsing = this.toks.isAwaitUsing(true);
|
|
35978
|
+
var isUsing = !isAwaitUsing && this.toks.isUsing(true);
|
|
35979
|
+
|
|
35980
|
+
if (isLet || this.tok.type === types$1._var || this.tok.type === types$1._const || isUsing || isAwaitUsing) {
|
|
35981
|
+
var kind$1 = isLet ? "let" : isUsing ? "using" : isAwaitUsing ? "await using" : this.tok.value;
|
|
35982
|
+
var init$1 = this.startNode();
|
|
35983
|
+
if (isUsing || isAwaitUsing) {
|
|
35984
|
+
if (isAwaitUsing) { this.next(); }
|
|
35985
|
+
this.parseVar(init$1, true, kind$1);
|
|
35986
|
+
} else {
|
|
35987
|
+
init$1 = this.parseVar(init$1, true, kind$1);
|
|
35988
|
+
}
|
|
35989
|
+
|
|
35990
|
+
if (init$1.declarations.length === 1 && (this.tok.type === types$1._in || this.isContextual("of"))) {
|
|
35991
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== types$1._in) {
|
|
35992
|
+
node.await = isAwait;
|
|
35993
|
+
}
|
|
35994
|
+
return this.parseForIn(node, init$1)
|
|
35995
|
+
}
|
|
35996
|
+
return this.parseFor(node, init$1)
|
|
35997
|
+
}
|
|
35998
|
+
var init = this.parseExpression(true);
|
|
35999
|
+
if (this.tok.type === types$1._in || this.isContextual("of")) {
|
|
36000
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== types$1._in) {
|
|
36001
|
+
node.await = isAwait;
|
|
36002
|
+
}
|
|
36003
|
+
return this.parseForIn(node, this.toAssignable(init))
|
|
36004
|
+
}
|
|
36005
|
+
return this.parseFor(node, init)
|
|
36006
|
+
|
|
36007
|
+
case types$1._function:
|
|
36008
|
+
this.next();
|
|
36009
|
+
return this.parseFunction(node, true)
|
|
36010
|
+
|
|
36011
|
+
case types$1._if:
|
|
36012
|
+
this.next();
|
|
36013
|
+
node.test = this.parseParenExpression();
|
|
36014
|
+
node.consequent = this.parseStatement();
|
|
36015
|
+
node.alternate = this.eat(types$1._else) ? this.parseStatement() : null;
|
|
36016
|
+
return this.finishNode(node, "IfStatement")
|
|
36017
|
+
|
|
36018
|
+
case types$1._return:
|
|
36019
|
+
this.next();
|
|
36020
|
+
if (this.eat(types$1.semi) || this.canInsertSemicolon()) { node.argument = null; }
|
|
36021
|
+
else { node.argument = this.parseExpression(); this.semicolon(); }
|
|
36022
|
+
return this.finishNode(node, "ReturnStatement")
|
|
36023
|
+
|
|
36024
|
+
case types$1._switch:
|
|
36025
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36026
|
+
this.next();
|
|
36027
|
+
node.discriminant = this.parseParenExpression();
|
|
36028
|
+
node.cases = [];
|
|
36029
|
+
this.pushCx();
|
|
36030
|
+
this.expect(types$1.braceL);
|
|
36031
|
+
|
|
36032
|
+
var cur;
|
|
36033
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true)) {
|
|
36034
|
+
if (this.tok.type === types$1._case || this.tok.type === types$1._default) {
|
|
36035
|
+
var isCase = this.tok.type === types$1._case;
|
|
36036
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
36037
|
+
node.cases.push(cur = this.startNode());
|
|
36038
|
+
cur.consequent = [];
|
|
36039
|
+
this.next();
|
|
36040
|
+
if (isCase) { cur.test = this.parseExpression(); }
|
|
36041
|
+
else { cur.test = null; }
|
|
36042
|
+
this.expect(types$1.colon);
|
|
36043
|
+
} else {
|
|
36044
|
+
if (!cur) {
|
|
36045
|
+
node.cases.push(cur = this.startNode());
|
|
36046
|
+
cur.consequent = [];
|
|
36047
|
+
cur.test = null;
|
|
36048
|
+
}
|
|
36049
|
+
cur.consequent.push(this.parseStatement());
|
|
36050
|
+
}
|
|
36051
|
+
}
|
|
36052
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
36053
|
+
this.popCx();
|
|
36054
|
+
this.eat(types$1.braceR);
|
|
36055
|
+
return this.finishNode(node, "SwitchStatement")
|
|
36056
|
+
|
|
36057
|
+
case types$1._throw:
|
|
36058
|
+
this.next();
|
|
36059
|
+
node.argument = this.parseExpression();
|
|
36060
|
+
this.semicolon();
|
|
36061
|
+
return this.finishNode(node, "ThrowStatement")
|
|
36062
|
+
|
|
36063
|
+
case types$1._try:
|
|
36064
|
+
this.next();
|
|
36065
|
+
node.block = this.parseBlock();
|
|
36066
|
+
node.handler = null;
|
|
36067
|
+
if (this.tok.type === types$1._catch) {
|
|
36068
|
+
var clause = this.startNode();
|
|
36069
|
+
this.next();
|
|
36070
|
+
if (this.eat(types$1.parenL)) {
|
|
36071
|
+
clause.param = this.toAssignable(this.parseExprAtom(), true);
|
|
36072
|
+
this.expect(types$1.parenR);
|
|
36073
|
+
} else {
|
|
36074
|
+
clause.param = null;
|
|
36075
|
+
}
|
|
36076
|
+
clause.body = this.parseBlock();
|
|
36077
|
+
node.handler = this.finishNode(clause, "CatchClause");
|
|
36078
|
+
}
|
|
36079
|
+
node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
|
|
36080
|
+
if (!node.handler && !node.finalizer) { return node.block }
|
|
36081
|
+
return this.finishNode(node, "TryStatement")
|
|
36082
|
+
|
|
36083
|
+
case types$1._var:
|
|
36084
|
+
case types$1._const:
|
|
36085
|
+
return this.parseVar(node, false, kind || this.tok.value)
|
|
36086
|
+
|
|
36087
|
+
case types$1._while:
|
|
36088
|
+
this.next();
|
|
36089
|
+
node.test = this.parseParenExpression();
|
|
36090
|
+
node.body = this.parseStatement();
|
|
36091
|
+
return this.finishNode(node, "WhileStatement")
|
|
36092
|
+
|
|
36093
|
+
case types$1._with:
|
|
36094
|
+
this.next();
|
|
36095
|
+
node.object = this.parseParenExpression();
|
|
36096
|
+
node.body = this.parseStatement();
|
|
36097
|
+
return this.finishNode(node, "WithStatement")
|
|
36098
|
+
|
|
36099
|
+
case types$1.braceL:
|
|
36100
|
+
return this.parseBlock()
|
|
36101
|
+
|
|
36102
|
+
case types$1.semi:
|
|
36103
|
+
this.next();
|
|
36104
|
+
return this.finishNode(node, "EmptyStatement")
|
|
36105
|
+
|
|
36106
|
+
case types$1._class:
|
|
36107
|
+
return this.parseClass(true)
|
|
36108
|
+
|
|
36109
|
+
case types$1._import:
|
|
36110
|
+
if (this.options.ecmaVersion > 10) {
|
|
36111
|
+
var nextType = this.lookAhead(1).type;
|
|
36112
|
+
if (nextType === types$1.parenL || nextType === types$1.dot) {
|
|
36113
|
+
node.expression = this.parseExpression();
|
|
36114
|
+
this.semicolon();
|
|
36115
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
36116
|
+
}
|
|
36117
|
+
}
|
|
36118
|
+
|
|
36119
|
+
return this.parseImport()
|
|
36120
|
+
|
|
36121
|
+
case types$1._export:
|
|
36122
|
+
return this.parseExport()
|
|
36123
|
+
|
|
36124
|
+
default:
|
|
36125
|
+
if (this.toks.isAsyncFunction()) {
|
|
36126
|
+
this.next();
|
|
36127
|
+
this.next();
|
|
36128
|
+
return this.parseFunction(node, true, true)
|
|
36129
|
+
}
|
|
36130
|
+
|
|
36131
|
+
if (this.toks.isUsing(false)) {
|
|
36132
|
+
return this.parseVar(node, false, "using")
|
|
36133
|
+
}
|
|
36134
|
+
|
|
36135
|
+
if (this.toks.isAwaitUsing(false)) {
|
|
36136
|
+
this.next();
|
|
36137
|
+
return this.parseVar(node, false, "await using")
|
|
36138
|
+
}
|
|
36139
|
+
|
|
36140
|
+
var expr = this.parseExpression();
|
|
36141
|
+
if (isDummy(expr)) {
|
|
36142
|
+
this.next();
|
|
36143
|
+
if (this.tok.type === types$1.eof) { return this.finishNode(node, "EmptyStatement") }
|
|
36144
|
+
return this.parseStatement()
|
|
36145
|
+
} else if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
|
|
36146
|
+
node.body = this.parseStatement();
|
|
36147
|
+
node.label = expr;
|
|
36148
|
+
return this.finishNode(node, "LabeledStatement")
|
|
36149
|
+
} else {
|
|
36150
|
+
node.expression = expr;
|
|
36151
|
+
this.semicolon();
|
|
36152
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
36153
|
+
}
|
|
36154
|
+
}
|
|
36155
|
+
};
|
|
36156
|
+
|
|
36157
|
+
lp$1.parseBlock = function() {
|
|
36158
|
+
var node = this.startNode();
|
|
36159
|
+
this.pushCx();
|
|
36160
|
+
this.expect(types$1.braceL);
|
|
36161
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36162
|
+
node.body = [];
|
|
36163
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true))
|
|
36164
|
+
{ node.body.push(this.parseStatement()); }
|
|
36165
|
+
this.popCx();
|
|
36166
|
+
this.eat(types$1.braceR);
|
|
36167
|
+
return this.finishNode(node, "BlockStatement")
|
|
36168
|
+
};
|
|
36169
|
+
|
|
36170
|
+
lp$1.parseFor = function(node, init) {
|
|
36171
|
+
node.init = init;
|
|
36172
|
+
node.test = node.update = null;
|
|
36173
|
+
if (this.eat(types$1.semi) && this.tok.type !== types$1.semi) { node.test = this.parseExpression(); }
|
|
36174
|
+
if (this.eat(types$1.semi) && this.tok.type !== types$1.parenR) { node.update = this.parseExpression(); }
|
|
36175
|
+
this.popCx();
|
|
36176
|
+
this.expect(types$1.parenR);
|
|
36177
|
+
node.body = this.parseStatement();
|
|
36178
|
+
return this.finishNode(node, "ForStatement")
|
|
36179
|
+
};
|
|
36180
|
+
|
|
36181
|
+
lp$1.parseForIn = function(node, init) {
|
|
36182
|
+
var type = this.tok.type === types$1._in ? "ForInStatement" : "ForOfStatement";
|
|
36183
|
+
this.next();
|
|
36184
|
+
node.left = init;
|
|
36185
|
+
node.right = this.parseExpression();
|
|
36186
|
+
this.popCx();
|
|
36187
|
+
this.expect(types$1.parenR);
|
|
36188
|
+
node.body = this.parseStatement();
|
|
36189
|
+
return this.finishNode(node, type)
|
|
36190
|
+
};
|
|
36191
|
+
|
|
36192
|
+
lp$1.parseVar = function(node, noIn, kind) {
|
|
36193
|
+
node.kind = kind;
|
|
36194
|
+
this.next();
|
|
36195
|
+
node.declarations = [];
|
|
36196
|
+
do {
|
|
36197
|
+
var decl = this.startNode();
|
|
36198
|
+
decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent();
|
|
36199
|
+
decl.init = this.eat(types$1.eq) ? this.parseMaybeAssign(noIn) : null;
|
|
36200
|
+
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
|
36201
|
+
} while (this.eat(types$1.comma))
|
|
36202
|
+
if (!node.declarations.length) {
|
|
36203
|
+
var decl$1 = this.startNode();
|
|
36204
|
+
decl$1.id = this.dummyIdent();
|
|
36205
|
+
node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
|
|
36206
|
+
}
|
|
36207
|
+
if (!noIn) { this.semicolon(); }
|
|
36208
|
+
return this.finishNode(node, "VariableDeclaration")
|
|
36209
|
+
};
|
|
36210
|
+
|
|
36211
|
+
lp$1.parseClass = function(isStatement) {
|
|
36212
|
+
var node = this.startNode();
|
|
36213
|
+
this.next();
|
|
36214
|
+
if (this.tok.type === types$1.name) { node.id = this.parseIdent(); }
|
|
36215
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
36216
|
+
else { node.id = null; }
|
|
36217
|
+
node.superClass = this.eat(types$1._extends) ? this.parseExpression() : null;
|
|
36218
|
+
node.body = this.startNode();
|
|
36219
|
+
node.body.body = [];
|
|
36220
|
+
this.pushCx();
|
|
36221
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
36222
|
+
this.eat(types$1.braceL);
|
|
36223
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
36224
|
+
while (!this.closes(types$1.braceR, indent, line)) {
|
|
36225
|
+
var element = this.parseClassElement();
|
|
36226
|
+
if (element) { node.body.body.push(element); }
|
|
36227
|
+
}
|
|
36228
|
+
this.popCx();
|
|
36229
|
+
if (!this.eat(types$1.braceR)) {
|
|
36230
|
+
// If there is no closing brace, make the node span to the start
|
|
36231
|
+
// of the next token (this is useful for Tern)
|
|
36232
|
+
this.last.end = this.tok.start;
|
|
36233
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
36234
|
+
}
|
|
36235
|
+
this.semicolon();
|
|
36236
|
+
this.finishNode(node.body, "ClassBody");
|
|
36237
|
+
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
|
|
36238
|
+
};
|
|
36239
|
+
|
|
36240
|
+
lp$1.parseClassElement = function() {
|
|
36241
|
+
if (this.eat(types$1.semi)) { return null }
|
|
36242
|
+
|
|
36243
|
+
var ref = this.options;
|
|
36244
|
+
var ecmaVersion = ref.ecmaVersion;
|
|
36245
|
+
var locations = ref.locations;
|
|
36246
|
+
var indent = this.curIndent;
|
|
36247
|
+
var line = this.curLineStart;
|
|
36248
|
+
var node = this.startNode();
|
|
36249
|
+
var keyName = "";
|
|
36250
|
+
var isGenerator = false;
|
|
36251
|
+
var isAsync = false;
|
|
36252
|
+
var kind = "method";
|
|
36253
|
+
var isStatic = false;
|
|
36254
|
+
|
|
36255
|
+
if (this.eatContextual("static")) {
|
|
36256
|
+
// Parse static init block
|
|
36257
|
+
if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
|
|
36258
|
+
this.parseClassStaticBlock(node);
|
|
36259
|
+
return node
|
|
36260
|
+
}
|
|
36261
|
+
if (this.isClassElementNameStart() || this.toks.type === types$1.star) {
|
|
36262
|
+
isStatic = true;
|
|
36263
|
+
} else {
|
|
36264
|
+
keyName = "static";
|
|
36265
|
+
}
|
|
36266
|
+
}
|
|
36267
|
+
node.static = isStatic;
|
|
36268
|
+
if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
|
|
36269
|
+
if ((this.isClassElementNameStart() || this.toks.type === types$1.star) && !this.canInsertSemicolon()) {
|
|
36270
|
+
isAsync = true;
|
|
36271
|
+
} else {
|
|
36272
|
+
keyName = "async";
|
|
36273
|
+
}
|
|
36274
|
+
}
|
|
36275
|
+
if (!keyName) {
|
|
36276
|
+
isGenerator = this.eat(types$1.star);
|
|
36277
|
+
var lastValue = this.toks.value;
|
|
36278
|
+
if (this.eatContextual("get") || this.eatContextual("set")) {
|
|
36279
|
+
if (this.isClassElementNameStart()) {
|
|
36280
|
+
kind = lastValue;
|
|
36281
|
+
} else {
|
|
36282
|
+
keyName = lastValue;
|
|
36283
|
+
}
|
|
36284
|
+
}
|
|
36285
|
+
}
|
|
36286
|
+
|
|
36287
|
+
// Parse element name
|
|
36288
|
+
if (keyName) {
|
|
36289
|
+
// 'async', 'get', 'set', or 'static' were not a keyword contextually.
|
|
36290
|
+
// The last token is any of those. Make it the element name.
|
|
36291
|
+
node.computed = false;
|
|
36292
|
+
node.key = this.startNodeAt(locations ? [this.toks.lastTokStart, this.toks.lastTokStartLoc] : this.toks.lastTokStart);
|
|
36293
|
+
node.key.name = keyName;
|
|
36294
|
+
this.finishNode(node.key, "Identifier");
|
|
36295
|
+
} else {
|
|
36296
|
+
this.parseClassElementName(node);
|
|
36297
|
+
|
|
36298
|
+
// From https://github.com/acornjs/acorn/blob/7deba41118d6384a2c498c61176b3cf434f69590/acorn-loose/src/statement.js#L291
|
|
36299
|
+
// Skip broken stuff.
|
|
36300
|
+
if (isDummy(node.key)) {
|
|
36301
|
+
if (isDummy(this.parseMaybeAssign())) { this.next(); }
|
|
36302
|
+
this.eat(types$1.comma);
|
|
36303
|
+
return null
|
|
36304
|
+
}
|
|
36305
|
+
}
|
|
36306
|
+
|
|
36307
|
+
// Parse element value
|
|
36308
|
+
if (ecmaVersion < 13 || this.toks.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
|
|
36309
|
+
// Method
|
|
36310
|
+
var isConstructor =
|
|
36311
|
+
!node.computed &&
|
|
36312
|
+
!node.static &&
|
|
36313
|
+
!isGenerator &&
|
|
36314
|
+
!isAsync &&
|
|
36315
|
+
kind === "method" && (
|
|
36316
|
+
node.key.type === "Identifier" && node.key.name === "constructor" ||
|
|
36317
|
+
node.key.type === "Literal" && node.key.value === "constructor"
|
|
36318
|
+
);
|
|
36319
|
+
node.kind = isConstructor ? "constructor" : kind;
|
|
36320
|
+
node.value = this.parseMethod(isGenerator, isAsync);
|
|
36321
|
+
this.finishNode(node, "MethodDefinition");
|
|
36322
|
+
} else {
|
|
36323
|
+
// Field
|
|
36324
|
+
if (this.eat(types$1.eq)) {
|
|
36325
|
+
if (this.curLineStart !== line && this.curIndent <= indent && this.tokenStartsLine()) {
|
|
36326
|
+
// Estimated the next line is the next class element by indentations.
|
|
36327
|
+
node.value = null;
|
|
36328
|
+
} else {
|
|
36329
|
+
var oldInAsync = this.inAsync;
|
|
36330
|
+
var oldInGenerator = this.inGenerator;
|
|
36331
|
+
this.inAsync = false;
|
|
36332
|
+
this.inGenerator = false;
|
|
36333
|
+
node.value = this.parseMaybeAssign();
|
|
36334
|
+
this.inAsync = oldInAsync;
|
|
36335
|
+
this.inGenerator = oldInGenerator;
|
|
36336
|
+
}
|
|
36337
|
+
} else {
|
|
36338
|
+
node.value = null;
|
|
36339
|
+
}
|
|
36340
|
+
this.semicolon();
|
|
36341
|
+
this.finishNode(node, "PropertyDefinition");
|
|
36342
|
+
}
|
|
36343
|
+
|
|
36344
|
+
return node
|
|
36345
|
+
};
|
|
36346
|
+
|
|
36347
|
+
lp$1.parseClassStaticBlock = function(node) {
|
|
36348
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36349
|
+
node.body = [];
|
|
36350
|
+
this.pushCx();
|
|
36351
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true))
|
|
36352
|
+
{ node.body.push(this.parseStatement()); }
|
|
36353
|
+
this.popCx();
|
|
36354
|
+
this.eat(types$1.braceR);
|
|
36355
|
+
|
|
36356
|
+
return this.finishNode(node, "StaticBlock")
|
|
36357
|
+
};
|
|
36358
|
+
|
|
36359
|
+
lp$1.isClassElementNameStart = function() {
|
|
36360
|
+
return this.toks.isClassElementNameStart()
|
|
36361
|
+
};
|
|
36362
|
+
|
|
36363
|
+
lp$1.parseClassElementName = function(element) {
|
|
36364
|
+
if (this.toks.type === types$1.privateId) {
|
|
36365
|
+
element.computed = false;
|
|
36366
|
+
element.key = this.parsePrivateIdent();
|
|
36367
|
+
} else {
|
|
36368
|
+
this.parsePropertyName(element);
|
|
36369
|
+
}
|
|
36370
|
+
};
|
|
36371
|
+
|
|
36372
|
+
lp$1.parseFunction = function(node, isStatement, isAsync) {
|
|
36373
|
+
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
36374
|
+
this.initFunction(node);
|
|
36375
|
+
if (this.options.ecmaVersion >= 6) {
|
|
36376
|
+
node.generator = this.eat(types$1.star);
|
|
36377
|
+
}
|
|
36378
|
+
if (this.options.ecmaVersion >= 8) {
|
|
36379
|
+
node.async = !!isAsync;
|
|
36380
|
+
}
|
|
36381
|
+
if (this.tok.type === types$1.name) { node.id = this.parseIdent(); }
|
|
36382
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
36383
|
+
this.inAsync = node.async;
|
|
36384
|
+
this.inGenerator = node.generator;
|
|
36385
|
+
this.inFunction = true;
|
|
36386
|
+
node.params = this.parseFunctionParams();
|
|
36387
|
+
node.body = this.parseBlock();
|
|
36388
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
36389
|
+
this.inAsync = oldInAsync;
|
|
36390
|
+
this.inGenerator = oldInGenerator;
|
|
36391
|
+
this.inFunction = oldInFunction;
|
|
36392
|
+
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
|
|
36393
|
+
};
|
|
36394
|
+
|
|
36395
|
+
lp$1.parseExport = function() {
|
|
36396
|
+
var node = this.startNode();
|
|
36397
|
+
this.next();
|
|
36398
|
+
if (this.eat(types$1.star)) {
|
|
36399
|
+
if (this.options.ecmaVersion >= 11) {
|
|
36400
|
+
if (this.eatContextual("as")) {
|
|
36401
|
+
node.exported = this.parseExprAtom();
|
|
36402
|
+
} else {
|
|
36403
|
+
node.exported = null;
|
|
36404
|
+
}
|
|
36405
|
+
}
|
|
36406
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
|
|
36407
|
+
if (this.options.ecmaVersion >= 16)
|
|
36408
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36409
|
+
this.semicolon();
|
|
36410
|
+
return this.finishNode(node, "ExportAllDeclaration")
|
|
36411
|
+
}
|
|
36412
|
+
if (this.eat(types$1._default)) {
|
|
36413
|
+
// export default (function foo() {}) // This is FunctionExpression.
|
|
36414
|
+
var isAsync;
|
|
36415
|
+
if (this.tok.type === types$1._function || (isAsync = this.toks.isAsyncFunction())) {
|
|
36416
|
+
var fNode = this.startNode();
|
|
36417
|
+
this.next();
|
|
36418
|
+
if (isAsync) { this.next(); }
|
|
36419
|
+
node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
|
|
36420
|
+
} else if (this.tok.type === types$1._class) {
|
|
36421
|
+
node.declaration = this.parseClass("nullableID");
|
|
36422
|
+
} else {
|
|
36423
|
+
node.declaration = this.parseMaybeAssign();
|
|
36424
|
+
this.semicolon();
|
|
36425
|
+
}
|
|
36426
|
+
return this.finishNode(node, "ExportDefaultDeclaration")
|
|
36427
|
+
}
|
|
36428
|
+
if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
|
|
36429
|
+
node.declaration = this.parseStatement();
|
|
36430
|
+
node.specifiers = [];
|
|
36431
|
+
node.source = null;
|
|
36432
|
+
} else {
|
|
36433
|
+
node.declaration = null;
|
|
36434
|
+
node.specifiers = this.parseExportSpecifierList();
|
|
36435
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
|
|
36436
|
+
if (this.options.ecmaVersion >= 16)
|
|
36437
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36438
|
+
this.semicolon();
|
|
36439
|
+
}
|
|
36440
|
+
return this.finishNode(node, "ExportNamedDeclaration")
|
|
36441
|
+
};
|
|
36442
|
+
|
|
36443
|
+
lp$1.parseImport = function() {
|
|
36444
|
+
var node = this.startNode();
|
|
36445
|
+
this.next();
|
|
36446
|
+
if (this.tok.type === types$1.string) {
|
|
36447
|
+
node.specifiers = [];
|
|
36448
|
+
node.source = this.parseExprAtom();
|
|
36449
|
+
} else {
|
|
36450
|
+
var elt;
|
|
36451
|
+
if (this.tok.type === types$1.name && this.tok.value !== "from") {
|
|
36452
|
+
elt = this.startNode();
|
|
36453
|
+
elt.local = this.parseIdent();
|
|
36454
|
+
this.finishNode(elt, "ImportDefaultSpecifier");
|
|
36455
|
+
this.eat(types$1.comma);
|
|
36456
|
+
}
|
|
36457
|
+
node.specifiers = this.parseImportSpecifiers();
|
|
36458
|
+
node.source = this.eatContextual("from") && this.tok.type === types$1.string ? this.parseExprAtom() : this.dummyString();
|
|
36459
|
+
if (elt) { node.specifiers.unshift(elt); }
|
|
36460
|
+
}
|
|
36461
|
+
if (this.options.ecmaVersion >= 16)
|
|
36462
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36463
|
+
this.semicolon();
|
|
36464
|
+
return this.finishNode(node, "ImportDeclaration")
|
|
36465
|
+
};
|
|
36466
|
+
|
|
36467
|
+
lp$1.parseImportSpecifiers = function() {
|
|
36468
|
+
var elts = [];
|
|
36469
|
+
if (this.tok.type === types$1.star) {
|
|
36470
|
+
var elt = this.startNode();
|
|
36471
|
+
this.next();
|
|
36472
|
+
elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
|
36473
|
+
elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
|
|
36474
|
+
} else {
|
|
36475
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36476
|
+
this.pushCx();
|
|
36477
|
+
this.eat(types$1.braceL);
|
|
36478
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36479
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36480
|
+
var elt$1 = this.startNode();
|
|
36481
|
+
if (this.eat(types$1.star)) {
|
|
36482
|
+
elt$1.local = this.eatContextual("as") ? this.parseModuleExportName() : this.dummyIdent();
|
|
36483
|
+
this.finishNode(elt$1, "ImportNamespaceSpecifier");
|
|
36484
|
+
} else {
|
|
36485
|
+
if (this.isContextual("from")) { break }
|
|
36486
|
+
elt$1.imported = this.parseModuleExportName();
|
|
36487
|
+
if (isDummy(elt$1.imported)) { break }
|
|
36488
|
+
elt$1.local = this.eatContextual("as") ? this.parseModuleExportName() : elt$1.imported;
|
|
36489
|
+
this.finishNode(elt$1, "ImportSpecifier");
|
|
36490
|
+
}
|
|
36491
|
+
elts.push(elt$1);
|
|
36492
|
+
this.eat(types$1.comma);
|
|
36493
|
+
}
|
|
36494
|
+
this.eat(types$1.braceR);
|
|
36495
|
+
this.popCx();
|
|
36496
|
+
}
|
|
36497
|
+
return elts
|
|
36498
|
+
};
|
|
36499
|
+
|
|
36500
|
+
lp$1.parseWithClause = function() {
|
|
36501
|
+
var nodes = [];
|
|
36502
|
+
if (!this.eat(types$1._with)) {
|
|
36503
|
+
return nodes
|
|
36504
|
+
}
|
|
36505
|
+
|
|
36506
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36507
|
+
this.pushCx();
|
|
36508
|
+
this.eat(types$1.braceL);
|
|
36509
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36510
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36511
|
+
var attr = this.startNode();
|
|
36512
|
+
attr.key = this.tok.type === types$1.string ? this.parseExprAtom() : this.parseIdent();
|
|
36513
|
+
if (this.eat(types$1.colon)) {
|
|
36514
|
+
if (this.tok.type === types$1.string)
|
|
36515
|
+
{ attr.value = this.parseExprAtom(); }
|
|
36516
|
+
else { attr.value = this.dummyString(); }
|
|
36517
|
+
} else {
|
|
36518
|
+
if (isDummy(attr.key)) { break }
|
|
36519
|
+
if (this.tok.type === types$1.string)
|
|
36520
|
+
{ attr.value = this.parseExprAtom(); }
|
|
36521
|
+
else { break }
|
|
36522
|
+
}
|
|
36523
|
+
nodes.push(this.finishNode(attr, "ImportAttribute"));
|
|
36524
|
+
this.eat(types$1.comma);
|
|
36525
|
+
}
|
|
36526
|
+
this.eat(types$1.braceR);
|
|
36527
|
+
this.popCx();
|
|
36528
|
+
return nodes
|
|
36529
|
+
};
|
|
36530
|
+
|
|
36531
|
+
lp$1.parseExportSpecifierList = function() {
|
|
36532
|
+
var elts = [];
|
|
36533
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36534
|
+
this.pushCx();
|
|
36535
|
+
this.eat(types$1.braceL);
|
|
36536
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36537
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36538
|
+
if (this.isContextual("from")) { break }
|
|
36539
|
+
var elt = this.startNode();
|
|
36540
|
+
elt.local = this.parseModuleExportName();
|
|
36541
|
+
if (isDummy(elt.local)) { break }
|
|
36542
|
+
elt.exported = this.eatContextual("as") ? this.parseModuleExportName() : elt.local;
|
|
36543
|
+
this.finishNode(elt, "ExportSpecifier");
|
|
36544
|
+
elts.push(elt);
|
|
36545
|
+
this.eat(types$1.comma);
|
|
36546
|
+
}
|
|
36547
|
+
this.eat(types$1.braceR);
|
|
36548
|
+
this.popCx();
|
|
36549
|
+
return elts
|
|
36550
|
+
};
|
|
36551
|
+
|
|
36552
|
+
lp$1.parseModuleExportName = function() {
|
|
36553
|
+
return this.options.ecmaVersion >= 13 && this.tok.type === types$1.string
|
|
36554
|
+
? this.parseExprAtom()
|
|
36555
|
+
: this.parseIdent()
|
|
36556
|
+
};
|
|
36557
|
+
|
|
36558
|
+
var lp = LooseParser.prototype;
|
|
36559
|
+
|
|
36560
|
+
lp.checkLVal = function(expr) {
|
|
36561
|
+
if (!expr) { return expr }
|
|
36562
|
+
switch (expr.type) {
|
|
36563
|
+
case "Identifier":
|
|
36564
|
+
case "MemberExpression":
|
|
36565
|
+
return expr
|
|
36566
|
+
|
|
36567
|
+
case "ParenthesizedExpression":
|
|
36568
|
+
expr.expression = this.checkLVal(expr.expression);
|
|
36569
|
+
return expr
|
|
36570
|
+
|
|
36571
|
+
default:
|
|
36572
|
+
return this.dummyIdent()
|
|
36573
|
+
}
|
|
36574
|
+
};
|
|
36575
|
+
|
|
36576
|
+
lp.parseExpression = function(noIn) {
|
|
36577
|
+
var start = this.storeCurrentPos();
|
|
36578
|
+
var expr = this.parseMaybeAssign(noIn);
|
|
36579
|
+
if (this.tok.type === types$1.comma) {
|
|
36580
|
+
var node = this.startNodeAt(start);
|
|
36581
|
+
node.expressions = [expr];
|
|
36582
|
+
while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(noIn)); }
|
|
36583
|
+
return this.finishNode(node, "SequenceExpression")
|
|
36584
|
+
}
|
|
36585
|
+
return expr
|
|
36586
|
+
};
|
|
36587
|
+
|
|
36588
|
+
lp.parseParenExpression = function() {
|
|
36589
|
+
this.pushCx();
|
|
36590
|
+
this.expect(types$1.parenL);
|
|
36591
|
+
var val = this.parseExpression();
|
|
36592
|
+
this.popCx();
|
|
36593
|
+
this.expect(types$1.parenR);
|
|
36594
|
+
return val
|
|
36595
|
+
};
|
|
36596
|
+
|
|
36597
|
+
lp.parseMaybeAssign = function(noIn) {
|
|
36598
|
+
// `yield` should be an identifier reference if it's not in generator functions.
|
|
36599
|
+
if (this.inGenerator && this.toks.isContextual("yield")) {
|
|
36600
|
+
var node = this.startNode();
|
|
36601
|
+
this.next();
|
|
36602
|
+
if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type !== types$1.star && !this.tok.type.startsExpr)) {
|
|
36603
|
+
node.delegate = false;
|
|
36604
|
+
node.argument = null;
|
|
36605
|
+
} else {
|
|
36606
|
+
node.delegate = this.eat(types$1.star);
|
|
36607
|
+
node.argument = this.parseMaybeAssign();
|
|
36608
|
+
}
|
|
36609
|
+
return this.finishNode(node, "YieldExpression")
|
|
36610
|
+
}
|
|
36611
|
+
|
|
36612
|
+
var start = this.storeCurrentPos();
|
|
36613
|
+
var left = this.parseMaybeConditional(noIn);
|
|
36614
|
+
if (this.tok.type.isAssign) {
|
|
36615
|
+
var node$1 = this.startNodeAt(start);
|
|
36616
|
+
node$1.operator = this.tok.value;
|
|
36617
|
+
node$1.left = this.tok.type === types$1.eq ? this.toAssignable(left) : this.checkLVal(left);
|
|
36618
|
+
this.next();
|
|
36619
|
+
node$1.right = this.parseMaybeAssign(noIn);
|
|
36620
|
+
return this.finishNode(node$1, "AssignmentExpression")
|
|
36621
|
+
}
|
|
36622
|
+
return left
|
|
36623
|
+
};
|
|
36624
|
+
|
|
36625
|
+
lp.parseMaybeConditional = function(noIn) {
|
|
36626
|
+
var start = this.storeCurrentPos();
|
|
36627
|
+
var expr = this.parseExprOps(noIn);
|
|
36628
|
+
if (this.eat(types$1.question)) {
|
|
36629
|
+
var node = this.startNodeAt(start);
|
|
36630
|
+
node.test = expr;
|
|
36631
|
+
node.consequent = this.parseMaybeAssign();
|
|
36632
|
+
node.alternate = this.expect(types$1.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
|
|
36633
|
+
return this.finishNode(node, "ConditionalExpression")
|
|
36634
|
+
}
|
|
36635
|
+
return expr
|
|
36636
|
+
};
|
|
36637
|
+
|
|
36638
|
+
lp.parseExprOps = function(noIn) {
|
|
36639
|
+
var start = this.storeCurrentPos();
|
|
36640
|
+
var indent = this.curIndent, line = this.curLineStart;
|
|
36641
|
+
return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
|
|
36642
|
+
};
|
|
36643
|
+
|
|
36644
|
+
lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
|
|
36645
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) { return left }
|
|
36646
|
+
var prec = this.tok.type.binop;
|
|
36647
|
+
if (prec != null && (!noIn || this.tok.type !== types$1._in)) {
|
|
36648
|
+
if (prec > minPrec) {
|
|
36649
|
+
var node = this.startNodeAt(start);
|
|
36650
|
+
node.left = left;
|
|
36651
|
+
node.operator = this.tok.value;
|
|
36652
|
+
this.next();
|
|
36653
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) {
|
|
36654
|
+
node.right = this.dummyIdent();
|
|
36655
|
+
} else {
|
|
36656
|
+
var rightStart = this.storeCurrentPos();
|
|
36657
|
+
node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
|
|
36658
|
+
}
|
|
36659
|
+
this.finishNode(node, /&&|\|\||\?\?/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
|
36660
|
+
return this.parseExprOp(node, start, minPrec, noIn, indent, line)
|
|
36661
|
+
}
|
|
36662
|
+
}
|
|
36663
|
+
return left
|
|
36664
|
+
};
|
|
36665
|
+
|
|
36666
|
+
lp.parseMaybeUnary = function(sawUnary) {
|
|
36667
|
+
var start = this.storeCurrentPos(), expr;
|
|
36668
|
+
if (this.options.ecmaVersion >= 8 && this.toks.isContextual("await") &&
|
|
36669
|
+
(this.inAsync || (this.toks.inModule && this.options.ecmaVersion >= 13) ||
|
|
36670
|
+
(!this.inFunction && this.options.allowAwaitOutsideFunction))) {
|
|
36671
|
+
expr = this.parseAwait();
|
|
36672
|
+
sawUnary = true;
|
|
36673
|
+
} else if (this.tok.type.prefix) {
|
|
36674
|
+
var node = this.startNode(), update = this.tok.type === types$1.incDec;
|
|
36675
|
+
if (!update) { sawUnary = true; }
|
|
36676
|
+
node.operator = this.tok.value;
|
|
36677
|
+
node.prefix = true;
|
|
36678
|
+
this.next();
|
|
36679
|
+
node.argument = this.parseMaybeUnary(true);
|
|
36680
|
+
if (update) { node.argument = this.checkLVal(node.argument); }
|
|
36681
|
+
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
|
36682
|
+
} else if (this.tok.type === types$1.ellipsis) {
|
|
36683
|
+
var node$1 = this.startNode();
|
|
36684
|
+
this.next();
|
|
36685
|
+
node$1.argument = this.parseMaybeUnary(sawUnary);
|
|
36686
|
+
expr = this.finishNode(node$1, "SpreadElement");
|
|
36687
|
+
} else if (!sawUnary && this.tok.type === types$1.privateId) {
|
|
36688
|
+
expr = this.parsePrivateIdent();
|
|
36689
|
+
} else {
|
|
36690
|
+
expr = this.parseExprSubscripts();
|
|
36691
|
+
while (this.tok.type.postfix && !this.canInsertSemicolon()) {
|
|
36692
|
+
var node$2 = this.startNodeAt(start);
|
|
36693
|
+
node$2.operator = this.tok.value;
|
|
36694
|
+
node$2.prefix = false;
|
|
36695
|
+
node$2.argument = this.checkLVal(expr);
|
|
36696
|
+
this.next();
|
|
36697
|
+
expr = this.finishNode(node$2, "UpdateExpression");
|
|
36698
|
+
}
|
|
36699
|
+
}
|
|
36700
|
+
|
|
36701
|
+
if (!sawUnary && this.eat(types$1.starstar)) {
|
|
36702
|
+
var node$3 = this.startNodeAt(start);
|
|
36703
|
+
node$3.operator = "**";
|
|
36704
|
+
node$3.left = expr;
|
|
36705
|
+
node$3.right = this.parseMaybeUnary(false);
|
|
36706
|
+
return this.finishNode(node$3, "BinaryExpression")
|
|
36707
|
+
}
|
|
36708
|
+
|
|
36709
|
+
return expr
|
|
36710
|
+
};
|
|
36711
|
+
|
|
36712
|
+
lp.parseExprSubscripts = function() {
|
|
36713
|
+
var start = this.storeCurrentPos();
|
|
36714
|
+
return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
|
|
36715
|
+
};
|
|
36716
|
+
|
|
36717
|
+
lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
|
|
36718
|
+
var optionalSupported = this.options.ecmaVersion >= 11;
|
|
36719
|
+
var optionalChained = false;
|
|
36720
|
+
for (;;) {
|
|
36721
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine()) {
|
|
36722
|
+
if (this.tok.type === types$1.dot && this.curIndent === startIndent)
|
|
36723
|
+
{ --startIndent; }
|
|
36724
|
+
else
|
|
36725
|
+
{ break }
|
|
36726
|
+
}
|
|
36727
|
+
|
|
36728
|
+
var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
|
36729
|
+
var optional = optionalSupported && this.eat(types$1.questionDot);
|
|
36730
|
+
if (optional) {
|
|
36731
|
+
optionalChained = true;
|
|
36732
|
+
}
|
|
36733
|
+
|
|
36734
|
+
if ((optional && this.tok.type !== types$1.parenL && this.tok.type !== types$1.bracketL && this.tok.type !== types$1.backQuote) || this.eat(types$1.dot)) {
|
|
36735
|
+
var node = this.startNodeAt(start);
|
|
36736
|
+
node.object = base;
|
|
36737
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine())
|
|
36738
|
+
{ node.property = this.dummyIdent(); }
|
|
36739
|
+
else
|
|
36740
|
+
{ node.property = this.parsePropertyAccessor() || this.dummyIdent(); }
|
|
36741
|
+
node.computed = false;
|
|
36742
|
+
if (optionalSupported) {
|
|
36743
|
+
node.optional = optional;
|
|
36744
|
+
}
|
|
36745
|
+
base = this.finishNode(node, "MemberExpression");
|
|
36746
|
+
} else if (this.tok.type === types$1.bracketL) {
|
|
36747
|
+
this.pushCx();
|
|
36748
|
+
this.next();
|
|
36749
|
+
var node$1 = this.startNodeAt(start);
|
|
36750
|
+
node$1.object = base;
|
|
36751
|
+
node$1.property = this.parseExpression();
|
|
36752
|
+
node$1.computed = true;
|
|
36753
|
+
if (optionalSupported) {
|
|
36754
|
+
node$1.optional = optional;
|
|
36755
|
+
}
|
|
36756
|
+
this.popCx();
|
|
36757
|
+
this.expect(types$1.bracketR);
|
|
36758
|
+
base = this.finishNode(node$1, "MemberExpression");
|
|
36759
|
+
} else if (!noCalls && this.tok.type === types$1.parenL) {
|
|
36760
|
+
var exprList = this.parseExprList(types$1.parenR);
|
|
36761
|
+
if (maybeAsyncArrow && this.eat(types$1.arrow))
|
|
36762
|
+
{ return this.parseArrowExpression(this.startNodeAt(start), exprList, true) }
|
|
36763
|
+
var node$2 = this.startNodeAt(start);
|
|
36764
|
+
node$2.callee = base;
|
|
36765
|
+
node$2.arguments = exprList;
|
|
36766
|
+
if (optionalSupported) {
|
|
36767
|
+
node$2.optional = optional;
|
|
36768
|
+
}
|
|
36769
|
+
base = this.finishNode(node$2, "CallExpression");
|
|
36770
|
+
} else if (this.tok.type === types$1.backQuote) {
|
|
36771
|
+
var node$3 = this.startNodeAt(start);
|
|
36772
|
+
node$3.tag = base;
|
|
36773
|
+
node$3.quasi = this.parseTemplate();
|
|
36774
|
+
base = this.finishNode(node$3, "TaggedTemplateExpression");
|
|
36775
|
+
} else {
|
|
36776
|
+
break
|
|
36777
|
+
}
|
|
36778
|
+
}
|
|
36779
|
+
|
|
36780
|
+
if (optionalChained) {
|
|
36781
|
+
var chainNode = this.startNodeAt(start);
|
|
36782
|
+
chainNode.expression = base;
|
|
36783
|
+
base = this.finishNode(chainNode, "ChainExpression");
|
|
36784
|
+
}
|
|
36785
|
+
return base
|
|
36786
|
+
};
|
|
36787
|
+
|
|
36788
|
+
lp.parseExprAtom = function() {
|
|
36789
|
+
var node;
|
|
36790
|
+
switch (this.tok.type) {
|
|
36791
|
+
case types$1._this:
|
|
36792
|
+
case types$1._super:
|
|
36793
|
+
var type = this.tok.type === types$1._this ? "ThisExpression" : "Super";
|
|
36794
|
+
node = this.startNode();
|
|
36795
|
+
this.next();
|
|
36796
|
+
return this.finishNode(node, type)
|
|
36797
|
+
|
|
36798
|
+
case types$1.name:
|
|
36799
|
+
var start = this.storeCurrentPos();
|
|
36800
|
+
var id = this.parseIdent();
|
|
36801
|
+
var isAsync = false;
|
|
36802
|
+
if (id.name === "async" && !this.canInsertSemicolon()) {
|
|
36803
|
+
if (this.eat(types$1._function)) {
|
|
36804
|
+
this.toks.overrideContext(types.f_expr);
|
|
36805
|
+
return this.parseFunction(this.startNodeAt(start), false, true)
|
|
36806
|
+
}
|
|
36807
|
+
if (this.tok.type === types$1.name) {
|
|
36808
|
+
id = this.parseIdent();
|
|
36809
|
+
isAsync = true;
|
|
36810
|
+
}
|
|
36811
|
+
}
|
|
36812
|
+
return this.eat(types$1.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
|
|
36813
|
+
|
|
36814
|
+
case types$1.regexp:
|
|
36815
|
+
node = this.startNode();
|
|
36816
|
+
var val = this.tok.value;
|
|
36817
|
+
node.regex = {pattern: val.pattern, flags: val.flags};
|
|
36818
|
+
node.value = val.value;
|
|
36819
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
36820
|
+
this.next();
|
|
36821
|
+
return this.finishNode(node, "Literal")
|
|
36822
|
+
|
|
36823
|
+
case types$1.num: case types$1.string:
|
|
36824
|
+
node = this.startNode();
|
|
36825
|
+
node.value = this.tok.value;
|
|
36826
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
36827
|
+
if (this.tok.type === types$1.num && node.raw.charCodeAt(node.raw.length - 1) === 110)
|
|
36828
|
+
{ node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, ""); }
|
|
36829
|
+
this.next();
|
|
36830
|
+
return this.finishNode(node, "Literal")
|
|
36831
|
+
|
|
36832
|
+
case types$1._null: case types$1._true: case types$1._false:
|
|
36833
|
+
node = this.startNode();
|
|
36834
|
+
node.value = this.tok.type === types$1._null ? null : this.tok.type === types$1._true;
|
|
36835
|
+
node.raw = this.tok.type.keyword;
|
|
36836
|
+
this.next();
|
|
36837
|
+
return this.finishNode(node, "Literal")
|
|
36838
|
+
|
|
36839
|
+
case types$1.parenL:
|
|
36840
|
+
var parenStart = this.storeCurrentPos();
|
|
36841
|
+
this.next();
|
|
36842
|
+
var inner = this.parseExpression();
|
|
36843
|
+
this.expect(types$1.parenR);
|
|
36844
|
+
if (this.eat(types$1.arrow)) {
|
|
36845
|
+
// (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
|
|
36846
|
+
var params = inner.expressions || [inner];
|
|
36847
|
+
if (params.length && isDummy(params[params.length - 1]))
|
|
36848
|
+
{ params.pop(); }
|
|
36849
|
+
return this.parseArrowExpression(this.startNodeAt(parenStart), params)
|
|
36850
|
+
}
|
|
36851
|
+
if (this.options.preserveParens) {
|
|
36852
|
+
var par = this.startNodeAt(parenStart);
|
|
36853
|
+
par.expression = inner;
|
|
36854
|
+
inner = this.finishNode(par, "ParenthesizedExpression");
|
|
36855
|
+
}
|
|
36856
|
+
return inner
|
|
36857
|
+
|
|
36858
|
+
case types$1.bracketL:
|
|
36859
|
+
node = this.startNode();
|
|
36860
|
+
node.elements = this.parseExprList(types$1.bracketR, true);
|
|
36861
|
+
return this.finishNode(node, "ArrayExpression")
|
|
36862
|
+
|
|
36863
|
+
case types$1.braceL:
|
|
36864
|
+
this.toks.overrideContext(types.b_expr);
|
|
36865
|
+
return this.parseObj()
|
|
36866
|
+
|
|
36867
|
+
case types$1._class:
|
|
36868
|
+
return this.parseClass(false)
|
|
36869
|
+
|
|
36870
|
+
case types$1._function:
|
|
36871
|
+
node = this.startNode();
|
|
36872
|
+
this.next();
|
|
36873
|
+
return this.parseFunction(node, false)
|
|
36874
|
+
|
|
36875
|
+
case types$1._new:
|
|
36876
|
+
return this.parseNew()
|
|
36877
|
+
|
|
36878
|
+
case types$1.backQuote:
|
|
36879
|
+
return this.parseTemplate()
|
|
36880
|
+
|
|
36881
|
+
case types$1._import:
|
|
36882
|
+
if (this.options.ecmaVersion >= 11) {
|
|
36883
|
+
return this.parseExprImport()
|
|
36884
|
+
} else {
|
|
36885
|
+
return this.dummyIdent()
|
|
36886
|
+
}
|
|
36887
|
+
|
|
36888
|
+
default:
|
|
36889
|
+
return this.dummyIdent()
|
|
36890
|
+
}
|
|
36891
|
+
};
|
|
36892
|
+
|
|
36893
|
+
lp.parseExprImport = function() {
|
|
36894
|
+
var node = this.startNode();
|
|
36895
|
+
var meta = this.parseIdent(true);
|
|
36896
|
+
switch (this.tok.type) {
|
|
36897
|
+
case types$1.parenL:
|
|
36898
|
+
return this.parseDynamicImport(node)
|
|
36899
|
+
case types$1.dot:
|
|
36900
|
+
node.meta = meta;
|
|
36901
|
+
return this.parseImportMeta(node)
|
|
36902
|
+
default:
|
|
36903
|
+
node.name = "import";
|
|
36904
|
+
return this.finishNode(node, "Identifier")
|
|
36905
|
+
}
|
|
36906
|
+
};
|
|
36907
|
+
|
|
36908
|
+
lp.parseDynamicImport = function(node) {
|
|
36909
|
+
var list = this.parseExprList(types$1.parenR);
|
|
36910
|
+
node.source = list[0] || this.dummyString();
|
|
36911
|
+
node.options = list[1] || null;
|
|
36912
|
+
return this.finishNode(node, "ImportExpression")
|
|
36913
|
+
};
|
|
36914
|
+
|
|
36915
|
+
lp.parseImportMeta = function(node) {
|
|
36916
|
+
this.next(); // skip '.'
|
|
36917
|
+
node.property = this.parseIdent(true);
|
|
36918
|
+
return this.finishNode(node, "MetaProperty")
|
|
36919
|
+
};
|
|
36920
|
+
|
|
36921
|
+
lp.parseNew = function() {
|
|
36922
|
+
var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
|
|
36923
|
+
var meta = this.parseIdent(true);
|
|
36924
|
+
if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
|
|
36925
|
+
node.meta = meta;
|
|
36926
|
+
node.property = this.parseIdent(true);
|
|
36927
|
+
return this.finishNode(node, "MetaProperty")
|
|
36928
|
+
}
|
|
36929
|
+
var start = this.storeCurrentPos();
|
|
36930
|
+
node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
|
|
36931
|
+
if (this.tok.type === types$1.parenL) {
|
|
36932
|
+
node.arguments = this.parseExprList(types$1.parenR);
|
|
36933
|
+
} else {
|
|
36934
|
+
node.arguments = [];
|
|
36935
|
+
}
|
|
36936
|
+
return this.finishNode(node, "NewExpression")
|
|
36937
|
+
};
|
|
36938
|
+
|
|
36939
|
+
lp.parseTemplateElement = function() {
|
|
36940
|
+
var elem = this.startNode();
|
|
36941
|
+
|
|
36942
|
+
// The loose parser accepts invalid unicode escapes even in untagged templates.
|
|
36943
|
+
if (this.tok.type === types$1.invalidTemplate) {
|
|
36944
|
+
elem.value = {
|
|
36945
|
+
raw: this.tok.value,
|
|
36946
|
+
cooked: null
|
|
36947
|
+
};
|
|
36948
|
+
} else {
|
|
36949
|
+
elem.value = {
|
|
36950
|
+
raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
|
|
36951
|
+
cooked: this.tok.value
|
|
36952
|
+
};
|
|
36953
|
+
}
|
|
36954
|
+
this.next();
|
|
36955
|
+
elem.tail = this.tok.type === types$1.backQuote;
|
|
36956
|
+
return this.finishNode(elem, "TemplateElement")
|
|
36957
|
+
};
|
|
36958
|
+
|
|
36959
|
+
lp.parseTemplate = function() {
|
|
36960
|
+
var node = this.startNode();
|
|
36961
|
+
this.next();
|
|
36962
|
+
node.expressions = [];
|
|
36963
|
+
var curElt = this.parseTemplateElement();
|
|
36964
|
+
node.quasis = [curElt];
|
|
36965
|
+
while (!curElt.tail) {
|
|
36966
|
+
this.next();
|
|
36967
|
+
node.expressions.push(this.parseExpression());
|
|
36968
|
+
if (this.expect(types$1.braceR)) {
|
|
36969
|
+
curElt = this.parseTemplateElement();
|
|
36970
|
+
} else {
|
|
36971
|
+
curElt = this.startNode();
|
|
36972
|
+
curElt.value = {cooked: "", raw: ""};
|
|
36973
|
+
curElt.tail = true;
|
|
36974
|
+
this.finishNode(curElt, "TemplateElement");
|
|
36975
|
+
}
|
|
36976
|
+
node.quasis.push(curElt);
|
|
36977
|
+
}
|
|
36978
|
+
this.expect(types$1.backQuote);
|
|
36979
|
+
return this.finishNode(node, "TemplateLiteral")
|
|
36980
|
+
};
|
|
36981
|
+
|
|
36982
|
+
lp.parseObj = function() {
|
|
36983
|
+
var node = this.startNode();
|
|
36984
|
+
node.properties = [];
|
|
36985
|
+
this.pushCx();
|
|
36986
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
36987
|
+
this.eat(types$1.braceL);
|
|
36988
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
36989
|
+
while (!this.closes(types$1.braceR, indent, line)) {
|
|
36990
|
+
var prop = this.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
|
|
36991
|
+
if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
|
|
36992
|
+
prop.argument = this.parseMaybeAssign();
|
|
36993
|
+
node.properties.push(this.finishNode(prop, "SpreadElement"));
|
|
36994
|
+
this.eat(types$1.comma);
|
|
36995
|
+
continue
|
|
36996
|
+
}
|
|
36997
|
+
if (this.options.ecmaVersion >= 6) {
|
|
36998
|
+
start = this.storeCurrentPos();
|
|
36999
|
+
prop.method = false;
|
|
37000
|
+
prop.shorthand = false;
|
|
37001
|
+
isGenerator = this.eat(types$1.star);
|
|
37002
|
+
}
|
|
37003
|
+
this.parsePropertyName(prop);
|
|
37004
|
+
if (this.toks.isAsyncProp(prop)) {
|
|
37005
|
+
isAsync = true;
|
|
37006
|
+
isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
|
|
37007
|
+
this.parsePropertyName(prop);
|
|
37008
|
+
} else {
|
|
37009
|
+
isAsync = false;
|
|
37010
|
+
}
|
|
37011
|
+
if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) { this.next(); } this.eat(types$1.comma); continue }
|
|
37012
|
+
if (this.eat(types$1.colon)) {
|
|
37013
|
+
prop.kind = "init";
|
|
37014
|
+
prop.value = this.parseMaybeAssign();
|
|
37015
|
+
} else if (this.options.ecmaVersion >= 6 && (this.tok.type === types$1.parenL || this.tok.type === types$1.braceL)) {
|
|
37016
|
+
prop.kind = "init";
|
|
37017
|
+
prop.method = true;
|
|
37018
|
+
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
37019
|
+
} else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
|
|
37020
|
+
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
|
|
37021
|
+
(this.tok.type !== types$1.comma && this.tok.type !== types$1.braceR && this.tok.type !== types$1.eq)) {
|
|
37022
|
+
prop.kind = prop.key.name;
|
|
37023
|
+
this.parsePropertyName(prop);
|
|
37024
|
+
prop.value = this.parseMethod(false);
|
|
37025
|
+
} else {
|
|
37026
|
+
prop.kind = "init";
|
|
37027
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37028
|
+
if (this.eat(types$1.eq)) {
|
|
37029
|
+
var assign = this.startNodeAt(start);
|
|
37030
|
+
assign.operator = "=";
|
|
37031
|
+
assign.left = prop.key;
|
|
37032
|
+
assign.right = this.parseMaybeAssign();
|
|
37033
|
+
prop.value = this.finishNode(assign, "AssignmentExpression");
|
|
37034
|
+
} else {
|
|
37035
|
+
prop.value = prop.key;
|
|
37036
|
+
}
|
|
37037
|
+
} else {
|
|
37038
|
+
prop.value = this.dummyIdent();
|
|
37039
|
+
}
|
|
37040
|
+
prop.shorthand = true;
|
|
37041
|
+
}
|
|
37042
|
+
node.properties.push(this.finishNode(prop, "Property"));
|
|
37043
|
+
this.eat(types$1.comma);
|
|
37044
|
+
}
|
|
37045
|
+
this.popCx();
|
|
37046
|
+
if (!this.eat(types$1.braceR)) {
|
|
37047
|
+
// If there is no closing brace, make the node span to the start
|
|
37048
|
+
// of the next token (this is useful for Tern)
|
|
37049
|
+
this.last.end = this.tok.start;
|
|
37050
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
37051
|
+
}
|
|
37052
|
+
return this.finishNode(node, "ObjectExpression")
|
|
37053
|
+
};
|
|
37054
|
+
|
|
37055
|
+
lp.parsePropertyName = function(prop) {
|
|
37056
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37057
|
+
if (this.eat(types$1.bracketL)) {
|
|
37058
|
+
prop.computed = true;
|
|
37059
|
+
prop.key = this.parseExpression();
|
|
37060
|
+
this.expect(types$1.bracketR);
|
|
37061
|
+
return
|
|
37062
|
+
} else {
|
|
37063
|
+
prop.computed = false;
|
|
37064
|
+
}
|
|
37065
|
+
}
|
|
37066
|
+
var key = (this.tok.type === types$1.num || this.tok.type === types$1.string) ? this.parseExprAtom() : this.parseIdent();
|
|
37067
|
+
prop.key = key || this.dummyIdent();
|
|
37068
|
+
};
|
|
37069
|
+
|
|
37070
|
+
lp.parsePropertyAccessor = function() {
|
|
37071
|
+
if (this.tok.type === types$1.name || this.tok.type.keyword) { return this.parseIdent() }
|
|
37072
|
+
if (this.tok.type === types$1.privateId) { return this.parsePrivateIdent() }
|
|
37073
|
+
};
|
|
37074
|
+
|
|
37075
|
+
lp.parseIdent = function() {
|
|
37076
|
+
var name = this.tok.type === types$1.name ? this.tok.value : this.tok.type.keyword;
|
|
37077
|
+
if (!name) { return this.dummyIdent() }
|
|
37078
|
+
if (this.tok.type.keyword) { this.toks.type = types$1.name; }
|
|
37079
|
+
var node = this.startNode();
|
|
37080
|
+
this.next();
|
|
37081
|
+
node.name = name;
|
|
37082
|
+
return this.finishNode(node, "Identifier")
|
|
37083
|
+
};
|
|
37084
|
+
|
|
37085
|
+
lp.parsePrivateIdent = function() {
|
|
37086
|
+
var node = this.startNode();
|
|
37087
|
+
node.name = this.tok.value;
|
|
37088
|
+
this.next();
|
|
37089
|
+
return this.finishNode(node, "PrivateIdentifier")
|
|
37090
|
+
};
|
|
37091
|
+
|
|
37092
|
+
lp.initFunction = function(node) {
|
|
37093
|
+
node.id = null;
|
|
37094
|
+
node.params = [];
|
|
37095
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37096
|
+
node.generator = false;
|
|
37097
|
+
node.expression = false;
|
|
37098
|
+
}
|
|
37099
|
+
if (this.options.ecmaVersion >= 8)
|
|
37100
|
+
{ node.async = false; }
|
|
37101
|
+
};
|
|
37102
|
+
|
|
37103
|
+
// Convert existing expression atom to assignable pattern
|
|
37104
|
+
// if possible.
|
|
37105
|
+
|
|
37106
|
+
lp.toAssignable = function(node, binding) {
|
|
37107
|
+
if (!node || node.type === "Identifier" || (node.type === "MemberExpression" && !binding)) ; else if (node.type === "ParenthesizedExpression") {
|
|
37108
|
+
this.toAssignable(node.expression, binding);
|
|
37109
|
+
} else if (this.options.ecmaVersion < 6) {
|
|
37110
|
+
return this.dummyIdent()
|
|
37111
|
+
} else if (node.type === "ObjectExpression") {
|
|
37112
|
+
node.type = "ObjectPattern";
|
|
37113
|
+
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
|
37114
|
+
{
|
|
37115
|
+
var prop = list[i];
|
|
37116
|
+
|
|
37117
|
+
this.toAssignable(prop, binding);
|
|
37118
|
+
}
|
|
37119
|
+
} else if (node.type === "ArrayExpression") {
|
|
37120
|
+
node.type = "ArrayPattern";
|
|
37121
|
+
this.toAssignableList(node.elements, binding);
|
|
37122
|
+
} else if (node.type === "Property") {
|
|
37123
|
+
this.toAssignable(node.value, binding);
|
|
37124
|
+
} else if (node.type === "SpreadElement") {
|
|
37125
|
+
node.type = "RestElement";
|
|
37126
|
+
this.toAssignable(node.argument, binding);
|
|
37127
|
+
} else if (node.type === "AssignmentExpression") {
|
|
37128
|
+
node.type = "AssignmentPattern";
|
|
37129
|
+
delete node.operator;
|
|
37130
|
+
} else {
|
|
37131
|
+
return this.dummyIdent()
|
|
37132
|
+
}
|
|
37133
|
+
return node
|
|
37134
|
+
};
|
|
37135
|
+
|
|
37136
|
+
lp.toAssignableList = function(exprList, binding) {
|
|
37137
|
+
for (var i = 0, list = exprList; i < list.length; i += 1)
|
|
37138
|
+
{
|
|
37139
|
+
var expr = list[i];
|
|
37140
|
+
|
|
37141
|
+
this.toAssignable(expr, binding);
|
|
37142
|
+
}
|
|
37143
|
+
return exprList
|
|
37144
|
+
};
|
|
37145
|
+
|
|
37146
|
+
lp.parseFunctionParams = function(params) {
|
|
37147
|
+
params = this.parseExprList(types$1.parenR);
|
|
37148
|
+
return this.toAssignableList(params, true)
|
|
37149
|
+
};
|
|
37150
|
+
|
|
37151
|
+
lp.parseMethod = function(isGenerator, isAsync) {
|
|
37152
|
+
var node = this.startNode(), oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
37153
|
+
this.initFunction(node);
|
|
37154
|
+
if (this.options.ecmaVersion >= 6)
|
|
37155
|
+
{ node.generator = !!isGenerator; }
|
|
37156
|
+
if (this.options.ecmaVersion >= 8)
|
|
37157
|
+
{ node.async = !!isAsync; }
|
|
37158
|
+
this.inAsync = node.async;
|
|
37159
|
+
this.inGenerator = node.generator;
|
|
37160
|
+
this.inFunction = true;
|
|
37161
|
+
node.params = this.parseFunctionParams();
|
|
37162
|
+
node.body = this.parseBlock();
|
|
37163
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
37164
|
+
this.inAsync = oldInAsync;
|
|
37165
|
+
this.inGenerator = oldInGenerator;
|
|
37166
|
+
this.inFunction = oldInFunction;
|
|
37167
|
+
return this.finishNode(node, "FunctionExpression")
|
|
37168
|
+
};
|
|
37169
|
+
|
|
37170
|
+
lp.parseArrowExpression = function(node, params, isAsync) {
|
|
37171
|
+
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
37172
|
+
this.initFunction(node);
|
|
37173
|
+
if (this.options.ecmaVersion >= 8)
|
|
37174
|
+
{ node.async = !!isAsync; }
|
|
37175
|
+
this.inAsync = node.async;
|
|
37176
|
+
this.inGenerator = false;
|
|
37177
|
+
this.inFunction = true;
|
|
37178
|
+
node.params = this.toAssignableList(params, true);
|
|
37179
|
+
node.expression = this.tok.type !== types$1.braceL;
|
|
37180
|
+
if (node.expression) {
|
|
37181
|
+
node.body = this.parseMaybeAssign();
|
|
37182
|
+
} else {
|
|
37183
|
+
node.body = this.parseBlock();
|
|
37184
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
37185
|
+
}
|
|
37186
|
+
this.inAsync = oldInAsync;
|
|
37187
|
+
this.inGenerator = oldInGenerator;
|
|
37188
|
+
this.inFunction = oldInFunction;
|
|
37189
|
+
return this.finishNode(node, "ArrowFunctionExpression")
|
|
37190
|
+
};
|
|
37191
|
+
|
|
37192
|
+
lp.parseExprList = function(close, allowEmpty) {
|
|
37193
|
+
this.pushCx();
|
|
37194
|
+
var indent = this.curIndent, line = this.curLineStart, elts = [];
|
|
37195
|
+
this.next(); // Opening bracket
|
|
37196
|
+
while (!this.closes(close, indent + 1, line)) {
|
|
37197
|
+
if (this.eat(types$1.comma)) {
|
|
37198
|
+
elts.push(allowEmpty ? null : this.dummyIdent());
|
|
37199
|
+
continue
|
|
37200
|
+
}
|
|
37201
|
+
var elt = this.parseMaybeAssign();
|
|
37202
|
+
if (isDummy(elt)) {
|
|
37203
|
+
if (this.closes(close, indent, line)) { break }
|
|
37204
|
+
this.next();
|
|
37205
|
+
} else {
|
|
37206
|
+
elts.push(elt);
|
|
37207
|
+
}
|
|
37208
|
+
this.eat(types$1.comma);
|
|
37209
|
+
}
|
|
37210
|
+
this.popCx();
|
|
37211
|
+
if (!this.eat(close)) {
|
|
37212
|
+
// If there is no closing brace, make the node span to the start
|
|
37213
|
+
// of the next token (this is useful for Tern)
|
|
37214
|
+
this.last.end = this.tok.start;
|
|
37215
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
37216
|
+
}
|
|
37217
|
+
return elts
|
|
37218
|
+
};
|
|
37219
|
+
|
|
37220
|
+
lp.parseAwait = function() {
|
|
37221
|
+
var node = this.startNode();
|
|
37222
|
+
this.next();
|
|
37223
|
+
node.argument = this.parseMaybeUnary();
|
|
37224
|
+
return this.finishNode(node, "AwaitExpression")
|
|
37225
|
+
};
|
|
37226
|
+
|
|
37227
|
+
// Acorn: Loose parser
|
|
37228
|
+
//
|
|
37229
|
+
// This module provides an alternative parser that exposes that same
|
|
37230
|
+
// interface as the main module's `parse` function, but will try to
|
|
37231
|
+
// parse anything as JavaScript, repairing syntax error the best it
|
|
37232
|
+
// can. There are circumstances in which it will raise an error and
|
|
37233
|
+
// give up, but they are very rare. The resulting AST will be a mostly
|
|
37234
|
+
// valid JavaScript AST (as per the [ESTree spec][estree], except
|
|
37235
|
+
// that:
|
|
37236
|
+
//
|
|
37237
|
+
// - Return outside functions is allowed
|
|
37238
|
+
//
|
|
37239
|
+
// - Label consistency (no conflicts, break only to existing labels)
|
|
37240
|
+
// is not enforced.
|
|
37241
|
+
//
|
|
37242
|
+
// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
|
|
37243
|
+
// the parser got too confused to return anything meaningful.
|
|
37244
|
+
//
|
|
37245
|
+
// [estree]: https://github.com/estree/estree
|
|
37246
|
+
//
|
|
37247
|
+
// The expected use for this is to *first* try `acorn.parse`, and only
|
|
37248
|
+
// if that fails switch to the loose parser. The loose parser might
|
|
37249
|
+
// parse badly indented code incorrectly, so **don't** use it as your
|
|
37250
|
+
// default parser.
|
|
37251
|
+
//
|
|
37252
|
+
// Quite a lot of acorn.js is duplicated here. The alternative was to
|
|
37253
|
+
// add a *lot* of extra cruft to that file, making it less readable
|
|
37254
|
+
// and slower. Copying and editing the code allowed me to make
|
|
37255
|
+
// invasive changes and simplifications without creating a complicated
|
|
37256
|
+
// tangle.
|
|
37257
|
+
|
|
37258
|
+
|
|
37259
|
+
defaultOptions.tabSize = 4;
|
|
37260
|
+
|
|
37261
|
+
function parse(input, options) {
|
|
37262
|
+
return LooseParser.parse(input, options)
|
|
37263
|
+
}
|
|
37264
|
+
|
|
35638
37265
|
// AST walker module for ESTree compatible trees
|
|
35639
37266
|
|
|
35640
37267
|
// A simple walk is one where you simply specify callbacks to be
|
|
@@ -35922,13 +37549,24 @@ base.MethodDefinition = base.PropertyDefinition = base.Property = function (node
|
|
|
35922
37549
|
function getAcornParsedNodes(input) {
|
|
35923
37550
|
var parsedNode = null;
|
|
35924
37551
|
try {
|
|
35925
|
-
parsedNode = parse(input, {
|
|
37552
|
+
parsedNode = parse$1(input, {
|
|
35926
37553
|
ecmaVersion: 'latest',
|
|
35927
37554
|
sourceType: 'module',
|
|
35928
37555
|
locations: true
|
|
35929
37556
|
});
|
|
35930
37557
|
}
|
|
35931
|
-
catch (_a) {
|
|
37558
|
+
catch (_a) {
|
|
37559
|
+
// attempt parse with more error-tolerant parser.
|
|
37560
|
+
// handles rules with both shared code and top-level
|
|
37561
|
+
// return, which is technically invalid syntax
|
|
37562
|
+
try {
|
|
37563
|
+
parsedNode = parse(input, {
|
|
37564
|
+
ecmaVersion: 'latest',
|
|
37565
|
+
locations: true
|
|
37566
|
+
});
|
|
37567
|
+
}
|
|
37568
|
+
catch (_b) { }
|
|
37569
|
+
}
|
|
35932
37570
|
return parsedNode;
|
|
35933
37571
|
}
|
|
35934
37572
|
function extractReferencedIdentifiers(bodyNode) {
|
|
@@ -36072,8 +37710,10 @@ function extractJsElements(code) {
|
|
|
36072
37710
|
var exportFunctions = [];
|
|
36073
37711
|
var exportVariables = [];
|
|
36074
37712
|
var parsedNodes = getAcornParsedNodes(code);
|
|
36075
|
-
if (!parsedNodes)
|
|
37713
|
+
if (!parsedNodes) {
|
|
37714
|
+
console.warn('Failed to parse logic rule code');
|
|
36076
37715
|
return { exportVariables: exportVariables, exportFunctions: exportFunctions };
|
|
37716
|
+
}
|
|
36077
37717
|
// Helper: turn a param node into its original text
|
|
36078
37718
|
var paramText = function (p) { return code.slice(p.start, p.end); };
|
|
36079
37719
|
// Helper: build function signature and body from FunctionExpression or ArrowFunctionExpression
|
|
@@ -42332,6 +43972,112 @@ function loadQRScanner() {
|
|
|
42332
43972
|
exports.qrPromise = dynamicImport(QR_SCANNER_LIB_URL);
|
|
42333
43973
|
}
|
|
42334
43974
|
|
|
43975
|
+
/**
|
|
43976
|
+
* Event queue for holding events before user interaction
|
|
43977
|
+
*/
|
|
43978
|
+
var EventQueue = /** @class */ (function () {
|
|
43979
|
+
function EventQueue() {
|
|
43980
|
+
this.queue = [];
|
|
43981
|
+
this.isReplaying = false;
|
|
43982
|
+
}
|
|
43983
|
+
EventQueue.prototype.enqueue = function (eventData) {
|
|
43984
|
+
var _this = this;
|
|
43985
|
+
return new Promise(function (resolve, reject) {
|
|
43986
|
+
_this.queue.push({
|
|
43987
|
+
eventData: eventData,
|
|
43988
|
+
timestamp: Date.now(),
|
|
43989
|
+
resolve: resolve,
|
|
43990
|
+
reject: reject
|
|
43991
|
+
});
|
|
43992
|
+
});
|
|
43993
|
+
};
|
|
43994
|
+
EventQueue.prototype.getAll = function () {
|
|
43995
|
+
return this.queue;
|
|
43996
|
+
};
|
|
43997
|
+
EventQueue.prototype.clear = function () {
|
|
43998
|
+
this.queue = [];
|
|
43999
|
+
};
|
|
44000
|
+
EventQueue.prototype.isEmpty = function () {
|
|
44001
|
+
return this.queue.length === 0;
|
|
44002
|
+
};
|
|
44003
|
+
EventQueue.prototype.size = function () {
|
|
44004
|
+
return this.queue.length;
|
|
44005
|
+
};
|
|
44006
|
+
EventQueue.prototype.isReplayingEvents = function () {
|
|
44007
|
+
return this.isReplaying;
|
|
44008
|
+
};
|
|
44009
|
+
EventQueue.prototype.setReplayState = function (replaying) {
|
|
44010
|
+
this.isReplaying = replaying;
|
|
44011
|
+
};
|
|
44012
|
+
/**
|
|
44013
|
+
* Apply replay function to all queued events
|
|
44014
|
+
* @param replayFn Function to call for each event
|
|
44015
|
+
*/
|
|
44016
|
+
EventQueue.prototype.replayAll = function (replayFn) {
|
|
44017
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
44018
|
+
var eventsToReplay, eventsToReplay_1, eventsToReplay_1_1, queuedEvent, result, error_1, e_1_1;
|
|
44019
|
+
var e_1, _a;
|
|
44020
|
+
return __generator(this, function (_b) {
|
|
44021
|
+
switch (_b.label) {
|
|
44022
|
+
case 0:
|
|
44023
|
+
if (this.isEmpty())
|
|
44024
|
+
return [2 /*return*/];
|
|
44025
|
+
this.setReplayState(true);
|
|
44026
|
+
_b.label = 1;
|
|
44027
|
+
case 1:
|
|
44028
|
+
_b.trys.push([1, , 14, 15]);
|
|
44029
|
+
_b.label = 2;
|
|
44030
|
+
case 2:
|
|
44031
|
+
if (!!this.isEmpty()) return [3 /*break*/, 13];
|
|
44032
|
+
eventsToReplay = __spreadArray([], __read(this.queue), false);
|
|
44033
|
+
this.queue = [];
|
|
44034
|
+
_b.label = 3;
|
|
44035
|
+
case 3:
|
|
44036
|
+
_b.trys.push([3, 10, 11, 12]);
|
|
44037
|
+
eventsToReplay_1 = (e_1 = void 0, __values(eventsToReplay)), eventsToReplay_1_1 = eventsToReplay_1.next();
|
|
44038
|
+
_b.label = 4;
|
|
44039
|
+
case 4:
|
|
44040
|
+
if (!!eventsToReplay_1_1.done) return [3 /*break*/, 9];
|
|
44041
|
+
queuedEvent = eventsToReplay_1_1.value;
|
|
44042
|
+
_b.label = 5;
|
|
44043
|
+
case 5:
|
|
44044
|
+
_b.trys.push([5, 7, , 8]);
|
|
44045
|
+
return [4 /*yield*/, replayFn(queuedEvent.eventData)];
|
|
44046
|
+
case 6:
|
|
44047
|
+
result = _b.sent();
|
|
44048
|
+
queuedEvent.resolve(result);
|
|
44049
|
+
return [3 /*break*/, 8];
|
|
44050
|
+
case 7:
|
|
44051
|
+
error_1 = _b.sent();
|
|
44052
|
+
queuedEvent.reject(error_1);
|
|
44053
|
+
return [3 /*break*/, 8];
|
|
44054
|
+
case 8:
|
|
44055
|
+
eventsToReplay_1_1 = eventsToReplay_1.next();
|
|
44056
|
+
return [3 /*break*/, 4];
|
|
44057
|
+
case 9: return [3 /*break*/, 12];
|
|
44058
|
+
case 10:
|
|
44059
|
+
e_1_1 = _b.sent();
|
|
44060
|
+
e_1 = { error: e_1_1 };
|
|
44061
|
+
return [3 /*break*/, 12];
|
|
44062
|
+
case 11:
|
|
44063
|
+
try {
|
|
44064
|
+
if (eventsToReplay_1_1 && !eventsToReplay_1_1.done && (_a = eventsToReplay_1.return)) _a.call(eventsToReplay_1);
|
|
44065
|
+
}
|
|
44066
|
+
finally { if (e_1) throw e_1.error; }
|
|
44067
|
+
return [7 /*endfinally*/];
|
|
44068
|
+
case 12: return [3 /*break*/, 2];
|
|
44069
|
+
case 13: return [3 /*break*/, 15];
|
|
44070
|
+
case 14:
|
|
44071
|
+
this.setReplayState(false);
|
|
44072
|
+
return [7 /*endfinally*/];
|
|
44073
|
+
case 15: return [2 /*return*/];
|
|
44074
|
+
}
|
|
44075
|
+
});
|
|
44076
|
+
});
|
|
44077
|
+
};
|
|
44078
|
+
return EventQueue;
|
|
44079
|
+
}());
|
|
44080
|
+
|
|
42335
44081
|
var API_URL_OPTIONS = {
|
|
42336
44082
|
local: 'http://localhost:8006/api/',
|
|
42337
44083
|
staging: 'https://staging.feathery.io/api/',
|
|
@@ -42406,6 +44152,10 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
42406
44152
|
var _this = this;
|
|
42407
44153
|
var _a, _b;
|
|
42408
44154
|
_this = _super.call(this, formKey, ignoreNetworkErrors, draft, bypassCDN) || this;
|
|
44155
|
+
/**
|
|
44156
|
+
* Queue for events triggered before user interaction
|
|
44157
|
+
*/
|
|
44158
|
+
_this.userEventQueue = new EventQueue();
|
|
42409
44159
|
/**
|
|
42410
44160
|
* `beforeunload` event handler that flushes the pending submit custom changes
|
|
42411
44161
|
* when a user is attempting to exit the page.
|
|
@@ -42441,8 +44191,39 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
42441
44191
|
var _a, _b;
|
|
42442
44192
|
return __awaiter$2(this, void 0, void 0, function () {
|
|
42443
44193
|
return __generator(this, function (_c) {
|
|
42444
|
-
|
|
42445
|
-
|
|
44194
|
+
switch (_c.label) {
|
|
44195
|
+
case 0:
|
|
44196
|
+
(_b = (_a = featheryWindow()).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, FEATHERY_INTERACTION_EVENT, this.handleInteraction);
|
|
44197
|
+
// replay queued events, then flush fields
|
|
44198
|
+
return [4 /*yield*/, this.replayQueuedEvents()];
|
|
44199
|
+
case 1:
|
|
44200
|
+
// replay queued events, then flush fields
|
|
44201
|
+
_c.sent();
|
|
44202
|
+
return [4 /*yield*/, this.submitCustom({}, { shouldFlush: true })];
|
|
44203
|
+
case 2:
|
|
44204
|
+
_c.sent();
|
|
44205
|
+
return [2 /*return*/];
|
|
44206
|
+
}
|
|
44207
|
+
});
|
|
44208
|
+
});
|
|
44209
|
+
};
|
|
44210
|
+
FeatheryClient.prototype.replayQueuedEvents = function () {
|
|
44211
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
44212
|
+
var _this = this;
|
|
44213
|
+
return __generator(this, function (_a) {
|
|
44214
|
+
switch (_a.label) {
|
|
44215
|
+
case 0:
|
|
44216
|
+
if (this.userEventQueue.isEmpty())
|
|
44217
|
+
return [2 /*return*/];
|
|
44218
|
+
return [4 /*yield*/, this.userEventQueue.replayAll(function (eventData) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
44219
|
+
return __generator(this, function (_a) {
|
|
44220
|
+
return [2 /*return*/, this._registerEventInternal(eventData)];
|
|
44221
|
+
});
|
|
44222
|
+
}); })];
|
|
44223
|
+
case 1:
|
|
44224
|
+
_a.sent();
|
|
44225
|
+
return [2 /*return*/];
|
|
44226
|
+
}
|
|
42446
44227
|
});
|
|
42447
44228
|
});
|
|
42448
44229
|
};
|
|
@@ -43133,15 +44914,24 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
43133
44914
|
});
|
|
43134
44915
|
};
|
|
43135
44916
|
FeatheryClient.prototype.registerEvent = function (eventData) {
|
|
44917
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
44918
|
+
return __generator(this, function (_a) {
|
|
44919
|
+
if (this.draft)
|
|
44920
|
+
return [2 /*return*/];
|
|
44921
|
+
if (!isInteractionDetected() || this.userEventQueue.isReplayingEvents()) {
|
|
44922
|
+
return [2 /*return*/, this.userEventQueue.enqueue(eventData)];
|
|
44923
|
+
}
|
|
44924
|
+
return [2 /*return*/, this._registerEventInternal(eventData)];
|
|
44925
|
+
});
|
|
44926
|
+
});
|
|
44927
|
+
};
|
|
44928
|
+
FeatheryClient.prototype._registerEventInternal = function (eventData) {
|
|
43136
44929
|
return __awaiter$2(this, void 0, void 0, function () {
|
|
43137
44930
|
var _a, userId, collaboratorId, url, data, options, prom, stepKey, triggerEvent, eventPromise;
|
|
43138
44931
|
var _this = this;
|
|
43139
44932
|
return __generator(this, function (_b) {
|
|
43140
44933
|
switch (_b.label) {
|
|
43141
|
-
case 0:
|
|
43142
|
-
if (this.draft)
|
|
43143
|
-
return [2 /*return*/];
|
|
43144
|
-
return [4 /*yield*/, initFormsPromise];
|
|
44934
|
+
case 0: return [4 /*yield*/, initFormsPromise];
|
|
43145
44935
|
case 1:
|
|
43146
44936
|
_b.sent();
|
|
43147
44937
|
_a = initInfo(), userId = _a.userId, collaboratorId = _a.collaboratorId;
|
|
@@ -43653,9 +45443,9 @@ function init(sdkKey, options) {
|
|
|
43653
45443
|
if (runningInClient()) {
|
|
43654
45444
|
// Dynamically load libraries that must be client side
|
|
43655
45445
|
global.scriptjsLoadPromise = Promise.resolve().then(function () { return require(
|
|
43656
|
-
/* webpackChunkName: "scriptjs" */ './fthry_script.
|
|
45446
|
+
/* webpackChunkName: "scriptjs" */ './fthry_script.CpqGoZRW.js'); }).then(function (n) { return n.script; });
|
|
43657
45447
|
global.webfontloaderPromise = Promise.resolve().then(function () { return require(
|
|
43658
|
-
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.
|
|
45448
|
+
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.COsYlNwD.js'); }).then(function (n) { return n.webfontloader; });
|
|
43659
45449
|
// Client-side tracking logic
|
|
43660
45450
|
if (initState.userTracking === 'cookie') {
|
|
43661
45451
|
var cookieKey = "feathery-user-id-".concat(sdkKey);
|
|
@@ -43801,7 +45591,7 @@ function getFieldValues() {
|
|
|
43801
45591
|
return exports.__assign({}, exports.fieldValues);
|
|
43802
45592
|
}
|
|
43803
45593
|
function logFeatheryBadge() {
|
|
43804
|
-
console.log('%c Feathery %c v' + "2.15.
|
|
45594
|
+
console.log('%c Feathery %c v' + "2.15.1" + ' ', // replaced with real version during build
|
|
43805
45595
|
'background: #e2626e; color: white; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;', 'background: #fce7e9; color: #c5495a; padding: 2px 6px; border-radius: 0 3px 3px 0;');
|
|
43806
45596
|
}
|
|
43807
45597
|
|
|
@@ -45279,39 +47069,39 @@ breakpoint) {
|
|
|
45279
47069
|
return styles.getTarget('inner-container', undefined, viewport === 'mobile');
|
|
45280
47070
|
};
|
|
45281
47071
|
|
|
45282
|
-
var AddressLine1 = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "AddressField" */ './fthry_index.
|
|
45283
|
-
var ButtonGroupField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.
|
|
45284
|
-
var CheckboxField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxField" */ './fthry_index.
|
|
47072
|
+
var AddressLine1 = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "AddressField" */ './fthry_index.JRP5lBfp.js'); }); });
|
|
47073
|
+
var ButtonGroupField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.DLnigFf3.js'); }); });
|
|
47074
|
+
var CheckboxField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxField" */ './fthry_index.BJYH_2P6.js'); }); });
|
|
45285
47075
|
var CheckboxGroupField = React.lazy(function () {
|
|
45286
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.
|
|
47076
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.Bq3nU0FH.js'); });
|
|
45287
47077
|
});
|
|
45288
|
-
var ColorPickerField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ColorPickerField" */ './fthry_index.
|
|
45289
|
-
var CustomField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CustomField" */ './fthry_index.
|
|
47078
|
+
var ColorPickerField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ColorPickerField" */ './fthry_index.WDI9ExUl.js'); }); });
|
|
47079
|
+
var CustomField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CustomField" */ './fthry_index.CgMWWz7f.js'); }); });
|
|
45290
47080
|
var DateSelectorField = React.lazy(function () {
|
|
45291
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "DateSelectorField" */ './fthry_index.
|
|
47081
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "DateSelectorField" */ './fthry_index.By8RWuUY.js'); });
|
|
45292
47082
|
});
|
|
45293
|
-
var DropdownField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownField" */ './fthry_index.
|
|
47083
|
+
var DropdownField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownField" */ './fthry_index.CbfDILWu.js'); }); });
|
|
45294
47084
|
var DropdownMultiField = React.lazy(function () {
|
|
45295
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.
|
|
47085
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.DzpGyyn4.js'); });
|
|
45296
47086
|
});
|
|
45297
|
-
var FileUploadField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "FileUploadField" */ './fthry_index.
|
|
45298
|
-
var MatrixField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "MatrixField" */ './fthry_index.
|
|
45299
|
-
var PasswordField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PasswordField" */ './fthry_index.
|
|
47087
|
+
var FileUploadField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "FileUploadField" */ './fthry_index.Ci8dMyBp.js'); }); });
|
|
47088
|
+
var MatrixField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "MatrixField" */ './fthry_index.CrFjXWLg.js'); }); });
|
|
47089
|
+
var PasswordField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PasswordField" */ './fthry_index.Bd1HfYvE.js'); }); });
|
|
45300
47090
|
var PaymentMethodField = React.lazy(function () {
|
|
45301
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.
|
|
47091
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.NEoloWMI.js'); });
|
|
45302
47092
|
});
|
|
45303
|
-
var PhoneField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PhoneField" */ './fthry_index.
|
|
45304
|
-
var PinInputField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PinInputField" */ './fthry_index.
|
|
45305
|
-
var QRScanner = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "QRScanner" */ './fthry_index.
|
|
47093
|
+
var PhoneField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PhoneField" */ './fthry_index.BK_jaGHn.js'); }); });
|
|
47094
|
+
var PinInputField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PinInputField" */ './fthry_index.BqS0kCfh.js'); }); });
|
|
47095
|
+
var QRScanner = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "QRScanner" */ './fthry_index.Bb1R5GZK.js'); }); });
|
|
45306
47096
|
var RadioButtonGroupField = React.lazy(function () {
|
|
45307
47097
|
return Promise.resolve().then(function () { return require(
|
|
45308
|
-
/* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.
|
|
47098
|
+
/* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.DDjTLR_C.js'); });
|
|
45309
47099
|
});
|
|
45310
|
-
var RatingField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "RatingField" */ './fthry_index.
|
|
45311
|
-
var SignatureField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SignatureField" */ './fthry_index.
|
|
45312
|
-
var SliderField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SliderField" */ './fthry_index.
|
|
45313
|
-
var TextField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextField" */ './fthry_index.
|
|
45314
|
-
var TextArea = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextArea" */ './fthry_index.
|
|
47100
|
+
var RatingField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "RatingField" */ './fthry_index.GeYRayLh.js'); }); });
|
|
47101
|
+
var SignatureField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SignatureField" */ './fthry_index.DXm31Dvn.js'); }); });
|
|
47102
|
+
var SliderField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SliderField" */ './fthry_index.BgeTdwT5.js'); }); });
|
|
47103
|
+
var TextField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextField" */ './fthry_index.E_vLB-7s.js'); }); });
|
|
47104
|
+
var TextArea = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextArea" */ './fthry_index.D4rjZ-iU.js'); }); });
|
|
45315
47105
|
var Fields = {
|
|
45316
47106
|
AddressLine1: AddressLine1,
|
|
45317
47107
|
ButtonGroupField: ButtonGroupField,
|
|
@@ -46251,7 +48041,7 @@ function ElementSkeleton(_a) {
|
|
|
46251
48041
|
}
|
|
46252
48042
|
var templateObject_1;
|
|
46253
48043
|
|
|
46254
|
-
var TableElement = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TableElement" */ './fthry_index.
|
|
48044
|
+
var TableElement = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TableElement" */ './fthry_index.CkmA933O.js'); }); });
|
|
46255
48045
|
var Basic = {
|
|
46256
48046
|
ImageElement: ImageElement,
|
|
46257
48047
|
VideoElement: VideoElement,
|